mirror of
https://github.com/1dot13/source.git
synced 2026-08-26 14:30:26 +02:00
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:
@@ -32,7 +32,9 @@
|
||||
#include "MemMan.h"
|
||||
#include "Debug.h"
|
||||
#include "Container.h"
|
||||
#if _MSC_VER < 1300 //(iostream.h was removed from VC.NET2003)
|
||||
#include <iostream.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -6,17 +6,16 @@
|
||||
#include "VObject.h"
|
||||
#include "VSurface.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#if defined( JA2 ) || defined( UTIL )
|
||||
#include "Video.h"
|
||||
#else
|
||||
#include "video2.h"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
extern UINT32 GetCursorHandle(UINT32 uiCursorIndex);
|
||||
extern void UnloadCursorData(UINT32 uiCursorIndex);
|
||||
|
||||
@@ -169,6 +169,13 @@ extern void _DebugMessage(UINT8 *pSourceFile, UINT32 uiLineNum, UINT8 *pString)
|
||||
//*******************************************************************************************
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef DEBUG_ATTACKBUSY
|
||||
#define DebugAttackBusy(x) OutputDebugString( x)
|
||||
#else
|
||||
#define DebugAttackBusy(x)
|
||||
#endif
|
||||
|
||||
/*
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <ddraw.h>
|
||||
#include "debug.h"
|
||||
#include "video_private.h"
|
||||
#include "vobject_blitters.h"
|
||||
#endif
|
||||
|
||||
// DirectDrawSurface2 Calls
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "DirectX Common.h"
|
||||
#include <ddraw.h>
|
||||
#include "sgp.h"
|
||||
|
||||
// Direct Draw Functions
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef _EXCEPTION_HANDLING__H_
|
||||
#define _EXCEPTION_HANDLING__H_
|
||||
|
||||
#include <Windows.h>
|
||||
|
||||
//uncomment this line if you want Exceptions to be handled
|
||||
#ifdef JA2
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#elif defined( WIZ8_PRECOMPILED_HEADERS )
|
||||
#include "WIZ8 SGP ALL.H"
|
||||
#else
|
||||
#include "builddefines.h"
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include "types.h"
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#else
|
||||
#include "video2.h"
|
||||
#endif
|
||||
#include "impTGA.h"
|
||||
#endif
|
||||
|
||||
//**************************************************************************
|
||||
|
||||
@@ -39,16 +39,16 @@
|
||||
// Function Prototypes
|
||||
//
|
||||
//**************************************************************************
|
||||
|
||||
/*
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
*/
|
||||
BOOLEAN LoadTGAFileToImage( HIMAGE hImage, UINT16 fContents );
|
||||
|
||||
/*
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
*/
|
||||
#endif
|
||||
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
#if !defined( JA2 ) && !defined( UTIL )
|
||||
#include "GameData.h" // for MoveTimer() [Wizardry specific]
|
||||
#endif
|
||||
#include "LibraryDataBase.h"
|
||||
#include "utilities.h"
|
||||
#endif
|
||||
|
||||
#include "input.h"
|
||||
@@ -40,6 +42,7 @@
|
||||
|
||||
#include "dbt.h"
|
||||
#include "INIReader.h"
|
||||
#include "Console.h"
|
||||
|
||||
#ifdef JA2
|
||||
#include "BuildDefines.h"
|
||||
@@ -120,7 +123,13 @@ INT32 FAR PASCAL WindowProcedure(HWND hWindow, UINT16 Message, WPARAM wParam, LP
|
||||
{
|
||||
static BOOLEAN fRestore = FALSE;
|
||||
|
||||
if(gfIgnoreMessages)
|
||||
if ( Message == WM_USER )
|
||||
{
|
||||
FreeConsole();
|
||||
return 0L;
|
||||
}
|
||||
|
||||
if(gfIgnoreMessages)
|
||||
return(DefWindowProc(hWindow, Message, wParam, lParam));
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
#ifdef LUACONSOLE
|
||||
CreateConsole();
|
||||
#endif
|
||||
|
||||
#ifdef JA2
|
||||
#ifdef ENGLISH
|
||||
SetIntroType( INTRO_SPLASH );
|
||||
@@ -779,6 +792,10 @@ int PASCAL HandledWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR p
|
||||
}
|
||||
else
|
||||
{ // Windows hasn't processed any messages, therefore we handle the rest
|
||||
#ifdef LUACONSOLE
|
||||
PollConsole( );
|
||||
#endif
|
||||
|
||||
if (gfApplicationActive == FALSE)
|
||||
{ // Well we got nothing to do but to wait for a message to activate
|
||||
WaitMessage();
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#elif defined( WIZ8_PRECOMPILED_HEADERS )
|
||||
#include "WIZ8 SGP ALL.H"
|
||||
#else
|
||||
#include "builddefines.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "soundman.h"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#ifdef JA2_PRECOMPILED_HEADERS
|
||||
#include "JA2 SGP ALL.H"
|
||||
#include "resource.h"
|
||||
#elif defined( WIZ8_PRECOMPILED_HEADERS )
|
||||
#include "WIZ8 SGP ALL.H"
|
||||
#else
|
||||
@@ -9,6 +8,7 @@
|
||||
#include "vobject_blitters.h"
|
||||
#include "sgp.h"
|
||||
#include <stdio.h>
|
||||
#include <io.h>
|
||||
#include "renderworld.h"
|
||||
#include "Render Dirty.h"
|
||||
#include "Isometric utils.h"
|
||||
@@ -16,8 +16,12 @@
|
||||
#include "impTGA.h"
|
||||
#include "timer control.h"
|
||||
#include "Fileman.h"
|
||||
#include "Input.h"
|
||||
#include "GameSettings.h"
|
||||
#endif
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
#ifndef _MT
|
||||
#define _MT
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,11 @@
|
||||
#include "vsurface.h"
|
||||
#include "vobject.h"
|
||||
|
||||
/*
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
*/
|
||||
|
||||
extern SGPRect ClippingRect;
|
||||
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 FillRect16BPP(UINT16 *pBuffer, UINT32 uiDestPitchBYTES, INT32 x1, INT32 y1, INT32 x2, INT32 y2, UINT16 color);
|
||||
|
||||
|
||||
/*
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
*/
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user