This repository has been archived by the owner on Mar 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
1,148 additions
and
953 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,5 @@ | |
!/Release/vxl_drawing_lib.lib | ||
/.vs/FA2sp/project-colors.json | ||
|
||
|
||
.vs/ |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Submodule FA2pp
updated
8 files
+2 −1 | CCredits.h | |
+0 −25 | CDialog289.h | |
+2 −0 | CLoading.h | |
+101 −2 | CMapData.h | |
+36 −0 | CScriptsSelectionDialog.h | |
+2 −2 | CTeamTypes.h | |
+10 −44 | MFC/ppmfc_cstring.h | |
+12 −6 | Miscs/Miscs.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include "Body.h" | ||
|
||
CScriptsSelectionDialog* CScriptsSelectionDialogExt::Instance = nullptr; | ||
|
||
void CScriptsSelectionDialogExt::ProgramStartupInit() | ||
{ | ||
RunTime::ResetMemoryContentAt(0x5926A8, &CScriptsSelectionDialogExt::PreTranslateMessageExt); | ||
} | ||
|
||
BOOL CScriptsSelectionDialogExt::PreTranslateMessageExt(MSG* pMsg) | ||
{ | ||
switch (pMsg->message) { | ||
case WM_CREATE: | ||
Logger::Debug(__FUNCTION__"\n"); | ||
break; | ||
default: | ||
break; | ||
} | ||
return this->ppmfc::CDialog::PreTranslateMessage(pMsg); | ||
} |
10 changes: 5 additions & 5 deletions
10
FA2sp/Ext/CDialog289/Body.h → FA2sp/Ext/CScriptsSelectionDialog/Body.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,85 @@ | ||
#include "Body.h" | ||
|
||
#include <Helpers/Macro.h> | ||
#include <Miscs/Miscs.h> | ||
|
||
#include <CMapData.h> | ||
#include <CLoading.h> | ||
|
||
#include "../../Helpers/STDHelpers.h" | ||
|
||
#include "../../FA2sp.h" | ||
|
||
DEFINE_HOOK(4E7900, CTeamTypes_OnCBCurrentTeamSelectChanged, 7) | ||
{ | ||
GET(CTeamTypes*, pThis, ECX); | ||
auto pINI = CMapData::Instance->UpdateCurrentDocument(); | ||
|
||
if (pThis->CCBTeamList.GetCurSel() >= 0) | ||
{ | ||
ppmfc::CString ID = STDHelpers::GetComboBoxText(pThis->CCBTeamList); | ||
STDHelpers::TrimIndex(ID); | ||
if (pINI->SectionExists(ID)) | ||
{ | ||
pThis->BOOL_Aggressive = pINI->GetBool(ID, "Aggressive"); | ||
pThis->BOOL_Annoyance = pINI->GetBool(ID, "Annoyance"); | ||
pThis->BOOL_AreTeamMembersRecruitable = pINI->GetBool(ID, "AreTeamMembersRecruitable"); | ||
pThis->BOOL_Autocreate = pINI->GetBool(ID, "Autocreate"); | ||
pThis->BOOL_AvoidThreats = pINI->GetBool(ID, "AvoidThreats"); | ||
pThis->BOOL_CargoPlane = pINI->GetBool(ID, "CargoPlane"); | ||
pThis->BOOL_Full = pINI->GetBool(ID, "Full"); | ||
pThis->BOOL_GuardSlower = pINI->GetBool(ID, "GuardSlower"); | ||
pThis->BOOL_IonImmune = pINI->GetBool(ID, "IonImmune"); | ||
pThis->BOOL_IsBaseDefense = pINI->GetBool(ID, "IsBaseDefense"); | ||
pThis->BOOL_Loadable = pINI->GetBool(ID, "Loadable"); | ||
pThis->BOOL_LooseRecruit = pINI->GetBool(ID, "LooseRecruit"); | ||
pThis->BOOL_OnlyTargetHouseEnemy = pINI->GetBool(ID, "OnlyTargetHouseEnemy"); | ||
pThis->BOOL_OnTransOnly = pINI->GetBool(ID, "OnTransOnly"); | ||
pThis->BOOL_Prebuild = pINI->GetBool(ID, "Prebuild"); | ||
pThis->BOOL_Recruiter = pINI->GetBool(ID, "Recruiter"); | ||
pThis->BOOL_Reinforce = pINI->GetBool(ID, "Reinforce"); | ||
pThis->BOOL_Suicide = pINI->GetBool(ID, "Suicide"); | ||
pThis->BOOL_TransportsReturnOnUnload = pINI->GetBool(ID, "TransportsReturnOnUnload"); | ||
pThis->BOOL_Whiner = pINI->GetBool(ID, "Whiner"); | ||
pThis->CString_Group = pINI->GetString(ID, "Group"); | ||
pThis->CString_Max = pINI->GetString(ID, "Max"); | ||
pThis->CString_Name = pINI->GetString(ID, "Name"); | ||
pThis->CString_Priority = pINI->GetString(ID, "Priority"); | ||
pThis->CString_TechLevel = pINI->GetString(ID, "TechLevel"); | ||
Miscs::ParseHouseName(&pThis->CString_House, pINI->GetString(ID, "House"), true); | ||
|
||
pThis->CString_VeteranLevel = pINI->GetString(ID, "VeteranLevel"); | ||
if (CLoading::HasMdFile) | ||
pThis->CString_MindControlDecision = pINI->GetString(ID, "MindControlDecision"); | ||
|
||
pThis->CString_Waypoint.Format("%d", Waypoints::String_To_Waypoint(pINI->GetString(ID, "Waypoint"))); | ||
if (auto ppStr = pINI->TryGetString(ID, "TransportWaypoint")) | ||
pThis->CString_TransportWaypoint.Format("%d", Waypoints::String_To_Waypoint(*ppStr)); | ||
else | ||
pThis->CString_TransportWaypoint = "None"; | ||
|
||
auto GetNamedString = [&](ppmfc::CString& des, const char* KeyName, const char* SectionName) | ||
{ | ||
des = pINI->GetString(ID, KeyName); | ||
des += " (" + pINI->GetString(des, "Name") + ")"; | ||
}; | ||
|
||
GetNamedString(pThis->CString_Script, "Script", "ScriptTypes"); | ||
GetNamedString(pThis->CString_TaskForce, "TaskForce", "TaskForces"); | ||
|
||
if (auto ppStr = pINI->TryGetString(ID, "Tag")) | ||
{ | ||
pThis->CString_Tag = *ppStr; | ||
auto tagcontent = STDHelpers::SplitString(pINI->GetString("Tags", ID)); | ||
if (tagcontent.size() >= 2) | ||
pThis->CString_Tag += " (" + tagcontent[1] + ")"; | ||
} | ||
else | ||
pThis->CString_Tag = "None"; | ||
|
||
pThis->UpdateData(FALSE); | ||
} | ||
} | ||
|
||
return 0x4E9B11; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.