mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
Character lines can be replaced before playing via HandleReplaceQuote(...) in Overhead.lua.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8712 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -192,6 +192,7 @@ INT32 giTextBoxOverlay = -1;
|
||||
BOOLEAN gfFacePanelActive = FALSE;
|
||||
UINT32 guiScreenIDUsedWhenUICreated;
|
||||
CHAR16 gzQuoteStr[ QUOTE_MESSAGE_SIZE ];
|
||||
CHAR8 gzSoundString[164];
|
||||
MOUSE_REGION gTextBoxMouseRegion;
|
||||
MOUSE_REGION gFacePopupMouseRegion;
|
||||
BOOLEAN gfUseAlternateDialogueFile = FALSE;
|
||||
@@ -2041,7 +2042,6 @@ BOOLEAN SpecialCharacterDialogueEventWithExtraParam( UINT32 uiSpecialEventFlag,
|
||||
|
||||
BOOLEAN ExecuteCharacterDialogue( UINT8 ubCharacterNum, UINT16 usQuoteNum, INT32 iFaceIndex, UINT8 bUIHandlerID, BOOLEAN fFromSoldier )
|
||||
{
|
||||
CHAR8 zSoundString[ 164 ];
|
||||
UINT32 uiSoundID;
|
||||
SOLDIERTYPE *pSoldier;
|
||||
|
||||
@@ -2144,28 +2144,25 @@ BOOLEAN ExecuteCharacterDialogue( UINT8 ubCharacterNum, UINT16 usQuoteNum, INT32
|
||||
// Check face index
|
||||
CHECKF( iFaceIndex != -1 );
|
||||
|
||||
if ( !GetDialogue( ubCharacterNum,
|
||||
usQuoteNum, DIALOGUESIZE, gzQuoteStr, &uiSoundID, zSoundString) )
|
||||
if ( !GetDialogue( ubCharacterNum, usQuoteNum, DIALOGUESIZE, gzQuoteStr, &uiSoundID, gzSoundString ) )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
// Flugente: hijack the quote for possible replacement by additional dialogue
|
||||
extern void LuaHandleReplaceQuote( UINT8 ubProfile, UINT16 usQuoteNum );
|
||||
|
||||
LuaHandleReplaceQuote( ubCharacterNum, usQuoteNum );
|
||||
|
||||
// sevenfm: stop high speed timer for any talking face
|
||||
if (IsFastForwardMode())
|
||||
{
|
||||
SetFastForwardMode(FALSE);
|
||||
}
|
||||
|
||||
if( bUIHandlerID == DIALOGUE_EXTERNAL_NPC_UI )
|
||||
{
|
||||
// external NPC
|
||||
SetFaceTalking( iFaceIndex , zSoundString, gzQuoteStr, RATE_11025, 30, 1, MIDDLEPAN );
|
||||
}
|
||||
else
|
||||
{
|
||||
// start "talking" system (portrait animation and start wav sample)
|
||||
SetFaceTalking( iFaceIndex, zSoundString, gzQuoteStr, RATE_11025, 30, 1, MIDDLEPAN );
|
||||
}
|
||||
// start "talking" system (portrait animation and start wav sample)
|
||||
SetFaceTalking( iFaceIndex, gzSoundString, gzQuoteStr, RATE_11025, 30, 1, MIDDLEPAN );
|
||||
|
||||
// pSoldier can be null here... ( if NOT from an alive soldier )
|
||||
CreateTalkingUI( bUIHandlerID, iFaceIndex, ubCharacterNum, pSoldier, gzQuoteStr );
|
||||
|
||||
@@ -2229,6 +2226,12 @@ void SetQuoteStr( STR16 aStr )
|
||||
wcscpy( gzQuoteStr, aStr );
|
||||
}
|
||||
|
||||
void SetSoundString( const char* aStr )
|
||||
{
|
||||
//Copy the original string over to the temp string
|
||||
strcpy( gzSoundString, aStr );
|
||||
}
|
||||
|
||||
BOOLEAN LuaCallsToDoDialogueStuff( UINT8 ubProfile, INT32 iFaceIndex, const char* azSoundString )
|
||||
{
|
||||
SOLDIERTYPE *pSoldier = FindSoldierByProfileID( ubProfile, TRUE );
|
||||
|
||||
Reference in New Issue
Block a user