mirror of
https://github.com/electronicarts/CNC_TS_and_RA2_Mission_Editor.git
synced 2025-04-30 09:01:41 -04:00
added some friendly comments, hoping it will reduce struggle of the future maintenance .
This commit is contained in:
parent
f2150618d4
commit
f5601fb046
2 changed files with 11 additions and 2 deletions
|
@ -435,9 +435,13 @@ void CTriggerEventsDlg::OnSelchangeParameter()
|
|||
int original_cuparam = curparam;
|
||||
#ifdef RA2_MODE
|
||||
CString Param1 = GetParam(g_data["EventsRA2"][GetParam(EventData, startpos)], 1);
|
||||
// 3rd position control code
|
||||
CString Code = GetParam(g_data["ParamTypes"][Param1], 2);
|
||||
//MessageBox(Param1, Code);
|
||||
if (atoi(Code) == 2) curparam--;
|
||||
|
||||
// means there are parameters taken up 2 slots, even if only 1 is meaningful
|
||||
if (atoi(Code) == 2) {
|
||||
curparam--;
|
||||
}
|
||||
#endif
|
||||
// END FIx
|
||||
|
||||
|
|
|
@ -88,6 +88,11 @@ inline CString GetUnitPictureFilename(const CString& artSectionId, DWORD dwPicIn
|
|||
return {};
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Retrieve a stringified parameter from a serialized string, concated with ','
|
||||
* @param data Serialized string input
|
||||
* @param param Nth param to retrieve, starts from 0
|
||||
*/
|
||||
inline CString GetParam(const CString& data, const int param)
|
||||
{
|
||||
int paramStrPos = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue