From 10ac8624fe0bd0a7921e501dac9fd28e4b6b5bec Mon Sep 17 00:00:00 2001 From: Asdow <20314541+Asdow@users.noreply.github.com> Date: Tue, 18 Nov 2025 20:33:53 +0200 Subject: [PATCH] Move ExecuteAdditionalCharacterDialogue defintion before the first call This allows us to declare it static --- Tactical/Dialogue Control.cpp | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/Tactical/Dialogue Control.cpp b/Tactical/Dialogue Control.cpp index 790cba08..8fe45697 100644 --- a/Tactical/Dialogue Control.cpp +++ b/Tactical/Dialogue Control.cpp @@ -462,6 +462,22 @@ void HandleDialogueUIAdjustments( ) } +// Flugente: additional dialogue +extern void LuaHandleAdditionalDialogue(INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ, UINT8 ubProfile, INT32 iFaceIndex, UINT16 usEventNr, UINT32 aData1, UINT32 aData2, UINT32 aData3); + +BOOLEAN ExecuteAdditionalCharacterDialogue(UINT8 ubProfile, INT32 iFaceIndex, UINT16 usEventNr, UINT32 aData1, UINT32 aData2, UINT32 aData3) +{ + SOLDIERTYPE* pSoldier = FindSoldierByProfileID(ubProfile, TRUE); + + if ( !pSoldier ) + return FALSE; + + // call Lua script on whether we can play something here, and get text and sound file + LuaHandleAdditionalDialogue(pSoldier->sSectorX, pSoldier->sSectorY, pSoldier->bSectorZ, ubProfile, iFaceIndex, usEventNr, aData1, aData2, aData3); + + return(TRUE); +} + void HandleDialogue( ) { @@ -2176,21 +2192,6 @@ BOOLEAN ExecuteSnitchCharacterDialogue( UINT8 ubCharacterNum, UINT16 usQuoteNum, return( TRUE ); } -// Flugente: additional dialogue -extern void LuaHandleAdditionalDialogue( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ, UINT8 ubProfile, INT32 iFaceIndex, UINT16 usEventNr, UINT32 aData1, UINT32 aData2, UINT32 aData3 ); - -BOOLEAN ExecuteAdditionalCharacterDialogue( UINT8 ubProfile, INT32 iFaceIndex, UINT16 usEventNr, UINT32 aData1, UINT32 aData2, UINT32 aData3 ) -{ - SOLDIERTYPE *pSoldier = FindSoldierByProfileID( ubProfile, TRUE ); - - if ( !pSoldier ) - return FALSE; - - // call Lua script on whether we can play something here, and get text and sound file - LuaHandleAdditionalDialogue( pSoldier->sSectorX, pSoldier->sSectorY, pSoldier->bSectorZ, ubProfile, iFaceIndex, usEventNr, aData1, aData2, aData3 ); - - return( TRUE ); -} void SetQuoteStr( STR16 aStr ) {