diff --git a/Laptop/mercs.cpp b/Laptop/mercs.cpp index 85272388..14bda367 100644 --- a/Laptop/mercs.cpp +++ b/Laptop/mercs.cpp @@ -2224,6 +2224,13 @@ BOOLEAN GetSpeckConditionalOpening( BOOLEAN fJustEnteredScreen ) //set the flag gMercProfiles[ ubMercID ].ubMiscFlags3 |= PROFILE_MISC_FLAG3_MERC_MERC_IS_DEAD_AND_QUOTE_SAID; + #ifdef JA2UB + if ( ubMercID == GASTON_UB ) + StartSpeckTalking( SPECK_QUOTE_GASTON_DEAD ); + else if ( ubMercID == STOGIE_UB ) + StartSpeckTalking( SPECK_QUOTE_STOGIE_DEAD ); + #endif + switch( ubMercID ) { case BIFF: @@ -2266,12 +2273,7 @@ BOOLEAN GetSpeckConditionalOpening( BOOLEAN fJustEnteredScreen ) StartSpeckTalking( SPECK_QUOTE_ALTERNATE_OPENING_TAG_BUBBA_IS_DEAD ); break; #ifdef JA2UB - case 58://GASTON: - StartSpeckTalking( SPECK_QUOTE_GASTON_DEAD ); - break; - case 59://STOGIE: - StartSpeckTalking( SPECK_QUOTE_STOGIE_DEAD ); - break; + #else case GASTON: StartSpeckTalking( SPECK_QUOTE_GASTON_DEAD ); @@ -2455,6 +2457,22 @@ void HandlePlayerHiringMerc( UINT8 ubHiredMercID ) //DEF: 3/19/99: Dont know why this was done // if( LaptopSaveInfo.iCurrentBalance >= 2000 ) { + #ifdef JA2UB + //Gaston is hired + if ( ubHiredMercID == GASTON_UB ) + { + //if biff is available, advertise for biff + if( IsMercMercAvailable( FLO ) ) + StartSpeckTalking( SPECK_QUOTE_PLAYER_HIRES_GASTON ); + } + //Stogie is hired + else if ( ubHiredMercID == STOGIE_UB ) + { + //if biff is available, advertise for biff + if( IsMercMercAvailable( BIFF ) ) + StartSpeckTalking( SPECK_QUOTE_PLAYER_HIRES_STOGIE ); + } + #endif //determine which quote to say based on the merc that was hired switch( ubHiredMercID ) { @@ -2500,19 +2518,7 @@ void HandlePlayerHiringMerc( UINT8 ubHiredMercID ) StartSpeckTalking( SPECK_QUOTE_PLAYERS_HIRES_LARRY_SPECK_PLUGS_BIFF ); break; #ifdef JA2UB - //Gaston is hired - case 58: //GASTON: - //if biff is available, advertise for biff - if( IsMercMercAvailable( FLO ) ) - StartSpeckTalking( SPECK_QUOTE_PLAYER_HIRES_GASTON ); - break; - //Stogie is hired - case 59: //STOGIE: - //if biff is available, advertise for biff - if( IsMercMercAvailable( BIFF ) ) - StartSpeckTalking( SPECK_QUOTE_PLAYER_HIRES_STOGIE ); - break; #else //Gaston is hired case GASTON: @@ -2689,21 +2695,13 @@ void HandleSpeckWitnessingEmployeeDeath( SOLDIERTYPE* pSoldier ) // anv: handle case BUBBA: TacticalCharacterDialogue( FindSoldierByProfileID( SPECK_PLAYABLE , TRUE ), SPECK_PLAYABLE_QUOTE_BUBBA_IS_DEAD); break; -#ifdef JA2UB - case 58://GASTON: - TacticalCharacterDialogue( FindSoldierByProfileID( SPECK_PLAYABLE , TRUE ), SPECK_PLAYABLE_QUOTE_GASTON_DEAD); - break; - case 59://STOGIE: - TacticalCharacterDialogue( FindSoldierByProfileID( SPECK_PLAYABLE , TRUE ), SPECK_PLAYABLE_QUOTE_STOGIE_DEAD); - break; -#else + case GASTON: TacticalCharacterDialogue( FindSoldierByProfileID( SPECK_PLAYABLE , TRUE ), SPECK_PLAYABLE_QUOTE_GASTON_DEAD); break; case STOGIE: TacticalCharacterDialogue( FindSoldierByProfileID( SPECK_PLAYABLE , TRUE ), SPECK_PLAYABLE_QUOTE_STOGIE_DEAD); break; -#endif } } } @@ -3023,12 +3021,12 @@ BOOLEAN CanMercQuoteBeSaid( UINT32 uiQuoteID ) break; case SPECK_QUOTE_ADVERTISE_GASTON: - if( !IsMercMercAvailable( 58 ) )//GASTON + if( !IsMercMercAvailable( GASTON_UB ) )//GASTON fRetVal = FALSE; break; case SPECK_QUOTE_ADVERTISE_STOGIE: - if( !IsMercMercAvailable( 59 ) )//STOGIE + if( !IsMercMercAvailable( STOGIE_UB ) )//STOGIE fRetVal = FALSE; break; #else diff --git a/Strategic/Ja25 Strategic Ai.cpp b/Strategic/Ja25 Strategic Ai.cpp index c6cde521..6b9b0443 100644 --- a/Strategic/Ja25 Strategic Ai.cpp +++ b/Strategic/Ja25 Strategic Ai.cpp @@ -2628,8 +2628,8 @@ void HandleSayingDontStayToLongWarningInSectorH8() !pSoldier->flags.fBetweenSectors ) { //if the merc is either PGC, gaston, or stogie - if( pSoldier->ubProfile == 58 || - pSoldier->ubProfile == 59 || + if( pSoldier->ubProfile == GASTON_UB || + pSoldier->ubProfile == STOGIE_UB || pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__PLAYER_CHARACTER ) { @@ -2907,4 +2907,4 @@ void AddJA25AIDataToSector( JA25_SECTOR_AI *pSectorAIInfo ) */ } -#endif +#endif \ No newline at end of file diff --git a/Strategic/MapScreen Quotes.cpp b/Strategic/MapScreen Quotes.cpp index c619cb30..0d8f8836 100644 --- a/Strategic/MapScreen Quotes.cpp +++ b/Strategic/MapScreen Quotes.cpp @@ -169,7 +169,7 @@ BOOLEAN Internal_JerryMeloCharacterDialogue( UINT16 usQuoteNum ) BOOLEAN fRetVal = FALSE; fTeamPanelDirty = TRUE; - fRetVal = CharacterDialogue( 76, usQuoteNum, uiExternalStaticNPCFacesUB[ JERRY_MELO_FACE ], DIALOGUE_EXTERNAL_NPC_UI, FALSE, FALSE ); + fRetVal = CharacterDialogue( JERRY_MILO_UB, usQuoteNum, uiExternalStaticNPCFacesUB[ JERRY_MELO_FACE ], DIALOGUE_EXTERNAL_NPC_UI, FALSE, FALSE ); SpecialCharacterDialogueEvent( DIALOGUE_SPECIAL_EVENT_JERRY_MILO, usQuoteNum, 0, 0, uiExternalStaticNPCFacesUB[ JERRY_MELO_FACE ], DIALOGUE_EXTERNAL_NPC_UI ); @@ -477,4 +477,4 @@ BOOLEAN HasJerryAlreadySaidTheMapScreenIntroSequence() } } -#endif +#endif \ No newline at end of file diff --git a/Strategic/Queen Command.cpp b/Strategic/Queen Command.cpp index f22865bf..b11ac05d 100644 --- a/Strategic/Queen Command.cpp +++ b/Strategic/Queen Command.cpp @@ -2433,11 +2433,11 @@ void HandleBloodCatDeaths( SECTORINFO *pSector ) if( bNum != 0 ) { //must make sure TEX doesnt say the quote - if( bId1 != NOBODY && Menptr[ bId1 ].ubProfile != 64 ) + if( bId1 != NOBODY && Menptr[ bId1 ].ubProfile != TEX_UB ) { TacticalCharacterDialogue( &Menptr[ bId1 ], QUOTE_RENEW_REFUSAL_DUE_TO_LACK_OF_FUNDS ); } - else if( bId2 != NOBODY && Menptr[ bId2 ].ubProfile != 64 ) + else if( bId2 != NOBODY && Menptr[ bId2 ].ubProfile != TEX_UB ) { TacticalCharacterDialogue( &Menptr[ bId2 ], QUOTE_RENEW_REFUSAL_DUE_TO_LACK_OF_FUNDS ); } diff --git a/Strategic/Quests.cpp b/Strategic/Quests.cpp index ffb22dfb..c2b430f8 100644 --- a/Strategic/Quests.cpp +++ b/Strategic/Quests.cpp @@ -42,6 +42,7 @@ #include "laptop.h" #include "Ja25 Strategic Ai.h" #include "ub_config.h" +#include "Ja25_Tactical.h" #endif #include "LuaInitNPCs.h" @@ -1462,7 +1463,7 @@ void InternalEndQuest( UINT8 ubQuest, INT16 sSectorX, INT16 sSectorY, BOOLEAN fU { SOLDIERTYPE *pSoldier=NULL; - pSoldier = FindSoldierByProfileID( 60 , TRUE ); //MANUEL + pSoldier = FindSoldierByProfileID( MANUEL_UB , TRUE ); //MANUEL if( pSoldier != NULL ) { diff --git a/Strategic/strategicmap.cpp b/Strategic/strategicmap.cpp index 9cddc930..7a6546e0 100644 --- a/Strategic/strategicmap.cpp +++ b/Strategic/strategicmap.cpp @@ -2823,49 +2823,49 @@ SOLDIERTYPE *pSoldier=NULL; if( sOldSectorX == 7 && sOldSectorY == MAP_ROW_H && bOldSectorZ == 0 ) { // remove Jerry from the map - gMercProfiles[ 76 ].sSectorX = 0; - gMercProfiles[ 76 ].sSectorY = 0; + gMercProfiles[ JERRY_MILO_UB ].sSectorX = 0; + gMercProfiles[ JERRY_MILO_UB ].sSectorY = 0; } //if the player is leaving a sector with Tex in it - if( sOldSectorX == gMercProfiles[ 64 ].sSectorX && sOldSectorY == gMercProfiles[ 64 ].sSectorY && bOldSectorZ == 0 && gMercProfiles[ 64 ].ubLastDateSpokenTo != 0 ) + if( sOldSectorX == gMercProfiles[ TEX_UB ].sSectorX && sOldSectorY == gMercProfiles[ TEX_UB ].sSectorY && bOldSectorZ == 0 && gMercProfiles[ TEX_UB ].ubLastDateSpokenTo != 0 ) { - pSoldier = FindSoldierByProfileID( 64, TRUE ); + pSoldier = FindSoldierByProfileID( TEX_UB, TRUE ); //if the npc isnt on the players team AND the player has never spoken to them - if( pSoldier == NULL && gMercProfiles[ 64 ].ubLastDateSpokenTo != 0 ) + if( pSoldier == NULL && gMercProfiles[ TEX_UB ].ubLastDateSpokenTo != 0 ) { // remove Tex from the map - gMercProfiles[ 64 ].sSectorX = 0; - gMercProfiles[ 64 ].sSectorY = 0; + gMercProfiles[ TEX_UB ].sSectorX = 0; + gMercProfiles[ TEX_UB ].sSectorY = 0; } } //if the player is leaving a sector with John kulba in it - if( sOldSectorX == gMercProfiles[ 62 ].sSectorX && sOldSectorY == gMercProfiles[ 62 ].sSectorY && bOldSectorZ == 0 && gMercProfiles[ 62 ].ubLastDateSpokenTo != 0 ) + if( sOldSectorX == gMercProfiles[ JOHN_K_UB ].sSectorX && sOldSectorY == gMercProfiles[ JOHN_K_UB ].sSectorY && bOldSectorZ == 0 && gMercProfiles[ JOHN_K_UB ].ubLastDateSpokenTo != 0 ) { - pSoldier = FindSoldierByProfileID( 62, TRUE ); + pSoldier = FindSoldierByProfileID( JOHN_K_UB, TRUE ); //if the npc isnt on the players team AND the player has never spoken to them - if( pSoldier == NULL && gMercProfiles[ 62 ].ubLastDateSpokenTo != 0 ) + if( pSoldier == NULL && gMercProfiles[ JOHN_K_UB ].ubLastDateSpokenTo != 0 ) { // remove Tex from the map - gMercProfiles[ 62 ].sSectorX = 0; - gMercProfiles[ 62 ].sSectorY = 0; + gMercProfiles[ JOHN_K_UB ].sSectorX = 0; + gMercProfiles[ JOHN_K_UB ].sSectorY = 0; } } //if the player is leaving a sector with Manuel in it - if( sOldSectorX == gMercProfiles[ 60 ].sSectorX && sOldSectorY == gMercProfiles[ 60 ].sSectorY && bOldSectorZ == 0 ) + if( sOldSectorX == gMercProfiles[ MANUEL_UB ].sSectorX && sOldSectorY == gMercProfiles[ MANUEL_UB ].sSectorY && bOldSectorZ == 0 ) { - pSoldier = FindSoldierByProfileID( 60, TRUE ); + pSoldier = FindSoldierByProfileID( MANUEL_UB, TRUE ); //if the npc isnt on the players team AND the player has never spoken to them - if( pSoldier == NULL && gMercProfiles[ 60 ].ubLastDateSpokenTo != 0 ) + if( pSoldier == NULL && gMercProfiles[ MANUEL_UB ].ubLastDateSpokenTo != 0 ) { // remove Manuel from the map - gMercProfiles[ 60 ].sSectorX = 0; - gMercProfiles[ 60 ].sSectorY = 0; + gMercProfiles[ MANUEL_UB ].sSectorX = 0; + gMercProfiles[ MANUEL_UB ].sSectorY = 0; } } #endif @@ -6594,27 +6594,27 @@ void HandlePlayerTeamQuotesWhenEnteringSector( INT16 sSectorX, INT16 sSectorY, I if( PlayerSectorDescQuote[ uiCnt ].bSectorZ == 0 ) { //See if Manuel is on the team - pSoldier = FindSoldierByProfileID( 60, TRUE ); + pSoldier = FindSoldierByProfileID( MANUEL_UB, TRUE ); //if he is ON the team if( pSoldier != NULL ) { //get manuel to say the quote - DelayedMercQuote( 60, PlayerSectorDescQuote[ uiCnt ].ubQuoteNum, GetWorldTotalSeconds() + DELAY_FOR_PLAYER_DESC_OF_SECTOR ); + DelayedMercQuote( MANUEL_UB, PlayerSectorDescQuote[ uiCnt ].ubQuoteNum, GetWorldTotalSeconds() + DELAY_FOR_PLAYER_DESC_OF_SECTOR ); //get manuel to say his additional quote - DelayedMercQuote( 60, QUOTE_ENTER_SECTOR_WITH_FAN_2, GetWorldTotalSeconds() + DELAY_FOR_PLAYER_DESC_OF_SECTOR ); + DelayedMercQuote( MANUEL_UB, QUOTE_ENTER_SECTOR_WITH_FAN_2, GetWorldTotalSeconds() + DELAY_FOR_PLAYER_DESC_OF_SECTOR ); } else { //else if Biggens is not on the team, check for biggens - pSoldier = FindSoldierByProfileID( 61, TRUE ); + pSoldier = FindSoldierByProfileID( BIGGENS_UB, TRUE ); //if he is ON the team if( pSoldier != NULL ) { //get manuel to say the quote - DelayedMercQuote( 61, PlayerSectorDescQuote[ uiCnt ].ubQuoteNum, GetWorldTotalSeconds() + DELAY_FOR_PLAYER_DESC_OF_SECTOR ); + DelayedMercQuote( BIGGENS_UB, PlayerSectorDescQuote[ uiCnt ].ubQuoteNum, GetWorldTotalSeconds() + DELAY_FOR_PLAYER_DESC_OF_SECTOR ); //Remember he said SetJa25GeneralFlag( JA_GF__BIGGENS_SAID_QUOTE_117 ); @@ -6740,10 +6740,10 @@ void HandleEmailBeingSentWhenEnteringSector( INT16 sMapX, INT16 sMapY, INT8 bMap //and we havent sent it before if( !( gJa25SaveStruct.ubEmailFromSectorFlag & SECTOR_EMAIL__J11_J12 ) ) { - pSoldier = FindSoldierByProfileID( 60, TRUE ); //MANUEL + pSoldier = FindSoldierByProfileID( MANUEL_UB, TRUE ); //MANUEL //if Manuel isnt on the team - if( pSoldier == NULL || gMercProfiles[ 60 ].bMercStatus == MERC_IS_DEAD ) //MANUEL + if( pSoldier == NULL || gMercProfiles[ MANUEL_UB ].bMercStatus == MERC_IS_DEAD ) //MANUEL { //email 8a AddEmail( EMAIL_MIGUELSORRY, EMAIL_MIGUELSORRY_LENGTH, MAIL_MIGUEL, GetWorldTotalMin() , -1,-1 ,TYPE_EMAIL_EMAIL_EDT); @@ -6783,7 +6783,7 @@ void HandleEmailBeingSentWhenEnteringSector( INT16 sMapX, INT16 sMapY, INT8 bMap if( !( gJa25SaveStruct.ubEmailFromSectorFlag & SECTOR_EMAIL__TUNNEL ) ) { //If Jerry isnt dead - if( gMercProfiles[ 76 ].bMercStatus != MERC_IS_DEAD ) //JERRY + if( gMercProfiles[ JERRY_MILO_UB ].bMercStatus != MERC_IS_DEAD ) //JERRY { AddEmail( EMAIL_PILOTFOUND, EMAIL_PILOTFOUND_LENGTH, MAIL_ENRICO, GetWorldTotalMin() , -1, -1, TYPE_EMAIL_EMAIL_EDT); } @@ -6806,9 +6806,9 @@ void ShouldNpcBeAddedToSector( INT16 sMapX, INT16 sMapY, INT8 bMapZ ) ( sMapY == MAP_ROW_I && sMapX == 9 && bMapZ == 0 ) ) { //Change his sector values to - gMercProfiles[ 60 ].sSectorX = sMapX; - gMercProfiles[ 60 ].sSectorY = sMapY; - gMercProfiles[ 60 ].bSectorZ = bMapZ; + gMercProfiles[ MANUEL_UB ].sSectorX = sMapX; + gMercProfiles[ MANUEL_UB ].sSectorY = sMapY; + gMercProfiles[ MANUEL_UB ].bSectorZ = bMapZ; //remember that we have added him gJa25SaveStruct.fNpcHasBeenAdded |= SECTOR_ADDED_NPC__MANUEL; @@ -6825,9 +6825,9 @@ void ShouldNpcBeAddedToSector( INT16 sMapX, INT16 sMapY, INT8 bMapZ ) if( sMapY == MAP_ROW_I && sMapX == 10 && bMapZ == 0 ) { //Change his sector values to - gMercProfiles[ 64 ].sSectorX = sMapX; - gMercProfiles[ 64 ].sSectorY = sMapY; - gMercProfiles[ 64 ].bSectorZ = bMapZ; + gMercProfiles[ TEX_UB ].sSectorX = sMapX; + gMercProfiles[ TEX_UB ].sSectorY = sMapY; + gMercProfiles[ TEX_UB ].bSectorZ = bMapZ; //remember that we have added him gJa25SaveStruct.fNpcHasBeenAdded |= SECTOR_ADDED_NPC__TEX; @@ -6847,9 +6847,9 @@ void ShouldNpcBeAddedToSector( INT16 sMapX, INT16 sMapY, INT8 bMapZ ) bMapZ == 0 ) { //Change his sector values to - gMercProfiles[ 62 ].sSectorX = sMapX; - gMercProfiles[ 62 ].sSectorY = sMapY; - gMercProfiles[ 62 ].bSectorZ = bMapZ; + gMercProfiles[ JOHN_K_UB ].sSectorX = sMapX; + gMercProfiles[ JOHN_K_UB ].sSectorY = sMapY; + gMercProfiles[ JOHN_K_UB ].bSectorZ = bMapZ; //remember that we have added him gJa25SaveStruct.fNpcHasBeenAdded |= SECTOR_ADDED_NPC__JOHN_K; diff --git a/Tactical/Arms Dealer Init.cpp b/Tactical/Arms Dealer Init.cpp index 3f912702..cca34d80 100644 --- a/Tactical/Arms Dealer Init.cpp +++ b/Tactical/Arms Dealer Init.cpp @@ -1776,7 +1776,7 @@ BOOLEAN AddDeadArmsDealerItemsToWorld( UINT8 ubMercID ) #ifdef JA2UB //RAUL //Ja25 UB //if Raul blew him,self up, dont drop any items - if( pSoldier->ubProfile == PERKO /* RAUL */ && IsJa25GeneralFlagSet( JA_GF__RAUL_BLOW_HIMSELF_UP ) ) + if( pSoldier->ubProfile == RAUL_UB /* RAUL */ && IsJa25GeneralFlagSet( JA_GF__RAUL_BLOW_HIMSELF_UP ) ) { return( TRUE ); } diff --git a/Tactical/Dialogue Control.cpp b/Tactical/Dialogue Control.cpp index 872ccdc4..57e9f2b4 100644 --- a/Tactical/Dialogue Control.cpp +++ b/Tactical/Dialogue Control.cpp @@ -727,9 +727,9 @@ void HandleDialogue( ) UINT8 ubNumQualifiedMercs=0; UINT8 ubCnt=0; - if( !( gMercProfiles[ 75 ].ubMiscFlags2 & PROFILE_MISC_FLAG2_SAID_FIRSTSEEN_QUOTE ) ) + if( !( gMercProfiles[ MORRIS_UB ].ubMiscFlags2 & PROFILE_MISC_FLAG2_SAID_FIRSTSEEN_QUOTE ) ) { - pMorris = FindSoldierByProfileID( 75, FALSE ); + pMorris = FindSoldierByProfileID( MORRIS_UB, FALSE ); if ( pMorris && pMorris->stats.bLife >= OKLIFE ) { sPlayerGridNo = ClosestPC( pMorris, NULL ); @@ -765,7 +765,7 @@ void HandleDialogue( ) //Morris should say a new quote // CharacterDialogue( MORRIS, QUOTE_ATTACKED_BY_MULTIPLE_CREATURES, gTalkPanel.iFaceIndex, DIALOGUE_NPC_UI, FALSE, FALSE ); - TriggerNPCRecord( 75, 2 ); + TriggerNPCRecord( MORRIS_UB, 2 ); gfMorrisShouldSayHi = FALSE; } @@ -920,7 +920,7 @@ void HandleDialogue( ) gubCurrentTalkingID = QItem->ubCharacterNum; #ifdef JA2UB //Ja25: test - if( QItem->ubCharacterNum == 75 ) //MORRIS + if( QItem->ubCharacterNum == MORRIS_UB ) //MORRIS { if( QItem->usQuoteNum == 0 ) { @@ -1333,7 +1333,7 @@ void HandleDialogue( ) pSoldier->ChangeSoldierStance( ANIM_STAND ); //if the soldier is Jerry - if( FindSoldierByProfileID( 76, FALSE ) == pSoldier ) //JERRY + if( FindSoldierByProfileID( JERRY_MILO_UB, FALSE ) == pSoldier ) //JERRY { //Play the sound of the Antena breaking PlayJA2SampleFromFile( "SOUNDS\\Metal Antenna Crunch.wav", RATE_11025, HIGHVOLUME, 1, MIDDLE ); @@ -1349,7 +1349,7 @@ void HandleDialogue( ) //AA //if ( gGameUBOptions.InGameHeliCrash == TRUE ) if ( gGameUBOptions.JerryQuotes == TRUE ) - DelayedMercQuote( 76 , 0xffff, 4 ); //JERRY + DelayedMercQuote( JERRY_MILO_UB , 0xffff, 4 ); //JERRY //End the ui Lock guiPendingOverrideEvent = LU_ENDUILOCK; @@ -3294,7 +3294,7 @@ BOOLEAN AreAllTheMercsFinishedSayingThereInitialHeliCrashQuotes() } //See if Jerry is still waiting to get up - pSoldier = FindSoldierByProfileID( 76, FALSE ); + pSoldier = FindSoldierByProfileID( JERRY_MILO_UB, FALSE ); if( pSoldier ) { //if the merc is still not done the initial speech, and still prone @@ -3312,7 +3312,7 @@ BOOLEAN AreAllTheMercsFinishedSayingThereInitialHeliCrashQuotes() void InitJerriesSpeechCallBack() { //Trigger Jerry Milo's script record 10 ( call action 301 ) - TriggerNPCRecord( 76, 10 ); + TriggerNPCRecord( JERRY_MILO_UB, 10 ); //Clear the overlay RemoveJerryMiloBrokenLaptopOverlay(); diff --git a/Tactical/End Game.cpp b/Tactical/End Game.cpp index f6ff36e7..2dbc8a1c 100644 --- a/Tactical/End Game.cpp +++ b/Tactical/End Game.cpp @@ -482,13 +482,13 @@ void HandleAddingTheEndGameEmails() fMiguelAlive = TRUE; //manuel alive - if( gMercProfiles[ 60 ].bMercStatus == MERC_IS_DEAD ) + if( gMercProfiles[ MANUEL_UB ].bMercStatus == MERC_IS_DEAD ) fManuelAlive = FALSE; else fManuelAlive = TRUE; //manuel hired - if( gMercProfiles[ 60 ].ubMiscFlags & PROFILE_MISC_FLAG_RECRUITED ) + if( gMercProfiles[ MANUEL_UB ].ubMiscFlags & PROFILE_MISC_FLAG_RECRUITED ) fManuelHired = TRUE; else fManuelHired = FALSE; diff --git a/Tactical/Faces.cpp b/Tactical/Faces.cpp index a0afd2d6..3eb7db4e 100644 --- a/Tactical/Faces.cpp +++ b/Tactical/Faces.cpp @@ -43,6 +43,10 @@ #include "Food.h" // added by Flugente #endif +#ifdef JA2UB +#include "Ja25_Tactical.h" +#endif + // Defines #define NUM_FACE_SLOTS 50 @@ -236,21 +240,21 @@ INT32 InternalInitFace( UINT8 usMercProfileID, UINT8 ubSoldierID, UINT32 uiInitF } #ifdef JA2UB - else if ( usMercProfileID == 64 ) + else if ( usMercProfileID == TEX_UB ) { // SANDRO - old/new traits check (I am not sure if this is used at all) if ( gGameOptions.fNewTraitSystem ) { - if ( ProfileHasSkillTrait( 64, RANGER_NT ) > 0 ) + if ( ProfileHasSkillTrait( TEX_UB, RANGER_NT ) > 0 ) { - sprintf( VObjectDesc.ImageFile, "FACES\\B64c.sti" ); + sprintf( VObjectDesc.ImageFile, "FACES\\B%dc.sti", TEX_UB ); } } else { - if ( ProfileHasSkillTrait( 64, CAMOUFLAGED_OT ) > 0 ) + if ( ProfileHasSkillTrait( TEX_UB, CAMOUFLAGED_OT ) > 0 ) { - sprintf( VObjectDesc.ImageFile, "FACES\\B64c.sti" ); + sprintf( VObjectDesc.ImageFile, "FACES\\B%dc.sti", TEX_UB ); } } } @@ -664,7 +668,7 @@ void GetFaceRelativeCoordinates( FACETYPE *pFace, UINT16 *pusEyesX, UINT16 *pusE if ( gGameOptions.fNewTraitSystem ) { - if( usMercProfileID == 64 && ( gMercProfiles[ 64 ].bSkillTraits[0] == RANGER_NT || gMercProfiles[ 64 ].bSkillTraits[1] == RANGER_NT ) ) + if( usMercProfileID == TEX_UB && ( gMercProfiles[ TEX_UB ].bSkillTraits[0] == RANGER_NT || gMercProfiles[ TEX_UB ].bSkillTraits[1] == RANGER_NT ) ) { usEyesX = 13; usEyesY = 34; @@ -674,7 +678,7 @@ void GetFaceRelativeCoordinates( FACETYPE *pFace, UINT16 *pusEyesX, UINT16 *pusE } else { - if( usMercProfileID == 64 && ( gMercProfiles[ 64 ].bSkillTraits[0] == CAMOUFLAGED_OT || gMercProfiles[ 64 ].bSkillTraits[1] == CAMOUFLAGED_OT ) ) + if( usMercProfileID == TEX_UB && ( gMercProfiles[ TEX_UB ].bSkillTraits[0] == CAMOUFLAGED_OT || gMercProfiles[ TEX_UB ].bSkillTraits[1] == CAMOUFLAGED_OT ) ) { usEyesX = 13; usEyesY = 34; diff --git a/Tactical/Interface Dialogue.cpp b/Tactical/Interface Dialogue.cpp index 7d59e70c..8ef527fc 100644 --- a/Tactical/Interface Dialogue.cpp +++ b/Tactical/Interface Dialogue.cpp @@ -4738,7 +4738,7 @@ void DialogueMessageBoxCallBack( UINT8 ubExitValue ) TriggerNPCRecord( ubProfile, 1 ); //if the person is BIGGENS - if( ubProfile == 61 ) //BIGGENS + if( ubProfile == BIGGENS_UB ) //BIGGENS { SetFactTrue( FACT_BIGGENS_IS_ON_TEAM ); } @@ -5229,7 +5229,7 @@ void PerformJerryMiloAction301() } //Trigger Jerry Milo's script record 11 ( call action 302 ) - TriggerNPCRecord( 76, 11 ); + TriggerNPCRecord( JERRY_MILO_UB, 11 ); //Close the dialogue panel DeleteTalkingMenu(); @@ -5458,28 +5458,19 @@ void CheckForValidQuotesWhenLeavingDealer( UINT8 ubProfile ) if( CheckFact( FACT_MERC_SAY_QUOTE_WHEN_TALK_MENU_CLOSES, 0 ) ) { - switch( ubProfile ) + if ( ubProfile == BETTY_UB ) + HaveQualifiedMercSayQuoteAboutNpcWhenLeavingTalkScreen( ubProfile, QUOTE_JOINING_CAUSE_BUDDY_1_ON_TEAM ); + else if ( ubProfile == RAUL_UB ) { - case 73 : //BETTY: - HaveQualifiedMercSayQuoteAboutNpcWhenLeavingTalkScreen( ubProfile, QUOTE_JOINING_CAUSE_BUDDY_1_ON_TEAM ); - break; - - case 74 : //RAUL: //if the Raul is about to blow himself up if( !IsJa25GeneralFlagSet( JA_GF__RAUL_BLOW_HIMSELF_UP ) ) { //we can say the quote HaveQualifiedMercSayQuoteAboutNpcWhenLeavingTalkScreen( ubProfile, QUOTE_JOINING_CAUSE_BUDDY_2_ON_TEAM ); } - break; - - case 77: //RUDY: + } + else if ( ubProfile == RUDY_UB ) HaveQualifiedMercSayQuoteAboutNpcWhenLeavingTalkScreen( ubProfile, QUOTE_REFUSAL_RENEW_DUE_TO_MORALE ); - break; - - default: - AssertMsg( 0, "Code has not been implemented to handle saying a quote when leaving this NPC" ); - } } } @@ -5505,7 +5496,7 @@ void HaveBiggensDetonatingExplosivesByTheMine() SOLDIERTYPE *pSoldier = NULL; UINT8 ubID=NOBODY; - pSoldier = FindSoldierByProfileID( 61 , FALSE ); //BIGGENS + pSoldier = FindSoldierByProfileID( BIGGENS_UB , FALSE ); //BIGGENS if( pSoldier != NULL ) { ubID = pSoldier->ubID; @@ -5619,7 +5610,7 @@ void HandleCannotAffordNpcMsgBox() void CantAffordMercCallback( UINT8 ubExitValue ) { //Make the RPC say a quote - TriggerNPCRecord( 61, 0 ); //BIGGENS + TriggerNPCRecord( BIGGENS_UB, 0 ); //BIGGENS } void HandleMercArrivesQuotesFromHeliCrashSequence() @@ -5655,7 +5646,7 @@ void HandleRaulBlowingHimselfUp() //blow himself up with, hmmm, lets say TNT. :) usItem = HAND_GRENADE; - IgniteExplosion( 74, CenterX( pSoldier->sGridNo ), CenterY( pSoldier->sGridNo ), 0, pSoldier->sGridNo, usItem, pSoldier->pathing.bLevel ); + IgniteExplosion( RAUL_UB, CenterX( pSoldier->sGridNo ), CenterY( pSoldier->sGridNo ), 0, pSoldier->sGridNo, usItem, pSoldier->pathing.bLevel ); SetJa25GeneralFlag( JA_GF__RAUL_BLOW_HIMSELF_UP ); } @@ -5668,7 +5659,7 @@ void HandleTexFlushingToilet() void HandleTexMakingHimselfAlreadyBeIntroduced() { - gMercProfiles[ 64 ].ubLastDateSpokenTo = GetWorldDay( ); + gMercProfiles[ TEX_UB ].ubLastDateSpokenTo = GetWorldDay( ); } void HandleTexBecomingCamoed() @@ -5676,7 +5667,7 @@ void HandleTexBecomingCamoed() SOLDIERTYPE *pSoldier=NULL; //Find TEX - pSoldier = FindSoldierByProfileID( 64, FALSE ); + pSoldier = FindSoldierByProfileID( TEX_UB, FALSE ); //if we found him if( pSoldier != NULL ) @@ -5690,11 +5681,11 @@ void HandleTexBecomingCamoed() // SANDRO - old/new traits check (I am not sure if this is used at all) if ( gGameOptions.fNewTraitSystem ) { - gMercProfiles[ 64 ].bSkillTraits[0] = RANGER_NT; + gMercProfiles[ TEX_UB ].bSkillTraits[0] = RANGER_NT; } else { - gMercProfiles[ 64 ].bSkillTraits[0] = CAMOUFLAGED_OT; + gMercProfiles[ TEX_UB ].bSkillTraits[0] = CAMOUFLAGED_OT; } //Close down the talking menu... @@ -5704,7 +5695,7 @@ void HandleTexBecomingCamoed() // Trigger Tex to say the quote, this will cause the radio locater to come up giving a pause to make it appear that he // put on camoflauge - TriggerNPCRecord( 64, 15 ); + TriggerNPCRecord( TEX_UB, 15 ); } void DisplayJerryBreakingLaptopTransmitterPopup() diff --git a/Tactical/Ja25_Tactical.cpp b/Tactical/Ja25_Tactical.cpp index 4b8ebba7..a894a6b9 100644 --- a/Tactical/Ja25_Tactical.cpp +++ b/Tactical/Ja25_Tactical.cpp @@ -215,6 +215,19 @@ UINT32 CALICO_900_UB; UINT32 CLIP_CANNON_BALL; +UINT8 MANUEL_UB; +UINT8 BIGGENS_UB; +UINT8 JOHN_K_UB; +UINT8 TEX_UB; +UINT8 GASTON_UB; +UINT8 STOGIE_UB; +UINT8 JERRY_MILO_UB; +UINT8 PGMALE4_UB; +UINT8 BETTY_UB; +UINT8 RAUL_UB; +UINT8 MORRIS_UB; +UINT8 RUDY_UB; + void Old_UB_Inventory (); void New_UB_Inventory (); @@ -311,12 +324,12 @@ void InitGridNoUB() BOOLEAN IsSoldierQualifiedMerc( SOLDIERTYPE *pSoldier ) { - if( pSoldier->ubProfile == 58 || /// GASTON - pSoldier->ubProfile == 59 || // STOGIE - pSoldier->ubProfile == 64 ||// TEX || - pSoldier->ubProfile == 62 || //JOHN_K || - pSoldier->ubProfile == 61 || //BIGGENS || - pSoldier->ubProfile == 60 || //MANUEL || + if( pSoldier->ubProfile == GASTON_UB || /// GASTON + pSoldier->ubProfile == STOGIE_UB || // STOGIE + pSoldier->ubProfile == TEX_UB ||// TEX || + pSoldier->ubProfile == JOHN_K_UB || //JOHN_K || + pSoldier->ubProfile == BIGGENS_UB || //BIGGENS || + pSoldier->ubProfile == MANUEL_UB || //MANUEL || pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__PLAYER_CHARACTER ) { @@ -331,10 +344,10 @@ BOOLEAN IsSoldierQualifiedMerc( SOLDIERTYPE *pSoldier ) BOOLEAN IsSoldierQualifiedMercForSeeingPowerGenFan( SOLDIERTYPE *pSoldier ) { - if( pSoldier->ubProfile == 60 ||//MANUEL || + if( pSoldier->ubProfile == MANUEL_UB ||//MANUEL || pSoldier->ubProfile == 53 || //PGCMale3 pSoldier->ubProfile == 55 || //PGCFem2 - pSoldier->ubProfile == 57 //PGCMale4 + pSoldier->ubProfile == PGMALE4_UB //PGCMale4 ) { return( TRUE ); @@ -348,9 +361,9 @@ BOOLEAN IsSoldierQualifiedMercForSeeingPowerGenFan( SOLDIERTYPE *pSoldier ) BOOLEAN IsSoldierQualifiedGunCommenterMerc( SOLDIERTYPE *pSoldier ) { - if( pSoldier->ubProfile == 58 || // GASTON - pSoldier->ubProfile == 59 || // STOGIE - pSoldier->ubProfile == 64 || // TEX + if( pSoldier->ubProfile == GASTON_UB || // GASTON + pSoldier->ubProfile == STOGIE_UB || // STOGIE + pSoldier->ubProfile == TEX_UB || // TEX pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__PLAYER_CHARACTER ) { @@ -365,8 +378,8 @@ BOOLEAN IsSoldierQualifiedGunCommenterMerc( SOLDIERTYPE *pSoldier ) BOOLEAN IsSoldierQualifiedInitialHireMerc( SOLDIERTYPE *pSoldier ) { - if( pSoldier->ubProfile == 58 || // GASTON - pSoldier->ubProfile == 59 || // STOGIE + if( pSoldier->ubProfile == GASTON_UB || // GASTON + pSoldier->ubProfile == STOGIE_UB || // STOGIE pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__PLAYER_CHARACTER ) { @@ -648,7 +661,7 @@ void StopPowerGenFan() SetFactTrue( FACT_FAN_STOPPPED ); //Is biggens on the team - pSoldier = FindSoldierByProfileID( 61, TRUE ); // BIGGENS + pSoldier = FindSoldierByProfileID( BIGGENS_UB, TRUE ); // BIGGENS if( pSoldier != NULL ) { SetFactTrue( FACT_BIGGENS_ON_TEAM_AND_FAN_STOPPED ); @@ -814,15 +827,15 @@ void HandlePowerGenAlarm() UINT8 bSoldierId1, bSoldierId2, bSoldierId3; Get3RandomQualifiedMercs( &bSoldierId1, &bSoldierId2, &bSoldierId3 ); - if( bSoldierId1 != -1 && Menptr[ bSoldierId1 ].ubProfile != 61 ) //BIGGENS + if( bSoldierId1 != -1 && Menptr[ bSoldierId1 ].ubProfile != BIGGENS_UB ) //BIGGENS { TacticalCharacterDialogue( &Menptr[ bSoldierId1 ], QUOTE_PERSONALITY_BIAS_WITH_MERC_1 ); } - else if( bSoldierId2 != -1 && Menptr[ bSoldierId2 ].ubProfile != 61 ) //BIGGENS + else if( bSoldierId2 != -1 && Menptr[ bSoldierId2 ].ubProfile != BIGGENS_UB ) //BIGGENS { TacticalCharacterDialogue( &Menptr[ bSoldierId2 ], QUOTE_PERSONALITY_BIAS_WITH_MERC_1 ); } - else if( bSoldierId3 != -1 && Menptr[ bSoldierId3 ].ubProfile != 61 ) // BIGGENS + else if( bSoldierId3 != -1 && Menptr[ bSoldierId3 ].ubProfile != BIGGENS_UB ) // BIGGENS { TacticalCharacterDialogue( &Menptr[ bSoldierId3 ], QUOTE_PERSONALITY_BIAS_WITH_MERC_1 ); } @@ -981,24 +994,21 @@ void RevealAllDroppedEnemyItems() */ void HandlePlayingQuoteWhenHiringNpc( UINT8 ubProfile ) { - switch( ubProfile ) - { - case 60://MANUEL: - SayQuoteFromAllNewHiredMercButDoGastonLast( ubProfile, QUOTE_PRECEDENT_TO_REPEATING_ONESELF ); - break; - case 61 : //BIGGENS: - SayQuoteFromAllNewHiredMercButDoGastonLast( ubProfile, QUOTE_REFUSAL_TO_JOIN_LACK_OF_FUNDS ); - break; - case 62 : //JOHN_K: - SayQuoteFromAllNewHiredMercButDoGastonLast( ubProfile, QUOTE_DEPART_COMMET_CONTRACT_NOT_RENEWED_OR_TERMINATED_UNDER_48 ); + if ( ubProfile == MANUEL_UB ) //MANUEL: + SayQuoteFromAllNewHiredMercButDoGastonLast( ubProfile, QUOTE_PRECEDENT_TO_REPEATING_ONESELF ); + else if ( ubProfile == BIGGENS_UB ) //BIGGENS: + SayQuoteFromAllNewHiredMercButDoGastonLast( ubProfile, QUOTE_REFUSAL_TO_JOIN_LACK_OF_FUNDS ); + else if ( ubProfile == JOHN_K_UB ) //JOHN_K: + { + SayQuoteFromAllNewHiredMercButDoGastonLast( ubProfile, QUOTE_DEPART_COMMET_CONTRACT_NOT_RENEWED_OR_TERMINATED_UNDER_48 ); //Delay John saying quote about town - DelayedMercQuote( 62, QUOTE_HATE_MERC_2_ON_TEAM, GetWorldTotalSeconds() + 5 + Random( 10 ) ); - break; - case 64 : //TEX: + DelayedMercQuote( JOHN_K_UB, QUOTE_HATE_MERC_2_ON_TEAM, GetWorldTotalSeconds() + 5 + Random( 10 ) ); + } + else if ( ubProfile == TEX_UB ) //TEX: SayQuoteFromAllNewHiredMercButDoGastonLast( ubProfile, QUOTE_DEATH_RATE_RENEWAL ); - break; - } + + } BOOLEAN SayQuoteFromAllNewHiredMercButDoGastonLast( UINT8 ubProfile, UINT32 uiQuoteNum ) @@ -1019,7 +1029,7 @@ BOOLEAN SayQuoteFromAllNewHiredMercButDoGastonLast( UINT8 ubProfile, UINT32 uiQu for( iCnt=0; iCntsSectorX == gWorldSectorX && pSoldier->sSectorY == gWorldSectorY && diff --git a/Tactical/Ja25_Tactical.h b/Tactical/Ja25_Tactical.h index 1584dadf..e5fe2fb6 100644 --- a/Tactical/Ja25_Tactical.h +++ b/Tactical/Ja25_Tactical.h @@ -131,6 +131,19 @@ extern UINT32 MICRO_UZI_UB; extern UINT32 CALICO_950_UB; extern UINT32 CALICO_900_UB; +extern UINT8 MANUEL_UB; +extern UINT8 BIGGENS_UB; +extern UINT8 JOHN_K_UB; +extern UINT8 TEX_UB; +extern UINT8 GASTON_UB; +extern UINT8 STOGIE_UB; +extern UINT8 JERRY_MILO_UB; +extern UINT8 PGMALE4_UB; +extern UINT8 BETTY_UB; +extern UINT8 RAUL_UB; +extern UINT8 MORRIS_UB; +extern UINT8 RUDY_UB; + extern void Old_UB_Inventory (); extern void New_UB_Inventory (); diff --git a/Tactical/Merc Hiring.cpp b/Tactical/Merc Hiring.cpp index 30261a44..3e8ca665 100644 --- a/Tactical/Merc Hiring.cpp +++ b/Tactical/Merc Hiring.cpp @@ -183,7 +183,7 @@ INT8 HireMerc( MERC_HIRE_STRUCT *pHireMerc) if ( gProfilesMERC[ubCurrentSoldier].ProfilId == ubCurrentSoldier ) // if( ( ubCurrentSoldier >= 40 && ubCurrentSoldier <= 50 ) || ubCurrentSoldier == 58 /*GASTON*/ || ubCurrentSoldier == 59 /*STOGIE*/ ) { - AddItemToMerc( iNewIndex, MERC_UMBRELLA ); //1361 + AddItemToMerc( iNewIndex, MERC_UMBRELLA ); //Data-1.13\TableData\Items\items.xml, uiIndex = 1361 or Data\TableData\Items\items.xml, uiIndex = 336 } //if this is an AIM or MERC merc @@ -969,16 +969,16 @@ void InitJerryMiloInfo() { // return; //AA //Set Jerry Milo's Gridno h7 - gMercProfiles[ 76 ].sSectorX = JA2_5_START_SECTOR_X; - gMercProfiles[ 76 ].sSectorY = JA2_5_START_SECTOR_Y; - gMercProfiles[ 76 ].bSectorZ = 0; + gMercProfiles[ JERRY_MILO_UB ].sSectorX = JA2_5_START_SECTOR_X; + gMercProfiles[ JERRY_MILO_UB ].sSectorY = JA2_5_START_SECTOR_Y; + gMercProfiles[ JERRY_MILO_UB ].bSectorZ = 0; - gMercProfiles[ 76 ].sGridNo = gGameUBOptions.JerryGridNo; //15109; + gMercProfiles[ JERRY_MILO_UB ].sGridNo = gGameUBOptions.JerryGridNo; //15109; - gMercProfiles[ 76 ].fUseProfileInsertionInfo = TRUE; + gMercProfiles[ JERRY_MILO_UB ].fUseProfileInsertionInfo = TRUE; - gMercProfiles[ 76 ].ubStrategicInsertionCode = INSERTION_CODE_GRIDNO; - gMercProfiles[ 76 ].usStrategicInsertionData = gGameUBOptions.JerryGridNo; //15109; + gMercProfiles[ JERRY_MILO_UB ].ubStrategicInsertionCode = INSERTION_CODE_GRIDNO; + gMercProfiles[ JERRY_MILO_UB ].usStrategicInsertionData = gGameUBOptions.JerryGridNo; //15109; } @@ -1012,7 +1012,7 @@ if ( gGameUBOptions.InGameHeliCrash == TRUE ) if ( gGameUBOptions.InJerry == TRUE ) { - pSoldier = FindSoldierByProfileID( 76, FALSE ); //JERRY + pSoldier = FindSoldierByProfileID( JERRY_MILO_UB, FALSE ); //JERRY if( pSoldier == NULL ) { Assert( 0 ); @@ -1052,7 +1052,7 @@ if ( gGameUBOptions.InGameHeliCrash == TRUE ) if ( gGameUBOptions.InJerry == TRUE ) { - pJerrySoldier = FindSoldierByProfileID(76, FALSE );//JERRY + pJerrySoldier = FindSoldierByProfileID(JERRY_MILO_UB, FALSE );//JERRY if( pJerrySoldier != NULL ) { //Make sure we can see the pilot diff --git a/Tactical/Overhead.cpp b/Tactical/Overhead.cpp index c6f64923..7703a318 100644 --- a/Tactical/Overhead.cpp +++ b/Tactical/Overhead.cpp @@ -1000,8 +1000,8 @@ BOOLEAN ExecuteOverhead( ) // //if the merc is one of the mercs who has Quote 80, say that - if( pSoldier->ubProfile == 58 ||//GASTON - pSoldier->ubProfile == 59 ||//STOGIE + if( pSoldier->ubProfile == GASTON_UB ||//GASTON + pSoldier->ubProfile == STOGIE_UB ||//STOGIE pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__PLAYER_CHARACTER ) { TacticalCharacterDialogue( pSoldier, QUOTE_REPUTATION_REFUSAL ); @@ -3475,10 +3475,9 @@ void HandleNPCTeamMemberDeath( SOLDIERTYPE *pSoldierOld ) ScreenMsg( FONT_RED, MSG_INTERFACE, pMercDeadString[ 0 ], pSoldierOld->GetName() ); } - switch( pSoldierOld->ubProfile ) + #ifdef JA2UB + if ( pSoldierOld->ubProfile == MORRIS_UB ) { -#ifdef JA2UB - case 75: //MORRIS { INT8 bSoldierID; @@ -3492,7 +3491,12 @@ void HandleNPCTeamMemberDeath( SOLDIERTYPE *pSoldierOld ) TacticalCharacterDialogue( &Menptr[ bSoldierID ], QUOTE_LEARNED_TO_HATE_MERC_1_ON_TEAM_WONT_RENEW ); } } - break; + } + #endif + + switch( pSoldierOld->ubProfile ) + { +#ifdef JA2UB #else //Ja25: none of these characters are in the exp. case BRENDA: @@ -3845,7 +3849,7 @@ void HandleNPCTeamMemberDeath( SOLDIERTYPE *pSoldierOld ) #ifdef JA2UB //------------------- ja25 ub ------------------------- //if the person was Raul, and we are to say the blown up quotes - if( pSoldierOld->ubProfile == PERKO /*RAUL */ && IsJa25GeneralFlagSet( JA_GF__RAUL_BLOW_HIMSELF_UP ) ) + if( pSoldierOld->ubProfile == RAUL_UB /*RAUL */ && IsJa25GeneralFlagSet( JA_GF__RAUL_BLOW_HIMSELF_UP ) ) { UINT8 SoldierId1; UINT8 SoldierId2; @@ -9928,10 +9932,10 @@ BOOLEAN CanMsgBoxForPlayerToBeNotifiedOfSomeoneElseInSector() } } */ - if( ( gWorldSectorX == gMercProfiles[ 60 ].sSectorX && gWorldSectorY == gMercProfiles[ 60 ].sSectorY && gbWorldSectorZ == gMercProfiles[ 60 ].bSectorZ ) ) + if( ( gWorldSectorX == gMercProfiles[ MANUEL_UB ].sSectorX && gWorldSectorY == gMercProfiles[ MANUEL_UB ].sSectorY && gbWorldSectorZ == gMercProfiles[ MANUEL_UB ].bSectorZ ) ) { //IF MANUEL is already hired - if( gMercProfiles[ 60 ].ubMiscFlags & PROFILE_MISC_FLAG_RECRUITED ) + if( gMercProfiles[ MANUEL_UB ].ubMiscFlags & PROFILE_MISC_FLAG_RECRUITED ) { //then we shouldnt display the message return( FALSE ); diff --git a/Tactical/ShopKeeper Interface.cpp b/Tactical/ShopKeeper Interface.cpp index 1e8508b6..9d4c9ffd 100644 --- a/Tactical/ShopKeeper Interface.cpp +++ b/Tactical/ShopKeeper Interface.cpp @@ -4398,7 +4398,7 @@ void MovePlayerOfferedItemsOfValueToArmsDealersInventory() StartShopKeeperTalking( SK_QUOTES_NPC_SPECIFIC_51 ); //Trigger Rauls action #52 - TriggerNPCRecord( PERKO, 52 ); + TriggerNPCRecord( RAUL_UB, 52 ); //Remeber to discount the barrett SetJa25GeneralFlag( JA_GF__BARRETT_IS_HALF_PRICE ); diff --git a/Tactical/Soldier Control.cpp b/Tactical/Soldier Control.cpp index 24cfe04a..69dc1a36 100644 --- a/Tactical/Soldier Control.cpp +++ b/Tactical/Soldier Control.cpp @@ -9934,7 +9934,7 @@ UINT8 SOLDIERTYPE::SoldierTakeDamage( INT8 bHeight, INT16 sLifeDeduct, INT16 sPo #ifdef JA2UB //if the attacker is MORRIS, AND he didnt kill the person - if( Menptr[ ubAttacker ].ubProfile == 75 ) //MORRIS + if( Menptr[ ubAttacker ].ubProfile == MORRIS_UB ) //MORRIS { //if the soldier is hurt, but not dead if( this->stats.bLife < bOldLife && this->stats.bLife > 0 ) diff --git a/Tactical/Soldier Create.cpp b/Tactical/Soldier Create.cpp index b1655732..6c80e139 100644 --- a/Tactical/Soldier Create.cpp +++ b/Tactical/Soldier Create.cpp @@ -3607,10 +3607,10 @@ void CopyProfileItems( SOLDIERTYPE *pSoldier, SOLDIERCREATE_STRUCT *pCreateStruc // since keys depend on 2 values, they pretty much have to be hardcoded. // and if a case isn't handled here it's better to not give any key than // to provide one which doesn't work and would confuse everything. - switch( pCreateStruct->ubProfile ) + + #ifdef JA2UB + if ( pCreateStruct->ubProfile == MORRIS_UB ) { -#ifdef JA2UB - case 75: //MORRIS: if ( pProfile->inv[ cnt ] >= KEY_1 && pProfile->inv[ cnt ] <= KEY_32) { fRet = CreateKeyObject( &gTempObject , pProfile->bInvNumber[ cnt ], 32 ); @@ -3620,7 +3620,13 @@ void CopyProfileItems( SOLDIERTYPE *pSoldier, SOLDIERCREATE_STRUCT *pCreateStruc //{ // memset( &(pSoldier->inv[cnt]), 0, sizeof( OBJECTTYPE ) ); //} - break; + } + #endif + + switch( pCreateStruct->ubProfile ) + { +#ifdef JA2UB + #endif // WANNE: Changed KEY_32 to KEY_8 because we only have 8 keys defined in Items.xml diff --git a/Tactical/opplist.cpp b/Tactical/opplist.cpp index e5b346b3..3e1b638c 100644 --- a/Tactical/opplist.cpp +++ b/Tactical/opplist.cpp @@ -2431,10 +2431,10 @@ void ManSeesMan(SOLDIERTYPE *pSoldier, SOLDIERTYPE *pOpponent, INT32 sOppGridNo, else if ( pSoldier->bTeam == gbPlayerNum ) { #ifdef JA2UB - if( (pOpponent->ubProfile == 75 ) && + if( (pOpponent->ubProfile == MORRIS_UB ) && ( GetNumSoldierIdAndProfileIdOfTheNewMercsOnPlayerTeam( NULL, NULL ) != 0 ) && !( pSoldier->usQuoteSaidExtFlags & SOLDIER_QUOTE_SAID_EXT_MORRIS ) && - !( gMercProfiles[ 75 ].ubMiscFlags2 & PROFILE_MISC_FLAG2_SAID_FIRSTSEEN_QUOTE ) ) + !( gMercProfiles[ MORRIS_UB ].ubMiscFlags2 & PROFILE_MISC_FLAG2_SAID_FIRSTSEEN_QUOTE ) ) { gfMorrisShouldSayHi = TRUE; } diff --git a/TacticalAI/AIMain.cpp b/TacticalAI/AIMain.cpp index 76fa37f3..14649479 100644 --- a/TacticalAI/AIMain.cpp +++ b/TacticalAI/AIMain.cpp @@ -803,12 +803,12 @@ void StartNPCAI(SOLDIERTYPE *pSoldier) #ifdef JA2UB //JA25 UB //if this is Morris - if( pSoldier->ubProfile == 75 ) //MORRIS + if( pSoldier->ubProfile == MORRIS_UB ) //MORRIS { //if we are to say the line if we are hurt the player if( gJa25SaveStruct.fMorrisToSayHurtPlayerQuoteNextTurn ) { - TriggerNPCRecord( 75, 6 ); //MORRIS + TriggerNPCRecord( MORRIS_UB, 6 ); //MORRIS } } #endif diff --git a/TileEngine/Explosion Control.cpp b/TileEngine/Explosion Control.cpp index 767a4478..4ef77090 100644 --- a/TileEngine/Explosion Control.cpp +++ b/TileEngine/Explosion Control.cpp @@ -3560,7 +3560,7 @@ void PerformItemAction( INT32 sGridNo, OBJECTTYPE * pObj ) HavePersonAtGridnoStop( sGridNo ); //Make Biggens run for cover and then detonate the explosives - TriggerNPCRecord( 61 , 17 ); //BIGGENS + TriggerNPCRecord( BIGGENS_UB , 17 ); //BIGGENS } break; @@ -3571,7 +3571,7 @@ void PerformItemAction( INT32 sGridNo, OBJECTTYPE * pObj ) HavePersonAtGridnoStop( sGridNo ); //Have Biggens spit out a warning about the bombs - TriggerNPCRecord( 61, 16 ); //BIGGENS + TriggerNPCRecord( BIGGENS_UB, 16 ); //BIGGENS } break; @@ -5094,10 +5094,10 @@ BOOLEAN ShouldThePlayerStopWhenWalkingOnBiggensActionItem( UINT8 ubRecordNum ) { SOLDIERTYPE *pSoldier=NULL; - pSoldier = FindSoldierByProfileID( 61, TRUE ); //BIGGENS + pSoldier = FindSoldierByProfileID( BIGGENS_UB, TRUE ); //BIGGENS //if biggens hasnt said the quote before, or is on the players team - if( HasNpcSaidQuoteBefore( 61, ubRecordNum ) || ( pSoldier != NULL || gMercProfiles[ 61 ].bLife <= 0 ) ) //BIGGENS + if( HasNpcSaidQuoteBefore( BIGGENS_UB, ubRecordNum ) || ( pSoldier != NULL || gMercProfiles[ BIGGENS_UB ].bLife <= 0 ) ) //BIGGENS { return( FALSE ); } diff --git a/ja2_VS2005.vcproj b/ja2_VS2005.vcproj index edda2928..b6c5f3c0 100644 --- a/ja2_VS2005.vcproj +++ b/ja2_VS2005.vcproj @@ -145,7 +145,7 @@