From 8007db56dc42dc8151ebef4f05c9c861e092d22a Mon Sep 17 00:00:00 2001 From: Wanne Date: Mon, 21 Oct 2013 12:24:45 +0000 Subject: [PATCH] Fixed (by Buggler) - Externalized victory sector and gridno - Fixed initial game loading screen not using file specified in SectorLoadscreens.xml when starting other than A9 sector - Fixed no time delay for interrogation meanwhile scene - Added space to 'moveitem' string git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6518 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- GameSettings.cpp | 4 ++++ GameSettings.h | 5 +++++ Loading Screen.cpp | 23 ++++++++------------- Strategic/Queen Command.cpp | 12 +---------- Tactical/End Game.cpp | 41 +++++++++++++++++++++---------------- Utils/_DutchText.cpp | 6 +++--- Utils/_EnglishText.cpp | 6 +++--- Utils/_FrenchText.cpp | 6 +++--- Utils/_GermanText.cpp | 4 ++-- Utils/_ItalianText.cpp | 6 +++--- Utils/_PolishText.cpp | 6 +++--- Utils/_RussianText.cpp | 6 +++--- Utils/_TaiwaneseText.cpp | 6 +++--- 13 files changed, 65 insertions(+), 66 deletions(-) diff --git a/GameSettings.cpp b/GameSettings.cpp index 237b9772..dcf6726b 100644 --- a/GameSettings.cpp +++ b/GameSettings.cpp @@ -2530,6 +2530,10 @@ void LoadModSettings(){ gModSettings.ubMeanwhileAddMadlabSector3Y = iniReader.ReadInteger("Meanwhile", "ADD_MADLAB_SECTOR_3_Y", 9); gModSettings.ubMeanwhileAddMadlabSector4X = iniReader.ReadInteger("Meanwhile", "ADD_MADLAB_SECTOR_4_X", 4); gModSettings.ubMeanwhileAddMadlabSector4Y = iniReader.ReadInteger("Meanwhile", "ADD_MADLAB_SECTOR_4_Y", 5); + + gModSettings.ubEndGameVictorySectorX = iniReader.ReadInteger("End Game", "VICTORY_SECTOR_X", 3); + gModSettings.ubEndGameVictorySectorY = iniReader.ReadInteger("End Game", "VICTORY_SECTOR_Y", 16); + gModSettings.iEndGameVictoryGridNo = iniReader.ReadInteger("End Game", "VICTORY_POSITION", 5687); } // silversurfer: load item property modifiers diff --git a/GameSettings.h b/GameSettings.h index 2b6072b8..495688dd 100644 --- a/GameSettings.h +++ b/GameSettings.h @@ -1875,6 +1875,11 @@ typedef struct UINT8 ubMeanwhileAddMadlabSector3Y; UINT8 ubMeanwhileAddMadlabSector4X; UINT8 ubMeanwhileAddMadlabSector4Y; + + //victory celebration stuff + UINT8 ubEndGameVictorySectorX; + UINT8 ubEndGameVictorySectorY; + INT32 iEndGameVictoryGridNo; }MOD_SETTINGS; diff --git a/Loading Screen.cpp b/Loading Screen.cpp index e378dc96..483cc719 100644 --- a/Loading Screen.cpp +++ b/Loading Screen.cpp @@ -121,21 +121,16 @@ UINT8 GetLoadScreenID(INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ) /* User made system - BEGIN */ if (gGameExternalOptions.gfUseExternalLoadscreens) { - if (bSectorZ != 0) - { - szSector = szSectorMap [sSectorY][sSectorX]; // not really necessary, I guess - return UNDERGROUND; - } + szSector = szSectorMap [sSectorY][sSectorX]; + if (DidGameJustStart()) + return DidGameJustStart() ? HELI : (fNight ? NIGHT : DAY); - switch( ubSectorID ) - { - case SEC_A9: - szSector = "A9"; - return DidGameJustStart() ? HELI : (fNight ? NIGHT : DAY); - default: - szSector = szSectorMap [sSectorY][sSectorX]; - return fNight ? NIGHT : DAY; - } + else if (bSectorZ != 0) + return UNDERGROUND; + + else + return fNight ? NIGHT : DAY; + } /* WANNE: User made System - END */ /* WANNE: Sir-Tech System - BEGIN */ diff --git a/Strategic/Queen Command.cpp b/Strategic/Queen Command.cpp index 95a400ef..57d4ef0d 100644 --- a/Strategic/Queen Command.cpp +++ b/Strategic/Queen Command.cpp @@ -2074,17 +2074,7 @@ void EndCaptureSequence( ) gStrategicStatus.uiFlags |= STRATEGIC_PLAYER_CAPTURED_FOR_ESCAPE; // OK! - Schedule Meanwhile now! - { - MEANWHILE_DEFINITION MeanwhileDef; - - MeanwhileDef.sSectorX = gModSettings.ubMeanwhileInterrogatePOWSectorX; //7 - MeanwhileDef.sSectorY = gModSettings.ubMeanwhileInterrogatePOWSectorY; //14 - MeanwhileDef.ubNPCNumber = QUEEN; - MeanwhileDef.usTriggerEvent = 0; - MeanwhileDef.ubMeanwhileID = INTERROGATION; - - ScheduleMeanwhileEvent( &MeanwhileDef, 10 ); - } + HandleInterrogationMeanwhileScene(); } // CJC Dec 1 2002: fixing multiple captures else diff --git a/Tactical/End Game.cpp b/Tactical/End Game.cpp index 2dbc8a1c..f88c63ad 100644 --- a/Tactical/End Game.cpp +++ b/Tactical/End Game.cpp @@ -61,6 +61,9 @@ BOOLEAN gfPlayersLaptopWasntWorkingAtEndOfGame; class OBJECTTYPE; class SOLDIERTYPE; +//victory ending scene sector +#define VICTORY_X gModSettings.ubEndGameVictorySectorX +#define VICTORY_Y gModSettings.ubEndGameVictorySectorY INT32 sStatueGridNos[] = { 13829, 13830, 13669, 13670 }; @@ -257,16 +260,16 @@ void DoneFadeOutKilledQueen( void ) if ( pSoldier->bActive && pSoldier->stats.bLife >= OKLIFE && pSoldier->bInSector && pSoldier->bAssignment == CurrentSquad( ) ) { gfTacticalTraversal = TRUE; - SetGroupSectorValue( 3, MAP_ROW_P, 0, pSoldier->ubGroupID ); + SetGroupSectorValue( VICTORY_X, VICTORY_Y, 0, pSoldier->ubGroupID ); // Set next sectore - pSoldier->sSectorX = 3; - pSoldier->sSectorY = MAP_ROW_P; + pSoldier->sSectorX = VICTORY_X; + pSoldier->sSectorY = VICTORY_Y; pSoldier->bSectorZ = 0; // Set gridno pSoldier->ubStrategicInsertionCode = INSERTION_CODE_GRIDNO; - pSoldier->usStrategicInsertionData = 5687;//dnl!!! + pSoldier->usStrategicInsertionData = gModSettings.iEndGameVictoryGridNo; //5687 dnl!!! // Set direction to face.... pSoldier->ubInsertionDirection = 100 + NORTHWEST; } @@ -299,33 +302,35 @@ void DoneFadeOutKilledQueen( void ) SetMusicMode( MUSIC_TACTICAL_VICTORY ); - HandleMoraleEvent( NULL, MORALE_QUEEN_BATTLE_WON, 3, MAP_ROW_P, 0 ); - HandleGlobalLoyaltyEvent( GLOBAL_LOYALTY_QUEEN_BATTLE_WON, 3, MAP_ROW_P, 0 ); + HandleMoraleEvent( NULL, MORALE_QUEEN_BATTLE_WON, VICTORY_X, VICTORY_Y, 0 ); + HandleGlobalLoyaltyEvent( GLOBAL_LOYALTY_QUEEN_BATTLE_WON, VICTORY_X, VICTORY_Y, 0 ); SetMusicMode( MUSIC_TACTICAL_VICTORY ); SetThisSectorAsPlayerControlled( gWorldSectorX, gWorldSectorY, gbWorldSectorZ, TRUE ); - // ATE: Force change of level set z to 1 + // ATE: Force change of level set z to 1 to allow reloading of same sector gbWorldSectorZ = 1; // Clear out dudes....... - SectorInfo[ SEC_P3 ].ubNumAdmins = 0; - SectorInfo[ SEC_P3 ].ubNumTroops = 0; - SectorInfo[ SEC_P3 ].ubNumElites = 0; - SectorInfo[ SEC_P3 ].ubAdminsInBattle = 0; - SectorInfo[ SEC_P3 ].ubTroopsInBattle = 0; - SectorInfo[ SEC_P3 ].ubElitesInBattle = 0; + SectorInfo[ SECTOR( VICTORY_X, VICTORY_Y ) ].ubNumAdmins = 0; + SectorInfo[ SECTOR( VICTORY_X, VICTORY_Y ) ].ubNumTroops = 0; + SectorInfo[ SECTOR( VICTORY_X, VICTORY_Y ) ].ubNumElites = 0; + SectorInfo[ SECTOR( VICTORY_X, VICTORY_Y ) ].ubAdminsInBattle = 0; + SectorInfo[ SECTOR( VICTORY_X, VICTORY_Y ) ].ubTroopsInBattle = 0; + SectorInfo[ SECTOR( VICTORY_X, VICTORY_Y ) ].ubElitesInBattle = 0; - // ATE: GEt rid of elliot in P3... - gMercProfiles[ ELLIOT ].sSectorX = 1; + // ATE: banish elliot... dead or alive + gMercProfiles[ ELLIOT ].sSectorX = 0; + gMercProfiles[ ELLIOT ].sSectorY = 0; + gMercProfiles[ ELLIOT ].bSectorZ = 0; - ChangeNpcToDifferentSector( DEREK, 3, MAP_ROW_P, 0 ); - ChangeNpcToDifferentSector( OLIVER, 3, MAP_ROW_P, 0 ); + ChangeNpcToDifferentSector( DEREK, VICTORY_X, VICTORY_Y, 0 ); + ChangeNpcToDifferentSector( OLIVER, VICTORY_X, VICTORY_Y, 0 ); // OK, insertion data found, enter sector! - SetCurrentWorldSector( 3, MAP_ROW_P, 0 ); + SetCurrentWorldSector( VICTORY_X, VICTORY_Y, 0 ); // OK, once down here, adjust the above map with crate info.... gfTacticalTraversal = FALSE; diff --git a/Utils/_DutchText.cpp b/Utils/_DutchText.cpp index 55df80f4..21412f2c 100644 --- a/Utils/_DutchText.cpp +++ b/Utils/_DutchText.cpp @@ -1647,7 +1647,7 @@ STR16 pAssignmentStrings[] = L"M.Militia", //training moving militia units // TODO.Translate L"Trainer", // training a teammate L"Student", // being trained by someone else - L"MoveItem", // move items // TODO.Translate + L"Move Item", // move items // TODO.Translate L"Staff", // operating a strategic facility // TODO.Translate L"Eat", // eating at a facility (cantina etc.) // TODO.Translate L"Rest", // Resting at a facility // TODO.Translate @@ -1783,7 +1783,7 @@ STR16 pLongAssignmentStrings[] = L"Train Mobiles", // TODO.Translate L"Trainer", // training a teammate L"Student", // being trained by someone else - L"MoveItem", // move items // TODO.Translate + L"Move Item", // move items // TODO.Translate L"Staff Facility", // TODO.Translate L"Rest at Facility", // TODO.Translate L"Interrogate prisoners", // Flugente: interrogate prisoners TODO.Translate @@ -1908,7 +1908,7 @@ STR16 pAssignMenuStrings[] = L"Vehicle", // the merc is in a vehicle L"Repair", // the merc is repairing items L"Train", // the merc is training - L"MoveItem", // move items // TODO.Translate + L"Move Item", // move items // TODO.Translate L"Facility", // the merc is using/staffing a facility // TODO.Translate L"Stop", // cancel this menu }; diff --git a/Utils/_EnglishText.cpp b/Utils/_EnglishText.cpp index bd2d5cfb..85a82a99 100644 --- a/Utils/_EnglishText.cpp +++ b/Utils/_EnglishText.cpp @@ -1651,7 +1651,7 @@ STR16 pAssignmentStrings[] = L"M.Militia", //training moving militia units L"Trainer", // training a teammate L"Student", // being trained by someone else - L"MoveItem", // move items + L"Move Item", // move items L"Staff", // operating a strategic facility L"Eat", // eating at a facility (cantina etc.) L"Rest", // Resting at a facility @@ -1787,7 +1787,7 @@ STR16 pLongAssignmentStrings[] = L"Train Mobiles", // Missing L"Train Teammate", L"Student", - L"MoveItem", // move items + L"Move Item", // move items L"Staff Facility", // Missing L"Rest at Facility", // Missing L"Interrogate prisoners", // Flugente: interrogate prisoners @@ -1912,7 +1912,7 @@ STR16 pAssignMenuStrings[] = L"Vehicle", // the merc is in a vehicle L"Repair", // the merc is repairing items L"Train", // the merc is training - L"MoveItem", // move items + L"Move Item", // move items L"Facility", // the merc is using/staffing a facility L"Cancel", // cancel this menu }; diff --git a/Utils/_FrenchText.cpp b/Utils/_FrenchText.cpp index bc6f70f0..f959d8b7 100644 --- a/Utils/_FrenchText.cpp +++ b/Utils/_FrenchText.cpp @@ -1655,7 +1655,7 @@ STR16 pAssignmentStrings[] = L"Milice M.", //training moving militia units L"Entraîneur", // training a teammate //!!! Too long ? (11 char) -> 11 chars is OK L"Élève", // being trained by someone else - L"MoveItem", // move items // TODO.Translate + L"Move Item", // move items // TODO.Translate L"Exploitation", // operating a strategic facility L"Mange", // eating at a facility (cantina etc.) // TODO.Translate L"Repos", // Resting at a facility @@ -1790,7 +1790,7 @@ STR16 pLongAssignmentStrings[] = L"Milice mobile", L"Entraîneur", L"Elève", - L"MoveItem", // move items // TODO.Translate + L"Move Item", // move items // TODO.Translate L"Exploitation infras.", //!!! Idem ? -> Current translation is OK L"Repos infras.", L"Interroger captif(s)", // Flugente: interrogate prisoners // TODO.Translate @@ -1915,7 +1915,7 @@ STR16 pAssignMenuStrings[] = L"Transport", // the merc is in a vehicle L"Réparation", // the merc is repairing items L"Formation", // the merc is training - L"MoveItem", // move items // TODO.Translate + L"Move Item", // move items // TODO.Translate L"Construction", // the merc is using/staffing a facility L"Annuler", // cancel this menu }; diff --git a/Utils/_GermanText.cpp b/Utils/_GermanText.cpp index a6978254..44b6fc80 100644 --- a/Utils/_GermanText.cpp +++ b/Utils/_GermanText.cpp @@ -1660,7 +1660,7 @@ STR16 pAssignmentStrings[] = L"M.Miliz", //training moving militia units L"Trainer", // training a teammate L"Rekrut", // being trained by someone else - L"Umzug", // move items // TODO.Translate + L"Umzug", // move items L"Betrieb", // operating a strategic facility L"Essen", // eating at a facility (cantina etc.) L"Pause", // Resting at a facility @@ -1790,7 +1790,7 @@ STR16 pLongAssignmentStrings[] = L"Trainiere Mobile", L"Trainer", L"Rekrut", - L"MoveItem", // move items + L"Umzug", // move items L"Betriebspersonal", L"Betriebspause", L"Gefangene verhören", // Flugente: interrogate prisoners diff --git a/Utils/_ItalianText.cpp b/Utils/_ItalianText.cpp index 86f21112..7641e81d 100644 --- a/Utils/_ItalianText.cpp +++ b/Utils/_ItalianText.cpp @@ -1643,7 +1643,7 @@ STR16 pAssignmentStrings[] = L"M.Militia", //training moving militia units // TODO.Translate L"Istrutt.", // training a teammate L"Studente", // being trained by someone else - L"MoveItem", // move items // TODO.Translate + L"Move Item", // move items // TODO.Translate L"Staff", // operating a strategic facility // TODO.Translate L"Eat", // eating at a facility (cantina etc.) // TODO.Translate L"Rest", // Resting at a facility // TODO.Translate @@ -1779,7 +1779,7 @@ STR16 pLongAssignmentStrings[] = L"Train Mobiles", // TODO.Translate L"Allena squadra", L"Studente", - L"MoveItem", // move items // TODO.Translate + L"Move Item", // move items // TODO.Translate L"Staff Facility", // TODO.Translate L"Rest at Facility", // TODO.Translate L"Interrogate prisoners", // Flugente: interrogate prisoners TODO.Translate @@ -1904,7 +1904,7 @@ STR16 pAssignMenuStrings[] = L"Veicolo", // the merc is in a vehicle L"Ripara", // the merc is repairing items L"Si esercita", // the merc is training - L"MoveItem", // move items // TODO.Translate + L"Move Item", // move items // TODO.Translate L"Facility", // the merc is using/staffing a facility // TODO.Translate L"Annulla", // cancel this menu }; diff --git a/Utils/_PolishText.cpp b/Utils/_PolishText.cpp index 04740fe5..9f0ba84d 100644 --- a/Utils/_PolishText.cpp +++ b/Utils/_PolishText.cpp @@ -1659,7 +1659,7 @@ STR16 pAssignmentStrings[] = L"R.Samoobr.", //training moving militia units L"Instruk.", // training a teammate L"Uczeń", // being trained by someone else - L"MoveItem", // move items // TODO.Translate + L"Move Item", // move items // TODO.Translate L"Staff", // operating a strategic facility // TODO.Translate L"Eat", // eating at a facility (cantina etc.) // TODO.Translate L"Rest", // Resting at a facility // TODO.Translate @@ -1795,7 +1795,7 @@ STR16 pLongAssignmentStrings[] = L"Train Mobiles", // TODO.Translate L"Trenuj oddział", L"Uczeń", - L"MoveItem", // move items // TODO.Translate + L"Move Item", // move items // TODO.Translate L"Staff Facility", // TODO.Translate L"Rest at Facility", // TODO.Translate L"Interrogate prisoners", // Flugente: interrogate prisoners TODO.Translate @@ -1920,7 +1920,7 @@ STR16 pAssignMenuStrings[] = L"Pojazd", // the merc is in a vehicle L"Naprawa", // the merc is repairing items L"Szkolenie", // the merc is training - L"MoveItem", // move items // TODO.Translate + L"Move Item", // move items // TODO.Translate L"Facility", // the merc is using/staffing a facility // TODO.Translate L"Anuluj", // cancel this menu }; diff --git a/Utils/_RussianText.cpp b/Utils/_RussianText.cpp index c8143ab8..75dbd2dd 100644 --- a/Utils/_RussianText.cpp +++ b/Utils/_RussianText.cpp @@ -1651,7 +1651,7 @@ STR16 pAssignmentStrings[] = L"Мобил.гр.", //training moving militia units //M.Militia L"Тренер", // training a teammate L"Ученик", // being trained by someone else - L"MoveItem", // move items // TODO.Translate + L"Move Item", // move items // TODO.Translate L"Штат", // operating a strategic facility //Staff L"Eat", // eating at a facility (cantina etc.) // TODO.Translate L"Отдых", // Resting at a facility //Rest @@ -1787,7 +1787,7 @@ STR16 pLongAssignmentStrings[] = L"Тренирует мобильную группу", //Train Mobiles L"Тренирует", L"Обучается", - L"MoveItem", // move items // TODO.Translate + L"Move Item", // move items // TODO.Translate L"Работает с населением", //Staff Facility L"Отдыхает в заведении", //Resting at Facility L"Interrogate prisoners", // Flugente: interrogate prisoners TODO.Translate @@ -1912,7 +1912,7 @@ STR16 pAssignMenuStrings[] = L"Машина", // the merc is in a vehicle L"Ремонт", // the merc is repairing items L"Обучение", // the merc is training - L"MoveItem", // move items // TODO.Translate + L"Move Item", // move items // TODO.Translate L"Удобства", // the merc is using/staffing a facility //Facility L"Отмена", // cancel this menu }; diff --git a/Utils/_TaiwaneseText.cpp b/Utils/_TaiwaneseText.cpp index ef07afe2..94650e9d 100644 --- a/Utils/_TaiwaneseText.cpp +++ b/Utils/_TaiwaneseText.cpp @@ -1651,7 +1651,7 @@ STR16 pAssignmentStrings[] = L"M.Militia", //training moving militia units // TODO.Translate L"Trainer", // training a teammate L"Student", // being trained by someone else - L"MoveItem", // move items // TODO.Translate + L"Move Item", // move items // TODO.Translate L"Staff", // operating a strategic facility // TODO.Translate L"Eat", // eating at a facility (cantina etc.) // TODO.Translate L"Rest", // Resting at a facility // TODO.Translate @@ -1787,7 +1787,7 @@ STR16 pLongAssignmentStrings[] = L"Train Mobiles", // TODO.Translate L"Train Teammate", L"Student", - L"MoveItem", // move items // TODO.Translate + L"Move Item", // move items // TODO.Translate L"Staff Facility", // TODO.Translate L"Rest at Facility", // TODO.Translate L"Interrogate prisoners", // Flugente: interrogate prisoners TODO.Translate @@ -1912,7 +1912,7 @@ STR16 pAssignMenuStrings[] = L"Vehicle", // the merc is in a vehicle L"Repair", // the merc is repairing items L"Train", // the merc is training - L"MoveItem", // move items // TODO.Translate + L"Move Item", // move items // TODO.Translate L"Facility", // the merc is using/staffing a facility // TODO.Translate L"Cancel", // cancel this menu };