diff --git a/Editor/Editor Taskbar Utils.cpp b/Editor/Editor Taskbar Utils.cpp index 1b1b3d01..212dbd55 100644 --- a/Editor/Editor Taskbar Utils.cpp +++ b/Editor/Editor Taskbar Utils.cpp @@ -948,6 +948,10 @@ void RenderEditorInfo( ) break; case TASK_MERCS: UpdateMercsInfo(); + #ifdef JA113DEMO + DisableButton (iEditorButton[ MERCS_CIVILIANTOGGLE ]); + DisableButton (iEditorButton[ MERCS_CIVILIAN ]); + #endif break; case TASK_MAPINFO: UpdateMapInfo(); diff --git a/Editor/EditorMercs.cpp b/Editor/EditorMercs.cpp index 3c003f01..0ccfd17d 100644 --- a/Editor/EditorMercs.cpp +++ b/Editor/EditorMercs.cpp @@ -297,19 +297,38 @@ STR16 EditMercAttitudes[6] = { L"Defensive",L"Brave Loner",L"Brave Buddy", #undef RANDOM #endif #define RANDOM -1 +#ifdef JA113DEMO +#define MAX_ENEMYTYPES 5 +#define MAX_CREATURETYPES 1 +#define MAX_REBELTYPES 6 +#define MAX_CIVTYPES 6 +#else #define MAX_ENEMYTYPES 7 //#define MAX_ENEMYRANDOMTYPES 5 #define MAX_CREATURETYPES 8 #define MAX_REBELTYPES 7 -#define MAX_CIVTYPES 18 +#define MAX_CIVTYPES 18 //#define MAX_CIVRANDOMTYPES 11 +#endif + +#ifdef JA113DEMO +INT8 bEnemyArray[MAX_ENEMYTYPES]={ RANDOM, REGMALE, BIGMALE, STOCKYMALE, REGFEMALE }; +INT8 bCreatureArray[MAX_CREATURETYPES]={ ADULTFEMALEMONSTER }; +INT8 bRebelArray[MAX_REBELTYPES]={ RANDOM, MANCIV, REGMALE, BIGMALE, STOCKYMALE, REGFEMALE }; +INT8 bCivArray[MAX_CIVTYPES]={ RANDOM, MANCIV, REGMALE, BIGMALE, STOCKYMALE, REGFEMALE }; +#else INT8 bEnemyArray[MAX_ENEMYTYPES]={ RANDOM, REGMALE, BIGMALE, STOCKYMALE, REGFEMALE, TANK_NW, TANK_NE }; INT8 bCreatureArray[MAX_CREATURETYPES]={ BLOODCAT, LARVAE_MONSTER, INFANT_MONSTER, YAF_MONSTER, YAM_MONSTER, ADULTFEMALEMONSTER, AM_MONSTER, QUEENMONSTER }; INT8 bRebelArray[MAX_REBELTYPES]={ RANDOM, FATCIV, MANCIV, REGMALE, BIGMALE, STOCKYMALE, REGFEMALE }; INT8 bCivArray[MAX_CIVTYPES]={ RANDOM, FATCIV, MANCIV, MINICIV, DRESSCIV, HATKIDCIV, KIDCIV, REGMALE, BIGMALE, STOCKYMALE, REGFEMALE, - HUMVEE, ELDORADO, ICECREAMTRUCK, JEEP, CRIPPLECIV, ROBOTNOWEAPON, COW }; + HUMVEE, ELDORADO, ICECREAMTRUCK, JEEP, CRIPPLECIV, ROBOTNOWEAPON, COW }; +#endif + +#ifdef JA113DEMO +INT8 gbCurrCreature = ADULTFEMALEMONSTER; +#else INT8 gbCurrCreature = BLOODCAT; - +#endif BOOLEAN gfSaveBuffer = FALSE; diff --git a/GameInitOptionsScreen.cpp b/GameInitOptionsScreen.cpp index 46e6e9ac..0760521f 100644 --- a/GameInitOptionsScreen.cpp +++ b/GameInitOptionsScreen.cpp @@ -3957,6 +3957,27 @@ BOOLEAN EnterGIOScreen() break; } } + + #ifdef JA113DEMO + DisableButton (giGIOSquadSizeButton[ 0 ]); + DisableButton (giGIOSquadSizeButton[ 1 ]); + + DisableButton (giGIOIMPNumberButton[ 0 ]); + DisableButton (giGIOIMPNumberButton[ 1 ]); + + DisableButton (giGIOBRSettingButton[ 0 ]); + DisableButton (giGIOBRSettingButton[ 1 ]); + + //DisableButton (guiFastBROptionToggles[ 0 ]); + //DisableButton (guiFastBROptionToggles[ 1 ]); + + //DisableButton (guiWeaponCachesOptionToggles[ 0 ]); + //DisableButton (guiWeaponCachesOptionToggles[ 1 ]); + + //DisableButton (guiTerroristsOptionToggles[ 0 ]); + //DisableButton (guiTerroristsOptionToggles[ 1 ]); + + #endif /////////////////////////////////////////////////////////////////////////////////////////////////////// // NCTH ON/OFF SETTING diff --git a/GameSettings.h b/GameSettings.h index d7f0a5be..bb6b0ef0 100644 --- a/GameSettings.h +++ b/GameSettings.h @@ -5,6 +5,8 @@ #ifdef JA2UB #define GAME_INI_FILE "Ja2_UB.ini" +#elif defined (JA113DEMO) + #define GAME_INI_FILE "Ja2_Demo.ini" #else #define GAME_INI_FILE "Ja2.ini" #endif diff --git a/GameVersion.cpp b/GameVersion.cpp index 1b53bea8..90fe1ca9 100644 --- a/GameVersion.cpp +++ b/GameVersion.cpp @@ -5,35 +5,52 @@ #include "GameVersion.h" #endif - // // Keeps track of the game version // +// ------------------------------ +// MAP EDITOR (Release and Debug) BUILD VERSION +// ------------------------------ #ifdef JA2EDITOR + + #ifdef JA2UB + CHAR16 zVersionLabel[256] = { L"Unfinished Business - Map Editor v1.13.4452 (Development Build)" }; + #else + CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.4452 (Development Build)" }; + #endif -//MAP EDITOR BUILD VERSION -#ifdef JA2UB -CHAR16 zVersionLabel[256] = { L"Unfinished Business v1.5 (15-10-2011) - Map Editor v1.13.4452 (Development Build)" }; -#else -CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.4452 (Development Build)" }; -#endif +// ------------------------------ +// DEBUG BUILD VERSIONS +// ------------------------------ #elif defined JA2BETAVERSION -//BETA/TEST BUILD VERSION -CHAR16 zVersionLabel[256] = { L"Debug v1.13.4820 (Development Build)" }; + //DEBUG BUILD VERSION + #ifdef JA2UB + CHAR16 zVersionLabel[256] = { L"Debug: Unfinished Business - v1.13.4820 (Development Build)" }; + #elif defined (JA113DEMO) || defined (JA113NODEMO) + CHAR16 zVersionLabel[256] = { L"Debug: JA2 Demo - v1.13.4820 (Development Build)" }; + #else + CHAR16 zVersionLabel[256] = { L"Debug: v1.13.4820 (Development Build)" }; + #endif + #elif defined CRIPPLED_VERSION -//RELEASE BUILD VERSION s -CHAR16 zVersionLabel[256] = { L"Beta v. 0.98" }; + //RELEASE BUILD VERSION s + CHAR16 zVersionLabel[256] = { L"Beta v. 0.98" }; +// ------------------------------ +// RELEASE BUILD VERSIONS +// ------------------------------ #else //RELEASE BUILD VERSION #ifdef JA2UB - CHAR16 zVersionLabel[256] = { L"Release Unfinished Business v1.5 (15-10-2011) - v1.13.4462 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Release Unfinished Business - v1.13.4462 (Development Build)" }; + #elif defined (JA113DEMO) || defined (JA113NODEMO) + CHAR16 zVersionLabel[256] = { L"Release JA2 Demo - v1.13.4462 (Development Build)" }; #else - CHAR16 zVersionLabel[256] = { L"Release v1.13.4462 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Release v1.13.4462 (Development Build)" }; #endif #endif @@ -41,5 +58,4 @@ CHAR16 zVersionLabel[256] = { L"Beta v. 0.98" }; CHAR8 czVersionNumber[16] = { "Build 11.12.05" }; //YY.MM.DD CHAR16 zTrackingNumber[16] = { L"Z" }; - // SAVE_GAME_VERSION is defined in header, change it there diff --git a/Laptop/email.cpp b/Laptop/email.cpp index 989aa5b8..c321ccdd 100644 --- a/Laptop/email.cpp +++ b/Laptop/email.cpp @@ -3626,7 +3626,7 @@ BOOLEAN HandleMailSpecialMessages( UINT16 usMessageId, INT32 *iResults, EmailPtr fSpecialCase = TRUE; break; -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //no UB #else case( MERC_INTRO ): @@ -6307,7 +6307,7 @@ BOOLEAN ReplaceMercNameAndAmountWithProperData( CHAR16 *pFinishedString, EmailPt #ifdef JA2BETAVERSION void AddAllEmails() { -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //no UB #else UINT32 uiCnt; diff --git a/Laptop/florist Order Form.cpp b/Laptop/florist Order Form.cpp index 3afb3fab..b77a6478 100644 --- a/Laptop/florist Order Form.cpp +++ b/Laptop/florist Order Form.cpp @@ -652,7 +652,7 @@ void BtnFlowerOrderSendButtonCallback(GUI_BUTTON *btn,INT32 reason) if ( gubCurrentlySelectedFlowerLocation == 7 ) { -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) // no UB #else // sent to meduna! diff --git a/MainMenuScreen.cpp b/MainMenuScreen.cpp index 5cfd787c..32ce4178 100644 --- a/MainMenuScreen.cpp +++ b/MainMenuScreen.cpp @@ -314,6 +314,11 @@ BOOLEAN InitMainMenu( ) //if there are no saved games, disable the button if( !IsThereAnySavedGameFiles() ) DisableButton( iMenuButtons[ LOAD_GAME ] ); + + + #ifdef JA113DEMO + DisableButton( iMenuButtons[ NEW_MP_GAME ] ); + #endif gbHandledMainMenu = 0; fInitialRender = TRUE; @@ -644,8 +649,13 @@ BOOLEAN CreateDestroyMainMenuButtons( BOOLEAN fCreate ) GetMLGFilename( filename, MLG_TITLETEXT ); GetMLGFilename( filenameMP, MLG_TITLETEXT_MP ); +#ifdef JA113DEMO + // Load the "Start Demo" image + iMenuImages[ NEW_GAME ] = LoadButtonImage( filename ,17,17,18,19,-1 ); +#else iMenuImages[ NEW_GAME ] = LoadButtonImage( filename, 0,0, 1, 2 ,-1 ); - +#endif + iMenuImages[ NEW_MP_GAME ] = LoadButtonImage( filenameMP, 0, 0, 1, 2, -1 ); sSlot = 0; diff --git a/Strategic/Auto Resolve.cpp b/Strategic/Auto Resolve.cpp index 96445b38..8dbc0c6b 100644 --- a/Strategic/Auto Resolve.cpp +++ b/Strategic/Auto Resolve.cpp @@ -1991,7 +1991,7 @@ void RenderAutoResolve() SetFactTrue( FACT_FIRST_BATTLE_WON ); } SetTheFirstBattleSector( ( INT16 ) (gpAR->ubSectorX + gpAR->ubSectorY * MAP_WORLD_X ) ); -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //Ja25: no loyalty #else HandleFirstBattleEndingWhileInTown( gpAR->ubSectorX, gpAR->ubSectorY, 0, TRUE ); diff --git a/Strategic/Campaign Init.cpp b/Strategic/Campaign Init.cpp index b7a7767c..a3e01da7 100644 --- a/Strategic/Campaign Init.cpp +++ b/Strategic/Campaign Init.cpp @@ -642,7 +642,7 @@ void InitNewCampaign() //InitKnowFacilitiesFlags( ); BuildUndergroundSectorInfoList(); -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) // no UB #else if (!is_networked) diff --git a/Strategic/Creature Spreading.cpp b/Strategic/Creature Spreading.cpp index 157a1772..f2bd2cea 100644 --- a/Strategic/Creature Spreading.cpp +++ b/Strategic/Creature Spreading.cpp @@ -298,7 +298,7 @@ void InitCreatureQuest() fPlayMeanwhile = TRUE; #endif -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //Ja25 No meanwhiles && no creatures #else if( fPlayMeanwhile && !gfCreatureMeanwhileScenePlayed ) @@ -1561,7 +1561,7 @@ BOOLEAN LoadCreatureDirectives( HWFILE hFile, UINT32 uiSavedGameVersion ) if( gfClearCreatureQuest && giLairID != -1 ) { giLairID = 0; -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) // no UB #else gfCreatureMeanwhileScenePlayed = FALSE; diff --git a/Strategic/Game Event Hook.cpp b/Strategic/Game Event Hook.cpp index b73ba3e0..68ee28c5 100644 --- a/Strategic/Game Event Hook.cpp +++ b/Strategic/Game Event Hook.cpp @@ -221,7 +221,7 @@ BOOLEAN ExecuteStrategicEvent( STRATEGICEVENT *pEvent ) // WANNE: This fixes the bug, that Speck did not sent the email on Day 3, when MERC_WEBSITE_ALL_MERCS_AVAILABLE = TRUE! if ( gGameExternalOptions.fMercDayOne == FALSE /* && gGameExternalOptions.fAllMercsAvailable == FALSE */ ) { - #ifdef JA2UB + #if (defined JA2UB || defined JA113NODEMO) //No JA25 UB #else AddEmail(MERC_INTRO, MERC_INTRO_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin( ), -1, -1 ,TYPE_EMAIL_EMAIL_EDT ); @@ -361,7 +361,7 @@ BOOLEAN ExecuteStrategicEvent( STRATEGICEVENT *pEvent ) // BeginAirRaid( ); // break; -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) // Ja25 No meanwhiles #else case EVENT_MEANWHILE: diff --git a/Strategic/Game Init.cpp b/Strategic/Game Init.cpp index cd2cbc51..5b3ba945 100644 --- a/Strategic/Game Init.cpp +++ b/Strategic/Game Init.cpp @@ -85,6 +85,12 @@ #include "Luaglobal.h" #include "SaveLoadScreen.h" +#ifdef JA113DEMO +#include "Merc Contract.h" +#include "Soldier Add.h" +#include "Map Screen Interface Bottom.h" +#endif + #include "PostalService.h" extern CPostalService gPostalService; @@ -553,7 +559,7 @@ BOOLEAN InitNewGame( BOOLEAN fReset ) AutoSaveToSlot[4] = FALSE; -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //Ja25 no meanwhiles #else // reset meanwhile flags @@ -709,7 +715,7 @@ fFirstTimeInMapScreen = TRUE; InitCustomStrategicLayer ( ); #endif #else - #ifdef JA2UB + #if (defined JA2UB || defined JA113NODEMO) #else INT32 iStartingCash; @@ -779,8 +785,30 @@ fFirstTimeInMapScreen = TRUE; } else { + #ifdef JA113DEMO + + //QuickSetupOfMercProfileItems( 0,4 ); //Vicki + //QuickGameMemberHireMerc( 4 ); + + //QuickSetupOfMercProfileItems( 0,7 ); // Ivan + //QuickGameMemberHireMerc( 7 ); + + //QuickSetupOfMercProfileItems( 0,10 ); // Shadow + //QuickGameMemberHireMerc( 10 ); + + //QuickSetupOfMercProfileItems( 0,33 ); // + //QuickGameMemberHireMerc( 33 ); + + //QuickSetupOfMercProfileItems( 0,42 ); // + //QuickGameMemberHireMerc( 42 ); + + SetLaptopExitScreen( MAP_SCREEN ); + SetPendingNewScreen( MAP_SCREEN ); + + #else SetLaptopExitScreen( INIT_SCREEN ); SetPendingNewScreen(LAPTOP_SCREEN); + #endif } gubScreenCount = 1; @@ -803,6 +831,10 @@ fFirstTimeInMapScreen = TRUE; //Set the fact the game is in progress gTacticalStatus.fHasAGameBeenStarted = TRUE; + + #ifdef JA113DEMO + RequestTriggerExitFromMapscreen( MAP_EXIT_TO_TACTICAL ); + #endif return( TRUE ); } @@ -1012,6 +1044,10 @@ void QuickSetupOfMercProfileItems( UINT32 uiCount, UINT8 ubProfileIndex ) BOOLEAN QuickGameMemberHireMerc( UINT8 ubCurrentSoldier ) { MERC_HIRE_STRUCT HireMercStruct; + + #ifdef JA113DEMO + INT16 sSoldierID=0; + #endif memset(&HireMercStruct, 0, sizeof(MERC_HIRE_STRUCT)); @@ -1024,7 +1060,11 @@ BOOLEAN QuickGameMemberHireMerc( UINT8 ubCurrentSoldier ) HireMercStruct.fCopyProfileItemsOver = TRUE; HireMercStruct.ubInsertionCode = INSERTION_CODE_CHOPPER; + #ifdef JA113DEMO + HireMercStruct.iTotalContractLength = 61; + #else HireMercStruct.iTotalContractLength = 7; + #endif //specify when the merc should arrive HireMercStruct.uiTimeTillMercArrives = 0; @@ -1034,6 +1074,14 @@ BOOLEAN QuickGameMemberHireMerc( UINT8 ubCurrentSoldier ) { return(FALSE); } + + #ifdef JA113DEMO + sSoldierID = GetSoldierIDFromMercID( ubCurrentSoldier ); + if( sSoldierID == -1 ) + return( FALSE ); + Menptr[ sSoldierID ].bTypeOfLastContract = CONTRACT_EXTEND_1_WEEK; + #endif + //add an entry in the finacial page for the hiring of the merc AddTransactionToPlayersBook(HIRED_MERC, ubCurrentSoldier, GetWorldTotalMin(), -(INT32) gMercProfiles[ubCurrentSoldier].uiWeeklySalary ); diff --git a/Strategic/Hourly Update.cpp b/Strategic/Hourly Update.cpp index a34ce89a..f30f5649 100644 --- a/Strategic/Hourly Update.cpp +++ b/Strategic/Hourly Update.cpp @@ -37,7 +37,7 @@ void HourlyLarryUpdate( void ); extern INT32 GetCurrentBalance( void ); extern void PayOffSkyriderDebtIfAny( ); -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //no UB #else void HourlyCheckIfSlayAloneSoHeCanLeave(); @@ -95,7 +95,7 @@ CHAR16 zString[128]; HourlyQuestUpdate(); HourlyLarryUpdate(); -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) // no UB #else HourlyCheckIfSlayAloneSoHeCanLeave(); @@ -440,7 +440,7 @@ void HourlyLarryUpdate( void ) } } -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) // no JA25 UB #else void HourlyCheckIfSlayAloneSoHeCanLeave() diff --git a/Strategic/LuaInitNPCs.cpp b/Strategic/LuaInitNPCs.cpp index 2e64b5aa..0ce744d9 100644 --- a/Strategic/LuaInitNPCs.cpp +++ b/Strategic/LuaInitNPCs.cpp @@ -75,6 +75,8 @@ extern BOOLEAN gfDoneWithSplashScreen; extern UINT32 iStringToUseLua; extern INT8 Test; +static int l_HireMerc (lua_State *L); + //Briefing room static int l_SetEndMission(lua_State *L); static int l_SetStartMission(lua_State *L); @@ -804,6 +806,8 @@ void IniGlobal_1(lua_State *L) void IniFunction(lua_State *L) { + lua_register(L, "HireMerc", l_HireMerc); + //Briefing room lua_register(L, "SetEndMission", l_SetEndMission); lua_register(L, "SetStartMission", l_SetStartMission); @@ -11785,6 +11789,73 @@ static int l_VisibleTown (lua_State *L) //--------------- +static int l_HireMerc (lua_State *L) +{ + MERC_HIRE_STRUCT HireMercStruct; + + INT16 sSoldierID=0; + INT16 iTotalContract = 7; + UINT32 iTimeTillMercArrives = 0; + + UINT8 n = lua_gettop(L); + + int i = 0; + UINT8 ubCurrentSoldier = 0; + + + for (i= 1; i<=n; i++ ) + { + if (i == 1 ) ubCurrentSoldier = lua_tointeger(L,i); + if (i == 2 ) iTotalContract = lua_tointeger(L,i); + if (i == 3 ) iTimeTillMercArrives = lua_tointeger(L,i); + } + + if ( ubCurrentSoldier <= NUM_PROFILES && ubCurrentSoldier != -1 ) + { + memset(&HireMercStruct, 0, sizeof(MERC_HIRE_STRUCT)); + + //HireMercStruct.bMercStatus = MERC_OK; + + HireMercStruct.ubProfileID = ubCurrentSoldier; + + HireMercStruct.sSectorX = gsMercArriveSectorX; + HireMercStruct.sSectorY = gsMercArriveSectorY; + HireMercStruct.fUseLandingZoneForArrival = TRUE; + + HireMercStruct.fCopyProfileItemsOver = TRUE; + HireMercStruct.ubInsertionCode = INSERTION_CODE_CHOPPER; + + HireMercStruct.iTotalContractLength = iTotalContract; + + //specify when the merc should arrive + HireMercStruct.uiTimeTillMercArrives = iTimeTillMercArrives; + + //if we succesfully hired the merc + if( !HireMerc( &HireMercStruct ) ) + { + sSoldierID = GetSoldierIDFromMercID( ubCurrentSoldier ); + if( sSoldierID > -1 ) + Menptr[ sSoldierID ].bTypeOfLastContract = CONTRACT_EXTEND_1_WEEK; + + gMercProfiles[ubCurrentSoldier].bMercStatus = MERC_OK; + + //add an entry in the finacial page for the hiring of the merc + AddTransactionToPlayersBook(HIRED_MERC, ubCurrentSoldier, GetWorldTotalMin(), -(INT32) gMercProfiles[ubCurrentSoldier].uiWeeklySalary ); + + if( gMercProfiles[ ubCurrentSoldier ].bMedicalDeposit ) + { + //add an entry in the finacial page for the medical deposit + AddTransactionToPlayersBook(MEDICAL_DEPOSIT, ubCurrentSoldier, GetWorldTotalMin(), -(gMercProfiles[ubCurrentSoldier].sMedicalDepositAmount) ); + } + + //add an entry in the history page for the hiring of the merc + AddHistoryToPlayersLog( HISTORY_HIRED_MERC_FROM_AIM, ubCurrentSoldier, GetWorldTotalMin(), -1, -1 ); + } + } + + return 0; +} + static int lh_getBooleanFromTable(lua_State *L, const char * fieldname) { lua_getfield(L, -1, fieldname); diff --git a/Strategic/Map Screen Helicopter.cpp b/Strategic/Map Screen Helicopter.cpp index b6d674d4..f035053b 100644 --- a/Strategic/Map Screen Helicopter.cpp +++ b/Strategic/Map Screen Helicopter.cpp @@ -678,7 +678,7 @@ void LandHelicopter( void ) } else { -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) Assert( 0 ); //No meanwhiles #else diff --git a/Strategic/Map Screen Interface Border.cpp b/Strategic/Map Screen Interface Border.cpp index edecaad5..bbbaaa8c 100644 --- a/Strategic/Map Screen Interface Border.cpp +++ b/Strategic/Map Screen Interface Border.cpp @@ -545,6 +545,18 @@ BOOLEAN CreateButtonsForMapBorder( void ) } #endif +#ifdef JA113DEMO + DisableButton( giMapBorderButtons[ MAP_BORDER_TOWN_BTN ]); + DisableButton( giMapBorderButtons[ MAP_BORDER_MINE_BTN ]); + DisableButton( giMapBorderButtons[ MAP_BORDER_TEAMS_BTN ]); + DisableButton( giMapBorderButtons[ MAP_BORDER_MILITIA_BTN ]); + DisableButton( giMapBorderButtons[ MAP_BORDER_AIRSPACE_BTN ]); + DisableButton( giMapBorderButtons[ MAP_BORDER_ITEM_BTN ]); + DisableButton( giMapBorderButtons[ MAP_BORDER_MOBILE_BTN ]); + + fShowTownFlag = FALSE; +#endif + InitializeMapBorderButtonStates( ); return( TRUE ); diff --git a/Strategic/Map Screen Interface Bottom.cpp b/Strategic/Map Screen Interface Bottom.cpp index 18d4f0b0..65599ea3 100644 --- a/Strategic/Map Screen Interface Bottom.cpp +++ b/Strategic/Map Screen Interface Bottom.cpp @@ -380,6 +380,11 @@ void RenderMapScreenInterfaceBottom( BOOLEAN fForceMapscreenFullRender ) EnableDisableBottomButtonsAndRegions( ); fMapBottomDirtied = FALSE; + + #ifdef JA113DEMO + DisableButton (guiMapBottomExitButtons[MAP_EXIT_TO_LAPTOP]); + #endif + return; } @@ -1321,7 +1326,7 @@ BOOLEAN AllowedToTimeCompress( void ) return( FALSE ); } -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //Ja25 no meanwhiles #else // meanwhile coming up @@ -1800,7 +1805,7 @@ BOOLEAN AllowedToExitFromMapscreenTo( INT8 bExitToWhere ) return( FALSE ); } -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //Ja25 No meanwhiles #else // meanwhile coming up diff --git a/Strategic/Map Screen Interface.cpp b/Strategic/Map Screen Interface.cpp index b2fa2c98..8cf41f75 100644 --- a/Strategic/Map Screen Interface.cpp +++ b/Strategic/Map Screen Interface.cpp @@ -5614,12 +5614,11 @@ BOOLEAN HandleTimeCompressWithTeamJackedInAndGearedToGo( void ) FadeInGameScreen( ); SetUpShutDownMapScreenHelpTextScreenMask( ); -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //no ja25 UB #else // Add e-mail message AddEmail(ENRICO_CONGRATS,ENRICO_CONGRATS_LENGTH,MAIL_ENRICO, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT); - #endif return( TRUE ); diff --git a/Strategic/Player Command.cpp b/Strategic/Player Command.cpp index 621f5980..7a2bc0b9 100644 --- a/Strategic/Player Command.cpp +++ b/Strategic/Player Command.cpp @@ -180,7 +180,7 @@ BOOLEAN SetThisSectorAsPlayerControlled( INT16 sMapX, INT16 sMapY, INT8 bMapZ, B INT8 bTownId = 0; UINT8 ubSectorID; -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //Ja25: No meanwhiles #else if( AreInMeanwhile( ) ) @@ -267,7 +267,7 @@ BOOLEAN SetThisSectorAsPlayerControlled( INT16 sMapX, INT16 sMapY, INT8 bMapZ, B { HandleMoraleEvent( NULL, MORALE_TOWN_LIBERATED, sMapX, sMapY, bMapZ ); -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //Ja25: no loyalty #else HandleGlobalLoyaltyEvent( GLOBAL_LOYALTY_GAIN_TOWN_SECTOR, sMapX, sMapY, bMapZ ); @@ -284,7 +284,7 @@ BOOLEAN SetThisSectorAsPlayerControlled( INT16 sMapX, INT16 sMapY, INT8 bMapZ, B if ( GetTotalLeftInMine( GetMineIndexForSector( sMapX, sMapY ) ) > 0) { HandleMoraleEvent( NULL, MORALE_MINE_LIBERATED, sMapX, sMapY, bMapZ ); -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) // Ja25: no loyalty #else HandleGlobalLoyaltyEvent( GLOBAL_LOYALTY_GAIN_MINE, sMapX, sMapY, bMapZ ); @@ -306,7 +306,7 @@ BOOLEAN SetThisSectorAsPlayerControlled( INT16 sMapX, INT16 sMapY, INT8 bMapZ, B } HandleMoraleEvent( NULL, MORALE_SAM_SITE_LIBERATED, sMapX, sMapY, bMapZ ); -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) // Ja25: no loyalty #else HandleGlobalLoyaltyEvent( GLOBAL_LOYALTY_GAIN_SAM, sMapX, sMapY, bMapZ ); @@ -343,7 +343,7 @@ BOOLEAN SetThisSectorAsPlayerControlled( INT16 sMapX, INT16 sMapY, INT8 bMapZ, B if ( bMapZ == 0 && ( ( sMapY == MAP_ROW_M && (sMapX >= 2 && sMapX <= 6) ) || sMapY == MAP_ROW_N && sMapX == 6) ) { -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //Ja25 No meanwhiles #else HandleOutskirtsOfMedunaMeanwhileScene(); diff --git a/Strategic/Queen Command.cpp b/Strategic/Queen Command.cpp index 7af28299..49482c76 100644 --- a/Strategic/Queen Command.cpp +++ b/Strategic/Queen Command.cpp @@ -1982,7 +1982,7 @@ void BeginCaptureSquence( ) void EndCaptureSequence( ) { -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) // no UB #else diff --git a/Strategic/Strategic Event Handler.cpp b/Strategic/Strategic Event Handler.cpp index 71900da5..9cf99a68 100644 --- a/Strategic/Strategic Event Handler.cpp +++ b/Strategic/Strategic Event Handler.cpp @@ -816,7 +816,7 @@ void HandleNPCSystemEvent( UINT32 uiEvent ) break; case NPC_ACTION_SEND_ENRICO_MIGUEL_EMAIL: -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) // no UB #else AddEmail( ENRICO_MIGUEL, ENRICO_MIGUEL_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1 , TYPE_EMAIL_EMAIL_EDT); diff --git a/Strategic/Strategic Movement.cpp b/Strategic/Strategic Movement.cpp index 6473965a..3f930164 100644 --- a/Strategic/Strategic Movement.cpp +++ b/Strategic/Strategic Movement.cpp @@ -1715,7 +1715,7 @@ void GroupArrivedAtSector( UINT8 ubGroupID, BOOLEAN fCheckForBattle, BOOLEAN fNe if( fExceptionQueue || fCheckForBattle && gTacticalStatus.fEnemyInSector && FindMovementGroupInSector( (UINT8)gWorldSectorX, (UINT8)gWorldSectorY, TRUE ) && (pGroup->ubNextX != gWorldSectorX || pGroup->ubNextY != gWorldSectorY || gbWorldSectorZ > 0 ) || - #ifdef JA2UB + #if (defined JA2UB || defined JA113NODEMO) //Ja25: NO meanwhiles #else AreInMeanwhile() || @@ -1729,7 +1729,7 @@ void GroupArrivedAtSector( UINT8 ubGroupID, BOOLEAN fCheckForBattle, BOOLEAN fNe //QUEUE BATTLE! //Delay arrival by a random value ranging from 3-5 minutes, so it doesn't get the player //too suspicious after it happens to him a few times, which, by the way, is a rare occurrence. -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) /*Ja25: No meanwhiles*/ #else if( AreInMeanwhile() ) diff --git a/Strategic/Strategic Status.cpp b/Strategic/Strategic Status.cpp index 3d661bcd..7f7dbfb5 100644 --- a/Strategic/Strategic Status.cpp +++ b/Strategic/Strategic Status.cpp @@ -208,7 +208,7 @@ void HandleEnricoEmail(void) UINT8 ubCurrentProgress = CurrentPlayerProgressPercentage(); UINT8 ubHighestProgress = HighestPlayerProgressPercentage(); -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //JA25 UB #else // if creatures have attacked a mine (doesn't care if they're still there or not at the moment) diff --git a/Strategic/Strategic Town Loyalty.cpp b/Strategic/Strategic Town Loyalty.cpp index 73e2ff25..a0be06d5 100644 --- a/Strategic/Strategic Town Loyalty.cpp +++ b/Strategic/Strategic Town Loyalty.cpp @@ -1840,7 +1840,7 @@ void CheckIfEntireTownHasBeenLiberated( INT8 bTownId, INT16 sSectorX, INT16 sSec // set fact is has been lib'ed and set history event AddHistoryToPlayersLog( HISTORY_LIBERATED_TOWN, bTownId, GetWorldTotalMin(), sSectorX, sSectorY ); -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //Ja25: No meanhwiles #else HandleMeanWhileEventPostingForTownLiberation( bTownId ); @@ -1875,7 +1875,7 @@ void CheckIfEntireTownHasBeenLost( INT8 bTownId, INT16 sSectorX, INT16 sSectorY if ( MilitiaTrainingAllowedInSector( sSectorX, sSectorY, 0 ) && IsTownUnderCompleteControlByEnemy(bTownId) ) { -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //Ja25 No meanwhile #else // the whole town is under enemy control, check if we libed this town before diff --git a/Strategic/mapscreen.cpp b/Strategic/mapscreen.cpp index 297870ad..4206a811 100644 --- a/Strategic/mapscreen.cpp +++ b/Strategic/mapscreen.cpp @@ -5790,7 +5790,7 @@ UINT32 MapScreenHandle(void) RenderKeyRingPopup( FALSE ); } -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) /* UB */ #else CheckForMeanwhileOKStart( ); diff --git a/Strategic/strategicmap.cpp b/Strategic/strategicmap.cpp index 09be06c2..c7f2b570 100644 --- a/Strategic/strategicmap.cpp +++ b/Strategic/strategicmap.cpp @@ -1483,7 +1483,7 @@ void BeginLoadScreen( void ) SetCurrentCursorFromDatabase( VIDEO_NO_CURSOR ); -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) if( guiCurrentScreen == MAP_SCREEN && !(gTacticalStatus.uiFlags & LOADING_SAVED_GAME) ) #else //Ja25: No meanwhiles @@ -1903,7 +1903,7 @@ void GetMapFileName(INT16 sMapX,INT16 sMapY, INT8 bSectorZ, STR8 bString, BOOLEA } } -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) /* Ja25: No meanwhiles */ #else // If we are in a meanwhile... @@ -2386,7 +2386,7 @@ void PrepareLoadedSector() BOOLEAN fEnemyPresenceInThisSector = FALSE; BOOLEAN fAddCivs = TRUE; INT8 bMineIndex = -1; -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //Ja25 No meanwhiles #else if( AreInMeanwhile( ) == FALSE ) @@ -2415,7 +2415,7 @@ void PrepareLoadedSector() if( !(gTacticalStatus.uiFlags & LOADING_SAVED_GAME )) { -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //Ja25 No meanwhiles #else if ( !AreReloadingFromMeanwhile( ) ) @@ -2540,7 +2540,7 @@ void PrepareLoadedSector() { AddProfilesNotUsingProfileInsertionData(); } -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //Ja25 No meanwhiles #else if( !AreInMeanwhile() || GetMeanwhileID() == INTERROGATION ) @@ -2918,7 +2918,7 @@ BOOLEAN EnterSector( INT16 sSectorX, INT16 sSectorY , INT8 bSectorZ ) memset( &(gTacticalStatus.bNumFoughtInBattle), 0, MAXTEAMS ); } -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //Ja25 No meanwhiles #else if( AreInMeanwhile() == FALSE ) diff --git a/Tactical/Dialogue Control.cpp b/Tactical/Dialogue Control.cpp index 19b17dc3..b428bf4e 100644 --- a/Tactical/Dialogue Control.cpp +++ b/Tactical/Dialogue Control.cpp @@ -1508,7 +1508,7 @@ BOOLEAN TacticalCharacterDialogue( SOLDIERTYPE *pSoldier, UINT16 usQuoteNum ) return( FALSE ); } -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //Ja25 no meanwhiles #else if ( AreInMeanwhile( ) ) diff --git a/Tactical/End Game.cpp b/Tactical/End Game.cpp index 77c55296..7d8ff529 100644 --- a/Tactical/End Game.cpp +++ b/Tactical/End Game.cpp @@ -407,7 +407,7 @@ void DoneFadeOutEndCinematic( void ) // OK, end death UI - fade to smaker.... void HandleDoneLastEndGameQuote( ) { -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //Ja25 No queen #else EndQueenDeathEndgame( ); @@ -421,7 +421,7 @@ EndQueenDeathEndgame( ); void QueenBitchTimerCallback( void ) { -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //no Ub #else HandleQueenBitchDeath( gpKillerSoldier, gsGridNo, gbLevel ); @@ -501,7 +501,9 @@ void HandleAddingTheEndGameEmails() // Determine the EMAIL to be sent out to the player // - + #ifdef JA113DEMO + //no demo + #else // email # 12a - Miguel dead, Manuel never recruited if( !fMiguelAlive && !fManuelHired ) { @@ -542,6 +544,7 @@ void HandleAddingTheEndGameEmails() { Assert( 0 ); } + #endif } diff --git a/Tactical/Faces.cpp b/Tactical/Faces.cpp index 9d2a80a3..8f747d03 100644 --- a/Tactical/Faces.cpp +++ b/Tactical/Faces.cpp @@ -2993,7 +2993,7 @@ BOOLEAN SetFaceTalking( INT32 iFaceIndex, CHAR8 *zSoundFile, STR16 zTextString, pFace->fAnimatingTalking = TRUE; pFace->fFinishTalking = FALSE; -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //Ja25: No Meanwhiles #else if ( !AreInMeanwhile( ) ) diff --git a/Tactical/Interface Dialogue.cpp b/Tactical/Interface Dialogue.cpp index 690d3f7d..089606af 100644 --- a/Tactical/Interface Dialogue.cpp +++ b/Tactical/Interface Dialogue.cpp @@ -4098,7 +4098,7 @@ void HandleNPCDoAction( UINT8 ubTargetNPC, UINT16 usActionCode, UINT8 ubQuoteNum { // This is not the end, 'cause momma creature is still alive TriggerNPCRecordImmediately( 136, 8 ); -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //no Ub #else EndQueenDeathEndgame( ); @@ -4109,7 +4109,7 @@ void HandleNPCDoAction( UINT8 ubTargetNPC, UINT16 usActionCode, UINT8 ubQuoteNum { // Continue with endgame cimematic.. DeleteTalkingMenu( ); -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //no Ub #else EndQueenDeathEndgameBeginEndCimenatic( ); @@ -4121,7 +4121,7 @@ void HandleNPCDoAction( UINT8 ubTargetNPC, UINT16 usActionCode, UINT8 ubQuoteNum // Just end queen killed dequence....... DeleteTalkingMenu( ); -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) // no UB #else EndQueenDeathEndgame( ); diff --git a/Tactical/Merc Entering.cpp b/Tactical/Merc Entering.cpp index 1b667383..5ce9060a 100644 --- a/Tactical/Merc Entering.cpp +++ b/Tactical/Merc Entering.cpp @@ -476,7 +476,63 @@ void HandleHeliDrop( ) { guiPendingOverrideEvent = LU_BEGINUILOCK; } +#ifdef JA113DEMO + //if ( _KeyDown( ESC ) ) + //{ + // Loop through all mercs not yet placed + for ( cnt = gbCurDrop; cnt < gbNumHeliSeatsOccupied; cnt++ ) + { + // Add merc to sector + #ifdef JA2UB + //MercPtrs[ gusHeliSeats[ cnt ] ]->ubStrategicInsertionCode = INSERTION_CODE_NORTH; + MercPtrs[ gusHeliSeats[ cnt ] ]->ubStrategicInsertionCode = INSERTION_CODE_GRIDNO; + MercPtrs[ gusHeliSeats[ cnt ] ]->usStrategicInsertionData = gGameUBOptions.LOCATEGRIDNO; + #else + //MercPtrs[ gusHeliSeats[ cnt ] ]->ubStrategicInsertionCode = INSERTION_CODE_NORTH; + MercPtrs[ gusHeliSeats[ cnt ] ]->ubStrategicInsertionCode = INSERTION_CODE_GRIDNO; + MercPtrs[ gusHeliSeats[ cnt ] ]->usStrategicInsertionData = gGameExternalOptions.iInitialMercArrivalLocation; + #endif + // HEADROCK HAM 3.5: Externalized! + UpdateMercInSector( MercPtrs[ gusHeliSeats[ cnt ] ], gGameExternalOptions.ubDefaultArrivalSectorX, gGameExternalOptions.ubDefaultArrivalSectorY, startingZ ); + // Check for merc arrives quotes... + HandleMercArrivesQuotes( MercPtrs[ gusHeliSeats[ cnt ] ] ); + + ScreenMsg( FONT_MCOLOR_WHITE, MSG_INTERFACE, TacticalStr[ MERC_HAS_ARRIVED_STR ], MercPtrs[ gusHeliSeats[ cnt ] ]->name ); + + } + + // Remove heli + DeleteAniTile( gpHeli ); + + RebuildCurrentSquad( ); + + // Remove sound + if( uiSoundSample!=NO_SAMPLE ) + { + SoundStop( uiSoundSample ); + } + + gfHandleHeli = FALSE; + gfIgnoreScrolling = FALSE; + gbNumHeliSeatsOccupied = 0; + UnLockPauseState(); + UnPauseGame(); + + + // Select our first guy + SelectSoldier( gusHeliSeats[ 0 ], FALSE, TRUE ); + + //guiCurrentEvent = LU_ENDUILOCK; + //gCurrentUIMode = LOCKUI_MODE; + guiPendingOverrideEvent = LU_ENDUILOCK; + //UIHandleLUIEndLock( NULL ); + + HandleFirstHeliDropOfGame( ); + return; + + //} +#else if ( _KeyDown( ESC ) ) { // Loop through all mercs not yet placed @@ -532,7 +588,7 @@ void HandleHeliDrop( ) return; } - +#endif gfIgnoreScrolling = TRUE; uiClock = GetJA2Clock( ); diff --git a/Tactical/Overhead.cpp b/Tactical/Overhead.cpp index 28ed5c55..cbcc757e 100644 --- a/Tactical/Overhead.cpp +++ b/Tactical/Overhead.cpp @@ -6231,7 +6231,7 @@ void SetEnemyPresence( ) // If we are just starting game, don't do this! -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //Ja25: no meanwhiles if ( !DidGameJustStart() ) #else @@ -6760,7 +6760,7 @@ BOOLEAN CheckForEndOfBattle( BOOLEAN fAnEnemyRetreated ) SetFactTrue( FACT_FIRST_BATTLE_FOUGHT ); SetFactFalse( FACT_FIRST_BATTLE_BEING_FOUGHT ); SetTheFirstBattleSector( (INT16) (gWorldSectorX + gWorldSectorY * MAP_WORLD_X) ); -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //Ja25 no meanwhile #else HandleFirstBattleEndingWhileInTown( gWorldSectorX, gWorldSectorY, gbWorldSectorZ, FALSE ); @@ -7018,7 +7018,7 @@ BOOLEAN CheckForEndOfBattle( BOOLEAN fAnEnemyRetreated ) SetFactTrue( FACT_FIRST_BATTLE_WON ); SetFactFalse( FACT_FIRST_BATTLE_BEING_FOUGHT ); SetTheFirstBattleSector( (INT16) (gWorldSectorX + gWorldSectorY * MAP_WORLD_X) ); -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //Ja25 no meanwhile #else HandleFirstBattleEndingWhileInTown( gWorldSectorX, gWorldSectorY, gbWorldSectorZ, FALSE ); @@ -8596,7 +8596,7 @@ SOLDIERTYPE *InternalReduceAttackBusyCount( ) // Go into combat! // If we are in a meanwhile... don't enter combat here... -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //Ja25 no meanwhiles #else if ( !AreInMeanwhile( ) ) diff --git a/Tactical/Soldier Add.cpp b/Tactical/Soldier Add.cpp index d8088475..8a028e11 100644 --- a/Tactical/Soldier Add.cpp +++ b/Tactical/Soldier Add.cpp @@ -1100,7 +1100,7 @@ BOOLEAN InternalAddSoldierToSector( UINT8 ubID, BOOLEAN fCalculateDirection, BOO if ( pSoldier->bActive ) { -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //Ja25 No meanwhiles in exp #else // ATE: Make sure life of elliot is OK if from a meanwhile diff --git a/Tactical/Soldier Ani.cpp b/Tactical/Soldier Ani.cpp index aa968ed3..696066e9 100644 --- a/Tactical/Soldier Ani.cpp +++ b/Tactical/Soldier Ani.cpp @@ -1254,7 +1254,7 @@ BOOLEAN AdjustToNextAnimationFrame( SOLDIERTYPE *pSoldier ) } else { -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //Ja25 No meanwhiles if ( fMartialArtist ) #else @@ -3711,7 +3711,7 @@ void CheckForAndHandleSoldierIncompacitated( SOLDIERTYPE *pSoldier ) } // OK, if we are in a meanwhile and this is elliot... -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //ja25: No queen #else if ( AreInMeanwhile( ) ) @@ -3735,7 +3735,7 @@ void CheckForAndHandleSoldierIncompacitated( SOLDIERTYPE *pSoldier ) // If guy is now dead, play sound! if ( pSoldier->stats.bLife == 0 ) { -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //Ja25 No meanwhiles #else if ( !AreInMeanwhile() ) diff --git a/Tactical/Soldier Control.cpp b/Tactical/Soldier Control.cpp index 44a41b3d..ce9cebf1 100644 --- a/Tactical/Soldier Control.cpp +++ b/Tactical/Soldier Control.cpp @@ -5538,7 +5538,7 @@ void SOLDIERTYPE::EVENT_SoldierGotHit( UINT16 usWeaponIndex, INT16 sDamage, INT1 } //////////////////////////////////////////////////////////////////////////// sDamage = sDamage / PUNCH_REAL_DAMAGE_PORTION; -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //Ja25: No meanwhiles #else if ( AreInMeanwhile() && gCurrentMeanwhileDef.ubMeanwhileID == INTERROGATION ) @@ -8845,7 +8845,7 @@ void SOLDIERTYPE::BeginSoldierGetup( void ) { return; } -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //Ja25: No meanwhiles #else // ATE: Don't getup if we are in a meanwhile @@ -9092,7 +9092,7 @@ UINT8 SOLDIERTYPE::SoldierTakeDamage( INT8 bHeight, INT16 sLifeDeduct, INT16 sBr // Turn off this->flags.uiStatusFlags &= ( ~SOLDIER_NPC_SHOOTING ); } -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //Ja25: No meanwhiles #else // CJC: make sure Elliot doesn't bleed to death! @@ -11373,7 +11373,7 @@ void SOLDIERTYPE::EVENT_SoldierBeginPunchAttack( INT32 sGridNo, UINT8 ubDirectio } //Ja25 No meanwhiles -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) if ( fMartialArtist && !Item[usItem].crowbar && this->ubBodyType == REGMALE) #else if ( fMartialArtist && !AreInMeanwhile( ) && !Item[usItem].crowbar && this->ubBodyType == REGMALE ) // SANDRO - added check for body type diff --git a/Tactical/Soldier Init List.cpp b/Tactical/Soldier Init List.cpp index 94e24815..c3e45dd3 100644 --- a/Tactical/Soldier Init List.cpp +++ b/Tactical/Soldier Init List.cpp @@ -707,7 +707,7 @@ BOOLEAN AddPlacementToWorld( SOLDIERINITNODE *curr, GROUP *pGroup = NULL ) } } } -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //Ja25: no queen #else else if ( !gfInMeanwhile && gWorldSectorX == 3 && gWorldSectorY == 16 && !gbWorldSectorZ ) diff --git a/Tactical/Squads.cpp b/Tactical/Squads.cpp index bb755ec0..c5aa2e75 100644 --- a/Tactical/Squads.cpp +++ b/Tactical/Squads.cpp @@ -252,6 +252,7 @@ BOOLEAN AddCharacterToSquad( SOLDIERTYPE *pCharacter, INT8 bSquadValue ) { return ( FALSE ); } + // remove them RemoveCharacterFromSquads( pCharacter ); diff --git a/Tactical/Tactical Save.cpp b/Tactical/Tactical Save.cpp index 9c6a04d6..1338dd86 100644 --- a/Tactical/Tactical Save.cpp +++ b/Tactical/Tactical Save.cpp @@ -931,7 +931,7 @@ BOOLEAN SaveCurrentSectorsInformationToTempItemFile( ) gfWasInMeanwhile = FALSE; return TRUE; } -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //Ja25v No meanwhiles #else else if( AreInMeanwhile() ) @@ -1040,7 +1040,7 @@ BOOLEAN SaveCurrentSectorsInformationToTempItemFile( ) EnableModifiedFileSetCache(cacheResetValue); -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //Ja25 no meanwhile #else if( fShouldBeInMeanwhile ) @@ -1202,7 +1202,7 @@ BOOLEAN LoadCurrentSectorsInformationFromTempItemsFile() // // Load in the sectors ITems // -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //Ja25v no meanwhiles #else if( AreInMeanwhile() ) diff --git a/Tactical/TeamTurns.cpp b/Tactical/TeamTurns.cpp index d1a831fd..0b97dc43 100644 --- a/Tactical/TeamTurns.cpp +++ b/Tactical/TeamTurns.cpp @@ -713,7 +713,7 @@ void DisplayHiddenTurnbased( SOLDIERTYPE * pActingSoldier ) // This code should put the game in turn-based and give control to the AI-controlled soldier // whose pointer has been passed in as an argument (we were in non-combat and the AI is doing // something visible, i.e. making an attack) -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //Ja25 No meanwhiles #else if ( AreInMeanwhile( ) ) diff --git a/Tactical/Turn Based Input.cpp b/Tactical/Turn Based Input.cpp index c0554e22..dc993c40 100644 --- a/Tactical/Turn Based Input.cpp +++ b/Tactical/Turn Based Input.cpp @@ -1558,7 +1558,7 @@ void GetKeyboardInput( UINT32 *puiNewEvent ) HandleShortCutExitState( ); //*puiNewEvent = I_EXIT; } -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //Ja25 No meanwhiles #else if ((InputEvent.usEvent == KEY_UP )&& ( InputEvent.usParam == ESC) ) diff --git a/Tactical/Weapons.cpp b/Tactical/Weapons.cpp index e9752bbb..b98e918c 100644 --- a/Tactical/Weapons.cpp +++ b/Tactical/Weapons.cpp @@ -3507,7 +3507,7 @@ BOOLEAN UseHandToHand( SOLDIERTYPE *pSoldier, INT32 sTargetGridNo, BOOLEAN fStea } } // WDS 07/19/2008 - Random number use fix -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //Ja25 no meanwhiles if ( iDiceRoll < iHitChance ) #else diff --git a/Tactical/opplist.cpp b/Tactical/opplist.cpp index 64d80258..633d269a 100644 --- a/Tactical/opplist.cpp +++ b/Tactical/opplist.cpp @@ -3358,7 +3358,7 @@ void SaySeenQuote( SOLDIERTYPE *pSoldier, BOOLEAN fSeenCreature, BOOLEAN fVirgin UINT8 ubNumEnemies = 0; UINT8 ubNumAllies = 0; UINT32 cnt; -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //Ja25 No meanwhiles #else if ( AreInMeanwhile( ) ) @@ -6599,7 +6599,7 @@ void TellPlayerAboutNoise( SOLDIERTYPE *pSoldier, UINT8 ubNoiseMaker, INT32 sGri // if the quote was faint, say something if (ubVolumeIndex == 0) { -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //Ja25 No meanwhiles #else if ( !AreInMeanwhile( ) && !( gTacticalStatus.uiFlags & ENGAGED_IN_CONV) && pSoldier->ubTurnsUntilCanSayHeardNoise == 0) diff --git a/TileEngine/Radar Screen.cpp b/TileEngine/Radar Screen.cpp index e799ee93..19e1fa48 100644 --- a/TileEngine/Radar Screen.cpp +++ b/TileEngine/Radar Screen.cpp @@ -368,7 +368,7 @@ void RenderRadarScreen( ) RenderSquadList( ); return; } -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //JA25 No meanwhiles #else if( AreInMeanwhile( ) == TRUE ) diff --git a/TileEngine/worlddef.cpp b/TileEngine/worlddef.cpp index b5d81b0b..c162968d 100644 --- a/TileEngine/worlddef.cpp +++ b/TileEngine/worlddef.cpp @@ -3342,7 +3342,7 @@ void TrashWorld( void ) //Remove the schedules DestroyAllSchedules(); -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) //Ja25 no meanwhiles #else // on trash world sheck if we have to set up the first meanwhile diff --git a/builddefines.h b/builddefines.h index a5685dc7..efcc4b8a 100644 --- a/builddefines.h +++ b/builddefines.h @@ -3,7 +3,6 @@ #include "Language Defines.h" - // ----------------------------- // ***************************** // WANNE: Enable those 2 defines, if you want to build UB-Version!! @@ -17,22 +16,44 @@ // ----------------------------- +// ----------------------------- +// ***************************** +// WANNE: With these defines we can build JA2 DEMO version that runs with 1.13 +// The 2 UB defines (JA2UB and JA2UBMAPS) have to be disabled in order to build a demo executable + +// There are different combinations of the 2 defines + +// 1.) Both defines are enabled: Build demo v1.13, which uses the slf files from orginal JA2 demo +// #define JA113DEMO +// #define JA113NODEMO + +// 2.) !!!! Only JA113DEMO define enabled: Build demo v1.13, which uses the ja2 original files. This is the prefered way of building the 1.13 demo !!!! +// #define JA113DEMO +// // #define JA113NODEMO + +// 3.) Only JA113NODEMO define enabled: This build a "normal" 1.13 version, with a little influence of a UB version (disable all meanwhiles, emails, no quest with queen, alien queen) +// This version can be used for modders to have a "blank" 1.13 version with no special quests. +// // #define JA113DEMO +// #define JA113NODEMO + + +// WANNE: If both defines are disabled, we just build "normal" 1.13 or "unfinished business" 1.13 (when JA2UB and JA2UBMAPS enabled) version! +//#define JA113DEMO +//#define JA113NODEMO + +// ***************************** +// ----------------------------- + // Map Editor version - you should use the MapEditor configuration instead of messing with these defines (ChrisL) //#define JA2BETAVERSION //#define JA2EDITOR - // Normal test version //#define JA2TESTVERSION - //#define SGP_DEBUG - //#define DEBUG_ATTACKBUSY - //#define DEBUGDECISIONS - #define ROBOT_ALWAYS_READY - #define FORCE_ASSERTS_ON //#ifdef _DEBUG diff --git a/gamescreen.cpp b/gamescreen.cpp index 81b82751..504f96c7 100644 --- a/gamescreen.cpp +++ b/gamescreen.cpp @@ -340,7 +340,7 @@ void EnterTacticalScreen( ) DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("EnterTacticalScreen: check meanwhile")); -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) /* Ja25 No meanwhiles */ #else // Locate if in meanwhile... @@ -952,7 +952,7 @@ UINT32 MainGameScreenHandle(void) //UB -#ifdef JA2UB +#if (defined JA2UB || defined JA113NODEMO) /* JA2UB */ #else CheckForMeanwhileOKStart( );