diff --git a/GameSettings.cpp b/GameSettings.cpp
index 9616bf40..d0cfd5c8 100644
--- a/GameSettings.cpp
+++ b/GameSettings.cpp
@@ -424,6 +424,7 @@ void LoadGameExternalOptions()
gGameExternalOptions.iExperiencedAPBonus = iniReader.ReadInteger("JA2 Gameplay Settings","EXPERIENCED_AP_BONUS",0);
gGameExternalOptions.iExpertAPBonus = iniReader.ReadInteger("JA2 Gameplay Settings","EXPERT_AP_BONUS",0);
gGameExternalOptions.iInsaneAPBonus = iniReader.ReadInteger("JA2 Gameplay Settings","INSANE_AP_BONUS",0);
+ gGameExternalOptions.iPlayerAPBonus = iniReader.ReadInteger("JA2 Gameplay Settings","PLAYER_AP_BONUS",0);
// Sight range
gGameExternalOptions.ubStraightSightRange = iniReader.ReadInteger("JA2 Tactical Settings","BASE_SIGHT_RANGE",13);
diff --git a/GameSettings.h b/GameSettings.h
index e56cf397..5eb2a6e2 100644
--- a/GameSettings.h
+++ b/GameSettings.h
@@ -202,6 +202,7 @@ typedef struct
INT8 iExperiencedAPBonus;
INT8 iExpertAPBonus;
INT8 iInsaneAPBonus;
+ INT8 iPlayerAPBonus;
// Kaiden: Vehicle Inventory change - Added for INI Option
BOOLEAN fVehicleInventory;
diff --git a/JA2.opt b/JA2.opt
index 6ea85a65..5f3c8580 100644
Binary files a/JA2.opt and b/JA2.opt differ
diff --git a/JA2.plg b/JA2.plg
index 9e67cf39..062f4720 100644
--- a/JA2.plg
+++ b/JA2.plg
@@ -6,7 +6,7 @@
--------------------Configuration: TileEngine - Win32 Release--------------------
Command Lines
-Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP6D.tmp" with contents
+Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP10.tmp" with contents
[
/nologo /MT /W3 /GX /O2 /I "..\Standard Gaming Platform" /I "..\\" /I "..\Tactical" /I "..\Utils" /I "..\tacticalai" /I "..\Editor" /I "..\strategic" /I "..\Laptop" /I ".\\" /D "CALLBACKTIMER" /D "PRECOMPILEDHEADERS" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "XML_STATIC" /D "CINTERFACE" /FR"Release/" /Fp"Release/TileEngine.pch" /YX"TileEngine All.h" /Fo"Release/" /Fd"Release/" /FD /O2b2 /c
"C:\JA2\Build\TileEngine\Ambient Control.cpp"
@@ -46,8 +46,8 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP6D.tmp" with content
"C:\JA2\Build\TileEngine\worldman.cpp"
"C:\JA2\Build\TileEngine\XML_ExplosionData.cpp"
]
-Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP6D.tmp"
-Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP6E.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP10.tmp"
+Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP11.tmp" with contents
[
/nologo /out:"Release\TileEngine.lib"
".\Release\Ambient Control.obj"
@@ -87,7 +87,7 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP6E.tmp" with content
.\Release\worldman.obj
.\Release\XML_ExplosionData.obj
]
-Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP6E.tmp"
+Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP11.tmp"
Output Window
Compiling...
Ambient Control.cpp
@@ -133,7 +133,7 @@ Creating library...
--------------------Configuration: Standard Gaming Platform - Win32 Release--------------------
Command Lines
-Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP6F.tmp" with contents
+Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP12.tmp" with contents
[
/nologo /MT /W3 /GX /O2 /I "..\\" /I "..\TileEngine" /I "..\Tactical" /I "..\Utils" /I "..\strategic" /I ".\\" /D "NO_ZLIB" /D "JA2_PRECOMPILED_HEADERS" /D "NO_ZLIB_COMPRESSION" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "XML_STATIC" /D "CINTERFACE" /FR".\Release/" /Fp".\Release/Standard Gaming Platform.pch" /YX"JA2 SGP ALL.H" /Fo".\Release/" /Fd".\Release/" /FD /c
"C:\JA2\Build\Standard Gaming Platform\Button Sound Control.cpp"
@@ -173,14 +173,14 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP6F.tmp" with content
"C:\JA2\Build\Standard Gaming Platform\vsurface.cpp"
"C:\JA2\Build\Standard Gaming Platform\WinFont.cpp"
]
-Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP6F.tmp"
-Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP70.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP12.tmp"
+Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP13.tmp" with contents
[
/nologo /MT /W3 /GX /O2 /I "..\\" /I "..\TileEngine" /I "..\Tactical" /I "..\Utils" /I "..\strategic" /I ".\\" /D "NO_ZLIB" /D "JA2_PRECOMPILED_HEADERS" /D "NO_ZLIB_COMPRESSION" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "XML_STATIC" /D "CINTERFACE" /D "_DEBUG" /FR".\Release/" /Fp".\Release/Standard Gaming Platform.pch" /YX"JA2 SGP ALL.H" /Fo".\Release/" /Fd".\Release/" /FD /c
"C:\JA2\Build\Standard Gaming Platform\DEBUG.cpp"
]
-Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP70.tmp"
-Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP71.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP13.tmp"
+Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP14.tmp" with contents
[
/nologo /out:".\Release\Standard Gaming Platform.lib"
".\Release\Button Sound Control.obj"
@@ -222,7 +222,7 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP71.tmp" with content
".\Release\WinFont.obj"
".\ddraw.lib"
]
-Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP71.tmp"
+Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP14.tmp"
Output Window
Compiling...
Button Sound Control.cpp
@@ -286,7 +286,7 @@ Creating library...
--------------------Configuration: Tactical - Win32 Release--------------------
Command Lines
-Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP72.tmp" with contents
+Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP15.tmp" with contents
[
/nologo /MT /W3 /GX /O2 /I "..\Standard Gaming Platform" /I "..\TileEngine" /I "..\\" /I "..\Utils" /I "..\tacticalai" /I "..\Editor" /I "..\strategic" /I "..\Laptop" /I ".\\" /D "CALLBACKTIMER" /D "PRECOMPILEDHEADERS" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "XML_STATIC" /FR"Release/" /Fp"Release/Tactical.pch" /YX"Tactical All.h" /Fo"Release/" /Fd"Release/" /FD /c
"C:\JA2\Build\Tactical\Air Raid.cpp"
@@ -383,14 +383,14 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP72.tmp" with content
"C:\JA2\Build\Tactical\XML_Sounds.cpp"
"C:\JA2\Build\Tactical\XML_TonyInventory.cpp"
]
-Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP72.tmp"
-Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP73.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP15.tmp"
+Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP16.tmp" with contents
[
/nologo /MT /W3 /GX /Od /I "..\Standard Gaming Platform" /I "..\TileEngine" /I "..\\" /I "..\Utils" /I "..\tacticalai" /I "..\Editor" /I "..\strategic" /I "..\Laptop" /I ".\\" /D "CALLBACKTIMER" /D "PRECOMPILEDHEADERS" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "XML_STATIC" /FR"Release/" /Fp"Release/Tactical.pch" /YX"Tactical All.h" /Fo"Release/" /Fd"Release/" /FD /c
"C:\JA2\Build\Tactical\LOS.cpp"
]
-Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP73.tmp"
-Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP74.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP16.tmp"
+Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP17.tmp" with contents
[
/nologo /out:"Release\Tactical.lib"
".\Release\Air Raid.obj"
@@ -488,7 +488,7 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP74.tmp" with content
.\Release\XML_Sounds.obj
.\Release\XML_TonyInventory.obj
]
-Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP74.tmp"
+Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP17.tmp"
Output Window
Compiling...
Air Raid.cpp
@@ -603,7 +603,7 @@ Creating library...
--------------------Configuration: Utils - Win32 Release--------------------
Command Lines
-Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP75.tmp" with contents
+Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP18.tmp" with contents
[
/nologo /MT /W3 /GX /O2 /I "..\Standard Gaming Platform" /I "..\TileEngine" /I "..\\" /I "..\Tactical" /I "..\tacticalai" /I "..\Editor" /I "..\strategic" /I "..\Laptop" /I ".\\" /D "CALLBACKTIMER" /D "PRECOMPILEDHEADERS" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "XML_STATIC" /D "CINTERFACE" /FR"Release/" /Fp"Release/Utils.pch" /YX"Utils All.h" /Fo"Release/" /Fd"Release/" /FD /c
"C:\JA2\Build\Utils\_DutchText.cpp"
@@ -646,8 +646,8 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP75.tmp" with content
"C:\JA2\Build\Utils\XML_Strings.cpp"
"C:\JA2\Build\Utils\XML_Strings2.cpp"
]
-Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP75.tmp"
-Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP76.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP18.tmp"
+Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP19.tmp" with contents
[
/nologo /out:"Release\Utils.lib"
.\Release\_DutchText.obj
@@ -690,7 +690,7 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP76.tmp" with content
.\Release\XML_Strings.obj
.\Release\XML_Strings2.obj
]
-Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP76.tmp"
+Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP19.tmp"
Output Window
Compiling...
_DutchText.cpp
@@ -765,7 +765,7 @@ Creating library...
--------------------Configuration: TacticalAI - Win32 Release--------------------
Command Lines
-Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP77.tmp" with contents
+Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP1A.tmp" with contents
[
/nologo /MT /W3 /GX /O2 /I "..\Standard Gaming Platform" /I "..\TileEngine" /I "..\\" /I "..\Tactical" /I "..\Utils" /I "..\Editor" /I "..\strategic" /I "..\Laptop" /I ".\\" /D "PRECOMPILEDHEADERS" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "XML_STATIC" /D "CINTERFACE" /FR"Release/" /Fp"Release/TacticalAI.pch" /YX"AI All.h" /Fo"Release/" /Fd"Release/" /FD /c
"C:\JA2\Build\TacticalAI\AIList.cpp"
@@ -783,8 +783,8 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP77.tmp" with content
"C:\JA2\Build\TacticalAI\QuestDebug.cpp"
"C:\JA2\Build\TacticalAI\Realtime.cpp"
]
-Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP77.tmp"
-Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP78.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP1A.tmp"
+Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP1B.tmp" with contents
[
/nologo /out:"Release\TacticalAI.lib"
.\Release\AIList.obj
@@ -802,7 +802,7 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP78.tmp" with content
.\Release\QuestDebug.obj
.\Release\Realtime.obj
]
-Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP78.tmp"
+Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP1B.tmp"
Output Window
Compiling...
AIList.cpp
@@ -826,7 +826,7 @@ Creating library...
--------------------Configuration: Editor - Win32 Release--------------------
Command Lines
-Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP79.tmp" with contents
+Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP1C.tmp" with contents
[
/nologo /MT /W3 /GX /O2 /Ob2 /I "..\Standard Gaming Platform" /I "..\TileEngine" /I "..\\" /I "..\Tactical" /I "..\Utils" /I "..\tacticalai" /I "..\strategic" /I "..\Laptop" /I ".\\" /D "PRECOMPILEDHEADERS" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "XML_STATIC" /D "CINTERFACE" /FR"Release/" /Fp"Release/Editor.pch" /YX"Editor All.h" /Fo"Release/" /Fd"Release/" /FD /c
"C:\JA2\Build\Editor\Cursor Modes.cpp"
@@ -854,8 +854,8 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP79.tmp" with content
"C:\JA2\Build\Editor\smooth.cpp"
"C:\JA2\Build\Editor\Smoothing Utils.cpp"
]
-Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP79.tmp"
-Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP7A.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP1C.tmp"
+Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP1D.tmp" with contents
[
/nologo /out:"Release\Editor.lib"
".\Release\Cursor Modes.obj"
@@ -883,7 +883,7 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP7A.tmp" with content
.\Release\smooth.obj
".\Release\Smoothing Utils.obj"
]
-Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP7A.tmp"
+Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP1D.tmp"
Output Window
Compiling...
Cursor Modes.cpp
@@ -916,7 +916,7 @@ Creating library...
--------------------Configuration: Laptop - Win32 Release--------------------
Command Lines
-Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP7B.tmp" with contents
+Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP1E.tmp" with contents
[
/nologo /MT /W3 /GX /O2 /I "..\Standard Gaming Platform" /I "..\TileEngine" /I "..\\" /I "..\Tactical" /I "..\Utils" /I "..\tacticalai" /I "..\Editor" /I "..\strategic" /I ".\\" /D "PRECOMPILEDHEADERS" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "XML_STATIC" /D "CINTERFACE" /FR"Release/" /Fp"Release/Laptop.pch" /YX"Laptop All.h" /Fo"Release/" /Fd"Release/" /FD /c
"C:\JA2\Build\Laptop\aim.cpp"
@@ -977,8 +977,8 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP7B.tmp" with content
"C:\JA2\Build\Laptop\sirtech.cpp"
"C:\JA2\Build\Laptop\Store Inventory.cpp"
]
-Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP7B.tmp"
-Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP7C.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP1E.tmp"
+Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP1F.tmp" with contents
[
/nologo /out:"Release\Laptop.lib"
.\Release\aim.obj
@@ -1039,7 +1039,7 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP7C.tmp" with content
.\Release\sirtech.obj
".\Release\Store Inventory.obj"
]
-Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP7C.tmp"
+Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP1F.tmp"
Output Window
Compiling...
aim.cpp
@@ -1106,7 +1106,7 @@ Creating library...
--------------------Configuration: Strategic - Win32 Release--------------------
Command Lines
-Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP7D.tmp" with contents
+Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP20.tmp" with contents
[
/nologo /MT /W3 /GX /O2 /I "..\Standard Gaming Platform" /I "..\TileEngine" /I "..\\" /I "..\Tactical" /I "..\Utils" /I "..\tacticalai" /I "..\Editor" /I "..\Laptop" /I ".\\" /D "PRECOMPILEDHEADERS" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "XML_STATIC" /D "CINTERFACE" /FR"Release/" /Fp"Release/Strategic.pch" /YX"Strategic All.h" /Fo"Release/" /Fd"Release/" /FD /c
"C:\JA2\Build\Strategic\AI Viewer.cpp"
@@ -1155,8 +1155,8 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP7D.tmp" with content
"C:\JA2\Build\Strategic\XML_Army.cpp"
"C:\JA2\Build\Strategic\XML_Roaming.cpp"
]
-Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP7D.tmp"
-Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP7E.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP20.tmp"
+Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP21.tmp" with contents
[
/nologo /out:"Release\Strategic.lib"
".\Release\AI Viewer.obj"
@@ -1205,7 +1205,7 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP7E.tmp" with content
.\Release\XML_Army.obj
.\Release\XML_Roaming.obj
]
-Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP7E.tmp"
+Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP21.tmp"
Output Window
Compiling...
AI Viewer.cpp
@@ -1261,7 +1261,7 @@ Creating library...
Command Lines
Creating command line "rc.exe /l 0x409 /fo"Release/ja2.res" /i "Res" /i ".\Res" /d "NDEBUG" "C:\JA2\Build\Res\ja2.rc""
-Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP7F.tmp" with contents
+Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP22.tmp" with contents
[
/nologo /G5 /MT /W3 /GX /Zi /O2 /Ob2 /I ".\Standard Gaming Platform" /I ".\TileEngine" /I ".\Tactical" /I ".\Utils" /I ".\TacticalAI" /I ".\Editor" /I ".\Strategic" /I ".\laptop" /I ".\\" /D "CALLBACKTIMER" /D "PRECOMPILEDHEADERS" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "XML_STATIC" /D "CINTERFACE" /FR"Release/" /Fp"Release/JA2.pch" /YX"JA2 All.h" /Fo"Release/" /Fd"Release/" /FD /O2b2 /c
"C:\JA2\Build\Utils\_Ja25GermanText.cpp"
@@ -1288,8 +1288,8 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP7F.tmp" with content
"C:\JA2\Build\SCREENS.cpp"
"C:\JA2\Build\Sys Globals.cpp"
]
-Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP7F.tmp"
-Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP80.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP22.tmp"
+Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP23.tmp" with contents
[
libexpatMT.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib winmm.lib smackw32.lib mss32.lib /nologo /subsystem:windows /profile /map:"Release/ja2_cvs.map" /machine:I386 /out:"..\ja2_cvs.exe"
.\Release\_Ja25GermanText.obj
@@ -1326,7 +1326,7 @@ libexpatMT.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advap
.\Laptop\Release\Laptop.lib
.\Strategic\Release\Strategic.lib
]
-Creating command line "link.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP80.tmp"
+Creating command line "link.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP23.tmp"
Output Window
Compiling resources...
Compiling...
@@ -1363,7 +1363,7 @@ SCREENS.cpp
Sys Globals.cpp
Linking...
LINK : warning LNK4089: all references to "ADVAPI32.dll" discarded by /OPT:REF
-Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP82.tmp" with contents
+Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP25.tmp" with contents
[
/nologo /o"Release/JA2.bsc"
.\Release\_Ja25GermanText.sbr
@@ -1389,7 +1389,7 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP82.tmp" with content
.\Release\SaveLoadScreen.sbr
.\Release\SCREENS.sbr
".\Release\Sys Globals.sbr"]
-Creating command line "bscmake.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP82.tmp"
+Creating command line "bscmake.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP25.tmp"
Creating browse info file...
Output Window
diff --git a/Strategic/XML_Roaming.cpp b/Strategic/XML_Roaming.cpp
new file mode 100644
index 00000000..8cc6b603
--- /dev/null
+++ b/Strategic/XML_Roaming.cpp
@@ -0,0 +1,172 @@
+#ifdef PRECOMPILEDHEADERS
+ #include "Strategic All.h"
+ #include "XML.h"
+#else
+ #include
+ #include "XML.h"
+#endif
+
+#define MAX_CHAR_DATA_LENGTH 500
+
+extern INT32 iRestrictedSectorArraySize;
+extern UINT32 gRestrictMilitia[256];
+
+
+typedef enum
+{
+ ROAMING_ELEMENT_NONE = 0,
+ ROAMING_ELEMENT_RESTRICTED_SECTORS,
+ ROAMING_ELEMENT_SECTOR,
+} ROAMING_PARSE_STAGE;
+
+
+
+
+typedef struct
+{
+ UINT8 ubSectorID;
+ BOOLEAN fValidSector;
+} RoamingInfo;
+
+
+typedef struct
+{
+ ROAMING_PARSE_STAGE curElement;
+ INT8 szCharData[MAX_CHAR_DATA_LENGTH+1];
+ RoamingInfo curRoamingInfo;
+ UINT32 uiSectorCount;
+ UINT32 currentDepth;
+ UINT32 maxReadDepth;
+} RoamingParseData;
+
+
+static void XMLCALL
+RoamingStartElementHandle(void *userData, const char *name, const char **atts)
+{
+ RoamingParseData * pData = (RoamingParseData *) userData;
+
+ if(pData->currentDepth <= pData->maxReadDepth) //are we reading this element?
+ {
+
+ if(strcmp(name, "RESTRICTED_SECTORS") == 0 && pData->curElement == ROAMING_ELEMENT_NONE)
+ {
+ pData->curElement = ROAMING_ELEMENT_RESTRICTED_SECTORS;
+ pData->maxReadDepth++; //we are not skipping this element
+ }
+
+ else if(strcmp(name, "SECTOR") == 0 && pData->curElement == ROAMING_ELEMENT_RESTRICTED_SECTORS)
+ {
+ pData->curElement = ROAMING_ELEMENT_SECTOR;
+ pData->maxReadDepth++; //we are not skipping this element
+ }
+ pData->szCharData[0] = '\0';
+ }
+
+ pData->currentDepth++;
+
+}
+
+
+
+static void XMLCALL
+RoamingCharacterDataHandle(void *userData, const char *str, int len)
+{
+ RoamingParseData * pData = (RoamingParseData *) userData;
+
+ if(pData->currentDepth <= pData->maxReadDepth && strlen(pData->szCharData) < MAX_CHAR_DATA_LENGTH)
+ strncat(pData->szCharData,str,__min((unsigned int)len,MAX_CHAR_DATA_LENGTH-strlen(pData->szCharData)));
+}
+
+
+static void XMLCALL
+RoamingEndElementHandle(void *userData, const char *name)
+{
+ RoamingParseData * pData = (RoamingParseData *) userData;
+
+ if(pData->currentDepth <= pData->maxReadDepth) //we're at the end of an element that we've been reading
+ {
+ if(strcmp(name, "RESTRICTED_SECTORS") == 0 && pData->curElement == ROAMING_ELEMENT_RESTRICTED_SECTORS)
+ {
+ pData->curElement = ROAMING_ELEMENT_NONE;
+ iRestrictedSectorArraySize = pData->uiSectorCount;
+ }
+ //Kaiden: Code shamelessly stolen from lesh to accept sector Aliases
+ else if(strcmp(name, "SECTOR") == 0 && pData->curElement == ROAMING_ELEMENT_SECTOR)
+ {
+ UINT8 x, y;
+ pData->curElement = ROAMING_ELEMENT_RESTRICTED_SECTORS;
+
+ y = (UINT8)pData->szCharData[0] & 0x1F;
+ x = (UINT8)atol(&pData->szCharData[1]);
+ if ( x > 0 && x <= 16 && y > 0 && y <= 16 )
+ {
+ pData->curRoamingInfo.fValidSector = TRUE;
+ pData->curRoamingInfo.ubSectorID = SECTOR(x,y);
+ gRestrictMilitia[pData->uiSectorCount] = pData->curRoamingInfo.ubSectorID;
+ pData->uiSectorCount++;
+ }
+ else
+ {
+ pData->curRoamingInfo.fValidSector = FALSE;
+ }
+ }
+ pData->maxReadDepth--;
+ }
+
+ pData->currentDepth--;
+}
+
+
+BOOLEAN ReadInRoamingInfo(STR fileName)
+{
+ HWFILE hFile;
+ UINT32 uiBytesRead;
+ UINT32 uiFSize;
+ CHAR8 * lpcBuffer;
+ XML_Parser parser = XML_ParserCreate(NULL);
+
+ RoamingParseData pData;
+
+ hFile = FileOpen( fileName, FILE_ACCESS_READ, FALSE );
+ if ( !hFile )
+ return( FALSE );
+
+ uiFSize = FileGetSize(hFile);
+ lpcBuffer = (CHAR8 *) MemAlloc(uiFSize+1);
+
+ //Read in block
+ if ( !FileRead( hFile, lpcBuffer, uiFSize, &uiBytesRead ) )
+ {
+ MemFree(lpcBuffer);
+ return( FALSE );
+ }
+
+ lpcBuffer[uiFSize] = 0; //add a null terminator
+
+ FileClose( hFile );
+
+
+ XML_SetElementHandler(parser, RoamingStartElementHandle, RoamingEndElementHandle);
+ XML_SetCharacterDataHandler(parser, RoamingCharacterDataHandle);
+
+
+ memset(&pData,0,sizeof(pData));
+ XML_SetUserData(parser, &pData);
+ iRestrictedSectorArraySize = 0;
+
+ if(!XML_Parse(parser, lpcBuffer, uiFSize, TRUE))
+ {
+ CHAR8 errorBuf[511];
+ sprintf(errorBuf, "XML Parser Error in RestrictedRoamingMilitia.xml: %s at line %d", XML_ErrorString(XML_GetErrorCode(parser)), XML_GetCurrentLineNumber(parser));
+ LiveMessage(errorBuf);
+
+ MemFree(lpcBuffer);
+ return FALSE;
+ }
+
+ MemFree(lpcBuffer);
+
+ XML_ParserFree(parser);
+
+ return TRUE;
+}
\ No newline at end of file
diff --git a/Tactical/Soldier Control.cpp b/Tactical/Soldier Control.cpp
index 9bab232c..303d4257 100644
--- a/Tactical/Soldier Control.cpp
+++ b/Tactical/Soldier Control.cpp
@@ -621,6 +621,8 @@ INT8 CalcActionPoints(SOLDIERTYPE *pSold)
ubPoints +=0;
}
}
+ else
+ ubPoints += gGameExternalOptions.iPlayerAPBonus;
// if we are in boxing mode, adjust APs... THIS MUST BE LAST!
if ( gTacticalStatus.bBoxingState == BOXING || gTacticalStatus.bBoxingState == PRE_BOXING )
@@ -687,7 +689,7 @@ void CalcNewActionPoints( SOLDIERTYPE *pSoldier )
}
else
{ //Kaiden: Players just max out normally unless drugged
- pSoldier->bActionPoints = __min( pSoldier->bActionPoints, gubMaxActionPoints[ pSoldier->ubBodyType ] );
+ pSoldier->bActionPoints = __min( pSoldier->bActionPoints, (gubMaxActionPoints[ pSoldier->ubBodyType ] + gGameExternalOptions.iPlayerAPBonus) );
}
}