From 63fe0be512396e2a6b3dcfd0c45c1fc9f35acce7 Mon Sep 17 00:00:00 2001 From: Asdow <20314541+Asdow@users.noreply.github.com> Date: Wed, 20 Nov 2024 21:10:44 +0200 Subject: [PATCH] Use SoldierID Rename function parameter to make it clear it needs to be profileID Change the parameter type to UINT8 --- Strategic/Quest Debug System.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Strategic/Quest Debug System.cpp b/Strategic/Quest Debug System.cpp index 3b937bb4..589a853b 100644 --- a/Strategic/Quest Debug System.cpp +++ b/Strategic/Quest Debug System.cpp @@ -665,19 +665,19 @@ void ChangeFactState( INT32 iNumber ); void DisplayCurrentGridNo(); void EnableQDSButtons(); -BOOLEAN DoQDSMessageBox( UINT8 ubStyle, STR16 zString, UINT32 uiExitScreen, UINT8 ubFlags, MSGBOX_CALLBACK ReturnCallback ); +BOOLEAN DoQDSMessageBox( UINT8 ubStyle, STR16 zString, UINT32 uiExitScreen, UINT8 ubFlags, MSGBOX_CALLBACK ReturnCallback ); void IncrementActiveDropDownBox( INT16 sIncrementValue ); -INT16 IsMercInTheSector( UINT16 usMercID ); +SoldierID IsMercInTheSector( UINT8 ubMercProfileID ); void RefreshAllNPCInventory(); void SetQDSMercProfile(); void HandleQDSTalkingMerc(); void DisplayQDSCurrentlyQuoteNum( ); void SetTalkingMercPauseState( BOOLEAN fState ); -UINT8 WhichPanelShouldTalkingMercUse( ); +UINT8 WhichPanelShouldTalkingMercUse( ); void EndMercTalking(); void EnableFactMouseRegions(); void DisableFactMouseRegions(); -INT32 GetMaxNumberOfQuotesToPlay( ); +INT32 GetMaxNumberOfQuotesToPlay( ); void GetDebugLocationString( UINT16 usProfileID, STR16 pzText ); //ppp @@ -3270,7 +3270,7 @@ void BtnQuestDebugAllOrSectorNPCToggleCallback( GUI_BUTTON *btn, INT32 reason ) DisableButton( guiQuestDebugStartMercTalkingButtonButton ); } - if( IsMercInTheSector( gNpcListBox.sCurSelectedItem ) == -1 ) + if( IsMercInTheSector( gNpcListBox.sCurSelectedItem ) == NOBODY ) DisableButton( guiQuestDebugViewNPCInvButton ); EnableQDSButtons(); @@ -3567,7 +3567,7 @@ void EnableQDSButtons() if( gfUseLocalNPCs ) { - if( IsMercInTheSector( gubCurrentNpcInSector[ gNpcListBox.sCurSelectedItem ] ) != -1 ) + if( IsMercInTheSector( gubCurrentNpcInSector[ gNpcListBox.sCurSelectedItem ] ) != NOBODY ) { EnableButton( guiQuestDebugViewNPCInvButton ); EnableButton( guiQuestDebugNPCRefreshButtonButton ); @@ -3664,20 +3664,20 @@ void IncrementActiveDropDownBox( INT16 sIncrementValue ) } -INT16 IsMercInTheSector( UINT16 usMercID ) +SoldierID IsMercInTheSector( UINT8 ubMercProfileID ) { UINT16 cnt; for ( cnt=0; cnt < TOTAL_SOLDIERS; cnt++ ) { //if the merc is active - if( Menptr[ cnt ].ubProfile == usMercID ) + if( Menptr[ cnt ].ubProfile == ubMercProfileID ) { if( Menptr[ cnt ].bActive ) return( Menptr[ cnt ].ubID ); } } - return( -1 ); + return( NOBODY ); }