mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
**********************************************************
** Big Maps Projects code (incl. Multiplayer v1.5 ** ********************************************************** - Merged Big Maps Project code from BMP+MP trunk (Revision: 3340) o Complete SVN Revision history: https://81.169.133.124/source/ja2/branches/Wanne/JA2%201.13%20MP - Before THIS merge, I made a branch of the existing 1.13 source o SVN Branch: https://81.169.133.124/source/ja2/branches/JA2_rev.3336/src - Removed old VS 6.0 and VS 2003 project and solutions files, because compilation is broken long time ago - I will add VS 2010 projects and solution file in the next few days git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@3341 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1,172 +0,0 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="Console"
|
||||
ProjectGUID="{286FCC0E-C6E1-4E29-8642-588D7358966F}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory=".\Debug"
|
||||
IntermediateDirectory=".\Debug"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="0">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=".\;..\;..\Multiplayer;"..\Standard Gaming Platform";..\TileEngine;..\Tactical;..\Utils;..\TacticalAI;..\Editor;..\lua;..\Strategic;..\Res"
|
||||
PreprocessorDefinitions="PRECOMPILEDHEADERS;_DEBUG;WIN32;_WINDOWS;JA2;_VTUNE_PROFILING;XML_STATIC;CINTERFACE"
|
||||
MinimalRebuild="FALSE"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile=".\Debug/Console.pch"
|
||||
AssemblerListingLocation=".\Debug/"
|
||||
ObjectFile=".\Debug/"
|
||||
ProgramDataBaseFileName=".\Debug/"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="1"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
AdditionalDependencies="comctl32.lib"
|
||||
OutputFile=".\Debug\Console.lib"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory=".\Release"
|
||||
IntermediateDirectory=".\Release"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="0">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
GlobalOptimizations="TRUE"
|
||||
InlineFunctionExpansion="1"
|
||||
EnableIntrinsicFunctions="TRUE"
|
||||
FavorSizeOrSpeed="1"
|
||||
OptimizeForProcessor="3"
|
||||
OptimizeForWindowsApplication="TRUE"
|
||||
AdditionalIncludeDirectories="..\Multiplayer;.\;..\;"..\Standard Gaming Platform";..\TileEngine;..\Tactical;..\Utils;..\TacticalAI;..\Editor;..\Strategic;..\Console;..\Res"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile=".\Release/Console.pch"
|
||||
AssemblerListingLocation=".\Release/"
|
||||
ObjectFile=".\Release/"
|
||||
ProgramDataBaseFileName=".\Release/"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="0"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
AdditionalDependencies="comctl32.lib"
|
||||
OutputFile=".\Release\Console.lib"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath=".\Console.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Cursors.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Dialogs.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\FileStream.cpp">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
||||
<File
|
||||
RelativePath=".\ComBSTROut.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ComVariantOut.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Console.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Cursors.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Dialogs.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\FileStream.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
|
||||
<File
|
||||
RelativePath=".\console.ico">
|
||||
</File>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath=".\ReadMe.txt">
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Version="8,00"
|
||||
Name="Console_2005Express"
|
||||
ProjectGUID="{F962CFA1-2215-4124-938F-253973A27591}"
|
||||
RootNamespace="Console"
|
||||
@@ -356,6 +356,92 @@
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release_WithDebugInfo|Win32"
|
||||
OutputDirectory="$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops;..\ja2_2005Express.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="0"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Release/Console.tlb"
|
||||
HeaderFileName=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/D "_CRT_SECURE_NO_DEPRECATE""
|
||||
Optimization="0"
|
||||
InlineFunctionExpansion="0"
|
||||
AdditionalIncludeDirectories=""c:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\src\mfc";..\Multiplayer"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="true"
|
||||
RuntimeTypeInfo="false"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
PrecompiledHeaderFile=".\Release/Console.pch"
|
||||
AssemblerListingLocation=".\Release/"
|
||||
ObjectFile=".\Release/"
|
||||
ProgramDataBaseFileName=".\Release/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1050"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
AdditionalDependencies="comctl32.lib"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
SuppressStartupBanner="true"
|
||||
OutputFile=".\Release/Console.bsc"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine=""
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
@@ -401,6 +487,14 @@
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release_WithDebugInfo|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="Cursors.cpp"
|
||||
@@ -439,6 +533,14 @@
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release_WithDebugInfo|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="Dialogs.cpp"
|
||||
@@ -477,6 +579,14 @@
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release_WithDebugInfo|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="FileStream.cpp"
|
||||
@@ -515,6 +625,14 @@
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release_WithDebugInfo|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
|
||||
@@ -272,6 +272,71 @@
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release_WithDebugInfo|Win32"
|
||||
OutputDirectory="..\lib\VS2008\$(ConfigurationName)"
|
||||
IntermediateDirectory="..\build\VS2008\$(ProjectName)_$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="..\ja2_VS2008.vsprops"
|
||||
CharacterSet="0"
|
||||
WholeProgramOptimization="0"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
EnableIntrinsicFunctions="true"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="false"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
AdditionalDependencies="comctl32.lib"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
|
||||
@@ -102,6 +102,8 @@ enum
|
||||
OPTIONS_SAVE_MAP,
|
||||
OPTIONS_CHANGE_TILESET,
|
||||
OPTIONS_LEAVE_EDITOR,
|
||||
OPTIONS_RADAR_MAP,//dnl ch9 071009
|
||||
OPTIONS_VANILLA_MODE,//dnl ch33 160909
|
||||
OPTIONS_QUIT_GAME, LAST_OPTIONS_BUTTON = OPTIONS_QUIT_GAME,
|
||||
//Mercs menu
|
||||
MERCS_PLAYER, FIRST_MERCS_BUTTON = MERCS_PLAYER,
|
||||
|
||||
+10
-7
@@ -34,7 +34,7 @@ UINT16 gusSavedSelectionType = SMALLSELECTION;
|
||||
UINT16 gusSavedBuildingSelectionType = AREASELECTION;
|
||||
extern INT16 sGridX; // symbol already declared globally in editscreen.cpp (jonathanl)
|
||||
extern INT16 sGridY; // symbol already declared globally in editscreen.cpp (jonathanl)
|
||||
INT16 sBadMarker = -1;
|
||||
INT32 sBadMarker = -1;
|
||||
|
||||
STR16 wszSelType[6]= { L"Small", L"Medium", L"Large", L"XLarge", L"Width: xx", L"Area" };
|
||||
|
||||
@@ -90,6 +90,8 @@ void DecreaseSelectionDensity()
|
||||
|
||||
void RemoveCursors()
|
||||
{
|
||||
if((gSelectRegion.iRight + gSelectRegion.iBottom * WORLD_COLS) >= WORLD_MAX)//dnl ch43 280909 Prevent CTD when world size is changed
|
||||
return;
|
||||
INT32 x, y, iMapIndex;
|
||||
if( gpBuildingLayoutList )
|
||||
{
|
||||
@@ -203,12 +205,12 @@ void UpdateCursorAreas()
|
||||
if( gfRoofPlacement && FlatRoofAboveGridNo( iMapIndex ) )
|
||||
{
|
||||
AddTopmostToTail( iMapIndex + ROOF_OFFSET, BADMARKER1 );
|
||||
sBadMarker = (INT16)(iMapIndex + ROOF_OFFSET );
|
||||
sBadMarker = iMapIndex + ROOF_OFFSET ;
|
||||
}
|
||||
else
|
||||
{
|
||||
AddTopmostToTail( (iMapIndex), BADMARKER1 );
|
||||
sBadMarker = (INT16)(iMapIndex);
|
||||
sBadMarker = iMapIndex;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -338,12 +340,13 @@ BOOLEAN HandleAreaSelection()
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//dnl ch43 280909
|
||||
void ValidateSelectionRegionBoundaries()
|
||||
{
|
||||
gSelectRegion.iLeft = max( min( 159, gSelectRegion.iLeft ) , 0 );
|
||||
gSelectRegion.iRight = max( min( 159, gSelectRegion.iRight ), 0 );
|
||||
gSelectRegion.iTop = max( min( 159, gSelectRegion.iTop ) , 0 );
|
||||
gSelectRegion.iBottom = max( min( 159, gSelectRegion.iBottom ), 0 );
|
||||
gSelectRegion.iLeft = max(min(WORLD_COLS-1, gSelectRegion.iLeft), 0);
|
||||
gSelectRegion.iRight = max(min(WORLD_COLS-1, gSelectRegion.iRight), 0);
|
||||
gSelectRegion.iTop = max(min(WORLD_ROWS-1, gSelectRegion.iTop), 0);
|
||||
gSelectRegion.iBottom = max(min(WORLD_ROWS-1, gSelectRegion.iBottom), 0);
|
||||
}
|
||||
|
||||
void EnsureSelectionType()
|
||||
|
||||
@@ -16,6 +16,8 @@ void BtnLoadCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
void BtnSaveCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
void BtnCancelCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
void BtnQuitCallback( GUI_BUTTON *btn, INT32 reason );
|
||||
void BtnRadarMapCallback( GUI_BUTTON *btn, INT32 reason );//dnl ch9 071009
|
||||
void VanillaModeCallback(GUI_BUTTON *btn, INT32 reason);//dnl ch33 160909
|
||||
void BtnNewMapCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
void BtnNewBasementCallback( GUI_BUTTON *btn, INT32 reason );
|
||||
void BtnNewCavesCallback( GUI_BUTTON *btn, INT32 reason );
|
||||
|
||||
@@ -532,7 +532,7 @@ void MapInfoEntryPointsCallback( GUI_BUTTON *btn, INT32 reason )
|
||||
{
|
||||
if( reason & (MSYS_CALLBACK_REASON_LBUTTON_UP | MSYS_CALLBACK_REASON_RBUTTON_UP) )
|
||||
{
|
||||
INT16 x, sGridNo;
|
||||
INT32 x, sGridNo;
|
||||
for( x = MAPINFO_NORTH_POINT; x <= MAPINFO_ISOLATED_POINT; x++ )
|
||||
{
|
||||
if( btn == ButtonList[ iEditorButton[ x ] ] )
|
||||
@@ -669,6 +669,20 @@ void BtnQuitCallback( GUI_BUTTON *btn, INT32 reason )
|
||||
}
|
||||
}
|
||||
|
||||
void BtnRadarMapCallback( GUI_BUTTON *btn, INT32 reason )//dnl ch9 071009
|
||||
{
|
||||
if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
iEditorToolbarState = TBAR_MODE_RADAR_MAP;
|
||||
}
|
||||
}
|
||||
|
||||
void VanillaModeCallback(GUI_BUTTON *btn, INT32 reason)//dnl ch33 160909
|
||||
{
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
||||
(btn->uiFlags & BUTTON_CLICKED_ON) ? (gfVanillaMode = TRUE) : (gfVanillaMode = FALSE);
|
||||
}
|
||||
|
||||
//ITEMS
|
||||
void MouseMovedInItemsRegion( MOUSE_REGION *reg, INT32 reason )
|
||||
{
|
||||
|
||||
@@ -256,7 +256,7 @@ void SetEditorTerrainTaskbarMode( UINT16 usNewMode )
|
||||
|
||||
void ShowExitGrids()
|
||||
{
|
||||
UINT16 i;
|
||||
INT32 i;
|
||||
LEVELNODE *pLevelNode;
|
||||
if( gfShowExitGrids )
|
||||
return;
|
||||
@@ -272,7 +272,7 @@ void ShowExitGrids()
|
||||
|
||||
void HideExitGrids()
|
||||
{
|
||||
UINT16 i;
|
||||
INT32 i;
|
||||
LEVELNODE *pLevelNode;
|
||||
if( !gfShowExitGrids )
|
||||
return;
|
||||
|
||||
@@ -699,6 +699,16 @@ void InitEditorOptionsToolbar()
|
||||
iEditorButton[OPTIONS_QUIT_GAME] =
|
||||
CreateEasyNoToggleButton( iScreenWidthOffset + 281,SCREEN_HEIGHT - 79,"EDITOR//cancel.sti", BtnQuitCallback);
|
||||
SetButtonFastHelpText(iEditorButton[OPTIONS_QUIT_GAME],L"Exit game.");
|
||||
|
||||
//dnl ch9 071009
|
||||
iEditorButton[OPTIONS_RADAR_MAP] =
|
||||
CreateEasyNoToggleButton( iScreenWidthOffset + 311,SCREEN_HEIGHT - 79,"EDITOR//tileset.sti", BtnRadarMapCallback);
|
||||
SetButtonFastHelpText(iEditorButton[OPTIONS_RADAR_MAP],L"Create radar map");
|
||||
|
||||
//dnl ch33 160909
|
||||
iEditorButton[OPTIONS_VANILLA_MODE] =
|
||||
CreateCheckBoxButton(iScreenWidthOffset+71, SCREEN_HEIGHT-119, "EDITOR//smcheckbox.sti", MSYS_PRIORITY_NORMAL, VanillaModeCallback);
|
||||
SetButtonFastHelpText(iEditorButton[OPTIONS_VANILLA_MODE],L"Set save map as v1.12");
|
||||
}
|
||||
|
||||
void InitEditorTerrainToolbar()
|
||||
|
||||
@@ -45,11 +45,13 @@
|
||||
#include "Soldier Find.h"
|
||||
#include "lighting.h"
|
||||
#include "Keys.h"
|
||||
|
||||
#include "InterfaceItemImages.h"
|
||||
#endif
|
||||
|
||||
void RenderEditorInfo();
|
||||
|
||||
extern ITEM_POOL *gpItemPool;
|
||||
//extern ITEM_POOL *gpItemPool;//dnl ch26 210909
|
||||
|
||||
//editor icon storage vars
|
||||
INT32 giEditMercDirectionIcons[2];
|
||||
@@ -324,6 +326,7 @@ void DoTaskbar(void)
|
||||
break;
|
||||
case TASK_OPTIONS:
|
||||
UnclickEditorButton( TAB_OPTIONS );
|
||||
KillTextInputMode();
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -392,8 +395,12 @@ void DoTaskbar(void)
|
||||
SetupTextInputForMapInfo();
|
||||
break;
|
||||
case TASK_OPTIONS:
|
||||
iDrawMode = DRAW_MODE_NOTHING;//dnl ch22 210909
|
||||
ClickEditorButton( TAB_OPTIONS );
|
||||
TerrainTileDrawMode = TERRAIN_TILES_NODRAW;
|
||||
if(gfVanillaMode)//dnl ch33 160909
|
||||
ClickEditorButton(OPTIONS_VANILLA_MODE);
|
||||
SetupTextInputForOptions();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -609,7 +616,7 @@ void EnableEditorButtons( INT32 iFirstEditorButtonID, INT32 iLastEditorButtonID
|
||||
|
||||
void RenderMapEntryPointsAndLights()
|
||||
{
|
||||
INT16 sGridNo;
|
||||
INT32 sGridNo;
|
||||
INT16 sScreenX, sScreenY;
|
||||
INT32 i;
|
||||
if( gfSummaryWindowActive )
|
||||
@@ -767,7 +774,11 @@ void RenderDoorLockInfo()
|
||||
case SUPER_ELECTRIC:
|
||||
swprintf( str, L"Super Electric Trap" );
|
||||
break;
|
||||
|
||||
// WANNE: Fix a vanilla glitch in the editor: The text for the brothel siren trap was missing.
|
||||
// Fixed by Tron (Stracciatella): Revision: 6253
|
||||
case BROTHEL_SIREN:
|
||||
swprintf( str, L"Brothel Siren Trap" );
|
||||
break;
|
||||
}
|
||||
xp = sScreenX + 20 - StringPixLength( str, FONT10ARIAL ) / 2;
|
||||
yp = sScreenY;
|
||||
@@ -798,15 +809,16 @@ void RenderSelectedItemBlownUp()
|
||||
uiVideoObjectIndex = GetInterfaceGraphicForItem( &Item[ gpItem->usItem ] );
|
||||
GetVideoObject( &hVObject, uiVideoObjectIndex );
|
||||
|
||||
sWidth = hVObject->pETRLEObject[ Item[ gpItem->usItem ].ubGraphicNum ].usWidth;
|
||||
sOffsetX = hVObject->pETRLEObject[ Item[ gpItem->usItem ].ubGraphicNum ].sOffsetX;
|
||||
UINT16 usGraphicNum = g_bUsePngItemImages ? 0 : Item[ gpItem->usItem ].ubGraphicNum;
|
||||
sWidth = hVObject->pETRLEObject[ usGraphicNum ].usWidth;
|
||||
sOffsetX = hVObject->pETRLEObject[ usGraphicNum ].sOffsetX;
|
||||
xp = sScreenX + (40 - sWidth - sOffsetX*2) / 2;
|
||||
|
||||
sHeight = hVObject->pETRLEObject[ Item[ gpItem->usItem ].ubGraphicNum ].usHeight;
|
||||
sOffsetY = hVObject->pETRLEObject[ Item[ gpItem->usItem ].ubGraphicNum ].sOffsetY;
|
||||
sHeight = hVObject->pETRLEObject[ usGraphicNum ].usHeight;
|
||||
sOffsetY = hVObject->pETRLEObject[ usGraphicNum ].sOffsetY;
|
||||
yp = sScreenY + (20 - sHeight - sOffsetY*2) / 2;
|
||||
|
||||
BltVideoObjectOutlineFromIndex( FRAME_BUFFER, uiVideoObjectIndex, Item[ gpItem->usItem ].ubGraphicNum, xp, yp, Get16BPPColor(FROMRGB(0, 140, 170)), TRUE );
|
||||
BltVideoObjectOutlineFromIndex( FRAME_BUFFER, uiVideoObjectIndex, usGraphicNum, xp, yp, Get16BPPColor(FROMRGB(0, 140, 170)), TRUE );
|
||||
|
||||
//Display the item name above it
|
||||
SetFont( FONT10ARIAL );
|
||||
@@ -871,27 +883,36 @@ void RenderEditorInfo( )
|
||||
{
|
||||
CHAR16 FPSText[ 50 ];
|
||||
static INT32 iSpewWarning = 0;
|
||||
INT16 iMapIndex;
|
||||
INT32 iMapIndexD;
|
||||
|
||||
SetFont( FONT12POINT1 );
|
||||
SetFontForeground( FONT_BLACK );
|
||||
SetFontBackground( FONT_BLACK );
|
||||
//dnl ch52 091009
|
||||
SetFont(FONT12ARIAL);
|
||||
SetFontShadow(NO_SHADOW);
|
||||
SetFontForeground(FONT_BLACK);
|
||||
SetFontBackground(FONT_BLACK);
|
||||
|
||||
//Display the mapindex position
|
||||
if( GetMouseMapPos( &iMapIndex ) )
|
||||
swprintf( FPSText, L" (%d) ", iMapIndex );
|
||||
//dnl ch1 101009 Display the mapindex position
|
||||
if(GetMouseMapPos(&iMapIndexD))
|
||||
{
|
||||
INT16 sGridX, sGridY;
|
||||
GetMouseXY(&sGridX, &sGridY);
|
||||
swprintf(FPSText, L"%4d %4d %6d", sGridX, sGridY, iMapIndexD);
|
||||
}
|
||||
else
|
||||
swprintf( FPSText, L" " );
|
||||
swprintf(FPSText, L" ");
|
||||
|
||||
mprintfEditor( (UINT16)(iScreenWidthOffset + 50-StringPixLength( FPSText, FONT12POINT1 )/2), 2 * iScreenHeightOffset + 463, FPSText );
|
||||
|
||||
switch( iCurrentTaskbar )
|
||||
{
|
||||
case TASK_OPTIONS:
|
||||
mprintf(iScreenWidthOffset+71+15, SCREEN_HEIGHT-117, L"v1.12");//dnl ch33 160909
|
||||
if( !gfWorldLoaded || giCurrentTilesetID < 0 )
|
||||
mprintf( iScreenWidthOffset + 260, 2 * iScreenHeightOffset + 445, L"No map currently loaded." );
|
||||
else
|
||||
mprintf( iScreenWidthOffset + 260, 2 * iScreenHeightOffset + 445, L"File: %S, Current Tileset: %s",
|
||||
gubFilename, gTilesets[ giCurrentTilesetID ].zName );
|
||||
UpdateOptions();
|
||||
break;
|
||||
case TASK_TERRAIN:
|
||||
|
||||
@@ -941,6 +962,15 @@ void ProcessEditorRendering()
|
||||
BOOLEAN fSaveBuffer = FALSE;
|
||||
if( gfRenderTaskbar ) //do a full taskbar render.
|
||||
{
|
||||
if(iCurrentTaskbar == TASK_OPTIONS && !gfSummaryWindowActive)//dnl ch52 091009
|
||||
{
|
||||
CHAR8 szNewText[4+1];
|
||||
sprintf(szNewText, "%d", iNewMapWorldRows=WORLD_ROWS);
|
||||
SetInputFieldStringWith8BitString(1, szNewText);
|
||||
sprintf(szNewText, "%d", iNewMapWorldCols=WORLD_COLS);
|
||||
SetInputFieldStringWith8BitString(2, szNewText);
|
||||
DisableTextField(2);
|
||||
}
|
||||
ClearTaskbarRegion( 0, SCREEN_HEIGHT - 120, SCREEN_WIDTH, SCREEN_HEIGHT );
|
||||
RenderTerrainTileButtons();
|
||||
MarkButtonsDirty();
|
||||
@@ -952,7 +982,7 @@ void ProcessEditorRendering()
|
||||
}
|
||||
if( gfRenderDrawingMode )
|
||||
{
|
||||
if( iCurrentTaskbar == TASK_BUILDINGS || iCurrentTaskbar == TASK_TERRAIN || iCurrentTaskbar == TASK_ITEMS )
|
||||
if( iCurrentTaskbar == TASK_BUILDINGS || iCurrentTaskbar == TASK_TERRAIN || iCurrentTaskbar == TASK_ITEMS )
|
||||
{
|
||||
ShowCurrentDrawingMode();
|
||||
gfRenderDrawingMode = FALSE;
|
||||
|
||||
+20
-20
@@ -113,13 +113,13 @@ BOOLEAN gfIgnoreUndoCmdsForLights = FALSE;
|
||||
typedef struct MapIndexBinaryTree
|
||||
{
|
||||
struct MapIndexBinaryTree *left, *right;
|
||||
INT16 sMapIndex;
|
||||
UINT32 usMapIndex;
|
||||
}MapIndexBinaryTree;
|
||||
|
||||
MapIndexBinaryTree *top = NULL;
|
||||
void ClearUndoMapIndexTree();
|
||||
BOOLEAN AddMapIndexToTree( INT16 sMapIndex );
|
||||
void CheckMapIndexForMultiTileStructures( INT16 sMapIndex );
|
||||
BOOLEAN AddMapIndexToTree( UINT32 usMapIndex );
|
||||
void CheckMapIndexForMultiTileStructures( UINT32 usMapIndex );
|
||||
void CheckForMultiTilesInTreeAndAddToUndoList( MapIndexBinaryTree *node );
|
||||
|
||||
|
||||
@@ -141,14 +141,14 @@ void ClearUndoMapIndexTree()
|
||||
DeleteTreeNode( &top );
|
||||
}
|
||||
|
||||
BOOLEAN AddMapIndexToTree( INT16 sMapIndex )
|
||||
BOOLEAN AddMapIndexToTree( UINT32 usMapIndex )
|
||||
{
|
||||
MapIndexBinaryTree *curr, *parent;
|
||||
if( !top )
|
||||
{
|
||||
top = (MapIndexBinaryTree*)MemAlloc( sizeof( MapIndexBinaryTree ) );
|
||||
Assert( top );
|
||||
top->sMapIndex = sMapIndex;
|
||||
top->usMapIndex = usMapIndex;
|
||||
top->left = NULL;
|
||||
top->right = NULL;
|
||||
return TRUE;
|
||||
@@ -161,21 +161,21 @@ BOOLEAN AddMapIndexToTree( INT16 sMapIndex )
|
||||
while( curr )
|
||||
{
|
||||
parent = curr;
|
||||
if( curr->sMapIndex == sMapIndex ) //found a match, so stop
|
||||
if( curr->usMapIndex == usMapIndex ) //found a match, so stop
|
||||
return FALSE;
|
||||
//if the mapIndex is < node's mapIndex, then go left, else right
|
||||
curr = ( sMapIndex < curr->sMapIndex ) ? curr->left : curr->right;
|
||||
curr = ( usMapIndex < curr->usMapIndex ) ? curr->left : curr->right;
|
||||
}
|
||||
//if we made it this far, then curr is null and parent is pointing
|
||||
//directly above.
|
||||
//Create the new node and fill in the information.
|
||||
curr = (MapIndexBinaryTree*)MemAlloc( sizeof( MapIndexBinaryTree ) );
|
||||
Assert( curr );
|
||||
curr->sMapIndex = sMapIndex;
|
||||
curr->usMapIndex = usMapIndex;
|
||||
curr->left = NULL;
|
||||
curr->right = NULL;
|
||||
//Now link the new node to the parent.
|
||||
if( curr->sMapIndex < parent->sMapIndex )
|
||||
if( curr->usMapIndex < parent->usMapIndex )
|
||||
parent->left = curr;
|
||||
else
|
||||
parent->right = curr;
|
||||
@@ -420,7 +420,7 @@ BOOLEAN AddToUndoList( INT32 iMapIndex )
|
||||
//Check to see if the tile in question is even on the visible map, then
|
||||
//if that is true, then check to make sure we don't already have the mapindex
|
||||
//saved in the new binary tree (which only holds unique mapindex values).
|
||||
if( GridNoOnVisibleWorldTile( (INT16)iMapIndex ) && AddMapIndexToTree( (INT16)iMapIndex ) )
|
||||
if( GridNoOnVisibleWorldTile( iMapIndex ) && AddMapIndexToTree( iMapIndex ) )//dnl ch56 141009
|
||||
|
||||
{
|
||||
if( AddToUndoListCmd( iMapIndex, ++iCount ) )
|
||||
@@ -519,13 +519,13 @@ BOOLEAN AddToUndoListCmd( INT32 iMapIndex, INT32 iCmdCount )
|
||||
}
|
||||
|
||||
|
||||
void CheckMapIndexForMultiTileStructures( INT16 sMapIndex )
|
||||
void CheckMapIndexForMultiTileStructures( UINT32 usMapIndex )
|
||||
{
|
||||
STRUCTURE * pStructure;
|
||||
UINT8 ubLoop;
|
||||
INT32 iCoveredMapIndex;
|
||||
|
||||
pStructure = gpWorldLevelData[sMapIndex].pStructureHead;
|
||||
pStructure = gpWorldLevelData[usMapIndex].pStructureHead;
|
||||
while (pStructure)
|
||||
{
|
||||
if (pStructure->pDBStructureRef->pDBStructure->ubNumberOfTiles > 1)
|
||||
@@ -535,7 +535,7 @@ void CheckMapIndexForMultiTileStructures( INT16 sMapIndex )
|
||||
// for multi-tile structures we have to add, to the undo list, all the other tiles covered by the structure
|
||||
if (pStructure->fFlags & STRUCTURE_BASE_TILE)
|
||||
{
|
||||
iCoveredMapIndex = sMapIndex + pStructure->pDBStructureRef->ppTile[ubLoop]->sPosRelToBase;
|
||||
iCoveredMapIndex = usMapIndex + pStructure->pDBStructureRef->ppTile[ubLoop]->sPosRelToBase;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -550,7 +550,7 @@ void CheckMapIndexForMultiTileStructures( INT16 sMapIndex )
|
||||
|
||||
void CheckForMultiTilesInTreeAndAddToUndoList( MapIndexBinaryTree *node )
|
||||
{
|
||||
CheckMapIndexForMultiTileStructures( node->sMapIndex );
|
||||
CheckMapIndexForMultiTileStructures( node->usMapIndex );
|
||||
if( node->left )
|
||||
CheckForMultiTilesInTreeAndAddToUndoList( node->left );
|
||||
if( node->right )
|
||||
@@ -590,7 +590,7 @@ BOOLEAN ExecuteUndoList( void )
|
||||
{
|
||||
iUndoMapIndex = gpTileUndoStack->pData->iMapIndex;
|
||||
|
||||
fExitGrid = ExitGridAtGridNo( (INT16)iUndoMapIndex );
|
||||
fExitGrid = ExitGridAtGridNo( iUndoMapIndex );
|
||||
|
||||
// Find which map tile we are to "undo"
|
||||
if( gpTileUndoStack->pData->fLightSaved )
|
||||
@@ -599,7 +599,7 @@ BOOLEAN ExecuteUndoList( void )
|
||||
//Turn on this flag so that the following code, when executed, doesn't attempt to
|
||||
//add lights to the undo list. That would cause problems...
|
||||
gfIgnoreUndoCmdsForLights = TRUE;
|
||||
ConvertGridNoToXY( (INT16)iUndoMapIndex, &sX, &sY );
|
||||
ConvertGridNoToXY( iUndoMapIndex, &sX, &sY );
|
||||
if( !gpTileUndoStack->pData->ubLightRadius )
|
||||
RemoveLight( sX, sY );
|
||||
else
|
||||
@@ -632,13 +632,13 @@ BOOLEAN ExecuteUndoList( void )
|
||||
//hacking around this by erasing all cursors here.
|
||||
RemoveAllTopmostsOfTypeRange( iUndoMapIndex, FIRSTPOINTERS, FIRSTPOINTERS );
|
||||
|
||||
if( fExitGrid && !ExitGridAtGridNo( (INT16)iUndoMapIndex ) )
|
||||
if( fExitGrid && !ExitGridAtGridNo( iUndoMapIndex ) )
|
||||
{ //An exitgrid has been removed, so get rid of the associated indicator.
|
||||
RemoveTopmost( (UINT16)iUndoMapIndex, FIRSTPOINTERS8 );
|
||||
RemoveTopmost( iUndoMapIndex, FIRSTPOINTERS8 );
|
||||
}
|
||||
else if( !fExitGrid && ExitGridAtGridNo( (INT16)iUndoMapIndex ) )
|
||||
else if( !fExitGrid && ExitGridAtGridNo( iUndoMapIndex ) )
|
||||
{ //An exitgrid has been added, so add the associated indicator
|
||||
AddTopmostToTail( (UINT16)iUndoMapIndex, FIRSTPOINTERS8 );
|
||||
AddTopmostToTail( iUndoMapIndex, FIRSTPOINTERS8 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,147 +0,0 @@
|
||||
# Microsoft Developer Studio Generated Dependency File, included by Editor.mak
|
||||
|
||||
".\Cursor Modes.cpp" : \
|
||||
"..\builddefines.h"\
|
||||
"..\Language Defines.h"\
|
||||
".\Editor All.h"\
|
||||
|
||||
|
||||
.\edit_sys.cpp : \
|
||||
"..\builddefines.h"\
|
||||
"..\Language Defines.h"\
|
||||
".\Editor All.h"\
|
||||
|
||||
|
||||
".\Editor Callbacks.cpp" : \
|
||||
"..\builddefines.h"\
|
||||
"..\Language Defines.h"\
|
||||
".\Editor All.h"\
|
||||
|
||||
|
||||
".\Editor Modes.cpp" : \
|
||||
"..\builddefines.h"\
|
||||
"..\Language Defines.h"\
|
||||
".\Editor All.h"\
|
||||
|
||||
|
||||
".\Editor Taskbar Creation.cpp" : \
|
||||
"..\builddefines.h"\
|
||||
"..\Language Defines.h"\
|
||||
".\Editor All.h"\
|
||||
|
||||
|
||||
".\Editor Taskbar Utils.cpp" : \
|
||||
"..\builddefines.h"\
|
||||
"..\Language Defines.h"\
|
||||
".\Editor All.h"\
|
||||
|
||||
|
||||
".\Editor Undo.cpp" : \
|
||||
"..\builddefines.h"\
|
||||
"..\Language Defines.h"\
|
||||
".\Editor All.h"\
|
||||
|
||||
|
||||
.\EditorBuildings.cpp : \
|
||||
"..\builddefines.h"\
|
||||
"..\Language Defines.h"\
|
||||
".\Editor All.h"\
|
||||
|
||||
|
||||
.\EditorItems.cpp : \
|
||||
"..\builddefines.h"\
|
||||
"..\Language Defines.h"\
|
||||
".\Editor All.h"\
|
||||
|
||||
|
||||
.\EditorMapInfo.cpp : \
|
||||
"..\builddefines.h"\
|
||||
"..\Language Defines.h"\
|
||||
".\Editor All.h"\
|
||||
|
||||
|
||||
.\EditorMercs.cpp : \
|
||||
"..\builddefines.h"\
|
||||
"..\Language Defines.h"\
|
||||
".\Editor All.h"\
|
||||
|
||||
|
||||
.\EditorTerrain.cpp : \
|
||||
"..\builddefines.h"\
|
||||
"..\Language Defines.h"\
|
||||
".\Editor All.h"\
|
||||
|
||||
|
||||
.\editscreen.cpp : \
|
||||
"..\builddefines.h"\
|
||||
"..\Language Defines.h"\
|
||||
"..\screenids.h"\
|
||||
".\Editor All.h"\
|
||||
|
||||
|
||||
".\Item Statistics.cpp" : \
|
||||
"..\builddefines.h"\
|
||||
"..\Language Defines.h"\
|
||||
".\Editor All.h"\
|
||||
|
||||
|
||||
.\LoadScreen.cpp : \
|
||||
"..\builddefines.h"\
|
||||
"..\Language Defines.h"\
|
||||
"..\screenids.h"\
|
||||
".\Editor All.h"\
|
||||
|
||||
|
||||
.\messagebox.cpp : \
|
||||
"..\builddefines.h"\
|
||||
"..\Language Defines.h"\
|
||||
".\Editor All.h"\
|
||||
|
||||
|
||||
.\newsmooth.cpp : \
|
||||
"..\builddefines.h"\
|
||||
"..\Language Defines.h"\
|
||||
".\Editor All.h"\
|
||||
|
||||
|
||||
.\popupmenu.cpp : \
|
||||
"..\builddefines.h"\
|
||||
"..\Language Defines.h"\
|
||||
".\Editor All.h"\
|
||||
|
||||
|
||||
".\Road Smoothing.cpp" : \
|
||||
"..\builddefines.h"\
|
||||
"..\Language Defines.h"\
|
||||
".\Editor All.h"\
|
||||
|
||||
|
||||
".\Sector Summary.cpp" : \
|
||||
"..\builddefines.h"\
|
||||
"..\Language Defines.h"\
|
||||
".\Editor All.h"\
|
||||
|
||||
|
||||
.\selectwin.cpp : \
|
||||
"..\builddefines.h"\
|
||||
"..\Language Defines.h"\
|
||||
".\Editor All.h"\
|
||||
|
||||
|
||||
.\SmartMethod.cpp : \
|
||||
"..\builddefines.h"\
|
||||
"..\Language Defines.h"\
|
||||
".\Editor All.h"\
|
||||
|
||||
|
||||
.\smooth.cpp : \
|
||||
"..\builddefines.h"\
|
||||
"..\Language Defines.h"\
|
||||
".\Editor All.h"\
|
||||
|
||||
|
||||
".\Smoothing Utils.cpp" : \
|
||||
"..\builddefines.h"\
|
||||
"..\Language Defines.h"\
|
||||
".\Editor All.h"\
|
||||
|
||||
@@ -1,450 +0,0 @@
|
||||
# Microsoft Developer Studio Project File - Name="Editor" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||
|
||||
CFG=Editor - Win32 Demo Bounds Checker
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Editor.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Editor.mak" CFG="Editor - Win32 Demo Bounds Checker"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "Editor - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "Editor - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "Editor - Win32 Release with Debug Info" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "Editor - Win32 Bounds Checker" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "Editor - Win32 Debug Demo" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "Editor - Win32 Release Demo" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "Editor - Win32 Demo Release with Debug Info" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "Editor - Win32 Demo Bounds Checker" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""$/Jagged Alliance 2/Development/Programming/Jagged Alliance 2/Build", AVAAAAAA"
|
||||
# PROP Scc_LocalPath "..\..\..\ja2\build"
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "Editor - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /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 /YX"Editor All.h" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "Editor - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "..\Standard Gaming Platform" /I "..\TileEngine" /I "..\\" /I "..\Tactical" /I "..\Utils" /I "..\tacticalai" /I "..\strategic" /I "..\Laptop" /I ".\\" /D "PRECOMPILEDHEADERS" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "_VTUNE_PROFILING" /D "XML_STATIC" /D "CINTERFACE" /FR /YX"Editor All.h" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "Editor - Win32 Release with Debug Info"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Editor__"
|
||||
# PROP BASE Intermediate_Dir "Editor__"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release with Debug"
|
||||
# PROP Intermediate_Dir "Release with Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "\Standard Gaming Platform" /I "\ja2\Build" /I "\ja2\Build\TileEngine" /I "\ja2\Build\Utils" /I "\ja2\build\TacticalAI" /I "\ja2\build\Communications" /I "\ja2\build\Tactical" /I "\ja2\build\strategic" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "JA2" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\Standard Gaming Platform" /I "..\\" /I "..\TileEngine" /I "..\Utils" /I "..\TacticalAI" /I "..\Tactical" /I "..\strategic" /I ".\\" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "PRECOMPILEDHEADERS" /D "_VTUNE_PROFILING" /D "XML_STATIC" /D "CINTERFACE" /FR /YX"Editor All.h" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "Editor - Win32 Bounds Checker"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Editor_1"
|
||||
# PROP BASE Intermediate_Dir "Editor_1"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Bounds Checker"
|
||||
# PROP Intermediate_Dir "Bounds Checker"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /GX /Z7 /Od /I "\Standard Gaming Platform" /I "\ja2\Build" /I "\ja2\Build\TileEngine" /I "\ja2\Build\Utils" /I "\ja2\build\TacticalAI" /I "\ja2\build\Communications" /I "\ja2\build\Tactical" /I "\ja2\build\strategic" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "JA2" /FR /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "\Standard Gaming Platform" /I "\ja2\Build" /I "\ja2\Build\TileEngine" /I "\ja2\Build\Utils" /I "\ja2\build\TacticalAI" /I "\ja2\build\Communications" /I "\ja2\build\Tactical" /I "\ja2\build\strategic" /D "_DEBUG" /D "BOUNDS_CHECKER" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "PRECOMPILEDHEADERS" /D "_VTUNE_PROFILING" /FR /YX"Editor All.h" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "Editor - Win32 Debug Demo"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Editor_0"
|
||||
# PROP BASE Intermediate_Dir "Editor_0"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug Demo"
|
||||
# PROP Intermediate_Dir "Debug Demo"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /GX /Z7 /Od /I "\Standard Gaming Platform" /I "\ja2\Build" /I "\ja2\Build\TileEngine" /I "\ja2\Build\Utils" /I "\ja2\build\TacticalAI" /I "\ja2\build\Communications" /I "\ja2\build\Tactical" /I "\ja2\build\strategic" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "JA2" /FR /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "\Standard Gaming Platform" /I "\ja2\Build" /I "\ja2\Build\TileEngine" /I "\ja2\Build\Utils" /I "\ja2\build\TacticalAI" /I "\ja2\build\Communications" /I "\ja2\build\Tactical" /I "\ja2\build\strategic" /D "JA2DEMO" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "PRECOMPILEDHEADERS" /FR /YX"Editor All.h" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "Editor - Win32 Release Demo"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Editor_2"
|
||||
# PROP BASE Intermediate_Dir "Editor_2"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release Demo"
|
||||
# PROP Intermediate_Dir "Release Demo"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "\Standard Gaming Platform" /I "\ja2\Build" /I "\ja2\Build\TileEngine" /I "\ja2\Build\Utils" /I "\ja2\build\TacticalAI" /I "\ja2\build\Communications" /I "\ja2\build\Tactical" /I "\ja2\build\strategic" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "JA2" /FR /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "\Standard Gaming Platform" /I "\ja2\Build" /I "\ja2\Build\TileEngine" /I "\ja2\Build\Utils" /I "\ja2\build\TacticalAI" /I "\ja2\build\Communications" /I "\ja2\build\Tactical" /I "\ja2\build\strategic" /D "NDEBUG" /D "JA2DEMO" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "PRECOMPILEDHEADERS" /FR /YX"Editor All.h" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "Editor - Win32 Demo Release with Debug Info"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Editor_3"
|
||||
# PROP BASE Intermediate_Dir "Editor_3"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Demo Release with Debug"
|
||||
# PROP Intermediate_Dir "Demo Release with Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "\Standard Gaming Platform" /I "\ja2\Build" /I "\ja2\Build\TileEngine" /I "\ja2\Build\Utils" /I "\ja2\build\TacticalAI" /I "\ja2\build\Communications" /I "\ja2\build\Tactical" /I "\ja2\build\strategic" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "JA2" /FR /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\Standard Gaming Platform" /I "..\\" /I "..\TileEngine" /I "..\Utils" /I "..\TacticalAI" /I "..\Tactical" /I "..\strategic" /I ".\\" /D "NDEBUG" /D "JA2DEMO" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "PRECOMPILEDHEADERS" /D "XML_STATIC" /D "CINTERFACE" /FR /YX"Editor All.h" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "Editor - Win32 Demo Bounds Checker"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Editor_4"
|
||||
# PROP BASE Intermediate_Dir "Editor_4"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Demo Bounds Checker"
|
||||
# PROP Intermediate_Dir "Demo Bounds Checker"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /GX /Z7 /Od /I "\Standard Gaming Platform" /I "\ja2\Build" /I "\ja2\Build\TileEngine" /I "\ja2\Build\Utils" /I "\ja2\build\TacticalAI" /I "\ja2\build\Communications" /I "\ja2\build\Tactical" /I "\ja2\build\strategic" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "BOUNDS_CHECKER" /FR /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "\Standard Gaming Platform" /I "\ja2\Build" /I "\ja2\Build\TileEngine" /I "\ja2\Build\Utils" /I "\ja2\build\TacticalAI" /I "\ja2\build\Communications" /I "\ja2\build\Tactical" /I "\ja2\build\strategic" /D "_DEBUG" /D "BOUNDS_CHECKER" /D "JA2DEMO" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "PRECOMPILEDHEADERS" /FR /YX"Editor All.h" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "Editor - Win32 Release"
|
||||
# Name "Editor - Win32 Debug"
|
||||
# Name "Editor - Win32 Release with Debug Info"
|
||||
# Name "Editor - Win32 Bounds Checker"
|
||||
# Name "Editor - Win32 Debug Demo"
|
||||
# Name "Editor - Win32 Release Demo"
|
||||
# Name "Editor - Win32 Demo Release with Debug Info"
|
||||
# Name "Editor - Win32 Demo Bounds Checker"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Cursor Modes.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\edit_sys.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Editor Callbacks.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Editor Modes.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Editor Taskbar Creation.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Editor Taskbar Utils.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Editor Undo.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\EditorBuildings.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\EditorItems.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\EditorMapInfo.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\EditorMercs.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\EditorTerrain.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\editscreen.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Item Statistics.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\LoadScreen.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\messagebox.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\newsmooth.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\popupmenu.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Road Smoothing.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Sector Summary.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\selectwin.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\SmartMethod.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\smooth.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Smoothing Utils.cpp"
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Button Defines.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Cursor Modes.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\edit_sys.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Editor All.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Editor Callback Prototypes.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Editor Modes.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Editor Taskbar Creation.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Editor Taskbar Utils.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Editor Undo.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\EditorBuildings.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\EditorDefines.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\EditorItems.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\EditorMapInfo.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\EditorMercs.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\EditorTerrain.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\editscreen.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Item Statistics.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\LoadScreen.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\messagebox.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\newsmooth.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\popupmenu.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Road Smoothing.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Sector Summary.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\selectwin.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\SmartMethod.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\smooth.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Smoothing Utils.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Summary Info.h"
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
-1274
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+18
-14
@@ -67,11 +67,11 @@ void UpdateWallsView()
|
||||
{
|
||||
if ( fBuildingShowWalls )
|
||||
{
|
||||
RemoveWallLevelnodeFlags( (INT16)cnt, LEVELNODE_HIDDEN );
|
||||
RemoveWallLevelnodeFlags( cnt, LEVELNODE_HIDDEN );
|
||||
}
|
||||
else
|
||||
{
|
||||
SetWallLevelnodeFlags( (INT16)cnt, LEVELNODE_HIDDEN );
|
||||
SetWallLevelnodeFlags( cnt, LEVELNODE_HIDDEN );
|
||||
}
|
||||
}
|
||||
gfRenderWorld = TRUE;
|
||||
@@ -102,7 +102,7 @@ void UpdateBuildingsInfo()
|
||||
//4) KillBuilding at x , y-1.
|
||||
//5) KillBuilding at x+1, y.
|
||||
//6) KillBuilding at x , y+1.
|
||||
void KillBuilding( UINT32 iMapIndex )
|
||||
void KillBuilding( INT32 iMapIndex )
|
||||
{
|
||||
BOOLEAN fFound = FALSE;
|
||||
|
||||
@@ -120,13 +120,13 @@ void KillBuilding( UINT32 iMapIndex )
|
||||
return;
|
||||
}
|
||||
|
||||
if( GridNoOnVisibleWorldTile( (INT16)( iMapIndex - WORLD_COLS ) ) )
|
||||
if( GridNoOnVisibleWorldTile( iMapIndex - WORLD_COLS ) )
|
||||
KillBuilding( iMapIndex - WORLD_COLS );
|
||||
if( GridNoOnVisibleWorldTile( (INT16)( iMapIndex + WORLD_COLS ) ) )
|
||||
if( GridNoOnVisibleWorldTile( iMapIndex + WORLD_COLS ) )
|
||||
KillBuilding( iMapIndex + WORLD_COLS );
|
||||
if( GridNoOnVisibleWorldTile( (INT16)( iMapIndex + 1 ) ) )
|
||||
if( GridNoOnVisibleWorldTile( iMapIndex + 1 ) )
|
||||
KillBuilding( iMapIndex + 1 );
|
||||
if( GridNoOnVisibleWorldTile( (INT16)( iMapIndex - 1 ) ) )
|
||||
if( GridNoOnVisibleWorldTile( iMapIndex - 1 ) )
|
||||
KillBuilding( iMapIndex - 1 );
|
||||
|
||||
if( gfBasement )
|
||||
@@ -134,7 +134,7 @@ void KillBuilding( UINT32 iMapIndex )
|
||||
}
|
||||
|
||||
BUILDINGLAYOUTNODE *gpBuildingLayoutList = NULL;
|
||||
INT16 gsBuildingLayoutAnchorGridNo = -1;
|
||||
INT32 gsBuildingLayoutAnchorGridNo = -1;
|
||||
extern void RemoveBuildingLayout();
|
||||
|
||||
void DeleteBuildingLayout()
|
||||
@@ -175,14 +175,14 @@ void BuildLayout( INT32 iMapIndex, INT32 iOffset )
|
||||
curr = gpBuildingLayoutList;
|
||||
while( curr )
|
||||
{
|
||||
if( (INT16)iMapIndex == curr->sGridNo )
|
||||
if( iMapIndex == curr->sGridNo )
|
||||
return;
|
||||
curr = curr->next;
|
||||
}
|
||||
//Good, it hasn't, so process it and add it to the head of the list.
|
||||
curr = (BUILDINGLAYOUTNODE*)MemAlloc( sizeof( BUILDINGLAYOUTNODE ) );
|
||||
Assert( curr );
|
||||
curr->sGridNo = (INT16)iMapIndex;
|
||||
curr->sGridNo = iMapIndex;
|
||||
curr->next = gpBuildingLayoutList;
|
||||
gpBuildingLayoutList = curr;
|
||||
|
||||
@@ -205,11 +205,11 @@ void CopyBuilding( INT32 iMapIndex )
|
||||
//Allocate the basic structure, then calculate the layout. The head node is
|
||||
gpBuildingLayoutList = (BUILDINGLAYOUTNODE*)MemAlloc( sizeof( BUILDINGLAYOUTNODE ) );
|
||||
Assert( gpBuildingLayoutList );
|
||||
gpBuildingLayoutList->sGridNo = (INT16)iMapIndex;
|
||||
gpBuildingLayoutList->sGridNo = iMapIndex;
|
||||
gpBuildingLayoutList->next = NULL;
|
||||
|
||||
//Set the anchor point for this building -- this is where the user clicked.
|
||||
gsBuildingLayoutAnchorGridNo = (INT16)iMapIndex;
|
||||
gsBuildingLayoutAnchorGridNo = iMapIndex;
|
||||
|
||||
//Now, recursively expand out while adding unique gridnos to our list. The recursion will
|
||||
//terminate when complete.
|
||||
@@ -363,6 +363,8 @@ void MoveBuilding( INT32 iMapIndex )
|
||||
return;
|
||||
SortBuildingLayout( iMapIndex );
|
||||
iOffset = iMapIndex - gsBuildingLayoutAnchorGridNo;
|
||||
if(iOffset == 0)//dnl ch32 080909
|
||||
return;
|
||||
//First time, set the undo gridnos to everything effected.
|
||||
curr = gpBuildingLayoutList;
|
||||
while( curr )
|
||||
@@ -390,6 +392,8 @@ void PasteBuilding( INT32 iMapIndex )
|
||||
return;
|
||||
SortBuildingLayout( iMapIndex );
|
||||
iOffset = iMapIndex - gsBuildingLayoutAnchorGridNo;
|
||||
if(iOffset == 0)//dnl ch32 080909
|
||||
return;
|
||||
curr = gpBuildingLayoutList;
|
||||
//First time, set the undo gridnos to everything effected.
|
||||
while( curr )
|
||||
@@ -500,7 +504,7 @@ void DoorOkayCallback( GUI_BUTTON *btn, INT32 reason );
|
||||
void DoorCancelCallback( GUI_BUTTON *btn, INT32 reason );
|
||||
void DoorToggleLockedCallback( GUI_BUTTON *btn, INT32 reason );
|
||||
|
||||
extern BOOLEAN OpenableAtGridNo( UINT32 iMapIndex );
|
||||
extern BOOLEAN OpenableAtGridNo( INT32 iMapIndex );
|
||||
|
||||
void InitDoorEditing( INT32 iMapIndex )
|
||||
{
|
||||
@@ -558,7 +562,7 @@ void ExtractAndUpdateDoorInfo()
|
||||
|
||||
memset( &door, 0, sizeof( DOOR ) );
|
||||
|
||||
door.sGridNo = (INT16)iDoorMapIndex;
|
||||
door.sGridNo = iDoorMapIndex;
|
||||
|
||||
num = min( GetNumericStrictValueFromField( 0 ), NUM_LOCKS-1 );
|
||||
door.ubLockID = (UINT8)num;
|
||||
|
||||
@@ -21,17 +21,17 @@ void InitEditorBuildingsToolbar();
|
||||
//Selection method callbacks
|
||||
//Building utility functions
|
||||
void UpdateBuildingsInfo();
|
||||
void KillBuilding( UINT32 iMapIndex );
|
||||
void KillBuilding( INT32 iMapIndex );
|
||||
|
||||
|
||||
typedef struct BUILDINGLAYOUTNODE
|
||||
{
|
||||
struct BUILDINGLAYOUTNODE *next;
|
||||
INT16 sGridNo;
|
||||
INT32 sGridNo;
|
||||
}BUILDINGLAYOUTNODE;
|
||||
|
||||
extern BUILDINGLAYOUTNODE *gpBuildingLayoutList;
|
||||
extern INT16 gsBuildingLayoutAnchorGridNo;
|
||||
extern INT32 gsBuildingLayoutAnchorGridNo;
|
||||
|
||||
//The first step is copying a building. After that, it either must be pasted or moved.
|
||||
void CopyBuilding( INT32 iMapIndex );
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "Types.h"
|
||||
#include "Button Defines.h"
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
TBAR_MODE_NONE,
|
||||
@@ -81,6 +82,8 @@ enum
|
||||
TBAR_MODE_ITEM_EQUIPMENT3,
|
||||
TBAR_MODE_ITEM_TRIGGERS,
|
||||
TBAR_MODE_ITEM_KEYS,
|
||||
|
||||
TBAR_MODE_RADAR_MAP,//dnl ch9 071009
|
||||
};
|
||||
|
||||
enum
|
||||
@@ -158,6 +161,7 @@ enum
|
||||
|
||||
ACTION_COPY_MERC_PLACEMENT,
|
||||
ACTION_PASTE_MERC_PLACEMENT,
|
||||
ACTION_RADAR_MAP,//dnl ch9 071009
|
||||
};
|
||||
|
||||
enum
|
||||
@@ -166,6 +170,7 @@ enum
|
||||
//Terrain
|
||||
DRAW_MODE_GROUND,
|
||||
DRAW_MODE_NEW_GROUND,
|
||||
DRAW_MODE_HIGH_GROUND,//dnl ch1 210909
|
||||
DRAW_MODE_DEBRIS,
|
||||
DRAW_MODE_BANKS,
|
||||
DRAW_MODE_ROADS,
|
||||
|
||||
+33
-24
@@ -42,6 +42,7 @@
|
||||
#include "random.h"
|
||||
#include "Pits.h"
|
||||
#include "keys.h"
|
||||
#include "InterfaceItemImages.h"
|
||||
#endif
|
||||
|
||||
#include "VFS/Tools/Log.h"
|
||||
@@ -70,7 +71,7 @@ INT32 giDefaultExistChance = 100;
|
||||
|
||||
typedef struct IPListNode
|
||||
{
|
||||
INT16 sGridNo;
|
||||
INT32 sGridNo;
|
||||
struct IPListNode *next;
|
||||
}IPListNode;
|
||||
|
||||
@@ -83,7 +84,7 @@ void BuildItemPoolList()
|
||||
{
|
||||
ITEM_POOL *temp;
|
||||
IPListNode *tail = NULL;
|
||||
UINT16 i;
|
||||
INT32 i;
|
||||
KillItemPoolList();
|
||||
for( i = 0; i < WORLD_MAX; i++ )
|
||||
{
|
||||
@@ -116,7 +117,8 @@ void KillItemPoolList()
|
||||
pIPCurr = pIPHead;
|
||||
while( pIPCurr )
|
||||
{
|
||||
HideItemCursor( pIPCurr->sGridNo );
|
||||
if(pIPCurr->sGridNo < WORLD_MAX)//dnl ch43 280909 Prevent CTD when world size is changed
|
||||
HideItemCursor(pIPCurr->sGridNo);
|
||||
pIPHead = pIPHead->next;
|
||||
MemFree( pIPCurr );
|
||||
pIPCurr = pIPHead;
|
||||
@@ -379,14 +381,15 @@ void InitEditorItemsInfo(UINT32 uiItemType)
|
||||
swprintf( pStr, L"%S", LockTable[ i ].ubEditorName );
|
||||
DisplayWrappedString(x, (UINT16)(y+25), 60, 2, SMALLCOMPFONT, FONT_WHITE, pStr, FONT_BLACK, TRUE, CENTER_JUSTIFIED );
|
||||
|
||||
UINT16 usGraphicNum = g_bUsePngItemImages ? 0 : item->ubGraphicNum;
|
||||
//Calculate the center position of the graphic in a 60 pixel wide area.
|
||||
sWidth = hVObject->pETRLEObject[item->ubGraphicNum].usWidth;
|
||||
sOffset = hVObject->pETRLEObject[item->ubGraphicNum].sOffsetX;
|
||||
sWidth = hVObject->pETRLEObject[usGraphicNum].usWidth;
|
||||
sOffset = hVObject->pETRLEObject[usGraphicNum].sOffsetX;
|
||||
sStart = x + (60 - sWidth - sOffset*2) / 2;
|
||||
|
||||
BltVideoObjectOutlineFromIndex( eInfo.uiBuffer, uiVideoObjectIndex, item->ubGraphicNum, sStart, y+2, 0, FALSE );
|
||||
//cycle through the various slot positions (0,0), (0,40), (60,0), (60,40), (120,0)...
|
||||
BltVideoObjectOutlineFromIndex( eInfo.uiBuffer, uiVideoObjectIndex, usGraphicNum, sStart, y+2, 0, FALSE );
|
||||
|
||||
//cycle through the various slot positions (0,0), (0,40), (60,0), (60,40), (120,0)...
|
||||
if( y == 0 )
|
||||
{
|
||||
y = 40;
|
||||
@@ -528,16 +531,17 @@ void InitEditorItemsInfo(UINT32 uiItemType)
|
||||
|
||||
DisplayWrappedString(x, (UINT16)(y+25), 60, 2, SMALLCOMPFONT, FONT_WHITE, pStr, FONT_BLACK, TRUE, CENTER_JUSTIFIED );
|
||||
|
||||
if(item->ubGraphicNum < hVObject->usNumberOfObjects)
|
||||
UINT16 usGraphicNum = g_bUsePngItemImages ? 0 : item->ubGraphicNum;
|
||||
if(usGraphicNum < hVObject->usNumberOfObjects)
|
||||
{
|
||||
//Calculate the center position of the graphic in a 60 pixel wide area.
|
||||
sWidth = hVObject->pETRLEObject[item->ubGraphicNum].usWidth;
|
||||
sOffset = hVObject->pETRLEObject[item->ubGraphicNum].sOffsetX;
|
||||
sWidth = hVObject->pETRLEObject[usGraphicNum].usWidth;
|
||||
sOffset = hVObject->pETRLEObject[usGraphicNum].sOffsetX;
|
||||
sStart = x + (60 - sWidth - sOffset*2) / 2;
|
||||
|
||||
if( sWidth && sWidth > 0 )
|
||||
{
|
||||
BltVideoObjectOutlineFromIndex( eInfo.uiBuffer, uiVideoObjectIndex, item->ubGraphicNum, sStart, y+2, 0, FALSE );
|
||||
BltVideoObjectOutlineFromIndex( eInfo.uiBuffer, uiVideoObjectIndex, usGraphicNum, sStart, y+2, 0, FALSE );
|
||||
}
|
||||
|
||||
//cycle through the various slot positions (0,0), (0,40), (60,0), (60,40), (120,0)...
|
||||
@@ -553,10 +557,10 @@ void InitEditorItemsInfo(UINT32 uiItemType)
|
||||
}
|
||||
else
|
||||
{
|
||||
static CLog& editorLog = *CLog::Create(L"EditorItems.log");
|
||||
static CLog& editorLog = *CLog::create(L"EditorItems.log");
|
||||
editorLog << L"Tried to access item ["
|
||||
<< item->ubGraphicNum << L"/" << hVObject->usNumberOfObjects
|
||||
<< L"]" << CLog::endl;
|
||||
<< L"]" << CLog::ENDL;
|
||||
}
|
||||
}
|
||||
usCounter++;
|
||||
@@ -629,12 +633,14 @@ void RenderEditorItemsInfo()
|
||||
|
||||
x = iScreenWidthOffset + (eInfo.sHilitedItemIndex/2 - eInfo.sScrollIndex)*60 + 110;
|
||||
y = 2 * iScreenHeightOffset + 360 + (eInfo.sHilitedItemIndex % 2) * 40;
|
||||
sWidth = hVObject->pETRLEObject[item->ubGraphicNum].usWidth;
|
||||
sOffset = hVObject->pETRLEObject[item->ubGraphicNum].sOffsetX;
|
||||
|
||||
UINT16 usGraphicNum = g_bUsePngItemImages ? 0 : item->ubGraphicNum;
|
||||
sWidth = hVObject->pETRLEObject[usGraphicNum].usWidth;
|
||||
sOffset = hVObject->pETRLEObject[usGraphicNum].sOffsetX;
|
||||
sStart = x + (60 - sWidth - sOffset*2) / 2;
|
||||
if( sWidth )
|
||||
{
|
||||
BltVideoObjectOutlineFromIndex( FRAME_BUFFER, uiVideoObjectIndex, item->ubGraphicNum, sStart, y+2, Get16BPPColor(FROMRGB(250, 250, 0)), TRUE );
|
||||
BltVideoObjectOutlineFromIndex( FRAME_BUFFER, uiVideoObjectIndex, usGraphicNum, sStart, y+2, Get16BPPColor(FROMRGB(250, 250, 0)), TRUE );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -649,12 +655,14 @@ void RenderEditorItemsInfo()
|
||||
|
||||
x = iScreenWidthOffset + (eInfo.sSelItemIndex/2 - eInfo.sScrollIndex)*60 + 110;
|
||||
y = 2 * iScreenHeightOffset + 360 + (eInfo.sSelItemIndex % 2) * 40;
|
||||
sWidth = hVObject->pETRLEObject[item->ubGraphicNum].usWidth;
|
||||
sOffset = hVObject->pETRLEObject[item->ubGraphicNum].sOffsetX;
|
||||
|
||||
UINT16 usGraphicNum = g_bUsePngItemImages ? 0 : item->ubGraphicNum;
|
||||
sWidth = hVObject->pETRLEObject[usGraphicNum].usWidth;
|
||||
sOffset = hVObject->pETRLEObject[usGraphicNum].sOffsetX;
|
||||
sStart = x + (60 - sWidth - sOffset*2) / 2;
|
||||
if( sWidth )
|
||||
{
|
||||
BltVideoObjectOutlineFromIndex( FRAME_BUFFER, uiVideoObjectIndex, item->ubGraphicNum, sStart, y+2, Get16BPPColor(FROMRGB(250, 0, 0)), TRUE );
|
||||
BltVideoObjectOutlineFromIndex( FRAME_BUFFER, uiVideoObjectIndex, usGraphicNum, sStart, y+2, Get16BPPColor(FROMRGB(250, 0, 0)), TRUE );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -821,7 +829,7 @@ void HideItemCursor( INT32 iMapIndex )
|
||||
RemoveTopmost( iMapIndex, SELRING1 );
|
||||
}
|
||||
|
||||
BOOLEAN TriggerAtGridNo( INT16 sGridNo )
|
||||
BOOLEAN TriggerAtGridNo( INT32 sGridNo )
|
||||
{
|
||||
ITEM_POOL *pItemPool;
|
||||
if( !GetItemPoolFromGround( sGridNo, &pItemPool ) )
|
||||
@@ -840,7 +848,7 @@ BOOLEAN TriggerAtGridNo( INT16 sGridNo )
|
||||
}
|
||||
|
||||
|
||||
void AddSelectedItemToWorld( INT16 sGridNo )
|
||||
void AddSelectedItemToWorld( INT32 sGridNo )
|
||||
{
|
||||
OBJECTTYPE *pObject;
|
||||
INVTYPE *pItem;
|
||||
@@ -955,7 +963,8 @@ void AddSelectedItemToWorld( INT16 sGridNo )
|
||||
}
|
||||
else
|
||||
{
|
||||
(*pObject)[0]->data.objectStatus = (INT8)(70 + Random( 26 ));
|
||||
if(gTempObject.usItem != OWNERSHIP)//dnl ch35 110909
|
||||
(*pObject)[0]->data.objectStatus = (INT8)(70 + Random( 26 ));
|
||||
}
|
||||
if( pItem->usItemClass & IC_GUN )
|
||||
{
|
||||
@@ -1023,7 +1032,7 @@ void AddSelectedItemToWorld( INT16 sGridNo )
|
||||
}
|
||||
}
|
||||
|
||||
void HandleRightClickOnItem( INT16 sGridNo )
|
||||
void HandleRightClickOnItem( INT32 sGridNo )
|
||||
{
|
||||
ITEM_POOL *pItemPool;
|
||||
IPListNode *pIPCurr;
|
||||
@@ -1074,7 +1083,7 @@ void DeleteSelectedItem()
|
||||
}
|
||||
if( gpItemPool )
|
||||
{ //Okay, we have a selected item...
|
||||
INT16 sGridNo;
|
||||
INT32 sGridNo;
|
||||
//save the mapindex
|
||||
if( gpItemPool->pNext )
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@ typedef struct{
|
||||
UINT16 *pusItemIndex; //a dynamic array of Item indices
|
||||
UINT32 uiBuffer; //index of buffer
|
||||
UINT32 uiItemType; //Weapons, ammo, armour, explosives, equipment
|
||||
INT32 sWidth, sHeight; //width and height of buffer
|
||||
INT16 sWidth, sHeight; //width and height of buffer
|
||||
//Kaiden: was previously INT16 - Fix for number of items capped by class
|
||||
INT16 sNumItems; //total number of items in the current class of item.
|
||||
INT16 sSelItemIndex; //currently selected item index.
|
||||
@@ -39,8 +39,8 @@ void DisplayItemStatistics();
|
||||
void DetermineItemsScrolling();
|
||||
|
||||
//User actions
|
||||
void AddSelectedItemToWorld( INT16 sGridNo );
|
||||
void HandleRightClickOnItem( INT16 sGridNo );
|
||||
void AddSelectedItemToWorld( INT32 sGridNo );
|
||||
void HandleRightClickOnItem( INT32 sGridNo );
|
||||
void DeleteSelectedItem();
|
||||
void ShowSelectedItem();
|
||||
void HideSelectedItem();
|
||||
|
||||
@@ -67,6 +67,45 @@ INT8 gbDefaultLightType = PRIMETIME_LIGHT;
|
||||
SGPPaletteEntry gEditorLightColor;
|
||||
|
||||
BOOLEAN gfEditorForceShadeTableRebuild = FALSE;
|
||||
//dnl ch43 290909
|
||||
INT32 iNewMapWorldRows = OLD_WORLD_ROWS;
|
||||
INT32 iNewMapWorldCols = OLD_WORLD_COLS;
|
||||
|
||||
void SetupTextInputForOptions(void)//dnl ch52 091009
|
||||
{
|
||||
CHAR16 str[10];
|
||||
InitTextInputModeWithScheme(DEFAULT_SCHEME);
|
||||
AddUserInputField(NULL); // Just so we can use short cut keys while not typing.
|
||||
swprintf(str, L"%d", WORLD_ROWS);
|
||||
AddTextInputField( iScreenWidthOffset+5, 2*iScreenHeightOffset+394, 30, 18, MSYS_PRIORITY_NORMAL, str, 4, INPUTTYPE_NUMERICSTRICT);
|
||||
swprintf(str, L"%d", WORLD_COLS);
|
||||
AddTextInputField(iScreenWidthOffset+5, 2*iScreenHeightOffset+414, 30, 18, MSYS_PRIORITY_NORMAL, str, 4, INPUTTYPE_NUMERICSTRICT);
|
||||
DisableTextField(2);
|
||||
}
|
||||
|
||||
void UpdateOptions()
|
||||
{
|
||||
SetFont( FONT10ARIAL );
|
||||
SetFontShadow( FONT_NEARBLACK );
|
||||
|
||||
SetFontForeground( FONT_YELLOW );
|
||||
mprintf( iScreenWidthOffset + 38, 2 * iScreenHeightOffset + 399, L"Rows");
|
||||
SetFontForeground( FONT_YELLOW );
|
||||
mprintf( iScreenWidthOffset + 38, 2 * iScreenHeightOffset + 419, L"Cols");
|
||||
|
||||
SetFontForeground( FONT_RED );
|
||||
}
|
||||
|
||||
void ExtractAndUpdateOptions(void)//dnl ch52 091009
|
||||
{
|
||||
iNewMapWorldRows = max(min(GetNumericStrictValueFromField(1), 9600), OLD_WORLD_ROWS);
|
||||
iNewMapWorldRows /= 4;
|
||||
iNewMapWorldRows *= 4;
|
||||
iNewMapWorldCols = iNewMapWorldRows;
|
||||
//iNewMapWorldCols = max(min(GetNumericStrictValueFromField(2), 9600), OLD_WORLD_COLS);
|
||||
//iNewMapWorldCols /= 4;
|
||||
//iNewMapWorldCols *= 4;
|
||||
}
|
||||
|
||||
void SetupTextInputForMapInfo()
|
||||
{
|
||||
@@ -101,7 +140,7 @@ void SetupTextInputForMapInfo()
|
||||
AddTextInputField( iScreenWidthOffset + 338, 2 * iScreenHeightOffset + 363, 30, 18, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_EXCLUSIVE_COORDINATE );
|
||||
swprintf( str, L"%d", gExitGrid.ubGotoSectorZ );
|
||||
AddTextInputField( iScreenWidthOffset + 338, 2 * iScreenHeightOffset + 383, 30, 18, MSYS_PRIORITY_NORMAL, str, 1, INPUTTYPE_NUMERICSTRICT );
|
||||
swprintf( str, L"%d", gExitGrid.sGridNo );
|
||||
swprintf( str, L"%d", gExitGrid.usGridNo );
|
||||
AddTextInputField( iScreenWidthOffset + 338, 2 * iScreenHeightOffset + 403, 40, 18, MSYS_PRIORITY_NORMAL, str, 5, INPUTTYPE_NUMERICSTRICT );
|
||||
}
|
||||
|
||||
@@ -241,7 +280,7 @@ void ExtractAndUpdateMapInfo()
|
||||
gExitGrid.ubGotoSectorY = (UINT8)max( min( gExitGrid.ubGotoSectorY, 16 ), 1 );
|
||||
}
|
||||
gExitGrid.ubGotoSectorZ = (UINT8)max( min( GetNumericStrictValueFromField( 8 ), 3 ), 0 );
|
||||
gExitGrid.sGridNo = (INT16)max( min( GetNumericStrictValueFromField( 9 ), 25600 ), 0 );
|
||||
gExitGrid.usGridNo = max( min( GetNumericStrictValueFromField( 9 ), 25600 ), 0 );
|
||||
|
||||
UpdateMapInfoFields();
|
||||
}
|
||||
@@ -256,17 +295,17 @@ BOOLEAN ApplyNewExitGridValuesToTextFields()
|
||||
SetInputFieldStringWith16BitString( 7, str );
|
||||
swprintf( str, L"%d", gExitGrid.ubGotoSectorZ );
|
||||
SetInputFieldStringWith16BitString( 8, str );
|
||||
swprintf( str, L"%d", gExitGrid.sGridNo );
|
||||
swprintf( str, L"%d", gExitGrid.usGridNo );
|
||||
SetInputFieldStringWith16BitString( 9, str );
|
||||
SetActiveField( 0 );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
INT16 usCurrentExitGridNo = 0;
|
||||
INT32 usCurrentExitGridNo = 0;
|
||||
void LocateNextExitGrid()
|
||||
{
|
||||
EXITGRID ExitGrid;
|
||||
UINT16 i;
|
||||
INT32 i;
|
||||
for( i = usCurrentExitGridNo + 1; i < WORLD_MAX; i++ )
|
||||
{
|
||||
if( GetExitGrid( i, &ExitGrid ) )
|
||||
|
||||
@@ -4,6 +4,12 @@
|
||||
#ifndef __EDITORMAPINFO_H
|
||||
#define __EDITORMAPINFO_H
|
||||
|
||||
extern INT32 iNewMapWorldRows;
|
||||
extern INT32 iNewMapWorldCols;
|
||||
|
||||
void SetupTextInputForOptions();
|
||||
void UpdateOptions();
|
||||
void ExtractAndUpdateOptions();
|
||||
void SetupTextInputForMapInfo();
|
||||
void UpdateMapInfo();
|
||||
void ExtractAndUpdateMapInfo();
|
||||
|
||||
+72
-73
@@ -62,6 +62,7 @@
|
||||
#include "Scheduling.h"
|
||||
#include "Timer Control.h"
|
||||
#include "message.h"
|
||||
#include "InterfaceItemImages.h"
|
||||
#endif
|
||||
//forward declarations of common classes to eliminate includes
|
||||
class OBJECTTYPE;
|
||||
@@ -195,7 +196,7 @@ BASIC_SOLDIERCREATE_STRUCT gTempBasicPlacement;
|
||||
SOLDIERCREATE_STRUCT gTempDetailedPlacement;
|
||||
|
||||
INT16 gsSelectedMercID;
|
||||
INT16 gsSelectedMercGridNo;
|
||||
INT32 gsSelectedMercGridNo;
|
||||
SOLDIERINITNODE *gpSelected;
|
||||
|
||||
UINT8 gubCurrMercMode = MERC_TEAMMODE;
|
||||
@@ -320,8 +321,8 @@ void GameInitEditorMercsInfo()
|
||||
for( i = 0; i < 4; i++ )
|
||||
{
|
||||
gCurrSchedule.usTime[i] = 0xffff;
|
||||
gCurrSchedule.usData1[i] = 0xffff;
|
||||
gCurrSchedule.usData2[i] = 0xffff;
|
||||
gCurrSchedule.usData1[i] = 0xffffffff;
|
||||
gCurrSchedule.usData2[i] = 0xffffffff;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -525,7 +526,7 @@ void AddMercToWorld( INT32 iMapIndex )
|
||||
//Set up some general information.
|
||||
gTempBasicPlacement.fDetailedPlacement = FALSE;
|
||||
gTempBasicPlacement.fPriorityExistance = FALSE;
|
||||
gTempBasicPlacement.sStartingGridNo = (INT16)iMapIndex;
|
||||
gTempBasicPlacement.usStartingGridNo = iMapIndex;
|
||||
gTempBasicPlacement.bOrders = gbDefaultOrders;
|
||||
gTempBasicPlacement.bAttitude = gbDefaultAttitude;
|
||||
gTempBasicPlacement.bRelativeAttributeLevel = gbDefaultRelativeAttributeLevel;
|
||||
@@ -577,7 +578,7 @@ void HandleRightClickOnMerc( INT32 iMapIndex )
|
||||
INT16 sThisMercID;
|
||||
INT16 sCellX, sCellY;
|
||||
|
||||
ConvertGridNoToCellXY( (INT16)iMapIndex, &sCellX, &sCellY );
|
||||
ConvertGridNoToCellXY( iMapIndex, &sCellX, &sCellY );
|
||||
|
||||
sThisMercID = (INT16)IsMercHere( iMapIndex );
|
||||
|
||||
@@ -610,8 +611,8 @@ void HandleRightClickOnMerc( INT32 iMapIndex )
|
||||
gpSelected->pDetailedPlacement->fOnRoof = FALSE;
|
||||
gpSelected->pSoldier->SetSoldierHeight( 0.0 );
|
||||
}
|
||||
gsSelectedMercGridNo = (INT16)iMapIndex;
|
||||
gpSelected->pBasicPlacement->sStartingGridNo = gsSelectedMercGridNo;
|
||||
gsSelectedMercGridNo = iMapIndex;
|
||||
gpSelected->pBasicPlacement->usStartingGridNo = gsSelectedMercGridNo;
|
||||
if( gpSelected->pDetailedPlacement )
|
||||
gpSelected->pDetailedPlacement->sInsertionGridNo = gsSelectedMercGridNo;
|
||||
AddObjectToHead( gsSelectedMercGridNo, CONFIRMMOVE1 );
|
||||
@@ -640,7 +641,7 @@ void ResetAllMercPositions()
|
||||
TacticalRemoveSoldier( curr->pSoldier->ubID );
|
||||
curr->pSoldier = NULL;
|
||||
}
|
||||
//sMapIndex = gpSelected->pBasicPlacement->sStartingGridNo;
|
||||
//usMapIndex = gpSelected->pBasicPlacement->usStartingGridNo;
|
||||
//ConvertGridNoToCellXY( sMapIndex, &sCellX, &sCellY );
|
||||
//if( gpSelected->pSoldier )
|
||||
//{
|
||||
@@ -659,7 +660,7 @@ void ResetAllMercPositions()
|
||||
gsSelectedMercID = -1;
|
||||
}
|
||||
|
||||
void AddMercWaypoint( UINT32 iMapIndex )
|
||||
void AddMercWaypoint( INT32 iMapIndex )
|
||||
{
|
||||
INT32 iNum;
|
||||
// index 0 isn't used
|
||||
@@ -674,10 +675,10 @@ void AddMercWaypoint( UINT32 iMapIndex )
|
||||
// Fill up missing waypoints with same value as new one
|
||||
for(iNum = gpSelected->pSoldier->aiData.bPatrolCnt + 1; iNum <= iActionParam; iNum++)
|
||||
{
|
||||
gpSelected->pBasicPlacement->sPatrolGrid[iNum] = (INT16)iMapIndex;
|
||||
gpSelected->pBasicPlacement->sPatrolGrid[iNum] = iMapIndex;
|
||||
if( gpSelected->pDetailedPlacement )
|
||||
gpSelected->pDetailedPlacement->sPatrolGrid[iNum] = (INT16)iMapIndex;
|
||||
gpSelected->pSoldier->aiData.sPatrolGrid[iNum] = (INT16)iMapIndex;
|
||||
gpSelected->pDetailedPlacement->sPatrolGrid[iNum] = iMapIndex;
|
||||
gpSelected->pSoldier->aiData.sPatrolGrid[iNum] = iMapIndex;
|
||||
}
|
||||
|
||||
gpSelected->pBasicPlacement->bPatrolCnt = (INT8)iActionParam;
|
||||
@@ -689,10 +690,10 @@ void AddMercWaypoint( UINT32 iMapIndex )
|
||||
else
|
||||
{
|
||||
// Set this way point
|
||||
gpSelected->pBasicPlacement->sPatrolGrid[iActionParam] = (INT16)iMapIndex;
|
||||
gpSelected->pBasicPlacement->sPatrolGrid[iActionParam] = iMapIndex;
|
||||
if( gpSelected->pDetailedPlacement )
|
||||
gpSelected->pDetailedPlacement->sPatrolGrid[iActionParam] = (INT16)iMapIndex;
|
||||
gpSelected->pSoldier->aiData.sPatrolGrid[iActionParam] = (INT16)iMapIndex;
|
||||
gpSelected->pDetailedPlacement->sPatrolGrid[iActionParam] = iMapIndex;
|
||||
gpSelected->pSoldier->aiData.sPatrolGrid[iActionParam] = iMapIndex;
|
||||
}
|
||||
gfRenderWorld = TRUE;
|
||||
}
|
||||
@@ -881,7 +882,7 @@ INT32 IsMercHere( INT32 iMapIndex )
|
||||
{
|
||||
if ( GetSoldier( &pSoldier, (INT16)IDNumber ) )
|
||||
{
|
||||
if ( pSoldier->sGridNo == (INT16)iMapIndex )
|
||||
if ( pSoldier->sGridNo == iMapIndex )
|
||||
{
|
||||
fSoldierFound = TRUE;
|
||||
RetIDNumber = IDNumber;
|
||||
@@ -1294,7 +1295,7 @@ void DisplayWayPoints(void)
|
||||
FLOAT ScrnX,ScrnY,dOffsetX,dOffsetY;
|
||||
INT8 bPoint;
|
||||
SOLDIERTYPE *pSoldier;
|
||||
INT16 sGridNo;
|
||||
INT32 sGridNo;
|
||||
|
||||
|
||||
if ( gsSelectedMercID == -1 || (gsSelectedMercID <= (INT32)gTacticalStatus.Team[ OUR_TEAM ].bLastID) || gsSelectedMercID >= MAXMERCS )
|
||||
@@ -1308,7 +1309,7 @@ void DisplayWayPoints(void)
|
||||
for ( bPoint = 1; bPoint <= pSoldier->aiData.bPatrolCnt; bPoint++ )
|
||||
{
|
||||
// Get the next point
|
||||
sGridNo = (INT16)pSoldier->aiData.sPatrolGrid[bPoint];
|
||||
sGridNo = pSoldier->aiData.sPatrolGrid[bPoint];
|
||||
|
||||
// Can we see it?
|
||||
if ( !GridNoOnVisibleWorldTile( sGridNo ) )
|
||||
@@ -1835,7 +1836,7 @@ void ExtractAndUpdateMercProfile()
|
||||
|
||||
//if the string is blank, returning -1, then set the value to NO_PROFILE
|
||||
//because ubProfile is unsigned.
|
||||
sNum = (INT16)min( GetNumericStrictValueFromField( 0 ), NUM_PROFILES );
|
||||
sNum = (INT16)min( GetNumericStrictValueFromField( 0 ), NUM_PROFILES-1 );//dnl ch54 101009
|
||||
if( sNum == -1 )
|
||||
{
|
||||
gpSelected->pDetailedPlacement->ubProfile = NO_PROFILE;
|
||||
@@ -2119,48 +2120,41 @@ void SetMercEditability( BOOLEAN fEditable )
|
||||
//points together. If one of the points is isolated, then the map will be rejected. It
|
||||
//isn't necessary to specify all four points. You wouldn't want to specify a north point if
|
||||
//there isn't going to be any traversing to adjacent maps from that side.
|
||||
void SpecifyEntryPoint( UINT32 iMapIndex )
|
||||
//dnl ch41 210909 undo is never implemented for entry points and deletion never work
|
||||
void SpecifyEntryPoint(INT32 iMapIndex)
|
||||
{
|
||||
INT16 *psEntryGridNo;
|
||||
BOOLEAN fErasing = FALSE;
|
||||
if( iDrawMode >= DRAW_MODE_ERASE )
|
||||
INT32 *psEntryGridNo;
|
||||
switch((iDrawMode>=DRAW_MODE_ERASE ? iDrawMode-DRAW_MODE_ERASE : iDrawMode))
|
||||
{
|
||||
iDrawMode -= DRAW_MODE_ERASE;
|
||||
fErasing = TRUE;
|
||||
case DRAW_MODE_NORTHPOINT:
|
||||
psEntryGridNo = &gMapInformation.sNorthGridNo;
|
||||
break;
|
||||
case DRAW_MODE_WESTPOINT:
|
||||
psEntryGridNo = &gMapInformation.sWestGridNo;
|
||||
break;
|
||||
case DRAW_MODE_EASTPOINT:
|
||||
psEntryGridNo = &gMapInformation.sEastGridNo;
|
||||
break;
|
||||
case DRAW_MODE_SOUTHPOINT:
|
||||
psEntryGridNo = &gMapInformation.sSouthGridNo;
|
||||
break;
|
||||
case DRAW_MODE_CENTERPOINT:
|
||||
psEntryGridNo = &gMapInformation.sCenterGridNo;
|
||||
break;
|
||||
case DRAW_MODE_ISOLATEDPOINT:
|
||||
psEntryGridNo = &gMapInformation.sIsolatedGridNo;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
switch( iDrawMode )
|
||||
if(iDrawMode >= DRAW_MODE_ERASE)
|
||||
{
|
||||
case DRAW_MODE_NORTHPOINT: psEntryGridNo = &gMapInformation.sNorthGridNo; break;
|
||||
case DRAW_MODE_WESTPOINT: psEntryGridNo = &gMapInformation.sWestGridNo; break;
|
||||
case DRAW_MODE_EASTPOINT: psEntryGridNo = &gMapInformation.sEastGridNo; break;
|
||||
case DRAW_MODE_SOUTHPOINT: psEntryGridNo = &gMapInformation.sSouthGridNo; break;
|
||||
case DRAW_MODE_CENTERPOINT: psEntryGridNo = &gMapInformation.sCenterGridNo; break;
|
||||
case DRAW_MODE_ISOLATEDPOINT: psEntryGridNo = &gMapInformation.sIsolatedGridNo; break;
|
||||
default: return;
|
||||
}
|
||||
if( !fErasing )
|
||||
{
|
||||
if( *psEntryGridNo >= 0 )
|
||||
{
|
||||
AddToUndoList( *psEntryGridNo );
|
||||
RemoveAllTopmostsOfTypeRange( *psEntryGridNo, FIRSTPOINTERS, FIRSTPOINTERS );
|
||||
}
|
||||
*psEntryGridNo = (INT16)iMapIndex;
|
||||
ValidateEntryPointGridNo( psEntryGridNo );
|
||||
AddToUndoList( *psEntryGridNo );
|
||||
AddTopmostToTail( *psEntryGridNo, FIRSTPOINTERS2 );
|
||||
*psEntryGridNo = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
UINT16 usDummy;
|
||||
if( TypeExistsInTopmostLayer( iMapIndex, FIRSTPOINTERS, &usDummy ) )
|
||||
{
|
||||
AddToUndoList( iMapIndex );
|
||||
RemoveAllTopmostsOfTypeRange( iMapIndex, FIRSTPOINTERS, FIRSTPOINTERS );
|
||||
*psEntryGridNo = -1;
|
||||
}
|
||||
//restore the drawmode
|
||||
iDrawMode += DRAW_MODE_ERASE;
|
||||
*psEntryGridNo = iMapIndex;
|
||||
ValidateEntryPointGridNo(psEntryGridNo);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2816,10 +2810,12 @@ void AddNewItemToSelectedMercsInventory( BOOLEAN fCreate )
|
||||
item = &Item[ gusMercsNewItemIndex ];
|
||||
uiVideoObjectIndex = GetInterfaceGraphicForItem( item );
|
||||
GetVideoObject( &hVObject, uiVideoObjectIndex );
|
||||
BltVideoObjectOutlineFromIndex( uiSrcID, uiVideoObjectIndex, item->ubGraphicNum, 0, 0, 0, FALSE );
|
||||
|
||||
UINT16 usGraphicNum = g_bUsePngItemImages ? 0 : item->ubGraphicNum;
|
||||
BltVideoObjectOutlineFromIndex( uiSrcID, uiVideoObjectIndex, usGraphicNum, 0, 0, 0, FALSE );
|
||||
|
||||
//crop the source image
|
||||
pObject = &hVObject->pETRLEObject[ item->ubGraphicNum ];
|
||||
pObject = &hVObject->pETRLEObject[ usGraphicNum ];
|
||||
iSrcWidth = pObject->usWidth;
|
||||
iSrcHeight = pObject->usHeight;
|
||||
SrcRect.iLeft += pObject->sOffsetX;
|
||||
@@ -3045,10 +3041,13 @@ void SetEnemyColorCode( UINT8 ubColorCode )
|
||||
break;
|
||||
case SOLDIER_CLASS_MINER:
|
||||
//will probably never get called
|
||||
gpSelected->pBasicPlacement->ubSoldierClass = SOLDIER_CLASS_ELITE;
|
||||
|
||||
// WANNE: Fix a vanilla bug in the editor: When selecting a miner, he was turned into an elite soldier.
|
||||
// Fixed by Tron (Straciatella): Revision: 6650
|
||||
gpSelected->pBasicPlacement->ubSoldierClass = SOLDIER_CLASS_MINER;
|
||||
gubSoldierClass = SOLDIER_CLASS_MINER;
|
||||
if( gpSelected->pDetailedPlacement )
|
||||
gpSelected->pDetailedPlacement->ubSoldierClass = SOLDIER_CLASS_ELITE;
|
||||
gpSelected->pDetailedPlacement->ubSoldierClass = SOLDIER_CLASS_MINER;
|
||||
SET_PALETTEREP_ID( gpSelected->pSoldier->VestPal, "greyVEST" );
|
||||
SET_PALETTEREP_ID( gpSelected->pSoldier->PantsPal, "BEIGEPANTS" );
|
||||
break;
|
||||
@@ -3311,7 +3310,7 @@ void RegisterCurrentScheduleAction( INT32 iMapIndex )
|
||||
if( gfSingleAction )
|
||||
return;
|
||||
iDrawMode = DRAW_MODE_PLAYER + gpSelected->pBasicPlacement->bTeam;
|
||||
gCurrSchedule.usData2[ gubCurrentScheduleActionIndex ] = (INT16)iMapIndex;
|
||||
gCurrSchedule.usData2[ gubCurrentScheduleActionIndex ] = iMapIndex;
|
||||
SpecifyButtonText( iEditorButton[ MERCS_SCHEDULE_DATA1B + gubCurrentScheduleActionIndex ], str );
|
||||
DetermineScheduleEditability();
|
||||
gubScheduleInstructions = SCHEDULE_INSTRUCTIONS_NONE;
|
||||
@@ -3354,7 +3353,7 @@ void RegisterCurrentScheduleAction( INT32 iMapIndex )
|
||||
case SCHEDULE_ACTION_NONE:
|
||||
break;
|
||||
}
|
||||
gCurrSchedule.usData1[ gubCurrentScheduleActionIndex ] = (INT16)iMapIndex;
|
||||
gCurrSchedule.usData1[ gubCurrentScheduleActionIndex ] = iMapIndex;
|
||||
SpecifyButtonText( iEditorButton[ MERCS_SCHEDULE_DATA1A + gubCurrentScheduleActionIndex ], str );
|
||||
}
|
||||
}
|
||||
@@ -3368,8 +3367,8 @@ void StartScheduleAction()
|
||||
EnableTextFields( 1, 4 );
|
||||
gubScheduleInstructions = SCHEDULE_INSTRUCTIONS_NONE;
|
||||
gfRenderTaskbar = TRUE;
|
||||
gCurrSchedule.usData1[ gubCurrentScheduleActionIndex ] = 0xffff;
|
||||
gCurrSchedule.usData2[ gubCurrentScheduleActionIndex ] = 0xffff;
|
||||
gCurrSchedule.usData1[ gubCurrentScheduleActionIndex ] = 0xffffffff;
|
||||
gCurrSchedule.usData2[ gubCurrentScheduleActionIndex ] = 0xffffffff;
|
||||
break;
|
||||
case SCHEDULE_ACTION_LOCKDOOR:
|
||||
case SCHEDULE_ACTION_UNLOCKDOOR:
|
||||
@@ -3398,14 +3397,14 @@ void StartScheduleAction()
|
||||
iDrawMode = DRAW_MODE_SCHEDULEACTION;
|
||||
gubScheduleInstructions = SCHEDULE_INSTRUCTIONS_GRIDNO;
|
||||
gfRenderTaskbar = TRUE;
|
||||
gCurrSchedule.usData2[ gubCurrentScheduleActionIndex ] = 0xffff;
|
||||
gCurrSchedule.usData2[ gubCurrentScheduleActionIndex ] = 0xffffffff;
|
||||
break;
|
||||
case SCHEDULE_ACTION_LEAVESECTOR:
|
||||
case SCHEDULE_ACTION_STAYINSECTOR:
|
||||
gubScheduleInstructions = SCHEDULE_INSTRUCTIONS_NONE;
|
||||
gfRenderTaskbar = TRUE;
|
||||
gCurrSchedule.usData1[ gubCurrentScheduleActionIndex ] = 0xffff;
|
||||
gCurrSchedule.usData2[ gubCurrentScheduleActionIndex ] = 0xffff;
|
||||
gCurrSchedule.usData1[ gubCurrentScheduleActionIndex ] = 0xffffffff;
|
||||
gCurrSchedule.usData2[ gubCurrentScheduleActionIndex ] = 0xffffffff;
|
||||
break;
|
||||
}
|
||||
MarkWorldDirty();
|
||||
@@ -3425,7 +3424,7 @@ void UpdateScheduleAction( UINT8 ubNewAction )
|
||||
// 0:1A, 1:1B, 2:2A, 3:2B, ...
|
||||
void FindScheduleGridNo( UINT8 ubScheduleData )
|
||||
{
|
||||
INT32 iMapIndex;
|
||||
INT32 iMapIndex = 0xffffffff;
|
||||
switch( ubScheduleData )
|
||||
{
|
||||
case 0: //1a
|
||||
@@ -3455,7 +3454,7 @@ void FindScheduleGridNo( UINT8 ubScheduleData )
|
||||
default:
|
||||
AssertMsg( 0, "FindScheduleGridNo passed incorrect dataID." );
|
||||
}
|
||||
if( iMapIndex != 0xffff )
|
||||
if( iMapIndex != 0xffffffff )
|
||||
{
|
||||
CenterScreenAtMapIndex( iMapIndex );
|
||||
}
|
||||
@@ -3471,9 +3470,9 @@ void ClearCurrentSchedule()
|
||||
SpecifyButtonText( iEditorButton[ MERCS_SCHEDULE_ACTION1 + i ], L"No action" );
|
||||
gCurrSchedule.usTime[i] = 0xffff;
|
||||
SetExclusive24HourTimeValue( (UINT8)(i+1), gCurrSchedule.usTime[ i ] ); //blanks the field
|
||||
gCurrSchedule.usData1[i] = 0xffff;
|
||||
gCurrSchedule.usData1[i] = 0xffffffff;
|
||||
SpecifyButtonText( iEditorButton[ MERCS_SCHEDULE_DATA1A + i ], L"" );
|
||||
gCurrSchedule.usData2[i] = 0xffff;
|
||||
gCurrSchedule.usData2[i] = 0xffffffff;
|
||||
SpecifyButtonText( iEditorButton[ MERCS_SCHEDULE_DATA1B + i ], L"" );
|
||||
}
|
||||
//Remove the variance stuff
|
||||
@@ -3507,7 +3506,7 @@ void RenderCurrentSchedule()
|
||||
continue;
|
||||
|
||||
// Convert it's location to screen coordinates
|
||||
ConvertGridNoToXY( (INT16)iMapIndex, &sXMapPos, &sYMapPos );
|
||||
ConvertGridNoToXY( iMapIndex, &sXMapPos, &sYMapPos );
|
||||
|
||||
dOffsetX = (FLOAT)(sXMapPos * CELL_X_SIZE) - gsRenderCenterX;
|
||||
dOffsetY = (FLOAT)(sYMapPos * CELL_Y_SIZE) - gsRenderCenterY;
|
||||
@@ -3552,11 +3551,11 @@ void UpdateScheduleInfo()
|
||||
MSYS_SetBtnUserData( iEditorButton[ MERCS_SCHEDULE_ACTION1 + i ], 0, pSchedule->ubAction[i] );
|
||||
SpecifyButtonText( iEditorButton[ MERCS_SCHEDULE_ACTION1 + i ], gszScheduleActions[ pSchedule->ubAction[i] ] );
|
||||
swprintf( str, L"" );
|
||||
if( pSchedule->usData1[i] != 0xffff )
|
||||
if( pSchedule->usData1[i] != 0xffffffff )
|
||||
swprintf( str, L"%d", pSchedule->usData1[i] );
|
||||
SpecifyButtonText( iEditorButton[ MERCS_SCHEDULE_DATA1A + i ], str );
|
||||
swprintf( str, L"" );
|
||||
if( pSchedule->usData2[i] != 0xffff )
|
||||
if( pSchedule->usData2[i] != 0xffffffff )
|
||||
swprintf( str, L"%d", pSchedule->usData2[i] );
|
||||
SpecifyButtonText( iEditorButton[ MERCS_SCHEDULE_DATA1B + i ], str );
|
||||
if( gubCurrMercMode == MERC_SCHEDULEMODE )
|
||||
@@ -3658,7 +3657,7 @@ void PasteMercPlacement( INT32 iMapIndex )
|
||||
|
||||
//Set up some general information.
|
||||
//gTempBasicPlacement.fDetailedPlacement = TRUE;
|
||||
gTempBasicPlacement.sStartingGridNo = (INT16)iMapIndex;
|
||||
gTempBasicPlacement.usStartingGridNo = iMapIndex;
|
||||
|
||||
//Generate detailed placement information given the temp placement information.
|
||||
if( gTempBasicPlacement.fDetailedPlacement )
|
||||
|
||||
@@ -52,7 +52,7 @@ extern UINT8 gubCurrMercMode, gubPrevMercMode;
|
||||
extern STR16 zDiffNames[NUM_DIFF_LVLS];
|
||||
extern INT16 sCurBaseDiff;
|
||||
extern INT16 gsSelectedMercID;
|
||||
extern INT16 gsSelectedMercGridNo;
|
||||
extern INT32 gsSelectedMercGridNo;
|
||||
extern UINT8 gubCurrMercMode;
|
||||
|
||||
enum _ForUseWithIndicateSelectedMerc
|
||||
@@ -82,11 +82,11 @@ void SetMercEditingMode( UINT8 ubNewMode );
|
||||
void ResetAllMercPositions();
|
||||
|
||||
void EraseMercWaypoint();
|
||||
void AddMercWaypoint( UINT32 iMapIndex );
|
||||
void AddMercWaypoint( INT32 iMapIndex );
|
||||
|
||||
void SetEnemyColorCode( UINT8 ubColorCode );
|
||||
|
||||
void SpecifyEntryPoint( UINT32 iMapIndex );
|
||||
void SpecifyEntryPoint(INT32 iMapIndex);//dnl ch41 290909
|
||||
|
||||
//Modify stats of current soldiers
|
||||
void SetMercOrders( INT8 bOrders );
|
||||
|
||||
@@ -231,7 +231,7 @@ void Fill( INT32 x, INT32 y )
|
||||
maxCount = Count;
|
||||
|
||||
iMapIndex = y * WORLD_COLS + x;
|
||||
if( !GridNoOnVisibleWorldTile( (INT16)iMapIndex ) )
|
||||
if( !GridNoOnVisibleWorldTile( iMapIndex ) )
|
||||
{
|
||||
Count--;
|
||||
return;
|
||||
@@ -266,7 +266,7 @@ void Fill( INT32 x, INT32 y )
|
||||
}
|
||||
|
||||
|
||||
void TerrainFill( UINT32 iMapIndex )
|
||||
void TerrainFill( INT32 iMapIndex )
|
||||
{
|
||||
INT16 sX, sY;
|
||||
//determine what we should be looking for to replace...
|
||||
@@ -276,7 +276,7 @@ void TerrainFill( UINT32 iMapIndex )
|
||||
if( guiSearchType == CurrentPaste )
|
||||
return;
|
||||
|
||||
ConvertGridNoToXY( (INT16)iMapIndex, &sX, &sY );
|
||||
ConvertGridNoToXY( iMapIndex, &sX, &sY );
|
||||
|
||||
Count = 0;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ void HideTerrainTileButtons();
|
||||
|
||||
void ChooseWeightedTerrainTile();
|
||||
|
||||
void TerrainFill( UINT32 iMapIndex );
|
||||
void TerrainFill( INT32 iMapIndex );
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -267,6 +267,68 @@
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release_WithDebugInfo|Win32"
|
||||
OutputDirectory="$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="..\ja2_2005Express.vsprops"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/D "_CRT_SECURE_NO_DEPRECATE""
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\Multiplayer"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;"
|
||||
RuntimeLibrary="0"
|
||||
RuntimeTypeInfo="false"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
|
||||
@@ -268,6 +268,70 @@
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release_WithDebugInfo|Win32"
|
||||
OutputDirectory="..\lib\VS2008\$(ConfigurationName)"
|
||||
IntermediateDirectory="..\build\VS2008\$(ProjectName)_$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="..\ja2_VS2008.vsprops"
|
||||
CharacterSet="0"
|
||||
WholeProgramOptimization="0"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
EnableIntrinsicFunctions="true"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="false"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
|
||||
@@ -178,7 +178,7 @@ INT8 gbEditingMode = EDITING_NOTHING;
|
||||
|
||||
OBJECTTYPE *gpItem = NULL;
|
||||
BOOLEAN gfShowItemStatsPanel;
|
||||
INT16 gsItemGridNo;
|
||||
INT32 gsItemGridNo;
|
||||
|
||||
ITEM_POOL *gpEditingItemPool = NULL;
|
||||
extern ITEM_POOL *gpItemPool;
|
||||
@@ -355,7 +355,7 @@ void SpecifyItemToEdit( OBJECTTYPE *pItem, INT32 iMapIndex )
|
||||
{
|
||||
gpEditingItemPool = gpItemPool;
|
||||
}
|
||||
gsItemGridNo = (INT16)iMapIndex;
|
||||
gsItemGridNo = iMapIndex;
|
||||
}
|
||||
else
|
||||
RemoveItemGUI();
|
||||
|
||||
@@ -43,7 +43,7 @@ enum
|
||||
void ExecuteItemStatsCmd( UINT8 ubAction );
|
||||
|
||||
extern OBJECTTYPE *gpItem;
|
||||
extern INT16 gsItemGridNo;
|
||||
extern INT32 gsItemGridNo;
|
||||
|
||||
//enumerations for all of the different action items. Used by the popup menu for
|
||||
//changing the type of action item. When modified, an equivalent text array must be
|
||||
|
||||
+249
-137
@@ -43,6 +43,7 @@
|
||||
#include "Item Statistics.h"
|
||||
#include "Scheduling.h"
|
||||
#include "MessageBoxScreen.h"
|
||||
#include "VFS/vfs.h"//dnl ch37 110909
|
||||
#endif
|
||||
|
||||
//===========================================================================
|
||||
@@ -77,7 +78,8 @@ UINT32 ProcessLoadSaveScreenMessageBoxResult();
|
||||
BOOLEAN RemoveFromFDlgList( FDLG_LIST **head, FDLG_LIST *node );
|
||||
|
||||
void DrawFileDialog();
|
||||
void HandleMainKeyEvents( InputAtom *pEvent );
|
||||
void HandleMainKeyEvents( InputAtom *pEvent );
|
||||
void HandleMouseWheelEvents(void);//dnl ch36 150909
|
||||
void SetTopFileToLetter( UINT16 usLetter );
|
||||
|
||||
INT32 iTotalFiles;
|
||||
@@ -86,7 +88,7 @@ INT32 iCurrFileShown;
|
||||
INT32 iLastFileClicked;
|
||||
INT32 iLastClickTime;
|
||||
|
||||
CHAR16 gzFilename[31];
|
||||
CHAR16 gzFilename[FILENAME_BUFLEN];//dnl ch39 190909
|
||||
extern INT16 gsSelSectorX;
|
||||
extern INT16 gsSelSectorY;
|
||||
|
||||
@@ -102,6 +104,7 @@ BOOLEAN gfFileExists;
|
||||
BOOLEAN gfIllegalName;
|
||||
BOOLEAN gfDeleteFile;
|
||||
BOOLEAN gfNoFiles;
|
||||
BOOLEAN gfSaveError;//dnl ch37 200909
|
||||
|
||||
CHAR16 zOrigName[60];
|
||||
GETFILESTRUCT FileInfo;
|
||||
@@ -148,6 +151,7 @@ void LoadSaveScreenEntry()
|
||||
gfIllegalName = FALSE;
|
||||
gfDeleteFile = FALSE;
|
||||
gfNoFiles = FALSE;
|
||||
gfSaveError = FALSE;//dnl ch37 200909
|
||||
|
||||
// setup filename dialog box
|
||||
// (*.dat and *.map) as file filter
|
||||
@@ -155,22 +159,86 @@ void LoadSaveScreenEntry()
|
||||
// If user clicks on a filename in the window, then turn off string focus and re-init the string with the new name.
|
||||
// If user hits ENTER or presses OK, then continue with the file loading/saving
|
||||
|
||||
if( FileList )
|
||||
TrashFDlgList( FileList );
|
||||
if(FileList)
|
||||
{
|
||||
TrashFDlgList(FileList);
|
||||
FileList = NULL;
|
||||
}
|
||||
|
||||
iTopFileShown = iTotalFiles = 0;
|
||||
if( GetFileFirst("MAPS\\*.dat", &FileInfo) )
|
||||
#ifdef USE_VFS//dnl ch37 300909
|
||||
FDLG_LIST* TempFileList = NULL;
|
||||
vfs::CProfileStack* st = getVFS()->getProfileStack();
|
||||
vfs::CProfileStack::Iterator it = st->begin();
|
||||
while(!it.end())
|
||||
{
|
||||
FileList = AddToFDlgList( FileList, &FileInfo );
|
||||
iTotalFiles++;
|
||||
while( GetFileNext(&FileInfo) )
|
||||
TempFileList = NULL;
|
||||
vfs::CVirtualProfile* prof = it.value();
|
||||
memset(&FileInfo, 0, sizeof(GETFILESTRUCT));
|
||||
strcpy(FileInfo.zFileName, "< ");
|
||||
strcat(FileInfo.zFileName, prof->cName.utf8().c_str());
|
||||
strcat(FileInfo.zFileName, " >");
|
||||
FileInfo.zFileName[FILENAME_BUFLEN] = 0;
|
||||
FileInfo.uiFileAttribs = FILE_IS_DIRECTORY;
|
||||
if(iCurrentAction == ACTION_SAVE_MAP && prof->cWritable == false)
|
||||
{
|
||||
FileList = AddToFDlgList( FileList, &FileInfo );
|
||||
it.next();
|
||||
continue;
|
||||
}
|
||||
TempFileList = AddToFDlgList(TempFileList, &FileInfo);
|
||||
iTotalFiles++;
|
||||
vfs::CVirtualProfile::FileIterator fit = prof->files(L"MAPS/*");
|
||||
while(!fit.end())
|
||||
{
|
||||
utf8string fname = fit.value()->getName().c_str();
|
||||
memset(&FileInfo, 0, sizeof(GETFILESTRUCT));
|
||||
strcpy(FileInfo.zFileName, fname.utf8().c_str());
|
||||
FileInfo.uiFileSize = fname.length();
|
||||
FileInfo.uiFileAttribs = (fit.value()->implementsWritable() ? FILE_IS_NORMAL : FILE_IS_READONLY);
|
||||
if(strlen(FileInfo.zFileName) < FILENAME_BUFLEN)
|
||||
{
|
||||
TempFileList = AddToFDlgList(TempFileList, &FileInfo);
|
||||
iTotalFiles++;
|
||||
}
|
||||
fit.next();
|
||||
}
|
||||
if(TempFileList)
|
||||
{
|
||||
while(TempFileList->pPrev)
|
||||
TempFileList = TempFileList->pPrev;
|
||||
if(FileList)
|
||||
{
|
||||
while(FileList->pNext)
|
||||
FileList = FileList->pNext;
|
||||
FileList->pNext = TempFileList;
|
||||
TempFileList->pPrev = FileList;
|
||||
}
|
||||
else
|
||||
FileList = TempFileList;
|
||||
}
|
||||
it.next();
|
||||
}
|
||||
while(FileList->pPrev)
|
||||
FileList = FileList->pPrev;
|
||||
#else
|
||||
if(GetFileFirst("MAPS\\*.dat", &FileInfo))
|
||||
{
|
||||
if(strlen(FileInfo.zFileName) < FILENAME_BUFLEN)
|
||||
{
|
||||
FileList = AddToFDlgList(FileList, &FileInfo);
|
||||
iTotalFiles++;
|
||||
}
|
||||
while(GetFileNext(&FileInfo))
|
||||
{
|
||||
if(strlen(FileInfo.zFileName) < FILENAME_BUFLEN)
|
||||
{
|
||||
FileList = AddToFDlgList(FileList, &FileInfo);
|
||||
iTotalFiles++;
|
||||
}
|
||||
}
|
||||
GetFileClose(&FileInfo);
|
||||
}
|
||||
|
||||
#endif
|
||||
swprintf( zOrigName, L"%s Map (*.dat)", iCurrentAction == ACTION_SAVE_MAP ? L"Save" : L"Load" );
|
||||
|
||||
swprintf( gzFilename, L"%S", gubFilename );
|
||||
@@ -260,10 +328,12 @@ UINT32 ProcessLoadSaveScreenMessageBoxResult()
|
||||
iFDlgState = DIALOG_NONE;
|
||||
return LOADSAVE_SCREEN;
|
||||
}
|
||||
if( gfLoadError )
|
||||
if(gfLoadError || gfSaveError)//dnl ch37 200909
|
||||
{
|
||||
MarkWorldDirty();
|
||||
RenderWorld();
|
||||
fEnteringLoadSaveScreen = TRUE;
|
||||
return gfMessageBoxResult ? LOADSAVE_SCREEN : EDIT_SCREEN;
|
||||
return(gfMessageBoxResult ? LOADSAVE_SCREEN : EDIT_SCREEN);
|
||||
}
|
||||
if( gfReadOnly )
|
||||
{ //file is readonly. Result will determine if the file dialog stays up.
|
||||
@@ -281,7 +351,7 @@ UINT32 ProcessLoadSaveScreenMessageBoxResult()
|
||||
}
|
||||
fEnteringLoadSaveScreen = TRUE;
|
||||
RemoveFileDialog();
|
||||
return EDIT_SCREEN ;
|
||||
return(LOADSAVE_SCREEN);//dnl ch36 210909
|
||||
}
|
||||
// Assert( 0 );
|
||||
return LOADSAVE_SCREEN;
|
||||
@@ -313,16 +383,18 @@ UINT32 LoadSaveScreenHandle(void)
|
||||
return ProcessLoadSaveScreenMessageBoxResult();
|
||||
return LOADSAVE_SCREEN;
|
||||
}
|
||||
|
||||
|
||||
//handle all key input.
|
||||
while( DequeueEvent(&DialogEvent) )
|
||||
{
|
||||
if( !HandleTextInput(&DialogEvent) && (DialogEvent.usEvent == KEY_DOWN || DialogEvent.usEvent == KEY_REPEAT) )
|
||||
{
|
||||
{
|
||||
HandleMainKeyEvents( &DialogEvent );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
HandleMouseWheelEvents();//dnl ch36 150909
|
||||
|
||||
DrawFileDialog();
|
||||
|
||||
// Skip to first filename to show
|
||||
@@ -385,34 +457,66 @@ UINT32 LoadSaveScreenHandle(void)
|
||||
CreateMessageBox( str );
|
||||
}
|
||||
return LOADSAVE_SCREEN;
|
||||
case DIALOG_SAVE:
|
||||
if( !ExtractFilenameFromFields() )
|
||||
case DIALOG_SAVE://dnl ch37 230909
|
||||
{
|
||||
if(!ExtractFilenameFromFields())
|
||||
{
|
||||
CreateMessageBox( L" Illegal filename. Try another filename? " );
|
||||
CreateMessageBox(L" Illegal filename. Try another filename? ");
|
||||
gfIllegalName = TRUE;
|
||||
iFDlgState = DIALOG_NONE;
|
||||
return LOADSAVE_SCREEN;
|
||||
return(LOADSAVE_SCREEN);
|
||||
}
|
||||
sprintf( gszCurrFilename, "MAPS\\%S", gzFilename );
|
||||
if ( FileExists( gszCurrFilename ) )
|
||||
sprintf(gszCurrFilename, "MAPS\\%S", gzFilename);
|
||||
gfFileExists = FALSE;
|
||||
#ifndef USE_VFS
|
||||
gfReadOnly = FALSE;
|
||||
if(FileExists(gszCurrFilename))
|
||||
{
|
||||
gfFileExists = TRUE;
|
||||
gfReadOnly = FALSE;
|
||||
if( GetFileFirst(gszCurrFilename, &FileInfo) )
|
||||
if(GetFileFirst(gszCurrFilename, &FileInfo))
|
||||
{
|
||||
if( FileInfo.uiFileAttribs & (FILE_IS_READONLY|FILE_IS_DIRECTORY|FILE_IS_HIDDEN|FILE_IS_SYSTEM|FILE_IS_OFFLINE|FILE_IS_TEMPORARY) )
|
||||
if(FileInfo.uiFileAttribs & (FILE_IS_READONLY|FILE_IS_DIRECTORY|FILE_IS_HIDDEN|FILE_IS_SYSTEM|FILE_IS_OFFLINE|FILE_IS_TEMPORARY))
|
||||
gfReadOnly = TRUE;
|
||||
GetFileClose(&FileInfo);
|
||||
}
|
||||
if( gfReadOnly )
|
||||
CreateMessageBox( L" File is read only! Choose a different name? " );
|
||||
else
|
||||
CreateMessageBox( L" File exists, Overwrite? " );
|
||||
return( LOADSAVE_SCREEN );
|
||||
}
|
||||
}
|
||||
#else
|
||||
gfReadOnly = TRUE;
|
||||
vfs::CProfileStack* st = getVFS()->getProfileStack();
|
||||
vfs::CProfileStack::Iterator it = st->begin();
|
||||
while(!it.end())
|
||||
{
|
||||
vfs::CVirtualProfile* prof = it.value();
|
||||
if(prof->cWritable == true)
|
||||
{
|
||||
gfReadOnly = FALSE;
|
||||
vfs::Path const& path = gszCurrFilename;
|
||||
vfs::IBaseFile *file = prof->getFile(path);
|
||||
if(file)
|
||||
{
|
||||
gfFileExists = TRUE;
|
||||
if(file->implementsWritable() == false)
|
||||
gfReadOnly = TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
it.next();
|
||||
}
|
||||
#endif
|
||||
if(gfReadOnly)
|
||||
{
|
||||
CreateMessageBox(L" File is read only! Choose a different name? ");
|
||||
return( LOADSAVE_SCREEN);
|
||||
}
|
||||
else if(gfFileExists)
|
||||
{
|
||||
CreateMessageBox(L" File exists, Overwrite? ");
|
||||
return(LOADSAVE_SCREEN);
|
||||
}
|
||||
RemoveFileDialog();
|
||||
gbCurrentFileIOStatus = INITIATE_MAP_SAVE;
|
||||
return LOADSAVE_SCREEN ;
|
||||
return(LOADSAVE_SCREEN);
|
||||
}
|
||||
case DIALOG_LOAD:
|
||||
if( !ExtractFilenameFromFields() )
|
||||
{
|
||||
@@ -451,14 +555,11 @@ void CreateFileDialog( STR16 zTitle )
|
||||
iFileDlgButtons[1] = CreateTextButton( L"Cancel", FONT12POINT1, FONT_BLACK, FONT_BLACK,
|
||||
BUTTON_USE_DEFAULT, iScreenWidthOffset + 406, iScreenHeightOffset + 225, 50, 30, BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGH, DEFAULT_MOVE_CALLBACK, FDlgCancelCallback );
|
||||
|
||||
//Scroll buttons
|
||||
iFileDlgButtons[2] = CreateSimpleButton( iScreenWidthOffset + 426, iScreenHeightOffset + 92,"EDITOR//uparrow.sti", BUTTON_NO_TOGGLE,
|
||||
MSYS_PRIORITY_HIGH, FDlgUpCallback );
|
||||
iFileDlgButtons[3] = CreateSimpleButton( iScreenWidthOffset + 426, iScreenHeightOffset + 182,"EDITOR//downarrow.sti", BUTTON_NO_TOGGLE,
|
||||
MSYS_PRIORITY_HIGH, FDlgDwnCallback );
|
||||
//dnl ch36 150909 Scroll buttons
|
||||
iFileDlgButtons[2] = CreateSimpleButton(iScreenWidthOffset+426, iScreenHeightOffset+92-19, "EDITOR//uparrow.sti", BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGH, FDlgUpCallback);
|
||||
iFileDlgButtons[3] = CreateSimpleButton(iScreenWidthOffset+426, iScreenHeightOffset+182-19, "EDITOR//downarrow.sti", BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGH, FDlgDwnCallback);
|
||||
|
||||
//File list window
|
||||
|
||||
iFileDlgButtons[4] = CreateHotSpot( (iScreenWidthOffset + 179+4), (iScreenHeightOffset + 69+3), (179+4+240), (69+120+3), MSYS_PRIORITY_HIGH-1, BUTTON_NO_CALLBACK, FDlgNamesCallback);
|
||||
//Title button
|
||||
iFileDlgButtons[5] = CreateTextButton(zTitle, HUGEFONT, FONT_LTKHAKI, FONT_DKKHAKI,
|
||||
@@ -478,8 +579,8 @@ void CreateFileDialog( STR16 zTitle )
|
||||
|
||||
//Add the text input fields
|
||||
InitTextInputModeWithScheme( DEFAULT_SCHEME );
|
||||
//field 1 (filename)
|
||||
AddTextInputField( /*233*/iScreenWidthOffset + 183, iScreenHeightOffset + 195, 190, 20, MSYS_PRIORITY_HIGH, gzFilename, 30, INPUTTYPE_EXCLUSIVE_DOSFILENAME );
|
||||
//dnl ch36 150909 field 1 (filename)
|
||||
AddTextInputField(iScreenWidthOffset+183, iScreenHeightOffset+195, 240, 20, MSYS_PRIORITY_HIGH, gzFilename, (FILENAME_BUFLEN-1), INPUTTYPE_EXCLUSIVE_DOSFILENAME);
|
||||
//field 2 -- user field that allows mouse/key interaction with the filename list
|
||||
AddUserInputField( FileDialogModeCallback );
|
||||
|
||||
@@ -537,6 +638,7 @@ void RemoveFileDialog(void)
|
||||
}
|
||||
|
||||
TrashFDlgList( FileList );
|
||||
|
||||
FileList = NULL;
|
||||
|
||||
InvalidateScreen( );
|
||||
@@ -550,13 +652,13 @@ void RemoveFileDialog(void)
|
||||
|
||||
void DrawFileDialog(void)
|
||||
{
|
||||
ColorFillVideoSurfaceArea(FRAME_BUFFER, iScreenWidthOffset + 179, iScreenHeightOffset + 69, (iScreenWidthOffset + 179+281), iScreenHeightOffset + 261, Get16BPPColor(FROMRGB(136, 138, 135)) );
|
||||
ColorFillVideoSurfaceArea(FRAME_BUFFER, iScreenWidthOffset + 180, 70, (iScreenWidthOffset + 179+281), iScreenHeightOffset + 261, Get16BPPColor(FROMRGB(24, 61, 81)) );
|
||||
ColorFillVideoSurfaceArea(FRAME_BUFFER, iScreenWidthOffset + 180, 70, (iScreenWidthOffset + 179+280), iScreenHeightOffset + 260, Get16BPPColor(FROMRGB(65, 79, 94)) );
|
||||
|
||||
ColorFillVideoSurfaceArea(FRAME_BUFFER, (iScreenWidthOffset + 179+4), (iScreenHeightOffset + 69+3), (iScreenWidthOffset + 179+4+240), (iScreenHeightOffset + 69+123), Get16BPPColor(FROMRGB(24, 61, 81)) );
|
||||
ColorFillVideoSurfaceArea(FRAME_BUFFER, (iScreenWidthOffset + 179+5), (iScreenHeightOffset + 69+4), (iScreenWidthOffset + 179+4+240), (iScreenHeightOffset + 69+123), Get16BPPColor(FROMRGB(136, 138, 135)) );
|
||||
ColorFillVideoSurfaceArea(FRAME_BUFFER, (iScreenWidthOffset + 179+5), (iScreenHeightOffset + 69+4), (iScreenWidthOffset + 179+3+240), (iScreenHeightOffset + 69+122), Get16BPPColor(FROMRGB(250, 240, 188)) );
|
||||
//dnl ch36 150909
|
||||
ColorFillVideoSurfaceArea(FRAME_BUFFER, iScreenWidthOffset+179, iScreenHeightOffset+69, iScreenWidthOffset+179+281, iScreenHeightOffset+261, Get16BPPColor(FROMRGB(136, 138, 135)));
|
||||
ColorFillVideoSurfaceArea(FRAME_BUFFER, iScreenWidthOffset+180, iScreenHeightOffset+70, iScreenWidthOffset+179+281, iScreenHeightOffset+261, Get16BPPColor(FROMRGB(24, 61, 81)));
|
||||
ColorFillVideoSurfaceArea(FRAME_BUFFER, iScreenWidthOffset+180, iScreenHeightOffset+70, iScreenWidthOffset+179+280, iScreenHeightOffset+260, Get16BPPColor(FROMRGB(65, 79, 94)));
|
||||
ColorFillVideoSurfaceArea(FRAME_BUFFER, iScreenWidthOffset+179+4, iScreenHeightOffset+69+3, iScreenWidthOffset+179+4+240, iScreenHeightOffset+69+123, Get16BPPColor(FROMRGB(24, 61, 81)));
|
||||
ColorFillVideoSurfaceArea(FRAME_BUFFER, iScreenWidthOffset+179+5, iScreenHeightOffset+69+4, iScreenWidthOffset+179+4+240, iScreenHeightOffset+69+123, Get16BPPColor(FROMRGB(136, 138, 135)));
|
||||
ColorFillVideoSurfaceArea(FRAME_BUFFER, iScreenWidthOffset+179+5, iScreenHeightOffset+69+4, iScreenWidthOffset+179+3+240, iScreenHeightOffset+69+122, Get16BPPColor(FROMRGB(250, 240, 188)));
|
||||
|
||||
MarkButtonsDirty();
|
||||
RenderButtons();
|
||||
@@ -687,6 +789,13 @@ void TrashFDlgList(FDLG_LIST *pList)
|
||||
{
|
||||
FDLG_LIST *pNode;
|
||||
|
||||
while(pList)//dnl ch49 061009 Rewind, just to be sure
|
||||
{
|
||||
if(pList->pPrev)
|
||||
pList = pList->pPrev;
|
||||
else
|
||||
break;
|
||||
}
|
||||
while(pList != NULL)
|
||||
{
|
||||
pNode = pList;
|
||||
@@ -821,36 +930,25 @@ void HandleMainKeyEvents( InputAtom *pEvent )
|
||||
}
|
||||
}
|
||||
|
||||
//editor doesn't care about the z value. It uses it's own methods.
|
||||
void SetGlobalSectorValues( STR16 szFilename )
|
||||
void HandleMouseWheelEvents(void)//dnl ch36 150909
|
||||
{
|
||||
STR16 pStr;
|
||||
if( ValidCoordinate() )
|
||||
if(_WheelValue > 0)
|
||||
{
|
||||
//convert the coordinate string into into the actual global sector coordinates.
|
||||
if( gzFilename[0] >= 'A' && gzFilename[0] <= 'P' )
|
||||
gWorldSectorY = gzFilename[0] - 'A' + 1;
|
||||
else
|
||||
gWorldSectorY = gzFilename[0] - 'a' + 1;
|
||||
if( gzFilename[1] == '1' && gzFilename[2] >= '0' && gzFilename[2] <= '6' )
|
||||
gWorldSectorX = ( gzFilename[1] - 0x30 ) * 10 + ( gzFilename[2] - 0x30 );
|
||||
else
|
||||
gWorldSectorX = ( gzFilename[1] - 0x30 );
|
||||
pStr = wcsstr( gzFilename, L"_b" );
|
||||
if( pStr )
|
||||
while(_WheelValue--)
|
||||
{
|
||||
if( pStr[ 2 ] >= '1' && pStr[ 2 ] <= '3' )
|
||||
{
|
||||
gbWorldSectorZ = (INT8)(pStr[ 2 ] - 0x30);
|
||||
}
|
||||
if(iTopFileShown > 0)
|
||||
iTopFileShown--;
|
||||
}
|
||||
}
|
||||
else
|
||||
else if(_WheelValue < 0)
|
||||
{
|
||||
gWorldSectorX = -1;
|
||||
gWorldSectorY = -1;
|
||||
gbWorldSectorZ = 0;
|
||||
while(_WheelValue++)
|
||||
{
|
||||
if((iTopFileShown+7) < iTotalFiles)
|
||||
iTopFileShown++;
|
||||
}
|
||||
}
|
||||
_WheelValue = 0;
|
||||
}
|
||||
|
||||
void InitErrorCatchDialog()
|
||||
@@ -873,6 +971,7 @@ UINT32 ProcessFileIO()
|
||||
{
|
||||
INT16 usStartX, usStartY;
|
||||
CHAR8 ubNewFilename[50];
|
||||
BOOLEAN fAltMap;//dnl ch31 150909
|
||||
switch( gbCurrentFileIOStatus )
|
||||
{
|
||||
case INITIATE_MAP_SAVE: //draw save message
|
||||
@@ -897,23 +996,34 @@ UINT32 ProcessFileIO()
|
||||
if( gfShowPits )
|
||||
RemoveAllPits();
|
||||
OptimizeSchedules();
|
||||
if ( !SaveWorld( ubNewFilename ) )
|
||||
ShowHighGround(4);//dnl ch41 210909
|
||||
//dnl ch33 091009
|
||||
BOOLEAN fRet;
|
||||
if(gfVanillaMode && iNewMapWorldRows == OLD_WORLD_ROWS && iNewMapWorldCols == OLD_WORLD_COLS)
|
||||
fRet = SaveWorld(ubNewFilename, VANILLA_MAJOR_MAP_VERSION, VANILLA_MINOR_MAP_VERSION);
|
||||
else
|
||||
fRet = SaveWorld(ubNewFilename);
|
||||
if(!fRet)
|
||||
{
|
||||
if( gfErrorCatch )
|
||||
//dnl ch37 150909
|
||||
gfSaveError = TRUE;
|
||||
if(gfErrorCatch)
|
||||
{
|
||||
InitErrorCatchDialog();
|
||||
return EDIT_SCREEN;
|
||||
return(EDIT_SCREEN);
|
||||
}
|
||||
return ERROR_SCREEN;
|
||||
gbCurrentFileIOStatus = IOSTATUS_NONE;
|
||||
utf8string msg = utf8string(" Error saving ") + ubNewFilename + utf8string(" file. Try another filename? ");
|
||||
CreateMessageBox((STR16)msg.c_wcs().c_str());
|
||||
return(guiCurrentScreen);
|
||||
}
|
||||
if( gfShowPits )
|
||||
AddAllPits();
|
||||
|
||||
SetGlobalSectorValues( gzFilename );
|
||||
|
||||
GetSectorFromFileName(gzFilename, gWorldSectorX, gWorldSectorY, gbWorldSectorZ, fAltMap);//dnl ch31 140909
|
||||
if( gfGlobalSummaryExists )
|
||||
UpdateSectorSummary( gzFilename, gfUpdateSummaryInfo );
|
||||
|
||||
else//dnl ch30 150909
|
||||
ReEvaluateWorld(ubNewFilename);
|
||||
iCurrentAction = ACTION_NULL;
|
||||
gbCurrentFileIOStatus = IOSTATUS_NONE;
|
||||
gfRenderWorld = TRUE;
|
||||
@@ -925,8 +1035,6 @@ UINT32 ProcessFileIO()
|
||||
InitErrorCatchDialog();
|
||||
return EDIT_SCREEN;
|
||||
}
|
||||
if( gMapInformation.ubMapVersion != gubMinorMapVersion )
|
||||
ScreenMsg( FONT_MCOLOR_RED, MSG_ERROR, L"Map data has just been corrupted!!! What did you just do? KM : 0" );
|
||||
return EDIT_SCREEN;
|
||||
case INITIATE_MAP_LOAD: //draw load message
|
||||
SaveFontSettings();
|
||||
@@ -941,22 +1049,20 @@ UINT32 ProcessFileIO()
|
||||
|
||||
RemoveMercsInSector( );
|
||||
|
||||
//CHRISL: What happens if we EvaluateWorld at this point?
|
||||
if( !ReEvaluateWorld( ubNewFilename ) || !LoadWorld( ubNewFilename ) )
|
||||
{ //Want to override crash, so user can do something else.
|
||||
// Want to override crash, so user can do something else.
|
||||
if(!ReEvaluateWorld(ubNewFilename) || !LoadWorld(ubNewFilename))//dnl ch36 140909
|
||||
{
|
||||
EnableUndo();
|
||||
SetPendingNewScreen( LOADSAVE_SCREEN );
|
||||
gbCurrentFileIOStatus = IOSTATUS_NONE;
|
||||
gfGlobalError = FALSE;
|
||||
gfLoadError = TRUE;
|
||||
//RemoveButton( iTempButton );
|
||||
CreateMessageBox( L" Error loading file. Try another filename?" );
|
||||
return LOADSAVE_SCREEN;
|
||||
utf8string msg = utf8string(" Error loading ") + ubNewFilename + utf8string(" file. Try another filename? ");
|
||||
CreateMessageBox((STR16)msg.c_wcs().c_str());
|
||||
return(guiCurrentScreen);
|
||||
}
|
||||
//ADB these are NOT set yet! but they need to be, duh
|
||||
CompileWorldMovementCosts();
|
||||
SetGlobalSectorValues( gzFilename );
|
||||
|
||||
GetSectorFromFileName(gzFilename, gWorldSectorX, gWorldSectorY, gbWorldSectorZ, fAltMap);//dnl ch31 140909
|
||||
RestoreFontSettings();
|
||||
|
||||
//Load successful, update necessary information.
|
||||
@@ -1003,6 +1109,11 @@ UINT32 ProcessFileIO()
|
||||
SetMercTeamVisibility( MILITIA_TEAM, gfShowRebels );
|
||||
SetMercTeamVisibility( CIV_TEAM, gfShowCivilians );
|
||||
BuildItemPoolList();
|
||||
gpItemPool = NULL;//dnl ch26 210909
|
||||
fShowHighGround = FALSE;//dnl ch2 210909
|
||||
fRaiseWorld = FALSE;//dnl ch3 210909
|
||||
ShowHighGround(4);//dnl ch41 210909
|
||||
SetRenderCenter(WORLD_COLS/2, WORLD_ROWS/2);//dnl ch43 280909
|
||||
if( gfShowPits )
|
||||
AddAllPits();
|
||||
|
||||
@@ -1066,72 +1177,73 @@ void FDlgDwnCallback( GUI_BUTTON *butn, INT32 reason )
|
||||
}
|
||||
}
|
||||
|
||||
BOOLEAN ExtractFilenameFromFields()
|
||||
//dnl ch36 200909
|
||||
BOOLEAN ExtractFilenameFromFields(void)
|
||||
{
|
||||
Get16BitStringFromField( 0, gzFilename, 31 );
|
||||
return ValidFilename();
|
||||
Get16BitStringFromField(0, gzFilename, FILENAME_BUFLEN);
|
||||
size_t len = wcslen(gzFilename);
|
||||
if(gzFilename[len-4] != L'.' && len < (FILENAME_BUFLEN-4))
|
||||
wcscat(gzFilename, L".dat");
|
||||
return(ValidFilename());
|
||||
}
|
||||
|
||||
BOOLEAN ValidCoordinate()
|
||||
//dnl ch31 140909
|
||||
BOOLEAN ValidMapFileName(STR16 szFileName)
|
||||
{
|
||||
CHAR16 sectorY = 0;
|
||||
UINT16 sectorX = 0;
|
||||
swscanf( gzFilename, L"%c%2hd", §orY, §orX);
|
||||
|
||||
sectorY = towupper( sectorY);
|
||||
return ( sectorY >= 'A' && sectorY <= 'P' &&
|
||||
sectorX >= 1 && sectorX <= 16);
|
||||
}
|
||||
|
||||
BOOLEAN ValidFilename()
|
||||
{
|
||||
STR16 pDest;
|
||||
if( gzFilename[0] != '\0' )// ; <----- I really think they didn't mean this!! (jonathanl)
|
||||
CHAR16 szFileExt[4+1];
|
||||
size_t len = wcslen(szFileName);
|
||||
if(len >= 5)
|
||||
{
|
||||
pDest = wcsstr( gzFilename, L".dat" );
|
||||
if( !pDest )
|
||||
pDest = wcsstr( gzFilename, L".DAT" );
|
||||
if( pDest && pDest != gzFilename && pDest[4] == '\0' )
|
||||
return TRUE;
|
||||
wcscpy(szFileExt, szFileName+len-4);
|
||||
for(int i=0; i<4; i++)
|
||||
szFileExt[i] = towupper(szFileExt[i]);
|
||||
if(wcscmp(szFileExt, L".DAT") == 0)
|
||||
return(TRUE);
|
||||
}
|
||||
return FALSE;
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
BOOLEAN ExternalLoadMap( STR16 szFilename )
|
||||
//dnl ch37 200909
|
||||
BOOLEAN ExternalLoadMap(STR16 szFilename)
|
||||
{
|
||||
Assert( szFilename );
|
||||
if( !wcslen( szFilename ) )
|
||||
return FALSE;
|
||||
wcscpy( gzFilename, szFilename );
|
||||
if( !ValidFilename() )
|
||||
return FALSE;
|
||||
gfLoadError = FALSE;
|
||||
Assert(szFilename);
|
||||
if(!wcslen( szFilename))
|
||||
return(FALSE);
|
||||
wcscpy(gzFilename, szFilename);
|
||||
if(!ValidFilename())
|
||||
return(FALSE);
|
||||
gbCurrentFileIOStatus = INITIATE_MAP_LOAD;
|
||||
ProcessFileIO(); //always returns loadsave_screen and changes iostatus to loading_map.
|
||||
ProcessFileIO();
|
||||
ExecuteBaseDirtyRectQueue();
|
||||
EndFrameBufferRender();
|
||||
RefreshScreen( NULL );
|
||||
if( ProcessFileIO() == EDIT_SCREEN )
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
RefreshScreen(NULL);
|
||||
ProcessFileIO();
|
||||
if(gfLoadError)
|
||||
return(FALSE);
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
BOOLEAN ExternalSaveMap( STR16 szFilename )
|
||||
BOOLEAN ExternalSaveMap(STR16 szFilename)
|
||||
{
|
||||
Assert( szFilename );
|
||||
if( !wcslen( szFilename ) )
|
||||
return FALSE;
|
||||
wcscpy( gzFilename, szFilename );
|
||||
if( !ValidFilename() )
|
||||
return FALSE;
|
||||
gfSaveError = FALSE;
|
||||
Assert(szFilename);
|
||||
if(!wcslen(szFilename))
|
||||
return(FALSE);
|
||||
wcscpy(gzFilename, szFilename);
|
||||
if(!ValidFilename())
|
||||
return(FALSE);
|
||||
gbCurrentFileIOStatus = INITIATE_MAP_SAVE;
|
||||
if( ProcessFileIO() == ERROR_SCREEN )
|
||||
return FALSE;
|
||||
ProcessFileIO();
|
||||
if(gfSaveError)
|
||||
return(FALSE);
|
||||
ExecuteBaseDirtyRectQueue();
|
||||
EndFrameBufferRender();
|
||||
RefreshScreen( NULL );
|
||||
if( ProcessFileIO() == EDIT_SCREEN )
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
RefreshScreen(NULL);
|
||||
ProcessFileIO();
|
||||
if(gfSaveError)
|
||||
return(FALSE);
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
#else //non-editor version
|
||||
|
||||
+10
-6
@@ -33,16 +33,20 @@ void SelectFileDialogYPos( UINT16 usRelativeYPos );
|
||||
|
||||
void BuildFilenameWithCoordinate();
|
||||
void BuildCoordinateWithFilename();
|
||||
BOOLEAN ExtractFilenameFromFields();
|
||||
BOOLEAN ValidCoordinate();
|
||||
BOOLEAN ValidFilename();
|
||||
|
||||
BOOLEAN ExternalLoadMap( STR16 szFilename );
|
||||
BOOLEAN ExternalSaveMap( STR16 szFilename );
|
||||
//dnl ch36 200909
|
||||
BOOLEAN ExtractFilenameFromFields(void);
|
||||
//dnl ch31 150909
|
||||
#define ValidFilename() ValidMapFileName(gzFilename)
|
||||
BOOLEAN ValidMapFileName(STR16 szFilename);
|
||||
//dnl ch37 200909
|
||||
BOOLEAN ExternalLoadMap(STR16 szFilename);
|
||||
BOOLEAN ExternalSaveMap(STR16 szFilename);
|
||||
|
||||
extern BOOLEAN gfErrorCatch;
|
||||
extern CHAR16 gzErrorCatchString[ 256 ];
|
||||
|
||||
#define FILENAME_BUFLEN (20 + 4 + 1)//dnl ch39 190909 +4 is for ".dat", +1 is for '\0'
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
+358
-290
@@ -90,7 +90,8 @@ BOOLEAN gfMustForceUpdateAllMaps = FALSE;
|
||||
UINT16 gusNumberOfMapsToBeForceUpdated = 0;
|
||||
BOOLEAN gfMajorUpdate = FALSE;
|
||||
|
||||
void LoadSummary( STR8 pSector, UINT8 ubLevel, FLOAT dMajorMapVersion );
|
||||
BOOLEAN LoadSummary(STR8 pSector, UINT8 ubLevel, FLOAT dMajorMapVersion);//dnl ch28 240909
|
||||
|
||||
void RegenerateSummaryInfoForAllOutdatedMaps();
|
||||
|
||||
void SetupItemDetailsMode( BOOLEAN fAllowRecursion );
|
||||
@@ -102,6 +103,7 @@ BOOLEAN gfGlobalSummaryLoaded = FALSE;
|
||||
|
||||
SUMMARYFILE *gpSectorSummary[16][16][8] = {};
|
||||
SUMMARYFILE *gpCurrentSectorSummary;
|
||||
SUMMARYFILE gCustomFileSectorSummary;//dnl ch30 150909
|
||||
|
||||
MOUSE_REGION MapRegion;
|
||||
|
||||
@@ -219,9 +221,10 @@ extern INT16 gsSelSectorY; // symbol already declared globally in AI Viewer.cpp
|
||||
//summary is going to be persistant or not.
|
||||
UINT32 giInitTimer;
|
||||
|
||||
CHAR16 gszFilename[40];
|
||||
CHAR16 gszTempFilename[21];
|
||||
CHAR16 gszDisplayName[21];
|
||||
//dnl ch39 190909
|
||||
CHAR16 gszFilename[FILENAME_BUFLEN];
|
||||
CHAR16 gszTempFilename[FILENAME_BUFLEN];
|
||||
CHAR16 gszDisplayName[FILENAME_BUFLEN];
|
||||
|
||||
void CalculateOverrideStatus();
|
||||
|
||||
@@ -286,9 +289,7 @@ void CreateSummaryWindow()
|
||||
DisableButton( iSummaryButton[ SUMMARY_BACKGROUND ] );
|
||||
|
||||
iSummaryButton[ SUMMARY_OKAY ] =
|
||||
CreateTextButton(L"Okay", FONT12POINT1, FONT_BLACK, FONT_BLACK, BUTTON_USE_DEFAULT,
|
||||
iScreenWidthOffset + 585, iScreenHeightOffset + 325, 50, 30, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH, DEFAULT_MOVE_CALLBACK,
|
||||
SummaryOkayCallback );
|
||||
CreateTextButton(L"Okay", FONT12POINT1, FONT_BLACK, FONT_BLACK, BUTTON_USE_DEFAULT, MAP_LEFT+160, MAP_BOTTOM+99, 50, 30, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH, DEFAULT_MOVE_CALLBACK, SummaryOkayCallback);//dnl ch36 190909
|
||||
//GiveButtonDefaultStatus( iSummaryButton[ SUMMARY_OKAY ], DEFAULT_STATUS_WINDOWS95 );
|
||||
|
||||
iSummaryButton[ SUMMARY_GRIDCHECKBOX ] =
|
||||
@@ -392,8 +393,7 @@ void CreateSummaryWindow()
|
||||
//Init the textinput field.
|
||||
InitTextInputModeWithScheme( DEFAULT_SCHEME );
|
||||
AddUserInputField( NULL ); //just so we can use short cut keys while not typing.
|
||||
AddTextInputField( MAP_LEFT+112, MAP_BOTTOM+75, 100, 18, MSYS_PRIORITY_HIGH, L"", 20, INPUTTYPE_EXCLUSIVE_DOSFILENAME );
|
||||
|
||||
AddTextInputField(MAP_LEFT+110, MAP_BOTTOM+75, 100, 18, MSYS_PRIORITY_HIGH, L"", (FILENAME_BUFLEN-4-1), INPUTTYPE_EXCLUSIVE_DOSFILENAME);//dnl ch39 190909
|
||||
for( i = 1; i < NUM_SUMMARY_BUTTONS; i++ )
|
||||
HideButton( iSummaryButton[ i ] );
|
||||
|
||||
@@ -426,6 +426,7 @@ void CreateSummaryWindow()
|
||||
void AutoLoadMap()
|
||||
{
|
||||
SummaryLoadMapCallback( ButtonList[ iSummaryButton[ SUMMARY_LOAD ] ], MSYS_CALLBACK_REASON_LBUTTON_UP );
|
||||
ButtonList[ iSummaryButton[ SUMMARY_LOAD ] ]->uiFlags &= ~BUTTON_CLICKED_ON;//dnl ch36 210909
|
||||
if( gfWorldLoaded )
|
||||
DestroySummaryWindow();
|
||||
gfAutoLoadA9 = FALSE;
|
||||
@@ -470,7 +471,7 @@ void DestroySummaryWindow()
|
||||
}
|
||||
|
||||
MSYS_RemoveRegion( &MapRegion );
|
||||
|
||||
gfRenderTaskbar = TRUE;//dnl ch52 091009
|
||||
gfSummaryWindowActive = FALSE;
|
||||
gfPersistantSummary = FALSE;
|
||||
MarkWorldDirty();
|
||||
@@ -534,7 +535,7 @@ void RenderSectorInformation()
|
||||
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 32, L"Tileset: %s", gTilesets[ s->ubTilesetID ].zName );
|
||||
if( m->ubMapVersion < 10 )
|
||||
SetFontForeground( FONT_RED );
|
||||
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 42, L"Version Info: Summary: 1.%02d, Map: %d.%02d", s->ubSummaryVersion, (INT32)s->dMajorMapVersion, m->ubMapVersion );
|
||||
mprintf(iScreenWidthOffset+10, iScreenHeightOffset+42, L"Version Info: Summary: 1.%02d, Map: %1.2f / %02d", s->ubSummaryVersion, s->dMajorMapVersion, m->ubMapVersion);//dnl ch30 240909
|
||||
SetFontForeground( FONT_GRAY2 );
|
||||
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 55, L"Number of items: %d", s->usNumItems );
|
||||
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 65, L"Number of lights: %d", s->usNumLights );
|
||||
@@ -1058,6 +1059,11 @@ void RenderSummaryWindow()
|
||||
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 30, L"You need to either load an existing map or create a new map before being" );
|
||||
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 40, L"able to enter the editor, or you can quit (ESC or Alt+x).");
|
||||
}
|
||||
else if(gCustomFileSectorSummary.ubSummaryVersion)//dnl ch30 150909
|
||||
{
|
||||
gpCurrentSectorSummary = &gCustomFileSectorSummary;
|
||||
RenderSectorInformation();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1529,90 +1535,131 @@ void RenderSummaryWindow()
|
||||
}
|
||||
}
|
||||
|
||||
//dnl ch30 150909
|
||||
void ResetCustomFileSectorSummary(void)
|
||||
{
|
||||
memset(&gCustomFileSectorSummary, 0, sizeof(SUMMARYFILE));
|
||||
}
|
||||
|
||||
//dnl ch31 150909
|
||||
void GetSectorFromFileName(STR16 szFileName, INT16& sSectorX, INT16& sSectorY, INT8& bSectorZ, BOOLEAN& fAltMap)
|
||||
{
|
||||
const int strsz = 16;
|
||||
CHAR16 str[strsz] = L"";
|
||||
if(szFileName[2] == L'.' || szFileName[2] == L'_')
|
||||
{
|
||||
str[0] = szFileName[0];
|
||||
str[1] = L'0';
|
||||
wmemcpy(str+2, szFileName+1, strsz-2);
|
||||
}
|
||||
else if(szFileName[1] == L'1')
|
||||
wmemcpy(str, szFileName, strsz);
|
||||
for(int i=0; i<strsz; i++)
|
||||
str[i] = towupper(str[i]);
|
||||
if((str[0] >= L'A' && str[0] <= L'P') && (str[1] >= L'0' && str[1] <= L'9') && (str[2] >= L'0' && str[2] <= L'9'))
|
||||
{
|
||||
sSectorX = (str[1] - L'0') * 10 + str[2] - L'0';
|
||||
sSectorY = str[0] - L'A' + 1;
|
||||
bSectorZ = 0;
|
||||
fAltMap = FALSE;
|
||||
if(!(sSectorX < 1 || sSectorX > 16 || sSectorY < 1 || sSectorY > 16))
|
||||
{
|
||||
if(wcscmp(&str[3], L".DAT") == 0)
|
||||
return;
|
||||
else if(wcscmp(&str[3], L"_A.DAT") == 0)
|
||||
{
|
||||
fAltMap = TRUE;// Alternate Ground Map
|
||||
return;
|
||||
}
|
||||
else if(str[3] == L'_' && str[4] == L'B' && str[5] >= L'1' && str[5] <= L'3')
|
||||
{
|
||||
bSectorZ = str[5] - L'0';
|
||||
if(wcscmp(&str[6], L".DAT") == 0)
|
||||
return;
|
||||
else if(wcscmp(&str[6], L"_A.DAT") == 0)
|
||||
{
|
||||
fAltMap = TRUE;// Alternate Underground Map
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
sSectorX = 0;
|
||||
sSectorY = 0;
|
||||
bSectorZ = 0;
|
||||
fAltMap = FALSE;
|
||||
}
|
||||
|
||||
void UpdateSectorSummary( STR16 gszFilename, BOOLEAN fUpdate )
|
||||
{
|
||||
CHAR16 str[50];
|
||||
CHAR8 szCoord[40];
|
||||
STR16 ptr;
|
||||
INT16 x, y;
|
||||
|
||||
//dnl ch31 130909
|
||||
INT8 bSectorZ;
|
||||
BOOLEAN fAltMap;
|
||||
GetSectorFromFileName(gszFilename, gsSelSectorX, gsSelSectorY, bSectorZ, fAltMap);
|
||||
gfRenderSummary = TRUE;
|
||||
//Extract the sector
|
||||
if( gszFilename[2] < L'0' || gszFilename[2] > L'9' )
|
||||
x = gszFilename[1] - L'0';
|
||||
else
|
||||
x = (gszFilename[1] - L'0') * 10 + gszFilename[2] - L'0';
|
||||
if( gszFilename[0] >= 'a' )
|
||||
y = gszFilename[0] - L'a' + 1;
|
||||
else
|
||||
y = gszFilename[0] - L'A' + 1;
|
||||
gfMapFileDirty = FALSE;
|
||||
|
||||
//Validate that the values extracted are in fact a sector
|
||||
if( x < 1 || x > 16 || y < 1 || y > 16 )
|
||||
return;
|
||||
gsSectorX = gsSelSectorX = x;
|
||||
gsSectorY = gsSelSectorY = y;
|
||||
|
||||
//The idea here is to get a pointer to the filename's period, then
|
||||
//focus on the character previous to it. If it is a 1, 2, or 3, then
|
||||
//the filename was in a basement level. Otherwise, it is a ground level.
|
||||
ptr = wcsstr( gszFilename, L"_a.dat" );
|
||||
if( ptr )
|
||||
gsSectorX = gsSelSectorX;
|
||||
gsSectorY = gsSelSectorY;
|
||||
if(!gsSectorX)
|
||||
{
|
||||
ptr = wcsstr( gszFilename, L"_b" );
|
||||
if( ptr && ptr[2] >= '1' && ptr[2] <= '3' && ptr[5] == '.' )
|
||||
{ //it's a alternate basement map
|
||||
switch( ptr[2] )
|
||||
{
|
||||
case '1':
|
||||
gsSectorLayer = ALTERNATE_B1_MASK;
|
||||
giCurrLevel = 5;
|
||||
break;
|
||||
case '2':
|
||||
gsSectorLayer = ALTERNATE_B2_MASK;
|
||||
giCurrLevel = 6;
|
||||
break;
|
||||
case '3':
|
||||
gsSectorLayer = ALTERNATE_B3_MASK;
|
||||
giCurrLevel = 7;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
CHAR8 ubNewFilename[50];
|
||||
sprintf(ubNewFilename, "%S", gszFilename);
|
||||
ReEvaluateWorld(ubNewFilename);//dnl ch30 150909
|
||||
return;
|
||||
}
|
||||
switch(bSectorZ)
|
||||
{
|
||||
case 0:
|
||||
if(fAltMap)
|
||||
{
|
||||
gsSectorLayer = ALTERNATE_GROUND_MASK;
|
||||
giCurrLevel = 4;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ptr = wcsstr( gszFilename, L"_b" );
|
||||
if( ptr && ptr[2] >= '1' && ptr[2] <= '3' && ptr[3] == '.' )
|
||||
{ //it's a alternate basement map
|
||||
switch( ptr[2] )
|
||||
{
|
||||
case '1':
|
||||
gsSectorLayer = BASEMENT1_LEVEL_MASK;
|
||||
giCurrLevel = 1;
|
||||
break;
|
||||
case '2':
|
||||
gsSectorLayer = BASEMENT2_LEVEL_MASK;
|
||||
giCurrLevel = 2;
|
||||
break;
|
||||
case '3':
|
||||
gsSectorLayer = BASEMENT3_LEVEL_MASK;
|
||||
giCurrLevel = 3;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gsSectorLayer = GROUND_LEVEL_MASK;
|
||||
giCurrLevel = 0;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if(fAltMap)
|
||||
{
|
||||
gsSectorLayer = ALTERNATE_B1_MASK;
|
||||
giCurrLevel = 5;
|
||||
}
|
||||
else
|
||||
{
|
||||
gsSectorLayer = BASEMENT1_LEVEL_MASK;
|
||||
giCurrLevel = 1;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if(fAltMap)
|
||||
{
|
||||
gsSectorLayer = ALTERNATE_B2_MASK;
|
||||
giCurrLevel = 6;
|
||||
}
|
||||
else
|
||||
{
|
||||
gsSectorLayer = BASEMENT2_LEVEL_MASK;
|
||||
giCurrLevel = 2;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if(fAltMap)
|
||||
{
|
||||
gsSectorLayer = ALTERNATE_B3_MASK;
|
||||
giCurrLevel = 7;
|
||||
}
|
||||
else
|
||||
{
|
||||
gsSectorLayer = BASEMENT3_LEVEL_MASK;
|
||||
giCurrLevel = 3;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
giCurrentViewLevel = gsSectorLayer;
|
||||
if( !(gbSectorLevels[gsSectorX-1][gsSectorY-1] & gsSectorLayer) )
|
||||
{
|
||||
@@ -1918,8 +1965,7 @@ void CreateGlobalSummary()
|
||||
vfs::COpenWriteFile wfile(L"DevInfo\\readme.txt",true,true);
|
||||
std::string str = "This information is used in conjunction with the editor.\n";
|
||||
str += "This directory or it's contents shouldn't be included with final release.\n";
|
||||
vfs::UInt32 io;
|
||||
wfile.file().Write(str.c_str(), str.length(), io);
|
||||
TRYCATCH_RETHROW( wfile.file().write(str.c_str(), str.length()), L"" );
|
||||
#endif
|
||||
|
||||
// Snap: Restore the data directory once we are finished.
|
||||
@@ -2301,7 +2347,11 @@ void LoadGlobalSummary()
|
||||
SetFileManCurrentDirectory( DevInfoDir );
|
||||
#else
|
||||
sprintf( szFilename, "Maps\\%c%d.dat", 'A' + y, x + 1 );
|
||||
hfile = FileOpen( szFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
|
||||
hfile = NULL;
|
||||
if(FileExists(szFilename))
|
||||
{
|
||||
hfile = FileOpen( szFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
|
||||
}
|
||||
#endif
|
||||
if( hfile )
|
||||
{
|
||||
@@ -2327,7 +2377,11 @@ void LoadGlobalSummary()
|
||||
SetFileManCurrentDirectory( DevInfoDir );
|
||||
#else
|
||||
sprintf( szFilename, "Maps\\%c%d_b1.dat", 'A' + y, x + 1 );
|
||||
hfile = FileOpen( szFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
|
||||
hfile = NULL;
|
||||
if(FileExists(szFilename))
|
||||
{
|
||||
hfile = FileOpen( szFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
|
||||
}
|
||||
#endif
|
||||
if( hfile )
|
||||
{
|
||||
@@ -2353,7 +2407,11 @@ void LoadGlobalSummary()
|
||||
SetFileManCurrentDirectory( DevInfoDir );
|
||||
#else
|
||||
sprintf( szFilename, "Maps\\%c%d_b2.dat", 'A' + y, x + 1 );
|
||||
hfile = FileOpen( szFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
|
||||
hfile = NULL;
|
||||
if(FileExists(szFilename))
|
||||
{
|
||||
hfile = FileOpen( szFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
|
||||
}
|
||||
#endif
|
||||
if( hfile )
|
||||
{
|
||||
@@ -2379,7 +2437,11 @@ void LoadGlobalSummary()
|
||||
SetFileManCurrentDirectory( DevInfoDir );
|
||||
#else
|
||||
sprintf( szFilename, "Maps\\%c%d_b3.dat", 'A' + y, x + 1 );
|
||||
hfile = FileOpen( szFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
|
||||
hfile = NULL;
|
||||
if(FileExists(szFilename))
|
||||
{
|
||||
hfile = FileOpen( szFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
|
||||
}
|
||||
#endif
|
||||
if( hfile )
|
||||
{
|
||||
@@ -2405,7 +2467,11 @@ void LoadGlobalSummary()
|
||||
SetFileManCurrentDirectory( DevInfoDir );
|
||||
#else
|
||||
sprintf( szFilename, "Maps\\%c%d_a.dat", 'A' + y, x + 1 );
|
||||
hfile = FileOpen( szFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
|
||||
hfile = NULL;
|
||||
if(FileExists(szFilename))
|
||||
{
|
||||
hfile = FileOpen( szFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
|
||||
}
|
||||
#endif
|
||||
if( hfile )
|
||||
{
|
||||
@@ -2431,7 +2497,11 @@ void LoadGlobalSummary()
|
||||
SetFileManCurrentDirectory( DevInfoDir );
|
||||
#else
|
||||
sprintf( szFilename, "Maps\\%c%d_b1_a.dat", 'A' + y, x + 1 );
|
||||
hfile = FileOpen( szFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
|
||||
hfile = NULL;
|
||||
if(FileExists(szFilename))
|
||||
{
|
||||
hfile = FileOpen( szFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
|
||||
}
|
||||
#endif
|
||||
if( hfile )
|
||||
{
|
||||
@@ -2457,7 +2527,11 @@ void LoadGlobalSummary()
|
||||
SetFileManCurrentDirectory( DevInfoDir );
|
||||
#else
|
||||
sprintf( szFilename, "Maps\\%c%d_b2_a.dat", 'A' + y, x + 1 );
|
||||
hfile = FileOpen( szFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
|
||||
hfile = NULL;
|
||||
if(FileExists(szFilename))
|
||||
{
|
||||
hfile = FileOpen( szFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
|
||||
}
|
||||
#endif
|
||||
if( hfile )
|
||||
{
|
||||
@@ -2483,7 +2557,11 @@ void LoadGlobalSummary()
|
||||
SetFileManCurrentDirectory( DevInfoDir );
|
||||
#else
|
||||
sprintf( szFilename, "Maps\\%c%d_b3_a.dat", 'A' + y, x + 1 );
|
||||
hfile = FileOpen( szFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
|
||||
hfile = NULL;
|
||||
if(FileExists(szFilename))
|
||||
{
|
||||
hfile = FileOpen( szFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
|
||||
}
|
||||
#endif
|
||||
if( hfile )
|
||||
{
|
||||
@@ -2562,8 +2640,7 @@ void GenerateSummaryList()
|
||||
vfs::COpenWriteFile wfile(L"DevInfo/readme.txt",true,true);
|
||||
std::string str = "This information is used in conjunction with the editor.\n";
|
||||
str += "This directory or it's contents shouldn't be included with final release.\n";
|
||||
vfs::UInt32 io;
|
||||
wfile.file().Write(str.c_str(), str.length(),io);
|
||||
TRYCATCH_RETHROW( wfile.file().write(str.c_str(), str.length()), L"");
|
||||
}
|
||||
catch(CBasicException &ex)
|
||||
{
|
||||
@@ -2572,79 +2649,37 @@ void GenerateSummaryList()
|
||||
#endif
|
||||
}
|
||||
|
||||
void WriteSectorSummaryUpdate( STR8 puiFilename, UINT8 ubLevel, SUMMARYFILE *pSummaryFileInfo )
|
||||
//dnl ch28 260909
|
||||
void WriteSectorSummaryUpdate(STR8 sFileName, UINT8 ubLevel, SUMMARYFILE* pSummaryFileInfo)
|
||||
{
|
||||
#ifndef USE_VFS
|
||||
FILE *fp;
|
||||
STRING512 DataDir;
|
||||
STRING512 ExecDir;
|
||||
STRING512 Dir;
|
||||
CHAR8 *ptr;
|
||||
#endif
|
||||
INT8 x, y;
|
||||
#ifndef USE_VFS
|
||||
// Snap: save current directory
|
||||
GetFileManCurrentDirectory( DataDir );
|
||||
|
||||
//Set current directory to JA2\DevInfo which contains all of the summary data
|
||||
GetExecutableDirectory( ExecDir );
|
||||
sprintf( Dir, "%s\\DevInfo", ExecDir );
|
||||
if( !SetFileManCurrentDirectory( Dir ) )
|
||||
//AssertMsg( 0, "JA2\\DevInfo folder not found and should exist!");//dnl lead to assertion if you don't have Dir and never create summary info
|
||||
{//dnl
|
||||
//Directory doesn't exist, so create it, and continue.
|
||||
if( !MakeFileManDirectory( Dir ) )
|
||||
AssertMsg( 0, "Can't create new directory, JA2\\DevInfo for summary information update." );
|
||||
if( !SetFileManCurrentDirectory( Dir ) )
|
||||
AssertMsg( 0, "JA2\\DevInfo folder not found and should exist!");
|
||||
}
|
||||
ptr = strstr( (CHAR8 *)puiFilename, ".dat" );
|
||||
if( !ptr )
|
||||
AssertMsg( 0, "Illegal sector summary filename.");
|
||||
sprintf( ptr, ".sum" );
|
||||
|
||||
//write the summary information
|
||||
fp = fopen( puiFilename, "wb" );
|
||||
Assert( fp );
|
||||
fwrite( pSummaryFileInfo, 1, sizeof( SUMMARYFILE ), fp );
|
||||
fclose( fp );
|
||||
#else
|
||||
vfs::Path fname(puiFilename);
|
||||
THROWIFFALSE(MatchPattern(L"*.dat", fname()), L"Illegal sector summary filename");
|
||||
vfs::COpenWriteFile wfile(vfs::Path(L"DevInfo")+vfs::Path(puiFilename),true,true);
|
||||
vfs::UInt32 io;
|
||||
wfile.file().Write((vfs::Byte*)pSummaryFileInfo,sizeof(SUMMARYFILE), io);
|
||||
wfile.file().Close();
|
||||
#endif
|
||||
|
||||
//CHRISL:
|
||||
if(gusNumEntriesWithOutdatedOrNoSummaryInfo > 0)
|
||||
gusNumEntriesWithOutdatedOrNoSummaryInfo--;
|
||||
CHAR8 cFileName[2*FILENAME_BUFLEN];
|
||||
sprintf(cFileName, "DevInfo\\%s", sFileName);
|
||||
// Presumption is that file came with dat extension
|
||||
strcpy(cFileName+strlen(cFileName)-4, ".sum");
|
||||
if(!pSummaryFileInfo->Save(cFileName))
|
||||
return;
|
||||
UpdateMasterProgress();
|
||||
|
||||
//extract the sector information out of the filename.
|
||||
if( puiFilename[0] >= 'a' )
|
||||
y = puiFilename[0] - 'a';
|
||||
INT16 sSectorX, sSectorY;
|
||||
INT8 x, y, bSectorZ;
|
||||
BOOLEAN fAltMap;
|
||||
CHAR16 szFileName[FILENAME_BUFLEN];
|
||||
swprintf(szFileName, L"%S", sFileName);
|
||||
GetSectorFromFileName(szFileName, sSectorX, sSectorY, bSectorZ, fAltMap);
|
||||
if(!sSectorX)
|
||||
gCustomFileSectorSummary = *pSummaryFileInfo;//dnl ch30 150909
|
||||
else
|
||||
y = puiFilename[0] - 'A';
|
||||
if( puiFilename[2] < '0' || puiFilename[2] > '9' )
|
||||
x = puiFilename[ 1 ] - '0' - 1;
|
||||
else
|
||||
x = (puiFilename[ 1 ] - '0') * 10 + puiFilename[ 2 ] - '0' - 1;
|
||||
|
||||
if( gpSectorSummary[x][y][ubLevel] )
|
||||
{
|
||||
MemFree( gpSectorSummary[x][y][ubLevel] );
|
||||
gpSectorSummary[x][y][ubLevel] = NULL;
|
||||
if(gusNumEntriesWithOutdatedOrNoSummaryInfo > 0)
|
||||
gusNumEntriesWithOutdatedOrNoSummaryInfo--;
|
||||
x = sSectorX - 1;
|
||||
y = sSectorY - 1;
|
||||
if(gpSectorSummary[x][y][ubLevel])
|
||||
{
|
||||
MemFree(gpSectorSummary[x][y][ubLevel]);
|
||||
gpSectorSummary[x][y][ubLevel] = NULL;
|
||||
}
|
||||
gpSectorSummary[x][y][ubLevel] = pSummaryFileInfo;
|
||||
}
|
||||
gpSectorSummary[x][y][ubLevel] = pSummaryFileInfo;
|
||||
#ifndef USE_VFS
|
||||
// Snap: Restore the data directory once we are finished.
|
||||
SetFileManCurrentDirectory( DataDir );
|
||||
//Set current directory back to data directory!
|
||||
//sprintf( Dir, "%s\\Data", ExecDir );
|
||||
//SetFileManCurrentDirectory( Dir );
|
||||
#endif
|
||||
}
|
||||
|
||||
void SummaryNewGroundLevelCallback( GUI_BUTTON *btn, INT32 reason )
|
||||
@@ -2680,88 +2715,143 @@ void SummaryNewCaveLevelCallback( GUI_BUTTON *btn, INT32 reason )
|
||||
}
|
||||
}
|
||||
|
||||
void LoadSummary( STR8 pSector, UINT8 ubLevel, FLOAT dMajorMapVersion )
|
||||
//dnl ch28 260909
|
||||
SUMMARYFILE& SUMMARYFILE::operator=(const _OLD_SUMMARYFILE& src)
|
||||
{
|
||||
if((void*)this != (void*)&src)
|
||||
{
|
||||
ubSummaryVersion = src.ubSummaryVersion;
|
||||
ubSpecial = src.ubSpecial;
|
||||
ubNumRooms = src.ubNumRooms;
|
||||
dMajorMapVersion = src.dMajorMapVersion;
|
||||
ubTilesetID = src.ubTilesetID;
|
||||
usNumItems = src.usNumItems;
|
||||
usNumLights = src.usNumLights;
|
||||
ubNumDoors = src.ubNumDoors;
|
||||
ubNumDoorsLocked = src.ubNumDoorsLocked;
|
||||
ubNumDoorsTrapped = src.ubNumDoorsTrapped;
|
||||
ubNumDoorsLockedAndTrapped = src.ubNumDoorsLockedAndTrapped;
|
||||
ubNumElites = src.ubNumElites;
|
||||
ubNumAdmins = src.ubNumAdmins;
|
||||
ubNumTroops = src.ubNumTroops;
|
||||
ubEliteDetailed = src.ubEliteDetailed;
|
||||
ubAdminDetailed = src.ubAdminDetailed;
|
||||
ubTroopDetailed = src.ubTroopDetailed;
|
||||
ubEliteProfile = src.ubEliteProfile;
|
||||
ubAdminProfile = src.ubAdminProfile;
|
||||
ubTroopProfile = src.ubTroopProfile;
|
||||
ubEliteExistance = src.ubEliteExistance;
|
||||
ubAdminExistance = src.ubAdminExistance;
|
||||
ubTroopExistance = src.ubTroopExistance;
|
||||
ubCivSchedules = src.ubCivSchedules;
|
||||
ubCivCows = src.ubCivCows;
|
||||
ubCivBloodcats = src.ubCivBloodcats;
|
||||
ubEnemiesReqWaypoints = src.ubEnemiesReqWaypoints;
|
||||
usWarningRoomNums = src.usWarningRoomNums;
|
||||
ubEnemiesHaveWaypoints = src.ubEnemiesHaveWaypoints;
|
||||
uiNumItemsPosition = src.uiNumItemsPosition;
|
||||
uiEnemyPlacementPosition = src.uiEnemyPlacementPosition;
|
||||
EnemyTeam = src.EnemyTeam;
|
||||
CreatureTeam = src.CreatureTeam;
|
||||
RebelTeam = src.RebelTeam;
|
||||
CivTeam = src.CivTeam;
|
||||
MapInfo = src.MapInfo;
|
||||
for(int i=0; i<4; i++)
|
||||
ExitGrid[i] = src.ExitGrid[i];
|
||||
TranslateArrayFields(usExitGridSize, src.usExitGridSize, 4, UINT16_UINT16);
|
||||
TranslateArrayFields(fInvalidDest, src.fInvalidDest, 4, UINT8_UINT8);
|
||||
ubNumExitGridDests = src.ubNumExitGridDests;
|
||||
fTooManyExitGridDests = src.fTooManyExitGridDests;
|
||||
}
|
||||
return(*this);
|
||||
}
|
||||
|
||||
BOOLEAN SUMMARYFILE::Load(STR sFileName)
|
||||
{
|
||||
if(!FileExists(sFileName))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
HWFILE hFile = FileOpen(sFileName, FILE_ACCESS_READ, FALSE);
|
||||
if(!hFile)
|
||||
{
|
||||
return(FALSE);
|
||||
}
|
||||
UINT8 ubSummaryVersion = 0;
|
||||
UINT32 uiBytesRead = 0;
|
||||
FileRead(hFile, &ubSummaryVersion, sizeof(ubSummaryVersion), &uiBytesRead);
|
||||
if(ubSummaryVersion < 14 || ubSummaryVersion > GLOBAL_SUMMARY_VERSION)
|
||||
{
|
||||
FileClose(hFile);
|
||||
return(FALSE);
|
||||
}
|
||||
FileSeek(hFile, 0L, FILE_SEEK_FROM_START);
|
||||
if(ubSummaryVersion == 14)
|
||||
{
|
||||
_OLD_SUMMARYFILE OldSummaryFile;
|
||||
FileRead(hFile, &OldSummaryFile, sizeof(_OLD_SUMMARYFILE), &uiBytesRead);
|
||||
*this = OldSummaryFile;
|
||||
}
|
||||
else
|
||||
{
|
||||
FileRead(hFile, this, sizeof(SUMMARYFILE), &uiBytesRead);
|
||||
}
|
||||
FileClose(hFile);
|
||||
if(uiBytesRead == sizeof(_OLD_SUMMARYFILE) || uiBytesRead == sizeof(SUMMARYFILE))
|
||||
{
|
||||
return(TRUE);
|
||||
}
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
BOOLEAN SUMMARYFILE::Save(STR sFileName)
|
||||
{
|
||||
HWFILE hFile = FileOpen(sFileName, FILE_ACCESS_WRITE|FILE_CREATE_ALWAYS, FALSE);
|
||||
if(!hFile)
|
||||
return(FALSE);
|
||||
UINT32 uiBytesWritten = 0;
|
||||
FileWrite(hFile, this, sizeof(SUMMARYFILE), &uiBytesWritten);
|
||||
FileClose(hFile);
|
||||
if(uiBytesWritten != sizeof(SUMMARYFILE))
|
||||
return(FALSE);
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
BOOLEAN LoadSummary(STR8 pSector, UINT8 ubLevel, FLOAT dMajorMapVersion)
|
||||
{
|
||||
CHAR8 filename[40];
|
||||
SUMMARYFILE temp;
|
||||
INT32 x, y;
|
||||
#ifndef USE_VFS
|
||||
FILE *fp;
|
||||
sprintf( filename, pSector );
|
||||
#else
|
||||
sprintf( filename, "DevInfo\\%s", pSector );
|
||||
#endif
|
||||
if( ubLevel % 4 )
|
||||
CHAR8 sFileName[2*FILENAME_BUFLEN];
|
||||
SUMMARYFILE SummaryFile;
|
||||
sprintf(sFileName, "DevInfo\\%s", pSector);
|
||||
if(ubLevel % 4)
|
||||
{
|
||||
CHAR8 str[4];
|
||||
sprintf( str, "_b%d", ubLevel % 4 );
|
||||
strcat( filename, str );
|
||||
sprintf(str, "_b%d", ubLevel%4);
|
||||
strcat(sFileName, str);
|
||||
}
|
||||
if( ubLevel >= 4 )
|
||||
{
|
||||
strcat( filename, "_a" );
|
||||
}
|
||||
strcat( filename, ".sum" );
|
||||
#ifndef USE_VFS
|
||||
fp = fopen( filename, "rb" );
|
||||
if( !fp )
|
||||
{
|
||||
gusNumEntriesWithOutdatedOrNoSummaryInfo++;
|
||||
//CHRISL: Maybe take things a step further. Rather then doing a version update, why not wait to do the update until
|
||||
// we actually try to access the map? After all, there is really no need to update the maps if we don't make any
|
||||
// changes to them.
|
||||
//CHRISL: These will force an update basically every time the editor is loaded. What's the point of that?
|
||||
// instead, we should look at the dMajorMapVersion for this map and only load if we need to
|
||||
//ADB don't forget that these might need to be updated!!!
|
||||
/* if(dMajorMapVersion < gdMajorMapVersion)
|
||||
{
|
||||
gusNumberOfMapsToBeForceUpdated++;
|
||||
gfMustForceUpdateAllMaps = TRUE;
|
||||
}*/
|
||||
return;
|
||||
}
|
||||
fread( &temp, 1, sizeof( SUMMARYFILE ), fp );
|
||||
#else
|
||||
if(!GetVFS()->FileExists(filename))
|
||||
{
|
||||
return;
|
||||
}
|
||||
vfs::COpenReadFile rfile(filename);
|
||||
vfs::UInt32 io;
|
||||
rfile.file().Read((vfs::Byte*)&temp,sizeof(SUMMARYFILE),io);
|
||||
#endif
|
||||
//CHRISL: Again, this basically forces the maps to be updated whether we actually access the map or not. Why don't we just
|
||||
// update the map when the map actually needs to be loaded?
|
||||
/* if( temp.ubSummaryVersion < MINIMUMVERSION || dMajorMapVersion < gdMajorMapVersion )
|
||||
{
|
||||
gusNumberOfMapsToBeForceUpdated++;
|
||||
gfMustForceUpdateAllMaps = TRUE;
|
||||
}*/
|
||||
temp.dMajorMapVersion = dMajorMapVersion;
|
||||
UpdateSummaryInfo( &temp );
|
||||
//even if the info is outdated (but existing), allocate the structure, but indicate that the info
|
||||
//is bad.
|
||||
if(ubLevel >= 4)
|
||||
strcat(sFileName, "_a");
|
||||
strcat(sFileName, ".sum");
|
||||
if(!SummaryFile.Load(sFileName))
|
||||
return(FALSE);
|
||||
y = pSector[0] - 'A';
|
||||
if( pSector[2] >= '0' && pSector[2] <= '9' )
|
||||
if(pSector[2] >= '0' && pSector[2] <= '9')
|
||||
x = (pSector[1] - '0') * 10 + pSector[2] - '0' - 1;
|
||||
else
|
||||
x = pSector[1] - '0' - 1;
|
||||
if( gpSectorSummary[x][y][ubLevel] )
|
||||
if(gpSectorSummary[x][y][ubLevel])
|
||||
{
|
||||
MemFree( gpSectorSummary[x][y][ubLevel] );
|
||||
MemFree(gpSectorSummary[x][y][ubLevel]);
|
||||
gpSectorSummary[x][y][ubLevel] = NULL;
|
||||
}
|
||||
gpSectorSummary[x][y][ubLevel] = (SUMMARYFILE*)MemAlloc( sizeof( SUMMARYFILE ) );
|
||||
if( gpSectorSummary[x][y][ubLevel] )
|
||||
memcpy( gpSectorSummary[x][y][ubLevel], &temp, sizeof( SUMMARYFILE ) );
|
||||
if( gpSectorSummary[x][y][ubLevel]->ubSummaryVersion < GLOBAL_SUMMARY_VERSION )
|
||||
gpSectorSummary[x][y][ubLevel] = (SUMMARYFILE*)MemAlloc(sizeof(SUMMARYFILE));
|
||||
if(gpSectorSummary[x][y][ubLevel])
|
||||
memcpy(gpSectorSummary[x][y][ubLevel], &SummaryFile, sizeof(SUMMARYFILE));
|
||||
if(gpSectorSummary[x][y][ubLevel]->ubSummaryVersion < GLOBAL_SUMMARY_VERSION)
|
||||
gusNumEntriesWithOutdatedOrNoSummaryInfo++;
|
||||
#ifndef USE_VFS
|
||||
fclose( fp );
|
||||
#endif
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
double MasterStart, MasterEnd;
|
||||
|
||||
void UpdateMasterProgress()
|
||||
@@ -2919,8 +3009,9 @@ void SummaryUpdateCallback( GUI_BUTTON *btn, INT32 reason )
|
||||
|
||||
void ExtractTempFilename()
|
||||
{
|
||||
CHAR16 str[40];
|
||||
Get16BitStringFromField( 1, str, 40 );
|
||||
//dnl ch39 190909
|
||||
CHAR16 str[FILENAME_BUFLEN-4];
|
||||
Get16BitStringFromField(1, str, FILENAME_BUFLEN-4);
|
||||
if( wcscmp( gszTempFilename, str ) )
|
||||
{
|
||||
wcscpy( gszTempFilename, str );
|
||||
@@ -2931,75 +3022,52 @@ void ExtractTempFilename()
|
||||
swprintf( gszDisplayName, L"test.dat" );
|
||||
}
|
||||
|
||||
BOOLEAN ReEvaluateWorld( const STR8 puiFilename )
|
||||
//dnl ch30 170909
|
||||
BOOLEAN ReEvaluateWorld(const STR8 puiFilename)
|
||||
{
|
||||
#ifndef USE_VFS
|
||||
STRING512 DataDir;
|
||||
#endif
|
||||
STRING512 MapsDir;
|
||||
FLOAT dMajorVersion;
|
||||
UINT8 dMinorVersion;
|
||||
UINT8 ubLevel = 0;
|
||||
CHAR8 name[50];
|
||||
HWFILE hfile;
|
||||
UINT32 uiNumBytesRead;
|
||||
#ifndef USE_VFS
|
||||
GetFileManCurrentDirectory( DataDir );
|
||||
sprintf( MapsDir, "%s\\Maps", DataDir );
|
||||
#endif
|
||||
|
||||
if( gbSectorLevels[gsSelSectorX-1][gsSelSectorY-1] & GROUND_LEVEL_MASK )
|
||||
ubLevel = 0;
|
||||
else if( gbSectorLevels[gsSelSectorX-1][gsSelSectorY-1] & BASEMENT1_LEVEL_MASK )
|
||||
UINT8 ubLevel;
|
||||
CHAR8 name[50];
|
||||
INT16 sSectorX, sSectorY;
|
||||
INT8 bSectorZ;
|
||||
BOOLEAN fAltMap;
|
||||
CHAR16 szFileName[50];
|
||||
swprintf(szFileName, L"%S", puiFilename);
|
||||
GetSectorFromFileName(szFileName, sSectorX, sSectorY, bSectorZ, fAltMap);
|
||||
/*
|
||||
switch(bSector)
|
||||
{
|
||||
case 1:
|
||||
ubLevel = 1;
|
||||
else if( gbSectorLevels[gsSelSectorX-1][gsSelSectorY-1] & BASEMENT2_LEVEL_MASK )
|
||||
if(fAltMap)
|
||||
ubLevel = 5;
|
||||
break;
|
||||
case 2:
|
||||
ubLevel = 2;
|
||||
else if( gbSectorLevels[gsSelSectorX-1][gsSelSectorY-1] & BASEMENT3_LEVEL_MASK )
|
||||
if(fAltMap)
|
||||
ubLevel = 6;
|
||||
break;
|
||||
case 3:
|
||||
ubLevel = 3;
|
||||
else if( gbSectorLevels[gsSelSectorX-1][gsSelSectorY-1] & ALTERNATE_GROUND_MASK )
|
||||
ubLevel = 4;
|
||||
else if( gbSectorLevels[gsSelSectorX-1][gsSelSectorY-1] & ALTERNATE_B1_MASK )
|
||||
ubLevel = 5;
|
||||
else if( gbSectorLevels[gsSelSectorX-1][gsSelSectorY-1] & ALTERNATE_B2_MASK )
|
||||
ubLevel = 6;
|
||||
else if( gbSectorLevels[gsSelSectorX-1][gsSelSectorY-1] & ALTERNATE_B3_MASK )
|
||||
ubLevel = 7;
|
||||
#ifndef USE_VFS
|
||||
SetFileManCurrentDirectory( MapsDir );
|
||||
hfile = FileOpen( puiFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
|
||||
#else
|
||||
sprintf( MapsDir, "Maps\\%s", puiFilename );
|
||||
hfile = FileOpen( MapsDir, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
|
||||
#endif
|
||||
if( hfile )
|
||||
{
|
||||
FileRead( hfile, &dMajorVersion, sizeof( FLOAT ), &uiNumBytesRead );
|
||||
FileRead( hfile, &dMinorVersion, sizeof( UINT8 ), &uiNumBytesRead );
|
||||
FileClose( hfile );
|
||||
if(fAltMap)
|
||||
ubLevel = 7;
|
||||
break;
|
||||
default:
|
||||
ubLevel = 0;
|
||||
if(fAltMap)
|
||||
ubLevel = 4;
|
||||
break;
|
||||
}
|
||||
#ifndef USE_VFS
|
||||
SetFileManCurrentDirectory( DataDir );
|
||||
#endif
|
||||
|
||||
if(dMajorVersion < gdMajorMapVersion || dMinorVersion < gubMinorMapVersion)
|
||||
gfMajorUpdate = TRUE;
|
||||
*/
|
||||
ubLevel = bSectorZ;
|
||||
if(fAltMap)
|
||||
ubLevel += 4;
|
||||
if(sSectorX)
|
||||
sprintf(name, "%c%d", (sSectorY-1+'A'), sSectorX);
|
||||
else
|
||||
gfMajorUpdate = FALSE;
|
||||
|
||||
//CHRISL: If gfMajorUpdate is ever set TRUE, the code will load a map, update it, then save the map... THEN it will
|
||||
// reload the map so you can look at it. But I'm thinking the only time we should actually update the actual map
|
||||
// file is when we intentionally save the file. So, for now, make sure this flag is always FALSE.
|
||||
gfMajorUpdate = FALSE;
|
||||
|
||||
sprintf( name, "%c%d", (gsSelSectorY-1) + 'A', gsSelSectorX );
|
||||
if( !EvaluateWorld( name, ubLevel ) )
|
||||
{
|
||||
gfMajorUpdate = FALSE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gfMajorUpdate = FALSE;
|
||||
return TRUE;
|
||||
strcpy(name, puiFilename);
|
||||
if(!EvaluateWorld(name, ubLevel))
|
||||
return(FALSE);
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
void ApologizeOverrideAndForceUpdateEverything()
|
||||
|
||||
@@ -31,5 +31,8 @@ extern BOOLEAN gfUpdateSummaryInfo;
|
||||
|
||||
extern UINT8 GetCurrentSummaryVersion();
|
||||
|
||||
void GetSectorFromFileName(STR16 szFileName, INT16& sSectorX, INT16& sSectorY, INT8& bSectorZ, BOOLEAN& fAltMap);//dnl ch31 140909
|
||||
void ResetCustomFileSectorSummary(void);//dnl ch30 150909
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@@ -133,12 +133,12 @@ void DecSmartBrokenWallUIValue()
|
||||
gubBrokenWallUIValue -= gubBrokenWallUIValue > 0 ? 1 : -4;
|
||||
}
|
||||
|
||||
BOOLEAN CalcWallInfoUsingSmartMethod( UINT32 iMapIndex, UINT16 *pusWallType, UINT16 *pusIndex )
|
||||
BOOLEAN CalcWallInfoUsingSmartMethod( INT32 iMapIndex, UINT16 *pusWallType, UINT16 *pusIndex )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOLEAN CalcDoorInfoUsingSmartMethod( UINT32 iMapIndex, UINT16 *pusDoorType, UINT16 *pusIndex )
|
||||
BOOLEAN CalcDoorInfoUsingSmartMethod( INT32 iMapIndex, UINT16 *pusDoorType, UINT16 *pusIndex )
|
||||
{
|
||||
LEVELNODE *pWall = NULL;
|
||||
UINT16 usWallOrientation;
|
||||
@@ -161,7 +161,7 @@ BOOLEAN CalcDoorInfoUsingSmartMethod( UINT32 iMapIndex, UINT16 *pusDoorType, UIN
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOLEAN CalcWindowInfoUsingSmartMethod( UINT32 iMapIndex, UINT16 *pusWallType, UINT16 *pusIndex )
|
||||
BOOLEAN CalcWindowInfoUsingSmartMethod( INT32 iMapIndex, UINT16 *pusWallType, UINT16 *pusIndex )
|
||||
{
|
||||
LEVELNODE *pWall = NULL;
|
||||
UINT32 uiTileType;
|
||||
@@ -200,7 +200,7 @@ BOOLEAN CalcWindowInfoUsingSmartMethod( UINT32 iMapIndex, UINT16 *pusWallType, U
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOLEAN CalcBrokenWallInfoUsingSmartMethod( UINT32 iMapIndex, UINT16 *pusWallType, UINT16 *pusIndex )
|
||||
BOOLEAN CalcBrokenWallInfoUsingSmartMethod( INT32 iMapIndex, UINT16 *pusWallType, UINT16 *pusIndex )
|
||||
{
|
||||
LEVELNODE *pWall = NULL;
|
||||
UINT32 uiTileType;
|
||||
@@ -267,10 +267,10 @@ BOOLEAN CalcBrokenWallInfoUsingSmartMethod( UINT32 iMapIndex, UINT16 *pusWallTyp
|
||||
// type, there are two more cases. When there is a bottom wall in the y+1 position or a right wall in
|
||||
// the x+1 position. If there are matching walls, there, then we draw two pieces to connect the current
|
||||
// gridno with the respective position.
|
||||
void PasteSmartWall( UINT32 iMapIndex )
|
||||
void PasteSmartWall( INT32 iMapIndex )
|
||||
{
|
||||
static BOOLEAN fWallAlone = FALSE;
|
||||
static UINT32 iAloneMapIndex = 0x8000;
|
||||
static UINT32 iAloneMapIndex = 0x80000000;
|
||||
UINT16 usWallType;
|
||||
|
||||
//These are the counters for the walls of each type
|
||||
@@ -481,7 +481,7 @@ void PasteSmartWall( UINT32 iMapIndex )
|
||||
//Check for the highest weight value.
|
||||
}
|
||||
|
||||
void PasteSmartDoor( UINT32 iMapIndex )
|
||||
void PasteSmartDoor( INT32 iMapIndex )
|
||||
{
|
||||
LEVELNODE *pWall = NULL;
|
||||
UINT16 usTileIndex;
|
||||
@@ -509,7 +509,7 @@ void PasteSmartDoor( UINT32 iMapIndex )
|
||||
}
|
||||
}
|
||||
|
||||
void PasteSmartWindow( UINT32 iMapIndex )
|
||||
void PasteSmartWindow( INT32 iMapIndex )
|
||||
{
|
||||
UINT16 usNewWallIndex;
|
||||
|
||||
@@ -558,7 +558,7 @@ void PasteSmartWindow( UINT32 iMapIndex )
|
||||
}
|
||||
}
|
||||
|
||||
void PasteSmartBrokenWall( UINT32 iMapIndex )
|
||||
void PasteSmartBrokenWall( INT32 iMapIndex )
|
||||
{
|
||||
UINT16 usNewWallIndex;
|
||||
|
||||
|
||||
@@ -23,15 +23,15 @@ void DecSmartWindowUIValue();
|
||||
void IncSmartBrokenWallUIValue();
|
||||
void DecSmartBrokenWallUIValue();
|
||||
|
||||
BOOLEAN CalcWallInfoUsingSmartMethod( UINT32 iMapIndex, UINT16 *pusWallType, UINT16 *pusIndex );
|
||||
BOOLEAN CalcDoorInfoUsingSmartMethod( UINT32 iMapIndex, UINT16 *pusDoorType, UINT16 *pusIndex );
|
||||
BOOLEAN CalcWindowInfoUsingSmartMethod( UINT32 iMapIndex, UINT16 *pusWallType, UINT16 *pusIndex );
|
||||
BOOLEAN CalcBrokenWallInfoUsingSmartMethod( UINT32 iMapIndex, UINT16 *pusWallType, UINT16 *pusIndex );
|
||||
BOOLEAN CalcWallInfoUsingSmartMethod( INT32 iMapIndex, UINT16 *pusWallType, UINT16 *pusIndex );
|
||||
BOOLEAN CalcDoorInfoUsingSmartMethod( INT32 iMapIndex, UINT16 *pusDoorType, UINT16 *pusIndex );
|
||||
BOOLEAN CalcWindowInfoUsingSmartMethod( INT32 iMapIndex, UINT16 *pusWallType, UINT16 *pusIndex );
|
||||
BOOLEAN CalcBrokenWallInfoUsingSmartMethod( INT32 iMapIndex, UINT16 *pusWallType, UINT16 *pusIndex );
|
||||
|
||||
void PasteSmartWall( UINT32 iMapIndex );
|
||||
void PasteSmartDoor( UINT32 iMapIndex );
|
||||
void PasteSmartWindow( UINT32 iMapIndex );
|
||||
void PasteSmartBrokenWall( UINT32 iMapIndex );
|
||||
void PasteSmartWall( INT32 iMapIndex );
|
||||
void PasteSmartDoor( INT32 iMapIndex );
|
||||
void PasteSmartWindow( INT32 iMapIndex );
|
||||
void PasteSmartBrokenWall( INT32 iMapIndex );
|
||||
|
||||
extern UINT8 gubDoorUIValue;
|
||||
extern UINT8 gubWindowUIValue;
|
||||
|
||||
+20
-20
@@ -24,7 +24,7 @@ extern UINT16 PickAWallPiece( UINT16 usWallPieceType );
|
||||
//This method isn't foolproof, but because erasing large areas of buildings could result in
|
||||
//multiple wall types for each building. When processing the region, it is necessary to
|
||||
//calculate the roof type by searching for the nearest roof tile.
|
||||
UINT16 SearchForWallType( UINT32 iMapIndex )
|
||||
UINT16 SearchForWallType( INT32 iMapIndex )
|
||||
{
|
||||
UINT32 uiTileType;
|
||||
LEVELNODE *pWall;
|
||||
@@ -47,7 +47,7 @@ UINT16 SearchForWallType( UINT32 iMapIndex )
|
||||
if( abs(x) == abs(sRadius) || abs(y) == abs(sRadius) )
|
||||
{
|
||||
sOffset = y * WORLD_COLS + x;
|
||||
if( !GridNoOnVisibleWorldTile( (INT16)(iMapIndex + sOffset) ) )
|
||||
if( !GridNoOnVisibleWorldTile( iMapIndex + sOffset ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -75,7 +75,7 @@ UINT16 SearchForWallType( UINT32 iMapIndex )
|
||||
//This method isn't foolproof, but because erasing large areas of buildings could result in
|
||||
//multiple roof types for each building. When processing the region, it is necessary to
|
||||
//calculate the roof type by searching for the nearest roof tile.
|
||||
UINT16 SearchForRoofType( UINT32 iMapIndex )
|
||||
UINT16 SearchForRoofType( INT32 iMapIndex )
|
||||
{
|
||||
UINT32 uiTileType;
|
||||
LEVELNODE *pRoof;
|
||||
@@ -88,7 +88,7 @@ UINT16 SearchForRoofType( UINT32 iMapIndex )
|
||||
if( abs(x) == abs(sRadius) || abs(y) == abs(sRadius) )
|
||||
{
|
||||
sOffset = y * WORLD_COLS + x;
|
||||
if( !GridNoOnVisibleWorldTile( (INT16)(iMapIndex + sOffset) ) )
|
||||
if( !GridNoOnVisibleWorldTile( iMapIndex + sOffset ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -109,7 +109,7 @@ UINT16 SearchForRoofType( UINT32 iMapIndex )
|
||||
return 0xffff;
|
||||
}
|
||||
|
||||
BOOLEAN RoofAtGridNo( UINT32 iMapIndex )
|
||||
BOOLEAN RoofAtGridNo( INT32 iMapIndex )
|
||||
{
|
||||
LEVELNODE *pRoof;
|
||||
UINT32 uiTileType;
|
||||
@@ -128,7 +128,7 @@ BOOLEAN RoofAtGridNo( UINT32 iMapIndex )
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOLEAN BuildingAtGridNo( UINT32 iMapIndex )
|
||||
BOOLEAN BuildingAtGridNo( INT32 iMapIndex )
|
||||
{
|
||||
if( RoofAtGridNo( iMapIndex ) )
|
||||
return TRUE;
|
||||
@@ -137,7 +137,7 @@ BOOLEAN BuildingAtGridNo( UINT32 iMapIndex )
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOLEAN ValidDecalPlacement( UINT32 iMapIndex )
|
||||
BOOLEAN ValidDecalPlacement( INT32 iMapIndex )
|
||||
{
|
||||
if( GetVerticalWall( iMapIndex ) || GetHorizontalWall( iMapIndex )
|
||||
|| GetVerticalFence( iMapIndex ) || GetHorizontalFence( iMapIndex ) )
|
||||
@@ -145,7 +145,7 @@ BOOLEAN ValidDecalPlacement( UINT32 iMapIndex )
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
LEVELNODE* GetVerticalWall( UINT32 iMapIndex )
|
||||
LEVELNODE* GetVerticalWall( INT32 iMapIndex )
|
||||
{
|
||||
LEVELNODE *pStruct;
|
||||
UINT32 uiTileType;
|
||||
@@ -171,7 +171,7 @@ LEVELNODE* GetVerticalWall( UINT32 iMapIndex )
|
||||
return NULL;
|
||||
}
|
||||
|
||||
LEVELNODE* GetHorizontalWall( UINT32 iMapIndex )
|
||||
LEVELNODE* GetHorizontalWall( INT32 iMapIndex )
|
||||
{
|
||||
LEVELNODE *pStruct;
|
||||
UINT32 uiTileType;
|
||||
@@ -197,7 +197,7 @@ LEVELNODE* GetHorizontalWall( UINT32 iMapIndex )
|
||||
return NULL;
|
||||
}
|
||||
|
||||
UINT16 GetVerticalWallType( UINT32 iMapIndex )
|
||||
UINT16 GetVerticalWallType( INT32 iMapIndex )
|
||||
{
|
||||
LEVELNODE *pWall;
|
||||
UINT32 uiTileType;
|
||||
@@ -212,7 +212,7 @@ UINT16 GetVerticalWallType( UINT32 iMapIndex )
|
||||
return 0;
|
||||
}
|
||||
|
||||
UINT16 GetHorizontalWallType( UINT32 iMapIndex )
|
||||
UINT16 GetHorizontalWallType( INT32 iMapIndex )
|
||||
{
|
||||
LEVELNODE *pWall;
|
||||
UINT32 uiTileType;
|
||||
@@ -227,7 +227,7 @@ UINT16 GetHorizontalWallType( UINT32 iMapIndex )
|
||||
return 0;
|
||||
}
|
||||
|
||||
LEVELNODE* GetVerticalFence( UINT32 iMapIndex )
|
||||
LEVELNODE* GetVerticalFence( INT32 iMapIndex )
|
||||
{
|
||||
LEVELNODE *pStruct;
|
||||
UINT32 uiTileType;
|
||||
@@ -252,7 +252,7 @@ LEVELNODE* GetVerticalFence( UINT32 iMapIndex )
|
||||
return NULL;
|
||||
}
|
||||
|
||||
LEVELNODE* GetHorizontalFence( UINT32 iMapIndex )
|
||||
LEVELNODE* GetHorizontalFence( INT32 iMapIndex )
|
||||
{
|
||||
LEVELNODE *pStruct;
|
||||
UINT32 uiTileType;
|
||||
@@ -277,7 +277,7 @@ LEVELNODE* GetHorizontalFence( UINT32 iMapIndex )
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void EraseHorizontalWall( UINT32 iMapIndex )
|
||||
void EraseHorizontalWall( INT32 iMapIndex )
|
||||
{
|
||||
LEVELNODE *pWall;
|
||||
pWall = GetHorizontalWall( iMapIndex );
|
||||
@@ -289,7 +289,7 @@ void EraseHorizontalWall( UINT32 iMapIndex )
|
||||
}
|
||||
}
|
||||
|
||||
void EraseVerticalWall( UINT32 iMapIndex )
|
||||
void EraseVerticalWall( INT32 iMapIndex )
|
||||
{
|
||||
LEVELNODE *pWall;
|
||||
pWall = GetVerticalWall( iMapIndex );
|
||||
@@ -301,7 +301,7 @@ void EraseVerticalWall( UINT32 iMapIndex )
|
||||
}
|
||||
}
|
||||
|
||||
void ChangeHorizontalWall( UINT32 iMapIndex, UINT16 usNewPiece )
|
||||
void ChangeHorizontalWall( INT32 iMapIndex, UINT16 usNewPiece )
|
||||
{
|
||||
LEVELNODE *pWall;
|
||||
UINT32 uiTileType;
|
||||
@@ -321,7 +321,7 @@ void ChangeHorizontalWall( UINT32 iMapIndex, UINT16 usNewPiece )
|
||||
}
|
||||
}
|
||||
|
||||
void ChangeVerticalWall( UINT32 iMapIndex, UINT16 usNewPiece )
|
||||
void ChangeVerticalWall( INT32 iMapIndex, UINT16 usNewPiece )
|
||||
{
|
||||
LEVELNODE *pWall;
|
||||
UINT32 uiTileType;
|
||||
@@ -341,7 +341,7 @@ void ChangeVerticalWall( UINT32 iMapIndex, UINT16 usNewPiece )
|
||||
}
|
||||
}
|
||||
|
||||
void RestoreWalls( UINT32 iMapIndex )
|
||||
void RestoreWalls( INT32 iMapIndex )
|
||||
{
|
||||
LEVELNODE *pWall = NULL;
|
||||
UINT32 uiTileType;
|
||||
@@ -450,7 +450,7 @@ UINT16 GetWallClass( LEVELNODE *pWall )
|
||||
return 0xffff;
|
||||
}
|
||||
|
||||
UINT16 GetVerticalWallClass( UINT16 iMapIndex )
|
||||
UINT16 GetVerticalWallClass( INT32 iMapIndex )
|
||||
{
|
||||
LEVELNODE *pWall;
|
||||
if( pWall = GetVerticalWall( iMapIndex ) )
|
||||
@@ -458,7 +458,7 @@ UINT16 GetVerticalWallClass( UINT16 iMapIndex )
|
||||
return 0xffff;
|
||||
}
|
||||
|
||||
UINT16 GetHorizontalWallClass( UINT16 iMapIndex )
|
||||
UINT16 GetHorizontalWallClass( INT32 iMapIndex )
|
||||
{
|
||||
LEVELNODE *pWall;
|
||||
if( pWall = GetVerticalWall( iMapIndex ) )
|
||||
|
||||
+20
-20
@@ -38,28 +38,28 @@ enum {
|
||||
|
||||
//in newsmooth.c
|
||||
extern INT8 gbWallTileLUT[NUM_WALL_TYPES][7];
|
||||
extern void EraseWalls( UINT32 iMapIndex );
|
||||
extern void BuildWallPiece( UINT32 iMapIndex, UINT8 ubWallPiece, UINT16 usWallType );
|
||||
extern void EraseWalls( INT32 iMapIndex );
|
||||
extern void BuildWallPiece( INT32 iMapIndex, UINT8 ubWallPiece, UINT16 usWallType );
|
||||
//in Smoothing Utils
|
||||
void RestoreWalls( UINT32 iMapIndex );
|
||||
UINT16 SearchForRoofType( UINT32 iMapIndex );
|
||||
UINT16 SearchForWallType( UINT32 iMapIndex );
|
||||
BOOLEAN RoofAtGridNo( UINT32 iMapIndex );
|
||||
BOOLEAN BuildingAtGridNo( UINT32 iMapIndex );
|
||||
LEVELNODE* GetHorizontalWall( UINT32 iMapIndex );
|
||||
LEVELNODE* GetVerticalWall( UINT32 iMapIndex );
|
||||
LEVELNODE* GetVerticalFence( UINT32 iMapIndex );
|
||||
LEVELNODE* GetHorizontalFence( UINT32 iMapIndex );
|
||||
UINT16 GetHorizontalWallType( UINT32 iMapIndex );
|
||||
UINT16 GetVerticalWallType( UINT32 iMapIndex );
|
||||
void EraseHorizontalWall( UINT32 iMapIndex );
|
||||
void EraseVerticalWall( UINT32 iMapIndex );
|
||||
void ChangeHorizontalWall( UINT32 iMapIndex, UINT16 usNewPiece );
|
||||
void ChangeVerticalWall( UINT32 iMapIndex, UINT16 usNewPiece );
|
||||
void RestoreWalls( INT32 iMapIndex );
|
||||
UINT16 SearchForRoofType( INT32 iMapIndex );
|
||||
UINT16 SearchForWallType( INT32 iMapIndex );
|
||||
BOOLEAN RoofAtGridNo( INT32 iMapIndex );
|
||||
BOOLEAN BuildingAtGridNo( INT32 iMapIndex );
|
||||
LEVELNODE* GetHorizontalWall( INT32 iMapIndex );
|
||||
LEVELNODE* GetVerticalWall( INT32 iMapIndex );
|
||||
LEVELNODE* GetVerticalFence( INT32 iMapIndex );
|
||||
LEVELNODE* GetHorizontalFence( INT32 iMapIndex );
|
||||
UINT16 GetHorizontalWallType( INT32 iMapIndex );
|
||||
UINT16 GetVerticalWallType( INT32 iMapIndex );
|
||||
void EraseHorizontalWall( INT32 iMapIndex );
|
||||
void EraseVerticalWall( INT32 iMapIndex );
|
||||
void ChangeHorizontalWall( INT32 iMapIndex, UINT16 usNewPiece );
|
||||
void ChangeVerticalWall( INT32 iMapIndex, UINT16 usNewPiece );
|
||||
UINT16 GetWallClass( LEVELNODE *pWall );
|
||||
UINT16 GetVerticalWallClass( UINT16 iMapIndex );
|
||||
UINT16 GetHorizontalWallClass( UINT16 iMapIndex );
|
||||
BOOLEAN ValidDecalPlacement( UINT32 iMapIndex );
|
||||
UINT16 GetVerticalWallClass( INT32 iMapIndex );
|
||||
UINT16 GetHorizontalWallClass( INT32 iMapIndex );
|
||||
BOOLEAN ValidDecalPlacement( INT32 iMapIndex );
|
||||
|
||||
#endif
|
||||
#endif
|
||||
+59
-9
@@ -6,8 +6,9 @@
|
||||
|
||||
#include "Types.h"
|
||||
|
||||
#define GLOBAL_SUMMARY_VERSION 14
|
||||
#define MINIMUMVERSION 7
|
||||
//dnl ch28
|
||||
#define GLOBAL_SUMMARY_VERSION 15
|
||||
#define MINIMUMVERSION 7
|
||||
|
||||
typedef struct TEAMSUMMARY
|
||||
{
|
||||
@@ -20,14 +21,14 @@ typedef struct TEAMSUMMARY
|
||||
UINT8 ubBadE, ubPoorE, ubAvgE, ubGoodE, ubGreatE; //equipment
|
||||
}TEAMSUMMARY; //15 bytes
|
||||
|
||||
typedef struct SUMMARYFILE
|
||||
typedef struct
|
||||
{
|
||||
//start version 1
|
||||
UINT8 ubSummaryVersion;
|
||||
UINT8 ubSpecial;
|
||||
UINT16 usNumItems;
|
||||
UINT16 usNumLights;
|
||||
MAPCREATE_STRUCT MapInfo;
|
||||
_OLD_MAPCREATE_STRUCT MapInfo;
|
||||
TEAMSUMMARY EnemyTeam;
|
||||
TEAMSUMMARY CreatureTeam;
|
||||
TEAMSUMMARY RebelTeam;
|
||||
@@ -65,7 +66,7 @@ typedef struct SUMMARYFILE
|
||||
// //-----
|
||||
// 190
|
||||
//start version 10
|
||||
EXITGRID ExitGrid[4]; //5*4 // 20
|
||||
_OLD_EXITGRID ExitGrid[4]; //5*4 // 20
|
||||
UINT16 usExitGridSize[4]; //2*4 // 8
|
||||
BOOLEAN fInvalidDest[4]; // 4
|
||||
UINT8 ubNumExitGridDests; // 1
|
||||
@@ -93,13 +94,62 @@ typedef struct SUMMARYFILE
|
||||
UINT8 ubPadding[164]; // 164
|
||||
// //-----
|
||||
// 400 total bytes
|
||||
}SUMMARYFILE;
|
||||
}_OLD_SUMMARYFILE;//dnl ch28 240909
|
||||
|
||||
class SUMMARYFILE//dnl ch28 260909
|
||||
{
|
||||
public:
|
||||
UINT8 ubSummaryVersion;//This byte in all versions must be first
|
||||
UINT8 ubSpecial;
|
||||
UINT16 ubNumRooms;
|
||||
UINT32 usNumItems;
|
||||
UINT32 usNumLights;
|
||||
UINT16 ubNumDoors;
|
||||
UINT16 ubNumDoorsLocked;
|
||||
UINT16 ubNumDoorsTrapped;
|
||||
UINT16 ubNumDoorsLockedAndTrapped;
|
||||
UINT16 ubNumElites;
|
||||
UINT16 ubNumAdmins;
|
||||
UINT16 ubNumTroops;
|
||||
UINT16 ubEliteDetailed;
|
||||
UINT16 ubAdminDetailed;
|
||||
UINT16 ubTroopDetailed;
|
||||
UINT16 ubEliteProfile;
|
||||
UINT16 ubAdminProfile;
|
||||
UINT16 ubTroopProfile;
|
||||
UINT16 ubEliteExistance;
|
||||
UINT16 ubAdminExistance;
|
||||
UINT16 ubTroopExistance;
|
||||
UINT16 ubCivSchedules;
|
||||
UINT16 ubCivCows;
|
||||
UINT16 ubCivBloodcats;
|
||||
UINT16 ubEnemiesReqWaypoints;
|
||||
UINT16 usWarningRoomNums;
|
||||
UINT16 ubEnemiesHaveWaypoints;
|
||||
UINT32 ubTilesetID;
|
||||
UINT32 uiNumItemsPosition;
|
||||
UINT32 uiEnemyPlacementPosition;
|
||||
FLOAT dMajorMapVersion;
|
||||
TEAMSUMMARY EnemyTeam;
|
||||
TEAMSUMMARY CreatureTeam;
|
||||
TEAMSUMMARY RebelTeam;
|
||||
TEAMSUMMARY CivTeam;
|
||||
MAPCREATE_STRUCT MapInfo;
|
||||
EXITGRID ExitGrid[4];
|
||||
BOOLEAN fInvalidDest[4];
|
||||
UINT16 usExitGridSize[4];
|
||||
UINT16 ubNumExitGridDests;
|
||||
BOOLEAN fTooManyExitGridDests;
|
||||
public:
|
||||
SUMMARYFILE& operator=(const _OLD_SUMMARYFILE& src);
|
||||
BOOLEAN Load(STR sFileName);
|
||||
BOOLEAN Save(STR sFileName);
|
||||
};
|
||||
|
||||
extern BOOLEAN gfAutoLoadA9;
|
||||
|
||||
extern BOOLEAN EvaluateWorld( STR8 pSector, UINT8 ubLevel );
|
||||
|
||||
extern void WriteSectorSummaryUpdate( STR8 puiFilename, UINT8 ubLevel, SUMMARYFILE *pSummaryFileInfo );
|
||||
BOOLEAN EvaluateWorld(STR8 pSector, UINT8 ubLevel);//dnl ch42 260909
|
||||
void WriteSectorSummaryUpdate(STR8 sFileName, UINT8 ubLevel, SUMMARYFILE* pSummaryFileInfo);//dnl ch28 260909
|
||||
|
||||
extern BOOLEAN gfMustForceUpdateAllMaps;
|
||||
extern BOOLEAN gfMajorUpdate;
|
||||
|
||||
+450
-78
@@ -31,12 +31,12 @@
|
||||
#endif
|
||||
|
||||
BOOLEAN PasteHigherTextureFromRadius( INT32 iMapIndex, UINT32 uiNewType, UINT8 ubRadius );
|
||||
BOOLEAN PasteExistingTexture( UINT32 iMapIndex, UINT16 usIndex );
|
||||
BOOLEAN PasteExistingTexture( INT32 iMapIndex, UINT16 usIndex );
|
||||
BOOLEAN PasteExistingTextureFromRadius( INT32 iMapIndex, UINT16 usIndex, UINT8 ubRadius );
|
||||
BOOLEAN SetLowerLandIndexWithRadius( INT32 iMapIndex, UINT32 uiNewType, UINT8 ubRadius, BOOLEAN fReplace );
|
||||
|
||||
void PasteTextureEx( INT16 sGridNo, UINT16 usType );
|
||||
void PasteTextureFromRadiusEx( INT16 sGridNo, UINT16 usType, UINT8 ubRadius );
|
||||
void PasteTextureEx( INT32 sGridNo, UINT16 usType );
|
||||
void PasteTextureFromRadiusEx( INT32 sGridNo, UINT16 usType, UINT8 ubRadius );
|
||||
|
||||
|
||||
BOOLEAN gfWarning = FALSE;
|
||||
@@ -56,9 +56,9 @@ UINT32 gDoCliffs = NO_CLIFFS;
|
||||
//
|
||||
// Performs ersing operation when the DEL key is hit in the editor
|
||||
//
|
||||
void QuickEraseMapTile( UINT32 iMapIndex )
|
||||
void QuickEraseMapTile( INT32 iMapIndex )
|
||||
{
|
||||
if ( iMapIndex >= 0x8000 )
|
||||
if ( iMapIndex >= 0x80000000 )
|
||||
return;
|
||||
AddToUndoList( iMapIndex );
|
||||
DeleteStuffFromMapTile( iMapIndex );
|
||||
@@ -71,7 +71,7 @@ void QuickEraseMapTile( UINT32 iMapIndex )
|
||||
//
|
||||
// Common delete function for both QuickEraseMapTile and EraseMapTile
|
||||
//
|
||||
void DeleteStuffFromMapTile( UINT32 iMapIndex )
|
||||
void DeleteStuffFromMapTile( INT32 iMapIndex )
|
||||
{
|
||||
//UINT16 usUseIndex;
|
||||
//UINT16 usType;
|
||||
@@ -99,11 +99,11 @@ void DeleteStuffFromMapTile( UINT32 iMapIndex )
|
||||
//
|
||||
// Generic tile erasing function. Erases things from the world depending on the current drawing mode
|
||||
//
|
||||
void EraseMapTile( UINT32 iMapIndex )
|
||||
void EraseMapTile( INT32 iMapIndex )
|
||||
{
|
||||
INT32 iEraseMode;
|
||||
UINT32 uiCheckType;
|
||||
if ( iMapIndex >= 0x8000 )
|
||||
if ( iMapIndex >= 0x80000000 )
|
||||
return;
|
||||
|
||||
// Figure out what it is we are trying to erase
|
||||
@@ -122,7 +122,7 @@ void EraseMapTile( UINT32 iMapIndex )
|
||||
case DRAW_MODE_EXITGRID:
|
||||
AddToUndoList( iMapIndex );
|
||||
RemoveExitGridFromWorld( iMapIndex );
|
||||
RemoveTopmost( (INT16)iMapIndex, FIRSTPOINTERS8 );
|
||||
RemoveTopmost( iMapIndex, FIRSTPOINTERS8 );
|
||||
break;
|
||||
case DRAW_MODE_GROUND:
|
||||
// Is there ground on this tile? if not, get out o here
|
||||
@@ -137,6 +137,10 @@ void EraseMapTile( UINT32 iMapIndex )
|
||||
RemoveLand( iMapIndex, gpWorldLevelData[ iMapIndex ].pLandHead->usIndex );
|
||||
SmoothTerrainRadius( iMapIndex, uiCheckType, 1, TRUE );
|
||||
break;
|
||||
case DRAW_MODE_HIGH_GROUND://dnl ch1 210909
|
||||
gpWorldLevelData[iMapIndex].sHeight = 0;
|
||||
RemoveTopmost(iMapIndex, FIRSTPOINTERS6);
|
||||
break;
|
||||
case DRAW_MODE_OSTRUCTS:
|
||||
case DRAW_MODE_OSTRUCTS1:
|
||||
case DRAW_MODE_OSTRUCTS2:
|
||||
@@ -221,7 +225,7 @@ void EraseMapTile( UINT32 iMapIndex )
|
||||
// Place some "debris" on the map at the current mouse coordinates. This function is called repeatedly if
|
||||
// the current brush size is larger than 1 tile.
|
||||
//
|
||||
void PasteDebris( UINT32 iMapIndex )
|
||||
void PasteDebris( INT32 iMapIndex )
|
||||
{
|
||||
UINT16 usUseIndex;
|
||||
UINT16 usUseObjIndex;
|
||||
@@ -231,7 +235,7 @@ void PasteDebris( UINT32 iMapIndex )
|
||||
pSelList = SelDebris;
|
||||
pNumSelList = &iNumDebrisSelected;
|
||||
|
||||
if ( iMapIndex < 0x8000 )
|
||||
if ( iMapIndex < 0x80000000 )
|
||||
{
|
||||
AddToUndoList( iMapIndex );
|
||||
|
||||
@@ -255,35 +259,35 @@ void PasteDebris( UINT32 iMapIndex )
|
||||
}
|
||||
|
||||
|
||||
void PasteSingleWall( UINT32 iMapIndex )
|
||||
void PasteSingleWall( INT32 iMapIndex )
|
||||
{
|
||||
pSelList = SelSingleWall;
|
||||
pNumSelList = &iNumWallsSelected;
|
||||
PasteSingleWallCommon( iMapIndex );
|
||||
}
|
||||
|
||||
void PasteSingleDoor( UINT32 iMapIndex )
|
||||
void PasteSingleDoor( INT32 iMapIndex )
|
||||
{
|
||||
pSelList = SelSingleDoor;
|
||||
pNumSelList = &iNumDoorsSelected;
|
||||
PasteSingleWallCommon( iMapIndex );
|
||||
}
|
||||
|
||||
void PasteSingleWindow( UINT32 iMapIndex )
|
||||
void PasteSingleWindow( INT32 iMapIndex )
|
||||
{
|
||||
pSelList = SelSingleWindow;
|
||||
pNumSelList = &iNumWindowsSelected;
|
||||
PasteSingleWallCommon( iMapIndex );
|
||||
}
|
||||
|
||||
void PasteSingleRoof( UINT32 iMapIndex )
|
||||
void PasteSingleRoof( INT32 iMapIndex )
|
||||
{
|
||||
pSelList = SelSingleRoof;
|
||||
pNumSelList = &iNumRoofsSelected;
|
||||
PasteSingleWallCommon( iMapIndex );
|
||||
}
|
||||
|
||||
void PasteRoomNumber( UINT32 iMapIndex, UINT8 ubRoomNumber )
|
||||
void PasteRoomNumber( INT32 iMapIndex, UINT8 ubRoomNumber )
|
||||
{
|
||||
if( gubWorldRoomInfo[ iMapIndex ] != ubRoomNumber )
|
||||
{
|
||||
@@ -292,7 +296,7 @@ void PasteRoomNumber( UINT32 iMapIndex, UINT8 ubRoomNumber )
|
||||
}
|
||||
}
|
||||
|
||||
void PasteSingleBrokenWall( UINT32 iMapIndex )
|
||||
void PasteSingleBrokenWall( INT32 iMapIndex )
|
||||
{
|
||||
UINT16 usIndex, usObjIndex, usTileIndex, usWallOrientation;
|
||||
|
||||
@@ -311,28 +315,28 @@ void PasteSingleBrokenWall( UINT32 iMapIndex )
|
||||
PasteSingleWallCommon( iMapIndex );
|
||||
}
|
||||
|
||||
void PasteSingleDecoration( UINT32 iMapIndex )
|
||||
void PasteSingleDecoration( INT32 iMapIndex )
|
||||
{
|
||||
pSelList = SelSingleDecor;
|
||||
pNumSelList = &iNumDecorSelected;
|
||||
PasteSingleWallCommon( iMapIndex );
|
||||
}
|
||||
|
||||
void PasteSingleDecal( UINT32 iMapIndex )
|
||||
void PasteSingleDecal( INT32 iMapIndex )
|
||||
{
|
||||
pSelList = SelSingleDecal;
|
||||
pNumSelList = &iNumDecalsSelected;
|
||||
PasteSingleWallCommon( iMapIndex );
|
||||
}
|
||||
|
||||
void PasteSingleFloor( UINT32 iMapIndex )
|
||||
void PasteSingleFloor( INT32 iMapIndex )
|
||||
{
|
||||
pSelList = SelSingleFloor;
|
||||
pNumSelList = &iNumFloorsSelected;
|
||||
PasteSingleWallCommon( iMapIndex );
|
||||
}
|
||||
|
||||
void PasteSingleToilet( UINT32 iMapIndex )
|
||||
void PasteSingleToilet( INT32 iMapIndex )
|
||||
{
|
||||
pSelList = SelSingleToilet;
|
||||
pNumSelList = &iNumToiletsSelected;
|
||||
@@ -345,13 +349,13 @@ void PasteSingleToilet( UINT32 iMapIndex )
|
||||
// Common paste routine for PasteSingleWall, PasteSingleDoor, PasteSingleDecoration, and
|
||||
// PasteSingleDecor (above).
|
||||
//
|
||||
void PasteSingleWallCommon( UINT32 iMapIndex )
|
||||
void PasteSingleWallCommon( INT32 iMapIndex )
|
||||
{
|
||||
UINT16 usUseIndex;
|
||||
UINT16 usUseObjIndex;
|
||||
UINT16 usTempIndex;
|
||||
|
||||
if ( iMapIndex < 0x8000 )
|
||||
if ( iMapIndex < 0x80000000 )
|
||||
{
|
||||
AddToUndoList( iMapIndex );
|
||||
|
||||
@@ -501,7 +505,7 @@ UINT16 GetRandomTypeByRange( UINT16 usRangeStart, UINT16 usRangeEnd )
|
||||
//
|
||||
// Puts a structure (trees, trucks, etc.) into the world
|
||||
//
|
||||
void PasteStructure( UINT32 iMapIndex )
|
||||
void PasteStructure( INT32 iMapIndex )
|
||||
{
|
||||
pSelList = SelOStructs;
|
||||
pNumSelList = &iNumOStructsSelected;
|
||||
@@ -514,7 +518,7 @@ void PasteStructure( UINT32 iMapIndex )
|
||||
//
|
||||
// Puts a structure (trees, trucks, etc.) into the world
|
||||
//
|
||||
void PasteStructure1( UINT32 iMapIndex )
|
||||
void PasteStructure1( INT32 iMapIndex )
|
||||
{
|
||||
pSelList = SelOStructs1;
|
||||
pNumSelList = &iNumOStructs1Selected;
|
||||
@@ -527,7 +531,7 @@ void PasteStructure1( UINT32 iMapIndex )
|
||||
//
|
||||
// Puts a structure (trees, trucks, etc.) into the world
|
||||
//
|
||||
void PasteStructure2( UINT32 iMapIndex )
|
||||
void PasteStructure2( INT32 iMapIndex )
|
||||
{
|
||||
pSelList = SelOStructs2;
|
||||
pNumSelList = &iNumOStructs2Selected;
|
||||
@@ -542,7 +546,7 @@ void PasteStructure2( UINT32 iMapIndex )
|
||||
// This is the main (common) structure pasting function. The above three wrappers are only required because they
|
||||
// each use different selection lists. Other than that, they are COMPLETELY identical.
|
||||
//
|
||||
void PasteStructureCommon( UINT32 iMapIndex )
|
||||
void PasteStructureCommon( INT32 iMapIndex )
|
||||
{
|
||||
UINT32 fHeadType;
|
||||
UINT16 usUseIndex;
|
||||
@@ -550,7 +554,7 @@ void PasteStructureCommon( UINT32 iMapIndex )
|
||||
INT32 iRandSelIndex;
|
||||
BOOLEAN fOkayToAdd;
|
||||
|
||||
if ( iMapIndex < 0x8000 )
|
||||
if ( iMapIndex < 0x80000000 )
|
||||
{
|
||||
/*
|
||||
if ( gpWorldLevelData[ iMapIndex ].pStructHead != NULL )
|
||||
@@ -563,7 +567,7 @@ void PasteStructureCommon( UINT32 iMapIndex )
|
||||
fDoPaste = TRUE;
|
||||
}
|
||||
*/
|
||||
if ( /*fDoPaste &&*/ iMapIndex < 0x8000 )
|
||||
if ( /*fDoPaste &&*/ iMapIndex < 0x80000000 )
|
||||
{
|
||||
iRandSelIndex = GetRandomSelection( );
|
||||
if ( iRandSelIndex == -1 )
|
||||
@@ -577,7 +581,7 @@ void PasteStructureCommon( UINT32 iMapIndex )
|
||||
usUseObjIndex = (UINT16)pSelList[ iRandSelIndex ].uiObject;
|
||||
|
||||
// Check with Structure Database (aka ODB) if we can put the object here!
|
||||
fOkayToAdd = OkayToAddStructureToWorld( (INT16)iMapIndex, 0, gTileDatabase[ (gTileTypeStartIndex[ usUseObjIndex ] + usUseIndex) ].pDBStructureRef, INVALID_STRUCTURE_ID );
|
||||
fOkayToAdd = OkayToAddStructureToWorld( iMapIndex, 0, gTileDatabase[ (gTileTypeStartIndex[ usUseObjIndex ] + usUseIndex) ].pDBStructureRef, INVALID_STRUCTURE_ID );
|
||||
if ( fOkayToAdd || (gTileDatabase[ (gTileTypeStartIndex[ usUseObjIndex ] + usUseIndex) ].pDBStructureRef == NULL) )
|
||||
{
|
||||
//dnl Remove existing structure before adding the same, seems to solve problem with stacking but still need test to be sure that is not removed something what should stay
|
||||
@@ -591,7 +595,7 @@ void PasteStructureCommon( UINT32 iMapIndex )
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( CurrentStruct == ERASE_TILE && iMapIndex < 0x8000 )
|
||||
else if ( CurrentStruct == ERASE_TILE && iMapIndex < 0x80000000 )
|
||||
{
|
||||
RemoveAllStructsOfTypeRange( iMapIndex, FIRSTOSTRUCT, LASTOSTRUCT );
|
||||
RemoveAllShadowsOfTypeRange( iMapIndex, FIRSTSHADOW, LASTSHADOW );
|
||||
@@ -604,7 +608,7 @@ void PasteStructureCommon( UINT32 iMapIndex )
|
||||
//
|
||||
// Places a river bank or cliff into the world
|
||||
//
|
||||
void PasteBanks( UINT32 iMapIndex, UINT16 usStructIndex , BOOLEAN fReplace)
|
||||
void PasteBanks( INT32 iMapIndex, UINT16 usStructIndex , BOOLEAN fReplace)
|
||||
{
|
||||
BOOLEAN fDoPaste = FALSE;
|
||||
UINT16 usUseIndex;
|
||||
@@ -617,7 +621,7 @@ void PasteBanks( UINT32 iMapIndex, UINT16 usStructIndex , BOOLEAN fReplace)
|
||||
usUseIndex = pSelList[ iCurBank ].usIndex;
|
||||
usUseObjIndex = (UINT16)pSelList[ iCurBank ].uiObject;
|
||||
|
||||
if ( iMapIndex < 0x8000 )
|
||||
if ( iMapIndex < 0x80000000 )
|
||||
{
|
||||
fDoPaste = TRUE;
|
||||
|
||||
@@ -663,7 +667,7 @@ void PasteBanks( UINT32 iMapIndex, UINT16 usStructIndex , BOOLEAN fReplace)
|
||||
}
|
||||
}
|
||||
|
||||
void PasteRoads( UINT32 iMapIndex )
|
||||
void PasteRoads( INT32 iMapIndex )
|
||||
{
|
||||
UINT16 usUseIndex;
|
||||
|
||||
@@ -681,7 +685,7 @@ void PasteRoads( UINT32 iMapIndex )
|
||||
// Puts a ground texture in the world. Ground textures are then "smoothed" in order to blend the edges with one
|
||||
// another. The current drawing brush also affects this function.
|
||||
//
|
||||
void PasteTexture( UINT32 iMapIndex )
|
||||
void PasteTexture( INT32 iMapIndex )
|
||||
{
|
||||
ChooseWeightedTerrainTile(); //Kris
|
||||
PasteTextureCommon( iMapIndex );
|
||||
@@ -694,13 +698,13 @@ void PasteTexture( UINT32 iMapIndex )
|
||||
// one tile, then the above function will call this one and indicate that they should all be placed into the undo
|
||||
// stack as the same undo command.
|
||||
//
|
||||
void PasteTextureCommon( UINT32 iMapIndex )
|
||||
void PasteTextureCommon( INT32 iMapIndex )
|
||||
{
|
||||
UINT8 ubLastHighLevel;
|
||||
UINT16 usTileIndex;
|
||||
//UINT16 Dummy;
|
||||
|
||||
if ( CurrentPaste != NO_TILE && iMapIndex < 0x8000 )
|
||||
if ( CurrentPaste != NO_TILE && iMapIndex < 0x80000000 )
|
||||
{
|
||||
|
||||
// Set undo, then set new
|
||||
@@ -743,7 +747,7 @@ void PasteTextureCommon( UINT32 iMapIndex )
|
||||
}
|
||||
else
|
||||
{
|
||||
PasteTextureEx( (INT16)iMapIndex, CurrentPaste );
|
||||
PasteTextureEx( iMapIndex, CurrentPaste );
|
||||
SmoothTerrainRadius( iMapIndex, CurrentPaste, 1, TRUE );
|
||||
}
|
||||
}
|
||||
@@ -756,7 +760,7 @@ void PasteTextureCommon( UINT32 iMapIndex )
|
||||
// Some ground textures should be placed "above" others. That is, grass needs to be placed "above" sand etc.
|
||||
// This function performs the appropriate actions.
|
||||
//
|
||||
void PasteHigherTexture( UINT32 iMapIndex, UINT32 fNewType )
|
||||
void PasteHigherTexture( INT32 iMapIndex, UINT32 fNewType )
|
||||
{
|
||||
UINT16 NewTile;
|
||||
UINT8 ubLastHighLevel;
|
||||
@@ -776,7 +780,7 @@ void PasteHigherTexture( UINT32 iMapIndex, UINT32 fNewType )
|
||||
//return;
|
||||
|
||||
|
||||
if ( iMapIndex < 0x8000 && AnyHeigherLand( iMapIndex, fNewType, &ubLastHighLevel ))
|
||||
if ( iMapIndex < 0x80000000 && AnyHeigherLand( iMapIndex, fNewType, &ubLastHighLevel ))
|
||||
{
|
||||
AddToUndoList( iMapIndex );
|
||||
|
||||
@@ -795,7 +799,7 @@ void PasteHigherTexture( UINT32 iMapIndex, UINT32 fNewType )
|
||||
MemFree( puiDeletedTypes );
|
||||
|
||||
}
|
||||
else if ( iMapIndex < 0x8000 )
|
||||
else if ( iMapIndex < 0x80000000 )
|
||||
{
|
||||
AddToUndoList( iMapIndex );
|
||||
|
||||
@@ -821,9 +825,9 @@ void PasteHigherTexture( UINT32 iMapIndex, UINT32 fNewType )
|
||||
//
|
||||
BOOLEAN PasteHigherTextureFromRadius( INT32 iMapIndex, UINT32 uiNewType, UINT8 ubRadius )
|
||||
{
|
||||
INT16 sTop, sBottom;
|
||||
INT16 sLeft, sRight;
|
||||
INT16 cnt1, cnt2;
|
||||
INT32 sTop, sBottom;
|
||||
INT32 sLeft, sRight;
|
||||
INT32 cnt1, cnt2;
|
||||
INT32 iNewIndex;
|
||||
INT32 iXPos,iYPos;
|
||||
|
||||
@@ -836,19 +840,19 @@ BOOLEAN PasteHigherTextureFromRadius( INT32 iMapIndex, UINT32 uiNewType, UINT8 u
|
||||
iXPos = (iMapIndex % WORLD_COLS);
|
||||
iYPos = (iMapIndex - iXPos) / WORLD_COLS;
|
||||
|
||||
if ( (iXPos + (INT32)sLeft) < 0 )
|
||||
sLeft = (INT16)(-iXPos);
|
||||
if ( (iXPos + sLeft) < 0 )
|
||||
sLeft = (-iXPos);
|
||||
|
||||
if ( (iXPos + (INT32)sRight) >= WORLD_COLS )
|
||||
sRight = (INT16)(WORLD_COLS - iXPos - 1);
|
||||
if ( (iXPos + sRight) >= WORLD_COLS )
|
||||
sRight = (WORLD_COLS - iXPos - 1);
|
||||
|
||||
if ( (iYPos + (INT32)sTop) >= WORLD_ROWS )
|
||||
sTop = (INT16)(WORLD_ROWS - iYPos - 1);
|
||||
if ( (iYPos + sTop) >= WORLD_ROWS )
|
||||
sTop = (WORLD_ROWS - iYPos - 1);
|
||||
|
||||
if ( (iYPos + (INT32)sBottom) < 0 )
|
||||
sBottom = (INT16)(-iYPos);
|
||||
if ( (iYPos + sBottom) < 0 )
|
||||
sBottom = (-iYPos);
|
||||
|
||||
if ( iMapIndex >= 0x8000 )
|
||||
if ( iMapIndex >= 0x80000000 )
|
||||
return (FALSE);
|
||||
|
||||
for( cnt1 = sBottom; cnt1 <= sTop; cnt1++ )
|
||||
@@ -868,7 +872,7 @@ BOOLEAN PasteHigherTextureFromRadius( INT32 iMapIndex, UINT32 uiNewType, UINT8 u
|
||||
//---------------------------------------------------------------------------------------------------------------
|
||||
// PasteExistingTexture
|
||||
//
|
||||
BOOLEAN PasteExistingTexture( UINT32 iMapIndex, UINT16 usIndex )
|
||||
BOOLEAN PasteExistingTexture( INT32 iMapIndex, UINT16 usIndex )
|
||||
{
|
||||
UINT32 uiNewType;
|
||||
UINT16 usNewIndex;
|
||||
@@ -880,7 +884,7 @@ BOOLEAN PasteExistingTexture( UINT32 iMapIndex, UINT16 usIndex )
|
||||
// - remove what was top-most
|
||||
// - re-adjust the world to reflect missing top-most peice
|
||||
|
||||
if ( iMapIndex >= 0x8000 )
|
||||
if ( iMapIndex >= 0x80000000 )
|
||||
return ( FALSE );
|
||||
|
||||
//if ( TypeRangeExistsInLandLayer( iMapIndex, FIRSTFLOOR, LASTFLOOR, &Dummy ) )
|
||||
@@ -917,9 +921,9 @@ BOOLEAN PasteExistingTexture( UINT32 iMapIndex, UINT16 usIndex )
|
||||
//
|
||||
BOOLEAN PasteExistingTextureFromRadius( INT32 iMapIndex, UINT16 usIndex, UINT8 ubRadius )
|
||||
{
|
||||
INT16 sTop, sBottom;
|
||||
INT16 sLeft, sRight;
|
||||
INT16 cnt1, cnt2;
|
||||
INT32 sTop, sBottom;
|
||||
INT32 sLeft, sRight;
|
||||
INT32 cnt1, cnt2;
|
||||
INT32 iNewIndex;
|
||||
INT32 leftmost;
|
||||
|
||||
@@ -929,7 +933,7 @@ BOOLEAN PasteExistingTextureFromRadius( INT32 iMapIndex, UINT16 usIndex, UINT8 u
|
||||
sLeft = - ubRadius;
|
||||
sRight = ubRadius;
|
||||
|
||||
if ( iMapIndex >= 0x8000 )
|
||||
if ( iMapIndex >= 0x80000000 )
|
||||
return ( FALSE );
|
||||
|
||||
for( cnt1 = sBottom; cnt1 <= sTop; cnt1++ )
|
||||
@@ -963,9 +967,9 @@ BOOLEAN PasteExistingTextureFromRadius( INT32 iMapIndex, UINT16 usIndex, UINT8 u
|
||||
BOOLEAN SetLowerLandIndexWithRadius( INT32 iMapIndex, UINT32 uiNewType, UINT8 ubRadius, BOOLEAN fReplace )
|
||||
{
|
||||
UINT16 usTempIndex;
|
||||
INT16 sTop, sBottom;
|
||||
INT16 sLeft, sRight;
|
||||
INT16 cnt1, cnt2;
|
||||
INT32 sTop, sBottom;
|
||||
INT32 sLeft, sRight;
|
||||
INT32 cnt1, cnt2;
|
||||
INT32 iNewIndex;
|
||||
BOOLEAN fDoPaste = FALSE;
|
||||
INT32 leftmost;
|
||||
@@ -981,7 +985,7 @@ BOOLEAN SetLowerLandIndexWithRadius( INT32 iMapIndex, UINT32 uiNewType, UINT8 ub
|
||||
sLeft = - ubRadius;
|
||||
sRight = ubRadius;
|
||||
|
||||
if ( iMapIndex >= 0x8000 )
|
||||
if ( iMapIndex >= 0x80000000 )
|
||||
return ( FALSE );
|
||||
|
||||
for( cnt1 = sBottom; cnt1 <= sTop; cnt1++ )
|
||||
@@ -1064,7 +1068,7 @@ BOOLEAN SetLowerLandIndexWithRadius( INT32 iMapIndex, UINT32 uiNewType, UINT8 ub
|
||||
}
|
||||
|
||||
// ATE FIXES
|
||||
void PasteTextureEx( INT16 sGridNo, UINT16 usType )
|
||||
void PasteTextureEx( INT32 sGridNo, UINT16 usType )
|
||||
{
|
||||
UINT16 usIndex;
|
||||
UINT8 ubTypeLevel;
|
||||
@@ -1094,11 +1098,11 @@ void PasteTextureEx( INT16 sGridNo, UINT16 usType )
|
||||
}
|
||||
|
||||
|
||||
void PasteTextureFromRadiusEx( INT16 sGridNo, UINT16 usType, UINT8 ubRadius )
|
||||
void PasteTextureFromRadiusEx( INT32 sGridNo, UINT16 usType, UINT8 ubRadius )
|
||||
{
|
||||
INT16 sTop, sBottom;
|
||||
INT16 sLeft, sRight;
|
||||
INT16 cnt1, cnt2;
|
||||
INT32 sTop, sBottom;
|
||||
INT32 sLeft, sRight;
|
||||
INT32 cnt1, cnt2;
|
||||
INT32 iNewIndex;
|
||||
INT32 leftmost;
|
||||
|
||||
@@ -1108,7 +1112,7 @@ void PasteTextureFromRadiusEx( INT16 sGridNo, UINT16 usType, UINT8 ubRadius )
|
||||
sLeft = - ubRadius;
|
||||
sRight = ubRadius;
|
||||
|
||||
if ( sGridNo >= 0x8000 )
|
||||
if ( sGridNo >= 0x80000000 )
|
||||
return;
|
||||
|
||||
for( cnt1 = sBottom; cnt1 <= sTop; cnt1++ )
|
||||
@@ -1132,6 +1136,377 @@ void PasteTextureFromRadiusEx( INT16 sGridNo, UINT16 usType, UINT8 ubRadius )
|
||||
return;
|
||||
}
|
||||
|
||||
/************** Start of New Definition for Cliff tiles **************/
|
||||
//dnl ch3 210909
|
||||
#define FIRSTCLIFFSNUMBER (FIRSTCLIFF17-FIRSTCLIFF1+1)
|
||||
#define FIRSTCLIFFSHANGNUMBER (FIRSTCLIFFHANG17-FIRSTCLIFFHANG1+1)
|
||||
typedef struct
|
||||
{
|
||||
UINT8 ubNumberOfTiles;
|
||||
RelTileLoc TileLocData[256];
|
||||
}CLIFF_OFFSET_DATA;
|
||||
|
||||
CLIFF_OFFSET_DATA CliffOffsetData[FIRSTCLIFFSNUMBER]=
|
||||
{
|
||||
{11, -6,-7, -5,-7, -6,-6, -4,-6, -3,-5, -2,-4, -1,-3, -1,-2, -1,-1, -1, 0, 0, 0 },//FIRSTCLIFF1
|
||||
{10, -7,-6, -7,-5, -6,-4, -5,-3, -4,-2, -3,-1, -2,-1, -1,-1, 0,-1, 0, 0 },//FIRSTCLIFF2
|
||||
{ 6, 3,-3, 2,-2, 0,-1, 1,-1, 2,-1, 0, 0 },//FIRSTCLIFF3
|
||||
{ 6, 2,-3, 3,-3, 0,-2, 1,-2, 0,-1, 0, 0 },//FIRSTCLIFF4
|
||||
{ 5, 0,-4, 0,-3, 0,-2, 0,-1, 0, 0 },//FIRSTCLIFF5
|
||||
{ 7, 0,-4, 1,-3, 1,-2, 0,-1, 1,-1, 0, 0, 1, 0 },//FIRSTCLIFF6
|
||||
{ 8, -4,-1, -3,-1, -2,-1, -1,-1, -4,0, -3, 0, -2, 0, -1, 0 },//FIRSTCLIFF7
|
||||
{ 6, -4,-1, -3,-1, -2,-1, -1,-1, -4, 0, 0, 0 },//FIRSTCLIFF8
|
||||
{ 7, 2,-3, 3,-3, 1,-2, 2,-2, 0,-1, 1,-1, 0, 0 },//FIRSTCLIFF9
|
||||
{ 5, -4, 0, -3, 0, -2, 0, -1, 0, 0, 0 },//FIRSTCLIFF10
|
||||
{ 7, -2,-5, -2,-4, -1,-4, 0,-3, 0,-2, 0,-1, 0, 0 },//FIRSTCLIFF11
|
||||
{ 4, -2,-2, -2,-1, -1, 0, 0, 0 },//FIRSTCLIFF12
|
||||
{ 6, -5,-2, -4,-2, -3,-1, -2, 0, -1, 0, 0, 0 },//FIRSTCLIFF13
|
||||
{ 4, -2,-2, -1,-2, 0,-1, 0, 0 },//FIRSTCLIFF14
|
||||
{10, -6,-7, -5,-7, -6,-6, -4,-6, -3,-5, -2,-4, -1,-3, -1,-2, -1,-1, -1, 0 },//FIRSTCLIFF15
|
||||
{10, -7,-6, -7,-5, -6,-4, -5,-3, -4,-2, -3,-1, -2,-1, -1,-1, 0,-1, 0, 0 },//FIRSTCLIFF16
|
||||
{ 5, 0,-4, 0,-3, 0,-2, 0,-1, 0, 0 },//FIRSTCLIFF17
|
||||
};
|
||||
|
||||
UINT8 GetNumberOfCliffTiles(UINT16 fType, UINT16 usIndex)
|
||||
{
|
||||
if(fType == FIRSTCLIFF)
|
||||
return(CliffOffsetData[usIndex-FIRSTCLIFF1].ubNumberOfTiles);
|
||||
else if(fType == FIRSTCLIFFHANG)
|
||||
return(CliffOffsetData[usIndex-FIRSTCLIFFHANG1].ubNumberOfTiles);
|
||||
else
|
||||
return(0);
|
||||
}
|
||||
|
||||
INT16 CountCliffOffset(UINT16 fType, UINT16 usIndex, UINT8 ubLoop)
|
||||
{
|
||||
if(fType == FIRSTCLIFF)
|
||||
return(CliffOffsetData[usIndex-FIRSTCLIFF1].TileLocData[ubLoop].bTileOffsetX + CliffOffsetData[usIndex-FIRSTCLIFF1].TileLocData[ubLoop].bTileOffsetY * WORLD_COLS);
|
||||
else if(fType == FIRSTCLIFFHANG)
|
||||
return(CliffOffsetData[usIndex-FIRSTCLIFFHANG1].TileLocData[ubLoop].bTileOffsetX + CliffOffsetData[usIndex-FIRSTCLIFFHANG1].TileLocData[ubLoop].bTileOffsetY * WORLD_COLS);
|
||||
else
|
||||
return(0);
|
||||
}
|
||||
|
||||
enum CliffRaise
|
||||
{
|
||||
RAISE_NONE, //MAPELEMENT_RAISE_LAND_NONE
|
||||
RAISE_START,//MAPELEMENT_RAISE_LAND_START
|
||||
RAISE_END, //MAPELEMENT_RAISE_LAND_END
|
||||
RAISE_BOTH, //(MAPELEMENT_RAISE_LAND_START | MAPELEMENT_RAISE_LAND_END)
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
UINT8 ubNumberOfTiles;
|
||||
UINT8 ubTileRaise[256];
|
||||
}CLIFF_RAISE_DATA;
|
||||
|
||||
CLIFF_RAISE_DATA CliffRaiseData[FIRSTCLIFFSNUMBER+FIRSTCLIFFSHANGNUMBER]=
|
||||
{
|
||||
{11, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2 },//FIRSTCLIFF1
|
||||
{10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },//FIRSTCLIFF2
|
||||
{ 6, 1, 1, 1, 1, 1, 1 },//FIRSTCLIFF3
|
||||
{ 6, 1, 1, 1, 1, 1, 1 },//FIRSTCLIFF4
|
||||
{ 5, 1, 1, 1, 1, 1 },//FIRSTCLIFF5
|
||||
{ 7, 1, 1, 1, 1, 1, 1, 1 },//FIRSTCLIFF6
|
||||
{ 7, 1, 1, 1, 1, 1, 1, 1, 1 },//FIRSTCLIFF7
|
||||
{ 6, 1, 1, 1, 2/*1*/, 1, 2 },//FIRSTCLIFF8
|
||||
{ 7, 1, 1, 1, 1, 1, 1, 1 },//FIRSTCLIFF9
|
||||
{ 5, 2/*1*/, 1, 1, 1, 1 },//FIRSTCLIFF10
|
||||
{ 7, 2, 2, 2, 2, 2, 2, 2 },//FIRSTCLIFF11
|
||||
{ 4, 2, 2, 2, 2 },//FIRSTCLIFF12
|
||||
{ 6, 1, 1, 1, 1, 1, 1 },//FIRSTCLIFF13
|
||||
{ 4, 1, 1, 1, 1 },//FIRSTCLIFF14
|
||||
{10, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2 },//FIRSTCLIFF15
|
||||
{10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },//FIRSTCLIFF16
|
||||
{ 5, 1, 1, 1, 1, 1 },//FIRSTCLIFF17
|
||||
|
||||
{11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },//FIRSTCLIFFHANG1
|
||||
{10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },//FIRSTCLIFFHANG2
|
||||
{ 6, 2, 2, 2, 2, 2, 2 },//FIRSTCLIFFHANG3
|
||||
{ 6, 2, 2, 2, 2, 2, 2 },//FIRSTCLIFFHANG4
|
||||
{ 5, 2, 2, 2, 2, 2 },//FIRSTCLIFFHANG5
|
||||
{ 7, 2, 2, 2, 2, 2, 2, 2 },//FIRSTCLIFFHANG6
|
||||
{ 7, 0, 0, 0, 0, 2, 2, 2 },//FIRSTCLIFFHANG7
|
||||
{ 6, 2, 2, 2, 2, 2, 0 },//FIRSTCLIFFHANG8
|
||||
{ 7, 2, 2, 2, 2, 2, 2, 0 },//FIRSTCLIFFHANG9
|
||||
{ 5, 2, 2, 2, 2, 2 },//FIRSTCLIFFHANG10
|
||||
{ 7, 0, 0, 0, 0, 0, 0, 0 },//FIRSTCLIFFHANG11
|
||||
{ 4, 0, 0, 0, 0 },//FIRSTCLIFFHANG12
|
||||
{ 6, 0, 0, 0, 0, 0, 0 },//FIRSTCLIFFHANG13
|
||||
{ 4, 0, 0, 0, 0 },//FIRSTCLIFFHANG14
|
||||
{10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },//FIRSTCLIFFHANG15
|
||||
{10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },//FIRSTCLIFFHANG16
|
||||
{ 5, 2, 2, 2, 2, 2 },//FIRSTCLIFFHANG17
|
||||
};
|
||||
|
||||
UINT16 GetCliffRaiseData(UINT16 fType, UINT16 usIndex, UINT8 ubLoop)
|
||||
{
|
||||
UINT8 ubTileRaise;
|
||||
UINT16 uiFlags;
|
||||
|
||||
if(fType == FIRSTCLIFF)
|
||||
ubTileRaise = CliffRaiseData[usIndex-FIRSTCLIFF1].ubTileRaise[ubLoop];//return(CliffRaiseData[usIndex].ubTileRaise[ubLoop]);
|
||||
else if(fType == FIRSTCLIFFHANG)
|
||||
ubTileRaise = CliffRaiseData[FIRSTCLIFFSNUMBER+usIndex-FIRSTCLIFFHANG1].ubTileRaise[ubLoop];//return(CliffRaiseData[FIRSTCLIFFSNUMBER+usIndex].ubTileRaise[ubLoop]);
|
||||
else
|
||||
return(0);
|
||||
switch(ubTileRaise)
|
||||
{
|
||||
case RAISE_START:
|
||||
uiFlags = MAPELEMENT_RAISE_LAND_START;
|
||||
break;
|
||||
case RAISE_END:
|
||||
uiFlags = MAPELEMENT_RAISE_LAND_END;
|
||||
break;
|
||||
case RAISE_BOTH:
|
||||
uiFlags = MAPELEMENT_RAISE_LAND_START | MAPELEMENT_RAISE_LAND_END;
|
||||
break;
|
||||
default:
|
||||
uiFlags = 0;
|
||||
}
|
||||
return(uiFlags);
|
||||
}
|
||||
|
||||
void CreateCliffsDefinition(void)
|
||||
{
|
||||
INT32 i;
|
||||
UINT32 uiBytesRead, uiBytesWrite;
|
||||
HWFILE hFile;
|
||||
STR8 szFileName = "TILESETS\\0\\l_cliff.JSD";
|
||||
STRUCTURE_FILE_HEADER CliffHeader;
|
||||
AuxObjectData CliffData[FIRSTCLIFFSNUMBER];
|
||||
hFile = FileOpen(szFileName, FILE_ACCESS_READ, FALSE);
|
||||
Assert(hFile);
|
||||
FileRead(hFile, &CliffHeader, sizeof(STRUCTURE_FILE_HEADER), &uiBytesRead);
|
||||
FileRead(hFile, &CliffData, FIRSTCLIFFSNUMBER*sizeof(AuxObjectData), &uiBytesRead);
|
||||
FileClose(hFile);
|
||||
hFile = FileOpen(szFileName, FILE_ACCESS_WRITE, FALSE);
|
||||
Assert(hFile);
|
||||
for(i=0; i<FIRSTCLIFFSNUMBER; i++)
|
||||
{
|
||||
CliffData[i].ubNumberOfTiles = CliffOffsetData[i].ubNumberOfTiles;
|
||||
if(i == 0)
|
||||
CliffData[i].usTileLocIndex = 0;
|
||||
else
|
||||
CliffData[i].usTileLocIndex = CliffData[i-1].ubNumberOfTiles + CliffData[i-1].usTileLocIndex;
|
||||
}
|
||||
CliffHeader.usNumberOfImageTileLocsStored = CliffData[i-1].ubNumberOfTiles + CliffData[i-1].usTileLocIndex;
|
||||
FileWrite(hFile, &CliffHeader, sizeof(STRUCTURE_FILE_HEADER), &uiBytesWrite);
|
||||
FileWrite(hFile, &CliffData, FIRSTCLIFFSNUMBER*sizeof(AuxObjectData), &uiBytesWrite);
|
||||
for(int i=0; i<FIRSTCLIFFSNUMBER; i++)
|
||||
FileWrite(hFile, CliffOffsetData[i].TileLocData, CliffOffsetData[i].ubNumberOfTiles*sizeof(RelTileLoc), &uiBytesWrite);
|
||||
FileClose(hFile);
|
||||
}
|
||||
|
||||
void RaiseWorldLand(void)
|
||||
{
|
||||
//dnl ch56 141009
|
||||
INT32 cnt, sTempGridNo, iNumberOfRaises;
|
||||
LEVELNODE *pStruct;
|
||||
TILE_ELEMENT *pTileElement;
|
||||
UINT16 usIndex;
|
||||
UINT16 fType;
|
||||
UINT8 ubLoop;
|
||||
|
||||
for(cnt=0; cnt<WORLD_MAX; cnt++)
|
||||
{
|
||||
L02: //remove any FIRSTCLIFFHANG if on same tile already exist FIRSTCLIFF
|
||||
pStruct = gpWorldLevelData[cnt].pStructHead;
|
||||
fType = FIRSTTEXTURE;
|
||||
usIndex = FIRSTTEXTURE1;
|
||||
while(pStruct)
|
||||
{
|
||||
pTileElement = &gTileDatabase[pStruct->usIndex];
|
||||
if(pTileElement->fType == FIRSTCLIFF)
|
||||
fType = pTileElement->fType;
|
||||
else
|
||||
if(pTileElement->fType == FIRSTCLIFFHANG)
|
||||
usIndex = pStruct->usIndex;
|
||||
pStruct = pStruct->pNext;
|
||||
}
|
||||
if(fType != FIRSTTEXTURE && usIndex != FIRSTTEXTURE1)
|
||||
{
|
||||
RemoveStruct(cnt, usIndex);
|
||||
goto L02;
|
||||
}
|
||||
gpWorldLevelData[cnt].uiFlags &= (~MAPELEMENT_RAISE_LAND_START);
|
||||
gpWorldLevelData[cnt].uiFlags &= (~MAPELEMENT_RAISE_LAND_END);
|
||||
// Get Structure levelnode
|
||||
pStruct = gpWorldLevelData[cnt].pStructHead;
|
||||
gpWorldLevelData[cnt].sHeight=0;
|
||||
while(pStruct)
|
||||
{
|
||||
// Skip cached tiles
|
||||
if(pStruct->usIndex >= NUMBEROFTILES)
|
||||
{
|
||||
pStruct = pStruct->pNext;
|
||||
continue;
|
||||
}
|
||||
/*
|
||||
// Old way which requires new "TILESETS\\0\\l_cliff.JSD" created with CreateCliffsDefinition()
|
||||
pTileElement = &gTileDatabase[pStruct->usIndex];
|
||||
fType = pTileElement->fType;
|
||||
if(pTileElement->fType == FIRSTCLIFFHANG)// for use in middle cliff construction
|
||||
{
|
||||
pTileElement = &gTileDatabase[pStruct->usIndex+(FIRSTCLIFF17-FIRSTCLIFF1+1)];// to get FIRSTCLIFF data, because there are no definition for FIRSTCLIFFHANG data (each FIRSTCLIFF has proper FIRSTCLIFFHANG and FIRSTCLIFFSHADOW)
|
||||
goto L01;
|
||||
}
|
||||
if(pTileElement->fType == FIRSTCLIFF)
|
||||
{
|
||||
L01:
|
||||
usIndex = pStruct->usIndex;
|
||||
// DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("Cliff found at count=%d",cnt));
|
||||
if(pTileElement->ubNumberOfTiles > 1)
|
||||
{
|
||||
// DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("Cliff has %d children", pTileElement->ubNumberOfTiles));
|
||||
for(ubLoop=0; ubLoop<pTileElement->ubNumberOfTiles; ubLoop++)
|
||||
{
|
||||
sTempGridNo = cnt + pTileElement->pTileLocData[ubLoop].bTileOffsetX + pTileElement->pTileLocData[ubLoop].bTileOffsetY * WORLD_COLS;
|
||||
// Check for valid gridno
|
||||
if(OutOfBounds(cnt, sTempGridNo))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
gpWorldLevelData[sTempGridNo].uiFlags |= GetCliffRaiseData(fType, usIndex, ubLoop);
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
if(pStruct->usIndex >= FIRSTCLIFFHANG1 && pStruct->usIndex <= FIRSTCLIFF17)
|
||||
{
|
||||
usIndex = pStruct->usIndex;
|
||||
fType = FIRSTCLIFFHANG;
|
||||
if(pStruct->usIndex >= FIRSTCLIFF1)
|
||||
fType = FIRSTCLIFF;
|
||||
for(ubLoop=0; ubLoop<GetNumberOfCliffTiles(fType, usIndex); ubLoop++)
|
||||
{
|
||||
sTempGridNo = cnt + CountCliffOffset(fType, usIndex, ubLoop);
|
||||
if(OutOfBounds(cnt, sTempGridNo))// Check for valid gridno
|
||||
continue;
|
||||
gpWorldLevelData[sTempGridNo].uiFlags |= GetCliffRaiseData(fType, usIndex, ubLoop);
|
||||
}
|
||||
}
|
||||
pStruct = pStruct->pNext;
|
||||
}
|
||||
}
|
||||
//HighGroundDebug();
|
||||
|
||||
// Edge conditions for eastern region of map
|
||||
// Visible y have values from 4 to 79, so correction +0 for SE corner, and +4 for NE corner, visible x goes from 82 to 157
|
||||
for(int y=(WORLD_ROWS/2-1 +0); y>=0 +4; y--)
|
||||
{
|
||||
// -2 correction because there are maps where cliffs are not place exactly on maps edges, but maybe this condition is not quite precise
|
||||
for(int x=y+ WORLD_COLS/2 -2; x<WORLD_COLS; x++)
|
||||
{
|
||||
if((gpWorldLevelData[x+y*WORLD_COLS].uiFlags & MAPELEMENT_RAISE_LAND_START) || (gpWorldLevelData[x+y*WORLD_COLS].uiFlags & MAPELEMENT_RAISE_LAND_END))
|
||||
{
|
||||
// If on (x-1, y-1) exist rised element then skip this one becasue he will rise map
|
||||
if((gpWorldLevelData[x-1+(y-1)*WORLD_COLS].uiFlags & MAPELEMENT_RAISE_LAND_START) || (gpWorldLevelData[x-1+(y-1)*WORLD_COLS].uiFlags & MAPELEMENT_RAISE_LAND_END))
|
||||
break;
|
||||
for(int yy=0; yy<y; yy++)
|
||||
for(int xx=x; xx<WORLD_COLS; xx++)
|
||||
gpWorldLevelData[xx+yy*WORLD_COLS].uiFlags = gpWorldLevelData[xx+y*WORLD_COLS].uiFlags;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
//HighGroundDebug();
|
||||
|
||||
// Edge conditions for northern region of map
|
||||
// Visible x,y have values from 4 to 81, so correction +2 for NW corner, and +4 for NE corner
|
||||
for(int y=(WORLD_ROWS/2-1 +2); y>=0 +4; y--)
|
||||
{
|
||||
// x depends on current y, and extra +4 because visible area begins from 4, x>=0 because copy goes from visible map edge to the end of northern part of map
|
||||
for(int x=(WORLD_COLS/2-1 +2 -y) +4; x>=0; x--)
|
||||
{
|
||||
if((gpWorldLevelData[x+y*WORLD_COLS].uiFlags & MAPELEMENT_RAISE_LAND_START) || (gpWorldLevelData[x+y*WORLD_COLS].uiFlags & MAPELEMENT_RAISE_LAND_END))
|
||||
{
|
||||
// If on (x-1, y-1) exist rised element then skip this one becasue he will rise map
|
||||
if((gpWorldLevelData[x+1+(y-1)*WORLD_COLS].uiFlags & MAPELEMENT_RAISE_LAND_START) || (gpWorldLevelData[x+1+(y-1)*WORLD_COLS].uiFlags & MAPELEMENT_RAISE_LAND_END))
|
||||
break;
|
||||
// Find first appearance of MAPELEMENT_RAISE_LAND_END and from them goes copy entire unvisible row
|
||||
for(x; x>=0; x--)
|
||||
if((gpWorldLevelData[x+y*WORLD_COLS].uiFlags & MAPELEMENT_RAISE_LAND_END))
|
||||
break;
|
||||
for(int yy=0; yy<y; yy++)
|
||||
for(int xx=x; xx>=0; xx--)
|
||||
gpWorldLevelData[xx+yy*WORLD_COLS].uiFlags = gpWorldLevelData[xx+y*WORLD_COLS].uiFlags;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
//HighGroundDebug();
|
||||
|
||||
//RaiseLevelDebug(0);
|
||||
for(int y=0; y<WORLD_ROWS; y++)
|
||||
{
|
||||
iNumberOfRaises=0;
|
||||
for(int x=0; x<WORLD_COLS; x++)// Scaning from left to right
|
||||
{
|
||||
if((gpWorldLevelData[x+y*WORLD_COLS].uiFlags & MAPELEMENT_RAISE_LAND_END))
|
||||
{
|
||||
if(x>0 && !(gpWorldLevelData[(x-1)+y*WORLD_COLS].uiFlags & MAPELEMENT_RAISE_LAND_END))
|
||||
{
|
||||
if(iNumberOfRaises < 3)
|
||||
iNumberOfRaises++;
|
||||
}
|
||||
}
|
||||
if((gpWorldLevelData[x+y*WORLD_COLS].uiFlags & MAPELEMENT_RAISE_LAND_START))
|
||||
{
|
||||
//RaiseLevelDebug(1, (x+y*WORLD_COLS), iNumberOfRaises);
|
||||
gpWorldLevelData[x+y*WORLD_COLS].sHeight = iNumberOfRaises * WORLD_CLIFF_HEIGHT;
|
||||
if(x>0 && !(gpWorldLevelData[(x-1)+y*WORLD_COLS].uiFlags & MAPELEMENT_RAISE_LAND_START))
|
||||
{
|
||||
if(iNumberOfRaises)
|
||||
{
|
||||
iNumberOfRaises--;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(iNumberOfRaises)
|
||||
{
|
||||
//RaiseLevelDebug(1, (x+y*WORLD_COLS), iNumberOfRaises);
|
||||
gpWorldLevelData[x+y*WORLD_COLS].sHeight = iNumberOfRaises * WORLD_CLIFF_HEIGHT;
|
||||
}
|
||||
}
|
||||
for(int x=WORLD_COLS-1; x>=0; x--)
|
||||
{
|
||||
if((gpWorldLevelData[x+y*WORLD_COLS].uiFlags & MAPELEMENT_RAISE_LAND_START))
|
||||
{
|
||||
if(x<WORLD_ROWS-1 && !(gpWorldLevelData[(x+1)+y*WORLD_COLS].uiFlags & MAPELEMENT_RAISE_LAND_START))
|
||||
{
|
||||
if(iNumberOfRaises < 3)
|
||||
iNumberOfRaises++;
|
||||
}
|
||||
}
|
||||
if((gpWorldLevelData[x+y*WORLD_COLS].uiFlags & MAPELEMENT_RAISE_LAND_END))
|
||||
{
|
||||
//RaiseLevelDebug(1, (x+y*WORLD_COLS), iNumberOfRaises);
|
||||
gpWorldLevelData[x+y*WORLD_COLS].sHeight = iNumberOfRaises * WORLD_CLIFF_HEIGHT;
|
||||
if(x<WORLD_ROWS-1 && !(gpWorldLevelData[(x-1)+y*WORLD_COLS].uiFlags & MAPELEMENT_RAISE_LAND_END))
|
||||
{
|
||||
if(iNumberOfRaises)
|
||||
{
|
||||
iNumberOfRaises--;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(iNumberOfRaises)
|
||||
{
|
||||
//RaiseLevelDebug(1, (x+y*WORLD_COLS), iNumberOfRaises);
|
||||
gpWorldLevelData[x+y*WORLD_COLS].sHeight = iNumberOfRaises * WORLD_CLIFF_HEIGHT;
|
||||
}
|
||||
}
|
||||
}
|
||||
//HighGroundDebug();
|
||||
//RaiseLevelDebug(2);
|
||||
|
||||
fRaiseWorld = TRUE;
|
||||
}
|
||||
/*************** End of New Definition for Cliff tiles ***************/
|
||||
|
||||
// FUNCTION TO GIVE NEAREST GRIDNO OF A CLIFF
|
||||
#define LAND_DROP_1 FIRSTCLIFF1
|
||||
@@ -1139,10 +1514,10 @@ void PasteTextureFromRadiusEx( INT16 sGridNo, UINT16 usType, UINT8 ubRadius )
|
||||
#define LAND_DROP_3 FIRSTCLIFF12
|
||||
#define LAND_DROP_4 FIRSTCLIFF15
|
||||
#define LAND_DROP_5 FIRSTCLIFF8
|
||||
void RaiseWorldLand( )
|
||||
void RaiseWorldLandOld(void)//dnl ch3 230909
|
||||
{
|
||||
INT32 cnt;
|
||||
UINT32 sTempGridNo;
|
||||
INT32 sTempGridNo;
|
||||
LEVELNODE *pStruct;
|
||||
TILE_ELEMENT *pTileElement;
|
||||
BOOLEAN fRaise;
|
||||
@@ -1150,6 +1525,8 @@ void RaiseWorldLand( )
|
||||
BOOLEAN fSomethingRaised = FALSE;
|
||||
UINT8 ubLoop;
|
||||
UINT16 usIndex;
|
||||
BOOLEAN fStopRaise = FALSE;
|
||||
INT32 iCounterA = 0, iCounterB = 0;
|
||||
INT32 iStartNumberOfRaises = 0;
|
||||
INT32 iNumberOfRaises = 0;
|
||||
BOOLEAN fAboutToRaise = FALSE;
|
||||
@@ -1199,7 +1576,7 @@ void RaiseWorldLand( )
|
||||
|
||||
sTempGridNo = cnt + pTileElement->pTileLocData[ubLoop].bTileOffsetX + pTileElement->pTileLocData[ubLoop].bTileOffsetY * WORLD_COLS;
|
||||
// Check for valid gridno
|
||||
if ( OutOfBounds( (INT16)cnt, (INT16)sTempGridNo ) )
|
||||
if ( OutOfBounds( cnt, sTempGridNo ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -1398,7 +1775,7 @@ void RaiseWorldLand( )
|
||||
}
|
||||
|
||||
//*/
|
||||
|
||||
fRaiseWorld = TRUE;//dnl ch3 210909
|
||||
}
|
||||
|
||||
void EliminateObjectLayerRedundancy()
|
||||
@@ -1449,8 +1826,3 @@ void EliminateObjectLayerRedundancy()
|
||||
#endif //JA2EDITOR
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+29
-27
@@ -27,45 +27,47 @@ extern UINT16 CurrentStruct;
|
||||
extern UINT32 gDoBanks;
|
||||
extern UINT32 gDoCliffs;
|
||||
|
||||
void EraseMapTile( UINT32 iMapIndex );
|
||||
void QuickEraseMapTile( UINT32 iMapIndex );
|
||||
void DeleteStuffFromMapTile( UINT32 iMapIndex );
|
||||
void EraseMapTile( INT32 iMapIndex );
|
||||
void QuickEraseMapTile( INT32 iMapIndex );
|
||||
void DeleteStuffFromMapTile( INT32 iMapIndex );
|
||||
|
||||
void PasteDebris( UINT32 iMapIndex );
|
||||
void PasteDebris( INT32 iMapIndex );
|
||||
|
||||
void PasteStructure( UINT32 iMapIndex );
|
||||
void PasteStructure1( UINT32 iMapIndex );
|
||||
void PasteStructure2( UINT32 iMapIndex );
|
||||
void PasteStructureCommon( UINT32 iMapIndex );
|
||||
void PasteStructure( INT32 iMapIndex );
|
||||
void PasteStructure1( INT32 iMapIndex );
|
||||
void PasteStructure2( INT32 iMapIndex );
|
||||
void PasteStructureCommon( INT32 iMapIndex );
|
||||
|
||||
void PasteSingleWall( UINT32 iMapIndex );
|
||||
void PasteSingleDoor( UINT32 iMapIndex );
|
||||
void PasteSingleWindow( UINT32 iMapIndex );
|
||||
void PasteSingleRoof( UINT32 iMapIndex );
|
||||
void PasteSingleBrokenWall( UINT32 iMapIndex );
|
||||
void PasteSingleDecoration( UINT32 iMapIndex );
|
||||
void PasteSingleDecal( UINT32 iMapIndex );
|
||||
void PasteSingleFloor( UINT32 iMapIndex );
|
||||
void PasteSingleToilet( UINT32 iMapIndex );
|
||||
void PasteRoomNumber( UINT32 iMapIndex, UINT8 ubRoomNumber );
|
||||
void PasteSingleWall( INT32 iMapIndex );
|
||||
void PasteSingleDoor( INT32 iMapIndex );
|
||||
void PasteSingleWindow( INT32 iMapIndex );
|
||||
void PasteSingleRoof( INT32 iMapIndex );
|
||||
void PasteSingleBrokenWall( INT32 iMapIndex );
|
||||
void PasteSingleDecoration( INT32 iMapIndex );
|
||||
void PasteSingleDecal( INT32 iMapIndex );
|
||||
void PasteSingleFloor( INT32 iMapIndex );
|
||||
void PasteSingleToilet( INT32 iMapIndex );
|
||||
void PasteRoomNumber( INT32 iMapIndex, UINT8 ubRoomNumber );
|
||||
|
||||
void PasteSingleWallCommon( UINT32 iMapIndex );
|
||||
void PasteSingleWallCommon( INT32 iMapIndex );
|
||||
|
||||
UINT16 GetRandomIndexByRange( UINT16 usRangeStart, UINT16 usRangeEnd );
|
||||
UINT16 GetRandomTypeByRange( UINT16 usRangeStart, UINT16 usRangeEnd );
|
||||
|
||||
void PasteFloor( UINT32 iMapIndex, UINT16 usFloorIndex , BOOLEAN fReplace);
|
||||
void PasteFloor( INT32 iMapIndex, UINT16 usFloorIndex , BOOLEAN fReplace);
|
||||
|
||||
void PasteBanks( UINT32 iMapIndex, UINT16 usStructIndex, BOOLEAN fReplace );
|
||||
void PasteRoads( UINT32 iMapIndex );
|
||||
void PasteCliffs( UINT32 iMapIndex, UINT16 usStructIndex , BOOLEAN fReplace);
|
||||
void PasteBanks( INT32 iMapIndex, UINT16 usStructIndex, BOOLEAN fReplace );
|
||||
void PasteRoads( INT32 iMapIndex );
|
||||
void PasteCliffs( INT32 iMapIndex, UINT16 usStructIndex , BOOLEAN fReplace);
|
||||
|
||||
void PasteTexture( UINT32 iMapIndex );
|
||||
void PasteTextureCommon( UINT32 iMapIndex );
|
||||
void PasteTexture( INT32 iMapIndex );
|
||||
void PasteTextureCommon( INT32 iMapIndex );
|
||||
|
||||
void PasteHigherTexture( UINT32 iMapIndex, UINT32 fNewType );
|
||||
void PasteHigherTexture( INT32 iMapIndex, UINT32 fNewType );
|
||||
|
||||
void RaiseWorldLand();
|
||||
//dnl ch3 230909
|
||||
void RaiseWorldLand(void);
|
||||
void RaiseWorldLandOld(void);
|
||||
|
||||
void EliminateObjectLayerRedundancy();
|
||||
|
||||
|
||||
+763
-45
File diff suppressed because it is too large
Load Diff
@@ -73,6 +73,11 @@ extern BOOLEAN gfConfirmExitFirst;
|
||||
extern BOOLEAN gfConfirmExitPending;
|
||||
extern BOOLEAN gfIntendOnEnteringEditor;
|
||||
|
||||
extern BOOLEAN gfVanillaMode;//dnl ch33 160909
|
||||
extern BOOLEAN fRaiseWorld;//dnl ch3 210909
|
||||
extern BOOLEAN fShowHighGround;//dnl ch2 210909
|
||||
void ShowHighGround(INT32 iShowHighGroundCommand);//dnl ch2 210909
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
+26
-23
@@ -32,8 +32,10 @@ BOOLEAN CaveAtGridNo( INT32 iMapIndex )
|
||||
{
|
||||
STRUCTURE *pStruct;
|
||||
LEVELNODE* pLevel;
|
||||
if( iMapIndex < 0 || iMapIndex >= NOWHERE )
|
||||
return TRUE;
|
||||
|
||||
if( TileIsOutOfBounds(iMapIndex))
|
||||
return FALSE;
|
||||
|
||||
pStruct = gpWorldLevelData[ iMapIndex ].pStructureHead;
|
||||
while( pStruct )
|
||||
{
|
||||
@@ -263,8 +265,9 @@ void AddCave( INT32 iMapIndex, UINT16 usIndex )
|
||||
{
|
||||
LEVELNODE *pStruct;
|
||||
|
||||
if( iMapIndex < 0 || iMapIndex >= NOWHERE )
|
||||
if(TileIsOutOfBounds(iMapIndex))
|
||||
return;
|
||||
|
||||
//First toast any existing wall (caves)
|
||||
RemoveAllStructsOfTypeRange( iMapIndex, FIRSTWALL, LASTWALL );
|
||||
//Now, add this piece
|
||||
@@ -337,12 +340,12 @@ INT8 gbWallTileLUT[NUM_WALL_TYPES][7] =
|
||||
// existing respective type.
|
||||
void BuildSlantRoof( INT32 iLeft, INT32 iTop, INT32 iRight, INT32 iBottom, UINT16 usWallType, UINT16 usRoofType, BOOLEAN fVertical );
|
||||
|
||||
void BulldozeNature( UINT32 iMapIndex );
|
||||
void EraseRoof( UINT32 iMapIndex );
|
||||
void EraseFloor( UINT32 iMapIndex );
|
||||
void EraseBuilding( UINT32 iMapIndex );
|
||||
void EraseFloorOwnedBuildingPieces( UINT32 iMapIndex );
|
||||
void ConsiderEffectsOfNewWallPiece( UINT32 iMapIndex, UINT8 usWallOrientation );
|
||||
void BulldozeNature( INT32 iMapIndex );
|
||||
void EraseRoof( INT32 iMapIndex );
|
||||
void EraseFloor( INT32 iMapIndex );
|
||||
void EraseBuilding( INT32 iMapIndex );
|
||||
void EraseFloorOwnedBuildingPieces( INT32 iMapIndex );
|
||||
void ConsiderEffectsOfNewWallPiece( INT32 iMapIndex, UINT8 usWallOrientation );
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
//BEGIN IMPLEMENTATION OF PRIVATE FUNCTIONS
|
||||
@@ -437,7 +440,7 @@ UINT16 PickAWallPiece( UINT16 usWallPieceType )
|
||||
//NOTE: Passing NULL for usWallType will force it to calculate the closest existing wall type, and
|
||||
// use that for building this new wall. It is necessary for restructuring a building, but not for
|
||||
// adding on to an existing building, where the type is already known.
|
||||
void BuildWallPiece( UINT32 iMapIndex, UINT8 ubWallPiece, UINT16 usWallType )
|
||||
void BuildWallPiece( INT32 iMapIndex, UINT8 ubWallPiece, UINT16 usWallType )
|
||||
{
|
||||
INT16 sIndex;
|
||||
UINT16 usTileIndex;
|
||||
@@ -650,7 +653,7 @@ void RebuildRoofUsingFloorInfo( INT32 iMapIndex, UINT16 usRoofType )
|
||||
//wall orientions giving priority to the top and left walls before anything else.
|
||||
//NOTE: passing NULL for usRoofType will force the function to calculate the nearest roof type,
|
||||
// and use that for the new roof. This is needed when erasing parts of multiple buildings simultaneously.
|
||||
void RebuildRoof( UINT32 iMapIndex, UINT16 usRoofType )
|
||||
void RebuildRoof( INT32 iMapIndex, UINT16 usRoofType )
|
||||
{
|
||||
UINT16 usRoofIndex, usTileIndex;
|
||||
BOOLEAN fTop, fBottom, fLeft, fRight;
|
||||
@@ -687,7 +690,7 @@ void RebuildRoof( UINT32 iMapIndex, UINT16 usRoofType )
|
||||
}
|
||||
}
|
||||
|
||||
void BulldozeNature( UINT32 iMapIndex )
|
||||
void BulldozeNature( INT32 iMapIndex )
|
||||
{
|
||||
AddToUndoList( iMapIndex );
|
||||
RemoveAllStructsOfTypeRange( iMapIndex, FIRSTISTRUCT,LASTISTRUCT );
|
||||
@@ -699,7 +702,7 @@ void BulldozeNature( UINT32 iMapIndex )
|
||||
RemoveAllObjectsOfTypeRange( iMapIndex, ANOTHERDEBRIS, ANOTHERDEBRIS );
|
||||
}
|
||||
|
||||
void EraseRoof( UINT32 iMapIndex )
|
||||
void EraseRoof( INT32 iMapIndex )
|
||||
{
|
||||
AddToUndoList( iMapIndex );
|
||||
RemoveAllRoofsOfTypeRange( iMapIndex, FIRSTTEXTURE, LASTITEM );
|
||||
@@ -707,13 +710,13 @@ void EraseRoof( UINT32 iMapIndex )
|
||||
RemoveAllShadowsOfTypeRange( iMapIndex, FIRSTROOF, LASTSLANTROOF );
|
||||
}
|
||||
|
||||
void EraseFloor( UINT32 iMapIndex )
|
||||
void EraseFloor( INT32 iMapIndex )
|
||||
{
|
||||
AddToUndoList( iMapIndex );
|
||||
RemoveAllLandsOfTypeRange( iMapIndex, FIRSTFLOOR, LASTFLOOR );
|
||||
}
|
||||
|
||||
void EraseWalls( UINT32 iMapIndex )
|
||||
void EraseWalls( INT32 iMapIndex )
|
||||
{
|
||||
AddToUndoList( iMapIndex );
|
||||
RemoveAllStructsOfTypeRange( iMapIndex, FIRSTTEXTURE, LASTITEM );
|
||||
@@ -725,7 +728,7 @@ void EraseWalls( UINT32 iMapIndex )
|
||||
RemoveAllObjectsOfTypeRange( iMapIndex, ANOTHERDEBRIS, ANOTHERDEBRIS );
|
||||
}
|
||||
|
||||
void EraseBuilding( UINT32 iMapIndex )
|
||||
void EraseBuilding( INT32 iMapIndex )
|
||||
{
|
||||
EraseRoof( iMapIndex );
|
||||
EraseFloor( iMapIndex );
|
||||
@@ -736,7 +739,7 @@ void EraseBuilding( UINT32 iMapIndex )
|
||||
//Specialized function that will delete only the TOP_RIGHT oriented wall in the gridno to the left
|
||||
//and the TOP_LEFT oriented wall in the gridno up one as well as the other building information at this
|
||||
//gridno.
|
||||
void EraseFloorOwnedBuildingPieces( UINT32 iMapIndex )
|
||||
void EraseFloorOwnedBuildingPieces( INT32 iMapIndex )
|
||||
{
|
||||
LEVELNODE *pStruct = NULL;
|
||||
UINT32 uiTileType;
|
||||
@@ -803,7 +806,7 @@ void AddCave( INT32 iMapIndex, UINT16 usIndex );
|
||||
void RemoveCaveSectionFromWorld( SGPRect *pSelectRegion )
|
||||
{
|
||||
UINT32 top, left, right, bottom, x, y;
|
||||
UINT32 iMapIndex;
|
||||
INT32 iMapIndex;
|
||||
UINT16 usIndex;
|
||||
UINT8 ubPerimeterValue;
|
||||
top = pSelectRegion->iTop;
|
||||
@@ -839,7 +842,7 @@ void RemoveCaveSectionFromWorld( SGPRect *pSelectRegion )
|
||||
void AddCaveSectionToWorld( SGPRect *pSelectRegion )
|
||||
{
|
||||
INT32 top, left, right, bottom, x, y;
|
||||
UINT32 uiMapIndex;
|
||||
INT32 uiMapIndex;
|
||||
UINT16 usIndex;
|
||||
UINT8 ubPerimeterValue;
|
||||
top = pSelectRegion->iTop;
|
||||
@@ -850,7 +853,7 @@ void AddCaveSectionToWorld( SGPRect *pSelectRegion )
|
||||
for( y = top; y <= bottom; y++ ) for( x = left; x <= right; x++ )
|
||||
{
|
||||
uiMapIndex = y * WORLD_COLS + x;
|
||||
if( uiMapIndex < NOWHERE )
|
||||
if (!TileIsOutOfBounds(uiMapIndex))
|
||||
{
|
||||
usIndex = GetCaveTileIndexFromPerimeterValue( 0xff );
|
||||
AddToUndoList( uiMapIndex );
|
||||
@@ -861,7 +864,7 @@ void AddCaveSectionToWorld( SGPRect *pSelectRegion )
|
||||
for( y = top - 1; y <= bottom + 1; y++ ) for( x = left - 1; x <= right + 1; x++ )
|
||||
{
|
||||
uiMapIndex = y * WORLD_COLS + x;
|
||||
if( uiMapIndex < NOWHERE )
|
||||
if(!TileIsOutOfBounds(uiMapIndex))
|
||||
{
|
||||
if( CaveAtGridNo( uiMapIndex ) )
|
||||
{
|
||||
@@ -895,7 +898,7 @@ void AddCaveSectionToWorld( SGPRect *pSelectRegion )
|
||||
void RemoveBuildingSectionFromWorld( SGPRect *pSelectRegion )
|
||||
{
|
||||
UINT32 top, left, right, bottom, x, y;
|
||||
UINT32 iMapIndex;
|
||||
INT32 iMapIndex;
|
||||
UINT16 usTileIndex;
|
||||
UINT16 usFloorType;
|
||||
BOOLEAN fFloor;
|
||||
@@ -970,7 +973,7 @@ void RemoveBuildingSectionFromWorld( SGPRect *pSelectRegion )
|
||||
void AddBuildingSectionToWorld( SGPRect *pSelectRegion )
|
||||
{
|
||||
INT32 top, left, right, bottom, x, y;
|
||||
UINT32 iMapIndex;
|
||||
INT32 iMapIndex;
|
||||
UINT16 usFloorType, usWallType, usRoofType;
|
||||
UINT16 usTileIndex;
|
||||
BOOLEAN fNewBuilding;
|
||||
|
||||
+2
-2
@@ -10,8 +10,8 @@ void RemoveBuildingSectionFromWorld( SGPRect *pSelectRegion );
|
||||
void AddCaveSectionToWorld( SGPRect *pSelectRegion );
|
||||
void RemoveCaveSectionFromWorld( SGPRect *pSelectRegion );
|
||||
|
||||
void EraseBuilding( UINT32 iMapIndex );
|
||||
void RebuildRoof( UINT32 iMapIndex, UINT16 usRoofType );
|
||||
void EraseBuilding( INT32 iMapIndex );
|
||||
void RebuildRoof( INT32 iMapIndex, UINT16 usRoofType );
|
||||
void RebuildRoofUsingFloorInfo( INT32 iMapIndex, UINT16 usRoofType );
|
||||
|
||||
void AddCave( INT32 iMapIndex, UINT16 usIndex );
|
||||
|
||||
@@ -231,9 +231,7 @@ void InitPopupMenu( INT32 iButtonID, UINT8 ubPopupMenuID, UINT8 ubDirection )
|
||||
gPopup.usBottom = usY + usMenuHeight + 1;
|
||||
break;
|
||||
}
|
||||
MSYS_DefineRegion( &popupRegion, 0, 0, 640, 480, MSYS_PRIORITY_HIGHEST,
|
||||
CURSOR_NORMAL, MSYS_NO_CALLBACK, MSYS_NO_CALLBACK );
|
||||
|
||||
MSYS_DefineRegion(&popupRegion, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, MSYS_PRIORITY_HIGHEST, CURSOR_NORMAL, MSYS_NO_CALLBACK, MSYS_NO_CALLBACK);//dnl ch34 090909
|
||||
RenderPopupMenu();
|
||||
}
|
||||
|
||||
|
||||
@@ -1211,7 +1211,7 @@ INT32 GetRandomSelection( void )
|
||||
|
||||
if ( fDontUseRandom )
|
||||
{
|
||||
fDontUseRandom = FALSE;
|
||||
//fDontUseRandom = FALSE;//dnl ch8 210909 this was old way when random was almost always selected, new way is enable/disable through switching with key 'R'
|
||||
return( iCurBank );
|
||||
}
|
||||
|
||||
|
||||
+59
-59
@@ -96,13 +96,13 @@ INT16 gbSmoothWaterStruct[] =
|
||||
-1
|
||||
};
|
||||
|
||||
BOOLEAN HigherLevel( INT32 gridno, UINT8 NewLevel );
|
||||
BOOLEAN ContainsWater( INT32 gridno );
|
||||
BOOLEAN HigherLevel( INT32 GridNo, UINT8 NewLevel );
|
||||
BOOLEAN ContainsWater( INT32 GridNo );
|
||||
|
||||
void SmoothTerrain(int gridno, int origType, UINT16 *piNewTile, BOOLEAN fForceSmooth )
|
||||
void SmoothTerrain(INT32 GridNo, INT32 origType, UINT16 *piNewTile, BOOLEAN fForceSmooth )
|
||||
{
|
||||
int temp=0;
|
||||
int FullTile = FALSE;
|
||||
INT32 temp=0,type=0;
|
||||
INT32 FullTile = FALSE;
|
||||
UINT16 usOldIndex;
|
||||
UINT16 usTempIndex;
|
||||
UINT32 cnt;
|
||||
@@ -118,13 +118,13 @@ void SmoothTerrain(int gridno, int origType, UINT16 *piNewTile, BOOLEAN fForceSm
|
||||
// SmoothWaterTerrain rather than the proceeding method
|
||||
if( origType==REGWATERTEXTURE)
|
||||
{
|
||||
SmoothWaterTerrain( gridno, origType, piNewTile, TRUE);
|
||||
SmoothWaterTerrain( GridNo, origType, piNewTile, TRUE);
|
||||
return;
|
||||
}
|
||||
pSmoothStruct = gbSmoothStruct;
|
||||
|
||||
// Get land index value for given level and adjust according to type
|
||||
if ( TypeExistsInLandLayer( gridno, origType, &usTileIndex ) )
|
||||
if ( TypeExistsInLandLayer( GridNo, origType, &usTileIndex ) )
|
||||
{
|
||||
GetTypeSubIndexFromTileIndex( origType, usTileIndex, &usOldIndex );
|
||||
}
|
||||
@@ -147,9 +147,9 @@ void SmoothTerrain(int gridno, int origType, UINT16 *piNewTile, BOOLEAN fForceSm
|
||||
}
|
||||
|
||||
// is land height one tile above not the same type?
|
||||
if ( (gridno- WORLD_COLS ) >= 0 )
|
||||
if ( (GridNo - WORLD_COLS ) >= 0 )
|
||||
{
|
||||
if ( !TypeExistsInLandLayer( gridno - WORLD_COLS, origType, &usTempIndex ) )
|
||||
if ( !TypeExistsInLandLayer( GridNo - WORLD_COLS, origType, &usTempIndex ) )
|
||||
{
|
||||
// no it's not
|
||||
temp+=3;
|
||||
@@ -157,9 +157,9 @@ void SmoothTerrain(int gridno, int origType, UINT16 *piNewTile, BOOLEAN fForceSm
|
||||
}
|
||||
// is land height one tile to the right not the same type?
|
||||
// (make sure there IS a tile to the right, i.e. check for border)
|
||||
if ((gridno+1)% WORLD_COLS !=0)
|
||||
if ((GridNo+1)% WORLD_COLS !=0)
|
||||
{
|
||||
if ( !TypeExistsInLandLayer( gridno+1, origType, &usTempIndex ) )
|
||||
if ( !TypeExistsInLandLayer( GridNo+1, origType, &usTempIndex ) )
|
||||
{
|
||||
// no it's not
|
||||
temp+=5;
|
||||
@@ -167,9 +167,9 @@ void SmoothTerrain(int gridno, int origType, UINT16 *piNewTile, BOOLEAN fForceSm
|
||||
}
|
||||
|
||||
// is land height one tile down not the same type?
|
||||
if ( (gridno + WORLD_COLS ) < ( WORLD_COLS * WORLD_ROWS ) )
|
||||
if ( (GridNo + WORLD_COLS ) < ( WORLD_COLS * WORLD_ROWS ) )
|
||||
{
|
||||
if ( !TypeExistsInLandLayer( gridno + WORLD_COLS, origType, &usTempIndex ) )
|
||||
if ( !TypeExistsInLandLayer( GridNo + WORLD_COLS, origType, &usTempIndex ) )
|
||||
{
|
||||
// no it's not
|
||||
temp+=7;
|
||||
@@ -177,9 +177,9 @@ void SmoothTerrain(int gridno, int origType, UINT16 *piNewTile, BOOLEAN fForceSm
|
||||
}
|
||||
|
||||
// is land height one tile to left not the same type?
|
||||
if (gridno % WORLD_COLS!=0)
|
||||
if (GridNo % WORLD_COLS!=0)
|
||||
{
|
||||
if ( !TypeExistsInLandLayer( gridno-1, origType, &usTempIndex ) )
|
||||
if ( !TypeExistsInLandLayer( GridNo-1, origType, &usTempIndex ) )
|
||||
{
|
||||
// no it's not
|
||||
temp+=11;
|
||||
@@ -193,7 +193,7 @@ void SmoothTerrain(int gridno, int origType, UINT16 *piNewTile, BOOLEAN fForceSm
|
||||
cnt = 0;
|
||||
fFound = FALSE;
|
||||
|
||||
GetLandHeadType( gridno, &uiTopType );
|
||||
GetLandHeadType( GridNo, &uiTopType );
|
||||
|
||||
while( pSmoothStruct[ cnt ] != -1 )
|
||||
{
|
||||
@@ -245,7 +245,7 @@ void SmoothTerrain(int gridno, int origType, UINT16 *piNewTile, BOOLEAN fForceSm
|
||||
*piNewTile = usTileIndex;
|
||||
}
|
||||
|
||||
void SmoothExitGridRadius( INT16 sMapIndex, UINT8 ubRadius )
|
||||
void SmoothExitGridRadius( INT32 sMapIndex, UINT8 ubRadius )
|
||||
{
|
||||
LEVELNODE* pShadow;
|
||||
INT16 x, y;
|
||||
@@ -275,10 +275,10 @@ void SmoothExitGridRadius( INT16 sMapIndex, UINT8 ubRadius )
|
||||
}
|
||||
}
|
||||
|
||||
void SmoothExitGrid(int gridno, UINT16 *piNewTile, BOOLEAN fForceSmooth )
|
||||
void SmoothExitGrid(INT32 GridNo, UINT16 *piNewTile, BOOLEAN fForceSmooth )
|
||||
{
|
||||
int temp=0;
|
||||
int FullTile = FALSE;
|
||||
INT32 temp=0,type=0;
|
||||
INT32 FullTile = FALSE;
|
||||
UINT16 usOldIndex;
|
||||
UINT16 usTempIndex;
|
||||
UINT32 cnt;
|
||||
@@ -293,7 +293,7 @@ void SmoothExitGrid(int gridno, UINT16 *piNewTile, BOOLEAN fForceSmooth )
|
||||
pSmoothStruct = gbSmoothStruct;
|
||||
|
||||
// Get Object index value for given level and adjust according to type
|
||||
if ( TypeExistsInShadowLayer( gridno, EXITTEXTURE, &usTileIndex ) )
|
||||
if ( TypeExistsInShadowLayer( GridNo, EXITTEXTURE, &usTileIndex ) )
|
||||
{
|
||||
GetTypeSubIndexFromTileIndex( EXITTEXTURE, usTileIndex, &usOldIndex );
|
||||
}
|
||||
@@ -316,9 +316,9 @@ void SmoothExitGrid(int gridno, UINT16 *piNewTile, BOOLEAN fForceSmooth )
|
||||
}
|
||||
|
||||
// is Object height one tile above not the same type?
|
||||
if ( (gridno- WORLD_COLS ) >= 0 )
|
||||
if ( (GridNo - WORLD_COLS ) >= 0 )
|
||||
{
|
||||
if ( !TypeExistsInShadowLayer( gridno - WORLD_COLS, EXITTEXTURE, &usTempIndex ) )
|
||||
if ( !TypeExistsInShadowLayer( GridNo - WORLD_COLS, EXITTEXTURE, &usTempIndex ) )
|
||||
{
|
||||
// no it's not
|
||||
temp+=3;
|
||||
@@ -326,9 +326,9 @@ void SmoothExitGrid(int gridno, UINT16 *piNewTile, BOOLEAN fForceSmooth )
|
||||
}
|
||||
// is Object height one tile to the right not the same type?
|
||||
// (make sure there IS a tile to the right, i.e. check for border)
|
||||
if ((gridno+1)% WORLD_COLS !=0)
|
||||
if ((GridNo+1)% WORLD_COLS !=0)
|
||||
{
|
||||
if ( !TypeExistsInShadowLayer( gridno+1, EXITTEXTURE, &usTempIndex ) )
|
||||
if ( !TypeExistsInShadowLayer( GridNo+1, EXITTEXTURE, &usTempIndex ) )
|
||||
{
|
||||
// no it's not
|
||||
temp+=5;
|
||||
@@ -336,9 +336,9 @@ void SmoothExitGrid(int gridno, UINT16 *piNewTile, BOOLEAN fForceSmooth )
|
||||
}
|
||||
|
||||
// is Object height one tile down not the same type?
|
||||
if ( (gridno + WORLD_COLS ) < ( WORLD_COLS * WORLD_ROWS ) )
|
||||
if ( (GridNo + WORLD_COLS ) < ( WORLD_COLS * WORLD_ROWS ) )
|
||||
{
|
||||
if ( !TypeExistsInShadowLayer( gridno + WORLD_COLS, EXITTEXTURE, &usTempIndex ) )
|
||||
if ( !TypeExistsInShadowLayer( GridNo + WORLD_COLS, EXITTEXTURE, &usTempIndex ) )
|
||||
{
|
||||
// no it's not
|
||||
temp+=7;
|
||||
@@ -346,9 +346,9 @@ void SmoothExitGrid(int gridno, UINT16 *piNewTile, BOOLEAN fForceSmooth )
|
||||
}
|
||||
|
||||
// is Object height one tile to left not the same type?
|
||||
if (gridno % WORLD_COLS!=0)
|
||||
if (GridNo % WORLD_COLS!=0)
|
||||
{
|
||||
if ( !TypeExistsInShadowLayer( gridno-1, EXITTEXTURE, &usTempIndex ) )
|
||||
if ( !TypeExistsInShadowLayer( GridNo-1, EXITTEXTURE, &usTempIndex ) )
|
||||
{
|
||||
// no it's not
|
||||
temp+=11;
|
||||
@@ -414,7 +414,7 @@ void SmoothExitGrid(int gridno, UINT16 *piNewTile, BOOLEAN fForceSmooth )
|
||||
|
||||
void SmoothTerrainWorld( UINT32 uiCheckType )
|
||||
{
|
||||
int cnt;
|
||||
INT32 cnt;
|
||||
UINT16 usIndex;
|
||||
UINT16 NewTile;
|
||||
// Smooth out entire world surrounding tiles
|
||||
@@ -436,7 +436,7 @@ void SmoothTerrainWorld( UINT32 uiCheckType )
|
||||
|
||||
void SmoothAllTerrainWorld( void )
|
||||
{
|
||||
int cnt;
|
||||
INT32 cnt;
|
||||
UINT16 usIndex;
|
||||
UINT16 NewTile;
|
||||
UINT32 uiCheckType;
|
||||
@@ -459,7 +459,7 @@ void SmoothAllTerrainWorld( void )
|
||||
}
|
||||
}
|
||||
|
||||
void SmoothTerrainRadius( UINT32 iMapIndex, UINT32 uiCheckType, UINT8 ubRadius, BOOLEAN fForceSmooth )
|
||||
void SmoothTerrainRadius( INT32 iMapIndex, UINT32 uiCheckType, UINT8 ubRadius, BOOLEAN fForceSmooth )
|
||||
{
|
||||
INT16 sTop, sBottom;
|
||||
INT16 sLeft, sRight;
|
||||
@@ -501,7 +501,7 @@ void SmoothTerrainRadius( UINT32 iMapIndex, UINT32 uiCheckType, UINT8 ubRadius,
|
||||
}
|
||||
}
|
||||
|
||||
void SmoothAllTerrainTypeRadius( UINT32 iMapIndex, UINT8 ubRadius, BOOLEAN fForceSmooth )
|
||||
void SmoothAllTerrainTypeRadius( INT32 iMapIndex, UINT8 ubRadius, BOOLEAN fForceSmooth )
|
||||
{
|
||||
INT16 sTop, sBottom;
|
||||
INT16 sLeft, sRight;
|
||||
@@ -541,13 +541,13 @@ void SmoothAllTerrainTypeRadius( UINT32 iMapIndex, UINT8 ubRadius, BOOLEAN fForc
|
||||
}
|
||||
}
|
||||
|
||||
void SmoothWaterTerrain( int gridno, int origType, UINT16 *piNewTile, BOOLEAN fForceSmooth )
|
||||
void SmoothWaterTerrain( INT32 GridNo, INT32 origType, UINT16 *piNewTile, BOOLEAN fForceSmooth )
|
||||
{
|
||||
// This procedure will calculate the approriate smooth texture for a water texture
|
||||
// based on the surrounding water textures. This is done via masking bits within
|
||||
// a temp variable, then searching for the right texture and inserting it
|
||||
int temp=0;
|
||||
int FullTile = FALSE;
|
||||
INT32 temp=0,type=0;
|
||||
INT32 FullTile = FALSE;
|
||||
UINT16 usOldIndex;
|
||||
UINT16 usTempIndex;
|
||||
UINT32 cnt;
|
||||
@@ -561,7 +561,7 @@ void SmoothWaterTerrain( int gridno, int origType, UINT16 *piNewTile, BOOLEAN fF
|
||||
|
||||
pSmoothStruct = gbSmoothWaterStruct;
|
||||
// Get land index value for given level and adjust according to type
|
||||
if ( TypeExistsInLandLayer( gridno, origType, &usTileIndex ) )
|
||||
if ( TypeExistsInLandLayer( GridNo, origType, &usTileIndex ) )
|
||||
{
|
||||
GetTypeSubIndexFromTileIndex( origType, usTileIndex, &usOldIndex );
|
||||
}
|
||||
@@ -582,9 +582,9 @@ void SmoothWaterTerrain( int gridno, int origType, UINT16 *piNewTile, BOOLEAN fF
|
||||
}
|
||||
}
|
||||
// Mask approriate bits in temp for the lookup in the SmoothWaterStruct list
|
||||
if ( (gridno- WORLD_COLS ) >= 0 )
|
||||
if ( (GridNo - WORLD_COLS ) >= 0 )
|
||||
{
|
||||
if ( TypeRangeExistsInLandLayer( gridno - WORLD_COLS, origType, origType, &usTempIndex ) )
|
||||
if ( TypeRangeExistsInLandLayer( GridNo - WORLD_COLS, origType, origType, &usTempIndex ) )
|
||||
{
|
||||
// no it's not
|
||||
temp|=4;
|
||||
@@ -592,79 +592,79 @@ void SmoothWaterTerrain( int gridno, int origType, UINT16 *piNewTile, BOOLEAN fF
|
||||
}
|
||||
// is land height one tile to the right not the same type?
|
||||
// (make sure there IS a tile to the right, i.e. check for border)
|
||||
if ((gridno+1)% WORLD_COLS !=0)
|
||||
if ((GridNo+1)% WORLD_COLS !=0)
|
||||
{
|
||||
if ( TypeRangeExistsInLandLayer( gridno + 1, origType, origType, &usTempIndex ) )
|
||||
if ( TypeRangeExistsInLandLayer( GridNo + 1, origType, origType, &usTempIndex ) )
|
||||
{
|
||||
// no it's not
|
||||
temp|=64;
|
||||
}
|
||||
}
|
||||
// is land height one tile down not the same type?
|
||||
if ( (gridno + WORLD_COLS ) < ( WORLD_COLS * WORLD_ROWS ) )
|
||||
if ( (GridNo + WORLD_COLS ) < ( WORLD_COLS * WORLD_ROWS ) )
|
||||
{
|
||||
if ( TypeRangeExistsInLandLayer( gridno + WORLD_COLS, origType, origType, &usTempIndex ) )
|
||||
if ( TypeRangeExistsInLandLayer( GridNo + WORLD_COLS, origType, origType, &usTempIndex ) )
|
||||
{
|
||||
// no it's not
|
||||
temp|=256;
|
||||
}
|
||||
}
|
||||
// is land height one tile to left not the same type?
|
||||
if (gridno % WORLD_COLS!=0)
|
||||
if (GridNo % WORLD_COLS!=0)
|
||||
{
|
||||
if ( TypeRangeExistsInLandLayer( gridno - 1, origType, origType, &usTempIndex ) )
|
||||
if ( TypeRangeExistsInLandLayer( GridNo - 1, origType, origType, &usTempIndex ) )
|
||||
{
|
||||
// no it's not
|
||||
temp|=16;
|
||||
}
|
||||
}
|
||||
if ((gridno+1)% WORLD_COLS !=0)
|
||||
if ((GridNo+1)% WORLD_COLS !=0)
|
||||
{
|
||||
|
||||
if ( (gridno- WORLD_COLS ) >= 0 )
|
||||
if ( (GridNo - WORLD_COLS ) >= 0 )
|
||||
{
|
||||
if ( TypeRangeExistsInLandLayer( gridno - WORLD_COLS + 1, origType, origType, &usTempIndex ) )
|
||||
if ( TypeRangeExistsInLandLayer( GridNo - WORLD_COLS + 1, origType, origType, &usTempIndex ) )
|
||||
{
|
||||
// no it's not
|
||||
temp|=8;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (gridno % WORLD_COLS!=0)
|
||||
if (GridNo % WORLD_COLS!=0)
|
||||
{
|
||||
if ( (gridno- WORLD_COLS ) >= 0 )
|
||||
if ( (GridNo- WORLD_COLS ) >= 0 )
|
||||
{
|
||||
if ( TypeRangeExistsInLandLayer( gridno - WORLD_COLS - 1, origType, origType, &usTempIndex ) )
|
||||
if ( TypeRangeExistsInLandLayer( GridNo - WORLD_COLS - 1, origType, origType, &usTempIndex ) )
|
||||
{
|
||||
// no it's not
|
||||
temp|=2;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((gridno+1)% WORLD_COLS !=0)
|
||||
if ((GridNo+1)% WORLD_COLS !=0)
|
||||
{
|
||||
if ( (gridno + WORLD_COLS ) < ( WORLD_COLS * WORLD_ROWS ) )
|
||||
if ( (GridNo + WORLD_COLS ) < ( WORLD_COLS * WORLD_ROWS ) )
|
||||
{
|
||||
if ( TypeRangeExistsInLandLayer( gridno + WORLD_COLS + 1, origType, origType, &usTempIndex ) )
|
||||
if ( TypeRangeExistsInLandLayer( GridNo + WORLD_COLS + 1, origType, origType, &usTempIndex ) )
|
||||
{
|
||||
// no it's not
|
||||
temp|=512;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (gridno % WORLD_COLS!=0)
|
||||
if (GridNo % WORLD_COLS!=0)
|
||||
{
|
||||
if ( (gridno + WORLD_COLS ) < ( WORLD_COLS * WORLD_ROWS ) )
|
||||
if ( (GridNo + WORLD_COLS ) < ( WORLD_COLS * WORLD_ROWS ) )
|
||||
{
|
||||
|
||||
if ( TypeRangeExistsInLandLayer( gridno + WORLD_COLS - 1, origType, origType, &usTempIndex ) )
|
||||
if ( TypeRangeExistsInLandLayer( GridNo + WORLD_COLS - 1, origType, origType, &usTempIndex ) )
|
||||
{
|
||||
// no it's not
|
||||
temp|=128;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( TypeRangeExistsInLandLayer( gridno, origType, origType, &usTempIndex ) )
|
||||
if ( TypeRangeExistsInLandLayer( GridNo, origType, origType, &usTempIndex ) )
|
||||
{
|
||||
// no it's not
|
||||
temp|=32;
|
||||
@@ -672,7 +672,7 @@ void SmoothWaterTerrain( int gridno, int origType, UINT16 *piNewTile, BOOLEAN fF
|
||||
// Loop through smooth struct
|
||||
cnt = 0;
|
||||
fFound = FALSE;
|
||||
GetLandHeadType( gridno, &uiTopType );
|
||||
GetLandHeadType( GridNo, &uiTopType );
|
||||
// Speed up of this while loop using double/quick search will result
|
||||
// in an incorrect solution due to multiple instances of bitvalues in the list of
|
||||
// smoothed water textures
|
||||
|
||||
+6
-6
@@ -14,15 +14,15 @@
|
||||
|
||||
|
||||
void SmoothAllTerrainWorld( void );
|
||||
void SmoothTerrain(int gridno, int origType, UINT16 *piNewTile, BOOLEAN fForceSmooth );
|
||||
void SmoothTerrain(INT32 GridNo, INT32 origType, UINT16 *piNewTile, BOOLEAN fForceSmooth );
|
||||
|
||||
void SmoothTerrainRadius( UINT32 iMapIndex, UINT32 uiCheckType, UINT8 ubRadius, BOOLEAN fForceSmooth );
|
||||
void SmoothTerrainRadius( INT32 iMapIndex, UINT32 uiCheckType, UINT8 ubRadius, BOOLEAN fForceSmooth );
|
||||
void SmoothTerrainWorld( UINT32 uiCheckType );
|
||||
void SmoothWaterTerrain( int gridno, int origType, UINT16 *piNewTile, BOOLEAN fForceSmooth );
|
||||
void SmoothAllTerrainTypeRadius( UINT32 iMapIndex, UINT8 ubRadius, BOOLEAN fForceSmooth );
|
||||
void SmoothWaterTerrain( INT32 GridNo, INT32 origType, UINT16 *piNewTile, BOOLEAN fForceSmooth );
|
||||
void SmoothAllTerrainTypeRadius( INT32 iMapIndex, UINT8 ubRadius, BOOLEAN fForceSmooth );
|
||||
|
||||
void SmoothExitGrid(int gridno, UINT16 *piNewTile, BOOLEAN fForceSmooth );
|
||||
void SmoothExitGridRadius( INT16 sMapIndex, UINT8 ubRadius );
|
||||
void SmoothExitGrid(INT32 GridNo, UINT16 *piNewTile, BOOLEAN fForceSmooth );
|
||||
void SmoothExitGridRadius( INT32 sMapIndex, UINT8 ubRadius );
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1469,6 +1469,7 @@ void DoneFadeOutForExitGameInitOptionScreen( void )
|
||||
gGameOptions.fTurnTimeLimit = TRUE;
|
||||
else
|
||||
gGameOptions.fTurnTimeLimit = FALSE;
|
||||
|
||||
|
||||
// JA2Gold: iron man
|
||||
gGameOptions.fIronManMode = GetCurrentGameSaveButtonSetting();
|
||||
|
||||
+25
-18
@@ -103,7 +103,7 @@ BOOLEAN IsNIVModeValid(bool checkRes)
|
||||
return( TRUE );
|
||||
#else
|
||||
// Check if the Profile with the NAME = "v1.13" is found in the specificed vfs_config.*.ini
|
||||
if(GetVFS()->GetProfileStack()->GetProfile(L"v1.13") != NULL)
|
||||
if(getVFS()->getProfileStack()->getProfile(L"v1.13") != NULL)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
@@ -369,19 +369,19 @@ BOOLEAN SaveGameSettings()
|
||||
fprintf_s (file_pointer , settings.str().c_str());
|
||||
fclose( file_pointer );
|
||||
#else
|
||||
vfs::UInt32 written;
|
||||
try
|
||||
{
|
||||
vfs::COpenWriteFile wfile(GAME_SETTINGS_FILE,true,true);
|
||||
wfile.file().Write(settings.str().c_str(), settings.str().length(),written);
|
||||
wfile.file().write(settings.str().c_str(), settings.str().length());
|
||||
}
|
||||
catch(CBasicException& ex)
|
||||
{
|
||||
vfs::CFile wfile(GAME_SETTINGS_FILE);
|
||||
if(wfile.OpenWrite(true,true))
|
||||
logException(ex);
|
||||
vfs::CFile file(GAME_SETTINGS_FILE);
|
||||
if(file.openWrite(true,true))
|
||||
{
|
||||
wfile.Write(settings.str().c_str(), settings.str().length(),written);
|
||||
wfile.Close();
|
||||
vfs::COpenWriteFile wfile( vfs::tWritableFile::cast(&file));
|
||||
TRYCATCH_RETHROW(file.write(settings.str().c_str(), settings.str().length()),L"");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -743,15 +743,14 @@ void LoadGameExternalOptions()
|
||||
gGameExternalOptions.fQuietRealTimeSneak = iniReader.ReadBoolean("JA2 Tactical Settings","QUIET_REAL_TIME_SNEAK", FALSE);
|
||||
|
||||
// CPT: Cover System Settings
|
||||
gGameExternalOptions.ubStealthTraitCoverValue = iniReader.ReadInteger("JA2 Tactical Settings", "STEALTH_TRAIT_COVER_VALUE", 15, 0, 100);
|
||||
gGameExternalOptions.ubStealthEffectiveness = iniReader.ReadInteger("JA2 Tactical Settings", "STEALTH_EFFECTIVENESS", 50, 0, 100);
|
||||
gGameExternalOptions.ubTreeCoverEffectiveness = iniReader.ReadInteger("JA2 Tactical Settings", "TREE_COVER_EFFECTIVENESS", 50, 0, 100);
|
||||
gGameExternalOptions.ubCamouflageEffectiveness = iniReader.ReadInteger("JA2 Tactical Settings", "CAMOUFLAGE_EFFECTIVENESS", 50, 0, 100);
|
||||
gGameExternalOptions.ubStealthTraitCoverValue = iniReader.ReadInteger("JA2 Tactical Settings","STEALTH_TRAIT_COVER_VALUE", 15, 0, 100);
|
||||
gGameExternalOptions.ubStealthEffectiveness = iniReader.ReadInteger("JA2 Tactical Settings", "STEALTH_EFFECTIVENESS", 50, 0, 100);
|
||||
gGameExternalOptions.ubTreeCoverEffectiveness = iniReader.ReadInteger("JA2 Tactical Settings","TREE_COVER_EFFECTIVENESS", 50, 0, 100);
|
||||
gGameExternalOptions.ubCamouflageEffectiveness = iniReader.ReadInteger("JA2 Tactical Settings", "CAMOUFLAGE_EFFECTIVENESS", 50, 0, 100);
|
||||
gGameExternalOptions.ubStanceEffectiveness = iniReader.ReadInteger("JA2 Tactical Settings", "STANCE_EFFECTIVENESS", 10, 0, 100);
|
||||
gGameExternalOptions.ubLBEEffectiveness = iniReader.ReadInteger("JA2 Tactical Settings", "LBE_EFFECTIVENESS", 50, 0, 100);
|
||||
gGameExternalOptions.ubMovementEffectiveness = iniReader.ReadInteger("JA2 Tactical Settings", "MOVEMENT_EFFECTIVENESS", 50, 0, 100);
|
||||
gGameExternalOptions.ubCoverDisplayUpdateWait = iniReader.ReadInteger("JA2 Tactical Settings", "COVER_DISPLAY_UPDATE_WAIT", 500, -1, 10000);
|
||||
|
||||
gGameExternalOptions.ubCoverDisplayUpdateWait = iniReader.ReadInteger("JA2 Tactical Settings", "COVER_DISPLAY_UPDATE_WAIT", 500, -1, 10000);
|
||||
|
||||
//################# Rain Settings ##################
|
||||
|
||||
@@ -1127,7 +1126,7 @@ void LoadGameExternalOptions()
|
||||
gGameExternalOptions.usMaxShooterCoweringPenalty = iniReader.ReadInteger("JA2 HAM Settings","MAX_SHOOTER_COWERING_PENALTY", 0, 0, 250 );
|
||||
gGameExternalOptions.usMaxTargetCoweringPenalty = iniReader.ReadInteger("JA2 HAM Settings","MAX_TARGET_COWERING_PENALTY", 0, 0, 250 );
|
||||
|
||||
// HEADROCK HAM B2.8: At "1", Militia will drop their equipment similar to enemies, IF killed by non-player character. At "2" they drop whenever killed.
|
||||
// HEADROCK HAM B2.8: If this is turned on, Militia will drop their equipment similar to enemies, IF killed by non-player character.
|
||||
gGameExternalOptions.ubMilitiaDropEquipment = iniReader.ReadInteger("JA2 HAM Settings","MILITIA_DROP_EQUIPMENT", 0, 0, 2 );
|
||||
|
||||
// HEADROCK HAM B2.8: New Trainer Relations: 2 = Trainees will go to sleep when their trainer goes to sleep. 3 = Trainer will go to sleep if all trainees are asleep. 1 = Both. 0 = Neither.
|
||||
@@ -1316,6 +1315,14 @@ void LoadGameExternalOptions()
|
||||
|
||||
// HEADROCK HAM 3.6: If activated, the game does not switch focus to a merc who spots an enemy in real-time mode. This fixes issues with Real-Time Sneak.
|
||||
gGameExternalOptions.fNoAutoFocusChangeInRealtimeSneak = iniReader.ReadBoolean("JA2 HAM Settings","NO_AUTO_FOCUS_CHANGE_IN_REALTIME_SNEAK", FALSE);
|
||||
|
||||
// WANNE: This is just a debug setting. Only in debug version we should check if propert is set in the ja2_options.ini,
|
||||
// In Release version this should always be set to FALSE
|
||||
//dnl ch51 081009 JA2 Debug Settings
|
||||
#ifdef _DEBUG
|
||||
gGameExternalOptions.fEnableInventoryPoolQ = iniReader.ReadBoolean("JA2 Debug Settings", "ENABLE_INVENTORY_POOL_Q", FALSE);
|
||||
#endif
|
||||
gGameExternalOptions.fEnableInventoryPoolQ = FALSE;
|
||||
}
|
||||
|
||||
INT16 DynamicAdjustAPConstants(INT16 iniReadValue, INT16 iniDefaultValue, BOOLEAN reverse)
|
||||
@@ -1844,10 +1851,10 @@ void DisplayGameSettings( )
|
||||
if (!is_networked)
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, gzLateLocalizedString[58], CurrentPlayerProgressPercentage(), HighestPlayerProgressPercentage() );
|
||||
|
||||
#ifdef _DEBUG
|
||||
// WDS - Add debug output here
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, gzLateLocalizedString[58], CurrentPlayerProgressPercentage(), HighestPlayerProgressPercentage() );
|
||||
#endif
|
||||
//#ifdef _DEBUG
|
||||
// // WDS - Add debug output here
|
||||
// ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, gzLateLocalizedString[58], CurrentPlayerProgressPercentage(), HighestPlayerProgressPercentage() );
|
||||
//#endif
|
||||
|
||||
////if( CHEATER_CHEAT_LEVEL() )
|
||||
//{
|
||||
|
||||
+6
-2
@@ -54,9 +54,9 @@ enum
|
||||
TOPTION_SILENT_SKYRIDER,
|
||||
TOPTION_LOW_CPU_USAGE,
|
||||
TOPTION_ENHANCED_DESC_BOX,
|
||||
|
||||
|
||||
// arynn
|
||||
TOPTION_TOGGLE_TURN_MODE,
|
||||
TOPTION_TOGGLE_TURN_MODE,
|
||||
|
||||
// HEADROCK HAM 3.6:
|
||||
TOPTION_STAT_PROGRESS_BARS,
|
||||
@@ -85,6 +85,7 @@ enum
|
||||
TOPTION_HIDE_BULLETS,
|
||||
TOPTION_TRACKING_MODE,
|
||||
|
||||
|
||||
NUM_ALL_GAME_OPTIONS,
|
||||
};
|
||||
|
||||
@@ -807,6 +808,9 @@ BOOLEAN gbBulletTracer;
|
||||
// Suport disabling/silencing real time sneaking via external .ini file
|
||||
BOOLEAN fAllowRealTimeSneak;
|
||||
BOOLEAN fQuietRealTimeSneak;
|
||||
|
||||
//dnl ch51 081009 JA2 Debug Settings
|
||||
BOOLEAN fEnableInventoryPoolQ;
|
||||
} GAME_EXTERNAL_OPTIONS;
|
||||
|
||||
//This structure will contain general Ja2 settings NOT individual game settings.
|
||||
|
||||
+4
-4
@@ -13,12 +13,12 @@
|
||||
#ifdef JA2EDITOR
|
||||
|
||||
//MAP EDITOR BUILD VERSION
|
||||
CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.3329" };
|
||||
CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.3340" };
|
||||
|
||||
#elif defined JA2BETAVERSION
|
||||
|
||||
//BETA/TEST BUILD VERSION
|
||||
CHAR16 zVersionLabel[256] = { L"Debug v1.13.3329" };
|
||||
CHAR16 zVersionLabel[256] = { L"Debug v1.13.3340" };
|
||||
|
||||
#elif defined CRIPPLED_VERSION
|
||||
|
||||
@@ -28,11 +28,11 @@ CHAR16 zVersionLabel[256] = { L"Beta v. 0.98" };
|
||||
#else
|
||||
|
||||
//RELEASE BUILD VERSION
|
||||
CHAR16 zVersionLabel[256] = { L"Release v1.13.3329" };
|
||||
CHAR16 zVersionLabel[256] = { L"Release v1.13.3340" };
|
||||
|
||||
#endif
|
||||
|
||||
CHAR8 czVersionNumber[16] = { "Build 10.02.21" }; //YY.MM.DD
|
||||
CHAR8 czVersionNumber[16] = { "Build 10.02.28" }; //YY.MM.DD
|
||||
CHAR16 zTrackingNumber[16] = { L"Z" };
|
||||
|
||||
|
||||
|
||||
+3
-5
@@ -20,15 +20,13 @@ extern CHAR16 zTrackingNumber[16];
|
||||
//
|
||||
// Keeps track of the saved game version. Increment the saved game version whenever
|
||||
// you will invalidate the saved game file
|
||||
#define SAVE_GAME_VERSION 106 //104 //103 //102 //101 //100 // 99
|
||||
#define SAVE_GAME_VERSION 107 //106 //105 //104 //103 //102 //101 //100 // 99
|
||||
|
||||
|
||||
//these I don't so much need here
|
||||
#define CURRENT_SAVEGAME_DATATYPE_VERSION 106
|
||||
#define CURRENT_SAVEGAME_DATATYPE_VERSION 107
|
||||
#define BIG_MAPS_PROJECT_SAVEGAME_DATATYPE_CHANGE 107 // Before this, we did not had big maps project
|
||||
#define AIRPORT_SAVEGAME_DATATYPE_CHANGE 106 // Before this, we did not have airport externalized
|
||||
#define AP100_SAVEGAME_DATATYPE_CHANGE 105 // Before this, we didn't have the 100AP structure changes
|
||||
#define NIV_SAVEGAME_DATATYPE_CHANGE 102 // Before this, we used the old structure system
|
||||
//#define SECOND_SAVEGAME_DATATYPE_CHANGE 999, #define CURRENT_SAVEGAME_DATATYPE_VERSION 999
|
||||
|
||||
|
||||
//#define RUSSIANGOLD
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
#include "Multilingual Text Code Generator.h"
|
||||
#include "editscreen.h"
|
||||
#endif
|
||||
#include "MPXmlTeams.hpp"
|
||||
|
||||
#include "Sector Summary.h"
|
||||
extern INT16 APBPConstants[TOTAL_APBP_VALUES] = {0};
|
||||
@@ -575,6 +576,11 @@ BOOLEAN LoadExternalGameplayData(STR directoryName)
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
THROWIFFALSE(ReadInUniforms(fileName), UNIFORMCOLORSFILENAME);
|
||||
|
||||
strcpy(fileName, directoryName);
|
||||
strcat(fileName, MULTIPLAYERTEAMSFILENAME);
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
mpTeams.ReadInMPTeams(fileName);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -603,9 +609,9 @@ UINT32 InitializeJA2(void)
|
||||
// Init JA2 sounds
|
||||
InitJA2Sound( );
|
||||
|
||||
gsRenderCenterX = 805;
|
||||
gsRenderCenterY = 805;
|
||||
|
||||
//dnl ch54 111009
|
||||
//gsRenderCenterX = 805;
|
||||
//gsRenderCenterY = 805;
|
||||
|
||||
// Init data
|
||||
InitializeSystemVideoObjects( );
|
||||
@@ -702,12 +708,15 @@ UINT32 InitializeJA2(void)
|
||||
#endif
|
||||
|
||||
#ifdef JA2BETAVERSION
|
||||
#ifdef JA2EDITOR
|
||||
// CHECK COMMANDLINE FOR SPECIAL UTILITY
|
||||
if ( strcmp( gzCommandLine, "-DOMAPS" ) == 0 )
|
||||
{
|
||||
GenerateAllMapsInit();//dnl ch49 061009
|
||||
return( MAPUTILITY_SCREEN );
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef JA2BETAVERSION
|
||||
//This allows the QuickSave Slots to be autoincremented, ie everytime the user saves, there will be a new quick save file
|
||||
|
||||
@@ -1,465 +0,0 @@
|
||||
# Microsoft Developer Studio Project File - Name="ja2" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
|
||||
CFG=ja2 - Win32 Demo Bounds Checker
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "JA2.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "JA2.mak" CFG="ja2 - Win32 Demo Bounds Checker"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "ja2 - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "ja2 - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "ja2 - Win32 Release with Debug Info" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "ja2 - Win32 Bounds Checker" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "ja2 - Win32 Debug Demo" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "ja2 - Win32 Release Demo" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "ja2 - Win32 Demo Release with Debug Info" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "ja2 - Win32 Demo Bounds Checker" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""$/Jagged Alliance 2/Development/Programming/Jagged Alliance 2/Build", AVAAAAAA"
|
||||
# PROP Scc_LocalPath "..\..\ja2\build"
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "ja2 - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir ".\Release"
|
||||
# PROP BASE Intermediate_Dir ".\Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
|
||||
# ADD CPP /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 /YX"JA2 All.h" /FD /O2b2 /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 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 /machine:I386 /out:"..\ja2_cvs.exe"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ja2 - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir ".\Debug"
|
||||
# PROP BASE Intermediate_Dir ".\Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
|
||||
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I ".\Standard Gaming Platform" /I ".\TileEngine" /I ".\Tactical" /I ".\Utils" /I ".\TacticalAI" /I ".\Editor" /I ".\Strategic" /I ".\laptop" /I ".\\" /I "..\\" /D "CALLBACKTIMER" /D "PRECOMPILEDHEADERS" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "_VTUNE_PROFILING" /D "XML_STATIC" /D "CINTERFACE" /FR /YX"JA2 All.h" /FD /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386
|
||||
# ADD LINK32 libexpatMT.lib mss32.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 /nologo /subsystem:windows /profile /map /debug /machine:I386 /nodefaultlib:"libcmt" /out:"..\ja2_cvs.exe" /libpath:".\..\..\Standard Gaming Platform\\"
|
||||
# SUBTRACT LINK32 /nodefaultlib
|
||||
|
||||
!ELSEIF "$(CFG)" == "ja2 - Win32 Release with Debug Info"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "ja2___Wi"
|
||||
# PROP BASE Intermediate_Dir "ja2___Wi"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release with Debug"
|
||||
# PROP Intermediate_Dir "Release with Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /G5 /MT /W3 /GX /Zi /O2 /I "\Standard Gaming Platform" /I ".\TileEngine" /I ".\Tactical" /I ".\Utils" /I ".\TacticalAI" /I ".\Communications" /I ".\Editor" /I ".\Strategic" /I ".\laptop" /D "NDEBUG" /D "CALLBACKTIMER" /D "JA2" /D "WIN32" /D "_WINDOWS" /FR /YX /FD /O2b2 /c
|
||||
# ADD CPP /nologo /G5 /MT /W4 /GX /Zi /O2 /I ".\Standard Gaming Platform" /I ".\TileEngine" /I ".\Tactical" /I ".\Utils" /I ".\TacticalAI" /I ".\Communications" /I ".\Editor" /I ".\Strategic" /I ".\laptop" /I ".\\" /D "NDEBUG" /D "RELEASE_WITH_DEBUG_INFO" /D "CALLBACKTIMER" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "PRECOMPILEDHEADERS" /D "_VTUNE_PROFILING" /D "XML_STATIC" /D "CINTERFACE" /FR /YX"JA2 All.h" /FD /O2b2 /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib winmm.lib /nologo /subsystem:windows /profile /map /debug /machine:I386 /out:"\ja2\ja2.exe"
|
||||
# ADD LINK32 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 /debug /machine:I386 /out:"..\ja2_cvs.exe"
|
||||
# SUBTRACT LINK32 /nodefaultlib
|
||||
|
||||
!ELSEIF "$(CFG)" == "ja2 - Win32 Bounds Checker"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "ja2___W1"
|
||||
# PROP BASE Intermediate_Dir "ja2___W1"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Bounds Checker"
|
||||
# PROP Intermediate_Dir "Bounds Checker"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "\Standard Gaming Platform" /I ".\TileEngine" /I ".\Tactical" /I ".\Utils" /I ".\TacticalAI" /I ".\Communications" /I ".\Editor" /I ".\Strategic" /I ".\Laptop" /D "_DEBUG" /D "JA2" /D "WIN32" /D "_WINDOWS" /D "CALLBACKTIMER" /FR /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "\Standard Gaming Platform" /I ".\TileEngine" /I ".\Tactical" /I ".\Utils" /I ".\TacticalAI" /I ".\Communications" /I ".\Editor" /I ".\Strategic" /I ".\Laptop" /D "_DEBUG" /D "BOUNDS_CHECKER" /D "CALLBACKTIMER" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "PRECOMPILEDHEADERS" /D "_VTUNE_PROFILING" /FR /YX"JA2 All.h" /FD /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib winmm.lib /nologo /subsystem:windows /profile /map /debug /machine:I386 /out:"\ja2\ja2.exe"
|
||||
# ADD LINK32 vtuneapi.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 /debug /machine:I386 /out:"\ja2\ja2.exe"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ja2 - Win32 Debug Demo"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "ja2___W0"
|
||||
# PROP BASE Intermediate_Dir "ja2___W0"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug Demo"
|
||||
# PROP Intermediate_Dir "Debug Demo"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "\Standard Gaming Platform" /I ".\TileEngine" /I ".\Tactical" /I ".\Utils" /I ".\TacticalAI" /I ".\Communications" /I ".\Editor" /I ".\Strategic" /I ".\Laptop" /D "_DEBUG" /D "JA2" /D "WIN32" /D "_WINDOWS" /D "CALLBACKTIMER" /FR /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "\Standard Gaming Platform" /I ".\TileEngine" /I ".\Tactical" /I ".\Utils" /I ".\TacticalAI" /I ".\Communications" /I ".\Editor" /I ".\Strategic" /I ".\Laptop" /D "_DEBUG" /D "JA2DEMO" /D "CALLBACKTIMER" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "PRECOMPILEDHEADERS" /FR /YX"JA2 All.h" /FD /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib winmm.lib /nologo /subsystem:windows /profile /map /debug /machine:I386 /out:"\ja2\ja2.exe"
|
||||
# ADD LINK32 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 /debug /machine:I386 /out:"d:\ja2demo\ja2.exe"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ja2 - Win32 Release Demo"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "ja2___W2"
|
||||
# PROP BASE Intermediate_Dir "ja2___W2"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release Demo"
|
||||
# PROP Intermediate_Dir "Release Demo"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /G5 /MT /W4 /GX /Zi /O2 /I "\Standard Gaming Platform" /I ".\TileEngine" /I ".\Tactical" /I ".\Utils" /I ".\TacticalAI" /I ".\Communications" /I ".\Editor" /I ".\Strategic" /I ".\laptop" /D "NDEBUG" /D "CALLBACKTIMER" /D "JA2" /D "WIN32" /D "_WINDOWS" /D "RELEASE_WITH_DEBUG_INFO" /FR /YX /FD /O2b2 /c
|
||||
# ADD CPP /nologo /G5 /MT /W4 /GX /Zi /O2 /I "\Standard Gaming Platform" /I ".\TileEngine" /I ".\Tactical" /I ".\Utils" /I ".\TacticalAI" /I ".\Communications" /I ".\Editor" /I ".\Strategic" /I ".\laptop" /D "RELEASE_WITH_DEBUG_INFO" /D "NDEBUG" /D "JA2DEMO" /D "CALLBACKTIMER" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "PRECOMPILEDHEADERS" /FR /YX"JA2 All.h" /FD /O2b2 /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib winmm.lib /nologo /subsystem:windows /profile /map /debug /machine:I386 /out:"\ja2\ja2.exe"
|
||||
# SUBTRACT BASE LINK32 /nodefaultlib
|
||||
# ADD LINK32 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 /debug /machine:I386 /out:"d:\ja2demo\ja2.exe"
|
||||
# SUBTRACT LINK32 /nodefaultlib
|
||||
|
||||
!ELSEIF "$(CFG)" == "ja2 - Win32 Demo Release with Debug Info"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "ja2___W3"
|
||||
# PROP BASE Intermediate_Dir "ja2___W3"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Demo Release with Debug"
|
||||
# PROP Intermediate_Dir "Demo Release with Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /G5 /MT /W4 /GX /Zi /O2 /I "\Standard Gaming Platform" /I ".\TileEngine" /I ".\Tactical" /I ".\Utils" /I ".\TacticalAI" /I ".\Communications" /I ".\Editor" /I ".\Strategic" /I ".\laptop" /D "NDEBUG" /D "CALLBACKTIMER" /D "JA2" /D "WIN32" /D "_WINDOWS" /D "RELEASE_WITH_DEBUG_INFO" /FR /YX /FD /O2b2 /c
|
||||
# ADD CPP /nologo /G5 /MT /W4 /GX /Zi /O2 /I ".\Standard Gaming Platform" /I ".\TileEngine" /I ".\Tactical" /I ".\Utils" /I ".\TacticalAI" /I ".\Communications" /I ".\Editor" /I ".\Strategic" /I ".\laptop" /I ".\\" /D "RELEASE_WITH_DEBUG_INFO" /D "NDEBUG" /D "JA2DEMO" /D "CALLBACKTIMER" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "PRECOMPILEDHEADERS" /D "XML_STATIC" /D "CINTERFACE" /FR /YX"JA2 All.h" /FD /O2b2 /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib winmm.lib /nologo /subsystem:windows /profile /map /debug /machine:I386 /out:"\ja2\ja2.exe"
|
||||
# SUBTRACT BASE LINK32 /nodefaultlib
|
||||
# ADD LINK32 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 /debug /machine:I386 /out:"d:\ja2demo\ja2.exe"
|
||||
# SUBTRACT LINK32 /nodefaultlib
|
||||
|
||||
!ELSEIF "$(CFG)" == "ja2 - Win32 Demo Bounds Checker"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "ja2___W4"
|
||||
# PROP BASE Intermediate_Dir "ja2___W4"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Demo Bounds Checker"
|
||||
# PROP Intermediate_Dir "Demo Bounds Checker"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "\Standard Gaming Platform" /I ".\TileEngine" /I ".\Tactical" /I ".\Utils" /I ".\TacticalAI" /I ".\Communications" /I ".\Editor" /I ".\Strategic" /I ".\Laptop" /D "CALLBACKTIMER" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "BOUNDS_CHECKER" /FR /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "\Standard Gaming Platform" /I ".\TileEngine" /I ".\Tactical" /I ".\Utils" /I ".\TacticalAI" /I ".\Communications" /I ".\Editor" /I ".\Strategic" /I ".\Laptop" /D "_DEBUG" /D "BOUNDS_CHECKER" /D "JA2DEMO" /D "CALLBACKTIMER" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "PRECOMPILEDHEADERS" /FR /YX"JA2 All.h" /FD /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib winmm.lib /nologo /subsystem:windows /profile /map /debug /machine:I386 /out:"\ja2\ja2.exe"
|
||||
# ADD LINK32 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 /debug /machine:I386 /out:"..\..\ja2.exe"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "ja2 - Win32 Release"
|
||||
# Name "ja2 - Win32 Debug"
|
||||
# Name "ja2 - Win32 Release with Debug Info"
|
||||
# Name "ja2 - Win32 Bounds Checker"
|
||||
# Name "ja2 - Win32 Debug Demo"
|
||||
# Name "ja2 - Win32 Release Demo"
|
||||
# Name "ja2 - Win32 Demo Release with Debug Info"
|
||||
# Name "ja2 - Win32 Demo Bounds Checker"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Utils\_Ja25GermanText.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\aniviewscreen.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Credits.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Utils\Cursors.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Fade Screen.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\GameInitOptionsScreen.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\gameloop.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\gamescreen.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\GameSettings.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\GameVersion.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\HelpScreen.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Init.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Intro.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\JA2 Splash.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Res\ja2.rc
|
||||
# ADD BASE RSC /l 0x409 /i "Res"
|
||||
# ADD RSC /l 0x409 /i "Res" /i ".\Res"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\jascreens.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Loading Screen.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\MainMenuScreen.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\MessageBoxScreen.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Options Screen.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\SaveLoadGame.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\SaveLoadScreen.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\SCREENS.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Sys Globals.cpp"
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\builddefines.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Credits.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\GameInitOptionsScreen.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\gameloop.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\GameSettings.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\JA2 All.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\JA2 Demo Ads.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\jascreens.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Language Defines.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Loading Screen.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\local.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\MessageBoxScreen.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Options Screen.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\SaveLoadGame.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\SaveLoadScreen.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\screenids.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\SCREENS.H
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Strategic\strategicmap.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Sys Globals.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\VtuneApi.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Res\jagged3.ico
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\fmodvc.lib
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
@@ -1,185 +0,0 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "Editor"=.\Editor\Editor.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
begin source code control
|
||||
"$/Jagged Alliance 2/Development/Programming/Jagged Alliance 2/Build", AVAAAAAA
|
||||
..\..\ja2\build
|
||||
end source code control
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "Laptop"=.\Laptop\Laptop.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
begin source code control
|
||||
"$/Jagged Alliance 2/Development/Programming/Jagged Alliance 2/Build", AVAAAAAA
|
||||
..\..\ja2\build
|
||||
end source code control
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "Standard Gaming Platform"=".\Standard Gaming Platform\Standard Gaming Platform.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
begin source code control
|
||||
"$/Jagged Alliance 2/Development/Programming/Jagged Alliance 2/Build", AVAAAAAA
|
||||
..\..\ja2\build
|
||||
end source code control
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "Strategic"=.\Strategic\Strategic.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
begin source code control
|
||||
"$/Jagged Alliance 2/Development/Programming/Jagged Alliance 2/Build", AVAAAAAA
|
||||
..\..\ja2\build
|
||||
end source code control
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "Tactical"=.\Tactical\Tactical.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
begin source code control
|
||||
"$/Jagged Alliance 2/Development/Programming/Jagged Alliance 2/Build", AVAAAAAA
|
||||
..\..\ja2\build
|
||||
end source code control
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "TacticalAI"=.\TacticalAI\TacticalAI.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
begin source code control
|
||||
"$/Jagged Alliance 2/Development/Programming/Jagged Alliance 2/Build", AVAAAAAA
|
||||
..\..\ja2\build
|
||||
end source code control
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "TileEngine"=.\TileEngine\TileEngine.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
begin source code control
|
||||
"$/Jagged Alliance 2/Development/Programming/Jagged Alliance 2/Build", AVAAAAAA
|
||||
..\..\ja2\build
|
||||
end source code control
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "Utils"=.\Utils\Utils.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
begin source code control
|
||||
"$/Jagged Alliance 2/Development/Programming/Jagged Alliance 2/Build", AVAAAAAA
|
||||
..\..\ja2\build
|
||||
end source code control
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "ja2"=.\JA2.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
begin source code control
|
||||
"$/Jagged Alliance 2/Development/Programming/Jagged Alliance 2/Build", AVAAAAAA
|
||||
..\..\ja2\build
|
||||
end source code control
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name TileEngine
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name Standard Gaming Platform
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name Tactical
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name Utils
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name TacticalAI
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name Editor
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name Laptop
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name Strategic
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
@@ -1,111 +0,0 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Editor", "Editor\Editor.vcproj", "{33CD085A-A03E-4D2C-970A-D69CD5466806}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Laptop", "Laptop\Laptop.vcproj", "{E0E16C88-C352-4C37-AC27-BFF3FDF18E82}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Standard Gaming Platform", "Standard Gaming Platform\Standard Gaming Platform.vcproj", "{1D052886-AE6B-437A-BE0C-D074CA940818}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Strategic", "Strategic\Strategic.vcproj", "{F10032C4-A6E5-44F7-A9BC-B76C46BA72D5}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tactical", "Tactical\Tactical.vcproj", "{2124B612-013E-492D-911C-B5737D60EEDF}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TacticalAI", "TacticalAI\TacticalAI.vcproj", "{D76119D7-B5EB-4F61-BFB9-F582B06F889B}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TileEngine", "TileEngine\TileEngine.vcproj", "{97E691B8-7A39-4E86-B69A-BD6BD5C31F32}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Utils", "Utils\Utils.vcproj", "{4D4A4AF3-63D1-4C4B-81B5-3EFB3BD574F2}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua", "lua\lua.vcproj", "{095CC13E-F2F8-4070-AC7A-70926A0ADF37}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ja2", "JA2.vcproj", "{32A550A8-FEBD-4F8D-8D62-6F97C63F83DA}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{286FCC0E-C6E1-4E29-8642-588D7358966F} = {286FCC0E-C6E1-4E29-8642-588D7358966F}
|
||||
{2124B612-013E-492D-911C-B5737D60EEDF} = {2124B612-013E-492D-911C-B5737D60EEDF}
|
||||
{095CC13E-F2F8-4070-AC7A-70926A0ADF37} = {095CC13E-F2F8-4070-AC7A-70926A0ADF37}
|
||||
{33CD085A-A03E-4D2C-970A-D69CD5466806} = {33CD085A-A03E-4D2C-970A-D69CD5466806}
|
||||
{1D052886-AE6B-437A-BE0C-D074CA940818} = {1D052886-AE6B-437A-BE0C-D074CA940818}
|
||||
{E0E16C88-C352-4C37-AC27-BFF3FDF18E82} = {E0E16C88-C352-4C37-AC27-BFF3FDF18E82}
|
||||
{97E691B8-7A39-4E86-B69A-BD6BD5C31F32} = {97E691B8-7A39-4E86-B69A-BD6BD5C31F32}
|
||||
{F10032C4-A6E5-44F7-A9BC-B76C46BA72D5} = {F10032C4-A6E5-44F7-A9BC-B76C46BA72D5}
|
||||
{D76119D7-B5EB-4F61-BFB9-F582B06F889B} = {D76119D7-B5EB-4F61-BFB9-F582B06F889B}
|
||||
{4D4A4AF3-63D1-4C4B-81B5-3EFB3BD574F2} = {4D4A4AF3-63D1-4C4B-81B5-3EFB3BD574F2}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Console", "Console\Console.vcproj", "{286FCC0E-C6E1-4E29-8642-588D7358966F}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfiguration) = preSolution
|
||||
Debug = Debug
|
||||
Release = Release
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfiguration) = postSolution
|
||||
{33CD085A-A03E-4D2C-970A-D69CD5466806}.Debug.ActiveCfg = Debug|Win32
|
||||
{33CD085A-A03E-4D2C-970A-D69CD5466806}.Debug.Build.0 = Debug|Win32
|
||||
{33CD085A-A03E-4D2C-970A-D69CD5466806}.Release.ActiveCfg = Release|Win32
|
||||
{33CD085A-A03E-4D2C-970A-D69CD5466806}.Release.Build.0 = Release|Win32
|
||||
{E0E16C88-C352-4C37-AC27-BFF3FDF18E82}.Debug.ActiveCfg = Debug|Win32
|
||||
{E0E16C88-C352-4C37-AC27-BFF3FDF18E82}.Debug.Build.0 = Debug|Win32
|
||||
{E0E16C88-C352-4C37-AC27-BFF3FDF18E82}.Release.ActiveCfg = Release|Win32
|
||||
{E0E16C88-C352-4C37-AC27-BFF3FDF18E82}.Release.Build.0 = Release|Win32
|
||||
{1D052886-AE6B-437A-BE0C-D074CA940818}.Debug.ActiveCfg = Debug|Win32
|
||||
{1D052886-AE6B-437A-BE0C-D074CA940818}.Debug.Build.0 = Debug|Win32
|
||||
{1D052886-AE6B-437A-BE0C-D074CA940818}.Release.ActiveCfg = Release|Win32
|
||||
{1D052886-AE6B-437A-BE0C-D074CA940818}.Release.Build.0 = Release|Win32
|
||||
{F10032C4-A6E5-44F7-A9BC-B76C46BA72D5}.Debug.ActiveCfg = Debug|Win32
|
||||
{F10032C4-A6E5-44F7-A9BC-B76C46BA72D5}.Debug.Build.0 = Debug|Win32
|
||||
{F10032C4-A6E5-44F7-A9BC-B76C46BA72D5}.Release.ActiveCfg = Release|Win32
|
||||
{F10032C4-A6E5-44F7-A9BC-B76C46BA72D5}.Release.Build.0 = Release|Win32
|
||||
{2124B612-013E-492D-911C-B5737D60EEDF}.Debug.ActiveCfg = Debug|Win32
|
||||
{2124B612-013E-492D-911C-B5737D60EEDF}.Debug.Build.0 = Debug|Win32
|
||||
{2124B612-013E-492D-911C-B5737D60EEDF}.Release.ActiveCfg = Release|Win32
|
||||
{2124B612-013E-492D-911C-B5737D60EEDF}.Release.Build.0 = Release|Win32
|
||||
{D76119D7-B5EB-4F61-BFB9-F582B06F889B}.Debug.ActiveCfg = Debug|Win32
|
||||
{D76119D7-B5EB-4F61-BFB9-F582B06F889B}.Debug.Build.0 = Debug|Win32
|
||||
{D76119D7-B5EB-4F61-BFB9-F582B06F889B}.Release.ActiveCfg = Release|Win32
|
||||
{D76119D7-B5EB-4F61-BFB9-F582B06F889B}.Release.Build.0 = Release|Win32
|
||||
{97E691B8-7A39-4E86-B69A-BD6BD5C31F32}.Debug.ActiveCfg = Debug|Win32
|
||||
{97E691B8-7A39-4E86-B69A-BD6BD5C31F32}.Debug.Build.0 = Debug|Win32
|
||||
{97E691B8-7A39-4E86-B69A-BD6BD5C31F32}.Release.ActiveCfg = Release|Win32
|
||||
{97E691B8-7A39-4E86-B69A-BD6BD5C31F32}.Release.Build.0 = Release|Win32
|
||||
{4D4A4AF3-63D1-4C4B-81B5-3EFB3BD574F2}.Debug.ActiveCfg = Debug|Win32
|
||||
{4D4A4AF3-63D1-4C4B-81B5-3EFB3BD574F2}.Debug.Build.0 = Debug|Win32
|
||||
{4D4A4AF3-63D1-4C4B-81B5-3EFB3BD574F2}.Release.ActiveCfg = Release|Win32
|
||||
{4D4A4AF3-63D1-4C4B-81B5-3EFB3BD574F2}.Release.Build.0 = Release|Win32
|
||||
{095CC13E-F2F8-4070-AC7A-70926A0ADF37}.Debug.ActiveCfg = Debug|Win32
|
||||
{095CC13E-F2F8-4070-AC7A-70926A0ADF37}.Debug.Build.0 = Debug|Win32
|
||||
{095CC13E-F2F8-4070-AC7A-70926A0ADF37}.Release.ActiveCfg = Release|Win32
|
||||
{095CC13E-F2F8-4070-AC7A-70926A0ADF37}.Release.Build.0 = Release|Win32
|
||||
{32A550A8-FEBD-4F8D-8D62-6F97C63F83DA}.Debug.ActiveCfg = Debug|Win32
|
||||
{32A550A8-FEBD-4F8D-8D62-6F97C63F83DA}.Debug.Build.0 = Debug|Win32
|
||||
{32A550A8-FEBD-4F8D-8D62-6F97C63F83DA}.Release.ActiveCfg = Release|Win32
|
||||
{32A550A8-FEBD-4F8D-8D62-6F97C63F83DA}.Release.Build.0 = Release|Win32
|
||||
{286FCC0E-C6E1-4E29-8642-588D7358966F}.Debug.ActiveCfg = Debug|Win32
|
||||
{286FCC0E-C6E1-4E29-8642-588D7358966F}.Debug.Build.0 = Debug|Win32
|
||||
{286FCC0E-C6E1-4E29-8642-588D7358966F}.Release.ActiveCfg = Release|Win32
|
||||
{286FCC0E-C6E1-4E29-8642-588D7358966F}.Release.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
-2456
File diff suppressed because it is too large
Load Diff
@@ -50,7 +50,7 @@
|
||||
#include "connect.h"
|
||||
#include "fresh_header.h"
|
||||
#include "Encrypted File.h"
|
||||
|
||||
#include "InterfaceItemImages.h"
|
||||
#include <sstream>
|
||||
|
||||
//
|
||||
@@ -1254,9 +1254,10 @@ BOOLEAN DisplayMercsInventory(UINT8 ubMercID)
|
||||
|
||||
pItem = &Item[ usItem ];
|
||||
GetVideoObject( &hVObject, GetInterfaceGraphicForItem( pItem ) );
|
||||
if(pItem->ubGraphicNum < hVObject->usNumberOfObjects)
|
||||
UINT16 usGraphicNum = g_bUsePngItemImages ? 0 : pItem->ubGraphicNum;
|
||||
if(usGraphicNum < hVObject->usNumberOfObjects)
|
||||
{
|
||||
pTrav = &(hVObject->pETRLEObject[ pItem->ubGraphicNum ] );
|
||||
pTrav = &(hVObject->pETRLEObject[ usGraphicNum ] );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1273,9 +1274,9 @@ BOOLEAN DisplayMercsInventory(UINT8 ubMercID)
|
||||
sCenY = PosY + ( abs( WEAPONBOX_SIZE_Y - usHeight ) / 2 ) - pTrav->sOffsetY;
|
||||
|
||||
//blt the shadow of the item
|
||||
if(gGameSettings.fOptions[ TOPTION_SHOW_ITEM_SHADOW ]) BltVideoObjectOutlineShadowFromIndex( FRAME_BUFFER, GetInterfaceGraphicForItem( pItem ), pItem->ubGraphicNum, sCenX-2, sCenY+2);
|
||||
if(gGameSettings.fOptions[ TOPTION_SHOW_ITEM_SHADOW ]) BltVideoObjectOutlineShadowFromIndex( FRAME_BUFFER, GetInterfaceGraphicForItem( pItem ), usGraphicNum, sCenX-2, sCenY+2);
|
||||
//blt the item
|
||||
BltVideoObjectOutlineFromIndex( FRAME_BUFFER, GetInterfaceGraphicForItem( pItem ), pItem->ubGraphicNum, sCenX, sCenY, 0, FALSE );
|
||||
BltVideoObjectOutlineFromIndex( FRAME_BUFFER, GetInterfaceGraphicForItem( pItem ), usGraphicNum, sCenX, sCenY, 0, FALSE );
|
||||
|
||||
|
||||
//if there are more then 1 piece of equipment in the current slot, display how many there are
|
||||
|
||||
+14
-1
@@ -1117,7 +1117,8 @@ INT32 AnyFreeBigEnoughPocket(MERCPROFILESTRUCT *pProfile, INVNODE *tInv)
|
||||
return(-1);
|
||||
}
|
||||
|
||||
|
||||
#include "VFS/vfs.h"
|
||||
#include "VFS/vfs_settings.h"
|
||||
void WriteOutCurrentImpCharacter( INT32 iProfileId )
|
||||
{
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("WriteOutCurrentImpCharacter: IMP.dat"));
|
||||
@@ -1131,6 +1132,7 @@ void WriteOutCurrentImpCharacter( INT32 iProfileId )
|
||||
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("WriteOutCurrentImpCharacter: Nickname.dat"));
|
||||
|
||||
#ifndef USE_VFS
|
||||
char zFileName[13];
|
||||
char temp;
|
||||
|
||||
@@ -1139,6 +1141,17 @@ void WriteOutCurrentImpCharacter( INT32 iProfileId )
|
||||
temp = (char) gMercProfiles[iProfileId].zNickname[i];
|
||||
zFileName[i] = temp;
|
||||
}
|
||||
#else
|
||||
char zFileName[32];
|
||||
if(vfs::Settings::getUseUnicode())
|
||||
{
|
||||
strncpy(zFileName, utf8string::as_utf8(gMercProfiles[iProfileId].zNickname,10).c_str(), 32);
|
||||
}
|
||||
else
|
||||
{
|
||||
utf8string::narrow(gMercProfiles[iProfileId].zNickname, 10, zFileName, 32);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Changed by ADB, rev 1513
|
||||
//strcat(zFileName,IMP_FILENAME_SUFFIX);
|
||||
|
||||
-9978
File diff suppressed because it is too large
Load Diff
@@ -1,697 +0,0 @@
|
||||
# Microsoft Developer Studio Project File - Name="Laptop" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||
|
||||
CFG=Laptop - Win32 Demo Bounds Checker
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Laptop.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Laptop.mak" CFG="Laptop - Win32 Demo Bounds Checker"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "Laptop - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "Laptop - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "Laptop - Win32 Release with Debug Info" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "Laptop - Win32 Bounds Checker" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "Laptop - Win32 Debug Demo" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "Laptop - Win32 Release Demo" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "Laptop - Win32 Demo Release with Debug Info" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "Laptop - Win32 Demo Bounds Checker" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""$/Jagged Alliance 2/Development/Programming/Jagged Alliance 2/Build", AVAAAAAA"
|
||||
# PROP Scc_LocalPath "..\..\..\ja2\build"
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "Laptop - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /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 /YX"Laptop All.h" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "Laptop - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Laptop__"
|
||||
# PROP BASE Intermediate_Dir "Laptop__"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "..\Standard Gaming Platform" /I "..\TileEngine" /I "..\\" /I "..\Tactical" /I "..\Utils" /I "..\tacticalai" /I "..\Editor" /I "..\strategic" /I ".\\" /D "PRECOMPILEDHEADERS" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "_VTUNE_PROFILING" /D "XML_STATIC" /D "CINTERFACE" /FR /YX"Laptop All.h" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "Laptop - Win32 Release with Debug Info"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Laptop_0"
|
||||
# PROP BASE Intermediate_Dir "Laptop_0"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release with Debug"
|
||||
# PROP Intermediate_Dir "Release with Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /I "\Standard Gaming Platform" /I "\ja2\Build" /I "\ja2\Build\TileEngine" /I "\ja2\Build\Utils" /I "\ja2\build\TacticalAI" /I "\ja2\build\Communications" /I "\ja2\build\Editor" /I "\ja2\build\Tactical" /I "\ja2\build\strategic" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "JA2" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W4 /GX /Zi /O2 /I "..\Standard Gaming Platform" /I "..\\" /I "..\TileEngine" /I "..\Utils" /I "..\TacticalAI" /I "..\Editor" /I "..\Tactical" /I "..\strategic" /I ".\\" /D "NDEBUG" /D "RELEASE_WITH_DEBUG_INFO" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "PRECOMPILEDHEADERS" /D "_VTUNE_PROFILING" /D "XML_STATIC" /D "CINTERFACE" /FR /YX"Laptop All.h" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "Laptop - Win32 Bounds Checker"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Laptop_2"
|
||||
# PROP BASE Intermediate_Dir "Laptop_2"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Bounds Checker"
|
||||
# PROP Intermediate_Dir "Bounds Checker"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /GX /Z7 /Od /I "\Standard Gaming Platform" /I "\ja2\Build" /I "\ja2\Build\TileEngine" /I "\ja2\Build\Utils" /I "\ja2\build\TacticalAI" /I "\ja2\build\Communications" /I "\ja2\build\Editor" /I "\ja2\build\Tactical" /I "\ja2\build\strategic" /D "_DEBUG" /D "JA2" /D "WIN32" /D "_WINDOWS" /FR /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "\Standard Gaming Platform" /I "\ja2\Build" /I "\ja2\Build\TileEngine" /I "\ja2\Build\Utils" /I "\ja2\build\TacticalAI" /I "\ja2\build\Communications" /I "\ja2\build\Editor" /I "\ja2\build\Tactical" /I "\ja2\build\strategic" /D "_DEBUG" /D "BOUNDS_CHECKER" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "PRECOMPILEDHEADERS" /D "_VTUNE_PROFILING" /FR /YX"Laptop All.h" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "Laptop - Win32 Debug Demo"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Laptop_1"
|
||||
# PROP BASE Intermediate_Dir "Laptop_1"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug Demo"
|
||||
# PROP Intermediate_Dir "Debug Demo"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /GX /Z7 /Od /I "\Standard Gaming Platform" /I "\ja2\Build" /I "\ja2\Build\TileEngine" /I "\ja2\Build\Utils" /I "\ja2\build\TacticalAI" /I "\ja2\build\Communications" /I "\ja2\build\Editor" /I "\ja2\build\Tactical" /I "\ja2\build\strategic" /D "_DEBUG" /D "JA2" /D "WIN32" /D "_WINDOWS" /FR /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "\Standard Gaming Platform" /I "\ja2\Build" /I "\ja2\Build\TileEngine" /I "\ja2\Build\Utils" /I "\ja2\build\TacticalAI" /I "\ja2\build\Communications" /I "\ja2\build\Editor" /I "\ja2\build\Tactical" /I "\ja2\build\strategic" /D "_DEBUG" /D "JA2DEMO" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "PRECOMPILEDHEADERS" /FR /YX"Laptop All.h" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "Laptop - Win32 Release Demo"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Laptop_3"
|
||||
# PROP BASE Intermediate_Dir "Laptop_3"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release Demo"
|
||||
# PROP Intermediate_Dir "Release Demo"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W4 /GX /Zi /O2 /I "\Standard Gaming Platform" /I "\ja2\Build" /I "\ja2\Build\TileEngine" /I "\ja2\Build\Utils" /I "\ja2\build\TacticalAI" /I "\ja2\build\Communications" /I "\ja2\build\Editor" /I "\ja2\build\Tactical" /I "\ja2\build\strategic" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "JA2" /D "RELEASE_WITH_DEBUG_INFO" /FR /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W4 /GX /Zi /O2 /I "\Standard Gaming Platform" /I "\ja2\Build" /I "\ja2\Build\TileEngine" /I "\ja2\Build\Utils" /I "\ja2\build\TacticalAI" /I "\ja2\build\Communications" /I "\ja2\build\Editor" /I "\ja2\build\Tactical" /I "\ja2\build\strategic" /D "RELEASE_WITH_DEBUG_INFO" /D "NDEBUG" /D "JA2DEMO" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "PRECOMPILEDHEADERS" /FR /YX"Laptop All.h" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "Laptop - Win32 Demo Release with Debug Info"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Laptop_4"
|
||||
# PROP BASE Intermediate_Dir "Laptop_4"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Demo Release with Debug"
|
||||
# PROP Intermediate_Dir "Demo Release with Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W4 /GX /Zi /O2 /I "\Standard Gaming Platform" /I "\ja2\Build" /I "\ja2\Build\TileEngine" /I "\ja2\Build\Utils" /I "\ja2\build\TacticalAI" /I "\ja2\build\Communications" /I "\ja2\build\Editor" /I "\ja2\build\Tactical" /I "\ja2\build\strategic" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "JA2" /D "RELEASE_WITH_DEBUG_INFO" /FR /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W4 /GX /Zi /O2 /I "..\Standard Gaming Platform" /I "..\\" /I "..\TileEngine" /I "..\Utils" /I "..\TacticalAI" /I "..\Editor" /I "..\Tactical" /I "..\strategic" /I ".\\" /D "RELEASE_WITH_DEBUG_INFO" /D "NDEBUG" /D "JA2DEMO" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "PRECOMPILEDHEADERS" /D "XML_STATIC" /D "CINTERFACE" /FR /YX"Laptop All.h" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "Laptop - Win32 Demo Bounds Checker"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Laptop_5"
|
||||
# PROP BASE Intermediate_Dir "Laptop_5"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Demo Bounds Checker"
|
||||
# PROP Intermediate_Dir "Demo Bounds Checker"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /GX /Z7 /Od /I "\Standard Gaming Platform" /I "\ja2\Build" /I "\ja2\Build\TileEngine" /I "\ja2\Build\Utils" /I "\ja2\build\TacticalAI" /I "\ja2\build\Communications" /I "\ja2\build\Editor" /I "\ja2\build\Tactical" /I "\ja2\build\strategic" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "BOUNDS_CHECKER" /FR /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "\Standard Gaming Platform" /I "\ja2\Build" /I "\ja2\Build\TileEngine" /I "\ja2\Build\Utils" /I "\ja2\build\TacticalAI" /I "\ja2\build\Communications" /I "\ja2\build\Editor" /I "\ja2\build\Tactical" /I "\ja2\build\strategic" /D "_DEBUG" /D "BOUNDS_CHECKER" /D "JA2DEMO" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "PRECOMPILEDHEADERS" /FR /YX"Laptop All.h" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "Laptop - Win32 Release"
|
||||
# Name "Laptop - Win32 Debug"
|
||||
# Name "Laptop - Win32 Release with Debug Info"
|
||||
# Name "Laptop - Win32 Bounds Checker"
|
||||
# Name "Laptop - Win32 Debug Demo"
|
||||
# Name "Laptop - Win32 Release Demo"
|
||||
# Name "Laptop - Win32 Demo Release with Debug Info"
|
||||
# Name "Laptop - Win32 Demo Bounds Checker"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\aim.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\AimArchives.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\AimFacialIndex.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\AimHistory.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\AimLinks.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\AimMembers.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\AimPolicies.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\AimSort.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BobbyR.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BobbyRAmmo.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BobbyRArmour.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BobbyRGuns.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BobbyRMailOrder.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BobbyRMisc.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BobbyRShipments.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BobbyRUsed.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BrokenLink.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\CharProfile.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\email.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\files.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\finances.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\florist Cards.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\florist Gallery.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\florist Order Form.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\florist.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\funeral.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\history.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP AboutUs.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Attribute Entrance.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Attribute Finish.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Attribute Selection.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Begin Screen.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Compile Character.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Confirm.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Finish.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP HomePage.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP MainPage.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Personality Entrance.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Personality Finish.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Personality Quiz.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Portraits.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Skill Trait.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Text System.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Voices.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\IMPVideoObjects.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\insurance Comments.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\insurance Contract.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\insurance Info.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\insurance.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\laptop.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\mercs Account.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\mercs Files.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\mercs No Account.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mercs.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\personnel.cpp
|
||||
|
||||
!IF "$(CFG)" == "Laptop - Win32 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "Laptop - Win32 Debug"
|
||||
|
||||
!ELSEIF "$(CFG)" == "Laptop - Win32 Release with Debug Info"
|
||||
|
||||
# ADD CPP /W4 /O2
|
||||
|
||||
!ELSEIF "$(CFG)" == "Laptop - Win32 Bounds Checker"
|
||||
|
||||
!ELSEIF "$(CFG)" == "Laptop - Win32 Debug Demo"
|
||||
|
||||
!ELSEIF "$(CFG)" == "Laptop - Win32 Release Demo"
|
||||
|
||||
# ADD BASE CPP /W4 /O2
|
||||
# ADD CPP /W4 /O2
|
||||
|
||||
!ELSEIF "$(CFG)" == "Laptop - Win32 Demo Release with Debug Info"
|
||||
|
||||
# ADD BASE CPP /W4 /O2
|
||||
# ADD CPP /W4 /O2
|
||||
|
||||
!ELSEIF "$(CFG)" == "Laptop - Win32 Demo Bounds Checker"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sirtech.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Store Inventory.cpp"
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\aim.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\AimMembers.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BobbyRAmmo.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BobbyRArmour.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BobbyRGuns.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BobbyRMailOrder.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BobbyRMisc.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BobbyRShipments.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BobbyRUsed.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BrokenLink.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\CharProfile.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\email.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\files.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\finances.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\florist Cards.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\florist Gallery.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\florist Order Form.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\florist.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\funeral.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\history.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP AboutUs.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Attribute Entrance.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Attribute Finish.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Attribute Selection.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Begin Screen.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Compile Character.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Confirm.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Finish.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP HomePage.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP MainPage.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Personality Entrance.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Personality Finish.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Personality Quiz.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Portraits.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Skill Trait.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Text System.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IMP Voices.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\IMPVideoObjects.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\insurance Comments.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\insurance Contract.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\insurance Info.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Insurance Text.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\insurance.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Laptop All.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\laptop.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\LaptopSave.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mercs.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\personnel.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sirtech.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Store Inventory.h"
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
-2540
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -267,6 +267,68 @@
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release_WithDebugInfo|Win32"
|
||||
OutputDirectory="$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="..\ja2_2005Express.vsprops"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/D "_CRT_SECURE_NO_DEPRECATE""
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\Multiplayer"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;"
|
||||
RuntimeLibrary="0"
|
||||
RuntimeTypeInfo="false"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
|
||||
@@ -268,6 +268,70 @@
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release_WithDebugInfo|Win32"
|
||||
OutputDirectory="..\lib\VS2008\$(ConfigurationName)"
|
||||
IntermediateDirectory="..\build\VS2008\$(ProjectName)_$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="..\ja2_VS2008.vsprops"
|
||||
CharacterSet="0"
|
||||
WholeProgramOptimization="0"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
EnableIntrinsicFunctions="true"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="false"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
|
||||
@@ -241,7 +241,7 @@ BOOLEAN CPostalService::DeliverShipment(UINT16 usShipmentID)
|
||||
static UINT8 ubShipmentsSinceNoBribes = 0;
|
||||
BOOLEAN fPablosStoleLastItem = FALSE;
|
||||
UINT32 uiStolenCount = 0;
|
||||
INT16 sMapPos;
|
||||
UINT32 sMapPos;
|
||||
BOOLEAN fPablosStoleSomething = FALSE;
|
||||
|
||||
if( usShipmentID > _UsedShipmentIDList.size() ||
|
||||
@@ -878,7 +878,7 @@ BOOLEAN CPostalService::SaveShipmentListToSaveGameFile(HWFILE hFile)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
UINT16 CPostalService::AddDestination(UINT32 uiIndex, UINT8 ubMapX, UINT8 ubMapY, UINT8 ubMapZ, INT16 sGridNo, STR16 pszName)
|
||||
UINT16 CPostalService::AddDestination(UINT32 uiIndex, UINT8 ubMapX, UINT8 ubMapY, UINT8 ubMapZ, UINT32 sGridNo, STR16 pszName)
|
||||
{
|
||||
UINT16 usNewID=1;
|
||||
// We need to find an ID first
|
||||
|
||||
@@ -35,8 +35,8 @@ typedef struct
|
||||
UINT32 uiIndex; // uiIndex is used as an ID number in external game data
|
||||
UINT8 ubMapY;
|
||||
UINT8 ubMapX;
|
||||
UINT8 ubMapZ;
|
||||
INT16 sGridNo;
|
||||
UINT8 ubMapZ;
|
||||
UINT32 sGridNo;
|
||||
wstring wstrName;
|
||||
} DestinationStruct;
|
||||
|
||||
@@ -218,11 +218,11 @@ public:
|
||||
|
||||
|
||||
// Destination management
|
||||
UINT16 AddDestination(UINT32 uiIndex, UINT8 ubMapX, UINT8 ubMapY, UINT8 ubMapZ, INT16 sGridNo, STR16 pszName );
|
||||
UINT16 AddDestination(UINT32 uiIndex, UINT8 ubMapX, UINT8 ubMapY, UINT8 ubMapZ, UINT32 sGridNo, STR16 pszName );
|
||||
UINT16 RemoveDestination(UINT16 usDestinationID);
|
||||
RefToDestinationStruct GetDestination(UINT16 usDestinationID) const;
|
||||
RefToDestinationList LookupDestinationList(void) const;
|
||||
|
||||
|
||||
// WANNE:
|
||||
BOOLEAN IsSectorAShipmentSector(UINT8 ubMapX, UINT8 ubMapY, UINT8 ubMapZ);
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ typedef struct
|
||||
UINT8 ubMapX;
|
||||
UINT8 ubMapZ;
|
||||
UINT32 uiIndex;
|
||||
INT16 sGridNo;
|
||||
UINT32 sGridNo;
|
||||
CHAR16 szName[MAX_DEST_NAME_LENGTH+1];
|
||||
} DestinationReadInStruct;
|
||||
|
||||
|
||||
+6
-1
@@ -84,6 +84,8 @@
|
||||
#include "Arms Dealer Init.h"
|
||||
#endif
|
||||
|
||||
#include "connect.h"
|
||||
|
||||
|
||||
//forward declarations of common classes to eliminate includes
|
||||
class OBJECTTYPE;
|
||||
@@ -996,7 +998,10 @@ INT32 EnterLaptop()
|
||||
|
||||
gfShowBookmarks=FALSE;
|
||||
LoadBookmark( );
|
||||
SetBookMark(AIM_BOOKMARK);
|
||||
|
||||
if (!is_networked)
|
||||
SetBookMark(AIM_BOOKMARK);
|
||||
|
||||
LoadLoadPending( );
|
||||
|
||||
DrawDeskTopBackground( );
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#endif
|
||||
|
||||
#include "Soldier Macros.h"
|
||||
#include "InterfaceItemImages.h"
|
||||
|
||||
// WDS - make number of mercenaries, etc. be configurable
|
||||
#define MAX_MERCS_ON_SCREEN 20
|
||||
@@ -2190,7 +2191,8 @@ void RenderInventoryForCharacter( INT32 iId, INT32 iSlot )
|
||||
pItem = &Item[ sIndex ];
|
||||
|
||||
GetVideoObject( &hHandle, GetInterfaceGraphicForItem( pItem ) );
|
||||
pTrav = &(hHandle->pETRLEObject[ pItem->ubGraphicNum ] );
|
||||
UINT16 usGraphicNum = g_bUsePngItemImages ? 0 : pItem->ubGraphicNum;
|
||||
pTrav = &(hHandle->pETRLEObject[ usGraphicNum ] );
|
||||
|
||||
usHeight = (UINT32)pTrav->usHeight;
|
||||
usWidth = (UINT32)pTrav->usWidth;
|
||||
@@ -2199,10 +2201,10 @@ void RenderInventoryForCharacter( INT32 iId, INT32 iSlot )
|
||||
sCenY = PosY + ( abs( 22 - usHeight ) / 2 ) - pTrav->sOffsetY;
|
||||
|
||||
// shadow
|
||||
if(gGameSettings.fOptions[ TOPTION_SHOW_ITEM_SHADOW ]) BltVideoObjectOutlineShadowFromIndex( FRAME_BUFFER, GetInterfaceGraphicForItem( pItem ), pItem->ubGraphicNum, sCenX-2, sCenY+2);
|
||||
if(gGameSettings.fOptions[ TOPTION_SHOW_ITEM_SHADOW ]) BltVideoObjectOutlineShadowFromIndex( FRAME_BUFFER, GetInterfaceGraphicForItem( pItem ), usGraphicNum, sCenX-2, sCenY+2);
|
||||
|
||||
//blt the item
|
||||
BltVideoObjectOutlineFromIndex( FRAME_BUFFER, GetInterfaceGraphicForItem( pItem ), pItem->ubGraphicNum, sCenX, sCenY, 0, FALSE );
|
||||
BltVideoObjectOutlineFromIndex( FRAME_BUFFER, GetInterfaceGraphicForItem( pItem ), usGraphicNum, sCenX, sCenY, 0, FALSE );
|
||||
|
||||
SetFont( FONT10ARIAL );
|
||||
SetFontForeground( FONT_WHITE );
|
||||
|
||||
@@ -244,6 +244,7 @@ BOOLEAN EnterMPCScreen()
|
||||
{
|
||||
FilenameForBPP("INTERFACE\\MPConnect_1024x768.sti",VObjectDesc.ImageFile);
|
||||
}
|
||||
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiMPCMainBackGroundImage ));
|
||||
|
||||
|
||||
|
||||
+61
-61
@@ -33,7 +33,7 @@
|
||||
#include "VFS/vfs.h"
|
||||
#include "VFS/vfs_init.h"
|
||||
#include "VFS/PropertyContainer.h"
|
||||
#include "VFS/iteratedir.h"
|
||||
#include "VFS/os_functions.h"
|
||||
#include "MPJoinScreen.h"
|
||||
#include "MainMenuScreen.h"
|
||||
#include "Init.h"
|
||||
@@ -407,70 +407,70 @@ void SaveMPSettings()
|
||||
WritePrivateProfileStringW( L"Ja2_mp Settings",L"DIFFICULT_LEVEL", tmpDiffStr, L"..\\Ja2_mp.ini" );
|
||||
#else
|
||||
CPropertyContainer props;
|
||||
props.InitFromIniFile("Ja2_mp.ini");
|
||||
props.initFromIniFile("Ja2_mp.ini");
|
||||
|
||||
props.SetStringProperty(L"Ja2_mp Settings",L"SERVER_NAME", gzServerNameField);
|
||||
props.SetStringProperty(L"Ja2_mp Settings",L"MAX_CLIENTS", gzMaxPlayersField);
|
||||
props.SetStringProperty(L"Ja2_mp Settings",L"MAX_MERCS", gzSquadSizeField);
|
||||
props.SetStringProperty(L"Ja2_mp Settings",L"STARTING_BALANCE", gzStartingBalanceField);
|
||||
props.SetStringProperty(L"Ja2_mp Settings",L"DAMAGE_MULTIPLIER", gzDmgMultiplierField);
|
||||
props.SetStringProperty(L"Ja2_mp Settings",L"TIMED_TURN_SECS_PER_TICK", gzTimerField);
|
||||
props.SetStringProperty(L"Ja2_mp Settings",L"FILE_TRANSFER_DIRECTORY", gzFileTransferDirectory);
|
||||
props.SetStringProperty(L"Ja2_mp Settings",L"KIT_BAG", gzKitBag);
|
||||
props.setStringProperty(L"Ja2_mp Settings",L"SERVER_NAME", gzServerNameField);
|
||||
props.setStringProperty(L"Ja2_mp Settings",L"MAX_CLIENTS", gzMaxPlayersField);
|
||||
props.setStringProperty(L"Ja2_mp Settings",L"MAX_MERCS", gzSquadSizeField);
|
||||
props.setStringProperty(L"Ja2_mp Settings",L"STARTING_BALANCE", gzStartingBalanceField);
|
||||
props.setStringProperty(L"Ja2_mp Settings",L"DAMAGE_MULTIPLIER", gzDmgMultiplierField);
|
||||
props.setStringProperty(L"Ja2_mp Settings",L"TIMED_TURN_SECS_PER_TICK", gzTimerField);
|
||||
props.setStringProperty(L"Ja2_mp Settings",L"FILE_TRANSFER_DIRECTORY", gzFileTransferDirectory);
|
||||
props.setStringProperty(L"Ja2_mp Settings",L"KIT_BAG", gzKitBag);
|
||||
|
||||
|
||||
guiMPHGameType = GetMPHGameTypeButtonSetting();
|
||||
CHAR16 tmpGTStr[2];
|
||||
_itow(guiMPHGameType,tmpGTStr,10);
|
||||
props.SetStringProperty(L"Ja2_mp Settings",L"GAME_MODE", tmpGTStr);
|
||||
props.setStringProperty(L"Ja2_mp Settings",L"GAME_MODE", tmpGTStr);
|
||||
|
||||
CHAR16 tmpTimeStr[6];
|
||||
swprintf(tmpTimeStr,L"%i.%i",giMPHTimeHours,giMPHTimeMins);
|
||||
props.SetStringProperty(L"Ja2_mp Settings",L"TIME", tmpTimeStr);
|
||||
props.setStringProperty(L"Ja2_mp Settings",L"TIME", tmpTimeStr);
|
||||
|
||||
CHAR16 tmpVal[2];
|
||||
|
||||
giMPHOverrideMaxAI = ( ButtonList[ guiMPHOverrideMaxAIToggle ]->uiFlags & BUTTON_CLICKED_ON ? 1 : 0 );
|
||||
_itow(giMPHOverrideMaxAI,tmpVal,10);
|
||||
props.SetStringProperty(L"Ja2_mp Settings",L"OVERRIDE_MAX_AI", tmpVal);
|
||||
props.setStringProperty(L"Ja2_mp Settings",L"OVERRIDE_MAX_AI", tmpVal);
|
||||
|
||||
giMPHRandomMercs = ( ButtonList[ guiMPHRandomMercsToggle ]->uiFlags & BUTTON_CLICKED_ON ? 1 : 0 );
|
||||
_itow(giMPHRandomMercs,tmpVal,10);
|
||||
props.SetStringProperty(L"Ja2_mp Settings",L"RANDOM_MERCS", tmpVal);
|
||||
props.setStringProperty(L"Ja2_mp Settings",L"RANDOM_MERCS", tmpVal);
|
||||
|
||||
giMPHSameMercs = ( ButtonList[ guiMPHSameMercToggle ]->uiFlags & BUTTON_CLICKED_ON ? 1 : 0 );
|
||||
_itow(giMPHSameMercs,tmpVal,10);
|
||||
props.SetStringProperty(L"Ja2_mp Settings",L"SAME_MERC", tmpVal);
|
||||
props.setStringProperty(L"Ja2_mp Settings",L"SAME_MERC", tmpVal);
|
||||
|
||||
giMPHBobbyRays = ( ButtonList[ guiMPHBobbyRayToggle ]->uiFlags & BUTTON_CLICKED_ON ? 0 : 1 ); // This setting is reversed
|
||||
_itow(giMPHBobbyRays,tmpVal,10);
|
||||
props.SetStringProperty(L"Ja2_mp Settings",L"DISABLE_BOBBY_RAYS", tmpVal);
|
||||
props.setStringProperty(L"Ja2_mp Settings",L"DISABLE_BOBBY_RAYS", tmpVal);
|
||||
|
||||
giMPHReportMercs = ( ButtonList[ guiMPHReportMercToggle ]->uiFlags & BUTTON_CLICKED_ON ? 1 : 0 );
|
||||
_itow(giMPHReportMercs,tmpVal,10);
|
||||
props.SetStringProperty(L"Ja2_mp Settings",L"REPORT_NAME", tmpVal);
|
||||
props.setStringProperty(L"Ja2_mp Settings",L"REPORT_NAME", tmpVal);
|
||||
|
||||
giMPHRandomSpawn = ( ButtonList[ guiMPHRandomSpawnToggle ]->uiFlags & BUTTON_CLICKED_ON ? 1 : 0 );
|
||||
_itow(giMPHRandomSpawn,tmpVal,10);
|
||||
props.SetStringProperty(L"Ja2_mp Settings",L"RANDOM_EDGES", tmpVal);
|
||||
props.setStringProperty(L"Ja2_mp Settings",L"RANDOM_EDGES", tmpVal);
|
||||
|
||||
giMPHEnableCivilians = ( ButtonList[ guiMPHCivsToggle ]->uiFlags & BUTTON_CLICKED_ON ? 1 : 0 );
|
||||
_itow(giMPHEnableCivilians,tmpVal,10);
|
||||
props.SetStringProperty(L"Ja2_mp Settings",L"CIV_ENABLED", tmpVal);
|
||||
props.setStringProperty(L"Ja2_mp Settings",L"CIV_ENABLED", tmpVal);
|
||||
|
||||
giMPHUseNIV = ( ButtonList[ guiMPHUseNIVToggle ]->uiFlags & BUTTON_CLICKED_ON ? 1 : 0 );
|
||||
_itow(giMPHUseNIV,tmpVal,10);
|
||||
props.SetStringProperty(L"Ja2_mp Settings",L"ALLOW_CUSTOM_NIV", tmpVal);
|
||||
props.setStringProperty(L"Ja2_mp Settings",L"ALLOW_CUSTOM_NIV", tmpVal);
|
||||
|
||||
giMPHSendFiles = ( ButtonList[ guiMPHSendFiles ]->uiFlags & BUTTON_CLICKED_ON ? 1 : 0 );
|
||||
_itow(giMPHSendFiles,tmpVal,10);
|
||||
props.SetStringProperty(L"Ja2_mp Settings",L"SYNC_CLIENTS_MP_DIR", tmpVal);
|
||||
props.setStringProperty(L"Ja2_mp Settings",L"SYNC_CLIENTS_MP_DIR", tmpVal);
|
||||
|
||||
guiMPHDifficultLevel = GetMPHCurrentDifficultyButtonSetting();
|
||||
CHAR16 tmpDiffStr[2];
|
||||
_itow(guiMPHDifficultLevel,tmpDiffStr,10);
|
||||
props.SetStringProperty(L"Ja2_mp Settings",L"DIFFICULT_LEVEL", tmpDiffStr);
|
||||
props.WriteToIniFile(L"Ja2_mp.ini",true); // This writes to the Profiles/UserProfile/ja2_mp.ini
|
||||
props.setStringProperty(L"Ja2_mp Settings",L"DIFFICULT_LEVEL", tmpDiffStr);
|
||||
props.writeToIniFile(L"Ja2_mp.ini",true); // This writes to the Profiles/UserProfile/ja2_mp.ini
|
||||
#endif
|
||||
|
||||
|
||||
@@ -499,7 +499,7 @@ bool ValidateMPSettings()
|
||||
// Verify the Squad Size
|
||||
Get16BitStringFromField( 2, gzSquadSizeField, 2 );
|
||||
UINT8 squadSize = _wtoi(gzSquadSizeField);
|
||||
if (squadSize < 1 || squadSize > 5)
|
||||
if (squadSize < 1 || squadSize > 6)
|
||||
{
|
||||
DoMPHMessageBox( MSG_BOX_BASIC_STYLE, gzMPHScreenText[MPH_SQUADSIZE_INVALID], MP_HOST_SCREEN, MSG_BOX_FLAG_OK, NULL );
|
||||
return false;
|
||||
@@ -602,7 +602,7 @@ bool ValidateMPSettings()
|
||||
|
||||
Get16BitStringFromField( 6, gzTimerField, 6 );
|
||||
UINT32 iTimer = _wtoi(gzTimerField);
|
||||
if (iTimer < 1 || iTimer > 200)
|
||||
if (iTimer < 0 || iTimer > 200)
|
||||
{
|
||||
DoMPHMessageBox( MSG_BOX_BASIC_STYLE, gzMPHScreenText[MPH_TIMER_INVALID], MP_HOST_SCREEN, MSG_BOX_FLAG_OK, NULL );
|
||||
return false;
|
||||
@@ -618,7 +618,7 @@ bool ValidateMPSettings()
|
||||
|
||||
#ifdef USE_VFS
|
||||
vfs::Path sUserDir(gzFileTransferDirectory);
|
||||
if(!os::CreateRealDirecory(sUserDir,true))
|
||||
if(!os::createRealDirectory(sUserDir,true))
|
||||
{
|
||||
DoMPHMessageBox( MSG_BOX_BASIC_STYLE, gzMPHScreenText[MPH_FILE_TRANSFER_DIR_NOT_EXIST], MP_HOST_SCREEN, MSG_BOX_FLAG_OK, NULL );
|
||||
return false;
|
||||
@@ -677,28 +677,28 @@ UINT32 MPHostScreenInit( void )
|
||||
#else
|
||||
// read settings from JA2_mp.ini
|
||||
CPropertyContainer props;
|
||||
props.InitFromIniFile("Ja2_mp.ini");
|
||||
props.GetStringProperty( L"Ja2_mp Settings", L"SERVER_NAME", gzServerNameField, 30, L"Server Name");
|
||||
props.GetStringProperty( L"Ja2_mp Settings", L"MAX_CLIENTS", gzMaxPlayersField, 4, L"4");
|
||||
props.GetStringProperty( L"Ja2_mp Settings", L"MAX_MERCS", gzSquadSizeField, 5, L"5");
|
||||
props.GetStringProperty( L"Ja2_mp Settings", L"STARTING_BALANCE", gzStartingBalanceField, 10, L"25000");
|
||||
props.GetStringProperty( L"Ja2_mp Settings", L"DAMAGE_MULTIPLIER", gzDmgMultiplierField, 5, L"0.7");
|
||||
props.GetStringProperty( L"Ja2_mp Settings", L"TIMED_TURN_SECS_PER_TICK", gzTimerField, 5, L"25");
|
||||
props.GetStringProperty( L"Ja2_mp Settings", L"FILE_TRANSFER_DIRECTORY", gzFileTransferDirectory, 100, L"MULTIPLAYER/Servers/My Server");
|
||||
props.GetStringProperty( L"Ja2_mp Settings", L"KIT_BAG", gzKitBag, 100, L"[201,214,243]");
|
||||
props.GetStringProperty(L"Ja2_mp Settings", L"TIME", &szTime[0], 6, L"13.50");
|
||||
props.initFromIniFile("Ja2_mp.ini");
|
||||
props.getStringProperty( L"Ja2_mp Settings", L"SERVER_NAME", gzServerNameField, 30, L"Server Name");
|
||||
props.getStringProperty( L"Ja2_mp Settings", L"MAX_CLIENTS", gzMaxPlayersField, 4, L"4");
|
||||
props.getStringProperty( L"Ja2_mp Settings", L"MAX_MERCS", gzSquadSizeField, 5, L"5");
|
||||
props.getStringProperty( L"Ja2_mp Settings", L"STARTING_BALANCE", gzStartingBalanceField, 10, L"25000");
|
||||
props.getStringProperty( L"Ja2_mp Settings", L"DAMAGE_MULTIPLIER", gzDmgMultiplierField, 5, L"0.7");
|
||||
props.getStringProperty( L"Ja2_mp Settings", L"TIMED_TURN_SECS_PER_TICK", gzTimerField, 5, L"25");
|
||||
props.getStringProperty( L"Ja2_mp Settings", L"FILE_TRANSFER_DIRECTORY", gzFileTransferDirectory, 100, L"MULTIPLAYER/Servers/My Server");
|
||||
props.getStringProperty( L"Ja2_mp Settings", L"KIT_BAG", gzKitBag, 100, L"[201,214,243]");
|
||||
props.getStringProperty(L"Ja2_mp Settings", L"TIME", &szTime[0], 6, L"13.50");
|
||||
|
||||
giMPHOverrideMaxAI = props.GetIntProperty( L"Ja2_mp Settings",L"OVERRIDE_MAX_AI", 0);
|
||||
giMPHRandomMercs = props.GetIntProperty( L"Ja2_mp Settings",L"RANDOM_MERCS", 0);
|
||||
giMPHSameMercs = props.GetIntProperty( L"Ja2_mp Settings",L"SAME_MERC", 1);
|
||||
giMPHReportMercs = props.GetIntProperty( L"Ja2_mp Settings",L"REPORT_NAME", 1);
|
||||
giMPHBobbyRays = props.GetIntProperty( L"Ja2_mp Settings",L"DISABLE_BOBBY_RAYS", 0);
|
||||
giMPHRandomSpawn = props.GetIntProperty( L"Ja2_mp Settings",L"RANDOM_EDGES", 0);
|
||||
giMPHEnableCivilians = props.GetIntProperty( L"Ja2_mp Settings",L"CIV_ENABLED", 0);
|
||||
giMPHUseNIV = props.GetIntProperty( L"Ja2_mp Settings",L"ALLOW_CUSTOM_NIV", 0);
|
||||
giMPHSendFiles = props.GetIntProperty( L"Ja2_mp Settings",L"SYNC_CLIENTS_MP_DIR", 1);
|
||||
guiMPHGameType = (UINT8)props.GetIntProperty( L"Ja2_mp Settings",L"GAME_MODE", MP_TYPE_DEATHMATCH);
|
||||
guiMPHDifficultLevel = (UINT8)props.GetIntProperty( L"Ja2_mp Settings",L"DIFFICULT_LEVEL", 3); // Expert
|
||||
giMPHOverrideMaxAI = (INT32)props.getIntProperty( L"Ja2_mp Settings",L"OVERRIDE_MAX_AI", 0);
|
||||
giMPHRandomMercs = (INT32)props.getIntProperty( L"Ja2_mp Settings",L"RANDOM_MERCS", 0);
|
||||
giMPHSameMercs = (INT32)props.getIntProperty( L"Ja2_mp Settings",L"SAME_MERC", 1);
|
||||
giMPHReportMercs = (INT32)props.getIntProperty( L"Ja2_mp Settings",L"REPORT_NAME", 1);
|
||||
giMPHBobbyRays = (INT32)props.getIntProperty( L"Ja2_mp Settings",L"DISABLE_BOBBY_RAYS", 0);
|
||||
giMPHRandomSpawn = (INT32)props.getIntProperty( L"Ja2_mp Settings",L"RANDOM_EDGES", 0);
|
||||
giMPHEnableCivilians = (INT32)props.getIntProperty( L"Ja2_mp Settings",L"CIV_ENABLED", 0);
|
||||
giMPHUseNIV = (INT32)props.getIntProperty( L"Ja2_mp Settings",L"ALLOW_CUSTOM_NIV", 0);
|
||||
giMPHSendFiles = (INT32)props.getIntProperty( L"Ja2_mp Settings",L"SYNC_CLIENTS_MP_DIR", 1);
|
||||
guiMPHGameType = (UINT8)props.getIntProperty( L"Ja2_mp Settings",L"GAME_MODE", MP_TYPE_DEATHMATCH);
|
||||
guiMPHDifficultLevel = (UINT8)props.getIntProperty( L"Ja2_mp Settings",L"DIFFICULT_LEVEL", 3); // Expert
|
||||
#endif
|
||||
|
||||
wchar_t* tok;
|
||||
@@ -1330,21 +1330,21 @@ void GetMPHScreenUserInput()
|
||||
SaveMPSettings(); // Update Profiles/UserProfile/ja2_mp.ini
|
||||
#ifdef USE_VFS
|
||||
// "gzFileTransferDirectory" is the new multiplayer profile root
|
||||
vfs::CProfileStack *PS = GetVFS()->GetProfileStack();
|
||||
vfs::CProfileStack *PS = getVFS()->getProfileStack();
|
||||
|
||||
// remove Multiplayer profile if it exists
|
||||
vfs::CVirtualProfile *pProf = PS->GetProfile("_MULTIPLAYER");
|
||||
if( pProf && (pProf == PS->TopProfile()) )
|
||||
vfs::CVirtualProfile *pProf = PS->getProfile("_MULTIPLAYER");
|
||||
if( pProf && (pProf == PS->topProfile()) )
|
||||
{
|
||||
THROWIFFALSE(PS->PopProfile(), "Could not remove old \"_MULTIPLAYER\" profile");
|
||||
THROWIFFALSE(PS->popProfile(), "Could not remove old \"_MULTIPLAYER\" profile");
|
||||
// careful, pProf is not valid anymore
|
||||
}
|
||||
// create and initialize a new Multiplayer profile
|
||||
pProf = new vfs::CVirtualProfile("_MULTIPLAYER",true);
|
||||
PS->PushProfile(pProf);
|
||||
if(!InitWriteProfile(*pProf, vfs::Path(gzFileTransferDirectory)))
|
||||
PS->pushProfile(pProf);
|
||||
if(!initWriteProfile(*pProf, vfs::Path(gzFileTransferDirectory)))
|
||||
{
|
||||
THROWIFFALSE(PS->PopProfile(), L"Could not remove \"_MULTIPLAYER\" profile");
|
||||
THROWIFFALSE(PS->popProfile(), L"Could not remove \"_MULTIPLAYER\" profile");
|
||||
THROWEXCEPTION(L"Directory exists, but Multiplayer profile could not be iniitalized");
|
||||
}
|
||||
#endif
|
||||
@@ -1376,21 +1376,21 @@ void BtnMPHStartCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
SaveMPSettings(); // Update the Profiles/UserProfile/ja2_mp.ini
|
||||
#ifdef USE_VFS
|
||||
// "gzFileTransferDirectory" is the new multiplayer profile root
|
||||
vfs::CProfileStack *PS = GetVFS()->GetProfileStack();
|
||||
vfs::CProfileStack *PS = getVFS()->getProfileStack();
|
||||
|
||||
// remove Multiplayer profile if it exists
|
||||
vfs::CVirtualProfile *pProf = PS->GetProfile("_MULTIPLAYER");
|
||||
if( pProf && (pProf == PS->TopProfile()) )
|
||||
vfs::CVirtualProfile *pProf = PS->getProfile("_MULTIPLAYER");
|
||||
if( pProf && (pProf == PS->topProfile()) )
|
||||
{
|
||||
THROWIFFALSE(PS->PopProfile(), "Could not remove old \"_MULTIPLAYER\" profile");
|
||||
THROWIFFALSE(PS->popProfile(), "Could not remove old \"_MULTIPLAYER\" profile");
|
||||
// careful, pProf is not valid anymore
|
||||
}
|
||||
// create and initialize a new Multiplayer profile
|
||||
pProf = new vfs::CVirtualProfile("_MULTIPLAYER",true);
|
||||
PS->PushProfile(pProf);
|
||||
if(!InitWriteProfile(*pProf, vfs::Path(gzFileTransferDirectory)))
|
||||
PS->pushProfile(pProf);
|
||||
if(!initWriteProfile(*pProf, vfs::Path(gzFileTransferDirectory)))
|
||||
{
|
||||
THROWIFFALSE(PS->PopProfile(), L"Could not remove \"_MULTIPLAYER\" profile");
|
||||
THROWIFFALSE(PS->popProfile(), L"Could not remove \"_MULTIPLAYER\" profile");
|
||||
THROWEXCEPTION(L"Directory exists, but Multiplayer profile could not be iniitalized");
|
||||
}
|
||||
#endif
|
||||
|
||||
+43
-37
@@ -34,7 +34,7 @@
|
||||
#include "VFS/vfs.h"
|
||||
#include "VFS/vfs_init.h"
|
||||
#include "VFS/PropertyContainer.h"
|
||||
#include "VFS/iteratedir.h"
|
||||
#include "VFS/os_functions.h"
|
||||
|
||||
#include "Random.h"
|
||||
|
||||
@@ -128,39 +128,45 @@ CHAR16 gzServerPortField[ 5+1 ] = {0} ;
|
||||
extern CHAR16 gzFileTransferDirectory[100];
|
||||
|
||||
#ifdef USE_VFS
|
||||
utf8string const& CUniqueServerId::GetServerId(vfs::Path dir, CPropertyContainer* props)
|
||||
|
||||
void CUniqueServerId::uniqueRandomString(utf8string& str)
|
||||
{
|
||||
std::vector<wchar_t> _rand(30,0);
|
||||
int pos = 0;
|
||||
for(int block = 0; block < 5; ++block)
|
||||
{
|
||||
for(int i=0; i<5; ++i)
|
||||
{
|
||||
int r = Random(36);
|
||||
if(r < 10)
|
||||
{
|
||||
r += L'0';
|
||||
}
|
||||
else
|
||||
{
|
||||
r += L'A' - 10;
|
||||
}
|
||||
_rand[pos++] = r;
|
||||
}
|
||||
_rand[pos++] = L'-';
|
||||
}
|
||||
str.r_wcs().assign(&_rand[0],29);
|
||||
}
|
||||
|
||||
utf8string const& CUniqueServerId::getServerId(vfs::Path dir, CPropertyContainer* props)
|
||||
{
|
||||
if(!props)
|
||||
{
|
||||
return _id;
|
||||
}
|
||||
utf8string key = L"\"" + dir().c_wcs() + L"\"";
|
||||
utf8string id = props->GetStringProperty(L"SERVER",key);
|
||||
utf8string key = L"\"" + dir.c_wcs() + L"\"";
|
||||
utf8string id = props->getStringProperty(L"SERVER",key);
|
||||
if(id.empty())
|
||||
{
|
||||
std::vector<wchar_t> _rand(30,0);
|
||||
int pos = 0;
|
||||
for(int block = 0; block < 5; ++block)
|
||||
{
|
||||
for(int i=0; i<5; ++i)
|
||||
{
|
||||
int r = Random(36);
|
||||
if(r < 10)
|
||||
{
|
||||
r += L'0';
|
||||
}
|
||||
else
|
||||
{
|
||||
r += L'A' - 10;
|
||||
}
|
||||
_rand[pos++] = r;
|
||||
}
|
||||
_rand[pos++] = L'-';
|
||||
}
|
||||
id.r_wcs().assign(&_rand[0],29);
|
||||
uniqueRandomString(id);
|
||||
}
|
||||
_id = id;
|
||||
props->SetStringProperty(L"SERVER",key,_id);
|
||||
props->setStringProperty(L"SERVER",key,_id);
|
||||
return _id;
|
||||
}
|
||||
|
||||
@@ -221,10 +227,10 @@ UINT32 MPJoinScreenInit( void )
|
||||
GetPrivateProfileStringW( L"Ja2_mp Settings",L"CLIENT_NAME", L"Player Name", gzPlayerHandleField, 12 , L"..\\Ja2_mp.ini" );
|
||||
#else
|
||||
CPropertyContainer props;
|
||||
props.InitFromIniFile( L"Ja2_mp.ini");
|
||||
props.GetStringProperty( L"Ja2_mp Settings", L"SERVER_IP", gzServerIPField, 16, "127.0.0.1");
|
||||
props.GetStringProperty( L"Ja2_mp Settings", L"SERVER_PORT", gzServerPortField, 6, "60005");
|
||||
props.GetStringProperty( L"Ja2_mp Settings", L"CLIENT_NAME", gzPlayerHandleField, 12, L"Player Name");
|
||||
props.initFromIniFile( L"Ja2_mp.ini");
|
||||
props.getStringProperty( L"Ja2_mp Settings", L"SERVER_IP", gzServerIPField, 16, "127.0.0.1");
|
||||
props.getStringProperty( L"Ja2_mp Settings", L"SERVER_PORT", gzServerPortField, 6, "60005");
|
||||
props.getStringProperty( L"Ja2_mp Settings", L"CLIENT_NAME", gzPlayerHandleField, 12, L"Player Name");
|
||||
#endif
|
||||
return( 1 );
|
||||
}
|
||||
@@ -245,15 +251,15 @@ void SaveJoinSettings(bool ReSaving)
|
||||
WritePrivateProfileStringW( L"Ja2_mp Settings",L"CLIENT_NAME", gzPlayerHandleField , L"..\\Ja2_mp.ini" );
|
||||
#else
|
||||
CPropertyContainer props;
|
||||
props.InitFromIniFile("Ja2_mp.ini");
|
||||
props.initFromIniFile("Ja2_mp.ini");
|
||||
|
||||
props.SetStringProperty(L"Ja2_mp Settings",L"SERVER_IP", gzServerIPField);
|
||||
props.SetStringProperty(L"Ja2_mp Settings",L"SERVER_PORT", gzServerPortField);
|
||||
props.SetStringProperty(L"Ja2_mp Settings",L"CLIENT_NAME", gzPlayerHandleField);
|
||||
props.setStringProperty(L"Ja2_mp Settings",L"SERVER_IP", gzServerIPField);
|
||||
props.setStringProperty(L"Ja2_mp Settings",L"SERVER_PORT", gzServerPortField);
|
||||
props.setStringProperty(L"Ja2_mp Settings",L"CLIENT_NAME", gzPlayerHandleField);
|
||||
|
||||
s_ServerId.GetServerId(vfs::Path(gzFileTransferDirectory), &props);
|
||||
s_ServerId.getServerId(vfs::Path(gzFileTransferDirectory), &props);
|
||||
|
||||
props.WriteToIniFile(L"ja2_mp.ini",true);
|
||||
props.writeToIniFile(L"ja2_mp.ini",true);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -339,9 +345,9 @@ bool ValidateJoinSettings(bool bSkipServerAddress, bool bSkipSyncDir)
|
||||
CreateDirectoryA(syncDir, NULL);
|
||||
}
|
||||
#else
|
||||
if(os::CreateRealDirecory(vfs::Path(L"Multiplayer")))
|
||||
if(os::createRealDirectory(vfs::Path(L"Multiplayer")))
|
||||
{
|
||||
os::CreateRealDirecory(vfs::Path(L"Multiplayer/Servers"));
|
||||
os::createRealDirectory(vfs::Path(L"Multiplayer/Servers"));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
+3
-1
@@ -10,7 +10,9 @@ class CPropertyContainer;
|
||||
class CUniqueServerId
|
||||
{
|
||||
public:
|
||||
utf8string const& GetServerId(vfs::Path dir, CPropertyContainer* props = NULL);
|
||||
utf8string const& getServerId(vfs::Path dir, CPropertyContainer* props = NULL);
|
||||
|
||||
static void uniqueRandomString(utf8string& str);
|
||||
private:
|
||||
utf8string _id;
|
||||
};
|
||||
|
||||
+251
@@ -0,0 +1,251 @@
|
||||
#include "MPXmlTeams.hpp"
|
||||
#include "sgp.h"
|
||||
#include "FileMan.h"
|
||||
#include "expat.h"
|
||||
#include "XML.h"
|
||||
#include "random.h"
|
||||
#include <cstdio>
|
||||
|
||||
MultiplayerTeams mpTeams = MultiplayerTeams();
|
||||
|
||||
// fallback data
|
||||
const int MultiplayerTeams::random_merc_teams[NUM_RANDOM_MERC_TEAMS][RANDOM_MERC_TEAM_SIZE] = {
|
||||
{ 16, 10, 19, 25, 4 , 11, 39 }, // Gus , Shadow, Spider , Raven , Vicki , Red , Meltdown
|
||||
{ 29, 36, 28, 2 , 22, 8 , 32 }, // Magic , Scope, Danny , Lynx , Hitman , Steroid , Malice
|
||||
{ 12, 5 , 20, 23, 48, 34, 17 }, // Reaper , Trevor, Cliff , Buzz , Cougar , Nails , Buns
|
||||
{ 31, 7 , 33, 35, 27, 37, 1 }, // Scully , Ivan , Dr Q , Thor , Len , Wolf , Blood
|
||||
};
|
||||
|
||||
void MultiplayerTeams::SerializeProfiles(int* dest)
|
||||
{
|
||||
int id;
|
||||
int r = Random(teams.size());
|
||||
|
||||
// if team is already used, choose next
|
||||
while (teamsTaken.at(r))
|
||||
{
|
||||
r++;
|
||||
if (r == teams.size())
|
||||
r = 0;
|
||||
}
|
||||
|
||||
teamsTaken.at(r) = true;
|
||||
id = r;
|
||||
|
||||
this->SerializeProfiles(dest, id);
|
||||
}
|
||||
|
||||
void MultiplayerTeams::SerializeProfiles(int* dest, int teamID)
|
||||
{
|
||||
teamID = teamID % this->teams.size();
|
||||
for (int i = 0; i < RANDOM_MERC_TEAM_SIZE; i++)
|
||||
{
|
||||
// poor man's memcpy
|
||||
*dest = teams.at(teamID).members.at(i);
|
||||
dest++;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void MultiplayerTeams::HandleServerStarted()
|
||||
{
|
||||
// reset
|
||||
teamsTaken = std::vector<bool>(teams.size(), false);
|
||||
}
|
||||
|
||||
void MultiplayerTeams::UseFallbackDataIfNecessary()
|
||||
{
|
||||
for (size_t team = 0; team < max(NUM_RANDOM_MERC_TEAMS, teams.size()); team++)
|
||||
{
|
||||
if (teams.size() <= team)
|
||||
{
|
||||
// create teams 1-4
|
||||
teams.push_back(MPTeam());
|
||||
}
|
||||
|
||||
// fill any empty merc slots
|
||||
for (int merc = teams.at(team).members.size(); merc < RANDOM_MERC_TEAM_SIZE; merc++)
|
||||
{
|
||||
teams.at(team).members.push_back(MultiplayerTeams::random_merc_teams[team%NUM_RANDOM_MERC_TEAMS][merc]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN MultiplayerTeams::ReadInMPTeams(STR fileName)
|
||||
{
|
||||
BOOLEAN result = this->ReadXMLFile(fileName);
|
||||
this->UseFallbackDataIfNecessary();
|
||||
return result;
|
||||
}
|
||||
|
||||
BOOLEAN MultiplayerTeams::ReadXMLFile(STR fileName)
|
||||
{
|
||||
|
||||
HWFILE hFile;
|
||||
UINT32 uiBytesRead;
|
||||
UINT32 uiFSize;
|
||||
CHAR8 *lpcBuffer;
|
||||
|
||||
|
||||
CHAR8 msg[128];
|
||||
sprintf(msg, "Loading %s", fileName);
|
||||
DebugMsg(TOPIC_JA2, DBG_LEVEL_3, msg);
|
||||
|
||||
if(!FileExists(fileName))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// open file
|
||||
hFile = FileOpen(fileName, FILE_ACCESS_READ, FALSE);
|
||||
if (!hFile)
|
||||
{
|
||||
// this might issue an error in the caller
|
||||
// but we can proceed, actually
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
uiFSize = FileGetSize(hFile);
|
||||
lpcBuffer = (CHAR*) MemAlloc(uiFSize);
|
||||
|
||||
// read in block
|
||||
if (!FileRead(hFile, lpcBuffer, uiFSize, &uiBytesRead))
|
||||
{
|
||||
MemFree(lpcBuffer);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
FileClose(hFile);
|
||||
|
||||
XML_Parser parser = XML_ParserCreate(NULL);
|
||||
struct teamsParseData parseData = { };
|
||||
parseData.mpTeams = this;
|
||||
|
||||
XML_SetElementHandler(parser, &MultiplayerTeams::teamsStartElementHandler, &MultiplayerTeams::teamsEndElementHandler);
|
||||
XML_SetCharacterDataHandler(parser, this->teamsCharacterDataHandler);
|
||||
XML_SetUserData(parser, &parseData);
|
||||
|
||||
|
||||
if (this->initialized)
|
||||
this->TrashTeams();
|
||||
|
||||
if (!XML_Parse(parser, lpcBuffer, uiFSize, TRUE))
|
||||
{
|
||||
// Cannot load, but that's okay. There is fallback data.
|
||||
MemFree(lpcBuffer);
|
||||
XML_ParserFree(parser);
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
this->initialized = true;
|
||||
|
||||
|
||||
MemFree(lpcBuffer);
|
||||
|
||||
XML_ParserFree(parser);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
MultiplayerTeams::MultiplayerTeams()
|
||||
{
|
||||
this->initialized = false;
|
||||
}
|
||||
|
||||
MultiplayerTeams::~MultiplayerTeams()
|
||||
{
|
||||
}
|
||||
|
||||
void MultiplayerTeams::TrashTeams()
|
||||
{
|
||||
this->teams.clear();
|
||||
this->initialized = false;
|
||||
}
|
||||
|
||||
void XMLCALL MultiplayerTeams::teamsStartElementHandler(void *userData, const XML_Char *name, const XML_Char **atts)
|
||||
{
|
||||
struct teamsParseData * pData = (struct teamsParseData *)userData;
|
||||
|
||||
if (pData->currentDepth <= pData->maxReadDepth)
|
||||
{
|
||||
if (!strcmp(name, "mp_teams") && pData->curElement == ELEMENT_NONE)
|
||||
{
|
||||
// root element
|
||||
pData->curElement = ELEMENT_LIST;
|
||||
pData->maxReadDepth++;
|
||||
}
|
||||
else if (!strcmp(name, "team") && pData->curElement == ELEMENT_LIST)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
MPTeam team = MPTeam();
|
||||
|
||||
if (atts[0] && !strcmp(atts[0], "name"))
|
||||
{
|
||||
team.name = std::string(atts[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
team.name = std::string("unnamed team");
|
||||
}
|
||||
|
||||
pData->mpTeams->teams.push_back(team);
|
||||
|
||||
pData->maxReadDepth++;
|
||||
}
|
||||
else if (!strcmp(name, "id"))
|
||||
{
|
||||
pData->curElement = ELEMENT_PROPERTY;
|
||||
pData->maxReadDepth++;
|
||||
}
|
||||
|
||||
pData->szCharData[0] = '\0';
|
||||
}
|
||||
|
||||
pData->currentDepth++;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void XMLCALL MultiplayerTeams::teamsEndElementHandler(void *userData, const XML_Char *name)
|
||||
{
|
||||
struct teamsParseData *pData = (struct teamsParseData *)userData;
|
||||
|
||||
if (pData->currentDepth <= pData->maxReadDepth)
|
||||
{
|
||||
if (!strcmp(name, "mp_teams"))
|
||||
{
|
||||
pData->curElement = ELEMENT_NONE;
|
||||
}
|
||||
else if (!strcmp(name, "team"))
|
||||
{
|
||||
pData->curElement = ELEMENT_LIST;
|
||||
}
|
||||
else if(!strcmp(name, "id"))
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
|
||||
INT8 id = atoi(pData->szCharData);
|
||||
pData->mpTeams->teams.back().members.push_back(id);
|
||||
}
|
||||
|
||||
pData->maxReadDepth--;
|
||||
}
|
||||
|
||||
pData->currentDepth--;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void XMLCALL MultiplayerTeams::teamsCharacterDataHandler(void *userData, const XML_Char *s, int len)
|
||||
{
|
||||
struct teamsParseData *pData = (struct teamsParseData *)userData;
|
||||
|
||||
if ((pData->currentDepth <= pData->maxReadDepth)
|
||||
&& (strlen(pData->szCharData) < MAX_CHAR_DATA_LENGTH))
|
||||
{
|
||||
strncat(pData->szCharData, s, __min((unsigned int)len, MAX_CHAR_DATA_LENGTH-strlen(pData->szCharData)));
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
#ifndef MPXMLTEAMS_HPP
|
||||
#define MPXMLTEAMS_HPP
|
||||
|
||||
#include "types.h"
|
||||
#include "XML.h"
|
||||
#include "expat.h"
|
||||
#include <vector>
|
||||
|
||||
|
||||
#define NUM_RANDOM_MERC_TEAMS 4
|
||||
#define RANDOM_MERC_TEAM_SIZE 7
|
||||
|
||||
/* MPTeams.xml structure:
|
||||
|
||||
- name attribute is optional and not used anywhere yet
|
||||
|
||||
<mp_teams>
|
||||
<team name="team1">
|
||||
<id>42</id>
|
||||
<id>23</id>
|
||||
...
|
||||
</team>
|
||||
<team>
|
||||
<id>97</id>
|
||||
...
|
||||
</team>
|
||||
...
|
||||
</mp_teams>
|
||||
*/
|
||||
|
||||
class MultiplayerTeams
|
||||
{
|
||||
private:
|
||||
struct MPTeam
|
||||
{
|
||||
std::string name;
|
||||
std::vector<int> members;
|
||||
};
|
||||
|
||||
public:
|
||||
BOOLEAN ReadInMPTeams(STR fileName);
|
||||
void HandleServerStarted();
|
||||
|
||||
MultiplayerTeams();
|
||||
~MultiplayerTeams();
|
||||
|
||||
void SerializeProfiles(int* dest);
|
||||
void SerializeProfiles(int* dest, int teamID);
|
||||
|
||||
|
||||
private:
|
||||
std::vector< MPTeam > teams;
|
||||
std::vector<bool> teamsTaken;
|
||||
bool initialized;
|
||||
|
||||
BOOLEAN ReadXMLFile(STR fileName);
|
||||
void UseFallbackDataIfNecessary();
|
||||
void TrashTeams();
|
||||
|
||||
static void XMLCALL teamsStartElementHandler(void *userData, const XML_Char *name, const XML_Char **atts);
|
||||
static void XMLCALL teamsEndElementHandler(void *userData, const XML_Char *name);
|
||||
static void XMLCALL teamsCharacterDataHandler(void *userData, const XML_Char *s, int len);
|
||||
|
||||
struct teamsParseData
|
||||
{
|
||||
PARSE_STAGE curElement;
|
||||
CHAR8 szCharData[MAX_CHAR_DATA_LENGTH+1];
|
||||
|
||||
UINT32 currentDepth;
|
||||
UINT32 maxReadDepth;
|
||||
|
||||
MultiplayerTeams *mpTeams;
|
||||
};
|
||||
|
||||
static const int random_merc_teams[NUM_RANDOM_MERC_TEAMS][RANDOM_MERC_TEAM_SIZE];
|
||||
};
|
||||
|
||||
// make global
|
||||
extern MultiplayerTeams mpTeams;
|
||||
|
||||
#endif
|
||||
+25
-22
@@ -290,11 +290,11 @@ BOOLEAN InitMainMenu( )
|
||||
is_networked = FALSE;
|
||||
#ifdef USE_VFS
|
||||
// remove Multiplayer profile if it exists
|
||||
vfs::CProfileStack *PS = GetVFS()->GetProfileStack();
|
||||
vfs::CVirtualProfile *pProf = PS->GetProfile("_MULTIPLAYER");
|
||||
if( pProf && (pProf == PS->TopProfile()) )
|
||||
vfs::CProfileStack *PS = getVFS()->getProfileStack();
|
||||
vfs::CVirtualProfile *pProf = PS->getProfile("_MULTIPLAYER");
|
||||
if( pProf && (pProf == PS->topProfile()) )
|
||||
{
|
||||
THROWIFFALSE(PS->PopProfile(), "Leaving Multiplayer mode : Could not remove \"_MULTIPLAYER\" profile");
|
||||
THROWIFFALSE(PS->popProfile(), "Leaving Multiplayer mode : Could not remove \"_MULTIPLAYER\" profile");
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -443,49 +443,52 @@ void MenuButtonCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
|
||||
if( gbHandledMainMenu == NEW_GAME )
|
||||
{
|
||||
if(is_networked)
|
||||
{
|
||||
is_networked = FALSE;
|
||||
giMAXIMUM_NUMBER_OF_PLAYER_SLOTS = CODE_MAXIMUM_NUMBER_OF_PLAYER_SLOTS;
|
||||
// Snap: UN-Init MP save game directory
|
||||
giMAXIMUM_NUMBER_OF_PLAYER_SLOTS = CODE_MAXIMUM_NUMBER_OF_PLAYER_SLOTS;
|
||||
if(is_networked)
|
||||
{
|
||||
is_networked = FALSE;
|
||||
// Snap: UN-Init MP save game directory
|
||||
if ( !InitSaveDir() )
|
||||
{
|
||||
|
||||
//if something didnt work, dont even know how to make error code...//hayden
|
||||
}
|
||||
}
|
||||
;
|
||||
};
|
||||
|
||||
SetMainMenuExitScreen( GAME_INIT_OPTIONS_SCREEN );
|
||||
}
|
||||
else if (gbHandledMainMenu == NEW_MP_GAME)
|
||||
{
|
||||
is_networked = TRUE;
|
||||
|
||||
// WANNE - MP: Only reset this here, because otherwise after a MP game ends and a new starts, we would receive the files again.
|
||||
fClientReceivedAllFiles = FALSE;
|
||||
|
||||
giMAXIMUM_NUMBER_OF_PLAYER_SLOTS = 7;
|
||||
|
||||
// Snap: Re-Init MP save game directory
|
||||
if ( !InitSaveDir() )
|
||||
{
|
||||
// Snap: Re-Init MP save game directory
|
||||
if ( !InitSaveDir() )
|
||||
{
|
||||
|
||||
//if something didnt work, dont even know how to make error code...//hayden
|
||||
}
|
||||
//if something didnt work, dont even know how to make error code...//hayden
|
||||
}
|
||||
|
||||
SetMainMenuExitScreen( MP_JOIN_SCREEN ); // OJW - 20081129
|
||||
//SetMainMenuExitScreen( GAME_INIT_OPTIONS_SCREEN );
|
||||
}
|
||||
else if( gbHandledMainMenu == LOAD_GAME )
|
||||
{
|
||||
if(is_networked)
|
||||
{
|
||||
is_networked = FALSE;
|
||||
// Snap: UN-Init MP save game directory
|
||||
giMAXIMUM_NUMBER_OF_PLAYER_SLOTS = CODE_MAXIMUM_NUMBER_OF_PLAYER_SLOTS;
|
||||
if(is_networked)
|
||||
{
|
||||
is_networked = FALSE;
|
||||
// Snap: UN-Init MP save game directory
|
||||
if ( !InitSaveDir() )
|
||||
{
|
||||
|
||||
//if something didnt work, dont even know how to make error code...//hayden
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if( gfKeyState[ ALT ] )
|
||||
gfLoadGameUponEntry = TRUE;
|
||||
|
||||
+1128
-118
File diff suppressed because it is too large
Load Diff
+51
-5
@@ -5,6 +5,8 @@
|
||||
#include "Merc Hiring.h"
|
||||
#include "event pump.h"
|
||||
|
||||
extern bool isOwnTeamWipedOut;
|
||||
|
||||
extern bool is_connected;
|
||||
extern bool is_connecting;
|
||||
extern bool is_client;
|
||||
@@ -52,7 +54,7 @@ extern STRING512 gCurrentTransferFilename;
|
||||
extern INT32 gCurrentTransferBytes;
|
||||
extern INT32 gTotalTransferBytes;
|
||||
|
||||
extern UINT16 crate_usMapPos;
|
||||
extern UINT32 crate_usMapPos;
|
||||
|
||||
//extern int INTERRUPTS;
|
||||
|
||||
@@ -90,13 +92,14 @@ void client_disconnect (void);
|
||||
void DialogRemoved( UINT8 ubResult );
|
||||
void manual_overide(void);
|
||||
|
||||
void send_path ( SOLDIERTYPE *pSoldier, UINT16 sDestGridNo, UINT16 usMovementAnim, BOOLEAN fFromUI, BOOLEAN fForceRestartAnim );
|
||||
void send_path ( SOLDIERTYPE *pSoldier, INT32 sDestGridNo, UINT16 usMovementAnim, BOOLEAN fFromUI, BOOLEAN fForceRestartAnim );
|
||||
void send_stance ( SOLDIERTYPE *pSoldier, UINT8 ubDesiredStance );
|
||||
void send_dir ( SOLDIERTYPE *pSoldier, UINT16 usDesiredDirection );
|
||||
void send_fire( SOLDIERTYPE *pSoldier, INT16 sTargetGridNo );
|
||||
void send_fire( SOLDIERTYPE *pSoldier, INT32 sTargetGridNo );
|
||||
void send_hit( EV_S_WEAPONHIT *SWeaponHit );
|
||||
|
||||
void send_hire( UINT8 iNewIndex, UINT8 ubCurrentSoldier, INT16 iTotalContractLength, BOOLEAN fCopyProfileItemsOver);
|
||||
void send_dismiss( UINT8 ubCurrentSoldier);
|
||||
|
||||
void send_gui_pos(SOLDIERTYPE *pSoldier, FLOAT dNewXPos, FLOAT dNewYPos);
|
||||
void send_gui_dir(SOLDIERTYPE *pSoldier, UINT16 usNewDirection);
|
||||
@@ -109,6 +112,17 @@ void send_stop (EV_S_STOP_MERC *SStopMerc);
|
||||
|
||||
void send_interrupt(SOLDIERTYPE *pSoldier);
|
||||
|
||||
// OJW - 20091002 - explosives
|
||||
void send_grenade (OBJECTTYPE *pGameObj, float dLifeLength, float xPos, float yPos, float zPos, float xForce, float yForce, float zForce, UINT32 sTargetGridNo, UINT8 ubOwner, UINT8 ubActionCode, UINT32 uiActionData, INT32 iRealObjectID , bool bIsThrownGrenade);
|
||||
void send_grenade_result (float xPos, float yPos, float zPos, INT32 sGridNo, UINT8 ubOwnerID, INT32 iRealObjectID, bool bIsDud);
|
||||
void send_plant_explosive (UINT8 ubID,UINT16 usItem,UINT8 ubItemStatus,UINT16 usFlags, UINT32 sGridNo,UINT8 ubLevel, UINT32 uiWorldIndex);
|
||||
void send_detonate_explosive (UINT32 uiWorldIndex, UINT8 ubID);
|
||||
void send_spreadeffect ( INT32 sGridNo, UINT8 ubRadius, UINT16 usItem, UINT8 ubOwner, BOOLEAN fSubsequent, INT8 bLevel, INT32 iSmokeEffectID );
|
||||
void send_newsmokeeffect(INT32 sGridNo, UINT16 usItem, INT8 bLevel, UINT8 ubOwner, INT32 iSmokeEffectID);
|
||||
void send_gasdamage( SOLDIERTYPE * pSoldier, UINT16 usExplosiveClassID , INT16 sSubsequent, BOOLEAN fRecompileMovementCosts, INT16 sWoundAmt, INT16 sBreathAmt, UINT8 ubOwner );
|
||||
void send_explosivedamage( UINT8 ubPerson, UINT8 ubOwner, INT32 sBombGridNo, INT16 sWoundAmt, INT16 sBreathAmt, UINT32 uiDist, UINT16 usItem, INT16 sSubsequent );
|
||||
void send_disarm_explosive(UINT32 sGridNo, UINT32 uiWorldIndex, UINT8 ubID);
|
||||
|
||||
void OpenChatMsgBox(void);
|
||||
|
||||
void reapplySETTINGS();
|
||||
@@ -122,7 +136,7 @@ extern char client_names[4][30];
|
||||
// changes to the codebase without talking to the other devs
|
||||
extern int client_ready[4];
|
||||
extern int client_teams[4];
|
||||
extern int client_edges[4];
|
||||
extern int client_edges[5];
|
||||
extern int client_downloading[4];
|
||||
extern int client_progress[4];
|
||||
|
||||
@@ -171,4 +185,36 @@ extern BOOLEAN fClientReceivedAllFiles;
|
||||
// OJW - 20090507
|
||||
// Add basic version checking, will only work from now on
|
||||
// note: this cannot be longer than char[30]
|
||||
#define MPVERSION "1.13MP-v1.2"
|
||||
#define MPVERSION "1.13MP-v1.5"
|
||||
|
||||
// OJW - 2009128 - inline funcs for working with soldiers and teams
|
||||
// sick of confusing myself :)
|
||||
|
||||
// this one should be called before passing an ID off the client
|
||||
inline UINT8 MPEncodeSoldierID( UINT8 ubID )
|
||||
{
|
||||
if ( ubID < 20 )
|
||||
return ubID + ubID_prefix; // soldier is ours
|
||||
else
|
||||
return ubID; // soldier is another teams, dont touch its ID
|
||||
}
|
||||
|
||||
// this one can be called anywhere, even if the ID was not "encoded"
|
||||
inline UINT8 MPDecodeSoldierID( UINT8 ubID )
|
||||
{
|
||||
if ( ubID >= ubID_prefix && ubID < (ubID_prefix + 7) )
|
||||
return ubID - ubID_prefix; // soldier is ours
|
||||
else
|
||||
return ubID; // soldier is another teams, dont touch its ID
|
||||
}
|
||||
|
||||
inline bool IsOurSoldier (SOLDIERTYPE* pSoldier)
|
||||
{
|
||||
return pSoldier->bTeam == netbTeam || pSoldier->bTeam == 0;
|
||||
}
|
||||
|
||||
inline bool IsOurSoldier (UINT8 ubID)
|
||||
{
|
||||
return (ubID >= ubID_prefix && ubID < (ubID_prefix + 7)) || ubID < 20;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ typedef struct
|
||||
typedef struct
|
||||
{
|
||||
UINT16 ubID;
|
||||
INT16 sGridNo;
|
||||
INT32 sGridNo;
|
||||
BOOLEAN fNoAnimations;
|
||||
}doors;
|
||||
|
||||
@@ -36,7 +36,7 @@ typedef struct
|
||||
}AIint;
|
||||
|
||||
BOOLEAN DisplayMercsInventory(UINT8 ubMercID);
|
||||
void send_door ( SOLDIERTYPE *pSoldier, INT16 sGridNo, BOOLEAN fNoAnimations );
|
||||
void send_door ( SOLDIERTYPE *pSoldier, INT32 sGridNo, BOOLEAN fNoAnimations );
|
||||
|
||||
void send_changestate (EV_S_CHANGESTATE * SChangeState);
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "random.h"
|
||||
|
||||
//this one just for structs, variables and functions used between the client and server scripts...
|
||||
|
||||
extern char CLIENT_NAME[30];
|
||||
@@ -11,6 +13,8 @@ extern unsigned int setID;
|
||||
//extern char *fileToSendCopy;
|
||||
|
||||
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
UINT8 client_num;
|
||||
@@ -48,7 +52,7 @@ typedef struct
|
||||
char client_name[30];
|
||||
char client_names[4][30];
|
||||
// OJW - added 20081204
|
||||
int client_edges[4];
|
||||
int client_edges[5];
|
||||
int client_teams[4];
|
||||
char server_name[30];
|
||||
//int cl_ops[4];
|
||||
@@ -67,6 +71,8 @@ typedef struct
|
||||
int RANDOM_MERCS;
|
||||
int random_mercs[7];
|
||||
char server_version[30];
|
||||
// OJW - added 20091024
|
||||
UINT32 random_table[MAX_PREGENERATED_NUMS];
|
||||
} settings_struct;
|
||||
|
||||
// WANNE: FILE TRANSFER
|
||||
|
||||
+159
-73
@@ -46,6 +46,8 @@
|
||||
#include "fresh_header.h"
|
||||
#include "Debug Control.h"
|
||||
|
||||
#include "MPXmlTeams.hpp"
|
||||
|
||||
extern CHAR16 gzFileTransferDirectory[100];
|
||||
|
||||
// WANNE: FILE TRANSFER
|
||||
@@ -151,6 +153,8 @@ client_data client_d[4];
|
||||
// OJW - 20081223
|
||||
// Random Merc teams
|
||||
// First attempt at "balanced" teams
|
||||
// moved to mpxmlteams.cpp
|
||||
/*
|
||||
int random_merc_teams[4][7] =
|
||||
{
|
||||
{ 16, 10, 19, 25, 4 , 11, 39 } , // Gus , Shadow, Spider , Raven , Vicki , Red , Meltdown
|
||||
@@ -158,6 +162,7 @@ int random_merc_teams[4][7] =
|
||||
{ 12, 5 , 20, 23, 48, 34, 17 } , // Reaper , Trevor, Cliff , Buzz , Cougar , Nails , Buns
|
||||
{ 31, 7 , 33, 35, 27, 37, 1 } // Scully , Ivan , Dr Q , Thor , Len , Wolf , Blood
|
||||
};
|
||||
*/
|
||||
|
||||
int client_mercteam[4] = { 0 , 1 , 2 , 3 }; // random index of random_merc_teams per player
|
||||
|
||||
@@ -276,6 +281,11 @@ void sendHIT(RPCParameters *rpcParameters)
|
||||
server->RPC("recieveHIT",(const char*)rpcParameters->input, (*rpcParameters).numberOfBitsOfData, HIGH_PRIORITY, RELIABLE, 0, rpcParameters->sender, true, 0, UNASSIGNED_NETWORK_ID,0);
|
||||
}
|
||||
|
||||
void sendDISMISS(RPCParameters *rpcParameters)
|
||||
{
|
||||
server->RPC("recieveDISMISS",(const char*)rpcParameters->input, (*rpcParameters).numberOfBitsOfData, HIGH_PRIORITY, RELIABLE, 0, rpcParameters->sender, true, 0, UNASSIGNED_NETWORK_ID,0);
|
||||
}
|
||||
|
||||
void sendHIRE(RPCParameters *rpcParameters)
|
||||
{
|
||||
server->RPC("recieveHIRE",(const char*)rpcParameters->input, (*rpcParameters).numberOfBitsOfData, HIGH_PRIORITY, RELIABLE, 0, rpcParameters->sender, true, 0, UNASSIGNED_NETWORK_ID,0);
|
||||
@@ -324,10 +334,51 @@ void sendBULLET(RPCParameters *rpcParameters)
|
||||
server->RPC("recieveBULLET",(const char*)rpcParameters->input, (*rpcParameters).numberOfBitsOfData, HIGH_PRIORITY, RELIABLE, 0, rpcParameters->sender, true, 0, UNASSIGNED_NETWORK_ID,0);
|
||||
}
|
||||
|
||||
void sendGRENADE(RPCParameters *rpcParameters)
|
||||
{
|
||||
server->RPC("recieveGRENADE",(const char*)rpcParameters->input, (*rpcParameters).numberOfBitsOfData, HIGH_PRIORITY, RELIABLE, 0, rpcParameters->sender, true, 0, UNASSIGNED_NETWORK_ID,0);
|
||||
}
|
||||
|
||||
void sendGRENADERESULT(RPCParameters *rpcParameters)
|
||||
{
|
||||
server->RPC("recieveGRENADERESULT",(const char*)rpcParameters->input, (*rpcParameters).numberOfBitsOfData, HIGH_PRIORITY, RELIABLE, 0, rpcParameters->sender, true, 0, UNASSIGNED_NETWORK_ID,0);
|
||||
}
|
||||
|
||||
void sendPLANTEXPLOSIVE(RPCParameters *rpcParameters)
|
||||
{
|
||||
server->RPC("recievePLANTEXPLOSIVE",(const char*)rpcParameters->input, (*rpcParameters).numberOfBitsOfData, HIGH_PRIORITY, RELIABLE, 0, rpcParameters->sender, true, 0, UNASSIGNED_NETWORK_ID,0);
|
||||
}
|
||||
|
||||
void sendDETONATEEXPLOSIVE(RPCParameters *rpcParameters)
|
||||
{
|
||||
server->RPC("recieveDETONATEEXPLOSIVE",(const char*)rpcParameters->input, (*rpcParameters).numberOfBitsOfData, HIGH_PRIORITY, RELIABLE, 0, rpcParameters->sender, true, 0, UNASSIGNED_NETWORK_ID,0);
|
||||
}
|
||||
|
||||
void sendDISARMEXPLOSIVE(RPCParameters *rpcParameters)
|
||||
{
|
||||
server->RPC("recieveDISARMEXPLOSIVE",(const char*)rpcParameters->input, (*rpcParameters).numberOfBitsOfData, HIGH_PRIORITY, RELIABLE, 0, rpcParameters->sender, true, 0, UNASSIGNED_NETWORK_ID,0);
|
||||
}
|
||||
|
||||
void sendSPREADEFFECT(RPCParameters *rpcParameters)
|
||||
{
|
||||
server->RPC("recieveSPREADEFFECT",(const char*)rpcParameters->input, (*rpcParameters).numberOfBitsOfData, HIGH_PRIORITY, RELIABLE, 0, rpcParameters->sender, true, 0, UNASSIGNED_NETWORK_ID,0);
|
||||
}
|
||||
|
||||
void sendNEWSMOKEEFFECT(RPCParameters *rpcParameters)
|
||||
{
|
||||
server->RPC("recieveNEWSMOKEEFFECT",(const char*)rpcParameters->input, (*rpcParameters).numberOfBitsOfData, HIGH_PRIORITY, RELIABLE, 0, rpcParameters->sender, true, 0, UNASSIGNED_NETWORK_ID,0);
|
||||
}
|
||||
|
||||
void sendEXPLOSIONDAMAGE(RPCParameters *rpcParameters)
|
||||
{
|
||||
server->RPC("recieveEXPLOSIONDAMAGE",(const char*)rpcParameters->input, (*rpcParameters).numberOfBitsOfData, HIGH_PRIORITY, RELIABLE, 0, rpcParameters->sender, true, 0, UNASSIGNED_NETWORK_ID,0);
|
||||
}
|
||||
|
||||
void sendSTATE(RPCParameters *rpcParameters)
|
||||
{
|
||||
server->RPC("recieveSTATE",(const char*)rpcParameters->input, (*rpcParameters).numberOfBitsOfData, HIGH_PRIORITY, RELIABLE, 0, rpcParameters->sender, true, 0, UNASSIGNED_NETWORK_ID,0);
|
||||
}
|
||||
|
||||
void sendDEATH(RPCParameters *rpcParameters)
|
||||
{
|
||||
// the master copy of the scoreboard is kept on the server
|
||||
@@ -654,11 +705,12 @@ void requestFILE_TRANSFER_SETTINGS(RPCParameters *rpcParameters)
|
||||
filetransfersettings_struct fts;
|
||||
|
||||
fts.syncClientsDirectory = gsSYNC_CLIENTS_MP_DIR;
|
||||
strcpy(fts.fileTransferDirectory, s_ServerId.GetServerId(vfs::Path(gzFileTransferDirectory)).utf8().c_str());
|
||||
strcpy(fts.fileTransferDirectory, s_ServerId.getServerId(vfs::Path(gzFileTransferDirectory)).utf8().c_str());
|
||||
strcpy(fts.serverName, SERVER_NAME);
|
||||
fts.totalTransferBytes = fileListTotalBytes;
|
||||
#endif
|
||||
server->RPC("recieveFILE_TRANSFER_SETTINGS",(const char*)&fts, (int)sizeof(filetransfersettings_struct)*8, HIGH_PRIORITY, RELIABLE, 0, UNASSIGNED_SYSTEM_ADDRESS, true, 0, UNASSIGNED_NETWORK_ID,0);
|
||||
// OJW - 200907819 - Only send to the client that asked for it
|
||||
server->RPC("recieveFILE_TRANSFER_SETTINGS",(const char*)&fts, (int)sizeof(filetransfersettings_struct)*8, HIGH_PRIORITY, RELIABLE, 0, sender, false, 0, UNASSIGNED_NETWORK_ID,0);
|
||||
}
|
||||
|
||||
|
||||
@@ -764,14 +816,33 @@ void requestSETTINGS(RPCParameters *rpcParameters )
|
||||
|
||||
// OJW - 20081218
|
||||
if (RANDOM_SPAWN)
|
||||
{
|
||||
// Get the edge from the randomized "client_edges"
|
||||
lan.cl_edge = client_edges[lan.client_num-1];
|
||||
}
|
||||
else
|
||||
lan.cl_edge=clinf->cl_edge;
|
||||
{
|
||||
// WANNE: on DM, each client should get a unique starting edge per default
|
||||
if (gsPLAYER_BSIDE == MP_TYPE_DEATHMATCH || gsPLAYER_BSIDE == MP_TYPE_TEAMDEATMATCH)
|
||||
{
|
||||
client_edges[0] = MP_EDGE_NORTH; // client 1
|
||||
client_edges[1] = MP_EDGE_SOUTH; // client 2
|
||||
client_edges[2] = MP_EDGE_EAST; // client 3
|
||||
client_edges[3] = MP_EDGE_WEST; // client 4
|
||||
|
||||
lan.cl_edge = client_edges[lan.client_num-1];
|
||||
}
|
||||
else
|
||||
{
|
||||
lan.cl_edge=clinf->cl_edge;
|
||||
}
|
||||
}
|
||||
|
||||
// OJW - 20081223
|
||||
if (RANDOM_MERCS)
|
||||
{
|
||||
memcpy(lan.random_mercs, random_merc_teams[client_mercteam[lan.client_num - 1]], sizeof(int) * 7);
|
||||
//memcpy(lan.random_mercs, random_merc_teams[client_mercteam[lan.client_num - 1]], sizeof(int) * 7);
|
||||
mpTeams.SerializeProfiles(lan.random_mercs);
|
||||
}
|
||||
|
||||
lan.TIME=TIME;
|
||||
@@ -781,9 +852,12 @@ void requestSETTINGS(RPCParameters *rpcParameters )
|
||||
|
||||
// OJW - 20081204
|
||||
strcpy(lan.server_name , SERVER_NAME);
|
||||
memcpy(lan.client_edges,client_edges,sizeof(int)*4);
|
||||
memcpy(lan.client_edges,client_edges,sizeof(int)*5);
|
||||
memcpy(lan.client_teams,client_teams,sizeof(int)*4);
|
||||
|
||||
// OJW - 20091024 - send servers random table
|
||||
memcpy(lan.random_table,guiPreRandomNums,sizeof(UINT32)*MAX_PREGENERATED_NUMS);
|
||||
|
||||
// OJW - 20090507
|
||||
// send server version to client
|
||||
strcpy(lan.server_version,MPVERSION);
|
||||
@@ -884,40 +958,39 @@ void AddFilesToSendList()
|
||||
#else
|
||||
// we cannot just iterate over "*/*" as we would get ALL files and we don't want to send all files
|
||||
// instead we only iterate over the files in the "_MULTIPLAYER" profile
|
||||
vfs::CProfileStack *PS = GetVFS()->GetProfileStack();
|
||||
vfs::CVirtualProfile *prof = PS->GetProfile("_MULTIPLAYER");
|
||||
if(prof != PS->TopProfile())
|
||||
vfs::CProfileStack *PS = getVFS()->getProfileStack();
|
||||
vfs::CVirtualProfile *prof = PS->getProfile("_MULTIPLAYER");
|
||||
if(prof != PS->topProfile())
|
||||
{
|
||||
// there is not supposed to be another profile?
|
||||
// output error message
|
||||
return;
|
||||
}
|
||||
CTransferRules transferRules;
|
||||
transferRules.InitFromTxtFile("transfer_rules.txt");
|
||||
vfs::IBaseLocation* loc = prof->GetLocation("");
|
||||
transferRules.initFromTxtFile("transfer_rules.txt");
|
||||
vfs::IBaseLocation* loc = prof->getLocation("");
|
||||
THROWIFFALSE(loc != NULL, "MP profile was successfully created, but the root directory is not included");
|
||||
vfs::IBaseLocation::Iterator it = loc->begin();
|
||||
int i=0;
|
||||
for(; !it.end(); it.next(), i++)
|
||||
{
|
||||
vfs::Path const& valid_path = it.value()->GetFullPath();
|
||||
if(transferRules.ApplyRule(valid_path()) == CTransferRules::ACCEPT)
|
||||
vfs::Path const& valid_path = it.value()->getPath();
|
||||
if(transferRules.applyRule(valid_path()) == CTransferRules::ACCEPT)
|
||||
{
|
||||
// transfer only those files that are not on the ignore list
|
||||
vfs::tReadableFile* rfile = vfs::tReadableFile::Cast(it.value());
|
||||
vfs::tReadableFile* rfile = vfs::tReadableFile::cast(it.value());
|
||||
if(!rfile)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
vfs::UInt32 fsize = rfile->GetFileSize();
|
||||
vfs::size_t fsize = rfile->getSize();
|
||||
fileListTotalBytes += (long)fsize;
|
||||
if( (fsize>0) && rfile->OpenRead())
|
||||
if( (fsize>0) && rfile->openRead())
|
||||
{
|
||||
std::vector<vfs::Byte> data(fsize,0);
|
||||
vfs::UInt32 has_read=0;
|
||||
rfile->Read(&data[0], fsize, has_read);
|
||||
rfile->Close();
|
||||
fileList.AddFile(valid_path().utf8().c_str(),&data[0], fsize,fsize,FileListNodeContext(0,0), false);
|
||||
rfile->read(&data[0], fsize);
|
||||
rfile->close();
|
||||
fileList.AddFile(utf8string::as_utf8(valid_path()).c_str(),&data[0], fsize,fsize,FileListNodeContext(0,0), false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -947,13 +1020,13 @@ void start_server (void)
|
||||
char SERVER_PORT[30];
|
||||
//char MAX_CLIENTS[30] ;
|
||||
#ifndef USE_VFS
|
||||
// GetPrivateProfileString( "Ja2_mp Settings","MAX_CLIENTS", "", maxclients, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
GetPrivateProfileString( "Ja2_mp Settings","SERVER_PORT", "", port, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
// GetPrivateProfileString( "Ja2_mp Settings","MAX_CLIENTS", "4", maxclients, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
GetPrivateProfileString( "Ja2_mp Settings","SERVER_PORT", "60005", port, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
// strcpy( MAX_CLIENTS , maxclients );
|
||||
strcpy( SERVER_PORT, port );
|
||||
#else
|
||||
// GetPrivateProfileString( "Ja2_mp Settings","MAX_CLIENTS", "", maxclients, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
strcpy(port, iniReader.ReadString("Ja2_mp Settings","SERVER_PORT", ""));
|
||||
strcpy(port, iniReader.ReadString("Ja2_mp Settings","SERVER_PORT", "60005"));
|
||||
// strcpy( MAX_CLIENTS , maxclients );
|
||||
strcpy( SERVER_PORT, port );
|
||||
#endif
|
||||
@@ -979,62 +1052,62 @@ void start_server (void)
|
||||
|
||||
// OJW - 20081204
|
||||
#ifndef USE_VFS
|
||||
GetPrivateProfileString( "Ja2_mp Settings","SERVER_NAME", "", SERVER_NAME, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
GetPrivateProfileString( "Ja2_mp Settings","SERVER_NAME", "Server Name", SERVER_NAME, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
|
||||
GetPrivateProfileString( "Ja2_mp Settings","SAME_MERC", "", hire_same_merc, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
GetPrivateProfileString( "Ja2_mp Settings","DISABLE_MORALE", "", mor, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
GetPrivateProfileString( "Ja2_mp Settings","MAX_CLIENTS", "", maxclients, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
GetPrivateProfileString( "Ja2_mp Settings","DAMAGE_MULTIPLIER", "", net_div, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
GetPrivateProfileString( "Ja2_mp Settings","RANDOM_MERCS", "", sRandomMercs, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
GetPrivateProfileString( "Ja2_mp Settings","RANDOM_EDGES", "", sRandomEdges, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
GetPrivateProfileString( "Ja2_mp Settings","SAME_MERC", "1", hire_same_merc, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
GetPrivateProfileString( "Ja2_mp Settings","DISABLE_MORALE", "0", mor, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
GetPrivateProfileString( "Ja2_mp Settings","MAX_CLIENTS", "4", maxclients, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
GetPrivateProfileString( "Ja2_mp Settings","DAMAGE_MULTIPLIER", "0.7", net_div, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
GetPrivateProfileString( "Ja2_mp Settings","RANDOM_MERCS", "0", sRandomMercs, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
GetPrivateProfileString( "Ja2_mp Settings","RANDOM_EDGES", "0", sRandomEdges, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
|
||||
GetPrivateProfileString( "Ja2_mp Settings","ENEMY_ENABLED", "", bteam1_enabled, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
//GetPrivateProfileString( "Ja2_mp Settings","CREATURE_ENABLED", "", bteam2_enabled, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
GetPrivateProfileString( "Ja2_mp Settings","MILITIA_ENABLED", "", bteam3_enabled, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
GetPrivateProfileString( "Ja2_mp Settings","CIV_ENABLED", "", bteam4_enabled, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
GetPrivateProfileString( "Ja2_mp Settings","ENEMY_ENABLED", "0", bteam1_enabled, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
//GetPrivateProfileString( "Ja2_mp Settings","CREATURE_ENABLED", "0", bteam2_enabled, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
GetPrivateProfileString( "Ja2_mp Settings","MILITIA_ENABLED", "0", bteam3_enabled, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
GetPrivateProfileString( "Ja2_mp Settings","CIV_ENABLED", "0", bteam4_enabled, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
|
||||
GetPrivateProfileString( "Ja2_mp Settings","GAME_MODE", "", player_bside, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
GetPrivateProfileString( "Ja2_mp Settings","DIFFICULT_LEVEL", "", difficult_level, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
GetPrivateProfileString( "Ja2_mp Settings","GAME_MODE", "0", player_bside, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
GetPrivateProfileString( "Ja2_mp Settings","DIFFICULT_LEVEL", "3", difficult_level, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
|
||||
// OJW - 20090304 - override max number of ai's in co-op
|
||||
char sOverrideMaxAI[30];
|
||||
OVERRIDE_MAX_AI = 0;
|
||||
GetPrivateProfileString( "Ja2_mp Settings","OVERRIDE_MAX_AI", "", sOverrideMaxAI, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
GetPrivateProfileString( "Ja2_mp Settings","OVERRIDE_MAX_AI", "0", sOverrideMaxAI, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
|
||||
// WANNE: FILE TRANSFER
|
||||
GetPrivateProfileString( "Ja2_mp Settings", "FILE_TRANSFER_DIRECTORY", "Data-MP", gsFILE_TRANSFER_DIRECTORY_SERVER, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
|
||||
char sendFiles[30];
|
||||
GetPrivateProfileString( "Ja2_mp Settings", "SYNC_CLIENTS_MP_DIR", "", sendFiles, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
GetPrivateProfileString( "Ja2_mp Settings", "SYNC_CLIENTS_MP_DIR", "1", sendFiles, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
gsSYNC_CLIENTS_MP_DIR = atoi(sendFiles);
|
||||
#else
|
||||
strncpy(SERVER_NAME, iniReader.ReadString("Ja2_mp Settings","SERVER_NAME", ""), 30);
|
||||
strncpy(SERVER_NAME, iniReader.ReadString("Ja2_mp Settings","SERVER_NAME", "Server Name"), 30);
|
||||
|
||||
strncpy(hire_same_merc, iniReader.ReadString("Ja2_mp Settings","SAME_MERC", ""), 30);
|
||||
strncpy(mor, iniReader.ReadString("Ja2_mp Settings","DISABLE_MORALE", ""), 30);
|
||||
strncpy(maxclients, iniReader.ReadString("Ja2_mp Settings","MAX_CLIENTS", ""), 30);
|
||||
strncpy(net_div, iniReader.ReadString("Ja2_mp Settings","DAMAGE_MULTIPLIER", ""), 30);
|
||||
strncpy(sRandomMercs, iniReader.ReadString("Ja2_mp Settings","RANDOM_MERCS", ""), 30);
|
||||
strncpy(sRandomEdges, iniReader.ReadString("Ja2_mp Settings","RANDOM_EDGES", ""), 30);
|
||||
strncpy(hire_same_merc, iniReader.ReadString("Ja2_mp Settings","SAME_MERC", "1"), 30);
|
||||
strncpy(mor, iniReader.ReadString("Ja2_mp Settings","DISABLE_MORALE", "0"), 30);
|
||||
strncpy(maxclients, iniReader.ReadString("Ja2_mp Settings","MAX_CLIENTS", "4"), 30);
|
||||
strncpy(net_div, iniReader.ReadString("Ja2_mp Settings","DAMAGE_MULTIPLIER", "0.7"), 30);
|
||||
strncpy(sRandomMercs, iniReader.ReadString("Ja2_mp Settings","RANDOM_MERCS", "0"), 30);
|
||||
strncpy(sRandomEdges, iniReader.ReadString("Ja2_mp Settings","RANDOM_EDGES", "0"), 30);
|
||||
|
||||
strncpy(bteam1_enabled, iniReader.ReadString("Ja2_mp Settings","ENEMY_ENABLED", ""), 30);
|
||||
strncpy(bteam1_enabled, iniReader.ReadString("Ja2_mp Settings","ENEMY_ENABLED", "0"), 30);
|
||||
//GetPrivateProfileString( "Ja2_mp Settings","CREATURE_ENABLED", "", bteam2_enabled, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
strncpy(bteam3_enabled, iniReader.ReadString("Ja2_mp Settings","MILITIA_ENABLED", ""), 30);
|
||||
strncpy(bteam4_enabled, iniReader.ReadString("Ja2_mp Settings","CIV_ENABLED", ""), 30);
|
||||
strncpy(bteam3_enabled, iniReader.ReadString("Ja2_mp Settings","MILITIA_ENABLED", "0"), 30);
|
||||
strncpy(bteam4_enabled, iniReader.ReadString("Ja2_mp Settings","CIV_ENABLED", "0"), 30);
|
||||
|
||||
strncpy(player_bside, iniReader.ReadString( "Ja2_mp Settings","GAME_MODE", ""), 30);
|
||||
strncpy(difficult_level, iniReader.ReadString( "Ja2_mp Settings", "DIFFICULT_LEVEL", ""), 30);
|
||||
strncpy(player_bside, iniReader.ReadString( "Ja2_mp Settings","GAME_MODE", "0"), 30);
|
||||
strncpy(difficult_level, iniReader.ReadString( "Ja2_mp Settings", "DIFFICULT_LEVEL", "3"), 30);
|
||||
|
||||
// OJW - 20090304 - override max number of ai's in co-op
|
||||
char sOverrideMaxAI[30];
|
||||
OVERRIDE_MAX_AI = 0;
|
||||
strncpy(sOverrideMaxAI, iniReader.ReadString("Ja2_mp Settings","OVERRIDE_MAX_AI", ""), 30);
|
||||
strncpy(sOverrideMaxAI, iniReader.ReadString("Ja2_mp Settings","OVERRIDE_MAX_AI", "0"), 30);
|
||||
|
||||
// WANNE: FILE TRANSFER
|
||||
strncpy(gsFILE_TRANSFER_DIRECTORY_SERVER, iniReader.ReadString("Ja2_mp Settings", "FILE_TRANSFER_DIRECTORY", "Data-MP"), 100 );
|
||||
|
||||
char sendFiles[30];
|
||||
strncpy(sendFiles, iniReader.ReadString( "Ja2_mp Settings", "SYNC_CLIENTS_MP_DIR", ""), 30 );
|
||||
strncpy(sendFiles, iniReader.ReadString( "Ja2_mp Settings", "SYNC_CLIENTS_MP_DIR", "1"), 30 );
|
||||
gsSYNC_CLIENTS_MP_DIR = atoi(sendFiles);
|
||||
|
||||
#endif
|
||||
@@ -1045,14 +1118,14 @@ void start_server (void)
|
||||
if(atoi(mor)==1)gsMORALE=1;
|
||||
|
||||
#ifndef USE_VFS
|
||||
GetPrivateProfileString( "Ja2_mp Settings","KIT_BAG", "", kbag, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
GetPrivateProfileString( "Ja2_mp Settings","KIT_BAG", "[201,214,243]", kbag, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
|
||||
char rpn[30];
|
||||
GetPrivateProfileString( "Ja2_mp Settings","REPORT_NAME", "", rpn, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
GetPrivateProfileString( "Ja2_mp Settings","REPORT_NAME", "1", rpn, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
gsREPORT_NAME=atoi(rpn);
|
||||
|
||||
GetPrivateProfileString( "Ja2_mp Settings","STARTING_BALANCE", "", sBalance, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
GetPrivateProfileString( "Ja2_mp Settings","TIMED_TURN_SECS_PER_TICK", "", time_div, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
GetPrivateProfileString( "Ja2_mp Settings","STARTING_BALANCE", "25000", sBalance, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
GetPrivateProfileString( "Ja2_mp Settings","TIMED_TURN_SECS_PER_TICK", "13.50", time_div, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
|
||||
char dis_bob[30];
|
||||
char dis_equip[30];
|
||||
@@ -1060,28 +1133,28 @@ void start_server (void)
|
||||
char test[30];
|
||||
GetPrivateProfileString( "Ja2_mp Settings","DISABLE_BOBBY_RAYS", "", dis_bob, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
GetPrivateProfileString( "Ja2_mp Settings","DISABLE_AIM_AND_MERC_EQUIP", "", dis_equip, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
GetPrivateProfileString( "Ja2_mp Settings","MAX_MERCS", "", max_merc, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
GetPrivateProfileString( "Ja2_mp Settings","TESTING", "", test, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
GetPrivateProfileString( "Ja2_mp Settings","MAX_MERCS", "5", max_merc, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
GetPrivateProfileString( "Ja2_mp Settings","TESTING", "0", test, MAX_PATH, "..\\Ja2_mp.ini" );
|
||||
gsDis_Bobby=false;
|
||||
gsDis_Equip=false;
|
||||
#else
|
||||
strncpy(kbag, iniReader.ReadString("Ja2_mp Settings","KIT_BAG", ""), 100);
|
||||
strncpy(kbag, iniReader.ReadString("Ja2_mp Settings","KIT_BAG", "[201,214,243]"), 100);
|
||||
|
||||
char rpn[30];
|
||||
strncpy(rpn, iniReader.ReadString("Ja2_mp Settings","REPORT_NAME", ""), 30);
|
||||
strncpy(rpn, iniReader.ReadString("Ja2_mp Settings","REPORT_NAME", "1"), 30);
|
||||
gsREPORT_NAME=atoi(rpn);
|
||||
|
||||
strncpy(sBalance, iniReader.ReadString("Ja2_mp Settings","STARTING_BALANCE", ""), 30);
|
||||
strncpy(time_div, iniReader.ReadString("Ja2_mp Settings","TIMED_TURN_SECS_PER_TICK", ""), 30);
|
||||
strncpy(sBalance, iniReader.ReadString("Ja2_mp Settings","STARTING_BALANCE", "25000"), 30);
|
||||
strncpy(time_div, iniReader.ReadString("Ja2_mp Settings","TIMED_TURN_SECS_PER_TICK", "25"), 30);
|
||||
|
||||
char dis_bob[30];
|
||||
char dis_equip[30];
|
||||
char max_merc[30];
|
||||
char test[30];
|
||||
strncpy(dis_bob, iniReader.ReadString("Ja2_mp Settings","DISABLE_BOBBY_RAYS", ""), 30);
|
||||
strncpy(dis_equip, iniReader.ReadString("Ja2_mp Settings","DISABLE_AIM_AND_MERC_EQUIP", ""), 30);
|
||||
strncpy(max_merc, iniReader.ReadString("Ja2_mp Settings","MAX_MERCS", ""), 30);
|
||||
strncpy(test, iniReader.ReadString("Ja2_mp Settings","TESTING", ""), 30);
|
||||
strncpy(dis_bob, iniReader.ReadString("Ja2_mp Settings","DISABLE_BOBBY_RAYS", "0"), 30);
|
||||
strncpy(dis_equip, iniReader.ReadString("Ja2_mp Settings","DISABLE_AIM_AND_MERC_EQUIP", "0"), 30);
|
||||
strncpy(max_merc, iniReader.ReadString("Ja2_mp Settings","MAX_MERCS", "5"), 30);
|
||||
strncpy(test, iniReader.ReadString("Ja2_mp Settings","TESTING", "0"), 30);
|
||||
gsDis_Bobby=false;
|
||||
gsDis_Equip=false;
|
||||
#endif
|
||||
@@ -1106,9 +1179,11 @@ void start_server (void)
|
||||
if (RANDOM_SPAWN)
|
||||
{
|
||||
// create random starting edges
|
||||
int spawns[4] = { 0 , 1 , 2 , 3 };
|
||||
rSortArray(spawns,4);
|
||||
memcpy(client_edges,spawns,sizeof(int)*4);
|
||||
int spawns[5] = { 0 , 1 , 2 , 3, 9 };
|
||||
|
||||
// Randomize spawns
|
||||
rSortArray(spawns,5);
|
||||
memcpy(client_edges,spawns,sizeof(int)*5);
|
||||
}
|
||||
|
||||
if (RANDOM_MERCS)
|
||||
@@ -1116,6 +1191,7 @@ void start_server (void)
|
||||
// randomly sort team indexes to give client
|
||||
// one of four random merc teams
|
||||
rSortArray(client_mercteam,4);
|
||||
mpTeams.HandleServerStarted();
|
||||
}
|
||||
|
||||
if(gsPLAYER_BSIDE==2)//only enable ai during coop
|
||||
@@ -1128,7 +1204,8 @@ void start_server (void)
|
||||
OVERRIDE_MAX_AI = 1;
|
||||
}
|
||||
|
||||
gsSAME_MERC = atoi(hire_same_merc);
|
||||
// random_mercs implies same_merc
|
||||
gsSAME_MERC = RANDOM_MERCS ? 1 : atoi(hire_same_merc);
|
||||
gsDAMAGE_MULTIPLIER =(FLOAT)atof(net_div);
|
||||
gsINTERRUPTS = atoi(ints);
|
||||
gsMAX_CLIENTS = atoi(maxclients);
|
||||
@@ -1153,19 +1230,19 @@ void start_server (void)
|
||||
sDISABLE_SPEC_MODE=atoi(dspec);
|
||||
#else
|
||||
char time[30];
|
||||
strncpy(time, iniReader.ReadString("Ja2_mp Settings","TIME", ""), 30);
|
||||
strncpy(time, iniReader.ReadString("Ja2_mp Settings","TIME", "0"), 30);
|
||||
TIME=(FLOAT)atof(time);
|
||||
|
||||
char wpr[30];
|
||||
strncpy(wpr, iniReader.ReadString("Ja2_mp Settings","WEAPON_READIED_BONUS", ""), 30);
|
||||
strncpy(wpr, iniReader.ReadString("Ja2_mp Settings","WEAPON_READIED_BONUS", "0"), 30);
|
||||
sWEAPON_READIED_BONUS=atoi(wpr);
|
||||
|
||||
char acniv[30];
|
||||
strncpy(acniv, iniReader.ReadString("Ja2_mp Settings","ALLOW_CUSTOM_NIV", ""), 30);
|
||||
strncpy(acniv, iniReader.ReadString("Ja2_mp Settings","ALLOW_CUSTOM_NIV", "0"), 30);
|
||||
sALLOW_CUSTOM_NIV=atoi(acniv);
|
||||
|
||||
char dspec[30];
|
||||
strncpy(dspec, iniReader.ReadString("Ja2_mp Settings","DISABLE_SPEC_MODE", ""), 30);
|
||||
strncpy(dspec, iniReader.ReadString("Ja2_mp Settings","DISABLE_SPEC_MODE", "0"), 30);
|
||||
sDISABLE_SPEC_MODE=atoi(dspec);
|
||||
#endif
|
||||
//**********************
|
||||
@@ -1185,6 +1262,7 @@ void start_server (void)
|
||||
REGISTER_STATIC_RPC(server, sendFIRE);
|
||||
REGISTER_STATIC_RPC(server, sendHIT);
|
||||
REGISTER_STATIC_RPC(server, sendHIRE);
|
||||
REGISTER_STATIC_RPC(server, sendDISMISS);
|
||||
REGISTER_STATIC_RPC(server, sendguiPOS);
|
||||
REGISTER_STATIC_RPC(server, sendguiDIR);
|
||||
REGISTER_STATIC_RPC(server, sendEndTurn);
|
||||
@@ -1194,6 +1272,14 @@ void start_server (void)
|
||||
REGISTER_STATIC_RPC(server, sendREADY);
|
||||
REGISTER_STATIC_RPC(server, sendGUI);
|
||||
REGISTER_STATIC_RPC(server, sendBULLET);
|
||||
REGISTER_STATIC_RPC(server, sendGRENADE);
|
||||
REGISTER_STATIC_RPC(server, sendGRENADERESULT);
|
||||
REGISTER_STATIC_RPC(server, sendPLANTEXPLOSIVE);
|
||||
REGISTER_STATIC_RPC(server, sendDETONATEEXPLOSIVE);
|
||||
REGISTER_STATIC_RPC(server, sendDISARMEXPLOSIVE);
|
||||
REGISTER_STATIC_RPC(server, sendSPREADEFFECT);
|
||||
REGISTER_STATIC_RPC(server, sendNEWSMOKEEFFECT);
|
||||
REGISTER_STATIC_RPC(server, sendEXPLOSIONDAMAGE);
|
||||
REGISTER_STATIC_RPC(server, requestSETTINGS);
|
||||
REGISTER_STATIC_RPC(server, requestFILE_TRANSFER_SETTINGS);
|
||||
REGISTER_STATIC_RPC(server, sendSTATE);
|
||||
|
||||
+156
-116
@@ -126,12 +126,12 @@
|
||||
#include "INIReader.h"
|
||||
|
||||
#include "VFS/vfs.h"
|
||||
|
||||
//rain
|
||||
#include "Rain.h"
|
||||
//end rain
|
||||
|
||||
#include "connect.h"
|
||||
#include "Map Screen Interface Map Inventory.h"//dnl ch51 081009
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -148,6 +148,7 @@ extern void ResetJA2ClockGlobalTimers( void );
|
||||
|
||||
extern void BeginLoadScreen( void );
|
||||
extern void EndLoadScreen();
|
||||
|
||||
extern CPostalService gPostalService;
|
||||
|
||||
//Global variable used
|
||||
@@ -291,7 +292,7 @@ typedef struct
|
||||
|
||||
BOOLEAN fDisableMapInterfaceDueToBattle;
|
||||
|
||||
INT16 sBoxerGridNo[ NUM_BOXERS ];
|
||||
INT32 sBoxerGridNo[ NUM_BOXERS ];
|
||||
UINT8 ubBoxerID[ NUM_BOXERS ];
|
||||
BOOLEAN fBoxerFought[ NUM_BOXERS ];
|
||||
|
||||
@@ -1004,46 +1005,53 @@ BOOLEAN ITEM_CURSOR_SAVE_INFO::Save(HWFILE hFile)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN SOLDIERCREATE_STRUCT::Save(HWFILE hFile, bool fSavingMap)
|
||||
//dnl ch42 250909
|
||||
BOOLEAN SOLDIERCREATE_STRUCT::Save(HWFILE hFile, bool fSavingMap, FLOAT dMajorMapVersion, UINT8 ubMinorMapVersion)
|
||||
{
|
||||
UINT32 uiNumBytesWritten;
|
||||
if ( !FileWrite( hFile, this, SIZEOF_SOLDIERCREATE_STRUCT_POD, &uiNumBytesWritten ) )
|
||||
PTR pData = this;
|
||||
UINT32 uiBytesToWrite = SIZEOF_SOLDIERCREATE_STRUCT_POD;
|
||||
OLD_SOLDIERCREATE_STRUCT_101 OldSoldierCreateStruct;
|
||||
if(dMajorMapVersion == VANILLA_MAJOR_MAP_VERSION && ubMinorMapVersion == VANILLA_MINOR_MAP_VERSION)
|
||||
{
|
||||
return FALSE;
|
||||
OldSoldierCreateStruct = *this;
|
||||
pData = &OldSoldierCreateStruct;
|
||||
uiBytesToWrite = SIZEOF_OLD_SOLDIERCREATE_STRUCT_101_POD;
|
||||
}
|
||||
if ( !this->Inv.Save(hFile, fSavingMap) )
|
||||
UINT32 uiBytesWritten = 0;
|
||||
FileWrite(hFile, pData, uiBytesToWrite, &uiBytesWritten);
|
||||
if(uiBytesToWrite == uiBytesWritten)
|
||||
{
|
||||
return FALSE;
|
||||
if(dMajorMapVersion == VANILLA_MAJOR_MAP_VERSION && ubMinorMapVersion == VANILLA_MINOR_MAP_VERSION)
|
||||
return(TRUE);
|
||||
if(Inv.Save(hFile, fSavingMap))
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
//ADB screw checksums, they suck, also, checksums aren't always saved
|
||||
/*
|
||||
if (fSavingMap == false) {
|
||||
UINT16 usCheckSum = GetChecksum();
|
||||
if ( !FileWrite( hFile, &usCheckSum, 2, &uiNumBytesWritten ) )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
*/
|
||||
return TRUE;
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
BOOLEAN SOLDIERCREATE_STRUCT::Load(INT8 **hBuffer, float dMajorMapVersion, UINT8 ubMinorMapVersion)
|
||||
BOOLEAN SOLDIERCREATE_STRUCT::Load(INT8 **hBuffer, FLOAT dMajorMapVersion, UINT8 ubMinorMapVersion)
|
||||
{
|
||||
if (dMajorMapVersion >= 6.0 && ubMinorMapVersion > 26 ) {
|
||||
LOADDATA( this, *hBuffer, SIZEOF_SOLDIERCREATE_STRUCT_POD );
|
||||
if(dMajorMapVersion >= 6.0 && ubMinorMapVersion > 26)
|
||||
{
|
||||
if(dMajorMapVersion < 7.0)
|
||||
{
|
||||
_OLD_SOLDIERCREATE_STRUCT OldSoldierCreateStruct;
|
||||
LOADDATA(&OldSoldierCreateStruct, *hBuffer, _OLD_SIZEOF_SOLDIERCREATE_STRUCT_POD);
|
||||
*this = OldSoldierCreateStruct;
|
||||
}
|
||||
else
|
||||
LOADDATA(this, *hBuffer, SIZEOF_SOLDIERCREATE_STRUCT_POD);
|
||||
this->Inv.Load(hBuffer, dMajorMapVersion, ubMinorMapVersion);
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
//ADB checksum was not saved under these circumstances!
|
||||
OLD_SOLDIERCREATE_STRUCT_101 OldSavedSoldierInfo101;
|
||||
LOADDATA( &OldSavedSoldierInfo101, *hBuffer, SIZEOF_OLD_SOLDIERCREATE_STRUCT_101_POD );
|
||||
LOADDATA(&OldSavedSoldierInfo101, *hBuffer, SIZEOF_OLD_SOLDIERCREATE_STRUCT_101_POD);
|
||||
OldSavedSoldierInfo101.CopyOldInventoryToNew();
|
||||
*this = OldSavedSoldierInfo101;
|
||||
}
|
||||
return TRUE;
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
BOOLEAN SOLDIERCREATE_STRUCT::Load(HWFILE hFile, int versionToLoad, bool loadChecksum)
|
||||
@@ -1145,6 +1153,7 @@ BOOLEAN SOLDIERCREATE_STRUCT::Load(HWFILE hFile, int versionToLoad, bool loadChe
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// WANNE - BMP: DONE!
|
||||
// Changed by ADB, rev 1513
|
||||
//BOOLEAN MERCPROFILESTRUCT::Load(HWFILE hFile, bool forceLoadOldVersion)
|
||||
BOOLEAN MERCPROFILESTRUCT::Load(HWFILE hFile, bool forceLoadOldVersion, bool forceLoadOldEncryption, bool wasSavedWithEncryption)
|
||||
@@ -1155,6 +1164,7 @@ BOOLEAN MERCPROFILESTRUCT::Load(HWFILE hFile, bool forceLoadOldVersion, bool for
|
||||
//if we are at the most current version, then fine
|
||||
if ( guiCurrentSaveGameVersion >= NIV_SAVEGAME_DATATYPE_CHANGE && forceLoadOldVersion == false)
|
||||
{
|
||||
// WANNE - BMP: DONE!
|
||||
if ( !FileRead( hFile, this, SIZEOF_MERCPROFILESTRUCT_POD, &uiNumBytesRead ) )
|
||||
{
|
||||
return(FALSE);
|
||||
@@ -1379,15 +1389,16 @@ BOOLEAN SOLDIERTYPE::Load(HWFILE hFile)
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
// WANNE - BMP: TODO! Struktur prüfen
|
||||
//load some structs, atm just POD but could change
|
||||
//Load STRUCT_AIData
|
||||
numBytesRead = 0;
|
||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.bOppList, sizeof(aiData.bOppList), sizeof(INT8), numBytesRead);
|
||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.bLastAction, sizeof(aiData.bLastAction), sizeof(INT8), numBytesRead);
|
||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.bAction, sizeof(aiData.bAction), sizeof(INT8), numBytesRead);
|
||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.usActionData, sizeof(aiData.usActionData), sizeof(UINT16), numBytesRead);
|
||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.usActionData, sizeof(aiData.usActionData), sizeof(INT32), numBytesRead);
|
||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.bNextAction, sizeof(aiData.bNextAction), sizeof(INT8), numBytesRead);
|
||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.usNextActionData, sizeof(aiData.usNextActionData), sizeof(UINT16), numBytesRead);
|
||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.usNextActionData, sizeof(aiData.usNextActionData), sizeof(INT32), numBytesRead);
|
||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.bActionInProgress, sizeof(aiData.bActionInProgress), sizeof(INT8), numBytesRead);
|
||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.bAlertStatus, sizeof(aiData.bAlertStatus), sizeof(INT8), numBytesRead);
|
||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.bOppCnt, sizeof(aiData.bOppCnt), sizeof(INT8), numBytesRead);
|
||||
@@ -1404,8 +1415,8 @@ BOOLEAN SOLDIERTYPE::Load(HWFILE hFile)
|
||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.bDominantDir, sizeof(aiData.bDominantDir), sizeof(INT8), numBytesRead);
|
||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.bPatrolCnt, sizeof(aiData.bPatrolCnt), sizeof(INT8), numBytesRead);
|
||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.bNextPatrolPnt, sizeof(aiData.bNextPatrolPnt), sizeof(INT8), numBytesRead);
|
||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.sPatrolGrid, sizeof(aiData.sPatrolGrid), sizeof(INT16), numBytesRead);
|
||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.sNoiseGridno, sizeof(aiData.sNoiseGridno), sizeof(INT16), numBytesRead);
|
||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.sPatrolGrid, sizeof(aiData.sPatrolGrid), sizeof(INT32), numBytesRead);
|
||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.sNoiseGridno, sizeof(aiData.sNoiseGridno), sizeof(INT32), numBytesRead);
|
||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.ubNoiseVolume, sizeof(aiData.ubNoiseVolume), sizeof(UINT8), numBytesRead);
|
||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.bLastAttackHit, sizeof(aiData.bLastAttackHit), sizeof(INT8), numBytesRead);
|
||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.ubXRayedBy, sizeof(aiData.ubXRayedBy), sizeof(UINT8), numBytesRead);
|
||||
@@ -1418,7 +1429,7 @@ BOOLEAN SOLDIERTYPE::Load(HWFILE hFile)
|
||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.ubPendingAction, sizeof(aiData.ubPendingAction), sizeof(UINT8), numBytesRead);
|
||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.ubPendingActionAnimCount, sizeof(aiData.ubPendingActionAnimCount), sizeof(UINT8), numBytesRead);
|
||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.uiPendingActionData1, sizeof(aiData.uiPendingActionData1), sizeof(UINT32), numBytesRead);
|
||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.sPendingActionData2, sizeof(aiData.sPendingActionData2), sizeof(INT16), numBytesRead);
|
||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.sPendingActionData2, sizeof(aiData.sPendingActionData2), sizeof(INT32), numBytesRead);
|
||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.bPendingActionData3, sizeof(aiData.bPendingActionData3), sizeof(INT8), numBytesRead);
|
||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.ubDoorHandleCode, sizeof(aiData.ubDoorHandleCode), sizeof(INT8), numBytesRead);
|
||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.uiPendingActionData4, sizeof(aiData.uiPendingActionData4), sizeof(UINT32), numBytesRead);
|
||||
@@ -1432,7 +1443,7 @@ BOOLEAN SOLDIERTYPE::Load(HWFILE hFile)
|
||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.bHunting, sizeof(aiData.bHunting), sizeof(INT8), numBytesRead);
|
||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.ubLastCall, sizeof(aiData.ubLastCall), sizeof(UINT8), numBytesRead);
|
||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.ubCaller, sizeof(aiData.ubCaller), sizeof(UINT8), numBytesRead);
|
||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.sCallerGridNo, sizeof(aiData.sCallerGridNo), sizeof(INT16), numBytesRead);
|
||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.sCallerGridNo, sizeof(aiData.sCallerGridNo), sizeof(INT32), numBytesRead);
|
||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.bCallPriority, sizeof(aiData.bCallPriority), sizeof(UINT8), numBytesRead);
|
||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.bCallActedUpon, sizeof(aiData.bCallActedUpon), sizeof(INT8), numBytesRead);
|
||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.bFrenzied, sizeof(aiData.bFrenzied), sizeof(INT8), numBytesRead);
|
||||
@@ -1560,25 +1571,30 @@ BOOLEAN WORLDITEM::Save(HWFILE hFile, bool fSavingMap)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOLEAN WORLDITEM::Load(INT8** hBuffer, float dMajorMapVersion, UINT8 ubMinorMapVersion)
|
||||
// WANNE - BMP: DONE!
|
||||
BOOLEAN WORLDITEM::Load(INT8** hBuffer, float dMajorMapVersion, UINT8 ubMinorMapVersion)//dnl ch42 271009
|
||||
{
|
||||
//if we are at the most current MAP version, 5.0 and 27, then fine
|
||||
if (dMajorMapVersion >= 6.0 && ubMinorMapVersion > 26 )
|
||||
if(dMajorMapVersion >= 6.0 && ubMinorMapVersion > 26)
|
||||
{
|
||||
//load the POD
|
||||
LOADDATA( this, *hBuffer, SIZEOF_WORLDITEM_POD );
|
||||
|
||||
//now load the OO OBJECTTYPE
|
||||
if(dMajorMapVersion < 7.0)
|
||||
{
|
||||
_OLD_WORLDITEM oldWorldItem;
|
||||
LOADDATA(&oldWorldItem, *hBuffer, _OLD_SIZEOF_WORLDITEM_POD);
|
||||
*this = oldWorldItem;
|
||||
}
|
||||
else
|
||||
LOADDATA(this, *hBuffer, SIZEOF_WORLDITEM_POD);
|
||||
// Load the OO OBJECTTYPE
|
||||
this->object.Load(hBuffer, dMajorMapVersion, ubMinorMapVersion);
|
||||
}
|
||||
//if we need to load an older save
|
||||
else {
|
||||
//load the old data into a suitable structure, it's just POD
|
||||
else
|
||||
{
|
||||
// Load the old data into a suitable structure, it's just POD
|
||||
OLD_WORLDITEM_101 oldWorldItem;
|
||||
LOADDATA( &oldWorldItem, *hBuffer, sizeof( OLD_WORLDITEM_101 ) );
|
||||
LOADDATA(&oldWorldItem, *hBuffer, sizeof(OLD_WORLDITEM_101));
|
||||
*this = oldWorldItem;
|
||||
}
|
||||
return TRUE;
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
BOOLEAN WORLDITEM::Load(HWFILE hFile)
|
||||
@@ -2186,6 +2202,10 @@ BOOLEAN SaveGame( int ubSaveGameID, STR16 pGameDesc )
|
||||
}
|
||||
}
|
||||
|
||||
if(gGameExternalOptions.fEnableInventoryPoolQ)//dnl ch51 081009
|
||||
if(!SaveInventoryPoolQ(ubSaveGameID))
|
||||
return(FALSE);
|
||||
|
||||
// create the save game file
|
||||
hFile = FileOpen( zSaveGameName, FILE_ACCESS_WRITE | FILE_CREATE_ALWAYS, FALSE );
|
||||
if( !hFile )
|
||||
@@ -4407,6 +4427,7 @@ BOOLEAN LoadSavedGame( int ubSavedGameID )
|
||||
UpdateMercMercContractInfo();
|
||||
}
|
||||
|
||||
|
||||
if ( guiCurrentSaveGameVersion <= 89 )
|
||||
{
|
||||
// ARM: A change was made in version 89 where refuel site availability now also depends on whether the player has
|
||||
@@ -4472,6 +4493,10 @@ BOOLEAN LoadSavedGame( int ubSavedGameID )
|
||||
//we must reset the values
|
||||
HandlePlayerTogglingLightEffects( FALSE );
|
||||
|
||||
if(gGameExternalOptions.fEnableInventoryPoolQ)//dnl ch51 081009
|
||||
if(!LoadInventoryPoolQ(ubSavedGameID))
|
||||
return(FALSE);
|
||||
|
||||
//now change the savegame format so that temp files are saved and loaded correctly
|
||||
guiCurrentSaveGameVersion = SAVE_GAME_VERSION;
|
||||
return( TRUE );
|
||||
@@ -4716,6 +4741,7 @@ BOOLEAN LoadSoldierStructure( HWFILE hFile )
|
||||
|
||||
if( ubOne )
|
||||
{
|
||||
// WANNE - BMP: Check -> We get an assert here!
|
||||
// Now Load the ....
|
||||
FileRead( hFile, Menptr[ cnt ].pKeyRing, NUM_KEYS * sizeof( KEY_ON_RING ), &uiNumBytesRead );
|
||||
if( uiNumBytesRead != NUM_KEYS * sizeof( KEY_ON_RING ) )
|
||||
@@ -4891,16 +4917,26 @@ BOOLEAN SaveFilesToSavedGame( STR pSrcFileName, HWFILE hFile )
|
||||
{
|
||||
UINT32 uiFileSize;
|
||||
UINT32 uiNumBytesWritten=0;
|
||||
HWFILE hSrcFile;
|
||||
UINT8 *pData;
|
||||
HWFILE hSrcFile=NULL;
|
||||
UINT8 *pData;
|
||||
UINT32 uiNumBytesRead;
|
||||
|
||||
|
||||
//open the file
|
||||
hSrcFile = FileOpen( pSrcFileName, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
|
||||
if(FileExists(pSrcFileName))
|
||||
{
|
||||
//open the file
|
||||
hSrcFile = FileOpen( pSrcFileName, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
|
||||
}
|
||||
if( !hSrcFile )
|
||||
{
|
||||
return( FALSE );
|
||||
// Write the the size of the file to the saved game file
|
||||
uiFileSize = 0;
|
||||
FileWrite( hFile, &uiFileSize, sizeof( UINT32 ), &uiNumBytesWritten );
|
||||
if( uiNumBytesWritten != sizeof( UINT32 ) )
|
||||
{
|
||||
return(FALSE);
|
||||
}
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
#ifdef JA2BETAVERSION
|
||||
@@ -5330,49 +5366,54 @@ BOOLEAN LoadTacticalStatusFromSavedGame( HWFILE hFile )
|
||||
|
||||
// WDS - make number of mercenaries, etc. be configurable
|
||||
// Check that the team lists match what we expect given the .ini settings
|
||||
int cntFromFile = gTacticalStatus.Team[ OUR_TEAM ].bLastID - gTacticalStatus.Team[ OUR_TEAM ].bFirstID + 1;
|
||||
int cntFromIni = gGameExternalOptions.ubGameMaximumNumberOfPlayerMercs + gGameExternalOptions.ubGameMaximumNumberOfPlayerVehicles;
|
||||
if (cntFromFile != cntFromIni) {
|
||||
CHAR16 errorMessage[512];
|
||||
swprintf(errorMessage, L"Internal error in reading mercenary/vehicle slots from save file: number of slots in save file (%d) differs from number of slots in .ini (%d)", cntFromFile, cntFromIni);
|
||||
DoScreenIndependantMessageBox(errorMessage, MSG_BOX_FLAG_OK, FailedLoadingGameCallBack );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
cntFromFile = gTacticalStatus.Team[ ENEMY_TEAM ].bLastID - gTacticalStatus.Team[ ENEMY_TEAM ].bFirstID + 1;
|
||||
cntFromIni = gGameExternalOptions.ubGameMaximumNumberOfEnemies;
|
||||
if (cntFromFile != cntFromIni) {
|
||||
CHAR16 errorMessage[512];
|
||||
swprintf(errorMessage, L"Internal error in reading enemy slots from save file: number of slots in save file (%d) differs from number of slots in .ini (%d)", cntFromFile, cntFromIni);
|
||||
DoScreenIndependantMessageBox(errorMessage, MSG_BOX_FLAG_OK, FailedLoadingGameCallBack );
|
||||
return FALSE;
|
||||
}
|
||||
// WANNE: In a MP game the merc counts are different than in a SP game, so disable check in a MP game
|
||||
if (!is_networked)
|
||||
{
|
||||
int cntFromFile = gTacticalStatus.Team[ OUR_TEAM ].bLastID - gTacticalStatus.Team[ OUR_TEAM ].bFirstID + 1;
|
||||
int cntFromIni = gGameExternalOptions.ubGameMaximumNumberOfPlayerMercs + gGameExternalOptions.ubGameMaximumNumberOfPlayerVehicles;
|
||||
if (cntFromFile != cntFromIni) {
|
||||
CHAR16 errorMessage[512];
|
||||
swprintf(errorMessage, L"Internal error in reading mercenary/vehicle slots from save file: number of slots in save file (%d) differs from number of slots in .ini (%d)", cntFromFile, cntFromIni);
|
||||
DoScreenIndependantMessageBox(errorMessage, MSG_BOX_FLAG_OK, FailedLoadingGameCallBack );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
cntFromFile = gTacticalStatus.Team[ CREATURE_TEAM ].bLastID - gTacticalStatus.Team[ CREATURE_TEAM ].bFirstID + 1;
|
||||
cntFromIni = gGameExternalOptions.ubGameMaximumNumberOfCreatures;
|
||||
if (cntFromFile != cntFromIni) {
|
||||
CHAR16 errorMessage[512];
|
||||
swprintf(errorMessage, L"Internal error in reading creature slots from save file: number of slots in save file (%d) differs from number of slots in .ini (%d)", cntFromFile, cntFromIni);
|
||||
DoScreenIndependantMessageBox(errorMessage, MSG_BOX_FLAG_OK, FailedLoadingGameCallBack );
|
||||
return FALSE;
|
||||
}
|
||||
cntFromFile = gTacticalStatus.Team[ ENEMY_TEAM ].bLastID - gTacticalStatus.Team[ ENEMY_TEAM ].bFirstID + 1;
|
||||
cntFromIni = gGameExternalOptions.ubGameMaximumNumberOfEnemies;
|
||||
if (cntFromFile != cntFromIni) {
|
||||
CHAR16 errorMessage[512];
|
||||
swprintf(errorMessage, L"Internal error in reading enemy slots from save file: number of slots in save file (%d) differs from number of slots in .ini (%d)", cntFromFile, cntFromIni);
|
||||
DoScreenIndependantMessageBox(errorMessage, MSG_BOX_FLAG_OK, FailedLoadingGameCallBack );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
cntFromFile = gTacticalStatus.Team[ MILITIA_TEAM ].bLastID - gTacticalStatus.Team[ MILITIA_TEAM ].bFirstID + 1;
|
||||
cntFromIni = gGameExternalOptions.ubGameMaximumNumberOfRebels;
|
||||
if (cntFromFile != cntFromIni) {
|
||||
CHAR16 errorMessage[512];
|
||||
swprintf(errorMessage, L"Internal error in reading militia slots from save file: number of slots in save file (%d) differs from number of slots in .ini (%d)", cntFromFile, cntFromIni);
|
||||
DoScreenIndependantMessageBox(errorMessage, MSG_BOX_FLAG_OK, FailedLoadingGameCallBack );
|
||||
return FALSE;
|
||||
}
|
||||
cntFromFile = gTacticalStatus.Team[ CREATURE_TEAM ].bLastID - gTacticalStatus.Team[ CREATURE_TEAM ].bFirstID + 1;
|
||||
cntFromIni = gGameExternalOptions.ubGameMaximumNumberOfCreatures;
|
||||
if (cntFromFile != cntFromIni) {
|
||||
CHAR16 errorMessage[512];
|
||||
swprintf(errorMessage, L"Internal error in reading creature slots from save file: number of slots in save file (%d) differs from number of slots in .ini (%d)", cntFromFile, cntFromIni);
|
||||
DoScreenIndependantMessageBox(errorMessage, MSG_BOX_FLAG_OK, FailedLoadingGameCallBack );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
cntFromFile = gTacticalStatus.Team[ CIV_TEAM ].bLastID - gTacticalStatus.Team[ CIV_TEAM ].bFirstID + 1;
|
||||
cntFromIni = gGameExternalOptions.ubGameMaximumNumberOfCivilians;
|
||||
if (cntFromFile != cntFromIni) {
|
||||
CHAR16 errorMessage[512];
|
||||
swprintf(errorMessage, L"Internal error in reading civilian slots from save file: number of slots in save file (%d) differs from number of slots in .ini (%d)", cntFromFile, cntFromIni);
|
||||
DoScreenIndependantMessageBox(errorMessage, MSG_BOX_FLAG_OK, FailedLoadingGameCallBack );
|
||||
return FALSE;
|
||||
cntFromFile = gTacticalStatus.Team[ MILITIA_TEAM ].bLastID - gTacticalStatus.Team[ MILITIA_TEAM ].bFirstID + 1;
|
||||
cntFromIni = gGameExternalOptions.ubGameMaximumNumberOfRebels;
|
||||
if (cntFromFile != cntFromIni) {
|
||||
CHAR16 errorMessage[512];
|
||||
swprintf(errorMessage, L"Internal error in reading militia slots from save file: number of slots in save file (%d) differs from number of slots in .ini (%d)", cntFromFile, cntFromIni);
|
||||
DoScreenIndependantMessageBox(errorMessage, MSG_BOX_FLAG_OK, FailedLoadingGameCallBack );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
cntFromFile = gTacticalStatus.Team[ CIV_TEAM ].bLastID - gTacticalStatus.Team[ CIV_TEAM ].bFirstID + 1;
|
||||
cntFromIni = gGameExternalOptions.ubGameMaximumNumberOfCivilians;
|
||||
if (cntFromFile != cntFromIni) {
|
||||
CHAR16 errorMessage[512];
|
||||
swprintf(errorMessage, L"Internal error in reading civilian slots from save file: number of slots in save file (%d) differs from number of slots in .ini (%d)", cntFromFile, cntFromIni);
|
||||
DoScreenIndependantMessageBox(errorMessage, MSG_BOX_FLAG_OK, FailedLoadingGameCallBack );
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
@@ -5424,8 +5465,7 @@ BOOLEAN SetMercsInsertionGridNo( )
|
||||
//if the soldier is active
|
||||
if( Menptr[ cnt ].bActive )
|
||||
{
|
||||
|
||||
if( Menptr[ cnt ].sGridNo != NOWHERE )
|
||||
if( !TileIsOutOfBounds(Menptr[ cnt ].sGridNo))
|
||||
{
|
||||
//set the insertion type to gridno
|
||||
Menptr[ cnt ].ubStrategicInsertionCode = INSERTION_CODE_GRIDNO;
|
||||
@@ -5511,7 +5551,7 @@ BOOLEAN SaveOppListInfoToSavedGame( HWFILE hFile )
|
||||
|
||||
// Save the Public Last Noise Gridno
|
||||
uiSaveSize = MAXTEAMS;
|
||||
FileWrite( hFile, gsPublicNoiseGridno, uiSaveSize, &uiNumBytesWritten );
|
||||
FileWrite( hFile, gsPublicNoiseGridNo, uiSaveSize, &uiNumBytesWritten );
|
||||
if( uiNumBytesWritten != uiSaveSize )
|
||||
{
|
||||
return( FALSE );
|
||||
@@ -5590,7 +5630,7 @@ BOOLEAN LoadOppListInfoFromSavedGame( HWFILE hFile )
|
||||
|
||||
// Load the Public Last Noise Gridno
|
||||
uiLoadSize = MAXTEAMS;
|
||||
FileRead( hFile, gsPublicNoiseGridno, uiLoadSize, &uiNumBytesRead );
|
||||
FileRead( hFile, gsPublicNoiseGridNo, uiLoadSize, &uiNumBytesRead );
|
||||
if( uiNumBytesRead != uiLoadSize )
|
||||
{
|
||||
return( FALSE );
|
||||
@@ -6023,14 +6063,13 @@ BOOLEAN SaveGeneralInfo( HWFILE hFile )
|
||||
sGeneralInfo.sContractRehireSoldierID = -1;
|
||||
|
||||
memcpy( &sGeneralInfo.GameOptions, &gGameOptions, sizeof( GAME_OPTIONS ) );
|
||||
|
||||
|
||||
#ifndef BMP_RANDOM//dnl ch55 111009
|
||||
#ifdef JA2BETAVERSION
|
||||
//Everytime we save get, and set a seed value, when reload, seed again
|
||||
sGeneralInfo.uiSeedNumber = GetJA2Clock();
|
||||
srand( sGeneralInfo.uiSeedNumber );
|
||||
#endif
|
||||
|
||||
#endif
|
||||
//Save the Ja2Clock()
|
||||
sGeneralInfo.uiBaseJA2Clock = guiBaseJA2Clock;
|
||||
|
||||
@@ -6051,7 +6090,7 @@ BOOLEAN SaveGeneralInfo( HWFILE hFile )
|
||||
sGeneralInfo.fDisableMapInterfaceDueToBattle = fDisableMapInterfaceDueToBattle;
|
||||
|
||||
// Save boxing info
|
||||
memcpy( &sGeneralInfo.sBoxerGridNo, &gsBoxerGridNo, NUM_BOXERS * sizeof( INT16 ) );
|
||||
memcpy( &sGeneralInfo.sBoxerGridNo, &gsBoxerGridNo, NUM_BOXERS * sizeof( INT32 ) );
|
||||
memcpy( &sGeneralInfo.ubBoxerID, &gubBoxerID, NUM_BOXERS * sizeof( INT8 ) );
|
||||
memcpy( &sGeneralInfo.fBoxerFought, &gfBoxerFought, NUM_BOXERS * sizeof( BOOLEAN ) );
|
||||
|
||||
@@ -6189,8 +6228,7 @@ BOOLEAN LoadGeneralInfo( HWFILE hFile )
|
||||
|
||||
GENERAL_SAVE_INFO sGeneralInfo;
|
||||
memset( &sGeneralInfo, 0, sizeof( GENERAL_SAVE_INFO ) );
|
||||
// HEADROCK HAM 3.6: Hi. If you can see this comment, please delete the next line. Sorry! :)
|
||||
INT32 blah = sizeof( GENERAL_SAVE_INFO );
|
||||
|
||||
|
||||
//Load the current music mode
|
||||
FileRead( hFile, &sGeneralInfo, sizeof( GENERAL_SAVE_INFO ), &uiNumBytesRead );
|
||||
@@ -6287,12 +6325,12 @@ BOOLEAN LoadGeneralInfo( HWFILE hFile )
|
||||
pContractReHireSoldier = &Menptr[ sGeneralInfo.sContractRehireSoldierID ];
|
||||
|
||||
memcpy( &gGameOptions, &sGeneralInfo.GameOptions, sizeof( GAME_OPTIONS ) );
|
||||
|
||||
#ifndef BMP_RANDOM//dnl ch55 111009
|
||||
#ifdef JA2BETAVERSION
|
||||
//Reset the random 'seed' number
|
||||
srand( sGeneralInfo.uiSeedNumber );
|
||||
#endif
|
||||
|
||||
#endif
|
||||
//Restore the JA2 Clock
|
||||
guiBaseJA2Clock = sGeneralInfo.uiBaseJA2Clock;
|
||||
|
||||
@@ -6331,7 +6369,7 @@ BOOLEAN LoadGeneralInfo( HWFILE hFile )
|
||||
fDisableDueToBattleRoster = sGeneralInfo.fDisableDueToBattleRoster;
|
||||
fDisableMapInterfaceDueToBattle = sGeneralInfo.fDisableMapInterfaceDueToBattle;
|
||||
|
||||
memcpy( &gsBoxerGridNo, &sGeneralInfo.sBoxerGridNo, NUM_BOXERS * sizeof( INT16 ) );
|
||||
memcpy( &gsBoxerGridNo, &sGeneralInfo.sBoxerGridNo, NUM_BOXERS * sizeof( INT32 ) );
|
||||
memcpy( &gubBoxerID, &sGeneralInfo.ubBoxerID, NUM_BOXERS * sizeof( INT8 ) );
|
||||
memcpy( &gfBoxerFought, &sGeneralInfo.fBoxerFought, NUM_BOXERS * sizeof( BOOLEAN ) );
|
||||
|
||||
@@ -6465,7 +6503,7 @@ BOOLEAN SavePreRandomNumbersToSaveGameFile( HWFILE hFile )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
#ifndef BMP_RANDOM//dnl ch55 111009
|
||||
//Save the Prerandom number index
|
||||
for (std::vector<UINT32>::iterator iter = guiPreRandomNums.begin();
|
||||
iter != guiPreRandomNums.end(); ++iter) {
|
||||
@@ -6475,12 +6513,13 @@ BOOLEAN SavePreRandomNumbersToSaveGameFile( HWFILE hFile )
|
||||
return( FALSE );
|
||||
}
|
||||
}
|
||||
//FileWrite( hFile, guiPreRandomNums, sizeof( UINT32 ) * MAX_PREGENERATED_NUMS, &uiNumBytesWritten );
|
||||
//if( uiNumBytesWritten != sizeof( UINT32 ) * MAX_PREGENERATED_NUMS )
|
||||
//{
|
||||
// return( FALSE );
|
||||
//}
|
||||
|
||||
#else
|
||||
FileWrite( hFile, guiPreRandomNums, sizeof( UINT32 ) * MAX_PREGENERATED_NUMS, &uiNumBytesWritten );
|
||||
if( uiNumBytesWritten != sizeof( UINT32 ) * MAX_PREGENERATED_NUMS )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
#endif
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
@@ -6494,7 +6533,7 @@ BOOLEAN LoadPreRandomNumbersFromSaveGameFile( HWFILE hFile )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
#ifndef BMP_RANDOM//dnl ch55 111009
|
||||
//Load the Prerandom number index
|
||||
for (std::vector<UINT32>::iterator iter = guiPreRandomNums.begin();
|
||||
iter != guiPreRandomNums.end(); ++iter) {
|
||||
@@ -6504,12 +6543,13 @@ BOOLEAN LoadPreRandomNumbersFromSaveGameFile( HWFILE hFile )
|
||||
return( FALSE );
|
||||
}
|
||||
}
|
||||
// FileRead( hFile, guiPreRandomNums, sizeof( UINT32 ) * MAX_PREGENERATED_NUMS, &uiNumBytesRead );
|
||||
// if( uiNumBytesRead != sizeof( UINT32 ) * MAX_PREGENERATED_NUMS )
|
||||
// {
|
||||
// return( FALSE );
|
||||
// }
|
||||
|
||||
#else
|
||||
FileRead( hFile, guiPreRandomNums, sizeof( UINT32 ) * MAX_PREGENERATED_NUMS, &uiNumBytesRead );
|
||||
if( uiNumBytesRead != sizeof( UINT32 ) * MAX_PREGENERATED_NUMS )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
#endif
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
|
||||
@@ -51,6 +51,8 @@
|
||||
using namespace std;
|
||||
|
||||
#include "VFS/vfs.h"
|
||||
#include "VFS/os_functions.h"
|
||||
#include "VFS/vfs_settings.h"
|
||||
|
||||
#ifdef USE_VFS
|
||||
|
||||
@@ -256,7 +258,7 @@ void FileDebug( BOOLEAN f )
|
||||
BOOLEAN FileExists( STR strFilename )
|
||||
{
|
||||
#ifdef USE_VFS
|
||||
return GetVFS()->FileExists(vfs::Path(strFilename));
|
||||
return getVFS()->fileExists(vfs::Path(strFilename));
|
||||
#else
|
||||
// First check to see if it's in a library (most files should be there)
|
||||
if ( gFileDataBase.fInitialized &&
|
||||
@@ -302,7 +304,7 @@ BOOLEAN FileExists( STR strFilename )
|
||||
extern BOOLEAN FileExistsNoDB( STR strFilename )
|
||||
{
|
||||
#ifdef USE_VFS
|
||||
return GetVFS()->FileExists(vfs::Path(strFilename));
|
||||
return getVFS()->fileExists(vfs::Path(strFilename));
|
||||
#else
|
||||
// First check if it's in the custom Data directory
|
||||
if ( gCustomDataCat.FindFile(strFilename) ) return TRUE;
|
||||
@@ -342,7 +344,7 @@ extern BOOLEAN FileExistsNoDB( STR strFilename )
|
||||
BOOLEAN FileDelete( STR strFilename )
|
||||
{
|
||||
#ifdef USE_VFS
|
||||
return GetVFS()->RemoveFileFromFS(vfs::Path(strFilename));
|
||||
return getVFS()->removeFileFromFS(vfs::Path(strFilename));
|
||||
#else
|
||||
// Snap: delete the file from the default Data catalogue (if it is there)
|
||||
// Since the path can be either relative or absolute, try both methods
|
||||
@@ -388,9 +390,9 @@ HWFILE FileOpen( STR strFilename, UINT32 uiOptions, BOOLEAN fDeleteOnClose )
|
||||
if(uiOptions & FILE_ACCESS_WRITE)
|
||||
{
|
||||
// 'vfs::CVirtualFile::SF_TOP' should be enough, but if for some strange reason
|
||||
// file creation fails, we will stop at a writeable profile
|
||||
// file creation fails, we will stop at a writable profile
|
||||
// and won't unintentionally mess up a file from another profile
|
||||
vfs::COpenWriteFile open_w( path, true, false, vfs::CVirtualFile::SF_STOP_ON_WRITEABLE_PROFILE);
|
||||
vfs::COpenWriteFile open_w( path, true, false, vfs::CVirtualFile::SF_STOP_ON_WRITABLE_PROFILE);
|
||||
pFile = &open_w.file();
|
||||
open_w.release();
|
||||
s_mapFiles[pFile].op = SOperation::WRITE;
|
||||
@@ -408,10 +410,10 @@ HWFILE FileOpen( STR strFilename, UINT32 uiOptions, BOOLEAN fDeleteOnClose )
|
||||
// sometimes a file is supposed to opened that does not exist (not tested with FileExists())
|
||||
// this operation can fail with an exception that the calling code doesn't catch
|
||||
// instead we catch it (any exception, not just CBasicException) here and return 0
|
||||
catch(CBasicException& ex) { LogException(ex); }
|
||||
catch(CBasicException& ex) { logException(ex); }
|
||||
catch(...)
|
||||
{
|
||||
LogException( CBasicException("Caught undefined exception", _FUNCTION_FORMAT_, __LINE__, __FILE__) );
|
||||
logException( CBasicException("Caught undefined exception", _FUNCTION_FORMAT_, __LINE__, __FILE__) );
|
||||
}
|
||||
return 0;
|
||||
#else
|
||||
@@ -584,7 +586,7 @@ void FileClose( HWFILE hFile )
|
||||
vfs::IBaseFile *pFile = (vfs::IBaseFile*)hFile;
|
||||
if(pFile)
|
||||
{
|
||||
pFile->Close();
|
||||
pFile->close();
|
||||
s_mapFiles.erase(pFile);
|
||||
}
|
||||
#else
|
||||
@@ -650,24 +652,45 @@ void FileClose( HWFILE hFile )
|
||||
extern UINT32 uiTotalFileReadTime;
|
||||
extern UINT32 uiTotalFileReadCalls;
|
||||
#include "Timer Control.h"
|
||||
#endif
|
||||
|
||||
class TimeCounter
|
||||
{
|
||||
public:
|
||||
TimeCounter() : start_time(GetJA2Clock()) {}
|
||||
~TimeCounter()
|
||||
{
|
||||
uiTotalFileReadTime += GetJA2Clock() - start_time;
|
||||
uiTotalFileReadCalls++;
|
||||
}
|
||||
private:
|
||||
UINT32 start_time;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
BOOLEAN FileRead( HWFILE hFile, PTR pDest, UINT32 uiBytesToRead, UINT32 *puiBytesRead )
|
||||
{
|
||||
#ifdef USE_VFS
|
||||
#ifdef JA2TESTVERSION
|
||||
UINT32 uiStartTime = GetJA2Clock();
|
||||
TimeCounter timer;
|
||||
#endif
|
||||
bool bSuccess = false;
|
||||
vfs::IBaseFile *pFile = (vfs::IBaseFile*)hFile;
|
||||
if(pFile && (s_mapFiles[pFile].op == SOperation::READ))
|
||||
{
|
||||
vfs::tReadableFile *pRF = vfs::tReadableFile::Cast(pFile);
|
||||
vfs::tReadableFile *pRF = vfs::tReadableFile::cast(pFile);
|
||||
if(pRF)
|
||||
{
|
||||
UINT32 uiBytesRead;
|
||||
bSuccess = pRF->Read((vfs::Byte*)pDest, uiBytesToRead, uiBytesRead);
|
||||
try
|
||||
{
|
||||
uiBytesRead = pRF->read((vfs::Byte*)pDest, uiBytesToRead);
|
||||
}
|
||||
catch(CBasicException& ex)
|
||||
{
|
||||
pRF->close();
|
||||
RETHROWEXCEPTION(L"", &ex);
|
||||
}
|
||||
|
||||
if(uiBytesToRead != uiBytesRead)
|
||||
{
|
||||
return FALSE;
|
||||
@@ -676,14 +699,10 @@ BOOLEAN FileRead( HWFILE hFile, PTR pDest, UINT32 uiBytesToRead, UINT32 *puiByte
|
||||
{
|
||||
*puiBytesRead = uiBytesRead;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
#ifdef JA2TESTVERSION
|
||||
//Add the time that we spent in this function to the total.
|
||||
uiTotalFileReadTime += GetJA2Clock() - uiStartTime;
|
||||
uiTotalFileReadCalls++;
|
||||
#endif
|
||||
return bSuccess;
|
||||
return FALSE;
|
||||
#else
|
||||
HANDLE hRealFile;
|
||||
DWORD dwNumBytesToRead, dwNumBytesRead;
|
||||
@@ -785,14 +804,27 @@ BOOLEAN FileRead( HWFILE hFile, PTR pDest, UINT32 uiBytesToRead, UINT32 *puiByte
|
||||
BOOLEAN FileWrite( HWFILE hFile, PTR pDest, UINT32 uiBytesToWrite, UINT32 *puiBytesWritten )
|
||||
{
|
||||
#ifdef USE_VFS
|
||||
if(uiBytesToWrite == 0)//dnl ch38 110909
|
||||
{
|
||||
*puiBytesWritten = 0;
|
||||
return(TRUE);
|
||||
}
|
||||
vfs::IBaseFile *pFile = (vfs::IBaseFile*)hFile;
|
||||
if(pFile && (s_mapFiles[pFile].op == SOperation::WRITE))
|
||||
{
|
||||
vfs::tWriteableFile *pWF = vfs::tWriteableFile::Cast(pFile);
|
||||
vfs::tWritableFile *pWF = vfs::tWritableFile::cast(pFile);
|
||||
if(pWF)
|
||||
{
|
||||
UINT32 uiBytesWritten;
|
||||
bool bSuccess = pWF->Write((vfs::Byte*)pDest, uiBytesToWrite, uiBytesWritten);
|
||||
try
|
||||
{
|
||||
uiBytesWritten = pWF->write((vfs::Byte*)pDest, uiBytesToWrite);
|
||||
}
|
||||
catch(CBasicException& ex)
|
||||
{
|
||||
pWF->close();
|
||||
RETHROWEXCEPTION(L"", &ex);
|
||||
}
|
||||
|
||||
if (uiBytesToWrite != uiBytesWritten)
|
||||
{
|
||||
@@ -802,7 +834,7 @@ BOOLEAN FileWrite( HWFILE hFile, PTR pDest, UINT32 uiBytesToWrite, UINT32 *puiBy
|
||||
{
|
||||
*puiBytesWritten = uiBytesWritten;
|
||||
}
|
||||
return bSuccess;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
@@ -868,12 +900,12 @@ BOOLEAN FileWrite( HWFILE hFile, PTR pDest, UINT32 uiBytesToWrite, UINT32 *puiBy
|
||||
BOOLEAN FileLoad( STR strFilename, PTR pDest, UINT32 uiBytesToRead, UINT32 *puiBytesRead )
|
||||
{
|
||||
#ifdef USE_VFS
|
||||
vfs::tReadableFile *pFile = GetVFS()->GetRFile(vfs::Path(strFilename));
|
||||
vfs::tReadableFile *pFile = getVFS()->getReadFile(vfs::Path(strFilename));
|
||||
vfs::COpenReadFile rfile(pFile);
|
||||
if(pFile)
|
||||
{
|
||||
UINT32 uiNumBytesRead;
|
||||
bool bSuccess = pFile->Read((vfs::Byte*)pDest,uiBytesToRead, uiNumBytesRead);
|
||||
pFile->Close();
|
||||
UINT32 uiNumBytesRead;
|
||||
TRYCATCH_RETHROW(uiNumBytesRead = pFile->read((vfs::Byte*)pDest,uiBytesToRead), L"");
|
||||
|
||||
if (uiBytesToRead != uiNumBytesRead)
|
||||
{
|
||||
@@ -884,7 +916,7 @@ BOOLEAN FileLoad( STR strFilename, PTR pDest, UINT32 uiBytesToRead, UINT32 *puiB
|
||||
*puiBytesRead = uiNumBytesRead;
|
||||
}
|
||||
CHECKF( uiNumBytesRead == uiBytesToRead );
|
||||
return bSuccess;
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
#else
|
||||
@@ -1038,18 +1070,20 @@ BOOLEAN FileSeek( HWFILE hFile, UINT32 uiDistance, UINT8 uiHow )
|
||||
|
||||
if(s_mapFiles[pFile].op == SOperation::WRITE)
|
||||
{
|
||||
vfs::tWriteableFile *pWF = vfs::tWriteableFile::Cast(pFile);
|
||||
vfs::tWritableFile *pWF = vfs::tWritableFile::cast(pFile);
|
||||
if(pWF)
|
||||
{
|
||||
return pWF->SetWriteLocation(iDistance, eSD);
|
||||
TRYCATCH_RETHROW(pWF->setWritePosition(iDistance, eSD), L"");
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
else if(s_mapFiles[pFile].op == SOperation::READ)
|
||||
{
|
||||
vfs::tReadableFile *pRF = vfs::tReadableFile::Cast(pFile);
|
||||
vfs::tReadableFile *pRF = vfs::tReadableFile::cast(pFile);
|
||||
if(pRF)
|
||||
{
|
||||
return pRF->SetReadLocation(iDistance, eSD);
|
||||
TRYCATCH_RETHROW(pRF->setReadPosition(iDistance, eSD), L"");
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1131,23 +1165,20 @@ INT32 FileGetPos( HWFILE hFile )
|
||||
{
|
||||
#ifdef USE_VFS
|
||||
vfs::IBaseFile *pFile = (vfs::IBaseFile*)hFile;
|
||||
if(pFile)
|
||||
if(pFile && (s_mapFiles[pFile].op == SOperation::WRITE))
|
||||
{
|
||||
if(pFile->IsWriteable())
|
||||
vfs::tWritableFile *pWF = vfs::tWritableFile::cast(pFile);
|
||||
if(pWF)
|
||||
{
|
||||
vfs::tWriteableFile *pWF = vfs::tWriteableFile::Cast(pFile);
|
||||
if(pWF)
|
||||
{
|
||||
return pWF->GetWriteLocation();
|
||||
}
|
||||
return pWF->getWritePosition();
|
||||
}
|
||||
else if(pFile->IsReadable())
|
||||
}
|
||||
else if(pFile && (s_mapFiles[pFile].op == SOperation::READ))
|
||||
{
|
||||
vfs::tReadableFile *pRF = vfs::tReadableFile::cast(pFile);
|
||||
if(pRF)
|
||||
{
|
||||
vfs::tReadableFile *pRF = vfs::tReadableFile::Cast(pFile);
|
||||
if(pRF)
|
||||
{
|
||||
return pRF->GetReadLocation();
|
||||
}
|
||||
return pRF->getReadPosition();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1221,7 +1252,7 @@ UINT32 FileGetSize( HWFILE hFile )
|
||||
vfs::IBaseFile *pFile = (vfs::IBaseFile*)hFile;
|
||||
if(pFile)
|
||||
{
|
||||
return pFile->GetFileSize();
|
||||
return pFile->getSize();
|
||||
}
|
||||
return 0;
|
||||
#else
|
||||
@@ -1568,17 +1599,45 @@ INT32 GetFilesInDirectory( HCONTAINER hStack, CHAR *pcDir, HANDLE hFile, WIN32_F
|
||||
|
||||
BOOLEAN SetFileManCurrentDirectory( STR pcDirectory )
|
||||
{
|
||||
#ifndef USE_VFS
|
||||
return( SetCurrentDirectory( pcDirectory ) );
|
||||
#else
|
||||
try
|
||||
{
|
||||
os::setCurrectDirectory(pcDirectory);
|
||||
}
|
||||
catch(CBasicException& ex)
|
||||
{
|
||||
logException(ex);
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN GetFileManCurrentDirectory( STRING512 pcDirectory )
|
||||
{
|
||||
#ifndef USE_VFS
|
||||
if (GetCurrentDirectory( 512, pcDirectory ) == 0)
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
return( TRUE );
|
||||
#else
|
||||
try
|
||||
{
|
||||
vfs::Path sDir;
|
||||
os::getCurrentDirectory(sDir);
|
||||
strncpy(pcDirectory, sDir.to_string().c_str(), 512);
|
||||
}
|
||||
catch(CBasicException& ex)
|
||||
{
|
||||
logException(ex);
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -1631,7 +1690,7 @@ BOOLEAN RemoveFileManDirectory( STRING512 pcDirectory, BOOLEAN fRecursive )
|
||||
{
|
||||
#ifdef USE_VFS
|
||||
// ignore 'recursive' flag, just delete every file in that subtree (but leave the directories)
|
||||
return GetVFS()->RemoveDirectoryFromFS(pcDirectory);
|
||||
return getVFS()->removeDirectoryFromFS(pcDirectory);
|
||||
#else
|
||||
WIN32_FIND_DATA sFindData;
|
||||
HANDLE SearchHandle;
|
||||
@@ -1721,7 +1780,7 @@ BOOLEAN EraseDirectory( STRING512 pcDirectory)
|
||||
{
|
||||
#ifdef USE_VFS
|
||||
// ignore 'recursive' flag, just delete every file in that subtree (but leave the directories)
|
||||
return GetVFS()->RemoveDirectoryFromFS(pcDirectory);
|
||||
return getVFS()->removeDirectoryFromFS(pcDirectory);
|
||||
#else
|
||||
WIN32_FIND_DATA sFindData;
|
||||
HANDLE SearchHandle;
|
||||
@@ -1780,6 +1839,12 @@ BOOLEAN EraseDirectory( STRING512 pcDirectory)
|
||||
|
||||
BOOLEAN GetExecutableDirectory( STRING512 pcDirectory )
|
||||
{
|
||||
#ifdef USE_VFS
|
||||
vfs::Path exe_dir, exe_file;
|
||||
os::getExecutablePath(exe_dir, exe_file);
|
||||
strncpy(pcDirectory, exe_dir.to_string().c_str(), 512);
|
||||
return true;
|
||||
#else
|
||||
SGPFILENAME ModuleFilename;
|
||||
UINT32 cnt;
|
||||
|
||||
@@ -1799,7 +1864,7 @@ BOOLEAN GetExecutableDirectory( STRING512 pcDirectory )
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
@@ -1812,20 +1877,19 @@ BOOLEAN GetFileFirst( CHAR8 * pSpec, GETFILESTRUCT *pGFStruct )
|
||||
CHECKF( pSpec != NULL );
|
||||
CHECKF( pGFStruct != NULL );
|
||||
|
||||
file_iter = GetVFS()->begin(pSpec);
|
||||
file_iter = getVFS()->begin(pSpec);
|
||||
if(!file_iter.end())
|
||||
{
|
||||
//vfs::Path const& path = file_iter.value()->GetFullPath();
|
||||
vfs::Path const& path = file_iter.value()->GetFileName();
|
||||
std::string s = path().utf8();
|
||||
utf8string::size_t size = s.length();
|
||||
size = std::min<unsigned int>(size,260-1);
|
||||
vfs::Path const& path = file_iter.value()->getName();
|
||||
std::string s = path.to_string();
|
||||
::size_t size = s.length();
|
||||
size = std::min< ::size_t>(size,260-1);
|
||||
sprintf( pGFStruct->zFileName, s.c_str());
|
||||
pGFStruct->zFileName[size] = 0;
|
||||
|
||||
pGFStruct->iFindHandle = 0;
|
||||
pGFStruct->uiFileSize = file_iter.value()->GetFileSize();
|
||||
pGFStruct->uiFileAttribs = ( file_iter.value()->IsWriteable() ? FILE_IS_NORMAL : FILE_IS_READONLY );
|
||||
pGFStruct->uiFileSize = file_iter.value()->getSize();
|
||||
pGFStruct->uiFileAttribs = ( file_iter.value()->implementsWritable() ? FILE_IS_NORMAL : FILE_IS_READONLY );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -1873,17 +1937,16 @@ BOOLEAN GetFileNext( GETFILESTRUCT *pGFStruct )
|
||||
}
|
||||
if(!file_iter.end())
|
||||
{
|
||||
//vfs::Path const& path = file_iter.value()->GetFullPath();
|
||||
vfs::Path const& path = file_iter.value()->GetFileName();
|
||||
std::string s = path().utf8();
|
||||
utf8string::size_t size = s.length();
|
||||
size = std::min<unsigned int>(size,260-1);
|
||||
vfs::Path const& path = file_iter.value()->getName();
|
||||
std::string s = path.to_string();
|
||||
::size_t size = s.length();
|
||||
size = std::min< ::size_t>(size,260-1);
|
||||
sprintf( pGFStruct->zFileName, s.c_str());
|
||||
pGFStruct->zFileName[size] = 0;
|
||||
|
||||
pGFStruct->iFindHandle = 0;
|
||||
pGFStruct->uiFileSize = file_iter.value()->GetFileSize();
|
||||
pGFStruct->uiFileAttribs = ( file_iter.value()->IsWriteable() ? FILE_IS_NORMAL : FILE_IS_READONLY );
|
||||
pGFStruct->uiFileSize = file_iter.value()->getSize();
|
||||
pGFStruct->uiFileAttribs = ( file_iter.value()->implementsWritable() ? FILE_IS_NORMAL : FILE_IS_READONLY );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -2142,29 +2205,27 @@ BOOLEAN FileClearAttributes( STR strFilename )
|
||||
BOOLEAN FileCheckEndOfFile( HWFILE hFile )
|
||||
{
|
||||
#ifdef USE_VFS
|
||||
UINT32 uiCurrentLocation, uiMaxLocation;
|
||||
vfs::size_t current_position, max_position;
|
||||
vfs::IBaseFile *pFile = (vfs::IBaseFile*)hFile;
|
||||
if(pFile)
|
||||
|
||||
if(pFile && (s_mapFiles[pFile].op == SOperation::WRITE))
|
||||
{
|
||||
if(pFile->IsWriteable())
|
||||
vfs::tWritableFile *pWF = vfs::tWritableFile::cast(pFile);
|
||||
if(pWF)
|
||||
{
|
||||
vfs::tWriteableFile *pWF = vfs::tWriteableFile::Cast(pFile);
|
||||
if(pWF)
|
||||
{
|
||||
uiCurrentLocation = pWF->GetWriteLocation();
|
||||
uiMaxLocation = pWF->GetFileSize();
|
||||
return uiCurrentLocation < uiMaxLocation;
|
||||
}
|
||||
current_position = pWF->getWritePosition();
|
||||
max_position = pWF->getSize();
|
||||
return current_position < max_position;
|
||||
}
|
||||
else if(pFile->IsReadable())
|
||||
}
|
||||
else if(pFile && (s_mapFiles[pFile].op == SOperation::READ))
|
||||
{
|
||||
vfs::tReadableFile *pRF = vfs::tReadableFile::cast(pFile);
|
||||
if(pRF)
|
||||
{
|
||||
vfs::tReadableFile *pRF = vfs::tReadableFile::Cast(pFile);
|
||||
if(pRF)
|
||||
{
|
||||
uiCurrentLocation = pRF->GetReadLocation();
|
||||
uiMaxLocation = pRF->GetFileSize();
|
||||
return uiCurrentLocation < uiMaxLocation;
|
||||
}
|
||||
current_position = pRF->getReadPosition();
|
||||
max_position = pRF->getSize();
|
||||
return current_position < max_position;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
@@ -2306,10 +2367,10 @@ INT32 CompareSGPFileTimes( SGP_FILETIME *pFirstFileTime, SGP_FILETIME *pSecondFi
|
||||
UINT32 FileSize(STR strFilename)
|
||||
{
|
||||
#ifdef USE_VFS
|
||||
vfs::IBaseFile *pFile = GetVFS()->GetFile(vfs::Path(strFilename));
|
||||
vfs::IBaseFile *pFile = getVFS()->getFile(vfs::Path(strFilename));
|
||||
if(pFile)
|
||||
{
|
||||
return pFile->GetFileSize();
|
||||
return pFile->getSize();
|
||||
}
|
||||
return 0;
|
||||
#else
|
||||
|
||||
@@ -232,15 +232,15 @@ void ShutdownMemoryManager( void )
|
||||
fclose( fp );
|
||||
#else
|
||||
CLog memLeak( L"MemLeakInfo.txt", true);
|
||||
memLeak.Endl().Endl();
|
||||
memLeak << ">>>>> MEMORY LEAK DETECTED!!! <<<<<" << CLog::endl;
|
||||
memLeak << " " << guiMemAlloced << " bytes memory total was allocated" << CLog::endl;
|
||||
memLeak << "- " << guiMemFreed << " bytes memory total was freed" << CLog::endl;
|
||||
memLeak << "_______________________________________________" << CLog::endl;
|
||||
memLeak << guiMemTotal << " bytes memory total STILL allocated" << CLog::endl;
|
||||
memLeak << MemDebugCounter << " memory blocks still allocated" << CLog::endl;
|
||||
memLeak << "guiScreenExitedFrom = " << gzJA2ScreenNames[ gMsgBox.uiExitScreen ] << CLog::endl;
|
||||
memLeak.Endl().Endl();
|
||||
memLeak.endl().endl();
|
||||
memLeak << ">>>>> MEMORY LEAK DETECTED!!! <<<<<" << CLog::ENDL;
|
||||
memLeak << " " << guiMemAlloced << " bytes memory total was allocated" << CLog::ENDL;
|
||||
memLeak << "- " << guiMemFreed << " bytes memory total was freed" << CLog::ENDL;
|
||||
memLeak << "_______________________________________________" << CLog::ENDL;
|
||||
memLeak << guiMemTotal << " bytes memory total STILL allocated" << CLog::ENDL;
|
||||
memLeak << MemDebugCounter << " memory blocks still allocated" << CLog::ENDL;
|
||||
memLeak << "guiScreenExitedFrom = " << gzJA2ScreenNames[ gMsgBox.uiExitScreen ] << CLog::ENDL;
|
||||
memLeak.endl().endl();
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -26,8 +26,8 @@ void LoadPalettedPNGImage(HIMAGE hImage, png::png_bytepp rows, png::png_infop in
|
||||
|
||||
void user_read_data(png::png_structp png_ptr, png::png_bytep data, png::png_size_t length)
|
||||
{
|
||||
vfs::UInt32 read;
|
||||
THROWIFFALSE( static_cast<vfs::tReadableFile*>(png_ptr->io_ptr)->Read((vfs::Byte*)data,length, read),"error during png file reading");
|
||||
TRYCATCH_RETHROW( static_cast<vfs::tReadableFile*>(png_ptr->io_ptr)->read((vfs::Byte*)data,length),
|
||||
L"error during png file reading");
|
||||
}
|
||||
|
||||
/*******************************************************************************/
|
||||
@@ -39,22 +39,22 @@ public:
|
||||
IndexedSTIImage();
|
||||
~IndexedSTIImage();
|
||||
|
||||
bool SetPalette(SGPPaletteEntry *pPal, int iSize);
|
||||
bool SetPalette(png::png_colorp pPal, int iSize);
|
||||
bool AddImage(UINT8 *data, UINT32 data_size, UINT32 image_width, UINT32 image_height, INT32 image_offset_x, INT32 image_offset_y, UINT8 *original_compressed=NULL, UINT32 original_compressed_size=0);
|
||||
bool setPalette(SGPPaletteEntry *pPal, int iSize);
|
||||
bool setPalette(png::png_colorp pPal, int iSize);
|
||||
bool addImage(UINT8 *data, UINT32 data_size, UINT32 image_width, UINT32 image_height, INT32 image_offset_x, INT32 image_offset_y, UINT8 *original_compressed=NULL, UINT32 original_compressed_size=0);
|
||||
|
||||
bool AddCompressedImage(UINT8 *data, UINT32 data_size, UINT32 image_width, UINT32 image_height, INT32 image_offset_x, INT32 image_offset_y);
|
||||
bool addCompressedImage(UINT8 *data, UINT32 data_size, UINT32 image_width, UINT32 image_height, INT32 image_offset_x, INT32 image_offset_y);
|
||||
|
||||
bool ReadAppDataFromXMLFile(HIMAGE hImage, vfs::tReadableFile* pFile);
|
||||
bool readAppDataFromXMLFile(HIMAGE hImage, vfs::tReadableFile* pFile);
|
||||
|
||||
bool WriteImage(vfs::tWriteableFile* pFile);
|
||||
bool WriteToHIMAGE(HIMAGE pImage);
|
||||
bool writeImage(vfs::tWritableFile* pFile);
|
||||
bool writeToHIMAGE(HIMAGE pImage);
|
||||
private:
|
||||
STCIHeader _header;
|
||||
STCIPaletteElement *_palette;
|
||||
int _pal_size;
|
||||
std::vector<STCISubImage> _images;
|
||||
std::vector<std::vector<UINT8> > _compressed_images;
|
||||
STCIHeader _header;
|
||||
STCIPaletteElement* _palette;
|
||||
int _pal_size;
|
||||
std::vector<STCISubImage> _images;
|
||||
std::vector<std::vector<UINT8> > _compressed_images;
|
||||
};
|
||||
|
||||
IndexedSTIImage::IndexedSTIImage()
|
||||
@@ -75,7 +75,7 @@ IndexedSTIImage::~IndexedSTIImage()
|
||||
}
|
||||
}
|
||||
|
||||
bool IndexedSTIImage::SetPalette(SGPPaletteEntry *pPal, int iSize)
|
||||
bool IndexedSTIImage::setPalette(SGPPaletteEntry *pPal, int iSize)
|
||||
{
|
||||
if(iSize < 0 ||iSize > 1024)
|
||||
{
|
||||
@@ -92,7 +92,7 @@ bool IndexedSTIImage::SetPalette(SGPPaletteEntry *pPal, int iSize)
|
||||
|
||||
return true;
|
||||
}
|
||||
bool IndexedSTIImage::SetPalette(png::png_colorp pPal, int iSize)
|
||||
bool IndexedSTIImage::setPalette(png::png_colorp pPal, int iSize)
|
||||
{
|
||||
if(iSize < 0 ||iSize > 1024)
|
||||
{
|
||||
@@ -109,7 +109,7 @@ bool IndexedSTIImage::SetPalette(png::png_colorp pPal, int iSize)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool IndexedSTIImage::AddCompressedImage(UINT8 *data, UINT32 data_size, UINT32 image_width, UINT32 image_height, INT32 image_offset_x, INT32 image_offset_y)
|
||||
bool IndexedSTIImage::addCompressedImage(UINT8 *data, UINT32 data_size, UINT32 image_width, UINT32 image_height, INT32 image_offset_x, INT32 image_offset_y)
|
||||
{
|
||||
if(!data || (data_size < 0) )
|
||||
{
|
||||
@@ -135,7 +135,7 @@ bool IndexedSTIImage::AddCompressedImage(UINT8 *data, UINT32 data_size, UINT32 i
|
||||
}
|
||||
|
||||
|
||||
bool IndexedSTIImage::AddImage(UINT8 *data, UINT32 data_size, UINT32 image_width, UINT32 image_height, INT32 image_offset_x, INT32 image_offset_y, UINT8 *original_compressed, UINT32 original_compressed_size)
|
||||
bool IndexedSTIImage::addImage(UINT8 *data, UINT32 data_size, UINT32 image_width, UINT32 image_height, INT32 image_offset_x, INT32 image_offset_y, UINT8 *original_compressed, UINT32 original_compressed_size)
|
||||
{
|
||||
if(!data || (data_size != image_width*image_height) )
|
||||
{
|
||||
@@ -236,7 +236,7 @@ bool IndexedSTIImage::AddImage(UINT8 *data, UINT32 data_size, UINT32 image_width
|
||||
|
||||
|
||||
|
||||
inline void SetFlag(UINT8 &flags, char const* sFlag)
|
||||
static inline void setFlag(UINT8 &flags, char const* sFlag)
|
||||
{
|
||||
/*0x01*/ if (strcmp(sFlag, "AUX_FULL_TILE") == 0) flags |= AUX_FULL_TILE;
|
||||
/*0x02*/ else if(strcmp(sFlag, "AUX_ANIMATED_TILE") == 0) flags |= AUX_ANIMATED_TILE;
|
||||
@@ -274,11 +274,11 @@ public:
|
||||
}
|
||||
virtual ~CAppDataParser() {};
|
||||
|
||||
virtual void OnStartElement(const XML_Char* name, const XML_Char** atts);
|
||||
virtual void OnEndElement(const XML_Char* name);
|
||||
virtual void OnTextElement(const XML_Char *str, int len);
|
||||
virtual void onStartElement(const XML_Char* name, const XML_Char** atts);
|
||||
virtual void onEndElement(const XML_Char* name);
|
||||
virtual void onTextElement(const XML_Char *str, int len);
|
||||
|
||||
void SetImage(HIMAGE hImage)
|
||||
void setImage(HIMAGE hImage)
|
||||
{
|
||||
m_hImage = hImage;
|
||||
if(m_hImage)
|
||||
@@ -307,7 +307,7 @@ private:
|
||||
int m_iCurrentIndex;
|
||||
};
|
||||
|
||||
void CAppDataParser::OnStartElement(const XML_Char* name, const XML_Char** atts)
|
||||
void CAppDataParser::onStartElement(const XML_Char* name, const XML_Char** atts)
|
||||
{
|
||||
if( current_state == DO_ELEMENT_NONE && strcmp(name, this->ElementName) == 0 )
|
||||
{
|
||||
@@ -316,7 +316,7 @@ void CAppDataParser::OnStartElement(const XML_Char* name, const XML_Char** atts)
|
||||
else if(current_state == DO_ELEMENT_ImageData && strcmp(name, "SubImage") == 0)
|
||||
{
|
||||
int index = -1;
|
||||
THROWIFFALSE(GetAttributeAsInt("index",atts,index), L"could not read attribute \"index\"");
|
||||
THROWIFFALSE(getAttributeAsInt("index",atts,index), L"could not read attribute \"index\"");
|
||||
m_iCurrentIndex = index;
|
||||
if(index >= (int)m_vAppData.size())
|
||||
{
|
||||
@@ -327,12 +327,12 @@ void CAppDataParser::OnStartElement(const XML_Char* name, const XML_Char** atts)
|
||||
else if(current_state == DO_ELEMENT_SubImage && strcmp(name, "offset") == 0)
|
||||
{
|
||||
int offset_x = 0, offset_y = 0;
|
||||
if(GetAttributeAsInt("x",atts,offset_x))
|
||||
if(getAttributeAsInt("x",atts,offset_x))
|
||||
{
|
||||
m_vAppData[m_iCurrentIndex].offset.x = offset_x;
|
||||
m_vAppData[m_iCurrentIndex].offset._override = true;
|
||||
}
|
||||
if(GetAttributeAsInt("y",atts,offset_y))
|
||||
if(getAttributeAsInt("y",atts,offset_y))
|
||||
{
|
||||
m_vAppData[m_iCurrentIndex].offset.y = offset_y;
|
||||
m_vAppData[m_iCurrentIndex].offset._override = true;
|
||||
@@ -349,7 +349,7 @@ void CAppDataParser::OnStartElement(const XML_Char* name, const XML_Char** atts)
|
||||
}
|
||||
else if(current_state == DO_ELEMENT_flags)
|
||||
{
|
||||
SetFlag(m_vAppData[m_iCurrentIndex].aux.fFlags, name);
|
||||
setFlag(m_vAppData[m_iCurrentIndex].aux.fFlags, name);
|
||||
}
|
||||
else if(current_state == DO_ELEMENT_AuxData &&
|
||||
( strcmp(name, "ubCurrentFrame") == 0 ||
|
||||
@@ -363,7 +363,7 @@ void CAppDataParser::OnStartElement(const XML_Char* name, const XML_Char** atts)
|
||||
}
|
||||
sCharData = "";
|
||||
}
|
||||
void CAppDataParser::OnEndElement(const XML_Char* name)
|
||||
void CAppDataParser::onEndElement(const XML_Char* name)
|
||||
{
|
||||
char *p;
|
||||
if( strcmp(name, "usTileLocIndex") == 0 && current_state == DO_ELEMENT_properties)
|
||||
@@ -434,7 +434,7 @@ void CAppDataParser::OnEndElement(const XML_Char* name)
|
||||
current_state = DO_ELEMENT_NONE;
|
||||
}
|
||||
}
|
||||
void CAppDataParser::OnTextElement(const XML_Char *str, int len)
|
||||
void CAppDataParser::onTextElement(const XML_Char *str, int len)
|
||||
{
|
||||
// handle only this special case; everything else does not matter for now
|
||||
if(current_state == DO_ELEMENT_properties)
|
||||
@@ -445,26 +445,34 @@ void CAppDataParser::OnTextElement(const XML_Char *str, int len)
|
||||
}
|
||||
|
||||
|
||||
bool IndexedSTIImage::ReadAppDataFromXMLFile(HIMAGE hImage, vfs::tReadableFile* pFile)
|
||||
bool IndexedSTIImage::readAppDataFromXMLFile(HIMAGE hImage, vfs::tReadableFile* pFile)
|
||||
{
|
||||
if(!pFile)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
vfs::COpenReadFile oFile(pFile);
|
||||
UINT32 uiSize = oFile.file().GetFileSize();
|
||||
std::vector<char> vBuffer(uiSize+1);
|
||||
std::vector<char> vBuffer;
|
||||
UINT32 uiSize = 0;
|
||||
try
|
||||
{
|
||||
vfs::COpenReadFile oFile(pFile);
|
||||
uiSize = oFile.file().getSize();
|
||||
vBuffer.resize(uiSize+1);
|
||||
|
||||
THROWIFFALSE(uiSize == oFile.file().read(&vBuffer[0],uiSize), L"Could not read XML file");
|
||||
vBuffer[uiSize] = 0;
|
||||
oFile.file().close();
|
||||
}
|
||||
catch(CBasicException& ex)
|
||||
{
|
||||
RETHROWEXCEPTION(L"", &ex);
|
||||
}
|
||||
|
||||
UINT32 uiHasRead;
|
||||
THROWIFFALSE( oFile.file().Read(&vBuffer[0],uiSize,uiHasRead) || (uiSize != uiHasRead), L"Could not read XML file");
|
||||
vBuffer[uiSize] = 0;
|
||||
oFile.file().Close();
|
||||
|
||||
XML_Parser parser = XML_ParserCreate(NULL);
|
||||
|
||||
CAppDataParser adp(parser);
|
||||
adp.GrabParser();
|
||||
adp.SetImage(hImage);
|
||||
adp.grabParser();
|
||||
adp.setImage(hImage);
|
||||
|
||||
try
|
||||
{
|
||||
@@ -472,7 +480,7 @@ bool IndexedSTIImage::ReadAppDataFromXMLFile(HIMAGE hImage, vfs::tReadableFile*
|
||||
{
|
||||
std::wstringstream wss;
|
||||
wss << L"XML Parser Error in Groups.xml: "
|
||||
<< utf8string(XML_ErrorString(XML_GetErrorCode(parser))).c_wcs().c_str()
|
||||
<< utf8string(XML_ErrorString(XML_GetErrorCode(parser))).c_wcs()
|
||||
<< L" at line "
|
||||
<< XML_GetCurrentLineNumber(parser);
|
||||
THROWEXCEPTION(wss.str().c_str());
|
||||
@@ -486,7 +494,7 @@ bool IndexedSTIImage::ReadAppDataFromXMLFile(HIMAGE hImage, vfs::tReadableFile*
|
||||
}
|
||||
|
||||
|
||||
bool IndexedSTIImage::WriteToHIMAGE(HIMAGE pImage)
|
||||
bool IndexedSTIImage::writeToHIMAGE(HIMAGE pImage)
|
||||
{
|
||||
if(!pImage)
|
||||
{
|
||||
@@ -617,7 +625,7 @@ public:
|
||||
{
|
||||
if(_file)
|
||||
{
|
||||
_file->Close();
|
||||
_file->close();
|
||||
}
|
||||
if(_struct && _info)
|
||||
{
|
||||
@@ -686,36 +694,21 @@ bool LoadPNGFileToImage(HIMAGE hImage, UINT16 fContents)
|
||||
|
||||
bool LoadJPCFileToImage(HIMAGE hImage, UINT16 fContents)
|
||||
{
|
||||
if(!GetVFS()->FileExists(hImage->ImageFile))
|
||||
if(!getVFS()->fileExists(hImage->ImageFile))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
vfs::COpenReadFile oFile(hImage->ImageFile);
|
||||
|
||||
vfs::CMemoryFile oBuffer("");
|
||||
THROWIFFALSE( oBuffer.CopyToBuffer(oFile.file()), L"Could not copy file to buffer");
|
||||
|
||||
//UINT32 uiSize = oFile.file().GetFileSize();
|
||||
//std::vector<UINT8> vBuffer(uiSize);
|
||||
|
||||
//UINT uiHasRead, uiHasWritten;
|
||||
//if( !oFile.file().Read(&vBuffer[0],uiSize,&uiHasRead) || uiHasRead != uiSize)
|
||||
//{
|
||||
// THROWEXCEPTION(L"could not load file content to buffer");
|
||||
//}
|
||||
|
||||
//oBuffer.OpenWrite();
|
||||
//if( !oBuffer.Write(&vBuffer[0],uiSize,&uiHasWritten) || uiSize != uiHasWritten)
|
||||
//{
|
||||
// THROWEXCEPTION(L"cound not write buffer content into memory file");
|
||||
//}
|
||||
oBuffer.Close();
|
||||
vfs::COpenReadFile oFile(hImage->ImageFile);
|
||||
TRYCATCH_RETHROW(oBuffer.copyToBuffer(oFile.file()), L"Could not copy file to buffer");
|
||||
oBuffer.close();
|
||||
|
||||
//vfs::CUncompressed7zLibrary oLib(&oFile.file(),"");
|
||||
ObjBlockAllocator<vfs::CLibFile> allocator(128);
|
||||
vfs::CUncompressed7zLibrary oLib(vfs::tReadableFile::Cast(&oBuffer),"",false, &allocator);
|
||||
vfs::CUncompressed7zLibrary oLib(vfs::tReadableFile::cast(&oBuffer),"",false, &allocator);
|
||||
|
||||
if(!oLib.Init())
|
||||
if(!oLib.init())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -735,7 +728,7 @@ bool LoadJPCFileToImage(HIMAGE hImage, UINT16 fContents)
|
||||
for(; !it.end(); it.next())
|
||||
{
|
||||
// check extension
|
||||
utf8string::str_t const& fname = it.value()->GetFileName()().c_wcs();
|
||||
utf8string::str_t const& fname = it.value()->getName().c_wcs();
|
||||
utf8string::size_t dot = fname.find_last_of(vfs::Const::DOT());
|
||||
if(dot != utf8string::str_t::npos)
|
||||
{
|
||||
@@ -756,7 +749,7 @@ bool LoadJPCFileToImage(HIMAGE hImage, UINT16 fContents)
|
||||
}
|
||||
else if (StrCmp::Equal(fname.substr(dot,fname.length()-dot), CONST_DOTXML) )
|
||||
{
|
||||
appdata_file = vfs::tReadableFile::Cast(it.value());
|
||||
appdata_file = vfs::tReadableFile::cast(it.value());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -767,7 +760,7 @@ bool LoadJPCFileToImage(HIMAGE hImage, UINT16 fContents)
|
||||
{
|
||||
try
|
||||
{
|
||||
LoadPngFile lpng( vfs::tReadableFile::Cast(vFiles[0]) );
|
||||
LoadPngFile lpng( vfs::tReadableFile::cast(vFiles[0]) );
|
||||
|
||||
bool bLoadS = lpng.Load();
|
||||
|
||||
@@ -799,7 +792,7 @@ bool LoadJPCFileToImage(HIMAGE hImage, UINT16 fContents)
|
||||
{
|
||||
std::wstringstream wss;
|
||||
wss << L"Loading PNG image from file '"
|
||||
<< oFile.file().GetFullPath()().c_wcs()
|
||||
<< oFile.file().getPath().c_wcs()
|
||||
<< L"' failed";
|
||||
RETHROWEXCEPTION(wss.str().c_str(),&ex);
|
||||
}
|
||||
@@ -817,10 +810,10 @@ bool LoadJPCFileToImage(HIMAGE hImage, UINT16 fContents)
|
||||
try
|
||||
{
|
||||
vfs::CMemoryFile oTempFile("");
|
||||
oTempFile.CopyToBuffer( *vfs::tReadableFile::Cast(*fit) );
|
||||
oTempFile.copyToBuffer( *vfs::tReadableFile::cast(*fit) );
|
||||
|
||||
// LoadPngFile lpng( vfs::tReadableFile::Cast(*fit) );
|
||||
LoadPngFile lpng( vfs::tReadableFile::Cast(&oTempFile) );
|
||||
// LoadPngFile lpng( vfs::tReadableFile::cast(*fit) );
|
||||
LoadPngFile lpng( vfs::tReadableFile::cast(&oTempFile) );
|
||||
|
||||
bool bLoadS = lpng.Load();
|
||||
if(bLoadS)
|
||||
@@ -830,7 +823,7 @@ bool LoadJPCFileToImage(HIMAGE hImage, UINT16 fContents)
|
||||
if(!bHasPalette)
|
||||
{
|
||||
THROWIFFALSE(lpng.Info()->num_palette == 256, L"size of palette is not 256");
|
||||
image.SetPalette(lpng.Info()->palette, lpng.Info()->num_palette);
|
||||
image.setPalette(lpng.Info()->palette, lpng.Info()->num_palette);
|
||||
bHasPalette = true;
|
||||
}
|
||||
UINT32 SIZE = lpng.Info()->height * lpng.Info()->width;
|
||||
@@ -839,12 +832,12 @@ bool LoadJPCFileToImage(HIMAGE hImage, UINT16 fContents)
|
||||
{
|
||||
memcpy(&data[i*lpng.Info()->width],lpng.Rows()[i],lpng.Info()->width);
|
||||
}
|
||||
image.AddImage(&data[0], SIZE, lpng.Info()->width, lpng.Info()->height, lpng.Info()->x_offset, lpng.Info()->y_offset);
|
||||
image.addImage(&data[0], SIZE, lpng.Info()->width, lpng.Info()->height, lpng.Info()->x_offset, lpng.Info()->y_offset);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::wstringstream wss;
|
||||
wss << L"PNG file '" << (*fit)->GetFileName()() << L" @ " << oFile.file().GetFullPath()() << L"' is not a paletted image";
|
||||
wss << L"PNG file '" << (*fit)->getName()() << L" @ " << oFile.file().getPath()() << L"' is not a paletted image";
|
||||
THROWEXCEPTION(wss.str().c_str());
|
||||
}
|
||||
}
|
||||
@@ -852,15 +845,15 @@ bool LoadJPCFileToImage(HIMAGE hImage, UINT16 fContents)
|
||||
catch(CBasicException& ex)
|
||||
{
|
||||
std::wstringstream wss;
|
||||
wss << L"Loading PNG image [" << findex << L"] from file '" << oFile.file().GetFullPath()().c_wcs() << L"' failed";
|
||||
wss << L"Loading PNG image [" << findex << L"] from file '" << oFile.file().getPath().c_wcs() << L"' failed";
|
||||
RETHROWEXCEPTION(wss.str().c_str(),&ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
bool success = image.WriteToHIMAGE(hImage);
|
||||
bool success = image.writeToHIMAGE(hImage);
|
||||
if(appdata_file)
|
||||
{
|
||||
success &= image.ReadAppDataFromXMLFile(hImage, appdata_file);
|
||||
success &= image.readAppDataFromXMLFile(hImage, appdata_file);
|
||||
}
|
||||
return success;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,80 @@
|
||||
#include "Random.h"
|
||||
#include <time.h>
|
||||
#include "debug control.h"
|
||||
|
||||
extern bool is_client;
|
||||
extern bool is_server;
|
||||
extern bool is_networked;
|
||||
|
||||
bool gfMPDebugOutputRandoms = false;
|
||||
|
||||
// OJW - 091024 - MP random syncing
|
||||
// need to syncronise the randomness of events in a multiplayer game on all clients
|
||||
UINT32 MPPreRandom( UINT32 uiRange )
|
||||
{
|
||||
UINT32 uiNum;
|
||||
if( uiRange == 0 )
|
||||
return 0;
|
||||
//Extract the current pregenerated number
|
||||
uiNum = guiPreRandomNums[ guiPreRandomIndex ] * uiRange / RAND_MAX % uiRange;
|
||||
|
||||
if (gfMPDebugOutputRandoms)
|
||||
{
|
||||
char tmpMPDbgString[512];
|
||||
sprintf(tmpMPDbgString,"MPPreRandom ( uiRange : %i , uiPreRandomIndex : %i , uiResult : %i )\n",uiRange, guiPreRandomIndex , uiNum );
|
||||
MPDebugMsg(tmpMPDbgString);
|
||||
}
|
||||
|
||||
//Go to the next index.
|
||||
guiPreRandomIndex++;
|
||||
|
||||
if (guiPreRandomIndex >= MAX_PREGENERATED_NUMS)
|
||||
guiPreRandomIndex = 0;
|
||||
|
||||
return uiNum;
|
||||
}
|
||||
|
||||
#ifdef BMP_RANDOM//dnl ch55 111009
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
UINT32 guiPreRandomIndex;
|
||||
UINT32 guiPreRandomNums[MAX_PREGENERATED_NUMS];
|
||||
|
||||
UINT32 GetRndNum(UINT32 maxnum)
|
||||
{
|
||||
if (is_networked && is_client)
|
||||
return MPPreRandom(maxnum);
|
||||
|
||||
static UINT32 rnd=0, cnt=0;
|
||||
POINT pt;
|
||||
|
||||
if(!(cnt++%RAND_MAX))
|
||||
{
|
||||
GetCursorPos(&pt);// Get cursor location
|
||||
srand(maxnum ^ rnd ^ pt.x ^ pt.y ^ GetTickCount());
|
||||
//SendFmtMsg("Random Number Generator Reinitialized.");
|
||||
//for(int l=0;l<100;l++)SendFmtMsg("%2d", Random(100));
|
||||
}
|
||||
if(maxnum == 0)
|
||||
return(0);
|
||||
rnd = rand();
|
||||
rnd <<= 11;
|
||||
rnd ^= rand();
|
||||
rnd <<= 7;
|
||||
rnd ^= rand();
|
||||
return(rnd % maxnum);
|
||||
}
|
||||
|
||||
void InitializeRandom(void)
|
||||
{
|
||||
// Pregenerate all of the random numbers.
|
||||
for(guiPreRandomIndex = 0; guiPreRandomIndex<MAX_PREGENERATED_NUMS; guiPreRandomIndex++)
|
||||
guiPreRandomNums[guiPreRandomIndex] = GetRndNum(0xFFFFFFFF);
|
||||
guiPreRandomIndex = 0;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
UINT32 guiPreRandomIndex = 0;
|
||||
std::vector<UINT32> guiPreRandomNums(MAX_PREGENERATED_NUMS, 0);
|
||||
@@ -17,3 +92,5 @@ void InitializeRandom()
|
||||
}
|
||||
guiPreRandomIndex = 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -41,7 +41,7 @@
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/D "_CRT_SECURE_NO_DEPRECATE""
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\Multiplayer;..\ext\libpng;..\ext\utf8\source;..\VFS"
|
||||
AdditionalIncludeDirectories="..\Multiplayer;..\ext\libpng;..\ext\utf8\source;..\ext\7z"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;NO_ZLIB_COMPRESSION"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
@@ -105,7 +105,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/D "_CRT_SECURE_NO_DEPRECATE""
|
||||
AdditionalIncludeDirectories="..\Multiplayer;..\ext\libpng;..\ext\utf8\source;..\VFS"
|
||||
AdditionalIncludeDirectories="..\Multiplayer;..\ext\libpng;..\ext\utf8\source;..\ext\7z"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;NO_ZLIB_COMPRESSION"
|
||||
RuntimeLibrary="0"
|
||||
RuntimeTypeInfo="false"
|
||||
@@ -166,7 +166,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/D "_CRT_SECURE_NO_DEPRECATE""
|
||||
AdditionalIncludeDirectories="..\Multiplayer;..\ext\libpng;..\ext\utf8\source;..\VFS"
|
||||
AdditionalIncludeDirectories="..\Multiplayer;..\ext\libpng;..\ext\utf8\source;..\ext\7z"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;NO_ZLIB_COMPRESSION"
|
||||
RuntimeLibrary="0"
|
||||
RuntimeTypeInfo="false"
|
||||
@@ -228,7 +228,7 @@
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/D "_CRT_SECURE_NO_DEPRECATE""
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\Multiplayer;..\ext\libpng;..\ext\utf8\source;..\VFS"
|
||||
AdditionalIncludeDirectories="..\Multiplayer;..\ext\libpng;..\ext\utf8\source;..\ext\7z"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;NO_ZLIB_COMPRESSION"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
@@ -267,6 +267,68 @@
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release_WithDebugInfo|Win32"
|
||||
OutputDirectory="$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="..\ja2_2005Express.vsprops"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/D "_CRT_SECURE_NO_DEPRECATE""
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\Multiplayer;..\ext\libpng;..\ext\utf8\source;..\ext\7z"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;NO_ZLIB_COMPRESSION"
|
||||
RuntimeLibrary="0"
|
||||
RuntimeTypeInfo="false"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
|
||||
@@ -268,6 +268,70 @@
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release_WithDebugInfo|Win32"
|
||||
OutputDirectory="..\lib\VS2008\$(ConfigurationName)"
|
||||
IntermediateDirectory="..\build\VS2008\$(ProjectName)_$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="..\ja2_VS2008.vsprops"
|
||||
CharacterSet="0"
|
||||
WholeProgramOptimization="0"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
EnableIntrinsicFunctions="true"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;NO_ZLIB_COMPRESSION"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="false"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,650 +0,0 @@
|
||||
# Microsoft Developer Studio Project File - Name="Standard Gaming Platform" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||
|
||||
CFG=Standard Gaming Platform - Win32 Debug Demo
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Standard Gaming Platform.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Standard Gaming Platform.mak" CFG="Standard Gaming Platform - Win32 Debug Demo"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "Standard Gaming Platform - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "Standard Gaming Platform - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "Standard Gaming Platform - Win32 Release with Debug Info" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "Standard Gaming Platform - Win32 Bounds Checker" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "Standard Gaming Platform - Win32 Debug Demo" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "Standard Gaming Platform - Win32 Release Demo" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "Standard Gaming Platform - Win32 Demo Release with Debug Info" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""$/Jagged Alliance 2/Development/Programming/Jagged Alliance 2/Build", AVAAAAAA"
|
||||
# PROP Scc_LocalPath "..\ja2\build"
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "Standard Gaming Platform - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir ".\Release"
|
||||
# PROP BASE Intermediate_Dir ".\Release"
|
||||
# PROP BASE Target_Dir "."
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir ".\Release"
|
||||
# PROP Intermediate_Dir ".\Release"
|
||||
# PROP Target_Dir "."
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
|
||||
# ADD CPP /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 /YX"JA2 SGP ALL.H" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "Standard Gaming Platform - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir ".\Debug"
|
||||
# PROP BASE Intermediate_Dir ".\Debug"
|
||||
# PROP BASE Target_Dir "."
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir ".\Debug"
|
||||
# PROP Intermediate_Dir ".\Debug"
|
||||
# PROP Target_Dir "."
|
||||
# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "..\Build" /I "..\TileEngine" /I "..\Tactical" /I "..\Utils" /I "..\strategic" /I "..\\" /I ".\\" /D "JA2_PRECOMPILED_HEADERS" /D "NO_ZLIB_COMPRESSION" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "_VTUNE_PROFILING" /D "XML_STATIC" /D "CINTERFACE" /FR /YX"JA2 SGP ALL.H" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "Standard Gaming Platform - Win32 Release with Debug Info"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release with Debug Info"
|
||||
# PROP BASE Intermediate_Dir "Release with Debug Info"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release with Debug Info"
|
||||
# PROP Intermediate_Dir "Release with Debug Info"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "\ja2\build" /I "\ja2\build\TileEngine" /I "\ja2\build\Tactical" /I "\ja2\build\Utils" /I "\ja2\build\strategic" /D "NDEBUG" /D "JA2" /D "WIN32" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W4 /GX /Zi /O2 /I "..\\" /I "..\TileEngine" /I "..\Tactical" /I "..\Utils" /I "..\strategic" /I ".\\" /D "NDEBUG" /D "RELEASE_WITH_DEBUG_INFO" /D "NO_ZLIB" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "JA2_PRECOMPILED_HEADERS" /D "NO_ZLIB_COMPRESSION" /D "_VTUNE_PROFILING" /D "XML_STATIC" /D "CINTERFACE" /YX"JA2 SGP ALL.H" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "Standard Gaming Platform - Win32 Bounds Checker"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Standar0"
|
||||
# PROP BASE Intermediate_Dir "Standar0"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Standar0"
|
||||
# PROP Intermediate_Dir "Standar0"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /GX /Z7 /Od /I "\ja2\build" /I "\ja2\build\TileEngine" /I "\ja2\build\Tactical" /I "\ja2\build\Utils" /I "\ja2\build\strategic" /D "_DEBUG" /D "JA2" /D "WIN32" /D "_WINDOWS" /FR /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "\ja2\build" /I "\ja2\build\TileEngine" /I "\ja2\build\Tactical" /I "\ja2\build\Utils" /I "\ja2\build\strategic" /D "_DEBUG" /D "BOUNDS_CHECKER" /D "NO_ZLIB" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "JA2_PRECOMPILED_HEADERS" /D "NO_ZLIB_COMPRESSION" /D "_VTUNE_PROFILING" /FR /YX"JA2 SGP ALL.H" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "Standard Gaming Platform - Win32 Debug Demo"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Standard"
|
||||
# PROP BASE Intermediate_Dir "Standard"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Standard"
|
||||
# PROP Intermediate_Dir "Standard"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /GX /Z7 /Od /I "\ja2\build" /I "\ja2\build\TileEngine" /I "\ja2\build\Tactical" /I "\ja2\build\Utils" /I "\ja2\build\strategic" /D "_DEBUG" /D "JA2" /D "WIN32" /D "_WINDOWS" /FR /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "\ja2\build" /I "\ja2\build\TileEngine" /I "\ja2\build\Tactical" /I "\ja2\build\Utils" /I "\ja2\build\strategic" /D "_DEBUG" /D "JA2DEMO" /D "NO_ZLIB" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "JA2_PRECOMPILED_HEADERS" /D "NO_ZLIB_COMPRESSION" /FR /YX"JA2 SGP ALL.H" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "Standard Gaming Platform - Win32 Release Demo"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Standar1"
|
||||
# PROP BASE Intermediate_Dir "Standar1"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Standar1"
|
||||
# PROP Intermediate_Dir "Standar1"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W4 /GX /Zi /O2 /I "\ja2\build" /I "\ja2\build\TileEngine" /I "\ja2\build\Tactical" /I "\ja2\build\Utils" /I "\ja2\build\strategic" /D "NDEBUG" /D "JA2" /D "WIN32" /D "_WINDOWS" /D "RELEASE_WITH_DEBUG_INFO" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W4 /GX /Zi /O2 /I "\ja2\build" /I "\ja2\build\TileEngine" /I "\ja2\build\Tactical" /I "\ja2\build\Utils" /I "\ja2\build\strategic" /D "RELEASE_WITH_DEBUG_INFO" /D "NDEBUG" /D "JA2DEMO" /D "NO_ZLIB" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "JA2_PRECOMPILED_HEADERS" /D "NO_ZLIB_COMPRESSION" /YX"JA2 SGP ALL.H" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "Standard Gaming Platform - Win32 Demo Release with Debug Info"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Standar2"
|
||||
# PROP BASE Intermediate_Dir "Standar2"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Standar2"
|
||||
# PROP Intermediate_Dir "Standar2"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W4 /GX /Zi /O2 /I "\ja2\build" /I "\ja2\build\TileEngine" /I "\ja2\build\Tactical" /I "\ja2\build\Utils" /I "\ja2\build\strategic" /D "NDEBUG" /D "JA2" /D "WIN32" /D "_WINDOWS" /D "RELEASE_WITH_DEBUG_INFO" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W4 /GX /Zi /O2 /I "..\\" /I "..\TileEngine" /I "..\Tactical" /I "..\Utils" /I "..\strategic" /I ".\\" /D "RELEASE_WITH_DEBUG_INFO" /D "NDEBUG" /D "JA2DEMO" /D "NO_ZLIB" /D "WIN32" /D "_WINDOWS" /D "JA2" /D "JA2_PRECOMPILED_HEADERS" /D "NO_ZLIB_COMPRESSION" /D "XML_STATIC" /D "CINTERFACE" /YX"JA2 SGP ALL.H" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "Standard Gaming Platform - Win32 Release"
|
||||
# Name "Standard Gaming Platform - Win32 Debug"
|
||||
# Name "Standard Gaming Platform - Win32 Release with Debug Info"
|
||||
# Name "Standard Gaming Platform - Win32 Bounds Checker"
|
||||
# Name "Standard Gaming Platform - Win32 Debug Demo"
|
||||
# Name "Standard Gaming Platform - Win32 Release Demo"
|
||||
# Name "Standard Gaming Platform - Win32 Demo Release with Debug Info"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Button Sound Control.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Button System.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Container.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Cursor Control.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\DbMan.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\DEBUG.cpp"
|
||||
|
||||
!IF "$(CFG)" == "Standard Gaming Platform - Win32 Release"
|
||||
|
||||
# ADD CPP /D "_DEBUG"
|
||||
|
||||
!ELSEIF "$(CFG)" == "Standard Gaming Platform - Win32 Debug"
|
||||
|
||||
!ELSEIF "$(CFG)" == "Standard Gaming Platform - Win32 Release with Debug Info"
|
||||
|
||||
# ADD BASE CPP /D "_DEBUG"
|
||||
# ADD CPP /D "_DEBUG"
|
||||
|
||||
!ELSEIF "$(CFG)" == "Standard Gaming Platform - Win32 Bounds Checker"
|
||||
|
||||
!ELSEIF "$(CFG)" == "Standard Gaming Platform - Win32 Debug Demo"
|
||||
|
||||
!ELSEIF "$(CFG)" == "Standard Gaming Platform - Win32 Release Demo"
|
||||
|
||||
# ADD BASE CPP /D "_DEBUG"
|
||||
# ADD CPP /D "_DEBUG"
|
||||
|
||||
!ELSEIF "$(CFG)" == "Standard Gaming Platform - Win32 Demo Release with Debug Info"
|
||||
|
||||
# ADD BASE CPP /D "_DEBUG"
|
||||
# ADD CPP /D "_DEBUG"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\DirectDraw Calls.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\DirectX Common.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\English.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ExceptionHandling.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\FileCat.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\FileMan.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Font.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\himage.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\impTGA.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\input.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Install.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\LibraryDataBase.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\line.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\MemMan.cpp"
|
||||
|
||||
!IF "$(CFG)" == "Standard Gaming Platform - Win32 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "Standard Gaming Platform - Win32 Debug"
|
||||
|
||||
# ADD CPP /D "_MEMMAN_DEBUG"
|
||||
|
||||
!ELSEIF "$(CFG)" == "Standard Gaming Platform - Win32 Release with Debug Info"
|
||||
|
||||
!ELSEIF "$(CFG)" == "Standard Gaming Platform - Win32 Bounds Checker"
|
||||
|
||||
# ADD BASE CPP /D "_MEMMAN_DEBUG"
|
||||
# ADD CPP /D "_MEMMAN_DEBUG"
|
||||
|
||||
!ELSEIF "$(CFG)" == "Standard Gaming Platform - Win32 Debug Demo"
|
||||
|
||||
# ADD BASE CPP /D "_MEMMAN_DEBUG"
|
||||
# ADD CPP /D "_MEMMAN_DEBUG"
|
||||
|
||||
!ELSEIF "$(CFG)" == "Standard Gaming Platform - Win32 Release Demo"
|
||||
|
||||
!ELSEIF "$(CFG)" == "Standard Gaming Platform - Win32 Demo Release with Debug Info"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\mousesystem.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Mutex Manager.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\PCX.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Random.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\readdir.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\RegInst.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\sgp.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\shading.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\soundman.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\STCI.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\stringicmp.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\timer.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\video.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\vobject.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\vobject_blitters.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\vsurface.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\WinFont.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\ddraw.lib"
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Button System.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\container.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Cursor Control.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\DbMan.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Debug.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\DirectDraw Calls.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\DirectX Common.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\english.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ExceptionHandling.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\FileCat.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\FileMan.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE="..\Utils\Font Control.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\font.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\gameloop.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\himage.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\imgfmt.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\impTGA.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Input.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Install.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\JA2 SGP ALL.H"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\jascreens.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\LibraryDataBase.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\line.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\local.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\MemMan.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\mousesystem.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\mousesystem_macros.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Mutex Manager.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\pcx.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\random.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\readdir.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\RegInst.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE="..\TileEngine\render dirty.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\screenids.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\SCREENS.H
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\sgp.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\shading.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\soundman.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\STCI.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\stringicmp.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\timer.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\TopicIDs.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\TopicOps.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\trle.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Types.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Video.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\video_private.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\vobject.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\vobject_blitters.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\vobject_private.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\vsurface.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\vsurface_private.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\WCheck.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\Winbart97.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\WinFont.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\WizShare.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\ZCONF.H"
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -33,6 +33,7 @@
|
||||
|
||||
#if defined( JA2 ) || defined( UTILS )
|
||||
typedef unsigned int UINT32;
|
||||
typedef __int64 INT64; // WANNE - BMP: Used for Big Maps
|
||||
typedef signed int INT32;
|
||||
#else
|
||||
typedef unsigned int UINT32;
|
||||
|
||||
@@ -95,11 +95,11 @@ HIMAGE CreateImage( SGPFILENAME ImageFile, UINT16 fContents )
|
||||
{
|
||||
#ifdef USE_VFS
|
||||
// see if there is a .jpc file first and when that fails, try .sti
|
||||
utf8string str(ImageFile);
|
||||
vfs::Path str(ImageFile);
|
||||
utf8string::str_t const& findext = str.c_wcs();
|
||||
utf8string::size_t dot = findext.find_last_of(vfs::Const::DOT());
|
||||
utf8string fname = findext.substr(0,dot).append(CONST_DOTJPC);
|
||||
if(GetVFS()->FileExists(fname))
|
||||
if(getVFS()->fileExists(fname))
|
||||
{
|
||||
iFileLoader = JPC_FILE_READER;
|
||||
strncpy(ImageFile, fname.utf8().c_str(), fname.length());
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user