mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
- Added options for delaying veteran militia training and mobile militia training. - Added cost modifiers to promoting green militia to regular and promoting regular to veteran.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@595 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -485,6 +485,8 @@ void LoadGameExternalOptions()
|
||||
//gGameExternalOptions.gfUseAutoSave = iniReader.ReadBoolean("JA2 Gameplay Settings","USE_AUTO_SAVE",FALSE);
|
||||
|
||||
// Militia settings
|
||||
gGameExternalOptions.guiAllowMilitiaGroupsDelay = iniReader.ReadInteger("JA2 Gameplay Settings","ALLOW_MILITIA_MOBILE_DELAY",1);
|
||||
gGameExternalOptions.guiTrainVeteranMilitiaDelay = iniReader.ReadInteger("JA2 Gameplay Settings","TRAIN_VETERAN_MILITIA_DELAY",1);
|
||||
gGameExternalOptions.gfTrainVeteranMilitia = iniReader.ReadBoolean("JA2 Gameplay Settings","TRAIN_VETERAN_MILITIA",FALSE);
|
||||
gGameExternalOptions.gfAllowMilitiaGroups = iniReader.ReadBoolean("JA2 Gameplay Settings","ALLOW_MILITIA_MOBILE_GROUPS",FALSE);
|
||||
gGameExternalOptions.gfmusttrainroaming = iniReader.ReadBoolean("JA2 Gameplay Settings","MUST_TRAIN_MOBILE_MILITIA",FALSE);
|
||||
@@ -502,6 +504,8 @@ void LoadGameExternalOptions()
|
||||
gGameExternalOptions.iTrainingSquadSize = iniReader.ReadInteger("JA2 Gameplay Settings","MAX_TRAINING_SQUAD_SIZE",10);
|
||||
gGameExternalOptions.iMilitiaTrainingCost = iniReader.ReadInteger("JA2 Gameplay Settings","MILITIA_TRAINING_COST",750);
|
||||
gGameExternalOptions.iMilitiaCostModifier = iniReader.ReadInteger("JA2 Gameplay Settings","MILITIA_COST_MODIFIER",3);
|
||||
gGameExternalOptions.iRegularCostModifier = iniReader.ReadInteger("JA2 Gameplay Settings","REGULAR_COST_MODIFIER",1);
|
||||
gGameExternalOptions.iVeteranCostModifier = iniReader.ReadInteger("JA2 Gameplay Settings","VETERAN_COST_MODIFIER",2);
|
||||
gGameExternalOptions.iMinLoyaltyToTrain = iniReader.ReadInteger("JA2 Gameplay Settings","MIN_LOYALTY_TO_TRAIN",20);
|
||||
|
||||
//Assignment Settings (training, repairing, doctoring, etc)
|
||||
|
||||
@@ -156,6 +156,8 @@ typedef struct
|
||||
INT32 iTrainingSquadSize;
|
||||
INT32 iMilitiaTrainingCost;
|
||||
INT32 iMilitiaCostModifier;
|
||||
INT32 iRegularCostModifier;
|
||||
INT32 iVeteranCostModifier;
|
||||
INT32 iMinLoyaltyToTrain;
|
||||
|
||||
INT32 iMaxEnemyGroupSize;
|
||||
@@ -221,6 +223,8 @@ typedef struct
|
||||
BOOLEAN gfAllowReinforcementsOnlyInCity;
|
||||
UINT32 guiBaseQueenPoolIncrement;
|
||||
|
||||
UINT32 guiAllowMilitiaGroupsDelay;
|
||||
UINT32 guiTrainVeteranMilitiaDelay;
|
||||
UINT32 guiCreateEachNHours;
|
||||
UINT32 guiDivOfOriginalMilitia;
|
||||
UINT32 guiMinMilitiaSquadSize;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
--------------------Configuration: TileEngine - Win32 Release--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP63.tmp" with contents
|
||||
Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSPD0.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\RSP63.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\RSP63.tmp"
|
||||
Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP64.tmp" with contents
|
||||
Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSPD0.tmp"
|
||||
Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSPD1.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\RSP64.tmp" with content
|
||||
.\Release\worldman.obj
|
||||
.\Release\XML_ExplosionData.obj
|
||||
]
|
||||
Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP64.tmp"
|
||||
Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSPD1.tmp"
|
||||
<h3>Output Window</h3>
|
||||
Compiling...
|
||||
Ambient Control.cpp
|
||||
@@ -132,7 +132,7 @@ Creating library...
|
||||
--------------------Configuration: Standard Gaming Platform - Win32 Release--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP65.tmp" with contents
|
||||
Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSPD2.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"
|
||||
@@ -172,14 +172,14 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP65.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\RSP65.tmp"
|
||||
Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP66.tmp" with contents
|
||||
Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSPD2.tmp"
|
||||
Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSPD3.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\RSP66.tmp"
|
||||
Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP67.tmp" with contents
|
||||
Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSPD3.tmp"
|
||||
Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSPD4.tmp" with contents
|
||||
[
|
||||
/nologo /out:".\Release\Standard Gaming Platform.lib"
|
||||
".\Release\Button Sound Control.obj"
|
||||
@@ -221,7 +221,7 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP67.tmp" with content
|
||||
".\Release\WinFont.obj"
|
||||
".\ddraw.lib"
|
||||
]
|
||||
Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP67.tmp"
|
||||
Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSPD4.tmp"
|
||||
<h3>Output Window</h3>
|
||||
Compiling...
|
||||
Button Sound Control.cpp
|
||||
@@ -275,7 +275,7 @@ Creating library...
|
||||
--------------------Configuration: Tactical - Win32 Release--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP68.tmp" with contents
|
||||
Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSPD5.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"
|
||||
@@ -372,14 +372,14 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP68.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\RSP68.tmp"
|
||||
Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP69.tmp" with contents
|
||||
Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSPD5.tmp"
|
||||
Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSPD6.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\RSP69.tmp"
|
||||
Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP6A.tmp" with contents
|
||||
Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSPD6.tmp"
|
||||
Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSPD7.tmp" with contents
|
||||
[
|
||||
/nologo /out:"Release\Tactical.lib"
|
||||
".\Release\Air Raid.obj"
|
||||
@@ -477,7 +477,7 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP6A.tmp" with content
|
||||
.\Release\XML_Sounds.obj
|
||||
.\Release\XML_TonyInventory.obj
|
||||
]
|
||||
Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP6A.tmp"
|
||||
Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSPD7.tmp"
|
||||
<h3>Output Window</h3>
|
||||
Compiling...
|
||||
Air Raid.cpp
|
||||
@@ -586,7 +586,7 @@ Creating library...
|
||||
--------------------Configuration: Utils - Win32 Release--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP6B.tmp" with contents
|
||||
Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSPD8.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"
|
||||
@@ -629,8 +629,8 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP6B.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\RSP6B.tmp"
|
||||
Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP6C.tmp" with contents
|
||||
Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSPD8.tmp"
|
||||
Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSPD9.tmp" with contents
|
||||
[
|
||||
/nologo /out:"Release\Utils.lib"
|
||||
.\Release\_DutchText.obj
|
||||
@@ -673,7 +673,7 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP6C.tmp" with content
|
||||
.\Release\XML_Strings.obj
|
||||
.\Release\XML_Strings2.obj
|
||||
]
|
||||
Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP6C.tmp"
|
||||
Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSPD9.tmp"
|
||||
<h3>Output Window</h3>
|
||||
Compiling...
|
||||
_DutchText.cpp
|
||||
@@ -732,7 +732,7 @@ Creating library...
|
||||
--------------------Configuration: TacticalAI - Win32 Release--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP6D.tmp" with contents
|
||||
Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSPDA.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"
|
||||
@@ -750,8 +750,8 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP6D.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\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\RSPDA.tmp"
|
||||
Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSPDB.tmp" with contents
|
||||
[
|
||||
/nologo /out:"Release\TacticalAI.lib"
|
||||
.\Release\AIList.obj
|
||||
@@ -769,7 +769,7 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP6E.tmp" with content
|
||||
.\Release\QuestDebug.obj
|
||||
.\Release\Realtime.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\RSPDB.tmp"
|
||||
<h3>Output Window</h3>
|
||||
Compiling...
|
||||
AIList.cpp
|
||||
@@ -792,7 +792,7 @@ Creating library...
|
||||
--------------------Configuration: Editor - Win32 Release--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP6F.tmp" with contents
|
||||
Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSPDC.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"
|
||||
@@ -820,8 +820,8 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP6F.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\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\RSPDC.tmp"
|
||||
Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSPDD.tmp" with contents
|
||||
[
|
||||
/nologo /out:"Release\Editor.lib"
|
||||
".\Release\Cursor Modes.obj"
|
||||
@@ -849,11 +849,10 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP70.tmp" with content
|
||||
.\Release\smooth.obj
|
||||
".\Release\Smoothing Utils.obj"
|
||||
]
|
||||
Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP70.tmp"
|
||||
Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSPDD.tmp"
|
||||
<h3>Output Window</h3>
|
||||
Compiling...
|
||||
Cursor Modes.cpp
|
||||
GENERATED PCH FOR EDITOR PROJECT.
|
||||
edit_sys.cpp
|
||||
Editor Callbacks.cpp
|
||||
Editor Modes.cpp
|
||||
@@ -882,7 +881,7 @@ Creating library...
|
||||
--------------------Configuration: Laptop - Win32 Release--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP71.tmp" with contents
|
||||
Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSPDE.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"
|
||||
@@ -943,8 +942,8 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP71.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\RSP71.tmp"
|
||||
Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP72.tmp" with contents
|
||||
Creating command line "cl.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSPDE.tmp"
|
||||
Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSPDF.tmp" with contents
|
||||
[
|
||||
/nologo /out:"Release\Laptop.lib"
|
||||
.\Release\aim.obj
|
||||
@@ -1005,7 +1004,7 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP72.tmp" with content
|
||||
.\Release\sirtech.obj
|
||||
".\Release\Store Inventory.obj"
|
||||
]
|
||||
Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP72.tmp"
|
||||
Creating command line "link.exe -lib @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSPDF.tmp"
|
||||
<h3>Output Window</h3>
|
||||
Compiling...
|
||||
aim.cpp
|
||||
@@ -1071,7 +1070,7 @@ Creating library...
|
||||
--------------------Configuration: Strategic - Win32 Release--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP73.tmp" with contents
|
||||
Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSPE0.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"
|
||||
@@ -1118,8 +1117,8 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP73.tmp" with content
|
||||
"C:\JA2\Build\Strategic\strategicmap.cpp"
|
||||
"C:\JA2\Build\Strategic\Town Militia.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\RSPE0.tmp"
|
||||
Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSPE1.tmp" with contents
|
||||
[
|
||||
/nologo /out:"Release\Strategic.lib"
|
||||
".\Release\AI Viewer.obj"
|
||||
@@ -1166,7 +1165,7 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP74.tmp" with content
|
||||
.\Release\strategicmap.obj
|
||||
".\Release\Town Militia.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\RSPE1.tmp"
|
||||
<h3>Output Window</h3>
|
||||
Compiling...
|
||||
AI Viewer.cpp
|
||||
@@ -1219,7 +1218,7 @@ Creating library...
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
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\RSP75.tmp" with contents
|
||||
Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSPE2.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"
|
||||
@@ -1246,8 +1245,8 @@ Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSP75.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\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\RSPE2.tmp"
|
||||
Creating temporary file "C:\DOCUME~1\Owner\LOCALS~1\Temp\RSPE3.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
|
||||
@@ -1284,7 +1283,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\RSP76.tmp"
|
||||
Creating command line "link.exe @C:\DOCUME~1\Owner\LOCALS~1\Temp\RSPE3.tmp"
|
||||
<h3>Output Window</h3>
|
||||
Compiling resources...
|
||||
Compiling...
|
||||
@@ -1307,7 +1306,6 @@ Init.cpp
|
||||
Intro.cpp
|
||||
JA2 Splash.cpp
|
||||
jascreens.cpp
|
||||
C:\JA2\Build\jascreens.cpp(269) : warning C4101: 'str' : unreferenced local variable
|
||||
Loading Screen.cpp
|
||||
MainMenuScreen.cpp
|
||||
MessageBoxScreen.cpp
|
||||
@@ -1322,7 +1320,7 @@ LINK : warning LNK4089: all references to "ADVAPI32.dll" discarded by /OPT:REF
|
||||
|
||||
|
||||
<h3>Results</h3>
|
||||
ja2_cvs.exe - 0 error(s), 2 warning(s)
|
||||
ja2_cvs.exe - 0 error(s), 1 warning(s)
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+23
-18
@@ -1100,7 +1100,9 @@ BOOLEAN BasicCanCharacterTrainMilitia( SOLDIERTYPE *pSoldier )
|
||||
BOOLEAN CanCharacterTrainMilitia( SOLDIERTYPE *pSoldier )
|
||||
{
|
||||
|
||||
if (gGameExternalOptions.gfmusttrainroaming)
|
||||
if (gGameExternalOptions.gfmusttrainroaming
|
||||
&& (GetWorldDay( ) >= gGameExternalOptions.guiAllowMilitiaGroupsDelay)
|
||||
&& (!IsThisSectorASAMSector(pSoldier->sSectorX,pSoldier->sSectorY,0 )))
|
||||
{
|
||||
if( BasicCanCharacterTrainMilitia( pSoldier ) &&
|
||||
MilitiaTrainingAllowedInSector( pSoldier->sSectorX, pSoldier->sSectorY, pSoldier->bSectorZ ) &&
|
||||
@@ -1120,7 +1122,7 @@ BOOLEAN CanCharacterTrainMilitia( SOLDIERTYPE *pSoldier )
|
||||
if( BasicCanCharacterTrainMilitia( pSoldier ) &&
|
||||
MilitiaTrainingAllowedInSector( pSoldier->sSectorX, pSoldier->sSectorY, pSoldier->bSectorZ ) &&
|
||||
DoesSectorMercIsInHaveSufficientLoyaltyToTrainMilitia( pSoldier ) &&
|
||||
( IsMilitiaTrainableFromSoldiersSectorMaxed( pSoldier ) == FALSE ) &&
|
||||
( IsMilitiaTrainableFromSoldiersSectorMaxed( pSoldier,ELITE_MILITIA ) == FALSE ) &&
|
||||
( CountMilitiaTrainersInSoldiersSector( pSoldier ) < gGameExternalOptions.ubMaxMilitiaTrainersPerSector ) )
|
||||
{
|
||||
return( TRUE );
|
||||
@@ -1211,7 +1213,7 @@ INT8 CountMilitiaTrainersInSoldiersSector( SOLDIERTYPE * pSoldier )
|
||||
|
||||
|
||||
|
||||
BOOLEAN IsMilitiaTrainableFromSoldiersSectorMaxed( SOLDIERTYPE *pSoldier )
|
||||
BOOLEAN IsMilitiaTrainableFromSoldiersSectorMaxed( SOLDIERTYPE *pSoldier, INT8 iMilitiaType )
|
||||
{
|
||||
INT8 bTownId = 0;
|
||||
BOOLEAN fSamSitePresent = FALSE;
|
||||
@@ -1232,18 +1234,17 @@ BOOLEAN IsMilitiaTrainableFromSoldiersSectorMaxed( SOLDIERTYPE *pSoldier )
|
||||
// if there is a sam site here
|
||||
if( fSamSitePresent )
|
||||
{
|
||||
if( IsSAMSiteFullOfMilitia( pSoldier->sSectorX, pSoldier->sSectorY ) )
|
||||
{
|
||||
return( TRUE );
|
||||
}
|
||||
return( FALSE );
|
||||
if( IsSAMSiteFullOfMilitia( pSoldier->sSectorX, pSoldier->sSectorY,iMilitiaType ) )
|
||||
{
|
||||
return( TRUE );
|
||||
}
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
// this considers *ALL* safe sectors of the town, not just the one soldier is in
|
||||
if( IsTownFullMilitia( bTownId ) )
|
||||
if( IsTownFullMilitia( bTownId, iMilitiaType ) )
|
||||
{
|
||||
// town is full of militia
|
||||
return( TRUE );
|
||||
@@ -7332,6 +7333,7 @@ void TrainingMenuBtnCallback( MOUSE_REGION * pRegion, INT32 iReason )
|
||||
INT8 bTownId;
|
||||
CHAR16 sString[ 128 ];
|
||||
CHAR16 sStringA[ 128 ];
|
||||
BOOLEAN fCanTrainMilitia = TRUE;
|
||||
|
||||
|
||||
pSoldier = GetSelectedAssignSoldier( FALSE );
|
||||
@@ -7396,10 +7398,18 @@ void TrainingMenuBtnCallback( MOUSE_REGION * pRegion, INT32 iReason )
|
||||
|
||||
|
||||
// Kaiden: Roaming Militia Training:
|
||||
// Added to the if test here:
|
||||
// && (!gGameExternalOptions.gfmusttrainroaming)
|
||||
if(IsMilitiaTrainableFromSoldiersSectorMaxed( pSoldier, ELITE_MILITIA ))
|
||||
if (!gGameExternalOptions.gfmusttrainroaming)
|
||||
fCanTrainMilitia = FALSE;
|
||||
else if (GetWorldDay( ) < gGameExternalOptions.guiAllowMilitiaGroupsDelay)
|
||||
fCanTrainMilitia = FALSE;
|
||||
else if (IsThisSectorASAMSector(pSoldier->sSectorX,pSoldier->sSectorY,0 ))
|
||||
fCanTrainMilitia = FALSE;
|
||||
else
|
||||
fCanTrainMilitia = TRUE;
|
||||
|
||||
if( IsMilitiaTrainableFromSoldiersSectorMaxed( pSoldier ) && (!gGameExternalOptions.gfmusttrainroaming))
|
||||
|
||||
if(!fCanTrainMilitia)
|
||||
{
|
||||
if( bTownId == BLANK_SECTOR )
|
||||
{
|
||||
@@ -7417,11 +7427,6 @@ void TrainingMenuBtnCallback( MOUSE_REGION * pRegion, INT32 iReason )
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if ( CountMilitiaTrainersInSoldiersSector( pSoldier ) >= gGameExternalOptions.ubMaxMilitiaTrainersPerSector )
|
||||
{
|
||||
swprintf( sString, gzLateLocalizedString[ 47 ], gGameExternalOptions.ubMaxMilitiaTrainersPerSector );
|
||||
|
||||
@@ -315,7 +315,7 @@ void ReEvaluateEveryonesNothingToDo();
|
||||
void SetAssignmentForList( INT8 bAssignment, INT8 bParam );
|
||||
|
||||
// is this area maxed out on militia?
|
||||
BOOLEAN IsMilitiaTrainableFromSoldiersSectorMaxed( SOLDIERTYPE *pSoldier );
|
||||
BOOLEAN IsMilitiaTrainableFromSoldiersSectorMaxed( SOLDIERTYPE *pSoldier, INT8 iMilitiaType );
|
||||
|
||||
// function where we actually set someone's assignment so we can trap certain situations
|
||||
void ChangeSoldiersAssignment( SOLDIERTYPE *pSoldier, INT8 bAssignment );
|
||||
|
||||
@@ -462,10 +462,16 @@ void UpdateMilitiaSquads(INT16 sMapX, INT16 sMapY )
|
||||
// Kaiden: Moved Create Militia code into CreateMilitiaSquads
|
||||
// Removed the code from here and added the procedure call
|
||||
// If it's time, and this is a city sector create a new group.
|
||||
// But only if we're not training our own.
|
||||
// But only if we're not training our own.
|
||||
|
||||
if( (!gGameExternalOptions.gfmusttrainroaming) && ( GetTownIdForSector( sMapX, sMapY ) != BLANK_SECTOR ) )
|
||||
{
|
||||
if( GetWorldHour() % gGameExternalOptions.guiCreateEachNHours )return;
|
||||
if (GetWorldDay( ) < gGameExternalOptions.guiAllowMilitiaGroupsDelay)
|
||||
return;
|
||||
|
||||
if( GetWorldHour() % gGameExternalOptions.guiCreateEachNHours )
|
||||
return;
|
||||
|
||||
CreateMilitiaSquads( sMapX, sMapY );
|
||||
}
|
||||
|
||||
@@ -545,7 +551,8 @@ void UpdateMilitiaSquads(INT16 sMapX, INT16 sMapY )
|
||||
// Kaiden: Roaming Militia Training:
|
||||
// If we're training roaming militia,
|
||||
// we'll get our squad from here:
|
||||
|
||||
// Don't need to check for delay, as this function won't be
|
||||
// called if there is a delay set.
|
||||
void CreateMilitiaSquads(INT16 sMapX, INT16 sMapY )
|
||||
{
|
||||
UINT16 pMoveDir[4][3];
|
||||
|
||||
+157
-46
@@ -35,6 +35,8 @@ UINT8 gubTownSectorServerIndex = 0;
|
||||
BOOLEAN gfYesNoPromptIsForContinue = FALSE; // this flag remembers whether we're starting new training, or continuing
|
||||
INT32 giTotalCostOfTraining = 0;
|
||||
BOOLEAN gfAreWeTrainingMobile = FALSE;
|
||||
BOOLEAN gfAreWePromotingGreen = FALSE;
|
||||
BOOLEAN gfAreWePromotingRegular = FALSE;
|
||||
|
||||
|
||||
//the completed list of sector soldiers for training militia
|
||||
@@ -108,7 +110,9 @@ void TownMilitiaTrainingCompleted( SOLDIERTYPE *pTrainer, INT16 sMapX, INT16 sMa
|
||||
// If we're not training roaming militia,
|
||||
// then we will handle everything as normal.
|
||||
|
||||
if( (IsMilitiaTrainableFromSoldiersSectorMaxed( pTrainer )) && (gGameExternalOptions.gfmusttrainroaming))
|
||||
if( (IsMilitiaTrainableFromSoldiersSectorMaxed( pTrainer, ELITE_MILITIA ))
|
||||
&& (gGameExternalOptions.gfmusttrainroaming)
|
||||
&&(GetWorldDay( ) >= gGameExternalOptions.guiAllowMilitiaGroupsDelay))
|
||||
{
|
||||
CreateMilitiaSquads(sMapX, sMapY );
|
||||
}
|
||||
@@ -182,7 +186,8 @@ void TownMilitiaTrainingCompleted( SOLDIERTYPE *pTrainer, INT16 sMapX, INT16 sMa
|
||||
// Kaiden: Veteran militia training
|
||||
// This is essentially copy/pasted from above
|
||||
// But the names have been changed to protect the innocent
|
||||
if ((!fFoundOne) && (gGameExternalOptions.gfTrainVeteranMilitia))
|
||||
if ((!fFoundOne) && (gGameExternalOptions.gfTrainVeteranMilitia)
|
||||
&& (GetWorldDay( ) >= gGameExternalOptions.guiTrainVeteranMilitiaDelay))
|
||||
{
|
||||
// are there any REGULAR militia men in the training sector itself?
|
||||
if (MilitiaInSectorOfRank(sMapX, sMapY, REGULAR_MILITIA) > 0)
|
||||
@@ -573,18 +578,35 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Militia2");
|
||||
// We want to charge more for Roaming
|
||||
|
||||
// get total cost
|
||||
if( IsMilitiaTrainableFromSoldiersSectorMaxed( pSoldier ) && (gGameExternalOptions.gfmusttrainroaming))
|
||||
if( IsMilitiaTrainableFromSoldiersSectorMaxed( pSoldier, ELITE_MILITIA )
|
||||
&& (gGameExternalOptions.gfmusttrainroaming)
|
||||
&& (GetWorldDay( ) >= gGameExternalOptions.guiAllowMilitiaGroupsDelay))
|
||||
{
|
||||
giTotalCostOfTraining = (iMilitiaTrainingCost*gGameExternalOptions.iMilitiaCostModifier) * iNumberOfSectors;
|
||||
Assert( giTotalCostOfTraining > 0 );
|
||||
gfAreWeTrainingMobile = TRUE;
|
||||
}
|
||||
else if (IsMilitiaTrainableFromSoldiersSectorMaxed( pSoldier, REGULAR_MILITIA )
|
||||
&& (gGameExternalOptions.gfTrainVeteranMilitia)
|
||||
&& (GetWorldDay( ) >= gGameExternalOptions.guiTrainVeteranMilitiaDelay))
|
||||
{
|
||||
giTotalCostOfTraining = (iMilitiaTrainingCost*gGameExternalOptions.iVeteranCostModifier) * iNumberOfSectors;
|
||||
Assert( giTotalCostOfTraining > 0 );
|
||||
gfAreWePromotingRegular = TRUE;
|
||||
}
|
||||
else if (IsMilitiaTrainableFromSoldiersSectorMaxed( pSoldier, GREEN_MILITIA ))
|
||||
{
|
||||
giTotalCostOfTraining = (iMilitiaTrainingCost*gGameExternalOptions.iRegularCostModifier) * iNumberOfSectors;
|
||||
Assert( giTotalCostOfTraining > 0 );
|
||||
gfAreWePromotingGreen = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
giTotalCostOfTraining = iMilitiaTrainingCost * iNumberOfSectors;
|
||||
Assert( giTotalCostOfTraining > 0 );
|
||||
}
|
||||
|
||||
|
||||
gfYesNoPromptIsForContinue = FALSE;
|
||||
|
||||
if( LaptopSaveInfo.iCurrentBalance < giTotalCostOfTraining )
|
||||
@@ -637,6 +659,7 @@ void HandleInterfaceMessageForContinuingTrainingMilitia( SOLDIERTYPE *pSoldier )
|
||||
INT16 sSectorX = 0, sSectorY = 0;
|
||||
CHAR16 sStringB[ 128 ];
|
||||
INT8 bTownId;
|
||||
BOOLEAN fIsFull = FALSE;
|
||||
|
||||
|
||||
INT32 iMinLoyaltyToTrain = gGameExternalOptions.iMinLoyaltyToTrain;
|
||||
@@ -667,9 +690,17 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Militia3");
|
||||
// if ( IsMilitiaTrainableFromSoldiersSectorMaxed( pSoldier ) )
|
||||
// And we're not training mobile militia from a SAM Site
|
||||
|
||||
if ((IsMilitiaTrainableFromSoldiersSectorMaxed( pSoldier ))
|
||||
&& ((!gGameExternalOptions.gfmusttrainroaming)
|
||||
|| (IsThisSectorASAMSector(sSectorX,sSectorY,0 ))) )
|
||||
if (IsMilitiaTrainableFromSoldiersSectorMaxed( pSoldier, ELITE_MILITIA ))
|
||||
if (!gGameExternalOptions.gfmusttrainroaming)
|
||||
fIsFull = TRUE;
|
||||
else if (GetWorldDay( ) < gGameExternalOptions.guiAllowMilitiaGroupsDelay)
|
||||
fIsFull = TRUE;
|
||||
else if (IsThisSectorASAMSector(sSectorX,sSectorY,0 ))
|
||||
fIsFull = TRUE;
|
||||
else
|
||||
fIsFull = FALSE;
|
||||
|
||||
if (fIsFull)
|
||||
{
|
||||
// we're full!!! go home!
|
||||
bTownId = GetTownIdForSector( sSectorX, sSectorY );
|
||||
@@ -688,47 +719,35 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Militia3");
|
||||
DoContinueMilitiaTrainingMessageBox( sSectorX, sSectorY, sString, MSG_BOX_FLAG_OK, CantTrainMilitiaOkBoxCallback );
|
||||
return;
|
||||
}
|
||||
/* else
|
||||
{
|
||||
if (( IsMilitiaTrainableFromSoldiersSectorMaxed( pSoldier )) && (!gGameExternalOptions.gfmusttrainroaming))
|
||||
{
|
||||
// we're full!!! go home!
|
||||
bTownId = GetTownIdForSector( sSectorX, sSectorY );
|
||||
if ( bTownId == BLANK_SECTOR )
|
||||
{
|
||||
// wilderness SAM site
|
||||
GetSectorIDString( sSectorX, sSectorY, 0, sStringB, TRUE );
|
||||
void (*tempFptr)(INT16 , INT16 , INT8 , CHAR16 *, BOOLEAN) = GetSectorIDString;
|
||||
swprintf( (wchar_t *)sString, (wchar_t *)pMilitiaConfirmStrings[ 10 ], sStringB, tempFptr, iMinLoyaltyToTrain );
|
||||
}
|
||||
else
|
||||
{
|
||||
// town
|
||||
swprintf( (wchar_t *)sString, (wchar_t *)pMilitiaConfirmStrings[ 10 ], pTownNames[ bTownId ], iMinLoyaltyToTrain );
|
||||
}
|
||||
DoContinueMilitiaTrainingMessageBox( sSectorX, sSectorY, sString, MSG_BOX_FLAG_OK, CantTrainMilitiaOkBoxCallback );
|
||||
return;
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Kaiden: Roaming Militia Training:
|
||||
// Charging more to train Roaming Militia
|
||||
if ( IsMilitiaTrainableFromSoldiersSectorMaxed( pSoldier ) && (gGameExternalOptions.gfmusttrainroaming))
|
||||
// Also Charging more for promotions over Training
|
||||
|
||||
if( IsMilitiaTrainableFromSoldiersSectorMaxed( pSoldier, ELITE_MILITIA )
|
||||
&& (gGameExternalOptions.gfmusttrainroaming)
|
||||
&&(GetWorldDay( ) >= gGameExternalOptions.guiAllowMilitiaGroupsDelay))
|
||||
{
|
||||
giTotalCostOfTraining = (iMilitiaTrainingCost*gGameExternalOptions.iMilitiaCostModifier);
|
||||
gfAreWeTrainingMobile = TRUE;
|
||||
}
|
||||
else if (IsMilitiaTrainableFromSoldiersSectorMaxed( pSoldier, REGULAR_MILITIA )
|
||||
&& (gGameExternalOptions.gfTrainVeteranMilitia)
|
||||
&& (GetWorldDay( ) >= gGameExternalOptions.guiTrainVeteranMilitiaDelay))
|
||||
{
|
||||
giTotalCostOfTraining = (iMilitiaTrainingCost*gGameExternalOptions.iVeteranCostModifier);
|
||||
gfAreWePromotingRegular = TRUE;
|
||||
}
|
||||
else if (IsMilitiaTrainableFromSoldiersSectorMaxed( pSoldier, GREEN_MILITIA ))
|
||||
{
|
||||
giTotalCostOfTraining = (iMilitiaTrainingCost*gGameExternalOptions.iRegularCostModifier);
|
||||
gfAreWePromotingGreen = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
// continue training always handles just one sector at a time
|
||||
giTotalCostOfTraining = iMilitiaTrainingCost;
|
||||
giTotalCostOfTraining = (iMilitiaTrainingCost);
|
||||
}
|
||||
|
||||
// can player afford to continue training?
|
||||
if( LaptopSaveInfo.iCurrentBalance < giTotalCostOfTraining )
|
||||
{
|
||||
@@ -889,15 +908,15 @@ BOOLEAN CanNearbyMilitiaScoutThisSector( INT16 sSectorX, INT16 sSectorY )
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
BOOLEAN IsTownFullMilitia( INT8 bTownId )
|
||||
BOOLEAN IsTownFullMilitia( INT8 bTownId, INT8 iMilitiaType )
|
||||
{
|
||||
INT32 iMaxMilitiaPerSector = gGameExternalOptions.iMaxMilitiaPerSector;
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Militia4");
|
||||
|
||||
INT32 iCounter = 0;
|
||||
INT16 sSectorX = 0, sSectorY = 0;
|
||||
INT32 iNumberOfMilitia = 0;
|
||||
INT32 iMaxNumber = 0;
|
||||
BOOLEAN fIncreaseCost = FALSE;
|
||||
|
||||
while( pTownNamesList[ iCounter ] != 0 )
|
||||
{
|
||||
@@ -910,15 +929,42 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Militia4");
|
||||
// if sector is ours get number of militia here
|
||||
if( SectorOursAndPeaceful( sSectorX, sSectorY, 0 ) )
|
||||
{
|
||||
|
||||
//Kaiden: Checking for Price Hikes.
|
||||
if (iMilitiaType == GREEN_MILITIA)
|
||||
{
|
||||
iNumberOfMilitia += MilitiaInSectorOfRank( sSectorX, sSectorY, GREEN_MILITIA );
|
||||
iNumberOfMilitia += MilitiaInSectorOfRank( sSectorX, sSectorY, REGULAR_MILITIA );
|
||||
iNumberOfMilitia += MilitiaInSectorOfRank( sSectorX, sSectorY, ELITE_MILITIA );
|
||||
iMaxNumber += iMaxMilitiaPerSector;
|
||||
|
||||
if (MilitiaInSectorOfRank( sSectorX, sSectorY, GREEN_MILITIA ) > 0)
|
||||
fIncreaseCost = TRUE;
|
||||
}
|
||||
else if (iMilitiaType == REGULAR_MILITIA)
|
||||
{
|
||||
iNumberOfMilitia += MilitiaInSectorOfRank( sSectorX, sSectorY, REGULAR_MILITIA );
|
||||
iNumberOfMilitia += MilitiaInSectorOfRank( sSectorX, sSectorY, ELITE_MILITIA );
|
||||
iMaxNumber += iMaxMilitiaPerSector;
|
||||
|
||||
if (MilitiaInSectorOfRank( sSectorX, sSectorY, REGULAR_MILITIA ) > 0)
|
||||
fIncreaseCost = TRUE;
|
||||
}
|
||||
|
||||
//Kaiden: OK So iMilitiaType should be ELITE_MILITIA
|
||||
// and we're just checking sectors for purposes
|
||||
// of training mobile militia or ending training
|
||||
|
||||
// don't count GREEN militia, they can be trained into regulars first
|
||||
// Kaiden: Veteran Militia Training:
|
||||
// And we don't count regulars either if we're training veterans
|
||||
if (gGameExternalOptions.gfTrainVeteranMilitia)
|
||||
if (gGameExternalOptions.gfTrainVeteranMilitia && (iMilitiaType == ELITE_MILITIA)
|
||||
&& (GetWorldDay( ) >= gGameExternalOptions.guiTrainVeteranMilitiaDelay))
|
||||
{
|
||||
iNumberOfMilitia += MilitiaInSectorOfRank( sSectorX, sSectorY, ELITE_MILITIA );
|
||||
iMaxNumber += iMaxMilitiaPerSector;
|
||||
}
|
||||
else
|
||||
else if (iMilitiaType == ELITE_MILITIA)
|
||||
{
|
||||
iNumberOfMilitia += MilitiaInSectorOfRank( sSectorX, sSectorY, REGULAR_MILITIA );
|
||||
iNumberOfMilitia += MilitiaInSectorOfRank( sSectorX, sSectorY, ELITE_MILITIA );
|
||||
@@ -930,6 +976,24 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Militia4");
|
||||
iCounter++;
|
||||
}
|
||||
|
||||
if (iMilitiaType == GREEN_MILITIA)
|
||||
{
|
||||
if (( iNumberOfMilitia == iMaxNumber ) && (fIncreaseCost))
|
||||
return( TRUE );
|
||||
else
|
||||
return( FALSE );
|
||||
|
||||
}
|
||||
else if (iMilitiaType == REGULAR_MILITIA)
|
||||
{
|
||||
if (( iNumberOfMilitia == iMaxNumber ) && (fIncreaseCost))
|
||||
return( TRUE );
|
||||
else
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
|
||||
|
||||
// now check the number of militia
|
||||
if ( iMaxNumber > iNumberOfMilitia )
|
||||
{
|
||||
@@ -939,7 +1003,7 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Militia4");
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
BOOLEAN IsSAMSiteFullOfMilitia( INT16 sSectorX, INT16 sSectorY )
|
||||
BOOLEAN IsSAMSiteFullOfMilitia( INT16 sSectorX, INT16 sSectorY, INT8 iMilitiaType )
|
||||
{
|
||||
BOOLEAN fSamSitePresent = FALSE;
|
||||
INT32 iNumberOfMilitia = 0;
|
||||
@@ -956,16 +1020,47 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Militia5");
|
||||
|
||||
if( SectorOursAndPeaceful( sSectorX, sSectorY, 0 ) )
|
||||
{
|
||||
|
||||
//Kaiden: If we're checking for specific Militia for Price Hikes:
|
||||
if (iMilitiaType == GREEN_MILITIA)
|
||||
{
|
||||
iNumberOfMilitia += MilitiaInSectorOfRank( sSectorX, sSectorY, GREEN_MILITIA );
|
||||
iNumberOfMilitia += MilitiaInSectorOfRank( sSectorX, sSectorY, REGULAR_MILITIA );
|
||||
iNumberOfMilitia += MilitiaInSectorOfRank( sSectorX, sSectorY, ELITE_MILITIA );
|
||||
|
||||
if (( iNumberOfMilitia == iMaxMilitiaPerSector) &&
|
||||
(MilitiaInSectorOfRank( sSectorX, sSectorY, GREEN_MILITIA ) > 0))
|
||||
return( TRUE );
|
||||
else
|
||||
return( FALSE );
|
||||
|
||||
}
|
||||
else if (iMilitiaType == REGULAR_MILITIA)
|
||||
{
|
||||
iNumberOfMilitia += MilitiaInSectorOfRank( sSectorX, sSectorY, REGULAR_MILITIA );
|
||||
iNumberOfMilitia += MilitiaInSectorOfRank( sSectorX, sSectorY, ELITE_MILITIA );
|
||||
|
||||
if (( iNumberOfMilitia == iMaxMilitiaPerSector) &&
|
||||
(MilitiaInSectorOfRank( sSectorX, sSectorY, REGULAR_MILITIA ) > 0))
|
||||
return( TRUE );
|
||||
else
|
||||
return( FALSE );
|
||||
}
|
||||
// Kaiden: Ok we're not checking for militia promotions now,
|
||||
// so MilitiaType should be ELITE_MILITIA for purposes
|
||||
// of training Roaming or not.
|
||||
|
||||
// don't count GREEN militia, they can be trained into regulars first
|
||||
|
||||
// Kaiden: Veteran Militia Training:
|
||||
// And we don't count regulars either if we're training veterans
|
||||
if (gGameExternalOptions.gfTrainVeteranMilitia)
|
||||
if (gGameExternalOptions.gfTrainVeteranMilitia && (iMilitiaType == ELITE_MILITIA)
|
||||
&& (GetWorldDay( ) >= gGameExternalOptions.guiTrainVeteranMilitiaDelay))
|
||||
{
|
||||
iNumberOfMilitia += MilitiaInSectorOfRank( sSectorX, sSectorY, ELITE_MILITIA );
|
||||
iMaxNumber += iMaxMilitiaPerSector;
|
||||
}
|
||||
else
|
||||
else if (iMilitiaType == ELITE_MILITIA)
|
||||
{
|
||||
iNumberOfMilitia += MilitiaInSectorOfRank( sSectorX, sSectorY, REGULAR_MILITIA );
|
||||
iNumberOfMilitia += MilitiaInSectorOfRank( sSectorX, sSectorY, ELITE_MILITIA );
|
||||
@@ -1250,19 +1345,35 @@ void PayForTrainingInSector( UINT8 ubSector )
|
||||
INT32 iMilitiaTrainingCost = gGameExternalOptions.iMilitiaTrainingCost;
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Militia6");
|
||||
Assert( SectorInfo[ ubSector ].fMilitiaTrainingPaid == FALSE );
|
||||
INT32 CostMultiplyer = 0;
|
||||
|
||||
// spend the money
|
||||
// Kaiden: Roaming Militia Training:
|
||||
// Charging more to train Roaming Militia
|
||||
// Or for promotions.
|
||||
|
||||
if ( gfAreWeTrainingMobile)
|
||||
{
|
||||
AddTransactionToPlayersBook( TRAIN_TOWN_MILITIA, ubSector, GetWorldTotalMin(), -( iMilitiaTrainingCost*gGameExternalOptions.iMilitiaCostModifier ) );
|
||||
CostMultiplyer = gGameExternalOptions.iMilitiaCostModifier;
|
||||
gfAreWeTrainingMobile = FALSE;
|
||||
}
|
||||
else if ( gfAreWePromotingGreen)
|
||||
{
|
||||
CostMultiplyer = gGameExternalOptions.iRegularCostModifier;
|
||||
gfAreWePromotingGreen = FALSE;
|
||||
}
|
||||
else if ( gfAreWePromotingRegular)
|
||||
{
|
||||
CostMultiplyer = gGameExternalOptions.iVeteranCostModifier;
|
||||
gfAreWePromotingRegular = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
AddTransactionToPlayersBook( TRAIN_TOWN_MILITIA, ubSector, GetWorldTotalMin(), -( iMilitiaTrainingCost ) );
|
||||
CostMultiplyer = 1;
|
||||
}
|
||||
|
||||
AddTransactionToPlayersBook( TRAIN_TOWN_MILITIA, ubSector, GetWorldTotalMin(), -( iMilitiaTrainingCost*CostMultiplyer ) );
|
||||
|
||||
// mark this sector sectors as being paid up
|
||||
SectorInfo[ ubSector ].fMilitiaTrainingPaid = TRUE;
|
||||
|
||||
|
||||
@@ -61,9 +61,9 @@ void HandleMilitiaStatusInCurrentMapBeforeLoadingNewMap( void );
|
||||
BOOLEAN CanNearbyMilitiaScoutThisSector( INT16 sSectorX, INT16 sSectorY );
|
||||
|
||||
// is the town militia full?
|
||||
BOOLEAN IsTownFullMilitia( INT8 bTownId );
|
||||
BOOLEAN IsTownFullMilitia( INT8 bTownId, INT8 iMilitiaType );
|
||||
// is the SAM site full of militia?
|
||||
BOOLEAN IsSAMSiteFullOfMilitia( INT16 sSectorX, INT16 sSectorY );
|
||||
BOOLEAN IsSAMSiteFullOfMilitia( INT16 sSectorX, INT16 sSectorY, INT8 iMilitiaType );
|
||||
|
||||
|
||||
// now that town training is complete, handle the continue boxes
|
||||
|
||||
+2
-2
@@ -4,13 +4,13 @@
|
||||
#include "Language Defines.h"
|
||||
|
||||
// Beta version
|
||||
#define JA2BETAVERSION
|
||||
//#define JA2BETAVERSION
|
||||
|
||||
// Normal test version
|
||||
// #define JA2TESTVERSION
|
||||
|
||||
// If we want to include the editor
|
||||
#define JA2EDITOR
|
||||
//#define JA2EDITOR
|
||||
|
||||
#ifdef _DEBUG
|
||||
#ifndef JA2TESTVERSION
|
||||
|
||||
+2
-2
@@ -286,7 +286,7 @@ UINT32 ErrorScreenHandle(void)
|
||||
mprintf( 50, 255, L"%S", gubErrorText );
|
||||
SetFontForeground( FONT_LTRED );
|
||||
|
||||
/*
|
||||
|
||||
#ifdef JA2BETAVERSION
|
||||
|
||||
if( gubAssertString[0] )
|
||||
@@ -295,7 +295,7 @@ UINT32 ErrorScreenHandle(void)
|
||||
DisplayWrappedString( 50, 270, 560, 2, FONT12ARIAL, FONT_RED, str, FONT_BLACK, TRUE, LEFT_JUSTIFIED );
|
||||
}
|
||||
#endif
|
||||
*/
|
||||
|
||||
if ( !fFirstTime )
|
||||
{
|
||||
DebugMsg(TOPIC_JA2, DBG_LEVEL_0, String( "Runtime Error: %s ", gubErrorText ) );
|
||||
|
||||
Reference in New Issue
Block a user