mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
58c134bd8e |
@@ -77,7 +77,7 @@ jobs:
|
|||||||
arch: x86
|
arch: x86
|
||||||
- name: Prepare build
|
- name: Prepare build
|
||||||
run: |
|
run: |
|
||||||
cmake -S . -B build -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLanguages="$Env:JA2Language" -DApplications="$Env:JA2Application"
|
cmake -S . -B build -GNinja -DCMAKE_BUILD_TYPE=Release -DLanguages="$Env:JA2Language" -DApplications="$Env:JA2Application"
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
cmake --build build/ -- -v
|
cmake --build build/ -- -v
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
#include "Font Control.h"
|
#include "Font Control.h"
|
||||||
#include "Cursors.h"
|
#include "Cursors.h"
|
||||||
#include "Font.h"
|
#include "Font.h"
|
||||||
|
#include "WordWrap.h"
|
||||||
#include "sysutil.h"
|
#include "sysutil.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "english.h"
|
#include "english.h"
|
||||||
|
|||||||
+37
-24
@@ -1,27 +1,40 @@
|
|||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "FeaturesScreen.h"
|
#include "FeaturesScreen.h"
|
||||||
#include "video.h"
|
#include "video.h"
|
||||||
#include "Font Control.h"
|
#include "Font Control.h"
|
||||||
#include "Game Clock.h"
|
#include "Game Clock.h"
|
||||||
#include "Text Input.h"
|
#include "Text Input.h"
|
||||||
#include "WordWrap.h"
|
#include "WordWrap.h"
|
||||||
#include "SaveLoadScreen.h"
|
#include "SaveLoadScreen.h"
|
||||||
#include "Render Dirty.h"
|
#include "Render Dirty.h"
|
||||||
#include "WCheck.h"
|
#include "WordWrap.h"
|
||||||
#include "Utilities.h"
|
#include "WCheck.h"
|
||||||
#include "Sound Control.h"
|
#include "Utilities.h"
|
||||||
#include "Ambient Control.h"
|
#include "DEBUG.H"
|
||||||
#include "GameSettings.h"
|
#include "Sound Control.h"
|
||||||
#include "Game Init.h"
|
#include "Ambient Control.h"
|
||||||
#include "english.h"
|
#include "WorldDat.h"
|
||||||
#include "Cursors.h"
|
#include "worlddef.h"
|
||||||
#include "sysutil.h"
|
#include "GameSettings.h"
|
||||||
#include "Text.h"
|
#include "Game Init.h"
|
||||||
#include "Interface Control.h"
|
#include "english.h"
|
||||||
#include "message.h"
|
#include "Overhead.h"
|
||||||
#include "Multi Language Graphic Utils.h"
|
#include "GAP.H"
|
||||||
#include "connect.h"
|
#include "Cursors.h"
|
||||||
#include "mainmenuscreen.h"
|
#include "sysutil.h"
|
||||||
|
#include "Exit Grids.h"
|
||||||
|
#include "Text.h"
|
||||||
|
#include "Interface Control.h"
|
||||||
|
#include "message.h"
|
||||||
|
#include "Multi Language Graphic Utils.h"
|
||||||
|
#include "Map Information.h"
|
||||||
|
#include "Sys Globals.h"
|
||||||
|
#include "insurance.h"
|
||||||
|
|
||||||
|
#include "connect.h"
|
||||||
|
#include "worldman.h"
|
||||||
|
#include "Init.h"
|
||||||
|
#include "Game Events.h"
|
||||||
|
|
||||||
extern UINT32 guiDoneButton; // symbol already declared globally in AimArchives.cpp (jonathanl)
|
extern UINT32 guiDoneButton; // symbol already declared globally in AimArchives.cpp (jonathanl)
|
||||||
|
|
||||||
|
|||||||
@@ -1,30 +1,38 @@
|
|||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "GameInitOptionsScreen.h"
|
#include "GameInitOptionsScreen.h"
|
||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#include "Utilities.h"
|
#include "Utilities.h"
|
||||||
#include "WCheck.h"
|
#include "WCheck.h"
|
||||||
#include "Font Control.h"
|
#include "Font Control.h"
|
||||||
#include "WordWrap.h"
|
#include "WordWrap.h"
|
||||||
#include "Render Dirty.h"
|
#include "Render Dirty.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "Options Screen.h"
|
#include "Options Screen.h"
|
||||||
#include "english.h"
|
#include "english.h"
|
||||||
#include "sysutil.h"
|
#include "sysutil.h"
|
||||||
#include "Fade Screen.h"
|
#include "Fade Screen.h"
|
||||||
#include "Cursor Control.h"
|
#include "Cursor Control.h"
|
||||||
#include "Music Control.h"
|
#include "Music Control.h"
|
||||||
#include "Cursors.h"
|
#include "Cursors.h"
|
||||||
#include "Intro.h"
|
#include "Intro.h"
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
#include "_Ja25EnglishText.h"
|
#include "_Ja25EnglishText.h"
|
||||||
#include "Soldier Profile.h"
|
#include "Soldier Profile.h"
|
||||||
#include "SaveLoadScreen.h"
|
|
||||||
#include <vfs/Core/vfs.h>
|
|
||||||
#include <vfs/Tools/vfs_property_container.h>
|
|
||||||
|
|
||||||
|
#include "gameloop.h"
|
||||||
|
#include "connect.h"
|
||||||
|
#include "SaveLoadScreen.h"
|
||||||
|
|
||||||
|
#ifdef JA2UB
|
||||||
|
#include "ub_config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <vfs/Core/vfs.h>
|
||||||
|
#include <vfs/Core/vfs_init.h>
|
||||||
|
#include <vfs/Tools/vfs_property_container.h>
|
||||||
|
#include <vfs/Core/vfs_os_functions.h>
|
||||||
|
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
#include "ub_config.h"
|
|
||||||
|
|
||||||
// *********************************
|
// *********************************
|
||||||
// Unfinished Business: Initial Game Screen
|
// Unfinished Business: Initial Game Screen
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
#include "HelpScreen.h"
|
#include "HelpScreen.h"
|
||||||
#include "INIReader.h"
|
#include "INIReader.h"
|
||||||
#include "Shade Table Util.h"
|
#include "Shade Table Util.h"
|
||||||
|
#include "soldier profile type.h"
|
||||||
#include "random.h"
|
#include "random.h"
|
||||||
#include "SaveLoadGame.h"
|
#include "SaveLoadGame.h"
|
||||||
#include "sgp.h"
|
#include "sgp.h"
|
||||||
@@ -35,6 +36,7 @@
|
|||||||
#include "connect.h"
|
#include "connect.h"
|
||||||
#include "sgp_logger.h"
|
#include "sgp_logger.h"
|
||||||
|
|
||||||
|
#include "Map Information.h"
|
||||||
|
|
||||||
#include "GameInitOptionsScreen.h"
|
#include "GameInitOptionsScreen.h"
|
||||||
|
|
||||||
@@ -154,7 +156,7 @@ BOOLEAN UsingInventoryCostsAPSystem()
|
|||||||
return ( gGameExternalOptions.fInventoryCostsAP );
|
return ( gGameExternalOptions.fInventoryCostsAP );
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::string StringToLower(std::string strToConvert)
|
std::string StringToLower(std::string strToConvert)
|
||||||
{//change each element of the string to lower case
|
{//change each element of the string to lower case
|
||||||
for(unsigned int i=0;i<strToConvert.length();i++)
|
for(unsigned int i=0;i<strToConvert.length();i++)
|
||||||
{
|
{
|
||||||
@@ -183,7 +185,7 @@ BOOLEAN IsNIVModeValid(bool checkRes)
|
|||||||
return isValid;
|
return isValid;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void UpdateFeatureFlags()
|
void UpdateFeatureFlags()
|
||||||
{
|
{
|
||||||
// do we need to override some ini settings?
|
// do we need to override some ini settings?
|
||||||
if (gGameSettings.fFeatures[FF_FEATURES_SCREEN])
|
if (gGameSettings.fFeatures[FF_FEATURES_SCREEN])
|
||||||
@@ -332,7 +334,6 @@ BOOLEAN LoadGameSettings()
|
|||||||
|
|
||||||
gGameSettings.fOptions[TOPTION_ALT_START_AIM] = iniReader.ReadBoolean("JA2 Game Settings", "TOPTION_ALT_START_AIM" , TRUE); // Start at max aiming level instead of default no aiming
|
gGameSettings.fOptions[TOPTION_ALT_START_AIM] = iniReader.ReadBoolean("JA2 Game Settings", "TOPTION_ALT_START_AIM" , TRUE); // Start at max aiming level instead of default no aiming
|
||||||
gGameSettings.fOptions[TOPTION_ALT_PATHFINDING] = iniReader.ReadBoolean("JA2 Game Settings", "TOPTION_ALT_PATHFINDING" , FALSE); // A* pathfinding
|
gGameSettings.fOptions[TOPTION_ALT_PATHFINDING] = iniReader.ReadBoolean("JA2 Game Settings", "TOPTION_ALT_PATHFINDING" , FALSE); // A* pathfinding
|
||||||
gGameSettings.fOptions[TOPTION_USE_LEGACY_TACTICALAI] = iniReader.ReadBoolean("JA2 Game Settings", "TOPTION_USE_LEGACY_TACTICALAI", FALSE); // A* pathfinding
|
|
||||||
gGameSettings.fOptions[TOPTION_MERCENARY_FORMATIONS] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_MERCENARY_FORMATIONS" , FALSE ); // Flugente: mercenary formations
|
gGameSettings.fOptions[TOPTION_MERCENARY_FORMATIONS] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_MERCENARY_FORMATIONS" , FALSE ); // Flugente: mercenary formations
|
||||||
gGameSettings.fOptions[TOPTION_SHOW_ENEMY_LOCATION] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_SHOW_ENEMY_LOCATION" , FALSE); // sevenfm: show locations of known enemies
|
gGameSettings.fOptions[TOPTION_SHOW_ENEMY_LOCATION] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_SHOW_ENEMY_LOCATION" , FALSE); // sevenfm: show locations of known enemies
|
||||||
gGameSettings.fOptions[TOPTION_REPORT_MISS_MARGIN] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_REPORT_MISS_MARGIN" , FALSE ); // HEADROCK HAM 4: Shot offset report
|
gGameSettings.fOptions[TOPTION_REPORT_MISS_MARGIN] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_REPORT_MISS_MARGIN" , FALSE ); // HEADROCK HAM 4: Shot offset report
|
||||||
@@ -617,7 +618,6 @@ BOOLEAN SaveGameSettings()
|
|||||||
settings << "TOPTION_SHOW_ENEMY_LOCATION = " << (gGameSettings.fOptions[TOPTION_SHOW_ENEMY_LOCATION] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_SHOW_ENEMY_LOCATION = " << (gGameSettings.fOptions[TOPTION_SHOW_ENEMY_LOCATION] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_ALT_START_AIM = " << (gGameSettings.fOptions[TOPTION_ALT_START_AIM] ? "TRUE" : "FALSE") << endl;
|
settings << "TOPTION_ALT_START_AIM = " << (gGameSettings.fOptions[TOPTION_ALT_START_AIM] ? "TRUE" : "FALSE") << endl;
|
||||||
settings << "TOPTION_ALT_PATHFINDING = " << (gGameSettings.fOptions[TOPTION_ALT_PATHFINDING] ? "TRUE" : "FALSE") << endl;
|
settings << "TOPTION_ALT_PATHFINDING = " << (gGameSettings.fOptions[TOPTION_ALT_PATHFINDING] ? "TRUE" : "FALSE") << endl;
|
||||||
settings << "TOPTION_USE_LEGACY_TACTICALAI = " << (gGameSettings.fOptions[TOPTION_USE_LEGACY_TACTICALAI] ? "TRUE" : "FALSE") << endl;
|
|
||||||
|
|
||||||
settings << "TOPTION_CHEAT_MODE_OPTIONS_HEADER = " << (gGameSettings.fOptions[TOPTION_CHEAT_MODE_OPTIONS_HEADER] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_CHEAT_MODE_OPTIONS_HEADER = " << (gGameSettings.fOptions[TOPTION_CHEAT_MODE_OPTIONS_HEADER] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_FORCE_BOBBY_RAY_SHIPMENTS = " << (gGameSettings.fOptions[TOPTION_FORCE_BOBBY_RAY_SHIPMENTS] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_FORCE_BOBBY_RAY_SHIPMENTS = " << (gGameSettings.fOptions[TOPTION_FORCE_BOBBY_RAY_SHIPMENTS] ? "TRUE" : "FALSE" ) << endl;
|
||||||
@@ -848,7 +848,6 @@ void InitGameSettings()
|
|||||||
gGameSettings.fOptions[TOPTION_SHOW_ENEMY_LOCATION] = FALSE; // sevenfm: show locations of known enemies
|
gGameSettings.fOptions[TOPTION_SHOW_ENEMY_LOCATION] = FALSE; // sevenfm: show locations of known enemies
|
||||||
gGameSettings.fOptions[TOPTION_ALT_START_AIM] = TRUE;
|
gGameSettings.fOptions[TOPTION_ALT_START_AIM] = TRUE;
|
||||||
gGameSettings.fOptions[TOPTION_ALT_PATHFINDING] = FALSE;
|
gGameSettings.fOptions[TOPTION_ALT_PATHFINDING] = FALSE;
|
||||||
gGameSettings.fOptions[TOPTION_USE_LEGACY_TACTICALAI] = FALSE;
|
|
||||||
|
|
||||||
// arynn: Cheat/Debug Menu
|
// arynn: Cheat/Debug Menu
|
||||||
gGameSettings.fOptions[ TOPTION_CHEAT_MODE_OPTIONS_HEADER ] = FALSE;
|
gGameSettings.fOptions[ TOPTION_CHEAT_MODE_OPTIONS_HEADER ] = FALSE;
|
||||||
|
|||||||
@@ -105,7 +105,6 @@ enum
|
|||||||
TOPTION_SHOW_ENEMY_LOCATION,
|
TOPTION_SHOW_ENEMY_LOCATION,
|
||||||
TOPTION_ALT_START_AIM,
|
TOPTION_ALT_START_AIM,
|
||||||
TOPTION_ALT_PATHFINDING,
|
TOPTION_ALT_PATHFINDING,
|
||||||
TOPTION_USE_LEGACY_TACTICALAI,
|
|
||||||
|
|
||||||
// arynn: Debug/Cheat
|
// arynn: Debug/Cheat
|
||||||
TOPTION_CHEAT_MODE_OPTIONS_HEADER,
|
TOPTION_CHEAT_MODE_OPTIONS_HEADER,
|
||||||
|
|||||||
+25
-20
@@ -1,23 +1,27 @@
|
|||||||
#include "sgp.h"
|
#include "sgp.h"
|
||||||
#include "sysutil.h"
|
#include "sysutil.h"
|
||||||
#include "WCheck.h"
|
#include "vobject_blitters.h"
|
||||||
#include "Cursors.h"
|
#include "WCheck.h"
|
||||||
#include "Font Control.h"
|
#include "Cursors.h"
|
||||||
#include "Render Dirty.h"
|
#include "Font Control.h"
|
||||||
#include "Text.h"
|
#include "Cursor Control.h"
|
||||||
#include "Utilities.h"
|
#include "Render Dirty.h"
|
||||||
#include "WordWrap.h"
|
#include "Text.h"
|
||||||
#include "HelpScreen.h"
|
#include "Utilities.h"
|
||||||
#include "HelpScreenText.h"
|
#include "WordWrap.h"
|
||||||
#include "line.h"
|
#include "Font Control.h"
|
||||||
#include "Game Clock.h"
|
#include "Text.h"
|
||||||
#include "GameSettings.h"
|
#include "HelpScreen.h"
|
||||||
#include "laptop.h"
|
#include "HelpScreenText.h"
|
||||||
#include "Text Input.h"
|
#include "line.h"
|
||||||
#include "english.h"
|
#include "Game Clock.h"
|
||||||
#include "renderworld.h"
|
#include "GameSettings.h"
|
||||||
#include "Game Init.h"
|
#include "laptop.h"
|
||||||
#include "Overhead.h"
|
#include "Text Input.h"
|
||||||
|
#include "english.h"
|
||||||
|
#include "renderworld.h"
|
||||||
|
#include "Game Init.h"
|
||||||
|
#include "Overhead.h"
|
||||||
|
|
||||||
extern INT16 gsVIEWPORT_END_Y;
|
extern INT16 gsVIEWPORT_END_Y;
|
||||||
extern void PrintDate( void );
|
extern void PrintDate( void );
|
||||||
@@ -304,6 +308,7 @@ void SelectHelpScrollAreaCallBack( MOUSE_REGION * pRegion, INT32 iReason );
|
|||||||
|
|
||||||
// region to mask the background
|
// region to mask the background
|
||||||
MOUSE_REGION gHelpScreenScrollAreaArrows;
|
MOUSE_REGION gHelpScreenScrollAreaArrows;
|
||||||
|
void SelectHelpScrollAreaArrowsCallBack( MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
|
|
||||||
|
|
||||||
//checkbox to toggle show help again toggle
|
//checkbox to toggle show help again toggle
|
||||||
|
|||||||
+173
-98
@@ -1,47 +1,55 @@
|
|||||||
#include "builddefines.h"
|
#include "builddefines.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "sgp.h"
|
#include "sgp.h"
|
||||||
#include "Screens.h"
|
#include "gameloop.h"
|
||||||
#include "vobject_blitters.h"
|
#include "Screens.h"
|
||||||
#include "sysutil.h"
|
#include "INIReader.h"
|
||||||
#include "worlddef.h"
|
#include "vobject_blitters.h"
|
||||||
#include "Animation Data.h"
|
#include "renderworld.h"
|
||||||
#include "Overhead.h"
|
#include "mousesystem.h"
|
||||||
#include "Font Control.h"
|
#include "sysutil.h"
|
||||||
#include <himage.h>
|
#include "worlddef.h"
|
||||||
#include <vobject.h>
|
#include "Animation Data.h"
|
||||||
#include "Timer Control.h"
|
#include "Overhead.h"
|
||||||
#include "Utilities.h"
|
#include "Font Control.h"
|
||||||
#include "Render Dirty.h"
|
#include "Button System.h"
|
||||||
#include "Sound Control.h"
|
#include "Timer Control.h"
|
||||||
#include "lighting.h"
|
#include "Utilities.h"
|
||||||
#include "Cursor Control.h"
|
#include "Radar Screen.h"
|
||||||
#include "Music Control.h"
|
#include "Render Dirty.h"
|
||||||
#include "video.h"
|
#include "Sound Control.h"
|
||||||
#include "maputility.h"
|
#include "Event Pump.h"
|
||||||
#include "strategic.h"
|
#include "lighting.h"
|
||||||
#include "Dialogue Control.h"
|
#include "Cursor Control.h"
|
||||||
#include "Text.h"
|
#include "Music Control.h"
|
||||||
#include "laptop.h"
|
#include "video.h"
|
||||||
#include "MercTextBox.h"
|
#include "mapscreen.h"
|
||||||
#include "Tile Cache.h"
|
#include "Interface Items.h"
|
||||||
#include "strategicmap.h"
|
#include "maputility.h"
|
||||||
#include "Map Information.h"
|
#include "strategic.h"
|
||||||
#include "Shade Table Util.h"
|
#include "Dialogue Control.h"
|
||||||
#include "Exit Grids.h"
|
#include "Text.h"
|
||||||
#include "Summary Info.h"
|
#include "laptop.h"
|
||||||
#include "GameSettings.h"
|
#include "NPC.h"
|
||||||
#include "Game Init.h"
|
#include "MercTextBox.h"
|
||||||
#include "Init.h"
|
#include "Tile Cache.h"
|
||||||
#include "jascreens.h"
|
#include "strategicmap.h"
|
||||||
#include "XML.h"
|
#include "Map Information.h"
|
||||||
#include "SaveLoadGame.h"
|
#include "Shade Table Util.h"
|
||||||
#include "Weapons.h"
|
#include "Exit Grids.h"
|
||||||
#include "Strategic Movement.h"
|
#include "Summary Info.h"
|
||||||
#include "Vehicles.h"
|
#include "GameSettings.h"
|
||||||
#include "Multilingual Text Code Generator.h"
|
#include "Game Init.h"
|
||||||
#include "editscreen.h"
|
#include "Init.h"
|
||||||
#include "Arms Dealer Init.h"
|
#include "jascreens.h"
|
||||||
|
#include "XML.h"
|
||||||
|
#include "SaveLoadGame.h"
|
||||||
|
#include "Weapons.h"
|
||||||
|
#include "Strategic Movement.h"
|
||||||
|
#include "Vehicles.h"
|
||||||
|
#include "Multilingual Text Code Generator.h"
|
||||||
|
#include "editscreen.h"
|
||||||
|
#include "Arms Dealer Init.h"
|
||||||
#include "Map Screen Interface Bottom.h"
|
#include "Map Screen Interface Bottom.h"
|
||||||
#include "MPXmlTeams.hpp"
|
#include "MPXmlTeams.hpp"
|
||||||
#include "Strategic Mines LUA.h"
|
#include "Strategic Mines LUA.h"
|
||||||
@@ -49,6 +57,8 @@
|
|||||||
#include "lua_state.h"
|
#include "lua_state.h"
|
||||||
|
|
||||||
#include "Interface.h"
|
#include "Interface.h"
|
||||||
|
#include "Strategic Town Loyalty.h"
|
||||||
|
#include "Soldier Profile.h"
|
||||||
#include "aim.h"
|
#include "aim.h"
|
||||||
#include "mainmenuscreen.h"
|
#include "mainmenuscreen.h"
|
||||||
#include "email.h"
|
#include "email.h"
|
||||||
@@ -60,6 +70,7 @@
|
|||||||
#include "ub_config.h"
|
#include "ub_config.h"
|
||||||
|
|
||||||
|
|
||||||
|
#include "Civ Quotes.h"
|
||||||
#include "LuaInitNPCs.h"
|
#include "LuaInitNPCs.h"
|
||||||
#include "BriefingRoom_Data.h"
|
#include "BriefingRoom_Data.h"
|
||||||
#include "AimArchives.h"
|
#include "AimArchives.h"
|
||||||
@@ -85,6 +96,20 @@ extern BOOLEAN GetCDromDriveLetter( STR8 pString );
|
|||||||
extern BOOLEAN gfUseConsecutiveQuickSaveSlots;
|
extern BOOLEAN gfUseConsecutiveQuickSaveSlots;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined( GERMAN ) && !defined( _DEBUG )
|
||||||
|
//#define LASERLOCK_ENABLED
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef LASERLOCK_ENABLED
|
||||||
|
int LASERLOK_Init( HINSTANCE hInstance );
|
||||||
|
int LASERLOK_Run();
|
||||||
|
int LASERLOK_Check();
|
||||||
|
|
||||||
|
BOOLEAN PrepareLaserLockSystem();
|
||||||
|
void HandleLaserLockResult( BOOLEAN fSuccess );
|
||||||
|
// int TestCall( int n);
|
||||||
|
#endif
|
||||||
|
|
||||||
extern HINSTANCE ghInstance;
|
extern HINSTANCE ghInstance;
|
||||||
|
|
||||||
@@ -115,7 +140,7 @@ static void AddLanguagePrefix(STR fileName)
|
|||||||
AddLanguagePrefix( fileName, GetLanguagePrefix());
|
AddLanguagePrefix( fileName, GetLanguagePrefix());
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ResetEmptyRPCFaceSlots()
|
void ResetEmptyRPCFaceSlots()
|
||||||
{
|
{
|
||||||
//legion by jazz (load small faces from rpcs)
|
//legion by jazz (load small faces from rpcs)
|
||||||
// reset empty slots with "-1"
|
// reset empty slots with "-1"
|
||||||
@@ -1184,61 +1209,40 @@ if( g_lang != i18n::Lang::en ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ReadXMLEmail == TRUE )
|
if ( ReadXMLEmail == TRUE )
|
||||||
{
|
{
|
||||||
// Externalized emails
|
|
||||||
strcpy(fileName, directoryName);
|
|
||||||
strcat(fileName, EMAILSFILENAME);
|
|
||||||
// Only load external emails if we find the file
|
|
||||||
if ( FileExists(fileName) )
|
|
||||||
{
|
|
||||||
DebugMsg(TOPIC_JA2, DBG_LEVEL_3, String("LoadExternalGameplayData, fileName = %s", fileName));
|
|
||||||
SGP_THROW_IFFALSE(ReadInExternalizedEmails(fileName, FALSE), EMAILSFILENAME);
|
|
||||||
|
|
||||||
if ( g_lang != i18n::Lang::en )
|
|
||||||
{
|
|
||||||
AddLanguagePrefix(fileName);
|
|
||||||
if ( FileExists(fileName) )
|
|
||||||
{
|
|
||||||
DebugMsg(TOPIC_JA2, DBG_LEVEL_3, String("LoadExternalGameplayData, fileName = %s", fileName));
|
|
||||||
if ( !ReadInExternalizedEmails(fileName, TRUE) )
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// EMAIL MERC AVAILABLE by Jazz
|
// EMAIL MERC AVAILABLE by Jazz
|
||||||
strcpy(fileName, directoryName);
|
strcpy(fileName, directoryName);
|
||||||
strcat(fileName, EMAILMERCAVAILABLE);
|
strcat(fileName, EMAILMERCAVAILABLE);
|
||||||
DebugMsg(TOPIC_JA2, DBG_LEVEL_3, String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInEmailMercAvailable(fileName, FALSE), EMAILMERCAVAILABLE);
|
SGP_THROW_IFFALSE(ReadInEmailMercAvailable(fileName,FALSE), EMAILMERCAVAILABLE);
|
||||||
|
|
||||||
if ( g_lang != i18n::Lang::en )
|
if( g_lang != i18n::Lang::en ) {
|
||||||
|
AddLanguagePrefix(fileName);
|
||||||
|
if ( FileExists(fileName) )
|
||||||
{
|
{
|
||||||
AddLanguagePrefix(fileName);
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
if ( FileExists(fileName) )
|
if(!ReadInEmailMercAvailable(fileName,TRUE))
|
||||||
{
|
return FALSE;
|
||||||
DebugMsg(TOPIC_JA2, DBG_LEVEL_3, String("LoadExternalGameplayData, fileName = %s", fileName));
|
|
||||||
if ( !ReadInEmailMercAvailable(fileName, TRUE) )
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// EMAIL MERC LEVEL UP by Jazz
|
// EMAIL MERC LEVEL UP by Jazz
|
||||||
strcpy(fileName, directoryName);
|
strcpy(fileName, directoryName);
|
||||||
strcat(fileName, EMAILMERCLEVELUP);
|
strcat(fileName, EMAILMERCLEVELUP);
|
||||||
DebugMsg(TOPIC_JA2, DBG_LEVEL_3, String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInEmailMercLevelUp(fileName, FALSE), EMAILMERCLEVELUP);
|
SGP_THROW_IFFALSE(ReadInEmailMercLevelUp(fileName,FALSE), EMAILMERCLEVELUP);
|
||||||
|
|
||||||
if ( g_lang != i18n::Lang::en ) {
|
if( g_lang != i18n::Lang::en ) {
|
||||||
AddLanguagePrefix(fileName);
|
AddLanguagePrefix(fileName);
|
||||||
if ( FileExists(fileName) )
|
if ( FileExists(fileName) )
|
||||||
{
|
{
|
||||||
DebugMsg(TOPIC_JA2, DBG_LEVEL_3, String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
if ( !ReadInEmailMercLevelUp(fileName, TRUE) )
|
if(!ReadInEmailMercLevelUp(fileName,TRUE))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
// EMAIL OTHER by Jazz
|
// EMAIL OTHER by Jazz
|
||||||
strcpy(fileName, directoryName);
|
strcpy(fileName, directoryName);
|
||||||
@@ -1246,18 +1250,16 @@ if( g_lang != i18n::Lang::en ) {
|
|||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInEmailOther(fileName,FALSE), EMAILOTHER);
|
SGP_THROW_IFFALSE(ReadInEmailOther(fileName,FALSE), EMAILOTHER);
|
||||||
|
|
||||||
if( g_lang != i18n::Lang::en ) {
|
if( g_lang != i18n::Lang::en ) {
|
||||||
AddLanguagePrefix(fileName);
|
AddLanguagePrefix(fileName);
|
||||||
if ( FileExists(fileName) )
|
if ( FileExists(fileName) )
|
||||||
{
|
{
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
if(!ReadInEmailOther(fileName,TRUE))
|
if(!ReadInEmailOther(fileName,TRUE))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
*/
|
*/
|
||||||
}
|
|
||||||
|
|
||||||
//new vehicles by Jazz
|
//new vehicles by Jazz
|
||||||
|
|
||||||
InitNewVehicles ();
|
InitNewVehicles ();
|
||||||
@@ -1410,6 +1412,11 @@ if( g_lang != i18n::Lang::en ) {
|
|||||||
|
|
||||||
UINT32 InitializeJA2(void)
|
UINT32 InitializeJA2(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#ifdef LASERLOCK_ENABLED
|
||||||
|
HandleLaserLockResult( PrepareLaserLockSystem() );
|
||||||
|
#endif
|
||||||
|
|
||||||
HandleJA2CDCheck( );
|
HandleJA2CDCheck( );
|
||||||
|
|
||||||
gfWorldLoaded = FALSE;
|
gfWorldLoaded = FALSE;
|
||||||
@@ -1673,6 +1680,74 @@ void ShutdownJA2(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef LASERLOCK_ENABLED
|
||||||
|
|
||||||
|
BOOLEAN PrepareLaserLockSystem()
|
||||||
|
{
|
||||||
|
INT32 iInitRetVal=0;
|
||||||
|
INT32 iRunRetVal=0;
|
||||||
|
INT32 iCheckRetVal=0;
|
||||||
|
CHAR8 zDirectory[512];
|
||||||
|
|
||||||
|
CHAR8 zCdLocation[ SGPFILENAME_LEN ];
|
||||||
|
CHAR8 zCdFile[ SGPFILENAME_LEN ];
|
||||||
|
|
||||||
|
//Get the "current" file directory
|
||||||
|
GetFileManCurrentDirectory( zDirectory );
|
||||||
|
|
||||||
|
if( GetCDromDriveLetter( zCdLocation ) )
|
||||||
|
{
|
||||||
|
// OK, build filename
|
||||||
|
sprintf( zCdFile, "%s%s", zCdLocation, "Data" );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
goto FAILED_LASERLOK;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Go back to the root directory
|
||||||
|
SetFileManCurrentDirectory( zCdFile );
|
||||||
|
//Init the laser lock system
|
||||||
|
iInitRetVal = LASERLOK_Init( ghInstance );
|
||||||
|
if( iInitRetVal != 0 )
|
||||||
|
goto FAILED_LASERLOK;
|
||||||
|
|
||||||
|
//makes the verification of the laserlok system
|
||||||
|
iRunRetVal = LASERLOK_Run();
|
||||||
|
if( iRunRetVal != 0 )
|
||||||
|
goto FAILED_LASERLOK;
|
||||||
|
|
||||||
|
//checks the result of the laserlok run function
|
||||||
|
iCheckRetVal = LASERLOK_Check();
|
||||||
|
if( iCheckRetVal != 0 )
|
||||||
|
goto FAILED_LASERLOK;
|
||||||
|
|
||||||
|
//Restore back to the proper directory
|
||||||
|
SetFileManCurrentDirectory( zDirectory );
|
||||||
|
return( TRUE );
|
||||||
|
|
||||||
|
FAILED_LASERLOK:
|
||||||
|
//Restore back to the proper directory
|
||||||
|
SetFileManCurrentDirectory( zDirectory );
|
||||||
|
return( FALSE );
|
||||||
|
}
|
||||||
|
|
||||||
|
void HandleLaserLockResult( BOOLEAN fSuccess )
|
||||||
|
{
|
||||||
|
if( !fSuccess )
|
||||||
|
{
|
||||||
|
CHAR8 zString[512];
|
||||||
|
|
||||||
|
sprintf( zString, "%S", gzLateLocalizedString[56] );
|
||||||
|
|
||||||
|
// ShowCursor(TRUE);
|
||||||
|
// ShowCursor(TRUE);
|
||||||
|
ShutdownWithErrorBox( zString );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
void SetupMaxActionPointsAnimation()
|
void SetupMaxActionPointsAnimation()
|
||||||
{
|
{
|
||||||
gubMaxActionPoints[REGMALE] = APBPConstants[AP_MAXIMUM];
|
gubMaxActionPoints[REGMALE] = APBPConstants[AP_MAXIMUM];
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
#include "LogicalBodyTypes/SurfaceDB.h"
|
#include "LogicalBodyTypes/SurfaceDB.h"
|
||||||
#include "LogicalBodyTypes/FilterDB.h"
|
#include "LogicalBodyTypes/FilterDB.h"
|
||||||
#include "LogicalBodyTypes/EnumeratorDB.h"
|
#include "LogicalBodyTypes/EnumeratorDB.h"
|
||||||
|
#include "LogicalBodyTypes/BodyTypeDB.h"
|
||||||
#include "LogicalBodyTypes/PaletteDB.h"
|
#include "LogicalBodyTypes/PaletteDB.h"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|||||||
+36
-13
@@ -1,18 +1,41 @@
|
|||||||
#include "sgp.h"
|
#include "sgp.h"
|
||||||
#include "sysutil.h"
|
#include "sysutil.h"
|
||||||
#include "Cursor Control.h"
|
#include "vobject_blitters.h"
|
||||||
#include "Render Dirty.h"
|
#include "Font Control.h"
|
||||||
#include "Utilities.h"
|
#include "Cursor Control.h"
|
||||||
#include "Intro.h"
|
#include "Render Dirty.h"
|
||||||
#include "Cinematics.h"
|
#include "Text.h"
|
||||||
#include "Cinematics Bink.h"
|
#include "Utilities.h"
|
||||||
#include "mainmenuscreen.h"
|
#include "WordWrap.h"
|
||||||
#include "Music Control.h"
|
#include "Text.h"
|
||||||
#include "english.h"
|
#include "line.h"
|
||||||
#include "sgp_logger.h"
|
#include "Intro.h"
|
||||||
#include "INIReader.h"
|
#include "Cinematics.h"
|
||||||
|
#include "Cinematics Bink.h"
|
||||||
|
#include "mainmenuscreen.h"
|
||||||
|
#include "Music Control.h"
|
||||||
|
#include "LibraryDataBase.h"
|
||||||
|
#include "english.h"
|
||||||
|
#include "soldier profile type.h"
|
||||||
|
#include "MessageBoxScreen.h"
|
||||||
|
#include "sgp_logger.h"
|
||||||
|
#include "Soldier Profile.h"
|
||||||
|
#include "Game Init.h"
|
||||||
|
#include "INIReader.h"
|
||||||
|
|
||||||
|
#include <vfs/Core/vfs.h>
|
||||||
|
|
||||||
#include "Luaglobal.h"
|
#include "Luaglobal.h"
|
||||||
|
#ifdef JA2UB
|
||||||
|
#include "strategicmap.h"
|
||||||
|
#include "Map Screen Interface Map.h"
|
||||||
|
#include "Map Screen Interface.h"
|
||||||
|
#include "End Game.h"
|
||||||
|
#include "Cinematics Bink.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "LuaInitNPCs.h"
|
#include "LuaInitNPCs.h"
|
||||||
|
#include "XML.h"
|
||||||
#include <language.hpp>
|
#include <language.hpp>
|
||||||
|
|
||||||
BOOLEAN Style_JA = TRUE;
|
BOOLEAN Style_JA = TRUE;
|
||||||
|
|||||||
+62
-1
@@ -1,11 +1,72 @@
|
|||||||
#include <types.h>
|
#include "builddefines.h"
|
||||||
|
#include <wchar.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include "Render Fun.h"
|
||||||
|
#include "stdlib.h"
|
||||||
|
#include "DEBUG.H"
|
||||||
|
#include "MemMan.h"
|
||||||
|
#include "Overhead Types.h"
|
||||||
|
//#include "Soldier Control.h"
|
||||||
|
#include "Animation Cache.h"
|
||||||
|
#include "Animation Data.h"
|
||||||
|
#include "Animation Control.h"
|
||||||
|
#include <math.h>
|
||||||
|
#include "PATHAI.H"
|
||||||
|
#include "random.h"
|
||||||
|
#include "Isometric Utils.h"
|
||||||
|
#include "renderworld.h"
|
||||||
|
#include "video.h"
|
||||||
|
#include "Weapons.h"
|
||||||
|
#include "vobject_blitters.h"
|
||||||
|
#include "Handle UI.h"
|
||||||
|
#include "Event Pump.h"
|
||||||
|
#include "ai.h"
|
||||||
|
#include "Interface.h"
|
||||||
|
#include "lighting.h"
|
||||||
|
#include "faces.h"
|
||||||
|
#include "Soldier Profile.h"
|
||||||
|
#include "Soldier macros.h"
|
||||||
|
#include "english.h"
|
||||||
|
#include "Squads.h"
|
||||||
|
|
||||||
#ifdef NETWORKED
|
#ifdef NETWORKED
|
||||||
#include "Networking.h"
|
#include "Networking.h"
|
||||||
#include "NetworkEvent.h"
|
#include "NetworkEvent.h"
|
||||||
#endif
|
#endif
|
||||||
|
#include "Items.h"
|
||||||
|
#include "soundman.h"
|
||||||
|
#include "Utilities.h"
|
||||||
|
#include "strategic.h"
|
||||||
|
#include "soldier tile.h"
|
||||||
|
#include "Smell.h"
|
||||||
|
#include "Keys.h"
|
||||||
|
#include "Dialogue Control.h"
|
||||||
|
#include "Soldier Functions.h"
|
||||||
|
#include "Exit Grids.h"
|
||||||
|
#include "Quests.h"
|
||||||
|
#include "message.h"
|
||||||
|
#include "SkillCheck.h"
|
||||||
|
#include "interface Dialogue.h"
|
||||||
|
#include "GameSettings.h"
|
||||||
|
#include "ShopKeeper Interface.h"
|
||||||
|
#include "Vehicles.h"
|
||||||
|
#include "strategicmap.h"
|
||||||
|
#include "Morale.h"
|
||||||
|
#include "Drugs And Alcohol.h"
|
||||||
|
#include "SkillCheck.h"
|
||||||
|
#include "Map Information.h"
|
||||||
|
#include "Buildings.h"
|
||||||
|
#include "Text.h"
|
||||||
|
#include "Campaign Types.h"
|
||||||
|
#include "Strategic Status.h"
|
||||||
|
#include "Civ Quotes.h"
|
||||||
|
#include "Debug Control.h"
|
||||||
|
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
|
|
||||||
|
#include "Ja25_Tactical.h"
|
||||||
|
#include "Ja25 Strategic Ai.h"
|
||||||
|
|
||||||
INT16 JA2_5_START_SECTOR_X;
|
INT16 JA2_5_START_SECTOR_X;
|
||||||
INT16 JA2_5_START_SECTOR_Y;
|
INT16 JA2_5_START_SECTOR_Y;
|
||||||
|
|||||||
@@ -5,6 +5,11 @@
|
|||||||
|
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
|
|
||||||
|
//Used in the editor to compensate for the 2_<map name>
|
||||||
|
#define JA25_EXP_MAP_NAME_PREFIX L""
|
||||||
|
#define JA25_EXP_MAP_NAME_SIZE_OFFSET 0
|
||||||
|
|
||||||
|
|
||||||
//The starting sector of the Expanion pack
|
//The starting sector of the Expanion pack
|
||||||
extern INT16 JA2_5_START_SECTOR_X;
|
extern INT16 JA2_5_START_SECTOR_X;
|
||||||
extern INT16 JA2_5_START_SECTOR_Y;
|
extern INT16 JA2_5_START_SECTOR_Y;
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ extern HVSURFACE ghFrameBuffer;
|
|||||||
extern BOOLEAN gfSchedulesHosed;
|
extern BOOLEAN gfSchedulesHosed;
|
||||||
|
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
|
#include "Ja25_Tactical.h"
|
||||||
#include "Ja25 Strategic Ai.h"
|
#include "Ja25 Strategic Ai.h"
|
||||||
#endif
|
#endif
|
||||||
UINT8 gubLastLoadingScreenID = LOADINGSCREEN_NOTHING;
|
UINT8 gubLastLoadingScreenID = LOADINGSCREEN_NOTHING;
|
||||||
@@ -343,7 +344,7 @@ static void BuildLoadscreenFilename(std::string& dst, const char* path, int reso
|
|||||||
dst.append(".sti");
|
dst.append(".sti");
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::string GetResolutionSuffix(SCREEN_RESOLUTION resolution)
|
std::string GetResolutionSuffix(SCREEN_RESOLUTION resolution)
|
||||||
{
|
{
|
||||||
switch (resolution)
|
switch (resolution)
|
||||||
{
|
{
|
||||||
@@ -375,7 +376,7 @@ static std::string GetResolutionSuffix(SCREEN_RESOLUTION resolution)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::string FindBestFittingLoadscreenFilename(const std::string& baseName, SCREEN_RESOLUTION resolution)
|
std::string FindBestFittingLoadscreenFilename(const std::string& baseName, SCREEN_RESOLUTION resolution)
|
||||||
{
|
{
|
||||||
for (SCREEN_RESOLUTION res = resolution; res <= _2560x1600; res = (SCREEN_RESOLUTION)(res + 1))
|
for (SCREEN_RESOLUTION res = resolution; res <= _2560x1600; res = (SCREEN_RESOLUTION)(res + 1))
|
||||||
{
|
{
|
||||||
|
|||||||
+21
-20
@@ -1,23 +1,24 @@
|
|||||||
#include "sgp.h"
|
#include "sgp.h"
|
||||||
#include "screenids.h"
|
#include "screenids.h"
|
||||||
#include "Timer Control.h"
|
#include "Timer Control.h"
|
||||||
#include "Fade Screen.h"
|
#include "Fade Screen.h"
|
||||||
#include "sysutil.h"
|
#include "sysutil.h"
|
||||||
#include "vobject_blitters.h"
|
#include "vobject_blitters.h"
|
||||||
#include "MercTextBox.h"
|
#include "MercTextBox.h"
|
||||||
#include "Cursors.h"
|
#include "Cursors.h"
|
||||||
#include "Font Control.h"
|
#include "Font Control.h"
|
||||||
#include "Map Screen Interface.h"
|
#include "Map Screen Interface.h"
|
||||||
#include "renderworld.h"
|
#include "renderworld.h"
|
||||||
#include "gameloop.h"
|
#include "gameloop.h"
|
||||||
#include "english.h"
|
#include "english.h"
|
||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#include "Cursor Control.h"
|
#include "Cursor Control.h"
|
||||||
#include "Text.h"
|
#include "laptop.h"
|
||||||
#include "Text Input.h"
|
#include "Text.h"
|
||||||
#include "overhead map.h"
|
#include "Text Input.h"
|
||||||
#include "MPChatScreen.h"
|
#include "overhead map.h"
|
||||||
#include "WordWrap.h"
|
#include "MPChatScreen.h"
|
||||||
|
#include "WordWrap.h"
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include "Utilities.h"
|
#include "Utilities.h"
|
||||||
#include "connect.h"
|
#include "connect.h"
|
||||||
|
|||||||
+33
-22
@@ -1,28 +1,38 @@
|
|||||||
#include "sgp.h"
|
#include "sgp.h"
|
||||||
#include "screenids.h"
|
#include "screenids.h"
|
||||||
#include "Timer Control.h"
|
#include "Timer Control.h"
|
||||||
#include "sysutil.h"
|
#include "sysutil.h"
|
||||||
#include "Cursors.h"
|
#include "vobject_blitters.h"
|
||||||
#include "Font Control.h"
|
#include "MercTextBox.h"
|
||||||
#include "mainmenuscreen.h"
|
#include "Cursors.h"
|
||||||
#include "Cursor Control.h"
|
#include "Font Control.h"
|
||||||
#include "Render Dirty.h"
|
#include "mainmenuscreen.h"
|
||||||
#include "Music Control.h"
|
#include "Cursor Control.h"
|
||||||
|
#include "Render Dirty.h"
|
||||||
|
#include "Music Control.h"
|
||||||
|
#include "GameSettings.h"
|
||||||
|
#include "SaveLoadScreen.h"
|
||||||
|
#include "SaveLoadGame.h"
|
||||||
|
#include "Options Screen.h"
|
||||||
|
#include "english.h"
|
||||||
|
#include "gameloop.h"
|
||||||
|
#include "Game Init.h"
|
||||||
|
#include "Utilities.h"
|
||||||
|
#include "WordWrap.h"
|
||||||
|
#include "Font Control.h"
|
||||||
|
#include "Text.h"
|
||||||
|
#include "Multi Language Graphic Utils.h"
|
||||||
|
#include "Encrypted File.h"
|
||||||
|
#include "JA2 Splash.h"
|
||||||
|
#include "GameVersion.h"
|
||||||
|
|
||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#include "SaveLoadScreen.h"
|
|
||||||
#include "SaveLoadGame.h"
|
|
||||||
#include "Options Screen.h"
|
|
||||||
#include "english.h"
|
|
||||||
#include "gameloop.h"
|
|
||||||
#include "Game Init.h"
|
|
||||||
#include "WordWrap.h"
|
|
||||||
#include "Text.h"
|
|
||||||
#include "Multi Language Graphic Utils.h"
|
|
||||||
#include "JA2 Splash.h"
|
|
||||||
#include "GameVersion.h"
|
|
||||||
#include "connect.h"
|
#include "connect.h"
|
||||||
#include "strategic.h"
|
#include "strategic.h"
|
||||||
#include "Strategic Movement.h"
|
#include "Strategic Movement.h"
|
||||||
|
#include "Overhead.h"
|
||||||
|
#include "Init.h"
|
||||||
|
#include "XML.h"
|
||||||
#include <vfs/Core/vfs.h>
|
#include <vfs/Core/vfs.h>
|
||||||
#include <vfs/Core/vfs_profile.h>
|
#include <vfs/Core/vfs_profile.h>
|
||||||
|
|
||||||
@@ -73,6 +83,7 @@ void MenuButtonCallback(GUI_BUTTON *btn, INT32 reason);
|
|||||||
void HandleMainMenuKeyboardInput();
|
void HandleMainMenuKeyboardInput();
|
||||||
void HandleMainMenuInput();
|
void HandleMainMenuInput();
|
||||||
void HandleMainMenuScreen();
|
void HandleMainMenuScreen();
|
||||||
|
void DisplayAssignmentText();
|
||||||
void ClearMainMenu();
|
void ClearMainMenu();
|
||||||
void SelectMainMenuBackGroundRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
void SelectMainMenuBackGroundRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
void SetMainMenuExitScreen( UINT32 uiNewScreen );
|
void SetMainMenuExitScreen( UINT32 uiNewScreen );
|
||||||
@@ -417,7 +428,7 @@ void MenuButtonCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void MenuButtonMoveCallback(GUI_BUTTON *btn,INT32 reason)
|
void MenuButtonMoveCallback(GUI_BUTTON *btn,INT32 reason)
|
||||||
{
|
{
|
||||||
if(reason & MSYS_CALLBACK_REASON_LOST_MOUSE)
|
if(reason & MSYS_CALLBACK_REASON_LOST_MOUSE)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -14,10 +14,12 @@
|
|||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#include "Interface Control.h"
|
#include "Interface Control.h"
|
||||||
#include "Cursor Control.h"
|
#include "Cursor Control.h"
|
||||||
|
#include "laptop.h"
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
#include "Text Input.h"
|
#include "Text Input.h"
|
||||||
#include "overhead map.h"
|
#include "overhead map.h"
|
||||||
#include "DropDown.h" // added by Flugente
|
#include "DropDown.h" // added by Flugente
|
||||||
|
#include "Utilities.h" // added by Flugente for FilenameForBPP(...)
|
||||||
#include "FeaturesScreen.h"
|
#include "FeaturesScreen.h"
|
||||||
|
|
||||||
#define MSGBOX_DEFAULT_WIDTH 300
|
#define MSGBOX_DEFAULT_WIDTH 300
|
||||||
|
|||||||
+209
-117
@@ -1,127 +1,162 @@
|
|||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "Soldier Profile.h"
|
#include "Soldier Profile.h"
|
||||||
#include "FileMan.h"
|
#include "FileMan.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "DEBUG.H"
|
#include "DEBUG.H"
|
||||||
#include "Overhead.h"
|
#include "Overhead.h"
|
||||||
#include "Keys.h"
|
#include "Keys.h"
|
||||||
#include "finances.h"
|
#include "finances.h"
|
||||||
#include "history.h"
|
#include "history.h"
|
||||||
#include "files.h"
|
#include "files.h"
|
||||||
#include "Font.h"
|
#include "laptop.h"
|
||||||
#include "Font Control.h"
|
#include "INIReader.h"
|
||||||
#include "email.h"
|
#include "email.h"
|
||||||
#include "strategicmap.h"
|
#include "strategicmap.h"
|
||||||
#include "Game Events.h"
|
#include "Game Events.h"
|
||||||
#include "Game Clock.h"
|
#include "Game Clock.h"
|
||||||
#include "Soldier Create.h"
|
#include "Soldier Create.h"
|
||||||
#include "worlddef.h"
|
#include "worlddef.h"
|
||||||
#include "LaptopSave.h"
|
#include "LaptopSave.h"
|
||||||
#include "Queen Command.h"
|
#include "strategicmap.h"
|
||||||
#include "SaveLoadGame.h"
|
#include "Queen Command.h"
|
||||||
#include "Tactical Save.h"
|
#include "SaveLoadGame.h"
|
||||||
#include "Squads.h"
|
#include "Tactical Save.h"
|
||||||
#include "environment.h"
|
#include "Squads.h"
|
||||||
#include "lighting.h"
|
#include "environment.h"
|
||||||
#include "Strategic Movement.h"
|
#include "lighting.h"
|
||||||
#include "strategic.h"
|
#include "Strategic Movement.h"
|
||||||
#include "Isometric Utils.h"
|
#include "strategic.h"
|
||||||
#include "Quests.h"
|
#include "Isometric Utils.h"
|
||||||
#include "opplist.h"
|
#include "Quests.h"
|
||||||
#include "message.h"
|
#include "opplist.h"
|
||||||
#include "NPC.h"
|
#include "message.h"
|
||||||
#include "Merc Hiring.h"
|
#include "NPC.h"
|
||||||
#include "SaveLoadScreen.h"
|
#include "Merc Hiring.h"
|
||||||
#include "GameVersion.h"
|
#include "SaveLoadScreen.h"
|
||||||
#include "GameSettings.h"
|
#include "GameVersion.h"
|
||||||
#include "Music Control.h"
|
#include "GameSettings.h"
|
||||||
#include "Options Screen.h"
|
#include "Music Control.h"
|
||||||
#include "ai.h"
|
#include "Options Screen.h"
|
||||||
#include "renderworld.h"
|
#include "ai.h"
|
||||||
#include "SmokeEffects.h"
|
#include "renderworld.h"
|
||||||
#include "random.h"
|
#include "SmokeEffects.h"
|
||||||
#include "Map Screen Interface.h"
|
#include "random.h"
|
||||||
#include "Map Screen Interface Border.h"
|
#include "Map Screen Interface.h"
|
||||||
#include "Map Screen Interface Bottom.h"
|
#include "Map Screen Interface Border.h"
|
||||||
#include "Interface.h"
|
#include "Map Screen Interface Bottom.h"
|
||||||
#include "Map Screen Helicopter.h"
|
|
||||||
#include "Arms Dealer Init.h"
|
#include "Interface.h"
|
||||||
#include "Tactical Placement GUI.h"
|
#include "Map Screen Helicopter.h"
|
||||||
#include "Strategic Mines.h"
|
#include "environment.h"
|
||||||
#include "Strategic Town Loyalty.h"
|
#include "Arms Dealer Init.h"
|
||||||
#include "Vehicles.h"
|
#include "Tactical Placement GUI.h"
|
||||||
#include "Merc Contract.h"
|
|
||||||
#include "Bullets.h"
|
#include "Strategic Mines.h"
|
||||||
#include "Air Raid.h"
|
#include "Strategic Town Loyalty.h"
|
||||||
#include "physics.h"
|
#include "Vehicles.h"
|
||||||
#include "Strategic Pathing.h"
|
#include "Merc Contract.h"
|
||||||
#include "TeamTurns.h"
|
#include "Bullets.h"
|
||||||
#include "Explosion Control.h"
|
#include "Air Raid.h"
|
||||||
#include "Creature Spreading.h"
|
#include "physics.h"
|
||||||
#include "Strategic Status.h"
|
#include "Strategic Pathing.h"
|
||||||
#include "PreBattle Interface.h"
|
|
||||||
#include "Boxing.h"
|
#include "TeamTurns.h"
|
||||||
#include "Strategic AI.h"
|
|
||||||
#include "Map Screen Interface Map.h"
|
#include "Explosion Control.h"
|
||||||
#include "Meanwhile.h"
|
#include "Creature Spreading.h"
|
||||||
#include "Dialogue Control.h"
|
#include "Strategic Status.h"
|
||||||
#include "Text.h"
|
#include "PreBattle Interface.h"
|
||||||
#include "LightEffects.h"
|
#include "Boxing.h"
|
||||||
#include "HelpScreen.h"
|
#include "Strategic AI.h"
|
||||||
#include "Animated ProgressBar.h"
|
#include "Map Screen Interface Map.h"
|
||||||
#include "MercTextBox.h"
|
|
||||||
#include "Render Dirty.h"
|
#include "Meanwhile.h"
|
||||||
#include "Map Information.h"
|
#include "Dialogue Control.h"
|
||||||
#include "Interface Items.h"
|
#include "Text.h"
|
||||||
#include "Civ Quotes.h"
|
#include "Map Screen Interface.h"
|
||||||
#include "Scheduling.h"
|
#include "LightEffects.h"
|
||||||
#include "Animation Data.h"
|
#include "HelpScreen.h"
|
||||||
#include "Game Init.h"
|
#include "Animated ProgressBar.h"
|
||||||
#include "Cheats.h"
|
#include "MercTextBox.h"
|
||||||
#include "Strategic Event Handler.h"
|
#include "Render Dirty.h"
|
||||||
#include "Interface Panels.h"
|
#include "Map Information.h"
|
||||||
#include "interface Dialogue.h"
|
#include "Interface Items.h"
|
||||||
#include "Assignments.h"
|
#include "Civ Quotes.h"
|
||||||
#include "ShopKeeper Interface.h"
|
#include "Scheduling.h"
|
||||||
#include "PostalService.h"
|
#include "Animation Data.h"
|
||||||
#include "MilitiaSquads.h"
|
#include "Game Init.h"
|
||||||
#include "Facilities.h"
|
#include "Cheats.h"
|
||||||
#include "Town Militia.h"
|
#include "Strategic Event Handler.h"
|
||||||
#include "Items.h"
|
#include "Interface Panels.h"
|
||||||
#include "Encyclopedia_new.h"
|
#include "interface Dialogue.h"
|
||||||
#include "CampaignStats.h" // added by Flugente
|
#include "Assignments.h"
|
||||||
#include "DynamicDialogue.h" // added by Flugente
|
#include "Interface Items.h"
|
||||||
#include "PMC.h" // added by Flugente
|
#include "ShopKeeper Interface.h"
|
||||||
#include "ASD.h" // added by Flugente
|
#include "PostalService.h"
|
||||||
#include "MilitiaIndividual.h" // added by Flugente
|
// HEADROCK HAM B1: Additional Include for HAM
|
||||||
#include "Rebel Command.h"
|
#include "MilitiaSquads.h"
|
||||||
#include "BobbyR.h"
|
// HEADROCK HAM 3.5: Another include for HAM
|
||||||
#include "IMP Portraits.h"
|
#include "Facilities.h"
|
||||||
#include "Loading Screen.h"
|
// HEADROCK HAM 3.6: Yet another include, goddammit
|
||||||
#include "Interface Utils.h"
|
#include "Town Militia.h"
|
||||||
|
#include "Items.h"
|
||||||
|
#include "Encyclopedia_new.h"
|
||||||
|
#include "CampaignStats.h" // added by Flugente
|
||||||
|
#include "DynamicDialogue.h" // added by Flugente
|
||||||
|
#include "PMC.h" // added by Flugente
|
||||||
|
#include "ASD.h" // added by Flugente
|
||||||
|
#include "MilitiaIndividual.h" // added by Flugente
|
||||||
|
#include "Rebel Command.h"
|
||||||
|
|
||||||
|
#include "BobbyR.h"
|
||||||
|
#include "IMP Portraits.h"
|
||||||
|
#include "Loading Screen.h"
|
||||||
|
#include "Interface Utils.h"
|
||||||
|
#include "Squads.h"
|
||||||
|
#include "IMP Confirm.h"
|
||||||
#include "Enemy Soldier Save.h"
|
#include "Enemy Soldier Save.h"
|
||||||
#include "BobbyRMailOrder.h"
|
#include "BobbyRMailOrder.h"
|
||||||
#include "mercs.h"
|
#include "mercs.h"
|
||||||
|
#include "INIReader.h"
|
||||||
|
#include "mercs.h"
|
||||||
|
#include "Soldier Profile.h"
|
||||||
|
#ifdef JA2UB
|
||||||
|
#include "Ja25 Strategic Ai.h"
|
||||||
|
#include "Ja25_Tactical.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "LuaInitNPCs.h"
|
#include "LuaInitNPCs.h"
|
||||||
|
#include "Vehicles.h"
|
||||||
#include "BriefingRoom_Data.h"
|
#include "BriefingRoom_Data.h"
|
||||||
|
|
||||||
|
#include <vfs/Core/vfs.h>
|
||||||
|
//rain
|
||||||
|
//end rain
|
||||||
|
|
||||||
#include "connect.h"
|
#include "connect.h"
|
||||||
#include "Map Screen Interface Map Inventory.h"//dnl ch51 081009
|
#include "Map Screen Interface Map Inventory.h"//dnl ch51 081009
|
||||||
|
#include "Sys Globals.h"//dnl ch74 201013
|
||||||
#include "Ambient Control.h" // added by Flugente for HandleNewSectorAmbience(...)
|
#include "Ambient Control.h" // added by Flugente for HandleNewSectorAmbience(...)
|
||||||
#include "WorldDat.h"
|
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Local Defines
|
// Local Defines
|
||||||
//
|
//
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
#include <language.hpp>
|
|
||||||
|
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
#include "Ja25 Strategic Ai.h"
|
#include "Strategic Movement.h"
|
||||||
#include "Ja25_Tactical.h"
|
#include "LuaInitNPCs.h"
|
||||||
#include "ub_config.h"
|
#include "ub_config.h"
|
||||||
#include "Ja25Update.h"
|
#include "Ja25Update.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "LuaInitNPCs.h"
|
||||||
|
#include <language.hpp>
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef JA2UB
|
||||||
|
//void ConvertWeapons( SOLDIERTYPE *pSoldier );
|
||||||
extern void MakeBadSectorListFromMapsOnHardDrive( BOOLEAN fDisplayMessages ); // ja25 UB
|
extern void MakeBadSectorListFromMapsOnHardDrive( BOOLEAN fDisplayMessages ); // ja25 UB
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -170,6 +205,8 @@ extern BOOLEAN gfCreatureMeanwhileScenePlayed;
|
|||||||
BOOLEAN gMusicModeToPlay = FALSE;
|
BOOLEAN gMusicModeToPlay = FALSE;
|
||||||
|
|
||||||
|
|
||||||
|
//extern BOOLEAN gfFirstTimeInGameHeliCrash;
|
||||||
|
|
||||||
#ifdef JA2BETAVERSION
|
#ifdef JA2BETAVERSION
|
||||||
BOOLEAN gfDisplaySaveGamesNowInvalidatedMsg = FALSE;
|
BOOLEAN gfDisplaySaveGamesNowInvalidatedMsg = FALSE;
|
||||||
#endif
|
#endif
|
||||||
@@ -177,13 +214,14 @@ BOOLEAN gfDisplaySaveGamesNowInvalidatedMsg = FALSE;
|
|||||||
BOOLEAN gfUseConsecutiveQuickSaveSlots = FALSE;
|
BOOLEAN gfUseConsecutiveQuickSaveSlots = FALSE;
|
||||||
UINT32 guiCurrentQuickSaveNumber = 0;
|
UINT32 guiCurrentQuickSaveNumber = 0;
|
||||||
UINT32 guiLastSaveGameNum = 1;
|
UINT32 guiLastSaveGameNum = 1;
|
||||||
|
BOOLEAN DoesAutoSaveFileExist( BOOLEAN fLatestAutoSave );
|
||||||
|
|
||||||
UINT32 guiJA2EncryptionSet = 0;
|
UINT32 guiJA2EncryptionSet = 0;
|
||||||
UINT32 CalcJA2EncryptionSet( SAVED_GAME_HEADER * pSaveGameHeader );
|
UINT32 CalcJA2EncryptionSet( SAVED_GAME_HEADER * pSaveGameHeader );
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
//The screen that the game was saved from
|
//The screen that the gaem was saved from
|
||||||
UINT32 uiCurrentScreen;
|
UINT32 uiCurrentScreen;
|
||||||
|
|
||||||
UINT32 uiCurrentUniqueSoldierId;
|
UINT32 uiCurrentUniqueSoldierId;
|
||||||
@@ -494,6 +532,10 @@ BOOLEAN LoadSavedMercProfiles( HWFILE hwFile );
|
|||||||
BOOLEAN SaveSoldierStructure( HWFILE hFile );
|
BOOLEAN SaveSoldierStructure( HWFILE hFile );
|
||||||
BOOLEAN LoadSoldierStructure( HWFILE hFile );
|
BOOLEAN LoadSoldierStructure( HWFILE hFile );
|
||||||
|
|
||||||
|
// CHRISL: New functions to save and load LBENODE data
|
||||||
|
BOOLEAN SaveLBENODEToSaveGameFile( HWFILE hFile );
|
||||||
|
BOOLEAN LoadLBENODEFromSaveGameFile( HWFILE hFile );
|
||||||
|
|
||||||
//BOOLEAN SavePtrInfo( PTR *pData, UINT32 uiSizeOfObject, HWFILE hFile );
|
//BOOLEAN SavePtrInfo( PTR *pData, UINT32 uiSizeOfObject, HWFILE hFile );
|
||||||
//BOOLEAN LoadPtrInfo( PTR *pData, UINT32 uiSizeOfObject, HWFILE hFile );
|
//BOOLEAN LoadPtrInfo( PTR *pData, UINT32 uiSizeOfObject, HWFILE hFile );
|
||||||
|
|
||||||
@@ -581,7 +623,28 @@ void ValidateStrategicGroups();
|
|||||||
//if all that sounds compilcated, it is
|
//if all that sounds compilcated, it is
|
||||||
|
|
||||||
extern int gLastLBEUniqueID;
|
extern int gLastLBEUniqueID;
|
||||||
|
/*
|
||||||
|
// CHRISL: New function to save/load LBENODE data
|
||||||
|
BOOLEAN SaveLBENODEToSaveGameFile( HWFILE hFile )
|
||||||
|
{
|
||||||
|
UINT32 uiNumBytesWritten;
|
||||||
|
if ( !FileWrite( hFile, &gLastLBEUniqueID, sizeof(int), &uiNumBytesWritten ) )
|
||||||
|
{
|
||||||
|
return(FALSE);
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOLEAN LoadLBENODEFromSaveGameFile( HWFILE hFile )
|
||||||
|
{
|
||||||
|
UINT32 uiNumBytesRead;
|
||||||
|
if ( !FileRead( hFile, &gLastLBEUniqueID, sizeof(int), &uiNumBytesRead ) )
|
||||||
|
{
|
||||||
|
return(FALSE);
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
*/
|
||||||
BOOLEAN LBENODE::Load( HWFILE hFile )
|
BOOLEAN LBENODE::Load( HWFILE hFile )
|
||||||
{
|
{
|
||||||
UINT32 uiNumBytesRead;
|
UINT32 uiNumBytesRead;
|
||||||
@@ -597,7 +660,7 @@ BOOLEAN LBENODE::Load( HWFILE hFile )
|
|||||||
//when combined with copy assignment which makes a new LBENODE
|
//when combined with copy assignment which makes a new LBENODE
|
||||||
gLastLBEUniqueID = uniqueID + 1;
|
gLastLBEUniqueID = uniqueID + 1;
|
||||||
}
|
}
|
||||||
int size = 0;
|
int size;
|
||||||
if ( !FileRead( hFile, &size, sizeof(int), &uiNumBytesRead ) )
|
if ( !FileRead( hFile, &size, sizeof(int), &uiNumBytesRead ) )
|
||||||
{
|
{
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
@@ -662,7 +725,7 @@ BOOLEAN LBENODE::Save( HWFILE hFile, bool fSavingMap )
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOLEAN LoadArmsDealerInventoryFromSavedGameFile( HWFILE hFile )
|
BOOLEAN LoadArmsDealerInventoryFromSavedGameFile( HWFILE hFile )
|
||||||
{
|
{
|
||||||
UINT32 uiNumBytesRead;
|
UINT32 uiNumBytesRead;
|
||||||
UINT8 ubArmsDealer;
|
UINT8 ubArmsDealer;
|
||||||
@@ -673,7 +736,7 @@ static BOOLEAN LoadArmsDealerInventoryFromSavedGameFile( HWFILE hFile )
|
|||||||
|
|
||||||
if (guiCurrentSaveGameVersion >= NIV_SAVEGAME_DATATYPE_CHANGE)
|
if (guiCurrentSaveGameVersion >= NIV_SAVEGAME_DATATYPE_CHANGE)
|
||||||
{
|
{
|
||||||
int dealers = 0;
|
int dealers;
|
||||||
if (!FileRead( hFile, &dealers, sizeof( int ), &uiNumBytesRead ))
|
if (!FileRead( hFile, &dealers, sizeof( int ), &uiNumBytesRead ))
|
||||||
{
|
{
|
||||||
return( FALSE );
|
return( FALSE );
|
||||||
@@ -701,7 +764,7 @@ static BOOLEAN LoadArmsDealerInventoryFromSavedGameFile( HWFILE hFile )
|
|||||||
//loop through all the dealers inventories
|
//loop through all the dealers inventories
|
||||||
for( ubArmsDealer=0; ubArmsDealer<dealers; ++ubArmsDealer )
|
for( ubArmsDealer=0; ubArmsDealer<dealers; ++ubArmsDealer )
|
||||||
{
|
{
|
||||||
int size = 0;
|
int size;
|
||||||
if (!FileRead( hFile, &size, sizeof( int ), &uiNumBytesRead ))
|
if (!FileRead( hFile, &size, sizeof( int ), &uiNumBytesRead ))
|
||||||
{
|
{
|
||||||
return( FALSE );
|
return( FALSE );
|
||||||
@@ -1442,7 +1505,7 @@ BOOLEAN MERCPROFILESTRUCT::Load(HWFILE hFile, bool forceLoadOldVersion, bool for
|
|||||||
numBytesRead = ReadFieldByField(hFile, &filler, sizeof(filler), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &filler, sizeof(filler), sizeof(UINT8), numBytesRead);
|
||||||
|
|
||||||
//DBrot: More rooms
|
//DBrot: More rooms
|
||||||
int size = 0;
|
int size;
|
||||||
if ( numBytesRead + buffer != SIZEOF_MERCPROFILESTRUCT_POD )
|
if ( numBytesRead + buffer != SIZEOF_MERCPROFILESTRUCT_POD )
|
||||||
{
|
{
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
@@ -6296,10 +6359,8 @@ BOOLEAN LoadSavedGame( int ubSavedGameID )
|
|||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
|
|
||||||
#else
|
#else
|
||||||
if ( !fBookMark && !fEmail )
|
if(!fBookMark && !fEmail)
|
||||||
{
|
AddEmail(MERC_INTRO, MERC_INTRO_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin( ), -1, -1 , TYPE_EMAIL_EMAIL_EDT);
|
||||||
AddEmail(MERC_INTRO, MERC_INTRO_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT, XML_SPECK_INTRO);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -7021,6 +7082,10 @@ if( g_lang == i18n::Lang::de ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//#ifdef JA2UB
|
||||||
|
//if the soldier has the NON weapon version of the merc knofe or merc umbrella
|
||||||
|
//ConvertWeapons( &Menptr[ cnt ] );
|
||||||
|
//#endif
|
||||||
|
|
||||||
// JA2Gold: fix next-to-previous attacker value
|
// JA2Gold: fix next-to-previous attacker value
|
||||||
Menptr[cnt].ubNextToPreviousAttackerID = NOBODY;
|
Menptr[cnt].ubNextToPreviousAttackerID = NOBODY;
|
||||||
@@ -8667,7 +8732,7 @@ BOOLEAN SaveGeneralInfo( HWFILE hFile )
|
|||||||
extern UINT32 guiRainLoop;
|
extern UINT32 guiRainLoop;
|
||||||
//end rain
|
//end rain
|
||||||
|
|
||||||
static void EnsureValidLoadScreen( UINT32* puiScreen )
|
void EnsureValidLoadScreen( UINT32* puiScreen )
|
||||||
{
|
{
|
||||||
if (!puiScreen)
|
if (!puiScreen)
|
||||||
return;
|
return;
|
||||||
@@ -9737,3 +9802,30 @@ UINT32 CalcJA2EncryptionSet( SAVED_GAME_HEADER * pSaveGameHeader )
|
|||||||
|
|
||||||
return( uiEncryptionSet );
|
return( uiEncryptionSet );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//inshy: Now we dont need this convertation, all items chenged in the maps
|
||||||
|
/*
|
||||||
|
#ifdef JA2UB
|
||||||
|
void ConvertWeapons( SOLDIERTYPE *pSoldier )
|
||||||
|
{
|
||||||
|
INT32 iCnt;
|
||||||
|
|
||||||
|
for( iCnt=0; iCnt< NUM_INV_SLOTS; iCnt++)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
if(UsingNewInventorySystem() == false && gGameOptions.ubAttachmentSystem == ATTACHMENT_OLD )
|
||||||
|
{
|
||||||
|
if( pSoldier->inv[ iCnt ].usItem == 97 || pSoldier->inv[ iCnt ].usItem == 1346 || pSoldier->inv[ iCnt ].usItem == 99
|
||||||
|
|| pSoldier->inv[ iCnt ].usItem == 1347 || pSoldier->inv[ iCnt ].usItem == 584 || pSoldier->inv[ iCnt ].usItem == 551 )
|
||||||
|
pSoldier->inv[ iCnt ].usItem = 129;
|
||||||
|
|
||||||
|
if( pSoldier->inv[ iCnt ].usItem == 117 || pSoldier->inv[ iCnt ].usItem == 349 || pSoldier->inv[ iCnt ].usItem == 1263 )
|
||||||
|
pSoldier->inv[ iCnt ].usItem = 71;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
*/
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
#include "stdio.h"
|
#include "stdio.h"
|
||||||
#include "WordWrap.h"
|
#include "WordWrap.h"
|
||||||
#include "strategicmap.h"
|
#include "strategicmap.h"
|
||||||
|
#include "finances.h"
|
||||||
#include "WCheck.h"
|
#include "WCheck.h"
|
||||||
#include "Utilities.h"
|
#include "Utilities.h"
|
||||||
#include "Cursors.h"
|
#include "Cursors.h"
|
||||||
@@ -18,6 +19,7 @@
|
|||||||
#include "Options Screen.h"
|
#include "Options Screen.h"
|
||||||
#include "GameVersion.h"
|
#include "GameVersion.h"
|
||||||
#include "sysutil.h"
|
#include "sysutil.h"
|
||||||
|
#include "Tactical Save.h"
|
||||||
#include "Overhead.h"
|
#include "Overhead.h"
|
||||||
#include "gamescreen.h"
|
#include "gamescreen.h"
|
||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
@@ -29,6 +31,7 @@
|
|||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include "Map Screen Interface.h"
|
#include "Map Screen Interface.h"
|
||||||
#include "Multi Language Graphic Utils.h"
|
#include "Multi Language Graphic Utils.h"
|
||||||
|
#include "Campaign Types.h"
|
||||||
#include "PostalService.h"
|
#include "PostalService.h"
|
||||||
|
|
||||||
#include "connect.h"
|
#include "connect.h"
|
||||||
@@ -38,6 +41,10 @@
|
|||||||
#include <vfs/Core/vfs_file_raii.h>
|
#include <vfs/Core/vfs_file_raii.h>
|
||||||
|
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
|
#include "Strategic Movement.h"
|
||||||
|
|
||||||
|
//#include "Strategic Movement Costs.h"
|
||||||
|
|
||||||
#include "LuaInitNPCs.h"
|
#include "LuaInitNPCs.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
+29
-21
@@ -1,22 +1,30 @@
|
|||||||
#include "builddefines.h"
|
#include "builddefines.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <types.h>
|
#include <time.h>
|
||||||
#include <video.h>
|
#include "sgp.h"
|
||||||
#include <MemMan.h>
|
#include "gameloop.h"
|
||||||
#include <Overhead Types.h>
|
#include "himage.h"
|
||||||
#include <Soldier Control.h>
|
#include "vobject.h"
|
||||||
#include "renderworld.h"
|
#include "vobject_blitters.h"
|
||||||
#include "input.h"
|
#include "worlddef.h"
|
||||||
#include "Font.h"
|
#include "renderworld.h"
|
||||||
#include "screenids.h"
|
#include "input.h"
|
||||||
#include "Overhead.h"
|
#include "Font.h"
|
||||||
#include "Font Control.h"
|
#include "screenids.h"
|
||||||
#include "Animation Control.h"
|
#include "Overhead.h"
|
||||||
#include "Animation Data.h"
|
#include "sysutil.h"
|
||||||
#include "Render Dirty.h"
|
#include "Font Control.h"
|
||||||
#include "Sys Globals.h"
|
#include "Animation Control.h"
|
||||||
#include "english.h"
|
#include "Animation Data.h"
|
||||||
#include "MessageBoxScreen.h"
|
#include "Event Pump.h"
|
||||||
|
#include "Render Dirty.h"
|
||||||
|
#include "Sys Globals.h"
|
||||||
|
#include "Interface.h"
|
||||||
|
#include <wchar.h>
|
||||||
|
#include <tchar.h>
|
||||||
|
#include "english.h"
|
||||||
|
#include "FileMan.h"
|
||||||
|
#include "MessageBoxScreen.h"
|
||||||
|
|
||||||
//forward declarations of common classes to eliminate includes
|
//forward declarations of common classes to eliminate includes
|
||||||
class OBJECTTYPE;
|
class OBJECTTYPE;
|
||||||
@@ -36,7 +44,7 @@ static UINT8 ubNumStates = 0;
|
|||||||
static UINT16 *pusStates = NULL;
|
static UINT16 *pusStates = NULL;
|
||||||
static INT8 ubCurLoadedState = 0;
|
static INT8 ubCurLoadedState = 0;
|
||||||
|
|
||||||
static void CycleAnimations( )
|
void CycleAnimations( )
|
||||||
{
|
{
|
||||||
INT32 cnt;
|
INT32 cnt;
|
||||||
|
|
||||||
@@ -310,7 +318,7 @@ UINT32 AniEditScreenHandle(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static UINT16 GetAnimStateFromName( STR8 zName )
|
UINT16 GetAnimStateFromName( STR8 zName )
|
||||||
{
|
{
|
||||||
INT32 cnt;
|
INT32 cnt;
|
||||||
|
|
||||||
|
|||||||
+6
-1
@@ -1,3 +1,4 @@
|
|||||||
|
#include <stdio.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include "sgp.h"
|
#include "sgp.h"
|
||||||
#include "gameloop.h"
|
#include "gameloop.h"
|
||||||
@@ -16,16 +17,20 @@
|
|||||||
#include "Tactical Save.h"
|
#include "Tactical Save.h"
|
||||||
#include "Interface.h"
|
#include "Interface.h"
|
||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
|
#include "mapscreen.h"
|
||||||
#include "Interface Control.h"
|
#include "Interface Control.h"
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
#include "HelpScreen.h"
|
#include "HelpScreen.h"
|
||||||
#include "PreBattle Interface.h"
|
#include "PreBattle Interface.h"
|
||||||
|
#include "Tactical Placement GUI.h"//dnl ch45 071009
|
||||||
#include "Map Screen Interface Map Inventory.h"//dnl ch51 081009
|
#include "Map Screen Interface Map Inventory.h"//dnl ch51 081009
|
||||||
#include "World Items.h"//dnl ch77 191113
|
#include "World Items.h"//dnl ch77 191113
|
||||||
|
#include "Overhead.h" // added by Flugente
|
||||||
#include "Ambient Control.h" // sevenfm
|
#include "Ambient Control.h" // sevenfm
|
||||||
|
|
||||||
#include "SaveLoadScreen.h"
|
#include "SaveLoadScreen.h"
|
||||||
|
|
||||||
|
#include "Lua Interpreter.h"
|
||||||
//**ddd direct link libraries
|
//**ddd direct link libraries
|
||||||
#pragma comment (lib, "user32.lib")
|
#pragma comment (lib, "user32.lib")
|
||||||
#pragma comment (lib, "gdi32.lib")
|
#pragma comment (lib, "gdi32.lib")
|
||||||
@@ -75,7 +80,7 @@ void HandleNewScreenChange( UINT32 uiNewScreen, UINT32 uiOldScreen );
|
|||||||
|
|
||||||
#ifdef JA2BETAVERSION
|
#ifdef JA2BETAVERSION
|
||||||
BOOLEAN gubReportMapscreenLock = 0;
|
BOOLEAN gubReportMapscreenLock = 0;
|
||||||
static void ReportMapscreenErrorLock()
|
void ReportMapscreenErrorLock()
|
||||||
{
|
{
|
||||||
switch( gubReportMapscreenLock )
|
switch( gubReportMapscreenLock )
|
||||||
{
|
{
|
||||||
|
|||||||
+81
-64
@@ -1,68 +1,85 @@
|
|||||||
#include "builddefines.h"
|
#include "builddefines.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "sgp.h"
|
#include <time.h>
|
||||||
#include "gameloop.h"
|
#include "sgp.h"
|
||||||
#include <Overhead Types.h>
|
#include "gameloop.h"
|
||||||
#include <Soldier Control.h>
|
#include "vobject.h"
|
||||||
#include "renderworld.h"
|
#include "worlddef.h"
|
||||||
#include "Font.h"
|
#include "renderworld.h"
|
||||||
#include "screenids.h"
|
#include "Font.h"
|
||||||
#include "Screens.h"
|
#include "screenids.h"
|
||||||
#include <Meanwhile.h>
|
#include "Screens.h"
|
||||||
#include "HelpScreen.h"
|
#include "Overhead.h"
|
||||||
#include "Overhead.h"
|
#include "Isometric Utils.h"
|
||||||
#include "Event Pump.h"
|
#include "sysutil.h"
|
||||||
#include "Font Control.h"
|
#include "input.h"
|
||||||
#include "Timer Control.h"
|
#include "Event Pump.h"
|
||||||
#include "Radar Screen.h"
|
#include "Font Control.h"
|
||||||
#include "Render Dirty.h"
|
#include "Timer Control.h"
|
||||||
#include "Interface.h"
|
#include "Radar Screen.h"
|
||||||
#include "Handle UI.h"
|
#include "Render Dirty.h"
|
||||||
#include "Cursors.h"
|
#include "Interface.h"
|
||||||
#include "vobject_blitters.h"
|
#include "Handle UI.h"
|
||||||
#include "Button System.h"
|
#include <wchar.h>
|
||||||
#include "lighting.h"
|
#include <tchar.h>
|
||||||
#include "Sys Globals.h"
|
#include "Cursors.h"
|
||||||
#include "environment.h"
|
#include "vobject_blitters.h"
|
||||||
#include "Bullets.h"
|
#include "Button System.h"
|
||||||
#include <mousesystem.h>
|
#include "lighting.h"
|
||||||
#include "message.h"
|
#include "renderworld.h"
|
||||||
#include "overhead map.h"
|
#include "Sys Globals.h"
|
||||||
#include "Strategic Exit GUI.h"
|
#include "environment.h"
|
||||||
#include "Tactical Placement GUI.h"
|
#include "Bullets.h"
|
||||||
#include "Air Raid.h"
|
#include "Assignments.h"
|
||||||
#include "Game Clock.h"
|
#include "message.h"
|
||||||
#include "Game Init.h"
|
#include <string.h>
|
||||||
|
#include "overhead map.h"
|
||||||
|
#include "Strategic Exit GUI.h"
|
||||||
|
#include "Strategic Movement.h"
|
||||||
|
#include "Tactical Placement GUI.h"
|
||||||
|
#include "Air Raid.h"
|
||||||
|
#include "Game Clock.h"
|
||||||
|
#include "Game Init.h"
|
||||||
|
|
||||||
|
//DEF: Test Code
|
||||||
|
#ifdef NETWORKED
|
||||||
|
#include "Networking.h"
|
||||||
|
#endif
|
||||||
|
#include "Interface Control.h"
|
||||||
|
#include "Game Clock.h"
|
||||||
|
#include "physics.h"
|
||||||
|
#include "Fade Screen.h"
|
||||||
|
#include "Dialogue Control.h"
|
||||||
|
#include "Soldier macros.h"
|
||||||
|
#include "faces.h"
|
||||||
|
#include "strategicmap.h"
|
||||||
|
#include "gamescreen.h"
|
||||||
|
#include "Interface.h"
|
||||||
|
#include "Cursor Control.h"
|
||||||
|
#include "Strategic Turns.h"
|
||||||
|
|
||||||
|
#include "merc entering.h"
|
||||||
|
#include "Soldier Create.h"
|
||||||
|
#include "Soldier Init List.h"
|
||||||
|
#include "Interface Panels.h"
|
||||||
|
#include "Map Information.h"
|
||||||
|
#include "environment.h"
|
||||||
|
#include "Squads.h"
|
||||||
|
#include "interface Dialogue.h"
|
||||||
|
#include "Auto Bandage.h"
|
||||||
|
#include "Meanwhile.h"
|
||||||
|
#include "Strategic AI.h"
|
||||||
|
#include "HelpScreen.h"
|
||||||
|
#include "PreBattle Interface.h"
|
||||||
|
#include "Sound Control.h"
|
||||||
|
#include "MessageBoxScreen.h"
|
||||||
|
#include "Text.h"
|
||||||
|
#include "GameSettings.h"
|
||||||
|
#include "random.h"
|
||||||
|
#include "editscreen.h"
|
||||||
|
#include "Scheduling.h"
|
||||||
|
#include "Animated ProgressBar.h"
|
||||||
|
|
||||||
//DEF: Test Code
|
|
||||||
#ifdef NETWORKED
|
|
||||||
#include "Networking.h"
|
|
||||||
#endif
|
|
||||||
#include "Interface Control.h"
|
|
||||||
#include "physics.h"
|
|
||||||
#include "Fade Screen.h"
|
|
||||||
#include "Dialogue Control.h"
|
|
||||||
#include "Soldier macros.h"
|
|
||||||
#include "faces.h"
|
|
||||||
#include "strategicmap.h"
|
|
||||||
#include "gamescreen.h"
|
|
||||||
#include "Cursor Control.h"
|
|
||||||
#include "Strategic Turns.h"
|
|
||||||
#include "merc entering.h"
|
|
||||||
#include "Interface Panels.h"
|
|
||||||
#include "Map Information.h"
|
|
||||||
#include "Squads.h"
|
|
||||||
#include "interface Dialogue.h"
|
|
||||||
#include "Auto Bandage.h"
|
|
||||||
#include "PreBattle Interface.h"
|
|
||||||
#include "Sound Control.h"
|
|
||||||
#include "MessageBoxScreen.h"
|
|
||||||
#include "Text.h"
|
|
||||||
#include "GameSettings.h"
|
|
||||||
#include "random.h"
|
|
||||||
#include "editscreen.h"
|
|
||||||
#include "Scheduling.h"
|
|
||||||
#include "Animated ProgressBar.h"
|
|
||||||
#include "connect.h"
|
#include "connect.h"
|
||||||
|
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
|
|||||||
+52
-39
@@ -1,38 +1,51 @@
|
|||||||
#include "builddefines.h"
|
#include "builddefines.h"
|
||||||
#include <cstdio>
|
#include <stdio.h>
|
||||||
#include "sgp.h"
|
#include <time.h>
|
||||||
#include "gameloop.h"
|
#include "sgp.h"
|
||||||
#include "himage.h"
|
#include "gameloop.h"
|
||||||
#include "vobject.h"
|
#include "himage.h"
|
||||||
#include "vobject_blitters.h"
|
#include "vobject.h"
|
||||||
#include "WCheck.h"
|
#include "vobject_blitters.h"
|
||||||
#include "input.h"
|
#include "WCheck.h"
|
||||||
#include "Font.h"
|
#include "input.h"
|
||||||
#include "screenids.h"
|
#include "Font.h"
|
||||||
#include "Screens.h"
|
#include "timer.h"
|
||||||
#include "Font Control.h"
|
#include "mousesystem.h"
|
||||||
#include <Overhead Types.h>
|
#include "screenids.h"
|
||||||
#include <Soldier Control.h>
|
#include "Screens.h"
|
||||||
#include "Timer Control.h"
|
#include "Font Control.h"
|
||||||
#include "Sys Globals.h"
|
#include "sysutil.h"
|
||||||
#include <Handle UI.h>
|
#include "tiledef.h"
|
||||||
#include "Overhead.h"
|
#include "worlddef.h"
|
||||||
#include "Utilities.h"
|
#include "editscreen.h"
|
||||||
#include "Render Dirty.h"
|
#include <wchar.h>
|
||||||
#include "jascreens.h"
|
#include <tchar.h>
|
||||||
#include "mainmenuscreen.h"
|
#include "Timer Control.h"
|
||||||
#include "Game Init.h"
|
#include "Sys Globals.h"
|
||||||
#include "Init.h"
|
#include "Interface.h"
|
||||||
#include "Cursor Control.h"
|
#include "Overhead.h"
|
||||||
#include "GameVersion.h"
|
#include "Utilities.h"
|
||||||
#include "Game Clock.h"
|
#include "Render Dirty.h"
|
||||||
#include "gamescreen.h"
|
#include "jascreens.h"
|
||||||
#include "english.h"
|
#include "gameloop.h"
|
||||||
#include "random.h"
|
#include "Event Pump.h"
|
||||||
#include "WordWrap.h"
|
#include "Animation Cache.h"
|
||||||
#include "Sound Control.h"
|
#include "lighting.h"
|
||||||
#include "Text.h"
|
#include "mainmenuscreen.h"
|
||||||
#include "INIReader.h"
|
#include "Game Init.h"
|
||||||
|
#include "Init.h"
|
||||||
|
#include "Cursor Control.h"
|
||||||
|
#include "Utilities.h"
|
||||||
|
#include "GameVersion.h"
|
||||||
|
#include "Game Clock.h"
|
||||||
|
#include "gamescreen.h"
|
||||||
|
#include "english.h"
|
||||||
|
#include "random.h"
|
||||||
|
#include "WordWrap.h"
|
||||||
|
#include "Sound Control.h"
|
||||||
|
#include "WordWrap.h"
|
||||||
|
#include "Text.h"
|
||||||
|
#include "INIReader.h"
|
||||||
|
|
||||||
#include "sgp_logger.h"
|
#include "sgp_logger.h"
|
||||||
#include <language.hpp>
|
#include <language.hpp>
|
||||||
@@ -650,7 +663,7 @@ UINT32 DebugScreenInit(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static BOOLEAN CheckForAndExitTacticalDebug( )
|
BOOLEAN CheckForAndExitTacticalDebug( )
|
||||||
{
|
{
|
||||||
if ( gfExitDebugScreen )
|
if ( gfExitDebugScreen )
|
||||||
{
|
{
|
||||||
@@ -667,7 +680,7 @@ static BOOLEAN CheckForAndExitTacticalDebug( )
|
|||||||
return( FALSE );
|
return( FALSE );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ExitDebugScreen( )
|
void ExitDebugScreen( )
|
||||||
{
|
{
|
||||||
if ( guiCurrentScreen == DEBUG_SCREEN )
|
if ( guiCurrentScreen == DEBUG_SCREEN )
|
||||||
{
|
{
|
||||||
@@ -922,7 +935,7 @@ UINT32 DemoExitScreenInit(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void DoneFadeOutForDemoExitScreen( void )
|
void DoneFadeOutForDemoExitScreen( void )
|
||||||
{
|
{
|
||||||
gfProgramIsRunning = FALSE;
|
gfProgramIsRunning = FALSE;
|
||||||
}
|
}
|
||||||
@@ -930,7 +943,7 @@ static void DoneFadeOutForDemoExitScreen( void )
|
|||||||
// unused
|
// unused
|
||||||
//extern INT8 gbFadeSpeed;
|
//extern INT8 gbFadeSpeed;
|
||||||
|
|
||||||
static void DisplayTopwareGermanyAddress()
|
void DisplayTopwareGermanyAddress()
|
||||||
{
|
{
|
||||||
VOBJECT_DESC vo_desc;
|
VOBJECT_DESC vo_desc;
|
||||||
UINT32 uiTempID;
|
UINT32 uiTempID;
|
||||||
|
|||||||
@@ -0,0 +1,277 @@
|
|||||||
|
//legion 2
|
||||||
|
#include "types.h"
|
||||||
|
#include "types.h"
|
||||||
|
#include "random.h"
|
||||||
|
#include "Campaign Types.h"
|
||||||
|
#include "Queen Command.h"
|
||||||
|
#include "Overhead.h"
|
||||||
|
#include "Strategic Movement.h"
|
||||||
|
#include "Strategic Status.h"
|
||||||
|
#include "GameSettings.h"
|
||||||
|
#include "Strategic AI.h"
|
||||||
|
#include "XML.h"
|
||||||
|
#include "INIReader.h"
|
||||||
|
#include "Game Event Hook.h"
|
||||||
|
#include "sgp.h"
|
||||||
|
#include "jascreens.h"
|
||||||
|
#include "laptop.h"
|
||||||
|
#include "worlddef.h"
|
||||||
|
#include "Soldier Control.h"
|
||||||
|
#include "Overhead.h"
|
||||||
|
#include "email.h"
|
||||||
|
#include "Soldier Profile.h"
|
||||||
|
#include "strategicmap.h"
|
||||||
|
#include "Game Init.h"
|
||||||
|
#include "Animation Data.h"
|
||||||
|
#include "Soldier Create.h"
|
||||||
|
#include "Soldier Init List.h"
|
||||||
|
#include "strategic.h"
|
||||||
|
#include "Squads.h"
|
||||||
|
#include "Strategic Town Loyalty.h"
|
||||||
|
#include "Strategic Mines.h"
|
||||||
|
#include "gameloop.h"
|
||||||
|
#include "random.h"
|
||||||
|
#include "Map Screen Interface.h"
|
||||||
|
#include "Tactical Save.h"
|
||||||
|
#include "Campaign Types.h"
|
||||||
|
#include "message.h"
|
||||||
|
#include "Game Event Hook.h"
|
||||||
|
#include "Strategic Movement.h"
|
||||||
|
#include "Quests.h"
|
||||||
|
#include "Strategic AI.h"
|
||||||
|
#include "Dialogue Control.h"
|
||||||
|
#include "GameSettings.h"
|
||||||
|
#include "INIReader.h"
|
||||||
|
#include "Soldier Profile.h"
|
||||||
|
#include "XML.h"
|
||||||
|
#include "Item Types.h"
|
||||||
|
#include "Items.h"
|
||||||
|
#include "Text.h"
|
||||||
|
#include "GameSettings.h"
|
||||||
|
|
||||||
|
#ifdef JA2UB
|
||||||
|
#include "Ja25 Strategic Ai.h"
|
||||||
|
#include "Ja25Update.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "legion cfg.h" //legion2
|
||||||
|
#include "Campaign Types.h"
|
||||||
|
#include "Interface.h"
|
||||||
|
#include "Map Screen Interface Map.h"
|
||||||
|
#include "renderworld.h"
|
||||||
|
#include "connect.h"
|
||||||
|
#include "XMLWriter.h"
|
||||||
|
#include "Debug Control.h"
|
||||||
|
#include <vfs/Core/vfs.h>
|
||||||
|
|
||||||
|
GAME_LEGION_OPTIONS gGameLegionOptions;
|
||||||
|
|
||||||
|
#define GAME_LEGION_OPTIONS_FILE "UB_Options.ini"
|
||||||
|
|
||||||
|
void LoadGameLegionOptions();
|
||||||
|
|
||||||
|
#ifdef JA2UB
|
||||||
|
void RandomAddEnemy( UINT8 SectorX, UINT8 SectorY, UINT8 Level );
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void RandomStats ();
|
||||||
|
|
||||||
|
#ifdef JA2UB
|
||||||
|
|
||||||
|
void RandomAddEnemy( UINT8 SectorX, UINT8 SectorY, UINT8 Level )
|
||||||
|
{
|
||||||
|
UNDERGROUND_SECTORINFO *pSector;
|
||||||
|
UINT16 ubNumAdmins = 0;
|
||||||
|
UINT16 ubNumTroops = 0;
|
||||||
|
UINT16 ubNumElites = 0;
|
||||||
|
|
||||||
|
if ( Level != 0 )
|
||||||
|
{
|
||||||
|
pSector = FindUnderGroundSector( SectorX, SectorY, Level );
|
||||||
|
if ( pSector )
|
||||||
|
{
|
||||||
|
if ( pSector->fVisited != TRUE )
|
||||||
|
{
|
||||||
|
switch( gGameOptions.ubDifficultyLevel )
|
||||||
|
{
|
||||||
|
case DIF_LEVEL_EASY:
|
||||||
|
ubNumAdmins = Random( 0 );
|
||||||
|
ubNumTroops = 10 + Random( 5 );
|
||||||
|
ubNumElites = Random( 4 );
|
||||||
|
SetNumberJa25EnemiesInSector( SectorX, SectorY, Level, ubNumAdmins, ubNumTroops, ubNumElites );
|
||||||
|
break;
|
||||||
|
case DIF_LEVEL_MEDIUM:
|
||||||
|
ubNumAdmins = Random( 0 );
|
||||||
|
ubNumTroops = 15 + Random( 8 );
|
||||||
|
ubNumElites = 1 + Random( 2 );
|
||||||
|
SetNumberJa25EnemiesInSector( SectorX, SectorY, Level, ubNumAdmins, ubNumTroops, ubNumElites );
|
||||||
|
break;
|
||||||
|
case DIF_LEVEL_HARD:
|
||||||
|
ubNumAdmins = Random( 0 );
|
||||||
|
ubNumTroops = 20 + Random( 7 );
|
||||||
|
ubNumElites = 2 + Random( 2 );
|
||||||
|
SetNumberJa25EnemiesInSector( SectorX, SectorY, Level, ubNumAdmins, ubNumTroops, ubNumElites );
|
||||||
|
break;
|
||||||
|
case DIF_LEVEL_INSANE:
|
||||||
|
ubNumAdmins = Random( 0 );
|
||||||
|
ubNumTroops = 20 + Random( 3 );
|
||||||
|
ubNumElites = 6 + Random( 3 );
|
||||||
|
SetNumberJa25EnemiesInSector( SectorX, SectorY, Level, ubNumAdmins, ubNumTroops, ubNumElites );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( !GetSectorFlagStatus( SectorX, SectorY, Level, SF_ALREADY_VISITED ) )
|
||||||
|
{
|
||||||
|
switch( gGameOptions.ubDifficultyLevel )
|
||||||
|
{
|
||||||
|
case DIF_LEVEL_EASY:
|
||||||
|
ubNumAdmins = Random( 0 );
|
||||||
|
ubNumTroops = 10 + Random( 5 );
|
||||||
|
ubNumElites = Random( 4 );
|
||||||
|
SetNumberJa25EnemiesInSector( SectorX, SectorY, Level, ubNumAdmins, ubNumTroops, ubNumElites );
|
||||||
|
break;
|
||||||
|
case DIF_LEVEL_MEDIUM:
|
||||||
|
ubNumAdmins = Random( 0 );
|
||||||
|
ubNumTroops = 15 + Random( 8 );
|
||||||
|
ubNumElites = 1 + Random( 2 );
|
||||||
|
SetNumberJa25EnemiesInSector( SectorX, SectorY, Level, ubNumAdmins, ubNumTroops, ubNumElites );
|
||||||
|
break;
|
||||||
|
case DIF_LEVEL_HARD:
|
||||||
|
ubNumAdmins = Random( 0 );
|
||||||
|
ubNumTroops = 23 + Random( 7);
|
||||||
|
ubNumElites = 2 + Random( 2 );
|
||||||
|
SetNumberJa25EnemiesInSector( SectorX, SectorY, Level, ubNumAdmins, ubNumTroops, ubNumElites );
|
||||||
|
break;
|
||||||
|
case DIF_LEVEL_INSANE:
|
||||||
|
ubNumAdmins = Random( 0 );
|
||||||
|
ubNumTroops = 20 + Random( 3 );
|
||||||
|
ubNumElites = 6 + Random( 3 );
|
||||||
|
SetNumberJa25EnemiesInSector( SectorX, SectorY, Level, ubNumAdmins, ubNumTroops, ubNumElites );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void LoadGameLegionOptions()
|
||||||
|
{
|
||||||
|
#ifdef JA2UB
|
||||||
|
JA2_5_START_SECTOR_X = gGameExternalOptions.ubDefaultArrivalSectorX;
|
||||||
|
JA2_5_START_SECTOR_Y = gGameExternalOptions.ubDefaultArrivalSectorY;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
gGameLegionOptions.MercStartingGear25XML = TRUE;
|
||||||
|
gGameLegionOptions.LOCATEGRIDNO = gGameExternalOptions.iInitialMercArrivalLocation;
|
||||||
|
gGameLegionOptions.LOCATEGRIDNO2 = 0;
|
||||||
|
gGameLegionOptions.OLDUBInventory = FALSE;
|
||||||
|
|
||||||
|
CIniReader iniReader(GAME_LEGION_OPTIONS_FILE);
|
||||||
|
|
||||||
|
// -----------------------
|
||||||
|
// Unfinished Business
|
||||||
|
// -----------------------
|
||||||
|
|
||||||
|
gGameLegionOptions.BorderTown = iniReader.ReadBoolean("Unfinished Business Settings","BORDER_TOWN", TRUE);
|
||||||
|
gGameLegionOptions.BorderMine = iniReader.ReadBoolean("Unfinished Business Settings","BORDER_MINE", TRUE);
|
||||||
|
gGameLegionOptions.BorderTeams = iniReader.ReadBoolean("Unfinished Business Settings","BORDER_TEAMS", TRUE);
|
||||||
|
gGameLegionOptions.BorderMilitia = iniReader.ReadBoolean("Unfinished Business Settings","BORDER_MILITIA", FALSE);
|
||||||
|
gGameLegionOptions.BorderAirspace = iniReader.ReadBoolean("Unfinished Business Settings","BORDER_AIRSPACE", TRUE);
|
||||||
|
gGameLegionOptions.BorderItem = iniReader.ReadBoolean("Unfinished Business Settings","BORDER_ITEM", TRUE);
|
||||||
|
|
||||||
|
gGameLegionOptions.EventAttackInitialSectorIfPlayerStillThere = iniReader.ReadBoolean("Unfinished Business Settings","EVENT_ATTACK_INITIAL_SECTOR_IF_PLAYER_STILL_THERE", TRUE);
|
||||||
|
gGameLegionOptions.HandleAddingEnemiesToTunnelMaps = iniReader.ReadBoolean("Unfinished Business Settings","HANDLE_ADDING_ENEMIES_TO_TUNNEL_MAPS", TRUE);
|
||||||
|
gGameLegionOptions.ubEndDefaultSectorX = iniReader.ReadInteger("Unfinished Business Settings","DEFAULT_END_SECTOR_X", 16, 1, 16);
|
||||||
|
gGameLegionOptions.ubEndDefaultSectorY = iniReader.ReadInteger("Unfinished Business Settings","DEFAULT_END_SECTOR_Y", 11, 1, 16);
|
||||||
|
gGameLegionOptions.ubEndDefaultSectorZ = iniReader.ReadInteger("Unfinished Business Settings","DEFAULT_END_SECTOR_Z", 0, 0, 16);
|
||||||
|
gGameLegionOptions.AutoResolove = iniReader.ReadBoolean("Unfinished Business Settings","AUTO_RESOLVE", FALSE);
|
||||||
|
|
||||||
|
gGameLegionOptions.InitialHeliGridNo[ 0 ] = iniReader.ReadInteger("Unfinished Business Settings","INITIAL_HELICOPTER_GRIDNO_1", 14947);
|
||||||
|
gGameLegionOptions.InitialHeliGridNo[ 1 ] = iniReader.ReadInteger("Unfinished Business Settings","INITIAL_HELICOPTER_GRIDNO_2", 15584);
|
||||||
|
gGameLegionOptions.InitialHeliGridNo[ 2 ] = iniReader.ReadInteger("Unfinished Business Settings","INITIAL_HELICOPTER_GRIDNO_3", 15754);
|
||||||
|
gGameLegionOptions.InitialHeliGridNo[ 3 ] = iniReader.ReadInteger("Unfinished Business Settings","INITIAL_HELICOPTER_GRIDNO_4", 16232);
|
||||||
|
gGameLegionOptions.InitialHeliGridNo[ 4 ] = iniReader.ReadInteger("Unfinished Business Settings","INITIAL_HELICOPTER_GRIDNO_5", 16067);
|
||||||
|
gGameLegionOptions.InitialHeliGridNo[ 5 ] = iniReader.ReadInteger("Unfinished Business Settings","INITIAL_HELICOPTER_GRIDNO_6", 16230);
|
||||||
|
gGameLegionOptions.InitialHeliGridNo[ 6 ] = iniReader.ReadInteger("Unfinished Business Settings","INITIAL_HELICOPTER_GRIDNO_7", 15272);
|
||||||
|
|
||||||
|
gGameLegionOptions.InitalHeliRandomTimes[ 0 ] = iniReader.ReadInteger("Unfinished Business Settings","INITIAL_HELICOPTER_RANDOM_TIME_1", 1300);
|
||||||
|
gGameLegionOptions.InitalHeliRandomTimes[ 1 ] = iniReader.ReadInteger("Unfinished Business Settings","INITIAL_HELICOPTER_RANDOM_TIME_2", 2000);
|
||||||
|
gGameLegionOptions.InitalHeliRandomTimes[ 2 ] = iniReader.ReadInteger("Unfinished Business Settings","INITIAL_HELICOPTER_RANDOM_TIME_3", 2750);
|
||||||
|
gGameLegionOptions.InitalHeliRandomTimes[ 3 ] = iniReader.ReadInteger("Unfinished Business Settings","INITIAL_HELICOPTER_RANDOM_TIME_4", 3400);
|
||||||
|
gGameLegionOptions.InitalHeliRandomTimes[ 4 ] = iniReader.ReadInteger("Unfinished Business Settings","INITIAL_HELICOPTER_RANDOM_TIME_5", 4160);
|
||||||
|
gGameLegionOptions.InitalHeliRandomTimes[ 5 ] = iniReader.ReadInteger("Unfinished Business Settings","INITIAL_HELICOPTER_RANDOM_TIME_6", 4700);
|
||||||
|
gGameLegionOptions.InitalHeliRandomTimes[ 6 ] = iniReader.ReadInteger("Unfinished Business Settings","INITIAL_HELICOPTER_RANDOM_TIME_7", 5630);
|
||||||
|
|
||||||
|
gGameLegionOptions.InGameHeliCrash = iniReader.ReadBoolean("Unfinished Business Settings","ENABLE_UB_HELICOPTER_CRASH", TRUE);
|
||||||
|
gGameLegionOptions.JerryQuotes = iniReader.ReadBoolean("Unfinished Business Settings","JERRY_QUOTES", TRUE);
|
||||||
|
gGameLegionOptions.InJerry = iniReader.ReadBoolean("Unfinished Business Settings","JERRY", TRUE);
|
||||||
|
gGameLegionOptions.JerryGridNo = iniReader.ReadInteger("Unfinished Business Settings","JERRY_GRIDNO", 15109);
|
||||||
|
gGameLegionOptions.InGameHeli = iniReader.ReadBoolean("Unfinished Business Settings","ENABLE_JA2_HELICOPTER_LANDING", FALSE);
|
||||||
|
|
||||||
|
gGameLegionOptions.SwitchInMorrisAreaGridNo = iniReader.ReadInteger("Unfinished Business Settings","SWITCH_IN_MORRIS_AREA_GRIDNO", 15231);
|
||||||
|
gGameLegionOptions.SwitchToLaunchMisslesGridNo1 = iniReader.ReadInteger("Unfinished Business Settings","SWITCH_TO_LAUNCH_MISSLES_GRIDNO_1", 14268);
|
||||||
|
gGameLegionOptions.SwitchToLaunchMisslesGridNo2 = iniReader.ReadInteger("Unfinished Business Settings","SWITCH_TO_LAUNCH_MISSLES_GRIDNO_2", 15708);
|
||||||
|
gGameLegionOptions.RadioLocatorsGridNo1 = iniReader.ReadInteger("Unfinished Business Settings","RADIO_LOCATORS_GRIDNO_1", 15070);
|
||||||
|
gGameLegionOptions.RadioLocatorsGridNo2 = iniReader.ReadInteger("Unfinished Business Settings","RADIO_LOCATORS_GRIDNO_2", 14744);
|
||||||
|
gGameLegionOptions.PowergenSectorGridNo1 = iniReader.ReadInteger("Unfinished Business Settings","POWERGEN_SECTOR_GRIDNO_1", 15100);
|
||||||
|
gGameLegionOptions.PowergenSectorGridNo2 = iniReader.ReadInteger("Unfinished Business Settings","POWERGEN_SECTOR_GRIDNO_2", 12220);
|
||||||
|
gGameLegionOptions.PowergenSectorGridNo3 = iniReader.ReadInteger("Unfinished Business Settings","POWERGEN_SECTOR_GRIDNO_3", 14155);
|
||||||
|
gGameLegionOptions.PowergenSectorGridNo4 = iniReader.ReadInteger("Unfinished Business Settings","POWERGEN_SECTOR_GRIDNO_4", 13980);
|
||||||
|
|
||||||
|
gGameLegionOptions.PowergenSectorExitgridGridNo = iniReader.ReadInteger("Unfinished Business Settings","POWERGEN_SECTOR_EXITGRID_GRIDNO", 19749);
|
||||||
|
gGameLegionOptions.PowergenFanSoundGridNo1 = iniReader.ReadInteger("Unfinished Business Settings","POWERGEN_FAN_SOUND_GRIDNO_1", 10979);
|
||||||
|
gGameLegionOptions.PowergenFanSoundGridNo2 = iniReader.ReadInteger("Unfinished Business Settings","POWERGEN_FAN_SOUND_GRIDNO_2", 19749);
|
||||||
|
gGameLegionOptions.StartFanbackupAgainGridNo = iniReader.ReadInteger("Unfinished Business Settings","START_FANBACKUP_AGAIN_GRIDNO", 10980);
|
||||||
|
gGameLegionOptions.StopPowergenFanGridNo = iniReader.ReadInteger("Unfinished Business Settings","STOP_POWERGEN_FAN_GRIDNO", 10980);
|
||||||
|
|
||||||
|
//sec J13
|
||||||
|
gGameLegionOptions.FanGridNo[0] = iniReader.ReadInteger("Unfinished Business Settings","FAN_GRIDNO_1", 10978);
|
||||||
|
gGameLegionOptions.FanGridNo[1] = iniReader.ReadInteger("Unfinished Business Settings","FAN_GRIDNO_2", 10979);
|
||||||
|
gGameLegionOptions.FanGridNo[2] = iniReader.ReadInteger("Unfinished Business Settings","FAN_GRIDNO_3", 10980);
|
||||||
|
gGameLegionOptions.FanGridNo[3] = iniReader.ReadInteger("Unfinished Business Settings","FAN_GRIDNO_4", 10818);
|
||||||
|
gGameLegionOptions.FanGridNo[4] = iniReader.ReadInteger("Unfinished Business Settings","FAN_GRIDNO_5", 10819);
|
||||||
|
gGameLegionOptions.FanGridNo[5] = iniReader.ReadInteger("Unfinished Business Settings","FAN_GRIDNO_6", 10820);
|
||||||
|
gGameLegionOptions.FanGridNo[6] = iniReader.ReadInteger("Unfinished Business Settings","FAN_GRIDNO_7", 10658);
|
||||||
|
gGameLegionOptions.FanGridNo[7] = iniReader.ReadInteger("Unfinished Business Settings","FAN_GRIDNO_8", 10659);
|
||||||
|
gGameLegionOptions.FanGridNo[8] = iniReader.ReadInteger("Unfinished Business Settings","FAN_GRIDNO_9", 10660);
|
||||||
|
|
||||||
|
if ( gGameLegionOptions.InGameHeli == TRUE )
|
||||||
|
gGameLegionOptions.InGameHeliCrash = FALSE;
|
||||||
|
|
||||||
|
if ( gGameLegionOptions.InGameHeliCrash == TRUE )
|
||||||
|
gGameLegionOptions.InGameHeli = FALSE;
|
||||||
|
|
||||||
|
if ( gGameLegionOptions.InGameHeli == TRUE && gGameLegionOptions.InGameHeliCrash == TRUE )
|
||||||
|
{
|
||||||
|
gGameLegionOptions.InGameHeliCrash = TRUE;
|
||||||
|
gGameLegionOptions.InGameHeli = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// -----------------------
|
||||||
|
// Campaign
|
||||||
|
// -----------------------
|
||||||
|
|
||||||
|
gGameLegionOptions.EnemyXML = iniReader.ReadBoolean("Campaign Settings","USE_ENEMY_ARMY_XMLS", TRUE);
|
||||||
|
gGameLegionOptions.AddRandomEnemyToSector = iniReader.ReadBoolean("Campaign Settings","ADD_RANDOM_ENEMY_TO_SECTOR", FALSE);
|
||||||
|
gGameLegionOptions.StrategicMovementCostsXML = iniReader.ReadBoolean("Campaign Settings","STRATEGIC_MOVEMENT_COSTS_XML", FALSE);
|
||||||
|
gGameLegionOptions.MakeStrategicMovementCosts = iniReader.ReadBoolean("Campaign Settings","MAKE_STRATEGIC_MOVEMENT_COSTS", FALSE);
|
||||||
|
gGameLegionOptions.LaptopQuestEnabled = iniReader.ReadBoolean("Campaign Settings","LAPTOP_QUEST", TRUE);
|
||||||
|
gGameLegionOptions.pJA2UB = iniReader.ReadBoolean("Campaign Settings","JA2UB", TRUE);
|
||||||
|
gGameLegionOptions.fDeadMerc = iniReader.ReadBoolean("Campaign Settings","NOTIFY_ON_DEAD_AIM_MERCS", FALSE);
|
||||||
|
|
||||||
|
// -----------------------
|
||||||
|
// Laptop
|
||||||
|
// -----------------------
|
||||||
|
|
||||||
|
gGameLegionOptions.LaptopIMPPassJA2 = iniReader.ReadBoolean("Laptop Settings","IMP_PASS_JA2", FALSE);
|
||||||
|
gGameLegionOptions.LaptopIMPPassUB = iniReader.ReadBoolean("Laptop Settings","IMP_PASS_UB", TRUE);
|
||||||
|
gGameLegionOptions.LaptopLinkInsurance = iniReader.ReadBoolean("Laptop Settings","LINK_INSURANCE", FALSE);
|
||||||
|
gGameLegionOptions.LaptopLinkFuneral = iniReader.ReadBoolean("Laptop Settings","LINK_FUNERAL", TRUE);
|
||||||
|
gGameLegionOptions.LaptopLinkBobby = iniReader.ReadBoolean("Laptop Settings","LINK_BOBBY", FALSE);
|
||||||
|
gGameLegionOptions.fBobbyRSite = iniReader.ReadBoolean("Laptop Settings","BOBBY_SITE_ACCESSED", FALSE);
|
||||||
|
}
|
||||||
@@ -0,0 +1,105 @@
|
|||||||
|
#ifndef _LEGION_CFG_H
|
||||||
|
#define _LEGION_CFG_H
|
||||||
|
|
||||||
|
#include "soldier profile type.h"
|
||||||
|
|
||||||
|
extern void LoadGameLegionOptions();
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
BOOLEAN BorderTown;
|
||||||
|
BOOLEAN BorderMine;
|
||||||
|
BOOLEAN BorderTeams;
|
||||||
|
BOOLEAN BorderMilitia;
|
||||||
|
BOOLEAN BorderAirspace;
|
||||||
|
BOOLEAN BorderItem;
|
||||||
|
|
||||||
|
BOOLEAN EnemyXML;
|
||||||
|
BOOLEAN EventAttackInitialSectorIfPlayerStillThere;
|
||||||
|
BOOLEAN HandleAddingEnemiesToTunnelMaps;
|
||||||
|
BOOLEAN BobbyRayInventory_UB;
|
||||||
|
BOOLEAN InitTownLoyalty_UB;
|
||||||
|
BOOLEAN AutoResolove;
|
||||||
|
BOOLEAN AddRandomEnemyToSector;
|
||||||
|
BOOLEAN StrategicMovementCostsXML;
|
||||||
|
BOOLEAN MakeStrategicMovementCosts;
|
||||||
|
BOOLEAN MercStartingGear25XML;
|
||||||
|
UINT32 InitialHeliGridNo[ 7 ];
|
||||||
|
INT16 InitalHeliRandomTimes[ 7 ];
|
||||||
|
UINT32 LOCATEGRIDNO;
|
||||||
|
BOOLEAN LaptopIMPPassJA2;
|
||||||
|
BOOLEAN LaptopIMPPassUB;
|
||||||
|
|
||||||
|
UINT8 ubDefaultArrivalSectorX;
|
||||||
|
UINT8 ubDefaultArrivalSectorY;
|
||||||
|
|
||||||
|
INT32 iStartingCashNovice;
|
||||||
|
INT32 iStartingCashExperienced;
|
||||||
|
INT32 iStartingCashExpert;
|
||||||
|
INT32 iStartingCashInsane;
|
||||||
|
|
||||||
|
BOOLEAN TEX_AND_JOHN;
|
||||||
|
|
||||||
|
BOOLEAN Random_Manuel_Text;
|
||||||
|
|
||||||
|
BOOLEAN RISRAPORT;
|
||||||
|
|
||||||
|
BOOLEAN LaptopQuestEnabled;
|
||||||
|
|
||||||
|
BOOLEAN InGameHeliCrash;
|
||||||
|
|
||||||
|
BOOLEAN InGameHeli;
|
||||||
|
|
||||||
|
UINT32 LOCATEGRIDNO2;
|
||||||
|
|
||||||
|
BOOLEAN JerryQuotes;
|
||||||
|
|
||||||
|
BOOLEAN InJerry;
|
||||||
|
|
||||||
|
UINT32 JerryGridNo;
|
||||||
|
|
||||||
|
UINT32 SwitchInMorrisAreaGridNo;
|
||||||
|
UINT32 SwitchToLaunchMisslesGridNo1;
|
||||||
|
UINT32 SwitchToLaunchMisslesGridNo2;
|
||||||
|
UINT32 RadioLocatorsGridNo1;
|
||||||
|
UINT32 RadioLocatorsGridNo2;
|
||||||
|
UINT32 PowergenSectorGridNo1;
|
||||||
|
UINT32 PowergenSectorGridNo2;
|
||||||
|
UINT32 PowergenSectorGridNo3;
|
||||||
|
UINT32 PowergenSectorGridNo4;
|
||||||
|
UINT32 PowergenSectorExitgridGridNo;
|
||||||
|
UINT32 PowergenFanSoundGridNo1;
|
||||||
|
UINT32 PowergenFanSoundGridNo2;
|
||||||
|
UINT32 StartFanbackupAgainGridNo;
|
||||||
|
UINT32 StopPowergenFanGridNo;
|
||||||
|
|
||||||
|
BOOLEAN TestUB;
|
||||||
|
|
||||||
|
BOOLEAN LaptopLinkInsurance;
|
||||||
|
BOOLEAN LaptopLinkFuneral;
|
||||||
|
BOOLEAN LaptopLinkBobby;
|
||||||
|
|
||||||
|
UINT32 FanGridNo[9];
|
||||||
|
|
||||||
|
UINT8 ubEndDefaultSectorX;
|
||||||
|
UINT8 ubEndDefaultSectorY;
|
||||||
|
UINT8 ubEndDefaultSectorZ;
|
||||||
|
|
||||||
|
BOOLEAN pJA2UB;
|
||||||
|
|
||||||
|
BOOLEAN fBobbyRSite;
|
||||||
|
BOOLEAN fDeadMerc;
|
||||||
|
|
||||||
|
BOOLEAN OLDUBInventory;
|
||||||
|
|
||||||
|
} GAME_LEGION_OPTIONS;
|
||||||
|
|
||||||
|
extern GAME_LEGION_OPTIONS gGameLegionOptions;
|
||||||
|
|
||||||
|
#ifdef JA2UB
|
||||||
|
extern void RandomAddEnemy( UINT8 SectorX, UINT8 SectorY, UINT8 Level );
|
||||||
|
extern void RandomStats ();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern void RandomStats ();
|
||||||
|
#endif
|
||||||
+1
-11
@@ -200,17 +200,7 @@ void LoadGameUBOptions()
|
|||||||
gGameUBOptions.BorderItem = iniReader.ReadBoolean("Unfinished Business Settings","BORDER_ITEM", TRUE);
|
gGameUBOptions.BorderItem = iniReader.ReadBoolean("Unfinished Business Settings","BORDER_ITEM", TRUE);
|
||||||
|
|
||||||
gGameUBOptions.EventAttackInitialSectorIfPlayerStillThere = iniReader.ReadBoolean("Unfinished Business Settings","EVENT_ATTACK_INITIAL_SECTOR_IF_PLAYER_STILL_THERE", TRUE);
|
gGameUBOptions.EventAttackInitialSectorIfPlayerStillThere = iniReader.ReadBoolean("Unfinished Business Settings","EVENT_ATTACK_INITIAL_SECTOR_IF_PLAYER_STILL_THERE", TRUE);
|
||||||
gGameUBOptions.HandleAddingEnemiesToTunnelMaps = iniReader.ReadBoolean("Unfinished Business Settings","HANDLE_ADDING_ENEMIES_TO_TUNNEL_MAPS", TRUE);
|
gGameUBOptions.HandleAddingEnemiesToTunnelMaps = iniReader.ReadBoolean("Unfinished Business Settings","HANDLE_ADDING_ENEMIES_TO_TUNNEL_MAPS", TRUE);
|
||||||
|
|
||||||
//J14-1
|
|
||||||
gGameUBOptions.Tunnel1_SectorX = iniReader.ReadInteger("Unfinished Business Settings", "TUNNEL1_SECTOR_X", 14);
|
|
||||||
gGameUBOptions.Tunnel1_SectorY = iniReader.ReadInteger("Unfinished Business Settings", "TUNNEL1_SECTOR_Y", 10);
|
|
||||||
gGameUBOptions.Tunnel1_SectorZ = iniReader.ReadInteger("Unfinished Business Settings", "TUNNEL1_SECTOR_Z", 1);
|
|
||||||
//K14-1
|
|
||||||
gGameUBOptions.Tunnel2_SectorX = iniReader.ReadInteger("Unfinished Business Settings", "TUNNEL2_SECTOR_X", 14);
|
|
||||||
gGameUBOptions.Tunnel2_SectorY = iniReader.ReadInteger("Unfinished Business Settings", "TUNNEL2_SECTOR_Y", 11);
|
|
||||||
gGameUBOptions.Tunnel2_SectorZ = iniReader.ReadInteger("Unfinished Business Settings", "TUNNEL2_SECTOR_Z", 1);
|
|
||||||
|
|
||||||
gGameUBOptions.ubEndDefaultSectorX = iniReader.ReadInteger("Unfinished Business Settings","DEFAULT_END_SECTOR_X", 16, 1, 16);
|
gGameUBOptions.ubEndDefaultSectorX = iniReader.ReadInteger("Unfinished Business Settings","DEFAULT_END_SECTOR_X", 16, 1, 16);
|
||||||
gGameUBOptions.ubEndDefaultSectorY = iniReader.ReadInteger("Unfinished Business Settings","DEFAULT_END_SECTOR_Y", 11, 1, 16);
|
gGameUBOptions.ubEndDefaultSectorY = iniReader.ReadInteger("Unfinished Business Settings","DEFAULT_END_SECTOR_Y", 11, 1, 16);
|
||||||
gGameUBOptions.ubEndDefaultSectorZ = iniReader.ReadInteger("Unfinished Business Settings","DEFAULT_END_SECTOR_Z", 0, 0, 16);
|
gGameUBOptions.ubEndDefaultSectorZ = iniReader.ReadInteger("Unfinished Business Settings","DEFAULT_END_SECTOR_Z", 0, 0, 16);
|
||||||
|
|||||||
@@ -224,14 +224,6 @@ typedef struct
|
|||||||
INT16 BettyBloodCatSectorX;
|
INT16 BettyBloodCatSectorX;
|
||||||
INT16 BettyBloodCatSectorY;
|
INT16 BettyBloodCatSectorY;
|
||||||
INT8 BettyBloodCatSectorZ;
|
INT8 BettyBloodCatSectorZ;
|
||||||
|
|
||||||
INT16 Tunnel1_SectorX;
|
|
||||||
INT16 Tunnel1_SectorY;
|
|
||||||
INT8 Tunnel1_SectorZ;
|
|
||||||
|
|
||||||
INT16 Tunnel2_SectorX;
|
|
||||||
INT16 Tunnel2_SectorY;
|
|
||||||
INT8 Tunnel2_SectorZ;
|
|
||||||
} GAME_UB_OPTIONS;
|
} GAME_UB_OPTIONS;
|
||||||
|
|
||||||
extern GAME_UB_OPTIONS gGameUBOptions;
|
extern GAME_UB_OPTIONS gGameUBOptions;
|
||||||
|
|||||||
+11
-21
@@ -565,35 +565,25 @@ BOOLEAN CPostalService::DeliverShipment(UINT16 usShipmentID)
|
|||||||
|
|
||||||
StopTimeCompression();
|
StopTimeCompression();
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
|
|
||||||
|
//no UB
|
||||||
if ( gGameUBOptions.fBobbyRSite == TRUE )
|
if ( gGameUBOptions.fBobbyRSite == TRUE )
|
||||||
{
|
{
|
||||||
// Shipment from Bobby Ray
|
// Shipment from Bobby Ray
|
||||||
if ( shs.sSenderID == BOBBYR_SENDER_ID )
|
if (shs.sSenderID == BOBBYR_SENDER_ID)
|
||||||
{
|
AddBobbyREmailJA2( 198, 4, BOBBY_R, GetWorldTotalMin(), -1, gusCurShipmentDestinationID, TYPE_EMAIL_BOBBY_R_EMAIL_JA2_EDT);
|
||||||
if ( gEmails.size() > 0 )
|
|
||||||
{
|
|
||||||
AddEmailFromXML(XML_BR_SHIPMENTARRIVAL, GetWorldTotalMin(), -1, gusCurShipmentDestinationID, false, -1, -1, 198, -1, -1, -1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
AddBobbyREmailJA2(198, 4, BOBBY_R, GetWorldTotalMin(), -1, gusCurShipmentDestinationID, TYPE_EMAIL_BOBBY_R_EMAIL_JA2_EDT);
|
|
||||||
// Shipment from John Kulba
|
// Shipment from John Kulba
|
||||||
//else
|
//else
|
||||||
// AddEmail( JOHN_KULBA_GIFT_IN_DRASSEN, JOHN_KULBA_GIFT_IN_DRASSEN_LENGTH, JOHN_KULBA, GetWorldTotalMin(), -1, gusCurShipmentDestinationID, TYPE_EMAIL_EMAIL_EDT);
|
// AddEmail( JOHN_KULBA_GIFT_IN_DRASSEN, JOHN_KULBA_GIFT_IN_DRASSEN_LENGTH, JOHN_KULBA, GetWorldTotalMin(), -1, gusCurShipmentDestinationID, TYPE_EMAIL_EMAIL_EDT);
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
// Shipment from Bobby Ray
|
|
||||||
if ( shs.sSenderID == BOBBYR_SENDER_ID )
|
// Shipment from Bobby Ray
|
||||||
{
|
if (shs.sSenderID == BOBBYR_SENDER_ID)
|
||||||
AddEmail(BOBBYR_SHIPMENT_ARRIVED, BOBBYR_SHIPMENT_ARRIVED_LENGTH, BOBBY_R, GetWorldTotalMin(), -1, gusCurShipmentDestinationID, TYPE_EMAIL_EMAIL_EDT, XML_BR_SHIPMENTARRIVAL);
|
AddEmail( BOBBYR_SHIPMENT_ARRIVED, BOBBYR_SHIPMENT_ARRIVED_LENGTH, BOBBY_R, GetWorldTotalMin(), -1, gusCurShipmentDestinationID, TYPE_EMAIL_EMAIL_EDT);
|
||||||
}
|
// Shipment from John Kulba
|
||||||
// Shipment from John Kulba
|
else
|
||||||
else
|
AddEmail( JOHN_KULBA_GIFT_IN_DRASSEN, JOHN_KULBA_GIFT_IN_DRASSEN_LENGTH, JOHN_KULBA, GetWorldTotalMin(), -1, gusCurShipmentDestinationID, TYPE_EMAIL_EMAIL_EDT);
|
||||||
{
|
|
||||||
AddEmail(JOHN_KULBA_GIFT_IN_DRASSEN, JOHN_KULBA_GIFT_IN_DRASSEN_LENGTH, JOHN_KULBA, GetWorldTotalMin(), -1, gusCurShipmentDestinationID, TYPE_EMAIL_EMAIL_EDT, XML_JOHNKULBA_SENTGUNS);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+246
-155
@@ -1,204 +1,295 @@
|
|||||||
#include "sgp.h"
|
#include "sgp.h"
|
||||||
#include "Debug Control.h"
|
#include "Debug Control.h"
|
||||||
#include "expat.h"
|
#include "expat.h"
|
||||||
#include "XML.h"
|
#include "XML.h"
|
||||||
#include "Interface.h"
|
#include "Interface.h"
|
||||||
#include "LuaInitNPCs.h"
|
#include "LuaInitNPCs.h"
|
||||||
#include "email.h"
|
#include "email.h"
|
||||||
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
PARSE_STAGE curElement;
|
PARSE_STAGE curElement;
|
||||||
|
|
||||||
CHAR8 szCharData[MAIL_STRING_SIZE + 1];
|
CHAR8 szCharData[MAIL_STRING_SIZE+1];
|
||||||
CHAR16 currentMessage[MAIL_STRING_SIZE];
|
EMAIL_OTHER_VALUES curEmailOther;
|
||||||
UINT16 currentEmailIndex;
|
|
||||||
UINT16 currentMessageIndex;
|
|
||||||
|
|
||||||
UINT32 maxArraySize;
|
UINT32 maxArraySize;
|
||||||
UINT32 curIndex;
|
UINT32 curIndex;
|
||||||
UINT32 currentDepth;
|
UINT32 currentDepth;
|
||||||
UINT32 maxReadDepth;
|
UINT32 maxReadDepth;
|
||||||
} typedef EmailXMLParseData;
|
}
|
||||||
|
|
||||||
BOOLEAN Emails_TextOnly;
|
typedef EmailOtherParseData;
|
||||||
|
|
||||||
|
BOOLEAN EmailOther_TextOnly;
|
||||||
|
|
||||||
static void XMLCALL
|
static void XMLCALL
|
||||||
EmailOtherStartElementHandle(void* userData, const XML_Char* name, const XML_Char** atts)
|
EmailOtherStartElementHandle(void *userData, const XML_Char *name, const XML_Char **atts)
|
||||||
{
|
{
|
||||||
EmailXMLParseData* pData = (EmailXMLParseData*)userData;
|
EmailOtherParseData * pData = (EmailOtherParseData *)userData;
|
||||||
|
|
||||||
if (pData->currentDepth <= pData->maxReadDepth) //are we reading this element?
|
if(pData->currentDepth <= pData->maxReadDepth) //are we reading this element?
|
||||||
{
|
{
|
||||||
if (strcmp(name, "EMAILS") == 0 && pData->curElement == ELEMENT_NONE)
|
if(strcmp(name, "NEW_EMAIL") == 0 && pData->curElement == ELEMENT_NONE)
|
||||||
{
|
{
|
||||||
pData->curElement = ELEMENT_LIST;
|
pData->curElement = ELEMENT_LIST;
|
||||||
|
|
||||||
pData->maxReadDepth++; //we are not skipping this element
|
pData->maxReadDepth++; //we are not skipping this element
|
||||||
}
|
}
|
||||||
else if (strcmp(name, "EMAIL") == 0 && pData->curElement == ELEMENT_LIST)
|
else if(strcmp(name, "EMAIL") == 0 && pData->curElement == ELEMENT_LIST)
|
||||||
{
|
{
|
||||||
pData->curElement = ELEMENT;
|
pData->curElement = ELEMENT;
|
||||||
|
|
||||||
pData->maxReadDepth++; //we are not skipping this element
|
pData->maxReadDepth++; //we are not skipping this element
|
||||||
}
|
}
|
||||||
else if (pData->curElement == ELEMENT &&
|
else if(pData->curElement == ELEMENT &&
|
||||||
(strcmp(name, "Index") == 0 ||
|
(strcmp(name, "uiIndex") == 0 ||
|
||||||
strcmp(name, "Sender") == 0 ||
|
strcmp(name, "Subject") == 0 ||
|
||||||
strcmp(name, "Subject") == 0 ||
|
strcmp(name, "Message0") == 0 ||
|
||||||
strcmp(name, "Message") == 0))
|
strcmp(name, "Message1") == 0 ||
|
||||||
{
|
strcmp(name, "Message2") == 0 ||
|
||||||
pData->curElement = ELEMENT_PROPERTY;
|
strcmp(name, "Message3") == 0 ||
|
||||||
|
strcmp(name, "Message4") == 0 ||
|
||||||
|
strcmp(name, "Message5") == 0 ||
|
||||||
|
strcmp(name, "Message6") == 0 ||
|
||||||
|
strcmp(name, "Message7") == 0 ||
|
||||||
|
strcmp(name, "Message8") == 0 ||
|
||||||
|
strcmp(name, "Message9") == 0 ||
|
||||||
|
strcmp(name, "Message10") == 0 ||
|
||||||
|
strcmp(name, "Message11") == 0 ||
|
||||||
|
strcmp(name, "Message12") == 0 ||
|
||||||
|
strcmp(name, "Message13") == 0 ||
|
||||||
|
strcmp(name, "Message14") == 0 ||
|
||||||
|
strcmp(name, "Message15") == 0 ||
|
||||||
|
strcmp(name, "Message16") == 0 ||
|
||||||
|
strcmp(name, "Message17") == 0 ||
|
||||||
|
strcmp(name, "Message18") == 0 ||
|
||||||
|
strcmp(name, "Message19") == 0 ||
|
||||||
|
strcmp(name, "Message20") == 0 ||
|
||||||
|
strcmp(name, "Message21") == 0 ||
|
||||||
|
strcmp(name, "Message22") == 0 ||
|
||||||
|
strcmp(name, "Message23") == 0 ||
|
||||||
|
strcmp(name, "Message24") == 0 ||
|
||||||
|
strcmp(name, "Message25") == 0 ||
|
||||||
|
strcmp(name, "Message26") == 0 ||
|
||||||
|
strcmp(name, "Message27") == 0 ||
|
||||||
|
strcmp(name, "Message28") == 0 ||
|
||||||
|
strcmp(name, "Message29") == 0 ))
|
||||||
|
{
|
||||||
|
pData->curElement = ELEMENT_PROPERTY;
|
||||||
|
|
||||||
pData->maxReadDepth++; //we are not skipping this element
|
pData->maxReadDepth++; //we are not skipping this element
|
||||||
}
|
}
|
||||||
|
|
||||||
pData->szCharData[0] = '\0';
|
pData->szCharData[0] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
pData->currentDepth++;
|
pData->currentDepth++;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void XMLCALL
|
static void XMLCALL
|
||||||
EmailOtherCharacterDataHandle(void* userData, const XML_Char* str, int len)
|
EmailOtherCharacterDataHandle(void *userData, const XML_Char *str, int len)
|
||||||
{
|
{
|
||||||
EmailXMLParseData* pData = (EmailXMLParseData*)userData;
|
EmailOtherParseData * pData = (EmailOtherParseData *)userData;
|
||||||
|
|
||||||
if ((pData->currentDepth <= pData->maxReadDepth) &&
|
if( (pData->currentDepth <= pData->maxReadDepth) &&
|
||||||
(strlen(pData->szCharData) < MAX_CHAR_DATA_LENGTH)
|
(strlen(pData->szCharData) < MAX_CHAR_DATA_LENGTH)
|
||||||
) {
|
){
|
||||||
strncat(pData->szCharData, str, __min((unsigned int)len, MAX_CHAR_DATA_LENGTH - strlen(pData->szCharData)));
|
strncat(pData->szCharData,str,__min((unsigned int)len,MAX_CHAR_DATA_LENGTH-strlen(pData->szCharData)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void XMLCALL
|
static void XMLCALL
|
||||||
EmailOtherEndElementHandle(void* userData, const XML_Char* name)
|
EmailOtherEndElementHandle(void *userData, const XML_Char *name)
|
||||||
{
|
{
|
||||||
EmailXMLParseData* pData = (EmailXMLParseData*)userData;
|
EmailOtherParseData * pData = (EmailOtherParseData *)userData;
|
||||||
|
|
||||||
if (pData->currentDepth <= pData->maxReadDepth)
|
if(pData->currentDepth <= pData->maxReadDepth)
|
||||||
{
|
{
|
||||||
if (strcmp(name, "EMAILS") == 0)
|
if(strcmp(name, "NEW_EMAIL") == 0)
|
||||||
{
|
{
|
||||||
pData->curElement = ELEMENT_NONE;
|
pData->curElement = ELEMENT_NONE;
|
||||||
}
|
}
|
||||||
else if (strcmp(name, "EMAIL") == 0)
|
else if(strcmp(name, "EMAIL") == 0)
|
||||||
{
|
{
|
||||||
pData->curElement = ELEMENT_LIST;
|
pData->curElement = ELEMENT_LIST;
|
||||||
if ( Emails_TextOnly )
|
|
||||||
{
|
if (!EmailOther_TextOnly)
|
||||||
pData->currentEmailIndex += 1;
|
{
|
||||||
pData->currentMessageIndex = 0;
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szSubject, pData->curEmailOther.szSubject);
|
||||||
}
|
// L"12345678901234567890123456789" <- max lenght (szMessage[30])
|
||||||
}
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[0], L"1. sdssdsfs dfg fdgd fg test" ); //pData-curEmailOther.szMessage[0]);
|
||||||
else if (strcmp(name, "Sender") == 0)
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[1], L"2. sdssdsfs dfg fgfgffds test" );
|
||||||
{
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[2], L"3. sdssdsfsd gdfg fdfgsf test" );
|
||||||
pData->curElement = ELEMENT;
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[3], L"4. sdssdsf dgdfg dgsfdsf test" );
|
||||||
if ( !Emails_TextOnly )
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[4], L"5. sdssdsfdgdfg dgfddsf test" );
|
||||||
{
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[5], L"6. sdssdsfsffdsf test" );
|
||||||
gEmails.push_back(EMAIL_XML {});
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[6], L"7. sdssdsfsffdsf test" );
|
||||||
gEmails.back().Sender = atol(pData->szCharData);
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[7], L"8. sdssdsfsfdgdgfgfdsf test" );
|
||||||
}
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[8], L"9. sdssdsfsff dg gdg dsf test" );
|
||||||
}
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[9], L"10. sdssdsfsfgdsgdfgfdsf test" );
|
||||||
else if (strcmp(name, "Subject") == 0)
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[10], L"11. sdssdsfsff dgfgd dsf test" );
|
||||||
{
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[11], L"12. sdssdsfsf dfgdfg dsf test" );
|
||||||
pData->curElement = ELEMENT;
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[12], L"13. sdssdsfsf dfgg gfdsf test" );
|
||||||
if ( !Emails_TextOnly )
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[13], L"14. sdssdsf dgdf gsffdsf test" );
|
||||||
{
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[14], L"15. sdssdsf dgdf f ffdsf test" );
|
||||||
MultiByteToWideChar(CP_UTF8, 0, pData->szCharData, -1, gEmails.back().Subject, sizeof(gEmails.back().Subject) / sizeof(gEmails.back().Subject[0]));
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[15], L"16. sdssdsfs dgdf gffdsf test" );
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Replace existing text with localized version
|
|
||||||
const auto i = pData->currentEmailIndex;
|
|
||||||
MultiByteToWideChar(CP_UTF8, 0, pData->szCharData, -1, gEmails[i].Subject, sizeof(gEmails[i].Subject) / sizeof(gEmails[i].Subject[0]));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (strcmp(name, "Message") == 0)
|
|
||||||
{
|
|
||||||
pData->curElement = ELEMENT;
|
|
||||||
MultiByteToWideChar(CP_UTF8, 0, pData->szCharData, -1, pData->currentMessage, sizeof(pData->currentMessage) / sizeof(pData->currentMessage[0]));
|
|
||||||
|
|
||||||
if ( !Emails_TextOnly )
|
/*
|
||||||
{
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[1], pData->curEmailOther.szMessage[1]);
|
||||||
gEmails.back().Messages.emplace_back(pData->currentMessage);
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[2], pData->curEmailOther.szMessage[2]);
|
||||||
}
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[3], pData->curEmailOther.szMessage[3]);
|
||||||
else
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[4], pData->curEmailOther.szMessage[4]);
|
||||||
{
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[5], pData->curEmailOther.szMessage[5]);
|
||||||
// Replace existing text with localized version
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[6], pData->curEmailOther.szMessage[6]);
|
||||||
const auto i = pData->currentEmailIndex;
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[7], pData->curEmailOther.szMessage[7]);
|
||||||
const auto j = pData->currentMessageIndex;
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[8], pData->curEmailOther.szMessage[8]);
|
||||||
gEmails[i].Messages[j] = pData->currentMessage;
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[9], pData->curEmailOther.szMessage[9]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[10], pData->curEmailOther.szMessage[10]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[11], pData->curEmailOther.szMessage[11]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[12], pData->curEmailOther.szMessage[12]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[13], pData->curEmailOther.szMessage[13]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[14], pData->curEmailOther.szMessage[14]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[15], pData->curEmailOther.szMessage[15]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[16], pData->curEmailOther.szMessage[16]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[17], pData->curEmailOther.szMessage[17]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[18], pData->curEmailOther.szMessage[18]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[19], pData->curEmailOther.szMessage[19]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[20], pData->curEmailOther.szMessage[20]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[21], pData->curEmailOther.szMessage[21]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[22], pData->curEmailOther.szMessage[22]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[23], pData->curEmailOther.szMessage[23]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[24], pData->curEmailOther.szMessage[24]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[25], pData->curEmailOther.szMessage[25]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[26], pData->curEmailOther.szMessage[26]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[27], pData->curEmailOther.szMessage[27]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[28], pData->curEmailOther.szMessage[28]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[29], pData->curEmailOther.szMessage[29]);
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szSubject, pData->curEmailOther.szSubject);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[0], L"sdssdsfsffdsf test" ); //pData->curEmailOther.szMessage[0]);
|
||||||
|
/*
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[1], pData->curEmailOther.szMessage[1]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[2], pData->curEmailOther.szMessage[2]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[3], pData->curEmailOther.szMessage[3]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[4], pData->curEmailOther.szMessage[4]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[5], pData->curEmailOther.szMessage[5]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[6], pData->curEmailOther.szMessage[6]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[7], pData->curEmailOther.szMessage[7]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[8], pData->curEmailOther.szMessage[8]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[9], pData->curEmailOther.szMessage[9]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[10], pData->curEmailOther.szMessage[10]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[11], pData->curEmailOther.szMessage[11]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[12], pData->curEmailOther.szMessage[12]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[13], pData->curEmailOther.szMessage[13]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[14], pData->curEmailOther.szMessage[14]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[15], pData->curEmailOther.szMessage[15]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[16], pData->curEmailOther.szMessage[16]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[17], pData->curEmailOther.szMessage[17]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[18], pData->curEmailOther.szMessage[18]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[19], pData->curEmailOther.szMessage[19]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[20], pData->curEmailOther.szMessage[20]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[21], pData->curEmailOther.szMessage[21]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[22], pData->curEmailOther.szMessage[22]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[23], pData->curEmailOther.szMessage[23]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[24], pData->curEmailOther.szMessage[24]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[25], pData->curEmailOther.szMessage[25]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[26], pData->curEmailOther.szMessage[26]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[27], pData->curEmailOther.szMessage[27]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[28], pData->curEmailOther.szMessage[28]);
|
||||||
|
wcscpy(EmailOtherText[pData->curEmailOther.uiIndex].szMessage[29], pData->curEmailOther.szMessage[29]);
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(strcmp(name, "uiIndex") == 0)
|
||||||
|
{
|
||||||
|
pData->curElement = ELEMENT;
|
||||||
|
pData->curEmailOther.uiIndex = (UINT8) atol(pData->szCharData);
|
||||||
|
}
|
||||||
|
else if(strcmp(name, "Subject") == 0 )
|
||||||
|
{
|
||||||
|
pData->curElement = ELEMENT;
|
||||||
|
|
||||||
pData->currentMessageIndex++;
|
MultiByteToWideChar( CP_UTF8, 0, pData->szCharData, -1, pData->curEmailOther.szSubject, sizeof(pData->curEmailOther.szSubject)/sizeof(pData->curEmailOther.szSubject[0]) );
|
||||||
}
|
pData->curEmailOther.szSubject[sizeof(pData->curEmailOther.szSubject)/sizeof(pData->curEmailOther.szSubject[0]) - 1] = '\0';
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
else if(strcmp(name, "Message0") == 0 )
|
||||||
|
{
|
||||||
|
pData->curElement = ELEMENT;
|
||||||
|
|
||||||
pData->maxReadDepth--;
|
MultiByteToWideChar( CP_UTF8, 0, pData->szCharData, -1, pData->curEmailOther.szMessage[0], sizeof(pData->curEmailOther.szMessage[0])/sizeof(pData->curEmailOther.szMessage[0]) );
|
||||||
}
|
pData->curEmailOther.szMessage[sizeof(pData->curEmailOther.szMessage[0])/sizeof(pData->curEmailOther.szMessage[0]) - 1][0] = '\0';
|
||||||
pData->currentDepth--;
|
}
|
||||||
|
*/
|
||||||
|
pData->maxReadDepth--;
|
||||||
|
}
|
||||||
|
pData->currentDepth--;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOLEAN ReadInExternalizedEmails(STR fileName, BOOLEAN localizedVersion)
|
BOOLEAN ReadInEmailOther(STR fileName, BOOLEAN localizedVersion)
|
||||||
{
|
{
|
||||||
HWFILE hFile;
|
HWFILE hFile;
|
||||||
UINT32 uiBytesRead;
|
UINT32 uiBytesRead;
|
||||||
UINT32 uiFSize;
|
UINT32 uiFSize;
|
||||||
CHAR8* lpcBuffer;
|
CHAR8 * lpcBuffer;
|
||||||
XML_Parser parser = XML_ParserCreate(NULL);
|
XML_Parser parser = XML_ParserCreate(NULL);
|
||||||
|
|
||||||
EmailXMLParseData pData;
|
EmailOtherParseData pData;
|
||||||
|
|
||||||
DebugMsg(TOPIC_JA2, DBG_LEVEL_3, "Loading Emails.xml");
|
DebugMsg(TOPIC_JA2, DBG_LEVEL_3, "Loading EmailOther.xml" );
|
||||||
|
|
||||||
Emails_TextOnly = localizedVersion;
|
EmailOther_TextOnly = localizedVersion;
|
||||||
|
|
||||||
|
// Open file
|
||||||
|
hFile = FileOpen( fileName, FILE_ACCESS_READ, FALSE );
|
||||||
|
if ( !hFile )
|
||||||
|
return( localizedVersion );
|
||||||
|
|
||||||
// Open file
|
uiFSize = FileGetSize(hFile);
|
||||||
hFile = FileOpen(fileName, FILE_ACCESS_READ, FALSE);
|
lpcBuffer = (CHAR8 *) MemAlloc(uiFSize+1);
|
||||||
if (!hFile)
|
|
||||||
return(localizedVersion);
|
|
||||||
|
|
||||||
uiFSize = FileGetSize(hFile);
|
//Read in block
|
||||||
lpcBuffer = (CHAR8*)MemAlloc(uiFSize + 1);
|
if ( !FileRead( hFile, lpcBuffer, uiFSize, &uiBytesRead ) )
|
||||||
|
{
|
||||||
|
MemFree(lpcBuffer);
|
||||||
|
return( FALSE );
|
||||||
|
}
|
||||||
|
|
||||||
//Read in block
|
lpcBuffer[uiFSize] = 0; //add a null terminator
|
||||||
if (!FileRead(hFile, lpcBuffer, uiFSize, &uiBytesRead))
|
|
||||||
{
|
|
||||||
MemFree(lpcBuffer);
|
|
||||||
return(FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
lpcBuffer[uiFSize] = 0; //add a null terminator
|
FileClose( hFile );
|
||||||
|
|
||||||
FileClose(hFile);
|
|
||||||
|
|
||||||
|
|
||||||
XML_SetElementHandler(parser, EmailOtherStartElementHandle, EmailOtherEndElementHandle);
|
XML_SetElementHandler(parser, EmailOtherStartElementHandle, EmailOtherEndElementHandle);
|
||||||
XML_SetCharacterDataHandler(parser, EmailOtherCharacterDataHandle);
|
XML_SetCharacterDataHandler(parser, EmailOtherCharacterDataHandle);
|
||||||
|
|
||||||
|
|
||||||
memset(&pData, 0, sizeof(pData));
|
memset(&pData,0,sizeof(pData));
|
||||||
XML_SetUserData(parser, &pData);
|
XML_SetUserData(parser, &pData);
|
||||||
|
|
||||||
gEmails.reserve(XML_JA2UB_SPECK_DISMISSALREFUND);
|
|
||||||
if (!XML_Parse(parser, lpcBuffer, uiFSize, TRUE))
|
|
||||||
{
|
|
||||||
CHAR8 errorBuf[511];
|
|
||||||
|
|
||||||
sprintf(errorBuf, "XML Parser Error in Emails.xml: %s at line %d", XML_ErrorString(XML_GetErrorCode(parser)), XML_GetCurrentLineNumber(parser));
|
|
||||||
LiveMessage(errorBuf);
|
|
||||||
|
|
||||||
MemFree(lpcBuffer);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
MemFree(lpcBuffer);
|
|
||||||
|
|
||||||
|
|
||||||
XML_ParserFree(parser);
|
if(!XML_Parse(parser, lpcBuffer, uiFSize, TRUE))
|
||||||
|
{
|
||||||
|
CHAR8 errorBuf[511];
|
||||||
|
|
||||||
|
sprintf(errorBuf, "XML Parser Error in EmailOther.xml: %s at line %d", XML_ErrorString(XML_GetErrorCode(parser)), XML_GetCurrentLineNumber(parser));
|
||||||
|
LiveMessage(errorBuf);
|
||||||
|
|
||||||
|
MemFree(lpcBuffer);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
MemFree(lpcBuffer);
|
||||||
|
|
||||||
|
|
||||||
return(TRUE);
|
XML_ParserFree(parser);
|
||||||
|
|
||||||
|
|
||||||
|
return( TRUE );
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -3,6 +3,7 @@
|
|||||||
#include "Utilities.h"
|
#include "Utilities.h"
|
||||||
#include "WCheck.h"
|
#include "WCheck.h"
|
||||||
#include "Timer Control.h"
|
#include "Timer Control.h"
|
||||||
|
#include "DEBUG.H"
|
||||||
#include "WordWrap.h"
|
#include "WordWrap.h"
|
||||||
#include "Encrypted File.h"
|
#include "Encrypted File.h"
|
||||||
#include "email.h"
|
#include "email.h"
|
||||||
@@ -15,7 +16,7 @@
|
|||||||
#include "sysutil.h"
|
#include "sysutil.h"
|
||||||
|
|
||||||
#include "LocalizedStrings.h"
|
#include "LocalizedStrings.h"
|
||||||
#include <soldier profile type.h>
|
#include "Soldier Profile.h"
|
||||||
|
|
||||||
UINT8 MAX_NUMBER_MERCS = 0;
|
UINT8 MAX_NUMBER_MERCS = 0;
|
||||||
|
|
||||||
|
|||||||
+511
-518
File diff suppressed because it is too large
Load Diff
+19
-97
@@ -5,7 +5,8 @@
|
|||||||
#include "soldier profile type.h"
|
#include "soldier profile type.h"
|
||||||
|
|
||||||
// defines
|
// defines
|
||||||
#define MAX_MESSAGES_PAGE 18 // max number of emails per page in inbox
|
#define MAX_EMAIL_LINES 10 //max number of lines can be shown in a message
|
||||||
|
#define MAX_MESSAGES_PAGE 18 // max number of messages per page
|
||||||
|
|
||||||
//---ja25 ub
|
//---ja25 ub
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
@@ -566,10 +567,11 @@ void RenderEmail();
|
|||||||
|
|
||||||
|
|
||||||
// message manipulation
|
// message manipulation
|
||||||
void AddEmailMessage(INT32 iMessageOffset, INT32 iMessageLength,STR16 pSubject, INT32 iDate, UINT8 ubSender, BOOLEAN fAlreadyRead, INT32 iFirstData, UINT32 uiSecondData, INT32 iThirdData, INT32 iFourthData, UINT32 uiFifthData, UINT32 uiSixData, INT32 iCurrentIMPPosition, INT16 iCurrentShipmentDestinationID, UINT8 EmailType, UINT32 EmailAIM );
|
void AddEmailMessage(INT32 iMessageOffset, INT32 iMessageLength,STR16 pSubject, INT32 iDate, UINT8 ubSender, BOOLEAN fAlreadyRead, INT32 uiFirstData, UINT32 uiSecondData, INT32 iCurrentIMPPosition, INT16 iCurrentShipmentDestinationID, UINT8 EmailType, UINT32 EmailAIM );
|
||||||
void RemoveEmailMessage(INT32 iId);
|
void RemoveEmailMessage(INT32 iId);
|
||||||
EmailPtr GetEmailMessage(INT32 iId);
|
EmailPtr GetEmailMessage(INT32 iId);
|
||||||
void LookForUnread();
|
void LookForUnread();
|
||||||
|
void AddEmail(INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender, INT32 iDate, INT32 iCurrentIMPPosition, INT16 iCurrentShipmentDestinationID, UINT8 EmailType);
|
||||||
|
|
||||||
// WANNE: For the new WF merc, when they available again
|
// WANNE: For the new WF merc, when they available again
|
||||||
void AddEmailWFMercAvailable(INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender, INT32 iDate, INT32 iCurrentIMPPosition, UINT8 EmailType);
|
void AddEmailWFMercAvailable(INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender, INT32 iDate, INT32 iCurrentIMPPosition, UINT8 EmailType);
|
||||||
@@ -584,19 +586,14 @@ void ReDrawNewMailBox( void );
|
|||||||
void ReDisplayBoxes( void );
|
void ReDisplayBoxes( void );
|
||||||
void ShutDownEmailList();
|
void ShutDownEmailList();
|
||||||
void AddMessageToPages(INT32 iMessageId);
|
void AddMessageToPages(INT32 iMessageId);
|
||||||
|
void AddEmailWithSpecialData(INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender, INT32 iDate, INT32 iFirstData, UINT32 uiSecondData, UINT8 EmailType, UINT32 EmailAIM );
|
||||||
|
|
||||||
|
void AddCustomEmail(INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender, INT32 iDate, INT32 iCurrentIMPPosition, INT16 iCurrentShipmentDestinationID, UINT8 EmailType);
|
||||||
|
|
||||||
#ifdef JA2BETAVERSION
|
#ifdef JA2BETAVERSION
|
||||||
void AddAllEmails();
|
void AddAllEmails();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
UINT8 Sender;
|
|
||||||
CHAR16 Subject[EMAIL_SUBJECT_LENGTH];
|
|
||||||
std::vector<std::wstring> Messages;
|
|
||||||
} EMAIL_XML;
|
|
||||||
extern std::vector<EMAIL_XML> gEmails;
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
UINT8 uiIndex;
|
UINT8 uiIndex;
|
||||||
@@ -677,8 +674,8 @@ enum {
|
|||||||
TYPE_EMAIL_KING_PIN,
|
TYPE_EMAIL_KING_PIN,
|
||||||
TYPE_EMAIL_JOHN_KULBA,
|
TYPE_EMAIL_JOHN_KULBA,
|
||||||
TYPE_EMAIL_AIM_SITE,
|
TYPE_EMAIL_AIM_SITE,
|
||||||
//Read message from Email\Emails.xml and sender read from Email\EmailSenderNameList.xml
|
|
||||||
TYPE_EMAIL_XML,
|
TYPE_EMAIL_OTHER,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
@@ -700,96 +697,15 @@ enum {
|
|||||||
TYPE_EMAIL_BOBBY_R_L1 = 11,
|
TYPE_EMAIL_BOBBY_R_L1 = 11,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
|
||||||
XML_NOEMAIL = -1,
|
|
||||||
XML_ENRICO_INQUIRY = 0,
|
|
||||||
XML_ENRICO_FOLLOWUP,
|
|
||||||
XML_ENRICO_CONFIRMED,
|
|
||||||
XML_ENRICO_GOODLUCK,
|
|
||||||
XML_ENRICO_GREATNEWS,
|
|
||||||
XML_ENRICO_PROGRESS,
|
|
||||||
XML_ENRICO_GOODWORK,
|
|
||||||
XML_ENRICO_FINALPUSH,
|
|
||||||
XML_ENRICO_SETBACK,
|
|
||||||
XML_ENRICO_BADNEWS,
|
|
||||||
XML_ENRICO_CREPITUS,
|
|
||||||
XML_ENRICO_CONCERNED,
|
|
||||||
XML_ENRICO_WORRIED,
|
|
||||||
XML_ENRICO_DISAPPOINTED,
|
|
||||||
XML_ENRICO_MILITIA_WEBSITE,
|
|
||||||
XML_ENRICO_INTEL,
|
|
||||||
XML_IMP_INTRO,
|
|
||||||
XML_IMP_INTROAGAIN,
|
|
||||||
XML_SPECK_INTRO,
|
|
||||||
XML_SPECK_NEWSITE,
|
|
||||||
XML_SPECK_NOTICE,
|
|
||||||
XML_SPECK_NEWPERSONNEL,
|
|
||||||
XML_SPECK_PLEASEPAY,
|
|
||||||
XML_SPECK_DELINQUENT,
|
|
||||||
XML_RISREPORT,
|
|
||||||
XML_INSURANCE_APPROVED,
|
|
||||||
XML_INSURANCE_SUSPICIOUS,
|
|
||||||
XML_INSURANCE_COMPLETED,
|
|
||||||
XML_INSURANCE_INVESTIGATION,
|
|
||||||
XML_INSURANCE_REFUSED,
|
|
||||||
XML_INSURANCE_POLICYVIOLATION,
|
|
||||||
XML_BR_VISITEDSITE,
|
|
||||||
XML_BR_SHIPMENTARRIVAL,
|
|
||||||
XML_BR_MEDUNA,
|
|
||||||
XML_KINGPIN_STOLEMONEY,
|
|
||||||
XML_KINGPIN_JOBOPPORTUNITY,
|
|
||||||
XML_KINGPIN_WELLDONE,
|
|
||||||
XML_KINGPIN_FAILURE,
|
|
||||||
XML_KINGPIN_FAILUREOBSTACLES,
|
|
||||||
XML_JOHNKULBA_SENTGUNS,
|
|
||||||
XML_JOHNKULBA_MISSEDTRANSFERFLIGHT,
|
|
||||||
XML_JOHNKULBA_CRASHLANDEDHELI,
|
|
||||||
XML_JOHNKULBA_AMBUSHEDBYCATS,
|
|
||||||
XML_AIM_NOTICE_OF_DEATH,
|
|
||||||
XML_AIM_REFUND,
|
|
||||||
XML_AIM_PARTIALREFUND,
|
|
||||||
XML_AIM_NOREFUND,
|
|
||||||
XML_KERBERUS_OFFER,
|
|
||||||
XML_DASILVA_THANKYOU,
|
|
||||||
XML_JA2UB_ENRICO_HELP,
|
|
||||||
XML_JA2UB_ENRICO_INQUIRY,
|
|
||||||
XML_JA2UB_ENRICO_STILLNOWORD,
|
|
||||||
XML_JA2UB_ENRICO_GOODNEWS,
|
|
||||||
XML_JA2UB_ENRICO_CONCERNED,
|
|
||||||
XML_JA2UB_ENRICO_URGENT,
|
|
||||||
XML_JA2UB_ENRICO_RECEIVEDEMAIL,
|
|
||||||
XML_JA2UB_ENRICO_RECEIVEDEMAILMONEY,
|
|
||||||
XML_JA2UB_ENRICO_PILOTFOUND,
|
|
||||||
XML_JA2UB_ENRICO_CONGRATS,
|
|
||||||
XML_JA2UB_ENRICO_CONGRATS_MIGUELSICK,
|
|
||||||
XML_JA2UB_ENRICO_CONGRATS_MIGUELSICK_MANUELDEAD,
|
|
||||||
XML_JA2UB_ENRICO_CONGRATS_MIGUELSICK_MANUELALIVE,
|
|
||||||
XML_JA2UB_ENRICO_CONGRATS_MANUELDEAD,
|
|
||||||
XML_JA2UB_ENRICO_CONGRATS_MANUELALIVE,
|
|
||||||
XML_JA2UB_IMP_INTRO,
|
|
||||||
XML_JA2UB_IMP_INTROAGAIN,
|
|
||||||
XML_JA2UB_MIGUEL_HELLO,
|
|
||||||
XML_JA2UB_MIGUEL_SORRY,
|
|
||||||
XML_JA2UB_MIGUEL_SORRY_HIREDMANUEL,
|
|
||||||
XML_JA2UB_MIGUEL_SICK,
|
|
||||||
XML_JA2UB_MIGUEL_CIGARETTES,
|
|
||||||
XML_JA2UB_AIM_SPECIALOFFER,
|
|
||||||
XML_JA2UB_AIM_BONUSOFFER,
|
|
||||||
XML_JA2UB_AIM_SPECIALBONUSOFFER,
|
|
||||||
XML_JA2UB_AIM_DISMISSALREFUND,
|
|
||||||
XML_JA2UB_SPECK_EVENBETTEROFFER,
|
|
||||||
XML_JA2UB_SPECK_DISMISSALREFUND
|
|
||||||
};
|
|
||||||
void AddEmail(INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender, INT32 iDate, INT32 iCurrentIMPPosition, INT16 iCurrentShipmentDestinationID, UINT8 EmailType, UINT16 EnumEmailXML = XML_NOEMAIL);
|
|
||||||
void AddEmailWithSpecialData(INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender, INT32 iDate, INT32 iFirstData, UINT32 uiSecondData, UINT8 EmailType, UINT32 EmailAIM, UINT16 EnumEmailXML = XML_NOEMAIL);
|
|
||||||
|
|
||||||
extern EMAIL_MERC_AVAILABLE_VALUES EmailMercAvailableText[NUM_PROFILES];
|
extern EMAIL_MERC_AVAILABLE_VALUES EmailMercAvailableText[NUM_PROFILES];
|
||||||
extern EMAIL_MERC_LEVEL_UP_VALUES EmailMercLevelUpText[NUM_PROFILES];
|
extern EMAIL_MERC_LEVEL_UP_VALUES EmailMercLevelUpText[NUM_PROFILES];
|
||||||
|
extern EMAIL_MERC_INSURANCE_VALUES EmailInsuranceText[NUM_PROFILES];
|
||||||
|
|
||||||
|
extern EMAIL_OTHER_VALUES EmailOtherText[EMAIL_INDEX];
|
||||||
extern BOOLEAN ReadXMLEmail;
|
extern BOOLEAN ReadXMLEmail;
|
||||||
extern void AddEmailTypeXML( INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender, INT32 iDate, INT32 iCurrentIMPPosition, UINT8 EmailType );
|
extern void AddEmailTypeXML( INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender, INT32 iDate, INT32 iCurrentIMPPosition, UINT8 EmailType );
|
||||||
extern void AddPreReadEmailTypeXML( INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender, INT32 iDate, UINT8 EmailType );
|
extern void AddPreReadEmailTypeXML( INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender, INT32 iDate, UINT8 EmailType );
|
||||||
extern void AddEmailFromXML(INT32 iMessageOffset, INT32 iDate, INT32 iCurrentIMPPosition, INT16 iCurrentShipmentDestinationID, BOOLEAN alreadyRead, INT32 iFirstData, UINT32 uiSecondData, INT32 iThirdData, INT32 iFourthData, UINT32 uiFifthData, UINT32 uiSixData);
|
extern void AddEmailWithSpecialDataXML(INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender, INT32 iDate, INT32 iFirstData, UINT32 uiSecondData, UINT8 EmailTyp, UINT32 EmailAIMe );
|
||||||
extern void AddEmailWithSpecialDataXML(INT32 iMessageOffset, INT32 iDate, INT32 iCurrentIMPPosition, INT16 iCurrentShipmentDestinationID, BOOLEAN alreadyRead, INT32 iFirstData, UINT32 uiSecondData, INT32 iThirdData, INT32 iFourthData, UINT32 uiFifthData, UINT32 uiSixData);
|
|
||||||
extern BOOLEAN SaveNewEmailDataToSaveGameFile( HWFILE hFile );
|
extern BOOLEAN SaveNewEmailDataToSaveGameFile( HWFILE hFile );
|
||||||
extern BOOLEAN LoadNewEmailDataFromLoadGameFile( HWFILE hFile );
|
extern BOOLEAN LoadNewEmailDataFromLoadGameFile( HWFILE hFile );
|
||||||
|
|
||||||
@@ -798,3 +714,9 @@ extern void AddBobbyREmailJA2(INT32 iMessageOffset, INT32 iMessageLength, UINT8
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1350,8 +1350,7 @@ BOOLEAN AddLifeInsurancePayout( SOLDIERTYPE *pSoldier )
|
|||||||
|
|
||||||
void StartInsuranceInvestigation( UINT16 ubPayoutID )
|
void StartInsuranceInvestigation( UINT16 ubPayoutID )
|
||||||
{
|
{
|
||||||
const auto mercID = LaptopSaveInfo.pLifeInsurancePayouts[ubPayoutID].ubMercID;
|
UINT8 ubDays;
|
||||||
const auto payoutPrice = LaptopSaveInfo.pLifeInsurancePayouts[ubPayoutID].iPayOutPrice;
|
|
||||||
|
|
||||||
// send an email telling player an investigation is taking place
|
// send an email telling player an investigation is taking place
|
||||||
if (gStrategicStatus.ubInsuranceInvestigationsCnt == 0)
|
if (gStrategicStatus.ubInsuranceInvestigationsCnt == 0)
|
||||||
@@ -1362,12 +1361,10 @@ void StartInsuranceInvestigation( UINT16 ubPayoutID )
|
|||||||
if( gubQuest[ QUEST_FIX_LAPTOP ] == QUESTDONE || gGameUBOptions.LaptopQuestEnabled == FALSE )
|
if( gubQuest[ QUEST_FIX_LAPTOP ] == QUESTDONE || gGameUBOptions.LaptopQuestEnabled == FALSE )
|
||||||
{
|
{
|
||||||
if ( gGameUBOptions.LaptopLinkInsurance == TRUE )
|
if ( gGameUBOptions.LaptopLinkInsurance == TRUE )
|
||||||
{
|
AddEmailWithSpecialData( 173, INSUR_SUSPIC_LENGTH, INSURANCE_COMPANY, GetWorldTotalMin(), LaptopSaveInfo.pLifeInsurancePayouts[ ubPayoutID ].iPayOutPrice, LaptopSaveInfo.pLifeInsurancePayouts[ ubPayoutID ].ubMercID, TYPE_EMAIL_INSURANCE_COMPANY_EMAIL_JA2_EDT, TYPE_E_INSURANCE_L4 );
|
||||||
AddEmailWithSpecialData(173, INSUR_SUSPIC_LENGTH, INSURANCE_COMPANY, GetWorldTotalMin(), payoutPrice, mercID, TYPE_EMAIL_INSURANCE_COMPANY_EMAIL_JA2_EDT, TYPE_E_INSURANCE_L4, XML_INSURANCE_SUSPICIOUS);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
AddEmailWithSpecialData(INSUR_SUSPIC, INSUR_SUSPIC_LENGTH, INSURANCE_COMPANY, GetWorldTotalMin(), payoutPrice, mercID, TYPE_EMAIL_EMAIL_EDT, TYPE_E_NONE, XML_INSURANCE_SUSPICIOUS);
|
AddEmailWithSpecialData( INSUR_SUSPIC, INSUR_SUSPIC_LENGTH, INSURANCE_COMPANY, GetWorldTotalMin(), LaptopSaveInfo.pLifeInsurancePayouts[ ubPayoutID ].iPayOutPrice, LaptopSaveInfo.pLifeInsurancePayouts[ ubPayoutID ].ubMercID, TYPE_EMAIL_EMAIL_EDT, TYPE_E_NONE );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1378,17 +1375,14 @@ void StartInsuranceInvestigation( UINT16 ubPayoutID )
|
|||||||
if( gubQuest[ QUEST_FIX_LAPTOP ] == QUESTDONE || gGameUBOptions.LaptopQuestEnabled == FALSE )
|
if( gubQuest[ QUEST_FIX_LAPTOP ] == QUESTDONE || gGameUBOptions.LaptopQuestEnabled == FALSE )
|
||||||
{
|
{
|
||||||
if ( gGameUBOptions.LaptopLinkInsurance == TRUE )
|
if ( gGameUBOptions.LaptopLinkInsurance == TRUE )
|
||||||
{
|
AddEmailWithSpecialData( 179, INSUR_SUSPIC_2_LENGTH, INSURANCE_COMPANY, GetWorldTotalMin(), LaptopSaveInfo.pLifeInsurancePayouts[ ubPayoutID ].iPayOutPrice, LaptopSaveInfo.pLifeInsurancePayouts[ ubPayoutID ].ubMercID, TYPE_EMAIL_INSURANCE_COMPANY_EMAIL_JA2_EDT, TYPE_E_INSURANCE_L5 );
|
||||||
AddEmailWithSpecialData(179, INSUR_SUSPIC_2_LENGTH, INSURANCE_COMPANY, GetWorldTotalMin(), payoutPrice, mercID, TYPE_EMAIL_INSURANCE_COMPANY_EMAIL_JA2_EDT, TYPE_E_INSURANCE_L5, XML_INSURANCE_INVESTIGATION);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
AddEmailWithSpecialData(INSUR_SUSPIC_2, INSUR_SUSPIC_2_LENGTH, INSURANCE_COMPANY, GetWorldTotalMin(), payoutPrice, mercID, TYPE_EMAIL_EMAIL_EDT, TYPE_E_NONE, XML_INSURANCE_INVESTIGATION);
|
AddEmailWithSpecialData( INSUR_SUSPIC_2, INSUR_SUSPIC_2_LENGTH, INSURANCE_COMPANY, GetWorldTotalMin(), LaptopSaveInfo.pLifeInsurancePayouts[ ubPayoutID ].iPayOutPrice, LaptopSaveInfo.pLifeInsurancePayouts[ ubPayoutID ].ubMercID, TYPE_EMAIL_EMAIL_EDT, TYPE_E_NONE );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT8 ubDays;
|
if ( gMercProfiles[ LaptopSaveInfo.pLifeInsurancePayouts[ ubPayoutID ].ubMercID ].ubSuspiciousDeath == VERY_SUSPICIOUS_DEATH )
|
||||||
if ( gMercProfiles[ mercID ].ubSuspiciousDeath == VERY_SUSPICIOUS_DEATH )
|
|
||||||
{
|
{
|
||||||
// the fact that you tried to cheat them gets realized very quickly. :-)
|
// the fact that you tried to cheat them gets realized very quickly. :-)
|
||||||
ubDays = 1;
|
ubDays = 1;
|
||||||
@@ -1409,47 +1403,42 @@ void StartInsuranceInvestigation( UINT16 ubPayoutID )
|
|||||||
|
|
||||||
void EndInsuranceInvestigation( UINT16 ubPayoutID )
|
void EndInsuranceInvestigation( UINT16 ubPayoutID )
|
||||||
{
|
{
|
||||||
const auto mercID = LaptopSaveInfo.pLifeInsurancePayouts[ubPayoutID].ubMercID;
|
|
||||||
const auto payoutPrice = LaptopSaveInfo.pLifeInsurancePayouts[ubPayoutID].iPayOutPrice;
|
|
||||||
|
|
||||||
// send an email telling player the investigation is over
|
// send an email telling player the investigation is over
|
||||||
if ( gMercProfiles[ mercID ].ubSuspiciousDeath == VERY_SUSPICIOUS_DEATH )
|
if ( gMercProfiles[ LaptopSaveInfo.pLifeInsurancePayouts[ ubPayoutID ].ubMercID ].ubSuspiciousDeath == VERY_SUSPICIOUS_DEATH )
|
||||||
{
|
{
|
||||||
// fraud, no payout!
|
// fraud, no payout!
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
if ( gubQuest[QUEST_FIX_LAPTOP] == QUESTDONE || gGameUBOptions.LaptopQuestEnabled == FALSE )
|
// no UB
|
||||||
{
|
if( gubQuest[ QUEST_FIX_LAPTOP ] == QUESTDONE || gGameUBOptions.LaptopQuestEnabled == FALSE )
|
||||||
if ( gGameUBOptions.LaptopLinkInsurance == TRUE )
|
{
|
||||||
{
|
if ( gGameUBOptions.LaptopLinkInsurance == TRUE )
|
||||||
AddEmailWithSpecialData(INSUR_1HOUR_FRAUD, INSUR_1HOUR_FRAUD_LENGTH, INSURANCE_COMPANY, GetWorldTotalMin(), payoutPrice, mercID, TYPE_EMAIL_INSURANCE_COMPANY_EMAIL_JA2_EDT, TYPE_E_INSURANCE_L2, XML_INSURANCE_REFUSED);
|
AddEmailWithSpecialData( INSUR_1HOUR_FRAUD, INSUR_1HOUR_FRAUD_LENGTH, INSURANCE_COMPANY, GetWorldTotalMin(), LaptopSaveInfo.pLifeInsurancePayouts[ ubPayoutID ].iPayOutPrice, LaptopSaveInfo.pLifeInsurancePayouts[ ubPayoutID ].ubMercID, TYPE_EMAIL_INSURANCE_COMPANY_EMAIL_JA2_EDT, TYPE_E_INSURANCE_L2 );
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
AddEmailWithSpecialData(INSUR_1HOUR_FRAUD, INSUR_1HOUR_FRAUD_LENGTH, INSURANCE_COMPANY, GetWorldTotalMin(), payoutPrice, mercID, TYPE_EMAIL_EMAIL_EDT, TYPE_E_NONE, XML_INSURANCE_REFUSED);
|
AddEmailWithSpecialData( INSUR_1HOUR_FRAUD, INSUR_1HOUR_FRAUD_LENGTH, INSURANCE_COMPANY, GetWorldTotalMin(), LaptopSaveInfo.pLifeInsurancePayouts[ ubPayoutID ].iPayOutPrice, LaptopSaveInfo.pLifeInsurancePayouts[ ubPayoutID ].ubMercID, TYPE_EMAIL_EMAIL_EDT, TYPE_E_NONE );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
// Flugente: also don't pay out if the death was suspicious. I mean, we get this if there were no enemies of the player straight up shot the guy...
|
// Flugente: also don't pay out if the death was suspicious. I mean, we get this if there were no enemies of the player straight up shot the guy...
|
||||||
else if ( gMercProfiles[mercID].ubSuspiciousDeath == SUSPICIOUS_DEATH )
|
else if ( gMercProfiles[LaptopSaveInfo.pLifeInsurancePayouts[ubPayoutID].ubMercID].ubSuspiciousDeath == SUSPICIOUS_DEATH )
|
||||||
{
|
{
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
// WANNE: I really don't know if we should call something here. At least it fixed the compilation error when compiling UB version.
|
// WANNE: I really don't know if we should call something here. At least it fixed the compilation error when compiling UB version.
|
||||||
#else
|
#else
|
||||||
// fraud, no payout!
|
// fraud, no payout!
|
||||||
AddEmailWithSpecialData(INSUR_CHEAT_FRAUD, INSUR_CHEAT_FRAUD_LENGTH, INSURANCE_COMPANY, GetWorldTotalMin(), payoutPrice, mercID, TYPE_EMAIL_EMAIL_EDT, TYPE_E_NONE, XML_INSURANCE_POLICYVIOLATION);
|
AddEmailWithSpecialData( INSUR_CHEAT_FRAUD, INSUR_CHEAT_FRAUD_LENGTH, INSURANCE_COMPANY, GetWorldTotalMin(), LaptopSaveInfo.pLifeInsurancePayouts[ubPayoutID].iPayOutPrice, LaptopSaveInfo.pLifeInsurancePayouts[ubPayoutID].ubMercID, TYPE_EMAIL_EMAIL_EDT, TYPE_E_NONE );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
|
// No UB
|
||||||
if( gubQuest[ QUEST_FIX_LAPTOP ] == QUESTDONE || gGameUBOptions.LaptopQuestEnabled == FALSE )
|
if( gubQuest[ QUEST_FIX_LAPTOP ] == QUESTDONE || gGameUBOptions.LaptopQuestEnabled == FALSE )
|
||||||
{
|
{
|
||||||
if ( gGameUBOptions.LaptopLinkInsurance == TRUE )
|
if ( gGameUBOptions.LaptopLinkInsurance == TRUE )
|
||||||
{
|
AddEmailWithSpecialData( 176, INSUR_INVEST_OVER_LENGTH, INSURANCE_COMPANY, GetWorldTotalMin(), LaptopSaveInfo.pLifeInsurancePayouts[ ubPayoutID ].iPayOutPrice, LaptopSaveInfo.pLifeInsurancePayouts[ ubPayoutID ].ubMercID, TYPE_EMAIL_INSURANCE_COMPANY_EMAIL_JA2_EDT, TYPE_E_INSURANCE_L6 );
|
||||||
AddEmailWithSpecialData(176, INSUR_INVEST_OVER_LENGTH, INSURANCE_COMPANY, GetWorldTotalMin(), payoutPrice, mercID, TYPE_EMAIL_INSURANCE_COMPANY_EMAIL_JA2_EDT, TYPE_E_INSURANCE_L6, XML_INSURANCE_COMPLETED);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
AddEmailWithSpecialData(INSUR_INVEST_OVER, INSUR_INVEST_OVER_LENGTH, INSURANCE_COMPANY, GetWorldTotalMin(), payoutPrice, mercID, TYPE_EMAIL_EMAIL_EDT, TYPE_E_NONE, XML_INSURANCE_COMPLETED);
|
AddEmailWithSpecialData( INSUR_INVEST_OVER, INSUR_INVEST_OVER_LENGTH, INSURANCE_COMPANY, GetWorldTotalMin(), LaptopSaveInfo.pLifeInsurancePayouts[ ubPayoutID ].iPayOutPrice, LaptopSaveInfo.pLifeInsurancePayouts[ ubPayoutID ].ubMercID, TYPE_EMAIL_EMAIL_EDT, TYPE_E_NONE );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// only now make a payment (immediately)
|
// only now make a payment (immediately)
|
||||||
@@ -1461,9 +1450,6 @@ void EndInsuranceInvestigation( UINT16 ubPayoutID )
|
|||||||
//void InsuranceContractPayLifeInsuranceForDeadMerc( LIFE_INSURANCE_PAYOUT *pPayoutStruct )
|
//void InsuranceContractPayLifeInsuranceForDeadMerc( LIFE_INSURANCE_PAYOUT *pPayoutStruct )
|
||||||
void InsuranceContractPayLifeInsuranceForDeadMerc( UINT16 ubPayoutID )
|
void InsuranceContractPayLifeInsuranceForDeadMerc( UINT16 ubPayoutID )
|
||||||
{
|
{
|
||||||
const auto mercID = LaptopSaveInfo.pLifeInsurancePayouts[ubPayoutID].ubMercID;
|
|
||||||
const auto payoutPrice = LaptopSaveInfo.pLifeInsurancePayouts[ubPayoutID].iPayOutPrice;
|
|
||||||
|
|
||||||
//if the mercs id number is the same what is in the soldier array
|
//if the mercs id number is the same what is in the soldier array
|
||||||
if( LaptopSaveInfo.pLifeInsurancePayouts[ ubPayoutID ].ubSoldierID == LaptopSaveInfo.pLifeInsurancePayouts[ ubPayoutID ].ubSoldierID->ubID )
|
if( LaptopSaveInfo.pLifeInsurancePayouts[ ubPayoutID ].ubSoldierID == LaptopSaveInfo.pLifeInsurancePayouts[ ubPayoutID ].ubSoldierID->ubID )
|
||||||
{
|
{
|
||||||
@@ -1473,25 +1459,24 @@ void InsuranceContractPayLifeInsuranceForDeadMerc( UINT16 ubPayoutID )
|
|||||||
}
|
}
|
||||||
|
|
||||||
//add transaction to players account
|
//add transaction to players account
|
||||||
AddTransactionToPlayersBook( INSURANCE_PAYOUT, mercID, GetWorldTotalMin(), payoutPrice );
|
AddTransactionToPlayersBook( INSURANCE_PAYOUT, LaptopSaveInfo.pLifeInsurancePayouts[ ubPayoutID ].ubMercID, GetWorldTotalMin(), LaptopSaveInfo.pLifeInsurancePayouts[ ubPayoutID ].iPayOutPrice );
|
||||||
|
|
||||||
//add to the history log the fact that the we paid the insurance claim
|
//add to the history log the fact that the we paid the insurance claim
|
||||||
AddHistoryToPlayersLog( HISTORY_INSURANCE_CLAIM_PAYOUT, mercID, GetWorldTotalMin(), -1, -1 );
|
AddHistoryToPlayersLog( HISTORY_INSURANCE_CLAIM_PAYOUT, LaptopSaveInfo.pLifeInsurancePayouts[ ubPayoutID ].ubMercID, GetWorldTotalMin(), -1, -1 );
|
||||||
|
|
||||||
//if there WASNT an investigation
|
//if there WASNT an investigation
|
||||||
if( gMercProfiles[ mercID ].ubSuspiciousDeath == 0 )
|
if( gMercProfiles[ LaptopSaveInfo.pLifeInsurancePayouts[ ubPayoutID ].ubMercID ].ubSuspiciousDeath == 0 )
|
||||||
{
|
{
|
||||||
//Add an email telling the user that he received an insurance payment
|
//Add an email telling the user that he received an insurance payment
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
|
// no UB
|
||||||
if( gubQuest[ QUEST_FIX_LAPTOP ] == QUESTDONE || gGameUBOptions.LaptopQuestEnabled == FALSE )
|
if( gubQuest[ QUEST_FIX_LAPTOP ] == QUESTDONE || gGameUBOptions.LaptopQuestEnabled == FALSE )
|
||||||
{
|
{
|
||||||
if ( gGameUBOptions.LaptopLinkInsurance == TRUE )
|
if ( gGameUBOptions.LaptopLinkInsurance == TRUE )
|
||||||
{
|
AddEmailWithSpecialData( 170, INSUR_PAYMENT_LENGTH, INSURANCE_COMPANY, GetWorldTotalMin(), LaptopSaveInfo.pLifeInsurancePayouts[ ubPayoutID ].iPayOutPrice, LaptopSaveInfo.pLifeInsurancePayouts[ ubPayoutID ].ubMercID, TYPE_EMAIL_INSURANCE_COMPANY_EMAIL_JA2_EDT, TYPE_E_INSURANCE_L3 );
|
||||||
AddEmailWithSpecialData(170, INSUR_PAYMENT_LENGTH, INSURANCE_COMPANY, GetWorldTotalMin(), payoutPrice, mercID, TYPE_EMAIL_INSURANCE_COMPANY_EMAIL_JA2_EDT, TYPE_E_INSURANCE_L3, XML_INSURANCE_APPROVED);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
AddEmailWithSpecialData(INSUR_PAYMENT, INSUR_PAYMENT_LENGTH, INSURANCE_COMPANY, GetWorldTotalMin(), payoutPrice, mercID, TYPE_EMAIL_EMAIL_EDT, TYPE_E_NONE, XML_INSURANCE_APPROVED);
|
AddEmailWithSpecialData( INSUR_PAYMENT, INSUR_PAYMENT_LENGTH, INSURANCE_COMPANY, GetWorldTotalMin(), LaptopSaveInfo.pLifeInsurancePayouts[ ubPayoutID ].iPayOutPrice, LaptopSaveInfo.pLifeInsurancePayouts[ ubPayoutID ].ubMercID, TYPE_EMAIL_EMAIL_EDT, TYPE_E_NONE );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -3294,7 +3294,7 @@ void HaventMadeImpMercEmailCallBack()
|
|||||||
if( ( LaptopSaveInfo.fIMPCompletedFlag == FALSE ) && ( LaptopSaveInfo.fSentImpWarningAlready == FALSE ) )
|
if( ( LaptopSaveInfo.fIMPCompletedFlag == FALSE ) && ( LaptopSaveInfo.fSentImpWarningAlready == FALSE ) )
|
||||||
{
|
{
|
||||||
LaptopSaveInfo.fSentImpWarningAlready = TRUE;
|
LaptopSaveInfo.fSentImpWarningAlready = TRUE;
|
||||||
AddEmail(IMP_EMAIL_AGAIN,IMP_EMAIL_AGAIN_LENGTH,1, GetWorldTotalMin( ), -1, -1, TYPE_EMAIL_EMAIL_EDT, XML_IMP_INTROAGAIN);
|
AddEmail(IMP_EMAIL_AGAIN,IMP_EMAIL_AGAIN_LENGTH,1, GetWorldTotalMin( ), -1, -1, TYPE_EMAIL_EMAIL_EDT );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-5
@@ -1039,7 +1039,7 @@ void DailyUpdateOfMercSite( UINT16 usDate)
|
|||||||
LaptopSaveInfo.gubPlayersMercAccountStatus = MERC_ACCOUNT_INVALID;
|
LaptopSaveInfo.gubPlayersMercAccountStatus = MERC_ACCOUNT_INVALID;
|
||||||
if( IsSpeckComAvailable() )
|
if( IsSpeckComAvailable() )
|
||||||
{
|
{
|
||||||
AddEmail(MERC_INVALID, MERC_INVALID_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT, XML_SPECK_NOTICE);
|
AddEmail( MERC_INVALID, MERC_INVALID_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1055,7 +1055,7 @@ void DailyUpdateOfMercSite( UINT16 usDate)
|
|||||||
LaptopSaveInfo.gubPlayersMercAccountStatus = MERC_ACCOUNT_SUSPENDED;
|
LaptopSaveInfo.gubPlayersMercAccountStatus = MERC_ACCOUNT_SUSPENDED;
|
||||||
if( IsSpeckComAvailable() )
|
if( IsSpeckComAvailable() )
|
||||||
{
|
{
|
||||||
AddEmail(MERC_WARNING, MERC_WARNING_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT, XML_SPECK_DELINQUENT);
|
AddEmail( MERC_WARNING, MERC_WARNING_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT);
|
||||||
|
|
||||||
// Have speck complain next time player come to site
|
// Have speck complain next time player come to site
|
||||||
LaptopSaveInfo.uiSpeckQuoteFlags |= SPECK_QUOTE__SENT_EMAIL_ABOUT_LACK_OF_PAYMENT;
|
LaptopSaveInfo.uiSpeckQuoteFlags |= SPECK_QUOTE__SENT_EMAIL_ABOUT_LACK_OF_PAYMENT;
|
||||||
@@ -1074,7 +1074,7 @@ void DailyUpdateOfMercSite( UINT16 usDate)
|
|||||||
LaptopSaveInfo.gubPlayersMercAccountStatus = MERC_ACCOUNT_VALID_FIRST_WARNING;
|
LaptopSaveInfo.gubPlayersMercAccountStatus = MERC_ACCOUNT_VALID_FIRST_WARNING;
|
||||||
if( IsSpeckComAvailable() )
|
if( IsSpeckComAvailable() )
|
||||||
{
|
{
|
||||||
AddEmail(MERC_FIRST_WARNING, MERC_FIRST_WARNING_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT, XML_SPECK_PLEASEPAY);
|
AddEmail( MERC_FIRST_WARNING, MERC_FIRST_WARNING_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT);
|
||||||
|
|
||||||
// Have speck complain next time player come to site
|
// Have speck complain next time player come to site
|
||||||
LaptopSaveInfo.uiSpeckQuoteFlags |= SPECK_QUOTE__SENT_EMAIL_ABOUT_LACK_OF_PAYMENT;
|
LaptopSaveInfo.uiSpeckQuoteFlags |= SPECK_QUOTE__SENT_EMAIL_ABOUT_LACK_OF_PAYMENT;
|
||||||
@@ -2899,7 +2899,8 @@ void GetMercSiteBackOnline()
|
|||||||
if( IsSpeckComAvailable() )
|
if( IsSpeckComAvailable() )
|
||||||
{
|
{
|
||||||
//Add an email telling the user the site is back up
|
//Add an email telling the user the site is back up
|
||||||
AddEmail(MERC_NEW_SITE_ADDRESS, MERC_NEW_SITE_ADDRESS_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT, XML_SPECK_NEWSITE);
|
AddEmail( MERC_NEW_SITE_ADDRESS, MERC_NEW_SITE_ADDRESS_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1, -1 , TYPE_EMAIL_EMAIL_EDT);
|
||||||
|
|
||||||
//Set a flag indicating that the server just went up ( so speck can make a comment when the player next visits the site )
|
//Set a flag indicating that the server just went up ( so speck can make a comment when the player next visits the site )
|
||||||
LaptopSaveInfo.fFirstVisitSinceServerWentDown = TRUE;
|
LaptopSaveInfo.fFirstVisitSinceServerWentDown = TRUE;
|
||||||
}
|
}
|
||||||
@@ -3212,7 +3213,7 @@ void NewMercsAvailableAtMercSiteCallBack()
|
|||||||
if (!sentNewMercsEmail)
|
if (!sentNewMercsEmail)
|
||||||
{
|
{
|
||||||
sentNewMercsEmail = true;
|
sentNewMercsEmail = true;
|
||||||
AddEmail(NEW_MERCS_AT_MERC, NEW_MERCS_AT_MERC_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT, XML_SPECK_NEWPERSONNEL);
|
AddEmail(NEW_MERCS_AT_MERC, NEW_MERCS_AT_MERC_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT);
|
||||||
}
|
}
|
||||||
|
|
||||||
//new mercs are available
|
//new mercs are available
|
||||||
|
|||||||
@@ -6,10 +6,6 @@ set(ModularizedTacticalAISrc
|
|||||||
"${CMAKE_CURRENT_SOURCE_DIR}/src/LegacyAIPlanFactory.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/src/LegacyAIPlanFactory.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/src/LegacyCreaturePlan.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/src/LegacyCreaturePlan.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/src/LegacyZombiePlan.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/src/LegacyZombiePlan.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/src/BoxerPlan.cpp"
|
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/src/CivilianPlan.cpp"
|
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/src/RobotPlan.cpp"
|
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/src/SoldierPlan.cpp"
|
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/src/NullPlan.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/src/NullPlan.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/src/NullPlanFactory.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/src/NullPlanFactory.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/src/Plan.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/src/Plan.cpp"
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include "Plan.h"
|
|
||||||
|
|
||||||
namespace AI
|
|
||||||
{
|
|
||||||
namespace tactical
|
|
||||||
{
|
|
||||||
/**@class LegacyAIPlan
|
|
||||||
* @brief Component/Concrete Product. Wrapper/Re-Write of DecideAction()
|
|
||||||
*
|
|
||||||
* Wrapper around boxer related AI uplifted from original DecideAction() routines
|
|
||||||
*/
|
|
||||||
class LegacyAIBoxerPlan: public Plan
|
|
||||||
{
|
|
||||||
private:
|
|
||||||
public:
|
|
||||||
LegacyAIBoxerPlan(SOLDIERTYPE* npc);
|
|
||||||
virtual void execute(PlanInputData& environment);
|
|
||||||
virtual bool done() const {return false;}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include "Plan.h"
|
|
||||||
|
|
||||||
namespace AI
|
|
||||||
{
|
|
||||||
namespace tactical
|
|
||||||
{
|
|
||||||
/**@class LegacyAIPlan
|
|
||||||
* @brief Component/Concrete Product. Wrapper/Re-Write of DecideAction()
|
|
||||||
*
|
|
||||||
* Wrapper around civilian/noncombatant related AI uplifted from original DecideAction() routines
|
|
||||||
*/
|
|
||||||
class CivilianPlan : public Plan
|
|
||||||
{
|
|
||||||
private:
|
|
||||||
public:
|
|
||||||
CivilianPlan(SOLDIERTYPE* npc);
|
|
||||||
virtual void execute(PlanInputData& environment);
|
|
||||||
virtual bool done() const { return false; }
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include "Plan.h"
|
|
||||||
|
|
||||||
namespace AI
|
|
||||||
{
|
|
||||||
namespace tactical
|
|
||||||
{
|
|
||||||
/**@class LegacyAIPlan
|
|
||||||
* @brief Component/Concrete Product. Wrapper/Re-Write of DecideAction()
|
|
||||||
*
|
|
||||||
* Wrapper around robot related AI uplifted from original DecideAction() routines
|
|
||||||
*/
|
|
||||||
class RobotPlan : public Plan
|
|
||||||
{
|
|
||||||
private:
|
|
||||||
public:
|
|
||||||
RobotPlan(SOLDIERTYPE* npc);
|
|
||||||
virtual void execute(PlanInputData& environment);
|
|
||||||
virtual bool done() const { return false; }
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include "Plan.h"
|
|
||||||
|
|
||||||
namespace AI
|
|
||||||
{
|
|
||||||
namespace tactical
|
|
||||||
{
|
|
||||||
/**@class LegacyAIPlan
|
|
||||||
* @brief Component/Concrete Product. Wrapper/Re-Write of DecideAction()
|
|
||||||
*
|
|
||||||
* Wrapper around soldier related AI uplifted from original DecideAction() routines
|
|
||||||
*/
|
|
||||||
class SoldierPlan : public Plan
|
|
||||||
{
|
|
||||||
private:
|
|
||||||
public:
|
|
||||||
SoldierPlan(SOLDIERTYPE* npc);
|
|
||||||
virtual void execute(PlanInputData& environment);
|
|
||||||
virtual bool done() const { return false; }
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
#include "../include/BoxerPlan.h"
|
|
||||||
#include "../../TacticalAI/ai.h"
|
|
||||||
|
|
||||||
namespace AI
|
|
||||||
{
|
|
||||||
namespace tactical
|
|
||||||
{
|
|
||||||
LegacyAIBoxerPlan::LegacyAIBoxerPlan(SOLDIERTYPE* npc)
|
|
||||||
: Plan(npc)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void LegacyAIBoxerPlan::execute(PlanInputData& environment)
|
|
||||||
{
|
|
||||||
switch (get_npc()->aiData.bAlertStatus)
|
|
||||||
{
|
|
||||||
case STATUS_GREEN:
|
|
||||||
get_npc()->aiData.bAction = DecideActionGreenBoxer(get_npc());
|
|
||||||
break;
|
|
||||||
case STATUS_YELLOW:
|
|
||||||
get_npc()->aiData.bAction = DecideActionGreenBoxer(get_npc());
|
|
||||||
break;
|
|
||||||
case STATUS_RED:
|
|
||||||
get_npc()->aiData.bAction = DecideActionBlackBoxer(get_npc());
|
|
||||||
break;
|
|
||||||
case STATUS_BLACK:
|
|
||||||
get_npc()->aiData.bAction = DecideActionBlackBoxer(get_npc());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace tactical
|
|
||||||
} // namespace AI
|
|
||||||
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
#include "../include/CivilianPlan.h"
|
|
||||||
#include "../../TacticalAI/ai.h"
|
|
||||||
#include "NPC.h"
|
|
||||||
#include "Soldier Profile.h"
|
|
||||||
|
|
||||||
namespace AI
|
|
||||||
{
|
|
||||||
namespace tactical
|
|
||||||
{
|
|
||||||
CivilianPlan::CivilianPlan(SOLDIERTYPE* npc)
|
|
||||||
: Plan(npc)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void CivilianPlan::execute(PlanInputData& environment)
|
|
||||||
{
|
|
||||||
if ( !environment.turn_based() )
|
|
||||||
{
|
|
||||||
if ( (get_npc()->ubProfile != NO_PROFILE) && (gMercProfiles[get_npc()->ubProfile].ubMiscFlags3 & PROFILE_MISC_FLAG3_HANDLE_DONE_TRAVERSAL) )
|
|
||||||
{
|
|
||||||
TriggerNPCWithGivenApproach(get_npc()->ubProfile, APPROACH_DONE_TRAVERSAL, FALSE);
|
|
||||||
gMercProfiles[get_npc()->ubProfile].ubMiscFlags3 &= (~PROFILE_MISC_FLAG3_HANDLE_DONE_TRAVERSAL);
|
|
||||||
get_npc()->ubQuoteActionID = 0;
|
|
||||||
// wait a tiny bit
|
|
||||||
get_npc()->aiData.usActionData = 100;
|
|
||||||
get_npc()->aiData.bAction = AI_ACTION_WAIT;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (get_npc()->aiData.bAlertStatus)
|
|
||||||
{
|
|
||||||
case STATUS_GREEN:
|
|
||||||
get_npc()->aiData.bAction = DecideActionGreenCivilian(get_npc());
|
|
||||||
break;
|
|
||||||
case STATUS_YELLOW:
|
|
||||||
get_npc()->aiData.bAction = DecideActionYellowCivilian(get_npc());
|
|
||||||
break;
|
|
||||||
case STATUS_RED:
|
|
||||||
get_npc()->aiData.bAction = DecideActionRedCivilian(get_npc());
|
|
||||||
break;
|
|
||||||
case STATUS_BLACK:
|
|
||||||
get_npc()->aiData.bAction = DecideActionBlackCivilian(get_npc());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace tactical
|
|
||||||
} // namespace AI
|
|
||||||
|
|
||||||
@@ -7,10 +7,6 @@
|
|||||||
#include "../include/LegacyCreaturePlan.h"
|
#include "../include/LegacyCreaturePlan.h"
|
||||||
#include "../include/LegacyZombiePlan.h"
|
#include "../include/LegacyZombiePlan.h"
|
||||||
#include "../include/LegacyArmedVehiclePlan.h"
|
#include "../include/LegacyArmedVehiclePlan.h"
|
||||||
#include "../include/BoxerPlan.h"
|
|
||||||
#include "../include/CivilianPlan.h"
|
|
||||||
#include "../include/RobotPlan.h"
|
|
||||||
#include "../include/SoldierPlan.h"
|
|
||||||
#include "../include/CrowPlan.h"
|
#include "../include/CrowPlan.h"
|
||||||
#include "../include/PlanList.h"
|
#include "../include/PlanList.h"
|
||||||
|
|
||||||
@@ -18,7 +14,8 @@
|
|||||||
#include "../../Tactical/Soldier Control.h" // For SOLDIERTYPE definition
|
#include "../../Tactical/Soldier Control.h" // For SOLDIERTYPE definition
|
||||||
#include "../../Tactical/Animation Data.h" // For the definition of, wait for it... BLOODCAT!
|
#include "../../Tactical/Animation Data.h" // For the definition of, wait for it... BLOODCAT!
|
||||||
#include "Soldier macros.h"
|
#include "Soldier macros.h"
|
||||||
#include "ai.h"
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
||||||
namespace AI
|
namespace AI
|
||||||
@@ -46,11 +43,6 @@ namespace AI
|
|||||||
if(npc->IsZombie())
|
if(npc->IsZombie())
|
||||||
return new LegacyZombiePlan(npc);
|
return new LegacyZombiePlan(npc);
|
||||||
|
|
||||||
if (BOXER(npc)) { return new LegacyAIBoxerPlan(npc); }
|
|
||||||
if (IS_CIV_BODY_TYPE(npc)) { return new CivilianPlan(npc); }
|
|
||||||
if (ENEMYROBOT(npc)) { return new RobotPlan(npc); }
|
|
||||||
if (SoldierAI(npc)) { return new SoldierPlan(npc); }
|
|
||||||
|
|
||||||
return new LegacyAIPlan(npc); // no special plan for other cases yet, return default legacy AI wrapper
|
return new LegacyAIPlan(npc); // no special plan for other cases yet, return default legacy AI wrapper
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,34 +0,0 @@
|
|||||||
#include "../include/RobotPlan.h"
|
|
||||||
#include "../../TacticalAI/ai.h"
|
|
||||||
|
|
||||||
namespace AI
|
|
||||||
{
|
|
||||||
namespace tactical
|
|
||||||
{
|
|
||||||
RobotPlan::RobotPlan(SOLDIERTYPE* npc)
|
|
||||||
: Plan(npc)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void RobotPlan::execute(PlanInputData& environment)
|
|
||||||
{
|
|
||||||
switch (get_npc()->aiData.bAlertStatus)
|
|
||||||
{
|
|
||||||
case STATUS_GREEN:
|
|
||||||
get_npc()->aiData.bAction = DecideActionGreenRobot(get_npc());
|
|
||||||
break;
|
|
||||||
case STATUS_YELLOW:
|
|
||||||
get_npc()->aiData.bAction = DecideActionYellowRobot(get_npc());
|
|
||||||
break;
|
|
||||||
case STATUS_RED:
|
|
||||||
get_npc()->aiData.bAction = DecideActionRedRobot(get_npc());
|
|
||||||
break;
|
|
||||||
case STATUS_BLACK:
|
|
||||||
get_npc()->aiData.bAction = DecideActionBlackRobot(get_npc());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace tactical
|
|
||||||
} // namespace AI
|
|
||||||
@@ -1,104 +0,0 @@
|
|||||||
#include "../include/SoldierPlan.h"
|
|
||||||
#include "../../TacticalAI/ai.h"
|
|
||||||
#include "../../TacticalAI/AIInternals.h" // ACTING_ON_SCHEDULE
|
|
||||||
#include "../../TacticalAI/NPC.h" // NPCReachedDestination
|
|
||||||
#include "../../Tactical/Dialogue Control.h" // DialogueQueueIsEmpty
|
|
||||||
#include "../../Utils/Font Control.h" // ScreenMsg about deadlock
|
|
||||||
#include "../../i18n/include/Text.h" // Sniper warning
|
|
||||||
#include "../../Utils/message.h" // ditto
|
|
||||||
|
|
||||||
namespace AI
|
|
||||||
{
|
|
||||||
namespace tactical
|
|
||||||
{
|
|
||||||
SoldierPlan::SoldierPlan(SOLDIERTYPE* npc)
|
|
||||||
: Plan(npc)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void SoldierPlan::execute(PlanInputData& environment)
|
|
||||||
{
|
|
||||||
if (!environment.turn_based())
|
|
||||||
{
|
|
||||||
if ((get_npc()->ubProfile != NO_PROFILE) && (gMercProfiles[get_npc()->ubProfile].ubMiscFlags3 & PROFILE_MISC_FLAG3_HANDLE_DONE_TRAVERSAL))
|
|
||||||
{
|
|
||||||
TriggerNPCWithGivenApproach(get_npc()->ubProfile, APPROACH_DONE_TRAVERSAL, FALSE);
|
|
||||||
gMercProfiles[get_npc()->ubProfile].ubMiscFlags3 &= (~PROFILE_MISC_FLAG3_HANDLE_DONE_TRAVERSAL);
|
|
||||||
get_npc()->ubQuoteActionID = 0;
|
|
||||||
// wait a tiny bit
|
|
||||||
get_npc()->aiData.usActionData = 100;
|
|
||||||
get_npc()->aiData.bAction = AI_ACTION_WAIT;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (get_npc()->bTeam == gbPlayerNum)
|
|
||||||
{
|
|
||||||
if (environment.get_tactical_status().fAutoBandageMode)
|
|
||||||
{
|
|
||||||
get_npc()->aiData.bAction = DecideAutoBandage(get_npc());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (get_npc()->bTeam != MILITIA_TEAM)
|
|
||||||
{
|
|
||||||
if (!sniperwarning && get_npc()->aiData.bOrders == SNIPER)
|
|
||||||
{
|
|
||||||
ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, New113Message[MSG113_WATHCHOUTFORSNIPERS]);
|
|
||||||
sniperwarning = TRUE;
|
|
||||||
|
|
||||||
// Flugente: additional dialogue
|
|
||||||
AdditionalTacticalCharacterDialogue_AllInCurrentSector(NO_PROFILE, ADE_SNIPERWARNING);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!biggunwarning && FindRocketLauncherOrCannon(get_npc()) != NO_SLOT)
|
|
||||||
{
|
|
||||||
biggunwarning = TRUE;
|
|
||||||
//TODO: don't say this again after reloading a savegame
|
|
||||||
SayQuoteFromAnyBodyInSector(QUOTE_WEARY_SLASH_SUSPUCIOUS);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
get_npc()->aiData.fAIFlags &= (~AI_CAUTIOUS); // turn off cautious flag
|
|
||||||
// if status override is set, bypass RED/YELLOW and go directly to GREEN!
|
|
||||||
if ((get_npc()->aiData.bBypassToGreen) && (get_npc()->aiData.bAlertStatus < STATUS_BLACK))
|
|
||||||
{
|
|
||||||
get_npc()->aiData.bAction = DecideActionGreenSoldier(get_npc());
|
|
||||||
if (!gfTurnBasedAI)
|
|
||||||
{
|
|
||||||
// reset bypass now
|
|
||||||
get_npc()->aiData.bBypassToGreen = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
switch (get_npc()->aiData.bAlertStatus)
|
|
||||||
{
|
|
||||||
case STATUS_GREEN:
|
|
||||||
get_npc()->aiData.bAction = DecideActionGreenSoldier(get_npc());
|
|
||||||
break;
|
|
||||||
case STATUS_YELLOW:
|
|
||||||
get_npc()->aiData.bAction = DecideActionYellowSoldier(get_npc());
|
|
||||||
break;
|
|
||||||
case STATUS_RED:
|
|
||||||
get_npc()->aiData.bAction = DecideActionRedSoldier(get_npc());
|
|
||||||
break;
|
|
||||||
case STATUS_BLACK:
|
|
||||||
//if ( gGameSettings.fOptions[TOPTION_USE_LEGACY_TACTICALAI] ) // Commented out for now since new AI is WIP
|
|
||||||
{
|
|
||||||
get_npc()->aiData.bAction = DecideActionBlackSoldier(get_npc());
|
|
||||||
}
|
|
||||||
//else
|
|
||||||
//{
|
|
||||||
// get_npc()->aiData.bAction = DecideActionBlackSoldierUtilityAI(get_npc());
|
|
||||||
//}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
DEBUGAIMSG("Deciding for guynum " << (int)get_npc()->ubID << " at gridno " << get_npc()->sGridNo << ", APs " << get_npc()->bActionPoints <<
|
|
||||||
", decided action: " << (int)get_npc()->aiData.bAction << ", data " << (int)get_npc()->aiData.usActionData);
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace tactical
|
|
||||||
} // namespace AI
|
|
||||||
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "Event Pump.h"
|
|
||||||
//time for a new header :)
|
//time for a new header :)
|
||||||
extern int readyteamreg[10];
|
extern int readyteamreg[10];
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
#include "vsurface.h"
|
#include "vsurface.h"
|
||||||
#include "Button System.h"
|
#include "Button System.h"
|
||||||
#include "Font Control.h"
|
#include "Font Control.h"
|
||||||
|
#include "Editor Taskbar Utils.h"
|
||||||
#include "line.h"
|
#include "line.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "vobject_blitters.h"
|
#include "vobject_blitters.h"
|
||||||
@@ -15,6 +16,7 @@
|
|||||||
#include "mousesystem.h"
|
#include "mousesystem.h"
|
||||||
#include "strategicmap.h"
|
#include "strategicmap.h"
|
||||||
#include "FileMan.h"
|
#include "FileMan.h"
|
||||||
|
#include "Map Information.h"
|
||||||
#include "Render Dirty.h"
|
#include "Render Dirty.h"
|
||||||
#include "Game Clock.h"
|
#include "Game Clock.h"
|
||||||
#include "Campaign Types.h"
|
#include "Campaign Types.h"
|
||||||
|
|||||||
+21
-1
@@ -6,18 +6,35 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include "ASD.h"
|
#include "ASD.h"
|
||||||
#include "strategic.h"
|
#include "strategic.h"
|
||||||
|
#include "WCheck.h"
|
||||||
|
#include "Utilities.h"
|
||||||
|
#include "WordWrap.h"
|
||||||
|
#include "Cursors.h"
|
||||||
|
#include "line.h"
|
||||||
|
#include "Insurance Text.h"
|
||||||
|
#include "Encrypted File.h"
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
|
#include "Multi Language Graphic Utils.h"
|
||||||
#include "random.h"
|
#include "random.h"
|
||||||
#include "Interface.h"
|
#include "Interface.h"
|
||||||
|
#include "Soldier Add.h"
|
||||||
|
#include "Soldier Profile.h"
|
||||||
#include "Overhead.h"
|
#include "Overhead.h"
|
||||||
#include <Font Control.h>
|
#include "Map Screen Interface.h"
|
||||||
|
#include "finances.h"
|
||||||
#include "Game Clock.h"
|
#include "Game Clock.h"
|
||||||
#include "SaveLoadGame.h"
|
#include "SaveLoadGame.h"
|
||||||
|
#include "GameVersion.h"
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include "Game Event Hook.h"
|
#include "Game Event Hook.h"
|
||||||
|
#include "Militia Control.h"
|
||||||
#include "Town Militia.h"
|
#include "Town Militia.h"
|
||||||
|
#include "Strategic Town Loyalty.h"
|
||||||
|
#include "Map Information.h"
|
||||||
|
|
||||||
#include "Campaign.h"
|
#include "Campaign.h"
|
||||||
|
#include "random.h"
|
||||||
|
#include "Explosion Control.h"
|
||||||
#include "Strategic AI.h"
|
#include "Strategic AI.h"
|
||||||
#include "Strategic Mines.h"
|
#include "Strategic Mines.h"
|
||||||
#include "Reinforcement.h"
|
#include "Reinforcement.h"
|
||||||
@@ -25,6 +42,9 @@
|
|||||||
#include "Queen Command.h"
|
#include "Queen Command.h"
|
||||||
#include "Map Screen Helicopter.h"
|
#include "Map Screen Helicopter.h"
|
||||||
#include "Points.h"
|
#include "Points.h"
|
||||||
|
#include "worldman.h"
|
||||||
|
#include "Map Information.h"
|
||||||
|
#include "opplist.h"
|
||||||
#include "Dialogue Control.h"
|
#include "Dialogue Control.h"
|
||||||
#include "Sound Control.h"
|
#include "Sound Control.h"
|
||||||
#include "renderworld.h"
|
#include "renderworld.h"
|
||||||
|
|||||||
+104
-89
@@ -1,81 +1,96 @@
|
|||||||
#include "Assignments.h"
|
#include "Assignments.h"
|
||||||
#include "strategic.h"
|
#include "strategic.h"
|
||||||
#include "Items.h"
|
#include "Items.h"
|
||||||
#include "Overhead.h"
|
#include "Overhead.h"
|
||||||
#include "Game Clock.h"
|
#include "Game Clock.h"
|
||||||
#include "stdlib.h"
|
#include "stdlib.h"
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include "Font Control.h"
|
#include "Font Control.h"
|
||||||
#include "Map Screen Interface.h"
|
#include "Map Screen Interface.h"
|
||||||
#include "soldier profile type.h"
|
#include "soldier profile type.h"
|
||||||
#include "Soldier Profile.h"
|
#include "Soldier Profile.h"
|
||||||
#include "Campaign.h"
|
#include "Campaign.h"
|
||||||
#include "Queen Command.h"
|
#include "Queen Command.h"
|
||||||
#include "strategicmap.h"
|
#include "strategicmap.h"
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
#include "Dialogue Control.h"
|
#include "Dialogue Control.h"
|
||||||
#include "NPC.h"
|
#include "NPC.h"
|
||||||
#include "Strategic Town Loyalty.h"
|
#include "Strategic Town Loyalty.h"
|
||||||
#include "Animation Control.h"
|
#include "Animation Control.h"
|
||||||
#include "mapscreen.h"
|
#include "mapscreen.h"
|
||||||
#include "Squads.h"
|
#include "Squads.h"
|
||||||
#include "Map Screen Helicopter.h"
|
#include "Map Screen Helicopter.h"
|
||||||
#include "PopUpBox.h"
|
#include "PopUpBox.h"
|
||||||
#include "Vehicles.h"
|
#include "Vehicles.h"
|
||||||
#include "Merc Contract.h"
|
#include "Merc Contract.h"
|
||||||
#include "Map Screen Interface Map.h"
|
#include "Map Screen Interface Map.h"
|
||||||
#include "Strategic Movement.h"
|
#include "Strategic Movement.h"
|
||||||
#include "laptop.h"
|
#include "laptop.h"
|
||||||
#include "finances.h"
|
#include "finances.h"
|
||||||
#include "LaptopSave.h"
|
#include "LaptopSave.h"
|
||||||
#include "renderworld.h"
|
#include "renderworld.h"
|
||||||
#include "Interface Control.h"
|
#include "Interface Control.h"
|
||||||
#include "Interface.h"
|
#include "Interface.h"
|
||||||
#include "Soldier Find.h"
|
#include "Soldier Find.h"
|
||||||
#include <Rotting Corpses.h>
|
#include "ai.h"
|
||||||
#include "Utilities.h"
|
#include "Utilities.h"
|
||||||
#include "random.h"
|
#include "random.h"
|
||||||
#include "Soldier Add.h"
|
#include "line.h"
|
||||||
#include "GameSettings.h"
|
#include "Soldier Add.h"
|
||||||
#include "Isometric Utils.h"
|
#include "GameSettings.h"
|
||||||
#include "Soldier macros.h"
|
#include "Isometric Utils.h"
|
||||||
#include "Explosion Control.h"
|
#include "Soldier macros.h"
|
||||||
#include "SkillCheck.h"
|
#include "Explosion Control.h"
|
||||||
#include "Quests.h"
|
#include "SkillCheck.h"
|
||||||
#include "Town Militia.h"
|
#include "Quests.h"
|
||||||
#include "Map Screen Interface Border.h"
|
#include "Town Militia.h"
|
||||||
#include "math.h"
|
#include "Map Screen Interface Border.h"
|
||||||
#include "Game Event Hook.h"
|
#include "math.h"
|
||||||
#include "Map Information.h"
|
#include "SkillCheck.h"
|
||||||
#include "Strategic Status.h"
|
#include "Strategic Pathing.h"
|
||||||
#include "history.h"
|
#include "Game Event Hook.h"
|
||||||
#include "Map Screen Interface Map Inventory.h"
|
#include "Strategic Event Handler.h"
|
||||||
#include "interface Dialogue.h"
|
#include "Map Information.h"
|
||||||
// added by SANDRO
|
#include "Strategic Status.h"
|
||||||
#include "AIInternals.h"
|
#include "history.h"
|
||||||
#include "Morale.h"
|
#include "Map Screen Interface Map Inventory.h"
|
||||||
#include "Food.h"
|
#include "interface Dialogue.h"
|
||||||
#include "Tactical Save.h" // added by Flugente
|
// added by SANDRO
|
||||||
#include "Campaign Types.h" // added by Flugente
|
#include "AIInternals.h"
|
||||||
#include "DynamicDialogue.h" // added by Flugente
|
#include "Morale.h"
|
||||||
#include "Disease.h" // added by Flugente
|
#include "Food.h"
|
||||||
#include "PMC.h" // added by Flugente
|
#include "Tactical Save.h" // added by Flugente
|
||||||
#include "Drugs And Alcohol.h" // added by Flugente for DoesMercHaveDisability( ... )
|
#include "Campaign Types.h" // added by Flugente
|
||||||
#include "MilitiaIndividual.h" // added by Flugente
|
#include "Strategic Town Loyalty.h"
|
||||||
#include "Militia Control.h" // added by Flugente
|
#include "DynamicDialogue.h" // added by Flugente
|
||||||
#include "ASD.h" // added by Flugente
|
#include "Disease.h" // added by Flugente
|
||||||
#include "Strategic AI.h"
|
#include "Queen Command.h" // added by Flugente
|
||||||
#include "MiniEvents.h"
|
#include "PMC.h" // added by Flugente
|
||||||
#include "Rebel Command.h"
|
#include "Drugs And Alcohol.h" // added by Flugente for DoesMercHaveDisability( ... )
|
||||||
|
#include "MilitiaIndividual.h" // added by Flugente
|
||||||
|
#include "Militia Control.h" // added by Flugente
|
||||||
|
#include "ASD.h" // added by Flugente
|
||||||
|
#include "Strategic AI.h"
|
||||||
|
#include "MiniEvents.h"
|
||||||
|
#include "Rebel Command.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <queue>
|
#include <queue>
|
||||||
|
|
||||||
|
#include "Vehicles.h"
|
||||||
|
|
||||||
#include "GameInitOptionsScreen.h"
|
#include "GameInitOptionsScreen.h"
|
||||||
#include "Facilities.h"
|
|
||||||
|
|
||||||
//forward declarations of common classes to eliminate includes
|
//forward declarations of common classes to eliminate includes
|
||||||
|
class OBJECTTYPE;
|
||||||
|
class SOLDIERTYPE;
|
||||||
extern int POP_UP_BOX_X;
|
extern int POP_UP_BOX_X;
|
||||||
extern WorldItems gAllWorldItems;
|
extern WorldItems gAllWorldItems;
|
||||||
|
|
||||||
|
#include "MilitiaSquads.h"
|
||||||
|
// HEADROCK HAM 3.5: Include Facility data
|
||||||
|
#include "Facilities.h"
|
||||||
|
|
||||||
|
#include "Vehicles.h"
|
||||||
|
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
#include "Explosion Control.h"
|
#include "Explosion Control.h"
|
||||||
@@ -767,7 +782,7 @@ void ChangeSoldiersAssignment( SOLDIERTYPE *pSoldier, INT8 bAssignment )
|
|||||||
fMapPanelDirty = TRUE;
|
fMapPanelDirty = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOLEAN BasicCanCharacterAssignment( SOLDIERTYPE * pSoldier, BOOLEAN fNotInCombat )
|
BOOLEAN BasicCanCharacterAssignment( SOLDIERTYPE * pSoldier, BOOLEAN fNotInCombat )
|
||||||
{
|
{
|
||||||
AssertNotNIL(pSoldier);
|
AssertNotNIL(pSoldier);
|
||||||
// global conditions restricting all assignment changes
|
// global conditions restricting all assignment changes
|
||||||
@@ -1350,7 +1365,7 @@ BOOLEAN DoesCharacterHaveAnyItemsToRepair( SOLDIERTYPE *pSoldier, INT8 bHighestP
|
|||||||
return( FALSE );
|
return( FALSE );
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOLEAN BasicCanCharacterRepair( SOLDIERTYPE * pSoldier )
|
BOOLEAN BasicCanCharacterRepair( SOLDIERTYPE * pSoldier )
|
||||||
{
|
{
|
||||||
AssertNotNIL(pSoldier);
|
AssertNotNIL(pSoldier);
|
||||||
|
|
||||||
@@ -2433,7 +2448,7 @@ BOOLEAN CanCharacterTrainTeammates( SOLDIERTYPE *pSoldier )
|
|||||||
return( TRUE );
|
return( TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOLEAN CanCharacterBeTrainedByOther( SOLDIERTYPE *pSoldier )
|
BOOLEAN CanCharacterBeTrainedByOther( SOLDIERTYPE *pSoldier )
|
||||||
{
|
{
|
||||||
AssertNotNIL(pSoldier);
|
AssertNotNIL(pSoldier);
|
||||||
|
|
||||||
@@ -2818,7 +2833,7 @@ BOOLEAN CanCharacterSnitch( SOLDIERTYPE *pSoldier )
|
|||||||
return( FALSE );
|
return( FALSE );
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOLEAN CanCharacterSpreadPropaganda( SOLDIERTYPE *pSoldier )
|
BOOLEAN CanCharacterSpreadPropaganda( SOLDIERTYPE *pSoldier )
|
||||||
{
|
{
|
||||||
AssertNotNIL(pSoldier);
|
AssertNotNIL(pSoldier);
|
||||||
|
|
||||||
@@ -2849,7 +2864,7 @@ static BOOLEAN CanCharacterSpreadPropaganda( SOLDIERTYPE *pSoldier )
|
|||||||
return( TRUE );
|
return( TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOLEAN CanCharacterGatherInformation( SOLDIERTYPE *pSoldier )
|
BOOLEAN CanCharacterGatherInformation( SOLDIERTYPE *pSoldier )
|
||||||
{
|
{
|
||||||
AssertNotNIL(pSoldier);
|
AssertNotNIL(pSoldier);
|
||||||
|
|
||||||
@@ -2880,7 +2895,7 @@ static BOOLEAN CanCharacterGatherInformation( SOLDIERTYPE *pSoldier )
|
|||||||
return( TRUE );
|
return( TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOLEAN CanCharacterSnitchInPrison( SOLDIERTYPE *pSoldier )
|
BOOLEAN CanCharacterSnitchInPrison( SOLDIERTYPE *pSoldier )
|
||||||
{
|
{
|
||||||
AssertNotNIL(pSoldier);
|
AssertNotNIL(pSoldier);
|
||||||
|
|
||||||
@@ -3158,7 +3173,7 @@ UINT8 GetNumberThatCanBeDoctored( SOLDIERTYPE *pDoctor, BOOLEAN fThisHour, BOOLE
|
|||||||
return( ubNumberOfPeople );
|
return( ubNumberOfPeople );
|
||||||
}
|
}
|
||||||
|
|
||||||
static SOLDIERTYPE* GetPatientThatCanBeDoctored( SOLDIERTYPE *pDoctor, BOOLEAN fThisHour, BOOLEAN fSkipKitCheck, BOOLEAN fSkipSkillCheck, BOOLEAN fCheckForSurgery )
|
SOLDIERTYPE* GetPatientThatCanBeDoctored( SOLDIERTYPE *pDoctor, BOOLEAN fThisHour, BOOLEAN fSkipKitCheck, BOOLEAN fSkipSkillCheck, BOOLEAN fCheckForSurgery )
|
||||||
{
|
{
|
||||||
int cnt;
|
int cnt;
|
||||||
SOLDIERTYPE *pSoldier = MercPtrs[0], *pTeamSoldier = NULL;
|
SOLDIERTYPE *pSoldier = MercPtrs[0], *pTeamSoldier = NULL;
|
||||||
@@ -3579,7 +3594,7 @@ UINT32 CalculatePrisonGuardValue(SOLDIERTYPE *pSoldier )
|
|||||||
return( usValue );
|
return( usValue );
|
||||||
}
|
}
|
||||||
|
|
||||||
static UINT32 CalculateSnitchGuardValue(SOLDIERTYPE *pSoldier )
|
UINT32 CalculateSnitchGuardValue(SOLDIERTYPE *pSoldier )
|
||||||
{
|
{
|
||||||
// this is an assignment
|
// this is an assignment
|
||||||
UINT32 usValue = 0;
|
UINT32 usValue = 0;
|
||||||
@@ -3615,7 +3630,7 @@ static UINT32 CalculateSnitchGuardValue(SOLDIERTYPE *pSoldier )
|
|||||||
return( usValue );
|
return( usValue );
|
||||||
}
|
}
|
||||||
|
|
||||||
static UINT32 CalculateAllGuardsValueInPrison( INT16 sMapX, INT16 sMapY, INT8 bZ )
|
UINT32 CalculateAllGuardsValueInPrison( INT16 sMapX, INT16 sMapY, INT8 bZ )
|
||||||
{
|
{
|
||||||
UINT32 prisonguardvalue = 0;
|
UINT32 prisonguardvalue = 0;
|
||||||
|
|
||||||
@@ -3636,7 +3651,7 @@ static UINT32 CalculateAllGuardsValueInPrison( INT16 sMapX, INT16 sMapY, INT8 bZ
|
|||||||
return( prisonguardvalue );
|
return( prisonguardvalue );
|
||||||
}
|
}
|
||||||
|
|
||||||
static UINT32 CalculateAllSnitchesGuardValueInPrison( INT16 sMapX, INT16 sMapY, INT8 bZ )
|
UINT32 CalculateAllSnitchesGuardValueInPrison( INT16 sMapX, INT16 sMapY, INT8 bZ )
|
||||||
{
|
{
|
||||||
UINT32 prisonguardvalue = 0;
|
UINT32 prisonguardvalue = 0;
|
||||||
|
|
||||||
@@ -3657,7 +3672,7 @@ static UINT32 CalculateAllSnitchesGuardValueInPrison( INT16 sMapX, INT16 sMapY,
|
|||||||
return( prisonguardvalue );
|
return( prisonguardvalue );
|
||||||
}
|
}
|
||||||
|
|
||||||
static UINT32 CalculateAllGuardsNumberInPrison( INT16 sMapX, INT16 sMapY, INT8 bZ )
|
UINT32 CalculateAllGuardsNumberInPrison( INT16 sMapX, INT16 sMapY, INT8 bZ )
|
||||||
{
|
{
|
||||||
UINT8 numprisonguards = 0;
|
UINT8 numprisonguards = 0;
|
||||||
|
|
||||||
@@ -3832,7 +3847,7 @@ INT16 GetTrainWorkerPts(SOLDIERTYPE *pSoldier)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// anv: handle prisoners exposing snitch as a snitch
|
// anv: handle prisoners exposing snitch as a snitch
|
||||||
static BOOL HandleSnitchExposition(SOLDIERTYPE *pSoldier)
|
BOOL HandleSnitchExposition(SOLDIERTYPE *pSoldier)
|
||||||
{
|
{
|
||||||
UINT32 uiSuspicion = 0;
|
UINT32 uiSuspicion = 0;
|
||||||
UINT32 uiCoverQuality = 0;
|
UINT32 uiCoverQuality = 0;
|
||||||
@@ -5090,7 +5105,7 @@ OBJECTTYPE* FindRepairableItemInSpecificPocket(SOLDIERTYPE * pSoldier, OBJECTTYP
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Flugente: changed this function so that it repairs items up to a variable threshold instead of always 100%. This will only happen if the option gGameExternalOptions.fAdvRepairSystem is used
|
// Flugente: changed this function so that it repairs items up to a variable threshold instead of always 100%. This will only happen if the option gGameExternalOptions.fAdvRepairSystem is used
|
||||||
static void DoActualRepair( SOLDIERTYPE * pSoldier, UINT16 usItem, INT16 * pbStatus, INT16 sThreshold, UINT8 * pubRepairPtsLeft )
|
void DoActualRepair( SOLDIERTYPE * pSoldier, UINT16 usItem, INT16 * pbStatus, INT16 sThreshold, UINT8 * pubRepairPtsLeft )
|
||||||
{
|
{
|
||||||
INT16 sRepairCostAdj;
|
INT16 sRepairCostAdj;
|
||||||
UINT16 usDamagePts, usPtsFixed;
|
UINT16 usDamagePts, usPtsFixed;
|
||||||
@@ -6814,7 +6829,7 @@ struct admintmpstruct
|
|||||||
FLOAT percentage;
|
FLOAT percentage;
|
||||||
};
|
};
|
||||||
|
|
||||||
static UINT16 GetNumberofAdministratableMercs( INT16 sX, INT16 sY )
|
UINT16 GetNumberofAdministratableMercs( INT16 sX, INT16 sY )
|
||||||
{
|
{
|
||||||
UINT16 num = 0;
|
UINT16 num = 0;
|
||||||
UINT8 townid_origin = GetTownIdForSector( sX, sY );
|
UINT8 townid_origin = GetTownIdForSector( sX, sY );
|
||||||
@@ -7927,7 +7942,7 @@ BOOLEAN TrainTownInSector( SOLDIERTYPE *pTrainer, INT16 sMapX, INT16 sMapY, INT1
|
|||||||
return ( FALSE );
|
return ( FALSE );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Interrogateprisoner(UINT8 aPrisonerType, FLOAT aChanceModifier, INT8& arMilitiaType, UINT32& arRansom, FLOAT& arIntel )
|
void Interrogateprisoner(UINT8 aPrisonerType, FLOAT aChanceModifier, INT8& arMilitiaType, UINT32& arRansom, FLOAT& arIntel )
|
||||||
{
|
{
|
||||||
arMilitiaType = -1;
|
arMilitiaType = -1;
|
||||||
|
|
||||||
@@ -11454,7 +11469,7 @@ void ClearScreenMaskForMapScreenExit( void )
|
|||||||
CreateDestroyMouseRegionsForPrisonerMenu( );
|
CreateDestroyMouseRegionsForPrisonerMenu( );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void CreateDestroyMouseRegions( void )
|
void CreateDestroyMouseRegions( void )
|
||||||
{
|
{
|
||||||
static BOOLEAN fCreated = FALSE;
|
static BOOLEAN fCreated = FALSE;
|
||||||
UINT32 iCounter = 0;
|
UINT32 iCounter = 0;
|
||||||
@@ -12671,7 +12686,7 @@ void RemoveMercMenuBtnCallback( MOUSE_REGION * pRegion, INT32 iReason )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void BeginRemoveMercFromContract( SOLDIERTYPE *pSoldier )
|
void BeginRemoveMercFromContract( SOLDIERTYPE *pSoldier )
|
||||||
{
|
{
|
||||||
// This function will setup the quote, then start dialogue beginning the actual leave sequence
|
// This function will setup the quote, then start dialogue beginning the actual leave sequence
|
||||||
if( ( pSoldier->stats.bLife > 0 ) && ( pSoldier->bAssignment != ASSIGNMENT_POW ) )
|
if( ( pSoldier->stats.bLife > 0 ) && ( pSoldier->bAssignment != ASSIGNMENT_POW ) )
|
||||||
@@ -12774,7 +12789,7 @@ static void BeginRemoveMercFromContract( SOLDIERTYPE *pSoldier )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void MercDismissConfirmCallBack( UINT8 bExitValue )
|
void MercDismissConfirmCallBack( UINT8 bExitValue )
|
||||||
{
|
{
|
||||||
if ( bExitValue == MSG_BOX_RETURN_YES )
|
if ( bExitValue == MSG_BOX_RETURN_YES )
|
||||||
{
|
{
|
||||||
@@ -21371,7 +21386,7 @@ void PayFacilityCostsYesNoBoxCallback( UINT8 bExitValue )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// HEADROCK HAM 3.6: Callback on agreeing to pay off facility debts before you can assign another character to facility work.
|
// HEADROCK HAM 3.6: Callback on agreeing to pay off facility debts before you can assign another character to facility work.
|
||||||
static void PayFacilityDebtManuallyYesNoBoxCallback( UINT8 bExitValue )
|
void PayFacilityDebtManuallyYesNoBoxCallback( UINT8 bExitValue )
|
||||||
{
|
{
|
||||||
// This callback should only be called if the player can pay off the ENTIRE debt!!
|
// This callback should only be called if the player can pay off the ENTIRE debt!!
|
||||||
Assert( LaptopSaveInfo.iCurrentBalance >= giTotalOwedForFacilityOperationsToday );
|
Assert( LaptopSaveInfo.iCurrentBalance >= giTotalOwedForFacilityOperationsToday );
|
||||||
|
|||||||
+97
-90
@@ -1,68 +1,75 @@
|
|||||||
#include "builddefines.h"
|
#include "builddefines.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "Auto Resolve.h"
|
#include "Auto Resolve.h"
|
||||||
#include "Strategic Movement.h"
|
#include "Strategic Movement.h"
|
||||||
#include "Queen Command.h"
|
#include "Queen Command.h"
|
||||||
#include "Music Control.h"
|
#include "Music Control.h"
|
||||||
#include "PreBattle Interface.h"
|
#include "PreBattle Interface.h"
|
||||||
#include "Player Command.h"
|
#include "Player Command.h"
|
||||||
#include "mousesystem.h"
|
#include "mousesystem.h"
|
||||||
#include "Button System.h"
|
#include "Button System.h"
|
||||||
#include "gameloop.h"
|
#include "gameloop.h"
|
||||||
#include "screenids.h"
|
#include "screenids.h"
|
||||||
#include "mapscreen.h"
|
#include "mapscreen.h"
|
||||||
#include "vobject.h"
|
#include "vobject.h"
|
||||||
#include "video.h"
|
#include "video.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "gamescreen.h"
|
#include "gamescreen.h"
|
||||||
#include "Render Dirty.h"
|
#include "Render Dirty.h"
|
||||||
#include "vobject_blitters.h"
|
#include "vobject_blitters.h"
|
||||||
#include "sysutil.h"
|
#include "sysutil.h"
|
||||||
#include "Font Control.h"
|
#include "Font Control.h"
|
||||||
#include "Soldier Create.h"
|
#include "Soldier Create.h"
|
||||||
#include "Overhead.h"
|
#include "Overhead.h"
|
||||||
#include "Items.h"
|
#include "Interface.h"
|
||||||
#include "Weapons.h"
|
#include "Items.h"
|
||||||
#include "Sound Control.h"
|
#include "Weapons.h"
|
||||||
#include "Game Clock.h"
|
#include "Sound Control.h"
|
||||||
#include "Soldier Profile.h"
|
#include "Game Clock.h"
|
||||||
#include "Campaign.h"
|
#include "Soldier Profile.h"
|
||||||
#include "Tactical Save.h"
|
#include "Campaign.h"
|
||||||
#include "Strategic Status.h"
|
#include "Tactical Save.h"
|
||||||
#include "Text.h"
|
#include "Strategic Status.h"
|
||||||
#include "WordWrap.h"
|
#include "Map Screen Interface.h"
|
||||||
#include "Squads.h"
|
#include "Text.h"
|
||||||
#include "random.h"
|
#include "WordWrap.h"
|
||||||
#include "line.h"
|
#include "Squads.h"
|
||||||
#include "english.h"
|
#include "random.h"
|
||||||
#include "Strategic Merc Handler.h"
|
#include "line.h"
|
||||||
#include "strategic.h"
|
#include "english.h"
|
||||||
#include "message.h"
|
#include "Strategic Pathing.h"
|
||||||
#include "Town Militia.h"
|
#include "Strategic Merc Handler.h"
|
||||||
#include "Animation Data.h"
|
#include "strategic.h"
|
||||||
#include "Creature Spreading.h"
|
#include "message.h"
|
||||||
#include "Strategic AI.h"
|
#include "Town Militia.h"
|
||||||
#include "Morale.h"
|
#include "Animation Data.h"
|
||||||
#include "Strategic Town Loyalty.h"
|
#include "Creature Spreading.h"
|
||||||
#include "GameSettings.h"
|
#include "Strategic AI.h"
|
||||||
#include "Soldier macros.h"
|
#include "SkillCheck.h"
|
||||||
#include "strategicmap.h"
|
#include "rt time defines.h"
|
||||||
#include "Quests.h"
|
#include "Morale.h"
|
||||||
#include "Meanwhile.h"
|
#include "Strategic Town Loyalty.h"
|
||||||
#include "Inventory Choosing.h"
|
#include "GameSettings.h"
|
||||||
#include "Game Event Hook.h"
|
#include "Soldier macros.h"
|
||||||
#include "Assignments.h"
|
#include "strategicmap.h"
|
||||||
#include "Cheats.h"
|
#include "Quests.h"
|
||||||
#include "Map Information.h"
|
#include "Meanwhile.h"
|
||||||
#include "MilitiaSquads.h"
|
#include "Inventory Choosing.h"
|
||||||
#include "interface Dialogue.h"
|
#include "Game Event Hook.h"
|
||||||
#include "AIInternals.h" // added by SANDRO
|
#include "Assignments.h"
|
||||||
#include "Bullets.h" // HEADROCK HAM 5, for use with Bullet Impact.
|
#include "Cheats.h"
|
||||||
#include "CampaignStats.h" // added by Flugente
|
#include "Map Information.h"
|
||||||
#include "DynamicDialogue.h" // added by Flugente
|
#include "MilitiaSquads.h"
|
||||||
#include "MilitiaIndividual.h" // added by Flugente
|
// #include "Strategic AI.h"
|
||||||
#include "Rebel Command.h"
|
#include "interface Dialogue.h"
|
||||||
|
#include "AIInternals.h" // added by SANDRO
|
||||||
|
#include "Bullets.h" // HEADROCK HAM 5, for use with Bullet Impact.
|
||||||
|
#include "CampaignStats.h" // added by Flugente
|
||||||
|
#include "DynamicDialogue.h" // added by Flugente
|
||||||
|
#include "MilitiaIndividual.h" // added by Flugente
|
||||||
|
#include "Rebel Command.h"
|
||||||
|
|
||||||
#include "Reinforcement.h"
|
#include "Reinforcement.h"
|
||||||
|
|
||||||
//#define INVULNERABILITY
|
//#define INVULNERABILITY
|
||||||
@@ -330,7 +337,7 @@ SOLDIERCELL *gpCivs = NULL;
|
|||||||
SOLDIERCELL *gpEnemies = NULL;
|
SOLDIERCELL *gpEnemies = NULL;
|
||||||
|
|
||||||
//Simple wrappers for autoresolve sounds that are played.
|
//Simple wrappers for autoresolve sounds that are played.
|
||||||
static void PlayAutoResolveSample( UINT32 usNum, UINT32 usRate, UINT32 ubVolume, UINT32 ubLoops, UINT32 uiPan )
|
void PlayAutoResolveSample( UINT32 usNum, UINT32 usRate, UINT32 ubVolume, UINT32 ubLoops, UINT32 uiPan )
|
||||||
{
|
{
|
||||||
if( gpAR->fSound )
|
if( gpAR->fSound )
|
||||||
{
|
{
|
||||||
@@ -338,7 +345,7 @@ static void PlayAutoResolveSample( UINT32 usNum, UINT32 usRate, UINT32 ubVolume,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void PlayAutoResolveSampleFromFile( STR8 szFileName, UINT32 usRate, UINT32 ubVolume, UINT32 ubLoops, UINT32 uiPan )
|
void PlayAutoResolveSampleFromFile( STR8 szFileName, UINT32 usRate, UINT32 ubVolume, UINT32 ubLoops, UINT32 uiPan )
|
||||||
{
|
{
|
||||||
if( gpAR->fSound )
|
if( gpAR->fSound )
|
||||||
{
|
{
|
||||||
@@ -349,7 +356,7 @@ static void PlayAutoResolveSampleFromFile( STR8 szFileName, UINT32 usRate, UINT3
|
|||||||
|
|
||||||
extern void ClearPreviousAIGroupAssignment( GROUP *pGroup );
|
extern void ClearPreviousAIGroupAssignment( GROUP *pGroup );
|
||||||
|
|
||||||
static void EliminateAllMercs()
|
void EliminateAllMercs()
|
||||||
{
|
{
|
||||||
SOLDIERCELL *pAttacker = NULL;
|
SOLDIERCELL *pAttacker = NULL;
|
||||||
INT32 i, iNum = 0;
|
INT32 i, iNum = 0;
|
||||||
@@ -380,7 +387,7 @@ static void EliminateAllMercs()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void EliminateAllFriendlies()
|
void EliminateAllFriendlies()
|
||||||
{
|
{
|
||||||
INT32 i;
|
INT32 i;
|
||||||
if( gpAR )
|
if( gpAR )
|
||||||
@@ -496,7 +503,7 @@ void EliminateAllEnemies( UINT8 ubSectorX, UINT8 ubSectorY )
|
|||||||
#define ORIG_RIGHT 92
|
#define ORIG_RIGHT 92
|
||||||
#define ORIG_BOTTOM 84
|
#define ORIG_BOTTOM 84
|
||||||
|
|
||||||
static void DoTransitionFromPreBattleInterfaceToAutoResolve()
|
void DoTransitionFromPreBattleInterfaceToAutoResolve()
|
||||||
{
|
{
|
||||||
SGPRect SrcRect, DstRect;
|
SGPRect SrcRect, DstRect;
|
||||||
UINT32 uiStartTime, uiCurrTime;
|
UINT32 uiStartTime, uiCurrTime;
|
||||||
@@ -727,7 +734,7 @@ UINT32 AutoResolveScreenHandle()
|
|||||||
return AUTORESOLVE_SCREEN;
|
return AUTORESOLVE_SCREEN;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void RefreshMerc( SOLDIERTYPE *pSoldier )
|
void RefreshMerc( SOLDIERTYPE *pSoldier )
|
||||||
{
|
{
|
||||||
pSoldier->stats.bLife = pSoldier->stats.bLifeMax;
|
pSoldier->stats.bLife = pSoldier->stats.bLifeMax;
|
||||||
pSoldier->bBleeding = 0;
|
pSoldier->bBleeding = 0;
|
||||||
@@ -743,7 +750,7 @@ static void RefreshMerc( SOLDIERTYPE *pSoldier )
|
|||||||
|
|
||||||
//Now assign the pSoldier->ubGroupIDs for the enemies, so we know where to remove them. Start with
|
//Now assign the pSoldier->ubGroupIDs for the enemies, so we know where to remove them. Start with
|
||||||
//stationary groups first.
|
//stationary groups first.
|
||||||
static void AssociateEnemiesWithStrategicGroups()
|
void AssociateEnemiesWithStrategicGroups()
|
||||||
{
|
{
|
||||||
SECTORINFO *pSector;
|
SECTORINFO *pSector;
|
||||||
GROUP *pGroup;
|
GROUP *pGroup;
|
||||||
@@ -1186,7 +1193,7 @@ void CalculateSoldierCells( BOOLEAN fReset )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static INT32 DetermineCellID( SOLDIERCELL *pCell )
|
INT32 DetermineCellID( SOLDIERCELL *pCell )
|
||||||
{
|
{
|
||||||
INT32 iIndex;
|
INT32 iIndex;
|
||||||
|
|
||||||
@@ -1205,7 +1212,7 @@ static INT32 DetermineCellID( SOLDIERCELL *pCell )
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOLEAN IsItAllowedToRender( SOLDIERCELL *pCell )
|
BOOLEAN IsItAllowedToRender( SOLDIERCELL *pCell )
|
||||||
{
|
{
|
||||||
INT32 iID = DetermineCellID( pCell );
|
INT32 iID = DetermineCellID( pCell );
|
||||||
|
|
||||||
@@ -1348,7 +1355,7 @@ void RenderSoldierCellBars( SOLDIERCELL *pCell )
|
|||||||
ColorFillVideoSurfaceArea( FRAME_BUFFER, pCell->xp+46, iStartY, pCell->xp+47, pCell->yp+29, Get16BPPColor( FROMRGB( 8, 107, 8 ) ) );
|
ColorFillVideoSurfaceArea( FRAME_BUFFER, pCell->xp+46, iStartY, pCell->xp+47, pCell->yp+29, Get16BPPColor( FROMRGB( 8, 107, 8 ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void BuildInterfaceBuffer()
|
void BuildInterfaceBuffer()
|
||||||
{
|
{
|
||||||
VSURFACE_DESC vs_desc;
|
VSURFACE_DESC vs_desc;
|
||||||
UINT16 usUselessWidth, usUselessHeight;
|
UINT16 usUselessWidth, usUselessHeight;
|
||||||
@@ -1430,7 +1437,7 @@ static void BuildInterfaceBuffer()
|
|||||||
SetClippingRect( &ClipRect );
|
SetClippingRect( &ClipRect );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ExpandWindow()
|
void ExpandWindow()
|
||||||
{
|
{
|
||||||
SGPRect OldRect;
|
SGPRect OldRect;
|
||||||
UINT32 uiDestPitchBYTES;
|
UINT32 uiDestPitchBYTES;
|
||||||
@@ -1525,7 +1532,7 @@ static void ExpandWindow()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static OBJECTTYPE* FindMedicalKit()
|
OBJECTTYPE* FindMedicalKit()
|
||||||
{
|
{
|
||||||
INT32 i;
|
INT32 i;
|
||||||
INT32 iSlot;
|
INT32 iSlot;
|
||||||
@@ -1540,7 +1547,7 @@ static OBJECTTYPE* FindMedicalKit()
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static UINT32 AutoBandageMercs()
|
UINT32 AutoBandageMercs()
|
||||||
{
|
{
|
||||||
INT32 i, iBest;
|
INT32 i, iBest;
|
||||||
UINT32 uiPointsUsed, uiCurrPointsUsed, uiMaxPointsUsed, uiParallelPointsUsed;
|
UINT32 uiPointsUsed, uiCurrPointsUsed, uiMaxPointsUsed, uiParallelPointsUsed;
|
||||||
@@ -3723,7 +3730,7 @@ void RenderSoldierCellHealth( SOLDIERCELL *pCell )
|
|||||||
mprintf( xp, yp, pStr );
|
mprintf( xp, yp, pStr );
|
||||||
}
|
}
|
||||||
|
|
||||||
static UINT8 GetUnusedMercProfileID()
|
UINT8 GetUnusedMercProfileID()
|
||||||
{
|
{
|
||||||
UINT8 ubRandom=0;
|
UINT8 ubRandom=0;
|
||||||
INT32 i;
|
INT32 i;
|
||||||
@@ -3818,7 +3825,7 @@ void DetermineTeamLeader( BOOLEAN fFriendlyTeam )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ResetNextAttackCounter( SOLDIERCELL *pCell )
|
void ResetNextAttackCounter( SOLDIERCELL *pCell )
|
||||||
{
|
{
|
||||||
pCell->usNextAttack = min( 1000 - pCell->usAttack, 800 );
|
pCell->usNextAttack = min( 1000 - pCell->usAttack, 800 );
|
||||||
pCell->usNextAttack = (UINT16)(1000 + pCell->usNextAttack * 5 + PreRandom( 2000 - pCell->usAttack ) );
|
pCell->usNextAttack = (UINT16)(1000 + pCell->usNextAttack * 5 + PreRandom( 2000 - pCell->usAttack ) );
|
||||||
@@ -3828,7 +3835,7 @@ static void ResetNextAttackCounter( SOLDIERCELL *pCell )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static FLOAT CalcClassBonusOrPenalty( SOLDIERTYPE *pSoldier )
|
FLOAT CalcClassBonusOrPenalty( SOLDIERTYPE *pSoldier )
|
||||||
{
|
{
|
||||||
switch( pSoldier->ubSoldierClass )
|
switch( pSoldier->ubSoldierClass )
|
||||||
{
|
{
|
||||||
@@ -4108,7 +4115,7 @@ void DrawDebugText( SOLDIERCELL *pCell )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static SOLDIERCELL* ChooseTarget( SOLDIERCELL *pAttacker )
|
SOLDIERCELL* ChooseTarget( SOLDIERCELL *pAttacker )
|
||||||
{
|
{
|
||||||
INT32 iAvailableTargets;
|
INT32 iAvailableTargets;
|
||||||
INT32 index;
|
INT32 index;
|
||||||
@@ -4178,7 +4185,7 @@ static SOLDIERCELL* ChooseTarget( SOLDIERCELL *pAttacker )
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOLEAN FireAShot( SOLDIERCELL *pAttacker )
|
BOOLEAN FireAShot( SOLDIERCELL *pAttacker )
|
||||||
{
|
{
|
||||||
OBJECTTYPE *pItem;
|
OBJECTTYPE *pItem;
|
||||||
SOLDIERTYPE *pSoldier;
|
SOLDIERTYPE *pSoldier;
|
||||||
@@ -4232,7 +4239,7 @@ static BOOLEAN FireAShot( SOLDIERCELL *pAttacker )
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOLEAN FireTankCannon( SOLDIERCELL *pAttacker )
|
BOOLEAN FireTankCannon( SOLDIERCELL *pAttacker )
|
||||||
{
|
{
|
||||||
OBJECTTYPE *pItem;
|
OBJECTTYPE *pItem;
|
||||||
SOLDIERTYPE *pSoldier;
|
SOLDIERTYPE *pSoldier;
|
||||||
@@ -4274,7 +4281,7 @@ static BOOLEAN FireTankCannon( SOLDIERCELL *pAttacker )
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOLEAN FireAntiTankWeapon( SOLDIERCELL *pAttacker )
|
BOOLEAN FireAntiTankWeapon( SOLDIERCELL *pAttacker )
|
||||||
{
|
{
|
||||||
OBJECTTYPE *pItem;
|
OBJECTTYPE *pItem;
|
||||||
SOLDIERTYPE *pSoldier;
|
SOLDIERTYPE *pSoldier;
|
||||||
@@ -4329,7 +4336,7 @@ static BOOLEAN FireAntiTankWeapon( SOLDIERCELL *pAttacker )
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOLEAN AttackerHasKnife( SOLDIERCELL *pAttacker )
|
BOOLEAN AttackerHasKnife( SOLDIERCELL *pAttacker )
|
||||||
{
|
{
|
||||||
UINT8 invsize = pAttacker->pSoldier->inv.size();
|
UINT8 invsize = pAttacker->pSoldier->inv.size();
|
||||||
for( UINT8 i = 0; i < invsize; ++i )
|
for( UINT8 i = 0; i < invsize; ++i )
|
||||||
@@ -4344,7 +4351,7 @@ static BOOLEAN AttackerHasKnife( SOLDIERCELL *pAttacker )
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOLEAN TargetHasLoadedGun( SOLDIERTYPE *pSoldier )
|
BOOLEAN TargetHasLoadedGun( SOLDIERTYPE *pSoldier )
|
||||||
{
|
{
|
||||||
OBJECTTYPE *pItem;
|
OBJECTTYPE *pItem;
|
||||||
UINT8 invsize = pSoldier->inv.size();
|
UINT8 invsize = pSoldier->inv.size();
|
||||||
@@ -4366,7 +4373,7 @@ static BOOLEAN TargetHasLoadedGun( SOLDIERTYPE *pSoldier )
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void AttackTarget( SOLDIERCELL *pAttacker, SOLDIERCELL *pTarget )
|
void AttackTarget( SOLDIERCELL *pAttacker, SOLDIERCELL *pTarget )
|
||||||
{
|
{
|
||||||
INT16 sAttack;
|
INT16 sAttack;
|
||||||
INT16 sDefence;
|
INT16 sDefence;
|
||||||
@@ -4986,7 +4993,7 @@ static void AttackTarget( SOLDIERCELL *pAttacker, SOLDIERCELL *pTarget )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void TargetHitCallback( SOLDIERCELL *pTarget, INT32 index )
|
void TargetHitCallback( SOLDIERCELL *pTarget, INT32 index )
|
||||||
{
|
{
|
||||||
INT32 iNewLife;
|
INT32 iNewLife;
|
||||||
SOLDIERCELL *pAttacker;
|
SOLDIERCELL *pAttacker;
|
||||||
@@ -5300,7 +5307,7 @@ static void TargetHitCallback( SOLDIERCELL *pTarget, INT32 index )
|
|||||||
pTarget->uiFlags |= CELL_HITBYATTACKER | CELL_DIRTY;
|
pTarget->uiFlags |= CELL_HITBYATTACKER | CELL_DIRTY;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Delay( UINT32 uiMilliseconds )
|
void Delay( UINT32 uiMilliseconds )
|
||||||
{
|
{
|
||||||
INT32 iTime;
|
INT32 iTime;
|
||||||
iTime = GetJA2Clock();
|
iTime = GetJA2Clock();
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
#include "Campaign Init.h"
|
#include "Campaign Init.h"
|
||||||
#include "random.h"
|
#include "random.h"
|
||||||
#include "Campaign Types.h"
|
#include "Campaign Types.h"
|
||||||
|
#include "Queen Command.h"
|
||||||
|
#include "Overhead.h"
|
||||||
#include "Strategic Movement.h"
|
#include "Strategic Movement.h"
|
||||||
#include "Strategic Status.h"
|
#include "Strategic Status.h"
|
||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
@@ -13,6 +15,7 @@
|
|||||||
#include "Tactical Save.h"
|
#include "Tactical Save.h"
|
||||||
|
|
||||||
#include "connect.h"
|
#include "connect.h"
|
||||||
|
#include <vfs/Core/vfs.h>
|
||||||
#include "XMLWriter.h"
|
#include "XMLWriter.h"
|
||||||
|
|
||||||
#include "UndergroundInit.h"
|
#include "UndergroundInit.h"
|
||||||
@@ -306,7 +309,7 @@ void InitKnowFacilitiesFlags( )
|
|||||||
|
|
||||||
|
|
||||||
//Mobile groups are handled separately from sectors, because they are on the move.
|
//Mobile groups are handled separately from sectors, because they are on the move.
|
||||||
static void GeneratePatrolGroups()
|
void GeneratePatrolGroups()
|
||||||
{
|
{
|
||||||
GROUP *pGroup;
|
GROUP *pGroup;
|
||||||
UINT8 ubNumTroops;
|
UINT8 ubNumTroops;
|
||||||
@@ -524,7 +527,7 @@ void BuildUndergroundSectorInfoList()
|
|||||||
// Lesh: this function creates randomized world
|
// Lesh: this function creates randomized world
|
||||||
// every sector can be randomized between common and alternative, chances 50/50
|
// every sector can be randomized between common and alternative, chances 50/50
|
||||||
// randomization of individual sectors can be switched off via array RandomSector[]
|
// randomization of individual sectors can be switched off via array RandomSector[]
|
||||||
static void InitWorld()
|
void InitWorld()
|
||||||
{
|
{
|
||||||
INT16 sSectorCounter;
|
INT16 sSectorCounter;
|
||||||
|
|
||||||
|
|||||||
@@ -24,11 +24,16 @@
|
|||||||
#include "Animation Data.h"
|
#include "Animation Data.h"
|
||||||
#include "opplist.h"
|
#include "opplist.h"
|
||||||
#include "Meanwhile.h"
|
#include "Meanwhile.h"
|
||||||
|
#include "Strategic AI.h"
|
||||||
|
#include "MessageBoxScreen.h"
|
||||||
#include "Map Information.h"
|
#include "Map Information.h"
|
||||||
#include "Queen Command.h"
|
#include "Queen Command.h"
|
||||||
#include "ai.h" // added by Flugente
|
#include "ai.h" // added by Flugente
|
||||||
|
#include "Isometric Utils.h" // added by Flugente
|
||||||
#include "Soldier Create.h" // added by Flugente
|
#include "Soldier Create.h" // added by Flugente
|
||||||
|
#include "Player Command.h" // added by Flugente
|
||||||
|
|
||||||
|
#include "Strategic Mines.h"
|
||||||
#include "connect.h"
|
#include "connect.h"
|
||||||
|
|
||||||
#include "GameInitOptionsScreen.h"
|
#include "GameInitOptionsScreen.h"
|
||||||
@@ -155,7 +160,7 @@ extern SECTOR_EXT_DATA SectorExternalData[256][4];
|
|||||||
//extern MINE_STATUS_TYPE gMineStatus[ MAX_NUMBER_OF_MINES ];
|
//extern MINE_STATUS_TYPE gMineStatus[ MAX_NUMBER_OF_MINES ];
|
||||||
|
|
||||||
|
|
||||||
static CREATURE_DIRECTIVE* NewDirective( UINT8 ubSectorID, UINT8 ubSectorZ, UINT8 ubCreatureHabitat )
|
CREATURE_DIRECTIVE* NewDirective( UINT8 ubSectorID, UINT8 ubSectorZ, UINT8 ubCreatureHabitat )
|
||||||
{
|
{
|
||||||
CREATURE_DIRECTIVE *curr;
|
CREATURE_DIRECTIVE *curr;
|
||||||
UINT8 ubSectorX, ubSectorY;
|
UINT8 ubSectorX, ubSectorY;
|
||||||
@@ -273,7 +278,7 @@ void InitLairGrumm()
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void InitLair(INT32 iChosenMine)
|
void InitLair(INT32 iChosenMine)
|
||||||
{
|
{
|
||||||
CREATURE_DIRECTIVE *curr;
|
CREATURE_DIRECTIVE *curr;
|
||||||
giLairID = iChosenMine;
|
giLairID = iChosenMine;
|
||||||
@@ -512,7 +517,7 @@ void InitCreatureQuest()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void AddCreatureToNode( CREATURE_DIRECTIVE *node )
|
void AddCreatureToNode( CREATURE_DIRECTIVE *node )
|
||||||
{
|
{
|
||||||
node->pLevel->ubNumCreatures++;
|
node->pLevel->ubNumCreatures++;
|
||||||
|
|
||||||
@@ -524,7 +529,7 @@ static void AddCreatureToNode( CREATURE_DIRECTIVE *node )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOLEAN PlaceNewCreature( CREATURE_DIRECTIVE *node, INT32 iDistance )
|
BOOLEAN PlaceNewCreature( CREATURE_DIRECTIVE *node, INT32 iDistance )
|
||||||
{
|
{
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"CreatureSpreading1");
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"CreatureSpreading1");
|
||||||
if( !node )
|
if( !node )
|
||||||
@@ -672,7 +677,7 @@ void DecayCreatures()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void AddCreaturesToBattle( UINT8 ubNumYoungMales, UINT8 ubNumYoungFemales, UINT8 ubNumAdultMales, UINT8 ubNumAdultFemales )
|
void AddCreaturesToBattle( UINT8 ubNumYoungMales, UINT8 ubNumYoungFemales, UINT8 ubNumAdultMales, UINT8 ubNumAdultFemales )
|
||||||
{
|
{
|
||||||
INT32 iRandom;
|
INT32 iRandom;
|
||||||
SOLDIERTYPE *pSoldier;
|
SOLDIERTYPE *pSoldier;
|
||||||
@@ -759,7 +764,7 @@ static void AddCreaturesToBattle( UINT8 ubNumYoungMales, UINT8 ubNumYoungFemales
|
|||||||
AllTeamsLookForAll( FALSE );
|
AllTeamsLookForAll( FALSE );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void AddCreaturesToBattle_Other( UINT8 ubNum )
|
void AddCreaturesToBattle_Other( UINT8 ubNum )
|
||||||
{
|
{
|
||||||
SOLDIERTYPE *pSoldier;
|
SOLDIERTYPE *pSoldier;
|
||||||
MAPEDGEPOINTINFO MapEdgepointInfo = {};
|
MAPEDGEPOINTINFO MapEdgepointInfo = {};
|
||||||
@@ -846,7 +851,7 @@ static void AddCreaturesToBattle_Other( UINT8 ubNum )
|
|||||||
AllTeamsLookForAll( FALSE );
|
AllTeamsLookForAll( FALSE );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ChooseTownSectorToAttack( UINT8 ubSectorID, BOOLEAN fOverrideTest )
|
void ChooseTownSectorToAttack( UINT8 ubSectorID, BOOLEAN fOverrideTest )
|
||||||
{
|
{
|
||||||
INT32 iRandom, i;
|
INT32 iRandom, i;
|
||||||
UINT8 ubSectorX, ubSectorY;
|
UINT8 ubSectorX, ubSectorY;
|
||||||
@@ -1477,7 +1482,7 @@ void ChooseCreatureQuestStartDay()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void DeleteDirectiveNode( CREATURE_DIRECTIVE **node )
|
void DeleteDirectiveNode( CREATURE_DIRECTIVE **node )
|
||||||
{
|
{
|
||||||
if( (*node)->next )
|
if( (*node)->next )
|
||||||
DeleteDirectiveNode( &((*node)->next) );
|
DeleteDirectiveNode( &((*node)->next) );
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
#include "Facilities.h"
|
#include "Facilities.h"
|
||||||
#include "Soldier Control.h"
|
#include "Soldier Control.h"
|
||||||
#include "Map Screen Interface.h"
|
#include "Map Screen Interface.h"
|
||||||
|
#include "Overhead.h"
|
||||||
#include "Assignments.h"
|
#include "Assignments.h"
|
||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#include "LaptopSave.h"
|
#include "LaptopSave.h"
|
||||||
@@ -28,7 +29,10 @@
|
|||||||
#include "Interface.h"
|
#include "Interface.h"
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include "Morale.h"
|
#include "Morale.h"
|
||||||
|
#include "Points.h"
|
||||||
|
#include "Soldier Control.h"
|
||||||
#include "Isometric Utils.h"
|
#include "Isometric Utils.h"
|
||||||
|
#include "MilitiaSquads.h"
|
||||||
#include "Tactical Save.h"
|
#include "Tactical Save.h"
|
||||||
#include <random>
|
#include <random>
|
||||||
|
|
||||||
@@ -1993,8 +1997,8 @@ INT32 GetTotalFacilityHourlyCosts( BOOLEAN fPositive )
|
|||||||
pSoldier = gCharactersList[ ubCounter ].usSolID;
|
pSoldier = gCharactersList[ ubCounter ].usSolID;
|
||||||
|
|
||||||
// Is character truly valid?
|
// Is character truly valid?
|
||||||
if( pSoldier != NULL && !( pSoldier->flags.uiStatusFlags & SOLDIER_VEHICLE ) &&
|
if( !( pSoldier->flags.uiStatusFlags & SOLDIER_VEHICLE ) &&
|
||||||
pSoldier->bSectorZ == 0 &&
|
pSoldier->bSectorZ == 0 && pSoldier != NULL &&
|
||||||
pSoldier->stats.bLife >= OKLIFE &&
|
pSoldier->stats.bLife >= OKLIFE &&
|
||||||
!(pSoldier->flags.fMercAsleep) )
|
!(pSoldier->flags.fMercAsleep) )
|
||||||
{
|
{
|
||||||
|
|||||||
+25
-21
@@ -1,24 +1,28 @@
|
|||||||
#include "sgp.h"
|
#include "sgp.h"
|
||||||
#include "Game Clock.h"
|
#include "Game Clock.h"
|
||||||
#include "Font.h"
|
#include "Font.h"
|
||||||
#include "Render Dirty.h"
|
#include "Render Dirty.h"
|
||||||
#include "Timer Control.h"
|
#include "Timer Control.h"
|
||||||
#include "Overhead.h"
|
#include "Overhead.h"
|
||||||
#include "environment.h"
|
#include "environment.h"
|
||||||
#include "message.h"
|
#include "Game Clock.h"
|
||||||
#include <mousesystem.h>
|
#include "message.h"
|
||||||
#include "MercTextBox.h"
|
#include "Game Events.h"
|
||||||
#include "renderworld.h"
|
#include "Assignments.h"
|
||||||
#include "lighting.h"
|
#include "MercTextBox.h"
|
||||||
#include "Map Screen Interface.h"
|
#include "renderworld.h"
|
||||||
#include "Event Pump.h"
|
#include "lighting.h"
|
||||||
#include "Text.h"
|
#include "Map Screen Interface.h"
|
||||||
#include "Interface Control.h"
|
#include "PreBattle Interface.h"
|
||||||
#include "Map Screen Interface Map.h"
|
#include "Event Pump.h"
|
||||||
#include "Map Screen Interface Bottom.h"
|
#include "Text.h"
|
||||||
#include "gamescreen.h"
|
#include "Interface Control.h"
|
||||||
#include "Map Information.h"
|
#include "Map Screen Interface Map.h"
|
||||||
#include "GameSettings.h"
|
#include "Map Screen Interface Bottom.h"
|
||||||
|
#include "gamescreen.h"
|
||||||
|
#include "Map Information.h"
|
||||||
|
#include "GameSettings.h"
|
||||||
|
|
||||||
#include "LuaInitNPCs.h"
|
#include "LuaInitNPCs.h"
|
||||||
|
|
||||||
//#define DEBUG_GAME_CLOCK
|
//#define DEBUG_GAME_CLOCK
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#include "environment.h"
|
#include "environment.h"
|
||||||
#include "Ambient Control.h"
|
#include "Ambient Control.h"
|
||||||
#include "Quests.h"
|
#include "Quests.h"
|
||||||
|
// #include "Sound Control.h"
|
||||||
#include "AimMembers.h"
|
#include "AimMembers.h"
|
||||||
#include "Strategic Event Handler.h"
|
#include "Strategic Event Handler.h"
|
||||||
#include "BobbyR.h"
|
#include "BobbyR.h"
|
||||||
@@ -16,12 +17,14 @@
|
|||||||
#include "Strategic Movement.h"
|
#include "Strategic Movement.h"
|
||||||
#include "Assignments.h"
|
#include "Assignments.h"
|
||||||
#include "Strategic Mines.h"
|
#include "Strategic Mines.h"
|
||||||
|
#include "Strategic Town Loyalty.h"
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include "Map Screen Interface.h"
|
#include "Map Screen Interface.h"
|
||||||
#include "Map Screen Helicopter.h"
|
#include "Map Screen Helicopter.h"
|
||||||
#include "Scheduling.h"
|
#include "Scheduling.h"
|
||||||
#include "Arms Dealer Init.h"
|
#include "Arms Dealer Init.h"
|
||||||
#include "strategic town reputation.h"
|
#include "strategic town reputation.h"
|
||||||
|
#include "Air Raid.h"
|
||||||
#include "Meanwhile.h"
|
#include "Meanwhile.h"
|
||||||
#include "Overhead.h"
|
#include "Overhead.h"
|
||||||
#include "random.h"
|
#include "random.h"
|
||||||
@@ -29,6 +32,7 @@
|
|||||||
#include "Strategic AI.h"
|
#include "Strategic AI.h"
|
||||||
#include "Merc Contract.h"
|
#include "Merc Contract.h"
|
||||||
#include "Strategic Status.h"
|
#include "Strategic Status.h"
|
||||||
|
#include "INIReader.h"
|
||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#include "english.h"
|
#include "english.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
@@ -46,6 +50,7 @@
|
|||||||
#include "Rebel Command.h"
|
#include "Rebel Command.h"
|
||||||
#include "interface Dialogue.h"
|
#include "interface Dialogue.h"
|
||||||
|
|
||||||
|
#include "connect.h"
|
||||||
|
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
#include "Explosion Control.h"
|
#include "Explosion Control.h"
|
||||||
@@ -80,7 +85,7 @@ void CrippledVersionEndGameCheck();
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
static BOOLEAN DelayEventIfBattleInProgress( STRATEGICEVENT *pEvent )
|
BOOLEAN DelayEventIfBattleInProgress( STRATEGICEVENT *pEvent )
|
||||||
{
|
{
|
||||||
STRATEGICEVENT *pNewEvent;
|
STRATEGICEVENT *pNewEvent;
|
||||||
if( gTacticalStatus.fEnemyInSector )
|
if( gTacticalStatus.fEnemyInSector )
|
||||||
@@ -210,7 +215,7 @@ BOOLEAN ExecuteStrategicEvent( STRATEGICEVENT *pEvent )
|
|||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
//No JA25 UB
|
//No JA25 UB
|
||||||
#else
|
#else
|
||||||
AddEmail(MERC_INTRO, MERC_INTRO_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT, XML_SPECK_INTRO);
|
AddEmail(MERC_INTRO, MERC_INTRO_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin( ), -1, -1 ,TYPE_EMAIL_EMAIL_EDT );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -487,7 +492,7 @@ BOOLEAN ExecuteStrategicEvent( STRATEGICEVENT *pEvent )
|
|||||||
// No PCM in UB
|
// No PCM in UB
|
||||||
#else
|
#else
|
||||||
case EVENT_PMC_EMAIL:
|
case EVENT_PMC_EMAIL:
|
||||||
AddEmail(PMC_INTRO, PMC_INTRO_LENGTH, PMC, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT, XML_KERBERUS_OFFER);
|
AddEmail( PMC_INTRO, PMC_INTRO_LENGTH, PMC, GetWorldTotalMin( ), -1, -1, TYPE_EMAIL_EMAIL_EDT );
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -503,14 +508,16 @@ BOOLEAN ExecuteStrategicEvent( STRATEGICEVENT *pEvent )
|
|||||||
gMercProfiles[MARIA].bMercStatus != MERC_IS_DEAD && gMercProfiles[ANGEL].bMercStatus != MERC_IS_DEAD )
|
gMercProfiles[MARIA].bMercStatus != MERC_IS_DEAD && gMercProfiles[ANGEL].bMercStatus != MERC_IS_DEAD )
|
||||||
{
|
{
|
||||||
StartQuest( QUEST_KINGPIN_ANGEL_MARIA, gWorldSectorX, gWorldSectorY );
|
StartQuest( QUEST_KINGPIN_ANGEL_MARIA, gWorldSectorX, gWorldSectorY );
|
||||||
AddEmail(KINGPIN_BOUNTY_INITIAL, KINGPIN_BOUNTY_INITIAL_LENGTH, KING_PIN, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT, XML_KINGPIN_JOBOPPORTUNITY);
|
|
||||||
|
AddEmail( KINGPIN_BOUNTY_INITIAL, KINGPIN_BOUNTY_INITIAL_LENGTH, KING_PIN, GetWorldTotalMin( ), -1, -1, TYPE_EMAIL_EMAIL_EDT );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EVENT_KINGPIN_BOUNTY_END_KILLEDTHEM:
|
case EVENT_KINGPIN_BOUNTY_END_KILLEDTHEM:
|
||||||
if ( gMercProfiles[KINGPIN].bMercStatus != MERC_IS_DEAD && !CheckFact( FACT_KINGPIN_DEAD, NO_PROFILE ) && !CheckFact( FACT_KINGPIN_IS_ENEMY, NO_PROFILE ) )
|
if ( gMercProfiles[KINGPIN].bMercStatus != MERC_IS_DEAD && !CheckFact( FACT_KINGPIN_DEAD, NO_PROFILE ) && !CheckFact( FACT_KINGPIN_IS_ENEMY, NO_PROFILE ) )
|
||||||
{
|
{
|
||||||
AddEmail(KINGPIN_BOUNTY_KINGPIN_REWARD, KINGPIN_BOUNTY_KINGPIN_REWARD_LENGTH, KING_PIN, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT, XML_KINGPIN_WELLDONE);
|
AddEmail( KINGPIN_BOUNTY_KINGPIN_REWARD, KINGPIN_BOUNTY_KINGPIN_REWARD_LENGTH, KING_PIN, GetWorldTotalMin( ), -1, -1, TYPE_EMAIL_EMAIL_EDT );
|
||||||
|
|
||||||
// also authorise payment from kingpin to the player
|
// also authorise payment from kingpin to the player
|
||||||
AddTransactionToPlayersBook( ANONYMOUS_DEPOSIT, 0, GetWorldTotalMin( ), 10000 );
|
AddTransactionToPlayersBook( ANONYMOUS_DEPOSIT, 0, GetWorldTotalMin( ), 10000 );
|
||||||
}
|
}
|
||||||
@@ -526,13 +533,14 @@ BOOLEAN ExecuteStrategicEvent( STRATEGICEVENT *pEvent )
|
|||||||
if ( gMercProfiles[MARIA].bMercStatus != MERC_IS_DEAD && gMercProfiles[ANGEL].bMercStatus != MERC_IS_DEAD
|
if ( gMercProfiles[MARIA].bMercStatus != MERC_IS_DEAD && gMercProfiles[ANGEL].bMercStatus != MERC_IS_DEAD
|
||||||
&& CheckFact( FACT_BOUNTYHUNTER_KILLED_1, NO_PROFILE ) && CheckFact( FACT_BOUNTYHUNTER_KILLED_2, NO_PROFILE ) )
|
&& CheckFact( FACT_BOUNTYHUNTER_KILLED_1, NO_PROFILE ) && CheckFact( FACT_BOUNTYHUNTER_KILLED_2, NO_PROFILE ) )
|
||||||
{
|
{
|
||||||
AddEmail(KINGPIN_BOUNTY_ANGEL_THANKS, KINGPIN_BOUNTY_ANGEL_THANKS_LENGTH, ANGEL_DASILVA, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT, XML_DASILVA_THANKYOU);
|
AddEmail( KINGPIN_BOUNTY_ANGEL_THANKS, KINGPIN_BOUNTY_ANGEL_THANKS_LENGTH, ANGEL_DASILVA, GetWorldTotalMin( ), -1, -1, TYPE_EMAIL_EMAIL_EDT );
|
||||||
AddEmail(KINGPIN_BOUNTY_TARGET_GOTAWAY, KINGPIN_BOUNTY_TARGET_GOTAWAY_LENGTH, KING_PIN, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT, XML_KINGPIN_FAILUREOBSTACLES);
|
|
||||||
|
AddEmail( KINGPIN_BOUNTY_TARGET_GOTAWAY, KINGPIN_BOUNTY_TARGET_GOTAWAY_LENGTH, KING_PIN, GetWorldTotalMin( ), -1, -1, TYPE_EMAIL_EMAIL_EDT );
|
||||||
}
|
}
|
||||||
// we can assume that the bounty hunters for to them first - Kingpin sends an email and states that someone else finished the job
|
// we can assume that the bounty hunters for to them first - Kingpin sends an email and states that someone else finished the job
|
||||||
else if ( gMercProfiles[KINGPIN].bMercStatus != MERC_IS_DEAD && !CheckFact( FACT_KINGPIN_DEAD, NO_PROFILE ) && !CheckFact( FACT_KINGPIN_IS_ENEMY, NO_PROFILE ) )
|
else if ( gMercProfiles[KINGPIN].bMercStatus != MERC_IS_DEAD && !CheckFact( FACT_KINGPIN_DEAD, NO_PROFILE ) && !CheckFact( FACT_KINGPIN_IS_ENEMY, NO_PROFILE ) )
|
||||||
{
|
{
|
||||||
AddEmail(KINGPIN_BOUNTY_BH_GOTTARGET, KINGPIN_BOUNTY_BH_GOTTARGET_LENGTH, KING_PIN, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT, XML_KINGPIN_FAILURE);
|
AddEmail( KINGPIN_BOUNTY_BH_GOTTARGET, KINGPIN_BOUNTY_BH_GOTTARGET_LENGTH, KING_PIN, GetWorldTotalMin( ), -1, -1, TYPE_EMAIL_EMAIL_EDT );
|
||||||
}
|
}
|
||||||
|
|
||||||
// in any case, this quest is now over
|
// in any case, this quest is now over
|
||||||
@@ -598,7 +606,7 @@ BOOLEAN ExecuteStrategicEvent( STRATEGICEVENT *pEvent )
|
|||||||
|
|
||||||
#ifndef JA2UB
|
#ifndef JA2UB
|
||||||
case EVENT_MILITIAROSTER_EMAIL:
|
case EVENT_MILITIAROSTER_EMAIL:
|
||||||
AddEmail(MILITIAROSTER_INTRO, MILITIAROSTER_INTRO_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT, XML_ENRICO_MILITIA_WEBSITE);
|
AddEmail( MILITIAROSTER_INTRO, MILITIAROSTER_INTRO_LENGTH, MAIL_ENRICO, GetWorldTotalMin( ), -1, -1, TYPE_EMAIL_EMAIL_EDT );
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -625,7 +633,7 @@ BOOLEAN ExecuteStrategicEvent( STRATEGICEVENT *pEvent )
|
|||||||
|
|
||||||
#ifndef JA2UB
|
#ifndef JA2UB
|
||||||
case EVENT_INTEL_ENRICO_EMAIL:
|
case EVENT_INTEL_ENRICO_EMAIL:
|
||||||
AddEmail(INTEL_ENRICO_INTRO, INTEL_ENRICO_INTRO_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT, XML_ENRICO_INTEL);
|
AddEmail( INTEL_ENRICO_INTRO, INTEL_ENRICO_INTRO_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT );
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ BOOLEAN DeleteEventsWithDeletionPending()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void AdjustClockToEventStamp( STRATEGICEVENT *pEvent, UINT32 *puiAdjustment )
|
void AdjustClockToEventStamp( STRATEGICEVENT *pEvent, UINT32 *puiAdjustment )
|
||||||
{
|
{
|
||||||
UINT32 uiDiff;
|
UINT32 uiDiff;
|
||||||
|
|
||||||
|
|||||||
+11
-2
@@ -9,8 +9,10 @@
|
|||||||
#include "Soldier Profile.h"
|
#include "Soldier Profile.h"
|
||||||
#include "strategicmap.h"
|
#include "strategicmap.h"
|
||||||
#include "Game Init.h"
|
#include "Game Init.h"
|
||||||
|
#include "Animation Data.h"
|
||||||
#include "finances.h"
|
#include "finances.h"
|
||||||
#include "Soldier Create.h"
|
#include "Soldier Create.h"
|
||||||
|
#include "Soldier Init List.h"
|
||||||
#include "strategic.h"
|
#include "strategic.h"
|
||||||
#include "history.h"
|
#include "history.h"
|
||||||
#include "merc entering.h"
|
#include "merc entering.h"
|
||||||
@@ -29,10 +31,12 @@
|
|||||||
#include "Creature Spreading.h"
|
#include "Creature Spreading.h"
|
||||||
#include "Quests.h"
|
#include "Quests.h"
|
||||||
#include "Strategic AI.h"
|
#include "Strategic AI.h"
|
||||||
|
#include "LaptopSave.h"
|
||||||
#include "AimMembers.h"
|
#include "AimMembers.h"
|
||||||
#include "Dialogue Control.h"
|
#include "Dialogue Control.h"
|
||||||
#include "NPC.h"
|
#include "NPC.h"
|
||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
|
#include "interface Dialogue.h"
|
||||||
#include "Map Screen Interface Border.h"
|
#include "Map Screen Interface Border.h"
|
||||||
#include "Map Screen Helicopter.h"
|
#include "Map Screen Helicopter.h"
|
||||||
#include "Vehicles.h"
|
#include "Vehicles.h"
|
||||||
@@ -47,17 +51,22 @@
|
|||||||
// HEADROCK HAM 3.6: Include for adding facility debt reset
|
// HEADROCK HAM 3.6: Include for adding facility debt reset
|
||||||
#include "Facilities.h"
|
#include "Facilities.h"
|
||||||
// HEADROCK HAM 4: Include for initializing Manual Restrictions
|
// HEADROCK HAM 4: Include for initializing Manual Restrictions
|
||||||
|
#include "MilitiaSquads.h"
|
||||||
#include "Map Screen Interface Map Inventory.h"//dnl ch51 081009
|
#include "Map Screen Interface Map Inventory.h"//dnl ch51 081009
|
||||||
#include "CampaignStats.h" // added by Flugente
|
#include "CampaignStats.h" // added by Flugente
|
||||||
#include "PMC.h" // added by Flugente
|
#include "PMC.h" // added by Flugente
|
||||||
|
#include "ASD.h" // added by Flugente
|
||||||
#include "MiniEvents.h"
|
#include "MiniEvents.h"
|
||||||
#include "Rebel Command.h"
|
#include "Rebel Command.h"
|
||||||
#include "World Items.h"
|
#include "World Items.h"
|
||||||
|
|
||||||
|
#include "Vehicles.h"
|
||||||
|
#include "Text.h"
|
||||||
#include "connect.h"
|
#include "connect.h"
|
||||||
#include "XML.h"
|
#include "XML.h"
|
||||||
#include "mercs.h"
|
#include "mercs.h"
|
||||||
#include "aim.h"
|
#include "aim.h"
|
||||||
|
#include "Map Screen Interface.h"
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
#include "Ja25 Strategic Ai.h"
|
#include "Ja25 Strategic Ai.h"
|
||||||
#include "Ja25_Tactical.h"
|
#include "Ja25_Tactical.h"
|
||||||
@@ -96,14 +105,14 @@ UINT8 gubCheatLevel = STARTING_CHEAT_LEVEL;
|
|||||||
UINT8 gubScreenCount=0;
|
UINT8 gubScreenCount=0;
|
||||||
|
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
static void InitCustomStrategicLayer ( void )
|
void InitCustomStrategicLayer ( void )
|
||||||
{
|
{
|
||||||
LetLuaGameInit(2); //load custom InitStrategicLayer
|
LetLuaGameInit(2); //load custom InitStrategicLayer
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void InitNPCs( void )
|
void InitNPCs( void )
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifdef LUA_GAME_INIT_NPCS
|
#ifdef LUA_GAME_INIT_NPCS
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#include "Strategic Mines.h"
|
#include "Strategic Mines.h"
|
||||||
#include "Campaign.h"
|
#include "Campaign.h"
|
||||||
#include "Morale.h"
|
#include "Morale.h"
|
||||||
|
#include "Quests.h"
|
||||||
#include "Game Clock.h"
|
#include "Game Clock.h"
|
||||||
#include "Overhead.h"
|
#include "Overhead.h"
|
||||||
#include "jascreens.h"
|
#include "jascreens.h"
|
||||||
@@ -908,7 +909,7 @@ void HourlyStealUpdate()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOLEAN RemoveItemInSector( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ, UINT16 usItem, UINT32 usNumToRemove )
|
BOOLEAN RemoveItemInSector( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ, UINT16 usItem, UINT32 usNumToRemove )
|
||||||
{
|
{
|
||||||
UINT32 uiTotalNumberOfRealItems = 0;
|
UINT32 uiTotalNumberOfRealItems = 0;
|
||||||
std::vector<WORLDITEM> pWorldItem;//dnl ch75 271013
|
std::vector<WORLDITEM> pWorldItem;//dnl ch75 271013
|
||||||
@@ -984,7 +985,7 @@ static BOOLEAN RemoveItemInSector( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static UINT32 CountAccessibleItemsInSector( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ, UINT16 usItem )
|
UINT32 CountAccessibleItemsInSector( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ, UINT16 usItem )
|
||||||
{
|
{
|
||||||
UINT32 numfound = 0;
|
UINT32 numfound = 0;
|
||||||
UINT32 uiTotalNumberOfRealItems = 0;
|
UINT32 uiTotalNumberOfRealItems = 0;
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#ifdef JA2UB
|
|
||||||
#include "builddefines.h"
|
#include "builddefines.h"
|
||||||
|
|
||||||
#include "strategicmap.h"
|
#include "strategicmap.h"
|
||||||
@@ -69,6 +68,7 @@
|
|||||||
#include "Auto Resolve.h"
|
#include "Auto Resolve.h"
|
||||||
#include "Cursors.h"
|
#include "Cursors.h"
|
||||||
|
|
||||||
|
#ifdef JA2UB
|
||||||
#include "Soldier Init List.h"
|
#include "Soldier Init List.h"
|
||||||
#include "Dialogue Control.h"
|
#include "Dialogue Control.h"
|
||||||
#include "Game Clock.h"
|
#include "Game Clock.h"
|
||||||
@@ -145,6 +145,8 @@ void InitJohnKulbaInitialSector();
|
|||||||
|
|
||||||
void FixEnemyCounterInSectorBug();
|
void FixEnemyCounterInSectorBug();
|
||||||
|
|
||||||
|
void AddEnemiesToFirstTunnelSector();
|
||||||
|
void AddEnemiesToSecondTunnelSector();
|
||||||
UINT8 NumEnemiesToAttackFirstTunnelSector( UINT8 *pAdmins, UINT8 *pTroops, UINT8 *pElites, UINT8 *pTanks, UINT8 *pJeeps, UINT8 *pRobots );
|
UINT8 NumEnemiesToAttackFirstTunnelSector( UINT8 *pAdmins, UINT8 *pTroops, UINT8 *pElites, UINT8 *pTanks, UINT8 *pJeeps, UINT8 *pRobots );
|
||||||
UINT8 NumEnemiesToAttackSecondTunnelSector( UINT8 *pAdmins, UINT8 *pTroops, UINT8 *pElites, UINT8 *pTanks, UINT8 *pJeeps, UINT8 *pRobots );
|
UINT8 NumEnemiesToAttackSecondTunnelSector( UINT8 *pAdmins, UINT8 *pTroops, UINT8 *pElites, UINT8 *pTanks, UINT8 *pJeeps, UINT8 *pRobots );
|
||||||
void RemoveAllEnemySoldierInitListLinks();
|
void RemoveAllEnemySoldierInitListLinks();
|
||||||
@@ -1270,69 +1272,10 @@ void InitJa25StrategicAiBloodcats( )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static BOOLEAN AddEnemiesToSectorPlayerIsIn(INT16 sectorX, INT16 sectorY, INT8 sectorZ, UINT8 admins, UINT8 troops, UINT8 elites)
|
|
||||||
{
|
|
||||||
if ( gGameUBOptions.pJA2UB == TRUE )
|
|
||||||
{
|
|
||||||
|
|
||||||
if ( !(gTacticalStatus.uiFlags & INCOMBAT) )
|
|
||||||
{
|
|
||||||
SetEnemyEncounterCode(ENEMY_INVASION_CODE);
|
|
||||||
}
|
|
||||||
|
|
||||||
SetNumberJa25EnemiesInSector(sectorX, sectorY, sectorZ, admins, troops, elites, 0, 0, 0);
|
|
||||||
|
|
||||||
SetThisSectorAsEnemyControlled(sectorX, sectorY, sectorZ, FALSE);
|
|
||||||
|
|
||||||
//Set up flag so enemies will go and find the player in that sector
|
|
||||||
gJa25SaveStruct.fEnemyShouldImmediatelySeekThePlayer = TRUE;
|
|
||||||
gJa25SaveStruct.bSectorTheEnemyWillSeekEnemy = SECTOR(sectorX, sectorY);
|
|
||||||
}
|
|
||||||
|
|
||||||
return(TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void AddEnemiesToFirstTunnelSector()
|
|
||||||
{
|
|
||||||
const auto x1 = gGameUBOptions.Tunnel1_SectorX;
|
|
||||||
const auto y1 = gGameUBOptions.Tunnel1_SectorY;
|
|
||||||
const auto z1 = gGameUBOptions.Tunnel1_SectorZ;
|
|
||||||
|
|
||||||
UINT8 ubNumAdmins = 0;
|
|
||||||
UINT8 ubNumTroops = 0;
|
|
||||||
UINT8 ubNumElites = 0;
|
|
||||||
UINT8 ubNumTanks = 0;
|
|
||||||
UINT8 ubNumJeeps = 0;
|
|
||||||
UINT8 ubNumRobots = 0;
|
|
||||||
|
|
||||||
NumEnemiesToAttackFirstTunnelSector(&ubNumAdmins, &ubNumTroops, &ubNumElites, &ubNumTanks, &ubNumJeeps, &ubNumRobots);
|
|
||||||
SetNumberJa25EnemiesInSector(x1, y1, z1, ubNumAdmins, ubNumTroops, ubNumElites, ubNumTanks, ubNumJeeps, ubNumRobots);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void AddEnemiesToSecondTunnelSector()
|
|
||||||
{
|
|
||||||
const auto x2 = gGameUBOptions.Tunnel2_SectorX;
|
|
||||||
const auto y2 = gGameUBOptions.Tunnel2_SectorY;
|
|
||||||
const auto z2 = gGameUBOptions.Tunnel2_SectorZ;
|
|
||||||
|
|
||||||
UINT8 ubNumAdmins = 0;
|
|
||||||
UINT8 ubNumTroops = 0;
|
|
||||||
UINT8 ubNumElites = 0;
|
|
||||||
UINT8 ubNumTanks = 0;
|
|
||||||
UINT8 ubNumJeeps = 0;
|
|
||||||
UINT8 ubNumRobots = 0;
|
|
||||||
|
|
||||||
NumEnemiesToAttackSecondTunnelSector(&ubNumAdmins, &ubNumTroops, &ubNumElites, &ubNumTanks, &ubNumJeeps, &ubNumRobots);
|
|
||||||
SetNumberJa25EnemiesInSector(x2, y2, z2, ubNumAdmins, ubNumTroops, ubNumElites, ubNumTanks, ubNumJeeps, ubNumRobots);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void HandleAddingEnemiesToTunnelMaps()
|
void HandleAddingEnemiesToTunnelMaps()
|
||||||
{
|
{
|
||||||
UINT8 ubNumEnemies = 0;
|
BOOLEAN fInCombat = ( gTacticalStatus.uiFlags & INCOMBAT );
|
||||||
UINT8 ubNumAdmins = 0;
|
UINT8 ubNumEnemies=0;
|
||||||
UINT8 ubNumTroops = 0;
|
|
||||||
UINT8 ubNumElites = 0;
|
|
||||||
|
|
||||||
//if the player has been in the complex
|
//if the player has been in the complex
|
||||||
if( HaveMercsEverBeenInComplex() )
|
if( HaveMercsEverBeenInComplex() )
|
||||||
@@ -1341,35 +1284,21 @@ void HandleAddingEnemiesToTunnelMaps()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto x1 = gGameUBOptions.Tunnel1_SectorX;
|
|
||||||
const auto y1 = gGameUBOptions.Tunnel1_SectorY;
|
|
||||||
const auto z1 = gGameUBOptions.Tunnel1_SectorZ;
|
|
||||||
|
|
||||||
const auto x2 = gGameUBOptions.Tunnel2_SectorX;
|
|
||||||
const auto y2 = gGameUBOptions.Tunnel2_SectorY;
|
|
||||||
const auto z2 = gGameUBOptions.Tunnel2_SectorZ;
|
|
||||||
|
|
||||||
const bool isPlayerInFirstTunnel = AreAnyPlayerMercsStillInSector(x1, y1, z1);
|
|
||||||
const bool isPlayerInSecondTunnel = AreAnyPlayerMercsStillInSector(x2, y2, z2);
|
|
||||||
|
|
||||||
//if the player IS NOT in either of the tunnel sectors
|
//if the player IS NOT in either of the tunnel sectors
|
||||||
if( !isPlayerInFirstTunnel && !isPlayerInSecondTunnel )
|
if( !AreAnyPlayerMercsStillInSector( 14, 10, 1 ) &&
|
||||||
|
!AreAnyPlayerMercsStillInSector( 14, 11, 1 ) )
|
||||||
{
|
{
|
||||||
// Add enemies to both sectors if fan was blown up
|
AddEnemiesToJa25TunnelMaps();
|
||||||
if ( gJa25SaveStruct.ubHowPlayerGotThroughFan == PG__PLAYER_BLEW_UP_FAN_TO_GET_THROUGH )
|
|
||||||
{
|
|
||||||
AddEnemiesToFirstTunnelSector();
|
|
||||||
AddEnemiesToSecondTunnelSector();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//else if the player IS NOT in the 2nd sector but is in the first sector
|
//else if the player IS NOT in the 2nd sector but in the first sector
|
||||||
else if( isPlayerInFirstTunnel && !isPlayerInSecondTunnel )
|
else if( AreAnyPlayerMercsStillInSector( 14, 10, 1 ) &&
|
||||||
|
!AreAnyPlayerMercsStillInSector( 14, 11, 1 ) )
|
||||||
{
|
{
|
||||||
ubNumEnemies = NumEnemiesToAttackFirstTunnelSector(&ubNumAdmins, &ubNumTroops, &ubNumElites, NULL, NULL, NULL );
|
ubNumEnemies = NumEnemiesToAttackFirstTunnelSector( NULL, NULL, NULL, NULL, NULL, NULL );
|
||||||
|
|
||||||
//Add enemies to the first sector
|
//Add enemies to the first sector
|
||||||
AddEnemiesToSectorPlayerIsIn( x1, y1, z1, ubNumAdmins, ubNumTroops, ubNumElites);
|
HandleAddEnemiesToSectorPlayerIsntIn( JA25_J14_1, ubNumEnemies );
|
||||||
|
|
||||||
//Remember to move the enemies to be in the entrance to the tunnel
|
//Remember to move the enemies to be in the entrance to the tunnel
|
||||||
SetJa25GeneralFlag( JA_GF__MOVE_ENEMIES_TO_EDGE_IN_TUNNEL_1 );
|
SetJa25GeneralFlag( JA_GF__MOVE_ENEMIES_TO_EDGE_IN_TUNNEL_1 );
|
||||||
@@ -1378,17 +1307,58 @@ void HandleAddingEnemiesToTunnelMaps()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//else if the player is in the second sector
|
//else if the player is in the second sector
|
||||||
else if( isPlayerInSecondTunnel )
|
else if( AreAnyPlayerMercsStillInSector( 14, 11, 1 ) )
|
||||||
{
|
{
|
||||||
ubNumEnemies = NumEnemiesToAttackSecondTunnelSector(&ubNumAdmins, &ubNumTroops, &ubNumElites, NULL, NULL, NULL );
|
ubNumEnemies = NumEnemiesToAttackSecondTunnelSector( NULL, NULL, NULL, NULL, NULL, NULL );
|
||||||
|
|
||||||
AddEnemiesToSectorPlayerIsIn(x2, y2, z2, ubNumAdmins, ubNumTroops, ubNumElites);
|
//Add enemies to the first sector
|
||||||
|
HandleAddEnemiesToSectorPlayerIsntIn( JA25_K14_1, ubNumEnemies );
|
||||||
|
|
||||||
//Remember to move the enemies to be in the entrance to the tunnel
|
//Remember to move the enemies to be in the entrance to the tunnel
|
||||||
SetJa25GeneralFlag( JA_GF__MOVE_ENEMIES_TO_EDGE_IN_TUNNEL_2 );
|
SetJa25GeneralFlag( JA_GF__MOVE_ENEMIES_TO_EDGE_IN_TUNNEL_2 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AddEnemiesToJa25TunnelMaps()
|
||||||
|
{
|
||||||
|
if( gJa25SaveStruct.ubHowPlayerGotThroughFan == PG__PLAYER_BLEW_UP_FAN_TO_GET_THROUGH )
|
||||||
|
{
|
||||||
|
//if the player blew up the fan, add a ton of enemies to the sector
|
||||||
|
AddEnemiesToFirstTunnelSector();
|
||||||
|
|
||||||
|
AddEnemiesToSecondTunnelSector();
|
||||||
|
}
|
||||||
|
else if( gJa25SaveStruct.ubHowPlayerGotThroughFan == PG__PLAYER_STOPPED_FAN_TO_GET_THROUGH )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void AddEnemiesToFirstTunnelSector()
|
||||||
|
{
|
||||||
|
UINT8 ubNumAdmins=0;
|
||||||
|
UINT8 ubNumTroops=0;
|
||||||
|
UINT8 ubNumElites=0;
|
||||||
|
UINT8 ubNumTanks=0;
|
||||||
|
UINT8 ubNumJeeps=0;
|
||||||
|
UINT8 ubNumRobots=0;
|
||||||
|
|
||||||
|
NumEnemiesToAttackFirstTunnelSector( &ubNumAdmins, &ubNumTroops, &ubNumElites, &ubNumTanks, &ubNumJeeps, &ubNumRobots );
|
||||||
|
|
||||||
|
SetNumberJa25EnemiesInSector( 14, 10, 1, ubNumAdmins, ubNumTroops, ubNumElites, ubNumTanks, ubNumJeeps, ubNumRobots );
|
||||||
|
}
|
||||||
|
|
||||||
|
void AddEnemiesToSecondTunnelSector()
|
||||||
|
{
|
||||||
|
UINT8 ubNumAdmins=0;
|
||||||
|
UINT8 ubNumTroops=0;
|
||||||
|
UINT8 ubNumElites=0;
|
||||||
|
UINT8 ubNumTanks=0;
|
||||||
|
UINT8 ubNumJeeps=0;
|
||||||
|
UINT8 ubNumRobots=0;
|
||||||
|
|
||||||
|
NumEnemiesToAttackSecondTunnelSector( &ubNumAdmins, &ubNumTroops, &ubNumElites, &ubNumTanks, &ubNumJeeps, &ubNumRobots );
|
||||||
|
SetNumberJa25EnemiesInSector( 14, 11, 1, ubNumAdmins, ubNumTroops, ubNumElites, ubNumTanks, ubNumJeeps, ubNumRobots );
|
||||||
|
}
|
||||||
|
|
||||||
UINT8 NumEnemiesToAttackFirstTunnelSector( UINT8 *pAdmins, UINT8 *pTroops, UINT8 *pElites, UINT8 *pTanks, UINT8 *pJeeps, UINT8 *pRobots )
|
UINT8 NumEnemiesToAttackFirstTunnelSector( UINT8 *pAdmins, UINT8 *pTroops, UINT8 *pElites, UINT8 *pTanks, UINT8 *pJeeps, UINT8 *pRobots )
|
||||||
{
|
{
|
||||||
@@ -1418,11 +1388,6 @@ UINT8 NumEnemiesToAttackFirstTunnelSector( UINT8 *pAdmins, UINT8 *pTroops, UINT8
|
|||||||
ubNumTroops = 4 + Random( 0 );
|
ubNumTroops = 4 + Random( 0 );
|
||||||
ubNumElites = 4 + Random( 0 );
|
ubNumElites = 4 + Random( 0 );
|
||||||
break;
|
break;
|
||||||
case DIF_LEVEL_INSANE:
|
|
||||||
ubNumAdmins = 0 + Random(0);
|
|
||||||
ubNumTroops = 0 + Random(0);
|
|
||||||
ubNumElites = 8 + Random(0);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( pAdmins )
|
if( pAdmins )
|
||||||
@@ -1475,11 +1440,6 @@ UINT8 NumEnemiesToAttackSecondTunnelSector( UINT8 *pAdmins, UINT8 *pTroops, UINT
|
|||||||
ubNumTroops = 6 + Random( 0 );
|
ubNumTroops = 6 + Random( 0 );
|
||||||
ubNumElites = 4 + Random( 3 );
|
ubNumElites = 4 + Random( 3 );
|
||||||
break;
|
break;
|
||||||
case DIF_LEVEL_INSANE:
|
|
||||||
ubNumAdmins = 0 + Random(0);
|
|
||||||
ubNumTroops = 0 + Random(0);
|
|
||||||
ubNumElites = 10 + Random(0);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( pAdmins )
|
if( pAdmins )
|
||||||
|
|||||||
@@ -199,6 +199,7 @@ BOOLEAN SaveJa25SaveInfoToSaveGame( HWFILE hFile );
|
|||||||
BOOLEAN LoadJa25SaveInfoFromSavedGame( HWFILE hFile );
|
BOOLEAN LoadJa25SaveInfoFromSavedGame( HWFILE hFile );
|
||||||
|
|
||||||
|
|
||||||
|
void AddEnemiesToJa25TunnelMaps();
|
||||||
void HandleAddingEnemiesToTunnelMaps();
|
void HandleAddingEnemiesToTunnelMaps();
|
||||||
|
|
||||||
void SetJa25GeneralFlag( UINT32 uiFlagToSet );
|
void SetJa25GeneralFlag( UINT32 uiFlagToSet );
|
||||||
|
|||||||
+49
-78
@@ -5,8 +5,7 @@
|
|||||||
#include "Strategic Mines.h"
|
#include "Strategic Mines.h"
|
||||||
#include "BobbyRMailOrder.h"
|
#include "BobbyRMailOrder.h"
|
||||||
#include "Tactical Save.h"
|
#include "Tactical Save.h"
|
||||||
#include "Strategic Movement.h"
|
#include "connect.h"
|
||||||
#include <Soldier Create.h>
|
|
||||||
#include "FileMan.h"
|
#include "FileMan.h"
|
||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#include "Game Init.h"
|
#include "Game Init.h"
|
||||||
@@ -30,6 +29,7 @@
|
|||||||
#include "Explosion Control.h"
|
#include "Explosion Control.h"
|
||||||
#include "soldier tile.h"
|
#include "soldier tile.h"
|
||||||
#include "Soldier Profile.h"
|
#include "Soldier Profile.h"
|
||||||
|
#include "Soldier Functions.h"
|
||||||
#include "Action Items.h"
|
#include "Action Items.h"
|
||||||
#include "AIInternals.h"
|
#include "AIInternals.h"
|
||||||
#include "Handle Doors.h"
|
#include "Handle Doors.h"
|
||||||
@@ -72,6 +72,7 @@ extern "C" {
|
|||||||
#include "lua_state.h"
|
#include "lua_state.h"
|
||||||
#include "lua_function.h"
|
#include "lua_function.h"
|
||||||
|
|
||||||
|
#include "Encrypted File.h"
|
||||||
|
|
||||||
#include "BriefingRoom_Data.h"
|
#include "BriefingRoom_Data.h"
|
||||||
#include "MiniGame.h" // added by Flugente
|
#include "MiniGame.h" // added by Flugente
|
||||||
@@ -112,6 +113,8 @@ static int l_CheckMission(lua_State* L);
|
|||||||
|
|
||||||
void FatigueCharacter(SOLDIERTYPE* pSoldier);
|
void FatigueCharacter(SOLDIERTYPE* pSoldier);
|
||||||
|
|
||||||
|
static int l_AddCustomEmail(lua_State* L);
|
||||||
|
|
||||||
static int l_SetDefaultArrivalSector(lua_State* L);
|
static int l_SetDefaultArrivalSector(lua_State* L);
|
||||||
static int l_GetDefaultArrivalSector(lua_State* L);
|
static int l_GetDefaultArrivalSector(lua_State* L);
|
||||||
static int l_SetMercArrivalLocation(lua_State* L);
|
static int l_SetMercArrivalLocation(lua_State* L);
|
||||||
@@ -403,9 +406,9 @@ static int l_AddToShouldBecomeHostileOrSayQuoteList(lua_State* L);
|
|||||||
|
|
||||||
static int l_AddPreReadEmail(lua_State* L);
|
static int l_AddPreReadEmail(lua_State* L);
|
||||||
static int l_AddEmail(lua_State* L);
|
static int l_AddEmail(lua_State* L);
|
||||||
static int l_AddEmailMercAvailableXML(lua_State* L);
|
static int l_AddEmailXML(lua_State* L);
|
||||||
|
static int l_AddEmailXML2(lua_State* L);
|
||||||
static int l_AddEmailLevelUpXML(lua_State* L);
|
static int l_AddEmailLevelUpXML(lua_State* L);
|
||||||
static int l_AddEmailFromXML(lua_State* L);
|
|
||||||
|
|
||||||
static int l_EVENT_SoldierGotHit(lua_State* L);
|
static int l_EVENT_SoldierGotHit(lua_State* L);
|
||||||
static int l_EVENT_InitNewSoldierAnim(lua_State* L);
|
static int l_EVENT_InitNewSoldierAnim(lua_State* L);
|
||||||
@@ -947,7 +950,7 @@ void IniLuaGlobal()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void IniGlobal_0(lua_State* L)
|
void IniGlobal_0(lua_State* L)
|
||||||
{
|
{
|
||||||
|
|
||||||
lua_pushinteger(L, PROFILLUA_sSectorX);
|
lua_pushinteger(L, PROFILLUA_sSectorX);
|
||||||
@@ -976,7 +979,7 @@ static void IniGlobal_0(lua_State* L)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void IniGlobal_1(lua_State* L)
|
void IniGlobal_1(lua_State* L)
|
||||||
{
|
{
|
||||||
lua_pushinteger(L, PROFILLUA2_ubProfile);
|
lua_pushinteger(L, PROFILLUA2_ubProfile);
|
||||||
lua_setglobal(L, "ProfileId");
|
lua_setglobal(L, "ProfileId");
|
||||||
@@ -997,7 +1000,7 @@ static void IniGlobal_1(lua_State* L)
|
|||||||
lua_setglobal(L, "ProfileIdsGridNo");
|
lua_setglobal(L, "ProfileIdsGridNo");
|
||||||
|
|
||||||
}
|
}
|
||||||
static void IniFunction(lua_State* L, BOOLEAN bQuests)
|
void IniFunction(lua_State* L, BOOLEAN bQuests)
|
||||||
{
|
{
|
||||||
|
|
||||||
lua_register(L, "HireMerc", l_HireMerc);
|
lua_register(L, "HireMerc", l_HireMerc);
|
||||||
@@ -1025,9 +1028,9 @@ static void IniFunction(lua_State* L, BOOLEAN bQuests)
|
|||||||
|
|
||||||
lua_register(L, "AddPreReadEmail", l_AddPreReadEmail);
|
lua_register(L, "AddPreReadEmail", l_AddPreReadEmail);
|
||||||
lua_register(L, "AddEmail", l_AddEmail);
|
lua_register(L, "AddEmail", l_AddEmail);
|
||||||
lua_register(L, "AddEmailMercAvailableXML", l_AddEmailMercAvailableXML);
|
lua_register(L, "AddEmailMercAvailableXML", l_AddEmailXML);
|
||||||
lua_register(L, "AddEmailMercLevelUpXML", l_AddEmailLevelUpXML);
|
lua_register(L, "AddEmailMercLevelUpXML", l_AddEmailLevelUpXML);
|
||||||
lua_register(L, "AddEmailFromXML", l_AddEmailFromXML);
|
lua_register(L, "AddEmailXML", l_AddEmailXML2);
|
||||||
|
|
||||||
//------Time------
|
//------Time------
|
||||||
|
|
||||||
@@ -1640,6 +1643,8 @@ static void IniFunction(lua_State* L, BOOLEAN bQuests)
|
|||||||
|
|
||||||
lua_register(L, "ReStartingGame", l_ReStartingGame);
|
lua_register(L, "ReStartingGame", l_ReStartingGame);
|
||||||
|
|
||||||
|
lua_register(L, "AddCustomEmail", l_AddCustomEmail);
|
||||||
|
|
||||||
lua_register(L, "SetDefaultArrivalSector", l_SetDefaultArrivalSector);
|
lua_register(L, "SetDefaultArrivalSector", l_SetDefaultArrivalSector);
|
||||||
lua_register(L, "GetDefaultArrivalSector", l_GetDefaultArrivalSector);
|
lua_register(L, "GetDefaultArrivalSector", l_GetDefaultArrivalSector);
|
||||||
lua_register(L, "SetDefaultArrivalGridNo", l_SetMercArrivalLocation);
|
lua_register(L, "SetDefaultArrivalGridNo", l_SetMercArrivalLocation);
|
||||||
@@ -1998,6 +2003,20 @@ static int l_SetHandleGlobalLoyaltyEvent(lua_State* L)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int l_AddCustomEmail(lua_State* L)
|
||||||
|
{
|
||||||
|
if (lua_gettop(L) >= 3)
|
||||||
|
{
|
||||||
|
INT32 iMessageOffset = lua_tointeger(L, 1);
|
||||||
|
INT32 iMessageLength = lua_tointeger(L, 2);
|
||||||
|
UINT8 ubSender = lua_tointeger(L, 3);
|
||||||
|
|
||||||
|
AddCustomEmail(iMessageOffset, iMessageLength, ubSender, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_OTHER);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static int l_gMercProfileGearset(lua_State* L)
|
static int l_gMercProfileGearset(lua_State* L)
|
||||||
{
|
{
|
||||||
if (lua_gettop(L) >= 8)
|
if (lua_gettop(L) >= 8)
|
||||||
@@ -2224,38 +2243,18 @@ static int l_SetNumberOfJa25BloodCatsInSector(lua_State* L)
|
|||||||
|
|
||||||
static int l_SetNumberJa25EnemiesInSurfaceSector(lua_State* L)
|
static int l_SetNumberJa25EnemiesInSurfaceSector(lua_State* L)
|
||||||
{
|
{
|
||||||
if ( lua_gettop(L) >= 3 )
|
if (lua_gettop(L) >= 6)
|
||||||
{
|
{
|
||||||
INT16 sSectorX = lua_tointeger(L, 1);
|
INT16 sSectorX = lua_tointeger(L, 1);
|
||||||
INT16 sSectorY = lua_tointeger(L, 2);
|
INT16 sSectorY = lua_tointeger(L, 2);
|
||||||
UINT8 ubNumAdmins = lua_tointeger(L, 3);
|
UINT8 ubNumAdmins = lua_tointeger(L, 3);
|
||||||
UINT8 ubNumTroops = 0;
|
UINT8 ubNumTroops = lua_tointeger(L, 4);
|
||||||
UINT8 ubNumElites = 0;
|
UINT8 ubNumElites = lua_tointeger(L, 5);
|
||||||
UINT8 ubNumTanks = 0;
|
UINT8 ubNumTanks = lua_tointeger(L, 6);
|
||||||
|
//TODO: expand lua call to include these two
|
||||||
UINT8 ubNumJeeps = 0;
|
UINT8 ubNumJeeps = 0;
|
||||||
UINT8 ubNumRobots = 0;
|
UINT8 ubNumRobots = 0;
|
||||||
|
|
||||||
if ( lua_gettop(L) >= 4 )
|
|
||||||
{
|
|
||||||
ubNumTroops = lua_tointeger(L, 4);
|
|
||||||
}
|
|
||||||
if ( lua_gettop(L) >= 5 )
|
|
||||||
{
|
|
||||||
ubNumElites = lua_tointeger(L, 5);
|
|
||||||
}
|
|
||||||
if ( lua_gettop(L) >= 6 )
|
|
||||||
{
|
|
||||||
ubNumTanks = lua_tointeger(L, 6);
|
|
||||||
}
|
|
||||||
if ( lua_gettop(L) >= 7 )
|
|
||||||
{
|
|
||||||
ubNumJeeps = lua_tointeger(L, 7);
|
|
||||||
}
|
|
||||||
if ( lua_gettop(L) >= 8 )
|
|
||||||
{
|
|
||||||
ubNumRobots = lua_tointeger(L, 8);
|
|
||||||
}
|
|
||||||
|
|
||||||
SetNumberJa25EnemiesInSurfaceSector(SECTOR(sSectorX, sSectorY), ubNumAdmins, ubNumTroops, ubNumElites, ubNumTanks, ubNumJeeps, ubNumRobots);
|
SetNumberJa25EnemiesInSurfaceSector(SECTOR(sSectorX, sSectorY), ubNumAdmins, ubNumTroops, ubNumElites, ubNumTanks, ubNumJeeps, ubNumRobots);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2882,7 +2881,7 @@ BOOLEAN LuaIDScripts(UINT8 Init, UINT8 ubTargetNPC, UINT16 usActionCode, UINT8 u
|
|||||||
// Neither one of the function arguments are used inside the function and the only place where this is called
|
// Neither one of the function arguments are used inside the function and the only place where this is called
|
||||||
// makes it look like it *is* supposed to match against specific profile *and* restrict the search to player mercs.
|
// makes it look like it *is* supposed to match against specific profile *and* restrict the search to player mercs.
|
||||||
// That last part makes no sense since player mercs are part of OUR_TEAM
|
// That last part makes no sense since player mercs are part of OUR_TEAM
|
||||||
static SOLDIERTYPE* FindSoldierByProfileID2(UINT8 ubProfileID, BOOLEAN fPlayerMercsOnly)
|
SOLDIERTYPE* FindSoldierByProfileID2(UINT8 ubProfileID, BOOLEAN fPlayerMercsOnly)
|
||||||
{
|
{
|
||||||
SoldierID soldier = gTacticalStatus.Team[CIV_TEAM].bFirstID;
|
SoldierID soldier = gTacticalStatus.Team[CIV_TEAM].bFirstID;
|
||||||
SoldierID lastid = gTacticalStatus.Team[CIV_TEAM].bLastID;
|
SoldierID lastid = gTacticalStatus.Team[CIV_TEAM].bLastID;
|
||||||
@@ -7430,9 +7429,23 @@ static int l_ExecuteStrategicAIAction(lua_State* L)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//AddEmailXML
|
||||||
|
static int l_AddEmailXML2(lua_State* L)
|
||||||
|
{
|
||||||
|
if (lua_gettop(L) >= 3)
|
||||||
|
{
|
||||||
|
INT32 offset = lua_tointeger(L, 1);
|
||||||
|
INT32 messagelength = lua_tointeger(L, 2);
|
||||||
|
UINT8 sender = lua_tointeger(L, 3);
|
||||||
|
|
||||||
|
AddEmailTypeXML(offset, messagelength, sender, GetWorldTotalMin(), -1, TYPE_EMAIL_OTHER);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
//AddEmailXML
|
//AddEmailXML
|
||||||
static int l_AddEmailMercAvailableXML(lua_State* L)
|
static int l_AddEmailXML(lua_State* L)
|
||||||
{
|
{
|
||||||
if (lua_gettop(L))
|
if (lua_gettop(L))
|
||||||
{
|
{
|
||||||
@@ -7499,48 +7512,6 @@ static int l_AddPreReadEmail(lua_State* L)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// New externalized emails
|
|
||||||
//AddEmail
|
|
||||||
static int l_AddEmailFromXML(lua_State* L)
|
|
||||||
{
|
|
||||||
if (lua_gettop(L))
|
|
||||||
{
|
|
||||||
UINT8 index = lua_tointeger(L, 1);
|
|
||||||
bool preReadMail = false;
|
|
||||||
INT32 iCurrentIMPPosition = -1;
|
|
||||||
INT16 iCurrentShipmentDestinationID = -1;
|
|
||||||
INT32 specialData1 = -1;
|
|
||||||
UINT32 specialData2 = -1;
|
|
||||||
INT32 specialData3 = -1;
|
|
||||||
INT32 specialData4 = -1;
|
|
||||||
UINT32 specialData5 = -1;
|
|
||||||
UINT32 specialData6 = -1;
|
|
||||||
|
|
||||||
if ( lua_gettop(L) >= 2 )
|
|
||||||
{
|
|
||||||
preReadMail = lua_toboolean(L, 2);
|
|
||||||
}
|
|
||||||
if ( lua_gettop(L) >= 7 )
|
|
||||||
{
|
|
||||||
iCurrentIMPPosition = lua_tointeger(L, 3);
|
|
||||||
iCurrentShipmentDestinationID = lua_tointeger(L, 4);
|
|
||||||
specialData1 = lua_tointeger(L, 5);
|
|
||||||
specialData2 = lua_tointeger(L, 6);
|
|
||||||
specialData3 = lua_tointeger(L, 7);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( specialData1 != -1 || specialData2 != -1 )
|
|
||||||
{
|
|
||||||
AddEmailWithSpecialDataXML(index, GetWorldTotalMin(), iCurrentIMPPosition, iCurrentShipmentDestinationID, preReadMail, specialData1, specialData2, specialData3, specialData4, specialData5, specialData6);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
AddEmailFromXML(index, GetWorldTotalMin(), iCurrentIMPPosition, iCurrentShipmentDestinationID, preReadMail, specialData1, specialData2, specialData3, specialData4, specialData5, specialData6);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
//gfBoxerFought
|
//gfBoxerFought
|
||||||
static int l_SetgfBoxerFought(lua_State* L)
|
static int l_SetgfBoxerFought(lua_State* L)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,41 +1,48 @@
|
|||||||
#include "Map Screen Helicopter.h"
|
#include "Map Screen Helicopter.h"
|
||||||
#include "LaptopSave.h"
|
#include "LaptopSave.h"
|
||||||
|
#include "Vehicles.h"
|
||||||
|
#include "finances.h"
|
||||||
|
#include "Quests.h"
|
||||||
|
#include "Game Clock.h"
|
||||||
|
#include "strategic.h"
|
||||||
|
#include "Queen Command.h"
|
||||||
|
#include "Strategic Pathing.h"
|
||||||
|
#include "random.h"
|
||||||
|
#include "Game Event Hook.h"
|
||||||
|
#include "string.h"
|
||||||
|
#include "Dialogue Control.h"
|
||||||
|
#include "message.h"
|
||||||
|
#include "Strategic Movement.h"
|
||||||
|
#include "Soldier Profile.h"
|
||||||
|
#include "Assignments.h"
|
||||||
|
#include "PreBattle Interface.h"
|
||||||
|
#include "strategicmap.h"
|
||||||
|
#include "worlddef.h"
|
||||||
|
#include "worldman.h"
|
||||||
|
#include "TileDat.h"
|
||||||
|
#include "Map Screen Interface.h"
|
||||||
|
#include "Text.h"
|
||||||
|
#include "Squads.h"
|
||||||
|
#include "Player Command.h"
|
||||||
|
#include "Sound Control.h"
|
||||||
|
#include "GameSettings.h"
|
||||||
|
#include "Meanwhile.h"
|
||||||
|
#include "Map Screen Interface Border.h"
|
||||||
|
#include "Strategic Event Handler.h"
|
||||||
|
#include "Overhead.h"
|
||||||
|
#include "Soldier Create.h"
|
||||||
|
#include "renderworld.h"
|
||||||
|
#include "soundman.h"
|
||||||
|
#include "Isometric Utils.h"
|
||||||
|
#include "Scheduling.h"
|
||||||
|
// HEADROCK HAM 3.5: Added facility-based skyrider costs modifier
|
||||||
|
#include "Facilities.h"
|
||||||
|
#include "Debug Control.h"
|
||||||
|
#include "expat.h"
|
||||||
|
#include "merc entering.h" // added by Flugente
|
||||||
|
#include "ASD.h" // added by Flugente
|
||||||
|
|
||||||
#include "Vehicles.h"
|
#include "Vehicles.h"
|
||||||
#include "finances.h"
|
|
||||||
#include "Quests.h"
|
|
||||||
#include "Game Clock.h"
|
|
||||||
#include "strategic.h"
|
|
||||||
#include "Queen Command.h"
|
|
||||||
#include "Strategic Pathing.h"
|
|
||||||
#include "random.h"
|
|
||||||
#include "Game Event Hook.h"
|
|
||||||
#include "string.h"
|
|
||||||
#include "Dialogue Control.h"
|
|
||||||
#include "message.h"
|
|
||||||
#include "Strategic Movement.h"
|
|
||||||
#include "Soldier Profile.h"
|
|
||||||
#include "Assignments.h"
|
|
||||||
#include "strategicmap.h"
|
|
||||||
#include "worlddef.h"
|
|
||||||
#include "worldman.h"
|
|
||||||
#include "Map Screen Interface.h"
|
|
||||||
#include "Text.h"
|
|
||||||
#include "Squads.h"
|
|
||||||
#include "Sound Control.h"
|
|
||||||
#include "GameSettings.h"
|
|
||||||
#include "Meanwhile.h"
|
|
||||||
#include "Map Screen Interface Border.h"
|
|
||||||
#include "Overhead.h"
|
|
||||||
#include "Soldier Create.h"
|
|
||||||
#include "renderworld.h"
|
|
||||||
#include "Isometric Utils.h"
|
|
||||||
#include "Scheduling.h"
|
|
||||||
// HEADROCK HAM 3.5: Added facility-based skyrider costs modifier
|
|
||||||
#include "Facilities.h"
|
|
||||||
#include "Debug Control.h"
|
|
||||||
#include "expat.h"
|
|
||||||
#include "merc entering.h" // added by Flugente
|
|
||||||
#include "ASD.h" // added by Flugente
|
|
||||||
#include "NPC.h"
|
#include "NPC.h"
|
||||||
#include "history.h"
|
#include "history.h"
|
||||||
|
|
||||||
@@ -503,7 +510,7 @@ BOOLEAN ReadInHeliInfo(STR fileName)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOLEAN WriteInInfo(STR fileName)
|
BOOLEAN WriteInInfo(STR fileName)
|
||||||
{
|
{
|
||||||
HWFILE hFile;
|
HWFILE hFile;
|
||||||
|
|
||||||
@@ -2439,7 +2446,7 @@ BOOLEAN WillAirRaidBeStopped( INT16 sSectorX, INT16 sSectorY )
|
|||||||
return( FALSE );
|
return( FALSE );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void HeliCrashSoundStopCallback( void *pData )
|
void HeliCrashSoundStopCallback( void *pData )
|
||||||
{
|
{
|
||||||
SkyriderDestroyed( );
|
SkyriderDestroyed( );
|
||||||
}
|
}
|
||||||
@@ -2582,7 +2589,7 @@ BOOLEAN CanHelicopterTakeOff( void )
|
|||||||
return( FALSE );
|
return( FALSE );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void AddHeliPiece( INT32 iGridNo, UINT16 sOStruct )
|
void AddHeliPiece( INT32 iGridNo, UINT16 sOStruct )
|
||||||
{
|
{
|
||||||
UINT16 usDummy;
|
UINT16 usDummy;
|
||||||
|
|
||||||
|
|||||||
@@ -11,16 +11,21 @@
|
|||||||
#include "mapscreen.h"
|
#include "mapscreen.h"
|
||||||
#include "Render Dirty.h"
|
#include "Render Dirty.h"
|
||||||
#include "Map Screen Interface Map.h"
|
#include "Map Screen Interface Map.h"
|
||||||
|
#include "Map Screen Interface Border.h"
|
||||||
#include "Map Screen Interface.h"
|
#include "Map Screen Interface.h"
|
||||||
#include "Map Screen Interface Map Inventory.h"
|
#include "Map Screen Interface Map Inventory.h"
|
||||||
#include "Map Screen Helicopter.h"
|
#include "Map Screen Helicopter.h"
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
|
#include "Campaign Types.h"
|
||||||
|
#include "Strategic Town Loyalty.h"
|
||||||
|
#include "strategicmap.h"
|
||||||
#include "Assignments.h"
|
#include "Assignments.h"
|
||||||
// HEADROCK HAM 4: Now accepts INI settings
|
// HEADROCK HAM 4: Now accepts INI settings
|
||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
// Also include Quests, for checking whether a fact is true.
|
// Also include Quests, for checking whether a fact is true.
|
||||||
#include "Quests.h"
|
#include "Quests.h"
|
||||||
// HEADROCK HAM 5: Required for inventory filter popup
|
// HEADROCK HAM 5: Required for inventory filter popup
|
||||||
|
#include "popup_callback.h"
|
||||||
#include "popup_class.h"
|
#include "popup_class.h"
|
||||||
#include "Queen Command.h" // added by Flugente
|
#include "Queen Command.h" // added by Flugente
|
||||||
|
|
||||||
|
|||||||
@@ -22,8 +22,10 @@
|
|||||||
#include "Options Screen.h"
|
#include "Options Screen.h"
|
||||||
#include "Cursor Control.h"
|
#include "Cursor Control.h"
|
||||||
#include "gameloop.h"
|
#include "gameloop.h"
|
||||||
|
#include "ai.h"
|
||||||
#include "Tactical Save.h"
|
#include "Tactical Save.h"
|
||||||
#include "Campaign Types.h"
|
#include "Campaign Types.h"
|
||||||
|
#include "Air Raid.h"
|
||||||
#include "finances.h"
|
#include "finances.h"
|
||||||
#include "LaptopSave.h"
|
#include "LaptopSave.h"
|
||||||
#include "Interface Items.h"
|
#include "Interface Items.h"
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#include "Map Screen Interface Map Inventory.h"
|
#include "Map Screen Interface Map Inventory.h"
|
||||||
#include "Render Dirty.h"
|
#include "Render Dirty.h"
|
||||||
#include "vobject.h"
|
#include "vobject.h"
|
||||||
|
#include "Utilities.h"
|
||||||
#include "WCheck.h"
|
#include "WCheck.h"
|
||||||
#include "sysutil.h"
|
#include "sysutil.h"
|
||||||
#include "Map Screen Interface Border.h"
|
#include "Map Screen Interface Border.h"
|
||||||
@@ -27,6 +28,7 @@
|
|||||||
#include "WordWrap.h"
|
#include "WordWrap.h"
|
||||||
#include "Soldier macros.h"
|
#include "Soldier macros.h"
|
||||||
#include "rt time defines.h"
|
#include "rt time defines.h"
|
||||||
|
#include "Encyclopedia_new.h" //Moa: item visibility
|
||||||
#include "Town Militia.h" // added by Flugente
|
#include "Town Militia.h" // added by Flugente
|
||||||
|
|
||||||
#include "ShopKeeper Interface.h"
|
#include "ShopKeeper Interface.h"
|
||||||
@@ -34,7 +36,10 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include "InterfaceItemImages.h"
|
#include "InterfaceItemImages.h"
|
||||||
#include "SaveLoadGame.h"//dnl ch51 081009
|
#include "SaveLoadGame.h"//dnl ch51 081009
|
||||||
|
#include "Map Information.h"//dnl ch51 091009
|
||||||
|
#include "Interface Items.h"
|
||||||
#include "Food.h" // added by Flugente
|
#include "Food.h" // added by Flugente
|
||||||
|
#include "Campaign Types.h" // added by Flugente
|
||||||
#include "mapscreen.h"
|
#include "mapscreen.h"
|
||||||
|
|
||||||
//forward declarations of common classes to eliminate includes
|
//forward declarations of common classes to eliminate includes
|
||||||
@@ -6024,10 +6029,7 @@ void HandleItemCooldownFunctions( OBJECTTYPE* itemStack, INT32 deltaSeconds, BOO
|
|||||||
FLOAT newguntemperature = max(0.0f, guntemperature - tickspassed * cooldownfactor ); // ... calculate new temperature ...
|
FLOAT newguntemperature = max(0.0f, guntemperature - tickspassed * cooldownfactor ); // ... calculate new temperature ...
|
||||||
|
|
||||||
#if JA2TESTVERSION
|
#if JA2TESTVERSION
|
||||||
if (guntemperature != newguntemperature)
|
ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"World: Item temperature lowered from %4.2f to %4.2f", guntemperature, newguntemperature);
|
||||||
{
|
|
||||||
ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"World: Item temperature lowered from %4.2f to %4.2f", guntemperature, newguntemperature);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
(*itemStack)[i]->data.bTemperature = newguntemperature; // ... set new temperature
|
(*itemStack)[i]->data.bTemperature = newguntemperature; // ... set new temperature
|
||||||
@@ -6047,10 +6049,7 @@ void HandleItemCooldownFunctions( OBJECTTYPE* itemStack, INT32 deltaSeconds, BOO
|
|||||||
(*iter)[i]->data.bTemperature = newtemperature; // ... set new temperature
|
(*iter)[i]->data.bTemperature = newtemperature; // ... set new temperature
|
||||||
|
|
||||||
#if JA2TESTVERSION
|
#if JA2TESTVERSION
|
||||||
if (temperature != newtemperature)
|
ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"World: Item temperature lowered from %4.2f to %4.2f", temperature, newtemperature);
|
||||||
{
|
|
||||||
ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"World: Item temperature lowered from %4.2f to %4.2f", temperature, newtemperature);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// we assume that there can exist only 1 underbarrel weapon per gun
|
// we assume that there can exist only 1 underbarrel weapon per gun
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
#include "Squads.h"
|
#include "Squads.h"
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include "Soldier Profile.h"
|
#include "Soldier Profile.h"
|
||||||
|
#include "Player Command.h"
|
||||||
#include "Strategic Movement.h"
|
#include "Strategic Movement.h"
|
||||||
#include "Queen Command.h"
|
#include "Queen Command.h"
|
||||||
#include "Campaign Types.h"
|
#include "Campaign Types.h"
|
||||||
@@ -27,6 +28,7 @@
|
|||||||
#include "Vehicles.h"
|
#include "Vehicles.h"
|
||||||
#include "Map Screen Helicopter.h"
|
#include "Map Screen Helicopter.h"
|
||||||
#include "Game Clock.h"
|
#include "Game Clock.h"
|
||||||
|
#include "finances.h"
|
||||||
#include "line.h"
|
#include "line.h"
|
||||||
#include "english.h"
|
#include "english.h"
|
||||||
#include "PreBattle Interface.h"
|
#include "PreBattle Interface.h"
|
||||||
@@ -37,6 +39,7 @@
|
|||||||
#include "Tactical Save.h"
|
#include "Tactical Save.h"
|
||||||
#include "Map Information.h"
|
#include "Map Information.h"
|
||||||
#include "Air Raid.h"
|
#include "Air Raid.h"
|
||||||
|
#include "Auto Resolve.h"
|
||||||
#include "ASD.h" // added by Flugente
|
#include "ASD.h" // added by Flugente
|
||||||
#include "MilitiaIndividual.h" // added by Flugente
|
#include "MilitiaIndividual.h" // added by Flugente
|
||||||
#include "Map Screen Interface Map Inventory.h" // added by Flugente
|
#include "Map Screen Interface Map Inventory.h" // added by Flugente
|
||||||
@@ -47,8 +50,10 @@
|
|||||||
|
|
||||||
#include "Quests.h"
|
#include "Quests.h"
|
||||||
#include "connect.h"
|
#include "connect.h"
|
||||||
|
#include "Strategic Mines.h"
|
||||||
// HEADROCK HAM 3.5: included for detectionlevels
|
// HEADROCK HAM 3.5: included for detectionlevels
|
||||||
#include "Facilities.h"
|
#include "Facilities.h"
|
||||||
|
#include "MilitiaSquads.h"
|
||||||
|
|
||||||
#include "LaptopSave.h"
|
#include "LaptopSave.h"
|
||||||
#include <language.hpp>
|
#include <language.hpp>
|
||||||
|
|||||||
@@ -5,15 +5,19 @@
|
|||||||
#include "Queen Command.h"
|
#include "Queen Command.h"
|
||||||
#include "Player Command.h"
|
#include "Player Command.h"
|
||||||
#include "Font Control.h"
|
#include "Font Control.h"
|
||||||
|
#include "Font.h"
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
#include "Map Screen Interface Map.h"
|
#include "Map Screen Interface Map.h"
|
||||||
#include "Map Screen Interface Border.h"
|
#include "Map Screen Interface Border.h"
|
||||||
|
#include "Handle UI.h"
|
||||||
|
#include "NPC.h"
|
||||||
#include "Strategic Town Loyalty.h"
|
#include "Strategic Town Loyalty.h"
|
||||||
#include "Strategic Mines.h"
|
#include "Strategic Mines.h"
|
||||||
|
#include "finances.h"
|
||||||
#include "Map Screen Interface Map Inventory.h"
|
#include "Map Screen Interface Map Inventory.h"
|
||||||
#include "strategic.h"
|
#include "strategic.h"
|
||||||
#include "Utilities.h"
|
#include "Utilities.h"
|
||||||
#include <vsurface.h>
|
#include "video.h"
|
||||||
#include "Town Militia.h"
|
#include "Town Militia.h"
|
||||||
#include "HelpScreen.h"
|
#include "HelpScreen.h"
|
||||||
#include "Map Screen Helicopter.h"
|
#include "Map Screen Helicopter.h"
|
||||||
@@ -21,7 +25,10 @@
|
|||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#include "DEBUG.H"
|
#include "DEBUG.H"
|
||||||
#include "Overhead.h" // added by Flugente
|
#include "Overhead.h" // added by Flugente
|
||||||
|
#include "Game Clock.h" // added by Flugente
|
||||||
|
#include "Game Event Hook.h" // added by Flugente
|
||||||
|
|
||||||
|
#include "Strategic Mines.h"
|
||||||
|
|
||||||
#define BOX_BUTTON_WIDTH 100
|
#define BOX_BUTTON_WIDTH 100
|
||||||
#define BOX_BUTTON_HEIGHT 20
|
#define BOX_BUTTON_HEIGHT 20
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#include "Map Screen Interface.h"
|
#include "Map Screen Interface.h"
|
||||||
|
#include "string.h"
|
||||||
#include "Map Screen Interface Map.h"
|
#include "Map Screen Interface Map.h"
|
||||||
#include "Render Dirty.h"
|
#include "Render Dirty.h"
|
||||||
#include "Font Control.h"
|
#include "Font Control.h"
|
||||||
@@ -27,6 +28,7 @@
|
|||||||
#include "Vehicles.h"
|
#include "Vehicles.h"
|
||||||
#include "line.h"
|
#include "line.h"
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
|
#include "gameloop.h"
|
||||||
#include "Map Screen Helicopter.h"
|
#include "Map Screen Helicopter.h"
|
||||||
#include "PreBattle Interface.h"
|
#include "PreBattle Interface.h"
|
||||||
#include "WordWrap.h"
|
#include "WordWrap.h"
|
||||||
@@ -44,9 +46,11 @@
|
|||||||
#include "Game Init.h"
|
#include "Game Init.h"
|
||||||
#include "Strategic Mines.h"
|
#include "Strategic Mines.h"
|
||||||
#include "finances.h"
|
#include "finances.h"
|
||||||
|
#include "strategic.h"
|
||||||
#include "Air Raid.h"
|
#include "Air Raid.h"
|
||||||
#include "Queen Command.h"
|
#include "Queen Command.h"
|
||||||
#include "Render Fun.h"
|
#include "Render Fun.h"
|
||||||
|
#include "Food.h"
|
||||||
#include "personnel.h"
|
#include "personnel.h"
|
||||||
#include "mapscreen.h"
|
#include "mapscreen.h"
|
||||||
|
|
||||||
@@ -6162,7 +6166,7 @@ BOOLEAN HandleTimeCompressWithTeamJackedInAndGearedToGo( void )
|
|||||||
//no ja25 UB
|
//no ja25 UB
|
||||||
#else
|
#else
|
||||||
// Add e-mail message
|
// Add e-mail message
|
||||||
AddEmail(ENRICO_CONGRATS, ENRICO_CONGRATS_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT, XML_ENRICO_GOODLUCK);
|
AddEmail(ENRICO_CONGRATS,ENRICO_CONGRATS_LENGTH,MAIL_ENRICO, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return( TRUE );
|
return( TRUE );
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
#ifdef JA2UB
|
#include "Map Screen Interface.h"
|
||||||
#include "Map Screen Interface.h"
|
|
||||||
#include "string.h"
|
#include "string.h"
|
||||||
#include "Map Screen Interface Map.h"
|
#include "Map Screen Interface Map.h"
|
||||||
#include "Font Control.h"
|
#include "Font Control.h"
|
||||||
@@ -48,6 +47,7 @@
|
|||||||
|
|
||||||
#include "connect.h"
|
#include "connect.h"
|
||||||
|
|
||||||
|
#ifdef JA2UB
|
||||||
|
|
||||||
#include "Ja25 Strategic Ai.h"
|
#include "Ja25 Strategic Ai.h"
|
||||||
#include "Ja25_Tactical.h"
|
#include "Ja25_Tactical.h"
|
||||||
|
|||||||
@@ -13,6 +13,8 @@
|
|||||||
#include "Soldier Profile.h"
|
#include "Soldier Profile.h"
|
||||||
#include "Overhead.h"
|
#include "Overhead.h"
|
||||||
#include "Dialogue Control.h"
|
#include "Dialogue Control.h"
|
||||||
|
#include "gameloop.h"
|
||||||
|
#include "NPC.h"
|
||||||
#include "Assignments.h"
|
#include "Assignments.h"
|
||||||
#include "strategic.h"
|
#include "strategic.h"
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
|
|||||||
+13
-13
@@ -9,6 +9,8 @@
|
|||||||
#include "Soldier Add.h"
|
#include "Soldier Add.h"
|
||||||
#include "Dialogue Control.h"
|
#include "Dialogue Control.h"
|
||||||
#include "Soldier Create.h"
|
#include "Soldier Create.h"
|
||||||
|
#include "message.h"
|
||||||
|
#include "Font Control.h"
|
||||||
#include "personnel.h"
|
#include "personnel.h"
|
||||||
#include "LaptopSave.h"
|
#include "LaptopSave.h"
|
||||||
#include "Map Screen Interface.h"
|
#include "Map Screen Interface.h"
|
||||||
@@ -16,7 +18,8 @@
|
|||||||
#include "strategicmap.h"
|
#include "strategicmap.h"
|
||||||
#include "Quests.h"
|
#include "Quests.h"
|
||||||
#include "worlddef.h"
|
#include "worlddef.h"
|
||||||
#include <Overhead.h>
|
#include "Animation Control.h"
|
||||||
|
#include "Tactical Save.h"
|
||||||
#include "Interface Control.h"
|
#include "Interface Control.h"
|
||||||
#include "gamescreen.h"
|
#include "gamescreen.h"
|
||||||
#include "jascreens.h"
|
#include "jascreens.h"
|
||||||
@@ -24,8 +27,10 @@
|
|||||||
#include "Assignments.h"
|
#include "Assignments.h"
|
||||||
#include "Strategic Movement.h"
|
#include "Strategic Movement.h"
|
||||||
#include "Squads.h"
|
#include "Squads.h"
|
||||||
|
#include "gameloop.h"
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
#include "Strategic Status.h"
|
#include "Strategic Status.h"
|
||||||
|
#include "mercs.h"
|
||||||
#include "insurance Contract.h"
|
#include "insurance Contract.h"
|
||||||
#include "Vehicles.h"
|
#include "Vehicles.h"
|
||||||
#include "email.h"
|
#include "email.h"
|
||||||
@@ -1102,12 +1107,10 @@ void CalculateMedicalDepositRefund( SOLDIERTYPE *pSoldier )
|
|||||||
if( gubQuest[ QUEST_FIX_LAPTOP ] == QUESTDONE || gGameUBOptions.LaptopQuestEnabled == FALSE )
|
if( gubQuest[ QUEST_FIX_LAPTOP ] == QUESTDONE || gGameUBOptions.LaptopQuestEnabled == FALSE )
|
||||||
{
|
{
|
||||||
if ( gGameUBOptions.fDeadMerc == TRUE )
|
if ( gGameUBOptions.fDeadMerc == TRUE )
|
||||||
{
|
AddEmailWithSpecialData( 27, AIM_MEDICAL_DEPOSIT_REFUND_LENGTH, AIM_SITE, GetWorldTotalMin(), pSoldier->usMedicalDeposit, pSoldier->ubProfile, TYPE_EMAIL_DEAD_MERC_AIM_SITE_EMAIL_JA2_EDT, TYPE_E_AIM_L2 );
|
||||||
AddEmailWithSpecialData(27, AIM_MEDICAL_DEPOSIT_REFUND_LENGTH, AIM_SITE, GetWorldTotalMin(), pSoldier->usMedicalDeposit, pSoldier->ubProfile, TYPE_EMAIL_DEAD_MERC_AIM_SITE_EMAIL_JA2_EDT, TYPE_E_AIM_L2, XML_AIM_REFUND);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
AddEmailWithSpecialData(AIM_MEDICAL_DEPOSIT_REFUND, AIM_MEDICAL_DEPOSIT_REFUND_LENGTH, AIM_SITE, GetWorldTotalMin(), pSoldier->usMedicalDeposit, pSoldier->ubProfile, TYPE_EMAIL_EMAIL_EDT, TYPE_E_NONE, XML_AIM_REFUND);
|
AddEmailWithSpecialData( AIM_MEDICAL_DEPOSIT_REFUND, AIM_MEDICAL_DEPOSIT_REFUND_LENGTH, AIM_SITE, GetWorldTotalMin(), pSoldier->usMedicalDeposit, pSoldier->ubProfile, TYPE_EMAIL_EMAIL_EDT, TYPE_E_NONE );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
//else if the merc is a dead, refund NOTHING!!
|
//else if the merc is a dead, refund NOTHING!!
|
||||||
@@ -1118,15 +1121,14 @@ void CalculateMedicalDepositRefund( SOLDIERTYPE *pSoldier )
|
|||||||
|
|
||||||
//add an email
|
//add an email
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
|
//no UB
|
||||||
if( gubQuest[ QUEST_FIX_LAPTOP ] == QUESTDONE || gGameUBOptions.LaptopQuestEnabled == FALSE )
|
if( gubQuest[ QUEST_FIX_LAPTOP ] == QUESTDONE || gGameUBOptions.LaptopQuestEnabled == FALSE )
|
||||||
{
|
{
|
||||||
if ( gGameUBOptions.fDeadMerc == TRUE )
|
if ( gGameUBOptions.fDeadMerc == TRUE )
|
||||||
{
|
AddEmailWithSpecialData( 217, AIM_MEDICAL_DEPOSIT_NO_REFUND_LENGTH, AIM_SITE, GetWorldTotalMin(), pSoldier->usMedicalDeposit, pSoldier->ubProfile, TYPE_EMAIL_DEAD_MERC_AIM_SITE_EMAIL_JA2_EDT, TYPE_E_AIM_L3 );
|
||||||
AddEmailWithSpecialData(217, AIM_MEDICAL_DEPOSIT_NO_REFUND_LENGTH, AIM_SITE, GetWorldTotalMin(), pSoldier->usMedicalDeposit, pSoldier->ubProfile, TYPE_EMAIL_DEAD_MERC_AIM_SITE_EMAIL_JA2_EDT, TYPE_E_AIM_L3, XML_AIM_NOREFUND);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
AddEmailWithSpecialData(AIM_MEDICAL_DEPOSIT_NO_REFUND, AIM_MEDICAL_DEPOSIT_NO_REFUND_LENGTH, AIM_SITE, GetWorldTotalMin(), pSoldier->usMedicalDeposit, pSoldier->ubProfile, TYPE_EMAIL_EMAIL_EDT, TYPE_E_NONE, XML_AIM_NOREFUND);
|
AddEmailWithSpecialData( AIM_MEDICAL_DEPOSIT_NO_REFUND, AIM_MEDICAL_DEPOSIT_NO_REFUND_LENGTH, AIM_SITE, GetWorldTotalMin(), pSoldier->usMedicalDeposit, pSoldier->ubProfile, TYPE_EMAIL_EMAIL_EDT, TYPE_E_NONE );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
//else the player is injured, refund a partial amount
|
//else the player is injured, refund a partial amount
|
||||||
@@ -1144,12 +1146,10 @@ void CalculateMedicalDepositRefund( SOLDIERTYPE *pSoldier )
|
|||||||
if( gubQuest[ QUEST_FIX_LAPTOP ] == QUESTDONE || gGameUBOptions.LaptopQuestEnabled == FALSE )
|
if( gubQuest[ QUEST_FIX_LAPTOP ] == QUESTDONE || gGameUBOptions.LaptopQuestEnabled == FALSE )
|
||||||
{
|
{
|
||||||
if ( gGameUBOptions.fDeadMerc == TRUE )
|
if ( gGameUBOptions.fDeadMerc == TRUE )
|
||||||
{
|
AddEmailWithSpecialData( 214, AIM_MEDICAL_DEPOSIT_PARTIAL_REFUND_LENGTH, AIM_SITE, GetWorldTotalMin(), iRefundAmount, pSoldier->ubProfile, TYPE_EMAIL_DEAD_MERC_AIM_SITE_EMAIL_JA2_EDT, TYPE_E_AIM_L4 );
|
||||||
AddEmailWithSpecialData(214, AIM_MEDICAL_DEPOSIT_PARTIAL_REFUND_LENGTH, AIM_SITE, GetWorldTotalMin(), iRefundAmount, pSoldier->ubProfile, TYPE_EMAIL_DEAD_MERC_AIM_SITE_EMAIL_JA2_EDT, TYPE_E_AIM_L4, XML_AIM_PARTIALREFUND);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
AddEmailWithSpecialData(AIM_MEDICAL_DEPOSIT_PARTIAL_REFUND, AIM_MEDICAL_DEPOSIT_PARTIAL_REFUND_LENGTH, AIM_SITE, GetWorldTotalMin(), iRefundAmount, pSoldier->ubProfile, TYPE_EMAIL_EMAIL_EDT, TYPE_E_NONE, XML_AIM_PARTIALREFUND);
|
AddEmailWithSpecialData( AIM_MEDICAL_DEPOSIT_PARTIAL_REFUND, AIM_MEDICAL_DEPOSIT_PARTIAL_REFUND_LENGTH, AIM_SITE, GetWorldTotalMin(), iRefundAmount, pSoldier->ubProfile, TYPE_EMAIL_EMAIL_EDT, TYPE_E_NONE );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,15 +4,25 @@
|
|||||||
#include "strategic.h"
|
#include "strategic.h"
|
||||||
#include "strategicmap.h"
|
#include "strategicmap.h"
|
||||||
#include "Overhead.h"
|
#include "Overhead.h"
|
||||||
|
#include "Strategic Town Loyalty.h"
|
||||||
|
#include "Utilities.h"
|
||||||
#include "random.h"
|
#include "random.h"
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
#include <Font Control.h>
|
#include "Map Screen Interface.h"
|
||||||
|
#include "Interface.h"
|
||||||
|
#include "LaptopSave.h"
|
||||||
#include "Game Clock.h"
|
#include "Game Clock.h"
|
||||||
#include "Assignments.h"
|
#include "Assignments.h"
|
||||||
|
#include "Squads.h"
|
||||||
|
#include "Soldier Create.h"
|
||||||
|
#include "Dialogue Control.h"
|
||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#include "Queen Command.h"
|
#include "Queen Command.h"
|
||||||
#include "math.h"
|
#include "math.h"
|
||||||
#include "Auto Resolve.h"
|
#include "Auto Resolve.h"
|
||||||
|
#include "Vehicles.h"
|
||||||
|
#include "Tactical Save.h"
|
||||||
|
#include "Campaign.h"
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include "mapscreen.h"
|
#include "mapscreen.h"
|
||||||
#include "Strategic Pathing.h"
|
#include "Strategic Pathing.h"
|
||||||
|
|||||||
@@ -37,15 +37,20 @@ to call into.
|
|||||||
#include "strategicmap.h"
|
#include "strategicmap.h"
|
||||||
#include "Strategic Movement.h"
|
#include "Strategic Movement.h"
|
||||||
#include "Strategic Town Loyalty.h"
|
#include "Strategic Town Loyalty.h"
|
||||||
|
#include "Text.h"
|
||||||
#include "Town Militia.h"
|
#include "Town Militia.h"
|
||||||
#include "Vehicles.h"
|
#include "Vehicles.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "lua.h"
|
#include "lua.h"
|
||||||
|
#include "lauxlib.h"
|
||||||
|
#include "lualib.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#include <lua.h>
|
||||||
#include <lua_function.h>
|
#include <lua_function.h>
|
||||||
#include <lua_state.h>
|
#include <lua_state.h>
|
||||||
|
#include <lua_table.h>
|
||||||
|
|
||||||
extern CHAR16 gzUserDefinedButton1[ 128 ];
|
extern CHAR16 gzUserDefinedButton1[ 128 ];
|
||||||
extern CHAR16 gzUserDefinedButton2[ 128 ];
|
extern CHAR16 gzUserDefinedButton2[ 128 ];
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
#include "LaptopSave.h"
|
#include "LaptopSave.h"
|
||||||
#include "Quests.h"
|
#include "Quests.h"
|
||||||
#include "Morale.h"
|
#include "Morale.h"
|
||||||
|
#include "Overhead.h"
|
||||||
#include "strategicmap.h"
|
#include "strategicmap.h"
|
||||||
#include "Map Screen Helicopter.h"
|
#include "Map Screen Helicopter.h"
|
||||||
#include "Game Clock.h"
|
#include "Game Clock.h"
|
||||||
@@ -19,6 +20,8 @@
|
|||||||
#include "PreBattle Interface.h"
|
#include "PreBattle Interface.h"
|
||||||
#include "Map Screen Interface.h"
|
#include "Map Screen Interface.h"
|
||||||
#include "Tactical Save.h"
|
#include "Tactical Save.h"
|
||||||
|
#include "interface Dialogue.h"
|
||||||
|
#include "random.h"
|
||||||
// HEADROCK HAM 3.6: Added for facility string printing...
|
// HEADROCK HAM 3.6: Added for facility string printing...
|
||||||
#include "PopUpBox.h"
|
#include "PopUpBox.h"
|
||||||
#include "CampaignStats.h" // added by Flugente
|
#include "CampaignStats.h" // added by Flugente
|
||||||
@@ -249,7 +252,7 @@ BOOLEAN SetThisSectorAsPlayerControlled( INT16 sMapX, INT16 sMapY, INT8 bMapZ, B
|
|||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
// no UB
|
// no UB
|
||||||
#else
|
#else
|
||||||
AddEmail(BOBBYR_NOW_OPEN, BOBBYR_NOW_OPEN_LENGTH, BOBBY_R, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT, XML_BR_VISITEDSITE);
|
AddEmail( BOBBYR_NOW_OPEN, BOBBYR_NOW_OPEN_LENGTH, BOBBY_R, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT);
|
||||||
#endif
|
#endif
|
||||||
LaptopSaveInfo.ubHaveBeenToBobbyRaysAtLeastOnceWhileUnderConstruction = BOBBYR_ALREADY_SENT_EMAIL;
|
LaptopSaveInfo.ubHaveBeenToBobbyRaysAtLeastOnceWhileUnderConstruction = BOBBYR_ALREADY_SENT_EMAIL;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
#include "Strategic Pathing.h"
|
#include "Strategic Pathing.h"
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
#include "PopUpBox.h"
|
#include "PopUpBox.h"
|
||||||
|
#include "Player Command.h"
|
||||||
#include "Cursors.h"
|
#include "Cursors.h"
|
||||||
#include "Auto Resolve.h"
|
#include "Auto Resolve.h"
|
||||||
#include "Sound Control.h"
|
#include "Sound Control.h"
|
||||||
@@ -23,6 +24,7 @@
|
|||||||
#include "Map Screen Interface Bottom.h"
|
#include "Map Screen Interface Bottom.h"
|
||||||
#include "Overhead.h"
|
#include "Overhead.h"
|
||||||
#include "Tactical Placement GUI.h"
|
#include "Tactical Placement GUI.h"
|
||||||
|
#include "Town Militia.h"
|
||||||
#include "Campaign.h"
|
#include "Campaign.h"
|
||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#include "random.h"
|
#include "random.h"
|
||||||
@@ -39,13 +41,15 @@
|
|||||||
#include "Soldier macros.h"
|
#include "Soldier macros.h"
|
||||||
#include "history.h"
|
#include "history.h"
|
||||||
#include "Cheats.h"
|
#include "Cheats.h"
|
||||||
|
// added by SANDRO
|
||||||
#include "Tactical Save.h"
|
#include "Tactical Save.h"
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include "CampaignStats.h" // added by Flugente
|
#include "CampaignStats.h" // added by Flugente
|
||||||
#include "MilitiaSquads.h" // added by Flugente
|
#include "MilitiaSquads.h" // added by Flugente
|
||||||
#include "SkillCheck.h" // added by Flugente
|
#include "SkillCheck.h" // added by Flugente
|
||||||
#include "Strategic Transport Groups.h"
|
#include "Strategic Transport Groups.h"
|
||||||
|
#include "Utilities.h"
|
||||||
|
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
#include "ub_config.h"
|
#include "ub_config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
//Queen Command.c
|
//Queen Command.c
|
||||||
|
|
||||||
#include "Queen Command.h"
|
#include "Queen Command.h"
|
||||||
|
#include "Strategic Event Handler.h"
|
||||||
#include "Overhead Types.h"
|
#include "Overhead Types.h"
|
||||||
#include "strategicmap.h"
|
#include "strategicmap.h"
|
||||||
#include "Soldier Init List.h"
|
#include "Soldier Init List.h"
|
||||||
@@ -8,7 +9,7 @@
|
|||||||
#include "random.h"
|
#include "random.h"
|
||||||
#include "Strategic Movement.h"
|
#include "Strategic Movement.h"
|
||||||
#include "Overhead.h"
|
#include "Overhead.h"
|
||||||
#include <Vehicles.h>
|
#include "Strategic Pathing.h"
|
||||||
#include "strategic.h"
|
#include "strategic.h"
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include "Map Edgepoints.h"
|
#include "Map Edgepoints.h"
|
||||||
@@ -32,6 +33,7 @@
|
|||||||
#include "Animation Data.h"
|
#include "Animation Data.h"
|
||||||
#include "Game Clock.h"
|
#include "Game Clock.h"
|
||||||
#include "renderworld.h"
|
#include "renderworld.h"
|
||||||
|
#include "Town Militia.h"
|
||||||
#include "Dialogue Control.h"
|
#include "Dialogue Control.h"
|
||||||
#include "Campaign Init.h"
|
#include "Campaign Init.h"
|
||||||
#include "Meanwhile.h"
|
#include "Meanwhile.h"
|
||||||
|
|||||||
@@ -22,11 +22,13 @@
|
|||||||
#include "Soldier Add.h"
|
#include "Soldier Add.h"
|
||||||
#include "opplist.h"
|
#include "opplist.h"
|
||||||
#include "Handle Items.h"
|
#include "Handle Items.h"
|
||||||
|
#include "Game Clock.h"
|
||||||
#include "environment.h"
|
#include "environment.h"
|
||||||
#include "Dialogue Control.h"
|
#include "Dialogue Control.h"
|
||||||
//#include "Soldier Control.h"
|
//#include "Soldier Control.h"
|
||||||
#include "Overhead.h"
|
#include "Overhead.h"
|
||||||
#include "MessageBoxScreen.h"
|
#include "MessageBoxScreen.h"
|
||||||
|
#include "stdio.h"
|
||||||
#include "english.h"
|
#include "english.h"
|
||||||
#include "line.h"
|
#include "line.h"
|
||||||
#include "Keys.h"
|
#include "Keys.h"
|
||||||
|
|||||||
@@ -8,10 +8,12 @@
|
|||||||
#include "Handle Items.h"
|
#include "Handle Items.h"
|
||||||
#include "Overhead.h"
|
#include "Overhead.h"
|
||||||
#include "interface Dialogue.h"
|
#include "interface Dialogue.h"
|
||||||
|
#include "Soldier Profile.h"
|
||||||
#include "Isometric Utils.h"
|
#include "Isometric Utils.h"
|
||||||
#include "Render Fun.h"
|
#include "Render Fun.h"
|
||||||
#include "history.h"
|
#include "history.h"
|
||||||
#include "Map Screen Helicopter.h"
|
#include "Map Screen Helicopter.h"
|
||||||
|
#include "Overhead.h"
|
||||||
#include "Strategic Mines.h"
|
#include "Strategic Mines.h"
|
||||||
#include "Boxing.h"
|
#include "Boxing.h"
|
||||||
#include "Campaign Types.h"
|
#include "Campaign Types.h"
|
||||||
@@ -20,6 +22,7 @@
|
|||||||
#include "Campaign.h"
|
#include "Campaign.h"
|
||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#include "Arms Dealer Init.h"
|
#include "Arms Dealer Init.h"
|
||||||
|
#include "GameSettings.h"
|
||||||
#include "random.h"
|
#include "random.h"
|
||||||
#include "Assignments.h"
|
#include "Assignments.h"
|
||||||
#include "strategic.h"
|
#include "strategic.h"
|
||||||
|
|||||||
@@ -1,11 +1,20 @@
|
|||||||
#include "Town Militia.h"
|
#include "Town Militia.h"
|
||||||
#include "Militia Control.h"
|
#include "Militia Control.h"
|
||||||
#include "Campaign Types.h"
|
#include "Campaign Types.h"
|
||||||
#include "mapscreen.h"
|
#include "strategic.h"
|
||||||
#include "strategicmap.h"
|
#include "strategicmap.h"
|
||||||
#include "Overhead.h"
|
#include "Overhead.h"
|
||||||
|
#include "Strategic Town Loyalty.h"
|
||||||
|
#include "Utilities.h"
|
||||||
#include "random.h"
|
#include "random.h"
|
||||||
|
#include "Text.h"
|
||||||
|
#include "Map Screen Interface.h"
|
||||||
|
#include "Interface.h"
|
||||||
|
#include "LaptopSave.h"
|
||||||
|
#include "Assignments.h"
|
||||||
|
#include "Squads.h"
|
||||||
#include "Soldier Create.h"
|
#include "Soldier Create.h"
|
||||||
|
#include "Dialogue Control.h"
|
||||||
#include "Queen Command.h"
|
#include "Queen Command.h"
|
||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#include "Soldier Init List.h"
|
#include "Soldier Init List.h"
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#include <memory.h>
|
||||||
#include "FileMan.h"
|
#include "FileMan.h"
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "Scheduling.h"
|
#include "Scheduling.h"
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
#include "strategicmap.h"
|
#include "strategicmap.h"
|
||||||
#include "Game Clock.h"
|
#include "Game Clock.h"
|
||||||
#include "strategic.h"
|
#include "strategic.h"
|
||||||
|
#include "Explosion Control.h"
|
||||||
#include "Town Militia.h"
|
#include "Town Militia.h"
|
||||||
#include "Overhead.h"
|
#include "Overhead.h"
|
||||||
#include "Squads.h"
|
#include "Squads.h"
|
||||||
@@ -25,12 +26,15 @@
|
|||||||
#include "Campaign Init.h"
|
#include "Campaign Init.h"
|
||||||
#include "Game Init.h"
|
#include "Game Init.h"
|
||||||
#include "PreBattle Interface.h"
|
#include "PreBattle Interface.h"
|
||||||
|
#include "Quests.h"
|
||||||
#include "Soldier Profile.h"
|
#include "Soldier Profile.h"
|
||||||
#include "Scheduling.h"
|
#include "Scheduling.h"
|
||||||
#include "Map Information.h"
|
#include "Map Information.h"
|
||||||
#include "interface Dialogue.h"
|
#include "interface Dialogue.h"
|
||||||
#include "ASD.h" // added by Flugente
|
#include "ASD.h" // added by Flugente
|
||||||
#include "Rebel Command.h"
|
#include "Rebel Command.h"
|
||||||
|
#include "Game Event Hook.h"
|
||||||
|
#include "Strategic Town Loyalty.h"
|
||||||
#include "Strategic Transport Groups.h"
|
#include "Strategic Transport Groups.h"
|
||||||
|
|
||||||
#include "GameInitOptionsScreen.h"
|
#include "GameInitOptionsScreen.h"
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
#include "Strategic Event Handler.h"
|
#include "Strategic Event Handler.h"
|
||||||
#include <Windows.h>
|
#include "MemMan.h"
|
||||||
|
#include "message.h"
|
||||||
#include "Items.h"
|
#include "Items.h"
|
||||||
#include "Handle Items.h"
|
#include "Handle Items.h"
|
||||||
|
#include "LaptopSave.h"
|
||||||
#include "Tactical Save.h"
|
#include "Tactical Save.h"
|
||||||
#include "strategicmap.h"
|
#include "strategicmap.h"
|
||||||
#include "Quests.h"
|
#include "Quests.h"
|
||||||
@@ -12,6 +14,12 @@
|
|||||||
#include "random.h"
|
#include "random.h"
|
||||||
#include "Overhead.h"
|
#include "Overhead.h"
|
||||||
#include "Strategic Town Loyalty.h"
|
#include "Strategic Town Loyalty.h"
|
||||||
|
#include "Soldier Init List.h"
|
||||||
|
#include "SaveLoadMap.h"
|
||||||
|
#include "Soldier Create.h"
|
||||||
|
#include "Soldier Add.h"
|
||||||
|
#include "renderworld.h"
|
||||||
|
#include "Soldier Profile.h"
|
||||||
#include "email.h"
|
#include "email.h"
|
||||||
#include "strategic.h"
|
#include "strategic.h"
|
||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
@@ -22,6 +30,7 @@
|
|||||||
#include "Rebel Command.h"
|
#include "Rebel Command.h"
|
||||||
|
|
||||||
#include "Luaglobal.h"
|
#include "Luaglobal.h"
|
||||||
|
#include "connect.h"
|
||||||
#include "LuaInitNPCs.h"
|
#include "LuaInitNPCs.h"
|
||||||
|
|
||||||
//forward declarations of common classes to eliminate includes
|
//forward declarations of common classes to eliminate includes
|
||||||
@@ -689,7 +698,7 @@ void HandleNPCSystemEvent( UINT32 uiEvent )
|
|||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
// no UB
|
// no UB
|
||||||
#else
|
#else
|
||||||
AddEmail(KING_PIN_LETTER, KING_PIN_LETTER_LENGTH, KING_PIN, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT, XML_KINGPIN_STOLEMONEY);
|
AddEmail( KING_PIN_LETTER, KING_PIN_LETTER_LENGTH, KING_PIN, GetWorldTotalMin(), -1, -1 , TYPE_EMAIL_EMAIL_EDT );
|
||||||
#endif
|
#endif
|
||||||
StartQuest( QUEST_KINGPIN_MONEY, gMercProfiles[ KINGPIN ].sSectorX, gMercProfiles[ KINGPIN ].sSectorY );
|
StartQuest( QUEST_KINGPIN_MONEY, gMercProfiles[ KINGPIN ].sSectorX, gMercProfiles[ KINGPIN ].sSectorY );
|
||||||
// add event to send terrorists two days from now
|
// add event to send terrorists two days from now
|
||||||
@@ -795,7 +804,7 @@ void HandleNPCSystemEvent( UINT32 uiEvent )
|
|||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
// no UB
|
// no UB
|
||||||
#else
|
#else
|
||||||
AddEmail(ENRICO_MIGUEL, ENRICO_MIGUEL_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT, XML_ENRICO_GREATNEWS);
|
AddEmail( ENRICO_MIGUEL, ENRICO_MIGUEL_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1 , TYPE_EMAIL_EMAIL_EDT);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
#include "mercs.h"
|
#include "mercs.h"
|
||||||
#include "Mapscreen.h"
|
#include "Mapscreen.h"
|
||||||
#include "Weapons.h"
|
#include "Weapons.h"
|
||||||
|
#include "personnel.h"
|
||||||
#include "Strategic Movement.h"
|
#include "Strategic Movement.h"
|
||||||
#include "LaptopSave.h"
|
#include "LaptopSave.h"
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
@@ -24,17 +25,23 @@
|
|||||||
#include "strategic.h"
|
#include "strategic.h"
|
||||||
#include "strategicmap.h"
|
#include "strategicmap.h"
|
||||||
#include "Strategic Status.h"
|
#include "Strategic Status.h"
|
||||||
|
#include "aim.h"
|
||||||
#include "email.h"
|
#include "email.h"
|
||||||
#include "Map Screen Interface.h"
|
#include "Map Screen Interface.h"
|
||||||
#include "Campaign.h"
|
#include "Campaign.h"
|
||||||
#include "Soldier Add.h"
|
#include "Soldier Add.h"
|
||||||
#include "screenids.h"
|
#include "screenids.h"
|
||||||
|
#include "gameloop.h"
|
||||||
#include "jascreens.h"
|
#include "jascreens.h"
|
||||||
#include "Soldier macros.h"
|
#include "Soldier macros.h"
|
||||||
#include "finances.h"
|
#include "finances.h"
|
||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#include "Quests.h"
|
#include "Quests.h"
|
||||||
|
// HEADROCK HAM B1: Additional Include for Dynamic Roaming Restrictions
|
||||||
|
#include "MilitiaSquads.h"
|
||||||
|
// HEADROCK HAM 3.6: Additional include for Facility Operating Deby
|
||||||
#include "Facilities.h"
|
#include "Facilities.h"
|
||||||
|
// HEADROCK HAM 3.6: And another include, for militia upkeep costs.
|
||||||
#include "Town Militia.h"
|
#include "Town Militia.h"
|
||||||
#include "DynamicDialogue.h" // added by Flugente for HandleDynamicOpinionsDailyRefresh()
|
#include "DynamicDialogue.h" // added by Flugente for HandleDynamicOpinionsDailyRefresh()
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
#include "Strategic Mines.h"
|
#include "Strategic Mines.h"
|
||||||
#include "Strategic Mines LUA.h"
|
#include "Strategic Mines LUA.h"
|
||||||
#include "UndergroundInit.h"
|
#include "UndergroundInit.h"
|
||||||
|
#include <vfs/Core/vfs_debug.h> // for CBasicException
|
||||||
|
|
||||||
#include "connect.h"
|
#include "connect.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,18 @@
|
|||||||
|
#include <string.h>
|
||||||
#include "Strategic Mines.h"
|
#include "Strategic Mines.h"
|
||||||
#include "finances.h"
|
#include "finances.h"
|
||||||
#include "Strategic Town Loyalty.h"
|
#include "Strategic Town Loyalty.h"
|
||||||
#include "strategic.h"
|
#include "strategic.h"
|
||||||
#include "Game Clock.h"
|
#include "Game Clock.h"
|
||||||
#include "strategicmap.h"
|
#include "strategicmap.h"
|
||||||
|
#include "random.h"
|
||||||
#include "Soldier Profile.h"
|
#include "Soldier Profile.h"
|
||||||
#include "Dialogue Control.h"
|
#include "Dialogue Control.h"
|
||||||
#include "Map Screen Interface.h"
|
#include "Map Screen Interface.h"
|
||||||
#include "Quests.h"
|
#include "Quests.h"
|
||||||
#include "Creature Spreading.h"
|
#include "Creature Spreading.h"
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
|
#include "Text.h"
|
||||||
#include "Game Event Hook.h"
|
#include "Game Event Hook.h"
|
||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#include "Strategic AI.h"
|
#include "Strategic AI.h"
|
||||||
@@ -19,6 +22,7 @@
|
|||||||
#include "ASD.h" // added by Flugente
|
#include "ASD.h" // added by Flugente
|
||||||
#include "Rebel Command.h"
|
#include "Rebel Command.h"
|
||||||
|
|
||||||
|
#include "GameInitOptionsScreen.h"
|
||||||
|
|
||||||
#include "Strategic Mines LUA.h"
|
#include "Strategic Mines LUA.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#include "builddefines.h"
|
#include "builddefines.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <memory.h>
|
||||||
#include "Strategic Movement.h"
|
#include "Strategic Movement.h"
|
||||||
#include "MemMan.h"
|
#include "MemMan.h"
|
||||||
#include "DEBUG.H"
|
#include "DEBUG.H"
|
||||||
@@ -33,6 +34,7 @@
|
|||||||
#include "Tactical Save.h"
|
#include "Tactical Save.h"
|
||||||
#include "Player Command.h"
|
#include "Player Command.h"
|
||||||
#include "Strategic AI.h"
|
#include "Strategic AI.h"
|
||||||
|
#include "Town Militia.h"
|
||||||
#include "Music Control.h"
|
#include "Music Control.h"
|
||||||
#include "Campaign.h"
|
#include "Campaign.h"
|
||||||
#include "Isometric Utils.h"
|
#include "Isometric Utils.h"
|
||||||
@@ -51,6 +53,7 @@
|
|||||||
#include "Strategic Transport Groups.h"
|
#include "Strategic Transport Groups.h"
|
||||||
|
|
||||||
#include "MilitiaSquads.h"
|
#include "MilitiaSquads.h"
|
||||||
|
#include "Vehicles.h"
|
||||||
|
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
#include "Ja25Update.h"
|
#include "Ja25Update.h"
|
||||||
|
|||||||
@@ -1,18 +1,24 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <time.h>
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "worlddef.h"
|
#include "worlddef.h"
|
||||||
#include <DEBUG.H>
|
#include "sgp.h"
|
||||||
#include "strategic.h"
|
#include "strategic.h"
|
||||||
#include "mapscreen.h"
|
#include "mapscreen.h"
|
||||||
|
#include "Overhead.h"
|
||||||
#include "strategicmap.h"
|
#include "strategicmap.h"
|
||||||
#include "Strategic Pathing.h"
|
#include "Strategic Pathing.h"
|
||||||
|
#include "Map Screen Interface Border.h"
|
||||||
#include "Game Clock.h"
|
#include "Game Clock.h"
|
||||||
#include "Strategic Movement.h"
|
#include "Strategic Movement.h"
|
||||||
#include "Campaign Types.h"
|
#include "Campaign Types.h"
|
||||||
#include "Assignments.h"
|
#include "Assignments.h"
|
||||||
|
#include "Squads.h"
|
||||||
#include "Vehicles.h"
|
#include "Vehicles.h"
|
||||||
#include "Map Screen Helicopter.h"
|
#include "Map Screen Helicopter.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "english.h"
|
#include "english.h"
|
||||||
|
#include "Map Screen Interface.h"
|
||||||
#include "Game Event Hook.h"
|
#include "Game Event Hook.h"
|
||||||
#include "Strategic AI.h"
|
#include "Strategic AI.h"
|
||||||
#include "Queen Command.h" // added by Flugente
|
#include "Queen Command.h" // added by Flugente
|
||||||
|
|||||||
@@ -253,7 +253,7 @@ void HandleEnricoEmail(void)
|
|||||||
// if creatures have attacked a mine (doesn't care if they're still there or not at the moment)
|
// if creatures have attacked a mine (doesn't care if they're still there or not at the moment)
|
||||||
if (HasAnyMineBeenAttackedByMonsters() && !(gStrategicStatus.usEnricoEmailFlags & ENRICO_EMAIL_SENT_CREATURES))
|
if (HasAnyMineBeenAttackedByMonsters() && !(gStrategicStatus.usEnricoEmailFlags & ENRICO_EMAIL_SENT_CREATURES))
|
||||||
{
|
{
|
||||||
AddEmail(ENRICO_CREATURES, ENRICO_CREATURES_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT, XML_ENRICO_CREPITUS);
|
AddEmail(ENRICO_CREATURES, ENRICO_CREATURES_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT);
|
||||||
gStrategicStatus.usEnricoEmailFlags |= ENRICO_EMAIL_SENT_CREATURES;
|
gStrategicStatus.usEnricoEmailFlags |= ENRICO_EMAIL_SENT_CREATURES;
|
||||||
return; // avoid any other E-mail at the same time
|
return; // avoid any other E-mail at the same time
|
||||||
}
|
}
|
||||||
@@ -261,21 +261,21 @@ void HandleEnricoEmail(void)
|
|||||||
|
|
||||||
if ((ubCurrentProgress >= SOME_PROGRESS_THRESHOLD) && !(gStrategicStatus.usEnricoEmailFlags & ENRICO_EMAIL_SENT_SOME_PROGRESS))
|
if ((ubCurrentProgress >= SOME_PROGRESS_THRESHOLD) && !(gStrategicStatus.usEnricoEmailFlags & ENRICO_EMAIL_SENT_SOME_PROGRESS))
|
||||||
{
|
{
|
||||||
AddEmail(ENRICO_PROG_20, ENRICO_PROG_20_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT, XML_ENRICO_PROGRESS);
|
AddEmail(ENRICO_PROG_20, ENRICO_PROG_20_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT);
|
||||||
gStrategicStatus.usEnricoEmailFlags |= ENRICO_EMAIL_SENT_SOME_PROGRESS;
|
gStrategicStatus.usEnricoEmailFlags |= ENRICO_EMAIL_SENT_SOME_PROGRESS;
|
||||||
return; // avoid any setback E-mail at the same time
|
return; // avoid any setback E-mail at the same time
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((ubCurrentProgress >= ABOUT_HALFWAY_THRESHOLD) && !(gStrategicStatus.usEnricoEmailFlags & ENRICO_EMAIL_SENT_ABOUT_HALFWAY))
|
if ((ubCurrentProgress >= ABOUT_HALFWAY_THRESHOLD) && !(gStrategicStatus.usEnricoEmailFlags & ENRICO_EMAIL_SENT_ABOUT_HALFWAY))
|
||||||
{
|
{
|
||||||
AddEmail(ENRICO_PROG_55, ENRICO_PROG_55_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT, XML_ENRICO_GOODWORK);
|
AddEmail(ENRICO_PROG_55, ENRICO_PROG_55_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT);
|
||||||
gStrategicStatus.usEnricoEmailFlags |= ENRICO_EMAIL_SENT_ABOUT_HALFWAY;
|
gStrategicStatus.usEnricoEmailFlags |= ENRICO_EMAIL_SENT_ABOUT_HALFWAY;
|
||||||
return; // avoid any setback E-mail at the same time
|
return; // avoid any setback E-mail at the same time
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((ubCurrentProgress >= NEARLY_DONE_THRESHOLD) && !(gStrategicStatus.usEnricoEmailFlags & ENRICO_EMAIL_SENT_NEARLY_DONE))
|
if ((ubCurrentProgress >= NEARLY_DONE_THRESHOLD) && !(gStrategicStatus.usEnricoEmailFlags & ENRICO_EMAIL_SENT_NEARLY_DONE))
|
||||||
{
|
{
|
||||||
AddEmail(ENRICO_PROG_80, ENRICO_PROG_80_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT, XML_ENRICO_FINALPUSH);
|
AddEmail(ENRICO_PROG_80, ENRICO_PROG_80_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT);
|
||||||
gStrategicStatus.usEnricoEmailFlags |= ENRICO_EMAIL_SENT_NEARLY_DONE;
|
gStrategicStatus.usEnricoEmailFlags |= ENRICO_EMAIL_SENT_NEARLY_DONE;
|
||||||
return; // avoid any setback E-mail at the same time
|
return; // avoid any setback E-mail at the same time
|
||||||
}
|
}
|
||||||
@@ -285,7 +285,7 @@ void HandleEnricoEmail(void)
|
|||||||
(((ubHighestProgress - ubCurrentProgress) >= MINOR_SETBACK_THRESHOLD) && (gStrategicStatus.usEnricoEmailFlags & ENRICO_EMAIL_FLAG_SETBACK_OVER))) &&
|
(((ubHighestProgress - ubCurrentProgress) >= MINOR_SETBACK_THRESHOLD) && (gStrategicStatus.usEnricoEmailFlags & ENRICO_EMAIL_FLAG_SETBACK_OVER))) &&
|
||||||
!(gStrategicStatus.usEnricoEmailFlags & ENRICO_EMAIL_SENT_MAJOR_SETBACK))
|
!(gStrategicStatus.usEnricoEmailFlags & ENRICO_EMAIL_SENT_MAJOR_SETBACK))
|
||||||
{
|
{
|
||||||
AddEmail(ENRICO_SETBACK, ENRICO_SETBACK_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT, XML_ENRICO_BADNEWS);
|
AddEmail(ENRICO_SETBACK, ENRICO_SETBACK_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT);
|
||||||
gStrategicStatus.usEnricoEmailFlags |= ENRICO_EMAIL_SENT_MAJOR_SETBACK;
|
gStrategicStatus.usEnricoEmailFlags |= ENRICO_EMAIL_SENT_MAJOR_SETBACK;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -293,7 +293,7 @@ void HandleEnricoEmail(void)
|
|||||||
if (((ubHighestProgress - ubCurrentProgress) >= MINOR_SETBACK_THRESHOLD) &&
|
if (((ubHighestProgress - ubCurrentProgress) >= MINOR_SETBACK_THRESHOLD) &&
|
||||||
!(gStrategicStatus.usEnricoEmailFlags & (ENRICO_EMAIL_SENT_MINOR_SETBACK | ENRICO_EMAIL_SENT_MAJOR_SETBACK)))
|
!(gStrategicStatus.usEnricoEmailFlags & (ENRICO_EMAIL_SENT_MINOR_SETBACK | ENRICO_EMAIL_SENT_MAJOR_SETBACK)))
|
||||||
{
|
{
|
||||||
AddEmail(ENRICO_SETBACK_2, ENRICO_SETBACK_2_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT, XML_ENRICO_SETBACK);
|
AddEmail(ENRICO_SETBACK_2, ENRICO_SETBACK_2_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT);
|
||||||
gStrategicStatus.usEnricoEmailFlags |= ENRICO_EMAIL_SENT_MINOR_SETBACK;
|
gStrategicStatus.usEnricoEmailFlags |= ENRICO_EMAIL_SENT_MINOR_SETBACK;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -356,15 +356,15 @@ void HandleEnricoEmail(void)
|
|||||||
switch( bComplaint )
|
switch( bComplaint )
|
||||||
{
|
{
|
||||||
case 3:
|
case 3:
|
||||||
AddEmail(LACK_PLAYER_PROGRESS_3, LACK_PLAYER_PROGRESS_3_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT, XML_ENRICO_DISAPPOINTED);
|
AddEmail(LACK_PLAYER_PROGRESS_3, LACK_PLAYER_PROGRESS_3_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT);
|
||||||
gStrategicStatus.usEnricoEmailFlags |= ENRICO_EMAIL_SENT_LACK_PROGRESS3;
|
gStrategicStatus.usEnricoEmailFlags |= ENRICO_EMAIL_SENT_LACK_PROGRESS3;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
AddEmail(LACK_PLAYER_PROGRESS_2, LACK_PLAYER_PROGRESS_2_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT, XML_ENRICO_WORRIED);
|
AddEmail(LACK_PLAYER_PROGRESS_2, LACK_PLAYER_PROGRESS_2_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT);
|
||||||
gStrategicStatus.usEnricoEmailFlags |= ENRICO_EMAIL_SENT_LACK_PROGRESS2;
|
gStrategicStatus.usEnricoEmailFlags |= ENRICO_EMAIL_SENT_LACK_PROGRESS2;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
AddEmail(LACK_PLAYER_PROGRESS_1, LACK_PLAYER_PROGRESS_1_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT, XML_ENRICO_CONCERNED);
|
AddEmail(LACK_PLAYER_PROGRESS_1, LACK_PLAYER_PROGRESS_1_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT);
|
||||||
gStrategicStatus.usEnricoEmailFlags |= ENRICO_EMAIL_SENT_LACK_PROGRESS1;
|
gStrategicStatus.usEnricoEmailFlags |= ENRICO_EMAIL_SENT_LACK_PROGRESS1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
#include "Queen Command.h"
|
#include "Queen Command.h"
|
||||||
#include "Animation Data.h"
|
#include "Animation Data.h"
|
||||||
#include "Quests.h"
|
#include "Quests.h"
|
||||||
|
#include "Font.h"
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include "LOS.h"
|
#include "LOS.h"
|
||||||
#include "World Items.h"
|
#include "World Items.h"
|
||||||
@@ -17,7 +18,9 @@
|
|||||||
#include "random.h"
|
#include "random.h"
|
||||||
#include "Strategic Movement.h"
|
#include "Strategic Movement.h"
|
||||||
#include "Strategic Pathing.h"
|
#include "Strategic Pathing.h"
|
||||||
|
#include "Vehicles.h"
|
||||||
#include "Game Clock.h"
|
#include "Game Clock.h"
|
||||||
|
#include "Game Event Hook.h"
|
||||||
#include "Morale.h"
|
#include "Morale.h"
|
||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
@@ -26,6 +29,9 @@
|
|||||||
#include "history.h"
|
#include "history.h"
|
||||||
#include "Meanwhile.h"
|
#include "Meanwhile.h"
|
||||||
#include "Strategic Status.h"
|
#include "Strategic Status.h"
|
||||||
|
// HEADROCK HAM B1: Added include for Dynamic Roaming Militia
|
||||||
|
#include "MilitiaSquads.h"
|
||||||
|
// HEADROCK HAM 3.6: Include for Facility Debt
|
||||||
#include "Facilities.h"
|
#include "Facilities.h"
|
||||||
#include "CampaignStats.h" // added by Flugente
|
#include "CampaignStats.h" // added by Flugente
|
||||||
#include "DynamicDialogue.h" // added by Flugente
|
#include "DynamicDialogue.h" // added by Flugente
|
||||||
|
|||||||
@@ -1,12 +1,22 @@
|
|||||||
#include "sgp.h"
|
#include "sgp.h"
|
||||||
#include "Game Clock.h"
|
#include "Game Clock.h"
|
||||||
|
#include "Font Control.h"
|
||||||
#include "Timer Control.h"
|
#include "Timer Control.h"
|
||||||
#include "Overhead.h"
|
#include "Overhead.h"
|
||||||
#include <Overhead Types.h>
|
#include "Game Clock.h"
|
||||||
|
#include "message.h"
|
||||||
|
#include "worlddef.h"
|
||||||
|
#include "Soldier Create.h"
|
||||||
|
#include "Soldier Add.h"
|
||||||
#include "Strategic Turns.h"
|
#include "Strategic Turns.h"
|
||||||
|
#include "Isometric Utils.h"
|
||||||
|
#include "Animation Data.h"
|
||||||
|
#include "Animation Control.h"
|
||||||
#include "Tactical Turns.h"
|
#include "Tactical Turns.h"
|
||||||
|
#include "Strategic Turns.h"
|
||||||
#include "rt time defines.h"
|
#include "rt time defines.h"
|
||||||
|
#include "Assignments.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
#include "strategicmap.h"
|
#include "strategicmap.h"
|
||||||
#include "Overhead.h"
|
#include "Overhead.h"
|
||||||
#include "Strategic Town Loyalty.h"
|
#include "Strategic Town Loyalty.h"
|
||||||
|
#include "Utilities.h"
|
||||||
#include "random.h"
|
#include "random.h"
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
#include "Map Screen Interface.h"
|
#include "Map Screen Interface.h"
|
||||||
@@ -15,6 +16,8 @@
|
|||||||
#include "finances.h"
|
#include "finances.h"
|
||||||
#include "Game Clock.h"
|
#include "Game Clock.h"
|
||||||
#include "Assignments.h"
|
#include "Assignments.h"
|
||||||
|
#include "Squads.h"
|
||||||
|
#include "Soldier Create.h"
|
||||||
#include "Dialogue Control.h"
|
#include "Dialogue Control.h"
|
||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#include "Queen Command.h"
|
#include "Queen Command.h"
|
||||||
@@ -36,6 +39,7 @@
|
|||||||
#include "Soldier Control.h"
|
#include "Soldier Control.h"
|
||||||
#include "soldier profile type.h"
|
#include "soldier profile type.h"
|
||||||
|
|
||||||
|
#include "MilitiaSquads.h"
|
||||||
#define SIZE_OF_MILITIA_COMPLETED_TRAINING_LIST 50
|
#define SIZE_OF_MILITIA_COMPLETED_TRAINING_LIST 50
|
||||||
|
|
||||||
// temporary local global variables
|
// temporary local global variables
|
||||||
|
|||||||
@@ -9,6 +9,8 @@
|
|||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "lua.h"
|
#include "lua.h"
|
||||||
|
#include "lauxlib.h"
|
||||||
|
#include "lualib.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "lua_state.h"
|
#include "lua_state.h"
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
#include "FileMan.h"
|
#include "FileMan.h"
|
||||||
#include "MemMan.h"
|
#include "MemMan.h"
|
||||||
#include "Debug Control.h"
|
#include "Debug Control.h"
|
||||||
|
#include "mapscreen.h"
|
||||||
|
|
||||||
#define MAX_CHAR_DATA_LENGTH 500
|
#define MAX_CHAR_DATA_LENGTH 500
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
#include "sgp.h"
|
#include "sgp.h"
|
||||||
#include "Debug Control.h"
|
#include "Debug Control.h"
|
||||||
#include "expat.h"
|
#include "expat.h"
|
||||||
#include <Item Types.h>
|
#include "GameSettings.h"
|
||||||
#include "XML.h"
|
#include "XML.h"
|
||||||
#include "FileMan.h"
|
#include "FileMan.h"
|
||||||
#include "Campaign Types.h"
|
#include "Campaign Types.h"
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
#include "XML.h"
|
#include "XML.h"
|
||||||
#include "FileMan.h"
|
#include "FileMan.h"
|
||||||
#include "Campaign Types.h"
|
#include "Campaign Types.h"
|
||||||
|
#include "Facilities.h"
|
||||||
|
|
||||||
FACILITYTYPE gFacilityTypes[ MAX_NUM_FACILITY_TYPES ];
|
FACILITYTYPE gFacilityTypes[ MAX_NUM_FACILITY_TYPES ];
|
||||||
UINT16 NUM_FACILITY_TYPES = 0;
|
UINT16 NUM_FACILITY_TYPES = 0;
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
#include "Debug Control.h"
|
#include "Debug Control.h"
|
||||||
#include "expat.h"
|
#include "expat.h"
|
||||||
#include "XML.h"
|
#include "XML.h"
|
||||||
|
#include "Interface.h"
|
||||||
#include "Map Screen Interface Map.h"
|
#include "Map Screen Interface Map.h"
|
||||||
|
|
||||||
struct
|
struct
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#include "sgp.h"
|
#include "sgp.h"
|
||||||
#include <FileMan.h>
|
#include "Map Screen Interface.h"
|
||||||
|
#include "Overhead.h"
|
||||||
#include "Debug Control.h"
|
#include "Debug Control.h"
|
||||||
#include "expat.h"
|
#include "expat.h"
|
||||||
#include "XML.h"
|
#include "XML.h"
|
||||||
|
|||||||
@@ -13,9 +13,11 @@
|
|||||||
#include "XML.h"
|
#include "XML.h"
|
||||||
#include "expat.h"
|
#include "expat.h"
|
||||||
#include "string.h"
|
#include "string.h"
|
||||||
|
#include "Campaign Types.h"
|
||||||
#include "FileMan.h"
|
#include "FileMan.h"
|
||||||
#include "MemMan.h"
|
#include "MemMan.h"
|
||||||
#include "Debug Control.h"
|
#include "Debug Control.h"
|
||||||
|
#include "mapscreen.h"
|
||||||
|
|
||||||
#define MAX_CHAR_DATA_LENGTH 500
|
#define MAX_CHAR_DATA_LENGTH 500
|
||||||
|
|
||||||
|
|||||||
+15
-8
@@ -1,6 +1,7 @@
|
|||||||
#include "mapscreen.h"
|
#include "mapscreen.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
#include <time.h>
|
||||||
#include "gameloop.h"
|
#include "gameloop.h"
|
||||||
#include "sgp.h"
|
#include "sgp.h"
|
||||||
#include "vobject.h"
|
#include "vobject.h"
|
||||||
@@ -16,9 +17,12 @@
|
|||||||
#include "Font Control.h"
|
#include "Font Control.h"
|
||||||
#include "Timer Control.h"
|
#include "Timer Control.h"
|
||||||
#include "Interface.h"
|
#include "Interface.h"
|
||||||
|
#include "Handle UI.h"
|
||||||
#include "Interface Items.h"
|
#include "Interface Items.h"
|
||||||
#include "Interface Utils.h"
|
#include "Interface Utils.h"
|
||||||
|
#include "lighting.h"
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
|
#include <tchar.h>
|
||||||
#include "Cursors.h"
|
#include "Cursors.h"
|
||||||
#include "Soldier Profile.h"
|
#include "Soldier Profile.h"
|
||||||
#include "Interface Panels.h"
|
#include "Interface Panels.h"
|
||||||
@@ -56,6 +60,7 @@
|
|||||||
#include "Dialogue Control.h"
|
#include "Dialogue Control.h"
|
||||||
#include "Map Screen Interface TownMine Info.h"
|
#include "Map Screen Interface TownMine Info.h"
|
||||||
#include "PreBattle Interface.h"
|
#include "PreBattle Interface.h"
|
||||||
|
#include "personnel.h"
|
||||||
#include "Animated ProgressBar.h"
|
#include "Animated ProgressBar.h"
|
||||||
#include "Queen Command.h"
|
#include "Queen Command.h"
|
||||||
#include "LaptopSave.h"
|
#include "LaptopSave.h"
|
||||||
@@ -69,9 +74,11 @@
|
|||||||
#include "Strategic Mines.h"
|
#include "Strategic Mines.h"
|
||||||
#include "SaveLoadScreen.h"
|
#include "SaveLoadScreen.h"
|
||||||
#include "Options Screen.h"
|
#include "Options Screen.h"
|
||||||
|
#include "Auto Resolve.h"
|
||||||
#include "Meanwhile.h"
|
#include "Meanwhile.h"
|
||||||
#include "Campaign.h"
|
#include "Campaign.h"
|
||||||
#include "random.h"
|
#include "random.h"
|
||||||
|
#include "Air Raid.h"
|
||||||
#include "Quests.h"
|
#include "Quests.h"
|
||||||
#include "Town Militia.h"
|
#include "Town Militia.h"
|
||||||
#include "Weapons.h"
|
#include "Weapons.h"
|
||||||
@@ -91,8 +98,13 @@
|
|||||||
#include "Strategic Status.h"
|
#include "Strategic Status.h"
|
||||||
#include "Soldier Create.h"
|
#include "Soldier Create.h"
|
||||||
#include "Animation Control.h"
|
#include "Animation Control.h"
|
||||||
|
// HEADROCK HAM 3.6: Include facilities for assignment display
|
||||||
|
#include "Facilities.h"
|
||||||
|
// HEADROCK HAM 4: Include Militia Squads for Manual Militia Restrictions toggle.
|
||||||
#include "MilitiaSquads.h"
|
#include "MilitiaSquads.h"
|
||||||
#include "Auto Bandage.h" // added by Flugente
|
#include "Auto Bandage.h" // added by Flugente
|
||||||
|
#include "Food.h" // added by Flugente
|
||||||
|
#include "Drugs And Alcohol.h" // added by Flugente
|
||||||
#include "WordWrap.h"
|
#include "WordWrap.h"
|
||||||
|
|
||||||
#include "connect.h" //hayden
|
#include "connect.h" //hayden
|
||||||
@@ -11723,6 +11735,7 @@ void TeamListDestinationRegionBtnCallBack(MOUSE_REGION *pRegion, INT32 iReason )
|
|||||||
// if he's in the helicopter
|
// if he's in the helicopter
|
||||||
if( gCharactersList[ iValue + FIRSTmercTOdisplay ].usSolID->iVehicleId == iHelicopterVehicleId )
|
if( gCharactersList[ iValue + FIRSTmercTOdisplay ].usSolID->iVehicleId == iHelicopterVehicleId )
|
||||||
{
|
{
|
||||||
|
TurnOnAirSpaceMode( );
|
||||||
if( RequestGiveSkyriderNewDestination( ) == FALSE )
|
if( RequestGiveSkyriderNewDestination( ) == FALSE )
|
||||||
{
|
{
|
||||||
// not allowed to change destination of the helicopter
|
// not allowed to change destination of the helicopter
|
||||||
@@ -16012,14 +16025,8 @@ void MakeMapModesSuitableForDestPlotting( INT8 bCharNumber )
|
|||||||
{
|
{
|
||||||
if ( gusMapDisplayColourMode == MAP_DISPLAY_AIRSPACE || gusMapDisplayColourMode == MAP_DISPLAY_AIRSPACE_COLOURED_SAMS )
|
if ( gusMapDisplayColourMode == MAP_DISPLAY_AIRSPACE || gusMapDisplayColourMode == MAP_DISPLAY_AIRSPACE_COLOURED_SAMS )
|
||||||
{
|
{
|
||||||
// turn airspace OFF
|
// turn off airspace mode automatically
|
||||||
gusMapDisplayColourMode = MAP_DISPLAY_NORMAL;
|
ToggleAirspaceMode();
|
||||||
MapBorderButtonOff(MAP_BORDER_AIRSPACE_BTN);
|
|
||||||
// dirty regions
|
|
||||||
fMapPanelDirty = TRUE;
|
|
||||||
fTeamPanelDirty = TRUE;
|
|
||||||
fCharacterInfoPanelDirty = TRUE;
|
|
||||||
fMapScreenBottomDirty = TRUE;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "strategic town reputation.h"
|
#include "strategic town reputation.h"
|
||||||
#include "soldier profile type.h"
|
#include "soldier profile type.h"
|
||||||
|
#include "Game Event Hook.h"
|
||||||
#include "Soldier Profile.h"
|
#include "Soldier Profile.h"
|
||||||
|
#include "Overhead.h"
|
||||||
#include "Game Clock.h"
|
#include "Game Clock.h"
|
||||||
#include "Strategic Town Loyalty.h"
|
#include "Strategic Town Loyalty.h"
|
||||||
#include "DEBUG.H"
|
#include "DEBUG.H"
|
||||||
|
|||||||
@@ -1,16 +1,24 @@
|
|||||||
#include "strategic.h"
|
#include "strategic.h"
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "Squads.h"
|
#include "Squads.h"
|
||||||
|
#include "jascreens.h"
|
||||||
#include "Assignments.h"
|
#include "Assignments.h"
|
||||||
#include "Interface Control.h"
|
#include "Interface Control.h"
|
||||||
#include "Overhead.h"
|
#include "Overhead.h"
|
||||||
#include "Soldier Profile.h"
|
#include "Soldier Profile.h"
|
||||||
#include "Dialogue Control.h"
|
#include "Dialogue Control.h"
|
||||||
|
#include "personnel.h"
|
||||||
#include "Tactical Save.h"
|
#include "Tactical Save.h"
|
||||||
#include "Isometric Utils.h"
|
#include "Isometric Utils.h"
|
||||||
#include "Vehicles.h"
|
#include "Vehicles.h"
|
||||||
#include "Game Clock.h"
|
#include "Game Clock.h"
|
||||||
|
#include "CampaignStats.h" // added by Flugente
|
||||||
|
#include "MilitiaSquads.h" // added by Flugente
|
||||||
|
#include "Game Event Hook.h" // added by Flugente
|
||||||
|
#include "message.h" // added by Flugente
|
||||||
|
#include "Text.h" // added by Flugente
|
||||||
|
#include "Queen Command.h" // added by Flugente
|
||||||
|
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
#else
|
#else
|
||||||
// anv: for playable Speck
|
// anv: for playable Speck
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user