summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/avp/decal.h6
-rw-r--r--src/avp/hmodel.h1
-rw-r--r--src/avp/particle.h12
-rw-r--r--src/avp/win95/frontend/avp_menus.h2
-rw-r--r--src/avp/win95/frontend/avp_userprofile.h2
-rw-r--r--src/avp/win95/pldghost.h24
-rw-r--r--src/avp/win95/pldnet.h58
-rw-r--r--src/avp/win95/vision.h8
-rw-r--r--src/frustum.c (renamed from src/frustrum.c)2
-rw-r--r--src/frustum.h (renamed from src/frustrum.h)0
-rw-r--r--src/kshape.c2
-rw-r--r--src/win95/d3_func.h42
-rw-r--r--src/win95/inline.h4
-rw-r--r--src/win95/platform.h8
14 files changed, 125 insertions, 46 deletions
diff --git a/src/avp/decal.h b/src/avp/decal.h
index ae3d3d8..7e05f72 100644
--- a/src/avp/decal.h
+++ b/src/avp/decal.h
@@ -3,6 +3,7 @@
#include "d3_func.h"
#include "vision.h"
+
enum DECAL_ID
{
DECAL_FMV=0,
@@ -84,7 +85,9 @@ typedef struct
VECTORCH Normal[3];
VECTORCH LightSource;
char DotIsOnPlayer;
- DPID TargetID;
+// DPID TargetID;
+ int TargetID;
+
int ShouldBeDrawn;
} THREE_LASER_DOT_DESC;
@@ -94,6 +97,7 @@ extern void MakeDecal(enum DECAL_ID decalID, VECTORCH *normalPtr, VECTORCH *posi
extern void AddDecal(enum DECAL_ID decalID, VECTORCH *normalPtr, VECTORCH *positionPtr, int moduleIndex);
extern void HandleDecalSystem(void);
+struct section_data; // hmodel.h
extern void AddDecalToHModel(VECTORCH *normalPtr, VECTORCH *positionPtr, struct section_data *sectionPtr);
extern FIXED_DECAL* AllocateFixedDecal(void);
diff --git a/src/avp/hmodel.h b/src/avp/hmodel.h
index 404742e..bb46b1d 100644
--- a/src/avp/hmodel.h
+++ b/src/avp/hmodel.h
@@ -390,6 +390,7 @@ extern int HModel_DepthTest(HMODELCONTROLLER *controller,SECTION_DATA *test_sect
extern void DeInitialise_HModel(HMODELCONTROLLER *controller);
+struct save_block_header; // savegame.h
extern void LoadHierarchy(struct save_block_header* header,HMODELCONTROLLER* controller);
extern void SaveHierarchy(HMODELCONTROLLER* controller);
diff --git a/src/avp/particle.h b/src/avp/particle.h
index 606fac2..6796ffe 100644
--- a/src/avp/particle.h
+++ b/src/avp/particle.h
@@ -98,12 +98,12 @@ typedef struct
VECTORCH Velocity;
VECTORCH Offset;
- union
- {
- unsigned int Colour;
-
- struct ColourComponents ColourComponents;
- };
+// union
+// {
+// unsigned int Colour;
+// struct ColourComponents ColourComponents;
+// };
+ unsigned int Colour;
unsigned int Size;
diff --git a/src/avp/win95/frontend/avp_menus.h b/src/avp/win95/frontend/avp_menus.h
index 2b5ae4d..1437e9b 100644
--- a/src/avp/win95/frontend/avp_menus.h
+++ b/src/avp/win95/frontend/avp_menus.h
@@ -34,7 +34,7 @@
#define SAVE_GAME_ON 1
-#include "AvP_MenuGfx.hpp"
+#include "avp_menugfx.hpp"
#include "language.h"
enum MENUSSTATE_ID
diff --git a/src/avp/win95/frontend/avp_userprofile.h b/src/avp/win95/frontend/avp_userprofile.h
index 381c075..dd4355f 100644
--- a/src/avp/win95/frontend/avp_userprofile.h
+++ b/src/avp/win95/frontend/avp_userprofile.h
@@ -2,7 +2,7 @@
#define _avp_user_profile_h_ 1
#include "usr_io.h"
-#include "AvP_EnvInfo.h"
+#include "avp_envinfo.h"
#include "game_statistics.h"
#include "detaillevels.h"
/* KJL 14:17:41 10/12/98 - User profile
diff --git a/src/avp/win95/pldghost.h b/src/avp/win95/pldghost.h
index c866873..1997869 100644
--- a/src/avp/win95/pldghost.h
+++ b/src/avp/win95/pldghost.h
@@ -16,7 +16,9 @@ extern "C" {
typedef struct netghostdatablock
{
- DPID playerId;
+// DPID playerId;
+ int playerId;
+
signed int playerObjectId; /* -1 == player, all other numbers used for objects */
AVP_BEHAVIOUR_TYPE type;
INANIMATEOBJECT_TYPE IOType;
@@ -25,11 +27,11 @@ typedef struct netghostdatablock
/* KJL 17:33:41 22/01/99 - I've made this a union because I needed a storage space,
and the currentAnimSequence is only used by specific objects */
- union
- {
+ //union
+ //{
int currentAnimSequence;
- int EventCounter; // used by grenades
- };
+ // int EventCounter; // used by grenades
+ //};
DISPLAYBLOCK *myGunFlash;
SECTION_DATA *GunflashSectionPtr;
@@ -70,10 +72,14 @@ typedef struct netghostdatablock
----------------------------------------------------------------------*/
extern void UpdateGhost(STRATEGYBLOCK *sbPtr,VECTORCH *position,EULER *orientation,int sequence, int special);
extern void RemoveGhost(STRATEGYBLOCK *sbPtr);
-extern void RemovePlayersGhosts(DPID id);
-extern void RemovePlayerGhost(DPID id);
-extern STRATEGYBLOCK *FindGhost(DPID Id, int obId);
-extern STRATEGYBLOCK *CreateNetGhost(DPID playerId, int objectId, VECTORCH *position, EULER* orientation, AVP_BEHAVIOUR_TYPE type, unsigned char IOType, unsigned char subtype);
+//extern void RemovePlayersGhosts(DPID id);
+//extern void RemovePlayerGhost(DPID id);
+//extern STRATEGYBLOCK *FindGhost(DPID Id, int obId);
+//extern STRATEGYBLOCK *CreateNetGhost(DPID playerId, int objectId, VECTORCH *position, EULER* orientation, AVP_BEHAVIOUR_TYPE type, unsigned char IOType, unsigned char subtype);
+extern void RemovePlayersGhosts(int id);
+extern void RemovePlayerGhost(int id);
+extern STRATEGYBLOCK *FindGhost(int Id, int obId);
+extern STRATEGYBLOCK *CreateNetGhost(int playerId, int objectId, VECTORCH *position, EULER* orientation, AVP_BEHAVIOUR_TYPE type, unsigned char IOType, unsigned char subtype);
extern void MakeGhostNear(STRATEGYBLOCK *sbPtr);
extern void MakeGhostFar(STRATEGYBLOCK *sbPtr);
extern void DamageNetworkGhost(STRATEGYBLOCK *sbPtr, DAMAGE_PROFILE *damage, int multiple, SECTION_DATA *section,VECTORCH* incoming);
diff --git a/src/avp/win95/pldnet.h b/src/avp/win95/pldnet.h
index 1ffc2cc..9ff1c5a 100644
--- a/src/avp/win95/pldnet.h
+++ b/src/avp/win95/pldnet.h
@@ -166,7 +166,9 @@ typedef enum netgame_connectiontype
----------------------------------------------------------------------*/
typedef struct netgame_playerdata
{
- DPID playerId;
+// DPID playerId;
+ int playerId;
+
char name[NET_PLAYERNAMELENGTH];
NETGAME_CHARACTERTYPE characterType;
NETGAME_SPECIALISTCHARACTERTYPE characterSubType;
@@ -311,7 +313,9 @@ typedef struct netmessageheader
typedef struct gamedescription_playerdata
{
- DPID playerId;
+// DPID playerId;
+ int playerId;
+
unsigned char characterType:2;
unsigned char characterSubType:6;
unsigned char startFlag;
@@ -467,7 +471,9 @@ typedef struct netmessage_frametimer
typedef struct netmessage_playerkilled
{
int objectId;
- DPID killerId;
+// DPID killerId;
+ int killerId;
+
NETGAME_CHARACTERTYPE myType; //take character types at time of death , in case they change
NETGAME_CHARACTERTYPE killerType;
char weaponIcon;
@@ -544,7 +550,9 @@ typedef struct netmessage_lobstate
//stuff that isn't required
typedef struct netmessage_lobdamaged_header
{
- DPID playerId;
+// DPID playerId;
+ int playerId;
+
signed int objectId;
short ammo_id:11;
@@ -620,7 +628,9 @@ typedef struct netmessage_damage_direction
typedef struct netmessage_lobdestroyed_request
{
- DPID playerId;
+// DPID playerId;
+ int playerId;
+
signed int objectId;
}NETMESSAGE_LOBDESTROYED_REQUEST;
@@ -736,7 +746,8 @@ typedef struct netmessage_predatorsights
signed int zPos: 23;
signed int zOrient: 9;
- DPID TargetID;
+ // DPID TargetID;
+ int TargetID;
// 16 bytes (DPID 4 bytes?)
@@ -744,7 +755,9 @@ typedef struct netmessage_predatorsights
typedef struct netmessage_lobonfire
{
- DPID playerId;
+// DPID playerId;
+ int playerId;
+
signed int objectId;
}NETMESSAGE_LOBONFIRE;
@@ -798,7 +811,9 @@ typedef struct netmessage_alienaikilled
int death_time;
int GibbFactor;
- DPID killerId;
+// DPID killerId;
+ int killerId;
+
int killCount;
unsigned char AlienType: 2;//alien/predalien/praetorian
@@ -814,16 +829,14 @@ typedef struct netmessage_faralienposition
unsigned int indexIsModuleIndex:1;
unsigned int alienType:2;
-
-
-}NETMESSAGE_FARALIENPOSITION;
+} NETMESSAGE_FARALIENPOSITION;
typedef struct netmessage_gibbing
{
signed int Guid;
int gibbFactor;
int seed;
-}NETMESSAGE_GIBBING;
+} NETMESSAGE_GIBBING;
typedef struct netmessage_spotaliensound
{
@@ -866,12 +879,16 @@ typedef struct netmessage_strategysynch
//for messages that just require a player id
typedef struct netmessage_playerid
{
- DPID playerID;
+// DPID playerID;
+ int playerID;
+
}NETMESSAGE_PLAYERID;
typedef struct netmessage_lms_restart
{
- DPID playerID;
+// DPID playerID;
+ int playerID;
+
int seed;
}NETMESSAGE_LMS_RESTART;
@@ -912,13 +929,15 @@ extern void InitAVPNetGame(void);
extern void NetCollectMessages(void);
extern void NetSendMessages(void);
extern void EndAVPNetGame(void);
-extern int PlayerIdInPlayerList(DPID Id);
+//extern int PlayerIdInPlayerList(DPID Id);
+extern int PlayerIdInPlayerList(int Id);
//use assignnewsbname instead of addnetgameobjectid
#define AddNetGameObjectID AssignNewSBName
extern void AddNetGameObjectID(STRATEGYBLOCK *sbPtr);
extern void RecordFinalNetGameScores(void);
extern void DoNetScoresForHostDeath(NETGAME_CHARACTERTYPE myType,NETGAME_CHARACTERTYPE killerType);
-extern void RemovePlayerFromGame(DPID id);
+//extern void RemovePlayerFromGame(DPID id);
+extern void RemovePlayerFromGame(int id);
extern int EmptySlotInPlayerList(void);
extern void TeleportNetPlayerToAStartingPosition(STRATEGYBLOCK *playerSbPtr, int startOfGame);
extern int AddUpPlayerFrags(int playerId);
@@ -967,9 +986,11 @@ extern void AddNetMsg_SpotAlienSound(int soundCategory,int alienType,int pitch,V
extern void AddNetMsg_LocalObjectDestroyed_Request(STRATEGYBLOCK *sbPtr);
extern void AddNetMsg_ScoreChange(int killerIndex,int victimIndex);
-extern void AddNetMsg_PlayerID(DPID playerID,unsigned char message);
+//extern void AddNetMsg_PlayerID(DPID playerID,unsigned char message);
+extern void AddNetMsg_PlayerID(int playerID,unsigned char message);
extern void AddNetMsg_LastManStanding_RestartTimer(unsigned char time);
-extern void AddNetMsg_LastManStanding_Restart(DPID alienID,int seed);
+//extern void AddNetMsg_LastManStanding_Restart(DPID alienID,int seed);
+extern void AddNetMsg_LastManStanding_Restart(int alienID,int seed);
extern void AddNetMsg_CreateWeapon(char* objectName,int type,VECTORCH* location);
@@ -1019,5 +1040,6 @@ extern int LobbiedGame;
#ifdef __cplusplus
}
+
#endif
#endif
diff --git a/src/avp/win95/vision.h b/src/avp/win95/vision.h
index 0d7e523..0e2aa00 100644
--- a/src/avp/win95/vision.h
+++ b/src/avp/win95/vision.h
@@ -5,7 +5,7 @@
extern "C" {
#endif
-#include "d3_func.h"
+//#include "d3_func.h"
/*KJL****************************************************************************************
* P R O T O T Y P E S *
@@ -61,14 +61,16 @@ struct D3DLightColourControl
extern struct D3DLightColourControl d3d_light_ctrl;
/* JH 6/4/97 - define a structure to control an alpha channelled coloured overlay */
-extern D3DINFO d3d;
-#define d3d_overlays_available ((d3d.ThisDriver.dpcTriCaps.dwSrcBlendCaps & (D3DPBLENDCAPS_SRCALPHA|D3DPBLENDCAPS_INVSRCALPHA))==(D3DPBLENDCAPS_SRCALPHA|D3DPBLENDCAPS_INVSRCALPHA))
+//extern D3DINFO d3d;
+//#define d3d_overlays_available ((d3d.ThisDriver.dpcTriCaps.dwSrcBlendCaps & (D3DPBLENDCAPS_SRCALPHA|D3DPBLENDCAPS_INVSRCALPHA))==(D3DPBLENDCAPS_SRCALPHA|D3DPBLENDCAPS_INVSRCALPHA))
+#define d3d_overlays_available 1
enum D3DOCC_Mode
{
OCCM_NORMAL, /* default behaviour - all other parms ignored */
OCCM_ON, /* r,g,b,alpha specify a colour of a light to use instead of white */
};
+
struct D3DOverlayColourControl
{
enum D3DOCC_Mode ctrl;
diff --git a/src/frustrum.c b/src/frustum.c
index d3e929d..a2bc3c1 100644
--- a/src/frustrum.c
+++ b/src/frustum.c
@@ -14,7 +14,7 @@
#include "kshape.h"
#include "kzsort.h"
-#include "frustrum.h"
+#include "frustum.h"
#include "particle.h"
diff --git a/src/frustrum.h b/src/frustum.h
index faf7795..faf7795 100644
--- a/src/frustrum.h
+++ b/src/frustum.h
diff --git a/src/kshape.c b/src/kshape.c
index 6f6ef94..c7d4883 100644
--- a/src/kshape.c
+++ b/src/kshape.c
@@ -11,7 +11,7 @@
#include "kshape.h"
#include "kzsort.h"
-#include "frustrum.h"
+#include "frustum.h"
#define UseLocalAssert Yes
#include "ourasert.h"
diff --git a/src/win95/d3_func.h b/src/win95/d3_func.h
index eedbd5e..b369add 100644
--- a/src/win95/d3_func.h
+++ b/src/win95/d3_func.h
@@ -5,6 +5,47 @@
extern "C" {
#endif
+
+/* KJL 14:24:45 12/4/97 - render state information */
+enum TRANSLUCENCY_TYPE
+{
+ TRANSLUCENCY_OFF,
+ TRANSLUCENCY_NORMAL,
+ TRANSLUCENCY_INVCOLOUR,
+ TRANSLUCENCY_COLOUR,
+ TRANSLUCENCY_GLOWING,
+ TRANSLUCENCY_DARKENINGCOLOUR,
+ TRANSLUCENCY_JUSTSETZ,
+ TRANSLUCENCY_NOT_SET
+};
+
+enum FILTERING_MODE_ID
+{
+ FILTERING_BILINEAR_OFF,
+ FILTERING_BILINEAR_ON,
+ FILTERING_NOT_SET
+};
+
+typedef struct
+{
+ enum TRANSLUCENCY_TYPE TranslucencyMode;
+ enum FILTERING_MODE_ID FilteringMode;
+ int FogDistance;
+ unsigned int FogIsOn :1;
+ unsigned int WireFrameModeIsOn :1;
+
+} RENDERSTATES;
+
+typedef struct D3DTextureFormat {
+// DDSURFACEDESC ddsd; /* DDSURFACEDESC for the surface description */
+ BOOL Palette; /* is Palettized? */
+ int RedBPP; /* #red bits per pixel */
+ int BlueBPP; /* #blue bits per pixel */
+ int GreenBPP; /* #green bits per pixel */
+ int IndexBPP; /* number of bits in palette index */
+} D3DTEXTUREFORMAT;
+
+#if 0 // disabled direct3d stuff
/*
Direct3D globals
*/
@@ -95,6 +136,7 @@ typedef struct
} RENDERSTATES;
+#endif
diff --git a/src/win95/inline.h b/src/win95/inline.h
index 30b7faa..719daf3 100644
--- a/src/win95/inline.h
+++ b/src/win95/inline.h
@@ -1228,7 +1228,9 @@ int NarrowDivide(LONGLONGCH *a, int b);
int WideMulNarrowDiv(int a, int b, int c);
void RotateVector_ASM(VECTORCH *v, MATRIXCH *m);
void RotateAndCopyVector_ASM(VECTORCH *v1, VECTORCH *v2, MATRIXCH *m);
-int f2i(float f);
+
+int FloatToInt(float);
+#define f2i(a, b) { a = FloatToInt(b); }
#endif
diff --git a/src/win95/platform.h b/src/win95/platform.h
index 6198d94..cefebf1 100644
--- a/src/win95/platform.h
+++ b/src/win95/platform.h
@@ -817,11 +817,11 @@ void ReleaseDirectMouse(void);
/*
Internal
*/
-#ifdef AVP_DEBUG_VERSION
+//#ifdef AVP_DEBUG_VERSION
int textprint(const char* t, ...);
-#else
-#define textprint(ignore)
-#endif
+//#else
+//#define textprint(ignore)
+//#endif
void MakePaletteShades(VGAPALETTEENTRY *vga_palptr, int hue, int pal_shades_per_hue);