mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
- Fixed compilation errors when trying to compile a UB-Version (#define JA2UB & define JA2UBMAPS)
o The compilation was broken when enabling Speck as a playable mercs in JA2 113 (revision 6215) git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6256 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Binary file not shown.
+25
-1
@@ -259,7 +259,10 @@ NUMBER_TIMES_QUOTE_SAID gNumberOfTimesQuoteSaid[ MERC_NUMBER_OF_RANDOM_QUOTES
|
|||||||
{ SPECK_QUOTE_PLAYER_NOT_DOING_ANYTHING_AIM_SLANDER_3, 0 },
|
{ SPECK_QUOTE_PLAYER_NOT_DOING_ANYTHING_AIM_SLANDER_3, 0 },
|
||||||
{ SPECK_QUOTE_PLAYER_NOT_DOING_ANYTHING_AIM_SLANDER_4, 0 },
|
{ SPECK_QUOTE_PLAYER_NOT_DOING_ANYTHING_AIM_SLANDER_4, 0 },
|
||||||
|
|
||||||
|
#ifdef JA2UB
|
||||||
|
#else
|
||||||
{ SPECK_QUOTE_PLAYER_NOT_DOING_ANYTHING_SPECK_SELLS_HIMSELF, 0 },
|
{ SPECK_QUOTE_PLAYER_NOT_DOING_ANYTHING_SPECK_SELLS_HIMSELF, 0 },
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -623,6 +626,8 @@ void HandleMercs()
|
|||||||
gfMercSiteScreenIsReDrawn = TRUE;
|
gfMercSiteScreenIsReDrawn = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef JA2UB
|
||||||
|
#else
|
||||||
// anv: stop, Speck can't say anything because he's out of reach
|
// anv: stop, Speck can't say anything because he's out of reach
|
||||||
if( !IsSpeckComAvailable() )
|
if( !IsSpeckComAvailable() )
|
||||||
{
|
{
|
||||||
@@ -631,6 +636,7 @@ void HandleMercs()
|
|||||||
RenderMercs();
|
RenderMercs();
|
||||||
gfRedrawMercSite = TRUE;
|
gfRedrawMercSite = TRUE;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//if Speck has something to say, say it
|
//if Speck has something to say, say it
|
||||||
if( gusMercVideoSpeckSpeech != MERC_VIDEO_SPECK_SPEECH_NOT_TALKING )// && !gfDoneIntroSpeech )
|
if( gusMercVideoSpeckSpeech != MERC_VIDEO_SPECK_SPEECH_NOT_TALKING )// && !gfDoneIntroSpeech )
|
||||||
@@ -2330,7 +2336,6 @@ void HandlePlayerHiringMerc( UINT8 ubHiredMercID )
|
|||||||
if( IsMercMercAvailable( BIFF ) )
|
if( IsMercMercAvailable( BIFF ) )
|
||||||
StartSpeckTalking( SPECK_QUOTE_PLAYER_HIRES_STOGIE );
|
StartSpeckTalking( SPECK_QUOTE_PLAYER_HIRES_STOGIE );
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
|
|
||||||
// anv: Speck is hired
|
// anv: Speck is hired
|
||||||
case SPECK_PLAYABLE:
|
case SPECK_PLAYABLE:
|
||||||
@@ -2339,6 +2344,8 @@ void HandlePlayerHiringMerc( UINT8 ubHiredMercID )
|
|||||||
else
|
else
|
||||||
StartSpeckTalking( SPECK_QUOTE_PLAYER_HIRES_SPECK );
|
StartSpeckTalking( SPECK_QUOTE_PLAYER_HIRES_SPECK );
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2374,7 +2381,10 @@ BOOLEAN ShouldSpeckStartTalkingDueToActionOnSubPage()
|
|||||||
|
|
||||||
HandlePlayerHiringMerc( GetMercIDFromMERCArray( gubCurMercIndex ) );
|
HandlePlayerHiringMerc( GetMercIDFromMERCArray( gubCurMercIndex ) );
|
||||||
|
|
||||||
|
#ifdef JA2UB
|
||||||
|
#else
|
||||||
if( IsSpeckComAvailable() )
|
if( IsSpeckComAvailable() )
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
//if it hasnt been said, say the better equipment quote
|
//if it hasnt been said, say the better equipment quote
|
||||||
@@ -2407,6 +2417,8 @@ BOOLEAN ShouldSpeckStartTalkingDueToActionOnSubPage()
|
|||||||
return( FALSE );
|
return( FALSE );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef JA2UB
|
||||||
|
#else
|
||||||
BOOLEAN IsSpeckComAvailable() // anv: Prevent Speck from talking if his playable version is out of reach
|
BOOLEAN IsSpeckComAvailable() // anv: Prevent Speck from talking if his playable version is out of reach
|
||||||
{
|
{
|
||||||
//he's hired, travelling, dead or POW, he cant' talk
|
//he's hired, travelling, dead or POW, he cant' talk
|
||||||
@@ -2504,6 +2516,7 @@ void HandleSpeckWitnessingEmployeeDeath( SOLDIERTYPE* pSoldier ) // anv: handle
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
BOOLEAN ShouldSpeckSayAQuote()
|
BOOLEAN ShouldSpeckSayAQuote()
|
||||||
{
|
{
|
||||||
@@ -2797,11 +2810,14 @@ BOOLEAN CanMercQuoteBeSaid( UINT32 uiQuoteID )
|
|||||||
fRetVal = FALSE;
|
fRetVal = FALSE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#ifdef JA2UB
|
||||||
|
#else
|
||||||
//anv: playable Speck
|
//anv: playable Speck
|
||||||
case SPECK_QUOTE_PLAYER_NOT_DOING_ANYTHING_SPECK_SELLS_HIMSELF:
|
case SPECK_QUOTE_PLAYER_NOT_DOING_ANYTHING_SPECK_SELLS_HIMSELF:
|
||||||
if( !IsMercMercAvailable( SPECK_PLAYABLE ) )
|
if( !IsMercMercAvailable( SPECK_PLAYABLE ) )
|
||||||
fRetVal = FALSE;
|
fRetVal = FALSE;
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
case SPECK_QUOTE_BIFF_DEAD_WHEN_IMPORTING:
|
case SPECK_QUOTE_BIFF_DEAD_WHEN_IMPORTING:
|
||||||
@@ -2948,6 +2964,13 @@ void NewMercsAvailableAtMercSiteCallBack( )
|
|||||||
LaptopSaveInfo.ubLastMercAvailableId = gConditionsForMercAvailability[i].uiIndex;
|
LaptopSaveInfo.ubLastMercAvailableId = gConditionsForMercAvailability[i].uiIndex;
|
||||||
gConditionsForMercAvailability[i].StartMercsAvailable = TRUE;
|
gConditionsForMercAvailability[i].StartMercsAvailable = TRUE;
|
||||||
|
|
||||||
|
#ifdef JA2UB
|
||||||
|
AddEmail( NEW_MERCS_AT_MERC, NEW_MERCS_AT_MERC_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT);
|
||||||
|
|
||||||
|
//new mercs are available
|
||||||
|
LaptopSaveInfo.fNewMercsAvailableAtMercSite = TRUE;
|
||||||
|
#else
|
||||||
|
|
||||||
if( IsSpeckComAvailable() )
|
if( IsSpeckComAvailable() )
|
||||||
{
|
{
|
||||||
AddEmail( NEW_MERCS_AT_MERC, NEW_MERCS_AT_MERC_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT);
|
AddEmail( NEW_MERCS_AT_MERC, NEW_MERCS_AT_MERC_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT);
|
||||||
@@ -2960,6 +2983,7 @@ void NewMercsAvailableAtMercSiteCallBack( )
|
|||||||
// anv: Have speck inform player personally
|
// anv: Have speck inform player personally
|
||||||
TacticalCharacterDialogue( FindSoldierByProfileID( SPECK_PLAYABLE, TRUE ), SPECK_PLAYABLE_QUOTE_NEW_MERCS_AVAILABLE );
|
TacticalCharacterDialogue( FindSoldierByProfileID( SPECK_PLAYABLE, TRUE ), SPECK_PLAYABLE_QUOTE_NEW_MERCS_AVAILABLE );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-2
@@ -153,8 +153,11 @@ extern BOOLEAN gfJustHiredAMercMerc;
|
|||||||
void MakeBiffAwayForCoupleOfDays();
|
void MakeBiffAwayForCoupleOfDays();
|
||||||
|
|
||||||
// anv: for playable Speck
|
// anv: for playable Speck
|
||||||
BOOLEAN IsSpeckComAvailable();
|
#ifdef JA2UB
|
||||||
void HandleSpeckWitnessingEmployeeDeath( SOLDIERTYPE* pSoldier );
|
#else
|
||||||
|
BOOLEAN IsSpeckComAvailable();
|
||||||
|
void HandleSpeckWitnessingEmployeeDeath( SOLDIERTYPE* pSoldier );
|
||||||
|
#endif
|
||||||
|
|
||||||
void InitializeNumDaysMercArrive();
|
void InitializeNumDaysMercArrive();
|
||||||
|
|
||||||
|
|||||||
@@ -17,8 +17,11 @@
|
|||||||
#include "Game Clock.h"
|
#include "Game Clock.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// anv: for playable Speck
|
#ifdef JA2UB
|
||||||
#include "mercs.h"
|
#else
|
||||||
|
// anv: for playable Speck
|
||||||
|
#include "mercs.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
StrategicMapElement StrategicMap[MAP_WORLD_X*MAP_WORLD_Y];
|
StrategicMapElement StrategicMap[MAP_WORLD_X*MAP_WORLD_Y];
|
||||||
|
|
||||||
@@ -126,9 +129,13 @@ void HandleSoldierDeadComments( SOLDIERTYPE *pSoldier )
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef JA2UB
|
||||||
|
#else
|
||||||
// anv: handle Speck witnessing his employee death
|
// anv: handle Speck witnessing his employee death
|
||||||
if( pTeamSoldier->ubProfile == SPECK_PLAYABLE && pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__MERC )
|
if( pTeamSoldier->ubProfile == SPECK_PLAYABLE && pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__MERC )
|
||||||
HandleSpeckWitnessingEmployeeDeath( pSoldier );
|
HandleSpeckWitnessingEmployeeDeath( pSoldier );
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -94,9 +94,12 @@
|
|||||||
#include "Ja25Update.h"
|
#include "Ja25Update.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// anv: for playable Speck
|
#ifdef JA2UB
|
||||||
#include "Speck Quotes.h"
|
#else
|
||||||
#include "mercs.h"
|
// anv: for playable Speck
|
||||||
|
#include "Speck Quotes.h"
|
||||||
|
#include "mercs.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
//forward declarations of common classes to eliminate includes
|
//forward declarations of common classes to eliminate includes
|
||||||
class OBJECTTYPE;
|
class OBJECTTYPE;
|
||||||
@@ -2728,6 +2731,8 @@ void HandleNPCDoAction( UINT8 ubTargetNPC, UINT16 usActionCode, UINT8 ubQuoteNum
|
|||||||
if( pSoldier->ubProfile == FLO )
|
if( pSoldier->ubProfile == FLO )
|
||||||
{
|
{
|
||||||
SetFactTrue( FACT_PC_MARRYING_DARYL_IS_FLO );
|
SetFactTrue( FACT_PC_MARRYING_DARYL_IS_FLO );
|
||||||
|
#ifdef JA2UB
|
||||||
|
#else
|
||||||
// anv: make Speck whine about it immediately if on team
|
// anv: make Speck whine about it immediately if on team
|
||||||
if( !IsMercDead(BIFF) && !IsSpeckComAvailable() )
|
if( !IsMercDead(BIFF) && !IsSpeckComAvailable() )
|
||||||
{
|
{
|
||||||
@@ -2736,6 +2741,7 @@ void HandleNPCDoAction( UINT8 ubTargetNPC, UINT16 usActionCode, UINT8 ubQuoteNum
|
|||||||
LaptopSaveInfo.fSpeckSaidFloMarriedCousinQuote = TRUE;
|
LaptopSaveInfo.fSpeckSaidFloMarriedCousinQuote = TRUE;
|
||||||
MakeBiffAwayForCoupleOfDays();
|
MakeBiffAwayForCoupleOfDays();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
HandleMoraleEvent( pSoldier, MORALE_MERC_MARRIED, gWorldSectorX, gWorldSectorY, gbWorldSectorZ );
|
HandleMoraleEvent( pSoldier, MORALE_MERC_MARRIED, gWorldSectorX, gWorldSectorY, gbWorldSectorZ );
|
||||||
|
|||||||
@@ -123,8 +123,11 @@
|
|||||||
#include "ub_config.h"
|
#include "ub_config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// anv: for playable Speck
|
#ifdef JA2UB
|
||||||
#include "mercs.h"
|
#else
|
||||||
|
// anv: for playable Speck
|
||||||
|
#include "mercs.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
// OJW - 20090419
|
// OJW - 20090419
|
||||||
UINT8 giMAXIMUM_NUMBER_OF_PLAYER_MERCS = CODE_MAXIMUM_NUMBER_OF_PLAYER_MERCS;
|
UINT8 giMAXIMUM_NUMBER_OF_PLAYER_MERCS = CODE_MAXIMUM_NUMBER_OF_PLAYER_MERCS;
|
||||||
@@ -3362,9 +3365,12 @@ void HandlePlayerTeamMemberDeath( SOLDIERTYPE *pSoldier )
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#ifdef JA2UB
|
||||||
|
#else
|
||||||
// anv: handle Speck witnessing his employee death
|
// anv: handle Speck witnessing his employee death
|
||||||
if( pTeamSoldier->ubProfile == SPECK_PLAYABLE && pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__MERC )
|
if( pTeamSoldier->ubProfile == SPECK_PLAYABLE && pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__MERC )
|
||||||
HandleSpeckWitnessingEmployeeDeath( pSoldier );
|
HandleSpeckWitnessingEmployeeDeath( pSoldier );
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -64,9 +64,12 @@
|
|||||||
#include "ub_config.h"
|
#include "ub_config.h"
|
||||||
#include "XML.h"
|
#include "XML.h"
|
||||||
|
|
||||||
// anv: for playable Speck
|
#ifdef JA2UB
|
||||||
#include "Speck Quotes.h"
|
#else
|
||||||
#include "LaptopSave.h"
|
// anv: for playable Speck
|
||||||
|
#include "Speck Quotes.h"
|
||||||
|
#include "LaptopSave.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "connect.h"
|
#include "connect.h"
|
||||||
#ifdef JA2EDITOR
|
#ifdef JA2EDITOR
|
||||||
@@ -2346,6 +2349,9 @@ SOLDIERTYPE * SwapLarrysProfiles( SOLDIERTYPE * pSoldier )
|
|||||||
if ( pSoldier->ubProfile == LARRY_DRUNK )
|
if ( pSoldier->ubProfile == LARRY_DRUNK )
|
||||||
{
|
{
|
||||||
SetFactTrue( FACT_LARRY_CHANGED );
|
SetFactTrue( FACT_LARRY_CHANGED );
|
||||||
|
|
||||||
|
#ifdef JA2UB
|
||||||
|
#else
|
||||||
// anv: make speck whine about it immediately if on team
|
// anv: make speck whine about it immediately if on team
|
||||||
if( !IsSpeckComAvailable() )
|
if( !IsSpeckComAvailable() )
|
||||||
{
|
{
|
||||||
@@ -2353,6 +2359,7 @@ SOLDIERTYPE * SwapLarrysProfiles( SOLDIERTYPE * pSoldier )
|
|||||||
// don't bring this up again
|
// don't bring this up again
|
||||||
LaptopSaveInfo.uiSpeckQuoteFlags |= SPECK_QUOTE__ALREADY_TOLD_PLAYER_THAT_LARRY_RELAPSED;
|
LaptopSaveInfo.uiSpeckQuoteFlags |= SPECK_QUOTE__ALREADY_TOLD_PLAYER_THAT_LARRY_RELAPSED;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user