New attack busy system

Added missing #includes

Added LUA scripting and console

Changed the way tracers are visualized, so they work more like real tracers instead of a light fountain

Fixed signedness of many grid variables used in GetMouseMapPos calls

Fixed enemy weapon choosing:  Sometimes a mortar is chosen but later rejected, but the grenade class was not reset.  Caused assertion failure

Added checks so enemies don't try to chuck RPG grenades with their hands

Now possible to shoot a someone in the head if he's in water

Fixed InitSightArrays to also clear soldier interrupt duel points.  This was causing an assertion failure elsewhere in the code because the interrupt list still had soldiers on it sometimes when this function was called.

Soldiers are much less willing to forfeit their turn over an attempt to use more APs than they have

Removed early setting of muzzle flash.  This would allow enemies to get an interrupt before you even fired.

Fixed item dropping by AI.  If AI tried to drop something while standing it would cause deadlock

Change to greatly speed up closing the sector inventory window in an unloaded sector

Added conditional compile flag to always give robot weapon ready advantage, even for 360 degree sighting


Check builddefines.h for the conditional flags.  Of greatest interest might be LUA_CONSOLE.  This will cause the game to bring up a command console when run.  However this console is severely lacking in many areas.  If anybody knows of an open-source terminal/console that could be used instead, it would be appreciated.  The existing console does bad things when you try to close it, and since it counts as a separate app, it pauses the game while it has focus.

LUA scripting is very limited, basically just proof of concept.  There is one global variable, the Soldiers array.  An array index gives you the soldier in that slot in the currently loaded sector.  The soldier has a few things that can be accessed:  name (short name); fullname (long name); grid (current grid #, can be changed); walkto(grid) (function to walk to another grid); runto(grid) (function to run to another grid)


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@924 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Overhaul
2007-06-09 09:01:04 +00:00
parent 8ed1ff9d6e
commit 7a27e7105d
275 changed files with 25107 additions and 20463 deletions
+19
View File
@@ -10,6 +10,25 @@
#include "Credits.h" #include "Credits.h"
//#include "Utils All.h" //#include "Utils All.h"
#include "Language Defines.h" #include "Language Defines.h"
#include "vsurface.h"
#include "mousesystem.h"
#include "Text.h"
#include "wordwrap.h"
#include "Video.h"
#include "render dirty.h"
#include "local.h"
#include "utilities.h"
#include "WCheck.h"
#include "screenids.h"
#include "Font Control.h"
#include "cursors.h"
#include "font.h"
#include "wordwrap.h"
#include "sysutil.h"
#include "Input.h"
#include "english.h"
#include "encrypted file.h"
#include "Random.h"
#endif #endif
+1
View File
@@ -21,6 +21,7 @@
//tactical //tactical
#include "Soldier Create.h" #include "Soldier Create.h"
#include "overhead types.h" #include "overhead types.h"
#include "local.h"
#endif #endif
//Category tabs of the editor buttons //Category tabs of the editor buttons
+3 -3
View File
@@ -867,15 +867,15 @@ void RenderEditorInfo( )
{ {
CHAR16 FPSText[ 50 ]; CHAR16 FPSText[ 50 ];
static INT32 iSpewWarning = 0; static INT32 iSpewWarning = 0;
INT16 iMapIndex; UINT16 uiMapIndex;
SetFont( FONT12POINT1 ); SetFont( FONT12POINT1 );
SetFontForeground( FONT_BLACK ); SetFontForeground( FONT_BLACK );
SetFontBackground( FONT_BLACK ); SetFontBackground( FONT_BLACK );
//Display the mapindex position //Display the mapindex position
if( GetMouseMapPos( &iMapIndex ) ) if( GetMouseMapPos( &uiMapIndex ) )
swprintf( FPSText, L" (%d) ", iMapIndex ); swprintf( FPSText, L" (%d) ", uiMapIndex );
else else
swprintf( FPSText, L" " ); swprintf( FPSText, L" " );
mprintfEditor( (UINT16)(iScreenWidthOffset + 50-StringPixLength( FPSText, FONT12POINT1 )/2), 2 * iScreenHeightOffset + 463, FPSText ); mprintfEditor( (UINT16)(iScreenWidthOffset + 50-StringPixLength( FPSText, FONT12POINT1 )/2), 2 * iScreenHeightOffset + 463, FPSText );
+1
View File
@@ -63,6 +63,7 @@
#include "popupmenu.h" #include "popupmenu.h"
#include "Scheduling.h" #include "Scheduling.h"
#include "Timer Control.h" #include "Timer Control.h"
#include "message.h"
#endif #endif
extern void GetSoldierAboveGuyPositions( SOLDIERTYPE *pSoldier, INT16 *psX, INT16 *psY, BOOLEAN fRadio ); extern void GetSoldierAboveGuyPositions( SOLDIERTYPE *pSoldier, INT16 *psX, INT16 *psY, BOOLEAN fRadio );
+1
View File
@@ -43,6 +43,7 @@
#include "pits.h" #include "pits.h"
#include "Item Statistics.h" #include "Item Statistics.h"
#include "Scheduling.h" #include "Scheduling.h"
#include "MessageBoxScreen.h"
#endif #endif
//=========================================================================== //===========================================================================
+1
View File
@@ -13,6 +13,7 @@
#include "tiledat.h" #include "tiledat.h"
#include "worlddef.h" #include "worlddef.h"
#include "worldman.h" #include "worldman.h"
#include "Editor Undo.h"
#endif #endif
+1
View File
@@ -37,6 +37,7 @@
#include "english.h" #include "english.h"
#include "World Items.h" #include "World Items.h"
#include "text.h" #include "text.h"
#include "Soldier Create.h"
#endif #endif
extern BOOLEAN gfOverheadMapDirty; extern BOOLEAN gfOverheadMapDirty;
+1
View File
@@ -73,6 +73,7 @@
#include "Inventory Choosing.h" #include "Inventory Choosing.h"
#include "Music Control.h" #include "Music Control.h"
#include "Soldier Profile.h" #include "Soldier Profile.h"
#include "GameSettings.h"
#endif #endif
+3 -2
View File
@@ -20,11 +20,12 @@
#include "Editor Taskbar Utils.h" #include "Editor Taskbar Utils.h"
#endif #endif
#include "vobject_blitters.h"
extern BOOLEAN gfOverheadMapDirty; extern BOOLEAN gfOverheadMapDirty;
extern void SetClippingRect(SGPRect *clip); //extern void SetClippingRect(SGPRect *clip);
extern void GetClippingRect(SGPRect *clip); //extern void GetClippingRect(SGPRect *clip);
extern INT32 iEditorToolbar; extern INT32 iEditorToolbar;
+3
View File
@@ -19,6 +19,9 @@
#include "Music Control.h" #include "Music Control.h"
#include "cursors.h" #include "cursors.h"
#include "Intro.h" #include "Intro.h"
#include "Text.h"
#include "_Ja25EnglishText.h"
#include "Soldier Profile.h"
#endif #endif
//////////////////////////////////////////// ////////////////////////////////////////////
+12
View File
@@ -20,6 +20,18 @@
#include "Language Defines.h" #include "Language Defines.h"
#include "HelpScreen.h" #include "HelpScreen.h"
#include "INIReader.h" #include "INIReader.h"
#include "Shade Table Util.h"
#include "soldier profile type.h"
#include "Random.h"
#include "SaveLoadGame.h"
#include "sgp.h"
#include "screenids.h"
#include "Font Control.h"
#include "message.h"
#include "Campaign.h"
#include "meanwhile.h"
#include "strategicmap.h"
#include "Queen Command.h"
#endif #endif
#include "Text.h" #include "Text.h"
+8
View File
@@ -24,6 +24,14 @@
#include "HelpScreen.h" #include "HelpScreen.h"
#include "HelpScreenText.h" #include "HelpScreenText.h"
#include "Line.h" #include "Line.h"
#include "Game Clock.h"
#include "GameSettings.h"
#include "laptop.h"
#include "Text Input.h"
#include "english.h"
#include "renderworld.h"
#include "Game Init.h"
#include "Overhead.h"
#endif #endif
extern INT16 gsVIEWPORT_END_Y; extern INT16 gsVIEWPORT_END_Y;
+6
View File
@@ -5,6 +5,7 @@
#include "INIReader.h" #include "INIReader.h"
#else #else
#include "builddefines.h"
#include <stdio.h> #include <stdio.h>
#include "sgp.h" #include "sgp.h"
#include "Gameloop.h" #include "Gameloop.h"
@@ -54,6 +55,11 @@
#include "jascreens.h" #include "jascreens.h"
#include "XML.h" #include "XML.h"
#include "SaveLoadGame.h" #include "SaveLoadGame.h"
#include "weapons.h"
#include "Strategic Movement.h"
#include "Vehicles.h"
#include "Multilingual Text Code Generator.h"
#include "editscreen.h"
#endif #endif
extern BOOLEAN GetCDromDriveLetter( STR8 pString ); extern BOOLEAN GetCDromDriveLetter( STR8 pString );
+8
View File
@@ -22,6 +22,14 @@
#include "Line.h" #include "Line.h"
#include "Intro.h" #include "Intro.h"
#include "Cinematics.h" #include "Cinematics.h"
#include "mainmenuscreen.h"
#include "Music Control.h"
#include "LibraryDataBase.h"
#include "english.h"
#include "Game Init.h"
#include "Soldier Profile.h"
#include "soldier profile type.h"
#include "MessageBoxScreen.h"
#endif #endif
extern STR16 gzIntroScreen[]; extern STR16 gzIntroScreen[];
+2
View File
@@ -3,6 +3,8 @@
#pragma message("GENERATED PCH FOR JA2 PROJECT.") #pragma message("GENERATED PCH FOR JA2 PROJECT.")
#include "builddefines.h"
#include <time.h> #include <time.h>
#include <stdio.h> #include <stdio.h>
#include <stdarg.h> #include <stdarg.h>
+5 -1
View File
@@ -1,7 +1,11 @@
#ifdef PRECOMPILEDHEADERS #ifdef PRECOMPILEDHEADERS
#include "JA2 All.h" #include "JA2 All.h"
#else #else
//add includes here! #include "Types.h"
#include "vsurface.h"
#include "mainmenuscreen.h"
#include "Video.h"
#include "Timer Control.h"
#endif #endif
UINT32 guiSplashFrameFade = 10; UINT32 guiSplashFrameFade = 10;
+2
View File
@@ -11,6 +11,8 @@
#include "Soldier Profile.h" #include "Soldier Profile.h"
#include "email.h" #include "email.h"
#include "Text.h" #include "Text.h"
#include "aimsort.h"
#include "Assignments.h"
#endif #endif
+4
View File
@@ -40,6 +40,10 @@
#include "Merc Contract.h" #include "Merc Contract.h"
#include "Strategic Merc Handler.h" #include "Strategic Merc Handler.h"
#include "Language Defines.h" #include "Language Defines.h"
#include "Assignments.h"
#include "Sound Control.h"
#include "Quests.h"
#include "strategicmap.h"
#endif #endif
#include "Strategic Town Loyalty.h" #include "Strategic Town Loyalty.h"
+4 -1
View File
@@ -17,7 +17,10 @@
#include "Random.h" #include "Random.h"
#include "Text.h" #include "Text.h"
#include "Multi Language Graphic Utils.h" #include "Multi Language Graphic Utils.h"
#include "Utility.h" // #include "Utility.h"
#include "armsdealerinvinit.h"
#include "GameSettings.h"
#include "message.h"
#endif #endif
+1
View File
@@ -18,6 +18,7 @@
#include "Overhead.h" #include "Overhead.h"
#include "Text.h" #include "Text.h"
#include "Weapons.h" #include "Weapons.h"
#include "GameSettings.h"
#endif #endif
+2 -1
View File
@@ -19,9 +19,10 @@
#include "input.h" #include "input.h"
#include "line.h" #include "line.h"
#include "Text.h" #include "Text.h"
#include "Strategic.h"
#include "Campaign Types.h" #include "Campaign Types.h"
#include "Multi Language Graphic Utils.h" #include "Multi Language Graphic Utils.h"
#include "strategic.h"
#include "strategicmap.h"
#endif #endif
+1
View File
@@ -1,6 +1,7 @@
#ifndef __BOBBYRMAILORDER_H #ifndef __BOBBYRMAILORDER_H
#define __BOBBYRMAILORDER_H #define __BOBBYRMAILORDER_H
#include "LaptopSave.h"
+10
View File
@@ -4,6 +4,16 @@
#else #else
#include "laptop.h" #include "laptop.h"
#include "BobbyRShipments.h" #include "BobbyRShipments.h"
#include "bobbyr.h"
#include "utilities.h"
#include "WCheck.h"
#include "Text.h"
#include "BobbyRGuns.h"
#include "cursors.h"
#include "BobbyRMailOrder.h"
#include "wordwrap.h"
#include "strategic.h"
#include "strategicmap.h"
#endif #endif
+6 -1
View File
@@ -2,7 +2,12 @@
#include "Laptop All.h" #include "Laptop All.h"
#include "BrokenLink.h" #include "BrokenLink.h"
#else #else
#include "Types.h"
#include "font.h"
#include "laptop.h"
#include "Font Control.h"
#include "Text.h"
#include "wordwrap.h"
#endif #endif
#define BROKEN_LINK__FONT FONT12ARIAL #define BROKEN_LINK__FONT FONT12ARIAL
+1
View File
@@ -24,6 +24,7 @@
#include "IMPVideoObjects.h" #include "IMPVideoObjects.h"
#include "IMP Confirm.h" #include "IMP Confirm.h"
#include "messageboxscreen.h" #include "messageboxscreen.h"
#include "LaptopSave.h"
#endif #endif
+1
View File
@@ -29,6 +29,7 @@
#include "strategic.h" #include "strategic.h"
#include "Game Clock.h" #include "Game Clock.h"
#include "text.h" #include "text.h"
#include "LaptopSave.h"
#endif #endif
#define FULL_NAME_CURSOR_Y LAPTOP_SCREEN_WEB_UL_Y + 138 #define FULL_NAME_CURSOR_Y LAPTOP_SCREEN_WEB_UL_Y + 138
+1
View File
@@ -33,6 +33,7 @@
#include "Soldier Profile.h" #include "Soldier Profile.h"
#include "Animation Data.h" #include "Animation Data.h"
#include "random.h" #include "random.h"
#include "LaptopSave.h"
#endif #endif
// how many times should a 'die' be rolled for skills of the same type? // how many times should a 'die' be rolled for skills of the same type?
+2
View File
@@ -31,6 +31,8 @@
#include "Game Event Hook.h" #include "Game Event Hook.h"
#include "LaptopSave.h" #include "LaptopSave.h"
#include "strategic.h" #include "strategic.h"
#include "weapons.h"
#include "Random.h"
#endif #endif
#define IMP_FILENAME_SUFFIX ".dat" #define IMP_FILENAME_SUFFIX ".dat"
+6
View File
@@ -20,6 +20,12 @@
#include "LaptopSave.h" #include "LaptopSave.h"
#include "line.h" #include "line.h"
#include "english.h" #include "english.h"
#include "Merc Hiring.h"
#include "Text.h"
#include "GameSettings.h"
#include "IMP MainPage.h"
#include "IMP Confirm.h"
#include "Game Clock.h"
#endif #endif
void GetPlayerKeyBoardInputForIMPHomePage( void ); void GetPlayerKeyBoardInputForIMPHomePage( void );
+3
View File
@@ -21,6 +21,9 @@
#include "LaptopSave.h" #include "LaptopSave.h"
#include "IMP Compile Character.h" #include "IMP Compile Character.h"
#include "IMP Portraits.h" #include "IMP Portraits.h"
#include "soldier profile type.h"
#include "GameSettings.h"
#include "Soldier Profile.h"
#endif #endif
+16
View File
@@ -3,6 +3,22 @@
#include "IMP Skill Trait.h" #include "IMP Skill Trait.h"
#include "_Ja25Englishtext.h" #include "_Ja25Englishtext.h"
#else #else
#include "IMP Skill Trait.h"
#include "Button System.h"
#include "utilities.h"
#include "Debug.h"
#include "Text.h"
#include "Font Control.h"
#include "font.h"
#include "laptop.h"
#include "cursors.h"
#include "IMP MainPage.h"
#include "IMPVideoObjects.h"
#include "_Ja25EnglishText.h"
#include "wordwrap.h"
#include "CharProfile.h"
#include "soldier profile type.h"
#include "IMP Compile Character.h"
#endif #endif
+2
View File
@@ -1,6 +1,8 @@
#ifndef __IMP_SKILL_TRAIT__H_ #ifndef __IMP_SKILL_TRAIT__H_
#define __IMP_SKILL_TRAIT__H_ #define __IMP_SKILL_TRAIT__H_
#include "Types.h"
void EnterIMPSkillTrait( void ); void EnterIMPSkillTrait( void );
void RenderIMPSkillTrait( void ); void RenderIMPSkillTrait( void );
void ExitIMPSkillTrait( void ); void ExitIMPSkillTrait( void );
+3
View File
@@ -19,6 +19,9 @@
#include "Sound Control.h" #include "Sound Control.h"
#include "IMP Text System.h" #include "IMP Text System.h"
#include "text.h" #include "text.h"
#include "soldier profile type.h"
#include "GameSettings.h"
#include "LaptopSave.h"
#endif #endif
INT32 iCurrentVoice = 0; INT32 iCurrentVoice = 0;
+2
View File
@@ -11,6 +11,8 @@
#include "cursors.h" #include "cursors.h"
#include "IMP HomePage.h" #include "IMP HomePage.h"
#include "laptop.h" #include "laptop.h"
#include "Multi Language Graphic Utils.h"
#include "IMP Attribute Selection.h"
#endif #endif
// globals // globals
+2
View File
@@ -8,6 +8,8 @@
#include "Debug.h" #include "Debug.h"
#include "LaptopSave.h" #include "LaptopSave.h"
#include "ShopKeeper Interface.h" #include "ShopKeeper Interface.h"
#include "armsdealerinvinit.h"
#include "GameSettings.h"
#endif #endif
+2
View File
@@ -19,6 +19,8 @@
#include "AimMembers.h" #include "AimMembers.h"
#include "Random.h" #include "Random.h"
#include "Text.h" #include "Text.h"
#include "LaptopSave.h"
#include "finances.h"
#endif #endif
//static EmailPtr pEmailList; //static EmailPtr pEmailList;
+1
View File
@@ -1,6 +1,7 @@
#ifdef PRECOMPILEDHEADERS #ifdef PRECOMPILEDHEADERS
#include "Laptop All.h" #include "Laptop All.h"
#else #else
#include "builddefines.h"
#include <stdio.h> #include <stdio.h>
#include "laptop.h" #include "laptop.h"
#include "files.h" #include "files.h"
+2
View File
@@ -15,6 +15,8 @@
#include "Text.h" #include "Text.h"
#include "Strategic Mines.h" #include "Strategic Mines.h"
#include "LaptopSave.h" #include "LaptopSave.h"
#include "Campaign Types.h"
#include "strategicmap.h"
#endif #endif
// the global defines // the global defines
+2
View File
@@ -17,6 +17,8 @@
#include "Game clock.h" #include "Game clock.h"
#include "english.h" #include "english.h"
#include "Text.h" #include "Text.h"
#include "LaptopSave.h"
#include "Random.h"
#endif #endif
#include "meanwhile.h" #include "meanwhile.h"
+2
View File
@@ -15,6 +15,8 @@
#include "strategicmap.h" #include "strategicmap.h"
#include "QuestText.h" #include "QuestText.h"
#include "text.h" #include "text.h"
#include "message.h"
#include "LaptopSave.h"
#endif #endif
+1
View File
@@ -24,6 +24,7 @@
#include "Random.h" #include "Random.h"
#include "Strategic Status.h" #include "Strategic Status.h"
#include "Assignments.h" #include "Assignments.h"
#include "Map Screen Interface.h"
#endif #endif
#define INS_CTRCT_ORDER_GRID_WIDTH 132 #define INS_CTRCT_ORDER_GRID_WIDTH 132
+5
View File
@@ -79,6 +79,11 @@
#include "Multi Language Graphic Utils.h" #include "Multi Language Graphic Utils.h"
#include "BrokenLink.h" #include "BrokenLink.h"
#include "BobbyRShipments.h" #include "BobbyRShipments.h"
#include "Dialogue Control.h"
#include "helpscreen.h"
#include "cheats.h"
#include "Strategic Status.h"
#include "Arms Dealer Init.h"
#endif #endif
+1
View File
@@ -19,6 +19,7 @@
#include "LaptopSave.h" #include "LaptopSave.h"
#include "Text.h" #include "Text.h"
#include "Speck Quotes.h" #include "Speck Quotes.h"
#include "Multi Language Graphic Utils.h"
#endif #endif
#define MERC_ACCOUNT_TEXT_FONT FONT14ARIAL #define MERC_ACCOUNT_TEXT_FONT FONT14ARIAL
+5
View File
@@ -22,6 +22,11 @@
#include "LaptopSave.h" #include "LaptopSave.h"
#include "Text.h" #include "Text.h"
#include "Speck Quotes.h" #include "Speck Quotes.h"
#include "Multi Language Graphic Utils.h"
#include "Quests.h"
#include "Assignments.h"
#include "Input.h"
#include "english.h"
#endif #endif
#include "Cheats.h" #include "Cheats.h"
+2
View File
@@ -23,6 +23,8 @@
#include "Speck Quotes.h" #include "Speck Quotes.h"
#include "mercs Account.h" #include "mercs Account.h"
#include "Soldier Profile.h" #include "Soldier Profile.h"
#include "Game Event Hook.h"
#include "Quests.h"
#endif #endif
#define MERC_TEXT_FONT FONT12ARIAL #define MERC_TEXT_FONT FONT12ARIAL
+3
View File
@@ -28,6 +28,9 @@
#include "Soldier Add.h" #include "Soldier Add.h"
#include "Interface Items.h" #include "Interface Items.h"
#include "Weapons.h" #include "Weapons.h"
#include "strategicmap.h"
#include "GameSettings.h"
#include "Merc Contract.h"
#endif #endif
#include "Soldier Macros.h" #include "Soldier Macros.h"
+13 -136
View File
@@ -2,6 +2,19 @@
#include "JA2 All.h" #include "JA2 All.h"
#include "Loading Screen.h" #include "Loading Screen.h"
#include "INIReader.h" #include "INIReader.h"
#else
#include "vsurface.h"
#include "mapscreen.h"
#include "Loading Screen.h"
#include "Campaign Types.h"
#include "Game Clock.h"
#include "GameSettings.h"
#include "Random.h"
#include "Debug.h"
#include "local.h"
#include "Font Control.h"
#include "font.h"
#include "render dirty.h"
#endif #endif
extern HVSURFACE ghFrameBuffer; extern HVSURFACE ghFrameBuffer;
@@ -35,7 +48,6 @@ BOOLEAN bShowSmallImage = FALSE;
SECTOR_LOADSCREENS gSectorLoadscreens[MAX_SECTOR_LOADSCREENS]; SECTOR_LOADSCREENS gSectorLoadscreens[MAX_SECTOR_LOADSCREENS];
//returns the UINT8 ID for the specified sector. //returns the UINT8 ID for the specified sector.
UINT8 GetLoadScreenID( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ ) UINT8 GetLoadScreenID( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ )
{ {
@@ -44,8 +56,6 @@ UINT8 GetLoadScreenID( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ )
BOOLEAN fNight = FALSE; BOOLEAN fNight = FALSE;
ubSectorID = SECTOR( sSectorX, sSectorY ); ubSectorID = SECTOR( sSectorX, sSectorY );
if( NightTime() ) //before 5AM or after 9PM if( NightTime() ) //before 5AM or after 9PM
{ {
fNight = TRUE; fNight = TRUE;
@@ -568,138 +578,13 @@ void DisplayLoadScreenWithID( UINT8 ubLoadScreenID )
HVSURFACE hVSurface; HVSURFACE hVSurface;
UINT32 uiLoadScreen; UINT32 uiLoadScreen;
STRING512 smallImage; STRING512 smallImage;
BOOLEAN fExternalLS = FALSE;
bShowSmallImage = FALSE; bShowSmallImage = FALSE;
vs_desc.fCreateFlags = VSURFACE_CREATE_FROMFILE | VSURFACE_SYSTEM_MEM_USAGE; vs_desc.fCreateFlags = VSURFACE_CREATE_FROMFILE | VSURFACE_SYSTEM_MEM_USAGE;
if (gGameExternalOptions.gfUseExternalLoadscreens)
{
if ((ubLoadScreenID == HELI || ubLoadScreenID == DAY || ubLoadScreenID == DAY_ALT ||
ubLoadScreenID == NIGHT || ubLoadScreenID == NIGHT_ALT) && szSector != NULL)
{
fExternalLS = TRUE;
}
else
{
fExternalLS = FALSE;
}
}
else
{
if ((ubLoadScreenID == HELI || ubLoadScreenID == DAY || ubLoadScreenID == DAY_ALT ||
ubLoadScreenID == NIGHT || ubLoadScreenID == NIGHT_ALT) && szSector != NULL)
{
fExternalLS = TRUE;
}
else
{
fExternalLS = FALSE;
}
}
if (fExternalLS)
{
// Get the image path
char szImagePath[80];
char szImageFormat[5];
char szFullImagePath[80];
// Start screen
if (ubLoadScreenID == HELI)
{
strncpy(szImagePath, gSectorLoadscreens[0].szDay, 80);
strncpy(szImageFormat, ".", MAX_IMAGE_FORMAT_CHARS);
strcat(szImageFormat, gSectorLoadscreens[0].szImageFormat);
}
else
{
for (int i = 1; i < MAX_SECTOR_LOADSCREENS; i++)
{
// We found the sector
if (strcmp(gSectorLoadscreens[i].szLocation, szSector) == 0)
{
strncpy(szImageFormat, ".", MAX_IMAGE_FORMAT_CHARS);
strcat(szImageFormat, gSectorLoadscreens[i].szImageFormat);
BOOLEAN fAlternate = gSectorLoadscreens[i].RandomAltSector;
if (fAlternate)
{
// Day
if (ubLoadScreenID == DAY)
{
if( Random( 2 ) )
{
ubLoadScreenID = DAY;
}
else
{
ubLoadScreenID = DAY_ALT;
}
}
// Night
else
{
if( Random( 2 ) )
{
ubLoadScreenID = NIGHT;
}
else
{
ubLoadScreenID = NIGHT_ALT;
}
}
}
switch (ubLoadScreenID) switch (ubLoadScreenID)
{ {
case DAY:
strncpy(szImagePath, gSectorLoadscreens[i].szDay, MAX_IMAGE_PATH_CHARS);
break;
case DAY_ALT:
strncpy(szImagePath, gSectorLoadscreens[i].szDayAlt, MAX_IMAGE_PATH_CHARS);
break;
case NIGHT:
strncpy(szImagePath, gSectorLoadscreens[i].szNight, MAX_IMAGE_PATH_CHARS);
break;
case NIGHT_ALT:
strncpy(szImagePath, gSectorLoadscreens[i].szNightAlt, MAX_IMAGE_PATH_CHARS);
break;
}
break;
}
}
}
// Small image: 640x480
strncpy(szFullImagePath, szImagePath, 80);
strcat(szFullImagePath, szImageFormat);
strcpy(smallImage,szFullImagePath);
// Actual image, depending on the resolution
if (iResolution == 1)
{
strncpy(szFullImagePath, szImagePath, 80);
strcat(szFullImagePath, "_800x600");
strcat(szFullImagePath, szImageFormat);
}
else if (iResolution == 2)
{
strncpy(szFullImagePath, szImagePath, 80);
strcat(szFullImagePath, "_1024x768");
strcat(szFullImagePath, szImageFormat);
}
strcpy(vs_desc.ImageFile,szFullImagePath);
}
else
{
switch( ubLoadScreenID )
{
case LOADINGSCREEN_NOTHING: case LOADINGSCREEN_NOTHING:
strcpy(smallImage, "LOADSCREENS\\LS_Heli.sti"); strcpy(smallImage, "LOADSCREENS\\LS_Heli.sti");
if (iResolution == 0) if (iResolution == 0)
@@ -715,7 +600,6 @@ void DisplayLoadScreenWithID( UINT8 ubLoadScreenID )
strcpy(vs_desc.ImageFile, "LOADSCREENS\\LS_Heli_1024x768.sti"); strcpy(vs_desc.ImageFile, "LOADSCREENS\\LS_Heli_1024x768.sti");
} }
break; break;
case LOADINGSCREEN_DAYGENERIC: case LOADINGSCREEN_DAYGENERIC:
strcpy(smallImage, "LOADSCREENS\\LS_DayGeneric.sti"); strcpy(smallImage, "LOADSCREENS\\LS_DayGeneric.sti");
if (iResolution == 0) if (iResolution == 0)
@@ -970,11 +854,8 @@ void DisplayLoadScreenWithID( UINT8 ubLoadScreenID )
} }
break; break;
case LOADINGSCREEN_HELI: case LOADINGSCREEN_HELI:
strcpy(smallImage, "LOADSCREENS\\LS_Heli.sti"); strcpy(smallImage, "LOADSCREENS\\LS_Heli.sti");
if (iResolution == 0) if (iResolution == 0)
{ {
strcpy(vs_desc.ImageFile, "LOADSCREENS\\LS_Heli.sti"); strcpy(vs_desc.ImageFile, "LOADSCREENS\\LS_Heli.sti");
@@ -989,7 +870,6 @@ void DisplayLoadScreenWithID( UINT8 ubLoadScreenID )
} }
break; break;
case LOADINGSCREEN_BASEMENT: case LOADINGSCREEN_BASEMENT:
strcpy(smallImage, "LOADSCREENS\\LS_Basement.sti"); strcpy(smallImage, "LOADSCREENS\\LS_Basement.sti");
if (iResolution == 0) if (iResolution == 0)
@@ -1404,9 +1284,6 @@ void DisplayLoadScreenWithID( UINT8 ubLoadScreenID )
strcpy(vs_desc.ImageFile, "LOADSCREENS\\LS_Heli_1024x768.sti"); strcpy(vs_desc.ImageFile, "LOADSCREENS\\LS_Heli_1024x768.sti");
} }
break; break;
/* WANNE: Sir tech made - END */
} // Switch - END
} }
// Sti loadscreen (big image) is not available // Sti loadscreen (big image) is not available
+1
View File
@@ -31,6 +31,7 @@
#include "text.h" #include "text.h"
#include "Multi Language Graphic Utils.h" #include "Multi Language Graphic Utils.h"
#include "Encrypted File.h" #include "Encrypted File.h"
#include "ja2 splash.h"
#endif #endif
#define MAINMENU_TEXT_FILE "LoadScreens\\MainMenu.edt" #define MAINMENU_TEXT_FILE "LoadScreens\\MainMenu.edt"
+1
View File
@@ -23,6 +23,7 @@
#include "cursor control.h" #include "cursor control.h"
#include "laptop.h" #include "laptop.h"
#include "text.h" #include "text.h"
#include "overhead map.h"
#endif #endif
#define MSGBOX_DEFAULT_WIDTH 300 #define MSGBOX_DEFAULT_WIDTH 300
+2
View File
@@ -1,6 +1,8 @@
#ifndef _MSGBOX_H #ifndef _MSGBOX_H
#define _MSGBOX_H #define _MSGBOX_H
#include "mousesystem.h"
// Message box flags // Message box flags
#define MSG_BOX_FLAG_USE_CENTERING_RECT 0x0001 // Pass in a rect to center in #define MSG_BOX_FLAG_USE_CENTERING_RECT 0x0001 // Pass in a rect to center in
#define MSG_BOX_FLAG_OK 0x0002 // Displays OK button #define MSG_BOX_FLAG_OK 0x0002 // Displays OK button
+2
View File
@@ -35,6 +35,8 @@
#include "Message.h" #include "Message.h"
#include "Language Defines.h" #include "Language Defines.h"
#include "Multi Language Graphic Utils.h" #include "Multi Language Graphic Utils.h"
#include "Map Information.h"
#include "SmokeEffects.h"
#endif #endif
#include "WorldMan.h" #include "WorldMan.h"
+1
View File
@@ -1,6 +1,7 @@
#ifndef _OPTIONS_SCREEN__H_ #ifndef _OPTIONS_SCREEN__H_
#define _OPTIONS_SCREEN__H_ #define _OPTIONS_SCREEN__H_
#include "MessageBoxScreen.h"
#define OPT_BUTTON_FONT FONT14ARIAL #define OPT_BUTTON_FONT FONT14ARIAL
#define OPT_BUTTON_ON_COLOR 73//FONT_MCOLOR_WHITE #define OPT_BUTTON_ON_COLOR 73//FONT_MCOLOR_WHITE
+13
View File
@@ -90,6 +90,19 @@
#include "lighteffects.h" #include "lighteffects.h"
#include "HelpScreen.h" #include "HelpScreen.h"
#include "Animated ProgressBar.h" #include "Animated ProgressBar.h"
#include "merctextbox.h"
#include "render dirty.h"
#include "Map Information.h"
#include "Interface Items.h"
#include "Civ Quotes.h"
#include "Scheduling.h"
#include "Animation Data.h"
#include "Game Init.h"
#include "cheats.h"
#include "Strategic Event Handler.h"
#include "interface panels.h"
#include "interface dialogue.h"
#include "Assignments.h"
#endif #endif
#include "BobbyR.h" #include "BobbyR.h"
+1
View File
@@ -2,6 +2,7 @@
#define _SAVE_LOAD_GAME_H_ #define _SAVE_LOAD_GAME_H_
#include "Soldier Control.h" #include "Soldier Control.h"
#include "GameSettings.h"
#define BYTESINMEGABYTE 1048576 //1024*1024 #define BYTESINMEGABYTE 1048576 //1024*1024
#define REQUIRED_FREE_SPACE (20 * BYTESINMEGABYTE) #define REQUIRED_FREE_SPACE (20 * BYTESINMEGABYTE)
+1
View File
@@ -35,6 +35,7 @@
#include "Message.h" #include "Message.h"
#include "Map Screen Interface.h" #include "Map Screen Interface.h"
#include "Multi Language Graphic Utils.h" #include "Multi Language Graphic Utils.h"
#include "Campaign Types.h"
#endif #endif
#include "Campaign Init.h" #include "Campaign Init.h"
+2
View File
@@ -32,7 +32,9 @@
#include "MemMan.h" #include "MemMan.h"
#include "Debug.h" #include "Debug.h"
#include "Container.h" #include "Container.h"
#if _MSC_VER < 1300 //(iostream.h was removed from VC.NET2003)
#include <iostream.h> #include <iostream.h>
#endif
#endif #endif
+4 -5
View File
@@ -6,17 +6,16 @@
#include "VObject.h" #include "VObject.h"
#include "VSurface.h" #include "VSurface.h"
#ifdef __cplusplus
extern "C" {
#endif
#if defined( JA2 ) || defined( UTIL ) #if defined( JA2 ) || defined( UTIL )
#include "Video.h" #include "Video.h"
#else #else
#include "video2.h" #include "video2.h"
#endif #endif
#ifdef __cplusplus
extern "C" {
#endif
extern UINT32 GetCursorHandle(UINT32 uiCursorIndex); extern UINT32 GetCursorHandle(UINT32 uiCursorIndex);
extern void UnloadCursorData(UINT32 uiCursorIndex); extern void UnloadCursorData(UINT32 uiCursorIndex);
+7
View File
@@ -169,6 +169,13 @@ extern void _DebugMessage(UINT8 *pSourceFile, UINT32 uiLineNum, UINT8 *pString)
//******************************************************************************************* //*******************************************************************************************
#endif #endif
#ifdef DEBUG_ATTACKBUSY
#define DebugAttackBusy(x) OutputDebugString( x)
#else
#define DebugAttackBusy(x)
#endif
/* /*
#ifdef __cplusplus #ifdef __cplusplus
} }
@@ -9,6 +9,7 @@
#include <ddraw.h> #include <ddraw.h>
#include "debug.h" #include "debug.h"
#include "video_private.h" #include "video_private.h"
#include "vobject_blitters.h"
#endif #endif
// DirectDrawSurface2 Calls // DirectDrawSurface2 Calls
@@ -3,6 +3,7 @@
#include "DirectX Common.h" #include "DirectX Common.h"
#include <ddraw.h> #include <ddraw.h>
#include "sgp.h"
// Direct Draw Functions // Direct Draw Functions
@@ -1,6 +1,7 @@
#ifndef _EXCEPTION_HANDLING__H_ #ifndef _EXCEPTION_HANDLING__H_
#define _EXCEPTION_HANDLING__H_ #define _EXCEPTION_HANDLING__H_
#include <Windows.h>
//uncomment this line if you want Exceptions to be handled //uncomment this line if you want Exceptions to be handled
#ifdef JA2 #ifdef JA2
+1
View File
@@ -3,6 +3,7 @@
#elif defined( WIZ8_PRECOMPILED_HEADERS ) #elif defined( WIZ8_PRECOMPILED_HEADERS )
#include "WIZ8 SGP ALL.H" #include "WIZ8 SGP ALL.H"
#else #else
#include "builddefines.h"
#include <math.h> #include <math.h>
#include <stdlib.h> #include <stdlib.h>
#include "types.h" #include "types.h"
+1
View File
@@ -33,6 +33,7 @@
#else #else
#include "video2.h" #include "video2.h"
#endif #endif
#include "impTGA.h"
#endif #endif
//************************************************************************** //**************************************************************************
+4 -4
View File
@@ -39,16 +39,16 @@
// Function Prototypes // Function Prototypes
// //
//************************************************************************** //**************************************************************************
/*
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
*/
BOOLEAN LoadTGAFileToImage( HIMAGE hImage, UINT16 fContents ); BOOLEAN LoadTGAFileToImage( HIMAGE hImage, UINT16 fContents );
/*
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
*/
#endif #endif
+18 -1
View File
@@ -30,6 +30,8 @@
#if !defined( JA2 ) && !defined( UTIL ) #if !defined( JA2 ) && !defined( UTIL )
#include "GameData.h" // for MoveTimer() [Wizardry specific] #include "GameData.h" // for MoveTimer() [Wizardry specific]
#endif #endif
#include "LibraryDataBase.h"
#include "utilities.h"
#endif #endif
#include "input.h" #include "input.h"
@@ -40,6 +42,7 @@
#include "dbt.h" #include "dbt.h"
#include "INIReader.h" #include "INIReader.h"
#include "Console.h"
#ifdef JA2 #ifdef JA2
#include "BuildDefines.h" #include "BuildDefines.h"
@@ -120,7 +123,13 @@ INT32 FAR PASCAL WindowProcedure(HWND hWindow, UINT16 Message, WPARAM wParam, LP
{ {
static BOOLEAN fRestore = FALSE; static BOOLEAN fRestore = FALSE;
if(gfIgnoreMessages) if ( Message == WM_USER )
{
FreeConsole();
return 0L;
}
if(gfIgnoreMessages)
return(DefWindowProc(hWindow, Message, wParam, lParam)); return(DefWindowProc(hWindow, Message, wParam, lParam));
// ATE: This is for older win95 or NT 3.51 to get MOUSE_WHEEL Messages // ATE: This is for older win95 or NT 3.51 to get MOUSE_WHEEL Messages
@@ -752,6 +761,10 @@ int PASCAL HandledWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR p
return 0; return 0;
} }
#ifdef LUACONSOLE
CreateConsole();
#endif
#ifdef JA2 #ifdef JA2
#ifdef ENGLISH #ifdef ENGLISH
SetIntroType( INTRO_SPLASH ); SetIntroType( INTRO_SPLASH );
@@ -779,6 +792,10 @@ int PASCAL HandledWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR p
} }
else else
{ // Windows hasn't processed any messages, therefore we handle the rest { // Windows hasn't processed any messages, therefore we handle the rest
#ifdef LUACONSOLE
PollConsole( );
#endif
if (gfApplicationActive == FALSE) if (gfApplicationActive == FALSE)
{ // Well we got nothing to do but to wait for a message to activate { // Well we got nothing to do but to wait for a message to activate
WaitMessage(); WaitMessage();
+1
View File
@@ -11,6 +11,7 @@
#elif defined( WIZ8_PRECOMPILED_HEADERS ) #elif defined( WIZ8_PRECOMPILED_HEADERS )
#include "WIZ8 SGP ALL.H" #include "WIZ8 SGP ALL.H"
#else #else
#include "builddefines.h"
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include "soundman.h" #include "soundman.h"
+5 -1
View File
@@ -1,6 +1,5 @@
#ifdef JA2_PRECOMPILED_HEADERS #ifdef JA2_PRECOMPILED_HEADERS
#include "JA2 SGP ALL.H" #include "JA2 SGP ALL.H"
#include "resource.h"
#elif defined( WIZ8_PRECOMPILED_HEADERS ) #elif defined( WIZ8_PRECOMPILED_HEADERS )
#include "WIZ8 SGP ALL.H" #include "WIZ8 SGP ALL.H"
#else #else
@@ -9,6 +8,7 @@
#include "vobject_blitters.h" #include "vobject_blitters.h"
#include "sgp.h" #include "sgp.h"
#include <stdio.h> #include <stdio.h>
#include <io.h>
#include "renderworld.h" #include "renderworld.h"
#include "Render Dirty.h" #include "Render Dirty.h"
#include "Isometric utils.h" #include "Isometric utils.h"
@@ -16,8 +16,12 @@
#include "impTGA.h" #include "impTGA.h"
#include "timer control.h" #include "timer control.h"
#include "Fileman.h" #include "Fileman.h"
#include "Input.h"
#include "GameSettings.h"
#endif #endif
#include "resource.h"
#ifndef _MT #ifndef _MT
#define _MT #define _MT
#endif #endif
+4 -2
View File
@@ -5,9 +5,11 @@
#include "vsurface.h" #include "vsurface.h"
#include "vobject.h" #include "vobject.h"
/*
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
*/
extern SGPRect ClippingRect; extern SGPRect ClippingRect;
extern UINT32 guiTranslucentMask; extern UINT32 guiTranslucentMask;
@@ -186,9 +188,9 @@ BOOLEAN Blt8BPPDataTo16BPPBufferTransZPixelateObscured( UINT16 *pBuffer, UINT32
BOOLEAN FillRect8BPP(UINT8 *pBuffer, UINT32 uiDestPitchBYTES, INT32 x1, INT32 y1, INT32 x2, INT32 y2, UINT8 color); BOOLEAN FillRect8BPP(UINT8 *pBuffer, UINT32 uiDestPitchBYTES, INT32 x1, INT32 y1, INT32 x2, INT32 y2, UINT8 color);
BOOLEAN FillRect16BPP(UINT16 *pBuffer, UINT32 uiDestPitchBYTES, INT32 x1, INT32 y1, INT32 x2, INT32 y2, UINT16 color); BOOLEAN FillRect16BPP(UINT16 *pBuffer, UINT32 uiDestPitchBYTES, INT32 x1, INT32 y1, INT32 x2, INT32 y2, UINT16 color);
/*
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
*/
#endif #endif
+6
View File
@@ -4,6 +4,7 @@
#include "Strategic All.h" #include "Strategic All.h"
#include "INIReader.h" #include "INIReader.h"
#else #else
#include "builddefines.h"
#include <stdio.h> #include <stdio.h>
#include "types.h" #include "types.h"
#include "english.h" #include "english.h"
@@ -33,6 +34,11 @@
#include "Creature Spreading.h" #include "Creature Spreading.h"
#include "message.h" #include "message.h"
#include "Game Init.h" #include "Game Init.h"
#include "Strategic AI.h"
#include "Campaign.h"
#include "Auto Resolve.h"
#include "Strategic Status.h"
#include "wordwrap.h"
#endif #endif
#ifdef JA2BETAVERSION #ifdef JA2BETAVERSION
+7
View File
@@ -56,6 +56,13 @@
#include "math.h" #include "math.h"
#include "SkillCheck.h" #include "SkillCheck.h"
#include "Strategic Pathing.h" #include "Strategic Pathing.h"
#include "Game Event Hook.h"
#include "Strategic Event Handler.h"
#include "Map Information.h"
#include "Strategic Status.h"
#include "history.h"
#include "Map Screen Interface Map Inventory.h"
#include "interface dialogue.h"
#endif #endif
#include "MilitiaSquads.h" #include "MilitiaSquads.h"
+10
View File
@@ -4,6 +4,7 @@
#include "Strategic All.h" #include "Strategic All.h"
#include "GameSettings.h" #include "GameSettings.h"
#else #else
#include "builddefines.h"
#include <stdio.h> #include <stdio.h>
#include "types.h" #include "types.h"
#include "Auto Resolve.h" #include "Auto Resolve.h"
@@ -56,6 +57,15 @@
#include "morale.h" #include "morale.h"
#include "Strategic Town Loyalty.h" #include "Strategic Town Loyalty.h"
#include "GameSettings.h" #include "GameSettings.h"
#include "Soldier macros.h"
#include "strategicmap.h"
#include "Quests.h"
#include "meanwhile.h"
#include "Inventory Choosing.h"
#include "Game Event Hook.h"
#include "Assignments.h"
#include "cheats.h"
#include "Map Information.h"
#endif #endif
#include "Reinforcement.h" #include "Reinforcement.h"
+3
View File
@@ -14,6 +14,9 @@
#include "Creature Spreading.h" #include "Creature Spreading.h"
#include "Strategic AI.h" #include "Strategic AI.h"
#include "XML.h" #include "XML.h"
#include "expat.h"
#include "Debug Control.h"
#include "Tactical Save.h"
#endif #endif
extern BOOLEAN InitStrategicMovementCosts(); extern BOOLEAN InitStrategicMovementCosts();
+4
View File
@@ -27,6 +27,10 @@
#include "Map Edgepoints.h" #include "Map Edgepoints.h"
#include "Animation Data.h" #include "Animation Data.h"
#include "opplist.h" #include "opplist.h"
#include "meanwhile.h"
#include "Strategic AI.h"
#include "MessageBoxScreen.h"
#include "Map Information.h"
#endif #endif
#ifdef JA2BETAVERSION #ifdef JA2BETAVERSION
+15 -10
View File
@@ -20,6 +20,11 @@
#include "Event Pump.h" #include "Event Pump.h"
#include "Text.h" #include "Text.h"
#include "Interface Control.h" #include "Interface Control.h"
#include "Map Screen Interface Map.h"
#include "Map Screen Interface Bottom.h"
#include "gamescreen.h"
#include "Map Information.h"
#include "GameSettings.h"
#endif #endif
//#define DEBUG_GAME_CLOCK //#define DEBUG_GAME_CLOCK
@@ -68,23 +73,23 @@ extern BOOLEAN fMapScreenBottomDirty;
//These contain all of the information about the game time, rate of time, etc. //These contain all of the information about the game time, rate of time, etc.
//All of these get saved and loaded. //All of these get saved and loaded.
INT32 giTimeCompressMode = TIME_COMPRESS_X0; INT32 giTimeCompressMode = TIME_COMPRESS_X0;
UINT8 gubClockResolution = 1; UINT8 gubClockResolution = 1;
BOOLEAN gfGamePaused = TRUE; BOOLEAN gfGamePaused = TRUE;
BOOLEAN gfTimeInterrupt = FALSE; BOOLEAN gfTimeInterrupt = FALSE;
BOOLEAN gfTimeInterruptPause = FALSE; BOOLEAN gfTimeInterruptPause = FALSE;
BOOLEAN fSuperCompression = FALSE; BOOLEAN fSuperCompression = FALSE;
UINT32 guiGameClock = gGameExternalOptions.iGameStartingTime; UINT32 guiGameClock = gGameExternalOptions.iGameStartingTime;
UINT32 guiPreviousGameClock = 0; // used only for error-checking purposes UINT32 guiPreviousGameClock = 0; // used only for error-checking purposes
UINT32 guiGameSecondsPerRealSecond; UINT32 guiGameSecondsPerRealSecond;
UINT32 guiTimesThisSecondProcessed = 0; UINT32 guiTimesThisSecondProcessed = 0;
INT32 iPausedPopUpBox = -1; INT32 iPausedPopUpBox = -1;
UINT32 guiDay; UINT32 guiDay;
UINT32 guiHour; UINT32 guiHour;
UINT32 guiMin; UINT32 guiMin;
CHAR16 gswzWorldTimeStr[20]; CHAR16 gswzWorldTimeStr[20];
INT32 giTimeCompressSpeeds[ NUM_TIME_COMPRESS_SPEEDS ] = { 0, 1, 5 * 60, 30 * 60, 60 * 60 }; INT32 giTimeCompressSpeeds[ NUM_TIME_COMPRESS_SPEEDS ] = { 0, 1, 5 * 60, 30 * 60, 60 * 60 };
UINT16 usPausedActualWidth; UINT16 usPausedActualWidth;
UINT16 usPausedActualHeight; UINT16 usPausedActualHeight;
UINT32 guiTimeOfLastEventQuery = 0; UINT32 guiTimeOfLastEventQuery = 0;
BOOLEAN gfLockPauseState = FALSE; BOOLEAN gfLockPauseState = FALSE;
@@ -95,7 +100,7 @@ UINT32 guiLockPauseStateLastReasonId = 0;
//***When adding new saved time variables, make sure you remove the appropriate amount from the paddingbytes and //***When adding new saved time variables, make sure you remove the appropriate amount from the paddingbytes and
// more IMPORTANTLY, add appropriate code in Save/LoadGameClock()! // more IMPORTANTLY, add appropriate code in Save/LoadGameClock()!
#define TIME_PADDINGBYTES 20 #define TIME_PADDINGBYTES 20
UINT8 gubUnusedTimePadding[TIME_PADDINGBYTES]; UINT8 gubUnusedTimePadding[TIME_PADDINGBYTES];
+7
View File
@@ -37,6 +37,13 @@
#include "Strategic AI.h" #include "Strategic AI.h"
#include "Merc Contract.h" #include "Merc Contract.h"
#include "Strategic Status.h" #include "Strategic Status.h"
#include "INIReader.h"
#include "GameSettings.h"
#include "english.h"
#include "Input.h"
#include "Soldier Profile.h"
#include "laptop.h"
#include "Campaign.h"
#endif #endif
#ifdef JA2BETAVERSION #ifdef JA2BETAVERSION
+1
View File
@@ -1,6 +1,7 @@
#ifdef PRECOMPILEDHEADERS #ifdef PRECOMPILEDHEADERS
#include "Strategic All.h" #include "Strategic All.h"
#else #else
#include "builddefines.h"
#include <stdio.h> #include <stdio.h>
#include "types.h" #include "types.h"
#include "Game Events.h" #include "Game Events.h"
+13
View File
@@ -47,6 +47,19 @@
#include "npc.h" #include "npc.h"
#include "Init.h" #include "Init.h"
#include "GameSettings.h" #include "GameSettings.h"
#include "opplist.h"
#include "interface dialogue.h"
#include "Map Screen Interface Border.h"
#include "Map Screen Helicopter.h"
#include "Vehicles.h"
#include "Map Screen Interface Map.h"
#include "PreBattle Interface.h"
#include "Arms Dealer Init.h"
#include "bobbyr.h"
#include "helpscreen.h"
#include "Air Raid.h"
#include "Interface.h"
#include "cheats.h"
#endif #endif
// Temp function // Temp function
+9
View File
@@ -9,6 +9,15 @@
#include "Morale.h" #include "Morale.h"
#include "Quests.h" #include "Quests.h"
#include "Game Clock.h" #include "Game Clock.h"
#include "Overhead.h"
#include "Boxing.h"
#include "jascreens.h"
#include "screenids.h"
#include "Items.h"
#include "Random.h"
#include "finances.h"
#include "history.h"
#include "Dialogue Control.h"
#endif #endif
void HourlyQuestUpdate( void ); void HourlyQuestUpdate( void );
+10
View File
@@ -28,6 +28,16 @@
#include "Squads.h" #include "Squads.h"
#include "Player Command.h" #include "Player Command.h"
#include "Sound Control.h" #include "Sound Control.h"
#include "GameSettings.h"
#include "meanwhile.h"
#include "Map Screen Interface Border.h"
#include "Strategic Event Handler.h"
#include "Overhead.h"
#include "Soldier Create.h"
#include "renderworld.h"
#include "soundman.h"
#include "Isometric Utils.h"
#include "Scheduling.h"
#endif #endif
@@ -23,6 +23,7 @@
#include "Campaign Types.h" #include "Campaign Types.h"
#include "Strategic Town Loyalty.h" #include "Strategic Town Loyalty.h"
#include "strategicmap.h" #include "strategicmap.h"
#include "Assignments.h"
#endif #endif
+14
View File
@@ -36,6 +36,20 @@
#include "LaptopSave.h" #include "LaptopSave.h"
#include "Sound Control.h" #include "Sound Control.h"
#include "Interface Items.h" #include "Interface Items.h"
#include "wordwrap.h"
#include "meanwhile.h"
#include "Dialogue Control.h"
#include "Map Screen Helicopter.h"
#include "Map Screen Interface TownMine Info.h"
#include "Merc Contract.h"
#include "Map Screen Interface Map Inventory.h"
#include "Explosion Control.h"
#include "Creature Spreading.h"
#include "Assignments.h"
#include "Soldier macros.h"
#include "GameSettings.h"
#include "_Ja25EnglishText.h"
#include "SaveLoadScreen.h"
#endif #endif
@@ -26,6 +26,14 @@
#include "english.h" #include "english.h"
#include "Multi Language Graphic Utils.h" #include "Multi Language Graphic Utils.h"
#include "GameSettings.h" #include "GameSettings.h"
#include "Radar Screen.h"
#include "message.h"
#include "weapons.h"
#include "finances.h"
#include "Game Clock.h"
#include "Sound Control.h"
#include "interface panels.h"
#include "wordwrap.h"
#endif #endif
#include "ShopKeeper Interface.h" #include "ShopKeeper Interface.h"
+3
View File
@@ -41,6 +41,9 @@
#include "Town Militia.h" #include "Town Militia.h"
#include "Militia Control.h" #include "Militia Control.h"
#include "GameSettings.h" #include "GameSettings.h"
#include "Tactical Save.h"
#include "Map Information.h"
#include "Air Raid.h"
#endif #endif
// zoom x and y coords for map scrolling // zoom x and y coords for map scrolling
+1
View File
@@ -3,6 +3,7 @@
#include "Vehicles.h" #include "Vehicles.h"
#include "mapscreen.h"
// functions // functions
void DrawMapIndexBigMap( BOOLEAN fSelectedCursorIsYellow ); void DrawMapIndexBigMap( BOOLEAN fSelectedCursorIsYellow );
@@ -24,6 +24,8 @@
#include "video.h" #include "video.h"
#include "Town Militia.h" #include "Town Militia.h"
#include "HelpScreen.h" #include "HelpScreen.h"
#include "Map Screen Helicopter.h"
#include "Tactical Save.h"
#endif #endif
+16
View File
@@ -38,6 +38,22 @@
#include "WordWrap.h" #include "WordWrap.h"
#include "interface control.h" #include "interface control.h"
#include "GameSettings.h" #include "GameSettings.h"
#include "Campaign Types.h"
#include "Map Screen Interface Map Inventory.h"
#include "strategic.h"
#include "Keys.h"
#include "Soldier macros.h"
#include "Militia Control.h"
#include "Random.h"
#include "Cursor Control.h"
#include "renderworld.h"
#include "Game Init.h"
#include "Strategic Mines.h"
#include "finances.h"
#include "strategic.h"
#include "Air Raid.h"
#include "Queen Command.h"
#include "Render Fun.h"
#endif #endif
// inventory pool position on screen // inventory pool position on screen
+1 -1
View File
@@ -5,7 +5,7 @@
#include "Types.h" #include "Types.h"
#include "Soldier Control.h" #include "Soldier Control.h"
#include "MessageBoxScreen.h" #include "MessageBoxScreen.h"
#include "Font Control.h"
typedef struct FASTHELPREGION { typedef struct FASTHELPREGION {
+15
View File
@@ -21,6 +21,21 @@
#include "assignments.h" #include "assignments.h"
#include "strategic.h" #include "strategic.h"
#include "text.h" #include "text.h"
#include "interface control.h"
#include "Interface Items.h"
#include "Map Information.h"
#include "Map Screen Interface Map.h"
#include "Map Screen Interface.h"
#include "Music Control.h"
#include "Interface.h"
#include "Game Events.h"
#include "GameSettings.h"
#include "Strategic AI.h"
#include "interface dialogue.h"
#include "Quests.h"
#include "Campaign Types.h"
#include "Squads.h"
#include "Random.h"
#endif #endif
#define MAX_MEANWHILE_PROFILES 10 #define MAX_MEANWHILE_PROFILES 10
+4
View File
@@ -1,3 +1,5 @@
#include "builddefines.h"
#ifdef PRECOMPILEDHEADERS #ifdef PRECOMPILEDHEADERS
#include "Strategic All.h" #include "Strategic All.h"
#else #else
@@ -35,6 +37,8 @@
#include "Strategic Status.h" #include "Strategic Status.h"
#include "mercs.h" #include "mercs.h"
#include "insurance contract.h" #include "insurance contract.h"
#include "Vehicles.h"
#include "email.h"
#endif #endif
+5
View File
@@ -20,6 +20,11 @@
#include "squads.h" #include "squads.h"
#include "Soldier Create.h" #include "Soldier Create.h"
#include "Dialogue Control.h" #include "Dialogue Control.h"
#include "GameSettings.h"
#include "Queen Command.h"
#include "math.h"
#include "Auto Resolve.h"
#include "Vehicles.h"
#endif #endif
#include "MilitiaSquads.h" #include "MilitiaSquads.h"
+8
View File
@@ -15,6 +15,14 @@
#include "strategicmap.h" #include "strategicmap.h"
#include "Map Screen Helicopter.h" #include "Map Screen Helicopter.h"
#include "Game Clock.h" #include "Game Clock.h"
#include "meanwhile.h"
#include "email.h"
#include "GameSettings.h"
#include "Strategic Status.h"
#include "Strategic AI.h"
#include "PreBattle Interface.h"
#include "Map Screen Interface.h"
#include "Tactical Save.h"
#endif #endif
+12
View File
@@ -1,6 +1,7 @@
#ifdef PRECOMPILEDHEADERS #ifdef PRECOMPILEDHEADERS
#include "Strategic All.h" #include "Strategic All.h"
#else #else
#include "builddefines.h"
#include <stdio.h> #include <stdio.h>
#include "PreBattle Interface.h" #include "PreBattle Interface.h"
#include "Button System.h" #include "Button System.h"
@@ -32,6 +33,17 @@
#include "Random.h" #include "Random.h"
#include "Creature Spreading.h" #include "Creature Spreading.h"
#include "Multi Language Graphic Utils.h" #include "Multi Language Graphic Utils.h"
#include "Map Screen Helicopter.h"
#include "Quests.h"
#include "Map Screen Interface Border.h"
#include "Strategic Status.h"
#include "interface control.h"
#include "Strategic Town Loyalty.h"
#include "Squads.h"
#include "Assignments.h"
#include "Soldier macros.h"
#include "history.h"
#include "Cheats.h"
#endif #endif
extern void InitializeTacticalStatusAtBattleStart(); extern void InitializeTacticalStatusAtBattleStart();
+17
View File
@@ -26,6 +26,23 @@
#include "Soldier Ani.h" #include "Soldier Ani.h"
#include "Strategic AI.h" #include "Strategic AI.h"
#include "GameSettings.h" #include "GameSettings.h"
#include "MessageBoxScreen.h"
#include "screenids.h"
#include "Strategic Town Loyalty.h"
#include "Soldier Profile.h"
#include "Quests.h"
#include "jascreens.h"
#include "Auto Resolve.h"
#include "Game Event Hook.h"
#include "Animation Data.h"
#include "Game Clock.h"
#include "renderworld.h"
#include "Town Militia.h"
#include "Dialogue Control.h"
#include "Campaign Init.h"
#include "meanwhile.h"
#include "Soldier macros.h"
#include "Morale.h"
#endif #endif
#ifdef JA2BETAVERSION #ifdef JA2BETAVERSION
+11 -8
View File
@@ -1,3 +1,5 @@
#include "builddefines.h"
#ifdef PRECOMPILEDHEADERS #ifdef PRECOMPILEDHEADERS
#include "Strategic All.h" #include "Strategic All.h"
#else #else
@@ -37,6 +39,7 @@
#include "Interface Dialogue.h" #include "Interface Dialogue.h"
#include "SysUtil.h" #include "SysUtil.h"
#include "Message.h" #include "Message.h"
#include "Random.h"
#endif #endif
//#ifdef JA2BETAVERSION //#ifdef JA2BETAVERSION
@@ -433,7 +436,7 @@ SCROLL_BOX gItemListBox; // The Npc Scroll box
SCROLL_BOX *gpActiveListBox; // Only 1 scroll box is active at a time, this is set to it. SCROLL_BOX *gpActiveListBox; // Only 1 scroll box is active at a time, this is set to it.
INT16 gsQdsEnteringGridNo =0; UINT16 gusQdsEnteringGridNo =0;
UINT8 gubTextEntryAction = QD_DROP_DOWN_NO_ACTION; UINT8 gubTextEntryAction = QD_DROP_DOWN_NO_ACTION;
@@ -1246,11 +1249,11 @@ void RenderQuestDebugSystem()
void DisplayCurrentGridNo() void DisplayCurrentGridNo()
{ {
if( gsQdsEnteringGridNo != 0 ) if( gusQdsEnteringGridNo != 0 )
{ {
CHAR16 zTemp[512]; CHAR16 zTemp[512];
swprintf( zTemp, L"%s: %d", QuestDebugText[ QUEST_DBS_CURRENT_GRIDNO ], gsQdsEnteringGridNo ); swprintf( zTemp, L"%s: %d", QuestDebugText[ QUEST_DBS_CURRENT_GRIDNO ], gusQdsEnteringGridNo );
DrawTextToScreen( zTemp, QUEST_DBS_NPC_CURRENT_GRIDNO_X, QUEST_DBS_NPC_CURRENT_GRIDNO_Y, QUEST_DBS_NUMBER_COL_WIDTH, QUEST_DBS_FONT_DYNAMIC_TEXT, QUEST_DBS_COLOR_DYNAMIC_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED ); DrawTextToScreen( zTemp, QUEST_DBS_NPC_CURRENT_GRIDNO_X, QUEST_DBS_NPC_CURRENT_GRIDNO_Y, QUEST_DBS_NUMBER_COL_WIDTH, QUEST_DBS_FONT_DYNAMIC_TEXT, QUEST_DBS_COLOR_DYNAMIC_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
} }
} }
@@ -2688,7 +2691,7 @@ void BtnQuestDebugStartMercTalkingButtonButtonCallback(GUI_BUTTON *btn,INT32 rea
// DoQDSMessageBox( MSG_BOX_BASIC_STYLE, zTemp, QUEST_DEBUG_SCREEN, MSG_BOX_FLAG_OK, NULL ); // DoQDSMessageBox( MSG_BOX_BASIC_STYLE, zTemp, QUEST_DEBUG_SCREEN, MSG_BOX_FLAG_OK, NULL );
//set the initial value //set the initial value
gsQdsEnteringGridNo = 0; gusQdsEnteringGridNo = 0;
TextEntryBox( QuestDebugText[ QUEST_DBS_START_MERC_TALKING_FROM ], StartMercTalkingFromQuoteNum ); TextEntryBox( QuestDebugText[ QUEST_DBS_START_MERC_TALKING_FROM ], StartMercTalkingFromQuoteNum );
@@ -2943,7 +2946,7 @@ void InitQuestDebugTextInputBoxes()
} }
*/ */
swprintf( sTemp, L"%d", gsQdsEnteringGridNo ); swprintf( sTemp, L"%d", gusQdsEnteringGridNo );
//Text entry field //Text entry field
AddTextInputField( QUEST_DBS_TEB_X+QUEST_DBS_TEB_WIDTH/2-30, QUEST_DBS_TEB_Y+65, 60, 15, MSYS_PRIORITY_HIGH+60, sTemp, QUEST_DBS_TEXT_FIELD_WIDTH, INPUTTYPE_NUMERICSTRICT ); AddTextInputField( QUEST_DBS_TEB_X+QUEST_DBS_TEB_WIDTH/2-30, QUEST_DBS_TEB_Y+65, 60, 15, MSYS_PRIORITY_HIGH+60, sTemp, QUEST_DBS_TEXT_FIELD_WIDTH, INPUTTYPE_NUMERICSTRICT );
@@ -2986,7 +2989,7 @@ void AddNPCToGridNo( INT32 iGridNo )
//Add all the npc in the current sectory the npc array //Add all the npc in the current sectory the npc array
AddNPCsInSectorToArray(); AddNPCsInSectorToArray();
gsQdsEnteringGridNo = (INT16)iGridNo; gusQdsEnteringGridNo = (INT16)iGridNo;
} }
@@ -2995,7 +2998,7 @@ void AddItemToGridNo( INT32 iGridNo )
{ {
OBJECTTYPE Object; OBJECTTYPE Object;
gsQdsEnteringGridNo = (INT16)iGridNo; gusQdsEnteringGridNo = (INT16)iGridNo;
if( Item[ gItemListBox.sCurSelectedItem ].usItemClass == IC_KEY ) if( Item[ gItemListBox.sCurSelectedItem ].usItemClass == IC_KEY )
@@ -3023,7 +3026,7 @@ void AddKeyToGridNo( INT32 iKeyID )
CreateKeyObject( &Object, 1, (UINT8)iKeyID ); CreateKeyObject( &Object, 1, (UINT8)iKeyID );
//add the item to the world //add the item to the world
AddItemToPool( gsQdsEnteringGridNo, &Object, -1, 0, 0, 0 ); AddItemToPool( gusQdsEnteringGridNo, &Object, -1, 0, 0, 0 );
} }
else else
gfAddKeyNextPass = TRUE; gfAddKeyNextPass = TRUE;
+1 -1
View File
@@ -6,7 +6,7 @@
extern BOOLEAN gfNpcLogButton; extern BOOLEAN gfNpcLogButton;
extern INT16 gsQdsEnteringGridNo; extern UINT16 gusQdsEnteringGridNo;
void NpcRecordLoggingInit( UINT8 ubNpcID, UINT8 ubMercID, UINT8 ubQuoteNum, UINT8 ubApproach ); void NpcRecordLoggingInit( UINT8 ubNpcID, UINT8 ubMercID, UINT8 ubQuoteNum, UINT8 ubApproach );
+4
View File
@@ -27,6 +27,10 @@
#include "GameSettings.h" #include "GameSettings.h"
#include "Arms Dealer Init.h" #include "Arms Dealer Init.h"
#include "GameSettings.h" #include "GameSettings.h"
#include "Random.h"
#include "Assignments.h"
#include "strategic.h"
#include "Strategic Event Handler.h"
#endif #endif
#include "BobbyRMailOrder.h" #include "BobbyRMailOrder.h"
+1
View File
@@ -2,6 +2,7 @@
#define __QUESTS_H #define __QUESTS_H
#include "FileMan.h" #include "FileMan.h"
#include "strategicmap.h"
// Quest.ubStatus values // Quest.ubStatus values
#define QUESTNOTSTARTED 0 #define QUESTNOTSTARTED 0
+3
View File
@@ -20,6 +20,9 @@
#include "squads.h" #include "squads.h"
#include "Soldier Create.h" #include "Soldier Create.h"
#include "Dialogue Control.h" #include "Dialogue Control.h"
#include "Queen Command.h"
#include "GameSettings.h"
#include "Soldier Init List.h"
#endif #endif
#include "Reinforcement.h" #include "Reinforcement.h"
+6
View File
@@ -22,6 +22,12 @@
#include "Structure Wrap.h" #include "Structure Wrap.h"
#include "jascreens.h" #include "jascreens.h"
#include "strategicmap.h" #include "strategicmap.h"
#include "worldman.h"
#include "Animation Control.h"
#include "Soldier Add.h"
#include "Soldier Profile.h"
#include "soldier profile type.h"
#include "Quests.h"
#endif #endif
#ifdef JA2EDITOR #ifdef JA2EDITOR
+17
View File
@@ -3,6 +3,7 @@
#include "Strategic All.h" #include "Strategic All.h"
#include "GameSettings.h" #include "GameSettings.h"
#else #else
#include "builddefines.h"
#include <stdio.h> #include <stdio.h>
#include "types.h" #include "types.h"
#include "Strategic Movement.h" #include "Strategic Movement.h"
@@ -20,6 +21,22 @@
#include "strategic.h" #include "strategic.h"
#include "Explosion Control.h" #include "Explosion Control.h"
#include "Town Militia.h" #include "Town Militia.h"
#include "Overhead.h"
#include "Squads.h"
#include "jascreens.h"
#include "screenids.h"
#include "MessageBoxScreen.h"
#include "Quests.h"
#include "Player Command.h"
#include "Campaign.h"
#include "Campaign Init.h"
#include "Game Init.h"
#include "PreBattle Interface.h"
#include "Quests.h"
#include "Soldier Profile.h"
#include "Scheduling.h"
#include "Map Information.h"
#include "interface dialogue.h"
#endif #endif
#define SAI_VERSION 29 #define SAI_VERSION 29

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