mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
Merged New Inventory Project into main branch
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1871 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+3
-2
@@ -2089,7 +2089,6 @@ void Console::CreateNewBrush() {
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void Console::CreateCursor() {
|
void Console::CreateCursor() {
|
||||||
|
|
||||||
switch (m_dwCursorStyle) {
|
switch (m_dwCursorStyle) {
|
||||||
case CURSOR_STYLE_XTERM :
|
case CURSOR_STYLE_XTERM :
|
||||||
m_pCursor = (Cursor*)new XTermCursor(m_hWnd, m_hdcConsole, m_crCursorColor);
|
m_pCursor = (Cursor*)new XTermCursor(m_hWnd, m_hdcConsole, m_crCursorColor);
|
||||||
@@ -4135,7 +4134,8 @@ void Console::About()
|
|||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void Console::SendTextToConsole(const wchar_t *pszText) {
|
void Console::SendTextToConsole(const wchar_t *pszText)
|
||||||
|
{
|
||||||
|
|
||||||
if (!pszText || (wcslen(pszText) == 0)) return;
|
if (!pszText || (wcslen(pszText) == 0)) return;
|
||||||
|
|
||||||
@@ -4572,3 +4572,4 @@ BOOL WINAPI Console::CtrlHandler(DWORD dwCtrlType) {
|
|||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
<VisualStudioProject
|
<VisualStudioProject
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="8,00"
|
Version="8.00"
|
||||||
Name="Console_2005Express"
|
Name="Console_2005Express"
|
||||||
ProjectGUID="{F962CFA1-2215-4124-938F-253973A27591}"
|
ProjectGUID="{F962CFA1-2215-4124-938F-253973A27591}"
|
||||||
RootNamespace="Console"
|
RootNamespace="Console"
|
||||||
@@ -16,8 +16,8 @@
|
|||||||
<Configurations>
|
<Configurations>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="Debug|Win32"
|
Name="Debug|Win32"
|
||||||
OutputDirectory=".\Debug"
|
OutputDirectory="Debug"
|
||||||
IntermediateDirectory=".\Debug"
|
IntermediateDirectory="Debug"
|
||||||
ConfigurationType="4"
|
ConfigurationType="4"
|
||||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops;..\ja2_2005Express.vsprops;..\ja2_2005ExpressDebug.vsprops"
|
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops;..\ja2_2005Express.vsprops;..\ja2_2005ExpressDebug.vsprops"
|
||||||
UseOfMFC="0"
|
UseOfMFC="0"
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
AdditionalOptions="/D "_CRT_SECURE_NO_DEPRECATE"
"
|
AdditionalOptions="/D "_CRT_SECURE_NO_DEPRECATE""
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
FavorSizeOrSpeed="0"
|
FavorSizeOrSpeed="0"
|
||||||
AdditionalIncludeDirectories=""
|
AdditionalIncludeDirectories=""
|
||||||
@@ -102,8 +102,8 @@
|
|||||||
</Configuration>
|
</Configuration>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="Release|Win32"
|
Name="Release|Win32"
|
||||||
OutputDirectory=".\Release"
|
OutputDirectory="Release"
|
||||||
IntermediateDirectory=".\Release"
|
IntermediateDirectory="Release"
|
||||||
ConfigurationType="4"
|
ConfigurationType="4"
|
||||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops;..\ja2_2005Express.vsprops"
|
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops;..\ja2_2005Express.vsprops"
|
||||||
UseOfMFC="0"
|
UseOfMFC="0"
|
||||||
@@ -133,7 +133,6 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
AdditionalOptions="/D "_CRT_SECURE_NO_DEPRECATE""
|
|
||||||
Optimization="2"
|
Optimization="2"
|
||||||
InlineFunctionExpansion="1"
|
InlineFunctionExpansion="1"
|
||||||
AdditionalIncludeDirectories="c:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\src\mfc"
|
AdditionalIncludeDirectories="c:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\src\mfc"
|
||||||
@@ -185,6 +184,91 @@
|
|||||||
CommandLine=""
|
CommandLine=""
|
||||||
/>
|
/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="MapEditor|Win32"
|
||||||
|
OutputDirectory="MapEditor"
|
||||||
|
IntermediateDirectory="MapEditor"
|
||||||
|
ConfigurationType="4"
|
||||||
|
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops;..\ja2_2005Express.vsprops;..\ja2_2005ExpressEditor.vsprops"
|
||||||
|
UseOfMFC="0"
|
||||||
|
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||||
|
CharacterSet="0"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
PreprocessorDefinitions="_DEBUG"
|
||||||
|
MkTypLibCompatible="true"
|
||||||
|
SuppressStartupBanner="true"
|
||||||
|
TargetEnvironment="1"
|
||||||
|
TypeLibraryName=".\Debug/Console.tlb"
|
||||||
|
HeaderFileName=""
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
FavorSizeOrSpeed="0"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="1"
|
||||||
|
RuntimeTypeInfo="false"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
PrecompiledHeaderThrough="stdafx.h"
|
||||||
|
PrecompiledHeaderFile=".\Debug/Console.pch"
|
||||||
|
AssemblerListingLocation=".\Debug/"
|
||||||
|
ObjectFile=".\Debug/"
|
||||||
|
ProgramDataBaseFileName=".\Debug/"
|
||||||
|
WarningLevel="3"
|
||||||
|
SuppressStartupBanner="true"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
DisableSpecificWarnings="4100"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
PreprocessorDefinitions="_DEBUG"
|
||||||
|
Culture="1050"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
AdditionalDependencies="comctl32.lib"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
SuppressStartupBanner="true"
|
||||||
|
OutputFile=".\Debug/Console.bsc"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
</Configurations>
|
</Configurations>
|
||||||
<References>
|
<References>
|
||||||
</References>
|
</References>
|
||||||
|
|||||||
@@ -840,3 +840,4 @@ void FadeBlockCursor::FakeBlend() {
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -131,3 +131,4 @@ int CALLBACK CAboutDlg::DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,12 +2,10 @@
|
|||||||
#include "JA2 All.h"
|
#include "JA2 All.h"
|
||||||
#include "Credits.h"
|
#include "Credits.h"
|
||||||
#include "Encrypted File.h"
|
#include "Encrypted File.h"
|
||||||
//#include "Utils All.h"
|
|
||||||
#include "Language Defines.h"
|
#include "Language Defines.h"
|
||||||
#else
|
#else
|
||||||
#include "Types.h"
|
#include "Types.h"
|
||||||
#include "Credits.h"
|
#include "Credits.h"
|
||||||
//#include "Utils All.h"
|
|
||||||
#include "Language Defines.h"
|
#include "Language Defines.h"
|
||||||
#include "vsurface.h"
|
#include "vsurface.h"
|
||||||
#include "mousesystem.h"
|
#include "mousesystem.h"
|
||||||
@@ -960,7 +958,6 @@ BOOLEAN AddCreditNode( UINT32 uiType, UINT32 uiFlags, STR16 pString )
|
|||||||
|
|
||||||
void HandleCreditNodes()
|
void HandleCreditNodes()
|
||||||
{
|
{
|
||||||
UINT32 uiCurrentTime =GetJA2Clock();
|
|
||||||
CRDT_NODE *pCurrent=NULL;
|
CRDT_NODE *pCurrent=NULL;
|
||||||
CRDT_NODE *pTemp=NULL;
|
CRDT_NODE *pTemp=NULL;
|
||||||
|
|
||||||
@@ -1018,8 +1015,6 @@ void HandleCurrentCreditNode( CRDT_NODE *pCurrent )
|
|||||||
|
|
||||||
void HandleNode_Default( CRDT_NODE *pCurrent )
|
void HandleNode_Default( CRDT_NODE *pCurrent )
|
||||||
{
|
{
|
||||||
UINT32 uiCurrentTime =GetJA2Clock();
|
|
||||||
|
|
||||||
//if it is time to update the current node
|
//if it is time to update the current node
|
||||||
// if( ( uiCurrentTime - pCurrent->uiLastTime ) > guiCrdtNodeScrollSpeed )
|
// if( ( uiCurrentTime - pCurrent->uiLastTime ) > guiCrdtNodeScrollSpeed )
|
||||||
{
|
{
|
||||||
@@ -1105,13 +1100,10 @@ BOOLEAN DisplayCreditNode( CRDT_NODE *pCurrent )
|
|||||||
//return false from this function when there are no more items in the text file
|
//return false from this function when there are no more items in the text file
|
||||||
BOOLEAN GetNextCreditFromTextFile()
|
BOOLEAN GetNextCreditFromTextFile()
|
||||||
{
|
{
|
||||||
BOOLEAN fDone = FALSE;
|
|
||||||
UINT32 uiStringWidth = 20;
|
|
||||||
CHAR16 zOriginalString[512];
|
CHAR16 zOriginalString[512];
|
||||||
CHAR16 zString[512];
|
CHAR16 zString[512];
|
||||||
CHAR16 zCodes[512];
|
CHAR16 zCodes[512];
|
||||||
STR16 pzNewCode=NULL;
|
STR16 pzNewCode=NULL;
|
||||||
UINT32 uiCodeType = 0;
|
|
||||||
UINT32 uiNodeType = 0;
|
UINT32 uiNodeType = 0;
|
||||||
UINT32 uiStartLoc = 0;
|
UINT32 uiStartLoc = 0;
|
||||||
UINT32 uiFlags=0;
|
UINT32 uiFlags=0;
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ enum
|
|||||||
ITEMS_WEAPONS, FIRST_ITEMS_BUTTON = ITEMS_WEAPONS,
|
ITEMS_WEAPONS, FIRST_ITEMS_BUTTON = ITEMS_WEAPONS,
|
||||||
ITEMS_AMMO,
|
ITEMS_AMMO,
|
||||||
ITEMS_ARMOUR,
|
ITEMS_ARMOUR,
|
||||||
|
ITEMS_LBEGEAR,
|
||||||
ITEMS_EXPLOSIVES,
|
ITEMS_EXPLOSIVES,
|
||||||
ITEMS_EQUIPMENT1,
|
ITEMS_EQUIPMENT1,
|
||||||
ITEMS_EQUIPMENT2,
|
ITEMS_EQUIPMENT2,
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ void TerrainTileButtonRegionCallback(MOUSE_REGION *reg,INT32 reason);
|
|||||||
void ItemsWeaponsCallback(GUI_BUTTON *btn,INT32 reason);
|
void ItemsWeaponsCallback(GUI_BUTTON *btn,INT32 reason);
|
||||||
void ItemsAmmoCallback(GUI_BUTTON *btn,INT32 reason);
|
void ItemsAmmoCallback(GUI_BUTTON *btn,INT32 reason);
|
||||||
void ItemsArmourCallback(GUI_BUTTON *btn,INT32 reason);
|
void ItemsArmourCallback(GUI_BUTTON *btn,INT32 reason);
|
||||||
|
void ItemsLBECallback(GUI_BUTTON *btn,INT32 reason);
|
||||||
void ItemsExplosivesCallback(GUI_BUTTON *btn,INT32 reason);
|
void ItemsExplosivesCallback(GUI_BUTTON *btn,INT32 reason);
|
||||||
void ItemsEquipment1Callback(GUI_BUTTON *btn,INT32 reason);
|
void ItemsEquipment1Callback(GUI_BUTTON *btn,INT32 reason);
|
||||||
void ItemsEquipment2Callback(GUI_BUTTON *btn,INT32 reason);
|
void ItemsEquipment2Callback(GUI_BUTTON *btn,INT32 reason);
|
||||||
|
|||||||
@@ -701,6 +701,12 @@ void ItemsArmourCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
SetEditorItemsTaskbarMode( ITEMS_ARMOUR );
|
SetEditorItemsTaskbarMode( ITEMS_ARMOUR );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ItemsLBECallback(GUI_BUTTON *btn,INT32 reason)
|
||||||
|
{
|
||||||
|
if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
||||||
|
SetEditorItemsTaskbarMode( ITEMS_LBEGEAR );
|
||||||
|
}
|
||||||
|
|
||||||
void ItemsExplosivesCallback(GUI_BUTTON *btn,INT32 reason)
|
void ItemsExplosivesCallback(GUI_BUTTON *btn,INT32 reason)
|
||||||
{
|
{
|
||||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
||||||
|
|||||||
@@ -44,6 +44,10 @@ void SetEditorItemsTaskbarMode( UINT16 usNewMode )
|
|||||||
ClickEditorButton( ITEMS_ARMOUR );
|
ClickEditorButton( ITEMS_ARMOUR );
|
||||||
iEditorToolbarState = TBAR_MODE_ITEM_ARMOUR;
|
iEditorToolbarState = TBAR_MODE_ITEM_ARMOUR;
|
||||||
break;
|
break;
|
||||||
|
case ITEMS_LBEGEAR:
|
||||||
|
ClickEditorButton( ITEMS_LBEGEAR );
|
||||||
|
iEditorToolbarState = TBAR_MODE_ITEM_LBEGEAR;
|
||||||
|
break;
|
||||||
case ITEMS_EXPLOSIVES:
|
case ITEMS_EXPLOSIVES:
|
||||||
ClickEditorButton( ITEMS_EXPLOSIVES );
|
ClickEditorButton( ITEMS_EXPLOSIVES );
|
||||||
iEditorToolbarState = TBAR_MODE_ITEM_EXPLOSIVES;
|
iEditorToolbarState = TBAR_MODE_ITEM_EXPLOSIVES;
|
||||||
@@ -75,7 +79,6 @@ void SetEditorItemsTaskbarMode( UINT16 usNewMode )
|
|||||||
|
|
||||||
void SetEditorBuildingTaskbarMode( UINT16 usNewMode )
|
void SetEditorBuildingTaskbarMode( UINT16 usNewMode )
|
||||||
{
|
{
|
||||||
BOOLEAN fNewGroup = FALSE;
|
|
||||||
BOOLEAN fNewRoofs, fNewWalls, fNewRoomInfo;
|
BOOLEAN fNewRoofs, fNewWalls, fNewRoomInfo;
|
||||||
if( usNewMode == usCurrentMode )
|
if( usNewMode == usCurrentMode )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -565,9 +565,13 @@ void InitEditorItemsToolbar()
|
|||||||
CreateTextButton(L"Armour",(UINT16)BLOCKFONT, FONT_MCOLOR_DKWHITE, FONT_BLACK, BUTTON_USE_DEFAULT,
|
CreateTextButton(L"Armour",(UINT16)BLOCKFONT, FONT_MCOLOR_DKWHITE, FONT_BLACK, BUTTON_USE_DEFAULT,
|
||||||
iScreenWidthOffset + 199, 2 * iScreenHeightOffset + 440, 52, 20, BUTTON_TOGGLE,MSYS_PRIORITY_NORMAL,DEFAULT_MOVE_CALLBACK,
|
iScreenWidthOffset + 199, 2 * iScreenHeightOffset + 440, 52, 20, BUTTON_TOGGLE,MSYS_PRIORITY_NORMAL,DEFAULT_MOVE_CALLBACK,
|
||||||
ItemsArmourCallback);
|
ItemsArmourCallback);
|
||||||
|
iEditorButton[ITEMS_LBEGEAR] =
|
||||||
|
CreateTextButton(L"LBE",(UINT16)BLOCKFONT, FONT_MCOLOR_DKWHITE, FONT_BLACK, BUTTON_USE_DEFAULT,
|
||||||
|
iScreenWidthOffset + 251, 2 * iScreenHeightOffset + 440, 30, 20, BUTTON_TOGGLE,MSYS_PRIORITY_NORMAL,DEFAULT_MOVE_CALLBACK,
|
||||||
|
ItemsLBECallback);
|
||||||
iEditorButton[ITEMS_EXPLOSIVES] =
|
iEditorButton[ITEMS_EXPLOSIVES] =
|
||||||
CreateTextButton(L"Explosives",(UINT16)BLOCKFONT, FONT_MCOLOR_DKWHITE, FONT_BLACK, BUTTON_USE_DEFAULT,
|
CreateTextButton(L"Exp",(UINT16)BLOCKFONT, FONT_MCOLOR_DKWHITE, FONT_BLACK, BUTTON_USE_DEFAULT,
|
||||||
iScreenWidthOffset + 251, 2 * iScreenHeightOffset + 440, 69, 20, BUTTON_TOGGLE,MSYS_PRIORITY_NORMAL,DEFAULT_MOVE_CALLBACK,
|
iScreenWidthOffset + 281, 2 * iScreenHeightOffset + 440, 39, 20, BUTTON_TOGGLE,MSYS_PRIORITY_NORMAL,DEFAULT_MOVE_CALLBACK,
|
||||||
ItemsExplosivesCallback);
|
ItemsExplosivesCallback);
|
||||||
iEditorButton[ITEMS_EQUIPMENT1] =
|
iEditorButton[ITEMS_EQUIPMENT1] =
|
||||||
CreateTextButton(L"E1",(UINT16)BLOCKFONT, FONT_MCOLOR_DKWHITE, FONT_BLACK, BUTTON_USE_DEFAULT,
|
CreateTextButton(L"E1",(UINT16)BLOCKFONT, FONT_MCOLOR_DKWHITE, FONT_BLACK, BUTTON_USE_DEFAULT,
|
||||||
|
|||||||
@@ -704,27 +704,27 @@ void BuildTriggerName( OBJECTTYPE *pItem, STR16 szItemName )
|
|||||||
{
|
{
|
||||||
if( pItem->usItem == SWITCH )
|
if( pItem->usItem == SWITCH )
|
||||||
{
|
{
|
||||||
if( pItem->ItemData.Trigger.BombTrigger.bFrequency == PANIC_FREQUENCY )
|
if( (*pItem)[0]->data.misc.bFrequency == PANIC_FREQUENCY )
|
||||||
swprintf( szItemName, L"Panic Trigger1" );
|
swprintf( szItemName, L"Panic Trigger1" );
|
||||||
else if( pItem->ItemData.Trigger.BombTrigger.bFrequency == PANIC_FREQUENCY_2 )
|
else if( (*pItem)[0]->data.misc.bFrequency == PANIC_FREQUENCY_2 )
|
||||||
swprintf( szItemName, L"Panic Trigger2" );
|
swprintf( szItemName, L"Panic Trigger2" );
|
||||||
else if( pItem->ItemData.Trigger.BombTrigger.bFrequency == PANIC_FREQUENCY_3 )
|
else if( (*pItem)[0]->data.misc.bFrequency == PANIC_FREQUENCY_3 )
|
||||||
swprintf( szItemName, L"Panic Trigger3" );
|
swprintf( szItemName, L"Panic Trigger3" );
|
||||||
else
|
else
|
||||||
swprintf( szItemName, L"Trigger%d", pItem->ItemData.Trigger.BombTrigger.bFrequency - 50 );
|
swprintf( szItemName, L"Trigger%d", (*pItem)[0]->data.misc.bFrequency - 50 );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ //action item
|
{ //action item
|
||||||
if( pItem->ItemData.Trigger.bDetonatorType == BOMB_PRESSURE )
|
if( (*pItem)[0]->data.misc.bDetonatorType == BOMB_PRESSURE )
|
||||||
swprintf( szItemName, L"Pressure Action" );
|
swprintf( szItemName, L"Pressure Action" );
|
||||||
else if( pItem->ItemData.Trigger.BombTrigger.bFrequency == PANIC_FREQUENCY )
|
else if( (*pItem)[0]->data.misc.bFrequency == PANIC_FREQUENCY )
|
||||||
swprintf( szItemName, L"Panic Action1" );
|
swprintf( szItemName, L"Panic Action1" );
|
||||||
else if( pItem->ItemData.Trigger.BombTrigger.bFrequency == PANIC_FREQUENCY_2 )
|
else if( (*pItem)[0]->data.misc.bFrequency == PANIC_FREQUENCY_2 )
|
||||||
swprintf( szItemName, L"Panic Action2" );
|
swprintf( szItemName, L"Panic Action2" );
|
||||||
else if( pItem->ItemData.Trigger.BombTrigger.bFrequency == PANIC_FREQUENCY_3 )
|
else if( (*pItem)[0]->data.misc.bFrequency == PANIC_FREQUENCY_3 )
|
||||||
swprintf( szItemName, L"Panic Action3" );
|
swprintf( szItemName, L"Panic Action3" );
|
||||||
else
|
else
|
||||||
swprintf( szItemName, L"Action%d", pItem->ItemData.Trigger.BombTrigger.bFrequency - 50 );
|
swprintf( szItemName, L"Action%d", (*pItem)[0]->data.misc.bFrequency - 50 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -818,7 +818,7 @@ void RenderSelectedItemBlownUp()
|
|||||||
}
|
}
|
||||||
else if( Item[ gpItem->usItem ].usItemClass == IC_KEY )
|
else if( Item[ gpItem->usItem ].usItemClass == IC_KEY )
|
||||||
{
|
{
|
||||||
swprintf( szItemName, L"%S", LockTable[ gpItem->ItemData.Key.ubKeyID ].ubEditorName );
|
swprintf( szItemName, L"%S", LockTable[ (*gpItem)[0]->data.key.ubKeyID ].ubEditorName );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -842,7 +842,7 @@ void RenderSelectedItemBlownUp()
|
|||||||
|
|
||||||
//Count the number of items in the current pool, and display that.
|
//Count the number of items in the current pool, and display that.
|
||||||
i = 0;
|
i = 0;
|
||||||
GetItemPool( gsItemGridNo, &pItemPool, 0 );
|
GetItemPoolFromGround( gsItemGridNo, &pItemPool );
|
||||||
Assert( pItemPool );
|
Assert( pItemPool );
|
||||||
while( pItemPool )
|
while( pItemPool )
|
||||||
{
|
{
|
||||||
@@ -871,15 +871,15 @@ void RenderEditorInfo( )
|
|||||||
{
|
{
|
||||||
CHAR16 FPSText[ 50 ];
|
CHAR16 FPSText[ 50 ];
|
||||||
static INT32 iSpewWarning = 0;
|
static INT32 iSpewWarning = 0;
|
||||||
UINT16 uiMapIndex;
|
INT16 iMapIndex;
|
||||||
|
|
||||||
SetFont( FONT12POINT1 );
|
SetFont( FONT12POINT1 );
|
||||||
SetFontForeground( FONT_BLACK );
|
SetFontForeground( FONT_BLACK );
|
||||||
SetFontBackground( FONT_BLACK );
|
SetFontBackground( FONT_BLACK );
|
||||||
|
|
||||||
//Display the mapindex position
|
//Display the mapindex position
|
||||||
if( GetMouseMapPos( &uiMapIndex ) )
|
if( GetMouseMapPos( &iMapIndex ) )
|
||||||
swprintf( FPSText, L" (%d) ", uiMapIndex );
|
swprintf( FPSText, L" (%d) ", iMapIndex );
|
||||||
else
|
else
|
||||||
swprintf( FPSText, L" " );
|
swprintf( FPSText, L" " );
|
||||||
mprintfEditor( (UINT16)(iScreenWidthOffset + 50-StringPixLength( FPSText, FONT12POINT1 )/2), 2 * iScreenHeightOffset + 463, FPSText );
|
mprintfEditor( (UINT16)(iScreenWidthOffset + 50-StringPixLength( FPSText, FONT12POINT1 )/2), 2 * iScreenHeightOffset + 463, FPSText );
|
||||||
|
|||||||
+17
-17
@@ -113,13 +113,13 @@ BOOLEAN gfIgnoreUndoCmdsForLights = FALSE;
|
|||||||
typedef struct MapIndexBinaryTree
|
typedef struct MapIndexBinaryTree
|
||||||
{
|
{
|
||||||
struct MapIndexBinaryTree *left, *right;
|
struct MapIndexBinaryTree *left, *right;
|
||||||
UINT16 usMapIndex;
|
INT16 sMapIndex;
|
||||||
}MapIndexBinaryTree;
|
}MapIndexBinaryTree;
|
||||||
|
|
||||||
MapIndexBinaryTree *top = NULL;
|
MapIndexBinaryTree *top = NULL;
|
||||||
void ClearUndoMapIndexTree();
|
void ClearUndoMapIndexTree();
|
||||||
BOOLEAN AddMapIndexToTree( UINT16 usMapIndex );
|
BOOLEAN AddMapIndexToTree( INT16 sMapIndex );
|
||||||
void CheckMapIndexForMultiTileStructures( UINT16 usMapIndex );
|
void CheckMapIndexForMultiTileStructures( INT16 sMapIndex );
|
||||||
void CheckForMultiTilesInTreeAndAddToUndoList( MapIndexBinaryTree *node );
|
void CheckForMultiTilesInTreeAndAddToUndoList( MapIndexBinaryTree *node );
|
||||||
|
|
||||||
|
|
||||||
@@ -141,14 +141,14 @@ void ClearUndoMapIndexTree()
|
|||||||
DeleteTreeNode( &top );
|
DeleteTreeNode( &top );
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOLEAN AddMapIndexToTree( UINT16 usMapIndex )
|
BOOLEAN AddMapIndexToTree( INT16 sMapIndex )
|
||||||
{
|
{
|
||||||
MapIndexBinaryTree *curr, *parent;
|
MapIndexBinaryTree *curr, *parent;
|
||||||
if( !top )
|
if( !top )
|
||||||
{
|
{
|
||||||
top = (MapIndexBinaryTree*)MemAlloc( sizeof( MapIndexBinaryTree ) );
|
top = (MapIndexBinaryTree*)MemAlloc( sizeof( MapIndexBinaryTree ) );
|
||||||
Assert( top );
|
Assert( top );
|
||||||
top->usMapIndex = usMapIndex;
|
top->sMapIndex = sMapIndex;
|
||||||
top->left = NULL;
|
top->left = NULL;
|
||||||
top->right = NULL;
|
top->right = NULL;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@@ -161,21 +161,21 @@ BOOLEAN AddMapIndexToTree( UINT16 usMapIndex )
|
|||||||
while( curr )
|
while( curr )
|
||||||
{
|
{
|
||||||
parent = curr;
|
parent = curr;
|
||||||
if( curr->usMapIndex == usMapIndex ) //found a match, so stop
|
if( curr->sMapIndex == sMapIndex ) //found a match, so stop
|
||||||
return FALSE;
|
return FALSE;
|
||||||
//if the mapIndex is < node's mapIndex, then go left, else right
|
//if the mapIndex is < node's mapIndex, then go left, else right
|
||||||
curr = ( usMapIndex < curr->usMapIndex ) ? curr->left : curr->right;
|
curr = ( sMapIndex < curr->sMapIndex ) ? curr->left : curr->right;
|
||||||
}
|
}
|
||||||
//if we made it this far, then curr is null and parent is pointing
|
//if we made it this far, then curr is null and parent is pointing
|
||||||
//directly above.
|
//directly above.
|
||||||
//Create the new node and fill in the information.
|
//Create the new node and fill in the information.
|
||||||
curr = (MapIndexBinaryTree*)MemAlloc( sizeof( MapIndexBinaryTree ) );
|
curr = (MapIndexBinaryTree*)MemAlloc( sizeof( MapIndexBinaryTree ) );
|
||||||
Assert( curr );
|
Assert( curr );
|
||||||
curr->usMapIndex = usMapIndex;
|
curr->sMapIndex = sMapIndex;
|
||||||
curr->left = NULL;
|
curr->left = NULL;
|
||||||
curr->right = NULL;
|
curr->right = NULL;
|
||||||
//Now link the new node to the parent.
|
//Now link the new node to the parent.
|
||||||
if( curr->usMapIndex < parent->usMapIndex )
|
if( curr->sMapIndex < parent->sMapIndex )
|
||||||
parent->left = curr;
|
parent->left = curr;
|
||||||
else
|
else
|
||||||
parent->right = curr;
|
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
|
//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
|
//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).
|
//saved in the new binary tree (which only holds unique mapindex values).
|
||||||
if( GridNoOnVisibleWorldTile( (INT16)iMapIndex ) && AddMapIndexToTree( (UINT16)iMapIndex ) )
|
if( GridNoOnVisibleWorldTile( (INT16)iMapIndex ) && AddMapIndexToTree( (INT16)iMapIndex ) )
|
||||||
|
|
||||||
{
|
{
|
||||||
if( AddToUndoListCmd( iMapIndex, ++iCount ) )
|
if( AddToUndoListCmd( iMapIndex, ++iCount ) )
|
||||||
@@ -519,13 +519,13 @@ BOOLEAN AddToUndoListCmd( INT32 iMapIndex, INT32 iCmdCount )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CheckMapIndexForMultiTileStructures( UINT16 usMapIndex )
|
void CheckMapIndexForMultiTileStructures( INT16 sMapIndex )
|
||||||
{
|
{
|
||||||
STRUCTURE * pStructure;
|
STRUCTURE * pStructure;
|
||||||
UINT8 ubLoop;
|
UINT8 ubLoop;
|
||||||
INT32 iCoveredMapIndex;
|
INT32 iCoveredMapIndex;
|
||||||
|
|
||||||
pStructure = gpWorldLevelData[usMapIndex].pStructureHead;
|
pStructure = gpWorldLevelData[sMapIndex].pStructureHead;
|
||||||
while (pStructure)
|
while (pStructure)
|
||||||
{
|
{
|
||||||
if (pStructure->pDBStructureRef->pDBStructure->ubNumberOfTiles > 1)
|
if (pStructure->pDBStructureRef->pDBStructure->ubNumberOfTiles > 1)
|
||||||
@@ -535,7 +535,7 @@ void CheckMapIndexForMultiTileStructures( UINT16 usMapIndex )
|
|||||||
// for multi-tile structures we have to add, to the undo list, all the other tiles covered by the structure
|
// 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)
|
if (pStructure->fFlags & STRUCTURE_BASE_TILE)
|
||||||
{
|
{
|
||||||
iCoveredMapIndex = usMapIndex + pStructure->pDBStructureRef->ppTile[ubLoop]->sPosRelToBase;
|
iCoveredMapIndex = sMapIndex + pStructure->pDBStructureRef->ppTile[ubLoop]->sPosRelToBase;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -550,7 +550,7 @@ void CheckMapIndexForMultiTileStructures( UINT16 usMapIndex )
|
|||||||
|
|
||||||
void CheckForMultiTilesInTreeAndAddToUndoList( MapIndexBinaryTree *node )
|
void CheckForMultiTilesInTreeAndAddToUndoList( MapIndexBinaryTree *node )
|
||||||
{
|
{
|
||||||
CheckMapIndexForMultiTileStructures( node->usMapIndex );
|
CheckMapIndexForMultiTileStructures( node->sMapIndex );
|
||||||
if( node->left )
|
if( node->left )
|
||||||
CheckForMultiTilesInTreeAndAddToUndoList( node->left );
|
CheckForMultiTilesInTreeAndAddToUndoList( node->left );
|
||||||
if( node->right )
|
if( node->right )
|
||||||
@@ -590,7 +590,7 @@ BOOLEAN ExecuteUndoList( void )
|
|||||||
{
|
{
|
||||||
iUndoMapIndex = gpTileUndoStack->pData->iMapIndex;
|
iUndoMapIndex = gpTileUndoStack->pData->iMapIndex;
|
||||||
|
|
||||||
fExitGrid = ExitGridAtGridNo( (UINT16)iUndoMapIndex );
|
fExitGrid = ExitGridAtGridNo( (INT16)iUndoMapIndex );
|
||||||
|
|
||||||
// Find which map tile we are to "undo"
|
// Find which map tile we are to "undo"
|
||||||
if( gpTileUndoStack->pData->fLightSaved )
|
if( gpTileUndoStack->pData->fLightSaved )
|
||||||
@@ -632,11 +632,11 @@ BOOLEAN ExecuteUndoList( void )
|
|||||||
//hacking around this by erasing all cursors here.
|
//hacking around this by erasing all cursors here.
|
||||||
RemoveAllTopmostsOfTypeRange( iUndoMapIndex, FIRSTPOINTERS, FIRSTPOINTERS );
|
RemoveAllTopmostsOfTypeRange( iUndoMapIndex, FIRSTPOINTERS, FIRSTPOINTERS );
|
||||||
|
|
||||||
if( fExitGrid && !ExitGridAtGridNo( (UINT16)iUndoMapIndex ) )
|
if( fExitGrid && !ExitGridAtGridNo( (INT16)iUndoMapIndex ) )
|
||||||
{ //An exitgrid has been removed, so get rid of the associated indicator.
|
{ //An exitgrid has been removed, so get rid of the associated indicator.
|
||||||
RemoveTopmost( (UINT16)iUndoMapIndex, FIRSTPOINTERS8 );
|
RemoveTopmost( (UINT16)iUndoMapIndex, FIRSTPOINTERS8 );
|
||||||
}
|
}
|
||||||
else if( !fExitGrid && ExitGridAtGridNo( (UINT16)iUndoMapIndex ) )
|
else if( !fExitGrid && ExitGridAtGridNo( (INT16)iUndoMapIndex ) )
|
||||||
{ //An exitgrid has been added, so add the associated indicator
|
{ //An exitgrid has been added, so add the associated indicator
|
||||||
AddTopmostToTail( (UINT16)iUndoMapIndex, FIRSTPOINTERS8 );
|
AddTopmostToTail( (UINT16)iUndoMapIndex, FIRSTPOINTERS8 );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -120,13 +120,13 @@ void KillBuilding( UINT32 iMapIndex )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( GridNoOnVisibleWorldTile( (UINT16)( iMapIndex - WORLD_COLS ) ) )
|
if( GridNoOnVisibleWorldTile( (INT16)( iMapIndex - WORLD_COLS ) ) )
|
||||||
KillBuilding( iMapIndex - WORLD_COLS );
|
KillBuilding( iMapIndex - WORLD_COLS );
|
||||||
if( GridNoOnVisibleWorldTile( (UINT16)( iMapIndex + WORLD_COLS ) ) )
|
if( GridNoOnVisibleWorldTile( (INT16)( iMapIndex + WORLD_COLS ) ) )
|
||||||
KillBuilding( iMapIndex + WORLD_COLS );
|
KillBuilding( iMapIndex + WORLD_COLS );
|
||||||
if( GridNoOnVisibleWorldTile( (UINT16)( iMapIndex + 1 ) ) )
|
if( GridNoOnVisibleWorldTile( (INT16)( iMapIndex + 1 ) ) )
|
||||||
KillBuilding( iMapIndex + 1 );
|
KillBuilding( iMapIndex + 1 );
|
||||||
if( GridNoOnVisibleWorldTile( (UINT16)( iMapIndex - 1 ) ) )
|
if( GridNoOnVisibleWorldTile( (INT16)( iMapIndex - 1 ) ) )
|
||||||
KillBuilding( iMapIndex - 1 );
|
KillBuilding( iMapIndex - 1 );
|
||||||
|
|
||||||
if( gfBasement )
|
if( gfBasement )
|
||||||
@@ -763,3 +763,4 @@ void ExtractAndUpdateBuildingInfo()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ enum
|
|||||||
TBAR_MODE_ITEM_WEAPONS,
|
TBAR_MODE_ITEM_WEAPONS,
|
||||||
TBAR_MODE_ITEM_AMMO,
|
TBAR_MODE_ITEM_AMMO,
|
||||||
TBAR_MODE_ITEM_ARMOUR,
|
TBAR_MODE_ITEM_ARMOUR,
|
||||||
|
TBAR_MODE_ITEM_LBEGEAR,
|
||||||
TBAR_MODE_ITEM_EXPLOSIVES,
|
TBAR_MODE_ITEM_EXPLOSIVES,
|
||||||
TBAR_MODE_ITEM_EQUIPMENT1,
|
TBAR_MODE_ITEM_EQUIPMENT1,
|
||||||
TBAR_MODE_ITEM_EQUIPMENT2,
|
TBAR_MODE_ITEM_EQUIPMENT2,
|
||||||
@@ -262,3 +263,5 @@ extern BOOLEAN gfShowItemStatsPanel;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+116
-101
@@ -85,7 +85,7 @@ void BuildItemPoolList()
|
|||||||
KillItemPoolList();
|
KillItemPoolList();
|
||||||
for( i = 0; i < WORLD_MAX; i++ )
|
for( i = 0; i < WORLD_MAX; i++ )
|
||||||
{
|
{
|
||||||
if( GetItemPool( i, &temp , 0) )
|
if( GetItemPoolFromGround( i, &temp ) )
|
||||||
{
|
{
|
||||||
if( !pIPHead )
|
if( !pIPHead )
|
||||||
{
|
{
|
||||||
@@ -181,6 +181,9 @@ void EntryInitEditorItemsInfo()
|
|||||||
case IC_ARMOUR:
|
case IC_ARMOUR:
|
||||||
eInfo.sNumArmour++;
|
eInfo.sNumArmour++;
|
||||||
break;
|
break;
|
||||||
|
case IC_LBEGEAR:
|
||||||
|
eInfo.sLBEGear++;
|
||||||
|
break;
|
||||||
case IC_GRENADE:
|
case IC_GRENADE:
|
||||||
case IC_BOMB:
|
case IC_BOMB:
|
||||||
eInfo.sNumExplosives++;
|
eInfo.sNumExplosives++;
|
||||||
@@ -188,11 +191,11 @@ void EntryInitEditorItemsInfo()
|
|||||||
case IC_MEDKIT:
|
case IC_MEDKIT:
|
||||||
case IC_KIT:
|
case IC_KIT:
|
||||||
case IC_FACE:
|
case IC_FACE:
|
||||||
case IC_MISC:
|
|
||||||
case IC_MONEY:
|
case IC_MONEY:
|
||||||
if( eInfo.sNumEquipment1 < 30 )
|
|
||||||
eInfo.sNumEquipment1++;
|
eInfo.sNumEquipment1++;
|
||||||
else if( eInfo.sNumEquipment2 < 30 )
|
break;
|
||||||
|
case IC_MISC:
|
||||||
|
if( eInfo.sNumEquipment2 < eInfo.sNumEquipment3 )
|
||||||
eInfo.sNumEquipment2++;
|
eInfo.sNumEquipment2++;
|
||||||
else
|
else
|
||||||
eInfo.sNumEquipment3++;
|
eInfo.sNumEquipment3++;
|
||||||
@@ -265,6 +268,11 @@ void InitEditorItemsInfo(UINT32 uiItemType)
|
|||||||
eInfo.sScrollIndex = eInfo.sSaveArmourScrollIndex;
|
eInfo.sScrollIndex = eInfo.sSaveArmourScrollIndex;
|
||||||
eInfo.sSelItemIndex = eInfo.sSaveSelArmourIndex;
|
eInfo.sSelItemIndex = eInfo.sSaveSelArmourIndex;
|
||||||
break;
|
break;
|
||||||
|
case TBAR_MODE_ITEM_LBEGEAR:
|
||||||
|
eInfo.sNumItems = eInfo.sLBEGear;
|
||||||
|
eInfo.sScrollIndex = eInfo.sSaveLBEScrollIndex;
|
||||||
|
eInfo.sSelItemIndex = eInfo.sSaveSelLBEIndex;
|
||||||
|
break;
|
||||||
case TBAR_MODE_ITEM_EXPLOSIVES:
|
case TBAR_MODE_ITEM_EXPLOSIVES:
|
||||||
eInfo.sNumItems = eInfo.sNumExplosives;
|
eInfo.sNumItems = eInfo.sNumExplosives;
|
||||||
eInfo.sScrollIndex = eInfo.sSaveExplosivesScrollIndex;
|
eInfo.sScrollIndex = eInfo.sSaveExplosivesScrollIndex;
|
||||||
@@ -433,6 +441,9 @@ void InitEditorItemsInfo(UINT32 uiItemType)
|
|||||||
case IC_ARMOUR:
|
case IC_ARMOUR:
|
||||||
fTypeMatch = eInfo.uiItemType == TBAR_MODE_ITEM_ARMOUR;
|
fTypeMatch = eInfo.uiItemType == TBAR_MODE_ITEM_ARMOUR;
|
||||||
break;
|
break;
|
||||||
|
case IC_LBEGEAR:
|
||||||
|
fTypeMatch = eInfo.uiItemType == TBAR_MODE_ITEM_LBEGEAR;
|
||||||
|
break;
|
||||||
case IC_GRENADE:
|
case IC_GRENADE:
|
||||||
case IC_BOMB:
|
case IC_BOMB:
|
||||||
fTypeMatch = eInfo.uiItemType == TBAR_MODE_ITEM_EXPLOSIVES;
|
fTypeMatch = eInfo.uiItemType == TBAR_MODE_ITEM_EXPLOSIVES;
|
||||||
@@ -440,13 +451,13 @@ void InitEditorItemsInfo(UINT32 uiItemType)
|
|||||||
case IC_MEDKIT:
|
case IC_MEDKIT:
|
||||||
case IC_KIT:
|
case IC_KIT:
|
||||||
case IC_FACE:
|
case IC_FACE:
|
||||||
case IC_MISC:
|
|
||||||
case IC_MONEY:
|
case IC_MONEY:
|
||||||
|
fTypeMatch = eInfo.uiItemType == TBAR_MODE_ITEM_EQUIPMENT1;
|
||||||
|
break;
|
||||||
|
case IC_MISC:
|
||||||
if( usCounter == ACTION_ITEM || usCounter == SWITCH )
|
if( usCounter == ACTION_ITEM || usCounter == SWITCH )
|
||||||
break;
|
break;
|
||||||
if( iEquipCount < 30 )
|
if( iEquipCount < eInfo.sNumEquipment2 )
|
||||||
fTypeMatch = eInfo.uiItemType == TBAR_MODE_ITEM_EQUIPMENT1;
|
|
||||||
else if( iEquipCount < 60 )
|
|
||||||
fTypeMatch = eInfo.uiItemType == TBAR_MODE_ITEM_EQUIPMENT2;
|
fTypeMatch = eInfo.uiItemType == TBAR_MODE_ITEM_EQUIPMENT2;
|
||||||
else
|
else
|
||||||
fTypeMatch = eInfo.uiItemType == TBAR_MODE_ITEM_EQUIPMENT3;
|
fTypeMatch = eInfo.uiItemType == TBAR_MODE_ITEM_EQUIPMENT3;
|
||||||
@@ -683,6 +694,10 @@ void ClearEditorItemsInfo()
|
|||||||
eInfo.sSaveSelArmourIndex = eInfo.sSelItemIndex;
|
eInfo.sSaveSelArmourIndex = eInfo.sSelItemIndex;
|
||||||
eInfo.sSaveArmourScrollIndex = eInfo.sScrollIndex;
|
eInfo.sSaveArmourScrollIndex = eInfo.sScrollIndex;
|
||||||
break;
|
break;
|
||||||
|
case TBAR_MODE_ITEM_LBEGEAR:
|
||||||
|
eInfo.sSaveSelLBEIndex = eInfo.sSelItemIndex;
|
||||||
|
eInfo.sSaveLBEScrollIndex = eInfo.sScrollIndex;
|
||||||
|
break;
|
||||||
case TBAR_MODE_ITEM_EXPLOSIVES:
|
case TBAR_MODE_ITEM_EXPLOSIVES:
|
||||||
eInfo.sSaveSelExplosivesIndex = eInfo.sSelItemIndex;
|
eInfo.sSaveSelExplosivesIndex = eInfo.sSelItemIndex;
|
||||||
eInfo.sSaveExplosivesScrollIndex = eInfo.sScrollIndex;
|
eInfo.sSaveExplosivesScrollIndex = eInfo.sScrollIndex;
|
||||||
@@ -792,13 +807,13 @@ void HideItemCursor( INT32 iMapIndex )
|
|||||||
BOOLEAN TriggerAtGridNo( INT16 sGridNo )
|
BOOLEAN TriggerAtGridNo( INT16 sGridNo )
|
||||||
{
|
{
|
||||||
ITEM_POOL *pItemPool;
|
ITEM_POOL *pItemPool;
|
||||||
if( !GetItemPool( sGridNo, &pItemPool, 0 ) )
|
if( !GetItemPoolFromGround( sGridNo, &pItemPool ) )
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
while( pItemPool )
|
while( pItemPool )
|
||||||
{
|
{
|
||||||
if( gWorldItems[ pItemPool->iItemIndex ].o.usItem == SWITCH )
|
if( gWorldItems[ pItemPool->iItemIndex ].object.usItem == SWITCH )
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@@ -810,7 +825,6 @@ BOOLEAN TriggerAtGridNo( INT16 sGridNo )
|
|||||||
|
|
||||||
void AddSelectedItemToWorld( INT16 sGridNo )
|
void AddSelectedItemToWorld( INT16 sGridNo )
|
||||||
{
|
{
|
||||||
OBJECTTYPE tempObject;
|
|
||||||
OBJECTTYPE *pObject;
|
OBJECTTYPE *pObject;
|
||||||
INVTYPE *pItem;
|
INVTYPE *pItem;
|
||||||
ITEM_POOL *pItemPool;
|
ITEM_POOL *pItemPool;
|
||||||
@@ -823,17 +837,16 @@ void AddSelectedItemToWorld( INT16 sGridNo )
|
|||||||
//Extract the currently selected item.
|
//Extract the currently selected item.
|
||||||
SpecifyItemToEdit( NULL, -1 );
|
SpecifyItemToEdit( NULL, -1 );
|
||||||
|
|
||||||
//memset( &tempObject, 0, sizeof( OBJECTTYPE ) );
|
|
||||||
if( eInfo.uiItemType == TBAR_MODE_ITEM_KEYS )
|
if( eInfo.uiItemType == TBAR_MODE_ITEM_KEYS )
|
||||||
{
|
{
|
||||||
CreateKeyObject( &tempObject, 1, (UINT8)eInfo.sSelItemIndex );
|
CreateKeyObject( &gTempObject, 1, (UINT8)eInfo.sSelItemIndex );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CreateItem( eInfo.pusItemIndex[eInfo.sSelItemIndex], 100, &tempObject );
|
CreateItem( eInfo.pusItemIndex[eInfo.sSelItemIndex], 100, &gTempObject );
|
||||||
}
|
}
|
||||||
usFlags = 0;
|
usFlags = 0;
|
||||||
switch( tempObject.usItem )
|
switch( gTempObject.usItem )
|
||||||
{
|
{
|
||||||
case MINE:
|
case MINE:
|
||||||
if ( bVisibility == BURIED )
|
if ( bVisibility == BURIED )
|
||||||
@@ -844,11 +857,11 @@ void AddSelectedItemToWorld( INT16 sGridNo )
|
|||||||
case MONEY:
|
case MONEY:
|
||||||
case SILVER:
|
case SILVER:
|
||||||
case GOLD:
|
case GOLD:
|
||||||
tempObject.ItemData.Money.bMoneyStatus = 100;
|
gTempObject[0]->data.objectStatus = 100;
|
||||||
tempObject.ItemData.Money.uiMoneyAmount = 100 + Random( 19901 );
|
gTempObject[0]->data.money.uiMoneyAmount = 100 + Random( 19901 );
|
||||||
break;
|
break;
|
||||||
case OWNERSHIP:
|
case OWNERSHIP:
|
||||||
tempObject.ItemData.Owner.ubOwnerProfile = NO_PROFILE;
|
gTempObject[0]->data.owner.ubOwnerProfile = NO_PROFILE;
|
||||||
bVisibility = BURIED;
|
bVisibility = BURIED;
|
||||||
break;
|
break;
|
||||||
case SWITCH:
|
case SWITCH:
|
||||||
@@ -857,42 +870,42 @@ void AddSelectedItemToWorld( INT16 sGridNo )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
bVisibility = BURIED;
|
bVisibility = BURIED;
|
||||||
tempObject.ItemData.Trigger.bBombStatus = 100;
|
gTempObject[0]->data.objectStatus = 100;
|
||||||
tempObject.ItemData.Trigger.ubBombOwner = 1;
|
gTempObject[0]->data.misc.ubBombOwner = 1;
|
||||||
if( eInfo.sSelItemIndex < 2 )
|
if( eInfo.sSelItemIndex < 2 )
|
||||||
tempObject.ItemData.Trigger.BombTrigger.bFrequency = PANIC_FREQUENCY;
|
gTempObject[0]->data.misc.bFrequency = PANIC_FREQUENCY;
|
||||||
else if( eInfo.sSelItemIndex < 4 )
|
else if( eInfo.sSelItemIndex < 4 )
|
||||||
tempObject.ItemData.Trigger.BombTrigger.bFrequency = PANIC_FREQUENCY_2;
|
gTempObject[0]->data.misc.bFrequency = PANIC_FREQUENCY_2;
|
||||||
else if( eInfo.sSelItemIndex < 6 )
|
else if( eInfo.sSelItemIndex < 6 )
|
||||||
tempObject.ItemData.Trigger.BombTrigger.bFrequency = PANIC_FREQUENCY_3;
|
gTempObject[0]->data.misc.bFrequency = PANIC_FREQUENCY_3;
|
||||||
else
|
else
|
||||||
tempObject.ItemData.Trigger.BombTrigger.bFrequency = (INT8)(FIRST_MAP_PLACED_FREQUENCY + (eInfo.sSelItemIndex-4) / 2);
|
gTempObject[0]->data.misc.bFrequency = (INT8)(FIRST_MAP_PLACED_FREQUENCY + (eInfo.sSelItemIndex-4) / 2);
|
||||||
usFlags |= WORLD_ITEM_ARMED_BOMB;
|
usFlags |= WORLD_ITEM_ARMED_BOMB;
|
||||||
break;
|
break;
|
||||||
case ACTION_ITEM:
|
case ACTION_ITEM:
|
||||||
bVisibility = BURIED;
|
bVisibility = BURIED;
|
||||||
tempObject.ItemData.Trigger.bBombStatus = 100;
|
gTempObject[0]->data.objectStatus = 100;
|
||||||
tempObject.ItemData.Trigger.ubBombOwner = 1;
|
gTempObject[0]->data.misc.ubBombOwner = 1;
|
||||||
tempObject.bTrap = gbDefaultBombTrapLevel;
|
gTempObject[0]->data.bTrap = gbDefaultBombTrapLevel;
|
||||||
if( eInfo.sSelItemIndex < PRESSURE_ACTION_ID )
|
if( eInfo.sSelItemIndex < PRESSURE_ACTION_ID )
|
||||||
{
|
{
|
||||||
tempObject.ItemData.Trigger.bDetonatorType = BOMB_REMOTE;
|
gTempObject[0]->data.misc.bDetonatorType = BOMB_REMOTE;
|
||||||
if( eInfo.sSelItemIndex < 2 )
|
if( eInfo.sSelItemIndex < 2 )
|
||||||
tempObject.ItemData.Trigger.BombTrigger.bFrequency = PANIC_FREQUENCY;
|
gTempObject[0]->data.misc.bFrequency = PANIC_FREQUENCY;
|
||||||
else if( eInfo.sSelItemIndex < 4 )
|
else if( eInfo.sSelItemIndex < 4 )
|
||||||
tempObject.ItemData.Trigger.BombTrigger.bFrequency = PANIC_FREQUENCY_2;
|
gTempObject[0]->data.misc.bFrequency = PANIC_FREQUENCY_2;
|
||||||
else if( eInfo.sSelItemIndex < 6 )
|
else if( eInfo.sSelItemIndex < 6 )
|
||||||
tempObject.ItemData.Trigger.BombTrigger.bFrequency = PANIC_FREQUENCY_3;
|
gTempObject[0]->data.misc.bFrequency = PANIC_FREQUENCY_3;
|
||||||
else
|
else
|
||||||
tempObject.ItemData.Trigger.BombTrigger.bFrequency = (INT8)(FIRST_MAP_PLACED_FREQUENCY + (eInfo.sSelItemIndex-4) / 2);
|
gTempObject[0]->data.misc.bFrequency = (INT8)(FIRST_MAP_PLACED_FREQUENCY + (eInfo.sSelItemIndex-4) / 2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
tempObject.ItemData.Trigger.bDetonatorType = BOMB_PRESSURE;
|
gTempObject[0]->data.misc.bDetonatorType = BOMB_PRESSURE;
|
||||||
tempObject.ItemData.Trigger.BombTrigger.bDelay = 0;
|
gTempObject[0]->data.misc.bDelay = 0;
|
||||||
}
|
}
|
||||||
ChangeActionItem( &tempObject, gbActionItemIndex );
|
ChangeActionItem( &gTempObject, gbActionItemIndex );
|
||||||
tempObject.fFlags |= OBJECT_ARMED_BOMB;
|
gTempObject.fFlags |= OBJECT_ARMED_BOMB;
|
||||||
if( gbActionItemIndex == ACTIONITEM_SMPIT )
|
if( gbActionItemIndex == ACTIONITEM_SMPIT )
|
||||||
Add3X3Pit( sGridNo );
|
Add3X3Pit( sGridNo );
|
||||||
else if( gbActionItemIndex == ACTIONITEM_LGPIT )
|
else if( gbActionItemIndex == ACTIONITEM_LGPIT )
|
||||||
@@ -901,8 +914,8 @@ void AddSelectedItemToWorld( INT16 sGridNo )
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
pObject = InternalAddItemToPool( &sGridNo, &tempObject, bVisibility, 0, usFlags, 0, &iItemIndex );
|
pObject = InternalAddItemToPool( &sGridNo, &gTempObject, bVisibility, 0, usFlags, 0, -1, &iItemIndex );
|
||||||
if( tempObject.usItem != OWNERSHIP )
|
if( gTempObject.usItem != OWNERSHIP )
|
||||||
{
|
{
|
||||||
gWorldItems[ iItemIndex ].ubNonExistChance = (UINT8)(100 - giDefaultExistChance);
|
gWorldItems[ iItemIndex ].ubNonExistChance = (UINT8)(100 - giDefaultExistChance);
|
||||||
}
|
}
|
||||||
@@ -916,34 +929,34 @@ void AddSelectedItemToWorld( INT16 sGridNo )
|
|||||||
{
|
{
|
||||||
if (Random( 2 ))
|
if (Random( 2 ))
|
||||||
{
|
{
|
||||||
pObject->ItemData.Ammo.ubShotsLeft[0] = Magazine[ pItem->ubClassIndex ].ubMagSize;
|
(*pObject)[0]->data.ubShotsLeft = Magazine[ pItem->ubClassIndex ].ubMagSize;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pObject->ItemData.Ammo.ubShotsLeft[0] = (UINT8) Random( Magazine[ pItem->ubClassIndex ].ubMagSize );
|
(*pObject)[0]->data.ubShotsLeft = (UINT8) Random( Magazine[ pItem->ubClassIndex ].ubMagSize );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pObject->ItemData.Generic.bStatus[0] = (INT8)(70 + Random( 26 ));
|
(*pObject)[0]->data.objectStatus = (INT8)(70 + Random( 26 ));
|
||||||
}
|
}
|
||||||
if( pItem->usItemClass & IC_GUN )
|
if( pItem->usItemClass & IC_GUN )
|
||||||
{
|
{
|
||||||
if ( pObject->usItem == ROCKET_LAUNCHER )
|
if ( pObject->usItem == ROCKET_LAUNCHER )
|
||||||
{
|
{
|
||||||
pObject->ItemData.Gun.ubGunShotsLeft = 1;
|
(*pObject)[0]->data.gun.ubGunShotsLeft = 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pObject->ItemData.Gun.ubGunShotsLeft = (UINT8)(Random( Weapon[ pObject->usItem ].ubMagSize ));
|
(*pObject)[0]->data.gun.ubGunShotsLeft = (UINT8)(Random( Weapon[ pObject->usItem ].ubMagSize ));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !GetItemPool( sGridNo, &pItemPool, 0 ) )
|
if( !GetItemPoolFromGround( sGridNo, &pItemPool ) )
|
||||||
Assert( 0 );
|
Assert( 0 );
|
||||||
while( pItemPool )
|
while( pItemPool )
|
||||||
{
|
{
|
||||||
if( &(gWorldItems[ pItemPool->iItemIndex ].o) == pObject )
|
if( &(gWorldItems[ pItemPool->iItemIndex ].object) == pObject )
|
||||||
{
|
{
|
||||||
fFound = TRUE;
|
fFound = TRUE;
|
||||||
//ShowSelectedItem();
|
//ShowSelectedItem();
|
||||||
@@ -1004,10 +1017,10 @@ void HandleRightClickOnItem( INT16 sGridNo )
|
|||||||
pItemPool = gpItemPool->pNext;
|
pItemPool = gpItemPool->pNext;
|
||||||
if( !pItemPool )
|
if( !pItemPool )
|
||||||
{ //currently selected item was last node, so select the head node even if it is the same.
|
{ //currently selected item was last node, so select the head node even if it is the same.
|
||||||
GetItemPool( sGridNo, &pItemPool, 0 );
|
GetItemPoolFromGround( sGridNo, &pItemPool );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( !GetItemPool( sGridNo, &pItemPool, 0 ) )
|
else if( !GetItemPoolFromGround( sGridNo, &pItemPool ) )
|
||||||
{
|
{
|
||||||
//possibly relocate selected item to this gridno?
|
//possibly relocate selected item to this gridno?
|
||||||
return;
|
return;
|
||||||
@@ -1028,7 +1041,7 @@ void HandleRightClickOnItem( INT16 sGridNo )
|
|||||||
pIPCurr = pIPCurr->next;
|
pIPCurr = pIPCurr->next;
|
||||||
}
|
}
|
||||||
Assert( gpCurrItemPoolNode );
|
Assert( gpCurrItemPoolNode );
|
||||||
SpecifyItemToEdit( &gWorldItems[ gpItemPool->iItemIndex ].o, gpItemPool->sGridNo );
|
SpecifyItemToEdit( &gWorldItems[ gpItemPool->iItemIndex ].object, gpItemPool->sGridNo );
|
||||||
}
|
}
|
||||||
|
|
||||||
extern void DeleteSelectedMercsItem();
|
extern void DeleteSelectedMercsItem();
|
||||||
@@ -1048,15 +1061,15 @@ void DeleteSelectedItem()
|
|||||||
//save the mapindex
|
//save the mapindex
|
||||||
if( gpItemPool->pNext )
|
if( gpItemPool->pNext )
|
||||||
{
|
{
|
||||||
SpecifyItemToEdit( &gWorldItems[ gpItemPool->pNext->iItemIndex ].o, gpItemPool->sGridNo );
|
SpecifyItemToEdit( &gWorldItems[ gpItemPool->pNext->iItemIndex ].object, gpItemPool->sGridNo );
|
||||||
}
|
}
|
||||||
sGridNo = gpItemPool->sGridNo;
|
sGridNo = gpItemPool->sGridNo;
|
||||||
//remove the item
|
//remove the item
|
||||||
if( gWorldItems[ gpItemPool->iItemIndex ].o.usItem == ACTION_ITEM )
|
if( gWorldItems[ gpItemPool->iItemIndex ].object.usItem == ACTION_ITEM )
|
||||||
{
|
{
|
||||||
if( gWorldItems[ gpItemPool->iItemIndex ].o.ItemData.Trigger.bActionValue == ACTION_ITEM_SMALL_PIT )
|
if( gWorldItems[ gpItemPool->iItemIndex ].object[0]->data.misc.bActionValue == ACTION_ITEM_SMALL_PIT )
|
||||||
Remove3X3Pit( gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
Remove3X3Pit( gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||||
else if( gWorldItems[ gpItemPool->iItemIndex ].o.ItemData.Trigger.bActionValue == ACTION_ITEM_LARGE_PIT )
|
else if( gWorldItems[ gpItemPool->iItemIndex ].object[0]->data.misc.bActionValue == ACTION_ITEM_LARGE_PIT )
|
||||||
Remove5X5Pit( gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
Remove5X5Pit( gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||||
}
|
}
|
||||||
if( gpEditingItemPool == gpItemPool )
|
if( gpEditingItemPool == gpItemPool )
|
||||||
@@ -1064,7 +1077,7 @@ void DeleteSelectedItem()
|
|||||||
RemoveItemFromPool( sGridNo, gpItemPool->iItemIndex, 0 );
|
RemoveItemFromPool( sGridNo, gpItemPool->iItemIndex, 0 );
|
||||||
gpItemPool = NULL;
|
gpItemPool = NULL;
|
||||||
//determine if there are still any items at this location
|
//determine if there are still any items at this location
|
||||||
if( !GetItemPool( sGridNo, &gpItemPool , 0 ) )
|
if( !GetItemPoolFromGround( sGridNo, &gpItemPool ) )
|
||||||
{ //no items left, so remove the node from the list.
|
{ //no items left, so remove the node from the list.
|
||||||
IPListNode *pIPPrev, *pIPCurr;
|
IPListNode *pIPPrev, *pIPCurr;
|
||||||
pIPCurr = pIPHead;
|
pIPCurr = pIPHead;
|
||||||
@@ -1084,7 +1097,7 @@ void DeleteSelectedItem()
|
|||||||
gpCurrItemPoolNode = pIPHead;
|
gpCurrItemPoolNode = pIPHead;
|
||||||
if( gpCurrItemPoolNode )
|
if( gpCurrItemPoolNode )
|
||||||
{
|
{
|
||||||
GetItemPool( gpCurrItemPoolNode->sGridNo, &gpItemPool, 0 );
|
GetItemPoolFromGround( gpCurrItemPoolNode->sGridNo, &gpItemPool );
|
||||||
Assert( gpItemPool );
|
Assert( gpItemPool );
|
||||||
}
|
}
|
||||||
//remove node
|
//remove node
|
||||||
@@ -1134,9 +1147,9 @@ void SelectNextItemPool()
|
|||||||
else
|
else
|
||||||
gpCurrItemPoolNode = pIPHead;
|
gpCurrItemPoolNode = pIPHead;
|
||||||
//get the item pool at this node's gridno.
|
//get the item pool at this node's gridno.
|
||||||
GetItemPool( gpCurrItemPoolNode->sGridNo, &gpItemPool, 0 );
|
GetItemPoolFromGround( gpCurrItemPoolNode->sGridNo, &gpItemPool );
|
||||||
MarkMapIndexDirty( gpItemPool->sGridNo );
|
MarkMapIndexDirty( gpItemPool->sGridNo );
|
||||||
SpecifyItemToEdit( &gWorldItems[ gpItemPool->iItemIndex ].o, gpItemPool->sGridNo );
|
SpecifyItemToEdit( &gWorldItems[ gpItemPool->iItemIndex ].object, gpItemPool->sGridNo );
|
||||||
if( gsItemGridNo != -1 )
|
if( gsItemGridNo != -1 )
|
||||||
{
|
{
|
||||||
CenterScreenAtMapIndex( gsItemGridNo );
|
CenterScreenAtMapIndex( gsItemGridNo );
|
||||||
@@ -1153,9 +1166,9 @@ void SelectNextItemInPool()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GetItemPool( gpItemPool->sGridNo, &gpItemPool, 0 );
|
GetItemPoolFromGround( gpItemPool->sGridNo, &gpItemPool );
|
||||||
}
|
}
|
||||||
SpecifyItemToEdit( &gWorldItems[ gpItemPool->iItemIndex ].o, gpItemPool->sGridNo );
|
SpecifyItemToEdit( &gWorldItems[ gpItemPool->iItemIndex ].object, gpItemPool->sGridNo );
|
||||||
MarkWorldDirty();
|
MarkWorldDirty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1170,13 +1183,13 @@ void SelectPrevItemInPool()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GetItemPool( gpItemPool->sGridNo, &gpItemPool, 0 );
|
GetItemPoolFromGround( gpItemPool->sGridNo, &gpItemPool );
|
||||||
while( gpItemPool->pNext )
|
while( gpItemPool->pNext )
|
||||||
{
|
{
|
||||||
gpItemPool = gpItemPool->pNext;
|
gpItemPool = gpItemPool->pNext;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SpecifyItemToEdit( &gWorldItems[ gpItemPool->iItemIndex ].o, gpItemPool->sGridNo );
|
SpecifyItemToEdit( &gWorldItems[ gpItemPool->iItemIndex ].object, gpItemPool->sGridNo );
|
||||||
MarkWorldDirty();
|
MarkWorldDirty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1230,7 +1243,7 @@ void SelectNextItemOfType( UINT16 usItem )
|
|||||||
gpItemPool = gpItemPool->pNext;
|
gpItemPool = gpItemPool->pNext;
|
||||||
while( gpItemPool )
|
while( gpItemPool )
|
||||||
{
|
{
|
||||||
pObject = &gWorldItems[ gpItemPool->iItemIndex ].o;
|
pObject = &gWorldItems[ gpItemPool->iItemIndex ].object;
|
||||||
if( pObject->usItem == usItem )
|
if( pObject->usItem == usItem )
|
||||||
{
|
{
|
||||||
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||||
@@ -1246,10 +1259,10 @@ void SelectNextItemOfType( UINT16 usItem )
|
|||||||
}
|
}
|
||||||
while( curr )
|
while( curr )
|
||||||
{ //search to the end of the list
|
{ //search to the end of the list
|
||||||
GetItemPool( curr->sGridNo, &gpItemPool, 0 );
|
GetItemPoolFromGround( curr->sGridNo, &gpItemPool );
|
||||||
while( gpItemPool )
|
while( gpItemPool )
|
||||||
{
|
{
|
||||||
pObject = &gWorldItems[ gpItemPool->iItemIndex ].o;
|
pObject = &gWorldItems[ gpItemPool->iItemIndex ].object;
|
||||||
if( pObject->usItem == usItem )
|
if( pObject->usItem == usItem )
|
||||||
{
|
{
|
||||||
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||||
@@ -1264,10 +1277,10 @@ void SelectNextItemOfType( UINT16 usItem )
|
|||||||
curr = pIPHead;
|
curr = pIPHead;
|
||||||
while( curr )
|
while( curr )
|
||||||
{ //search to the end of the list
|
{ //search to the end of the list
|
||||||
GetItemPool( curr->sGridNo, &gpItemPool, 0 );
|
GetItemPoolFromGround( curr->sGridNo, &gpItemPool );
|
||||||
while( gpItemPool )
|
while( gpItemPool )
|
||||||
{
|
{
|
||||||
pObject = &gWorldItems[ gpItemPool->iItemIndex ].o;
|
pObject = &gWorldItems[ gpItemPool->iItemIndex ].object;
|
||||||
if( pObject->usItem == usItem )
|
if( pObject->usItem == usItem )
|
||||||
{
|
{
|
||||||
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||||
@@ -1294,8 +1307,8 @@ void SelectNextKeyOfType( UINT8 ubKeyID )
|
|||||||
gpItemPool = gpItemPool->pNext;
|
gpItemPool = gpItemPool->pNext;
|
||||||
while( gpItemPool )
|
while( gpItemPool )
|
||||||
{
|
{
|
||||||
pObject = &gWorldItems[ gpItemPool->iItemIndex ].o;
|
pObject = &gWorldItems[ gpItemPool->iItemIndex ].object;
|
||||||
if( Item[ pObject->usItem ].usItemClass == IC_KEY && pObject->ItemData.Key.ubKeyID == ubKeyID )
|
if( Item[ pObject->usItem ].usItemClass == IC_KEY && (*pObject)[0]->data.key.ubKeyID == ubKeyID )
|
||||||
{
|
{
|
||||||
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||||
CenterScreenAtMapIndex( gsItemGridNo );
|
CenterScreenAtMapIndex( gsItemGridNo );
|
||||||
@@ -1310,11 +1323,11 @@ void SelectNextKeyOfType( UINT8 ubKeyID )
|
|||||||
}
|
}
|
||||||
while( curr )
|
while( curr )
|
||||||
{ //search to the end of the list
|
{ //search to the end of the list
|
||||||
GetItemPool( curr->sGridNo, &gpItemPool, 0 );
|
GetItemPoolFromGround( curr->sGridNo, &gpItemPool );
|
||||||
while( gpItemPool )
|
while( gpItemPool )
|
||||||
{
|
{
|
||||||
pObject = &gWorldItems[ gpItemPool->iItemIndex ].o;
|
pObject = &gWorldItems[ gpItemPool->iItemIndex ].object;
|
||||||
if( Item[ pObject->usItem ].usItemClass == IC_KEY && pObject->ItemData.Key.ubKeyID == ubKeyID )
|
if( Item[ pObject->usItem ].usItemClass == IC_KEY && (*pObject)[0]->data.key.ubKeyID == ubKeyID )
|
||||||
{
|
{
|
||||||
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||||
CenterScreenAtMapIndex( gsItemGridNo );
|
CenterScreenAtMapIndex( gsItemGridNo );
|
||||||
@@ -1328,11 +1341,11 @@ void SelectNextKeyOfType( UINT8 ubKeyID )
|
|||||||
curr = pIPHead;
|
curr = pIPHead;
|
||||||
while( curr )
|
while( curr )
|
||||||
{ //search to the end of the list
|
{ //search to the end of the list
|
||||||
GetItemPool( curr->sGridNo, &gpItemPool, 0 );
|
GetItemPoolFromGround( curr->sGridNo, &gpItemPool );
|
||||||
while( gpItemPool )
|
while( gpItemPool )
|
||||||
{
|
{
|
||||||
pObject = &gWorldItems[ gpItemPool->iItemIndex ].o;
|
pObject = &gWorldItems[ gpItemPool->iItemIndex ].object;
|
||||||
if( Item[ pObject->usItem ].usItemClass == IC_KEY && pObject->ItemData.Key.ubKeyID == ubKeyID )
|
if( Item[ pObject->usItem ].usItemClass == IC_KEY && (*pObject)[0]->data.key.ubKeyID == ubKeyID )
|
||||||
{
|
{
|
||||||
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||||
CenterScreenAtMapIndex( gsItemGridNo );
|
CenterScreenAtMapIndex( gsItemGridNo );
|
||||||
@@ -1358,8 +1371,8 @@ void SelectNextTriggerWithFrequency( UINT16 usItem, INT8 bFrequency )
|
|||||||
gpItemPool = gpItemPool->pNext;
|
gpItemPool = gpItemPool->pNext;
|
||||||
while( gpItemPool )
|
while( gpItemPool )
|
||||||
{
|
{
|
||||||
pObject = &gWorldItems[ gpItemPool->iItemIndex ].o;
|
pObject = &gWorldItems[ gpItemPool->iItemIndex ].object;
|
||||||
if( pObject->usItem == usItem && pObject->ItemData.Trigger.BombTrigger.bFrequency == bFrequency )
|
if( pObject->usItem == usItem && (*pObject)[0]->data.misc.bFrequency == bFrequency )
|
||||||
{
|
{
|
||||||
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||||
CenterScreenAtMapIndex( gsItemGridNo );
|
CenterScreenAtMapIndex( gsItemGridNo );
|
||||||
@@ -1374,11 +1387,11 @@ void SelectNextTriggerWithFrequency( UINT16 usItem, INT8 bFrequency )
|
|||||||
}
|
}
|
||||||
while( curr )
|
while( curr )
|
||||||
{ //search to the end of the list
|
{ //search to the end of the list
|
||||||
GetItemPool( curr->sGridNo, &gpItemPool, 0 );
|
GetItemPoolFromGround( curr->sGridNo, &gpItemPool );
|
||||||
while( gpItemPool )
|
while( gpItemPool )
|
||||||
{
|
{
|
||||||
pObject = &gWorldItems[ gpItemPool->iItemIndex ].o;
|
pObject = &gWorldItems[ gpItemPool->iItemIndex ].object;
|
||||||
if( pObject->usItem == usItem && pObject->ItemData.Trigger.BombTrigger.bFrequency == bFrequency )
|
if( pObject->usItem == usItem && (*pObject)[0]->data.misc.bFrequency == bFrequency )
|
||||||
{
|
{
|
||||||
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||||
CenterScreenAtMapIndex( gsItemGridNo );
|
CenterScreenAtMapIndex( gsItemGridNo );
|
||||||
@@ -1392,11 +1405,11 @@ void SelectNextTriggerWithFrequency( UINT16 usItem, INT8 bFrequency )
|
|||||||
curr = pIPHead;
|
curr = pIPHead;
|
||||||
while( curr )
|
while( curr )
|
||||||
{ //search to the end of the list
|
{ //search to the end of the list
|
||||||
GetItemPool( curr->sGridNo, &gpItemPool, 0 );
|
GetItemPoolFromGround( curr->sGridNo, &gpItemPool );
|
||||||
while( gpItemPool )
|
while( gpItemPool )
|
||||||
{
|
{
|
||||||
pObject = &gWorldItems[ gpItemPool->iItemIndex ].o;
|
pObject = &gWorldItems[ gpItemPool->iItemIndex ].object;
|
||||||
if( pObject->usItem == usItem && pObject->ItemData.Trigger.BombTrigger.bFrequency == bFrequency )
|
if( pObject->usItem == usItem && (*pObject)[0]->data.misc.bFrequency == bFrequency )
|
||||||
{
|
{
|
||||||
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||||
CenterScreenAtMapIndex( gsItemGridNo );
|
CenterScreenAtMapIndex( gsItemGridNo );
|
||||||
@@ -1422,8 +1435,8 @@ void SelectNextPressureAction()
|
|||||||
gpItemPool = gpItemPool->pNext;
|
gpItemPool = gpItemPool->pNext;
|
||||||
while( gpItemPool )
|
while( gpItemPool )
|
||||||
{
|
{
|
||||||
pObject = &gWorldItems[ gpItemPool->iItemIndex ].o;
|
pObject = &gWorldItems[ gpItemPool->iItemIndex ].object;
|
||||||
if( pObject->usItem == ACTION_ITEM && pObject->ItemData.Trigger.bDetonatorType == BOMB_PRESSURE )
|
if( pObject->usItem == ACTION_ITEM && (*pObject)[0]->data.misc.bDetonatorType == BOMB_PRESSURE )
|
||||||
{
|
{
|
||||||
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||||
CenterScreenAtMapIndex( gsItemGridNo );
|
CenterScreenAtMapIndex( gsItemGridNo );
|
||||||
@@ -1438,11 +1451,11 @@ void SelectNextPressureAction()
|
|||||||
}
|
}
|
||||||
while( curr )
|
while( curr )
|
||||||
{ //search to the end of the list
|
{ //search to the end of the list
|
||||||
GetItemPool( curr->sGridNo, &gpItemPool, 0 );
|
GetItemPoolFromGround( curr->sGridNo, &gpItemPool );
|
||||||
while( gpItemPool )
|
while( gpItemPool )
|
||||||
{
|
{
|
||||||
pObject = &gWorldItems[ gpItemPool->iItemIndex ].o;
|
pObject = &gWorldItems[ gpItemPool->iItemIndex ].object;
|
||||||
if( pObject->usItem == ACTION_ITEM && pObject->ItemData.Trigger.bDetonatorType == BOMB_PRESSURE )
|
if( pObject->usItem == ACTION_ITEM && (*pObject)[0]->data.misc.bDetonatorType == BOMB_PRESSURE )
|
||||||
{
|
{
|
||||||
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||||
CenterScreenAtMapIndex( gsItemGridNo );
|
CenterScreenAtMapIndex( gsItemGridNo );
|
||||||
@@ -1456,11 +1469,11 @@ void SelectNextPressureAction()
|
|||||||
curr = pIPHead;
|
curr = pIPHead;
|
||||||
while( curr )
|
while( curr )
|
||||||
{ //search to the end of the list
|
{ //search to the end of the list
|
||||||
GetItemPool( curr->sGridNo, &gpItemPool, 0 );
|
GetItemPoolFromGround( curr->sGridNo, &gpItemPool );
|
||||||
while( gpItemPool )
|
while( gpItemPool )
|
||||||
{
|
{
|
||||||
pObject = &gWorldItems[ gpItemPool->iItemIndex ].o;
|
pObject = &gWorldItems[ gpItemPool->iItemIndex ].object;
|
||||||
if( pObject->usItem == ACTION_ITEM && pObject->ItemData.Trigger.bDetonatorType == BOMB_PRESSURE )
|
if( pObject->usItem == ACTION_ITEM && (*pObject)[0]->data.misc.bDetonatorType == BOMB_PRESSURE )
|
||||||
{
|
{
|
||||||
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||||
CenterScreenAtMapIndex( gsItemGridNo );
|
CenterScreenAtMapIndex( gsItemGridNo );
|
||||||
@@ -1481,13 +1494,13 @@ UINT16 CountNumberOfItemPlacementsInWorld( UINT16 usItem, UINT16 *pusQuantity )
|
|||||||
pIPCurr = pIPHead;
|
pIPCurr = pIPHead;
|
||||||
while( pIPCurr )
|
while( pIPCurr )
|
||||||
{
|
{
|
||||||
GetItemPool( pIPCurr->sGridNo, &pItemPool, 0 );
|
GetItemPoolFromGround( pIPCurr->sGridNo, &pItemPool );
|
||||||
while( pItemPool )
|
while( pItemPool )
|
||||||
{
|
{
|
||||||
if( gWorldItems[ pItemPool->iItemIndex ].o.usItem == usItem )
|
if( gWorldItems[ pItemPool->iItemIndex ].object.usItem == usItem )
|
||||||
{
|
{
|
||||||
num++;
|
num++;
|
||||||
*pusQuantity += gWorldItems[ pItemPool->iItemIndex ].o.ubNumberOfObjects;
|
*pusQuantity += gWorldItems[ pItemPool->iItemIndex ].object.ubNumberOfObjects;
|
||||||
}
|
}
|
||||||
pItemPool = pItemPool->pNext;
|
pItemPool = pItemPool->pNext;
|
||||||
}
|
}
|
||||||
@@ -1504,11 +1517,11 @@ UINT16 CountNumberOfItemsWithFrequency( UINT16 usItem, INT8 bFrequency )
|
|||||||
pIPCurr = pIPHead;
|
pIPCurr = pIPHead;
|
||||||
while( pIPCurr )
|
while( pIPCurr )
|
||||||
{
|
{
|
||||||
GetItemPool( pIPCurr->sGridNo, &pItemPool, 0 );
|
GetItemPoolFromGround( pIPCurr->sGridNo, &pItemPool );
|
||||||
while( pItemPool )
|
while( pItemPool )
|
||||||
{
|
{
|
||||||
if( gWorldItems[ pItemPool->iItemIndex ].o.usItem == usItem &&
|
if( gWorldItems[ pItemPool->iItemIndex ].object.usItem == usItem &&
|
||||||
gWorldItems[ pItemPool->iItemIndex ].o.ItemData.Trigger.BombTrigger.bFrequency == bFrequency )
|
gWorldItems[ pItemPool->iItemIndex ].object[0]->data.misc.bFrequency == bFrequency )
|
||||||
{
|
{
|
||||||
num++;
|
num++;
|
||||||
}
|
}
|
||||||
@@ -1527,11 +1540,11 @@ UINT16 CountNumberOfPressureActionsInWorld()
|
|||||||
pIPCurr = pIPHead;
|
pIPCurr = pIPHead;
|
||||||
while( pIPCurr )
|
while( pIPCurr )
|
||||||
{
|
{
|
||||||
GetItemPool( pIPCurr->sGridNo, &pItemPool, 0 );
|
GetItemPoolFromGround( pIPCurr->sGridNo, &pItemPool );
|
||||||
while( pItemPool )
|
while( pItemPool )
|
||||||
{
|
{
|
||||||
if( gWorldItems[ pItemPool->iItemIndex ].o.usItem == ACTION_ITEM &&
|
if( gWorldItems[ pItemPool->iItemIndex ].object.usItem == ACTION_ITEM &&
|
||||||
gWorldItems[ pItemPool->iItemIndex ].o.ItemData.Trigger.bDetonatorType == BOMB_PRESSURE )
|
gWorldItems[ pItemPool->iItemIndex ].object[0]->data.misc.bDetonatorType == BOMB_PRESSURE )
|
||||||
{
|
{
|
||||||
num++;
|
num++;
|
||||||
}
|
}
|
||||||
@@ -1587,12 +1600,12 @@ UINT16 CountNumberOfKeysOfTypeInWorld( UINT8 ubKeyID )
|
|||||||
pIPCurr = pIPHead;
|
pIPCurr = pIPHead;
|
||||||
while( pIPCurr )
|
while( pIPCurr )
|
||||||
{
|
{
|
||||||
GetItemPool( pIPCurr->sGridNo, &pItemPool, 0 );
|
GetItemPoolFromGround( pIPCurr->sGridNo, &pItemPool );
|
||||||
while( pItemPool )
|
while( pItemPool )
|
||||||
{
|
{
|
||||||
if( Item[ gWorldItems[ pItemPool->iItemIndex ].o.usItem ].usItemClass == IC_KEY )
|
if( Item[ gWorldItems[ pItemPool->iItemIndex ].object.usItem ].usItemClass == IC_KEY )
|
||||||
{
|
{
|
||||||
if( gWorldItems[ pItemPool->iItemIndex ].o.ItemData.Key.ubKeyID == ubKeyID )
|
if( gWorldItems[ pItemPool->iItemIndex ].object[0]->data.key.ubKeyID == ubKeyID )
|
||||||
{
|
{
|
||||||
num++;
|
num++;
|
||||||
}
|
}
|
||||||
@@ -1646,3 +1659,5 @@ void DisplayItemStatistics()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -12,18 +12,19 @@ typedef struct{
|
|||||||
UINT16 *pusItemIndex; //a dynamic array of Item indices
|
UINT16 *pusItemIndex; //a dynamic array of Item indices
|
||||||
UINT32 uiBuffer; //index of buffer
|
UINT32 uiBuffer; //index of buffer
|
||||||
UINT32 uiItemType; //Weapons, ammo, armour, explosives, equipment
|
UINT32 uiItemType; //Weapons, ammo, armour, explosives, equipment
|
||||||
INT16 sWidth, sHeight; //width and height of buffer
|
INT32 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 sNumItems; //total number of items in the current class of item.
|
||||||
INT16 sSelItemIndex; //currently selected item index.
|
INT16 sSelItemIndex; //currently selected item index.
|
||||||
INT16 sHilitedItemIndex;
|
INT16 sHilitedItemIndex;
|
||||||
INT16 sScrollIndex; //current scroll index (0 is far left, 1 is next tile to the right, ...)
|
INT16 sScrollIndex; //current scroll index (0 is far left, 1 is next tile to the right, ...)
|
||||||
INT16 sSaveSelWeaponsIndex, sSaveSelAmmoIndex, sSaveSelArmourIndex, sSaveSelExplosivesIndex,
|
INT16 sSaveSelWeaponsIndex, sSaveSelAmmoIndex, sSaveSelArmourIndex, sSaveSelLBEIndex, sSaveSelExplosivesIndex,
|
||||||
sSaveSelEquipment1Index, sSaveSelEquipment2Index, sSaveSelEquipment3Index,
|
sSaveSelEquipment1Index, sSaveSelEquipment2Index, sSaveSelEquipment3Index,
|
||||||
sSaveSelTriggersIndex, sSaveSelKeysIndex;
|
sSaveSelTriggersIndex, sSaveSelKeysIndex;
|
||||||
INT16 sSaveWeaponsScrollIndex, sSaveAmmoScrollIndex, sSaveArmourScrollIndex, sSaveExplosivesScrollIndex,
|
INT16 sSaveWeaponsScrollIndex, sSaveAmmoScrollIndex, sSaveArmourScrollIndex, sSaveLBEScrollIndex,
|
||||||
sSaveEquipment1ScrollIndex, sSaveEquipment2ScrollIndex, sSaveEquipment3ScrollIndex,
|
sSaveExplosivesScrollIndex, sSaveEquipment1ScrollIndex, sSaveEquipment2ScrollIndex,
|
||||||
sSaveTriggersScrollIndex, sSaveKeysScrollIndex;
|
sSaveEquipment3ScrollIndex, sSaveTriggersScrollIndex, sSaveKeysScrollIndex;
|
||||||
INT16 sNumWeapons, sNumAmmo, sNumArmour, sNumExplosives, sNumEquipment1, sNumEquipment2, sNumEquipment3,
|
INT16 sNumWeapons, sNumAmmo, sNumArmour, sLBEGear, sNumExplosives, sNumEquipment1, sNumEquipment2, sNumEquipment3,
|
||||||
sNumTriggers, sNumKeys;
|
sNumTriggers, sNumKeys;
|
||||||
}EditorItemsInfo;
|
}EditorItemsInfo;
|
||||||
|
|
||||||
@@ -67,3 +68,5 @@ extern INT32 giDefaultExistChance;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,6 @@
|
|||||||
#include "Soldier Init List.h"
|
#include "Soldier Init List.h"
|
||||||
#include "strategicmap.h"
|
#include "strategicmap.h"
|
||||||
#include "Soldier Add.h"
|
#include "Soldier Add.h"
|
||||||
#include "Soldier Control.h"
|
|
||||||
#include "Soldier Profile Type.h"
|
#include "Soldier Profile Type.h"
|
||||||
#include "Soldier Profile.h"
|
#include "Soldier Profile.h"
|
||||||
#include "Text Input.h"
|
#include "Text Input.h"
|
||||||
@@ -59,6 +58,10 @@
|
|||||||
#include "Simple Render Utils.h"
|
#include "Simple Render Utils.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//forward declarations of common classes to eliminate includes
|
||||||
|
class OBJECTTYPE;
|
||||||
|
class SOLDIERTYPE;
|
||||||
|
|
||||||
INT8 gbDefaultLightType = PRIMETIME_LIGHT;
|
INT8 gbDefaultLightType = PRIMETIME_LIGHT;
|
||||||
|
|
||||||
SGPPaletteEntry gEditorLightColor;
|
SGPPaletteEntry gEditorLightColor;
|
||||||
@@ -98,7 +101,7 @@ void SetupTextInputForMapInfo()
|
|||||||
AddTextInputField( iScreenWidthOffset + 338, 2 * iScreenHeightOffset + 363, 30, 18, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_EXCLUSIVE_COORDINATE );
|
AddTextInputField( iScreenWidthOffset + 338, 2 * iScreenHeightOffset + 363, 30, 18, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_EXCLUSIVE_COORDINATE );
|
||||||
swprintf( str, L"%d", gExitGrid.ubGotoSectorZ );
|
swprintf( str, L"%d", gExitGrid.ubGotoSectorZ );
|
||||||
AddTextInputField( iScreenWidthOffset + 338, 2 * iScreenHeightOffset + 383, 30, 18, MSYS_PRIORITY_NORMAL, str, 1, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 338, 2 * iScreenHeightOffset + 383, 30, 18, MSYS_PRIORITY_NORMAL, str, 1, INPUTTYPE_NUMERICSTRICT );
|
||||||
swprintf( str, L"%d", gExitGrid.usGridNo );
|
swprintf( str, L"%d", gExitGrid.sGridNo );
|
||||||
AddTextInputField( iScreenWidthOffset + 338, 2 * iScreenHeightOffset + 403, 40, 18, MSYS_PRIORITY_NORMAL, str, 5, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 338, 2 * iScreenHeightOffset + 403, 40, 18, MSYS_PRIORITY_NORMAL, str, 5, INPUTTYPE_NUMERICSTRICT );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -238,7 +241,7 @@ void ExtractAndUpdateMapInfo()
|
|||||||
gExitGrid.ubGotoSectorY = (UINT8)max( min( gExitGrid.ubGotoSectorY, 16 ), 1 );
|
gExitGrid.ubGotoSectorY = (UINT8)max( min( gExitGrid.ubGotoSectorY, 16 ), 1 );
|
||||||
}
|
}
|
||||||
gExitGrid.ubGotoSectorZ = (UINT8)max( min( GetNumericStrictValueFromField( 8 ), 3 ), 0 );
|
gExitGrid.ubGotoSectorZ = (UINT8)max( min( GetNumericStrictValueFromField( 8 ), 3 ), 0 );
|
||||||
gExitGrid.usGridNo = (UINT16)max( min( GetNumericStrictValueFromField( 9 ), 25600 ), 0 );
|
gExitGrid.sGridNo = (INT16)max( min( GetNumericStrictValueFromField( 9 ), 25600 ), 0 );
|
||||||
|
|
||||||
UpdateMapInfoFields();
|
UpdateMapInfoFields();
|
||||||
}
|
}
|
||||||
@@ -253,13 +256,13 @@ BOOLEAN ApplyNewExitGridValuesToTextFields()
|
|||||||
SetInputFieldStringWith16BitString( 7, str );
|
SetInputFieldStringWith16BitString( 7, str );
|
||||||
swprintf( str, L"%d", gExitGrid.ubGotoSectorZ );
|
swprintf( str, L"%d", gExitGrid.ubGotoSectorZ );
|
||||||
SetInputFieldStringWith16BitString( 8, str );
|
SetInputFieldStringWith16BitString( 8, str );
|
||||||
swprintf( str, L"%d", gExitGrid.usGridNo );
|
swprintf( str, L"%d", gExitGrid.sGridNo );
|
||||||
SetInputFieldStringWith16BitString( 9, str );
|
SetInputFieldStringWith16BitString( 9, str );
|
||||||
SetActiveField( 0 );
|
SetActiveField( 0 );
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT16 usCurrentExitGridNo = 0;
|
INT16 usCurrentExitGridNo = 0;
|
||||||
void LocateNextExitGrid()
|
void LocateNextExitGrid()
|
||||||
{
|
{
|
||||||
EXITGRID ExitGrid;
|
EXITGRID ExitGrid;
|
||||||
@@ -298,3 +301,4 @@ void ChangeLightDefault( INT8 bLightType )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+95
-107
@@ -44,7 +44,6 @@
|
|||||||
#include "Soldier Init List.h"
|
#include "Soldier Init List.h"
|
||||||
#include "strategicmap.h"
|
#include "strategicmap.h"
|
||||||
#include "Soldier Add.h"
|
#include "Soldier Add.h"
|
||||||
#include "Soldier Control.h"
|
|
||||||
#include "Soldier Profile Type.h"
|
#include "Soldier Profile Type.h"
|
||||||
#include "Soldier Profile.h"
|
#include "Soldier Profile.h"
|
||||||
#include "Text Input.h"
|
#include "Text Input.h"
|
||||||
@@ -64,6 +63,9 @@
|
|||||||
#include "Timer Control.h"
|
#include "Timer Control.h"
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#endif
|
#endif
|
||||||
|
//forward declarations of common classes to eliminate includes
|
||||||
|
class OBJECTTYPE;
|
||||||
|
class SOLDIERTYPE;
|
||||||
|
|
||||||
extern void GetSoldierAboveGuyPositions( SOLDIERTYPE *pSoldier, INT16 *psX, INT16 *psY, BOOLEAN fRadio );
|
extern void GetSoldierAboveGuyPositions( SOLDIERTYPE *pSoldier, INT16 *psX, INT16 *psY, BOOLEAN fRadio );
|
||||||
|
|
||||||
@@ -381,7 +383,7 @@ void ProcessMercEditing()
|
|||||||
|
|
||||||
SET_PALETTEREP_ID( pSoldier->HeadPal, gpPalRep[ ubPaletteRep ].ID );
|
SET_PALETTEREP_ID( pSoldier->HeadPal, gpPalRep[ ubPaletteRep ].ID );
|
||||||
sprintf( gpSelected->pDetailedPlacement->HeadPal, pSoldier->HeadPal );
|
sprintf( gpSelected->pDetailedPlacement->HeadPal, pSoldier->HeadPal );
|
||||||
CreateSoldierPalettes( pSoldier );
|
pSoldier->CreateSoldierPalettes( );
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
ubType = EDIT_COLOR_HEAD;
|
ubType = EDIT_COLOR_HEAD;
|
||||||
@@ -393,7 +395,7 @@ void ProcessMercEditing()
|
|||||||
|
|
||||||
SET_PALETTEREP_ID( pSoldier->HeadPal, gpPalRep[ ubPaletteRep ].ID );
|
SET_PALETTEREP_ID( pSoldier->HeadPal, gpPalRep[ ubPaletteRep ].ID );
|
||||||
sprintf( gpSelected->pDetailedPlacement->HeadPal, pSoldier->HeadPal );
|
sprintf( gpSelected->pDetailedPlacement->HeadPal, pSoldier->HeadPal );
|
||||||
CreateSoldierPalettes( pSoldier );
|
pSoldier->CreateSoldierPalettes( );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
@@ -406,7 +408,7 @@ void ProcessMercEditing()
|
|||||||
|
|
||||||
SET_PALETTEREP_ID( pSoldier->SkinPal, gpPalRep[ ubPaletteRep ].ID );
|
SET_PALETTEREP_ID( pSoldier->SkinPal, gpPalRep[ ubPaletteRep ].ID );
|
||||||
sprintf( gpSelected->pDetailedPlacement->SkinPal, pSoldier->SkinPal );
|
sprintf( gpSelected->pDetailedPlacement->SkinPal, pSoldier->SkinPal );
|
||||||
CreateSoldierPalettes( pSoldier );
|
pSoldier->CreateSoldierPalettes( );
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
ubType = EDIT_COLOR_SKIN;
|
ubType = EDIT_COLOR_SKIN;
|
||||||
@@ -418,7 +420,7 @@ void ProcessMercEditing()
|
|||||||
|
|
||||||
SET_PALETTEREP_ID( pSoldier->SkinPal, gpPalRep[ ubPaletteRep ].ID );
|
SET_PALETTEREP_ID( pSoldier->SkinPal, gpPalRep[ ubPaletteRep ].ID );
|
||||||
sprintf( gpSelected->pDetailedPlacement->SkinPal, pSoldier->SkinPal );
|
sprintf( gpSelected->pDetailedPlacement->SkinPal, pSoldier->SkinPal );
|
||||||
CreateSoldierPalettes( pSoldier );
|
pSoldier->CreateSoldierPalettes( );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
@@ -431,7 +433,7 @@ void ProcessMercEditing()
|
|||||||
|
|
||||||
SET_PALETTEREP_ID( pSoldier->VestPal, gpPalRep[ ubPaletteRep ].ID );
|
SET_PALETTEREP_ID( pSoldier->VestPal, gpPalRep[ ubPaletteRep ].ID );
|
||||||
sprintf( gpSelected->pDetailedPlacement->VestPal, pSoldier->VestPal );
|
sprintf( gpSelected->pDetailedPlacement->VestPal, pSoldier->VestPal );
|
||||||
CreateSoldierPalettes( pSoldier );
|
pSoldier->CreateSoldierPalettes( );
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
ubType = EDIT_COLOR_VEST;
|
ubType = EDIT_COLOR_VEST;
|
||||||
@@ -443,7 +445,7 @@ void ProcessMercEditing()
|
|||||||
|
|
||||||
SET_PALETTEREP_ID( pSoldier->VestPal, gpPalRep[ ubPaletteRep ].ID );
|
SET_PALETTEREP_ID( pSoldier->VestPal, gpPalRep[ ubPaletteRep ].ID );
|
||||||
sprintf( gpSelected->pDetailedPlacement->VestPal, pSoldier->VestPal );
|
sprintf( gpSelected->pDetailedPlacement->VestPal, pSoldier->VestPal );
|
||||||
CreateSoldierPalettes( pSoldier );
|
pSoldier->CreateSoldierPalettes( );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 6:
|
case 6:
|
||||||
@@ -456,7 +458,7 @@ void ProcessMercEditing()
|
|||||||
|
|
||||||
SET_PALETTEREP_ID( pSoldier->PantsPal, gpPalRep[ ubPaletteRep ].ID );
|
SET_PALETTEREP_ID( pSoldier->PantsPal, gpPalRep[ ubPaletteRep ].ID );
|
||||||
sprintf( gpSelected->pDetailedPlacement->PantsPal, pSoldier->PantsPal );
|
sprintf( gpSelected->pDetailedPlacement->PantsPal, pSoldier->PantsPal );
|
||||||
CreateSoldierPalettes( pSoldier );
|
pSoldier->CreateSoldierPalettes( );
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
ubType = EDIT_COLOR_PANTS;
|
ubType = EDIT_COLOR_PANTS;
|
||||||
@@ -468,7 +470,7 @@ void ProcessMercEditing()
|
|||||||
|
|
||||||
SET_PALETTEREP_ID( pSoldier->PantsPal, gpPalRep[ ubPaletteRep ].ID );
|
SET_PALETTEREP_ID( pSoldier->PantsPal, gpPalRep[ ubPaletteRep ].ID );
|
||||||
sprintf( gpSelected->pDetailedPlacement->PantsPal, pSoldier->PantsPal );
|
sprintf( gpSelected->pDetailedPlacement->PantsPal, pSoldier->PantsPal );
|
||||||
CreateSoldierPalettes( pSoldier );
|
pSoldier->CreateSoldierPalettes( );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
iEditMercMode = EDIT_MERC_NONE;
|
iEditMercMode = EDIT_MERC_NONE;
|
||||||
@@ -523,7 +525,7 @@ void AddMercToWorld( INT32 iMapIndex )
|
|||||||
//Set up some general information.
|
//Set up some general information.
|
||||||
gTempBasicPlacement.fDetailedPlacement = FALSE;
|
gTempBasicPlacement.fDetailedPlacement = FALSE;
|
||||||
gTempBasicPlacement.fPriorityExistance = FALSE;
|
gTempBasicPlacement.fPriorityExistance = FALSE;
|
||||||
gTempBasicPlacement.usStartingGridNo = (UINT16)iMapIndex;
|
gTempBasicPlacement.sStartingGridNo = (INT16)iMapIndex;
|
||||||
gTempBasicPlacement.bOrders = gbDefaultOrders;
|
gTempBasicPlacement.bOrders = gbDefaultOrders;
|
||||||
gTempBasicPlacement.bAttitude = gbDefaultAttitude;
|
gTempBasicPlacement.bAttitude = gbDefaultAttitude;
|
||||||
gTempBasicPlacement.bRelativeAttributeLevel = gbDefaultRelativeAttributeLevel;
|
gTempBasicPlacement.bRelativeAttributeLevel = gbDefaultRelativeAttributeLevel;
|
||||||
@@ -558,7 +560,7 @@ void AddMercToWorld( INT32 iMapIndex )
|
|||||||
gpSelected->pBasicPlacement->fOnRoof = TRUE;
|
gpSelected->pBasicPlacement->fOnRoof = TRUE;
|
||||||
if( gpSelected->pDetailedPlacement )
|
if( gpSelected->pDetailedPlacement )
|
||||||
gpSelected->pDetailedPlacement->fOnRoof = TRUE;
|
gpSelected->pDetailedPlacement->fOnRoof = TRUE;
|
||||||
SetSoldierHeight( gpSelected->pSoldier, 58.0 );
|
gpSelected->pSoldier->SetSoldierHeight( 58.0 );
|
||||||
}
|
}
|
||||||
UnclickEditorButtons( FIRST_MERCS_INVENTORY_BUTTON, LAST_MERCS_INVENTORY_BUTTON );
|
UnclickEditorButtons( FIRST_MERCS_INVENTORY_BUTTON, LAST_MERCS_INVENTORY_BUTTON );
|
||||||
for( i = FIRST_MERCS_INVENTORY_BUTTON; i <= LAST_MERCS_INVENTORY_BUTTON; i++ )
|
for( i = FIRST_MERCS_INVENTORY_BUTTON; i <= LAST_MERCS_INVENTORY_BUTTON; i++ )
|
||||||
@@ -593,23 +595,23 @@ void HandleRightClickOnMerc( INT32 iMapIndex )
|
|||||||
else if( gsSelectedMercID != -1 && IsLocationSittable( iMapIndex, gfRoofPlacement ) )// We want to move the selected merc to this new location.
|
else if( gsSelectedMercID != -1 && IsLocationSittable( iMapIndex, gfRoofPlacement ) )// We want to move the selected merc to this new location.
|
||||||
{
|
{
|
||||||
RemoveAllObjectsOfTypeRange( gsSelectedMercGridNo, CONFIRMMOVE, CONFIRMMOVE );
|
RemoveAllObjectsOfTypeRange( gsSelectedMercGridNo, CONFIRMMOVE, CONFIRMMOVE );
|
||||||
EVENT_SetSoldierPosition( gpSelected->pSoldier, (FLOAT)(sCellX + 5), (FLOAT)(sCellY + 5) );
|
gpSelected->pSoldier->EVENT_SetSoldierPosition( (FLOAT)(sCellX + 5), (FLOAT)(sCellY + 5) );
|
||||||
if( gfRoofPlacement && FlatRoofAboveGridNo( iMapIndex ) )
|
if( gfRoofPlacement && FlatRoofAboveGridNo( iMapIndex ) )
|
||||||
{
|
{
|
||||||
gpSelected->pBasicPlacement->fOnRoof = TRUE;
|
gpSelected->pBasicPlacement->fOnRoof = TRUE;
|
||||||
if( gpSelected->pDetailedPlacement )
|
if( gpSelected->pDetailedPlacement )
|
||||||
gpSelected->pDetailedPlacement->fOnRoof = TRUE;
|
gpSelected->pDetailedPlacement->fOnRoof = TRUE;
|
||||||
SetSoldierHeight( gpSelected->pSoldier, 58.0 );
|
gpSelected->pSoldier->SetSoldierHeight( 58.0 );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gpSelected->pBasicPlacement->fOnRoof = FALSE;
|
gpSelected->pBasicPlacement->fOnRoof = FALSE;
|
||||||
if( gpSelected->pDetailedPlacement )
|
if( gpSelected->pDetailedPlacement )
|
||||||
gpSelected->pDetailedPlacement->fOnRoof = FALSE;
|
gpSelected->pDetailedPlacement->fOnRoof = FALSE;
|
||||||
SetSoldierHeight( gpSelected->pSoldier, 0.0 );
|
gpSelected->pSoldier->SetSoldierHeight( 0.0 );
|
||||||
}
|
}
|
||||||
gsSelectedMercGridNo = (INT16)iMapIndex;
|
gsSelectedMercGridNo = (INT16)iMapIndex;
|
||||||
gpSelected->pBasicPlacement->usStartingGridNo = gsSelectedMercGridNo;
|
gpSelected->pBasicPlacement->sStartingGridNo = gsSelectedMercGridNo;
|
||||||
if( gpSelected->pDetailedPlacement )
|
if( gpSelected->pDetailedPlacement )
|
||||||
gpSelected->pDetailedPlacement->sInsertionGridNo = gsSelectedMercGridNo;
|
gpSelected->pDetailedPlacement->sInsertionGridNo = gsSelectedMercGridNo;
|
||||||
AddObjectToHead( gsSelectedMercGridNo, CONFIRMMOVE1 );
|
AddObjectToHead( gsSelectedMercGridNo, CONFIRMMOVE1 );
|
||||||
@@ -638,13 +640,13 @@ void ResetAllMercPositions()
|
|||||||
TacticalRemoveSoldier( curr->pSoldier->ubID );
|
TacticalRemoveSoldier( curr->pSoldier->ubID );
|
||||||
curr->pSoldier = NULL;
|
curr->pSoldier = NULL;
|
||||||
}
|
}
|
||||||
//usMapIndex = gpSelected->pBasicPlacement->usStartingGridNo;
|
//sMapIndex = gpSelected->pBasicPlacement->sStartingGridNo;
|
||||||
//ConvertGridNoToCellXY( usMapIndex, &sCellX, &sCellY );
|
//ConvertGridNoToCellXY( sMapIndex, &sCellX, &sCellY );
|
||||||
//if( gpSelected->pSoldier )
|
//if( gpSelected->pSoldier )
|
||||||
//{
|
//{
|
||||||
// EVENT_SetSoldierPosition( gpSelected->pSoldier, (FLOAT)(sCellX + 5), (FLOAT)(sCellY + 5) );
|
// EVENT_SetSoldierPosition( gpSelected->pSoldier, (FLOAT)(sCellX + 5), (FLOAT)(sCellY + 5) );
|
||||||
// if( gpSelected->pBasicPlacement->fOnRoof )
|
// if( gpSelected->pBasicPlacement->fOnRoof )
|
||||||
// SetSoldierHeight( gpSelected->pSoldier, 58.0 );
|
// gpSelected->pSoldier->SetSoldierHeight( 58.0 );
|
||||||
// SetMercDirection( gpSelected->pBasicPlacement->ubDirection );
|
// SetMercDirection( gpSelected->pBasicPlacement->ubDirection );
|
||||||
//}
|
//}
|
||||||
curr = curr->next;
|
curr = curr->next;
|
||||||
@@ -667,22 +669,22 @@ void AddMercWaypoint( UINT32 iMapIndex )
|
|||||||
if ( gsSelectedMercID == -1 || (gsSelectedMercID <= (INT32)gTacticalStatus.Team[ OUR_TEAM ].bLastID) || gsSelectedMercID >= MAXMERCS )
|
if ( gsSelectedMercID == -1 || (gsSelectedMercID <= (INT32)gTacticalStatus.Team[ OUR_TEAM ].bLastID) || gsSelectedMercID >= MAXMERCS )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( iActionParam > gpSelected->pSoldier->bPatrolCnt )
|
if ( iActionParam > gpSelected->pSoldier->aiData.bPatrolCnt )
|
||||||
{
|
{
|
||||||
// Fill up missing waypoints with same value as new one
|
// Fill up missing waypoints with same value as new one
|
||||||
for(iNum = gpSelected->pSoldier->bPatrolCnt + 1; iNum <= iActionParam; iNum++)
|
for(iNum = gpSelected->pSoldier->aiData.bPatrolCnt + 1; iNum <= iActionParam; iNum++)
|
||||||
{
|
{
|
||||||
gpSelected->pBasicPlacement->sPatrolGrid[iNum] = (INT16)iMapIndex;
|
gpSelected->pBasicPlacement->sPatrolGrid[iNum] = (INT16)iMapIndex;
|
||||||
if( gpSelected->pDetailedPlacement )
|
if( gpSelected->pDetailedPlacement )
|
||||||
gpSelected->pDetailedPlacement->sPatrolGrid[iNum] = (INT16)iMapIndex;
|
gpSelected->pDetailedPlacement->sPatrolGrid[iNum] = (INT16)iMapIndex;
|
||||||
gpSelected->pSoldier->usPatrolGrid[iNum] = (UINT16)iMapIndex;
|
gpSelected->pSoldier->aiData.sPatrolGrid[iNum] = (INT16)iMapIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
gpSelected->pBasicPlacement->bPatrolCnt = (INT8)iActionParam;
|
gpSelected->pBasicPlacement->bPatrolCnt = (INT8)iActionParam;
|
||||||
if( gpSelected->pDetailedPlacement )
|
if( gpSelected->pDetailedPlacement )
|
||||||
gpSelected->pDetailedPlacement->bPatrolCnt = (INT8)iActionParam;
|
gpSelected->pDetailedPlacement->bPatrolCnt = (INT8)iActionParam;
|
||||||
gpSelected->pSoldier->bPatrolCnt = (INT8) iActionParam;
|
gpSelected->pSoldier->aiData.bPatrolCnt = (INT8) iActionParam;
|
||||||
gpSelected->pSoldier->bNextPatrolPnt = 1;
|
gpSelected->pSoldier->aiData.bNextPatrolPnt = 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -690,7 +692,7 @@ void AddMercWaypoint( UINT32 iMapIndex )
|
|||||||
gpSelected->pBasicPlacement->sPatrolGrid[iActionParam] = (INT16)iMapIndex;
|
gpSelected->pBasicPlacement->sPatrolGrid[iActionParam] = (INT16)iMapIndex;
|
||||||
if( gpSelected->pDetailedPlacement )
|
if( gpSelected->pDetailedPlacement )
|
||||||
gpSelected->pDetailedPlacement->sPatrolGrid[iActionParam] = (INT16)iMapIndex;
|
gpSelected->pDetailedPlacement->sPatrolGrid[iActionParam] = (INT16)iMapIndex;
|
||||||
gpSelected->pSoldier->usPatrolGrid[iActionParam] = (UINT16)iMapIndex;
|
gpSelected->pSoldier->aiData.sPatrolGrid[iActionParam] = (INT16)iMapIndex;
|
||||||
}
|
}
|
||||||
gfRenderWorld = TRUE;
|
gfRenderWorld = TRUE;
|
||||||
}
|
}
|
||||||
@@ -706,21 +708,21 @@ void EraseMercWaypoint()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// Fill up missing areas
|
// Fill up missing areas
|
||||||
if ( iActionParam > gpSelected->pSoldier->bPatrolCnt )
|
if ( iActionParam > gpSelected->pSoldier->aiData.bPatrolCnt )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for(iNum = iActionParam; iNum < gpSelected->pSoldier->bPatrolCnt; iNum++)
|
for(iNum = iActionParam; iNum < gpSelected->pSoldier->aiData.bPatrolCnt; iNum++)
|
||||||
{
|
{
|
||||||
gpSelected->pBasicPlacement->sPatrolGrid[iNum] = gpSelected->pBasicPlacement->sPatrolGrid[iNum+1];
|
gpSelected->pBasicPlacement->sPatrolGrid[iNum] = gpSelected->pBasicPlacement->sPatrolGrid[iNum+1];
|
||||||
if( gpSelected->pDetailedPlacement )
|
if( gpSelected->pDetailedPlacement )
|
||||||
gpSelected->pDetailedPlacement->sPatrolGrid[iNum] = gpSelected->pDetailedPlacement->sPatrolGrid[iNum+1];
|
gpSelected->pDetailedPlacement->sPatrolGrid[iNum] = gpSelected->pDetailedPlacement->sPatrolGrid[iNum+1];
|
||||||
gpSelected->pSoldier->usPatrolGrid[iNum] = gpSelected->pSoldier->usPatrolGrid[iNum+1];
|
gpSelected->pSoldier->aiData.sPatrolGrid[iNum] = gpSelected->pSoldier->aiData.sPatrolGrid[iNum+1];
|
||||||
}
|
}
|
||||||
|
|
||||||
gpSelected->pBasicPlacement->bPatrolCnt--;
|
gpSelected->pBasicPlacement->bPatrolCnt--;
|
||||||
if( gpSelected->pDetailedPlacement )
|
if( gpSelected->pDetailedPlacement )
|
||||||
gpSelected->pDetailedPlacement->bPatrolCnt--;
|
gpSelected->pDetailedPlacement->bPatrolCnt--;
|
||||||
gpSelected->pSoldier->bPatrolCnt--;
|
gpSelected->pSoldier->aiData.bPatrolCnt--;
|
||||||
gfRenderWorld = TRUE;
|
gfRenderWorld = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -736,28 +738,28 @@ void ChangeBaseSoldierStats( SOLDIERTYPE *pSoldier )
|
|||||||
if ( pSoldier == NULL )
|
if ( pSoldier == NULL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
pSoldier->bLifeMax = (UINT8)(sBaseStat[sCurBaseDiff] + (UINT16)(Random(BASE_STAT_DEVIATION * 2)-BASE_STAT_DEVIATION));
|
pSoldier->stats.bLifeMax = (UINT8)(sBaseStat[sCurBaseDiff] + (UINT16)(Random(BASE_STAT_DEVIATION * 2)-BASE_STAT_DEVIATION));
|
||||||
pSoldier->bLife = pSoldier->bLifeMax;
|
pSoldier->stats.bLife = pSoldier->stats.bLifeMax;
|
||||||
|
|
||||||
pSoldier->bBleeding = 0;
|
pSoldier->bBleeding = 0;
|
||||||
pSoldier->bBreath = 100;
|
pSoldier->bBreath = 100;
|
||||||
|
|
||||||
pSoldier->bMarksmanship = (UINT8)(sBaseStat[sCurBaseDiff] + (UINT16)(Random(BASE_STAT_DEVIATION * 2)-BASE_STAT_DEVIATION));
|
pSoldier->stats.bMarksmanship = (UINT8)(sBaseStat[sCurBaseDiff] + (UINT16)(Random(BASE_STAT_DEVIATION * 2)-BASE_STAT_DEVIATION));
|
||||||
pSoldier->bMedical = (UINT8)(sBaseStat[sCurBaseDiff] + (UINT16)(Random(BASE_STAT_DEVIATION * 2)-BASE_STAT_DEVIATION));
|
pSoldier->stats.bMedical = (UINT8)(sBaseStat[sCurBaseDiff] + (UINT16)(Random(BASE_STAT_DEVIATION * 2)-BASE_STAT_DEVIATION));
|
||||||
pSoldier->bMechanical = (UINT8)(sBaseStat[sCurBaseDiff] + (UINT16)(Random(BASE_STAT_DEVIATION * 2)-BASE_STAT_DEVIATION));
|
pSoldier->stats.bMechanical = (UINT8)(sBaseStat[sCurBaseDiff] + (UINT16)(Random(BASE_STAT_DEVIATION * 2)-BASE_STAT_DEVIATION));
|
||||||
pSoldier->bExplosive = (UINT8)(sBaseStat[sCurBaseDiff] + (UINT16)(Random(BASE_STAT_DEVIATION * 2)-BASE_STAT_DEVIATION));
|
pSoldier->stats.bExplosive = (UINT8)(sBaseStat[sCurBaseDiff] + (UINT16)(Random(BASE_STAT_DEVIATION * 2)-BASE_STAT_DEVIATION));
|
||||||
pSoldier->bAgility = (UINT8)(sBaseStat[sCurBaseDiff] + (UINT16)(Random(BASE_STAT_DEVIATION * 2)-BASE_STAT_DEVIATION));
|
pSoldier->stats.bAgility = (UINT8)(sBaseStat[sCurBaseDiff] + (UINT16)(Random(BASE_STAT_DEVIATION * 2)-BASE_STAT_DEVIATION));
|
||||||
pSoldier->bDexterity = (UINT8)(sBaseStat[sCurBaseDiff] + (UINT16)(Random(BASE_STAT_DEVIATION * 2)-BASE_STAT_DEVIATION));
|
pSoldier->stats.bDexterity = (UINT8)(sBaseStat[sCurBaseDiff] + (UINT16)(Random(BASE_STAT_DEVIATION * 2)-BASE_STAT_DEVIATION));
|
||||||
|
|
||||||
pSoldier->bStrength = (UINT8)(sBaseStat[sCurBaseDiff] + (UINT16)(Random(BASE_STAT_DEVIATION * 2)-BASE_STAT_DEVIATION));
|
pSoldier->stats.bStrength = (UINT8)(sBaseStat[sCurBaseDiff] + (UINT16)(Random(BASE_STAT_DEVIATION * 2)-BASE_STAT_DEVIATION));
|
||||||
pSoldier->bLeadership = (UINT8)(sBaseStat[sCurBaseDiff] + (UINT16)(Random(BASE_STAT_DEVIATION * 2)-BASE_STAT_DEVIATION));
|
pSoldier->stats.bLeadership = (UINT8)(sBaseStat[sCurBaseDiff] + (UINT16)(Random(BASE_STAT_DEVIATION * 2)-BASE_STAT_DEVIATION));
|
||||||
pSoldier->bWisdom = (UINT8)(sBaseStat[sCurBaseDiff] + (UINT16)(Random(BASE_STAT_DEVIATION * 2)-BASE_STAT_DEVIATION));
|
pSoldier->stats.bWisdom = (UINT8)(sBaseStat[sCurBaseDiff] + (UINT16)(Random(BASE_STAT_DEVIATION * 2)-BASE_STAT_DEVIATION));
|
||||||
pSoldier->bScientific = (UINT8)(sBaseStat[sCurBaseDiff] + (UINT16)(Random(BASE_STAT_DEVIATION * 2)-BASE_STAT_DEVIATION));
|
pSoldier->stats.bScientific = (UINT8)(sBaseStat[sCurBaseDiff] + (UINT16)(Random(BASE_STAT_DEVIATION * 2)-BASE_STAT_DEVIATION));
|
||||||
|
|
||||||
pSoldier->bExpLevel = (UINT8)sBaseExpLvl[sCurBaseDiff];
|
pSoldier->stats.bExpLevel = (UINT8)sBaseExpLvl[sCurBaseDiff];
|
||||||
pSoldier->bGunType = (INT8)Random(BASE_GUNTYPE_DEVIATION);
|
pSoldier->bGunType = (INT8)Random(BASE_GUNTYPE_DEVIATION);
|
||||||
|
|
||||||
pSoldier->bActionPoints = CalcActionPoints( pSoldier );
|
pSoldier->bActionPoints = pSoldier->CalcActionPoints( );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -818,30 +820,30 @@ void DisplayEditMercWindow( void )
|
|||||||
ColorFillVideoSurfaceArea(FRAME_BUFFER, iXPos + 128, iYPos + 51, iXPos + 128 + 104, iYPos + 51 + 19, usFillColorDark );
|
ColorFillVideoSurfaceArea(FRAME_BUFFER, iXPos + 128, iYPos + 51, iXPos + 128 + 104, iYPos + 51 + 19, usFillColorDark );
|
||||||
ColorFillVideoSurfaceArea(FRAME_BUFFER, iXPos + 129, iYPos + 52, iXPos + 128 + 104, iYPos + 52 + 19, usFillColorLight );
|
ColorFillVideoSurfaceArea(FRAME_BUFFER, iXPos + 129, iYPos + 52, iXPos + 128 + 104, iYPos + 52 + 19, usFillColorLight );
|
||||||
ColorFillVideoSurfaceArea(FRAME_BUFFER, iXPos + 129, iYPos + 52, iXPos + 128 + 103, iYPos + 52 + 18, usFillColorTextBk );
|
ColorFillVideoSurfaceArea(FRAME_BUFFER, iXPos + 129, iYPos + 52, iXPos + 128 + 103, iYPos + 52 + 18, usFillColorTextBk );
|
||||||
iXOff = (105 - StringPixLength( EditMercOrders[pSoldier->bOrders], FONT12POINT1 )) / 2;
|
iXOff = (105 - StringPixLength( EditMercOrders[pSoldier->aiData.bOrders], FONT12POINT1 )) / 2;
|
||||||
gprintf( iXPos + 130 + iXOff, iYPos + 55, L"%s", EditMercOrders[pSoldier->bOrders] );
|
gprintf( iXPos + 130 + iXOff, iYPos + 55, L"%s", EditMercOrders[pSoldier->aiData.bOrders] );
|
||||||
|
|
||||||
// Combat window
|
// Combat window
|
||||||
gprintf( iXPos + 128, iYPos + 73, L"Combat Attitude:" );
|
gprintf( iXPos + 128, iYPos + 73, L"Combat Attitude:" );
|
||||||
ColorFillVideoSurfaceArea(FRAME_BUFFER, iXPos + 128, iYPos + 86, iXPos + 128 + 104, iYPos + 86 + 19, usFillColorDark );
|
ColorFillVideoSurfaceArea(FRAME_BUFFER, iXPos + 128, iYPos + 86, iXPos + 128 + 104, iYPos + 86 + 19, usFillColorDark );
|
||||||
ColorFillVideoSurfaceArea(FRAME_BUFFER, iXPos + 129, iYPos + 87, iXPos + 128 + 104, iYPos + 87 + 19, usFillColorLight );
|
ColorFillVideoSurfaceArea(FRAME_BUFFER, iXPos + 129, iYPos + 87, iXPos + 128 + 104, iYPos + 87 + 19, usFillColorLight );
|
||||||
ColorFillVideoSurfaceArea(FRAME_BUFFER, iXPos + 129, iYPos + 87, iXPos + 128 + 103, iYPos + 87 + 18, usFillColorTextBk );
|
ColorFillVideoSurfaceArea(FRAME_BUFFER, iXPos + 129, iYPos + 87, iXPos + 128 + 103, iYPos + 87 + 18, usFillColorTextBk );
|
||||||
iXOff = (105 - StringPixLength( EditMercAttitudes[pSoldier->bAttitude], FONT12POINT1 )) / 2;
|
iXOff = (105 - StringPixLength( EditMercAttitudes[pSoldier->aiData.bAttitude], FONT12POINT1 )) / 2;
|
||||||
gprintf( iXPos + 130 + iXOff, iYPos + 90, L"%s", EditMercAttitudes[pSoldier->bAttitude] );
|
gprintf( iXPos + 130 + iXOff, iYPos + 90, L"%s", EditMercAttitudes[pSoldier->aiData.bAttitude] );
|
||||||
|
|
||||||
// Get stats
|
// Get stats
|
||||||
iEditStat[0] = pSoldier->bLifeMax; // 12 13
|
iEditStat[0] = pSoldier->stats.bLifeMax; // 12 13
|
||||||
iEditStat[1] = pSoldier->bLife; // 14 15
|
iEditStat[1] = pSoldier->stats.bLife; // 14 15
|
||||||
iEditStat[2] = pSoldier->bStrength; // 16 17
|
iEditStat[2] = pSoldier->stats.bStrength; // 16 17
|
||||||
iEditStat[3] = pSoldier->bAgility; // 18 19
|
iEditStat[3] = pSoldier->stats.bAgility; // 18 19
|
||||||
iEditStat[4] = pSoldier->bDexterity; // 20 21
|
iEditStat[4] = pSoldier->stats.bDexterity; // 20 21
|
||||||
iEditStat[5] = pSoldier->bLeadership; // 22 23
|
iEditStat[5] = pSoldier->stats.bLeadership; // 22 23
|
||||||
iEditStat[6] = pSoldier->bWisdom; // 24 25
|
iEditStat[6] = pSoldier->stats.bWisdom; // 24 25
|
||||||
iEditStat[7] = pSoldier->bMarksmanship; // 26 27
|
iEditStat[7] = pSoldier->stats.bMarksmanship; // 26 27
|
||||||
iEditStat[8] = pSoldier->bExplosive; // 28 29
|
iEditStat[8] = pSoldier->stats.bExplosive; // 28 29
|
||||||
iEditStat[9] = pSoldier->bMedical; // 30 31
|
iEditStat[9] = pSoldier->stats.bMedical; // 30 31
|
||||||
iEditStat[10] = pSoldier->bScientific; // 32 33
|
iEditStat[10] = pSoldier->stats.bScientific; // 32 33
|
||||||
iEditStat[11] = pSoldier->bExpLevel; // 34 35
|
iEditStat[11] = pSoldier->stats.bExpLevel; // 34 35
|
||||||
|
|
||||||
// Stat value windows
|
// Stat value windows
|
||||||
for ( x = 0; x < 12; x++ )
|
for ( x = 0; x < 12; x++ )
|
||||||
@@ -1182,7 +1184,9 @@ void EditMercIncDifficultyCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
//
|
//
|
||||||
void ShowEditMercPalettes( SOLDIERTYPE *pSoldier )
|
void ShowEditMercPalettes( SOLDIERTYPE *pSoldier )
|
||||||
{
|
{
|
||||||
UINT8 ubPaletteRep = 0xff;
|
UINT8 ubPaletteRep;
|
||||||
|
if( !pSoldier )
|
||||||
|
ubPaletteRep = 0xff;
|
||||||
|
|
||||||
if( pSoldier )
|
if( pSoldier )
|
||||||
{
|
{
|
||||||
@@ -1301,10 +1305,10 @@ void DisplayWayPoints(void)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// point 0 is not used!
|
// point 0 is not used!
|
||||||
for ( bPoint = 1; bPoint <= pSoldier->bPatrolCnt; bPoint++ )
|
for ( bPoint = 1; bPoint <= pSoldier->aiData.bPatrolCnt; bPoint++ )
|
||||||
{
|
{
|
||||||
// Get the next point
|
// Get the next point
|
||||||
sGridNo = (INT16)pSoldier->usPatrolGrid[bPoint];
|
sGridNo = (INT16)pSoldier->aiData.sPatrolGrid[bPoint];
|
||||||
|
|
||||||
// Can we see it?
|
// Can we see it?
|
||||||
if ( !GridNoOnVisibleWorldTile( sGridNo ) )
|
if ( !GridNoOnVisibleWorldTile( sGridNo ) )
|
||||||
@@ -1333,7 +1337,7 @@ void DisplayWayPoints(void)
|
|||||||
{
|
{
|
||||||
// Shown it on screen!
|
// Shown it on screen!
|
||||||
SetFont(TINYFONT1);
|
SetFont(TINYFONT1);
|
||||||
if( pSoldier->bLevel == 1 )
|
if( pSoldier->pathing.bLevel == 1 )
|
||||||
{
|
{
|
||||||
SetFontBackground( FONT_LTBLUE );
|
SetFontBackground( FONT_LTBLUE );
|
||||||
sScreenY -= 68;
|
sScreenY -= 68;
|
||||||
@@ -1429,7 +1433,7 @@ void CreateEditMercWindow( void )
|
|||||||
}
|
}
|
||||||
void SetMercOrders( INT8 bOrders )
|
void SetMercOrders( INT8 bOrders )
|
||||||
{
|
{
|
||||||
gpSelected->pSoldier->bOrders = bOrders;
|
gpSelected->pSoldier->aiData.bOrders = bOrders;
|
||||||
gpSelected->pBasicPlacement->bOrders = bOrders;
|
gpSelected->pBasicPlacement->bOrders = bOrders;
|
||||||
UnclickEditorButtons( FIRST_MERCS_ORDERS_BUTTON, LAST_MERCS_ORDERS_BUTTON );
|
UnclickEditorButtons( FIRST_MERCS_ORDERS_BUTTON, LAST_MERCS_ORDERS_BUTTON );
|
||||||
ClickEditorButton( FIRST_MERCS_ORDERS_BUTTON + bOrders );
|
ClickEditorButton( FIRST_MERCS_ORDERS_BUTTON + bOrders );
|
||||||
@@ -1438,7 +1442,7 @@ void SetMercOrders( INT8 bOrders )
|
|||||||
|
|
||||||
void SetMercAttitude( INT8 bAttitude )
|
void SetMercAttitude( INT8 bAttitude )
|
||||||
{
|
{
|
||||||
gpSelected->pSoldier->bAttitude = bAttitude;
|
gpSelected->pSoldier->aiData.bAttitude = bAttitude;
|
||||||
gpSelected->pBasicPlacement->bAttitude = bAttitude;
|
gpSelected->pBasicPlacement->bAttitude = bAttitude;
|
||||||
UnclickEditorButtons( FIRST_MERCS_ATTITUDE_BUTTON, LAST_MERCS_ATTITUDE_BUTTON );
|
UnclickEditorButtons( FIRST_MERCS_ATTITUDE_BUTTON, LAST_MERCS_ATTITUDE_BUTTON );
|
||||||
ClickEditorButton( FIRST_MERCS_ATTITUDE_BUTTON + bAttitude );
|
ClickEditorButton( FIRST_MERCS_ATTITUDE_BUTTON + bAttitude );
|
||||||
@@ -1454,10 +1458,10 @@ void SetMercDirection( INT8 bDirection )
|
|||||||
gpSelected->pBasicPlacement->ubDirection = bDirection;
|
gpSelected->pBasicPlacement->ubDirection = bDirection;
|
||||||
|
|
||||||
// ATE: Changed these to call functions....
|
// ATE: Changed these to call functions....
|
||||||
EVENT_SetSoldierDirection( gpSelected->pSoldier, bDirection );
|
gpSelected->pSoldier->EVENT_SetSoldierDirection( bDirection );
|
||||||
EVENT_SetSoldierDesiredDirection( gpSelected->pSoldier, bDirection );
|
gpSelected->pSoldier->EVENT_SetSoldierDesiredDirection( bDirection );
|
||||||
|
|
||||||
ConvertAniCodeToAniFrame( gpSelected->pSoldier, 0 );
|
gpSelected->pSoldier->ConvertAniCodeToAniFrame( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetMercRelativeEquipment( INT8 bLevel )
|
void SetMercRelativeEquipment( INT8 bLevel )
|
||||||
@@ -1674,8 +1678,8 @@ void IndicateSelectedMerc( INT16 sID )
|
|||||||
gfRenderMercInfo = TRUE;
|
gfRenderMercInfo = TRUE;
|
||||||
//These calls will set the proper button states, even though it redundantly
|
//These calls will set the proper button states, even though it redundantly
|
||||||
//assigns the soldier with the same orders/attitude.
|
//assigns the soldier with the same orders/attitude.
|
||||||
SetMercOrders( gpSelected->pSoldier->bOrders );
|
SetMercOrders( gpSelected->pSoldier->aiData.bOrders );
|
||||||
SetMercAttitude( gpSelected->pSoldier->bAttitude );
|
SetMercAttitude( gpSelected->pSoldier->aiData.bAttitude );
|
||||||
SetMercDirection( gpSelected->pSoldier->ubDirection );
|
SetMercDirection( gpSelected->pSoldier->ubDirection );
|
||||||
if( gpSelected->pBasicPlacement->fPriorityExistance )
|
if( gpSelected->pBasicPlacement->fPriorityExistance )
|
||||||
ClickEditorButton( MERCS_PRIORITYEXISTANCE_CHECKBOX );
|
ClickEditorButton( MERCS_PRIORITYEXISTANCE_CHECKBOX );
|
||||||
@@ -1965,7 +1969,6 @@ void InitDetailedPlacementForMerc()
|
|||||||
{
|
{
|
||||||
Assert( !gpSelected->pDetailedPlacement );
|
Assert( !gpSelected->pDetailedPlacement );
|
||||||
|
|
||||||
// WDS - Clean up inventory handling
|
|
||||||
gpSelected->pDetailedPlacement = new SOLDIERCREATE_STRUCT;
|
gpSelected->pDetailedPlacement = new SOLDIERCREATE_STRUCT;
|
||||||
Assert( gpSelected->pDetailedPlacement );
|
Assert( gpSelected->pDetailedPlacement );
|
||||||
|
|
||||||
@@ -2018,13 +2021,7 @@ void ChangeBodyType( INT8 bOffset ) //+1 or -1 only
|
|||||||
pbArray = bCivArray;
|
pbArray = bCivArray;
|
||||||
iMax = MAX_CIVTYPES;
|
iMax = MAX_CIVTYPES;
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
AssertMsg( 0, "Unknown team");
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
iIndex = -1;
|
|
||||||
|
|
||||||
//find the matching bodytype index within the array.
|
//find the matching bodytype index within the array.
|
||||||
for( x = 0; x < iMax; x++ )
|
for( x = 0; x < iMax; x++ )
|
||||||
{
|
{
|
||||||
@@ -2045,7 +2042,7 @@ void ChangeBodyType( INT8 bOffset ) //+1 or -1 only
|
|||||||
{
|
{
|
||||||
gpSelected->pSoldier->ubBodyType = (UINT8)iIndex;
|
gpSelected->pSoldier->ubBodyType = (UINT8)iIndex;
|
||||||
//Set the flags based on the bodytype
|
//Set the flags based on the bodytype
|
||||||
gpSelected->pSoldier->uiStatusFlags &= ~(SOLDIER_VEHICLE | SOLDIER_ROBOT | SOLDIER_ANIMAL | SOLDIER_MONSTER);
|
gpSelected->pSoldier->flags.uiStatusFlags &= ~(SOLDIER_VEHICLE | SOLDIER_ROBOT | SOLDIER_ANIMAL | SOLDIER_MONSTER);
|
||||||
switch( gpSelected->pSoldier->ubBodyType )
|
switch( gpSelected->pSoldier->ubBodyType )
|
||||||
{
|
{
|
||||||
case ADULTFEMALEMONSTER:
|
case ADULTFEMALEMONSTER:
|
||||||
@@ -2055,15 +2052,15 @@ void ChangeBodyType( INT8 bOffset ) //+1 or -1 only
|
|||||||
case LARVAE_MONSTER:
|
case LARVAE_MONSTER:
|
||||||
case INFANT_MONSTER:
|
case INFANT_MONSTER:
|
||||||
case QUEENMONSTER:
|
case QUEENMONSTER:
|
||||||
gpSelected->pSoldier->uiStatusFlags |= SOLDIER_MONSTER;
|
gpSelected->pSoldier->flags.uiStatusFlags |= SOLDIER_MONSTER;
|
||||||
break;
|
break;
|
||||||
case BLOODCAT:
|
case BLOODCAT:
|
||||||
case COW:
|
case COW:
|
||||||
case CROW:
|
case CROW:
|
||||||
gpSelected->pSoldier->uiStatusFlags |= SOLDIER_ANIMAL;
|
gpSelected->pSoldier->flags.uiStatusFlags |= SOLDIER_ANIMAL;
|
||||||
break;
|
break;
|
||||||
case ROBOTNOWEAPON:
|
case ROBOTNOWEAPON:
|
||||||
gpSelected->pSoldier->uiStatusFlags |= SOLDIER_ROBOT;
|
gpSelected->pSoldier->flags.uiStatusFlags |= SOLDIER_ROBOT;
|
||||||
break;
|
break;
|
||||||
case HUMVEE:
|
case HUMVEE:
|
||||||
case ELDORADO:
|
case ELDORADO:
|
||||||
@@ -2071,11 +2068,11 @@ void ChangeBodyType( INT8 bOffset ) //+1 or -1 only
|
|||||||
case JEEP:
|
case JEEP:
|
||||||
case TANK_NW:
|
case TANK_NW:
|
||||||
case TANK_NE:
|
case TANK_NE:
|
||||||
gpSelected->pSoldier->uiStatusFlags |= SOLDIER_VEHICLE;
|
gpSelected->pSoldier->flags.uiStatusFlags |= SOLDIER_VEHICLE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
SetSoldierAnimationSurface( gpSelected->pSoldier, gpSelected->pSoldier->usAnimState );
|
SetSoldierAnimationSurface( gpSelected->pSoldier, gpSelected->pSoldier->usAnimState );
|
||||||
ConvertAniCodeToAniFrame( gpSelected->pSoldier, 0 );
|
gpSelected->pSoldier->ConvertAniCodeToAniFrame( 0 );
|
||||||
}
|
}
|
||||||
//Update the placement's info as well.
|
//Update the placement's info as well.
|
||||||
gpSelected->pBasicPlacement->bBodyType = (INT8)iIndex;
|
gpSelected->pBasicPlacement->bBodyType = (INT8)iIndex;
|
||||||
@@ -2088,7 +2085,7 @@ void ChangeBodyType( INT8 bOffset ) //+1 or -1 only
|
|||||||
gbCurrCreature = (INT8)iIndex;
|
gbCurrCreature = (INT8)iIndex;
|
||||||
AssignCreatureInventory( gpSelected->pSoldier );
|
AssignCreatureInventory( gpSelected->pSoldier );
|
||||||
}
|
}
|
||||||
CreateSoldierPalettes( gpSelected->pSoldier );
|
gpSelected->pSoldier->CreateSoldierPalettes( );
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetMercEditability( BOOLEAN fEditable )
|
void SetMercEditability( BOOLEAN fEditable )
|
||||||
@@ -2148,7 +2145,7 @@ void SpecifyEntryPoint( UINT32 iMapIndex )
|
|||||||
AddToUndoList( *psEntryGridNo );
|
AddToUndoList( *psEntryGridNo );
|
||||||
RemoveAllTopmostsOfTypeRange( *psEntryGridNo, FIRSTPOINTERS, FIRSTPOINTERS );
|
RemoveAllTopmostsOfTypeRange( *psEntryGridNo, FIRSTPOINTERS, FIRSTPOINTERS );
|
||||||
}
|
}
|
||||||
*psEntryGridNo = (UINT16)iMapIndex;
|
*psEntryGridNo = (INT16)iMapIndex;
|
||||||
ValidateEntryPointGridNo( psEntryGridNo );
|
ValidateEntryPointGridNo( psEntryGridNo );
|
||||||
AddToUndoList( *psEntryGridNo );
|
AddToUndoList( *psEntryGridNo );
|
||||||
AddTopmostToTail( *psEntryGridNo, FIRSTPOINTERS2 );
|
AddTopmostToTail( *psEntryGridNo, FIRSTPOINTERS2 );
|
||||||
@@ -2561,7 +2558,7 @@ void UpdateMercsInfo()
|
|||||||
SetFont( FONT10ARIAL );
|
SetFont( FONT10ARIAL );
|
||||||
SetFontForeground( FONT_WHITE );
|
SetFontForeground( FONT_WHITE );
|
||||||
SetFontShadow( FONT_NEARBLACK );
|
SetFontShadow( FONT_NEARBLACK );
|
||||||
switch( gpSelected->pSoldier->bOrders )
|
switch( gpSelected->pSoldier->aiData.bOrders )
|
||||||
{
|
{
|
||||||
case STATIONARY: mprintf( iScreenWidthOffset + 430, 2 * iScreenHeightOffset + 363, L"STATIONARY" ); break;
|
case STATIONARY: mprintf( iScreenWidthOffset + 430, 2 * iScreenHeightOffset + 363, L"STATIONARY" ); break;
|
||||||
case ONCALL: mprintf( iScreenWidthOffset + 430, 2 * iScreenHeightOffset + 363, L"ON CALL" ); break;
|
case ONCALL: mprintf( iScreenWidthOffset + 430, 2 * iScreenHeightOffset + 363, L"ON CALL" ); break;
|
||||||
@@ -2768,7 +2765,7 @@ void AddNewItemToSelectedMercsInventory( BOOLEAN fCreate )
|
|||||||
|
|
||||||
//randomize the status on non-ammo items.
|
//randomize the status on non-ammo items.
|
||||||
if( !(Item[ gpSelected->pDetailedPlacement->Inv[ gbMercSlotTypes[ gbCurrSelect ] ].usItem ].usItemClass & IC_AMMO) )
|
if( !(Item[ gpSelected->pDetailedPlacement->Inv[ gbMercSlotTypes[ gbCurrSelect ] ].usItem ].usItemClass & IC_AMMO) )
|
||||||
gpSelected->pDetailedPlacement->Inv[ gbMercSlotTypes[ gbCurrSelect ] ].ItemData.Generic.bStatus[0] = (INT8)(80 + Random( 21 ));
|
gpSelected->pDetailedPlacement->Inv[ gbMercSlotTypes[ gbCurrSelect ] ][0]->data.objectStatus = (INT8)(80 + Random( 21 ));
|
||||||
|
|
||||||
if( gusMercsNewItemIndex )
|
if( gusMercsNewItemIndex )
|
||||||
{
|
{
|
||||||
@@ -2974,8 +2971,6 @@ void UpdateMercItemSlots()
|
|||||||
{
|
{
|
||||||
if( gpSelected->pDetailedPlacement->ubProfile != NO_PROFILE )
|
if( gpSelected->pDetailedPlacement->ubProfile != NO_PROFILE )
|
||||||
{
|
{
|
||||||
// 0verhaul: Inventory is now a C++ class. Bad memcpy! No biscuit!
|
|
||||||
//memcpy( &gpSelected->pDetailedPlacement->Inv, &gpSelected->pSoldier->inv, sizeof( OBJECTTYPE ) * NUM_INV_SLOTS );
|
|
||||||
gpSelected->pDetailedPlacement->Inv = gpSelected->pSoldier->inv;
|
gpSelected->pDetailedPlacement->Inv = gpSelected->pSoldier->inv;
|
||||||
}
|
}
|
||||||
for( x = 0; x < 9; x++ )
|
for( x = 0; x < 9; x++ )
|
||||||
@@ -3001,7 +2996,7 @@ void SetDroppableCheckboxesBasedOnMercsInventory()
|
|||||||
for( i = 0; i < 9; i++ )
|
for( i = 0; i < 9; i++ )
|
||||||
{
|
{
|
||||||
pItem = &gpSelected->pDetailedPlacement->Inv[ gbMercSlotTypes[ i ] ];
|
pItem = &gpSelected->pDetailedPlacement->Inv[ gbMercSlotTypes[ i ] ];
|
||||||
if( pItem->fFlags & OBJECT_UNDROPPABLE )
|
if( (*pItem).fFlags & OBJECT_UNDROPPABLE )
|
||||||
{ //check box is clear
|
{ //check box is clear
|
||||||
UnclickEditorButton( MERCS_HEAD_SLOT + i );
|
UnclickEditorButton( MERCS_HEAD_SLOT + i );
|
||||||
}
|
}
|
||||||
@@ -3061,7 +3056,7 @@ void SetEnemyColorCode( UINT8 ubColorCode )
|
|||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
CreateSoldierPalettes( gpSelected->pSoldier );
|
gpSelected->pSoldier->CreateSoldierPalettes( );
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetEnemyDroppableStatus( UINT32 uiSlot, BOOLEAN fDroppable )
|
void SetEnemyDroppableStatus( UINT32 uiSlot, BOOLEAN fDroppable )
|
||||||
@@ -3085,7 +3080,7 @@ void SetEnemyDroppableStatus( UINT32 uiSlot, BOOLEAN fDroppable )
|
|||||||
}
|
}
|
||||||
if( gbCurrSelect != -1 && uiSlot == (UINT32)gbMercSlotTypes[ gbCurrSelect ] )
|
if( gbCurrSelect != -1 && uiSlot == (UINT32)gbMercSlotTypes[ gbCurrSelect ] )
|
||||||
{
|
{
|
||||||
if( gpMercSlotItem[ gbCurrSelect ]->usItem == NOTHING )
|
if( gpMercSlotItem[ gbCurrSelect ]->exists() == false )
|
||||||
SpecifyItemToEdit( gpMercSlotItem[ gbCurrSelect ], -1 );
|
SpecifyItemToEdit( gpMercSlotItem[ gbCurrSelect ], -1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3316,7 +3311,7 @@ void RegisterCurrentScheduleAction( INT32 iMapIndex )
|
|||||||
if( gfSingleAction )
|
if( gfSingleAction )
|
||||||
return;
|
return;
|
||||||
iDrawMode = DRAW_MODE_PLAYER + gpSelected->pBasicPlacement->bTeam;
|
iDrawMode = DRAW_MODE_PLAYER + gpSelected->pBasicPlacement->bTeam;
|
||||||
gCurrSchedule.usData2[ gubCurrentScheduleActionIndex ] = (UINT16)iMapIndex;
|
gCurrSchedule.usData2[ gubCurrentScheduleActionIndex ] = (INT16)iMapIndex;
|
||||||
SpecifyButtonText( iEditorButton[ MERCS_SCHEDULE_DATA1B + gubCurrentScheduleActionIndex ], str );
|
SpecifyButtonText( iEditorButton[ MERCS_SCHEDULE_DATA1B + gubCurrentScheduleActionIndex ], str );
|
||||||
DetermineScheduleEditability();
|
DetermineScheduleEditability();
|
||||||
gubScheduleInstructions = SCHEDULE_INSTRUCTIONS_NONE;
|
gubScheduleInstructions = SCHEDULE_INSTRUCTIONS_NONE;
|
||||||
@@ -3359,7 +3354,7 @@ void RegisterCurrentScheduleAction( INT32 iMapIndex )
|
|||||||
case SCHEDULE_ACTION_NONE:
|
case SCHEDULE_ACTION_NONE:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
gCurrSchedule.usData1[ gubCurrentScheduleActionIndex ] = (UINT16)iMapIndex;
|
gCurrSchedule.usData1[ gubCurrentScheduleActionIndex ] = (INT16)iMapIndex;
|
||||||
SpecifyButtonText( iEditorButton[ MERCS_SCHEDULE_DATA1A + gubCurrentScheduleActionIndex ], str );
|
SpecifyButtonText( iEditorButton[ MERCS_SCHEDULE_DATA1A + gubCurrentScheduleActionIndex ], str );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3430,7 +3425,7 @@ void UpdateScheduleAction( UINT8 ubNewAction )
|
|||||||
// 0:1A, 1:1B, 2:2A, 3:2B, ...
|
// 0:1A, 1:1B, 2:2A, 3:2B, ...
|
||||||
void FindScheduleGridNo( UINT8 ubScheduleData )
|
void FindScheduleGridNo( UINT8 ubScheduleData )
|
||||||
{
|
{
|
||||||
INT32 iMapIndex = 0xffff;
|
INT32 iMapIndex;
|
||||||
switch( ubScheduleData )
|
switch( ubScheduleData )
|
||||||
{
|
{
|
||||||
case 0: //1a
|
case 0: //1a
|
||||||
@@ -3459,7 +3454,6 @@ void FindScheduleGridNo( UINT8 ubScheduleData )
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
AssertMsg( 0, "FindScheduleGridNo passed incorrect dataID." );
|
AssertMsg( 0, "FindScheduleGridNo passed incorrect dataID." );
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
if( iMapIndex != 0xffff )
|
if( iMapIndex != 0xffff )
|
||||||
{
|
{
|
||||||
@@ -3606,7 +3600,6 @@ void CopyMercPlacement( INT32 iMapIndex )
|
|||||||
memcpy( &gSaveBufferBasicPlacement, gpSelected->pBasicPlacement, sizeof( BASIC_SOLDIERCREATE_STRUCT ) );
|
memcpy( &gSaveBufferBasicPlacement, gpSelected->pBasicPlacement, sizeof( BASIC_SOLDIERCREATE_STRUCT ) );
|
||||||
if( gSaveBufferBasicPlacement.fDetailedPlacement )
|
if( gSaveBufferBasicPlacement.fDetailedPlacement )
|
||||||
{
|
{
|
||||||
// WDS - Clean up inventory handling
|
|
||||||
gSaveBufferDetailedPlacement = *gpSelected->pDetailedPlacement;
|
gSaveBufferDetailedPlacement = *gpSelected->pDetailedPlacement;
|
||||||
}
|
}
|
||||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Placement copied." );
|
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Placement copied." );
|
||||||
@@ -3665,14 +3658,12 @@ void PasteMercPlacement( INT32 iMapIndex )
|
|||||||
|
|
||||||
//Set up some general information.
|
//Set up some general information.
|
||||||
//gTempBasicPlacement.fDetailedPlacement = TRUE;
|
//gTempBasicPlacement.fDetailedPlacement = TRUE;
|
||||||
gTempBasicPlacement.usStartingGridNo = (UINT16)iMapIndex;
|
gTempBasicPlacement.sStartingGridNo = (INT16)iMapIndex;
|
||||||
|
|
||||||
//Generate detailed placement information given the temp placement information.
|
//Generate detailed placement information given the temp placement information.
|
||||||
if( gTempBasicPlacement.fDetailedPlacement )
|
if( gTempBasicPlacement.fDetailedPlacement )
|
||||||
{
|
{
|
||||||
// WDS - Clean up inventory handling
|
gTempDetailedPlacement = gSaveBufferDetailedPlacement;
|
||||||
// WANNE: Removed the following line, didn't compile
|
|
||||||
//gTempDetailedPlacement = *gSaveBufferDetailedPlacement;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -3689,7 +3680,6 @@ void PasteMercPlacement( INT32 iMapIndex )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// WDS - Clean up inventory handling
|
|
||||||
tempDetailedPlacement = gTempDetailedPlacement;
|
tempDetailedPlacement = gTempDetailedPlacement;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3709,16 +3699,13 @@ void PasteMercPlacement( INT32 iMapIndex )
|
|||||||
//allocate memory for new static detailed placement
|
//allocate memory for new static detailed placement
|
||||||
gTempBasicPlacement.fDetailedPlacement = TRUE;
|
gTempBasicPlacement.fDetailedPlacement = TRUE;
|
||||||
gTempBasicPlacement.fPriorityExistance = gSaveBufferBasicPlacement.fPriorityExistance;
|
gTempBasicPlacement.fPriorityExistance = gSaveBufferBasicPlacement.fPriorityExistance;
|
||||||
// WDS - Clean up inventory handling
|
pNode->pDetailedPlacement = new SOLDIERCREATE_STRUCT(gSaveBufferDetailedPlacement);
|
||||||
pNode->pDetailedPlacement = new SOLDIERCREATE_STRUCT;
|
//copy the file information from temp var to node in list.
|
||||||
if( !pNode->pDetailedPlacement )
|
if( !pNode->pDetailedPlacement )
|
||||||
{
|
{
|
||||||
AssertMsg( 0, "Failed to allocate memory for new detailed placement in PasteMercPlacement." );
|
AssertMsg( 0, "Failed to allocate memory for new detailed placement in PasteMercPlacement." );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//copy the file information from temp var to node in list.
|
|
||||||
// WDS - Clean up inventory handling
|
|
||||||
*pNode->pDetailedPlacement = gSaveBufferDetailedPlacement;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Add the soldier to physically appear on the map now.
|
//Add the soldier to physically appear on the map now.
|
||||||
@@ -3731,7 +3718,7 @@ void PasteMercPlacement( INT32 iMapIndex )
|
|||||||
gpSelected->pBasicPlacement->fOnRoof = TRUE;
|
gpSelected->pBasicPlacement->fOnRoof = TRUE;
|
||||||
if( gpSelected->pDetailedPlacement )
|
if( gpSelected->pDetailedPlacement )
|
||||||
gpSelected->pDetailedPlacement->fOnRoof = TRUE;
|
gpSelected->pDetailedPlacement->fOnRoof = TRUE;
|
||||||
SetSoldierHeight( gpSelected->pSoldier, 58.0 );
|
gpSelected->pSoldier->SetSoldierHeight( 58.0 );
|
||||||
}
|
}
|
||||||
UnclickEditorButtons( FIRST_MERCS_INVENTORY_BUTTON, LAST_MERCS_INVENTORY_BUTTON );
|
UnclickEditorButtons( FIRST_MERCS_INVENTORY_BUTTON, LAST_MERCS_INVENTORY_BUTTON );
|
||||||
for( i = FIRST_MERCS_INVENTORY_BUTTON; i <= LAST_MERCS_INVENTORY_BUTTON; i++ )
|
for( i = FIRST_MERCS_INVENTORY_BUTTON; i <= LAST_MERCS_INVENTORY_BUTTON; i++ )
|
||||||
@@ -3755,3 +3742,4 @@ void PasteMercPlacement( INT32 iMapIndex )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -282,3 +282,4 @@ void TerrainFill( UINT32 iMapIndex )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
<VisualStudioProject
|
<VisualStudioProject
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="8,00"
|
Version="8.00"
|
||||||
Name="Editor_2005Express"
|
Name="Editor_2005Express"
|
||||||
ProjectGUID="{60D793F2-90B4-43C9-83B5-221EE11B37E6}"
|
ProjectGUID="{60D793F2-90B4-43C9-83B5-221EE11B37E6}"
|
||||||
RootNamespace="Editor_2005Express"
|
RootNamespace="Editor_2005Express"
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
AdditionalOptions="/D "_CRT_SECURE_NO_DEPRECATE"
"
|
AdditionalOptions="/D "_CRT_SECURE_NO_DEPRECATE""
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;"
|
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="true"
|
||||||
@@ -103,7 +103,6 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
AdditionalOptions="/D "_CRT_SECURE_NO_DEPRECATE""
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;"
|
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;"
|
||||||
RuntimeLibrary="0"
|
RuntimeLibrary="0"
|
||||||
RuntimeTypeInfo="false"
|
RuntimeTypeInfo="false"
|
||||||
@@ -139,6 +138,69 @@
|
|||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
/>
|
/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="MapEditor|Win32"
|
||||||
|
OutputDirectory="MapEditor"
|
||||||
|
IntermediateDirectory="MapEditor"
|
||||||
|
ConfigurationType="4"
|
||||||
|
InheritedPropertySheets="..\ja2_2005Express.vsprops;..\ja2_2005ExpressEditor.vsprops"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="1"
|
||||||
|
RuntimeTypeInfo="false"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
DisableSpecificWarnings="4100"
|
||||||
|
/>
|
||||||
|
<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>
|
</Configurations>
|
||||||
<References>
|
<References>
|
||||||
</References>
|
</References>
|
||||||
|
|||||||
+196
-149
@@ -20,7 +20,6 @@
|
|||||||
#include "Item Statistics.h"
|
#include "Item Statistics.h"
|
||||||
#include "Text Input.h"
|
#include "Text Input.h"
|
||||||
#include "Action Items.h"
|
#include "Action Items.h"
|
||||||
#include "Item types.h"
|
|
||||||
#include "video.h"
|
#include "video.h"
|
||||||
#include "Simple Render Utils.h"
|
#include "Simple Render Utils.h"
|
||||||
#include "Weapons.h"
|
#include "Weapons.h"
|
||||||
@@ -81,9 +80,9 @@ const STR16 GetActionItemName( OBJECTTYPE *pItem )
|
|||||||
{
|
{
|
||||||
if( !pItem || pItem->usItem != ACTION_ITEM )
|
if( !pItem || pItem->usItem != ACTION_ITEM )
|
||||||
return NULL;
|
return NULL;
|
||||||
if( pItem->ItemData.Trigger.bActionValue != ACTION_ITEM_BLOW_UP )
|
if( (*pItem)[0]->data.misc.bActionValue != ACTION_ITEM_BLOW_UP )
|
||||||
{
|
{
|
||||||
switch( pItem->ItemData.Trigger.bActionValue )
|
switch( (*pItem)[0]->data.misc.bActionValue )
|
||||||
{
|
{
|
||||||
case ACTION_ITEM_OPEN_DOOR: return gszActionItemDesc[ ACTIONITEM_OPEN ];
|
case ACTION_ITEM_OPEN_DOOR: return gszActionItemDesc[ ACTIONITEM_OPEN ];
|
||||||
case ACTION_ITEM_CLOSE_DOOR: return gszActionItemDesc[ ACTIONITEM_CLOSE ];
|
case ACTION_ITEM_CLOSE_DOOR: return gszActionItemDesc[ ACTIONITEM_CLOSE ];
|
||||||
@@ -111,7 +110,7 @@ const STR16 GetActionItemName( OBJECTTYPE *pItem )
|
|||||||
default: return NULL;
|
default: return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else switch( pItem->ItemData.Trigger.usBombItem )
|
else switch( (*pItem)[0]->data.misc.usBombItem )
|
||||||
{
|
{
|
||||||
case STUN_GRENADE: return gszActionItemDesc[ ACTIONITEM_STUN ];
|
case STUN_GRENADE: return gszActionItemDesc[ ACTIONITEM_STUN ];
|
||||||
case SMOKE_GRENADE: return gszActionItemDesc[ ACTIONITEM_SMOKE ];
|
case SMOKE_GRENADE: return gszActionItemDesc[ ACTIONITEM_SMOKE ];
|
||||||
@@ -165,6 +164,7 @@ enum
|
|||||||
EDITING_GUNS,
|
EDITING_GUNS,
|
||||||
EDITING_AMMO,
|
EDITING_AMMO,
|
||||||
EDITING_ARMOUR,
|
EDITING_ARMOUR,
|
||||||
|
EDITING_LBEGEAR,
|
||||||
EDITING_EQUIPMENT,
|
EDITING_EQUIPMENT,
|
||||||
EDITING_EXPLOSIVES,
|
EDITING_EXPLOSIVES,
|
||||||
EDITING_MONEY,
|
EDITING_MONEY,
|
||||||
@@ -198,6 +198,10 @@ void SetupArmourGUI();
|
|||||||
void ExtractAndUpdateArmourGUI();
|
void ExtractAndUpdateArmourGUI();
|
||||||
void RemoveArmourGUI();
|
void RemoveArmourGUI();
|
||||||
|
|
||||||
|
void SetupLBEGUI();
|
||||||
|
void ExtractAndUpdateLBEGUI();
|
||||||
|
void RemoveLBEGUI();
|
||||||
|
|
||||||
void SetupEquipGUI();
|
void SetupEquipGUI();
|
||||||
void ExtractAndUpdateEquipGUI();
|
void ExtractAndUpdateEquipGUI();
|
||||||
void RemoveEquipGUI();
|
void RemoveEquipGUI();
|
||||||
@@ -277,6 +281,7 @@ void ExecuteItemStatsCmd( UINT8 ubAction )
|
|||||||
case EDITING_GUNS: ExtractAndUpdateGunGUI(); break;
|
case EDITING_GUNS: ExtractAndUpdateGunGUI(); break;
|
||||||
case EDITING_AMMO: ExtractAndUpdateAmmoGUI(); break;
|
case EDITING_AMMO: ExtractAndUpdateAmmoGUI(); break;
|
||||||
case EDITING_ARMOUR: ExtractAndUpdateArmourGUI(); break;
|
case EDITING_ARMOUR: ExtractAndUpdateArmourGUI(); break;
|
||||||
|
case EDITING_LBEGEAR: ExtractAndUpdateLBEGUI(); break;
|
||||||
case EDITING_EQUIPMENT: ExtractAndUpdateEquipGUI(); break;
|
case EDITING_EQUIPMENT: ExtractAndUpdateEquipGUI(); break;
|
||||||
case EDITING_EXPLOSIVES: ExtractAndUpdateExplosivesGUI(); break;
|
case EDITING_EXPLOSIVES: ExtractAndUpdateExplosivesGUI(); break;
|
||||||
case EDITING_MONEY: ExtractAndUpdateMoneyGUI(); break;
|
case EDITING_MONEY: ExtractAndUpdateMoneyGUI(); break;
|
||||||
@@ -328,6 +333,7 @@ void RemoveItemGUI()
|
|||||||
case EDITING_GUNS: RemoveGunGUI(); break;
|
case EDITING_GUNS: RemoveGunGUI(); break;
|
||||||
case EDITING_AMMO: RemoveAmmoGUI(); break;
|
case EDITING_AMMO: RemoveAmmoGUI(); break;
|
||||||
case EDITING_ARMOUR: RemoveArmourGUI(); break;
|
case EDITING_ARMOUR: RemoveArmourGUI(); break;
|
||||||
|
case EDITING_LBEGEAR: RemoveLBEGUI(); break;
|
||||||
case EDITING_EQUIPMENT: RemoveEquipGUI(); break;
|
case EDITING_EQUIPMENT: RemoveEquipGUI(); break;
|
||||||
case EDITING_EXPLOSIVES: RemoveExplosivesGUI(); break;
|
case EDITING_EXPLOSIVES: RemoveExplosivesGUI(); break;
|
||||||
case EDITING_MONEY: RemoveMoneyGUI(); break;
|
case EDITING_MONEY: RemoveMoneyGUI(); break;
|
||||||
@@ -412,6 +418,10 @@ void SpecifyItemToEdit( OBJECTTYPE *pItem, INT32 iMapIndex )
|
|||||||
gbEditingMode = EDITING_ARMOUR;
|
gbEditingMode = EDITING_ARMOUR;
|
||||||
SetupArmourGUI();
|
SetupArmourGUI();
|
||||||
break;
|
break;
|
||||||
|
case IC_LBEGEAR:
|
||||||
|
gbEditingMode = EDITING_LBEGEAR;
|
||||||
|
SetupLBEGUI();
|
||||||
|
break;
|
||||||
case IC_MEDKIT:
|
case IC_MEDKIT:
|
||||||
case IC_KIT:
|
case IC_KIT:
|
||||||
case IC_MISC:
|
case IC_MISC:
|
||||||
@@ -435,7 +445,7 @@ void SpecifyItemToEdit( OBJECTTYPE *pItem, INT32 iMapIndex )
|
|||||||
SetupKeysGUI();
|
SetupKeysGUI();
|
||||||
break;
|
break;
|
||||||
case IC_PUNCH:
|
case IC_PUNCH:
|
||||||
if ( gpItem->usItem != NOTHING)
|
if ( gpItem->exists() == true)
|
||||||
{
|
{
|
||||||
gbEditingMode = EDITING_EQUIPMENT;
|
gbEditingMode = EDITING_EQUIPMENT;
|
||||||
SetupEquipGUI();
|
SetupEquipGUI();
|
||||||
@@ -444,7 +454,7 @@ void SpecifyItemToEdit( OBJECTTYPE *pItem, INT32 iMapIndex )
|
|||||||
// else fall through and act as nothing
|
// else fall through and act as nothing
|
||||||
case IC_NONE:
|
case IC_NONE:
|
||||||
gbEditingMode = EDITING_NOTHING;
|
gbEditingMode = EDITING_NOTHING;
|
||||||
if( !(gpItem->fFlags & OBJECT_UNDROPPABLE) )
|
if( !((*gpItem).fFlags & OBJECT_UNDROPPABLE) )
|
||||||
gbEditingMode = EDITING_DROPPABLE;
|
gbEditingMode = EDITING_DROPPABLE;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -516,6 +526,7 @@ void UpdateItemStatsPanel()
|
|||||||
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 404, L"Trap Level" );
|
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 404, L"Trap Level" );
|
||||||
break;
|
break;
|
||||||
case EDITING_ARMOUR:
|
case EDITING_ARMOUR:
|
||||||
|
case EDITING_LBEGEAR:
|
||||||
case EDITING_EQUIPMENT:
|
case EDITING_EQUIPMENT:
|
||||||
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 384, L"Status" );
|
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 384, L"Status" );
|
||||||
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 404, L"Trap Level" );
|
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 404, L"Trap Level" );
|
||||||
@@ -535,7 +546,7 @@ void UpdateItemStatsPanel()
|
|||||||
case EDITING_TRIGGERS:
|
case EDITING_TRIGGERS:
|
||||||
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 369, L"Trap Level");
|
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 369, L"Trap Level");
|
||||||
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 389, L"Tolerance" );
|
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 389, L"Tolerance" );
|
||||||
if( gpEditingItemPool && gpItem->ItemData.Trigger.BombTrigger.bFrequency >= PANIC_FREQUENCY_3 && gpItem->ItemData.Trigger.BombTrigger.bFrequency <= PANIC_FREQUENCY )
|
if( gpEditingItemPool && (*gpItem)[0]->data.misc.bFrequency >= PANIC_FREQUENCY_3 && (*gpItem)[0]->data.misc.bFrequency <= PANIC_FREQUENCY )
|
||||||
mprintf( iScreenWidthOffset + 500, 2 * iScreenHeightOffset + 407, L"Alarm Trigger" );
|
mprintf( iScreenWidthOffset + 500, 2 * iScreenHeightOffset + 407, L"Alarm Trigger" );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -644,11 +655,11 @@ void SetupGunGUI()
|
|||||||
CHAR16 str[20];
|
CHAR16 str[20];
|
||||||
INT16 yp;
|
INT16 yp;
|
||||||
memset( gfAttachment, 0, NUM_ATTACHMENT_BUTTONS );
|
memset( gfAttachment, 0, NUM_ATTACHMENT_BUTTONS );
|
||||||
swprintf( str, L"%d", gpItem->ItemData.Gun.bGunStatus );
|
swprintf( str, L"%d", (*gpItem)[0]->data.gun.bGunStatus );
|
||||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
||||||
swprintf( str, L"%d", gpItem->ItemData.Gun.ubGunShotsLeft );
|
swprintf( str, L"%d", (*gpItem)[0]->data.gun.ubGunShotsLeft );
|
||||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 400, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 400, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
||||||
swprintf( str, L"%d", gpItem->bTrap );
|
swprintf( str, L"%d", (*gpItem)[0]->data.bTrap );
|
||||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 420, 25, 15, MSYS_PRIORITY_NORMAL, str, 2, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 420, 25, 15, MSYS_PRIORITY_NORMAL, str, 2, INPUTTYPE_NUMERICSTRICT );
|
||||||
if( gpEditingItemPool )
|
if( gpEditingItemPool )
|
||||||
{
|
{
|
||||||
@@ -665,7 +676,7 @@ void SetupGunGUI()
|
|||||||
CreateTextButton( L"SILENCER", SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
|
CreateTextButton( L"SILENCER", SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
|
||||||
iScreenWidthOffset + 570, yp, 60, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, ToggleAttachment );
|
iScreenWidthOffset + 570, yp, 60, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, ToggleAttachment );
|
||||||
yp += 14;
|
yp += 14;
|
||||||
if( FindAttachment( gpItem, SILENCER ) != -1 )
|
if( FindAttachment( gpItem, SILENCER ) )
|
||||||
{
|
{
|
||||||
ButtonList[ guiAttachmentButton[ SILENCER_ATTACHMENT_BUTTON ] ]->uiFlags |= BUTTON_CLICKED_ON;
|
ButtonList[ guiAttachmentButton[ SILENCER_ATTACHMENT_BUTTON ] ]->uiFlags |= BUTTON_CLICKED_ON;
|
||||||
gfAttachment[0] = TRUE;
|
gfAttachment[0] = TRUE;
|
||||||
@@ -678,7 +689,7 @@ void SetupGunGUI()
|
|||||||
CreateTextButton( L"SNIPERSCOPE", SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
|
CreateTextButton( L"SNIPERSCOPE", SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
|
||||||
iScreenWidthOffset + 570, yp, 60, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, ToggleAttachment );
|
iScreenWidthOffset + 570, yp, 60, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, ToggleAttachment );
|
||||||
yp += 14;
|
yp += 14;
|
||||||
if( FindAttachment( gpItem, SNIPERSCOPE ) != -1 )
|
if( FindAttachment( gpItem, SNIPERSCOPE ) )
|
||||||
{
|
{
|
||||||
ButtonList[ guiAttachmentButton[ SNIPERSCOPE_ATTACHMENT_BUTTON ] ]->uiFlags |= BUTTON_CLICKED_ON;
|
ButtonList[ guiAttachmentButton[ SNIPERSCOPE_ATTACHMENT_BUTTON ] ]->uiFlags |= BUTTON_CLICKED_ON;
|
||||||
gfAttachment[1] = TRUE;
|
gfAttachment[1] = TRUE;
|
||||||
@@ -691,7 +702,7 @@ void SetupGunGUI()
|
|||||||
CreateTextButton( L"LASERSCOPE", SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
|
CreateTextButton( L"LASERSCOPE", SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
|
||||||
iScreenWidthOffset + 570, yp, 60, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, ToggleAttachment );
|
iScreenWidthOffset + 570, yp, 60, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, ToggleAttachment );
|
||||||
yp += 14;
|
yp += 14;
|
||||||
if( FindAttachment( gpItem, LASERSCOPE ) != -1 )
|
if( FindAttachment( gpItem, LASERSCOPE ) )
|
||||||
{
|
{
|
||||||
ButtonList[ guiAttachmentButton[ LASERSCOPE_ATTACHMENT_BUTTON ] ]->uiFlags |= BUTTON_CLICKED_ON;
|
ButtonList[ guiAttachmentButton[ LASERSCOPE_ATTACHMENT_BUTTON ] ]->uiFlags |= BUTTON_CLICKED_ON;
|
||||||
gfAttachment[2] = TRUE;
|
gfAttachment[2] = TRUE;
|
||||||
@@ -704,7 +715,7 @@ void SetupGunGUI()
|
|||||||
CreateTextButton( L"BIPOD", SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
|
CreateTextButton( L"BIPOD", SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
|
||||||
iScreenWidthOffset + 570, yp, 60, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, ToggleAttachment );
|
iScreenWidthOffset + 570, yp, 60, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, ToggleAttachment );
|
||||||
yp += 14;
|
yp += 14;
|
||||||
if( FindAttachment( gpItem, BIPOD ) != -1 )
|
if( FindAttachment( gpItem, BIPOD ) )
|
||||||
{
|
{
|
||||||
ButtonList[ guiAttachmentButton[ BIPOD_ATTACHMENT_BUTTON ] ]->uiFlags |= BUTTON_CLICKED_ON;
|
ButtonList[ guiAttachmentButton[ BIPOD_ATTACHMENT_BUTTON ] ]->uiFlags |= BUTTON_CLICKED_ON;
|
||||||
gfAttachment[3] = TRUE;
|
gfAttachment[3] = TRUE;
|
||||||
@@ -717,7 +728,7 @@ void SetupGunGUI()
|
|||||||
CreateTextButton( L"DUCKBILL", SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
|
CreateTextButton( L"DUCKBILL", SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
|
||||||
iScreenWidthOffset + 570, yp, 60, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, ToggleAttachment );
|
iScreenWidthOffset + 570, yp, 60, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, ToggleAttachment );
|
||||||
yp += 14;
|
yp += 14;
|
||||||
if( FindAttachment( gpItem, DUCKBILL ) != -1 )
|
if( FindAttachment( gpItem, DUCKBILL ) )
|
||||||
{
|
{
|
||||||
ButtonList[ guiAttachmentButton[ DUCKBILL_ATTACHMENT_BUTTON ] ]->uiFlags |= BUTTON_CLICKED_ON;
|
ButtonList[ guiAttachmentButton[ DUCKBILL_ATTACHMENT_BUTTON ] ]->uiFlags |= BUTTON_CLICKED_ON;
|
||||||
gfAttachment[4] = TRUE;
|
gfAttachment[4] = TRUE;
|
||||||
@@ -730,7 +741,7 @@ void SetupGunGUI()
|
|||||||
CreateTextButton( L"G-LAUNCHER", SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
|
CreateTextButton( L"G-LAUNCHER", SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
|
||||||
iScreenWidthOffset + 570, yp, 60, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, ToggleAttachment );
|
iScreenWidthOffset + 570, yp, 60, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, ToggleAttachment );
|
||||||
yp += 14;
|
yp += 14;
|
||||||
if( FindAttachment( gpItem, UNDER_GLAUNCHER ) != -1 )
|
if( FindAttachment( gpItem, UNDER_GLAUNCHER ) )
|
||||||
{
|
{
|
||||||
ButtonList[ guiAttachmentButton[ GLAUNCHER_ATTACHMENT_BUTTON ] ]->uiFlags |= BUTTON_CLICKED_ON;
|
ButtonList[ guiAttachmentButton[ GLAUNCHER_ATTACHMENT_BUTTON ] ]->uiFlags |= BUTTON_CLICKED_ON;
|
||||||
gfAttachment[5] = TRUE;
|
gfAttachment[5] = TRUE;
|
||||||
@@ -761,7 +772,7 @@ void ExtractAndUpdateGunGUI()
|
|||||||
i = 20 + Random( 81 );
|
i = 20 + Random( 81 );
|
||||||
else
|
else
|
||||||
i = min( i, 100 );
|
i = min( i, 100 );
|
||||||
gpItem->ItemData.Gun.bGunStatus = (INT8)i;
|
(*gpItem)[0]->data.gun.bGunStatus = (INT8)i;
|
||||||
SetInputFieldStringWithNumericStrictValue( 1, i );
|
SetInputFieldStringWithNumericStrictValue( 1, i );
|
||||||
//Update the ammo
|
//Update the ammo
|
||||||
i = GetNumericStrictValueFromField( 2 );
|
i = GetNumericStrictValueFromField( 2 );
|
||||||
@@ -769,12 +780,12 @@ void ExtractAndUpdateGunGUI()
|
|||||||
i = Random( 1 + Weapon[ gpItem->usItem ].ubMagSize );
|
i = Random( 1 + Weapon[ gpItem->usItem ].ubMagSize );
|
||||||
else
|
else
|
||||||
i = min( i, Weapon[ gpItem->usItem ].ubMagSize );
|
i = min( i, Weapon[ gpItem->usItem ].ubMagSize );
|
||||||
gpItem->ItemData.Gun.ubGunShotsLeft = (UINT8)i;
|
(*gpItem)[0]->data.gun.ubGunShotsLeft = (UINT8)i;
|
||||||
SetInputFieldStringWithNumericStrictValue( 2, i );
|
SetInputFieldStringWithNumericStrictValue( 2, i );
|
||||||
//Update the trap level
|
//Update the trap level
|
||||||
i = GetNumericStrictValueFromField( 3 );
|
i = GetNumericStrictValueFromField( 3 );
|
||||||
i = ( i == -1 ) ? 0 : min( i, 20 );
|
i = ( i == -1 ) ? 0 : min( i, 20 );
|
||||||
gpItem->bTrap = (INT8)i;
|
(*gpItem)[0]->data.bTrap = (INT8)i;
|
||||||
SetInputFieldStringWithNumericStrictValue( 3, i );
|
SetInputFieldStringWithNumericStrictValue( 3, i );
|
||||||
if( gpEditingItemPool )
|
if( gpEditingItemPool )
|
||||||
{
|
{
|
||||||
@@ -790,7 +801,7 @@ void SetupAmmoGUI()
|
|||||||
CHAR16 str[20];
|
CHAR16 str[20];
|
||||||
swprintf( str, L"%d", gpItem->ubNumberOfObjects );
|
swprintf( str, L"%d", gpItem->ubNumberOfObjects );
|
||||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 25, 15, MSYS_PRIORITY_NORMAL, str, 1, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 25, 15, MSYS_PRIORITY_NORMAL, str, 1, INPUTTYPE_NUMERICSTRICT );
|
||||||
swprintf( str, L"%d", gpItem->bTrap );
|
swprintf( str, L"%d", (*gpItem)[0]->data.bTrap );
|
||||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 400, 25, 15, MSYS_PRIORITY_NORMAL, str, 2, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 400, 25, 15, MSYS_PRIORITY_NORMAL, str, 2, INPUTTYPE_NUMERICSTRICT );
|
||||||
if( gpEditingItemPool )
|
if( gpEditingItemPool )
|
||||||
{
|
{
|
||||||
@@ -810,16 +821,15 @@ void ExtractAndUpdateAmmoGUI()
|
|||||||
//Update the number of clips
|
//Update the number of clips
|
||||||
i = GetNumericStrictValueFromField( 1 );
|
i = GetNumericStrictValueFromField( 1 );
|
||||||
if( i == -1 )
|
if( i == -1 )
|
||||||
i = 1 + Random( Item[ gpItem->usItem ].ubPerPocket );
|
i = 1 + Random( ItemSlotLimit(gpItem, STACK_SIZE_LIMIT) );
|
||||||
else
|
else
|
||||||
i = max( 1, min( i, Item[ gpItem->usItem ].ubPerPocket ) );
|
i = max( 1, min( i, ItemSlotLimit(gpItem, STACK_SIZE_LIMIT) ) );
|
||||||
gpItem->ubNumberOfObjects = (UINT8)i;
|
|
||||||
SetInputFieldStringWithNumericStrictValue( 1, i );
|
SetInputFieldStringWithNumericStrictValue( 1, i );
|
||||||
CreateItems( gpItem->usItem, 100, gpItem->ubNumberOfObjects, gpItem );
|
CreateItems( gpItem->usItem, 100, i, gpItem );
|
||||||
//Update the trap level
|
//Update the trap level
|
||||||
i = GetNumericStrictValueFromField( 2 );
|
i = GetNumericStrictValueFromField( 2 );
|
||||||
i = ( i == -1 ) ? 0 : min( i, 20 );
|
i = ( i == -1 ) ? 0 : min( i, 20 );
|
||||||
gpItem->bTrap = (INT8)i;
|
(*gpItem)[0]->data.bTrap = (INT8)i;
|
||||||
SetInputFieldStringWithNumericStrictValue( 2, i );
|
SetInputFieldStringWithNumericStrictValue( 2, i );
|
||||||
if( gpEditingItemPool )
|
if( gpEditingItemPool )
|
||||||
{
|
{
|
||||||
@@ -833,9 +843,9 @@ void ExtractAndUpdateAmmoGUI()
|
|||||||
void SetupArmourGUI()
|
void SetupArmourGUI()
|
||||||
{
|
{
|
||||||
CHAR16 str[20];
|
CHAR16 str[20];
|
||||||
swprintf( str, L"%d", gpItem->ItemData.Generic.bStatus[0] );
|
swprintf( str, L"%d", (*gpItem)[0]->data.objectStatus );
|
||||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
||||||
swprintf( str, L"%d", gpItem->bTrap );
|
swprintf( str, L"%d", (*gpItem)[0]->data.bTrap );
|
||||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 400, 25, 15, MSYS_PRIORITY_NORMAL, str, 2, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 400, 25, 15, MSYS_PRIORITY_NORMAL, str, 2, INPUTTYPE_NUMERICSTRICT );
|
||||||
if( gpEditingItemPool )
|
if( gpEditingItemPool )
|
||||||
{
|
{
|
||||||
@@ -849,7 +859,7 @@ void SetupArmourGUI()
|
|||||||
guiCeramicPlatesButton =
|
guiCeramicPlatesButton =
|
||||||
CreateTextButton( L"CERAMIC PLATES", SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
|
CreateTextButton( L"CERAMIC PLATES", SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
|
||||||
iScreenWidthOffset + 558, 2 * iScreenHeightOffset + 375, 72, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, ToggleCeramicPlates );
|
iScreenWidthOffset + 558, 2 * iScreenHeightOffset + 375, 72, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, ToggleCeramicPlates );
|
||||||
if( FindAttachment( gpItem, CERAMIC_PLATES ) != -1 )
|
if( FindAttachment( gpItem, CERAMIC_PLATES ) )
|
||||||
{
|
{
|
||||||
ButtonList[ guiCeramicPlatesButton ]->uiFlags |= BUTTON_CLICKED_ON;
|
ButtonList[ guiCeramicPlatesButton ]->uiFlags |= BUTTON_CLICKED_ON;
|
||||||
gfCeramicPlates = TRUE;
|
gfCeramicPlates = TRUE;
|
||||||
@@ -875,12 +885,56 @@ void ExtractAndUpdateArmourGUI()
|
|||||||
i = 20 + Random( 81 );
|
i = 20 + Random( 81 );
|
||||||
else
|
else
|
||||||
i = min( i, 100 );
|
i = min( i, 100 );
|
||||||
gpItem->ItemData.Generic.bStatus[0] = (INT8)i;
|
(*gpItem)[0]->data.objectStatus = (INT8)i;
|
||||||
SetInputFieldStringWithNumericStrictValue( 1, i );
|
SetInputFieldStringWithNumericStrictValue( 1, i );
|
||||||
//Update the trap level
|
//Update the trap level
|
||||||
i = GetNumericStrictValueFromField( 2 );
|
i = GetNumericStrictValueFromField( 2 );
|
||||||
i = ( i == -1 ) ? 0 : min( i, 20 );
|
i = ( i == -1 ) ? 0 : min( i, 20 );
|
||||||
gpItem->bTrap = (INT8)i;
|
(*gpItem)[0]->data.bTrap = (INT8)i;
|
||||||
|
SetInputFieldStringWithNumericStrictValue( 2, i );
|
||||||
|
if( gpEditingItemPool )
|
||||||
|
{
|
||||||
|
giDefaultExistChance = GetNumericStrictValueFromField( 3 );
|
||||||
|
giDefaultExistChance = ( giDefaultExistChance == -1 ) ? 100 : max( 1, min( giDefaultExistChance, 100 ) );
|
||||||
|
gWorldItems[ gpEditingItemPool->iItemIndex ].ubNonExistChance = (UINT8)(100 - giDefaultExistChance );
|
||||||
|
SetInputFieldStringWithNumericStrictValue( 3, giDefaultExistChance );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetupLBEGUI()
|
||||||
|
{
|
||||||
|
CHAR16 str[20];
|
||||||
|
swprintf( str, L"%d", (*gpItem)[0]->data.objectStatus );
|
||||||
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
||||||
|
swprintf( str, L"%d", (*gpItem)[0]->data.bTrap );
|
||||||
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 400, 25, 15, MSYS_PRIORITY_NORMAL, str, 2, INPUTTYPE_NUMERICSTRICT );
|
||||||
|
if( gpEditingItemPool )
|
||||||
|
{
|
||||||
|
swprintf( str, L"%d", 100 - gWorldItems[ gpEditingItemPool->iItemIndex ].ubNonExistChance );
|
||||||
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 440, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void RemoveLBEGUI()
|
||||||
|
{
|
||||||
|
//nothing to remove
|
||||||
|
}
|
||||||
|
|
||||||
|
void ExtractAndUpdateLBEGUI()
|
||||||
|
{
|
||||||
|
INT32 i;
|
||||||
|
//Update the equipment status
|
||||||
|
i = GetNumericStrictValueFromField( 1 );
|
||||||
|
if( i == -1 )
|
||||||
|
i = 20 + Random( 81 );
|
||||||
|
else
|
||||||
|
i = min( i, 100 );
|
||||||
|
(*gpItem)[0]->data.objectStatus = (INT8)i;
|
||||||
|
SetInputFieldStringWithNumericStrictValue( 1, i );
|
||||||
|
//Update the trap level
|
||||||
|
i = GetNumericStrictValueFromField( 2 );
|
||||||
|
i = ( i == -1 ) ? 0 : min( i, 20 );
|
||||||
|
(*gpItem)[0]->data.bTrap = (INT8)i;
|
||||||
SetInputFieldStringWithNumericStrictValue( 2, i );
|
SetInputFieldStringWithNumericStrictValue( 2, i );
|
||||||
if( gpEditingItemPool )
|
if( gpEditingItemPool )
|
||||||
{
|
{
|
||||||
@@ -894,9 +948,9 @@ void ExtractAndUpdateArmourGUI()
|
|||||||
void SetupEquipGUI()
|
void SetupEquipGUI()
|
||||||
{
|
{
|
||||||
CHAR16 str[20];
|
CHAR16 str[20];
|
||||||
swprintf( str, L"%d", gpItem->ItemData.Generic.bStatus[0] );
|
swprintf( str, L"%d", (*gpItem)[0]->data.objectStatus );
|
||||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
||||||
swprintf( str, L"%d", gpItem->bTrap );
|
swprintf( str, L"%d", (*gpItem)[0]->data.bTrap );
|
||||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 400, 25, 15, MSYS_PRIORITY_NORMAL, str, 2, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 400, 25, 15, MSYS_PRIORITY_NORMAL, str, 2, INPUTTYPE_NUMERICSTRICT );
|
||||||
if( gpEditingItemPool )
|
if( gpEditingItemPool )
|
||||||
{
|
{
|
||||||
@@ -919,12 +973,12 @@ void ExtractAndUpdateEquipGUI()
|
|||||||
i = 20 + Random( 81 );
|
i = 20 + Random( 81 );
|
||||||
else
|
else
|
||||||
i = min( i, 100 );
|
i = min( i, 100 );
|
||||||
gpItem->ItemData.Generic.bStatus[0] = (INT8)i;
|
(*gpItem)[0]->data.objectStatus = (INT8)i;
|
||||||
SetInputFieldStringWithNumericStrictValue( 1, i );
|
SetInputFieldStringWithNumericStrictValue( 1, i );
|
||||||
//Update the trap level
|
//Update the trap level
|
||||||
i = GetNumericStrictValueFromField( 2 );
|
i = GetNumericStrictValueFromField( 2 );
|
||||||
i = ( i == -1 ) ? 0 : min( i, 20 );
|
i = ( i == -1 ) ? 0 : min( i, 20 );
|
||||||
gpItem->bTrap = (INT8)i;
|
(*gpItem)[0]->data.bTrap = (INT8)i;
|
||||||
SetInputFieldStringWithNumericStrictValue( 2, i );
|
SetInputFieldStringWithNumericStrictValue( 2, i );
|
||||||
if( gpEditingItemPool )
|
if( gpEditingItemPool )
|
||||||
{
|
{
|
||||||
@@ -939,15 +993,15 @@ void SetupExplosivesGUI()
|
|||||||
{
|
{
|
||||||
CHAR16 str[20];
|
CHAR16 str[20];
|
||||||
INT16 yp;
|
INT16 yp;
|
||||||
swprintf( str, L"%d", gpItem->ItemData.Generic.bStatus[0] );
|
swprintf( str, L"%d", (*gpItem)[0]->data.objectStatus );
|
||||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
||||||
swprintf( str, L"%d", gpItem->ubNumberOfObjects );
|
swprintf( str, L"%d", gpItem->ubNumberOfObjects );
|
||||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 400, 25, 15, MSYS_PRIORITY_NORMAL, str, 1, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 400, 25, 15, MSYS_PRIORITY_NORMAL, str, 1, INPUTTYPE_NUMERICSTRICT );
|
||||||
if( Item[ gpItem->usItem ].ubPerPocket == 1 )
|
if( ItemSlotLimit(gpItem, STACK_SIZE_LIMIT)== 1 )
|
||||||
{
|
{
|
||||||
DisableTextField( 2 );
|
DisableTextField( 2 );
|
||||||
}
|
}
|
||||||
swprintf( str, L"%d", gpItem->bTrap );
|
swprintf( str, L"%d", (*gpItem)[0]->data.bTrap );
|
||||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 420, 25, 15, MSYS_PRIORITY_NORMAL, str, 2, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 420, 25, 15, MSYS_PRIORITY_NORMAL, str, 2, INPUTTYPE_NUMERICSTRICT );
|
||||||
if( gpEditingItemPool )
|
if( gpEditingItemPool )
|
||||||
{
|
{
|
||||||
@@ -963,7 +1017,7 @@ void SetupExplosivesGUI()
|
|||||||
CreateTextButton( L"DETONATOR", SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
|
CreateTextButton( L"DETONATOR", SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
|
||||||
iScreenWidthOffset + 570, yp, 60, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, ToggleDetonator );
|
iScreenWidthOffset + 570, yp, 60, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, ToggleDetonator );
|
||||||
yp += 14;
|
yp += 14;
|
||||||
if( FindAttachment( gpItem, DETONATOR ) != -1 )
|
if( FindAttachment( gpItem, DETONATOR ) )
|
||||||
{
|
{
|
||||||
ButtonList[ guiDetonatorButton ]->uiFlags |= BUTTON_CLICKED_ON;
|
ButtonList[ guiDetonatorButton ]->uiFlags |= BUTTON_CLICKED_ON;
|
||||||
gfDetonator = TRUE;
|
gfDetonator = TRUE;
|
||||||
@@ -989,24 +1043,23 @@ void ExtractAndUpdateExplosivesGUI()
|
|||||||
i = 20 + Random( 81 );
|
i = 20 + Random( 81 );
|
||||||
else
|
else
|
||||||
i = min( i, 100 );
|
i = min( i, 100 );
|
||||||
gpItem->ItemData.Generic.bStatus[0] = (INT8)i;
|
(*gpItem)[0]->data.objectStatus = (INT8)i;
|
||||||
SetInputFieldStringWithNumericStrictValue( 1, i );
|
SetInputFieldStringWithNumericStrictValue( 1, i );
|
||||||
//Update the quantity
|
//Update the quantity
|
||||||
if( Item[ gpItem->usItem ].ubPerPocket > 1 )
|
if( ItemSlotLimit(gpItem, STACK_SIZE_LIMIT) > 1 )
|
||||||
{
|
{
|
||||||
i = GetNumericStrictValueFromField( 2 );
|
i = GetNumericStrictValueFromField( 2 );
|
||||||
if( i == -1 )
|
if( i == -1 )
|
||||||
i = 1 + Random( Item[ gpItem->usItem ].ubPerPocket );
|
i = 1 + Random( ItemSlotLimit(gpItem, STACK_SIZE_LIMIT) );
|
||||||
else
|
else
|
||||||
i = max( 1, min( i, Item[ gpItem->usItem ].ubPerPocket ) );
|
i = max( 1, min( i, ItemSlotLimit(gpItem, STACK_SIZE_LIMIT) ) );
|
||||||
gpItem->ubNumberOfObjects = (UINT8)i;
|
|
||||||
SetInputFieldStringWithNumericStrictValue( 2, i );
|
SetInputFieldStringWithNumericStrictValue( 2, i );
|
||||||
CreateItems( gpItem->usItem, gpItem->ItemData.Generic.bStatus[0], gpItem->ubNumberOfObjects, gpItem );
|
CreateItems( gpItem->usItem, (INT8)(*gpItem)[0]->data.objectStatus, i, gpItem );
|
||||||
}
|
}
|
||||||
//Update the trap level
|
//Update the trap level
|
||||||
i = GetNumericStrictValueFromField( 3 );
|
i = GetNumericStrictValueFromField( 3 );
|
||||||
i = ( i == -1 ) ? 0 : min( i, 20 );
|
i = ( i == -1 ) ? 0 : min( i, 20 );
|
||||||
gpItem->bTrap = (INT8)i;
|
(*gpItem)[0]->data.bTrap = (INT8)i;
|
||||||
SetInputFieldStringWithNumericStrictValue( 3, i );
|
SetInputFieldStringWithNumericStrictValue( 3, i );
|
||||||
if( gpEditingItemPool )
|
if( gpEditingItemPool )
|
||||||
{
|
{
|
||||||
@@ -1020,7 +1073,7 @@ void ExtractAndUpdateExplosivesGUI()
|
|||||||
void SetupMoneyGUI()
|
void SetupMoneyGUI()
|
||||||
{
|
{
|
||||||
CHAR16 str[20];
|
CHAR16 str[20];
|
||||||
swprintf( str, L"%d", gpItem->ItemData.Money.uiMoneyAmount );
|
swprintf( str, L"%d", (*gpItem)[0]->data.money.uiMoneyAmount );
|
||||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 45, 15, MSYS_PRIORITY_NORMAL, str, 5, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 45, 15, MSYS_PRIORITY_NORMAL, str, 5, INPUTTYPE_NUMERICSTRICT );
|
||||||
if( gpEditingItemPool )
|
if( gpEditingItemPool )
|
||||||
{
|
{
|
||||||
@@ -1038,8 +1091,8 @@ void ExtractAndUpdateMoneyGUI()
|
|||||||
i = Random( 20000 );
|
i = Random( 20000 );
|
||||||
else
|
else
|
||||||
i = max( 1, min( i, 20000 ) );
|
i = max( 1, min( i, 20000 ) );
|
||||||
gpItem->ItemData.Money.uiMoneyAmount = i;
|
(*gpItem)[0]->data.money.uiMoneyAmount = i;
|
||||||
gpItem->ItemData.Money.bMoneyStatus = 100;
|
(*gpItem)[0]->data.objectStatus = 100;
|
||||||
SetInputFieldStringWithNumericStrictValue( 1, i );
|
SetInputFieldStringWithNumericStrictValue( 1, i );
|
||||||
if( gpEditingItemPool )
|
if( gpEditingItemPool )
|
||||||
{
|
{
|
||||||
@@ -1058,10 +1111,10 @@ void RemoveMoneyGUI()
|
|||||||
void SetupOwnershipGUI()
|
void SetupOwnershipGUI()
|
||||||
{
|
{
|
||||||
CHAR16 str[20];
|
CHAR16 str[20];
|
||||||
swprintf( str, L"%d", gpItem->ItemData.Owner.ubOwnerProfile );
|
swprintf( str, L"%d", (*gpItem)[0]->data.owner.ubOwnerProfile );
|
||||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
||||||
giOwnershipGroupButton =
|
giOwnershipGroupButton =
|
||||||
CreateTextButton( gszCivGroupNames[ gpItem->ItemData.Owner.ubOwnerCivGroup ], SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
|
CreateTextButton( gszCivGroupNames[ (*gpItem)[0]->data.owner.ubOwnerCivGroup ], SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
|
||||||
iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 415, 80, 25, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, OwnershipGroupButtonCallback );
|
iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 415, 80, 25, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, OwnershipGroupButtonCallback );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1075,7 +1128,7 @@ void OwnershipGroupButtonCallback( GUI_BUTTON *btn, INT32 reason )
|
|||||||
|
|
||||||
void SetOwnershipGroup( UINT8 ubNewGroup )
|
void SetOwnershipGroup( UINT8 ubNewGroup )
|
||||||
{
|
{
|
||||||
gpItem->ItemData.Owner.ubOwnerCivGroup = ubNewGroup;
|
(*gpItem)[0]->data.owner.ubOwnerCivGroup = ubNewGroup;
|
||||||
SpecifyButtonText( giOwnershipGroupButton, gszCivGroupNames[ ubNewGroup ] );
|
SpecifyButtonText( giOwnershipGroupButton, gszCivGroupNames[ ubNewGroup ] );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1088,7 +1141,7 @@ void ExtractAndUpdateOwnershipGUI()
|
|||||||
i = Random( 0 );
|
i = Random( 0 );
|
||||||
else
|
else
|
||||||
i = max( 0, min( i, 255 ) );
|
i = max( 0, min( i, 255 ) );
|
||||||
gpItem->ItemData.Owner.ubOwnerProfile = (UINT8)i;
|
(*gpItem)[0]->data.owner.ubOwnerProfile = (UINT8)i;
|
||||||
SetInputFieldStringWithNumericStrictValue( 1, i );
|
SetInputFieldStringWithNumericStrictValue( 1, i );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1131,9 +1184,9 @@ void SetupActionItemsGUI()
|
|||||||
{
|
{
|
||||||
CHAR16 str[4];
|
CHAR16 str[4];
|
||||||
STR16 pStr;
|
STR16 pStr;
|
||||||
swprintf( str, L"%d", gpItem->ItemData.Generic.bStatus[0] );
|
swprintf( str, L"%d", (*gpItem)[0]->data.objectStatus );
|
||||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 365, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 365, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
||||||
swprintf( str, L"%d", gpItem->bTrap );
|
swprintf( str, L"%d", (*gpItem)[0]->data.bTrap );
|
||||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 385, 25, 15, MSYS_PRIORITY_NORMAL, str, 2, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 385, 25, 15, MSYS_PRIORITY_NORMAL, str, 2, INPUTTYPE_NUMERICSTRICT );
|
||||||
if( gpEditingItemPool )
|
if( gpEditingItemPool )
|
||||||
{
|
{
|
||||||
@@ -1155,14 +1208,14 @@ void ExtractAndUpdateActionItemsGUI()
|
|||||||
i = 20 + Random( 81 );
|
i = 20 + Random( 81 );
|
||||||
else
|
else
|
||||||
i = min( i, 100 );
|
i = min( i, 100 );
|
||||||
gpItem->ItemData.Generic.bStatus[0] = (INT8)i;
|
(*gpItem)[0]->data.objectStatus = (INT8)i;
|
||||||
SetInputFieldStringWithNumericStrictValue( 1, i );
|
SetInputFieldStringWithNumericStrictValue( 1, i );
|
||||||
//Update the trap level
|
//Update the trap level
|
||||||
i = GetNumericStrictValueFromField( 2 );
|
i = GetNumericStrictValueFromField( 2 );
|
||||||
i = ( i == -1 ) ? 0 : min( i, 20 );
|
i = ( i == -1 ) ? 0 : min( i, 20 );
|
||||||
if( i != gpItem->bTrap )
|
if( i != (*gpItem)[0]->data.bTrap )
|
||||||
gbDefaultBombTrapLevel = (INT8)i;
|
gbDefaultBombTrapLevel = (INT8)i;
|
||||||
gpItem->bTrap = (INT8)i;
|
(*gpItem)[0]->data.bTrap = (INT8)i;
|
||||||
SetInputFieldStringWithNumericStrictValue( 2, i );
|
SetInputFieldStringWithNumericStrictValue( 2, i );
|
||||||
|
|
||||||
if( gpEditingItemPool )
|
if( gpEditingItemPool )
|
||||||
@@ -1188,29 +1241,29 @@ void AlarmTriggerCheckboxCallback( GUI_BUTTON *btn, INT32 reason )
|
|||||||
if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||||
{
|
{
|
||||||
if( btn->uiFlags & BUTTON_CLICKED_ON )
|
if( btn->uiFlags & BUTTON_CLICKED_ON )
|
||||||
gpItem->fFlags |= OBJECT_ALARM_TRIGGER;
|
(*gpItem).fFlags |= OBJECT_ALARM_TRIGGER;
|
||||||
else
|
else
|
||||||
gpItem->fFlags &= ~OBJECT_ALARM_TRIGGER;
|
(*gpItem).fFlags &= ~OBJECT_ALARM_TRIGGER;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetupTriggersGUI()
|
void SetupTriggersGUI()
|
||||||
{
|
{
|
||||||
CHAR16 str[4];
|
CHAR16 str[4];
|
||||||
swprintf( str, L"%d", gpItem->bTrap );
|
swprintf( str, L"%d", (*gpItem)[0]->data.bTrap );
|
||||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 365, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 365, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
||||||
swprintf( str, L"%d", gpItem->ItemData.Trigger.Area.ubTolerance );
|
swprintf( str, L"%d", (*gpItem)[0]->data.misc.ubTolerance );
|
||||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 385, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 385, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
||||||
if( gpEditingItemPool )
|
if( gpEditingItemPool )
|
||||||
{
|
{
|
||||||
swprintf( str, L"%d", 100 - gWorldItems[ gpEditingItemPool->iItemIndex ].ubNonExistChance );
|
swprintf( str, L"%d", 100 - gWorldItems[ gpEditingItemPool->iItemIndex ].ubNonExistChance );
|
||||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 440, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 440, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
||||||
if( gpItem->ItemData.Trigger.BombTrigger.bFrequency <= PANIC_FREQUENCY && gpItem->ItemData.Trigger.BombTrigger.bFrequency >= PANIC_FREQUENCY_3 )
|
if( (*gpItem)[0]->data.misc.bFrequency <= PANIC_FREQUENCY && (*gpItem)[0]->data.misc.bFrequency >= PANIC_FREQUENCY_3 )
|
||||||
{
|
{
|
||||||
giAlarmTriggerButton =
|
giAlarmTriggerButton =
|
||||||
CreateCheckBoxButton( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 405, "EDITOR//smCheckBox.sti", MSYS_PRIORITY_NORMAL, AlarmTriggerCheckboxCallback );
|
CreateCheckBoxButton( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 405, "EDITOR//smCheckBox.sti", MSYS_PRIORITY_NORMAL, AlarmTriggerCheckboxCallback );
|
||||||
SetButtonFastHelpText( giAlarmTriggerButton, L"If the panic trigger is an alarm trigger,\nenemies won't attempt to use it if they\nare already aware of your presence.");
|
SetButtonFastHelpText( giAlarmTriggerButton, L"If the panic trigger is an alarm trigger,\nenemies won't attempt to use it if they\nare already aware of your presence.");
|
||||||
if( gpItem->fFlags & OBJECT_ALARM_TRIGGER )
|
if( (*gpItem).fFlags & OBJECT_ALARM_TRIGGER )
|
||||||
ButtonList[ giAlarmTriggerButton ]->uiFlags |= BUTTON_CLICKED_ON;
|
ButtonList[ giAlarmTriggerButton ]->uiFlags |= BUTTON_CLICKED_ON;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1222,12 +1275,12 @@ void ExtractAndUpdateTriggersGUI()
|
|||||||
//Update the trap level
|
//Update the trap level
|
||||||
i = GetNumericStrictValueFromField( 1 );
|
i = GetNumericStrictValueFromField( 1 );
|
||||||
i = ( i == -1 ) ? 0 : min( i, 20 );
|
i = ( i == -1 ) ? 0 : min( i, 20 );
|
||||||
gpItem->bTrap = (INT8)i;
|
(*gpItem)[0]->data.bTrap = (INT8)i;
|
||||||
SetInputFieldStringWithNumericStrictValue( 1, i );
|
SetInputFieldStringWithNumericStrictValue( 1, i );
|
||||||
|
|
||||||
i = GetNumericStrictValueFromField( 2 );
|
i = GetNumericStrictValueFromField( 2 );
|
||||||
i = ( i == -1 ) ? 0 : max( 0, min( i, 99 ) );
|
i = ( i == -1 ) ? 0 : max( 0, min( i, 99 ) );
|
||||||
gpItem->ItemData.Trigger.Area.ubTolerance = (UINT8)i;
|
(*gpItem)[0]->data.misc.ubTolerance = (UINT8)i;
|
||||||
SetInputFieldStringWithNumericStrictValue( 2, i );
|
SetInputFieldStringWithNumericStrictValue( 2, i );
|
||||||
|
|
||||||
if( gpEditingItemPool )
|
if( gpEditingItemPool )
|
||||||
@@ -1241,7 +1294,7 @@ void ExtractAndUpdateTriggersGUI()
|
|||||||
|
|
||||||
void RemoveTriggersGUI()
|
void RemoveTriggersGUI()
|
||||||
{
|
{
|
||||||
if( gpEditingItemPool && gpItem->ItemData.Trigger.BombTrigger.bFrequency <= PANIC_FREQUENCY && gpItem->ItemData.Trigger.BombTrigger.bFrequency >= PANIC_FREQUENCY_3 )
|
if( gpEditingItemPool && (*gpItem)[0]->data.misc.bFrequency <= PANIC_FREQUENCY && (*gpItem)[0]->data.misc.bFrequency >= PANIC_FREQUENCY_3 )
|
||||||
{
|
{
|
||||||
if( giAlarmTriggerButton != -1 )
|
if( giAlarmTriggerButton != -1 )
|
||||||
{
|
{
|
||||||
@@ -1257,7 +1310,6 @@ void ToggleAttachment( GUI_BUTTON *btn, INT32 reason )
|
|||||||
{
|
{
|
||||||
INT32 i;
|
INT32 i;
|
||||||
UINT16 usAttachment = 0;
|
UINT16 usAttachment = 0;
|
||||||
OBJECTTYPE temp;
|
|
||||||
for( i = 0; i < NUM_ATTACHMENT_BUTTONS; i++ )
|
for( i = 0; i < NUM_ATTACHMENT_BUTTONS; i++ )
|
||||||
{ //Loop through and find the button that was just modified
|
{ //Loop through and find the button that was just modified
|
||||||
switch( i )
|
switch( i )
|
||||||
@@ -1276,17 +1328,16 @@ void ToggleAttachment( GUI_BUTTON *btn, INT32 reason )
|
|||||||
{
|
{
|
||||||
gfAttachment[ i ] = TRUE;
|
gfAttachment[ i ] = TRUE;
|
||||||
btn->uiFlags |= BUTTON_CLICKED_ON;
|
btn->uiFlags |= BUTTON_CLICKED_ON;
|
||||||
CreateItem( usAttachment, gpItem->ItemData.Gun.bGunStatus, &temp );
|
CreateItem( usAttachment, (*gpItem)[0]->data.gun.bGunStatus, &gTempObject );
|
||||||
AttachObject( NULL, gpItem, &temp );
|
gpItem->AttachObject( NULL, &gTempObject );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ //Button is out, so remove the attachment
|
{ //Button is out, so remove the attachment
|
||||||
INT8 slot;
|
|
||||||
gfAttachment[ i ] = FALSE;
|
gfAttachment[ i ] = FALSE;
|
||||||
btn->uiFlags &= ~BUTTON_CLICKED_ON;
|
btn->uiFlags &= ~BUTTON_CLICKED_ON;
|
||||||
slot = FindAttachment( gpItem, usAttachment );
|
OBJECTTYPE* pAttachment = FindAttachment( gpItem, usAttachment );
|
||||||
if( slot != -1 )
|
if( pAttachment )
|
||||||
RemoveAttachment( gpItem, slot, &temp );
|
gpItem->RemoveAttachment( pAttachment );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1298,21 +1349,19 @@ void ToggleCeramicPlates( GUI_BUTTON *btn, INT32 reason )
|
|||||||
{
|
{
|
||||||
if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||||
{
|
{
|
||||||
OBJECTTYPE temp;
|
|
||||||
gfCeramicPlates ^= TRUE;
|
gfCeramicPlates ^= TRUE;
|
||||||
if( gfCeramicPlates )
|
if( gfCeramicPlates )
|
||||||
{
|
{
|
||||||
btn->uiFlags |= BUTTON_CLICKED_ON;
|
btn->uiFlags |= BUTTON_CLICKED_ON;
|
||||||
CreateItem( CERAMIC_PLATES, gpItem->ItemData.Generic.bStatus[0], &temp );
|
CreateItem( CERAMIC_PLATES, (*gpItem)[0]->data.objectStatus, &gTempObject );
|
||||||
AttachObject( NULL, gpItem, &temp );
|
gpItem->AttachObject( NULL, &gTempObject );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
INT8 slot;
|
|
||||||
btn->uiFlags &= ~BUTTON_CLICKED_ON;
|
btn->uiFlags &= ~BUTTON_CLICKED_ON;
|
||||||
slot = FindAttachment( gpItem, CERAMIC_PLATES );
|
OBJECTTYPE* pAttachment = FindAttachment( gpItem, CERAMIC_PLATES );
|
||||||
if( slot != -1 )
|
if( pAttachment )
|
||||||
RemoveAttachment( gpItem, slot, &temp );
|
gpItem->RemoveAttachment( pAttachment );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1321,22 +1370,20 @@ void ToggleDetonator( GUI_BUTTON *btn, INT32 reason )
|
|||||||
{
|
{
|
||||||
if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||||
{
|
{
|
||||||
OBJECTTYPE temp;
|
|
||||||
if( !gfDetonator )
|
if( !gfDetonator )
|
||||||
{
|
{
|
||||||
gfDetonator = TRUE;
|
gfDetonator = TRUE;
|
||||||
btn->uiFlags |= BUTTON_CLICKED_ON;
|
btn->uiFlags |= BUTTON_CLICKED_ON;
|
||||||
CreateItem( DETONATOR, gpItem->ItemData.Generic.bStatus[0], &temp );
|
CreateItem( DETONATOR, (*gpItem)[0]->data.objectStatus, &gTempObject );
|
||||||
AttachObject( NULL, gpItem, &temp );
|
gpItem->AttachObject( NULL, &gTempObject );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ //Button is out, so remove the attachment
|
{ //Button is out, so remove the attachment
|
||||||
INT8 slot;
|
|
||||||
gfDetonator = FALSE;
|
gfDetonator = FALSE;
|
||||||
btn->uiFlags &= ~BUTTON_CLICKED_ON;
|
btn->uiFlags &= ~BUTTON_CLICKED_ON;
|
||||||
slot = FindAttachment( gpItem, DETONATOR );
|
OBJECTTYPE* pAttachment = FindAttachment( gpItem, DETONATOR );
|
||||||
if( slot != -1 )
|
if( pAttachment )
|
||||||
RemoveAttachment( gpItem, slot, &temp );
|
gpItem->RemoveAttachment( pAttachment );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1352,133 +1399,133 @@ void ActionItemCallback( GUI_BUTTON *btn, INT32 reason )
|
|||||||
void ChangeActionItem( OBJECTTYPE *pItem, INT8 bActionItemIndex )
|
void ChangeActionItem( OBJECTTYPE *pItem, INT8 bActionItemIndex )
|
||||||
{
|
{
|
||||||
pItem->usItem = ACTION_ITEM;
|
pItem->usItem = ACTION_ITEM;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_BLOW_UP;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_BLOW_UP;
|
||||||
switch( bActionItemIndex )
|
switch( bActionItemIndex )
|
||||||
{
|
{
|
||||||
case ACTIONITEM_TRIP_KLAXON:
|
case ACTIONITEM_TRIP_KLAXON:
|
||||||
pItem->ItemData.Trigger.usBombItem = TRIP_KLAXON;
|
(*pItem)[0]->data.misc.usBombItem = TRIP_KLAXON;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_FLARE:
|
case ACTIONITEM_FLARE:
|
||||||
pItem->ItemData.Trigger.usBombItem = TRIP_FLARE;
|
(*pItem)[0]->data.misc.usBombItem = TRIP_FLARE;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_TEARGAS:
|
case ACTIONITEM_TEARGAS:
|
||||||
pItem->ItemData.Trigger.usBombItem = TEARGAS_GRENADE;
|
(*pItem)[0]->data.misc.usBombItem = TEARGAS_GRENADE;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_STUN:
|
case ACTIONITEM_STUN:
|
||||||
pItem->ItemData.Trigger.usBombItem = STUN_GRENADE;
|
(*pItem)[0]->data.misc.usBombItem = STUN_GRENADE;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_SMOKE:
|
case ACTIONITEM_SMOKE:
|
||||||
pItem->ItemData.Trigger.usBombItem = SMOKE_GRENADE;
|
(*pItem)[0]->data.misc.usBombItem = SMOKE_GRENADE;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_MUSTARD:
|
case ACTIONITEM_MUSTARD:
|
||||||
pItem->ItemData.Trigger.usBombItem = MUSTARD_GRENADE;
|
(*pItem)[0]->data.misc.usBombItem = MUSTARD_GRENADE;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_MINE:
|
case ACTIONITEM_MINE:
|
||||||
pItem->ItemData.Trigger.usBombItem = MINE;
|
(*pItem)[0]->data.misc.usBombItem = MINE;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_OPEN:
|
case ACTIONITEM_OPEN:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_OPEN_DOOR;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_OPEN_DOOR;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_CLOSE:
|
case ACTIONITEM_CLOSE:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_CLOSE_DOOR;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_CLOSE_DOOR;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_UNLOCK_DOOR:
|
case ACTIONITEM_UNLOCK_DOOR:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_UNLOCK_DOOR;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_UNLOCK_DOOR;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_TOGGLE_LOCK:
|
case ACTIONITEM_TOGGLE_LOCK:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_TOGGLE_LOCK;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_TOGGLE_LOCK;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_UNTRAP_DOOR:
|
case ACTIONITEM_UNTRAP_DOOR:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_UNTRAP_DOOR;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_UNTRAP_DOOR;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_TOGGLE_PRESSURE_ITEMS:
|
case ACTIONITEM_TOGGLE_PRESSURE_ITEMS:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_TOGGLE_PRESSURE_ITEMS;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_TOGGLE_PRESSURE_ITEMS;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_SMPIT:
|
case ACTIONITEM_SMPIT:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_SMALL_PIT;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_SMALL_PIT;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_LGPIT:
|
case ACTIONITEM_LGPIT:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_LARGE_PIT;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_LARGE_PIT;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_TOGGLE_DOOR:
|
case ACTIONITEM_TOGGLE_DOOR:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_TOGGLE_DOOR;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_TOGGLE_DOOR;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_TOGGLE_ACTION1:
|
case ACTIONITEM_TOGGLE_ACTION1:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_TOGGLE_ACTION1;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_TOGGLE_ACTION1;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_TOGGLE_ACTION2:
|
case ACTIONITEM_TOGGLE_ACTION2:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_TOGGLE_ACTION2;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_TOGGLE_ACTION2;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_TOGGLE_ACTION3:
|
case ACTIONITEM_TOGGLE_ACTION3:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_TOGGLE_ACTION3;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_TOGGLE_ACTION3;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_TOGGLE_ACTION4:
|
case ACTIONITEM_TOGGLE_ACTION4:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_TOGGLE_ACTION4;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_TOGGLE_ACTION4;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_ENTER_BROTHEL:
|
case ACTIONITEM_ENTER_BROTHEL:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_ENTER_BROTHEL;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_ENTER_BROTHEL;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_EXIT_BROTHEL:
|
case ACTIONITEM_EXIT_BROTHEL:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_EXIT_BROTHEL;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_EXIT_BROTHEL;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_KINGPIN_ALARM:
|
case ACTIONITEM_KINGPIN_ALARM:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_KINGPIN_ALARM;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_KINGPIN_ALARM;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_SEX:
|
case ACTIONITEM_SEX:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_SEX;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_SEX;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_REVEAL_ROOM:
|
case ACTIONITEM_REVEAL_ROOM:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_REVEAL_ROOM;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_REVEAL_ROOM;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_LOCAL_ALARM:
|
case ACTIONITEM_LOCAL_ALARM:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_LOCAL_ALARM;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_LOCAL_ALARM;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_GLOBAL_ALARM:
|
case ACTIONITEM_GLOBAL_ALARM:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_GLOBAL_ALARM;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_GLOBAL_ALARM;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_KLAXON:
|
case ACTIONITEM_KLAXON:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_KLAXON;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_KLAXON;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_SMALL:
|
case ACTIONITEM_SMALL:
|
||||||
pItem->ItemData.Trigger.usBombItem = HAND_GRENADE;
|
(*pItem)[0]->data.misc.usBombItem = HAND_GRENADE;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_MEDIUM:
|
case ACTIONITEM_MEDIUM:
|
||||||
pItem->ItemData.Trigger.usBombItem = TNT;
|
(*pItem)[0]->data.misc.usBombItem = TNT;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_LARGE:
|
case ACTIONITEM_LARGE:
|
||||||
pItem->ItemData.Trigger.usBombItem = C4;
|
(*pItem)[0]->data.misc.usBombItem = C4;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_MUSEUM_ALARM:
|
case ACTIONITEM_MUSEUM_ALARM:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_MUSEUM_ALARM;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_MUSEUM_ALARM;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_BLOODCAT_ALARM:
|
case ACTIONITEM_BLOODCAT_ALARM:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_BLOODCAT_ALARM;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_BLOODCAT_ALARM;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_BIG_TEAR_GAS:
|
case ACTIONITEM_BIG_TEAR_GAS:
|
||||||
pItem->ItemData.Trigger.usBombItem = BIG_TEAR_GAS;
|
(*pItem)[0]->data.misc.usBombItem = BIG_TEAR_GAS;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1494,9 +1541,9 @@ void UpdateActionItem( INT8 bActionItemIndex )
|
|||||||
//If the previous item was a pit, remove it before changing it
|
//If the previous item was a pit, remove it before changing it
|
||||||
if( gpItem->usItem == ACTION_ITEM )
|
if( gpItem->usItem == ACTION_ITEM )
|
||||||
{
|
{
|
||||||
if( gpItem->ItemData.Trigger.bActionValue == ACTION_ITEM_SMALL_PIT )
|
if( (*gpItem)[0]->data.misc.bActionValue == ACTION_ITEM_SMALL_PIT )
|
||||||
Remove3X3Pit( gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
Remove3X3Pit( gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||||
else if( gpItem->ItemData.Trigger.bActionValue == ACTION_ITEM_LARGE_PIT )
|
else if( (*gpItem)[0]->data.misc.bActionValue == ACTION_ITEM_LARGE_PIT )
|
||||||
Remove5X5Pit( gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
Remove5X5Pit( gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1506,9 +1553,9 @@ void UpdateActionItem( INT8 bActionItemIndex )
|
|||||||
//If the new item is a pit, add it so we can see how it looks.
|
//If the new item is a pit, add it so we can see how it looks.
|
||||||
if( gpItem->usItem == ACTION_ITEM )
|
if( gpItem->usItem == ACTION_ITEM )
|
||||||
{
|
{
|
||||||
if( gpItem->ItemData.Trigger.bActionValue == ACTION_ITEM_SMALL_PIT )
|
if( (*gpItem)[0]->data.misc.bActionValue == ACTION_ITEM_SMALL_PIT )
|
||||||
Add3X3Pit( gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
Add3X3Pit( gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||||
else if( gpItem->ItemData.Trigger.bActionValue == ACTION_ITEM_LARGE_PIT )
|
else if( (*gpItem)[0]->data.misc.bActionValue == ACTION_ITEM_LARGE_PIT )
|
||||||
Add5X5Pit( gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
Add5X5Pit( gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,12 @@
|
|||||||
#ifndef __ITEM_STATISTICS_H
|
#ifndef __ITEM_STATISTICS_H
|
||||||
#define __ITEM_STATISTICS_H
|
#define __ITEM_STATISTICS_H
|
||||||
|
|
||||||
#include "Item Types.h"
|
//#include "Item Types.h"
|
||||||
|
|
||||||
|
//forward declarations of common classes to eliminate includes
|
||||||
|
class OBJECTTYPE;
|
||||||
|
class SOLDIERTYPE;
|
||||||
|
|
||||||
|
|
||||||
//Handles the dynamic changing of text input fields and button modes depending on the currently edited
|
//Handles the dynamic changing of text input fields and button modes depending on the currently edited
|
||||||
//item. Both the merc's inventory panel, and the items tab use the same code to accomplish this.
|
//item. Both the merc's inventory panel, and the items tab use the same code to accomplish this.
|
||||||
|
|||||||
@@ -948,6 +948,8 @@ UINT32 ProcessFileIO()
|
|||||||
CreateMessageBox( L" Error loading file. Try another filename?" );
|
CreateMessageBox( L" Error loading file. Try another filename?" );
|
||||||
return LOADSAVE_SCREEN;
|
return LOADSAVE_SCREEN;
|
||||||
}
|
}
|
||||||
|
//ADB these are NOT set yet! but they need to be, duh
|
||||||
|
CompileWorldMovementCosts();
|
||||||
SetGlobalSectorValues( gzFilename );
|
SetGlobalSectorValues( gzFilename );
|
||||||
|
|
||||||
RestoreFontSettings();
|
RestoreFontSettings();
|
||||||
|
|||||||
+41
-39
@@ -37,6 +37,8 @@
|
|||||||
#include "World Items.h"
|
#include "World Items.h"
|
||||||
#include "text.h"
|
#include "text.h"
|
||||||
#include "Soldier Create.h"
|
#include "Soldier Create.h"
|
||||||
|
#include "GameVersion.h"
|
||||||
|
#include "Campaign Types.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern BOOLEAN gfOverheadMapDirty;
|
extern BOOLEAN gfOverheadMapDirty;
|
||||||
@@ -475,19 +477,19 @@ void DestroySummaryWindow()
|
|||||||
|
|
||||||
if( gpWorldItemsSummaryArray )
|
if( gpWorldItemsSummaryArray )
|
||||||
{
|
{
|
||||||
MemFree( gpWorldItemsSummaryArray );
|
delete[]( gpWorldItemsSummaryArray );
|
||||||
gpWorldItemsSummaryArray = NULL;
|
gpWorldItemsSummaryArray = NULL;
|
||||||
gusWorldItemsSummaryArraySize = 0;
|
gusWorldItemsSummaryArraySize = 0;
|
||||||
}
|
}
|
||||||
if( gpPEnemyItemsSummaryArray )
|
if( gpPEnemyItemsSummaryArray )
|
||||||
{
|
{
|
||||||
MemFree( gpPEnemyItemsSummaryArray );
|
delete[]( gpPEnemyItemsSummaryArray );
|
||||||
gpPEnemyItemsSummaryArray = NULL;
|
gpPEnemyItemsSummaryArray = NULL;
|
||||||
gusPEnemyItemsSummaryArraySize = 0;
|
gusPEnemyItemsSummaryArraySize = 0;
|
||||||
}
|
}
|
||||||
if( gpNEnemyItemsSummaryArray )
|
if( gpNEnemyItemsSummaryArray )
|
||||||
{
|
{
|
||||||
MemFree( gpNEnemyItemsSummaryArray );
|
delete[]( gpNEnemyItemsSummaryArray );
|
||||||
gpNEnemyItemsSummaryArray = NULL;
|
gpNEnemyItemsSummaryArray = NULL;
|
||||||
gusNEnemyItemsSummaryArraySize = 0;
|
gusNEnemyItemsSummaryArraySize = 0;
|
||||||
}
|
}
|
||||||
@@ -709,27 +711,27 @@ void RenderItemDetails()
|
|||||||
{
|
{
|
||||||
if( index == SWITCH || index == ACTION_ITEM )
|
if( index == SWITCH || index == ACTION_ITEM )
|
||||||
{
|
{
|
||||||
if( gpWorldItemsSummaryArray[ i ].o.usItem == index )
|
if( gpWorldItemsSummaryArray[ i ].object.usItem == index )
|
||||||
{
|
{
|
||||||
if( gubSummaryItemMode == ITEMMODE_SCIFI && !(gpWorldItemsSummaryArray[ i ].usFlags & WORLD_ITEM_REALISTIC_ONLY) ||
|
if( gubSummaryItemMode == ITEMMODE_SCIFI && !(gpWorldItemsSummaryArray[ i ].usFlags & WORLD_ITEM_REALISTIC_ONLY) ||
|
||||||
gubSummaryItemMode == ITEMMODE_REAL && !(gpWorldItemsSummaryArray[ i ].usFlags & WORLD_ITEM_SCIFI_ONLY) )
|
gubSummaryItemMode == ITEMMODE_REAL && !(gpWorldItemsSummaryArray[ i ].usFlags & WORLD_ITEM_SCIFI_ONLY) )
|
||||||
{
|
{
|
||||||
pItem = &gpWorldItemsSummaryArray[ i ].o;
|
pItem = &gpWorldItemsSummaryArray[ i ].object;
|
||||||
if( !pItem->ItemData.Trigger.BombTrigger.bFrequency )
|
if( !(*pItem)[0]->data.misc.bFrequency )
|
||||||
bFreqIndex = 7;
|
bFreqIndex = 7;
|
||||||
else if( pItem->ItemData.Trigger.BombTrigger.bFrequency == PANIC_FREQUENCY )
|
else if( (*pItem)[0]->data.misc.bFrequency == PANIC_FREQUENCY )
|
||||||
bFreqIndex = 0;
|
bFreqIndex = 0;
|
||||||
else if( pItem->ItemData.Trigger.BombTrigger.bFrequency == PANIC_FREQUENCY_2 )
|
else if( (*pItem)[0]->data.misc.bFrequency == PANIC_FREQUENCY_2 )
|
||||||
bFreqIndex = 1;
|
bFreqIndex = 1;
|
||||||
else if( pItem->ItemData.Trigger.BombTrigger.bFrequency == PANIC_FREQUENCY_3 )
|
else if( (*pItem)[0]->data.misc.bFrequency == PANIC_FREQUENCY_3 )
|
||||||
bFreqIndex = 2;
|
bFreqIndex = 2;
|
||||||
else if( pItem->ItemData.Trigger.BombTrigger.bFrequency == FIRST_MAP_PLACED_FREQUENCY + 1 )
|
else if( (*pItem)[0]->data.misc.bFrequency == FIRST_MAP_PLACED_FREQUENCY + 1 )
|
||||||
bFreqIndex = 3;
|
bFreqIndex = 3;
|
||||||
else if( pItem->ItemData.Trigger.BombTrigger.bFrequency == FIRST_MAP_PLACED_FREQUENCY + 2 )
|
else if( (*pItem)[0]->data.misc.bFrequency == FIRST_MAP_PLACED_FREQUENCY + 2 )
|
||||||
bFreqIndex = 4;
|
bFreqIndex = 4;
|
||||||
else if( pItem->ItemData.Trigger.BombTrigger.bFrequency == FIRST_MAP_PLACED_FREQUENCY + 3 )
|
else if( (*pItem)[0]->data.misc.bFrequency == FIRST_MAP_PLACED_FREQUENCY + 3 )
|
||||||
bFreqIndex = 5;
|
bFreqIndex = 5;
|
||||||
else if( pItem->ItemData.Trigger.BombTrigger.bFrequency == FIRST_MAP_PLACED_FREQUENCY + 4 )
|
else if( (*pItem)[0]->data.misc.bFrequency == FIRST_MAP_PLACED_FREQUENCY + 4 )
|
||||||
bFreqIndex = 6;
|
bFreqIndex = 6;
|
||||||
else
|
else
|
||||||
continue;
|
continue;
|
||||||
@@ -747,15 +749,14 @@ void RenderItemDetails()
|
|||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if( gpWorldItemsSummaryArray[ i ].o.usItem == index )
|
if( gpWorldItemsSummaryArray[ i ].object.usItem == index )
|
||||||
{
|
{
|
||||||
if( gubSummaryItemMode == ITEMMODE_SCIFI && !(gpWorldItemsSummaryArray[ i ].usFlags & WORLD_ITEM_REALISTIC_ONLY) ||
|
if( gubSummaryItemMode == ITEMMODE_SCIFI && !(gpWorldItemsSummaryArray[ i ].usFlags & WORLD_ITEM_REALISTIC_ONLY) ||
|
||||||
gubSummaryItemMode == ITEMMODE_REAL && !(gpWorldItemsSummaryArray[ i ].usFlags & WORLD_ITEM_SCIFI_ONLY) )
|
gubSummaryItemMode == ITEMMODE_REAL && !(gpWorldItemsSummaryArray[ i ].usFlags & WORLD_ITEM_SCIFI_ONLY) )
|
||||||
{
|
{
|
||||||
pItem = &gpWorldItemsSummaryArray[ i ].o;
|
pItem = &gpWorldItemsSummaryArray[ i ].object;
|
||||||
uiExistChance += (100 - gpWorldItemsSummaryArray[ i ].ubNonExistChance) * pItem->ubNumberOfObjects;
|
uiExistChance += (100 - gpWorldItemsSummaryArray[ i ].ubNonExistChance) * pItem->ubNumberOfObjects;
|
||||||
uiStatus += pItem->ItemData.Generic.bStatus[0];
|
uiStatus += (*pItem)[0]->data.objectStatus;
|
||||||
uiQuantity += pItem->ubNumberOfObjects;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -862,7 +863,7 @@ void RenderItemDetails()
|
|||||||
{
|
{
|
||||||
pItem = &gpPEnemyItemsSummaryArray[ i ];
|
pItem = &gpPEnemyItemsSummaryArray[ i ];
|
||||||
uiExistChance += 100 * pItem->ubNumberOfObjects;
|
uiExistChance += 100 * pItem->ubNumberOfObjects;
|
||||||
uiStatus += pItem->ItemData.Generic.bStatus[0];
|
uiStatus += (*pItem)[0]->data.objectStatus;
|
||||||
uiQuantity += pItem->ubNumberOfObjects;
|
uiQuantity += pItem->ubNumberOfObjects;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -934,7 +935,7 @@ void RenderItemDetails()
|
|||||||
{
|
{
|
||||||
pItem = &gpNEnemyItemsSummaryArray[ i ];
|
pItem = &gpNEnemyItemsSummaryArray[ i ];
|
||||||
uiExistChance += 100 * pItem->ubNumberOfObjects;
|
uiExistChance += 100 * pItem->ubNumberOfObjects;
|
||||||
uiStatus += pItem->ItemData.Generic.bStatus[0];
|
uiStatus += (*pItem)[0]->data.objectStatus;
|
||||||
uiQuantity += pItem->ubNumberOfObjects;
|
uiQuantity += pItem->ubNumberOfObjects;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2014,7 +2015,7 @@ void MapClickCallback( MOUSE_REGION *reg, INT32 reason )
|
|||||||
}
|
}
|
||||||
if( gpWorldItemsSummaryArray )
|
if( gpWorldItemsSummaryArray )
|
||||||
{
|
{
|
||||||
MemFree( gpWorldItemsSummaryArray );
|
delete[]( gpWorldItemsSummaryArray );
|
||||||
gpWorldItemsSummaryArray = NULL;
|
gpWorldItemsSummaryArray = NULL;
|
||||||
gusWorldItemsSummaryArraySize = 0;
|
gusWorldItemsSummaryArraySize = 0;
|
||||||
}
|
}
|
||||||
@@ -2913,6 +2914,9 @@ void ApologizeOverrideAndForceUpdateEverything()
|
|||||||
gusNumberOfMapsToBeForceUpdated = 0;
|
gusNumberOfMapsToBeForceUpdated = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//CHRISL: ADB changed the way this load file is handled
|
||||||
|
extern int gEnemyPreservedTempFileVersion[256];
|
||||||
|
extern int gCivPreservedTempFileVersion[256];
|
||||||
void SetupItemDetailsMode( BOOLEAN fAllowRecursion )
|
void SetupItemDetailsMode( BOOLEAN fAllowRecursion )
|
||||||
{
|
{
|
||||||
HWFILE hfile;
|
HWFILE hfile;
|
||||||
@@ -2929,19 +2933,19 @@ void SetupItemDetailsMode( BOOLEAN fAllowRecursion )
|
|||||||
//Clear memory for all the item summaries loaded
|
//Clear memory for all the item summaries loaded
|
||||||
if( gpWorldItemsSummaryArray )
|
if( gpWorldItemsSummaryArray )
|
||||||
{
|
{
|
||||||
MemFree( gpWorldItemsSummaryArray );
|
delete[]( gpWorldItemsSummaryArray );
|
||||||
gpWorldItemsSummaryArray = NULL;
|
gpWorldItemsSummaryArray = NULL;
|
||||||
gusWorldItemsSummaryArraySize = 0;
|
gusWorldItemsSummaryArraySize = 0;
|
||||||
}
|
}
|
||||||
if( gpPEnemyItemsSummaryArray )
|
if( gpPEnemyItemsSummaryArray )
|
||||||
{
|
{
|
||||||
MemFree( gpPEnemyItemsSummaryArray );
|
delete[]( gpPEnemyItemsSummaryArray );
|
||||||
gpPEnemyItemsSummaryArray = NULL;
|
gpPEnemyItemsSummaryArray = NULL;
|
||||||
gusPEnemyItemsSummaryArraySize = 0;
|
gusPEnemyItemsSummaryArraySize = 0;
|
||||||
}
|
}
|
||||||
if( gpNEnemyItemsSummaryArray )
|
if( gpNEnemyItemsSummaryArray )
|
||||||
{
|
{
|
||||||
MemFree( gpNEnemyItemsSummaryArray );
|
delete[]( gpNEnemyItemsSummaryArray );
|
||||||
gpNEnemyItemsSummaryArray = NULL;
|
gpNEnemyItemsSummaryArray = NULL;
|
||||||
gusNEnemyItemsSummaryArraySize = 0;
|
gusNEnemyItemsSummaryArraySize = 0;
|
||||||
}
|
}
|
||||||
@@ -2993,9 +2997,12 @@ void SetupItemDetailsMode( BOOLEAN fAllowRecursion )
|
|||||||
ShowButton( iSummaryButton[ SUMMARY_SCIFI ] );
|
ShowButton( iSummaryButton[ SUMMARY_SCIFI ] );
|
||||||
ShowButton( iSummaryButton[ SUMMARY_REAL ] );
|
ShowButton( iSummaryButton[ SUMMARY_REAL ] );
|
||||||
ShowButton( iSummaryButton[ SUMMARY_ENEMY ] );
|
ShowButton( iSummaryButton[ SUMMARY_ENEMY ] );
|
||||||
gpWorldItemsSummaryArray = (WORLDITEM*)MemAlloc( sizeof( WORLDITEM ) * uiNumItems );
|
gpWorldItemsSummaryArray = new WORLDITEM[ uiNumItems ];
|
||||||
gusWorldItemsSummaryArraySize = gpCurrentSectorSummary->usNumItems;
|
gusWorldItemsSummaryArraySize = gpCurrentSectorSummary->usNumItems;
|
||||||
FileRead( hfile, gpWorldItemsSummaryArray, sizeof( WORLDITEM ) * uiNumItems, &uiNumBytesRead );
|
for (unsigned int x = 0; x < uiNumItems; ++x)
|
||||||
|
{
|
||||||
|
gpWorldItemsSummaryArray[x].Load(hfile);
|
||||||
|
}
|
||||||
|
|
||||||
//NOW, do the enemy's items!
|
//NOW, do the enemy's items!
|
||||||
//We need to do two passes. The first pass simply processes all the enemies and counts all the droppable items
|
//We need to do two passes. The first pass simply processes all the enemies and counts all the droppable items
|
||||||
@@ -3020,9 +3027,7 @@ void SetupItemDetailsMode( BOOLEAN fAllowRecursion )
|
|||||||
}
|
}
|
||||||
if( basic.fDetailedPlacement )
|
if( basic.fDetailedPlacement )
|
||||||
{ //skip static priority placement
|
{ //skip static priority placement
|
||||||
// WDS - Clean up inventory handling
|
if ( !priority.Load(hfile, SAVE_GAME_VERSION, false) )
|
||||||
FileRead( hfile, &priority, SIZEOF_SOLDIERCREATE_STRUCT, &uiNumBytesRead );
|
|
||||||
if( uiNumBytesRead != SIZEOF_SOLDIERCREATE_STRUCT )
|
|
||||||
{ //Invalid situation.
|
{ //Invalid situation.
|
||||||
FileClose( hfile );
|
FileClose( hfile );
|
||||||
return;
|
return;
|
||||||
@@ -3039,7 +3044,7 @@ void SetupItemDetailsMode( BOOLEAN fAllowRecursion )
|
|||||||
for( j = 0; j < 9; j++ )
|
for( j = 0; j < 9; j++ )
|
||||||
{
|
{
|
||||||
pItem = &priority.Inv[ gbMercSlotTypes[ j ] ];
|
pItem = &priority.Inv[ gbMercSlotTypes[ j ] ];
|
||||||
if( pItem->usItem != NOTHING && !( pItem->fFlags & OBJECT_UNDROPPABLE ) )
|
if( pItem->exists() == true && !( (*pItem).fFlags & OBJECT_UNDROPPABLE ) )
|
||||||
{
|
{
|
||||||
usNumItems++;
|
usNumItems++;
|
||||||
}
|
}
|
||||||
@@ -3058,13 +3063,11 @@ void SetupItemDetailsMode( BOOLEAN fAllowRecursion )
|
|||||||
//Pass 1 completed, so now allocate enough space to hold all the items
|
//Pass 1 completed, so now allocate enough space to hold all the items
|
||||||
if( gusPEnemyItemsSummaryArraySize )
|
if( gusPEnemyItemsSummaryArraySize )
|
||||||
{
|
{
|
||||||
gpPEnemyItemsSummaryArray = (OBJECTTYPE*)MemAlloc( sizeof( OBJECTTYPE ) * gusPEnemyItemsSummaryArraySize );
|
gpPEnemyItemsSummaryArray = new OBJECTTYPE[ gusPEnemyItemsSummaryArraySize ];
|
||||||
memset( gpPEnemyItemsSummaryArray, 0, sizeof( OBJECTTYPE ) * gusPEnemyItemsSummaryArraySize );
|
|
||||||
}
|
}
|
||||||
if( gusNEnemyItemsSummaryArraySize )
|
if( gusNEnemyItemsSummaryArraySize )
|
||||||
{
|
{
|
||||||
gpNEnemyItemsSummaryArray = (OBJECTTYPE*)MemAlloc( sizeof( OBJECTTYPE ) * gusNEnemyItemsSummaryArraySize );
|
gpNEnemyItemsSummaryArray = new OBJECTTYPE[ gusNEnemyItemsSummaryArraySize ];
|
||||||
memset( gpNEnemyItemsSummaryArray, 0, sizeof( OBJECTTYPE ) * gusNEnemyItemsSummaryArraySize );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//PASS #2
|
//PASS #2
|
||||||
@@ -3085,9 +3088,7 @@ void SetupItemDetailsMode( BOOLEAN fAllowRecursion )
|
|||||||
}
|
}
|
||||||
if( basic.fDetailedPlacement )
|
if( basic.fDetailedPlacement )
|
||||||
{ //skip static priority placement
|
{ //skip static priority placement
|
||||||
// WDS - Clean up inventory handling
|
if ( !priority.Load(hfile, SAVE_GAME_VERSION, false) )
|
||||||
FileRead( hfile, &priority, SIZEOF_SOLDIERCREATE_STRUCT, &uiNumBytesRead );
|
|
||||||
if( uiNumBytesRead != SIZEOF_SOLDIERCREATE_STRUCT )
|
|
||||||
{ //Invalid situation.
|
{ //Invalid situation.
|
||||||
FileClose( hfile );
|
FileClose( hfile );
|
||||||
return;
|
return;
|
||||||
@@ -3104,16 +3105,16 @@ void SetupItemDetailsMode( BOOLEAN fAllowRecursion )
|
|||||||
for( j = 0; j < 9; j++ )
|
for( j = 0; j < 9; j++ )
|
||||||
{
|
{
|
||||||
pItem = &priority.Inv[ gbMercSlotTypes[ j ] ];
|
pItem = &priority.Inv[ gbMercSlotTypes[ j ] ];
|
||||||
if( pItem->usItem != NOTHING && !( pItem->fFlags & OBJECT_UNDROPPABLE ) )
|
if( pItem->exists() == true && !( (*pItem).fFlags & OBJECT_UNDROPPABLE ) )
|
||||||
{
|
{
|
||||||
if( basic.fPriorityExistance )
|
if( basic.fPriorityExistance )
|
||||||
{
|
{
|
||||||
memcpy( &(gpPEnemyItemsSummaryArray[ usPEnemyIndex ]), pItem, sizeof( OBJECTTYPE ) );
|
gpPEnemyItemsSummaryArray[ usPEnemyIndex ] = *pItem;
|
||||||
usPEnemyIndex++;
|
usPEnemyIndex++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
memcpy( &(gpNEnemyItemsSummaryArray[ usNEnemyIndex ]), pItem, sizeof( OBJECTTYPE ) );
|
gpNEnemyItemsSummaryArray[ usNEnemyIndex ] = *pItem;
|
||||||
usNEnemyIndex++;
|
usNEnemyIndex++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3151,3 +3152,4 @@ void ClearSummaryInfo()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -626,3 +626,4 @@ void PasteSmartBrokenWall( UINT32 iMapIndex )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+2
-5
@@ -122,7 +122,7 @@ void EraseMapTile( UINT32 iMapIndex )
|
|||||||
case DRAW_MODE_EXITGRID:
|
case DRAW_MODE_EXITGRID:
|
||||||
AddToUndoList( iMapIndex );
|
AddToUndoList( iMapIndex );
|
||||||
RemoveExitGridFromWorld( iMapIndex );
|
RemoveExitGridFromWorld( iMapIndex );
|
||||||
RemoveTopmost( (UINT16)iMapIndex, FIRSTPOINTERS8 );
|
RemoveTopmost( (INT16)iMapIndex, FIRSTPOINTERS8 );
|
||||||
break;
|
break;
|
||||||
case DRAW_MODE_GROUND:
|
case DRAW_MODE_GROUND:
|
||||||
// Is there ground on this tile? if not, get out o here
|
// Is there ground on this tile? if not, get out o here
|
||||||
@@ -541,7 +541,6 @@ void PasteStructure2( UINT32 iMapIndex )
|
|||||||
//
|
//
|
||||||
void PasteStructureCommon( UINT32 iMapIndex )
|
void PasteStructureCommon( UINT32 iMapIndex )
|
||||||
{
|
{
|
||||||
// BOOLEAN fDoPaste = FALSE;
|
|
||||||
UINT32 fHeadType;
|
UINT32 fHeadType;
|
||||||
UINT16 usUseIndex;
|
UINT16 usUseIndex;
|
||||||
UINT16 usUseObjIndex;
|
UINT16 usUseObjIndex;
|
||||||
@@ -1145,8 +1144,6 @@ void RaiseWorldLand( )
|
|||||||
BOOLEAN fSomethingRaised = FALSE;
|
BOOLEAN fSomethingRaised = FALSE;
|
||||||
UINT8 ubLoop;
|
UINT8 ubLoop;
|
||||||
UINT16 usIndex;
|
UINT16 usIndex;
|
||||||
BOOLEAN fStopRaise = FALSE;
|
|
||||||
INT32 iCounterA = 0, iCounterB = 0;
|
|
||||||
INT32 iStartNumberOfRaises = 0;
|
INT32 iStartNumberOfRaises = 0;
|
||||||
INT32 iNumberOfRaises = 0;
|
INT32 iNumberOfRaises = 0;
|
||||||
BOOLEAN fAboutToRaise = FALSE;
|
BOOLEAN fAboutToRaise = FALSE;
|
||||||
@@ -1176,7 +1173,6 @@ void RaiseWorldLand( )
|
|||||||
pStruct = pStruct->pNext;
|
pStruct = pStruct->pNext;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
pTileElement = &(gTileDatabase[ pStruct->usIndex ]);
|
pTileElement = &(gTileDatabase[ pStruct->usIndex ]);
|
||||||
if (pTileElement->fType==FIRSTCLIFF)
|
if (pTileElement->fType==FIRSTCLIFF)
|
||||||
{
|
{
|
||||||
@@ -1451,3 +1447,4 @@ void EliminateObjectLayerRedundancy()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+10
-6
@@ -25,7 +25,6 @@
|
|||||||
#include "Interactive Tiles.h"
|
#include "Interactive Tiles.h"
|
||||||
#include "overhead types.h"
|
#include "overhead types.h"
|
||||||
#include "Overhead.h"
|
#include "Overhead.h"
|
||||||
#include "Soldier Control.h"
|
|
||||||
#include "Handle UI.h"
|
#include "Handle UI.h"
|
||||||
#include "Event Pump.h"
|
#include "Event Pump.h"
|
||||||
#include "world items.h"
|
#include "world items.h"
|
||||||
@@ -76,6 +75,9 @@
|
|||||||
#include "Summary Info.h"
|
#include "Summary Info.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//forward declarations of common classes to eliminate includes
|
||||||
|
class OBJECTTYPE;
|
||||||
|
class SOLDIERTYPE;
|
||||||
|
|
||||||
extern CHAR8 *szMusicList[NUM_MUSIC];
|
extern CHAR8 *szMusicList[NUM_MUSIC];
|
||||||
|
|
||||||
@@ -1296,6 +1298,7 @@ void HandleJA2ToolbarSelection( void )
|
|||||||
case TBAR_MODE_ITEM_WEAPONS:
|
case TBAR_MODE_ITEM_WEAPONS:
|
||||||
case TBAR_MODE_ITEM_AMMO:
|
case TBAR_MODE_ITEM_AMMO:
|
||||||
case TBAR_MODE_ITEM_ARMOUR:
|
case TBAR_MODE_ITEM_ARMOUR:
|
||||||
|
case TBAR_MODE_ITEM_LBEGEAR:
|
||||||
case TBAR_MODE_ITEM_EXPLOSIVES:
|
case TBAR_MODE_ITEM_EXPLOSIVES:
|
||||||
case TBAR_MODE_ITEM_EQUIPMENT1:
|
case TBAR_MODE_ITEM_EQUIPMENT1:
|
||||||
case TBAR_MODE_ITEM_EQUIPMENT2:
|
case TBAR_MODE_ITEM_EQUIPMENT2:
|
||||||
@@ -3148,7 +3151,6 @@ void EnsureStatusOfEditorButtons()
|
|||||||
|
|
||||||
void HandleMouseClicksInGameScreen()
|
void HandleMouseClicksInGameScreen()
|
||||||
{
|
{
|
||||||
//EXITGRID dummy={0,0,0,0};
|
|
||||||
INT16 sX, sY;
|
INT16 sX, sY;
|
||||||
BOOLEAN fPrevState;
|
BOOLEAN fPrevState;
|
||||||
if( !GetMouseXY( &sGridX, &sGridY ) )
|
if( !GetMouseXY( &sGridX, &sGridY ) )
|
||||||
@@ -3297,7 +3299,7 @@ void HandleMouseClicksInGameScreen()
|
|||||||
case DRAW_MODE_PLACE_ITEM:
|
case DRAW_MODE_PLACE_ITEM:
|
||||||
if( gfFirstPlacement )
|
if( gfFirstPlacement )
|
||||||
{
|
{
|
||||||
AddSelectedItemToWorld( (UINT16)iMapIndex );
|
AddSelectedItemToWorld( (INT16)iMapIndex );
|
||||||
gfFirstPlacement = FALSE;
|
gfFirstPlacement = FALSE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -3319,7 +3321,7 @@ void HandleMouseClicksInGameScreen()
|
|||||||
HandleRightClickOnMerc( iMapIndex );
|
HandleRightClickOnMerc( iMapIndex );
|
||||||
break;
|
break;
|
||||||
case DRAW_MODE_PLACE_ITEM:
|
case DRAW_MODE_PLACE_ITEM:
|
||||||
HandleRightClickOnItem( (UINT16)iMapIndex );
|
HandleRightClickOnItem( (INT16)iMapIndex );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Handle the right clicks in the main window to bring up the appropriate selection window
|
// Handle the right clicks in the main window to bring up the appropriate selection window
|
||||||
@@ -3357,7 +3359,7 @@ void HandleMouseClicksInGameScreen()
|
|||||||
RestoreWalls( iMapIndex );
|
RestoreWalls( iMapIndex );
|
||||||
break;
|
break;
|
||||||
case DRAW_MODE_EXITGRID:
|
case DRAW_MODE_EXITGRID:
|
||||||
if( GetExitGrid( (UINT16)iMapIndex, &gExitGrid ) )
|
if( GetExitGrid( (INT16)iMapIndex, &gExitGrid ) )
|
||||||
ApplyNewExitGridValuesToTextFields();
|
ApplyNewExitGridValuesToTextFields();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -3603,7 +3605,7 @@ void DrawObjectsBasedOnSelectionRegion()
|
|||||||
case DRAW_MODE_EXITGRID:
|
case DRAW_MODE_EXITGRID:
|
||||||
AddToUndoList( iMapIndex );
|
AddToUndoList( iMapIndex );
|
||||||
AddExitGridToWorld( iMapIndex, &gExitGrid );
|
AddExitGridToWorld( iMapIndex, &gExitGrid );
|
||||||
AddTopmostToTail( (UINT16)iMapIndex, FIRSTPOINTERS8 );
|
AddTopmostToTail( (INT16)iMapIndex, FIRSTPOINTERS8 );
|
||||||
break;
|
break;
|
||||||
case DRAW_MODE_DEBRIS: PasteDebris( iMapIndex ); break;
|
case DRAW_MODE_DEBRIS: PasteDebris( iMapIndex ); break;
|
||||||
case DRAW_MODE_FLOORS: PasteSingleFloor( iMapIndex ); break;
|
case DRAW_MODE_FLOORS: PasteSingleFloor( iMapIndex ); break;
|
||||||
@@ -3852,3 +3854,5 @@ UINT32 EditScreenShutdown( )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -165,3 +165,4 @@ void MsgBoxCnclClkCallback( GUI_BUTTON *butn, INT32 reason )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1197,3 +1197,4 @@ void AnalyseCaveMapForStructureInfo()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -500,3 +500,4 @@ BOOLEAN ProcessPopupMenuIfActive( )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+6
-5
@@ -96,12 +96,12 @@ INT16 gbSmoothWaterStruct[] =
|
|||||||
-1
|
-1
|
||||||
};
|
};
|
||||||
|
|
||||||
BOOLEAN HigherLevel( UINT32 gridno, UINT8 NewLevel );
|
BOOLEAN HigherLevel( INT32 gridno, UINT8 NewLevel );
|
||||||
BOOLEAN ContainsWater( UINT32 gridno );
|
BOOLEAN ContainsWater( INT32 gridno );
|
||||||
|
|
||||||
void SmoothTerrain(int gridno, int origType, UINT16 *piNewTile, BOOLEAN fForceSmooth )
|
void SmoothTerrain(int gridno, int origType, UINT16 *piNewTile, BOOLEAN fForceSmooth )
|
||||||
{
|
{
|
||||||
int temp=0,type=0;
|
int temp=0;
|
||||||
int FullTile = FALSE;
|
int FullTile = FALSE;
|
||||||
UINT16 usOldIndex;
|
UINT16 usOldIndex;
|
||||||
UINT16 usTempIndex;
|
UINT16 usTempIndex;
|
||||||
@@ -277,7 +277,7 @@ void SmoothExitGridRadius( INT16 sMapIndex, UINT8 ubRadius )
|
|||||||
|
|
||||||
void SmoothExitGrid(int gridno, UINT16 *piNewTile, BOOLEAN fForceSmooth )
|
void SmoothExitGrid(int gridno, UINT16 *piNewTile, BOOLEAN fForceSmooth )
|
||||||
{
|
{
|
||||||
int temp=0,type=0;
|
int temp=0;
|
||||||
int FullTile = FALSE;
|
int FullTile = FALSE;
|
||||||
UINT16 usOldIndex;
|
UINT16 usOldIndex;
|
||||||
UINT16 usTempIndex;
|
UINT16 usTempIndex;
|
||||||
@@ -546,7 +546,7 @@ void SmoothWaterTerrain( int gridno, int origType, UINT16 *piNewTile, BOOLEAN fF
|
|||||||
// This procedure will calculate the approriate smooth texture for a water texture
|
// 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
|
// 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
|
// a temp variable, then searching for the right texture and inserting it
|
||||||
int temp=0,type=0;
|
int temp=0;
|
||||||
int FullTile = FALSE;
|
int FullTile = FALSE;
|
||||||
UINT16 usOldIndex;
|
UINT16 usOldIndex;
|
||||||
UINT16 usTempIndex;
|
UINT16 usTempIndex;
|
||||||
@@ -731,3 +731,4 @@ void SmoothWaterTerrain( int gridno, int origType, UINT16 *piNewTile, BOOLEAN fF
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+139
-4
@@ -79,6 +79,11 @@
|
|||||||
#define GIO_IRON_MAN_SETTING_Y iScreenHeightOffset + 355
|
#define GIO_IRON_MAN_SETTING_Y iScreenHeightOffset + 355
|
||||||
#define GIO_IRON_MAN_SETTING_WIDTH GIO_DIF_SETTINGS_WIDTH
|
#define GIO_IRON_MAN_SETTING_WIDTH GIO_DIF_SETTINGS_WIDTH
|
||||||
|
|
||||||
|
// CHRISL:
|
||||||
|
#define GIO_INV_SETTING_X iScreenWidthOffset + 340
|
||||||
|
#define GIO_INV_SETTING_Y GIO_IRON_MAN_SETTING_Y
|
||||||
|
#define GIO_INV_SETTING_WIDTH GIO_DIF_SETTINGS_WIDTH
|
||||||
|
|
||||||
//Difficulty settings
|
//Difficulty settings
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
@@ -120,6 +125,15 @@ enum
|
|||||||
NUM_BR_OPTIONS,
|
NUM_BR_OPTIONS,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// CHRISL: New inventory options
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
GIO_INV_OLD,
|
||||||
|
GIO_INV_NEW,
|
||||||
|
|
||||||
|
NUM_INV_OPTIONS,
|
||||||
|
};
|
||||||
|
|
||||||
// JA2Gold: no more timed turns setting
|
// JA2Gold: no more timed turns setting
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -181,6 +195,10 @@ INT32 giGioMessageBox = -1;
|
|||||||
//extern INT32 gp16PointArial;
|
//extern INT32 gp16PointArial;
|
||||||
|
|
||||||
|
|
||||||
|
// CHRISL: checkbox to toggle INV selection
|
||||||
|
UINT32 guiINVOptionToggles[ NUM_INV_OPTIONS ];
|
||||||
|
void BtnINVOptionTogglesCallback(GUI_BUTTON *btn,INT32 reason);
|
||||||
|
|
||||||
// Done Button
|
// Done Button
|
||||||
void BtnGIODoneCallback(GUI_BUTTON *btn,INT32 reason);
|
void BtnGIODoneCallback(GUI_BUTTON *btn,INT32 reason);
|
||||||
UINT32 guiGIODoneButton;
|
UINT32 guiGIODoneButton;
|
||||||
@@ -455,6 +473,29 @@ BOOLEAN EnterGIOScreen()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CHRISL: New inventory options
|
||||||
|
if(iResolution != 0){
|
||||||
|
usPosY = GIO_INV_SETTING_Y - GIO_OFFSET_TO_TOGGLE_BOX_Y;
|
||||||
|
for( cnt=0; cnt<NUM_INV_OPTIONS; cnt++)
|
||||||
|
{
|
||||||
|
guiINVOptionToggles[ cnt ] = CreateCheckBoxButton( GIO_INV_SETTING_X+GIO_OFFSET_TO_TOGGLE_BOX, usPosY,
|
||||||
|
"INTERFACE\\OptionsCheck.sti", MSYS_PRIORITY_HIGH+10,
|
||||||
|
BtnINVOptionTogglesCallback );
|
||||||
|
MSYS_SetBtnUserData( guiINVOptionToggles[ cnt ], 0, cnt );
|
||||||
|
|
||||||
|
usPosY += GIO_GAP_BN_SETTINGS-5;
|
||||||
|
}
|
||||||
|
switch( gGameOptions.ubInventorySystem )
|
||||||
|
{
|
||||||
|
case INVENTORY_OLD:
|
||||||
|
ButtonList[ guiINVOptionToggles[ GIO_INV_OLD ] ]->uiFlags |= BUTTON_CLICKED_ON;
|
||||||
|
break;
|
||||||
|
case INVENTORY_NEW:
|
||||||
|
ButtonList[ guiINVOptionToggles[ GIO_INV_NEW ] ]->uiFlags |= BUTTON_CLICKED_ON;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// JA2Gold: iron man buttons
|
// JA2Gold: iron man buttons
|
||||||
usPosY = GIO_IRON_MAN_SETTING_Y - GIO_OFFSET_TO_TOGGLE_BOX_Y;
|
usPosY = GIO_IRON_MAN_SETTING_Y - GIO_OFFSET_TO_TOGGLE_BOX_Y;
|
||||||
for( cnt=0; cnt<NUM_SAVE_OPTIONS; cnt++)
|
for( cnt=0; cnt<NUM_SAVE_OPTIONS; cnt++)
|
||||||
@@ -570,6 +611,12 @@ BOOLEAN ExitGIOScreen()
|
|||||||
for( cnt=0; cnt<NUM_BR_OPTIONS; cnt++)
|
for( cnt=0; cnt<NUM_BR_OPTIONS; cnt++)
|
||||||
RemoveButton( guiBROptionToggles[ cnt ] );
|
RemoveButton( guiBROptionToggles[ cnt ] );
|
||||||
|
|
||||||
|
// CHRISL
|
||||||
|
if(iResolution != 0){
|
||||||
|
for( cnt=0; cnt<NUM_INV_OPTIONS; cnt++)
|
||||||
|
RemoveButton( guiINVOptionToggles[ cnt ] );
|
||||||
|
}
|
||||||
|
|
||||||
// JA2Gold: remove iron man buttons
|
// JA2Gold: remove iron man buttons
|
||||||
for( cnt=0; cnt<NUM_SAVE_OPTIONS; cnt++)
|
for( cnt=0; cnt<NUM_SAVE_OPTIONS; cnt++)
|
||||||
RemoveButton( guiGameSaveToggles[ cnt ] );
|
RemoveButton( guiGameSaveToggles[ cnt ] );
|
||||||
@@ -727,6 +774,17 @@ BOOLEAN RenderGIOScreen()
|
|||||||
|
|
||||||
DisplayWrappedString( (UINT16)(GIO_BR_SETTING_X+GIO_OFFSET_TO_TEXT), usPosY, GIO_DIF_SETTINGS_WIDTH, 2, GIO_TOGGLE_TEXT_FONT, GIO_TOGGLE_TEXT_COLOR, gzGIOScreenText[ GIO_BR_AWESOME_TEXT ], FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
DisplayWrappedString( (UINT16)(GIO_BR_SETTING_X+GIO_OFFSET_TO_TEXT), usPosY, GIO_DIF_SETTINGS_WIDTH, 2, GIO_TOGGLE_TEXT_FONT, GIO_TOGGLE_TEXT_COLOR, gzGIOScreenText[ GIO_BR_AWESOME_TEXT ], FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
|
|
||||||
|
// CHRISL
|
||||||
|
if(iResolution != 0){
|
||||||
|
DisplayWrappedString( GIO_INV_SETTING_X, (UINT16)(GIO_INV_SETTING_Y-GIO_GAP_BN_SETTINGS), GIO_DIF_SETTINGS_WIDTH + 20, 2, GIO_TOGGLE_TEXT_FONT, GIO_TOGGLE_TEXT_COLOR, gzGIOScreenText[ GIO_INV_TEXT ], FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
|
usPosY = GIO_INV_SETTING_Y+2;
|
||||||
|
|
||||||
|
DisplayWrappedString( (UINT16)(GIO_INV_SETTING_X+GIO_OFFSET_TO_TEXT), usPosY, GIO_DIF_SETTINGS_WIDTH, 2, GIO_TOGGLE_TEXT_FONT, GIO_TOGGLE_TEXT_COLOR, gzGIOScreenText[ GIO_INV_OLD_TEXT ], FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
|
usPosY += GIO_GAP_BN_SETTINGS-5;
|
||||||
|
|
||||||
|
DisplayWrappedString( (UINT16)(GIO_INV_SETTING_X+GIO_OFFSET_TO_TEXT), usPosY, GIO_DIF_SETTINGS_WIDTH, 2, GIO_TOGGLE_TEXT_FONT, GIO_TOGGLE_TEXT_COLOR, gzGIOScreenText[ GIO_INV_NEW_TEXT ], FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
|
}
|
||||||
|
|
||||||
// JA2Gold: Display the iron man Settings Title Text
|
// JA2Gold: Display the iron man Settings Title Text
|
||||||
|
|
||||||
DisplayWrappedString( GIO_IRON_MAN_SETTING_X, (UINT16)(GIO_IRON_MAN_SETTING_Y-GIO_GAP_BN_SETTINGS), GIO_DIF_SETTINGS_WIDTH, 2, GIO_TOGGLE_TEXT_FONT, GIO_TOGGLE_TEXT_COLOR, gzGIOScreenText[ GIO_GAME_SAVE_STYLE_TEXT ], FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
DisplayWrappedString( GIO_IRON_MAN_SETTING_X, (UINT16)(GIO_IRON_MAN_SETTING_Y-GIO_GAP_BN_SETTINGS), GIO_DIF_SETTINGS_WIDTH, 2, GIO_TOGGLE_TEXT_FONT, GIO_TOGGLE_TEXT_COLOR, gzGIOScreenText[ GIO_GAME_SAVE_STYLE_TEXT ], FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
@@ -787,7 +845,7 @@ void BtnDifficultyTogglesCallback( GUI_BUTTON *btn, INT32 reason )
|
|||||||
{
|
{
|
||||||
if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||||
{
|
{
|
||||||
UINT8 ubButton = (UINT8)MSYS_GetBtnUserData( btn, 0 );
|
/*UINT8 ubButton = (UINT8)*/MSYS_GetBtnUserData( btn, 0 );
|
||||||
|
|
||||||
if( btn->uiFlags & BUTTON_CLICKED_ON )
|
if( btn->uiFlags & BUTTON_CLICKED_ON )
|
||||||
{
|
{
|
||||||
@@ -827,7 +885,7 @@ void BtnBROptionTogglesCallback( GUI_BUTTON *btn, INT32 reason )
|
|||||||
{
|
{
|
||||||
if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||||
{
|
{
|
||||||
UINT8 ubButton = (UINT8)MSYS_GetBtnUserData( btn, 0 );
|
/*UINT8 ubButton = (UINT8)*/MSYS_GetBtnUserData( btn, 0 );
|
||||||
|
|
||||||
if( btn->uiFlags & BUTTON_CLICKED_ON )
|
if( btn->uiFlags & BUTTON_CLICKED_ON )
|
||||||
{
|
{
|
||||||
@@ -861,11 +919,50 @@ void BtnBROptionTogglesCallback( GUI_BUTTON *btn, INT32 reason )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CHRISL:
|
||||||
|
void BtnINVOptionTogglesCallback(GUI_BUTTON *btn,INT32 reason)
|
||||||
|
{
|
||||||
|
if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||||
|
{
|
||||||
|
/*UINT8 ubButton = (UINT8)*/MSYS_GetBtnUserData( btn, 0 );
|
||||||
|
|
||||||
|
if( btn->uiFlags & BUTTON_CLICKED_ON )
|
||||||
|
{
|
||||||
|
UINT8 cnt;
|
||||||
|
|
||||||
|
for( cnt=0; cnt<NUM_INV_OPTIONS; cnt++)
|
||||||
|
{
|
||||||
|
ButtonList[ guiINVOptionToggles[ cnt ] ]->uiFlags &= ~BUTTON_CLICKED_ON;
|
||||||
|
}
|
||||||
|
|
||||||
|
//enable the current button
|
||||||
|
btn->uiFlags |= BUTTON_CLICKED_ON;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
UINT8 cnt;
|
||||||
|
BOOLEAN fAnyChecked=FALSE;
|
||||||
|
|
||||||
|
//if none of the other boxes are checked, do not uncheck this box
|
||||||
|
for( cnt=0; cnt<NUM_INV_OPTIONS; cnt++)
|
||||||
|
{
|
||||||
|
if( ButtonList[ guiINVOptionToggles[ cnt ] ]->uiFlags & BUTTON_CLICKED_ON )
|
||||||
|
{
|
||||||
|
fAnyChecked = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//if none are checked, re check this one
|
||||||
|
if( !fAnyChecked )
|
||||||
|
btn->uiFlags |= BUTTON_CLICKED_ON;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void BtnGameStyleTogglesCallback( GUI_BUTTON *btn, INT32 reason )
|
void BtnGameStyleTogglesCallback( GUI_BUTTON *btn, INT32 reason )
|
||||||
{
|
{
|
||||||
if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||||
{
|
{
|
||||||
UINT8 ubButton = (UINT8)MSYS_GetBtnUserData( btn, 0 );
|
/*UINT8 ubButton = (UINT8)*/MSYS_GetBtnUserData( btn, 0 );
|
||||||
|
|
||||||
if( btn->uiFlags & BUTTON_CLICKED_ON )
|
if( btn->uiFlags & BUTTON_CLICKED_ON )
|
||||||
{
|
{
|
||||||
@@ -941,7 +1038,7 @@ void BtnGunOptionsTogglesCallback( GUI_BUTTON *btn, INT32 reason )
|
|||||||
{
|
{
|
||||||
if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||||
{
|
{
|
||||||
UINT8 ubButton = (UINT8)MSYS_GetBtnUserData( btn, 0 );
|
/*UINT8 ubButton = (UINT8)*/MSYS_GetBtnUserData( btn, 0 );
|
||||||
|
|
||||||
if( btn->uiFlags & BUTTON_CLICKED_ON )
|
if( btn->uiFlags & BUTTON_CLICKED_ON )
|
||||||
{
|
{
|
||||||
@@ -1093,6 +1190,21 @@ UINT8 GetCurrentBROptionButtonSetting()
|
|||||||
return( 0 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CHRISL:
|
||||||
|
UINT8 GetCurrentINVOptionButtonSetting()
|
||||||
|
{
|
||||||
|
UINT8 cnt;
|
||||||
|
|
||||||
|
for( cnt=0; cnt<NUM_INV_OPTIONS; cnt++)
|
||||||
|
{
|
||||||
|
if( ButtonList[ guiINVOptionToggles[ cnt ] ]->uiFlags & BUTTON_CLICKED_ON )
|
||||||
|
{
|
||||||
|
return( cnt );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return( 0 );
|
||||||
|
}
|
||||||
|
|
||||||
UINT8 GetCurrentGameStyleButtonSetting()
|
UINT8 GetCurrentGameStyleButtonSetting()
|
||||||
{
|
{
|
||||||
UINT8 cnt;
|
UINT8 cnt;
|
||||||
@@ -1215,6 +1327,16 @@ void RestoreGIOButtonBackGrounds()
|
|||||||
RestoreExternBackgroundRect( GIO_BR_SETTING_X+GIO_OFFSET_TO_TOGGLE_BOX, usPosY, 34, 29 );
|
RestoreExternBackgroundRect( GIO_BR_SETTING_X+GIO_OFFSET_TO_TOGGLE_BOX, usPosY, 34, 29 );
|
||||||
usPosY += GIO_GAP_BN_SETTINGS-5;
|
usPosY += GIO_GAP_BN_SETTINGS-5;
|
||||||
}
|
}
|
||||||
|
// CHRISL
|
||||||
|
|
||||||
|
if(iResolution != 0){
|
||||||
|
usPosY = GIO_INV_SETTING_Y-GIO_OFFSET_TO_TOGGLE_BOX_Y;
|
||||||
|
for( cnt=0; cnt<NUM_INV_OPTIONS; cnt++)
|
||||||
|
{
|
||||||
|
RestoreExternBackgroundRect( GIO_INV_SETTING_X+GIO_OFFSET_TO_TOGGLE_BOX, usPosY, 34, 29 );
|
||||||
|
usPosY += GIO_GAP_BN_SETTINGS-5;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1246,6 +1368,19 @@ void DoneFadeOutForExitGameInitOptionScreen( void )
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CHRISL:
|
||||||
|
if(iResolution != 0){
|
||||||
|
switch ( GetCurrentINVOptionButtonSetting() )
|
||||||
|
{
|
||||||
|
case GIO_INV_OLD:
|
||||||
|
gGameOptions.ubInventorySystem = INVENTORY_OLD;
|
||||||
|
break;
|
||||||
|
case GIO_INV_NEW:
|
||||||
|
gGameOptions.ubInventorySystem = INVENTORY_NEW;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// gubGIOExitScreen = INIT_SCREEN;
|
// gubGIOExitScreen = INIT_SCREEN;
|
||||||
gubGIOExitScreen = INTRO_SCREEN;
|
gubGIOExitScreen = INTRO_SCREEN;
|
||||||
|
|
||||||
|
|||||||
+17
-3
@@ -67,7 +67,10 @@ void CDromEjectionErrorMessageBoxCallBack( UINT8 bExitValue );
|
|||||||
//Change this number when we want any who gets the new build to reset the options
|
//Change this number when we want any who gets the new build to reset the options
|
||||||
#define GAME_SETTING_CURRENT_VERSION 522
|
#define GAME_SETTING_CURRENT_VERSION 522
|
||||||
|
|
||||||
|
bool UsingNewInventorySystem()
|
||||||
|
{
|
||||||
|
return (gGameOptions.ubInventorySystem == INVENTORY_NEW);
|
||||||
|
}
|
||||||
|
|
||||||
BOOLEAN LoadGameSettings()
|
BOOLEAN LoadGameSettings()
|
||||||
{
|
{
|
||||||
@@ -296,6 +299,7 @@ void InitGameOptions()
|
|||||||
gGameOptions.fAirStrikes = FALSE;
|
gGameOptions.fAirStrikes = FALSE;
|
||||||
gGameOptions.ubGameStyle = STYLE_SCIFI;
|
gGameOptions.ubGameStyle = STYLE_SCIFI;
|
||||||
gGameOptions.ubDifficultyLevel = DIF_LEVEL_MEDIUM;
|
gGameOptions.ubDifficultyLevel = DIF_LEVEL_MEDIUM;
|
||||||
|
gGameOptions.ubInventorySystem = INVENTORY_NEW;
|
||||||
//gGameOptions.fTurnTimeLimit = FALSE;
|
//gGameOptions.fTurnTimeLimit = FALSE;
|
||||||
|
|
||||||
gGameOptions.fIronManMode = FALSE;
|
gGameOptions.fIronManMode = FALSE;
|
||||||
@@ -473,6 +477,9 @@ void LoadGameExternalOptions()
|
|||||||
gGameExternalOptions.fEnableSoldierTooltipBigSlot2 = iniReader.ReadBoolean("JA2 Tactical Settings", "SOLDIER_TOOLTIP_DISPLAY_BIG_SLOT_2", TRUE);
|
gGameExternalOptions.fEnableSoldierTooltipBigSlot2 = iniReader.ReadBoolean("JA2 Tactical Settings", "SOLDIER_TOOLTIP_DISPLAY_BIG_SLOT_2", TRUE);
|
||||||
gGameExternalOptions.fEnableSoldierTooltipBigSlot3 = iniReader.ReadBoolean("JA2 Tactical Settings", "SOLDIER_TOOLTIP_DISPLAY_BIG_SLOT_3", TRUE);
|
gGameExternalOptions.fEnableSoldierTooltipBigSlot3 = iniReader.ReadBoolean("JA2 Tactical Settings", "SOLDIER_TOOLTIP_DISPLAY_BIG_SLOT_3", TRUE);
|
||||||
gGameExternalOptions.fEnableSoldierTooltipBigSlot4 = iniReader.ReadBoolean("JA2 Tactical Settings", "SOLDIER_TOOLTIP_DISPLAY_BIG_SLOT_4", TRUE);
|
gGameExternalOptions.fEnableSoldierTooltipBigSlot4 = iniReader.ReadBoolean("JA2 Tactical Settings", "SOLDIER_TOOLTIP_DISPLAY_BIG_SLOT_4", TRUE);
|
||||||
|
gGameExternalOptions.fEnableSoldierTooltipBigSlot5 = iniReader.ReadBoolean("JA2 Tactical Settings", "SOLDIER_TOOLTIP_DISPLAY_BIG_SLOT_5", TRUE);
|
||||||
|
gGameExternalOptions.fEnableSoldierTooltipBigSlot6 = iniReader.ReadBoolean("JA2 Tactical Settings", "SOLDIER_TOOLTIP_DISPLAY_BIG_SLOT_6", TRUE);
|
||||||
|
gGameExternalOptions.fEnableSoldierTooltipBigSlot7 = iniReader.ReadBoolean("JA2 Tactical Settings", "SOLDIER_TOOLTIP_DISPLAY_BIG_SLOT_7", TRUE);
|
||||||
// ShadoWarrior: Tooltip changes (end)
|
// ShadoWarrior: Tooltip changes (end)
|
||||||
|
|
||||||
// Unload weapons & remove attachments
|
// Unload weapons & remove attachments
|
||||||
@@ -515,6 +522,7 @@ void LoadGameExternalOptions()
|
|||||||
//Lalien: Game starting time
|
//Lalien: Game starting time
|
||||||
gGameExternalOptions.iGameStartingTime = iniReader.ReadInteger("JA2 Gameplay Settings", "GAME_STARTING_TIME", NUM_SEC_IN_HOUR);
|
gGameExternalOptions.iGameStartingTime = iniReader.ReadInteger("JA2 Gameplay Settings", "GAME_STARTING_TIME", NUM_SEC_IN_HOUR);
|
||||||
|
|
||||||
|
|
||||||
// WANNE: Check for invalid starting time
|
// WANNE: Check for invalid starting time
|
||||||
if (gGameExternalOptions.iGameStartingTime < 0 || gGameExternalOptions.iGameStartingTime >= NUM_SEC_IN_DAY)
|
if (gGameExternalOptions.iGameStartingTime < 0 || gGameExternalOptions.iGameStartingTime >= NUM_SEC_IN_DAY)
|
||||||
{
|
{
|
||||||
@@ -708,6 +716,14 @@ void LoadGameExternalOptions()
|
|||||||
// WANNE: Added INI file Option for enemy ambushes, so we also have the option to play vanilla ja2 ambush settings
|
// WANNE: Added INI file Option for enemy ambushes, so we also have the option to play vanilla ja2 ambush settings
|
||||||
gGameExternalOptions.fEnableChanceOfEnemyAmbushesOnInsaneDifficult = iniReader.ReadBoolean("JA2 Gameplay Settings", "ENABLE_CHANCE_OF_ENEMY_AMBUSHES_ON_INSANE_DIFFICULT", TRUE);
|
gGameExternalOptions.fEnableChanceOfEnemyAmbushesOnInsaneDifficult = iniReader.ReadBoolean("JA2 Gameplay Settings", "ENABLE_CHANCE_OF_ENEMY_AMBUSHES_ON_INSANE_DIFFICULT", TRUE);
|
||||||
|
|
||||||
|
// CHRISL: New setting to allow Slay to remain as a hired PC
|
||||||
|
gGameExternalOptions.fEnableSlayForever = iniReader.ReadBoolean("JA2 Gameplay Settings", "SLAY_FOREVER", FALSE);
|
||||||
|
|
||||||
|
// CHRISL: New setting to determine the AP cost to reload 1 loose round of ammo
|
||||||
|
gGameExternalOptions.ubAPCostPerRound = iniReader.ReadInteger("JA2 Gameplay Settings","AP_COST_PER_ROUND",2);
|
||||||
|
|
||||||
|
// CHRISL: New setting to determine AP multiplier when reloading with wrong sized clip
|
||||||
|
gGameExternalOptions.ubWrongMagMult = iniReader.ReadFloat("JA2 Gameplay Settings","WRONG_MAG_MULT",2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -720,7 +736,6 @@ BOOLEAN GetCDLocation( )
|
|||||||
{
|
{
|
||||||
UINT32 uiStrngLength = 0;
|
UINT32 uiStrngLength = 0;
|
||||||
CHAR8 zCdLocation[ SGPFILENAME_LEN ];
|
CHAR8 zCdLocation[ SGPFILENAME_LEN ];
|
||||||
//UINT32 uiDriveType=0;
|
|
||||||
UINT32 uiRetVal=0;
|
UINT32 uiRetVal=0;
|
||||||
|
|
||||||
//Do a crude check to make sure the Ja2.ini file is the right on
|
//Do a crude check to make sure the Ja2.ini file is the right on
|
||||||
@@ -892,7 +907,6 @@ BOOLEAN CheckIfGameCdromIsInCDromDrive()
|
|||||||
CHAR8 zCdFile[ SGPFILENAME_LEN ];
|
CHAR8 zCdFile[ SGPFILENAME_LEN ];
|
||||||
|
|
||||||
CHAR8 zCdromRootDrive[512];
|
CHAR8 zCdromRootDrive[512];
|
||||||
//BOOLEAN fFailed = FALSE;
|
|
||||||
UINT32 uiVolumeReturnValue;
|
UINT32 uiVolumeReturnValue;
|
||||||
UINT32 uiLastError = ERROR_SUCCESS;
|
UINT32 uiLastError = ERROR_SUCCESS;
|
||||||
|
|
||||||
|
|||||||
+21
-1
@@ -93,6 +93,12 @@ typedef struct
|
|||||||
|
|
||||||
} GAME_SETTINGS;
|
} GAME_SETTINGS;
|
||||||
|
|
||||||
|
// CHRISL: New Enums to track inventory system
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
INVENTORY_OLD = 0,
|
||||||
|
INVENTORY_NEW = 1
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
//Enums for the difficulty levels
|
//Enums for the difficulty levels
|
||||||
@@ -131,10 +137,13 @@ typedef struct
|
|||||||
BOOLEAN fTurnTimeLimit;
|
BOOLEAN fTurnTimeLimit;
|
||||||
BOOLEAN fIronManMode;
|
BOOLEAN fIronManMode;
|
||||||
UINT8 ubBobbyRay;
|
UINT8 ubBobbyRay;
|
||||||
UINT8 ubFiller[7];
|
UINT8 ubInventorySystem;
|
||||||
|
UINT8 ubFiller[6];
|
||||||
|
|
||||||
} GAME_OPTIONS;
|
} GAME_OPTIONS;
|
||||||
|
|
||||||
|
bool UsingNewInventorySystem();
|
||||||
|
|
||||||
// Snap: Options read from an INI file in the default of custom Data directory
|
// Snap: Options read from an INI file in the default of custom Data directory
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@@ -413,6 +422,9 @@ typedef struct
|
|||||||
BOOLEAN fEnableSoldierTooltipBigSlot2;
|
BOOLEAN fEnableSoldierTooltipBigSlot2;
|
||||||
BOOLEAN fEnableSoldierTooltipBigSlot3;
|
BOOLEAN fEnableSoldierTooltipBigSlot3;
|
||||||
BOOLEAN fEnableSoldierTooltipBigSlot4;
|
BOOLEAN fEnableSoldierTooltipBigSlot4;
|
||||||
|
BOOLEAN fEnableSoldierTooltipBigSlot5;
|
||||||
|
BOOLEAN fEnableSoldierTooltipBigSlot6;
|
||||||
|
BOOLEAN fEnableSoldierTooltipBigSlot7;
|
||||||
// ShadoWarrior: Tooltip changes (end)
|
// ShadoWarrior: Tooltip changes (end)
|
||||||
|
|
||||||
//Kaiden MERC Deaths Externalized:
|
//Kaiden MERC Deaths Externalized:
|
||||||
@@ -425,6 +437,14 @@ typedef struct
|
|||||||
// Lesh: slow enemy items choice progress
|
// Lesh: slow enemy items choice progress
|
||||||
BOOLEAN fSlowProgressForEnemyItemsChoice;
|
BOOLEAN fSlowProgressForEnemyItemsChoice;
|
||||||
|
|
||||||
|
// CHRISL: option to allow Slay to remain as a hired PC
|
||||||
|
BOOLEAN fEnableSlayForever;
|
||||||
|
|
||||||
|
// CHRISL: New setting to determine the AP cost to reload 1 loose round of ammo
|
||||||
|
INT32 ubAPCostPerRound;
|
||||||
|
|
||||||
|
// CHRISL: New setting to determine AP multiplier when reloading with wrong sized clip
|
||||||
|
FLOAT ubWrongMagMult;
|
||||||
} GAME_EXTERNAL_OPTIONS;
|
} GAME_EXTERNAL_OPTIONS;
|
||||||
|
|
||||||
//This structure will contain general Ja2 settings NOT individual game settings.
|
//This structure will contain general Ja2 settings NOT individual game settings.
|
||||||
|
|||||||
+11
-12
@@ -10,10 +10,15 @@
|
|||||||
// Keeps track of the game version
|
// Keeps track of the game version
|
||||||
//
|
//
|
||||||
|
|
||||||
#ifdef JA2BETAVERSION
|
#ifdef JA2EDITOR
|
||||||
|
|
||||||
|
//MAP EDITOR BUILD VERSION
|
||||||
|
CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.1855.NI.B11.1" };
|
||||||
|
|
||||||
|
#elif defined JA2BETAVERSION
|
||||||
|
|
||||||
//BETA/TEST BUILD VERSION
|
//BETA/TEST BUILD VERSION
|
||||||
CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.1202" };
|
CHAR16 zVersionLabel[256] = { L"Debug v1.13.1855.NI.B11.1" };
|
||||||
|
|
||||||
#elif defined CRIPPLED_VERSION
|
#elif defined CRIPPLED_VERSION
|
||||||
|
|
||||||
@@ -23,19 +28,13 @@ CHAR16 zVersionLabel[256] = { L"Beta v. 0.98" };
|
|||||||
#else
|
#else
|
||||||
|
|
||||||
//RELEASE BUILD VERSION
|
//RELEASE BUILD VERSION
|
||||||
CHAR16 zVersionLabel[256] = { L"Release v1.13.1797" };
|
CHAR16 zVersionLabel[256] = { L"Release v1.13.1855.NI.B11.1" };
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CHAR8 czVersionNumber[16] = { "Build 08.02.24" }; //YY.MM.DD
|
//CHAR8 czVersionNumber[16] = { "Build 08.02.24" }; //YY.MM.DD
|
||||||
|
CHAR8 czVersionNumber[16] = { "Beta 08.03.03" }; //YY.MM.DD
|
||||||
CHAR16 zTrackingNumber[16] = { L"Z" };
|
CHAR16 zTrackingNumber[16] = { L"Z" };
|
||||||
|
|
||||||
|
|
||||||
//
|
// SAVE_GAME_VERSION is defined in header, change it there
|
||||||
// Keeps track of the saved game version. Increment the saved game version whenever
|
|
||||||
// you will invalidate the saved game file
|
|
||||||
|
|
||||||
#define SAVE_GAME_VERSION 101 //100 // 99
|
|
||||||
|
|
||||||
const UINT32 guiSavedGameVersion = SAVE_GAME_VERSION;
|
|
||||||
|
|||||||
+9
-5
@@ -16,16 +16,20 @@ extern CHAR8 czVersionNumber[16];
|
|||||||
extern CHAR16 zTrackingNumber[16];
|
extern CHAR16 zTrackingNumber[16];
|
||||||
|
|
||||||
|
|
||||||
|
//ADB: I needed these here so I moved them, and why put them in *.cpp anyways?
|
||||||
//#define RUSSIANGOLD
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Keeps track of the saved game version. Increment the saved game version whenever
|
// Keeps track of the saved game version. Increment the saved game version whenever
|
||||||
// you will invalidate the saved game file
|
// you will invalidate the saved game file
|
||||||
//
|
#define SAVE_GAME_VERSION 103 //102 //101 //100 // 99
|
||||||
|
|
||||||
const extern UINT32 guiSavedGameVersion;
|
|
||||||
|
|
||||||
|
//these I don't so much need here
|
||||||
|
#define CURRENT_SAVEGAME_DATATYPE_VERSION 103
|
||||||
|
#define FIRST_SAVEGAME_DATATYPE_CHANGE 102
|
||||||
|
//#define SECOND_SAVEGAME_DATATYPE_CHANGE 999, #define CURRENT_SAVEGAME_DATATYPE_VERSION 999
|
||||||
|
|
||||||
|
|
||||||
|
//#define RUSSIANGOLD
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
<?xml version="1.0"?>
|
||||||
<VisualStudioPropertySheet
|
<VisualStudioPropertySheet
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="8.00"
|
Version="8.00"
|
||||||
|
|||||||
@@ -62,11 +62,18 @@
|
|||||||
#include "editscreen.h"
|
#include "editscreen.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "Sector Summary.h"
|
||||||
extern BOOLEAN GetCDromDriveLetter( STR8 pString );
|
extern BOOLEAN GetCDromDriveLetter( STR8 pString );
|
||||||
|
|
||||||
// The InitializeGame function is responsible for setting up all data and Gaming Engine
|
// The InitializeGame function is responsible for setting up all data and Gaming Engine
|
||||||
// tasks which will run the game
|
// tasks which will run the game
|
||||||
|
|
||||||
|
#ifdef JA2EDITOR
|
||||||
|
#define BUILD_AS_EDITOR_ONLY
|
||||||
|
#else
|
||||||
|
#undef BUILD_AS_EDITOR_ONLY
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef JA2BETAVERSION
|
#ifdef JA2BETAVERSION
|
||||||
extern BOOLEAN gfUseConsecutiveQuickSaveSlots;
|
extern BOOLEAN gfUseConsecutiveQuickSaveSlots;
|
||||||
#endif
|
#endif
|
||||||
@@ -88,6 +95,7 @@ extern BOOLEAN gfUseConsecutiveQuickSaveSlots;
|
|||||||
|
|
||||||
extern HINSTANCE ghInstance;
|
extern HINSTANCE ghInstance;
|
||||||
|
|
||||||
|
extern OBJECTTYPE GLOCK_17_ForUseWithLOS;
|
||||||
|
|
||||||
// Prepends the language prefix to the file name in a proposed path.
|
// Prepends the language prefix to the file name in a proposed path.
|
||||||
static void AddLanguagePrefix(STR fileName, const STR language)
|
static void AddLanguagePrefix(STR fileName, const STR language)
|
||||||
@@ -286,6 +294,50 @@ BOOLEAN LoadExternalGameplayData(STR directoryName)
|
|||||||
if(!ReadInArmourStats(fileName))
|
if(!ReadInArmourStats(fileName))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
// CHRISL:
|
||||||
|
strcpy(fileName, directoryName);
|
||||||
|
strcat(fileName, LOADBEARINGEQUIPMENTFILENAME);
|
||||||
|
if(!ReadInlbeStats(fileName))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
// CHRISL:
|
||||||
|
strcpy(fileName, directoryName);
|
||||||
|
strcat(fileName, LBEPOCKETFILENAME);
|
||||||
|
if(!ReadInLBEPocketStats(fileName,FALSE))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
//CHRISL: Simple localization
|
||||||
|
// Same setup as what Madd used for items.xml
|
||||||
|
|
||||||
|
#ifdef GERMAN
|
||||||
|
strcpy(fileName, directoryName);
|
||||||
|
strcat(fileName, GERMAN_PREFIX);
|
||||||
|
strcat(fileName, LBEPOCKETFILENAME);
|
||||||
|
if ( FileExists(fileName) )
|
||||||
|
{
|
||||||
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
|
if(!ReadInLBEPocketStats(fileName,TRUE))
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef RUSSIAN
|
||||||
|
strcpy(fileName, directoryName);
|
||||||
|
strcat(fileName, RUSSIAN_PREFIX);
|
||||||
|
strcat(fileName, LBEPOCKETFILENAME);
|
||||||
|
if ( FileExists(fileName) )
|
||||||
|
{
|
||||||
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
|
if(!ReadInLBEPocketStats(fileName,TRUE))
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// CHRISL:
|
||||||
|
strcpy(fileName, directoryName);
|
||||||
|
strcat(fileName, MERCSTARTINGGEARFILENAME);
|
||||||
|
if(!ReadInMercStartingGearStats(fileName))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
strcpy(fileName, directoryName);
|
strcpy(fileName, directoryName);
|
||||||
strcat(fileName, WEAPONSFILENAME);
|
strcat(fileName, WEAPONSFILENAME);
|
||||||
if(!ReadInWeaponStats(fileName))
|
if(!ReadInWeaponStats(fileName))
|
||||||
@@ -548,6 +600,11 @@ UINT32 InitializeJA2(void)
|
|||||||
return( ERROR_SCREEN );
|
return( ERROR_SCREEN );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//ADB When a merc calcs CTGT for a thrown item he uses a GLOCK temp item
|
||||||
|
//but we don't want to recreate it every single time CTGT is called, so init the GLOCK here
|
||||||
|
CreateItem(GLOCK_17, 100, &GLOCK_17_ForUseWithLOS);
|
||||||
|
|
||||||
|
|
||||||
#ifdef JA2BETAVERSION
|
#ifdef JA2BETAVERSION
|
||||||
#ifdef JA2EDITOR
|
#ifdef JA2EDITOR
|
||||||
|
|
||||||
@@ -595,7 +652,7 @@ UINT32 InitializeJA2(void)
|
|||||||
//also set the sector
|
//also set the sector
|
||||||
gWorldSectorX = 0;
|
gWorldSectorX = 0;
|
||||||
gWorldSectorY = 0;
|
gWorldSectorY = 0;
|
||||||
gfAutoLoadA9 = TRUE;
|
gfAutoLoadA9 = FALSE;
|
||||||
gfIntendOnEnteringEditor = TRUE;
|
gfIntendOnEnteringEditor = TRUE;
|
||||||
gGameOptions.fGunNut = TRUE;
|
gGameOptions.fGunNut = TRUE;
|
||||||
gGameOptions.fAirStrikes = FALSE;
|
gGameOptions.fAirStrikes = FALSE;
|
||||||
@@ -615,6 +672,23 @@ UINT32 InitializeJA2(void)
|
|||||||
gGameOptions.fAirStrikes = FALSE;
|
gGameOptions.fAirStrikes = FALSE;
|
||||||
return( GAME_SCREEN );
|
return( GAME_SCREEN );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef BUILD_AS_EDITOR_ONLY
|
||||||
|
//ADB We are building with JA2EDITOR, why force a commandline arguement???
|
||||||
|
//build once, rename, change the define and build again
|
||||||
|
//no pesky shortcuts
|
||||||
|
OutputDebugString( "Beginning JA2EDITOR without using a commandline argument...\n" );
|
||||||
|
//For editor purposes, need to know the default map file.
|
||||||
|
sprintf( gubFilename, "none");
|
||||||
|
//also set the sector
|
||||||
|
gWorldSectorX = 0;
|
||||||
|
gWorldSectorY = 0;
|
||||||
|
gfAutoLoadA9 = TRUE;
|
||||||
|
gfIntendOnEnteringEditor = TRUE;
|
||||||
|
gGameOptions.fGunNut = TRUE;
|
||||||
|
gGameOptions.fAirStrikes = FALSE;
|
||||||
|
return( GAME_SCREEN );
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
+2
-5
@@ -43,7 +43,7 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="libexpatMT.lib mss32.lib winmm.lib smackw32.lib fmodvc.lib lua51.lib"
|
AdditionalDependencies="libexpatMT.lib mss32.lib winmm.lib smackw32.lib fmodvc.lib lua51.lib"
|
||||||
OutputFile="D:\Games\Jagged Alliance 2\ja2_debug_vs2003.exe"
|
OutputFile="C:\Games\Jagged Alliance 2\ja2_debug_1020_en.exe"
|
||||||
LinkIncremental="2"
|
LinkIncremental="2"
|
||||||
SuppressStartupBanner="TRUE"
|
SuppressStartupBanner="TRUE"
|
||||||
IgnoreDefaultLibraryNames="libcmt;LIBCD"
|
IgnoreDefaultLibraryNames="libcmt;LIBCD"
|
||||||
@@ -545,7 +545,7 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="libexpatMT.lib winmm.lib smackw32.lib mss32.lib fmodvc.lib lua51.lib"
|
AdditionalDependencies="libexpatMT.lib winmm.lib smackw32.lib mss32.lib fmodvc.lib lua51.lib"
|
||||||
OutputFile="D:\games\Jagged Alliance 2 v1.13\JA2 v1.13.1796_EN.exe"
|
OutputFile="C:\games\Jagged Alliance 2\JA2_vs2003_release.exe"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
SuppressStartupBanner="TRUE"
|
SuppressStartupBanner="TRUE"
|
||||||
IgnoreDefaultLibraryNames=""
|
IgnoreDefaultLibraryNames=""
|
||||||
@@ -2246,9 +2246,6 @@
|
|||||||
<File
|
<File
|
||||||
RelativePath="builddefines.h">
|
RelativePath="builddefines.h">
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath=".\Cheats.h">
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="Credits.h">
|
RelativePath="Credits.h">
|
||||||
</File>
|
</File>
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
#include "Language Defines.h"
|
||||||
|
|
||||||
|
#if defined(ENGLISH)
|
||||||
|
# pragma message(" (Language set to ENGLISH, You'll need english CDs)")
|
||||||
|
#elif defined(GERMAN)
|
||||||
|
# pragma message(" (Language set to GERMAN, You'll need Topware/german CDs)")
|
||||||
|
#elif defined(RUSSIAN)
|
||||||
|
# pragma message(" (Language set to RUSSIAN, You'll need russian CDs)")
|
||||||
|
#elif defined(DUTCH)
|
||||||
|
# pragma message(" (Language set to DUTCH, You'll need dutch CDs)")
|
||||||
|
#elif defined(POLISH)
|
||||||
|
# pragma message(" (Language set to POLISH, You'll need polish CDs)")
|
||||||
|
#elif defined(FRENCH)
|
||||||
|
# pragma message(" (Language set to FRENCH, You'll need french CDs)")
|
||||||
|
#elif defined(ITALIAN)
|
||||||
|
# pragma message(" (Language set to ITALIAN, You'll need italian CDs)")
|
||||||
|
#elif defined(TAIWANESE)
|
||||||
|
# pragma message(" (Language set to TAIWANESE, You'll need taiwanese CDs)")
|
||||||
|
#else
|
||||||
|
# error "At least You have to specify a Language somewhere. See comments above."
|
||||||
|
#endif
|
||||||
+6
-15
@@ -18,13 +18,17 @@
|
|||||||
* (2006-10-10, Sergeant_Kolja)
|
* (2006-10-10, Sergeant_Kolja)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if !defined(ENGLISH) && !defined(GERMAN) && !defined(RUSSIAN) && !defined(DUTCH) && !defined(POLISH)
|
#if !defined(ENGLISH) && !defined(GERMAN) && !defined(RUSSIAN) && !defined(DUTCH) && !defined(POLISH) && !defined(FRENCH) && !defined(ITALIAN) && !defined(TAIWANESE)
|
||||||
/* please set one manually here (by uncommenting) if not willingly to set Workspace wide */
|
/* please set one manually here (by uncommenting) if not willingly to set Workspace wide */
|
||||||
#define ENGLISH
|
#define ENGLISH
|
||||||
//#define GERMAN
|
//#define GERMAN
|
||||||
//#define RUSSIAN
|
//#define RUSSIAN
|
||||||
//#define DUTCH
|
//#define DUTCH
|
||||||
//#define POLISH
|
//#define POLISH
|
||||||
|
//#define FRENCH
|
||||||
|
//#define ITALIAN
|
||||||
|
//#define TAIWANESE
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -33,26 +37,13 @@
|
|||||||
* Regardless of if we did it Workspace wide or by uncommenting above,
|
* Regardless of if we did it Workspace wide or by uncommenting above,
|
||||||
* HERE we must see, what language was selected. If one, we
|
* HERE we must see, what language was selected. If one, we
|
||||||
*/
|
*/
|
||||||
#if defined(ENGLISH)
|
#if !defined(ENGLISH) && !defined(GERMAN) && !defined(RUSSIAN) && !defined(DUTCH) && !defined(POLISH) && !defined(FRENCH) && !defined(ITALIAN) && !defined(TAIWANESE)
|
||||||
# pragma message(" (Language set to ENGLISH, You'll need english CDs)")
|
|
||||||
#elif defined(GERMAN)
|
|
||||||
# pragma message(" (Language set to GERMAN, You'll need Topware/german CDs)")
|
|
||||||
#elif defined(RUSSIAN)
|
|
||||||
# pragma message(" (Language set to RUSSIAN, You'll need russian CDs)")
|
|
||||||
#elif defined(DUTCH)
|
|
||||||
# pragma message(" (Language set to DUTCH, You'll need dutch CDs)")
|
|
||||||
#elif defined(POLISH)
|
|
||||||
# pragma message(" (Language set to POLISH, You'll need polish CDs)")
|
|
||||||
#else
|
|
||||||
# error "At least You have to specify a Language somewhere. See comments above."
|
# error "At least You have to specify a Language somewhere. See comments above."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define BLOOD_N_GORE_ENABLED
|
|
||||||
|
|
||||||
//if the language represents words as single chars
|
//if the language represents words as single chars
|
||||||
#ifdef TAIWAN
|
#ifdef TAIWAN
|
||||||
#define SINGLE_CHAR_WORDS
|
#define SINGLE_CHAR_WORDS
|
||||||
|
|||||||
@@ -484,8 +484,6 @@ void DisplayAlumniOldMercPopUp()
|
|||||||
HVOBJECT hDoneHandle;
|
HVOBJECT hDoneHandle;
|
||||||
HVOBJECT hFacePaneHandle;
|
HVOBJECT hFacePaneHandle;
|
||||||
HVOBJECT hFaceHandle;
|
HVOBJECT hFaceHandle;
|
||||||
// WRAPPED_STRING *pFirstWrappedString, *pTempWrappedString;
|
|
||||||
UINT16 usHeight = GetFontHeight(AIM_ALUMNI_POPUP_FONT);
|
|
||||||
CHAR16 sName[AIM_ALUMNI_NAME_SIZE];
|
CHAR16 sName[AIM_ALUMNI_NAME_SIZE];
|
||||||
CHAR16 sDesc[AIM_ALUMNI_DECRIPTION_SIZE];
|
CHAR16 sDesc[AIM_ALUMNI_DECRIPTION_SIZE];
|
||||||
UINT32 uiStartLoc;
|
UINT32 uiStartLoc;
|
||||||
@@ -701,3 +699,4 @@ void ChangingAimArchiveSubPage( UINT8 ubSubPageNumber )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -338,3 +338,4 @@ BOOLEAN DrawMercsFaceToScreen(UINT8 ubMercID, UINT16 usPosX, UINT16 usPosY, UINT
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -624,3 +624,4 @@ void ChangingAimHistorySubPage( UINT8 ubSubPageNumber )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -179,3 +179,4 @@ void SelectLinkRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1225,7 +1225,7 @@ BOOLEAN DisplayMercsInventory(UINT8 ubMercID)
|
|||||||
|
|
||||||
PosY = WEAPONBOX_Y;
|
PosY = WEAPONBOX_Y;
|
||||||
PosX = WEAPONBOX_X+3; // + 3 ( 1 to take care of the shadow, +2 to get past the weapon box border )
|
PosX = WEAPONBOX_X+3; // + 3 ( 1 to take care of the shadow, +2 to get past the weapon box border )
|
||||||
for(i=0; i<NUM_INV_SLOTS; i++)
|
for(i=0; i<gMercProfiles[ubMercID].inv.size(); i++)
|
||||||
{
|
{
|
||||||
usItem = gMercProfiles[ubMercID].inv[ i ];
|
usItem = gMercProfiles[ubMercID].inv[ i ];
|
||||||
|
|
||||||
@@ -1887,7 +1887,7 @@ BOOLEAN DisplayVideoConferencingDisplay()
|
|||||||
BOOLEAN DisplayMercsVideoFace()
|
BOOLEAN DisplayMercsVideoFace()
|
||||||
{
|
{
|
||||||
HVOBJECT hTerminalHandle;
|
HVOBJECT hTerminalHandle;
|
||||||
STR sFaceLoc = "FACES\\";
|
//STR sFaceLoc = "FACES\\";
|
||||||
|
|
||||||
// Get and Blt Terminal Frame
|
// Get and Blt Terminal Frame
|
||||||
GetVideoObject(&hTerminalHandle, guiVideoConfTerminal);
|
GetVideoObject(&hTerminalHandle, guiVideoConfTerminal);
|
||||||
@@ -4445,3 +4445,4 @@ void DisplayAimMemberClickOnFaceHelpText()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -495,8 +495,6 @@ BOOLEAN InitAimPolicyTocMenu(void)
|
|||||||
{
|
{
|
||||||
UINT16 i, usPosY;
|
UINT16 i, usPosY;
|
||||||
UINT16 usHeight;
|
UINT16 usHeight;
|
||||||
UINT32 uiStartLoc=0;
|
|
||||||
|
|
||||||
if(gfInPolicyToc)
|
if(gfInPolicyToc)
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
|
|
||||||
@@ -889,3 +887,4 @@ void ChangingAimPoliciesSubPage( UINT8 ubSubPageNumber )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -749,3 +749,4 @@ INT32 CompareValue(const INT32 Num1, const INT32 Num2)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -918,3 +918,4 @@ void CancelAllPendingBRPurchaseOrders(void)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+6
-1
@@ -1,9 +1,14 @@
|
|||||||
#ifndef __BOBBYR_H
|
#ifndef __BOBBYR_H
|
||||||
#define __BOBBYR_H
|
#define __BOBBYR_H
|
||||||
|
|
||||||
#include "Item Types.h"
|
//#include "Item Types.h"
|
||||||
#include "Store Inventory.h"
|
#include "Store Inventory.h"
|
||||||
|
|
||||||
|
//forward declarations of common classes to eliminate includes
|
||||||
|
class OBJECTTYPE;
|
||||||
|
class SOLDIERTYPE;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void GameInitBobbyR();
|
void GameInitBobbyR();
|
||||||
BOOLEAN EnterBobbyR();
|
BOOLEAN EnterBobbyR();
|
||||||
|
|||||||
@@ -107,3 +107,4 @@ void RenderBobbyRAmmo()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -110,3 +110,4 @@ void RenderBobbyRArmour()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+122
-34
@@ -147,8 +147,8 @@ BobbyRayPurchaseStruct BobbyRayPurchases[ MAX_PURCHASE_AMOUNT ];
|
|||||||
#define NUMBER_GUNS_FILTER_BUTTONS 9
|
#define NUMBER_GUNS_FILTER_BUTTONS 9
|
||||||
#define NUMBER_AMMO_FILTER_BUTTONS 8
|
#define NUMBER_AMMO_FILTER_BUTTONS 8
|
||||||
#define NUMBER_ARMOUR_FILTER_BUTTONS 4
|
#define NUMBER_ARMOUR_FILTER_BUTTONS 4
|
||||||
#define NUMBER_MISC_FILTER_BUTTONS 9
|
#define NUMBER_MISC_FILTER_BUTTONS 10
|
||||||
#define NUMBER_USED_FILTER_BUTTONS 3
|
#define NUMBER_USED_FILTER_BUTTONS 4
|
||||||
|
|
||||||
#define BOBBYR_GUNS_FILTER_BUTTON_GAP BOBBYR_CATALOGUE_BUTTON_GAP - 1
|
#define BOBBYR_GUNS_FILTER_BUTTON_GAP BOBBYR_CATALOGUE_BUTTON_GAP - 1
|
||||||
#define BOBBYR_AMMO_FILTER_BUTTON_GAP BOBBYR_CATALOGUE_BUTTON_GAP - 1
|
#define BOBBYR_AMMO_FILTER_BUTTON_GAP BOBBYR_CATALOGUE_BUTTON_GAP - 1
|
||||||
@@ -196,6 +196,7 @@ INT8 ubFilterAmmoButtonValues[] = {
|
|||||||
INT8 ubFilterUsedButtonValues[] = {
|
INT8 ubFilterUsedButtonValues[] = {
|
||||||
BOBBYR_FILTER_USED_GUNS,
|
BOBBYR_FILTER_USED_GUNS,
|
||||||
BOBBYR_FILTER_USED_ARMOR,
|
BOBBYR_FILTER_USED_ARMOR,
|
||||||
|
BOBBYR_FILTER_USED_LBEGEAR,
|
||||||
BOBBYR_FILTER_USED_MISC};
|
BOBBYR_FILTER_USED_MISC};
|
||||||
|
|
||||||
INT8 ubFilterArmourButtonValues[] = {
|
INT8 ubFilterArmourButtonValues[] = {
|
||||||
@@ -213,6 +214,7 @@ INT8 ubFilterMiscButtonValues[] = {
|
|||||||
BOBBYR_FILTER_MISC_MEDKIT,
|
BOBBYR_FILTER_MISC_MEDKIT,
|
||||||
BOBBYR_FILTER_MISC_KIT,
|
BOBBYR_FILTER_MISC_KIT,
|
||||||
BOBBYR_FILTER_MISC_FACE,
|
BOBBYR_FILTER_MISC_FACE,
|
||||||
|
BOBBYR_FILTER_MISC_LBEGEAR,
|
||||||
BOBBYR_FILTER_MISC_MISC};
|
BOBBYR_FILTER_MISC_MISC};
|
||||||
|
|
||||||
|
|
||||||
@@ -295,6 +297,8 @@ UINT16 DisplayDamage(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight);
|
|||||||
UINT16 DisplayRange(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight);
|
UINT16 DisplayRange(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight);
|
||||||
UINT16 DisplayMagazine(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight);
|
UINT16 DisplayMagazine(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight);
|
||||||
void DisplayItemNameAndInfo(UINT16 usPosY, UINT16 usIndex, UINT16 usBobbyIndex, BOOLEAN fUsed);
|
void DisplayItemNameAndInfo(UINT16 usPosY, UINT16 usIndex, UINT16 usBobbyIndex, BOOLEAN fUsed);
|
||||||
|
// CHRISL: New display function for LBE Gear
|
||||||
|
UINT16 DisplayLBEInfo(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight);
|
||||||
UINT16 DisplayWeight(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight);
|
UINT16 DisplayWeight(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight);
|
||||||
UINT16 DisplayCaliber(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight);
|
UINT16 DisplayCaliber(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight);
|
||||||
void CreateMouseRegionForBigImage(UINT16 usPosY, UINT8 ubCount, INT16 *pItemNumbers );
|
void CreateMouseRegionForBigImage(UINT16 usPosY, UINT8 ubCount, INT16 *pItemNumbers );
|
||||||
@@ -618,10 +622,7 @@ BOOLEAN InitBobbyRUsedFilterBar()
|
|||||||
{
|
{
|
||||||
UINT8 i;
|
UINT8 i;
|
||||||
UINT16 usPosX;
|
UINT16 usPosX;
|
||||||
UINT8 bCurMode;
|
|
||||||
|
|
||||||
|
|
||||||
bCurMode = 0;
|
|
||||||
usPosX = FILTER_BUTTONS_USED_START_X;
|
usPosX = FILTER_BUTTONS_USED_START_X;
|
||||||
|
|
||||||
guiBobbyRFilterImage = LoadButtonImage("LAPTOP\\CatalogueButton1.sti", -1,0,-1,1,-1 );
|
guiBobbyRFilterImage = LoadButtonImage("LAPTOP\\CatalogueButton1.sti", -1,0,-1,1,-1 );
|
||||||
@@ -629,6 +630,12 @@ BOOLEAN InitBobbyRUsedFilterBar()
|
|||||||
// Loop through the filter buttons
|
// Loop through the filter buttons
|
||||||
for(i=0; i<NUMBER_USED_FILTER_BUTTONS; i++)
|
for(i=0; i<NUMBER_USED_FILTER_BUTTONS; i++)
|
||||||
{
|
{
|
||||||
|
//CHRISL: Don't display the LBEGEAR button if we're using the old inventory system
|
||||||
|
if((UsingNewInventorySystem() == false) && ubFilterUsedButtonValues[i] == BOBBYR_FILTER_USED_LBEGEAR)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Filter buttons
|
// Filter buttons
|
||||||
guiBobbyRFilterUsed[i] = CreateIconAndTextButton( guiBobbyRFilterImage, BobbyRFilter[BOBBYR_FILTER_USED_GUNS+i], BOBBYR_GUNS_BUTTON_FONT,
|
guiBobbyRFilterUsed[i] = CreateIconAndTextButton( guiBobbyRFilterImage, BobbyRFilter[BOBBYR_FILTER_USED_GUNS+i], BOBBYR_GUNS_BUTTON_FONT,
|
||||||
BOBBYR_GUNS_TEXT_COLOR_ON, BOBBYR_GUNS_SHADOW_COLOR,
|
BOBBYR_GUNS_TEXT_COLOR_ON, BOBBYR_GUNS_SHADOW_COLOR,
|
||||||
@@ -639,10 +646,9 @@ BOOLEAN InitBobbyRUsedFilterBar()
|
|||||||
|
|
||||||
SetButtonCursor(guiBobbyRFilterUsed[i], CURSOR_LAPTOP_SCREEN);
|
SetButtonCursor(guiBobbyRFilterUsed[i], CURSOR_LAPTOP_SCREEN);
|
||||||
|
|
||||||
MSYS_SetBtnUserData( guiBobbyRFilterUsed[i], 0, ubFilterUsedButtonValues[bCurMode]);
|
MSYS_SetBtnUserData( guiBobbyRFilterUsed[i], 0, ubFilterUsedButtonValues[i]);
|
||||||
|
|
||||||
usPosX += BOBBYR_USED_FILTER_BUTTON_GAP;
|
usPosX += BOBBYR_USED_FILTER_BUTTON_GAP;
|
||||||
bCurMode++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -652,9 +658,10 @@ BOOLEAN InitBobbyRUsedFilterBar()
|
|||||||
BOOLEAN InitBobbyRMiscFilterBar()
|
BOOLEAN InitBobbyRMiscFilterBar()
|
||||||
{
|
{
|
||||||
UINT8 i;
|
UINT8 i;
|
||||||
UINT16 usPosX;
|
UINT16 usPosX = 0, usPosY = 0;
|
||||||
UINT8 bCurMode;
|
UINT8 bCurMode;
|
||||||
UINT16 usYOffset = 0;
|
UINT16 usYOffset = 25, sItemWidth = 8;
|
||||||
|
UINT16 usXOffset = BOBBYR_MISC_FILTER_BUTTON_GAP;
|
||||||
|
|
||||||
bCurMode = 0;
|
bCurMode = 0;
|
||||||
usPosX = FILTER_BUTTONS_MISC_START_X;
|
usPosX = FILTER_BUTTONS_MISC_START_X;
|
||||||
@@ -664,26 +671,26 @@ BOOLEAN InitBobbyRMiscFilterBar()
|
|||||||
// Loop through the filter buttons
|
// Loop through the filter buttons
|
||||||
for(i=0; i<NUMBER_MISC_FILTER_BUTTONS; i++)
|
for(i=0; i<NUMBER_MISC_FILTER_BUTTONS; i++)
|
||||||
{
|
{
|
||||||
// Next row
|
//CHRISL: Don't display the LBEGEAR button if we're using the old inventory system
|
||||||
if (i > 7)
|
if((UsingNewInventorySystem() == false) && ubFilterMiscButtonValues[i] == BOBBYR_FILTER_MISC_LBEGEAR)
|
||||||
{
|
{
|
||||||
usPosX = FILTER_BUTTONS_MISC_START_X;
|
continue;
|
||||||
usYOffset = 25;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
usPosX = FILTER_BUTTONS_MISC_START_X + ( (bCurMode % sItemWidth) * usXOffset);
|
||||||
|
usPosY = FILTER_BUTTONS_Y + ( (bCurMode / sItemWidth) * usYOffset);
|
||||||
|
|
||||||
// Filter buttons
|
// Filter buttons
|
||||||
guiBobbyRFilterMisc[i] = CreateIconAndTextButton( guiBobbyRFilterImage, BobbyRFilter[BOBBYR_FILTER_MISC_BLADE+i], BOBBYR_GUNS_BUTTON_FONT,
|
guiBobbyRFilterMisc[i] = CreateIconAndTextButton( guiBobbyRFilterImage, BobbyRFilter[BOBBYR_FILTER_MISC_BLADE+i], BOBBYR_GUNS_BUTTON_FONT,
|
||||||
BOBBYR_GUNS_TEXT_COLOR_ON, BOBBYR_GUNS_SHADOW_COLOR,
|
BOBBYR_GUNS_TEXT_COLOR_ON, BOBBYR_GUNS_SHADOW_COLOR,
|
||||||
BOBBYR_GUNS_TEXT_COLOR_OFF, BOBBYR_GUNS_SHADOW_COLOR,
|
BOBBYR_GUNS_TEXT_COLOR_OFF, BOBBYR_GUNS_SHADOW_COLOR,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
usPosX, FILTER_BUTTONS_Y + usYOffset, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
usPosX, usPosY, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
DEFAULT_MOVE_CALLBACK, BtnBobbyRFilterMiscCallback);
|
DEFAULT_MOVE_CALLBACK, BtnBobbyRFilterMiscCallback);
|
||||||
|
|
||||||
SetButtonCursor(guiBobbyRFilterMisc[i], CURSOR_LAPTOP_SCREEN);
|
SetButtonCursor(guiBobbyRFilterMisc[i], CURSOR_LAPTOP_SCREEN);
|
||||||
|
|
||||||
MSYS_SetBtnUserData( guiBobbyRFilterMisc[i], 0, ubFilterMiscButtonValues[bCurMode]);
|
MSYS_SetBtnUserData( guiBobbyRFilterMisc[i], 0, ubFilterMiscButtonValues[i]);
|
||||||
|
|
||||||
usPosX += BOBBYR_MISC_FILTER_BUTTON_GAP;
|
|
||||||
bCurMode++;
|
bCurMode++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -691,7 +698,6 @@ BOOLEAN InitBobbyRMiscFilterBar()
|
|||||||
return(TRUE);
|
return(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BOOLEAN InitBobbyMenuBar( )
|
BOOLEAN InitBobbyMenuBar( )
|
||||||
{
|
{
|
||||||
UINT8 i;
|
UINT8 i;
|
||||||
@@ -780,6 +786,7 @@ BOOLEAN DeleteBobbyRGunsFilter()
|
|||||||
|
|
||||||
for (i=0; i<NUMBER_GUNS_FILTER_BUTTONS; i++)
|
for (i=0; i<NUMBER_GUNS_FILTER_BUTTONS; i++)
|
||||||
{
|
{
|
||||||
|
if(guiBobbyRFilterGuns[i])
|
||||||
RemoveButton (guiBobbyRFilterGuns[i]);
|
RemoveButton (guiBobbyRFilterGuns[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -794,6 +801,7 @@ BOOLEAN DeleteBobbyRAmmoFilter()
|
|||||||
|
|
||||||
for (i=0; i<NUMBER_AMMO_FILTER_BUTTONS; i++)
|
for (i=0; i<NUMBER_AMMO_FILTER_BUTTONS; i++)
|
||||||
{
|
{
|
||||||
|
if(guiBobbyRFilterAmmo[i])
|
||||||
RemoveButton (guiBobbyRFilterAmmo[i]);
|
RemoveButton (guiBobbyRFilterAmmo[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -808,6 +816,7 @@ BOOLEAN DeleteBobbyRUsedFilter()
|
|||||||
|
|
||||||
for (i=0; i<NUMBER_USED_FILTER_BUTTONS; i++)
|
for (i=0; i<NUMBER_USED_FILTER_BUTTONS; i++)
|
||||||
{
|
{
|
||||||
|
if(guiBobbyRFilterUsed[i])
|
||||||
RemoveButton (guiBobbyRFilterUsed[i]);
|
RemoveButton (guiBobbyRFilterUsed[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -822,6 +831,7 @@ BOOLEAN DeleteBobbyRArmourFilter()
|
|||||||
|
|
||||||
for (i=0; i<NUMBER_ARMOUR_FILTER_BUTTONS; i++)
|
for (i=0; i<NUMBER_ARMOUR_FILTER_BUTTONS; i++)
|
||||||
{
|
{
|
||||||
|
if(guiBobbyRFilterArmor[i])
|
||||||
RemoveButton (guiBobbyRFilterArmor[i]);
|
RemoveButton (guiBobbyRFilterArmor[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -836,6 +846,7 @@ BOOLEAN DeleteBobbyRMiscFilter()
|
|||||||
|
|
||||||
for (i=0; i<NUMBER_MISC_FILTER_BUTTONS; i++)
|
for (i=0; i<NUMBER_MISC_FILTER_BUTTONS; i++)
|
||||||
{
|
{
|
||||||
|
if(guiBobbyRFilterMisc[i])
|
||||||
RemoveButton (guiBobbyRFilterMisc[i]);
|
RemoveButton (guiBobbyRFilterMisc[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -860,6 +871,7 @@ BOOLEAN DeleteBobbyMenuBar()
|
|||||||
|
|
||||||
for(i=0; i<NUM_CATALOGUE_BUTTONS; i++)
|
for(i=0; i<NUM_CATALOGUE_BUTTONS; i++)
|
||||||
{
|
{
|
||||||
|
if(guiBobbyRPageMenu[i])
|
||||||
RemoveButton( guiBobbyRPageMenu[i] );
|
RemoveButton( guiBobbyRPageMenu[i] );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1106,6 +1118,9 @@ void BtnBobbyRFilterUsedCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
case BOBBYR_FILTER_USED_ARMOR:
|
case BOBBYR_FILTER_USED_ARMOR:
|
||||||
guiCurrentUsedFilterMode = IC_ARMOUR;
|
guiCurrentUsedFilterMode = IC_ARMOUR;
|
||||||
break;
|
break;
|
||||||
|
case BOBBYR_FILTER_USED_LBEGEAR:
|
||||||
|
guiCurrentUsedFilterMode = IC_LBEGEAR;
|
||||||
|
break;
|
||||||
case BOBBYR_FILTER_USED_MISC:
|
case BOBBYR_FILTER_USED_MISC:
|
||||||
guiCurrentUsedFilterMode = IC_BOBBY_MISC;
|
guiCurrentUsedFilterMode = IC_BOBBY_MISC;
|
||||||
break;
|
break;
|
||||||
@@ -1223,6 +1238,9 @@ void BtnBobbyRFilterMiscCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
case BOBBYR_FILTER_MISC_FACE:
|
case BOBBYR_FILTER_MISC_FACE:
|
||||||
guiCurrentMiscFilterMode = IC_FACE;
|
guiCurrentMiscFilterMode = IC_FACE;
|
||||||
break;
|
break;
|
||||||
|
case BOBBYR_FILTER_MISC_LBEGEAR:
|
||||||
|
guiCurrentMiscFilterMode = IC_LBEGEAR;
|
||||||
|
break;
|
||||||
case BOBBYR_FILTER_MISC_MISC:
|
case BOBBYR_FILTER_MISC_MISC:
|
||||||
guiCurrentMiscFilterMode = IC_MISC;
|
guiCurrentMiscFilterMode = IC_MISC;
|
||||||
break;
|
break;
|
||||||
@@ -1292,7 +1310,6 @@ BOOLEAN DisplayItemInfo(UINT32 uiItemClass, INT32 iFilter)
|
|||||||
UINT16 i;
|
UINT16 i;
|
||||||
UINT8 ubCount=0;
|
UINT8 ubCount=0;
|
||||||
UINT16 PosY, usTextPosY;
|
UINT16 PosY, usTextPosY;
|
||||||
UINT16 ubFirstIndex=0;
|
|
||||||
UINT16 usItemIndex;
|
UINT16 usItemIndex;
|
||||||
CHAR16 sDollarTemp[60];
|
CHAR16 sDollarTemp[60];
|
||||||
CHAR16 sTemp[60];
|
CHAR16 sTemp[60];
|
||||||
@@ -1551,6 +1568,7 @@ BOOLEAN DisplayItemInfo(UINT32 uiItemClass, INT32 iFilter)
|
|||||||
case IC_MEDKIT:
|
case IC_MEDKIT:
|
||||||
case IC_KIT:
|
case IC_KIT:
|
||||||
case IC_FACE:
|
case IC_FACE:
|
||||||
|
case IC_LBEGEAR:
|
||||||
// USED
|
// USED
|
||||||
if (uiItemClass == BOBBYR_USED_ITEMS)
|
if (uiItemClass == BOBBYR_USED_ITEMS)
|
||||||
{
|
{
|
||||||
@@ -1561,6 +1579,7 @@ BOOLEAN DisplayItemInfo(UINT32 uiItemClass, INT32 iFilter)
|
|||||||
Item[usItemIndex].usItemClass == IC_MISC ||
|
Item[usItemIndex].usItemClass == IC_MISC ||
|
||||||
Item[usItemIndex].usItemClass == IC_MEDKIT ||
|
Item[usItemIndex].usItemClass == IC_MEDKIT ||
|
||||||
Item[usItemIndex].usItemClass == IC_KIT ||
|
Item[usItemIndex].usItemClass == IC_KIT ||
|
||||||
|
Item[usItemIndex].usItemClass == IC_LBEGEAR ||
|
||||||
Item[usItemIndex].usItemClass == IC_FACE)
|
Item[usItemIndex].usItemClass == IC_FACE)
|
||||||
{
|
{
|
||||||
bAddItem = TRUE;
|
bAddItem = TRUE;
|
||||||
@@ -1625,7 +1644,6 @@ BOOLEAN DisplayItemInfo(UINT32 uiItemClass, INT32 iFilter)
|
|||||||
BOOLEAN DisplayGunInfo(UINT16 usIndex, UINT16 usTextPosY, BOOLEAN fUsed, UINT16 usBobbyIndex)
|
BOOLEAN DisplayGunInfo(UINT16 usIndex, UINT16 usTextPosY, BOOLEAN fUsed, UINT16 usBobbyIndex)
|
||||||
{
|
{
|
||||||
UINT16 usHeight;
|
UINT16 usHeight;
|
||||||
UINT32 uiStartLoc=0;
|
|
||||||
UINT16 usFontHeight;
|
UINT16 usFontHeight;
|
||||||
usFontHeight = GetFontHeight(BOBBYR_ITEM_DESC_TEXT_FONT);
|
usFontHeight = GetFontHeight(BOBBYR_ITEM_DESC_TEXT_FONT);
|
||||||
|
|
||||||
@@ -1662,7 +1680,6 @@ BOOLEAN DisplayGunInfo(UINT16 usIndex, UINT16 usTextPosY, BOOLEAN fUsed, UINT16
|
|||||||
BOOLEAN DisplayNonGunWeaponInfo(UINT16 usIndex, UINT16 usTextPosY, BOOLEAN fUsed, UINT16 usBobbyIndex)
|
BOOLEAN DisplayNonGunWeaponInfo(UINT16 usIndex, UINT16 usTextPosY, BOOLEAN fUsed, UINT16 usBobbyIndex)
|
||||||
{
|
{
|
||||||
UINT16 usHeight;
|
UINT16 usHeight;
|
||||||
UINT32 uiStartLoc=0;
|
|
||||||
UINT16 usFontHeight;
|
UINT16 usFontHeight;
|
||||||
usFontHeight = GetFontHeight(BOBBYR_ITEM_DESC_TEXT_FONT);
|
usFontHeight = GetFontHeight(BOBBYR_ITEM_DESC_TEXT_FONT);
|
||||||
|
|
||||||
@@ -1689,7 +1706,6 @@ BOOLEAN DisplayNonGunWeaponInfo(UINT16 usIndex, UINT16 usTextPosY, BOOLEAN fUsed
|
|||||||
BOOLEAN DisplayAmmoInfo(UINT16 usIndex, UINT16 usTextPosY, BOOLEAN fUsed, UINT16 usBobbyIndex)
|
BOOLEAN DisplayAmmoInfo(UINT16 usIndex, UINT16 usTextPosY, BOOLEAN fUsed, UINT16 usBobbyIndex)
|
||||||
{
|
{
|
||||||
UINT16 usHeight;
|
UINT16 usHeight;
|
||||||
UINT32 uiStartLoc=0;
|
|
||||||
UINT16 usFontHeight;
|
UINT16 usFontHeight;
|
||||||
usFontHeight = GetFontHeight(BOBBYR_ITEM_DESC_TEXT_FONT);
|
usFontHeight = GetFontHeight(BOBBYR_ITEM_DESC_TEXT_FONT);
|
||||||
|
|
||||||
@@ -1751,7 +1767,6 @@ BOOLEAN DisplayBigItemImage(UINT16 usIndex, UINT16 PosY)
|
|||||||
BOOLEAN DisplayArmourInfo(UINT16 usIndex, UINT16 usTextPosY, BOOLEAN fUsed, UINT16 usBobbyIndex)
|
BOOLEAN DisplayArmourInfo(UINT16 usIndex, UINT16 usTextPosY, BOOLEAN fUsed, UINT16 usBobbyIndex)
|
||||||
{
|
{
|
||||||
UINT16 usHeight;
|
UINT16 usHeight;
|
||||||
UINT32 uiStartLoc=0;
|
|
||||||
UINT16 usFontHeight;
|
UINT16 usFontHeight;
|
||||||
usFontHeight = GetFontHeight(BOBBYR_ITEM_DESC_TEXT_FONT);
|
usFontHeight = GetFontHeight(BOBBYR_ITEM_DESC_TEXT_FONT);
|
||||||
|
|
||||||
@@ -1774,10 +1789,15 @@ BOOLEAN DisplayArmourInfo(UINT16 usIndex, UINT16 usTextPosY, BOOLEAN fUsed, UINT
|
|||||||
BOOLEAN DisplayMiscInfo(UINT16 usIndex, UINT16 usTextPosY, BOOLEAN fUsed, UINT16 usBobbyIndex)
|
BOOLEAN DisplayMiscInfo(UINT16 usIndex, UINT16 usTextPosY, BOOLEAN fUsed, UINT16 usBobbyIndex)
|
||||||
{
|
{
|
||||||
UINT16 usHeight;
|
UINT16 usHeight;
|
||||||
UINT32 uiStartLoc=0;
|
|
||||||
UINT16 usFontHeight;
|
UINT16 usFontHeight;
|
||||||
usFontHeight = GetFontHeight(BOBBYR_ITEM_DESC_TEXT_FONT);
|
usFontHeight = GetFontHeight(BOBBYR_ITEM_DESC_TEXT_FONT);
|
||||||
|
|
||||||
|
//CHRISL: Display extra information for LBE Items when using new inventory system
|
||||||
|
if((UsingNewInventorySystem() == true) && Item[usIndex].usItemClass == IC_LBEGEAR)
|
||||||
|
{
|
||||||
|
usHeight = DisplayLBEInfo(usTextPosY, usIndex, usFontHeight);
|
||||||
|
}
|
||||||
|
|
||||||
//Display Items Name
|
//Display Items Name
|
||||||
// DisplayItemNameAndInfo(usTextPosY, usIndex, fUsed);
|
// DisplayItemNameAndInfo(usTextPosY, usIndex, fUsed);
|
||||||
|
|
||||||
@@ -1942,6 +1962,56 @@ UINT16 DisplayCaliber(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight)
|
|||||||
return(usPosY);
|
return(usPosY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CHRISL: New display function for LBE Gear
|
||||||
|
UINT16 DisplayLBEInfo(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight)
|
||||||
|
{
|
||||||
|
CHAR16 sTemp[20];
|
||||||
|
CHAR16 pName[80];
|
||||||
|
int lnCnt=0, count, size;
|
||||||
|
UINT16 lbeIndex;
|
||||||
|
UINT8 pIndex=0;
|
||||||
|
std::vector<int> pocketNum;
|
||||||
|
|
||||||
|
size = LBEPocketType.size();
|
||||||
|
pocketNum.reserve(size);
|
||||||
|
lbeIndex = Item[usIndex].ubClassIndex;
|
||||||
|
// Determine number of each pocket definition
|
||||||
|
for(count = 0; count<size; count++)
|
||||||
|
{
|
||||||
|
pocketNum.push_back(0);
|
||||||
|
}
|
||||||
|
// Populate "Number" for each type of pocket this LBE item has
|
||||||
|
for(count = 0; count<12; count++)
|
||||||
|
{
|
||||||
|
pIndex = LoadBearingEquipment[lbeIndex].lbePocketIndex[count];
|
||||||
|
pocketNum[pIndex]++;
|
||||||
|
}
|
||||||
|
// Go through and display the pocket type and number
|
||||||
|
for(count = 1; count<size; count++)
|
||||||
|
{
|
||||||
|
if(pocketNum[count]>0)
|
||||||
|
{
|
||||||
|
if(lnCnt>4)
|
||||||
|
{
|
||||||
|
swprintf(sTemp, L"More..." );
|
||||||
|
DrawTextToScreen(sTemp, BOBBYR_ITEM_WEIGHT_TEXT_X, (UINT16)usPosY, BOBBYR_ITEM_WEIGHT_NUM_WIDTH, BOBBYR_ITEM_DESC_TEXT_FONT, BOBBYR_ITEM_DESC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||||
|
usPosY += usFontHeight + 2;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mbstowcs(pName,LBEPocketType[count].pName,80);
|
||||||
|
pName[14] = '\0';
|
||||||
|
swprintf(sTemp, L"%s(x%d)", pName, pocketNum[count] );
|
||||||
|
DrawTextToScreen(sTemp, BOBBYR_ITEM_WEIGHT_TEXT_X, (UINT16)usPosY, BOBBYR_ITEM_WEIGHT_NUM_WIDTH, BOBBYR_ITEM_DESC_TEXT_FONT, BOBBYR_ITEM_DESC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||||
|
usPosY += usFontHeight + 2;
|
||||||
|
lnCnt++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return(usPosY);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
UINT16 DisplayWeight(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight)
|
UINT16 DisplayWeight(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight)
|
||||||
{
|
{
|
||||||
@@ -1961,10 +2031,8 @@ void DisplayItemNameAndInfo(UINT16 usPosY, UINT16 usIndex, UINT16 usBobbyIndex,
|
|||||||
{
|
{
|
||||||
CHAR16 sText[400];
|
CHAR16 sText[400];
|
||||||
CHAR16 sTemp[20];
|
CHAR16 sTemp[20];
|
||||||
UINT32 uiStartLoc=0;
|
|
||||||
|
|
||||||
UINT8 ubPurchaseNumber;
|
UINT8 ubPurchaseNumber;
|
||||||
UINT16 usFontHeight = GetFontHeight(BOBBYR_ITEM_DESC_TEXT_FONT);
|
|
||||||
|
|
||||||
//Display Items Name
|
//Display Items Name
|
||||||
//uiStartLoc = BOBBYR_ITEM_DESC_FILE_SIZE * usIndex;
|
//uiStartLoc = BOBBYR_ITEM_DESC_FILE_SIZE * usIndex;
|
||||||
@@ -2069,7 +2137,6 @@ void SetFirstLastPagesForNew( UINT32 uiClassMask, INT32 iFilter )
|
|||||||
UINT16 i;
|
UINT16 i;
|
||||||
INT16 sFirst = -1;
|
INT16 sFirst = -1;
|
||||||
INT16 sLast = -1;
|
INT16 sLast = -1;
|
||||||
UINT16 ubPages=0;
|
|
||||||
UINT16 ubNumItems=0;
|
UINT16 ubNumItems=0;
|
||||||
UINT16 usItemIndex = 0;
|
UINT16 usItemIndex = 0;
|
||||||
|
|
||||||
@@ -2165,10 +2232,8 @@ void SetFirstLastPagesForUsed(INT32 iFilter)
|
|||||||
UINT16 i;
|
UINT16 i;
|
||||||
INT16 sFirst = -1;
|
INT16 sFirst = -1;
|
||||||
INT16 sLast = -1;
|
INT16 sLast = -1;
|
||||||
UINT16 ubPages=0;
|
|
||||||
UINT16 ubNumItems=0;
|
UINT16 ubNumItems=0;
|
||||||
UINT16 usItemIndex;
|
UINT16 usItemIndex;
|
||||||
INT32 iFilterLauncher = IC_LAUNCHER;
|
|
||||||
|
|
||||||
gubCurPage = 0;
|
gubCurPage = 0;
|
||||||
BOOLEAN bCntNumItems = FALSE;
|
BOOLEAN bCntNumItems = FALSE;
|
||||||
@@ -2188,7 +2253,6 @@ void SetFirstLastPagesForUsed(INT32 iFilter)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
bCntNumItems = FALSE;
|
bCntNumItems = FALSE;
|
||||||
|
|
||||||
// Get the weapon from the item
|
// Get the weapon from the item
|
||||||
usItemIndex = LaptopSaveInfo.BobbyRayUsedInventory[ i ].usItemIndex;
|
usItemIndex = LaptopSaveInfo.BobbyRayUsedInventory[ i ].usItemIndex;
|
||||||
|
|
||||||
@@ -2213,6 +2277,12 @@ void SetFirstLastPagesForUsed(INT32 iFilter)
|
|||||||
bCntNumItems = TRUE;
|
bCntNumItems = TRUE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case IC_LBEGEAR:
|
||||||
|
if (Item[usItemIndex].usItemClass == IC_LBEGEAR)
|
||||||
|
{
|
||||||
|
bCntNumItems = TRUE;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case IC_BOBBY_MISC:
|
case IC_BOBBY_MISC:
|
||||||
if (Item[usItemIndex].usItemClass == IC_BLADE ||
|
if (Item[usItemIndex].usItemClass == IC_BLADE ||
|
||||||
Item[usItemIndex].usItemClass == IC_THROWING_KNIFE ||
|
Item[usItemIndex].usItemClass == IC_THROWING_KNIFE ||
|
||||||
@@ -2437,7 +2507,7 @@ void CreateMouseRegionForBigImage( UINT16 usPosY, UINT8 ubCount, INT16 *pItemNum
|
|||||||
// AmmoTypes[Magazine[ Item[usItem].ubClassIndex ].ubAmmoType].ammoName, //Ammo type
|
// AmmoTypes[Magazine[ Item[usItem].ubClassIndex ].ubAmmoType].ammoName, //Ammo type
|
||||||
// MagNames[Magazine[ Item[usItem].ubClassIndex ].ubMagType], //Magazine type
|
// MagNames[Magazine[ Item[usItem].ubClassIndex ].ubMagType], //Magazine type
|
||||||
// Magazine[ Item[usItem].ubClassIndex ].ubMagSize, //Magazine capacity
|
// Magazine[ Item[usItem].ubClassIndex ].ubMagSize, //Magazine capacity
|
||||||
// pObject->ubShotsLeft[0], //Shots left
|
// (*pObject)[0]->data.ubShotsLeft, //Shots left
|
||||||
// gWeaponStatsDesc[ 12 ], //Weight String
|
// gWeaponStatsDesc[ 12 ], //Weight String
|
||||||
// fWeight, //Weight
|
// fWeight, //Weight
|
||||||
// GetWeightUnitString() //Weight units
|
// GetWeightUnitString() //Weight units
|
||||||
@@ -2884,7 +2954,9 @@ void UpdateUsedFilterButtons()
|
|||||||
{
|
{
|
||||||
EnableButton(guiBobbyRFilterUsed[0]);
|
EnableButton(guiBobbyRFilterUsed[0]);
|
||||||
EnableButton(guiBobbyRFilterUsed[1]);
|
EnableButton(guiBobbyRFilterUsed[1]);
|
||||||
|
if(guiBobbyRFilterUsed[2])
|
||||||
EnableButton(guiBobbyRFilterUsed[2]);
|
EnableButton(guiBobbyRFilterUsed[2]);
|
||||||
|
EnableButton(guiBobbyRFilterUsed[3]);
|
||||||
|
|
||||||
switch (guiCurrentUsedFilterMode)
|
switch (guiCurrentUsedFilterMode)
|
||||||
{
|
{
|
||||||
@@ -2894,9 +2966,12 @@ void UpdateUsedFilterButtons()
|
|||||||
case IC_ARMOUR:
|
case IC_ARMOUR:
|
||||||
DisableButton(guiBobbyRFilterUsed[1]);
|
DisableButton(guiBobbyRFilterUsed[1]);
|
||||||
break;
|
break;
|
||||||
case IC_BOBBY_MISC:
|
case IC_LBEGEAR:
|
||||||
DisableButton(guiBobbyRFilterUsed[2]);
|
DisableButton(guiBobbyRFilterUsed[2]);
|
||||||
break;
|
break;
|
||||||
|
case IC_BOBBY_MISC:
|
||||||
|
DisableButton(guiBobbyRFilterUsed[3]);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2928,7 +3003,9 @@ void UpdateMiscFilterButtons()
|
|||||||
EnableButton(guiBobbyRFilterMisc[5]);
|
EnableButton(guiBobbyRFilterMisc[5]);
|
||||||
EnableButton(guiBobbyRFilterMisc[6]);
|
EnableButton(guiBobbyRFilterMisc[6]);
|
||||||
EnableButton(guiBobbyRFilterMisc[7]);
|
EnableButton(guiBobbyRFilterMisc[7]);
|
||||||
|
if(guiBobbyRFilterMisc[8])
|
||||||
EnableButton(guiBobbyRFilterMisc[8]);
|
EnableButton(guiBobbyRFilterMisc[8]);
|
||||||
|
EnableButton(guiBobbyRFilterMisc[9]);
|
||||||
|
|
||||||
switch (guiCurrentMiscFilterMode)
|
switch (guiCurrentMiscFilterMode)
|
||||||
{
|
{
|
||||||
@@ -2956,9 +3033,12 @@ void UpdateMiscFilterButtons()
|
|||||||
case IC_FACE:
|
case IC_FACE:
|
||||||
DisableButton(guiBobbyRFilterMisc[7]);
|
DisableButton(guiBobbyRFilterMisc[7]);
|
||||||
break;
|
break;
|
||||||
case IC_MISC:
|
case IC_LBEGEAR:
|
||||||
DisableButton(guiBobbyRFilterMisc[8]);
|
DisableButton(guiBobbyRFilterMisc[8]);
|
||||||
break;
|
break;
|
||||||
|
case IC_MISC:
|
||||||
|
DisableButton(guiBobbyRFilterMisc[9]);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//if (iNewButton != iOldButton)
|
//if (iNewButton != iOldButton)
|
||||||
@@ -3089,6 +3169,12 @@ void CalcFirstIndexForPage( STORE_INVENTORY *pInv, UINT32 uiItemClass )
|
|||||||
bCntItem = TRUE;
|
bCntItem = TRUE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case IC_LBEGEAR:
|
||||||
|
if (Item[usItemIndex].usItemClass == IC_LBEGEAR)
|
||||||
|
{
|
||||||
|
bCntItem = TRUE;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case IC_BOBBY_MISC:
|
case IC_BOBBY_MISC:
|
||||||
if (Item[usItemIndex].usItemClass == IC_BLADE ||
|
if (Item[usItemIndex].usItemClass == IC_BLADE ||
|
||||||
Item[usItemIndex].usItemClass == IC_THROWING_KNIFE ||
|
Item[usItemIndex].usItemClass == IC_THROWING_KNIFE ||
|
||||||
@@ -3279,7 +3365,7 @@ UINT8 CheckPlayersInventoryForGunMatchingGivenAmmoID( INT16 sItemID )
|
|||||||
if( Menptr[ ubMercCount ].bActive )
|
if( Menptr[ ubMercCount ].bActive )
|
||||||
{
|
{
|
||||||
//loop through all the pockets on the merc
|
//loop through all the pockets on the merc
|
||||||
for( ubPocketCount=0; ubPocketCount<NUM_INV_SLOTS; ubPocketCount++)
|
for( ubPocketCount=0; ubPocketCount<Menptr[ ubMercCount ].inv.size(); ubPocketCount++)
|
||||||
{
|
{
|
||||||
//if there is a weapon here
|
//if there is a weapon here
|
||||||
if( Item[ Menptr[ ubMercCount ].inv[ ubPocketCount ].usItem ].usItemClass == IC_GUN )
|
if( Item[ Menptr[ ubMercCount ].inv[ ubPocketCount ].usItem ].usItemClass == IC_GUN )
|
||||||
@@ -3321,3 +3407,5 @@ void ReportBobbyROrderError( UINT16 usItemNumber, UINT8 ubPurchaseNum, UINT8 ubQ
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
#ifndef __BOBBYRGUNS_H
|
#ifndef __BOBBYRGUNS_H
|
||||||
#define __BOBBYRGUNS_H
|
#define __BOBBYRGUNS_H
|
||||||
|
|
||||||
//#include "LaptopSave.h"
|
|
||||||
|
|
||||||
|
|
||||||
#define BOBBYRDESCFILE "BINARYDATA\\BrayDesc.edt"
|
#define BOBBYRDESCFILE "BINARYDATA\\BrayDesc.edt"
|
||||||
|
|
||||||
#define BOBBYR_ITEM_DESC_NAME_SIZE 160
|
#define BOBBYR_ITEM_DESC_NAME_SIZE 160
|
||||||
|
|||||||
@@ -1393,7 +1393,6 @@ BOOLEAN CreateDestroyBobbyRDropDown( UINT8 ubDropDownAction )
|
|||||||
{
|
{
|
||||||
UINT8 i;
|
UINT8 i;
|
||||||
UINT16 usPosY, usPosX;
|
UINT16 usPosY, usPosX;
|
||||||
UINT16 usFontHeight = GetFontHeight( BOBBYR_DROPDOWN_FONT );
|
|
||||||
HVOBJECT hImageHandle;
|
HVOBJECT hImageHandle;
|
||||||
HVOBJECT hArrowHandle;
|
HVOBJECT hArrowHandle;
|
||||||
|
|
||||||
|
|||||||
@@ -108,3 +108,4 @@ void RenderBobbyRMisc()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -425,3 +425,4 @@ INT32 CountNumberValidShipmentForTheShipmentsPage()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -106,3 +106,4 @@ void RenderBobbyRUsed()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -70,3 +70,4 @@ void DrawBrokenLinkWhiteBackground()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -728,3 +728,4 @@ BOOLEAN HasTheCurrentIMPPageBeenVisited( void )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -988,8 +988,6 @@ void RenderAttributeBoxes( void )
|
|||||||
INT32 iCnt=STRENGTH_ATTRIBUTE;
|
INT32 iCnt=STRENGTH_ATTRIBUTE;
|
||||||
INT16 sX = 0;
|
INT16 sX = 0;
|
||||||
INT16 sY = 0;
|
INT16 sY = 0;
|
||||||
INT16 sTempY = 0;
|
|
||||||
INT16 sTempX = 0;
|
|
||||||
CHAR16 sString[3];
|
CHAR16 sString[3];
|
||||||
|
|
||||||
// set last char to null
|
// set last char to null
|
||||||
@@ -1394,7 +1392,6 @@ void SliderRegionButtonCallback( MOUSE_REGION * pRegion, INT32 iReason )
|
|||||||
static INT16 sOldY = -1;
|
static INT16 sOldY = -1;
|
||||||
static INT32 iAttribute = -1;
|
static INT32 iAttribute = -1;
|
||||||
INT32 iNewValue = 0;
|
INT32 iNewValue = 0;
|
||||||
INT32 iCurrentValue = 0;
|
|
||||||
INT16 sNewX = -1;
|
INT16 sNewX = -1;
|
||||||
|
|
||||||
|
|
||||||
@@ -1805,7 +1802,6 @@ INT32 DetermineNewPosition( INT32 iAttribute )
|
|||||||
|
|
||||||
INT32 iNewLoc=0;
|
INT32 iNewLoc=0;
|
||||||
INT32 iStartLoc = SKILL_SLIDE_START_X;
|
INT32 iStartLoc = SKILL_SLIDE_START_X;
|
||||||
FLOAT fPercentOfBar=0.0f;
|
|
||||||
FLOAT fBasePixelScaleWidth = ( ( BAR_WIDTH - SLIDER_BAR_WIDTH ) / (FLOAT)( iMaxAttribute - iMinAttribute ) );
|
FLOAT fBasePixelScaleWidth = ( ( BAR_WIDTH - SLIDER_BAR_WIDTH ) / (FLOAT)( iMaxAttribute - iMinAttribute ) );
|
||||||
|
|
||||||
iNewLoc = (INT32)(iAttribute * fBasePixelScaleWidth);
|
iNewLoc = (INT32)(iAttribute * fBasePixelScaleWidth);
|
||||||
|
|||||||
@@ -809,7 +809,6 @@ void DisplayPlayerFullNameString( void )
|
|||||||
{
|
{
|
||||||
|
|
||||||
// this function will grab the string that the player will enter for activation
|
// this function will grab the string that the player will enter for activation
|
||||||
INT32 iCounter=0;
|
|
||||||
|
|
||||||
// player gone too far, move back
|
// player gone too far, move back
|
||||||
if(uiFullNameCharacterPosition > MAX_FULL_NAME)
|
if(uiFullNameCharacterPosition > MAX_FULL_NAME)
|
||||||
@@ -841,7 +840,6 @@ void DisplayPlayerNickNameString( void )
|
|||||||
{
|
{
|
||||||
|
|
||||||
// this function will grab the string that the player will enter for activation
|
// this function will grab the string that the player will enter for activation
|
||||||
INT32 iCounter=0;
|
|
||||||
|
|
||||||
// player gone too far, move back
|
// player gone too far, move back
|
||||||
if(uiNickNameCharacterPosition > MAX_NICK_NAME)
|
if(uiNickNameCharacterPosition > MAX_NICK_NAME)
|
||||||
|
|||||||
@@ -485,7 +485,6 @@ void CreatePlayerSkills( void )
|
|||||||
|
|
||||||
// this function will 'roll a die' and decide if any attitude does exists
|
// this function will 'roll a die' and decide if any attitude does exists
|
||||||
INT32 iDiceValue = 0;
|
INT32 iDiceValue = 0;
|
||||||
INT32 iCounter = 0;
|
|
||||||
|
|
||||||
ValidateSkillsList();
|
ValidateSkillsList();
|
||||||
/* Kaiden - Commented out in UB to skip the whole random skill thing
|
/* Kaiden - Commented out in UB to skip the whole random skill thing
|
||||||
|
|||||||
+544
-21
@@ -33,9 +33,24 @@
|
|||||||
#include "strategic.h"
|
#include "strategic.h"
|
||||||
#include "weapons.h"
|
#include "weapons.h"
|
||||||
#include "Random.h"
|
#include "Random.h"
|
||||||
|
#include "GameVersion.h"
|
||||||
|
#include "GameSettings.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define IMP_FILENAME_SUFFIX ".dat"
|
// Changed by ADB (rev 1513) to resolve IMPs created prior to structural changes
|
||||||
|
//#define IMP_FILENAME_SUFFIX ".dat"
|
||||||
|
#define OLD_IMP_FILENAME_SUFFIX ".dat"
|
||||||
|
#define NEW_IMP_FILENAME_SUFFIX ".dat2"
|
||||||
|
|
||||||
|
//CHRISL: structure needed to store temporary inventory information during IMP creation
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
UINT16 inv;
|
||||||
|
UINT8 iSize;
|
||||||
|
UINT32 iClass;
|
||||||
|
UINT8 iStatus;
|
||||||
|
UINT8 iNumber;
|
||||||
|
} INVNODE;
|
||||||
|
|
||||||
IMP_ITEM_CHOICE_TYPE gIMPItemChoices[MAX_IMP_ITEM_TYPES];
|
IMP_ITEM_CHOICE_TYPE gIMPItemChoices[MAX_IMP_ITEM_TYPES];
|
||||||
|
|
||||||
@@ -132,6 +147,14 @@ void MakeProfileInvItemAnySlot(MERCPROFILESTRUCT *pProfile, UINT16 usItem, UINT8
|
|||||||
void MakeProfileInvItemThisSlot(MERCPROFILESTRUCT *pProfile, UINT32 uiPos, UINT16 usItem, UINT8 ubStatus, UINT8 ubHowMany);
|
void MakeProfileInvItemThisSlot(MERCPROFILESTRUCT *pProfile, UINT32 uiPos, UINT16 usItem, UINT8 ubStatus, UINT8 ubHowMany);
|
||||||
INT32 FirstFreeBigEnoughPocket(MERCPROFILESTRUCT *pProfile, UINT16 usItem, UINT8 ubHowMany);
|
INT32 FirstFreeBigEnoughPocket(MERCPROFILESTRUCT *pProfile, UINT16 usItem, UINT8 ubHowMany);
|
||||||
|
|
||||||
|
// CHRISL:
|
||||||
|
void RedistributeStartingItems(MERCPROFILESTRUCT *pProfile, UINT16 usItem, UINT8 sPocket);
|
||||||
|
void DistributeInitialGear(MERCPROFILESTRUCT *pProfile);
|
||||||
|
INT32 FirstFreeBigEnoughPocket(MERCPROFILESTRUCT *pProfile, INVNODE *tInv);
|
||||||
|
INT32 AnyFreeBigEnoughPocket(MERCPROFILESTRUCT *pProfile, INVNODE *tInv);
|
||||||
|
INT32 SpecificFreePocket(MERCPROFILESTRUCT *pProfile, UINT16 usItem, UINT8 ubHowMany, UINT32 usClass);
|
||||||
|
INT32 PickPocket(MERCPROFILESTRUCT *pProfile, UINT8 ppStart, UINT8 ppStop, UINT16 usItem, UINT8 iNumber, UINT8 * cap);
|
||||||
|
|
||||||
// callbacks
|
// callbacks
|
||||||
void BtnIMPConfirmNo( GUI_BUTTON *btn,INT32 reason );
|
void BtnIMPConfirmNo( GUI_BUTTON *btn,INT32 reason );
|
||||||
void BtnIMPConfirmYes( GUI_BUTTON *btn,INT32 reason );
|
void BtnIMPConfirmYes( GUI_BUTTON *btn,INT32 reason );
|
||||||
@@ -406,6 +429,137 @@ void BtnIMPConfirmNo( GUI_BUTTON *btn,INT32 reason )
|
|||||||
|
|
||||||
#define PROFILE_HAS_SKILL_TRAIT( p, t ) ((p->bSkillTrait == t) || (p->bSkillTrait2 == t))
|
#define PROFILE_HAS_SKILL_TRAIT( p, t ) ((p->bSkillTrait == t) || (p->bSkillTrait2 == t))
|
||||||
|
|
||||||
|
//CHRISL: New function to handle proper distribution of starting gear
|
||||||
|
void DistributeInitialGear(MERCPROFILESTRUCT *pProfile)
|
||||||
|
{
|
||||||
|
INVNODE tInv[NUM_INV_SLOTS];
|
||||||
|
int i, j, number;
|
||||||
|
UINT8 count = 0, length;
|
||||||
|
int iOrder[NUM_INV_SLOTS];
|
||||||
|
INT32 iSlot;
|
||||||
|
BOOLEAN iSet = FALSE;
|
||||||
|
|
||||||
|
// First move profile information to temporary storage
|
||||||
|
for(i=INV_START_POS; i<NUM_INV_SLOTS; i++)
|
||||||
|
{
|
||||||
|
if(pProfile->inv[i] != NOTHING)
|
||||||
|
{
|
||||||
|
if((UsingNewInventorySystem() == true))
|
||||||
|
{
|
||||||
|
if(Item[pProfile->inv[i]].ItemSize != 99)
|
||||||
|
{
|
||||||
|
tInv[count].inv = pProfile->inv[i];
|
||||||
|
tInv[count].iSize = Item[pProfile->inv[i]].ItemSize;
|
||||||
|
tInv[count].iClass = Item[pProfile->inv[i]].usItemClass;
|
||||||
|
tInv[count].iStatus = (pProfile->bInvStatus[i] > 0) ? pProfile->bInvStatus[i] : 100;
|
||||||
|
tInv[count].iNumber = (pProfile->bInvNumber[i] == 0) ? 1 :pProfile->bInvNumber[i];
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
pProfile->inv[i] = 0;
|
||||||
|
pProfile->bInvStatus[i] = 0;
|
||||||
|
pProfile->bInvNumber[i] = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(Item[pProfile->inv[i]].usItemClass == IC_LBEGEAR)
|
||||||
|
{
|
||||||
|
pProfile->inv[i] = 0;
|
||||||
|
pProfile->bInvStatus[i] = 0;
|
||||||
|
pProfile->bInvNumber[i] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Now that we've weeded out illegal items, skip the rest if we're in OldInv
|
||||||
|
if((UsingNewInventorySystem() == false))
|
||||||
|
return;
|
||||||
|
|
||||||
|
length = count;
|
||||||
|
count = 0;
|
||||||
|
// Next sort list by size
|
||||||
|
for(j=34; j>=0; j--)
|
||||||
|
{
|
||||||
|
for(i=0; i<length; i++)
|
||||||
|
{
|
||||||
|
if(tInv[i].iSize == j)
|
||||||
|
{
|
||||||
|
//ADB this is a mem leak!!!
|
||||||
|
//int *filler = new int;
|
||||||
|
//iOrder.push_back(*filler);
|
||||||
|
iOrder[count] = i;
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Last, go through the temp data and put items into appropriate pockets
|
||||||
|
// Start by putting items into specific pockets
|
||||||
|
for(i=0; i<count; i++)
|
||||||
|
{
|
||||||
|
iSlot = SpecificFreePocket(pProfile, tInv[iOrder[i]].inv, tInv[iOrder[i]].iNumber, tInv[iOrder[i]].iClass);
|
||||||
|
if(iSlot != -1)
|
||||||
|
{
|
||||||
|
MakeProfileInvItemThisSlot(pProfile, iSlot, tInv[iOrder[i]].inv, tInv[iOrder[i]].iStatus, tInv[iOrder[i]].iNumber);
|
||||||
|
iOrder[i]=-1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Next, put anything that isn't an attachment into a pocket
|
||||||
|
for(i=0; i<count; i++)
|
||||||
|
{
|
||||||
|
if(iOrder[i]!=-1)
|
||||||
|
{
|
||||||
|
// skip if this item is an attachment
|
||||||
|
if(Item[tInv[iOrder[i]].inv].attachment)
|
||||||
|
continue;
|
||||||
|
iSet = FALSE;
|
||||||
|
number = tInv[iOrder[i]].iNumber;
|
||||||
|
while(number > 0)
|
||||||
|
{
|
||||||
|
iSlot = FirstFreeBigEnoughPocket (pProfile, &tInv[iOrder[i]]);
|
||||||
|
if(iSlot != -1)
|
||||||
|
{
|
||||||
|
MakeProfileInvItemThisSlot(pProfile, iSlot, tInv[iOrder[i]].inv, tInv[iOrder[i]].iStatus, tInv[iOrder[i]].iNumber);
|
||||||
|
iSet = TRUE;
|
||||||
|
number -= tInv[iOrder[i]].iNumber;
|
||||||
|
tInv[iOrder[i]].iNumber = number;
|
||||||
|
}
|
||||||
|
else if(tInv[iOrder[i]].iNumber>1){
|
||||||
|
tInv[iOrder[i]].iNumber --;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
iSet = FALSE;
|
||||||
|
tInv[iOrder[i]].iNumber = number;
|
||||||
|
number = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(iSet)
|
||||||
|
iOrder[i]=-1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// finish by putting anything that's left into any pocket, including inactive pockets
|
||||||
|
for(i=0; i<count; i++)
|
||||||
|
{
|
||||||
|
if(iOrder[i]!=-1)
|
||||||
|
{
|
||||||
|
iSet = FALSE;
|
||||||
|
number = tInv[iOrder[i]].iNumber;
|
||||||
|
tInv[iOrder[i]].iNumber = 1;
|
||||||
|
for(int j=0; j<number; j++)
|
||||||
|
{
|
||||||
|
iSlot = AnyFreeBigEnoughPocket (pProfile, &tInv[iOrder[i]]);
|
||||||
|
if(iSlot != -1)
|
||||||
|
{
|
||||||
|
MakeProfileInvItemThisSlot(pProfile, iSlot, tInv[iOrder[i]].inv, tInv[iOrder[i]].iStatus, tInv[iOrder[i]].iNumber);
|
||||||
|
iSet = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(iSet)
|
||||||
|
iOrder[i] = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void GiveItemsToPC( UINT8 ubProfileId )
|
void GiveItemsToPC( UINT8 ubProfileId )
|
||||||
{
|
{
|
||||||
@@ -567,9 +721,9 @@ void GiveItemsToPC( UINT8 ubProfileId )
|
|||||||
GiveIMPRandomItems(pProfile,IMP_MARTIALARTS);
|
GiveIMPRandomItems(pProfile,IMP_MARTIALARTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PROFILE_HAS_SKILL_TRAIT(pProfile, ONROOF))
|
if (PROFILE_HAS_SKILL_TRAIT(pProfile, PROF_SNIPER))
|
||||||
{
|
{
|
||||||
GiveIMPRandomItems(pProfile,IMP_ROOFTOPS);
|
GiveIMPRandomItems(pProfile,IMP_PROF_SNIPER);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PROFILE_HAS_SKILL_TRAIT(pProfile, TEACHING))
|
if (PROFILE_HAS_SKILL_TRAIT(pProfile, TEACHING))
|
||||||
@@ -591,14 +745,30 @@ void GiveItemsToPC( UINT8 ubProfileId )
|
|||||||
{
|
{
|
||||||
GiveIMPRandomItems(pProfile,IMP_THIEF);
|
GiveIMPRandomItems(pProfile,IMP_THIEF);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CHRISL: Now that all items have been issued, distribute them into appropriate pockets, starting with the largest items
|
||||||
|
DistributeInitialGear(pProfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MakeProfileInvItemAnySlot(MERCPROFILESTRUCT *pProfile, UINT16 usItem, UINT8 ubStatus, UINT8 ubHowMany)
|
void MakeProfileInvItemAnySlot(MERCPROFILESTRUCT *pProfile, UINT16 usItem, UINT8 ubStatus, UINT8 ubHowMany)
|
||||||
{
|
{
|
||||||
INT32 iSlot;
|
INT32 iSlot = -1;
|
||||||
|
|
||||||
|
if((UsingNewInventorySystem() == false))
|
||||||
iSlot = FirstFreeBigEnoughPocket(pProfile, usItem, ubHowMany);
|
iSlot = FirstFreeBigEnoughPocket(pProfile, usItem, ubHowMany);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// CHRISL: Alter the placement of initial equipment to come last. At this stage, just add items, one pocket at a time
|
||||||
|
for(int i=INV_START_POS; i<NUM_INV_SLOTS; i++)
|
||||||
|
{
|
||||||
|
if(pProfile->inv[i] == NOTHING)
|
||||||
|
{
|
||||||
|
iSlot = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (iSlot == -1)
|
if (iSlot == -1)
|
||||||
{
|
{
|
||||||
@@ -610,6 +780,177 @@ void MakeProfileInvItemAnySlot(MERCPROFILESTRUCT *pProfile, UINT16 usItem, UINT8
|
|||||||
MakeProfileInvItemThisSlot(pProfile, iSlot, usItem, ubStatus, ubHowMany);
|
MakeProfileInvItemThisSlot(pProfile, iSlot, usItem, ubStatus, ubHowMany);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CHRISL: New function to move initial gear into LBE pockets when LBE items are given during creation
|
||||||
|
void RedistributeStartingItems(MERCPROFILESTRUCT *pProfile, UINT16 usItem, UINT8 sPocket)
|
||||||
|
{
|
||||||
|
UINT16 lbeIndex;
|
||||||
|
UINT8 lbeClass, iSize;
|
||||||
|
UINT16 inv[NUM_INV_SLOTS], istatus[NUM_INV_SLOTS], inumber[NUM_INV_SLOTS];
|
||||||
|
|
||||||
|
lbeIndex = Item[usItem].ubClassIndex;
|
||||||
|
lbeClass = LoadBearingEquipment[lbeIndex].lbeClass;
|
||||||
|
|
||||||
|
// Move non-worn items into temporary storage
|
||||||
|
for(int i=INV_START_POS; i<NUM_INV_SLOTS; i++)
|
||||||
|
{
|
||||||
|
if(i>=BODYPOSFINAL)
|
||||||
|
{
|
||||||
|
inv[i] = pProfile->inv[i];
|
||||||
|
istatus[i] = pProfile->bInvStatus[i];
|
||||||
|
inumber[i] = pProfile->bInvNumber[i];
|
||||||
|
pProfile->inv[i] = 0;
|
||||||
|
pProfile->bInvStatus[i] = 0;
|
||||||
|
pProfile->bInvNumber[i] = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
switch (i)
|
||||||
|
{
|
||||||
|
case HANDPOS:
|
||||||
|
case SECONDHANDPOS:
|
||||||
|
inv[i] = pProfile->inv[i];
|
||||||
|
istatus[i] = pProfile->bInvStatus[i];
|
||||||
|
inumber[i] = pProfile->bInvNumber[i];
|
||||||
|
pProfile->inv[i] = 0;
|
||||||
|
pProfile->bInvStatus[i] = 0;
|
||||||
|
pProfile->bInvNumber[i] = 0;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
inv[i] = 0;
|
||||||
|
istatus[i] = 0;
|
||||||
|
inumber[i] = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Redistribute stored items with the assumption of the new LBE item
|
||||||
|
for(int i=INV_START_POS; i<NUM_INV_SLOTS; i++)
|
||||||
|
{
|
||||||
|
if(inv[i] != NONE)
|
||||||
|
{
|
||||||
|
iSize = Item[inv[i]].ItemSize;
|
||||||
|
for(int j=INV_START_POS; j<NUM_INV_SLOTS; j++)
|
||||||
|
{
|
||||||
|
if(icLBE[j] == sPocket && pProfile->inv[j] == NONE && LBEPocketType[LoadBearingEquipment[lbeIndex].lbePocketIndex[icPocket[j]]].ItemCapacityPerSize[iSize] != NONE)
|
||||||
|
{
|
||||||
|
pProfile->inv[j] = inv[i];
|
||||||
|
pProfile->bInvStatus[j] = istatus[i];
|
||||||
|
pProfile->bInvNumber[j] = inumber[i];
|
||||||
|
inv[i] = istatus[i] = inumber[i] = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pProfile->inv[i] = inv[i];
|
||||||
|
pProfile->bInvStatus[i] = istatus[i];
|
||||||
|
pProfile->bInvNumber[i] = inumber[i];
|
||||||
|
inv[i] = istatus[i] = inumber[i] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// CHRISL: New function to work with LBE pockets
|
||||||
|
INT32 SpecificFreePocket(MERCPROFILESTRUCT *pProfile, UINT16 usItem, UINT8 ubHowMany, UINT32 usClass)
|
||||||
|
{
|
||||||
|
UINT8 lbePocket;
|
||||||
|
|
||||||
|
if (ubHowMany == 1)
|
||||||
|
{
|
||||||
|
switch (usClass)
|
||||||
|
{
|
||||||
|
case IC_LBEGEAR:
|
||||||
|
if(pProfile->inv[VESTPOCKPOS]==NONE && LoadBearingEquipment[Item[usItem].ubClassIndex].lbeClass==VEST_PACK)
|
||||||
|
return VESTPOCKPOS;
|
||||||
|
if(pProfile->inv[LTHIGHPOCKPOS]==NONE && LoadBearingEquipment[Item[usItem].ubClassIndex].lbeClass==THIGH_PACK)
|
||||||
|
return LTHIGHPOCKPOS;
|
||||||
|
if(pProfile->inv[RTHIGHPOCKPOS]==NONE && LoadBearingEquipment[Item[usItem].ubClassIndex].lbeClass==THIGH_PACK)
|
||||||
|
return RTHIGHPOCKPOS;
|
||||||
|
if(LoadBearingEquipment[Item[usItem].ubClassIndex].lbeClass==COMBAT_PACK)
|
||||||
|
{
|
||||||
|
if(pProfile->inv[CPACKPOCKPOS]==NONE)
|
||||||
|
{
|
||||||
|
if(LoadBearingEquipment[Item[usItem].ubClassIndex].lbeCombo!=0)
|
||||||
|
{
|
||||||
|
if((pProfile->inv[BPACKPOCKPOS]!=NONE && LoadBearingEquipment[Item[pProfile->inv[BPACKPOCKPOS]].ubClassIndex].lbeCombo==LoadBearingEquipment[Item[usItem].ubClassIndex].lbeCombo) || pProfile->inv[BPACKPOCKPOS]==NONE)
|
||||||
|
return CPACKPOCKPOS;
|
||||||
|
}
|
||||||
|
else if(pProfile->inv[BPACKPOCKPOS]==NONE)
|
||||||
|
return CPACKPOCKPOS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(LoadBearingEquipment[Item[usItem].ubClassIndex].lbeClass==BACKPACK)
|
||||||
|
{
|
||||||
|
if(pProfile->inv[BPACKPOCKPOS]==NONE)
|
||||||
|
{
|
||||||
|
if(LoadBearingEquipment[Item[usItem].ubClassIndex].lbeCombo!=0)
|
||||||
|
{
|
||||||
|
if((pProfile->inv[CPACKPOCKPOS]!=NONE && LoadBearingEquipment[Item[pProfile->inv[CPACKPOCKPOS]].ubClassIndex].lbeCombo==LoadBearingEquipment[Item[usItem].ubClassIndex].lbeCombo) || pProfile->inv[CPACKPOCKPOS]==NONE)
|
||||||
|
return BPACKPOCKPOS;
|
||||||
|
}
|
||||||
|
else if(pProfile->inv[CPACKPOCKPOS]==NONE)
|
||||||
|
return BPACKPOCKPOS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case IC_ARMOUR:
|
||||||
|
if ( pProfile->inv[HELMETPOS] == NONE && Armour[Item[usItem].ubClassIndex].ubArmourClass == ARMOURCLASS_HELMET )
|
||||||
|
return HELMETPOS;
|
||||||
|
if ( pProfile->inv[VESTPOS] == NONE && Armour[Item[usItem].ubClassIndex].ubArmourClass == ARMOURCLASS_VEST )
|
||||||
|
return VESTPOS;
|
||||||
|
if ( pProfile->inv[LEGPOS] == NONE && Armour[Item[usItem].ubClassIndex].ubArmourClass == ARMOURCLASS_LEGGINGS && !(Item[usItem].attachment))
|
||||||
|
return LEGPOS;
|
||||||
|
break;
|
||||||
|
case IC_BLADE:
|
||||||
|
if ( pProfile->inv[KNIFEPOCKPOS] == NONE)
|
||||||
|
return KNIFEPOCKPOS;
|
||||||
|
break;
|
||||||
|
/* CHRISL: This won't work without hard coding pocket definitions since there is no way to
|
||||||
|
guarantee that the pocket definitions won't change. */
|
||||||
|
// case IC_BOMB:
|
||||||
|
// for(int i=BIGPOCKSTART; i<NUM_INV_SLOTS; i++)
|
||||||
|
// {
|
||||||
|
// if(LoadBearingEquipment[Item[pProfile->inv[icLBE[i]]].ubClassIndex].lbePocketIndex[icPocket[i]]==7) // TNT Pocket
|
||||||
|
// if(pProfile->inv[i] == NONE)
|
||||||
|
// return i;
|
||||||
|
// }
|
||||||
|
// break;
|
||||||
|
// case IC_GRENADE:
|
||||||
|
// for(int i=BIGPOCKSTART; i<NUM_INV_SLOTS; i++)
|
||||||
|
// {
|
||||||
|
// if(pProfile->inv[i]==NONE && Item[usItem].ItemSize==16 && LoadBearingEquipment[Item[pProfile->inv[icLBE[i]]].ubClassIndex].lbePocketIndex[icPocket[i]]==12) // Rifle Grenade
|
||||||
|
// return i;
|
||||||
|
// else if(pProfile->inv[i]==NONE && LoadBearingEquipment[Item[pProfile->inv[icLBE[i]]].ubClassIndex].lbePocketIndex[icPocket[i]]==13) // Grenade
|
||||||
|
// return i;
|
||||||
|
// }
|
||||||
|
// break;
|
||||||
|
case IC_GUN:
|
||||||
|
if ( pProfile->inv[HANDPOS] == NONE )
|
||||||
|
return HANDPOS;
|
||||||
|
if ( pProfile->inv[SECONDHANDPOS] == NONE && !(Item[pProfile->inv[HANDPOS]].twohanded))
|
||||||
|
return SECONDHANDPOS;
|
||||||
|
if((UsingNewInventorySystem() == true))
|
||||||
|
if ( pProfile->inv[GUNSLINGPOCKPOS] == NONE && pProfile->inv[BPACKPOCKPOS] == NONE && LBEPocketType[1].ItemCapacityPerSize[Item[usItem].ItemSize]!=0)
|
||||||
|
return GUNSLINGPOCKPOS;
|
||||||
|
for(int i=BIGPOCKSTART; i<NUM_INV_SLOTS; i++)
|
||||||
|
{
|
||||||
|
lbePocket = LoadBearingEquipment[Item[pProfile->inv[icLBE[i]]].ubClassIndex].lbePocketIndex[icPocket[i]];
|
||||||
|
if(pProfile->inv[i]==NONE && (lbePocket==6 || lbePocket==10) && LBEPocketType[lbePocket].ItemCapacityPerSize[Item[usItem].ItemSize]!=0)
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case IC_FACE:
|
||||||
|
if ( pProfile->inv[HEAD1POS] == NONE && CompatibleFaceItem(usItem,pProfile->inv[HEAD2POS]) )
|
||||||
|
return HEAD1POS;
|
||||||
|
if ( pProfile->inv[HEAD2POS] == NONE && CompatibleFaceItem(usItem,pProfile->inv[HEAD1POS]) )
|
||||||
|
return HEAD2POS;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return(-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void MakeProfileInvItemThisSlot(MERCPROFILESTRUCT *pProfile, UINT32 uiPos, UINT16 usItem, UINT8 ubStatus, UINT8 ubHowMany)
|
void MakeProfileInvItemThisSlot(MERCPROFILESTRUCT *pProfile, UINT32 uiPos, UINT16 usItem, UINT8 ubStatus, UINT8 ubHowMany)
|
||||||
{
|
{
|
||||||
@@ -618,6 +959,76 @@ void MakeProfileInvItemThisSlot(MERCPROFILESTRUCT *pProfile, UINT32 uiPos, UINT1
|
|||||||
pProfile->bInvNumber[uiPos] = ubHowMany;
|
pProfile->bInvNumber[uiPos] = ubHowMany;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//INT32 FirstFreeBigEnoughPocket(MERCPROFILESTRUCT *pProfile, UINT16 usItem, UINT8 ubHowMany, UINT32 usClass)
|
||||||
|
INT32 FirstFreeBigEnoughPocket(MERCPROFILESTRUCT *pProfile, INVNODE *tInv)
|
||||||
|
{
|
||||||
|
INT32 sPocket=-1, mPocket=-1, lPocket=-1;
|
||||||
|
UINT8 sCapacity=0;
|
||||||
|
UINT8 mCapacity=0;
|
||||||
|
UINT8 lCapacity=0;
|
||||||
|
UINT8 capacity=0;
|
||||||
|
|
||||||
|
/*CHRISL: Make the assumption that by the time we get to this function, we've already activated
|
||||||
|
all the pockets we're going to activate. LBE Items were all placed in SpecificFreePocket function
|
||||||
|
which should activate everything. */
|
||||||
|
//Start with active big pockets
|
||||||
|
sPocket=PickPocket(pProfile, SMALLPOCKSTART, SMALLPOCKFINAL, tInv->inv, tInv->iNumber, &sCapacity);
|
||||||
|
//Next search active medium pockets
|
||||||
|
mPocket=PickPocket(pProfile, MEDPOCKSTART, MEDPOCKFINAL, tInv->inv, tInv->iNumber, &mCapacity);
|
||||||
|
//Lastly search active small pockets
|
||||||
|
lPocket=PickPocket(pProfile, BIGPOCKSTART, BIGPOCKFINAL, tInv->inv, tInv->iNumber, &lCapacity);
|
||||||
|
//Finally, compare the three pockets we've found and return the pocket that is most logical to use
|
||||||
|
capacity = min(sCapacity, mCapacity);
|
||||||
|
capacity = min(lCapacity, capacity);
|
||||||
|
if(capacity == 254) { //no pocket found
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
else if(capacity == sCapacity) {
|
||||||
|
return sPocket;
|
||||||
|
}
|
||||||
|
else if(capacity == mCapacity) {
|
||||||
|
return mPocket;
|
||||||
|
}
|
||||||
|
else if(capacity == lCapacity) {
|
||||||
|
return lPocket;
|
||||||
|
}
|
||||||
|
return(-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// CHRISL: Use to find best pocket to store item in. Could probably be merged with FitsInSmallPocket
|
||||||
|
INT32 PickPocket(MERCPROFILESTRUCT *pProfile, UINT8 ppStart, UINT8 ppStop, UINT16 usItem, UINT8 iNumber, UINT8 * cap)
|
||||||
|
{
|
||||||
|
UINT16 pIndex=0;
|
||||||
|
INT32 pocket=0;
|
||||||
|
UINT8 capacity=254;
|
||||||
|
|
||||||
|
for(UINT32 uiPos=ppStart; uiPos<ppStop; uiPos++){
|
||||||
|
if(pProfile->inv[icLBE[uiPos]]==0){
|
||||||
|
pIndex=LoadBearingEquipment[Item[icDefault[uiPos]].ubClassIndex].lbePocketIndex[icPocket[uiPos]];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
pIndex=LoadBearingEquipment[Item[pProfile->inv[icLBE[uiPos]]].ubClassIndex].lbePocketIndex[icPocket[uiPos]];
|
||||||
|
}
|
||||||
|
// Here's were we get complicated. We should look for the smallest pocket all items can fit in
|
||||||
|
if(LBEPocketType[pIndex].ItemCapacityPerSize[Item[usItem].ItemSize] >= iNumber &&
|
||||||
|
LBEPocketType[pIndex].ItemCapacityPerSize[Item[usItem].ItemSize] < capacity &&
|
||||||
|
pProfile->inv[uiPos] == 0) {
|
||||||
|
if((LBEPocketType[pIndex].pRestriction != 0 && LBEPocketType[pIndex].pRestriction == Item[usItem].usItemClass) ||
|
||||||
|
LBEPocketType[pIndex].pRestriction == 0) {
|
||||||
|
capacity = LBEPocketType[pIndex].ItemCapacityPerSize[Item[usItem].ItemSize];
|
||||||
|
pocket = uiPos;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(pocket!=0){
|
||||||
|
*cap=capacity;
|
||||||
|
return pocket;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
*cap=254;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
INT32 FirstFreeBigEnoughPocket(MERCPROFILESTRUCT *pProfile, UINT16 usItem, UINT8 ubHowMany)
|
INT32 FirstFreeBigEnoughPocket(MERCPROFILESTRUCT *pProfile, UINT16 usItem, UINT8 ubHowMany)
|
||||||
{
|
{
|
||||||
@@ -667,13 +1078,54 @@ INT32 FirstFreeBigEnoughPocket(MERCPROFILESTRUCT *pProfile, UINT16 usItem, UINT8
|
|||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CHRISL: This function will place objects anywhere it can. It tries to use active pockets but will use any pocket as a last resort
|
||||||
|
INT32 AnyFreeBigEnoughPocket(MERCPROFILESTRUCT *pProfile, INVNODE *tInv)
|
||||||
|
{
|
||||||
|
INT32 iSlot;
|
||||||
|
INT32 iPos;
|
||||||
|
UINT16 iSize, lbeCap, usItem;
|
||||||
|
|
||||||
|
iSlot = FirstFreeBigEnoughPocket (pProfile, tInv);
|
||||||
|
if(iSlot != -1)
|
||||||
|
return(iSlot);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* CHRISL: FAILSAFE: We can't find any active pockets to put this item. Rather then losing the item,
|
||||||
|
put it in any pocket using old inventory method. Player can then manually resort items later. */
|
||||||
|
usItem = tInv->inv;
|
||||||
|
iSize = Item[usItem].ubPerPocket;
|
||||||
|
lbeCap = max(1, (iSize/2));
|
||||||
|
for(iPos = BIGPOCKSTART; iPos < NUM_INV_SLOTS; iPos ++)
|
||||||
|
{
|
||||||
|
if(iPos >= MEDPOCKFINAL && iSize > 0)
|
||||||
|
return(-1);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(pProfile->inv[iPos] == NONE)
|
||||||
|
return(iPos);
|
||||||
|
else if(pProfile->inv[iPos] == usItem)
|
||||||
|
{
|
||||||
|
if((iPos < BIGPOCKFINAL && iSize >= (tInv->iNumber+1)) || (iPos >= BIGPOCKFINAL && lbeCap >= (tInv->iNumber+1)))
|
||||||
|
{
|
||||||
|
tInv->iNumber++;
|
||||||
|
return(iPos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return(-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void WriteOutCurrentImpCharacter( INT32 iProfileId )
|
void WriteOutCurrentImpCharacter( INT32 iProfileId )
|
||||||
{
|
{
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("WriteOutCurrentImpCharacter: IMP.dat"));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("WriteOutCurrentImpCharacter: IMP.dat"));
|
||||||
char zImpFileName[13];
|
char zImpFileName[13];
|
||||||
strcpy(zImpFileName,IMP_MERC_FILENAME);
|
strcpy(zImpFileName,IMP_MERC_FILENAME);
|
||||||
strcat(zImpFileName,IMP_FILENAME_SUFFIX);
|
// Changed by ADB, rev 1513, to resolve IMPs created prior to structural changes
|
||||||
|
//strcat(zImpFileName,IMP_FILENAME_SUFFIX);
|
||||||
|
strcat(zImpFileName,NEW_IMP_FILENAME_SUFFIX);
|
||||||
WriteOutCurrentImpCharacter ( iProfileId, zImpFileName);
|
WriteOutCurrentImpCharacter ( iProfileId, zImpFileName);
|
||||||
|
|
||||||
|
|
||||||
@@ -688,7 +1140,9 @@ void WriteOutCurrentImpCharacter( INT32 iProfileId )
|
|||||||
zFileName[i] = temp;
|
zFileName[i] = temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
strcat(zFileName,IMP_FILENAME_SUFFIX);
|
// Changed by ADB, rev 1513
|
||||||
|
//strcat(zFileName,IMP_FILENAME_SUFFIX);
|
||||||
|
strcat(zFileName,NEW_IMP_FILENAME_SUFFIX);
|
||||||
|
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("WriteOutCurrentImpCharacter: %s", zFileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("WriteOutCurrentImpCharacter: %s", zFileName));
|
||||||
WriteOutCurrentImpCharacter ( iProfileId, zFileName);
|
WriteOutCurrentImpCharacter ( iProfileId, zFileName);
|
||||||
@@ -704,6 +1158,23 @@ void WriteOutCurrentImpCharacter( INT32 iProfileId, STR fileName )
|
|||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("WriteOutCurrentImpCharacter: %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("WriteOutCurrentImpCharacter: %s", fileName));
|
||||||
hFile = FileOpen(fileName, FILE_ACCESS_WRITE | FILE_CREATE_ALWAYS, FALSE);
|
hFile = FileOpen(fileName, FILE_ACCESS_WRITE | FILE_CREATE_ALWAYS, FALSE);
|
||||||
|
|
||||||
|
// ADB we need to indicate that we have saved under the new format
|
||||||
|
int nine = 9999;
|
||||||
|
if (!FileWrite(hFile, &nine, sizeof( INT32 ), &uiBytesWritten))
|
||||||
|
{
|
||||||
|
if (hFile)
|
||||||
|
FileClose(hFile);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
int version = SAVE_GAME_VERSION;
|
||||||
|
if (!FileWrite(hFile, &version, sizeof( INT32 ), &uiBytesWritten))
|
||||||
|
{
|
||||||
|
if (hFile)
|
||||||
|
FileClose(hFile);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// write out the profile id
|
// write out the profile id
|
||||||
if (!FileWrite(hFile, &iProfileId, sizeof( INT32 ), &uiBytesWritten))
|
if (!FileWrite(hFile, &iProfileId, sizeof( INT32 ), &uiBytesWritten))
|
||||||
{
|
{
|
||||||
@@ -721,9 +1192,7 @@ void WriteOutCurrentImpCharacter( INT32 iProfileId, STR fileName )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// write out the profile itself
|
// write out the profile itself
|
||||||
// WDS - Clean up inventory handling
|
if ( !gMercProfiles[ iProfileId ].Save(hFile) )
|
||||||
gMercProfiles[ iProfileId ].CopyNewInventoryToOld();
|
|
||||||
if (!FileWrite(hFile, &gMercProfiles[ iProfileId ], SIZEOF_MERCPROFILESTRUCT_POD, &uiBytesWritten))
|
|
||||||
{
|
{
|
||||||
if (hFile)
|
if (hFile)
|
||||||
FileClose(hFile);
|
FileClose(hFile);
|
||||||
@@ -739,15 +1208,28 @@ void WriteOutCurrentImpCharacter( INT32 iProfileId, STR fileName )
|
|||||||
|
|
||||||
BOOLEAN ImpExists ( STR nickName )
|
BOOLEAN ImpExists ( STR nickName )
|
||||||
{
|
{
|
||||||
|
// Changed by ADB, rev 1513, to resolve IMPs created prior to structural changes
|
||||||
char zFileName[13];
|
char zFileName[13];
|
||||||
|
|
||||||
strcpy(zFileName,nickName);
|
strcpy(zFileName,nickName);
|
||||||
strcat(zFileName,IMP_FILENAME_SUFFIX);
|
//strcat(zFileName,IMP_FILENAME_SUFFIX);
|
||||||
|
strcat(zFileName,OLD_IMP_FILENAME_SUFFIX);
|
||||||
|
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("ImpExists: %s", zFileName));
|
//DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("ImpExists: %s", zFileName));
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("ImpExists: %d", FileExistsNoDB(zFileName) ));
|
//DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("ImpExists: %d", FileExistsNoDB(zFileName) ));
|
||||||
|
BOOLEAN oldExists = FileExistsNoDB(zFileName);
|
||||||
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("OLD ImpExists: %s", zFileName));
|
||||||
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("OLD ImpExists: %d", oldExists ));
|
||||||
|
|
||||||
return FileExistsNoDB(zFileName);
|
//return FileExistsNoDB(zFileName);
|
||||||
|
strcpy(zFileName,nickName);
|
||||||
|
strcat(zFileName,NEW_IMP_FILENAME_SUFFIX);
|
||||||
|
|
||||||
|
BOOLEAN newExists = FileExistsNoDB(zFileName);
|
||||||
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("NEW ImpExists: %s", zFileName));
|
||||||
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("NEW ImpExists: %d", newExists ));
|
||||||
|
|
||||||
|
return (oldExists || newExists);
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOLEAN LoadImpCharacter( STR nickName )
|
BOOLEAN LoadImpCharacter( STR nickName )
|
||||||
@@ -758,26 +1240,62 @@ BOOLEAN LoadImpCharacter( STR nickName )
|
|||||||
|
|
||||||
char zFileName[13];
|
char zFileName[13];
|
||||||
|
|
||||||
|
//ADB first try to load the new kind
|
||||||
strcpy(zFileName,nickName);
|
strcpy(zFileName,nickName);
|
||||||
strcat(zFileName,IMP_FILENAME_SUFFIX);
|
//strcat(zFileName,IMP_FILENAME_SUFFIX);
|
||||||
|
strcat(zFileName,NEW_IMP_FILENAME_SUFFIX);
|
||||||
|
|
||||||
// open the file for writing
|
// open the file for reading
|
||||||
hFile = FileOpen(zFileName, FILE_ACCESS_READ, FALSE);
|
hFile = FileOpen(zFileName, FILE_ACCESS_READ, FALSE);
|
||||||
|
|
||||||
// valid file?
|
// valid file?
|
||||||
if( hFile == -1 )
|
if( !hFile )
|
||||||
|
{
|
||||||
|
//DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 7 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
||||||
|
//return FALSE;
|
||||||
|
//if the new kind doesn't exist, load the old kind
|
||||||
|
strcpy(zFileName,nickName);
|
||||||
|
strcat(zFileName,OLD_IMP_FILENAME_SUFFIX);
|
||||||
|
|
||||||
|
// open the file for reading
|
||||||
|
hFile = FileOpen(zFileName, FILE_ACCESS_READ, FALSE);
|
||||||
|
|
||||||
|
// valid file?
|
||||||
|
if( !hFile )
|
||||||
|
{
|
||||||
|
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 7 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// read in the profile
|
||||||
|
if (!FileRead(hFile, &iProfileId, sizeof( INT32 ), &uiBytesRead))
|
||||||
{
|
{
|
||||||
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 7 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 7 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// read in the profile
|
int version = SAVE_GAME_VERSION;
|
||||||
|
bool isOldVersion = true;
|
||||||
|
if (iProfileId == 9999) {
|
||||||
|
//ADB if we saved under the original version, then iProfileId is some low number
|
||||||
|
//if we saved under the new version, then it's 9999, and we need to know what version it was saved under
|
||||||
|
isOldVersion = false;
|
||||||
|
|
||||||
|
//load the version, atm not used
|
||||||
|
if (!FileRead(hFile, &version, sizeof( INT32 ), &uiBytesRead))
|
||||||
|
{
|
||||||
|
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 7 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
//load the REAL iProfileId
|
||||||
if (!FileRead(hFile, &iProfileId, sizeof( INT32 ), &uiBytesRead))
|
if (!FileRead(hFile, &iProfileId, sizeof( INT32 ), &uiBytesRead))
|
||||||
{
|
{
|
||||||
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 7 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 7 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// read in the portrait
|
// read in the portrait
|
||||||
if (!FileRead(hFile, &iPortraitNumber ,sizeof( INT32 ), &uiBytesRead))
|
if (!FileRead(hFile, &iPortraitNumber ,sizeof( INT32 ), &uiBytesRead))
|
||||||
@@ -795,17 +1313,19 @@ BOOLEAN LoadImpCharacter( STR nickName )
|
|||||||
LaptopSaveInfo.iIMPIndex = iProfileId;
|
LaptopSaveInfo.iIMPIndex = iProfileId;
|
||||||
|
|
||||||
// read in the profile
|
// read in the profile
|
||||||
// WDS - Clean up inventory handling
|
//if ( !gMercProfiles[ iProfileId ].Load(hFile, false) )
|
||||||
if (!FileRead(hFile, &gMercProfiles[ iProfileId ] , SIZEOF_MERCPROFILESTRUCT_POD, &uiBytesRead))
|
if ( !gMercProfiles[ iProfileId ].Load(hFile, isOldVersion, false, false) )
|
||||||
{
|
{
|
||||||
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 7 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 7 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
gMercProfiles[ iProfileId ].CopyOldInventoryToNew();
|
|
||||||
|
|
||||||
// close file
|
// close file
|
||||||
FileClose(hFile);
|
FileClose(hFile);
|
||||||
|
|
||||||
|
//CHRISL: At this point, we need to resort profile inventory so that NewInv items don't accidentally appear in OldInv
|
||||||
|
DistributeInitialGear(&gMercProfiles[iProfileId]);
|
||||||
|
|
||||||
if( LaptopSaveInfo.iCurrentBalance < COST_OF_PROFILE )
|
if( LaptopSaveInfo.iCurrentBalance < COST_OF_PROFILE )
|
||||||
{
|
{
|
||||||
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 3 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 3 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
||||||
@@ -927,7 +1447,9 @@ void GiveIMPItems( MERCPROFILESTRUCT *pProfile, INT8 abilityValue, UINT8 typeInd
|
|||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("GiveIMPItems: 2 iChoice = %d",iChoice));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("GiveIMPItems: 2 iChoice = %d",iChoice));
|
||||||
usItem = gIMPItemChoices[ typeIndex ].bItemNo[ iChoice ];
|
usItem = gIMPItemChoices[ typeIndex ].bItemNo[ iChoice ];
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("GiveIMPItems: typeIndex = %d, usItem = %d, iChoice = %d, abilityValue = %d",typeIndex, usItem,iChoice, abilityValue ));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("GiveIMPItems: typeIndex = %d, usItem = %d, iChoice = %d, abilityValue = %d",typeIndex, usItem,iChoice, abilityValue ));
|
||||||
if ( usItem > 0 && ItemIsLegal(usItem))
|
//CHRISL: Let "illegal" guns be allowed so we don't have to worry about an IMP failing to start with a weapon simply
|
||||||
|
// because Tons of Guns was not selected.
|
||||||
|
if ( usItem > 0 && (ItemIsLegal(usItem) || Item[usItem].usItemClass == IC_GUN))
|
||||||
{
|
{
|
||||||
MakeProfileInvItemAnySlot(pProfile,usItem,100,1);
|
MakeProfileInvItemAnySlot(pProfile,usItem,100,1);
|
||||||
|
|
||||||
@@ -956,3 +1478,4 @@ void GiveIMPItems( MERCPROFILESTRUCT *pProfile, INT8 abilityValue, UINT8 typeInd
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -161,7 +161,6 @@ void DisplayPlayerActivationString( void )
|
|||||||
{
|
{
|
||||||
|
|
||||||
// this function will grab the string that the player will enter for activation
|
// this function will grab the string that the player will enter for activation
|
||||||
INT32 iCounter=0;
|
|
||||||
|
|
||||||
// player gone too far, move back
|
// player gone too far, move back
|
||||||
if(iStringPos > 64)
|
if(iStringPos > 64)
|
||||||
|
|||||||
@@ -339,8 +339,6 @@ void HandleIMPMainPage( void )
|
|||||||
//
|
//
|
||||||
void CreateIMPMainPageButtons( void )
|
void CreateIMPMainPageButtons( void )
|
||||||
{
|
{
|
||||||
UINT16 usPosX=0;
|
|
||||||
|
|
||||||
CHAR16 sString[ 128 ];
|
CHAR16 sString[ 128 ];
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -665,8 +665,8 @@ void AddSelectedSkillsToSkillsList()
|
|||||||
AddSkillToSkillList( KNIFING );
|
AddSkillToSkillList( KNIFING );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IMP_SKILL_TRAITS__ROOFTOP_SNIPING:
|
case IMP_SKILL_TRAITS__PROF_SNIPER:
|
||||||
AddSkillToSkillList( ONROOF );
|
AddSkillToSkillList( PROF_SNIPER );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IMP_SKILL_TRAITS__CAMO:
|
case IMP_SKILL_TRAITS__CAMO:
|
||||||
@@ -684,7 +684,6 @@ void AddSelectedSkillsToSkillsList()
|
|||||||
|
|
||||||
void HandleLastSelectedTraits( INT8 bNewTrait )
|
void HandleLastSelectedTraits( INT8 bNewTrait )
|
||||||
{
|
{
|
||||||
INT8 bTemp=-1;
|
|
||||||
//if there are none selected
|
//if there are none selected
|
||||||
if( gbLastSelectedTraits[ 0 ] == -1 )
|
if( gbLastSelectedTraits[ 0 ] == -1 )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ enum
|
|||||||
IMP_SKILL_TRAITS__STEALTHY,
|
IMP_SKILL_TRAITS__STEALTHY,
|
||||||
IMP_SKILL_TRAITS__AMBIDEXTROUS,
|
IMP_SKILL_TRAITS__AMBIDEXTROUS,
|
||||||
IMP_SKILL_TRAITS__KNIFING,
|
IMP_SKILL_TRAITS__KNIFING,
|
||||||
IMP_SKILL_TRAITS__ROOFTOP_SNIPING,
|
IMP_SKILL_TRAITS__PROF_SNIPER,
|
||||||
IMP_SKILL_TRAITS__CAMO,
|
IMP_SKILL_TRAITS__CAMO,
|
||||||
IMP_SKILL_TRAITS__MARTIAL_ARTS,
|
IMP_SKILL_TRAITS__MARTIAL_ARTS,
|
||||||
IMP_SKILL_TRAITS__NONE,
|
IMP_SKILL_TRAITS__NONE,
|
||||||
|
|||||||
@@ -49,9 +49,6 @@ void LoadAndDisplayIMPText( INT16 sStartX, INT16 sStartY, INT16 sLineLength, INT
|
|||||||
// this procedure will load and display to the screen starting at postion X, Y relative to the start of the laptop screen
|
// this procedure will load and display to the screen starting at postion X, Y relative to the start of the laptop screen
|
||||||
// it will access record sIMPTextRecordNumber and go until all records following it but before the next IMP record are displayed in font uiFont
|
// it will access record sIMPTextRecordNumber and go until all records following it but before the next IMP record are displayed in font uiFont
|
||||||
CHAR16 sString[ 1024 ];
|
CHAR16 sString[ 1024 ];
|
||||||
INT32 iCounter =0;
|
|
||||||
BOOLEAN fNotDonePrintingFlag = TRUE;
|
|
||||||
INT32 iRecordPosition = 0;
|
|
||||||
|
|
||||||
if( fShadow == FALSE )
|
if( fShadow == FALSE )
|
||||||
{
|
{
|
||||||
@@ -400,7 +397,6 @@ void OffSetQuestionForFemaleSpecificQuestions( INT32 *iCurrentOffset )
|
|||||||
{
|
{
|
||||||
INT32 iExtraOffSet = 0;
|
INT32 iExtraOffSet = 0;
|
||||||
BOOLEAN fOffSet = TRUE;
|
BOOLEAN fOffSet = TRUE;
|
||||||
INT32 iCounter = 0;
|
|
||||||
|
|
||||||
// find the extra
|
// find the extra
|
||||||
switch( giCurrentPersonalityQuizQuestion )
|
switch( giCurrentPersonalityQuizQuestion )
|
||||||
|
|||||||
@@ -93,7 +93,6 @@ void RenderProfileBackGround( void )
|
|||||||
{
|
{
|
||||||
|
|
||||||
HVOBJECT hHandle;
|
HVOBJECT hHandle;
|
||||||
INT32 iCurrentHeight = 0;
|
|
||||||
INT32 iCounter = 0;
|
INT32 iCounter = 0;
|
||||||
|
|
||||||
// this procedure will render the generic backgound to the screen
|
// this procedure will render the generic backgound to the screen
|
||||||
@@ -1423,3 +1422,4 @@ void RenderQtnShort2IndentHighFrame(INT16 sX, INT16 sY)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+6
-1
@@ -1,10 +1,15 @@
|
|||||||
#ifndef _LAPTOP_SAVE_H_
|
#ifndef _LAPTOP_SAVE_H_
|
||||||
#define _LAPTOP_SAVE_H_
|
#define _LAPTOP_SAVE_H_
|
||||||
|
|
||||||
#include "Item Types.h"
|
//#include "Item Types.h"
|
||||||
#include "FileMan.h"
|
#include "FileMan.h"
|
||||||
#include "Store Inventory.h"
|
#include "Store Inventory.h"
|
||||||
|
|
||||||
|
//forward declarations of common classes to eliminate includes
|
||||||
|
class OBJECTTYPE;
|
||||||
|
class SOLDIERTYPE;
|
||||||
|
|
||||||
|
|
||||||
#define MAX_BOOKMARKS 20
|
#define MAX_BOOKMARKS 20
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
<VisualStudioProject
|
<VisualStudioProject
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="8,00"
|
Version="8.00"
|
||||||
Name="Laptop_2005Express"
|
Name="Laptop_2005Express"
|
||||||
ProjectGUID="{5234CD2E-97F1-42FF-828D-CE0A1B46805E}"
|
ProjectGUID="{5234CD2E-97F1-42FF-828D-CE0A1B46805E}"
|
||||||
RootNamespace="Laptop_2005Express"
|
RootNamespace="Laptop_2005Express"
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
AdditionalOptions="/D "_CRT_SECURE_NO_DEPRECATE"
"
|
AdditionalOptions="/D "_CRT_SECURE_NO_DEPRECATE""
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;"
|
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="true"
|
||||||
@@ -103,7 +103,6 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
AdditionalOptions="/D "_CRT_SECURE_NO_DEPRECATE""
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;"
|
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;"
|
||||||
RuntimeLibrary="0"
|
RuntimeLibrary="0"
|
||||||
RuntimeTypeInfo="false"
|
RuntimeTypeInfo="false"
|
||||||
@@ -139,6 +138,69 @@
|
|||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
/>
|
/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="MapEditor|Win32"
|
||||||
|
OutputDirectory="MapEditor"
|
||||||
|
IntermediateDirectory="MapEditor"
|
||||||
|
ConfigurationType="4"
|
||||||
|
InheritedPropertySheets="..\ja2_2005Express.vsprops;..\ja2_2005ExpressEditor.vsprops"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="1"
|
||||||
|
RuntimeTypeInfo="false"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
DisableSpecificWarnings="4100"
|
||||||
|
/>
|
||||||
|
<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>
|
</Configurations>
|
||||||
<References>
|
<References>
|
||||||
</References>
|
</References>
|
||||||
|
|||||||
@@ -880,9 +880,6 @@ STORE_INVENTORY *GetPtrToStoreInventory( UINT8 ubDealerID )
|
|||||||
return( LaptopSaveInfo.BobbyRayUsedInventory );
|
return( LaptopSaveInfo.BobbyRayUsedInventory );
|
||||||
else
|
else
|
||||||
Assert( 0 );
|
Assert( 0 );
|
||||||
// else
|
|
||||||
// return( gArmsDealersInventory[ ubDealerID - TONYS_ITEMS ] );
|
|
||||||
|
|
||||||
|
|
||||||
return( NULL );
|
return( NULL );
|
||||||
}
|
}
|
||||||
@@ -922,3 +919,4 @@ INT16 CountNumberOfItemsInStoreInventory( UINT8 ubArmsDealerID )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+2
-3
@@ -856,7 +856,7 @@ BOOLEAN DrawWarningBox( BOOLEAN fInit, BOOLEAN fRedraw )
|
|||||||
{
|
{
|
||||||
CHAR16 sText[400];
|
CHAR16 sText[400];
|
||||||
UINT32 uiStartLoc=0;
|
UINT32 uiStartLoc=0;
|
||||||
UINT16 usLocY = AIM_WARNING_TEXT_Y + (GetFontHeight(AIM_WARNING_FONT) + 2) * 2;
|
//UINT16 usLocY = AIM_WARNING_TEXT_Y + (GetFontHeight(AIM_WARNING_FONT) + 2) * 2;
|
||||||
HVOBJECT hWarningHandle;
|
HVOBJECT hWarningHandle;
|
||||||
|
|
||||||
//Warning
|
//Warning
|
||||||
@@ -1220,8 +1220,6 @@ UINT8 GetNextAimAd( UINT8 ubCurrentAd )
|
|||||||
{
|
{
|
||||||
UINT8 ubNextAd;
|
UINT8 ubNextAd;
|
||||||
UINT32 uiDay = GetWorldDay();
|
UINT32 uiDay = GetWorldDay();
|
||||||
BOOLEAN fSkip=FALSE;
|
|
||||||
|
|
||||||
if( ubCurrentAd == AIM_AD_WARNING_BOX )
|
if( ubCurrentAd == AIM_AD_WARNING_BOX )
|
||||||
{
|
{
|
||||||
if( uiDay < AIM_AD_BOBBYR_AD_STARTS )
|
if( uiDay < AIM_AD_BOBBYR_AD_STARTS )
|
||||||
@@ -1260,3 +1258,4 @@ UINT8 GetNextAimAd( UINT8 ubCurrentAd )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+7
-32
@@ -604,7 +604,6 @@ void DisplayEmailHeaders( void )
|
|||||||
void RenderEmail( void )
|
void RenderEmail( void )
|
||||||
{
|
{
|
||||||
HVOBJECT hHandle;
|
HVOBJECT hHandle;
|
||||||
INT32 iCounter=0;
|
|
||||||
|
|
||||||
// get and blt the email list background
|
// get and blt the email list background
|
||||||
GetVideoObject( &hHandle, guiEmailBackground );
|
GetVideoObject( &hHandle, guiEmailBackground );
|
||||||
@@ -662,8 +661,6 @@ void AddEmailWithSpecialData(INT32 iMessageOffset, INT32 iMessageLength, UINT8 u
|
|||||||
//MessagePtr pMessageList;
|
//MessagePtr pMessageList;
|
||||||
//MessagePtr pMessage;
|
//MessagePtr pMessage;
|
||||||
//CHAR16 pMessageString[320];
|
//CHAR16 pMessageString[320];
|
||||||
INT32 iPosition=0;
|
|
||||||
INT32 iCounter=1;
|
|
||||||
Email FakeEmail;
|
Email FakeEmail;
|
||||||
|
|
||||||
|
|
||||||
@@ -697,8 +694,7 @@ void AddEmail(INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender, INT32
|
|||||||
//MessagePtr pMessageList;
|
//MessagePtr pMessageList;
|
||||||
//MessagePtr pMessage;
|
//MessagePtr pMessage;
|
||||||
//CHAR16 pMessageString[320];
|
//CHAR16 pMessageString[320];
|
||||||
INT32 iPosition=0;
|
|
||||||
INT32 iCounter=1;
|
|
||||||
|
|
||||||
// WANNE: Short work in both ways
|
// WANNE: Short work in both ways
|
||||||
LoadEncryptedDataFromFile("BINARYDATA\\Email.edt", pSubject, 640*(iMessageOffset), 640);
|
LoadEncryptedDataFromFile("BINARYDATA\\Email.edt", pSubject, 640*(iMessageOffset), 640);
|
||||||
@@ -723,8 +719,6 @@ void AddPreReadEmail(INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender,
|
|||||||
//MessagePtr pMessageList;
|
//MessagePtr pMessageList;
|
||||||
//MessagePtr pMessage;
|
//MessagePtr pMessage;
|
||||||
//CHAR16 pMessageString[320];
|
//CHAR16 pMessageString[320];
|
||||||
INT32 iPosition=0;
|
|
||||||
INT32 iCounter=1;
|
|
||||||
|
|
||||||
|
|
||||||
// starts at iSubjectOffset amd goes iSubjectLength, reading in string
|
// starts at iSubjectOffset amd goes iSubjectLength, reading in string
|
||||||
@@ -749,7 +743,6 @@ void AddEmailMessage(INT32 iMessageOffset, INT32 iMessageLength,STR16 pSubject,
|
|||||||
// will add a message to the list of messages
|
// will add a message to the list of messages
|
||||||
EmailPtr pEmail=pEmailList;
|
EmailPtr pEmail=pEmailList;
|
||||||
EmailPtr pTempEmail=NULL;
|
EmailPtr pTempEmail=NULL;
|
||||||
UINT32 iCounter=0;
|
|
||||||
INT32 iId=0;
|
INT32 iId=0;
|
||||||
|
|
||||||
// run through list of messages, get id of oldest message
|
// run through list of messages, get id of oldest message
|
||||||
@@ -852,7 +845,6 @@ void RemoveEmailMessage(INT32 iId)
|
|||||||
// run through list and remove message, update everyone afterwards
|
// run through list and remove message, update everyone afterwards
|
||||||
EmailPtr pEmail=pEmailList;
|
EmailPtr pEmail=pEmailList;
|
||||||
EmailPtr pTempEmail=NULL;
|
EmailPtr pTempEmail=NULL;
|
||||||
INT32 iCounter=0;
|
|
||||||
|
|
||||||
|
|
||||||
// error check
|
// error check
|
||||||
@@ -869,7 +861,7 @@ void RemoveEmailMessage(INT32 iId)
|
|||||||
return;
|
return;
|
||||||
// found
|
// found
|
||||||
|
|
||||||
// set tempt o current
|
// set tempt object current
|
||||||
pTempEmail=pEmail;
|
pTempEmail=pEmail;
|
||||||
|
|
||||||
// check position of message in list
|
// check position of message in list
|
||||||
@@ -1089,7 +1081,6 @@ void SortMessages(INT32 iCriteria)
|
|||||||
EmailPtr pB=pEmailList;
|
EmailPtr pB=pEmailList;
|
||||||
CHAR16 pSubjectA[256];
|
CHAR16 pSubjectA[256];
|
||||||
CHAR16 pSubjectB[256];
|
CHAR16 pSubjectB[256];
|
||||||
INT32 iId=0;
|
|
||||||
|
|
||||||
// no messages to sort?
|
// no messages to sort?
|
||||||
if( ( pA == NULL) ||( pB == NULL ) )
|
if( ( pA == NULL) ||( pB == NULL ) )
|
||||||
@@ -1552,7 +1543,6 @@ void EmailBtnCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
|||||||
INT32 iCount;
|
INT32 iCount;
|
||||||
PagePtr pPage=pPageList;
|
PagePtr pPage=pPageList;
|
||||||
INT32 iId=0;
|
INT32 iId=0;
|
||||||
EmailPtr pEmail=NULL;
|
|
||||||
if (iReason & MSYS_CALLBACK_REASON_INIT)
|
if (iReason & MSYS_CALLBACK_REASON_INIT)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@@ -1708,20 +1698,12 @@ SetUnNewMessages()
|
|||||||
INT32 DisplayEmailMessage(EmailPtr pMail)
|
INT32 DisplayEmailMessage(EmailPtr pMail)
|
||||||
{
|
{
|
||||||
HVOBJECT hHandle;
|
HVOBJECT hHandle;
|
||||||
INT32 iCnt=0;
|
|
||||||
INT32 iHeight=0;
|
INT32 iHeight=0;
|
||||||
INT32 iCounter=1;
|
INT32 iCounter=1;
|
||||||
// CHAR16 pString[MAIL_STRING_SIZE/2 + 1];
|
// CHAR16 pString[MAIL_STRING_SIZE/2 + 1];
|
||||||
CHAR16 pString[MAIL_STRING_SIZE];
|
CHAR16 pString[MAIL_STRING_SIZE];
|
||||||
INT32 iOffSet=0;
|
INT32 iOffSet=0;
|
||||||
INT32 iHeightTemp=0;
|
|
||||||
INT32 iHeightSoFar = 0;
|
|
||||||
RecordPtr pTempRecord;
|
RecordPtr pTempRecord;
|
||||||
INT32 iPageSize = 0;
|
|
||||||
INT32 iPastHeight=0;
|
|
||||||
INT32 iYPositionOnPage = 0;
|
|
||||||
INT32 iTotalYPosition = 0;
|
|
||||||
BOOLEAN fGoingOffCurrentPage = FALSE;
|
|
||||||
BOOLEAN fDonePrintingMessage = FALSE;
|
BOOLEAN fDonePrintingMessage = FALSE;
|
||||||
|
|
||||||
|
|
||||||
@@ -3262,8 +3244,8 @@ BOOLEAN HandleMailSpecialMessages( UINT16 usMessageId, INT32 *iResults, EmailPtr
|
|||||||
|
|
||||||
// WANNE: These 2 skills are missing in the email!
|
// WANNE: These 2 skills are missing in the email!
|
||||||
// The problem is, that there is no description in binarydata\impass.edt
|
// The problem is, that there is no description in binarydata\impass.edt
|
||||||
#define IMP_SKILLS_SPECIAL_ONROOF IMP_SKILLS_SPECIAL_KNIFE + 1
|
#define IMP_SKILLS_SPECIAL_SNIPER IMP_SKILLS_SPECIAL_KNIFE + 1
|
||||||
#define IMP_SKILLS_SPECIAL_CAMOUFLAGED IMP_SKILLS_SPECIAL_ONROOF + 1
|
#define IMP_SKILLS_SPECIAL_CAMOUFLAGED IMP_SKILLS_SPECIAL_SNIPER + 1
|
||||||
|
|
||||||
#define IMP_RESULTS_PHYSICAL IMP_SKILLS_SPECIAL_KNIFE + 1
|
#define IMP_RESULTS_PHYSICAL IMP_SKILLS_SPECIAL_KNIFE + 1
|
||||||
#define IMP_RESULTS_PHYSICAL_LENGTH 7
|
#define IMP_RESULTS_PHYSICAL_LENGTH 7
|
||||||
@@ -3328,16 +3310,11 @@ BOOLEAN HandleMailSpecialMessages( UINT16 usMessageId, INT32 *iResults, EmailPtr
|
|||||||
void HandleIMPCharProfileResultsMessage( void)
|
void HandleIMPCharProfileResultsMessage( void)
|
||||||
{
|
{
|
||||||
// special case, IMP profile return
|
// special case, IMP profile return
|
||||||
INT32 iTotalHeight=0;
|
|
||||||
INT32 iCnt=0;
|
|
||||||
INT32 iHeight=0;
|
INT32 iHeight=0;
|
||||||
INT32 iCounter=0;
|
INT32 iCounter=0;
|
||||||
// CHAR16 pString[MAIL_STRING_SIZE/2 + 1];
|
// CHAR16 pString[MAIL_STRING_SIZE/2 + 1];
|
||||||
CHAR16 pString[MAIL_STRING_SIZE];
|
CHAR16 pString[MAIL_STRING_SIZE];
|
||||||
INT32 iOffSet=0;
|
INT32 iOffSet=0;
|
||||||
INT32 iViewerY=0;
|
|
||||||
INT32 iHeightTemp=0;
|
|
||||||
INT32 iHeightSoFar = 0;
|
|
||||||
RecordPtr pTempRecord;
|
RecordPtr pTempRecord;
|
||||||
INT32 iEndOfSection =0;
|
INT32 iEndOfSection =0;
|
||||||
INT32 iRand = 0;
|
INT32 iRand = 0;
|
||||||
@@ -3939,7 +3916,7 @@ void HandleIMPCharProfileResultsMessage( void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// rooftop
|
// rooftop
|
||||||
if( ( gMercProfiles[ iCurrentIMPSlot ].bSkillTrait == ONROOF )||( gMercProfiles[ iCurrentIMPSlot ].bSkillTrait2 == ONROOF ) )
|
if( ( gMercProfiles[ iCurrentIMPSlot ].bSkillTrait == PROF_SNIPER )||( gMercProfiles[ iCurrentIMPSlot ].bSkillTrait2 == PROF_SNIPER ) )
|
||||||
{
|
{
|
||||||
// WANNE: No entry in the Impass.edt for rooftop, so add any static text here
|
// WANNE: No entry in the Impass.edt for rooftop, so add any static text here
|
||||||
// read one record from email file
|
// read one record from email file
|
||||||
@@ -3950,7 +3927,7 @@ void HandleIMPCharProfileResultsMessage( void)
|
|||||||
//#ifdef GERMAN
|
//#ifdef GERMAN
|
||||||
// wcscpy(pString, L"Dach-Treffer Bonus: <Noch keine Beschreibung vorhanden>");
|
// wcscpy(pString, L"Dach-Treffer Bonus: <Noch keine Beschreibung vorhanden>");
|
||||||
//#else
|
//#else
|
||||||
//wcscpy(pString, L"Rooftop Sniping: <No description yet>");
|
//wcscpy(pString, L"Sniper: <No description yet>");
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
// add to list
|
// add to list
|
||||||
@@ -4676,9 +4653,6 @@ void OpenMostRecentUnreadEmail( void )
|
|||||||
BOOLEAN DisplayNumberOfPagesToThisEmail( INT32 iViewerY )
|
BOOLEAN DisplayNumberOfPagesToThisEmail( INT32 iViewerY )
|
||||||
{
|
{
|
||||||
// display the indent for the display of pages to this email..along with the current page/number of pages
|
// display the indent for the display of pages to this email..along with the current page/number of pages
|
||||||
|
|
||||||
|
|
||||||
INT32 iCounter=0;
|
|
||||||
INT16 sX = 0, sY = 0;
|
INT16 sX = 0, sY = 0;
|
||||||
CHAR16 sString[ 32 ];
|
CHAR16 sString[ 32 ];
|
||||||
|
|
||||||
@@ -5336,3 +5310,4 @@ void AddAllEmails()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-6
@@ -320,7 +320,6 @@ void RenderFilesBackGround( void )
|
|||||||
{
|
{
|
||||||
// render generic background for file system
|
// render generic background for file system
|
||||||
HVOBJECT hHandle;
|
HVOBJECT hHandle;
|
||||||
INT32 iCounter=0;
|
|
||||||
|
|
||||||
// get title bar object
|
// get title bar object
|
||||||
GetVideoObject(&hHandle, guiTITLE);
|
GetVideoObject(&hHandle, guiTITLE);
|
||||||
@@ -560,7 +559,6 @@ BOOLEAN OpenAndWriteFilesFile( void )
|
|||||||
{
|
{
|
||||||
// this procedure will open and write out data from the finance list
|
// this procedure will open and write out data from the finance list
|
||||||
HWFILE hFileHandle;
|
HWFILE hFileHandle;
|
||||||
INT32 iBytesWritten=0;
|
|
||||||
FilesUnitPtr pFilesList=pFilesListHead;
|
FilesUnitPtr pFilesList=pFilesListHead;
|
||||||
CHAR8 pFirstFilePath[128];
|
CHAR8 pFirstFilePath[128];
|
||||||
CHAR8 pSecondFilePath[128];
|
CHAR8 pSecondFilePath[128];
|
||||||
@@ -647,7 +645,6 @@ void ClearFilesList( void )
|
|||||||
void DrawFilesListBackGround( void )
|
void DrawFilesListBackGround( void )
|
||||||
{
|
{
|
||||||
// proceudre will draw the background for the list of files
|
// proceudre will draw the background for the list of files
|
||||||
INT32 iCounter=7;
|
|
||||||
// HVOBJECT hHandle;
|
// HVOBJECT hHandle;
|
||||||
|
|
||||||
// now the columns
|
// now the columns
|
||||||
@@ -811,7 +808,6 @@ BOOLEAN DisplayFormattedText( void )
|
|||||||
UINT16 usFirstHeight = 0;
|
UINT16 usFirstHeight = 0;
|
||||||
UINT16 usSecondWidth;
|
UINT16 usSecondWidth;
|
||||||
UINT16 usSecondHeight;
|
UINT16 usSecondHeight;
|
||||||
INT16 sTextWidth = 0;
|
|
||||||
INT32 iCounter=0;
|
INT32 iCounter=0;
|
||||||
INT32 iLength=0;
|
INT32 iLength=0;
|
||||||
INT32 iHeight=0;
|
INT32 iHeight=0;
|
||||||
@@ -1017,7 +1013,6 @@ BOOLEAN HandleSpecialFiles( UINT8 ubFormat )
|
|||||||
CHAR16 sString[2048];
|
CHAR16 sString[2048];
|
||||||
FileStringPtr pTempString = NULL ;
|
FileStringPtr pTempString = NULL ;
|
||||||
FileStringPtr pLocatorString = NULL;
|
FileStringPtr pLocatorString = NULL;
|
||||||
INT32 iTotalYPosition = 0;
|
|
||||||
INT32 iYPositionOnPage = 0;
|
INT32 iYPositionOnPage = 0;
|
||||||
INT32 iFileLineWidth = 0;
|
INT32 iFileLineWidth = 0;
|
||||||
INT32 iFileStartX = 0;
|
INT32 iFileStartX = 0;
|
||||||
@@ -1645,7 +1640,6 @@ BOOLEAN HandleSpecialTerroristFile( INT32 iFileNumber, STR sPictureName )
|
|||||||
CHAR16 sString[2048];
|
CHAR16 sString[2048];
|
||||||
FileStringPtr pTempString = NULL ;
|
FileStringPtr pTempString = NULL ;
|
||||||
FileStringPtr pLocatorString = NULL;
|
FileStringPtr pLocatorString = NULL;
|
||||||
INT32 iTotalYPosition = 0;
|
|
||||||
INT32 iYPositionOnPage = 0;
|
INT32 iYPositionOnPage = 0;
|
||||||
INT32 iFileLineWidth = 0;
|
INT32 iFileLineWidth = 0;
|
||||||
INT32 iFileStartX = 0;
|
INT32 iFileStartX = 0;
|
||||||
@@ -1834,3 +1828,4 @@ BOOLEAN AddFileAboutTerrorist( INT32 iProfileId )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-18
@@ -184,7 +184,6 @@ UINT32 AddTransactionToPlayersBook (UINT8 ubCode, UINT8 ubSecondCode, UINT32 uiD
|
|||||||
// adds transaction to player's book(Financial List), returns unique id number of it
|
// adds transaction to player's book(Financial List), returns unique id number of it
|
||||||
// outside of the financial system(the code in this .c file), this is the only function you'll ever need
|
// outside of the financial system(the code in this .c file), this is the only function you'll ever need
|
||||||
|
|
||||||
INT32 iCurPage = iCurrentPage;
|
|
||||||
UINT32 uiId=0;
|
UINT32 uiId=0;
|
||||||
FinanceUnitPtr pFinance=pFinanceListHead;
|
FinanceUnitPtr pFinance=pFinanceListHead;
|
||||||
|
|
||||||
@@ -590,7 +589,6 @@ void RenderBackGround( void )
|
|||||||
{
|
{
|
||||||
// render generic background for Finance system
|
// render generic background for Finance system
|
||||||
HVOBJECT hHandle;
|
HVOBJECT hHandle;
|
||||||
INT32 iCounter=0;
|
|
||||||
|
|
||||||
// get title bar object
|
// get title bar object
|
||||||
GetVideoObject(&hHandle, guiTITLE);
|
GetVideoObject(&hHandle, guiTITLE);
|
||||||
@@ -638,8 +636,6 @@ void DrawSummaryLines( void )
|
|||||||
void DrawAPageOfRecords( void )
|
void DrawAPageOfRecords( void )
|
||||||
{
|
{
|
||||||
// this procedure will draw a series of financial records to the screen
|
// this procedure will draw a series of financial records to the screen
|
||||||
INT32 iCurPage=1;
|
|
||||||
INT32 iCount=0;
|
|
||||||
pCurrentFinance=pFinanceListHead;
|
pCurrentFinance=pFinanceListHead;
|
||||||
|
|
||||||
// (re-)render background
|
// (re-)render background
|
||||||
@@ -1548,7 +1544,6 @@ void DisplayFinancePageNumberAndDateRange( void )
|
|||||||
{
|
{
|
||||||
// this function will go through the list of 'histories' starting at current until end or
|
// this function will go through the list of 'histories' starting at current until end or
|
||||||
// MAX_PER_PAGE...it will get the date range and the page number
|
// MAX_PER_PAGE...it will get the date range and the page number
|
||||||
INT32 iLastPage=0;
|
|
||||||
INT32 iCounter=0;
|
INT32 iCounter=0;
|
||||||
UINT32 uiLastDate;
|
UINT32 uiLastDate;
|
||||||
FinanceUnitPtr pTempFinance=pFinanceListHead;
|
FinanceUnitPtr pTempFinance=pFinanceListHead;
|
||||||
@@ -1594,8 +1589,6 @@ BOOLEAN WriteBalanceToDisk( void )
|
|||||||
{
|
{
|
||||||
// will write the current balance to disk
|
// will write the current balance to disk
|
||||||
HWFILE hFileHandle;
|
HWFILE hFileHandle;
|
||||||
INT32 iBytesWritten=0;
|
|
||||||
FinanceUnitPtr pFinanceList=pFinanceListHead;
|
|
||||||
|
|
||||||
|
|
||||||
// open file
|
// open file
|
||||||
@@ -1650,7 +1643,6 @@ BOOLEAN AppendFinanceToEndOfFile( FinanceUnitPtr pFinance )
|
|||||||
{
|
{
|
||||||
// will write the current finance to disk
|
// will write the current finance to disk
|
||||||
HWFILE hFileHandle;
|
HWFILE hFileHandle;
|
||||||
INT32 iBytesWritten=0;
|
|
||||||
FinanceUnitPtr pFinanceList=pFinanceListHead;
|
FinanceUnitPtr pFinanceList=pFinanceListHead;
|
||||||
|
|
||||||
|
|
||||||
@@ -1695,7 +1687,6 @@ UINT32 ReadInLastElementOfFinanceListAndReturnIdNumber( void )
|
|||||||
|
|
||||||
|
|
||||||
HWFILE hFileHandle;
|
HWFILE hFileHandle;
|
||||||
INT32 iBytesRead=0;
|
|
||||||
INT32 iFileSize = 0;
|
INT32 iFileSize = 0;
|
||||||
|
|
||||||
// no file, return
|
// no file, return
|
||||||
@@ -1736,7 +1727,6 @@ void SetLastPageInRecords( void )
|
|||||||
{
|
{
|
||||||
// grabs the size of the file and interprets number of pages it will take up
|
// grabs the size of the file and interprets number of pages it will take up
|
||||||
HWFILE hFileHandle;
|
HWFILE hFileHandle;
|
||||||
INT32 iBytesRead=0;
|
|
||||||
|
|
||||||
// no file, return
|
// no file, return
|
||||||
if ( ! (FileExists( FINANCES_DATA_FILE ) ) )
|
if ( ! (FileExists( FINANCES_DATA_FILE ) ) )
|
||||||
@@ -2053,7 +2043,6 @@ INT32 GetPreviousBalanceToDate( void )
|
|||||||
INT32 GetPreviousDaysBalance( void )
|
INT32 GetPreviousDaysBalance( void )
|
||||||
{
|
{
|
||||||
// find out what today is, then go back 2 days, get balance for that day
|
// find out what today is, then go back 2 days, get balance for that day
|
||||||
INT32 iPreviousDaysBalance = 0;
|
|
||||||
HWFILE hFileHandle;
|
HWFILE hFileHandle;
|
||||||
INT32 iBytesRead=0;
|
INT32 iBytesRead=0;
|
||||||
UINT32 iDateInMinutes = 0;
|
UINT32 iDateInMinutes = 0;
|
||||||
@@ -2066,7 +2055,6 @@ INT32 GetPreviousDaysBalance( void )
|
|||||||
INT32 iAmount;
|
INT32 iAmount;
|
||||||
INT32 iBalanceToDate = 0;
|
INT32 iBalanceToDate = 0;
|
||||||
BOOLEAN fGoneTooFar= FALSE;
|
BOOLEAN fGoneTooFar= FALSE;
|
||||||
INT32 iFileSize = 0;
|
|
||||||
|
|
||||||
// what day is it?
|
// what day is it?
|
||||||
iDateInMinutes = GetWorldTotalMin( ) - ( 60 * 24 );
|
iDateInMinutes = GetWorldTotalMin( ) - ( 60 * 24 );
|
||||||
@@ -2146,7 +2134,6 @@ INT32 GetPreviousDaysBalance( void )
|
|||||||
INT32 GetTodaysBalance( void )
|
INT32 GetTodaysBalance( void )
|
||||||
{
|
{
|
||||||
// find out what today is, then go back 2 days, get balance for that day
|
// find out what today is, then go back 2 days, get balance for that day
|
||||||
INT32 iPreviousDaysBalance = 0;
|
|
||||||
HWFILE hFileHandle;
|
HWFILE hFileHandle;
|
||||||
INT32 iBytesRead=0;
|
INT32 iBytesRead=0;
|
||||||
UINT32 iDateInMinutes = 0;
|
UINT32 iDateInMinutes = 0;
|
||||||
@@ -2228,7 +2215,6 @@ INT32 GetPreviousDaysIncome( void )
|
|||||||
{
|
{
|
||||||
// will return the income from the previous day
|
// will return the income from the previous day
|
||||||
// which is todays starting balance - yesterdays starting balance
|
// which is todays starting balance - yesterdays starting balance
|
||||||
INT32 iPreviousDaysBalance = 0;
|
|
||||||
HWFILE hFileHandle;
|
HWFILE hFileHandle;
|
||||||
INT32 iBytesRead=0;
|
INT32 iBytesRead=0;
|
||||||
UINT32 iDateInMinutes = 0;
|
UINT32 iDateInMinutes = 0;
|
||||||
@@ -2329,7 +2315,6 @@ INT32 GetTodaysDaysIncome( void )
|
|||||||
{
|
{
|
||||||
// will return the income from the previous day
|
// will return the income from the previous day
|
||||||
// which is todays starting balance - yesterdays starting balance
|
// which is todays starting balance - yesterdays starting balance
|
||||||
INT32 iPreviousDaysBalance = 0;
|
|
||||||
HWFILE hFileHandle;
|
HWFILE hFileHandle;
|
||||||
INT32 iBytesRead=0;
|
INT32 iBytesRead=0;
|
||||||
UINT32 iDateInMinutes = 0;
|
UINT32 iDateInMinutes = 0;
|
||||||
@@ -2461,7 +2446,6 @@ INT32 GetTodaysOtherDeposits( void )
|
|||||||
{
|
{
|
||||||
// grab todays other deposits
|
// grab todays other deposits
|
||||||
|
|
||||||
INT32 iPreviousDaysBalance = 0;
|
|
||||||
HWFILE hFileHandle;
|
HWFILE hFileHandle;
|
||||||
INT32 iBytesRead=0;
|
INT32 iBytesRead=0;
|
||||||
UINT32 iDateInMinutes = 0;
|
UINT32 iDateInMinutes = 0;
|
||||||
@@ -2558,8 +2542,6 @@ INT32 GetTodaysOtherDeposits( void )
|
|||||||
|
|
||||||
INT32 GetYesterdaysOtherDeposits( void )
|
INT32 GetYesterdaysOtherDeposits( void )
|
||||||
{
|
{
|
||||||
|
|
||||||
INT32 iPreviousDaysBalance = 0;
|
|
||||||
HWFILE hFileHandle;
|
HWFILE hFileHandle;
|
||||||
INT32 iBytesRead=0;
|
INT32 iBytesRead=0;
|
||||||
UINT32 iDateInMinutes = 0;
|
UINT32 iDateInMinutes = 0;
|
||||||
@@ -2713,3 +2695,4 @@ void LoadCurrentBalance( void )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -419,3 +419,4 @@ void ChangingFloristGallerySubPage( UINT8 ubSubPageNumber )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -300,3 +300,4 @@ void SelectFloristTitleHomeLinkRegionCallBack(MOUSE_REGION * pRegion, INT32 iRea
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -353,3 +353,4 @@ void SelectRipSignRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-15
@@ -378,7 +378,6 @@ void RenderHistoryBackGround( void )
|
|||||||
{
|
{
|
||||||
// render generic background for history system
|
// render generic background for history system
|
||||||
HVOBJECT hHandle;
|
HVOBJECT hHandle;
|
||||||
INT32 iCounter=0;
|
|
||||||
|
|
||||||
// get title bar object
|
// get title bar object
|
||||||
GetVideoObject(&hHandle, guiTITLE);
|
GetVideoObject(&hHandle, guiTITLE);
|
||||||
@@ -507,9 +506,6 @@ void BtnHistoryDisplayNextPageCallBack(GUI_BUTTON *btn,INT32 reason)
|
|||||||
BOOLEAN IncrementCurrentPageHistoryDisplay( void )
|
BOOLEAN IncrementCurrentPageHistoryDisplay( void )
|
||||||
{
|
{
|
||||||
// run through list, from pCurrentHistory, to NUM_RECORDS_PER_PAGE +1 HistoryUnits
|
// run through list, from pCurrentHistory, to NUM_RECORDS_PER_PAGE +1 HistoryUnits
|
||||||
HistoryUnitPtr pTempHistory=pCurrentHistory;
|
|
||||||
BOOLEAN fOkToIncrementPage=FALSE;
|
|
||||||
INT32 iCounter=0;
|
|
||||||
HWFILE hFileHandle;
|
HWFILE hFileHandle;
|
||||||
UINT32 uiFileSize=0;
|
UINT32 uiFileSize=0;
|
||||||
UINT32 uiSizeOfRecordsOnEachPage = 0;
|
UINT32 uiSizeOfRecordsOnEachPage = 0;
|
||||||
@@ -699,7 +695,6 @@ BOOLEAN OpenAndWriteHistoryFile( void )
|
|||||||
// this procedure will open and write out data from the History list
|
// this procedure will open and write out data from the History list
|
||||||
|
|
||||||
HWFILE hFileHandle;
|
HWFILE hFileHandle;
|
||||||
INT32 iBytesWritten=0;
|
|
||||||
HistoryUnitPtr pHistoryList=pHistoryListHead;
|
HistoryUnitPtr pHistoryList=pHistoryListHead;
|
||||||
|
|
||||||
|
|
||||||
@@ -824,11 +819,9 @@ void DrawHistoryRecordsText( void )
|
|||||||
{
|
{
|
||||||
// draws the text of the records
|
// draws the text of the records
|
||||||
HistoryUnitPtr pCurHistory=pHistoryListHead;
|
HistoryUnitPtr pCurHistory=pHistoryListHead;
|
||||||
HistoryUnitPtr pTempHistory=pHistoryListHead;
|
|
||||||
CHAR16 sString[512];
|
CHAR16 sString[512];
|
||||||
INT32 iCounter=0;
|
INT32 iCounter=0;
|
||||||
INT16 usX, usY;
|
INT16 usX, usY;
|
||||||
INT32 iBalance=0;
|
|
||||||
INT16 sX =0, sY =0;
|
INT16 sX =0, sY =0;
|
||||||
|
|
||||||
// setup the font stuff
|
// setup the font stuff
|
||||||
@@ -907,8 +900,6 @@ void DrawHistoryRecordsText( void )
|
|||||||
void DrawAPageofHistoryRecords( void )
|
void DrawAPageofHistoryRecords( void )
|
||||||
{
|
{
|
||||||
// this procedure will draw a series of history records to the screen
|
// this procedure will draw a series of history records to the screen
|
||||||
INT32 iCurPage=1;
|
|
||||||
INT32 iCount=0;
|
|
||||||
pCurrentHistory=pHistoryListHead;
|
pCurrentHistory=pHistoryListHead;
|
||||||
|
|
||||||
// (re-)render background
|
// (re-)render background
|
||||||
@@ -1343,7 +1334,6 @@ BOOLEAN WriteOutHistoryRecords( UINT32 uiPage )
|
|||||||
INT32 iCount =0;
|
INT32 iCount =0;
|
||||||
HWFILE hFileHandle;
|
HWFILE hFileHandle;
|
||||||
HistoryUnitPtr pList;
|
HistoryUnitPtr pList;
|
||||||
INT32 iBytesRead=0;
|
|
||||||
UINT32 uiByteCount=0;
|
UINT32 uiByteCount=0;
|
||||||
|
|
||||||
// check if bad page
|
// check if bad page
|
||||||
@@ -1480,7 +1470,6 @@ void SetLastPageInHistoryRecords( void )
|
|||||||
{
|
{
|
||||||
// grabs the size of the file and interprets number of pages it will take up
|
// grabs the size of the file and interprets number of pages it will take up
|
||||||
HWFILE hFileHandle;
|
HWFILE hFileHandle;
|
||||||
INT32 iBytesRead=0;
|
|
||||||
|
|
||||||
// no file, return
|
// no file, return
|
||||||
if ( ! (FileExists( HISTORY_DATA_FILE ) ) )
|
if ( ! (FileExists( HISTORY_DATA_FILE ) ) )
|
||||||
@@ -1519,7 +1508,6 @@ UINT32 ReadInLastElementOfHistoryListAndReturnIdNumber( void )
|
|||||||
|
|
||||||
|
|
||||||
HWFILE hFileHandle;
|
HWFILE hFileHandle;
|
||||||
INT32 iBytesRead=0;
|
|
||||||
INT32 iFileSize = 0;
|
INT32 iFileSize = 0;
|
||||||
|
|
||||||
// no file, return
|
// no file, return
|
||||||
@@ -1558,7 +1546,6 @@ BOOLEAN AppendHistoryToEndOfFile( HistoryUnitPtr pHistory )
|
|||||||
{
|
{
|
||||||
// will write the current finance to disk
|
// will write the current finance to disk
|
||||||
HWFILE hFileHandle;
|
HWFILE hFileHandle;
|
||||||
INT32 iBytesWritten=0;
|
|
||||||
HistoryUnitPtr pHistoryList=pHistoryListHead;
|
HistoryUnitPtr pHistoryList=pHistoryListHead;
|
||||||
|
|
||||||
|
|
||||||
@@ -1604,7 +1591,6 @@ BOOLEAN AppendHistoryToEndOfFile( HistoryUnitPtr pHistory )
|
|||||||
void ResetHistoryFact( UINT8 ubCode, INT16 sSectorX, INT16 sSectorY )
|
void ResetHistoryFact( UINT8 ubCode, INT16 sSectorX, INT16 sSectorY )
|
||||||
{
|
{
|
||||||
// run through history list
|
// run through history list
|
||||||
INT32 iOldHistoryPage = iCurrentHistoryPage;
|
|
||||||
HistoryUnitPtr pList = pHistoryListHead;
|
HistoryUnitPtr pList = pHistoryListHead;
|
||||||
BOOLEAN fFound = FALSE;
|
BOOLEAN fFound = FALSE;
|
||||||
|
|
||||||
@@ -1652,7 +1638,6 @@ void ResetHistoryFact( UINT8 ubCode, INT16 sSectorX, INT16 sSectorY )
|
|||||||
UINT32 GetTimeQuestWasStarted( UINT8 ubCode )
|
UINT32 GetTimeQuestWasStarted( UINT8 ubCode )
|
||||||
{
|
{
|
||||||
// run through history list
|
// run through history list
|
||||||
INT32 iOldHistoryPage = iCurrentHistoryPage;
|
|
||||||
HistoryUnitPtr pList = pHistoryListHead;
|
HistoryUnitPtr pList = pHistoryListHead;
|
||||||
BOOLEAN fFound = FALSE;
|
BOOLEAN fFound = FALSE;
|
||||||
UINT32 uiTime = 0;
|
UINT32 uiTime = 0;
|
||||||
@@ -1761,3 +1746,4 @@ INT32 GetNumberOfHistoryPages()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -216,3 +216,4 @@ BOOLEAN DisplayComment( UINT8 ubCommentorsName, UINT8 ubComment, UINT16 usPosY )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -334,7 +334,6 @@ void RenderInsuranceContract()
|
|||||||
INT16 sMercID;
|
INT16 sMercID;
|
||||||
INT16 sNextMercID;
|
INT16 sNextMercID;
|
||||||
UINT16 usPosX;
|
UINT16 usPosX;
|
||||||
BOOLEAN fIsThereAnyAimMercs = FALSE;
|
|
||||||
SOLDIERTYPE *pSoldier = NULL;
|
SOLDIERTYPE *pSoldier = NULL;
|
||||||
|
|
||||||
|
|
||||||
@@ -1069,8 +1068,6 @@ void CreateDestroyInsuranceContractFormButtons( BOOLEAN fCreate)
|
|||||||
|
|
||||||
void HandleAcceptButton( UINT8 ubSoldierID, UINT8 ubFormID )
|
void HandleAcceptButton( UINT8 ubSoldierID, UINT8 ubFormID )
|
||||||
{
|
{
|
||||||
INT32 iAmountOfMoneyTransfer = -1;
|
|
||||||
|
|
||||||
//passed in either 1,2,3 should be 0,1,2
|
//passed in either 1,2,3 should be 0,1,2
|
||||||
ubFormID--;
|
ubFormID--;
|
||||||
|
|
||||||
|
|||||||
@@ -183,7 +183,6 @@ void HandleInsuranceInfo()
|
|||||||
void RenderInsuranceInfo()
|
void RenderInsuranceInfo()
|
||||||
{
|
{
|
||||||
CHAR16 sText[800];
|
CHAR16 sText[800];
|
||||||
UINT16 usNewLineOffset = 0;
|
|
||||||
UINT16 usPosX;
|
UINT16 usPosX;
|
||||||
|
|
||||||
DisableArrowButtonsIfOnLastOrFirstPage();
|
DisableArrowButtonsIfOnLastOrFirstPage();
|
||||||
@@ -572,3 +571,4 @@ void DisplayInfoTocPage()
|
|||||||
usNewLineOffset += INS_INFO_SPACE_BN_PARAGRAPHS;
|
usNewLineOffset += INS_INFO_SPACE_BN_PARAGRAPHS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -397,3 +397,4 @@ void SelectInsuranceTitleLinkRegionCallBack(MOUSE_REGION * pRegion, INT32 iReaso
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+5
-12
@@ -54,7 +54,6 @@
|
|||||||
#include "Game init.h"
|
#include "Game init.h"
|
||||||
#include "Game Clock.h"
|
#include "Game Clock.h"
|
||||||
#include "vobject_blitters.h"
|
#include "vobject_blitters.h"
|
||||||
#include "Soldier Control.h"
|
|
||||||
#include "Soldier Profile.h"
|
#include "Soldier Profile.h"
|
||||||
#include "Overhead.h"
|
#include "Overhead.h"
|
||||||
#include "environment.h"
|
#include "environment.h"
|
||||||
@@ -86,6 +85,9 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
//forward declarations of common classes to eliminate includes
|
||||||
|
class OBJECTTYPE;
|
||||||
|
class SOLDIERTYPE;
|
||||||
|
|
||||||
|
|
||||||
// icons text id's
|
// icons text id's
|
||||||
@@ -835,7 +837,6 @@ INT32 EnterLaptop()
|
|||||||
//Create, load, initialize data -- just entered the laptop.
|
//Create, load, initialize data -- just entered the laptop.
|
||||||
|
|
||||||
VOBJECT_DESC VObjectDesc;
|
VOBJECT_DESC VObjectDesc;
|
||||||
INT32 iCounter=0;
|
|
||||||
|
|
||||||
static BOOLEAN fEnteredFromGameStartup = TRUE;
|
static BOOLEAN fEnteredFromGameStartup = TRUE;
|
||||||
// we are re entering due to message box, leave NOW!
|
// we are re entering due to message box, leave NOW!
|
||||||
@@ -3055,7 +3056,6 @@ void WWWRegionMvtCallback(MOUSE_REGION * pRegion, INT32 iReason )
|
|||||||
{
|
{
|
||||||
static INT32 iBaseTime=0;
|
static INT32 iBaseTime=0;
|
||||||
static INT32 iFrame=0;
|
static INT32 iFrame=0;
|
||||||
INT32 iDifference=0;
|
|
||||||
HVOBJECT hLapTopIconHandle;
|
HVOBJECT hLapTopIconHandle;
|
||||||
if (iReason & MSYS_CALLBACK_REASON_LOST_MOUSE )
|
if (iReason & MSYS_CALLBACK_REASON_LOST_MOUSE )
|
||||||
{
|
{
|
||||||
@@ -3074,7 +3074,6 @@ void EmailRegionMvtCallback(MOUSE_REGION * pRegion, INT32 iReason )
|
|||||||
{
|
{
|
||||||
static INT32 iBaseTime=0;
|
static INT32 iBaseTime=0;
|
||||||
static INT32 iFrame=0;
|
static INT32 iFrame=0;
|
||||||
INT32 iDifference=0;
|
|
||||||
HVOBJECT hLapTopIconHandle;
|
HVOBJECT hLapTopIconHandle;
|
||||||
if (iReason & MSYS_CALLBACK_REASON_LOST_MOUSE )
|
if (iReason & MSYS_CALLBACK_REASON_LOST_MOUSE )
|
||||||
{
|
{
|
||||||
@@ -3099,7 +3098,6 @@ void FinancialRegionMvtCallback(MOUSE_REGION * pRegion, INT32 iReason )
|
|||||||
{
|
{
|
||||||
static INT32 iBaseTime=0;
|
static INT32 iBaseTime=0;
|
||||||
static INT32 iFrame=0;
|
static INT32 iFrame=0;
|
||||||
INT32 iDifference=0;
|
|
||||||
HVOBJECT hLapTopIconHandle;
|
HVOBJECT hLapTopIconHandle;
|
||||||
if (iReason & MSYS_CALLBACK_REASON_LOST_MOUSE )
|
if (iReason & MSYS_CALLBACK_REASON_LOST_MOUSE )
|
||||||
{
|
{
|
||||||
@@ -3117,7 +3115,6 @@ void HistoryRegionMvtCallback(MOUSE_REGION * pRegion, INT32 iReason )
|
|||||||
{
|
{
|
||||||
static INT32 iBaseTime=0;
|
static INT32 iBaseTime=0;
|
||||||
static INT32 iFrame=0;
|
static INT32 iFrame=0;
|
||||||
INT32 iDifference=0;
|
|
||||||
HVOBJECT hLapTopIconHandle;
|
HVOBJECT hLapTopIconHandle;
|
||||||
if (iReason & MSYS_CALLBACK_REASON_LOST_MOUSE )
|
if (iReason & MSYS_CALLBACK_REASON_LOST_MOUSE )
|
||||||
{
|
{
|
||||||
@@ -3138,7 +3135,6 @@ void FilesRegionMvtCallback(MOUSE_REGION * pRegion, INT32 iReason )
|
|||||||
{
|
{
|
||||||
static INT32 iBaseTime=0;
|
static INT32 iBaseTime=0;
|
||||||
static INT32 iFrame=0;
|
static INT32 iFrame=0;
|
||||||
INT32 iDifference=0;
|
|
||||||
HVOBJECT hLapTopIconHandle;
|
HVOBJECT hLapTopIconHandle;
|
||||||
if (iReason & MSYS_CALLBACK_REASON_LOST_MOUSE )
|
if (iReason & MSYS_CALLBACK_REASON_LOST_MOUSE )
|
||||||
{
|
{
|
||||||
@@ -3156,7 +3152,6 @@ void PersonnelRegionMvtCallback(MOUSE_REGION * pRegion, INT32 iReason )
|
|||||||
{
|
{
|
||||||
static INT32 iBaseTime=0;
|
static INT32 iBaseTime=0;
|
||||||
static INT32 iFrame=0;
|
static INT32 iFrame=0;
|
||||||
INT32 iDifference=0;
|
|
||||||
HVOBJECT hLapTopIconHandle;
|
HVOBJECT hLapTopIconHandle;
|
||||||
if (iReason & MSYS_CALLBACK_REASON_LOST_MOUSE )
|
if (iReason & MSYS_CALLBACK_REASON_LOST_MOUSE )
|
||||||
{
|
{
|
||||||
@@ -3475,7 +3470,6 @@ void ScrollDisplayText(INT32 iY)
|
|||||||
{
|
{
|
||||||
static INT32 iBaseTime=0;
|
static INT32 iBaseTime=0;
|
||||||
static INT16 sCurX;
|
static INT16 sCurX;
|
||||||
INT16 sY=(INT16)iY;
|
|
||||||
|
|
||||||
// if we are just enetering, set basetime to current clock value
|
// if we are just enetering, set basetime to current clock value
|
||||||
if(iBaseTime==0)
|
if(iBaseTime==0)
|
||||||
@@ -3827,8 +3821,6 @@ BOOLEAN DisplayLoadPending( void )
|
|||||||
HVOBJECT hLapTopIconHandle;
|
HVOBJECT hLapTopIconHandle;
|
||||||
INT32 iLoadTime;
|
INT32 iLoadTime;
|
||||||
INT32 iUnitTime;
|
INT32 iUnitTime;
|
||||||
UINT32 uiTempLaptopMode = 0;
|
|
||||||
UINT32 uiTempWWWMode = 0;
|
|
||||||
INT16 sXPosition = 0, sYPosition = 0;
|
INT16 sXPosition = 0, sYPosition = 0;
|
||||||
|
|
||||||
// if merc webpage, make it longer
|
// if merc webpage, make it longer
|
||||||
@@ -5374,7 +5366,7 @@ void PrintNumberOnTeam( void )
|
|||||||
{
|
{
|
||||||
pTeamSoldier = MercPtrs[ cnt ];
|
pTeamSoldier = MercPtrs[ cnt ];
|
||||||
|
|
||||||
if( ( pTeamSoldier->bActive)&&( !( pTeamSoldier->uiStatusFlags & SOLDIER_VEHICLE ) ) )
|
if( ( pTeamSoldier->bActive)&&( !( pTeamSoldier->flags.uiStatusFlags & SOLDIER_VEHICLE ) ) )
|
||||||
{
|
{
|
||||||
iCounter++;
|
iCounter++;
|
||||||
}
|
}
|
||||||
@@ -6464,3 +6456,4 @@ void CreateLaptopButtonHelpText( INT32 iButtonIndex, UINT32 uiButtonHelpTextID )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -192,3 +192,4 @@ void BtnCancelBoxButtonCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-3
@@ -747,7 +747,6 @@ void DailyUpdateOfMercSite( UINT16 usDate)
|
|||||||
INT16 sSoldierID, i;
|
INT16 sSoldierID, i;
|
||||||
UINT8 ubMercID;
|
UINT8 ubMercID;
|
||||||
INT32 iNumDays;
|
INT32 iNumDays;
|
||||||
BOOLEAN fAlreadySentEmailToPlayerThisTurn = FALSE;
|
|
||||||
|
|
||||||
//if its the first day, leave
|
//if its the first day, leave
|
||||||
if( usDate == 1 )
|
if( usDate == 1 )
|
||||||
@@ -1610,7 +1609,6 @@ void CheatToGetAll5Merc()
|
|||||||
BOOLEAN GetSpeckConditionalOpening( BOOLEAN fJustEnteredScreen )
|
BOOLEAN GetSpeckConditionalOpening( BOOLEAN fJustEnteredScreen )
|
||||||
{
|
{
|
||||||
static UINT16 usQuoteToSay=MERC_VIDEO_SPECK_SPEECH_NOT_TALKING;
|
static UINT16 usQuoteToSay=MERC_VIDEO_SPECK_SPEECH_NOT_TALKING;
|
||||||
UINT8 ubRandom=0;
|
|
||||||
UINT8 ubCnt;
|
UINT8 ubCnt;
|
||||||
BOOLEAN fCanSayLackOfPaymentQuote = TRUE;
|
BOOLEAN fCanSayLackOfPaymentQuote = TRUE;
|
||||||
BOOLEAN fCanUseIdleTag = FALSE;
|
BOOLEAN fCanUseIdleTag = FALSE;
|
||||||
@@ -1701,7 +1699,6 @@ BOOLEAN GetSpeckConditionalOpening( BOOLEAN fJustEnteredScreen )
|
|||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UINT8 ubNumMercsDead = NumberOfMercMercsDead();
|
|
||||||
UINT8 ubRandom = ( UINT8 ) Random( 100 );
|
UINT8 ubRandom = ( UINT8 ) Random( 100 );
|
||||||
|
|
||||||
//if business is good
|
//if business is good
|
||||||
@@ -2678,3 +2675,4 @@ UINT32 CalcMercDaysServed()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+133
-187
File diff suppressed because it is too large
Load Diff
@@ -35,3 +35,4 @@ void RenderSirTech()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1464,3 +1464,4 @@ void DisplayLoadScreenWithID( UINT8 ubLoadScreenID )
|
|||||||
RefreshScreen( NULL );
|
RefreshScreen( NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -555,7 +555,6 @@ BOOLEAN CreateDestroyMainMenuButtons( BOOLEAN fCreate )
|
|||||||
INT32 cnt;
|
INT32 cnt;
|
||||||
SGPFILENAME filename;
|
SGPFILENAME filename;
|
||||||
INT16 sSlot;
|
INT16 sSlot;
|
||||||
//INT32 iStartLoc=0;
|
|
||||||
#ifndef _DEBUG
|
#ifndef _DEBUG
|
||||||
CHAR16 zText[512];
|
CHAR16 zText[512];
|
||||||
#endif
|
#endif
|
||||||
@@ -620,7 +619,7 @@ BOOLEAN CreateDestroyMainMenuButtons( BOOLEAN fCreate )
|
|||||||
if( pSoldier->bActive != TRUE )
|
if( pSoldier->bActive != TRUE )
|
||||||
{
|
{
|
||||||
//something is very wrong
|
//something is very wrong
|
||||||
pSoldier->bActive = pSoldier->bLife;
|
pSoldier->bActive = pSoldier->stats.bLife;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -705,3 +704,4 @@ void RestoreButtonBackGrounds()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1052,7 +1052,6 @@ void BtnOptionsTogglesCallback( GUI_BUTTON *btn, INT32 reason )
|
|||||||
void HandleOptionToggle( UINT8 ubButton, BOOLEAN fState, BOOLEAN fDown, BOOLEAN fPlaySound )
|
void HandleOptionToggle( UINT8 ubButton, BOOLEAN fState, BOOLEAN fDown, BOOLEAN fPlaySound )
|
||||||
{
|
{
|
||||||
static UINT32 uiOptionToggleSound = NO_SAMPLE;
|
static UINT32 uiOptionToggleSound = NO_SAMPLE;
|
||||||
//UINT32 uiSideToPlaySoundOn = MIDDLEPAN;
|
|
||||||
// static BOOLEAN fCheckBoxDrawnDownLastTime = FALSE;
|
// static BOOLEAN fCheckBoxDrawnDownLastTime = FALSE;
|
||||||
|
|
||||||
if( fState )
|
if( fState )
|
||||||
@@ -1218,7 +1217,6 @@ void HandleSliderBarMovementSounds()
|
|||||||
{
|
{
|
||||||
static UINT32 uiLastSoundFxTime=0;
|
static UINT32 uiLastSoundFxTime=0;
|
||||||
static UINT32 uiLastSpeechTime=0;
|
static UINT32 uiLastSpeechTime=0;
|
||||||
//UINT32 uiCurTime = GetJA2Clock();
|
|
||||||
static UINT32 uiLastPlayingSoundID = NO_SAMPLE;
|
static UINT32 uiLastPlayingSoundID = NO_SAMPLE;
|
||||||
static UINT32 uiLastPlayingSpeechID = NO_SAMPLE;
|
static UINT32 uiLastPlayingSpeechID = NO_SAMPLE;
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
<?xml version="1.0"?>
|
||||||
<VisualStudioPropertySheet
|
<VisualStudioPropertySheet
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="8.00"
|
Version="8.00"
|
||||||
|
|||||||
+1525
-274
File diff suppressed because it is too large
Load Diff
+9
-3
@@ -1,9 +1,13 @@
|
|||||||
#ifndef _SAVE_LOAD_GAME_H_
|
#ifndef _SAVE_LOAD_GAME_H_
|
||||||
#define _SAVE_LOAD_GAME_H_
|
#define _SAVE_LOAD_GAME_H_
|
||||||
|
|
||||||
#include "Soldier Control.h"
|
|
||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
|
|
||||||
|
//forward declarations of common classes to eliminate includes
|
||||||
|
class OBJECTTYPE;
|
||||||
|
class SOLDIERTYPE;
|
||||||
|
|
||||||
|
|
||||||
#define BYTESINMEGABYTE 1048576 //1024*1024
|
#define BYTESINMEGABYTE 1048576 //1024*1024
|
||||||
#define REQUIRED_FREE_SPACE (20 * BYTESINMEGABYTE)
|
#define REQUIRED_FREE_SPACE (20 * BYTESINMEGABYTE)
|
||||||
|
|
||||||
@@ -50,13 +54,15 @@ typedef struct
|
|||||||
|
|
||||||
UINT32 uiRandom;
|
UINT32 uiRandom;
|
||||||
|
|
||||||
UINT8 ubFiller[110];
|
UINT8 ubInventorySystem;
|
||||||
|
|
||||||
|
UINT8 ubFiller[109];
|
||||||
|
|
||||||
} SAVED_GAME_HEADER;
|
} SAVED_GAME_HEADER;
|
||||||
|
|
||||||
|
|
||||||
extern UINT32 guiScreenToGotoAfterLoadingSavedGame;
|
extern UINT32 guiScreenToGotoAfterLoadingSavedGame;
|
||||||
extern UINT32 guiSaveGameVersion;
|
extern UINT32 guiCurrentSaveGameVersion;
|
||||||
|
|
||||||
void CreateSavedGameFileNameFromNumber( UINT8 ubSaveGameID, STR pzNewFileName );
|
void CreateSavedGameFileNameFromNumber( UINT8 ubSaveGameID, STR pzNewFileName );
|
||||||
|
|
||||||
|
|||||||
+11
-3
@@ -1813,7 +1813,6 @@ void SelectedSaveRegionMovementCallBack(MOUSE_REGION * pRegion, INT32 reason )
|
|||||||
|
|
||||||
void InitSaveLoadScreenTextInputBoxes()
|
void InitSaveLoadScreenTextInputBoxes()
|
||||||
{
|
{
|
||||||
//UINT32 uiStartLoc=0;
|
|
||||||
UINT16 usPosY;
|
UINT16 usPosY;
|
||||||
SAVED_GAME_HEADER SaveGameHeader;
|
SAVED_GAME_HEADER SaveGameHeader;
|
||||||
|
|
||||||
@@ -1978,7 +1977,7 @@ UINT8 CompareSaveGameVersion( INT8 bSaveGameID )
|
|||||||
LoadSavedGameHeader( bSaveGameID, &SaveGameHeader );
|
LoadSavedGameHeader( bSaveGameID, &SaveGameHeader );
|
||||||
|
|
||||||
// check to see if the saved game version in the header is the same as the current version
|
// check to see if the saved game version in the header is the same as the current version
|
||||||
if( SaveGameHeader.uiSavedGameVersion != guiSavedGameVersion )
|
if( SaveGameHeader.uiSavedGameVersion != SAVE_GAME_VERSION )
|
||||||
{
|
{
|
||||||
ubRetVal = SLS_SAVED_GAME_VERSION_OUT_OF_DATE;
|
ubRetVal = SLS_SAVED_GAME_VERSION_OUT_OF_DATE;
|
||||||
}
|
}
|
||||||
@@ -2122,11 +2121,20 @@ void DoneFadeOutForSaveLoadScreen( void )
|
|||||||
gfSchedulesHosed = FALSE;
|
gfSchedulesHosed = FALSE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
//CHRISL: New fail message if we failed because of screen res
|
||||||
|
if(UsingNewInventorySystem() == true && iResolution == 0)
|
||||||
|
{
|
||||||
|
DoSaveLoadMessageBox( MSG_BOX_BASIC_STYLE, zSaveLoadText[SLG_INV_RES_ERROR], SAVE_LOAD_SCREEN, MSG_BOX_FLAG_OK, FailedLoadingGameCallBack );
|
||||||
|
NextLoopCheckForEnoughFreeHardDriveSpace();
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
DoSaveLoadMessageBox( MSG_BOX_BASIC_STYLE, zSaveLoadText[SLG_LOAD_GAME_ERROR], SAVE_LOAD_SCREEN, MSG_BOX_FLAG_OK, FailedLoadingGameCallBack );
|
DoSaveLoadMessageBox( MSG_BOX_BASIC_STYLE, zSaveLoadText[SLG_LOAD_GAME_ERROR], SAVE_LOAD_SCREEN, MSG_BOX_FLAG_OK, FailedLoadingGameCallBack );
|
||||||
NextLoopCheckForEnoughFreeHardDriveSpace();
|
NextLoopCheckForEnoughFreeHardDriveSpace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SUCCESSFULLY_CORRECTED_SAVE:
|
SUCCESSFULLY_CORRECTED_SAVE:
|
||||||
@@ -2548,6 +2556,7 @@ void SaveGameToSlotNum()
|
|||||||
MarkButtonsDirty( );
|
MarkButtonsDirty( );
|
||||||
RenderButtons();
|
RenderButtons();
|
||||||
|
|
||||||
|
|
||||||
if( !SaveGame( gbSelectedSaveLocation, gzGameDescTextField ) )
|
if( !SaveGame( gbSelectedSaveLocation, gzGameDescTextField ) )
|
||||||
{
|
{
|
||||||
//Unset the fact that we are saving a game
|
//Unset the fact that we are saving a game
|
||||||
@@ -2557,7 +2566,6 @@ void SaveGameToSlotNum()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// gfExitAfterMessageBox = TRUE;
|
// gfExitAfterMessageBox = TRUE;
|
||||||
|
|
||||||
SetSaveLoadExitScreen( guiPreviousOptionScreen );
|
SetSaveLoadExitScreen( guiPreviousOptionScreen );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user