****************************************************************************

** Merged Source Code from Development trunk, for the Spring 2011 Release **
****************************************************************************
o Development Trunk (Revision: 4444):  https://81.169.133.124/source/ja2/branches/Wanne/JA2%201.13%20MP
o This trunk (the official 1.13 source trunk) will only be used for fixing bugs. No new features will be added here.
  New Features are only included in the Development trunk
o !!! After we have fixed a bug here in this trunk, we should MANUALLY merge the bugfix in the development trunk !!!

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4446 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2011-05-26 11:04:47 +00:00
parent c999420bb7
commit 6e2bdd557c
191 changed files with 17816 additions and 6106 deletions
+5 -5
View File
@@ -47,7 +47,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D &quot;_CRT_SECURE_NO_DEPRECATE&quot;"
AdditionalOptions="/D _CRT_SECURE_NO_DEPRECATE"
Optimization="0"
FavorSizeOrSpeed="0"
AdditionalIncludeDirectories=""
@@ -133,7 +133,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D &quot;_CRT_SECURE_NO_DEPRECATE&quot;"
AdditionalOptions="/D _CRT_SECURE_NO_DEPRECATE"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories=""
@@ -218,7 +218,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D &quot;_CRT_SECURE_NO_DEPRECATE&quot;"
AdditionalOptions="/D _CRT_SECURE_NO_DEPRECATE"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories=""
@@ -303,7 +303,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D &quot;_CRT_SECURE_NO_DEPRECATE&quot;"
AdditionalOptions="/D _CRT_SECURE_NO_DEPRECATE"
Optimization="0"
FavorSizeOrSpeed="0"
AdditionalIncludeDirectories=""
@@ -389,7 +389,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D &quot;_CRT_SECURE_NO_DEPRECATE&quot;"
AdditionalOptions="/D _CRT_SECURE_NO_DEPRECATE"
Optimization="0"
InlineFunctionExpansion="0"
AdditionalIncludeDirectories=""
+17 -17
View File
@@ -1157,51 +1157,51 @@ BOOLEAN GetNextCreditFromTextFile()
break;
case 4:
wcscpy(zOriginalString, L"AalaarDB");
break;
case 5:
wcscpy(zOriginalString, L"AndroidXP");
break;
case 6:
wcscpy(zOriginalString, L"Bugmonster");
break;
case 7:
case 5:
wcscpy(zOriginalString, L"ChrisL");
break;
case 8:
case 6:
wcscpy(zOriginalString, L"Jazz");
break;
case 7:
wcscpy(zOriginalString, L"Kaiden");
break;
case 9:
case 8:
wcscpy(zOriginalString, L"Lesh");
break;
case 10:
case 9:
wcscpy(zOriginalString, L"Little Alien");
break;
case 11:
case 10:
wcscpy(zOriginalString, L"Madd Mugsy");
break;
case 12:
case 11:
wcscpy(zOriginalString, L"Overhaul");
break;
case 13:
case 12:
wcscpy(zOriginalString, L"RoWa21 aka Roman aka Wanne");
break;
case 14:
case 13:
wcscpy(zOriginalString, L"Sergeant Kolja");
break;
case 14:
wcscpy(zOriginalString, L"Space Viking");
break;
case 15:
wcscpy(zOriginalString, L"@};Space Viking");
wcscpy(zOriginalString, L"@};Zathras");
break;
case 16:
+1
View File
@@ -104,6 +104,7 @@ enum
OPTIONS_LEAVE_EDITOR,
OPTIONS_RADAR_MAP,//dnl ch9 071009
OPTIONS_VANILLA_MODE,//dnl ch33 160909
OPTIONS_RESIZE_MAP_ON_LOADING,
OPTIONS_QUIT_GAME, LAST_OPTIONS_BUTTON = OPTIONS_QUIT_GAME,
//Mercs menu
MERCS_PLAYER, FIRST_MERCS_BUTTON = MERCS_PLAYER,
+3 -1
View File
@@ -24,6 +24,8 @@
#include "EditorBuildings.h"
#endif
#include "Text.h"
BOOLEAN fValidCursor = FALSE;
BOOLEAN fAnchored = FALSE;
BOOLEAN gfBrushEnabled = TRUE;
@@ -36,7 +38,7 @@ extern INT16 sGridX; // symbol already declared globally in editscreen.cpp (jona
extern INT16 sGridY; // symbol already declared globally in editscreen.cpp (jonathanl)
INT32 sBadMarker = -1;
STR16 wszSelType[6]= { L"Small", L"Medium", L"Large", L"XLarge", L"Width: xx", L"Area" };
//STR16 wszSelType[6]= { L"Small", L"Medium", L"Large", L"XLarge", L"Width: xx", L"Area" };
BOOLEAN gfAllowRightButtonSelections = FALSE;
BOOLEAN gfCurrentSelectionWithRightButton = FALSE;
+1
View File
@@ -18,6 +18,7 @@ void BtnCancelCallback(GUI_BUTTON *btn,INT32 reason);
void BtnQuitCallback( GUI_BUTTON *btn, INT32 reason );
void BtnRadarMapCallback( GUI_BUTTON *btn, INT32 reason );//dnl ch9 071009
void VanillaModeCallback(GUI_BUTTON *btn, INT32 reason);//dnl ch33 160909
void ResizeMapOnLoadingCallback(GUI_BUTTON *btn, INT32 reason);
void BtnNewMapCallback(GUI_BUTTON *btn,INT32 reason);
void BtnNewBasementCallback( GUI_BUTTON *btn, INT32 reason );
void BtnNewCavesCallback( GUI_BUTTON *btn, INT32 reason );
+19
View File
@@ -34,6 +34,7 @@
#endif
#include "LoadScreen.h"
#include "Text Input.h"
extern SOLDIERINITNODE *gpSelected;
extern SCHEDULENODE gCurrSchedule;
@@ -694,6 +695,24 @@ void VanillaModeCallback(GUI_BUTTON *btn, INT32 reason)//dnl ch33 160909
(btn->uiFlags & BUTTON_CLICKED_ON) ? (gfVanillaMode = TRUE) : (gfVanillaMode = FALSE);
}
void ResizeMapOnLoadingCallback(GUI_BUTTON *btn, INT32 reason)
{
if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP)
{
if (btn->uiFlags & BUTTON_CLICKED_ON)
{
// TODO.MAP: Enable/Disable the Rows textbox
gfResizeMapOnLoading = TRUE;
//EnableTextField(1);
}
else
{
gfResizeMapOnLoading = FALSE;
//DisableTextField(1);
}
}
}
//ITEMS
void MouseMovedInItemsRegion( MOUSE_REGION *reg, INT32 reason )
{
+153 -147
View File
@@ -21,6 +21,7 @@
#include "Soldier Create.h"
#include "overhead types.h"
#include "local.h"
#include "Text.h"
#endif
//Category tabs of the editor buttons
@@ -42,71 +43,71 @@ void InitEditorItemStatsButtons()
iEditorButton[ ITEMSTATS_HIDDEN_BTN ] =
CreateCheckBoxButton( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 365, "EDITOR//SmCheckbox.sti", MSYS_PRIORITY_NORMAL, ItemStatsToggleHideCallback );
iEditorButton[ ITEMSTATS_DELETE_BTN ] =
CreateTextButton( L"Delete", FONT10ARIAL, FONT_RED, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( iEditorItemStatsButtonsText[0], FONT10ARIAL, FONT_RED, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 600, 2 * iScreenHeightOffset + 441, 36, 16, BUTTON_NO_TOGGLE, MSYS_PRIORITY_NORMAL+1, DEFAULT_MOVE_CALLBACK, ItemStatsDeleteCallback );
}
void InitEditorMercsToolbar()
{
CHAR16 TempString[30];
STR16 FaceDirs[8] = {L"north",L"northeast",L"east",L"southeast",L"south",L"southwest",L"west",L"northwest"};
// STR16 FaceDirs[8] = {L"north",L"northeast",L"east",L"southeast",L"south",L"southwest",L"west",L"northwest"};
INT32 x;
iEditorButton[ MERCS_PLAYERTOGGLE ] =
CreateCheckBoxButton( iScreenWidthOffset + 4, 2 * iScreenHeightOffset + 362, "EDITOR//SmCheckbox.sti", MSYS_PRIORITY_NORMAL, MercsTogglePlayers );
if( gfShowPlayers )
ClickEditorButton( MERCS_PLAYERTOGGLE );
SetButtonFastHelpText( iEditorButton[ MERCS_PLAYERTOGGLE ], L"Toggle viewing of players");
SetButtonFastHelpText( iEditorButton[ MERCS_PLAYERTOGGLE ], iEditorMercsToolbarText[0]);
DisableButton( iEditorButton[ MERCS_PLAYERTOGGLE ] );
iEditorButton[ MERCS_ENEMYTOGGLE ] =
CreateCheckBoxButton( iScreenWidthOffset + 4, 2 * iScreenHeightOffset + 382, "EDITOR//SmCheckbox.sti", MSYS_PRIORITY_NORMAL, MercsToggleEnemies );
if( gfShowEnemies )
ClickEditorButton( MERCS_ENEMYTOGGLE );
SetButtonFastHelpText( iEditorButton[ MERCS_ENEMYTOGGLE ], L"Toggle viewing of enemies");
SetButtonFastHelpText( iEditorButton[ MERCS_ENEMYTOGGLE ], iEditorMercsToolbarText[1]);
iEditorButton[ MERCS_CREATURETOGGLE ] =
CreateCheckBoxButton( iScreenWidthOffset + 4, 2 * iScreenHeightOffset + 402, "EDITOR//SmCheckbox.sti", MSYS_PRIORITY_NORMAL, MercsToggleCreatures );
if( gfShowCreatures )
ClickEditorButton( MERCS_CREATURETOGGLE );
SetButtonFastHelpText( iEditorButton[ MERCS_CREATURETOGGLE ], L"Toggle viewing of creatures");
SetButtonFastHelpText( iEditorButton[ MERCS_CREATURETOGGLE ], iEditorMercsToolbarText[2]);
iEditorButton[ MERCS_REBELTOGGLE ] =
CreateCheckBoxButton( iScreenWidthOffset + 4, 2 * iScreenHeightOffset + 422, "EDITOR//SmCheckbox.sti", MSYS_PRIORITY_NORMAL, MercsToggleRebels );
if( gfShowRebels )
ClickEditorButton( MERCS_REBELTOGGLE );
SetButtonFastHelpText( iEditorButton[ MERCS_REBELTOGGLE ], L"Toggle viewing of rebels");
SetButtonFastHelpText( iEditorButton[ MERCS_REBELTOGGLE ], iEditorMercsToolbarText[3]);
iEditorButton[ MERCS_CIVILIANTOGGLE ] =
CreateCheckBoxButton( iScreenWidthOffset + 4, 2 * iScreenHeightOffset + 442, "EDITOR//SmCheckbox.sti", MSYS_PRIORITY_NORMAL, MercsToggleCivilians );
if( gfShowCivilians )
ClickEditorButton( MERCS_CIVILIANTOGGLE );
SetButtonFastHelpText( iEditorButton[ MERCS_CIVILIANTOGGLE ], L"Toggle viewing of civilians");
SetButtonFastHelpText( iEditorButton[ MERCS_CIVILIANTOGGLE ], iEditorMercsToolbarText[4]);
iEditorButton[MERCS_PLAYER] =
CreateTextButton( L"Player",(UINT16)BLOCKFONT, 165, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( iEditorMercsToolbarText[5],(UINT16)BLOCKFONT, 165, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 20, 2 * iScreenHeightOffset + 362, 78, 19, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK,
MercsPlayerTeamCallback );
SpecifyButtonDownTextColors( iEditorButton[MERCS_PLAYER], FONT_YELLOW, FONT_BLACK );
DisableButton( iEditorButton[MERCS_PLAYER] );
iEditorButton[MERCS_ENEMY] =
CreateTextButton( L"Enemy",(UINT16)BLOCKFONT, 165, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( iEditorMercsToolbarText[6],(UINT16)BLOCKFONT, 165, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 20, 2 * iScreenHeightOffset + 382, 78, 19, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK,
MercsEnemyTeamCallback );
SpecifyButtonDownTextColors( iEditorButton[MERCS_ENEMY], FONT_YELLOW, FONT_BLACK );
iEditorButton[MERCS_CREATURE] =
CreateTextButton( L"Creature",(UINT16)BLOCKFONT, 165, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( iEditorMercsToolbarText[7],(UINT16)BLOCKFONT, 165, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 20, 2 * iScreenHeightOffset + 402, 78, 19, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK,
MercsCreatureTeamCallback );
SpecifyButtonDownTextColors( iEditorButton[MERCS_CREATURE], FONT_YELLOW, FONT_BLACK );
iEditorButton[MERCS_REBEL] =
CreateTextButton( L"Rebels",(UINT16)BLOCKFONT, 165, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( iEditorMercsToolbarText[8],(UINT16)BLOCKFONT, 165, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 20, 2 * iScreenHeightOffset + 422, 78, 19, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK,
MercsRebelTeamCallback );
SpecifyButtonDownTextColors( iEditorButton[MERCS_REBEL], FONT_YELLOW, FONT_BLACK );
iEditorButton[MERCS_CIVILIAN] =
CreateTextButton( L"Civilian",(UINT16)BLOCKFONT, 165, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( iEditorMercsToolbarText[9],(UINT16)BLOCKFONT, 165, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 20, 2 * iScreenHeightOffset + 442, 78, 19, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK,
MercsCivilianTeamCallback );
SpecifyButtonDownTextColors( iEditorButton[MERCS_CIVILIAN], FONT_YELLOW, FONT_BLACK );
iEditorButton[ MERCS_1 ] =
CreateTextButton( L"DETAILED PLACEMENT", SMALLCOMPFONT, FONT_ORANGE, 60, BUTTON_USE_DEFAULT,
CreateTextButton( iEditorMercsToolbarText[10], SMALLCOMPFONT, FONT_ORANGE, 60, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 100, 2 * iScreenHeightOffset + 362, 68, 20, BUTTON_TOGGLE,
MSYS_PRIORITY_NORMAL, BUTTON_NO_CALLBACK, BUTTON_NO_CALLBACK );
DisableButton( iEditorButton[ MERCS_1 ] );
@@ -118,81 +119,81 @@ void InitEditorMercsToolbar()
iEditorButton[ MERCS_GENERAL ] =
CreateEasyToggleButton( iScreenWidthOffset + 100, 2 * iScreenHeightOffset + 382, "EDITOR//MercGeneral.sti", MercsGeneralModeCallback );
SetButtonFastHelpText( iEditorButton[ MERCS_GENERAL ], L"General information mode");
SetButtonFastHelpText( iEditorButton[ MERCS_GENERAL ], iEditorMercsToolbarText[11]);
iEditorButton[ MERCS_APPEARANCE ] =
CreateEasyToggleButton( iScreenWidthOffset + 134, 2 * iScreenHeightOffset + 382, "EDITOR//MercAppearance.sti", MercsAppearanceModeCallback );
SetButtonFastHelpText( iEditorButton[ MERCS_APPEARANCE ], L"Physical appearance mode");
SetButtonFastHelpText( iEditorButton[ MERCS_APPEARANCE ], iEditorMercsToolbarText[12]);
iEditorButton[ MERCS_ATTRIBUTES ] =
CreateEasyToggleButton( iScreenWidthOffset + 100, 2 * iScreenHeightOffset + 408, "EDITOR//MercAttributes.sti", MercsAttributesModeCallback );
SetButtonFastHelpText( iEditorButton[ MERCS_ATTRIBUTES ], L"Attributes mode");
SetButtonFastHelpText( iEditorButton[ MERCS_ATTRIBUTES ], iEditorMercsToolbarText[13]);
iEditorButton[ MERCS_INVENTORY ] =
CreateEasyToggleButton( iScreenWidthOffset + 134, 2 * iScreenHeightOffset + 408, "EDITOR//MercInventory.sti", MercsInventoryModeCallback );
SetButtonFastHelpText( iEditorButton[ MERCS_INVENTORY ], L"Inventory mode");
SetButtonFastHelpText( iEditorButton[ MERCS_INVENTORY ], iEditorMercsToolbarText[14]);
iEditorButton[ MERCS_PROFILE ] =
CreateEasyToggleButton( iScreenWidthOffset + 100, 2 * iScreenHeightOffset + 434, "EDITOR//MercProfile.sti", MercsProfileModeCallback );
SetButtonFastHelpText( iEditorButton[ MERCS_PROFILE ], L"Profile ID mode");
SetButtonFastHelpText( iEditorButton[ MERCS_PROFILE ], iEditorMercsToolbarText[15]);
iEditorButton[ MERCS_SCHEDULE ] =
CreateEasyToggleButton( iScreenWidthOffset + 134, 2 * iScreenHeightOffset + 434, "EDITOR//MercSchedule.sti", MercsScheduleModeCallback );
SetButtonFastHelpText( iEditorButton[ MERCS_SCHEDULE ], L"Schedule mode");
SetButtonFastHelpText( iEditorButton[ MERCS_SCHEDULE ], iEditorMercsToolbarText[16]);
//Workaround for identical buttons.
MSYS_SetBtnUserData( iEditorButton[ MERCS_SCHEDULE ], 3, 0xffffffff );
iEditorButton[ MERCS_GLOWSCHEDULE ] =
CreateEasyToggleButton( iScreenWidthOffset + 134, 2 * iScreenHeightOffset + 434, "EDITOR//MercGlowSchedule.sti", MercsScheduleModeCallback );
SetButtonFastHelpText( iEditorButton[ MERCS_GLOWSCHEDULE ], L"Schedule mode");
SetButtonFastHelpText( iEditorButton[ MERCS_GLOWSCHEDULE ], iEditorMercsToolbarText[17]);
HideEditorButton( MERCS_GLOWSCHEDULE );
iEditorButton[ MERCS_DELETE ] =
CreateTextButton( L"DELETE", (UINT16)SMALLCOMPFONT, FONT_DKBLUE, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( iEditorMercsToolbarText[18], (UINT16)SMALLCOMPFONT, FONT_DKBLUE, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 600, 2 * iScreenHeightOffset + 362, 40, 20, BUTTON_NO_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK,
MercsDeleteCallback );
SetButtonFastHelpText( iEditorButton[ MERCS_DELETE ], L"Delete currently selected merc (DEL).");
SetButtonFastHelpText( iEditorButton[ MERCS_DELETE ], iEditorMercsToolbarText[19]);
iEditorButton[ MERCS_NEXT ] =
CreateTextButton( L"NEXT", (UINT16)SMALLCOMPFONT, FONT_DKBLUE, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( iEditorMercsToolbarText[20], (UINT16)SMALLCOMPFONT, FONT_DKBLUE, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 600, 2 * iScreenHeightOffset + 382, 40, 20, BUTTON_NO_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK,
MercsNextCallback );
SetButtonFastHelpText( iEditorButton[ MERCS_NEXT ], L"Find next merc (SPACE).");
SetButtonFastHelpText( iEditorButton[ MERCS_NEXT ], iEditorMercsToolbarText[21]);
//Priority Existance
iEditorButton[ MERCS_PRIORITYEXISTANCE_CHECKBOX ] =
CreateCheckBoxButton( iScreenWidthOffset + 170, 2 * iScreenHeightOffset + 365, "EDITOR//checkbox.sti", MSYS_PRIORITY_NORMAL, MercsPriorityExistanceCallback );
SetButtonFastHelpText( iEditorButton[ MERCS_PRIORITYEXISTANCE_CHECKBOX ], L"Toggle priority existance" );
SetButtonFastHelpText( iEditorButton[ MERCS_PRIORITYEXISTANCE_CHECKBOX ], iEditorMercsToolbarText[22] );
//If merc has keys
iEditorButton[ MERCS_HASKEYS_CHECKBOX ] =
CreateCheckBoxButton( iScreenWidthOffset + 170, 2 * iScreenHeightOffset + 390, "EDITOR//checkbox.sti", MSYS_PRIORITY_NORMAL, MercsHasKeysCallback );
SetButtonFastHelpText( iEditorButton[ MERCS_HASKEYS_CHECKBOX ], L"Toggle whether or not placement has/naccess to all doors." );
SetButtonFastHelpText( iEditorButton[ MERCS_HASKEYS_CHECKBOX ], iEditorMercsToolbarText[23] );
//Orders
iEditorButton[ MERCS_ORDERS_STATIONARY ] =
CreateTextButton( L"STATIONARY", (UINT16)SMALLCOMPFONT, FONT_GRAY2, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( iEditorMercsToolbarText[24], (UINT16)SMALLCOMPFONT, FONT_GRAY2, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 200, 2 * iScreenHeightOffset + 368, 70, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK,
MercsSetOrdersCallback );
iEditorButton[ MERCS_ORDERS_ONGUARD] =
CreateTextButton( L"ON GUARD", (UINT16)SMALLCOMPFONT, FONT_GRAY2, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( iEditorMercsToolbarText[25], (UINT16)SMALLCOMPFONT, FONT_GRAY2, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 200, 2 * iScreenHeightOffset + 380, 70, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK,
MercsSetOrdersCallback );
iEditorButton[ MERCS_ORDERS_ONCALL ] =
CreateTextButton( L"ON CALL", (UINT16)SMALLCOMPFONT, FONT_GRAY2, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( iEditorMercsToolbarText[26], (UINT16)SMALLCOMPFONT, FONT_GRAY2, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 200, 2 * iScreenHeightOffset + 392, 70, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK,
MercsSetOrdersCallback );
iEditorButton[ MERCS_ORDERS_SEEKENEMY ] =
CreateTextButton( L"SEEK ENEMY", (UINT16)SMALLCOMPFONT, FONT_GRAY2, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( iEditorMercsToolbarText[27], (UINT16)SMALLCOMPFONT, FONT_GRAY2, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 200, 2 * iScreenHeightOffset + 404, 70, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK,
MercsSetOrdersCallback );
iEditorButton[ MERCS_ORDERS_CLOSEPATROL ] =
CreateTextButton( L"CLOSE PATROL", (UINT16)SMALLCOMPFONT, FONT_GRAY2, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( iEditorMercsToolbarText[28], (UINT16)SMALLCOMPFONT, FONT_GRAY2, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 270, 2 * iScreenHeightOffset + 368, 70, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK,
MercsSetOrdersCallback );
iEditorButton[ MERCS_ORDERS_FARPATROL ] =
CreateTextButton( L"FAR PATROL", (UINT16)SMALLCOMPFONT, FONT_GRAY2, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( iEditorMercsToolbarText[29], (UINT16)SMALLCOMPFONT, FONT_GRAY2, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 270, 2 * iScreenHeightOffset + 380, 70, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK,
MercsSetOrdersCallback );
iEditorButton[ MERCS_ORDERS_POINTPATROL ] =
CreateTextButton( L"POINT PATROL", (UINT16)SMALLCOMPFONT, FONT_GRAY2, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( iEditorMercsToolbarText[30], (UINT16)SMALLCOMPFONT, FONT_GRAY2, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 270, 2 * iScreenHeightOffset + 392, 70, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK,
MercsSetOrdersCallback );
iEditorButton[ MERCS_ORDERS_RNDPTPATROL ] =
CreateTextButton( L"RND PT PATROL", (UINT16)SMALLCOMPFONT, FONT_GRAY2, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( iEditorMercsToolbarText[31], (UINT16)SMALLCOMPFONT, FONT_GRAY2, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 270, 2 * iScreenHeightOffset + 404, 70, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK,
MercsSetOrdersCallback );
for ( x = 0; x < 8; x++ )
@@ -202,27 +203,27 @@ void InitEditorMercsToolbar()
//Attitudes
iEditorButton[ MERCS_ATTITUDE_DEFENSIVE ] =
CreateTextButton( L"DEFENSIVE", (UINT16)SMALLCOMPFONT, FONT_GRAY4, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( iEditorMercsToolbarText[32], (UINT16)SMALLCOMPFONT, FONT_GRAY4, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 200, 2 * iScreenHeightOffset + 424, 70, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK,
MercsSetAttitudeCallback );
iEditorButton[ MERCS_ATTITUDE_BRAVESOLO ] =
CreateTextButton( L"BRAVE SOLO", (UINT16)SMALLCOMPFONT, FONT_GRAY4, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( iEditorMercsToolbarText[33], (UINT16)SMALLCOMPFONT, FONT_GRAY4, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 200, 2 * iScreenHeightOffset + 436, 70, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK,
MercsSetAttitudeCallback );
iEditorButton[ MERCS_ATTITUDE_BRAVEAID ] =
CreateTextButton( L"BRAVE AID", (UINT16)SMALLCOMPFONT, FONT_GRAY4, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( iEditorMercsToolbarText[34], (UINT16)SMALLCOMPFONT, FONT_GRAY4, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 200, 2 * iScreenHeightOffset + 448, 70, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK,
MercsSetAttitudeCallback );
iEditorButton[ MERCS_ATTITUDE_AGGRESSIVE ] =
CreateTextButton( L"AGGRESSIVE", (UINT16)SMALLCOMPFONT, FONT_GRAY4, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( iEditorMercsToolbarText[35], (UINT16)SMALLCOMPFONT, FONT_GRAY4, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 270, 2 * iScreenHeightOffset + 424, 70, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK,
MercsSetAttitudeCallback );
iEditorButton[ MERCS_ATTITUDE_CUNNINGSOLO ] =
CreateTextButton( L"CUNNING SOLO", (UINT16)SMALLCOMPFONT, FONT_GRAY4, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( iEditorMercsToolbarText[36], (UINT16)SMALLCOMPFONT, FONT_GRAY4, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 270, 2 * iScreenHeightOffset + 436, 70, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK,
MercsSetAttitudeCallback );
iEditorButton[ MERCS_ATTITUDE_CUNNINGAID ] =
CreateTextButton( L"CUNNING AID", (UINT16)SMALLCOMPFONT, FONT_GRAY4, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( iEditorMercsToolbarText[37], (UINT16)SMALLCOMPFONT, FONT_GRAY4, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 270, 2 * iScreenHeightOffset + 448, 70, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK,
MercsSetAttitudeCallback );
for ( x = 0; x < 6; x++ )
@@ -256,34 +257,34 @@ void InitEditorMercsToolbar()
iScreenWidthOffset + 360, 2 * iScreenHeightOffset + 395, 30, 30, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL + 1, DEFAULT_MOVE_CALLBACK, MercsDirectionSetCallback );
for ( x = 0; x < 8; x++ )
{
swprintf( TempString, L"Set merc to face %s", FaceDirs[x] );
swprintf( TempString, iEditorMercsToolbarText[38], FaceDirs[x] );
SetButtonFastHelpText( iEditorButton[ FIRST_MERCS_DIRECTION_BUTTON + x ], TempString );
MSYS_SetBtnUserData( iEditorButton[ FIRST_MERCS_DIRECTION_BUTTON + x ], 0, x);
}
iEditorButton[ MERCS_DIRECTION_FIND ] =
CreateTextButton( L"Find", (INT16)FONT12POINT1, FONT_MCOLOR_BLACK, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( iEditorMercsToolbarText[39], (INT16)FONT12POINT1, FONT_MCOLOR_BLACK, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 390, 2 * iScreenHeightOffset + 395, 30, 30, BUTTON_NO_TOGGLE, MSYS_PRIORITY_NORMAL + 1, DEFAULT_MOVE_CALLBACK, MercsFindSelectedMercCallback );
SetButtonFastHelpText( iEditorButton[ MERCS_DIRECTION_FIND] , L"Find selected merc" );
SetButtonFastHelpText( iEditorButton[ MERCS_DIRECTION_FIND] , iEditorMercsToolbarText[63] );
iEditorButton[ MERCS_EQUIPMENT_BAD ] =
CreateTextButton( L"BAD", (INT16)SMALLCOMPFONT, FONT_GRAY1, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( iEditorMercsToolbarText[40], (INT16)SMALLCOMPFONT, FONT_GRAY1, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 480, 2 * iScreenHeightOffset + 385, 40, 15, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, MercsSetRelativeEquipmentCallback );
SpecifyButtonDownTextColors( iEditorButton[ MERCS_EQUIPMENT_BAD ], FONT_LTRED, FONT_BLACK );
iEditorButton[ MERCS_EQUIPMENT_POOR ] =
CreateTextButton( L"POOR", (INT16)SMALLCOMPFONT, FONT_GRAY1, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( iEditorMercsToolbarText[41], (INT16)SMALLCOMPFONT, FONT_GRAY1, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 480, 2 * iScreenHeightOffset + 400, 40, 15, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, MercsSetRelativeEquipmentCallback );
SpecifyButtonDownTextColors( iEditorButton[ MERCS_EQUIPMENT_POOR ], FONT_ORANGE, FONT_BLACK );
iEditorButton[ MERCS_EQUIPMENT_AVERAGE ] =
CreateTextButton( L"AVERAGE", (INT16)SMALLCOMPFONT, FONT_GRAY1, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( iEditorMercsToolbarText[42], (INT16)SMALLCOMPFONT, FONT_GRAY1, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 480, 2 * iScreenHeightOffset + 415, 40, 15, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, MercsSetRelativeEquipmentCallback );
SpecifyButtonDownTextColors( iEditorButton[ MERCS_EQUIPMENT_AVERAGE ], FONT_YELLOW, FONT_BLACK );
iEditorButton[ MERCS_EQUIPMENT_GOOD ] =
CreateTextButton( L"GOOD", (INT16)SMALLCOMPFONT, FONT_GRAY1, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( iEditorMercsToolbarText[43], (INT16)SMALLCOMPFONT, FONT_GRAY1, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 480, 2 * iScreenHeightOffset + 430, 40, 15, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, MercsSetRelativeEquipmentCallback );
SpecifyButtonDownTextColors( iEditorButton[ MERCS_EQUIPMENT_GOOD ], FONT_LTGREEN, FONT_BLACK );
iEditorButton[ MERCS_EQUIPMENT_GREAT ] =
CreateTextButton( L"GREAT", (INT16)SMALLCOMPFONT, FONT_GRAY1, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( iEditorMercsToolbarText[44], (INT16)SMALLCOMPFONT, FONT_GRAY1, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 480, 2 * iScreenHeightOffset + 445, 40, 15, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, MercsSetRelativeEquipmentCallback );
SpecifyButtonDownTextColors( iEditorButton[ MERCS_EQUIPMENT_GREAT ], FONT_LTBLUE, FONT_BLACK );
for ( x = 0; x < 5; x++ )
@@ -292,23 +293,23 @@ void InitEditorMercsToolbar()
}
iEditorButton[ MERCS_ATTRIBUTES_BAD ] =
CreateTextButton( L"BAD", (INT16)SMALLCOMPFONT, FONT_GRAY1, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( iEditorMercsToolbarText[45], (INT16)SMALLCOMPFONT, FONT_GRAY1, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 530, 2 * iScreenHeightOffset + 385, 40, 15, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, MercsSetRelativeAttributesCallback );
SpecifyButtonDownTextColors( iEditorButton[ MERCS_ATTRIBUTES_BAD ], FONT_LTRED, FONT_BLACK );
iEditorButton[ MERCS_ATTRIBUTES_POOR ] =
CreateTextButton( L"POOR", (INT16)SMALLCOMPFONT, FONT_GRAY1, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( iEditorMercsToolbarText[46], (INT16)SMALLCOMPFONT, FONT_GRAY1, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 530, 2 * iScreenHeightOffset + 400, 40, 15, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, MercsSetRelativeAttributesCallback );
SpecifyButtonDownTextColors( iEditorButton[ MERCS_ATTRIBUTES_POOR ], FONT_ORANGE, FONT_BLACK );
iEditorButton[ MERCS_ATTRIBUTES_AVERAGE ] =
CreateTextButton( L"AVERAGE", (INT16)SMALLCOMPFONT, FONT_GRAY1, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( iEditorMercsToolbarText[47], (INT16)SMALLCOMPFONT, FONT_GRAY1, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 530, 2 * iScreenHeightOffset + 415, 40, 15, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, MercsSetRelativeAttributesCallback );
SpecifyButtonDownTextColors( iEditorButton[ MERCS_ATTRIBUTES_AVERAGE ], FONT_YELLOW, FONT_BLACK );
iEditorButton[ MERCS_ATTRIBUTES_GOOD ] =
CreateTextButton( L"GOOD", (INT16)SMALLCOMPFONT, FONT_GRAY1, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( iEditorMercsToolbarText[48], (INT16)SMALLCOMPFONT, FONT_GRAY1, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 530, 2 * iScreenHeightOffset + 430, 40, 15, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, MercsSetRelativeAttributesCallback );
SpecifyButtonDownTextColors( iEditorButton[ MERCS_ATTRIBUTES_GOOD ], FONT_LTGREEN, FONT_BLACK );
iEditorButton[ MERCS_ATTRIBUTES_GREAT ] =
CreateTextButton( L"GREAT", (INT16)SMALLCOMPFONT, FONT_GRAY1, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( iEditorMercsToolbarText[49], (INT16)SMALLCOMPFONT, FONT_GRAY1, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 530, 2 * iScreenHeightOffset + 445, 40, 15, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, MercsSetRelativeAttributesCallback );
SpecifyButtonDownTextColors( iEditorButton[ MERCS_ATTRIBUTES_GREAT ], FONT_LTBLUE, FONT_BLACK );
for( x = 0; x < 5; x++ )
@@ -348,43 +349,43 @@ void InitEditorMercsToolbar()
CreateEasyNoToggleButton( iScreenWidthOffset + 360,2 * iScreenHeightOffset +436,"EDITOR//rightarrow.sti", MercsSetColorsCallback );
for ( x = FIRST_MERCS_COLOR_BUTTON; x < LAST_MERCS_COLOR_BUTTON; x+=2 )
{
SetButtonFastHelpText( iEditorButton[x], L"Previous color set" );
SetButtonFastHelpText( iEditorButton[x + 1], L"Next color set" );
SetButtonFastHelpText( iEditorButton[x], iEditorMercsToolbarText[50] );
SetButtonFastHelpText( iEditorButton[x + 1], iEditorMercsToolbarText[51] );
DisableButton( iEditorButton[ x ] );
DisableButton( iEditorButton[ x + 1 ] );
}
iEditorButton[MERCS_BODYTYPE_DOWN] =
CreateEasyNoToggleButton( iScreenWidthOffset + 460, 2 * iScreenHeightOffset +364,"EDITOR//leftarrow.sti", MercsSetBodyTypeCallback );
SetButtonFastHelpText( iEditorButton[ MERCS_BODYTYPE_DOWN ], L"Previous body type");
SetButtonFastHelpText( iEditorButton[ MERCS_BODYTYPE_DOWN ], iEditorMercsToolbarText[52]);
iEditorButton[MERCS_BODYTYPE_UP] =
CreateEasyNoToggleButton( iScreenWidthOffset + 560, 2 * iScreenHeightOffset +364,"EDITOR//rightarrow.sti", MercsSetBodyTypeCallback );
SetButtonFastHelpText( iEditorButton[ MERCS_BODYTYPE_UP ], L"Next body type");
SetButtonFastHelpText( iEditorButton[ MERCS_BODYTYPE_UP ], iEditorMercsToolbarText[53]);
iEditorButton[ MERCS_SCHEDULE_VARIANCE1 ] =
CreateCheckBoxButton( iScreenWidthOffset + 309, 2 * iScreenHeightOffset +375, "EDITOR//SmCheckBox.sti", MSYS_PRIORITY_NORMAL, MercsScheduleToggleVariance1Callback );
SetButtonFastHelpText( iEditorButton[ MERCS_SCHEDULE_VARIANCE1 ], L"Toggle time variance (+ or - 15 minutes)");
SetButtonFastHelpText( iEditorButton[ MERCS_SCHEDULE_VARIANCE1 ], iEditorMercsToolbarText[54]);
iEditorButton[ MERCS_SCHEDULE_VARIANCE2 ] =
CreateCheckBoxButton( iScreenWidthOffset + 309, 2 * iScreenHeightOffset +396, "EDITOR//SmCheckBox.sti", MSYS_PRIORITY_NORMAL, MercsScheduleToggleVariance2Callback );
SetButtonFastHelpText( iEditorButton[ MERCS_SCHEDULE_VARIANCE2 ], L"Toggle time variance (+ or - 15 minutes)");
SetButtonFastHelpText( iEditorButton[ MERCS_SCHEDULE_VARIANCE2 ], iEditorMercsToolbarText[55]);
iEditorButton[ MERCS_SCHEDULE_VARIANCE3 ] =
CreateCheckBoxButton( iScreenWidthOffset + 309, 2 * iScreenHeightOffset +417, "EDITOR//SmCheckBox.sti", MSYS_PRIORITY_NORMAL, MercsScheduleToggleVariance3Callback );
SetButtonFastHelpText( iEditorButton[ MERCS_SCHEDULE_VARIANCE3 ], L"Toggle time variance (+ or - 15 minutes)");
SetButtonFastHelpText( iEditorButton[ MERCS_SCHEDULE_VARIANCE3 ], iEditorMercsToolbarText[56]);
iEditorButton[ MERCS_SCHEDULE_VARIANCE4 ] =
CreateCheckBoxButton( iScreenWidthOffset + 309, 2 * iScreenHeightOffset +438, "EDITOR//SmCheckBox.sti", MSYS_PRIORITY_NORMAL, MercsScheduleToggleVariance4Callback );
SetButtonFastHelpText( iEditorButton[ MERCS_SCHEDULE_VARIANCE4 ], L"Toggle time variance (+ or - 15 minutes)");
SetButtonFastHelpText( iEditorButton[ MERCS_SCHEDULE_VARIANCE4 ], iEditorMercsToolbarText[57]);
iEditorButton[ MERCS_SCHEDULE_ACTION1 ] =
CreateTextButton( L"No action", FONT10ARIAL, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( iEditorMercsToolbarText[58], FONT10ARIAL, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 186, 2 * iScreenHeightOffset + 373, 77, 16, BUTTON_NO_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, MercsScheduleAction1Callback );
iEditorButton[ MERCS_SCHEDULE_ACTION2 ] =
CreateTextButton( L"No action", FONT10ARIAL, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( iEditorMercsToolbarText[59], FONT10ARIAL, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 186, 2 * iScreenHeightOffset + 394, 77, 16, BUTTON_NO_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, MercsScheduleAction2Callback );
iEditorButton[ MERCS_SCHEDULE_ACTION3 ] =
CreateTextButton( L"No action", FONT10ARIAL, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( iEditorMercsToolbarText[60], FONT10ARIAL, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 186, 2 * iScreenHeightOffset + 415, 77, 16, BUTTON_NO_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, MercsScheduleAction3Callback );
iEditorButton[ MERCS_SCHEDULE_ACTION4 ] =
CreateTextButton( L"No action", FONT10ARIAL, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( iEditorMercsToolbarText[61], FONT10ARIAL, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 186, 2 * iScreenHeightOffset + 436, 77, 16, BUTTON_NO_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, MercsScheduleAction4Callback );
iEditorButton[ MERCS_SCHEDULE_DATA1A ] =
@@ -412,7 +413,7 @@ void InitEditorMercsToolbar()
CreateTextButton( L"", FONT10ARIAL, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 381, 2 * iScreenHeightOffset + 436, 40, 16, BUTTON_NO_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, MercsScheduleData4BCallback );
iEditorButton[ MERCS_SCHEDULE_CLEAR ] =
CreateTextButton( L"Clear Schedule", FONT10ARIAL, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( iEditorMercsToolbarText[62], FONT10ARIAL, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 516, 2 * iScreenHeightOffset + 362, 77, 16, BUTTON_NO_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, MercsScheduleClearCallback );
HideEditorButtons( MERCS_SCHEDULE_DATA1A, MERCS_SCHEDULE_DATA4B );
@@ -448,143 +449,143 @@ void InitEditorMercsToolbar()
void InitEditorBuildingsToolbar()
{
iEditorButton[BUILDING_TOGGLE_ROOF_VIEW] =
CreateTextButton(L"ROOFS",(UINT16)SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton(iEditorBuildingsToolbarText[0],(UINT16)SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 110, 2 * iScreenHeightOffset + 400, 50, 15, BUTTON_TOGGLE,MSYS_PRIORITY_NORMAL,BUTTON_NO_CALLBACK,
BuildingToggleRoofViewCallback);
iEditorButton[BUILDING_TOGGLE_WALL_VIEW] =
CreateTextButton(L"WALLS",(UINT16)SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton(iEditorBuildingsToolbarText[1],(UINT16)SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 110, 2 * iScreenHeightOffset + 415, 50, 15, BUTTON_TOGGLE,MSYS_PRIORITY_NORMAL,BUTTON_NO_CALLBACK,
BuildingToggleWallViewCallback);
iEditorButton[BUILDING_TOGGLE_INFO_VIEW] =
CreateTextButton(L"ROOM INFO",(UINT16)SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton(iEditorBuildingsToolbarText[2],(UINT16)SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 110, 2 * iScreenHeightOffset + 430, 50, 15, BUTTON_TOGGLE,MSYS_PRIORITY_NORMAL,BUTTON_NO_CALLBACK,
BuildingToggleInfoViewCallback);
//Selection method buttons
iEditorButton[BUILDING_PLACE_WALLS] =
CreateEasyToggleButton( iScreenWidthOffset + 180,2 * iScreenHeightOffset + 370,"EDITOR//wall.sti", BuildingWallCallback);
SetButtonFastHelpText(iEditorButton[BUILDING_PLACE_WALLS],L"Place walls using selection method");//dnl fix for to many tooltip message in place walls
SetButtonFastHelpText(iEditorButton[BUILDING_PLACE_WALLS],iEditorBuildingsToolbarText[3]);//dnl fix for to many tooltip message in place walls
iEditorButton[BUILDING_PLACE_DOORS] =
CreateEasyToggleButton( iScreenWidthOffset + 210,2 * iScreenHeightOffset + 370,"EDITOR//door.sti", BuildingDoorCallback);
SetButtonFastHelpText(iEditorButton[BUILDING_PLACE_DOORS],L"Place doors using selection method");
SetButtonFastHelpText(iEditorButton[BUILDING_PLACE_DOORS],iEditorBuildingsToolbarText[4]);
iEditorButton[BUILDING_PLACE_ROOFS] =
CreateEasyToggleButton( iScreenWidthOffset + 240,2 * iScreenHeightOffset + 370,"EDITOR//roof.sti", BuildingRoofCallback);
SetButtonFastHelpText(iEditorButton[BUILDING_PLACE_ROOFS],L"Place roofs using selection method");
SetButtonFastHelpText(iEditorButton[BUILDING_PLACE_ROOFS],iEditorBuildingsToolbarText[5]);
iEditorButton[BUILDING_PLACE_WINDOWS] =
CreateEasyToggleButton( iScreenWidthOffset + 180,2 * iScreenHeightOffset + 400,"EDITOR//window.sti", BuildingWindowCallback);
SetButtonFastHelpText(iEditorButton[BUILDING_PLACE_WINDOWS],L"Place windows using selection method");
SetButtonFastHelpText(iEditorButton[BUILDING_PLACE_WINDOWS],iEditorBuildingsToolbarText[6]);
iEditorButton[BUILDING_PLACE_BROKEN_WALLS] =
CreateEasyToggleButton( iScreenWidthOffset + 210, 2 * iScreenHeightOffset + 400,"EDITOR//crackwall.sti", BuildingCrackWallCallback);
SetButtonFastHelpText(iEditorButton[BUILDING_PLACE_BROKEN_WALLS],L"Place damaged walls using selection method.");
SetButtonFastHelpText(iEditorButton[BUILDING_PLACE_BROKEN_WALLS],iEditorBuildingsToolbarText[7]);
iEditorButton[BUILDING_PLACE_FURNITURE] =
CreateEasyToggleButton( iScreenWidthOffset + 240, 2 * iScreenHeightOffset + 400,"EDITOR//decor.sti", BuildingFurnitureCallback);
SetButtonFastHelpText(iEditorButton[BUILDING_PLACE_FURNITURE],L"Place furniture using selection method");
SetButtonFastHelpText(iEditorButton[BUILDING_PLACE_FURNITURE],iEditorBuildingsToolbarText[8]);
iEditorButton[BUILDING_PLACE_DECALS] =
CreateEasyToggleButton( iScreenWidthOffset + 180, 2 * iScreenHeightOffset + 430,"EDITOR//decal.sti", BuildingDecalCallback);
SetButtonFastHelpText(iEditorButton[BUILDING_PLACE_DECALS],L"Place wall decals using selection method");
SetButtonFastHelpText(iEditorButton[BUILDING_PLACE_DECALS],iEditorBuildingsToolbarText[9]);
iEditorButton[BUILDING_PLACE_FLOORS] =
CreateEasyToggleButton( iScreenWidthOffset + 210, 2 * iScreenHeightOffset + 430,"EDITOR//floor.sti", BuildingFloorCallback);
SetButtonFastHelpText(iEditorButton[BUILDING_PLACE_FLOORS],L"Place floors using selection method");
SetButtonFastHelpText(iEditorButton[BUILDING_PLACE_FLOORS],iEditorBuildingsToolbarText[10]);
iEditorButton[BUILDING_PLACE_TOILETS] =
CreateEasyToggleButton( iScreenWidthOffset + 240, 2 * iScreenHeightOffset + 430,"EDITOR//toilet.sti", BuildingToiletCallback);
SetButtonFastHelpText(iEditorButton[BUILDING_PLACE_TOILETS],L"Place generic furniture using selection method");
SetButtonFastHelpText(iEditorButton[BUILDING_PLACE_TOILETS],iEditorBuildingsToolbarText[11]);
//Smart method buttons
iEditorButton[BUILDING_SMART_WALLS] =
CreateEasyToggleButton( iScreenWidthOffset + 290, 2 * iScreenHeightOffset + 370,"EDITOR//wall.sti", BuildingSmartWallCallback);
SetButtonFastHelpText(iEditorButton[BUILDING_SMART_WALLS],L"Place walls using smart method");
SetButtonFastHelpText(iEditorButton[BUILDING_SMART_WALLS],iEditorBuildingsToolbarText[12]);
iEditorButton[BUILDING_SMART_DOORS] =
CreateEasyToggleButton( iScreenWidthOffset + 320, 2 * iScreenHeightOffset + 370,"EDITOR//door.sti", BuildingSmartDoorCallback);
SetButtonFastHelpText(iEditorButton[BUILDING_SMART_DOORS],L"Place doors using smart method");
SetButtonFastHelpText(iEditorButton[BUILDING_SMART_DOORS],iEditorBuildingsToolbarText[13]);
iEditorButton[BUILDING_SMART_WINDOWS] =
CreateEasyToggleButton( iScreenWidthOffset + 290, 2 * iScreenHeightOffset + 400,"EDITOR//window.sti", BuildingSmartWindowCallback);
SetButtonFastHelpText(iEditorButton[BUILDING_SMART_WINDOWS],L"Place windows using smart method");
SetButtonFastHelpText(iEditorButton[BUILDING_SMART_WINDOWS],iEditorBuildingsToolbarText[14]);
iEditorButton[BUILDING_SMART_BROKEN_WALLS] =
CreateEasyToggleButton( iScreenWidthOffset + 320, 2 * iScreenHeightOffset + 400,"EDITOR//crackwall.sti", BuildingSmartCrackWallCallback);
SetButtonFastHelpText(iEditorButton[BUILDING_SMART_BROKEN_WALLS],L"Place damaged walls using smart method");
SetButtonFastHelpText(iEditorButton[BUILDING_SMART_BROKEN_WALLS],iEditorBuildingsToolbarText[15]);
iEditorButton[BUILDING_DOORKEY] =
CreateEasyToggleButton( iScreenWidthOffset + 290, 2 * iScreenHeightOffset + 430,"EDITOR//key.sti", BuildingDoorKeyCallback);
SetButtonFastHelpText(iEditorButton[BUILDING_DOORKEY], L"Lock or trap existing doors" );
SetButtonFastHelpText(iEditorButton[BUILDING_DOORKEY], iEditorBuildingsToolbarText[16] );
iEditorButton[BUILDING_NEW_ROOM] =
CreateEasyToggleButton( iScreenWidthOffset + 370, 2 * iScreenHeightOffset + 370,"EDITOR//newroom.sti", BuildingNewRoomCallback);
SetButtonFastHelpText(iEditorButton[BUILDING_NEW_ROOM],L"Add a new room");
SetButtonFastHelpText(iEditorButton[BUILDING_NEW_ROOM],iEditorBuildingsToolbarText[17]);
iEditorButton[BUILDING_CAVE_DRAWING] =
CreateEasyToggleButton( iScreenWidthOffset + 370, 2 * iScreenHeightOffset + 370,"EDITOR//caves.sti", BuildingCaveDrawingCallback);
SetButtonFastHelpText(iEditorButton[BUILDING_CAVE_DRAWING],L"Edit cave walls.");
SetButtonFastHelpText(iEditorButton[BUILDING_CAVE_DRAWING],iEditorBuildingsToolbarText[18]);
iEditorButton[BUILDING_SAW_ROOM] =
CreateEasyToggleButton( iScreenWidthOffset + 370, 2 * iScreenHeightOffset + 400,"EDITOR//sawroom.sti", BuildingSawRoomCallback);
SetButtonFastHelpText(iEditorButton[BUILDING_SAW_ROOM],L"Remove an area from existing building.");
SetButtonFastHelpText(iEditorButton[BUILDING_SAW_ROOM],iEditorBuildingsToolbarText[19]);
iEditorButton[BUILDING_KILL_BUILDING] =
CreateEasyToggleButton( iScreenWidthOffset + 370, 2 * iScreenHeightOffset + 430,"EDITOR//delroom.sti", BuildingKillBuildingCallback);
SetButtonFastHelpText(iEditorButton[BUILDING_KILL_BUILDING],L"Remove a building");
SetButtonFastHelpText(iEditorButton[BUILDING_KILL_BUILDING],iEditorBuildingsToolbarText[20]);
iEditorButton[BUILDING_NEW_ROOF] =
CreateEasyToggleButton( iScreenWidthOffset + 400, 2 * iScreenHeightOffset + 430,"EDITOR//newroof.sti", BuildingNewRoofCallback);
SetButtonFastHelpText(iEditorButton[BUILDING_NEW_ROOF],L"Add/replace building's roof with new flat roof.");
SetButtonFastHelpText(iEditorButton[BUILDING_NEW_ROOF],iEditorBuildingsToolbarText[21]);
iEditorButton[BUILDING_COPY_BUILDING] =
CreateEasyToggleButton( iScreenWidthOffset + 430, 2 * iScreenHeightOffset + 430,"EDITOR//copyroom.sti", BuildingCopyBuildingCallback);
SetButtonFastHelpText(iEditorButton[BUILDING_COPY_BUILDING],L"Copy a building");
SetButtonFastHelpText(iEditorButton[BUILDING_COPY_BUILDING],iEditorBuildingsToolbarText[22]);
iEditorButton[BUILDING_MOVE_BUILDING] =
CreateEasyToggleButton( iScreenWidthOffset + 460, 2 * iScreenHeightOffset + 430,"EDITOR//moveroom.sti", BuildingMoveBuildingCallback);
SetButtonFastHelpText(iEditorButton[BUILDING_MOVE_BUILDING],L"Move a building");
SetButtonFastHelpText(iEditorButton[BUILDING_MOVE_BUILDING],iEditorBuildingsToolbarText[23]);
iEditorButton[BUILDING_DRAW_ROOMNUM] =
CreateEasyToggleButton( iScreenWidthOffset + 410, 2 * iScreenHeightOffset + 370,"EDITOR//addTileRoom.sti", BuildingDrawRoomNumCallback);
SetButtonFastHelpText(iEditorButton[BUILDING_DRAW_ROOMNUM],L"Draw room number");
SetButtonFastHelpText(iEditorButton[BUILDING_DRAW_ROOMNUM],iEditorBuildingsToolbarText[24]);
iEditorButton[BUILDING_ERASE_ROOMNUM] =
CreateEasyToggleButton( iScreenWidthOffset + 440, 2 * iScreenHeightOffset + 370,"EDITOR//killTileRoom.sti", BuildingEraseRoomNumCallback);
SetButtonFastHelpText(iEditorButton[BUILDING_ERASE_ROOMNUM],L"Erase room numbers");
SetButtonFastHelpText(iEditorButton[BUILDING_ERASE_ROOMNUM],iEditorBuildingsToolbarText[25]);
iEditorButton[BUILDING_TOGGLE_ERASEMODE] =
CreateEasyToggleButton( iScreenWidthOffset + 500, 2 * iScreenHeightOffset + 400,"EDITOR//eraser.sti", BtnEraseCallback);
SetButtonFastHelpText(iEditorButton[BUILDING_TOGGLE_ERASEMODE],L"Toggle erase mode");
SetButtonFastHelpText(iEditorButton[BUILDING_TOGGLE_ERASEMODE],iEditorBuildingsToolbarText[26]);
iEditorButton[BUILDING_UNDO] =
CreateEasyNoToggleButton( iScreenWidthOffset + 530, 2 * iScreenHeightOffset + 400,"EDITOR//undo.sti", BtnUndoCallback);
SetButtonFastHelpText(iEditorButton[BUILDING_UNDO],L"Undo last change");
SetButtonFastHelpText(iEditorButton[BUILDING_UNDO],iEditorBuildingsToolbarText[27]);
iEditorButton[BUILDING_CYCLE_BRUSHSIZE] =
CreateEasyNoToggleButton( iScreenWidthOffset + 500, 2 * iScreenHeightOffset + 430,"EDITOR//paint.sti",BtnBrushCallback);
SetButtonFastHelpText( iEditorButton[ BUILDING_CYCLE_BRUSHSIZE ], L"Cycle brush size");
SetButtonFastHelpText( iEditorButton[ BUILDING_CYCLE_BRUSHSIZE ], iEditorBuildingsToolbarText[28]);
}
void InitEditorItemsToolbar()
{
SetFontForeground( FONT_MCOLOR_LTRED );
iEditorButton[ITEMS_WEAPONS] =
CreateTextButton(L"Weapons",(UINT16)BLOCKFONT, FONT_MCOLOR_DKWHITE, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton(iEditorItemsToolbarText[0],(UINT16)BLOCKFONT, FONT_MCOLOR_DKWHITE, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 100, 2 * iScreenHeightOffset + 440, 59, 20, BUTTON_TOGGLE,MSYS_PRIORITY_NORMAL,DEFAULT_MOVE_CALLBACK,
ItemsWeaponsCallback);
iEditorButton[ITEMS_AMMO] =
CreateTextButton(L"Ammo",(UINT16)BLOCKFONT, FONT_MCOLOR_DKWHITE, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton(iEditorItemsToolbarText[1],(UINT16)BLOCKFONT, FONT_MCOLOR_DKWHITE, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 159, 2 * iScreenHeightOffset + 440, 40, 20, BUTTON_TOGGLE,MSYS_PRIORITY_NORMAL,DEFAULT_MOVE_CALLBACK,
ItemsAmmoCallback);
iEditorButton[ITEMS_ARMOUR] =
CreateTextButton(L"Armour",(UINT16)BLOCKFONT, FONT_MCOLOR_DKWHITE, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton(iEditorItemsToolbarText[2],(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,
ItemsArmourCallback);
iEditorButton[ITEMS_LBEGEAR] =
CreateTextButton(L"LBE",(UINT16)BLOCKFONT, FONT_MCOLOR_DKWHITE, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton(iEditorItemsToolbarText[3],(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] =
CreateTextButton(L"Exp",(UINT16)BLOCKFONT, FONT_MCOLOR_DKWHITE, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton(iEditorItemsToolbarText[4],(UINT16)BLOCKFONT, FONT_MCOLOR_DKWHITE, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 281, 2 * iScreenHeightOffset + 440, 39, 20, BUTTON_TOGGLE,MSYS_PRIORITY_NORMAL,DEFAULT_MOVE_CALLBACK,
ItemsExplosivesCallback);
iEditorButton[ITEMS_EQUIPMENT1] =
CreateTextButton(L"E1",(UINT16)BLOCKFONT, FONT_MCOLOR_DKWHITE, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton(iEditorItemsToolbarText[5],(UINT16)BLOCKFONT, FONT_MCOLOR_DKWHITE, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 320, 2 * iScreenHeightOffset + 440, 21, 20, BUTTON_TOGGLE,MSYS_PRIORITY_NORMAL,DEFAULT_MOVE_CALLBACK,
ItemsEquipment1Callback);
iEditorButton[ITEMS_EQUIPMENT2] =
CreateTextButton(L"E2",(UINT16)BLOCKFONT, FONT_MCOLOR_DKWHITE, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton(iEditorItemsToolbarText[6],(UINT16)BLOCKFONT, FONT_MCOLOR_DKWHITE, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 341, 2 * iScreenHeightOffset + 440, 21, 20, BUTTON_TOGGLE,MSYS_PRIORITY_NORMAL,DEFAULT_MOVE_CALLBACK,
ItemsEquipment2Callback);
iEditorButton[ITEMS_EQUIPMENT3] =
CreateTextButton(L"E3",(UINT16)BLOCKFONT, FONT_MCOLOR_DKWHITE, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton(iEditorItemsToolbarText[7],(UINT16)BLOCKFONT, FONT_MCOLOR_DKWHITE, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 362, 2 * iScreenHeightOffset + 440, 21, 20, BUTTON_TOGGLE,MSYS_PRIORITY_NORMAL,DEFAULT_MOVE_CALLBACK,
ItemsEquipment3Callback);
iEditorButton[ITEMS_TRIGGERS] =
CreateTextButton( L"Triggers",(UINT16)BLOCKFONT, FONT_MCOLOR_DKWHITE, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton(iEditorItemsToolbarText[8],(UINT16)BLOCKFONT, FONT_MCOLOR_DKWHITE, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 383, 2 * iScreenHeightOffset + 440, 59, 20, BUTTON_TOGGLE,MSYS_PRIORITY_NORMAL,DEFAULT_MOVE_CALLBACK,
ItemsTriggersCallback );
iEditorButton[ITEMS_KEYS] =
CreateTextButton( L"Keys",(UINT16)BLOCKFONT, FONT_MCOLOR_DKWHITE, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton(iEditorItemsToolbarText[9],(UINT16)BLOCKFONT, FONT_MCOLOR_DKWHITE, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 442, 2 * iScreenHeightOffset + 440, 38, 20, BUTTON_TOGGLE,MSYS_PRIORITY_NORMAL,DEFAULT_MOVE_CALLBACK,
ItemsKeysCallback );
@@ -599,7 +600,7 @@ void InitEditorMapInfoToolbar()
{
iEditorButton[MAPINFO_ADD_LIGHT1_SOURCE] =
CreateEasyToggleButton( iScreenWidthOffset + 10, SCREEN_HEIGHT - 118, "EDITOR//light.sti", BtnDrawLightsCallback );
SetButtonFastHelpText(iEditorButton[MAPINFO_ADD_LIGHT1_SOURCE],L"Add ambient light source");
SetButtonFastHelpText(iEditorButton[MAPINFO_ADD_LIGHT1_SOURCE],iEditorMapInfoToolbarText[0]);
iEditorButton[ MAPINFO_LIGHT_PANEL ] =
CreateTextButton( 0, 0, 0, 0, BUTTON_USE_DEFAULT, iScreenWidthOffset + 45, SCREEN_HEIGHT - 118, 60, 50, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, BUTTON_NO_CALLBACK, BUTTON_NO_CALLBACK );
@@ -615,7 +616,7 @@ void InitEditorMapInfoToolbar()
iEditorButton[MAPINFO_TOGGLE_FAKE_LIGHTS] =
CreateEasyToggleButton( iScreenWidthOffset + 120, SCREEN_HEIGHT - 118, "EDITOR//fakelight.sti", BtnFakeLightCallback );
SetButtonFastHelpText(iEditorButton[MAPINFO_TOGGLE_FAKE_LIGHTS], L"Toggle fake ambient lights.");
SetButtonFastHelpText(iEditorButton[MAPINFO_TOGGLE_FAKE_LIGHTS], iEditorMapInfoToolbarText[1]);
iEditorButton[ MAPINFO_RADIO_PANEL ] =
CreateTextButton( 0, 0, 0, 0, BUTTON_USE_DEFAULT, iScreenWidthOffset + 207, SCREEN_HEIGHT - 118, 70, 50, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, BUTTON_NO_CALLBACK, BUTTON_NO_CALLBACK );
@@ -630,176 +631,181 @@ void InitEditorMapInfoToolbar()
iEditorButton[MAPINFO_DRAW_EXITGRIDS] =
CreateEasyToggleButton( iScreenWidthOffset + 305, SCREEN_HEIGHT - 108, "EDITOR//exitgridbut.sti", MapInfoDrawExitGridCallback );
SetButtonFastHelpText(iEditorButton[MAPINFO_DRAW_EXITGRIDS],L"Add exit grids (r-clk to query existing).");
SetButtonFastHelpText(iEditorButton[MAPINFO_DRAW_EXITGRIDS],iEditorMapInfoToolbarText[2]);
iEditorButton[MAPINFO_CYCLE_BRUSHSIZE] =
CreateEasyNoToggleButton( iScreenWidthOffset + 420, SCREEN_HEIGHT - 50, "EDITOR//paint.sti", BtnBrushCallback );
SetButtonFastHelpText(iEditorButton[MAPINFO_CYCLE_BRUSHSIZE],L"Cycle brush size");
SetButtonFastHelpText(iEditorButton[MAPINFO_CYCLE_BRUSHSIZE],iEditorMapInfoToolbarText[3]);
iEditorButton[MAPINFO_UNDO] =
CreateEasyNoToggleButton( iScreenWidthOffset + 510, SCREEN_HEIGHT - 50, "EDITOR//undo.sti", BtnUndoCallback );
SetButtonFastHelpText(iEditorButton[MAPINFO_UNDO],L"Undo last change");
SetButtonFastHelpText(iEditorButton[MAPINFO_UNDO],iEditorMapInfoToolbarText[4]);
iEditorButton[MAPINFO_TOGGLE_ERASEMODE] =
CreateEasyToggleButton( iScreenWidthOffset + 540, SCREEN_HEIGHT - 50, "EDITOR//eraser.sti", BtnEraseCallback);
SetButtonFastHelpText(iEditorButton[MAPINFO_TOGGLE_ERASEMODE],L"Toggle erase mode");
SetButtonFastHelpText(iEditorButton[MAPINFO_TOGGLE_ERASEMODE],iEditorMapInfoToolbarText[5]);
iEditorButton[ MAPINFO_NORTH_POINT ] =
CreateEasyToggleButton( iScreenWidthOffset + 540, SCREEN_HEIGHT - 115, "EDITOR//north.sti", MapInfoEntryPointsCallback);
SetButtonFastHelpText( iEditorButton[ MAPINFO_NORTH_POINT ], L"Specify north point for validation purposes.");
SetButtonFastHelpText( iEditorButton[ MAPINFO_NORTH_POINT ], iEditorMapInfoToolbarText[6]);
iEditorButton[ MAPINFO_WEST_POINT ] =
CreateEasyToggleButton( iScreenWidthOffset + 525, SCREEN_HEIGHT - 94, "EDITOR//west.sti", MapInfoEntryPointsCallback);
SetButtonFastHelpText( iEditorButton[ MAPINFO_WEST_POINT ], L"Specify west point for validation purposes.");
SetButtonFastHelpText( iEditorButton[ MAPINFO_WEST_POINT ], iEditorMapInfoToolbarText[7]);
iEditorButton[ MAPINFO_EAST_POINT ] =
CreateEasyToggleButton( iScreenWidthOffset + 555, SCREEN_HEIGHT - 94, "EDITOR//east.sti", MapInfoEntryPointsCallback);
SetButtonFastHelpText( iEditorButton[ MAPINFO_EAST_POINT ], L"Specify east point for validation purposes.");
SetButtonFastHelpText( iEditorButton[ MAPINFO_EAST_POINT ], iEditorMapInfoToolbarText[8]);
iEditorButton[ MAPINFO_SOUTH_POINT ] =
CreateEasyToggleButton( iScreenWidthOffset + 540, SCREEN_HEIGHT - 73, "EDITOR//south.sti", MapInfoEntryPointsCallback);
SetButtonFastHelpText( iEditorButton[ MAPINFO_SOUTH_POINT ], L"Specify south point for validation purposes.");
SetButtonFastHelpText( iEditorButton[ MAPINFO_SOUTH_POINT ], iEditorMapInfoToolbarText[9]);
iEditorButton[ MAPINFO_CENTER_POINT ] =
CreateEasyToggleButton( iScreenWidthOffset + 590, SCREEN_HEIGHT - 105, "EDITOR//center.sti", MapInfoEntryPointsCallback);
SetButtonFastHelpText( iEditorButton[ MAPINFO_CENTER_POINT ], L"Specify center point for validation purposes.");
SetButtonFastHelpText( iEditorButton[ MAPINFO_CENTER_POINT ], iEditorMapInfoToolbarText[10]);
iEditorButton[ MAPINFO_ISOLATED_POINT ] =
CreateEasyToggleButton( iScreenWidthOffset + 590, SCREEN_HEIGHT - 84, "EDITOR//isolated.sti", MapInfoEntryPointsCallback);
SetButtonFastHelpText( iEditorButton[ MAPINFO_ISOLATED_POINT ], L"Specify isolated point for validation purposes.");
SetButtonFastHelpText( iEditorButton[ MAPINFO_ISOLATED_POINT ], iEditorMapInfoToolbarText[11]);
}
void InitEditorOptionsToolbar()
{
iEditorButton[OPTIONS_NEW_MAP] =
CreateEasyNoToggleButton( iScreenWidthOffset + 71,SCREEN_HEIGHT - 79,"EDITOR//new.sti", BtnNewMapCallback);
SetButtonFastHelpText(iEditorButton[OPTIONS_NEW_MAP],L"New map");
SetButtonFastHelpText(iEditorButton[OPTIONS_NEW_MAP],iEditorOptionsToolbarText[0]);
iEditorButton[OPTIONS_NEW_BASEMENT] =
CreateEasyNoToggleButton( iScreenWidthOffset + 101,SCREEN_HEIGHT - 79,"EDITOR//new.sti", BtnNewBasementCallback);
SetButtonFastHelpText(iEditorButton[OPTIONS_NEW_BASEMENT],L"New basement");
SetButtonFastHelpText(iEditorButton[OPTIONS_NEW_BASEMENT],iEditorOptionsToolbarText[1]);
iEditorButton[OPTIONS_NEW_CAVES] =
CreateEasyNoToggleButton( iScreenWidthOffset + 131,SCREEN_HEIGHT - 79,"EDITOR//new.sti", BtnNewCavesCallback);
SetButtonFastHelpText(iEditorButton[OPTIONS_NEW_CAVES],L"New cave level");
SetButtonFastHelpText(iEditorButton[OPTIONS_NEW_CAVES],iEditorOptionsToolbarText[2]);
iEditorButton[OPTIONS_SAVE_MAP] =
CreateEasyNoToggleButton( iScreenWidthOffset + 161,SCREEN_HEIGHT - 79,"EDITOR//save.sti", BtnSaveCallback);
SetButtonFastHelpText(iEditorButton[OPTIONS_SAVE_MAP],L"Save map");
SetButtonFastHelpText(iEditorButton[OPTIONS_SAVE_MAP],iEditorOptionsToolbarText[3]);
iEditorButton[OPTIONS_LOAD_MAP] =
CreateEasyNoToggleButton( iScreenWidthOffset + 191,SCREEN_HEIGHT - 79,"EDITOR//load.sti", BtnLoadCallback);
SetButtonFastHelpText(iEditorButton[OPTIONS_LOAD_MAP],L"Load map");
SetButtonFastHelpText(iEditorButton[OPTIONS_LOAD_MAP],iEditorOptionsToolbarText[4]);
iEditorButton[OPTIONS_CHANGE_TILESET] =
CreateEasyNoToggleButton( iScreenWidthOffset + 221,SCREEN_HEIGHT - 79,"EDITOR//tileset.sti", BtnChangeTilesetCallback);
SetButtonFastHelpText(iEditorButton[OPTIONS_CHANGE_TILESET],L"Select tileset");
SetButtonFastHelpText(iEditorButton[OPTIONS_CHANGE_TILESET],iEditorOptionsToolbarText[5]);
iEditorButton[OPTIONS_LEAVE_EDITOR] =
CreateEasyNoToggleButton( iScreenWidthOffset + 251,SCREEN_HEIGHT - 79,"EDITOR//cancel.sti", BtnCancelCallback);
SetButtonFastHelpText(iEditorButton[OPTIONS_LEAVE_EDITOR],L"Leave Editor mode");
SetButtonFastHelpText(iEditorButton[OPTIONS_LEAVE_EDITOR],iEditorOptionsToolbarText[6]);
iEditorButton[OPTIONS_QUIT_GAME] =
CreateEasyNoToggleButton( iScreenWidthOffset + 281,SCREEN_HEIGHT - 79,"EDITOR//cancel.sti", BtnQuitCallback);
SetButtonFastHelpText(iEditorButton[OPTIONS_QUIT_GAME],L"Exit game.");
SetButtonFastHelpText(iEditorButton[OPTIONS_QUIT_GAME],iEditorOptionsToolbarText[7]);
//dnl ch9 071009
iEditorButton[OPTIONS_RADAR_MAP] =
CreateEasyNoToggleButton( iScreenWidthOffset + 311,SCREEN_HEIGHT - 79,"EDITOR//tileset.sti", BtnRadarMapCallback);
SetButtonFastHelpText(iEditorButton[OPTIONS_RADAR_MAP],L"Create radar map");
SetButtonFastHelpText(iEditorButton[OPTIONS_RADAR_MAP],iEditorOptionsToolbarText[8]);
//dnl ch33 160909
iEditorButton[OPTIONS_VANILLA_MODE] =
CreateCheckBoxButton(iScreenWidthOffset+71, SCREEN_HEIGHT-119, "EDITOR//smcheckbox.sti", MSYS_PRIORITY_NORMAL, VanillaModeCallback);
SetButtonFastHelpText(iEditorButton[OPTIONS_VANILLA_MODE],L"When checked, the map will be saved in original JA2 format (Version: 5.00 / 25)");
SetButtonFastHelpText(iEditorButton[OPTIONS_VANILLA_MODE],iEditorOptionsToolbarText[9]);
// TODO.MAP
iEditorButton[OPTIONS_RESIZE_MAP_ON_LOADING] =
CreateCheckBoxButton(iScreenWidthOffset+5, SCREEN_HEIGHT-42, "EDITOR//smcheckbox.sti", MSYS_PRIORITY_NORMAL, ResizeMapOnLoadingCallback);
SetButtonFastHelpText(iEditorButton[OPTIONS_RESIZE_MAP_ON_LOADING],iEditorOptionsToolbarText[10]);
}
void InitEditorTerrainToolbar()
{
iEditorButton[TERRAIN_FGROUND_TEXTURES] =
CreateEasyToggleButton( iScreenWidthOffset + 100,SCREEN_HEIGHT - 80,"EDITOR//downgrid.sti", BtnFgGrndCallback);
SetButtonFastHelpText(iEditorButton[TERRAIN_FGROUND_TEXTURES],L"Draw ground textures");
SetButtonFastHelpText(iEditorButton[TERRAIN_FGROUND_TEXTURES],iEditorTerrainToolbarText[0]);
iEditorButton[TERRAIN_BGROUND_TEXTURES] =
CreateEasyToggleButton( iScreenWidthOffset + 130,SCREEN_HEIGHT - 80,"EDITOR//upgrid.sti", BtnBkGrndCallback);
SetButtonFastHelpText(iEditorButton[TERRAIN_BGROUND_TEXTURES],L"Set map ground textures");
SetButtonFastHelpText(iEditorButton[TERRAIN_BGROUND_TEXTURES],iEditorTerrainToolbarText[1]);
iEditorButton[TERRAIN_PLACE_CLIFFS] =
CreateEasyToggleButton( iScreenWidthOffset + 160,SCREEN_HEIGHT - 80,"EDITOR//banks.sti", BtnBanksCallback);
SetButtonFastHelpText(iEditorButton[TERRAIN_PLACE_CLIFFS],L"Place banks and cliffs");
SetButtonFastHelpText(iEditorButton[TERRAIN_PLACE_CLIFFS],iEditorTerrainToolbarText[2]);
iEditorButton[TERRAIN_PLACE_ROADS] =
CreateEasyToggleButton( iScreenWidthOffset + 190,SCREEN_HEIGHT - 80,"EDITOR//road.sti", BtnRoadsCallback);
SetButtonFastHelpText(iEditorButton[TERRAIN_PLACE_ROADS],L"Draw roads");
SetButtonFastHelpText(iEditorButton[TERRAIN_PLACE_ROADS],iEditorTerrainToolbarText[3]);
iEditorButton[TERRAIN_PLACE_DEBRIS] =
CreateEasyToggleButton( iScreenWidthOffset + 220,SCREEN_HEIGHT - 80,"EDITOR//debris.sti", BtnDebrisCallback);
SetButtonFastHelpText(iEditorButton[TERRAIN_PLACE_DEBRIS],L"Draw debris");
SetButtonFastHelpText(iEditorButton[TERRAIN_PLACE_DEBRIS],iEditorTerrainToolbarText[4]);
iEditorButton[TERRAIN_PLACE_TREES] =
CreateEasyToggleButton( iScreenWidthOffset + 250,SCREEN_HEIGHT - 80,"EDITOR//tree.sti", BtnObjectCallback);
SetButtonFastHelpText(iEditorButton[TERRAIN_PLACE_TREES],L"Place trees & bushes");
SetButtonFastHelpText(iEditorButton[TERRAIN_PLACE_TREES],iEditorTerrainToolbarText[5]);
iEditorButton[TERRAIN_PLACE_ROCKS] =
CreateEasyToggleButton( iScreenWidthOffset + 280,SCREEN_HEIGHT - 80,"EDITOR//num1.sti", BtnObject1Callback);
SetButtonFastHelpText(iEditorButton[TERRAIN_PLACE_ROCKS],L"Place rocks");
SetButtonFastHelpText(iEditorButton[TERRAIN_PLACE_ROCKS],iEditorTerrainToolbarText[6]);
iEditorButton[TERRAIN_PLACE_MISC] =
CreateEasyToggleButton( iScreenWidthOffset + 310,SCREEN_HEIGHT - 80,"EDITOR//num2.sti", BtnObject2Callback);
SetButtonFastHelpText(iEditorButton[TERRAIN_PLACE_MISC],L"Place barrels & other junk");
SetButtonFastHelpText(iEditorButton[TERRAIN_PLACE_MISC],iEditorTerrainToolbarText[7]);
iEditorButton[TERRAIN_FILL_AREA] =
CreateEasyToggleButton( iScreenWidthOffset + 100,SCREEN_HEIGHT - 50,"EDITOR//fill.sti", BtnFillCallback);
SetButtonFastHelpText(iEditorButton[TERRAIN_FILL_AREA],L"Fill area");
SetButtonFastHelpText(iEditorButton[TERRAIN_FILL_AREA],iEditorTerrainToolbarText[8]);
iEditorButton[TERRAIN_UNDO] =
CreateEasyNoToggleButton( iScreenWidthOffset + 130,SCREEN_HEIGHT - 50,"EDITOR//undo.sti", BtnUndoCallback);
SetButtonFastHelpText(iEditorButton[TERRAIN_UNDO],L"Undo last change");
SetButtonFastHelpText(iEditorButton[TERRAIN_UNDO],iEditorTerrainToolbarText[9]);
iEditorButton[TERRAIN_TOGGLE_ERASEMODE] =
CreateEasyToggleButton( iScreenWidthOffset + 160,SCREEN_HEIGHT - 50,"EDITOR//eraser.sti", BtnEraseCallback);
SetButtonFastHelpText(iEditorButton[TERRAIN_TOGGLE_ERASEMODE],L"Toggle erase mode");
SetButtonFastHelpText(iEditorButton[TERRAIN_TOGGLE_ERASEMODE],iEditorTerrainToolbarText[10]);
iEditorButton[TERRAIN_CYCLE_BRUSHSIZE] =
CreateEasyNoToggleButton( iScreenWidthOffset + 190,SCREEN_HEIGHT - 50,"EDITOR//paint.sti", BtnBrushCallback);
SetButtonFastHelpText(iEditorButton[TERRAIN_CYCLE_BRUSHSIZE],L"Cycle brush size");
SetButtonFastHelpText(iEditorButton[TERRAIN_CYCLE_BRUSHSIZE],iEditorTerrainToolbarText[11]);
iEditorButton[TERRAIN_RAISE_DENSITY] =
CreateEasyNoToggleButton( iScreenWidthOffset + 280,SCREEN_HEIGHT - 50,"EDITOR//uparrow.sti", BtnIncBrushDensityCallback);
SetButtonFastHelpText(iEditorButton[TERRAIN_RAISE_DENSITY],L"Raise brush density");
SetButtonFastHelpText(iEditorButton[TERRAIN_RAISE_DENSITY],iEditorTerrainToolbarText[12]);
iEditorButton[TERRAIN_LOWER_DENSITY] =
CreateEasyNoToggleButton( iScreenWidthOffset + 350,SCREEN_HEIGHT - 50,"EDITOR//downarrow.sti", BtnDecBrushDensityCallback);
SetButtonFastHelpText(iEditorButton[TERRAIN_LOWER_DENSITY],L"Lower brush density");
SetButtonFastHelpText(iEditorButton[TERRAIN_LOWER_DENSITY],iEditorTerrainToolbarText[13]);
}
void CreateEditorTaskbarInternal()
{
//Create the tabs for the editor taskbar
iEditorButton[ TAB_TERRAIN ] =
CreateTextButton(L"Terrain", (UINT16)SMALLFONT1, FONT_LTKHAKI, FONT_DKKHAKI, BUTTON_USE_DEFAULT,
CreateTextButton(iEditorTaskbarInternalText[0], (UINT16)SMALLFONT1, FONT_LTKHAKI, FONT_DKKHAKI, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 100, SCREEN_HEIGHT - 20, 90, 20, BUTTON_TOGGLE,MSYS_PRIORITY_HIGH,BUTTON_NO_CALLBACK,
TaskTerrainCallback);
SpecifyButtonDownTextColors( iEditorButton[TAB_TERRAIN], FONT_YELLOW, FONT_ORANGE );
iEditorButton[ TAB_BUILDINGS ] =
CreateTextButton(L"Buildings", (UINT16)SMALLFONT1, FONT_LTKHAKI, FONT_DKKHAKI, BUTTON_USE_DEFAULT,
CreateTextButton(iEditorTaskbarInternalText[1], (UINT16)SMALLFONT1, FONT_LTKHAKI, FONT_DKKHAKI, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 190, SCREEN_HEIGHT - 20, 90, 20, BUTTON_TOGGLE,MSYS_PRIORITY_HIGH,BUTTON_NO_CALLBACK,
TaskBuildingCallback);
SpecifyButtonDownTextColors( iEditorButton[TAB_BUILDINGS], FONT_YELLOW, FONT_ORANGE );
iEditorButton[ TAB_ITEMS ] =
CreateTextButton(L"Items", (UINT16)SMALLFONT1, FONT_LTKHAKI, FONT_DKKHAKI, BUTTON_USE_DEFAULT,
CreateTextButton(iEditorTaskbarInternalText[2], (UINT16)SMALLFONT1, FONT_LTKHAKI, FONT_DKKHAKI, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 280, SCREEN_HEIGHT - 20, 90, 20, BUTTON_TOGGLE,MSYS_PRIORITY_HIGH,BUTTON_NO_CALLBACK,
TaskItemsCallback);
SpecifyButtonDownTextColors( iEditorButton[TAB_ITEMS], FONT_YELLOW, FONT_ORANGE );
iEditorButton[ TAB_MERCS ] =
CreateTextButton(L"Mercs", (UINT16)SMALLFONT1, FONT_LTKHAKI, FONT_DKKHAKI, BUTTON_USE_DEFAULT,
CreateTextButton(iEditorTaskbarInternalText[3], (UINT16)SMALLFONT1, FONT_LTKHAKI, FONT_DKKHAKI, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 370, SCREEN_HEIGHT - 20, 90, 20, BUTTON_TOGGLE,MSYS_PRIORITY_HIGH,BUTTON_NO_CALLBACK,
TaskMercsCallback);
SpecifyButtonDownTextColors( iEditorButton[TAB_MERCS], FONT_YELLOW, FONT_ORANGE );
iEditorButton[ TAB_MAPINFO ] =
CreateTextButton(L"Map Info", (UINT16)SMALLFONT1, FONT_LTKHAKI, FONT_DKKHAKI, BUTTON_USE_DEFAULT,
CreateTextButton(iEditorTaskbarInternalText[4], (UINT16)SMALLFONT1, FONT_LTKHAKI, FONT_DKKHAKI, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 460, SCREEN_HEIGHT - 20, 90, 20, BUTTON_TOGGLE,MSYS_PRIORITY_HIGH,BUTTON_NO_CALLBACK,
TaskMapInfoCallback);
SpecifyButtonDownTextColors( iEditorButton[TAB_MAPINFO], FONT_YELLOW, FONT_ORANGE );
iEditorButton[ TAB_OPTIONS ] =
CreateTextButton(L"Options", (UINT16)SMALLFONT1, FONT_LTKHAKI, FONT_DKKHAKI, BUTTON_USE_DEFAULT,
CreateTextButton(iEditorTaskbarInternalText[5], (UINT16)SMALLFONT1, FONT_LTKHAKI, FONT_DKKHAKI, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 550, SCREEN_HEIGHT - 20, 90, 20, BUTTON_TOGGLE,MSYS_PRIORITY_HIGH,BUTTON_NO_CALLBACK,
TaskOptionsCallback);
SpecifyButtonDownTextColors( iEditorButton[TAB_OPTIONS], FONT_YELLOW, FONT_ORANGE );
+39 -31
View File
@@ -398,8 +398,13 @@ void DoTaskbar(void)
iDrawMode = DRAW_MODE_NOTHING;//dnl ch22 210909
ClickEditorButton( TAB_OPTIONS );
TerrainTileDrawMode = TERRAIN_TILES_NODRAW;
if(gfVanillaMode)//dnl ch33 160909
if (gfResizeMapOnLoading)
ClickEditorButton(OPTIONS_RESIZE_MAP_ON_LOADING);
if (gfVanillaMode)
ClickEditorButton(OPTIONS_VANILLA_MODE);
SetupTextInputForOptions();
break;
}
@@ -630,7 +635,7 @@ void RenderMapEntryPointsAndLights()
GetGridNoScreenPos( sGridNo, 0, &sScreenX, &sScreenY );
if( sScreenY >= (- 20) && sScreenY < (2 * iScreenHeightOffset + 340) && sScreenX >= (- 40) && sScreenX < SCREEN_WIDTH )
{
DisplayWrappedString( sScreenX, (INT16)(sScreenY-5), 40, 2, FONT10ARIAL, FONT_YELLOW, L"North Entry Point", FONT_BLACK, TRUE, CENTER_JUSTIFIED );
DisplayWrappedString( sScreenX, (INT16)(sScreenY-5), 40, 2, FONT10ARIAL, FONT_YELLOW, iRenderMapEntryPointsAndLightsText[0], FONT_BLACK, TRUE, CENTER_JUSTIFIED );
}
}
sGridNo = gMapInformation.sWestGridNo;
@@ -639,7 +644,7 @@ void RenderMapEntryPointsAndLights()
GetGridNoScreenPos( sGridNo, 0, &sScreenX, &sScreenY );
if( sScreenY >= (- 20) && sScreenY < (2 * iScreenHeightOffset + 340) && sScreenX >= (- 40) && sScreenX < SCREEN_WIDTH )
{
DisplayWrappedString( sScreenX, (INT16)(sScreenY-5), 40, 2, FONT10ARIAL, FONT_YELLOW, L"West Entry Point", FONT_BLACK, TRUE, CENTER_JUSTIFIED );
DisplayWrappedString( sScreenX, (INT16)(sScreenY-5), 40, 2, FONT10ARIAL, FONT_YELLOW, iRenderMapEntryPointsAndLightsText[1], FONT_BLACK, TRUE, CENTER_JUSTIFIED );
}
}
sGridNo = gMapInformation.sEastGridNo;
@@ -648,7 +653,7 @@ void RenderMapEntryPointsAndLights()
GetGridNoScreenPos( sGridNo, 0, &sScreenX, &sScreenY );
if( sScreenY >= (- 20) && sScreenY < (2 * iScreenHeightOffset + 340) && sScreenX >= (- 40) && sScreenX < SCREEN_WIDTH )
{
DisplayWrappedString( sScreenX, (INT16)(sScreenY-5), 40, 2, FONT10ARIAL, FONT_YELLOW, L"East Entry Point", FONT_BLACK, TRUE, CENTER_JUSTIFIED );
DisplayWrappedString( sScreenX, (INT16)(sScreenY-5), 40, 2, FONT10ARIAL, FONT_YELLOW, iRenderMapEntryPointsAndLightsText[2], FONT_BLACK, TRUE, CENTER_JUSTIFIED );
}
}
sGridNo = gMapInformation.sSouthGridNo;
@@ -657,7 +662,7 @@ void RenderMapEntryPointsAndLights()
GetGridNoScreenPos( sGridNo, 0, &sScreenX, &sScreenY );
if( sScreenY >= ( - 20) && sScreenY < (2 * iScreenHeightOffset + 340) && sScreenX >= (- 40) && sScreenX < SCREEN_WIDTH )
{
DisplayWrappedString( sScreenX, (INT16)(sScreenY-5), 40, 2, FONT10ARIAL, FONT_YELLOW, L"South Entry Point", FONT_BLACK, TRUE, CENTER_JUSTIFIED );
DisplayWrappedString( sScreenX, (INT16)(sScreenY-5), 40, 2, FONT10ARIAL, FONT_YELLOW, iRenderMapEntryPointsAndLightsText[3], FONT_BLACK, TRUE, CENTER_JUSTIFIED );
}
}
sGridNo = gMapInformation.sCenterGridNo;
@@ -666,7 +671,7 @@ void RenderMapEntryPointsAndLights()
GetGridNoScreenPos( sGridNo, 0, &sScreenX, &sScreenY );
if( sScreenY >= (- 20) && sScreenY < (2 * iScreenHeightOffset + 340) && sScreenX >= (- 40) && sScreenX < SCREEN_WIDTH )
{
DisplayWrappedString( sScreenX, (INT16)(sScreenY-5), 40, 2, FONT10ARIAL, FONT_YELLOW, L"Center Entry Point", FONT_BLACK, TRUE, CENTER_JUSTIFIED );
DisplayWrappedString( sScreenX, (INT16)(sScreenY-5), 40, 2, FONT10ARIAL, FONT_YELLOW, iRenderMapEntryPointsAndLightsText[4], FONT_BLACK, TRUE, CENTER_JUSTIFIED );
}
}
sGridNo = gMapInformation.sIsolatedGridNo;
@@ -675,7 +680,7 @@ void RenderMapEntryPointsAndLights()
GetGridNoScreenPos( sGridNo, 0, &sScreenX, &sScreenY );
if( sScreenY >= (- 20) && sScreenY < (2 * iScreenHeightOffset + 340) && sScreenX >= (- 40) && sScreenX < SCREEN_WIDTH )
{
DisplayWrappedString( sScreenX, (INT16)(sScreenY-5), 40, 2, FONT10ARIAL, FONT_YELLOW, L"Isolated Entry Point", FONT_BLACK, TRUE, CENTER_JUSTIFIED );
DisplayWrappedString( sScreenX, (INT16)(sScreenY-5), 40, 2, FONT10ARIAL, FONT_YELLOW, iRenderMapEntryPointsAndLightsText[5], FONT_BLACK, TRUE, CENTER_JUSTIFIED );
}
}
@@ -697,11 +702,11 @@ void RenderMapEntryPointsAndLights()
if( sScreenY >= (- 50) && sScreenY < (2 * iScreenHeightOffset + 300) && sScreenX >= (- 40) && sScreenX < SCREEN_WIDTH )
{
if( LightSprites[ i ].uiFlags & LIGHT_PRIMETIME )
DisplayWrappedString( sScreenX, (INT16)(sScreenY-5), 50, 2, FONT10ARIAL, FONT_ORANGE, L"Prime", FONT_BLACK, TRUE, CENTER_JUSTIFIED );
DisplayWrappedString( sScreenX, (INT16)(sScreenY-5), 50, 2, FONT10ARIAL, FONT_ORANGE, iRenderMapEntryPointsAndLightsText[6], FONT_BLACK, TRUE, CENTER_JUSTIFIED );
else if( LightSprites[ i ].uiFlags & LIGHT_NIGHTTIME )
DisplayWrappedString( sScreenX, (INT16)(sScreenY-5), 50, 2, FONT10ARIAL, FONT_RED, L"Night", FONT_BLACK, TRUE, CENTER_JUSTIFIED );
DisplayWrappedString( sScreenX, (INT16)(sScreenY-5), 50, 2, FONT10ARIAL, FONT_RED, iRenderMapEntryPointsAndLightsText[7], FONT_BLACK, TRUE, CENTER_JUSTIFIED );
else
DisplayWrappedString( sScreenX, (INT16)(sScreenY-5), 50, 2, FONT10ARIAL, FONT_YELLOW, L"24Hour", FONT_BLACK, TRUE, CENTER_JUSTIFIED );
DisplayWrappedString( sScreenX, (INT16)(sScreenY-5), 50, 2, FONT10ARIAL, FONT_YELLOW, iRenderMapEntryPointsAndLightsText[8], FONT_BLACK, TRUE, CENTER_JUSTIFIED );
}
}
}
@@ -712,26 +717,26 @@ void BuildTriggerName( OBJECTTYPE *pItem, STR16 szItemName )
if( pItem->usItem == SWITCH )
{
if( (*pItem)[0]->data.misc.bFrequency == PANIC_FREQUENCY )
swprintf( szItemName, L"Panic Trigger1" );
swprintf( szItemName, iBuildTriggerNameText[0] );
else if( (*pItem)[0]->data.misc.bFrequency == PANIC_FREQUENCY_2 )
swprintf( szItemName, L"Panic Trigger2" );
swprintf( szItemName, iBuildTriggerNameText[1] );
else if( (*pItem)[0]->data.misc.bFrequency == PANIC_FREQUENCY_3 )
swprintf( szItemName, L"Panic Trigger3" );
swprintf( szItemName, iBuildTriggerNameText[2] );
else
swprintf( szItemName, L"Trigger%d", (*pItem)[0]->data.misc.bFrequency - 50 );
swprintf( szItemName, iBuildTriggerNameText[3], (*pItem)[0]->data.misc.bFrequency - 50 );
}
else
{ //action item
if( (*pItem)[0]->data.misc.bDetonatorType == BOMB_PRESSURE )
swprintf( szItemName, L"Pressure Action" );
swprintf( szItemName, iBuildTriggerNameText[4] );
else if( (*pItem)[0]->data.misc.bFrequency == PANIC_FREQUENCY )
swprintf( szItemName, L"Panic Action1" );
swprintf( szItemName, iBuildTriggerNameText[5] );
else if( (*pItem)[0]->data.misc.bFrequency == PANIC_FREQUENCY_2 )
swprintf( szItemName, L"Panic Action2" );
swprintf( szItemName, iBuildTriggerNameText[6] );
else if( (*pItem)[0]->data.misc.bFrequency == PANIC_FREQUENCY_3 )
swprintf( szItemName, L"Panic Action3" );
swprintf( szItemName, iBuildTriggerNameText[7] );
else
swprintf( szItemName, L"Action%d", (*pItem)[0]->data.misc.bFrequency - 50 );
swprintf( szItemName, iBuildTriggerNameText[8], (*pItem)[0]->data.misc.bFrequency - 50 );
}
}
@@ -748,7 +753,7 @@ void RenderDoorLockInfo()
if( DoorTable[ i ].ubLockID != 255 )
swprintf( str, L"%S", LockTable[ DoorTable[ i ].ubLockID ].ubEditorName );
else
swprintf( str, L"No Lock ID" );
swprintf( str, iRenderDoorLockInfoText[0] );
xp = sScreenX - 10;
yp = sScreenY - 40;
DisplayWrappedString( xp, yp, 60, 2, FONT10ARIAL, FONT_LTKHAKI, str, FONT_BLACK, TRUE, CENTER_JUSTIFIED );
@@ -760,30 +765,30 @@ void RenderDoorLockInfo()
switch( DoorTable[ i ].ubTrapID )
{
case EXPLOSION:
swprintf( str, L"Explosion Trap" );
swprintf( str, iRenderDoorLockInfoText[1] );
break;
case ELECTRIC:
swprintf( str, L"Electric Trap" );
swprintf( str, iRenderDoorLockInfoText[2] );
break;
case SIREN:
swprintf( str, L"Siren Trap" );
swprintf( str, iRenderDoorLockInfoText[3] );
break;
case SILENT_ALARM:
swprintf( str, L"Silent Alarm" );
swprintf( str, iRenderDoorLockInfoText[4] );
break;
case SUPER_ELECTRIC:
swprintf( str, L"Super Electric Trap" );
swprintf( str, iRenderDoorLockInfoText[5] );
break;
// WANNE: Fix a vanilla glitch in the editor: The text for the brothel siren trap was missing.
// Fixed by Tron (Stracciatella): Revision: 6253
case BROTHEL_SIREN:
swprintf( str, L"Brothel Siren Trap" );
swprintf( str, iRenderDoorLockInfoText[6] );
break;
}
xp = sScreenX + 20 - StringPixLength( str, FONT10ARIAL ) / 2;
yp = sScreenY;
mprintf( xp, yp, str );
swprintf( str, L"Trap Level %d", DoorTable[ i ].ubTrapLevel );
swprintf( str, iRenderDoorLockInfoText[7], DoorTable[ i ].ubTrapLevel );
xp = sScreenX + 20 - StringPixLength( str, FONT10ARIAL ) / 2;
mprintf( xp, yp+10, str );
}
@@ -906,12 +911,15 @@ void RenderEditorInfo( )
switch( iCurrentTaskbar )
{
case TASK_OPTIONS:
mprintf(iScreenWidthOffset+71+15, SCREEN_HEIGHT-117, L"Save map in original JA2 map format (Version: 5.00 / 25)");//dnl ch33 160909
mprintf(iScreenWidthOffset+71+15, SCREEN_HEIGHT-117, iRenderEditorInfoText[0]);//dnl ch33 160909
if( !gfWorldLoaded || giCurrentTilesetID < 0 )
mprintf( iScreenWidthOffset + 260, 2 * iScreenHeightOffset + 445, L"No map currently loaded." );
mprintf( iScreenWidthOffset + 260, 2 * iScreenHeightOffset + 445, iRenderEditorInfoText[1] );
else
mprintf( iScreenWidthOffset + 260, 2 * iScreenHeightOffset + 445, L"File: %S, Current Tileset: %s",
gubFilename, gTilesets[ giCurrentTilesetID ].zName );
mprintf( iScreenWidthOffset + 260, 2 * iScreenHeightOffset + 445, iRenderEditorInfoText[2], gubFilename, gTilesets[ giCurrentTilesetID ].zName );
// TODO.MAP
mprintf(iScreenWidthOffset+20, SCREEN_HEIGHT-40, iRenderEditorInfoText[3]);
UpdateOptions();
break;
case TASK_TERRAIN:
+12 -11
View File
@@ -27,6 +27,7 @@
#include "environment.h"
#include "selectwin.h"
#include "Simple Render Utils.h"
#include "Text.h"
#endif
BOOLEAN fBuildingShowRoofs, fBuildingShowWalls, fBuildingShowRoomInfo;
@@ -82,16 +83,16 @@ void UpdateBuildingsInfo()
//print the headers on top of the columns
SetFont( SMALLCOMPFONT );
SetFontForeground( FONT_RED );
mprintfEditor( iScreenWidthOffset + 112, 2 * iScreenHeightOffset + 362, L"TOGGLE");
mprintfEditor( iScreenWidthOffset + 114, 2 * iScreenHeightOffset + 372, L"VIEWS");
mprintfEditor( iScreenWidthOffset + 112, 2 * iScreenHeightOffset + 362, iUpdateBuildingsInfoText[0]);
mprintfEditor( iScreenWidthOffset + 114, 2 * iScreenHeightOffset + 372, iUpdateBuildingsInfoText[1]);
SetFontForeground( FONT_YELLOW );
mprintfEditor( iScreenWidthOffset + 185, 2 * iScreenHeightOffset + 362, L"SELECTION METHOD");
mprintfEditor( iScreenWidthOffset + 185, 2 * iScreenHeightOffset + 362, iUpdateBuildingsInfoText[2]);
SetFontForeground( FONT_LTGREEN );
mprintfEditor( iScreenWidthOffset + 290, 2 * iScreenHeightOffset + 362, L"SMART METHOD");
mprintfEditor( iScreenWidthOffset + 290, 2 * iScreenHeightOffset + 362, iUpdateBuildingsInfoText[3]);
SetFontForeground( FONT_LTBLUE );
mprintfEditor( iScreenWidthOffset + 390, 2 * iScreenHeightOffset + 362, L"BUILDING METHOD");
mprintfEditor( iScreenWidthOffset + 390, 2 * iScreenHeightOffset + 362, iUpdateBuildingsInfoText[4]);
SetFontForeground( FONT_GRAY2 );
mprintfEditor( iScreenWidthOffset + 437, 2 * iScreenHeightOffset + 404, L"Room#" );
mprintfEditor( iScreenWidthOffset + 437, 2 * iScreenHeightOffset + 404, iUpdateBuildingsInfoText[5] );
}
//Uses a recursive method to elimate adjacent tiles of structure information.
@@ -653,13 +654,13 @@ void RenderDoorEditingWindow()
SetFontForeground( FONT_YELLOW );
SetFontShadow( FONT_NEARBLACK );
SetFontBackground( 0 );
mprintf( iScreenWidthOffset + 210, iScreenHeightOffset + 140, L"Editing lock attributes at map index %d.", iDoorMapIndex );
mprintf( iScreenWidthOffset + 210, iScreenHeightOffset + 140, iRenderDoorEditingWindowText[0], iDoorMapIndex );
SetFontForeground( FONT_GRAY2 );
mprintf( iScreenWidthOffset + 238, iScreenHeightOffset + 160, L"Lock ID" );
mprintf( iScreenWidthOffset + 238, iScreenHeightOffset + 180, L"Trap Type" );
mprintf( iScreenWidthOffset + 238, iScreenHeightOffset + 200, L"Trap Level" );
mprintf( iScreenWidthOffset + 238, iScreenHeightOffset + 218, L"Locked" );
mprintf( iScreenWidthOffset + 238, iScreenHeightOffset + 160, iRenderDoorEditingWindowText[1] );
mprintf( iScreenWidthOffset + 238, iScreenHeightOffset + 180, iRenderDoorEditingWindowText[2] );
mprintf( iScreenWidthOffset + 238, iScreenHeightOffset + 200, iRenderDoorEditingWindowText[3] );
mprintf( iScreenWidthOffset + 238, iScreenHeightOffset + 218, iRenderDoorEditingWindowText[4] );
}
void KillDoorEditing()
+14 -14
View File
@@ -497,35 +497,35 @@ void InitEditorItemsInfo(UINT32 uiItemType)
{
if( i == PRESSURE_ACTION_ID )
{
swprintf( pStr, L"Pressure Action" );
swprintf( pStr, pInitEditorItemsInfoText[0] );
}
else if( i < 2 )
{
if( usCounter == SWITCH )
swprintf( pStr, L"Panic Trigger1" );
swprintf( pStr, pInitEditorItemsInfoText[5] );
else
swprintf( pStr, L"Panic Action1" );
swprintf( pStr, pInitEditorItemsInfoText[1] );
}
else if( i < 4 )
{
if( usCounter == SWITCH )
swprintf( pStr, L"Panic Trigger2" );
swprintf( pStr, pInitEditorItemsInfoText[6] );
else
swprintf( pStr, L"Panic Action2" );
swprintf( pStr, pInitEditorItemsInfoText[2] );
}
else if( i < 6 )
{
if( usCounter == SWITCH )
swprintf( pStr, L"Panic Trigger3" );
swprintf( pStr, pInitEditorItemsInfoText[7] );
else
swprintf( pStr, L"Panic Action3" );
swprintf( pStr, pInitEditorItemsInfoText[3] );
}
else
{
if( usCounter == SWITCH )
swprintf( pStr, L"Trigger%d", (i-4)/2 );
swprintf( pStr, pInitEditorItemsInfoText[8], (i-4)/2 );
else
swprintf( pStr, L"Action%d", (i-4)/2 );
swprintf( pStr, pInitEditorItemsInfoText[4], (i-4)/2 );
}
}
@@ -1669,11 +1669,11 @@ void DisplayItemStatistics()
LoadItemInfo( usItemIndex, pItemName, NULL );
mprintf( iScreenWidthOffset + 50 - StringPixLength( pItemName , SMALLCOMPFONT )/2, 2 * iScreenHeightOffset + 403, pItemName );
mprintf( iScreenWidthOffset + 2, 2 * iScreenHeightOffset + 410, L"Status Info Line 1");
mprintf( iScreenWidthOffset + 2, 2 * iScreenHeightOffset + 420, L"Status Info Line 2");
mprintf( iScreenWidthOffset + 2, 2 * iScreenHeightOffset + 430, L"Status Info Line 3");
mprintf( iScreenWidthOffset + 2, 2 * iScreenHeightOffset + 440, L"Status Info Line 4");
mprintf( iScreenWidthOffset + 2, 2 * iScreenHeightOffset + 450, L"Status Info Line 5");
mprintf( iScreenWidthOffset + 2, 2 * iScreenHeightOffset + 410, pDisplayItemStatisticsTex[0]);
mprintf( iScreenWidthOffset + 2, 2 * iScreenHeightOffset + 420, pDisplayItemStatisticsTex[1]);
mprintf( iScreenWidthOffset + 2, 2 * iScreenHeightOffset + 430, pDisplayItemStatisticsTex[2]);
mprintf( iScreenWidthOffset + 2, 2 * iScreenHeightOffset + 440, pDisplayItemStatisticsTex[3]);
mprintf( iScreenWidthOffset + 2, 2 * iScreenHeightOffset + 450, pDisplayItemStatisticsTex[4]);
}
+30 -24
View File
@@ -56,6 +56,7 @@
#include "EditorMapInfo.h"
#include "environment.h"
#include "Simple Render Utils.h"
#include "Text.h"
#endif
//forward declarations of common classes to eliminate includes
@@ -85,6 +86,11 @@ void SetupTextInputForOptions(void)//dnl ch52 091009
void UpdateOptions()
{
if (gfResizeMapOnLoading)
EnableTextField(1);
else
DisableTextField(1);
SetFont( FONT10ARIAL );
SetFontShadow( FONT_NEARBLACK );
@@ -98,11 +104,11 @@ void UpdateOptions()
void ExtractAndUpdateOptions(void)//dnl ch52 091009
{
iNewMapWorldRows = max(min(GetNumericStrictValueFromField(1), 9600), OLD_WORLD_ROWS);
iNewMapWorldRows = max(min(GetNumericStrictValueFromField(1), WORLD_ROWS_MAX), OLD_WORLD_ROWS);
iNewMapWorldRows /= 4;
iNewMapWorldRows *= 4;
iNewMapWorldCols = iNewMapWorldRows;
//iNewMapWorldCols = max(min(GetNumericStrictValueFromField(2), 9600), OLD_WORLD_COLS);
//iNewMapWorldCols = max(min(GetNumericStrictValueFromField(2), WORLD_COLS_MAX), OLD_WORLD_COLS);
//iNewMapWorldCols /= 4;
//iNewMapWorldCols *= 4;
}
@@ -141,7 +147,7 @@ void SetupTextInputForMapInfo()
swprintf( str, L"%d", gExitGrid.ubGotoSectorZ );
AddTextInputField( iScreenWidthOffset + 338, 2 * iScreenHeightOffset + 383, 30, 18, MSYS_PRIORITY_NORMAL, str, 1, INPUTTYPE_NUMERICSTRICT );
swprintf( str, L"%d", gExitGrid.usGridNo );
AddTextInputField( iScreenWidthOffset + 338, 2 * iScreenHeightOffset + 403, 45, 18, MSYS_PRIORITY_NORMAL, str, 6, INPUTTYPE_NUMERICSTRICT );
AddTextInputField( iScreenWidthOffset + 338, 2 * iScreenHeightOffset + 403, 50, 18, MSYS_PRIORITY_NORMAL, str, 7, INPUTTYPE_NUMERICSTRICT );
}
void UpdateMapInfo()
@@ -150,41 +156,41 @@ void UpdateMapInfo()
SetFontShadow( FONT_NEARBLACK );
SetFontForeground( FONT_RED );
mprintf( iScreenWidthOffset + 38, 2 * iScreenHeightOffset + 399, L"R");
mprintf( iScreenWidthOffset + 38, 2 * iScreenHeightOffset + 399, pUpdateMapInfoText[0]);
SetFontForeground( FONT_GREEN );
mprintf( iScreenWidthOffset + 38, 2 * iScreenHeightOffset + 419, L"G");
mprintf( iScreenWidthOffset + 38, 2 * iScreenHeightOffset + 419, pUpdateMapInfoText[1]);
SetFontForeground( FONT_DKBLUE );
mprintf( iScreenWidthOffset + 38, 2 * iScreenHeightOffset + 439, L"B");
mprintf( iScreenWidthOffset + 38, 2 * iScreenHeightOffset + 439, pUpdateMapInfoText[2]);
SetFontForeground( FONT_YELLOW );
mprintf( iScreenWidthOffset + 65, 2 * iScreenHeightOffset + 369, L"Prime" );
mprintf( iScreenWidthOffset + 65, 2 * iScreenHeightOffset + 382, L"Night" );
mprintf( iScreenWidthOffset + 65, 2 * iScreenHeightOffset + 397, L"24Hrs" );
mprintf( iScreenWidthOffset + 65, 2 * iScreenHeightOffset + 369, pUpdateMapInfoText[3] );
mprintf( iScreenWidthOffset + 65, 2 * iScreenHeightOffset + 382, pUpdateMapInfoText[4] );
mprintf( iScreenWidthOffset + 65, 2 * iScreenHeightOffset + 397, pUpdateMapInfoText[5] );
SetFontForeground( FONT_YELLOW );
mprintf( iScreenWidthOffset + 148, 2 * iScreenHeightOffset + 399, L"Radius");
mprintf( iScreenWidthOffset + 148, 2 * iScreenHeightOffset + 399, pUpdateMapInfoText[6] );
if( !gfBasement && !gfCaves )
SetFontForeground( FONT_DKYELLOW );
mprintf( iScreenWidthOffset + 148, 2 * iScreenHeightOffset + 414, L"Underground" );
mprintf( iScreenWidthOffset + 148, 2 * iScreenHeightOffset + 423, L"Light Level" );
mprintf( iScreenWidthOffset + 148, 2 * iScreenHeightOffset + 414, pUpdateMapInfoText[7] );
mprintf( iScreenWidthOffset + 148, 2 * iScreenHeightOffset + 423, pUpdateMapInfoText[8] );
SetFontForeground( FONT_YELLOW );
mprintf( iScreenWidthOffset + 230, 2 * iScreenHeightOffset + 369, L"Outdoors" );
mprintf( iScreenWidthOffset + 230, 2 * iScreenHeightOffset + 384, L"Basement" );
mprintf( iScreenWidthOffset + 230, 2 * iScreenHeightOffset + 399, L"Caves" );
mprintf( iScreenWidthOffset + 230, 2 * iScreenHeightOffset + 369, pUpdateMapInfoText[9] );
mprintf( iScreenWidthOffset + 230, 2 * iScreenHeightOffset + 384, pUpdateMapInfoText[10] );
mprintf( iScreenWidthOffset + 230, 2 * iScreenHeightOffset + 399, pUpdateMapInfoText[11] );
SetFontForeground( FONT_ORANGE );
mprintf( iScreenWidthOffset + 250, 2 * iScreenHeightOffset + 420, L"Restricted" );
mprintf( iScreenWidthOffset + 250, 2 * iScreenHeightOffset + 430, L"Scroll ID" );
mprintf( iScreenWidthOffset + 250, 2 * iScreenHeightOffset + 420, pUpdateMapInfoText[12] );
mprintf( iScreenWidthOffset + 250, 2 * iScreenHeightOffset + 430, pUpdateMapInfoText[13] );
SetFontForeground( FONT_YELLOW );
mprintf( iScreenWidthOffset + 368, 2 * iScreenHeightOffset + 363, L"Destination");
mprintf( iScreenWidthOffset + 368, 2 * iScreenHeightOffset + 372, L"Sector" );
mprintf( iScreenWidthOffset + 368, 2 * iScreenHeightOffset + 383, L"Destination");
mprintf( iScreenWidthOffset + 368, 2 * iScreenHeightOffset + 392, L"Bsmt. Level" );
mprintf( iScreenWidthOffset + 383, 2 * iScreenHeightOffset + 403, L"Dest." );
mprintf( iScreenWidthOffset + 383, 2 * iScreenHeightOffset + 412, L"GridNo" );
mprintf( iScreenWidthOffset + 368, 2 * iScreenHeightOffset + 363, pUpdateMapInfoText[14] );
mprintf( iScreenWidthOffset + 368, 2 * iScreenHeightOffset + 372, pUpdateMapInfoText[15] );
mprintf( iScreenWidthOffset + 368, 2 * iScreenHeightOffset + 383, pUpdateMapInfoText[16] );
mprintf( iScreenWidthOffset + 368, 2 * iScreenHeightOffset + 392, pUpdateMapInfoText[17] );
mprintf( iScreenWidthOffset + 388, 2 * iScreenHeightOffset + 403, pUpdateMapInfoText[18] );
mprintf( iScreenWidthOffset + 388, 2 * iScreenHeightOffset + 412, pUpdateMapInfoText[19] );
SetFontForeground( FONT_RED );
}
@@ -280,7 +286,7 @@ void ExtractAndUpdateMapInfo()
gExitGrid.ubGotoSectorY = (UINT8)max( min( gExitGrid.ubGotoSectorY, 16 ), 1 );
}
gExitGrid.ubGotoSectorZ = (UINT8)max( min( GetNumericStrictValueFromField( 8 ), 3 ), 0 );
gExitGrid.usGridNo = max( min( GetNumericStrictValueFromField( 9 ), 25600 ), 0 );
gExitGrid.usGridNo = max( min( GetNumericStrictValueFromField( 9 ), (WORLD_COLS_MAX * WORLD_ROWS_MAX) ), 0 );
UpdateMapInfoFields();
}
+126 -121
View File
@@ -120,6 +120,7 @@ CHAR16 gszCivGroupNames[ NUM_CIV_GROUPS ][ 20 ] =
// SCHEDULE_ACTION_ENTERSECTOR,
// SCHEDULE_ACTION_STAYINSECTOR,
// SCHEDULE_ACTION_SLEEP,
/*
CHAR16 gszScheduleActions[ NUM_SCHEDULE_ACTIONS ][20] =
{
L"No action",
@@ -134,7 +135,7 @@ CHAR16 gszScheduleActions[ NUM_SCHEDULE_ACTIONS ][20] =
L"Sleep",
L"Ignore this!"
};
*/
enum
{
@@ -272,16 +273,17 @@ BOOLEAN gfShowCivilians = TRUE;
INT16 sCurBaseDiff = DEFAULT_DIFF;
BOOLEAN fAskForBaseDifficulty = TRUE;
STR16 zDiffNames[NUM_DIFF_LVLS] = { L"Wimp", L"Easy", L"Average", L"Tough", L"Steroid Users Only" };
//STR16 zDiffNames[NUM_DIFF_LVLS] = { L"Wimp", L"Easy", L"Average", L"Tough", L"Steroid Users Only" };
INT16 sBaseStat[NUM_DIFF_LVLS] = { 50, 60, 70, 80, 90 };
INT16 sBaseExpLvl[NUM_DIFF_LVLS] = { 1, 3, 5, 7, 9 };
/*
STR16 EditMercStat[12] = { L"Max Health",L"Cur Health",L"Strength",
L"Agility",L"Dexterity",L"Charisma",
L"Wisdom",L"Marksmanship",L"Explosives",
L"Medical",L"Scientific",L"Exp Level" };
*/
#define NUM_MERC_ORDERS 8
/*
STR16 EditMercOrders[8] = { L"Stationary",L"On Guard",L"Close Patrol",
L"Far Patrol",L"Point Patrol",L"On Call",
L"Seek Enemy", L"Random Point Patrol"};
@@ -289,7 +291,7 @@ STR16 EditMercOrders[8] = { L"Stationary",L"On Guard",L"Close Patrol",
STR16 EditMercAttitudes[6] = { L"Defensive",L"Brave Loner",L"Brave Buddy",
L"Cunning Loner",L"Cunning Buddy",
L"Aggressive" };
*/
//information for bodytypes.
#ifdef RANDOM
#undef RANDOM
@@ -835,7 +837,7 @@ void DisplayEditMercWindow( void )
SetFont( FONT12POINT1 );
// Name window
gprintf( iXPos + 128, iYPos + 3, L"Merc Name:" );
gprintf( iXPos + 128, iYPos + 3, pDisplayEditMercWindowText[0] );
ColorFillVideoSurfaceArea(FRAME_BUFFER, iXPos + 128, iYPos + 16, iXPos + 128 + 104, iYPos + 16 + 19, usFillColorDark );
ColorFillVideoSurfaceArea(FRAME_BUFFER, iXPos + 129, iYPos + 17, iXPos + 128 + 104, iYPos + 17 + 19, usFillColorLight );
ColorFillVideoSurfaceArea(FRAME_BUFFER, iXPos + 129, iYPos + 17, iXPos + 128 + 103, iYPos + 17 + 18, usFillColorTextBk );
@@ -843,7 +845,7 @@ void DisplayEditMercWindow( void )
gprintf( iXPos + 130 + iXOff, iYPos + 20, L"%s", pSoldier->name );
// Orders window
gprintf( iXPos + 128, iYPos + 38, L"Orders:" );
gprintf( iXPos + 128, iYPos + 38, pDisplayEditMercWindowText[1] );
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 + 103, iYPos + 52 + 18, usFillColorTextBk );
@@ -851,7 +853,7 @@ void DisplayEditMercWindow( void )
gprintf( iXPos + 130 + iXOff, iYPos + 55, L"%s", EditMercOrders[pSoldier->aiData.bOrders] );
// Combat window
gprintf( iXPos + 128, iYPos + 73, L"Combat Attitude:" );
gprintf( iXPos + 128, iYPos + 73, pDisplayEditMercWindowText[2] );
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 + 103, iYPos + 87 + 18, usFillColorTextBk );
@@ -1397,9 +1399,9 @@ void CreateEditMercWindow( void )
iEditMercBkgrndArea = CreateHotSpot((INT16)iXPos, (INT16)iYPos, (INT16)iWidth, (INT16)iHeight, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, EditMercBkgrndCallback );
iEditMercColorPage = CreateTextButton( L"Merc Colors", (INT16)FONT12POINT1, FONT_BLACK, FONT_BLACK,
iEditMercColorPage = CreateTextButton( pCreateEditMercWindowText[0], (INT16)FONT12POINT1, FONT_BLACK, FONT_BLACK,
BUTTON_USE_DEFAULT, (INT16)(iXPos + 183), (INT16)(iYPos + 315), 80, 20, BUTTON_NO_TOGGLE, MSYS_PRIORITY_NORMAL + 1, DEFAULT_MOVE_CALLBACK, EditMercChangeToColorPageCallback );
iEditMercEnd = CreateTextButton( L"Done", (INT16)FONT12POINT1, FONT_MCOLOR_BLACK, FONT_BLACK,
iEditMercEnd = CreateTextButton( pCreateEditMercWindowText[1], (INT16)FONT12POINT1, FONT_MCOLOR_BLACK, FONT_BLACK,
BUTTON_USE_DEFAULT, (INT16)(iXPos + 183), (INT16)(iYPos + 337), 80, 20, BUTTON_NO_TOGGLE, MSYS_PRIORITY_NORMAL + 1, DEFAULT_MOVE_CALLBACK, EditMercDoneEditCallback );
// Disable color editing for PC Mercs
@@ -1408,13 +1410,13 @@ void CreateEditMercWindow( void )
iEditorButton[8] = QuickCreateButton( giEditMercImage[0], (INT16)(iXPos + 98), (INT16)(iYPos + 51), BUTTON_NO_TOGGLE, MSYS_PRIORITY_NORMAL + 1, DEFAULT_MOVE_CALLBACK, EditMercPrevOrderCallback );
iEditorButton[9] = QuickCreateButton( giEditMercImage[1], (INT16)(iXPos + 233), (INT16)(iYPos + 51), BUTTON_NO_TOGGLE, MSYS_PRIORITY_NORMAL + 1, DEFAULT_MOVE_CALLBACK, EditMercNextOrderCallback );
SetButtonFastHelpText( iEditorButton[8], L"Previous merc standing orders" );
SetButtonFastHelpText( iEditorButton[9], L"Next merc standing orders" );
SetButtonFastHelpText( iEditorButton[8], pCreateEditMercWindowText[2] );
SetButtonFastHelpText( iEditorButton[9], pCreateEditMercWindowText[3] );
iEditorButton[10] = QuickCreateButton( giEditMercImage[0], (INT16)(iXPos + 98), (INT16)(iYPos + 86), BUTTON_NO_TOGGLE, MSYS_PRIORITY_NORMAL + 1, DEFAULT_MOVE_CALLBACK, EditMercPrevAttCallback );
iEditorButton[11] = QuickCreateButton( giEditMercImage[1], (INT16)(iXPos + 233), (INT16)(iYPos + 86), BUTTON_NO_TOGGLE, MSYS_PRIORITY_NORMAL + 1, DEFAULT_MOVE_CALLBACK, EditMercNextAttCallback );
SetButtonFastHelpText( iEditorButton[10], L"Previous merc combat attitude" );
SetButtonFastHelpText( iEditorButton[11], L"Next merc combat attitude" );
SetButtonFastHelpText( iEditorButton[10], pCreateEditMercWindowText[4] );
SetButtonFastHelpText( iEditorButton[11], pCreateEditMercWindowText[5] );
iEditorButton[12] = QuickCreateButton( giEditMercImage[0], (INT16)(iXPos + 86), (INT16)(iYPos + 110), BUTTON_NO_TOGGLE, MSYS_PRIORITY_NORMAL + 1, DEFAULT_MOVE_CALLBACK, EditMercStatDwnCallback );
iEditorButton[13] = QuickCreateButton( giEditMercImage[1], (INT16)(iXPos + 146), (INT16)(iYPos + 110), BUTTON_NO_TOGGLE, MSYS_PRIORITY_NORMAL + 1, DEFAULT_MOVE_CALLBACK, EditMercStatUpCallback );
@@ -1454,8 +1456,8 @@ void CreateEditMercWindow( void )
for ( x = 12; x < 36; x += 2 )
{
SetButtonFastHelpText( iEditorButton[x], L"Decrease merc stat" );
SetButtonFastHelpText( iEditorButton[x + 1], L"Increase merc stat" );
SetButtonFastHelpText( iEditorButton[x], pCreateEditMercWindowText[6] );
SetButtonFastHelpText( iEditorButton[x + 1], pCreateEditMercWindowText[7] );
}
}
void SetMercOrders( INT8 bOrders )
@@ -2409,34 +2411,34 @@ void DisplayBodyTypeInfo()
CHAR16 str[20];
switch( gpSelected->pBasicPlacement->bBodyType )
{
case RANDOM: swprintf( str, L"Random" ); break;
case REGMALE: swprintf( str, L"Reg Male" ); break;
case BIGMALE: swprintf( str, L"Big Male" ); break;
case STOCKYMALE: swprintf( str, L"Stocky Male" ); break;
case REGFEMALE: swprintf( str, L"Reg Female" ); break;
case TANK_NE: swprintf( str, L"NE Tank" ); break;
case TANK_NW: swprintf( str, L"NW Tank" ); break;
case FATCIV: swprintf( str, L"Fat Civilian" ); break;
case MANCIV: swprintf( str, L"M Civilian" ); break;
case MINICIV: swprintf( str, L"Miniskirt" ); break;
case DRESSCIV: swprintf( str, L"F Civilian" ); break;
case HATKIDCIV: swprintf( str, L"Kid w/ Hat" ); break;
case HUMVEE: swprintf( str, L"Humvee" ); break;
case ELDORADO: swprintf( str, L"Eldorado" ); break;
case ICECREAMTRUCK: swprintf( str, L"Icecream Truck" ); break;
case JEEP: swprintf( str, L"Jeep" ); break;
case KIDCIV: swprintf( str, L"Kid Civilian" ); break;
case COW: swprintf( str, L"Domestic Cow" ); break;
case CRIPPLECIV: swprintf( str, L"Cripple" ); break;
case ROBOTNOWEAPON: swprintf( str, L"Unarmed Robot" ); break;
case LARVAE_MONSTER: swprintf( str, L"Larvae" ); break;
case INFANT_MONSTER: swprintf( str, L"Infant" ); break;
case YAF_MONSTER: swprintf( str, L"Yng F Monster" ); break;
case YAM_MONSTER: swprintf( str, L"Yng M Monster" ); break;
case ADULTFEMALEMONSTER: swprintf( str, L"Adt F Monster" ); break;
case AM_MONSTER: swprintf( str, L"Adt M Monster" ); break;
case QUEENMONSTER: swprintf( str, L"Queen Monster" ); break;
case BLOODCAT: swprintf( str, L"Bloodcat" ); break;
case RANDOM: swprintf( str, pDisplayBodyTypeInfoText[0] ); break;
case REGMALE: swprintf( str, pDisplayBodyTypeInfoText[1] ); break;
case BIGMALE: swprintf( str, pDisplayBodyTypeInfoText[2] ); break;
case STOCKYMALE: swprintf( str, pDisplayBodyTypeInfoText[3] ); break;
case REGFEMALE: swprintf( str, pDisplayBodyTypeInfoText[4] ); break;
case TANK_NE: swprintf( str, pDisplayBodyTypeInfoText[5] ); break;
case TANK_NW: swprintf( str, pDisplayBodyTypeInfoText[6] ); break;
case FATCIV: swprintf( str, pDisplayBodyTypeInfoText[7] ); break;
case MANCIV: swprintf( str, pDisplayBodyTypeInfoText[8] ); break;
case MINICIV: swprintf( str, pDisplayBodyTypeInfoText[9] ); break;
case DRESSCIV: swprintf( str, pDisplayBodyTypeInfoText[10] ); break;
case HATKIDCIV: swprintf( str, pDisplayBodyTypeInfoText[11] ); break;
case HUMVEE: swprintf( str, pDisplayBodyTypeInfoText[12] ); break;
case ELDORADO: swprintf( str, pDisplayBodyTypeInfoText[13] ); break;
case ICECREAMTRUCK: swprintf( str, pDisplayBodyTypeInfoText[14] ); break;
case JEEP: swprintf( str, pDisplayBodyTypeInfoText[15] ); break;
case KIDCIV: swprintf( str, pDisplayBodyTypeInfoText[16] ); break;
case COW: swprintf( str, pDisplayBodyTypeInfoText[17] ); break;
case CRIPPLECIV: swprintf( str, pDisplayBodyTypeInfoText[18] ); break;
case ROBOTNOWEAPON: swprintf( str, pDisplayBodyTypeInfoText[19] ); break;
case LARVAE_MONSTER: swprintf( str, pDisplayBodyTypeInfoText[20] ); break;
case INFANT_MONSTER: swprintf( str, pDisplayBodyTypeInfoText[21] ); break;
case YAF_MONSTER: swprintf( str, pDisplayBodyTypeInfoText[22] ); break;
case YAM_MONSTER: swprintf( str, pDisplayBodyTypeInfoText[23] ); break;
case ADULTFEMALEMONSTER: swprintf( str, pDisplayBodyTypeInfoText[24] ); break;
case AM_MONSTER: swprintf( str, pDisplayBodyTypeInfoText[25] ); break;
case QUEENMONSTER: swprintf( str, pDisplayBodyTypeInfoText[26] ); break;
case BLOODCAT: swprintf( str, pDisplayBodyTypeInfoText[27] ); break;
}
DrawEditorInfoBox( str, FONT10ARIAL, iScreenWidthOffset + 490, 2 * iScreenHeightOffset + 364, 70, 20 );
}
@@ -2468,51 +2470,51 @@ void UpdateMercsInfo()
SetFont( SMALLCOMPFONT );
SetFontForeground( FONT_YELLOW );
SetFontShadow( FONT_NEARBLACK );
mprintf( iScreenWidthOffset + 240, 2 * iScreenHeightOffset + 363, L" --=ORDERS=-- ");
mprintf( iScreenWidthOffset + 240, 2 * iScreenHeightOffset + 419, L"--=ATTITUDE=--");
mprintf( iScreenWidthOffset + 240, 2 * iScreenHeightOffset + 363, pUpdateMercsInfoText[0] );
mprintf( iScreenWidthOffset + 240, 2 * iScreenHeightOffset + 419, pUpdateMercsInfoText[1] );
if( iDrawMode == DRAW_MODE_CREATURE )
{
DisplayBodyTypeInfo();
SetFont( SMALLCOMPFONT );
SetFontForeground( FONT_LTBLUE );
mprintf( iScreenWidthOffset + 493, 2 * iScreenHeightOffset + 416, L"RELATIVE");
mprintf( iScreenWidthOffset + 480, 2 * iScreenHeightOffset + 422, L"ATTRIBUTES");
mprintf( iScreenWidthOffset + 493, 2 * iScreenHeightOffset + 416, pUpdateMercsInfoText[2] );
mprintf( iScreenWidthOffset + 480, 2 * iScreenHeightOffset + 422, pUpdateMercsInfoText[3] );
}
else
{
SetFontForeground( FONT_LTGREEN );
mprintf( iScreenWidthOffset + 480, 2 * iScreenHeightOffset + 363, L"RELATIVE");
mprintf( iScreenWidthOffset + 480, 2 * iScreenHeightOffset + 371, L"EQUIPMENT");
mprintf( iScreenWidthOffset + 480, 2 * iScreenHeightOffset + 363, pUpdateMercsInfoText[4] );
mprintf( iScreenWidthOffset + 480, 2 * iScreenHeightOffset + 371, pUpdateMercsInfoText[5] );
SetFontForeground( FONT_LTBLUE );
mprintf( iScreenWidthOffset + 530, 2 * iScreenHeightOffset + 363, L"RELATIVE");
mprintf( iScreenWidthOffset + 530, 2 * iScreenHeightOffset + 371, L"ATTRIBUTES");
mprintf( iScreenWidthOffset + 530, 2 * iScreenHeightOffset + 363, pUpdateMercsInfoText[6] );
mprintf( iScreenWidthOffset + 530, 2 * iScreenHeightOffset + 371, pUpdateMercsInfoText[7] );
}
if( iDrawMode == DRAW_MODE_ENEMY )
{
SetFont( FONT10ARIAL );
SetFontForeground( FONT_YELLOW );
mprintf( iScreenWidthOffset + 590, 2 * iScreenHeightOffset + 411, L"Army" );
mprintf( iScreenWidthOffset + 590, 2 * iScreenHeightOffset + 425, L"Admin" );
mprintf( iScreenWidthOffset + 590, 2 * iScreenHeightOffset + 439, L"Elite" );
mprintf( iScreenWidthOffset + 590, 2 * iScreenHeightOffset + 411, pUpdateMercsInfoText[8] );
mprintf( iScreenWidthOffset + 590, 2 * iScreenHeightOffset + 425, pUpdateMercsInfoText[9] );
mprintf( iScreenWidthOffset + 590, 2 * iScreenHeightOffset + 439, pUpdateMercsInfoText[10] );
}
break;
case MERC_ATTRIBUTEMODE:
SetFont( FONT10ARIAL );
SetFontForeground( FONT_YELLOW );
SetFontShadow( FONT_NEARBLACK );
mprintf( iScreenWidthOffset + 225, 2 * iScreenHeightOffset + 370, L"Exp. Level");
mprintf( iScreenWidthOffset + 225, 2 * iScreenHeightOffset + 395, L"Life");
mprintf( iScreenWidthOffset + 225, 2 * iScreenHeightOffset + 420, L"LifeMax");
mprintf( iScreenWidthOffset + 225, 2 * iScreenHeightOffset + 445, L"Marksmanship");
mprintf( iScreenWidthOffset + 325, 2 * iScreenHeightOffset + 370, L"Strength");
mprintf( iScreenWidthOffset + 325, 2 * iScreenHeightOffset + 395, L"Agility");
mprintf( iScreenWidthOffset + 325, 2 * iScreenHeightOffset + 420, L"Dexterity");
mprintf( iScreenWidthOffset + 325, 2 * iScreenHeightOffset + 445, L"Wisdom");
mprintf( iScreenWidthOffset + 425, 2 * iScreenHeightOffset + 370, L"Leadership");
mprintf( iScreenWidthOffset + 425, 2 * iScreenHeightOffset + 395, L"Explosives");
mprintf( iScreenWidthOffset + 425, 2 * iScreenHeightOffset + 420, L"Medical");
mprintf( iScreenWidthOffset + 425, 2 * iScreenHeightOffset + 445, L"Mechanical");
mprintf( iScreenWidthOffset + 525, 2 * iScreenHeightOffset + 370, L"Morale");
mprintf( iScreenWidthOffset + 225, 2 * iScreenHeightOffset + 370, pUpdateMercsInfoText[11] );
mprintf( iScreenWidthOffset + 225, 2 * iScreenHeightOffset + 395, pUpdateMercsInfoText[12] );
mprintf( iScreenWidthOffset + 225, 2 * iScreenHeightOffset + 420, pUpdateMercsInfoText[13] );
mprintf( iScreenWidthOffset + 225, 2 * iScreenHeightOffset + 445, pUpdateMercsInfoText[14] );
mprintf( iScreenWidthOffset + 325, 2 * iScreenHeightOffset + 370, pUpdateMercsInfoText[15] );
mprintf( iScreenWidthOffset + 325, 2 * iScreenHeightOffset + 395, pUpdateMercsInfoText[16] );
mprintf( iScreenWidthOffset + 325, 2 * iScreenHeightOffset + 420, pUpdateMercsInfoText[17] );
mprintf( iScreenWidthOffset + 325, 2 * iScreenHeightOffset + 445, pUpdateMercsInfoText[18] );
mprintf( iScreenWidthOffset + 425, 2 * iScreenHeightOffset + 370, pUpdateMercsInfoText[19] );
mprintf( iScreenWidthOffset + 425, 2 * iScreenHeightOffset + 395, pUpdateMercsInfoText[20] );
mprintf( iScreenWidthOffset + 425, 2 * iScreenHeightOffset + 420, pUpdateMercsInfoText[21] );
mprintf( iScreenWidthOffset + 425, 2 * iScreenHeightOffset + 445, pUpdateMercsInfoText[22] );
mprintf( iScreenWidthOffset + 525, 2 * iScreenHeightOffset + 370, pUpdateMercsInfoText[23] );
break;
case MERC_APPEARANCEMODE:
SetFont( FONT10ARIAL );
@@ -2522,10 +2524,10 @@ void UpdateMercsInfo()
SetFontForeground( FONT_DKYELLOW );
SetFontShadow( FONT_NEARBLACK );
mprintf( iScreenWidthOffset + 396, 2 * iScreenHeightOffset + 364, L"Hair color:");
mprintf( iScreenWidthOffset + 396, 2 * iScreenHeightOffset + 388, L"Skin color:");
mprintf( iScreenWidthOffset + 396, 2 * iScreenHeightOffset + 412, L"Vest color:");
mprintf( iScreenWidthOffset + 396, 2 * iScreenHeightOffset + 436, L"Pant color:");
mprintf( iScreenWidthOffset + 396, 2 * iScreenHeightOffset + 364, pUpdateMercsInfoText[24] );
mprintf( iScreenWidthOffset + 396, 2 * iScreenHeightOffset + 388, pUpdateMercsInfoText[25]);
mprintf( iScreenWidthOffset + 396, 2 * iScreenHeightOffset + 412, pUpdateMercsInfoText[26]);
mprintf( iScreenWidthOffset + 396, 2 * iScreenHeightOffset + 436, pUpdateMercsInfoText[27]);
SetFont( SMALLCOMPFONT );
SetFontForeground( FONT_BLACK );
@@ -2539,10 +2541,10 @@ void UpdateMercsInfo()
}
else
{
mprintf( iScreenWidthOffset + 396, 2 * iScreenHeightOffset + 374, L"RANDOM");
mprintf( iScreenWidthOffset + 396, 2 * iScreenHeightOffset + 398, L"RANDOM");
mprintf( iScreenWidthOffset + 396, 2 * iScreenHeightOffset + 422, L"RANDOM");
mprintf( iScreenWidthOffset + 396, 2 * iScreenHeightOffset + 446, L"RANDOM");
mprintf( iScreenWidthOffset + 396, 2 * iScreenHeightOffset + 374, pUpdateMercsInfoText[28]);
mprintf( iScreenWidthOffset + 396, 2 * iScreenHeightOffset + 398, pUpdateMercsInfoText[29]);
mprintf( iScreenWidthOffset + 396, 2 * iScreenHeightOffset + 422, pUpdateMercsInfoText[30]);
mprintf( iScreenWidthOffset + 396, 2 * iScreenHeightOffset + 446, pUpdateMercsInfoText[31]);
ShowEditMercPalettes( NULL ); //will display grey scale to signify random
}
DisplayBodyTypeInfo();
@@ -2554,23 +2556,23 @@ void UpdateMercsInfo()
{ //scope trick
CHAR16 tempStr[500];
swprintf( tempStr, L"%s%s%s%s%s%d.",
L"By specifying a profile index, all of the information will be extracted from the profile ",
L"and override any values that you have edited. It will also disable the editing features ",
L"though, you will still be able to view stats, etc. Pressing ENTER will automatically ",
L"extract the number you have typed. A blank field will clear the profile. The current ",
L"number of profiles range from 0 to ", NUM_PROFILES );
pUpdateMercsInfoText[32],
pUpdateMercsInfoText[33],
pUpdateMercsInfoText[34],
pUpdateMercsInfoText[35],
pUpdateMercsInfoText[36], NUM_PROFILES-1 );
DisplayWrappedString(iScreenWidthOffset + 180, 2 * iScreenHeightOffset + 370, 400, 2, FONT10ARIAL, 146, tempStr, FONT_BLACK, FALSE, LEFT_JUSTIFIED );
SetFont( FONT12POINT1 );
if( gpSelected->pDetailedPlacement->ubProfile == NO_PROFILE )
{
SetFontForeground( FONT_GRAY3 );
mprintfEditor( iScreenWidthOffset + 240, 2 * iScreenHeightOffset + 435, L"Current Profile: n/a ");
mprintfEditor( iScreenWidthOffset + 240, 2 * iScreenHeightOffset + 435, pUpdateMercsInfoText[37]);
}
else
{
SetFontForeground( FONT_WHITE );
ClearTaskbarRegion( iScreenWidthOffset + 240, 2 * iScreenHeightOffset + 435, iScreenWidthOffset + 580, 2 * iScreenHeightOffset + 445 );
mprintf( iScreenWidthOffset + 240, 2 * iScreenHeightOffset + 435, L"Current Profile: %s", gMercProfiles[ gpSelected->pDetailedPlacement->ubProfile ].zName );
mprintf( iScreenWidthOffset + 240, 2 * iScreenHeightOffset + 435, pUpdateMercsInfoText[38], gMercProfiles[ gpSelected->pDetailedPlacement->ubProfile ].zName );
}
}
break;
@@ -2580,25 +2582,25 @@ void UpdateMercsInfo()
SetFontShadow( FONT_NEARBLACK );
switch( gpSelected->pSoldier->aiData.bOrders )
{
case STATIONARY: mprintf( iScreenWidthOffset + 430, 2 * iScreenHeightOffset + 363, L"STATIONARY" ); break;
case ONCALL: mprintf( iScreenWidthOffset + 430, 2 * iScreenHeightOffset + 363, L"ON CALL" ); break;
case ONGUARD: mprintf( iScreenWidthOffset + 430, 2 * iScreenHeightOffset + 363, L"ON GUARD" ); break;
case SEEKENEMY: mprintf( iScreenWidthOffset + 430, 2 * iScreenHeightOffset + 363, L"SEEK ENEMY" ); break;
case CLOSEPATROL: mprintf( iScreenWidthOffset + 430, 2 * iScreenHeightOffset + 363, L"CLOSE PATROL" ); break;
case FARPATROL: mprintf( iScreenWidthOffset + 430, 2 * iScreenHeightOffset + 363, L"FAR PATROL" ); break;
case POINTPATROL: mprintf( iScreenWidthOffset + 430, 2 * iScreenHeightOffset + 363, L"POINT PATROL" ); break;
case RNDPTPATROL: mprintf( iScreenWidthOffset + 430, 2 * iScreenHeightOffset + 363, L"RND PT PATROL" ); break;
case STATIONARY: mprintf( iScreenWidthOffset + 430, 2 * iScreenHeightOffset + 363, pUpdateMercsInfoText[39] ); break;
case ONCALL: mprintf( iScreenWidthOffset + 430, 2 * iScreenHeightOffset + 363, pUpdateMercsInfoText[40] ); break;
case ONGUARD: mprintf( iScreenWidthOffset + 430, 2 * iScreenHeightOffset + 363, pUpdateMercsInfoText[41] ); break;
case SEEKENEMY: mprintf( iScreenWidthOffset + 430, 2 * iScreenHeightOffset + 363, pUpdateMercsInfoText[42] ); break;
case CLOSEPATROL: mprintf( iScreenWidthOffset + 430, 2 * iScreenHeightOffset + 363, pUpdateMercsInfoText[43] ); break;
case FARPATROL: mprintf( iScreenWidthOffset + 430, 2 * iScreenHeightOffset + 363, pUpdateMercsInfoText[44] ); break;
case POINTPATROL: mprintf( iScreenWidthOffset + 430, 2 * iScreenHeightOffset + 363, pUpdateMercsInfoText[45] ); break;
case RNDPTPATROL: mprintf( iScreenWidthOffset + 430, 2 * iScreenHeightOffset + 363, pUpdateMercsInfoText[46] ); break;
}
SetFontForeground( FONT_YELLOW );
mprintf( iScreenWidthOffset + 186, 2 * iScreenHeightOffset + 363, L"Action" );
mprintf( iScreenWidthOffset + 268, 2 * iScreenHeightOffset + 363, L"Time" );
mprintf( iScreenWidthOffset + 309, 2 * iScreenHeightOffset + 363, L"V" );
mprintf( iScreenWidthOffset + 331, 2 * iScreenHeightOffset + 363, L"GridNo 1" );
mprintf( iScreenWidthOffset + 381, 2 * iScreenHeightOffset + 363, L"GridNo 2" );
mprintf( iScreenWidthOffset + 172, 2 * iScreenHeightOffset + 376, L"1)" );
mprintf( iScreenWidthOffset + 172, 2 * iScreenHeightOffset + 397, L"2)" );
mprintf( iScreenWidthOffset + 172, 2 * iScreenHeightOffset + 418, L"3)" );
mprintf( iScreenWidthOffset + 172, 2 * iScreenHeightOffset + 439, L"4)" );
mprintf( iScreenWidthOffset + 186, 2 * iScreenHeightOffset + 363, pUpdateMercsInfoText[47] );
mprintf( iScreenWidthOffset + 268, 2 * iScreenHeightOffset + 363, pUpdateMercsInfoText[48] );
mprintf( iScreenWidthOffset + 309, 2 * iScreenHeightOffset + 363, pUpdateMercsInfoText[49] );
mprintf( iScreenWidthOffset + 331, 2 * iScreenHeightOffset + 363, pUpdateMercsInfoText[50] );
mprintf( iScreenWidthOffset + 381, 2 * iScreenHeightOffset + 363, pUpdateMercsInfoText[51] );
mprintf( iScreenWidthOffset + 172, 2 * iScreenHeightOffset + 376, pUpdateMercsInfoText[52] );
mprintf( iScreenWidthOffset + 172, 2 * iScreenHeightOffset + 397, pUpdateMercsInfoText[53] );
mprintf( iScreenWidthOffset + 172, 2 * iScreenHeightOffset + 418, pUpdateMercsInfoText[54] );
mprintf( iScreenWidthOffset + 172, 2 * iScreenHeightOffset + 439, pUpdateMercsInfoText[55] );
if( gubScheduleInstructions )
{
CHAR16 str[255];
@@ -2606,28 +2608,31 @@ void UpdateMercsInfo()
ColorFillVideoSurfaceArea( FRAME_BUFFER, iScreenWidthOffset + 431, 2 * iScreenHeightOffset + 388, iScreenWidthOffset + 590, 2 * iScreenHeightOffset + 450, Get16BPPColor( FROMRGB( 32, 45, 72 ) ) );
switch( gCurrSchedule.ubAction[ gubCurrentScheduleActionIndex ] )
{
case SCHEDULE_ACTION_LOCKDOOR: swprintf( keyword, L"lock" ); break;
case SCHEDULE_ACTION_UNLOCKDOOR: swprintf( keyword, L"unlock" ); break;
case SCHEDULE_ACTION_OPENDOOR: swprintf( keyword, L"open" ); break;
case SCHEDULE_ACTION_CLOSEDOOR: swprintf( keyword, L"close" ); break;
}
case SCHEDULE_ACTION_LOCKDOOR: swprintf( keyword, pUpdateMercsInfoText[56] ); break;
case SCHEDULE_ACTION_UNLOCKDOOR: swprintf( keyword, pUpdateMercsInfoText[57] ); break;
case SCHEDULE_ACTION_OPENDOOR: swprintf( keyword, pUpdateMercsInfoText[58] ); break;
case SCHEDULE_ACTION_CLOSEDOOR: swprintf( keyword, pUpdateMercsInfoText[59] ); break;
}
switch( gubScheduleInstructions )
{
case SCHEDULE_INSTRUCTIONS_DOOR1:
swprintf( str, L"Click on the gridno adjacent to the door that you wish to %s.", keyword );
swprintf( str, pUpdateMercsInfoText[60], keyword );
break;
case SCHEDULE_INSTRUCTIONS_DOOR2:
swprintf( str, L"Click on the gridno where you wish to move after you %s the door.", keyword );
swprintf( str, pUpdateMercsInfoText[61], keyword );
break;
case SCHEDULE_INSTRUCTIONS_GRIDNO:
swprintf( str, L"Click on the gridno where you wish to move to." );
swprintf( str, pUpdateMercsInfoText[62] );
break;
case SCHEDULE_INSTRUCTIONS_SLEEP:
swprintf( str, L"Click on the gridno where you wish to sleep at. Person will automatically return to original position after waking up." );
swprintf( str, pUpdateMercsInfoText[63] );
default:
return;
}
wcscat( str, L" Hit ESC to abort entering this line in the schedule." );
if ( gCurrSchedule.ubAction[ gubCurrentScheduleActionIndex ] == SCHEDULE_ACTION_SLEEP ) swprintf( str, pUpdateMercsInfoText[63] );
wcscat( str, pUpdateMercsInfoText[64] );
DisplayWrappedString( iScreenWidthOffset + 436, 2 * iScreenHeightOffset + 392, 149, 2, FONT10ARIAL, FONT_YELLOW, str, FONT_BLACK, FALSE, LEFT_JUSTIFIED );
}
break;
@@ -3172,7 +3177,7 @@ void RenderMercStrings()
sYPos += 10;
SetFontForeground( FONT_GRAY2 );
swprintf( str, L"Slot #%d", pSoldier->ubID );
swprintf( str, pRenderMercStringsText[0], pSoldier->ubID );
FindFontCenterCoordinates( sXPos, sYPos, 80, 1, str, TINYFONT1, &sX, &sY );
if( sY < (2 * iScreenHeightOffset + 352 ))
{
@@ -3216,7 +3221,7 @@ void RenderMercStrings()
sYPos += 10;
SetFontForeground( FONT_GRAY2 );
swprintf( str, L"Slot #%d", pSoldier->ubID );
swprintf( str, pRenderMercStringsText[0], pSoldier->ubID );
FindFontCenterCoordinates( sXPos, sYPos, 80, 1, str, TINYFONT1, &sX, &sY );
if( sY < (2 * iScreenHeightOffset + 352) )
{
@@ -3252,7 +3257,7 @@ void RenderMercStrings()
SetFontForeground( FONT_DKRED );
else
SetFontForeground( FONT_RED );
swprintf( str, L"Patrol orders with no waypoints" );
swprintf( str, pRenderMercStringsText[1] );
FindFontCenterCoordinates( sXPos, sYPos, 80, 1, str, TINYFONT1, &sX, &sY );
if( sY < (2 * iScreenHeightOffset + 352) )
{
@@ -3268,7 +3273,7 @@ void RenderMercStrings()
SetFontForeground( FONT_DKRED );
else
SetFontForeground( FONT_RED );
swprintf( str, L"Waypoints with no patrol orders" );
swprintf( str, pRenderMercStringsText[2] );
FindFontCenterCoordinates( sXPos, sYPos, 80, 1, str, TINYFONT1, &sX, &sY );
if( sY < (2 * iScreenHeightOffset + 352) )
{
@@ -3451,7 +3456,7 @@ void StartScheduleAction()
case SCHEDULE_ACTION_GRIDNO:
case SCHEDULE_ACTION_ENTERSECTOR:
case SCHEDULE_ACTION_SLEEP:
ShowEditorButton( MERCS_SCHEDULE_DATA1A + gubCurrentScheduleActionIndex );
ShowEditorButton( MERCS_SCHEDULE_DATA1A + gubCurrentScheduleActionIndex );
HideEditorButton( MERCS_SCHEDULE_DATA1B + gubCurrentScheduleActionIndex );
DisableEditorButtons( MERCS_SCHEDULE_ACTION1, MERCS_SCHEDULE_DATA4B );
DisableTextFields( 1, 4 );
@@ -3530,7 +3535,7 @@ void ClearCurrentSchedule()
for( i = 0; i < 4; i++ )
{
MSYS_SetBtnUserData( iEditorButton[ MERCS_SCHEDULE_ACTION1 + i ], 0, 0 );
SpecifyButtonText( iEditorButton[ MERCS_SCHEDULE_ACTION1 + i ], L"No action" );
SpecifyButtonText( iEditorButton[ MERCS_SCHEDULE_ACTION1 + i ], pClearCurrentScheduleText[0] );
gCurrSchedule.usTime[i] = 0xffff;
SetExclusive24HourTimeValue( (UINT8)(i+1), gCurrSchedule.usTime[ i ] ); //blanks the field
gCurrSchedule.usData1[i] = 0xffffffff;
@@ -3655,7 +3660,7 @@ void CopyMercPlacement( INT32 iMapIndex )
{
if( gsSelectedMercID == -1 )
{
ScreenMsg( FONT_MCOLOR_LTRED, MSG_INTERFACE, L"Placement not copied because no placement selected." );
ScreenMsg( FONT_MCOLOR_LTRED, MSG_INTERFACE, pCopyMercPlacementText[0] );
return;
}
gfSaveBuffer = TRUE;
@@ -3664,7 +3669,7 @@ void CopyMercPlacement( INT32 iMapIndex )
{
gSaveBufferDetailedPlacement = *gpSelected->pDetailedPlacement;
}
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Placement copied." );
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, pCopyMercPlacementText[1] );
}
void PasteMercPlacement( INT32 iMapIndex )
@@ -3675,7 +3680,7 @@ void PasteMercPlacement( INT32 iMapIndex )
if( !gfSaveBuffer )
{
ScreenMsg( FONT_MCOLOR_LTRED, MSG_INTERFACE, L"Placement not pasted as no placement is saved in buffer." );
ScreenMsg( FONT_MCOLOR_LTRED, MSG_INTERFACE, pPasteMercPlacementText[0] );
return;
}
@@ -3787,11 +3792,11 @@ void PasteMercPlacement( INT32 iMapIndex )
{
SetEnemyDroppableStatus( gbMercSlotTypes[i-FIRST_MERCS_INVENTORY_BUTTON], FALSE );
}
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Placement pasted." );
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, pPasteMercPlacementText[1] );
}
else
{
ScreenMsg( FONT_MCOLOR_LTRED, MSG_INTERFACE, L"Placement not pasted as the maximum number of placements for this team is already used." );
ScreenMsg( FONT_MCOLOR_LTRED, MSG_INTERFACE, pPasteMercPlacementText[2] );
}
}
}
+5 -5
View File
@@ -39,7 +39,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D &quot;_CRT_SECURE_NO_DEPRECATE&quot;"
AdditionalOptions="/D _CRT_SECURE_NO_DEPRECATE"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;"
@@ -104,7 +104,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D &quot;_CRT_SECURE_NO_DEPRECATE&quot;"
AdditionalOptions="/D _CRT_SECURE_NO_DEPRECATE"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;"
RuntimeLibrary="0"
@@ -165,7 +165,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D &quot;_CRT_SECURE_NO_DEPRECATE&quot;"
AdditionalOptions="/D _CRT_SECURE_NO_DEPRECATE"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;"
RuntimeLibrary="0"
@@ -226,7 +226,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D &quot;_CRT_SECURE_NO_DEPRECATE&quot;"
AdditionalOptions="/D _CRT_SECURE_NO_DEPRECATE"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;"
@@ -291,7 +291,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D &quot;_CRT_SECURE_NO_DEPRECATE&quot;"
AdditionalOptions="/D _CRT_SECURE_NO_DEPRECATE"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;"
+56 -43
View File
@@ -30,14 +30,17 @@
#include "World Items.h"
#include "PopupMenu.h"
#include "pits.h"
#include "Text.h"
#endif
#include "soldier profile type.h"
INT32 giBothCheckboxButton = -1;
INT32 giRealisticCheckboxButton = -1;
INT32 giSciFiCheckboxButton = -1;
INT32 giAlarmTriggerButton = -1;
INT32 giOwnershipGroupButton = -1;
/*
CHAR16 gszActionItemDesc[ NUM_ACTIONITEMS ][ 30 ] =
{
L"Klaxon Mine",
@@ -75,7 +78,7 @@ CHAR16 gszActionItemDesc[ NUM_ACTIONITEMS ][ 30 ] =
L"Bloodcat alarm",
L"Big teargas",
};
*/
const STR16 GetActionItemName( OBJECTTYPE *pItem )
{
if( !pItem || pItem->usItem != ACTION_ITEM )
@@ -487,68 +490,68 @@ void UpdateItemStatsPanel()
if( gpItem && iCurrentTaskbar == TASK_ITEMS &&
gbEditingMode != EDITING_TRIGGERS && gbEditingMode != EDITING_ACTIONITEMS )
{
mprintf( iScreenWidthOffset + 500, 2 * iScreenHeightOffset + 366, L"Toggle hide flag" );
mprintf( iScreenWidthOffset + 500, 2 * iScreenHeightOffset + 366, pUpdateItemStatsPanelText[0] );
}
SetFontForeground( FONT_YELLOW );
switch( gbEditingMode )
{
case EDITING_NOTHING:
if( iCurrentTaskbar == TASK_ITEMS )
mprintf( iScreenWidthOffset + 520, 2 * iScreenHeightOffset + 400, L"No item selected." );
mprintf( iScreenWidthOffset + 520, 2 * iScreenHeightOffset + 400, pUpdateItemStatsPanelText[1] );
else
{
mprintf( iScreenWidthOffset + 500, 2 * iScreenHeightOffset + 390, L"Slot available for" );
mprintf( iScreenWidthOffset + 500, 2 * iScreenHeightOffset + 400, L"random generation." );
mprintf( iScreenWidthOffset + 500, 2 * iScreenHeightOffset + 390, pUpdateItemStatsPanelText[2] );
mprintf( iScreenWidthOffset + 500, 2 * iScreenHeightOffset + 400, pUpdateItemStatsPanelText[3] );
}
return;
case EDITING_KEYS:
if( !gpEditingItemPool )
{
mprintf( iScreenWidthOffset + 500, 2 * iScreenHeightOffset + 400, L"Keys not editable." );
mprintf( iScreenWidthOffset + 500, 2 * iScreenHeightOffset + 400, pUpdateItemStatsPanelText[4] );
return;
}
break;
case EDITING_OWNERSHIP:
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 384, L"ProfileID of owner" );
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 384, pUpdateItemStatsPanelText[5] );
return;
case EDITING_NOT_YET_IMPLEMENTED:
mprintf( iScreenWidthOffset + 500, 2 * iScreenHeightOffset + 400, L"Item class not implemented." );
mprintf( iScreenWidthOffset + 500, 2 * iScreenHeightOffset + 400, pUpdateItemStatsPanelText[6] );
return;
case EDITING_DROPPABLE:
mprintf( iScreenWidthOffset + 500, 2 * iScreenHeightOffset + 400, L"Slot locked as empty.");
mprintf( iScreenWidthOffset + 500, 2 * iScreenHeightOffset + 400, pUpdateItemStatsPanelText[7] );
return;
case EDITING_GUNS:
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 384, L"Status" );
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 404, L"Rounds" );
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 424, L"Trap Level" );
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 384, pUpdateItemStatsPanelText[8] );
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 404, pUpdateItemStatsPanelText[9] );
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 424, pUpdateItemStatsPanelText[10] );
break;
case EDITING_AMMO:
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 384, L"Quantity" );
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 404, L"Trap Level" );
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 384, pUpdateItemStatsPanelText[11] );
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 404, pUpdateItemStatsPanelText[12] );
break;
case EDITING_ARMOUR:
case EDITING_LBEGEAR:
case EDITING_EQUIPMENT:
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 384, L"Status" );
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 404, L"Trap Level" );
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 384, pUpdateItemStatsPanelText[13] );
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 404, pUpdateItemStatsPanelText[14] );
break;
case EDITING_EXPLOSIVES:
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 380, L"Status" );
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 404, L"Quantity" );
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 424, L"Trap Level" );
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 380, pUpdateItemStatsPanelText[15] );
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 404, pUpdateItemStatsPanelText[16] );
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 424, pUpdateItemStatsPanelText[17] );
break;
case EDITING_MONEY:
mprintf( iScreenWidthOffset + 532, 2 * iScreenHeightOffset + 384, L"Dollars" );
mprintf( iScreenWidthOffset + 532, 2 * iScreenHeightOffset + 384, pUpdateItemStatsPanelText[18] );
break;
case EDITING_ACTIONITEMS:
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 369, L"Status" );
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 389, L"Trap Level" );
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 369, pUpdateItemStatsPanelText[19] );
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 389, pUpdateItemStatsPanelText[20] );
break;
case EDITING_TRIGGERS:
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 369, L"Trap Level");
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 389, L"Tolerance" );
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 369, pUpdateItemStatsPanelText[21] );
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 389, pUpdateItemStatsPanelText[22] );
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, pUpdateItemStatsPanelText[23] );
break;
}
if( gpEditingItemPool )
@@ -560,10 +563,10 @@ void UpdateItemStatsPanel()
SetFontForeground( FONT_ORANGE );
else
SetFontForeground( FONT_RED );
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 444, L"Exist Chance" );
mprintf( iScreenWidthOffset + 587, 2 * iScreenHeightOffset + 366, L"B" );
mprintf( iScreenWidthOffset + 609, 2 * iScreenHeightOffset + 366, L"R" );
mprintf( iScreenWidthOffset + 630, 2 * iScreenHeightOffset + 366, L"S" );
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 444, pUpdateItemStatsPanelText[24] );
mprintf( iScreenWidthOffset + 587, 2 * iScreenHeightOffset + 366, pUpdateItemStatsPanelText[25] );
mprintf( iScreenWidthOffset + 609, 2 * iScreenHeightOffset + 366, pUpdateItemStatsPanelText[26] );
mprintf( iScreenWidthOffset + 630, 2 * iScreenHeightOffset + 366, pUpdateItemStatsPanelText[27] );
}
InvalidateRegion( iScreenWidthOffset + 477, 2 * iScreenHeightOffset + 362, 161, 97 );
}
@@ -615,13 +618,13 @@ void SetupGameTypeFlags()
{
giBothCheckboxButton =
CreateCheckBoxButton( iScreenWidthOffset + 573, 2 * iScreenHeightOffset + 365, "EDITOR//radiobutton.sti", MSYS_PRIORITY_NORMAL, BothModesCheckboxCallback );
SetButtonFastHelpText( giBothCheckboxButton, L"Item appears in both Sci-Fi and Realistic modes. (|B)" );
SetButtonFastHelpText( giBothCheckboxButton, pSetupGameTypeFlagsText[0] );
giRealisticCheckboxButton =
CreateCheckBoxButton( iScreenWidthOffset + 595, 2 * iScreenHeightOffset + 365, "EDITOR//radiobutton.sti", MSYS_PRIORITY_NORMAL, RealisticOnlyCheckboxCallback );
SetButtonFastHelpText( giRealisticCheckboxButton, L"Item appears in |Realistic mode only." );
SetButtonFastHelpText( giRealisticCheckboxButton, pSetupGameTypeFlagsText[1] );
giSciFiCheckboxButton =
CreateCheckBoxButton( iScreenWidthOffset + 616, 2 * iScreenHeightOffset + 365, "EDITOR//radiobutton.sti", MSYS_PRIORITY_NORMAL, SciFiOnlyCheckboxCallback );
SetButtonFastHelpText( giSciFiCheckboxButton, L"Item appears in |Sci-Fi mode only." );
SetButtonFastHelpText( giSciFiCheckboxButton, pSetupGameTypeFlagsText[2] );
if( gWorldItems[ gpEditingItemPool->iItemIndex ].usFlags & WORLD_ITEM_REALISTIC_ONLY )
ButtonList[ giRealisticCheckboxButton ]->uiFlags |= (BUTTON_CLICKED_ON | BUTTON_DIRTY);
@@ -674,7 +677,7 @@ void SetupGunGUI()
if( ValidAttachment( SILENCER, gpItem ) )
{
guiAttachmentButton[ SILENCER_ATTACHMENT_BUTTON ] =
CreateTextButton( L"SILENCER", SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( pSetupGunGUIText[0], SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 570, yp, 60, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, ToggleAttachment );
yp += 14;
if( FindAttachment( gpItem, SILENCER ) )
@@ -687,7 +690,7 @@ void SetupGunGUI()
if( ValidAttachment( SNIPERSCOPE, gpItem ) )
{
guiAttachmentButton[ SNIPERSCOPE_ATTACHMENT_BUTTON ] =
CreateTextButton( L"SNIPERSCOPE", SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( pSetupGunGUIText[1], SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 570, yp, 60, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, ToggleAttachment );
yp += 14;
if( FindAttachment( gpItem, SNIPERSCOPE ) )
@@ -700,7 +703,7 @@ void SetupGunGUI()
if( ValidAttachment( LASERSCOPE, gpItem ) )
{
guiAttachmentButton[ LASERSCOPE_ATTACHMENT_BUTTON ] =
CreateTextButton( L"LASERSCOPE", SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( pSetupGunGUIText[2], SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 570, yp, 60, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, ToggleAttachment );
yp += 14;
if( FindAttachment( gpItem, LASERSCOPE ) )
@@ -713,7 +716,7 @@ void SetupGunGUI()
if( ValidAttachment( BIPOD, gpItem ) )
{
guiAttachmentButton[ BIPOD_ATTACHMENT_BUTTON ] =
CreateTextButton( L"BIPOD", SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( pSetupGunGUIText[3], SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 570, yp, 60, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, ToggleAttachment );
yp += 14;
if( FindAttachment( gpItem, BIPOD ) )
@@ -726,7 +729,7 @@ void SetupGunGUI()
if( ValidAttachment( DUCKBILL, gpItem ) )
{
guiAttachmentButton[ DUCKBILL_ATTACHMENT_BUTTON ] =
CreateTextButton( L"DUCKBILL", SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( pSetupGunGUIText[4], SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 570, yp, 60, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, ToggleAttachment );
yp += 14;
if( FindAttachment( gpItem, DUCKBILL ) )
@@ -739,7 +742,7 @@ void SetupGunGUI()
if( ValidAttachment( UNDER_GLAUNCHER, gpItem ) )
{
guiAttachmentButton[ GLAUNCHER_ATTACHMENT_BUTTON ] =
CreateTextButton( L"G-LAUNCHER", SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( pSetupGunGUIText[5], SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 570, yp, 60, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, ToggleAttachment );
yp += 14;
if( FindAttachment( gpItem, UNDER_GLAUNCHER ) )
@@ -858,7 +861,7 @@ void SetupArmourGUI()
if( ValidAttachment( CERAMIC_PLATES, gpItem ) )
{
guiCeramicPlatesButton =
CreateTextButton( L"CERAMIC PLATES", SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( pSetupArmourGUIText[0], SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 558, 2 * iScreenHeightOffset + 375, 72, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, ToggleCeramicPlates );
if( FindAttachment( gpItem, CERAMIC_PLATES ) )
{
@@ -1009,13 +1012,13 @@ void SetupExplosivesGUI()
swprintf( str, L"%d", 100 - gWorldItems[ gpEditingItemPool->iItemIndex ].ubNonExistChance );
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 440, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
}
yp = 375;
yp = 2 * iScreenHeightOffset + 375;
gfDetonator = FALSE;
guiDetonatorButton = -1;
if( ValidAttachment( DETONATOR, gpItem ) )
{
guiDetonatorButton =
CreateTextButton( L"DETONATOR", SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( pSetupExplosivesGUIText[0], SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 570, yp, 60, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, ToggleDetonator );
yp += 14;
if( FindAttachment( gpItem, DETONATOR ) )
@@ -1112,7 +1115,17 @@ void RemoveMoneyGUI()
void SetupOwnershipGUI()
{
CHAR16 str[20];
swprintf( str, L"%d", (*gpItem)[0]->data.owner.ubOwnerProfile );
// WANNE: Check for valid profile id range, if not, set to NO_PROFILE, which defines an "invalid" profile in the source
UINT16 ownerProfileId = (*gpItem)[0]->data.owner.ubOwnerProfile;
if (ownerProfileId >= NUM_PROFILES)
{
ownerProfileId = NO_PROFILE;
_itow(ownerProfileId, str, 10);
}
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
giOwnershipGroupButton =
CreateTextButton( gszCivGroupNames[ (*gpItem)[0]->data.owner.ubOwnerCivGroup ], SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
@@ -1263,7 +1276,7 @@ void SetupTriggersGUI()
{
giAlarmTriggerButton =
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, pSetupTriggersGUIText[0] );
if( (*gpItem).fFlags & OBJECT_ALARM_TRIGGER )
ButtonList[ giAlarmTriggerButton ]->uiFlags |= BUTTON_CLICKED_ON;
}
+130 -127
View File
@@ -290,7 +290,7 @@ void CreateSummaryWindow()
DisableButton( iSummaryButton[ SUMMARY_BACKGROUND ] );
iSummaryButton[ SUMMARY_OKAY ] =
CreateTextButton(L"Okay", FONT12POINT1, FONT_BLACK, FONT_BLACK, BUTTON_USE_DEFAULT, MAP_LEFT+160, MAP_BOTTOM+99, 50, 30, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH, DEFAULT_MOVE_CALLBACK, SummaryOkayCallback);//dnl ch36 190909
CreateTextButton(pCreateSummaryWindowText[0], FONT12POINT1, FONT_BLACK, FONT_BLACK, BUTTON_USE_DEFAULT, MAP_LEFT+160, MAP_BOTTOM+99, 50, 30, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH, DEFAULT_MOVE_CALLBACK, SummaryOkayCallback);//dnl ch36 190909
//GiveButtonDefaultStatus( iSummaryButton[ SUMMARY_OKAY ], DEFAULT_STATUS_WINDOWS95 );
iSummaryButton[ SUMMARY_GRIDCHECKBOX ] =
@@ -304,31 +304,31 @@ void CreateSummaryWindow()
gfRenderProgress = TRUE;
iSummaryButton[ SUMMARY_ALL ] =
CreateTextButton( L"A", SMALLCOMPFONT, FONT_BLACK, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( pCreateSummaryWindowText[1], SMALLCOMPFONT, FONT_BLACK, FONT_BLACK, BUTTON_USE_DEFAULT,
MAP_LEFT+110, MAP_BOTTOM+5, 16, 16, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH, DEFAULT_MOVE_CALLBACK,
SummaryToggleLevelCallback );
if( giCurrentViewLevel == ALL_LEVELS_MASK || giCurrentViewLevel == ALTERNATE_LEVELS_MASK )
ButtonList[ iSummaryButton[ SUMMARY_ALL ] ]->uiFlags |= BUTTON_CLICKED_ON;
iSummaryButton[ SUMMARY_G ] =
CreateTextButton( L"G", SMALLCOMPFONT, FONT_BLACK, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( pCreateSummaryWindowText[2], SMALLCOMPFONT, FONT_BLACK, FONT_BLACK, BUTTON_USE_DEFAULT,
MAP_LEFT+128, MAP_BOTTOM+5, 16, 16, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH, DEFAULT_MOVE_CALLBACK,
SummaryToggleLevelCallback );
if( giCurrentViewLevel == GROUND_LEVEL_MASK || giCurrentViewLevel == ALTERNATE_GROUND_MASK )
ButtonList[ iSummaryButton[ SUMMARY_G ] ]->uiFlags |= BUTTON_CLICKED_ON;
iSummaryButton[ SUMMARY_B1 ] =
CreateTextButton( L"B1", SMALLCOMPFONT, FONT_BLACK, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( pCreateSummaryWindowText[3], SMALLCOMPFONT, FONT_BLACK, FONT_BLACK, BUTTON_USE_DEFAULT,
MAP_LEFT+146, MAP_BOTTOM+5, 16, 16, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH, DEFAULT_MOVE_CALLBACK,
SummaryToggleLevelCallback );
if( giCurrentViewLevel == BASEMENT1_LEVEL_MASK || giCurrentViewLevel == ALTERNATE_B1_MASK )
ButtonList[ iSummaryButton[ SUMMARY_B1 ] ]->uiFlags |= BUTTON_CLICKED_ON;
iSummaryButton[ SUMMARY_B2 ] =
CreateTextButton( L"B2", SMALLCOMPFONT, FONT_BLACK, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( pCreateSummaryWindowText[4], SMALLCOMPFONT, FONT_BLACK, FONT_BLACK, BUTTON_USE_DEFAULT,
MAP_LEFT+164, MAP_BOTTOM+5, 16, 16, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH, DEFAULT_MOVE_CALLBACK,
SummaryToggleLevelCallback );
if( giCurrentViewLevel == BASEMENT2_LEVEL_MASK || giCurrentViewLevel == ALTERNATE_B2_MASK )
ButtonList[ iSummaryButton[ SUMMARY_B2 ] ]->uiFlags |= BUTTON_CLICKED_ON;
iSummaryButton[ SUMMARY_B3 ] =
CreateTextButton( L"B3", SMALLCOMPFONT, FONT_BLACK, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( pCreateSummaryWindowText[5], SMALLCOMPFONT, FONT_BLACK, FONT_BLACK, BUTTON_USE_DEFAULT,
MAP_LEFT+182, MAP_BOTTOM+5, 16, 16, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH, DEFAULT_MOVE_CALLBACK,
SummaryToggleLevelCallback );
if( giCurrentViewLevel == BASEMENT3_LEVEL_MASK || giCurrentViewLevel == ALTERNATE_B3_MASK )
@@ -340,11 +340,11 @@ void CreateSummaryWindow()
ButtonList[ iSummaryButton[ SUMMARY_ALTERNATE ] ]->uiFlags |= BUTTON_CLICKED_ON;
iSummaryButton[ SUMMARY_LOAD ] =
CreateTextButton( L"LOAD", FONT12POINT1, FONT_BLACK, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( pCreateSummaryWindowText[6], FONT12POINT1, FONT_BLACK, FONT_BLACK, BUTTON_USE_DEFAULT,
MAP_LEFT, MAP_BOTTOM+45, 50, 26, BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGH, DEFAULT_MOVE_CALLBACK,
SummaryLoadMapCallback );
iSummaryButton[ SUMMARY_SAVE ] =
CreateTextButton( L"SAVE", FONT12POINT1, FONT_BLACK, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( pCreateSummaryWindowText[7], FONT12POINT1, FONT_BLACK, FONT_BLACK, BUTTON_USE_DEFAULT,
MAP_LEFT+55, MAP_BOTTOM+45, 50, 26, BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGH, DEFAULT_MOVE_CALLBACK,
SummarySaveMapCallback );
iSummaryButton[ SUMMARY_OVERRIDE ] =
@@ -365,7 +365,7 @@ void CreateSummaryWindow()
iSummaryButton[ SUMMARY_UPDATE ] =
CreateTextButton( L"Update", FONT12POINT1, FONT_BLACK, FONT_BLACK, BUTTON_USE_DEFAULT,
CreateTextButton( pCreateSummaryWindowText[8], FONT12POINT1, FONT_BLACK, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 255, iScreenHeightOffset + 15, 40, 16, BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGH, DEFAULT_MOVE_CALLBACK,
SummaryUpdateCallback );
@@ -534,67 +534,67 @@ void RenderSectorInformation()
ePoints++;
//start at 10,35
SetFontForeground( FONT_ORANGE );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 32, L"Tileset: %s", gTilesets[ s->ubTilesetID ].zName );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 32, pRenderSectorInformationText[0], gTilesets[ s->ubTilesetID ].zName );
if( m->ubMapVersion < 10 )
SetFontForeground( FONT_RED );
mprintf(iScreenWidthOffset+10, iScreenHeightOffset+42, L"Version Info: Summary: 1.%02d, Map: %1.2f / %02d", s->ubSummaryVersion, s->dMajorMapVersion, m->ubMapVersion);//dnl ch30 240909
mprintf(iScreenWidthOffset+10, iScreenHeightOffset+42, pRenderSectorInformationText[1], s->ubSummaryVersion, s->dMajorMapVersion, m->ubMapVersion);//dnl ch30 240909
SetFontForeground( FONT_GRAY2 );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 55, L"Number of items: %d", s->usNumItems );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 65, L"Number of lights: %d", s->usNumLights );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 75, L"Number of entry points: %d", ePoints );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 55, pRenderSectorInformationText[2], s->usNumItems );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 65, pRenderSectorInformationText[3], s->usNumLights );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 75, pRenderSectorInformationText[4], ePoints );
if( ePoints )
{
INT32 x;
x = iScreenWidthOffset + 140;
mprintf( x, iScreenHeightOffset + 75, L"(" );
x += StringPixLength( L"(", FONT10ARIAL ) + 2;
if( m->sNorthGridNo != -1 ) { mprintf( x, iScreenHeightOffset + 75, L"N" ); x += StringPixLength( L"N", FONT10ARIAL ) + 2; }
if( m->sEastGridNo != -1 ) { mprintf( x, iScreenHeightOffset + 75, L"E" ); x += StringPixLength( L"E", FONT10ARIAL ) + 2; }
if( m->sSouthGridNo != -1 ) { mprintf( x, iScreenHeightOffset + 75, L"S" ); x += StringPixLength( L"S", FONT10ARIAL ) + 2; }
if( m->sWestGridNo != -1 ) { mprintf( x, iScreenHeightOffset + 75, L"W" ); x += StringPixLength( L"W", FONT10ARIAL ) + 2; }
if( m->sCenterGridNo != -1 ) { mprintf( x, iScreenHeightOffset + 75, L"C" ); x += StringPixLength( L"C", FONT10ARIAL ) + 2; }
if( m->sIsolatedGridNo != -1 ) { mprintf( x, iScreenHeightOffset + 75, L"I" ); x += StringPixLength( L"I", FONT10ARIAL ) + 2; }
if( m->sNorthGridNo != -1 ) { mprintf( x, iScreenHeightOffset + 75, pRenderSectorInformationText[5] ); x += StringPixLength( pRenderSectorInformationText[5], FONT10ARIAL ) + 2; }
if( m->sEastGridNo != -1 ) { mprintf( x, iScreenHeightOffset + 75, pRenderSectorInformationText[6] ); x += StringPixLength( pRenderSectorInformationText[6], FONT10ARIAL ) + 2; }
if( m->sSouthGridNo != -1 ) { mprintf( x, iScreenHeightOffset + 75, pRenderSectorInformationText[7] ); x += StringPixLength( pRenderSectorInformationText[7], FONT10ARIAL ) + 2; }
if( m->sWestGridNo != -1 ) { mprintf( x, iScreenHeightOffset + 75, pRenderSectorInformationText[8] ); x += StringPixLength( pRenderSectorInformationText[8], FONT10ARIAL ) + 2; }
if( m->sCenterGridNo != -1 ) { mprintf( x, iScreenHeightOffset + 75, pRenderSectorInformationText[9] ); x += StringPixLength( pRenderSectorInformationText[9], FONT10ARIAL ) + 2; }
if( m->sIsolatedGridNo != -1 ) { mprintf( x, iScreenHeightOffset + 75, pRenderSectorInformationText[10] ); x += StringPixLength( pRenderSectorInformationText[10], FONT10ARIAL ) + 2; }
mprintf( x, iScreenHeightOffset + 75, L")" );
}
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 85, L"Number of rooms: %d", s->ubNumRooms );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 95, L"Total map population: %d", m->ubNumIndividuals );
mprintf( iScreenWidthOffset + 20, iScreenHeightOffset + 105, L"Enemies: %d", s->EnemyTeam.ubTotal );
mprintf( iScreenWidthOffset + 30, iScreenHeightOffset + 115, L"Admins: %d", s->ubNumAdmins );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 85, pRenderSectorInformationText[11], s->ubNumRooms );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 95, pRenderSectorInformationText[12], m->ubNumIndividuals );
mprintf( iScreenWidthOffset + 20, iScreenHeightOffset + 105, pRenderSectorInformationText[13], s->EnemyTeam.ubTotal );
mprintf( iScreenWidthOffset + 30, iScreenHeightOffset + 115, pRenderSectorInformationText[14], s->ubNumAdmins );
if( s->ubNumAdmins )
mprintf( iScreenWidthOffset + 100, iScreenHeightOffset + 115, L"(%d detailed, %d profile -- %d have priority existance)", s->ubAdminDetailed, s->ubAdminProfile, s->ubAdminExistance );
mprintf( iScreenWidthOffset + 30, iScreenHeightOffset + 125, L"Troops: %d", s->ubNumTroops );
mprintf( iScreenWidthOffset + 100, iScreenHeightOffset + 115, pRenderSectorInformationText[15], s->ubAdminDetailed, s->ubAdminProfile, s->ubAdminExistance );
mprintf( iScreenWidthOffset + 30, iScreenHeightOffset + 125, pRenderSectorInformationText[16], s->ubNumTroops );
if( s->ubNumTroops )
mprintf( iScreenWidthOffset + 100, iScreenHeightOffset + 125, L"(%d detailed, %d profile -- %d have priority existance)", s->ubTroopDetailed, s->ubTroopProfile, s->ubTroopExistance );
mprintf( iScreenWidthOffset + 30, iScreenHeightOffset + 135, L"Elites: %d", s->ubNumElites );
mprintf( iScreenWidthOffset + 100, iScreenHeightOffset + 125, pRenderSectorInformationText[17], s->ubTroopDetailed, s->ubTroopProfile, s->ubTroopExistance );
mprintf( iScreenWidthOffset + 30, iScreenHeightOffset + 135, pRenderSectorInformationText[18], s->ubNumElites );
if( s->ubNumElites )
mprintf( iScreenWidthOffset + 100, iScreenHeightOffset + 135, L"(%d detailed, %d profile -- %d have priority existance)", s->ubEliteDetailed, s->ubEliteProfile, s->ubEliteExistance );
mprintf( iScreenWidthOffset + 20, iScreenHeightOffset + 145, L"Civilians: %d", s->CivTeam.ubTotal );
mprintf( iScreenWidthOffset + 100, iScreenHeightOffset + 135, pRenderSectorInformationText[19], s->ubEliteDetailed, s->ubEliteProfile, s->ubEliteExistance );
mprintf( iScreenWidthOffset + 20, iScreenHeightOffset + 145, pRenderSectorInformationText[20], s->CivTeam.ubTotal );
if( s->CivTeam.ubTotal )
mprintf( iScreenWidthOffset + 100, iScreenHeightOffset + 145, L"(%d detailed, %d profile -- %d have priority existance)", s->CivTeam.ubDetailed, s->CivTeam.ubProfile, s->CivTeam.ubExistance );
mprintf( iScreenWidthOffset + 100, iScreenHeightOffset + 145, pRenderSectorInformationText[21], s->CivTeam.ubDetailed, s->CivTeam.ubProfile, s->CivTeam.ubExistance );
if( s->ubSummaryVersion >= 9 )
{
mprintf( iScreenWidthOffset + 30, iScreenHeightOffset + 155, L"Humans: %d", s->CivTeam.ubTotal - s->ubCivCows - s->ubCivBloodcats );
mprintf( iScreenWidthOffset + 30, iScreenHeightOffset + 165, L"Cows: %d", s->ubCivCows );
mprintf( iScreenWidthOffset + 30, iScreenHeightOffset + 175, L"Bloodcats: %d", s->ubCivBloodcats );
mprintf( iScreenWidthOffset + 30, iScreenHeightOffset + 155, pRenderSectorInformationText[22], s->CivTeam.ubTotal - s->ubCivCows - s->ubCivBloodcats );
mprintf( iScreenWidthOffset + 30, iScreenHeightOffset + 165, pRenderSectorInformationText[23], s->ubCivCows );
mprintf( iScreenWidthOffset + 30, iScreenHeightOffset + 175, pRenderSectorInformationText[24], s->ubCivBloodcats );
}
mprintf( iScreenWidthOffset + 20, iScreenHeightOffset + 185, L"Creatures: %d", s->CreatureTeam.ubTotal );
mprintf( iScreenWidthOffset + 20, iScreenHeightOffset + 185, pRenderSectorInformationText[25], s->CreatureTeam.ubTotal );
if( s->ubSummaryVersion >= 9 )
{
mprintf( iScreenWidthOffset + 30, iScreenHeightOffset + 195, L"Monsters: %d", s->CreatureTeam.ubTotal - s->CreatureTeam.ubNumAnimals );
mprintf( iScreenWidthOffset + 30, iScreenHeightOffset + 205, L"Bloodcats: %d", s->CreatureTeam.ubNumAnimals );
mprintf( iScreenWidthOffset + 30, iScreenHeightOffset + 195, pRenderSectorInformationText[26], s->CreatureTeam.ubTotal - s->CreatureTeam.ubNumAnimals );
mprintf( iScreenWidthOffset + 30, iScreenHeightOffset + 205, pRenderSectorInformationText[27], s->CreatureTeam.ubNumAnimals );
}
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 215, L"Number of locked and/or trapped doors: %d", s->ubNumDoors );
mprintf( iScreenWidthOffset + 20, iScreenHeightOffset + 225, L"Locked: %d", s->ubNumDoorsLocked );
mprintf( iScreenWidthOffset + 20, iScreenHeightOffset + 235, L"Trapped: %d", s->ubNumDoorsTrapped );
mprintf( iScreenWidthOffset + 20, iScreenHeightOffset + 245, L"Locked & Trapped: %d", s->ubNumDoorsLockedAndTrapped );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 215, pRenderSectorInformationText[28], s->ubNumDoors );
mprintf( iScreenWidthOffset + 20, iScreenHeightOffset + 225, pRenderSectorInformationText[29], s->ubNumDoorsLocked );
mprintf( iScreenWidthOffset + 20, iScreenHeightOffset + 235, pRenderSectorInformationText[30], s->ubNumDoorsTrapped );
mprintf( iScreenWidthOffset + 20, iScreenHeightOffset + 245, pRenderSectorInformationText[31], s->ubNumDoorsLockedAndTrapped );
if( s->ubSummaryVersion >= 8 )
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 255, L"Civilians with schedules: %d", s->ubCivSchedules );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 255, pRenderSectorInformationText[32], s->ubCivSchedules );
if( s->ubSummaryVersion >= 10 )
{
if( s->fTooManyExitGridDests )
{
SetFontForeground( FONT_RED );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 265, L"Too many exit grid destinations (more than 4)...");
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 265, pRenderSectorInformationText[33]);
}
else
{
@@ -608,25 +608,25 @@ void RenderSectorInformation()
if( ubNumInvalid )
{
SetFontForeground( FONT_RED );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 265, L"ExitGrids: %d (%d with a long distance destination)", s->ubNumExitGridDests, ubNumInvalid );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 265, pRenderSectorInformationText[34], s->ubNumExitGridDests, ubNumInvalid );
}
else switch( s->ubNumExitGridDests )
{
case 0:
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 265, L"ExitGrids: none" );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 265, pRenderSectorInformationText[35] );
break;
case 1:
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 265, L"ExitGrids: 1 destination using %d exitgrids", s->usExitGridSize[0] );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 265, pRenderSectorInformationText[36], s->usExitGridSize[0] );
break;
case 2:
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 265, L"ExitGrids: 2 -- 1) Qty: %d, 2) Qty: %d", s->usExitGridSize[0], s->usExitGridSize[1] );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 265, pRenderSectorInformationText[37], s->usExitGridSize[0], s->usExitGridSize[1] );
break;
case 3:
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 265, L"ExitGrids: 3 -- 1) Qty: %d, 2) Qty: %d, 3) Qty: %d",
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 265, pRenderSectorInformationText[38],
s->usExitGridSize[0], s->usExitGridSize[1], s->usExitGridSize[2] );
break;
case 4:
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 265, L"ExitGrids: 3 -- 1) Qty: %d, 2) Qty: %d, 3) Qty: %d, 4) Qty: %d",
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 265, pRenderSectorInformationText[39],
s->usExitGridSize[0], s->usExitGridSize[1], s->usExitGridSize[2], s->usExitGridSize[3] );
break;
}
@@ -634,7 +634,7 @@ void RenderSectorInformation()
}
iOverall = - ( 2 * s->EnemyTeam.ubBadA ) - s->EnemyTeam.ubPoorA + s->EnemyTeam.ubGoodA + ( 2 * s->EnemyTeam.ubGreatA );
usLine = iScreenHeightOffset + 275;
mprintf( iScreenWidthOffset + 10, usLine, L"Enemy Relative Attributes: %d bad, %d poor, %d norm, %d good, %d great (%+d Overall)",
mprintf( iScreenWidthOffset + 10, usLine, pRenderSectorInformationText[40],
s->EnemyTeam.ubBadA,
s->EnemyTeam.ubPoorA,
s->EnemyTeam.ubAvgA,
@@ -643,7 +643,7 @@ void RenderSectorInformation()
iOverall );
iOverall = - ( 2 * s->EnemyTeam.ubBadE ) - s->EnemyTeam.ubPoorE + s->EnemyTeam.ubGoodE + ( 2 * s->EnemyTeam.ubGreatE );
usLine += 10;
mprintf( iScreenWidthOffset + 10, usLine, L"Enemy Relative Equipment: %d bad, %d poor, %d norm, %d good, %d great (%+d Overall)",
mprintf( iScreenWidthOffset + 10, usLine, pRenderSectorInformationText[41],
s->EnemyTeam.ubBadE,
s->EnemyTeam.ubPoorE,
s->EnemyTeam.ubAvgE,
@@ -656,7 +656,7 @@ void RenderSectorInformation()
if( s->ubEnemiesReqWaypoints )
{
SetFontForeground( FONT_RED );
mprintf( iScreenWidthOffset + 10, usLine, L"%d placements have patrol orders without any waypoints defined.", s->ubEnemiesReqWaypoints );
mprintf( iScreenWidthOffset + 10, usLine, pRenderSectorInformationText[42], s->ubEnemiesReqWaypoints );
usLine += 10;
}
}
@@ -665,7 +665,7 @@ void RenderSectorInformation()
if( s->ubEnemiesHaveWaypoints )
{
SetFontForeground( FONT_RED );
mprintf( iScreenWidthOffset + 10, usLine, L"%d placements have waypoints, but without any patrol orders.", s->ubEnemiesHaveWaypoints );
mprintf( iScreenWidthOffset + 10, usLine, pRenderSectorInformationText[43], s->ubEnemiesHaveWaypoints );
usLine += 10;
}
}
@@ -674,7 +674,7 @@ void RenderSectorInformation()
if( s->usWarningRoomNums )
{
SetFontForeground( FONT_RED );
mprintf( iScreenWidthOffset + 10, usLine, L"%d gridnos have questionable room numbers. Please validate.", s->usWarningRoomNums );
mprintf( iScreenWidthOffset + 10, usLine, pRenderSectorInformationText[44], s->usWarningRoomNums );
}
}
}
@@ -693,9 +693,9 @@ void RenderItemDetails()
SetFont( FONT10ARIAL );
SetFontForeground( FONT_GRAY2 );
SetFontShadow( FONT_NEARBLACK );
mprintf( iScreenWidthOffset + 364, iScreenHeightOffset + 49, L"R" );
mprintf( iScreenWidthOffset + 390, iScreenHeightOffset + 49, L"S" );
mprintf( iScreenWidthOffset + 364, iScreenHeightOffset + 62, L"Enemy" );
mprintf( iScreenWidthOffset + 364, iScreenHeightOffset + 49, pRenderItemDetailsText[0] );
mprintf( iScreenWidthOffset + 390, iScreenHeightOffset + 49, pRenderItemDetailsText[1] );
mprintf( iScreenWidthOffset + 364, iScreenHeightOffset + 62, pRenderItemDetailsText[2] );
xp = iScreenWidthOffset + 5;
yp = iScreenHeightOffset + 20;
@@ -789,7 +789,7 @@ void RenderItemDetails()
if( xp >= (UINT32)(iScreenWidthOffset + 300 ))
{
SetFontForeground( FONT_RED );
mprintf( iScreenWidthOffset + 350, iScreenHeightOffset + 350, L"TOO MANY ITEMS TO DISPLAY!");
mprintf( iScreenWidthOffset + 350, iScreenHeightOffset + 350, pRenderItemDetailsText[3]);
return;
}
}
@@ -808,14 +808,14 @@ void RenderItemDetails()
SetFontForeground( 77 );
switch( i )
{
case 0: swprintf( str, L"Panic1" ); break;
case 1: swprintf( str, L"Panic2" ); break;
case 2: swprintf( str, L"Panic3" ); break;
case 3: swprintf( str, L"Norm1" ); break;
case 4: swprintf( str, L"Norm2" ); break;
case 5: swprintf( str, L"Norm3" ); break;
case 6: swprintf( str, L"Norm4" ); break;
case 7: swprintf( str, L"Pressure Actions" ); break;
case 0: swprintf( str, pRenderItemDetailsText[4] ); break;
case 1: swprintf( str, pRenderItemDetailsText[5] ); break;
case 2: swprintf( str, pRenderItemDetailsText[6] ); break;
case 3: swprintf( str, pRenderItemDetailsText[7] ); break;
case 4: swprintf( str, pRenderItemDetailsText[8] ); break;
case 5: swprintf( str, pRenderItemDetailsText[9] ); break;
case 6: swprintf( str, pRenderItemDetailsText[10] ); break;
case 7: swprintf( str, pRenderItemDetailsText[11] ); break;
}
if( i < 7 )
{
@@ -836,7 +836,7 @@ void RenderItemDetails()
if( xp >= (UINT32)(iScreenWidthOffset + 300 ))
{
SetFontForeground( FONT_RED );
mprintf( iScreenWidthOffset + 350, iScreenHeightOffset + 350, L"TOO MANY ITEMS TO DISPLAY!");
mprintf( iScreenWidthOffset + 350, iScreenHeightOffset + 350, pRenderItemDetailsText[12]);
return;
}
}
@@ -847,14 +847,14 @@ void RenderItemDetails()
{
SetFontForeground( FONT_YELLOW );
mprintf( xp, yp, L"PRIORITY ENEMY DROPPED ITEMS" );
mprintf( xp, yp, pRenderItemDetailsText[13] );
yp += 10;
//Do the priority existance guys first
if( !gpPEnemyItemsSummaryArray )
{
SetFontForeground( FONT_DKYELLOW );
mprintf( xp, yp, L"None" );
mprintf( xp, yp, pRenderItemDetailsText[14] );
yp += 10;
}
else for( index = 1; index < MAXITEMS; index++ )
@@ -898,7 +898,7 @@ void RenderItemDetails()
if( xp >= (UINT32)(iScreenWidthOffset + 300 ))
{
SetFontForeground( FONT_RED );
mprintf( iScreenWidthOffset + 350, iScreenHeightOffset + 350, L"TOO MANY ITEMS TO DISPLAY!");
mprintf( iScreenWidthOffset + 350, iScreenHeightOffset + 350, pRenderItemDetailsText[15] );
return;
}
}
@@ -908,7 +908,7 @@ void RenderItemDetails()
yp += 5;
SetFontForeground( FONT_YELLOW );
mprintf( xp, yp, L"NORMAL ENEMY DROPPED ITEMS" );
mprintf( xp, yp, pRenderItemDetailsText[16] );
yp += 10;
if( yp >= (UINT32)(iScreenHeightOffset + 355 ))
{
@@ -917,7 +917,7 @@ void RenderItemDetails()
if( xp >= (UINT32)(iScreenWidthOffset + 300 ))
{
SetFontForeground( FONT_RED );
mprintf( iScreenWidthOffset + 350, iScreenHeightOffset + 350, L"TOO MANY ITEMS TO DISPLAY!");
mprintf( iScreenWidthOffset + 350, iScreenHeightOffset + 350, pRenderItemDetailsText[17] );
return;
}
}
@@ -926,7 +926,7 @@ void RenderItemDetails()
if( !gpNEnemyItemsSummaryArray )
{
SetFontForeground( FONT_DKYELLOW );
mprintf( xp, yp, L"None" );
mprintf( xp, yp, pRenderItemDetailsText[18] );
yp += 10;
}
for( index = 1; index < MAXITEMS; index++ )
@@ -968,7 +968,7 @@ void RenderItemDetails()
if( xp >= (UINT32)(iScreenWidthOffset + 300 ))
{
SetFontForeground( FONT_RED );
mprintf( iScreenWidthOffset + 350, iScreenHeightOffset + 350, L"TOO MANY ITEMS TO DISPLAY!");
mprintf( iScreenWidthOffset + 350, iScreenHeightOffset + 350, pRenderItemDetailsText[19] );
return;
}
}
@@ -981,7 +981,7 @@ void RenderItemDetails()
else
{
SetFontForeground( FONT_RED );
mprintf( iScreenWidthOffset + 5, iScreenHeightOffset + 50, L"ERROR: Can't load the items for this map. Reason unknown." );
mprintf( iScreenWidthOffset + 5, iScreenHeightOffset + 50, pRenderItemDetailsText[20] );
}
}
@@ -1017,7 +1017,7 @@ void RenderSummaryWindow()
SetFontBackground( 0 );
if( !gfItemDetailsMode )
{
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 5, L"CAMPAIGN EDITOR -- %s Version 1.%02d",
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 5, pRenderSummaryWindowText[0],
gszVersionType[ GLOBAL_SUMMARY_STATE ], GLOBAL_SUMMARY_VERSION );
}
@@ -1026,7 +1026,7 @@ void RenderSummaryWindow()
{
SetFontForeground( FONT_RED );
SetFontShadow( FONT_NEARBLACK );
mprintf( iScreenWidthOffset + 270, iScreenHeightOffset + 5, L"(NO MAP LOADED).");
mprintf( iScreenWidthOffset + 270, iScreenHeightOffset + 5, pRenderSummaryWindowText[1]);
}
SetFont( FONT10ARIAL );
SetFontShadow( FONT_NEARBLACK );
@@ -1038,29 +1038,29 @@ void RenderSummaryWindow()
{
DisableButton( iSummaryButton[ SUMMARY_LOAD ] );
SetFontForeground( FONT_YELLOW );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 20, L"You currently have %d outdated maps.", gusNumEntriesWithOutdatedOrNoSummaryInfo);
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 30, L"The more maps that need to be updated, the longer it takes. It'll take ");
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 40, L"approximately 4 minutes on a P200MMX to analyse 100 maps, so");
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 50, L"depending on your computer, it may vary.");
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 20, pRenderSummaryWindowText[2], gusNumEntriesWithOutdatedOrNoSummaryInfo);
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 30, pRenderSummaryWindowText[3]);
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 40, pRenderSummaryWindowText[4]);
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 50, pRenderSummaryWindowText[5]);
SetFontForeground( FONT_LTRED );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 65, L"Do you wish to regenerate info for ALL these maps at this time (y/n)?" );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 65, pRenderSummaryWindowText[6] );
}
else if( !gsSelSectorX && !gsSectorX || gfTempFile )
{
DisableButton( iSummaryButton[ SUMMARY_LOAD ] );
SetFontForeground( FONT_LTRED );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 20, L"There is no sector currently selected." );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 20, pRenderSummaryWindowText[7] );
if( gfTempFile )
{
SetFontForeground( FONT_YELLOW );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 30, L"Entering a temp file name that doesn't follow campaign editor conventions..." );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 30, pRenderSummaryWindowText[8] );
goto SPECIALCASE_LABEL; //OUCH!!!
}
else if( !gfWorldLoaded )
{
SetFontForeground( FONT_YELLOW );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 30, L"You need to either load an existing map or create a new map before being" );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 40, L"able to enter the editor, or you can quit (ESC or Alt+x).");
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 30, pRenderSummaryWindowText[9] );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 40, pRenderSummaryWindowText[10] );
}
else if(gCustomFileSectorSummary.ubSummaryVersion)//dnl ch30 150909
{
@@ -1147,42 +1147,42 @@ void RenderSummaryWindow()
{
case GROUND_LEVEL_MASK:
giCurrLevel = 0;
wcscat( str, L", ground level" );
wcscat( str, pRenderSummaryWindowText[11] );
gpCurrentSectorSummary = gpSectorSummary[x][y][0];
break;
case BASEMENT1_LEVEL_MASK:
giCurrLevel = 1;
wcscat( str, L", underground level 1" );
wcscat( str, pRenderSummaryWindowText[12] );
gpCurrentSectorSummary = gpSectorSummary[x][y][1];
break;
case BASEMENT2_LEVEL_MASK:
giCurrLevel = 2;
wcscat( str, L", underground level 2" );
wcscat( str, pRenderSummaryWindowText[13] );
gpCurrentSectorSummary = gpSectorSummary[x][y][2];
break;
case BASEMENT3_LEVEL_MASK:
giCurrLevel = 3;
wcscat( str, L", underground level 3" );
wcscat( str, pRenderSummaryWindowText[14] );
gpCurrentSectorSummary = gpSectorSummary[x][y][3];
break;
case ALTERNATE_GROUND_MASK:
giCurrLevel = 4;
wcscat( str, L", alternate G level" );
wcscat( str, pRenderSummaryWindowText[15] );
gpCurrentSectorSummary = gpSectorSummary[x][y][4];
break;
case ALTERNATE_B1_MASK:
giCurrLevel = 5;
wcscat( str, L", alternate B1 level" );
wcscat( str, pRenderSummaryWindowText[16] );
gpCurrentSectorSummary = gpSectorSummary[x][y][5];
break;
case ALTERNATE_B2_MASK:
giCurrLevel = 6;
wcscat( str, L", alternate B2 level" );
wcscat( str, pRenderSummaryWindowText[17] );
gpCurrentSectorSummary = gpSectorSummary[x][y][6];
break;
case ALTERNATE_B3_MASK:
giCurrLevel = 7;
wcscat( str, L", alternate B3 level" );
wcscat( str, pRenderSummaryWindowText[18] );
gpCurrentSectorSummary = gpSectorSummary[x][y][7];
break;
}
@@ -1223,12 +1223,12 @@ void RenderSummaryWindow()
SetupItemDetailsMode( TRUE );
gfSetupItemDetailsMode = FALSE;
}
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 5, L"ITEM DETAILS -- sector %s", str );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 5, pRenderSummaryWindowText[19], str );
RenderItemDetails();
}
else
{
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 20, L"Summary Information for sector %s:", str );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 20, pRenderSummaryWindowText[20], str );
HideButton( iSummaryButton[ SUMMARY_REAL ] );
HideButton( iSummaryButton[ SUMMARY_SCIFI ] );
HideButton( iSummaryButton[ SUMMARY_ENEMY ] );
@@ -1240,13 +1240,13 @@ void RenderSummaryWindow()
SetFontForeground( FONT_RED );
if( gfItemDetailsMode )
{
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 5, L"Summary Information for sector %s" , str );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 15, L"does not exist." );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 5, pRenderSummaryWindowText[21] , str );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 15, pRenderSummaryWindowText[22] );
}
else
{
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 20, L"Summary Information for sector %s" , str );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 30, L"does not exist." );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 20, pRenderSummaryWindowText[23] , str );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 30, pRenderSummaryWindowText[24] );
}
ShowButton( iSummaryButton[ SUMMARY_UPDATE ] );
}
@@ -1261,9 +1261,9 @@ void RenderSummaryWindow()
SetFontShadow( 0 );
}
if( gfItemDetailsMode )
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 5, L"No information exists for sector %s.", str );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 5, pRenderSummaryWindowText[25], str );
else
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 20, L"No information exists for sector %s.", str );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 20, pRenderSummaryWindowText[26], str );
SetFontShadow( FONT_NEARBLACK );
switch( giCurrentViewLevel )
@@ -1291,7 +1291,7 @@ void RenderSummaryWindow()
SetFontForeground( FONT_LTKHAKI );
else
SetFontForeground( FONT_LTBLUE );
mprintf( MAP_LEFT+110, MAP_BOTTOM+55, L"FILE: %s", gszDisplayName );
mprintf( MAP_LEFT+110, MAP_BOTTOM+55, pRenderSummaryWindowText[27], gszDisplayName );
}
else //little higher to make room for the override checkbox and text.
{
@@ -1299,16 +1299,16 @@ void RenderSummaryWindow()
SetFontForeground( FONT_LTKHAKI );
else
SetFontForeground( FONT_LTBLUE );
mprintf( MAP_LEFT+110, MAP_BOTTOM+46, L"FILE: %s", gszDisplayName );
mprintf( MAP_LEFT+110, MAP_BOTTOM+46, pRenderSummaryWindowText[28], gszDisplayName );
if( gubOverrideStatus == READONLY )
{
SetFontForeground( (UINT8)(gfOverride ? FONT_YELLOW : FONT_LTRED) );
mprintf( MAP_LEFT+124, MAP_BOTTOM+61, L"Override READONLY" );
mprintf( MAP_LEFT+124, MAP_BOTTOM+61, pRenderSummaryWindowText[29] );
}
else
{
SetFontForeground( (UINT8)(gfOverride ? FONT_YELLOW: FONT_ORANGE ) );
mprintf( MAP_LEFT+124, MAP_BOTTOM+61, L"Overwrite File");
mprintf( MAP_LEFT+124, MAP_BOTTOM+61, pRenderSummaryWindowText[30]);
}
}
}
@@ -1316,29 +1316,29 @@ void RenderSummaryWindow()
else if( !gfDeniedSummaryCreation )
{
SetFontForeground( FONT_GRAY1 );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 20, L"You currently have no summary data. By creating one, you will be able to keep track" );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 30, L"of information pertaining to all of the sectors you edit and save. The creation process" );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 40, L"will analyse all maps in your \\MAPS directory, and generate a new one. This could" );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 50, L"take a few minutes depending on how many valid maps you have. Valid maps are" );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 60, L"maps following the proper naming convention from a1.dat - p16.dat. Underground maps" );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 70, L"are signified by appending _b1 to _b3 before the .dat (ex: a9_b1.dat). ");
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 20, pRenderSummaryWindowText[31] );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 30, pRenderSummaryWindowText[32] );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 40, pRenderSummaryWindowText[33] );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 50, pRenderSummaryWindowText[34] );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 60, pRenderSummaryWindowText[35] );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 70, pRenderSummaryWindowText[36] );
SetFontForeground( FONT_LTRED );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 85, L"Do you wish to do this now (y/n)?" );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 85, pRenderSummaryWindowText[37] );
}
else
{
SetFontForeground( FONT_LTRED );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 20, L"No summary info. Creation denied." );
mprintf( iScreenWidthOffset + 10, iScreenHeightOffset + 20, pRenderSummaryWindowText[38] );
}
SetFont( FONT10ARIAL );
SetFontForeground( FONT_GRAY3 );
mprintf( MAP_LEFT + 15, MAP_BOTTOM + 7, L"Grid" );
mprintf( MAP_LEFT + 65, MAP_BOTTOM + 7, L"Progress" );
mprintf( MAP_LEFT + 15, MAP_BOTTOM + 27, L"Use Alternate Maps" );
mprintf( MAP_LEFT + 15, MAP_BOTTOM + 7, pRenderSummaryWindowText[39] );
mprintf( MAP_LEFT + 65, MAP_BOTTOM + 7,pRenderSummaryWindowText[40] );
mprintf( MAP_LEFT + 15, MAP_BOTTOM + 27, pRenderSummaryWindowText[41] );
//Draw the mode tabs
SetFontForeground( FONT_YELLOW );
mprintf( iScreenWidthOffset + 354, iScreenHeightOffset + 18, L"Summary" );
mprintf( iScreenWidthOffset + 354, iScreenHeightOffset + 18, pRenderSummaryWindowText[42] );
pDestBuf = LockVideoSurface( FRAME_BUFFER, &uiDestPitchBYTES );
SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
RectangleDraw( TRUE, iScreenWidthOffset + 350, iScreenHeightOffset + 15, iScreenWidthOffset + 405, iScreenHeightOffset + 28, 0, pDestBuf );
@@ -1355,7 +1355,7 @@ void RenderSummaryWindow()
{
SetFontForeground( FONT_RED );
}
mprintf( iScreenWidthOffset + 354, iScreenHeightOffset + 33, L"Items" );
mprintf( iScreenWidthOffset + 354, iScreenHeightOffset + 33, pRenderSummaryWindowText[43] );
pDestBuf = LockVideoSurface( FRAME_BUFFER, &uiDestPitchBYTES );
SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
RectangleDraw( TRUE, iScreenWidthOffset + 350, iScreenHeightOffset + 30, iScreenWidthOffset + 405, iScreenHeightOffset + 43, 0, pDestBuf );
@@ -1675,7 +1675,7 @@ void UpdateSectorSummary( STR16 gszFilename, BOOLEAN fUpdate )
SetFont( FONT10ARIAL );
SetFontForeground( FONT_LTKHAKI );
SetFontShadow( FONT_NEARBLACK );
swprintf( str, L"Analyzing map: %s...", gszFilename );
swprintf( str, pUpdateSectorSummaryText[0], gszFilename );
if( gfSummaryWindowActive )
{
@@ -2168,10 +2168,13 @@ void SummaryLoadMapCallback( GUI_BUTTON *btn, INT32 reason )
//DefineProgressBarPanel( 0, 65, 79, 94, MAP_LEFT, iScreenHeightOffset + 318, iScreenWidthOffset + 578, iScreenHeightOffset + 356 );
DefineProgressBarPanel( 0, 65, 79, 94, MAP_LEFT, iScreenHeightOffset + 318, MAP_LEFT + 161, iScreenHeightOffset + 356 );
swprintf( str, L"Loading map: %s", gszDisplayName );
swprintf( str, pSummaryLoadMapCallbackText[0], gszDisplayName );
SetProgressBarTitle( 0, str, BLOCKFONT2, FONT_RED, FONT_NEARBLACK );
SetProgressBarMsgAttributes( 0, SMALLCOMPFONT, FONT_BLACK, FONT_BLACK );
// WANNE: When loading from summary map, never resize the map, just load it!
gfResizeMapOnLoading = FALSE;
if( ExternalLoadMap( gszDisplayName ) )
{
EnableButton( iSummaryButton[ SUMMARY_OKAY ] );
@@ -2889,7 +2892,7 @@ void ReportError( STR8 pSector, UINT8 ubLevel )
swprintf( temp, L"_b%d.dat", ubLevel % 4 );
wcscat( str, temp );
}
mprintf( iScreenWidthOffset + 10, yp, L"Skipping update for %s. Probably due to tileset conflicts...", str );
mprintf( iScreenWidthOffset + 10, yp, pReportErrorText[0] , str );
InvalidateScreen();
yp++;
}
@@ -2905,7 +2908,7 @@ void RegenerateSummaryInfoForAllOutdatedMaps()
//DefineProgressBarPanel( 0, 65, 79, 94, 10, 80, 310, 152 );
CreateProgressBar( 0, iScreenWidthOffset + 20, iScreenHeightOffset + 100, iScreenWidthOffset + 300, iScreenHeightOffset + 112 ); //master (total)
DefineProgressBarPanel( 0, 65, 79, 94, iScreenWidthOffset + 10, iScreenHeightOffset + 80, iScreenWidthOffset + 310, iScreenHeightOffset + 132 );
SetProgressBarTitle( 0, L"Generating map information", BLOCKFONT2, FONT_RED, FONT_NEARBLACK );
SetProgressBarTitle( 0, pRegenerateSummaryInfoForAllOutdatedMapsText[0], BLOCKFONT2, FONT_RED, FONT_NEARBLACK );
SetProgressBarMsgAttributes( 0, SMALLCOMPFONT, FONT_BLACK, FONT_BLACK );
gfUpdatingNow = TRUE;
@@ -2985,7 +2988,7 @@ void SummaryUpdateCallback( GUI_BUTTON *btn, INT32 reason )
CHAR8 str[40];
CreateProgressBar( 0, iScreenWidthOffset + 20, iScreenHeightOffset + 100, iScreenWidthOffset + 300, iScreenHeightOffset + 112 ); //slave (individual)
DefineProgressBarPanel( 0, 65, 79, 94, iScreenWidthOffset + 10, iScreenHeightOffset + 80, iScreenWidthOffset + 310, iScreenHeightOffset + 132 );
SetProgressBarTitle( 0, L"Generating map summary", BLOCKFONT2, FONT_RED, FONT_NEARBLACK );
SetProgressBarTitle( 0, pSummaryUpdateCallbackText[0], BLOCKFONT2, FONT_RED, FONT_NEARBLACK );
SetProgressBarMsgAttributes( 0, SMALLCOMPFONT, FONT_BLACK, FONT_BLACK );
#if 0
@@ -3094,16 +3097,16 @@ void ApologizeOverrideAndForceUpdateEverything()
SetFont( HUGEFONT );
SetFontForeground( FONT_RED );
SetFontShadow( FONT_NEARBLACK );
swprintf( str, L"MAJOR VERSION UPDATE" );
swprintf( str, pApologizeOverrideAndForceUpdateEverythingText[0] );
mprintf( (iScreenWidthOffset + 320) - StringPixLength( str, HUGEFONT )/2, iScreenHeightOffset + 105, str );
SetFont( FONT10ARIAL );
SetFontForeground( FONT_YELLOW );
swprintf( str, L"There are %d maps requiring a major version update.", gusNumberOfMapsToBeForceUpdated );
swprintf( str, pApologizeOverrideAndForceUpdateEverythingText[1], gusNumberOfMapsToBeForceUpdated );
mprintf( (iScreenWidthOffset + 320) - StringPixLength( str, FONT10ARIAL )/2, iScreenHeightOffset + 130, str );
CreateProgressBar( 2, iScreenWidthOffset + 120, iScreenHeightOffset + 170, iScreenWidthOffset + 520, iScreenHeightOffset + 202 );
DefineProgressBarPanel( 2, 65, 79, 94, iScreenWidthOffset + 100, iScreenHeightOffset + 150, iScreenWidthOffset + 540, iScreenHeightOffset + 222 );
SetProgressBarTitle( 2, L"Updating all outdated maps", BLOCKFONT2, FONT_RED, 0 );
SetProgressBarTitle( 2, pApologizeOverrideAndForceUpdateEverythingText[2], BLOCKFONT2, FONT_RED, 0 );
SetProgressBarMsgAttributes( 2, SMALLCOMPFONT, FONT_BLACK, FONT_BLACK );
gusCurrent = 0;
+69 -67
View File
@@ -77,6 +77,7 @@
#include "cursors.h"//dnl ch2 210909
#include "Cursor Control.h"//dnl ch2 210909
#include "maputility.h"//dnl ch49 061009
#include "Text.h"
#endif
//forward declarations of common classes to eliminate includes
@@ -164,6 +165,7 @@ BOOLEAN fDontUseClick = FALSE;//dnl ch7 210909
BOOLEAN fShowHighGround = FALSE;//dnl ch2 210909
BOOLEAN fRaiseWorld = FALSE;//dnl ch3 210909
BOOLEAN gfVanillaMode = TRUE;//dnl ch33 091009
BOOLEAN gfResizeMapOnLoading = FALSE;
INT32 TestButtons[10];
@@ -476,7 +478,7 @@ BOOLEAN EditModeShutdown( void )
if( gfConfirmExitFirst )
{
gfConfirmExitPending = TRUE;
CreateMessageBox( L"Exit editor?" );
CreateMessageBox( pEditModeShutdownText[0] );
return FALSE;
}
@@ -1619,15 +1621,15 @@ void HandleKeyboardShortcuts( )
case F9:
break;
case F10:
CreateMessageBox( L"Are you sure you wish to remove all lights?" );
CreateMessageBox( pHandleKeyboardShortcutsText[0] );
gfRemoveLightsPending = TRUE;
break;
case F11:
CreateMessageBox( L"Are you sure you wish to reverse the schedules?" );
CreateMessageBox( pHandleKeyboardShortcutsText[1] );
gfScheduleReversalPending = TRUE;
break;
case F12:
CreateMessageBox( L"Are you sure you wish to clear all of the schedules?" );
CreateMessageBox( pHandleKeyboardShortcutsText[2] );
gfScheduleClearPending = TRUE;
break;
@@ -1710,12 +1712,12 @@ void HandleKeyboardShortcuts( )
if(fDontUseClick)
{
fDontUseClick = FALSE;
ScreenMsg(FONT_MCOLOR_WHITE, MSG_INTERFACE, L"Clicked Placement Enabled");
ScreenMsg(FONT_MCOLOR_WHITE, MSG_INTERFACE, pHandleKeyboardShortcutsText[3] );
}
else
{
fDontUseClick = TRUE;
ScreenMsg(FONT_MCOLOR_WHITE, MSG_INTERFACE, L"Clicked Placement Disabled");
ScreenMsg(FONT_MCOLOR_WHITE, MSG_INTERFACE, pHandleKeyboardShortcutsText[4] );
}
break;
case 'd': // debris
@@ -1810,12 +1812,12 @@ void HandleKeyboardShortcuts( )
if(iDrawMode != DRAW_MODE_HIGH_GROUND)
{
iDrawMode = DRAW_MODE_HIGH_GROUND;
ScreenMsg(FONT_MCOLOR_WHITE, MSG_INTERFACE, L"Draw High Ground Enabled");
ScreenMsg(FONT_MCOLOR_WHITE, MSG_INTERFACE, pHandleKeyboardShortcutsText[5] );
}
else
{
iDrawMode = DRAW_MODE_NOTHING;
ScreenMsg(FONT_MCOLOR_WHITE, MSG_INTERFACE, L"Draw High Ground Disabled");
ScreenMsg(FONT_MCOLOR_WHITE, MSG_INTERFACE, pHandleKeyboardShortcutsText[6] );
}
break;
#ifdef dnlTEST
@@ -1851,7 +1853,7 @@ void HandleKeyboardShortcuts( )
}
break;
case 'L'://dnl ch23 210909
ScreenMsg(FONT_MCOLOR_WHITE, MSG_INTERFACE, L"Number of edge points: N=%d E=%d S=%d W=%d", gus1stNorthEdgepointArraySize, gus1stEastEdgepointArraySize, gus1stSouthEdgepointArraySize, gus1stWestEdgepointArraySize);
ScreenMsg(FONT_MCOLOR_WHITE, MSG_INTERFACE, pHandleKeyboardShortcutsText[7], gus1stNorthEdgepointArraySize, gus1stEastEdgepointArraySize, gus1stSouthEdgepointArraySize, gus1stWestEdgepointArraySize);
ToggleMapEdgepoints();
break;
#ifdef dnlTEST
@@ -1898,12 +1900,12 @@ void HandleKeyboardShortcuts( )
if(fDontUseRandom)
{
fDontUseRandom = FALSE;
ScreenMsg(FONT_MCOLOR_WHITE, MSG_INTERFACE, L"Random Placement Enabled");
ScreenMsg(FONT_MCOLOR_WHITE, MSG_INTERFACE, pHandleKeyboardShortcutsText[8] );
}
else
{
fDontUseRandom = TRUE;
ScreenMsg(FONT_MCOLOR_WHITE, MSG_INTERFACE, L"Random Placement Disabled");
ScreenMsg(FONT_MCOLOR_WHITE, MSG_INTERFACE, pHandleKeyboardShortcutsText[9] );
}
break;
case 's':
@@ -1926,12 +1928,12 @@ void HandleKeyboardShortcuts( )
case 'T':
if ( fShowTrees )
{
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Removing Treetops" );
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, pHandleKeyboardShortcutsText[10] );
WorldHideTrees( );
}
else
{
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Showing Treetops" );
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, pHandleKeyboardShortcutsText[11] );
WorldShowTrees( );
}
fShowTrees = !fShowTrees;
@@ -1948,7 +1950,7 @@ void HandleKeyboardShortcuts( )
gpWorldLevelData[cnt].sHeight = 0;
fShowHighGround = FALSE;
ShowHighGround(3);
ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"World Raise Reset");
ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, pHandleKeyboardShortcutsText[12] );
}
else
{
@@ -1956,12 +1958,12 @@ void HandleKeyboardShortcuts( )
if(EditorInputEvent.usParam == 'U')
{
RaiseWorldLandOld();
ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"World Raise Set Old");
ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, pHandleKeyboardShortcutsText[13] );
}
else
{
RaiseWorldLand();
ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"World Raise Set");
ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, pHandleKeyboardShortcutsText[14] );
}
}
break;
@@ -2068,7 +2070,7 @@ UINT32 PerformSelectedAction( void )
break;
case ACTION_RADAR_MAP://dnl ch9 071009
ScreenMsg(FONT_MCOLOR_WHITE, MSG_INTERFACE, L"Creating radar map for %S", gubFilename);
ScreenMsg(FONT_MCOLOR_WHITE, MSG_INTERFACE, pPerformSelectedActionText[0], gubFilename);
MarkWorldDirty();
return(MAPUTILITY_SCREEN);
break;
@@ -2119,16 +2121,16 @@ UINT32 PerformSelectedAction( void )
ExtractAndUpdateOptions();//dnl ch52 091009
fNewMap = TRUE;
if( gfPendingBasement )
CreateMessageBox( L"Delete current map and start a new basement level?" );
CreateMessageBox( pPerformSelectedActionText[1] );
else if( gfPendingCaves )
CreateMessageBox( L"Delete current map and start a new cave level?" );
CreateMessageBox( pPerformSelectedActionText[2] );
else
CreateMessageBox( L"Delete current map and start a new outdoor level?" );
CreateMessageBox( pPerformSelectedActionText[3] );
break;
case ACTION_SET_NEW_BACKGROUND:
if (!fBeenWarned)
CreateMessageBox( L" Wipe out ground textures? " );
CreateMessageBox( pPerformSelectedActionText[4] );
else
{
gCurrentBackground = TerrainBackgroundTile;
@@ -2566,68 +2568,68 @@ UINT32 WaitForHelpScreenResponse( void )
SetFont( gp12PointFont1 );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 55, L"HOME" );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 55, L"Toggle fake editor lighting ON/OFF" );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 55, pWaitForHelpScreenResponseText[0] );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 55, pWaitForHelpScreenResponseText[1] );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 67, L"INSERT" );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 67, L"Toggle fill mode ON/OFF" );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 67, pWaitForHelpScreenResponseText[2] );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 67, pWaitForHelpScreenResponseText[3] );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 79, L"BKSPC" );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 79, L"Undo last change" );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 79, pWaitForHelpScreenResponseText[4] );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 79, pWaitForHelpScreenResponseText[5] );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 91, L"DEL" );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 91, L"Quick erase object under mouse cursor" );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 91, pWaitForHelpScreenResponseText[6] );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 91, pWaitForHelpScreenResponseText[7] );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 103, L"ESC" );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 103, L"Exit editor" );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 103, pWaitForHelpScreenResponseText[8] );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 103, pWaitForHelpScreenResponseText[9] );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 115, L"PGUP/PGDN" );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 115, L"Change object to be pasted" );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 115, pWaitForHelpScreenResponseText[10] );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 115, pWaitForHelpScreenResponseText[11] );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 127, L"F1" );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 127, L"This help screen" );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 127, pWaitForHelpScreenResponseText[12] );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 127, pWaitForHelpScreenResponseText[13] );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 139, L"F10" );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 139, L"Save current map" );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 139, pWaitForHelpScreenResponseText[14] );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 139, pWaitForHelpScreenResponseText[15] );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 151, L"F11" );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 151, L"Load map as current" );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 151, pWaitForHelpScreenResponseText[16] );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 151, pWaitForHelpScreenResponseText[17] );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 163, L"+/-" );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 163, L"Change shadow darkness by .01" );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 163, pWaitForHelpScreenResponseText[18] );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 163, pWaitForHelpScreenResponseText[19] );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 175, L"SHFT +/-" );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 175, L"Change shadow darkness by .05" );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 175, pWaitForHelpScreenResponseText[20] );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 175, pWaitForHelpScreenResponseText[21] );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 187, L"0 - 9" );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 187, L"Change map/tileset filename" );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 187, pWaitForHelpScreenResponseText[22] );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 187, pWaitForHelpScreenResponseText[23] );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 199, L"b" );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 199, L"Change brush size" );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 199, pWaitForHelpScreenResponseText[24] );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 199, pWaitForHelpScreenResponseText[25] );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 211, L"d" );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 211, L"Draw debris" );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 211, pWaitForHelpScreenResponseText[26] );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 211, pWaitForHelpScreenResponseText[27] );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 223, L"o" );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 223, L"Draw obstacle" );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 223, pWaitForHelpScreenResponseText[28] );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 223, pWaitForHelpScreenResponseText[29] );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 235, L"r" );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 235, L"Draw rocks" );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 235, pWaitForHelpScreenResponseText[30] );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 235, pWaitForHelpScreenResponseText[31] );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 247, L"t" );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 247, L"Toggle trees display ON/OFF" );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 247, pWaitForHelpScreenResponseText[32] );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 247, pWaitForHelpScreenResponseText[33] );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 259, L"g" );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 259, L"Draw ground textures" );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 259, pWaitForHelpScreenResponseText[34] );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 259, pWaitForHelpScreenResponseText[35] );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 271, L"w" );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 271, L"Draw building walls" );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 271, pWaitForHelpScreenResponseText[36] );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 271, pWaitForHelpScreenResponseText[37] );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 283, L"e" );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 283, L"Toggle erase mode ON/OFF" );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 283, pWaitForHelpScreenResponseText[38] );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 283, pWaitForHelpScreenResponseText[39] );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 295, L"h" );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 295, L"Toggle roofs ON/OFF" );
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 295, pWaitForHelpScreenResponseText[40] );
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 295, pWaitForHelpScreenResponseText[41] );
fLeaveScreen = FALSE;
@@ -4312,7 +4314,7 @@ UINT32 EditScreenHandle( void )
if( gfWorldLoaded && gMapInformation.ubMapVersion <= 7 && !gfCorruptMap )
{
ScreenMsg( FONT_MCOLOR_RED, MSG_ERROR, L"Map data has just been corrupted. Don't save, don't quit, get Kris! If he's not here, save the map using a temp filename and document everything you just did, especially your last action!" );
ScreenMsg( FONT_MCOLOR_RED, MSG_ERROR, pAutoLoadMapText[0] );
gfCorruptMap = TRUE;
}
if( gfWorldLoaded && gubScheduleID > 40 && !gfCorruptSchedules )
@@ -4320,7 +4322,7 @@ UINT32 EditScreenHandle( void )
OptimizeSchedules();
if( gubScheduleID > 32 )
{
ScreenMsg( FONT_MCOLOR_RED, MSG_ERROR, L"Schedule data has just been corrupted. Don't save, don't quit, get Kris! If he's not here, save the map using a temp filename and document everything you just did, especially your last action!" );
ScreenMsg( FONT_MCOLOR_RED, MSG_ERROR, pAutoLoadMapText[1] );
gfCorruptSchedules = TRUE;
}
}
@@ -4527,7 +4529,7 @@ void ShowHighGround(INT32 iShowHighGroundCommand)//dnl ch2 210909
}
break;
case 1:
ScreenMsg(FONT_MCOLOR_WHITE, MSG_INTERFACE, L"Showing High Ground Markers");
ScreenMsg(FONT_MCOLOR_WHITE, MSG_INTERFACE, pShowHighGroundText[0] );
for(int cnt=0; cnt<WORLD_MAX; cnt++)
{
if(gpWorldLevelData[cnt].sHeight)
@@ -4546,7 +4548,7 @@ void ShowHighGround(INT32 iShowHighGroundCommand)//dnl ch2 210909
RemoveTopmost(cnt, FIRSTPOINTERS7);
break;
case 3:
ScreenMsg(FONT_MCOLOR_WHITE, MSG_INTERFACE, L"Hiding High Ground Markers");
ScreenMsg(FONT_MCOLOR_WHITE, MSG_INTERFACE, pShowHighGroundText[1] );
for(int cnt=0; cnt<WORLD_MAX; cnt++)
RemoveTopmost(cnt, FIRSTPOINTERS11);
break;
+1
View File
@@ -76,6 +76,7 @@ extern BOOLEAN gfConfirmExitFirst;
extern BOOLEAN gfConfirmExitPending;
extern BOOLEAN gfIntendOnEnteringEditor;
extern BOOLEAN gfResizeMapOnLoading;
extern BOOLEAN gfVanillaMode;//dnl ch33 160909
extern BOOLEAN fRaiseWorld;//dnl ch3 210909
extern BOOLEAN fShowHighGround;//dnl ch2 210909
+4 -3
View File
@@ -21,6 +21,7 @@
#endif
#include "vobject_blitters.h"
#include "Text.h"
extern BOOLEAN gfOverheadMapDirty;
@@ -1067,19 +1068,19 @@ void DisplaySelectionWindowGraphicalInformation()
//usIndex = pNode->uiIndex;
if( !gTilesets[ giCurrentTilesetID].TileSurfaceFilenames[ pNode->uiObjIndx ][0] )
{
mprintf( 2, 2, L"%S[%d] is from default tileset %s (%S)",
mprintf( 2, 2, pDisplaySelectionWindowGraphicalInformationText[0],
gTilesets[0].TileSurfaceFilenames[ pNode->uiObjIndx ],
pNode->uiIndex, gTilesets[0].zName,
gTileSurfaceName[ pNode->uiObjIndx ] );
}
else
{
mprintf( 2, 2, L"File: %S, subindex: %d (%S)",
mprintf( 2, 2, pDisplaySelectionWindowGraphicalInformationText[1],
gTilesets[ giCurrentTilesetID ].TileSurfaceFilenames[ pNode->uiObjIndx ],
pNode->uiIndex, gTileSurfaceName[ pNode->uiObjIndx ] );
}
}
mprintf( 350, 2, L"Current Tileset: %s", gTilesets[ giCurrentTilesetID ].zName );
mprintf( 350, 2, pDisplaySelectionWindowGraphicalInformationText[2], gTilesets[ giCurrentTilesetID ].zName );
}
//----------------------------------------------------------------------------------------------
+88 -53
View File
@@ -41,6 +41,8 @@
#include "connect.h"
#include "sgp_logger.h"
#include "Map Information.h"
#include <vfs/Core/vfs.h>
#include <vfs/Core/vfs_file_raii.h>
#include <vfs/Core/File/vfs_file.h>
@@ -95,7 +97,7 @@ bool UsingNewAttachmentSystem()
bool UsingNewCTHSystem()
{
return (gGameExternalOptions.fUseNCTH == TRUE);
return (gGameSettings.fOptions[TOPTION_USE_NCTH] == TRUE);
}
std::string StringToLower(std::string strToConvert)
@@ -152,7 +154,7 @@ BOOLEAN LoadGameSettings()
gGameSettings.fOptions[TOPTION_SHOW_MISSES] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_SHOW_MISSES" , FALSE );
gGameSettings.fOptions[TOPTION_RTCONFIRM] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_RTCONFIRM" , FALSE );
gGameSettings.fOptions[TOPTION_SLEEPWAKE_NOTIFICATION] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_SLEEPWAKE_NOTIFICATION" , TRUE );
gGameSettings.fOptions[TOPTION_USE_METRIC_SYSTEM] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_USE_METRIC_SYSTEM" , FALSE );
gGameSettings.fOptions[TOPTION_USE_METRIC_SYSTEM] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_USE_METRIC_SYSTEM" , TRUE );
gGameSettings.fOptions[TOPTION_MERC_ALWAYS_LIGHT_UP] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_MERC_ALWAYS_LIGHT_UP" , FALSE );
gGameSettings.fOptions[TOPTION_SMART_CURSOR] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_SMART_CURSOR" , FALSE );
gGameSettings.fOptions[TOPTION_SNAP_CURSOR_TO_DOOR] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_SNAP_CURSOR_TO_DOOR" , TRUE );
@@ -174,13 +176,16 @@ BOOLEAN LoadGameSettings()
gGameSettings.fOptions[TOPTION_ALLOW_SOLDIER_TOOLTIPS] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_ALLOW_SOLDIER_TOOLTIPS" , TRUE );
gGameSettings.fOptions[TOPTION_USE_AUTO_SAVE] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_USE_AUTO_SAVE" , FALSE );
gGameSettings.fOptions[TOPTION_SILENT_SKYRIDER] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_SILENT_SKYRIDER" , FALSE );
gGameSettings.fOptions[TOPTION_LOW_CPU_USAGE] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_LOW_CPU_USAGE" , FALSE );
gGameSettings.fOptions[TOPTION_ENHANCED_DESC_BOX] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_ENHANCED_DESC_BOX" , FALSE );
//gGameSettings.fOptions[TOPTION_LOW_CPU_USAGE] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_LOW_CPU_USAGE" , FALSE );
gGameSettings.fOptions[TOPTION_ENHANCED_DESC_BOX] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_ENHANCED_DESC_BOX" , TRUE );
gGameSettings.fOptions[TOPTION_TOGGLE_TURN_MODE] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_TOGGLE_TURN_MODE" , FALSE );
gGameSettings.fOptions[TOPTION_STAT_PROGRESS_BARS] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_STAT_PROGRESS_BARS" , TRUE ); // HEADROCK HAM 3.6: Progress Bars
gGameSettings.fOptions[TOPTION_REPORT_MISS_MARGIN] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_REPORT_MISS_MARGIN" , FALSE ); // HEADROCK HAM 4: Shot offset report
gGameSettings.fOptions[TOPTION_ALT_MAP_COLOR] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_ALT_MAP_COLOR" , FALSE ); // HEADROCK HAM 4: Strategic Map Colors
gGameSettings.fOptions[TOPTION_ALTERNATE_BULLET_GRAPHICS] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_ALTERNATE_BULLET_GRAPHICS" , TRUE );
gGameSettings.fOptions[TOPTION_USE_NCTH] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_USE_NCTH" , TRUE );
gGameSettings.fOptions[TOPTION_SHOW_TACTICAL_FACE_GEAR] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_SHOW_TACTICAL_FACE_GEAR" , TRUE );
gGameSettings.fOptions[TOPTION_SHOW_TACTICAL_FACE_ICONS] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_SHOW_TACTICAL_FACE_ICONS" , TRUE );
gGameSettings.fOptions[TOPTION_CHEAT_MODE_OPTIONS_HEADER] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_CHEAT_MODE_OPTIONS_HEADER" , FALSE );
gGameSettings.fOptions[TOPTION_FORCE_BOBBY_RAY_SHIPMENTS] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_FORCE_BOBBY_RAY_SHIPMENTS" , FALSE );
gGameSettings.fOptions[TOPTION_CHEAT_MODE_OPTIONS_END] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_CHEAT_MODE_OPTIONS_END" , FALSE );
@@ -343,12 +348,15 @@ BOOLEAN SaveGameSettings()
settings << "TOPTION_ALLOW_SOLDIER_TOOLTIPS = " << (gGameSettings.fOptions[TOPTION_ALLOW_SOLDIER_TOOLTIPS] ? "TRUE" : "FALSE" ) << endl;
settings << "TOPTION_USE_AUTO_SAVE = " << (gGameSettings.fOptions[TOPTION_USE_AUTO_SAVE] ? "TRUE" : "FALSE" ) << endl;
settings << "TOPTION_SILENT_SKYRIDER = " << (gGameSettings.fOptions[TOPTION_SILENT_SKYRIDER] ? "TRUE" : "FALSE" ) << endl;
settings << "TOPTION_LOW_CPU_USAGE = " << (gGameSettings.fOptions[TOPTION_LOW_CPU_USAGE] ? "TRUE" : "FALSE" ) << endl;
//settings << "TOPTION_LOW_CPU_USAGE = " << (gGameSettings.fOptions[TOPTION_LOW_CPU_USAGE] ? "TRUE" : "FALSE" ) << endl;
settings << "TOPTION_ENHANCED_DESC_BOX = " << (gGameSettings.fOptions[TOPTION_ENHANCED_DESC_BOX] ? "TRUE" : "FALSE" ) << endl;
settings << "TOPTION_TOGGLE_TURN_MODE = " << (gGameSettings.fOptions[TOPTION_TOGGLE_TURN_MODE] ? "TRUE" : "FALSE" ) << endl;
settings << "TOPTION_STAT_PROGRESS_BARS = " << (gGameSettings.fOptions[TOPTION_STAT_PROGRESS_BARS] ? "TRUE" : "FALSE" ) << endl; // HEADROCK HAM 3.6: Progress Bars
settings << "TOPTION_ALT_MAP_COLOR = " << (gGameSettings.fOptions[TOPTION_ALT_MAP_COLOR] ? "TRUE" : "FALSE" ) << endl; // HEADROCK HAM 4: Alt Map Colors
settings << "TOPTION_ALTERNATE_BULLET_GRAPHICS = " << (gGameSettings.fOptions[TOPTION_ALTERNATE_BULLET_GRAPHICS] ? "TRUE" : "FALSE" ) << endl;
settings << "TOPTION_USE_NCTH = " << (gGameSettings.fOptions[TOPTION_USE_NCTH] ? "TRUE" : "FALSE" ) << endl;
settings << "TOPTION_SHOW_TACTICAL_FACE_GEAR = " << (gGameSettings.fOptions[TOPTION_SHOW_TACTICAL_FACE_GEAR] ? "TRUE" : "FALSE" ) << endl;
settings << "TOPTION_SHOW_TACTICAL_FACE_ICONS = " << (gGameSettings.fOptions[TOPTION_SHOW_TACTICAL_FACE_ICONS] ? "TRUE" : "FALSE" ) << endl;
settings << "TOPTION_CHEAT_MODE_OPTIONS_HEADER = " << (gGameSettings.fOptions[TOPTION_CHEAT_MODE_OPTIONS_HEADER] ? "TRUE" : "FALSE" ) << endl;
settings << "TOPTION_FORCE_BOBBY_RAY_SHIPMENTS = " << (gGameSettings.fOptions[TOPTION_FORCE_BOBBY_RAY_SHIPMENTS] ? "TRUE" : "FALSE" ) << endl;
settings << "TOPTION_CHEAT_MODE_OPTIONS_END = " << (gGameSettings.fOptions[TOPTION_CHEAT_MODE_OPTIONS_END] ? "TRUE" : "FALSE" ) << endl;
@@ -420,7 +428,7 @@ void InitGameSettings()
gGameSettings.fOptions[ TOPTION_SHOW_MISSES ] = FALSE;
gGameSettings.fOptions[ TOPTION_RTCONFIRM ] = FALSE;
gGameSettings.fOptions[ TOPTION_SLEEPWAKE_NOTIFICATION ] = TRUE;
gGameSettings.fOptions[ TOPTION_USE_METRIC_SYSTEM ] = FALSE;
gGameSettings.fOptions[ TOPTION_USE_METRIC_SYSTEM ] = TRUE;
gGameSettings.fOptions[ TOPTION_MERC_ALWAYS_LIGHT_UP ] = FALSE;
gGameSettings.fOptions[ TOPTION_SMART_CURSOR ] = FALSE;
gGameSettings.fOptions[ TOPTION_SNAP_CURSOR_TO_DOOR ] = TRUE;
@@ -446,8 +454,8 @@ void InitGameSettings()
gGameSettings.fOptions[ TOPTION_ALLOW_SOLDIER_TOOLTIPS ] = TRUE;
gGameSettings.fOptions[ TOPTION_USE_AUTO_SAVE ] = FALSE;
gGameSettings.fOptions[ TOPTION_SILENT_SKYRIDER ] = FALSE;
gGameSettings.fOptions[ TOPTION_LOW_CPU_USAGE ] = FALSE;
gGameSettings.fOptions[ TOPTION_ENHANCED_DESC_BOX ] = FALSE;
//gGameSettings.fOptions[ TOPTION_LOW_CPU_USAGE ] = FALSE;
gGameSettings.fOptions[ TOPTION_ENHANCED_DESC_BOX ] = TRUE;
// arynn
gGameSettings.fOptions[ TOPTION_TOGGLE_TURN_MODE ] = FALSE;
@@ -458,7 +466,14 @@ void InitGameSettings()
// HEADROCK HAM 4:
gGameSettings.fOptions[ TOPTION_ALT_MAP_COLOR ] = FALSE;
gGameSettings.fOptions[ TOPTION_ALTERNATE_BULLET_GRAPHICS ] = FALSE;
gGameSettings.fOptions[ TOPTION_ALTERNATE_BULLET_GRAPHICS ] = TRUE;
// CHRISL: HAM 4: Activate/Deactivate NCTH mode
gGameSettings.fOptions[ TOPTION_USE_NCTH ] = TRUE;
// WANNE:
gGameSettings.fOptions[ TOPTION_SHOW_TACTICAL_FACE_GEAR ] = TRUE;
gGameSettings.fOptions[ TOPTION_SHOW_TACTICAL_FACE_ICONS ] = TRUE;
gGameSettings.fOptions[ TOPTION_REPORT_MISS_MARGIN ] = FALSE;
@@ -503,22 +518,12 @@ void InitGameOptions()
{
memset( &gGameOptions, 0, sizeof( GAME_OPTIONS ) );
//Init the game options
if (is_networked)
gGameOptions.ubBobbyRay = BR_AWESOME;// hayden, was BR_GOOD;
else
gGameOptions.ubBobbyRay = BR_GOOD;
gGameOptions.ubBobbyRay = BR_GOOD;
gGameOptions.fGunNut = TRUE;
gGameOptions.fAirStrikes = FALSE;
if (is_networked)
gGameOptions.ubGameStyle = STYLE_REALISTIC;//hayden, was STYLE_SCIFI;
else
gGameOptions.ubGameStyle = STYLE_SCIFI;
gGameOptions.ubGameStyle = STYLE_SCIFI;
gGameOptions.ubDifficultyLevel = DIF_LEVEL_MEDIUM;
//CHRISL: override default inventory mode when in low res
if(IsNIVModeValid(true) == FALSE)
{
@@ -531,11 +536,7 @@ void InitGameOptions()
gGameOptions.ubAttachmentSystem = ATTACHMENT_OLD;
}
if (is_networked)
gGameOptions.fTurnTimeLimit = TRUE;//hayden
else
gGameOptions.fTurnTimeLimit = FALSE;
gGameOptions.fTurnTimeLimit = FALSE;
gGameOptions.fIronManMode = FALSE;
// following added by SANDRO
@@ -711,7 +712,7 @@ void LoadGameExternalOptions()
gGameExternalOptions.iImpAttributePoints = ((gGameExternalOptions.iMinAttribute * 5) + (gGameExternalOptions.iMaxZeroBonus * 5));
}
gGameExternalOptions.iMaxAttribute = iniReader.ReadInteger("Recruitment Settings","IMP_MAX_ATTRIBUTE",90, gGameExternalOptions.iMinAttribute+1, 100);
gGameExternalOptions.iMaxAttribute = iniReader.ReadInteger("Recruitment Settings","IMP_MAX_ATTRIBUTE",90, gGameExternalOptions.iMinAttribute, 100);
gGameExternalOptions.iIMPStartingLevelCostMultiplier = iniReader.ReadInteger("Recruitment Settings","IMP_STARTING_LEVEL_COST_MULTIPLIER", 5, 0, 100);
gGameExternalOptions.iBonusPointsForDisability = iniReader.ReadInteger("Recruitment Settings","IMP_BONUS_POINTS_FOR_DISABILITY",20, 0, 500);
gGameExternalOptions.iBonusPointsPerSkillNotTaken = iniReader.ReadInteger("Recruitment Settings","IMP_BONUS_POINTS_PER_SKILL_NOT_TAKEN",25, 0, 500);
@@ -862,9 +863,11 @@ void LoadGameExternalOptions()
break;
}
// WANNE: Moved to options screen
//legion by Jazz
gGameExternalOptions.fShowTacticalFaceGear = iniReader.ReadBoolean("Tactical Interface Settings","SHOW_TACTICAL_FACE_GEAR",FALSE);
gGameExternalOptions.fShowTacticalFaceIcons = iniReader.ReadBoolean("Tactical Interface Settings","SHOW_TACTICAL_FACE_ICONS",FALSE);
/*gGameExternalOptions.fShowTacticalFaceGear = iniReader.ReadBoolean("Tactical Interface Settings","SHOW_TACTICAL_FACE_GEAR",FALSE);
gGameExternalOptions.fShowTacticalFaceIcons = iniReader.ReadBoolean("Tactical Interface Settings","SHOW_TACTICAL_FACE_ICONS",FALSE);*/
gGameExternalOptions.bTacticalFaceIconStyle = iniReader.ReadInteger("Tactical Interface Settings","TACTICAL_FACE_ICON_STYLE", 0, 0, 3);
// Camo portraits by Jazz
@@ -997,6 +1000,9 @@ void LoadGameExternalOptions()
//################# Tactical Gameplay Settings ##################
// WANNE: Externalized grid number of new merc when they arrive with the helicopter (by Jazz)
gGameExternalOptions.iInitialMercArrivalLocation = iniReader.ReadInteger("Tactical Gameplay Settings","INITIAL_MERC_ARRIVAL_LOCATION", 4870 );
// HEADROCK HAM B1: Set minimum and maximum CTH
gGameExternalOptions.ubMaximumCTH = iniReader.ReadInteger("Tactical Gameplay Settings","MAXIMUM_POSSIBLE_CTH", 99, 1, 100);
@@ -1037,21 +1043,25 @@ void LoadGameExternalOptions()
// allow old behaviour
gGameExternalOptions.fAimLevelsDependOnDistance = iniReader.ReadBoolean("Tactical Gameplay Settings", "AIM_LEVELS_DEPEND_ON_DISTANCE", TRUE);
gGameExternalOptions.iAimLevelsCompatibilityOption = iniReader.ReadInteger("Tactical Gameplay Settings", "AIM_LEVELS_COMPATIBILITY_OPTION", 0, -10000, 10000);
//WarmSteel - These determine in which group each scope belongs. Needed for dynamic aiming limits.
gGameExternalOptions.sVeryHighPowerScope = iniReader.ReadInteger("Tactical Gameplay Settings","VERY_HIGH_POWER_SCOPE_AIM_THRESHOLD", 18, 0, 255);
gGameExternalOptions.sHighPowerScope = iniReader.ReadInteger("Tactical Gameplay Settings","HIGH_POWER_SCOPE_AIM_THRESHOLD", 13, 0, 255);
gGameExternalOptions.sMediumPowerScope = iniReader.ReadInteger("Tactical Gameplay Settings","MEDIUM_POWER_SCOPE_AIM_THRESHOLD", 8, 0, 255);
//CHRISL: AI Sniper fields
gGameExternalOptions.fAISniperElite = iniReader.ReadBoolean("Tactical Gameplay Settings", "AI_SNIPER_RESTRICT_TO_ELITE", TRUE);
gGameExternalOptions.fAISniperRange = iniReader.ReadInteger("Tactical Gameplay Settings","AI_SNIPER_MIN_RANGE ", 40, 0, 1000);
gGameExternalOptions.fAISniperChance = iniReader.ReadInteger("Tactical Gameplay Settings","AI_SNIPER_CHANCE ", 30, 0, 100);
gGameExternalOptions.fAISniperChanceWithSR = iniReader.ReadInteger("Tactical Gameplay Settings","AI_SNIPER_CHANCE_WITH_SR ", 80, 0, 100);
// HEADROCK HAM B2.6: Controls how much effect target movement has on aiming
gGameExternalOptions.iMovementEffectOnAiming = (float)iniReader.ReadDouble("Tactical Gameplay Settings","CTH_PENALTY_FOR_TARGET_MOVEMENT", 1.5, 0.0, 255.0);
// HEADROCK HAM 3.3: Externalized maximum possible penalty for hitting a moving target. JA2 Default = 30.
gGameExternalOptions.usMaxCTHPenaltyForMovingTarget = iniReader.ReadInteger("Tactical Gameplay Settings","MAX_CTH_PENALTY_FOR_TARGET_MOVEMENT", 30, 0, 300);
// CHRISL: HAM4-NCTH
gGameExternalOptions.fUseNCTH = iniReader.ReadBoolean("Tactical Gameplay Settings", "USE_NCTH", FALSE, false);
// HEADROCK HAM 3.2: Critical Headshots may cause blindness. Rolls 1 to X change of being blinded. 0 = disabled.
gGameExternalOptions.ubChanceBlindedByHeadshot = iniReader.ReadInteger("Tactical Gameplay Settings","CHANCE_BLINDED_BY_HEADSHOT", 0, 0, 100);
@@ -1186,8 +1196,9 @@ void LoadGameExternalOptions()
// HEADROCK HAM B2.3: A "cowering" soldier is twice as susceptible to suppression.
gGameExternalOptions.ubCowerEffectOnSuppression = iniReader.ReadInteger("Tactical Suppression Fire Settings","COWERING_PENALTY_TO_SUPPRESSION_TOLERANCE", 4, 0, 24 );
// HEADROCK HAM B2.6: Toggle whether AI checks for larger magazine when wanting to use burst/auto or suppress from beyond sight range. Also makes enemies less prone to fleeing.
gGameExternalOptions.fIncreaseAISuppressionFire = iniReader.ReadBoolean("Tactical Suppression Fire Settings","INCREASE_AI_WILLINGNESS_TO_SUPPRESS", FALSE);
// CHRISL: Changed from a simple flag to two externalized values for more modder control over AI suppression
gGameExternalOptions.ubAISuppressionMinimumMagSize = iniReader.ReadInteger("Tactical Suppression Fire Settings","AI_SUPPRESS_MIN_MAG_SIZE", 30, 0, 1000);
gGameExternalOptions.ubAISuppressionMinimumAmmo = iniReader.ReadInteger("Tactical Suppression Fire Settings","AI_SUPPRESS_MIN_AMMO_REMAINING", 20, 0, 1000);
// HEADROCK HAM 3.5: Explosive Suppression Effectiveness alters the amount of Suppression Points you get from nearby blasts.
gGameExternalOptions.usExplosionSuppressionEffect = iniReader.ReadInteger("Tactical Suppression Fire Settings","EXPLOSIVE_SUPPRESSION_EFFECTIVENESS", 100, 0, 1000);
@@ -1584,9 +1595,9 @@ void LoadGameExternalOptions()
gGameExternalOptions.ubTrainingSkillMin = iniReader.ReadInteger("Strategic Assignment Settings","MIN_REQUIRED_SKILL_TO_BEGIN_TRAINING",0, 0, 100);
gGameExternalOptions.ubTrainingSkillMax = iniReader.ReadInteger("Strategic Assignment Settings","MAX_SKILL_ACHIEVABLE_BY_TRAINING",100, 0, 100);
gGameExternalOptions.ubSelfTrainingDivisor = iniReader.ReadInteger("Strategic Assignment Settings","TRAINING_RATE_DIVISOR",1000, 1, 10000);
gGameExternalOptions.ubInstructedTrainingDivisor = iniReader.ReadInteger("Strategic Assignment Settings","INSTRUCTED_TRAINING_BONUS_DIVISOR",3000, 1, 10000);
gGameExternalOptions.ubInstructedTrainingDivisor = iniReader.ReadInteger("Strategic Assignment Settings","INSTRUCTED_TRAINING_DIVISOR",3000, 1, 10000);
gGameExternalOptions.ubTeachBonusToTrain = iniReader.ReadInteger("Strategic Assignment Settings","TEACHER_TRAIT_BONUS_TO_TEACHING_EFFICIENCY",30, 0, 100);
gGameExternalOptions.ubTeachBonusToTrain = iniReader.ReadInteger("Strategic Assignment Settings","TEACHER_TRAIT_BONUS_TO_TRAINING_EFFICIENCY",30, 0, 100);
gGameExternalOptions.ubMinSkillToTeach = iniReader.ReadInteger("Strategic Assignment Settings","MIN_SKILL_REQUIRED_TO_TEACH_OTHER",25, 0, 100);
// HEADROCK HAM B2.8: New Trainer Relations: 2 = Trainees will go to sleep when their trainer goes to sleep. 3 = Trainer will go to sleep if all trainees are asleep. 1 = Both. 0 = Neither.
@@ -1619,8 +1630,8 @@ void LoadGameExternalOptions()
//SaveGame slot by Jazz
// WANNE: No need to make it external to switch between old/new. We always use the new save/load screen with more save slots
//gGameExternalOptions.fSaveGameSlot = iniReader.ReadBoolean("Extension","SAVE_GAMES_SLOT",FALSE);
gGameExternalOptions.fSaveGameSlot = TRUE;
gGameExternalOptions.fSaveGameSlot = TRUE;
// WANNE: This is just a debug setting. Only in debug version we set that property to TRUE.
// In Release version this should always be set to FALSE
// dnl ch51 081009 JA2 Debug Settings
@@ -1910,6 +1921,10 @@ void LoadGameAPBPConstants()
//CHRISL: Once we've loaded the AP_MAXIMUM value, we can use it to modifiy all the remaining values
APBPConstants[AP_MINIMUM] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_MINIMUM",40, 10, 100),40);
// WANNE: Externalized minimum APs to get an interrupt
APBPConstants[MIN_APS_TO_INTERRUPT] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","MIN_APS_TO_INTERRUPT",16),16);
APBPConstants[AP_MONSTER_MAXIMUM] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_MONSTER_MAXIMUM",160),160);
APBPConstants[AP_VEHICLE_MAXIMUM] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_VEHICLE_MAXIMUM",200),200);
APBPConstants[MAX_AP_CARRIED] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","MAX_AP_CARRIED",20),20);
@@ -2000,11 +2015,15 @@ void LoadGameAPBPConstants()
APBPConstants[AP_FIFTH_CLICK_AIM_SCOPE] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_FIFTH_CLICK_AIM_SCOPE",4),4);
APBPConstants[AP_SIXTH_CLICK_AIM_SCOPE] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_SIXTH_CLICK_AIM_SCOPE",4),4);
APBPConstants[AP_SEVENTH_CLICK_AIM_SCOPE] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_SEVENTH_CLICK_AIM_SCOPE",4),4);
APBPConstants[AP_EIGHTTH_CLICK_AIM_SCOPE] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_EIGHTTH_CLICK_AIM_SCOPE",4),4);
APBPConstants[AP_EIGHTH_CLICK_AIM_SCOPE] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_EIGHTH_CLICK_AIM_SCOPE",4),4);
APBPConstants[AUTOFIRE_SHOTS_AP_VALUE] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AUTOFIRE_SHOTS_AP_VALUE",20),20);
APBPConstants[BAD_AP_COST] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","BAD_AP_COST",36),36);
APBPConstants[AP_RELOAD_LOOSE] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_RELOAD_LOOSE",8),8);
APBPConstants[AP_UNJAM] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_UNJAM",2),2);
// WANNE: APs needed when you jump through a window
APBPConstants[AP_JUMPWINDOW] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_JUMPWINDOW",40),40);
APBPConstants[AP_MAX_SUPPRESSED] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_MAX_SUPPRESSED",64),64);
APBPConstants[AP_MAX_TURN_SUPPRESSED] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_MAX_TURN_SUPPRESSED",200),200);
APBPConstants[AP_MIN_LIMIT] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_MIN_LIMIT",-100),-100);
@@ -2014,6 +2033,7 @@ void LoadGameAPBPConstants()
APBPConstants[AP_SUPPRESSION_SHOCK_DIVISOR] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_SUPPRESSION_SHOCK_DIVISOR",4),4);
// HEADROCK HAM 3.2: Modifier for legshot AP loss based on damage
APBPConstants[AP_LOSS_PER_LEGSHOT_DAMAGE] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_LOSS_PER_LEGSHOT_DAMAGE",4),4);
APBPConstants[DEFAULT_APS] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","DEFAULT_APS",80),80);
APBPConstants[DEFAULT_AIMSKILL] = iniReader.ReadInteger("APConstants","DEFAULT_AIMSKILL",80);
@@ -2064,7 +2084,11 @@ void LoadGameAPBPConstants()
APBPConstants[BP_WORK_ZIPPER] = iniReader.ReadInteger("APConstants","BP_WORK_ZIPPER",250);
APBPConstants[BP_UNJAM] = iniReader.ReadInteger("APConstants","BP_WORK_ZIPPER",0);
APBPConstants[AP_JUMPWINDOW] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_JUMPWINDOW",40),40);
APBPConstants[BP_JUMPOFFWALL] = iniReader.ReadInteger("BPConstants","BP_JUMPOFFWALL",250);
APBPConstants[BP_JUMPWALL] = iniReader.ReadInteger("BPConstants","BP_JUMPWALL",500);
APBPConstants[AP_JUMPWALL] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_JUMPOFFWALL",40),40);
APBPConstants[AP_JUMPOFFWALL] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_JUMPWALL",24),24);
SetupMaxActionPointsAnimation();
#undef ReadInteger
@@ -2077,11 +2101,13 @@ void LoadCTHConstants()
//Kaiden: Setting Ja2_Options.ini file to be read
CIniReader iniReader(CTH_COEFFICIENTS_FILE);
gGameCTHConstants.NORMAL_SHOOTING_DISTANCE = iniReader.ReadInteger("General","NORMAL_SHOOTING_DISTANCE",100, 1, 10000);
gGameCTHConstants.NORMAL_SHOOTING_DISTANCE = iniReader.ReadInteger("General","NORMAL_SHOOTING_DISTANCE",100, 10, 10000);
gGameCTHConstants.DEGREES_MAXIMUM_APERTURE = iniReader.ReadFloat("General", "DEGREES_MAXIMUM_APERTURE", 15.0, 0.0, 22.5);
gGameCTHConstants.GRAVITY_COEFFICIENT = iniReader.ReadFloat("General", "GRAVITY_COEFFICIENT", 2.0, 0.001f, 100.0);
gGameCTHConstants.RANGE_COEFFICIENT = iniReader.ReadFloat("General", "RANGE_COEFFICIENT", 2.0, 0.001f, 100.0);
gGameCTHConstants.GRAVITY_COEFFICIENT = iniReader.ReadFloat("General", "GRAVITY_COEFFICIENT", 1.0, 0.001f, 100.0);
gGameCTHConstants.VERTICAL_BIAS = iniReader.ReadFloat("General", "VERTICAL_BIAS", 1.0f, 0.01f, 2.0f);
gGameCTHConstants.SCOPE_RANGE_MULTIPLIER = iniReader.ReadFloat("General", "SCOPE_RANGE_MULTIPLIER", 0.7f, 0.5f, 1.5f);
gGameCTHConstants.SIDE_FACING_DIVISOR = iniReader.ReadFloat("General", "SIDE_FACING_DIVISOR", 2.0, 1.0f, 10.0f);
////////////////////////////////////////////////////////////
// Coefficients for factors affecting Base CTH
@@ -2109,11 +2135,12 @@ void LoadCTHConstants()
gGameCTHConstants.BASE_AGILE_TARGET = iniReader.ReadFloat("Base CTH","BASE_AGILE_TARGET",-5.0, -1000.0, 1000.0);
gGameCTHConstants.BASE_TARGET_INVISIBLE = iniReader.ReadFloat("Base CTH","BASE_TARGET_INVISIBLE",-100.0, -1000.0, 1000.0);
gGameCTHConstants.BASE_DRAW_COST = iniReader.ReadFloat("Base CTH","BASE_DRAW_COST",-2.0, -1000.0, 1000.0);
gGameCTHConstants.BASE_TWO_GUNS = iniReader.ReadFloat("Base CTH","BASE_TWO_GUNS",3.5, -1000.0, 1000.0);
gGameCTHConstants.BASE_ONE_HANDED = iniReader.ReadFloat("Base CTH","BASE_ONE_HANDED",2.0, -1000.0, 1000.0);
gGameCTHConstants.BASE_CROUCHING_STANCE = iniReader.ReadFloat("Base CTH","BASE_CROUCHING_STANCE",2.0, -1000.0, 1000.0);
gGameCTHConstants.BASE_PRONE_STANCE = iniReader.ReadFloat("Base CTH","BASE_PRONE_STANCE",3.0, -1000.0, 1000.0);
gGameCTHConstants.BASE_DRAW_COST = iniReader.ReadFloat("Base CTH","BASE_DRAW_COST",2.0, -1000.0, 1000.0);
gGameCTHConstants.BASE_TWO_GUNS = iniReader.ReadFloat("Base CTH","BASE_TWO_GUNS",5.0, -1000.0, 1000.0);
gGameCTHConstants.BASE_ONE_HANDED = iniReader.ReadFloat("Base CTH","BASE_ONE_HANDED",2.5, -1000.0, 1000.0);
gGameCTHConstants.BASE_STANDING_STANCE = iniReader.ReadFloat("Base CTH","BASE_STANDING_STANCE",2.0, -1000.0, 1000.0);
gGameCTHConstants.BASE_CROUCHING_STANCE = iniReader.ReadFloat("Base CTH","BASE_CROUCHING_STANCE",3.0, -1000.0, 1000.0);
gGameCTHConstants.BASE_PRONE_STANCE = iniReader.ReadFloat("Base CTH","BASE_PRONE_STANCE",4.0, -1000.0, 1000.0);
gGameCTHConstants.BASE_HEAVY_WEAPON = iniReader.ReadFloat("Base CTH","BASE_HEAVY_WEAPON",2.0, -1000.0, 1000.0);
gGameCTHConstants.BASE_DIFFICULTY[0] = -100.0;
@@ -2151,9 +2178,9 @@ void LoadCTHConstants()
gGameCTHConstants.AIM_TARGET_INVISIBLE = iniReader.ReadFloat("Aiming CTH","AIM_TARGET_INVISIBLE",-50.0, -1000.0, 1000.0);
gGameCTHConstants.AIM_SNIPER_SKILL = iniReader.ReadFloat("Aiming CTH","AIM_SNIPER_SKILL",25.0, -100.0, 100.0);
gGameCTHConstants.AIM_DRAW_COST = iniReader.ReadFloat("Aiming CTH","AIM_DRAW_COST",-2.5, -1000.0, 1000.0);
gGameCTHConstants.AIM_STANDING_STANCE = iniReader.ReadFloat("Aiming CTH","AIM_STANDING_STANCE",2.5, -1000.0, 1000.0);
gGameCTHConstants.AIM_CROUCHING_STANCE = iniReader.ReadFloat("Aiming CTH","AIM_CROUCHING_STANCE",1.5, -1000.0, 1000.0);
gGameCTHConstants.AIM_DRAW_COST = iniReader.ReadFloat("Aiming CTH","AIM_DRAW_COST",0.5, -1000.0, 1000.0);
gGameCTHConstants.AIM_STANDING_STANCE = iniReader.ReadFloat("Aiming CTH","AIM_STANDING_STANCE",1.5, -1000.0, 1000.0);
gGameCTHConstants.AIM_CROUCHING_STANCE = iniReader.ReadFloat("Aiming CTH","AIM_CROUCHING_STANCE",1.25, -1000.0, 1000.0);
gGameCTHConstants.AIM_PRONE_STANCE = iniReader.ReadFloat("Aiming CTH","AIM_PRONE_STANCE",1.0, -1000.0, 1000.0);
gGameCTHConstants.AIM_TWO_GUNS = iniReader.ReadFloat("Aiming CTH","AIM_TWO_GUNS",4.0, -1000.0, 1000.0);
gGameCTHConstants.AIM_ONE_HANDED = iniReader.ReadFloat("Aiming CTH","AIM_ONE_HANDED",2.5, -1000.0, 1000.0);
@@ -2185,18 +2212,26 @@ void LoadCTHConstants()
gGameCTHConstants.RECOIL_MAX_COUNTER_AGI = iniReader.ReadFloat("Shooting Mechanism","RECOIL_MAX_COUNTER_AGI",1.0, 0.0, 100.0);
gGameCTHConstants.RECOIL_MAX_COUNTER_EXP_LEVEL = iniReader.ReadFloat("Shooting Mechanism","RECOIL_MAX_COUNTER_EXP_LEVEL",1.0, 0.0, 100.0);
gGameCTHConstants.RECOIL_MAX_COUNTER_FORCE = iniReader.ReadFloat("Shooting Mechanism","RECOIL_MAX_COUNTER_FORCE",5.0, 0.0, 100.0);
gGameCTHConstants.RECOIL_COUNTER_ACCURACY_MIN_ERROR = iniReader.ReadFloat("Shooting Mechanism","RECOIL_COUNTER_ACCURACY_MIN",1.0, 0.0, 100.0);
gGameCTHConstants.RECOIL_MAX_COUNTER_CROUCH = iniReader.ReadFloat("Shooting Mechanism","RECOIL_MAX_COUNTER_CROUCH",10.0, -100.0, 100.0);
gGameCTHConstants.RECOIL_MAX_COUNTER_PRONE = iniReader.ReadFloat("Shooting Mechanism","RECOIL_MAX_COUNTER_PRONE",25.0, -100.0, 100.0);
gGameCTHConstants.RECOIL_COUNTER_ACCURACY_MIN_ERROR = iniReader.ReadFloat("Shooting Mechanism","RECOIL_COUNTER_ACCURACY_MIN",0.2f, 0.0, 100.0);
gGameCTHConstants.RECOIL_COUNTER_ACCURACY_DEX = iniReader.ReadFloat("Shooting Mechanism","RECOIL_COUNTER_ACCURACY_DEX",3.0, 0.0, 100.0);
gGameCTHConstants.RECOIL_COUNTER_ACCURACY_WIS = iniReader.ReadFloat("Shooting Mechanism","RECOIL_COUNTER_ACCURACY_WIS",1.0, 0.0, 100.0);
gGameCTHConstants.RECOIL_COUNTER_ACCURACY_AGI = iniReader.ReadFloat("Shooting Mechanism","RECOIL_COUNTER_ACCURACY_AGI",1.0, 0.0, 100.0);
gGameCTHConstants.RECOIL_COUNTER_ACCURACY_EXP_LEVEL = iniReader.ReadFloat("Shooting Mechanism","RECOIL_COUNTER_ACCURACY_EXP_LEVEL",2.0, 0.0, 100.0);
gGameCTHConstants.RECOIL_COUNTER_ACCURACY_AUTO_WEAPONS_DIVISOR = iniReader.ReadFloat("Shooting Mechanism","RECOIL_COUNTER_ACCURACY_AUTO_WEAPONS_DIVISOR",2.0, 1.0, 100.0);
gGameCTHConstants.RECOIL_COUNTER_ACCURACY_TRACER_BONUS = iniReader.ReadFloat("Shooting Mechanism","RECOIL_COUNTER_ACCURACY_TRACER_BONUS",10.0, -1000.0, 1000.0);
gGameCTHConstants.RECOIL_COUNTER_ACCURACY_ANTICIPATION = iniReader.ReadFloat("Shooting Mechanism","RECOIL_COUNTER_ACCURACY_ANTICIPATION",25.0, -1000.0, 1000.0);
gGameCTHConstants.RECOIL_COUNTER_ACCURACY_COMPENSATION = iniReader.ReadFloat("Shooting Mechanism","RECOIL_COUNTER_ACCURACY_COMPENSATION",2.0, 0.0, 5.0);
gGameCTHConstants.RECOIL_COUNTER_FREQUENCY_AGI = iniReader.ReadFloat("Shooting Mechanism","RECOIL_COUNTER_FREQUENCY_AGI",3.0, 0.0, 100.0);
gGameCTHConstants.RECOIL_COUNTER_FREQUENCY_EXP_LEVEL = iniReader.ReadFloat("Shooting Mechanism","RECOIL_COUNTER_FREQUENCY_EXP_LEVEL",2.0, 0.0, 100.0);
gGameCTHConstants.RECOIL_COUNTER_FREQUENCY_AUTO_WEAPONS_DIVISOR = iniReader.ReadFloat("Shooting Mechanism","RECOIL_COUNTER_FREQUENCY_AUTO_WEAPONS_DIVISOR",2.0, -1000.0, 1000.0);
gGameCTHConstants.MAX_BULLET_DEV = iniReader.ReadFloat("Shooting Mechanism","MAX_BULLET_DEV ",10.0, -1000.0, 1000.0);
gGameCTHConstants.RECOIL_COUNTER_INCREMENT = iniReader.ReadInteger("Shooting Mechanism","RECOIL_COUNTER_INCREMENT",20, 0, 100);
gGameCTHConstants.RECOIL_COUNTER_INCREMENT_TRACER = iniReader.ReadInteger("Shooting Mechanism","RECOIL_COUNTER_INCREMENT_TRACER",25, 0, 100);
gGameCTHConstants.NORMAL_RECOIL_DISTANCE = iniReader.ReadInteger("Shooting Mechanism","NORMAL_RECOIL_DISTANCE",140, 10, 10000);
gGameCTHConstants.MAX_BULLET_DEV = iniReader.ReadFloat("Shooting Mechanism","MAX_BULLET_DEV ",10.0, -1000.0, 1000.0);
gGameCTHConstants.RANGE_EFFECTS_DEV = iniReader.ReadBoolean("Shooting Mechanism","RANGE_EFFECTS_DEV", TRUE );
}
+35 -9
View File
@@ -52,7 +52,7 @@ enum
TOPTION_ALLOW_SOLDIER_TOOLTIPS,
TOPTION_USE_AUTO_SAVE,
TOPTION_SILENT_SKYRIDER,
TOPTION_LOW_CPU_USAGE,
//TOPTION_LOW_CPU_USAGE,
TOPTION_ENHANCED_DESC_BOX,
// arynn
@@ -69,6 +69,13 @@ enum
// WANNE: Moved alternate bullets graphics (tracers) to options
TOPTION_ALTERNATE_BULLET_GRAPHICS,
// CHRISL: HAM 4: Activate/Deactivate NCTH mode
TOPTION_USE_NCTH,
// WANNE:
TOPTION_SHOW_TACTICAL_FACE_GEAR,
TOPTION_SHOW_TACTICAL_FACE_ICONS,
// arynn: Debug/Cheat
TOPTION_CHEAT_MODE_OPTIONS_HEADER,
TOPTION_FORCE_BOBBY_RAY_SHIPMENTS, // force all pending Bobby Ray shipments
@@ -696,13 +703,20 @@ typedef struct
BOOLEAN fDynamicAimingTime;
// allow old behaviour
BOOLEAN fAimLevelsDependOnDistance;
BOOLEAN fAimLevelsDependOnDistance; // feel free to dump this option
INT32 iAimLevelsCompatibilityOption; // but not this one
//WarmSteel - These determine in which group each scope belongs. Needed for dynamic aiming limits.
INT16 sVeryHighPowerScope;
INT16 sHighPowerScope;
INT16 sMediumPowerScope;
//CHRISL: AI Sniper fields
BOOLEAN fAISniperElite;
UINT16 fAISniperRange;
UINT16 fAISniperChance;
UINT16 fAISniperChanceWithSR;
// HEADROCK HAM B2.6: Controls how much effect target movement has on aiming
FLOAT iMovementEffectOnAiming;
@@ -718,8 +732,9 @@ typedef struct
// HEADROCK HAM B2.6/2/1: Toggle new Burst/Auto CTH bars: 0=neither, 1=both, 2=Burst, 3=Auto
UINT8 ubNewCTHBars;
// HEADROCK HAM B2.6: Toggle whether AI checks for larger magazine when wanting to suppress at a distance
BOOLEAN fIncreaseAISuppressionFire;
// CHRISL: Changed from a simple flag to two externalized values for more modder control over AI suppression
UINT16 ubAISuppressionMinimumMagSize;
UINT16 ubAISuppressionMinimumAmmo;
// HEADROCK HAM B2.7: Change the speed of skill progression. (defaults set to JA2 normal)
UINT16 usHealthSubpointsToImprove;
@@ -840,9 +855,6 @@ typedef struct
// HEADROCK HAM 3.3: Externalized maximum possible penalty for hitting a moving target. JA2 Default = 30.
UINT16 usMaxCTHPenaltyForMovingTarget;
// CHRISL: HAM4-NCTH
BOOLEAN fUseNCTH;
// HEADROCK HAM 3.3: Increases tolerance while moving.
UINT8 ubTilesMovedPerBonusTolerancePoint;
@@ -960,8 +972,8 @@ typedef struct
BOOLEAN fEnableInventoryPoolQ;
//legion by Jazz
BOOLEAN fShowTacticalFaceGear; //legion 2
BOOLEAN fShowTacticalFaceIcons; //legion 2
//BOOLEAN fShowTacticalFaceGear; //legion 2
//BOOLEAN fShowTacticalFaceIcons; //legion 2
INT8 bTacticalFaceIconStyle;
//Enemy Names Group Legion 2 by Jazz
@@ -980,6 +992,9 @@ typedef struct
UINT8 ubChanceTonyAvailable; // silversurfer/SANDRO
BOOLEAN fStandUpAfterBattle;
INT32 iInitialMercArrivalLocation;
} GAME_EXTERNAL_OPTIONS;
typedef struct
@@ -1230,9 +1245,11 @@ typedef struct
{
UINT32 NORMAL_SHOOTING_DISTANCE; // Distance at which 1x magnification is 100% effective. This is a major component of the entire shooting mechanism.
FLOAT DEGREES_MAXIMUM_APERTURE; // Maximum possible aperture for a 100% muzzle sway shot. Decrease to make all shots more accurate.
FLOAT RANGE_COEFFICIENT; // Determines maximum range which decides when gravity forces bullets to drop
FLOAT GRAVITY_COEFFICIENT; // Changes the way gravity works in the game. Higher values mean bullets don't drop as quickly after reaching max range.
FLOAT VERTICAL_BIAS; // This float can be used to reduce the chance of missing too far upwards or downwards (compared to left/right).
FLOAT SCOPE_RANGE_MULTIPLIER; // Adjusts the minimum effective range of scopes
FLOAT SIDE_FACING_DIVISOR; // Deals with a visual error in NCTH relating to shooting at a target who is facing directly perpendicular to the shooters facing.
FLOAT BASE_EXP; // Importance of Experience for BASE CTH
FLOAT BASE_MARKS; // Importance of Marksmanship for BASE CTH
@@ -1255,6 +1272,7 @@ typedef struct
FLOAT BASE_DRAW_COST; // Applied per 1 AP of the weapon's Ready Cost, under 100AP.
FLOAT BASE_TWO_GUNS; // Gun Difficulty Multiplier for shooting two guns
FLOAT BASE_ONE_HANDED; // Gun Difficulty Multiplier for shooting a pistol with one hand.
FLOAT BASE_STANDING_STANCE; // Gun Difficulty Multiplier for shooting from a standing stance
FLOAT BASE_CROUCHING_STANCE; // Gun Difficulty Multiplier for shooting from a crouched stance
FLOAT BASE_PRONE_STANCE; // Gun Difficulty Multiplier for shooting from a prone stance
FLOAT BASE_HEAVY_WEAPON; // Gun Difficulty Multiplier for shooting a launcher
@@ -1304,6 +1322,8 @@ typedef struct
FLOAT RECOIL_MAX_COUNTER_AGI;
FLOAT RECOIL_MAX_COUNTER_EXP_LEVEL;
FLOAT RECOIL_MAX_COUNTER_FORCE;
FLOAT RECOIL_MAX_COUNTER_CROUCH;
FLOAT RECOIL_MAX_COUNTER_PRONE;
FLOAT RECOIL_COUNTER_ACCURACY_MIN_ERROR;
FLOAT RECOIL_COUNTER_ACCURACY_DEX;
FLOAT RECOIL_COUNTER_ACCURACY_WIS;
@@ -1311,11 +1331,17 @@ typedef struct
FLOAT RECOIL_COUNTER_ACCURACY_EXP_LEVEL;
FLOAT RECOIL_COUNTER_ACCURACY_AUTO_WEAPONS_DIVISOR;
FLOAT RECOIL_COUNTER_ACCURACY_TRACER_BONUS;
FLOAT RECOIL_COUNTER_ACCURACY_ANTICIPATION;
FLOAT RECOIL_COUNTER_ACCURACY_COMPENSATION;
FLOAT RECOIL_COUNTER_FREQUENCY_AGI;
FLOAT RECOIL_COUNTER_FREQUENCY_EXP_LEVEL;
FLOAT RECOIL_COUNTER_FREQUENCY_AUTO_WEAPONS_DIVISOR;
UINT8 RECOIL_COUNTER_INCREMENT;
UINT8 RECOIL_COUNTER_INCREMENT_TRACER;
UINT32 NORMAL_RECOIL_DISTANCE;
FLOAT MAX_BULLET_DEV;
BOOLEAN RANGE_EFFECTS_DEV;
} CTH_CONSTANTS;
+4 -4
View File
@@ -13,11 +13,11 @@
#ifdef JA2EDITOR
//MAP EDITOR BUILD VERSION
CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.4071 (Beta 2011)" };
CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.4396 (Official Release)" };
#elif defined JA2BETAVERSION
//BETA/TEST BUILD VERSION
CHAR16 zVersionLabel[256] = { L"Debug v1.13.4071 (Beta 2011)" };
CHAR16 zVersionLabel[256] = { L"Debug v1.13.4396 (Official Release)" };
#elif defined CRIPPLED_VERSION
//RELEASE BUILD VERSION s
@@ -26,10 +26,10 @@ CHAR16 zVersionLabel[256] = { L"Beta v. 0.98" };
#else
//RELEASE BUILD VERSION
CHAR16 zVersionLabel[256] = { L"Release v1.13.4071 (Beta 2011)" };
CHAR16 zVersionLabel[256] = { L"Release v1.13.4396 (Official Release)" };
#endif
CHAR8 czVersionNumber[16] = { "Build 11.01.18" }; //YY.MM.DD
CHAR8 czVersionNumber[16] = { "Build 11.05.11" }; //YY.MM.DD
CHAR16 zTrackingNumber[16] = { L"Z" };
+6 -2
View File
@@ -20,10 +20,14 @@ extern CHAR16 zTrackingNumber[16];
//
// Keeps track of the saved game version. Increment the saved game version whenever
// you will invalidate the saved game file
#define SAVE_GAME_VERSION 117 //114 //113 //112 //111 //110 //109 //108 //107 //106 //105 //104 //103 //102 //101 //100 // 99
#define SAVE_GAME_VERSION 121 //114 //113 //112 //111 //110 //109 //108 //107 //106 //105 //104 //103 //102 //101 //100 // 99
#define CURRENT_SAVEGAME_DATATYPE_VERSION 116
#define CURRENT_SAVEGAME_DATATYPE_VERSION 121
#define FIXED_NPC_QUOTE_BUG 121 // Before this, we need to reload all npc quote information because it was not being saved and loaded correctly.
#define MOVED_GENERAL_INFO 120 // Before this, general game information was saved much later in the save game process.
#define NCTH_AUTOFIRE_UPDATE 119 // Before this, we didn't track the original autofire offsets
#define BR_EMAIL_DATA_CHANGE 118 // Before this, BR emails caused CTD
#define NCTH_DATATYPE_CHANGE 117 // Before this, we did not have HAM 4.0 NCTH
#define NEW_GENERAL_SAVE_INFO_DATA 116 // Before this, we did not have HAM 4.0 general info
#define IMP_TRAIT_EXPERT_ITEMS_CHANGE 115 // Before this, we did not have additional expert items defined in IMPItemChoices.xml
+6
View File
@@ -844,6 +844,12 @@ BOOLEAN LoadExternalGameplayData(STR directoryName)
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
SGP_THROW_IFFALSE(ReadInMercAvailability(fileName,FALSE), MERCAVAILABILITY);
strcpy(fileName, directoryName);
strcat(fileName, FACEGEARFILENAME);
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
SGP_THROW_IFFALSE(ReadInFaceGear(zNewFaceGear, fileName), FACEGEARFILENAME);
//WriteFaceGear();
#ifndef ENGLISH
AddLanguagePrefix(fileName);
if ( FileExists(fileName) )
+10 -2
View File
@@ -12,6 +12,7 @@ void SetupMaxActionPointsAnimation();
enum {
AP_MAXIMUM,
AP_MINIMUM,
MIN_APS_TO_INTERRUPT,
AP_MONSTER_MAXIMUM,
AP_VEHICLE_MAXIMUM,
MAX_AP_CARRIED,
@@ -94,9 +95,12 @@ AP_FOURTH_CLICK_AIM_SCOPE,
AP_FIFTH_CLICK_AIM_SCOPE,
AP_SIXTH_CLICK_AIM_SCOPE,
AP_SEVENTH_CLICK_AIM_SCOPE,
AP_EIGHTTH_CLICK_AIM_SCOPE,
AP_EIGHTH_CLICK_AIM_SCOPE,
AP_RELOAD_LOOSE,
AP_UNJAM,
AP_JUMPWINDOW, //WANNE: jump window APs
AP_WRONG_MAG,
AP_MAX_SUPPRESSED,
AP_MAX_TURN_SUPPRESSED,
@@ -107,6 +111,7 @@ AP_SUPPRESSION_MOD,
AP_SUPPRESSION_SHOCK_DIVISOR,
// HEADROCK HAM 3.3: AP loss per point of damage, inflicted when a character is knocked down by a hit to the legs.
AP_LOSS_PER_LEGSHOT_DAMAGE,
AUTOFIRE_SHOTS_AP_VALUE,
BAD_AP_COST,
DEFAULT_APS,
@@ -157,7 +162,10 @@ BP_JUMP_OVER,
BP_BACK_PACK,
BP_WORK_ZIPPER,
BP_UNJAM,
AP_JUMPWINDOW, //jump window
BP_JUMPOFFWALL,
BP_JUMPWALL,
AP_JUMPWALL,
AP_JUMPOFFWALL,
TOTAL_APBP_VALUES
};
#endif
+31 -13
View File
@@ -71,6 +71,7 @@ public:
}
void Shutdown()
{
stopVideo(); // if one is still "running"
if(_type & VT_SMK)
{
SmkShutdown();
@@ -104,7 +105,7 @@ public:
{
return false;
}
SGP_THROW(L"Invalid Video Player state!");
SGP_THROW(L"Invalid Video Player state : last video was not properly stopped ");
}
void stopVideo()
@@ -128,6 +129,14 @@ public:
{
return false;
}
// stop running video before starting a new one
stopVideo();
if(filename.empty())
{
return false;
}
/// check file extension
std::string ext;
@@ -289,20 +298,24 @@ UINT32 IntroScreenInit( void )
gfIntroScreenEntry = TRUE;
CIniReader inireader("IntroVideos.ini");
s_VFN[INTRO_REBEL_CRDT] = inireader.ReadString("INTRO_BEGINNING","INTRO_REBEL_CRDT","INTRO\\Rebel_cr");
s_VFN[INTRO_OMERTA] = inireader.ReadString("INTRO_BEGINNING","INTRO_OMERTA","INTRO\\Omerta");
s_VFN[INTRO_PRAGUE_CRDT] = inireader.ReadString("INTRO_BEGINNING","INTRO_PRAGUE_CRDT","INTRO\\Prague_cr");
s_VFN[INTRO_PRAGUE] = inireader.ReadString("INTRO_BEGINNING","INTRO_PRAGUE","INTRO\\Prague");
// BF: If NO_DEFAULT_VALUES is set to true, then only the explicitely used videos will be shown.
BOOLEAN no_defaults = inireader.ReadBoolean("INTRO", "NO_DEFAULT_VALUES", false);
s_VFN[INTRO_REBEL_CRDT] = inireader.ReadString("INTRO_BEGINNING", "INTRO_REBEL_CRDT", no_defaults ? "" : "INTRO\\Rebel_cr");
s_VFN[INTRO_OMERTA] = inireader.ReadString("INTRO_BEGINNING", "INTRO_OMERTA", no_defaults ? "" : "INTRO\\Omerta");
s_VFN[INTRO_PRAGUE_CRDT] = inireader.ReadString("INTRO_BEGINNING", "INTRO_PRAGUE_CRDT", no_defaults ? "" : "INTRO\\Prague_cr");
s_VFN[INTRO_PRAGUE] = inireader.ReadString("INTRO_BEGINNING", "INTRO_PRAGUE", no_defaults ? "" : "INTRO\\Prague");
//there are no more videos shown for the begining
s_VFN[INTRO_END_END_SPEECH_MIGUEL] = inireader.ReadString("INTRO_ENDING","INTRO_END_END_SPEECH_MIGUEL","INTRO\\Throne_Mig");
s_VFN[INTRO_END_END_SPEECH_NO_MIGUEL] = inireader.ReadString("INTRO_ENDING","INTRO_END_END_SPEECH_NO_MIGUEL","INTRO\\Throne_NoMig");
s_VFN[INTRO_END_HELI_FLYBY] = inireader.ReadString("INTRO_ENDING","INTRO_END_HELI_FLYBY","INTRO\\Heli_FlyBy");
s_VFN[INTRO_END_SKYRIDER_HELICOPTER] = inireader.ReadString("INTRO_ENDING","INTRO_END_SKYRIDER_HELICOPTER","INTRO\\Heli_Sky");
s_VFN[INTRO_END_NOSKYRIDER_HELICOPTER] = inireader.ReadString("INTRO_ENDING","INTRO_END_NOSKYRIDER_HELICOPTER","INTRO\\Heli_NoSky");
s_VFN[INTRO_END_END_SPEECH_MIGUEL] = inireader.ReadString("INTRO_ENDING","INTRO_END_END_SPEECH_MIGUEL", no_defaults ? "" : "INTRO\\Throne_Mig");
s_VFN[INTRO_END_END_SPEECH_NO_MIGUEL] = inireader.ReadString("INTRO_ENDING","INTRO_END_END_SPEECH_NO_MIGUEL", no_defaults ? "" : "INTRO\\Throne_NoMig");
s_VFN[INTRO_END_HELI_FLYBY] = inireader.ReadString("INTRO_ENDING","INTRO_END_HELI_FLYBY", no_defaults ? "" : "INTRO\\Heli_FlyBy");
s_VFN[INTRO_END_SKYRIDER_HELICOPTER] = inireader.ReadString("INTRO_ENDING","INTRO_END_SKYRIDER_HELICOPTER", no_defaults ? "" : "INTRO\\Heli_Sky");
s_VFN[INTRO_END_NOSKYRIDER_HELICOPTER] = inireader.ReadString("INTRO_ENDING","INTRO_END_NOSKYRIDER_HELICOPTER", no_defaults ? "" : "INTRO\\Heli_NoSky");
s_VFN[INTRO_SPLASH_SCREEN] = inireader.ReadString("INTRO_SPLASH","INTRO_SPLASH_SCREEN","INTRO\\SplashScreen");
s_VFN[INTRO_SPLASH_TALONSOFT] = inireader.ReadString("INTRO_SPLASH","INTRO_SPLASH_TALONSOFT","INTRO\\TalonSoftid_endhold");
s_VFN[INTRO_SPLASH_SCREEN] = inireader.ReadString("INTRO_SPLASH","INTRO_SPLASH_SCREEN", no_defaults ? "" : "INTRO\\SplashScreen");
s_VFN[INTRO_SPLASH_TALONSOFT] = inireader.ReadString("INTRO_SPLASH","INTRO_SPLASH_TALONSOFT", no_defaults ? "" : "INTRO\\TalonSoftid_endhold");
//there are no more videos shown for the endgame
@@ -401,6 +414,11 @@ void ExitIntroScreen()
s_VP.Shutdown();
}
void StopIntroVideo()
{
s_VP.stopVideo();
}
void HandleIntroScreen()
{
//if we are exiting this screen, this frame, dont update the screen
@@ -679,7 +697,7 @@ void DisplaySirtechSplashScreen()
VOBJECT_DESC VObjectDesc;
memset( &VObjectDesc, 0, sizeof( VOBJECT_DESC ) );
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE | VOBJECT_CREATE_FROMPNG_FALLBACK;
FilenameForBPP("INTERFACE\\SirtechSplash.sti", VObjectDesc.ImageFile);
// FilenameForBPP("INTERFACE\\TShold.sti", VObjectDesc.ImageFile);
+1
View File
@@ -7,6 +7,7 @@ UINT32 IntroScreenShutdown( void );
UINT32 IntroScreenHandle( void );
UINT32 IntroScreenInit( void );
void StopIntroVideo();
//enums used for when the intro screen can come up, used with 'gbIntroScreenMode'
enum EIntroType
+2 -2
View File
@@ -28,7 +28,7 @@ void InitJA2SplashScreen()
INT32 i = 0;
memset( &VSurfaceDesc, 0, sizeof( VSURFACE_DESC ) );
VSurfaceDesc.fCreateFlags = VSURFACE_CREATE_FROMFILE | VSURFACE_SYSTEM_MEM_USAGE;
VSurfaceDesc.fCreateFlags = VSURFACE_CREATE_FROMFILE | VSURFACE_SYSTEM_MEM_USAGE | VSURFACE_CREATE_FROMPNG_FALLBACK;
sprintf( VSurfaceDesc.ImageFile, "LOADSCREENS\\Notification.sti" );
if( !AddVideoSurface( &VSurfaceDesc, &uiLogoID ) )
{
@@ -55,7 +55,7 @@ void InitJA2SplashScreen()
# endif // JA2TESTVERSION
memset( &VSurfaceDesc, 0, sizeof( VSURFACE_DESC ) );
VSurfaceDesc.fCreateFlags = VSURFACE_CREATE_FROMFILE | VSURFACE_SYSTEM_MEM_USAGE;
VSurfaceDesc.fCreateFlags = VSURFACE_CREATE_FROMFILE | VSURFACE_SYSTEM_MEM_USAGE | VSURFACE_CREATE_FROMPNG_FALLBACK;
GetMLGFilename( VSurfaceDesc.ImageFile, MLG_SPLASH );
try
{
+7 -6
View File
@@ -21,20 +21,24 @@
#if !defined(ENGLISH) && !defined(GERMAN) && !defined(RUSSIAN) && !defined(DUTCH) && !defined(POLISH) && !defined(FRENCH) && !defined(ITALIAN) && !defined(TAIWANESE) && !defined(CHINESE)
/* please set one manually here (by uncommenting) if not willingly to set Workspace wide */
#define ENGLISH
//#define GERMAN
//#define RUSSIAN
//#define DUTCH
//#define POLISH
//#define FRENCH
//#define ITALIAN
//#define TAIWANESE
// For CHINESE language we also have to define WINFONTS!
// WANNE: If we like to build Polish version, we have to do this in VS2008/VS2010, because in VS2005 we get weird behavior (progress bar not moving when loading sector, ...).
// To get correct display of Polish letters, it is needed to set "#pragma setlocale("POLISH")" in "_PolishText.cpp" and "_"Ja25PolishText.cpp.
// Unfortunatelly setting the "pragma" causes the weird behavior when building in VS2005, this is why we should build in VS2008/VS2010.
//#define POLISH
// WANNE: For CHINESE language we also have to define WINFONTS! So when building Chinese version, enable both defines.
//#define CHINESE
//#define WINFONTS
#endif
//**ddd direct link libraries
@@ -51,9 +55,6 @@
# error "At least You have to specify a Language somewhere. See comments above."
#endif
//if the language represents words as single chars
#ifdef TAIWAN
#define SINGLE_CHAR_WORDS
+21 -3
View File
@@ -30,6 +30,10 @@
#include "Strategic Event Handler.h"
#include "connect.h"
#include "GameSettings.h"
#include <vfs/Core/vfs.h>
#include <vfs/Core/vfs_file_raii.h>
#include <vfs/Core/File/vfs_file.h>
/*
typedef struct
@@ -334,7 +338,7 @@ MOUSE_REGION gSelectedUpDownArrowOnScrollAreaRegion[2];
void SelectUpDownArrowOnScrollAreaRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
//Dealtar's Airport Externalization.
UINT16 gusCurShipmentDestinationID;
INT16 gusCurShipmentDestinationID;
extern CPostalService gPostalService;
UINT8 guiNumOfDisplayedCities=0;
vector<PDestinationStruct> gDestinationTable;
@@ -2219,15 +2223,29 @@ void AddJohnsGunShipment()
// want to add two guns (Automags, AUTOMAG_III), and four clips of ammo.
Temp[0].usItemIndex = AUTOMAG_III;
Temp[0].ubNumberPurchased = 2;
Temp[0].bItemQuality = 100;
Temp[0].usBobbyItemIndex = 0;// does this get used anywhere???
Temp[0].fUsed = FALSE;
// memcpy( &(LaptopSaveInfo.BobbyRayOrdersOnDeliveryArray[ cnt ].BobbyRayPurchase[0]), &Temp, sizeof(BobbyRayPurchaseStruct) );
Temp[1].usItemIndex = CLIP762N_5_AP;
// WANNE: We have to check if profile 1.13 is available or not, to get the correct ammo
BOOLEAN isData113ProfileAvailable = FALSE;
if(getVFS()->getProfileStack()->getProfile(L"v1.13") != NULL)
isData113ProfileAvailable = TRUE;
else
isData113ProfileAvailable = FALSE;
if (isData113ProfileAvailable)
Temp[1].usItemIndex = 557;
else
Temp[1].usItemIndex = CLIP762N_5_AP;
Temp[1].ubNumberPurchased = 2;
Temp[1].bItemQuality = 5;
Temp[1].usBobbyItemIndex = 0;// does this get used anywhere???
+1
View File
@@ -117,6 +117,7 @@ void GameInitCharProfile()
{
LaptopSaveInfo.iIMPIndex = 0;
iCurrentPortrait = 0;
iCurrentProfileMode = 0;
// iCurrentVoice = 0;
iPortraitNumber = 0;
+3 -2
View File
@@ -370,7 +370,7 @@ void BtnIMPConfirmYes(GUI_BUTTON *btn,INT32 reason)
//Kaiden: And here is my Answer to the IMP E-mails only
// profiling the last IMP made. You get the results immediately
AddEmail(IMP_EMAIL_PROFILE_RESULTS, IMP_EMAIL_PROFILE_RESULTS_LENGTH, IMP_PROFILE_RESULTS, GetWorldTotalMin( ), LaptopSaveInfo.iIMPIndex );
AddEmail(IMP_EMAIL_PROFILE_RESULTS, IMP_EMAIL_PROFILE_RESULTS_LENGTH, IMP_PROFILE_RESULTS, GetWorldTotalMin( ), LaptopSaveInfo.iIMPIndex, -1 );
//RenderCharProfile( );
@@ -1526,6 +1526,7 @@ BOOLEAN LoadImpCharacter( STR nickName )
return FALSE;
}
/*
//new camo face
if ( gGameExternalOptions.fShowCamouflageFaces == TRUE )
{
@@ -1534,7 +1535,7 @@ BOOLEAN LoadImpCharacter( STR nickName )
gCamoFace[iProfileId].gDesertCamoface = FALSE;
gCamoFace[iProfileId].gSnowCamoface = FALSE;
}
*/
// charge the player
// is the character male?
+2 -2
View File
@@ -444,7 +444,7 @@ void ProcessPlayerInputActivationString( void )
ResetActivationStringTextBox();
//DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 11 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
AddEmail(IMP_EMAIL_PROFILE_RESULTS, IMP_EMAIL_PROFILE_RESULTS_LENGTH, IMP_PROFILE_RESULTS, GetWorldTotalMin( ), LaptopSaveInfo.iIMPIndex );
AddEmail(IMP_EMAIL_PROFILE_RESULTS, IMP_EMAIL_PROFILE_RESULTS_LENGTH, IMP_PROFILE_RESULTS, GetWorldTotalMin( ), LaptopSaveInfo.iIMPIndex, -1 );
}
}
else
@@ -470,7 +470,7 @@ void ProcessPlayerInputActivationString( void )
ResetActivationStringTextBox();
//DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 11 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
AddEmail(IMP_EMAIL_PROFILE_RESULTS, IMP_EMAIL_PROFILE_RESULTS_LENGTH, IMP_PROFILE_RESULTS, GetWorldTotalMin( ), LaptopSaveInfo.iIMPIndex );
AddEmail(IMP_EMAIL_PROFILE_RESULTS, IMP_EMAIL_PROFILE_RESULTS_LENGTH, IMP_PROFILE_RESULTS, GetWorldTotalMin( ), LaptopSaveInfo.iIMPIndex, -1 );
}
}
else
+11 -4
View File
@@ -987,6 +987,7 @@ BOOLEAN ShouldTraitBeSkipped( UINT32 uiTrait )
}
else
{
// WANNE: No material arts selection allowed for big body types and females, because we don't have a material art animation on big body types!
if( uiTrait == IMP_SKILL_TRAITS__MARTIAL_ARTS && (!fCharacterIsMale || bBigBodySelected()) )
return( TRUE );
else
@@ -998,6 +999,13 @@ BOOLEAN DoesSkillHaveExpertLevel( UINT32 uiSkillTrait )
{
if( gGameOptions.fNewTraitSystem )
{
// WANNE: Yes we have no animation, but the Trait bonus also works with the missing animations.
/*
// WANNE: No material arts allowed for big body types and females, because we don't have a material art animation on big body types!
if (uiSkillTrait == IMP_SKILL_TRAITS_NEW_MARTIAL_ARTS && (!fCharacterIsMale || bBigBodySelected()))
return (FALSE);
*/
return( TRUE );
}
else
@@ -1008,11 +1016,10 @@ BOOLEAN DoesSkillHaveExpertLevel( UINT32 uiSkillTrait )
{
return( FALSE );
}
else
{
return( TRUE );
}
return( TRUE );
}
return( TRUE );
}
+5 -5
View File
@@ -39,7 +39,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D &quot;_CRT_SECURE_NO_DEPRECATE&quot;"
AdditionalOptions="/D _CRT_SECURE_NO_DEPRECATE"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;"
@@ -104,7 +104,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D &quot;_CRT_SECURE_NO_DEPRECATE&quot;"
AdditionalOptions="/D _CRT_SECURE_NO_DEPRECATE"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;"
RuntimeLibrary="0"
@@ -165,7 +165,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D &quot;_CRT_SECURE_NO_DEPRECATE&quot;"
AdditionalOptions="/D _CRT_SECURE_NO_DEPRECATE"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;"
RuntimeLibrary="0"
@@ -226,7 +226,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D &quot;_CRT_SECURE_NO_DEPRECATE&quot;"
AdditionalOptions="/D _CRT_SECURE_NO_DEPRECATE"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;"
@@ -291,7 +291,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D &quot;_CRT_SECURE_NO_DEPRECATE&quot;"
AdditionalOptions="/D _CRT_SECURE_NO_DEPRECATE"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;"
+4 -2
View File
@@ -49,6 +49,8 @@ using namespace std;
extern StrategicMapElement StrategicMap[];
extern INT16 gusCurShipmentDestinationID;
/////////////////////////////////////////////////////
// CShipmentManipulator member implementation
/////////////////////////////////////////////////////
@@ -528,10 +530,10 @@ BOOLEAN CPostalService::DeliverShipment(UINT16 usShipmentID)
// Shipment from Bobby Ray
if (shs.sSenderID == BOBBYR_SENDER_ID)
AddEmail( BOBBYR_SHIPMENT_ARRIVED, BOBBYR_SHIPMENT_ARRIVED_LENGTH, BOBBY_R, GetWorldTotalMin(), -1 );
AddEmail( BOBBYR_SHIPMENT_ARRIVED, BOBBYR_SHIPMENT_ARRIVED_LENGTH, BOBBY_R, GetWorldTotalMin(), -1, gusCurShipmentDestinationID);
// Shipment from John Kulba
else
AddEmail( JOHN_KULBA_GIFT_IN_DRASSEN, JOHN_KULBA_GIFT_IN_DRASSEN_LENGTH, JOHN_KULBA, GetWorldTotalMin(), -1 );
AddEmail( JOHN_KULBA_GIFT_IN_DRASSEN, JOHN_KULBA_GIFT_IN_DRASSEN_LENGTH, JOHN_KULBA, GetWorldTotalMin(), -1, gusCurShipmentDestinationID);
}
shs.ShipmentPackages.clear();
+1 -1
View File
@@ -160,7 +160,7 @@ destinationEndElementHandle(void *userData, const XML_Char *name)
else if(strcmp(name, "sGridNo") == 0)
{
pData->curElement = ELEMENT;
pData->tempDest.sGridNo = (UINT16) atoi(pData->szCharData);
pData->tempDest.sGridNo = (UINT32) atoi(pData->szCharData);
}
else if(strcmp(name, "uiIndex") == 0)
{
+190 -95
View File
@@ -329,7 +329,7 @@ void PreProcessEmail( EmailPtr pMail );
void ModifyInsuranceEmails( UINT16 usMessageId, INT32 *iResults, EmailPtr pMail, UINT8 ubNumberOfRecords );
BOOLEAN ReplaceMercNameAndAmountWithProperData( CHAR16 *pFinishedString, EmailPtr pMail );
BOOLEAN ReplaceBiffNameWithProperMercName( CHAR16 *pFinishedString, EmailPtr pMail, CHAR16 *pMercName );
extern UINT16 gusCurShipmentDestinationID;
extern INT16 gusCurShipmentDestinationID;
extern CPostalService gPostalService;
@@ -415,7 +415,7 @@ BOOLEAN EnterEmail()
FilenameForBPP("LAPTOP\\maillistdivider.sti", VObjectDesc.ImageFile);
CHECKF(AddVideoObject(&VObjectDesc, &guiMAILDIVIDER));
//AddEmail(IMP_EMAIL_PROFILE_RESULTS, IMP_EMAIL_PROFILE_RESULTS_LENGTH, IMP_PROFILE_RESULTS, GetWorldTotalMin( ) );
//AddEmail(IMP_EMAIL_PROFILE_RESULTS, IMP_EMAIL_PROFILE_RESULTS_LENGTH, IMP_PROFILE_RESULTS, GetWorldTotalMin( ), -1, -1 );
// initialize mouse regions
InitializeMouseRegions();
@@ -438,7 +438,7 @@ BOOLEAN EnterEmail()
RenderEmail();
//AddEmail( MERC_REPLY_GRIZZLY, MERC_REPLY_LENGTH_GRIZZLY, GRIZZLY_MAIL, GetWorldTotalMin() );
//AddEmail( MERC_REPLY_GRIZZLY, MERC_REPLY_LENGTH_GRIZZLY, GRIZZLY_MAIL, GetWorldTotalMin(), -1, -1 );
//RenderButtons( );
@@ -682,7 +682,7 @@ void AddEmailWithSpecialData(INT32 iMessageOffset, INT32 iMessageLength, UINT8 u
ReplaceMercNameAndAmountWithProperData( pSubject, &FakeEmail );
// add message to list
AddEmailMessage(iMessageOffset,iMessageLength, pSubject, iDate, ubSender, FALSE, iFirstData, uiSecondData, -1 );
AddEmailMessage(iMessageOffset,iMessageLength, pSubject, iDate, ubSender, FALSE, iFirstData, uiSecondData, -1 , -1);
// if we are in fact int he laptop, redraw icons, might be change in mail status
@@ -695,14 +695,22 @@ void AddEmailWithSpecialData(INT32 iMessageOffset, INT32 iMessageLength, UINT8 u
return;
}
void AddEmailWFMercLevelUp(INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender, INT32 iDate, INT32 iCurrentIMPPosition)
void AddEmailWFMercAvailable(INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender, INT32 iDate, INT32 iCurrentIMPPosition)
{
CHAR16 pSubject[320];
UINT8 subjectLine = (170 - iMessageLength) * 2;
UINT8 subjectLine = 0;
// WF mercs
if (iMessageLength < 178) // -> see: New113AIMMercMailTexts
subjectLine = (iMessageLength - 170) * 2;
// Generic mercs
else
subjectLine = 16; // -> see: New113AIMMercMailTexts
wcscpy( pSubject, New113AIMMercMailTexts[subjectLine] );
AddEmailMessage(iMessageOffset,iMessageLength, pSubject, iDate, ubSender, FALSE, 0, 0, iCurrentIMPPosition );
AddEmailMessage(iMessageOffset,iMessageLength, pSubject, iDate, ubSender, FALSE, 0, 0, iCurrentIMPPosition, -1 );
// if we are in fact int he laptop, redraw icons, might be change in mail status
@@ -715,7 +723,7 @@ void AddEmailWFMercLevelUp(INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubS
return;
}
void AddEmail(INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender, INT32 iDate, INT32 iCurrentIMPPosition)
void AddEmail(INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender, INT32 iDate, INT32 iCurrentIMPPosition, INT16 iCurrentShipmentDestinationID)
{
CHAR16 pSubject[320];
//MessagePtr pMessageList;
@@ -726,7 +734,7 @@ void AddEmail(INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender, INT32
LoadEncryptedDataFromFile("BINARYDATA\\Email.edt", pSubject, 640*(iMessageOffset), 640);
// add message to list
AddEmailMessage(iMessageOffset,iMessageLength, pSubject, iDate, ubSender, FALSE, 0, 0, iCurrentIMPPosition );
AddEmailMessage(iMessageOffset,iMessageLength, pSubject, iDate, ubSender, FALSE, 0, 0, iCurrentIMPPosition, iCurrentShipmentDestinationID );
// if we are in fact int he laptop, redraw icons, might be change in mail status
@@ -751,7 +759,7 @@ void AddPreReadEmail(INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender,
LoadEncryptedDataFromFile("BINARYDATA\\Email.edt", pSubject, 640*(iMessageOffset), 640);
// add message to list
AddEmailMessage(iMessageOffset,iMessageLength, pSubject, iDate, ubSender, TRUE, 0, 0, -1 );
AddEmailMessage(iMessageOffset,iMessageLength, pSubject, iDate, ubSender, TRUE, 0, 0, -1, -1 );
// if we are in fact int he laptop, redraw icons, might be change in mail status
@@ -764,7 +772,7 @@ void AddPreReadEmail(INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender,
return;
}
void AddEmailMessage(INT32 iMessageOffset, INT32 iMessageLength,STR16 pSubject, INT32 iDate, UINT8 ubSender, BOOLEAN fAlreadyRead, INT32 iFirstData, UINT32 uiSecondData, INT32 iCurrentIMPPosition )
void AddEmailMessage(INT32 iMessageOffset, INT32 iMessageLength,STR16 pSubject, INT32 iDate, UINT8 ubSender, BOOLEAN fAlreadyRead, INT32 iFirstData, UINT32 uiSecondData, INT32 iCurrentIMPPosition, INT16 iCurrentShipmentDestinationID )
{
// will add a message to the list of messages
EmailPtr pEmail=pEmailList;
@@ -832,6 +840,10 @@ void AddEmailMessage(INT32 iMessageOffset, INT32 iMessageLength,STR16 pSubject,
pTempEmail->iCurrentIMPPosition = iCurrentIMPPosition;
// WANNE.MAIL: Fix
pTempEmail->iCurrentShipmentDestinationID = iCurrentShipmentDestinationID;
// set date and sender, Id
if(pEmail)
pTempEmail->iId=iId+1;
@@ -3221,6 +3233,11 @@ BOOLEAN HandleMailSpecialMessages( UINT16 usMessageId, INT32 *iResults, EmailPtr
if (!pMessageRecordList)
{
// WANNE.MAIL: Fix
gusCurShipmentDestinationID = -1; // Reset
gusCurShipmentDestinationID = pMail->iCurrentShipmentDestinationID;
// Loop through each line of the shipment EDT-file
for (int i = 0; i < BOBBYR_SHIPMENT_ARRIVED_LENGTH; i++)
{
wstrMail.clear();
@@ -3229,11 +3246,15 @@ BOOLEAN HandleMailSpecialMessages( UINT16 usMessageId, INT32 *iResults, EmailPtr
index = wstrMail.find(L"$DESTINATIONNAME$");
if (index != wstring::npos)
// WANNE.MAIL: Fix
if (gusCurShipmentDestinationID > 0)
{
wstrMail.erase(index, strlen("$DESTINATIONNAME$"));
RefToDestinationStruct ds = gPostalService.GetDestination(gusCurShipmentDestinationID);
wstrMail.insert(index, ds.wstrName.c_str());
if (index != wstring::npos)
{
wstrMail.erase(index, strlen("$DESTINATIONNAME$"));
RefToDestinationStruct ds = gPostalService.GetDestination(gusCurShipmentDestinationID);
wstrMail.insert(index, ds.wstrName.c_str());
}
}
AddEmailRecordToList((STR16)wstrMail.c_str());
@@ -3502,56 +3523,122 @@ void HandleIMPCharProfileResultsMessage( void)
// now the personality intro
iOffSet = IMP_RESULTS_ATTITUDE_INTRO;
iEndOfSection = IMP_RESULTS_ATTITUDE_LENGTH;
iCounter = 0;
iCounter = 0;
while(iEndOfSection > iCounter)
{
// read one record from email file
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( iOffSet + iCounter ), MAIL_STRING_SIZE );
// read one record from email file
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( iOffSet + iCounter ), MAIL_STRING_SIZE );
// add to list
AddEmailRecordToList( pString );
// add to list
AddEmailRecordToList( pString );
// increment email record counter
iCounter++;
// increment email record counter
iCounter++;
}
// personality itself
switch( gMercProfiles[ iCurrentIMPSlot ].bAttitude )
// WANNE: Old trait system: attitudes
if (!gGameOptions.fNewTraitSystem)
{
// normal as can be
case( ATT_NORMAL ):
iOffSet = IMP_ATTITUDE_NORMAL;
break;
case( ATT_FRIENDLY ):
iOffSet = IMP_ATTITUDE_FRIENDLY;
break;
case( ATT_LONER ):
iOffSet = IMP_ATTITUDE_LONER;
break;
case( ATT_OPTIMIST ):
iOffSet = IMP_ATTITUDE_OPTIMIST;
break;
case( ATT_PESSIMIST ):
iOffSet = IMP_ATTITUDE_PESSIMIST;
break;
case( ATT_AGGRESSIVE ):
iOffSet = IMP_ATTITUDE_AGGRESSIVE;
break;
case( ATT_ARROGANT ):
iOffSet = IMP_ATTITUDE_ARROGANT;
break;
case( ATT_ASSHOLE ):
iOffSet = IMP_ATTITUDE_ASSHOLE;
break;
case( ATT_COWARD ):
iOffSet = IMP_ATTITUDE_COWARD;
break;
// personality itself
switch( gMercProfiles[ iCurrentIMPSlot ].bAttitude )
{
// normal as can be
case( ATT_NORMAL ):
iOffSet = IMP_ATTITUDE_NORMAL;
break;
case( ATT_FRIENDLY ):
iOffSet = IMP_ATTITUDE_FRIENDLY;
break;
case( ATT_LONER ):
iOffSet = IMP_ATTITUDE_LONER;
break;
case( ATT_OPTIMIST ):
iOffSet = IMP_ATTITUDE_OPTIMIST;
break;
case( ATT_PESSIMIST ):
iOffSet = IMP_ATTITUDE_PESSIMIST;
break;
case( ATT_AGGRESSIVE ):
iOffSet = IMP_ATTITUDE_AGGRESSIVE;
break;
case( ATT_ARROGANT ):
iOffSet = IMP_ATTITUDE_ARROGANT;
break;
case( ATT_ASSHOLE ):
iOffSet = IMP_ATTITUDE_ASSHOLE;
break;
case( ATT_COWARD ):
iOffSet = IMP_ATTITUDE_COWARD;
break;
}
// attitude title
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( iOffSet ), MAIL_STRING_SIZE );
}
// WANNE: New trait system: Character traits
else
{
// WANNE: Try to map "new character traits" to matching old attitudes, so we have meaningful text in IMP mail
switch( gMercProfiles[ iCurrentIMPSlot ].bCharacterTrait )
{
case (CHAR_TRAIT_NORMAL):
wcscpy(pString, gzIMPCharacterTraitText[CHAR_TRAIT_NORMAL]);
iOffSet = IMP_ATTITUDE_NORMAL;
break;
case (CHAR_TRAIT_SOCIABLE):
wcscpy(pString, gzIMPCharacterTraitText[CHAR_TRAIT_SOCIABLE]);
iOffSet = IMP_ATTITUDE_FRIENDLY;
break;
case (CHAR_TRAIT_LONER):
wcscpy(pString, gzIMPCharacterTraitText[CHAR_TRAIT_LONER]);
iOffSet = IMP_ATTITUDE_LONER;
break;
case (CHAR_TRAIT_OPTIMIST):
wcscpy(pString, gzIMPCharacterTraitText[CHAR_TRAIT_OPTIMIST]);
iOffSet = IMP_ATTITUDE_OPTIMIST;
break;
case (CHAR_TRAIT_ASSERTIVE):
wcscpy(pString, gzIMPCharacterTraitText[CHAR_TRAIT_ASSERTIVE]);
iOffSet = IMP_ATTITUDE_OPTIMIST;
break;
case (CHAR_TRAIT_INTELLECTUAL):
wcscpy(pString, gzIMPCharacterTraitText[CHAR_TRAIT_INTELLECTUAL]);
iOffSet = IMP_ATTITUDE_FRIENDLY;
break;
case (CHAR_TRAIT_PRIMITIVE):
wcscpy(pString, gzIMPCharacterTraitText[CHAR_TRAIT_PRIMITIVE]);
iOffSet = IMP_ATTITUDE_ARROGANT;
break;
case (CHAR_TRAIT_AGGRESSIVE):
wcscpy(pString, gzIMPCharacterTraitText[CHAR_TRAIT_AGGRESSIVE]);
iOffSet = IMP_ATTITUDE_AGGRESSIVE;
break;
case (CHAR_TRAIT_PHLEGMATIC):
wcscpy(pString, gzIMPCharacterTraitText[CHAR_TRAIT_PHLEGMATIC]);
iOffSet = IMP_ATTITUDE_PESSIMIST;
break;
case (CHAR_TRAIT_DAUNTLESS):
wcscpy(pString, gzIMPCharacterTraitText[CHAR_TRAIT_DAUNTLESS]);
iOffSet = IMP_ATTITUDE_AGGRESSIVE;
break;
case (CHAR_TRAIT_PACIFIST):
wcscpy(pString, gzIMPCharacterTraitText[CHAR_TRAIT_PACIFIST]);
iOffSet = IMP_ATTITUDE_COWARD;
break;
case (CHAR_TRAIT_MALICIOUS):
wcscpy(pString, gzIMPCharacterTraitText[CHAR_TRAIT_MALICIOUS]);
iOffSet = IMP_ATTITUDE_ASSHOLE;
break;
case (CHAR_TRAIT_SHOWOFF):
wcscpy(pString, gzIMPCharacterTraitText[CHAR_TRAIT_SHOWOFF]);
iOffSet = IMP_ATTITUDE_ARROGANT;
break;
}
// attitude title
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( iOffSet ), MAIL_STRING_SIZE );
wcscat(pString, L". ±");
}
// add to list
AddEmailRecordToList( pString );
@@ -3889,13 +3976,16 @@ void HandleIMPCharProfileResultsMessage( void)
// Ranger
if ( ProfileHasSkillTrait( iCurrentIMPSlot, RANGER_NT ) > 0 )
{
/*
if ( gGameExternalOptions.fShowCamouflageFaces == TRUE )
{
gCamoFace[iCurrentIMPSlot].gCamoface = TRUE;
gCamoFace[iCurrentIMPSlot].gUrbanCamoface = FALSE;
gCamoFace[iCurrentIMPSlot].gDesertCamoface = FALSE;
gCamoFace[iCurrentIMPSlot].gSnowCamoface = FALSE;
}
}
*/
wcscpy(pString, MissingIMPSkillsDescriptions[2]);
AddEmailRecordToList( pString );
}
@@ -4964,34 +5054,39 @@ void PreProcessEmail( EmailPtr pMail )
{
wcscpy( pString, New113AIMMercMailTexts[1] );
}
else if (iNew113MERCMerc == 171)
else if (iNew113AIMMerc == 171)
{
wcscpy( pString, New113AIMMercMailTexts[3] );
}
else if (iNew113MERCMerc == 172)
else if (iNew113AIMMerc == 172)
{
wcscpy( pString, New113AIMMercMailTexts[5] );
}
else if (iNew113MERCMerc == 173)
else if (iNew113AIMMerc == 173)
{
wcscpy( pString, New113AIMMercMailTexts[7] );
}
else if (iNew113MERCMerc == 174)
else if (iNew113AIMMerc == 174)
{
wcscpy( pString, New113AIMMercMailTexts[9] );
}
else if (iNew113MERCMerc == 175)
else if (iNew113AIMMerc == 175)
{
wcscpy( pString, New113AIMMercMailTexts[11] );
}
else if (iNew113MERCMerc == 176)
else if (iNew113AIMMerc == 176)
{
wcscpy( pString, New113AIMMercMailTexts[13] );
}
else if (iNew113MERCMerc == 177)
else if (iNew113AIMMerc == 177)
{
wcscpy( pString, New113AIMMercMailTexts[15] );
}
// Additional Generic Merc mail message
else
{
wcscpy( pString, New113AIMMercMailTexts[17] );
}
}
}
@@ -5440,60 +5535,60 @@ void AddAllEmails()
UINT32 uiCnt;
UINT32 uiOffset;
AddEmail(IMP_EMAIL_INTRO,IMP_EMAIL_INTRO_LENGTH,CHAR_PROFILE_SITE, GetWorldTotalMin(), -1 );
AddEmail(ENRICO_CONGRATS,ENRICO_CONGRATS_LENGTH,MAIL_ENRICO, GetWorldTotalMin(), -1 );
AddEmail(IMP_EMAIL_AGAIN,IMP_EMAIL_AGAIN_LENGTH,1, GetWorldTotalMin( ), -1 );
AddEmail(MERC_INTRO, MERC_INTRO_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin( ), -1 );
AddEmail( MERC_NEW_SITE_ADDRESS, MERC_NEW_SITE_ADDRESS_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1 );
AddEmail(IMP_EMAIL_INTRO,IMP_EMAIL_INTRO_LENGTH,CHAR_PROFILE_SITE, GetWorldTotalMin(), -1, -1 );
AddEmail(ENRICO_CONGRATS,ENRICO_CONGRATS_LENGTH,MAIL_ENRICO, GetWorldTotalMin(), -1, -1 );
AddEmail(IMP_EMAIL_AGAIN,IMP_EMAIL_AGAIN_LENGTH,1, GetWorldTotalMin( ), -1, -1 );
AddEmail(MERC_INTRO, MERC_INTRO_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin( ), -1, -1 );
AddEmail( MERC_NEW_SITE_ADDRESS, MERC_NEW_SITE_ADDRESS_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1, -1 );
AddEmail(IMP_EMAIL_PROFILE_RESULTS, IMP_EMAIL_PROFILE_RESULTS_LENGTH, IMP_PROFILE_RESULTS, GetWorldTotalMin( ), -1 );
AddEmail(IMP_EMAIL_PROFILE_RESULTS, IMP_EMAIL_PROFILE_RESULTS_LENGTH, IMP_PROFILE_RESULTS, GetWorldTotalMin( ), -1, -1 );
AddEmail( MERC_WARNING, MERC_WARNING_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1);
AddEmail( MERC_INVALID, MERC_INVALID_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1);
AddEmail( NEW_MERCS_AT_MERC, NEW_MERCS_AT_MERC_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1);
AddEmail( MERC_FIRST_WARNING, MERC_FIRST_WARNING_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1);
AddEmail( MERC_WARNING, MERC_WARNING_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1, -1);
AddEmail( MERC_INVALID, MERC_INVALID_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1, -1);
AddEmail( NEW_MERCS_AT_MERC, NEW_MERCS_AT_MERC_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1, -1);
AddEmail( MERC_FIRST_WARNING, MERC_FIRST_WARNING_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1, -1);
uiOffset = MERC_UP_LEVEL_BIFF;
for( uiCnt=0; uiCnt<10; uiCnt++)
{
AddEmail( uiOffset, MERC_UP_LEVEL_LENGTH_BIFF, SPECK_FROM_MERC, GetWorldTotalMin(), -1 );
AddEmail( uiOffset, MERC_UP_LEVEL_LENGTH_BIFF, SPECK_FROM_MERC, GetWorldTotalMin(), -1, -1 );
uiOffset += MERC_UP_LEVEL_LENGTH_BIFF;
}
// AddEmail( ( UINT8 )( AIM_REPLY_BARRY + ( AIM_REPLY_LENGTH_BARRY ) ), AIM_REPLY_LENGTH_BARRY, AIM_REPLY_BARRY, GetWorldTotalMin() );
// AddEmail( ( UINT8 )( AIM_REPLY_BARRY + ( AIM_REPLY_LENGTH_BARRY ) ), AIM_REPLY_LENGTH_BARRY, AIM_REPLY_BARRY, GetWorldTotalMin(), -1, -1 );
uiOffset = AIM_REPLY_BARRY;
for( uiCnt=0; uiCnt<40; uiCnt++)
{
AddEmail( ( UINT8 )( uiOffset + ( uiCnt * AIM_REPLY_LENGTH_BARRY ) ), AIM_REPLY_LENGTH_BARRY, ( UINT8 )( 6 + uiCnt ), GetWorldTotalMin(), -1 );
AddEmail( ( UINT8 )( uiOffset + ( uiCnt * AIM_REPLY_LENGTH_BARRY ) ), AIM_REPLY_LENGTH_BARRY, ( UINT8 )( 6 + uiCnt ), GetWorldTotalMin(), -1, -1 );
}
AddEmail(OLD_ENRICO_1,OLD_ENRICO_1_LENGTH,MAIL_ENRICO, GetWorldTotalMin(), -1 );
AddEmail(OLD_ENRICO_2,OLD_ENRICO_2_LENGTH,MAIL_ENRICO, GetWorldTotalMin(), -1 );
AddEmail(OLD_ENRICO_3,OLD_ENRICO_3_LENGTH,MAIL_ENRICO, GetWorldTotalMin(), -1 );
AddEmail(RIS_REPORT,RIS_REPORT_LENGTH,RIS_EMAIL, GetWorldTotalMin(), -1 );
AddEmail(OLD_ENRICO_1,OLD_ENRICO_1_LENGTH,MAIL_ENRICO, GetWorldTotalMin(), -1, -1 );
AddEmail(OLD_ENRICO_2,OLD_ENRICO_2_LENGTH,MAIL_ENRICO, GetWorldTotalMin(), -1, -1 );
AddEmail(OLD_ENRICO_3,OLD_ENRICO_3_LENGTH,MAIL_ENRICO, GetWorldTotalMin(), -1, -1 );
AddEmail(RIS_REPORT,RIS_REPORT_LENGTH,RIS_EMAIL, GetWorldTotalMin(), -1, -1 );
AddEmail( ENRICO_MIGUEL, ENRICO_MIGUEL_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1 );
AddEmail(ENRICO_PROG_20, ENRICO_PROG_20_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1);
AddEmail(ENRICO_PROG_55, ENRICO_PROG_55_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1);
AddEmail(ENRICO_PROG_80, ENRICO_PROG_80_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1);
AddEmail(ENRICO_SETBACK, ENRICO_SETBACK_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1);
AddEmail(ENRICO_SETBACK_2, ENRICO_SETBACK_2_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1);
AddEmail(LACK_PLAYER_PROGRESS_1, LACK_PLAYER_PROGRESS_1_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1);
AddEmail(LACK_PLAYER_PROGRESS_2, LACK_PLAYER_PROGRESS_2_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1);
AddEmail(LACK_PLAYER_PROGRESS_3, LACK_PLAYER_PROGRESS_3_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1);
AddEmail(ENRICO_CREATURES, ENRICO_CREATURES_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1);
AddEmail( ENRICO_MIGUEL, ENRICO_MIGUEL_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1 );
AddEmail(ENRICO_PROG_20, ENRICO_PROG_20_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1);
AddEmail(ENRICO_PROG_55, ENRICO_PROG_55_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1);
AddEmail(ENRICO_PROG_80, ENRICO_PROG_80_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1);
AddEmail(ENRICO_SETBACK, ENRICO_SETBACK_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1);
AddEmail(ENRICO_SETBACK_2, ENRICO_SETBACK_2_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1);
AddEmail(LACK_PLAYER_PROGRESS_1, LACK_PLAYER_PROGRESS_1_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1);
AddEmail(LACK_PLAYER_PROGRESS_2, LACK_PLAYER_PROGRESS_2_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1);
AddEmail(LACK_PLAYER_PROGRESS_3, LACK_PLAYER_PROGRESS_3_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1);
AddEmail(ENRICO_CREATURES, ENRICO_CREATURES_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1);
//Add an email telling the user that he received an insurance payment
AddEmailWithSpecialData( INSUR_PAYMENT, INSUR_PAYMENT_LENGTH, INSURANCE_COMPANY, GetWorldTotalMin(), 20, 0 );
AddEmailWithSpecialData( INSUR_SUSPIC, INSUR_SUSPIC_LENGTH, INSURANCE_COMPANY, GetWorldTotalMin(), 20, 0 );
AddEmailWithSpecialData( INSUR_SUSPIC_2, INSUR_SUSPIC_2_LENGTH, INSURANCE_COMPANY, GetWorldTotalMin(), 20, 0 );
AddEmail( BOBBYR_NOW_OPEN, BOBBYR_NOW_OPEN_LENGTH, BOBBY_R, GetWorldTotalMin(), -1);
AddEmail( KING_PIN_LETTER, KING_PIN_LETTER_LENGTH, KING_PIN, GetWorldTotalMin(), -1 );
AddEmail( BOBBYR_SHIPMENT_ARRIVED, BOBBYR_SHIPMENT_ARRIVED_LENGTH, BOBBY_R, GetWorldTotalMin(), -1 );
AddEmail( BOBBYR_NOW_OPEN, BOBBYR_NOW_OPEN_LENGTH, BOBBY_R, GetWorldTotalMin(), -1, -1);
AddEmail( KING_PIN_LETTER, KING_PIN_LETTER_LENGTH, KING_PIN, GetWorldTotalMin(), -1, -1 );
AddEmail( BOBBYR_SHIPMENT_ARRIVED, BOBBYR_SHIPMENT_ARRIVED_LENGTH, BOBBY_R, GetWorldTotalMin(), -1, -1 );
AddEmail( JOHN_KULBA_GIFT_IN_DRASSEN, JOHN_KULBA_GIFT_IN_DRASSEN_LENGTH, JOHN_KULBA, GetWorldTotalMin(), -1 );
AddEmail( JOHN_KULBA_GIFT_IN_DRASSEN, JOHN_KULBA_GIFT_IN_DRASSEN_LENGTH, JOHN_KULBA, GetWorldTotalMin(), -1, -1 );
AddEmailWithSpecialData(MERC_DIED_ON_OTHER_ASSIGNMENT, MERC_DIED_ON_OTHER_ASSIGNMENT_LENGTH, AIM_SITE, GetWorldTotalMin(), 0, 0 );
+10 -4
View File
@@ -182,6 +182,9 @@ struct email
// So we know which analyse email belongs to the imp
INT32 iCurrentIMPPosition;
// WANNE.MAIL: Fix
INT16 iCurrentShipmentDestinationID;
struct email *Next;
struct email *Prev;
};
@@ -211,6 +214,9 @@ typedef struct
INT32 iCurrentIMPPosition;
// WANNE.MAIL: Fix
INT16 iCurrentShipmentDestinationID;
} SavedEmailStruct;
@@ -294,14 +300,14 @@ void RenderEmail();
// message manipulation
void AddEmailMessage(INT32 iMessageOffset, INT32 iMessageLength,STR16 pSubject, INT32 iDate, UINT8 ubSender, BOOLEAN fAlreadyRead, INT32 uiFirstData, UINT32 uiSecondData, INT32 iCurrentIMPPosition );
void AddEmailMessage(INT32 iMessageOffset, INT32 iMessageLength,STR16 pSubject, INT32 iDate, UINT8 ubSender, BOOLEAN fAlreadyRead, INT32 uiFirstData, UINT32 uiSecondData, INT32 iCurrentIMPPosition, INT16 iCurrentShipmentDestinationID );
void RemoveEmailMessage(INT32 iId);
EmailPtr GetEmailMessage(INT32 iId);
void LookForUnread();
void AddEmail(INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender, INT32 iDate, INT32 iCurrentIMPPosition);
void AddEmail(INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender, INT32 iDate, INT32 iCurrentIMPPosition, INT16 iCurrentShipmentDestinationID);
// WANNE: For the new WF merc
void AddEmailWFMercLevelUp(INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender, INT32 iDate, INT32 iCurrentIMPPosition);
// WANNE: For the new WF merc, when they available again
void AddEmailWFMercAvailable(INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender, INT32 iDate, INT32 iCurrentIMPPosition);
void AddPreReadEmail(INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender, INT32 iDate);
BOOLEAN DisplayNewMailBox();
+2 -2
View File
@@ -950,7 +950,7 @@ void DisplayPageNumberAndDateRange( void )
if( !pCurrentHistory )
{
swprintf( sString, L"%s %d / %d",pHistoryHeaders[1], 1, 1 );
swprintf( sString, L"%s %d / %d",pHistoryHeaders[1], 1, 1 );
mprintf( PAGE_NUMBER_X, PAGE_NUMBER_Y, sString );
swprintf( sString, L"%s %d - %d",pHistoryHeaders[2], 1 , 1 );
@@ -997,7 +997,7 @@ void DisplayPageNumberAndDateRange( void )
// get the last page
swprintf( sString, L"%s %d / %d",pHistoryHeaders[1], iCurrentHistoryPage , iLastPage +1 );
swprintf( sString, L"%s %d / %d",pHistoryHeaders[1], iCurrentHistoryPage , iLastPage +1 );
mprintf( PAGE_NUMBER_X, PAGE_NUMBER_Y, sString );
swprintf( sString, L"%s %d - %d",pHistoryHeaders[2], pCurrentHistory->uiDate / ( 24 * 60 ) , uiLastDate/( 24 * 60 ) );
+1 -1
View File
@@ -2655,7 +2655,7 @@ void HaventMadeImpMercEmailCallBack()
if( ( LaptopSaveInfo.fIMPCompletedFlag == FALSE ) && ( LaptopSaveInfo.fSentImpWarningAlready == FALSE ) )
{
LaptopSaveInfo.fSentImpWarningAlready = TRUE;
AddEmail(IMP_EMAIL_AGAIN,IMP_EMAIL_AGAIN_LENGTH,1, GetWorldTotalMin( ), -1 );
AddEmail(IMP_EMAIL_AGAIN,IMP_EMAIL_AGAIN_LENGTH,1, GetWorldTotalMin( ), -1, -1 );
}
}
+35 -199
View File
@@ -806,7 +806,7 @@ void DailyUpdateOfMercSite( UINT16 usDate)
if( LaptopSaveInfo.gubPlayersMercAccountStatus != MERC_ACCOUNT_INVALID )
{
LaptopSaveInfo.gubPlayersMercAccountStatus = MERC_ACCOUNT_INVALID;
AddEmail( MERC_INVALID, MERC_INVALID_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1);
AddEmail( MERC_INVALID, MERC_INVALID_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1, -1);
}
}
else if( iNumDays > MERC_NUM_DAYS_TILL_ACCOUNT_SUSPENDED )
@@ -814,7 +814,7 @@ void DailyUpdateOfMercSite( UINT16 usDate)
if( LaptopSaveInfo.gubPlayersMercAccountStatus != MERC_ACCOUNT_SUSPENDED )
{
LaptopSaveInfo.gubPlayersMercAccountStatus = MERC_ACCOUNT_SUSPENDED;
AddEmail( MERC_WARNING, MERC_WARNING_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1);
AddEmail( MERC_WARNING, MERC_WARNING_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1, -1);
// Have speck complain next time player come to site
LaptopSaveInfo.uiSpeckQuoteFlags |= SPECK_QUOTE__SENT_EMAIL_ABOUT_LACK_OF_PAYMENT;
@@ -825,7 +825,7 @@ void DailyUpdateOfMercSite( UINT16 usDate)
if( LaptopSaveInfo.gubPlayersMercAccountStatus != MERC_ACCOUNT_VALID_FIRST_WARNING )
{
LaptopSaveInfo.gubPlayersMercAccountStatus = MERC_ACCOUNT_VALID_FIRST_WARNING;
AddEmail( MERC_FIRST_WARNING, MERC_FIRST_WARNING_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1);
AddEmail( MERC_FIRST_WARNING, MERC_FIRST_WARNING_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1, -1);
// Have speck complain next time player come to site
LaptopSaveInfo.uiSpeckQuoteFlags |= SPECK_QUOTE__SENT_EMAIL_ABOUT_LACK_OF_PAYMENT;
@@ -2352,7 +2352,7 @@ BOOLEAN ShouldTheMercSiteServerGoDown()
void GetMercSiteBackOnline()
{
//Add an email telling the user the site is back up
AddEmail( MERC_NEW_SITE_ADDRESS, MERC_NEW_SITE_ADDRESS_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1 );
AddEmail( MERC_NEW_SITE_ADDRESS, MERC_NEW_SITE_ADDRESS_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1, -1 );
//Set a flag indicating that the server just went up ( so speck can make a comment when the player next visits the site )
LaptopSaveInfo.fFirstVisitSinceServerWentDown = TRUE;
@@ -2491,108 +2491,31 @@ BOOLEAN AreAnyOfTheNewMercsAvailable()
}
void ShouldAnyNewMercMercBecomeAvailable()
{
BOOLEAN fNewMercAreAvailable = FALSE;
UINT8 i;
BOOLEAN Stop = FALSE;
{
//Kaiden: Added this if test to make sure that the "New Mercs Available"
// e-mail doesn't show up and no unneccessary checks are made when you
// have the ALL_MERCS_AT_MERC set to TRUE in the INI file.
if(!gGameExternalOptions.fAllMercsAvailable)
{
for(i=0; i<NUM_PROFILES; i++)
for(UINT8 i=0; i<NUM_PROFILES; i++)
{
if ( Stop == FALSE )
{
if ( gConditionsForMercAvailability[i].ProfilId != 0 && gConditionsForMercAvailability[i].NewMercsAvailable == FALSE && gConditionsForMercAvailability[i].StartMercsAvailable == FALSE )
{
if( CanMercBeAvailableYet( gConditionsForMercAvailability[i].uiIndex ) )
{
fNewMercAreAvailable = TRUE;
Stop = TRUE;
}
}
{
//Set up an event to add the merc in x days
AddStrategicEvent( EVENT_MERC_SITE_NEW_MERC_AVAILABLE, GetMidnightOfFutureDayInMinutes( 1 ) + 420 + Random( 3 * 60 ), 0 );
}
}
}
}
/* if(!gGameExternalOptions.fAllMercsAvailable)
{
//for bubba
// if( GetMercIDFromMERCArray( LaptopSaveInfo.gubLastMercIndex ) == GUMPY )
{
if( CanMercBeAvailableYet( MERC_ARRIVES_BUBBA ) )
{
fNewMercAreAvailable = TRUE;
}
}
//for Larry
// if( GetMercIDFromMERCArray( LaptopSaveInfo.gubLastMercIndex ) == LARRY_NORMAL ||
// GetMercIDFromMERCArray( LaptopSaveInfo.gubLastMercIndex ) == LARRY_DRUNK )
{
if( CanMercBeAvailableYet( MERC_ARRIVES_LARRY ) )
{
fNewMercAreAvailable = TRUE;
}
}
//for Numb
// if( GetMercIDFromMERCArray( LaptopSaveInfo.gubLastMercIndex ) == NUMB )
{
if( CanMercBeAvailableYet( MERC_ARRIVES_NUMB ) )
{
fNewMercAreAvailable = TRUE;
}
}
if( CanMercBeAvailableYet( MERC_ARRIVES_TEX ) )
{
fNewMercAreAvailable = TRUE;
}
if( CanMercBeAvailableYet( MERC_ARRIVES_BIGGENS ) )
{
fNewMercAreAvailable = TRUE;
}
//for COUGAR
// if( GetMercIDFromMERCArray( LaptopSaveInfo.gubLastMercIndex ) == COUGAR )
{
if( CanMercBeAvailableYet( MERC_ARRIVES_COUGAR ) )
{
fNewMercAreAvailable = TRUE;
}
}
if( CanMercBeAvailableYet( MERC_ARRIVES_GASTON ) )
{
fNewMercAreAvailable = TRUE;
}
if( CanMercBeAvailableYet( MERC_ARRIVES_STOGIE ) )
{
fNewMercAreAvailable = TRUE;
}
*/
//if there is a new merc available
if( fNewMercAreAvailable )
{
//Set up an event to add the merc in x days
AddStrategicEvent( EVENT_MERC_SITE_NEW_MERC_AVAILABLE, GetMidnightOfFutureDayInMinutes( 1 ) + 420 + Random( 3 * 60 ), 0 );
}
// }
}
BOOLEAN CanMercBeAvailableYet( UINT8 ubMercToCheck )
{
//if the merc is already available
if( gConditionsForMercAvailability[ ubMercToCheck ].ubMercArrayID ) //<= LaptopSaveInfo.gubLastMercIndex )
return( FALSE );
// WANNE: If we have a drunken profile, skip
if (gConditionsForMercAvailability[ ubMercToCheck ].Drunk)
return ( FALSE );
//if the merc is already hired
if( !IsMercHireable( GetMercIDFromMERCArray( gConditionsForMercAvailability[ ubMercToCheck ].ubMercArrayID ) ) )
@@ -2610,121 +2533,34 @@ BOOLEAN CanMercBeAvailableYet( UINT8 ubMercToCheck )
void NewMercsAvailableAtMercSiteCallBack( )
{
BOOLEAN fSendEmail=FALSE;
BOOLEAN Stop = FALSE;
UINT8 i;
for(i=0; i<NUM_PROFILES; i++)
{
if ( Stop == FALSE )
{
for(UINT8 i=0; i<NUM_PROFILES; i++)
{
if ( gConditionsForMercAvailability[i].ProfilId != 0 && gConditionsForMercAvailability[i].NewMercsAvailable == FALSE && gConditionsForMercAvailability[i].StartMercsAvailable == FALSE )
{
gConditionsForMercAvailability[i].NewMercsAvailable = TRUE;
if( CanMercBeAvailableYet( gConditionsForMercAvailability[i].uiIndex ) )
{
gConditionsForMercAvailability[i].NewMercsAvailable = TRUE;
if( CanMercBeAvailableYet( gConditionsForMercAvailability[i].uiIndex ) )
{
if ( gConditionsForMercAvailability[ gConditionsForMercAvailability[i].uiIndex ].Drunk == TRUE )
{
LaptopSaveInfo.gubLastMercIndex = gConditionsForMercAvailability[gConditionsForMercAvailability[i].uiAlternateIndex].uiIndex;
}
else
{
LaptopSaveInfo.gubLastMercIndex++;
}
if ( gConditionsForMercAvailability[ gConditionsForMercAvailability[i].uiIndex ].Drunk == TRUE )
{
LaptopSaveInfo.gubLastMercIndex = gConditionsForMercAvailability[gConditionsForMercAvailability[i].uiAlternateIndex].uiIndex;
}
else
{
LaptopSaveInfo.gubLastMercIndex++;
}
// LaptopSaveInfo.gubLastMercIndex++;
gConditionsForMercAvailability[gConditionsForMercAvailability[i].uiIndex].NewMercsAvailable = TRUE;
LaptopSaveInfo.ubLastMercAvailableId = gConditionsForMercAvailability[i].uiIndex;
gConditionsForMercAvailability[i].StartMercsAvailable = TRUE;
fSendEmail = TRUE;
Stop = TRUE;
}
gConditionsForMercAvailability[gConditionsForMercAvailability[i].uiIndex].NewMercsAvailable = TRUE;
LaptopSaveInfo.ubLastMercAvailableId = gConditionsForMercAvailability[i].uiIndex;
gConditionsForMercAvailability[i].StartMercsAvailable = TRUE;
AddEmail( NEW_MERCS_AT_MERC, NEW_MERCS_AT_MERC_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1, -1);
//new mercs are available
LaptopSaveInfo.fNewMercsAvailableAtMercSite = TRUE;
}
}
}
// if( GetMercIDFromMERCArray( LaptopSaveInfo.gubLastMercIndex ) == BUBBA )
/* {
if( CanMercBeAvailableYet( MERC_ARRIVES_BUBBA ) )
{
LaptopSaveInfo.gubLastMercIndex++;
LaptopSaveInfo.ubLastMercAvailableId = MERC_ARRIVES_BUBBA;
fSendEmail = TRUE;
}
}
//for Larry
// if( GetMercIDFromMERCArray( LaptopSaveInfo.gubLastMercIndex ) == LARRY_NORMAL ||
// GetMercIDFromMERCArray( LaptopSaveInfo.gubLastMercIndex ) == LARRY_DRUNK )
{
if( CanMercBeAvailableYet( MERC_ARRIVES_LARRY ) )
{
LaptopSaveInfo.gubLastMercIndex++;
LaptopSaveInfo.ubLastMercAvailableId = MERC_ARRIVES_LARRY;
fSendEmail = TRUE;
}
}
//for Numb
// if( GetMercIDFromMERCArray( LaptopSaveInfo.gubLastMercIndex ) == NUMB )
{
if( CanMercBeAvailableYet( MERC_ARRIVES_NUMB ) )
{
LaptopSaveInfo.gubLastMercIndex = 9;
LaptopSaveInfo.ubLastMercAvailableId = MERC_ARRIVES_NUMB;
fSendEmail = TRUE;
}
}
if( CanMercBeAvailableYet( MERC_ARRIVES_TEX ) )
{
LaptopSaveInfo.gubLastMercIndex++;
LaptopSaveInfo.ubLastMercAvailableId = MERC_ARRIVES_TEX;
fSendEmail = TRUE;
}
if( CanMercBeAvailableYet( MERC_ARRIVES_BIGGENS ) )
{
LaptopSaveInfo.gubLastMercIndex++;
LaptopSaveInfo.ubLastMercAvailableId = MERC_ARRIVES_BIGGENS;
fSendEmail = TRUE;
}
//for COUGAR
// if( GetMercIDFromMERCArray( LaptopSaveInfo.gubLastMercIndex ) == COUGAR )
{
if( CanMercBeAvailableYet( MERC_ARRIVES_COUGAR ) )
{
LaptopSaveInfo.gubLastMercIndex++;
LaptopSaveInfo.ubLastMercAvailableId = MERC_ARRIVES_COUGAR;
fSendEmail = TRUE;
}
}
if( CanMercBeAvailableYet( MERC_ARRIVES_GASTON ) )
{
LaptopSaveInfo.gubLastMercIndex++;
LaptopSaveInfo.ubLastMercAvailableId = MERC_ARRIVES_GASTON;
fSendEmail = TRUE;
}
if( CanMercBeAvailableYet( MERC_ARRIVES_STOGIE ) )
{
LaptopSaveInfo.gubLastMercIndex++;
LaptopSaveInfo.ubLastMercAvailableId = MERC_ARRIVES_STOGIE;
fSendEmail = TRUE;
}
*/
if( fSendEmail )
AddEmail( NEW_MERCS_AT_MERC, NEW_MERCS_AT_MERC_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1);
//new mercs are available
LaptopSaveInfo.fNewMercsAvailableAtMercSite = TRUE;
}
//used for older saves
+19 -5
View File
@@ -1636,8 +1636,17 @@ void DisplayCharStats(INT32 iId, INT32 iSlot)
// Added by SANDRO
case 15:
// Character Trait
mprintf((INT16)(pPersonnelScreenPoints[23].x+(iSlot*TEXT_BOX_WIDTH)),(pPersonnelScreenPoints[23].y + 15),pPersonnelRecordsHelpTexts[43]); //L"Character:"
swprintf(sString, gzIMPCharacterTraitText[gMercProfiles[Menptr[iId].ubProfile].bCharacterTrait]);
// WANNE: With old trait system, display "Attitudes" instead of "Character"
if (gGameOptions.fNewTraitSystem)
mprintf((INT16)(pPersonnelScreenPoints[23].x+(iSlot*TEXT_BOX_WIDTH)),(pPersonnelScreenPoints[23].y + 15),pPersonnelRecordsHelpTexts[43]); //L"Character:"
else
mprintf((INT16)(pPersonnelScreenPoints[23].x+(iSlot*TEXT_BOX_WIDTH)),(pPersonnelScreenPoints[23].y + 15),pPersonnelRecordsHelpTexts[45]); //L"Attitudes:"
if ( gGameOptions.fNewTraitSystem)
swprintf(sString, gzIMPCharacterTraitText[gMercProfiles[Menptr[iId].ubProfile].bCharacterTrait]);
else
swprintf(sString, gzIMPAttitudesText[gMercProfiles[Menptr[iId].ubProfile].bAttitude]);
FindFontRightCoordinates((INT16)(pPersonnelScreenPoints[23].x+(iSlot*TEXT_BOX_WIDTH)),0,TEXT_BOX_WIDTH-20,0,sString, PERS_FONT, &sX, &sY);
mprintf(sX,(pPersonnelScreenPoints[23].y + 15),sString);
@@ -1650,8 +1659,8 @@ void DisplayCharStats(INT32 iId, INT32 iSlot)
{
MSYS_RemoveRegion( &gSkillTraitHelpTextRegion[5] );
}
MSYS_DefineRegion( &gSkillTraitHelpTextRegion[5], ( sX - 3 ), (UINT16)( pPersonnelScreenPoints[23].y + 10),
( sX + StringPixLength(sString,PERS_FONT) + 3 ), (UINT16)( pPersonnelScreenPoints[23].y + 17 ), MSYS_PRIORITY_HIGH,
MSYS_DefineRegion( &gSkillTraitHelpTextRegion[5], ( sX - 3 ), (UINT16)( pPersonnelScreenPoints[23].y + 15), // 10
( sX + StringPixLength(sString,PERS_FONT) + 3 ), (UINT16)( pPersonnelScreenPoints[23].y + 23 ), MSYS_PRIORITY_HIGH, // 17
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, NULL );
//MSYS_DefineRegion( &gSkillTraitHelpTextRegion[3], (UINT16)( pPersonnelScreenPoints[23].x + 147 ), (UINT16)(pPersonnelScreenPoints[23].y + 4),
// (UINT16)( pPersonnelScreenPoints[23].x + 166 ), (UINT16)(pPersonnelScreenPoints[23].y + 15), MSYS_PRIORITY_HIGH,
@@ -1659,7 +1668,10 @@ void DisplayCharStats(INT32 iId, INT32 iSlot)
MSYS_AddRegion( &gSkillTraitHelpTextRegion[5] );
fAddedTraitRegion[5] = TRUE;
// Assign the text
AssignPersonnelCharacterTraitHelpText( gMercProfiles[Menptr[iId].ubProfile].bCharacterTrait );
// Only new traits have help text
if (gGameOptions.fNewTraitSystem)
AssignPersonnelCharacterTraitHelpText( gMercProfiles[Menptr[iId].ubProfile].bCharacterTrait );
break;
@@ -8069,6 +8081,8 @@ void AssignPersonnelCharacterTraitHelpText( UINT8 ubCharacterNumber )
return;
}
// SANDRO - Popup text windows for disability
void AssignPersonnelDisabilityHelpText( UINT8 ubDisabilityNumber )
{
+1 -1
View File
@@ -481,7 +481,7 @@ INT32 DoChatBox( bool bIncludeChatLog, const STR16 zString, UINT32 uiExitScreen,
sButtonX = ((middleBox - btnWidth)/2);
sButtonY = usTextBoxHeight - CHATBOX_BUTTON_HEIGHT - 10;
gChatBox.uiNOButton = CreateIconAndTextButton( gChatBox.iButtonImages, pMessageStrings[ MSG_CANCEL ], FONT12ARIAL,
gChatBox.uiNOButton = CreateIconAndTextButton( gChatBox.iButtonImages, pMessageStrings[ MSG_CANCEL ], FONT10ARIAL,
CHATBOX_FONT_COLOR, ubFontShadowColor,
CHATBOX_FONT_COLOR, ubFontShadowColor,
TEXT_CJUSTIFIED,
+2 -2
View File
@@ -11,8 +11,8 @@ MultiplayerTeams mpTeams = MultiplayerTeams();
// fallback data
const int MultiplayerTeams::random_merc_teams[NUM_RANDOM_MERC_TEAMS][RANDOM_MERC_TEAM_SIZE] = {
{ 16, 10, 19, 25, 4 , 11, 39 }, // Gus , Shadow, Spider , Raven , Vicki , Red , Meltdown
{ 173, 36, 28, 2 , 22, 8 , 32 }, // Henning , Scope, Danny , Lynx , Hitman , Steroid , Malice
{ 12, 175, 20, 23, 48, 34, 17 }, // Reaper , Laura, Cliff , Buzz , Cougar , Nails , Buns
{ 29, 36, 28, 2 , 22, 8 , 32 }, // Magic , Scope, Danny , Lynx , Hitman , Steroid , Malice
{ 12, 5, 20, 23, 48, 34, 17 }, // Reaper , Trevor, Cliff , Buzz , Cougar , Nails , Buns
{ 31, 7, 33, 35, 27, 37, 1 }, // Scully , Ivan , Dr Q , Thor , Len , Wolf , Blood
};
+5
View File
@@ -554,6 +554,11 @@ void HandleMainMenuInput()
if( gfKeyState[ ALT ] )
gfLoadGameUponEntry = TRUE;
// WANNE: Some initializing was missing when directly loading last savegame
// form main menu with ALT + C
giMAXIMUM_NUMBER_OF_PLAYER_SLOTS = CODE_MAXIMUM_NUMBER_OF_PLAYER_SLOTS;
InitDependingGameStyleOptions();
break;
case 'o':
+30 -27
View File
@@ -2293,37 +2293,40 @@ void recieveSETTINGS (RPCParameters *rpcParameters) //recive settings from serve
char tempstring[4];
memset( &kit, 0, sizeof( int )*20 );
for(cnt=0; cnt < 100; cnt++)
if (strcmp(cKitBag, "") != 0)
{
char tempc = cKitBag[cnt];
if( _strnicmp(&tempc, "[",1) == 0)
for(cnt=0; cnt < 100; cnt++)
{
char tempc = cKitBag[cnt];
continue;
}
if( _strnicmp(&tempc, "[",1) == 0)
{
continue;
}
else if( _strnicmp(&tempc, ",",1) == 0)
{
numnum=0;
kit[kitnum]=atoi(tempstring);
memset( &tempstring, 0, sizeof( char )*4 );
kitnum++;
continue;
}
else if( _strnicmp(&tempc, ",",1) == 0)
{
numnum=0;
kit[kitnum]=atoi(tempstring);
memset( &tempstring, 0, sizeof( char )*4 );
kitnum++;
continue;
}
else if( _strnicmp(&tempc, "]",1) == 0)
{
kit[kitnum]=atoi(tempstring);
break;
}
else
{
strncpy(&tempstring[numnum],&tempc,1);
numnum++;
else if( _strnicmp(&tempc, "]",1) == 0)
{
kit[kitnum]=atoi(tempstring);
break;
}
else
{
strncpy(&tempstring[numnum],&tempc,1);
numnum++;
}
}
}
+1 -1
View File
@@ -185,7 +185,7 @@ extern BOOLEAN fClientReceivedAllFiles;
// OJW - 20090507
// Add basic version checking, will only work from now on
// note: this cannot be longer than char[30]
#define MPVERSION "1.13MP-v1.5"
#define MPVERSION "MP v1.7"
// OJW - 2009128 - inline funcs for working with soldiers and teams
// sick of confusing myself :)
+14 -12
View File
@@ -676,26 +676,28 @@ void requestSETTINGS(RPCParameters *rpcParameters )
lan.damageMultiplier = gDamageMultiplier;
lan.sameMercAllowed = gSameMercAllowed;
lan.gsMercArriveSectorX=gsMercArriveSectorX;
lan.gsMercArriveSectorY=gsMercArriveSectorY;
lan.gsMercArriveSectorX = gsMercArriveSectorX;
lan.gsMercArriveSectorY = gsMercArriveSectorY;
lan.enemyEnabled = gEnemyEnabled;
lan.creatureEnabled = gCreatureEnabled;
lan.militiaEnabled = gMilitiaEnabled;
lan.civEnabled = gCivEnabled;
lan.gameType=gGameType;
lan.gameType = gGameType;
lan.disableMorale=gDisableMorale;
lan.reportHiredMerc=gReportHiredMerc;
lan.disableMorale = gDisableMorale;
lan.reportHiredMerc = gReportHiredMerc;
lan.secondsPerTick = gSecondsPerTick;
lan.soubBobbyRay=gGameOptions.ubBobbyRay;
lan.sofGunNut=gGameOptions.fGunNut;
lan.soubGameStyle=gGameOptions.ubGameStyle;
lan.soubDifficultyLevel=gDifficultyLevel;
lan.soubSkillTraits=gSkillTraits;
lan.sofTurnTimeLimit=gGameOptions.fTurnTimeLimit;
lan.sofIronManMode=gGameOptions.fIronManMode;
// WANNE.MP: Check
lan.soubBobbyRay = BR_AWESOME;
lan.sofGunNut = TRUE;
lan.soubGameStyle = STYLE_REALISTIC;
lan.soubDifficultyLevel = gDifficultyLevel;
lan.soubSkillTraits = gSkillTraits;
lan.sofTurnTimeLimit = TRUE;
lan.sofIronManMode = FALSE;
lan.startingCash = gStartingCash;
// Old/Old
Binary file not shown.
+341 -56
View File
@@ -1170,7 +1170,8 @@ BOOLEAN SOLDIERCREATE_STRUCT::Load(HWFILE hFile, int versionToLoad, bool loadChe
BOOLEAN MERCPROFILESTRUCT::Load(HWFILE hFile, bool forceLoadOldVersion, bool forceLoadOldEncryption, bool wasSavedWithEncryption)
{
UINT32 uiNumBytesRead;
INT32 numBytesRead = 0;
INT32 numBytesRead = 0, temp = 0;
UINT8 filler = 0;
this->initialize();
//if we are at the most current version, then fine
@@ -1243,6 +1244,17 @@ BOOLEAN MERCPROFILESTRUCT::Load(HWFILE hFile, bool forceLoadOldVersion, bool for
numBytesRead = ReadFieldByField( hFile, &this->bExplosivesDelta, sizeof(this->bExplosivesDelta), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField( hFile, &this->bStrengthDelta, sizeof(this->bStrengthDelta), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField( hFile, &this->bLeadershipDelta, sizeof(this->bLeadershipDelta), sizeof(INT8), numBytesRead);
if(guiCurrentSaveGameVersion < STOMP12_SAVEGAME_DATATYPE_CHANGE)
{ // No longer included but need to read them anyway
temp = numBytesRead;
temp = ReadFieldByField( hFile, &this->records.usKillsRegulars, sizeof(UINT16), sizeof(UINT16), temp);
temp = ReadFieldByField( hFile, &this->records.usAssistsMercs, sizeof(UINT16), sizeof(UINT16), temp);
temp = ReadFieldByField( hFile, &this->records.usShotsFired, sizeof(UINT16), sizeof(UINT16), temp);
temp = ReadFieldByField( hFile, &this->records.usShotsHit, sizeof(UINT16), sizeof(UINT16), temp);
temp = ReadFieldByField( hFile, &this->records.usBattlesTactical, sizeof(UINT16), sizeof(UINT16), temp);
temp = ReadFieldByField( hFile, &this->records.usTimesWoundedShot, sizeof(UINT16), sizeof(UINT16), temp);
numBytesRead++;
}
numBytesRead = ReadFieldByField( hFile, &this->usTotalDaysServed, sizeof(this->usTotalDaysServed), sizeof(UINT16), numBytesRead);
numBytesRead = ReadFieldByField( hFile, &this->sLeadershipGain, sizeof(this->sLeadershipGain), sizeof(INT16), numBytesRead);
numBytesRead = ReadFieldByField( hFile, &this->sStrengthGain, sizeof(this->sStrengthGain), sizeof(INT16), numBytesRead);
@@ -1257,10 +1269,16 @@ BOOLEAN MERCPROFILESTRUCT::Load(HWFILE hFile, bool forceLoadOldVersion, bool for
numBytesRead = ReadFieldByField( hFile, this->bSkillTraits, sizeof(INT8), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField( hFile, &this->bReputationTolerance, sizeof(this->bReputationTolerance), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField( hFile, &this->bExplosive, sizeof(this->bExplosive), sizeof(INT8), numBytesRead);
if(guiCurrentSaveGameVersion < STOMP12_SAVEGAME_DATATYPE_CHANGE2)
if(guiCurrentSaveGameVersion < STOMP12_SAVEGAME_DATATYPE_CHANGE2 && guiCurrentSaveGameVersion >= STOMP12_SAVEGAME_DATATYPE_CHANGE)
{ //CHRISL: These two variables no longer exist but we should read them into bSKillTraits[1] and [2]
numBytesRead = ReadFieldByField( hFile, &this->bSkillTraits[1], sizeof(INT8), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField( hFile, &this->bSkillTraits[2], sizeof(INT8), sizeof(INT8), numBytesRead);
numBytesRead += 27;
}
else if(guiCurrentSaveGameVersion < STOMP12_SAVEGAME_DATATYPE_CHANGE)
{
numBytesRead = ReadFieldByField( hFile, &this->bSkillTraits[1], sizeof(INT8), sizeof(INT8), numBytesRead);
numBytesRead += 28;
}
numBytesRead = ReadFieldByField( hFile, &this->bLeadership, sizeof(this->bLeadership), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField( hFile, this->bBuddy, sizeof(this->bBuddy), sizeof(INT8), numBytesRead);
@@ -1299,8 +1317,13 @@ BOOLEAN MERCPROFILESTRUCT::Load(HWFILE hFile, bool forceLoadOldVersion, bool for
numBytesRead = ReadFieldByField( hFile, &this->uiBiWeeklySalary, sizeof(this->uiBiWeeklySalary), sizeof(UINT32), numBytesRead);
numBytesRead = ReadFieldByField( hFile, &this->bMedicalDeposit, sizeof(this->bMedicalDeposit), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField( hFile, &this->bAttitude, sizeof(this->bAttitude), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField( hFile, &this->bCharacterTrait, sizeof(this->bCharacterTrait), sizeof(INT8), numBytesRead);
if(guiCurrentSaveGameVersion >= STOMP12_SAVEGAME_DATATYPE_CHANGE)
numBytesRead = ReadFieldByField( hFile, &this->bCharacterTrait, sizeof(this->bCharacterTrait), sizeof(INT8), numBytesRead);
else
numBytesRead++;
numBytesRead = ReadFieldByField( hFile, &this->bBaseMorale, sizeof(this->bBaseMorale), sizeof(INT8), numBytesRead);
if(guiCurrentSaveGameVersion < STOMP12_SAVEGAME_DATATYPE_CHANGE)
ReadFieldByField( hFile, &filler, sizeof(UINT8), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField( hFile, &this->sMedicalDepositAmount, sizeof(this->sMedicalDepositAmount), sizeof(UINT16), numBytesRead);
numBytesRead = ReadFieldByField( hFile, &this->bLearnToLike, sizeof(this->bLearnToLike), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField( hFile, this->ubApproachVal, sizeof(this->ubApproachVal), sizeof(UINT8), numBytesRead);
@@ -1344,6 +1367,13 @@ BOOLEAN MERCPROFILESTRUCT::Load(HWFILE hFile, bool forceLoadOldVersion, bool for
numBytesRead = ReadFieldByField( hFile, &this->sGridNo, sizeof(this->sGridNo), sizeof(INT32), numBytesRead);
numBytesRead = ReadFieldByField( hFile, &this->sPreCombatGridNo, sizeof(this->sPreCombatGridNo), sizeof(INT32), numBytesRead);
//numBytesRead = ReadFieldByField( hFile, &this->endOfPOD, sizeof(this->endOfPOD), sizeof(char), numBytesRead);
while( (numBytesRead % 2) != 0 )
numBytesRead = ReadFieldByField(hFile, &filler, sizeof(filler), sizeof(UINT8), numBytesRead);
if ( numBytesRead != SIZEOF_MERCPROFILESTRUCT_POD )
{
return(FALSE);
}
int size;
if ( !FileRead( hFile, &size, sizeof(int), &uiNumBytesRead ) )
{
@@ -1373,9 +1403,12 @@ BOOLEAN MERCPROFILESTRUCT::Load(HWFILE hFile, bool forceLoadOldVersion, bool for
bInvNumber[x] = number;
}
// SANDRO - read records
if ( !FileRead( hFile, &this->records, sizeof(STRUCT_Records), &uiNumBytesRead ) )
if(guiCurrentSaveGameVersion >= STOMP12_SAVEGAME_DATATYPE_CHANGE)
{
return(FALSE);
if ( !FileRead( hFile, &this->records, sizeof(STRUCT_Records), &uiNumBytesRead ) )
{
return(FALSE);
}
}
if ( this->uiProfileChecksum != this->GetChecksum() )
{
@@ -1533,8 +1566,9 @@ INT32 ReadFieldByField(HWFILE hFile, PTR pDest, UINT32 uiFieldSize, UINT32 uiEle
BOOLEAN SOLDIERTYPE::Load(HWFILE hFile)
{
UINT32 uiNumBytesRead;
INT32 numBytesRead = 0, temp = 0;
INT32 numBytesRead = 0, buffer = 0;
char padding[10];
FLOAT temp;
//if we are at the most current version, then fine
if ( guiCurrentSaveGameVersion >= NIV_SAVEGAME_DATATYPE_CHANGE )
@@ -1575,10 +1609,14 @@ BOOLEAN SOLDIERTYPE::Load(HWFILE hFile)
numBytesRead = ReadFieldByField(hFile, &this->bLastRenderVisibleValue, sizeof(bLastRenderVisibleValue), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->ubAttackingHand, sizeof(ubAttackingHand), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->sWeightCarriedAtTurnStart, sizeof(sWeightCarriedAtTurnStart), sizeof(INT16), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->iHealableInjury, sizeof(iHealableInjury), sizeof(INT32), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->fDoingSurgery, sizeof(fDoingSurgery), sizeof(BOOLEAN), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->lUnregainableBreath, sizeof(lUnregainableBreath), sizeof(signed long), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->ubCriticalStatDamage, sizeof(ubCriticalStatDamage), sizeof(UINT8), numBytesRead);
if(guiCurrentSaveGameVersion >= STOMP12_SAVEGAME_DATATYPE_CHANGE){
numBytesRead = ReadFieldByField(hFile, &this->iHealableInjury, sizeof(iHealableInjury), sizeof(INT32), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->fDoingSurgery, sizeof(fDoingSurgery), sizeof(BOOLEAN), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->lUnregainableBreath, sizeof(lUnregainableBreath), sizeof(signed long), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->ubCriticalStatDamage, sizeof(ubCriticalStatDamage), sizeof(UINT8), numBytesRead);
} else {
buffer += 24;
}
numBytesRead = ReadFieldByField(hFile, &this->ubGroupID, sizeof(ubGroupID), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->ubMovementNoiseHeard, sizeof(ubMovementNoiseHeard), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->dXPos, sizeof(dXPos), sizeof(FLOAT), numBytesRead);
@@ -1588,10 +1626,11 @@ BOOLEAN SOLDIERTYPE::Load(HWFILE hFile)
numBytesRead = ReadFieldByField(hFile, &this->sOldYPos, sizeof(sOldYPos), sizeof(INT16), numBytesRead);
} else {
//CHRISL: These used to be floats but we've reduced them to INT16
numBytesRead = ReadFieldByField(hFile, &this->sOldXPos, sizeof(sOldXPos), sizeof(INT16), numBytesRead);
temp = ReadFieldByField(hFile, &padding, sizeof(INT16), sizeof(INT16), temp);
numBytesRead = ReadFieldByField(hFile, &this->sOldYPos, sizeof(sOldYPos), sizeof(INT16), numBytesRead);
temp = ReadFieldByField(hFile, &padding, sizeof(INT16), sizeof(INT16), temp);
numBytesRead = ReadFieldByField(hFile, &temp, sizeof(FLOAT), sizeof(FLOAT), numBytesRead);
this->sOldXPos = (INT16)temp;
numBytesRead = ReadFieldByField(hFile, &temp, sizeof(FLOAT), sizeof(FLOAT), numBytesRead);
this->sOldYPos = (INT16)temp;
buffer -= 4;
}
numBytesRead = ReadFieldByField(hFile, &this->sInitialGridNo, sizeof(sInitialGridNo), sizeof(INT32), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->sGridNo, sizeof(sGridNo), sizeof(INT32), numBytesRead);
@@ -1634,10 +1673,17 @@ BOOLEAN SOLDIERTYPE::Load(HWFILE hFile)
numBytesRead = ReadFieldByField(hFile, &this->dPrevCounterForceX, sizeof(dPrevCounterForceX), sizeof(FLOAT), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->dPrevCounterForceY, sizeof(dPrevCounterForceY), sizeof(FLOAT), numBytesRead);
} else {
numBytesRead += sizeof(FLOAT);
numBytesRead += sizeof(FLOAT);
numBytesRead += sizeof(FLOAT);
numBytesRead += sizeof(FLOAT);
buffer += sizeof(FLOAT);
buffer += sizeof(FLOAT);
buffer += sizeof(FLOAT);
buffer += sizeof(FLOAT);
}
if(guiCurrentSaveGameVersion >= NCTH_AUTOFIRE_UPDATE){
numBytesRead = ReadFieldByField(hFile, &this->dInitialMuzzleOffsetX, sizeof(dInitialMuzzleOffsetX), sizeof(FLOAT), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->dInitialMuzzleOffsetY, sizeof(dInitialMuzzleOffsetY), sizeof(FLOAT), numBytesRead);
} else {
buffer += sizeof(FLOAT);
buffer += sizeof(FLOAT);
}
numBytesRead = ReadFieldByField(hFile, &this->bTilesMoved, sizeof(bTilesMoved), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->dNextBleed, sizeof(dNextBleed), sizeof(FLOAT), numBytesRead);
@@ -1860,8 +1906,9 @@ BOOLEAN SOLDIERTYPE::Load(HWFILE hFile)
numBytesRead = ReadFieldByField(hFile, &this->snowCamo, sizeof(snowCamo), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->wornSnowCamo, sizeof(wornSnowCamo), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->sFacilityTypeOperated, sizeof(sFacilityTypeOperated), sizeof(INT16), numBytesRead);
// if(numBytesRead != SIZEOF_SOLDIERTYPE_POD)
// return(FALSE);
numBytesRead += buffer;
if(numBytesRead != SIZEOF_SOLDIERTYPE_POD)
return(FALSE);
/* //CHRISL: It was further changed at version 104 to allow for 16bit action points for the 100AP system
//first, load the POD
if ( guiCurrentSaveGameVersion >= AP100_SAVEGAME_DATATYPE_CHANGE )
@@ -2001,29 +2048,57 @@ BOOLEAN SOLDIERTYPE::Load(HWFILE hFile)
{
return(FALSE);
}
//Load STRUCT_AIData
//Load STRUCT_Statistics
numBytesRead = 0;
numBytesRead = ReadFieldByField(hFile, &this->stats.bExpLevel, sizeof(stats.bExpLevel), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->stats.bLife, sizeof(stats.bLife), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->stats.bLifeMax, sizeof(stats.bLifeMax), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->stats.bStrength, sizeof(stats.bStrength), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->stats.bAgility, sizeof(stats.bAgility), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->stats.bDexterity, sizeof(stats.bDexterity), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->stats.bWisdom, sizeof(stats.bWisdom), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->stats.bLeadership, sizeof(stats.bLeadership), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->stats.bMarksmanship, sizeof(stats.bMarksmanship), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->stats.bMechanical, sizeof(stats.bMechanical), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->stats.bExplosive, sizeof(stats.bExplosive), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->stats.bMedical, sizeof(stats.bMedical), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->stats.bScientific, sizeof(stats.bScientific), sizeof(INT8), numBytesRead);
if ( guiCurrentSaveGameVersion >= STOMP12_SAVEGAME_DATATYPE_CHANGE2 )
numBytesRead = ReadFieldByField(hFile, &this->stats.ubSkillTraits, sizeof(stats.ubSkillTraits), sizeof(UINT8), numBytesRead);
buffer = 0;
if ( guiCurrentSaveGameVersion >= STOMP12_SAVEGAME_DATATYPE_CHANGE )
{
numBytesRead = ReadFieldByField(hFile, &this->stats.bExpLevel, sizeof(stats.bExpLevel), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->stats.bLife, sizeof(stats.bLife), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->stats.bLifeMax, sizeof(stats.bLifeMax), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->stats.bStrength, sizeof(stats.bStrength), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->stats.bAgility, sizeof(stats.bAgility), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->stats.bDexterity, sizeof(stats.bDexterity), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->stats.bWisdom, sizeof(stats.bWisdom), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->stats.bLeadership, sizeof(stats.bLeadership), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->stats.bMarksmanship, sizeof(stats.bMarksmanship), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->stats.bMechanical, sizeof(stats.bMechanical), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->stats.bExplosive, sizeof(stats.bExplosive), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->stats.bMedical, sizeof(stats.bMedical), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->stats.bScientific, sizeof(stats.bScientific), sizeof(INT8), numBytesRead);
if ( guiCurrentSaveGameVersion >= STOMP12_SAVEGAME_DATATYPE_CHANGE2 )
numBytesRead = ReadFieldByField(hFile, &this->stats.ubSkillTraits, sizeof(stats.ubSkillTraits), sizeof(UINT8), numBytesRead);
else
{
numBytesRead = ReadFieldByField(hFile, &this->stats.ubSkillTraits[0], sizeof(UINT8), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->stats.ubSkillTraits[1], sizeof(UINT8), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->stats.ubSkillTraits[2], sizeof(UINT8), sizeof(UINT8), numBytesRead);
buffer = 27;
}
}
else
{
// Prior to STOMP12_SAVEGAME_DATATYPE_CHANGE, we stored these variables in a different order
numBytesRead = ReadFieldByField(hFile, &this->stats.bLife, sizeof(stats.bLife), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->stats.bLifeMax, sizeof(stats.bLifeMax), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->stats.bExpLevel, sizeof(stats.bExpLevel), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->stats.bAgility, sizeof(stats.bAgility), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->stats.bStrength, sizeof(stats.bStrength), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->stats.bMechanical, sizeof(stats.bMechanical), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->stats.bMarksmanship, sizeof(stats.bMarksmanship), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->stats.bExplosive, sizeof(stats.bExplosive), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->stats.ubSkillTraits[0], sizeof(UINT8), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->stats.ubSkillTraits[1], sizeof(UINT8), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->stats.ubSkillTraits[2], sizeof(UINT8), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->stats.bDexterity, sizeof(stats.bDexterity), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->stats.bWisdom, sizeof(stats.bWisdom), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->stats.bMedical, sizeof(stats.bMedical), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->stats.bScientific, sizeof(stats.bScientific), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->stats.bLeadership, sizeof(stats.bLeadership), sizeof(INT8), numBytesRead);
buffer = 28;
}
numBytesRead += buffer;
if(numBytesRead != sizeof(STRUCT_Statistics))
return(FALSE);
// if ( !FileRead( hFile, &this->stats, sizeof(STRUCT_Statistics), &uiNumBytesRead ) )
// {
// return(FALSE);
@@ -2893,8 +2968,8 @@ BOOLEAN SaveGame( int ubSaveGameID, STR16 pGameDesc )
SaveGameFilePosition( FileGetPos( hFile ), "Save Game Header" );
#endif
//CHRISL: Added here so we can get game options earlier in the load process
FileWrite( hFile, &gGameOptions, sizeof( GAME_OPTIONS ), &uiNumBytesWritten );
//
//Save the gTactical Status array, plus the curent secotr location
@@ -3203,7 +3278,6 @@ BOOLEAN SaveGame( int ubSaveGameID, STR16 pGameDesc )
if( !SaveGeneralInfo( hFile ) )
{
ScreenMsg( FONT_MCOLOR_WHITE, MSG_ERROR, L"ERROR general info");
@@ -3488,7 +3562,7 @@ BOOLEAN SaveGame( int ubSaveGameID, STR16 pGameDesc )
//if we succesfully saved the game, mark this entry as the last saved game file
if( ubSaveGameID < EARLIST_SPECIAL_SAVE)
if( ubSaveGameID < EARLIST_SPECIAL_SAVE && ubSaveGameID != SAVE__TIMED_AUTOSAVE )
{
gGameSettings.bLastSavedGameSlot = ubSaveGameID;
}
@@ -3706,10 +3780,19 @@ BOOLEAN LoadSavedGame( int ubSavedGameID )
guiCurrentSaveGameVersion = SaveGameHeader.uiSavedGameVersion;
guiBrokenSaveGameVersion = SaveGameHeader.uiSavedGameVersion;
// CHRISL: We need to know what inventory system we're using early on
if(SaveGameHeader.uiSavedGameVersion < NIV_SAVEGAME_DATATYPE_CHANGE)
SaveGameHeader.ubInventorySystem = 0;
gGameOptions.ubInventorySystem = SaveGameHeader.ubInventorySystem;
if(guiCurrentSaveGameVersion >= MOVED_GENERAL_INFO)
{
FileRead(hFile, &gGameOptions, sizeof( GAME_OPTIONS ), &uiNumBytesRead );
}
else
{
// CHRISL: We need to know what inventory system we're using early on
if(SaveGameHeader.uiSavedGameVersion < NIV_SAVEGAME_DATATYPE_CHANGE)
SaveGameHeader.ubInventorySystem = 0;
gGameOptions.ubInventorySystem = SaveGameHeader.ubInventorySystem;
gGameOptions.ubAttachmentSystem = SaveGameHeader.ubAttachmentSystem;
}
if((UsingNewInventorySystem() == true))
{
@@ -3733,8 +3816,6 @@ BOOLEAN LoadSavedGame( int ubSavedGameID )
InitializeSMPanelCoordsOld();
InitializeInvPanelCoordsOld();
}
gGameOptions.ubAttachmentSystem = SaveGameHeader.ubAttachmentSystem;
//if the player is loading up an older version of the game, and the person DOESNT have the cheats on,
if( guiCurrentSaveGameVersion < 65 && !CHEATER_CHEAT_LEVEL( ) )
@@ -4281,7 +4362,6 @@ BOOLEAN LoadSavedGame( int ubSavedGameID )
#endif
uiRelEndPerc += 0;
SetRelativeStartAndEndPercentage( 0, uiRelStartPerc, uiRelEndPerc, L"Misc info..." );
RenderProgressBar( 0, 100 );
@@ -4303,7 +4383,6 @@ BOOLEAN LoadSavedGame( int ubSavedGameID )
uiRelStartPerc = uiRelEndPerc;
if( !LoadMineStatusFromSavedGameFile( hFile ) )
{
DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String("LoadMineStatusFromSavedGameFile failed" ) );
@@ -4889,6 +4968,45 @@ BOOLEAN LoadSavedGame( int ubSavedGameID )
//
FileClose( hFile );
//CHRISL: To correct a problem with the MERC email, at this point we want to see if the email has been sent and force it if necessary
if(gGameExternalOptions.fAllMercsAvailable == TRUE && GetWorldDay() >= 3 )
{
bool fBookMark = false;
bool fEmail = false;
for(UINT32 cnt = 0; cnt < MAX_BOOKMARKS; cnt++){
if(LaptopSaveInfo.iBookMarkList[cnt] == 3){
fBookMark = true;
break;
}
}
EmailPtr pEmail=pEmailList;
if(pEmail)
{
while(pEmail)
{
if(pEmail->ubSender == 4)
{
fEmail = true;
break;
}
pEmail=pEmail->Next;
}
}
if(!fBookMark && !fEmail)
AddEmail(MERC_INTRO, MERC_INTRO_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin( ), -1, -1 );
}
// CHRISL: To set camo faces correctly from the start
for( UINT16 cnt=0; cnt< CODE_MAXIMUM_NUMBER_OF_PLAYER_MERCS; cnt++)
{
if(MercPtrs[cnt]->ubID == cnt)
{
SetCamoFace( MercPtrs[cnt] );
DeleteSoldierFace( MercPtrs[cnt] );// remove face
MercPtrs[cnt]->iFaceIndex = InitSoldierFace( MercPtrs[cnt] );// create new face
}
}
// ATE: Patch? Patch up groups.....( will only do for old saves.. )
UpdatePersistantGroupsFromOldSave( guiCurrentSaveGameVersion );
@@ -5175,6 +5293,20 @@ BOOLEAN LoadSavedGame( int ubSavedGameID )
//now change the savegame format so that temp files are saved and loaded correctly
guiCurrentSaveGameVersion = SAVE_GAME_VERSION;
// WANNE: This should fix the bug if any merc are still under PC control. This could happen after boxing in SAN MONA.
SOLDIERTYPE *pTeamSoldier;
for (INT8 bLoop=gTacticalStatus.Team[gbPlayerNum].bFirstID; bLoop <= gTacticalStatus.Team[gbPlayerNum].bLastID; bLoop++)
{
pTeamSoldier=MercPtrs[bLoop];
if (pTeamSoldier->flags.uiStatusFlags & SOLDIER_PCUNDERAICONTROL)
pTeamSoldier->flags.uiStatusFlags &= (~SOLDIER_PCUNDERAICONTROL);
if (pTeamSoldier->flags.uiStatusFlags & SOLDIER_BOXER)
pTeamSoldier->flags.uiStatusFlags &= (~SOLDIER_BOXER);
}
return( TRUE );
}
@@ -5207,6 +5339,9 @@ BOOLEAN LoadSavedMercProfiles( HWFILE hFile )
//Loop through all the profiles to Load
for( cnt=0; cnt< NUM_PROFILES; cnt++)
{
// At some point after STOMP12_SAVEGAME_DATATYPE_CHANGE, NUM_PROFILES was changed from NUM_PROFILES_v111
if(guiCurrentSaveGameVersion < STOMP12_SAVEGAME_DATATYPE_CHANGE && cnt >= NUM_PROFILES_v111)
break;
// Changed by ADB, rev 1513
//if ( !gMercProfiles[cnt].Load(hFile, false) )
if ( !gMercProfiles[cnt].Load(hFile, false, false, true) )
@@ -5772,6 +5907,7 @@ BOOLEAN LoadFilesFromSavedGame( STR pSrcFileName, HWFILE hFile )
#ifdef JA2BETAVERSION
WriteTempFileNameToFile( pSrcFileName, uiFileSize, hFile );
#endif
return( TRUE );
}
@@ -5842,6 +5978,9 @@ BOOLEAN SaveEmailToSavedGame( HWFILE hFile )
SavedEmail.uiSixData = pEmail->uiSixData;
SavedEmail.iCurrentIMPPosition = pEmail->iCurrentIMPPosition;
// WANNE.MAIL: Fix
SavedEmail.iCurrentShipmentDestinationID = pEmail->iCurrentShipmentDestinationID;
// write the email header to the saved game file
FileWrite( hFile, &SavedEmail, sizeof( SavedEmailStruct ), &uiNumBytesWritten );
if( uiNumBytesWritten != sizeof( SavedEmailStruct ) )
@@ -5910,9 +6049,34 @@ BOOLEAN LoadEmailFromSavedGame( HWFILE hFile )
return(FALSE);
}
//get the rest of the data from the email
FileRead( hFile, &SavedEmail, sizeof( SavedEmailStruct ), &uiNumBytesRead );
if( uiNumBytesRead != sizeof( SavedEmailStruct ) )
//CHRISL: Adjust this so we can change the SavedEmailStruct without hurting savegame compatability
//get the rest of the data from the email
INT32 numBytesRead = 0, temp;
numBytesRead = ReadFieldByField(hFile, &SavedEmail.usOffset, sizeof(SavedEmail.usOffset), sizeof(UINT16), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &SavedEmail.usLength, sizeof(SavedEmail.usLength), sizeof(UINT16), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &SavedEmail.ubSender, sizeof(SavedEmail.ubSender), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &SavedEmail.iDate, sizeof(SavedEmail.iDate), sizeof(UINT32), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &SavedEmail.iId, sizeof(SavedEmail.iId), sizeof(INT32), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &SavedEmail.iFirstData, sizeof(SavedEmail.iFirstData), sizeof(INT32), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &SavedEmail.uiSecondData, sizeof(SavedEmail.uiSecondData), sizeof(UINT32), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &SavedEmail.iThirdData, sizeof(SavedEmail.iThirdData), sizeof(INT32), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &SavedEmail.iFourthData, sizeof(SavedEmail.iFourthData), sizeof(INT32), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &SavedEmail.uiFifthData, sizeof(SavedEmail.uiFifthData), sizeof(UINT32), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &SavedEmail.uiSixData, sizeof(SavedEmail.uiSixData), sizeof(UINT32), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &SavedEmail.fRead, sizeof(SavedEmail.fRead), sizeof(BOOLEAN), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &SavedEmail.fNew, sizeof(SavedEmail.fNew), sizeof(BOOLEAN), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &SavedEmail.iCurrentIMPPosition, sizeof(SavedEmail.iCurrentIMPPosition), sizeof(INT32), numBytesRead);
if(guiCurrentSaveGameVersion >= BR_EMAIL_DATA_CHANGE){
numBytesRead = ReadFieldByField(hFile, &SavedEmail.iCurrentShipmentDestinationID, sizeof(SavedEmail.iCurrentShipmentDestinationID), sizeof(INT16), numBytesRead);
//We need these extra 2 bytes so that the structure's total size is evenly divisible by 4
numBytesRead = ReadFieldByField(hFile, &temp, sizeof(INT16), sizeof(INT16), numBytesRead);
} else {
numBytesRead += sizeof(INT16);
numBytesRead += sizeof(INT16);
}
//FileRead( hFile, &SavedEmail, sizeof( SavedEmailStruct ), &uiNumBytesRead );
//if( uiNumBytesRead != sizeof( SavedEmailStruct ) )
if(numBytesRead != sizeof( SavedEmailStruct ))
{
return(FALSE);
}
@@ -5943,6 +6107,9 @@ BOOLEAN LoadEmailFromSavedGame( HWFILE hFile )
pTempEmail->uiSixData = SavedEmail.uiSixData;
pTempEmail->iCurrentIMPPosition = SavedEmail.iCurrentIMPPosition;
// WANNE.MAIL: Fix
pTempEmail->iCurrentShipmentDestinationID = SavedEmail.iCurrentShipmentDestinationID;
//add the current email in
pEmail->Next = pTempEmail;
pTempEmail->Prev = pEmail;
@@ -6025,14 +6192,126 @@ void FailedLoadingGameCallBack( UINT8 bExitValue );
BOOLEAN LoadTacticalStatusFromSavedGame( HWFILE hFile )
{
UINT32 uiNumBytesRead;
INT32 numBytesRead = 0;
UINT8 filler = 0;
// for (unsigned idx=0; idx <= MAXTEAMS; ++idx) {
// savedTeamSettings[idx] = gTacticalStatus.Team[idx];
// }
//Read the gTacticalStatus to the saved game file
FileRead( hFile, &gTacticalStatus, sizeof( TacticalStatusType ), &uiNumBytesRead );
if( uiNumBytesRead != sizeof( TacticalStatusType ) ) {
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.uiFlags, sizeof(gTacticalStatus.uiFlags), sizeof(UINT32), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.Team, sizeof(gTacticalStatus.Team), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubCurrentTeam, sizeof(gTacticalStatus.ubCurrentTeam), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.sSlideTarget, sizeof(gTacticalStatus.sSlideTarget), sizeof(INT32), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.sSlideReason, sizeof(gTacticalStatus.sSlideReason), sizeof(INT16), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.uiTimeSinceMercAIStart, sizeof(gTacticalStatus.uiTimeSinceMercAIStart), sizeof(UINT32), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fPanicFlags, sizeof(gTacticalStatus.fPanicFlags), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.sPanicTriggerGridNoUnused, sizeof(gTacticalStatus.sPanicTriggerGridNoUnused), sizeof(INT32), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.sHandGrid, sizeof(gTacticalStatus.sHandGrid), sizeof(INT16), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubSpottersCalledForBy, sizeof(gTacticalStatus.ubSpottersCalledForBy), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubTheChosenOne, sizeof(gTacticalStatus.ubTheChosenOne), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.uiTimeOfLastInput, sizeof(gTacticalStatus.uiTimeOfLastInput), sizeof(UINT32), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.uiTimeSinceDemoOn, sizeof(gTacticalStatus.uiTimeSinceDemoOn), sizeof(UINT32), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.uiCountdownToRestart, sizeof(gTacticalStatus.uiCountdownToRestart), sizeof(UINT32), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fGoingToEnterDemo, sizeof(gTacticalStatus.fGoingToEnterDemo), sizeof(BOOLEAN), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fNOTDOLASTDEMO, sizeof(gTacticalStatus.fNOTDOLASTDEMO), sizeof(BOOLEAN), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fMultiplayer, sizeof(gTacticalStatus.fMultiplayer), sizeof(BOOLEAN), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fCivGroupHostile, sizeof(gTacticalStatus.fCivGroupHostile), sizeof(BOOLEAN), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubLastBattleSectorX, sizeof(gTacticalStatus.ubLastBattleSectorX), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubLastBattleSectorY, sizeof(gTacticalStatus.ubLastBattleSectorY), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fLastBattleWon, sizeof(gTacticalStatus.fLastBattleWon), sizeof(BOOLEAN), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.bOriginalSizeOfEnemyForce, sizeof(gTacticalStatus.bOriginalSizeOfEnemyForce), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.bPanicTriggerIsAlarmUnused, sizeof(gTacticalStatus.bPanicTriggerIsAlarmUnused), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fVirginSector, sizeof(gTacticalStatus.fVirginSector), sizeof(BOOLEAN), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fEnemyInSector, sizeof(gTacticalStatus.fEnemyInSector), sizeof(BOOLEAN), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fInterruptOccurred, sizeof(gTacticalStatus.fInterruptOccurred), sizeof(BOOLEAN), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.bRealtimeSpeed, sizeof(gTacticalStatus.bRealtimeSpeed), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubEnemyIntention, sizeof(gTacticalStatus.ubEnemyIntention), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubEnemyIntendedRetreatDirection, sizeof(gTacticalStatus.ubEnemyIntendedRetreatDirection), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubEnemySightingOnTheirTurnEnemyID, sizeof(gTacticalStatus.ubEnemySightingOnTheirTurnEnemyID), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubEnemySightingOnTheirTurnPlayerID, sizeof(gTacticalStatus.ubEnemySightingOnTheirTurnPlayerID), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fEnemySightingOnTheirTurn, sizeof(gTacticalStatus.fEnemySightingOnTheirTurn), sizeof(BOOLEAN), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fAutoBandageMode, sizeof(gTacticalStatus.fAutoBandageMode), sizeof(BOOLEAN), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubAttackBusyCount, sizeof(gTacticalStatus.ubAttackBusyCount), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.bNumEnemiesFoughtInBattleUnused, sizeof(gTacticalStatus.bNumEnemiesFoughtInBattleUnused), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubEngagedInConvFromActionMercID, sizeof(gTacticalStatus.ubEngagedInConvFromActionMercID), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.usTactialTurnLimitCounter, sizeof(gTacticalStatus.usTactialTurnLimitCounter), sizeof(UINT16), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fInTopMessage, sizeof(gTacticalStatus.fInTopMessage), sizeof(BOOLEAN), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubTopMessageType, sizeof(gTacticalStatus.ubTopMessageType), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.zTopMessageString, sizeof(gTacticalStatus.zTopMessageString), sizeof(CHAR16), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.usTactialTurnLimitMax, sizeof(gTacticalStatus.usTactialTurnLimitMax), sizeof(UINT16), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.uiTactialTurnLimitClock, sizeof(gTacticalStatus.uiTactialTurnLimitClock), sizeof(UINT32), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fTactialTurnLimitStartedBeep, sizeof(gTacticalStatus.fTactialTurnLimitStartedBeep), sizeof(BOOLEAN), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.bBoxingState, sizeof(gTacticalStatus.bBoxingState), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.bConsNumTurnsNotSeen, sizeof(gTacticalStatus.bConsNumTurnsNotSeen), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubArmyGuysKilled, sizeof(gTacticalStatus.ubArmyGuysKilled), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.sPanicTriggerGridNo, sizeof(gTacticalStatus.sPanicTriggerGridNo), sizeof(INT32), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.bPanicTriggerIsAlarm, sizeof(gTacticalStatus.bPanicTriggerIsAlarm), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubPanicTolerance, sizeof(gTacticalStatus.ubPanicTolerance), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fAtLeastOneGuyOnMultiSelect, sizeof(gTacticalStatus.fAtLeastOneGuyOnMultiSelect), sizeof(BOOLEAN), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fSaidCreatureFlavourQuote, sizeof(gTacticalStatus.fSaidCreatureFlavourQuote), sizeof(BOOLEAN), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fHaveSeenCreature, sizeof(gTacticalStatus.fHaveSeenCreature), sizeof(BOOLEAN), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fKilledEnemyOnAttack, sizeof(gTacticalStatus.fKilledEnemyOnAttack), sizeof(BOOLEAN), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubEnemyKilledOnAttack, sizeof(gTacticalStatus.ubEnemyKilledOnAttack), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.bEnemyKilledOnAttackLevel, sizeof(gTacticalStatus.bEnemyKilledOnAttackLevel), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubEnemyKilledOnAttackLocation, sizeof(gTacticalStatus.ubEnemyKilledOnAttackLocation), sizeof(UINT16), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fItemsSeenOnAttack, sizeof(gTacticalStatus.fItemsSeenOnAttack), sizeof(BOOLEAN), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubItemsSeenOnAttackSoldier, sizeof(gTacticalStatus.ubItemsSeenOnAttackSoldier), sizeof(BOOLEAN), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fBeenInCombatOnce, sizeof(gTacticalStatus.fBeenInCombatOnce), sizeof(BOOLEAN), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fSaidCreatureSmellQuote, sizeof(gTacticalStatus.fSaidCreatureSmellQuote), sizeof(BOOLEAN), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.usItemsSeenOnAttackGridNo, sizeof(gTacticalStatus.usItemsSeenOnAttackGridNo), sizeof(UINT32), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fLockItemLocators, sizeof(gTacticalStatus.fLockItemLocators), sizeof(BOOLEAN), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubLastQuoteSaid, sizeof(gTacticalStatus.ubLastQuoteSaid), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubLastQuoteProfileNUm, sizeof(gTacticalStatus.ubLastQuoteProfileNUm), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fCantGetThrough, sizeof(gTacticalStatus.fCantGetThrough), sizeof(BOOLEAN), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.sCantGetThroughGridNo, sizeof(gTacticalStatus.sCantGetThroughGridNo), sizeof(INT32), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.sCantGetThroughSoldierGridNo, sizeof(gTacticalStatus.sCantGetThroughSoldierGridNo), sizeof(INT32), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubCantGetThroughID, sizeof(gTacticalStatus.ubCantGetThroughID), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fDidGameJustStart, sizeof(gTacticalStatus.fDidGameJustStart), sizeof(BOOLEAN), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fStatChangeCheatOn, sizeof(gTacticalStatus.fStatChangeCheatOn), sizeof(BOOLEAN), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubLastRequesterTargetID, sizeof(gTacticalStatus.ubLastRequesterTargetID), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fGoodToAllowCrows, sizeof(gTacticalStatus.fGoodToAllowCrows), sizeof(BOOLEAN), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubNumCrowsPossible, sizeof(gTacticalStatus.ubNumCrowsPossible), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.uiTimeCounterForGiveItemSrc, sizeof(gTacticalStatus.uiTimeCounterForGiveItemSrc), sizeof(UINT32), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fUnLockUIAfterHiddenInterrupt, sizeof(gTacticalStatus.fUnLockUIAfterHiddenInterrupt), sizeof(BOOLEAN), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.bNumFoughtInBattle, sizeof(gTacticalStatus.bNumFoughtInBattle), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.uiDecayBloodLastUpdate, sizeof(gTacticalStatus.uiDecayBloodLastUpdate), sizeof(UINT32), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.uiTimeSinceLastInTactical, sizeof(gTacticalStatus.uiTimeSinceLastInTactical), sizeof(UINT32), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fHasAGameBeenStarted, sizeof(gTacticalStatus.fHasAGameBeenStarted), sizeof(BOOLEAN), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.bConsNumTurnsWeHaventSeenButEnemyDoes, sizeof(gTacticalStatus.bConsNumTurnsWeHaventSeenButEnemyDoes), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fSomeoneHit, sizeof(gTacticalStatus.fSomeoneHit), sizeof(BOOLEAN), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubPaddingSmall, sizeof(gTacticalStatus.ubPaddingSmall), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.uiTimeSinceLastOpplistDecay, sizeof(gTacticalStatus.uiTimeSinceLastOpplistDecay), sizeof(UINT32), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.bMercArrivingQuoteBeingUsed, sizeof(gTacticalStatus.bMercArrivingQuoteBeingUsed), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubEnemyKilledOnAttackKiller, sizeof(gTacticalStatus.ubEnemyKilledOnAttackKiller), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fCountingDownForGuideDescription, sizeof(gTacticalStatus.fCountingDownForGuideDescription), sizeof(BOOLEAN), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.bGuideDescriptionCountDown, sizeof(gTacticalStatus.bGuideDescriptionCountDown), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubGuideDescriptionToUse, sizeof(gTacticalStatus.ubGuideDescriptionToUse), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.bGuideDescriptionSectorX, sizeof(gTacticalStatus.bGuideDescriptionSectorX), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.bGuideDescriptionSectorY, sizeof(gTacticalStatus.bGuideDescriptionSectorY), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fEnemyFlags, sizeof(gTacticalStatus.fEnemyFlags), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus. fAutoBandagePending, sizeof(gTacticalStatus. fAutoBandagePending), sizeof(BOOLEAN), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus. fHasEnteredCombatModeSinceEntering, sizeof(gTacticalStatus. fHasEnteredCombatModeSinceEntering), sizeof(BOOLEAN), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus. fDontAddNewCrows, sizeof(gTacticalStatus. fDontAddNewCrows), sizeof(BOOLEAN), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubMorePadding, sizeof(gTacticalStatus.ubMorePadding), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.sCreatureTenseQuoteDelay, sizeof(gTacticalStatus.sCreatureTenseQuoteDelay), sizeof(UINT16), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.uiCreatureTenseQuoteLastUpdate, sizeof(gTacticalStatus.uiCreatureTenseQuoteLastUpdate), sizeof(UINT32), numBytesRead);
if ( guiCurrentSaveGameVersion >= BUGFIX_NPC_DATA_FOR_BIG_MAPS )
{
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubLastRequesterSurgeryTargetID, sizeof(gTacticalStatus.ubLastRequesterSurgeryTargetID), sizeof(UINT8), numBytesRead);
while( (numBytesRead%4) != 0 ) // This is to make sure the total read is of DWORD length
numBytesRead = ReadFieldByField(hFile, &filler, sizeof(filler), sizeof(UINT8), numBytesRead);
}
else
{
numBytesRead++;
while( (numBytesRead%4) != 0 ) // This is to make sure the total read is of DWORD length
numBytesRead++;
}
//FileRead( hFile, &gTacticalStatus, sizeof( TacticalStatusType ), &uiNumBytesRead );
//if( uiNumBytesRead != sizeof( TacticalStatusType ) ) {
if( numBytesRead != sizeof( TacticalStatusType ) ) {
return(FALSE);
}
@@ -6058,13 +6337,19 @@ BOOLEAN LoadTacticalStatusFromSavedGame( HWFILE hFile )
int cntFromIni[] = {gGameExternalOptions.ubGameMaximumNumberOfPlayerMercs + gGameExternalOptions.ubGameMaximumNumberOfPlayerVehicles,
gGameExternalOptions.ubGameMaximumNumberOfEnemies, gGameExternalOptions.ubGameMaximumNumberOfCreatures,
gGameExternalOptions.ubGameMaximumNumberOfRebels, gGameExternalOptions.ubGameMaximumNumberOfCivilians};
CHAR16 *errMsgTxt[] = {L"mercenary/vehicle", L"enemy", L"creature", L"militia", L"civilian"};
CHAR16 *errMsgTxt[] = {L"Mercenary / Vehicle", L"Enemy", L"Creature", L"Militia", L"Civilian"};
errMsgTxt[0] = Additional113Text[2];
errMsgTxt[1] = Additional113Text[3];
errMsgTxt[2] = Additional113Text[4];
errMsgTxt[3] = Additional113Text[5];
errMsgTxt[4] = Additional113Text[6];
bool needToRejigger = false;
for (int idx = OUR_TEAM; idx <= CIV_TEAM; ++idx) {
if ((cntFromFile[ idx ] > cntFromIni[ idx ]) || ((cntFromFile[ idx ] < cntFromIni[ idx ]) && (idx == OUR_TEAM))) {
CHAR16 errorMessage[512];
swprintf(errorMessage, L"Internal error in reading %s slots from save file: number of slots in save file (%d) differs from .ini setting (%d)", errMsgTxt [ idx ], cntFromFile[ idx ], cntFromIni[ idx ]);
swprintf(errorMessage, Additional113Text[1], errMsgTxt [ idx ], cntFromFile[ idx ], cntFromIni[ idx ]);
DoScreenIndependantMessageBox(errorMessage, MSG_BOX_FLAG_OK, FailedLoadingGameCallBack );
return FALSE;
} else if (cntFromFile[ idx ] < cntFromIni[ idx ]) {
+5 -5
View File
@@ -39,7 +39,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D &quot;_CRT_SECURE_NO_DEPRECATE&quot;"
AdditionalOptions="/D _CRT_SECURE_NO_DEPRECATE"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;NO_ZLIB_COMPRESSION"
@@ -104,7 +104,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D &quot;_CRT_SECURE_NO_DEPRECATE&quot;"
AdditionalOptions="/D _CRT_SECURE_NO_DEPRECATE"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;NO_ZLIB_COMPRESSION"
RuntimeLibrary="0"
@@ -165,7 +165,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D &quot;_CRT_SECURE_NO_DEPRECATE&quot;"
AdditionalOptions="/D _CRT_SECURE_NO_DEPRECATE"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;NO_ZLIB_COMPRESSION"
RuntimeLibrary="0"
@@ -226,7 +226,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D &quot;_CRT_SECURE_NO_DEPRECATE&quot;"
AdditionalOptions="/D _CRT_SECURE_NO_DEPRECATE"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;NO_ZLIB_COMPRESSION"
@@ -291,7 +291,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D &quot;_CRT_SECURE_NO_DEPRECATE&quot;"
AdditionalOptions="/D _CRT_SECURE_NO_DEPRECATE"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;NO_ZLIB_COMPRESSION"
Binary file not shown.
+14
View File
@@ -18,6 +18,7 @@
#include "wcheck.h"
#include "Compression.h"
#include "vobject.h"
#include "vobject_blitters.h"
#endif
#include <vfs/Core/vfs.h>
@@ -422,6 +423,19 @@ BOOLEAN CopyImageToBuffer( HIMAGE hImage, UINT32 fBufferType, BYTE *pDestBuf, UI
return( Copy16BPPImageTo16BPPBuffer( hImage, pDestBuf, usDestWidth, usDestHeight, usX, usY, srcRect ) );
}
if ( hImage->ubBitDepth == 24 && fBufferType == BUFFER_16BPP )
{
DbgMessage( TOPIC_HIMAGE, DBG_LEVEL_3, "Copying 24 BPP Imagery to 16BPP Buffer." );
SGP_THROW("not yet implemented");
return( FALSE );
}
if ( hImage->ubBitDepth == 32 && fBufferType == BUFFER_16BPP )
{
DbgMessage( TOPIC_HIMAGE, DBG_LEVEL_3, "Copying 32 BPP Imagery to 16BPP Buffer." );
return Blt32BPPTo16BPPTrans((UINT16*)pDestBuf, usDestWidth * sizeof(UINT16), hImage->p32BPPData, usDestWidth*sizeof(UINT32), 0,0,0,0,usDestWidth, usDestHeight);
}
return( FALSE );
}
+4
View File
@@ -1164,6 +1164,10 @@ BOOLEAN fRemoved;
if((hFile=FileOpen(pFilename, FILE_ACCESS_READ, FALSE))!=0)
{
uiSize=FileGetSize(hFile);
if(uiSize == 0)
{
return NO_SAMPLE;
}
// if insufficient memory, start unloading old samples until either
// there's nothing left to unload, or we fit
+28 -17
View File
@@ -1104,6 +1104,9 @@ HVSURFACE CreateVideoSurface( VSURFACE_DESC *VSurfaceDesc )
break;
case 16:
// BF: handle 24 bpp and 32 bpp images as 16 bpp ones = convert larger color space to the smaller one
case 24:
case 32:
PixelFormat.dwFlags = DDPF_RGB;
PixelFormat.dwRGBBitCount = 16;
@@ -1192,19 +1195,21 @@ HVSURFACE CreateVideoSurface( VSURFACE_DESC *VSurfaceDesc )
memset( hVSurface, 0, sizeof( SGPVSurface ) );
CHECKF( hVSurface != NULL );
hVSurface->usHeight = usHeight;
hVSurface->usWidth = usWidth;
hVSurface->ubBitDepth = ubBitDepth;
hVSurface->pSurfaceData1 = (PTR)lpDDS;
hVSurface->usHeight = usHeight;
hVSurface->usWidth = usWidth;
// BF : since we use a 16bpp framebuffer and images are converted to that format,
// there is no need to set the surface bit depth to a higher value than 16
hVSurface->ubBitDepth = ubBitDepth > 16 ? 16 : ubBitDepth;
hVSurface->pSurfaceData1 = (PTR)lpDDS;
hVSurface->pSurfaceData = (PTR)lpDDS2;
hVSurface->pSavedSurfaceData1 = NULL;
hVSurface->pSavedSurfaceData = NULL;
hVSurface->pPalette = NULL;
hVSurface->p16BPPPalette = NULL;
hVSurface->TransparentColor = FROMRGB( 0, 0, 0 );
hVSurface->RegionList = CreateList( DEFAULT_NUM_REGIONS, sizeof( VSURFACE_REGION ) );
hVSurface->fFlags = 0;
hVSurface->pClipper = NULL;
hVSurface->pSavedSurfaceData1 = NULL;
hVSurface->pSavedSurfaceData = NULL;
hVSurface->pPalette = NULL;
hVSurface->p16BPPPalette = NULL;
hVSurface->TransparentColor = FROMRGB( 0, 0, 0 );
hVSurface->RegionList = CreateList( DEFAULT_NUM_REGIONS, sizeof( VSURFACE_REGION ) );
hVSurface->fFlags = 0;
hVSurface->pClipper = NULL;
//
// Determine memory and other attributes of newly created surface
@@ -1306,8 +1311,9 @@ HVSURFACE CreateVideoSurface( VSURFACE_DESC *VSurfaceDesc )
//
hVSurface->usHeight = usHeight;
hVSurface->usWidth = usWidth;
hVSurface->ubBitDepth = ubBitDepth;
hVSurface->usWidth = usWidth;
// BF: re-set bit depth (see above)
hVSurface->ubBitDepth = ubBitDepth > 16 ? 16 : ubBitDepth;
giMemUsedInSurfaces += ( hVSurface->usHeight * hVSurface->usWidth * ( hVSurface->ubBitDepth / 8 ) );
@@ -1432,7 +1438,7 @@ BOOLEAN SetVideoSurfaceDataFromHImage( HVSURFACE hVSurface, HIMAGE hImage, UINT1
BYTE *pDest;
UINT32 fBufferBPP = 0;
UINT32 uiPitch;
UINT16 usEffectiveWidth;
UINT16 usPixelWidth;
SGPRect aRect;
// Assertions
@@ -1451,6 +1457,11 @@ BOOLEAN SetVideoSurfaceDataFromHImage( HVSURFACE hVSurface, HIMAGE hImage, UINT1
{
fBufferBPP = BUFFER_16BPP;
}
else if ( (hImage->ubBitDepth == 24 || hImage->ubBitDepth == 32) && hVSurface->ubBitDepth == 16 )
{
// convert image to 16bpp
fBufferBPP = BUFFER_16BPP;
}
}
else
{
@@ -1476,7 +1487,7 @@ BOOLEAN SetVideoSurfaceDataFromHImage( HVSURFACE hVSurface, HIMAGE hImage, UINT1
pDest = LockVideoSurfaceBuffer( hVSurface, &uiPitch );
// Effective width ( in PIXELS ) is Pitch ( in bytes ) converted to pitch ( IN PIXELS )
usEffectiveWidth = (UINT16)( uiPitch / ( hVSurface->ubBitDepth / 8 ) );
usPixelWidth = (UINT16)( uiPitch / ( hVSurface->ubBitDepth / 8 ) );
CHECKF( pDest != NULL );
@@ -1498,7 +1509,7 @@ BOOLEAN SetVideoSurfaceDataFromHImage( HVSURFACE hVSurface, HIMAGE hImage, UINT1
}
// This HIMAGE function will transparently copy buffer
if ( !CopyImageToBuffer( hImage, fBufferBPP, pDest, usEffectiveWidth, hVSurface->usHeight, usX, usY, &aRect ) )
if ( !CopyImageToBuffer( hImage, fBufferBPP, pDest, usPixelWidth, hVSurface->usHeight, usX, usY, &aRect ) )
{
DbgMessage( TOPIC_VIDEOSURFACE, DBG_LEVEL_2, String( "Error Occured Copying HIMAGE to HVSURFACE" ));
UnLockVideoSurfaceBuffer( hVSurface );
+85 -59
View File
@@ -3376,29 +3376,40 @@ static INT16 GetMinimumStackDurability(const OBJECTTYPE* pObj) {
return minDur;
}
//CHRISL: During the repair process, we already attempt to repair the attachments on an item. So rather then adding the attachment to the stack, we want to
// add the main item, even if it's just the attachment that actually needs to be repaired. Also, if multiple items in a stack are damaged, we only want to
// include the stack once since the repair system already looks through the entire stack.
static void CollectRepairableItems(const SOLDIERTYPE* pSoldier, RepairQueue& itemsToFix) {
bool foundItem = false;
// Iterate over all pocket slots and add items in need of repair
for (UINT8 pocketIndex = HELMETPOS; pocketIndex < NUM_INV_SLOTS; ++pocketIndex) {
const OBJECTTYPE* pObj = &(const_cast<SOLDIERTYPE *>(pSoldier)->inv[pocketIndex]);
if(pObj == NULL || pObj->ubNumberOfObjects == NOTHING || pObj->usItem == NOTHING)
continue;
// Check if item needs repairing
BOOLEAN itemAddedToQueue = FALSE;
foundItem = false;
for (UINT8 stackIndex = 0; stackIndex < pObj->ubNumberOfObjects; ++stackIndex) {
// Check the stack item itself
if (!itemAddedToQueue && IsItemRepairable(pObj->usItem, (*pObj)[stackIndex]->data.objectStatus)) {
itemAddedToQueue = TRUE;
if (IsItemRepairable(pObj->usItem, (*pObj)[stackIndex]->data.objectStatus)) {
RepairItem item(pObj, pSoldier, (INVENTORY_SLOT) pocketIndex);
itemsToFix.push(item);
break;
}
// Check for attachments (are there stackable items that can take attachments though?)
UINT8 attachmentIndex = 0;
for (attachmentList::const_iterator iter = (*pObj)[stackIndex]->attachments.begin(); iter != (*pObj)[stackIndex]->attachments.end(); ++iter, ++attachmentIndex) {
if (IsItemRepairable(iter->usItem, (*iter)[attachmentIndex]->data.objectStatus )) {
RepairItem item(&(*iter), pSoldier, (INVENTORY_SLOT) pocketIndex);
// Send the main item, not the attachment
RepairItem item(pObj, pSoldier, (INVENTORY_SLOT) pocketIndex);
itemsToFix.push(item);
foundItem = true;
break;
}
}
if(foundItem)
break;
}
}
}
@@ -3627,9 +3638,12 @@ BOOLEAN RepairObject( SOLDIERTYPE * pSoldier, SOLDIERTYPE * pOwner, OBJECTTYPE *
}
}
// now check for attachments after
for (attachmentList::iterator iter = (*pObj)[ubLoop]->attachments.begin(); iter != (*pObj)[ubLoop]->attachments.end(); ++iter) {
if (RepairObject(pSoldier, pOwner, &(*iter), pubRepairPtsLeft) && iter->exists()) {
for (attachmentList::iterator iter = (*pObj)[ubLoop]->attachments.begin(); iter != (*pObj)[ubLoop]->attachments.end(); ++iter)
{
if (iter->exists() && RepairObject(pSoldier, pOwner, &(*iter), pubRepairPtsLeft))
{
fSomethingWasRepaired = true;
if ( *pubRepairPtsLeft == 0 )
{
@@ -3638,6 +3652,7 @@ BOOLEAN RepairObject( SOLDIERTYPE * pSoldier, SOLDIERTYPE * pOwner, OBJECTTYPE *
}
}
}
//CHRISL: Now check and see if this is an LBENODE with items that need repairing
if(UsingNewInventorySystem() == true && Item[pObj->usItem].usItemClass == IC_LBEGEAR && pObj->IsActiveLBE(ubLoop) == true)
{
@@ -8057,65 +8072,76 @@ void BeginRemoveMercFromContract( SOLDIERTYPE *pSoldier )
// This function will setup the quote, then start dialogue beginning the actual leave sequence
if( ( pSoldier->stats.bLife > 0 ) && ( pSoldier->bAssignment != ASSIGNMENT_POW ) )
{
if( ( pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__MERC ) || ( pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__NPC ) )
// WANNE: Nothing to do here, when we want to dismiss the robot
BOOLEAN fAmIaRobot = AM_A_ROBOT( pSoldier );
if (!fAmIaRobot)
{
HandleImportantMercQuote( pSoldier, QUOTE_RESPONSE_TO_MIGUEL_SLASH_QUOTE_MERC_OR_RPC_LETGO );
SpecialCharacterDialogueEvent( DIALOGUE_SPECIAL_EVENT_LOCK_INTERFACE,0 ,MAP_SCREEN ,0 ,0 ,0 );
TacticalCharacterDialogueWithSpecialEvent( pSoldier, 0, DIALOGUE_SPECIAL_EVENT_CONTRACT_ENDING, 1,0 );
}
else
// quote is different if he's fired in less than 48 hours
if( ( GetWorldTotalMin() - pSoldier->uiTimeOfLastContractUpdate ) < 60 * 48 )
{
SpecialCharacterDialogueEvent( DIALOGUE_SPECIAL_EVENT_LOCK_INTERFACE,1 ,MAP_SCREEN ,0 ,0 ,0 );
if( ( pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__AIM_MERC ) )
{
// Only do this if they want to renew.....
if ( WillMercRenew( pSoldier, FALSE ) )
{
HandleImportantMercQuote( pSoldier, QUOTE_DEPART_COMMET_CONTRACT_NOT_RENEWED_OR_TERMINATED_UNDER_48 );
}
}
SpecialCharacterDialogueEvent( DIALOGUE_SPECIAL_EVENT_LOCK_INTERFACE,0 ,MAP_SCREEN ,0 ,0 ,0 );
TacticalCharacterDialogueWithSpecialEvent( pSoldier, 0, DIALOGUE_SPECIAL_EVENT_CONTRACT_ENDING, 1,0 );
}
else
{
SpecialCharacterDialogueEvent( DIALOGUE_SPECIAL_EVENT_LOCK_INTERFACE,1 ,MAP_SCREEN ,0 ,0 ,0 );
if( ( pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__AIM_MERC ) )
{
// Only do this if they want to renew.....
if ( WillMercRenew( pSoldier, FALSE ) )
{
HandleImportantMercQuote( pSoldier, QUOTE_DEPARTING_COMMENT_CONTRACT_NOT_RENEWED_OR_48_OR_MORE );
}
}
else if( ( pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__MERC ) || ( pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__NPC ) )
if( ( pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__MERC ) || ( pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__NPC ) )
{
HandleImportantMercQuote( pSoldier, QUOTE_RESPONSE_TO_MIGUEL_SLASH_QUOTE_MERC_OR_RPC_LETGO );
SpecialCharacterDialogueEvent( DIALOGUE_SPECIAL_EVENT_LOCK_INTERFACE,0 ,MAP_SCREEN ,0 ,0 ,0 );
TacticalCharacterDialogueWithSpecialEvent( pSoldier, 0, DIALOGUE_SPECIAL_EVENT_CONTRACT_ENDING, 1,0 );
}
SpecialCharacterDialogueEvent( DIALOGUE_SPECIAL_EVENT_LOCK_INTERFACE,0 ,MAP_SCREEN ,0 ,0 ,0 );
TacticalCharacterDialogueWithSpecialEvent( pSoldier, 0, DIALOGUE_SPECIAL_EVENT_CONTRACT_ENDING, 1,0 );
}
if( ( GetWorldTotalMin() - pSoldier->uiTimeOfLastContractUpdate ) < 60 * 3 )
{
// this will cause him give us lame excuses for a while until he gets over it
// 3-6 days (but the first 1-2 days of that are spent "returning" home)
gMercProfiles[ pSoldier->ubProfile ].ubDaysOfMoraleHangover = (UINT8) (3 + Random(4));
// if it's an AIM merc, word of this gets back to AIM... Bad rep.
if( pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__AIM_MERC )
else
{
ModifyPlayerReputation(REPUTATION_EARLY_FIRING);
// quote is different if he's fired in less than 48 hours
if( ( GetWorldTotalMin() - pSoldier->uiTimeOfLastContractUpdate ) < 60 * 48 )
{
SpecialCharacterDialogueEvent( DIALOGUE_SPECIAL_EVENT_LOCK_INTERFACE,1 ,MAP_SCREEN ,0 ,0 ,0 );
if( ( pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__AIM_MERC ) )
{
// Only do this if they want to renew.....
if ( WillMercRenew( pSoldier, FALSE ) )
{
HandleImportantMercQuote( pSoldier, QUOTE_DEPART_COMMET_CONTRACT_NOT_RENEWED_OR_TERMINATED_UNDER_48 );
}
}
SpecialCharacterDialogueEvent( DIALOGUE_SPECIAL_EVENT_LOCK_INTERFACE,0 ,MAP_SCREEN ,0 ,0 ,0 );
TacticalCharacterDialogueWithSpecialEvent( pSoldier, 0, DIALOGUE_SPECIAL_EVENT_CONTRACT_ENDING, 1,0 );
}
else
{
SpecialCharacterDialogueEvent( DIALOGUE_SPECIAL_EVENT_LOCK_INTERFACE,1 ,MAP_SCREEN ,0 ,0 ,0 );
if( ( pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__AIM_MERC ) )
{
// Only do this if they want to renew.....
if ( WillMercRenew( pSoldier, FALSE ) )
{
HandleImportantMercQuote( pSoldier, QUOTE_DEPARTING_COMMENT_CONTRACT_NOT_RENEWED_OR_48_OR_MORE );
}
}
else if( ( pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__MERC ) || ( pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__NPC ) )
{
HandleImportantMercQuote( pSoldier, QUOTE_RESPONSE_TO_MIGUEL_SLASH_QUOTE_MERC_OR_RPC_LETGO );
}
SpecialCharacterDialogueEvent( DIALOGUE_SPECIAL_EVENT_LOCK_INTERFACE,0 ,MAP_SCREEN ,0 ,0 ,0 );
TacticalCharacterDialogueWithSpecialEvent( pSoldier, 0, DIALOGUE_SPECIAL_EVENT_CONTRACT_ENDING, 1,0 );
}
}
if( ( GetWorldTotalMin() - pSoldier->uiTimeOfLastContractUpdate ) < 60 * 3 )
{
// this will cause him give us lame excuses for a while until he gets over it
// 3-6 days (but the first 1-2 days of that are spent "returning" home)
gMercProfiles[ pSoldier->ubProfile ].ubDaysOfMoraleHangover = (UINT8) (3 + Random(4));
// if it's an AIM merc, word of this gets back to AIM... Bad rep.
if( pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__AIM_MERC )
{
ModifyPlayerReputation(REPUTATION_EARLY_FIRING);
}
}
}
// WANNE: When we want to dismiss the robot, simply dismiss, without any special stuff
else
{
StrategicRemoveMerc(pSoldier);
}
}
}
@@ -11047,7 +11073,7 @@ void SetSoldierAssignment( SOLDIERTYPE *pSoldier, INT8 bAssignment, INT32 iParam
if( pMilitiaTrainerSoldier == NULL )
{
if( SectorInfo[ SECTOR( pSoldier->sSectorX, pSoldier->sSectorY ) ].fMilitiaTrainingPaid == FALSE )
if( SectorInfo[ SECTOR( pSoldier->sSectorX, pSoldier->sSectorY ) ].fMobileMilitiaTrainingPaid == FALSE )
{
// show a message to confirm player wants to charge cost
HandleInterfaceMessageForCostOfTrainingMilitia( pSoldier );
+1 -1
View File
@@ -2100,7 +2100,7 @@ void RenderAutoResolve()
//Render the total battle time elapsed.
SetFont( FONT10ARIAL );
swprintf( str, L"%s: %dm %02ds",
swprintf( str, L"%s: %dm %02ds",
gpStrategicString[ STR_AR_TIME_ELAPSED ],
gpAR->uiTotalElapsedBattleTimeInMilliseconds/60000,
(gpAR->uiTotalElapsedBattleTimeInMilliseconds%60000)/1000 );
+4 -1
View File
@@ -1043,8 +1043,11 @@ void CreateMouseRegionForPauseOfClock( INT16 sX, INT16 sY )
{
if( fClockMouseRegionCreated == FALSE )
{
INT16 sXVal = sX;
INT16 sYVal = sY;
// create a mouse region for pausing of game clock
MSYS_DefineRegion( &gClockMouseRegion, (UINT16)( sX ), (UINT16)( sY ),(UINT16)( sX + CLOCK_REGION_WIDTH ), (UINT16)( sY + CLOCK_REGION_HEIGHT ), MSYS_PRIORITY_HIGHEST,
MSYS_DefineRegion( &gClockMouseRegion, (UINT16)( sXVal ), (UINT16)( sYVal ),(UINT16)( sX + CLOCK_REGION_WIDTH ), (UINT16)( sY + CLOCK_REGION_HEIGHT), MSYS_PRIORITY_HIGHEST,
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, PauseOfClockBtnCallback );
fClockMouseRegionCreated = TRUE;
+4 -3
View File
@@ -206,13 +206,14 @@ BOOLEAN ExecuteStrategicEvent( STRATEGICEVENT *pEvent )
DailyUpdateOfMercSite( (UINT16)GetWorldDay() );
break;
case EVENT_DAY3_ADD_EMAIL_FROM_SPECK:
if ( gGameExternalOptions.fMercDayOne == FALSE && gGameExternalOptions.fAllMercsAvailable == FALSE )
// WANNE: This fixes the bug, that Speck did not sent the email on Day 3, when MERC_WEBSITE_ALL_MERCS_AVAILABLE = TRUE!
if ( gGameExternalOptions.fMercDayOne == FALSE /* && gGameExternalOptions.fAllMercsAvailable == FALSE */ )
{
AddEmail(MERC_INTRO, MERC_INTRO_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin( ), -1 );
AddEmail(MERC_INTRO, MERC_INTRO_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin( ), -1, -1 );
}
break;
case EVENT_DAY2_ADD_EMAIL_FROM_IMP:
AddEmail(IMP_EMAIL_PROFILE_RESULTS, IMP_EMAIL_PROFILE_RESULTS_LENGTH, IMP_PROFILE_RESULTS, GetWorldTotalMin( ), -1 );
AddEmail(IMP_EMAIL_PROFILE_RESULTS, IMP_EMAIL_PROFILE_RESULTS_LENGTH, IMP_PROFILE_RESULTS, GetWorldTotalMin( ), -1, -1);
break;
//If a merc gets hired and they dont show up immediately, the merc gets added to the queue and shows up
// uiTimeTillMercArrives minutes later
+109 -22
View File
@@ -1399,7 +1399,7 @@ BOOLEAN BOOL;
static int l_StopVideo(lua_State *L)
{
StopIntroVideo();
Test = 1;
return 0;
}
@@ -5663,13 +5663,16 @@ int i;
UINT16 SextorX;
UINT16 SextorY;
UINT8 SkyDrive;
for (i= 1; i<=n; i++ )
{
if (i == 1 ) SextorX = lua_tointeger(L,i);
if (i == 2 ) SextorY = lua_tointeger(L,i);
if (i == 3 ) SkyDrive = lua_tointeger(L,i);
}
SetUpHelicopterForPlayer( SextorX, SextorY );
SetUpHelicopterForPlayer( SextorX, SextorY, SkyDrive );
return 0;
}
@@ -7209,28 +7212,27 @@ return 0;
//AddEmail
static int l_AddEmail (lua_State *L)
{
UINT8 n = lua_gettop(L);
int i;
UINT8 n = lua_gettop(L);
int i;
INT32 iMessageOffset;
INT32 iMessageLength;
UINT8 ubSender;
INT32 iCurrentIMPPosition;
INT32 iMessageOffset;
INT32 iMessageLength;
UINT8 ubSender;
INT32 iCurrentIMPPosition;
INT16 iCurrentShipmentDestinationID = -1;
for (i= 1; i<=n; i++ )
{
if (i == 1 ) iMessageOffset = lua_tointeger(L,i);
if (i == 2 ) iMessageLength = lua_tointeger(L,i);
if (i == 3 ) ubSender = lua_tointeger(L,i);
//if (i == 4 ) iDate = lua_tointeger(L,i);
if (i == 4 ) iCurrentIMPPosition = lua_tointeger(L,i);
if (i == 5) iCurrentShipmentDestinationID = lua_tointeger(L,i);
}
AddEmail(iMessageOffset,iMessageLength,ubSender, GetWorldTotalMin(), iCurrentIMPPosition);
AddEmail(iMessageOffset,iMessageLength,ubSender, GetWorldTotalMin(), iCurrentIMPPosition, iCurrentShipmentDestinationID);
return 0;
return 0;
}
//AddPreReadEmail
@@ -9750,10 +9752,49 @@ static int l_ubMiscFlags2Check (lua_State *L)
if (i == 2 ) set = lua_tointeger(L,i);
}
Flag = (gMercProfiles[Profile].ubMiscFlags2 & set);
if (set == 1)
{
if (gMercProfiles[Profile].ubMiscFlags2 & PROFILE_MISC_FLAG2_DONT_ADD_TO_SECTOR)
Flag = 1;
}
else if (set == 2)
{
if (gMercProfiles[Profile].ubMiscFlags2 & PROFILE_MISC_FLAG2_LEFT_COUNTRY)
Flag = 1;
}
else if (set == 4)
{
if (gMercProfiles[Profile].ubMiscFlags2 & PROFILE_MISC_FLAG2_BANDAGED_TODAY)
Flag = 1;
}
else if (set == 8)
{
if (gMercProfiles[Profile].ubMiscFlags2 & PROFILE_MISC_FLAG2_SAID_FIRSTSEEN_QUOTE)
Flag = 1;
}
else if (set == 16)
{
if (gMercProfiles[Profile].ubMiscFlags2 & PROFILE_MISC_FLAG2_NEEDS_TO_SAY_HOSTILE_QUOTE)
Flag = 1;
}
else if (set == 32)
{
if (gMercProfiles[Profile].ubMiscFlags2 & PROFILE_MISC_FLAG2_MARRIED_TO_HICKS)
Flag = 1;
}
else if (set == 64 )
{
if (gMercProfiles[Profile].ubMiscFlags2 & PROFILE_MISC_FLAG2_ASKED_BY_HICKS)
Flag = 1;
}
// Set the return value of the function
// --> Flag == 0 -> The specified Flag is not set
// --> Flag == 1 -> The specified Flag is set
lua_pushinteger(L, Flag);
// Always return 1, this tells LUA that the the function run without a problem.
// But THIS is not the return value of the function. The return value is specified in the "lua_pushinteger()" call above!!!
return 1;
}
@@ -9773,7 +9814,48 @@ static int l_ubMiscFlags1Check (lua_State *L)
if (i == 2 ) set = lua_tointeger(L,i);
}
Flag = (gMercProfiles[Profile].ubMiscFlags & set);
if (set == 1)
{
if (gMercProfiles[Profile].ubMiscFlags2 & PROFILE_MISC_FLAG_RECRUITED)
Flag = 1;
}
else if (set == 2)
{
if (gMercProfiles[Profile].ubMiscFlags2 & PROFILE_MISC_FLAG_HAVESEENCREATURE)
Flag = 1;
}
else if (set == 4)
{
if (gMercProfiles[Profile].ubMiscFlags2 & PROFILE_MISC_FLAG_FORCENPCQUOTE)
Flag = 1;
}
else if (set == 8)
{
if (gMercProfiles[Profile].ubMiscFlags2 & PROFILE_MISC_FLAG_WOUNDEDBYPLAYER)
Flag = 1;
}
else if (set == 16)
{
if (gMercProfiles[Profile].ubMiscFlags2 & PROFILE_MISC_FLAG_TEMP_NPC_QUOTE_DATA_EXISTS)
Flag = 1;
}
else if (set == 32)
{
if (gMercProfiles[Profile].ubMiscFlags2 & PROFILE_MISC_FLAG_SAID_HOSTILE_QUOTE)
Flag = 1;
}
else if (set == 64 )
{
if (gMercProfiles[Profile].ubMiscFlags2 & PROFILE_MISC_FLAG_EPCACTIVE)
Flag = 1;
}
else if (set == 128 )
{
if (gMercProfiles[Profile].ubMiscFlags2 & PROFILE_MISC_FLAG_ALREADY_USED_ITEMS)
Flag = 1;
}
//Flag = (gMercProfiles[Profile].ubMiscFlags & set);
lua_pushinteger(L, Flag);
@@ -9856,34 +9938,39 @@ static int l_ubMiscFlags2Set(lua_State *L)
if (i == 2 ) set = lua_tointeger(L,i);
}
if (set == 0)
if (set == 0)
{
gMercProfiles[Profile].ubMiscFlags2 = 0;
}
else if (set == 1)
{
gMercProfiles[Profile].ubMiscFlags2 &= (~PROFILE_MISC_FLAG2_DONT_ADD_TO_SECTOR);
}
else if (set == 1)
else if (set == 2)
{
gMercProfiles[Profile].ubMiscFlags2 &= (~PROFILE_MISC_FLAG2_LEFT_COUNTRY);
}
else if (set == 2)
else if (set == 4)
{
gMercProfiles[Profile].ubMiscFlags2 &= (~PROFILE_MISC_FLAG2_BANDAGED_TODAY);
}
else if (set == 3)
else if (set == 8)
{
gMercProfiles[Profile].ubMiscFlags2 &= (~PROFILE_MISC_FLAG2_SAID_FIRSTSEEN_QUOTE);
}
else if (set == 4)
else if (set == 16)
{
gMercProfiles[Profile].ubMiscFlags2 &= (~PROFILE_MISC_FLAG2_NEEDS_TO_SAY_HOSTILE_QUOTE);
}
else if (set == 5)
else if (set == 32)
{
gMercProfiles[Profile].ubMiscFlags2 &= (~PROFILE_MISC_FLAG2_MARRIED_TO_HICKS);
}
else if (set == 6 )
else if (set == 64 )
{
gMercProfiles[Profile].ubMiscFlags2 &= (~PROFILE_MISC_FLAG2_ASKED_BY_HICKS);
}
return 0;
}
+3 -3
View File
@@ -949,7 +949,7 @@ void UpdateRefuelSiteAvailability( void )
}
void SetUpHelicopterForPlayer( INT16 sX, INT16 sY )
void SetUpHelicopterForPlayer( INT16 sX, INT16 sY , UINT8 SkyDrive )
{
if( fSkyRiderSetUp == FALSE )
{
@@ -961,7 +961,7 @@ void SetUpHelicopterForPlayer( INT16 sX, INT16 sY )
Assert( iHelicopterVehicleId != -1 );
SoldierSkyRider.initialize();
SoldierSkyRider.ubProfile = SKYRIDER;
SoldierSkyRider.ubProfile = SkyDrive; //SKYRIDER;
SoldierSkyRider.stats.bLife = 80;
pSkyRider = &( SoldierSkyRider );
@@ -972,7 +972,7 @@ void SetUpHelicopterForPlayer( INT16 sX, INT16 sY )
fSkyRiderSetUp = TRUE;
gMercProfiles[ SKYRIDER ].fUseProfileInsertionInfo = FALSE;
gMercProfiles[ SkyDrive ].fUseProfileInsertionInfo = FALSE; //SKYRIDER
}
return;
+1 -1
View File
@@ -191,7 +191,7 @@ BOOLEAN IsRefuelSiteInSector( INT16 sMapX, INT16 sMapY );
void UpdateRefuelSiteAvailability( void );
// setup helicopter for player
void SetUpHelicopterForPlayer( INT16 sX, INT16 sY );
void SetUpHelicopterForPlayer( INT16 sX, INT16 sY , UINT8 SkyDrive );
// the intended path of the helicopter
INT32 DistanceOfIntendedHelicopterPath( void );
@@ -1039,6 +1039,10 @@ void MapInvenPoolSlots(MOUSE_REGION * pRegion, INT32 iReason )
sObjectSourceGridNo = gMapInformation.sCenterGridNo;
}
//CHRISL: Make sure we put the item at the same level as the merc
if(gpItemPointerSoldier->exists() == true)
pInventoryPoolList[(iCurrentInventoryPoolPage*MAP_INVENTORY_POOL_SLOT_COUNT)+iCounter].ubLevel = gpItemPointerSoldier->pathing.bLevel;
// set as reachable and set gridno
pInventoryPoolList[ ( iCurrentInventoryPoolPage * MAP_INVENTORY_POOL_SLOT_COUNT ) + iCounter ].usFlags |= WORLD_ITEM_REACHABLE;
+1 -1
View File
@@ -4723,7 +4723,7 @@ void DisplayPositionOfHelicopter( void )
RemoveVehicleFromList (iHelicopterVehicleId);
InitAVehicle (iHelicopterVehicleId, 13, MAP_ROW_B);
fSkyRiderSetUp = FALSE;
SetUpHelicopterForPlayer( 13, MAP_ROW_B );
SetUpHelicopterForPlayer( 13, MAP_ROW_B , SKYRIDER );
pGroup = GetGroup( pVehicleList[ iHelicopterVehicleId ].ubMovementGroup );
if (!pGroup) {
static bool heliMsg2Given = false;
@@ -631,7 +631,7 @@ void AddCommonInfoToBox(void)
if (ubMilitiaTotal > 0)
{
// some militia, show total & their breakdown by level
swprintf( wString, L"%d (%d/%d/%d)", ubMilitiaTotal,
swprintf( wString, L"%d (%d/%d/%d)", ubMilitiaTotal,
MilitiaInSectorOfRank(bCurrentTownMineSectorX, bCurrentTownMineSectorY, GREEN_MILITIA),
MilitiaInSectorOfRank(bCurrentTownMineSectorX, bCurrentTownMineSectorY, REGULAR_MILITIA),
MilitiaInSectorOfRank(bCurrentTownMineSectorX, bCurrentTownMineSectorY, ELITE_MILITIA));
+91 -42
View File
@@ -61,6 +61,9 @@
class OBJECTTYPE;
class SOLDIERTYPE;
// marke strogg more mercs
extern UINT8 FIRSTmercTOdisplay = 0 ;
extern UINT8 maxNumberOfMercVisibleInStrategyList = 0; // WANNE: Max merc displayed in the list depends on the resolution
// inventory pool position on screen
#define MAP_INVEN_POOL_X 300
@@ -1065,17 +1068,17 @@ INT16 CharacterIsGettingPathPlotted( INT16 sCharNumber )
}
// is the character a valid one?
if( gCharactersList[ sCharNumber ].fValid == FALSE )
if( gCharactersList[ sCharNumber + FIRSTmercTOdisplay ].fValid == FALSE )
{
return ( FALSE );
}
// if the highlighted line character is also selected
if ( ( ( giDestHighLine != -1 ) && IsEntryInSelectedListSet ( ( INT8 ) giDestHighLine ) ) ||
if ( ( ( giDestHighLine != -1 ) && IsEntryInSelectedListSet ( ( INT8 ) giDestHighLine + FIRSTmercTOdisplay ) ) ||
( ( bSelectedDestChar != -1 ) && IsEntryInSelectedListSet ( bSelectedDestChar ) ) )
{
// then ALL selected lines will be affected
if( IsEntryInSelectedListSet( ( INT8 ) sCharNumber ) )
if( IsEntryInSelectedListSet( ( INT8 ) sCharNumber + FIRSTmercTOdisplay ) )
{
return( TRUE );
}
@@ -1083,7 +1086,7 @@ INT16 CharacterIsGettingPathPlotted( INT16 sCharNumber )
else
{
// if he is *the* selected dude
if( bSelectedDestChar == sCharNumber )
if( bSelectedDestChar == sCharNumber + FIRSTmercTOdisplay )
{
return ( TRUE );
}
@@ -1107,16 +1110,18 @@ BOOLEAN IsCharacterSelectedForAssignment( INT16 sCharNumber )
}
// is the character a valid one?
if( gCharactersList[ sCharNumber ].fValid == FALSE )
if( gCharactersList[ sCharNumber + FIRSTmercTOdisplay ].fValid == FALSE )
{
return ( FALSE );
}
// if the highlighted line character is also selected
if ( ( giAssignHighLine != -1 ) && IsEntryInSelectedListSet ( ( INT8 ) giAssignHighLine ) )
// marke strogg more mercs
if ( ( giAssignHighLine != -1 ) && IsEntryInSelectedListSet ( ( INT8 ) giAssignHighLine + FIRSTmercTOdisplay ) )
{
// then ALL selected lines will be affected
if( IsEntryInSelectedListSet( ( INT8 ) sCharNumber ) )
// marke strogg more mercs
if( IsEntryInSelectedListSet( ( INT8 ) sCharNumber + FIRSTmercTOdisplay ) )
{
return( TRUE );
}
@@ -1142,18 +1147,19 @@ BOOLEAN IsCharacterSelectedForSleep( INT16 sCharNumber )
{
return( FALSE );
}
// marke strogg more mercs
// is the character a valid one?
if( gCharactersList[ sCharNumber ].fValid == FALSE )
if( gCharactersList[ sCharNumber + FIRSTmercTOdisplay ].fValid == FALSE )
{
return ( FALSE );
}
// if the highlighted line character is also selected
if ( ( giSleepHighLine != -1 ) && IsEntryInSelectedListSet ( ( INT8 ) giSleepHighLine ) )
if ( ( giSleepHighLine != -1 ) && IsEntryInSelectedListSet ( ( INT8 ) giSleepHighLine + FIRSTmercTOdisplay ) )
{
// then ALL selected lines will be affected
if( IsEntryInSelectedListSet( ( INT8 ) sCharNumber ) )
if( IsEntryInSelectedListSet( ( INT8 ) sCharNumber + FIRSTmercTOdisplay ) )
{
return( TRUE );
}
@@ -1404,7 +1410,6 @@ void HandleDisplayOfSelectedMercArrows( void )
INT16 sYPosition = 0;
HVOBJECT hHandle;
UINT8 ubCount = 0;
INT16 usVehicleCount = 0;
// blit an arrow by the name of each merc in a selected list
if( bSelectedInfoChar == -1 )
@@ -1422,37 +1427,32 @@ void HandleDisplayOfSelectedMercArrows( void )
{
return;
}
// now blit one by the selected merc
sYPosition = Y_START+( bSelectedInfoChar * ( Y_SIZE + 2 ) ) - 1;
if( bSelectedInfoChar >= FIRST_VEHICLE )
// marke strogg more merc
if ( bSelectedInfoChar - FIRSTmercTOdisplay >= maxNumberOfMercVisibleInStrategyList )
{
usVehicleCount = bSelectedInfoChar - FIRST_VEHICLE;
sYPosition = usVehicleY+( usVehicleCount * ( Y_SIZE + 2) ) - 1;;
FIRSTmercTOdisplay = bSelectedInfoChar - (maxNumberOfMercVisibleInStrategyList - 1) ;
}
// now blit one by the selected merc
// marke strogg more mercs
sYPosition = Y_START+( ( bSelectedInfoChar - FIRSTmercTOdisplay ) * ( Y_SIZE + 2 ) ) - 1;
GetVideoObject( &hHandle, guiSelectedCharArrow );
BltVideoObject( guiSAVEBUFFER , hHandle, 0,SELECTED_CHAR_ARROW_X, sYPosition , VO_BLT_SRCTRANSPARENCY,NULL );
// now run through the selected list of guys, an arrow for each
for( ubCount = 0; ubCount < giMAXIMUM_NUMBER_OF_PLAYER_SLOTS; ubCount++ )
{
if( gCharactersList[ ubCount ].fValid == TRUE )
// marke strogg more mercs
for( ubCount = 0; ubCount < maxNumberOfMercVisibleInStrategyList; ubCount++ )
{
// marke strogg more mercs
if( gCharactersList[ ubCount + FIRSTmercTOdisplay ].fValid == TRUE )
{
// are they in the selected list or int he same mvt group as this guy
if( ( IsEntryInSelectedListSet( ubCount ) == TRUE ) || ( ( bSelectedDestChar != - 1 ) ? ( ( Menptr[ gCharactersList[ ubCount ].usSolID ].ubGroupID != 0 ) ? ( Menptr[ gCharactersList[ bSelectedDestChar ].usSolID ].ubGroupID == Menptr[ gCharactersList[ ubCount ].usSolID ].ubGroupID ) : FALSE ) : FALSE ) )
if( ( IsEntryInSelectedListSet( ubCount + FIRSTmercTOdisplay ) == TRUE ) || ( ( bSelectedDestChar != - 1 ) ? ( ( Menptr[ gCharactersList[ ubCount + FIRSTmercTOdisplay ].usSolID ].ubGroupID != 0 ) ? ( Menptr[ gCharactersList[ bSelectedDestChar ].usSolID ].ubGroupID == Menptr[ gCharactersList[ ubCount + FIRSTmercTOdisplay ].usSolID ].ubGroupID ) : FALSE ) : FALSE ) )
{
sYPosition = Y_START+( ubCount * ( Y_SIZE + 2) ) - 1;
if( ubCount >= FIRST_VEHICLE )
{
usVehicleCount = ubCount - FIRST_VEHICLE;
sYPosition = usVehicleY+( usVehicleCount * ( Y_SIZE + 2) ) - 1;;
}
GetVideoObject( &hHandle, guiSelectedCharArrow );
BltVideoObject( guiSAVEBUFFER , hHandle, 0,SELECTED_CHAR_ARROW_X, sYPosition , VO_BLT_SRCTRANSPARENCY,NULL );
}
@@ -2272,18 +2272,11 @@ void UpdateMapScreenAssignmentPositions( void )
// do nothing
}
else
{
giBoxY = ( Y_START + ( bSelectedAssignChar ) * ( Y_SIZE + 2 ) );
/* ARM: Removed this - refreshes fine without it, apparently
// make sure the menus don't overlap the map screen bottom panel (but where did 102 come from?)
if( giBoxY >= ( MAP_BOTTOM_Y - 102 ) )
giBoxY = MAP_BOTTOM_Y - 102;
*/
{
// marke strogg more mercs
giBoxY = ( Y_START + ( bSelectedAssignChar - FIRSTmercTOdisplay ) * ( Y_SIZE + 2 ) );
}
AssignmentPosition.iY = giBoxY;
AttributePosition.iY = TrainPosition.iY = AssignmentPosition.iY + ( GetFontHeight( MAP_SCREEN_FONT ) + 2 )* ASSIGN_MENU_TRAIN;
@@ -2650,6 +2643,57 @@ void GoToNextCharacterInList( void )
}
}
// WANNE: Jump to first character in list when pressing PageUp
void GoToFirstCharacterInList( void )
{
INT32 iCounter = 0, iCount = 0;
if( fShowDescriptionFlag == TRUE )
{
return;
}
if( ( bSelectedDestChar != -1 ) || ( fPlotForHelicopter == TRUE ) )
{
AbortMovementPlottingMode( );
}
// now run through the list and find first prev guy
for( iCounter = 0; iCounter < giMAXIMUM_NUMBER_OF_PLAYER_SLOTS; iCounter++ )
{
if ( ( gCharactersList[ iCounter ].fValid ) && ( iCounter < giMAXIMUM_NUMBER_OF_PLAYER_SLOTS ) && ValidSelectableCharForNextOrPrev( iCounter ) )
{
ChangeSelectedInfoChar( ( INT8 )iCounter, TRUE );
break;
}
}
}
// WANNE: Jump to last character in list when pressing PageDown
void GoToLastCharacterInList( void )
{
INT32 iCounter = 0, iCount = 0;
if( fShowDescriptionFlag == TRUE )
{
return;
}
if( ( bSelectedDestChar != -1 ) || ( fPlotForHelicopter == TRUE ) )
{
AbortMovementPlottingMode( );
}
// now run through the list and find first prev guy
for( iCounter = giMAXIMUM_NUMBER_OF_PLAYER_SLOTS - 1; iCounter > 0; iCounter-- )
{
if ( ( gCharactersList[ iCounter ].fValid ) && ( iCounter < giMAXIMUM_NUMBER_OF_PLAYER_SLOTS ) && ValidSelectableCharForNextOrPrev( iCounter ) )
{
ChangeSelectedInfoChar( ( INT8 )iCounter, TRUE );
break;
}
}
}
void GoToPrevCharacterInList( void )
{
@@ -2690,7 +2734,6 @@ void GoToPrevCharacterInList( void )
if( iCount < 0 )
{
// was FIRST_VEHICLE
iCount = giMAXIMUM_NUMBER_OF_PLAYER_SLOTS;
}
}
@@ -5764,7 +5807,7 @@ BOOLEAN HandleTimeCompressWithTeamJackedInAndGearedToGo( void )
SetUpShutDownMapScreenHelpTextScreenMask( );
// Add e-mail message
AddEmail(ENRICO_CONGRATS,ENRICO_CONGRATS_LENGTH,MAIL_ENRICO, GetWorldTotalMin(), -1);
AddEmail(ENRICO_CONGRATS,ENRICO_CONGRATS_LENGTH,MAIL_ENRICO, GetWorldTotalMin(), -1, -1);
return( TRUE );
@@ -6413,6 +6456,12 @@ BOOLEAN CanSoldierMoveWithVehicleId( SOLDIERTYPE *pSoldier, INT32 iVehicle1Id )
return( FALSE );
}
// CHRISL: Certain vehicles now have different valid sectors so we don't want to allow try to path for two different vehicles
if ( iVehicle1Id != iVehicle2Id )
{
return( FALSE );
}
pVehicle1 = &( pVehicleList[ iVehicle1Id ] );
pVehicle2 = &( pVehicleList[ iVehicle2Id ] );
+7 -5
View File
@@ -22,6 +22,9 @@ typedef struct FASTHELPREGION {
} FASTHELPREGION;
extern UINT8 FIRSTmercTOdisplay ;
extern UINT8 maxNumberOfMercVisibleInStrategyList;
// String Lengths Defines
#define MAX_NAME_LENGTH 10
#define MAX_LOCATION_SIZE 8
@@ -232,11 +235,6 @@ enum{
#define TACT_UPDATE_MERC_Y_OFFSET 4
#define TACT_UPDATE_MERC_X_OFFSET 4
// WDS - make number of mercenaries, etc. be configurable
// the first vehicle slot in the list
#define FIRST_VEHICLE CODE_MAXIMUM_NUMBER_OF_PLAYER_MERCS
class OLD_MERC_LEAVE_ITEM_101
{
public:
@@ -510,6 +508,10 @@ INT32 GetNumberOfPeopleInCharacterList( void );
void GoToPrevCharacterInList( void );
void GoToNextCharacterInList( void );
// WANNE: Go to first/last character in list (PageUp/PageDown)
void GoToFirstCharacterInList( void );
void GoToLastCharacterInList( void );
// this does the whole miner giving player info speil
//void HandleMinerEvent( UINT8 bMinerNumber, INT16 sSectorX, INT16 sSectorY, INT16 sQuoteNumber, BOOLEAN fForceMapscreen );
void HandleMinerEvent( UINT8 ubHeadMinerIndex, INT16 sSectorX, INT16 sSectorY, INT16 sQuoteNumber, BOOLEAN fForceMapscreen );
+1 -1
View File
@@ -222,7 +222,7 @@ BOOLEAN SetThisSectorAsPlayerControlled( INT16 sMapX, INT16 sMapY, INT8 bMapZ, B
//If the player has been to Bobbyr when it was down, and we havent already sent email, send him an email
if( LaptopSaveInfo.ubHaveBeenToBobbyRaysAtLeastOnceWhileUnderConstruction == BOBBYR_BEEN_TO_SITE_ONCE && LaptopSaveInfo.ubHaveBeenToBobbyRaysAtLeastOnceWhileUnderConstruction != BOBBYR_ALREADY_SENT_EMAIL )
{
AddEmail( BOBBYR_NOW_OPEN, BOBBYR_NOW_OPEN_LENGTH, BOBBY_R, GetWorldTotalMin(), -1);
AddEmail( BOBBYR_NOW_OPEN, BOBBYR_NOW_OPEN_LENGTH, BOBBY_R, GetWorldTotalMin(), -1, -1);
LaptopSaveInfo.ubHaveBeenToBobbyRaysAtLeastOnceWhileUnderConstruction = BOBBYR_ALREADY_SENT_EMAIL;
}
}
+12 -1
View File
@@ -234,7 +234,7 @@ void ValidateAndCorrectInBattleCounters( GROUP *pLocGroup )
if( ubInvalidGroups || pSector->ubAdminsInBattle || pSector->ubTroopsInBattle || pSector->ubElitesInBattle || pSector->ubCreaturesInBattle )
{
CHAR16 str[ 512 ];
swprintf( str, L"Strategic info warning: Sector 'in battle' counters are not clear when they should be. "
swprintf( str, L"Strategic info warning: Sector 'in battle' counters are not clear when they should be. "
L"If you can provide information on how a previous battle was resolved here or nearby patrol "
L"(auto resolve, tactical battle, cheat keys, or retreat),"
L"please forward that info (no data files necessary) as well as the following code (very important): "
@@ -276,6 +276,17 @@ void InitPreBattleInterface( GROUP *pBattleGroup, BOOLEAN fPersistantPBI )
if( gfPreBattleInterfaceActive )
return;
//CHRISL: If for some reason we're not looking at a valid sector, leave the preBattleInterface.
if( pBattleGroup != NULL && (pBattleGroup->ubSectorX < MINIMUM_VALID_X_COORDINATE ||
pBattleGroup->ubSectorX > MAXIMUM_VALID_X_COORDINATE ||
pBattleGroup->ubSectorY < MINIMUM_VALID_Y_COORDINATE ||
pBattleGroup->ubSectorY > MAXIMUM_VALID_Y_COORDINATE ||
pBattleGroup->ubSectorZ < MINIMUM_VALID_Z_COORDINATE ||
pBattleGroup->ubSectorZ > MAXIMUM_VALID_Z_COORDINATE) )
{
return;
}
gfPersistantPBI = fPersistantPBI;
if( gfPersistantPBI )
+15 -16
View File
@@ -246,6 +246,7 @@ UINT8 NumEnemiesInSector( INT16 sSectorX, INT16 sSectorY )
UINT8 NumStationaryEnemiesInSector( INT16 sSectorX, INT16 sSectorY )
{
SECTORINFO *pSector;
AssertGE( sSectorX, MINIMUM_VALID_X_COORDINATE);
AssertLE( sSectorX, MAXIMUM_VALID_X_COORDINATE );
AssertGE( sSectorY, MINIMUM_VALID_Y_COORDINATE);
@@ -257,9 +258,9 @@ UINT8 NumStationaryEnemiesInSector( INT16 sSectorX, INT16 sSectorY )
return( 0 );
}
Ensure_RepairedGarrisonGroup( &gGarrisonGroup, &giGarrisonArraySize ); /* added NULL fix, 2007-03-03, Sgt. Kolja */
Ensure_RepairedGarrisonGroup( &gGarrisonGroup, &giGarrisonArraySize ); /* added NULL fix, 2007-03-03, Sgt. Kolja */
// don't count roadblocks as stationary garrison, we want to see how many enemies are in them, not question marks
// don't count roadblocks as stationary garrison, we want to see how many enemies are in them, not question marks
if ( gGarrisonGroup[ pSector->ubGarrisonID ].ubComposition == ROADBLOCK )
{
// pretend they're not stationary
@@ -1917,11 +1918,10 @@ void EndCaptureSequence( )
void EnemyCapturesPlayerSoldier( SOLDIERTYPE *pSoldier )
{
UINT32 i;
BOOLEAN fMadeCorpse;
INT32 iNumEnemiesInSector;
BOOLEAN fMadeCorpse;
INT32 iNumEnemiesInSector;
// TODO.WANNE: Hardcoded grid number
// TODO.WANNE: Hardcoded grid number
static INT32 sAlmaCaptureGridNos[] = { 9208, 9688, 9215 }; //dnl!!!
static INT32 sAlmaCaptureItemsGridNo[] = { 12246, 12406, 13046 }; //dnl!!!
@@ -1929,19 +1929,18 @@ void EnemyCapturesPlayerSoldier( SOLDIERTYPE *pSoldier )
AssertNotNIL(pSoldier);
// ATE: Check first if ! in player captured sequence already
// ATE: Check first if ! in player captured sequence already
// CJC Dec 1 2002: fixing multiple captures
if ( ( gStrategicStatus.uiFlags & STRATEGIC_PLAYER_CAPTURED_FOR_RESCUE ) && (gStrategicStatus.uiFlags & STRATEGIC_PLAYER_CAPTURED_FOR_ESCAPE) )
{
return;
}
{
return;
}
// ATE: If maximum prisoners captured, return!
if ( gStrategicStatus.ubNumCapturedForRescue > 3 )
{
return;
}
// ATE: If maximum prisoners captured, return!
if ( gStrategicStatus.ubNumCapturedForRescue > 3 )
{
return;
}
// If this is an EPC , just kill them...
+5 -1
View File
@@ -783,7 +783,7 @@ BOOLEAN CheckFact( UINT16 usFact, UINT8 ubProfileID )
break;
/*
case FACT_SKYRIDER_CLOSE_TO_CHOPPER:
SetUpHelicopterForPlayer( 13, MAP_ROW_B );
SetUpHelicopterForPlayer( 13, MAP_ROW_B , SKYRIDER );
break;
*/
case FACT_SPIKE_AT_DOOR:
@@ -1121,6 +1121,10 @@ BOOLEAN CheckFact( UINT16 usFact, UINT8 ubProfileID )
gubFact[usFact] = ItemTypeExistsAtLocation( 10472, ROCKET_RIFLE, 0, NULL );
break;
case FACT_PABLO_ALIVE:
gubFact[usFact] = gMercProfiles[ PABLO ].bMercStatus != MERC_IS_DEAD;
break;
case FACT_DOREEN_ALIVE:
gubFact[usFact] = gMercProfiles[ DOREEN ].bMercStatus != MERC_IS_DEAD;
break;
+7 -7
View File
@@ -985,8 +985,8 @@ void ValidatePlayersAreInOneGroupOnly()
pGroup = GetGroup( pSoldier->ubGroupID );
Assert( pGroup );
Assert( pOtherGroup );
swprintf( str, L"%s in %c%d thinks he/she is in group %d in %c%d but isn't. "
L"Group %d in %c%d thinks %s is in the group but isn't. %s will be assigned to a unique squad. "
swprintf( str, L"%s in %c%d thinks he/she is in group %d in %c%d but isn't. "
L"Group %d in %c%d thinks %s is in the group but isn't. %s will be assigned to a unique squad. "
L"Please send screenshot, PRIOR save (corrected by time you read this), and any theories.",
pSoldier->name, pSoldier->sSectorY + 'A' - 1, pSoldier->sSectorX,
pSoldier->ubGroupID, pGroup->ubSectorY + 'A' - 1, pGroup->ubSectorX,
@@ -1029,9 +1029,9 @@ void ValidatePlayersAreInOneGroupOnly()
Assert( pGroup );
Assert( pOtherGroup );
swprintf( str, L"%s in %c%d has been found in multiple groups. The group he/she is supposed "
L"to be in is group %d in %c%d, but %s was also found to be in group %d in %c%d. %s was found in %d groups "
L"total. Please send screenshot, PRIOR save (corrected by time you read this), and any theories.",
swprintf( str, L"%s in %c%d has been found in multiple groups. The group he/she is supposed "
L"to be in is group %d in %c%d, but %s was also found to be in group %d in %c%d. %s was found in %d groups "
L"total. Please send screenshot, PRIOR save (corrected by time you read this), and any theories.",
pSoldier->name, pSoldier->sSectorY + 'A' - 1, pSoldier->sSectorX,
pGroup->ubGroupID, pGroup->ubSectorY + 'A' - 1, pGroup->ubSectorX,
pSoldier->name, pOtherGroup->ubGroupID, pOtherGroup->ubSectorY + 'A' - 1, pOtherGroup->ubSectorX,
@@ -1040,8 +1040,8 @@ void ValidatePlayersAreInOneGroupOnly()
else if( !iGroups )
{ //The merc cannot be found in any group! This should never happen! We will assign the merc into his
//own unique squad as a correction.
swprintf( str, L"%s in %c%d cannot be found in any group. %s will be assigned to a unique group/squad. "
L"Please provide details on how you think this may have happened. Send screenshot and PRIOR save. Do not send a save "
swprintf( str, L"%s in %c%d cannot be found in any group. %s will be assigned to a unique group/squad. "
L"Please provide details on how you think this may have happened. Send screenshot and PRIOR save. Do not send a save "
L"you create after this point as the info will have been corrected by then.",
pSoldier->name, pSoldier->sSectorY + 'A' - 1, pSoldier->sSectorX, pSoldier->name );
}
+2 -2
View File
@@ -687,7 +687,7 @@ void HandleNPCSystemEvent( UINT32 uiEvent )
{
// KP knows money is gone, hasn't told player, if this event is called then the 2
// days are up... send email
AddEmail( KING_PIN_LETTER, KING_PIN_LETTER_LENGTH, KING_PIN, GetWorldTotalMin(), -1 );
AddEmail( KING_PIN_LETTER, KING_PIN_LETTER_LENGTH, KING_PIN, GetWorldTotalMin(), -1, -1 );
StartQuest( QUEST_KINGPIN_MONEY, 5, MAP_ROW_D );
// add event to send terrorists two days from now
AddFutureDayStrategicEvent( EVENT_SET_BY_NPC_SYSTEM, Random( 120 ), FACT_KINGPIN_KNOWS_MONEY_GONE, 2 );
@@ -786,7 +786,7 @@ void HandleNPCSystemEvent( UINT32 uiEvent )
break;
case NPC_ACTION_SEND_ENRICO_MIGUEL_EMAIL:
AddEmail( ENRICO_MIGUEL, ENRICO_MIGUEL_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1 );
AddEmail( ENRICO_MIGUEL, ENRICO_MIGUEL_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1 );
break;
case NPC_ACTION_TIMER_FOR_VEHICLE:
+19 -5
View File
@@ -469,15 +469,29 @@ void MercDailyUpdate()
if (cnt < 170)
{
// TO DO: send E-mail to player telling him the merc has returned from an assignment
AddEmail( ( UINT8 )( iOffset + ( cnt * AIM_REPLY_LENGTH_BARRY ) ), AIM_REPLY_LENGTH_BARRY, ( UINT8 )( 6 + cnt ), GetWorldTotalMin(), -1 );
AddEmail( ( UINT8 )( iOffset + ( cnt * AIM_REPLY_LENGTH_BARRY ) ), AIM_REPLY_LENGTH_BARRY, ( UINT8 )( 6 + cnt ), GetWorldTotalMin(), -1, -1 );
}
else
{
UINT16 iMsgLength = cnt;
UINT8 sender = cnt - 119; // SenderNameList.xml
// Wildfire mercs
if (cnt < 178)
{
UINT16 iMsgLength = cnt;
UINT8 sender = cnt - 119; // SenderNameList.xml
// Fake Barry Unger mail, but with the msgLength of the WF merc ID -> Correct in PreProcessEmail()
AddEmailWFMercLevelUp( ( UINT8 )( iOffset + 0 * AIM_REPLY_LENGTH_BARRY ), iMsgLength, sender, GetWorldTotalMin(), -1 );
// Fake Barry Unger mail, but with the msgLength of the WF merc ID -> Correct in PreProcessEmail()
AddEmailWFMercAvailable( ( UINT8 )( iOffset + 0 * AIM_REPLY_LENGTH_BARRY ), iMsgLength, sender, GetWorldTotalMin(), -1 );
}
// Generic mail
else
{
// TODO.RW: Send generic mail
UINT16 iMsgLength = cnt;
UINT8 sender = cnt - 119; // SenderNameList.xml
// Fake Barry Unger mail, but with the msgLength of the WF merc ID -> Correct in PreProcessEmail()
AddEmailWFMercAvailable( ( UINT8 )( iOffset + 0 * AIM_REPLY_LENGTH_BARRY ), iMsgLength, sender, GetWorldTotalMin(), -1 );
}
}
// WANNE: Should we stop time compression. I don't know.
+33 -41
View File
@@ -4485,16 +4485,16 @@ BOOLEAN GroupWillMoveThroughSector( GROUP *pGroup, UINT8 ubSectorX, UINT8 ubSect
dy = wp->y - pGroup->ubSectorY;
if( dx && dy )
{ //Can't move diagonally!
AssertMsg( 0, String( "GroupWillMoveThroughSector() -- Attempting to process waypoint in a diagonal direction from sector %c%d to sector %c%d for group at sector %c%d -- KM:0",
pGroup->ubSectorY + 'A', pGroup->ubSectorX, wp->y + 'A' - 1, wp->x, ubOrigY + 'A' - 1, ubOrigX ) );
//AssertMsg( 0, String( "GroupWillMoveThroughSector() -- Attempting to process waypoint in a diagonal direction from sector %c%d to sector %c%d for group at sector %c%d -- KM:0",
// pGroup->ubSectorY + 'A', pGroup->ubSectorX, wp->y + 'A' - 1, wp->x, ubOrigY + 'A' - 1, ubOrigX ) );
pGroup->ubSectorX = ubOrigX;
pGroup->ubSectorY = ubOrigY;
return TRUE;
}
if( !dx && !dy ) //Can't move to position currently at!
{
AssertMsg( 0, String( "GroupWillMoveThroughSector() -- Attempting to process same waypoint at %c%d for group at %c%d -- KM:0",
wp->y + 'A' - 1, wp->x, ubOrigY + 'A' - 1, ubOrigX ) );
//AssertMsg( 0, String( "GroupWillMoveThroughSector() -- Attempting to process same waypoint at %c%d for group at %c%d -- KM:0",
// wp->y + 'A' - 1, wp->x, ubOrigY + 'A' - 1, ubOrigX ) );
pGroup->ubSectorX = ubOrigX;
pGroup->ubSectorY = ubOrigY;
return TRUE;
@@ -4859,7 +4859,7 @@ BOOLEAN TestForBloodcatAmbush( GROUP *pGroup )
// SANDRO - STOMP traits - Scouting prevents the ambush of bloodcats
BOOLEAN fBloodCatAmbushPrevented = FALSE;
// The player has entered the lair
if(( PlacementType == BLOODCAT_PLACEMENT_LAIR )&& !gubFact[ FACT_PLAYER_KNOWS_ABOUT_BLOODCAT_LAIR ] )
if(( PlacementType == BLOODCAT_PLACEMENT_LAIR )) // Default: Sector I16
{
// We know about the lair
if( gubFact[ FACT_PLAYER_KNOWS_ABOUT_BLOODCAT_LAIR ] )
@@ -4877,7 +4877,6 @@ BOOLEAN TestForBloodcatAmbush( GROUP *pGroup )
fBloodCatAmbushPrevented = TRUE;
gubEnemyEncounterCode = ENTERING_BLOODCAT_LAIR_CODE;
gubFact[ FACT_PLAYER_KNOWS_ABOUT_BLOODCAT_LAIR ] = TRUE;
}
else
{
@@ -4896,7 +4895,6 @@ BOOLEAN TestForBloodcatAmbush( GROUP *pGroup )
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, New113Message[MSG113_BLOODCATS_AMBUSH_PREVENTED] );
fBloodCatAmbushPrevented = TRUE;
gubEnemyEncounterCode = NO_ENCOUNTER_CODE;
}
else
@@ -5190,47 +5188,41 @@ BOOLEAN WildernessSectorWithAllProfiledNPCsNotSpokenWith( INT16 sSectorX, INT16
for ( ubProfile = 0; ubProfile < NUM_PROFILES; ubProfile++ )
{
if ( gProfilesRPC[ubProfile].ProfilId == ubProfile || gProfilesNPC[ubProfile].ProfilId == ubProfile || gProfilesVehicle[ubProfile].ProfilId == ubProfile)
{
pProfile = &gMercProfiles[ ubProfile ];
// skip stiffs
if ( ( pProfile->bMercStatus == MERC_IS_DEAD ) || ( pProfile->bLife <= 0 ) )
if ( gProfilesRPC[ubProfile].ProfilId == ubProfile || gProfilesNPC[ubProfile].ProfilId == ubProfile || gProfilesVehicle[ubProfile].ProfilId == ubProfile)
{
continue;
}
pProfile = &gMercProfiles[ ubProfile ];
// skip vehicles
//if ( ubProfile >= PROF_HUMMER && ubProfile <= PROF_HELICOPTER )
if ( gProfilesVehicle[ubProfile].ProfilId == ubProfile )
{
continue;
}
// in this sector?
if ( pProfile->sSectorX == sSectorX && pProfile->sSectorY == sSectorY && pProfile->bSectorZ == bSectorZ )
{
// if we haven't talked to him yet, and he's not currently recruired/escorted by player (!)
if ( ( pProfile->ubLastDateSpokenTo == 0 ) &&
!(pProfile->ubMiscFlags & (PROFILE_MISC_FLAG_RECRUITED | PROFILE_MISC_FLAG_EPCACTIVE) ) )
// skip stiffs
if ( ( pProfile->bMercStatus == MERC_IS_DEAD ) || ( pProfile->bLife <= 0 ) )
{
// then this is a guy we need to stop for...
fFoundSomebody = TRUE;
continue;
}
else
// skip vehicles
//if ( ubProfile >= PROF_HUMMER && ubProfile <= PROF_HELICOPTER )
if ( gProfilesVehicle[ubProfile].ProfilId == ubProfile )
{
// already spoke to this guy, don't prompt about this sector again, regardless of status of other NPCs here
// (although Hamous wanders around, he never shares the same wilderness sector as other important NPCs)
return( FALSE );
continue;
}
// in this sector?
if ( pProfile->sSectorX == sSectorX && pProfile->sSectorY == sSectorY && pProfile->bSectorZ == bSectorZ )
{
// if we haven't talked to him yet, and he's not currently recruired/escorted by player (!)
if ( ( pProfile->ubLastDateSpokenTo == 0 ) &&
!(pProfile->ubMiscFlags & (PROFILE_MISC_FLAG_RECRUITED | PROFILE_MISC_FLAG_EPCACTIVE) ) )
{
// then this is a guy we need to stop for...
fFoundSomebody = TRUE;
}
else
{
// already spoke to this guy, don't prompt about this sector again, regardless of status of other NPCs here
// (although Hamous wanders around, he never shares the same wilderness sector as other important NPCs)
return( FALSE );
}
}
}
}
else
{
return( FALSE );
}
}
return( fFoundSomebody );
+9 -9
View File
@@ -211,7 +211,7 @@ void HandleEnricoEmail(void)
// if creatures have attacked a mine (doesn't care if they're still there or not at the moment)
if (HasAnyMineBeenAttackedByMonsters() && !(gStrategicStatus.usEnricoEmailFlags & ENRICO_EMAIL_SENT_CREATURES))
{
AddEmail(ENRICO_CREATURES, ENRICO_CREATURES_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1);
AddEmail(ENRICO_CREATURES, ENRICO_CREATURES_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1);
gStrategicStatus.usEnricoEmailFlags |= ENRICO_EMAIL_SENT_CREATURES;
return; // avoid any other E-mail at the same time
}
@@ -219,21 +219,21 @@ void HandleEnricoEmail(void)
if ((ubCurrentProgress >= SOME_PROGRESS_THRESHOLD) && !(gStrategicStatus.usEnricoEmailFlags & ENRICO_EMAIL_SENT_SOME_PROGRESS))
{
AddEmail(ENRICO_PROG_20, ENRICO_PROG_20_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1);
AddEmail(ENRICO_PROG_20, ENRICO_PROG_20_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1);
gStrategicStatus.usEnricoEmailFlags |= ENRICO_EMAIL_SENT_SOME_PROGRESS;
return; // avoid any setback E-mail at the same time
}
if ((ubCurrentProgress >= ABOUT_HALFWAY_THRESHOLD) && !(gStrategicStatus.usEnricoEmailFlags & ENRICO_EMAIL_SENT_ABOUT_HALFWAY))
{
AddEmail(ENRICO_PROG_55, ENRICO_PROG_55_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1);
AddEmail(ENRICO_PROG_55, ENRICO_PROG_55_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1);
gStrategicStatus.usEnricoEmailFlags |= ENRICO_EMAIL_SENT_ABOUT_HALFWAY;
return; // avoid any setback E-mail at the same time
}
if ((ubCurrentProgress >= NEARLY_DONE_THRESHOLD) && !(gStrategicStatus.usEnricoEmailFlags & ENRICO_EMAIL_SENT_NEARLY_DONE))
{
AddEmail(ENRICO_PROG_80, ENRICO_PROG_80_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1);
AddEmail(ENRICO_PROG_80, ENRICO_PROG_80_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1);
gStrategicStatus.usEnricoEmailFlags |= ENRICO_EMAIL_SENT_NEARLY_DONE;
return; // avoid any setback E-mail at the same time
}
@@ -243,7 +243,7 @@ void HandleEnricoEmail(void)
(((ubHighestProgress - ubCurrentProgress) >= MINOR_SETBACK_THRESHOLD) && (gStrategicStatus.usEnricoEmailFlags & ENRICO_EMAIL_FLAG_SETBACK_OVER))) &&
!(gStrategicStatus.usEnricoEmailFlags & ENRICO_EMAIL_SENT_MAJOR_SETBACK))
{
AddEmail(ENRICO_SETBACK, ENRICO_SETBACK_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1);
AddEmail(ENRICO_SETBACK, ENRICO_SETBACK_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1);
gStrategicStatus.usEnricoEmailFlags |= ENRICO_EMAIL_SENT_MAJOR_SETBACK;
}
else
@@ -251,7 +251,7 @@ void HandleEnricoEmail(void)
if (((ubHighestProgress - ubCurrentProgress) >= MINOR_SETBACK_THRESHOLD) &&
!(gStrategicStatus.usEnricoEmailFlags & (ENRICO_EMAIL_SENT_MINOR_SETBACK | ENRICO_EMAIL_SENT_MAJOR_SETBACK)))
{
AddEmail(ENRICO_SETBACK_2, ENRICO_SETBACK_2_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1);
AddEmail(ENRICO_SETBACK_2, ENRICO_SETBACK_2_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1);
gStrategicStatus.usEnricoEmailFlags |= ENRICO_EMAIL_SENT_MINOR_SETBACK;
}
else
@@ -314,15 +314,15 @@ void HandleEnricoEmail(void)
switch( bComplaint )
{
case 3:
AddEmail(LACK_PLAYER_PROGRESS_3, LACK_PLAYER_PROGRESS_3_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1);
AddEmail(LACK_PLAYER_PROGRESS_3, LACK_PLAYER_PROGRESS_3_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1);
gStrategicStatus.usEnricoEmailFlags |= ENRICO_EMAIL_SENT_LACK_PROGRESS3;
break;
case 2:
AddEmail(LACK_PLAYER_PROGRESS_2, LACK_PLAYER_PROGRESS_2_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1);
AddEmail(LACK_PLAYER_PROGRESS_2, LACK_PLAYER_PROGRESS_2_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1);
gStrategicStatus.usEnricoEmailFlags |= ENRICO_EMAIL_SENT_LACK_PROGRESS2;
break;
default:
AddEmail(LACK_PLAYER_PROGRESS_1, LACK_PLAYER_PROGRESS_1_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1);
AddEmail(LACK_PLAYER_PROGRESS_1, LACK_PLAYER_PROGRESS_1_LENGTH, MAIL_ENRICO, GetWorldTotalMin(), -1, -1);
gStrategicStatus.usEnricoEmailFlags |= ENRICO_EMAIL_SENT_LACK_PROGRESS1;
break;
+5 -5
View File
@@ -39,7 +39,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D &quot;_CRT_SECURE_NO_DEPRECATE&quot;"
AdditionalOptions="/D _CRT_SECURE_NO_DEPRECATE"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;"
@@ -104,7 +104,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D &quot;_CRT_SECURE_NO_DEPRECATE&quot;"
AdditionalOptions="/D _CRT_SECURE_NO_DEPRECATE"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;"
RuntimeLibrary="0"
@@ -165,7 +165,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D &quot;_CRT_SECURE_NO_DEPRECATE&quot;"
AdditionalOptions="/D _CRT_SECURE_NO_DEPRECATE"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;"
RuntimeLibrary="0"
@@ -226,7 +226,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D &quot;_CRT_SECURE_NO_DEPRECATE&quot;"
AdditionalOptions="/D _CRT_SECURE_NO_DEPRECATE"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;"
@@ -291,7 +291,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D &quot;_CRT_SECURE_NO_DEPRECATE&quot;"
AdditionalOptions="/D _CRT_SECURE_NO_DEPRECATE"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;"
+2 -1
View File
@@ -431,8 +431,9 @@ void StrategicRemoveMilitiaFromSector(INT16 sMapX, INT16 sMapY, UINT8 ubRank, UI
{
SECTORINFO *pSectorInfo = &( SectorInfo[ SECTOR( sMapX, sMapY ) ] );
// WANNE: BUGZILLA #357: Fixed assertion when miltia dies.
// damn well better have that many around to remove!
Assert(pSectorInfo->ubNumberOfCivsAtLevel[ ubRank ] >= ubHowMany);
//Assert(pSectorInfo->ubNumberOfCivsAtLevel[ ubRank ] >= ubHowMany);
//KM : July 21, 1999 patch fix
if( pSectorInfo->ubNumberOfCivsAtLevel[ ubRank ] < ubHowMany )
+208 -558
View File
File diff suppressed because it is too large Load Diff
+16 -4
View File
@@ -2928,13 +2928,16 @@ void UpdateMercInSector( SOLDIERTYPE *pSoldier, INT16 sSectorX, INT16 sSectorY,
// Are we in Omerta!
if ( sSectorX == gWorldSectorX && gWorldSectorX == 9 && sSectorY == gWorldSectorY && gWorldSectorY == 1 && bSectorZ == gbWorldSectorZ && gbWorldSectorZ == 0 )
{
// TODO.WANNE: Hardcoded grid number
// Try another location and walk into map
pSoldier->sInsertionGridNo = 4379;//dnl!!!
}
else
{
pSoldier->ubStrategicInsertionCode = INSERTION_CODE_NORTH;
pSoldier->sInsertionGridNo = gMapInformation.sNorthGridNo;
//pSoldier->ubStrategicInsertionCode = INSERTION_CODE_NORTH;
//pSoldier->sInsertionGridNo = gMapInformation.sNorthGridNo;
pSoldier->ubStrategicInsertionCode = INSERTION_CODE_GRIDNO;
pSoldier->sInsertionGridNo = gGameExternalOptions.iInitialMercArrivalLocation;
}
break;
case INSERTION_CODE_CHOPPER:
@@ -2945,6 +2948,7 @@ void UpdateMercInSector( SOLDIERTYPE *pSoldier, INT16 sSectorX, INT16 sSectorY,
return;
break;
default:
// TODO.WANNE: Hardcoded grid number
pSoldier->sInsertionGridNo = 12880;//dnl!!!
DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String( "Improper insertion code %d given to UpdateMercsInSector", pSoldier->ubStrategicInsertionCode ) );
break;
@@ -3705,8 +3709,16 @@ BEGINNING_LOOP:
{
if ( !OK_CONTROLLABLE_MERC( curr->pSoldier ) )
{
RemoveCharacterFromSquads( curr->pSoldier );
goto BEGINNING_LOOP;
if(OK_CONTROL_MERC(curr->pSoldier) && curr->pSoldier->bAssignment == VEHICLE && pGroup->fVehicle)
{
//CHRISL: passengers in a vehicle movement group will not pass the OK_CONTROLLABLE_MERC check because their assignment is not "ON_DUTY".
// The above conditions should allow passengers in a vehicle movement group to remain in the group.
}
else
{
RemoveCharacterFromSquads( curr->pSoldier );
goto BEGINNING_LOOP;
}
}
curr = curr->next;
}
+36 -4
View File
@@ -64,7 +64,8 @@ static UINT16 LobGrenadeStanceAnimationScript[MAX_FRAMES_PER_ANIM] = { 1,2,3,4,5
static UINT16 ROLL_L_AnimationScript[MAX_FRAMES_PER_ANIM] = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,501,999,0,0,0,0 };
static UINT16 ROLL_R_AnimationScript[MAX_FRAMES_PER_ANIM] = { 14,13,12,11,10,9,8,7,6,5,4,3,2,1,501,999,0,0,0,0 };
static UINT16 JUMP_WALL_UP_AnimationScript[MAX_FRAMES_PER_ANIM] = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,601,999,0,0,0,0 };
static UINT16 JUMP_WALL_DOWN_AnimationScript[MAX_FRAMES_PER_ANIM] = { 44,43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,601,999,0,0,0,0 };
@@ -979,6 +980,13 @@ ANIMCONTROLTYPE gAnimControl[ NUMANIMATIONSTATES ] =
//ROLL PRONE RIGHT
{"ROLL PRONE RIGHT" , 0, 80, (FLOAT)0.8 /*1.1*/, ANIM_MOVING | ANIM_NORESTART | ANIM_RAISE_WEAPON | ANIM_VARIABLE_EFFORT, ANIM_PRONE, ANIM_PRONE, -1},
// JUMPUPWALL
{"JUMPUPWALL" , 0, 30, (FLOAT)0, ANIM_NONINTERRUPT | ANIM_NORESTART | ANIM_STATIONARY | ANIM_NOSHOW_MARKER | ANIM_MODERATE_EFFORT | ANIM_LOWER_WEAPON, ANIM_STAND, ANIM_CROUCH, -1},
//JUMPDOWNWALL
{"JUMPDOWNWALL" , 0, 30, (FLOAT)0, ANIM_NONINTERRUPT | ANIM_NORESTART | ANIM_STATIONARY | ANIM_NOSHOW_MARKER | ANIM_MODERATE_EFFORT | ANIM_LOWER_WEAPON, ANIM_CROUCH, ANIM_STAND, -1},
{"JUMP WINDOWS" , 0, 50, (FLOAT)0, ANIM_NOCHANGE_PENDINGCOUNT | ANIM_NORESTART | ANIM_STATIONARY | ANIM_NOSHOW_MARKER | ANIM_MODERATE_EFFORT | ANIM_LOWER_WEAPON | ANIM_NONINTERRUPT, ANIM_STAND, ANIM_CROUCH, -1},
};
@@ -1376,7 +1384,10 @@ void InitAnimationSurfacesPerBodytype( )
gubAnimSurfaceIndex[ REGMALE ][ ROLL_PRONE_L ] = RGMROLL_PR;
gubAnimSurfaceIndex[ REGMALE ][ ROLL_PRONE_R ] = RGMROLL_PR;
gubAnimSurfaceIndex[ REGMALE ][ JUMPUPWALL ] = RGMWALLJUMP;
gubAnimSurfaceIndex[ REGMALE ][ JUMPDOWNWALL ] = RGMWALLJUMP;
gubAnimSurfaceIndex[ REGMALE ][ JUMPWINDOWS ] = RGMJUMPWINDOWS;
gubAnimSurfaceMidWaterSubIndex[ REGMALE ][ STANDING][0] = RGMWATER_R_STD;
gubAnimSurfaceMidWaterSubIndex[ REGMALE ][ WALKING ][0] = RGMWATER_R_WALK;
@@ -1747,6 +1758,11 @@ void InitAnimationSurfacesPerBodytype( )
//ïåðåêàò
gubAnimSurfaceIndex[ BIGMALE ][ ROLL_PRONE_L ] = BGMROLL_PR;
gubAnimSurfaceIndex[ BIGMALE ][ ROLL_PRONE_R ] = BGMROLL_PR;
gubAnimSurfaceIndex[ BIGMALE ][ JUMPUPWALL ] = BGMWALLJUMP;
gubAnimSurfaceIndex[ BIGMALE ][ JUMPDOWNWALL ] = BGMWALLJUMP;
gubAnimSurfaceIndex[ BIGMALE ][ JUMPWINDOWS ] = BGMJUMPWINDOWS;
gubAnimSurfaceItemSubIndex[ BIGMALE ][ STANDING ] = BGMPISTOLBREATH;
@@ -2135,7 +2151,11 @@ void InitAnimationSurfacesPerBodytype( )
//ïåðåêàò
gubAnimSurfaceIndex[ STOCKYMALE ][ ROLL_PRONE_L ] = RGMROLL_PR;
gubAnimSurfaceIndex[ STOCKYMALE ][ ROLL_PRONE_R ] = RGMROLL_PR;
gubAnimSurfaceIndex[ STOCKYMALE ][ JUMPUPWALL ] = RGMWALLJUMP;
gubAnimSurfaceIndex[ STOCKYMALE ][ JUMPDOWNWALL ] = RGMWALLJUMP;
gubAnimSurfaceIndex[ STOCKYMALE ][ JUMPWINDOWS ] = RGMJUMPWINDOWS;
gubAnimSurfaceItemSubIndex[ STOCKYMALE ][ STANDING ] = RGMPISTOLBREATH;
gubAnimSurfaceItemSubIndex[ STOCKYMALE ][ WALKING ] = RGMNOTHING_WALK;
@@ -2503,7 +2523,10 @@ void InitAnimationSurfacesPerBodytype( )
gubAnimSurfaceIndex[ REGFEMALE ][ ROLL_PRONE_L ] = RGFROLL_PR;
gubAnimSurfaceIndex[ REGFEMALE ][ ROLL_PRONE_R ] = RGFROLL_PR;
gubAnimSurfaceIndex[ REGFEMALE ][ JUMPUPWALL ] = RGFWALLJUMP;
gubAnimSurfaceIndex[ REGFEMALE ][ JUMPDOWNWALL ] = RGFWALLJUMP;
gubAnimSurfaceIndex[ REGFEMALE ][ JUMPWINDOWS ] = RGFJUMPWINDOWS;
gubAnimSurfaceItemSubIndex[ REGFEMALE ][ STANDING ] = RGFPISTOLBREATH;
gubAnimSurfaceItemSubIndex[ REGFEMALE ][ WALKING ] = RGFNOTHING_WALK;
@@ -3222,6 +3245,15 @@ BOOLEAN LoadAnimationStateInstructions( )
memcpy(gusAnimInst[ ROLL_PRONE_L ],ROLL_L_AnimationScript,sizeof(ROLL_L_AnimationScript));
memcpy(gusAnimInst[ ROLL_PRONE_R ],ROLL_R_AnimationScript,sizeof(ROLL_R_AnimationScript));
memcpy(gusAnimInst[JUMPUPWALL],fuckTheBoundz[32],sizeof(fuckTheBoundz[32])); // copy CLIMBROOF to JUMPUPWALL
memcpy(gusAnimInst[JUMPDOWNWALL],fuckTheBoundz[35],sizeof(fuckTheBoundz[35])); // copy CLIMBDOWNROOF to JUMPDOWNWALL
memcpy(gusAnimInst[JUMPWINDOWS],fuckTheBoundz[HOPFENCE],sizeof(fuckTheBoundz[HOPFENCE])); // copy HOPFENCE to JUMPDOWNWALL
//memcpy(gusAnimInst[ JUMPUPWALL ],JUMP_WALL_UP_AnimationScript,sizeof(JUMP_WALL_UP_AnimationScript));
//memcpy(gusAnimInst[ JUMPDOWNWALL ],JUMP_WALL_DOWN_AnimationScript,sizeof(JUMP_WALL_DOWN_AnimationScript));
return( TRUE );
}
+6
View File
@@ -554,6 +554,12 @@ enum AnimationStates
ROLL_PRONE_R,
ROLL_PRONE_L,
//jump wall
JUMPUPWALL,
JUMPDOWNWALL,
JUMPWINDOWS,
NUMANIMATIONSTATES
};
+9 -1
View File
@@ -502,7 +502,15 @@ AnimationSurfaceType gAnimSurfaceDatabase[ NUMANIMATIONSURFACETYPES ] =
RGMROLL_PR, "ANIMS\\S_MERC\\S_ROLL_N.STI", S_STRUCT, 0, 8, TO_INIT, NULL, NULL, 0, -1,
BGMROLL_PR, "ANIMS\\M_MERC\\M_ROLL_N.STI", S_STRUCT, 0, 8, TO_INIT, NULL, NULL, 0, -1,
RGFROLL_PR, "ANIMS\\F_MERC\\F_ROLL_N.STI", S_STRUCT, 0, 8, TO_INIT, NULL, NULL, 0, -1,
RGMWALLJUMP, "ANIMS\\S_MERC\\S_CLIMB.STI", S_STRUCT, 0, 4, TO_INIT, NULL, NULL, 0, -1,
BGMWALLJUMP, "ANIMS\\M_MERC\\M_CLIMB.STI", S_STRUCT, 0, 4, TO_INIT, NULL, NULL, 0, -1,
RGFWALLJUMP, "ANIMS\\F_MERC\\F_CLIMB.STI", S_STRUCT, 0, 4, TO_INIT, NULL, NULL, 0, -1,
RGMJUMPWINDOWS, "ANIMS\\S_MERC\\S_HOP.STI", NO_STRUCT, 0, 4, TO_INIT, NULL, NULL, 0, -1,
BGMJUMPWINDOWS, "ANIMS\\M_MERC\\M_HOP.STI", NO_STRUCT, 0, 4, TO_INIT, NULL, NULL, 0, -1,
RGFJUMPWINDOWS, "ANIMS\\F_MERC\\F_HOP.STI", NO_STRUCT, 0, 4, TO_INIT, NULL, NULL, 0, -1,
};
+9
View File
@@ -530,6 +530,15 @@ BGMWITHSTONE,
RGMROLL_PR,
BGMROLL_PR,
RGFROLL_PR,
RGMWALLJUMP,
BGMWALLJUMP,
RGFWALLJUMP,
//jump windows
RGMJUMPWINDOWS,
BGMJUMPWINDOWS,
RGFJUMPWINDOWS,
NUMANIMATIONSURFACETYPES
+9 -1
View File
@@ -14,6 +14,7 @@
#include "bobbyr.h"
#include "Random.h"
#include "Shopkeeper Interface.h"
#include "connect.h"
#endif
@@ -1184,7 +1185,14 @@ UINT8 DetermineInitialInvItems( INT8 bArmsDealerID, UINT16 usItemIndex, UINT8 ub
ubNumBought = 0;
for (ubCnt = 0; ubCnt < ubChances; ubCnt++)
{
if (ItemTransactionOccurs( bArmsDealerID, usItemIndex, DEALER_BUYING, fUsed))
if (!is_networked)
{
if (ItemTransactionOccurs( bArmsDealerID, usItemIndex, DEALER_BUYING, fUsed))
{
ubNumBought++;
}
}
else
{
ubNumBought++;
}
+1 -1
View File
@@ -383,7 +383,7 @@ BOOLEAN PickABoxer( void )
RESETTIMECOUNTER( pBoxer->timeCounters.AICounter, 0 );
gfBoxerFought[ uiLoop ] = TRUE;
// improve stats based on the # of rests these guys have had
pBoxer->stats.bStrength = __min( 100, pBoxer->stats.bStrength += gubBoxersRests * 5 );
pBoxer->stats.bStrength = __min( 100, pBoxer->stats.bStrength + gubBoxersRests * 5 );
pBoxer->stats.bDexterity = __min( 100, pBoxer->stats.bDexterity + gubBoxersRests * 5 );
pBoxer->stats.bAgility = __min( 100, pBoxer->stats.bAgility + gubBoxersRests * 5 );
pBoxer->stats.bLifeMax = __min( 100, pBoxer->stats.bLifeMax + gubBoxersRests * 5 );
+1 -1
View File
@@ -1866,5 +1866,5 @@ void MERCMercWentUpALevelSendEmail( UINT8 ubMercMercIdValue )
ubEmailOffset = MERC_UP_LEVEL_BIFF + MERC_UP_LEVEL_LENGTH_BIFF * ( ubMercMercIdValue );
}
AddEmail( ubEmailOffset, iMsgLength, SPECK_FROM_MERC, GetWorldTotalMin(), -1);
AddEmail( ubEmailOffset, iMsgLength, SPECK_FROM_MERC, GetWorldTotalMin(), -1, -1);
}
+23 -19
View File
@@ -1893,30 +1893,33 @@ BOOLEAN DialogueDataFileExistsForProfile( UINT8 ubCharacterNum, UINT16 usQuoteNu
BOOLEAN GetDialogue( UINT8 ubCharacterNum, UINT16 usQuoteNum, UINT32 iDataSize, STR16 zDialogueText, UINT32 *puiSoundID, CHAR8 *zSoundString )
{
STR8 pFilename;
BOOLEAN fTextAvailable = FALSE;
// first things first - grab the text (if player has SUBTITLE PREFERENCE ON)
//if ( gGameSettings.fOptions[ TOPTION_SUBTITLES ] )
{
if ( DialogueDataFileExistsForProfile( ubCharacterNum, 0, FALSE, &pFilename ) )
{
LoadEncryptedDataFromFile( pFilename, zDialogueText, usQuoteNum * iDataSize, iDataSize );
if(zDialogueText[0] == 0)
if ( DialogueDataFileExistsForProfile( ubCharacterNum, 0, FALSE, &pFilename ) )
{
swprintf( zDialogueText, L"I have no text in the EDT file ( %d ) %S", usQuoteNum, pFilename );
LoadEncryptedDataFromFile( pFilename, zDialogueText, usQuoteNum * iDataSize, iDataSize );
if(zDialogueText[0] == 0)
{
swprintf( zDialogueText, L"I have no text in the EDT file ( %d ) %S", usQuoteNum, pFilename );
#ifndef JA2BETAVERSION
return( FALSE );
#endif
}
else
fTextAvailable = TRUE;
}
else
{
swprintf( zDialogueText, L"I have no text in the file ( %d ) %S", usQuoteNum , pFilename );
#ifndef JA2BETAVERSION
return( FALSE );
#endif
}
}
else
{
swprintf( zDialogueText, L"I have no text in the file ( %d ) %S", usQuoteNum , pFilename );
#ifndef JA2BETAVERSION
return( FALSE );
#endif
}
}
@@ -1936,23 +1939,24 @@ BOOLEAN GetDialogue( UINT8 ubCharacterNum, UINT16 usQuoteNum, UINT32 iDataSize,
CHAR8 sString[512];
sprintf( sString, "ERROR: Missing file for character # %d, quote # %d", ubCharacterNum, usQuoteNum );
ShowCursor(TRUE);
ShowCursor(TRUE);
ShutdownWithErrorBox( sString );
ShowCursor(TRUE);
ShowCursor(TRUE);
ShutdownWithErrorBox( sString );
}
*/
//#endif
*puiSoundID = NO_SAMPLE;
// get speech if applicable
if ( gGameSettings.fOptions[ TOPTION_SPEECH ] )
{
// Load it into memory!
*puiSoundID = SoundLoadSample( pFilename );
}
return(TRUE);
return (*puiSoundID != NO_SAMPLE) || fTextAvailable;
}
+3 -2
View File
@@ -550,6 +550,7 @@ void DisplayRangeToTarget( SOLDIERTYPE *pSoldier, INT32 sTargetGridNo )
{
UINT16 usRange=0;
CHAR16 zOutputString[512];
UINT8 title = (UsingNewCTHSystem() == true ? DC_MSG__NCTH_GUN_RANGE_INFORMATION : DC_MSG__GUN_RANGE_INFORMATION);
if( sTargetGridNo == NOWHERE || sTargetGridNo == 0 )
{
@@ -595,13 +596,13 @@ void DisplayRangeToTarget( SOLDIERTYPE *pSoldier, INT32 sTargetGridNo )
// HEADROCK HAM 3.6: Calculate Gun Range using formula.
UINT16 usGunRange = GunRange(&pSoldier->inv[HANDPOS], pSoldier ); // SANDRO - added argument
swprintf( zOutputString, gzDisplayCoverText[DC_MSG__GUN_RANGE_INFORMATION], usRange / 10, usGunRange / 10, uiHitChance );
swprintf( zOutputString, gzDisplayCoverText[title], usRange / 10, usGunRange / 10, uiHitChance );
//Display the msg
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, zOutputString );
}
else
{
swprintf( zOutputString, gzDisplayCoverText[DC_MSG__GUN_RANGE_INFORMATION], usRange / 10, 0, 0 );
swprintf( zOutputString, gzDisplayCoverText[title], usRange / 10, 0, 0 );
//Display the msg
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, zOutputString );
+347 -37
View File
@@ -66,6 +66,9 @@ UINT8 ubRPCNumSmallFaceValues = 200;
CAMO_FACE gCamoFace[255];
FACE_GEAR_VALUES zNewFaceGear[MAXITEMS];
FACE_GEAR_VALUES zNewFaceGearIMP[MAXITEMS];
extern BOOLEAN gfSMDisableForItems;
extern INT16 gsCurInterfacePanel;
extern UINT16 gusSMCurrentMerc;
@@ -721,7 +724,73 @@ void SetAutoFaceInActive(INT32 iFaceIndex )
pFace->fDisabled = TRUE;
}
void SetCamoFace(SOLDIERTYPE * pSoldier)
{
INT8 worn = -1;
INT8 applied = -1;
INT16 wornCamo[4];
INT16 appliedCamo[4];
//reset gCamoFace
gCamoFace[pSoldier->ubProfile].gCamoface = FALSE;
gCamoFace[pSoldier->ubProfile].gUrbanCamoface = FALSE;
gCamoFace[pSoldier->ubProfile].gDesertCamoface = FALSE;
gCamoFace[pSoldier->ubProfile].gSnowCamoface = FALSE;
appliedCamo[0] = pSoldier->bCamo;
appliedCamo[1] = pSoldier->urbanCamo;
appliedCamo[2] = pSoldier->desertCamo;
appliedCamo[3] = pSoldier->snowCamo;
wornCamo[0] = pSoldier->wornCamo;
wornCamo[1] = pSoldier->wornUrbanCamo;
wornCamo[2] = pSoldier->wornDesertCamo;
wornCamo[3] = pSoldier->wornSnowCamo;
for(INT8 loop = 0; loop < 4; loop ++)
{
if(wornCamo[loop] > 50)
worn = loop;
if(appliedCamo[loop] > 50)
applied = loop;
}
if(applied != -1 && worn != -1)
{
if(appliedCamo[applied] >= wornCamo[worn])
{
if(applied == 0)
gCamoFace[pSoldier->ubProfile].gCamoface = TRUE;
if(applied == 1)
gCamoFace[pSoldier->ubProfile].gUrbanCamoface = TRUE;
if(applied == 2)
gCamoFace[pSoldier->ubProfile].gDesertCamoface = TRUE;
if(applied == 3)
gCamoFace[pSoldier->ubProfile].gSnowCamoface = TRUE;
}
else
{
if(worn == 0)
gCamoFace[pSoldier->ubProfile].gCamoface = TRUE;
if(worn == 1)
gCamoFace[pSoldier->ubProfile].gUrbanCamoface = TRUE;
if(worn == 2)
gCamoFace[pSoldier->ubProfile].gDesertCamoface = TRUE;
if(worn == 3)
gCamoFace[pSoldier->ubProfile].gSnowCamoface = TRUE;
}
}
else if(applied != -1 || worn != -1)
{
if(applied == 0 || worn == 0)
gCamoFace[pSoldier->ubProfile].gCamoface = TRUE;
if(applied == 1 || worn == 1)
gCamoFace[pSoldier->ubProfile].gUrbanCamoface = TRUE;
if(applied == 2 || worn == 2)
gCamoFace[pSoldier->ubProfile].gDesertCamoface = TRUE;
if(applied == 3 || worn == 3)
gCamoFace[pSoldier->ubProfile].gSnowCamoface = TRUE;
}
}
void SetAllAutoFacesInactive( )
{
@@ -1153,7 +1222,7 @@ BOOLEAN RenderAutoFaceFromSoldier( UINT8 ubSoldierID )
}
//---------------------------------------LEGION-------------------------------
/*
void GetXYForIconPlacement_legion( FACETYPE *pFace, UINT16 ubIndex, INT16 sFaceX, INT16 sFaceY, INT16 *psX, INT16 *psY )
{
INT16 sX, sY;
@@ -1174,7 +1243,8 @@ void GetXYForIconPlacement_legion( FACETYPE *pFace, UINT16 ubIndex, INT16 sFaceX
*psY = sY;
}
void GetXYForRightIconPlacement_legion_NV( FACETYPE *pFace, UINT16 ubIndex, INT16 sFaceX, INT16 sFaceY, INT16 *psX, INT16 *psY, INT8 bNumIcons )
void GetXYForRightIconPlacement_legion_NV( FACETYPE *pFace, UINT16 ubIndex, INT16 sFaceX, INT16 sFaceY, INT16 *psX, INT16 *psY, INT8 bNumIcons, BOOLEAN isIMP )
{
INT16 sX, sY;
UINT16 usWidth, usHeight;
@@ -1182,7 +1252,11 @@ void GetXYForRightIconPlacement_legion_NV( FACETYPE *pFace, UINT16 ubIndex, INT1
HVOBJECT hVObject;
// Get height, width of icon...
GetVideoObject( &hVObject, guiPORTRAITICONS_NV );
if (isIMP)
GetVideoObject( &hVObject, guiPORTRAITICONS_NV_IMP );
else
GetVideoObject( &hVObject, guiPORTRAITICONS_NV );
pTrav = &(hVObject->pETRLEObject[ ubIndex ] );
usHeight = pTrav->usHeight;
usWidth = pTrav->usWidth;
@@ -1193,16 +1267,21 @@ void GetXYForRightIconPlacement_legion_NV( FACETYPE *pFace, UINT16 ubIndex, INT1
*psX = sX;
*psY = sY;
}
void DoRightIcon_legion_NV( UINT32 uiRenderBuffer, FACETYPE *pFace, INT16 sFaceX, INT16 sFaceY, INT8 bNumIcons, UINT8 sIconIndex )
void DoRightIcon_legion_NV( UINT32 uiRenderBuffer, FACETYPE *pFace, INT16 sFaceX, INT16 sFaceY, INT8 bNumIcons, UINT8 sIconIndex, BOOLEAN isIMP )
{
INT16 sIconX, sIconY;
GetXYForRightIconPlacement_legion_NV( pFace, sIconIndex, sFaceX, sFaceY, &sIconX, &sIconY, bNumIcons );
BltVideoObjectFromIndex( uiRenderBuffer, guiPORTRAITICONS_NV, sIconIndex, sIconX, sIconY, VO_BLT_SRCTRANSPARENCY, NULL );
GetXYForRightIconPlacement_legion_NV( pFace, sIconIndex, sFaceX, sFaceY, &sIconX, &sIconY, bNumIcons, isIMP );
if (isIMP)
BltVideoObjectFromIndex( uiRenderBuffer, guiPORTRAITICONS_NV_IMP, sIconIndex, sIconX, sIconY, VO_BLT_SRCTRANSPARENCY, NULL );
else
BltVideoObjectFromIndex( uiRenderBuffer, guiPORTRAITICONS_NV, sIconIndex, sIconX, sIconY, VO_BLT_SRCTRANSPARENCY, NULL );
}
void GetXYForRightIconPlacement_legion_GAS_MASK( FACETYPE *pFace, UINT16 ubIndex, INT16 sFaceX, INT16 sFaceY, INT16 *psX, INT16 *psY, INT8 bNumIcons )
void GetXYForRightIconPlacement_legion_GAS_MASK( FACETYPE *pFace, UINT16 ubIndex, INT16 sFaceX, INT16 sFaceY, INT16 *psX, INT16 *psY, INT8 bNumIcons, BOOLEAN isIMP )
{
INT16 sX, sY;
UINT16 usWidth, usHeight;
@@ -1210,7 +1289,11 @@ void GetXYForRightIconPlacement_legion_GAS_MASK( FACETYPE *pFace, UINT16 ubIndex
HVOBJECT hVObject;
// Get height, width of icon...
GetVideoObject( &hVObject, guiPORTRAITICONS_GAS_MASK );
if (isIMP)
GetVideoObject( &hVObject, guiPORTRAITICONS_GAS_MASK_IMP );
else
GetVideoObject( &hVObject, guiPORTRAITICONS_GAS_MASK );
pTrav = &(hVObject->pETRLEObject[ ubIndex ] );
usHeight = pTrav->usHeight;
usWidth = pTrav->usWidth;
@@ -1221,16 +1304,61 @@ void GetXYForRightIconPlacement_legion_GAS_MASK( FACETYPE *pFace, UINT16 ubIndex
*psX = sX;
*psY = sY;
}
void DoRightIcon_legion_GAS_MASK( UINT32 uiRenderBuffer, FACETYPE *pFace, INT16 sFaceX, INT16 sFaceY, INT8 bNumIcons, UINT8 sIconIndex )
void DoRightIcon_legion_GAS_MASK( UINT32 uiRenderBuffer, FACETYPE *pFace, INT16 sFaceX, INT16 sFaceY, INT8 bNumIcons, UINT8 sIconIndex, BOOLEAN isIMP )
{
INT16 sIconX, sIconY;
// Find X, y for placement
GetXYForRightIconPlacement_legion_GAS_MASK( pFace, sIconIndex, sFaceX, sFaceY, &sIconX, &sIconY, bNumIcons, isIMP );
GetXYForRightIconPlacement_legion_GAS_MASK( pFace, sIconIndex, sFaceX, sFaceY, &sIconX, &sIconY, bNumIcons );
BltVideoObjectFromIndex( uiRenderBuffer, guiPORTRAITICONS_GAS_MASK, sIconIndex, sIconX, sIconY, VO_BLT_SRCTRANSPARENCY, NULL );
if (isIMP)
BltVideoObjectFromIndex( uiRenderBuffer, guiPORTRAITICONS_GAS_MASK_IMP, sIconIndex, sIconX, sIconY, VO_BLT_SRCTRANSPARENCY, NULL );
else
BltVideoObjectFromIndex( uiRenderBuffer, guiPORTRAITICONS_GAS_MASK, sIconIndex, sIconX, sIconY, VO_BLT_SRCTRANSPARENCY, NULL );
}
*/
void GetXYForRightIconPlacement_FaceGera( FACETYPE *pFace, UINT16 ubIndex, INT16 sFaceX, INT16 sFaceY, INT16 *psX, INT16 *psY, INT8 bNumIcons , UINT32 uIDFaceGear, BOOLEAN isIMP)
{
INT16 sX, sY;
UINT16 usWidth, usHeight;
ETRLEObject *pTrav;
HVOBJECT hVObject;
// Get height, width of icon...
if (isIMP)
GetVideoObject( &hVObject, zNewFaceGearIMP[uIDFaceGear].uiIndex );
else
GetVideoObject( &hVObject, zNewFaceGear[uIDFaceGear].uiIndex );
pTrav = &(hVObject->pETRLEObject[ ubIndex ] );
usHeight = pTrav->usHeight;
usWidth = pTrav->usWidth;
sX = sFaceX + ( usWidth * bNumIcons ) + 1;
sY = sFaceY + pFace->usFaceHeight - usHeight - 1;
*psX = sX;
*psY = sY;
}
void DoRightIcon_FaceGear( UINT32 uiRenderBuffer, FACETYPE *pFace, INT16 sFaceX, INT16 sFaceY, INT8 bNumIcons, UINT8 sIconIndex , UINT32 uIDFaceGear, BOOLEAN isIMP)
{
INT16 sIconX, sIconY;
// Find X, y for placement
if (isIMP)
{
GetXYForRightIconPlacement_FaceGera( pFace, sIconIndex, sFaceX, sFaceY, &sIconX, &sIconY, bNumIcons , uIDFaceGear,isIMP);
BltVideoObjectFromIndex( uiRenderBuffer, zNewFaceGearIMP[uIDFaceGear].uiIndex, sIconIndex, sIconX, sIconY, VO_BLT_SRCTRANSPARENCY, NULL );
}
else
{
GetXYForRightIconPlacement_FaceGera( pFace, sIconIndex, sFaceX, sFaceY, &sIconX, &sIconY, bNumIcons , uIDFaceGear,isIMP);
BltVideoObjectFromIndex( uiRenderBuffer, zNewFaceGear[uIDFaceGear].uiIndex, sIconIndex, sIconX, sIconY, VO_BLT_SRCTRANSPARENCY, NULL );
}
}
//----------------------------------------------------------------
@@ -1315,6 +1443,9 @@ void HandleRenderFaceAdjustments( FACETYPE *pFace, BOOLEAN fDisplayBuffer, BOOLE
UINT32 uiFaceItemOne=0;
UINT32 uiFaceItemTwo=0;
UINT8 ubFaceItemsCombined=0;
UINT32 uiFaceOne=0;
UINT32 uiFaceTwo=0;
// If we are using an extern buffer...
if ( fUseExternBuffer )
@@ -1478,10 +1609,21 @@ void HandleRenderFaceAdjustments( FACETYPE *pFace, BOOLEAN fDisplayBuffer, BOOLE
//------------------------------------Legion 2 by jazz--------------------------------
UINT8 faceProfileId = MercPtrs[ pFace->ubSoldierID ]->ubProfile;
BOOLEAN isIMP = FALSE;
//IMP
if ( gProfilesIMP[ MercPtrs[ pFace->ubSoldierID ]->ubProfile ].ProfilId == MercPtrs[ pFace->ubSoldierID ]->ubProfile )
{
faceProfileId = gMercProfiles[MercPtrs[ pFace->ubSoldierID ]->ubProfile].ubFaceIndex;
isIMP = TRUE;
}
// rewritten by silversurfer
// this section chooses the icons for face gear if the ini setting "SHOW_TACTICAL_FACE_ICONS" is TRUE
// and the merc actually wears something to be shown
if (gGameExternalOptions.fShowTacticalFaceIcons == TRUE && MercPtrs[ pFace->ubSoldierID ]->stats.bLife > 0 &&
if (gGameSettings.fOptions[ TOPTION_SHOW_TACTICAL_FACE_ICONS ] == TRUE && MercPtrs[ pFace->ubSoldierID ]->stats.bLife > 0 &&
( MercPtrs[ pFace->ubSoldierID ]->inv[HEAD1POS].usItem + MercPtrs[ pFace->ubSoldierID ]->inv[HEAD2POS].usItem ) > 0 )
{
uiFaceItemOne=MercPtrs[ pFace->ubSoldierID ]->inv[HEAD1POS].usItem;
@@ -1621,20 +1763,77 @@ void HandleRenderFaceAdjustments( FACETYPE *pFace, BOOLEAN fDisplayBuffer, BOOLE
}
}
if (gGameSettings.fOptions[ TOPTION_SHOW_TACTICAL_FACE_GEAR ] == TRUE && MercPtrs[ pFace->ubSoldierID ]->stats.bLife > 0 &&
( MercPtrs[ pFace->ubSoldierID ]->inv[HELMETPOS].usItem > 0 ) )
{
uiFaceItemOne=MercPtrs[ pFace->ubSoldierID ]->inv[HELMETPOS].usItem;
if ( uiFaceItemOne != NONE && zNewFaceGear[uiFaceItemOne].Type == 1 ) //back
{
DoRightIcon_FaceGear( uiRenderBuffer, pFace, sFaceX, sFaceY, bNumRightIcons_legion, faceProfileId ,uiFaceItemOne, isIMP);
}
}
// this section chooses the pictures for gas mask and NV goggles if the ini setting "SHOW_TACTICAL_FACE_GEAR" is TRUE
// and the merc actually wears something to be shown
if (gGameExternalOptions.fShowTacticalFaceGear == TRUE && MercPtrs[ pFace->ubSoldierID ]->stats.bLife > 0 &&
( MercPtrs[ pFace->ubSoldierID ]->inv[HEAD1POS].usItem + MercPtrs[ pFace->ubSoldierID ]->inv[HEAD2POS].usItem ) > 0 &&
// dirty hack for IMPs because they don't have pictures for face gear
( MercPtrs[ pFace->ubSoldierID ]->ubProfile < 51 || MercPtrs[ pFace->ubSoldierID ]->ubProfile > 56 ))
if (gGameSettings.fOptions[ TOPTION_SHOW_TACTICAL_FACE_GEAR ] == TRUE && MercPtrs[ pFace->ubSoldierID ]->stats.bLife > 0 &&
( MercPtrs[ pFace->ubSoldierID ]->inv[HEAD1POS].usItem + MercPtrs[ pFace->ubSoldierID ]->inv[HEAD2POS].usItem ) > 0 )
{
/*
BOOLEAN isIMP = FALSE;
UINT8 faceProfileId = MercPtrs[ pFace->ubSoldierID ]->ubProfile;
// WANNE: IMP: Special handling for face gear
if (MercPtrs[ pFace->ubSoldierID ]->ubProfile >= 51 && MercPtrs[ pFace->ubSoldierID ]->ubProfile <= 56)
{
// IMP: Imps anhand des FaceIndex rausfinden!!
faceProfileId = gMercProfiles[MercPtrs[ pFace->ubSoldierID ]->ubProfile].ubFaceIndex;
isIMP = TRUE;
}
*/
// WANNE: Removed the limitation
// silversurfer: don't overwrite icons if they shall be shown!
//if ( !gGameExternalOptions.fShowTacticalFaceIcons )
//if ( !gGameSettings.fOptions[ SHOW_TACTICAL_FACE_ICONS ] )
{
uiFaceItemOne=MercPtrs[ pFace->ubSoldierID ]->inv[HEAD1POS].usItem;
uiFaceItemTwo=MercPtrs[ pFace->ubSoldierID ]->inv[HEAD2POS].usItem;
uiFaceOne=MercPtrs[ pFace->ubSoldierID ]->inv[HEAD1POS].usItem;
uiFaceTwo=MercPtrs[ pFace->ubSoldierID ]->inv[HEAD2POS].usItem;
// check first face slot
if ( uiFaceItemOne != NONE )
{
if ( zNewFaceGear[uiFaceOne].Type == 3 )
{
uiFaceItemOne = 1;
}
else if ( zNewFaceGear[uiFaceOne].Type == 4 )
{
uiFaceItemOne = 2;
}
else uiFaceItemOne = 0;
}
// check second face slot
if ( uiFaceItemTwo != NONE )
{
if ( zNewFaceGear[uiFaceTwo].Type == 3 )
{
uiFaceItemTwo = 21;
}
else if ( zNewFaceGear[uiFaceTwo].Type == 4 )
{
uiFaceItemTwo = 42;
}
else uiFaceItemTwo = 0;
}
/*
// check first face slot
if ( uiFaceItemOne != NONE )
{
@@ -1678,7 +1877,8 @@ void HandleRenderFaceAdjustments( FACETYPE *pFace, BOOLEAN fDisplayBuffer, BOOLE
break;
}
}
*/
// Now select the correct picture. This uses a matrix from uiFaceOneItem and uiFaceTwoItem (simple addition)
// the numbers on the outer border are used if that is the only item worn in that slot
//
@@ -1698,12 +1898,102 @@ void HandleRenderFaceAdjustments( FACETYPE *pFace, BOOLEAN fDisplayBuffer, BOOLE
// silversurfer: we don't want to display icons for gas mask or NV goggles because you can actually see the merc wearing the gear
// in case of gas mask together with NV we display the picture of the item in face slot 1 and the icon of the item
// in face slot 2 (if icons are allowed)
//Type : 3 - gas mask ; 4 - NV googles
// gas mask only
if ( ubFaceItemsCombined == 1 || ubFaceItemsCombined == 21 )
{
if ( zNewFaceGear[uiFaceOne].Type == 3 )
{
DoRightIcon_FaceGear( uiRenderBuffer, pFace, sFaceX, sFaceY, bNumRightIcons_legion, faceProfileId ,uiFaceOne, isIMP);
}
else if ( zNewFaceGear[uiFaceTwo].Type == 3 )
{
DoRightIcon_FaceGear( uiRenderBuffer, pFace, sFaceX, sFaceY, bNumRightIcons_legion, faceProfileId ,uiFaceTwo, isIMP);
}
}
// NV goggles only
if ( ubFaceItemsCombined == 2 || ubFaceItemsCombined == 42 )
{
if ( zNewFaceGear[uiFaceOne].Type == 4 )
{
DoRightIcon_FaceGear( uiRenderBuffer, pFace, sFaceX, sFaceY, bNumRightIcons_legion, faceProfileId ,uiFaceOne, isIMP);
}
else if ( zNewFaceGear[uiFaceTwo].Type == 4 )
{
DoRightIcon_FaceGear( uiRenderBuffer, pFace, sFaceX, sFaceY, bNumRightIcons_legion, faceProfileId ,uiFaceTwo, isIMP);
}
}
// NV goggles + gas mask
if ( ubFaceItemsCombined == 23 )
{
if ( zNewFaceGear[uiFaceOne].Type == 4 && zNewFaceGear[uiFaceTwo].Type == 3 )
{
DoRightIcon_FaceGear( uiRenderBuffer, pFace, sFaceX, sFaceY, bNumRightIcons_legion, faceProfileId ,uiFaceTwo, isIMP);
DoRightIcon_FaceGear( uiRenderBuffer, pFace, sFaceX, sFaceY, bNumRightIcons_legion, faceProfileId ,uiFaceOne, isIMP);
}
}
// gas mask + NV goggles
if ( ubFaceItemsCombined == 43 )
{
if ( zNewFaceGear[uiFaceOne].Type == 3 && zNewFaceGear[uiFaceTwo].Type == 4 )
{
DoRightIcon_FaceGear( uiRenderBuffer, pFace, sFaceX, sFaceY, bNumRightIcons_legion, faceProfileId ,uiFaceOne, isIMP);
DoRightIcon_FaceGear( uiRenderBuffer, pFace, sFaceX, sFaceY, bNumRightIcons_legion, faceProfileId ,uiFaceTwo, isIMP);
}
}
// gas mask + extended ear
if ( ubFaceItemsCombined == 24 || ubFaceItemsCombined == 64 )
{
if ( zNewFaceGear[uiFaceOne].Type == 3 )
{
DoRightIcon_FaceGear( uiRenderBuffer, pFace, sFaceX, sFaceY, bNumRightIcons_legion, faceProfileId ,uiFaceOne, isIMP);
}
else if ( zNewFaceGear[uiFaceTwo].Type == 3 )
{
DoRightIcon_FaceGear( uiRenderBuffer, pFace, sFaceX, sFaceY, bNumRightIcons_legion, faceProfileId ,uiFaceTwo, isIMP);
}
}
// gas mask + extended ear
if ( ubFaceItemsCombined == 25 || ubFaceItemsCombined == 85 )
{
if ( zNewFaceGear[uiFaceOne].Type == 3 )
{
DoRightIcon_FaceGear( uiRenderBuffer, pFace, sFaceX, sFaceY, bNumRightIcons_legion, faceProfileId ,uiFaceOne, isIMP);
}
else if ( zNewFaceGear[uiFaceTwo].Type == 3 )
{
DoRightIcon_FaceGear( uiRenderBuffer, pFace, sFaceX, sFaceY, bNumRightIcons_legion, faceProfileId ,uiFaceTwo, isIMP);
}
}
// NV goggles + extended ear
if ( ubFaceItemsCombined == 46 || ubFaceItemsCombined == 86 )
{
if ( zNewFaceGear[uiFaceOne].Type == 4 )
{
DoRightIcon_FaceGear( uiRenderBuffer, pFace, sFaceX, sFaceY, bNumRightIcons_legion, faceProfileId ,uiFaceOne, isIMP);
}
else if ( zNewFaceGear[uiFaceTwo].Type == 4 )
{
DoRightIcon_FaceGear( uiRenderBuffer, pFace, sFaceX, sFaceY, bNumRightIcons_legion, faceProfileId ,uiFaceTwo, isIMP);
}
}
/*
switch( ubFaceItemsCombined )
{
// gas mask only
case 1:
case 21:
DoRightIcon_legion_GAS_MASK( uiRenderBuffer, pFace, sFaceX, sFaceY, bNumRightIcons_legion, MercPtrs[ pFace->ubSoldierID ]->ubProfile );
DoRightIcon_legion_GAS_MASK( uiRenderBuffer, pFace, sFaceX, sFaceY, bNumRightIcons_legion, faceProfileId, isIMP );
// WANNE: Removed silversurfers limitation, because it is too complex for the players :)
//fDoIcon = FALSE;
@@ -1712,7 +2002,7 @@ void HandleRenderFaceAdjustments( FACETYPE *pFace, BOOLEAN fDisplayBuffer, BOOLE
// NV goggles only
case 2:
case 42:
DoRightIcon_legion_NV( uiRenderBuffer, pFace, sFaceX, sFaceY, bNumRightIcons_legion, MercPtrs[ pFace->ubSoldierID ]->ubProfile );
DoRightIcon_legion_NV( uiRenderBuffer, pFace, sFaceX, sFaceY, bNumRightIcons_legion, faceProfileId, isIMP );
// WANNE: Removed silversurfers limitation, because it is too complex for the players :)
//fDoIcon = FALSE;
@@ -1720,32 +2010,33 @@ void HandleRenderFaceAdjustments( FACETYPE *pFace, BOOLEAN fDisplayBuffer, BOOLE
break;
// NV goggles + gas mask
case 23:
DoRightIcon_legion_NV( uiRenderBuffer, pFace, sFaceX, sFaceY, bNumRightIcons_legion, MercPtrs[ pFace->ubSoldierID ]->ubProfile );
DoRightIcon_legion_GAS_MASK( uiRenderBuffer, pFace, sFaceX, sFaceY, bNumRightIcons_legion, faceProfileId, isIMP );
DoRightIcon_legion_NV( uiRenderBuffer, pFace, sFaceX, sFaceY, bNumRightIcons_legion, faceProfileId, isIMP );
// WANNE: Removed silversurfers limitation, because it is too complex for the players :)
/*if ( gGameExternalOptions.fShowTacticalFaceIcons )
{
sIconIndex = 9;
fDoIcon = TRUE;
}*/
//if ( gGameSettings.fOptions[ SHOW_TACTICAL_FACE_ICONS ] )
//{
// sIconIndex = 9;
// fDoIcon = TRUE;
//}
break;
// gas mask + NV goggles
case 43:
DoRightIcon_legion_GAS_MASK( uiRenderBuffer, pFace, sFaceX, sFaceY, bNumRightIcons_legion, MercPtrs[ pFace->ubSoldierID ]->ubProfile );
DoRightIcon_legion_GAS_MASK( uiRenderBuffer, pFace, sFaceX, sFaceY, bNumRightIcons_legion, faceProfileId, isIMP );
DoRightIcon_legion_NV( uiRenderBuffer, pFace, sFaceX, sFaceY, bNumRightIcons_legion, faceProfileId, isIMP );
// WANNE: Removed silversurfers limitation, because it is too complex for the players :)
/*if ( gGameExternalOptions.fShowTacticalFaceIcons )
{
sIconIndex = 10;
fDoIcon = TRUE;
}*/
//if ( gGameSettings.fOptions[ SHOW_TACTICAL_FACE_ICONS ] )
//{
// sIconIndex = 10;
// fDoIcon = TRUE;
//}
break;
// gas mask + sun goggles
case 24:
case 64:
DoRightIcon_legion_GAS_MASK( uiRenderBuffer, pFace, sFaceX, sFaceY, bNumRightIcons_legion, MercPtrs[ pFace->ubSoldierID ]->ubProfile );
DoRightIcon_legion_GAS_MASK( uiRenderBuffer, pFace, sFaceX, sFaceY, bNumRightIcons_legion, faceProfileId, isIMP );
// WANNE: Removed silversurfers limitation, because it is too complex for the players :)
//sIconIndex = 15;
@@ -1755,7 +2046,7 @@ void HandleRenderFaceAdjustments( FACETYPE *pFace, BOOLEAN fDisplayBuffer, BOOLE
// gas mask + extended ear
case 25:
case 85:
DoRightIcon_legion_GAS_MASK( uiRenderBuffer, pFace, sFaceX, sFaceY, bNumRightIcons_legion, MercPtrs[ pFace->ubSoldierID ]->ubProfile );
DoRightIcon_legion_GAS_MASK( uiRenderBuffer, pFace, sFaceX, sFaceY, bNumRightIcons_legion, faceProfileId, isIMP );
// WANNE: Removed silversurfers limitation, because it is too complex for the players :)
//sIconIndex = 12;
@@ -1765,7 +2056,7 @@ void HandleRenderFaceAdjustments( FACETYPE *pFace, BOOLEAN fDisplayBuffer, BOOLE
// NV goggles + extended ear
case 46:
case 86:
DoRightIcon_legion_NV( uiRenderBuffer, pFace, sFaceX, sFaceY, bNumRightIcons_legion, MercPtrs[ pFace->ubSoldierID ]->ubProfile );
DoRightIcon_legion_NV( uiRenderBuffer, pFace, sFaceX, sFaceY, bNumRightIcons_legion, faceProfileId, isIMP );
// WANNE: Removed silversurfers limitation, because it is too complex for the players :)
//sIconIndex = 12;
@@ -1775,6 +2066,25 @@ void HandleRenderFaceAdjustments( FACETYPE *pFace, BOOLEAN fDisplayBuffer, BOOLE
default:
break;
}
*/
}
if (gGameSettings.fOptions[ TOPTION_SHOW_TACTICAL_FACE_GEAR ] == TRUE && MercPtrs[ pFace->ubSoldierID ]->stats.bLife > 0 &&
( MercPtrs[ pFace->ubSoldierID ]->inv[HELMETPOS].usItem > 0 )
// dirty hack for IMPs because they don't have pictures for face gear
/* && ( MercPtrs[ pFace->ubSoldierID ]->ubProfile < 51 || MercPtrs[ pFace->ubSoldierID ]->ubProfile > 56 ) */ )
{
uiFaceItemOne=MercPtrs[ pFace->ubSoldierID ]->inv[HELMETPOS].usItem;
if ( uiFaceItemOne != NONE )
{
if ( uiFaceItemOne != NONE && zNewFaceGear[uiFaceItemOne].Type == 2 ) //front
{
DoRightIcon_FaceGear( uiRenderBuffer, pFace, sFaceX, sFaceY, bNumRightIcons_legion, faceProfileId ,uiFaceItemOne, isIMP);
}
}
}
//------------------------------------end of tactical face gear-----------------------------
+22 -4
View File
@@ -455,7 +455,7 @@ INT32 HandleItem( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bLevel, UINT16 usHa
// temporarily set burst to true to calculate action points
pSoldier->bDoBurst = TRUE;
sAPCost = CalcTotalAPsToAttack( pSoldier, sTargetGridNo, TRUE, 0 );
sAPCost = CalcTotalAPsToAttack( pSoldier, sTargetGridNo, TRUE, pSoldier->aiData.bAimTime );
// reset burst mode to false (which is what it was at originally)
pSoldier->bDoBurst = FALSE;
@@ -545,7 +545,7 @@ INT32 HandleItem( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bLevel, UINT16 usHa
misfirePenalty = misfirePenaltyConst + (Chance(misfirePenaltyRand)?1:0); //apply the base integral cost and the fractional cost (in the form of probablilite)
pSoldier->bDoAutofire += misfirePenalty;
sAPCost = CalcTotalAPsToAttack( pSoldier, sTargetGridNo, TRUE, 0 );
sAPCost = CalcTotalAPsToAttack( pSoldier, sTargetGridNo, TRUE, pSoldier->aiData.bAimTime );
}
while(EnoughPoints( pSoldier, sAPCost, 0, FALSE ) && roll < ((pSoldier->inv[ pSoldier->ubAttackingHand ][0]->data.gun.ubGunShotsLeft >= pSoldier->bDoAutofire)?chanceToMisfire:chanceToMisfireDry));
//note that we could misfire more bullets than we have rounds
@@ -553,7 +553,7 @@ INT32 HandleItem( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bLevel, UINT16 usHa
//the max that can be lost this way is 1AP
pSoldier->bDoAutofire -= misfirePenalty;
sAPCost = CalcTotalAPsToAttack( pSoldier, sTargetGridNo, TRUE, 0 );
sAPCost = CalcTotalAPsToAttack( pSoldier, sTargetGridNo, TRUE, pSoldier->aiData.bAimTime );
if((__min(pSoldier->bDoAutofire,pSoldier->inv[ pSoldier->ubAttackingHand ][0]->data.gun.ubGunShotsLeft) - startAuto) > 0 && pSoldier->bTeam == OUR_TEAM)
{
@@ -673,6 +673,8 @@ INT32 HandleItem( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bLevel, UINT16 usHa
}
else
{
//CHRISL: Need to reset this as it doesn't automatically get reset when we don't have enough APs to shot
pSoldier->flags.fDoSpread = FALSE;
return( ITEM_HANDLE_NOAPS );
}
@@ -851,7 +853,11 @@ INT32 HandleItem( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bLevel, UINT16 usHa
}
}
if ( Item[usHandItem].wirecutters && pTargetSoldier == NULL ) // Madd: quick fix to allow wirecutter/knives
ROTTING_CORPSE *pCorpse = GetCorpseAtGridNo( sGridNo, pSoldier->pathing.bLevel );
BOOLEAN fCorpse = FALSE;
if(pCorpse != NULL)
fCorpse = IsValidDecapitationCorpse( pCorpse );
if ( Item[usHandItem].wirecutters && pTargetSoldier == NULL && !pCorpse ) // Madd: quick fix to allow wirecutter/knives
{
// See if we can get there to stab
sActionGridNo = FindAdjacentGridEx( pSoldier, sGridNo, &ubDirection, &sAdjustedGridNo, TRUE, FALSE );
@@ -1842,6 +1848,12 @@ void SoldierGetItemFromWorld( SOLDIERTYPE *pSoldier, INT32 iItemIndex, INT32 sGr
}
else
{
//CHRISL: Make sure non-ammo item status is a valid 0-100 number
if(Item[gWorldItems[pItemPool->iItemIndex].object.usItem].usItemClass != IC_AMMO){
gWorldItems[pItemPool->iItemIndex].object[0]->data.objectStatus = __max(0,gWorldItems[pItemPool->iItemIndex].object[0]->data.objectStatus);
gWorldItems[pItemPool->iItemIndex].object[0]->data.objectStatus = __min(100,gWorldItems[pItemPool->iItemIndex].object[0]->data.objectStatus);
}
// Make copy of item
gTempObject = gWorldItems[ pItemPool->iItemIndex ].object;
@@ -1933,6 +1945,12 @@ void SoldierGetItemFromWorld( SOLDIERTYPE *pSoldier, INT32 iItemIndex, INT32 sGr
}
else
{
//CHRISL: Make sure non-ammo item status is a valid 0-100 number
if(Item[gWorldItems[iItemIndex].object.usItem].usItemClass != IC_AMMO){
gWorldItems[iItemIndex].object[0]->data.objectStatus = __max(0,gWorldItems[iItemIndex].object[0]->data.objectStatus);
gWorldItems[iItemIndex].object[0]->data.objectStatus = __min(100,gWorldItems[iItemIndex].object[0]->data.objectStatus);
}
/*
// handle theft.. will return true if theft has failed ( if soldier was caught )
if( pSoldier->bTeam == OUR_TEAM )
+2 -24
View File
@@ -517,28 +517,6 @@ void GetMercOknoDirection( UINT8 ubSoldierID, BOOLEAN *pfGoDown, BOOLEAN *pfGoUp
}
}
}
void GetMercFenceDirection( UINT8 ubSoldierID, BOOLEAN *pfGoDown, BOOLEAN *pfGoUp )
{
INT8 bNewDirection;
SOLDIERTYPE *pSoldier;
*pfGoDown = FALSE;
*pfGoUp = FALSE;
if ( !GetSoldier( &pSoldier, ubSoldierID ) )
{
return;
}
if ( pSoldier->pathing.bLevel == 0 )
{
if ( FindHeigherLevelFence( pSoldier, pSoldier->sGridNo, pSoldier->ubDirection, &bNewDirection ) )
{
*pfGoUp = TRUE;
}
}
}
//----------------------------------------------------------------------------------
@@ -2062,7 +2040,7 @@ UINT32 UIHandleCMoveMerc( UI_EVENT *pUIEvent )
if(!(gTacticalStatus.uiFlags & INCOMBAT) && pSoldier->flags.ZipperFlag)
{
pSoldier->flags.ZipperFlag=FALSE;
RenderBackpackButtons(0);
RenderBackpackButtons(ACTIVATE_BUTTON);
}
}
// FOR REALTIME - DO MOVEMENT BASED ON STANCE!
@@ -5101,7 +5079,7 @@ UINT32 UIHandleTOnTerrain( UI_EVENT *pUIEvent )
gUIDisplayActionPointsOffY = 3;
// Set # of APs
gsCurrentActionPoints = 6;
gsCurrentActionPoints = APBPConstants[AP_TALK];
// Determine if we can afford!
if ( !EnoughPoints( pSoldier, gsCurrentActionPoints, 0, FALSE ) )
-4
View File
@@ -369,9 +369,5 @@ void GetGridNoScreenXY( INT32 sGridNo, INT16 *pScreenX, INT16 *pScreenY );
//Legion by Jazz
void GetMercOknoDirection( UINT8 ubSoldierID, BOOLEAN *pfGoDown, BOOLEAN *pfGoUp );
void GetMercFenceDirection( UINT8 ubSoldierID, BOOLEAN *pfGoDown, BOOLEAN *pfGoUp );
// HEADROCK HAM 4: Tells the targeting cursor whether we're adding bullets to autofire, or adding aim click levels.
extern BOOLEAN fAutofireBulletsMode;
#endif
+1
View File
@@ -2986,6 +2986,7 @@ void HandleNPCDoAction( UINT8 ubTargetNPC, UINT16 usActionCode, UINT8 ubQuoteNum
case NPC_ACTION_START_BLOODCAT_QUEST:
StartQuest( QUEST_BLOODCATS, gWorldSectorX, gWorldSectorY );
SetFactTrue( FACT_PLAYER_KNOWS_ABOUT_BLOODCAT_LAIR);
break;
case NPC_ACTION_START_MINE:
File diff suppressed because it is too large Load Diff
+172 -102
View File
@@ -200,7 +200,8 @@ extern int MAP_KEYRING_Y;
//#define MAP_KEYRING_X 217
//#define MAP_KEYRING_Y 271
#define KEYRING_WIDTH 30
#define KEYRING_HEIGHT 24
#define KEYRING_HEIGHT 22
#define TACTICAL_INVENTORY_KEYRING_GRAPHIC_OFFSET_X 215
//enum used for the money buttons
enum
@@ -240,6 +241,8 @@ BOOLEAN gfBadThrowItemCTGH;
BOOLEAN gfDontChargeAPsToPickup = FALSE;
BOOLEAN gbItemPointerLocateGood = FALSE;
INT32 iItemPosition = 0;
//CHRISL: Global variable to store stack item for message box system
UINT8 gbMessageBoxSubObject = 0;
// ITEM DESCRIPTION BOX STUFF
UINT32 guiItemDescBox;
@@ -808,7 +811,9 @@ void GenerateConsString( STR16 zItemCons, OBJECTTYPE * pObject, UINT32 uiPixLimi
BOOLEAN UseNASDesc(OBJECTTYPE *pObject){
if(pObject->exists() == FALSE)
return FALSE;
return (Item[pObject->usItem].usItemClass != IC_LBEGEAR && Item[pObject->usItem].usItemClass != IC_MONEY && UsingNewAttachmentSystem()==true);
if(guiCurrentScreen == MAP_SCREEN && Item[pObject->usItem].usItemClass == IC_LBEGEAR && UsingNewAttachmentSystem()==true)
return FALSE; // the map screen can't support NAS and LBEGEAR.
return (/*Item[pObject->usItem].usItemClass != IC_LBEGEAR && Item[pObject->usItem].usItemClass != IC_MONEY && */UsingNewAttachmentSystem()==true);
}
//WarmSteel - This function is used to move groups of items with NAS along the Y axe
@@ -895,6 +900,22 @@ void InitInvData(INV_REGIONS &InvData, BOOLEAN fBigPocket, INT16 sBarDx, INT16 s
InvData.sX = sX;
InvData.sY = sY;
}
void ResetInvData()
{
for ( INT32 cnt = 0; cnt < NUM_INV_SLOTS; cnt++ )
{
// set inventory pocket coordinates from the table passed in
gSMInvData[ cnt ].sX = 0;
gSMInvData[ cnt ].sY =0;
gSMInvData[ cnt ].sWidth =0;
gSMInvData[ cnt ].sHeight =0;
gSMInvData[ cnt ].sBarDx =0;
gSMInvData[ cnt ].sBarDy =0;
gSMInvData[ cnt ].fBigPocket =0;
}
}
void InitInventoryOld()
{
BODYPOSFINAL = GUNSLINGPOCKPOS;//RESET in initInventory
@@ -903,6 +924,8 @@ void InitInventoryOld()
MEDPOCKFINAL = SMALLPOCK1POS;//RESET in initInventory
SMALLPOCKFINAL = SMALLPOCK9POS;//RESET in initInventory
ResetInvData();
InitInvData(gSMInvData[HELMETPOS], FALSE, INV_BAR_DX, INV_BAR_DY, HEAD_INV_SLOT_WIDTH, HEAD_INV_SLOT_HEIGHT, 0, 0); // HELMETPOS
InitInvData(gSMInvData[VESTPOS], FALSE, INV_BAR_DX, INV_BAR_DY, VEST_INV_SLOT_WIDTH, VEST_INV_SLOT_HEIGHT, 0, 0); // VESTPOS
@@ -932,6 +955,8 @@ void InitInventoryNew()
MEDPOCKFINAL = SMALLPOCK1POS;//RESET in initInventory
SMALLPOCKFINAL = NUM_INV_SLOTS;//RESET in initInventory
ResetInvData();
if(iResolution == 0){
InitInvData(gSMInvData[0], FALSE, INV_BAR_DX, INV_BAR_DY, HEAD_INV_SLOT_WIDTH, HEAD_INV_SLOT_HEIGHT, 0, 0); // HELMETPOS
InitInvData(gSMInvData[1], FALSE, INV_BAR_DX, INV_BAR_DY, VEST_INV_SLOT_WIDTH, VEST_INV_SLOT_HEIGHT, 0, 0); // VESTPOS
@@ -1105,18 +1130,42 @@ BOOLEAN InitInvSlotInterface( INV_REGION_DESC *pRegionDesc , INV_REGION_DESC *pC
// HEADROCK: Readjusted this, for the TACTICAL Enhanced Description Box
if ( guiCurrentScreen == MAP_SCREEN )
{
gMoneyButtonLoc.x = 174;
gMoneyButtonLoc.y = 115;
if(UsingNewAttachmentSystem() == true)
{
gMoneyButtonLoc.x = 186;
gMoneyButtonLoc.y = 170;
}
else
{
gMoneyButtonLoc.x = 174;
gMoneyButtonLoc.y = 115;
}
}
else if ( UsingEDBSystem() > 0 )
{
gMoneyButtonLoc.x = ((UsingNewInventorySystem() == false)) ? (343 + INTERFACE_START_X) : (244 + INTERFACE_START_X);
gMoneyButtonLoc.y = ( 11 + INV_INTERFACE_START_Y );
if(UsingNewAttachmentSystem() == true)
{
gMoneyButtonLoc.x = ((UsingNewInventorySystem() == false)) ? (401 + INTERFACE_START_X) : (302 + INTERFACE_START_X);
gMoneyButtonLoc.y = ( 64 + INV_INTERFACE_START_Y );
}
else
{
gMoneyButtonLoc.x = ((UsingNewInventorySystem() == false)) ? (343 + INTERFACE_START_X) : (244 + INTERFACE_START_X);
gMoneyButtonLoc.y = ( 11 + INV_INTERFACE_START_Y );
}
}
else
{
gMoneyButtonLoc.x = ((UsingNewInventorySystem() == false)) ? (343 + INTERFACE_START_X) : (388 + INTERFACE_START_X);
gMoneyButtonLoc.y = ( 11 + INV_INTERFACE_START_Y );
if(UsingNewAttachmentSystem() == true)
{
gMoneyButtonLoc.x = ((UsingNewInventorySystem() == false)) ? (401 + INTERFACE_START_X) : (302 + INTERFACE_START_X);
gMoneyButtonLoc.y = ( 64 + INV_INTERFACE_START_Y );
}
else
{
gMoneyButtonLoc.x = ((UsingNewInventorySystem() == false)) ? (343 + INTERFACE_START_X) : (244 + INTERFACE_START_X);
gMoneyButtonLoc.y = ( 11 + INV_INTERFACE_START_Y );
}
}
// Load all four body type images
@@ -1233,6 +1282,15 @@ void ShutdownKeyRingInterface( void )
return;
}
void ShutdownInventoryInterface( void )
{
// Add regions for inventory slots
for ( INT32 cnt = 0; cnt < NUM_INV_SLOTS; cnt++ )
{
MSYS_RemoveRegion(&gSMInvRegion[ cnt ]);
}
}
void DisableInvRegions( BOOLEAN fDisable )
{
INT32 cnt;
@@ -1255,7 +1313,7 @@ void DisableInvRegions( BOOLEAN fDisable )
MSYS_DisableRegion( &gSM_SELMERCMoneyRegion );
EnableKeyRing( FALSE );
RenderBackpackButtons(3); /* CHRISL: Needed for new inventory backpack buttons */
RenderBackpackButtons(DISABLE_BUTTON); /* CHRISL: Needed for new inventory backpack buttons */
}
else
{
@@ -1263,7 +1321,7 @@ void DisableInvRegions( BOOLEAN fDisable )
MSYS_EnableRegion( &gSM_SELMERCMoneyRegion );
EnableKeyRing( TRUE );
RenderBackpackButtons(2); /* CHRISL: Needed for new inventory backpack buttons */
RenderBackpackButtons(ENABLE_BUTTON); /* CHRISL: Needed for new inventory backpack buttons */
}
}
@@ -1576,7 +1634,7 @@ void INVRenderINVPanelItem( SOLDIERTYPE *pSoldier, INT16 sPocket, UINT8 fDirtyLe
// CHRISL: Display pocket capacity if we're holding something in the cursor
if (!gfSMDisableForItems && (UsingNewInventorySystem() == true) && gpItemPointer != NULL)
{
int itemSlotLimit = ItemSlotLimit(gpItemPointer, sPocket, pSoldier);
UINT8 itemSlotLimit = ItemSlotLimit(gpItemPointer, sPocket, pSoldier);
RenderPocketItemCapacity( guiSAVEBUFFER, itemSlotLimit, sPocket, pSoldier, &pSoldier->inv[sPocket], sX, sY );
if(itemSlotLimit == 0 && !CanItemFitInPosition(pSoldier, gpItemPointer, (INT8)sPocket, FALSE)) {
fHatchItOut = TRUE;
@@ -1587,7 +1645,8 @@ void INVRenderINVPanelItem( SOLDIERTYPE *pSoldier, INT16 sPocket, UINT8 fDirtyLe
if(gpItemPointer != NULL)
{
if(!gfSMDisableForItems && !CanItemFitInPosition(pSoldier, gpItemPointer, (INT8)sPocket, FALSE)){
if(!ValidAttachment(gpItemPointer->usItem, pObject )){
if((UsingNewAttachmentSystem()==false && !ValidAttachment(gpItemPointer->usItem, pObject )) ||
(UsingNewAttachmentSystem()==true && !ValidItemAttachmentSlot(pObject, gpItemPointer->usItem, FALSE, FALSE))){
fHatchItOut = TRUE;
}
else{
@@ -1852,8 +1911,10 @@ BOOLEAN HandleCompatibleAmmoUIForMapScreen( SOLDIERTYPE *pSoldier, INT32 bInvPos
continue;
}
if ( ValidAttachment( pObject->usItem, pTestObject ) ||
ValidAttachment( pTestObject->usItem, pObject ) ||
if ( (UsingNewAttachmentSystem()==false && ValidAttachment( pObject->usItem, pTestObject )) ||
(UsingNewAttachmentSystem()==false && ValidAttachment( pTestObject->usItem, pObject )) ||
(UsingNewAttachmentSystem()==true && ValidItemAttachmentSlot(pTestObject, pObject->usItem, FALSE, FALSE, 0, cnt)) ||
(UsingNewAttachmentSystem()==true && ValidItemAttachmentSlot(pObject, pTestObject->usItem, FALSE, FALSE, 0, cnt)) ||
ValidLaunchable( pTestObject->usItem, pObject->usItem ) ||
ValidLaunchable( pObject->usItem, pTestObject->usItem ) )
{
@@ -2085,8 +2146,10 @@ BOOLEAN InternalHandleCompatibleAmmoUI( SOLDIERTYPE *pSoldier, OBJECTTYPE *pTest
continue;
}
if ( ValidAttachment( pObject->usItem, pTestObject ) ||
ValidAttachment( pTestObject->usItem, pObject ) ||
if ( (UsingNewAttachmentSystem()==false && ValidAttachment( pObject->usItem, pTestObject )) ||
(UsingNewAttachmentSystem()==false && ValidAttachment( pTestObject->usItem, pObject )) ||
(UsingNewAttachmentSystem()==true && ValidItemAttachmentSlot(pTestObject, pObject->usItem, FALSE, FALSE, 0, cnt)) ||
(UsingNewAttachmentSystem()==true && ValidItemAttachmentSlot(pObject, pTestObject->usItem, FALSE, FALSE, 0, cnt)) ||
ValidLaunchable( pTestObject->usItem, pObject->usItem ) ||
ValidLaunchable( pObject->usItem, pTestObject->usItem ) )
{
@@ -2403,7 +2466,7 @@ void InitItemInterface( )
}
// CHRISL: Function to display pocket inventory quantity based on object in cursor
void RenderPocketItemCapacity( UINT32 uiWhichBuffer, UINT8 pCapacity, INT16 bPos, SOLDIERTYPE *pSoldier, OBJECTTYPE *pObj, INT16 sX, INT16 sY )
void RenderPocketItemCapacity( UINT32 uiWhichBuffer, INT8 pCapacity, INT16 bPos, SOLDIERTYPE *pSoldier, OBJECTTYPE *pObj, INT16 sX, INT16 sY )
{
static CHAR16 pStr[ 100 ];
@@ -2443,7 +2506,8 @@ void RenderPocketItemCapacity( UINT32 uiWhichBuffer, UINT8 pCapacity, INT16 bPos
SetFontForeground( FONT_YELLOW );
swprintf( pStr, L"L" );
}
else if(ValidAttachment(gpItemPointer->usItem, &(pSoldier->inv[bPos]) ))
else if((UsingNewAttachmentSystem()==false && ValidAttachment(gpItemPointer->usItem, &(pSoldier->inv[bPos]) )) ||
(UsingNewAttachmentSystem()==true && ValidItemAttachmentSlot(&(pSoldier->inv[bPos]), gpItemPointer->usItem, FALSE, FALSE)))
{
SetFontForeground( FONT_YELLOW );
swprintf( pStr, L"A" );
@@ -2941,29 +3005,22 @@ void InitItemDescriptionBoxStartCoords( BOOLEAN fIsEnhanced, BOOLEAN fUsingNAS )
{
UINT8 mode = UsingEDBSystem();
if(fUsingNAS){
if (guiCurrentItemDescriptionScreen != SHOPKEEPER_SCREEN)
if( UsingNewInventorySystem() == true ) // NIV
{
ITEMDESC_START_X = 115;
ITEMDESC_START_Y = (1 + INV_INTERFACE_START_Y);
ITEMDESC_HEIGHT = 195;
ITEMDESC_WIDTH = 335; // OIV only
}
else if( UsingNewInventorySystem() == true ) // ODB/NIV
{
ITEMDESC_START_X = 200;//259;
ITEMDESC_START_Y = (1 + INV_INTERFACE_START_Y);
ITEMDESC_HEIGHT = guiCurrentItemDescriptionScreen == SHOPKEEPER_SCREEN ? 193 : 195;
ITEMDESC_WIDTH = 430; // OIV only
}
else // ODB/OIV
ITEMDESC_WIDTH = 335;
}
else // OIV
{
ITEMDESC_HEIGHT = 193;
ITEMDESC_WIDTH = 430; // OIV only
ITEMDESC_START_X = 214;//214
ITEMDESC_WIDTH = 430;
ITEMDESC_START_X = 214;
ITEMDESC_START_Y = (1-(ITEMDESC_HEIGHT-INV_INTERFACE_HEIGHT) + INV_INTERFACE_START_Y);
}
if(UsingNewInventorySystem() == true && guiCurrentScreen == GAME_SCREEN)
if(UsingNewInventorySystem() == true && (guiCurrentScreen == GAME_SCREEN || guiCurrentScreen == SHOPKEEPER_SCREEN))
{
if(iResolution == 0)
ITEMDESC_WIDTH = 526;
@@ -2987,7 +3044,7 @@ void InitItemDescriptionBoxStartCoords( BOOLEAN fIsEnhanced, BOOLEAN fUsingNAS )
} else {
if( UsingNewInventorySystem() == true ) // ODB/NIV
{
if (guiCurrentItemDescriptionScreen != SHOPKEEPER_SCREEN)
//if (guiCurrentItemDescriptionScreen != SHOPKEEPER_SCREEN)
{
// HEADROCK HAM 4:
ITEMDESC_START_X = 115;
@@ -2995,13 +3052,13 @@ void InitItemDescriptionBoxStartCoords( BOOLEAN fIsEnhanced, BOOLEAN fUsingNAS )
ITEMDESC_HEIGHT = 195;
ITEMDESC_WIDTH = 335; // OIV only
}
else
{
ITEMDESC_START_X = 259;
ITEMDESC_START_Y = (1 + INV_INTERFACE_START_Y);
ITEMDESC_HEIGHT = guiCurrentItemDescriptionScreen == SHOPKEEPER_SCREEN ? 133 : 195;
ITEMDESC_WIDTH = 320; // OIV only
}
//else
//{
// ITEMDESC_START_X = 259;
// ITEMDESC_START_Y = (1 + INV_INTERFACE_START_Y);
// ITEMDESC_HEIGHT = guiCurrentItemDescriptionScreen == SHOPKEEPER_SCREEN ? 133 : 195;
// ITEMDESC_WIDTH = 320; // OIV only
//}
}
else // ODB/OIV
{
@@ -3011,7 +3068,7 @@ void InitItemDescriptionBoxStartCoords( BOOLEAN fIsEnhanced, BOOLEAN fUsingNAS )
ITEMDESC_WIDTH = 320; // OIV only
}
if(UsingNewInventorySystem() == true && guiCurrentScreen == GAME_SCREEN)
if(UsingNewInventorySystem() == true && guiCurrentScreen == GAME_SCREEN || guiCurrentScreen == SHOPKEEPER_SCREEN)
{
if(iResolution == 0)
ITEMDESC_WIDTH = 526;
@@ -3073,7 +3130,7 @@ BOOLEAN InternalInitItemDescriptionBox( OBJECTTYPE *pObject, INT16 sX, INT16 sY,
InitItemDescriptionBoxStartCoords( gGameExternalOptions.iEnhancedDescriptionBox, UseNASDesc( pObject ) );
// Set X, Y
if(guiCurrentScreen == GAME_SCREEN)
if(guiCurrentScreen == GAME_SCREEN || (sX == 0 && sY == 0))
{
gsInvDescX = ITEMDESC_START_X; //sX;
gsInvDescY = ITEMDESC_START_Y; //sY;
@@ -3124,6 +3181,8 @@ BOOLEAN InternalInitItemDescriptionBox( OBJECTTYPE *pObject, INT16 sX, INT16 sY,
}
else if(guiCurrentItemDescriptionScreen == SHOPKEEPER_SCREEN)
{
// MSYS_DefineRegion( &gInvDesc, (UINT16)SM_ITEMDESC_START_X, (UINT16)SM_ITEMDESC_START_Y ,(UINT16)(SM_ITEMDESC_START_X + ITEMDESC_WIDTH), (UINT16)(SM_ITEMDESC_START_Y + ITEMDESC_HEIGHT), MSYS_PRIORITY_HIGHEST,
// MSYS_NO_CURSOR, MSYS_NO_CALLBACK, ItemDescCallback );
MSYS_DefineRegion( &gInvDesc, (UINT16)gsInvDescX, (UINT16)gsInvDescY ,(UINT16)(gsInvDescX + ITEMDESC_WIDTH), (UINT16)(gsInvDescY + ITEMDESC_HEIGHT), MSYS_PRIORITY_HIGHEST,
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, ItemDescCallback );
MSYS_AddRegion( &gInvDesc);
@@ -3260,11 +3319,7 @@ BOOLEAN InternalInitItemDescriptionBox( OBJECTTYPE *pObject, INT16 sX, INT16 sY,
// Load graphic
// HEADROCK: Select STI based on Description Box used:
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
// HEADROCK HAM 4: No more need for two files. Just use one.
//if(UsingEDBSystem() > 0)
strcpy( VObjectDesc.ImageFile, "INTERFACE\\infobox_interface_edb.sti" );
//else
// strcpy( VObjectDesc.ImageFile, "INTERFACE\\infobox_interface.sti" );
strcpy( VObjectDesc.ImageFile, "INTERFACE\\infobox_interface.sti" );
CHECKF( AddVideoObject( &VObjectDesc, &guiItemDescBox) );
if(ubPosition != 255 && UsingNewInventorySystem() == true)
@@ -3278,21 +3333,9 @@ BOOLEAN InternalInitItemDescriptionBox( OBJECTTYPE *pObject, INT16 sX, INT16 sY,
// HEADROCK: Select STI based on Description Box used:
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
// HEADROCK HAM 4: No more need for two files. Just use the EDB one.
//if(UsingEDBSystem() > 0)
strcpy( VObjectDesc.ImageFile, "INTERFACE\\iteminfoc_edb.STI" );
//else
// strcpy( VObjectDesc.ImageFile, "INTERFACE\\iteminfoc.STI" );
strcpy( VObjectDesc.ImageFile, "INTERFACE\\iteminfoc.STI" );
CHECKF( AddVideoObject( &VObjectDesc, &guiMapItemDescBox) );
if(UsingNewInventorySystem())
{
// HEADROCK HAM 4: LBE backgrounds for desc box
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
strcpy( VObjectDesc.ImageFile, "INTERFACE\\INFOBOX_LBE.STI" );
CHECKF( AddVideoObject( &VObjectDesc, &guiItemInfoLBEBackground) );
}
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
strcpy( VObjectDesc.ImageFile, "INTERFACE\\bullet.STI" );
CHECKF( AddVideoObject( &VObjectDesc, &guiBullet) );
@@ -3558,7 +3601,7 @@ void UpdateAttachmentTooltips(OBJECTTYPE *pObject, UINT8 ubStatusIndex)
// Contains entire string of attachment names
CHAR16 attachStr[2500];
// Contains current attachment string
CHAR16 attachStr2[100];
CHAR16 attachStr2[200];
// Contains temporary attachment list before added to string constant from text.h
CHAR16 attachStr3[2500];
UINT16 usAttachment;
@@ -3754,12 +3797,33 @@ BOOLEAN ReloadItemDesc( )
return( TRUE );
}
void RenderBulletIcon(OBJECTTYPE *pObject, UINT32 ubStatusIndex)
{
CHAR16 pStr[10];
CHAR8 ubString[48];
if(pObject->exists() == false)
return;
if(!gfInItemDescBox)
return;
if ( GetMagSize(pObject) <= 99 )
swprintf( pStr, L"%d/%d", (*pObject)[ubStatusIndex]->data.gun.ubGunShotsLeft, GetMagSize(pObject));
else
swprintf( pStr, L"%d", (*pObject)[ubStatusIndex]->data.gun.ubGunShotsLeft );
FilenameForBPP("INTERFACE\\infobox.sti", ubString);
UnloadButtonImage(giItemDescAmmoButtonImages);
giItemDescAmmoButtonImages = LoadButtonImage(ubString,AmmoTypes[(*pObject)[ubStatusIndex]->data.gun.ubGunAmmoType].grayed,AmmoTypes[(*pObject)[ubStatusIndex]->data.gun.ubGunAmmoType].offNormal,-1,AmmoTypes[(*pObject)[ubStatusIndex]->data.gun.ubGunAmmoType].onNormal,-1 );
//swprintf( pStr, L"0" );
SpecifyButtonText( giItemDescAmmoButton, pStr );
}
void ItemDescAmmoCallback(GUI_BUTTON *btn,INT32 reason)
{
static BOOLEAN fRightDown = FALSE;
CHAR16 pStr[10];
CHAR8 ubString[48];
UINT32 ubStatusIndex = MSYS_GetBtnUserData( btn, 1 );
/* region gets disabled in SKI for shopkeeper boxes. It now works normally for merc's inventory boxes!
@@ -3828,7 +3892,8 @@ void ItemDescAmmoCallback(GUI_BUTTON *btn,INT32 reason)
if(AutoPlaceObject(gpItemDescSoldier, &gTempObject, TRUE) == FALSE)
{
// couldn't find a place on the merc, so drop into the sector
if(fShowMapInventoryPool) //sector inventory panel is open
AutoPlaceObjectToWorld(gpItemDescSoldier, &gTempObject);
/*if(fShowMapInventoryPool) //sector inventory panel is open
{
AutoPlaceObjectInInventoryStash(&gTempObject, gpItemDescSoldier->sGridNo);
fMapPanelDirty = TRUE;
@@ -3836,7 +3901,7 @@ void ItemDescAmmoCallback(GUI_BUTTON *btn,INT32 reason)
else //sector inventory panel is closed
{
AddItemToPool(gpItemDescSoldier->sGridNo, &gTempObject, 1, gpItemDescSoldier->pathing.bLevel, WORLD_ITEM_REACHABLE, 0);
}
}*/
}
}
}
@@ -3845,17 +3910,7 @@ void ItemDescAmmoCallback(GUI_BUTTON *btn,INT32 reason)
fInterfacePanelDirty = DIRTYLEVEL2;
gpItemPointerSoldier = gpItemDescSoldier;
if ( GetMagSize(gpItemDescObject) <= 99 )
swprintf( pStr, L"%d/%d", (*gpItemDescObject)[ubStatusIndex]->data.gun.ubGunShotsLeft, GetMagSize(gpItemDescObject));
else
swprintf( pStr, L"%d", (*gpItemDescObject)[ubStatusIndex]->data.gun.ubGunShotsLeft );
FilenameForBPP("INTERFACE\\infobox.sti", ubString);
UnloadButtonImage(giItemDescAmmoButtonImages);
giItemDescAmmoButtonImages = LoadButtonImage(ubString,AmmoTypes[(*gpItemDescObject)[ubStatusIndex]->data.gun.ubGunAmmoType].grayed,AmmoTypes[(*gpItemDescObject)[ubStatusIndex]->data.gun.ubGunAmmoType].offNormal,-1,AmmoTypes[(*gpItemDescObject)[ubStatusIndex]->data.gun.ubGunAmmoType].onNormal,-1 );
//swprintf( pStr, L"0" );
SpecifyButtonText( giItemDescAmmoButton, pStr );
RenderBulletIcon(gpItemDescObject, ubStatusIndex);
// Set mouse
if(gpItemPointer->exists() == true)
@@ -3924,17 +3979,7 @@ void ItemDescAmmoCallback(GUI_BUTTON *btn,INT32 reason)
//fItemDescDelete = TRUE;
fInterfacePanelDirty = DIRTYLEVEL2;
if ( GetMagSize(gpItemDescObject) <= 99 )
swprintf( pStr, L"%d/%d", (*gpItemDescObject)[ubStatusIndex]->data.gun.ubGunShotsLeft, GetMagSize(gpItemDescObject));
else
swprintf( pStr, L"%d", (*gpItemDescObject)[ubStatusIndex]->data.gun.ubGunShotsLeft );
FilenameForBPP("INTERFACE\\infobox.sti", ubString);
UnloadButtonImage(giItemDescAmmoButtonImages);
giItemDescAmmoButtonImages = LoadButtonImage(ubString,AmmoTypes[(*gpItemDescObject)[ubStatusIndex]->data.gun.ubGunAmmoType].grayed,AmmoTypes[(*gpItemDescObject)[ubStatusIndex]->data.gun.ubGunAmmoType].offNormal,-1,AmmoTypes[(*gpItemDescObject)[ubStatusIndex]->data.gun.ubGunAmmoType].onNormal,-1 );
//swprintf( pStr, L"0" );
SpecifyButtonText( giItemDescAmmoButton, pStr );
RenderBulletIcon(gpItemDescObject, ubStatusIndex);
fItemDescDelete = TRUE;
@@ -3999,8 +4044,9 @@ void PermanantAttachmentMessageBoxCallBack( UINT8 ubExitValue )
{
if ( ubExitValue == MSG_BOX_RETURN_YES )
{
DoAttachment(0, iItemPosition);
DoAttachment(gbMessageBoxSubObject, iItemPosition);
}
gbMessageBoxSubObject = 0;
// else do nothing
}
@@ -4038,6 +4084,7 @@ void ItemDescAttachmentsCallback( MOUSE_REGION * pRegion, INT32 iReason )
if ( (Item[ gpItemPointer->usItem ].inseparable ) && ValidAttachment( gpItemPointer->usItem, gpItemDescObject ) )
{
iItemPosition = uiItemPos;
gbMessageBoxSubObject = (UINT8)ubStatusIndex;
DoScreenIndependantMessageBox( Message[ STR_PERMANENT_ATTACHMENT ], ( UINT8 )MSG_BOX_FLAG_YESNO, PermanantAttachmentMessageBoxCallBack );
return;
}
@@ -4505,7 +4552,9 @@ void RenderItemDescriptionBox( )
sCenX = ITEMDESC_ITEM_X + (INT16)( abs( ITEMDESC_ITEM_WIDTH - (double)usWidth ) / 2 ) - sOffsetX;
sCenY = ITEMDESC_ITEM_Y + (INT16)( abs( ITEMDESC_ITEM_HEIGHT - (double)usHeight ) / 2 )- sOffsetY;
RenderBackpackButtons(1); /* CHRISL: Needed for new inventory backpack buttons */
RenderBackpackButtons(DEACTIVATE_BUTTON); /* CHRISL: Needed for new inventory backpack buttons */
if(guiCurrentItemDescriptionScreen == SHOPKEEPER_SCREEN && gGameSettings.fOptions[TOPTION_ENHANCED_DESC_BOX])
EnableDisableShopkeeperButtons(guiCurrentItemDescriptionScreen, DEACTIVATE_BUTTON);
if( guiCurrentItemDescriptionScreen == MAP_SCREEN )
BltVideoObjectFromIndex( guiSAVEBUFFER, guiMapItemDescBox, showBox, gsInvDescX, gsInvDescY, VO_BLT_SRCTRANSPARENCY, NULL );
@@ -4558,10 +4607,10 @@ void RenderItemDescriptionBox( )
// CHRISL: This block will display hatching for inactive LBE pockets
// Display LBENODE attached items
if(UsingNewInventorySystem() == true && Item[gpItemDescObject->usItem].usItemClass == IC_LBEGEAR)
{
RenderLBENODEItems( gpItemDescObject, gubItemDescStatusIndex );
}
// if(UsingNewInventorySystem() == true && Item[gpItemDescObject->usItem].usItemClass == IC_LBEGEAR)
// {
// RenderLBENODEItems( gpItemDescObject, gubItemDescStatusIndex );
// }
// HEADROCK HAM 4: First, display LBE Background
if(UsingNewInventorySystem() == true && Item[gpItemDescObject->usItem].usItemClass == IC_LBEGEAR && showLBE >= 0)
@@ -4575,7 +4624,7 @@ void RenderItemDescriptionBox( )
showLBEImage += 8;
// Draw LBE background image
BltVideoObjectFromIndex( guiSAVEBUFFER, guiItemInfoLBEBackground, showLBEImage, gItemDescLBEBackground[showLBE].sLeft, gItemDescLBEBackground[showLBE].sTop, VO_BLT_SRCTRANSPARENCY, NULL );
// BltVideoObjectFromIndex( guiSAVEBUFFER, guiItemInfoLBEBackground, showLBEImage, gItemDescLBEBackground[showLBE].sLeft, gItemDescLBEBackground[showLBE].sTop, VO_BLT_SRCTRANSPARENCY, NULL );
// Render LBE items
RenderLBENODEItems( gpItemDescObject, gubItemDescStatusIndex );
}
@@ -5342,7 +5391,7 @@ void RenderLBENODEItems( OBJECTTYPE *pObj, int subObject )
InitInvData(LBEInvPocketXY[1], FALSE, INV_BAR_DX, INV_BAR_DY, SM_INV_SLOT_WIDTH, SM_INV_SLOT_HEIGHT, usX + gLBEStats[1].sX, usY + gLBEStats[1].sY);
InitInvData(LBEInvPocketXY[2], FALSE, INV_BAR_DX, INV_BAR_DY, SM_INV_SLOT_WIDTH, SM_INV_SLOT_HEIGHT, usX + gLBEStats[2].sX, usY + gLBEStats[2].sY);
InitInvData(LBEInvPocketXY[3], FALSE, INV_BAR_DX, INV_BAR_DY, SM_INV_SLOT_WIDTH, SM_INV_SLOT_HEIGHT, usX + gLBEStats[3].sX, usY + gLBEStats[3].sY);
InitInvData(LBEInvPocketXY[4], FALSE, INV_BAR_DX, INV_BAR_DY, VEST_INV_SLOT_WIDTH, VEST_INV_SLOT_HEIGHT, usX + gLBEStats[4].sX, usY + gLBEStats[4].sY);
InitInvData(LBEInvPocketXY[4], 2 , INV_BAR_DX, INV_BAR_DY, VEST_INV_SLOT_WIDTH, VEST_INV_SLOT_HEIGHT, usX + gLBEStats[4].sX, usY + gLBEStats[4].sY);
InitInvData(LBEInvPocketXY[5], FALSE, INV_BAR_DX, INV_BAR_DY, SM_INV_SLOT_WIDTH, SM_INV_SLOT_HEIGHT, usX + gLBEStats[5].sX, usY + gLBEStats[5].sY);
InitInvData(LBEInvPocketXY[6], FALSE, INV_BAR_DX, INV_BAR_DY, SM_INV_SLOT_WIDTH, SM_INV_SLOT_HEIGHT, usX + gLBEStats[6].sX, usY + gLBEStats[6].sY);
InitInvData(LBEInvPocketXY[7], FALSE, INV_BAR_DX, INV_BAR_DY, SM_INV_SLOT_WIDTH, SM_INV_SLOT_HEIGHT, usX + gLBEStats[7].sX, usY + gLBEStats[7].sY);
@@ -5363,8 +5412,8 @@ void RenderLBENODEItems( OBJECTTYPE *pObj, int subObject )
InitInvData(LBEInvPocketXY[7], FALSE, INV_BAR_DX, INV_BAR_DY, SM_INV_SLOT_WIDTH, SM_INV_SLOT_HEIGHT, usX + gLBEStats[19].sX, usY + gLBEStats[19].sY);
InitInvData(LBEInvPocketXY[8], FALSE, INV_BAR_DX, INV_BAR_DY, SM_INV_SLOT_WIDTH, SM_INV_SLOT_HEIGHT, usX + gLBEStats[20].sX, usY + gLBEStats[20].sY);
InitInvData(LBEInvPocketXY[9], FALSE, INV_BAR_DX, INV_BAR_DY, SM_INV_SLOT_WIDTH, SM_INV_SLOT_HEIGHT, usX + gLBEStats[21].sX, usY + gLBEStats[21].sY);
InitInvData(LBEInvPocketXY[10], FALSE, INV_BAR_DX, INV_BAR_DY, VEST_INV_SLOT_WIDTH, VEST_INV_SLOT_HEIGHT, usX + gLBEStats[22].sX, usY + gLBEStats[22].sY);
InitInvData(LBEInvPocketXY[11], FALSE, INV_BAR_DX, INV_BAR_DY, VEST_INV_SLOT_WIDTH, VEST_INV_SLOT_HEIGHT, usX + gLBEStats[23].sX, usY + gLBEStats[23].sY);
InitInvData(LBEInvPocketXY[10], 2, INV_BAR_DX, INV_BAR_DY, VEST_INV_SLOT_WIDTH, VEST_INV_SLOT_HEIGHT, usX + gLBEStats[22].sX, usY + gLBEStats[22].sY);
InitInvData(LBEInvPocketXY[11], 2, INV_BAR_DX, INV_BAR_DY, VEST_INV_SLOT_WIDTH, VEST_INV_SLOT_HEIGHT, usX + gLBEStats[23].sX, usY + gLBEStats[23].sY);
break;
case COMBAT_PACK:
GetLBESlots(CPACKPOCKPOS, pocketKey);
@@ -5404,6 +5453,8 @@ void RenderLBENODEItems( OBJECTTYPE *pObj, int subObject )
{
sX = LBEInvPocketXY[cnt].sX;
sY = LBEInvPocketXY[cnt].sY;
if(sX != 0 && sY != 0)
BltVideoObjectFromIndex( guiSAVEBUFFER, guiAttachmentSlot, LBEInvPocketXY[cnt].fBigPocket, sX-7, sY-1, VO_BLT_SRCTRANSPARENCY, NULL );
lbePocket = LoadBearingEquipment[Item[pObj->usItem].ubClassIndex].lbePocketIndex[icPocket[pocketKey[cnt]]];
pObject = NULL;
if(wornItem == true)
@@ -5532,13 +5583,15 @@ void DeleteItemDescriptionBox( )
//Remove
DeleteVideoObjectFromIndex( guiItemDescBox );
if(UsingNewInventorySystem() == true && guiItemDescBoxBackground != 0)
if(UsingNewInventorySystem() == true && guiItemDescBoxBackground != 0 && !gfInKeyRingPopup)
DeleteVideoObjectFromIndex( guiItemDescBoxBackground );
if(UsingNewInventorySystem() == true && guiItemInfoLBEBackground != 0)
DeleteVideoObjectFromIndex( guiItemInfoLBEBackground );
DeleteVideoObjectFromIndex( guiMapItemDescBox );
DeleteVideoObjectFromIndex( guiAttachmentSlot );
RenderBackpackButtons(0); /* CHRISL: Needed for new inventory backpack buttons */
RenderBackpackButtons(ACTIVATE_BUTTON); /* CHRISL: Needed for new inventory backpack buttons */
if(guiCurrentItemDescriptionScreen == SHOPKEEPER_SCREEN && gGameSettings.fOptions[TOPTION_ENHANCED_DESC_BOX])
EnableDisableShopkeeperButtons(guiCurrentItemDescriptionScreen, ACTIVATE_BUTTON);
DeleteVideoObjectFromIndex( guiBullet );
DeleteEnhancedDescBox( guiCurrentItemDescriptionScreen );
// Delete item graphic
@@ -6827,7 +6880,7 @@ BOOLEAN InitItemStackPopup( SOLDIERTYPE *pSoldier, UINT8 ubPosition, INT16 sInvX
static CHAR16 pStr[ 512 ];
RenderBackpackButtons(1); /* CHRISL: Needed for new inventory backpack buttons */
RenderBackpackButtons(DEACTIVATE_BUTTON); /* CHRISL: Needed for new inventory backpack buttons */
if( guiCurrentScreen == MAP_SCREEN )
{
sItemWidth = MAP_INV_ITEM_ROW_WIDTH;
@@ -7150,7 +7203,7 @@ BOOLEAN InitKeyRingPopup( SOLDIERTYPE *pSoldier, INT16 sInvX, INT16 sInvY, INT16
INT16 sOffSetY = 0, sOffSetX = 0;
INT16 sKeyRingItemWidth = 0;
RenderBackpackButtons(1); /* CHRISL: Needed for new inventory backpack buttons */
RenderBackpackButtons(DEACTIVATE_BUTTON); /* CHRISL: Needed for new inventory backpack buttons */
if( guiCurrentScreen == MAP_SCREEN )
{
gsKeyRingPopupInvX = 0;
@@ -7602,6 +7655,7 @@ void ItemPopupRegionCallback( MOUSE_REGION * pRegion, INT32 iReason )
UINT32 uiItemPos;
UINT32 iItemCap;
INT32 ubID;
CHAR16 sString[ 128 ];
uiItemPos = MSYS_GetRegionUserData( pRegion, 0 );
iItemCap = MSYS_GetRegionUserData( pRegion, 1 );
@@ -7615,6 +7669,22 @@ void ItemPopupRegionCallback( MOUSE_REGION * pRegion, INT32 iReason )
if (iReason & MSYS_CALLBACK_REASON_LBUTTON_DWN)
{
if( ( Menptr[ gCharactersList[ bSelectedInfoChar ].usSolID ].sSectorX != sSelMapX ) ||
( Menptr[ gCharactersList[ bSelectedInfoChar ].usSolID ].sSectorY != sSelMapY ) ||
( Menptr[ gCharactersList[ bSelectedInfoChar ].usSolID ].bSectorZ != iCurrentMapSectorZ ) ||
( Menptr[ gCharactersList[ bSelectedInfoChar ].usSolID ].flags.fBetweenSectors ) )
{
if ( gpItemPointer == NULL )
{
swprintf( sString, pMapInventoryErrorString[ 2 ], Menptr[ gCharactersList[ bSelectedInfoChar ].usSolID ].name );
}
else
{
swprintf( sString, pMapInventoryErrorString[ 5 ], Menptr[ gCharactersList[ bSelectedInfoChar ].usSolID ].name );
}
DoMapMessageBox( MSG_BOX_BASIC_STYLE, sString, MAP_SCREEN, MSG_BOX_FLAG_OK, NULL );
return;
}
//If something in our hand, see if it's ammo and if we are trying to reload a gun
if ( gpItemPointer != NULL )
{
@@ -9384,7 +9454,7 @@ void GetHelpTextForItem( STR16 pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier
case IC_AMMO:
{
// The next is for ammunition which gets the measurement 'rnds'
swprintf( pStr, L"%s [%d rnds]\n%s %1.1f %s",
swprintf( pStr, New113Message[MSG113_AMMO_SPEC_STRING],
ItemNames[ usItem ], //Item long name
(*pObject)[subObject]->data.ubShotsLeft, //Shots left
gWeaponStatsDesc[ 12 ], //Weight String
+4 -1
View File
@@ -208,11 +208,12 @@ BOOLEAN HandleCompatibleAmmoUI( SOLDIERTYPE *pSoldier, INT8 bInvPos, BOOLEAN fOn
// - if == 1 will only dirty the name space and then set counter to 0
// Last parameter used mainly for when mouse is over item
void RenderBulletIcon(OBJECTTYPE *pObject, UINT32 ubStatusIndex = 0);
void INVRenderItem( UINT32 uiBuffer, SOLDIERTYPE * pSoldier, OBJECTTYPE *pObject, INT16 sX, INT16 sY, INT16 sWidth, INT16 sHeight, UINT8 fDirtyLevel, UINT8 *pubHighlightCounter, UINT8 ubStatusIndex, BOOLEAN fOutline, INT16 sOutlineColor, UINT8 iter = 0 );
// CHRISL: Add a new function that will be used to render a pocket silhouette
void INVRenderSilhouette( UINT32 uiBugger, INT16 PocketIndex, INT16 SilIndex, INT16 sX, INT16 sY, INT16 sWideth, INT16 sHeight);
// CHRISL: New function to handle display of inventory quantities based on item current in cursor
void RenderPocketItemCapacity( UINT32 uiWhichBuffer, UINT8 pCapacity, INT16 bPos, SOLDIERTYPE *pSoldier, OBJECTTYPE *pObj, INT16 sX, INT16 sY );
void RenderPocketItemCapacity( UINT32 uiWhichBuffer, INT8 pCapacity, INT16 bPos, SOLDIERTYPE *pSoldier, OBJECTTYPE *pObj, INT16 sX, INT16 sY );
// CHRISL: New function to display items stored in an LBENODE
void RenderLBENODEItems( OBJECTTYPE *pObj, int subObject );
// CHRISL: New function to setup GSMInvData based on game options
@@ -257,6 +258,8 @@ void DeleteKeyRingPopup( );
void ShutdownKeyRingInterface( void );
void ShutdownInventoryInterface( void );
BOOLEAN InKeyRingPopup( void );
void BeginKeyRingItemPointer( SOLDIERTYPE *pSoldier, UINT8 ubKeyRingPosition );
+89 -298
View File
@@ -511,8 +511,8 @@ INT8 gbZipperButPos[2][2] =
};
//Legion by Jazz
void BtnOknoCallback(GUI_BUTTON *btn,INT32 reason);
void BtnFenceCallback(GUI_BUTTON *btn,INT32 reason);
//void BtnOknoCallback(GUI_BUTTON *btn,INT32 reason);
//void BtnFenceCallback(GUI_BUTTON *btn,INT32 reason);
// Mouse button and region callbacks
//void BtnPositionCallback( GUI_BUTTON *btn, INT32 reason );
@@ -877,7 +877,7 @@ void UpdateSMPanel( )
giSMStealthButton = QuickCreateButton( giSMStealthImages, SM_STEALTHMODE_X, SM_STEALTHMODE_Y,
BUTTON_TOGGLE, MSYS_PRIORITY_HIGH - 1,
DEFAULT_MOVE_CALLBACK, (GUI_CALLBACK)BtnStealthModeCallback );
RenderBackpackButtons(0); /* CHRISL: Needed for new inventory backpack buttons */
RenderBackpackButtons(ACTIVATE_BUTTON); /* CHRISL: Needed for new inventory backpack buttons */
SetButtonFastHelpText( giSMStealthButton, TacticalStr[ TOGGLE_STEALTH_MODE_POPUPTEXT ] );
@@ -889,7 +889,7 @@ void UpdateSMPanel( )
{
DisableButton( giSMStealthButton );
}
RenderBackpackButtons(3); /* CHRISL: Needed for new inventory backpack buttons */
RenderBackpackButtons(DISABLE_BUTTON); /* CHRISL: Needed for new inventory backpack buttons */
}
}
@@ -953,49 +953,10 @@ void UpdateSMPanel( )
}
}
DisableButton( iSMPanelButtons[ CLIMB_BUTTON ] );
//DisableButton
//if (gGameExternalOptions.fCanJumpThroughWindows == TRUE)
//{
//DisableButton( iSMPanelButtons[ HOP_BUTTON ] ); //Legion by Jazz
//}
GetMercClimbDirection( gpSMCurrentMerc->ubID, &fNearLowerLevel, &fNearHeigherLevel );
//--------------------- Legion-----------------
/*
if (gGameExternalOptions.fCanJumpThroughWindows == TRUE)
{
if ( gpSMCurrentMerc->pathing.bLevel == 0 )
{
GetMercOknoDirection( gpSMCurrentMerc->ubID, &fNearLowerLevelOkno, &fNearHeigherLevelOkno ); //Legion by JAzz
if ( fNearLowerLevelOkno || fNearHeigherLevelOkno )
{
if ( fNearLowerLevelOkno )
{
if ( EnoughPoints( gpSMCurrentMerc, GetAPsToJumpThroughWindows( gpSMCurrentMerc, TRUE ), 0, FALSE ) )
{
EnableButton( iSMPanelButtons[ HOP_BUTTON ] );
}
}
if ( fNearHeigherLevelOkno )
{
if ( EnoughPoints( gpSMCurrentMerc, GetAPsToJumpThroughWindows( gpSMCurrentMerc, FALSE ), 0, FALSE ) )
{
EnableButton( iSMPanelButtons[ HOP_BUTTON ] );
}
}
}
}
}
*/
//---------
if ( fNearLowerLevel || fNearHeigherLevel )
{
if ( fNearLowerLevel )
@@ -1014,31 +975,24 @@ if (gGameExternalOptions.fCanJumpThroughWindows == TRUE)
}
}
}
//----------------------------Legion by Jazz------------------------------
//DisableButton
/*
if (gGameExternalOptions.fCanJumpThroughWindows == TRUE )
{
if ( FindOknoDirection( gpSMCurrentMerc, gpSMCurrentMerc->sGridNo, gpSMCurrentMerc->ubDirection, &bDirection ) && gpSMCurrentMerc->pathing.bLevel == 0 )
{
EnableButton( iSMPanelButtons[ HOP_BUTTON ] );
}
}
*/
if (gGameExternalOptions.fCanClimbOnWalls == TRUE)
{
if ( FindFenceDirection( gpSMCurrentMerc, gpSMCurrentMerc->sGridNo, gpSMCurrentMerc->ubDirection, &bDirection ) )
{
EnableButton( iSMPanelButtons[ CLIMB_BUTTON ] );
}
}
//------------------------------------------
if (gGameExternalOptions.fCanClimbOnWalls == TRUE)
{
if ( FindWallJumpDirection( gpSMCurrentMerc, gpSMCurrentMerc->sGridNo, gpSMCurrentMerc->ubDirection, &bDirection ) )
{
if ( EnoughPoints( gpSMCurrentMerc, GetAPsToJumpWall( gpSMCurrentMerc, FALSE ), 0, FALSE ) )
{
EnableButton( iSMPanelButtons[ CLIMB_BUTTON ] );
}
}
}
if ( FindFenceJumpDirection( gpSMCurrentMerc, gpSMCurrentMerc->sGridNo, gpSMCurrentMerc->ubDirection, &bDirection ) )
{
EnableButton( iSMPanelButtons[ CLIMB_BUTTON ] );
if ( EnoughPoints( gpSMCurrentMerc, GetAPsToJumpFence( gpSMCurrentMerc, FALSE ), 0, FALSE ) )
{
EnableButton( iSMPanelButtons[ CLIMB_BUTTON ] );
}
}
if ( (gTacticalStatus.ubCurrentTeam != gbPlayerNum) || (gTacticalStatus.uiFlags & REALTIME ) || !(gTacticalStatus.uiFlags & INCOMBAT ) )
@@ -1114,11 +1068,6 @@ if (gGameExternalOptions.fCanJumpThroughWindows == TRUE)
// If not selected ( or dead ), disable/gray some buttons
if ( gusSelectedSoldier != gpSMCurrentMerc->ubID || ( gpSMCurrentMerc->stats.bLife < OKLIFE ) || (gTacticalStatus.ubCurrentTeam != gbPlayerNum) || gfSMDisableForItems )
{
//DisableButton
//if (gGameExternalOptions.fCanJumpThroughWindows == TRUE)
//{
//DisableButton( iSMPanelButtons[ HOP_BUTTON ] ); //Legion by Jazz
//}
DisableButton( iSMPanelButtons[ CLIMB_BUTTON ] );
DisableButton( iSMPanelButtons[ BURSTMODE_BUTTON ] );
DisableButton( iSMPanelButtons[ STANCEUP_BUTTON ] );
@@ -1130,7 +1079,7 @@ if (gGameExternalOptions.fCanJumpThroughWindows == TRUE)
{
DisableButton( giSMStealthButton );
}
RenderBackpackButtons(3); /* CHRISL: Needed for new inventory backpack buttons */
RenderBackpackButtons(DISABLE_BUTTON); /* CHRISL: Needed for new inventory backpack buttons */
}
else
{
@@ -1154,7 +1103,7 @@ if (gGameExternalOptions.fCanJumpThroughWindows == TRUE)
EnableButton( giSMStealthButton );
}
if(!gfInItemDescBox)
RenderBackpackButtons(2); /* CHRISL: Needed for new inventory backpack buttons */
RenderBackpackButtons(ENABLE_BUTTON); /* CHRISL: Needed for new inventory backpack buttons */
}
// CJC Dec 4 2002: or if item pickup menu is up
@@ -1225,6 +1174,9 @@ void RenderBackpackButtons(int bpAction)
// Only run if the Tactical Inventory Panel is open
if(gsCurInterfacePanel != SM_PANEL)
return;
// Don't run if keyring is open
if(gfInKeyRingPopup)
return;
// If Merc hasn't been set, default to first merc
if(gpSMCurrentMerc==NULL)
gpSMCurrentMerc = MercPtrs[ 0 ];
@@ -1232,7 +1184,7 @@ void RenderBackpackButtons(int bpAction)
// Deal with buttons depending on which screen is currently active
switch (bpAction)
{
case 0:
case ACTIVATE_BUTTON:
// Activate buttons
if(giSMZipperButton != -1)
RemoveButton( giSMZipperButton );
@@ -1267,38 +1219,38 @@ void RenderBackpackButtons(int bpAction)
//SetButtonFastHelpText( giSMZipperButton, TacticalStr[ ] );
//SetButtonFastHelpText( giSMDropPackButton, TacticalStr[ ] );
break;
case 1:
case DEACTIVATE_BUTTON:
// Deactivate buttons
if(giSMZipperButton != -1)
RemoveButton( giSMZipperButton );
if(giSMDropPackButton != -1)
RemoveButton( giSMDropPackButton );
RenderBackpackButtons(4);
RenderBackpackButtons(UNLOAD_BUTTON);
giSMDropPackImages = -1;
giSMDropPackButton = -1;
giSMZipperImages = -1;
giSMZipperButton = -1;
break;
case 2:
case ENABLE_BUTTON:
// Enable buttons
if(giSMDropPackButton == -1 || giSMZipperButton == -1)
{
RenderBackpackButtons(1);
RenderBackpackButtons(0);
RenderBackpackButtons(DEACTIVATE_BUTTON);
RenderBackpackButtons(ACTIVATE_BUTTON);
}
if(giSMDropPackButton != -1)
EnableButton( giSMDropPackButton );
if(giSMZipperButton != -1)
EnableButton( giSMZipperButton );
break;
case 3:
case DISABLE_BUTTON:
// Disable buttons
if(giSMDropPackButton != -1)
DisableButton( giSMDropPackButton );
if(giSMZipperButton != -1)
DisableButton( giSMZipperButton );
break;
case 4:
case UNLOAD_BUTTON:
if(giSMZipperImages != -1)
UnloadButtonImage( giSMZipperImages );
if(giSMDropPackImages != -1)
@@ -1368,11 +1320,6 @@ void EnableSMPanelButtons( BOOLEAN fEnable , BOOLEAN fFromItemPickup )
// only enable the following if NOT in shopkeeper's interface
if ( !(guiTacticalInterfaceFlags & INTERFACE_SHOPKEEP_INTERFACE ) )
{
//DisableButton
//if (gGameExternalOptions.fCanJumpThroughWindows == TRUE)
//{
//EnableButton( iSMPanelButtons[ HOP_BUTTON ] ); //Legion by JAzz
//}
EnableButton( iSMPanelButtons[ CLIMB_BUTTON ] );
EnableButton( iSMPanelButtons[ BURSTMODE_BUTTON ] );
EnableButton( iSMPanelButtons[ STANCEUP_BUTTON ] );
@@ -1384,7 +1331,7 @@ void EnableSMPanelButtons( BOOLEAN fEnable , BOOLEAN fFromItemPickup )
{
EnableButton( giSMStealthButton );
}
RenderBackpackButtons(2); /* CHRISL: Needed for new inventory backpack buttons */
RenderBackpackButtons(ENABLE_BUTTON); /* CHRISL: Needed for new inventory backpack buttons */
if ( gfDisableTacticalPanelButtons )
{
@@ -1416,11 +1363,6 @@ void EnableSMPanelButtons( BOOLEAN fEnable , BOOLEAN fFromItemPickup )
}
else
{
//DisableButton
//if (gGameExternalOptions.fCanJumpThroughWindows == TRUE)
//{
//DisableButton( iSMPanelButtons[ HOP_BUTTON ] ); //Legion by Jazz
//}
DisableButton( iSMPanelButtons[ CLIMB_BUTTON ] );
DisableButton( iSMPanelButtons[ BURSTMODE_BUTTON ] );
DisableButton( iSMPanelButtons[ STANCEUP_BUTTON ] );
@@ -1432,7 +1374,7 @@ void EnableSMPanelButtons( BOOLEAN fEnable , BOOLEAN fFromItemPickup )
{
DisableButton( giSMStealthButton );
}
RenderBackpackButtons(3); /* CHRISL: Needed for new inventory backpack buttons */
RenderBackpackButtons(DISABLE_BUTTON); /* CHRISL: Needed for new inventory backpack buttons */
if ( !fFromItemPickup )
{
@@ -1662,7 +1604,7 @@ BOOLEAN InitializeSMPanelCoordsOld()
LOCATION_NAME_Y = ( 65 + INTERFACE_START_Y );
// Keyring
KEYRING_X = 487;
KEYRING_X = 494; //487;
KEYRING_Y = (105 + INV_INTERFACE_START_Y);
// so we got everything "dynamic" now we just return TRUE
@@ -1952,9 +1894,9 @@ BOOLEAN InitializeSMPanelCoordsNew()
}
// WANNE 2
SM_DONE_X = (SCREEN_WIDTH - 152);
SM_DONE_X = (SCREEN_WIDTH - 146); // 152
SM_DONE_Y = ( 118 + INV_INTERFACE_START_Y );
SM_MAPSCREEN_X = (SCREEN_WIDTH - 152);
SM_MAPSCREEN_X = (SCREEN_WIDTH - 146); // 152
SM_MAPSCREEN_Y = ( 140 + INV_INTERFACE_START_Y );
SM_POSITIONB_X = ( 106 + INTERFACE_START_X );
@@ -2030,13 +1972,13 @@ BOOLEAN InitializeSMPanelCoordsNew()
// ow and te clock and location i will put it here
INTERFACE_CLOCK_X = (SCREEN_WIDTH - 86);
INTERFACE_CLOCK_Y = ( 116 + INV_INTERFACE_START_Y );
INTERFACE_CLOCK_Y = ( 117 + INV_INTERFACE_START_Y );
LOCATION_NAME_X = (SCREEN_WIDTH - 92);
LOCATION_NAME_Y = ( 87 + INTERFACE_START_Y );
LOCATION_NAME_Y = ( 89 + INTERFACE_START_Y );
//Keyring
KEYRING_X = 209;
KEYRING_Y = (4 + INV_INTERFACE_START_Y);
KEYRING_X = 217; // 209
KEYRING_Y = (5 + INV_INTERFACE_START_Y);
// so we got everything "dynamic" now we just return TRUE
return ( TRUE );
@@ -2196,12 +2138,6 @@ BOOLEAN CreateSMPanelButtons( )
FilenameForBPP("INTERFACE\\inventory_buttons.sti", ubString);
//Legion by Jazz
//DisableButton
//if (gGameExternalOptions.fCanJumpThroughWindows == TRUE)
//{
// FilenameForBPP("INTERFACE\\inventory_buttons_WINDOW_2.sti", ubString2); //LEGION
//}
//-----------------------
// Load button Graphics
iSMPanelImages[ STANCEUP_IMAGES ] = LoadButtonImage(ubString,-1,0,-1,10,-1 );
@@ -2217,18 +2153,6 @@ BOOLEAN CreateSMPanelButtons( )
iSMPanelImages[ TALK_IMAGES ] = UseLoadedButtonImage( iSMPanelImages[ STANCEUP_IMAGES ] ,-1,6,-1,16,-1 );
iSMPanelImages[ MUTE_IMAGES ] = UseLoadedButtonImage( iSMPanelImages[ STANCEUP_IMAGES ] ,-1,5,-1,15,-1 );
//Legion by Jazz
//DisableButton
/*
if (gGameExternalOptions.fCanJumpThroughWindows == TRUE)
{
iSMPanelImages[ OPTIONS_IMAGES ] = LoadButtonImage(ubString2,-1,0,-1,1,-1 ); //legion
}
else
{
iSMPanelImages[ OPTIONS_IMAGES ] = UseLoadedButtonImage( iSMPanelImages[ STANCEUP_IMAGES ] ,-1,24,-1,25,-1 );
}
*/
iSMPanelImages[ OPTIONS_IMAGES ] = UseLoadedButtonImage( iSMPanelImages[ STANCEUP_IMAGES ] ,-1,24,-1,25,-1 );
iBurstButtonImages[ WM_NORMAL ] = UseLoadedButtonImage( iSMPanelImages[ STANCEUP_IMAGES ], -1, 7, -1, -1, -1 );
@@ -2238,13 +2162,6 @@ BOOLEAN CreateSMPanelButtons( )
iBurstButtonImages[ WM_ATTACHED_GL_BURST ] = UseLoadedButtonImage( iSMPanelImages[ STANCEUP_IMAGES ], -1, 17, -1, -1, -1 );
iBurstButtonImages[ WM_ATTACHED_GL_AUTO ] = UseLoadedButtonImage( iSMPanelImages[ STANCEUP_IMAGES ], -1, 17, -1, -1, -1 );
//Legion by JAzz
//DisableButton
//if (gGameExternalOptions.fCanJumpThroughWindows == TRUE)
//{
// iSMPanelImages[ HOP_IMAGES ] = LoadButtonImage(ubString2,-1,2,-1,3,-1 );
//}
FilenameForBPP("INTERFACE\\invadd-ons.sti", ubString);
// Load button Graphics
iSMPanelImages[ STANCE_IMAGES ] = LoadButtonImage(ubString,0,0,-1,2,-1 );
@@ -2263,30 +2180,7 @@ BOOLEAN CreateSMPanelButtons( )
// SET BUTTONS TO -1
memset( iSMPanelButtons, -1, sizeof( iSMPanelButtons ) );
//Legion by Jazz
//DisableButton
/*if (gGameExternalOptions.fCanJumpThroughWindows == TRUE)
{
if (UsingNewInventorySystem() == true)
{
iSMPanelButtons[ HOP_BUTTON ] = QuickCreateButton( iSMPanelImages[ HOP_IMAGES ], SM_BURSTMODEB_X-30, SM_BURSTMODEB_Y,
BUTTON_TOGGLE, MSYS_PRIORITY_HIGH - 1,
DEFAULT_MOVE_CALLBACK, (GUI_CALLBACK)BtnOknoCallback );
}
else
{
iSMPanelButtons[ HOP_BUTTON ] = QuickCreateButton( iSMPanelImages[ HOP_IMAGES ], SM_BURSTMODEB_X-98, SM_BURSTMODEB_Y+35,
BUTTON_TOGGLE, MSYS_PRIORITY_HIGH - 1,
DEFAULT_MOVE_CALLBACK, (GUI_CALLBACK)BtnOknoCallback );
}
}
*/
//-----------------------
iSMPanelButtons[ SM_MAP_SCREEN_BUTTON ] = QuickCreateButton( iSMPanelImages[ MAPSCREEN_IMAGES ], SM_MAPSCREEN_X, SM_MAPSCREEN_Y,
BUTTON_TOGGLE, MSYS_PRIORITY_HIGH - 1,
DEFAULT_MOVE_CALLBACK, (GUI_CALLBACK)BtnMapScreenCallback );
@@ -2477,13 +2371,13 @@ void RemoveSMPanelButtons( )
RemoveButton( giSMStealthButton );
}
RenderBackpackButtons(1); /* CHRISL: Needed for new inventory backpack buttons */
RenderBackpackButtons(DEACTIVATE_BUTTON); /* CHRISL: Needed for new inventory backpack buttons */
if ( giSMStealthImages != -1 )
{
UnloadButtonImage( giSMStealthImages );
}
RenderBackpackButtons(4); /* CHRISL: Needed for new inventory backpack buttons */
RenderBackpackButtons(UNLOAD_BUTTON); /* CHRISL: Needed for new inventory backpack buttons */
UnloadButtonImage( iBurstButtonImages[ WM_NORMAL ] );
UnloadButtonImage( iBurstButtonImages[ WM_BURST ] );
@@ -2525,6 +2419,8 @@ BOOLEAN ShutdownSMPanel( )
// shutdown keyring interface
ShutdownKeyRingInterface( );
ShutdownInventoryInterface();
MSYS_RemoveRegion( &gSMPanelRegion );
MSYS_RemoveRegion( &gSM_SELMERCPanelRegion );
MSYS_RemoveRegion( &gSM_SELMERCBarsRegion );
@@ -3079,6 +2975,10 @@ void RenderSMPanel( BOOLEAN *pfDirty )
RenderClock( INTERFACE_CLOCK_X, INTERFACE_CLOCK_Y );
CreateMouseRegionForPauseOfClock( INTERFACE_CLOCK_X, INTERFACE_CLOCK_Y );
}
else
{
RemoveMouseRegionForPauseOfClock();
}
// CHRISL: Change function call to include X,Y coordinates.
RenderTownIDString( LOCATION_NAME_X, LOCATION_NAME_Y );
@@ -3268,78 +3168,57 @@ void SMInvClickCamoCallback( MOUSE_REGION * pRegion, INT32 iReason )
{
if (gGameExternalOptions.fShowCamouflageFaces == TRUE )
{
if ( gpSMCurrentMerc->bCamo > 0 )
{
gCamoFace[gpSMCurrentMerc->ubProfile].gCamoface = TRUE;
SetCamoFace( gpSMCurrentMerc );
DeleteSoldierFace( gpSMCurrentMerc );// remove face
gpSMCurrentMerc->iFaceIndex = InitSoldierFace( gpSMCurrentMerc );// create new face
}
if ( gpSMCurrentMerc->urbanCamo > 0 )
{
gCamoFace[gpSMCurrentMerc->ubProfile].gUrbanCamoface = TRUE;
DeleteSoldierFace( gpSMCurrentMerc );// remove face
gpSMCurrentMerc->iFaceIndex = InitSoldierFace( gpSMCurrentMerc );// create new face
}
if ( gpSMCurrentMerc->desertCamo > 0)
{
gCamoFace[gpSMCurrentMerc->ubProfile].gDesertCamoface = TRUE;
DeleteSoldierFace( gpSMCurrentMerc );// remove face
gpSMCurrentMerc->iFaceIndex = InitSoldierFace( gpSMCurrentMerc );// create new face
}
if ( gpSMCurrentMerc->snowCamo > 0)
{
gCamoFace[gpSMCurrentMerc->ubProfile].gSnowCamoface = TRUE;
DeleteSoldierFace( gpSMCurrentMerc );// remove face
gpSMCurrentMerc->iFaceIndex = InitSoldierFace( gpSMCurrentMerc );// create new face
}
}
// Dirty
fInterfacePanelDirty = DIRTYLEVEL2;
// Dirty
fInterfacePanelDirty = DIRTYLEVEL2;
// Check if it's the same now!
if ( gpItemPointer->exists() == false )
{
gbCompatibleApplyItem = FALSE;
EndItemPointer( );
// Check if it's the same now!
if ( gpItemPointer->exists() == false )
{
gbCompatibleApplyItem = FALSE;
EndItemPointer( );
}
// Say OK acknowledge....
gpSMCurrentMerc->DoMercBattleSound( BATTLE_SOUND_COOL1 );
}
// Say OK acknowledge....
gpSMCurrentMerc->DoMercBattleSound( BATTLE_SOUND_COOL1 );
}
}
else if ( ApplyCanteen( gpSMCurrentMerc, gpItemPointer, &fGoodAPs ) )
{
// Dirty
if ( fGoodAPs )
{
fInterfacePanelDirty = DIRTYLEVEL2;
// Check if it's the same now!
if ( gpItemPointer->exists() == false )
if ( fGoodAPs )
{
gbCompatibleApplyItem = FALSE;
EndItemPointer( );
fInterfacePanelDirty = DIRTYLEVEL2;
// Check if it's the same now!
if ( gpItemPointer->exists() == false )
{
gbCompatibleApplyItem = FALSE;
EndItemPointer( );
}
}
}
}
else if ( ApplyElixir( gpSMCurrentMerc, gpItemPointer, &fGoodAPs ) )
{
if ( fGoodAPs )
{
// Dirty
fInterfacePanelDirty = DIRTYLEVEL2;
// Check if it's the same now!
if ( gpItemPointer->exists() == false )
if ( fGoodAPs )
{
gbCompatibleApplyItem = FALSE;
EndItemPointer( );
}
// Dirty
fInterfacePanelDirty = DIRTYLEVEL2;
// Say OK acknowledge....
gpSMCurrentMerc->DoMercBattleSound( BATTLE_SOUND_COOL1 );
}
// Check if it's the same now!
if ( gpItemPointer->exists() == false )
{
gbCompatibleApplyItem = FALSE;
EndItemPointer( );
}
// Say OK acknowledge....
gpSMCurrentMerc->DoMercBattleSound( BATTLE_SOUND_COOL1 );
}
}
else if ( ApplyDrugs( gpSMCurrentMerc, gpItemPointer ) )
{
@@ -3586,7 +3465,7 @@ void SMInvClickCallback( MOUSE_REGION * pRegion, INT32 iReason )
break;
}
}
RenderBackpackButtons(0); /* CHRISL: Needed for new inventory backpack buttons */
RenderBackpackButtons(ACTIVATE_BUTTON); /* CHRISL: Needed for new inventory backpack buttons */
}
}
@@ -3724,7 +3603,7 @@ void SMInvClickCallback( MOUSE_REGION * pRegion, INT32 iReason )
return;
if(gpSMCurrentMerc->flags.DropPackFlag)
gpSMCurrentMerc->flags.DropPackFlag = FALSE;
RenderBackpackButtons(0); /* CHRISL: Needed for new inventory backpack buttons */
RenderBackpackButtons(ACTIVATE_BUTTON); /* CHRISL: Needed for new inventory backpack buttons */
}
}
@@ -3740,7 +3619,7 @@ void SMInvClickCallback( MOUSE_REGION * pRegion, INT32 iReason )
// try to place the item in the cursor into this inventory slot
if ( UIHandleItemPlacement( (UINT8) uiHandPos, usOldItemIndex, usNewItemIndex, fDeductPoints ) )
{
RenderBackpackButtons(0); /* CHRISL: Needed for new inventory backpack buttons */
RenderBackpackButtons(ACTIVATE_BUTTON); /* CHRISL: Needed for new inventory backpack buttons */
// it worked! if we're in the SKI...
if( guiTacticalInterfaceFlags & INTERFACE_SHOPKEEP_INTERFACE )
{
@@ -4445,9 +4324,9 @@ void BtnClimbCallback(GUI_BUTTON *btn,INT32 reason)
if (gGameExternalOptions.fCanClimbOnWalls == TRUE)
{
if ( FindFenceDirection( gpSMCurrentMerc, gpSMCurrentMerc->sGridNo, gpSMCurrentMerc->ubDirection, &bDirection ) )
if ( FindWallJumpDirection( gpSMCurrentMerc, gpSMCurrentMerc->sGridNo, gpSMCurrentMerc->ubDirection, &bDirection ) )
{
gpSMCurrentMerc->BeginSoldierFence( );
gpSMCurrentMerc->BeginSoldierClimbWall( );
}
}
@@ -4457,7 +4336,6 @@ void BtnClimbCallback(GUI_BUTTON *btn,INT32 reason)
{
gpSMCurrentMerc->BeginSoldierClimbFence( );
}
}
else if(reason & MSYS_CALLBACK_REASON_LOST_MOUSE )
{
@@ -7192,11 +7070,6 @@ void KeyRingSlotInvClickCallback( MOUSE_REGION * pRegion, INT32 iReason )
void DisableSMPpanelButtonsWhenInShopKeeperInterface( BOOLEAN fDontDrawButtons )
{
//Go through the buttons that will be under the ShopKeepers ATM panel and disable them
//DisableButton
//if (gGameExternalOptions.fCanJumpThroughWindows == TRUE)
//{
//DisableButton( iSMPanelButtons[ HOP_BUTTON ] ); //Legion by Jazz
//}
DisableButton( iSMPanelButtons[ STANCEUP_BUTTON ] );
DisableButton( iSMPanelButtons[ UPDOWN_BUTTON ] );
DisableButton( iSMPanelButtons[ CLIMB_BUTTON ] );
@@ -7216,10 +7089,6 @@ void DisableSMPpanelButtonsWhenInShopKeeperInterface( BOOLEAN fDontDrawButtons )
DisableButton( iSMPanelButtons[ SM_MAP_SCREEN_BUTTON ] );
//DisableButton
//if (gGameExternalOptions.fCanJumpThroughWindows == TRUE)
//{
//DisableButton( iSMPanelButtons[ HOP_BUTTON ] ); //legion by Jazz
//}
DisableButton( iSMPanelButtons[ STANCEUP_BUTTON ] );
DisableButton( iSMPanelButtons[ UPDOWN_BUTTON ] );
DisableButton( iSMPanelButtons[ CLIMB_BUTTON ] );
@@ -7231,20 +7100,15 @@ void DisableSMPpanelButtonsWhenInShopKeeperInterface( BOOLEAN fDontDrawButtons )
DisableButton( iSMPanelButtons[ MUTE_BUTTON ] );
DisableButton( giSMStealthButton );
RenderBackpackButtons(3); /* CHRISL: Needed for new inventory backpack buttons */
RenderBackpackButtons(DISABLE_BUTTON); /* CHRISL: Needed for new inventory backpack buttons */
if( fDontDrawButtons )
{
//ATM:
//Go through the buttons that will be under the ShopKeepers ATM panel and disable them
//DisableButton
//if (gGameExternalOptions.fCanJumpThroughWindows == TRUE)
//{
//ButtonList[ iSMPanelButtons[ HOP_BUTTON ] ]->uiFlags &= ~BUTTON_DIRTY; //Legion by Jazz
//}
ButtonList[ iSMPanelButtons[ STANCEUP_BUTTON ] ]->uiFlags &= ~BUTTON_DIRTY;
ButtonList[ iSMPanelButtons[ UPDOWN_BUTTON ] ]->uiFlags &= ~BUTTON_DIRTY;
ButtonList[ iSMPanelButtons[ CLIMB_BUTTON ] ]->uiFlags &= ~BUTTON_DIRTY;
@@ -7271,10 +7135,6 @@ void DisableSMPpanelButtonsWhenInShopKeeperInterface( BOOLEAN fDontDrawButtons )
ButtonList[ iSMPanelButtons[ SM_MAP_SCREEN_BUTTON ] ]->uiFlags &= ~BUTTON_ENABLED;
//DisableButton
//if (gGameExternalOptions.fCanJumpThroughWindows == TRUE)
//{
//ButtonList[ iSMPanelButtons[ HOP_BUTTON ] ]->uiFlags |= BUTTON_FORCE_UNDIRTY; //legion by Jazz
//}
ButtonList[ iSMPanelButtons[ STANCEUP_BUTTON ] ]->uiFlags |= BUTTON_FORCE_UNDIRTY;
ButtonList[ iSMPanelButtons[ UPDOWN_BUTTON ] ]->uiFlags |= BUTTON_FORCE_UNDIRTY;
ButtonList[ iSMPanelButtons[ CLIMB_BUTTON ] ]->uiFlags |= BUTTON_FORCE_UNDIRTY;
@@ -7457,75 +7317,6 @@ void GoToMapScreenFromTactical( void )
gfEnteringMapScreen = TRUE;
}
//-------------Legion by Jazz-----------------------------------
void BtnOknoCallback(GUI_BUTTON *btn,INT32 reason)
{
INT8 bDirection;
if (!(btn->uiFlags & BUTTON_ENABLED))
return;
if ( gpSMCurrentMerc->pathing.bLevel == 1 )
{
return;
}
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
{
btn->uiFlags |= BUTTON_CLICKED_ON;
}
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
{
btn->uiFlags &= (~BUTTON_CLICKED_ON );
if ( FindWindowJumpDirection( gpSMCurrentMerc, gpSMCurrentMerc->sGridNo, gpSMCurrentMerc->ubDirection, &bDirection ) )
{
gpSMCurrentMerc->BeginSoldierClimbWindow( );
}
}
else if(reason & MSYS_CALLBACK_REASON_LOST_MOUSE )
{
btn->uiFlags &= (~BUTTON_CLICKED_ON );
}
}
void BtnFenceCallback(GUI_BUTTON *btn,INT32 reason)
{
BOOLEAN fNearHeigherLevelFence;
BOOLEAN fNearLowerLevelFence;
INT8 bDirection;
if (!(btn->uiFlags & BUTTON_ENABLED))
return;
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
{
btn->uiFlags |= BUTTON_CLICKED_ON;
}
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
{
btn->uiFlags &= (~BUTTON_CLICKED_ON );
GetMercFenceDirection( gpSMCurrentMerc->ubID, &fNearLowerLevelFence, &fNearHeigherLevelFence );
if ( FindFenceDirection( gpSMCurrentMerc, gpSMCurrentMerc->sGridNo, gpSMCurrentMerc->ubDirection, &bDirection ) )
{
gpSMCurrentMerc->BeginSoldierFence( );
}
}
else if(reason & MSYS_CALLBACK_REASON_LOST_MOUSE )
{
btn->uiFlags &= (~BUTTON_CLICKED_ON );
}
}
//----LEGION 2---------
BOOLEAN HandleKlerykPistolet( SOLDIERTYPE *pSoldier, UINT32 uiHandPos, UINT16 usReplaceItem )
{
+209 -88
View File
@@ -115,8 +115,12 @@ UINT8 gubProgCurEnemy = 0;
UINT32 guiPORTRAITICONS;
UINT32 guiPORTRAITICONS_NV; //legion
UINT32 guiPORTRAITICONS_GAS_MASK; //legion
//UINT32 guiPORTRAITICONS_NV; //legion
//UINT32 guiPORTRAITICONS_GAS_MASK; //legion
// WANNE: Additional face gear file for IMPs
//UINT32 guiPORTRAITICONS_NV_IMP;
//UINT32 guiPORTRAITICONS_GAS_MASK_IMP;
typedef struct
{
@@ -275,6 +279,10 @@ BOOLEAN InitializeTacticalInterface( )
{
VSURFACE_DESC vs_desc;
VOBJECT_DESC VObjectDesc;
UINT32 iCounter2;
char fileName[500];
// CHRISL: Setup default interface coords based on inventory system in use
if((UsingNewInventorySystem() == true))
@@ -414,7 +422,7 @@ BOOLEAN InitializeTacticalInterface( )
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
//legion 2 jazz
if (gGameExternalOptions.fShowTacticalFaceIcons == TRUE)
if (gGameSettings.fOptions[ TOPTION_SHOW_TACTICAL_FACE_ICONS ] == TRUE)
{
//additional face icons (legion 2)
if (gGameExternalOptions.bTacticalFaceIconStyle == 0)
@@ -457,15 +465,56 @@ BOOLEAN InitializeTacticalInterface( )
//legion
if (gGameExternalOptions.fShowTacticalFaceGear == TRUE)
if (gGameSettings.fOptions[ TOPTION_SHOW_TACTICAL_FACE_GEAR ] == TRUE)
{
FilenameForBPP("INTERFACE\\portraiticons_NV.sti", VObjectDesc.ImageFile);
/*
FilenameForBPP("INTERFACE\\portraiticons_NV.sti", VObjectDesc.ImageFile);
if( !AddVideoObject( &VObjectDesc, &guiPORTRAITICONS_NV ) )
AssertMsg(0, "Missing INTERFACE\\portraiticons_NV.sti" );
FilenameForBPP("INTERFACE\\portraiticons_GAS_MASK.sti", VObjectDesc.ImageFile);
FilenameForBPP("INTERFACE\\portraiticons_NV_IMP.sti", VObjectDesc.ImageFile);
if( !AddVideoObject( &VObjectDesc, &guiPORTRAITICONS_NV_IMP ) )
AssertMsg(0, "Missing INTERFACE\\portraiticons_NV_IMP.sti" );
FilenameForBPP("INTERFACE\\portraiticons_GAS_MASK.sti", VObjectDesc.ImageFile);
if( !AddVideoObject( &VObjectDesc, &guiPORTRAITICONS_GAS_MASK ) )
AssertMsg(0, "Missing INTERFACE\\portraiticons_GAS_MASK.sti" );
AssertMsg(0, "Missing INTERFACE\\portraiticons_GAS_MASK.sti" );
FilenameForBPP("INTERFACE\\portraiticons_GAS_MASK_IMP.sti", VObjectDesc.ImageFile);
if( !AddVideoObject( &VObjectDesc, &guiPORTRAITICONS_GAS_MASK_IMP ) )
AssertMsg(0, "Missing INTERFACE\\portraiticons_GAS_MASK_IMP.sti" );
*/
for( iCounter2 = 1; iCounter2 < MAXITEMS; iCounter2++ )
{
VObjectDesc.fCreateFlags = VSURFACE_CREATE_FROMFILE;
#define SCSTI ".STI"
if ( zNewFaceGear[iCounter2].Type > 0 )
{
strcpy(fileName, zNewFaceGear[iCounter2].szFile);
strcat(fileName, SCSTI);
strcpy(VObjectDesc.ImageFile, fileName);
CHECKF(AddVideoObject(&VObjectDesc,&zNewFaceGear[iCounter2].uiIndex));
}
}
for( iCounter2 = 1; iCounter2 < MAXITEMS; iCounter2++ )
{
VObjectDesc.fCreateFlags = VSURFACE_CREATE_FROMFILE;
#define SCSTI_IMP "_IMP.STI"
if ( zNewFaceGear[iCounter2].Type > 0 )
{
//IMP
strcpy(fileName, zNewFaceGear[iCounter2].szFile);
strcat(fileName, SCSTI_IMP);
strcpy(VObjectDesc.ImageFile, fileName);
CHECKF(AddVideoObject(&VObjectDesc,&zNewFaceGearIMP[iCounter2].uiIndex));
}
}
}
// LOAD RADIO
@@ -2202,17 +2251,10 @@ BOOLEAN DrawCTHIndicator()
// Select the color of the indicator circles
UINT16 usCApertureBar;
if (pSoldier->bDoAutofire && fAutofireBulletsMode)
{
// When autofire bullets mode is selected, the CTH display goes greyish. This indicates to the player
// that the aiming levels have been set, and further right-clicks will only add bullets to the volley.
usCApertureBar = Get16BPPColor( FROMRGB( 180, 180, 180 ) );
}
else
{
// Indicator changes color from red to yellow to green, based on how well the gun is aimed.
usCApertureBar = Get16BPPColor( FROMRGB( ColorsRed[gCTHDisplay.MuzzleSwayPercentage/10], ColorsGreen[gCTHDisplay.MuzzleSwayPercentage/10], 0 ) ); // Crosshair color shifts from red (longshot) to green (Accurate shot)
}
// CHRISL: Instead of shigting the color based on MuzzleSwayPercent, let's move this line and base it on the final iAperture value
// Indicator changes color from red to yellow to green, based on how well the gun is aimed.
//usCApertureBar = Get16BPPColor( FROMRGB( ColorsRed[gCTHDisplay.MuzzleSwayPercentage/10], ColorsGreen[gCTHDisplay.MuzzleSwayPercentage/10], 0 ) ); // Crosshair color shifts from red (longshot) to green (Accurate shot)
UINT16 usCApertureBorder = Get16BPPColor( FROMRGB( 10, 10, 10 ) ); // Boundaries in dark color.
@@ -2268,7 +2310,12 @@ BOOLEAN DrawCTHIndicator()
iAperture = ((100 - actualPct) * iAperture) / 100;
/////////////////////////////////////////////
// Factor in Gun Accuracy. Note that I may remove this at a later time.
// Factor in Weapon "Effective Range".
UINT16 sEffRange = Weapon[Item[pSoldier->inv[pSoldier->ubAttackingHand].usItem].ubClassIndex].usRange + GetRangeBonus(&(pSoldier->inv[ pSoldier->ubAttackingHand ]));
FLOAT iRangeRatio = __max(1.0f, (FLOAT)(d2DDistance / sEffRange));
/////////////////////////////////////////////
// Factor in Gun Accuracy.
INT16 sAccuracy = GetGunAccuracy( &(pSoldier->inv[ pSoldier->ubAttackingHand ]) );
@@ -2276,6 +2323,8 @@ BOOLEAN DrawCTHIndicator()
sAccuracy = __min(100, sAccuracy);
FLOAT iBulletDev = (gGameCTHConstants.MAX_BULLET_DEV * (100-sAccuracy)) / 100;
if( gGameCTHConstants.RANGE_EFFECTS_DEV == TRUE )
iBulletDev *= iRangeRatio;
iBulletDev *= iDistanceRatio;
// Since bullet dev is only affected by distance, we add it last as a flat modifier.
@@ -2283,6 +2332,28 @@ BOOLEAN DrawCTHIndicator()
iMaxAperture += iBulletDev;
iAperture += iBulletDev;
// CHRISL: Moved here so we can base the cursor color on the iAperture value
UINT8 iColorCode = 0;
if(iAperture < 3.0)
iColorCode = 9;
else if(iAperture < 6.0)
iColorCode = 8;
else if(iAperture < 9.0)
iColorCode = 7;
else if(iAperture < 12.0)
iColorCode = 6;
else if(iAperture < 16.0)
iColorCode = 5;
else if(iAperture < 20.0)
iColorCode = 4;
else if(iAperture < 25.0)
iColorCode = 3;
else if(iAperture < 30.0)
iColorCode = 2;
else if(iAperture < 40.0)
iColorCode = 1;
usCApertureBar = Get16BPPColor( FROMRGB( ColorsRed[iColorCode], ColorsGreen[iColorCode], 0 ) ); // Crosshair color shifts from red (longshot) to green (Accurate shot)
///////////////////////////////////////////////////////////////////////////////////////////////////
// HEADROCK HAM 4: Calculate Screen Positions
//
@@ -2446,6 +2517,53 @@ BOOLEAN DrawCTHIndicator()
MagRect.right = sCenter + (usTotalWidth / 2);
}
#ifdef JA2BETAVERSION
/////////////// SHOT APERTURE SIZE
{
// Create a pointer to the Frame Buffer which we are going to draw directly into.
SetFont( TINYFONT1 );
SetFontBackground( FONT_MCOLOR_BLACK );
SetFontForeground( FONT_MCOLOR_WHITE );
// Find coordinates, using the full string ("XX AP")
swprintf( pStr, L"%3.2f", iAperture );
FindFontCenterCoordinates( (INT16)APRect.left, (INT16)APRect.top-5, (INT16)APRect.right-(INT16)APRect.left, 5, pStr, TINYFONT1, &curX, &curY);
// Find width of this string.
UINT16 usTotalWidth = StringPixLength ( pStr, TINYFONT1 );
// Draw to screen
gprintfdirty( curX, curY, pStr );
mprintf( curX, curY, pStr);
// Redefine area size based on total width plus a margin of 2 pixels.
usTotalWidth = usTotalWidth + 6;
INT16 sCenter = (INT16)((APRect.right + APRect.left) / 2);
APRect.left = sCenter - (usTotalWidth / 2);
APRect.right = sCenter + (usTotalWidth / 2);
}
/////////////// DISTANCE APERTURE SIZE
{
SetFont( TINYFONT1 );
// Find coordinates, using full string ("X.X x")
swprintf( pStr, L"%3.2f", iMaxAperture );
FindFontCenterCoordinates( (INT16)MagRect.left, (INT16)MagRect.top-5, (INT16)MagRect.right-(INT16)MagRect.left, 5, pStr, TINYFONT1, &curX, &curY);
// Find width of this string.
UINT16 usTotalWidth = StringPixLength ( pStr, TINYFONT1 );
// Draw to screen
gprintfdirty( curX, curY, pStr );
mprintf( curX, curY, pStr);
// Redefine area size based on total width plus a margin of 2 pixels.
usTotalWidth = usTotalWidth + 6;
INT16 sCenter = (INT16)((MagRect.right + MagRect.left) / 2);
MagRect.left = sCenter - (usTotalWidth / 2);
MagRect.right = sCenter + (usTotalWidth / 2);
}
#endif
//////////////////// BURST/AUTO LABEL AND BULLETS
if (pSoldier->bDoBurst)
{
@@ -2826,96 +2944,99 @@ BOOLEAN DrawCTHIndicator()
INT32 Circ = 0;
Circ = (INT32)((iMaxAperture * RADIANS_IN_CIRCLE) * dVerticalBias);
// Draw outer circle
for (INT32 iCurPoint = 0; iCurPoint < Circ; iCurPoint++)
if(gGameSettings.fOptions[ TOPTION_CTH_CURSOR ])
{
curX = (INT16)(iMaxAperture * cos((iCurPoint * RADIANS_IN_CIRCLE)/Circ));
curY = (INT16)((iMaxAperture * dVerticalBias) * sin((iCurPoint * RADIANS_IN_CIRCLE)/Circ));
INT16 firstX = curX;
INT16 firstY = curY;
// Draw outer circle
for (INT32 iCurPoint = 0; iCurPoint < Circ; iCurPoint++)
{
curX = (INT16)(iMaxAperture * cos((iCurPoint * RADIANS_IN_CIRCLE)/Circ));
curY = (INT16)((iMaxAperture * dVerticalBias) * sin((iCurPoint * RADIANS_IN_CIRCLE)/Circ));
INT16 firstX = curX;
INT16 firstY = curY;
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX+curX, sStartScreenY+curY+(INT16)zOffset, usCApertureBar );
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX+curX, sStartScreenY+curY+(INT16)zOffset, usCApertureBar );
// Draw a border circle which is 1 point wider
curX = (INT16)((iMaxAperture+1) * cos((iCurPoint * RADIANS_IN_CIRCLE)/Circ));
curY = (INT16)(((iMaxAperture * dVerticalBias)+1) * sin((iCurPoint * RADIANS_IN_CIRCLE)/Circ));
// Draw a border circle which is 1 point wider
curX = (INT16)((iMaxAperture+1) * cos((iCurPoint * RADIANS_IN_CIRCLE)/Circ));
curY = (INT16)(((iMaxAperture * dVerticalBias)+1) * sin((iCurPoint * RADIANS_IN_CIRCLE)/Circ));
if (curX != firstX || curY != firstY)
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX+curX, sStartScreenY+curY+(INT16)zOffset, usCApertureBorder );
if (curX != firstX || curY != firstY)
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX+curX, sStartScreenY+curY+(INT16)zOffset, usCApertureBorder );
// Draw a border circle which is 1 point narrower
curX = (INT16)((iMaxAperture-1) * cos((iCurPoint * RADIANS_IN_CIRCLE)/Circ));
curY = (INT16)(((iMaxAperture * dVerticalBias)-1) * sin((iCurPoint * RADIANS_IN_CIRCLE)/Circ));
// Draw a border circle which is 1 point narrower
curX = (INT16)((iMaxAperture-1) * cos((iCurPoint * RADIANS_IN_CIRCLE)/Circ));
curY = (INT16)(((iMaxAperture * dVerticalBias)-1) * sin((iCurPoint * RADIANS_IN_CIRCLE)/Circ));
if (curX != firstX || curY != firstY)
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX+curX, sStartScreenY+curY+(INT16)zOffset, usCApertureBorder );
}
if (curX != firstX || curY != firstY)
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX+curX, sStartScreenY+curY+(INT16)zOffset, usCApertureBorder );
}
Circ = (INT32)((iAperture * RADIANS_IN_CIRCLE) * dVerticalBias);
// Draw inner circle
for (INT32 iCurPoint = 0; iCurPoint < Circ; iCurPoint++)
{
curX = (INT16)(iAperture * cos((iCurPoint * RADIANS_IN_CIRCLE)/Circ));
curY = (INT16)((iAperture * dVerticalBias) * sin((iCurPoint * RADIANS_IN_CIRCLE)/Circ));
INT16 firstX = curX;
INT16 firstY = curY;
Circ = (INT32)((iAperture * RADIANS_IN_CIRCLE) * dVerticalBias);
// Draw inner circle
for (INT32 iCurPoint = 0; iCurPoint < Circ; iCurPoint++)
{
curX = (INT16)(iAperture * cos((iCurPoint * RADIANS_IN_CIRCLE)/Circ));
curY = (INT16)((iAperture * dVerticalBias) * sin((iCurPoint * RADIANS_IN_CIRCLE)/Circ));
INT16 firstX = curX;
INT16 firstY = curY;
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX+curX, sStartScreenY+curY+(INT16)zOffset, usCApertureBar );
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX+curX, sStartScreenY+curY+(INT16)zOffset, usCApertureBar );
// Draw a border circle which is 1 point wider
curX = (INT16)((iAperture+1) * cos((iCurPoint * RADIANS_IN_CIRCLE)/Circ));
curY = (INT16)(((iAperture * dVerticalBias)+1) * sin((iCurPoint * RADIANS_IN_CIRCLE)/Circ));
// Draw a border circle which is 1 point wider
curX = (INT16)((iAperture+1) * cos((iCurPoint * RADIANS_IN_CIRCLE)/Circ));
curY = (INT16)(((iAperture * dVerticalBias)+1) * sin((iCurPoint * RADIANS_IN_CIRCLE)/Circ));
if (curX != firstX || curY != firstY)
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX+curX, sStartScreenY+curY+(INT16)zOffset, usCApertureBorder );
if (curX != firstX || curY != firstY)
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX+curX, sStartScreenY+curY+(INT16)zOffset, usCApertureBorder );
// Draw a border circle which is 1 point narrower
curX = (INT16)((iAperture-1) * cos((iCurPoint * RADIANS_IN_CIRCLE)/Circ));
curY = (INT16)(((iAperture * dVerticalBias)-1) * sin((iCurPoint * RADIANS_IN_CIRCLE)/Circ));
// Draw a border circle which is 1 point narrower
curX = (INT16)((iAperture-1) * cos((iCurPoint * RADIANS_IN_CIRCLE)/Circ));
curY = (INT16)(((iAperture * dVerticalBias)-1) * sin((iCurPoint * RADIANS_IN_CIRCLE)/Circ));
if (curX != firstX || curY != firstY)
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX+curX, sStartScreenY+curY+(INT16)zOffset, usCApertureBorder );
}
if (curX != firstX || curY != firstY)
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX+curX, sStartScreenY+curY+(INT16)zOffset, usCApertureBorder );
}
// Aperture Crosshairs
for (INT16 cnt = (INT16)(iAperture); cnt <= (INT16)(iAperture + uiApertureBarLength); cnt++)
{
// Horizontal Aperture Crosshairs
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX+cnt, sStartScreenY+(INT16)zOffset, usCApertureBar );
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX-cnt, sStartScreenY+(INT16)zOffset, usCApertureBar );
// Aperture Crosshairs
for (INT16 cnt = (INT16)(iAperture); cnt <= (INT16)(iAperture + uiApertureBarLength); cnt++)
{
// Horizontal Aperture Crosshairs
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX+cnt, sStartScreenY+(INT16)zOffset, usCApertureBar );
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX-cnt, sStartScreenY+(INT16)zOffset, usCApertureBar );
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX+cnt, (sStartScreenY+1)+(INT16)zOffset, usCApertureBar );
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX-cnt, (sStartScreenY+1)+(INT16)zOffset, usCApertureBar );
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX+cnt, (sStartScreenY+1)+(INT16)zOffset, usCApertureBar );
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX-cnt, (sStartScreenY+1)+(INT16)zOffset, usCApertureBar );
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX+cnt, (sStartScreenY-1)+(INT16)zOffset, usCApertureBar );
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX-cnt, (sStartScreenY-1)+(INT16)zOffset, usCApertureBar );
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX+cnt, (sStartScreenY-1)+(INT16)zOffset, usCApertureBar );
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX-cnt, (sStartScreenY-1)+(INT16)zOffset, usCApertureBar );
// Darker borders
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX+cnt, (sStartScreenY+2)+(INT16)zOffset, usCApertureBorder );
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX-cnt, (sStartScreenY+2)+(INT16)zOffset, usCApertureBorder );
// Darker borders
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX+cnt, (sStartScreenY+2)+(INT16)zOffset, usCApertureBorder );
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX-cnt, (sStartScreenY+2)+(INT16)zOffset, usCApertureBorder );
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX+cnt, (sStartScreenY-2)+(INT16)zOffset, usCApertureBorder );
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX-cnt, (sStartScreenY-2)+(INT16)zOffset, usCApertureBorder );
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX+cnt, (sStartScreenY-2)+(INT16)zOffset, usCApertureBorder );
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX-cnt, (sStartScreenY-2)+(INT16)zOffset, usCApertureBorder );
}
for (INT16 cnt = (INT16)(iAperture * dVerticalBias); cnt <= (INT16)((iAperture * dVerticalBias) + uiApertureBarLength); cnt++)
{
// Vertical Aperture Crosshairs
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX, (sStartScreenY+cnt)+(INT16)zOffset, usCApertureBar );
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX, (sStartScreenY-cnt)+(INT16)zOffset, usCApertureBar );
}
for (INT16 cnt = (INT16)(iAperture * dVerticalBias); cnt <= (INT16)((iAperture * dVerticalBias) + uiApertureBarLength); cnt++)
{
// Vertical Aperture Crosshairs
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX, (sStartScreenY+cnt)+(INT16)zOffset, usCApertureBar );
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX, (sStartScreenY-cnt)+(INT16)zOffset, usCApertureBar );
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX+1, (sStartScreenY+cnt)+(INT16)zOffset, usCApertureBar );
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX+1, (sStartScreenY-cnt)+(INT16)zOffset, usCApertureBar );
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX+1, (sStartScreenY+cnt)+(INT16)zOffset, usCApertureBar );
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX+1, (sStartScreenY-cnt)+(INT16)zOffset, usCApertureBar );
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX-1, (sStartScreenY+cnt)+(INT16)zOffset, usCApertureBar );
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX-1, (sStartScreenY-cnt)+(INT16)zOffset, usCApertureBar );
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX-1, (sStartScreenY+cnt)+(INT16)zOffset, usCApertureBar );
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX-1, (sStartScreenY-cnt)+(INT16)zOffset, usCApertureBar );
// Darker borders
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX+2, (sStartScreenY+cnt)+(INT16)zOffset, usCApertureBorder );
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX+2, (sStartScreenY-cnt)+(INT16)zOffset, usCApertureBorder );
// Darker borders
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX+2, (sStartScreenY+cnt)+(INT16)zOffset, usCApertureBorder );
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX+2, (sStartScreenY-cnt)+(INT16)zOffset, usCApertureBorder );
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX-2, (sStartScreenY+cnt)+(INT16)zOffset, usCApertureBorder );
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX-2, (sStartScreenY-cnt)+(INT16)zOffset, usCApertureBorder );
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX-2, (sStartScreenY+cnt)+(INT16)zOffset, usCApertureBorder );
DrawCTHPixelToBuffer( ptrBuf, uiPitch, sLeft, sTop, sRight, sBottom, sStartScreenX-2, (sStartScreenY-cnt)+(INT16)zOffset, usCApertureBorder );
}
}
// Unlock the Frame Buffer.
+12 -2
View File
@@ -32,6 +32,12 @@ enum
NUM_ICONS
};
#define ACTIVATE_BUTTON 0
#define DEACTIVATE_BUTTON 1
#define ENABLE_BUTTON 2
#define DISABLE_BUTTON 3
#define UNLOAD_BUTTON 4
#define MAX_ENEMY_NAMES_CHARS 128
typedef struct
@@ -164,8 +170,12 @@ extern UINT32 guiITEMPOINTERHATCHES;
//legion
extern UINT32 guiPORTRAITICONS_NV; //legion: NV-Face Graphic
extern UINT32 guiPORTRAITICONS_GAS_MASK; //legion: GASMASK-Face Graphic
//extern UINT32 guiPORTRAITICONS_NV; //legion: NV-Face Graphic
//extern UINT32 guiPORTRAITICONS_GAS_MASK; //legion: GASMASK-Face Graphic
// WANNE: Face gear for IMPs in additional file
//extern UINT32 guiPORTRAITICONS_NV_IMP;
//extern UINT32 guiPORTRAITICONS_GAS_MASK_IMP;
extern MOUSE_REGION gViewportRegion;
extern MOUSE_REGION gRadarRegion;

Some files were not shown because too many files have changed in this diff Show More