mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
*** MERGED source code from development trunk revision 4890 up to latest current revision 5105 ***
Development Trunk (now obsolete): https://ja2svn.dyndns.org/source/ja2/branches/Wanne/JA2%201.13%20MP A detailed list of all the features (changes) is visible in the history log of the development trunk: INFO: There will be no further development in the development source trunk, so is obsolete from now on! This commit contains the following features (bugfixes are not listed): - New Feature: Show merc ranks in Strategy Screen before merc name o Toggle on/off in the ingame options screen o For each experience level (0-10) there are defined rank names in the language specific text files o Additional language text that is not translated yet is marked with // TODO.Translate - New Feature: Faster Bobby Ray Shipments o This feature is selectable in the ja2_options.ini o When activated Bobby Ray shipments will be really fast -> Overnight Express: 5 - 7 hours -> Air Service: 10, 12 or 14 hours -> Standard Service: 15, 18 or 21 hours o In a multiplayer game, this feature is disabled (because shipment arrive immediately in the destination sector) - New Feature: AP cost for manipulating the merc inventory o This feature is selectable in the start new game screen o For example, putting a weapon from hand in the backpack costs APs o The AP costs are defined in the APBPConstants.ini o In a multiplayer game, this feature is disabled - New Feature: Added possibility to set individual Gear Kit names o Set individual names in the optional new tag <mGearKitName> inside the <GEARKIT> root element (File: TableData\MercStartingGear.xml) - New Feature: Externalized the maximum purchase amount (JA2 vanilla: 10) for Bobby Rays purchases per shipment o Define the max. amount in the ja2_options.ini: BOBBY_RAY_MAX_PURCHASE_AMOUNT, Range: 10 - 100) o Nice scrolling bars to scroll through all the purchases - New Feature: Now it is possible to walk on "water" tiles or handle those tiles like "normal" tiles o (instead of showing the swimming animation and counting the APs for swimming), when the soldier is located on the second level (level > 0) - New Feature: Externalized AIM Veterans laptop site o Add maximum of 4 pages o Add new AIM to veterans page, and remove AIM from veterans page. o New XML file: OldAIMArchive.xml (language specific XML files: *.OldAIMArchive.xml) - New Feature: Added possibility to choose from 254 IMP faces o Modified IMPPortraits.xml o Added new GameDir folder "IMPFaces" which contains the IMP face portraits o Moved IMP faces in the new "IMPFaces" folder - New Feature: ARSP - All Resolution Support Project o See here: http://www.ja-galaxy-forum.com/board/ubbthreads.php?ubb=showflat&Number=298698&page=1 o Support any kind of screen resolution. This works by choosing the matching full supported resolution (640x480, 800x600, 1024x768) and then centering the graphics o See ja2.ini for defining the screen resolution - New Feature: AI Turn Speed Up (FF-MOD) o see here: http://www.ja-galaxy-forum.com/board/ubbthreads.php?ubb=showflat&Number=298699#Post298699 o When this feature is activated it allows fast enemy turns o New entry in ja2.ini to enable this feature: HIGHSPEED_TIMER = TRUE o Turn on/off auto fast turns in ingame options o New ja2_options.ini settings for fine tuning: [Clock Settings] ini block - New Feature: "Lock" / "Release" mouse cursor in tactical windowed mode, so the mouse can stay within window boundary o This is very helpful for doing scrolling with the mouse (by moving the mouse to the window edge) in windowed mode o You can toggle on/off the feature by pressing CTRL + Z. It is also possible to press CTRL + Y. So the user can decide which fits better :) o Whenever you toggle on/off a screen message appears on the tactical log to notify the player - New Feature: Weapon overheating o Basically, every shot fired from a gun increases its temperature. On higher temperatures, the gun jams more frequently o On/off toggle in the ingame options o Graphical thermometer indication on the weapon picture o New ja2_options.ini section with a few options, Section: [Tactical Weapon Overheating Settings] o XML changes (New Tags) --> AmmoTypes.xml: <temperatureModificator> --> Items.xml: <barrel>, <usOverheatingCooldownFactor> --> Weapons.xml: <usOverheatingJamThreshold>, <usOverheatingDamageThreshold>, <usOverheatingSingleShotTemperature> o Added a few barells to Items.xml (end of the file) o more infos: http://www.ja-galaxy-forum.com/board/ubbthreads.php?ubb=showflat&Number=301059&page=1 - New Feature: Resting weapons on a surfaces o You can now rest your weapon on crates, low walls, rocks, debris, open windows etc. while you are crouched. Resting will give yu the superior gun handling modifiers from PRONE position. o A little 'A' on your gun indicates if you are resting it or not. o Both settings can be turned on and off in Ja2_Options.ini under 'Tactical Gameplay Settings' - New Feature: Externalized option on whether mercs can exit sector using grid exit in turn based mode o new ja2_options.ini property: GRID_EXIT_IN_TURNBASED o This ini setting does not affect leaving sectors on map edges - Rework/Update: Ammo boxes and Ammo crates o Ammo crate items added for remaining calibers. Tweaked prices to correspond to magazines, tweaked capacities and weights to be reasonable (~800 or less). o Shift-R reload now looks at both boxes and crates in sector items and merc's inventory to reload, and tops off magazines in inventory as well. Only possible outside of combat. o Ctrl-Shift-A still creates crates as per usual, with some fixes to ensure all ammo is caught on the first press. o Shift-A now creates ammo boxes in the same loop. They mostly behave like crates, but fit in mercs inventories. o Ammo boxes are available to purchase at BR and tony, sam, etc. Individual magazines/drums/etc are no longer available. o Removed ammo crate xml tag. Added ubMagType tag to Magazines array. This allows us to differentiate between magazines, bullets, boxes and crates. o Changed ammo filtering in BR's to display boxes appropriately. Added back the "Mag:" display (changed text to "Size:") o Added ja2set.dat.xml file (WF map version in WF maps folder) to be used instead of ja2set.dat file (ja2.ini setting added) For now, if you want to play vanilla instead, just change the setting in the ini (see comments in file). o Added P4-P9Items image files (up to 5k images each) and tileslots. 1.13 core items will continue to use Guns and P1-P3Items for the foreseeable future. P4-P9 can be used by customizers/modders to avoid conflicts with Guns/P1-P3 items. TODO: Need to discuss a strategy for this in the forums. o Added in Ambient/0.bad and 32.bad to avoid an exception in the code. o Updated the XML Editor o Standardized the text on all the ammo items. - New Multiplayer Feature: Sharing same FOV (field of view) in a coop/team-dm (for friendly teams) game o You will also see enemies, that your teammate sees git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5108 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -100,28 +100,28 @@
|
|||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<PropertyGroup Label="UserMacros" />
|
<PropertyGroup Label="UserMacros" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<OutDir>..\lib\VS2010\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\lib\VS2010\$(JA2Config)\$(Configuration)\</OutDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MapEditorD|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MapEditorD|Win32'">
|
||||||
<OutDir>..\lib\VS2010\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\lib\VS2010\$(JA2Config)\$(Configuration)\</OutDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<IntDir>..\build\VS2010\$(ProjectName)_$(Configuration)\</IntDir>
|
<IntDir>$(SolutionDir)\build\VS2010\$(JA2Config)\$(ProjectName)_$(Configuration)\</IntDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MapEditorD|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MapEditorD|Win32'">
|
||||||
<IntDir>..\build\VS2010\$(ProjectName)_$(Configuration)\</IntDir>
|
<IntDir>$(SolutionDir)\build\VS2010\$(JA2Config)\$(ProjectName)_$(Configuration)\</IntDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<OutDir>..\lib\VS2010\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\lib\VS2010\$(JA2Config)\$(Configuration)\</OutDir>
|
||||||
<IntDir>..\build\VS2010\$(ProjectName)_$(Configuration)\</IntDir>
|
<IntDir>$(SolutionDir)\build\VS2010\$(JA2Config)\$(ProjectName)_$(Configuration)\</IntDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MapEditor|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MapEditor|Win32'">
|
||||||
<OutDir>..\lib\VS2010\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\lib\VS2010\$(JA2Config)\$(Configuration)\</OutDir>
|
||||||
<IntDir>..\build\VS2010\$(ProjectName)_$(Configuration)\</IntDir>
|
<IntDir>$(SolutionDir)\build\VS2010\$(JA2Config)\$(ProjectName)_$(Configuration)\</IntDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Relese_WithDebugInfo|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Relese_WithDebugInfo|Win32'">
|
||||||
<OutDir>..\lib\VS2010\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\lib\VS2010\$(JA2Config)\$(Configuration)\</OutDir>
|
||||||
<IntDir>..\build\VS2010\$(ProjectName)_$(Configuration)\</IntDir>
|
<IntDir>$(SolutionDir)\build\VS2010\$(JA2Config)\$(ProjectName)_$(Configuration)\</IntDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
|
|||||||
+97
-421
@@ -28,13 +28,9 @@
|
|||||||
#include "Random.h"
|
#include "Random.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//externals
|
//externals
|
||||||
extern HVSURFACE ghFrameBuffer;
|
extern HVSURFACE ghFrameBuffer;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//local Defines
|
//local Defines
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
@@ -42,32 +38,22 @@ enum
|
|||||||
CRDT_RENDER_ALL,
|
CRDT_RENDER_ALL,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//nnn
|
//nnn
|
||||||
typedef struct _CRDT_NODE
|
typedef struct _CRDT_NODE
|
||||||
{
|
{
|
||||||
UINT32 uiType; //the type of node
|
UINT32 uiType; //the type of node
|
||||||
|
CHAR16 *pString; //string for the node if the node contains a string
|
||||||
CHAR16 *pString; //string for the node if the node contains a string
|
UINT32 uiFlags; //various flags
|
||||||
|
|
||||||
UINT32 uiFlags; //various flags
|
|
||||||
|
|
||||||
INT16 sPosX; //position of the node on the screen if the node is displaying stuff
|
INT16 sPosX; //position of the node on the screen if the node is displaying stuff
|
||||||
INT16 sPosY;
|
INT16 sPosY;
|
||||||
|
|
||||||
INT16 sOldPosX; //position of the node on the screen if the node is displaying stuff
|
INT16 sOldPosX; //position of the node on the screen if the node is displaying stuff
|
||||||
INT16 sOldPosY;
|
INT16 sOldPosY;
|
||||||
|
|
||||||
INT16 sHeightOfString; //The height of the displayed string
|
INT16 sHeightOfString; //The height of the displayed string
|
||||||
|
BOOLEAN fDelete; //Delete this loop
|
||||||
BOOLEAN fDelete; //Delete this loop
|
UINT32 uiLastTime; // The last time the node was udated
|
||||||
|
UINT32 uiVideoSurfaceImage;
|
||||||
UINT32 uiLastTime; // The last time the node was udated
|
|
||||||
|
|
||||||
UINT32 uiVideoSurfaceImage;
|
|
||||||
|
|
||||||
struct _CRDT_NODE *pPrev;
|
struct _CRDT_NODE *pPrev;
|
||||||
struct _CRDT_NODE *pNext;
|
struct _CRDT_NODE *pNext;
|
||||||
} CRDT_NODE;
|
} CRDT_NODE;
|
||||||
|
|
||||||
//type of credits
|
//type of credits
|
||||||
@@ -79,92 +65,52 @@ enum
|
|||||||
|
|
||||||
//flags for the credits
|
//flags for the credits
|
||||||
//Flags:
|
//Flags:
|
||||||
#define CRDT_FLAG__TITLE 0x00000001
|
#define CRDT_FLAG__TITLE 0x00000001
|
||||||
#define CRDT_FLAG__START_SECTION 0x00000002
|
#define CRDT_FLAG__START_SECTION 0x00000002
|
||||||
#define CRDT_FLAG__END_SECTION 0x00000004
|
#define CRDT_FLAG__END_SECTION 0x00000004
|
||||||
|
|
||||||
|
#define CRDT_NAME_OF_CREDIT_FILE "BINARYDATA\\Credits.edt"
|
||||||
|
#define CRDT_NAME_OF_MOD_CREDIT_FILE "BINARYDATA\\Credits_Mod.edt"
|
||||||
|
|
||||||
//#define CRDT_NAME_OF_CREDIT_FILE "BINARYDATA\\Credits.txt"
|
#define CREDITS_LINESIZE (80 * 2)
|
||||||
#define CRDT_NAME_OF_CREDIT_FILE "BINARYDATA\\Credits.edt"
|
|
||||||
#define CRDT_NAME_OF_MOD_CREDIT_FILE "BINARYDATA\\Credits_Mod.edt"
|
|
||||||
|
|
||||||
#define CREDITS_LINESIZE 80 * 2
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Code tokens
|
// Code tokens
|
||||||
//
|
//
|
||||||
//new codes:
|
//new codes:
|
||||||
#define CRDT_START_CODE '@'
|
#define CRDT_START_CODE '@'
|
||||||
#define CRDT_SEPARATION_CODE L","
|
#define CRDT_SEPARATION_CODE L","
|
||||||
#define CRDT_END_CODE L";"
|
#define CRDT_END_CODE L";"
|
||||||
|
|
||||||
#define CRDT_DELAY_BN_STRINGS_CODE 'D'
|
#define CRDT_DELAY_BN_STRINGS_CODE 'D'
|
||||||
#define CRDT_DELAY_BN_SECTIONS_CODE 'B'
|
#define CRDT_DELAY_BN_SECTIONS_CODE 'B'
|
||||||
#define CRDT_SCROLL_SPEED 'S'
|
#define CRDT_SCROLL_SPEED 'S'
|
||||||
#define CRDT_FONT_JUSTIFICATION 'J'
|
#define CRDT_FONT_JUSTIFICATION 'J'
|
||||||
#define CRDT_TITLE_FONT_COLOR 'C'
|
#define CRDT_TITLE_FONT_COLOR 'C'
|
||||||
#define CRDT_ACTIVE_FONT_COLOR 'R'
|
#define CRDT_ACTIVE_FONT_COLOR 'R'
|
||||||
|
|
||||||
//Flags:
|
//Flags:
|
||||||
#define CRDT_TITLE 'T'
|
#define CRDT_TITLE 'T'
|
||||||
#define CRDT_START_OF_SECTION '{'
|
#define CRDT_START_OF_SECTION '{'
|
||||||
#define CRDT_END_OF_SECTION '}'
|
#define CRDT_END_OF_SECTION '}'
|
||||||
|
|
||||||
|
#define CRDT_NAME_FONT FONT12ARIAL
|
||||||
|
#define CRDT_LINE_NODE_DISAPPEARS_AT 0
|
||||||
|
|
||||||
|
|
||||||
#define CRDT_NAME_LOC_X 375
|
#define CRDT_WIDTH_OF_TEXT_AREA 210
|
||||||
#define CRDT_NAME_LOC_Y 420
|
#define CRDT_SCROLL_PIXEL_AMOUNT 1
|
||||||
#define CRDT_NAME_TITLE_LOC_Y 435
|
#define CRDT_NODE_DELAY_AMOUNT 25
|
||||||
#define CRDT_NAME_FUNNY_LOC_Y 450
|
#define CRDT_DELAY_BN_NODES 750
|
||||||
#define CRDT_NAME_LOC_WIDTH 260
|
#define CRDT_DELAY_BN_SECTIONS 2500
|
||||||
#define CRDT_NAME_LOC_HEIGHT ( CRDT_NAME_FUNNY_LOC_Y - CRDT_NAME_LOC_Y + GetFontHeight( CRDT_NAME_FONT ) )
|
#define CRDT_SPACE_BN_SECTIONS 50
|
||||||
|
#define CRDT_SPACE_BN_NODES 12
|
||||||
#define CRDT_NAME_FONT FONT12ARIAL
|
#define CRDT_START_POS_Y (SCREEN_HEIGHT - 1)
|
||||||
|
#define CRDT_EYE_WIDTH 30
|
||||||
#define CRDT_LINE_NODE_DISAPPEARS_AT 0//20
|
#define CRDT_EYE_HEIGHT 12
|
||||||
|
#define CRDT_EYES_CLOSED_TIME 150
|
||||||
/*
|
|
||||||
//new codes:
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
CRDT_ERROR,
|
|
||||||
CRDT_CODE_DELAY_BN_STRINGS,
|
|
||||||
CRDT_CODE_SCROLL_SPEED,
|
|
||||||
CRDT_CODE_FONT_JUSIFICATION,
|
|
||||||
CRDT_CODE_FONT_COLOR,
|
|
||||||
|
|
||||||
CRDT_NUM_CODES,
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#define CRDT_WIDTH_OF_TEXT_AREA 210
|
|
||||||
#define CRDT_TEXT_START_LOC 10
|
|
||||||
|
|
||||||
|
|
||||||
#define CRDT_SCROLL_PIXEL_AMOUNT 1
|
|
||||||
#define CRDT_NODE_DELAY_AMOUNT 25
|
|
||||||
#define CRDT_DELAY_BN_NODES 750
|
|
||||||
#define CRDT_DELAY_BN_SECTIONS 2500
|
|
||||||
|
|
||||||
#define CRDT_SPACE_BN_SECTIONS 50
|
|
||||||
#define CRDT_SPACE_BN_NODES 12
|
|
||||||
|
|
||||||
#define CRDT_START_POS_Y (SCREEN_HEIGHT - 1) //479
|
|
||||||
|
|
||||||
#define CRDT_EYE_WIDTH 30
|
|
||||||
#define CRDT_EYE_HEIGHT 12
|
|
||||||
|
|
||||||
#define CRDT_EYES_CLOSED_TIME 150
|
|
||||||
//ddd
|
//ddd
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
INT16 sX;
|
INT16 sX;
|
||||||
@@ -179,8 +125,8 @@ typedef struct
|
|||||||
INT16 sMouthY;
|
INT16 sMouthY;
|
||||||
|
|
||||||
INT16 sBlinkFreq;
|
INT16 sBlinkFreq;
|
||||||
UINT32 uiLastBlinkTime;
|
UINT32 uiLastBlinkTime;
|
||||||
UINT32 uiEyesClosedTime;
|
UINT32 uiEyesClosedTime;
|
||||||
|
|
||||||
} CDRT_FACE;
|
} CDRT_FACE;
|
||||||
|
|
||||||
@@ -204,189 +150,66 @@ CDRT_FACE gCreditFaces[] =
|
|||||||
585, 196, 39, 49, 593, 218, 593, 228, 3500, 0, 0, //Joey
|
585, 196, 39, 49, 593, 218, 593, 228, 3500, 0, 0, //Joey
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
CRDT_CAMFIELD,
|
|
||||||
CRDT_SHAWN,
|
|
||||||
CRDT_KRIS,
|
|
||||||
CRDT_IAN,
|
|
||||||
CRDT_LINDA,
|
|
||||||
CRDT_ERIC,
|
|
||||||
CRDT_LYNN,
|
|
||||||
CRDT_NORM,
|
|
||||||
CRDT_GEORGE,
|
|
||||||
CRDT_STACEY,
|
|
||||||
CRDT_SCOTT,
|
|
||||||
CRDT_EMMONS,
|
|
||||||
CRDT_DAVE,
|
|
||||||
CRDT_ALEX,
|
|
||||||
CRDT_JOEY,
|
|
||||||
|
|
||||||
NUM_PEOPLE_IN_CREDITS,
|
|
||||||
};
|
|
||||||
|
|
||||||
STR16 gzCreditNames[]=
|
|
||||||
{
|
|
||||||
L"Chris Camfield",
|
|
||||||
L"Shaun Lyng",
|
|
||||||
L"Kris Maernes",
|
|
||||||
L"Ian Currie",
|
|
||||||
L"Linda Currie",
|
|
||||||
L"Eric \"WTF\" Cheng",
|
|
||||||
L"Lynn Holowka",
|
|
||||||
L"Norman \"NRG\" Olsen",
|
|
||||||
L"George Brooks",
|
|
||||||
L"Andrew Stacey",
|
|
||||||
L"Scot Loving",
|
|
||||||
L"Andrew \"Big Cheese\" Emmons",
|
|
||||||
L"Dave \"The Feral\" French",
|
|
||||||
L"Alex Meduna",
|
|
||||||
L"Joey \"Joeker\" Whelan",
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
STR16 gzCreditNameTitle[]=
|
|
||||||
{
|
|
||||||
L"Game Internals Programmer", // Chris Camfield
|
|
||||||
L"Co-designer/Writer", // Shaun Lyng
|
|
||||||
L"Strategic Systems & Editor Programmer", //Kris \"The Cow Rape Man\" Marnes
|
|
||||||
L"Producer/Co-designer", // Ian Currie
|
|
||||||
L"Co-designer/Map Designer", // Linda Currie
|
|
||||||
L"Artist", // Eric \"WTF\" Cheng
|
|
||||||
L"Beta Coordinator, Support", // Lynn Holowka
|
|
||||||
L"Artist Extraordinaire", // Norman \"NRG\" Olsen
|
|
||||||
L"Sound Guru", // George Brooks
|
|
||||||
L"Screen Designer/Artist", // Andrew Stacey
|
|
||||||
L"Lead Artist/Animator", // Scot Loving
|
|
||||||
L"Lead Programmer", // Andrew \"Big Cheese Doddle\" Emmons
|
|
||||||
L"Programmer", // Dave French
|
|
||||||
L"Strategic Systems & Game Balance Programmer", // Alex Meduna
|
|
||||||
L"Portraits Artist", // Joey \"Joeker\" Whelan",
|
|
||||||
};
|
|
||||||
|
|
||||||
STR16 gzCreditNameFunny[]=
|
|
||||||
{
|
|
||||||
L"", // Chris Camfield
|
|
||||||
L"(still learning punctuation)", // Shaun Lyng
|
|
||||||
L"(\"It's done. I'm just fixing it\")", //Kris \"The Cow Rape Man\" Marnes
|
|
||||||
L"(getting much too old for this)", // Ian Currie
|
|
||||||
L"(and working on Wizardry 8)", // Linda Currie
|
|
||||||
L"(forced at gunpoint to also do QA)", // Eric \"WTF\" Cheng
|
|
||||||
L"(Left us for the CFSA - go figure...)", // Lynn Holowka
|
|
||||||
L"", // Norman \"NRG\" Olsen
|
|
||||||
L"", // George Brooks
|
|
||||||
L"(Dead Head and jazz lover)", // Andrew Stacey
|
|
||||||
L"(his real name is Robert)", // Scot Loving
|
|
||||||
L"(the only responsible person)", // Andrew \"Big Cheese Doddle\" Emmons
|
|
||||||
L"(can now get back to motocrossing)", // Dave French
|
|
||||||
L"(stolen from Wizardry 8)", // Alex Meduna
|
|
||||||
L"(did items and loading screens too!)", // Joey \"Joeker\" Whelan",
|
|
||||||
};
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
//Global Variables
|
//Global Variables
|
||||||
|
|
||||||
MOUSE_REGION gCrdtMouseRegions[ NUM_PEOPLE_IN_CREDITS ];
|
MOUSE_REGION gCrdtMouseRegions[ NUM_PEOPLE_IN_CREDITS ];
|
||||||
void SelectCreditFaceRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
void SelectCreditFaceRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
void SelectCreditFaceMovementRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
void SelectCreditFaceMovementRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
|
|
||||||
|
UINT32 guiCreditBackGroundImage;
|
||||||
|
UINT32 guiCreditFaces;
|
||||||
UINT32 guiCreditBackGroundImage;
|
BOOLEAN gfCreditsScreenEntry = TRUE;
|
||||||
UINT32 guiCreditFaces;
|
BOOLEAN gfCreditsScreenExit = FALSE;
|
||||||
BOOLEAN gfCreditsScreenEntry = TRUE;
|
UINT32 guiCreditsExitScreen;
|
||||||
BOOLEAN gfCreditsScreenExit = FALSE;
|
|
||||||
UINT32 guiCreditsExitScreen;
|
|
||||||
|
|
||||||
UINT8 gubCreditScreenRenderFlags = CRDT_RENDER_ALL;
|
UINT8 gubCreditScreenRenderFlags = CRDT_RENDER_ALL;
|
||||||
|
|
||||||
CRDT_NODE *gCrdtRootNode=NULL;
|
CRDT_NODE *gCrdtRootNode=NULL;
|
||||||
CRDT_NODE *gCrdtLastAddedNode=NULL;
|
CRDT_NODE *gCrdtLastAddedNode=NULL;
|
||||||
|
|
||||||
BOOLEAN gfCrdtHaveRenderedFirstFrameToSaveBuffer; // need to render background image to save buffer once
|
BOOLEAN gfCrdtHaveRenderedFirstFrameToSaveBuffer; // need to render background image to save buffer once
|
||||||
|
|
||||||
INT32 giCurrentlySelectedFace = -1;
|
INT32 giCurrentlySelectedFace = -1;
|
||||||
|
|
||||||
//
|
//
|
||||||
//VAriables needed for processing of the nodes:
|
//VAriables needed for processing of the nodes:
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
UINT32 guiCreditScreenActiveFont; // the font that is used
|
UINT32 guiCreditScreenActiveFont; // the font that is used
|
||||||
UINT32 guiCreditScreenTitleFont; // the font that is used
|
UINT32 guiCreditScreenTitleFont; // the font that is used
|
||||||
UINT8 gubCreditScreenActiveColor; // color of the font
|
UINT8 gubCreditScreenActiveColor; // color of the font
|
||||||
UINT8 gubCreditScreenTitleColor; // color of a Title node
|
UINT8 gubCreditScreenTitleColor; // color of a Title node
|
||||||
//UINT32 guiCreditScreenActiveDisplayFlags; //
|
|
||||||
|
|
||||||
UINT32 guiCrdtNodeScrollSpeed = CRDT_NODE_DELAY_AMOUNT; //speed credits go up at
|
UINT32 guiCrdtNodeScrollSpeed = CRDT_NODE_DELAY_AMOUNT; //speed credits go up at
|
||||||
//UINT32 guiCrdtTimeTillReadNextCredit = CRDT_DELAY_BN_SECTIONS; //the delay before reading the next credit ( normall = guiCrdtDelayBetweenCreditSection or guiCrdtDelayBetweenNodes )
|
|
||||||
//UINT32 guiCrdtDelayBetweenCreditSection = CRDT_DELAY_BN_SECTIONS; //delay between major credits sections ( programming and art ) appearing on the screen
|
|
||||||
//UINT32 guiCrdtDelayBetweenNodes = CRDT_DELAY_BN_NODES; //delay between credits appearing on the screen
|
|
||||||
UINT32 guiCrdtLastTimeUpdatingNode=0; // the last time a node was read from the file
|
UINT32 guiCrdtLastTimeUpdatingNode=0; // the last time a node was read from the file
|
||||||
UINT8 gubCrdtJustification = CENTER_JUSTIFIED; // the current justification
|
UINT8 gubCrdtJustification = CENTER_JUSTIFIED; // the current justification
|
||||||
|
|
||||||
UINT32 guiGapBetweenCreditSections = CRDT_SPACE_BN_SECTIONS;
|
UINT32 guiGapBetweenCreditSections = CRDT_SPACE_BN_SECTIONS;
|
||||||
UINT32 guiGapBetweenCreditNodes = CRDT_SPACE_BN_NODES;
|
UINT32 guiGapBetweenCreditNodes = CRDT_SPACE_BN_NODES;
|
||||||
UINT32 guiGapTillReadNextCredit = CRDT_SPACE_BN_NODES;
|
UINT32 guiGapTillReadNextCredit = CRDT_SPACE_BN_NODES;
|
||||||
|
|
||||||
UINT32 guiCurrentCreditRecord = 0;
|
UINT32 guiCurrentCreditRecord = 0;
|
||||||
BOOLEAN gfPauseCreditScreen = FALSE;
|
BOOLEAN gfPauseCreditScreen = FALSE;
|
||||||
BOOLEAN gfModCredits = TRUE;
|
BOOLEAN gfModCredits = TRUE;
|
||||||
|
|
||||||
HWFILE ghFile;
|
HWFILE ghFile;
|
||||||
|
|
||||||
//ggg
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Function Prototypes
|
//Function Prototypes
|
||||||
|
|
||||||
|
|
||||||
BOOLEAN EnterCreditsScreen();
|
BOOLEAN EnterCreditsScreen();
|
||||||
BOOLEAN ExitCreditScreen();
|
BOOLEAN ExitCreditScreen();
|
||||||
void HandleCreditScreen();
|
void HandleCreditScreen();
|
||||||
BOOLEAN RenderCreditScreen();
|
BOOLEAN RenderCreditScreen();
|
||||||
void GetCreditScreenUserInput();
|
void GetCreditScreenUserInput();
|
||||||
void SetCreditsExitScreen( UINT32 uiScreenToGoTo );
|
void SetCreditsExitScreen( UINT32 uiScreenToGoTo );
|
||||||
BOOLEAN ShutDownCreditList();
|
BOOLEAN ShutDownCreditList();
|
||||||
BOOLEAN AddCreditNode( UINT32 uiType, UINT32 uiFlags, STR16 pString );
|
BOOLEAN AddCreditNode( UINT32 uiType, UINT32 uiFlags, STR16 pString );
|
||||||
BOOLEAN InitCreditNode( );
|
BOOLEAN InitCreditNode( );
|
||||||
BOOLEAN DisplayCreditNode( CRDT_NODE *pCurrent );
|
BOOLEAN DisplayCreditNode( CRDT_NODE *pCurrent );
|
||||||
void HandleCreditNodes();
|
void HandleCreditNodes();
|
||||||
void HandleNode_Default( CRDT_NODE *pCurrent );
|
void HandleNode_Default( CRDT_NODE *pCurrent );
|
||||||
void HandleCurrentCreditNode( CRDT_NODE *pCurrent );
|
void HandleCurrentCreditNode( CRDT_NODE *pCurrent );
|
||||||
BOOLEAN DeleteNode( CRDT_NODE *pNodeToDelete );
|
BOOLEAN DeleteNode( CRDT_NODE *pNodeToDelete );
|
||||||
UINT32 GetAndHandleCreditCodeFromCodeString( STR16 pzCode );
|
UINT32 GetAndHandleCreditCodeFromCodeString( STR16 pzCode );
|
||||||
BOOLEAN GetNextCreditFromTextFile();
|
BOOLEAN GetNextCreditFromTextFile();
|
||||||
UINT32 CountNumberOfCreditNodes();
|
UINT32 CountNumberOfCreditNodes();
|
||||||
STR16 GetNextCreditCode( STR16 pString, UINT32 *pSizeOfCode );
|
STR16 GetNextCreditCode( STR16 pString, UINT32 *pSizeOfCode );
|
||||||
void HandleCreditFlags( UINT32 uiFlags );
|
void HandleCreditFlags( UINT32 uiFlags );
|
||||||
void HandleCreditEyeBlinking();
|
void HandleCreditEyeBlinking();
|
||||||
void InitCreditEyeBlinking();
|
void InitCreditEyeBlinking();
|
||||||
//ppp
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// VSURFACE_DESC vs_desc;
|
|
||||||
// HVSURFACE hVSurface;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
UINT32 CreditScreenInit( void )
|
UINT32 CreditScreenInit( void )
|
||||||
{
|
{
|
||||||
@@ -394,8 +217,6 @@ UINT32 CreditScreenInit( void )
|
|||||||
return( 1 );
|
return( 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
UINT32 CreditScreenHandle( void )
|
UINT32 CreditScreenHandle( void )
|
||||||
{
|
{
|
||||||
StartFrameBufferRender();
|
StartFrameBufferRender();
|
||||||
@@ -412,27 +233,17 @@ UINT32 CreditScreenHandle( void )
|
|||||||
gfCreditsScreenEntry = FALSE;
|
gfCreditsScreenEntry = FALSE;
|
||||||
gfCreditsScreenExit = FALSE;
|
gfCreditsScreenExit = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
gubCreditScreenRenderFlags = CRDT_RENDER_ALL;
|
gubCreditScreenRenderFlags = CRDT_RENDER_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
GetCreditScreenUserInput();
|
GetCreditScreenUserInput();
|
||||||
|
|
||||||
|
|
||||||
HandleCreditScreen();
|
HandleCreditScreen();
|
||||||
|
|
||||||
// render buttons marked dirty
|
|
||||||
// MarkButtonsDirty( );
|
|
||||||
// RenderButtons( );
|
|
||||||
|
|
||||||
// render help
|
|
||||||
// RenderFastHelp( );
|
|
||||||
// RenderButtonsFastHelp( );
|
|
||||||
|
|
||||||
|
|
||||||
ExecuteBaseDirtyRectQueue();
|
ExecuteBaseDirtyRectQueue();
|
||||||
EndFrameBufferRender();
|
EndFrameBufferRender();
|
||||||
|
|
||||||
|
|
||||||
if( gfCreditsScreenExit )
|
if( gfCreditsScreenExit )
|
||||||
{
|
{
|
||||||
ExitCreditScreen();
|
ExitCreditScreen();
|
||||||
@@ -440,7 +251,6 @@ UINT32 CreditScreenHandle( void )
|
|||||||
gfCreditsScreenExit = FALSE;
|
gfCreditsScreenExit = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return( guiCreditsExitScreen );
|
return( guiCreditsExitScreen );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -450,48 +260,25 @@ UINT32 CreditScreenShutdown( void )
|
|||||||
return( 1 );
|
return( 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//eee
|
|
||||||
BOOLEAN EnterCreditsScreen()
|
BOOLEAN EnterCreditsScreen()
|
||||||
{
|
{
|
||||||
UINT32 uiCnt;
|
UINT32 uiCnt;
|
||||||
VOBJECT_DESC VObjectDesc;
|
VOBJECT_DESC VObjectDesc;
|
||||||
/*
|
|
||||||
|
|
||||||
VSURFACE_DESC vs_desc;
|
|
||||||
|
|
||||||
vs_desc.fCreateFlags = VSURFACE_CREATE_FROMFILE | VSURFACE_SYSTEM_MEM_USAGE;
|
|
||||||
|
|
||||||
strcpy(vs_desc.ImageFile, "INTERFACE\\Credits.sti");
|
|
||||||
|
|
||||||
if( !AddVideoSurface( &vs_desc, &guiCreditBackGroundImage ) )
|
|
||||||
{
|
|
||||||
return( FALSE );
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
gfModCredits = TRUE;
|
gfModCredits = TRUE;
|
||||||
|
|
||||||
ColorFillVideoSurfaceArea( FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0 );
|
ColorFillVideoSurfaceArea( FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0 );
|
||||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||||
|
|
||||||
if (iResolution == 0)
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
{
|
{
|
||||||
FilenameForBPP("INTERFACE\\Credits.sti", VObjectDesc.ImageFile);
|
FilenameForBPP("INTERFACE\\Credits.sti", VObjectDesc.ImageFile);
|
||||||
}
|
}
|
||||||
else if (iResolution == 1)
|
else if (iResolution < _1024x768)
|
||||||
{
|
{
|
||||||
FilenameForBPP("INTERFACE\\Credits_800x600.sti", VObjectDesc.ImageFile);
|
FilenameForBPP("INTERFACE\\Credits_800x600.sti", VObjectDesc.ImageFile);
|
||||||
}
|
}
|
||||||
else if (iResolution == 2)
|
else
|
||||||
{
|
{
|
||||||
FilenameForBPP("INTERFACE\\Credits_1024x768.sti", VObjectDesc.ImageFile);
|
FilenameForBPP("INTERFACE\\Credits_1024x768.sti", VObjectDesc.ImageFile);
|
||||||
}
|
}
|
||||||
@@ -502,43 +289,31 @@ BOOLEAN EnterCreditsScreen()
|
|||||||
FilenameForBPP("INTERFACE\\Credit Faces.sti", VObjectDesc.ImageFile);
|
FilenameForBPP("INTERFACE\\Credit Faces.sti", VObjectDesc.ImageFile);
|
||||||
CHECKF(AddVideoObject(&VObjectDesc, &guiCreditFaces ));
|
CHECKF(AddVideoObject(&VObjectDesc, &guiCreditFaces ));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Initialize the root credit node
|
//Initialize the root credit node
|
||||||
InitCreditNode( );
|
InitCreditNode( );
|
||||||
|
|
||||||
guiCreditsExitScreen = CREDIT_SCREEN;
|
guiCreditsExitScreen = CREDIT_SCREEN;
|
||||||
gfCrdtHaveRenderedFirstFrameToSaveBuffer = FALSE;
|
gfCrdtHaveRenderedFirstFrameToSaveBuffer = FALSE;
|
||||||
|
|
||||||
guiCreditScreenActiveFont = FONT12ARIAL;
|
guiCreditScreenActiveFont = FONT12ARIAL;
|
||||||
gubCreditScreenActiveColor = FONT_MCOLOR_DKWHITE;
|
gubCreditScreenActiveColor = FONT_MCOLOR_DKWHITE;
|
||||||
|
|
||||||
//gubCreditScreenActiveColor = FONT_MCOLOR_LTBLUE;
|
|
||||||
|
|
||||||
guiCreditScreenTitleFont = FONT14ARIAL;
|
guiCreditScreenTitleFont = FONT14ARIAL;
|
||||||
gubCreditScreenTitleColor = FONT_MCOLOR_RED;
|
gubCreditScreenTitleColor = FONT_MCOLOR_RED;
|
||||||
// guiCreditScreenActiveDisplayFlags = LEFT_JUSTIFIED;
|
|
||||||
guiCrdtNodeScrollSpeed = CRDT_NODE_DELAY_AMOUNT;
|
guiCrdtNodeScrollSpeed = CRDT_NODE_DELAY_AMOUNT;
|
||||||
gubCrdtJustification = CENTER_JUSTIFIED;
|
gubCrdtJustification = CENTER_JUSTIFIED;
|
||||||
guiCurrentCreditRecord = 0;
|
guiCurrentCreditRecord = 0;
|
||||||
|
|
||||||
// guiCrdtTimeTillReadNextCredit = CRDT_DELAY_BN_SECTIONS;
|
|
||||||
// guiCrdtDelayBetweenCreditSection = CRDT_DELAY_BN_SECTIONS;
|
|
||||||
// guiCrdtDelayBetweenNodes = CRDT_DELAY_BN_NODES;
|
|
||||||
|
|
||||||
guiCrdtLastTimeUpdatingNode = GetJA2Clock();
|
guiCrdtLastTimeUpdatingNode = GetJA2Clock();
|
||||||
|
|
||||||
|
|
||||||
guiGapBetweenCreditSections = CRDT_SPACE_BN_SECTIONS;
|
guiGapBetweenCreditSections = CRDT_SPACE_BN_SECTIONS;
|
||||||
guiGapBetweenCreditNodes = CRDT_SPACE_BN_NODES;
|
guiGapBetweenCreditNodes = CRDT_SPACE_BN_NODES;
|
||||||
guiGapTillReadNextCredit = CRDT_SPACE_BN_NODES;
|
guiGapTillReadNextCredit = CRDT_SPACE_BN_NODES;
|
||||||
|
|
||||||
|
|
||||||
for( uiCnt=0; uiCnt < NUM_PEOPLE_IN_CREDITS; uiCnt++)
|
for( uiCnt=0; uiCnt < NUM_PEOPLE_IN_CREDITS; uiCnt++)
|
||||||
{
|
{
|
||||||
// Make a mouse region
|
// Make a mouse region
|
||||||
MSYS_DefineRegion( &gCrdtMouseRegions[uiCnt], gCreditFaces[uiCnt].sX, gCreditFaces[uiCnt].sY, (INT16)(gCreditFaces[uiCnt].sX + gCreditFaces[uiCnt].sWidth), (INT16)(gCreditFaces[uiCnt].sY + gCreditFaces[uiCnt].sHeight), MSYS_PRIORITY_NORMAL,
|
MSYS_DefineRegion( &gCrdtMouseRegions[uiCnt], gCreditFaces[uiCnt].sX + xResOffset, gCreditFaces[uiCnt].sY + yResOffset, (INT16)(gCreditFaces[uiCnt].sX + gCreditFaces[uiCnt].sWidth + xResOffset), (INT16)(gCreditFaces[uiCnt].sY + gCreditFaces[uiCnt].sHeight + yResOffset), MSYS_PRIORITY_NORMAL,
|
||||||
CURSOR_WWW, SelectCreditFaceMovementRegionCallBack, SelectCreditFaceRegionCallBack );
|
CURSOR_WWW, SelectCreditFaceMovementRegionCallBack, SelectCreditFaceRegionCallBack );
|
||||||
|
|
||||||
|
|
||||||
// Add region
|
// Add region
|
||||||
MSYS_AddRegion( &gCrdtMouseRegions[uiCnt] );
|
MSYS_AddRegion( &gCrdtMouseRegions[uiCnt] );
|
||||||
@@ -546,38 +321,21 @@ BOOLEAN EnterCreditsScreen()
|
|||||||
MSYS_SetRegionUserData( &gCrdtMouseRegions[uiCnt], 0, uiCnt );
|
MSYS_SetRegionUserData( &gCrdtMouseRegions[uiCnt], 0, uiCnt );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
//open the credit text file
|
|
||||||
ghFile = FileOpen( CRDT_NAME_OF_CREDIT_FILE, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
|
|
||||||
if( !ghFile )
|
|
||||||
{
|
|
||||||
return( FALSE );
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
giCurrentlySelectedFace = -1;
|
giCurrentlySelectedFace = -1;
|
||||||
gfPauseCreditScreen = FALSE;
|
gfPauseCreditScreen = FALSE;
|
||||||
|
|
||||||
InitCreditEyeBlinking();
|
InitCreditEyeBlinking();
|
||||||
|
|
||||||
|
|
||||||
return( TRUE );
|
return( TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
BOOLEAN ExitCreditScreen()
|
BOOLEAN ExitCreditScreen()
|
||||||
{
|
{
|
||||||
UINT32 uiCnt;
|
UINT32 uiCnt;
|
||||||
|
|
||||||
|
|
||||||
//Blit the background image
|
|
||||||
// DeleteVideoSurfaceFromIndex( guiCreditBackGroundImage );
|
|
||||||
DeleteVideoObjectFromIndex( guiCreditBackGroundImage );
|
DeleteVideoObjectFromIndex( guiCreditBackGroundImage );
|
||||||
|
|
||||||
DeleteVideoObjectFromIndex( guiCreditFaces );
|
DeleteVideoObjectFromIndex( guiCreditFaces );
|
||||||
|
|
||||||
|
|
||||||
//ShutDown Credit link list
|
//ShutDown Credit link list
|
||||||
ShutDownCreditList();
|
ShutDownCreditList();
|
||||||
|
|
||||||
@@ -586,20 +344,20 @@ BOOLEAN ExitCreditScreen()
|
|||||||
MSYS_RemoveRegion( &gCrdtMouseRegions[uiCnt] );
|
MSYS_RemoveRegion( &gCrdtMouseRegions[uiCnt] );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
//close the text file
|
|
||||||
FileClose( ghFile );
|
|
||||||
ghFile = 0;
|
|
||||||
*/
|
|
||||||
|
|
||||||
return( TRUE );
|
return( TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//hhh
|
//hhh
|
||||||
void HandleCreditScreen()
|
void HandleCreditScreen()
|
||||||
{
|
{
|
||||||
// UINT32 uiTime = GetJA2Clock();
|
UINT16 CRDT_NAME_LOC_X = 375 + xResOffset;
|
||||||
|
UINT16 CRDT_NAME_LOC_Y = 420 + yResOffset;
|
||||||
|
UINT16 CRDT_NAME_TITLE_LOC_Y = 435 + yResOffset;
|
||||||
|
UINT16 CRDT_NAME_FUNNY_LOC_Y = 450 + yResOffset;
|
||||||
|
|
||||||
|
UINT16 CRDT_NAME_LOC_WIDTH = 260;
|
||||||
|
UINT16 CRDT_NAME_LOC_HEIGHT = ( CRDT_NAME_FUNNY_LOC_Y - CRDT_NAME_LOC_Y + GetFontHeight( CRDT_NAME_FONT ) );
|
||||||
|
|
||||||
if( gubCreditScreenRenderFlags == CRDT_RENDER_ALL )
|
if( gubCreditScreenRenderFlags == CRDT_RENDER_ALL )
|
||||||
{
|
{
|
||||||
@@ -607,14 +365,12 @@ void HandleCreditScreen()
|
|||||||
gubCreditScreenRenderFlags = CRDT_RENDER_NONE;
|
gubCreditScreenRenderFlags = CRDT_RENDER_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//Handle the Credit linked list
|
//Handle the Credit linked list
|
||||||
HandleCreditNodes();
|
HandleCreditNodes();
|
||||||
|
|
||||||
//Handle the blinkng eyes
|
//Handle the blinkng eyes
|
||||||
HandleCreditEyeBlinking();
|
HandleCreditEyeBlinking();
|
||||||
|
|
||||||
|
|
||||||
//is it time to get a new node
|
//is it time to get a new node
|
||||||
if( gCrdtLastAddedNode == NULL || ( CRDT_START_POS_Y - ( gCrdtLastAddedNode->sPosY + gCrdtLastAddedNode->sHeightOfString - 16 ) ) >= (INT16)guiGapTillReadNextCredit )
|
if( gCrdtLastAddedNode == NULL || ( CRDT_START_POS_Y - ( gCrdtLastAddedNode->sPosY + gCrdtLastAddedNode->sHeightOfString - 16 ) ) >= (INT16)guiGapTillReadNextCredit )
|
||||||
{
|
{
|
||||||
@@ -625,8 +381,6 @@ void HandleCreditScreen()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
RestoreExternBackgroundRect( CRDT_NAME_LOC_X, CRDT_NAME_LOC_Y, CRDT_NAME_LOC_WIDTH, (INT16)CRDT_NAME_LOC_HEIGHT );
|
RestoreExternBackgroundRect( CRDT_NAME_LOC_X, CRDT_NAME_LOC_Y, CRDT_NAME_LOC_WIDTH, (INT16)CRDT_NAME_LOC_HEIGHT );
|
||||||
|
|
||||||
if( giCurrentlySelectedFace != -1 )
|
if( giCurrentlySelectedFace != -1 )
|
||||||
@@ -637,21 +391,14 @@ void HandleCreditScreen()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//rrr
|
//rrr
|
||||||
BOOLEAN RenderCreditScreen()
|
BOOLEAN RenderCreditScreen()
|
||||||
{
|
{
|
||||||
|
|
||||||
HVOBJECT hPixHandle;
|
HVOBJECT hPixHandle;
|
||||||
|
|
||||||
GetVideoObject(&hPixHandle, guiCreditBackGroundImage );
|
GetVideoObject(&hPixHandle, guiCreditBackGroundImage );
|
||||||
BltVideoObject( FRAME_BUFFER, hPixHandle, 0, 0, 0, VO_BLT_SRCTRANSPARENCY, NULL);
|
BltVideoObject( FRAME_BUFFER, hPixHandle, 0, xResOffset, yResOffset, VO_BLT_SRCTRANSPARENCY, NULL);
|
||||||
/*
|
|
||||||
HVSURFACE hVSurface;
|
|
||||||
|
|
||||||
GetVideoSurface( &hVSurface, guiCreditBackGroundImage );
|
|
||||||
BltVideoSurfaceToVideoSurface( ghFrameBuffer, hVSurface, 0, 0, 0, 0, NULL );
|
|
||||||
*/
|
|
||||||
if( !gfCrdtHaveRenderedFirstFrameToSaveBuffer )
|
if( !gfCrdtHaveRenderedFirstFrameToSaveBuffer )
|
||||||
{
|
{
|
||||||
gfCrdtHaveRenderedFirstFrameToSaveBuffer = TRUE;
|
gfCrdtHaveRenderedFirstFrameToSaveBuffer = TRUE;
|
||||||
@@ -666,12 +413,11 @@ BOOLEAN RenderCreditScreen()
|
|||||||
return( TRUE );
|
return( TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GetCreditScreenUserInput()
|
void GetCreditScreenUserInput()
|
||||||
{
|
{
|
||||||
InputAtom Event;
|
InputAtom Event;
|
||||||
|
|
||||||
while( DequeueEvent( &Event ) )
|
while (DequeueSpecificEvent(&Event, KEY_DOWN|KEY_UP|KEY_REPEAT))
|
||||||
{
|
{
|
||||||
if( Event.usEvent == KEY_DOWN )
|
if( Event.usEvent == KEY_DOWN )
|
||||||
{
|
{
|
||||||
@@ -683,7 +429,6 @@ void GetCreditScreenUserInput()
|
|||||||
SetCreditsExitScreen( MAINMENU_SCREEN );
|
SetCreditsExitScreen( MAINMENU_SCREEN );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
//#ifdef JA2TESTVERSION
|
|
||||||
case 'r':
|
case 'r':
|
||||||
gubCreditScreenRenderFlags = CRDT_RENDER_ALL;
|
gubCreditScreenRenderFlags = CRDT_RENDER_ALL;
|
||||||
break;
|
break;
|
||||||
@@ -707,7 +452,6 @@ void GetCreditScreenUserInput()
|
|||||||
else
|
else
|
||||||
gfPauseCreditScreen = TRUE;
|
gfPauseCreditScreen = TRUE;
|
||||||
break;
|
break;
|
||||||
//#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -792,7 +536,6 @@ BOOLEAN DeleteNode( CRDT_NODE *pNodeToDelete )
|
|||||||
pTempNode->pString = NULL;
|
pTempNode->pString = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//if the node had something to display, delete a surface for it
|
//if the node had something to display, delete a surface for it
|
||||||
if( pTempNode->uiType == CRDT_NODE_DEFAULT )
|
if( pTempNode->uiType == CRDT_NODE_DEFAULT )
|
||||||
{
|
{
|
||||||
@@ -800,7 +543,6 @@ BOOLEAN DeleteNode( CRDT_NODE *pNodeToDelete )
|
|||||||
pTempNode->uiVideoSurfaceImage = 0;
|
pTempNode->uiVideoSurfaceImage = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//Free the node
|
//Free the node
|
||||||
MemFree( pTempNode );
|
MemFree( pTempNode );
|
||||||
pTempNode = NULL;
|
pTempNode = NULL;
|
||||||
@@ -808,7 +550,6 @@ BOOLEAN DeleteNode( CRDT_NODE *pNodeToDelete )
|
|||||||
return( TRUE );
|
return( TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//aaa
|
//aaa
|
||||||
BOOLEAN AddCreditNode( UINT32 uiType, UINT32 uiFlags, STR16 pString )
|
BOOLEAN AddCreditNode( UINT32 uiType, UINT32 uiFlags, STR16 pString )
|
||||||
{
|
{
|
||||||
@@ -818,6 +559,8 @@ BOOLEAN AddCreditNode( UINT32 uiType, UINT32 uiFlags, STR16 pString )
|
|||||||
UINT32 uiFontToUse;
|
UINT32 uiFontToUse;
|
||||||
UINT8 uiColorToUse;
|
UINT8 uiColorToUse;
|
||||||
|
|
||||||
|
UINT16 CRDT_TEXT_START_LOC = xResOffset + 10;
|
||||||
|
|
||||||
//if
|
//if
|
||||||
if( uiType == CRDT_NODE_NONE)
|
if( uiType == CRDT_NODE_NONE)
|
||||||
{
|
{
|
||||||
@@ -839,18 +582,6 @@ BOOLEAN AddCreditNode( UINT32 uiType, UINT32 uiFlags, STR16 pString )
|
|||||||
uiFontToUse = guiCreditScreenTitleFont;
|
uiFontToUse = guiCreditScreenTitleFont;
|
||||||
uiColorToUse = gubCreditScreenTitleColor;
|
uiColorToUse = gubCreditScreenTitleColor;
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
else if ( uiFlags & CRDT_FLAG__START_SECTION )
|
|
||||||
{
|
|
||||||
uiFontToUse = ;
|
|
||||||
uiColorToUse = ;
|
|
||||||
}
|
|
||||||
else if ( uiFlags & CRDT_FLAG__END_SECTION )
|
|
||||||
{
|
|
||||||
uiFontToUse = ;
|
|
||||||
uiColorToUse = ;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
uiFontToUse = guiCreditScreenActiveFont;
|
uiFontToUse = guiCreditScreenActiveFont;
|
||||||
@@ -918,9 +649,6 @@ BOOLEAN AddCreditNode( UINT32 uiType, UINT32 uiFlags, STR16 pString )
|
|||||||
SetFontDestBuffer(FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE);
|
SetFontDestBuffer(FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Insert the node into the list
|
// Insert the node into the list
|
||||||
//
|
//
|
||||||
@@ -968,7 +696,6 @@ void HandleCreditNodes()
|
|||||||
if( gfPauseCreditScreen )
|
if( gfPauseCreditScreen )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
pCurrent = gCrdtRootNode;
|
pCurrent = gCrdtRootNode;
|
||||||
|
|
||||||
if( !( GetJA2Clock() - guiCrdtLastTimeUpdatingNode > guiCrdtNodeScrollSpeed ) )
|
if( !( GetJA2Clock() - guiCrdtLastTimeUpdatingNode > guiCrdtNodeScrollSpeed ) )
|
||||||
@@ -992,8 +719,6 @@ void HandleCreditNodes()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// RestoreExternBackgroundRect( CRDT_TEXT_START_LOC, 0, CRDT_WIDTH_OF_TEXT_AREA, CRDT_LINE_NODE_DISAPPEARS_AT );
|
|
||||||
|
|
||||||
guiCrdtLastTimeUpdatingNode = GetJA2Clock();
|
guiCrdtLastTimeUpdatingNode = GetJA2Clock();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1002,7 +727,6 @@ void HandleCurrentCreditNode( CRDT_NODE *pCurrent )
|
|||||||
//switch on the type of node
|
//switch on the type of node
|
||||||
switch( pCurrent->uiType )
|
switch( pCurrent->uiType )
|
||||||
{
|
{
|
||||||
//new codes:
|
|
||||||
case CRDT_NODE_DEFAULT:
|
case CRDT_NODE_DEFAULT:
|
||||||
HandleNode_Default( pCurrent );
|
HandleNode_Default( pCurrent );
|
||||||
break;
|
break;
|
||||||
@@ -1015,33 +739,24 @@ void HandleCurrentCreditNode( CRDT_NODE *pCurrent )
|
|||||||
|
|
||||||
void HandleNode_Default( CRDT_NODE *pCurrent )
|
void HandleNode_Default( CRDT_NODE *pCurrent )
|
||||||
{
|
{
|
||||||
//if it is time to update the current node
|
//Display the Current Node
|
||||||
// if( ( uiCurrentTime - pCurrent->uiLastTime ) > guiCrdtNodeScrollSpeed )
|
DisplayCreditNode( pCurrent );
|
||||||
|
|
||||||
|
//Save the old position
|
||||||
|
pCurrent->sOldPosX = pCurrent->sPosX;
|
||||||
|
pCurrent->sOldPosY = pCurrent->sPosY;
|
||||||
|
|
||||||
|
//Move the current node up
|
||||||
|
pCurrent->sPosY -= CRDT_SCROLL_PIXEL_AMOUNT;
|
||||||
|
|
||||||
|
//if the node is entirely off the screen
|
||||||
|
if( ( pCurrent->sPosY + pCurrent->sHeightOfString ) < CRDT_LINE_NODE_DISAPPEARS_AT )
|
||||||
{
|
{
|
||||||
//Display the Current Node
|
//mark the node to be deleted this frame
|
||||||
DisplayCreditNode( pCurrent );
|
pCurrent->fDelete = TRUE;
|
||||||
|
|
||||||
//Save the old position
|
|
||||||
pCurrent->sOldPosX = pCurrent->sPosX;
|
|
||||||
pCurrent->sOldPosY = pCurrent->sPosY;
|
|
||||||
|
|
||||||
//Move the current node up
|
|
||||||
pCurrent->sPosY -= CRDT_SCROLL_PIXEL_AMOUNT;
|
|
||||||
|
|
||||||
//if the node is entirely off the screen
|
|
||||||
if( ( pCurrent->sPosY + pCurrent->sHeightOfString ) < CRDT_LINE_NODE_DISAPPEARS_AT )
|
|
||||||
{
|
|
||||||
//mark the node to be deleted this frame
|
|
||||||
pCurrent->fDelete = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Update the last time to be the current time
|
|
||||||
// pCurrent->uiLastTime = uiCurrentTime + ( uiCurrentTime - ( pCurrent->uiLastTime + guiCrdtNodeScrollSpeed ) );
|
|
||||||
|
|
||||||
// pCurrent->uiLastTime = ( uiCurrentTime - ( uiCurrentTime - pCurrent->uiLastTime - guiCrdtNodeScrollSpeed) );
|
|
||||||
|
|
||||||
pCurrent->uiLastTime = GetJA2Clock();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pCurrent->uiLastTime = GetJA2Clock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1058,7 +773,6 @@ BOOLEAN DisplayCreditNode( CRDT_NODE *pCurrent )
|
|||||||
//if the node is new and we havent displayed it yet
|
//if the node is new and we havent displayed it yet
|
||||||
if( pCurrent->uiLastTime == 0 )
|
if( pCurrent->uiLastTime == 0 )
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//else we have to restore were the string was
|
//else we have to restore were the string was
|
||||||
@@ -1091,7 +805,6 @@ BOOLEAN DisplayCreditNode( CRDT_NODE *pCurrent )
|
|||||||
|
|
||||||
GetVideoSurface( &hVSurface, pCurrent->uiVideoSurfaceImage );
|
GetVideoSurface( &hVSurface, pCurrent->uiVideoSurfaceImage );
|
||||||
|
|
||||||
|
|
||||||
BltVideoSurfaceToVideoSurface( ghFrameBuffer, hVSurface, 0, pCurrent->sPosX, pCurrent->sPosY, VS_BLT_CLIPPED | VS_BLT_USECOLORKEY, NULL );
|
BltVideoSurfaceToVideoSurface( ghFrameBuffer, hVSurface, 0, pCurrent->sPosX, pCurrent->sPosY, VS_BLT_CLIPPED | VS_BLT_USECOLORKEY, NULL );
|
||||||
|
|
||||||
return( TRUE );
|
return( TRUE );
|
||||||
@@ -1376,7 +1089,6 @@ BOOLEAN GetNextCreditFromTextFile()
|
|||||||
//Increment to the next crdit record
|
//Increment to the next crdit record
|
||||||
guiCurrentCreditRecord++;
|
guiCurrentCreditRecord++;
|
||||||
|
|
||||||
|
|
||||||
//if there are no codes in the string
|
//if there are no codes in the string
|
||||||
if( zOriginalString[0] != CRDT_START_CODE )
|
if( zOriginalString[0] != CRDT_START_CODE )
|
||||||
{
|
{
|
||||||
@@ -1394,7 +1106,6 @@ BOOLEAN GetNextCreditFromTextFile()
|
|||||||
//Retrive all the codes from the string
|
//Retrive all the codes from the string
|
||||||
pzEndCode = wcsstr( zOriginalString, CRDT_END_CODE );
|
pzEndCode = wcsstr( zOriginalString, CRDT_END_CODE );
|
||||||
|
|
||||||
|
|
||||||
//Make a string for the codes
|
//Make a string for the codes
|
||||||
wcscpy( zCodes, zOriginalString );
|
wcscpy( zCodes, zOriginalString );
|
||||||
|
|
||||||
@@ -1466,10 +1177,6 @@ BOOLEAN GetNextCreditFromTextFile()
|
|||||||
//return any flags that need to be set in the node
|
//return any flags that need to be set in the node
|
||||||
UINT32 GetAndHandleCreditCodeFromCodeString( STR16 pzCode )
|
UINT32 GetAndHandleCreditCodeFromCodeString( STR16 pzCode )
|
||||||
{
|
{
|
||||||
//new codes:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//if the code is to change the delay between strings
|
//if the code is to change the delay between strings
|
||||||
if( pzCode[0] == CRDT_DELAY_BN_STRINGS_CODE )
|
if( pzCode[0] == CRDT_DELAY_BN_STRINGS_CODE )
|
||||||
{
|
{
|
||||||
@@ -1477,13 +1184,10 @@ UINT32 GetAndHandleCreditCodeFromCodeString( STR16 pzCode )
|
|||||||
|
|
||||||
//Get the delay from the string
|
//Get the delay from the string
|
||||||
swscanf( &pzCode[1], L"%d%*s", &uiNewDelay );
|
swscanf( &pzCode[1], L"%d%*s", &uiNewDelay );
|
||||||
|
|
||||||
// guiCrdtDelayBetweenNodes = uiNewDelay;
|
|
||||||
guiGapBetweenCreditNodes = uiNewDelay;
|
guiGapBetweenCreditNodes = uiNewDelay;
|
||||||
|
|
||||||
return( CRDT_NODE_NONE );
|
return( CRDT_NODE_NONE );
|
||||||
}
|
}
|
||||||
|
|
||||||
//if the code is to change the delay between sections strings
|
//if the code is to change the delay between sections strings
|
||||||
else if( pzCode[0] == CRDT_DELAY_BN_SECTIONS_CODE )
|
else if( pzCode[0] == CRDT_DELAY_BN_SECTIONS_CODE )
|
||||||
{
|
{
|
||||||
@@ -1491,14 +1195,10 @@ UINT32 GetAndHandleCreditCodeFromCodeString( STR16 pzCode )
|
|||||||
|
|
||||||
//Get the delay from the string
|
//Get the delay from the string
|
||||||
swscanf( &pzCode[1], L"%d%*s", &uiNewDelay );
|
swscanf( &pzCode[1], L"%d%*s", &uiNewDelay );
|
||||||
|
|
||||||
// guiCrdtDelayBetweenCreditSection = uiNewDelay;
|
|
||||||
guiGapBetweenCreditSections = uiNewDelay;
|
guiGapBetweenCreditSections = uiNewDelay;
|
||||||
|
|
||||||
return( CRDT_NODE_NONE );
|
return( CRDT_NODE_NONE );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
else if( pzCode[0] == CRDT_SCROLL_SPEED )
|
else if( pzCode[0] == CRDT_SCROLL_SPEED )
|
||||||
{
|
{
|
||||||
UINT32 uiScrollSpeed=0;
|
UINT32 uiScrollSpeed=0;
|
||||||
@@ -1510,7 +1210,6 @@ UINT32 GetAndHandleCreditCodeFromCodeString( STR16 pzCode )
|
|||||||
|
|
||||||
return( CRDT_NODE_NONE );
|
return( CRDT_NODE_NONE );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if( pzCode[0] == CRDT_FONT_JUSTIFICATION )
|
else if( pzCode[0] == CRDT_FONT_JUSTIFICATION )
|
||||||
{
|
{
|
||||||
UINT32 uiJustification=0;
|
UINT32 uiJustification=0;
|
||||||
@@ -1536,45 +1235,30 @@ UINT32 GetAndHandleCreditCodeFromCodeString( STR16 pzCode )
|
|||||||
|
|
||||||
return( CRDT_NODE_NONE );
|
return( CRDT_NODE_NONE );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if( pzCode[0] == CRDT_TITLE_FONT_COLOR )
|
else if( pzCode[0] == CRDT_TITLE_FONT_COLOR )
|
||||||
{
|
{
|
||||||
//Get the new color for the title
|
|
||||||
//SB: memory corruption fix
|
|
||||||
// swscanf( &pzCode[1], L"%d%*s", &gubCreditScreenTitleColor );
|
|
||||||
UINT uiBuffer = 0;
|
UINT uiBuffer = 0;
|
||||||
swscanf( &pzCode[1], L"%d%*s", &uiBuffer );
|
swscanf( &pzCode[1], L"%d%*s", &uiBuffer );
|
||||||
gubCreditScreenTitleColor = (UINT8)uiBuffer;
|
gubCreditScreenTitleColor = (UINT8)uiBuffer;
|
||||||
|
|
||||||
return( CRDT_NODE_NONE );
|
return( CRDT_NODE_NONE );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if( pzCode[0] == CRDT_ACTIVE_FONT_COLOR )
|
else if( pzCode[0] == CRDT_ACTIVE_FONT_COLOR )
|
||||||
{
|
{
|
||||||
//Get the new color for the active text
|
|
||||||
//SB: memory corruption fix
|
|
||||||
// swscanf( &pzCode[1], L"%d%*s", &gubCreditScreenActiveColor );
|
|
||||||
UINT uiBuffer = 0;
|
UINT uiBuffer = 0;
|
||||||
swscanf( &pzCode[1], L"%d%*s", &uiBuffer );
|
swscanf( &pzCode[1], L"%d%*s", &uiBuffer );
|
||||||
gubCreditScreenActiveColor = (UINT8)uiBuffer;
|
gubCreditScreenActiveColor = (UINT8)uiBuffer;
|
||||||
|
|
||||||
return( CRDT_NODE_NONE );
|
return( CRDT_NODE_NONE );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//else its the title code
|
|
||||||
else if( pzCode[0] == CRDT_TITLE )
|
else if( pzCode[0] == CRDT_TITLE )
|
||||||
{
|
{
|
||||||
return( CRDT_FLAG__TITLE );
|
return( CRDT_FLAG__TITLE );
|
||||||
}
|
}
|
||||||
|
|
||||||
//else its the title code
|
|
||||||
else if( pzCode[0] == CRDT_START_OF_SECTION )
|
else if( pzCode[0] == CRDT_START_OF_SECTION )
|
||||||
{
|
{
|
||||||
return( CRDT_FLAG__START_SECTION );
|
return( CRDT_FLAG__START_SECTION );
|
||||||
}
|
}
|
||||||
|
|
||||||
//else its the title code
|
|
||||||
else if( pzCode[0] == CRDT_END_OF_SECTION )
|
else if( pzCode[0] == CRDT_END_OF_SECTION )
|
||||||
{
|
{
|
||||||
return( CRDT_FLAG__END_SECTION );
|
return( CRDT_FLAG__END_SECTION );
|
||||||
@@ -1609,8 +1293,6 @@ STR16 GetNextCreditCode( STR16 pString, UINT32 *pSizeOfCode )
|
|||||||
//if there is no separation code, then there must be an end code
|
//if there is no separation code, then there must be an end code
|
||||||
if( pzNewCode == NULL )
|
if( pzNewCode == NULL )
|
||||||
{
|
{
|
||||||
//pzNewCode = wcsstr( pString, CRDT_END_CODE );
|
|
||||||
|
|
||||||
//we are done
|
//we are done
|
||||||
pzNewCode = NULL;
|
pzNewCode = NULL;
|
||||||
}
|
}
|
||||||
@@ -1619,7 +1301,6 @@ STR16 GetNextCreditCode( STR16 pString, UINT32 *pSizeOfCode )
|
|||||||
//get rid of separeation code
|
//get rid of separeation code
|
||||||
pzNewCode++;
|
pzNewCode++;
|
||||||
|
|
||||||
|
|
||||||
//calc size of sub string
|
//calc size of sub string
|
||||||
uiSizeOfCode = pzNewCode - pString;
|
uiSizeOfCode = pzNewCode - pString;
|
||||||
}
|
}
|
||||||
@@ -1628,7 +1309,6 @@ STR16 GetNextCreditCode( STR16 pString, UINT32 *pSizeOfCode )
|
|||||||
return( pzNewCode );
|
return( pzNewCode );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//Flags:
|
//Flags:
|
||||||
void HandleCreditFlags( UINT32 uiFlags )
|
void HandleCreditFlags( UINT32 uiFlags )
|
||||||
{
|
{
|
||||||
@@ -1638,19 +1318,15 @@ void HandleCreditFlags( UINT32 uiFlags )
|
|||||||
|
|
||||||
if( uiFlags & CRDT_FLAG__START_SECTION )
|
if( uiFlags & CRDT_FLAG__START_SECTION )
|
||||||
{
|
{
|
||||||
// guiCrdtTimeTillReadNextCredit = guiCrdtDelayBetweenNodes;
|
|
||||||
guiGapTillReadNextCredit = guiGapBetweenCreditNodes;
|
guiGapTillReadNextCredit = guiGapBetweenCreditNodes;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( uiFlags & CRDT_FLAG__END_SECTION )
|
if( uiFlags & CRDT_FLAG__END_SECTION )
|
||||||
{
|
{
|
||||||
// guiCrdtTimeTillReadNextCredit = guiCrdtDelayBetweenCreditSection;
|
|
||||||
guiGapTillReadNextCredit = guiGapBetweenCreditSections;
|
guiGapTillReadNextCredit = guiGapBetweenCreditSections;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void SelectCreditFaceRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
void SelectCreditFaceRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
||||||
{
|
{
|
||||||
if (iReason & MSYS_CALLBACK_REASON_INIT)
|
if (iReason & MSYS_CALLBACK_REASON_INIT)
|
||||||
@@ -1700,9 +1376,9 @@ void HandleCreditEyeBlinking()
|
|||||||
{
|
{
|
||||||
if( ( GetJA2Clock() - gCreditFaces[ubCnt].uiLastBlinkTime ) > (UINT32)gCreditFaces[ubCnt].sBlinkFreq )
|
if( ( GetJA2Clock() - gCreditFaces[ubCnt].uiLastBlinkTime ) > (UINT32)gCreditFaces[ubCnt].sBlinkFreq )
|
||||||
{
|
{
|
||||||
BltVideoObject( FRAME_BUFFER, hPixHandle, (UINT8)(ubCnt*3), gCreditFaces[ubCnt].sEyeX, gCreditFaces[ubCnt].sEyeY, VO_BLT_SRCTRANSPARENCY, NULL);
|
BltVideoObject( FRAME_BUFFER, hPixHandle, (UINT8)(ubCnt*3), gCreditFaces[ubCnt].sEyeX + xResOffset, gCreditFaces[ubCnt].sEyeY + yResOffset, VO_BLT_SRCTRANSPARENCY, NULL);
|
||||||
|
|
||||||
InvalidateRegion( gCreditFaces[ubCnt].sEyeX, gCreditFaces[ubCnt].sEyeY, gCreditFaces[ubCnt].sEyeX + CRDT_EYE_WIDTH, gCreditFaces[ubCnt].sEyeY + CRDT_EYE_HEIGHT );
|
InvalidateRegion( gCreditFaces[ubCnt].sEyeX + xResOffset, gCreditFaces[ubCnt].sEyeY + yResOffset, gCreditFaces[ubCnt].sEyeX + CRDT_EYE_WIDTH + xResOffset, gCreditFaces[ubCnt].sEyeY + CRDT_EYE_HEIGHT + yResOffset );
|
||||||
|
|
||||||
gCreditFaces[ubCnt].uiLastBlinkTime = GetJA2Clock();
|
gCreditFaces[ubCnt].uiLastBlinkTime = GetJA2Clock();
|
||||||
|
|
||||||
@@ -1712,7 +1388,7 @@ void HandleCreditEyeBlinking()
|
|||||||
{
|
{
|
||||||
gCreditFaces[ubCnt].uiEyesClosedTime = 0;
|
gCreditFaces[ubCnt].uiEyesClosedTime = 0;
|
||||||
|
|
||||||
RestoreExternBackgroundRect( gCreditFaces[ubCnt].sEyeX, gCreditFaces[ubCnt].sEyeY, CRDT_EYE_WIDTH, CRDT_EYE_HEIGHT );
|
RestoreExternBackgroundRect( gCreditFaces[ubCnt].sEyeX + xResOffset, gCreditFaces[ubCnt].sEyeY + yResOffset, CRDT_EYE_WIDTH, CRDT_EYE_HEIGHT );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -143,24 +143,24 @@
|
|||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<PropertyGroup Label="UserMacros" />
|
<PropertyGroup Label="UserMacros" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<OutDir>..\lib\VS2010\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\lib\VS2010\$(JA2Config)\$(Configuration)\</OutDir>
|
||||||
<IntDir>..\build\VS2010\$(ProjectName)_$(Configuration)\</IntDir>
|
<IntDir>$(SolutionDir)\build\VS2010\$(JA2Config)\$(ProjectName)_$(Configuration)\</IntDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MapEditorD|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MapEditorD|Win32'">
|
||||||
<OutDir>..\lib\VS2010\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\lib\VS2010\$(JA2Config)\$(Configuration)\</OutDir>
|
||||||
<IntDir>..\build\VS2010\$(ProjectName)_$(Configuration)\</IntDir>
|
<IntDir>$(SolutionDir)\build\VS2010\$(JA2Config)\$(ProjectName)_$(Configuration)\</IntDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<OutDir>..\lib\VS2010\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\lib\VS2010\$(JA2Config)\$(Configuration)\</OutDir>
|
||||||
<IntDir>..\build\VS2010\$(ProjectName)_$(Configuration)\</IntDir>
|
<IntDir>$(SolutionDir)\build\VS2010\$(JA2Config)\$(ProjectName)_$(Configuration)\</IntDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MapEditor|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MapEditor|Win32'">
|
||||||
<OutDir>..\lib\VS2010\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\lib\VS2010\$(JA2Config)\$(Configuration)\</OutDir>
|
||||||
<IntDir>..\build\VS2010\$(ProjectName)_$(Configuration)\</IntDir>
|
<IntDir>$(SolutionDir)\build\VS2010\$(JA2Config)\$(ProjectName)_$(Configuration)\</IntDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Relese_WithDebugInfo|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Relese_WithDebugInfo|Win32'">
|
||||||
<OutDir>..\lib\VS2010\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\lib\VS2010\$(JA2Config)\$(Configuration)\</OutDir>
|
||||||
<IntDir>..\build\VS2010\$(ProjectName)_$(Configuration)\</IntDir>
|
<IntDir>$(SolutionDir)\build\VS2010\$(JA2Config)\$(ProjectName)_$(Configuration)\</IntDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
|
|||||||
@@ -955,7 +955,7 @@ void HandleMouseWheelEvents(void)//dnl ch36 150909
|
|||||||
|
|
||||||
void InitErrorCatchDialog()
|
void InitErrorCatchDialog()
|
||||||
{
|
{
|
||||||
SGPRect CenteringRect= {0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 };
|
SGPRect CenteringRect= {0 + xResOffset, 0, SCREEN_WIDTH - xResOffset, SCREEN_HEIGHT };
|
||||||
|
|
||||||
// do message box and return
|
// do message box and return
|
||||||
giErrorCatchMessageBox = DoMessageBox( MSG_BOX_BASIC_STYLE, gzErrorCatchString,
|
giErrorCatchMessageBox = DoMessageBox( MSG_BOX_BASIC_STYLE, gzErrorCatchString,
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ BOOLEAN MessageBoxHandled()
|
|||||||
{
|
{
|
||||||
InputAtom DummyEvent;
|
InputAtom DummyEvent;
|
||||||
|
|
||||||
while( DequeueEvent( &DummyEvent ) )
|
while (DequeueSpecificEvent(&DummyEvent, KEY_DOWN|KEY_UP|KEY_REPEAT))
|
||||||
{
|
{
|
||||||
if ( DummyEvent.usEvent == KEY_DOWN )
|
if ( DummyEvent.usEvent == KEY_DOWN )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -397,7 +397,7 @@ void PopupMenuHandle()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//Use keyboard input as well.
|
//Use keyboard input as well.
|
||||||
while( DequeueEvent( &InputEvent ) )
|
while (DequeueSpecificEvent(&InputEvent, KEY_DOWN|KEY_UP|KEY_REPEAT))
|
||||||
{
|
{
|
||||||
switch(InputEvent.usEvent)
|
switch(InputEvent.usEvent)
|
||||||
{
|
{
|
||||||
|
|||||||
+1015
-352
File diff suppressed because it is too large
Load Diff
+248
-165
@@ -37,6 +37,8 @@
|
|||||||
#include "displaycover.h"
|
#include "displaycover.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "KeyMap.h"
|
||||||
|
#include "Timer Control.h"
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
#include "connect.h"
|
#include "connect.h"
|
||||||
#include "sgp_logger.h"
|
#include "sgp_logger.h"
|
||||||
@@ -94,7 +96,7 @@ bool UsingNewAttachmentSystem()
|
|||||||
|
|
||||||
bool UsingNewCTHSystem()
|
bool UsingNewCTHSystem()
|
||||||
{
|
{
|
||||||
return (gGameSettings.fOptions[TOPTION_USE_NCTH] == TRUE);
|
return (gGameOptions.fUseNCTH == TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string StringToLower(std::string strToConvert)
|
std::string StringToLower(std::string strToConvert)
|
||||||
@@ -120,7 +122,7 @@ BOOLEAN IsNIVModeValid(bool checkRes)
|
|||||||
isValid = FALSE;
|
isValid = FALSE;
|
||||||
|
|
||||||
// Also check the resolution if needed.
|
// Also check the resolution if needed.
|
||||||
if(checkRes == true && iResolution == 0)
|
if(checkRes == true && iResolution >= _640x480 && iResolution < _800x600)
|
||||||
isValid = FALSE;
|
isValid = FALSE;
|
||||||
|
|
||||||
return isValid;
|
return isValid;
|
||||||
@@ -204,11 +206,12 @@ BOOLEAN LoadGameSettings()
|
|||||||
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_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_ALTERNATE_BULLET_GRAPHICS] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_ALTERNATE_BULLET_GRAPHICS" , TRUE );
|
||||||
|
|
||||||
if (!is_networked)
|
//if (!is_networked)
|
||||||
gGameSettings.fOptions[TOPTION_USE_NCTH] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_USE_NCTH" , FALSE );
|
// gGameSettings.fOptions[TOPTION_USE_NCTH] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_USE_NCTH" , FALSE );
|
||||||
else
|
//else
|
||||||
gGameSettings.fOptions[TOPTION_USE_NCTH] = FALSE;
|
// gGameSettings.fOptions[TOPTION_USE_NCTH] = FALSE;
|
||||||
|
|
||||||
|
gGameSettings.fOptions[TOPTION_SHOW_MERC_RANKS] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_SHOW_MERC_RANKS" , FALSE );
|
||||||
gGameSettings.fOptions[TOPTION_SHOW_TACTICAL_FACE_GEAR] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_SHOW_TACTICAL_FACE_GEAR" , 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_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_CHEAT_MODE_OPTIONS_HEADER] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_CHEAT_MODE_OPTIONS_HEADER" , FALSE );
|
||||||
@@ -227,8 +230,19 @@ BOOLEAN LoadGameSettings()
|
|||||||
gGameSettings.fOptions[TOPTION_HIDE_BULLETS] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_HIDE_BULLETS" , FALSE );
|
gGameSettings.fOptions[TOPTION_HIDE_BULLETS] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_HIDE_BULLETS" , FALSE );
|
||||||
gGameSettings.fOptions[TOPTION_TRACKING_MODE] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_TRACKING_MODE" , TRUE );
|
gGameSettings.fOptions[TOPTION_TRACKING_MODE] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_TRACKING_MODE" , TRUE );
|
||||||
gGameSettings.fOptions[TOPTION_DISABLE_CURSOR_SWAP] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_DISABLE_CURSOR_SWAP" , FALSE );
|
gGameSettings.fOptions[TOPTION_DISABLE_CURSOR_SWAP] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_DISABLE_CURSOR_SWAP" , FALSE );
|
||||||
gGameSettings.fOptions[NUM_ALL_GAME_OPTIONS] = iniReader.ReadBoolean("JA2 Game Settings","NUM_ALL_GAME_OPTIONS" , FALSE );
|
|
||||||
|
|
||||||
|
if (!is_networked)
|
||||||
|
gGameSettings.fOptions[TOPTION_AUTO_FAST_FORWARD_MODE] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_AUTO_FAST_FORWARD_MODE" , FALSE );
|
||||||
|
else
|
||||||
|
gGameSettings.fOptions[TOPTION_AUTO_FAST_FORWARD_MODE] = FALSE;
|
||||||
|
|
||||||
|
// The "HIGHSPEED_TIMER" property from the ja2.ini is not set, disable the option
|
||||||
|
if (!IsHiSpeedClockMode())
|
||||||
|
gGameSettings.fOptions[TOPTION_AUTO_FAST_FORWARD_MODE] = FALSE;
|
||||||
|
|
||||||
|
//gGameOptions.fWeaponOverheating = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_WEAPON_OVERHEATING" , FALSE ); // Flugente FTW 1: Weapon Overheating
|
||||||
|
|
||||||
|
gGameSettings.fOptions[NUM_ALL_GAME_OPTIONS] = iniReader.ReadBoolean("JA2 Game Settings","NUM_ALL_GAME_OPTIONS" , FALSE );
|
||||||
|
|
||||||
DeleteShadeTableDir(); // ary-05/05/2009 : Might be bad idea for it to be here. But its gotta happen for some reason every now and then.
|
DeleteShadeTableDir(); // ary-05/05/2009 : Might be bad idea for it to be here. But its gotta happen for some reason every now and then.
|
||||||
// : The call to DeleteShadeTableDir() used to coincided with reseting an older settings file.
|
// : The call to DeleteShadeTableDir() used to coincided with reseting an older settings file.
|
||||||
@@ -293,136 +307,139 @@ BOOLEAN SaveGameSettings()
|
|||||||
{
|
{
|
||||||
if (!is_networked)
|
if (!is_networked)
|
||||||
{
|
{
|
||||||
//Record the current settings into the game settins structure
|
//Record the current settings into the game settins structure
|
||||||
gGameSettings.ubSoundEffectsVolume = (UINT8)GetSoundEffectsVolume( );
|
gGameSettings.ubSoundEffectsVolume = (UINT8)GetSoundEffectsVolume( );
|
||||||
gGameSettings.ubSpeechVolume = (UINT8)GetSpeechVolume( );
|
gGameSettings.ubSpeechVolume = (UINT8)GetSpeechVolume( );
|
||||||
gGameSettings.ubMusicVolumeSetting = (UINT8)MusicGetVolume( );
|
gGameSettings.ubMusicVolumeSetting = (UINT8)MusicGetVolume( );
|
||||||
|
|
||||||
std::stringstream settings;
|
std::stringstream settings;
|
||||||
const char endl[] = "\r\n";
|
const char endl[] = "\r\n";
|
||||||
settings << ";******************************************************************************************************************************" << endl;
|
settings << ";******************************************************************************************************************************" << endl;
|
||||||
settings << ";******************************************************************************************************************************" << endl;
|
settings << ";******************************************************************************************************************************" << endl;
|
||||||
settings << "; Jagged Alliance 2 --Settings File-- " << endl;
|
settings << "; Jagged Alliance 2 --Settings File-- " << endl;
|
||||||
settings << "; " << endl;
|
settings << "; " << endl;
|
||||||
settings << "; Please note that this file is automatically generated by the game. " << endl;
|
settings << "; Please note that this file is automatically generated by the game. " << endl;
|
||||||
settings << "; " << endl;
|
settings << "; " << endl;
|
||||||
settings << "; While it is safe to change things from within this file, not all values are acceptable. Some may break the game, " << endl;
|
settings << "; While it is safe to change things from within this file, not all values are acceptable. Some may break the game, " << endl;
|
||||||
settings << "; some may be ignored, but most likely they will be acceptable or reset to a default value. " << endl;
|
settings << "; some may be ignored, but most likely they will be acceptable or reset to a default value. " << endl;
|
||||||
settings << "; " << endl;
|
settings << "; " << endl;
|
||||||
settings << "; Please note, This file and its contents are in a beta phase. Expect changes, however they should be minimal and automated." << endl;
|
settings << "; Please note, This file and its contents are in a beta phase. Expect changes, however they should be minimal and automated." << endl;
|
||||||
settings << "; " << endl;
|
settings << "; " << endl;
|
||||||
settings << ";******************************************************************************************************************************" << endl;
|
settings << ";******************************************************************************************************************************" << endl;
|
||||||
settings << endl;
|
settings << endl;
|
||||||
settings << ";******************************************************************************************************************************" << endl;
|
settings << ";******************************************************************************************************************************" << endl;
|
||||||
settings << endl;
|
settings << endl;
|
||||||
settings << "; The Current Game Setting Struct is defined as : " << endl;
|
settings << "; The Current Game Setting Struct is defined as : " << endl;
|
||||||
settings << ";" << endl;
|
settings << ";" << endl;
|
||||||
settings << "; typedef struct" << endl;
|
settings << "; typedef struct" << endl;
|
||||||
settings << "; {" << endl;
|
settings << "; {" << endl;
|
||||||
settings << "; INT8 bLastSavedGameSlot; // The last saved game number goes in here" << endl;
|
settings << "; INT8 bLastSavedGameSlot; // The last saved game number goes in here" << endl;
|
||||||
settings << "; UINT8 ubMusicVolumeSetting; // Volume Setting" << endl;
|
settings << "; UINT8 ubMusicVolumeSetting; // Volume Setting" << endl;
|
||||||
settings << "; UINT8 ubSoundEffectsVolume; // Volume Setting" << endl;
|
settings << "; UINT8 ubSoundEffectsVolume; // Volume Setting" << endl;
|
||||||
settings << "; UINT8 ubSpeechVolume; // Volume Setting" << endl;
|
settings << "; UINT8 ubSpeechVolume; // Volume Setting" << endl;
|
||||||
settings << "; UINT8 fOptions[ NUM_ALL_GAME_OPTIONS ]; // Toggle Options (Speech, Subtitles, Show Tree Tops, etc.. )" << endl;
|
settings << "; UINT8 fOptions[ NUM_ALL_GAME_OPTIONS ]; // Toggle Options (Speech, Subtitles, Show Tree Tops, etc.. )" << endl;
|
||||||
settings << "; UINT32 uiMeanwhileScenesSeenFlags; // Bit Vector describing seen 'mean whiles..'" << endl;
|
settings << "; UINT32 uiMeanwhileScenesSeenFlags; // Bit Vector describing seen 'mean whiles..'" << endl;
|
||||||
settings << "; BOOLEAN fHideHelpInAllScreens; // Controls Help \"do not show help again\" checkbox" << endl;
|
settings << "; BOOLEAN fHideHelpInAllScreens; // Controls Help \"do not show help again\" checkbox" << endl;
|
||||||
//settings << "; UINT8 ubSizeOfDisplayCover; // The number of grids the player designates thru [Delete + ( = or - )]" << endl;
|
//settings << "; UINT8 ubSizeOfDisplayCover; // The number of grids the player designates thru [Delete + ( = or - )]" << endl;
|
||||||
//settings << "; UINT8 ubSizeOfLOS; // The number of grids the player designates thru [End + ( = or - )]" << endl;
|
//settings << "; UINT8 ubSizeOfLOS; // The number of grids the player designates thru [End + ( = or - )]" << endl;
|
||||||
settings << "; } GAME_SETTINGS" << endl;
|
settings << "; } GAME_SETTINGS" << endl;
|
||||||
settings << ";" << endl;
|
settings << ";" << endl;
|
||||||
settings << ";******************************************************************************************************************************" << endl;
|
settings << ";******************************************************************************************************************************" << endl;
|
||||||
settings << endl << endl;
|
settings << endl << endl;
|
||||||
settings << "[JA2 Game Settings]" << endl;
|
settings << "[JA2 Game Settings]" << endl;
|
||||||
|
|
||||||
settings << "bLastSavedGameSlot = " << (int)gGameSettings.bLastSavedGameSlot << endl;
|
settings << "bLastSavedGameSlot = " << (int)gGameSettings.bLastSavedGameSlot << endl;
|
||||||
settings << "ubMusicVolumeSetting = " << (int)gGameSettings.ubMusicVolumeSetting << endl;
|
settings << "ubMusicVolumeSetting = " << (int)gGameSettings.ubMusicVolumeSetting << endl;
|
||||||
settings << "ubSoundEffectsVolume = " << (int)gGameSettings.ubSoundEffectsVolume << endl;
|
settings << "ubSoundEffectsVolume = " << (int)gGameSettings.ubSoundEffectsVolume << endl;
|
||||||
settings << "ubSpeechVolume = " << (int)gGameSettings.ubSpeechVolume << endl;
|
settings << "ubSpeechVolume = " << (int)gGameSettings.ubSpeechVolume << endl;
|
||||||
settings << "uiMeanwhileScenesSeenFlags = " << gGameSettings.uiMeanwhileScenesSeenFlags << endl;
|
settings << "uiMeanwhileScenesSeenFlags = " << gGameSettings.uiMeanwhileScenesSeenFlags << endl;
|
||||||
settings << "fHideHelpInAllScreens = " << (gGameSettings.fHideHelpInAllScreens ? "TRUE" : "FALSE" ) << endl;
|
settings << "fHideHelpInAllScreens = " << (gGameSettings.fHideHelpInAllScreens ? "TRUE" : "FALSE" ) << endl;
|
||||||
//settings << "ubSizeOfDisplayCover = " << (int)gGameSettings.ubSizeOfDisplayCover << endl;
|
//settings << "ubSizeOfDisplayCover = " << (int)gGameSettings.ubSizeOfDisplayCover << endl;
|
||||||
//settings << "ubSizeOfLOS = " << (int)gGameSettings.ubSizeOfLOS << endl;
|
//settings << "ubSizeOfLOS = " << (int)gGameSettings.ubSizeOfLOS << endl;
|
||||||
settings << "TOPTION_SPEECH = " << (gGameSettings.fOptions[TOPTION_SPEECH] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_SPEECH = " << (gGameSettings.fOptions[TOPTION_SPEECH] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_MUTE_CONFIRMATIONS = " << (gGameSettings.fOptions[TOPTION_MUTE_CONFIRMATIONS] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_MUTE_CONFIRMATIONS = " << (gGameSettings.fOptions[TOPTION_MUTE_CONFIRMATIONS] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_SUBTITLES = " << (gGameSettings.fOptions[TOPTION_SUBTITLES] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_SUBTITLES = " << (gGameSettings.fOptions[TOPTION_SUBTITLES] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_KEY_ADVANCE_SPEECH = " << (gGameSettings.fOptions[TOPTION_KEY_ADVANCE_SPEECH] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_KEY_ADVANCE_SPEECH = " << (gGameSettings.fOptions[TOPTION_KEY_ADVANCE_SPEECH] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_ANIMATE_SMOKE = " << (gGameSettings.fOptions[TOPTION_ANIMATE_SMOKE] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_ANIMATE_SMOKE = " << (gGameSettings.fOptions[TOPTION_ANIMATE_SMOKE] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_BLOOD_N_GORE = " << (gGameSettings.fOptions[TOPTION_BLOOD_N_GORE] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_BLOOD_N_GORE = " << (gGameSettings.fOptions[TOPTION_BLOOD_N_GORE] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_DONT_MOVE_MOUSE = " << (gGameSettings.fOptions[TOPTION_DONT_MOVE_MOUSE] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_DONT_MOVE_MOUSE = " << (gGameSettings.fOptions[TOPTION_DONT_MOVE_MOUSE] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_OLD_SELECTION_METHOD = " << (gGameSettings.fOptions[TOPTION_OLD_SELECTION_METHOD] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_OLD_SELECTION_METHOD = " << (gGameSettings.fOptions[TOPTION_OLD_SELECTION_METHOD] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_ALWAYS_SHOW_MOVEMENT_PATH = " << (gGameSettings.fOptions[TOPTION_ALWAYS_SHOW_MOVEMENT_PATH] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_ALWAYS_SHOW_MOVEMENT_PATH = " << (gGameSettings.fOptions[TOPTION_ALWAYS_SHOW_MOVEMENT_PATH] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_SHOW_MISSES = " << (gGameSettings.fOptions[TOPTION_SHOW_MISSES] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_SHOW_MISSES = " << (gGameSettings.fOptions[TOPTION_SHOW_MISSES] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_RTCONFIRM = " << (gGameSettings.fOptions[TOPTION_RTCONFIRM] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_RTCONFIRM = " << (gGameSettings.fOptions[TOPTION_RTCONFIRM] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_SLEEPWAKE_NOTIFICATION = " << (gGameSettings.fOptions[TOPTION_SLEEPWAKE_NOTIFICATION] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_SLEEPWAKE_NOTIFICATION = " << (gGameSettings.fOptions[TOPTION_SLEEPWAKE_NOTIFICATION] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_USE_METRIC_SYSTEM = " << (gGameSettings.fOptions[TOPTION_USE_METRIC_SYSTEM] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_USE_METRIC_SYSTEM = " << (gGameSettings.fOptions[TOPTION_USE_METRIC_SYSTEM] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_MERC_ALWAYS_LIGHT_UP = " << (gGameSettings.fOptions[TOPTION_MERC_ALWAYS_LIGHT_UP] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_MERC_ALWAYS_LIGHT_UP = " << (gGameSettings.fOptions[TOPTION_MERC_ALWAYS_LIGHT_UP] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_SMART_CURSOR = " << (gGameSettings.fOptions[TOPTION_SMART_CURSOR] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_SMART_CURSOR = " << (gGameSettings.fOptions[TOPTION_SMART_CURSOR] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_SNAP_CURSOR_TO_DOOR = " << (gGameSettings.fOptions[TOPTION_SNAP_CURSOR_TO_DOOR] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_SNAP_CURSOR_TO_DOOR = " << (gGameSettings.fOptions[TOPTION_SNAP_CURSOR_TO_DOOR] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_GLOW_ITEMS = " << (gGameSettings.fOptions[TOPTION_GLOW_ITEMS] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_GLOW_ITEMS = " << (gGameSettings.fOptions[TOPTION_GLOW_ITEMS] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_TOGGLE_TREE_TOPS = " << (gGameSettings.fOptions[TOPTION_TOGGLE_TREE_TOPS] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_TOGGLE_TREE_TOPS = " << (gGameSettings.fOptions[TOPTION_TOGGLE_TREE_TOPS] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_TOGGLE_WIREFRAME = " << (gGameSettings.fOptions[TOPTION_TOGGLE_WIREFRAME] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_TOGGLE_WIREFRAME = " << (gGameSettings.fOptions[TOPTION_TOGGLE_WIREFRAME] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_3D_CURSOR = " << (gGameSettings.fOptions[TOPTION_3D_CURSOR] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_3D_CURSOR = " << (gGameSettings.fOptions[TOPTION_3D_CURSOR] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_CTH_CURSOR = " << (gGameSettings.fOptions[TOPTION_CTH_CURSOR] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_CTH_CURSOR = " << (gGameSettings.fOptions[TOPTION_CTH_CURSOR] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_GL_BURST_CURSOR = " << (gGameSettings.fOptions[TOPTION_GL_BURST_CURSOR] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_GL_BURST_CURSOR = " << (gGameSettings.fOptions[TOPTION_GL_BURST_CURSOR] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_ALLOW_TAUNTS = " << (gGameSettings.fOptions[TOPTION_ALLOW_TAUNTS] ? "TRUE" : "FALSE" ) << endl; // changed from drop all - SANDRO
|
settings << "TOPTION_ALLOW_TAUNTS = " << (gGameSettings.fOptions[TOPTION_ALLOW_TAUNTS] ? "TRUE" : "FALSE" ) << endl; // changed from drop all - SANDRO
|
||||||
settings << "TOPTION_GL_HIGH_ANGLE = " << (gGameSettings.fOptions[TOPTION_GL_HIGH_ANGLE] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_GL_HIGH_ANGLE = " << (gGameSettings.fOptions[TOPTION_GL_HIGH_ANGLE] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_ALLOW_REAL_TIME_SNEAK = " << (gGameSettings.fOptions[TOPTION_ALLOW_REAL_TIME_SNEAK] ? "TRUE" : "FALSE" ) << endl; // changed from restrict aim levels - SANDRO
|
settings << "TOPTION_ALLOW_REAL_TIME_SNEAK = " << (gGameSettings.fOptions[TOPTION_ALLOW_REAL_TIME_SNEAK] ? "TRUE" : "FALSE" ) << endl; // changed from restrict aim levels - SANDRO
|
||||||
settings << "TOPTION_SPACE_SELECTS_NEXT_SQUAD = " << (gGameSettings.fOptions[TOPTION_SPACE_SELECTS_NEXT_SQUAD] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_SPACE_SELECTS_NEXT_SQUAD = " << (gGameSettings.fOptions[TOPTION_SPACE_SELECTS_NEXT_SQUAD] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_SHOW_ITEM_SHADOW = " << (gGameSettings.fOptions[TOPTION_SHOW_ITEM_SHADOW] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_SHOW_ITEM_SHADOW = " << (gGameSettings.fOptions[TOPTION_SHOW_ITEM_SHADOW] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_SHOW_WEAPON_RANGE_IN_TILES = " << (gGameSettings.fOptions[TOPTION_SHOW_WEAPON_RANGE_IN_TILES] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_SHOW_WEAPON_RANGE_IN_TILES = " << (gGameSettings.fOptions[TOPTION_SHOW_WEAPON_RANGE_IN_TILES] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_TRACERS_FOR_SINGLE_FIRE = " << (gGameSettings.fOptions[TOPTION_TRACERS_FOR_SINGLE_FIRE] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_TRACERS_FOR_SINGLE_FIRE = " << (gGameSettings.fOptions[TOPTION_TRACERS_FOR_SINGLE_FIRE] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_RAIN_SOUND = " << (gGameSettings.fOptions[TOPTION_RAIN_SOUND] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_RAIN_SOUND = " << (gGameSettings.fOptions[TOPTION_RAIN_SOUND] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_ALLOW_CROWS = " << (gGameSettings.fOptions[TOPTION_ALLOW_CROWS] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_ALLOW_CROWS = " << (gGameSettings.fOptions[TOPTION_ALLOW_CROWS] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_ALLOW_SOLDIER_TOOLTIPS = " << (gGameSettings.fOptions[TOPTION_ALLOW_SOLDIER_TOOLTIPS] ? "TRUE" : "FALSE" ) << endl;
|
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_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_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_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_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_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_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_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_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_MERC_RANKS = " << (gGameSettings.fOptions[TOPTION_SHOW_MERC_RANKS] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_SHOW_TACTICAL_FACE_ICONS = " << (gGameSettings.fOptions[TOPTION_SHOW_TACTICAL_FACE_ICONS] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_SHOW_TACTICAL_FACE_GEAR = " << (gGameSettings.fOptions[TOPTION_SHOW_TACTICAL_FACE_GEAR] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_DISABLE_CURSOR_SWAP = " << (gGameSettings.fOptions[TOPTION_DISABLE_CURSOR_SWAP] ? "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_DISABLE_CURSOR_SWAP = " << (gGameSettings.fOptions[TOPTION_DISABLE_CURSOR_SWAP] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_FORCE_BOBBY_RAY_SHIPMENTS = " << (gGameSettings.fOptions[TOPTION_FORCE_BOBBY_RAY_SHIPMENTS] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_AUTO_FAST_FORWARD_MODE = " << (gGameSettings.fOptions[TOPTION_AUTO_FAST_FORWARD_MODE] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_CHEAT_MODE_OPTIONS_END = " << (gGameSettings.fOptions[TOPTION_CHEAT_MODE_OPTIONS_END] ? "TRUE" : "FALSE" ) << endl;
|
//settings << "TOPTION_WEAPON_OVERHEATING = " << (gGameOptions.fWeaponOverheating ? "TRUE" : "FALSE" ) << endl; // Flugente FTW 1: Weapon Overheating
|
||||||
settings << "TOPTION_DEBUG_MODE_OPTIONS_HEADER = " << (gGameSettings.fOptions[TOPTION_DEBUG_MODE_OPTIONS_HEADER] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_CHEAT_MODE_OPTIONS_HEADER = " << (gGameSettings.fOptions[TOPTION_CHEAT_MODE_OPTIONS_HEADER] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_REPORT_MISS_MARGIN = " << (gGameSettings.fOptions[TOPTION_REPORT_MISS_MARGIN] ? "TRUE" : "FALSE" ) << endl; // HEADROCK HAM 4: Shot offset report
|
settings << "TOPTION_FORCE_BOBBY_RAY_SHIPMENTS = " << (gGameSettings.fOptions[TOPTION_FORCE_BOBBY_RAY_SHIPMENTS] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_SHOW_RESET_ALL_OPTIONS = " << (gGameSettings.fOptions[TOPTION_SHOW_RESET_ALL_OPTIONS] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_CHEAT_MODE_OPTIONS_END = " << (gGameSettings.fOptions[TOPTION_CHEAT_MODE_OPTIONS_END] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_RESET_ALL_OPTIONS = " << (gGameSettings.fOptions[TOPTION_RESET_ALL_OPTIONS] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_DEBUG_MODE_OPTIONS_HEADER = " << (gGameSettings.fOptions[TOPTION_DEBUG_MODE_OPTIONS_HEADER] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_RETAIN_DEBUG_OPTIONS_IN_RELEASE = " << (gGameSettings.fOptions[TOPTION_RETAIN_DEBUG_OPTIONS_IN_RELEASE] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_REPORT_MISS_MARGIN = " << (gGameSettings.fOptions[TOPTION_REPORT_MISS_MARGIN] ? "TRUE" : "FALSE" ) << endl; // HEADROCK HAM 4: Shot offset report
|
||||||
settings << "TOPTION_DEBUG_MODE_RENDER_OPTIONS_GROUP = " << (gGameSettings.fOptions[TOPTION_DEBUG_MODE_RENDER_OPTIONS_GROUP] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_SHOW_RESET_ALL_OPTIONS = " << (gGameSettings.fOptions[TOPTION_SHOW_RESET_ALL_OPTIONS] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_RENDER_MOUSE_REGIONS = " << (gGameSettings.fOptions[TOPTION_RENDER_MOUSE_REGIONS] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_RESET_ALL_OPTIONS = " << (gGameSettings.fOptions[TOPTION_RESET_ALL_OPTIONS] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_DEBUG_MODE_OPTIONS_END = " << (gGameSettings.fOptions[TOPTION_DEBUG_MODE_OPTIONS_END] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_RETAIN_DEBUG_OPTIONS_IN_RELEASE = " << (gGameSettings.fOptions[TOPTION_RETAIN_DEBUG_OPTIONS_IN_RELEASE] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << ";******************************************************************************************************************************" << endl;
|
settings << "TOPTION_DEBUG_MODE_RENDER_OPTIONS_GROUP = " << (gGameSettings.fOptions[TOPTION_DEBUG_MODE_RENDER_OPTIONS_GROUP] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "; Options beyond this point are Code derived options, DO NOT CHANGE THESE UNLESS YOU KNOW WHAT YOUR ARE DOING." << endl;
|
settings << "TOPTION_RENDER_MOUSE_REGIONS = " << (gGameSettings.fOptions[TOPTION_RENDER_MOUSE_REGIONS] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "; They are only included here for complete transparency for all GameSettings content. " << endl;
|
settings << "TOPTION_DEBUG_MODE_OPTIONS_END = " << (gGameSettings.fOptions[TOPTION_DEBUG_MODE_OPTIONS_END] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << ";******************************************************************************************************************************" << endl;
|
settings << ";******************************************************************************************************************************" << endl;
|
||||||
settings << "TOPTION_LAST_OPTION = " << (gGameSettings.fOptions[TOPTION_LAST_OPTION] ? "TRUE" : "FALSE" ) << endl;
|
settings << "; Options beyond this point are Code derived options, DO NOT CHANGE THESE UNLESS YOU KNOW WHAT YOUR ARE DOING." << endl;
|
||||||
settings << "NUM_GAME_OPTIONS = " << (gGameSettings.fOptions[NUM_GAME_OPTIONS] ? "TRUE" : "FALSE" ) << endl;
|
settings << "; They are only included here for complete transparency for all GameSettings content. " << endl;
|
||||||
settings << "TOPTION_MERC_CASTS_LIGHT = " << (gGameSettings.fOptions[TOPTION_MERC_CASTS_LIGHT] ? "TRUE" : "FALSE" ) << endl;
|
settings << ";******************************************************************************************************************************" << endl;
|
||||||
settings << "TOPTION_HIDE_BULLETS = " << (gGameSettings.fOptions[TOPTION_HIDE_BULLETS] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_LAST_OPTION = " << (gGameSettings.fOptions[TOPTION_LAST_OPTION] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "TOPTION_TRACKING_MODE = " << (gGameSettings.fOptions[TOPTION_TRACKING_MODE] ? "TRUE" : "FALSE" ) << endl;
|
settings << "NUM_GAME_OPTIONS = " << (gGameSettings.fOptions[NUM_GAME_OPTIONS] ? "TRUE" : "FALSE" ) << endl;
|
||||||
settings << "NUM_ALL_GAME_OPTIONS = " << (gGameSettings.fOptions[NUM_ALL_GAME_OPTIONS] ? "TRUE" : "FALSE" ) << endl;
|
settings << "TOPTION_MERC_CASTS_LIGHT = " << (gGameSettings.fOptions[TOPTION_MERC_CASTS_LIGHT] ? "TRUE" : "FALSE" ) << endl;
|
||||||
|
settings << "TOPTION_HIDE_BULLETS = " << (gGameSettings.fOptions[TOPTION_HIDE_BULLETS] ? "TRUE" : "FALSE" ) << endl;
|
||||||
|
settings << "TOPTION_TRACKING_MODE = " << (gGameSettings.fOptions[TOPTION_TRACKING_MODE] ? "TRUE" : "FALSE" ) << endl;
|
||||||
|
settings << "NUM_ALL_GAME_OPTIONS = " << (gGameSettings.fOptions[NUM_ALL_GAME_OPTIONS] ? "TRUE" : "FALSE" ) << endl;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
|
||||||
vfs::COpenWriteFile wfile(GAME_SETTINGS_FILE,true,true);
|
|
||||||
wfile->write(settings.str().c_str(), settings.str().length());
|
|
||||||
}
|
|
||||||
catch(vfs::Exception& ex)
|
|
||||||
{
|
|
||||||
SGP_WARNING(ex.what());
|
|
||||||
vfs::CFile file(GAME_SETTINGS_FILE);
|
|
||||||
if(file.openWrite(true,true))
|
|
||||||
{
|
{
|
||||||
vfs::COpenWriteFile wfile( vfs::tWritableFile::cast(&file));
|
vfs::COpenWriteFile wfile(GAME_SETTINGS_FILE,true,true);
|
||||||
SGP_TRYCATCH_RETHROW(file.write(settings.str().c_str(), settings.str().length()),L"");
|
wfile->write(settings.str().c_str(), settings.str().length());
|
||||||
|
}
|
||||||
|
catch(vfs::Exception& ex)
|
||||||
|
{
|
||||||
|
SGP_WARNING(ex.what());
|
||||||
|
vfs::CFile file(GAME_SETTINGS_FILE);
|
||||||
|
if(file.openWrite(true,true))
|
||||||
|
{
|
||||||
|
vfs::COpenWriteFile wfile( vfs::tWritableFile::cast(&file));
|
||||||
|
SGP_TRYCATCH_RETHROW(file.write(settings.str().c_str(), settings.str().length()),L"");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return( TRUE );
|
return( TRUE );
|
||||||
@@ -498,7 +515,9 @@ void InitGameSettings()
|
|||||||
gGameSettings.fOptions[ TOPTION_ALTERNATE_BULLET_GRAPHICS ] = TRUE;
|
gGameSettings.fOptions[ TOPTION_ALTERNATE_BULLET_GRAPHICS ] = TRUE;
|
||||||
|
|
||||||
// CHRISL: HAM 4: Activate/Deactivate NCTH mode
|
// CHRISL: HAM 4: Activate/Deactivate NCTH mode
|
||||||
gGameSettings.fOptions[ TOPTION_USE_NCTH ] = FALSE;
|
//gGameSettings.fOptions[ TOPTION_USE_NCTH ] = FALSE;
|
||||||
|
|
||||||
|
gGameSettings.fOptions[ TOPTION_SHOW_MERC_RANKS ] = TRUE;
|
||||||
|
|
||||||
// WANNE:
|
// WANNE:
|
||||||
gGameSettings.fOptions[ TOPTION_SHOW_TACTICAL_FACE_GEAR ] = TRUE;
|
gGameSettings.fOptions[ TOPTION_SHOW_TACTICAL_FACE_GEAR ] = TRUE;
|
||||||
@@ -507,6 +526,10 @@ void InitGameSettings()
|
|||||||
gGameSettings.fOptions[ TOPTION_REPORT_MISS_MARGIN ] = FALSE;
|
gGameSettings.fOptions[ TOPTION_REPORT_MISS_MARGIN ] = FALSE;
|
||||||
|
|
||||||
gGameSettings.fOptions[ TOPTION_DISABLE_CURSOR_SWAP ] = FALSE;
|
gGameSettings.fOptions[ TOPTION_DISABLE_CURSOR_SWAP ] = FALSE;
|
||||||
|
gGameSettings.fOptions[ TOPTION_AUTO_FAST_FORWARD_MODE ] = FALSE;
|
||||||
|
|
||||||
|
// Flugente FTW 1: Weapon Overheating
|
||||||
|
//gGameSettings.fOptions[ TOPTION_WEAPON_OVERHEATING ] = TRUE;
|
||||||
|
|
||||||
// arynn: Cheat/Debug Menu
|
// arynn: Cheat/Debug Menu
|
||||||
gGameSettings.fOptions[ TOPTION_CHEAT_MODE_OPTIONS_HEADER ] = FALSE;
|
gGameSettings.fOptions[ TOPTION_CHEAT_MODE_OPTIONS_HEADER ] = FALSE;
|
||||||
@@ -555,6 +578,15 @@ void InitGameOptions()
|
|||||||
gGameOptions.ubGameStyle = STYLE_SCIFI;
|
gGameOptions.ubGameStyle = STYLE_SCIFI;
|
||||||
gGameOptions.ubDifficultyLevel = DIF_LEVEL_MEDIUM;
|
gGameOptions.ubDifficultyLevel = DIF_LEVEL_MEDIUM;
|
||||||
|
|
||||||
|
//Fast Bobby Ray Shipments (CHECK)
|
||||||
|
//gGameOptions.fBobbyRayFastShipments = FALSE;
|
||||||
|
//Inventory AP Costs (CHECK)
|
||||||
|
gGameOptions.fInventoryCostsAP = TRUE;
|
||||||
|
|
||||||
|
gGameOptions.fUseNCTH = FALSE;
|
||||||
|
gGameOptions.fImprovedInterruptSystem = TRUE;
|
||||||
|
gGameOptions.fWeaponOverheating = TRUE;
|
||||||
|
|
||||||
//CHRISL: override default inventory mode when in low res
|
//CHRISL: override default inventory mode when in low res
|
||||||
if(IsNIVModeValid(true) == FALSE)
|
if(IsNIVModeValid(true) == FALSE)
|
||||||
{
|
{
|
||||||
@@ -579,9 +611,7 @@ void InitGameOptions()
|
|||||||
gGameOptions.fNewTraitSystem = FALSE;
|
gGameOptions.fNewTraitSystem = FALSE;
|
||||||
|
|
||||||
gGameOptions.ubProgressSpeedOfItemsChoices = ITEM_PROGRESS_NORMAL;
|
gGameOptions.ubProgressSpeedOfItemsChoices = ITEM_PROGRESS_NORMAL;
|
||||||
gGameOptions.fEnableAllTerrorists = FALSE;
|
|
||||||
gGameOptions.fEnemiesDropAllItems = FALSE;
|
gGameOptions.fEnemiesDropAllItems = FALSE;
|
||||||
gGameOptions.fEnableAllWeaponCaches = FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -621,9 +651,9 @@ void LoadGameExternalOptions()
|
|||||||
|
|
||||||
gGameExternalOptions.iMaxEnemyGroupSize = iniReader.ReadInteger("System Limit Settings","MAX_STRATEGIC_ENEMY_GROUP_SIZE",20, 10, 100);
|
gGameExternalOptions.iMaxEnemyGroupSize = iniReader.ReadInteger("System Limit Settings","MAX_STRATEGIC_ENEMY_GROUP_SIZE",20, 10, 100);
|
||||||
//JMich
|
//JMich
|
||||||
gGameExternalOptions.guiMaxItemSize = iniReader.ReadInteger("System Limit Settings","MAX_ITEM_SIZE",34, 0, 250);
|
gGameExternalOptions.guiMaxItemSize = iniReader.ReadInteger("System Limit Settings","MAX_ITEM_SIZE",34, 0, 65000);
|
||||||
gGameExternalOptions.guiMaxWeaponSize = iniReader.ReadInteger("System Limit Settings","MAX_WEAPON_SIZE", 9, 0, 100);
|
gGameExternalOptions.guiMaxWeaponSize = iniReader.ReadInteger("System Limit Settings","MAX_WEAPON_SIZE", 9, 0, 32000);
|
||||||
gGameExternalOptions.guiOIVSizeNumber = iniReader.ReadInteger("System Limit Settings","OLD_INVENTORY_ITEM_NUMBER", 99, 0, 255);
|
gGameExternalOptions.guiOIVSizeNumber = iniReader.ReadInteger("System Limit Settings","OLD_INVENTORY_ITEM_NUMBER", 99, 0, 65535);
|
||||||
|
|
||||||
//################# Data File Settings #################
|
//################# Data File Settings #################
|
||||||
|
|
||||||
@@ -869,6 +899,9 @@ void LoadGameExternalOptions()
|
|||||||
// WANNE: Don't stop and talk in turn based when spotting an item
|
// WANNE: Don't stop and talk in turn based when spotting an item
|
||||||
gGameExternalOptions.fItemSpottedNoTalk = iniReader.ReadBoolean("Tactical Interface Settings","ITEMS_SPOTTED_NO_TALK", FALSE);
|
gGameExternalOptions.fItemSpottedNoTalk = iniReader.ReadBoolean("Tactical Interface Settings","ITEMS_SPOTTED_NO_TALK", FALSE);
|
||||||
|
|
||||||
|
// Buggler: Exit sector using grid exit in turn based mode?
|
||||||
|
gGameExternalOptions.fGridExitInTurnBased = iniReader.ReadBoolean("Tactical Interface Settings","GRID_EXIT_IN_TURNBASED", TRUE);
|
||||||
|
|
||||||
//DBrot: Stand up after battle?
|
//DBrot: Stand up after battle?
|
||||||
gGameExternalOptions.fStandUpAfterBattle = iniReader.ReadBoolean("Tactical Interface Settings","STAND_UP_AFTER_BATTLE", TRUE);
|
gGameExternalOptions.fStandUpAfterBattle = iniReader.ReadBoolean("Tactical Interface Settings","STAND_UP_AFTER_BATTLE", TRUE);
|
||||||
// Tactical militia command
|
// Tactical militia command
|
||||||
@@ -889,17 +922,11 @@ void LoadGameExternalOptions()
|
|||||||
// HEADROCK HAM 3.6: Maximum number of messages displayed in Tactical view
|
// HEADROCK HAM 3.6: Maximum number of messages displayed in Tactical view
|
||||||
gGameExternalOptions.ubMaxMessagesTactical = iniReader.ReadInteger("Tactical Interface Settings","MAXIMUM_MESSAGES_IN_TACTICAL", 6, 1, 36);
|
gGameExternalOptions.ubMaxMessagesTactical = iniReader.ReadInteger("Tactical Interface Settings","MAXIMUM_MESSAGES_IN_TACTICAL", 6, 1, 36);
|
||||||
// Apply a resolution-based limit.
|
// Apply a resolution-based limit.
|
||||||
switch (iResolution)
|
|
||||||
{
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
case 0:
|
gGameExternalOptions.ubMaxMessagesTactical = __max(20, gGameExternalOptions.ubMaxMessagesTactical);
|
||||||
// Max 20 lines in 640x480
|
else if (iResolution < _1024x768)
|
||||||
gGameExternalOptions.ubMaxMessagesTactical = __max(20, gGameExternalOptions.ubMaxMessagesTactical);
|
gGameExternalOptions.ubMaxMessagesTactical = __max(26, gGameExternalOptions.ubMaxMessagesTactical);
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
// Max 26 lines in 800x600
|
|
||||||
gGameExternalOptions.ubMaxMessagesTactical = __max(26, gGameExternalOptions.ubMaxMessagesTactical);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
gGameExternalOptions.bTacticalFaceIconStyle = iniReader.ReadInteger("Tactical Interface Settings","TACTICAL_FACE_ICON_STYLE", 0, 0, 3);
|
gGameExternalOptions.bTacticalFaceIconStyle = iniReader.ReadInteger("Tactical Interface Settings","TACTICAL_FACE_ICON_STYLE", 0, 0, 3);
|
||||||
|
|
||||||
@@ -1041,6 +1068,10 @@ void LoadGameExternalOptions()
|
|||||||
|
|
||||||
gGameExternalOptions.fAllowWalkingWithWeaponRaised = iniReader.ReadBoolean("Tactical Gameplay Settings","ALLOW_WALKING_WITH_WEAPON_RAISED", TRUE);
|
gGameExternalOptions.fAllowWalkingWithWeaponRaised = iniReader.ReadBoolean("Tactical Gameplay Settings","ALLOW_WALKING_WITH_WEAPON_RAISED", TRUE);
|
||||||
|
|
||||||
|
gGameExternalOptions.fWeaponResting = iniReader.ReadBoolean("Tactical Gameplay Settings","WEAPON_RESTING",TRUE);
|
||||||
|
gGameExternalOptions.fDisplayWeaponRestingIndicator = iniReader.ReadBoolean("Tactical Gameplay Settings","WEAPON_RESTING_DISPLAY",TRUE);
|
||||||
|
gGameExternalOptions.ubProneModifierPercentage = iniReader.ReadInteger("Tactical Gameplay Settings","WEAPON_RESTING_PRONE_BONI_PERCENTAGE", 50, 0, 100);
|
||||||
|
|
||||||
// WANNE: Externalized grid number of new merc when they arrive with the helicopter (by Jazz)
|
// 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 );
|
gGameExternalOptions.iInitialMercArrivalLocation = iniReader.ReadInteger("Tactical Gameplay Settings","INITIAL_MERC_ARRIVAL_LOCATION", 4870 );
|
||||||
|
|
||||||
@@ -1164,6 +1195,10 @@ void LoadGameExternalOptions()
|
|||||||
// Penalty for fire when you don't see enemy (when you see enemy because his see militya or ather merc)
|
// Penalty for fire when you don't see enemy (when you see enemy because his see militya or ather merc)
|
||||||
gGameExternalOptions.iPenaltyShootUnSeen = iniReader.ReadInteger("Tactical Interface Settings","SHOOT_UNSEEN_PENALTY",0,0,255);
|
gGameExternalOptions.iPenaltyShootUnSeen = iniReader.ReadInteger("Tactical Interface Settings","SHOOT_UNSEEN_PENALTY",0,0,255);
|
||||||
|
|
||||||
|
//Inventory AP Weight Divisor
|
||||||
|
gGameExternalOptions.uWeightDivisor = iniReader.ReadFloat("Tactical Interface Settings","INV_AP_WEIGHT_DIVISOR",5,0,100);
|
||||||
|
|
||||||
|
|
||||||
// CtH/2 if the target are out of gun range or invisible for this merc
|
// CtH/2 if the target are out of gun range or invisible for this merc
|
||||||
gGameExternalOptions.fOutOfGunRangeOrSight = iniReader.ReadFloat("Tactical Interface Settings","OUT_OF_SIGHT_OR_GUN_RANGE",2,1,100);
|
gGameExternalOptions.fOutOfGunRangeOrSight = iniReader.ReadFloat("Tactical Interface Settings","OUT_OF_SIGHT_OR_GUN_RANGE",2,1,100);
|
||||||
// *** ddd - END
|
// *** ddd - END
|
||||||
@@ -1181,7 +1216,7 @@ void LoadGameExternalOptions()
|
|||||||
gGameExternalOptions.fSoldiersWearAnyArmour = iniReader.ReadBoolean("Tactical Gameplay Settings", "SOLDIERS_ALWAYS_WEAR_ANY_ARMOR", FALSE);
|
gGameExternalOptions.fSoldiersWearAnyArmour = iniReader.ReadBoolean("Tactical Gameplay Settings", "SOLDIERS_ALWAYS_WEAR_ANY_ARMOR", FALSE);
|
||||||
|
|
||||||
// improved Interrupt System (info: multiplayer game ALWAYS use the old interrupt system, because the new one causes crashes, no problem so far)
|
// improved Interrupt System (info: multiplayer game ALWAYS use the old interrupt system, because the new one causes crashes, no problem so far)
|
||||||
gGameExternalOptions.fImprovedInterruptSystem = iniReader.ReadBoolean("Tactical Gameplay Settings", "IMPROVED_INTERRUPT_SYSTEM", TRUE);
|
//gGameOptions.fImprovedInterruptSystem = iniReader.ReadBoolean("Tactical Gameplay Settings", "IMPROVED_INTERRUPT_SYSTEM", TRUE);
|
||||||
gGameExternalOptions.ubBasicPercentRegisterValueIIS = iniReader.ReadInteger("Tactical Gameplay Settings", "BASIC_PERCENTAGE_APS_REGISTERED", 60, 0, 250);
|
gGameExternalOptions.ubBasicPercentRegisterValueIIS = iniReader.ReadInteger("Tactical Gameplay Settings", "BASIC_PERCENTAGE_APS_REGISTERED", 60, 0, 250);
|
||||||
gGameExternalOptions.ubPercentRegisterValuePerLevelIIS = iniReader.ReadInteger("Tactical Gameplay Settings", "PERCENTAGE_APS_REGISTERED_PER_EXP_LEVEL", 4, 0, 100);
|
gGameExternalOptions.ubPercentRegisterValuePerLevelIIS = iniReader.ReadInteger("Tactical Gameplay Settings", "PERCENTAGE_APS_REGISTERED_PER_EXP_LEVEL", 4, 0, 100);
|
||||||
gGameExternalOptions.ubBasicReactionTimeLengthIIS = iniReader.ReadInteger("Tactical Gameplay Settings", "BASIC_REACTION_TIME_LENGTH", 25, 5, 100);
|
gGameExternalOptions.ubBasicReactionTimeLengthIIS = iniReader.ReadInteger("Tactical Gameplay Settings", "BASIC_REACTION_TIME_LENGTH", 25, 5, 100);
|
||||||
@@ -1281,8 +1316,11 @@ void LoadGameExternalOptions()
|
|||||||
gGameExternalOptions.guiProlongLightningIfSeenSomeone = iniReader.ReadInteger("Tactical Weather Settings","DELAY_IN_SECONDS_IF_SEEN_SOMEONE_DURING_LIGHTNING_IN_TURNBASED",5, 1, 60);
|
gGameExternalOptions.guiProlongLightningIfSeenSomeone = iniReader.ReadInteger("Tactical Weather Settings","DELAY_IN_SECONDS_IF_SEEN_SOMEONE_DURING_LIGHTNING_IN_TURNBASED",5, 1, 60);
|
||||||
gGameExternalOptions.guiChanceToDoLightningBetweenTurns = iniReader.ReadInteger("Tactical Weather Settings","CHANCE_TO_DO_LIGHTNING_BETWEEN_TURNS",35, 0, 100);
|
gGameExternalOptions.guiChanceToDoLightningBetweenTurns = iniReader.ReadInteger("Tactical Weather Settings","CHANCE_TO_DO_LIGHTNING_BETWEEN_TURNS",35, 0, 100);
|
||||||
|
|
||||||
|
//################# Tactical Weapon Overheating Settings ##################
|
||||||
|
// Flugente FTW 1: These settings control the behavior of Weapon Overheating, its severity, and its display.
|
||||||
|
|
||||||
|
gGameExternalOptions.fDisplayOverheatThermometer = iniReader.ReadBoolean("Tactical Weapon Overheating Settings","OVERHEATING_DISPLAY_THERMOMETER",TRUE);
|
||||||
|
gGameExternalOptions.iCooldownModificatorLonelyBarrel = iniReader.ReadFloat ("Tactical Weapon Overheating Settings","OVERHEATING_COOLDOWN_MODIFICATOR_LONELYBARREL", 1.15f, 1.0f, 10.0f);
|
||||||
|
|
||||||
//################# Strategic Gamestart Settings ##################
|
//################# Strategic Gamestart Settings ##################
|
||||||
|
|
||||||
@@ -1376,10 +1414,6 @@ void LoadGameExternalOptions()
|
|||||||
// Allow reinforcements only between City sectors?
|
// Allow reinforcements only between City sectors?
|
||||||
gGameExternalOptions.gfAllowReinforcementsOnlyInCity = iniReader.ReadBoolean("Strategic Gameplay Settings","ALLOW_REINFORCEMENTS_ONLY_IN_CITIES",FALSE);
|
gGameExternalOptions.gfAllowReinforcementsOnlyInCity = iniReader.ReadBoolean("Strategic Gameplay Settings","ALLOW_REINFORCEMENTS_ONLY_IN_CITIES",FALSE);
|
||||||
|
|
||||||
// SANDRO - moved into the game start screen
|
|
||||||
//gGameExternalOptions.fEnableAllTerrorists = iniReader.ReadBoolean("Strategic Gameplay Settings", "ENABLE_ALL_TERRORISTS", FALSE);
|
|
||||||
//gGameExternalOptions.fEnableAllWeaponCaches = iniReader.ReadBoolean("Strategic Gameplay Settings", "ENABLE_ALL_WEAPON_CACHES", FALSE);
|
|
||||||
|
|
||||||
// Kaiden: Vehicle Inventory change - Added INI file Option VEHICLE_INVENTORY
|
// Kaiden: Vehicle Inventory change - Added INI file Option VEHICLE_INVENTORY
|
||||||
gGameExternalOptions.fVehicleInventory = iniReader.ReadBoolean("Strategic Gameplay Settings", "VEHICLE_INVENTORY", TRUE);
|
gGameExternalOptions.fVehicleInventory = iniReader.ReadBoolean("Strategic Gameplay Settings", "VEHICLE_INVENTORY", TRUE);
|
||||||
|
|
||||||
@@ -1403,6 +1437,11 @@ void LoadGameExternalOptions()
|
|||||||
// CHRISL: Determine how Skyrider should handle landing in enemy occupied sectors
|
// CHRISL: Determine how Skyrider should handle landing in enemy occupied sectors
|
||||||
gGameExternalOptions.ubSkyriderHotLZ = iniReader.ReadInteger("Strategic Gameplay Settings", "ALLOW_SKYRIDER_HOT_LZ", 0);
|
gGameExternalOptions.ubSkyriderHotLZ = iniReader.ReadInteger("Strategic Gameplay Settings", "ALLOW_SKYRIDER_HOT_LZ", 0);
|
||||||
|
|
||||||
|
// enable all terrorists
|
||||||
|
gGameExternalOptions.fEnableAllTerrorists = iniReader.ReadBoolean("Strategic Gameplay Settings", "ENABLE_ALL_TERRORISTS", TRUE);
|
||||||
|
// enable all weapon caches
|
||||||
|
gGameExternalOptions.fEnableAllWeaponCaches = iniReader.ReadBoolean("Strategic Gameplay Settings", "ENABLE_ALL_WEAPON_CACHES", FALSE);
|
||||||
|
|
||||||
|
|
||||||
//################# Laptop Settings ##################
|
//################# Laptop Settings ##################
|
||||||
|
|
||||||
@@ -1418,6 +1457,9 @@ void LoadGameExternalOptions()
|
|||||||
// HEADROCK HAM 3: If enabled, tooltipping over Bobby Ray's weapons will show a list of possible attachments to those weapons.
|
// HEADROCK HAM 3: If enabled, tooltipping over Bobby Ray's weapons will show a list of possible attachments to those weapons.
|
||||||
gGameExternalOptions.fBobbyRayTooltipsShowAttachments = iniReader.ReadBoolean("Bobby Ray Settings","BOBBY_RAY_TOOLTIPS_SHOW_POSSIBLE_ATTACHMENTS", FALSE);
|
gGameExternalOptions.fBobbyRayTooltipsShowAttachments = iniReader.ReadBoolean("Bobby Ray Settings","BOBBY_RAY_TOOLTIPS_SHOW_POSSIBLE_ATTACHMENTS", FALSE);
|
||||||
|
|
||||||
|
//JMich - Maximum Purchase Amount for Bobby Ray
|
||||||
|
gGameExternalOptions.ubBobbyRayMaxPurchaseAmount = iniReader.ReadInteger("Bobby Ray Settings", "BOBBY_RAY_MAX_PURCHASE_AMOUNT", 10, 10, 100);
|
||||||
|
|
||||||
// WDS - Option to turn off stealing
|
// WDS - Option to turn off stealing
|
||||||
gGameExternalOptions.fStealingDisabled = iniReader.ReadBoolean("Bobby Ray Settings","STEALING_FROM_SHIPMENTS_DISABLED",FALSE);
|
gGameExternalOptions.fStealingDisabled = iniReader.ReadBoolean("Bobby Ray Settings","STEALING_FROM_SHIPMENTS_DISABLED",FALSE);
|
||||||
|
|
||||||
@@ -1643,6 +1685,9 @@ void LoadGameExternalOptions()
|
|||||||
// chance that Tony will be in his office - silversurfer/SANDRO
|
// chance that Tony will be in his office - silversurfer/SANDRO
|
||||||
gGameExternalOptions.ubChanceTonyAvailable = iniReader.ReadInteger("Shopkeeper Inventory Settings","CHANCE_TONY_AVAILABLE", 80, 0, 100);
|
gGameExternalOptions.ubChanceTonyAvailable = iniReader.ReadInteger("Shopkeeper Inventory Settings","CHANCE_TONY_AVAILABLE", 80, 0, 100);
|
||||||
|
|
||||||
|
// Fast Bobby Ray shipments
|
||||||
|
gGameExternalOptions.fBobbyRayFastShipments = iniReader.ReadBoolean("Shopkeeper Inventory Settings", "FAST_BOBBY_RAY_SHIPMENTS", FALSE);
|
||||||
|
|
||||||
//################# Strategic Assignment Settings ##################
|
//################# Strategic Assignment Settings ##################
|
||||||
|
|
||||||
////////// ALL ASSIGNMENTS //////////
|
////////// ALL ASSIGNMENTS //////////
|
||||||
@@ -1700,6 +1745,17 @@ void LoadGameExternalOptions()
|
|||||||
#else
|
#else
|
||||||
gGameExternalOptions.fEnableInventoryPoolQ = FALSE;
|
gGameExternalOptions.fEnableInventoryPoolQ = FALSE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
////////// CLOCK SETTINGS //////////
|
||||||
|
|
||||||
|
// Key to artificially alter the clock so turns run faster
|
||||||
|
STRING512 sFFKeyBuffer;
|
||||||
|
iniReader.ReadString("Clock Settings", "FAST_FORWARD_KEY", NULL, sFFKeyBuffer, _countof(sFFKeyBuffer));
|
||||||
|
|
||||||
|
gGameExternalOptions.iFastForwardKey = ParseKeyString(sFFKeyBuffer);
|
||||||
|
gGameExternalOptions.iFastForwardPeriod = (FLOAT)iniReader.ReadDouble("Clock Settings","FAST_FORWARD_PERIOD", 500, 1, 10000);
|
||||||
|
gGameExternalOptions.fClockSpeedPercent = (FLOAT)iniReader.ReadDouble("Clock Settings","CLOCK_SPEED_PERCENT", 150, 100, 300);
|
||||||
|
gGameExternalOptions.iNotifyFrequency = iniReader.ReadInteger("Clock Settings","UPDATE_FREQUENCY", 16000, 1000, 20000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2104,6 +2160,33 @@ void LoadGameAPBPConstants()
|
|||||||
// HEADROCK HAM 3.2: Modifier for legshot AP loss based on damage
|
// 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[AP_LOSS_PER_LEGSHOT_DAMAGE] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_LOSS_PER_LEGSHOT_DAMAGE",4),4);
|
||||||
|
|
||||||
|
//Costs to pick up item from position
|
||||||
|
APBPConstants[AP_INV_FROM_NONE] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_INV_FROM_NONE",0),0);
|
||||||
|
APBPConstants[AP_INV_FROM_HANDS] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_INV_FROM_HANDS",0),0);
|
||||||
|
APBPConstants[AP_INV_FROM_EQUIPMENT] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_INV_FROM_EQUIPMENT",15),15);
|
||||||
|
APBPConstants[AP_INV_FROM_VEST] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_INV_FROM_VEST",5),5);
|
||||||
|
APBPConstants[AP_INV_FROM_RIG] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_INV_FROM_RIG",4),4);
|
||||||
|
APBPConstants[AP_INV_FROM_CPACK] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_INV_FROM_CPACK",6),6);
|
||||||
|
APBPConstants[AP_INV_FROM_BPACK] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_INV_FROM_BPACK",8),8);
|
||||||
|
APBPConstants[AP_INV_FROM_SLING] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_INV_FROM_SLING",6),6);
|
||||||
|
APBPConstants[AP_INV_FROM_KNIFE] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_INV_FROM_KNIFE",5),5);
|
||||||
|
APBPConstants[AP_INV_FROM_FACE] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_INV_FROM_FACE",2),2);
|
||||||
|
APBPConstants[AP_INV_FROM_BIG_POCKET] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_INV_FROM_BIG_POCKET",5),5);
|
||||||
|
APBPConstants[AP_INV_FROM_SMALL_POCKET] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_INV_FROM_SMALL_POCKET",4),4);
|
||||||
|
APBPConstants[AP_INV_TO_NONE] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_INV_TO_NONE",0),0);
|
||||||
|
APBPConstants[AP_INV_TO_HANDS] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_INV_TO_HANDS",0),0);
|
||||||
|
APBPConstants[AP_INV_TO_EQUIPMENT] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_INV_TO_EQUIPMENT",20),20);
|
||||||
|
APBPConstants[AP_INV_TO_VEST] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_INV_TO_VEST",6),6);
|
||||||
|
APBPConstants[AP_INV_TO_RIG] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_INV_TO_RIG",5),5);
|
||||||
|
APBPConstants[AP_INV_TO_CPACK] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_INV_TO_CPACK",7),7);
|
||||||
|
APBPConstants[AP_INV_TO_BPACK] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_INV_TO_BPACK",9),9);
|
||||||
|
APBPConstants[AP_INV_TO_SLING] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_INV_TO_SLING",7),7);
|
||||||
|
APBPConstants[AP_INV_TO_KNIFE] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_INV_TO_KNIFE",6),6);
|
||||||
|
APBPConstants[AP_INV_TO_FACE] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_INV_TO_FACE",2),2);
|
||||||
|
APBPConstants[AP_INV_TO_BIG_POCKET] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_INV_TO_BIG_POCKET",4),4);
|
||||||
|
APBPConstants[AP_INV_TO_SMALL_POCKET] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_INV_TO_SMALL_POCKET",5),5);
|
||||||
|
APBPConstants[AP_INV_MAX_COST] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_INV_MAX_COST",25),25);
|
||||||
|
|
||||||
APBPConstants[DEFAULT_APS] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","DEFAULT_APS",80),80);
|
APBPConstants[DEFAULT_APS] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","DEFAULT_APS",80),80);
|
||||||
APBPConstants[DEFAULT_AIMSKILL] = iniReader.ReadInteger("APConstants","DEFAULT_AIMSKILL",80);
|
APBPConstants[DEFAULT_AIMSKILL] = iniReader.ReadInteger("APConstants","DEFAULT_AIMSKILL",80);
|
||||||
|
|
||||||
@@ -2301,7 +2384,7 @@ void LoadCTHConstants()
|
|||||||
gGameCTHConstants.RECOIL_COUNTER_INCREMENT = iniReader.ReadInteger("Shooting Mechanism","RECOIL_COUNTER_INCREMENT",20, 0, 100);
|
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.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.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.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 );
|
gGameCTHConstants.RANGE_EFFECTS_DEV = iniReader.ReadBoolean("Shooting Mechanism","RANGE_EFFECTS_DEV", TRUE );
|
||||||
gGameCTHConstants.MAX_EFFECTIVE_RANGE_MULTIPLIER = iniReader.ReadFloat("Shooting Mechanism","MAX_EFFECTIVE_RANGE_MULTIPLIER",1.1f, 0.5f, 10.0f);
|
gGameCTHConstants.MAX_EFFECTIVE_RANGE_MULTIPLIER = iniReader.ReadFloat("Shooting Mechanism","MAX_EFFECTIVE_RANGE_MULTIPLIER",1.1f, 0.5f, 10.0f);
|
||||||
gGameCTHConstants.MAX_EFFECTIVE_RANGE_REDUCTION = iniReader.ReadFloat("Shooting Mechanism","MAX_EFFECTIVE_RANGE_REDUCTION",0.5f, 0.0f, 1.0f);
|
gGameCTHConstants.MAX_EFFECTIVE_RANGE_REDUCTION = iniReader.ReadFloat("Shooting Mechanism","MAX_EFFECTIVE_RANGE_REDUCTION",0.5f, 0.0f, 1.0f);
|
||||||
@@ -2662,16 +2745,16 @@ void DisplayGameSettings( )
|
|||||||
//ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"%s: %s", gzGIOScreenText[ GIO_GAME_SAVE_STYLE_TEXT ], gzGIOScreenText[ GIO_SAVE_ANYWHERE_TEXT + gGameOptions.fIronManMode ] );
|
//ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"%s: %s", gzGIOScreenText[ GIO_GAME_SAVE_STYLE_TEXT ], gzGIOScreenText[ GIO_SAVE_ANYWHERE_TEXT + gGameOptions.fIronManMode ] );
|
||||||
|
|
||||||
// All Terrorists Option
|
// All Terrorists Option
|
||||||
if( gGameOptions.fEnableAllTerrorists )
|
//if( gGameExternalOptions.fEnableAllTerrorists )
|
||||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"%s: %s", gzGIOScreenText[ GIO_TERRORISTS_TITLE_TEXT ], gzGIOScreenText[ GIO_TERRORISTS_ALL_TEXT ] );
|
// ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"%s: %s", gzGIOScreenText[ GIO_TERRORISTS_TITLE_TEXT ], gzGIOScreenText[ GIO_TERRORISTS_ALL_TEXT ] );
|
||||||
else
|
//else
|
||||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"%s: %s", gzGIOScreenText[ GIO_TERRORISTS_TITLE_TEXT ], gzGIOScreenText[ GIO_TERRORISTS_RANDOM_TEXT ] );
|
// ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"%s: %s", gzGIOScreenText[ GIO_TERRORISTS_TITLE_TEXT ], gzGIOScreenText[ GIO_TERRORISTS_RANDOM_TEXT ] );
|
||||||
|
|
||||||
// All Weapon Caches Option
|
//// All Weapon Caches Option
|
||||||
if( gGameOptions.fEnableAllWeaponCaches )
|
//if( gGameOptions.fEnableAllWeaponCaches )
|
||||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"%s: %s", gzGIOScreenText[ GIO_CACHES_TITLE_TEXT ], gzGIOScreenText[ GIO_CACHES_ALL_TEXT ] );
|
// ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"%s: %s", gzGIOScreenText[ GIO_CACHES_TITLE_TEXT ], gzGIOScreenText[ GIO_CACHES_ALL_TEXT ] );
|
||||||
else
|
//else
|
||||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"%s: %s", gzGIOScreenText[ GIO_CACHES_TITLE_TEXT ], gzGIOScreenText[ GIO_CACHES_RANDOM_TEXT ] );
|
// ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"%s: %s", gzGIOScreenText[ GIO_CACHES_TITLE_TEXT ], gzGIOScreenText[ GIO_CACHES_RANDOM_TEXT ] );
|
||||||
|
|
||||||
// Tons of Guns Option
|
// Tons of Guns Option
|
||||||
if( gGameOptions.fGunNut )
|
if( gGameOptions.fGunNut )
|
||||||
|
|||||||
+50
-13
@@ -76,13 +76,19 @@ enum
|
|||||||
TOPTION_ALTERNATE_BULLET_GRAPHICS,
|
TOPTION_ALTERNATE_BULLET_GRAPHICS,
|
||||||
|
|
||||||
// CHRISL: HAM 4: Activate/Deactivate NCTH mode
|
// CHRISL: HAM 4: Activate/Deactivate NCTH mode
|
||||||
TOPTION_USE_NCTH,
|
//TOPTION_USE_NCTH,
|
||||||
|
//Jenilee's Merc Ranks
|
||||||
|
TOPTION_SHOW_MERC_RANKS,
|
||||||
|
|
||||||
// WANNE:
|
// WANNE:
|
||||||
TOPTION_SHOW_TACTICAL_FACE_GEAR,
|
TOPTION_SHOW_TACTICAL_FACE_GEAR,
|
||||||
TOPTION_SHOW_TACTICAL_FACE_ICONS,
|
TOPTION_SHOW_TACTICAL_FACE_ICONS,
|
||||||
|
|
||||||
TOPTION_DISABLE_CURSOR_SWAP, // Disable cursor swapping every second between talk and quick exchange
|
TOPTION_DISABLE_CURSOR_SWAP, // Disable cursor swapping every second between talk and quick exchange
|
||||||
|
TOPTION_AUTO_FAST_FORWARD_MODE, // automatically fast forward through AI turns
|
||||||
|
|
||||||
|
// Flugente FTW 1: Weapon Overheating
|
||||||
|
//TOPTION_WEAPON_OVERHEATING, // allow Overheating of weapons
|
||||||
|
|
||||||
// arynn: Debug/Cheat
|
// arynn: Debug/Cheat
|
||||||
TOPTION_CHEAT_MODE_OPTIONS_HEADER,
|
TOPTION_CHEAT_MODE_OPTIONS_HEADER,
|
||||||
@@ -210,12 +216,17 @@ typedef struct
|
|||||||
// SANDRO - added variables
|
// SANDRO - added variables
|
||||||
UINT8 ubMaxIMPCharacters;
|
UINT8 ubMaxIMPCharacters;
|
||||||
BOOLEAN fNewTraitSystem;
|
BOOLEAN fNewTraitSystem;
|
||||||
BOOLEAN fEnableAllTerrorists;
|
|
||||||
BOOLEAN fEnemiesDropAllItems;
|
BOOLEAN fEnemiesDropAllItems;
|
||||||
UINT8 ubProgressSpeedOfItemsChoices;
|
UINT8 ubProgressSpeedOfItemsChoices;
|
||||||
BOOLEAN fEnableAllWeaponCaches;
|
|
||||||
|
|
||||||
UINT8 ubFiller[500]; // WANNE: Decrease this filler by 1, for each new UINT8 variable!
|
BOOLEAN fInventoryCostsAP; // ubFiller: From 500 to 499
|
||||||
|
|
||||||
|
BOOLEAN fUseNCTH; // ubFiller: From 499 to 498
|
||||||
|
BOOLEAN fImprovedInterruptSystem; // ubFiller: From 498 to 497
|
||||||
|
BOOLEAN fWeaponOverheating; // ubFiller: From 497 to 496
|
||||||
|
|
||||||
|
// WANNE: Decrease this filler by 1, for each new UINT8 / BOOLEAN variable, so we can maintain savegame compatibility!!
|
||||||
|
UINT8 ubFiller[496];
|
||||||
|
|
||||||
} GAME_OPTIONS;
|
} GAME_OPTIONS;
|
||||||
|
|
||||||
@@ -318,7 +329,7 @@ typedef struct
|
|||||||
BOOLEAN fCamoRemoving;
|
BOOLEAN fCamoRemoving;
|
||||||
BOOLEAN fEnhancedCloseCombatSystem;
|
BOOLEAN fEnhancedCloseCombatSystem;
|
||||||
|
|
||||||
BOOLEAN fImprovedInterruptSystem;
|
//BOOLEAN fImprovedInterruptSystem;
|
||||||
UINT8 ubBasicPercentRegisterValueIIS;
|
UINT8 ubBasicPercentRegisterValueIIS;
|
||||||
UINT8 ubPercentRegisterValuePerLevelIIS;
|
UINT8 ubPercentRegisterValuePerLevelIIS;
|
||||||
UINT8 ubBasicReactionTimeLengthIIS;
|
UINT8 ubBasicReactionTimeLengthIIS;
|
||||||
@@ -417,9 +428,9 @@ typedef struct
|
|||||||
UINT32 autoSaveTime;
|
UINT32 autoSaveTime;
|
||||||
|
|
||||||
//JMich
|
//JMich
|
||||||
UINT8 guiMaxWeaponSize;
|
UINT16 guiMaxWeaponSize;
|
||||||
UINT8 guiMaxItemSize;
|
UINT16 guiMaxItemSize;
|
||||||
UINT8 guiOIVSizeNumber;
|
UINT16 guiOIVSizeNumber;
|
||||||
|
|
||||||
//Sight range
|
//Sight range
|
||||||
UINT32 ubStraightSightRange;
|
UINT32 ubStraightSightRange;
|
||||||
@@ -570,9 +581,8 @@ typedef struct
|
|||||||
//Misc settings
|
//Misc settings
|
||||||
BOOLEAN fAmmoDynamicWeight; //Pulmu
|
BOOLEAN fAmmoDynamicWeight; //Pulmu
|
||||||
BOOLEAN fEnableCrepitus;
|
BOOLEAN fEnableCrepitus;
|
||||||
// SANDRO was here - removed these two
|
BOOLEAN fEnableAllWeaponCaches;
|
||||||
//BOOLEAN fEnableAllWeaponCaches;
|
BOOLEAN fEnableAllTerrorists;
|
||||||
//BOOLEAN fEnableAllTerrorists;
|
|
||||||
BOOLEAN gfRevealItems;
|
BOOLEAN gfRevealItems;
|
||||||
BOOLEAN fEnableArmorCoverage; // ShadoWarrior for Captain J's armor coverage
|
BOOLEAN fEnableArmorCoverage; // ShadoWarrior for Captain J's armor coverage
|
||||||
|
|
||||||
@@ -660,6 +670,9 @@ typedef struct
|
|||||||
FLOAT fShotHeadDivisor;
|
FLOAT fShotHeadDivisor;
|
||||||
INT16 iPenaltyShootUnSeen;
|
INT16 iPenaltyShootUnSeen;
|
||||||
|
|
||||||
|
//Inventory AP Weight Divisor
|
||||||
|
FLOAT uWeightDivisor;
|
||||||
|
|
||||||
FLOAT fOutOfGunRangeOrSight;
|
FLOAT fOutOfGunRangeOrSight;
|
||||||
// WANNE: Always use "prof.dat".
|
// WANNE: Always use "prof.dat".
|
||||||
BOOLEAN fUseDifficultyBasedProfDat;
|
BOOLEAN fUseDifficultyBasedProfDat;
|
||||||
@@ -844,6 +857,9 @@ typedef struct
|
|||||||
// HEADROCK HAM 3: If enabled, tooltipping over Bobby Ray's weapons will show a list of possible attachments to those weapons.
|
// HEADROCK HAM 3: If enabled, tooltipping over Bobby Ray's weapons will show a list of possible attachments to those weapons.
|
||||||
BOOLEAN fBobbyRayTooltipsShowAttachments;
|
BOOLEAN fBobbyRayTooltipsShowAttachments;
|
||||||
|
|
||||||
|
//JMich Externalized gGameExternalOptions.ubBobbyRayMaxPurchaseAmount for BobbyRay
|
||||||
|
UINT8 ubBobbyRayMaxPurchaseAmount;
|
||||||
|
|
||||||
// CHRISL: Converts the AutoFireToHitBonus value to a percentage for CTH calculations
|
// CHRISL: Converts the AutoFireToHitBonus value to a percentage for CTH calculations
|
||||||
UINT8 ubFlatAFTHBtoPrecentMultiplier;
|
UINT8 ubFlatAFTHBtoPrecentMultiplier;
|
||||||
|
|
||||||
@@ -1035,15 +1051,36 @@ typedef struct
|
|||||||
|
|
||||||
UINT8 ubChanceTonyAvailable; // silversurfer/SANDRO
|
UINT8 ubChanceTonyAvailable; // silversurfer/SANDRO
|
||||||
|
|
||||||
|
BOOLEAN fBobbyRayFastShipments;
|
||||||
|
|
||||||
|
BOOLEAN fGridExitInTurnBased;
|
||||||
|
|
||||||
BOOLEAN fStandUpAfterBattle;
|
BOOLEAN fStandUpAfterBattle;
|
||||||
|
|
||||||
INT32 iInitialMercArrivalLocation;
|
INT32 iInitialMercArrivalLocation;
|
||||||
|
|
||||||
|
// Keyboard shortcut (as VK) for fastforward key. See Utils/KeyMap
|
||||||
|
INT32 iFastForwardKey;
|
||||||
|
// Turn on fast forward whenever ui is disabled.
|
||||||
|
BOOLEAN fEnableAutoFastForwardMode;
|
||||||
|
// When fast forward is enabled what is the period to update clock in milliseconds.
|
||||||
|
FLOAT iFastForwardPeriod;
|
||||||
|
// Frequency that the screen is updated
|
||||||
|
INT32 iNotifyFrequency;
|
||||||
|
// Frequency that the screen is updated
|
||||||
|
FLOAT fClockSpeedPercent;
|
||||||
|
|
||||||
|
// Flugente FTW 1: Weapon Overheating
|
||||||
|
BOOLEAN fDisplayOverheatThermometer; // Should a 'thermometer' for guns and replacable barrels be displayed?
|
||||||
|
FLOAT iCooldownModificatorLonelyBarrel; // Cooldown modificator for barrels alone in the landscape ;-)
|
||||||
|
|
||||||
|
BOOLEAN fWeaponResting; // Should it be possible to rest your weapon on structures in crouched position?
|
||||||
|
BOOLEAN fDisplayWeaponRestingIndicator; // Should a little indicator show if the weapon is currently rested on something?
|
||||||
|
UINT8 ubProneModifierPercentage; // for boni, use ubProneModifierPercentage*boni[PRONE] + (100 - ubProneModifierPercentage)*boni[CROUCHED]
|
||||||
|
|
||||||
BOOLEAN gBriefingRoom;
|
BOOLEAN gBriefingRoom;
|
||||||
BOOLEAN gEncyclopedia;
|
BOOLEAN gEncyclopedia;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} GAME_EXTERNAL_OPTIONS;
|
} GAME_EXTERNAL_OPTIONS;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
|||||||
+6
-6
@@ -14,14 +14,14 @@
|
|||||||
|
|
||||||
//MAP EDITOR BUILD VERSION
|
//MAP EDITOR BUILD VERSION
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
CHAR16 zVersionLabel[256] = { L"Unfinished Business Map Editor v1.13.4882 (Official Release)" };
|
CHAR16 zVersionLabel[256] = { L"Unfinished Business v1.5 (15-10-2011) - Map Editor v1.13.4452 (Development Build)" };
|
||||||
#else
|
#else
|
||||||
CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.4882 (Official Release)" };
|
CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.4452 (Development Build)" };
|
||||||
#endif
|
#endif
|
||||||
#elif defined JA2BETAVERSION
|
#elif defined JA2BETAVERSION
|
||||||
|
|
||||||
//BETA/TEST BUILD VERSION
|
//BETA/TEST BUILD VERSION
|
||||||
CHAR16 zVersionLabel[256] = { L"Debug v1.13.4882 (Official Release)" };
|
CHAR16 zVersionLabel[256] = { L"Debug v1.13.4820 (Development Build)" };
|
||||||
#elif defined CRIPPLED_VERSION
|
#elif defined CRIPPLED_VERSION
|
||||||
|
|
||||||
//RELEASE BUILD VERSION s
|
//RELEASE BUILD VERSION s
|
||||||
@@ -31,14 +31,14 @@ CHAR16 zVersionLabel[256] = { L"Beta v. 0.98" };
|
|||||||
|
|
||||||
//RELEASE BUILD VERSION
|
//RELEASE BUILD VERSION
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
CHAR16 zVersionLabel[256] = { L"Release Unfinished Business v1.13.4882 (Official Release)" };
|
CHAR16 zVersionLabel[256] = { L"Release Unfinished Business v1.5 (15-10-2011) - v1.13.4462 (Development Build)" };
|
||||||
#else
|
#else
|
||||||
CHAR16 zVersionLabel[256] = { L"Release v1.13.4882 (Official Release)" };
|
CHAR16 zVersionLabel[256] = { L"Release v1.13.4462 (Development Build)" };
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CHAR8 czVersionNumber[16] = { "Build 12.01.18" }; //YY.MM.DD
|
CHAR8 czVersionNumber[16] = { "Build 11.12.05" }; //YY.MM.DD
|
||||||
CHAR16 zTrackingNumber[16] = { L"Z" };
|
CHAR16 zTrackingNumber[16] = { L"Z" };
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -86,6 +86,7 @@
|
|||||||
#include "LuaInitNPCs.h"
|
#include "LuaInitNPCs.h"
|
||||||
#include "Encyclopedia_Data.h"
|
#include "Encyclopedia_Data.h"
|
||||||
#include "Encyclopedia.h"
|
#include "Encyclopedia.h"
|
||||||
|
#include "AimArchives.h"
|
||||||
|
|
||||||
extern INT16 APBPConstants[TOTAL_APBP_VALUES] = {0};
|
extern INT16 APBPConstants[TOTAL_APBP_VALUES] = {0};
|
||||||
extern INT16 gubMaxActionPoints[28];//MAXBODYTYPES = 28... JUST GETTING IT TO WORK NOW. GOTTHARD 7/2/08
|
extern INT16 gubMaxActionPoints[28];//MAXBODYTYPES = 28... JUST GETTING IT TO WORK NOW. GOTTHARD 7/2/08
|
||||||
@@ -1061,6 +1062,44 @@ if ( ReadXMLEmail == TRUE )
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
UINT8 p;
|
||||||
|
for(p=0; p<NUM_PROFILES; p++)
|
||||||
|
{
|
||||||
|
gAimOldArchives[p].FaceID = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
strcpy(fileName, directoryName);
|
||||||
|
strcat(fileName, OLDAIMARCHIVEFILENAME);
|
||||||
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
|
SGP_THROW_IFFALSE(ReadInAimOldArchive(fileName,FALSE), OLDAIMARCHIVEFILENAME);
|
||||||
|
|
||||||
|
#ifndef ENGLISH
|
||||||
|
AddLanguagePrefix(fileName);
|
||||||
|
if ( FileExists(fileName) )
|
||||||
|
{
|
||||||
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
|
SGP_THROW_IFFALSE(ReadInAimOldArchive(fileName,TRUE), fileName);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
UINT8 emptyslotsinarchives = 0;
|
||||||
|
for (p=0;p<NUM_PROFILES;p++)
|
||||||
|
{
|
||||||
|
if (gAimOldArchives[p].FaceID == -1)
|
||||||
|
{
|
||||||
|
emptyslotsinarchives++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gAimOldArchives[p-emptyslotsinarchives]=gAimOldArchives[p];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (p=NUM_PROFILES;p>NUM_PROFILES-emptyslotsinarchives;p--)
|
||||||
|
{
|
||||||
|
gAimOldArchives[p-1].FaceID=-1;
|
||||||
|
}
|
||||||
|
|
||||||
LuaState::INIT(lua::LUA_STATE_STRATEGIC_MINES_AND_UNDERGROUND, true);
|
LuaState::INIT(lua::LUA_STATE_STRATEGIC_MINES_AND_UNDERGROUND, true);
|
||||||
g_luaUnderground.LoadScript(GetLanguagePrefix());
|
g_luaUnderground.LoadScript(GetLanguagePrefix());
|
||||||
// load Lua for Strategic Mines initialization
|
// load Lua for Strategic Mines initialization
|
||||||
@@ -1243,6 +1282,8 @@ UINT32 InitializeJA2(void)
|
|||||||
gfIntendOnEnteringEditor = TRUE;
|
gfIntendOnEnteringEditor = TRUE;
|
||||||
gGameOptions.fGunNut = TRUE;
|
gGameOptions.fGunNut = TRUE;
|
||||||
gGameOptions.fAirStrikes = FALSE;
|
gGameOptions.fAirStrikes = FALSE;
|
||||||
|
//gGameOptions.fBobbyRayFastShipments = FALSE;
|
||||||
|
gGameOptions.fInventoryCostsAP = FALSE;
|
||||||
|
|
||||||
useOldJA2Inventory = TRUE;
|
useOldJA2Inventory = TRUE;
|
||||||
return( GAME_SCREEN );
|
return( GAME_SCREEN );
|
||||||
@@ -1262,6 +1303,8 @@ UINT32 InitializeJA2(void)
|
|||||||
gfIntendOnEnteringEditor = TRUE;
|
gfIntendOnEnteringEditor = TRUE;
|
||||||
gGameOptions.fGunNut = TRUE;
|
gGameOptions.fGunNut = TRUE;
|
||||||
gGameOptions.fAirStrikes = FALSE;
|
gGameOptions.fAirStrikes = FALSE;
|
||||||
|
//gGameOptions.fBobbyRayFastShipments = FALSE;
|
||||||
|
gGameOptions.fInventoryCostsAP = FALSE;
|
||||||
return( GAME_SCREEN );
|
return( GAME_SCREEN );
|
||||||
}
|
}
|
||||||
if ( strcmp( gzCommandLine, "-EDITOR" ) == 0 )
|
if ( strcmp( gzCommandLine, "-EDITOR" ) == 0 )
|
||||||
@@ -1276,6 +1319,8 @@ UINT32 InitializeJA2(void)
|
|||||||
gfIntendOnEnteringEditor = TRUE;
|
gfIntendOnEnteringEditor = TRUE;
|
||||||
gGameOptions.fGunNut = TRUE;
|
gGameOptions.fGunNut = TRUE;
|
||||||
gGameOptions.fAirStrikes = FALSE;
|
gGameOptions.fAirStrikes = FALSE;
|
||||||
|
//gGameOptions.fBobbyRayFastShipments = FALSE;
|
||||||
|
gGameOptions.fInventoryCostsAP = FALSE;
|
||||||
return( GAME_SCREEN );
|
return( GAME_SCREEN );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1293,6 +1338,8 @@ UINT32 InitializeJA2(void)
|
|||||||
gfIntendOnEnteringEditor = TRUE;
|
gfIntendOnEnteringEditor = TRUE;
|
||||||
gGameOptions.fGunNut = TRUE;
|
gGameOptions.fGunNut = TRUE;
|
||||||
gGameOptions.fAirStrikes = FALSE;
|
gGameOptions.fAirStrikes = FALSE;
|
||||||
|
//gGameOptions.fBobbyRayFastShipments = FALSE;
|
||||||
|
gGameOptions.fInventoryCostsAP = FALSE;
|
||||||
return( GAME_SCREEN );
|
return( GAME_SCREEN );
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -115,6 +115,35 @@ AP_LOSS_PER_LEGSHOT_DAMAGE,
|
|||||||
|
|
||||||
AUTOFIRE_SHOTS_AP_VALUE,
|
AUTOFIRE_SHOTS_AP_VALUE,
|
||||||
BAD_AP_COST,
|
BAD_AP_COST,
|
||||||
|
//Cost to take item from position
|
||||||
|
AP_INV_FROM_NONE,
|
||||||
|
AP_INV_FROM_HANDS,
|
||||||
|
AP_INV_FROM_EQUIPMENT,
|
||||||
|
AP_INV_FROM_VEST,
|
||||||
|
AP_INV_FROM_RIG,
|
||||||
|
AP_INV_FROM_CPACK,
|
||||||
|
AP_INV_FROM_BPACK,
|
||||||
|
AP_INV_FROM_SLING,
|
||||||
|
AP_INV_FROM_KNIFE,
|
||||||
|
AP_INV_FROM_FACE,
|
||||||
|
AP_INV_FROM_BIG_POCKET,
|
||||||
|
AP_INV_FROM_SMALL_POCKET,
|
||||||
|
//Cost to move item to position
|
||||||
|
AP_INV_TO_NONE,
|
||||||
|
AP_INV_TO_HANDS,
|
||||||
|
AP_INV_TO_EQUIPMENT,
|
||||||
|
AP_INV_TO_VEST,
|
||||||
|
AP_INV_TO_RIG,
|
||||||
|
AP_INV_TO_CPACK,
|
||||||
|
AP_INV_TO_BPACK,
|
||||||
|
AP_INV_TO_SLING,
|
||||||
|
AP_INV_TO_KNIFE,
|
||||||
|
AP_INV_TO_FACE,
|
||||||
|
AP_INV_TO_BIG_POCKET,
|
||||||
|
AP_INV_TO_SMALL_POCKET,
|
||||||
|
//Max inventory cost
|
||||||
|
AP_INV_MAX_COST,
|
||||||
|
|
||||||
DEFAULT_APS,
|
DEFAULT_APS,
|
||||||
DEFAULT_AIMSKILL,
|
DEFAULT_AIMSKILL,
|
||||||
BP_RATIO_RED_PTS_TO_NORMAL,
|
BP_RATIO_RED_PTS_TO_NORMAL,
|
||||||
|
|||||||
+199
-39
@@ -12,6 +12,7 @@
|
|||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "Soldier Profile.h"
|
||||||
|
|
||||||
|
|
||||||
#define AIM_ALUMNI_NAME_FILE "BINARYDATA\\AlumName.edt"
|
#define AIM_ALUMNI_NAME_FILE "BINARYDATA\\AlumName.edt"
|
||||||
@@ -132,6 +133,9 @@ void BtnAlumniPageButtonCallback(GUI_BUTTON *btn,INT32 reason);
|
|||||||
UINT32 guiAlumniPageButton[3];
|
UINT32 guiAlumniPageButton[3];
|
||||||
INT32 guiAlumniPageButtonImage;
|
INT32 guiAlumniPageButtonImage;
|
||||||
|
|
||||||
|
INT8 idPage = -1;
|
||||||
|
UINT8 cOldMerc;
|
||||||
|
BOOLEAN pageEnabled[4];
|
||||||
|
|
||||||
void ResetAimArchiveButtons();
|
void ResetAimArchiveButtons();
|
||||||
void DisableAimArchiveButton();
|
void DisableAimArchiveButton();
|
||||||
@@ -142,6 +146,9 @@ void RemoveAimAlumniFaceRegion();
|
|||||||
void CreateDestroyDoneMouseRegion(UINT16 usPosY);
|
void CreateDestroyDoneMouseRegion(UINT16 usPosY);
|
||||||
void ChangingAimArchiveSubPage( UINT8 ubSubPageNumber );
|
void ChangingAimArchiveSubPage( UINT8 ubSubPageNumber );
|
||||||
|
|
||||||
|
BOOLEAN vOldMerc[NUM_PROFILES];
|
||||||
|
UINT8 oldMercID;
|
||||||
|
OLD_MERC_ARCHIVES_VALUES gAimOldArchives[NUM_PROFILES];
|
||||||
|
|
||||||
void GameInitAimArchives()
|
void GameInitAimArchives()
|
||||||
{
|
{
|
||||||
@@ -163,6 +170,26 @@ BOOLEAN EnterAimArchives()
|
|||||||
VOBJECT_DESC VObjectDesc;
|
VOBJECT_DESC VObjectDesc;
|
||||||
UINT16 usPosX, i;
|
UINT16 usPosX, i;
|
||||||
|
|
||||||
|
idPage = -1;
|
||||||
|
|
||||||
|
for(i=0; i<NUM_PROFILES; i++)
|
||||||
|
{
|
||||||
|
vOldMerc[i] = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
for(i=0; i<NUM_PROFILES; i++)
|
||||||
|
{
|
||||||
|
if ( gAimOldArchives[i].FaceID !=-1 ) vOldMerc[i] = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
for(i=0; i<80; i++)
|
||||||
|
{
|
||||||
|
if ( vOldMerc[0] == TRUE ) pageEnabled[0] = TRUE;
|
||||||
|
if ( vOldMerc[20] == TRUE ) pageEnabled[1] = TRUE;
|
||||||
|
if ( vOldMerc[40] == TRUE ) pageEnabled[2] = TRUE;
|
||||||
|
if ( vOldMerc[60] == TRUE ) pageEnabled[3] = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
gfExitingAimArchives = FALSE;
|
gfExitingAimArchives = FALSE;
|
||||||
// gubDrawOldMerc = 255;
|
// gubDrawOldMerc = 255;
|
||||||
@@ -207,9 +234,23 @@ BOOLEAN EnterAimArchives()
|
|||||||
InitAlumniFaceRegions();
|
InitAlumniFaceRegions();
|
||||||
|
|
||||||
//Load graphic for buttons
|
//Load graphic for buttons
|
||||||
|
if ( pageEnabled[0] == TRUE && ( pageEnabled[1] == TRUE || pageEnabled[2] == TRUE || pageEnabled[3] == TRUE ) )
|
||||||
|
{
|
||||||
guiAlumniPageButtonImage = LoadButtonImage("LAPTOP\\BottomButtons2.sti", -1,0,-1,1,-1 );
|
guiAlumniPageButtonImage = LoadButtonImage("LAPTOP\\BottomButtons2.sti", -1,0,-1,1,-1 );
|
||||||
|
|
||||||
usPosX = AIM_ALUMNI_PAGE1_X;
|
usPosX = AIM_ALUMNI_PAGE1_X;
|
||||||
|
|
||||||
|
guiAlumniPageButton[0] = CreateIconAndTextButton( guiAlumniPageButtonImage, L"Next page"/*AimAlumniText[0]*/, AIM_ALUMNI_PAGE_FONT,
|
||||||
|
AIM_ALUMNI_PAGE_COLOR_UP, DEFAULT_SHADOW,
|
||||||
|
AIM_ALUMNI_PAGE_COLOR_DOWN, DEFAULT_SHADOW,
|
||||||
|
TEXT_CJUSTIFIED,
|
||||||
|
usPosX+AIM_ALUMNI_PAGE_GAP, AIM_ALUMNI_PAGE1_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
|
DEFAULT_MOVE_CALLBACK, BtnAlumniPageButtonCallback);
|
||||||
|
SetButtonCursor(guiAlumniPageButton[0], CURSOR_WWW);
|
||||||
|
MSYS_SetBtnUserData( guiAlumniPageButton[0], 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
for(i=0; i<3; i++)
|
for(i=0; i<3; i++)
|
||||||
{
|
{
|
||||||
guiAlumniPageButton[i] = CreateIconAndTextButton( guiAlumniPageButtonImage, AimAlumniText[i], AIM_ALUMNI_PAGE_FONT,
|
guiAlumniPageButton[i] = CreateIconAndTextButton( guiAlumniPageButtonImage, AimAlumniText[i], AIM_ALUMNI_PAGE_FONT,
|
||||||
@@ -223,6 +264,7 @@ BOOLEAN EnterAimArchives()
|
|||||||
|
|
||||||
usPosX += AIM_ALUMNI_PAGE_GAP;
|
usPosX += AIM_ALUMNI_PAGE_GAP;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
DisableAimArchiveButton();
|
DisableAimArchiveButton();
|
||||||
RenderAimArchives();
|
RenderAimArchives();
|
||||||
@@ -231,7 +273,7 @@ BOOLEAN EnterAimArchives()
|
|||||||
|
|
||||||
void ExitAimArchives()
|
void ExitAimArchives()
|
||||||
{
|
{
|
||||||
UINT16 i;
|
// UINT16 i;
|
||||||
|
|
||||||
gfExitingAimArchives = TRUE;
|
gfExitingAimArchives = TRUE;
|
||||||
|
|
||||||
@@ -244,9 +286,16 @@ void ExitAimArchives()
|
|||||||
|
|
||||||
RemoveAimAlumniFaceRegion();
|
RemoveAimAlumniFaceRegion();
|
||||||
|
|
||||||
UnloadButtonImage( guiAlumniPageButtonImage );
|
if ( pageEnabled[0] == TRUE && ( pageEnabled[1] == TRUE || pageEnabled[2] == TRUE || pageEnabled[3] == TRUE ) )
|
||||||
for(i=0; i<3; i++)
|
{
|
||||||
RemoveButton( guiAlumniPageButton[i] );
|
UnloadButtonImage( guiAlumniPageButtonImage );
|
||||||
|
RemoveButton( guiAlumniPageButton[0] );
|
||||||
|
}
|
||||||
|
|
||||||
|
//UnloadButtonImage( guiAlumniPageButtonImage );
|
||||||
|
|
||||||
|
//for(i=0; i<3; i++)
|
||||||
|
// RemoveButton( guiAlumniPageButton[i] );
|
||||||
|
|
||||||
RemoveAimDefaults();
|
RemoveAimDefaults();
|
||||||
ExitAimMenuBar();
|
ExitAimMenuBar();
|
||||||
@@ -255,6 +304,8 @@ void ExitAimArchives()
|
|||||||
CreateDestroyDoneMouseRegion(0);
|
CreateDestroyDoneMouseRegion(0);
|
||||||
gfDestroyPopUpBox = FALSE;
|
gfDestroyPopUpBox = FALSE;
|
||||||
gfDrawPopUpBox = FALSE;
|
gfDrawPopUpBox = FALSE;
|
||||||
|
|
||||||
|
idPage = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void HandleAimArchives()
|
void HandleAimArchives()
|
||||||
@@ -284,8 +335,8 @@ void RenderAimArchives()
|
|||||||
UINT16 usPosX, usPosY,x,y,i=0;
|
UINT16 usPosX, usPosY,x,y,i=0;
|
||||||
UINT8 ubNumRows=0;
|
UINT8 ubNumRows=0;
|
||||||
UINT32 uiStartLoc=0;
|
UINT32 uiStartLoc=0;
|
||||||
CHAR16 sText[400];
|
// CHAR16 sText[400];
|
||||||
|
// UINT8 p;
|
||||||
|
|
||||||
DrawAimDefaults();
|
DrawAimDefaults();
|
||||||
DisableAimButton();
|
DisableAimButton();
|
||||||
@@ -297,6 +348,18 @@ void RenderAimArchives()
|
|||||||
GetVideoObject(&hFrameHandle, guiAlumniFrame);
|
GetVideoObject(&hFrameHandle, guiAlumniFrame);
|
||||||
GetVideoObject(&hFaceHandle, guiOldAim);
|
GetVideoObject(&hFaceHandle, guiOldAim);
|
||||||
|
|
||||||
|
if ( gubPageNum == 0)
|
||||||
|
{
|
||||||
|
ubNumRows = AIM_ALUMNI_NUM_FACE_ROWS;
|
||||||
|
i=0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ubNumRows = AIM_ALUMNI_NUM_FACE_ROWS;
|
||||||
|
i=gubPageNum*20;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
switch(gubPageNum)
|
switch(gubPageNum)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
@@ -315,31 +378,37 @@ void RenderAimArchives()
|
|||||||
Assert(0);
|
Assert(0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
usPosX = AIM_ALUMNI_START_GRID_X;
|
usPosX = AIM_ALUMNI_START_GRID_X;
|
||||||
usPosY = AIM_ALUMNI_START_GRID_Y;
|
usPosY = AIM_ALUMNI_START_GRID_Y;
|
||||||
for(y=0; y<ubNumRows; y++)
|
for(y=0; y<ubNumRows; y++)
|
||||||
{
|
{
|
||||||
for(x=0; x<AIM_ALUMNI_NUM_FACE_COLS; x++)
|
for(x=0; x<AIM_ALUMNI_NUM_FACE_COLS; x++)
|
||||||
{
|
{
|
||||||
|
if ( vOldMerc[i] == TRUE )
|
||||||
|
{
|
||||||
//Blt face to screen
|
//Blt face to screen
|
||||||
BltVideoObject(FRAME_BUFFER, hFaceHandle, i,usPosX+4, usPosY+4, VO_BLT_SRCTRANSPARENCY,NULL);
|
//BltVideoObject(FRAME_BUFFER, hFaceHandle, i,usPosX+4, usPosY+4, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
BltVideoObject(FRAME_BUFFER, hFaceHandle, gAimOldArchives[i].FaceID,usPosX+4, usPosY+4, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
//Blt the alumni frame background
|
//Blt the alumni frame background
|
||||||
BltVideoObject(FRAME_BUFFER, hFrameHandle, 0,usPosX, usPosY, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hFrameHandle, 0,usPosX, usPosY, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
//Display the merc's name
|
//Display the merc's name
|
||||||
uiStartLoc = AIM_ALUMNI_NAME_LINESIZE * i;
|
//uiStartLoc = AIM_ALUMNI_NAME_LINESIZE * i;
|
||||||
LoadEncryptedDataFromFile(AIM_ALUMNI_NAME_FILE, sText, uiStartLoc, AIM_ALUMNI_NAME_SIZE );
|
//LoadEncryptedDataFromFile(AIM_ALUMNI_NAME_FILE, sText, uiStartLoc, AIM_ALUMNI_NAME_SIZE );
|
||||||
DrawTextToScreen(sText, (UINT16)(usPosX + AIM_ALUMNI_NAME_OFFSET_X), (UINT16)(usPosY + AIM_ALUMNI_NAME_OFFSET_Y), AIM_ALUMNI_NAME_WIDTH, AIM_ALUMNI_NAME_FONT, AIM_ALUMNI_NAME_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
//DrawTextToScreen(sText, (UINT16)(usPosX + AIM_ALUMNI_NAME_OFFSET_X), (UINT16)(usPosY + AIM_ALUMNI_NAME_OFFSET_Y), AIM_ALUMNI_NAME_WIDTH, AIM_ALUMNI_NAME_FONT, AIM_ALUMNI_NAME_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
||||||
|
|
||||||
|
DrawTextToScreen(gAimOldArchives[i].szNickName, (UINT16)(usPosX + AIM_ALUMNI_NAME_OFFSET_X), (UINT16)(usPosY + AIM_ALUMNI_NAME_OFFSET_Y), AIM_ALUMNI_NAME_WIDTH, AIM_ALUMNI_NAME_FONT, AIM_ALUMNI_NAME_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
||||||
|
|
||||||
usPosX += AIM_ALUMNI_GRID_OFFSET_X;
|
usPosX += AIM_ALUMNI_GRID_OFFSET_X;
|
||||||
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
usPosX = AIM_ALUMNI_START_GRID_X;
|
usPosX = AIM_ALUMNI_START_GRID_X;
|
||||||
usPosY += AIM_ALUMNI_GRID_OFFSET_Y;
|
usPosY += AIM_ALUMNI_GRID_OFFSET_Y;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
//the 3rd page now has an additional row with 1 merc on it, so add a new row
|
//the 3rd page now has an additional row with 1 merc on it, so add a new row
|
||||||
if( gubPageNum == 2 )
|
if( gubPageNum == 2 )
|
||||||
{
|
{
|
||||||
@@ -355,8 +424,9 @@ void RenderAimArchives()
|
|||||||
DrawTextToScreen(sText, (UINT16)(usPosX + AIM_ALUMNI_NAME_OFFSET_X), (UINT16)(usPosY + AIM_ALUMNI_NAME_OFFSET_Y), AIM_ALUMNI_NAME_WIDTH, AIM_ALUMNI_NAME_FONT, AIM_ALUMNI_NAME_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
DrawTextToScreen(sText, (UINT16)(usPosX + AIM_ALUMNI_NAME_OFFSET_X), (UINT16)(usPosY + AIM_ALUMNI_NAME_OFFSET_Y), AIM_ALUMNI_NAME_WIDTH, AIM_ALUMNI_NAME_FONT, AIM_ALUMNI_NAME_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
||||||
|
|
||||||
usPosX += AIM_ALUMNI_GRID_OFFSET_X;
|
usPosX += AIM_ALUMNI_GRID_OFFSET_X;
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -391,7 +461,16 @@ void SelectAlumniFaceRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
|||||||
gfDrawPopUpBox = TRUE;
|
gfDrawPopUpBox = TRUE;
|
||||||
gfReDrawScreen = TRUE;
|
gfReDrawScreen = TRUE;
|
||||||
|
|
||||||
gubDrawOldMerc = (UINT8)MSYS_GetRegionUserData( pRegion, 0 );
|
//gubDrawOldMerc = (UINT8)MSYS_GetRegionUserData( pRegion, 0 );
|
||||||
|
if ( gubPageNum == 0)
|
||||||
|
gubDrawOldMerc = (UINT8)MSYS_GetRegionUserData( pRegion, 0 );
|
||||||
|
else if ( gubPageNum == 1)
|
||||||
|
gubDrawOldMerc = 20 + (UINT8)MSYS_GetRegionUserData( pRegion, 0 );
|
||||||
|
else if ( gubPageNum == 2)
|
||||||
|
gubDrawOldMerc = 40 + (UINT8)MSYS_GetRegionUserData( pRegion, 0 );
|
||||||
|
else if ( gubPageNum == 3)
|
||||||
|
gubDrawOldMerc = 60 + (UINT8)MSYS_GetRegionUserData( pRegion, 0 );
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP)
|
else if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP)
|
||||||
{
|
{
|
||||||
@@ -402,6 +481,47 @@ void SelectAlumniFaceRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
|||||||
void BtnAlumniPageButtonCallback(GUI_BUTTON *btn,INT32 reason)
|
void BtnAlumniPageButtonCallback(GUI_BUTTON *btn,INT32 reason)
|
||||||
{
|
{
|
||||||
UINT8 ubRetValue = (UINT8)MSYS_GetBtnUserData( btn, 0 );
|
UINT8 ubRetValue = (UINT8)MSYS_GetBtnUserData( btn, 0 );
|
||||||
|
|
||||||
|
if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||||
|
{
|
||||||
|
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||||
|
{
|
||||||
|
|
||||||
|
if ( idPage == -1) idPage = 0;
|
||||||
|
|
||||||
|
if ( idPage == 1 && pageEnabled[1] == TRUE && pageEnabled[2] == FALSE ) idPage = -1;
|
||||||
|
if ( idPage == 2 && pageEnabled[2] == TRUE && pageEnabled[3] == FALSE ) idPage = -1;
|
||||||
|
if ( idPage == 3 && pageEnabled[3] == TRUE ) idPage = -1;
|
||||||
|
idPage++;
|
||||||
|
|
||||||
|
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
||||||
|
|
||||||
|
RemoveAimAlumniFaceRegion();
|
||||||
|
|
||||||
|
ChangingAimArchiveSubPage( idPage );
|
||||||
|
|
||||||
|
gubPageNum = idPage;
|
||||||
|
|
||||||
|
gfReDrawScreen = TRUE;
|
||||||
|
|
||||||
|
gfDestroyPopUpBox = TRUE;
|
||||||
|
|
||||||
|
gunAlumniButtonDown=255;
|
||||||
|
ResetAimArchiveButtons();
|
||||||
|
DisableAimArchiveButton();
|
||||||
|
gfDrawPopUpBox = FALSE;
|
||||||
|
|
||||||
|
InvalidateRegion(AIM_ALUMNI_PAGE1_X,AIM_ALUMNI_PAGE1_Y, AIM_ALUMNI_PAGE_END_X,AIM_ALUMNI_PAGE_END_Y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(reason & MSYS_CALLBACK_REASON_LOST_MOUSE)
|
||||||
|
{
|
||||||
|
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
||||||
|
gunAlumniButtonDown=255;
|
||||||
|
DisableAimArchiveButton();
|
||||||
|
InvalidateRegion(AIM_ALUMNI_PAGE1_X,AIM_ALUMNI_PAGE1_Y, AIM_ALUMNI_PAGE_END_X,AIM_ALUMNI_PAGE_END_Y);
|
||||||
|
}
|
||||||
|
/*
|
||||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||||
{
|
{
|
||||||
btn->uiFlags |= BUTTON_CLICKED_ON;
|
btn->uiFlags |= BUTTON_CLICKED_ON;
|
||||||
@@ -441,17 +561,18 @@ void BtnAlumniPageButtonCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
DisableAimArchiveButton();
|
DisableAimArchiveButton();
|
||||||
InvalidateRegion(AIM_ALUMNI_PAGE1_X,AIM_ALUMNI_PAGE1_Y, AIM_ALUMNI_PAGE_END_X,AIM_ALUMNI_PAGE_END_Y);
|
InvalidateRegion(AIM_ALUMNI_PAGE1_X,AIM_ALUMNI_PAGE1_Y, AIM_ALUMNI_PAGE_END_X,AIM_ALUMNI_PAGE_END_Y);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ResetAimArchiveButtons()
|
void ResetAimArchiveButtons()
|
||||||
{
|
{
|
||||||
int i=0;
|
//int i=0;
|
||||||
|
|
||||||
for(i=0; i<3; i++)
|
//for(i=0; i<3; i++)
|
||||||
{
|
//{
|
||||||
ButtonList[ guiAlumniPageButton[i] ]->uiFlags &= ~BUTTON_CLICKED_ON;
|
// ButtonList[ guiAlumniPageButton[i] ]->uiFlags &= ~BUTTON_CLICKED_ON;
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -459,7 +580,7 @@ void DisableAimArchiveButton()
|
|||||||
{
|
{
|
||||||
if( gfExitingAimArchives == TRUE)
|
if( gfExitingAimArchives == TRUE)
|
||||||
return;
|
return;
|
||||||
|
/*
|
||||||
if( (gubPageNum == 0 ) )
|
if( (gubPageNum == 0 ) )
|
||||||
{
|
{
|
||||||
ButtonList[ guiAlumniPageButton[ 0 ] ]->uiFlags |= (BUTTON_CLICKED_ON );
|
ButtonList[ guiAlumniPageButton[ 0 ] ]->uiFlags |= (BUTTON_CLICKED_ON );
|
||||||
@@ -472,6 +593,7 @@ void DisableAimArchiveButton()
|
|||||||
{
|
{
|
||||||
ButtonList[ guiAlumniPageButton[ 2 ] ]->uiFlags |= (BUTTON_CLICKED_ON );
|
ButtonList[ guiAlumniPageButton[ 2 ] ]->uiFlags |= (BUTTON_CLICKED_ON );
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -484,9 +606,9 @@ void DisplayAlumniOldMercPopUp()
|
|||||||
HVOBJECT hDoneHandle;
|
HVOBJECT hDoneHandle;
|
||||||
HVOBJECT hFacePaneHandle;
|
HVOBJECT hFacePaneHandle;
|
||||||
HVOBJECT hFaceHandle;
|
HVOBJECT hFaceHandle;
|
||||||
CHAR16 sName[AIM_ALUMNI_NAME_SIZE];
|
// CHAR16 sName[AIM_ALUMNI_NAME_SIZE];
|
||||||
CHAR16 sDesc[AIM_ALUMNI_DECRIPTION_SIZE];
|
// CHAR16 sDesc[AIM_ALUMNI_DECRIPTION_SIZE];
|
||||||
UINT32 uiStartLoc;
|
//UINT32 uiStartLoc;
|
||||||
UINT16 usStringPixLength;
|
UINT16 usStringPixLength;
|
||||||
|
|
||||||
GetVideoObject(&hAlumniPopUpHandle, guiAlumniPopUp);
|
GetVideoObject(&hAlumniPopUpHandle, guiAlumniPopUp);
|
||||||
@@ -497,10 +619,11 @@ void DisplayAlumniOldMercPopUp()
|
|||||||
ubFontHeight = (UINT8)GetFontHeight(AIM_ALUMNI_POPUP_FONT);
|
ubFontHeight = (UINT8)GetFontHeight(AIM_ALUMNI_POPUP_FONT);
|
||||||
|
|
||||||
//Load the description
|
//Load the description
|
||||||
uiStartLoc = AIM_ALUMNI_FILE_RECORD_SIZE * gubDrawOldMerc + AIM_ALUMNI_FULL_NAME_SIZE;
|
//uiStartLoc = AIM_ALUMNI_FILE_RECORD_SIZE * gubDrawOldMerc + AIM_ALUMNI_FULL_NAME_SIZE;
|
||||||
LoadEncryptedDataFromFile(AIM_ALUMNI_FILE, sDesc, uiStartLoc, AIM_ALUMNI_DECRIPTION_SIZE);
|
//LoadEncryptedDataFromFile(AIM_ALUMNI_FILE, sDesc, uiStartLoc, AIM_ALUMNI_DECRIPTION_SIZE);
|
||||||
|
|
||||||
usStringPixLength = StringPixLength( sDesc, AIM_ALUMNI_POPUP_FONT);
|
// usStringPixLength = StringPixLength( sDesc, AIM_ALUMNI_POPUP_FONT);
|
||||||
|
usStringPixLength = StringPixLength( gAimOldArchives[gubDrawOldMerc].szBio, AIM_ALUMNI_POPUP_FONT);
|
||||||
ubNumDescLines = (UINT8) (usStringPixLength / AIM_POPUP_TEXT_WIDTH);
|
ubNumDescLines = (UINT8) (usStringPixLength / AIM_POPUP_TEXT_WIDTH);
|
||||||
|
|
||||||
ubNumLines += ubNumDescLines;
|
ubNumLines += ubNumDescLines;
|
||||||
@@ -529,18 +652,24 @@ void DisplayAlumniOldMercPopUp()
|
|||||||
|
|
||||||
///blt face panale and the mecs fce
|
///blt face panale and the mecs fce
|
||||||
BltVideoObject(FRAME_BUFFER, hFacePaneHandle, 0,AIM_ALUMNI_FACE_PANEL_X, AIM_ALUMNI_FACE_PANEL_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hFacePaneHandle, 0,AIM_ALUMNI_FACE_PANEL_X, AIM_ALUMNI_FACE_PANEL_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
BltVideoObject(FRAME_BUFFER, hFaceHandle, gubDrawOldMerc, AIM_ALUMNI_FACE_PANEL_X+1, AIM_ALUMNI_FACE_PANEL_Y+1, VO_BLT_SRCTRANSPARENCY,NULL);
|
|
||||||
|
//BltVideoObject(FRAME_BUFFER, hFaceHandle, gubDrawOldMerc, AIM_ALUMNI_FACE_PANEL_X+1, AIM_ALUMNI_FACE_PANEL_Y+1, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
BltVideoObject(FRAME_BUFFER, hFaceHandle, gAimOldArchives[gubDrawOldMerc].FaceID, AIM_ALUMNI_FACE_PANEL_X+1, AIM_ALUMNI_FACE_PANEL_Y+1, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
//Load and display the name
|
//Load and display the name
|
||||||
// uiStartLoc = AIM_ALUMNI_NAME_SIZE * gubDrawOldMerc;
|
// uiStartLoc = AIM_ALUMNI_NAME_SIZE * gubDrawOldMerc;
|
||||||
// LoadEncryptedDataFromFile(AIM_ALUMNI_NAME_FILE, sName, uiStartLoc, AIM_ALUMNI_NAME_SIZE);
|
// LoadEncryptedDataFromFile(AIM_ALUMNI_NAME_FILE, sName, uiStartLoc, AIM_ALUMNI_NAME_SIZE);
|
||||||
uiStartLoc = AIM_ALUMNI_FILE_RECORD_SIZE * gubDrawOldMerc;
|
// uiStartLoc = AIM_ALUMNI_FILE_RECORD_SIZE * gubDrawOldMerc;
|
||||||
LoadEncryptedDataFromFile( AIM_ALUMNI_FILE, sName, uiStartLoc, AIM_ALUMNI_FULL_NAME_SIZE );
|
// LoadEncryptedDataFromFile( AIM_ALUMNI_FILE, sName, uiStartLoc, AIM_ALUMNI_FULL_NAME_SIZE );
|
||||||
|
|
||||||
DrawTextToScreen(sName, AIM_ALUMNI_POPUP_NAME_X, AIM_ALUMNI_POPUP_NAME_Y, 0, AIM_ALUMNI_POPUP_NAME_FONT, AIM_ALUMNI_POPUP_NAME_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
//DrawTextToScreen(sName, AIM_ALUMNI_POPUP_NAME_X, AIM_ALUMNI_POPUP_NAME_Y, 0, AIM_ALUMNI_POPUP_NAME_FONT, AIM_ALUMNI_POPUP_NAME_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||||
|
|
||||||
|
DrawTextToScreen(gAimOldArchives[gubDrawOldMerc].szName, AIM_ALUMNI_POPUP_NAME_X, AIM_ALUMNI_POPUP_NAME_Y, 0, AIM_ALUMNI_POPUP_NAME_FONT, AIM_ALUMNI_POPUP_NAME_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||||
|
|
||||||
//Display the description
|
//Display the description
|
||||||
DisplayWrappedString(AIM_ALUMNI_POPUP_DESC_X, AIM_ALUMNI_POPUP_DESC_Y, AIM_POPUP_TEXT_WIDTH, 2, AIM_ALUMNI_POPUP_FONT, AIM_ALUMNI_POPUP_COLOR, sDesc, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
// DisplayWrappedString(AIM_ALUMNI_POPUP_DESC_X, AIM_ALUMNI_POPUP_DESC_Y, AIM_POPUP_TEXT_WIDTH, 2, AIM_ALUMNI_POPUP_FONT, AIM_ALUMNI_POPUP_COLOR, sDesc, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||||
|
DisplayWrappedString(AIM_ALUMNI_POPUP_DESC_X, AIM_ALUMNI_POPUP_DESC_Y, AIM_POPUP_TEXT_WIDTH, 2, AIM_ALUMNI_POPUP_FONT, AIM_ALUMNI_POPUP_COLOR, gAimOldArchives[gubDrawOldMerc].szBio, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||||
|
|
||||||
|
|
||||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||||
}
|
}
|
||||||
@@ -556,38 +685,66 @@ void DestroyPopUpBox()
|
|||||||
|
|
||||||
void InitAlumniFaceRegions()
|
void InitAlumniFaceRegions()
|
||||||
{
|
{
|
||||||
UINT16 usPosX, usPosY,i,x,y, usNumRows;
|
UINT16 usPosX, usPosY,i,x,y, usNumRows, p;
|
||||||
|
|
||||||
if(gfFaceMouseRegionsActive)
|
if(gfFaceMouseRegionsActive)
|
||||||
return;
|
return;
|
||||||
|
/*
|
||||||
if( gubPageNum == 2 )
|
if( gubPageNum == 2 )
|
||||||
usNumRows = 2;
|
usNumRows = 2;
|
||||||
else
|
else
|
||||||
usNumRows = AIM_ALUMNI_NUM_FACE_ROWS;
|
usNumRows = AIM_ALUMNI_NUM_FACE_ROWS;
|
||||||
|
*/
|
||||||
|
|
||||||
|
usNumRows = AIM_ALUMNI_NUM_FACE_ROWS;
|
||||||
|
|
||||||
usPosX = AIM_ALUMNI_START_GRID_X;
|
usPosX = AIM_ALUMNI_START_GRID_X;
|
||||||
usPosY = AIM_ALUMNI_START_GRID_Y;
|
usPosY = AIM_ALUMNI_START_GRID_Y;
|
||||||
|
|
||||||
|
|
||||||
|
if (gubPageNum == 0)
|
||||||
|
{
|
||||||
|
p=0;
|
||||||
|
}
|
||||||
|
else if (gubPageNum == 1)
|
||||||
|
{
|
||||||
|
p=20;
|
||||||
|
}
|
||||||
|
else if (gubPageNum == 2)
|
||||||
|
{
|
||||||
|
p=40;
|
||||||
|
}
|
||||||
|
else if (gubPageNum == 3)
|
||||||
|
{
|
||||||
|
p=60;
|
||||||
|
}
|
||||||
|
else p=0;
|
||||||
|
|
||||||
i=0;
|
i=0;
|
||||||
for(y=0; y<usNumRows; y++)
|
for(y=0; y<usNumRows; y++)
|
||||||
{
|
{
|
||||||
|
|
||||||
for(x=0; x<AIM_ALUMNI_NUM_FACE_COLS; x++)
|
for(x=0; x<AIM_ALUMNI_NUM_FACE_COLS; x++)
|
||||||
{
|
{
|
||||||
|
if ( vOldMerc[p] == TRUE )
|
||||||
|
{
|
||||||
MSYS_DefineRegion( &gMercAlumniFaceMouseRegions[ i ], usPosX, usPosY, (INT16)(usPosX + AIM_ALUMNI_ALUMNI_FACE_WIDTH), (INT16)(usPosY + AIM_ALUMNI_ALUMNI_FACE_HEIGHT), MSYS_PRIORITY_HIGH,
|
MSYS_DefineRegion( &gMercAlumniFaceMouseRegions[ i ], usPosX, usPosY, (INT16)(usPosX + AIM_ALUMNI_ALUMNI_FACE_WIDTH), (INT16)(usPosY + AIM_ALUMNI_ALUMNI_FACE_HEIGHT), MSYS_PRIORITY_HIGH,
|
||||||
CURSOR_WWW, MSYS_NO_CALLBACK, SelectAlumniFaceRegionCallBack);
|
CURSOR_WWW, MSYS_NO_CALLBACK, SelectAlumniFaceRegionCallBack);
|
||||||
// Add region
|
// Add region
|
||||||
MSYS_AddRegion( &gMercAlumniFaceMouseRegions[ i ] );
|
MSYS_AddRegion( &gMercAlumniFaceMouseRegions[ i ] );
|
||||||
MSYS_SetRegionUserData( &gMercAlumniFaceMouseRegions[ i ], 0, i+(20*gubPageNum));
|
//MSYS_SetRegionUserData( &gMercAlumniFaceMouseRegions[ i ], 0, i+(20*gubPageNum));
|
||||||
|
MSYS_SetRegionUserData( &gMercAlumniFaceMouseRegions[ i ], 0, i);
|
||||||
usPosX += AIM_ALUMNI_GRID_OFFSET_X;
|
usPosX += AIM_ALUMNI_GRID_OFFSET_X;
|
||||||
|
}
|
||||||
i++;
|
i++;
|
||||||
|
p++;
|
||||||
}
|
}
|
||||||
usPosX = AIM_ALUMNI_START_GRID_X;
|
usPosX = AIM_ALUMNI_START_GRID_X;
|
||||||
usPosY += AIM_ALUMNI_GRID_OFFSET_Y;
|
usPosY += AIM_ALUMNI_GRID_OFFSET_Y;
|
||||||
}
|
}
|
||||||
|
|
||||||
//the 3rd page now has an additional row with 1 merc on it, so add a new row
|
//the 3rd page now has an additional row with 1 merc on it, so add a new row
|
||||||
|
/*
|
||||||
if( gubPageNum == 2 )
|
if( gubPageNum == 2 )
|
||||||
{
|
{
|
||||||
MSYS_DefineRegion( &gMercAlumniFaceMouseRegions[ i ], usPosX, usPosY, (INT16)(usPosX + AIM_ALUMNI_ALUMNI_FACE_WIDTH), (INT16)(usPosY + AIM_ALUMNI_ALUMNI_FACE_HEIGHT), MSYS_PRIORITY_HIGH,
|
MSYS_DefineRegion( &gMercAlumniFaceMouseRegions[ i ], usPosX, usPosY, (INT16)(usPosX + AIM_ALUMNI_ALUMNI_FACE_WIDTH), (INT16)(usPosY + AIM_ALUMNI_ALUMNI_FACE_HEIGHT), MSYS_PRIORITY_HIGH,
|
||||||
@@ -596,8 +753,7 @@ void InitAlumniFaceRegions()
|
|||||||
MSYS_AddRegion( &gMercAlumniFaceMouseRegions[ i ] );
|
MSYS_AddRegion( &gMercAlumniFaceMouseRegions[ i ] );
|
||||||
MSYS_SetRegionUserData( &gMercAlumniFaceMouseRegions[ i ], 0, i+(20*gubPageNum));
|
MSYS_SetRegionUserData( &gMercAlumniFaceMouseRegions[ i ], 0, i+(20*gubPageNum));
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
gfFaceMouseRegionsActive = TRUE;
|
gfFaceMouseRegionsActive = TRUE;
|
||||||
}
|
}
|
||||||
@@ -610,6 +766,10 @@ void RemoveAimAlumniFaceRegion()
|
|||||||
if(!gfFaceMouseRegionsActive)
|
if(!gfFaceMouseRegionsActive)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
usNumber = AIM_ALUMNI_NUM_FACE_ROWS * AIM_ALUMNI_NUM_FACE_COLS;
|
||||||
|
|
||||||
|
/*
|
||||||
switch(gubPageNum)
|
switch(gubPageNum)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
@@ -624,7 +784,7 @@ void RemoveAimAlumniFaceRegion()
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
for(i=0; i<usNumber; i++)
|
for(i=0; i<usNumber; i++)
|
||||||
{
|
{
|
||||||
MSYS_RemoveRegion( &gMercAlumniFaceMouseRegions[ i ]);
|
MSYS_RemoveRegion( &gMercAlumniFaceMouseRegions[ i ]);
|
||||||
|
|||||||
@@ -1,12 +1,28 @@
|
|||||||
#ifndef __AIMARCHIVES_H_
|
#ifndef __AIMARCHIVES_H_
|
||||||
#define __AIMARCHIVES_H_
|
#define __AIMARCHIVES_H_
|
||||||
|
|
||||||
|
#include "Soldier Profile.h"
|
||||||
|
|
||||||
void GameInitAimArchives();
|
void GameInitAimArchives();
|
||||||
BOOLEAN EnterAimArchives();
|
BOOLEAN EnterAimArchives();
|
||||||
void ExitAimArchives();
|
void ExitAimArchives();
|
||||||
void HandleAimArchives();
|
void HandleAimArchives();
|
||||||
void RenderAimArchives();
|
void RenderAimArchives();
|
||||||
void EnterInitAimArchives();
|
void EnterInitAimArchives();
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
UINT8 uiIndex;
|
||||||
|
CHAR16 szNickName[160];
|
||||||
|
CHAR16 szName[160];
|
||||||
|
CHAR16 szBio[1120];
|
||||||
|
INT16 FaceID;
|
||||||
|
BOOLEAN visibleOldMerc;
|
||||||
|
|
||||||
|
} OLD_MERC_ARCHIVES_VALUES;
|
||||||
|
|
||||||
|
extern OLD_MERC_ARCHIVES_VALUES gAimOldArchives[NUM_PROFILES];
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+49
-23
@@ -924,14 +924,14 @@ BOOLEAN EnterAIMMembers()
|
|||||||
SetButtonCursor(giNextButton, CURSOR_WWW );
|
SetButtonCursor(giNextButton, CURSOR_WWW );
|
||||||
}
|
}
|
||||||
|
|
||||||
//tais: nsgi create kit selection buttons
|
|
||||||
if(gGameExternalOptions.gfUseNewStartingGearInterface)
|
|
||||||
CreateKitSelectionButtons();
|
|
||||||
|
|
||||||
gbCurrentSoldier = AimMercArray[gbCurrentIndex];
|
gbCurrentSoldier = AimMercArray[gbCurrentIndex];
|
||||||
gbCurrentSoldier = gAimAvailability[AimMercArray[gbCurrentIndex]].ProfilId;
|
gbCurrentSoldier = gAimAvailability[AimMercArray[gbCurrentIndex]].ProfilId;
|
||||||
gbCurrentSoldierBio = gAimAvailability[AimMercArray[gbCurrentIndex]].AimBio;
|
gbCurrentSoldierBio = gAimAvailability[AimMercArray[gbCurrentIndex]].AimBio;
|
||||||
|
|
||||||
|
//tais: nsgi create kit selection buttons
|
||||||
|
if(gGameExternalOptions.gfUseNewStartingGearInterface)
|
||||||
|
CreateKitSelectionButtons();
|
||||||
|
|
||||||
gfStopMercFromTalking = FALSE;
|
gfStopMercFromTalking = FALSE;
|
||||||
gubVideoConferencingMode = (UINT8)giCurrentSubPage;
|
gubVideoConferencingMode = (UINT8)giCurrentSubPage;
|
||||||
gubVideoConferencingPreviousMode = AIM_VIDEO_NOT_DISPLAYED_MODE;
|
gubVideoConferencingPreviousMode = AIM_VIDEO_NOT_DISPLAYED_MODE;
|
||||||
@@ -1952,19 +1952,20 @@ void BtnContactButtonCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
{
|
{
|
||||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||||
{
|
{
|
||||||
//if we are not already in the video conferemce mode, go in to it
|
//if no popup box
|
||||||
if( !gubVideoConferencingMode)
|
if( gubPopUpBoxAction != AIM_POPUP_DISPLAY )
|
||||||
{
|
{
|
||||||
|
//if we are not already in the video conferemce mode, go in to it
|
||||||
gubVideoConferencingMode = AIM_VIDEO_POPUP_MODE;
|
if( !gubVideoConferencingMode )
|
||||||
// gubVideoConferencingMode = AIM_VIDEO_INIT_MODE;
|
{
|
||||||
gfFirstTimeInContactScreen = TRUE;
|
gubVideoConferencingMode = AIM_VIDEO_POPUP_MODE;
|
||||||
|
// gubVideoConferencingMode = AIM_VIDEO_INIT_MODE;
|
||||||
|
gfFirstTimeInContactScreen = TRUE;
|
||||||
|
}
|
||||||
|
InitCreateDeleteAimPopUpBox(AIM_POPUP_DELETE, NULL, NULL, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
||||||
|
|
||||||
InitCreateDeleteAimPopUpBox(AIM_POPUP_DELETE, NULL, NULL, 0, 0, 0);
|
|
||||||
|
|
||||||
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5019,7 +5020,7 @@ void HandleAimMemberKeyBoardInput()
|
|||||||
{
|
{
|
||||||
InputAtom InputEvent;
|
InputAtom InputEvent;
|
||||||
|
|
||||||
while (DequeueEvent(&InputEvent) == TRUE)
|
while (DequeueSpecificEvent(&InputEvent, KEY_DOWN|KEY_UP|KEY_REPEAT))
|
||||||
{//!HandleTextInput( &InputEvent ) &&
|
{//!HandleTextInput( &InputEvent ) &&
|
||||||
if( InputEvent.usEvent == KEY_DOWN )
|
if( InputEvent.usEvent == KEY_DOWN )
|
||||||
{
|
{
|
||||||
@@ -5058,16 +5059,16 @@ void HandleAimMemberKeyBoardInput()
|
|||||||
gfRedrawScreen = TRUE;
|
gfRedrawScreen = TRUE;
|
||||||
break;
|
break;
|
||||||
case ENTER:
|
case ENTER:
|
||||||
// contact only if merc alive
|
// contact only if merc alive & no popup box
|
||||||
if( !IsMercDead( gbCurrentSoldier ) )
|
if( !IsMercDead( gbCurrentSoldier ) && gubPopUpBoxAction != AIM_POPUP_DISPLAY )
|
||||||
{
|
{
|
||||||
if( !gubVideoConferencingMode)
|
if( !gubVideoConferencingMode)
|
||||||
{
|
{
|
||||||
gubVideoConferencingMode = AIM_VIDEO_POPUP_MODE;
|
gubVideoConferencingMode = AIM_VIDEO_POPUP_MODE;
|
||||||
//gubVideoConferencingMode = AIM_VIDEO_INIT_MODE;
|
//gubVideoConferencingMode = AIM_VIDEO_INIT_MODE;
|
||||||
gfFirstTimeInContactScreen = TRUE;
|
gfFirstTimeInContactScreen = TRUE;
|
||||||
}
|
}
|
||||||
InitCreateDeleteAimPopUpBox(AIM_POPUP_DELETE, NULL, NULL, 0, 0, 0);
|
InitCreateDeleteAimPopUpBox(AIM_POPUP_DELETE, NULL, NULL, 0, 0, 0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#ifdef JA2TESTVERSION
|
#ifdef JA2TESTVERSION
|
||||||
@@ -5467,6 +5468,31 @@ void RefreshWeaponKitSelectionButtons()
|
|||||||
{
|
{
|
||||||
//tais: shorthand function to refresh buttons
|
//tais: shorthand function to refresh buttons
|
||||||
DisableWeaponKitSelectionButtons();
|
DisableWeaponKitSelectionButtons();
|
||||||
|
STR16
|
||||||
|
kit1label = CharacterInfo[AIM_MEMBER_GEAR_KIT_ONE],
|
||||||
|
kit2label = CharacterInfo[AIM_MEMBER_GEAR_KIT_TWO],
|
||||||
|
kit3label = CharacterInfo[AIM_MEMBER_GEAR_KIT_THREE],
|
||||||
|
kit4label = CharacterInfo[AIM_MEMBER_GEAR_KIT_FOUR],
|
||||||
|
kit5label = CharacterInfo[AIM_MEMBER_GEAR_KIT_FIVE];
|
||||||
|
|
||||||
|
if (gbCurrentSoldier != -1)
|
||||||
|
{
|
||||||
|
if (gMercProfileGear[gbCurrentSoldier][0].mGearKitName[0] != '\0')
|
||||||
|
kit1label = gMercProfileGear[gbCurrentSoldier][0].mGearKitName;
|
||||||
|
if (gMercProfileGear[gbCurrentSoldier][1].mGearKitName[0] != '\0')
|
||||||
|
kit2label = gMercProfileGear[gbCurrentSoldier][1].mGearKitName;
|
||||||
|
if (gMercProfileGear[gbCurrentSoldier][2].mGearKitName[0] != '\0')
|
||||||
|
kit3label = gMercProfileGear[gbCurrentSoldier][2].mGearKitName;
|
||||||
|
if (gMercProfileGear[gbCurrentSoldier][3].mGearKitName[0] != '\0')
|
||||||
|
kit4label = gMercProfileGear[gbCurrentSoldier][3].mGearKitName;
|
||||||
|
if (gMercProfileGear[gbCurrentSoldier][4].mGearKitName[0] != '\0')
|
||||||
|
kit5label = gMercProfileGear[gbCurrentSoldier][4].mGearKitName;
|
||||||
|
}
|
||||||
|
SpecifyButtonText( giWeaponboxSelectionButtonOne, kit1label );
|
||||||
|
SpecifyButtonText( giWeaponboxSelectionButtonTwo, kit2label );
|
||||||
|
SpecifyButtonText( giWeaponboxSelectionButtonThree, kit3label );
|
||||||
|
SpecifyButtonText( giWeaponboxSelectionButtonFour, kit4label );
|
||||||
|
SpecifyButtonText( giWeaponboxSelectionButtonFive, kit5label );
|
||||||
EnableWeaponKitSelectionButtons();
|
EnableWeaponKitSelectionButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+22
-12
@@ -138,7 +138,7 @@
|
|||||||
#define BOBBYR_PERCENT_FUNTCIONAL_Y BOBBYR_ORDER_SUBTOTAL_Y + 15
|
#define BOBBYR_PERCENT_FUNTCIONAL_Y BOBBYR_ORDER_SUBTOTAL_Y + 15
|
||||||
|
|
||||||
|
|
||||||
BobbyRayPurchaseStruct BobbyRayPurchases[ MAX_PURCHASE_AMOUNT ];
|
BobbyRayPurchaseStruct BobbyRayPurchases[ 100 ];
|
||||||
|
|
||||||
//BobbyRayOrderStruct *BobbyRayOrdersOnDeliveryArray=NULL;
|
//BobbyRayOrderStruct *BobbyRayOrdersOnDeliveryArray=NULL;
|
||||||
//UINT8 usNumberOfBobbyRayOrderItems = 0;
|
//UINT8 usNumberOfBobbyRayOrderItems = 0;
|
||||||
@@ -347,14 +347,14 @@ void GameInitBobbyRGuns()
|
|||||||
guiCurrentArmourFilterMode = -1;
|
guiCurrentArmourFilterMode = -1;
|
||||||
guiCurrentMiscFilterMode = -1;
|
guiCurrentMiscFilterMode = -1;
|
||||||
|
|
||||||
memset(&BobbyRayPurchases, 0, MAX_PURCHASE_AMOUNT);
|
memset(&BobbyRayPurchases, 0, gGameExternalOptions.ubBobbyRayMaxPurchaseAmount);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterInitBobbyRGuns()
|
void EnterInitBobbyRGuns()
|
||||||
{
|
{
|
||||||
guiTempCurrentMode=0;
|
guiTempCurrentMode=0;
|
||||||
|
|
||||||
memset(&BobbyRayPurchases, 0, MAX_PURCHASE_AMOUNT);
|
memset(&BobbyRayPurchases, 0, gGameExternalOptions.ubBobbyRayMaxPurchaseAmount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1752,7 +1752,7 @@ BOOLEAN DisplayAmmoInfo(UINT16 usIndex, UINT16 usTextPosY, BOOLEAN fUsed, UINT16
|
|||||||
usHeight = DisplayCaliber(usHeight, usIndex, usFontHeight);
|
usHeight = DisplayCaliber(usHeight, usIndex, usFontHeight);
|
||||||
|
|
||||||
//Magazine
|
//Magazine
|
||||||
// usHeight = DisplayMagazine(usHeight, usIndex, usFontHeight);
|
usHeight = DisplayMagazine(usHeight, usIndex, usFontHeight);
|
||||||
|
|
||||||
//Display the Cost and the qty bought and on hand
|
//Display the Cost and the qty bought and on hand
|
||||||
usHeight = DisplayCostAndQty(usTextPosY, usIndex, usFontHeight, usBobbyIndex, fUsed);
|
usHeight = DisplayCostAndQty(usTextPosY, usIndex, usFontHeight, usBobbyIndex, fUsed);
|
||||||
@@ -1991,7 +1991,7 @@ UINT16 DisplayMagazine(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight)
|
|||||||
CHAR16 sTemp[20];
|
CHAR16 sTemp[20];
|
||||||
|
|
||||||
DrawTextToScreen(BobbyRText[BOBBYR_GUNS_MAGAZINE], BOBBYR_ITEM_WEIGHT_TEXT_X, (UINT16)usPosY, 0, BOBBYR_ITEM_DESC_TEXT_FONT, BOBBYR_STATIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
DrawTextToScreen(BobbyRText[BOBBYR_GUNS_MAGAZINE], BOBBYR_ITEM_WEIGHT_TEXT_X, (UINT16)usPosY, 0, BOBBYR_ITEM_DESC_TEXT_FONT, BOBBYR_STATIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||||
swprintf(sTemp, L"%3d %s", Weapon[usIndex].ubMagSize, pMessageStrings[ MSG_ROUNDS_ABBREVIATION ] );
|
swprintf(sTemp, L"%3d %s", Magazine[Item[usIndex].ubClassIndex].ubMagSize, pMessageStrings[ MSG_ROUNDS_ABBREVIATION ] );
|
||||||
DrawTextToScreen(sTemp, BOBBYR_ITEM_WEIGHT_NUM_X, (UINT16)usPosY, BOBBYR_ITEM_WEIGHT_NUM_WIDTH, BOBBYR_ITEM_DESC_TEXT_FONT, BOBBYR_ITEM_DESC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
|
DrawTextToScreen(sTemp, BOBBYR_ITEM_WEIGHT_NUM_X, (UINT16)usPosY, BOBBYR_ITEM_WEIGHT_NUM_WIDTH, BOBBYR_ITEM_DESC_TEXT_FONT, BOBBYR_ITEM_DESC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
|
||||||
usPosY += usFontHeight + 2;
|
usPosY += usFontHeight + 2;
|
||||||
return(usPosY);
|
return(usPosY);
|
||||||
@@ -2919,7 +2919,9 @@ void PurchaseBobbyRayItem(UINT16 usItemNumber, BOOLEAN fAllItems )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
//display error popup because the player is trying to purchase more thenn 10 items
|
//display error popup because the player is trying to purchase more thenn 10 items
|
||||||
DoLapTopMessageBox( MSG_BOX_LAPTOP_DEFAULT, BobbyRText[ BOBBYR_MORE_THEN_10_PURCHASES ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
CHAR16 sMaxPurchase[255];
|
||||||
|
swprintf(sMaxPurchase, L"%s%d%s", BobbyRText[ BOBBYR_MORE_THEN_10_PURCHASES_A], gGameExternalOptions.ubBobbyRayMaxPurchaseAmount, BobbyRText[ BOBBYR_MORE_THEN_10_PURCHASES_B]);
|
||||||
|
DoLapTopMessageBox( MSG_BOX_LAPTOP_DEFAULT, sMaxPurchase, LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2965,7 +2967,9 @@ void PurchaseBobbyRayItem(UINT16 usItemNumber, BOOLEAN fAllItems )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
//display error popup because the player is trying to purchase more thenn 10 items
|
//display error popup because the player is trying to purchase more thenn 10 items
|
||||||
DoLapTopMessageBox( MSG_BOX_LAPTOP_DEFAULT, BobbyRText[ BOBBYR_MORE_THEN_10_PURCHASES ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
CHAR16 sMaxPurchase[255];
|
||||||
|
swprintf(sMaxPurchase, L"%s%d%s", BobbyRText[ BOBBYR_MORE_THEN_10_PURCHASES_A], gGameExternalOptions.ubBobbyRayMaxPurchaseAmount, BobbyRText[ BOBBYR_MORE_THEN_10_PURCHASES_B]);
|
||||||
|
DoLapTopMessageBox( MSG_BOX_LAPTOP_DEFAULT, sMaxPurchase, LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Else If the item is already purchased increment purchase amount. Only if ordering less then the max amount!
|
// Else If the item is already purchased increment purchase amount. Only if ordering less then the max amount!
|
||||||
@@ -2994,7 +2998,7 @@ UINT8 CheckIfItemIsPurchased(UINT16 usItemNumber)
|
|||||||
{
|
{
|
||||||
UINT8 i;
|
UINT8 i;
|
||||||
|
|
||||||
for(i=0; i<MAX_PURCHASE_AMOUNT; i++)
|
for(i=0; i<gGameExternalOptions.ubBobbyRayMaxPurchaseAmount; i++)
|
||||||
{
|
{
|
||||||
if( ( usItemNumber == BobbyRayPurchases[i].usBobbyItemIndex ) && ( BobbyRayPurchases[i].ubNumberPurchased != 0 ) && ( BobbyRayPurchases[i].fUsed == gfOnUsedPage ) )
|
if( ( usItemNumber == BobbyRayPurchases[i].usBobbyItemIndex ) && ( BobbyRayPurchases[i].ubNumberPurchased != 0 ) && ( BobbyRayPurchases[i].fUsed == gfOnUsedPage ) )
|
||||||
return(i);
|
return(i);
|
||||||
@@ -3006,7 +3010,7 @@ UINT8 GetNextPurchaseNumber()
|
|||||||
{
|
{
|
||||||
UINT8 i;
|
UINT8 i;
|
||||||
|
|
||||||
for(i=0; i<MAX_PURCHASE_AMOUNT; i++)
|
for(i=0; i<gGameExternalOptions.ubBobbyRayMaxPurchaseAmount; i++)
|
||||||
{
|
{
|
||||||
if( ( BobbyRayPurchases[i].usBobbyItemIndex == 0) && ( BobbyRayPurchases[i].ubNumberPurchased == 0 ) )
|
if( ( BobbyRayPurchases[i].usBobbyItemIndex == 0) && ( BobbyRayPurchases[i].ubNumberPurchased == 0 ) )
|
||||||
return(i);
|
return(i);
|
||||||
@@ -3400,7 +3404,7 @@ UINT32 CalculateTotalPurchasePrice()
|
|||||||
UINT16 i;
|
UINT16 i;
|
||||||
UINT32 uiTotal = 0;
|
UINT32 uiTotal = 0;
|
||||||
|
|
||||||
for(i=0; i<MAX_PURCHASE_AMOUNT; i++)
|
for(i=0; i<gGameExternalOptions.ubBobbyRayMaxPurchaseAmount; i++)
|
||||||
{
|
{
|
||||||
//if the item was purchased
|
//if the item was purchased
|
||||||
if( BobbyRayPurchases[ i ].ubNumberPurchased )
|
if( BobbyRayPurchases[ i ].ubNumberPurchased )
|
||||||
@@ -3643,6 +3647,12 @@ BOOLEAN IsAmmoMatchinWeaponType(UINT16 usItemIndex, UINT8 ubWeaponType)
|
|||||||
|
|
||||||
for (i = 0; i < MAXITEMS; i++)
|
for (i = 0; i < MAXITEMS; i++)
|
||||||
{
|
{
|
||||||
|
if (Item[i].usItemClass != IC_GUN )
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (Item[i].usItemClass == 0)
|
||||||
|
break; // out of items
|
||||||
|
|
||||||
// We found the Weapon that uses this Ammo
|
// We found the Weapon that uses this Ammo
|
||||||
if (Magazine[ Item[ usItemIndex ].ubClassIndex ].ubCalibre == Weapon[i].ubCalibre)
|
if (Magazine[ Item[ usItemIndex ].ubClassIndex ].ubCalibre == Weapon[i].ubCalibre)
|
||||||
{
|
{
|
||||||
@@ -3650,7 +3660,7 @@ BOOLEAN IsAmmoMatchinWeaponType(UINT16 usItemIndex, UINT8 ubWeaponType)
|
|||||||
if (Weapon[i].ubWeaponType == ubWeaponType)
|
if (Weapon[i].ubWeaponType == ubWeaponType)
|
||||||
{
|
{
|
||||||
//Weapon has correct magazine size
|
//Weapon has correct magazine size
|
||||||
if(Weapon[i].ubMagSize == Magazine[Item[usItemIndex].ubClassIndex].ubMagSize )
|
if(Magazine[ Item[ usItemIndex ].ubClassIndex ].ubMagType >= AMMO_BOX || (Magazine[ Item[ usItemIndex ].ubClassIndex ].ubMagType < AMMO_BOX && Weapon[i].ubMagSize == Magazine[Item[usItemIndex].ubClassIndex].ubMagSize ))
|
||||||
{
|
{
|
||||||
bRetValue = TRUE;
|
bRetValue = TRUE;
|
||||||
break;
|
break;
|
||||||
@@ -3735,7 +3745,7 @@ void HandleBobbyRGunsKeyBoardInput()
|
|||||||
fCtrl = _KeyDown( CTRL );
|
fCtrl = _KeyDown( CTRL );
|
||||||
fAlt = _KeyDown( ALT );
|
fAlt = _KeyDown( ALT );
|
||||||
|
|
||||||
while (DequeueEvent(&InputEvent) == TRUE)
|
while (DequeueSpecificEvent(&InputEvent, KEY_DOWN |KEY_REPEAT) == TRUE)
|
||||||
{
|
{
|
||||||
if( InputEvent.usEvent == KEY_DOWN )
|
if( InputEvent.usEvent == KEY_DOWN )
|
||||||
{
|
{
|
||||||
|
|||||||
+300
-27
@@ -80,6 +80,8 @@ enum
|
|||||||
#define BOBBYR_ORDER_NUM_SHIPPING_CITIES 17
|
#define BOBBYR_ORDER_NUM_SHIPPING_CITIES 17
|
||||||
#define BOBBYR_NUM_DISPLAYED_CITIES 10
|
#define BOBBYR_NUM_DISPLAYED_CITIES 10
|
||||||
|
|
||||||
|
#define BOBBYR_NUM_DISPLAYED_ITEMS 10
|
||||||
|
|
||||||
#define OVERNIGHT_EXPRESS 1
|
#define OVERNIGHT_EXPRESS 1
|
||||||
#define TWO_BUSINESS_DAYS 2
|
#define TWO_BUSINESS_DAYS 2
|
||||||
#define STANDARD_SERVICE 3
|
#define STANDARD_SERVICE 3
|
||||||
@@ -126,17 +128,17 @@ enum
|
|||||||
#define BOBBYR_GRID_ROW_OFFSET 20
|
#define BOBBYR_GRID_ROW_OFFSET 20
|
||||||
#define BOBBYR_GRID_TITLE_OFFSET 27
|
#define BOBBYR_GRID_TITLE_OFFSET 27
|
||||||
|
|
||||||
#define BOBBYR_GRID_FIRST_COLUMN_X 3//BOBBYR_ORDERGRID_X + 3
|
#define BOBBYR_GRID_FIRST_COLUMN_X 23//BOBBYR_ORDERGRID_X + 3
|
||||||
#define BOBBYR_GRID_FIRST_COLUMN_Y 37//BOBBYR_ORDERGRID_Y + 37
|
#define BOBBYR_GRID_FIRST_COLUMN_Y 37//BOBBYR_ORDERGRID_Y + 37
|
||||||
#define BOBBYR_GRID_FIRST_COLUMN_WIDTH 23
|
#define BOBBYR_GRID_FIRST_COLUMN_WIDTH 23
|
||||||
|
|
||||||
#define BOBBYR_GRID_SECOND_COLUMN_X 28//BOBBYR_ORDERGRID_X + 28
|
#define BOBBYR_GRID_SECOND_COLUMN_X 48//BOBBYR_ORDERGRID_X + 28
|
||||||
#define BOBBYR_GRID_SECOND_COLUMN_Y BOBBYR_GRID_FIRST_COLUMN_Y
|
#define BOBBYR_GRID_SECOND_COLUMN_Y BOBBYR_GRID_FIRST_COLUMN_Y
|
||||||
#define BOBBYR_GRID_SECOND_COLUMN_WIDTH 40
|
#define BOBBYR_GRID_SECOND_COLUMN_WIDTH 40
|
||||||
|
|
||||||
#define BOBBYR_GRID_THIRD_COLUMN_X 70//BOBBYR_ORDERGRID_X + 70
|
#define BOBBYR_GRID_THIRD_COLUMN_X 90//BOBBYR_ORDERGRID_X + 70
|
||||||
#define BOBBYR_GRID_THIRD_COLUMN_Y BOBBYR_GRID_FIRST_COLUMN_Y
|
#define BOBBYR_GRID_THIRD_COLUMN_Y BOBBYR_GRID_FIRST_COLUMN_Y
|
||||||
#define BOBBYR_GRID_THIRD_COLUMN_WIDTH 111
|
#define BOBBYR_GRID_THIRD_COLUMN_WIDTH 91
|
||||||
|
|
||||||
#define BOBBYR_GRID_FOURTH_COLUMN_X 184//BOBBYR_ORDERGRID_X + 184
|
#define BOBBYR_GRID_FOURTH_COLUMN_X 184//BOBBYR_ORDERGRID_X + 184
|
||||||
#define BOBBYR_GRID_FOURTH_COLUMN_Y BOBBYR_GRID_FIRST_COLUMN_Y
|
#define BOBBYR_GRID_FOURTH_COLUMN_Y BOBBYR_GRID_FIRST_COLUMN_Y
|
||||||
@@ -146,8 +148,18 @@ enum
|
|||||||
#define BOBBYR_GRID_FIFTH_COLUMN_Y BOBBYR_GRID_FIRST_COLUMN_Y
|
#define BOBBYR_GRID_FIFTH_COLUMN_Y BOBBYR_GRID_FIRST_COLUMN_Y
|
||||||
#define BOBBYR_GRID_FIFTH_COLUMN_WIDTH 42
|
#define BOBBYR_GRID_FIFTH_COLUMN_WIDTH 42
|
||||||
|
|
||||||
|
#define BOBBYR_GRID_SCROLL_COLUMN_X 2
|
||||||
|
#define BOBBYR_GRID_SCROLL_COLUMN_Y BOBBYR_GRID_FIRST_COLUMN_Y - 2
|
||||||
|
#define BOBBYR_GRID_SCROLL_COLUMN_WIDTH 23
|
||||||
|
#define BOBBYR_GRID_SCROLL_COLUMN_HEIGHT BOBBYR_GRID_ROW_OFFSET * 10
|
||||||
|
#define BOBBYR_GRID_SCROLL_COLUMN_HEIGHT_MINUS_ARROWS ( BOBBYR_GRID_SCROLL_COLUMN_HEIGHT - (2 * BOBBYR_SCROLL_ARROW_HEIGHT) - 8 )
|
||||||
|
#define BOBBYR_GRID_SCROLL_UP_ARROW_X BOBBYR_GRID_SCROLL_COLUMN_X + 2
|
||||||
|
#define BOBBYR_GRID_SCROLL_UP_ARROW_Y BOBBYR_GRID_SCROLL_COLUMN_Y + 4
|
||||||
|
#define BOBBYR_GRID_SCROLL_DOWN_ARROW_X BOBBYR_GRID_SCROLL_UP_ARROW_X
|
||||||
|
#define BOBBYR_GRID_SCROLL_DOWN_ARROW_Y BOBBYR_GRID_SCROLL_COLUMN_Y+BOBBYR_GRID_SCROLL_COLUMN_HEIGHT-24
|
||||||
|
|
||||||
#define BOBBYR_SUBTOTAL_WIDTH 212
|
#define BOBBYR_SUBTOTAL_WIDTH 212
|
||||||
#define BOBBYR_SUBTOTAL_X BOBBYR_GRID_FIRST_COLUMN_X
|
#define BOBBYR_SUBTOTAL_X BOBBYR_GRID_FIRST_COLUMN_X - 20
|
||||||
#define BOBBYR_SUBTOTAL_Y BOBBYR_GRID_FIRST_COLUMN_Y + BOBBYR_GRID_ROW_OFFSET * 10 + 3
|
#define BOBBYR_SUBTOTAL_Y BOBBYR_GRID_FIRST_COLUMN_Y + BOBBYR_GRID_ROW_OFFSET * 10 + 3
|
||||||
|
|
||||||
#define BOBBYR_SHIPPING_N_HANDLE_Y BOBBYR_SUBTOTAL_Y + 17
|
#define BOBBYR_SHIPPING_N_HANDLE_Y BOBBYR_SUBTOTAL_Y + 17
|
||||||
@@ -262,6 +274,14 @@ UINT8 gubDropDownAction;
|
|||||||
INT8 gbSelectedCity=-1; //keeps track of the currently selected city
|
INT8 gbSelectedCity=-1; //keeps track of the currently selected city
|
||||||
UINT8 gubCityAtTopOfList;
|
UINT8 gubCityAtTopOfList;
|
||||||
|
|
||||||
|
UINT8 gubPurchaseAtTopOfList;
|
||||||
|
UINT8 guidivisor;
|
||||||
|
|
||||||
|
BOOLEAN gfDrawGridArrowMouseRegions=FALSE;
|
||||||
|
BOOLEAN gfDrawGridColumnMouseRegion=FALSE;
|
||||||
|
|
||||||
|
extern BOOLEAN gfBobbyRShipmentsDirty;
|
||||||
|
|
||||||
BOOLEAN gfRemoveItemsFromStock=FALSE;
|
BOOLEAN gfRemoveItemsFromStock=FALSE;
|
||||||
|
|
||||||
NewBobbyRayOrderStruct *gpNewBobbyrShipments;
|
NewBobbyRayOrderStruct *gpNewBobbyrShipments;
|
||||||
@@ -337,6 +357,14 @@ void SelectTitleLinkRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
|||||||
MOUSE_REGION gSelectedUpDownArrowOnScrollAreaRegion[2];
|
MOUSE_REGION gSelectedUpDownArrowOnScrollAreaRegion[2];
|
||||||
void SelectUpDownArrowOnScrollAreaRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
void SelectUpDownArrowOnScrollAreaRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
|
|
||||||
|
//mouse region to click on the up or down arrow on the grid scroll area
|
||||||
|
MOUSE_REGION gSelectedUpDownArrowOnGridScrollAreaRegion[2];
|
||||||
|
void SelectUpDownArrowOnGridScrollAreaRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
|
//mouse region for scroll column in the grid area.
|
||||||
|
MOUSE_REGION *gSelectedGridScrollColumnRegion;
|
||||||
|
void SelectGridScrollColumnRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
|
void SelectGridScrollColumnMovementCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
|
|
||||||
//Dealtar's Airport Externalization.
|
//Dealtar's Airport Externalization.
|
||||||
INT16 gusCurShipmentDestinationID;
|
INT16 gusCurShipmentDestinationID;
|
||||||
extern CPostalService gPostalService;
|
extern CPostalService gPostalService;
|
||||||
@@ -368,6 +396,7 @@ void DisplayPackageWeight( );
|
|||||||
void ShutDownBobbyRNewMailOrders();
|
void ShutDownBobbyRNewMailOrders();
|
||||||
//ppp
|
//ppp
|
||||||
|
|
||||||
|
void DrawOrderGoldRectangle(UINT16 usGridX, UINT16 usGridY);
|
||||||
|
|
||||||
void GameInitBobbyRMailOrder()
|
void GameInitBobbyRMailOrder()
|
||||||
{
|
{
|
||||||
@@ -390,6 +419,9 @@ BOOLEAN EnterBobbyRMailOrder()
|
|||||||
gfDestroyConfirmGrphiArea = FALSE;
|
gfDestroyConfirmGrphiArea = FALSE;
|
||||||
gfCanAcceptOrder = TRUE;
|
gfCanAcceptOrder = TRUE;
|
||||||
gubDropDownAction = BR_DROP_DOWN_NO_ACTION;
|
gubDropDownAction = BR_DROP_DOWN_NO_ACTION;
|
||||||
|
gfDrawGridArrowMouseRegions = FALSE;
|
||||||
|
gfDrawGridColumnMouseRegion = FALSE;
|
||||||
|
gubPurchaseAtTopOfList = 0;
|
||||||
|
|
||||||
gShippingSpeedAreas[0] = iScreenWidthOffset + 585;
|
gShippingSpeedAreas[0] = iScreenWidthOffset + 585;
|
||||||
gShippingSpeedAreas[1] = iScreenHeightOffset + 218 + LAPTOP_SCREEN_WEB_DELTA_Y;
|
gShippingSpeedAreas[1] = iScreenHeightOffset + 218 + LAPTOP_SCREEN_WEB_DELTA_Y;
|
||||||
@@ -547,7 +579,6 @@ BOOLEAN EnterBobbyRMailOrder()
|
|||||||
MSYS_AddRegion(&gSelectedCloseDropDownRegion);
|
MSYS_AddRegion(&gSelectedCloseDropDownRegion);
|
||||||
MSYS_DisableRegion(&gSelectedCloseDropDownRegion);
|
MSYS_DisableRegion(&gSelectedCloseDropDownRegion);
|
||||||
|
|
||||||
|
|
||||||
CreateBobbyRayOrderTitle();
|
CreateBobbyRayOrderTitle();
|
||||||
|
|
||||||
guiShippingCost = 0;
|
guiShippingCost = 0;
|
||||||
@@ -607,7 +638,18 @@ void ExitBobbyRMailOrder()
|
|||||||
MSYS_RemoveRegion( &gSelectedConfirmOrderRegion);
|
MSYS_RemoveRegion( &gSelectedConfirmOrderRegion);
|
||||||
MSYS_RemoveRegion( &gSelectedActivateCityDroDownRegion);
|
MSYS_RemoveRegion( &gSelectedActivateCityDroDownRegion);
|
||||||
MSYS_RemoveRegion( &gSelectedCloseDropDownRegion);
|
MSYS_RemoveRegion( &gSelectedCloseDropDownRegion);
|
||||||
|
if (gfDrawGridArrowMouseRegions == TRUE)
|
||||||
|
{
|
||||||
|
MSYS_DisableRegion( &gSelectedUpDownArrowOnGridScrollAreaRegion[0]);
|
||||||
|
MSYS_DisableRegion( &gSelectedUpDownArrowOnGridScrollAreaRegion[1]);
|
||||||
|
MSYS_RemoveRegion( &gSelectedUpDownArrowOnGridScrollAreaRegion[0]);
|
||||||
|
MSYS_RemoveRegion( &gSelectedUpDownArrowOnGridScrollAreaRegion[1]);
|
||||||
|
}
|
||||||
|
if (gfDrawGridColumnMouseRegion == TRUE)
|
||||||
|
{
|
||||||
|
MSYS_DisableRegion( gSelectedGridScrollColumnRegion);
|
||||||
|
MSYS_RemoveRegion( gSelectedGridScrollColumnRegion);
|
||||||
|
}
|
||||||
|
|
||||||
//if the drop down box is active, destroy it
|
//if the drop down box is active, destroy it
|
||||||
gubDropDownAction = BR_DROP_DOWN_DESTROY;
|
gubDropDownAction = BR_DROP_DOWN_DESTROY;
|
||||||
@@ -774,11 +816,12 @@ void BtnBobbyRClearOrderCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
{
|
{
|
||||||
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
||||||
|
|
||||||
memset(&BobbyRayPurchases, 0, sizeof(BobbyRayPurchaseStruct) * MAX_PURCHASE_AMOUNT);
|
memset(&BobbyRayPurchases, 0, sizeof(BobbyRayPurchaseStruct) * gGameExternalOptions.ubBobbyRayMaxPurchaseAmount);
|
||||||
gubSelectedLight = 0;
|
gubSelectedLight = 0;
|
||||||
gfReDrawBobbyOrder = TRUE;
|
gfReDrawBobbyOrder = TRUE;
|
||||||
gbSelectedCity = -1;
|
gbSelectedCity = -1;
|
||||||
gubCityAtTopOfList = 0;
|
gubCityAtTopOfList = 0;
|
||||||
|
gubPurchaseAtTopOfList = 0;
|
||||||
|
|
||||||
//Get rid of the city drop dowm, if it is being displayed
|
//Get rid of the city drop dowm, if it is being displayed
|
||||||
gubDropDownAction = BR_DROP_DOWN_DESTROY;
|
gubDropDownAction = BR_DROP_DOWN_DESTROY;
|
||||||
@@ -878,7 +921,7 @@ void BtnBobbyRAcceptOrderCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
|
|
||||||
|
|
||||||
ubCount = 0;
|
ubCount = 0;
|
||||||
for(i=0; i<MAX_PURCHASE_AMOUNT; i++)
|
for(i=0; i<gGameExternalOptions.ubBobbyRayMaxPurchaseAmount; i++)
|
||||||
{
|
{
|
||||||
//if the item was purchased
|
//if the item was purchased
|
||||||
if( BobbyRayPurchases[ i ].ubNumberPurchased )
|
if( BobbyRayPurchases[ i ].ubNumberPurchased )
|
||||||
@@ -959,7 +1002,7 @@ void DisplayPurchasedItems( BOOLEAN fCalledFromOrderPage, UINT16 usGridX, UINT16
|
|||||||
CHAR16 sText[400];
|
CHAR16 sText[400];
|
||||||
CHAR16 sBack[400];
|
CHAR16 sBack[400];
|
||||||
CHAR16 sTemp[20];
|
CHAR16 sTemp[20];
|
||||||
UINT16 usPosY;
|
UINT16 usPosY, usPosX, usHeight;
|
||||||
UINT32 uiStartLoc=0;
|
UINT32 uiStartLoc=0;
|
||||||
UINT32 uiTotal;
|
UINT32 uiTotal;
|
||||||
UINT16 usStringLength;
|
UINT16 usStringLength;
|
||||||
@@ -967,7 +1010,10 @@ void DisplayPurchasedItems( BOOLEAN fCalledFromOrderPage, UINT16 usGridX, UINT16
|
|||||||
CHAR16 OneChar[2];
|
CHAR16 OneChar[2];
|
||||||
INT32 iGrandTotal;
|
INT32 iGrandTotal;
|
||||||
INT32 iSubTotal;
|
INT32 iSubTotal;
|
||||||
|
UINT32 uiDestPitchBYTES;
|
||||||
|
UINT8 *pDestBuf;
|
||||||
|
HVOBJECT hArrowHandle;
|
||||||
|
//JMich TODO add a way to check for empty index in the middle of pBobbyRayPurchase
|
||||||
|
|
||||||
|
|
||||||
//Output the qty
|
//Output the qty
|
||||||
@@ -1018,7 +1064,7 @@ void DisplayPurchasedItems( BOOLEAN fCalledFromOrderPage, UINT16 usGridX, UINT16
|
|||||||
|
|
||||||
//loop through the array of purchases to display only the items that are purchased
|
//loop through the array of purchases to display only the items that are purchased
|
||||||
usPosY = usGridY+BOBBYR_GRID_FIRST_COLUMN_Y + 4;
|
usPosY = usGridY+BOBBYR_GRID_FIRST_COLUMN_Y + 4;
|
||||||
for(i=0; i<MAX_PURCHASE_AMOUNT; i++)
|
for(i=gubPurchaseAtTopOfList; i<gubPurchaseAtTopOfList + BOBBYR_NUM_DISPLAYED_ITEMS ; i++)
|
||||||
{
|
{
|
||||||
//if the item was purchased
|
//if the item was purchased
|
||||||
// if( BobbyRayPurchases[ i ].ubNumberPurchased )
|
// if( BobbyRayPurchases[ i ].ubNumberPurchased )
|
||||||
@@ -1088,6 +1134,17 @@ void DisplayPurchasedItems( BOOLEAN fCalledFromOrderPage, UINT16 usGridX, UINT16
|
|||||||
|
|
||||||
DrawTextToScreen(sTemp, (UINT16)(usGridX+BOBBYR_GRID_FIFTH_COLUMN_X-2), usPosY, BOBBYR_GRID_FIFTH_COLUMN_WIDTH, BOBBYR_ORDER_DYNAMIC_TEXT_FONT, BOBBYR_ORDER_DYNAMIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
|
DrawTextToScreen(sTemp, (UINT16)(usGridX+BOBBYR_GRID_FIFTH_COLUMN_X-2), usPosY, BOBBYR_GRID_FIFTH_COLUMN_WIDTH, BOBBYR_ORDER_DYNAMIC_TEXT_FONT, BOBBYR_ORDER_DYNAMIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
|
||||||
|
|
||||||
|
usPosY += BOBBYR_GRID_ROW_OFFSET;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
guidivisor = 0;
|
||||||
|
for (i=0;i<gGameExternalOptions.ubBobbyRayMaxPurchaseAmount; i++)
|
||||||
|
{
|
||||||
|
if( pBobbyRayPurchase[i].ubNumberPurchased )
|
||||||
|
{
|
||||||
|
guidivisor++;
|
||||||
|
}
|
||||||
|
uiTotal = CalcBobbyRayCost( pBobbyRayPurchase[i].usItemIndex, pBobbyRayPurchase[i].usBobbyItemIndex, pBobbyRayPurchase[i].fUsed ) * pBobbyRayPurchase[i].ubNumberPurchased;
|
||||||
//add the current item total to the sub total
|
//add the current item total to the sub total
|
||||||
if( fCalledFromOrderPage )
|
if( fCalledFromOrderPage )
|
||||||
{
|
{
|
||||||
@@ -1097,11 +1154,85 @@ void DisplayPurchasedItems( BOOLEAN fCalledFromOrderPage, UINT16 usGridX, UINT16
|
|||||||
{
|
{
|
||||||
iSubTotal += uiTotal;
|
iSubTotal += uiTotal;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
usPosY += BOBBYR_GRID_ROW_OFFSET;
|
if (guidivisor != 0)
|
||||||
|
{
|
||||||
|
if (guidivisor < 11)
|
||||||
|
{
|
||||||
|
guidivisor = 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
guidivisor -= 9;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//Add the scroll list mouse regions
|
||||||
|
ColorFillVideoSurfaceArea( FRAME_BUFFER, usGridX + BOBBYR_GRID_SCROLL_COLUMN_X, usGridY + BOBBYR_GRID_SCROLL_COLUMN_Y, usGridX + BOBBYR_GRID_SCROLL_COLUMN_X+BOBBYR_GRID_SCROLL_COLUMN_WIDTH, usGridY + BOBBYR_GRID_SCROLL_COLUMN_Y + BOBBYR_GRID_SCROLL_COLUMN_HEIGHT, Get16BPPColor( FROMRGB( 0, 0, 0 ) ) );
|
||||||
|
|
||||||
|
pDestBuf = LockVideoSurface( FRAME_BUFFER, &uiDestPitchBYTES );
|
||||||
|
SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||||
|
|
||||||
|
//top
|
||||||
|
LineDraw(FALSE, usGridX + BOBBYR_GRID_SCROLL_COLUMN_X, usGridY + BOBBYR_GRID_SCROLL_COLUMN_Y, usGridX + BOBBYR_GRID_SCROLL_COLUMN_X + BOBBYR_GRID_SCROLL_COLUMN_WIDTH, usGridY + BOBBYR_GRID_SCROLL_COLUMN_Y, Get16BPPColor( FROMRGB( 235, 222, 171 ) ), pDestBuf);
|
||||||
|
//bottom
|
||||||
|
LineDraw(FALSE, usGridX + BOBBYR_GRID_SCROLL_COLUMN_X, usGridY + BOBBYR_GRID_SCROLL_COLUMN_Y + BOBBYR_GRID_SCROLL_COLUMN_HEIGHT, usGridX + BOBBYR_GRID_SCROLL_COLUMN_X + BOBBYR_GRID_SCROLL_COLUMN_WIDTH, usGridY + BOBBYR_GRID_SCROLL_COLUMN_Y+BOBBYR_GRID_SCROLL_COLUMN_HEIGHT, Get16BPPColor( FROMRGB( 235, 222, 171 ) ), pDestBuf);
|
||||||
|
//left
|
||||||
|
LineDraw(FALSE, usGridX + BOBBYR_GRID_SCROLL_COLUMN_X, usGridY + BOBBYR_GRID_SCROLL_COLUMN_Y, usGridX + BOBBYR_GRID_SCROLL_COLUMN_X, usGridY + BOBBYR_GRID_SCROLL_COLUMN_Y + BOBBYR_GRID_SCROLL_COLUMN_HEIGHT, Get16BPPColor( FROMRGB( 235, 222, 171 ) ), pDestBuf);
|
||||||
|
//right
|
||||||
|
LineDraw(FALSE, usGridX + BOBBYR_GRID_SCROLL_COLUMN_X + BOBBYR_GRID_SCROLL_COLUMN_WIDTH, usGridY + BOBBYR_GRID_SCROLL_COLUMN_Y, usGridX + BOBBYR_GRID_SCROLL_COLUMN_X + BOBBYR_GRID_SCROLL_COLUMN_WIDTH, usGridY + BOBBYR_GRID_SCROLL_COLUMN_Y + BOBBYR_GRID_SCROLL_COLUMN_HEIGHT, Get16BPPColor( FROMRGB( 235, 222, 171 ) ), pDestBuf);
|
||||||
|
|
||||||
|
|
||||||
|
// unlock frame buffer
|
||||||
|
UnLockVideoSurface( FRAME_BUFFER );
|
||||||
|
|
||||||
|
//Arrows
|
||||||
|
|
||||||
|
//get and display the up and down arrows
|
||||||
|
GetVideoObject(&hArrowHandle, guiGoldArrowImages);
|
||||||
|
//top arrow
|
||||||
|
BltVideoObject(FRAME_BUFFER, hArrowHandle, 1, usGridX + BOBBYR_GRID_SCROLL_UP_ARROW_X, usGridY + BOBBYR_GRID_SCROLL_UP_ARROW_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
|
//bottom arrow
|
||||||
|
BltVideoObject(FRAME_BUFFER, hArrowHandle, 0, usGridX + BOBBYR_GRID_SCROLL_DOWN_ARROW_X, usGridY + BOBBYR_GRID_SCROLL_DOWN_ARROW_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
|
//Up Arrow
|
||||||
|
if (gfDrawGridArrowMouseRegions == FALSE)
|
||||||
|
{
|
||||||
|
MSYS_DefineRegion( &gSelectedUpDownArrowOnGridScrollAreaRegion[0], usGridX + BOBBYR_GRID_SCROLL_UP_ARROW_X, usGridY + BOBBYR_GRID_SCROLL_UP_ARROW_Y, (UINT16)(usGridX + BOBBYR_GRID_SCROLL_UP_ARROW_X+BOBBYR_SCROLL_ARROW_WIDTH),
|
||||||
|
(UINT16)(usGridY + BOBBYR_GRID_SCROLL_UP_ARROW_Y+BOBBYR_SCROLL_ARROW_HEIGHT), MSYS_PRIORITY_HIGH, CURSOR_WWW, MSYS_NO_CALLBACK, SelectUpDownArrowOnGridScrollAreaRegionCallBack);
|
||||||
|
MSYS_AddRegion(&gSelectedUpDownArrowOnGridScrollAreaRegion[0]);
|
||||||
|
MSYS_SetRegionUserData( &gSelectedUpDownArrowOnGridScrollAreaRegion[ 0 ], 0, 0);
|
||||||
|
MSYS_EnableRegion(&gSelectedUpDownArrowOnGridScrollAreaRegion[0]);
|
||||||
|
//Down Arrow
|
||||||
|
MSYS_DefineRegion( &gSelectedUpDownArrowOnGridScrollAreaRegion[1], usGridX + BOBBYR_GRID_SCROLL_DOWN_ARROW_X, usGridY + BOBBYR_GRID_SCROLL_DOWN_ARROW_Y, (UINT16)(usGridX + BOBBYR_GRID_SCROLL_DOWN_ARROW_X+BOBBYR_SCROLL_ARROW_WIDTH),
|
||||||
|
(UINT16)(usGridY + BOBBYR_GRID_SCROLL_DOWN_ARROW_Y+BOBBYR_SCROLL_ARROW_HEIGHT), MSYS_PRIORITY_HIGH, CURSOR_WWW, MSYS_NO_CALLBACK, SelectUpDownArrowOnGridScrollAreaRegionCallBack);
|
||||||
|
MSYS_AddRegion(&gSelectedUpDownArrowOnGridScrollAreaRegion[1]);
|
||||||
|
MSYS_SetRegionUserData( &gSelectedUpDownArrowOnGridScrollAreaRegion[ 1 ], 0, 1);
|
||||||
|
MSYS_EnableRegion(&gSelectedUpDownArrowOnGridScrollAreaRegion[1]);
|
||||||
|
gfDrawGridArrowMouseRegions = TRUE;
|
||||||
|
}
|
||||||
|
if (guidivisor > 1)
|
||||||
|
{//Scroll Bar
|
||||||
|
usPosX = usGridX + BOBBYR_GRID_SCROLL_COLUMN_X;
|
||||||
|
usPosY = usGridY + BOBBYR_GRID_SCROLL_UP_ARROW_Y + BOBBYR_SCROLL_ARROW_HEIGHT;
|
||||||
|
usHeight = BOBBYR_GRID_SCROLL_COLUMN_HEIGHT_MINUS_ARROWS / guidivisor;
|
||||||
|
gSelectedGridScrollColumnRegion = new MOUSE_REGION[guidivisor];
|
||||||
|
if (gfDrawGridColumnMouseRegion == FALSE)
|
||||||
|
{
|
||||||
|
for(i=0; i<guidivisor; i++)
|
||||||
|
{
|
||||||
|
MSYS_DefineRegion( &gSelectedGridScrollColumnRegion[i], usPosX, usPosY, (UINT16)(usPosX+BOBBYR_SCROLL_ARROW_WIDTH), (UINT16)(usPosY+usHeight), MSYS_PRIORITY_HIGH,
|
||||||
|
CURSOR_WWW, SelectGridScrollColumnMovementCallBack, SelectGridScrollColumnRegionCallBack );
|
||||||
|
MSYS_AddRegion(&gSelectedGridScrollColumnRegion[i]);
|
||||||
|
MSYS_EnableRegion(&gSelectedGridScrollColumnRegion[i]);
|
||||||
|
MSYS_SetRegionUserData( &gSelectedGridScrollColumnRegion[ i ], 0, i);
|
||||||
|
usPosY += usHeight;
|
||||||
|
}
|
||||||
|
gfDrawGridColumnMouseRegion = TRUE;
|
||||||
|
}
|
||||||
|
//Draw the rectangle
|
||||||
|
DrawOrderGoldRectangle( usGridX, usGridY);
|
||||||
|
}
|
||||||
DisplayShippingCosts( fCalledFromOrderPage, iSubTotal, usGridX, usGridY, iOrderNum );
|
DisplayShippingCosts( fCalledFromOrderPage, iSubTotal, usGridX, usGridY, iOrderNum );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1297,7 +1428,7 @@ void SelectConfirmOrderRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
|||||||
RemovePurchasedItemsFromBobbyRayInventory();
|
RemovePurchasedItemsFromBobbyRayInventory();
|
||||||
|
|
||||||
//delete the order
|
//delete the order
|
||||||
memset(&BobbyRayPurchases, 0, sizeof(BobbyRayPurchaseStruct) * MAX_PURCHASE_AMOUNT);
|
memset(&BobbyRayPurchases, 0, sizeof(BobbyRayPurchaseStruct) * gGameExternalOptions.ubBobbyRayMaxPurchaseAmount);
|
||||||
gubSelectedLight = 0;
|
gubSelectedLight = 0;
|
||||||
gfDestroyConfirmGrphiArea = TRUE;
|
gfDestroyConfirmGrphiArea = TRUE;
|
||||||
gubSelectedLight = 0;
|
gubSelectedLight = 0;
|
||||||
@@ -1312,7 +1443,7 @@ void SelectConfirmOrderRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
|||||||
RemovePurchasedItemsFromBobbyRayInventory();
|
RemovePurchasedItemsFromBobbyRayInventory();
|
||||||
|
|
||||||
//delete the order
|
//delete the order
|
||||||
memset(&BobbyRayPurchases, 0, sizeof(BobbyRayPurchaseStruct) * MAX_PURCHASE_AMOUNT);
|
memset(&BobbyRayPurchases, 0, sizeof(BobbyRayPurchaseStruct) * gGameExternalOptions.ubBobbyRayMaxPurchaseAmount);
|
||||||
gubSelectedLight = 0;
|
gubSelectedLight = 0;
|
||||||
gfDestroyConfirmGrphiArea = TRUE;
|
gfDestroyConfirmGrphiArea = TRUE;
|
||||||
gubSelectedLight = 0;
|
gubSelectedLight = 0;
|
||||||
@@ -1515,7 +1646,6 @@ BOOLEAN CreateDestroyBobbyRDropDown( UINT8 ubDropDownAction )
|
|||||||
|
|
||||||
DrawSelectedCity( gbSelectedCity );
|
DrawSelectedCity( gbSelectedCity );
|
||||||
|
|
||||||
|
|
||||||
//display the scroll bars regions
|
//display the scroll bars regions
|
||||||
ColorFillVideoSurfaceArea( FRAME_BUFFER, BOBBYR_SCROLL_AREA_X, BOBBYR_SCROLL_AREA_Y, BOBBYR_SCROLL_AREA_X+BOBBYR_SCROLL_AREA_WIDTH, BOBBYR_SCROLL_AREA_Y+BOBBYR_SCROLL_AREA_HEIGHT, Get16BPPColor( FROMRGB( 0, 0, 0 ) ) );
|
ColorFillVideoSurfaceArea( FRAME_BUFFER, BOBBYR_SCROLL_AREA_X, BOBBYR_SCROLL_AREA_Y, BOBBYR_SCROLL_AREA_X+BOBBYR_SCROLL_AREA_WIDTH, BOBBYR_SCROLL_AREA_Y+BOBBYR_SCROLL_AREA_HEIGHT, Get16BPPColor( FROMRGB( 0, 0, 0 ) ) );
|
||||||
|
|
||||||
@@ -1753,7 +1883,7 @@ void RemovePurchasedItemsFromBobbyRayInventory()
|
|||||||
{
|
{
|
||||||
INT16 i;
|
INT16 i;
|
||||||
|
|
||||||
for(i=0; i<MAX_PURCHASE_AMOUNT; i++)
|
for(i=0; i<gGameExternalOptions.ubBobbyRayMaxPurchaseAmount; i++)
|
||||||
{
|
{
|
||||||
//if the item was purchased
|
//if the item was purchased
|
||||||
if( BobbyRayPurchases[ i ].ubNumberPurchased )
|
if( BobbyRayPurchases[ i ].ubNumberPurchased )
|
||||||
@@ -1788,7 +1918,7 @@ BOOLEAN IsAnythingPurchasedFromBobbyRayPage()
|
|||||||
UINT16 i;
|
UINT16 i;
|
||||||
BOOLEAN fReturnType = FALSE;
|
BOOLEAN fReturnType = FALSE;
|
||||||
|
|
||||||
for(i=0; i<MAX_PURCHASE_AMOUNT; i++)
|
for(i=0; i<gGameExternalOptions.ubBobbyRayMaxPurchaseAmount; i++)
|
||||||
{
|
{
|
||||||
//if the item was purchased
|
//if the item was purchased
|
||||||
if( BobbyRayPurchases[ i ].ubNumberPurchased )
|
if( BobbyRayPurchases[ i ].ubNumberPurchased )
|
||||||
@@ -1985,6 +2115,146 @@ void DrawGoldRectangle( INT8 bCityNum )
|
|||||||
UnLockVideoSurface( FRAME_BUFFER );
|
UnLockVideoSurface( FRAME_BUFFER );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SelectGridScrollColumnMovementCallBack(MOUSE_REGION * pRegion, INT32 reason )
|
||||||
|
{
|
||||||
|
if( reason & MSYS_CALLBACK_REASON_LOST_MOUSE )
|
||||||
|
{
|
||||||
|
pRegion->uiFlags &= (~BUTTON_CLICKED_ON );
|
||||||
|
InvalidateRegion(pRegion->RegionTopLeftX, pRegion->RegionTopLeftY, pRegion->RegionBottomRightX, pRegion->RegionBottomRightY);
|
||||||
|
}
|
||||||
|
else if (reason & MSYS_CALLBACK_REASON_GAIN_MOUSE )
|
||||||
|
{
|
||||||
|
if( gfLeftButtonState )
|
||||||
|
{
|
||||||
|
UINT8 ubPurchaseNumber = (UINT8)MSYS_GetRegionUserData( pRegion, 0 );
|
||||||
|
|
||||||
|
pRegion->uiFlags |= BUTTON_CLICKED_ON ;
|
||||||
|
|
||||||
|
if( ubPurchaseNumber < gubPurchaseAtTopOfList )
|
||||||
|
{
|
||||||
|
gubPurchaseAtTopOfList = ubPurchaseNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( ubPurchaseNumber > gubPurchaseAtTopOfList )
|
||||||
|
{
|
||||||
|
if( ( ubPurchaseNumber - gubPurchaseAtTopOfList ) >= BOBBYR_NUM_DISPLAYED_ITEMS )
|
||||||
|
gubPurchaseAtTopOfList = ubPurchaseNumber - BOBBYR_NUM_DISPLAYED_ITEMS + 1;
|
||||||
|
}
|
||||||
|
gfReDrawBobbyOrder = TRUE;
|
||||||
|
gfBobbyRShipmentsDirty = TRUE;
|
||||||
|
InvalidateRegion(pRegion->RegionTopLeftX, pRegion->RegionTopLeftY, pRegion->RegionBottomRightX, pRegion->RegionBottomRightY);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SelectGridScrollColumnRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
||||||
|
{
|
||||||
|
if (iReason & MSYS_CALLBACK_REASON_INIT)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
else if (iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
||||||
|
{
|
||||||
|
UINT8 ubPurchaseNumber = (UINT8)MSYS_GetRegionUserData( pRegion, 0 );
|
||||||
|
|
||||||
|
if( ubPurchaseNumber < gubPurchaseAtTopOfList )
|
||||||
|
{
|
||||||
|
gubPurchaseAtTopOfList--;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( ubPurchaseNumber > gubPurchaseAtTopOfList )
|
||||||
|
{
|
||||||
|
gubPurchaseAtTopOfList++;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (iReason & MSYS_CALLBACK_REASON_LBUTTON_REPEAT)
|
||||||
|
{
|
||||||
|
UINT8 ubPurchaseNumber = (UINT8)MSYS_GetRegionUserData( pRegion, 0 );
|
||||||
|
|
||||||
|
pRegion->uiFlags |= BUTTON_CLICKED_ON ;
|
||||||
|
|
||||||
|
if( ubPurchaseNumber < gubPurchaseAtTopOfList )
|
||||||
|
{
|
||||||
|
gubPurchaseAtTopOfList--;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( ubPurchaseNumber > gubPurchaseAtTopOfList )
|
||||||
|
{
|
||||||
|
gubPurchaseAtTopOfList++;
|
||||||
|
}
|
||||||
|
|
||||||
|
gfReDrawBobbyOrder = TRUE;
|
||||||
|
gfBobbyRShipmentsDirty = TRUE;
|
||||||
|
InvalidateRegion(pRegion->RegionTopLeftX, pRegion->RegionTopLeftY, pRegion->RegionBottomRightX, pRegion->RegionBottomRightY);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SelectUpDownArrowOnGridScrollAreaRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
||||||
|
{
|
||||||
|
if (iReason & MSYS_CALLBACK_REASON_INIT)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
else if( iReason & MSYS_CALLBACK_REASON_LBUTTON_UP || iReason & MSYS_CALLBACK_REASON_LBUTTON_REPEAT )
|
||||||
|
{
|
||||||
|
UINT8 ubDownArrow = (UINT8)MSYS_GetRegionUserData( pRegion, 0 );
|
||||||
|
|
||||||
|
if( ubDownArrow )
|
||||||
|
{
|
||||||
|
if( gubPurchaseAtTopOfList < guidivisor-1 )
|
||||||
|
{
|
||||||
|
gubPurchaseAtTopOfList++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if( gubPurchaseAtTopOfList > 0 )
|
||||||
|
gubPurchaseAtTopOfList--;
|
||||||
|
|
||||||
|
}
|
||||||
|
gfReDrawBobbyOrder = TRUE;
|
||||||
|
gfBobbyRShipmentsDirty = TRUE;
|
||||||
|
InvalidateRegion(pRegion->RegionTopLeftX, pRegion->RegionTopLeftY, pRegion->RegionBottomRightX, pRegion->RegionBottomRightY);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void DrawOrderGoldRectangle (UINT16 usGridX, UINT16 usGridY)
|
||||||
|
{
|
||||||
|
if (guidivisor == 1) return;
|
||||||
|
UINT32 uiDestPitchBYTES;
|
||||||
|
UINT8 *pDestBuf;
|
||||||
|
UINT16 usWidth, usTempHeight, usTempPosY, usHeight;
|
||||||
|
UINT16 usPosX, usPosY;
|
||||||
|
UINT16 temp;
|
||||||
|
|
||||||
|
usTempPosY = usGridY + BOBBYR_GRID_SCROLL_UP_ARROW_Y + BOBBYR_SCROLL_ARROW_HEIGHT;
|
||||||
|
usPosX = usGridX + BOBBYR_GRID_SCROLL_COLUMN_X + 2;
|
||||||
|
usWidth = BOBBYR_GRID_SCROLL_COLUMN_WIDTH - 5;
|
||||||
|
usTempHeight = ( BOBBYR_GRID_SCROLL_COLUMN_HEIGHT - 2 * BOBBYR_SCROLL_ARROW_HEIGHT );
|
||||||
|
|
||||||
|
usHeight = usTempHeight / guidivisor;
|
||||||
|
|
||||||
|
usPosY = usTempPosY + (UINT16)( ( ( BOBBYR_GRID_SCROLL_COLUMN_HEIGHT - 2 * BOBBYR_SCROLL_ARROW_HEIGHT ) / (FLOAT)(guidivisor) ) * gubPurchaseAtTopOfList );
|
||||||
|
|
||||||
|
temp = usGridY + BOBBYR_GRID_SCROLL_COLUMN_Y + BOBBYR_GRID_SCROLL_COLUMN_HEIGHT - BOBBYR_SCROLL_ARROW_HEIGHT - usHeight - 1;
|
||||||
|
|
||||||
|
if( usPosY >= temp )
|
||||||
|
usPosY = usGridY + BOBBYR_GRID_SCROLL_COLUMN_Y + BOBBYR_GRID_SCROLL_COLUMN_HEIGHT - BOBBYR_SCROLL_ARROW_HEIGHT - usHeight - 5;
|
||||||
|
|
||||||
|
ColorFillVideoSurfaceArea( FRAME_BUFFER, usPosX, usPosY, usPosX+usWidth, usPosY+usHeight, Get16BPPColor( FROMRGB( 186, 165, 68 ) ) );
|
||||||
|
|
||||||
|
//display the line
|
||||||
|
pDestBuf = LockVideoSurface( FRAME_BUFFER, &uiDestPitchBYTES );
|
||||||
|
SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||||
|
|
||||||
|
// draw the shadow line around the rectangle
|
||||||
|
LineDraw(FALSE, usPosX, usPosY, usPosX+usWidth, usPosY, Get16BPPColor( FROMRGB( 65, 49, 6) ), pDestBuf);
|
||||||
|
LineDraw(FALSE, usPosX, usPosY, usPosX, usPosY+usHeight, Get16BPPColor( FROMRGB( 65, 49, 6 ) ), pDestBuf);
|
||||||
|
LineDraw(FALSE, usPosX, usPosY+usHeight, usPosX+usWidth, usPosY+usHeight, Get16BPPColor( FROMRGB( 65, 49, 6 ) ), pDestBuf);
|
||||||
|
LineDraw(FALSE, usPosX+usWidth, usPosY, usPosX+usWidth, usPosY+usHeight, Get16BPPColor( FROMRGB( 65, 49, 6 ) ), pDestBuf);
|
||||||
|
|
||||||
|
// unlock frame buffer
|
||||||
|
UnLockVideoSurface( FRAME_BUFFER );
|
||||||
|
}
|
||||||
|
|
||||||
UINT32 CalcCostFromWeightOfPackage( UINT8 ubTypeOfService )
|
UINT32 CalcCostFromWeightOfPackage( UINT8 ubTypeOfService )
|
||||||
{
|
{
|
||||||
@@ -2001,7 +2271,7 @@ UINT32 CalcCostFromWeightOfPackage( UINT8 ubTypeOfService )
|
|||||||
//Get the package's weight
|
//Get the package's weight
|
||||||
uiTotalWeight = CalcPackageTotalWeight();
|
uiTotalWeight = CalcPackageTotalWeight();
|
||||||
|
|
||||||
/* for(i=0; i<MAX_PURCHASE_AMOUNT; i++)
|
/* for(i=0; i<gGameExternalOptions.ubBobbyRayMaxPurchaseAmount; i++)
|
||||||
{
|
{
|
||||||
//if the item was purchased
|
//if the item was purchased
|
||||||
if( BobbyRayPurchases[ i ].ubNumberPurchased )
|
if( BobbyRayPurchases[ i ].ubNumberPurchased )
|
||||||
@@ -2145,7 +2415,7 @@ void PurchaseBobbyOrder()
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
ubCount = 0;
|
ubCount = 0;
|
||||||
for(i=0; i<MAX_PURCHASE_AMOUNT; i++)
|
for(i=0; i<gGameExternalOptions.ubBobbyRayMaxPurchaseAmount; i++)
|
||||||
{
|
{
|
||||||
//if the item was purchased
|
//if the item was purchased
|
||||||
if( BobbyRayPurchases[ i ].ubNumberPurchased )
|
if( BobbyRayPurchases[ i ].ubNumberPurchased )
|
||||||
@@ -2192,12 +2462,12 @@ void PurchaseBobbyOrder()
|
|||||||
|
|
||||||
void AddJohnsGunShipment()
|
void AddJohnsGunShipment()
|
||||||
{
|
{
|
||||||
BobbyRayPurchaseStruct Temp[ MAX_PURCHASE_AMOUNT ];
|
BobbyRayPurchaseStruct Temp[ 100 ];
|
||||||
// UINT8 cnt;
|
// UINT8 cnt;
|
||||||
INT8 bDaysAhead;
|
INT8 bDaysAhead;
|
||||||
|
|
||||||
//clear out the memory
|
//clear out the memory
|
||||||
memset( Temp, 0, sizeof( BobbyRayPurchaseStruct ) * MAX_PURCHASE_AMOUNT );
|
memset( Temp, 0, sizeof( BobbyRayPurchaseStruct ) * gGameExternalOptions.ubBobbyRayMaxPurchaseAmount );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
//if we need to add more array elements for the Order Array
|
//if we need to add more array elements for the Order Array
|
||||||
@@ -2279,7 +2549,7 @@ void ConfirmBobbyRPurchaseMessageBoxCallBack( UINT8 bExitValue )
|
|||||||
|
|
||||||
void EnterInitBobbyRayOrder()
|
void EnterInitBobbyRayOrder()
|
||||||
{
|
{
|
||||||
memset(&BobbyRayPurchases, 0, sizeof(BobbyRayPurchaseStruct) * MAX_PURCHASE_AMOUNT);
|
memset(&BobbyRayPurchases, 0, sizeof(BobbyRayPurchaseStruct) * gGameExternalOptions.ubBobbyRayMaxPurchaseAmount);
|
||||||
|
|
||||||
if (is_networked)
|
if (is_networked)
|
||||||
gubSelectedLight = 2; //hayden
|
gubSelectedLight = 2; //hayden
|
||||||
@@ -2295,6 +2565,9 @@ void EnterInitBobbyRayOrder()
|
|||||||
|
|
||||||
gubCityAtTopOfList = 0;
|
gubCityAtTopOfList = 0;
|
||||||
|
|
||||||
|
gfDrawGridArrowMouseRegions = FALSE;
|
||||||
|
gfDrawGridColumnMouseRegion = FALSE;
|
||||||
|
gubPurchaseAtTopOfList = 0;
|
||||||
//Get rid of the city drop dowm, if it is being displayed
|
//Get rid of the city drop dowm, if it is being displayed
|
||||||
gubDropDownAction = BR_DROP_DOWN_DESTROY;
|
gubDropDownAction = BR_DROP_DOWN_DESTROY;
|
||||||
|
|
||||||
@@ -2309,7 +2582,7 @@ UINT32 CalcPackageTotalWeight()
|
|||||||
UINT32 uiTotalWeight=0;
|
UINT32 uiTotalWeight=0;
|
||||||
|
|
||||||
//loop through all the packages
|
//loop through all the packages
|
||||||
for(i=0; i<MAX_PURCHASE_AMOUNT; i++)
|
for(i=0; i<gGameExternalOptions.ubBobbyRayMaxPurchaseAmount; i++)
|
||||||
{
|
{
|
||||||
//if the item was purchased
|
//if the item was purchased
|
||||||
if( BobbyRayPurchases[ i ].ubNumberPurchased )
|
if( BobbyRayPurchases[ i ].ubNumberPurchased )
|
||||||
@@ -2454,7 +2727,7 @@ BOOLEAN AddNewBobbyRShipment( BobbyRayPurchaseStruct *pPurchaseStruct, UINT8 ubD
|
|||||||
|
|
||||||
//count the number of purchases
|
//count the number of purchases
|
||||||
ubItemCount = 0;
|
ubItemCount = 0;
|
||||||
for(i=0; i<MAX_PURCHASE_AMOUNT; i++)
|
for(i=0; i<gGameExternalOptions.ubBobbyRayMaxPurchaseAmount; i++)
|
||||||
{
|
{
|
||||||
//if the item was purchased
|
//if the item was purchased
|
||||||
if( pPurchaseStruct[ i ].ubNumberPurchased )
|
if( pPurchaseStruct[ i ].ubNumberPurchased )
|
||||||
@@ -2503,7 +2776,7 @@ BOOLEAN AddNewBobbyRShipment( BobbyRayPurchaseStruct *pPurchaseStruct, UINT16 us
|
|||||||
else
|
else
|
||||||
usID = gPostalService.CreateNewShipment(usDeliveryLoc, 2, JOHN_KULBA_SENDER_ID);
|
usID = gPostalService.CreateNewShipment(usDeliveryLoc, 2, JOHN_KULBA_SENDER_ID);
|
||||||
|
|
||||||
for(int i=0; i < MAX_PURCHASE_AMOUNT && pPurchaseStruct[i].usItemIndex > 0; i++)
|
for(int i=0; i < gGameExternalOptions.ubBobbyRayMaxPurchaseAmount && pPurchaseStruct[i].usItemIndex > 0; i++)
|
||||||
{
|
{
|
||||||
gPostalService.AddPackageToShipment(usID, pPurchaseStruct[i].usItemIndex, pPurchaseStruct[i].ubNumberPurchased, pPurchaseStruct[i].bItemQuality);
|
gPostalService.AddPackageToShipment(usID, pPurchaseStruct[i].usItemIndex, pPurchaseStruct[i].ubNumberPurchased, pPurchaseStruct[i].bItemQuality);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ typedef struct
|
|||||||
BOOLEAN fActive;
|
BOOLEAN fActive;
|
||||||
UINT8 ubDeliveryLoc; // the city the shipment is going to
|
UINT8 ubDeliveryLoc; // the city the shipment is going to
|
||||||
UINT8 ubDeliveryMethod; // type of delivery: next day, 2 days ...
|
UINT8 ubDeliveryMethod; // type of delivery: next day, 2 days ...
|
||||||
BobbyRayPurchaseStruct BobbyRayPurchase[ MAX_PURCHASE_AMOUNT ];
|
BobbyRayPurchaseStruct BobbyRayPurchase[ 100 ];
|
||||||
UINT8 ubNumberPurchases;
|
UINT8 ubNumberPurchases;
|
||||||
|
|
||||||
UINT32 uiPackageWeight;
|
UINT32 uiPackageWeight;
|
||||||
|
|||||||
+56
-11
@@ -69,8 +69,14 @@
|
|||||||
//#define BOBBYR_SHIPMENT_
|
//#define BOBBYR_SHIPMENT_
|
||||||
|
|
||||||
|
|
||||||
|
extern UINT8 gubPurchaseAtTopOfList;
|
||||||
|
extern BOOLEAN gfDrawGridArrowMouseRegions;
|
||||||
|
extern BOOLEAN gfDrawGridColumnMouseRegion;
|
||||||
|
extern MOUSE_REGION gSelectedUpDownArrowOnGridScrollAreaRegion[2];
|
||||||
|
extern void SelectUpDownArrowOnGridScrollAreaRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
|
extern MOUSE_REGION *gSelectedGridScrollColumnRegion;
|
||||||
|
extern void SelectGridScrollColumnRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
|
extern void SelectGridScrollColumnMovementCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
|
|
||||||
UINT32 guiBobbyRShipmentGrid;
|
UINT32 guiBobbyRShipmentGrid;
|
||||||
|
|
||||||
@@ -107,8 +113,8 @@ INT32 CountNumberValidShipmentForTheShipmentsPage();
|
|||||||
//ppp
|
//ppp
|
||||||
extern CPostalService gPostalService;
|
extern CPostalService gPostalService;
|
||||||
extern vector<PShipmentStruct> gShipmentTable;
|
extern vector<PShipmentStruct> gShipmentTable;
|
||||||
|
extern UINT32 guiGoldArrowImages;
|
||||||
|
extern UINT32 guiBobbyROrderGrid;
|
||||||
//
|
//
|
||||||
// Function
|
// Function
|
||||||
//
|
//
|
||||||
@@ -130,6 +136,10 @@ BOOLEAN EnterBobbyRShipments()
|
|||||||
FilenameForBPP("LAPTOP\\BobbyRay_OnOrder.sti", VObjectDesc.ImageFile);
|
FilenameForBPP("LAPTOP\\BobbyRay_OnOrder.sti", VObjectDesc.ImageFile);
|
||||||
CHECKF(AddVideoObject(&VObjectDesc, &guiBobbyRShipmentGrid));
|
CHECKF(AddVideoObject(&VObjectDesc, &guiBobbyRShipmentGrid));
|
||||||
|
|
||||||
|
// Gold Arrow for the scroll area
|
||||||
|
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
||||||
|
FilenameForBPP( "LAPTOP\\GoldArrows.sti", VObjectDesc.ImageFile );
|
||||||
|
CHECKF( AddVideoObject( &VObjectDesc, &guiGoldArrowImages ) );
|
||||||
|
|
||||||
guiBobbyRShipmentBackImage = LoadButtonImage("LAPTOP\\CatalogueButton.sti", -1,0,-1,1,-1 );
|
guiBobbyRShipmentBackImage = LoadButtonImage("LAPTOP\\CatalogueButton.sti", -1,0,-1,1,-1 );
|
||||||
guiBobbyRShipmetBack = CreateIconAndTextButton( guiBobbyRShipmentBackImage, BobbyROrderFormText[BOBBYR_BACK], BOBBYR_GUNS_BUTTON_FONT,
|
guiBobbyRShipmetBack = CreateIconAndTextButton( guiBobbyRShipmentBackImage, BobbyROrderFormText[BOBBYR_BACK], BOBBYR_GUNS_BUTTON_FONT,
|
||||||
@@ -153,6 +163,7 @@ BOOLEAN EnterBobbyRShipments()
|
|||||||
CreateBobbyRayOrderTitle();
|
CreateBobbyRayOrderTitle();
|
||||||
|
|
||||||
giBobbyRShipmentSelectedShipment = -1;
|
giBobbyRShipmentSelectedShipment = -1;
|
||||||
|
gubPurchaseAtTopOfList = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
//if there are shipments
|
//if there are shipments
|
||||||
@@ -194,7 +205,20 @@ BOOLEAN EnterBobbyRShipments()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (gfDrawGridArrowMouseRegions == TRUE)
|
||||||
|
{
|
||||||
|
MSYS_DisableRegion( &gSelectedUpDownArrowOnGridScrollAreaRegion[0]);
|
||||||
|
MSYS_DisableRegion( &gSelectedUpDownArrowOnGridScrollAreaRegion[1]);
|
||||||
|
MSYS_RemoveRegion( &gSelectedUpDownArrowOnGridScrollAreaRegion[0]);
|
||||||
|
MSYS_RemoveRegion( &gSelectedUpDownArrowOnGridScrollAreaRegion[1]);
|
||||||
|
gfDrawGridArrowMouseRegions = FALSE;
|
||||||
|
}
|
||||||
|
if (gfDrawGridColumnMouseRegion == TRUE)
|
||||||
|
{
|
||||||
|
MSYS_DisableRegion( gSelectedGridScrollColumnRegion);
|
||||||
|
MSYS_RemoveRegion( gSelectedGridScrollColumnRegion);
|
||||||
|
gfDrawGridColumnMouseRegion = FALSE;
|
||||||
|
}
|
||||||
CreatePreviousShipmentsMouseRegions();
|
CreatePreviousShipmentsMouseRegions();
|
||||||
|
|
||||||
return( TRUE );
|
return( TRUE );
|
||||||
@@ -206,6 +230,7 @@ void ExitBobbyRShipments()
|
|||||||
DestroyBobbyROrderTitle();
|
DestroyBobbyROrderTitle();
|
||||||
|
|
||||||
DeleteVideoObjectFromIndex(guiBobbyRShipmentGrid);
|
DeleteVideoObjectFromIndex(guiBobbyRShipmentGrid);
|
||||||
|
DeleteVideoObjectFromIndex(guiGoldArrowImages);
|
||||||
|
|
||||||
UnloadButtonImage( guiBobbyRShipmentBackImage );
|
UnloadButtonImage( guiBobbyRShipmentBackImage );
|
||||||
UnloadButtonImage( giBobbyRShipmentHomeImage );
|
UnloadButtonImage( giBobbyRShipmentHomeImage );
|
||||||
@@ -213,6 +238,20 @@ void ExitBobbyRShipments()
|
|||||||
RemoveButton( guiBobbyRShipmentHome );
|
RemoveButton( guiBobbyRShipmentHome );
|
||||||
|
|
||||||
RemovePreviousShipmentsMouseRegions();
|
RemovePreviousShipmentsMouseRegions();
|
||||||
|
if (gfDrawGridArrowMouseRegions == TRUE)
|
||||||
|
{
|
||||||
|
MSYS_DisableRegion( &gSelectedUpDownArrowOnGridScrollAreaRegion[0]);
|
||||||
|
MSYS_DisableRegion( &gSelectedUpDownArrowOnGridScrollAreaRegion[1]);
|
||||||
|
MSYS_RemoveRegion( &gSelectedUpDownArrowOnGridScrollAreaRegion[0]);
|
||||||
|
MSYS_RemoveRegion( &gSelectedUpDownArrowOnGridScrollAreaRegion[1]);
|
||||||
|
gfDrawGridArrowMouseRegions = FALSE;
|
||||||
|
}
|
||||||
|
if (gfDrawGridColumnMouseRegion == TRUE)
|
||||||
|
{
|
||||||
|
MSYS_DisableRegion( gSelectedGridScrollColumnRegion);
|
||||||
|
MSYS_RemoveRegion( gSelectedGridScrollColumnRegion);
|
||||||
|
gfDrawGridColumnMouseRegion = FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void HandleBobbyRShipments()
|
void HandleBobbyRShipments()
|
||||||
@@ -230,8 +269,8 @@ void RenderBobbyRShipments()
|
|||||||
// HVOBJECT hPixHandle;
|
// HVOBJECT hPixHandle;
|
||||||
|
|
||||||
// Dealtar: this must be static as this is accessed after this function has returned
|
// Dealtar: this must be static as this is accessed after this function has returned
|
||||||
static BobbyRayPurchaseStruct brps[MAX_PURCHASE_AMOUNT];
|
static BobbyRayPurchaseStruct brps[100];
|
||||||
for(int i = 0; i < MAX_PURCHASE_AMOUNT; i++)
|
for(int i = 0; i < 100; i++) //JMich
|
||||||
{
|
{
|
||||||
memset(&brps[i], 0, sizeof(BobbyRayPurchaseStruct));
|
memset(&brps[i], 0, sizeof(BobbyRayPurchaseStruct));
|
||||||
}
|
}
|
||||||
@@ -363,15 +402,20 @@ void BtnBobbyRShipmentHomeCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
|
|
||||||
void DisplayShipmentGrid()
|
void DisplayShipmentGrid()
|
||||||
{
|
{
|
||||||
HVOBJECT hPixHandle;
|
HVOBJECT hPixHandle, hPixGrid;
|
||||||
|
VOBJECT_DESC VObjectDesc;
|
||||||
GetVideoObject(&hPixHandle, guiBobbyRShipmentGrid);
|
GetVideoObject(&hPixHandle, guiBobbyRShipmentGrid);
|
||||||
|
|
||||||
// Shipment Order Grid
|
// Shipment Order Grid
|
||||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, BOBBYR_SHIPMENT_DELIVERY_GRID_X, BOBBYR_SHIPMENT_DELIVERY_GRID_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, BOBBYR_SHIPMENT_DELIVERY_GRID_X, BOBBYR_SHIPMENT_DELIVERY_GRID_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
|
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||||
|
FilenameForBPP("LAPTOP\\BobbyOrderGrid.sti", VObjectDesc.ImageFile);
|
||||||
|
AddVideoObject(&VObjectDesc, &guiBobbyROrderGrid);
|
||||||
|
GetVideoObject(&hPixGrid, guiBobbyROrderGrid);
|
||||||
|
BltVideoObject(FRAME_BUFFER, hPixGrid, 0, BOBBYR_SHIPMENT_ORDER_GRID_X, BOBBYR_SHIPMENT_ORDER_GRID_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
// Order Grid
|
// Order Grid
|
||||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 1, BOBBYR_SHIPMENT_ORDER_GRID_X, BOBBYR_SHIPMENT_ORDER_GRID_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
//BltVideoObject(FRAME_BUFFER, hPixGrid, 0, BOBBYR_SHIPMENT_ORDER_GRID_X, BOBBYR_SHIPMENT_ORDER_GRID_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -497,6 +541,7 @@ void SelectPreviousShipmentsRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason
|
|||||||
}
|
}
|
||||||
else if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
else if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
||||||
{
|
{
|
||||||
|
gubPurchaseAtTopOfList = 0;
|
||||||
INT32 iSlotID = MSYS_GetRegionUserData( pRegion, 0 );
|
INT32 iSlotID = MSYS_GetRegionUserData( pRegion, 0 );
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -426,7 +426,7 @@ void GetPlayerKeyBoardInputForBriefingRoomHomePage( void )
|
|||||||
GetCursorPos(&MousePos);
|
GetCursorPos(&MousePos);
|
||||||
ScreenToClient(ghWindow, &MousePos); // In window coords!
|
ScreenToClient(ghWindow, &MousePos); // In window coords!
|
||||||
|
|
||||||
while (DequeueEvent(&InputEvent) == TRUE)
|
while (DequeueSpecificEvent(&InputEvent, KEY_DOWN|KEY_UP|KEY_REPEAT))
|
||||||
{
|
{
|
||||||
// HOOK INTO MOUSE HOOKS
|
// HOOK INTO MOUSE HOOKS
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -493,7 +493,7 @@ void GetPlayerKeyBoardInputForBriefingRoomEnterHomePage( void )
|
|||||||
GetCursorPos(&MousePos);
|
GetCursorPos(&MousePos);
|
||||||
ScreenToClient(ghWindow, &MousePos); // In window coords!
|
ScreenToClient(ghWindow, &MousePos); // In window coords!
|
||||||
|
|
||||||
while (DequeueEvent(&InputEvent) == TRUE)
|
while (DequeueSpecificEvent(&InputEvent, KEY_DOWN|KEY_UP|KEY_REPEAT))
|
||||||
{
|
{
|
||||||
// HOOK INTO MOUSE HOOKS
|
// HOOK INTO MOUSE HOOKS
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -56,8 +56,9 @@ BOOLEAN ResetVal = FALSE;
|
|||||||
UINT32 IDPageEncyData;
|
UINT32 IDPageEncyData;
|
||||||
void InitData ( BOOLEAN bInit );
|
void InitData ( BOOLEAN bInit );
|
||||||
|
|
||||||
#define ENCYCLOPEDIA_LOCATION_PAGE1_X LAPTOP_SCREEN_UL_X + 100
|
#define ENCYCLOPEDIA_LOCATION_PAGE1_X (LAPTOP_SCREEN_UL_X + 100)
|
||||||
#define ENCYCLOPEDIA_LOCATION_PAGE1_Y LAPTOP_SCREEN_WEB_UL_Y + 357
|
#define ENCYCLOPEDIA_LOCATION_PAGE1_Y (LAPTOP_SCREEN_WEB_UL_Y + 357)
|
||||||
|
#define ENCYCLOPEDIA_LOCATION_FILTER_Y (LAPTOP_SCREEN_WEB_UL_Y + 10)
|
||||||
#define ENCYCLOPEDIA_LOCATION_PAGE_COLOR_UP FONT_MCOLOR_DKWHITE
|
#define ENCYCLOPEDIA_LOCATION_PAGE_COLOR_UP FONT_MCOLOR_DKWHITE
|
||||||
#define ENCYCLOPEDIA_LOCATION_PAGE_COLOR_DOWN 138
|
#define ENCYCLOPEDIA_LOCATION_PAGE_COLOR_DOWN 138
|
||||||
#define ENCYCLOPEDIA_LOCATION_PAGE_FONT FONT10ARIAL
|
#define ENCYCLOPEDIA_LOCATION_PAGE_FONT FONT10ARIAL
|
||||||
@@ -708,7 +709,7 @@ void InitSoundButtons()
|
|||||||
UINT16 usPosY, i;
|
UINT16 usPosY, i;
|
||||||
guiSoundButtonsImage = LoadButtonImage("BriefingRoom\\BUTTONF.sti", -1,0,-1,1,-1 );
|
guiSoundButtonsImage = LoadButtonImage("BriefingRoom\\BUTTONF.sti", -1,0,-1,1,-1 );
|
||||||
|
|
||||||
usPosY = ENCYCLOPEDIA_LOCATION_PAGE1_X+15;
|
usPosY = ENCYCLOPEDIA_LOCATION_FILTER_Y;
|
||||||
for(i=0; i<MAX_MISSION_BUTTONS; i++)
|
for(i=0; i<MAX_MISSION_BUTTONS; i++)
|
||||||
{
|
{
|
||||||
guiSoundButtons[i] = CreateIconAndTextButton( guiSoundButtonsImage, pOtherButtonsText[i], ENCYCLOPEDIA_LOCATION_PAGE_FONT,
|
guiSoundButtons[i] = CreateIconAndTextButton( guiSoundButtonsImage, pOtherButtonsText[i], ENCYCLOPEDIA_LOCATION_PAGE_FONT,
|
||||||
@@ -728,17 +729,19 @@ void InitSoundButtons()
|
|||||||
|
|
||||||
void InitLocationFiltrButtons()
|
void InitLocationFiltrButtons()
|
||||||
{
|
{
|
||||||
UINT16 usPosY, i;
|
UINT16 usPosX, usPosY, i;
|
||||||
guiFiltrPageButtonImage = LoadButtonImage("ENCYCLOPEDIA\\BUTTONF.sti", -1,0,-1,1,-1 );
|
guiFiltrPageButtonImage = LoadButtonImage("ENCYCLOPEDIA\\BUTTONF.sti", -1,0,-1,1,-1 );
|
||||||
|
|
||||||
usPosY = ENCYCLOPEDIA_LOCATION_PAGE1_X+10;
|
usPosX = ENCYCLOPEDIA_LOCATION_PAGE1_X-92;
|
||||||
|
usPosY = ENCYCLOPEDIA_LOCATION_FILTER_Y;
|
||||||
|
|
||||||
for(i=0; i<MAX_FILTR_LOCATION_BUTTONS; i++)
|
for(i=0; i<MAX_FILTR_LOCATION_BUTTONS; i++)
|
||||||
{
|
{
|
||||||
guiFiltrPageButton[i] = CreateIconAndTextButton( guiFiltrPageButtonImage, pEncyclopediaSkrotyText[i], ENCYCLOPEDIA_LOCATION_PAGE_FONT,
|
guiFiltrPageButton[i] = CreateIconAndTextButton( guiFiltrPageButtonImage, pEncyclopediaSkrotyText[i], ENCYCLOPEDIA_LOCATION_PAGE_FONT,
|
||||||
ENCYCLOPEDIA_LOCATION_PAGE_COLOR_UP, DEFAULT_SHADOW,
|
ENCYCLOPEDIA_LOCATION_PAGE_COLOR_UP, DEFAULT_SHADOW,
|
||||||
ENCYCLOPEDIA_LOCATION_PAGE_COLOR_DOWN, DEFAULT_SHADOW,
|
ENCYCLOPEDIA_LOCATION_PAGE_COLOR_DOWN, DEFAULT_SHADOW,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
ENCYCLOPEDIA_LOCATION_PAGE1_X-92, usPosY, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
usPosX, usPosY, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
DEFAULT_MOVE_CALLBACK, SelectFiltrButtonsRegionCallBack);
|
DEFAULT_MOVE_CALLBACK, SelectFiltrButtonsRegionCallBack);
|
||||||
SetButtonCursor(guiFiltrPageButton[i], CURSOR_WWW);
|
SetButtonCursor(guiFiltrPageButton[i], CURSOR_WWW);
|
||||||
MSYS_SetBtnUserData( guiFiltrPageButton[i], 0, i);
|
MSYS_SetBtnUserData( guiFiltrPageButton[i], 0, i);
|
||||||
@@ -751,17 +754,19 @@ void InitLocationFiltrButtons()
|
|||||||
|
|
||||||
void InitCharacterFiltrButtons()
|
void InitCharacterFiltrButtons()
|
||||||
{
|
{
|
||||||
UINT16 usPosY, i;
|
UINT16 usPosX, usPosY, i;
|
||||||
guiFiltrPageButtonImage = LoadButtonImage("ENCYCLOPEDIA\\BUTTONF.sti", -1,0,-1,1,-1 );
|
guiFiltrPageButtonImage = LoadButtonImage("ENCYCLOPEDIA\\BUTTONF.sti", -1,0,-1,1,-1 );
|
||||||
|
|
||||||
usPosY = ENCYCLOPEDIA_LOCATION_PAGE1_X+15;
|
usPosX = ENCYCLOPEDIA_LOCATION_PAGE1_X-92;
|
||||||
|
usPosY = ENCYCLOPEDIA_LOCATION_FILTER_Y;
|
||||||
|
|
||||||
for(i=0; i<FILTR_BUTTONS_CHARACTER; i++)
|
for(i=0; i<FILTR_BUTTONS_CHARACTER; i++)
|
||||||
{
|
{
|
||||||
guiFiltrPageButton[i] = CreateIconAndTextButton( guiFiltrPageButtonImage, pEncyclopediaShortCharacterText[i], ENCYCLOPEDIA_LOCATION_PAGE_FONT,
|
guiFiltrPageButton[i] = CreateIconAndTextButton( guiFiltrPageButtonImage, pEncyclopediaShortCharacterText[i], ENCYCLOPEDIA_LOCATION_PAGE_FONT,
|
||||||
ENCYCLOPEDIA_LOCATION_PAGE_COLOR_UP, DEFAULT_SHADOW,
|
ENCYCLOPEDIA_LOCATION_PAGE_COLOR_UP, DEFAULT_SHADOW,
|
||||||
ENCYCLOPEDIA_LOCATION_PAGE_COLOR_DOWN, DEFAULT_SHADOW,
|
ENCYCLOPEDIA_LOCATION_PAGE_COLOR_DOWN, DEFAULT_SHADOW,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
ENCYCLOPEDIA_LOCATION_PAGE1_X-92, usPosY, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
usPosX, usPosY, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
DEFAULT_MOVE_CALLBACK, SelectFiltrButtonsRegionCallBack);
|
DEFAULT_MOVE_CALLBACK, SelectFiltrButtonsRegionCallBack);
|
||||||
SetButtonCursor(guiFiltrPageButton[i], CURSOR_WWW);
|
SetButtonCursor(guiFiltrPageButton[i], CURSOR_WWW);
|
||||||
MSYS_SetBtnUserData( guiFiltrPageButton[i], 0, i);
|
MSYS_SetBtnUserData( guiFiltrPageButton[i], 0, i);
|
||||||
@@ -776,17 +781,19 @@ void InitCharacterFiltrButtons()
|
|||||||
|
|
||||||
void InitInventoryFiltrButtons()
|
void InitInventoryFiltrButtons()
|
||||||
{
|
{
|
||||||
UINT16 usPosY, i;
|
UINT16 usPosX, usPosY, i;
|
||||||
guiFiltrInventoryButtonImage = LoadButtonImage("ENCYCLOPEDIA\\BUTTONF.sti", -1,0,-1,1,-1 );
|
guiFiltrInventoryButtonImage = LoadButtonImage("ENCYCLOPEDIA\\BUTTONF.sti", -1,0,-1,1,-1 );
|
||||||
|
|
||||||
usPosY = ENCYCLOPEDIA_LOCATION_PAGE1_X+15;
|
usPosX = ENCYCLOPEDIA_LOCATION_PAGE1_X-92;
|
||||||
|
usPosY = ENCYCLOPEDIA_LOCATION_FILTER_Y;
|
||||||
|
|
||||||
for(i=0; i<FILTR_INVENTORY_BUTTONS; i++)
|
for(i=0; i<FILTR_INVENTORY_BUTTONS; i++)
|
||||||
{
|
{
|
||||||
guiFiltrInventoryButton[i] = CreateIconAndTextButton( guiFiltrInventoryButtonImage, pEncyclopediaShortInventoryText[i], ENCYCLOPEDIA_LOCATION_PAGE_FONT,
|
guiFiltrInventoryButton[i] = CreateIconAndTextButton( guiFiltrInventoryButtonImage, pEncyclopediaShortInventoryText[i], ENCYCLOPEDIA_LOCATION_PAGE_FONT,
|
||||||
ENCYCLOPEDIA_LOCATION_PAGE_COLOR_UP, DEFAULT_SHADOW,
|
ENCYCLOPEDIA_LOCATION_PAGE_COLOR_UP, DEFAULT_SHADOW,
|
||||||
ENCYCLOPEDIA_LOCATION_PAGE_COLOR_DOWN, DEFAULT_SHADOW,
|
ENCYCLOPEDIA_LOCATION_PAGE_COLOR_DOWN, DEFAULT_SHADOW,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
ENCYCLOPEDIA_LOCATION_PAGE1_X-92, usPosY, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
usPosX, usPosY, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
DEFAULT_MOVE_CALLBACK, SelectFiltrButtonsRegionCallBack);
|
DEFAULT_MOVE_CALLBACK, SelectFiltrButtonsRegionCallBack);
|
||||||
SetButtonCursor(guiFiltrInventoryButton[i], CURSOR_WWW);
|
SetButtonCursor(guiFiltrInventoryButton[i], CURSOR_WWW);
|
||||||
MSYS_SetBtnUserData( guiFiltrInventoryButton[i], 0, i);
|
MSYS_SetBtnUserData( guiFiltrInventoryButton[i], 0, i);
|
||||||
@@ -800,27 +807,28 @@ void InitInventoryFiltrButtons()
|
|||||||
//Add inventory buttons
|
//Add inventory buttons
|
||||||
void InitAddInventoryFiltrButtons( UINT32 Butons, UINT32 Type, BOOLEAN bDisableButton)
|
void InitAddInventoryFiltrButtons( UINT32 Butons, UINT32 Type, BOOLEAN bDisableButton)
|
||||||
{
|
{
|
||||||
UINT16 usPosY,i,iHelp;
|
UINT16 usPosX, usPosY,i,iHelp;
|
||||||
guiFiltrAddInventoryButtonImage = LoadButtonImage("ENCYCLOPEDIA\\BUTTONF.sti", -1,0,-1,1,-1 );
|
guiFiltrAddInventoryButtonImage = LoadButtonImage("ENCYCLOPEDIA\\BUTTONF.sti", -1,0,-1,1,-1 );
|
||||||
|
|
||||||
//ButtonsID = Butons;
|
//ButtonsID = Butons;
|
||||||
|
|
||||||
usPosY = ENCYCLOPEDIA_LOCATION_PAGE1_X-30;
|
usPosX = ENCYCLOPEDIA_LOCATION_PAGE1_X-40;
|
||||||
|
usPosY = ENCYCLOPEDIA_LOCATION_PAGE1_Y+22;
|
||||||
|
|
||||||
for(i=0; i<Butons; i++)
|
for(i=0; i<Butons; i++)
|
||||||
{
|
{
|
||||||
|
iHelp = i + Type;
|
||||||
iHelp = i + Type;
|
|
||||||
|
|
||||||
guiFiltrAddInventoryButton[i] = CreateIconAndTextButton( guiFiltrAddInventoryButtonImage, BoxFilter[iHelp], ENCYCLOPEDIA_LOCATION_PAGE_FONT,
|
guiFiltrAddInventoryButton[i] = CreateIconAndTextButton( guiFiltrAddInventoryButtonImage, BoxFilter[iHelp], ENCYCLOPEDIA_LOCATION_PAGE_FONT,
|
||||||
ENCYCLOPEDIA_LOCATION_PAGE_COLOR_UP, DEFAULT_SHADOW,
|
ENCYCLOPEDIA_LOCATION_PAGE_COLOR_UP, DEFAULT_SHADOW,
|
||||||
ENCYCLOPEDIA_LOCATION_PAGE_COLOR_DOWN, DEFAULT_SHADOW,
|
ENCYCLOPEDIA_LOCATION_PAGE_COLOR_DOWN, DEFAULT_SHADOW,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
usPosY, ENCYCLOPEDIA_LOCATION_PAGE1_X+70, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
usPosX, usPosY, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
DEFAULT_MOVE_CALLBACK, SelectInventoryFiltrButtonsRegionCallBack);
|
DEFAULT_MOVE_CALLBACK, SelectInventoryFiltrButtonsRegionCallBack);
|
||||||
SetButtonCursor(guiFiltrAddInventoryButton[i], CURSOR_WWW);
|
SetButtonCursor(guiFiltrAddInventoryButton[i], CURSOR_WWW);
|
||||||
MSYS_SetBtnUserData( guiFiltrAddInventoryButton[i], 0, i);
|
MSYS_SetBtnUserData( guiFiltrAddInventoryButton[i], 0, i);
|
||||||
|
|
||||||
usPosY += ENCYCLOPEDIA_FILTR_BUTTON_GAP + 25;
|
usPosX += ENCYCLOPEDIA_FILTR_BUTTON_GAP + 25;
|
||||||
SetRegionFastHelpText( &gSelectedEncyclopediaAddInventoryTextRegion[ i ], BobbyRFilter[iHelp] );
|
SetRegionFastHelpText( &gSelectedEncyclopediaAddInventoryTextRegion[ i ], BobbyRFilter[iHelp] );
|
||||||
SetButtonFastHelpText( guiFiltrAddInventoryButton[ i ], BobbyRFilter[iHelp] );
|
SetButtonFastHelpText( guiFiltrAddInventoryButton[ i ], BobbyRFilter[iHelp] );
|
||||||
}
|
}
|
||||||
@@ -900,7 +908,7 @@ void InitData ( BOOLEAN bInit)
|
|||||||
|
|
||||||
BOOLEAN EnterEncyclopediaLocation()
|
BOOLEAN EnterEncyclopediaLocation()
|
||||||
{
|
{
|
||||||
UINT16 usPosX, i;
|
UINT16 usPosX, usPosY, i;
|
||||||
/*
|
/*
|
||||||
IDimage = 1;
|
IDimage = 1;
|
||||||
MaxImages = 1;
|
MaxImages = 1;
|
||||||
@@ -958,13 +966,15 @@ BOOLEAN EnterEncyclopediaLocation()
|
|||||||
guiEncyclopediaLocationPageButtonImage = LoadButtonImage("ENCYCLOPEDIA\\BottomButtons2.sti", -1,0,-1,1,-1 );
|
guiEncyclopediaLocationPageButtonImage = LoadButtonImage("ENCYCLOPEDIA\\BottomButtons2.sti", -1,0,-1,1,-1 );
|
||||||
|
|
||||||
usPosX = ENCYCLOPEDIA_LOCATION_PAGE1_X+15;
|
usPosX = ENCYCLOPEDIA_LOCATION_PAGE1_X+15;
|
||||||
|
usPosY = ENCYCLOPEDIA_LOCATION_PAGE1_Y;
|
||||||
|
|
||||||
for(i=0; i<3; i++)
|
for(i=0; i<3; i++)
|
||||||
{
|
{
|
||||||
guiEncyclopediaLocationPageButton[i] = CreateIconAndTextButton( guiEncyclopediaLocationPageButtonImage, pSectorPageText[i], ENCYCLOPEDIA_LOCATION_PAGE_FONT,
|
guiEncyclopediaLocationPageButton[i] = CreateIconAndTextButton( guiEncyclopediaLocationPageButtonImage, pSectorPageText[i], ENCYCLOPEDIA_LOCATION_PAGE_FONT,
|
||||||
ENCYCLOPEDIA_LOCATION_PAGE_COLOR_UP, DEFAULT_SHADOW,
|
ENCYCLOPEDIA_LOCATION_PAGE_COLOR_UP, DEFAULT_SHADOW,
|
||||||
ENCYCLOPEDIA_LOCATION_PAGE_COLOR_DOWN, DEFAULT_SHADOW,
|
ENCYCLOPEDIA_LOCATION_PAGE_COLOR_DOWN, DEFAULT_SHADOW,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
usPosX, ENCYCLOPEDIA_LOCATION_PAGE1_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
usPosX, usPosY, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
DEFAULT_MOVE_CALLBACK, SelectEncyclopediaLocationRegionCallBack);
|
DEFAULT_MOVE_CALLBACK, SelectEncyclopediaLocationRegionCallBack);
|
||||||
SetButtonCursor(guiEncyclopediaLocationPageButton[i], CURSOR_WWW);
|
SetButtonCursor(guiEncyclopediaLocationPageButton[i], CURSOR_WWW);
|
||||||
MSYS_SetBtnUserData( guiEncyclopediaLocationPageButton[i], 0, i);
|
MSYS_SetBtnUserData( guiEncyclopediaLocationPageButton[i], 0, i);
|
||||||
@@ -976,13 +986,15 @@ BOOLEAN EnterEncyclopediaLocation()
|
|||||||
guiEncyclopediaiPageButtonImage = LoadButtonImage("ENCYCLOPEDIA\\BottomButtons2.sti", -1,0,-1,1,-1 );
|
guiEncyclopediaiPageButtonImage = LoadButtonImage("ENCYCLOPEDIA\\BottomButtons2.sti", -1,0,-1,1,-1 );
|
||||||
|
|
||||||
usPosX = ENCYCLOPEDIA_LOCATION_PAGE1_X-44;
|
usPosX = ENCYCLOPEDIA_LOCATION_PAGE1_X-44;
|
||||||
|
usPosY = ENCYCLOPEDIA_LOCATION_PAGE1_Y-130;
|
||||||
|
|
||||||
for(i=0; i<3; i++)
|
for(i=0; i<3; i++)
|
||||||
{
|
{
|
||||||
guiEncyclopediaPageButton[i] = CreateIconAndTextButton( guiEncyclopediaiPageButtonImage, pLocationPageText[i], ENCYCLOPEDIA_LOCATION_PAGE_FONT,
|
guiEncyclopediaPageButton[i] = CreateIconAndTextButton( guiEncyclopediaiPageButtonImage, pLocationPageText[i], ENCYCLOPEDIA_LOCATION_PAGE_FONT,
|
||||||
ENCYCLOPEDIA_LOCATION_PAGE_COLOR_UP, DEFAULT_SHADOW,
|
ENCYCLOPEDIA_LOCATION_PAGE_COLOR_UP, DEFAULT_SHADOW,
|
||||||
ENCYCLOPEDIA_LOCATION_PAGE_COLOR_DOWN, DEFAULT_SHADOW,
|
ENCYCLOPEDIA_LOCATION_PAGE_COLOR_DOWN, DEFAULT_SHADOW,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
usPosX, ENCYCLOPEDIA_LOCATION_PAGE1_Y-130, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
usPosX, usPosY, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
DEFAULT_MOVE_CALLBACK, SelectEncyclopediaLocationPageRegionCallBack);
|
DEFAULT_MOVE_CALLBACK, SelectEncyclopediaLocationPageRegionCallBack);
|
||||||
SetButtonCursor(guiEncyclopediaPageButton[i], CURSOR_WWW);
|
SetButtonCursor(guiEncyclopediaPageButton[i], CURSOR_WWW);
|
||||||
MSYS_SetBtnUserData( guiEncyclopediaPageButton[i], 0, i);
|
MSYS_SetBtnUserData( guiEncyclopediaPageButton[i], 0, i);
|
||||||
|
|||||||
@@ -455,26 +455,8 @@ void GetPlayerKeyBoardInputForIMPBeginScreen( void )
|
|||||||
ScreenToClient(ghWindow, &MousePos); // In window coords!
|
ScreenToClient(ghWindow, &MousePos); // In window coords!
|
||||||
|
|
||||||
// handle input events
|
// handle input events
|
||||||
while( DequeueEvent(&InputEvent) )
|
while (DequeueSpecificEvent(&InputEvent, KEY_DOWN|KEY_UP|KEY_REPEAT))
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
// HOOK INTO MOUSE HOOKS
|
|
||||||
switch(InputEvent.usEvent)
|
|
||||||
{
|
|
||||||
case LEFT_BUTTON_DOWN:
|
|
||||||
MouseSystemHook(LEFT_BUTTON_DOWN, (INT16)MousePos.x, (INT16)MousePos.y,_LeftButtonDown, _RightButtonDown);
|
|
||||||
break;
|
|
||||||
case LEFT_BUTTON_UP:
|
|
||||||
MouseSystemHook(LEFT_BUTTON_UP, (INT16)MousePos.x, (INT16)MousePos.y ,_LeftButtonDown, _RightButtonDown);
|
|
||||||
break;
|
|
||||||
case RIGHT_BUTTON_DOWN:
|
|
||||||
MouseSystemHook(RIGHT_BUTTON_DOWN, (INT16)MousePos.x, (INT16)MousePos.y,_LeftButtonDown, _RightButtonDown);
|
|
||||||
break;
|
|
||||||
case RIGHT_BUTTON_UP:
|
|
||||||
MouseSystemHook(RIGHT_BUTTON_UP, (INT16)MousePos.x, (INT16)MousePos.y,_LeftButtonDown, _RightButtonDown);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
if( !HandleTextInput( &InputEvent ) && (InputEvent.usEvent == KEY_DOWN || InputEvent.usEvent == KEY_REPEAT) )
|
if( !HandleTextInput( &InputEvent ) && (InputEvent.usEvent == KEY_DOWN || InputEvent.usEvent == KEY_REPEAT) )
|
||||||
{
|
{
|
||||||
switch( InputEvent.usParam )
|
switch( InputEvent.usParam )
|
||||||
|
|||||||
@@ -592,7 +592,9 @@ UINT32 cnt;
|
|||||||
|
|
||||||
if( fCharacterIsMale )
|
if( fCharacterIsMale )
|
||||||
{
|
{
|
||||||
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].ubFaceIndex = 200 + ( UINT8 )iPortraitNumber;
|
//gMercProfiles[ LaptopSaveInfo.iIMPIndex ].ubFaceIndex = 200 + ( UINT8 )iPortraitNumber;
|
||||||
|
|
||||||
|
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].ubFaceIndex = ( UINT8 )iPortraitNumber;
|
||||||
|
|
||||||
// eyes
|
// eyes
|
||||||
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].usEyesX = sFacePositions[ gIMPMaleValues[iPortraitNumber].uiEyeXPositions ][ 0 ];
|
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].usEyesX = sFacePositions[ gIMPMaleValues[iPortraitNumber].uiEyeXPositions ][ 0 ];
|
||||||
@@ -604,7 +606,9 @@ UINT32 cnt;
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].ubFaceIndex = 200 + ( UINT8 )iPortraitNumber;
|
//gMercProfiles[ LaptopSaveInfo.iIMPIndex ].ubFaceIndex = 200 + ( UINT8 )iPortraitNumber;
|
||||||
|
|
||||||
|
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].ubFaceIndex = ( UINT8 )iPortraitNumber;
|
||||||
|
|
||||||
// eyes
|
// eyes
|
||||||
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].usEyesX = sFacePositions[ gIMPFemaleValues[iPortraitNumber].uiEyeXPositions ][ 0 ];
|
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].usEyesX = sFacePositions[ gIMPFemaleValues[iPortraitNumber].uiEyeXPositions ][ 0 ];
|
||||||
|
|||||||
+30
-8
@@ -41,6 +41,8 @@
|
|||||||
#include <vfs/Core/vfs.h>
|
#include <vfs/Core/vfs.h>
|
||||||
#include <vfs/Aspects/vfs_settings.h>
|
#include <vfs/Aspects/vfs_settings.h>
|
||||||
|
|
||||||
|
#include "Soldier Profile.h"
|
||||||
|
|
||||||
// Changed by ADB (rev 1513) to resolve IMPs created prior to structural changes
|
// Changed by ADB (rev 1513) to resolve IMPs created prior to structural changes
|
||||||
//#define IMP_FILENAME_SUFFIX ".dat"
|
//#define IMP_FILENAME_SUFFIX ".dat"
|
||||||
#define OLD_IMP_FILENAME_SUFFIX ".dat"
|
#define OLD_IMP_FILENAME_SUFFIX ".dat"
|
||||||
@@ -52,7 +54,7 @@
|
|||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
UINT16 inv;
|
UINT16 inv;
|
||||||
UINT8 iSize;
|
UINT16 iSize;
|
||||||
UINT32 iClass;
|
UINT32 iClass;
|
||||||
UINT8 iStatus;
|
UINT8 iStatus;
|
||||||
UINT8 iNumber;
|
UINT8 iNumber;
|
||||||
@@ -67,10 +69,10 @@ UINT32 giIMPConfirmButton[ 2 ];
|
|||||||
UINT32 giIMPConfirmButtonImage[ 2 ];
|
UINT32 giIMPConfirmButtonImage[ 2 ];
|
||||||
BOOLEAN fNoAlreadySelected = FALSE;
|
BOOLEAN fNoAlreadySelected = FALSE;
|
||||||
|
|
||||||
IMP_FACE_VALUES gIMPFaceValues[200];
|
IMP_FACE_VALUES gIMPFaceValues[NUM_PROFILES];
|
||||||
|
|
||||||
IMP_FEMALE_VALUES gIMPFemaleValues[200];
|
IMP_FEMALE_VALUES gIMPFemaleValues[NUM_PROFILES];
|
||||||
IMP_MALE_VALUES gIMPMaleValues[200];
|
IMP_MALE_VALUES gIMPMaleValues[NUM_PROFILES];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
UINT16 uiEyeXPositions[ ]={
|
UINT16 uiEyeXPositions[ ]={
|
||||||
@@ -965,8 +967,8 @@ void MakeProfileInvItemAnySlot(MERCPROFILESTRUCT *pProfile, UINT16 usItem, UINT8
|
|||||||
// CHRISL: New function to move initial gear into LBE pockets when LBE items are given during creation
|
// CHRISL: New function to move initial gear into LBE pockets when LBE items are given during creation
|
||||||
void RedistributeStartingItems(MERCPROFILESTRUCT *pProfile, UINT16 usItem, UINT8 sPocket)
|
void RedistributeStartingItems(MERCPROFILESTRUCT *pProfile, UINT16 usItem, UINT8 sPocket)
|
||||||
{
|
{
|
||||||
UINT16 lbeIndex;
|
UINT16 lbeIndex, iSize;
|
||||||
UINT8 lbeClass, iSize;
|
UINT8 lbeClass;
|
||||||
UINT16 inv[NUM_INV_SLOTS], istatus[NUM_INV_SLOTS], inumber[NUM_INV_SLOTS];
|
UINT16 inv[NUM_INV_SLOTS], istatus[NUM_INV_SLOTS], inumber[NUM_INV_SLOTS];
|
||||||
|
|
||||||
lbeIndex = Item[usItem].ubClassIndex;
|
lbeIndex = Item[usItem].ubClassIndex;
|
||||||
@@ -1577,10 +1579,12 @@ BOOLEAN LoadImpCharacter( STR nickName )
|
|||||||
void ResetIMPCharactersEyesAndMouthOffsets( UINT8 ubMercProfileID )
|
void ResetIMPCharactersEyesAndMouthOffsets( UINT8 ubMercProfileID )
|
||||||
{
|
{
|
||||||
// ATE: Check boundary conditions!
|
// ATE: Check boundary conditions!
|
||||||
if( ( ( gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ) > MAX_NEW_IMP_PORTRAITS ) || ( ubMercProfileID >= PROF_HUMMER ) ) // 16
|
/*
|
||||||
|
if( ( ( gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ) > MAX_NEW_IMP_PORTRAITS ) || ( ubMercProfileID >= PROF_HUMMER ) ) // 16
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
/*
|
/*
|
||||||
gMercProfiles[ ubMercProfileID ].usEyesX = gIMPFaceValues[ gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ].uiEyeXPositions;
|
gMercProfiles[ ubMercProfileID ].usEyesX = gIMPFaceValues[ gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ].uiEyeXPositions;
|
||||||
gMercProfiles[ ubMercProfileID ].usEyesY = gIMPFaceValues[ gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ].uiEyeYPositions;
|
gMercProfiles[ ubMercProfileID ].usEyesY = gIMPFaceValues[ gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ].uiEyeYPositions;
|
||||||
@@ -1589,7 +1593,7 @@ void ResetIMPCharactersEyesAndMouthOffsets( UINT8 ubMercProfileID )
|
|||||||
gMercProfiles[ ubMercProfileID ].usMouthY = gIMPFaceValues[ gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ].uiMouthYPositions;
|
gMercProfiles[ ubMercProfileID ].usMouthY = gIMPFaceValues[ gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ].uiMouthYPositions;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
if( gMercProfiles[ ubMercProfileID ].bSex == 0 )
|
if( gMercProfiles[ ubMercProfileID ].bSex == 0 )
|
||||||
{
|
{
|
||||||
gMercProfiles[ ubMercProfileID ].usEyesX = gIMPMaleValues[ gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ].uiEyeXPositions;
|
gMercProfiles[ ubMercProfileID ].usEyesX = gIMPMaleValues[ gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ].uiEyeXPositions;
|
||||||
@@ -1606,6 +1610,24 @@ void ResetIMPCharactersEyesAndMouthOffsets( UINT8 ubMercProfileID )
|
|||||||
gMercProfiles[ ubMercProfileID ].usMouthX = gIMPFemaleValues[ gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ].uiMouthXPositions;
|
gMercProfiles[ ubMercProfileID ].usMouthX = gIMPFemaleValues[ gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ].uiMouthXPositions;
|
||||||
gMercProfiles[ ubMercProfileID ].usMouthY = gIMPFemaleValues[ gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ].uiMouthYPositions;
|
gMercProfiles[ ubMercProfileID ].usMouthY = gIMPFemaleValues[ gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ].uiMouthYPositions;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
if( gMercProfiles[ ubMercProfileID ].bSex == 0 )
|
||||||
|
{
|
||||||
|
gMercProfiles[ ubMercProfileID ].usEyesX = gIMPMaleValues[ gMercProfiles[ ubMercProfileID ].ubFaceIndex ].uiEyeXPositions;
|
||||||
|
gMercProfiles[ ubMercProfileID ].usEyesY = gIMPMaleValues[ gMercProfiles[ ubMercProfileID ].ubFaceIndex ].uiEyeYPositions;
|
||||||
|
|
||||||
|
gMercProfiles[ ubMercProfileID ].usMouthX = gIMPMaleValues[ gMercProfiles[ ubMercProfileID ].ubFaceIndex ].uiMouthXPositions;
|
||||||
|
gMercProfiles[ ubMercProfileID ].usMouthY = gIMPMaleValues[ gMercProfiles[ ubMercProfileID ].ubFaceIndex ].uiMouthYPositions;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gMercProfiles[ ubMercProfileID ].usEyesX = gIMPFemaleValues[ gMercProfiles[ ubMercProfileID ].ubFaceIndex ].uiEyeXPositions;
|
||||||
|
gMercProfiles[ ubMercProfileID ].usEyesY = gIMPFemaleValues[ gMercProfiles[ ubMercProfileID ].ubFaceIndex ].uiEyeYPositions;
|
||||||
|
|
||||||
|
gMercProfiles[ ubMercProfileID ].usMouthX = gIMPFemaleValues[ gMercProfiles[ ubMercProfileID ].ubFaceIndex ].uiMouthXPositions;
|
||||||
|
gMercProfiles[ ubMercProfileID ].usMouthY = gIMPFemaleValues[ gMercProfiles[ ubMercProfileID ].ubFaceIndex ].uiMouthYPositions;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
#ifndef __IMP_CONFIRM_H
|
#ifndef __IMP_CONFIRM_H
|
||||||
#define __IMP_CONFIRM_H
|
#define __IMP_CONFIRM_H
|
||||||
|
|
||||||
|
#include "Soldier Profile.h"
|
||||||
|
|
||||||
void EnterIMPConfirm( void );
|
void EnterIMPConfirm( void );
|
||||||
void RenderIMPConfirm( void );
|
void RenderIMPConfirm( void );
|
||||||
void ExitIMPConfirm( void );
|
void ExitIMPConfirm( void );
|
||||||
void HandleIMPConfirm( void );
|
void HandleIMPConfirm( void );
|
||||||
|
|
||||||
#define MAX_NEW_IMP_PORTRAITS 50
|
#define MAX_NEW_IMP_PORTRAITS NUM_PROFILES
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@@ -27,7 +29,7 @@ typedef struct
|
|||||||
|
|
||||||
} IMP_FACE_VALUES;
|
} IMP_FACE_VALUES;
|
||||||
|
|
||||||
extern IMP_FACE_VALUES gIMPFaceValues[200];
|
extern IMP_FACE_VALUES gIMPFaceValues[NUM_PROFILES];
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
@@ -73,8 +75,8 @@ typedef struct
|
|||||||
BOOLEAN bBadAss;
|
BOOLEAN bBadAss;
|
||||||
} IMP_FEMALE_VALUES;
|
} IMP_FEMALE_VALUES;
|
||||||
|
|
||||||
extern IMP_FEMALE_VALUES gIMPFemaleValues[200];
|
extern IMP_FEMALE_VALUES gIMPFemaleValues[NUM_PROFILES];
|
||||||
extern IMP_MALE_VALUES gIMPMaleValues[200];
|
extern IMP_MALE_VALUES gIMPMaleValues[NUM_PROFILES];
|
||||||
|
|
||||||
BOOLEAN AddCharacterToPlayersTeam( void );
|
BOOLEAN AddCharacterToPlayersTeam( void );
|
||||||
BOOLEAN LoadImpCharacter( STR fileName );
|
BOOLEAN LoadImpCharacter( STR fileName );
|
||||||
|
|||||||
@@ -325,8 +325,8 @@ void BtnIMPFinishDoneCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
{
|
{
|
||||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||||
{
|
{
|
||||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||||
iCurrentImpPage = IMP_CONFIRM;
|
iCurrentImpPage = IMP_CONFIRM;
|
||||||
//CreateACharacterFromPlayerEnteredStats( );
|
//CreateACharacterFromPlayerEnteredStats( );
|
||||||
fButtonPendingFlag = TRUE;
|
fButtonPendingFlag = TRUE;
|
||||||
iCurrentProfileMode = IMP__REGISTRY;
|
iCurrentProfileMode = IMP__REGISTRY;
|
||||||
@@ -668,14 +668,16 @@ BOOLEAN LoadCharacterPortrait( void )
|
|||||||
{
|
{
|
||||||
if ( gIMPMaleValues[ iPortraitNumber ].Enabled == 1 )
|
if ( gIMPMaleValues[ iPortraitNumber ].Enabled == 1 )
|
||||||
{
|
{
|
||||||
sprintf( VObjectDesc.ImageFile, "Faces\\%02d.sti", gIMPMaleValues[ iPortraitNumber ].PortraitId );
|
//sprintf( VObjectDesc.ImageFile, "Faces\\%02d.sti", gIMPMaleValues[ iPortraitNumber ].PortraitId );
|
||||||
|
sprintf( VObjectDesc.ImageFile, "IMPFaces\\%02d.sti", gIMPMaleValues[ iPortraitNumber ].PortraitId );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( gIMPFemaleValues[ iPortraitNumber ].Enabled == 1 )
|
if ( gIMPFemaleValues[ iPortraitNumber ].Enabled == 1 )
|
||||||
{
|
{
|
||||||
sprintf( VObjectDesc.ImageFile, "Faces\\%02d.sti", gIMPFemaleValues[ iPortraitNumber ].PortraitId );
|
//sprintf( VObjectDesc.ImageFile, "Faces\\%02d.sti", gIMPFemaleValues[ iPortraitNumber ].PortraitId );
|
||||||
|
sprintf( VObjectDesc.ImageFile, "IMPFaces\\%02d.sti", gIMPFemaleValues[ iPortraitNumber ].PortraitId );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-19
@@ -266,26 +266,8 @@ void GetPlayerKeyBoardInputForIMPHomePage( void )
|
|||||||
GetCursorPos(&MousePos);
|
GetCursorPos(&MousePos);
|
||||||
ScreenToClient(ghWindow, &MousePos); // In window coords!
|
ScreenToClient(ghWindow, &MousePos); // In window coords!
|
||||||
|
|
||||||
while (DequeueEvent(&InputEvent) == TRUE)
|
while (DequeueSpecificEvent(&InputEvent, KEY_DOWN|KEY_UP|KEY_REPEAT))
|
||||||
{
|
{
|
||||||
// HOOK INTO MOUSE HOOKS
|
|
||||||
/*
|
|
||||||
switch(InputEvent.usEvent)
|
|
||||||
{
|
|
||||||
case LEFT_BUTTON_DOWN:
|
|
||||||
MouseSystemHook(LEFT_BUTTON_DOWN, (INT16)MousePos.x, (INT16)MousePos.y,_LeftButtonDown, _RightButtonDown);
|
|
||||||
break;
|
|
||||||
case LEFT_BUTTON_UP:
|
|
||||||
MouseSystemHook(LEFT_BUTTON_UP, (INT16)MousePos.x, (INT16)MousePos.y ,_LeftButtonDown, _RightButtonDown);
|
|
||||||
break;
|
|
||||||
case RIGHT_BUTTON_DOWN:
|
|
||||||
MouseSystemHook(RIGHT_BUTTON_DOWN, (INT16)MousePos.x, (INT16)MousePos.y,_LeftButtonDown, _RightButtonDown);
|
|
||||||
break;
|
|
||||||
case RIGHT_BUTTON_UP:
|
|
||||||
MouseSystemHook(RIGHT_BUTTON_UP, (INT16)MousePos.x, (INT16)MousePos.y,_LeftButtonDown, _RightButtonDown);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
if( !HandleTextInput( &InputEvent ) && (InputEvent.usEvent == KEY_DOWN || InputEvent.usEvent == KEY_REPEAT || InputEvent.usEvent == KEY_UP ) )
|
if( !HandleTextInput( &InputEvent ) && (InputEvent.usEvent == KEY_DOWN || InputEvent.usEvent == KEY_REPEAT || InputEvent.usEvent == KEY_UP ) )
|
||||||
{
|
{
|
||||||
switch( InputEvent.usParam )
|
switch( InputEvent.usParam )
|
||||||
|
|||||||
@@ -1124,14 +1124,16 @@ BOOLEAN LoadCharacterPortraitForMainPage( void )
|
|||||||
{
|
{
|
||||||
if ( gIMPMaleValues[ iPortraitNumber ].Enabled == 1 )
|
if ( gIMPMaleValues[ iPortraitNumber ].Enabled == 1 )
|
||||||
{
|
{
|
||||||
sprintf( VObjectDesc.ImageFile, "Faces\\%02d.sti", gIMPMaleValues[ iPortraitNumber ].PortraitId );
|
// sprintf( VObjectDesc.ImageFile, "Faces\\%02d.sti", gIMPMaleValues[ iPortraitNumber ].PortraitId );
|
||||||
|
sprintf( VObjectDesc.ImageFile, "IMPFaces\\%02d.sti", gIMPMaleValues[ iPortraitNumber ].PortraitId );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( gIMPFemaleValues[ iPortraitNumber ].Enabled == 1 )
|
if ( gIMPFemaleValues[ iPortraitNumber ].Enabled == 1 )
|
||||||
{
|
{
|
||||||
sprintf( VObjectDesc.ImageFile, "Faces\\%02d.sti", gIMPFemaleValues[ iPortraitNumber ].PortraitId );
|
//sprintf( VObjectDesc.ImageFile, "Faces\\%02d.sti", gIMPFemaleValues[ iPortraitNumber ].PortraitId );
|
||||||
|
sprintf( VObjectDesc.ImageFile, "IMPFaces\\%02d.sti", gIMPFemaleValues[ iPortraitNumber ].PortraitId );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//FilenameForBPP( pPlayerSelectedFaceFileNames[ iPortraitNumber ] , VObjectDesc.ImageFile);
|
//FilenameForBPP( pPlayerSelectedFaceFileNames[ iPortraitNumber ] , VObjectDesc.ImageFile);
|
||||||
|
|||||||
@@ -1255,7 +1255,7 @@ void AssignMinorTraitHelpText( UINT8 ubNumber )
|
|||||||
swprintf( atStr, gzIMPMinorTraitsHelpTextsStealthy[2], gSkillTraitValues.ubSTStealthBonus, L"%");
|
swprintf( atStr, gzIMPMinorTraitsHelpTextsStealthy[2], gSkillTraitValues.ubSTStealthBonus, L"%");
|
||||||
wcscat( apStr, atStr );
|
wcscat( apStr, atStr );
|
||||||
}
|
}
|
||||||
if( gSkillTraitValues.ubSTReducedAPsRegistered != 0 && gGameExternalOptions.fImprovedInterruptSystem )
|
if( gSkillTraitValues.ubSTReducedAPsRegistered != 0 && gGameOptions.fImprovedInterruptSystem )
|
||||||
{
|
{
|
||||||
swprintf( atStr, gzIMPMinorTraitsHelpTextsStealthy[4], gSkillTraitValues.ubSTReducedAPsRegistered, L"%");
|
swprintf( atStr, gzIMPMinorTraitsHelpTextsStealthy[4], gSkillTraitValues.ubSTReducedAPsRegistered, L"%");
|
||||||
wcscat( apStr, atStr );
|
wcscat( apStr, atStr );
|
||||||
|
|||||||
@@ -131,7 +131,8 @@ BOOLEAN RenderPortrait( INT16 sX, INT16 sY )
|
|||||||
|
|
||||||
if ( gIMPMaleValues[ iCurrentPortrait ].Enabled == 1 )
|
if ( gIMPMaleValues[ iCurrentPortrait ].Enabled == 1 )
|
||||||
{
|
{
|
||||||
sprintf( VObjectDesc.ImageFile, "Faces\\BigFaces\\%02d.sti", gIMPMaleValues[ iCurrentPortrait ].PortraitId );
|
///sprintf( VObjectDesc.ImageFile, "Faces\\BigFaces\\%02d.sti", gIMPMaleValues[ iCurrentPortrait ].PortraitId );
|
||||||
|
sprintf( VObjectDesc.ImageFile, "IMPFaces\\BigFaces\\%02d.sti", gIMPMaleValues[ iCurrentPortrait ].PortraitId );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -157,7 +158,8 @@ BOOLEAN RenderPortrait( INT16 sX, INT16 sY )
|
|||||||
|
|
||||||
if ( gIMPFemaleValues[ iCurrentPortrait ].Enabled == 1 )
|
if ( gIMPFemaleValues[ iCurrentPortrait ].Enabled == 1 )
|
||||||
{
|
{
|
||||||
sprintf( VObjectDesc.ImageFile, "Faces\\BigFaces\\%02d.sti", gIMPFemaleValues[ iCurrentPortrait ].PortraitId );
|
// sprintf( VObjectDesc.ImageFile, "Faces\\BigFaces\\%02d.sti", gIMPFemaleValues[ iCurrentPortrait ].PortraitId );
|
||||||
|
sprintf( VObjectDesc.ImageFile, "IMPFaces\\BigFaces\\%02d.sti", gIMPFemaleValues[ iCurrentPortrait ].PortraitId );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2148,7 +2148,7 @@ void AssignSkillTraitHelpText( UINT8 ubTraitNumber, BOOLEAN fExpertLevel )
|
|||||||
wcscat( apStr, atStr );
|
wcscat( apStr, atStr );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if( gSkillTraitValues.ubMAReducedAPsRegisteredWhenMoving != 0 && gGameExternalOptions.fImprovedInterruptSystem )
|
if( gSkillTraitValues.ubMAReducedAPsRegisteredWhenMoving != 0 && gGameOptions.fImprovedInterruptSystem )
|
||||||
{
|
{
|
||||||
swprintf( atStr, gzIMPMajorTraitsHelpTextsMartialArts[27], ( gSkillTraitValues.ubMAReducedAPsRegisteredWhenMoving * (fExpertLevel ? 2 : 1)), L"%");
|
swprintf( atStr, gzIMPMajorTraitsHelpTextsMartialArts[27], ( gSkillTraitValues.ubMAReducedAPsRegisteredWhenMoving * (fExpertLevel ? 2 : 1)), L"%");
|
||||||
wcscat( apStr, atStr );
|
wcscat( apStr, atStr );
|
||||||
@@ -2185,7 +2185,7 @@ void AssignSkillTraitHelpText( UINT8 ubTraitNumber, BOOLEAN fExpertLevel )
|
|||||||
swprintf( atStr, gzIMPMajorTraitsHelpTextsSquadleader[2], ( gSkillTraitValues.ubSLEffectiveLevelAsStandby * (fExpertLevel ? 2 : 1)));
|
swprintf( atStr, gzIMPMajorTraitsHelpTextsSquadleader[2], ( gSkillTraitValues.ubSLEffectiveLevelAsStandby * (fExpertLevel ? 2 : 1)));
|
||||||
wcscat( apStr, atStr );
|
wcscat( apStr, atStr );
|
||||||
}
|
}
|
||||||
if( gSkillTraitValues.ubSLCollectiveInterruptsBonus != 0 && gGameExternalOptions.fImprovedInterruptSystem )
|
if( gSkillTraitValues.ubSLCollectiveInterruptsBonus != 0 && gGameOptions.fImprovedInterruptSystem )
|
||||||
{
|
{
|
||||||
swprintf( atStr, gzIMPMajorTraitsHelpTextsSquadleader[11], ( gSkillTraitValues.ubSLCollectiveInterruptsBonus * (fExpertLevel ? 2 : 1)), L"%");
|
swprintf( atStr, gzIMPMajorTraitsHelpTextsSquadleader[11], ( gSkillTraitValues.ubSLCollectiveInterruptsBonus * (fExpertLevel ? 2 : 1)), L"%");
|
||||||
wcscat( apStr, atStr );
|
wcscat( apStr, atStr );
|
||||||
|
|||||||
+3
-3
@@ -14,7 +14,7 @@ class SOLDIERTYPE;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define MAX_PURCHASE_AMOUNT 10
|
//#define MAX_PURCHASE_AMOUNT 20
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ typedef struct
|
|||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
BOOLEAN fActive;
|
BOOLEAN fActive;
|
||||||
BobbyRayPurchaseStruct BobbyRayPurchase[ MAX_PURCHASE_AMOUNT ];
|
BobbyRayPurchaseStruct BobbyRayPurchase[ 100 ];
|
||||||
UINT8 ubNumberPurchases;
|
UINT8 ubNumberPurchases;
|
||||||
} BobbyRayOrderStruct;
|
} BobbyRayOrderStruct;
|
||||||
|
|
||||||
@@ -170,7 +170,7 @@ typedef struct
|
|||||||
|
|
||||||
extern LaptopSaveInfoStruct LaptopSaveInfo;
|
extern LaptopSaveInfoStruct LaptopSaveInfo;
|
||||||
|
|
||||||
extern BobbyRayPurchaseStruct BobbyRayPurchases[ MAX_PURCHASE_AMOUNT ];
|
extern BobbyRayPurchaseStruct BobbyRayPurchases[ 100 ];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -932,6 +932,10 @@
|
|||||||
RelativePath=".\XML_IMPPortraits.cpp"
|
RelativePath=".\XML_IMPPortraits.cpp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\XML_OldAIMArchive.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\XML_ShippingDestinations.cpp"
|
RelativePath=".\XML_ShippingDestinations.cpp"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -935,6 +935,10 @@
|
|||||||
RelativePath=".\XML_IMPPortraits.cpp"
|
RelativePath=".\XML_IMPPortraits.cpp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\XML_OldAIMArchive.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\XML_ShippingDestinations.cpp"
|
RelativePath=".\XML_ShippingDestinations.cpp"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -173,6 +173,7 @@
|
|||||||
<ClCompile Include="XML_EmailMercLevelUp.cpp" />
|
<ClCompile Include="XML_EmailMercLevelUp.cpp" />
|
||||||
<ClCompile Include="XML_EncyclopediaLocation.cpp" />
|
<ClCompile Include="XML_EncyclopediaLocation.cpp" />
|
||||||
<ClCompile Include="XML_IMPPortraits.cpp" />
|
<ClCompile Include="XML_IMPPortraits.cpp" />
|
||||||
|
<ClCompile Include="XML_OldAIMArchive.cpp" />
|
||||||
<ClCompile Include="XML_ShippingDestinations.cpp" />
|
<ClCompile Include="XML_ShippingDestinations.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup Label="Globals">
|
<PropertyGroup Label="Globals">
|
||||||
@@ -239,24 +240,24 @@
|
|||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<PropertyGroup Label="UserMacros" />
|
<PropertyGroup Label="UserMacros" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<OutDir>..\lib\VS2010\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\lib\VS2010\$(JA2Config)\$(Configuration)\</OutDir>
|
||||||
<IntDir>..\build\VS2010\$(ProjectName)_$(Configuration)\</IntDir>
|
<IntDir>$(SolutionDir)\build\VS2010\$(JA2Config)\$(ProjectName)_$(Configuration)\</IntDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MapEditorD|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MapEditorD|Win32'">
|
||||||
<OutDir>..\lib\VS2010\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\lib\VS2010\$(JA2Config)\$(Configuration)\</OutDir>
|
||||||
<IntDir>..\build\VS2010\$(ProjectName)_$(Configuration)\</IntDir>
|
<IntDir>$(SolutionDir)\build\VS2010\$(JA2Config)\$(ProjectName)_$(Configuration)\</IntDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<IntDir>..\build\VS2010\$(ProjectName)_$(Configuration)\</IntDir>
|
<IntDir>$(SolutionDir)\build\VS2010\$(JA2Config)\$(ProjectName)_$(Configuration)\</IntDir>
|
||||||
<OutDir>..\lib\VS2010\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\lib\VS2010\$(JA2Config)\$(Configuration)\</OutDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MapEditor|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MapEditor|Win32'">
|
||||||
<IntDir>..\build\VS2010\$(ProjectName)_$(Configuration)\</IntDir>
|
<IntDir>$(SolutionDir)\build\VS2010\$(JA2Config)\$(ProjectName)_$(Configuration)\</IntDir>
|
||||||
<OutDir>..\lib\VS2010\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\lib\VS2010\$(JA2Config)\$(Configuration)\</OutDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Relese_WithDebugInfo|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Relese_WithDebugInfo|Win32'">
|
||||||
<IntDir>..\build\VS2010\$(ProjectName)_$(Configuration)\</IntDir>
|
<IntDir>$(SolutionDir)\build\VS2010\$(JA2Config)\$(ProjectName)_$(Configuration)\</IntDir>
|
||||||
<OutDir>..\lib\VS2010\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\lib\VS2010\$(JA2Config)\$(Configuration)\</OutDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
|
|||||||
@@ -458,5 +458,8 @@
|
|||||||
<ClCompile Include="XML_Email.cpp">
|
<ClCompile Include="XML_Email.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="XML_OldAIMArchive.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -55,6 +55,8 @@ extern StrategicMapElement StrategicMap[];
|
|||||||
|
|
||||||
extern INT16 gusCurShipmentDestinationID;
|
extern INT16 gusCurShipmentDestinationID;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
// CShipmentManipulator member implementation
|
// CShipmentManipulator member implementation
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
@@ -208,6 +210,7 @@ BOOLEAN CPostalService::AddPackageToShipment(UINT16 usShipmentID, UINT16 usItemI
|
|||||||
|
|
||||||
BOOLEAN CPostalService::SendShipment(UINT16 usShipmentID)
|
BOOLEAN CPostalService::SendShipment(UINT16 usShipmentID)
|
||||||
{
|
{
|
||||||
|
static BOOLEAN BR_FAST_SHIP = gGameExternalOptions.fBobbyRayFastShipments;
|
||||||
if( usShipmentID > _UsedShipmentIDList.size() ||
|
if( usShipmentID > _UsedShipmentIDList.size() ||
|
||||||
!_UsedShipmentIDList[usShipmentID])
|
!_UsedShipmentIDList[usShipmentID])
|
||||||
{
|
{
|
||||||
@@ -238,9 +241,18 @@ BOOLEAN CPostalService::SendShipment(UINT16 usShipmentID)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
AddFutureDayStrategicEvent( EVENT_POSTAL_SERVICE_SHIPMENT, (8 + Random(4) ) * 60, usShipmentID,
|
//JMich
|
||||||
SHIPMENT(sli).pDestinationDeliveryInfo->bDaysAhead);
|
//Jenilee: now faster shipments
|
||||||
|
if (!BR_FAST_SHIP)
|
||||||
|
{
|
||||||
|
AddFutureDayStrategicEvent( EVENT_POSTAL_SERVICE_SHIPMENT, (8 + Random(4) ) * 60, usShipmentID, SHIPMENT(sli).pDestinationDeliveryInfo->bDaysAhead);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
AddStrategicEvent(EVENT_POSTAL_SERVICE_SHIPMENT, GetWorldTotalMin() + ((SHIPMENT(sli).pDestinationDeliveryInfo->bDaysAhead * (5 + Random(3))) * 60), usShipmentID);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ BOOLEAN LoadGraphicForItem( ENCYCLOPEDIA_LOCATION *pEncy, UINT32 i )
|
|||||||
sprintf( zName, "p2item%d", ubGraphic );
|
sprintf( zName, "p2item%d", ubGraphic );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else if ( Item[i].ubGraphicType == 3 )
|
||||||
{
|
{
|
||||||
if ( ubGraphic < 10 )
|
if ( ubGraphic < 10 )
|
||||||
{
|
{
|
||||||
@@ -183,6 +183,73 @@ BOOLEAN LoadGraphicForItem( ENCYCLOPEDIA_LOCATION *pEncy, UINT32 i )
|
|||||||
sprintf( zName, "p3item%d", ubGraphic );
|
sprintf( zName, "p3item%d", ubGraphic );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//MM: New item tileslots start here
|
||||||
|
else if ( Item[i].ubGraphicType == 4 )
|
||||||
|
{
|
||||||
|
if ( ubGraphic < 10 )
|
||||||
|
{
|
||||||
|
sprintf( zName, "p4item0%d", ubGraphic );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sprintf( zName, "p4item%d", ubGraphic );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ( Item[i].ubGraphicType == 5 )
|
||||||
|
{
|
||||||
|
if ( ubGraphic < 10 )
|
||||||
|
{
|
||||||
|
sprintf( zName, "p5item0%d", ubGraphic );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sprintf( zName, "p5item%d", ubGraphic );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ( Item[i].ubGraphicType == 6 )
|
||||||
|
{
|
||||||
|
if ( ubGraphic < 10 )
|
||||||
|
{
|
||||||
|
sprintf( zName, "p6item0%d", ubGraphic );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sprintf( zName, "p6item%d", ubGraphic );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ( Item[i].ubGraphicType == 7 )
|
||||||
|
{
|
||||||
|
if ( ubGraphic < 10 )
|
||||||
|
{
|
||||||
|
sprintf( zName, "p7item0%d", ubGraphic );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sprintf( zName, "p7item%d", ubGraphic );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ( Item[i].ubGraphicType == 8 )
|
||||||
|
{
|
||||||
|
if ( ubGraphic < 10 )
|
||||||
|
{
|
||||||
|
sprintf( zName, "p8item0%d", ubGraphic );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sprintf( zName, "p8item%d", ubGraphic );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( ubGraphic < 10 )
|
||||||
|
{
|
||||||
|
sprintf( zName, "p9item0%d", ubGraphic );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sprintf( zName, "p9item%d", ubGraphic );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//Load item
|
//Load item
|
||||||
sprintf( zString, "BIGITEMS\\%s%s", zName, ext );
|
sprintf( zString, "BIGITEMS\\%s%s", zName, ext );
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
#include "Interface.h"
|
#include "Interface.h"
|
||||||
#include "IMP Confirm.h"
|
#include "IMP Confirm.h"
|
||||||
#include "IMP Portraits.h"
|
#include "IMP Portraits.h"
|
||||||
|
#include "Soldier Profile.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct
|
struct
|
||||||
@@ -268,7 +269,7 @@ UINT32 cnt;
|
|||||||
UINT32 cnt2 = 0;
|
UINT32 cnt2 = 0;
|
||||||
UINT32 cnt3 = 0;
|
UINT32 cnt3 = 0;
|
||||||
|
|
||||||
for ( cnt = 0; cnt < 200; cnt++ )
|
for ( cnt = 0; cnt < NUM_PROFILES; cnt++ )
|
||||||
{
|
{
|
||||||
if (gIMPFaceValues[cnt].bSex == 1 && gIMPFaceValues[cnt].PortraitId !=0)
|
if (gIMPFaceValues[cnt].bSex == 1 && gIMPFaceValues[cnt].PortraitId !=0)
|
||||||
{
|
{
|
||||||
@@ -291,7 +292,7 @@ UINT32 cnt3 = 0;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( cnt = 0; cnt < 200; cnt++ )
|
for ( cnt = 0; cnt < NUM_PROFILES; cnt++ )
|
||||||
{
|
{
|
||||||
if (gIMPFaceValues[cnt].bSex == 0 && gIMPFaceValues[cnt].PortraitId !=0)
|
if (gIMPFaceValues[cnt].bSex == 0 && gIMPFaceValues[cnt].PortraitId !=0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,216 @@
|
|||||||
|
#ifdef PRECOMPILEDHEADERS
|
||||||
|
#include "Tactical All.h"
|
||||||
|
#else
|
||||||
|
#include "sgp.h"
|
||||||
|
#include "Debug Control.h"
|
||||||
|
#include "expat.h"
|
||||||
|
#include "XML.h"
|
||||||
|
#include "Interface.h"
|
||||||
|
#include "AimArchives.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
PARSE_STAGE curElement;
|
||||||
|
|
||||||
|
CHAR8 szCharData[MAX_CHAR_DATA_LENGTH+1];
|
||||||
|
OLD_MERC_ARCHIVES_VALUES curAimOldArchives;
|
||||||
|
OLD_MERC_ARCHIVES_VALUES * curArray;
|
||||||
|
|
||||||
|
UINT32 maxArraySize;
|
||||||
|
UINT32 curIndex;
|
||||||
|
UINT32 currentDepth;
|
||||||
|
UINT32 maxReadDepth;
|
||||||
|
}
|
||||||
|
typedef aimOldArchivesParseData;
|
||||||
|
|
||||||
|
BOOLEAN AimOldArchives_TextOnly;
|
||||||
|
|
||||||
|
static void XMLCALL
|
||||||
|
aimOldArchivesStartElementHandle(void *userData, const XML_Char *name, const XML_Char **atts)
|
||||||
|
{
|
||||||
|
aimOldArchivesParseData * pData = (aimOldArchivesParseData *)userData;
|
||||||
|
|
||||||
|
if(pData->currentDepth <= pData->maxReadDepth) //are we reading this element?
|
||||||
|
{
|
||||||
|
if(strcmp(name, "OLD_MERC") == 0 && pData->curElement == ELEMENT_NONE)
|
||||||
|
{
|
||||||
|
pData->curElement = ELEMENT_LIST;
|
||||||
|
|
||||||
|
pData->maxReadDepth++; //we are not skipping this element
|
||||||
|
}
|
||||||
|
else if(strcmp(name, "MERC") == 0 && pData->curElement == ELEMENT_LIST)
|
||||||
|
{
|
||||||
|
pData->curElement = ELEMENT;
|
||||||
|
|
||||||
|
pData->maxReadDepth++; //we are not skipping this element
|
||||||
|
}
|
||||||
|
else if(pData->curElement == ELEMENT &&
|
||||||
|
(strcmp(name, "uiIndex") == 0 ||
|
||||||
|
strcmp(name, "NickName") == 0 ||
|
||||||
|
strcmp(name, "Name") == 0 ||
|
||||||
|
strcmp(name, "Bio") == 0 ||
|
||||||
|
strcmp(name, "FaceID") == 0 ))
|
||||||
|
{
|
||||||
|
pData->curElement = ELEMENT_PROPERTY;
|
||||||
|
|
||||||
|
pData->maxReadDepth++; //we are not skipping this element
|
||||||
|
}
|
||||||
|
|
||||||
|
pData->szCharData[0] = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
|
pData->currentDepth++;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static void XMLCALL
|
||||||
|
aimOldArchivesCharacterDataHandle(void *userData, const XML_Char *str, int len)
|
||||||
|
{
|
||||||
|
aimOldArchivesParseData * pData = (aimOldArchivesParseData *)userData;
|
||||||
|
|
||||||
|
if( (pData->currentDepth <= pData->maxReadDepth) &&
|
||||||
|
(strlen(pData->szCharData) < MAX_CHAR_DATA_LENGTH)
|
||||||
|
){
|
||||||
|
strncat(pData->szCharData,str,__min((unsigned int)len,MAX_CHAR_DATA_LENGTH-strlen(pData->szCharData)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void XMLCALL
|
||||||
|
aimOldArchivesEndElementHandle(void *userData, const XML_Char *name)
|
||||||
|
{
|
||||||
|
aimOldArchivesParseData * pData = (aimOldArchivesParseData *)userData;
|
||||||
|
|
||||||
|
if(pData->currentDepth <= pData->maxReadDepth)
|
||||||
|
{
|
||||||
|
if(strcmp(name, "OLD_MERC") == 0)
|
||||||
|
{
|
||||||
|
pData->curElement = ELEMENT_NONE;
|
||||||
|
}
|
||||||
|
else if(strcmp(name, "MERC") == 0)
|
||||||
|
{
|
||||||
|
pData->curElement = ELEMENT_LIST;
|
||||||
|
|
||||||
|
if (!AimOldArchives_TextOnly)
|
||||||
|
{
|
||||||
|
gAimOldArchives[pData->curAimOldArchives.uiIndex].uiIndex = pData->curAimOldArchives.uiIndex;
|
||||||
|
gAimOldArchives[pData->curAimOldArchives.uiIndex].FaceID = pData->curAimOldArchives.FaceID;
|
||||||
|
wcscpy(gAimOldArchives[pData->curAimOldArchives.uiIndex].szBio, pData->curAimOldArchives.szBio);
|
||||||
|
wcscpy(gAimOldArchives[pData->curAimOldArchives.uiIndex].szName, pData->curAimOldArchives.szName);
|
||||||
|
wcscpy(gAimOldArchives[pData->curAimOldArchives.uiIndex].szNickName, pData->curAimOldArchives.szNickName);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// gAimOldArchives[pData->curAimOldArchives.uiIndex].uiIndex = pData->curAimOldArchives.uiIndex;
|
||||||
|
// gAimOldArchives[pData->curAimOldArchives.uiIndex].FaceID = pData->curAimOldArchives.FaceID;
|
||||||
|
|
||||||
|
wcscpy(gAimOldArchives[pData->curAimOldArchives.uiIndex].szBio, pData->curAimOldArchives.szBio);
|
||||||
|
wcscpy(gAimOldArchives[pData->curAimOldArchives.uiIndex].szName, pData->curAimOldArchives.szName);
|
||||||
|
wcscpy(gAimOldArchives[pData->curAimOldArchives.uiIndex].szNickName, pData->curAimOldArchives.szNickName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(strcmp(name, "uiIndex") == 0)
|
||||||
|
{
|
||||||
|
pData->curElement = ELEMENT;
|
||||||
|
pData->curAimOldArchives.uiIndex = (UINT8) atol(pData->szCharData);
|
||||||
|
}
|
||||||
|
else if(strcmp(name, "NickName") == 0)
|
||||||
|
{
|
||||||
|
|
||||||
|
pData->curElement = ELEMENT;
|
||||||
|
|
||||||
|
MultiByteToWideChar( CP_UTF8, 0, pData->szCharData, -1, pData->curAimOldArchives.szNickName, sizeof(pData->curAimOldArchives.szNickName)/sizeof(pData->curAimOldArchives.szNickName[0]) );
|
||||||
|
pData->curAimOldArchives.szNickName[sizeof(pData->curAimOldArchives.szNickName)/sizeof(pData->curAimOldArchives.szNickName[0]) - 1] = '\0';
|
||||||
|
|
||||||
|
}
|
||||||
|
else if(strcmp(name, "Name") == 0)
|
||||||
|
{
|
||||||
|
|
||||||
|
pData->curElement = ELEMENT;
|
||||||
|
|
||||||
|
MultiByteToWideChar( CP_UTF8, 0, pData->szCharData, -1, pData->curAimOldArchives.szName, sizeof(pData->curAimOldArchives.szName)/sizeof(pData->curAimOldArchives.szName[0]) );
|
||||||
|
pData->curAimOldArchives.szName[sizeof(pData->curAimOldArchives.szName)/sizeof(pData->curAimOldArchives.szName[0]) - 1] = '\0';
|
||||||
|
|
||||||
|
}
|
||||||
|
else if(strcmp(name, "Bio") == 0)
|
||||||
|
{
|
||||||
|
|
||||||
|
pData->curElement = ELEMENT;
|
||||||
|
|
||||||
|
MultiByteToWideChar( CP_UTF8, 0, pData->szCharData, -1, pData->curAimOldArchives.szBio, sizeof(pData->curAimOldArchives.szBio)/sizeof(pData->curAimOldArchives.szBio[0]) );
|
||||||
|
pData->curAimOldArchives.szBio[sizeof(pData->curAimOldArchives.szBio)/sizeof(pData->curAimOldArchives.szBio[0]) - 1] = '\0';
|
||||||
|
|
||||||
|
}
|
||||||
|
else if(strcmp(name, "FaceID") == 0)
|
||||||
|
{
|
||||||
|
pData->curElement = ELEMENT;
|
||||||
|
pData->curAimOldArchives.FaceID = (INT16) atol(pData->szCharData);
|
||||||
|
}
|
||||||
|
|
||||||
|
pData->maxReadDepth--;
|
||||||
|
}
|
||||||
|
pData->currentDepth--;
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOLEAN ReadInAimOldArchive(STR fileName, BOOLEAN localizedVersion)
|
||||||
|
{
|
||||||
|
HWFILE hFile;
|
||||||
|
UINT32 uiBytesRead;
|
||||||
|
UINT32 uiFSize;
|
||||||
|
CHAR8 * lpcBuffer;
|
||||||
|
XML_Parser parser = XML_ParserCreate(NULL);
|
||||||
|
|
||||||
|
aimOldArchivesParseData pData;
|
||||||
|
|
||||||
|
DebugMsg(TOPIC_JA2, DBG_LEVEL_3, "Loading OldAIMArchive.xml" );
|
||||||
|
|
||||||
|
AimOldArchives_TextOnly = localizedVersion;
|
||||||
|
|
||||||
|
// Open file
|
||||||
|
hFile = FileOpen( fileName, FILE_ACCESS_READ, FALSE );
|
||||||
|
if ( !hFile )
|
||||||
|
return( localizedVersion );
|
||||||
|
|
||||||
|
uiFSize = FileGetSize(hFile);
|
||||||
|
lpcBuffer = (CHAR8 *) MemAlloc(uiFSize+1);
|
||||||
|
|
||||||
|
//Read in block
|
||||||
|
if ( !FileRead( hFile, lpcBuffer, uiFSize, &uiBytesRead ) )
|
||||||
|
{
|
||||||
|
MemFree(lpcBuffer);
|
||||||
|
return( FALSE );
|
||||||
|
}
|
||||||
|
|
||||||
|
lpcBuffer[uiFSize] = 0; //add a null terminator
|
||||||
|
|
||||||
|
FileClose( hFile );
|
||||||
|
|
||||||
|
|
||||||
|
XML_SetElementHandler(parser, aimOldArchivesStartElementHandle, aimOldArchivesEndElementHandle);
|
||||||
|
XML_SetCharacterDataHandler(parser, aimOldArchivesCharacterDataHandle);
|
||||||
|
|
||||||
|
|
||||||
|
memset(&pData,0,sizeof(pData));
|
||||||
|
XML_SetUserData(parser, &pData);
|
||||||
|
|
||||||
|
|
||||||
|
if(!XML_Parse(parser, lpcBuffer, uiFSize, TRUE))
|
||||||
|
{
|
||||||
|
CHAR8 errorBuf[511];
|
||||||
|
|
||||||
|
sprintf(errorBuf, "XML Parser Error in OldAIMArchive.xml: %s at line %d", XML_ErrorString(XML_GetErrorCode(parser)), XML_GetCurrentLineNumber(parser));
|
||||||
|
LiveMessage(errorBuf);
|
||||||
|
|
||||||
|
MemFree(lpcBuffer);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
MemFree(lpcBuffer);
|
||||||
|
|
||||||
|
|
||||||
|
XML_ParserFree(parser);
|
||||||
|
|
||||||
|
|
||||||
|
return( TRUE );
|
||||||
|
}
|
||||||
+4
-1
@@ -5596,13 +5596,16 @@ void PreProcessEmail( EmailPtr pMail )
|
|||||||
// WANNE: Get the text and replace name!
|
// WANNE: Get the text and replace name!
|
||||||
int iNew113MERCMerc = 0;
|
int iNew113MERCMerc = 0;
|
||||||
int iNew113AIMMerc = 0;
|
int iNew113AIMMerc = 0;
|
||||||
|
|
||||||
int iEmailMERCMessage = 0;
|
int iEmailMERCMessage = 0;
|
||||||
int iEmailAIMMessage = 0;
|
int iEmailAIMMessage = 0;
|
||||||
int iEmailOther = 0;
|
int iEmailOther = 0;
|
||||||
int iEmailBobbyRMessage = 0;
|
int iEmailBobbyRMessage = 0;
|
||||||
int iEmailInsurance = 0;
|
int iEmailInsurance = 0;
|
||||||
int iNew113CustomUserMerc = 0;
|
int iNew113CustomUserMerc = 0;
|
||||||
if ( pMail->EmailVersion == TYPE_EMAIL_EMAIL_EDT )
|
|
||||||
|
|
||||||
|
if ( pMail->EmailVersion == TYPE_EMAIL_EMAIL_EDT )
|
||||||
{
|
{
|
||||||
if (pMail->usLength == MERC_UP_LEVEL_GASTON || pMail->usLength == MERC_UP_LEVEL_STOGIE ||
|
if (pMail->usLength == MERC_UP_LEVEL_GASTON || pMail->usLength == MERC_UP_LEVEL_STOGIE ||
|
||||||
pMail->usLength == MERC_UP_LEVEL_TEX || pMail->usLength == MERC_UP_LEVEL_BIGGENS)
|
pMail->usLength == MERC_UP_LEVEL_TEX || pMail->usLength == MERC_UP_LEVEL_BIGGENS)
|
||||||
|
|||||||
@@ -1257,7 +1257,7 @@ void HandleFloristOrderKeyBoardInput()
|
|||||||
{
|
{
|
||||||
InputAtom InputEvent;
|
InputAtom InputEvent;
|
||||||
|
|
||||||
while (DequeueEvent(&InputEvent) == TRUE)
|
while (DequeueSpecificEvent(&InputEvent, KEY_DOWN|KEY_UP|KEY_REPEAT))
|
||||||
{
|
{
|
||||||
if( !HandleTextInput( &InputEvent ) && InputEvent.usEvent == KEY_DOWN )
|
if( !HandleTextInput( &InputEvent ) && InputEvent.usEvent == KEY_DOWN )
|
||||||
{
|
{
|
||||||
|
|||||||
+38
-14
@@ -502,6 +502,9 @@ BOOLEAN gfWWWaitSubSitesVisitedFlags[LAPTOP_MODE_SIRTECH - LAPTOP_MODE_WWW ];
|
|||||||
|
|
||||||
//INT32 iBookMarkList[MAX_BOOKMARKS];
|
//INT32 iBookMarkList[MAX_BOOKMARKS];
|
||||||
|
|
||||||
|
// flag to see if mouse is captured in the laptop's area or not
|
||||||
|
BOOLEAN fMouseCaptured;
|
||||||
|
|
||||||
// mouse regions
|
// mouse regions
|
||||||
MOUSE_REGION gEmailRegion;
|
MOUSE_REGION gEmailRegion;
|
||||||
MOUSE_REGION gWWWRegion;
|
MOUSE_REGION gWWWRegion;
|
||||||
@@ -821,6 +824,8 @@ UINT32 LaptopScreenInit()
|
|||||||
|
|
||||||
gfAtLeastOneMercWasHired = FALSE;
|
gfAtLeastOneMercWasHired = FALSE;
|
||||||
|
|
||||||
|
fMouseCaptured = TRUE;
|
||||||
|
|
||||||
//No longer inits the laptop screens, now InitLaptopAndLaptopScreens() does
|
//No longer inits the laptop screens, now InitLaptopAndLaptopScreens() does
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
InitJa25SaveStruct();
|
InitJa25SaveStruct();
|
||||||
@@ -1117,6 +1122,7 @@ void ExitLaptop()
|
|||||||
//}
|
//}
|
||||||
|
|
||||||
// release cursor
|
// release cursor
|
||||||
|
fMouseCaptured = false;
|
||||||
FreeMouseCursor( );
|
FreeMouseCursor( );
|
||||||
|
|
||||||
// set the fact we are currently not in laptop, for rendering purposes
|
// set the fact we are currently not in laptop, for rendering purposes
|
||||||
@@ -2059,16 +2065,16 @@ UINT32 LaptopScreenHandle()
|
|||||||
//created in LaptopScreenInit()
|
//created in LaptopScreenInit()
|
||||||
|
|
||||||
// Correct the minor cosmetic bug (laptop zooming start not correct)
|
// Correct the minor cosmetic bug (laptop zooming start not correct)
|
||||||
if (iResolution == 0)
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
{
|
{
|
||||||
sXOffset = -2;
|
sXOffset = -2;
|
||||||
sYOffset = -2;
|
sYOffset = -2;
|
||||||
}
|
}
|
||||||
else if (iResolution == 1)
|
else if (iResolution < _1024x768)
|
||||||
{
|
{
|
||||||
sYOffset = -1;
|
sYOffset = -1;
|
||||||
}
|
}
|
||||||
else if (iResolution == 2)
|
else
|
||||||
{
|
{
|
||||||
sXOffset = 2;
|
sXOffset = 2;
|
||||||
sYOffset = 1;
|
sYOffset = 1;
|
||||||
@@ -2122,17 +2128,16 @@ UINT32 LaptopScreenHandle()
|
|||||||
DstRect.iTop = iScreenHeightOffset; //0
|
DstRect.iTop = iScreenHeightOffset; //0
|
||||||
DstRect.iRight = iScreenWidthOffset + 640; //640
|
DstRect.iRight = iScreenWidthOffset + 640; //640
|
||||||
DstRect.iBottom = iScreenHeightOffset + 480; //480
|
DstRect.iBottom = iScreenHeightOffset + 480; //480
|
||||||
iLaptopMonitorCenterX = SCREEN_WIDTH - 184 + 19 + sXOffset;
|
|
||||||
|
iLaptopMonitorCenterX = SCREEN_WIDTH - 184 + 19 + sXOffset - xResOffset;
|
||||||
iLaptopMonitorCenterY = SCREEN_HEIGHT - 70 + 16 + sYOffset;
|
iLaptopMonitorCenterY = SCREEN_HEIGHT - 70 + 16 + sYOffset;
|
||||||
|
|
||||||
uiTimeRange = 1000;
|
uiTimeRange = 1000;
|
||||||
iPercentage = iRealPercentage = 0;
|
iPercentage = iRealPercentage = 0;
|
||||||
uiStartTime = GetJA2Clock();
|
uiStartTime = GetJA2Clock();
|
||||||
|
|
||||||
BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, iScreenWidthOffset, iScreenHeightOffset,
|
BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, iScreenWidthOffset, iScreenHeightOffset,
|
||||||
640, 480 );
|
640, 480 );
|
||||||
// Lesh: moved into loop
|
|
||||||
//BlitBufferToBuffer( guiEXTRABUFFER, FRAME_BUFFER, iScreenWidthOffset, iScreenHeightOffset,
|
|
||||||
// SCREEN_WIDTH - iScreenWidthOffset, SCREEN_HEIGHT - iScreenHeightOffset );
|
|
||||||
|
|
||||||
PlayJA2SampleFromFile( "SOUNDS\\Laptop power up (8-11).wav", RATE_11025, HIGHVOLUME, 1, MIDDLEPAN );
|
PlayJA2SampleFromFile( "SOUNDS\\Laptop power up (8-11).wav", RATE_11025, HIGHVOLUME, 1, MIDDLEPAN );
|
||||||
|
|
||||||
@@ -2195,7 +2200,10 @@ UINT32 LaptopScreenHandle()
|
|||||||
RestoreBackgroundRects();
|
RestoreBackgroundRects();
|
||||||
|
|
||||||
// lock cursor to screen
|
// lock cursor to screen
|
||||||
RestrictMouseCursor( &LaptopScreenRect );
|
if ( fMouseCaptured == TRUE )
|
||||||
|
{
|
||||||
|
RestrictMouseCursor( &LaptopScreenRect );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -2399,7 +2407,6 @@ UINT32 LaptopScreenHandle()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
UINT32 RenderLaptopPanel()
|
UINT32 RenderLaptopPanel()
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -2763,16 +2770,16 @@ BOOLEAN LeaveLapTopScreen( void )
|
|||||||
INT16 sXOffset = 0;
|
INT16 sXOffset = 0;
|
||||||
|
|
||||||
// Correct the minor cosmetic bug (laptop zooming start not correct)
|
// Correct the minor cosmetic bug (laptop zooming start not correct)
|
||||||
if (iResolution == 0)
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
{
|
{
|
||||||
sXOffset = -2;
|
sXOffset = -2;
|
||||||
sYOffset = -2;
|
sYOffset = -2;
|
||||||
}
|
}
|
||||||
else if (iResolution == 1)
|
else if (iResolution < _1024x768)
|
||||||
{
|
{
|
||||||
sYOffset = -1;
|
sYOffset = -1;
|
||||||
}
|
}
|
||||||
else if (iResolution == 2)
|
else
|
||||||
{
|
{
|
||||||
sXOffset = 2;
|
sXOffset = 2;
|
||||||
sYOffset = 1;
|
sYOffset = 1;
|
||||||
@@ -2837,8 +2844,10 @@ BOOLEAN LeaveLapTopScreen( void )
|
|||||||
DstRect.iTop = iScreenHeightOffset + 0; // 0
|
DstRect.iTop = iScreenHeightOffset + 0; // 0
|
||||||
DstRect.iRight = iScreenWidthOffset + 640; // 640
|
DstRect.iRight = iScreenWidthOffset + 640; // 640
|
||||||
DstRect.iBottom = iScreenHeightOffset + 480; // 480
|
DstRect.iBottom = iScreenHeightOffset + 480; // 480
|
||||||
iLaptopMonitorCenterX = SCREEN_WIDTH - 184 + 19 + sXOffset;
|
|
||||||
|
iLaptopMonitorCenterX = SCREEN_WIDTH - 184 + 19 + sXOffset - xResOffset;
|
||||||
iLaptopMonitorCenterY = SCREEN_HEIGHT - 70 + 16 + sYOffset;
|
iLaptopMonitorCenterY = SCREEN_HEIGHT - 70 + 16 + sYOffset;
|
||||||
|
|
||||||
uiTimeRange = 1000;
|
uiTimeRange = 1000;
|
||||||
iPercentage = iRealPercentage = 100;
|
iPercentage = iRealPercentage = 100;
|
||||||
uiStartTime = GetJA2Clock();
|
uiStartTime = GetJA2Clock();
|
||||||
@@ -2901,7 +2910,6 @@ BOOLEAN LeaveLapTopScreen( void )
|
|||||||
return( TRUE );
|
return( TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BOOLEAN HandleExit( void )
|
BOOLEAN HandleExit( void )
|
||||||
{
|
{
|
||||||
// static BOOLEAN fSentImpWarningAlready = FALSE;
|
// static BOOLEAN fSentImpWarningAlready = FALSE;
|
||||||
@@ -6025,7 +6033,23 @@ void HandleKeyBoardShortCutsForLapTop( UINT16 usEvent, UINT32 usParam, UINT16 us
|
|||||||
MarkButtonsDirty( );
|
MarkButtonsDirty( );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if( ( ( usEvent == KEY_DOWN ) || ( usEvent == KEY_REPEAT ) ) && ( ( usParam == 'z' ) || ( usParam == 'Z' ) || ( usParam == 'y' ) || ( usParam == 'Y' ) ) )
|
||||||
|
{
|
||||||
|
if ( usKeyState & CTRL_DOWN )
|
||||||
|
{
|
||||||
|
if ( fMouseCaptured == TRUE )
|
||||||
|
{
|
||||||
|
fMouseCaptured = FALSE;
|
||||||
|
FreeMouseCursor( );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fMouseCaptured = TRUE;
|
||||||
|
RestrictMouseCursor( &LaptopScreenRect );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef JA2TESTVERSION
|
#ifdef JA2TESTVERSION
|
||||||
else if ((usEvent == KEY_DOWN )&& ( usParam == 'd' ))
|
else if ((usEvent == KEY_DOWN )&& ( usParam == 'd' ))
|
||||||
|
|||||||
Binary file not shown.
+79
-11
@@ -81,6 +81,9 @@
|
|||||||
#define FACES_DIR "FACES\\BIGFACES\\"
|
#define FACES_DIR "FACES\\BIGFACES\\"
|
||||||
#define SMALL_FACES_DIR "FACES\\"
|
#define SMALL_FACES_DIR "FACES\\"
|
||||||
|
|
||||||
|
#define IMP_FACES_DIR "IMPFACES\\BIGFACES\\"
|
||||||
|
#define IMP_SMALL_FACES_DIR "IMPFACES\\"
|
||||||
|
|
||||||
#define NEXT_MERC_FACE_X LAPTOP_SCREEN_UL_X + 448
|
#define NEXT_MERC_FACE_X LAPTOP_SCREEN_UL_X + 448
|
||||||
#define MERC_FACE_SCROLL_Y LAPTOP_SCREEN_UL_Y + 150
|
#define MERC_FACE_SCROLL_Y LAPTOP_SCREEN_UL_Y + 150
|
||||||
#define PREV_MERC_FACE_X LAPTOP_SCREEN_UL_X + 285
|
#define PREV_MERC_FACE_X LAPTOP_SCREEN_UL_X + 285
|
||||||
@@ -834,13 +837,22 @@ void RenderPersonnelFace(INT32 iId, INT32 iSlot, BOOLEAN fDead, BOOLEAN fFired,
|
|||||||
// special case?..player generated merc
|
// special case?..player generated merc
|
||||||
if (fCurrentTeamMode)
|
if (fCurrentTeamMode)
|
||||||
{
|
{
|
||||||
if( ( 50 < profileId )&&( 57 > profileId ) )
|
//if( ( 50 < profileId )&&( 57 > profileId ) )
|
||||||
|
if ( ( profileId >= 0 ) && ( profileId < 100 ) && ( gProfilesIMP[ profileId ].ProfilId == profileId ) )
|
||||||
{
|
{
|
||||||
sprintf( sTemp, "%s%03d.sti", FACES_DIR, gMercProfiles[profileId].ubFaceIndex );
|
sprintf( sTemp, "%s%02d.sti", IMP_FACES_DIR, gMercProfiles[profileId].ubFaceIndex );
|
||||||
|
}
|
||||||
|
else if ( ( profileId > 99 ) && ( gProfilesIMP[ profileId ].ProfilId == profileId ) )
|
||||||
|
{
|
||||||
|
sprintf(sTemp, "%s%03d.sti", IMP_FACES_DIR, gMercProfiles[profileId].ubFaceIndex);
|
||||||
|
}
|
||||||
|
else if ( ( profileId >= 0 ) && ( profileId < 100 ) )
|
||||||
|
{
|
||||||
|
sprintf(sTemp, "%s%02d.sti", FACES_DIR, gMercProfiles[profileId].ubFaceIndex);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sprintf(sTemp, "%s%02d.sti", FACES_DIR, gMercProfiles[profileId].ubFaceIndex);
|
sprintf(sTemp, "%s%03d.sti", FACES_DIR, gMercProfiles[profileId].ubFaceIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Check if needed!
|
// TODO: Check if needed!
|
||||||
@@ -857,7 +869,7 @@ void RenderPersonnelFace(INT32 iId, INT32 iSlot, BOOLEAN fDead, BOOLEAN fFired,
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
if( ( 50 < profileId )&&( 57 > profileId ) )
|
if( ( 50 < profileId )&&( 57 > profileId ) )
|
||||||
{
|
{
|
||||||
sprintf( sTemp, "%s%03d.sti", FACES_DIR, gMercProfiles[profileId].ubFaceIndex );
|
sprintf( sTemp, "%s%03d.sti", FACES_DIR, gMercProfiles[profileId].ubFaceIndex );
|
||||||
@@ -866,6 +878,24 @@ void RenderPersonnelFace(INT32 iId, INT32 iSlot, BOOLEAN fDead, BOOLEAN fFired,
|
|||||||
{
|
{
|
||||||
sprintf(sTemp, "%s%02d.sti", FACES_DIR, gMercProfiles[profileId].ubFaceIndex );
|
sprintf(sTemp, "%s%02d.sti", FACES_DIR, gMercProfiles[profileId].ubFaceIndex );
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
if ( ( profileId >= 0 ) && ( profileId < 100 ) && ( gProfilesIMP[ profileId ].ProfilId == profileId ) )
|
||||||
|
{
|
||||||
|
sprintf( sTemp, "%s%02d.sti", IMP_FACES_DIR, gMercProfiles[profileId].ubFaceIndex );
|
||||||
|
}
|
||||||
|
else if ( ( profileId > 99 ) && ( gProfilesIMP[ profileId ].ProfilId == profileId ) )
|
||||||
|
{
|
||||||
|
sprintf(sTemp, "%s%03d.sti", IMP_FACES_DIR, gMercProfiles[profileId].ubFaceIndex);
|
||||||
|
}
|
||||||
|
else if ( ( profileId >= 0 ) && ( profileId < 100 ) )
|
||||||
|
{
|
||||||
|
sprintf(sTemp, "%s%02d.sti", FACES_DIR, gMercProfiles[profileId].ubFaceIndex);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sprintf(sTemp, "%s%03d.sti", FACES_DIR, gMercProfiles[profileId].ubFaceIndex);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||||
@@ -1778,7 +1808,7 @@ void DisplayCharStats(INT32 iId, INT32 iSlot)
|
|||||||
|
|
||||||
for ( UINT8 ubCnt = 0; ubCnt < bNumSkillTraits; ubCnt++ )
|
for ( UINT8 ubCnt = 0; ubCnt < bNumSkillTraits; ubCnt++ )
|
||||||
{
|
{
|
||||||
if ( ubCnt >= 4 && bNumSkillTraits > 4 )
|
if ( ubCnt >= 4 && bNumSkillTraits > 5 )
|
||||||
{
|
{
|
||||||
fDisplayMoreTraits = TRUE;
|
fDisplayMoreTraits = TRUE;
|
||||||
swprintf( sString, L"%s\n", gzMercSkillTextNew[ ubTempSkillArray[ubCnt] ] );
|
swprintf( sString, L"%s\n", gzMercSkillTextNew[ ubTempSkillArray[ubCnt] ] );
|
||||||
@@ -2175,6 +2205,25 @@ void DisplayPicturesOfCurrentTeam( void )
|
|||||||
} // if
|
} // if
|
||||||
|
|
||||||
SOLDIERTYPE *pSoldier = MercPtrs[currentTeamList[currentOnSreenIndex]];
|
SOLDIERTYPE *pSoldier = MercPtrs[currentTeamList[currentOnSreenIndex]];
|
||||||
|
|
||||||
|
if ( ( pSoldier->ubProfile >= 0 ) && ( pSoldier->ubProfile < 100 ) && ( gProfilesIMP[ pSoldier->ubProfile ].ProfilId == pSoldier->ubProfile ) )
|
||||||
|
{
|
||||||
|
sprintf( sTemp, "%s%02d.sti", IMP_SMALL_FACES_DIR, gMercProfiles[pSoldier->ubProfile].ubFaceIndex );
|
||||||
|
}
|
||||||
|
else if ( ( pSoldier->ubProfile > 99 ) && ( gProfilesIMP[ pSoldier->ubProfile ].ProfilId == pSoldier->ubProfile ) )
|
||||||
|
{
|
||||||
|
sprintf(sTemp, "%s%03d.sti", IMP_SMALL_FACES_DIR, gMercProfiles[pSoldier->ubProfile].ubFaceIndex);
|
||||||
|
}
|
||||||
|
else if ( ( pSoldier->ubProfile >= 0 ) && ( pSoldier->ubProfile < 100 ))
|
||||||
|
{
|
||||||
|
sprintf(sTemp, "%s%02d.sti", SMALL_FACES_DIR, gMercProfiles[pSoldier->ubProfile].ubFaceIndex);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sprintf(sTemp, "%s%03d.sti", SMALL_FACES_DIR, gMercProfiles[pSoldier->ubProfile].ubFaceIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
if ((50 < pSoldier->ubProfile) && (57 > pSoldier->ubProfile))
|
if ((50 < pSoldier->ubProfile) && (57 > pSoldier->ubProfile))
|
||||||
{
|
{
|
||||||
sprintf( sTemp, "%s%03d.sti", SMALL_FACES_DIR, gMercProfiles[ pSoldier->ubProfile ].ubFaceIndex );
|
sprintf( sTemp, "%s%03d.sti", SMALL_FACES_DIR, gMercProfiles[ pSoldier->ubProfile ].ubFaceIndex );
|
||||||
@@ -2190,7 +2239,7 @@ void DisplayPicturesOfCurrentTeam( void )
|
|||||||
sprintf(sTemp, "%s%03d.sti", SMALL_FACES_DIR, gMercProfiles[ pSoldier->ubProfile ].ubFaceIndex);
|
sprintf(sTemp, "%s%03d.sti", SMALL_FACES_DIR, gMercProfiles[ pSoldier->ubProfile ].ubFaceIndex);
|
||||||
} // else
|
} // else
|
||||||
} // else
|
} // else
|
||||||
|
*/
|
||||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||||
FilenameForBPP(sTemp, VObjectDesc.ImageFile);
|
FilenameForBPP(sTemp, VObjectDesc.ImageFile);
|
||||||
CHECKV(AddVideoObject(&VObjectDesc, &guiFACE));
|
CHECKV(AddVideoObject(&VObjectDesc, &guiFACE));
|
||||||
@@ -4731,6 +4780,25 @@ void DisplayPortraitOfPastMerc( INT32 iId , INT32 iCounter, BOOLEAN fDead, BOOLE
|
|||||||
HVOBJECT hFaceHandle;
|
HVOBJECT hFaceHandle;
|
||||||
VOBJECT_DESC VObjectDesc;
|
VOBJECT_DESC VObjectDesc;
|
||||||
|
|
||||||
|
|
||||||
|
if ( ( iId >= 0 ) && ( iId < 100 ) && ( gProfilesIMP[ iId ].ProfilId == iId ) )
|
||||||
|
{
|
||||||
|
sprintf( sTemp, "%s%02d.sti", IMP_FACES_DIR, gMercProfiles[iId].ubFaceIndex );
|
||||||
|
}
|
||||||
|
else if ( ( iId > 99 ) && ( gProfilesIMP[ iId ].ProfilId == iId ) )
|
||||||
|
{
|
||||||
|
sprintf(sTemp, "%s%03d.sti", IMP_FACES_DIR, gMercProfiles[iId].ubFaceIndex);
|
||||||
|
}
|
||||||
|
else if ( ( iId >= 0 ) && ( iId < 100 ))
|
||||||
|
{
|
||||||
|
sprintf(sTemp, "%s%02d.sti", FACES_DIR, gMercProfiles[iId].ubFaceIndex);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sprintf(sTemp, "%s%03d.sti", FACES_DIR, gMercProfiles[iId].ubFaceIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
if( ( 50 < iId )&&( 57 > iId ) )
|
if( ( 50 < iId )&&( 57 > iId ) )
|
||||||
{
|
{
|
||||||
sprintf( sTemp, "%s%03d.sti", SMALL_FACES_DIR, gMercProfiles[ iId ].ubFaceIndex );
|
sprintf( sTemp, "%s%03d.sti", SMALL_FACES_DIR, gMercProfiles[ iId ].ubFaceIndex );
|
||||||
@@ -4746,7 +4814,7 @@ void DisplayPortraitOfPastMerc( INT32 iId , INT32 iCounter, BOOLEAN fDead, BOOLE
|
|||||||
sprintf(sTemp, "%s%03d.sti", SMALL_FACES_DIR, gMercProfiles[ iId ].ubFaceIndex );
|
sprintf(sTemp, "%s%03d.sti", SMALL_FACES_DIR, gMercProfiles[ iId ].ubFaceIndex );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||||
FilenameForBPP(sTemp, VObjectDesc.ImageFile);
|
FilenameForBPP(sTemp, VObjectDesc.ImageFile);
|
||||||
CHECKV(AddVideoObject(&VObjectDesc, &guiFACE));
|
CHECKV(AddVideoObject(&VObjectDesc, &guiFACE));
|
||||||
@@ -6351,7 +6419,7 @@ void HandlePersonnelKeyboard( void )
|
|||||||
GetCursorPos(&MousePos);
|
GetCursorPos(&MousePos);
|
||||||
ScreenToClient(ghWindow, &MousePos); // In window coords!
|
ScreenToClient(ghWindow, &MousePos); // In window coords!
|
||||||
|
|
||||||
while (DequeueEvent(&InputEvent) == TRUE)
|
while (DequeueSpecificEvent(&InputEvent, KEY_DOWN|KEY_UP|KEY_REPEAT))
|
||||||
{
|
{
|
||||||
if ( (InputEvent.usEvent == KEY_DOWN ) && (InputEvent.usParam >= '0' ) && ( InputEvent.usParam <= '9') )
|
if ( (InputEvent.usEvent == KEY_DOWN ) && (InputEvent.usParam >= '0' ) && ( InputEvent.usParam <= '9') )
|
||||||
{
|
{
|
||||||
@@ -7323,7 +7391,7 @@ void AssignPersonnelSkillTraitHelpText( UINT8 ubTraitNumber, BOOLEAN fExpertLeve
|
|||||||
wcscat( apStr, atStr );
|
wcscat( apStr, atStr );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if( gSkillTraitValues.ubMAReducedAPsRegisteredWhenMoving != 0 && gGameExternalOptions.fImprovedInterruptSystem )
|
if( gSkillTraitValues.ubMAReducedAPsRegisteredWhenMoving != 0 && gGameOptions.fImprovedInterruptSystem )
|
||||||
{
|
{
|
||||||
swprintf( atStr, gzIMPMajorTraitsHelpTextsMartialArts[27], ( gSkillTraitValues.ubMAReducedAPsRegisteredWhenMoving * (fExpertLevel ? 2 : 1)), L"%");
|
swprintf( atStr, gzIMPMajorTraitsHelpTextsMartialArts[27], ( gSkillTraitValues.ubMAReducedAPsRegisteredWhenMoving * (fExpertLevel ? 2 : 1)), L"%");
|
||||||
wcscat( apStr, atStr );
|
wcscat( apStr, atStr );
|
||||||
@@ -7361,7 +7429,7 @@ void AssignPersonnelSkillTraitHelpText( UINT8 ubTraitNumber, BOOLEAN fExpertLeve
|
|||||||
swprintf( atStr, gzIMPMajorTraitsHelpTextsSquadleader[2], ( gSkillTraitValues.ubSLEffectiveLevelAsStandby * (fExpertLevel ? 2 : 1)));
|
swprintf( atStr, gzIMPMajorTraitsHelpTextsSquadleader[2], ( gSkillTraitValues.ubSLEffectiveLevelAsStandby * (fExpertLevel ? 2 : 1)));
|
||||||
wcscat( apStr, atStr );
|
wcscat( apStr, atStr );
|
||||||
}
|
}
|
||||||
if( gSkillTraitValues.ubSLCollectiveInterruptsBonus != 0 && gGameExternalOptions.fImprovedInterruptSystem )
|
if( gSkillTraitValues.ubSLCollectiveInterruptsBonus != 0 && gGameOptions.fImprovedInterruptSystem )
|
||||||
{
|
{
|
||||||
swprintf( atStr, gzIMPMajorTraitsHelpTextsSquadleader[11], ( gSkillTraitValues.ubSLCollectiveInterruptsBonus * (fExpertLevel ? 2 : 1)), L"%");
|
swprintf( atStr, gzIMPMajorTraitsHelpTextsSquadleader[11], ( gSkillTraitValues.ubSLCollectiveInterruptsBonus * (fExpertLevel ? 2 : 1)), L"%");
|
||||||
wcscat( apStr, atStr );
|
wcscat( apStr, atStr );
|
||||||
@@ -7722,7 +7790,7 @@ void AssignPersonnelSkillTraitHelpText( UINT8 ubTraitNumber, BOOLEAN fExpertLeve
|
|||||||
swprintf( atStr, gzIMPMinorTraitsHelpTextsStealthy[2], gSkillTraitValues.ubSTStealthBonus, L"%");
|
swprintf( atStr, gzIMPMinorTraitsHelpTextsStealthy[2], gSkillTraitValues.ubSTStealthBonus, L"%");
|
||||||
wcscat( apStr, atStr );
|
wcscat( apStr, atStr );
|
||||||
}
|
}
|
||||||
if( gSkillTraitValues.ubSTReducedAPsRegistered != 0 && gGameExternalOptions.fImprovedInterruptSystem )
|
if( gSkillTraitValues.ubSTReducedAPsRegistered != 0 && gGameOptions.fImprovedInterruptSystem )
|
||||||
{
|
{
|
||||||
swprintf( atStr, gzIMPMinorTraitsHelpTextsStealthy[4], gSkillTraitValues.ubSTReducedAPsRegistered, L"%");
|
swprintf( atStr, gzIMPMinorTraitsHelpTextsStealthy[4], gSkillTraitValues.ubSTReducedAPsRegistered, L"%");
|
||||||
wcscat( apStr, atStr );
|
wcscat( apStr, atStr );
|
||||||
|
|||||||
+69
-15
@@ -343,17 +343,18 @@ static void BuildLoadscreenFilename(std::string& dst, const char* path, int reso
|
|||||||
if (path)
|
if (path)
|
||||||
dst.append(path);
|
dst.append(path);
|
||||||
|
|
||||||
switch (resolution)
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
{
|
{
|
||||||
case 1:
|
// Nothing to do here
|
||||||
|
}
|
||||||
|
else if (iResolution < _1024x768)
|
||||||
|
{
|
||||||
dst.append("_800x600");
|
dst.append("_800x600");
|
||||||
break;
|
}
|
||||||
case 2:
|
else
|
||||||
|
{
|
||||||
dst.append("_1024x768");
|
dst.append("_1024x768");
|
||||||
break;
|
}
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ext)
|
if (ext)
|
||||||
{
|
{
|
||||||
@@ -454,7 +455,20 @@ void DisplayLoadScreenWithID( UINT8 ubLoadScreenID )
|
|||||||
|
|
||||||
// Actual image, depending on the resolution
|
// Actual image, depending on the resolution
|
||||||
std::string strBigImage;
|
std::string strBigImage;
|
||||||
BuildLoadscreenFilename(strBigImage, imagePath.c_str(), iResolution, imageFormat.c_str());
|
|
||||||
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
|
{
|
||||||
|
BuildLoadscreenFilename(strBigImage, imagePath.c_str(), 0, imageFormat.c_str());
|
||||||
|
}
|
||||||
|
else if (iResolution < _1024x768)
|
||||||
|
{
|
||||||
|
BuildLoadscreenFilename(strBigImage, imagePath.c_str(), 1, imageFormat.c_str());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
BuildLoadscreenFilename(strBigImage, imagePath.c_str(), 2, imageFormat.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
strBigImage.copy(vs_desc.ImageFile, sizeof(vs_desc.ImageFile)-1);
|
strBigImage.copy(vs_desc.ImageFile, sizeof(vs_desc.ImageFile)-1);
|
||||||
|
|
||||||
|
|
||||||
@@ -467,7 +481,20 @@ void DisplayLoadScreenWithID( UINT8 ubLoadScreenID )
|
|||||||
strSmallImage.copy(smallImage, sizeof(smallImage)-1);
|
strSmallImage.copy(smallImage, sizeof(smallImage)-1);
|
||||||
|
|
||||||
// Actual image, depending on the resolution
|
// Actual image, depending on the resolution
|
||||||
BuildLoadscreenFilename(strBigImage, LoadScreenNames[1], iResolution, imageFormat.c_str());
|
|
||||||
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
|
{
|
||||||
|
BuildLoadscreenFilename(strBigImage, LoadScreenNames[1], 0, imageFormat.c_str());
|
||||||
|
}
|
||||||
|
else if (iResolution < _1024x768)
|
||||||
|
{
|
||||||
|
BuildLoadscreenFilename(strBigImage, LoadScreenNames[1], 1, imageFormat.c_str());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
BuildLoadscreenFilename(strBigImage, LoadScreenNames[1], 2, imageFormat.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
strBigImage.copy(vs_desc.ImageFile, sizeof(vs_desc.ImageFile)-1);
|
strBigImage.copy(vs_desc.ImageFile, sizeof(vs_desc.ImageFile)-1);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -480,13 +507,38 @@ void DisplayLoadScreenWithID( UINT8 ubLoadScreenID )
|
|||||||
if (LOADINGSCREEN_NOTHING <= ubLoadScreenID && ubLoadScreenID <= LOADINGSCREEN_NIGHTBALIME)
|
if (LOADINGSCREEN_NOTHING <= ubLoadScreenID && ubLoadScreenID <= LOADINGSCREEN_NIGHTBALIME)
|
||||||
{
|
{
|
||||||
BuildLoadscreenFilename(strSmallImage, LoadScreenNames[ubLoadScreenID], 0, "sti");
|
BuildLoadscreenFilename(strSmallImage, LoadScreenNames[ubLoadScreenID], 0, "sti");
|
||||||
BuildLoadscreenFilename(strBigImage, LoadScreenNames[ubLoadScreenID], iResolution, "sti");
|
|
||||||
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
|
{
|
||||||
|
BuildLoadscreenFilename(strBigImage, LoadScreenNames[ubLoadScreenID], 0, "sti");
|
||||||
|
}
|
||||||
|
else if (iResolution < _1024x768)
|
||||||
|
{
|
||||||
|
BuildLoadscreenFilename(strBigImage, LoadScreenNames[ubLoadScreenID], 1, "sti");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
BuildLoadscreenFilename(strBigImage, LoadScreenNames[ubLoadScreenID], 2, "sti");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// for some reason the heli screen is the default
|
// for some reason the heli screen is the default
|
||||||
BuildLoadscreenFilename(strSmallImage, LoadScreenNames[0], 0, "sti");
|
BuildLoadscreenFilename(strSmallImage, LoadScreenNames[0], 0, "sti");
|
||||||
BuildLoadscreenFilename(strBigImage, LoadScreenNames[0], iResolution, "sti");
|
|
||||||
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
|
{
|
||||||
|
BuildLoadscreenFilename(strBigImage, LoadScreenNames[0], 0, "sti");
|
||||||
|
}
|
||||||
|
else if (iResolution < _1024x768)
|
||||||
|
{
|
||||||
|
BuildLoadscreenFilename(strBigImage, LoadScreenNames[0], 1, "sti");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
BuildLoadscreenFilename(strBigImage, LoadScreenNames[0], 2, "sti");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
strSmallImage.copy(smallImage, sizeof(smallImage)-1);
|
strSmallImage.copy(smallImage, sizeof(smallImage)-1);
|
||||||
@@ -525,10 +577,12 @@ void DisplayLoadScreenWithID( UINT8 ubLoadScreenID )
|
|||||||
GetVideoSurface(&hVSurface, uiLoadScreen);
|
GetVideoSurface(&hVSurface, uiLoadScreen);
|
||||||
|
|
||||||
// Special case->show the small image centered
|
// Special case->show the small image centered
|
||||||
if (iResolution > 0 && bShowSmallImage)
|
if (iResolution > _640x480 && bShowSmallImage)
|
||||||
BltVideoSurfaceToVideoSurface( ghFrameBuffer, hVSurface, 0, iScreenWidthOffset, iScreenHeightOffset, 0, NULL );
|
BltVideoSurfaceToVideoSurface( ghFrameBuffer, hVSurface, 0, iScreenWidthOffset, iScreenHeightOffset, 0, NULL );
|
||||||
else
|
else
|
||||||
BltVideoSurfaceToVideoSurface( ghFrameBuffer, hVSurface, 0, 0, 0, 0, NULL );
|
{
|
||||||
|
BltVideoSurfaceToVideoSurface( ghFrameBuffer, hVSurface, 0, (SCREEN_WIDTH - xResSize) / 2,(SCREEN_HEIGHT - yResSize) / 2, 0, NULL );
|
||||||
|
}
|
||||||
|
|
||||||
DeleteVideoSurfaceFromIndex( uiLoadScreen );
|
DeleteVideoSurfaceFromIndex( uiLoadScreen );
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -757,7 +757,7 @@ UINT32 MPChatScreenHandle( )
|
|||||||
// carter, need key shortcuts for clearing up message boxes
|
// carter, need key shortcuts for clearing up message boxes
|
||||||
// Check for esc
|
// Check for esc
|
||||||
bool bHandled;
|
bool bHandled;
|
||||||
while (DequeueEvent(&InputEvent) == TRUE)
|
while (DequeueSpecificEvent(&InputEvent, KEY_DOWN|KEY_UP|KEY_REPEAT))
|
||||||
{
|
{
|
||||||
bHandled = false;
|
bHandled = false;
|
||||||
if(InputEvent.usEvent == KEY_DOWN )
|
if(InputEvent.usEvent == KEY_DOWN )
|
||||||
|
|||||||
+9
-14
@@ -230,20 +230,15 @@ BOOLEAN EnterMPCScreen()
|
|||||||
|
|
||||||
SetCurrentCursorFromDatabase( CURSOR_NORMAL );
|
SetCurrentCursorFromDatabase( CURSOR_NORMAL );
|
||||||
|
|
||||||
// load the Main trade screen backgroiund image
|
// load the Main trade screen backgroiund image
|
||||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||||
if (iResolution == 0)
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
{
|
|
||||||
FilenameForBPP("INTERFACE\\MPConnect.sti",VObjectDesc.ImageFile);
|
FilenameForBPP("INTERFACE\\MPConnect.sti",VObjectDesc.ImageFile);
|
||||||
}
|
else if (iResolution < _1024x768)
|
||||||
else if (iResolution == 1)
|
|
||||||
{
|
|
||||||
FilenameForBPP("INTERFACE\\MPConnect_800x600.sti",VObjectDesc.ImageFile);
|
FilenameForBPP("INTERFACE\\MPConnect_800x600.sti",VObjectDesc.ImageFile);
|
||||||
}
|
else
|
||||||
else if (iResolution == 2)
|
FilenameForBPP("INTERFACE\\MPConnect_1024x768.sti", VObjectDesc.ImageFile);
|
||||||
{
|
|
||||||
FilenameForBPP("INTERFACE\\MPConnect_1024x768.sti",VObjectDesc.ImageFile);
|
|
||||||
}
|
|
||||||
|
|
||||||
CHECKF(AddVideoObject(&VObjectDesc, &guiMPCMainBackGroundImage ));
|
CHECKF(AddVideoObject(&VObjectDesc, &guiMPCMainBackGroundImage ));
|
||||||
|
|
||||||
@@ -361,8 +356,8 @@ BOOLEAN RenderMPCScreen()
|
|||||||
|
|
||||||
//Get the main background screen graphic and blt it
|
//Get the main background screen graphic and blt it
|
||||||
GetVideoObject(&hPixHandle, guiMPCMainBackGroundImage );
|
GetVideoObject(&hPixHandle, guiMPCMainBackGroundImage );
|
||||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0,0,0, VO_BLT_SRCTRANSPARENCY,NULL);
|
|
||||||
//DisplayLoadScreenWithID( loadscreenID );
|
BltVideoObject(FRAME_BUFFER, hPixHandle, 0,(SCREEN_WIDTH - xResSize)/2,(SCREEN_HEIGHT - yResSize)/2, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
//Shade the background
|
//Shade the background
|
||||||
//ShadowVideoSurfaceRect( FRAME_BUFFER, iScreenWidthOffset, iScreenHeightOffset, iScreenWidthOffset + 640, iScreenHeightOffset + 480 );
|
//ShadowVideoSurfaceRect( FRAME_BUFFER, iScreenWidthOffset, iScreenHeightOffset, iScreenWidthOffset + 640, iScreenHeightOffset + 480 );
|
||||||
@@ -423,7 +418,7 @@ void GetMPCScreenUserInput()
|
|||||||
|
|
||||||
// GetCursorPos(&MousePos);
|
// GetCursorPos(&MousePos);
|
||||||
|
|
||||||
while( DequeueEvent( &Event ) )
|
while (DequeueSpecificEvent(&Event, KEY_DOWN|KEY_UP|KEY_REPEAT))
|
||||||
{
|
{
|
||||||
// check if this event is swallowed by text input, otherwise process key
|
// check if this event is swallowed by text input, otherwise process key
|
||||||
if( Event.usEvent == KEY_DOWN )
|
if( Event.usEvent == KEY_DOWN )
|
||||||
|
|||||||
+10
-13
@@ -234,7 +234,7 @@ void BtnMPHOldTraitsCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
|
|
||||||
BOOLEAN DoMPHMessageBox( UINT8 ubStyle, const STR16 zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback )
|
BOOLEAN DoMPHMessageBox( UINT8 ubStyle, const STR16 zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback )
|
||||||
{
|
{
|
||||||
SGPRect CenteringRect= {0, 0, SCREEN_WIDTH-1, SCREEN_HEIGHT-1 };
|
SGPRect CenteringRect= {0 + xResOffset, 0, SCREEN_WIDTH - xResOffset, SCREEN_HEIGHT };
|
||||||
|
|
||||||
// do message box and return
|
// do message box and return
|
||||||
giMPHMessageBox = DoMessageBox( ubStyle, zString, uiExitScreen, ( UINT16 ) ( usFlags| MSG_BOX_FLAG_USE_CENTERING_RECT ), ReturnCallback, &CenteringRect );
|
giMPHMessageBox = DoMessageBox( ubStyle, zString, uiExitScreen, ( UINT16 ) ( usFlags| MSG_BOX_FLAG_USE_CENTERING_RECT ), ReturnCallback, &CenteringRect );
|
||||||
@@ -1792,21 +1792,17 @@ BOOLEAN EnterMPHScreen()
|
|||||||
|
|
||||||
SetCurrentCursorFromDatabase( CURSOR_NORMAL );
|
SetCurrentCursorFromDatabase( CURSOR_NORMAL );
|
||||||
|
|
||||||
// load the Main trade screen backgroiund image
|
// load the Main trade screen backgroiund image
|
||||||
|
//ColorFillVideoSurfaceArea( FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, Get16BPPColor( FROMRGB( 0, 0, 0 ) ) );
|
||||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||||
|
|
||||||
if (iResolution == 0)
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
{
|
|
||||||
FilenameForBPP("INTERFACE\\OptionsScreenBackGround.sti", VObjectDesc.ImageFile);
|
FilenameForBPP("INTERFACE\\OptionsScreenBackGround.sti", VObjectDesc.ImageFile);
|
||||||
}
|
else if (iResolution < _1024x768)
|
||||||
else if (iResolution == 1)
|
|
||||||
{
|
|
||||||
FilenameForBPP("INTERFACE\\OptionsScreenBackGround_800x600.sti", VObjectDesc.ImageFile);
|
FilenameForBPP("INTERFACE\\OptionsScreenBackGround_800x600.sti", VObjectDesc.ImageFile);
|
||||||
}
|
else
|
||||||
else if (iResolution == 2)
|
|
||||||
{
|
|
||||||
FilenameForBPP("INTERFACE\\OptionsScreenBackGround_1024x768.sti", VObjectDesc.ImageFile);
|
FilenameForBPP("INTERFACE\\OptionsScreenBackGround_1024x768.sti", VObjectDesc.ImageFile);
|
||||||
}
|
|
||||||
|
|
||||||
CHECKF(AddVideoObject(&VObjectDesc, &guiMPHMainBackGroundImage ));
|
CHECKF(AddVideoObject(&VObjectDesc, &guiMPHMainBackGroundImage ));
|
||||||
|
|
||||||
@@ -2615,7 +2611,8 @@ BOOLEAN RenderMPHScreen()
|
|||||||
|
|
||||||
//Get the main background screen graphic and blt it
|
//Get the main background screen graphic and blt it
|
||||||
GetVideoObject(&hPixHandle, guiMPHMainBackGroundImage );
|
GetVideoObject(&hPixHandle, guiMPHMainBackGroundImage );
|
||||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0,0,0, VO_BLT_SRCTRANSPARENCY,NULL);
|
|
||||||
|
BltVideoObject(FRAME_BUFFER, hPixHandle, 0,(SCREEN_WIDTH - xResSize)/2,(SCREEN_HEIGHT - yResSize)/2, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
//Shade the background
|
//Shade the background
|
||||||
ShadowVideoSurfaceRect( FRAME_BUFFER, iScreenWidthOffset, iScreenHeightOffset, iScreenWidthOffset + 640, iScreenHeightOffset + 480 );
|
ShadowVideoSurfaceRect( FRAME_BUFFER, iScreenWidthOffset, iScreenHeightOffset, iScreenWidthOffset + 640, iScreenHeightOffset + 480 );
|
||||||
@@ -2743,7 +2740,7 @@ void GetMPHScreenUserInput()
|
|||||||
|
|
||||||
// GetCursorPos(&MousePos);
|
// GetCursorPos(&MousePos);
|
||||||
|
|
||||||
while( DequeueEvent( &Event ) )
|
while (DequeueSpecificEvent(&Event, KEY_DOWN|KEY_UP|KEY_REPEAT))
|
||||||
{
|
{
|
||||||
// check if this event is swallowed by text input, otherwise process key
|
// check if this event is swallowed by text input, otherwise process key
|
||||||
if( !HandleTextInput( &Event ) && Event.usEvent == KEY_DOWN )
|
if( !HandleTextInput( &Event ) && Event.usEvent == KEY_DOWN )
|
||||||
|
|||||||
+10
-12
@@ -408,20 +408,16 @@ BOOLEAN EnterMPJScreen()
|
|||||||
SetCurrentCursorFromDatabase( CURSOR_NORMAL );
|
SetCurrentCursorFromDatabase( CURSOR_NORMAL );
|
||||||
|
|
||||||
// load the Main trade screen backgroiund image
|
// load the Main trade screen backgroiund image
|
||||||
|
ColorFillVideoSurfaceArea( FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, Get16BPPColor( FROMRGB( 0, 0, 0 ) ) );
|
||||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||||
|
|
||||||
if (iResolution == 0)
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
{
|
|
||||||
FilenameForBPP("INTERFACE\\OptionsScreenBackGround.sti", VObjectDesc.ImageFile);
|
FilenameForBPP("INTERFACE\\OptionsScreenBackGround.sti", VObjectDesc.ImageFile);
|
||||||
}
|
else if (iResolution < _1024x768)
|
||||||
else if (iResolution == 1)
|
|
||||||
{
|
|
||||||
FilenameForBPP("INTERFACE\\OptionsScreenBackGround_800x600.sti", VObjectDesc.ImageFile);
|
FilenameForBPP("INTERFACE\\OptionsScreenBackGround_800x600.sti", VObjectDesc.ImageFile);
|
||||||
}
|
else
|
||||||
else if (iResolution == 2)
|
|
||||||
{
|
|
||||||
FilenameForBPP("INTERFACE\\OptionsScreenBackGround_1024x768.sti", VObjectDesc.ImageFile);
|
FilenameForBPP("INTERFACE\\OptionsScreenBackGround_1024x768.sti", VObjectDesc.ImageFile);
|
||||||
}
|
|
||||||
|
|
||||||
CHECKF(AddVideoObject(&VObjectDesc, &guiMPJMainBackGroundImage ));
|
CHECKF(AddVideoObject(&VObjectDesc, &guiMPJMainBackGroundImage ));
|
||||||
|
|
||||||
@@ -641,7 +637,9 @@ BOOLEAN RenderMPJScreen()
|
|||||||
|
|
||||||
//Get the main background screen graphic and blt it
|
//Get the main background screen graphic and blt it
|
||||||
GetVideoObject(&hPixHandle, guiMPJMainBackGroundImage );
|
GetVideoObject(&hPixHandle, guiMPJMainBackGroundImage );
|
||||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0,0,0, VO_BLT_SRCTRANSPARENCY,NULL);
|
|
||||||
|
BltVideoObject(FRAME_BUFFER, hPixHandle, 0,(SCREEN_WIDTH - xResSize)/2,(SCREEN_HEIGHT - yResSize)/2, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
|
|
||||||
//Shade the background
|
//Shade the background
|
||||||
ShadowVideoSurfaceRect( FRAME_BUFFER, iScreenWidthOffset, iScreenHeightOffset, iScreenWidthOffset + 640, iScreenHeightOffset + 480 );
|
ShadowVideoSurfaceRect( FRAME_BUFFER, iScreenWidthOffset, iScreenHeightOffset, iScreenWidthOffset + 640, iScreenHeightOffset + 480 );
|
||||||
@@ -667,7 +665,7 @@ void GetMPJScreenUserInput()
|
|||||||
{
|
{
|
||||||
InputAtom Event;
|
InputAtom Event;
|
||||||
|
|
||||||
while( DequeueEvent( &Event ) )
|
while (DequeueSpecificEvent(&Event, KEY_DOWN|KEY_UP|KEY_REPEAT))
|
||||||
{
|
{
|
||||||
// check if this event is swallowed by text input, otherwise process key
|
// check if this event is swallowed by text input, otherwise process key
|
||||||
if( !HandleTextInput( &Event ) && Event.usEvent == KEY_DOWN )
|
if( !HandleTextInput( &Event ) && Event.usEvent == KEY_DOWN )
|
||||||
@@ -761,7 +759,7 @@ void BtnMPJCancelCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
|
|
||||||
BOOLEAN DoMPJMessageBox( UINT8 ubStyle, const STR16 zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback )
|
BOOLEAN DoMPJMessageBox( UINT8 ubStyle, const STR16 zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback )
|
||||||
{
|
{
|
||||||
SGPRect CenteringRect= {0, 0, SCREEN_WIDTH-1, SCREEN_HEIGHT-1 };
|
SGPRect CenteringRect= {0 + xResOffset, 0, SCREEN_WIDTH - xResOffset, SCREEN_HEIGHT };
|
||||||
|
|
||||||
// do message box and return
|
// do message box and return
|
||||||
giMPJMessageBox = DoMessageBox( ubStyle, zString, uiExitScreen, ( UINT16 ) ( usFlags| MSG_BOX_FLAG_USE_CENTERING_RECT ), ReturnCallback, &CenteringRect );
|
giMPJMessageBox = DoMessageBox( ubStyle, zString, uiExitScreen, ( UINT16 ) ( usFlags| MSG_BOX_FLAG_USE_CENTERING_RECT ), ReturnCallback, &CenteringRect );
|
||||||
|
|||||||
+8
-11
@@ -233,20 +233,16 @@ BOOLEAN EnterMPSScreen()
|
|||||||
SetCurrentCursorFromDatabase( CURSOR_NORMAL );
|
SetCurrentCursorFromDatabase( CURSOR_NORMAL );
|
||||||
|
|
||||||
// load the Main trade screen backgroiund image
|
// load the Main trade screen backgroiund image
|
||||||
|
ColorFillVideoSurfaceArea( FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, Get16BPPColor( FROMRGB( 0, 0, 0 ) ) );
|
||||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||||
|
|
||||||
if (iResolution == 0)
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
{
|
|
||||||
FilenameForBPP("INTERFACE\\OptionsScreenBackGround.sti", VObjectDesc.ImageFile);
|
FilenameForBPP("INTERFACE\\OptionsScreenBackGround.sti", VObjectDesc.ImageFile);
|
||||||
}
|
else if (iResolution < _1024x768)
|
||||||
else if (iResolution == 1)
|
|
||||||
{
|
|
||||||
FilenameForBPP("INTERFACE\\OptionsScreenBackGround_800x600.sti", VObjectDesc.ImageFile);
|
FilenameForBPP("INTERFACE\\OptionsScreenBackGround_800x600.sti", VObjectDesc.ImageFile);
|
||||||
}
|
else
|
||||||
else if (iResolution == 2)
|
|
||||||
{
|
|
||||||
FilenameForBPP("INTERFACE\\OptionsScreenBackGround_1024x768.sti", VObjectDesc.ImageFile);
|
FilenameForBPP("INTERFACE\\OptionsScreenBackGround_1024x768.sti", VObjectDesc.ImageFile);
|
||||||
}
|
|
||||||
|
|
||||||
CHECKF(AddVideoObject(&VObjectDesc, &guiMPSMainBackGroundImage ));
|
CHECKF(AddVideoObject(&VObjectDesc, &guiMPSMainBackGroundImage ));
|
||||||
|
|
||||||
@@ -396,7 +392,8 @@ BOOLEAN RenderMPSScreen()
|
|||||||
|
|
||||||
//Get the main background screen graphic and blt it
|
//Get the main background screen graphic and blt it
|
||||||
GetVideoObject(&hPixHandle, guiMPSMainBackGroundImage );
|
GetVideoObject(&hPixHandle, guiMPSMainBackGroundImage );
|
||||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0,0,0, VO_BLT_SRCTRANSPARENCY,NULL);
|
|
||||||
|
BltVideoObject(FRAME_BUFFER, hPixHandle, 0,(SCREEN_WIDTH - xResSize)/2,(SCREEN_HEIGHT - yResSize)/2, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
//Shade the background
|
//Shade the background
|
||||||
ShadowVideoSurfaceRect( FRAME_BUFFER, iScreenWidthOffset, iScreenHeightOffset, iScreenWidthOffset + 640, iScreenHeightOffset + 480 );
|
ShadowVideoSurfaceRect( FRAME_BUFFER, iScreenWidthOffset, iScreenHeightOffset, iScreenWidthOffset + 640, iScreenHeightOffset + 480 );
|
||||||
@@ -539,7 +536,7 @@ void GetMPSScreenUserInput()
|
|||||||
{
|
{
|
||||||
InputAtom Event;
|
InputAtom Event;
|
||||||
|
|
||||||
while( DequeueEvent( &Event ) )
|
while (DequeueSpecificEvent(&Event, KEY_DOWN|KEY_UP|KEY_REPEAT))
|
||||||
{
|
{
|
||||||
// check if this event is swallowed by text input, otherwise process key
|
// check if this event is swallowed by text input, otherwise process key
|
||||||
if( !HandleTextInput( &Event ) && Event.usEvent == KEY_DOWN )
|
if( !HandleTextInput( &Event ) && Event.usEvent == KEY_DOWN )
|
||||||
|
|||||||
+25
-31
@@ -287,21 +287,21 @@ BOOLEAN InitMainMenu( )
|
|||||||
|
|
||||||
if (gMainMenulayout[iCounter2].Visible == 1)
|
if (gMainMenulayout[iCounter2].Visible == 1)
|
||||||
{
|
{
|
||||||
if (iResolution == 0)
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
{
|
{
|
||||||
strcpy(VObjectDesc.ImageFile, gMainMenulayout[iCounter2].FileName);
|
strcpy(VObjectDesc.ImageFile, gMainMenulayout[iCounter2].FileName);
|
||||||
|
|
||||||
if( !AddVideoObject( &VObjectDesc, &gMainMenulayout[iCounter2].uiIndex ) )
|
if( !AddVideoObject( &VObjectDesc, &gMainMenulayout[iCounter2].uiIndex ) )
|
||||||
AssertMsg(0, String( "Missing %s", gMainMenulayout[iCounter2].FileName ) );
|
AssertMsg(0, String( "Missing %s", gMainMenulayout[iCounter2].FileName ) );
|
||||||
}
|
}
|
||||||
else if (iResolution == 1)
|
else if (iResolution < _1024x768)
|
||||||
{
|
{
|
||||||
strcpy(VObjectDesc.ImageFile, gMainMenulayout[iCounter2].FileName800x600);
|
strcpy(VObjectDesc.ImageFile, gMainMenulayout[iCounter2].FileName800x600);
|
||||||
|
|
||||||
if( !AddVideoObject( &VObjectDesc, &gMainMenulayout[iCounter2].uiIndex ) )
|
if( !AddVideoObject( &VObjectDesc, &gMainMenulayout[iCounter2].uiIndex ) )
|
||||||
AssertMsg(0, String( "Missing %s", gMainMenulayout[iCounter2].FileName800x600 ) );
|
AssertMsg(0, String( "Missing %s", gMainMenulayout[iCounter2].FileName800x600 ) );
|
||||||
}
|
}
|
||||||
else if (iResolution == 2)
|
else
|
||||||
{
|
{
|
||||||
strcpy(VObjectDesc.ImageFile, gMainMenulayout[iCounter2].FileName1024x768);
|
strcpy(VObjectDesc.ImageFile, gMainMenulayout[iCounter2].FileName1024x768);
|
||||||
|
|
||||||
@@ -479,7 +479,7 @@ void HandleMainMenuInput()
|
|||||||
InputAtom InputEvent;
|
InputAtom InputEvent;
|
||||||
|
|
||||||
// Check for esc
|
// Check for esc
|
||||||
while (DequeueEvent(&InputEvent) == TRUE)
|
while (DequeueSpecificEvent(&InputEvent, KEY_DOWN|KEY_UP|KEY_REPEAT))
|
||||||
{
|
{
|
||||||
if( InputEvent.usEvent == KEY_UP )
|
if( InputEvent.usEvent == KEY_UP )
|
||||||
{
|
{
|
||||||
@@ -528,7 +528,7 @@ void HandleHelpScreenInput()
|
|||||||
InputAtom InputEvent;
|
InputAtom InputEvent;
|
||||||
|
|
||||||
// Check for key
|
// Check for key
|
||||||
while (DequeueEvent(&InputEvent) == TRUE)
|
while (DequeueSpecificEvent(&InputEvent, KEY_DOWN|KEY_UP|KEY_REPEAT))
|
||||||
{
|
{
|
||||||
switch( InputEvent.usEvent )
|
switch( InputEvent.usEvent )
|
||||||
{
|
{
|
||||||
@@ -613,24 +613,22 @@ BOOLEAN CreateDestroyMainMenuButtons( BOOLEAN fCreate )
|
|||||||
SGPFILENAME filenameMP;
|
SGPFILENAME filenameMP;
|
||||||
INT16 sSlot;
|
INT16 sSlot;
|
||||||
|
|
||||||
if (iResolution == 0)
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
{
|
{
|
||||||
MAINMENU_Y = gMainMenulayout[0].MAINMENU_Y;
|
|
||||||
MAINMENU_X = gMainMenulayout[0].MAINMENU_X;
|
MAINMENU_X = gMainMenulayout[0].MAINMENU_X;
|
||||||
|
MAINMENU_Y = gMainMenulayout[0].MAINMENU_Y;
|
||||||
MAINMENU_Y_SPACE = gMainMenulayout[0].MAINMENU_Y_SPACE;
|
MAINMENU_Y_SPACE = gMainMenulayout[0].MAINMENU_Y_SPACE;
|
||||||
}
|
}
|
||||||
|
else if (iResolution < _1024x768)
|
||||||
if (iResolution == 1)
|
|
||||||
{
|
{
|
||||||
MAINMENU_Y = gMainMenulayout[0].MAINMENU_800x600Y;
|
MAINMENU_X = gMainMenulayout[0].MAINMENU_800x600X + xResOffset;
|
||||||
MAINMENU_X = gMainMenulayout[0].MAINMENU_800x600X;
|
MAINMENU_Y = gMainMenulayout[0].MAINMENU_800x600Y + yResOffset;
|
||||||
MAINMENU_Y_SPACE = gMainMenulayout[0].MAINMENU_Y_SPACE;
|
MAINMENU_Y_SPACE = gMainMenulayout[0].MAINMENU_Y_SPACE;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
if (iResolution == 2)
|
|
||||||
{
|
{
|
||||||
MAINMENU_Y = gMainMenulayout[0].MAINMENU_1024x768Y;
|
MAINMENU_X = gMainMenulayout[0].MAINMENU_1024x768X + xResOffset;
|
||||||
MAINMENU_X = gMainMenulayout[0].MAINMENU_1024x768X;
|
MAINMENU_Y = gMainMenulayout[0].MAINMENU_1024x768Y + yResOffset;
|
||||||
MAINMENU_Y_SPACE = gMainMenulayout[0].MAINMENU_Y_SPACE;
|
MAINMENU_Y_SPACE = gMainMenulayout[0].MAINMENU_Y_SPACE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -716,25 +714,23 @@ void RenderMainMenu()
|
|||||||
{
|
{
|
||||||
if (gMainMenulayout[iCounter2].Visible == 1)
|
if (gMainMenulayout[iCounter2].Visible == 1)
|
||||||
{
|
{
|
||||||
if (iResolution == 0)
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
{
|
{
|
||||||
GetVideoObject(&hPixHandle, gMainMenulayout[iCounter2].uiIndex);
|
GetVideoObject(&hPixHandle, gMainMenulayout[iCounter2].uiIndex);
|
||||||
BltVideoObject( guiSAVEBUFFER, hPixHandle, 0, gMainMenulayout[iCounter2].ImagePositionX, gMainMenulayout[iCounter2].ImagePositionY, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject( guiSAVEBUFFER, hPixHandle, 0, gMainMenulayout[iCounter2].ImagePositionX + xResOffset, gMainMenulayout[iCounter2].ImagePositionY + yResOffset, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
BltVideoObject( FRAME_BUFFER, hPixHandle, 0, gMainMenulayout[iCounter2].ImagePositionX, gMainMenulayout[iCounter2].ImagePositionY, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject( FRAME_BUFFER, hPixHandle, 0, gMainMenulayout[iCounter2].ImagePositionX + xResOffset, gMainMenulayout[iCounter2].ImagePositionY + yResOffset, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
}
|
}
|
||||||
|
else if (iResolution < _1024x768)
|
||||||
if (iResolution == 1)
|
|
||||||
{
|
{
|
||||||
GetVideoObject(&hPixHandle, gMainMenulayout[iCounter2].uiIndex);
|
GetVideoObject(&hPixHandle, gMainMenulayout[iCounter2].uiIndex);
|
||||||
BltVideoObject( guiSAVEBUFFER, hPixHandle, 0, gMainMenulayout[iCounter2].ImagePosition800x600X, gMainMenulayout[iCounter2].ImagePosition800x600Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject( guiSAVEBUFFER, hPixHandle, 0, gMainMenulayout[iCounter2].ImagePosition800x600X + xResOffset, gMainMenulayout[iCounter2].ImagePosition800x600Y + yResOffset, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
BltVideoObject( FRAME_BUFFER, hPixHandle, 0, gMainMenulayout[iCounter2].ImagePosition800x600X, gMainMenulayout[iCounter2].ImagePosition800x600Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject( FRAME_BUFFER, hPixHandle, 0, gMainMenulayout[iCounter2].ImagePosition800x600X + xResOffset, gMainMenulayout[iCounter2].ImagePosition800x600Y + yResOffset, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
if (iResolution == 2)
|
|
||||||
{
|
{
|
||||||
GetVideoObject(&hPixHandle, gMainMenulayout[iCounter2].uiIndex);
|
GetVideoObject(&hPixHandle, gMainMenulayout[iCounter2].uiIndex);
|
||||||
BltVideoObject( guiSAVEBUFFER, hPixHandle, 0, gMainMenulayout[iCounter2].ImagePosition1024x768X, gMainMenulayout[iCounter2].ImagePosition1024x768Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject( guiSAVEBUFFER, hPixHandle, 0, gMainMenulayout[iCounter2].ImagePosition1024x768X + xResOffset, gMainMenulayout[iCounter2].ImagePosition1024x768Y + yResOffset, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
BltVideoObject( FRAME_BUFFER, hPixHandle, 0, gMainMenulayout[iCounter2].ImagePosition1024x768X, gMainMenulayout[iCounter2].ImagePosition1024x768Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject( FRAME_BUFFER, hPixHandle, 0, gMainMenulayout[iCounter2].ImagePosition1024x768X + xResOffset, gMainMenulayout[iCounter2].ImagePosition1024x768Y + yResOffset, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -774,21 +770,19 @@ void RestoreButtonBackGrounds()
|
|||||||
|
|
||||||
#ifndef TESTFOREIGNFONTS
|
#ifndef TESTFOREIGNFONTS
|
||||||
|
|
||||||
if (iResolution == 0)
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
{
|
{
|
||||||
MAINMENU_Y = gMainMenulayout[0].MAINMENU_Y;
|
MAINMENU_Y = gMainMenulayout[0].MAINMENU_Y;
|
||||||
MAINMENU_X = gMainMenulayout[0].MAINMENU_X;
|
MAINMENU_X = gMainMenulayout[0].MAINMENU_X;
|
||||||
MAINMENU_Y_SPACE = gMainMenulayout[0].MAINMENU_Y_SPACE;
|
MAINMENU_Y_SPACE = gMainMenulayout[0].MAINMENU_Y_SPACE;
|
||||||
}
|
}
|
||||||
|
else if (iResolution < _1024x768)
|
||||||
if (iResolution == 1)
|
|
||||||
{
|
{
|
||||||
MAINMENU_Y = gMainMenulayout[0].MAINMENU_800x600Y;
|
MAINMENU_Y = gMainMenulayout[0].MAINMENU_800x600Y;
|
||||||
MAINMENU_X = gMainMenulayout[0].MAINMENU_800x600X;
|
MAINMENU_X = gMainMenulayout[0].MAINMENU_800x600X;
|
||||||
MAINMENU_Y_SPACE = gMainMenulayout[0].MAINMENU_Y_SPACE;
|
MAINMENU_Y_SPACE = gMainMenulayout[0].MAINMENU_Y_SPACE;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
if (iResolution == 2)
|
|
||||||
{
|
{
|
||||||
MAINMENU_Y = gMainMenulayout[0].MAINMENU_1024x768Y;
|
MAINMENU_Y = gMainMenulayout[0].MAINMENU_1024x768Y;
|
||||||
MAINMENU_X = gMainMenulayout[0].MAINMENU_1024x768X;
|
MAINMENU_X = gMainMenulayout[0].MAINMENU_1024x768X;
|
||||||
|
|||||||
@@ -1165,7 +1165,7 @@ UINT32 MessageBoxScreenHandle( )
|
|||||||
|
|
||||||
// carter, need key shortcuts for clearing up message boxes
|
// carter, need key shortcuts for clearing up message boxes
|
||||||
// Check for esc
|
// Check for esc
|
||||||
while (DequeueEvent(&InputEvent) == TRUE)
|
while (DequeueSpecificEvent(&InputEvent, KEY_DOWN|KEY_UP|KEY_REPEAT))
|
||||||
{
|
{
|
||||||
if( !HandleTextInput( &InputEvent ) && InputEvent.usEvent == KEY_DOWN )
|
if( !HandleTextInput( &InputEvent ) && InputEvent.usEvent == KEY_DOWN )
|
||||||
{
|
{
|
||||||
|
|||||||
+29
-11
@@ -1094,6 +1094,7 @@ void recieveHIRE(RPCParameters *rpcParameters)
|
|||||||
|
|
||||||
pSoldier->bSide=0; //default coop only
|
pSoldier->bSide=0; //default coop only
|
||||||
gTacticalStatus.Team[MercCreateStruct.bTeam ].bSide=0;
|
gTacticalStatus.Team[MercCreateStruct.bTeam ].bSide=0;
|
||||||
|
pSoldier->bVisible = 1;
|
||||||
|
|
||||||
if(MercCreateStruct.ubProfile==64)//slay
|
if(MercCreateStruct.ubProfile==64)//slay
|
||||||
{
|
{
|
||||||
@@ -1104,6 +1105,7 @@ void recieveHIRE(RPCParameters *rpcParameters)
|
|||||||
if(cGameType==MP_TYPE_DEATHMATCH)//all vs all only
|
if(cGameType==MP_TYPE_DEATHMATCH)//all vs all only
|
||||||
{
|
{
|
||||||
pSoldier->bSide=1;
|
pSoldier->bSide=1;
|
||||||
|
pSoldier->bVisible = 0;
|
||||||
gTacticalStatus.Team[MercCreateStruct.bTeam ].bSide=1;
|
gTacticalStatus.Team[MercCreateStruct.bTeam ].bSide=1;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1112,6 +1114,7 @@ void recieveHIRE(RPCParameters *rpcParameters)
|
|||||||
if(sHireMerc->team != TEAM)
|
if(sHireMerc->team != TEAM)
|
||||||
{
|
{
|
||||||
pSoldier->bSide=1;
|
pSoldier->bSide=1;
|
||||||
|
pSoldier->bVisible = 0;
|
||||||
gTacticalStatus.Team[MercCreateStruct.bTeam ].bSide=1;
|
gTacticalStatus.Team[MercCreateStruct.bTeam ].bSide=1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1485,7 +1488,7 @@ void send_donegui ( UINT8 ubResult )
|
|||||||
info.ready_stage = 3;//done placing mercs
|
info.ready_stage = 3;//done placing mercs
|
||||||
info.status=1;
|
info.status=1;
|
||||||
|
|
||||||
SGPRect CenterRect = { 100, 100, SCREEN_WIDTH - 100, 300 };
|
SGPRect CenterRect = { 100 + xResOffset, 100, SCREEN_WIDTH - 100 - xResOffset, 300 };
|
||||||
DoMessageBox( MSG_BOX_BASIC_STYLE, MPClientMessage[12], guiCurrentScreen, MSG_BOX_FLAG_OK | MSG_BOX_FLAG_USE_CENTERING_RECT, send_donegui, &CenterRect );
|
DoMessageBox( MSG_BOX_BASIC_STYLE, MPClientMessage[12], guiCurrentScreen, MSG_BOX_FLAG_OK | MSG_BOX_FLAG_USE_CENTERING_RECT, send_donegui, &CenterRect );
|
||||||
|
|
||||||
if(numready==cMaxClients && is_server)//all done
|
if(numready==cMaxClients && is_server)//all done
|
||||||
@@ -1669,7 +1672,7 @@ void start_battle ( void )
|
|||||||
// Go to "ready" state!
|
// Go to "ready" state!
|
||||||
if (numPlayersValid && clientsFinishedDownloading && teamsValid)
|
if (numPlayersValid && clientsFinishedDownloading && teamsValid)
|
||||||
{
|
{
|
||||||
SGPRect CenterRect = { 100, 100, SCREEN_WIDTH - 100, 300 };
|
SGPRect CenterRect = { 100 + xResOffset, 100, SCREEN_WIDTH - 100 - xResOffset, 300 };
|
||||||
DoMessageBox( MSG_BOX_BASIC_STYLE, MPClientMessage[35], guiCurrentScreen, MSG_BOX_FLAG_YESNO | MSG_BOX_FLAG_USE_CENTERING_RECT, allowlaptop_callback, &CenterRect );
|
DoMessageBox( MSG_BOX_BASIC_STYLE, MPClientMessage[35], guiCurrentScreen, MSG_BOX_FLAG_YESNO | MSG_BOX_FLAG_USE_CENTERING_RECT, allowlaptop_callback, &CenterRect );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2169,7 +2172,7 @@ void requestSETID(RPCParameters *rpcParameters)
|
|||||||
{
|
{
|
||||||
serverAddr = rpcParameters->sender;
|
serverAddr = rpcParameters->sender;
|
||||||
|
|
||||||
SGPRect CenteringRect= {0, 0, SCREEN_WIDTH-1, SCREEN_HEIGHT-1 };
|
SGPRect CenteringRect= {0 + xResOffset, 0, SCREEN_WIDTH - xResOffset, SCREEN_HEIGHT };
|
||||||
DoMessageBox( MSG_BOX_BASIC_STYLE , MPClientMessage[64] , guiCurrentScreen, MSG_BOX_FLAG_YESNO | MSG_BOX_FLAG_USE_CENTERING_RECT, allowDownloadCallback, &CenteringRect );
|
DoMessageBox( MSG_BOX_BASIC_STYLE , MPClientMessage[64] , guiCurrentScreen, MSG_BOX_FLAG_YESNO | MSG_BOX_FLAG_USE_CENTERING_RECT, allowDownloadCallback, &CenteringRect );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2415,7 +2418,7 @@ void recieveSETTINGS (RPCParameters *rpcParameters) //recive settings from serve
|
|||||||
gGameExternalOptions.gfAllowReinforcementsOnlyInCity = false;
|
gGameExternalOptions.gfAllowReinforcementsOnlyInCity = false;
|
||||||
|
|
||||||
// WANNE: The new improved interrupt system (IIS) does not work with multiplayer, so disable it
|
// WANNE: The new improved interrupt system (IIS) does not work with multiplayer, so disable it
|
||||||
gGameExternalOptions.fImprovedInterruptSystem = false;
|
//gGameOptions.fImprovedInterruptSystem = false;
|
||||||
|
|
||||||
// Disable Real-Time Mode
|
// Disable Real-Time Mode
|
||||||
// SANDRO - huh? real-time sneak is in preferences
|
// SANDRO - huh? real-time sneak is in preferences
|
||||||
@@ -2424,7 +2427,7 @@ void recieveSETTINGS (RPCParameters *rpcParameters) //recive settings from serve
|
|||||||
gGameSettings.fOptions[TOPTION_ALLOW_REAL_TIME_SNEAK] = false;
|
gGameSettings.fOptions[TOPTION_ALLOW_REAL_TIME_SNEAK] = false;
|
||||||
gGameExternalOptions.fQuietRealTimeSneak = false;
|
gGameExternalOptions.fQuietRealTimeSneak = false;
|
||||||
|
|
||||||
// WANNE: Take the settings from the ja2_options.ini
|
// WANNE: Take the settings from the ja2_options.ini
|
||||||
// WANNE: Enable fast loading
|
// WANNE: Enable fast loading
|
||||||
/*gGameExternalOptions.fDisableLaptopTransition = true;
|
/*gGameExternalOptions.fDisableLaptopTransition = true;
|
||||||
gGameExternalOptions.fFastWWWSitesLoading = true;
|
gGameExternalOptions.fFastWWWSitesLoading = true;
|
||||||
@@ -2472,11 +2475,18 @@ void recieveSETTINGS (RPCParameters *rpcParameters) //recive settings from serve
|
|||||||
|
|
||||||
gGameOptions.ubSquadSize = 6;
|
gGameOptions.ubSquadSize = 6;
|
||||||
|
|
||||||
|
//gGameOptions.fBobbyRayFastShipments = FALSE;
|
||||||
|
gGameOptions.fInventoryCostsAP = FALSE;
|
||||||
|
|
||||||
|
gGameOptions.fUseNCTH = FALSE;
|
||||||
|
gGameOptions.fImprovedInterruptSystem = FALSE;
|
||||||
|
gGameOptions.fWeaponOverheating = FALSE;
|
||||||
|
|
||||||
// Server forces us to play with new Inventory, but NIV is not allowed on the client,
|
// Server forces us to play with new Inventory, but NIV is not allowed on the client,
|
||||||
// because of wrong resolution or other stuff
|
// because of wrong resolution or other stuff
|
||||||
if ( UsingNewInventorySystem() == true && !IsNIVModeValid(true) )
|
if ( UsingNewInventorySystem() == true && !IsNIVModeValid(true) )
|
||||||
{
|
{
|
||||||
SGPRect CenteringRect= {0, 0, SCREEN_WIDTH-1, SCREEN_HEIGHT-1 };
|
SGPRect CenteringRect= {0 + xResOffset, 0, SCREEN_WIDTH-1 - 2 * xResOffset, SCREEN_HEIGHT-1 };
|
||||||
DoMessageBox( MSG_BOX_BASIC_STYLE , MPClientMessage[69] , guiCurrentScreen, MSG_BOX_FLAG_OK | MSG_BOX_FLAG_USE_CENTERING_RECT, InvalidClientSettingsOkBoxCallback, &CenteringRect );
|
DoMessageBox( MSG_BOX_BASIC_STYLE , MPClientMessage[69] , guiCurrentScreen, MSG_BOX_FLAG_OK | MSG_BOX_FLAG_USE_CENTERING_RECT, InvalidClientSettingsOkBoxCallback, &CenteringRect );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -2629,7 +2639,7 @@ void reapplySETTINGS()
|
|||||||
gGameExternalOptions.gfAllowReinforcementsOnlyInCity = false;
|
gGameExternalOptions.gfAllowReinforcementsOnlyInCity = false;
|
||||||
|
|
||||||
// WANNE: The new improved interrupt system (IIS) does not work with multiplayer, so disable it
|
// WANNE: The new improved interrupt system (IIS) does not work with multiplayer, so disable it
|
||||||
gGameExternalOptions.fImprovedInterruptSystem = false;
|
//gGameOptions.fImprovedInterruptSystem = false;
|
||||||
|
|
||||||
// Disable Real-Time Mode
|
// Disable Real-Time Mode
|
||||||
// SANDRO - real-time sneak is in preferences
|
// SANDRO - real-time sneak is in preferences
|
||||||
@@ -2637,7 +2647,7 @@ void reapplySETTINGS()
|
|||||||
gGameSettings.fOptions[TOPTION_ALLOW_REAL_TIME_SNEAK] = false;
|
gGameSettings.fOptions[TOPTION_ALLOW_REAL_TIME_SNEAK] = false;
|
||||||
gGameExternalOptions.fQuietRealTimeSneak = false;
|
gGameExternalOptions.fQuietRealTimeSneak = false;
|
||||||
|
|
||||||
// WANNE: Take the settings from the ja2_options.ini
|
// WANNE: Take the settings from the ja2_options.ini
|
||||||
// WANNE: Enable fast loading
|
// WANNE: Enable fast loading
|
||||||
/*gGameExternalOptions.fDisableLaptopTransition = true;
|
/*gGameExternalOptions.fDisableLaptopTransition = true;
|
||||||
gGameExternalOptions.fFastWWWSitesLoading = true;
|
gGameExternalOptions.fFastWWWSitesLoading = true;
|
||||||
@@ -2685,6 +2695,13 @@ void reapplySETTINGS()
|
|||||||
|
|
||||||
gGameOptions.ubSquadSize = 6;
|
gGameOptions.ubSquadSize = 6;
|
||||||
|
|
||||||
|
//gGameOptions.fBobbyRayFastShipments = FALSE;
|
||||||
|
gGameOptions.fInventoryCostsAP = FALSE;
|
||||||
|
|
||||||
|
gGameOptions.fUseNCTH = FALSE;
|
||||||
|
gGameOptions.fImprovedInterruptSystem = FALSE;
|
||||||
|
gGameOptions.fWeaponOverheating = FALSE;
|
||||||
|
|
||||||
// WANNE - MP: We have to re-initialize the correct interface
|
// WANNE - MP: We have to re-initialize the correct interface
|
||||||
if((UsingNewInventorySystem() == true) && IsNIVModeValid(true))
|
if((UsingNewInventorySystem() == true) && IsNIVModeValid(true))
|
||||||
{
|
{
|
||||||
@@ -4131,7 +4148,8 @@ void kick_player (void)
|
|||||||
else
|
else
|
||||||
swprintf(Cmsg, MPClientMessage[74], client_names[1],client_names[2],client_names[3]);
|
swprintf(Cmsg, MPClientMessage[74], client_names[1],client_names[2],client_names[3]);
|
||||||
|
|
||||||
SGPRect CenterRect = { 100, 100, SCREEN_WIDTH - 100, 300 };
|
SGPRect CenterRect = { 100 + xResOffset, 100, SCREEN_WIDTH - xResOffset, 300 };
|
||||||
|
|
||||||
DoMessageBox( MSG_BOX_BASIC_STYLE, Cmsg, guiCurrentScreen, MSG_BOX_FLAG_FOUR_NUMBERED_BUTTONS | MSG_BOX_FLAG_USE_CENTERING_RECT, kick_callback, &CenterRect );
|
DoMessageBox( MSG_BOX_BASIC_STYLE, Cmsg, guiCurrentScreen, MSG_BOX_FLAG_FOUR_NUMBERED_BUTTONS | MSG_BOX_FLAG_USE_CENTERING_RECT, kick_callback, &CenterRect );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -4208,7 +4226,7 @@ void overide_turn (void)
|
|||||||
else
|
else
|
||||||
swprintf(Cmsg, MPClientMessage[30], client_names[1],client_names[2],client_names[3]);
|
swprintf(Cmsg, MPClientMessage[30], client_names[1],client_names[2],client_names[3]);
|
||||||
|
|
||||||
SGPRect CenterRect = { 100, 100, SCREEN_WIDTH - 100, 300 };
|
SGPRect CenterRect = { 100 + xResOffset, 100, SCREEN_WIDTH - 100 - xResOffset, 300 };
|
||||||
|
|
||||||
DoMessageBox( MSG_BOX_BASIC_STYLE, Cmsg, guiCurrentScreen, MSG_BOX_FLAG_FOUR_NUMBERED_BUTTONS | MSG_BOX_FLAG_USE_CENTERING_RECT | MSG_BOX_FLAG_OK, turn_callback, &CenterRect );
|
DoMessageBox( MSG_BOX_BASIC_STYLE, Cmsg, guiCurrentScreen, MSG_BOX_FLAG_FOUR_NUMBERED_BUTTONS | MSG_BOX_FLAG_USE_CENTERING_RECT | MSG_BOX_FLAG_OK, turn_callback, &CenterRect );
|
||||||
}
|
}
|
||||||
@@ -4448,7 +4466,7 @@ void HandleClientConnectionLost()
|
|||||||
|
|
||||||
// connection lost, let user know via popup then quit to main menu
|
// connection lost, let user know via popup then quit to main menu
|
||||||
iDisconnectedScreen = guiCurrentScreen;
|
iDisconnectedScreen = guiCurrentScreen;
|
||||||
SGPRect CenteringRect= {0, 0, SCREEN_WIDTH-1, SCREEN_HEIGHT-1 };
|
SGPRect CenteringRect= {0 + xResOffset, 0, SCREEN_WIDTH - xResOffset, SCREEN_HEIGHT };
|
||||||
|
|
||||||
if (wcscmp(gszDisconnectReason,L"")==0)
|
if (wcscmp(gszDisconnectReason,L"")==0)
|
||||||
{
|
{
|
||||||
|
|||||||
Binary file not shown.
@@ -26,6 +26,12 @@ UINT16 SCREEN_HEIGHT;
|
|||||||
INT16 iScreenWidthOffset;
|
INT16 iScreenWidthOffset;
|
||||||
INT16 iScreenHeightOffset;
|
INT16 iScreenHeightOffset;
|
||||||
|
|
||||||
|
UINT16 xResSize; // 640 / 800 / 1024
|
||||||
|
UINT16 yResSize; // 480 / 600 / 768
|
||||||
|
|
||||||
|
UINT16 xResOffset; // For ARSP: ((SCREEN_WIDTH - xResSize) / 2)
|
||||||
|
UINT16 yResOffset; // For ARSP: ((SCREEN_HEIGHT - yResSize) / 2)
|
||||||
|
|
||||||
BOOLEAN fDisplayOverheadMap;
|
BOOLEAN fDisplayOverheadMap;
|
||||||
|
|
||||||
Screens GameScreens[MAX_SCREENS] =
|
Screens GameScreens[MAX_SCREENS] =
|
||||||
|
|||||||
+18
-3
@@ -2386,7 +2386,11 @@ BOOLEAN StackedObjectData::Load( INT8** hBuffer, float dMajorMapVersion, UINT8 u
|
|||||||
|| (dMajorMapVersion == gdMajorMapVersion && gubMinorMapVersion == ubMinorMapVersion))
|
|| (dMajorMapVersion == gdMajorMapVersion && gubMinorMapVersion == ubMinorMapVersion))
|
||||||
{
|
{
|
||||||
int size;
|
int size;
|
||||||
LOADDATA(&(this->data), *hBuffer, sizeof(ObjectData) );
|
// Flugente: changed this, otherwise game would crash when reading WF maps if class ObjectData was different. this is a rough fix and by no means perfect
|
||||||
|
//LOADDATA(&(this->data), *hBuffer, sizeof(ObjectData) );
|
||||||
|
// +1 because we have to account for endOfPOD itself
|
||||||
|
LOADDATA(&(this->data), *hBuffer, SIZEOF_OBJECTDATA_POD+1 );
|
||||||
|
|
||||||
LOADDATA(&size, *hBuffer, sizeof(int) );
|
LOADDATA(&size, *hBuffer, sizeof(int) );
|
||||||
attachments.resize(size);
|
attachments.resize(size);
|
||||||
for (attachmentList::iterator iter = attachments.begin(); iter != attachments.end(); ++iter) {
|
for (attachmentList::iterator iter = attachments.begin(); iter != attachments.end(); ++iter) {
|
||||||
@@ -2906,6 +2910,14 @@ BOOLEAN SaveGame( int ubSaveGameID, STR16 pGameDesc )
|
|||||||
|
|
||||||
SaveGameHeader.sInitialGameOptions.ubSquadSize = gGameOptions.ubSquadSize;
|
SaveGameHeader.sInitialGameOptions.ubSquadSize = gGameOptions.ubSquadSize;
|
||||||
|
|
||||||
|
|
||||||
|
//SaveGameHeader.sInitialGameOptions.fBobbyRayFastShipments = gGameOptions.fBobbyRayFastShipments;
|
||||||
|
SaveGameHeader.sInitialGameOptions.fInventoryCostsAP = gGameOptions.fInventoryCostsAP;
|
||||||
|
|
||||||
|
SaveGameHeader.sInitialGameOptions.fUseNCTH = gGameOptions.fUseNCTH;
|
||||||
|
SaveGameHeader.sInitialGameOptions.fImprovedInterruptSystem = gGameOptions.fImprovedInterruptSystem;
|
||||||
|
SaveGameHeader.sInitialGameOptions.fWeaponOverheating = gGameOptions.fWeaponOverheating;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Save the Save Game header file
|
// Save the Save Game header file
|
||||||
//
|
//
|
||||||
@@ -3884,6 +3896,8 @@ BOOLEAN LoadSavedGame( int ubSavedGameID )
|
|||||||
|
|
||||||
ShutdownNPCQuotes();
|
ShutdownNPCQuotes();
|
||||||
|
|
||||||
|
SetFastForwardMode(FALSE); // FF can sometimes be active if quick-load during AI turn transition
|
||||||
|
|
||||||
//very small TODO
|
//very small TODO
|
||||||
//Bugfix = Stop the chopter sound
|
//Bugfix = Stop the chopter sound
|
||||||
|
|
||||||
@@ -4011,7 +4025,8 @@ BOOLEAN LoadSavedGame( int ubSavedGameID )
|
|||||||
InitializeInvPanelCoordsOld();
|
InitializeInvPanelCoordsOld();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gGameOptions.ubSquadSize > 6 && iResolution == 0 || gGameOptions.ubSquadSize > 8 && iResolution == 1)
|
if ((gGameOptions.ubSquadSize == 8 && iResolution < _800x600) ||
|
||||||
|
(gGameOptions.ubSquadSize == 10 && iResolution < _1024x768))
|
||||||
{
|
{
|
||||||
FileClose( hFile );
|
FileClose( hFile );
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
@@ -8737,7 +8752,7 @@ void HandleOldBobbyRMailOrders()
|
|||||||
//copy over the purchase info
|
//copy over the purchase info
|
||||||
memcpy( gpNewBobbyrShipments[ iNewListCnt ].BobbyRayPurchase,
|
memcpy( gpNewBobbyrShipments[ iNewListCnt ].BobbyRayPurchase,
|
||||||
LaptopSaveInfo.BobbyRayOrdersOnDeliveryArray[iCnt].BobbyRayPurchase,
|
LaptopSaveInfo.BobbyRayOrdersOnDeliveryArray[iCnt].BobbyRayPurchase,
|
||||||
sizeof( BobbyRayPurchaseStruct ) * MAX_PURCHASE_AMOUNT );
|
sizeof( BobbyRayPurchaseStruct ) * gGameExternalOptions.ubBobbyRayMaxPurchaseAmount );
|
||||||
|
|
||||||
gpNewBobbyrShipments[ iNewListCnt ].fActive = TRUE;
|
gpNewBobbyrShipments[ iNewListCnt ].fActive = TRUE;
|
||||||
gpNewBobbyrShipments[ iNewListCnt ].ubDeliveryLoc = BR_DRASSEN;
|
gpNewBobbyrShipments[ iNewListCnt ].ubDeliveryLoc = BR_DRASSEN;
|
||||||
|
|||||||
+3
-2
@@ -2369,7 +2369,7 @@ void DoneFadeOutForSaveLoadScreen( void )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
//CHRISL: New fail message if we failed because of screen res
|
//CHRISL: New fail message if we failed because of screen res
|
||||||
if(UsingNewInventorySystem() == true && iResolution == 0)
|
if(UsingNewInventorySystem() == true && iResolution >= _640x480 && iResolution < _800x600)
|
||||||
{
|
{
|
||||||
DoSaveLoadMessageBox( MSG_BOX_BASIC_STYLE, zSaveLoadText[SLG_INV_RES_ERROR], SAVE_LOAD_SCREEN, MSG_BOX_FLAG_OK, FailedLoadingGameCallBack );
|
DoSaveLoadMessageBox( MSG_BOX_BASIC_STYLE, zSaveLoadText[SLG_INV_RES_ERROR], SAVE_LOAD_SCREEN, MSG_BOX_FLAG_OK, FailedLoadingGameCallBack );
|
||||||
NextLoopCheckForEnoughFreeHardDriveSpace();
|
NextLoopCheckForEnoughFreeHardDriveSpace();
|
||||||
@@ -2379,7 +2379,8 @@ void DoneFadeOutForSaveLoadScreen( void )
|
|||||||
DoSaveLoadMessageBox( MSG_BOX_BASIC_STYLE, zSaveLoadText[SLG_INV_CUSTUM_ERROR], SAVE_LOAD_SCREEN, MSG_BOX_FLAG_OK, FailedLoadingGameCallBack );
|
DoSaveLoadMessageBox( MSG_BOX_BASIC_STYLE, zSaveLoadText[SLG_INV_CUSTUM_ERROR], SAVE_LOAD_SCREEN, MSG_BOX_FLAG_OK, FailedLoadingGameCallBack );
|
||||||
NextLoopCheckForEnoughFreeHardDriveSpace();
|
NextLoopCheckForEnoughFreeHardDriveSpace();
|
||||||
}
|
}
|
||||||
else if ((gGameOptions.ubSquadSize > 6 && iResolution == 0) || (gGameOptions.ubSquadSize > 8 && iResolution == 1))
|
else if ((gGameOptions.ubSquadSize == 8 && iResolution < _800x600) ||
|
||||||
|
(gGameOptions.ubSquadSize == 10 && iResolution < _1024x768))
|
||||||
{
|
{
|
||||||
DoSaveLoadMessageBox( MSG_BOX_BASIC_STYLE, zSaveLoadText[SLG_SQUAD_SIZE_RES_ERROR], SAVE_LOAD_SCREEN, MSG_BOX_FLAG_OK, FailedLoadingGameCallBack );
|
DoSaveLoadMessageBox( MSG_BOX_BASIC_STYLE, zSaveLoadText[SLG_SQUAD_SIZE_RES_ERROR], SAVE_LOAD_SCREEN, MSG_BOX_FLAG_OK, FailedLoadingGameCallBack );
|
||||||
NextLoopCheckForEnoughFreeHardDriveSpace();
|
NextLoopCheckForEnoughFreeHardDriveSpace();
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
AdditionalOptions="/D _CRT_SECURE_NO_DEPRECATE"
|
AdditionalOptions="/D _CRT_SECURE_NO_DEPRECATE"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories=""
|
AdditionalIncludeDirectories=""
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;NO_ZLIB_COMPRESSION"
|
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;NO_ZLIB_COMPRESSION;_WIN32_WINNT=0x0500"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="true"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="1"
|
RuntimeLibrary="1"
|
||||||
@@ -106,7 +106,7 @@
|
|||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
AdditionalOptions="/D _CRT_SECURE_NO_DEPRECATE"
|
AdditionalOptions="/D _CRT_SECURE_NO_DEPRECATE"
|
||||||
AdditionalIncludeDirectories=""
|
AdditionalIncludeDirectories=""
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;NO_ZLIB_COMPRESSION"
|
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;NO_ZLIB_COMPRESSION;_WIN32_WINNT=0x0500"
|
||||||
RuntimeLibrary="0"
|
RuntimeLibrary="0"
|
||||||
RuntimeTypeInfo="true"
|
RuntimeTypeInfo="true"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="0"
|
||||||
@@ -167,7 +167,7 @@
|
|||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
AdditionalOptions="/D _CRT_SECURE_NO_DEPRECATE"
|
AdditionalOptions="/D _CRT_SECURE_NO_DEPRECATE"
|
||||||
AdditionalIncludeDirectories=""
|
AdditionalIncludeDirectories=""
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;NO_ZLIB_COMPRESSION"
|
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;NO_ZLIB_COMPRESSION;_WIN32_WINNT=0x0500"
|
||||||
RuntimeLibrary="0"
|
RuntimeLibrary="0"
|
||||||
RuntimeTypeInfo="true"
|
RuntimeTypeInfo="true"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="0"
|
||||||
@@ -229,7 +229,7 @@
|
|||||||
AdditionalOptions="/D _CRT_SECURE_NO_DEPRECATE"
|
AdditionalOptions="/D _CRT_SECURE_NO_DEPRECATE"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories=""
|
AdditionalIncludeDirectories=""
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;NO_ZLIB_COMPRESSION"
|
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;NO_ZLIB_COMPRESSION;_WIN32_WINNT=0x0500"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="true"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="1"
|
RuntimeLibrary="1"
|
||||||
@@ -294,7 +294,7 @@
|
|||||||
AdditionalOptions="/D _CRT_SECURE_NO_DEPRECATE"
|
AdditionalOptions="/D _CRT_SECURE_NO_DEPRECATE"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories=""
|
AdditionalIncludeDirectories=""
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;NO_ZLIB_COMPRESSION"
|
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;NO_ZLIB_COMPRESSION;_WIN32_WINNT=0x0500"
|
||||||
RuntimeLibrary="0"
|
RuntimeLibrary="0"
|
||||||
RuntimeTypeInfo="true"
|
RuntimeTypeInfo="true"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="0"
|
||||||
|
|||||||
@@ -203,24 +203,24 @@
|
|||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<PropertyGroup Label="UserMacros" />
|
<PropertyGroup Label="UserMacros" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<OutDir>..\lib\VS2010\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\lib\VS2010\$(JA2Config)\$(Configuration)\</OutDir>
|
||||||
<IntDir>..\build\VS2010\$(ProjectName)_$(Configuration)\</IntDir>
|
<IntDir>$(SolutionDir)\build\VS2010\$(JA2Config)\$(ProjectName)_$(Configuration)\</IntDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MapEditorD|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MapEditorD|Win32'">
|
||||||
<OutDir>..\lib\VS2010\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\lib\VS2010\$(JA2Config)\$(Configuration)\</OutDir>
|
||||||
<IntDir>..\build\VS2010\$(ProjectName)_$(Configuration)\</IntDir>
|
<IntDir>$(SolutionDir)\build\VS2010\$(JA2Config)\$(ProjectName)_$(Configuration)\</IntDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<IntDir>..\build\VS2010\$(ProjectName)_$(Configuration)\</IntDir>
|
<IntDir>$(SolutionDir)\build\VS2010\$(JA2Config)\$(ProjectName)_$(Configuration)\</IntDir>
|
||||||
<OutDir>..\lib\VS2010\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\lib\VS2010\$(JA2Config)\$(Configuration)\</OutDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MapEditor|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MapEditor|Win32'">
|
||||||
<IntDir>..\build\VS2010\$(ProjectName)_$(Configuration)\</IntDir>
|
<IntDir>$(SolutionDir)\build\VS2010\$(JA2Config)\$(ProjectName)_$(Configuration)\</IntDir>
|
||||||
<OutDir>..\lib\VS2010\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\lib\VS2010\$(JA2Config)\$(Configuration)\</OutDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Relese_WithDebugInfo|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Relese_WithDebugInfo|Win32'">
|
||||||
<IntDir>..\build\VS2010\$(ProjectName)_$(Configuration)\</IntDir>
|
<IntDir>$(SolutionDir)\build\VS2010\$(JA2Config)\$(ProjectName)_$(Configuration)\</IntDir>
|
||||||
<OutDir>..\lib\VS2010\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\lib\VS2010\$(JA2Config)\$(Configuration)\</OutDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
|
|||||||
@@ -110,6 +110,9 @@ HHOOK ghMouseHook;
|
|||||||
BOOLEAN gfCurrentStringInputState;
|
BOOLEAN gfCurrentStringInputState;
|
||||||
StringInput *gpCurrentStringDescriptor;
|
StringInput *gpCurrentStringDescriptor;
|
||||||
|
|
||||||
|
// Thread
|
||||||
|
static CRITICAL_SECTION gcsInputQueueLock;
|
||||||
|
|
||||||
// Local function headers
|
// Local function headers
|
||||||
|
|
||||||
void QueueEvent(UINT16 ubInputEvent, UINT32 usParam, UINT32 uiParam);
|
void QueueEvent(UINT16 ubInputEvent, UINT32 usParam, UINT32 uiParam);
|
||||||
@@ -277,6 +280,8 @@ BOOLEAN InitializeInputManager(void)
|
|||||||
// ghKeyboardHook = SetWindowsHookEx(WH_KEYBOARD, (HOOKPROC) KeyboardHandler, (HINSTANCE) 0, GetCurrentThreadId());
|
// ghKeyboardHook = SetWindowsHookEx(WH_KEYBOARD, (HOOKPROC) KeyboardHandler, (HINSTANCE) 0, GetCurrentThreadId());
|
||||||
// DbgMessage(TOPIC_INPUT, DBG_LEVEL_2, String("Set keyboard hook returned %d", ghKeyboardHook));
|
// DbgMessage(TOPIC_INPUT, DBG_LEVEL_2, String("Set keyboard hook returned %d", ghKeyboardHook));
|
||||||
|
|
||||||
|
InitializeCriticalSection(&gcsInputQueueLock);
|
||||||
|
|
||||||
ghMouseHook = SetWindowsHookEx(WH_MOUSE, (HOOKPROC) MouseHandler, (HINSTANCE) 0, GetCurrentThreadId());
|
ghMouseHook = SetWindowsHookEx(WH_MOUSE, (HOOKPROC) MouseHandler, (HINSTANCE) 0, GetCurrentThreadId());
|
||||||
DbgMessage(TOPIC_INPUT, DBG_LEVEL_2, String("Set mouse hook returned %d", ghMouseHook));
|
DbgMessage(TOPIC_INPUT, DBG_LEVEL_2, String("Set mouse hook returned %d", ghMouseHook));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@@ -289,6 +294,7 @@ void ShutdownInputManager(void)
|
|||||||
UnRegisterDebugTopic(TOPIC_INPUT, "Input Manager");
|
UnRegisterDebugTopic(TOPIC_INPUT, "Input Manager");
|
||||||
// UnhookWindowsHookEx(ghKeyboardHook);
|
// UnhookWindowsHookEx(ghKeyboardHook);
|
||||||
UnhookWindowsHookEx(ghMouseHook);
|
UnhookWindowsHookEx(ghMouseHook);
|
||||||
|
DeleteCriticalSection(&gcsInputQueueLock);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QueuePureEvent(UINT16 ubInputEvent, UINT32 usParam, UINT32 uiParam)
|
void QueuePureEvent(UINT16 ubInputEvent, UINT32 usParam, UINT32 uiParam)
|
||||||
@@ -329,7 +335,7 @@ void QueuePureEvent(UINT16 ubInputEvent, UINT32 usParam, UINT32 uiParam)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void QueueEvent(UINT16 ubInputEvent, UINT32 usParam, UINT32 uiParam)
|
void InternalQueueEvent(UINT16 ubInputEvent, UINT32 usParam, UINT32 uiParam)
|
||||||
{
|
{
|
||||||
UINT32 uiTimer;
|
UINT32 uiTimer;
|
||||||
UINT16 usKeyState;
|
UINT16 usKeyState;
|
||||||
@@ -452,24 +458,42 @@ void QueueEvent(UINT16 ubInputEvent, UINT32 usParam, UINT32 uiParam)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOLEAN DequeueSpecificEvent(InputAtom *Event, UINT32 uiMaskFlags )
|
void QueueEvent(UINT16 ubInputEvent, UINT32 usParam, UINT32 uiParam)
|
||||||
{
|
{
|
||||||
// Is there an event to dequeue
|
EnterCriticalSection(&gcsInputQueueLock);
|
||||||
if (gusQueueCount > 0)
|
__try {
|
||||||
{
|
InternalQueueEvent(ubInputEvent, usParam, uiParam);
|
||||||
memcpy( Event, &( gEventQueue[gusHeadIndex] ), sizeof( InputAtom ) );
|
}__finally {
|
||||||
|
LeaveCriticalSection(&gcsInputQueueLock);
|
||||||
// Check if it has the masks!
|
|
||||||
if ( ( Event->usEvent & uiMaskFlags ) )
|
|
||||||
{
|
|
||||||
return( DequeueEvent( Event) );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return( FALSE );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOLEAN DequeueEvent(InputAtom *Event)
|
BOOLEAN DequeueSpecificEvent(InputAtom *Event, UINT32 uiMaskFlags )
|
||||||
|
{
|
||||||
|
EnterCriticalSection(&gcsInputQueueLock);
|
||||||
|
__try
|
||||||
|
{
|
||||||
|
// Is there an event to dequeue
|
||||||
|
if (gusQueueCount > 0)
|
||||||
|
{
|
||||||
|
memcpy( Event, &( gEventQueue[gusHeadIndex] ), sizeof( InputAtom ) );
|
||||||
|
|
||||||
|
// Check if it has the masks!
|
||||||
|
if ( ( Event->usEvent & uiMaskFlags ) )
|
||||||
|
{
|
||||||
|
return( DequeueEvent( Event) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return( FALSE );
|
||||||
|
}
|
||||||
|
__finally
|
||||||
|
{
|
||||||
|
LeaveCriticalSection(&gcsInputQueueLock);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOLEAN InternalDequeueEvent(InputAtom *Event)
|
||||||
{
|
{
|
||||||
HandleSingleClicksAndButtonRepeats( );
|
HandleSingleClicksAndButtonRepeats( );
|
||||||
|
|
||||||
@@ -500,6 +524,18 @@ BOOLEAN DequeueEvent(InputAtom *Event)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
BOOLEAN DequeueEvent(InputAtom *Event)
|
||||||
|
{
|
||||||
|
__try
|
||||||
|
{
|
||||||
|
EnterCriticalSection(&gcsInputQueueLock);
|
||||||
|
return InternalDequeueEvent(Event);
|
||||||
|
}
|
||||||
|
__finally
|
||||||
|
{
|
||||||
|
LeaveCriticalSection(&gcsInputQueueLock);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void KeyChange(UINT32 usParam, UINT32 uiParam, UINT8 ufKeyState)
|
void KeyChange(UINT32 usParam, UINT32 uiParam, UINT8 ufKeyState)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
#define BUTTON_REPEAT_TIMEOUT 250
|
#define BUTTON_REPEAT_TIMEOUT 250
|
||||||
#define BUTTON_REPEAT_TIME 50
|
#define BUTTON_REPEAT_TIME 50
|
||||||
|
|
||||||
typedef struct
|
typedef struct InputAtom
|
||||||
{
|
{
|
||||||
UINT32 uiTimeStamp;
|
UINT32 uiTimeStamp;
|
||||||
UINT16 usKeyState;
|
UINT16 usKeyState;
|
||||||
|
|||||||
@@ -34,9 +34,9 @@
|
|||||||
#include "utilities.h"
|
#include "utilities.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "GameSettings.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "zmouse.h"
|
#include "zmouse.h"
|
||||||
#include "GameSettings.h"
|
|
||||||
|
|
||||||
#include <vfs/Aspects/vfs_settings.h>
|
#include <vfs/Aspects/vfs_settings.h>
|
||||||
#include <vfs/Core/vfs.h>
|
#include <vfs/Core/vfs.h>
|
||||||
@@ -57,6 +57,7 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
#include <excpt.h>
|
||||||
#include "ExceptionHandling.h"
|
#include "ExceptionHandling.h"
|
||||||
|
|
||||||
#include "dbt.h"
|
#include "dbt.h"
|
||||||
@@ -87,6 +88,8 @@ static vfs::Path s_CodePage;
|
|||||||
|
|
||||||
static vfs::FileLogger *vfslog = NULL;
|
static vfs::FileLogger *vfslog = NULL;
|
||||||
|
|
||||||
|
int iWindowedMode;
|
||||||
|
|
||||||
void SHOWEXCEPTION(sgp::Exception& ex)
|
void SHOWEXCEPTION(sgp::Exception& ex)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
@@ -143,11 +146,17 @@ extern BOOLEAN CheckIfGameCdromIsInCDromDrive();
|
|||||||
extern void QueueEvent(UINT16 ubInputEvent, UINT32 usParam, UINT32 uiParam);
|
extern void QueueEvent(UINT16 ubInputEvent, UINT32 usParam, UINT32 uiParam);
|
||||||
|
|
||||||
// Prototype Declarations
|
// Prototype Declarations
|
||||||
|
INT32 FAR PASCAL SyncWindowProcedure(HWND hWindow, UINT16 Message, WPARAM wParam, LPARAM lParam);
|
||||||
INT32 FAR PASCAL WindowProcedure(HWND hWindow, UINT16 Message, WPARAM wParam, LPARAM lParam);
|
INT32 FAR PASCAL WindowProcedure(HWND hWindow, UINT16 Message, WPARAM wParam, LPARAM lParam);
|
||||||
BOOLEAN InitializeStandardGamingPlatform(HINSTANCE hInstance, int sCommandShow);
|
BOOLEAN InitializeStandardGamingPlatform(HINSTANCE hInstance, int sCommandShow);
|
||||||
void ShutdownStandardGamingPlatform(void);
|
void ShutdownStandardGamingPlatform(void);
|
||||||
|
void CreateStandardGamingPlatform(HWND hWindow);
|
||||||
void GetRuntimeSettings( );
|
void GetRuntimeSettings( );
|
||||||
|
void SafeSGPExit(void);
|
||||||
|
|
||||||
|
static bool CallGameLoop(bool wait);
|
||||||
|
static CRITICAL_SECTION gcsGameLoop;
|
||||||
|
|
||||||
|
|
||||||
int PASCAL HandledWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR pCommandLine, int sCommandShow);
|
int PASCAL HandledWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR pCommandLine, int sCommandShow);
|
||||||
|
|
||||||
@@ -201,6 +210,15 @@ BOOLEAN gfIgnoreMessages=FALSE;
|
|||||||
// GLOBAL VARIBLE, SET TO DEFAULT BUT CAN BE CHANGED BY THE GAME IF INIT FILE READ
|
// GLOBAL VARIBLE, SET TO DEFAULT BUT CAN BE CHANGED BY THE GAME IF INIT FILE READ
|
||||||
UINT8 gbPixelDepth = PIXEL_DEPTH;
|
UINT8 gbPixelDepth = PIXEL_DEPTH;
|
||||||
|
|
||||||
|
INT32 FAR PASCAL SyncWindowProcedure(HWND hWindow, UINT16 Message, WPARAM wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
INT32 retval;
|
||||||
|
EnterCriticalSection(&gcsGameLoop);
|
||||||
|
retval = WindowProcedure(hWindow, Message, wParam, lParam);
|
||||||
|
LeaveCriticalSection(&gcsGameLoop);
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
bool s_bExportStrings = false;
|
bool s_bExportStrings = false;
|
||||||
extern bool g_bUseXML_Strings;// = false;
|
extern bool g_bUseXML_Strings;// = false;
|
||||||
bool g_bUseXML_Structures = false;
|
bool g_bUseXML_Structures = false;
|
||||||
@@ -509,7 +527,8 @@ INT32 FAR PASCAL WindowProcedure(HWND hWindow, UINT16 Message, WPARAM wParam, LP
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_CREATE:
|
case WM_CREATE:
|
||||||
break;
|
CreateStandardGamingPlatform(hWindow);
|
||||||
|
break;
|
||||||
|
|
||||||
case WM_DESTROY:
|
case WM_DESTROY:
|
||||||
ShutdownStandardGamingPlatform();
|
ShutdownStandardGamingPlatform();
|
||||||
@@ -637,7 +656,7 @@ BOOLEAN InitializeStandardGamingPlatform(HINSTANCE hInstance, int sCommandShow)
|
|||||||
FontTranslationTable *pFontTable;
|
FontTranslationTable *pFontTable;
|
||||||
|
|
||||||
// now required by all (even JA2) in order to call ShutdownSGP
|
// now required by all (even JA2) in order to call ShutdownSGP
|
||||||
atexit(SGPExit);
|
atexit(SafeSGPExit);
|
||||||
|
|
||||||
// First, initialize the registry keys.
|
// First, initialize the registry keys.
|
||||||
InitializeRegistryKeys( "Wizardry8", "Wizardry8key" );
|
InitializeRegistryKeys( "Wizardry8", "Wizardry8key" );
|
||||||
@@ -698,6 +717,8 @@ BOOLEAN InitializeStandardGamingPlatform(HINSTANCE hInstance, int sCommandShow)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
InitializeCriticalSection(&gcsGameLoop);
|
||||||
|
|
||||||
FastDebugMsg("Initializing Video Manager");
|
FastDebugMsg("Initializing Video Manager");
|
||||||
// Initialize DirectDraw (DirectX 2)
|
// Initialize DirectDraw (DirectX 2)
|
||||||
if (InitializeVideoManager(hInstance, (UINT16) sCommandShow, (void *) WindowProcedure) == FALSE)
|
if (InitializeVideoManager(hInstance, (UINT16) sCommandShow, (void *) WindowProcedure) == FALSE)
|
||||||
@@ -723,7 +744,6 @@ BOOLEAN InitializeStandardGamingPlatform(HINSTANCE hInstance, int sCommandShow)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
InitializeJA2Clock();
|
|
||||||
//InitializeJA2TimerID();
|
//InitializeJA2TimerID();
|
||||||
|
|
||||||
#ifdef USE_VFS
|
#ifdef USE_VFS
|
||||||
@@ -873,6 +893,24 @@ BOOLEAN InitializeStandardGamingPlatform(HINSTANCE hInstance, int sCommandShow)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void TimerActivatedCallback(INT32 timer, PTR state)
|
||||||
|
{
|
||||||
|
if (gfApplicationActive && gfProgramIsRunning)
|
||||||
|
{
|
||||||
|
if (CallGameLoop(false))
|
||||||
|
YieldProcessor();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CreateStandardGamingPlatform(HWND hWindow)
|
||||||
|
{
|
||||||
|
InitializeJA2Clock();
|
||||||
|
|
||||||
|
if (!IsHiSpeedClockMode())
|
||||||
|
SetTimer( hWindow, 0, 1, NULL);
|
||||||
|
else
|
||||||
|
AddTimerNotifyCallback(TimerActivatedCallback, hWindow);
|
||||||
|
}
|
||||||
|
|
||||||
void ShutdownStandardGamingPlatform(void)
|
void ShutdownStandardGamingPlatform(void)
|
||||||
{
|
{
|
||||||
@@ -896,6 +934,7 @@ void ShutdownStandardGamingPlatform(void)
|
|||||||
//
|
//
|
||||||
// Shut down the different components of the SGP
|
// Shut down the different components of the SGP
|
||||||
//
|
//
|
||||||
|
ClearTimerNotifyCallbacks();
|
||||||
|
|
||||||
// TEST
|
// TEST
|
||||||
SoundServiceStreams();
|
SoundServiceStreams();
|
||||||
@@ -905,7 +944,6 @@ void ShutdownStandardGamingPlatform(void)
|
|||||||
ShutdownGame();
|
ShutdownGame();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ShutdownButtonSystem();
|
ShutdownButtonSystem();
|
||||||
MSYS_Shutdown();
|
MSYS_Shutdown();
|
||||||
|
|
||||||
@@ -944,6 +982,8 @@ void ShutdownStandardGamingPlatform(void)
|
|||||||
// down the debugging layer
|
// down the debugging layer
|
||||||
UnRegisterDebugTopic(TOPIC_SGP, "Standard Gaming Platform");
|
UnRegisterDebugTopic(TOPIC_SGP, "Standard Gaming Platform");
|
||||||
|
|
||||||
|
DeleteCriticalSection(&gcsGameLoop);
|
||||||
|
|
||||||
ShutdownDebugManager();
|
ShutdownDebugManager();
|
||||||
|
|
||||||
sgp::Logger::instance().shutdown();
|
sgp::Logger::instance().shutdown();
|
||||||
@@ -1023,12 +1063,25 @@ private:
|
|||||||
|
|
||||||
int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR pCommandLine, int sCommandShow)
|
int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR pCommandLine, int sCommandShow)
|
||||||
{
|
{
|
||||||
|
#ifdef _DEBUG
|
||||||
|
// Use this one ONLY if you're having memory corruption issues that can be repeated in a short time
|
||||||
|
// Otherwise it will just run out of memory.
|
||||||
|
|
||||||
|
/****************************************************************************************************/
|
||||||
|
/* */
|
||||||
|
/* DEBUG MEMORY ALLOCATION ON THE HEAP : uncomment when required */
|
||||||
|
/* ------------------------------------------------------------------------ */
|
||||||
|
/* */
|
||||||
|
/* _CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF | _CRTDBG_CHECK_EVERY_1024_DF); */
|
||||||
|
/* _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG ); */
|
||||||
|
/* */
|
||||||
|
/****************************************************************************************************/
|
||||||
|
#endif
|
||||||
|
|
||||||
//If we are to use exception handling
|
//If we are to use exception handling
|
||||||
#ifdef ENABLE_EXCEPTION_HANDLING
|
#ifdef ENABLE_EXCEPTION_HANDLING
|
||||||
int Result = -1;
|
int Result = -1;
|
||||||
|
|
||||||
|
|
||||||
__try
|
__try
|
||||||
{
|
{
|
||||||
Result = HandledWinMain(hInstance, hPrevInstance, pCommandLine, sCommandShow);
|
Result = HandledWinMain(hInstance, hPrevInstance, pCommandLine, sCommandShow);
|
||||||
@@ -1058,6 +1111,8 @@ int PASCAL HandledWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR pC
|
|||||||
HWND hPrevInstanceWindow;
|
HWND hPrevInstanceWindow;
|
||||||
UINT32 uiTimer = 0;
|
UINT32 uiTimer = 0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef USE_VFS
|
#ifdef USE_VFS
|
||||||
vfs::Log::setSharedString( getGameID() );
|
vfs::Log::setSharedString( getGameID() );
|
||||||
#endif
|
#endif
|
||||||
@@ -1193,9 +1248,6 @@ int PASCAL HandledWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR pC
|
|||||||
|
|
||||||
FastDebugMsg("Running Game");
|
FastDebugMsg("Running Game");
|
||||||
|
|
||||||
// 0verhaul: Use the smallest available timer to make sure all animation updates happen at the speed they're supposed to
|
|
||||||
SetTimer( ghWindow, uiTimer, 1, NULL);
|
|
||||||
|
|
||||||
// At this point the SGP is set up, which means all I/O, Memory, tools, etc... are available. All we need to do is
|
// At this point the SGP is set up, which means all I/O, Memory, tools, etc... are available. All we need to do is
|
||||||
// attend to the gaming mechanics themselves
|
// attend to the gaming mechanics themselves
|
||||||
Message.wParam = 0;
|
Message.wParam = 0;
|
||||||
@@ -1269,8 +1321,6 @@ int PASCAL HandledWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR pC
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
KillTimer( ghWindow, uiTimer);
|
|
||||||
|
|
||||||
// This is the normal exit point
|
// This is the normal exit point
|
||||||
FastDebugMsg("Exiting Game");
|
FastDebugMsg("Exiting Game");
|
||||||
PostQuitMessage(0);
|
PostQuitMessage(0);
|
||||||
@@ -1283,7 +1333,6 @@ int PASCAL HandledWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR pC
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void SGPExit(void)
|
void SGPExit(void)
|
||||||
{
|
{
|
||||||
static BOOLEAN fAlreadyExiting = FALSE;
|
static BOOLEAN fAlreadyExiting = FALSE;
|
||||||
@@ -1326,7 +1375,12 @@ void SGPExit(void)
|
|||||||
|
|
||||||
void GetRuntimeSettings( )
|
void GetRuntimeSettings( )
|
||||||
{
|
{
|
||||||
|
int iMaximize;
|
||||||
|
|
||||||
#ifndef USE_VFS
|
#ifndef USE_VFS
|
||||||
|
CHAR8 zMaximize[ 50 ];
|
||||||
|
CHAR8 zWindowedMode[ 50 ];
|
||||||
|
|
||||||
// Runtime settings - for now use INI file - later use registry
|
// Runtime settings - for now use INI file - later use registry
|
||||||
STRING512 INIFile; // Path to the ini file
|
STRING512 INIFile; // Path to the ini file
|
||||||
CHAR8 zScreenResolution[ 50 ];
|
CHAR8 zScreenResolution[ 50 ];
|
||||||
@@ -1340,12 +1394,20 @@ void GetRuntimeSettings( )
|
|||||||
vfs::PropertyContainer oProps;
|
vfs::PropertyContainer oProps;
|
||||||
oProps.initFromIniFile(GAME_INI_FILE);
|
oProps.initFromIniFile(GAME_INI_FILE);
|
||||||
#endif
|
#endif
|
||||||
iResolution = -1;
|
|
||||||
#ifndef USE_VFS
|
#ifndef USE_VFS
|
||||||
if (GetPrivateProfileString( "Ja2 Settings","SCREEN_RESOLUTION", "", zScreenResolution, 50, INIFile ))
|
if (GetPrivateProfileString( "Ja2 Settings","SCREEN_RESOLUTION", "", zScreenResolution, 50, INIFile ))
|
||||||
{
|
{
|
||||||
iResolution = atoi(zScreenResolution);
|
iResolution = atoi(zScreenResolution);
|
||||||
}
|
}
|
||||||
|
if (GetPrivateProfileString( "Ja2 Settings","SCREEN_MODE_WINDOWED_MAXIMIZE", "", zMaximize, 50, INIFile ))
|
||||||
|
{
|
||||||
|
iMaximize = atoi(zMaximize);
|
||||||
|
}
|
||||||
|
if (GetPrivateProfileString( "Ja2 Settings","SCREEN_MODE_WINDOWED", "", zWindowedMode, 50, INIFile ))
|
||||||
|
{
|
||||||
|
iWindowedMode = atoi(zWindowedMode);
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
vfs::String loc = oProps.getStringProperty("Ja2 Settings", L"LOCALE");
|
vfs::String loc = oProps.getStringProperty("Ja2 Settings", L"LOCALE");
|
||||||
if(!loc.empty())
|
if(!loc.empty())
|
||||||
@@ -1355,6 +1417,12 @@ void GetRuntimeSettings( )
|
|||||||
|
|
||||||
iResolution = (int)oProps.getIntProperty(L"Ja2 Settings", L"SCREEN_RESOLUTION", -1);
|
iResolution = (int)oProps.getIntProperty(L"Ja2 Settings", L"SCREEN_RESOLUTION", -1);
|
||||||
|
|
||||||
|
// WANNE: Always enable
|
||||||
|
//iMaximize = (int)oProps.getIntProperty(L"Ja2 Settings", L"SCREEN_MODE_WINDOWED_MAXIMIZE", -1);
|
||||||
|
iMaximize = 1;
|
||||||
|
|
||||||
|
iWindowedMode = (int)oProps.getIntProperty(L"Ja2 Settings", L"SCREEN_MODE_WINDOWED", -1);
|
||||||
|
|
||||||
vfs::Settings::setUseUnicode( !oProps.getBoolProperty(L"Ja2 Settings", L"VFS_NO_UNICODE", false) );
|
vfs::Settings::setUseUnicode( !oProps.getBoolProperty(L"Ja2 Settings", L"VFS_NO_UNICODE", false) );
|
||||||
|
|
||||||
std::list<vfs::String> ini_list;
|
std::list<vfs::String> ini_list;
|
||||||
@@ -1428,23 +1496,120 @@ void GetRuntimeSettings( )
|
|||||||
|
|
||||||
switch (iResolution)
|
switch (iResolution)
|
||||||
{
|
{
|
||||||
// 640x480
|
case _640x480:
|
||||||
case 0:
|
|
||||||
iResX = 640;
|
iResX = 640;
|
||||||
iResY = 480;
|
iResY = 480;
|
||||||
break;
|
break;
|
||||||
// 1024x768
|
case _800x600:
|
||||||
case 2:
|
iResX = 800;
|
||||||
|
iResY = 600;
|
||||||
|
break;
|
||||||
|
case _1024x600:
|
||||||
|
iResX = 1024;
|
||||||
|
iResY = 600;
|
||||||
|
break;
|
||||||
|
case _1280x720:
|
||||||
|
iResX = 1280;
|
||||||
|
iResY = 720;
|
||||||
|
break;
|
||||||
|
case _1024x768:
|
||||||
iResX = 1024;
|
iResX = 1024;
|
||||||
iResY = 768;
|
iResY = 768;
|
||||||
break;
|
break;
|
||||||
// 800x600
|
case _1280x768:
|
||||||
default:
|
iResX = 1280;
|
||||||
iResolution = 1;
|
iResY = 768;
|
||||||
|
break;
|
||||||
|
case _1360x768:
|
||||||
|
iResX = 1360;
|
||||||
|
iResY = 768;
|
||||||
|
break;
|
||||||
|
case _1366x768:
|
||||||
|
iResX = 1366;
|
||||||
|
iResY = 768;
|
||||||
|
break;
|
||||||
|
case _1280x800:
|
||||||
|
iResX = 1280;
|
||||||
|
iResY = 800;
|
||||||
|
break;
|
||||||
|
case _1440x900:
|
||||||
|
iResX = 1440;
|
||||||
|
iResY = 900;
|
||||||
|
break;
|
||||||
|
case _1600x900:
|
||||||
|
iResX = 1600;
|
||||||
|
iResY = 900;
|
||||||
|
break;
|
||||||
|
case _1280x960:
|
||||||
|
iResX = 1280;
|
||||||
|
iResY = 960;
|
||||||
|
break;
|
||||||
|
case _1440x960:
|
||||||
|
iResX = 1440;
|
||||||
|
iResY = 960;
|
||||||
|
break;
|
||||||
|
case _1770x1000:
|
||||||
|
iResX = 1770;
|
||||||
|
iResY = 1000;
|
||||||
|
break;
|
||||||
|
case _1280x1024:
|
||||||
|
iResX = 1280;
|
||||||
|
iResY = 1024;
|
||||||
|
break;
|
||||||
|
case _1360x1024:
|
||||||
|
iResX = 1360;
|
||||||
|
iResY = 1024;
|
||||||
|
break;
|
||||||
|
case _1600x1024:
|
||||||
|
iResX = 1600;
|
||||||
|
iResY = 1024;
|
||||||
|
break;
|
||||||
|
case _1440x1050:
|
||||||
|
iResX = 1440;
|
||||||
|
iResY = 1050;
|
||||||
|
break;
|
||||||
|
case _1680x1050:
|
||||||
|
iResX = 1680;
|
||||||
|
iResY = 1050;
|
||||||
|
break;
|
||||||
|
case _1920x1080:
|
||||||
|
iResX = 1920;
|
||||||
|
iResY = 1080;
|
||||||
|
break;
|
||||||
|
case _1600x1200:
|
||||||
|
iResX = 1600;
|
||||||
|
iResY = 1200;
|
||||||
|
break;
|
||||||
|
case _1920x1200:
|
||||||
|
iResX = 1920;
|
||||||
|
iResY = 1200;
|
||||||
|
break;
|
||||||
|
case _2560x1440:
|
||||||
|
iResX = 2560;
|
||||||
|
iResY = 1440;
|
||||||
|
break;
|
||||||
|
case _2560x1600:
|
||||||
|
iResX = 2560;
|
||||||
|
iResY = 1600;
|
||||||
|
break;
|
||||||
|
default: // 800x600
|
||||||
|
iResolution = _800x600;
|
||||||
iResX = 800;
|
iResX = 800;
|
||||||
iResY = 600;
|
iResY = 600;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (iWindowedMode == 1 && iMaximize == 1)
|
||||||
|
{
|
||||||
|
if ((iResX - 16) >= 1024)
|
||||||
|
iResX = iResX - 16;
|
||||||
|
|
||||||
|
if ((iResY - 70) >= 768)
|
||||||
|
iResY = iResY - 70;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Adjust again
|
||||||
|
|
||||||
#ifndef USE_VFS
|
#ifndef USE_VFS
|
||||||
gbPixelDepth = GetPrivateProfileInt( "SGP", "PIXEL_DEPTH", PIXEL_DEPTH, INIFile );
|
gbPixelDepth = GetPrivateProfileInt( "SGP", "PIXEL_DEPTH", PIXEL_DEPTH, INIFile );
|
||||||
|
|
||||||
@@ -1462,14 +1627,33 @@ void GetRuntimeSettings( )
|
|||||||
// WANNE: Should we play the intro?
|
// WANNE: Should we play the intro?
|
||||||
iPlayIntro = (int) GetPrivateProfileInt( "Ja2 Settings","PLAY_INTRO", iPlayIntro, INIFile );
|
iPlayIntro = (int) GetPrivateProfileInt( "Ja2 Settings","PLAY_INTRO", iPlayIntro, INIFile );
|
||||||
#else
|
#else
|
||||||
gbPixelDepth = (UINT8)oProps.getIntProperty(L"SGP", L"PIXEL_DEPTH", PIXEL_DEPTH);
|
gbPixelDepth = PIXEL_DEPTH;
|
||||||
|
|
||||||
SCREEN_WIDTH = (UINT16)oProps.getIntProperty(L"SGP", L"WIDTH", iResX);
|
SCREEN_WIDTH = iResX;
|
||||||
SCREEN_HEIGHT = (UINT16)oProps.getIntProperty(L"SGP", L"HEIGHT", iResY);
|
SCREEN_HEIGHT = iResY;
|
||||||
|
|
||||||
iScreenWidthOffset = (SCREEN_WIDTH - 640) / 2;
|
iScreenWidthOffset = (SCREEN_WIDTH - 640) / 2;
|
||||||
iScreenHeightOffset = (SCREEN_HEIGHT - 480) / 2;
|
iScreenHeightOffset = (SCREEN_HEIGHT - 480) / 2;
|
||||||
|
|
||||||
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
|
{
|
||||||
|
xResOffset = ((SCREEN_WIDTH - 640) / 2);
|
||||||
|
yResOffset = ((SCREEN_HEIGHT - 480) / 2);
|
||||||
|
}
|
||||||
|
else if (iResolution < _1024x768)
|
||||||
|
{
|
||||||
|
xResOffset = ((SCREEN_WIDTH - 800) / 2);
|
||||||
|
yResOffset = ((SCREEN_HEIGHT - 600) / 2);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
xResOffset = ((SCREEN_WIDTH - 1024) / 2);
|
||||||
|
yResOffset = ((SCREEN_HEIGHT - 768) / 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
xResSize = (SCREEN_WIDTH - 2 * xResOffset); // one of the following: 1024 or 800 or 640
|
||||||
|
yResSize = (SCREEN_HEIGHT - 2 * yResOffset); // one of the follownig: 768 or 600 or 480
|
||||||
|
|
||||||
/* Sergeant_Kolja. 2007-02-20: runtime Windowed mode instead of compile-time */
|
/* Sergeant_Kolja. 2007-02-20: runtime Windowed mode instead of compile-time */
|
||||||
/* 1 for Windowed, 0 for Fullscreen */
|
/* 1 for Windowed, 0 for Fullscreen */
|
||||||
if( !bScreenModeCmdLine )
|
if( !bScreenModeCmdLine )
|
||||||
@@ -1484,9 +1668,28 @@ void GetRuntimeSettings( )
|
|||||||
s_DebugKeyboardInput = oProps.getBoolProperty(L"Ja2 Settings", L"DEBUG_KEYS", false);
|
s_DebugKeyboardInput = oProps.getBoolProperty(L"Ja2 Settings", L"DEBUG_KEYS", false);
|
||||||
s_CodePage = oProps.getStringProperty(L"Ja2 Settings", L"CODE_PAGE");
|
s_CodePage = oProps.getStringProperty(L"Ja2 Settings", L"CODE_PAGE");
|
||||||
#endif // USE_CODE_PAGE
|
#endif // USE_CODE_PAGE
|
||||||
|
|
||||||
|
// get timer/clock initialization state
|
||||||
|
SetHiSpeedClockMode( oProps.getBoolProperty("Ja2 Settings", "HIGHSPEED_TIMER", false) ? TRUE : FALSE );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SafeSGPExit(void)
|
||||||
|
{
|
||||||
|
// SGPExit tends to use resources that are already uninitialized so handle
|
||||||
|
__try
|
||||||
|
{
|
||||||
|
SGPExit();
|
||||||
|
}
|
||||||
|
__except( EXCEPTION_EXECUTE_HANDLER )
|
||||||
|
{
|
||||||
|
// The application is in exit and best effort to clean up
|
||||||
|
// has failed so just ignore and continue silently
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void ShutdownWithErrorBox(CHAR8 *pcMessage)
|
void ShutdownWithErrorBox(CHAR8 *pcMessage)
|
||||||
{
|
{
|
||||||
strncpy(gzErrorMsg, pcMessage, 255);
|
strncpy(gzErrorMsg, pcMessage, 255);
|
||||||
@@ -1617,3 +1820,61 @@ void ProcessJa2CommandLineBeforeInitialization(CHAR8 *pCommandLine)
|
|||||||
|
|
||||||
MemFree(pCopy);
|
MemFree(pCopy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static LONG __stdcall SGPExceptionFilter(int exceptionCount, EXCEPTION_POINTERS* pExceptInfo)
|
||||||
|
{
|
||||||
|
#ifdef ENABLE_EXCEPTION_HANDLING
|
||||||
|
|
||||||
|
if (exceptionCount > 3)
|
||||||
|
{
|
||||||
|
// the exception handler writer can fail with exceptions too
|
||||||
|
__try
|
||||||
|
{
|
||||||
|
RecordExceptionInfo(pExceptInfo);
|
||||||
|
} __except (EXCEPTION_EXECUTE_HANDLER) {}
|
||||||
|
AssertMsg(FALSE, "Unhanded exception processing GameLoop unable to recover.");
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return EXCEPTION_EXECUTE_HANDLER;
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool CallGameLoop(bool wait)
|
||||||
|
{
|
||||||
|
static int numUnsuccessfulTries = 0;
|
||||||
|
if (wait)
|
||||||
|
{
|
||||||
|
EnterCriticalSection(&gcsGameLoop);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( !TryEnterCriticalSection(&gcsGameLoop) )
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
__try
|
||||||
|
{
|
||||||
|
__try
|
||||||
|
{
|
||||||
|
GameLoop();
|
||||||
|
numUnsuccessfulTries = 0;
|
||||||
|
}
|
||||||
|
__except( SGPExceptionFilter(++numUnsuccessfulTries, GetExceptionInformation()) )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
__finally
|
||||||
|
{
|
||||||
|
LeaveCriticalSection(&gcsGameLoop);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Give it several attempts to recover from random exceptions and to display error screen
|
||||||
|
if (numUnsuccessfulTries > 5)
|
||||||
|
ShutdownWithErrorBox("Unhandled exception. Unable to recover.");
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1830,7 +1830,7 @@ void RefreshScreen(void *DummyVariable)
|
|||||||
}
|
}
|
||||||
DirectXAttempt ( ReturnCode, __LINE__, __FILE__ );
|
DirectXAttempt ( ReturnCode, __LINE__, __FILE__ );
|
||||||
|
|
||||||
if (ReturnCode == DDERR_SURFACELOST)
|
if (ReturnCode == DDERR_SURFACELOST || ReturnCode == DDERR_SURFACEBUSY)
|
||||||
{
|
{
|
||||||
goto ENDOFLOOP;
|
goto ENDOFLOOP;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -272,6 +272,7 @@ BOOLEAN GetVideoObject( HVOBJECT *hVObject, UINT32 uiIndex )
|
|||||||
}
|
}
|
||||||
curr = curr->next;
|
curr = curr->next;
|
||||||
}
|
}
|
||||||
|
*hVObject = NULL;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -932,7 +932,7 @@ void HandleViewerInput()
|
|||||||
{
|
{
|
||||||
SECTORINFO *pSector;
|
SECTORINFO *pSector;
|
||||||
InputAtom Event;
|
InputAtom Event;
|
||||||
while( DequeueEvent( &Event ) )
|
while( DequeueSpecificEvent(&Event, KEY_DOWN|KEY_UP) )
|
||||||
{
|
{
|
||||||
if( !HandleTextInput( &Event ) && Event.usEvent == KEY_DOWN )
|
if( !HandleTextInput( &Event ) && Event.usEvent == KEY_DOWN )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9587,7 +9587,7 @@ void CreateContractBox( SOLDIERTYPE *pCharacter )
|
|||||||
CHAR16 sString[ 50 ];
|
CHAR16 sString[ 50 ];
|
||||||
CHAR16 sDollarString[ 50 ];
|
CHAR16 sDollarString[ 50 ];
|
||||||
|
|
||||||
ContractPosition.iX = OrigContractPosition.iX;
|
ContractPosition.iX = (SCREEN_WIDTH - INTERFACE_WIDTH)/2 + OrigContractPosition.iX;
|
||||||
|
|
||||||
if( giBoxY != 0 )
|
if( giBoxY != 0 )
|
||||||
{
|
{
|
||||||
@@ -9847,7 +9847,7 @@ void CreateAssignmentsBox( void )
|
|||||||
|
|
||||||
// will create attribute pop up menu for mapscreen assignments
|
// will create attribute pop up menu for mapscreen assignments
|
||||||
|
|
||||||
AssignmentPosition.iX = OrigAssignmentPosition.iX;
|
AssignmentPosition.iX = (SCREEN_WIDTH - INTERFACE_WIDTH)/2 + OrigAssignmentPosition.iX;
|
||||||
|
|
||||||
if( giBoxY != 0 )
|
if( giBoxY != 0 )
|
||||||
{
|
{
|
||||||
@@ -15536,7 +15536,7 @@ void ResetAllExpensiveFacilityAssignments()
|
|||||||
BOOLEAN IsOutstandingFacilityDebtWithErrorReport()
|
BOOLEAN IsOutstandingFacilityDebtWithErrorReport()
|
||||||
{
|
{
|
||||||
CHAR16 sString[256];
|
CHAR16 sString[256];
|
||||||
SGPRect pCenteringRect= {0, 0, 640, INV_INTERFACE_START_Y };
|
SGPRect pCenteringRect= {0 + xResOffset, 0, SCREEN_WIDTH - xResOffset, INV_INTERFACE_START_Y };
|
||||||
|
|
||||||
if (giTotalOwedForFacilityOperationsToday && // Owe money
|
if (giTotalOwedForFacilityOperationsToday && // Owe money
|
||||||
gfOutstandingFacilityDebt ) // Owed money tonight as well
|
gfOutstandingFacilityDebt ) // Owed money tonight as well
|
||||||
|
|||||||
@@ -529,13 +529,13 @@ void DoTransitionFromPreBattleInterfaceToAutoResolve()
|
|||||||
iPercentage = 0;
|
iPercentage = 0;
|
||||||
uiStartTime = GetJA2Clock();
|
uiStartTime = GetJA2Clock();
|
||||||
|
|
||||||
sStartLeft = 59;
|
sStartLeft = 59 + xResOffset;
|
||||||
sStartTop = 69;
|
sStartTop = 69;
|
||||||
sEndLeft = SrcRect.iLeft + gpAR->sWidth / 2;
|
sEndLeft = SrcRect.iLeft + gpAR->sWidth / 2;
|
||||||
sEndTop = SrcRect.iTop + gpAR->sHeight / 2;
|
sEndTop = SrcRect.iTop + gpAR->sHeight / 2;
|
||||||
|
|
||||||
//save the prebattle/mapscreen interface background
|
//save the prebattle/mapscreen interface background
|
||||||
BlitBufferToBuffer( FRAME_BUFFER, guiEXTRABUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
|
BlitBufferToBuffer( FRAME_BUFFER, guiEXTRABUFFER, 0 + xResOffset, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
|
||||||
|
|
||||||
//render the autoresolve panel
|
//render the autoresolve panel
|
||||||
RenderAutoResolve();
|
RenderAutoResolve();
|
||||||
@@ -670,7 +670,7 @@ UINT32 AutoResolveScreenHandle()
|
|||||||
SGPRect ClipRect;
|
SGPRect ClipRect;
|
||||||
gpAR->fEnteringAutoResolve = FALSE;
|
gpAR->fEnteringAutoResolve = FALSE;
|
||||||
//Take the framebuffer, shade it, and save it to the SAVEBUFFER.
|
//Take the framebuffer, shade it, and save it to the SAVEBUFFER.
|
||||||
ClipRect.iLeft = 0;
|
ClipRect.iLeft = 0 + xResOffset;
|
||||||
ClipRect.iTop = 0;
|
ClipRect.iTop = 0;
|
||||||
/*ClipRect.iRight = 640;
|
/*ClipRect.iRight = 640;
|
||||||
ClipRect.iBottom = 480;*/
|
ClipRect.iBottom = 480;*/
|
||||||
@@ -681,7 +681,7 @@ UINT32 AutoResolveScreenHandle()
|
|||||||
Blt16BPPBufferShadowRect( (UINT16*)pDestBuf, uiDestPitchBYTES, &ClipRect );
|
Blt16BPPBufferShadowRect( (UINT16*)pDestBuf, uiDestPitchBYTES, &ClipRect );
|
||||||
UnLockVideoSurface( FRAME_BUFFER );
|
UnLockVideoSurface( FRAME_BUFFER );
|
||||||
//BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, 0, 0, 640, 480 );
|
//BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, 0, 0, 640, 480 );
|
||||||
BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
|
BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, 0 + xResOffset, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
|
||||||
KillPreBattleInterface();
|
KillPreBattleInterface();
|
||||||
CalculateAutoResolveInfo();
|
CalculateAutoResolveInfo();
|
||||||
CalculateSoldierCells( FALSE );
|
CalculateSoldierCells( FALSE );
|
||||||
@@ -1369,7 +1369,7 @@ void ExpandWindow()
|
|||||||
|
|
||||||
//The new rect now determines the state of the current rectangle.
|
//The new rect now determines the state of the current rectangle.
|
||||||
pDestBuf = LockVideoSurface( FRAME_BUFFER, &uiDestPitchBYTES );
|
pDestBuf = LockVideoSurface( FRAME_BUFFER, &uiDestPitchBYTES );
|
||||||
SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
|
SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0 + xResOffset, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
|
||||||
RectangleDraw( TRUE, gpAR->ExRect.iLeft, gpAR->ExRect.iTop, gpAR->ExRect.iRight, gpAR->ExRect.iBottom, Get16BPPColor( FROMRGB( 200, 200, 100 ) ), pDestBuf );
|
RectangleDraw( TRUE, gpAR->ExRect.iLeft, gpAR->ExRect.iTop, gpAR->ExRect.iRight, gpAR->ExRect.iBottom, Get16BPPColor( FROMRGB( 200, 200, 100 ) ), pDestBuf );
|
||||||
UnLockVideoSurface( FRAME_BUFFER );
|
UnLockVideoSurface( FRAME_BUFFER );
|
||||||
//left
|
//left
|
||||||
@@ -2214,7 +2214,7 @@ void CreateAutoResolveInterface()
|
|||||||
UINT8 cnt;
|
UINT8 cnt;
|
||||||
|
|
||||||
//Setup new autoresolve blanket interface.
|
//Setup new autoresolve blanket interface.
|
||||||
MSYS_DefineRegion( &gpAR->AutoResolveRegion, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, MSYS_PRIORITY_HIGH-1, 0,
|
MSYS_DefineRegion( &gpAR->AutoResolveRegion, 0 + xResOffset, 0, SCREEN_WIDTH, SCREEN_HEIGHT, MSYS_PRIORITY_HIGH-1, 0,
|
||||||
MSYS_NO_CALLBACK, MSYS_NO_CALLBACK );
|
MSYS_NO_CALLBACK, MSYS_NO_CALLBACK );
|
||||||
gpAR->fRenderAutoResolve = TRUE;
|
gpAR->fRenderAutoResolve = TRUE;
|
||||||
gpAR->fExitAutoResolve = FALSE;
|
gpAR->fExitAutoResolve = FALSE;
|
||||||
@@ -2286,7 +2286,28 @@ void CreateAutoResolveInterface()
|
|||||||
VOBJECT_DESC VObjectDesc;
|
VOBJECT_DESC VObjectDesc;
|
||||||
//Load the face
|
//Load the face
|
||||||
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
||||||
|
|
||||||
|
/*
|
||||||
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\%02d.sti", gMercProfiles[ gpMercs[ i ].pSoldier->ubProfile ].ubFaceIndex );
|
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\%02d.sti", gMercProfiles[ gpMercs[ i ].pSoldier->ubProfile ].ubFaceIndex );
|
||||||
|
*/
|
||||||
|
|
||||||
|
if ( ( gpMercs[ i ].pSoldier->ubProfile >= 0 ) && ( gpMercs[ i ].pSoldier->ubProfile < 100 ) && ( gProfilesIMP[ gpMercs[ i ].pSoldier->ubProfile ].ProfilId == gpMercs[ i ].pSoldier->ubProfile ) )
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "IMPFaces\\65Face\\%02d.sti", gMercProfiles[ gpMercs[ i ].pSoldier->ubProfile ].ubFaceIndex );
|
||||||
|
}
|
||||||
|
else if ( ( gpMercs[ i ].pSoldier->ubProfile > 99 ) && ( gProfilesIMP[ gpMercs[ i ].pSoldier->ubProfile ].ProfilId == gpMercs[ i ].pSoldier->ubProfile ) )
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "IMPFaces\\65Face\\%02d.sti", gMercProfiles[ gpMercs[ i ].pSoldier->ubProfile ].ubFaceIndex );
|
||||||
|
}
|
||||||
|
else if ( ( gpMercs[ i ].pSoldier->ubProfile >= 0 ) && ( gpMercs[ i ].pSoldier->ubProfile < 100 ) )
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\%02d.sti", gMercProfiles[ gpMercs[ i ].pSoldier->ubProfile ].ubFaceIndex );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\%02d.sti", gMercProfiles[ gpMercs[ i ].pSoldier->ubProfile ].ubFaceIndex );
|
||||||
|
}
|
||||||
|
|
||||||
if( !AddVideoObject( &VObjectDesc, &gpMercs[ i ].uiVObjectID ) )
|
if( !AddVideoObject( &VObjectDesc, &gpMercs[ i ].uiVObjectID ) )
|
||||||
{
|
{
|
||||||
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\speck.sti" );
|
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\speck.sti" );
|
||||||
@@ -2295,6 +2316,8 @@ void CreateAutoResolveInterface()
|
|||||||
AssertMsg( 0, String("Failed to load %Faces\\65Face\\%02d.sti or it's placeholder, speck.sti", gMercProfiles[ gpMercs[ i ].pSoldier->ubProfile ].ubFaceIndex) );
|
AssertMsg( 0, String("Failed to load %Faces\\65Face\\%02d.sti or it's placeholder, speck.sti", gMercProfiles[ gpMercs[ i ].pSoldier->ubProfile ].ubFaceIndex) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if( GetVideoObject( &hVObject, gpMercs[ i ].uiVObjectID ) )
|
if( GetVideoObject( &hVObject, gpMercs[ i ].uiVObjectID ) )
|
||||||
{
|
{
|
||||||
hVObject->pShades[ 0 ] = Create16BPPPaletteShaded( hVObject->pPaletteEntry, 255, 255, 255, FALSE );
|
hVObject->pShades[ 0 ] = Create16BPPPaletteShaded( hVObject->pPaletteEntry, 255, 255, 255, FALSE );
|
||||||
@@ -2433,7 +2456,7 @@ void CreateAutoResolveInterface()
|
|||||||
//Build the interface buffer, and blit the "shaded" background. This info won't
|
//Build the interface buffer, and blit the "shaded" background. This info won't
|
||||||
//change from now on, but will be used to restore text.
|
//change from now on, but will be used to restore text.
|
||||||
BuildInterfaceBuffer();
|
BuildInterfaceBuffer();
|
||||||
BlitBufferToBuffer( guiSAVEBUFFER, FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
|
BlitBufferToBuffer( guiSAVEBUFFER, FRAME_BUFFER, 0 + xResOffset, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
|
||||||
|
|
||||||
//If we are bumping up the interface, then also use that piece of info to
|
//If we are bumping up the interface, then also use that piece of info to
|
||||||
//move the buttons up by the same amount.
|
//move the buttons up by the same amount.
|
||||||
@@ -3334,7 +3357,7 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Autoresolve3");
|
|||||||
|
|
||||||
InputAtom InputEvent;
|
InputAtom InputEvent;
|
||||||
BOOLEAN fResetAutoResolve = FALSE;
|
BOOLEAN fResetAutoResolve = FALSE;
|
||||||
while( DequeueEvent( &InputEvent ) )
|
while( DequeueSpecificEvent(&InputEvent, KEY_DOWN|KEY_UP|KEY_REPEAT) )
|
||||||
{
|
{
|
||||||
if( InputEvent.usEvent == KEY_DOWN || InputEvent.usEvent == KEY_REPEAT )
|
if( InputEvent.usEvent == KEY_DOWN || InputEvent.usEvent == KEY_REPEAT )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,14 +5,15 @@
|
|||||||
|
|
||||||
|
|
||||||
// where the time string itself is rendered
|
// where the time string itself is rendered
|
||||||
#define CLOCK_X (SCREEN_WIDTH - 86) //554
|
#define CLOCK_X (SCREEN_WIDTH - xResSize)/2 + (xResSize - 86)
|
||||||
#define CLOCK_Y (SCREEN_HEIGHT - 21) //459
|
#define CLOCK_REGION_START_X (CLOCK_X + 2)
|
||||||
|
#define CLOCK_REGION_WIDTH ((xResSize - 20) - CLOCK_REGION_START_X)
|
||||||
|
#define CLOCK_Y (SCREEN_HEIGHT - 21)
|
||||||
|
|
||||||
// the mouse region around the clock (bigger)
|
// the mouse region around the clock (bigger)
|
||||||
#define CLOCK_REGION_START_X (SCREEN_WIDTH - 88) //552
|
|
||||||
#define CLOCK_REGION_START_Y (SCREEN_HEIGHT - 24) //456
|
#define CLOCK_REGION_START_Y (SCREEN_HEIGHT - 24)
|
||||||
#define CLOCK_REGION_WIDTH ((SCREEN_WIDTH - 20) - CLOCK_REGION_START_X) // ( 620 - CLOCK_REGION_START_X )
|
#define CLOCK_REGION_HEIGHT ((SCREEN_HEIGHT - 12) - CLOCK_REGION_START_Y)
|
||||||
#define CLOCK_REGION_HEIGHT ((SCREEN_HEIGHT - 12) - CLOCK_REGION_START_Y) //( 468 - CLOCK_REGION_START_Y )
|
|
||||||
|
|
||||||
#define NUM_SEC_IN_DAY 86400
|
#define NUM_SEC_IN_DAY 86400
|
||||||
#define NUM_SEC_IN_HOUR 3600
|
#define NUM_SEC_IN_HOUR 3600
|
||||||
|
|||||||
+19
-19
@@ -3285,23 +3285,23 @@ int i;
|
|||||||
|
|
||||||
static int l_ExecuteTacticalTextBox(lua_State *L)
|
static int l_ExecuteTacticalTextBox(lua_State *L)
|
||||||
{
|
{
|
||||||
INT16 sLeftPosition = 110;
|
INT16 sLeftPosition = 110;
|
||||||
UINT32 idText = 0;
|
UINT32 idText = 0;
|
||||||
UINT8 n = lua_gettop(L);
|
UINT8 n = lua_gettop(L);
|
||||||
wchar_t sText[400];
|
//wchar_t sText[400];
|
||||||
UINT32 uiStartLoc=0;
|
UINT32 uiStartLoc=0;
|
||||||
CHAR16 zString[512];
|
CHAR16 zString[512];
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
//#define LANGMESSAGEFILE "BinaryData\\TacticalMessages.EDT"
|
//#define LANGMESSAGEFILE "BinaryData\\TacticalMessages.EDT"
|
||||||
//#define EDT_SIZE 400 * 2
|
//#define EDT_SIZE 400 * 2
|
||||||
|
|
||||||
for (i= 1; i<=n; i++ )
|
for (i= 1; i<=n; i++ )
|
||||||
{
|
{
|
||||||
if (i == 1 ) sLeftPosition = lua_tointeger(L,i);
|
if (i == 1 ) sLeftPosition = lua_tointeger(L,i);
|
||||||
if (i == 2 ) idText = lua_tointeger(L,i);
|
if (i == 2 ) idText = lua_tointeger(L,i);
|
||||||
|
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
if ( FileExists(LANGMESSAGEFILE) )
|
if ( FileExists(LANGMESSAGEFILE) )
|
||||||
{
|
{
|
||||||
@@ -3315,14 +3315,14 @@ int i;
|
|||||||
swprintf( zString, L"Empty Text" );
|
swprintf( zString, L"Empty Text" );
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
if ( idText >= 0 && idText <= 1000 )
|
if ( idText >= 0 && idText <= 1000 )
|
||||||
{
|
{
|
||||||
swprintf( zString, XMLTacticalMessages[idText] );
|
swprintf( zString, XMLTacticalMessages[idText] );
|
||||||
|
|
||||||
if ( sLeftPosition <= 0 ) sLeftPosition = 110;
|
if ( sLeftPosition <= 0 ) sLeftPosition = 110;
|
||||||
|
|
||||||
ExecuteTacticalTextBox( sLeftPosition, zString );
|
ExecuteTacticalTextBox( sLeftPosition, zString );
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -157,15 +157,15 @@ BOOLEAN LoadMapBorderGraphics( void )
|
|||||||
// will load map border
|
// will load map border
|
||||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||||
|
|
||||||
if (iResolution == 0)
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
{
|
{
|
||||||
FilenameForBPP( "INTERFACE\\MBS.sti", VObjectDesc.ImageFile );
|
FilenameForBPP( "INTERFACE\\MBS.sti", VObjectDesc.ImageFile );
|
||||||
}
|
}
|
||||||
else if (iResolution == 1)
|
else if (iResolution < _1024x768)
|
||||||
{
|
{
|
||||||
FilenameForBPP( "INTERFACE\\MBS_800x600.sti", VObjectDesc.ImageFile );
|
FilenameForBPP( "INTERFACE\\MBS_800x600.sti", VObjectDesc.ImageFile );
|
||||||
}
|
}
|
||||||
else if (iResolution == 2)
|
else
|
||||||
{
|
{
|
||||||
FilenameForBPP( "INTERFACE\\MBS_1024x768.sti", VObjectDesc.ImageFile );
|
FilenameForBPP( "INTERFACE\\MBS_1024x768.sti", VObjectDesc.ImageFile );
|
||||||
}
|
}
|
||||||
@@ -220,21 +220,21 @@ void RenderMapBorder( void )
|
|||||||
// get and blt border
|
// get and blt border
|
||||||
GetVideoObject(&hHandle, guiMapBorder );
|
GetVideoObject(&hHandle, guiMapBorder );
|
||||||
// HEADROCK HAM 4: Load different map border depending on whether we want to display the mobile militia button or not.
|
// HEADROCK HAM 4: Load different map border depending on whether we want to display the mobile militia button or not.
|
||||||
|
|
||||||
if (gGameExternalOptions.gfAllowMilitiaGroups)
|
if (gGameExternalOptions.gfAllowMilitiaGroups)
|
||||||
{
|
{
|
||||||
BltVideoObject( guiSAVEBUFFER , hHandle, 1, MAP_BORDER_X, MAP_BORDER_Y, VO_BLT_SRCTRANSPARENCY,NULL );
|
BltVideoObject( guiSAVEBUFFER , hHandle, 1, xResOffset + MAP_BORDER_X, MAP_BORDER_Y, VO_BLT_SRCTRANSPARENCY,NULL );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
BltVideoObject( guiSAVEBUFFER , hHandle, 0, MAP_BORDER_X, MAP_BORDER_Y, VO_BLT_SRCTRANSPARENCY,NULL );
|
BltVideoObject( guiSAVEBUFFER , hHandle, 0, xResOffset + MAP_BORDER_X, MAP_BORDER_Y, VO_BLT_SRCTRANSPARENCY,NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
RestoreExternBackgroundRect( MAP_BORDER_X, MAP_BORDER_Y, SCREEN_WIDTH - MAP_BORDER_X, SCREEN_HEIGHT );
|
RestoreExternBackgroundRect( xResOffset + MAP_BORDER_X, MAP_BORDER_Y, SCREEN_WIDTH - MAP_BORDER_X - 2 * xResOffset, SCREEN_HEIGHT );
|
||||||
|
|
||||||
// show the level marker
|
// show the level marker
|
||||||
DisplayCurrentLevelMarker( );
|
DisplayCurrentLevelMarker( );
|
||||||
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -297,27 +297,35 @@ void RenderMapBorderEtaPopUp( void )
|
|||||||
UINT16 offsetY = 0;
|
UINT16 offsetY = 0;
|
||||||
UINT16 offsetBorderY = 0;
|
UINT16 offsetBorderY = 0;
|
||||||
|
|
||||||
if (iResolution == 0)
|
UINT16 xVal = 215;
|
||||||
|
UINT16 yVal = 291;
|
||||||
|
|
||||||
|
// TODO.RW.ARSP: Check
|
||||||
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
{
|
{
|
||||||
offsetX = 215;
|
offsetX = xVal + xResOffset;
|
||||||
offsetY = 291;
|
offsetY = yVal + yResOffset;
|
||||||
offsetBorderY = offsetY + 19;
|
|
||||||
}
|
}
|
||||||
else if (iResolution == 1)
|
else if (iResolution < _1024x768)
|
||||||
{
|
{
|
||||||
offsetX = 215 + 80;
|
offsetX = xVal + 80; // + xResOffset;
|
||||||
offsetY = 291 + 120;
|
offsetY = yVal + 120; // + yResOffset;
|
||||||
offsetBorderY = offsetY + 19;
|
|
||||||
}
|
}
|
||||||
else if (iResolution == 2)
|
else
|
||||||
{
|
{
|
||||||
offsetX = 215 + 180;
|
offsetX = xVal + 180;// + xResOffset;
|
||||||
offsetY = 291 + 285;
|
offsetY = yVal + 285;// + yResOffset;
|
||||||
offsetBorderY = offsetY + 19;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO.RW: Adjust for 1024x768
|
offsetBorderY = offsetY + 19;
|
||||||
BltVideoObject( FRAME_BUFFER , hHandle, iResolution, MAP_BORDER_X + MAP_BORDER_X_OFFSET + offsetX, MAP_BORDER_Y_OFFSET + offsetY, VO_BLT_SRCTRANSPARENCY,NULL );
|
|
||||||
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
|
BltVideoObject( FRAME_BUFFER , hHandle, 0, MAP_BORDER_X + MAP_BORDER_X_OFFSET + offsetX, MAP_BORDER_Y_OFFSET + offsetY, VO_BLT_SRCTRANSPARENCY,NULL );
|
||||||
|
else if (iResolution < _1024x768)
|
||||||
|
BltVideoObject( FRAME_BUFFER , hHandle, 1, MAP_BORDER_X + MAP_BORDER_X_OFFSET + offsetX, MAP_BORDER_Y_OFFSET + offsetY, VO_BLT_SRCTRANSPARENCY,NULL );
|
||||||
|
else
|
||||||
|
BltVideoObject( FRAME_BUFFER , hHandle, 2, MAP_BORDER_X + MAP_BORDER_X_OFFSET + offsetX, MAP_BORDER_Y_OFFSET + offsetY, VO_BLT_SRCTRANSPARENCY,NULL );
|
||||||
|
|
||||||
InvalidateRegion( MAP_BORDER_X + MAP_BORDER_X_OFFSET + offsetX, MAP_BORDER_Y_OFFSET + offsetY, MAP_BORDER_X + MAP_BORDER_X_OFFSET + offsetX + 100 , MAP_BORDER_Y_OFFSET + offsetBorderY);
|
InvalidateRegion( MAP_BORDER_X + MAP_BORDER_X_OFFSET + offsetX, MAP_BORDER_Y_OFFSET + offsetY, MAP_BORDER_X + MAP_BORDER_X_OFFSET + offsetX + 100 , MAP_BORDER_Y_OFFSET + offsetBorderY);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -1940,36 +1948,36 @@ void InitMapBorderButtonCoordinates()
|
|||||||
{
|
{
|
||||||
UINT32 buttonOffset = 155; // 160
|
UINT32 buttonOffset = 155; // 160
|
||||||
|
|
||||||
MAP_BORDER_TOWN_BTN_X = MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X) / 2 - 152);
|
MAP_BORDER_TOWN_BTN_X = xResOffset + MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X - 2 * xResOffset) / 2) - 152;
|
||||||
MAP_BORDER_TOWN_BTN_Y = (SCREEN_HEIGHT - buttonOffset);
|
MAP_BORDER_TOWN_BTN_Y = (yResSize - buttonOffset);
|
||||||
MAP_BORDER_MINE_BTN_X = MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X) / 2 - 109);
|
MAP_BORDER_MINE_BTN_X = xResOffset + MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X - 2 * xResOffset) / 2) - 109;
|
||||||
MAP_BORDER_MINE_BTN_Y = (SCREEN_HEIGHT - buttonOffset);
|
MAP_BORDER_MINE_BTN_Y = (yResSize - buttonOffset);
|
||||||
MAP_BORDER_TEAMS_BTN_X = MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X) / 2 - 66);
|
MAP_BORDER_TEAMS_BTN_X = xResOffset + MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X - 2 * xResOffset) / 2) - 66;
|
||||||
MAP_BORDER_TEAMS_BTN_Y = (SCREEN_HEIGHT - buttonOffset);
|
MAP_BORDER_TEAMS_BTN_Y = (yResSize - buttonOffset);
|
||||||
MAP_BORDER_AIRSPACE_BTN_X = MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X) / 2 + 20);
|
MAP_BORDER_AIRSPACE_BTN_X = xResOffset + MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X - 2 * xResOffset) / 2) + 20;
|
||||||
MAP_BORDER_AIRSPACE_BTN_Y = (SCREEN_HEIGHT - buttonOffset);
|
MAP_BORDER_AIRSPACE_BTN_Y = (yResSize - buttonOffset);
|
||||||
MAP_BORDER_ITEM_BTN_X = MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X) / 2 + 63);
|
MAP_BORDER_ITEM_BTN_X = xResOffset + MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X - 2 * xResOffset) / 2) + 63;
|
||||||
MAP_BORDER_ITEM_BTN_Y = (SCREEN_HEIGHT - buttonOffset);
|
MAP_BORDER_ITEM_BTN_Y = (yResSize - buttonOffset);
|
||||||
MAP_BORDER_MILITIA_BTN_X = MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X) / 2 - 23);
|
MAP_BORDER_MILITIA_BTN_X = xResOffset + MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X - 2 * xResOffset) / 2) - 23;
|
||||||
MAP_BORDER_MILITIA_BTN_Y = (SCREEN_HEIGHT - buttonOffset);
|
MAP_BORDER_MILITIA_BTN_Y = (yResSize - buttonOffset);
|
||||||
MAP_BORDER_MOBILE_BTN_X = 0;
|
MAP_BORDER_MOBILE_BTN_X = xResSize;
|
||||||
MAP_BORDER_MOBILE_BTN_Y = 0;
|
MAP_BORDER_MOBILE_BTN_Y = 0;
|
||||||
|
|
||||||
MAP_LEVEL_MARKER_X = (MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X) / 2 + 114));
|
MAP_LEVEL_MARKER_X = xResOffset + MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X - 2 * xResOffset) / 2) + 114;
|
||||||
MAP_LEVEL_MARKER_Y = (SCREEN_HEIGHT - buttonOffset); //(SCREEN_HEIGHT - 157) //323
|
MAP_LEVEL_MARKER_Y = (yResSize - buttonOffset);
|
||||||
MAP_LEVEL_MARKER_DELTA = 8;
|
MAP_LEVEL_MARKER_DELTA = 8;
|
||||||
MAP_LEVEL_MARKER_WIDTH = 55; //( (SCREEN_WIDTH - 20) - MAP_LEVEL_MARKER_X )
|
MAP_LEVEL_MARKER_WIDTH = 55;
|
||||||
|
|
||||||
if (gGameExternalOptions.gfAllowMilitiaGroups)
|
if (gGameExternalOptions.gfAllowMilitiaGroups)
|
||||||
{
|
{
|
||||||
// Mobile button appears next to Militia button.
|
// Mobile button appears next to Militia button.
|
||||||
MAP_BORDER_MOBILE_BTN_X = MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X) / 2 + 16);
|
MAP_BORDER_MOBILE_BTN_X = xResOffset + MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X - 2 * xResOffset) / 2) + 16;
|
||||||
MAP_BORDER_MOBILE_BTN_Y = (SCREEN_HEIGHT - buttonOffset);
|
MAP_BORDER_MOBILE_BTN_Y = (yResSize - buttonOffset);
|
||||||
|
|
||||||
// Airspace, Items, ZLevel buttons all moved to the right (+22px, +22px, +10px).
|
// Airspace, Items, ZLevel buttons all moved to the right (+22px, +22px, +10px).
|
||||||
MAP_BORDER_AIRSPACE_BTN_X = MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X) / 2 + 42);
|
MAP_BORDER_AIRSPACE_BTN_X = xResOffset + MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X - 2 * xResOffset) / 2) + 42;
|
||||||
MAP_BORDER_ITEM_BTN_X = MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X) / 2 + 85);
|
MAP_BORDER_ITEM_BTN_X = xResOffset + MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X - 2 * xResOffset) / 2) + 85;
|
||||||
|
|
||||||
MAP_LEVEL_MARKER_X = (MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X) / 2 + 124));
|
MAP_LEVEL_MARKER_X = xResOffset + MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X - 2 * xResOffset) / 2) + 124;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -239,15 +239,15 @@ void HandleLoadOfMapBottomGraphics( void )
|
|||||||
// will create buttons for interface bottom
|
// will create buttons for interface bottom
|
||||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||||
|
|
||||||
if (iResolution == 0)
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
{
|
{
|
||||||
FilenameForBPP( "INTERFACE\\map_screen_bottom.sti", VObjectDesc.ImageFile );
|
FilenameForBPP( "INTERFACE\\map_screen_bottom.sti", VObjectDesc.ImageFile );
|
||||||
}
|
}
|
||||||
else if (iResolution == 1)
|
else if (iResolution < _1024x768)
|
||||||
{
|
{
|
||||||
FilenameForBPP( "INTERFACE\\map_screen_bottom_800x600.sti", VObjectDesc.ImageFile );
|
FilenameForBPP( "INTERFACE\\map_screen_bottom_800x600.sti", VObjectDesc.ImageFile );
|
||||||
}
|
}
|
||||||
else if (iResolution == 2)
|
else
|
||||||
{
|
{
|
||||||
FilenameForBPP( "INTERFACE\\map_screen_bottom_1024x768.sti", VObjectDesc.ImageFile );
|
FilenameForBPP( "INTERFACE\\map_screen_bottom_1024x768.sti", VObjectDesc.ImageFile );
|
||||||
}
|
}
|
||||||
@@ -315,7 +315,8 @@ void RenderMapScreenInterfaceBottom( BOOLEAN fForceMapscreenFullRender )
|
|||||||
{
|
{
|
||||||
// get and blt panel
|
// get and blt panel
|
||||||
GetVideoObject(&hHandle, guiMAPBOTTOMPANEL );
|
GetVideoObject(&hHandle, guiMAPBOTTOMPANEL );
|
||||||
BltVideoObject( guiSAVEBUFFER , hHandle, 0, MAP_BOTTOM_X, MAP_BOTTOM_Y, VO_BLT_SRCTRANSPARENCY,NULL );
|
|
||||||
|
BltVideoObject( guiSAVEBUFFER , hHandle, 0, xResOffset + MAP_BOTTOM_X, MAP_BOTTOM_Y, VO_BLT_SRCTRANSPARENCY,NULL );
|
||||||
|
|
||||||
// WANNE - MP: Radarmap image should be displayed on every sector in multiplayer game
|
// WANNE - MP: Radarmap image should be displayed on every sector in multiplayer game
|
||||||
if( GetSectorFlagStatus( sSelMapX, sSelMapY, ( UINT8 )iCurrentMapSectorZ, SF_ALREADY_VISITED ) == TRUE
|
if( GetSectorFlagStatus( sSelMapX, sSelMapY, ( UINT8 )iCurrentMapSectorZ, SF_ALREADY_VISITED ) == TRUE
|
||||||
@@ -337,8 +338,8 @@ void RenderMapScreenInterfaceBottom( BOOLEAN fForceMapscreenFullRender )
|
|||||||
// dirty buttons
|
// dirty buttons
|
||||||
MarkButtonsDirty( );
|
MarkButtonsDirty( );
|
||||||
|
|
||||||
// invalidate region
|
// TODO.RW.ARSP: Check: Is the height 121 OK?
|
||||||
RestoreExternBackgroundRect( MAP_BOTTOM_X, MAP_BOTTOM_Y, SCREEN_WIDTH - MAP_BOTTOM_X, SCREEN_HEIGHT - MAP_BOTTOM_Y );
|
RestoreExternBackgroundRect( xResOffset + MAP_BOTTOM_X, MAP_BOTTOM_Y, SCREEN_WIDTH - MAP_BOTTOM_X - 2 * xResOffset, 121 );
|
||||||
|
|
||||||
// re render radar map
|
// re render radar map
|
||||||
RenderRadarScreen( );
|
RenderRadarScreen( );
|
||||||
@@ -387,20 +388,20 @@ BOOLEAN CreateButtonsForMapScreenInterfaceBottom( void )
|
|||||||
{
|
{
|
||||||
// laptop
|
// laptop
|
||||||
guiMapBottomExitButtonsImage[ MAP_EXIT_TO_LAPTOP ]= LoadButtonImage( "INTERFACE\\map_border_buttons.sti" ,-1,6,-1,15,-1 );
|
guiMapBottomExitButtonsImage[ MAP_EXIT_TO_LAPTOP ]= LoadButtonImage( "INTERFACE\\map_border_buttons.sti" ,-1,6,-1,15,-1 );
|
||||||
guiMapBottomExitButtons[ MAP_EXIT_TO_LAPTOP ] = QuickCreateButton( guiMapBottomExitButtonsImage[ MAP_EXIT_TO_LAPTOP ], (SCREEN_WIDTH - 184), (SCREEN_HEIGHT - 70),
|
guiMapBottomExitButtons[ MAP_EXIT_TO_LAPTOP ] = QuickCreateButton( guiMapBottomExitButtonsImage[ MAP_EXIT_TO_LAPTOP ], xResOffset + (xResSize - 184), (SCREEN_HEIGHT - 70),
|
||||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||||
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnLaptopCallback);
|
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnLaptopCallback);
|
||||||
|
|
||||||
// tactical
|
// tactical
|
||||||
guiMapBottomExitButtonsImage[ MAP_EXIT_TO_TACTICAL ]= LoadButtonImage( "INTERFACE\\map_border_buttons.sti" ,-1,7,-1,16,-1 );
|
guiMapBottomExitButtonsImage[ MAP_EXIT_TO_TACTICAL ]= LoadButtonImage( "INTERFACE\\map_border_buttons.sti" ,-1,7,-1,16,-1 );
|
||||||
|
|
||||||
guiMapBottomExitButtons[ MAP_EXIT_TO_TACTICAL ] = QuickCreateButton( guiMapBottomExitButtonsImage[ MAP_EXIT_TO_TACTICAL ], (SCREEN_WIDTH - 144), (SCREEN_HEIGHT - 70),
|
guiMapBottomExitButtons[ MAP_EXIT_TO_TACTICAL ] = QuickCreateButton( guiMapBottomExitButtonsImage[ MAP_EXIT_TO_TACTICAL ], xResOffset + (xResSize - 144), (SCREEN_HEIGHT - 70),
|
||||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||||
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnTacticalCallback);
|
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnTacticalCallback);
|
||||||
|
|
||||||
// options
|
// options
|
||||||
guiMapBottomExitButtonsImage[ MAP_EXIT_TO_OPTIONS ]= LoadButtonImage( "INTERFACE\\map_border_buttons.sti" ,-1,18,-1,19,-1 );
|
guiMapBottomExitButtonsImage[ MAP_EXIT_TO_OPTIONS ]= LoadButtonImage( "INTERFACE\\map_border_buttons.sti" ,-1,18,-1,19,-1 );
|
||||||
guiMapBottomExitButtons[ MAP_EXIT_TO_OPTIONS ] = QuickCreateButton( guiMapBottomExitButtonsImage[ MAP_EXIT_TO_OPTIONS ], (SCREEN_WIDTH - 182), (SCREEN_HEIGHT - 108),
|
guiMapBottomExitButtons[ MAP_EXIT_TO_OPTIONS ] = QuickCreateButton( guiMapBottomExitButtonsImage[ MAP_EXIT_TO_OPTIONS ], xResOffset + (xResSize - 182), (SCREEN_HEIGHT - 108),
|
||||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||||
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnOptionsFromMapScreenCallback);
|
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnOptionsFromMapScreenCallback);
|
||||||
|
|
||||||
@@ -416,12 +417,12 @@ BOOLEAN CreateButtonsForMapScreenInterfaceBottom( void )
|
|||||||
|
|
||||||
// time compression buttons
|
// time compression buttons
|
||||||
guiMapBottomTimeButtonsImage[ MAP_TIME_COMPRESS_MORE ]= LoadButtonImage( "INTERFACE\\map_screen_bottom_arrows.sti" ,10,1,-1,3,-1 );
|
guiMapBottomTimeButtonsImage[ MAP_TIME_COMPRESS_MORE ]= LoadButtonImage( "INTERFACE\\map_screen_bottom_arrows.sti" ,10,1,-1,3,-1 );
|
||||||
guiMapBottomTimeButtons[ MAP_TIME_COMPRESS_MORE ] = QuickCreateButton( guiMapBottomTimeButtonsImage[ MAP_TIME_COMPRESS_MORE ], (SCREEN_WIDTH - 112), (SCREEN_HEIGHT - 24),
|
guiMapBottomTimeButtons[ MAP_TIME_COMPRESS_MORE ] = QuickCreateButton( guiMapBottomTimeButtonsImage[ MAP_TIME_COMPRESS_MORE ], xResOffset + (xResSize - 112), (SCREEN_HEIGHT - 24),
|
||||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 2 ,
|
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 2 ,
|
||||||
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnTimeCompressMoreMapScreenCallback);
|
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnTimeCompressMoreMapScreenCallback);
|
||||||
|
|
||||||
guiMapBottomTimeButtonsImage[ MAP_TIME_COMPRESS_LESS ]= LoadButtonImage( "INTERFACE\\map_screen_bottom_arrows.sti" ,9,0,-1,2,-1 );
|
guiMapBottomTimeButtonsImage[ MAP_TIME_COMPRESS_LESS ]= LoadButtonImage( "INTERFACE\\map_screen_bottom_arrows.sti" ,9,0,-1,2,-1 );
|
||||||
guiMapBottomTimeButtons[ MAP_TIME_COMPRESS_LESS ] = QuickCreateButton( guiMapBottomTimeButtonsImage[ MAP_TIME_COMPRESS_LESS ], (SCREEN_WIDTH - 174), (SCREEN_HEIGHT - 24),
|
guiMapBottomTimeButtons[ MAP_TIME_COMPRESS_LESS ] = QuickCreateButton( guiMapBottomTimeButtonsImage[ MAP_TIME_COMPRESS_LESS ], xResOffset + (xResSize - 174), (SCREEN_HEIGHT - 24),
|
||||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 2,
|
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 2,
|
||||||
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnTimeCompressLessMapScreenCallback);
|
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnTimeCompressLessMapScreenCallback);
|
||||||
|
|
||||||
@@ -436,21 +437,12 @@ BOOLEAN CreateButtonsForMapScreenInterfaceBottom( void )
|
|||||||
// scroll buttons
|
// scroll buttons
|
||||||
// CHRISL: Changed coordinates to dynamically place scroll buttons from the right edge of screen.
|
// CHRISL: Changed coordinates to dynamically place scroll buttons from the right edge of screen.
|
||||||
guiMapMessageScrollButtonsImage[ MAP_SCROLL_MESSAGE_UP ]= LoadButtonImage( "INTERFACE\\map_screen_bottom_arrows.sti" ,11,4,-1,6,-1 );
|
guiMapMessageScrollButtonsImage[ MAP_SCROLL_MESSAGE_UP ]= LoadButtonImage( "INTERFACE\\map_screen_bottom_arrows.sti" ,11,4,-1,6,-1 );
|
||||||
// guiMapMessageScrollButtons[ MAP_SCROLL_MESSAGE_UP ] = QuickCreateButton( guiMapMessageScrollButtonsImage[ MAP_SCROLL_MESSAGE_UP ], (SCREEN_WIDTH - 533), (SCREEN_HEIGHT - 109),
|
|
||||||
// BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
|
||||||
// (GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnMessageUpMapScreenCallback);
|
|
||||||
|
|
||||||
guiMapMessageScrollButtonsImage[ MAP_SCROLL_MESSAGE_DOWN ]= LoadButtonImage( "INTERFACE\\map_screen_bottom_arrows.sti" ,12,5,-1,7,-1 );
|
guiMapMessageScrollButtonsImage[ MAP_SCROLL_MESSAGE_DOWN ]= LoadButtonImage( "INTERFACE\\map_screen_bottom_arrows.sti" ,12,5,-1,7,-1 );
|
||||||
// guiMapMessageScrollButtons[ MAP_SCROLL_MESSAGE_DOWN ] = QuickCreateButton( guiMapMessageScrollButtonsImage[ MAP_SCROLL_MESSAGE_DOWN ], (SCREEN_WIDTH - 533), (SCREEN_HEIGHT - 28),
|
|
||||||
// BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
|
||||||
// (GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnMessageDownMapScreenCallback);
|
|
||||||
// CHRISL: Use these if we want buttons based on left edge of screen
|
|
||||||
// HEADROCK HAM 3.6: Message window is now as wide as possible.
|
|
||||||
|
|
||||||
guiMapMessageScrollButtons[ MAP_SCROLL_MESSAGE_UP ] = QuickCreateButton( guiMapMessageScrollButtonsImage[ MAP_SCROLL_MESSAGE_UP ], (SCREEN_WIDTH - 306), (SCREEN_HEIGHT - 109),
|
guiMapMessageScrollButtons[ MAP_SCROLL_MESSAGE_UP ] = QuickCreateButton( guiMapMessageScrollButtonsImage[ MAP_SCROLL_MESSAGE_UP ], xResOffset + (xResSize - 306), (SCREEN_HEIGHT - 109),
|
||||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||||
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnMessageUpMapScreenCallback);
|
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnMessageUpMapScreenCallback);
|
||||||
guiMapMessageScrollButtons[ MAP_SCROLL_MESSAGE_DOWN ] = QuickCreateButton( guiMapMessageScrollButtonsImage[ MAP_SCROLL_MESSAGE_DOWN ], (SCREEN_WIDTH - 306), (SCREEN_HEIGHT - 28),
|
guiMapMessageScrollButtons[ MAP_SCROLL_MESSAGE_DOWN ] = QuickCreateButton( guiMapMessageScrollButtonsImage[ MAP_SCROLL_MESSAGE_DOWN ], xResOffset + (xResSize - 306), (SCREEN_HEIGHT - 28),
|
||||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||||
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnMessageDownMapScreenCallback);
|
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnMessageDownMapScreenCallback);
|
||||||
|
|
||||||
@@ -459,8 +451,6 @@ BOOLEAN CreateButtonsForMapScreenInterfaceBottom( void )
|
|||||||
SetButtonCursor(guiMapMessageScrollButtons[ 0 ], MSYS_NO_CURSOR );
|
SetButtonCursor(guiMapMessageScrollButtons[ 0 ], MSYS_NO_CURSOR );
|
||||||
SetButtonCursor(guiMapMessageScrollButtons[ 1 ], MSYS_NO_CURSOR );
|
SetButtonCursor(guiMapMessageScrollButtons[ 1 ], MSYS_NO_CURSOR );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return( TRUE );
|
return( TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -636,8 +626,8 @@ void DrawNameOfLoadedSector( void )
|
|||||||
GetSectorIDString( sSelMapX, sSelMapY, ( INT8 )( iCurrentMapSectorZ ),sString, TRUE );
|
GetSectorIDString( sSelMapX, sSelMapY, ( INT8 )( iCurrentMapSectorZ ),sString, TRUE );
|
||||||
ReduceStringLength( sString, 80, COMPFONT );
|
ReduceStringLength( sString, 80, COMPFONT );
|
||||||
|
|
||||||
//VarFindFontCenterCoordinates( 548, 426, 80, 16, COMPFONT, &sFontX, &sFontY, sString );
|
VarFindFontCenterCoordinates( xResOffset + (xResSize - 92), (SCREEN_HEIGHT - 55), 80, 16, COMPFONT, &sFontX, &sFontY, sString );
|
||||||
VarFindFontCenterCoordinates( (SCREEN_WIDTH - 92), (SCREEN_HEIGHT - 55), 80, 16, COMPFONT, &sFontX, &sFontY, sString );
|
|
||||||
mprintf( sFontX, sFontY, L"%s", sString );
|
mprintf( sFontX, sFontY, L"%s", sString );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -980,10 +970,9 @@ void DisplayCompressMode( void )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//RestoreExternBackgroundRect( 489, 456, 522 - 489, 467 - 454 );
|
// ABCDEFG
|
||||||
RestoreExternBackgroundRect( (SCREEN_WIDTH - 151), (SCREEN_HEIGHT - 24), 63, 13 );
|
RestoreExternBackgroundRect( xResOffset + (xResSize - 151), (SCREEN_HEIGHT - 24), 63, 13 );
|
||||||
|
SetFontDestBuffer( FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE );
|
||||||
SetFontDestBuffer( FRAME_BUFFER, 0,0,SCREEN_WIDTH,SCREEN_HEIGHT, FALSE );
|
|
||||||
SetFont( COMPFONT );
|
SetFont( COMPFONT );
|
||||||
|
|
||||||
if( GetJA2Clock() - guiCompressionStringBaseTime >= PAUSE_GAME_TIMER )
|
if( GetJA2Clock() - guiCompressionStringBaseTime >= PAUSE_GAME_TIMER )
|
||||||
@@ -1008,10 +997,9 @@ void DisplayCompressMode( void )
|
|||||||
SetFontForeground( usColor );
|
SetFontForeground( usColor );
|
||||||
SetFontBackground( FONT_BLACK );
|
SetFontBackground( FONT_BLACK );
|
||||||
|
|
||||||
//FindFontCenterCoordinates( 489, 456, 522 - 489, 467 - 454, sString, COMPFONT, &sX, &sY );
|
FindFontCenterCoordinates( xResOffset + (xResSize - 151), (SCREEN_HEIGHT - 24), 33, 13, sString, COMPFONT, &sX, &sY );
|
||||||
FindFontCenterCoordinates( (SCREEN_WIDTH - 151), (SCREEN_HEIGHT - 24), 33, 13, sString, COMPFONT, &sX, &sY );
|
|
||||||
mprintf( sX, sY, sString );
|
|
||||||
|
|
||||||
|
mprintf( sX, sY, sString );
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1019,10 +1007,7 @@ void DisplayCompressMode( void )
|
|||||||
|
|
||||||
void CreateCompressModePause( void )
|
void CreateCompressModePause( void )
|
||||||
{
|
{
|
||||||
/*MSYS_DefineRegion( &gMapPauseRegion, 487, 456, 522, 467, MSYS_PRIORITY_HIGH,
|
MSYS_DefineRegion( &gMapPauseRegion, xResOffset + (xResSize - 153), (SCREEN_HEIGHT - 24), xResOffset + (xResSize - 118), (SCREEN_HEIGHT - 13), MSYS_PRIORITY_HIGH,
|
||||||
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, CompressModeClickCallback );*/
|
|
||||||
|
|
||||||
MSYS_DefineRegion( &gMapPauseRegion, (SCREEN_WIDTH - 153), (SCREEN_HEIGHT - 24), (SCREEN_WIDTH - 118), (SCREEN_HEIGHT - 13), MSYS_PRIORITY_HIGH,
|
|
||||||
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, CompressModeClickCallback );
|
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, CompressModeClickCallback );
|
||||||
|
|
||||||
SetRegionFastHelpText( &gMapPauseRegion, pMapScreenBottomFastHelp[ 7 ] );
|
SetRegionFastHelpText( &gMapPauseRegion, pMapScreenBottomFastHelp[ 7 ] );
|
||||||
@@ -1462,11 +1447,11 @@ void DisplayCurrentBalanceTitleForMapBottom( void )
|
|||||||
|
|
||||||
// center it
|
// center it
|
||||||
// CHRISL: Replaced X coordinate with dynamic coordinate set from right edge of screen
|
// CHRISL: Replaced X coordinate with dynamic coordinate set from right edge of screen
|
||||||
//VarFindFontCenterCoordinates( (SCREEN_WIDTH - 637), (SCREEN_HEIGHT - 107), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
|
//VarFindFontCenterCoordinates( (1024 - 637), (SCREEN_HEIGHT - 107), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
|
||||||
// CHRISL: Use this if we want to display from the left edge
|
// CHRISL: Use this if we want to display from the left edge
|
||||||
//VarFindFontCenterCoordinates( 359, (SCREEN_HEIGHT - 107), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
|
//VarFindFontCenterCoordinates( 359, (SCREEN_HEIGHT - 107), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
|
||||||
// HEADROCK HAM 3.6: The balance/income box has been moved to the right side, near the laptop button.
|
// HEADROCK HAM 3.6: The balance/income box has been moved to the right side, near the laptop button.
|
||||||
VarFindFontCenterCoordinates( (SCREEN_WIDTH - 278), (SCREEN_HEIGHT - 111), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
|
VarFindFontCenterCoordinates( xResOffset + (xResSize - 278), (SCREEN_HEIGHT - 111), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
|
||||||
|
|
||||||
// print it
|
// print it
|
||||||
mprintf( sFontX, sFontY, L"%s", sString );
|
mprintf( sFontX, sFontY, L"%s", sString );
|
||||||
@@ -1475,11 +1460,11 @@ void DisplayCurrentBalanceTitleForMapBottom( void )
|
|||||||
|
|
||||||
// center it
|
// center it
|
||||||
// CHRISL: Replaced X coordinate with dynamic coordinate set from right edge of screen
|
// CHRISL: Replaced X coordinate with dynamic coordinate set from right edge of screen
|
||||||
//VarFindFontCenterCoordinates( (SCREEN_WIDTH - 637), (SCREEN_HEIGHT - 61), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
|
//VarFindFontCenterCoordinates( (1024 - 637), (SCREEN_HEIGHT - 61), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
|
||||||
// CHRISL: Use this if we want to display from the left edge
|
// CHRISL: Use this if we want to display from the left edge
|
||||||
//VarFindFontCenterCoordinates( 359, (SCREEN_HEIGHT - 61), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
|
//VarFindFontCenterCoordinates( 359, (SCREEN_HEIGHT - 61), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
|
||||||
// HEADROCK HAM 3.6: The balance/income box has been moved to the right side, near the laptop button.
|
// HEADROCK HAM 3.6: The balance/income box has been moved to the right side, near the laptop button.
|
||||||
VarFindFontCenterCoordinates( (SCREEN_WIDTH - 278), (SCREEN_HEIGHT - 74), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
|
VarFindFontCenterCoordinates( xResOffset + (xResSize - 278), (SCREEN_HEIGHT - 74), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
|
||||||
|
|
||||||
// print it
|
// print it
|
||||||
mprintf( sFontX, sFontY, L"%s", sString );
|
mprintf( sFontX, sFontY, L"%s", sString );
|
||||||
@@ -1488,13 +1473,14 @@ void DisplayCurrentBalanceTitleForMapBottom( void )
|
|||||||
|
|
||||||
// HEADROCK HAM 3.6: Projected expenses for today, with facilities (and in the future, merc contracts) taken into
|
// HEADROCK HAM 3.6: Projected expenses for today, with facilities (and in the future, merc contracts) taken into
|
||||||
// account.
|
// account.
|
||||||
VarFindFontCenterCoordinates( (SCREEN_WIDTH - 278), (SCREEN_HEIGHT - 37), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
|
VarFindFontCenterCoordinates( xResOffset + (xResSize - 278), (SCREEN_HEIGHT - 37), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
|
||||||
|
|
||||||
// print it
|
// print it
|
||||||
mprintf( sFontX, sFontY, L"%s", sString );
|
mprintf( sFontX, sFontY, L"%s", sString );
|
||||||
|
|
||||||
// ste the font buffer
|
// ste the font buffer
|
||||||
SetFontDestBuffer( FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE );
|
SetFontDestBuffer( FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE );
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1515,17 +1501,10 @@ void DisplayCurrentBalanceForMapBottom( void )
|
|||||||
swprintf( sString, L"%d", LaptopSaveInfo.iCurrentBalance );
|
swprintf( sString, L"%d", LaptopSaveInfo.iCurrentBalance );
|
||||||
|
|
||||||
// insert
|
// insert
|
||||||
|
|
||||||
InsertCommasForDollarFigure( sString );
|
InsertCommasForDollarFigure( sString );
|
||||||
InsertDollarSignInToString( sString );
|
InsertDollarSignInToString( sString );
|
||||||
|
|
||||||
// center it
|
VarFindFontCenterCoordinates( xResOffset + (xResSize - 278), (SCREEN_HEIGHT - 95), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
|
||||||
// CHRISL: Replaced X coordinate with dynamic coordinate set from right edge of screen
|
|
||||||
//VarFindFontCenterCoordinates( (SCREEN_WIDTH - 637), (SCREEN_HEIGHT - 91), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
|
|
||||||
// CHRISL: Use this if we want to display from the left edge
|
|
||||||
//VarFindFontCenterCoordinates( 359, (SCREEN_HEIGHT - 91), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
|
|
||||||
// HEADROCK HAM 3.6: The balance/income box has been moved to the right side, near the laptop button.
|
|
||||||
VarFindFontCenterCoordinates( (SCREEN_WIDTH - 278), (SCREEN_HEIGHT - 95), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
|
|
||||||
|
|
||||||
// print it
|
// print it
|
||||||
mprintf( sFontX, sFontY, L"%s", sString );
|
mprintf( sFontX, sFontY, L"%s", sString );
|
||||||
@@ -1553,29 +1532,16 @@ void CreateDestroyMouseRegionMasksForTimeCompressionButtons( void )
|
|||||||
// check if disabled and not created, create
|
// check if disabled and not created, create
|
||||||
if( ( fDisabled ) && ( fCreated == FALSE ) )
|
if( ( fDisabled ) && ( fCreated == FALSE ) )
|
||||||
{
|
{
|
||||||
|
|
||||||
// mask over compress more button
|
// mask over compress more button
|
||||||
//MSYS_DefineRegion( &gTimeCompressionMask[ 0 ], 528, 456, 528 + 13, 456 + 14, MSYS_PRIORITY_HIGHEST - 1,
|
MSYS_DefineRegion( &gTimeCompressionMask[ 0 ], xResOffset + (xResSize - 112), (SCREEN_HEIGHT - 24), xResOffset + (xResSize - 112) + 13, (SCREEN_HEIGHT - 24) + 14, MSYS_PRIORITY_HIGHEST - 1,
|
||||||
// MSYS_NO_CURSOR, MSYS_NO_CALLBACK, CompressMaskClickCallback );
|
|
||||||
|
|
||||||
//// mask over compress less button
|
|
||||||
//MSYS_DefineRegion( &gTimeCompressionMask[ 1 ], 466, 456, 466 + 13, 456 + 14, MSYS_PRIORITY_HIGHEST - 1,
|
|
||||||
// MSYS_NO_CURSOR, MSYS_NO_CALLBACK, CompressMaskClickCallback );
|
|
||||||
|
|
||||||
//// mask over pause game button
|
|
||||||
//MSYS_DefineRegion( &gTimeCompressionMask[ 2 ], 487, 456, 522, 467, MSYS_PRIORITY_HIGHEST - 1,
|
|
||||||
// MSYS_NO_CURSOR, MSYS_NO_CALLBACK, CompressMaskClickCallback );
|
|
||||||
|
|
||||||
// mask over compress more button
|
|
||||||
MSYS_DefineRegion( &gTimeCompressionMask[ 0 ], (SCREEN_WIDTH - 112), (SCREEN_HEIGHT - 24), (SCREEN_WIDTH - 112) + 13, (SCREEN_HEIGHT - 24) + 14, MSYS_PRIORITY_HIGHEST - 1,
|
|
||||||
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, CompressMaskClickCallback );
|
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, CompressMaskClickCallback );
|
||||||
|
|
||||||
// mask over compress less button
|
// mask over compress less button
|
||||||
MSYS_DefineRegion( &gTimeCompressionMask[ 1 ], (SCREEN_WIDTH - 174), (SCREEN_HEIGHT - 24), (SCREEN_WIDTH - 174) + 13, (SCREEN_HEIGHT - 24) + 14, MSYS_PRIORITY_HIGHEST - 1,
|
MSYS_DefineRegion( &gTimeCompressionMask[ 1 ], xResOffset + (xResSize - 174), (SCREEN_HEIGHT - 24), xResOffset + (xResSize - 174) + 13, (SCREEN_HEIGHT - 24) + 14, MSYS_PRIORITY_HIGHEST - 1,
|
||||||
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, CompressMaskClickCallback );
|
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, CompressMaskClickCallback );
|
||||||
|
|
||||||
// mask over pause game button
|
// mask over pause game button
|
||||||
MSYS_DefineRegion( &gTimeCompressionMask[ 2 ], (SCREEN_WIDTH - 153), (SCREEN_HEIGHT - 24), (SCREEN_WIDTH - 118), (SCREEN_HEIGHT - 13), MSYS_PRIORITY_HIGHEST - 1,
|
MSYS_DefineRegion( &gTimeCompressionMask[ 2 ], xResOffset + (xResSize - 153), (SCREEN_HEIGHT - 24), xResOffset + (xResSize - 153) - 118, (SCREEN_HEIGHT - 13), MSYS_PRIORITY_HIGHEST - 1,
|
||||||
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, CompressMaskClickCallback );
|
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, CompressMaskClickCallback );
|
||||||
|
|
||||||
fCreated = TRUE;
|
fCreated = TRUE;
|
||||||
@@ -1635,13 +1601,7 @@ void DisplayProjectedDailyMineIncome( void )
|
|||||||
InsertCommasForDollarFigure( sString );
|
InsertCommasForDollarFigure( sString );
|
||||||
InsertDollarSignInToString( sString );
|
InsertDollarSignInToString( sString );
|
||||||
|
|
||||||
// center it
|
VarFindFontCenterCoordinates( xResOffset + (xResSize - 278), (SCREEN_HEIGHT - 58), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
|
||||||
// CHRISL: Replaced X coordinate with dynamic coordinate set from right edge of screen
|
|
||||||
//VarFindFontCenterCoordinates( (SCREEN_WIDTH - 637), (SCREEN_HEIGHT - 45), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
|
|
||||||
// CHRISL: Use this if we want to display from the left edge
|
|
||||||
//VarFindFontCenterCoordinates( 359, (SCREEN_HEIGHT - 45), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
|
|
||||||
// HEADROCK HAM 3.6: The balance/income box has been moved to the right side, near the laptop button.
|
|
||||||
VarFindFontCenterCoordinates( (SCREEN_WIDTH - 278), (SCREEN_HEIGHT - 58), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
|
|
||||||
|
|
||||||
// print it
|
// print it
|
||||||
mprintf( sFontX, sFontY, L"%s", sString );
|
mprintf( sFontX, sFontY, L"%s", sString );
|
||||||
@@ -1692,8 +1652,7 @@ void DisplayProjectedDailyExpenses( void )
|
|||||||
InsertCommasForDollarFigure( sString );
|
InsertCommasForDollarFigure( sString );
|
||||||
InsertDollarSignInToString( sString );
|
InsertDollarSignInToString( sString );
|
||||||
|
|
||||||
// center it
|
VarFindFontCenterCoordinates( xResOffset + (xResSize - 278), (SCREEN_HEIGHT - 21), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
|
||||||
VarFindFontCenterCoordinates( (SCREEN_WIDTH - 278), (SCREEN_HEIGHT - 21), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
|
|
||||||
|
|
||||||
// print it
|
// print it
|
||||||
mprintf( sFontX, sFontY, L"%s", sString );
|
mprintf( sFontX, sFontY, L"%s", sString );
|
||||||
@@ -2080,7 +2039,7 @@ void ChangeCurrentMapscreenMessageIndex( UINT8 ubNewMessageIndex )
|
|||||||
void InitMapScreenInterfaceBottomCoords( void )
|
void InitMapScreenInterfaceBottomCoords( void )
|
||||||
{
|
{
|
||||||
// HEADROCK HAM 3.6: Message window is now as wide as possible.
|
// HEADROCK HAM 3.6: Message window is now as wide as possible.
|
||||||
MESSAGE_SCROLL_AREA_START_X = SCREEN_WIDTH - 307;
|
MESSAGE_SCROLL_AREA_START_X = xResOffset + xResSize - 307;
|
||||||
MESSAGE_SCROLL_AREA_END_X = SCREEN_WIDTH - 293;
|
MESSAGE_SCROLL_AREA_END_X = xResOffset + xResSize - 293;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -53,32 +53,32 @@ INT32 iCurrentInventoryPoolPageQ[INVPOOLLISTNUM]={ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
|||||||
INT32 iLastInventoryPoolPageQ[INVPOOLLISTNUM]={ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
INT32 iLastInventoryPoolPageQ[INVPOOLLISTNUM]={ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
|
||||||
extern BOOLEAN SaveWorldItemsToTempItemFile( INT16 sMapX, INT16 sMapY, INT8 bMapZ, UINT32 uiNumberOfItems, WORLDITEM* pData );
|
extern BOOLEAN SaveWorldItemsToTempItemFile( INT16 sMapX, INT16 sMapY, INT8 bMapZ, UINT32 uiNumberOfItems, WORLDITEM* pData );
|
||||||
#define MAP_INV_X_OFFSET (((SCREEN_WIDTH - 261) - 380) / 2)
|
|
||||||
//#define MAP_INV_Y_OFFSET (((SCREEN_HEIGHT - 121) -
|
#define MAP_INV_X_OFFSET (((SCREEN_WIDTH - 261) - 380) / 2)
|
||||||
|
|
||||||
// status bar colors
|
// status bar colors
|
||||||
#define DESC_STATUS_BAR FROMRGB( 201, 172, 133 )
|
#define DESC_STATUS_BAR FROMRGB( 201, 172, 133 )
|
||||||
#define DESC_STATUS_BAR_SHADOW FROMRGB( 140, 136, 119 )
|
#define DESC_STATUS_BAR_SHADOW FROMRGB( 140, 136, 119 )
|
||||||
|
|
||||||
// page display positions
|
// page display positions
|
||||||
#define MAP_INVENTORY_POOL_PAGE_X (MAP_INV_X_OFFSET + 506)
|
#define MAP_INVENTORY_POOL_PAGE_X (MAP_INV_X_OFFSET + 506)
|
||||||
#define MAP_INVENTORY_POOL_PAGE_Y (SCREEN_HEIGHT - 121 - 23) //336
|
#define MAP_INVENTORY_POOL_PAGE_Y (SCREEN_HEIGHT - 121 - 23) //336
|
||||||
#define MAP_INVENTORY_POOL_PAGE_WIDTH 46
|
#define MAP_INVENTORY_POOL_PAGE_WIDTH 46
|
||||||
#define MAP_INVENTORY_POOL_PAGE_HEIGHT 13
|
#define MAP_INVENTORY_POOL_PAGE_HEIGHT 13
|
||||||
|
|
||||||
// the number of items
|
// the number of items
|
||||||
#define MAP_INVENTORY_POOL_NUMBER_X (MAP_INV_X_OFFSET + 436)
|
#define MAP_INVENTORY_POOL_NUMBER_X (MAP_INV_X_OFFSET + 436)
|
||||||
#define MAP_INVENTORY_POOL_NUMBER_WIDTH 40
|
#define MAP_INVENTORY_POOL_NUMBER_WIDTH 40
|
||||||
|
|
||||||
// location
|
// location
|
||||||
#define MAP_INVENTORY_POOL_LOC_X MAP_INV_X_OFFSET + 326
|
#define MAP_INVENTORY_POOL_LOC_X (MAP_INV_X_OFFSET + 326)
|
||||||
#define MAP_INVENTORY_POOL_LOC_WIDTH 40
|
#define MAP_INVENTORY_POOL_LOC_WIDTH 40
|
||||||
|
|
||||||
// delay for flash of item
|
// delay for flash of item
|
||||||
#define DELAY_FOR_HIGHLIGHT_ITEM_FLASH 200
|
#define DELAY_FOR_HIGHLIGHT_ITEM_FLASH 200
|
||||||
|
|
||||||
// inventory slot font
|
// inventory slot font
|
||||||
#define MAP_IVEN_FONT SMALLCOMPFONT
|
#define MAP_IVEN_FONT SMALLCOMPFONT
|
||||||
|
|
||||||
// the position of the background graphic
|
// the position of the background graphic
|
||||||
#define INVEN_POOL_X 261
|
#define INVEN_POOL_X 261
|
||||||
@@ -236,27 +236,27 @@ BOOLEAN LoadInventoryPoolGraphic( void )
|
|||||||
// load the file
|
// load the file
|
||||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||||
|
|
||||||
if (iResolution == 0)
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
{
|
{
|
||||||
MAP_INV_SLOT_COLS = 8;
|
MAP_INV_SLOT_COLS = 8;
|
||||||
MAP_INVENTORY_POOL_SLOT_COUNT = 40;
|
MAP_INVENTORY_POOL_SLOT_COUNT = 40;
|
||||||
MAP_INVENTORY_POOL_SLOT_START_X = 269;
|
MAP_INVENTORY_POOL_SLOT_START_X = 269;
|
||||||
MAP_INVENTORY_POOL_SLOT_START_Y = 51;
|
MAP_INVENTORY_POOL_SLOT_START_Y = 51;
|
||||||
sprintf( VObjectDesc.ImageFile, "INTERFACE\\sector_inventory.sti" );
|
sprintf( VObjectDesc.ImageFile, "INTERFACE\\sector_inventory.sti" );
|
||||||
}
|
}
|
||||||
else if (iResolution == 1)
|
else if (iResolution < _1024x768)
|
||||||
{
|
{
|
||||||
MAP_INV_SLOT_COLS = 11;
|
MAP_INV_SLOT_COLS = 11;
|
||||||
MAP_INVENTORY_POOL_SLOT_COUNT = 77;
|
MAP_INVENTORY_POOL_SLOT_COUNT = 77;
|
||||||
MAP_INVENTORY_POOL_SLOT_START_X = 278;
|
MAP_INVENTORY_POOL_SLOT_START_X = (SCREEN_WIDTH - INTERFACE_WIDTH)/2 + 278;
|
||||||
MAP_INVENTORY_POOL_SLOT_START_Y = 62;
|
MAP_INVENTORY_POOL_SLOT_START_Y = 62;
|
||||||
sprintf( VObjectDesc.ImageFile, "INTERFACE\\sector_inventory_800x600.sti" );
|
sprintf( VObjectDesc.ImageFile, "INTERFACE\\sector_inventory_800x600.sti" );
|
||||||
}
|
}
|
||||||
else if (iResolution == 2)
|
else
|
||||||
{
|
{
|
||||||
MAP_INV_SLOT_COLS = 17;
|
MAP_INV_SLOT_COLS = 17;
|
||||||
MAP_INVENTORY_POOL_SLOT_COUNT = MAP_INVENTORY_POOL_MAX_SLOTS;
|
MAP_INVENTORY_POOL_SLOT_COUNT = MAP_INVENTORY_POOL_MAX_SLOTS;
|
||||||
MAP_INVENTORY_POOL_SLOT_START_X = 282;
|
MAP_INVENTORY_POOL_SLOT_START_X = (SCREEN_WIDTH - INTERFACE_WIDTH)/2 + 282;
|
||||||
MAP_INVENTORY_POOL_SLOT_START_Y = 50;
|
MAP_INVENTORY_POOL_SLOT_START_Y = 50;
|
||||||
sprintf( VObjectDesc.ImageFile, "INTERFACE\\sector_inventory_1024x768.sti" );
|
sprintf( VObjectDesc.ImageFile, "INTERFACE\\sector_inventory_1024x768.sti" );
|
||||||
}
|
}
|
||||||
@@ -289,7 +289,7 @@ void BlitInventoryPoolGraphic( void )
|
|||||||
|
|
||||||
// blit inventory pool graphic to the screen
|
// blit inventory pool graphic to the screen
|
||||||
GetVideoObject(&hHandle, guiMapInventoryPoolBackground);
|
GetVideoObject(&hHandle, guiMapInventoryPoolBackground);
|
||||||
BltVideoObject( guiSAVEBUFFER , hHandle, 0,INVEN_POOL_X, INVEN_POOL_Y , VO_BLT_SRCTRANSPARENCY,NULL );
|
BltVideoObject( guiSAVEBUFFER , hHandle, 0,(SCREEN_WIDTH - INTERFACE_WIDTH)/2 + INVEN_POOL_X, INVEN_POOL_Y , VO_BLT_SRCTRANSPARENCY,NULL );
|
||||||
|
|
||||||
// resize list
|
// resize list
|
||||||
ResizeInventoryList( );
|
ResizeInventoryList( );
|
||||||
@@ -319,7 +319,7 @@ void BlitInventoryPoolGraphic( void )
|
|||||||
HandleButtonStatesWhileMapInventoryActive( );
|
HandleButtonStatesWhileMapInventoryActive( );
|
||||||
|
|
||||||
// Invalidate
|
// Invalidate
|
||||||
RestoreExternBackgroundRect(MAP_BORDER_X, MAP_BORDER_Y, SCREEN_WIDTH - MAP_BORDER_X, SCREEN_HEIGHT - 121);
|
RestoreExternBackgroundRect(xResOffset + MAP_BORDER_X, MAP_BORDER_Y, SCREEN_WIDTH - MAP_BORDER_X - 2 * xResOffset, SCREEN_HEIGHT - 121 - 2 * yResOffset);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -891,7 +891,7 @@ void MapInvenPoolSlots(MOUSE_REGION * pRegion, INT32 iReason )
|
|||||||
}
|
}
|
||||||
else if(fValidPointer)
|
else if(fValidPointer)
|
||||||
{
|
{
|
||||||
InitSectorStackPopup( MercPtrs[gCharactersList[bSelectedInfoChar].usSolID], twItem, iCounter, 0, INV_REGION_Y, 261, ( SCREEN_HEIGHT - PLAYER_INFO_Y ) );
|
InitSectorStackPopup( MercPtrs[gCharactersList[bSelectedInfoChar].usSolID], twItem, iCounter, (SCREEN_WIDTH - INTERFACE_WIDTH)/2, -10, 261, ( SCREEN_HEIGHT - PLAYER_INFO_Y ) );
|
||||||
fTeamPanelDirty=TRUE;
|
fTeamPanelDirty=TRUE;
|
||||||
fInterfacePanelDirty = DIRTYLEVEL2;
|
fInterfacePanelDirty = DIRTYLEVEL2;
|
||||||
}
|
}
|
||||||
@@ -1108,15 +1108,15 @@ void MapInvenPoolSlots(MOUSE_REGION * pRegion, INT32 iReason )
|
|||||||
void CreateMapInventoryButtons( void )
|
void CreateMapInventoryButtons( void )
|
||||||
{
|
{
|
||||||
guiMapInvenButtonImage[ 0 ]= LoadButtonImage( "INTERFACE\\map_screen_bottom_arrows.sti" , 10, 1, -1, 3, -1 );
|
guiMapInvenButtonImage[ 0 ]= LoadButtonImage( "INTERFACE\\map_screen_bottom_arrows.sti" , 10, 1, -1, 3, -1 );
|
||||||
guiMapInvenButton[ 0 ] = QuickCreateButton( guiMapInvenButtonImage[ 0 ], (MAP_INV_X_OFFSET + 559), (SCREEN_HEIGHT - 144),
|
guiMapInvenButton[ 0 ] = QuickCreateButton( guiMapInvenButtonImage[ 0 ], (MAP_INV_X_OFFSET + 559), (SCREEN_HEIGHT - 144 - 2 * yResOffset),
|
||||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST,
|
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST,
|
||||||
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)MapInventoryPoolNextBtn );
|
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)MapInventoryPoolNextBtn );
|
||||||
|
|
||||||
|
|
||||||
guiMapInvenButtonImage[ 1 ]= LoadButtonImage( "INTERFACE\\map_screen_bottom_arrows.sti" ,9, 0, -1, 2, -1 );
|
guiMapInvenButtonImage[ 1 ]= LoadButtonImage( "INTERFACE\\map_screen_bottom_arrows.sti" ,9, 0, -1, 2, -1 );
|
||||||
guiMapInvenButton[ 1 ] = QuickCreateButton( guiMapInvenButtonImage[ 1 ], (MAP_INV_X_OFFSET + 487), (SCREEN_HEIGHT - 144),
|
guiMapInvenButton[ 1 ] = QuickCreateButton( guiMapInvenButtonImage[ 1 ], (MAP_INV_X_OFFSET + 487), (SCREEN_HEIGHT - 144 - 2 * yResOffset),
|
||||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST,
|
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST,
|
||||||
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)MapInventoryPoolPrevBtn );
|
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)MapInventoryPoolPrevBtn );
|
||||||
|
|
||||||
// set up fast help text
|
// set up fast help text
|
||||||
SetButtonFastHelpText( guiMapInvenButton[ 0 ], pMapScreenInvenButtonHelpText[ 0 ] );
|
SetButtonFastHelpText( guiMapInvenButton[ 0 ], pMapScreenInvenButtonHelpText[ 0 ] );
|
||||||
@@ -1745,13 +1745,11 @@ void DisplayPagesForMapInventoryPool( void )
|
|||||||
swprintf( sString, L"%d / %d", iCurrentInventoryPoolPage + 1, iLastInventoryPoolPage + 1 );
|
swprintf( sString, L"%d / %d", iCurrentInventoryPoolPage + 1, iLastInventoryPoolPage + 1 );
|
||||||
|
|
||||||
// grab centered coords
|
// grab centered coords
|
||||||
FindFontCenterCoordinates(MAP_INVENTORY_POOL_PAGE_X, MAP_INVENTORY_POOL_PAGE_Y ,MAP_INVENTORY_POOL_PAGE_WIDTH ,MAP_INVENTORY_POOL_PAGE_HEIGHT ,sString , MAP_SCREEN_FONT, &sX, &sY);
|
FindFontCenterCoordinates(MAP_INVENTORY_POOL_PAGE_X, MAP_INVENTORY_POOL_PAGE_Y - 2 * yResOffset, MAP_INVENTORY_POOL_PAGE_WIDTH ,MAP_INVENTORY_POOL_PAGE_HEIGHT ,sString , MAP_SCREEN_FONT, &sX, &sY);
|
||||||
|
|
||||||
mprintf( sX, sY, sString );
|
mprintf( sX, sY, sString );
|
||||||
|
|
||||||
SetFontDestBuffer( FRAME_BUFFER, 0,0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE );
|
SetFontDestBuffer( FRAME_BUFFER, 0,0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE );
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
INT32 GetTotalNumberOfItemsInSectorStash( void )
|
INT32 GetTotalNumberOfItemsInSectorStash( void )
|
||||||
@@ -1809,13 +1807,12 @@ void DrawNumberOfIventoryPoolItems( void )
|
|||||||
SetFontDestBuffer( guiSAVEBUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE );
|
SetFontDestBuffer( guiSAVEBUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE );
|
||||||
|
|
||||||
// grab centered coords
|
// grab centered coords
|
||||||
FindFontCenterCoordinates(MAP_INVENTORY_POOL_NUMBER_X, MAP_INVENTORY_POOL_PAGE_Y ,MAP_INVENTORY_POOL_NUMBER_WIDTH ,MAP_INVENTORY_POOL_PAGE_HEIGHT ,sString , MAP_SCREEN_FONT, &sX, &sY);
|
FindFontCenterCoordinates(MAP_INVENTORY_POOL_NUMBER_X, MAP_INVENTORY_POOL_PAGE_Y - 2 * yResOffset, MAP_INVENTORY_POOL_NUMBER_WIDTH ,MAP_INVENTORY_POOL_PAGE_HEIGHT ,sString , MAP_SCREEN_FONT, &sX, &sY);
|
||||||
|
|
||||||
mprintf( sX, sY, sString );
|
mprintf( sX, sY, sString );
|
||||||
|
|
||||||
SetFontDestBuffer( FRAME_BUFFER, 0,0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE );
|
SetFontDestBuffer( FRAME_BUFFER, 0,0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE );
|
||||||
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1824,9 +1821,10 @@ void CreateMapInventoryPoolDoneButton( void )
|
|||||||
{
|
{
|
||||||
// create done button
|
// create done button
|
||||||
guiMapInvenButtonImage[ 2 ]= LoadButtonImage( "INTERFACE\\done_button.sti" , -1, 0, -1, 1, -1 );
|
guiMapInvenButtonImage[ 2 ]= LoadButtonImage( "INTERFACE\\done_button.sti" , -1, 0, -1, 1, -1 );
|
||||||
guiMapInvenButton[ 2 ] = QuickCreateButton( guiMapInvenButtonImage[ 2 ], MAP_INV_X_OFFSET + 587 , (SCREEN_HEIGHT - 147),
|
|
||||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST,
|
guiMapInvenButton[ 2 ] = QuickCreateButton( guiMapInvenButtonImage[ 2 ], MAP_INV_X_OFFSET + 587 , (yResSize - 147),
|
||||||
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)MapInventoryPoolDoneBtn );
|
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST,
|
||||||
|
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)MapInventoryPoolDoneBtn );
|
||||||
|
|
||||||
// set up fast help text
|
// set up fast help text
|
||||||
SetButtonFastHelpText( guiMapInvenButton[ 2 ], pMapScreenInvenButtonHelpText[ 2 ] );
|
SetButtonFastHelpText( guiMapInvenButton[ 2 ], pMapScreenInvenButtonHelpText[ 2 ] );
|
||||||
@@ -1852,7 +1850,6 @@ void DisplayCurrentSector( void )
|
|||||||
CHAR16 sString[ 32 ];
|
CHAR16 sString[ 32 ];
|
||||||
INT16 sX, sY;
|
INT16 sX, sY;
|
||||||
|
|
||||||
|
|
||||||
swprintf( sString, L"%s%s%s", pMapVertIndex[ sSelMapY ], pMapHortIndex[ sSelMapX ], pMapDepthIndex[ iCurrentMapSectorZ ] );
|
swprintf( sString, L"%s%s%s", pMapVertIndex[ sSelMapY ], pMapHortIndex[ sSelMapX ], pMapDepthIndex[ iCurrentMapSectorZ ] );
|
||||||
|
|
||||||
// set font stuff
|
// set font stuff
|
||||||
@@ -1864,7 +1861,7 @@ void DisplayCurrentSector( void )
|
|||||||
SetFontDestBuffer( guiSAVEBUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE );
|
SetFontDestBuffer( guiSAVEBUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE );
|
||||||
|
|
||||||
// grab centered coords
|
// grab centered coords
|
||||||
FindFontCenterCoordinates(MAP_INVENTORY_POOL_LOC_X, MAP_INVENTORY_POOL_PAGE_Y ,MAP_INVENTORY_POOL_LOC_WIDTH ,MAP_INVENTORY_POOL_PAGE_HEIGHT ,sString , MAP_SCREEN_FONT, &sX, &sY);
|
FindFontCenterCoordinates(MAP_INVENTORY_POOL_LOC_X, MAP_INVENTORY_POOL_PAGE_Y - 2 * yResOffset, MAP_INVENTORY_POOL_LOC_WIDTH ,MAP_INVENTORY_POOL_PAGE_HEIGHT ,sString , MAP_SCREEN_FONT, &sX, &sY);
|
||||||
|
|
||||||
mprintf( sX, sY, sString );
|
mprintf( sX, sY, sString );
|
||||||
|
|
||||||
@@ -1912,7 +1909,6 @@ void ResizeInventoryList( void )
|
|||||||
|
|
||||||
void DrawTextOnMapInventoryBackground( void )
|
void DrawTextOnMapInventoryBackground( void )
|
||||||
{
|
{
|
||||||
// CHAR16 sString[ 64 ];
|
|
||||||
UINT16 usStringHeight;
|
UINT16 usStringHeight;
|
||||||
|
|
||||||
SetFont( MAP_IVEN_FONT );
|
SetFont( MAP_IVEN_FONT );
|
||||||
@@ -1922,21 +1918,13 @@ void DrawTextOnMapInventoryBackground( void )
|
|||||||
// set the buffer
|
// set the buffer
|
||||||
SetFontDestBuffer( guiSAVEBUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE );
|
SetFontDestBuffer( guiSAVEBUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE );
|
||||||
|
|
||||||
////Calculate the height of the string, as it needs to be vertically centered.
|
//Calculate the height of the string, as it needs to be vertically centered.
|
||||||
//usStringHeight = DisplayWrappedString( 268, 342, 53, 1, MAP_IVEN_FONT, FONT_BEIGE, pMapInventoryStrings[ 0 ], FONT_BLACK, FALSE, RIGHT_JUSTIFIED | DONT_DISPLAY_TEXT );
|
usStringHeight = DisplayWrappedString(MAP_INV_X_OFFSET + 268, (SCREEN_HEIGHT - 138 - 2 * yResOffset), 53, 1, MAP_IVEN_FONT, FONT_BEIGE, pMapInventoryStrings[ 0 ], FONT_BLACK, FALSE, RIGHT_JUSTIFIED | DONT_DISPLAY_TEXT );
|
||||||
//DisplayWrappedString( 268, (UINT16)(342 - (usStringHeight / 2) ), 53, 1, MAP_IVEN_FONT, FONT_BEIGE, pMapInventoryStrings[ 0 ], FONT_BLACK, FALSE, RIGHT_JUSTIFIED );
|
DisplayWrappedString(MAP_INV_X_OFFSET + 268, (UINT16)((SCREEN_HEIGHT - 138 - 2 * yResOffset) - (usStringHeight / 2) ), 53, 1, MAP_IVEN_FONT, FONT_BEIGE, pMapInventoryStrings[ 0 ], FONT_BLACK, FALSE, RIGHT_JUSTIFIED );
|
||||||
|
|
||||||
////Calculate the height of the string, as it needs to be vertically centered.
|
|
||||||
//usStringHeight = DisplayWrappedString( 369, 342, 65, 1, MAP_IVEN_FONT, FONT_BEIGE, pMapInventoryStrings[ 1 ], FONT_BLACK, FALSE, RIGHT_JUSTIFIED | DONT_DISPLAY_TEXT );
|
|
||||||
//DisplayWrappedString( 369, (UINT16)(342 - (usStringHeight / 2) ), 65, 1, MAP_IVEN_FONT, FONT_BEIGE, pMapInventoryStrings[ 1 ], FONT_BLACK, FALSE, RIGHT_JUSTIFIED );
|
|
||||||
|
|
||||||
//Calculate the height of the string, as it needs to be vertically centered.
|
//Calculate the height of the string, as it needs to be vertically centered.
|
||||||
usStringHeight = DisplayWrappedString( MAP_INV_X_OFFSET + 268, (SCREEN_HEIGHT - 138), 53, 1, MAP_IVEN_FONT, FONT_BEIGE, pMapInventoryStrings[ 0 ], FONT_BLACK, FALSE, RIGHT_JUSTIFIED | DONT_DISPLAY_TEXT );
|
usStringHeight = DisplayWrappedString( MAP_INV_X_OFFSET + 369, (SCREEN_HEIGHT - 138 - 2 * yResOffset), 65, 1, MAP_IVEN_FONT, FONT_BEIGE, pMapInventoryStrings[ 1 ], FONT_BLACK, FALSE, RIGHT_JUSTIFIED | DONT_DISPLAY_TEXT );
|
||||||
DisplayWrappedString( MAP_INV_X_OFFSET + 268, (UINT16)((SCREEN_HEIGHT - 138) - (usStringHeight / 2) ), 53, 1, MAP_IVEN_FONT, FONT_BEIGE, pMapInventoryStrings[ 0 ], FONT_BLACK, FALSE, RIGHT_JUSTIFIED );
|
DisplayWrappedString(MAP_INV_X_OFFSET + 369, (UINT16)((SCREEN_HEIGHT - 138 - 2 * yResOffset) - (usStringHeight / 2) ), 65, 1, MAP_IVEN_FONT, FONT_BEIGE, pMapInventoryStrings[ 1 ], FONT_BLACK, FALSE, RIGHT_JUSTIFIED );
|
||||||
|
|
||||||
//Calculate the height of the string, as it needs to be vertically centered.
|
|
||||||
usStringHeight = DisplayWrappedString( MAP_INV_X_OFFSET + 369, (SCREEN_HEIGHT - 138), 65, 1, MAP_IVEN_FONT, FONT_BEIGE, pMapInventoryStrings[ 1 ], FONT_BLACK, FALSE, RIGHT_JUSTIFIED | DONT_DISPLAY_TEXT );
|
|
||||||
DisplayWrappedString( MAP_INV_X_OFFSET + 369, (UINT16)((SCREEN_HEIGHT - 138) - (usStringHeight / 2) ), 65, 1, MAP_IVEN_FONT, FONT_BEIGE, pMapInventoryStrings[ 1 ], FONT_BLACK, FALSE, RIGHT_JUSTIFIED );
|
|
||||||
|
|
||||||
DrawTextOnSectorInventory( );
|
DrawTextOnSectorInventory( );
|
||||||
|
|
||||||
@@ -1999,10 +1987,7 @@ void DrawTextOnSectorInventory( void )
|
|||||||
swprintf(sString, L"Inventory Pool %c", gInventoryPoolIndex);
|
swprintf(sString, L"Inventory Pool %c", gInventoryPoolIndex);
|
||||||
|
|
||||||
SetFontDestBuffer( guiSAVEBUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE );
|
SetFontDestBuffer( guiSAVEBUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE );
|
||||||
|
FindFontCenterCoordinates( (SCREEN_WIDTH - INTERFACE_WIDTH)/2 + 271, 18, xResSize - 271, GetFontHeight( FONT14ARIAL ), sString, FONT14ARIAL, &sX, &sY );
|
||||||
//FindFontCenterCoordinates( MAP_INV_X_OFFSET + MAP_INVENTORY_POOL_SLOT_START_X, MAP_INVENTORY_POOL_SLOT_START_Y - 20, 630 - MAP_INVENTORY_POOL_SLOT_START_X, GetFontHeight( FONT14ARIAL ), sString, FONT14ARIAL, &sX, &sY );
|
|
||||||
|
|
||||||
FindFontCenterCoordinates( 271, 18, SCREEN_WIDTH - 271, GetFontHeight( FONT14ARIAL ), sString, FONT14ARIAL, &sX, &sY );
|
|
||||||
|
|
||||||
SetFont( FONT14ARIAL );
|
SetFont( FONT14ARIAL );
|
||||||
SetFontForeground( FONT_WHITE );
|
SetFontForeground( FONT_WHITE );
|
||||||
@@ -2011,7 +1996,6 @@ void DrawTextOnSectorInventory( void )
|
|||||||
mprintf( sX, sY, sString );
|
mprintf( sX, sY, sString );
|
||||||
|
|
||||||
SetFontDestBuffer( FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE );
|
SetFontDestBuffer( FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2375,22 +2359,14 @@ BOOLEAN LoadInventoryPoolQ (UINT8 ubSaveGameID)
|
|||||||
|
|
||||||
if(MAP_INVENTORY_POOL_SLOT_COUNT <= 0)
|
if(MAP_INVENTORY_POOL_SLOT_COUNT <= 0)
|
||||||
{
|
{
|
||||||
switch(iResolution)
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
MAP_INVENTORY_POOL_SLOT_COUNT = 40;
|
MAP_INVENTORY_POOL_SLOT_COUNT = 40;
|
||||||
break;
|
else if (iResolution < _1024x768)
|
||||||
case 1:
|
|
||||||
MAP_INVENTORY_POOL_SLOT_COUNT = 77;
|
MAP_INVENTORY_POOL_SLOT_COUNT = 77;
|
||||||
break;
|
else
|
||||||
case 2:
|
MAP_INVENTORY_POOL_SLOT_COUNT = 170;
|
||||||
MAP_INVENTORY_POOL_SLOT_COUNT = 170;//MAP_INVENTORY_POOL_MAX_SLOTS;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
Assert(0);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = FALSE;
|
ret = FALSE;
|
||||||
CreateSavedGameFileNameFromNumber(ubSaveGameID, tmpbuf);
|
CreateSavedGameFileNameFromNumber(ubSaveGameID, tmpbuf);
|
||||||
strcat(tmpbuf, ".IPQ");
|
strcat(tmpbuf, ".IPQ");
|
||||||
@@ -2454,21 +2430,14 @@ BOOLEAN SaveInventoryPoolQ(UINT8 ubSaveGameID)
|
|||||||
|
|
||||||
if(MAP_INVENTORY_POOL_SLOT_COUNT <= 0)
|
if(MAP_INVENTORY_POOL_SLOT_COUNT <= 0)
|
||||||
{
|
{
|
||||||
switch(iResolution)
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
MAP_INVENTORY_POOL_SLOT_COUNT = 40;
|
MAP_INVENTORY_POOL_SLOT_COUNT = 40;
|
||||||
break;
|
else if (iResolution < _1024x768)
|
||||||
case 1:
|
|
||||||
MAP_INVENTORY_POOL_SLOT_COUNT = 77;
|
MAP_INVENTORY_POOL_SLOT_COUNT = 77;
|
||||||
case 2:
|
else
|
||||||
MAP_INVENTORY_POOL_SLOT_COUNT = 170;//MAP_INVENTORY_POOL_MAX_SLOTS;
|
MAP_INVENTORY_POOL_SLOT_COUNT = 170;
|
||||||
break;
|
|
||||||
default:
|
|
||||||
Assert(0);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = FALSE;
|
ret = FALSE;
|
||||||
CreateSavedGameFileNameFromNumber(ubSaveGameID, tmpbuf);
|
CreateSavedGameFileNameFromNumber(ubSaveGameID, tmpbuf);
|
||||||
strcat(tmpbuf, ".IPQ");
|
strcat(tmpbuf, ".IPQ");
|
||||||
|
|||||||
@@ -632,23 +632,6 @@ void DrawIconL(INT32 MAP_GRID_X2, INT32 MAP_GRID_Y2, INT32 i, INT32 Sector_X , I
|
|||||||
sX = (UINT16) (MAP_VIEW_START_X + MAP_GRID_X + (MAP_GRID_X2 * MAP_GRID_X) / 10);
|
sX = (UINT16) (MAP_VIEW_START_X + MAP_GRID_X + (MAP_GRID_X2 * MAP_GRID_X) / 10);
|
||||||
sY = (UINT16) (MAP_VIEW_START_Y + MAP_GRID_Y + ((MAP_GRID_Y2 * MAP_GRID_Y) / 10) + 1);
|
sY = (UINT16) (MAP_VIEW_START_Y + MAP_GRID_Y + ((MAP_GRID_Y2 * MAP_GRID_Y) / 10) + 1);
|
||||||
|
|
||||||
/*
|
|
||||||
if (iResolution == 0)
|
|
||||||
{
|
|
||||||
sY += MAP_GRID_Y2;
|
|
||||||
sX += MAP_GRID_X2;
|
|
||||||
}
|
|
||||||
else if (iResolution == 1)
|
|
||||||
{
|
|
||||||
sY += + 5 + MAP_GRID_Y2;
|
|
||||||
sX += - MAP_GRID_X2 + 3;
|
|
||||||
}
|
|
||||||
else if (iResolution == 2)
|
|
||||||
{
|
|
||||||
sY += + 10 + MAP_GRID_Y2;
|
|
||||||
sX += - MAP_GRID_X2 + 10;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
ubVidObjIndex = 1;
|
ubVidObjIndex = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1414,17 +1397,17 @@ void ShowUncertainNumberEnemiesInSector( INT16 sSectorX, INT16 sSectorY )
|
|||||||
UINT8 iconOffsetX = 0;
|
UINT8 iconOffsetX = 0;
|
||||||
UINT8 iconOffsetY = 0;
|
UINT8 iconOffsetY = 0;
|
||||||
|
|
||||||
if (iResolution == 0)
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
{
|
{
|
||||||
iconOffsetX = 2;
|
iconOffsetX = 2;
|
||||||
iconOffsetY = 1;
|
iconOffsetY = 9;
|
||||||
}
|
}
|
||||||
else if (iResolution == 1)
|
else if (iResolution < _1024x768)
|
||||||
{
|
{
|
||||||
iconOffsetX = 8;
|
iconOffsetX = 8;
|
||||||
iconOffsetY = 12;
|
iconOffsetY = 12;
|
||||||
}
|
}
|
||||||
else if (iResolution == 2)
|
else
|
||||||
{
|
{
|
||||||
iconOffsetX = 12;
|
iconOffsetX = 12;
|
||||||
iconOffsetY = 13;
|
iconOffsetY = 13;
|
||||||
@@ -2043,21 +2026,23 @@ BOOLEAN ShadeMapElemZoomIn(INT16 sMapX, INT16 sMapY, INT32 iColor )
|
|||||||
|
|
||||||
void InitializeMilitiaPopup(void)
|
void InitializeMilitiaPopup(void)
|
||||||
{
|
{
|
||||||
// WANNE.MAP.TODO:
|
UINT16 xVal = 400;
|
||||||
if (iResolution == 0)
|
UINT16 yVal = 125;
|
||||||
|
|
||||||
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
{
|
{
|
||||||
MAP_MILITIA_BOX_POS_X = 400;
|
MAP_MILITIA_BOX_POS_X = xVal;
|
||||||
MAP_MILITIA_BOX_POS_Y = 125;
|
MAP_MILITIA_BOX_POS_Y = yVal;
|
||||||
}
|
}
|
||||||
else if (iResolution == 1)
|
else if (iResolution < _1024x768)
|
||||||
{
|
{
|
||||||
MAP_MILITIA_BOX_POS_X = 400 + 77;
|
MAP_MILITIA_BOX_POS_X = xVal + 77;
|
||||||
MAP_MILITIA_BOX_POS_Y = 125 + 116;
|
MAP_MILITIA_BOX_POS_Y = yVal + 116;
|
||||||
}
|
}
|
||||||
else if (iResolution == 2)
|
else
|
||||||
{
|
{
|
||||||
MAP_MILITIA_BOX_POS_X = 400 + 190;
|
MAP_MILITIA_BOX_POS_X = xVal + 190;
|
||||||
MAP_MILITIA_BOX_POS_Y = 125 + 285;
|
MAP_MILITIA_BOX_POS_Y = yVal + 285;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2072,14 +2057,14 @@ BOOLEAN InitializePalettesForMap( void )
|
|||||||
// load image
|
// load image
|
||||||
vs_desc.fCreateFlags = VSURFACE_CREATE_FROMFILE | VSURFACE_SYSTEM_MEM_USAGE;
|
vs_desc.fCreateFlags = VSURFACE_CREATE_FROMFILE | VSURFACE_SYSTEM_MEM_USAGE;
|
||||||
|
|
||||||
if (iResolution == 0)
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
strcpy(vs_desc.ImageFile, "INTERFACE\\b_map.pcx");
|
strcpy(vs_desc.ImageFile, "INTERFACE\\b_map.pcx");
|
||||||
else if (iResolution == 1)
|
else if (iResolution < _1024x768)
|
||||||
strcpy(vs_desc.ImageFile, "INTERFACE\\b_map_800x600.pcx");
|
strcpy(vs_desc.ImageFile, "INTERFACE\\b_map_800x600.pcx");
|
||||||
else if (iResolution == 2)
|
else
|
||||||
strcpy(vs_desc.ImageFile, "INTERFACE\\b_map_1024x768.pcx");
|
strcpy(vs_desc.ImageFile, "INTERFACE\\b_map_1024x768.pcx");
|
||||||
|
|
||||||
CHECKF(AddVideoSurface(&vs_desc, &uiTempMap));
|
CHECKF(AddVideoSurface(&vs_desc, &uiTempMap));
|
||||||
|
|
||||||
// get video surface
|
// get video surface
|
||||||
CHECKF( GetVideoSurface( &hSrcVSurface, uiTempMap) );
|
CHECKF( GetVideoSurface( &hSrcVSurface, uiTempMap) );
|
||||||
@@ -4485,17 +4470,17 @@ void ShowPeopleInMotion( INT16 sX, INT16 sY )
|
|||||||
UINT8 iconOffsetX = 0;
|
UINT8 iconOffsetX = 0;
|
||||||
UINT8 iconOffsetY = 0;
|
UINT8 iconOffsetY = 0;
|
||||||
|
|
||||||
if (iResolution == 0)
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
{
|
{
|
||||||
iconOffsetX = 2;
|
iconOffsetX = 2;
|
||||||
iconOffsetY = 1;
|
iconOffsetY = 1;
|
||||||
}
|
}
|
||||||
else if (iResolution == 1)
|
else if (iResolution < _1024x768)
|
||||||
{
|
{
|
||||||
iconOffsetX = 3;
|
iconOffsetX = 3;
|
||||||
iconOffsetY = 2;
|
iconOffsetY = 2;
|
||||||
}
|
}
|
||||||
else if (iResolution == 2)
|
else
|
||||||
{
|
{
|
||||||
iconOffsetX = 4;
|
iconOffsetX = 4;
|
||||||
iconOffsetY = 3;
|
iconOffsetY = 3;
|
||||||
@@ -4755,9 +4740,17 @@ void DisplayDistancesForHelicopter( void )
|
|||||||
sOldYPosition = sYPosition;
|
sOldYPosition = sYPosition;
|
||||||
|
|
||||||
// blit in background
|
// blit in background
|
||||||
|
UINT8 imageIndex = 0;
|
||||||
GetVideoObject( &hHandle, guiMapBorderHeliSectors );
|
GetVideoObject( &hHandle, guiMapBorderHeliSectors );
|
||||||
BltVideoObject( FRAME_BUFFER, hHandle, iResolution, MAP_HELICOPTER_ETA_POPUP_X, sYPosition, VO_BLT_SRCTRANSPARENCY, NULL );
|
|
||||||
|
|
||||||
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
|
imageIndex = 0;
|
||||||
|
else if (iResolution < _1024x768)
|
||||||
|
imageIndex = 1;
|
||||||
|
else
|
||||||
|
imageIndex = 2;
|
||||||
|
|
||||||
|
BltVideoObject( FRAME_BUFFER, hHandle, imageIndex, MAP_HELICOPTER_ETA_POPUP_X, sYPosition, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||||
|
|
||||||
// sTotalCanTravel = ( INT16 )GetTotalDistanceHelicopterCanTravel( );
|
// sTotalCanTravel = ( INT16 )GetTotalDistanceHelicopterCanTravel( );
|
||||||
sDistanceToGo = ( INT16 )DistanceOfIntendedHelicopterPath( );
|
sDistanceToGo = ( INT16 )DistanceOfIntendedHelicopterPath( );
|
||||||
@@ -4944,7 +4937,7 @@ void DisplayPositionOfHelicopter( void )
|
|||||||
|
|
||||||
GetVideoObject( &hHandle, guiHelicopterIcon );
|
GetVideoObject( &hHandle, guiHelicopterIcon );
|
||||||
|
|
||||||
if (iResolution > 0)
|
if (iResolution >= _800x600)
|
||||||
{
|
{
|
||||||
x = x + (MAP_GRID_X / 2) - 10;
|
x = x + (MAP_GRID_X / 2) - 10;
|
||||||
y = y + 1 + (MAP_GRID_Y / 2) - 10;
|
y = y + 1 + (MAP_GRID_Y / 2) - 10;
|
||||||
@@ -5014,7 +5007,7 @@ void DisplayDestinationOfHelicopter( void )
|
|||||||
GetVideoObject( &hHandle, guiHelicopterIcon );
|
GetVideoObject( &hHandle, guiHelicopterIcon );
|
||||||
BltVideoObject( FRAME_BUFFER, hHandle, HELI_SHADOW_ICON, x, y, VO_BLT_SRCTRANSPARENCY, NULL );
|
BltVideoObject( FRAME_BUFFER, hHandle, HELI_SHADOW_ICON, x, y, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||||
|
|
||||||
if (iResolution > 0)
|
if (iResolution >= _800x600)
|
||||||
{
|
{
|
||||||
x = x + (MAP_GRID_X / 2) - 10;
|
x = x + (MAP_GRID_X / 2) - 10;
|
||||||
y = y + 1 + (MAP_GRID_Y / 2) - 10;
|
y = y + 1 + (MAP_GRID_Y / 2) - 10;
|
||||||
@@ -5456,9 +5449,7 @@ void DisplayLevelString( void )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// otherwise we will have to display the string with the level number
|
SetFontDestBuffer( guiSAVEBUFFER, xResOffset + MAP_VIEW_START_X, MAP_VIEW_START_Y, xResOffset + MAP_VIEW_START_X+MAP_VIEW_WIDTH+MAP_GRID_X, MAP_VIEW_START_Y+MAP_VIEW_HEIGHT+7, FALSE );
|
||||||
|
|
||||||
SetFontDestBuffer( guiSAVEBUFFER, MAP_VIEW_START_X, MAP_VIEW_START_Y, MAP_VIEW_START_X+MAP_VIEW_WIDTH+MAP_GRID_X, MAP_VIEW_START_Y+MAP_VIEW_HEIGHT+7, FALSE );
|
|
||||||
|
|
||||||
SetFont( MAP_FONT );
|
SetFont( MAP_FONT );
|
||||||
SetFontForeground( MAP_INDEX_COLOR );
|
SetFontForeground( MAP_INDEX_COLOR );
|
||||||
@@ -5596,11 +5587,11 @@ BOOLEAN LoadMilitiaPopUpBox( void )
|
|||||||
// load the militia pop up box
|
// load the militia pop up box
|
||||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||||
|
|
||||||
if (iResolution == 0)
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
FilenameForBPP("INTERFACE\\Militia.sti", VObjectDesc.ImageFile);
|
FilenameForBPP("INTERFACE\\Militia.sti", VObjectDesc.ImageFile);
|
||||||
else if (iResolution == 1)
|
else if (iResolution < _1024x768)
|
||||||
FilenameForBPP("INTERFACE\\Militia_800x600.sti", VObjectDesc.ImageFile);
|
FilenameForBPP("INTERFACE\\Militia_800x600.sti", VObjectDesc.ImageFile);
|
||||||
else if (iResolution == 2)
|
else
|
||||||
FilenameForBPP("INTERFACE\\Militia_1024x768.sti", VObjectDesc.ImageFile);
|
FilenameForBPP("INTERFACE\\Militia_1024x768.sti", VObjectDesc.ImageFile);
|
||||||
|
|
||||||
CHECKF(AddVideoObject(&VObjectDesc, &guiMilitia));
|
CHECKF(AddVideoObject(&VObjectDesc, &guiMilitia));
|
||||||
@@ -5994,11 +5985,11 @@ void CreateDestroyMilitiaSectorButtons( void )
|
|||||||
sY += ( iCounter * ( MILITIA_BTN_HEIGHT ) + 2 );
|
sY += ( iCounter * ( MILITIA_BTN_HEIGHT ) + 2 );
|
||||||
|
|
||||||
// set the button image
|
// set the button image
|
||||||
if (iResolution == 0)
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
giMapMilitiaButtonImage[ iCounter ]= LoadButtonImage( "INTERFACE\\militia.sti", -1,3,-1,4,-1 );
|
giMapMilitiaButtonImage[ iCounter ]= LoadButtonImage( "INTERFACE\\militia.sti", -1,3,-1,4,-1 );
|
||||||
else if (iResolution == 1)
|
else if (iResolution < _1024x768)
|
||||||
giMapMilitiaButtonImage[ iCounter ]= LoadButtonImage( "INTERFACE\\militia_800x600.sti", -1,3,-1,4,-1 );
|
giMapMilitiaButtonImage[ iCounter ]= LoadButtonImage( "INTERFACE\\militia_800x600.sti", -1,3,-1,4,-1 );
|
||||||
else if (iResolution == 2)
|
else
|
||||||
giMapMilitiaButtonImage[ iCounter ]= LoadButtonImage( "INTERFACE\\militia_1024x768.sti", -1,3,-1,4,-1 );
|
giMapMilitiaButtonImage[ iCounter ]= LoadButtonImage( "INTERFACE\\militia_1024x768.sti", -1,3,-1,4,-1 );
|
||||||
|
|
||||||
// set the button value
|
// set the button value
|
||||||
@@ -6462,17 +6453,17 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Map Screen4");
|
|||||||
void CreateMilitiaPanelBottomButton( void )
|
void CreateMilitiaPanelBottomButton( void )
|
||||||
{
|
{
|
||||||
// set the button image
|
// set the button image
|
||||||
if (iResolution == 0)
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
{
|
{
|
||||||
giMapMilitiaButtonImage[ 3 ]= LoadButtonImage( "INTERFACE\\militia.sti" ,-1,1,-1,2,-1 );
|
giMapMilitiaButtonImage[ 3 ]= LoadButtonImage( "INTERFACE\\militia.sti" ,-1,1,-1,2,-1 );
|
||||||
giMapMilitiaButtonImage[ 4 ]= LoadButtonImage( "INTERFACE\\militia.sti" ,-1,1,-1,2,-1 );
|
giMapMilitiaButtonImage[ 4 ]= LoadButtonImage( "INTERFACE\\militia.sti" ,-1,1,-1,2,-1 );
|
||||||
}
|
}
|
||||||
else if (iResolution == 1)
|
else if (iResolution < _1024x768)
|
||||||
{
|
{
|
||||||
giMapMilitiaButtonImage[ 3 ]= LoadButtonImage( "INTERFACE\\militia_800x600.sti" ,-1,1,-1,2,-1 );
|
giMapMilitiaButtonImage[ 3 ]= LoadButtonImage( "INTERFACE\\militia_800x600.sti" ,-1,1,-1,2,-1 );
|
||||||
giMapMilitiaButtonImage[ 4 ]= LoadButtonImage( "INTERFACE\\militia_800x600.sti" ,-1,1,-1,2,-1 );
|
giMapMilitiaButtonImage[ 4 ]= LoadButtonImage( "INTERFACE\\militia_800x600.sti" ,-1,1,-1,2,-1 );
|
||||||
}
|
}
|
||||||
else if (iResolution == 2)
|
else
|
||||||
{
|
{
|
||||||
giMapMilitiaButtonImage[ 3 ]= LoadButtonImage( "INTERFACE\\militia_1024x768.sti" ,-1,1,-1,2,-1 );
|
giMapMilitiaButtonImage[ 3 ]= LoadButtonImage( "INTERFACE\\militia_1024x768.sti" ,-1,1,-1,2,-1 );
|
||||||
giMapMilitiaButtonImage[ 4 ]= LoadButtonImage( "INTERFACE\\militia_1024x768.sti" ,-1,1,-1,2,-1 );
|
giMapMilitiaButtonImage[ 4 ]= LoadButtonImage( "INTERFACE\\militia_1024x768.sti" ,-1,1,-1,2,-1 );
|
||||||
@@ -6874,24 +6865,30 @@ void HandleLowerLevelMapBlit( void )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (iResolution == 0)
|
UINT8 xVal = 21;
|
||||||
|
UINT8 yVal = 17;
|
||||||
|
UINT8 imageIndex = 0;
|
||||||
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
{
|
{
|
||||||
offsetX = 21;
|
offsetX = xVal;
|
||||||
offsetY = 17;
|
offsetY = yVal;
|
||||||
|
imageIndex = 0;
|
||||||
}
|
}
|
||||||
else if (iResolution == 1)
|
else if (iResolution < _1024x768)
|
||||||
{
|
{
|
||||||
offsetX = 21 + 8;
|
offsetX = xVal + 8;
|
||||||
offsetY = 17 + 7;
|
offsetY = yVal + 7;
|
||||||
|
imageIndex = 1;
|
||||||
}
|
}
|
||||||
else if (iResolution == 2)
|
else
|
||||||
{
|
{
|
||||||
offsetX = 21 + 21;
|
offsetX = xVal + 21;
|
||||||
offsetY = 17 + 17;
|
offsetY = yVal + 17;
|
||||||
|
imageIndex = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// handle the blt of the sublevel
|
// handle the blt of the sublevel
|
||||||
BltVideoObject( guiSAVEBUFFER, hHandle, iResolution, MAP_VIEW_START_X + offsetX, MAP_VIEW_START_Y + offsetY, VO_BLT_SRCTRANSPARENCY, NULL );
|
BltVideoObject( guiSAVEBUFFER, hHandle, imageIndex, MAP_VIEW_START_X + offsetX, MAP_VIEW_START_Y + offsetY, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||||
|
|
||||||
// handle shading of sublevels
|
// handle shading of sublevels
|
||||||
ShadeSubLevelsNotVisited( );
|
ShadeSubLevelsNotVisited( );
|
||||||
@@ -7480,30 +7477,23 @@ void DrawMapBoxIcon( HVOBJECT hIconHandle, UINT16 usVOIndex, INT16 sMapX, INT16
|
|||||||
INT32 iX, iY;
|
INT32 iX, iY;
|
||||||
|
|
||||||
|
|
||||||
UINT8 iconOffsetX = 0;
|
UINT8 iconOffsetX = 2;
|
||||||
UINT8 iconOffsetY = 0;
|
UINT8 iconOffsetY = 1;
|
||||||
UINT8 iconSize = 0;
|
UINT8 iconSize = 0;
|
||||||
|
|
||||||
if (iResolution == 0)
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
{
|
{
|
||||||
iconOffsetX = 2;
|
|
||||||
iconOffsetY = 1;
|
|
||||||
iconSize = 3;
|
iconSize = 3;
|
||||||
}
|
}
|
||||||
else if (iResolution == 1)
|
else if (iResolution < _1024x768)
|
||||||
{
|
{
|
||||||
iconOffsetX = 2;
|
|
||||||
iconOffsetY = 1;
|
|
||||||
iconSize = 4;
|
iconSize = 4;
|
||||||
}
|
}
|
||||||
else if (iResolution == 2)
|
else
|
||||||
{
|
{
|
||||||
iconOffsetX = 2;
|
|
||||||
iconOffsetY = 1;
|
|
||||||
iconSize = 6;
|
iconSize = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// don't show any more icons than will fit into one sector, to keep them from spilling into sector(s) beneath
|
// don't show any more icons than will fit into one sector, to keep them from spilling into sector(s) beneath
|
||||||
if ( ubIconPosition >= ( MERC_ICONS_PER_LINE * ROWS_PER_SECTOR ) )
|
if ( ubIconPosition >= ( MERC_ICONS_PER_LINE * ROWS_PER_SECTOR ) )
|
||||||
{
|
{
|
||||||
@@ -7625,7 +7615,7 @@ void DrawBullseye()
|
|||||||
// draw the bullseye in that sector
|
// draw the bullseye in that sector
|
||||||
GetVideoObject( &hHandle, guiBULLSEYE);
|
GetVideoObject( &hHandle, guiBULLSEYE);
|
||||||
|
|
||||||
if (iResolution > 0)
|
if (iResolution >= _800x600)
|
||||||
{
|
{
|
||||||
sX = sX + MAP_GRID_X / 2 - 10;
|
sX = sX + MAP_GRID_X / 2 - 10;
|
||||||
sY = sY + 1 + MAP_GRID_Y / 2 - 10;
|
sY = sY + 1 + MAP_GRID_Y / 2 - 10;
|
||||||
|
|||||||
@@ -76,8 +76,6 @@ extern UINT8 maxNumberOfMercVisibleInStrategyList = 0; // WANNE: Max merc displa
|
|||||||
// number of LINKED LISTS for sets of leave items (each slot holds an unlimited # of items)
|
// number of LINKED LISTS for sets of leave items (each slot holds an unlimited # of items)
|
||||||
#define NUM_LEAVE_LIST_SLOTS CODE_MAXIMUM_NUMBER_OF_PLAYER_SLOTS
|
#define NUM_LEAVE_LIST_SLOTS CODE_MAXIMUM_NUMBER_OF_PLAYER_SLOTS
|
||||||
|
|
||||||
#define SELECTED_CHAR_ARROW_X 1 //8
|
|
||||||
|
|
||||||
#define SIZE_OF_UPDATE_BOX 20
|
#define SIZE_OF_UPDATE_BOX 20
|
||||||
|
|
||||||
// as deep as the map goes
|
// as deep as the map goes
|
||||||
@@ -849,7 +847,7 @@ INT16 GetRefreshHeightForMercList( void )
|
|||||||
INT16 yHeight = ( INT16 )( ( ( giMAXIMUM_NUMBER_OF_PLAYER_SLOTS + 1 ) * ( Y_SIZE + 2 ) ) + 1 );
|
INT16 yHeight = ( INT16 )( ( ( giMAXIMUM_NUMBER_OF_PLAYER_SLOTS + 1 ) * ( Y_SIZE + 2 ) ) + 1 );
|
||||||
|
|
||||||
// WANNE: Get maximum refresh height depending on the resolution!
|
// WANNE: Get maximum refresh height depending on the resolution!
|
||||||
if (iResolution == 0)
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
{
|
{
|
||||||
if (!is_networked)
|
if (!is_networked)
|
||||||
{
|
{
|
||||||
@@ -861,9 +859,8 @@ INT16 GetRefreshHeightForMercList( void )
|
|||||||
if (yHeight > 131)
|
if (yHeight > 131)
|
||||||
yHeight = 131;
|
yHeight = 131;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (iResolution == 1)
|
else if (iResolution < _1024x768)
|
||||||
{
|
{
|
||||||
if (!is_networked)
|
if (!is_networked)
|
||||||
{
|
{
|
||||||
@@ -876,7 +873,7 @@ INT16 GetRefreshHeightForMercList( void )
|
|||||||
yHeight = 249;
|
yHeight = 249;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (iResolution == 2)
|
else
|
||||||
{
|
{
|
||||||
if (!is_networked)
|
if (!is_networked)
|
||||||
{
|
{
|
||||||
@@ -927,7 +924,7 @@ void RestoreBackgroundForAssignmentGlowRegionList( void )
|
|||||||
INT16 yHeight = GetRefreshHeightForMercList();
|
INT16 yHeight = GetRefreshHeightForMercList();
|
||||||
|
|
||||||
// restore background
|
// restore background
|
||||||
RestoreExternBackgroundRect( 66, Y_START - 1, 118 + 1 - 67, yHeight );
|
RestoreExternBackgroundRect( 66 + xResOffset, Y_START - 1, 118 + 1 - 67, yHeight );
|
||||||
|
|
||||||
// ARM: not good enough! must reblit the whole panel to erase glow chunk restored by help text disappearing!!!
|
// ARM: not good enough! must reblit the whole panel to erase glow chunk restored by help text disappearing!!!
|
||||||
fTeamPanelDirty = TRUE;
|
fTeamPanelDirty = TRUE;
|
||||||
@@ -957,7 +954,7 @@ void RestoreBackgroundForDestinationGlowRegionList( void )
|
|||||||
INT16 yHeight = GetRefreshHeightForMercList();
|
INT16 yHeight = GetRefreshHeightForMercList();
|
||||||
|
|
||||||
// restore background
|
// restore background
|
||||||
RestoreExternBackgroundRect( 182, Y_START - 1, 217 + 1 - 182, yHeight );
|
RestoreExternBackgroundRect( 182 + xResOffset, Y_START - 1, 217 + 1 - 182, yHeight );
|
||||||
|
|
||||||
// ARM: not good enough! must reblit the whole panel to erase glow chunk restored by help text disappearing!!!
|
// ARM: not good enough! must reblit the whole panel to erase glow chunk restored by help text disappearing!!!
|
||||||
fTeamPanelDirty = TRUE;
|
fTeamPanelDirty = TRUE;
|
||||||
@@ -987,7 +984,7 @@ void RestoreBackgroundForContractGlowRegionList( void )
|
|||||||
INT16 yHeight = GetRefreshHeightForMercList();
|
INT16 yHeight = GetRefreshHeightForMercList();
|
||||||
|
|
||||||
// restore background
|
// restore background
|
||||||
RestoreExternBackgroundRect( 222, Y_START - 1, 250 + 1 - 222, yHeight ) ;
|
RestoreExternBackgroundRect( 222 + xResOffset, Y_START - 1, 250 + 1 - 222, yHeight ) ;
|
||||||
|
|
||||||
// ARM: not good enough! must reblit the whole panel to erase glow chunk restored by help text disappearing!!!
|
// ARM: not good enough! must reblit the whole panel to erase glow chunk restored by help text disappearing!!!
|
||||||
fTeamPanelDirty = TRUE;
|
fTeamPanelDirty = TRUE;
|
||||||
@@ -1021,7 +1018,7 @@ void RestoreBackgroundForSleepGlowRegionList( void )
|
|||||||
INT16 yHeight = GetRefreshHeightForMercList();
|
INT16 yHeight = GetRefreshHeightForMercList();
|
||||||
|
|
||||||
// restore background
|
// restore background
|
||||||
RestoreExternBackgroundRect( 123, Y_START - 1, 142 + 1 - 123, yHeight ) ;
|
RestoreExternBackgroundRect( 123 + xResOffset, Y_START - 1, 142 + 1 - 123, yHeight ) ;
|
||||||
|
|
||||||
// ARM: not good enough! must reblit the whole panel to erase glow chunk restored by help text disappearing!!!
|
// ARM: not good enough! must reblit the whole panel to erase glow chunk restored by help text disappearing!!!
|
||||||
fTeamPanelDirty = TRUE;
|
fTeamPanelDirty = TRUE;
|
||||||
@@ -1279,7 +1276,7 @@ INT32 DoMapMessageBoxWithRect( UINT8 ubStyle, const STR16 zString, UINT32 uiExit
|
|||||||
|
|
||||||
INT32 DoMapMessageBox( UINT8 ubStyle, STR16 zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback )
|
INT32 DoMapMessageBox( UINT8 ubStyle, STR16 zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback )
|
||||||
{
|
{
|
||||||
SGPRect CenteringRect= {0, 0, SCREEN_WIDTH, INV_INTERFACE_START_Y };
|
SGPRect CenteringRect= {0 + xResOffset, 0, SCREEN_WIDTH - xResOffset, INV_INTERFACE_START_Y };
|
||||||
|
|
||||||
// reset the highlighted line
|
// reset the highlighted line
|
||||||
giHighLine = -1;
|
giHighLine = -1;
|
||||||
@@ -1411,6 +1408,8 @@ void HandleDisplayOfSelectedMercArrows( void )
|
|||||||
HVOBJECT hHandle;
|
HVOBJECT hHandle;
|
||||||
UINT8 ubCount = 0;
|
UINT8 ubCount = 0;
|
||||||
|
|
||||||
|
UINT16 selectedCharArrowX = xResOffset + 1;
|
||||||
|
|
||||||
// blit an arrow by the name of each merc in a selected list
|
// blit an arrow by the name of each merc in a selected list
|
||||||
if( bSelectedInfoChar == -1 )
|
if( bSelectedInfoChar == -1 )
|
||||||
{
|
{
|
||||||
@@ -1438,7 +1437,7 @@ void HandleDisplayOfSelectedMercArrows( void )
|
|||||||
sYPosition = Y_START+( ( bSelectedInfoChar - FIRSTmercTOdisplay ) * ( Y_SIZE + 2 ) ) - 1;
|
sYPosition = Y_START+( ( bSelectedInfoChar - FIRSTmercTOdisplay ) * ( Y_SIZE + 2 ) ) - 1;
|
||||||
|
|
||||||
GetVideoObject( &hHandle, guiSelectedCharArrow );
|
GetVideoObject( &hHandle, guiSelectedCharArrow );
|
||||||
BltVideoObject( guiSAVEBUFFER , hHandle, 0,SELECTED_CHAR_ARROW_X, sYPosition , VO_BLT_SRCTRANSPARENCY,NULL );
|
BltVideoObject( guiSAVEBUFFER , hHandle, 0,selectedCharArrowX, sYPosition , VO_BLT_SRCTRANSPARENCY,NULL );
|
||||||
|
|
||||||
// now run through the selected list of guys, an arrow for each
|
// now run through the selected list of guys, an arrow for each
|
||||||
|
|
||||||
@@ -1454,7 +1453,7 @@ void HandleDisplayOfSelectedMercArrows( void )
|
|||||||
sYPosition = Y_START+( ubCount * ( Y_SIZE + 2) ) - 1;
|
sYPosition = Y_START+( ubCount * ( Y_SIZE + 2) ) - 1;
|
||||||
|
|
||||||
GetVideoObject( &hHandle, guiSelectedCharArrow );
|
GetVideoObject( &hHandle, guiSelectedCharArrow );
|
||||||
BltVideoObject( guiSAVEBUFFER , hHandle, 0,SELECTED_CHAR_ARROW_X, sYPosition , VO_BLT_SRCTRANSPARENCY,NULL );
|
BltVideoObject( guiSAVEBUFFER , hHandle, 0,selectedCharArrowX, sYPosition , VO_BLT_SRCTRANSPARENCY,NULL );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1915,177 +1914,17 @@ void SetUpMercAboutToLeaveEquipment( UINT32 ubProfileId, UINT32 uiSlotIndex )
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
BOOLEAN RemoveItemFromLeaveIndex( MERC_LEAVE_ITEM *pItem, UINT32 uiSlotIndex )
|
|
||||||
{
|
|
||||||
MERC_LEAVE_ITEM *pCurrentItem = NULL;
|
|
||||||
|
|
||||||
Assert( uiSlotIndex < NUM_LEAVE_LIST_SLOTS );
|
|
||||||
|
|
||||||
if( pItem == NULL )
|
|
||||||
{
|
|
||||||
return( FALSE );
|
|
||||||
}
|
|
||||||
|
|
||||||
// item is head of list?
|
|
||||||
//ARM: THIS DOESN'T MAKE SENSE, pCurrentItem is always NULL at this stage!
|
|
||||||
if( pItem == pCurrentItem )
|
|
||||||
{
|
|
||||||
gpLeaveListHead[ uiSlotIndex ] = pCurrentItem->pNext;
|
|
||||||
MemFree( pItem );
|
|
||||||
pItem = NULL;
|
|
||||||
return( TRUE );
|
|
||||||
}
|
|
||||||
|
|
||||||
// in the body
|
|
||||||
while( ( pCurrentItem->pNext != pItem ) && ( pCurrentItem->pNext != NULL ) )
|
|
||||||
{
|
|
||||||
pCurrentItem = pCurrentItem->pNext;
|
|
||||||
}
|
|
||||||
|
|
||||||
// item not found
|
|
||||||
if( pCurrentItem->pNext == NULL )
|
|
||||||
{
|
|
||||||
return( FALSE );
|
|
||||||
}
|
|
||||||
|
|
||||||
// set to next after next
|
|
||||||
pCurrentItem->pNext = pCurrentItem->pNext->pNext;
|
|
||||||
|
|
||||||
// free space and null ptr
|
|
||||||
MemFree( pItem );
|
|
||||||
pItem = NULL;
|
|
||||||
|
|
||||||
return( TRUE );
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void HandleGroupAboutToArrive( void )
|
void HandleGroupAboutToArrive( void )
|
||||||
{
|
{
|
||||||
// reblit map to change the color of the "people in motion" marker
|
// reblit map to change the color of the "people in motion" marker
|
||||||
fMapPanelDirty = TRUE;
|
fMapPanelDirty = TRUE;
|
||||||
|
|
||||||
// ARM - commented out - don't see why this is needed
|
|
||||||
// fTeamPanelDirty = TRUE;
|
|
||||||
// fCharacterInfoPanelDirty = TRUE;
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
void HandleMapScreenUpArrow( void )
|
|
||||||
{
|
|
||||||
INT32 iValue = 0;
|
|
||||||
INT32 iHighLine = 0;
|
|
||||||
|
|
||||||
// check state and update
|
|
||||||
if( fShowAssignmentMenu == TRUE )
|
|
||||||
{
|
|
||||||
if( GetBoxShadeFlag( ghAssignmentBox, iValue ) == FALSE )
|
|
||||||
{
|
|
||||||
if( iHighLine == 0)
|
|
||||||
{
|
|
||||||
iHighLine = ( INT32 )GetNumberOfLinesOfTextInBox( ghAssignmentBox );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
iHighLine++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if( ( giHighLine == 0 ) || ( giHighLine == -1 ) )
|
|
||||||
{
|
|
||||||
giHighLine = GetNumberOfCharactersOnPlayersTeam( ) - 1;
|
|
||||||
fTeamPanelDirty = TRUE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
giHighLine--;
|
|
||||||
fTeamPanelDirty = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void HandleMapScreenDownArrow( void )
|
|
||||||
{
|
|
||||||
INT32 iValue = 0;
|
|
||||||
INT32 iHighLine = 0;
|
|
||||||
|
|
||||||
// check state and update
|
|
||||||
if( fShowContractMenu == TRUE )
|
|
||||||
{
|
|
||||||
if( iHighLine == ( INT32 )GetNumberOfLinesOfTextInBox( ghContractBox ) - 1 )
|
|
||||||
{
|
|
||||||
iHighLine = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
iHighLine++;
|
|
||||||
}
|
|
||||||
|
|
||||||
HighLightBoxLine( ghContractBox, iHighLine );
|
|
||||||
}
|
|
||||||
else if( fShowAssignmentMenu == TRUE )
|
|
||||||
{
|
|
||||||
if( GetBoxShadeFlag( ghAssignmentBox, iValue ) == FALSE )
|
|
||||||
{
|
|
||||||
if( iHighLine == ( INT32 )GetNumberOfLinesOfTextInBox( ghAssignmentBox ) - 1 )
|
|
||||||
{
|
|
||||||
iHighLine = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
iHighLine--;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if( ( giHighLine == GetNumberOfCharactersOnPlayersTeam( ) - 1 ) || ( giHighLine == -1 ) )
|
|
||||||
{
|
|
||||||
giHighLine = 0;
|
|
||||||
fTeamPanelDirty = TRUE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
giHighLine++;
|
|
||||||
fTeamPanelDirty = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
INT32 GetNumberOfCharactersOnPlayersTeam( void )
|
|
||||||
{
|
|
||||||
INT32 iNumberOfPeople = 0, iCounter = 0;
|
|
||||||
|
|
||||||
for(iCounter = 0; iCounter < CODE_MAXIMUM_NUMBER_OF_PLAYER_SLOTS; iCounter++ )
|
|
||||||
{
|
|
||||||
if( gCharactersList[ iCounter ].fValid == TRUE )
|
|
||||||
{
|
|
||||||
iNumberOfPeople++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return( iNumberOfPeople );
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
void CreateMapStatusBarsRegion( void )
|
void CreateMapStatusBarsRegion( void )
|
||||||
{
|
{
|
||||||
|
MSYS_DefineRegion( &gMapStatusBarsRegion, BAR_INFO_X + xResOffset - 3, BAR_INFO_Y - 42,(INT16)( BAR_INFO_X + xResOffset + 17), (INT16)(BAR_INFO_Y ), MSYS_PRIORITY_HIGH + 5,
|
||||||
// create the status region over the bSelectedCharacter info region, to get quick rundown of merc's status
|
|
||||||
MSYS_DefineRegion( &gMapStatusBarsRegion, BAR_INFO_X - 3, BAR_INFO_Y - 42,(INT16)( BAR_INFO_X + 17), (INT16)(BAR_INFO_Y ), MSYS_PRIORITY_HIGH + 5,
|
|
||||||
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, MSYS_NO_CALLBACK );
|
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, MSYS_NO_CALLBACK );
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -2094,7 +1933,6 @@ void CreateMapStatusBarsRegion( void )
|
|||||||
|
|
||||||
void RemoveMapStatusBarsRegion( void )
|
void RemoveMapStatusBarsRegion( void )
|
||||||
{
|
{
|
||||||
|
|
||||||
// remove the bSelectedInfoCharacter helath, breath and morale bars info region
|
// remove the bSelectedInfoCharacter helath, breath and morale bars info region
|
||||||
MSYS_RemoveRegion( &gMapStatusBarsRegion );
|
MSYS_RemoveRegion( &gMapStatusBarsRegion );
|
||||||
|
|
||||||
@@ -2107,7 +1945,6 @@ void UpdateCharRegionHelpText( void )
|
|||||||
CHAR16 pMoraleStr[ 128 ];
|
CHAR16 pMoraleStr[ 128 ];
|
||||||
SOLDIERTYPE *pSoldier = NULL;
|
SOLDIERTYPE *pSoldier = NULL;
|
||||||
|
|
||||||
|
|
||||||
if( ( bSelectedInfoChar != -1 ) && ( gCharactersList[ bSelectedInfoChar ].fValid == TRUE ) )
|
if( ( bSelectedInfoChar != -1 ) && ( gCharactersList[ bSelectedInfoChar ].fValid == TRUE ) )
|
||||||
{
|
{
|
||||||
// valid soldier selected
|
// valid soldier selected
|
||||||
@@ -4966,6 +4803,27 @@ void AddSoldierToUpdateBox( SOLDIERTYPE *pSoldier )
|
|||||||
// add to box
|
// add to box
|
||||||
pUpdateSoldierBox[ iCounter ] = pSoldier;
|
pUpdateSoldierBox[ iCounter ] = pSoldier;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if ( ( gMercProfiles[ pSoldier->ubProfile ].ubFaceIndex < 100 ) && ( gProfilesIMP[ pSoldier->ubProfile ].ProfilId == pSoldier->ubProfile ) )
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "IMPFaces\\65Face\\%02d.sti", gMercProfiles[ pSoldier->ubProfile ].ubFaceIndex );
|
||||||
|
}
|
||||||
|
else if ( ( gMercProfiles[ pSoldier->ubProfile ].ubFaceIndex > 99 ) && ( gProfilesIMP[ pSoldier->ubProfile ].ProfilId == pSoldier->ubProfile ) )
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "IMPFaces\\65Face\\%03d.sti", gMercProfiles[ pSoldier->ubProfile ].ubFaceIndex );
|
||||||
|
}
|
||||||
|
else if( gMercProfiles[ pSoldier->ubProfile ].ubFaceIndex < 100 )
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\%02d.sti", gMercProfiles[ pSoldier->ubProfile ].ubFaceIndex );
|
||||||
|
}
|
||||||
|
else if( gMercProfiles[ pSoldier->ubProfile ].ubFaceIndex > 99 )
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\%03d.sti", gMercProfiles[ pSoldier->ubProfile ].ubFaceIndex );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
if( gMercProfiles[ pSoldier->ubProfile ].ubFaceIndex < 100 )
|
if( gMercProfiles[ pSoldier->ubProfile ].ubFaceIndex < 100 )
|
||||||
{
|
{
|
||||||
// grab filename of face
|
// grab filename of face
|
||||||
@@ -4976,7 +4834,7 @@ void AddSoldierToUpdateBox( SOLDIERTYPE *pSoldier )
|
|||||||
// grab filename of face
|
// grab filename of face
|
||||||
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\%03d.sti", gMercProfiles[ pSoldier->ubProfile ].ubFaceIndex );
|
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\%03d.sti", gMercProfiles[ pSoldier->ubProfile ].ubFaceIndex );
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
// load the face
|
// load the face
|
||||||
AddVideoObject( &VObjectDesc, (UINT32 *)&giUpdateSoldierFaces[ iCounter ] );
|
AddVideoObject( &VObjectDesc, (UINT32 *)&giUpdateSoldierFaces[ iCounter ] );
|
||||||
|
|
||||||
@@ -5672,13 +5530,13 @@ void CreateDestroyInsuranceMouseRegionForMercs( BOOLEAN fCreate )
|
|||||||
|
|
||||||
if( ( fCreated == FALSE ) && ( fCreate == TRUE ) )
|
if( ( fCreated == FALSE ) && ( fCreate == TRUE ) )
|
||||||
{
|
{
|
||||||
MSYS_DefineRegion( &gContractIconRegion, CHAR_ICON_X, CHAR_ICON_CONTRACT_Y, CHAR_ICON_X + CHAR_ICON_WIDTH, CHAR_ICON_CONTRACT_Y + CHAR_ICON_HEIGHT,
|
MSYS_DefineRegion( &gContractIconRegion, CHAR_ICON_X + xResOffset, CHAR_ICON_CONTRACT_Y, CHAR_ICON_X + xResOffset + CHAR_ICON_WIDTH, CHAR_ICON_CONTRACT_Y + CHAR_ICON_HEIGHT,
|
||||||
MSYS_PRIORITY_HIGH - 1, MSYS_NO_CURSOR, MSYS_NO_CALLBACK, MSYS_NO_CALLBACK );
|
MSYS_PRIORITY_HIGH - 1, MSYS_NO_CURSOR, MSYS_NO_CALLBACK, MSYS_NO_CALLBACK );
|
||||||
|
|
||||||
MSYS_DefineRegion( &gInsuranceIconRegion, CHAR_ICON_X, CHAR_ICON_CONTRACT_Y + CHAR_ICON_SPACING, CHAR_ICON_X + CHAR_ICON_WIDTH, CHAR_ICON_CONTRACT_Y + CHAR_ICON_SPACING + CHAR_ICON_HEIGHT,
|
MSYS_DefineRegion( &gInsuranceIconRegion, CHAR_ICON_X + xResOffset, CHAR_ICON_CONTRACT_Y + CHAR_ICON_SPACING, CHAR_ICON_X + xResOffset + CHAR_ICON_WIDTH, CHAR_ICON_CONTRACT_Y + CHAR_ICON_SPACING + CHAR_ICON_HEIGHT,
|
||||||
MSYS_PRIORITY_HIGH - 1, MSYS_NO_CURSOR, MSYS_NO_CALLBACK, MSYS_NO_CALLBACK );
|
MSYS_PRIORITY_HIGH - 1, MSYS_NO_CURSOR, MSYS_NO_CALLBACK, MSYS_NO_CALLBACK );
|
||||||
|
|
||||||
MSYS_DefineRegion( &gDepositIconRegion, CHAR_ICON_X, CHAR_ICON_CONTRACT_Y + ( 2 * CHAR_ICON_SPACING ), CHAR_ICON_X + CHAR_ICON_WIDTH, CHAR_ICON_CONTRACT_Y + ( 2 * CHAR_ICON_SPACING ) + CHAR_ICON_HEIGHT,
|
MSYS_DefineRegion( &gDepositIconRegion, CHAR_ICON_X + xResOffset, CHAR_ICON_CONTRACT_Y + ( 2 * CHAR_ICON_SPACING ), CHAR_ICON_X + xResOffset + CHAR_ICON_WIDTH, CHAR_ICON_CONTRACT_Y + ( 2 * CHAR_ICON_SPACING ) + CHAR_ICON_HEIGHT,
|
||||||
MSYS_PRIORITY_HIGH - 1, MSYS_NO_CURSOR, MSYS_NO_CALLBACK, MSYS_NO_CALLBACK );
|
MSYS_PRIORITY_HIGH - 1, MSYS_NO_CURSOR, MSYS_NO_CALLBACK, MSYS_NO_CALLBACK );
|
||||||
|
|
||||||
fCreated = TRUE;
|
fCreated = TRUE;
|
||||||
@@ -5692,57 +5550,6 @@ void CreateDestroyInsuranceMouseRegionForMercs( BOOLEAN fCreate )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
void HandlePlayerEnteringMapScreenBeforeGoingToTactical( void )
|
|
||||||
{
|
|
||||||
CHAR16 sString[ 256 ];
|
|
||||||
|
|
||||||
if( !( AnyMercsHired( ) ) )
|
|
||||||
{
|
|
||||||
// no mercs hired inform player they must hire mercs
|
|
||||||
swprintf( sString, pMapScreenJustStartedHelpText[ 0 ] );
|
|
||||||
DoMapMessageBox( MSG_BOX_BASIC_STYLE, sString, MAP_SCREEN, MSG_BOX_FLAG_OK, DoneHandlePlayerFirstEntryToMapScreen );
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// player has mercs hired, tell them to time compress to get things underway
|
|
||||||
swprintf( sString, pMapScreenJustStartedHelpText[ 1 ] );
|
|
||||||
fShowMapScreenHelpText = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// now inform the player
|
|
||||||
|
|
||||||
if( fShowMapScreenHelpText )
|
|
||||||
{
|
|
||||||
fShowMapScreenHelpText = FALSE;
|
|
||||||
SetUpShutDownMapScreenHelpTextScreenMask( );
|
|
||||||
fShowMapScreenHelpText = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void DoneHandlePlayerFirstEntryToMapScreen( UINT8 bExitValue )
|
|
||||||
{
|
|
||||||
static BOOLEAN fFirstTime = TRUE;
|
|
||||||
|
|
||||||
if( bExitValue == MSG_BOX_RETURN_OK )
|
|
||||||
{
|
|
||||||
if( fFirstTime == TRUE )
|
|
||||||
{
|
|
||||||
fFirstTime = FALSE;
|
|
||||||
fShowMapScreenHelpText = TRUE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
BOOLEAN HandleTimeCompressWithTeamJackedInAndGearedToGo( void )
|
BOOLEAN HandleTimeCompressWithTeamJackedInAndGearedToGo( void )
|
||||||
{
|
{
|
||||||
// check a team is ready to go
|
// check a team is ready to go
|
||||||
|
|||||||
@@ -1103,7 +1103,7 @@ void NotifyPlayerOfMercDepartureAndPromptEquipmentPlacement( SOLDIERTYPE *pSoldi
|
|||||||
CHAR16 zShortTownIDString[ 50 ];
|
CHAR16 zShortTownIDString[ 50 ];
|
||||||
|
|
||||||
// use YES/NO Pop up box, settup for particular screen
|
// use YES/NO Pop up box, settup for particular screen
|
||||||
SGPRect pCenteringRect= {0, 0, 640, 480};
|
SGPRect pCenteringRect= {0 + xResOffset, 0, SCREEN_WIDTH - xResOffset, SCREEN_HEIGHT};
|
||||||
|
|
||||||
//GetSectorIDString( pSoldier->sSectorX, pSoldier->sSectorY, pSoldier->bSectorZ, zTownIDString, TRUE );
|
//GetSectorIDString( pSoldier->sSectorX, pSoldier->sSectorY, pSoldier->bSectorZ, zTownIDString, TRUE );
|
||||||
|
|
||||||
|
|||||||
@@ -80,6 +80,8 @@ BOOLEAN gfEnterAutoResolveMode = FALSE;
|
|||||||
BOOLEAN gfEnteringMapScreenToEnterPreBattleInterface = FALSE;
|
BOOLEAN gfEnteringMapScreenToEnterPreBattleInterface = FALSE;
|
||||||
BOOLEAN gfIgnoreAllInput = TRUE;
|
BOOLEAN gfIgnoreAllInput = TRUE;
|
||||||
|
|
||||||
|
BOOLEAN gfZoomDone = FALSE;
|
||||||
|
|
||||||
enum //GraphicIDs for the panel
|
enum //GraphicIDs for the panel
|
||||||
{
|
{
|
||||||
MAINPANEL,
|
MAINPANEL,
|
||||||
@@ -441,7 +443,7 @@ void InitPreBattleInterface( GROUP *pBattleGroup, BOOLEAN fPersistantPBI )
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Define the blanket region to cover all of the other regions used underneath the panel.
|
//Define the blanket region to cover all of the other regions used underneath the panel.
|
||||||
MSYS_DefineRegion( &PBInterfaceBlanket, 0, 0, 261, 359, MSYS_PRIORITY_HIGHEST - 5, 0, 0, 0 );
|
MSYS_DefineRegion( &PBInterfaceBlanket, 0 + xResOffset, 0, 261 + xResOffset, 359, MSYS_PRIORITY_HIGHEST - 5, 0, 0, 0 );
|
||||||
|
|
||||||
//Create the panel
|
//Create the panel
|
||||||
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
||||||
@@ -455,9 +457,9 @@ void InitPreBattleInterface( GROUP *pBattleGroup, BOOLEAN fPersistantPBI )
|
|||||||
AssertMsg( 0, "Failed to load interface\\PreBattleButton.sti" );
|
AssertMsg( 0, "Failed to load interface\\PreBattleButton.sti" );
|
||||||
iPBButtonImage[1] = UseLoadedButtonImage( iPBButtonImage[ 0 ], -1, 0, -1, 1, -1 );
|
iPBButtonImage[1] = UseLoadedButtonImage( iPBButtonImage[ 0 ], -1, 0, -1, 1, -1 );
|
||||||
iPBButtonImage[2] = UseLoadedButtonImage( iPBButtonImage[ 0 ], -1, 0, -1, 1, -1 );
|
iPBButtonImage[2] = UseLoadedButtonImage( iPBButtonImage[ 0 ], -1, 0, -1, 1, -1 );
|
||||||
iPBButton[0] = QuickCreateButton( iPBButtonImage[0], 27, 54, BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGHEST - 2, DEFAULT_MOVE_CALLBACK, AutoResolveBattleCallback );
|
iPBButton[0] = QuickCreateButton( iPBButtonImage[0], 27 + xResOffset, 54, BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGHEST - 2, DEFAULT_MOVE_CALLBACK, AutoResolveBattleCallback );
|
||||||
iPBButton[1] = QuickCreateButton( iPBButtonImage[1], 98, 54, BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGHEST - 2, DEFAULT_MOVE_CALLBACK, GoToSectorCallback );
|
iPBButton[1] = QuickCreateButton( iPBButtonImage[1], 98 + xResOffset, 54, BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGHEST - 2, DEFAULT_MOVE_CALLBACK, GoToSectorCallback );
|
||||||
iPBButton[2] = QuickCreateButton( iPBButtonImage[2], 169, 54, BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGHEST - 2, DEFAULT_MOVE_CALLBACK, RetreatMercsCallback );
|
iPBButton[2] = QuickCreateButton( iPBButtonImage[2], 169 + xResOffset, 54, BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGHEST - 2, DEFAULT_MOVE_CALLBACK, RetreatMercsCallback );
|
||||||
|
|
||||||
SpecifyGeneralButtonTextAttributes( iPBButton[0], gpStrategicString[ STR_PB_AUTORESOLVE_BTN ], BLOCKFONT, FONT_BEIGE, 141 );
|
SpecifyGeneralButtonTextAttributes( iPBButton[0], gpStrategicString[ STR_PB_AUTORESOLVE_BTN ], BLOCKFONT, FONT_BEIGE, 141 );
|
||||||
SpecifyGeneralButtonTextAttributes( iPBButton[1], gpStrategicString[ STR_PB_GOTOSECTOR_BTN ], BLOCKFONT, FONT_BEIGE, 141 );
|
SpecifyGeneralButtonTextAttributes( iPBButton[1], gpStrategicString[ STR_PB_GOTOSECTOR_BTN ], BLOCKFONT, FONT_BEIGE, 141 );
|
||||||
@@ -874,6 +876,8 @@ void InitPreBattleInterface( GROUP *pBattleGroup, BOOLEAN fPersistantPBI )
|
|||||||
|
|
||||||
void DoTransitionFromMapscreenToPreBattleInterface()
|
void DoTransitionFromMapscreenToPreBattleInterface()
|
||||||
{
|
{
|
||||||
|
gfZoomDone = FALSE;
|
||||||
|
|
||||||
SGPRect DstRect, PBIRect;
|
SGPRect DstRect, PBIRect;
|
||||||
UINT32 uiStartTime, uiCurrTime;
|
UINT32 uiStartTime, uiCurrTime;
|
||||||
INT32 iPercentage, iFactor;
|
INT32 iPercentage, iFactor;
|
||||||
@@ -887,9 +891,9 @@ void DoTransitionFromMapscreenToPreBattleInterface()
|
|||||||
|
|
||||||
PauseTime( FALSE );
|
PauseTime( FALSE );
|
||||||
|
|
||||||
PBIRect.iLeft = 0;
|
PBIRect.iLeft = 0 + xResOffset;
|
||||||
PBIRect.iTop = 0;
|
PBIRect.iTop = 0;
|
||||||
PBIRect.iRight = 261;
|
PBIRect.iRight = 261 + xResOffset;
|
||||||
PBIRect.iBottom = 359;
|
PBIRect.iBottom = 359;
|
||||||
iWidth = 261;
|
iWidth = 261;
|
||||||
iHeight = 359;
|
iHeight = 359;
|
||||||
@@ -901,7 +905,7 @@ void DoTransitionFromMapscreenToPreBattleInterface()
|
|||||||
GetScreenXYFromMapXY( gubPBSectorX, gubPBSectorY, &sStartLeft, &sStartTop );
|
GetScreenXYFromMapXY( gubPBSectorX, gubPBSectorY, &sStartLeft, &sStartTop );
|
||||||
sStartLeft += MAP_GRID_X / 2;
|
sStartLeft += MAP_GRID_X / 2;
|
||||||
sStartTop += MAP_GRID_Y / 2;
|
sStartTop += MAP_GRID_Y / 2;
|
||||||
sEndLeft = 131;
|
sEndLeft = 131 + xResOffset;
|
||||||
sEndTop = 180;
|
sEndTop = 180;
|
||||||
|
|
||||||
//save the mapscreen buffer
|
//save the mapscreen buffer
|
||||||
@@ -924,13 +928,13 @@ void DoTransitionFromMapscreenToPreBattleInterface()
|
|||||||
gfEnterAutoResolveMode = TRUE;
|
gfEnterAutoResolveMode = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
BlitBufferToBuffer( guiSAVEBUFFER, FRAME_BUFFER, 27, 54, 209, 32 );
|
BlitBufferToBuffer( guiSAVEBUFFER, FRAME_BUFFER, 27 + xResOffset, 54, 209, 32 );
|
||||||
RenderButtons();
|
RenderButtons();
|
||||||
BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, 27, 54, 209, 32 );
|
BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, 27 + xResOffset, 54, 209, 32 );
|
||||||
gfRenderPBInterface = TRUE;
|
gfRenderPBInterface = TRUE;
|
||||||
|
|
||||||
//hide the prebattle interface
|
//hide the prebattle interface
|
||||||
BlitBufferToBuffer( guiEXTRABUFFER, FRAME_BUFFER, 0, 0, 261, 359 );
|
BlitBufferToBuffer( guiEXTRABUFFER, FRAME_BUFFER, 0 + xResOffset, 0, 261 + xResOffset, 359 );
|
||||||
PlayJA2SampleFromFile( "SOUNDS\\Laptop power up (8-11).wav", RATE_11025, HIGHVOLUME, 1, MIDDLEPAN );
|
PlayJA2SampleFromFile( "SOUNDS\\Laptop power up (8-11).wav", RATE_11025, HIGHVOLUME, 1, MIDDLEPAN );
|
||||||
InvalidateScreen();
|
InvalidateScreen();
|
||||||
RefreshScreen( NULL );
|
RefreshScreen( NULL );
|
||||||
@@ -970,6 +974,8 @@ void DoTransitionFromMapscreenToPreBattleInterface()
|
|||||||
(UINT16)(DstRect.iRight-DstRect.iLeft+1), (UINT16)(DstRect.iBottom-DstRect.iTop+1) );
|
(UINT16)(DstRect.iRight-DstRect.iLeft+1), (UINT16)(DstRect.iBottom-DstRect.iTop+1) );
|
||||||
}
|
}
|
||||||
BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
|
BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
|
||||||
|
|
||||||
|
gfZoomDone = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void KillPreBattleInterface()
|
void KillPreBattleInterface()
|
||||||
@@ -1011,7 +1017,7 @@ void KillPreBattleInterface()
|
|||||||
//Enable the options button when the auto resolve screen comes up
|
//Enable the options button when the auto resolve screen comes up
|
||||||
EnableDisAbleMapScreenOptionsButton( TRUE );
|
EnableDisAbleMapScreenOptionsButton( TRUE );
|
||||||
|
|
||||||
ColorFillVideoSurfaceArea( guiSAVEBUFFER, 0, 0, 261, 359, 0 );
|
ColorFillVideoSurfaceArea( guiSAVEBUFFER, 0, 0, 261 + xResOffset, 359, 0 );
|
||||||
|
|
||||||
EnableTeamInfoPanels();
|
EnableTeamInfoPanels();
|
||||||
if( ButtonList[ giMapContractButton ] )
|
if( ButtonList[ giMapContractButton ] )
|
||||||
@@ -1084,8 +1090,8 @@ void RenderPBHeader( INT32 *piX, INT32 *piWidth)
|
|||||||
}
|
}
|
||||||
width = StringPixLength( str, FONT10ARIALBOLD );
|
width = StringPixLength( str, FONT10ARIALBOLD );
|
||||||
x = 130 - width / 2;
|
x = 130 - width / 2;
|
||||||
mprintf( x, 4, str );
|
mprintf( x + xResOffset, 4, str );
|
||||||
InvalidateRegion( 0, 0, 231, 12 );
|
InvalidateRegion( 0, 0, 231 + xResOffset, 12 );
|
||||||
*piX = x;
|
*piX = x;
|
||||||
*piWidth = width;
|
*piWidth = width;
|
||||||
}
|
}
|
||||||
@@ -1102,6 +1108,9 @@ void RenderPreBattleInterface()
|
|||||||
UINT8 ubJunk;
|
UINT8 ubJunk;
|
||||||
//PLAYERGROUP *pPlayer;
|
//PLAYERGROUP *pPlayer;
|
||||||
|
|
||||||
|
// Make the background black!
|
||||||
|
//ColorFillVideoSurfaceArea( guiSAVEBUFFER, 0, 0, 261 + xResOffset, SCREEN_HEIGHT - 120, 0 );
|
||||||
|
|
||||||
//This code determines if the cursor is inside the rectangle consisting of the
|
//This code determines if the cursor is inside the rectangle consisting of the
|
||||||
//retreat button. If it is inside, then we set up the variables so that the retreat
|
//retreat button. If it is inside, then we set up the variables so that the retreat
|
||||||
//arrows get drawn in the mapscreen.
|
//arrows get drawn in the mapscreen.
|
||||||
@@ -1141,22 +1150,22 @@ void RenderPreBattleInterface()
|
|||||||
gfRenderPBInterface = FALSE;
|
gfRenderPBInterface = FALSE;
|
||||||
GetVideoObject( &hVObject, uiInterfaceImages );
|
GetVideoObject( &hVObject, uiInterfaceImages );
|
||||||
//main panel
|
//main panel
|
||||||
BltVideoObject( guiSAVEBUFFER, hVObject, MAINPANEL, 0, 0, VO_BLT_SRCTRANSPARENCY, NULL );
|
BltVideoObject( guiSAVEBUFFER, hVObject, MAINPANEL, xResOffset, 0, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||||
//main title
|
//main title
|
||||||
|
|
||||||
RenderPBHeader( &x, &width );
|
RenderPBHeader( &x, &width );
|
||||||
//now draw the title bars up to the text.
|
//now draw the title bars up to the text.
|
||||||
for( i = x - 12; i > 20; i -= 10 )
|
for( i = x - 12; i > 20; i -= 10 )
|
||||||
{
|
{
|
||||||
BltVideoObject( guiSAVEBUFFER, hVObject, TITLE_BAR_PIECE, i, 6, VO_BLT_SRCTRANSPARENCY, NULL );
|
BltVideoObject( guiSAVEBUFFER, hVObject, TITLE_BAR_PIECE, i + xResOffset, 6, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||||
}
|
}
|
||||||
for( i = x + width + 2; i < 231; i += 10 )
|
for( i = x + width + 2; i < 231; i += 10 )
|
||||||
{
|
{
|
||||||
BltVideoObject( guiSAVEBUFFER, hVObject, TITLE_BAR_PIECE, i, 6, VO_BLT_SRCTRANSPARENCY, NULL );
|
BltVideoObject( guiSAVEBUFFER, hVObject, TITLE_BAR_PIECE, i + xResOffset, 6, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
y = BOTTOM_Y - ACTUAL_HEIGHT - ROW_HEIGHT * max( guiNumUninvolved, 1 );
|
y = BOTTOM_Y - ACTUAL_HEIGHT - ROW_HEIGHT * max( guiNumUninvolved, 1 );
|
||||||
BltVideoObject( guiSAVEBUFFER, hVObject, UNINVOLVED_HEADER, 8, y, VO_BLT_SRCTRANSPARENCY, NULL );
|
BltVideoObject( guiSAVEBUFFER, hVObject, UNINVOLVED_HEADER, 8 + xResOffset, y, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||||
|
|
||||||
SetFont( BLOCKFONT );
|
SetFont( BLOCKFONT );
|
||||||
SetFontForeground( FONT_BEIGE );
|
SetFontForeground( FONT_BEIGE );
|
||||||
@@ -1167,7 +1176,7 @@ void RenderPreBattleInterface()
|
|||||||
SetFont( BLOCKFONTNARROW );
|
SetFont( BLOCKFONTNARROW );
|
||||||
width = StringPixLength( str, BLOCKFONTNARROW );
|
width = StringPixLength( str, BLOCKFONTNARROW );
|
||||||
}
|
}
|
||||||
mprintf( 65 - width , 17, str );
|
mprintf( 65 - width + xResOffset , 17, str );
|
||||||
|
|
||||||
SetFont( BLOCKFONT );
|
SetFont( BLOCKFONT );
|
||||||
if( gubEnemyEncounterCode != CREATURE_ATTACK_CODE )
|
if( gubEnemyEncounterCode != CREATURE_ATTACK_CODE )
|
||||||
@@ -1188,7 +1197,7 @@ void RenderPreBattleInterface()
|
|||||||
SetFont( BLOCKFONTNARROW );
|
SetFont( BLOCKFONTNARROW );
|
||||||
width = StringPixLength( str, BLOCKFONTNARROW );
|
width = StringPixLength( str, BLOCKFONTNARROW );
|
||||||
}
|
}
|
||||||
mprintf( 54 - width , 38, str );
|
mprintf( 54 + xResOffset - width , 38, str );
|
||||||
|
|
||||||
SetFont( BLOCKFONT );
|
SetFont( BLOCKFONT );
|
||||||
swprintf( str, gpStrategicString[ STR_PB_MERCS ] );
|
swprintf( str, gpStrategicString[ STR_PB_MERCS ] );
|
||||||
@@ -1198,7 +1207,7 @@ void RenderPreBattleInterface()
|
|||||||
SetFont( BLOCKFONTNARROW );
|
SetFont( BLOCKFONTNARROW );
|
||||||
width = StringPixLength( str, BLOCKFONTNARROW );
|
width = StringPixLength( str, BLOCKFONTNARROW );
|
||||||
}
|
}
|
||||||
mprintf( 139 - width , 38, str );
|
mprintf( 139 + xResOffset - width , 38, str );
|
||||||
|
|
||||||
SetFont( BLOCKFONT );
|
SetFont( BLOCKFONT );
|
||||||
swprintf( str, gpStrategicString[ STR_PB_MILITIA ] );
|
swprintf( str, gpStrategicString[ STR_PB_MILITIA ] );
|
||||||
@@ -1208,20 +1217,20 @@ void RenderPreBattleInterface()
|
|||||||
SetFont( BLOCKFONTNARROW );
|
SetFont( BLOCKFONTNARROW );
|
||||||
width = StringPixLength( str, BLOCKFONTNARROW );
|
width = StringPixLength( str, BLOCKFONTNARROW );
|
||||||
}
|
}
|
||||||
mprintf( 224 - width , 38, str );
|
mprintf( 224 + xResOffset - width , 38, str );
|
||||||
|
|
||||||
//Draw the bottom columns
|
//Draw the bottom columns
|
||||||
for( i = 0; i < (INT32)max( guiNumUninvolved, 1 ); i++ )
|
for( i = 0; i < (INT32)max( guiNumUninvolved, 1 ); i++ )
|
||||||
{
|
{
|
||||||
y = BOTTOM_Y - ROW_HEIGHT * (i+1) + 1;
|
y = BOTTOM_Y - ROW_HEIGHT * (i+1) + 1;
|
||||||
BltVideoObject( guiSAVEBUFFER, hVObject, BOTTOM_COLUMN, 161, y, VO_BLT_SRCTRANSPARENCY, NULL );
|
BltVideoObject( guiSAVEBUFFER, hVObject, BOTTOM_COLUMN, 161 + xResOffset, y, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
// WDS - make number of mercenaries, etc. be configurable
|
// WDS - make number of mercenaries, etc. be configurable
|
||||||
for( i = 0; i < (INT32)(/*21*/3+gGameExternalOptions.ubGameMaximumNumberOfPlayerMercs - max( guiNumUninvolved, 1 )); i++ )
|
for( i = 0; i < (INT32)(/*21*/3+gGameExternalOptions.ubGameMaximumNumberOfPlayerMercs - max( guiNumUninvolved, 1 )); i++ )
|
||||||
{
|
{
|
||||||
y = TOP_Y + ROW_HEIGHT * i;
|
y = TOP_Y + ROW_HEIGHT * i;
|
||||||
BltVideoObject( guiSAVEBUFFER, hVObject, TOP_COLUMN, 186, y, VO_BLT_SRCTRANSPARENCY, NULL );
|
BltVideoObject( guiSAVEBUFFER, hVObject, TOP_COLUMN, 186 + xResOffset, y, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
//location
|
//location
|
||||||
@@ -1230,7 +1239,7 @@ void RenderPreBattleInterface()
|
|||||||
SetFontShadow( FONT_NEARBLACK );
|
SetFontShadow( FONT_NEARBLACK );
|
||||||
|
|
||||||
GetSectorIDString( gubPBSectorX, gubPBSectorY, gubPBSectorZ, pSectorName, TRUE );
|
GetSectorIDString( gubPBSectorX, gubPBSectorY, gubPBSectorZ, pSectorName, TRUE );
|
||||||
mprintf( 70, 17, L"%s %s", gpStrategicString[ STR_PB_SECTOR ], pSectorName );
|
mprintf( 70 + xResOffset, 17, L"%s %s", gpStrategicString[ STR_PB_SECTOR ], pSectorName );
|
||||||
|
|
||||||
//enemy
|
//enemy
|
||||||
SetFont( FONT14ARIAL );
|
SetFont( FONT14ARIAL );
|
||||||
@@ -1252,15 +1261,15 @@ void RenderPreBattleInterface()
|
|||||||
}
|
}
|
||||||
x = 57 + (27 - StringPixLength( str, FONT14ARIAL )) / 2;
|
x = 57 + (27 - StringPixLength( str, FONT14ARIAL )) / 2;
|
||||||
y = 36;
|
y = 36;
|
||||||
mprintf( x, y, str );
|
mprintf( x + xResOffset, y, str );
|
||||||
//player
|
//player
|
||||||
swprintf( str, L"%d", guiNumInvolved );
|
swprintf( str, L"%d", guiNumInvolved );
|
||||||
x = 142 + (27 - StringPixLength( str, FONT14ARIAL )) / 2;
|
x = 142 + (27 - StringPixLength( str, FONT14ARIAL )) / 2;
|
||||||
mprintf( x, y, str );
|
mprintf( x + xResOffset, y, str );
|
||||||
//militia
|
//militia
|
||||||
swprintf( str, L"%d", CountAllMilitiaInSector( gubPBSectorX, gubPBSectorY ) );
|
swprintf( str, L"%d", CountAllMilitiaInSector( gubPBSectorX, gubPBSectorY ) );
|
||||||
x = 227 + (27 - StringPixLength( str, FONT14ARIAL )) / 2;
|
x = 227 + (27 - StringPixLength( str, FONT14ARIAL )) / 2;
|
||||||
mprintf( x, y, str );
|
mprintf( x + xResOffset, y, str );
|
||||||
SetFontShadow( FONT_NEARBLACK );
|
SetFontShadow( FONT_NEARBLACK );
|
||||||
|
|
||||||
SetFont( BLOCKFONT2 );
|
SetFont( BLOCKFONT2 );
|
||||||
@@ -1283,25 +1292,25 @@ void RenderPreBattleInterface()
|
|||||||
//NAME
|
//NAME
|
||||||
wcscpy( str, MercPtrs[ i ]->name );
|
wcscpy( str, MercPtrs[ i ]->name );
|
||||||
x = 17 + (52-StringPixLength( str, BLOCKFONT2)) / 2;
|
x = 17 + (52-StringPixLength( str, BLOCKFONT2)) / 2;
|
||||||
mprintf( x , y, str );
|
mprintf( x + xResOffset , y, str );
|
||||||
//ASSIGN
|
//ASSIGN
|
||||||
GetMapscreenMercAssignmentString( MercPtrs[ i ], str );
|
GetMapscreenMercAssignmentString( MercPtrs[ i ], str );
|
||||||
x = 72 + (54-StringPixLength( str, BLOCKFONT2)) / 2;
|
x = 72 + (54-StringPixLength( str, BLOCKFONT2)) / 2;
|
||||||
mprintf( x, y, str );
|
mprintf( x + xResOffset, y, str );
|
||||||
//COND
|
//COND
|
||||||
GetSoldierConditionInfo( MercPtrs[ i ], str, &ubHPPercent, &ubBPPercent );
|
GetSoldierConditionInfo( MercPtrs[ i ], str, &ubHPPercent, &ubBPPercent );
|
||||||
x = 129 + (58-StringPixLength( str, BLOCKFONT2)) / 2;
|
x = 129 + (58-StringPixLength( str, BLOCKFONT2)) / 2;
|
||||||
mprintf( x, y, str );
|
mprintf( x + xResOffset, y, str );
|
||||||
//HP
|
//HP
|
||||||
swprintf( str, L"%d%%", ubHPPercent );
|
swprintf( str, L"%d%%", ubHPPercent );
|
||||||
x = 189 + (25-StringPixLength( str, BLOCKFONT2)) / 2;
|
x = 189 + (25-StringPixLength( str, BLOCKFONT2)) / 2;
|
||||||
wcscat( str, L"%" );
|
wcscat( str, L"%" );
|
||||||
mprintf( x, y, str );
|
mprintf( x + xResOffset, y, str );
|
||||||
//BP
|
//BP
|
||||||
swprintf( str, L"%d%%", ubBPPercent );
|
swprintf( str, L"%d%%", ubBPPercent );
|
||||||
x = 217 + (25-StringPixLength( str, BLOCKFONT2)) / 2;
|
x = 217 + (25-StringPixLength( str, BLOCKFONT2)) / 2;
|
||||||
wcscat( str, L"%" );
|
wcscat( str, L"%" );
|
||||||
mprintf( x, y, str );
|
mprintf( x + xResOffset, y, str );
|
||||||
|
|
||||||
line++;
|
line++;
|
||||||
y += ROW_HEIGHT;
|
y += ROW_HEIGHT;
|
||||||
@@ -1317,7 +1326,7 @@ void RenderPreBattleInterface()
|
|||||||
wcscpy( str, gpStrategicString[ STR_PB_NONE ] );
|
wcscpy( str, gpStrategicString[ STR_PB_NONE ] );
|
||||||
x = 17 + (52-StringPixLength( str, BLOCKFONT2)) / 2;
|
x = 17 + (52-StringPixLength( str, BLOCKFONT2)) / 2;
|
||||||
y = BOTTOM_Y - ROW_HEIGHT + 2;
|
y = BOTTOM_Y - ROW_HEIGHT + 2;
|
||||||
mprintf( x, y, str );
|
mprintf( x + xResOffset, y, str );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1337,26 +1346,26 @@ void RenderPreBattleInterface()
|
|||||||
//NAME
|
//NAME
|
||||||
wcscpy( str, MercPtrs[ i ]->name );
|
wcscpy( str, MercPtrs[ i ]->name );
|
||||||
x = 17 + (52-StringPixLength( str, BLOCKFONT2)) / 2;
|
x = 17 + (52-StringPixLength( str, BLOCKFONT2)) / 2;
|
||||||
mprintf( x , y, str );
|
mprintf( x + xResOffset, y, str );
|
||||||
//ASSIGN
|
//ASSIGN
|
||||||
GetMapscreenMercAssignmentString( MercPtrs[ i ], str );
|
GetMapscreenMercAssignmentString( MercPtrs[ i ], str );
|
||||||
x = 72 + (54-StringPixLength( str, BLOCKFONT2)) / 2;
|
x = 72 + (54-StringPixLength( str, BLOCKFONT2)) / 2;
|
||||||
mprintf( x, y, str );
|
mprintf( x + xResOffset, y, str );
|
||||||
//LOC
|
//LOC
|
||||||
GetMapscreenMercLocationString( MercPtrs[ i ], str );
|
GetMapscreenMercLocationString( MercPtrs[ i ], str );
|
||||||
x = 128 + (33-StringPixLength( str, BLOCKFONT2)) / 2;
|
x = 128 + (33-StringPixLength( str, BLOCKFONT2)) / 2;
|
||||||
mprintf( x, y, str );
|
mprintf( x + xResOffset, y, str );
|
||||||
//DEST
|
//DEST
|
||||||
GetMapscreenMercDestinationString( MercPtrs[ i ], str );
|
GetMapscreenMercDestinationString( MercPtrs[ i ], str );
|
||||||
if( wcslen( str ) > 0 )
|
if( wcslen( str ) > 0 )
|
||||||
{
|
{
|
||||||
x = 164 + (41-StringPixLength( str, BLOCKFONT2)) / 2;
|
x = 164 + (41-StringPixLength( str, BLOCKFONT2)) / 2;
|
||||||
mprintf( x, y, str );
|
mprintf( x + xResOffset, y, str );
|
||||||
}
|
}
|
||||||
//DEP
|
//DEP
|
||||||
GetMapscreenMercDepartureString( MercPtrs[ i ], str, &ubJunk );
|
GetMapscreenMercDepartureString( MercPtrs[ i ], str, &ubJunk );
|
||||||
x = 208 + (34-StringPixLength( str, BLOCKFONT2)) / 2;
|
x = 208 + (34-StringPixLength( str, BLOCKFONT2)) / 2;
|
||||||
mprintf( x, y, str );
|
mprintf( x + xResOffset, y, str );
|
||||||
line++;
|
line++;
|
||||||
y += ROW_HEIGHT;
|
y += ROW_HEIGHT;
|
||||||
}
|
}
|
||||||
@@ -1366,7 +1375,11 @@ void RenderPreBattleInterface()
|
|||||||
|
|
||||||
// mark any and ALL pop up boxes as altered
|
// mark any and ALL pop up boxes as altered
|
||||||
MarkAllBoxesAsAltered( );
|
MarkAllBoxesAsAltered( );
|
||||||
RestoreExternBackgroundRect( 0, 0, 261, 359 );
|
|
||||||
|
if( !guiNumUninvolved || gfZoomDone == FALSE )
|
||||||
|
RestoreExternBackgroundRect( 0 + xResOffset, 0, 261 + xResOffset, 359 );
|
||||||
|
else
|
||||||
|
RestoreExternBackgroundRect( 0 + xResOffset, 0, 261 + xResOffset, y );
|
||||||
|
|
||||||
// restore font destinanation buffer to the frame buffer
|
// restore font destinanation buffer to the frame buffer
|
||||||
SetFontDestBuffer( FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE );
|
SetFontDestBuffer( FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE );
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ extern void Ensure_RepairedGarrisonGroup( GARRISON_GROUP **ppGarrison, INT32 *pG
|
|||||||
void ValidateEnemiesHaveWeapons()
|
void ValidateEnemiesHaveWeapons()
|
||||||
{
|
{
|
||||||
#ifdef JA2BETAVERSION
|
#ifdef JA2BETAVERSION
|
||||||
SGPRect CenteringRect= {0, 0, 639, 479 };
|
SGPRect CenteringRect= {0 + xResOffset, 0, SCREEN_WIDTH - xResOffset, SCREEN_HEIGHT };
|
||||||
INT32 i, iErrorDialog;
|
INT32 i, iErrorDialog;
|
||||||
SOLDIERTYPE *pSoldier;
|
SOLDIERTYPE *pSoldier;
|
||||||
INT32 iNumInvalid = 0;
|
INT32 iNumInvalid = 0;
|
||||||
|
|||||||
@@ -1311,7 +1311,7 @@ void GetUserInput()
|
|||||||
GetCursorPos(&MousePos);
|
GetCursorPos(&MousePos);
|
||||||
ScreenToClient(ghWindow, &MousePos); // In window coords!
|
ScreenToClient(ghWindow, &MousePos); // In window coords!
|
||||||
|
|
||||||
while( DequeueEvent( &Event ) )
|
while( DequeueSpecificEvent(&Event, KEY_DOWN|KEY_UP|KEY_REPEAT) )
|
||||||
{
|
{
|
||||||
if( !HandleTextInput( &Event ) && Event.usEvent == KEY_DOWN )
|
if( !HandleTextInput( &Event ) && Event.usEvent == KEY_DOWN )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1515,7 +1515,7 @@ void InitStrategicAI()
|
|||||||
//final thing to do is choose 1 cache map out of 5 possible maps. Simply select the sector randomly,
|
//final thing to do is choose 1 cache map out of 5 possible maps. Simply select the sector randomly,
|
||||||
//set up the flags to use the alternate map, then place 8-12 regular troops there (no ai though).
|
//set up the flags to use the alternate map, then place 8-12 regular troops there (no ai though).
|
||||||
//changing MAX_STRATEGIC_TEAM_SIZE may require changes to to the defending force here.
|
//changing MAX_STRATEGIC_TEAM_SIZE may require changes to to the defending force here.
|
||||||
if ( !gGameOptions.fEnableAllWeaponCaches ) // SANDRO - weapon caches settings changed
|
if ( !gGameExternalOptions.fEnableAllWeaponCaches ) // SANDRO - weapon caches settings changed
|
||||||
{
|
{
|
||||||
// added a chance to have more than one weapon caches in game
|
// added a chance to have more than one weapon caches in game
|
||||||
INT8 ubPicked[2] = { 0,0 };
|
INT8 ubPicked[2] = { 0,0 };
|
||||||
|
|||||||
@@ -1030,26 +1030,32 @@ void IssueHeadMinerQuote( INT8 bMineIndex, UINT8 ubQuoteType )
|
|||||||
switch ( bMineIndex )
|
switch ( bMineIndex )
|
||||||
{
|
{
|
||||||
case MINE_GRUMM:
|
case MINE_GRUMM:
|
||||||
sXPos = DEFAULT_EXTERN_PANEL_X_POS, sYPos = DEFAULT_EXTERN_PANEL_Y_POS;
|
sXPos = DEFAULT_EXTERN_PANEL_X_POS;
|
||||||
|
sYPos = DEFAULT_EXTERN_PANEL_Y_POS;
|
||||||
break;
|
break;
|
||||||
case MINE_CAMBRIA:
|
case MINE_CAMBRIA:
|
||||||
sXPos = DEFAULT_EXTERN_PANEL_X_POS, sYPos = DEFAULT_EXTERN_PANEL_Y_POS;
|
sXPos = DEFAULT_EXTERN_PANEL_X_POS;
|
||||||
|
sYPos = DEFAULT_EXTERN_PANEL_Y_POS;
|
||||||
break;
|
break;
|
||||||
case MINE_ALMA:
|
case MINE_ALMA:
|
||||||
sXPos = DEFAULT_EXTERN_PANEL_X_POS, sYPos = DEFAULT_EXTERN_PANEL_Y_POS;
|
sXPos = DEFAULT_EXTERN_PANEL_X_POS;
|
||||||
|
sYPos = DEFAULT_EXTERN_PANEL_Y_POS;
|
||||||
break;
|
break;
|
||||||
case MINE_DRASSEN:
|
case MINE_DRASSEN:
|
||||||
sXPos = DEFAULT_EXTERN_PANEL_X_POS, sYPos = 135;
|
sXPos = DEFAULT_EXTERN_PANEL_X_POS;
|
||||||
|
sYPos = 135;
|
||||||
break;
|
break;
|
||||||
case MINE_CHITZENA:
|
case MINE_CHITZENA:
|
||||||
sXPos = DEFAULT_EXTERN_PANEL_X_POS, sYPos = 117;
|
sXPos = DEFAULT_EXTERN_PANEL_X_POS;
|
||||||
|
sYPos = 117;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// there's no head miner in San Mona, this is an error!
|
// there's no head miner in San Mona, this is an error!
|
||||||
case MINE_SAN_MONA:
|
case MINE_SAN_MONA:
|
||||||
default:
|
default:
|
||||||
//Assert( FALSE );
|
//Assert( FALSE );
|
||||||
sXPos = DEFAULT_EXTERN_PANEL_X_POS, sYPos = DEFAULT_EXTERN_PANEL_Y_POS;
|
sXPos = DEFAULT_EXTERN_PANEL_X_POS;
|
||||||
|
sYPos = DEFAULT_EXTERN_PANEL_Y_POS;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1650,6 +1650,12 @@ void GroupArrivedAtSector( UINT8 ubGroupID, BOOLEAN fCheckForBattle, BOOLEAN fNe
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// group arrival already processed?
|
||||||
|
if ( !pGroup->fBetweenSectors && pGroup->ubNextX == 0 && pGroup->ubNextY == 0 )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if( pGroup->fPlayer )
|
if( pGroup->fPlayer )
|
||||||
{
|
{
|
||||||
//Set the fact we have visited the sector
|
//Set the fact we have visited the sector
|
||||||
|
|||||||
@@ -198,24 +198,24 @@
|
|||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<PropertyGroup Label="UserMacros" />
|
<PropertyGroup Label="UserMacros" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<OutDir>..\lib\VS2010\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\lib\VS2010\$(JA2Config)\$(Configuration)\</OutDir>
|
||||||
<IntDir>..\build\VS2010\$(ProjectName)_$(Configuration)\</IntDir>
|
<IntDir>$(SolutionDir)\build\VS2010\$(JA2Config)\$(ProjectName)_$(Configuration)\</IntDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MapEditorD|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MapEditorD|Win32'">
|
||||||
<OutDir>..\lib\VS2010\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\lib\VS2010\$(JA2Config)\$(Configuration)\</OutDir>
|
||||||
<IntDir>..\build\VS2010\$(ProjectName)_$(Configuration)\</IntDir>
|
<IntDir>$(SolutionDir)\build\VS2010\$(JA2Config)\$(ProjectName)_$(Configuration)\</IntDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<IntDir>..\build\VS2010\$(ProjectName)_$(Configuration)\</IntDir>
|
<IntDir>$(SolutionDir)\build\VS2010\$(JA2Config)\$(ProjectName)_$(Configuration)\</IntDir>
|
||||||
<OutDir>..\lib\VS2010\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\lib\VS2010\$(JA2Config)\$(Configuration)\</OutDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MapEditor|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MapEditor|Win32'">
|
||||||
<IntDir>..\build\VS2010\$(ProjectName)_$(Configuration)\</IntDir>
|
<IntDir>$(SolutionDir)\build\VS2010\$(JA2Config)\$(ProjectName)_$(Configuration)\</IntDir>
|
||||||
<OutDir>..\lib\VS2010\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\lib\VS2010\$(JA2Config)\$(Configuration)\</OutDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Relese_WithDebugInfo|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Relese_WithDebugInfo|Win32'">
|
||||||
<IntDir>..\build\VS2010\$(ProjectName)_$(Configuration)\</IntDir>
|
<IntDir>$(SolutionDir)\build\VS2010\$(JA2Config)\$(ProjectName)_$(Configuration)\</IntDir>
|
||||||
<OutDir>..\lib\VS2010\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\lib\VS2010\$(JA2Config)\$(Configuration)\</OutDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
|
|||||||
@@ -663,7 +663,7 @@ void HandleInterfaceMessageForCostOfTrainingMilitia( SOLDIERTYPE *pSoldier )
|
|||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Militia2");
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Militia2");
|
||||||
|
|
||||||
CHAR16 sString[ 128 ];
|
CHAR16 sString[ 128 ];
|
||||||
SGPRect pCenteringRect= {0, 0, 640, INV_INTERFACE_START_Y };
|
SGPRect pCenteringRect= {0 + xResOffset, 0, SCREEN_WIDTH - xResOffset, INV_INTERFACE_START_Y };
|
||||||
INT32 iNumberOfSectors = 0;
|
INT32 iNumberOfSectors = 0;
|
||||||
|
|
||||||
pMilitiaTrainerSoldier = pSoldier;
|
pMilitiaTrainerSoldier = pSoldier;
|
||||||
|
|||||||
+317
-363
File diff suppressed because it is too large
Load Diff
@@ -279,7 +279,7 @@ BOOLEAN HandleAutoBandage( )
|
|||||||
// Deque all game events
|
// Deque all game events
|
||||||
DequeAllGameEvents( TRUE );
|
DequeAllGameEvents( TRUE );
|
||||||
|
|
||||||
while (DequeueEvent(&InputEvent) == TRUE)
|
while (DequeueSpecificEvent(&InputEvent, KEY_DOWN|KEY_UP|KEY_REPEAT))
|
||||||
{
|
{
|
||||||
if ( InputEvent.usEvent == KEY_UP )
|
if ( InputEvent.usEvent == KEY_UP )
|
||||||
{
|
{
|
||||||
@@ -1078,6 +1078,45 @@ BOOLEAN AddFacesToAutoBandageBox( void )
|
|||||||
// find a free slot
|
// find a free slot
|
||||||
if( iDoctorList[ iCounter ] != -1 )
|
if( iDoctorList[ iCounter ] != -1 )
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
if( gMercProfiles[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ubFaceIndex < 100 )
|
||||||
|
{
|
||||||
|
// grab filename of face
|
||||||
|
if ((iDoctorList[ iCounter ] != -1) && ( gProfilesIMP[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ProfilId == ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ))
|
||||||
|
sprintf( VObjectDesc.ImageFile, "IMPFaces\\65Face\\%02d.sti", gMercProfiles[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ubFaceIndex );
|
||||||
|
else
|
||||||
|
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\%02d.sti", gMercProfiles[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ubFaceIndex );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// grab filename of face
|
||||||
|
if ((iDoctorList[ iCounter ] != -1) && ( gProfilesIMP[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ProfilId == ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ))
|
||||||
|
sprintf( VObjectDesc.ImageFile, "IMPFaces\\65Face\\%03d.sti", gMercProfiles[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ubFaceIndex );
|
||||||
|
else
|
||||||
|
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\%03d.sti", gMercProfiles[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ubFaceIndex );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
if ( ( gMercProfiles[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ubFaceIndex < 100 ) && ( gProfilesIMP[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ProfilId == ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ) )
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "IMPFaces\\65Face\\%02d.sti", gMercProfiles[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ubFaceIndex );
|
||||||
|
}
|
||||||
|
else if ( ( gMercProfiles[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ubFaceIndex > 99 ) && ( gProfilesIMP[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ProfilId == ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ) )
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "IMPFaces\\65Face\\%03d.sti", gMercProfiles[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ubFaceIndex );
|
||||||
|
}
|
||||||
|
else if(( gMercProfiles[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ubFaceIndex < 100 ) && ( gProfilesIMP[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ProfilId == -1 ))
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\%02d.sti", gMercProfiles[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ubFaceIndex );
|
||||||
|
}
|
||||||
|
else if(( gMercProfiles[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ubFaceIndex > 99 ) && ( gProfilesIMP[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ProfilId == -1 ))
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\%03d.sti", gMercProfiles[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ubFaceIndex );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if( gMercProfiles[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ubFaceIndex < 100 )
|
if( gMercProfiles[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ubFaceIndex < 100 )
|
||||||
{
|
{
|
||||||
// grab filename of face
|
// grab filename of face
|
||||||
@@ -1088,9 +1127,18 @@ BOOLEAN AddFacesToAutoBandageBox( void )
|
|||||||
// grab filename of face
|
// grab filename of face
|
||||||
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\%03d.sti", gMercProfiles[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ubFaceIndex );
|
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\%03d.sti", gMercProfiles[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ubFaceIndex );
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// load the face
|
// load the face
|
||||||
AddVideoObject( &VObjectDesc, (UINT32 *)&giAutoBandagesSoldierFaces[ iCounter ] );
|
// AddVideoObject( &VObjectDesc, (UINT32 *)&giAutoBandagesSoldierFaces[ iCounter ] );
|
||||||
|
|
||||||
|
if( !AddVideoObject( &VObjectDesc, (UINT32 *)&giAutoBandagesSoldierFaces[ iCounter ] ) )
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\speck.sti" );
|
||||||
|
AddVideoObject( &VObjectDesc, (UINT32 *)&giAutoBandagesSoldierFaces[ iCounter ] );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
iNumberOfDoctors++;
|
iNumberOfDoctors++;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1101,6 +1149,43 @@ BOOLEAN AddFacesToAutoBandageBox( void )
|
|||||||
// find a free slot
|
// find a free slot
|
||||||
if( iPatientList[ iCounter ] != -1 )
|
if( iPatientList[ iCounter ] != -1 )
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if( gMercProfiles[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ubFaceIndex < 100 )
|
||||||
|
{
|
||||||
|
// grab filename of face
|
||||||
|
if ((iPatientList[ iCounter ] != -1) && ( gProfilesIMP[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ProfilId == ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ))
|
||||||
|
sprintf( VObjectDesc.ImageFile, "IMPFaces\\65Face\\%02d.sti", gMercProfiles[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ubFaceIndex );
|
||||||
|
else
|
||||||
|
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\%02d.sti", gMercProfiles[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ubFaceIndex );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// grab filename of face
|
||||||
|
if ((iPatientList[ iCounter ] != -1) && ( gProfilesIMP[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ProfilId == ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ))
|
||||||
|
sprintf( VObjectDesc.ImageFile, "IMPFaces\\65Face\\%03d.sti", gMercProfiles[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ubFaceIndex );
|
||||||
|
else
|
||||||
|
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\%03d.sti", gMercProfiles[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ubFaceIndex );
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
if ( ( gMercProfiles[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ubFaceIndex < 100 ) && ( gProfilesIMP[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ProfilId == ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ) )
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "IMPFaces\\65Face\\%02d.sti", gMercProfiles[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ubFaceIndex );
|
||||||
|
}
|
||||||
|
else if ( ( gMercProfiles[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ubFaceIndex > 99 ) && ( gProfilesIMP[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ProfilId == ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ) )
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "IMPFaces\\65Face\\%03d.sti", gMercProfiles[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ubFaceIndex );
|
||||||
|
}
|
||||||
|
else if(( gMercProfiles[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ubFaceIndex < 100 ) && ( gProfilesIMP[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ProfilId == -1 ))
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\%02d.sti", gMercProfiles[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ubFaceIndex );
|
||||||
|
}
|
||||||
|
else if(( gMercProfiles[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ubFaceIndex > 99 ) && ( gProfilesIMP[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ProfilId == -1 ))
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\%03d.sti", gMercProfiles[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ubFaceIndex );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if( gMercProfiles[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ubFaceIndex < 100 )
|
if( gMercProfiles[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ubFaceIndex < 100 )
|
||||||
{
|
{
|
||||||
// grab filename of face
|
// grab filename of face
|
||||||
@@ -1111,9 +1196,16 @@ BOOLEAN AddFacesToAutoBandageBox( void )
|
|||||||
// grab filename of face
|
// grab filename of face
|
||||||
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\%03d.sti", gMercProfiles[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ubFaceIndex );
|
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\%03d.sti", gMercProfiles[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ubFaceIndex );
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
// load the face
|
// load the face
|
||||||
AddVideoObject( &VObjectDesc, (UINT32 *)&giAutoBandagesSoldierFaces[ iCounter + iNumberOfDoctors ] );
|
// AddVideoObject( &VObjectDesc, (UINT32 *)&giAutoBandagesSoldierFaces[ iCounter + iNumberOfDoctors ] );
|
||||||
|
|
||||||
|
if( !AddVideoObject( &VObjectDesc, (UINT32 *)&giAutoBandagesSoldierFaces[ iCounter + iNumberOfDoctors ] ) )
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\speck.sti" );
|
||||||
|
AddVideoObject( &VObjectDesc, (UINT32 *)&giAutoBandagesSoldierFaces[ iCounter + iNumberOfDoctors ] );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+40
-42
@@ -1996,57 +1996,55 @@ void MERCMercWentUpALevelSendEmail( UINT8 ubMercMercIdValue )
|
|||||||
// Read from EmailMercAvailable.xml
|
// Read from EmailMercAvailable.xml
|
||||||
if ( ReadXMLEmail == TRUE )
|
if ( ReadXMLEmail == TRUE )
|
||||||
{
|
{
|
||||||
oMerc = ubMercMercIdValue;
|
oMerc = ubMercMercIdValue;
|
||||||
iMerc = oMerc * 1;
|
iMerc = oMerc * 1;
|
||||||
|
|
||||||
if ( oMerc != 0 )
|
if ( oMerc != 0 )
|
||||||
pMerc = oMerc + 1;
|
pMerc = oMerc + 1;
|
||||||
else
|
else
|
||||||
pMerc = 0;
|
pMerc = 0;
|
||||||
if ( gProfilesMERC[ubMercMercIdValue].ProfilId == ubMercMercIdValue )
|
if ( gProfilesMERC[ubMercMercIdValue].ProfilId == ubMercMercIdValue )
|
||||||
AddEmailTypeXML( pMerc, iMerc, iMerc, GetWorldTotalMin(), -1 , TYPE_EMAIL_MERC_LEVEL_UP);
|
AddEmailTypeXML( pMerc, iMerc, iMerc, GetWorldTotalMin(), -1 , TYPE_EMAIL_MERC_LEVEL_UP);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// TODO.RW: This workaround should not be needed anymore, because we now have all the emails externalized to XML files (TableData\Email)
|
// Read from Email.edt and sender (nickname) from MercProfiles.xml
|
||||||
|
// WANNE: TODO: Tex, Biggins, Stoggy and Gaston have special handling because they are the new MERC merc in 1.13
|
||||||
// Read from Email.edt and sender (nickname) from MercProfiles.xml
|
// There is no letter template in Email.edt. We have them hardcoded in the source code.
|
||||||
// WANNE: TODO: Tex, Biggins, Stoggy and Gaston have special handling because they are the new MERC merc in 1.13
|
if (ubMercMercIdValue == 124 || ubMercMercIdValue == 125 || ubMercMercIdValue == 126 || ubMercMercIdValue == 127)
|
||||||
// There is no letter template in Email.edt. We have them hardcoded in the source code.
|
{
|
||||||
if (ubMercMercIdValue == 124 || ubMercMercIdValue == 125 || ubMercMercIdValue == 126 || ubMercMercIdValue == 127)
|
// Gaston
|
||||||
|
if (ubMercMercIdValue == 124)
|
||||||
{
|
{
|
||||||
// Gaston
|
ubEmailOffset = MERC_UP_LEVEL_BIFF;
|
||||||
if (ubMercMercIdValue == 124)
|
iMsgLength = MERC_UP_LEVEL_GASTON;
|
||||||
{
|
|
||||||
ubEmailOffset = MERC_UP_LEVEL_BIFF;
|
|
||||||
iMsgLength = MERC_UP_LEVEL_GASTON;
|
|
||||||
}
|
|
||||||
// Stogie
|
|
||||||
else if (ubMercMercIdValue == 125)
|
|
||||||
{
|
|
||||||
ubEmailOffset = MERC_UP_LEVEL_BIFF;
|
|
||||||
iMsgLength = MERC_UP_LEVEL_STOGIE;
|
|
||||||
}
|
|
||||||
// Tex
|
|
||||||
else if (ubMercMercIdValue == 126)
|
|
||||||
{
|
|
||||||
ubEmailOffset = MERC_UP_LEVEL_BIFF;
|
|
||||||
iMsgLength = MERC_UP_LEVEL_TEX;
|
|
||||||
}
|
|
||||||
// Biggens
|
|
||||||
else if (ubMercMercIdValue == 127)
|
|
||||||
{
|
|
||||||
ubEmailOffset = MERC_UP_LEVEL_BIFF;
|
|
||||||
iMsgLength = MERC_UP_LEVEL_BIGGENS;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
// Stogie
|
||||||
|
else if (ubMercMercIdValue == 125)
|
||||||
{
|
{
|
||||||
iMsgLength = MERC_UP_LEVEL_LENGTH_BIFF;
|
ubEmailOffset = MERC_UP_LEVEL_BIFF;
|
||||||
ubEmailOffset = MERC_UP_LEVEL_BIFF + MERC_UP_LEVEL_LENGTH_BIFF * ( ubMercMercIdValue );
|
iMsgLength = MERC_UP_LEVEL_STOGIE;
|
||||||
}
|
}
|
||||||
|
// Tex
|
||||||
|
else if (ubMercMercIdValue == 126)
|
||||||
|
{
|
||||||
|
ubEmailOffset = MERC_UP_LEVEL_BIFF;
|
||||||
|
iMsgLength = MERC_UP_LEVEL_TEX;
|
||||||
|
}
|
||||||
|
// Biggens
|
||||||
|
else if (ubMercMercIdValue == 127)
|
||||||
|
{
|
||||||
|
ubEmailOffset = MERC_UP_LEVEL_BIFF;
|
||||||
|
iMsgLength = MERC_UP_LEVEL_BIGGENS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iMsgLength = MERC_UP_LEVEL_LENGTH_BIFF;
|
||||||
|
ubEmailOffset = MERC_UP_LEVEL_BIFF + MERC_UP_LEVEL_LENGTH_BIFF * ( ubMercMercIdValue );
|
||||||
|
}
|
||||||
|
|
||||||
AddEmail( ubEmailOffset, iMsgLength, SPECK_FROM_MERC, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT_NAME_MERC);
|
AddEmail( ubEmailOffset, iMsgLength, SPECK_FROM_MERC, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT_NAME_MERC);
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -2222,12 +2222,12 @@ void DisplayTextForExternalNPC( UINT8 ubCharacterNum, STR16 zQuoteStr )
|
|||||||
|
|
||||||
if ( guiCurrentScreen == MAP_SCREEN )
|
if ( guiCurrentScreen == MAP_SCREEN )
|
||||||
{
|
{
|
||||||
sLeft = ( gsExternPanelXPosition + 97 );
|
sLeft = ( gsExternPanelXPosition + 97 + xResOffset );
|
||||||
gsTopPosition = gsExternPanelYPosition;
|
gsTopPosition = gsExternPanelYPosition;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sLeft = ( 110 );
|
sLeft = ( 110 + xResOffset );
|
||||||
}
|
}
|
||||||
|
|
||||||
ExecuteTacticalTextBox( sLeft, gTalkPanel.zQuoteStr );
|
ExecuteTacticalTextBox( sLeft, gTalkPanel.zQuoteStr );
|
||||||
@@ -2250,8 +2250,16 @@ void HandleTacticalTextUI( INT32 iFaceIndex, SOLDIERTYPE *pSoldier, STR16 zQuote
|
|||||||
#else
|
#else
|
||||||
swprintf( zText, L"\"%s\"", zQuoteStr );
|
swprintf( zText, L"\"%s\"", zQuoteStr );
|
||||||
#endif
|
#endif
|
||||||
sLeft = 110;
|
|
||||||
|
|
||||||
|
// TODO.RW: Wenn wir in tactical sind, dann normal. In strategy den offset dazurechnen!
|
||||||
|
if ( guiCurrentScreen == GAME_SCREEN )
|
||||||
|
{
|
||||||
|
sLeft = 110;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sLeft = 110 + xResOffset;
|
||||||
|
}
|
||||||
|
|
||||||
//previous version
|
//previous version
|
||||||
//sLeft = 110;
|
//sLeft = 110;
|
||||||
@@ -2345,7 +2353,7 @@ void HandleExternNPCSpeechFace( INT32 iIndex )
|
|||||||
if ( guiCurrentScreen != MAP_SCREEN )
|
if ( guiCurrentScreen != MAP_SCREEN )
|
||||||
{
|
{
|
||||||
// Setup video overlay!
|
// Setup video overlay!
|
||||||
VideoOverlayDesc.sLeft = 10;
|
VideoOverlayDesc.sLeft = 10 + xResOffset;
|
||||||
VideoOverlayDesc.sTop = 20;
|
VideoOverlayDesc.sTop = 20;
|
||||||
VideoOverlayDesc.sRight = VideoOverlayDesc.sLeft + 99;
|
VideoOverlayDesc.sRight = VideoOverlayDesc.sLeft + 99;
|
||||||
VideoOverlayDesc.sBottom = VideoOverlayDesc.sTop + 98;
|
VideoOverlayDesc.sBottom = VideoOverlayDesc.sTop + 98;
|
||||||
@@ -2357,7 +2365,7 @@ void HandleExternNPCSpeechFace( INT32 iIndex )
|
|||||||
{
|
{
|
||||||
// Setup video overlay!
|
// Setup video overlay!
|
||||||
|
|
||||||
VideoOverlayDesc.sLeft = gsExternPanelXPosition;
|
VideoOverlayDesc.sLeft = gsExternPanelXPosition + xResOffset;
|
||||||
VideoOverlayDesc.sTop = gsExternPanelYPosition;
|
VideoOverlayDesc.sTop = gsExternPanelYPosition;
|
||||||
|
|
||||||
VideoOverlayDesc.sRight = VideoOverlayDesc.sLeft + 99;
|
VideoOverlayDesc.sRight = VideoOverlayDesc.sLeft + 99;
|
||||||
|
|||||||
+141
-1
@@ -180,6 +180,25 @@ INT32 InternalInitFace( UINT8 usMercProfileID, UINT8 ubSoldierID, UINT32 uiInitF
|
|||||||
// Check if we are a big-face....
|
// Check if we are a big-face....
|
||||||
if ( uiInitFlags & FACE_BIGFACE )
|
if ( uiInitFlags & FACE_BIGFACE )
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if ( ( iFaceFileID < 100 ) && ( gProfilesIMP[ usMercProfileID ].ProfilId == usMercProfileID ) )
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "IMPFACES\\b%02d.sti", iFaceFileID );
|
||||||
|
}
|
||||||
|
else if ( ( iFaceFileID > 99 ) && ( gProfilesIMP[ usMercProfileID ].ProfilId == usMercProfileID ) )
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "IMPFACES\\b%03d.sti", iFaceFileID );
|
||||||
|
}
|
||||||
|
else if( iFaceFileID < 100 )
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "FACES\\b%02d.sti", iFaceFileID );
|
||||||
|
}
|
||||||
|
else if( iFaceFileID > 99 )
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "FACES\\b%03d.sti", iFaceFileID );
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
// The filename is the profile ID!
|
// The filename is the profile ID!
|
||||||
if( iFaceFileID < 100 )
|
if( iFaceFileID < 100 )
|
||||||
{
|
{
|
||||||
@@ -189,7 +208,7 @@ INT32 InternalInitFace( UINT8 usMercProfileID, UINT8 ubSoldierID, UINT32 uiInitF
|
|||||||
{
|
{
|
||||||
sprintf( VObjectDesc.ImageFile, "FACES\\b%03d.sti", iFaceFileID );
|
sprintf( VObjectDesc.ImageFile, "FACES\\b%03d.sti", iFaceFileID );
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
// ATE: Check for profile - if elliot , use special face :)
|
// ATE: Check for profile - if elliot , use special face :)
|
||||||
if ( usMercProfileID == ELLIOT )
|
if ( usMercProfileID == ELLIOT )
|
||||||
{
|
{
|
||||||
@@ -260,6 +279,106 @@ INT32 InternalInitFace( UINT8 usMercProfileID, UINT8 ubSoldierID, UINT32 uiInitF
|
|||||||
|
|
||||||
if (gGameExternalOptions.fShowCamouflageFaces == TRUE )
|
if (gGameExternalOptions.fShowCamouflageFaces == TRUE )
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
if ( ( iFaceFileID < 100 ) && ( gProfilesIMP[ usMercProfileID ].ProfilId == usMercProfileID ) )
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "IMPFACES\\%02d.sti", iFaceFileID );
|
||||||
|
|
||||||
|
if ( gCamoFace[usMercProfileID].gCamoface == TRUE )
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "IMPFACES\\WoodCamo\\%02d.sti", iFaceFileID );
|
||||||
|
}
|
||||||
|
else if ( gCamoFace[usMercProfileID].gUrbanCamoface == TRUE )
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "IMPFACES\\UrbanCamo\\%02d.sti", iFaceFileID );
|
||||||
|
}
|
||||||
|
else if ( gCamoFace[usMercProfileID].gDesertCamoface == TRUE )
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "IMPFACES\\DesertCamo\\%02d.sti", iFaceFileID );
|
||||||
|
}
|
||||||
|
else if ( gCamoFace[usMercProfileID].gSnowCamoface == TRUE )
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "IMPFACES\\SnowCamo\\%02d.sti", iFaceFileID );
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!FileExists(VObjectDesc.ImageFile))
|
||||||
|
sprintf( VObjectDesc.ImageFile, "IMPFACES\\%02d.sti", iFaceFileID );
|
||||||
|
}
|
||||||
|
else if ( ( iFaceFileID > 99 ) && ( gProfilesIMP[ usMercProfileID ].ProfilId == usMercProfileID ) )
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "IMPFACES\\%03d.sti", iFaceFileID );
|
||||||
|
|
||||||
|
if ( gCamoFace[usMercProfileID].gCamoface == TRUE )
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "IMPFACES\\Woodcamo\\%03d.sti", iFaceFileID );
|
||||||
|
}
|
||||||
|
else if ( gCamoFace[usMercProfileID].gUrbanCamoface == TRUE )
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "IMPFACES\\UrbanCamo\\%03d.sti", iFaceFileID );
|
||||||
|
}
|
||||||
|
else if ( gCamoFace[usMercProfileID].gDesertCamoface == TRUE )
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "IMPFACES\\DesertCamo\\%03d.sti", iFaceFileID );
|
||||||
|
}
|
||||||
|
else if ( gCamoFace[usMercProfileID].gSnowCamoface == TRUE )
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "IMPFACES\\SnowCamo\\%03d.sti", iFaceFileID );
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!FileExists(VObjectDesc.ImageFile))
|
||||||
|
sprintf( VObjectDesc.ImageFile, "IMPFACES\\%03d.sti", iFaceFileID );
|
||||||
|
}
|
||||||
|
else if( iFaceFileID < 100 )
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "FACES\\%02d.sti", iFaceFileID );
|
||||||
|
|
||||||
|
if ( gCamoFace[usMercProfileID].gCamoface == TRUE )
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "FACES\\WoodCamo\\%02d.sti", iFaceFileID );
|
||||||
|
}
|
||||||
|
else if ( gCamoFace[usMercProfileID].gUrbanCamoface == TRUE )
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "FACES\\UrbanCamo\\%02d.sti", iFaceFileID );
|
||||||
|
}
|
||||||
|
else if ( gCamoFace[usMercProfileID].gDesertCamoface == TRUE )
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "FACES\\DesertCamo\\%02d.sti", iFaceFileID );
|
||||||
|
}
|
||||||
|
else if ( gCamoFace[usMercProfileID].gSnowCamoface == TRUE )
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "FACES\\SnowCamo\\%02d.sti", iFaceFileID );
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!FileExists(VObjectDesc.ImageFile))
|
||||||
|
sprintf( VObjectDesc.ImageFile, "FACES\\%02d.sti", iFaceFileID );
|
||||||
|
}
|
||||||
|
else if( iFaceFileID > 99 )
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "FACES\\%03d.sti", iFaceFileID );
|
||||||
|
|
||||||
|
if ( gCamoFace[usMercProfileID].gCamoface == TRUE )
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "FACES\\Woodcamo\\%03d.sti", iFaceFileID );
|
||||||
|
}
|
||||||
|
else if ( gCamoFace[usMercProfileID].gUrbanCamoface == TRUE )
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "FACES\\UrbanCamo\\%03d.sti", iFaceFileID );
|
||||||
|
}
|
||||||
|
else if ( gCamoFace[usMercProfileID].gDesertCamoface == TRUE )
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "FACES\\DesertCamo\\%03d.sti", iFaceFileID );
|
||||||
|
}
|
||||||
|
else if ( gCamoFace[usMercProfileID].gSnowCamoface == TRUE )
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "FACES\\SnowCamo\\%03d.sti", iFaceFileID );
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!FileExists(VObjectDesc.ImageFile))
|
||||||
|
sprintf( VObjectDesc.ImageFile, "FACES\\%03d.sti", iFaceFileID );
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
if( iFaceFileID < 100 )
|
if( iFaceFileID < 100 )
|
||||||
{
|
{
|
||||||
// The filename is the profile ID!
|
// The filename is the profile ID!
|
||||||
@@ -311,9 +430,29 @@ INT32 InternalInitFace( UINT8 usMercProfileID, UINT8 ubSoldierID, UINT32 uiInitF
|
|||||||
sprintf( VObjectDesc.ImageFile, "FACES\\%03d.sti", iFaceFileID );
|
sprintf( VObjectDesc.ImageFile, "FACES\\%03d.sti", iFaceFileID );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
else if (gGameExternalOptions.fShowCamouflageFaces == FALSE )
|
else if (gGameExternalOptions.fShowCamouflageFaces == FALSE )
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if ( ( iFaceFileID < 100 ) && ( gProfilesIMP[ usMercProfileID ].ProfilId == usMercProfileID ) )
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "IMPFACES\\%02d.sti", iFaceFileID );
|
||||||
|
}
|
||||||
|
else if ( ( iFaceFileID > 99 ) && ( gProfilesIMP[ usMercProfileID ].ProfilId == usMercProfileID ) )
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "IMPFACES\\%03d.sti", iFaceFileID );
|
||||||
|
}
|
||||||
|
else if( iFaceFileID < 100 )
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "FACES\\%02d.sti", iFaceFileID );
|
||||||
|
}
|
||||||
|
else if( iFaceFileID > 99 )
|
||||||
|
{
|
||||||
|
sprintf( VObjectDesc.ImageFile, "FACES\\%03d.sti", iFaceFileID );
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
if( iFaceFileID < 100 )
|
if( iFaceFileID < 100 )
|
||||||
{
|
{
|
||||||
// The filename is the profile ID!
|
// The filename is the profile ID!
|
||||||
@@ -323,6 +462,7 @@ INT32 InternalInitFace( UINT8 usMercProfileID, UINT8 ubSoldierID, UINT32 uiInitF
|
|||||||
{
|
{
|
||||||
sprintf( VObjectDesc.ImageFile, "FACES\\%03d.sti", iFaceFileID );
|
sprintf( VObjectDesc.ImageFile, "FACES\\%03d.sti", iFaceFileID );
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2292,6 +2292,11 @@ OBJECTTYPE* InternalAddItemToPool( INT32 *psGridNo, OBJECTTYPE *pObject, INT8 bV
|
|||||||
// IF SO, DONT'T ADD!
|
// IF SO, DONT'T ADD!
|
||||||
bTerrainID = GetTerrainType( *psGridNo );
|
bTerrainID = GetTerrainType( *psGridNo );
|
||||||
|
|
||||||
|
// WANNE.WATER: If our soldier is not on the ground level and the tile is a "water" tile, then simply set the tile to "FLAT_GROUND"
|
||||||
|
// This should fix "problems" for special modified maps
|
||||||
|
if ( TERRAIN_IS_WATER( bTerrainID) && ubLevel > 0 )
|
||||||
|
bTerrainID = FLAT_GROUND;
|
||||||
|
|
||||||
if ( TERRAIN_IS_WATER( bTerrainID) )
|
if ( TERRAIN_IS_WATER( bTerrainID) )
|
||||||
{
|
{
|
||||||
// if ( Item[ pObject->usItem ].fFlags & ITEM_SINKS )
|
// if ( Item[ pObject->usItem ].fFlags & ITEM_SINKS )
|
||||||
|
|||||||
+10
-3
@@ -1002,13 +1002,20 @@ void SetUIMouseCursor( )
|
|||||||
|
|
||||||
if ( fOkForExit )
|
if ( fOkForExit )
|
||||||
{
|
{
|
||||||
if ( gfUIConfirmExitArrows )
|
if ( gGameExternalOptions.fGridExitInTurnBased || ( gTacticalStatus.uiFlags & REALTIME ) || !( gTacticalStatus.uiFlags & INCOMBAT ) )
|
||||||
{
|
{
|
||||||
guiNewUICursor = CONFIRM_EXIT_GRID_UICURSOR;
|
if ( gfUIConfirmExitArrows )
|
||||||
|
{
|
||||||
|
guiNewUICursor = CONFIRM_EXIT_GRID_UICURSOR;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
guiNewUICursor = EXIT_GRID_UICURSOR;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
guiNewUICursor = EXIT_GRID_UICURSOR;
|
guiNewUICursor = NOEXIT_GRID_UICURSOR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
+370
-137
@@ -139,6 +139,8 @@ INT16 ITEMDESC_WIDTH;
|
|||||||
extern int SM_ITEMDESC_START_X;
|
extern int SM_ITEMDESC_START_X;
|
||||||
extern int SM_ITEMDESC_START_Y;
|
extern int SM_ITEMDESC_START_Y;
|
||||||
|
|
||||||
|
extern int INV_REGION_Y;
|
||||||
|
|
||||||
#define CAMO_REGION_HEIGHT 75
|
#define CAMO_REGION_HEIGHT 75
|
||||||
#define CAMO_REGION_WIDTH 75
|
#define CAMO_REGION_WIDTH 75
|
||||||
|
|
||||||
@@ -411,6 +413,8 @@ extern void StartSKIDescriptionBox( void );
|
|||||||
|
|
||||||
void UpdateItemHatches();
|
void UpdateItemHatches();
|
||||||
|
|
||||||
|
void ShadowNIVPanel();
|
||||||
|
|
||||||
extern void BeginInventoryPoolPtr( OBJECTTYPE *pInventorySlot );
|
extern void BeginInventoryPoolPtr( OBJECTTYPE *pInventorySlot );
|
||||||
|
|
||||||
UINT8 ubRGBItemCyclePlacedItemColors[] =
|
UINT8 ubRGBItemCyclePlacedItemColors[] =
|
||||||
@@ -523,7 +527,7 @@ INV_DESC_REGIONS gItemDescGenHeaderRegions[3]; // Header text regions for variou
|
|||||||
INV_DESC_REGIONS gItemDescGenIndexRegions[3][4]; // Index text regions for various parts of the General Tab
|
INV_DESC_REGIONS gItemDescGenIndexRegions[3][4]; // Index text regions for various parts of the General Tab
|
||||||
INV_DESC_REGIONS gItemDescGenRegions[NUM_UDB_GEN_LINES * 2][4]; // Data regions, 4 sub-columns each
|
INV_DESC_REGIONS gItemDescGenRegions[NUM_UDB_GEN_LINES * 2][4]; // Data regions, 4 sub-columns each
|
||||||
INV_DESC_REGIONS gItemDescGenSecondaryRegions[26]; // Secondary data regions, 3x5
|
INV_DESC_REGIONS gItemDescGenSecondaryRegions[26]; // Secondary data regions, 3x5
|
||||||
INV_DESC_REGIONS gItemDescTextRegions[7]; // Main description regions
|
INV_DESC_REGIONS gItemDescTextRegions[8]; // Main description regions
|
||||||
INV_DESC_REGIONS gItemDescAdvIndexRegions[1][4];
|
INV_DESC_REGIONS gItemDescAdvIndexRegions[1][4];
|
||||||
INV_DESC_REGIONS gItemDescAdvRegions[NUM_UDB_ADV_LINES][4]; // Advanced data regions, 4 sub-columns each
|
INV_DESC_REGIONS gItemDescAdvRegions[NUM_UDB_ADV_LINES][4]; // Advanced data regions, 4 sub-columns each
|
||||||
|
|
||||||
@@ -1035,7 +1039,8 @@ void InitInventoryNew()
|
|||||||
|
|
||||||
ResetInvData();
|
ResetInvData();
|
||||||
|
|
||||||
if(iResolution == 0){
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
|
{
|
||||||
InitInvData(gSMInvData[0], FALSE, INV_BAR_DX, INV_BAR_DY, HEAD_INV_SLOT_WIDTH, HEAD_INV_SLOT_HEIGHT, 0, 0); // HELMETPOS
|
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
|
InitInvData(gSMInvData[1], FALSE, INV_BAR_DX, INV_BAR_DY, VEST_INV_SLOT_WIDTH, VEST_INV_SLOT_HEIGHT, 0, 0); // VESTPOS
|
||||||
InitInvData(gSMInvData[2], FALSE, INV_BAR_DX, INV_BAR_DY, LEGS_INV_SLOT_WIDTH, LEGS_INV_SLOT_HEIGHT, 0, 0); // LEGPOS
|
InitInvData(gSMInvData[2], FALSE, INV_BAR_DX, INV_BAR_DY, LEGS_INV_SLOT_WIDTH, LEGS_INV_SLOT_HEIGHT, 0, 0); // LEGPOS
|
||||||
@@ -1679,14 +1684,14 @@ void INVRenderINVPanelItem( SOLDIERTYPE *pSoldier, INT16 sPocket, UINT8 fDirtyLe
|
|||||||
// CHRISL: Change coords for STI that covers 2nd hand location when carrying a 2handed weapon
|
// CHRISL: Change coords for STI that covers 2nd hand location when carrying a 2handed weapon
|
||||||
if( guiCurrentItemDescriptionScreen != MAP_SCREEN )
|
if( guiCurrentItemDescriptionScreen != MAP_SCREEN )
|
||||||
{
|
{
|
||||||
newX = ((UsingNewInventorySystem() == false)) ? 217 : 114;
|
newX = ((UsingNewInventorySystem() == false)) ? (xResOffset + 217) : ((SCREEN_WIDTH - xResSize)/2 + 114);
|
||||||
newY = ((UsingNewInventorySystem() == false)) ? sY : (sY - 1);
|
newY = ((UsingNewInventorySystem() == false)) ? sY : (sY - 1);
|
||||||
BltVideoObjectFromIndex( guiSAVEBUFFER, guiSecItemHiddenVO, UsingNewInventorySystem(), newX, newY, VO_BLT_SRCTRANSPARENCY, NULL );
|
BltVideoObjectFromIndex( guiSAVEBUFFER, guiSecItemHiddenVO, UsingNewInventorySystem(), newX, newY, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||||
RestoreExternBackgroundRect( newX, newY, 72, 28 );
|
RestoreExternBackgroundRect( newX, newY, 72, 28 );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
newX = ((UsingNewInventorySystem() == false)) ? 14 : 6;
|
newX = ((UsingNewInventorySystem() == false)) ? (14 + xResOffset) : (6 + xResOffset);
|
||||||
newY = ((UsingNewInventorySystem() == false)) ? 218 : 217;
|
newY = ((UsingNewInventorySystem() == false)) ? 218 : 217;
|
||||||
BltVideoObjectFromIndex( guiSAVEBUFFER, guiMapInvSecondHandBlockout, UsingNewInventorySystem(), newX, newY, VO_BLT_SRCTRANSPARENCY, NULL );
|
BltVideoObjectFromIndex( guiSAVEBUFFER, guiMapInvSecondHandBlockout, UsingNewInventorySystem(), newX, newY, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||||
RestoreExternBackgroundRect( newX, newY, 102, 24 );
|
RestoreExternBackgroundRect( newX, newY, 102, 24 );
|
||||||
@@ -2638,6 +2643,33 @@ void INVRenderSilhouette( UINT32 uiBuffer, INT16 PocketIndex, INT16 SilIndex, IN
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Flugente FTW 1: Function to get the number of the item condition string
|
||||||
|
UINT8 GetTemperatureString( FLOAT overheatpercentage, UINT32* apRed, UINT32* apGreen, UINT32* abBlue )
|
||||||
|
{
|
||||||
|
*apRed = (UINT32) ( 100 + 155 * ( (max(1.0, overheatpercentage) - 1.0)/(max(1.0, overheatpercentage)) ) );
|
||||||
|
*apGreen = 0;
|
||||||
|
*abBlue = 0;
|
||||||
|
|
||||||
|
if (overheatpercentage < 0.17) // very low
|
||||||
|
return 0;
|
||||||
|
else if (overheatpercentage < 0.33) // low
|
||||||
|
return 1;
|
||||||
|
else if (overheatpercentage < 0.5) // medium
|
||||||
|
return 2;
|
||||||
|
else if (overheatpercentage < 0.67) // high
|
||||||
|
return 3;
|
||||||
|
else if (overheatpercentage < 0.83) // very high
|
||||||
|
return 4;
|
||||||
|
else if (overheatpercentage < 1.0) // dangerous
|
||||||
|
return 5;
|
||||||
|
else if (overheatpercentage < 2.0) // CRITICAL
|
||||||
|
return 6;
|
||||||
|
else // DRAMATIC
|
||||||
|
return 7;
|
||||||
|
|
||||||
|
// Default: unknown
|
||||||
|
return 8;
|
||||||
|
}
|
||||||
|
|
||||||
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 )
|
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 )
|
||||||
{
|
{
|
||||||
@@ -2743,6 +2775,10 @@ void INVRenderItem( UINT32 uiBuffer, SOLDIERTYPE * pSoldier, OBJECTTYPE *pObjec
|
|||||||
sNewY = sY + sHeight - 10;
|
sNewY = sY + sHeight - 10;
|
||||||
sNewX = sX + 1;
|
sNewX = sX + 1;
|
||||||
|
|
||||||
|
// Flugente: If we display the thermometer for overheating, move the ammo counter a bit to the right
|
||||||
|
if ( gGameOptions.fWeaponOverheating == TRUE && gGameExternalOptions.fDisplayOverheatThermometer == TRUE )
|
||||||
|
sNewX = sX + 6;
|
||||||
|
|
||||||
SetFontForeground ( AmmoTypes[(*pObject)[iter]->data.gun.ubGunAmmoType].fontColour );
|
SetFontForeground ( AmmoTypes[(*pObject)[iter]->data.gun.ubGunAmmoType].fontColour );
|
||||||
//switch ((*pObject)[iter]->data.gun.ubGunAmmoType)
|
//switch ((*pObject)[iter]->data.gun.ubGunAmmoType)
|
||||||
//{
|
//{
|
||||||
@@ -2790,6 +2826,8 @@ void INVRenderItem( UINT32 uiBuffer, SOLDIERTYPE * pSoldier, OBJECTTYPE *pObjec
|
|||||||
mprintf( sNewX, sNewY, pStr );
|
mprintf( sNewX, sNewY, pStr );
|
||||||
gprintfinvalidate( sNewX, sNewY, pStr );
|
gprintfinvalidate( sNewX, sNewY, pStr );
|
||||||
|
|
||||||
|
sNewX = sX + 1;
|
||||||
|
|
||||||
SetFontForeground( FONT_MCOLOR_DKGRAY );
|
SetFontForeground( FONT_MCOLOR_DKGRAY );
|
||||||
|
|
||||||
// Display 'JAMMED' if we are jammed
|
// Display 'JAMMED' if we are jammed
|
||||||
@@ -2866,7 +2904,41 @@ void INVRenderItem( UINT32 uiBuffer, SOLDIERTYPE * pSoldier, OBJECTTYPE *pObjec
|
|||||||
}
|
}
|
||||||
mprintf( sNewX, sNewY, pStr );
|
mprintf( sNewX, sNewY, pStr );
|
||||||
gprintfinvalidate( sNewX, sNewY, pStr );
|
gprintfinvalidate( sNewX, sNewY, pStr );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Flugente FTW 1
|
||||||
|
if ( gGameOptions.fWeaponOverheating == TRUE && gGameExternalOptions.fDisplayOverheatThermometer == TRUE && ( pItem->usItemClass & (IC_GUN | IC_LAUNCHER) || Item[pObject->usItem].barrel == TRUE ) )
|
||||||
|
{
|
||||||
|
FLOAT overheatjampercentage = GetGunOverheatJamPercentage( pObject);
|
||||||
|
|
||||||
|
UINT32 red, green, blue;
|
||||||
|
UINT8 TemperatureStringNum = GetTemperatureString( overheatjampercentage, &red, &green, &blue );
|
||||||
|
|
||||||
|
UINT16 colour = Get16BPPColor( FROMRGB( red, green, blue ) );
|
||||||
|
|
||||||
|
DrawItemUIBarEx( pObject, DRAW_ITEM_TEMPERATURE, sX, sY + sHeight-1, ITEMDESC_ITEM_STATUS_WIDTH, sHeight-1, colour, colour, TRUE, guiSAVEBUFFER );
|
||||||
|
}
|
||||||
|
|
||||||
|
// display symbol if we are leaning our weapon on something
|
||||||
|
// display only if eapon resting is allowed, display is allowed, item is a gun/launcher, we are a person, we hold the gun in our hand, and we are resting the gun
|
||||||
|
if ( gGameExternalOptions.fWeaponResting && gGameExternalOptions.fDisplayWeaponRestingIndicator && pItem->usItemClass & (IC_GUN | IC_LAUNCHER) && pSoldier && pSoldier->bActive && pSoldier->bInSector && &(pSoldier->inv[pSoldier->ubAttackingHand]) == pObject && pSoldier->IsWeaponMounted() )
|
||||||
|
{
|
||||||
|
SetRGBFontForeground( 95, 160, 154 );
|
||||||
|
|
||||||
|
sNewY = sY + sHeight - 24;
|
||||||
|
swprintf( pStr, L"M" );
|
||||||
|
|
||||||
|
// Get length of string
|
||||||
|
uiStringLength=StringPixLength(pStr, ITEM_FONT );
|
||||||
|
|
||||||
|
sNewX = sX + 25;
|
||||||
|
|
||||||
|
if ( uiBuffer == guiSAVEBUFFER )
|
||||||
|
{
|
||||||
|
RestoreExternBackgroundRect( sNewX, sNewY, 15, 15 );
|
||||||
|
}
|
||||||
|
mprintf( sNewX, sNewY, pStr );
|
||||||
|
gprintfinvalidate( sNewX, sNewY, pStr );
|
||||||
}
|
}
|
||||||
|
|
||||||
if((UsingNewInventorySystem() == true))
|
if((UsingNewInventorySystem() == true))
|
||||||
@@ -3085,7 +3157,7 @@ void InitItemDescriptionBoxStartCoords( BOOLEAN fIsEnhanced, BOOLEAN fUsingNAS )
|
|||||||
if(fUsingNAS){
|
if(fUsingNAS){
|
||||||
if( UsingNewInventorySystem() == true ) // NIV
|
if( UsingNewInventorySystem() == true ) // NIV
|
||||||
{
|
{
|
||||||
ITEMDESC_START_X = 115;
|
ITEMDESC_START_X = INTERFACE_START_X + 115;
|
||||||
ITEMDESC_START_Y = (1 + INV_INTERFACE_START_Y);
|
ITEMDESC_START_Y = (1 + INV_INTERFACE_START_Y);
|
||||||
ITEMDESC_HEIGHT = 195;
|
ITEMDESC_HEIGHT = 195;
|
||||||
ITEMDESC_WIDTH = 335;
|
ITEMDESC_WIDTH = 335;
|
||||||
@@ -3094,53 +3166,46 @@ void InitItemDescriptionBoxStartCoords( BOOLEAN fIsEnhanced, BOOLEAN fUsingNAS )
|
|||||||
{
|
{
|
||||||
ITEMDESC_HEIGHT = 193;
|
ITEMDESC_HEIGHT = 193;
|
||||||
ITEMDESC_WIDTH = 430;
|
ITEMDESC_WIDTH = 430;
|
||||||
ITEMDESC_START_X = 214;
|
ITEMDESC_START_X = INTERFACE_START_X + 214;
|
||||||
ITEMDESC_START_Y = (1-(ITEMDESC_HEIGHT-INV_INTERFACE_HEIGHT) + INV_INTERFACE_START_Y);
|
ITEMDESC_START_Y = (1-(ITEMDESC_HEIGHT-INV_INTERFACE_HEIGHT) + INV_INTERFACE_START_Y);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(UsingNewInventorySystem() == true && (guiCurrentScreen == GAME_SCREEN || guiCurrentScreen == SHOPKEEPER_SCREEN))
|
if(UsingNewInventorySystem() == true && (guiCurrentScreen == GAME_SCREEN || guiCurrentScreen == SHOPKEEPER_SCREEN))
|
||||||
{
|
{
|
||||||
if(iResolution == 0)
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
ITEMDESC_WIDTH = 526;
|
ITEMDESC_WIDTH = 526;
|
||||||
else if(iResolution == 1)
|
else if (iResolution < _1024x768)
|
||||||
ITEMDESC_WIDTH = 686;
|
ITEMDESC_WIDTH = 686;
|
||||||
else if(iResolution == 2)
|
else
|
||||||
ITEMDESC_WIDTH = 910;
|
ITEMDESC_WIDTH = 910;
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHRISL: This allows EDB to work in Strategic OIV mode
|
//CHRISL: This allows EDB to work in Strategic OIV mode
|
||||||
if(guiCurrentScreen == MAP_SCREEN)
|
if(guiCurrentScreen == MAP_SCREEN)
|
||||||
{
|
{
|
||||||
if(iResolution == 0) // 640x480 res
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
ITEMDESC_HEIGHT = 268;
|
ITEMDESC_HEIGHT = 268;
|
||||||
else if(iResolution == 2 || UsingNewInventorySystem() == true) // 1024x768 or NIV
|
else if(iResolution >= _1024x768 || UsingNewInventorySystem() == true) // 1024x768 or NIV
|
||||||
ITEMDESC_HEIGHT = 490;
|
ITEMDESC_HEIGHT = 490;
|
||||||
else if(iResolution == 1) // 800x600
|
else if (iResolution < _1024x768)
|
||||||
ITEMDESC_HEIGHT = (mode > 0) ? 490 : 373;
|
ITEMDESC_HEIGHT = (mode > 0) ? 490 : 373;
|
||||||
ITEMDESC_WIDTH = ((UsingNewInventorySystem() == true && iResolution != 0)) ? 272 : 272;
|
|
||||||
|
ITEMDESC_WIDTH = ((UsingNewInventorySystem() == true && iResolution >= _800x600)) ? 272 : 272;
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
if( UsingNewInventorySystem() == true ) // ODB/NIV
|
if( UsingNewInventorySystem() == true ) // ODB/NIV
|
||||||
{
|
{
|
||||||
//if (guiCurrentItemDescriptionScreen != SHOPKEEPER_SCREEN)
|
// HEADROCK HAM 4:
|
||||||
{
|
ITEMDESC_START_X = INTERFACE_START_X + 115;
|
||||||
// HEADROCK HAM 4:
|
ITEMDESC_START_Y = (1 + INV_INTERFACE_START_Y);
|
||||||
ITEMDESC_START_X = 115;
|
ITEMDESC_HEIGHT = 195;
|
||||||
ITEMDESC_START_Y = (1 + INV_INTERFACE_START_Y);
|
ITEMDESC_WIDTH = 335; // OIV only
|
||||||
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 // ODB/OIV
|
else // ODB/OIV
|
||||||
{
|
{
|
||||||
ITEMDESC_START_X = 214;
|
ITEMDESC_START_X = INTERFACE_START_X + 214;
|
||||||
ITEMDESC_START_Y = (1 + INV_INTERFACE_START_Y);
|
ITEMDESC_START_Y = (1 + INV_INTERFACE_START_Y);
|
||||||
ITEMDESC_HEIGHT = 133;
|
ITEMDESC_HEIGHT = 133;
|
||||||
ITEMDESC_WIDTH = 320; // OIV only
|
ITEMDESC_WIDTH = 320; // OIV only
|
||||||
@@ -3148,24 +3213,25 @@ void InitItemDescriptionBoxStartCoords( BOOLEAN fIsEnhanced, BOOLEAN fUsingNAS )
|
|||||||
|
|
||||||
if(UsingNewInventorySystem() == true && guiCurrentScreen == GAME_SCREEN || guiCurrentScreen == SHOPKEEPER_SCREEN)
|
if(UsingNewInventorySystem() == true && guiCurrentScreen == GAME_SCREEN || guiCurrentScreen == SHOPKEEPER_SCREEN)
|
||||||
{
|
{
|
||||||
if(iResolution == 0)
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
ITEMDESC_WIDTH = 526;
|
ITEMDESC_WIDTH = 526;
|
||||||
else if(iResolution == 1)
|
else if (iResolution < _1024x768)
|
||||||
ITEMDESC_WIDTH = 686;
|
ITEMDESC_WIDTH = 686;
|
||||||
else if(iResolution == 2)
|
else
|
||||||
ITEMDESC_WIDTH = 910;
|
ITEMDESC_WIDTH = 910;
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHRISL: This allows EDB to work in Strategic OIV mode
|
//CHRISL: This allows EDB to work in Strategic OIV mode
|
||||||
if(guiCurrentScreen == MAP_SCREEN)
|
if(guiCurrentScreen == MAP_SCREEN)
|
||||||
{
|
{
|
||||||
if(iResolution == 0) // 640x480 res
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
ITEMDESC_HEIGHT = 268;
|
ITEMDESC_HEIGHT = 268;
|
||||||
else if(iResolution == 2 || UsingNewInventorySystem() == true) // 1024x768 or NIV
|
else if(iResolution >= _1024x768 || UsingNewInventorySystem() == true) // 1024x768 or NIV
|
||||||
ITEMDESC_HEIGHT = 490;
|
ITEMDESC_HEIGHT = 490;
|
||||||
else if(iResolution == 1) // 800x600
|
else if (iResolution < _1024x768)
|
||||||
ITEMDESC_HEIGHT = 373;
|
ITEMDESC_HEIGHT = 373;
|
||||||
ITEMDESC_WIDTH = ((UsingNewInventorySystem() == true && iResolution != 0)) ? 272 : 272;
|
|
||||||
|
ITEMDESC_WIDTH = ((UsingNewInventorySystem() == true && iResolution >= _800x600)) ? 272 : 272;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4002,7 +4068,7 @@ void ItemDescAmmoCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
gfItemAmmoDown = FALSE;
|
gfItemAmmoDown = FALSE;
|
||||||
|
|
||||||
//CHRISL: We dont' want to be able to reload guns using the ammo crate from this function
|
//CHRISL: We dont' want to be able to reload guns using the ammo crate from this function
|
||||||
if(gpItemPointer != NULL && Item[gpItemPointer->usItem].ammocrate)
|
if(gpItemPointer != NULL && Magazine[Item[gpItemPointer->usItem].ubClassIndex].ubMagType >= AMMO_BOX)
|
||||||
{
|
{
|
||||||
fInterfacePanelDirty = DIRTYLEVEL2;
|
fInterfacePanelDirty = DIRTYLEVEL2;
|
||||||
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
||||||
@@ -4378,60 +4444,6 @@ void ItemDescAttachmentsCallback( MOUSE_REGION * pRegion, INT32 iReason )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*INT8 DetermineShowBox( )
|
|
||||||
INT8 DetermineShowBox( )
|
|
||||||
{
|
|
||||||
if(gpItemDescObject == NULL)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if(iResolution == 0)
|
|
||||||
return 0;
|
|
||||||
else if(UsingNewInventorySystem() == false) //OIV
|
|
||||||
{
|
|
||||||
if (UsingEDBSystem() == 2)
|
|
||||||
{
|
|
||||||
if (Item[gpItemDescObject->usItem].usItemClass & (IC_WEAPON|IC_EXPLOSV|IC_AMMO|IC_ARMOUR|IC_PUNCH) && UsingEDBSystem() > 0 )
|
|
||||||
return(UsingNewAttachmentSystem()==true ? 8 : 6);
|
|
||||||
else
|
|
||||||
return(UsingNewAttachmentSystem()==true ? 9 : 7);
|
|
||||||
}
|
|
||||||
else if (guiCurrentItemDescriptionScreen == MAP_SCREEN)
|
|
||||||
{
|
|
||||||
if (Item[gpItemDescObject->usItem].usItemClass & (IC_WEAPON|IC_EXPLOSV|IC_AMMO|IC_ARMOUR|IC_PUNCH) && UsingEDBSystem() > 0 )
|
|
||||||
return(UsingNewAttachmentSystem()==true ? 7 : 6);
|
|
||||||
else
|
|
||||||
if(UsingEDBSystem() > 0)
|
|
||||||
return(UsingNewAttachmentSystem()==true ? 8 : 1);
|
|
||||||
else
|
|
||||||
return(UsingNewAttachmentSystem()==true ? 6 : 1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return(UsingNewAttachmentSystem()==true ? 5 : 0);
|
|
||||||
}
|
|
||||||
else if(UsingNewInventorySystem() == true) //NIV
|
|
||||||
{
|
|
||||||
if(gpItemDescObject->IsActiveLBE(gubItemDescStatusIndex))
|
|
||||||
return (gpItemDescObject->GetLBEPointer(gubItemDescStatusIndex)->lbeClass + (guiCurrentItemDescriptionScreen == MAP_SCREEN ? 1 : 0));
|
|
||||||
else if(Item[gpItemDescObject->usItem].usItemClass == IC_LBEGEAR)
|
|
||||||
return (LoadBearingEquipment[Item[gpItemDescObject->usItem].ubClassIndex].lbeClass + (guiCurrentItemDescriptionScreen == MAP_SCREEN ? 1 : 0));
|
|
||||||
else if (Item[gpItemDescObject->usItem].usItemClass & (IC_WEAPON|IC_EXPLOSV|IC_AMMO|IC_ARMOUR|IC_PUNCH) && UsingEDBSystem() > 0 ){
|
|
||||||
if(UsingNewAttachmentSystem()==true)
|
|
||||||
return (guiCurrentItemDescriptionScreen == MAP_SCREEN ? 7 : 8);
|
|
||||||
else
|
|
||||||
return (guiCurrentItemDescriptionScreen == MAP_SCREEN ? 6 : 5);
|
|
||||||
}else{
|
|
||||||
if(UsingNewAttachmentSystem()==true && UsingEDBSystem() > 0 && Item[gpItemDescObject->usItem].usItemClass != IC_MONEY)
|
|
||||||
return (guiCurrentItemDescriptionScreen == MAP_SCREEN ? 8 : 9);
|
|
||||||
else if(UsingNewAttachmentSystem()==true && Item[gpItemDescObject->usItem].usItemClass != IC_MONEY)
|
|
||||||
return (guiCurrentItemDescriptionScreen == MAP_SCREEN ? 6 : 5);
|
|
||||||
else
|
|
||||||
return (guiCurrentItemDescriptionScreen == MAP_SCREEN ? 1 : 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
INT8 DetermineShowBox( )
|
INT8 DetermineShowBox( )
|
||||||
{
|
{
|
||||||
INT8 bShowBox = 0;
|
INT8 bShowBox = 0;
|
||||||
@@ -4441,7 +4453,7 @@ INT8 DetermineShowBox( )
|
|||||||
if(gpItemDescObject == NULL)
|
if(gpItemDescObject == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if(iResolution == 0)
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if(UsingEDBSystem() <= 0)
|
if(UsingEDBSystem() <= 0)
|
||||||
@@ -4593,7 +4605,7 @@ INT8 DetermineShowLBE( )
|
|||||||
if(gpItemDescObject == NULL)
|
if(gpItemDescObject == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if(iResolution == 0)
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if(!UsingNewInventorySystem())
|
if(!UsingNewInventorySystem())
|
||||||
@@ -4731,7 +4743,18 @@ void RenderItemDescriptionBox( )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(guiItemDescBoxBackground != 0)
|
if(guiItemDescBoxBackground != 0)
|
||||||
BltVideoObjectFromIndex( guiSAVEBUFFER, guiItemDescBoxBackground, iResolution, SM_ITEMDESC_START_X, SM_ITEMDESC_START_Y, VO_BLT_SRCTRANSPARENCY, NULL );
|
{
|
||||||
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
|
BltVideoObjectFromIndex( guiSAVEBUFFER, guiItemDescBoxBackground, 0, SM_ITEMDESC_START_X, SM_ITEMDESC_START_Y, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||||
|
else if (iResolution < _1024x768)
|
||||||
|
BltVideoObjectFromIndex( guiSAVEBUFFER, guiItemDescBoxBackground, 1, SM_ITEMDESC_START_X, SM_ITEMDESC_START_Y, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||||
|
else
|
||||||
|
BltVideoObjectFromIndex( guiSAVEBUFFER, guiItemDescBoxBackground, 2, SM_ITEMDESC_START_X, SM_ITEMDESC_START_Y, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||||
|
|
||||||
|
// WANNE: Yes here we want to overlay image!
|
||||||
|
//ShadowNIVPanel();
|
||||||
|
}
|
||||||
|
|
||||||
BltVideoObjectFromIndex( guiSAVEBUFFER, guiItemDescBox, showBox, gsInvDescX, gsInvDescY, VO_BLT_SRCTRANSPARENCY, NULL );
|
BltVideoObjectFromIndex( guiSAVEBUFFER, guiItemDescBox, showBox, gsInvDescX, gsInvDescY, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4844,6 +4867,18 @@ void RenderItemDescriptionBox( )
|
|||||||
sCenX = sCenX + gItemDescAttachmentsXY[cnt].sBarDx;
|
sCenX = sCenX + gItemDescAttachmentsXY[cnt].sBarDx;
|
||||||
sCenY = sCenY + gItemDescAttachmentsXY[cnt].sBarDy;
|
sCenY = sCenY + gItemDescAttachmentsXY[cnt].sBarDy;
|
||||||
DrawItemUIBarEx( gpItemDescObject, (UINT8)(DRAW_ITEM_STATUS_ATTACHMENT1 + cnt), sCenX, sCenY, ITEM_BAR_WIDTH, ITEM_BAR_HEIGHT, Get16BPPColor( STATUS_BAR ), Get16BPPColor( STATUS_BAR_SHADOW ), TRUE , guiSAVEBUFFER, gubItemDescStatusIndex );
|
DrawItemUIBarEx( gpItemDescObject, (UINT8)(DRAW_ITEM_STATUS_ATTACHMENT1 + cnt), sCenX, sCenY, ITEM_BAR_WIDTH, ITEM_BAR_HEIGHT, Get16BPPColor( STATUS_BAR ), Get16BPPColor( STATUS_BAR_SHADOW ), TRUE , guiSAVEBUFFER, gubItemDescStatusIndex );
|
||||||
|
|
||||||
|
if ( gGameOptions.fWeaponOverheating && ( Item[ (iter)->usItem ].usItemClass & (IC_GUN|IC_LAUNCHER) || Item[ (iter)->usItem ].barrel == TRUE) ) // Flugente FTW 1.1
|
||||||
|
{
|
||||||
|
FLOAT overheatjampercentage = GetGunOverheatJamPercentage( &(*iter));
|
||||||
|
|
||||||
|
UINT32 red, green, blue;
|
||||||
|
UINT8 TemperatureStringNum = GetTemperatureString( overheatjampercentage, &red, &green, &blue );
|
||||||
|
|
||||||
|
UINT16 colour = Get16BPPColor( FROMRGB( red, green, blue ) );
|
||||||
|
|
||||||
|
DrawItemUIBarEx( &(*iter), DRAW_ITEM_TEMPERATURE, sCenX+4, sCenY, ITEM_BAR_WIDTH, ITEM_BAR_HEIGHT, colour, colour, TRUE, guiSAVEBUFFER );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4998,6 +5033,43 @@ void RenderItemDescriptionBox( )
|
|||||||
////////// label
|
////////// label
|
||||||
if (UsingEDBSystem())
|
if (UsingEDBSystem())
|
||||||
{
|
{
|
||||||
|
// Flugente FTW 1: display temperature string
|
||||||
|
if ( gGameOptions.fWeaponOverheating && ( Item[ gpItemDescObject->usItem ].usItemClass == IC_GUN || Item[gpItemDescObject->usItem].usItemClass == IC_LAUNCHER || Item[gpItemDescObject->usItem].barrel == TRUE ) )
|
||||||
|
{
|
||||||
|
// UDB system displays a string with colored condition text.
|
||||||
|
int regionindex = 7;
|
||||||
|
SetFontForeground( ForegroundColor );
|
||||||
|
swprintf( pStr, L"%s", gTemperatureDesc[0] ); // "Temperature is "
|
||||||
|
mprintf( gItemDescTextRegions[regionindex].sLeft, gItemDescTextRegions[regionindex].sTop, pStr );
|
||||||
|
// Record length
|
||||||
|
INT16 indent = StringPixLength( gTemperatureDesc[0], ITEMDESC_FONT );
|
||||||
|
|
||||||
|
FLOAT overheatjampercentage = GetGunOverheatJamPercentage( gpItemDescObject);
|
||||||
|
|
||||||
|
UINT32 red, green, blue;
|
||||||
|
UINT8 TemperatureStringNum = GetTemperatureString( overheatjampercentage, &red, &green, &blue );
|
||||||
|
swprintf( pStr, L"%s", gTemperatureDesc[TemperatureStringNum+1 ] );
|
||||||
|
|
||||||
|
// text is coloured only in case of danger
|
||||||
|
if ( overheatjampercentage >= 1.0 )
|
||||||
|
SetRGBFontForeground( red, green, blue );
|
||||||
|
|
||||||
|
mprintf( gItemDescTextRegions[regionindex].sLeft+indent+2, gItemDescTextRegions[regionindex].sTop, pStr );
|
||||||
|
// Record length
|
||||||
|
indent += StringPixLength( gTemperatureDesc[TemperatureStringNum + 1], ITEMDESC_FONT );
|
||||||
|
|
||||||
|
SetFontForeground( ForegroundColor );
|
||||||
|
swprintf( pStr, L"%s", gTemperatureDesc[10] ); // "."
|
||||||
|
mprintf( gItemDescTextRegions[regionindex].sLeft + indent + 2, gItemDescTextRegions[regionindex].sTop, pStr );
|
||||||
|
|
||||||
|
// to get the text to the left side...
|
||||||
|
swprintf( pStr, L"");
|
||||||
|
|
||||||
|
FindFontRightCoordinates( gItemDescTextRegions[regionindex].sLeft, gItemDescTextRegions[regionindex].sTop, gItemDescTextRegions[regionindex].sRight - gItemDescTextRegions[regionindex].sLeft ,gItemDescTextRegions[regionindex].sBottom - gItemDescTextRegions[regionindex].sTop ,pStr, BLOCKFONT2, &usX, &usY);
|
||||||
|
|
||||||
|
mprintf( usX, usY, pStr );
|
||||||
|
}
|
||||||
|
|
||||||
// UDB system displays a string with colored condition text.
|
// UDB system displays a string with colored condition text.
|
||||||
SetFontForeground( ForegroundColor );
|
SetFontForeground( ForegroundColor );
|
||||||
swprintf( pStr, L"%s", gConditionDesc[0] ); // "In "
|
swprintf( pStr, L"%s", gConditionDesc[0] ); // "In "
|
||||||
@@ -5508,7 +5580,7 @@ void RenderLBENODEItems( OBJECTTYPE *pObj, int subObject )
|
|||||||
int usX, usY;
|
int usX, usY;
|
||||||
|
|
||||||
// Start by verifying that this item is an LBENODE
|
// Start by verifying that this item is an LBENODE
|
||||||
if(Item[pObj->usItem].usItemClass != IC_LBEGEAR || iResolution == 0)
|
if(Item[pObj->usItem].usItemClass != IC_LBEGEAR || (iResolution >= _640x480 && iResolution < _800x600))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Set selected merc
|
// Set selected merc
|
||||||
@@ -7058,6 +7130,7 @@ BOOLEAN InitItemStackPopup( SOLDIERTYPE *pSoldier, UINT8 ubPosition, INT16 sInvX
|
|||||||
INT16 sItemWidth = 0;
|
INT16 sItemWidth = 0;
|
||||||
static CHAR16 pStr[ 512 ];
|
static CHAR16 pStr[ 512 ];
|
||||||
|
|
||||||
|
//sOffSetX = xResOffset;
|
||||||
|
|
||||||
RenderBackpackButtons(DEACTIVATE_BUTTON); /* CHRISL: Needed for new inventory backpack buttons */
|
RenderBackpackButtons(DEACTIVATE_BUTTON); /* CHRISL: Needed for new inventory backpack buttons */
|
||||||
if( guiCurrentScreen == MAP_SCREEN )
|
if( guiCurrentScreen == MAP_SCREEN )
|
||||||
@@ -7071,7 +7144,7 @@ BOOLEAN InitItemStackPopup( SOLDIERTYPE *pSoldier, UINT8 ubPosition, INT16 sInvX
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set some globals
|
// Set some globals
|
||||||
gsItemPopupInvX = sInvX;
|
gsItemPopupInvX = sInvX + xResOffset;
|
||||||
gsItemPopupInvY = sInvY;
|
gsItemPopupInvY = sInvY;
|
||||||
gsItemPopupInvWidth = sInvWidth;
|
gsItemPopupInvWidth = sInvWidth;
|
||||||
gsItemPopupInvHeight = sInvHeight;
|
gsItemPopupInvHeight = sInvHeight;
|
||||||
@@ -7094,14 +7167,14 @@ BOOLEAN InitItemStackPopup( SOLDIERTYPE *pSoldier, UINT8 ubPosition, INT16 sInvX
|
|||||||
strcpy( VObjectDesc.ImageFile, "INTERFACE\\extra_inventory.STI" );
|
strcpy( VObjectDesc.ImageFile, "INTERFACE\\extra_inventory.STI" );
|
||||||
CHECKF( AddVideoObject( &VObjectDesc, &guiItemPopupBoxes) );
|
CHECKF( AddVideoObject( &VObjectDesc, &guiItemPopupBoxes) );
|
||||||
|
|
||||||
if(UsingNewInventorySystem() == true)
|
//if(UsingNewInventorySystem() == true)
|
||||||
{
|
//{
|
||||||
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
// /*VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
||||||
strcpy( VObjectDesc.ImageFile, "INTERFACE\\infobox_background.sti" );
|
// strcpy( VObjectDesc.ImageFile, "INTERFACE\\infobox_background.sti" );
|
||||||
CHECKF( AddVideoObject( &VObjectDesc, &guiItemDescBoxBackground) );
|
// CHECKF( AddVideoObject( &VObjectDesc, &guiItemDescBoxBackground) );*/
|
||||||
}
|
//}
|
||||||
else
|
//else
|
||||||
guiItemDescBoxBackground = 0;
|
// guiItemDescBoxBackground = 0;
|
||||||
|
|
||||||
// Get size
|
// Get size
|
||||||
GetVideoObject( &hVObject, guiItemPopupBoxes );
|
GetVideoObject( &hVObject, guiItemPopupBoxes );
|
||||||
@@ -7205,7 +7278,7 @@ BOOLEAN InitItemStackPopup( SOLDIERTYPE *pSoldier, UINT8 ubPosition, INT16 sInvX
|
|||||||
gfInItemStackPopup = TRUE;
|
gfInItemStackPopup = TRUE;
|
||||||
|
|
||||||
//Reserict mouse cursor to panel
|
//Reserict mouse cursor to panel
|
||||||
aRect.iLeft = sInvX + sOffSetX;
|
aRect.iLeft = sInvX + xResOffset;
|
||||||
aRect.iTop = sInvY + sOffSetY;
|
aRect.iTop = sInvY + sOffSetY;
|
||||||
aRect.iRight = aRect.iLeft + sItemWidth * usPopupWidth;
|
aRect.iRight = aRect.iLeft + sItemWidth * usPopupWidth;
|
||||||
aRect.iBottom = aRect.iTop + (INT32)(ceil((float)cnt/(float)sItemWidth)+1) * usPopupHeight;
|
aRect.iBottom = aRect.iTop + (INT32)(ceil((float)cnt/(float)sItemWidth)+1) * usPopupHeight;
|
||||||
@@ -7227,9 +7300,39 @@ void EndItemStackPopupWithItemInHand( )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ShadowNIVPanel()
|
||||||
|
{
|
||||||
|
// WANNE: Instead of blitting the sti overlap interface, shade the inventory. Looks much better and is the same than in OIV
|
||||||
|
UINT16 startX1, startX2, startX3;
|
||||||
|
UINT16 startY1, startY2, startY3;
|
||||||
|
UINT16 endX1, endX2, endX3;
|
||||||
|
UINT16 endY1, endY2, endY3;
|
||||||
|
|
||||||
|
// First rectangle
|
||||||
|
startX1 = gsItemPopupInvX;
|
||||||
|
startY1 = gsItemPopupInvY;
|
||||||
|
endX1 = SCREEN_WIDTH - xResOffset;
|
||||||
|
endY1 = startY1 + 109;
|
||||||
|
ShadowVideoSurfaceRect( FRAME_BUFFER, startX1, startY1, endX1 , endY1 );
|
||||||
|
|
||||||
|
// Second rectangle
|
||||||
|
startX2 = startX1;
|
||||||
|
startY2 = endY1;
|
||||||
|
endX2 = SCREEN_WIDTH - xResOffset - 155;
|
||||||
|
endY2 = SCREEN_HEIGHT;
|
||||||
|
ShadowVideoSurfaceRect( FRAME_BUFFER, startX2, startY2, endX2 , endY2 );
|
||||||
|
|
||||||
|
// Third rectangle
|
||||||
|
startX3 = startX1 - 140;
|
||||||
|
startY3 = startY1 + 65;
|
||||||
|
endX3 = startX3 + 140;
|
||||||
|
endY3 = SCREEN_HEIGHT;
|
||||||
|
ShadowVideoSurfaceRect( FRAME_BUFFER, startX3, startY3, endX3 , endY3 );
|
||||||
|
}
|
||||||
|
|
||||||
void RenderItemStackPopup( BOOLEAN fFullRender )
|
void RenderItemStackPopup( BOOLEAN fFullRender )
|
||||||
{
|
{
|
||||||
ETRLEObject *pTrav;
|
ETRLEObject *pTrav;
|
||||||
UINT32 usHeight, usWidth;
|
UINT32 usHeight, usWidth;
|
||||||
HVOBJECT hVObject;
|
HVOBJECT hVObject;
|
||||||
UINT32 cnt;
|
UINT32 cnt;
|
||||||
@@ -7261,8 +7364,20 @@ void RenderItemStackPopup( BOOLEAN fFullRender )
|
|||||||
{
|
{
|
||||||
if(UsingNewInventorySystem() == false || guiCurrentScreen == MAP_SCREEN)
|
if(UsingNewInventorySystem() == false || guiCurrentScreen == MAP_SCREEN)
|
||||||
ShadowVideoSurfaceRect( FRAME_BUFFER, gsItemPopupInvX, gsItemPopupInvY, gsItemPopupInvX + gsItemPopupInvWidth , gsItemPopupInvY + gsItemPopupInvHeight );
|
ShadowVideoSurfaceRect( FRAME_BUFFER, gsItemPopupInvX, gsItemPopupInvY, gsItemPopupInvX + gsItemPopupInvWidth , gsItemPopupInvY + gsItemPopupInvHeight );
|
||||||
else if(UsingNewInventorySystem() == true && iResolution != 0 && guiItemDescBoxBackground != 0 && guiCurrentScreen != MAP_SCREEN)
|
else if(UsingNewInventorySystem() == true && iResolution >= _800x600 /* && guiItemDescBoxBackground != 0 */ && guiCurrentScreen != MAP_SCREEN)
|
||||||
BltVideoObjectFromIndex( FRAME_BUFFER, guiItemDescBoxBackground, iResolution, SM_ITEMDESC_START_X, SM_ITEMDESC_START_Y, VO_BLT_SRCTRANSPARENCY, NULL );
|
{
|
||||||
|
ShadowNIVPanel();
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
if(iResolution >= _640x480 && iResolution < _800x600)
|
||||||
|
BltVideoObjectFromIndex( FRAME_BUFFER, guiItemDescBoxBackground, 0, SM_ITEMDESC_START_X, SM_ITEMDESC_START_Y, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||||
|
else if (iResolution < _1024x768)
|
||||||
|
BltVideoObjectFromIndex( FRAME_BUFFER, guiItemDescBoxBackground, 1, SM_ITEMDESC_START_X, SM_ITEMDESC_START_Y, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||||
|
else
|
||||||
|
BltVideoObjectFromIndex( FRAME_BUFFER, guiItemDescBoxBackground, 2, SM_ITEMDESC_START_X, SM_ITEMDESC_START_Y, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||||
|
*/
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -7324,7 +7439,7 @@ void RenderItemStackPopup( BOOLEAN fFullRender )
|
|||||||
}
|
}
|
||||||
|
|
||||||
//RestoreExternBackgroundRect( gsItemPopupInvX, gsItemPopupInvY, gsItemPopupInvWidth, gsItemPopupInvHeight );
|
//RestoreExternBackgroundRect( gsItemPopupInvX, gsItemPopupInvY, gsItemPopupInvWidth, gsItemPopupInvHeight );
|
||||||
InvalidateRegion( gsItemPopupInvX, gsItemPopupInvY, gsItemPopupInvX + gsItemPopupInvWidth, gsItemPopupInvY + gsItemPopupInvHeight );
|
InvalidateRegion( gsItemPopupInvX, INV_REGION_Y, gsItemPopupInvX + gsItemPopupInvWidth, INV_REGION_Y + gsItemPopupInvHeight );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -7387,16 +7502,16 @@ BOOLEAN InitKeyRingPopup( SOLDIERTYPE *pSoldier, INT16 sInvX, INT16 sInvY, INT16
|
|||||||
RenderBackpackButtons(DEACTIVATE_BUTTON); /* CHRISL: Needed for new inventory backpack buttons */
|
RenderBackpackButtons(DEACTIVATE_BUTTON); /* CHRISL: Needed for new inventory backpack buttons */
|
||||||
if( guiCurrentScreen == MAP_SCREEN )
|
if( guiCurrentScreen == MAP_SCREEN )
|
||||||
{
|
{
|
||||||
gsKeyRingPopupInvX = 0;
|
gsKeyRingPopupInvX = xResOffset;
|
||||||
sKeyRingItemWidth = MAP_KEY_RING_ROW_WIDTH;
|
sKeyRingItemWidth = MAP_KEY_RING_ROW_WIDTH;
|
||||||
sOffSetX = 40;
|
sOffSetX = 40;
|
||||||
sOffSetY = 15;
|
sOffSetY = 15;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Set some globals
|
// Set some globals
|
||||||
gsKeyRingPopupInvX = sInvX + TACTICAL_INVENTORY_KEYRING_GRAPHIC_OFFSET_X;
|
gsKeyRingPopupInvX = xResOffset + sInvX + TACTICAL_INVENTORY_KEYRING_GRAPHIC_OFFSET_X;
|
||||||
sKeyRingItemWidth = KEY_RING_ROW_WIDTH;
|
sKeyRingItemWidth = KEY_RING_ROW_WIDTH;
|
||||||
sOffSetY = 8;
|
sOffSetY = 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -7413,9 +7528,9 @@ BOOLEAN InitKeyRingPopup( SOLDIERTYPE *pSoldier, INT16 sInvX, INT16 sInvY, INT16
|
|||||||
|
|
||||||
if(UsingNewInventorySystem() == true)
|
if(UsingNewInventorySystem() == true)
|
||||||
{
|
{
|
||||||
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
/*VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
||||||
strcpy( VObjectDesc.ImageFile, "INTERFACE\\infobox_background.sti" );
|
strcpy( VObjectDesc.ImageFile, "INTERFACE\\infobox_background.sti" );
|
||||||
CHECKF( AddVideoObject( &VObjectDesc, &guiItemDescBoxBackground) );
|
CHECKF( AddVideoObject( &VObjectDesc, &guiItemDescBoxBackground) );*/
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
guiItemDescBoxBackground = 0;
|
guiItemDescBoxBackground = 0;
|
||||||
@@ -7513,10 +7628,20 @@ void RenderKeyRingPopup( BOOLEAN fFullRender )
|
|||||||
{
|
{
|
||||||
if(UsingNewInventorySystem() == false || guiCurrentScreen == MAP_SCREEN)
|
if(UsingNewInventorySystem() == false || guiCurrentScreen == MAP_SCREEN)
|
||||||
ShadowVideoSurfaceRect( FRAME_BUFFER, 0, gsKeyRingPopupInvY, gsKeyRingPopupInvX + gsKeyRingPopupInvWidth , gsKeyRingPopupInvY + gsKeyRingPopupInvHeight );
|
ShadowVideoSurfaceRect( FRAME_BUFFER, 0, gsKeyRingPopupInvY, gsKeyRingPopupInvX + gsKeyRingPopupInvWidth , gsKeyRingPopupInvY + gsKeyRingPopupInvHeight );
|
||||||
else if(UsingNewInventorySystem() == true && iResolution != 0 && guiItemDescBoxBackground != 0 && guiCurrentScreen != MAP_SCREEN)
|
else if(UsingNewInventorySystem() == true && iResolution >= _800x600 /* && guiItemDescBoxBackground != 0 */ && guiCurrentScreen != MAP_SCREEN)
|
||||||
BltVideoObjectFromIndex( FRAME_BUFFER, guiItemDescBoxBackground, iResolution, SM_ITEMDESC_START_X, SM_ITEMDESC_START_Y, VO_BLT_SRCTRANSPARENCY, NULL );
|
{
|
||||||
}
|
ShadowNIVPanel();
|
||||||
|
|
||||||
|
/*
|
||||||
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
|
BltVideoObjectFromIndex( FRAME_BUFFER, guiItemDescBoxBackground, 0, SM_ITEMDESC_START_X, SM_ITEMDESC_START_Y, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||||
|
else if (iResolution < _1024x768)
|
||||||
|
BltVideoObjectFromIndex( FRAME_BUFFER, guiItemDescBoxBackground, 1, SM_ITEMDESC_START_X, SM_ITEMDESC_START_Y, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||||
|
else
|
||||||
|
BltVideoObjectFromIndex( FRAME_BUFFER, guiItemDescBoxBackground, 2, SM_ITEMDESC_START_X, SM_ITEMDESC_START_Y, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gTempObject.usItem = KEY_1;
|
gTempObject.usItem = KEY_1;
|
||||||
@@ -7626,11 +7751,42 @@ UINT32 GetInterfaceGraphicForItem( INVTYPE *pItem )
|
|||||||
SGP_TRYCATCH_RETHROW( id = g_bUsePngItemImages ? g_oP2ITEMS.getVObjectForItem(pItem->ubGraphicNum) : guiP2ITEMS,
|
SGP_TRYCATCH_RETHROW( id = g_bUsePngItemImages ? g_oP2ITEMS.getVObjectForItem(pItem->ubGraphicNum) : guiP2ITEMS,
|
||||||
L"Failed to retrieve P2 item image" );
|
L"Failed to retrieve P2 item image" );
|
||||||
}
|
}
|
||||||
else
|
else if ( pItem->ubGraphicType == 3 )
|
||||||
{
|
{
|
||||||
SGP_TRYCATCH_RETHROW( id = g_bUsePngItemImages ? g_oP3ITEMS.getVObjectForItem(pItem->ubGraphicNum) : guiP3ITEMS,
|
SGP_TRYCATCH_RETHROW( id = g_bUsePngItemImages ? g_oP3ITEMS.getVObjectForItem(pItem->ubGraphicNum) : guiP3ITEMS,
|
||||||
L"Failed to retrieve P3 item image" );
|
L"Failed to retrieve P3 item image" );
|
||||||
}
|
}
|
||||||
|
//MM: New item tileslots start here
|
||||||
|
else if ( pItem->ubGraphicType == 4 )
|
||||||
|
{
|
||||||
|
SGP_TRYCATCH_RETHROW( id = g_bUsePngItemImages ? g_oP4ITEMS.getVObjectForItem(pItem->ubGraphicNum) : guiP4ITEMS,
|
||||||
|
L"Failed to retrieve P4 item image" );
|
||||||
|
}
|
||||||
|
else if ( pItem->ubGraphicType == 5 )
|
||||||
|
{
|
||||||
|
SGP_TRYCATCH_RETHROW( id = g_bUsePngItemImages ? g_oP5ITEMS.getVObjectForItem(pItem->ubGraphicNum) : guiP5ITEMS,
|
||||||
|
L"Failed to retrieve P5 item image" );
|
||||||
|
}
|
||||||
|
else if ( pItem->ubGraphicType == 6 )
|
||||||
|
{
|
||||||
|
SGP_TRYCATCH_RETHROW( id = g_bUsePngItemImages ? g_oP6ITEMS.getVObjectForItem(pItem->ubGraphicNum) : guiP6ITEMS,
|
||||||
|
L"Failed to retrieve P6 item image" );
|
||||||
|
}
|
||||||
|
else if ( pItem->ubGraphicType == 7 )
|
||||||
|
{
|
||||||
|
SGP_TRYCATCH_RETHROW( id = g_bUsePngItemImages ? g_oP7ITEMS.getVObjectForItem(pItem->ubGraphicNum) : guiP7ITEMS,
|
||||||
|
L"Failed to retrieve P7 item image" );
|
||||||
|
}
|
||||||
|
else if ( pItem->ubGraphicType == 8 )
|
||||||
|
{
|
||||||
|
SGP_TRYCATCH_RETHROW( id = g_bUsePngItemImages ? g_oP8ITEMS.getVObjectForItem(pItem->ubGraphicNum) : guiP8ITEMS,
|
||||||
|
L"Failed to retrieve P8 item image" );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SGP_TRYCATCH_RETHROW( id = g_bUsePngItemImages ? g_oP9ITEMS.getVObjectForItem(pItem->ubGraphicNum) : guiP9ITEMS,
|
||||||
|
L"Failed to retrieve P9 item image" );
|
||||||
|
}
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -7654,10 +7810,35 @@ UINT16 GetTileGraphicForItem( INVTYPE *pItem )
|
|||||||
{
|
{
|
||||||
GetTileIndexFromTypeSubIndex( P2ITEMS, (INT16)(pItem->ubGraphicNum+1), &usIndex );
|
GetTileIndexFromTypeSubIndex( P2ITEMS, (INT16)(pItem->ubGraphicNum+1), &usIndex );
|
||||||
}
|
}
|
||||||
else
|
else if ( pItem->ubGraphicType == 3 )
|
||||||
{
|
{
|
||||||
GetTileIndexFromTypeSubIndex( P3ITEMS, (INT16)(pItem->ubGraphicNum+1), &usIndex );
|
GetTileIndexFromTypeSubIndex( P3ITEMS, (INT16)(pItem->ubGraphicNum+1), &usIndex );
|
||||||
}
|
}
|
||||||
|
//MM: New item tileslots start here
|
||||||
|
else if ( pItem->ubGraphicType == 4 )
|
||||||
|
{
|
||||||
|
GetTileIndexFromTypeSubIndex( P4ITEMS, (INT16)(pItem->ubGraphicNum+1), &usIndex );
|
||||||
|
}
|
||||||
|
else if ( pItem->ubGraphicType == 5 )
|
||||||
|
{
|
||||||
|
GetTileIndexFromTypeSubIndex( P5ITEMS, (INT16)(pItem->ubGraphicNum+1), &usIndex );
|
||||||
|
}
|
||||||
|
else if ( pItem->ubGraphicType == 6 )
|
||||||
|
{
|
||||||
|
GetTileIndexFromTypeSubIndex( P6ITEMS, (INT16)(pItem->ubGraphicNum+1), &usIndex );
|
||||||
|
}
|
||||||
|
else if ( pItem->ubGraphicType == 7 )
|
||||||
|
{
|
||||||
|
GetTileIndexFromTypeSubIndex( P7ITEMS, (INT16)(pItem->ubGraphicNum+1), &usIndex );
|
||||||
|
}
|
||||||
|
else if ( pItem->ubGraphicType == 8 )
|
||||||
|
{
|
||||||
|
GetTileIndexFromTypeSubIndex( P8ITEMS, (INT16)(pItem->ubGraphicNum+1), &usIndex );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
GetTileIndexFromTypeSubIndex( P9ITEMS, (INT16)(pItem->ubGraphicNum+1), &usIndex );
|
||||||
|
}
|
||||||
|
|
||||||
if ( pItem->ubClassIndex >= M900 )
|
if ( pItem->ubClassIndex >= M900 )
|
||||||
DebugMsg(TOPIC_JA2, DBG_LEVEL_3, String("GetTileGraphicForItem: db index %d",usIndex));
|
DebugMsg(TOPIC_JA2, DBG_LEVEL_3, String("GetTileGraphicForItem: db index %d",usIndex));
|
||||||
@@ -7715,22 +7896,7 @@ BOOLEAN LoadTileGraphicForItem( INVTYPE *pItem, UINT32 *puiVo )
|
|||||||
sprintf( zName, "p2item%d", ubGraphic );
|
sprintf( zName, "p2item%d", ubGraphic );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
else if ( pItem->ubGraphicType == 3 )
|
||||||
#ifdef JA2UB
|
|
||||||
else if ( pItem->ubGraphicType == 9 ) // UB Items
|
|
||||||
{
|
|
||||||
if ( ubGraphic < 10 )
|
|
||||||
{
|
|
||||||
sprintf( zName, "GUN_UB0%d", ubGraphic );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sprintf( zName, "GUN_UB%d", ubGraphic );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
*/
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
if ( ubGraphic < 10 )
|
if ( ubGraphic < 10 )
|
||||||
{
|
{
|
||||||
@@ -7741,6 +7907,73 @@ BOOLEAN LoadTileGraphicForItem( INVTYPE *pItem, UINT32 *puiVo )
|
|||||||
sprintf( zName, "p3item%d", ubGraphic );
|
sprintf( zName, "p3item%d", ubGraphic );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//MM: New item tileslots start here
|
||||||
|
else if ( pItem->ubGraphicType == 4 )
|
||||||
|
{
|
||||||
|
if ( ubGraphic < 10 )
|
||||||
|
{
|
||||||
|
sprintf( zName, "p4item0%d", ubGraphic );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sprintf( zName, "p4item%d", ubGraphic );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ( pItem->ubGraphicType == 5 )
|
||||||
|
{
|
||||||
|
if ( ubGraphic < 10 )
|
||||||
|
{
|
||||||
|
sprintf( zName, "p5item0%d", ubGraphic );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sprintf( zName, "p5item%d", ubGraphic );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ( pItem->ubGraphicType == 6 )
|
||||||
|
{
|
||||||
|
if ( ubGraphic < 10 )
|
||||||
|
{
|
||||||
|
sprintf( zName, "p6item0%d", ubGraphic );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sprintf( zName, "p6item%d", ubGraphic );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ( pItem->ubGraphicType == 7 )
|
||||||
|
{
|
||||||
|
if ( ubGraphic < 10 )
|
||||||
|
{
|
||||||
|
sprintf( zName, "p7item0%d", ubGraphic );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sprintf( zName, "p7item%d", ubGraphic );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ( pItem->ubGraphicType == 8 )
|
||||||
|
{
|
||||||
|
if ( ubGraphic < 10 )
|
||||||
|
{
|
||||||
|
sprintf( zName, "p8item0%d", ubGraphic );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sprintf( zName, "p8item%d", ubGraphic );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( ubGraphic < 10 )
|
||||||
|
{
|
||||||
|
sprintf( zName, "p9item0%d", ubGraphic );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sprintf( zName, "p9item%d", ubGraphic );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//Load item
|
//Load item
|
||||||
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
#define HEAD_INV_SLOT_HEIGHT 24
|
#define HEAD_INV_SLOT_HEIGHT 24
|
||||||
|
|
||||||
#define NUM_UDB_GEN_LINES 12
|
#define NUM_UDB_GEN_LINES 12
|
||||||
#define NUM_UDB_ADV_LINES 12
|
#define NUM_UDB_ADV_LINES 13 // Flugente FTW 1.1: 12->13
|
||||||
|
|
||||||
// HEADROCK HAM 4: These rectangle definitions are used in UDB to determine locations for icons, data, and tooltip
|
// HEADROCK HAM 4: These rectangle definitions are used in UDB to determine locations for icons, data, and tooltip
|
||||||
// regions. They replace the plethora of region data provided in EDB.
|
// regions. They replace the plethora of region data provided in EDB.
|
||||||
@@ -37,7 +37,7 @@ extern INV_DESC_REGIONS gItemDescGenHeaderRegions[3]; // Header text regions for
|
|||||||
extern INV_DESC_REGIONS gItemDescGenIndexRegions[3][4]; // Index text regions for various parts of the General Tab
|
extern INV_DESC_REGIONS gItemDescGenIndexRegions[3][4]; // Index text regions for various parts of the General Tab
|
||||||
extern INV_DESC_REGIONS gItemDescGenRegions[NUM_UDB_GEN_LINES * 2][4]; // Data regions, 4 sub-columns each
|
extern INV_DESC_REGIONS gItemDescGenRegions[NUM_UDB_GEN_LINES * 2][4]; // Data regions, 4 sub-columns each
|
||||||
extern INV_DESC_REGIONS gItemDescGenSecondaryRegions[26]; // Secondary data regions, 3x5 for now (possible 3x6?)
|
extern INV_DESC_REGIONS gItemDescGenSecondaryRegions[26]; // Secondary data regions, 3x5 for now (possible 3x6?)
|
||||||
extern INV_DESC_REGIONS gItemDescTextRegions[7]; // Main description regions
|
extern INV_DESC_REGIONS gItemDescTextRegions[8]; // Main description regions
|
||||||
extern INV_DESC_REGIONS gItemDescAdvIndexRegions[1][4];
|
extern INV_DESC_REGIONS gItemDescAdvIndexRegions[1][4];
|
||||||
extern INV_DESC_REGIONS gItemDescAdvRegions[NUM_UDB_ADV_LINES][4]; // Advanced data regions, 4 sub-columns each
|
extern INV_DESC_REGIONS gItemDescAdvRegions[NUM_UDB_ADV_LINES][4]; // Advanced data regions, 4 sub-columns each
|
||||||
|
|
||||||
|
|||||||
+250
-76
@@ -1404,10 +1404,16 @@ UINT16 GetSMPanelCurrentMerc( )
|
|||||||
// CHRISL: New functions to define initial settings for New Inventory system
|
// CHRISL: New functions to define initial settings for New Inventory system
|
||||||
void InitNewInventorySystem( )
|
void InitNewInventorySystem( )
|
||||||
{
|
{
|
||||||
INTERFACE_WIDTH = 640;
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
|
INTERFACE_WIDTH = 640;
|
||||||
|
else if (iResolution < _1024x768)
|
||||||
|
INTERFACE_WIDTH = 800;
|
||||||
|
else
|
||||||
|
INTERFACE_WIDTH = 1024;
|
||||||
|
|
||||||
|
INTERFACE_START_X = (SCREEN_WIDTH - INTERFACE_WIDTH)/2;
|
||||||
INTERFACE_HEIGHT = 120;
|
INTERFACE_HEIGHT = 120;
|
||||||
INV_INTERFACE_HEIGHT = 200;
|
INV_INTERFACE_HEIGHT = 200;
|
||||||
INTERFACE_START_X = 0;
|
|
||||||
INTERFACE_START_Y = ( SCREEN_HEIGHT - INTERFACE_HEIGHT );
|
INTERFACE_START_Y = ( SCREEN_HEIGHT - INTERFACE_HEIGHT );
|
||||||
INV_INTERFACE_START_Y = ( SCREEN_HEIGHT - INV_INTERFACE_HEIGHT );
|
INV_INTERFACE_START_Y = ( SCREEN_HEIGHT - INV_INTERFACE_HEIGHT );
|
||||||
}
|
}
|
||||||
@@ -1415,10 +1421,16 @@ void InitNewInventorySystem( )
|
|||||||
// CHRISL: New functions to define initial settings for Old Inventory system
|
// CHRISL: New functions to define initial settings for Old Inventory system
|
||||||
void InitOldInventorySystem( )
|
void InitOldInventorySystem( )
|
||||||
{
|
{
|
||||||
INTERFACE_WIDTH = 640;
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
|
INTERFACE_WIDTH = 640;
|
||||||
|
else if (iResolution < _1024x768)
|
||||||
|
INTERFACE_WIDTH = 800;
|
||||||
|
else
|
||||||
|
INTERFACE_WIDTH = 1024;
|
||||||
|
|
||||||
|
INTERFACE_START_X = (SCREEN_WIDTH - INTERFACE_WIDTH)/2;
|
||||||
INTERFACE_HEIGHT = 120;
|
INTERFACE_HEIGHT = 120;
|
||||||
INV_INTERFACE_HEIGHT = 140;
|
INV_INTERFACE_HEIGHT = 140;
|
||||||
INTERFACE_START_X = 0;
|
|
||||||
INTERFACE_START_Y = ( SCREEN_HEIGHT - INTERFACE_HEIGHT );
|
INTERFACE_START_Y = ( SCREEN_HEIGHT - INTERFACE_HEIGHT );
|
||||||
INV_INTERFACE_START_Y = ( SCREEN_HEIGHT - INV_INTERFACE_HEIGHT );
|
INV_INTERFACE_START_Y = ( SCREEN_HEIGHT - INV_INTERFACE_HEIGHT );
|
||||||
}
|
}
|
||||||
@@ -1532,9 +1544,12 @@ BOOLEAN InitializeSMPanelCoordsOld()
|
|||||||
SM_STEALTHMODE_X = ( 187 + INTERFACE_START_X );
|
SM_STEALTHMODE_X = ( 187 + INTERFACE_START_X );
|
||||||
SM_STEALTHMODE_Y = ( 73 + INV_INTERFACE_START_Y );
|
SM_STEALTHMODE_Y = ( 73 + INV_INTERFACE_START_Y );
|
||||||
|
|
||||||
SM_DONE_X = (SCREEN_WIDTH - 97);//( 543 + INTERFACE_START_X );
|
SM_DONE_X = xResOffset + (xResSize - 97);
|
||||||
|
SM_MAPSCREEN_X = xResOffset + (xResSize - 51);
|
||||||
|
INTERFACE_CLOCK_X = xResOffset + (xResSize - 86);
|
||||||
|
LOCATION_NAME_X = xResOffset + (xResSize - 92);
|
||||||
|
|
||||||
SM_DONE_Y = ( 4 + INV_INTERFACE_START_Y );
|
SM_DONE_Y = ( 4 + INV_INTERFACE_START_Y );
|
||||||
SM_MAPSCREEN_X = (SCREEN_WIDTH - 51);//( 589 + INTERFACE_START_X );
|
|
||||||
SM_MAPSCREEN_Y = ( 4 + INV_INTERFACE_START_Y );
|
SM_MAPSCREEN_Y = ( 4 + INV_INTERFACE_START_Y );
|
||||||
|
|
||||||
SM_POSITIONB_X = ( 106 + INTERFACE_START_X );
|
SM_POSITIONB_X = ( 106 + INTERFACE_START_X );
|
||||||
@@ -1598,13 +1613,11 @@ BOOLEAN InitializeSMPanelCoordsOld()
|
|||||||
STATS_TEXT_FONT_COLOR = 5;
|
STATS_TEXT_FONT_COLOR = 5;
|
||||||
|
|
||||||
// ow and te clock and location i will put it here
|
// ow and te clock and location i will put it here
|
||||||
INTERFACE_CLOCK_X = (SCREEN_WIDTH - 86); //( 554 + INTERFACE_START_X );
|
|
||||||
INTERFACE_CLOCK_Y = ( 119 + INV_INTERFACE_START_Y );
|
INTERFACE_CLOCK_Y = ( 119 + INV_INTERFACE_START_Y );
|
||||||
LOCATION_NAME_X = (SCREEN_WIDTH - 92); //( 548 + INTERFACE_START_X );
|
|
||||||
LOCATION_NAME_Y = ( 65 + INTERFACE_START_Y );
|
LOCATION_NAME_Y = ( 65 + INTERFACE_START_Y );
|
||||||
|
|
||||||
// Keyring
|
// Keyring
|
||||||
KEYRING_X = 494; //487;
|
KEYRING_X = xResOffset + 494;
|
||||||
KEYRING_Y = (105 + INV_INTERFACE_START_Y);
|
KEYRING_Y = (105 + INV_INTERFACE_START_Y);
|
||||||
|
|
||||||
// so we got everything "dynamic" now we just return TRUE
|
// so we got everything "dynamic" now we just return TRUE
|
||||||
@@ -1623,7 +1636,8 @@ BOOLEAN InitializeSMPanelCoordsNew()
|
|||||||
to allow the new inventory interface to function properly. Also altered many of the interface coords
|
to allow the new inventory interface to function properly. Also altered many of the interface coords
|
||||||
so that the new interface would line up correctly.*/
|
so that the new interface would line up correctly.*/
|
||||||
// Inventory slots
|
// Inventory slots
|
||||||
if(iResolution == 0){
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
|
{
|
||||||
gSMInvPocketXY[0].sX = INTERFACE_START_X + 239; gSMInvPocketXY[0].sY = INV_INTERFACE_START_Y + 68; // HELMETPOS
|
gSMInvPocketXY[0].sX = INTERFACE_START_X + 239; gSMInvPocketXY[0].sY = INV_INTERFACE_START_Y + 68; // HELMETPOS
|
||||||
gSMInvPocketXY[1].sX = INTERFACE_START_X + 239; gSMInvPocketXY[1].sY = INV_INTERFACE_START_Y + 96; // VESTPOS
|
gSMInvPocketXY[1].sX = INTERFACE_START_X + 239; gSMInvPocketXY[1].sY = INV_INTERFACE_START_Y + 96; // VESTPOS
|
||||||
gSMInvPocketXY[2].sX = INTERFACE_START_X + 239; gSMInvPocketXY[2].sY = INV_INTERFACE_START_Y + 157; // LEGPOS
|
gSMInvPocketXY[2].sX = INTERFACE_START_X + 239; gSMInvPocketXY[2].sY = INV_INTERFACE_START_Y + 157; // LEGPOS
|
||||||
@@ -1680,7 +1694,8 @@ BOOLEAN InitializeSMPanelCoordsNew()
|
|||||||
gSMInvPocketXY[53].sX = INTERFACE_START_X + 559; gSMInvPocketXY[53].sY = INV_INTERFACE_START_Y + 58; // SMALLPOCK29
|
gSMInvPocketXY[53].sX = INTERFACE_START_X + 559; gSMInvPocketXY[53].sY = INV_INTERFACE_START_Y + 58; // SMALLPOCK29
|
||||||
gSMInvPocketXY[54].sX = INTERFACE_START_X + 559; gSMInvPocketXY[54].sY = INV_INTERFACE_START_Y + 82; // SMALLPOCK30
|
gSMInvPocketXY[54].sX = INTERFACE_START_X + 559; gSMInvPocketXY[54].sY = INV_INTERFACE_START_Y + 82; // SMALLPOCK30
|
||||||
}
|
}
|
||||||
else if(iResolution == 1){
|
else if (iResolution < _1024x768)
|
||||||
|
{
|
||||||
gSMInvPocketXY[0].sX = INTERFACE_START_X + 258; gSMInvPocketXY[0].sY = INV_INTERFACE_START_Y + 68; // HELMETPOS
|
gSMInvPocketXY[0].sX = INTERFACE_START_X + 258; gSMInvPocketXY[0].sY = INV_INTERFACE_START_Y + 68; // HELMETPOS
|
||||||
gSMInvPocketXY[1].sX = INTERFACE_START_X + 258; gSMInvPocketXY[1].sY = INV_INTERFACE_START_Y + 97; // VESTPOS
|
gSMInvPocketXY[1].sX = INTERFACE_START_X + 258; gSMInvPocketXY[1].sY = INV_INTERFACE_START_Y + 97; // VESTPOS
|
||||||
gSMInvPocketXY[2].sX = INTERFACE_START_X + 258; gSMInvPocketXY[2].sY = INV_INTERFACE_START_Y + 157; // LEGPOS
|
gSMInvPocketXY[2].sX = INTERFACE_START_X + 258; gSMInvPocketXY[2].sY = INV_INTERFACE_START_Y + 157; // LEGPOS
|
||||||
@@ -1737,7 +1752,8 @@ BOOLEAN InitializeSMPanelCoordsNew()
|
|||||||
gSMInvPocketXY[53].sX = INTERFACE_START_X + 693; gSMInvPocketXY[53].sY = INV_INTERFACE_START_Y + 58; // SMALLPOCK29
|
gSMInvPocketXY[53].sX = INTERFACE_START_X + 693; gSMInvPocketXY[53].sY = INV_INTERFACE_START_Y + 58; // SMALLPOCK29
|
||||||
gSMInvPocketXY[54].sX = INTERFACE_START_X + 693; gSMInvPocketXY[54].sY = INV_INTERFACE_START_Y + 82; // SMALLPOCK30
|
gSMInvPocketXY[54].sX = INTERFACE_START_X + 693; gSMInvPocketXY[54].sY = INV_INTERFACE_START_Y + 82; // SMALLPOCK30
|
||||||
}
|
}
|
||||||
else if(iResolution == 2){
|
else
|
||||||
|
{
|
||||||
//1024x768 resolution
|
//1024x768 resolution
|
||||||
gSMInvPocketXY[0].sX = INTERFACE_START_X + 258; gSMInvPocketXY[0].sY = INV_INTERFACE_START_Y + 68; // HELMETPOS
|
gSMInvPocketXY[0].sX = INTERFACE_START_X + 258; gSMInvPocketXY[0].sY = INV_INTERFACE_START_Y + 68; // HELMETPOS
|
||||||
gSMInvPocketXY[1].sX = INTERFACE_START_X + 258; gSMInvPocketXY[1].sY = INV_INTERFACE_START_Y + 97; // VESTPOS
|
gSMInvPocketXY[1].sX = INTERFACE_START_X + 258; gSMInvPocketXY[1].sY = INV_INTERFACE_START_Y + 97; // VESTPOS
|
||||||
@@ -1841,11 +1857,13 @@ BOOLEAN InitializeSMPanelCoordsNew()
|
|||||||
SM_SELMERC_PLATE_HEIGHT = 65;
|
SM_SELMERC_PLATE_HEIGHT = 65;
|
||||||
SM_SELMERC_PLATE_WIDTH = 83;
|
SM_SELMERC_PLATE_WIDTH = 83;
|
||||||
|
|
||||||
if(iResolution == 0){
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
|
{
|
||||||
SM_BODYINV_X = ( 141 + INTERFACE_START_X );
|
SM_BODYINV_X = ( 141 + INTERFACE_START_X );
|
||||||
SM_BODYINV_Y = ( 68 + INV_INTERFACE_START_Y );
|
SM_BODYINV_Y = ( 68 + INV_INTERFACE_START_Y );
|
||||||
}
|
}
|
||||||
else{
|
else
|
||||||
|
{
|
||||||
SM_BODYINV_X = ( 151 + INTERFACE_START_X );
|
SM_BODYINV_X = ( 151 + INTERFACE_START_X );
|
||||||
SM_BODYINV_Y = ( 68 + INV_INTERFACE_START_Y );
|
SM_BODYINV_Y = ( 68 + INV_INTERFACE_START_Y );
|
||||||
}
|
}
|
||||||
@@ -1879,24 +1897,18 @@ BOOLEAN InitializeSMPanelCoordsNew()
|
|||||||
SM_NEXTMERCB_Y = ( 130 + INV_INTERFACE_START_Y );
|
SM_NEXTMERCB_Y = ( 130 + INV_INTERFACE_START_Y );
|
||||||
SM_OPTIONSB_X = ( 10 + INTERFACE_START_X );
|
SM_OPTIONSB_X = ( 10 + INTERFACE_START_X );
|
||||||
SM_OPTIONSB_Y = ( 165 + INV_INTERFACE_START_Y );
|
SM_OPTIONSB_Y = ( 165 + INV_INTERFACE_START_Y );
|
||||||
// CHRISL: Backpack buttons
|
|
||||||
if(iResolution == 0){
|
|
||||||
SM_DROPPACK_X = ( 504 + INTERFACE_START_X );
|
|
||||||
SM_DROPPACK_Y = ( 39 + INV_INTERFACE_START_Y );
|
|
||||||
SM_ZIPPER_X = ( 482 + INTERFACE_START_X );
|
|
||||||
SM_ZIPPER_Y = ( 39 + INV_INTERFACE_START_Y );
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
SM_DROPPACK_X = ( 612 + INTERFACE_START_X );
|
|
||||||
SM_DROPPACK_Y = ( 39 + INV_INTERFACE_START_Y );
|
|
||||||
SM_ZIPPER_X = ( 590 + INTERFACE_START_X );
|
|
||||||
SM_ZIPPER_Y = ( 39 + INV_INTERFACE_START_Y );
|
|
||||||
}
|
|
||||||
|
|
||||||
// WANNE 2
|
// CHRISL: Backpack buttons
|
||||||
SM_DONE_X = (SCREEN_WIDTH - 146); // 152
|
SM_DROPPACK_X = ( 612 + INTERFACE_START_X );
|
||||||
|
SM_DROPPACK_Y = ( 39 + INV_INTERFACE_START_Y );
|
||||||
|
SM_ZIPPER_X = ( 590 + INTERFACE_START_X );
|
||||||
|
SM_ZIPPER_Y = ( 39 + INV_INTERFACE_START_Y );
|
||||||
|
SM_MAPSCREEN_X = xResOffset + (xResSize - 146); // 152
|
||||||
|
SM_DONE_X = xResOffset + (xResSize - 146); // 152
|
||||||
|
INTERFACE_CLOCK_X = xResOffset + (xResSize - 86);
|
||||||
|
LOCATION_NAME_X = xResOffset + (xResSize - 92);
|
||||||
|
|
||||||
SM_DONE_Y = ( 118 + INV_INTERFACE_START_Y );
|
SM_DONE_Y = ( 118 + INV_INTERFACE_START_Y );
|
||||||
SM_MAPSCREEN_X = (SCREEN_WIDTH - 146); // 152
|
|
||||||
SM_MAPSCREEN_Y = ( 140 + INV_INTERFACE_START_Y );
|
SM_MAPSCREEN_Y = ( 140 + INV_INTERFACE_START_Y );
|
||||||
|
|
||||||
SM_POSITIONB_X = ( 106 + INTERFACE_START_X );
|
SM_POSITIONB_X = ( 106 + INTERFACE_START_X );
|
||||||
@@ -1907,7 +1919,8 @@ BOOLEAN InitializeSMPanelCoordsNew()
|
|||||||
SM_PERCENT_WIDTH = 20;
|
SM_PERCENT_WIDTH = 20;
|
||||||
SM_PERCENT_HEIGHT = 10;
|
SM_PERCENT_HEIGHT = 10;
|
||||||
|
|
||||||
if(iResolution == 0){
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
|
{
|
||||||
SM_ARMOR_X = ( 245 + INTERFACE_START_X );
|
SM_ARMOR_X = ( 245 + INTERFACE_START_X );
|
||||||
SM_ARMOR_Y = ( 141 + INV_INTERFACE_START_Y );
|
SM_ARMOR_Y = ( 141 + INV_INTERFACE_START_Y );
|
||||||
SM_ARMOR_LABEL_X = ( 260 + INTERFACE_START_X );
|
SM_ARMOR_LABEL_X = ( 260 + INTERFACE_START_X );
|
||||||
@@ -1915,7 +1928,8 @@ BOOLEAN InitializeSMPanelCoordsNew()
|
|||||||
SM_ARMOR_PERCENT_X = ( 265 + INTERFACE_START_X );
|
SM_ARMOR_PERCENT_X = ( 265 + INTERFACE_START_X );
|
||||||
SM_ARMOR_PERCENT_Y = ( 141 + INV_INTERFACE_START_Y );
|
SM_ARMOR_PERCENT_Y = ( 141 + INV_INTERFACE_START_Y );
|
||||||
}
|
}
|
||||||
else{
|
else
|
||||||
|
{
|
||||||
SM_ARMOR_X = ( 264 + INTERFACE_START_X );
|
SM_ARMOR_X = ( 264 + INTERFACE_START_X );
|
||||||
SM_ARMOR_Y = ( 141 + INV_INTERFACE_START_Y );
|
SM_ARMOR_Y = ( 141 + INV_INTERFACE_START_Y );
|
||||||
SM_ARMOR_LABEL_X = ( 279 + INTERFACE_START_X );
|
SM_ARMOR_LABEL_X = ( 279 + INTERFACE_START_X );
|
||||||
@@ -1971,13 +1985,11 @@ BOOLEAN InitializeSMPanelCoordsNew()
|
|||||||
STATS_TEXT_FONT_COLOR = 5;
|
STATS_TEXT_FONT_COLOR = 5;
|
||||||
|
|
||||||
// ow and te clock and location i will put it here
|
// ow and te clock and location i will put it here
|
||||||
INTERFACE_CLOCK_X = (SCREEN_WIDTH - 86);
|
|
||||||
INTERFACE_CLOCK_Y = ( 117 + INV_INTERFACE_START_Y );
|
INTERFACE_CLOCK_Y = ( 117 + INV_INTERFACE_START_Y );
|
||||||
LOCATION_NAME_X = (SCREEN_WIDTH - 92);
|
|
||||||
LOCATION_NAME_Y = ( 89 + INTERFACE_START_Y );
|
LOCATION_NAME_Y = ( 89 + INTERFACE_START_Y );
|
||||||
|
|
||||||
//Keyring
|
//Keyring
|
||||||
KEYRING_X = 217; // 209
|
KEYRING_X = xResOffset + 217; //209;
|
||||||
KEYRING_Y = (5 + INV_INTERFACE_START_Y);
|
KEYRING_Y = (5 + INV_INTERFACE_START_Y);
|
||||||
|
|
||||||
// so we got everything "dynamic" now we just return TRUE
|
// so we got everything "dynamic" now we just return TRUE
|
||||||
@@ -1999,15 +2011,15 @@ BOOLEAN InitializeSMPanel( )
|
|||||||
// failing the CHECKF after this will cause you to lose your mouse
|
// failing the CHECKF after this will cause you to lose your mouse
|
||||||
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
||||||
|
|
||||||
if (iResolution == 0)
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
{
|
{
|
||||||
strcpy( VObjectDesc.ImageFile, "INTERFACE\\inventory_bottom_panel.STI" );
|
strcpy( VObjectDesc.ImageFile, "INTERFACE\\inventory_bottom_panel.STI" );
|
||||||
}
|
}
|
||||||
else if (iResolution == 1)
|
else if (iResolution < _1024x768)
|
||||||
{
|
{
|
||||||
strcpy( VObjectDesc.ImageFile, "INTERFACE\\inventory_bottom_panel_800x600.STI" );
|
strcpy( VObjectDesc.ImageFile, "INTERFACE\\inventory_bottom_panel_800x600.STI" );
|
||||||
}
|
}
|
||||||
else if (iResolution == 2)
|
else
|
||||||
{
|
{
|
||||||
strcpy( VObjectDesc.ImageFile, "INTERFACE\\inventory_bottom_panel_1024x768.STI" );
|
strcpy( VObjectDesc.ImageFile, "INTERFACE\\inventory_bottom_panel_1024x768.STI" );
|
||||||
}
|
}
|
||||||
@@ -3408,15 +3420,156 @@ BOOLEAN UIHandleItemPlacement( UINT8 ubHandPos, UINT16 usOldItemIndex, UINT16 us
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Jenilee
|
||||||
|
INT32 uiLastHandPos = -1;
|
||||||
|
|
||||||
|
#define SLOT_NONE 0
|
||||||
|
#define SLOT_HANDS 1
|
||||||
|
#define SLOT_EQUIPMENT 2
|
||||||
|
#define SLOT_VEST 3
|
||||||
|
#define SLOT_RIG 4
|
||||||
|
#define SLOT_CPACK 5
|
||||||
|
#define SLOT_BPACK 6
|
||||||
|
#define SLOT_SLING 7
|
||||||
|
#define SLOT_KNIFE 8
|
||||||
|
#define SLOT_FACE 9
|
||||||
|
|
||||||
|
STR16 uiSlotTypeName[] =
|
||||||
|
{
|
||||||
|
L"", //0
|
||||||
|
L"Hands", //1
|
||||||
|
L"Equipment", //2
|
||||||
|
L"Vest", //3
|
||||||
|
L"Leg Rig", //4
|
||||||
|
L"Combat Pack", //5
|
||||||
|
L"Backpack", //6
|
||||||
|
L"Sling", //7
|
||||||
|
L"Knife", //8
|
||||||
|
L"Face", //9
|
||||||
|
L"Large Pocket", //10
|
||||||
|
L"Small Pocket" //11
|
||||||
|
};
|
||||||
|
|
||||||
|
INT16 uiNIVSlotType[NUM_INV_SLOTS] = {
|
||||||
|
2, 2, 2, //0-2
|
||||||
|
9, 9, //3-4
|
||||||
|
1, 1, //5-6
|
||||||
|
2, 2, 2, 2, 2, //7-11
|
||||||
|
7, //12
|
||||||
|
8, //13
|
||||||
|
5, 5, 5, //14-16
|
||||||
|
6, 6, 6, 6, //17-20
|
||||||
|
3, 3, //21-22
|
||||||
|
4, 4, //23-24
|
||||||
|
3, 3, 3, 3, 3, //25-29
|
||||||
|
3, 3, 3, 3, 3, //30-34
|
||||||
|
4, 4, 4, 4, //35-38
|
||||||
|
4, 4, 4, 4, //39-42
|
||||||
|
5, 5, 5, 5, //43-46
|
||||||
|
6, 6, 6, 6, //47-50
|
||||||
|
6, 6, 6, 6 //51-54
|
||||||
|
};
|
||||||
|
|
||||||
|
UINT16 uiOIVSlotType[NUM_INV_SLOTS] = {
|
||||||
|
2, 2, 2, //0-2
|
||||||
|
9, 9, //3-4
|
||||||
|
1, 1, //5-6
|
||||||
|
0, 0, 0, 0, 0, 0, 0, //7-13
|
||||||
|
10, 10, 10, 10, //14-17
|
||||||
|
0, 0, 0, 0, 0, 0, 0, //18-24
|
||||||
|
11, 11, 11, 11, 11, 11, 11, 11, //25-32
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0, //33-40
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0, //41-48
|
||||||
|
0, 0, 0, 0, 0, 0 //49-54
|
||||||
|
};
|
||||||
|
|
||||||
|
UINT32 GetInvMovementCost(UINT16 item, UINT32 old_pos, UINT32 new_pos)
|
||||||
|
{
|
||||||
|
if (!(gTacticalStatus.uiFlags & INCOMBAT) || //Not in combat
|
||||||
|
(old_pos == -1 || new_pos == -1)|| //Either position is invalid
|
||||||
|
(old_pos == new_pos)) //Old position same as new position
|
||||||
|
return 0;
|
||||||
|
INT16 src_type;
|
||||||
|
INT16 dst_type;
|
||||||
|
if (UsingNewInventorySystem() == TRUE)
|
||||||
|
{
|
||||||
|
src_type = uiNIVSlotType[old_pos];
|
||||||
|
dst_type = uiNIVSlotType[new_pos];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
src_type = uiOIVSlotType[old_pos];
|
||||||
|
dst_type = uiOIVSlotType[new_pos];
|
||||||
|
}
|
||||||
|
if (src_type == dst_type) //Moving to same lbe type
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
//If these 2 arrays are initiated outside the function, APBPConstants will not have been initialized, and all values will be 0
|
||||||
|
INT16 uiAPCostFromSlot[12] =
|
||||||
|
{
|
||||||
|
APBPConstants[AP_INV_FROM_NONE],
|
||||||
|
APBPConstants[AP_INV_FROM_HANDS],
|
||||||
|
APBPConstants[AP_INV_FROM_EQUIPMENT],
|
||||||
|
APBPConstants[AP_INV_FROM_VEST],
|
||||||
|
APBPConstants[AP_INV_FROM_RIG],
|
||||||
|
APBPConstants[AP_INV_FROM_CPACK],
|
||||||
|
APBPConstants[AP_INV_FROM_BPACK],
|
||||||
|
APBPConstants[AP_INV_FROM_SLING],
|
||||||
|
APBPConstants[AP_INV_FROM_KNIFE],
|
||||||
|
APBPConstants[AP_INV_FROM_FACE],
|
||||||
|
APBPConstants[AP_INV_FROM_BIG_POCKET],
|
||||||
|
APBPConstants[AP_INV_FROM_SMALL_POCKET]
|
||||||
|
};
|
||||||
|
INT16 uiAPCostToSlot[12] =
|
||||||
|
{
|
||||||
|
APBPConstants[AP_INV_TO_NONE],
|
||||||
|
APBPConstants[AP_INV_TO_HANDS],
|
||||||
|
APBPConstants[AP_INV_TO_EQUIPMENT],
|
||||||
|
APBPConstants[AP_INV_TO_VEST],
|
||||||
|
APBPConstants[AP_INV_TO_RIG],
|
||||||
|
APBPConstants[AP_INV_TO_CPACK],
|
||||||
|
APBPConstants[AP_INV_TO_BPACK],
|
||||||
|
APBPConstants[AP_INV_TO_SLING],
|
||||||
|
APBPConstants[AP_INV_TO_KNIFE],
|
||||||
|
APBPConstants[AP_INV_TO_FACE],
|
||||||
|
APBPConstants[AP_INV_TO_BIG_POCKET],
|
||||||
|
APBPConstants[AP_INV_TO_SMALL_POCKET]
|
||||||
|
};
|
||||||
|
FLOAT Weight_Divisor = gGameExternalOptions.uWeightDivisor;
|
||||||
|
UINT16 weight_modifier;
|
||||||
|
if (Weight_Divisor != 0)
|
||||||
|
weight_modifier = DynamicAdjustAPConstants((int)((Item[item].ubWeight) / Weight_Divisor),(int)((Item[item].ubWeight) / Weight_Divisor));
|
||||||
|
else
|
||||||
|
weight_modifier = 0;
|
||||||
|
|
||||||
|
UINT32 cost = 0;
|
||||||
|
|
||||||
|
cost += uiAPCostFromSlot[src_type];
|
||||||
|
cost += uiAPCostToSlot[dst_type];
|
||||||
|
cost += weight_modifier;
|
||||||
|
|
||||||
|
if (cost > APBPConstants[AP_INV_MAX_COST])
|
||||||
|
cost = APBPConstants[AP_INV_MAX_COST];
|
||||||
|
|
||||||
|
#ifdef _DEBUG
|
||||||
|
CHAR16 szTemp[255];
|
||||||
|
swprintf(szTemp, L"Moving item from %s to %s (costs: %d/%d/%d/%d)", uiSlotTypeName[src_type], uiSlotTypeName[dst_type], uiAPCostFromSlot[src_type], uiAPCostToSlot[dst_type], weight_modifier, cost);
|
||||||
|
ScreenMsg(FONT_MCOLOR_LTGREEN, MSG_CHAT, szTemp);
|
||||||
|
#endif
|
||||||
|
return cost;
|
||||||
|
}
|
||||||
|
|
||||||
void SMInvClickCallback( MOUSE_REGION * pRegion, INT32 iReason )
|
void SMInvClickCallback( MOUSE_REGION * pRegion, INT32 iReason )
|
||||||
{
|
{
|
||||||
UINT32 uiHandPos;
|
UINT32 uiHandPos;
|
||||||
// Copyies of values
|
// Copyies of values
|
||||||
UINT16 usOldItemIndex, usNewItemIndex;
|
UINT16 usOldItemIndex, usNewItemIndex;
|
||||||
UINT16 usItemPrevInItemPointer;
|
UINT16 usItemPrevInItemPointer;
|
||||||
|
UINT16 usCostToMoveItem = 0; //Jenilee
|
||||||
BOOLEAN fNewItem = FALSE;
|
BOOLEAN fNewItem = FALSE;
|
||||||
static BOOLEAN fRightDown = FALSE;
|
static BOOLEAN fRightDown = FALSE;
|
||||||
static BOOLEAN fLeftDown = FALSE;
|
static BOOLEAN fLeftDown = FALSE;
|
||||||
|
static bool INV_AP_COST = bool(gGameOptions.fInventoryCostsAP);
|
||||||
|
|
||||||
uiHandPos = MSYS_GetRegionUserData( pRegion, 0 );
|
uiHandPos = MSYS_GetRegionUserData( pRegion, 0 );
|
||||||
|
|
||||||
@@ -3510,6 +3663,10 @@ void SMInvClickCallback( MOUSE_REGION * pRegion, INT32 iReason )
|
|||||||
|
|
||||||
usOldItemIndex = gpSMCurrentMerc->inv[ uiHandPos ].usItem;
|
usOldItemIndex = gpSMCurrentMerc->inv[ uiHandPos ].usItem;
|
||||||
|
|
||||||
|
//Jenilee: remember our last selected slot
|
||||||
|
uiLastHandPos = uiHandPos;
|
||||||
|
|
||||||
|
|
||||||
// move item into the mouse cursor
|
// move item into the mouse cursor
|
||||||
BeginItemPointer( gpSMCurrentMerc, (UINT8)uiHandPos );
|
BeginItemPointer( gpSMCurrentMerc, (UINT8)uiHandPos );
|
||||||
|
|
||||||
@@ -3536,8 +3693,23 @@ void SMInvClickCallback( MOUSE_REGION * pRegion, INT32 iReason )
|
|||||||
|
|
||||||
if ( ubSrcID == ubDestID )
|
if ( ubSrcID == ubDestID )
|
||||||
{
|
{
|
||||||
|
if (INV_AP_COST)
|
||||||
|
//Jenilee: determine the cost of moving this item around in our inventory
|
||||||
|
usCostToMoveItem = GetInvMovementCost(gpItemPointer->usItem, uiLastHandPos, uiHandPos);
|
||||||
|
|
||||||
|
if (gpSMCurrentMerc->bActionPoints >= usCostToMoveItem)
|
||||||
|
{
|
||||||
|
fOKToGo = TRUE;
|
||||||
|
uiLastHandPos = uiHandPos;
|
||||||
|
}
|
||||||
|
else //we dont have enough APs to move it to this slot, show a warning message
|
||||||
|
{
|
||||||
|
ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_UI_FEEDBACK, TacticalStr[NOT_ENOUGH_APS_STR]);
|
||||||
|
fOKToGo = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
// We are doing this ourselve, continue
|
// We are doing this ourselve, continue
|
||||||
fOKToGo = TRUE;
|
// fOKToGo = TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -3655,6 +3827,10 @@ void SMInvClickCallback( MOUSE_REGION * pRegion, INT32 iReason )
|
|||||||
// try to place the item in the cursor into this inventory slot
|
// try to place the item in the cursor into this inventory slot
|
||||||
if ( UIHandleItemPlacement( (UINT8) uiHandPos, usOldItemIndex, usNewItemIndex, fDeductPoints ) )
|
if ( UIHandleItemPlacement( (UINT8) uiHandPos, usOldItemIndex, usNewItemIndex, fDeductPoints ) )
|
||||||
{
|
{
|
||||||
|
//Jenilee: pay the price
|
||||||
|
//just make sure to handle that if we are putting it back in the SAME slot, the cost should be 0!!!
|
||||||
|
gpSMCurrentMerc->bActionPoints -= usCostToMoveItem;
|
||||||
|
|
||||||
RenderBackpackButtons(ACTIVATE_BUTTON); /* 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...
|
// it worked! if we're in the SKI...
|
||||||
if( guiTacticalInterfaceFlags & INTERFACE_SHOPKEEP_INTERFACE )
|
if( guiTacticalInterfaceFlags & INTERFACE_SHOPKEEP_INTERFACE )
|
||||||
@@ -4719,17 +4895,19 @@ void BtnPositionShowCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
|
|
||||||
BOOLEAN InitializeTEAMPanelCoords( )
|
BOOLEAN InitializeTEAMPanelCoords( )
|
||||||
{
|
{
|
||||||
|
|
||||||
TM_FACE_WIDTH = 48;
|
TM_FACE_WIDTH = 48;
|
||||||
TM_FACE_HEIGHT = 43;
|
TM_FACE_HEIGHT = 43;
|
||||||
TM_APPANEL_HEIGHT = 56;
|
TM_APPANEL_HEIGHT = 56;
|
||||||
TM_APPANEL_WIDTH = 16;
|
TM_APPANEL_WIDTH = 16;
|
||||||
|
|
||||||
TM_ENDTURN_X = (SCREEN_WIDTH - 131); //( 507 + INTERFACE_START_X );
|
TM_ENDTURN_X = xResOffset + (xResSize - 131);
|
||||||
|
TM_ROSTERMODE_X = xResOffset + (xResSize - 131);
|
||||||
|
TM_DISK_X = xResOffset + (xResSize - 131);
|
||||||
|
INTERFACE_CLOCK_TM_X = xResOffset + (xResSize - 86 );
|
||||||
|
LOCATION_NAME_TM_X = xResOffset + (xResSize - 92 );
|
||||||
|
|
||||||
TM_ENDTURN_Y = ( 9 + INTERFACE_START_Y );
|
TM_ENDTURN_Y = ( 9 + INTERFACE_START_Y );
|
||||||
TM_ROSTERMODE_X = (SCREEN_WIDTH - 131); //( 507 + INTERFACE_START_X );
|
|
||||||
TM_ROSTERMODE_Y = ( 45 + INTERFACE_START_Y );
|
TM_ROSTERMODE_Y = ( 45 + INTERFACE_START_Y );
|
||||||
TM_DISK_X = (SCREEN_WIDTH - 131); //( 507 + INTERFACE_START_X );
|
|
||||||
TM_DISK_Y = ( 81 + INTERFACE_START_Y );
|
TM_DISK_Y = ( 81 + INTERFACE_START_Y );
|
||||||
|
|
||||||
TM_NAME_WIDTH = 60;
|
TM_NAME_WIDTH = 60;
|
||||||
@@ -4846,9 +5024,8 @@ BOOLEAN InitializeTEAMPanelCoords( )
|
|||||||
// ufff to much copy&paste :D
|
// ufff to much copy&paste :D
|
||||||
*/
|
*/
|
||||||
// CHRISL: New definitions for the team panel clock and location coordinates
|
// CHRISL: New definitions for the team panel clock and location coordinates
|
||||||
INTERFACE_CLOCK_TM_X = ( SCREEN_WIDTH - 86 );
|
|
||||||
INTERFACE_CLOCK_TM_Y = ( 99 + INTERFACE_START_Y );
|
INTERFACE_CLOCK_TM_Y = ( 99 + INTERFACE_START_Y );
|
||||||
LOCATION_NAME_TM_X = ( SCREEN_WIDTH - 92 );
|
|
||||||
LOCATION_NAME_TM_Y = ( 65 + INTERFACE_START_Y );
|
LOCATION_NAME_TM_Y = ( 65 + INTERFACE_START_Y );
|
||||||
|
|
||||||
return ( TRUE );
|
return ( TRUE );
|
||||||
@@ -4883,37 +5060,34 @@ BOOLEAN InitializeTEAMPanel( )
|
|||||||
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
||||||
|
|
||||||
//SQUAD10 FIX: Use panels with more slots if SquadSize at current resolution is > 6
|
//SQUAD10 FIX: Use panels with more slots if SquadSize at current resolution is > 6
|
||||||
switch (iResolution)
|
|
||||||
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
|
FilenameForBPP("INTERFACE\\bottom_bar.sti", VObjectDesc.ImageFile);
|
||||||
|
else if (iResolution < _1024x768)
|
||||||
{
|
{
|
||||||
case 0:
|
if (gGameOptions.ubSquadSize > 6)
|
||||||
FilenameForBPP("INTERFACE\\bottom_bar.sti", VObjectDesc.ImageFile);
|
{
|
||||||
break;
|
FilenameForBPP("INTERFACE\\bottom_bar_8_800x600.sti", VObjectDesc.ImageFile);
|
||||||
case 1:
|
}
|
||||||
if (gGameOptions.ubSquadSize > 6)
|
else
|
||||||
{
|
{
|
||||||
FilenameForBPP("INTERFACE\\bottom_bar_8_800x600.sti", VObjectDesc.ImageFile);
|
FilenameForBPP("INTERFACE\\bottom_bar_800x600.sti", VObjectDesc.ImageFile);
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
{
|
else
|
||||||
FilenameForBPP("INTERFACE\\bottom_bar_800x600.sti", VObjectDesc.ImageFile);
|
{
|
||||||
}
|
if (gGameOptions.ubSquadSize > 8)
|
||||||
break;
|
{
|
||||||
case 2:
|
FilenameForBPP("INTERFACE\\bottom_bar_10_1024x768.sti", VObjectDesc.ImageFile);
|
||||||
if (gGameOptions.ubSquadSize > 8)
|
}
|
||||||
{
|
else if (gGameOptions.ubSquadSize > 6)
|
||||||
FilenameForBPP("INTERFACE\\bottom_bar_10_1024x768.sti", VObjectDesc.ImageFile);
|
{
|
||||||
}
|
FilenameForBPP("INTERFACE\\bottom_bar_8_1024x768.sti", VObjectDesc.ImageFile);
|
||||||
else if (gGameOptions.ubSquadSize > 6)
|
}
|
||||||
{
|
else
|
||||||
FilenameForBPP("INTERFACE\\bottom_bar_8_1024x768.sti", VObjectDesc.ImageFile);
|
{
|
||||||
}
|
FilenameForBPP("INTERFACE\\bottom_bar_1024x768.sti", VObjectDesc.ImageFile);
|
||||||
else
|
}
|
||||||
{
|
|
||||||
FilenameForBPP("INTERFACE\\bottom_bar_1024x768.sti", VObjectDesc.ImageFile);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
FilenameForBPP("INTERFACE\\bottom_bar.sti", VObjectDesc.ImageFile);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CHECKF( AddVideoObject( &VObjectDesc, &guiTEAMPanel ) );
|
CHECKF( AddVideoObject( &VObjectDesc, &guiTEAMPanel ) );
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
#include "line.h"
|
#include "line.h"
|
||||||
#include "WCheck.h"
|
#include "WCheck.h"
|
||||||
#include "Vehicles.h"
|
#include "Vehicles.h"
|
||||||
|
#include "GameSettings.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define LIFE_BAR_SHADOW FROMRGB( 108, 12, 12 )
|
#define LIFE_BAR_SHADOW FROMRGB( 108, 12, 12 )
|
||||||
@@ -427,10 +428,23 @@ void DrawItemUIBarEx( OBJECTTYPE *pObject, UINT8 ubStatus, INT16 sXPos, INT16 sY
|
|||||||
sValue =100;
|
sValue =100;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Flugente FTW 1.2
|
||||||
|
if ( ubStatus == DRAW_ITEM_TEMPERATURE )
|
||||||
|
{
|
||||||
|
sValue = (INT16) (100 * GetGunOverheatJamPercentage( pObject) );
|
||||||
|
|
||||||
|
// if temperature is 0 or below, do not display anything
|
||||||
|
if ( sValue < 1)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// cut off temperature at 100%, otherwise the bar will be out of its box
|
||||||
|
sValue = min(sValue, 100);
|
||||||
|
}
|
||||||
|
|
||||||
// ATE: Subtract 1 to exagerate bad status
|
// ATE: Subtract 1 to exagerate bad status
|
||||||
if ( sValue < 100 && sValue > 1 )
|
if ( sValue < 100 && sValue > 1 )
|
||||||
{
|
{
|
||||||
sValue--;
|
sValue--;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Erase what was there
|
// Erase what was there
|
||||||
@@ -442,7 +456,6 @@ void DrawItemUIBarEx( OBJECTTYPE *pObject, UINT8 ubStatus, INT16 sXPos, INT16 sY
|
|||||||
pDestBuf = LockVideoSurface( uiBuffer, &uiDestPitchBYTES );
|
pDestBuf = LockVideoSurface( uiBuffer, &uiDestPitchBYTES );
|
||||||
SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
|
SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
|
||||||
|
|
||||||
|
|
||||||
// FIRST DO BREATH
|
// FIRST DO BREATH
|
||||||
dPercentage = (FLOAT)sValue / (FLOAT)100;
|
dPercentage = (FLOAT)sValue / (FLOAT)100;
|
||||||
dEnd = dPercentage * sHeight;
|
dEnd = dPercentage * sHeight;
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
#define DRAW_ITEM_STATUS_ATTACHMENT2 201
|
#define DRAW_ITEM_STATUS_ATTACHMENT2 201
|
||||||
#define DRAW_ITEM_STATUS_ATTACHMENT3 202
|
#define DRAW_ITEM_STATUS_ATTACHMENT3 202
|
||||||
#define DRAW_ITEM_STATUS_ATTACHMENT4 203
|
#define DRAW_ITEM_STATUS_ATTACHMENT4 203
|
||||||
|
#define DRAW_ITEM_TEMPERATURE 204 // Flugente FTW 1.2
|
||||||
|
|
||||||
void DrawMoraleUIBarEx( SOLDIERTYPE *pSoldier, INT16 sXPos, INT16 sYPos, INT16 sWidth, INT16 sHeight, BOOLEAN fErase, UINT32 uiBuffer );
|
void DrawMoraleUIBarEx( SOLDIERTYPE *pSoldier, INT16 sXPos, INT16 sYPos, INT16 sWidth, INT16 sHeight, BOOLEAN fErase, UINT32 uiBuffer );
|
||||||
void DrawBreathUIBarEx( SOLDIERTYPE *pSoldier, INT16 sXPos, INT16 sYPos, INT16 sWidth, INT16 sHeight, BOOLEAN fErase, UINT32 uiBuffer );
|
void DrawBreathUIBarEx( SOLDIERTYPE *pSoldier, INT16 sXPos, INT16 sYPos, INT16 sWidth, INT16 sHeight, BOOLEAN fErase, UINT32 uiBuffer );
|
||||||
|
|||||||
+67
-81
@@ -105,9 +105,6 @@ CIV_NAMES_VALUES zCivGroupName[NUM_CIV_GROUPS];
|
|||||||
BOOLEAN gfInMovementMenu = FALSE;
|
BOOLEAN gfInMovementMenu = FALSE;
|
||||||
INT32 giMenuAnchorX, giMenuAnchorY;
|
INT32 giMenuAnchorX, giMenuAnchorY;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define PROG_BAR_START_X 5
|
|
||||||
//*ddd
|
//*ddd
|
||||||
//#define PROG_BAR_START_Y 2
|
//#define PROG_BAR_START_Y 2
|
||||||
|
|
||||||
@@ -285,7 +282,6 @@ UINT32 CalcUIMessageDuration( STR16 wString );
|
|||||||
|
|
||||||
BOOLEAN InitializeFaceGearGraphics()
|
BOOLEAN InitializeFaceGearGraphics()
|
||||||
{
|
{
|
||||||
VSURFACE_DESC vs_desc;
|
|
||||||
VOBJECT_DESC VObjectDesc;
|
VOBJECT_DESC VObjectDesc;
|
||||||
|
|
||||||
char fileName[500];
|
char fileName[500];
|
||||||
@@ -382,9 +378,7 @@ BOOLEAN InitializeTacticalInterface( )
|
|||||||
VSURFACE_DESC vs_desc;
|
VSURFACE_DESC vs_desc;
|
||||||
VOBJECT_DESC VObjectDesc;
|
VOBJECT_DESC VObjectDesc;
|
||||||
|
|
||||||
UINT32 iCounter2;
|
//UINT32 iCounter2;
|
||||||
|
|
||||||
char fileName[500];
|
|
||||||
|
|
||||||
// CHRISL: Setup default interface coords based on inventory system in use
|
// CHRISL: Setup default interface coords based on inventory system in use
|
||||||
if((UsingNewInventorySystem() == true))
|
if((UsingNewInventorySystem() == true))
|
||||||
@@ -4333,36 +4327,35 @@ void CreateTopMessage( UINT32 uiSurface, UINT8 ubType, STR16 psString )
|
|||||||
UINT32 uiBarToUseInUpDate=0;
|
UINT32 uiBarToUseInUpDate=0;
|
||||||
BOOLEAN fDoLimitBar = FALSE;
|
BOOLEAN fDoLimitBar = FALSE;
|
||||||
FLOAT dNumStepsPerEnemy, dLength, dCurSize;
|
FLOAT dNumStepsPerEnemy, dLength, dCurSize;
|
||||||
INT16 iProgBarLength = SCREEN_WIDTH - 13;
|
INT16 iProgBarLength;
|
||||||
STR fn;
|
STR fn;
|
||||||
|
|
||||||
memset( &VObjectDesc, 0, sizeof( VObjectDesc ) );
|
memset( &VObjectDesc, 0, sizeof( VObjectDesc ) );
|
||||||
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
||||||
|
|
||||||
switch (iResolution)
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
{
|
{
|
||||||
case 0: //640
|
iProgBarLength = 640 - 13;
|
||||||
if (gGameExternalOptions.fSmallSizeProgressbar)
|
if (gGameExternalOptions.fSmallSizeProgressbar)
|
||||||
fn = "INTERFACE\\rect_Thin.sti";
|
fn = "INTERFACE\\rect_Thin.sti";
|
||||||
else
|
else
|
||||||
fn = "INTERFACE\\rect.sti";
|
fn = "INTERFACE\\rect.sti";
|
||||||
break;
|
}
|
||||||
case 1: //800
|
else if (iResolution < _1024x768)
|
||||||
if (gGameExternalOptions.fSmallSizeProgressbar)
|
{
|
||||||
fn = "INTERFACE\\rect_800x600Thin.sti";
|
iProgBarLength = 800 - 13;
|
||||||
else
|
if (gGameExternalOptions.fSmallSizeProgressbar)
|
||||||
fn = "INTERFACE\\rect_800x600.sti";
|
fn = "INTERFACE\\rect_800x600Thin.sti";
|
||||||
break;
|
else
|
||||||
case 2:
|
fn = "INTERFACE\\rect_800x600.sti";
|
||||||
if (gGameExternalOptions.fSmallSizeProgressbar)
|
}
|
||||||
fn = "INTERFACE\\rect_1024x768Thin.sti";
|
else
|
||||||
else
|
{
|
||||||
fn = "INTERFACE\\rect_1024x768.sti";
|
iProgBarLength = 1024 - 13;
|
||||||
break;
|
if (gGameExternalOptions.fSmallSizeProgressbar)
|
||||||
default:
|
fn = "INTERFACE\\rect_1024x768Thin.sti";
|
||||||
AssertMsg( 0, "Invalid resolution");
|
else
|
||||||
return;
|
fn = "INTERFACE\\rect_1024x768.sti";
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FilenameForBPP(fn, VObjectDesc.ImageFile);
|
FilenameForBPP(fn, VObjectDesc.ImageFile);
|
||||||
@@ -4373,30 +4366,26 @@ void CreateTopMessage( UINT32 uiSurface, UINT8 ubType, STR16 psString )
|
|||||||
AssertMsg(0, fn );
|
AssertMsg(0, fn );
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (iResolution)
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
{
|
{
|
||||||
case 0: //640
|
if (gGameExternalOptions.fSmallSizeProgressbar)
|
||||||
if (gGameExternalOptions.fSmallSizeProgressbar)
|
fn = "INTERFACE\\timebargreen_Thin.sti";
|
||||||
fn = "INTERFACE\\timebargreen_Thin.sti";
|
else
|
||||||
else
|
fn = "INTERFACE\\timebargreen.sti";
|
||||||
fn = "INTERFACE\\timebargreen.sti";
|
}
|
||||||
break;
|
else if (iResolution < _1024x768)
|
||||||
case 1: //800
|
{
|
||||||
if (gGameExternalOptions.fSmallSizeProgressbar)
|
if (gGameExternalOptions.fSmallSizeProgressbar)
|
||||||
fn = "INTERFACE\\timebargreen_800x600Thin.sti";
|
fn = "INTERFACE\\timebargreen_800x600Thin.sti";
|
||||||
else
|
else
|
||||||
fn = "INTERFACE\\timebargreen_800x600.sti";
|
fn = "INTERFACE\\timebargreen_800x600.sti";
|
||||||
break;
|
}
|
||||||
case 2:
|
else
|
||||||
if (gGameExternalOptions.fSmallSizeProgressbar)
|
{
|
||||||
fn = "INTERFACE\\timebargreen_1024x768Thin.sti";
|
if (gGameExternalOptions.fSmallSizeProgressbar)
|
||||||
else
|
fn = "INTERFACE\\timebargreen_1024x768Thin.sti";
|
||||||
fn = "INTERFACE\\timebargreen_1024x768.sti";
|
else
|
||||||
break;
|
fn = "INTERFACE\\timebargreen_1024x768.sti";
|
||||||
default:
|
|
||||||
AssertMsg( 0, "Invalid resolution");
|
|
||||||
return;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FilenameForBPP(fn, VObjectDesc.ImageFile);
|
FilenameForBPP(fn, VObjectDesc.ImageFile);
|
||||||
@@ -4406,30 +4395,26 @@ void CreateTopMessage( UINT32 uiSurface, UINT8 ubType, STR16 psString )
|
|||||||
AssertMsg(0, fn );
|
AssertMsg(0, fn );
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (iResolution)
|
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||||
{
|
{
|
||||||
case 0: //640
|
if (gGameExternalOptions.fSmallSizeProgressbar)
|
||||||
if (gGameExternalOptions.fSmallSizeProgressbar)
|
fn = "INTERFACE\\timebaryellow_Thin.sti";
|
||||||
fn = "INTERFACE\\timebaryellow_Thin.sti";
|
else
|
||||||
else
|
fn = "INTERFACE\\timebaryellow.sti";
|
||||||
fn = "INTERFACE\\timebaryellow.sti";
|
}
|
||||||
break;
|
else if (iResolution < _1024x768)
|
||||||
case 1: //800
|
{
|
||||||
if (gGameExternalOptions.fSmallSizeProgressbar)
|
if (gGameExternalOptions.fSmallSizeProgressbar)
|
||||||
fn = "INTERFACE\\timebaryellow_800x600Thin.sti";
|
fn = "INTERFACE\\timebaryellow_800x600Thin.sti";
|
||||||
else
|
else
|
||||||
fn = "INTERFACE\\timebaryellow_800x600.sti";
|
fn = "INTERFACE\\timebaryellow_800x600.sti";
|
||||||
break;
|
}
|
||||||
case 2:
|
else
|
||||||
if (gGameExternalOptions.fSmallSizeProgressbar)
|
{
|
||||||
fn = "INTERFACE\\timebaryellow_1024x768Thin.sti";
|
if (gGameExternalOptions.fSmallSizeProgressbar)
|
||||||
else
|
fn = "INTERFACE\\timebaryellow_1024x768Thin.sti";
|
||||||
fn = "INTERFACE\\timebaryellow_1024x768.sti";
|
else
|
||||||
break;
|
fn = "INTERFACE\\timebaryellow_1024x768.sti";
|
||||||
default:
|
|
||||||
AssertMsg( 0, "Invalid resolution");
|
|
||||||
return;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FilenameForBPP(fn, VObjectDesc.ImageFile);
|
FilenameForBPP(fn, VObjectDesc.ImageFile);
|
||||||
@@ -4451,7 +4436,7 @@ void CreateTopMessage( UINT32 uiSurface, UINT8 ubType, STR16 psString )
|
|||||||
case AIR_RAID_TURN_MESSAGE:
|
case AIR_RAID_TURN_MESSAGE:
|
||||||
|
|
||||||
// Render rect into surface
|
// Render rect into surface
|
||||||
BltVideoObjectFromIndex( uiSurface, uiBAR, 0, 0, 0, VO_BLT_SRCTRANSPARENCY, NULL );
|
BltVideoObjectFromIndex( uiSurface, uiBAR, 0, xResOffset, 0, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||||
|
|
||||||
SetFontBackground( FONT_MCOLOR_BLACK );
|
SetFontBackground( FONT_MCOLOR_BLACK );
|
||||||
SetFontForeground( FONT_MCOLOR_WHITE );
|
SetFontForeground( FONT_MCOLOR_WHITE );
|
||||||
@@ -4462,7 +4447,7 @@ void CreateTopMessage( UINT32 uiSurface, UINT8 ubType, STR16 psString )
|
|||||||
case PLAYER_INTERRUPT_MESSAGE:
|
case PLAYER_INTERRUPT_MESSAGE:
|
||||||
|
|
||||||
// Render rect into surface
|
// Render rect into surface
|
||||||
BltVideoObjectFromIndex( uiSurface, uiINTBAR, 0, 0, 0, VO_BLT_SRCTRANSPARENCY, NULL );
|
BltVideoObjectFromIndex( uiSurface, uiINTBAR, 0, xResOffset, 0, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||||
|
|
||||||
SetFontBackground( FONT_MCOLOR_BLACK );
|
SetFontBackground( FONT_MCOLOR_BLACK );
|
||||||
SetFontForeground( FONT_MCOLOR_WHITE );
|
SetFontForeground( FONT_MCOLOR_WHITE );
|
||||||
@@ -4472,7 +4457,8 @@ void CreateTopMessage( UINT32 uiSurface, UINT8 ubType, STR16 psString )
|
|||||||
|
|
||||||
case PLAYER_TURN_MESSAGE:
|
case PLAYER_TURN_MESSAGE:
|
||||||
|
|
||||||
BltVideoObjectFromIndex( uiSurface, uiPLAYERBAR, 0, 0, 0, VO_BLT_SRCTRANSPARENCY, NULL );
|
// Render rect into surface
|
||||||
|
BltVideoObjectFromIndex( uiSurface, uiPLAYERBAR, 0, xResOffset, 0, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||||
|
|
||||||
SetFontBackground( FONT_MCOLOR_BLACK );
|
SetFontBackground( FONT_MCOLOR_BLACK );
|
||||||
SetFontForeground( FONT_MCOLOR_WHITE );
|
SetFontForeground( FONT_MCOLOR_WHITE );
|
||||||
@@ -4494,7 +4480,7 @@ void CreateTopMessage( UINT32 uiSurface, UINT8 ubType, STR16 psString )
|
|||||||
dNumStepsPerEnemy = (FLOAT)( (FLOAT)iProgBarLength / (FLOAT)gTacticalStatus.usTactialTurnLimitMax );
|
dNumStepsPerEnemy = (FLOAT)( (FLOAT)iProgBarLength / (FLOAT)gTacticalStatus.usTactialTurnLimitMax );
|
||||||
|
|
||||||
// Render end peice
|
// Render end peice
|
||||||
sBarX = PROG_BAR_START_X;
|
sBarX = (SCREEN_WIDTH - xResSize) / 2 + 5;
|
||||||
BltVideoObjectFromIndex( uiSurface, uiBarToUseInUpDate, 1, sBarX, PROG_BAR_START_Y, VO_BLT_SRCTRANSPARENCY, NULL );
|
BltVideoObjectFromIndex( uiSurface, uiBarToUseInUpDate, 1, sBarX, PROG_BAR_START_Y, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||||
|
|
||||||
// Determine Length
|
// Determine Length
|
||||||
|
|||||||
@@ -16,12 +16,29 @@ UINT32 guiGUNSM;
|
|||||||
UINT32 guiP1ITEMS;
|
UINT32 guiP1ITEMS;
|
||||||
UINT32 guiP2ITEMS;
|
UINT32 guiP2ITEMS;
|
||||||
UINT32 guiP3ITEMS;
|
UINT32 guiP3ITEMS;
|
||||||
|
|
||||||
|
//MM: New item tileslots start here
|
||||||
|
UINT32 guiP4ITEMS;
|
||||||
|
UINT32 guiP5ITEMS;
|
||||||
|
UINT32 guiP6ITEMS;
|
||||||
|
UINT32 guiP7ITEMS;
|
||||||
|
UINT32 guiP8ITEMS;
|
||||||
|
UINT32 guiP9ITEMS;
|
||||||
|
|
||||||
// new item image handles
|
// new item image handles
|
||||||
MDItemVideoObjects g_oGUNSM;
|
MDItemVideoObjects g_oGUNSM;
|
||||||
MDItemVideoObjects g_oP1ITEMS;
|
MDItemVideoObjects g_oP1ITEMS;
|
||||||
MDItemVideoObjects g_oP2ITEMS;
|
MDItemVideoObjects g_oP2ITEMS;
|
||||||
MDItemVideoObjects g_oP3ITEMS;
|
MDItemVideoObjects g_oP3ITEMS;
|
||||||
|
|
||||||
|
//MM: New item tileslots start here
|
||||||
|
MDItemVideoObjects g_oP4ITEMS;
|
||||||
|
MDItemVideoObjects g_oP5ITEMS;
|
||||||
|
MDItemVideoObjects g_oP6ITEMS;
|
||||||
|
MDItemVideoObjects g_oP7ITEMS;
|
||||||
|
MDItemVideoObjects g_oP8ITEMS;
|
||||||
|
MDItemVideoObjects g_oP9ITEMS;
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
MDItemVideoObjects::MDItemVideoObjects()
|
MDItemVideoObjects::MDItemVideoObjects()
|
||||||
@@ -154,6 +171,85 @@ bool RegisterItemImages()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//MM: New item tileslots start here
|
||||||
|
// LOAD INTERFACE ITEM PICTURES
|
||||||
|
if(!g_bUsePngItemImages)
|
||||||
|
{
|
||||||
|
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
||||||
|
FilenameForBPP("INTERFACE\\mdp4items.sti", VObjectDesc.ImageFile);
|
||||||
|
if( !AddVideoObject( &VObjectDesc, &guiP4ITEMS ) )
|
||||||
|
AssertMsg(0, "Missing INTERFACE\\mdp4items.sti" );
|
||||||
|
}
|
||||||
|
else if(!g_oP4ITEMS.registerItemsFromFilePattern(L"INTERFACE/MDP4ITEMS/*.png"))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// LOAD INTERFACE ITEM PICTURES
|
||||||
|
if(!g_bUsePngItemImages)
|
||||||
|
{
|
||||||
|
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
||||||
|
FilenameForBPP("INTERFACE\\mdp5items.sti", VObjectDesc.ImageFile);
|
||||||
|
if( !AddVideoObject( &VObjectDesc, &guiP5ITEMS ) )
|
||||||
|
AssertMsg(0, "Missing INTERFACE\\mdp5items.sti" );
|
||||||
|
}
|
||||||
|
else if(!g_oP5ITEMS.registerItemsFromFilePattern(L"INTERFACE/MDP5ITEMS/*.png"))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// LOAD INTERFACE ITEM PICTURES
|
||||||
|
if(!g_bUsePngItemImages)
|
||||||
|
{
|
||||||
|
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
||||||
|
FilenameForBPP("INTERFACE\\mdp6items.sti", VObjectDesc.ImageFile);
|
||||||
|
if( !AddVideoObject( &VObjectDesc, &guiP6ITEMS ) )
|
||||||
|
AssertMsg(0, "Missing INTERFACE\\mdp6items.sti" );
|
||||||
|
}
|
||||||
|
else if(!g_oP6ITEMS.registerItemsFromFilePattern(L"INTERFACE/MDP6ITEMS/*.png"))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// LOAD INTERFACE ITEM PICTURES
|
||||||
|
if(!g_bUsePngItemImages)
|
||||||
|
{
|
||||||
|
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
||||||
|
FilenameForBPP("INTERFACE\\mdp7items.sti", VObjectDesc.ImageFile);
|
||||||
|
if( !AddVideoObject( &VObjectDesc, &guiP7ITEMS ) )
|
||||||
|
AssertMsg(0, "Missing INTERFACE\\mdp7items.sti" );
|
||||||
|
}
|
||||||
|
else if(!g_oP7ITEMS.registerItemsFromFilePattern(L"INTERFACE/MDP7ITEMS/*.png"))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// LOAD INTERFACE ITEM PICTURES
|
||||||
|
if(!g_bUsePngItemImages)
|
||||||
|
{
|
||||||
|
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
||||||
|
FilenameForBPP("INTERFACE\\mdp8items.sti", VObjectDesc.ImageFile);
|
||||||
|
if( !AddVideoObject( &VObjectDesc, &guiP8ITEMS ) )
|
||||||
|
AssertMsg(0, "Missing INTERFACE\\mdp8items.sti" );
|
||||||
|
}
|
||||||
|
else if(!g_oP8ITEMS.registerItemsFromFilePattern(L"INTERFACE/MDP8ITEMS/*.png"))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// LOAD INTERFACE ITEM PICTURES
|
||||||
|
if(!g_bUsePngItemImages)
|
||||||
|
{
|
||||||
|
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
||||||
|
FilenameForBPP("INTERFACE\\mdp9items.sti", VObjectDesc.ImageFile);
|
||||||
|
if( !AddVideoObject( &VObjectDesc, &guiP9ITEMS ) )
|
||||||
|
AssertMsg(0, "Missing INTERFACE\\mdp9items.sti" );
|
||||||
|
}
|
||||||
|
else if(!g_oP9ITEMS.registerItemsFromFilePattern(L"INTERFACE/MDP9ITEMS/*.png"))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user