Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ out
.venv/

debug.log
Phobos.log
gamemd.*
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.github/copilot-instructions.md
2 changes: 1 addition & 1 deletion Phobos.props
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<OutDir>$(Configuration)\</OutDir>
<IntDir>$(Configuration)\IntDir\</IntDir>
<CoreLibraryDependencies></CoreLibraryDependencies>
<PhobosExtraLibs>dbghelp.lib;onecore.lib</PhobosExtraLibs>
<PhobosExtraLibs>dbghelp.lib;onecore.lib;imm32.lib</PhobosExtraLibs>
</PropertyGroup>
<!-- Global -->
<ItemDefinitionGroup>
Expand Down
36 changes: 36 additions & 0 deletions Phobos.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,31 @@
<ClCompile Include="src\New\Type\Affiliated\PassengerDeletionTypeClass.cpp" />
<ClCompile Include="src\New\Type\Affiliated\TiberiumEaterTypeClass.cpp" />
<ClCompile Include="src\New\Type\Affiliated\TypeConvertGroup.cpp" />
<!-- src\OwnerDraw -->
<ClCompile Include="src\OwnerDraw\Button.cpp" />
<ClCompile Include="src\OwnerDraw\ComboBox.cpp" />
<ClCompile Include="src\OwnerDraw\Edit.cpp" />
<ClCompile Include="src\OwnerDraw\GroupBox.cpp" />
<ClCompile Include="src\OwnerDraw\Input.cpp" />
<ClCompile Include="src\OwnerDraw\ListBox.cpp" />
<ClCompile Include="src\OwnerDraw\OwnerDraw.cpp" />
<ClCompile Include="src\OwnerDraw\OwnerDraw.Hooks.cpp" />
<ClCompile Include="src\OwnerDraw\Progress.cpp" />
<ClCompile Include="src\OwnerDraw\ScrollBar.cpp" />
<ClCompile Include="src\OwnerDraw\Slider.cpp" />
<ClCompile Include="src\OwnerDraw\Static.cpp" />
<ClCompile Include="src\OwnerDraw\Tab.cpp" />
<!-- src\Render -->
<ClCompile Include="src\Render\Functions.cpp" />
<ClCompile Include="src\Render\Hooks.cpp" />
<ClCompile Include="src\Render\Mouse.cpp" />
<ClCompile Include="src\Render\Mouse.Hooks.cpp" />
<ClCompile Include="src\Render\Options.Hooks.cpp" />
<ClCompile Include="src\Render\Renderer.cpp" />
<ClCompile Include="src\Render\Surface.cpp" />
<ClCompile Include="src\Render\Surface.Hooks.cpp" />
<!-- src\Utilities -->
<ClCompile Include="src\Render\WWUI.Hooks.cpp" />
<ClCompile Include="src\Utilities\Anchor.cpp" />
<ClCompile Include="src\Utilities\AresAddressInit.cpp" />
<ClCompile Include="src\Utilities\AresHelper.cpp" />
Expand Down Expand Up @@ -387,6 +411,18 @@
<ClInclude Include="src\New\Type\Affiliated\PassengerDeletionTypeClass.h" />
<ClInclude Include="src\New\Type\Affiliated\TiberiumEaterTypeClass.h" />
<ClInclude Include="src\New\Type\Affiliated\TypeConvertGroup.h" />
<!-- src\OwnerDraw -->
<ClInclude Include="src\OwnerDraw\OwnerDraw.h" />
<ClInclude Include="src\OwnerDraw\OwnerDraw.Internal.h" />
<!-- src\Render -->
<ClInclude Include="src\Render\Functions.h" />
<ClInclude Include="src\Render\Mouse.h" />
<ClInclude Include="src\Render\Options.h" />
<ClInclude Include="src\Render\Renderer.h" />
<ClInclude Include="src\Render\Renderer.SurfacePS.h" />
<ClInclude Include="src\Render\Renderer.SurfaceVS.h" />
<ClInclude Include="src\Render\Surface.h" />
<ClInclude Include="src\Render\WWUI.h" />
<!-- src\Utilities -->
<ClInclude Include="src\Utilities\Anchor.h" />
<ClInclude Include="src\Utilities\AresFunctions.h" />
Expand Down
2 changes: 1 addition & 1 deletion YRpp
Submodule YRpp updated 8 files
+10 −0 BitFont.h
+1 −0 BitText.h
+34 −0 Blitters/BlitPlain.h
+36 −0 Blitters/BlitTrans.h
+11 −0 Drawing.h
+766 −18 OwnerDraw.h
+3 −0 UI.h
+2 −0 YRpp.props
30 changes: 0 additions & 30 deletions src/Misc/RetryDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@
#include <GScreenClass.h>
#include <EvadeClass.h>

namespace RetryDialogFlag
{
bool IsCalledFromRetryDialog = false;
}

DEFINE_HOOK(0x686092, DoLose_RetryDialogForCampaigns, 0x7)
{
enum { OK = 0x6860F6, Cancel = 0x6860EE, LoadGame = 0x686231 };
Expand Down Expand Up @@ -39,9 +34,7 @@ DEFINE_HOOK(0x686092, DoLose_RetryDialogForCampaigns, 0x7)

case WWMessageBox::Result::Button1:
auto pDialog = GameCreate<LoadOptionsClass>();
RetryDialogFlag::IsCalledFromRetryDialog = true;
const bool bIsAboutToLoad = pDialog->LoadDialog();
RetryDialogFlag::IsCalledFromRetryDialog = false;
GameDelete(pDialog);

if (!bIsAboutToLoad)
Expand All @@ -63,26 +56,3 @@ DEFINE_HOOK(0x686092, DoLose_RetryDialogForCampaigns, 0x7)

return LoadGame;
}

DEFINE_HOOK(0x558F4E, LoadOptionClass_Dialog_CenterListBox, 0x5)
{
if (RetryDialogFlag::IsCalledFromRetryDialog)
{
GET(HWND, hListBox, EAX);
GET(HWND, hDialog, EDI);

HWND hLoadButton = GetDlgItem(hDialog, 1039);

RECT buttonRect;
GetWindowRect(hLoadButton, &buttonRect);

float scaleX = static_cast<float>(buttonRect.right - buttonRect.left) / 108;
float scaleY = static_cast<float>(buttonRect.bottom - buttonRect.top) / 22;
int X = buttonRect.left - static_cast<int>(346 * scaleX);
int Y = buttonRect.top - static_cast<int>(44 * scaleY);

SetWindowPos(hListBox, NULL, X, Y, NULL, NULL, SWP_NOSIZE | SWP_NOZORDER);
}

return 0;
}
Loading
Loading