lots of small changes that didn't get checked in

This commit is contained in:
Steven Fuller 2001-07-12 17:22:07 +00:00 committed by Patryk Obara
parent 1fcf3c028a
commit 936a5198e4
15 changed files with 126 additions and 47 deletions

View file

@ -9,7 +9,7 @@ LDLIBS += `sdl-config --libs`
AFLAGS = -g -Iinclude/ -w+macro-params -w+orphan-labels -w+number-overflow AFLAGS = -g -Iinclude/ -w+macro-params -w+orphan-labels -w+number-overflow
ROOT = afont.c frustrum.c kshape.c map.c maths.c mem3dc.c mem3dcpp.cpp module.c morph.c mslhand.c object.c shpanim.c sphere.c tables.c vdb.c version.c ROOT = afont.c frustum.c kshape.c map.c maths.c mem3dc.c mem3dcpp.cpp module.c morph.c mslhand.c object.c shpanim.c sphere.c tables.c vdb.c version.c
# the following should really be autogenerated... # the following should really be autogenerated...

View file

@ -3,6 +3,7 @@
#include "d3_func.h" #include "d3_func.h"
#include "vision.h" #include "vision.h"
enum DECAL_ID enum DECAL_ID
{ {
DECAL_FMV=0, DECAL_FMV=0,
@ -84,7 +85,9 @@ typedef struct
VECTORCH Normal[3]; VECTORCH Normal[3];
VECTORCH LightSource; VECTORCH LightSource;
char DotIsOnPlayer; char DotIsOnPlayer;
DPID TargetID; // DPID TargetID;
int TargetID;
int ShouldBeDrawn; int ShouldBeDrawn;
} THREE_LASER_DOT_DESC; } 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 AddDecal(enum DECAL_ID decalID, VECTORCH *normalPtr, VECTORCH *positionPtr, int moduleIndex);
extern void HandleDecalSystem(void); extern void HandleDecalSystem(void);
struct section_data; // hmodel.h
extern void AddDecalToHModel(VECTORCH *normalPtr, VECTORCH *positionPtr, struct section_data *sectionPtr); extern void AddDecalToHModel(VECTORCH *normalPtr, VECTORCH *positionPtr, struct section_data *sectionPtr);
extern FIXED_DECAL* AllocateFixedDecal(void); extern FIXED_DECAL* AllocateFixedDecal(void);

View file

@ -390,6 +390,7 @@ extern int HModel_DepthTest(HMODELCONTROLLER *controller,SECTION_DATA *test_sect
extern void DeInitialise_HModel(HMODELCONTROLLER *controller); extern void DeInitialise_HModel(HMODELCONTROLLER *controller);
struct save_block_header; // savegame.h
extern void LoadHierarchy(struct save_block_header* header,HMODELCONTROLLER* controller); extern void LoadHierarchy(struct save_block_header* header,HMODELCONTROLLER* controller);
extern void SaveHierarchy(HMODELCONTROLLER* controller); extern void SaveHierarchy(HMODELCONTROLLER* controller);

View file

@ -98,12 +98,12 @@ typedef struct
VECTORCH Velocity; VECTORCH Velocity;
VECTORCH Offset; VECTORCH Offset;
union // union
{ // {
unsigned int Colour; // unsigned int Colour;
// struct ColourComponents ColourComponents;
struct ColourComponents ColourComponents; // };
}; unsigned int Colour;
unsigned int Size; unsigned int Size;

View file

@ -34,7 +34,7 @@
#define SAVE_GAME_ON 1 #define SAVE_GAME_ON 1
#include "AvP_MenuGfx.hpp" #include "avp_menugfx.hpp"
#include "language.h" #include "language.h"
enum MENUSSTATE_ID enum MENUSSTATE_ID

View file

@ -2,7 +2,7 @@
#define _avp_user_profile_h_ 1 #define _avp_user_profile_h_ 1
#include "usr_io.h" #include "usr_io.h"
#include "AvP_EnvInfo.h" #include "avp_envinfo.h"
#include "game_statistics.h" #include "game_statistics.h"
#include "detaillevels.h" #include "detaillevels.h"
/* KJL 14:17:41 10/12/98 - User profile /* KJL 14:17:41 10/12/98 - User profile

View file

@ -16,7 +16,9 @@ extern "C" {
typedef struct netghostdatablock typedef struct netghostdatablock
{ {
DPID playerId; // DPID playerId;
int playerId;
signed int playerObjectId; /* -1 == player, all other numbers used for objects */ signed int playerObjectId; /* -1 == player, all other numbers used for objects */
AVP_BEHAVIOUR_TYPE type; AVP_BEHAVIOUR_TYPE type;
INANIMATEOBJECT_TYPE IOType; 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, /* 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 */ and the currentAnimSequence is only used by specific objects */
union //union
{ //{
int currentAnimSequence; int currentAnimSequence;
int EventCounter; // used by grenades // int EventCounter; // used by grenades
}; //};
DISPLAYBLOCK *myGunFlash; DISPLAYBLOCK *myGunFlash;
SECTION_DATA *GunflashSectionPtr; 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 UpdateGhost(STRATEGYBLOCK *sbPtr,VECTORCH *position,EULER *orientation,int sequence, int special);
extern void RemoveGhost(STRATEGYBLOCK *sbPtr); extern void RemoveGhost(STRATEGYBLOCK *sbPtr);
extern void RemovePlayersGhosts(DPID id); //extern void RemovePlayersGhosts(DPID id);
extern void RemovePlayerGhost(DPID id); //extern void RemovePlayerGhost(DPID id);
extern STRATEGYBLOCK *FindGhost(DPID Id, int obId); //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 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 MakeGhostNear(STRATEGYBLOCK *sbPtr);
extern void MakeGhostFar(STRATEGYBLOCK *sbPtr); extern void MakeGhostFar(STRATEGYBLOCK *sbPtr);
extern void DamageNetworkGhost(STRATEGYBLOCK *sbPtr, DAMAGE_PROFILE *damage, int multiple, SECTION_DATA *section,VECTORCH* incoming); extern void DamageNetworkGhost(STRATEGYBLOCK *sbPtr, DAMAGE_PROFILE *damage, int multiple, SECTION_DATA *section,VECTORCH* incoming);

View file

@ -166,7 +166,9 @@ typedef enum netgame_connectiontype
----------------------------------------------------------------------*/ ----------------------------------------------------------------------*/
typedef struct netgame_playerdata typedef struct netgame_playerdata
{ {
DPID playerId; // DPID playerId;
int playerId;
char name[NET_PLAYERNAMELENGTH]; char name[NET_PLAYERNAMELENGTH];
NETGAME_CHARACTERTYPE characterType; NETGAME_CHARACTERTYPE characterType;
NETGAME_SPECIALISTCHARACTERTYPE characterSubType; NETGAME_SPECIALISTCHARACTERTYPE characterSubType;
@ -311,7 +313,9 @@ typedef struct netmessageheader
typedef struct gamedescription_playerdata typedef struct gamedescription_playerdata
{ {
DPID playerId; // DPID playerId;
int playerId;
unsigned char characterType:2; unsigned char characterType:2;
unsigned char characterSubType:6; unsigned char characterSubType:6;
unsigned char startFlag; unsigned char startFlag;
@ -467,7 +471,9 @@ typedef struct netmessage_frametimer
typedef struct netmessage_playerkilled typedef struct netmessage_playerkilled
{ {
int objectId; int objectId;
DPID killerId; // DPID killerId;
int killerId;
NETGAME_CHARACTERTYPE myType; //take character types at time of death , in case they change NETGAME_CHARACTERTYPE myType; //take character types at time of death , in case they change
NETGAME_CHARACTERTYPE killerType; NETGAME_CHARACTERTYPE killerType;
char weaponIcon; char weaponIcon;
@ -544,7 +550,9 @@ typedef struct netmessage_lobstate
//stuff that isn't required //stuff that isn't required
typedef struct netmessage_lobdamaged_header typedef struct netmessage_lobdamaged_header
{ {
DPID playerId; // DPID playerId;
int playerId;
signed int objectId; signed int objectId;
short ammo_id:11; short ammo_id:11;
@ -620,7 +628,9 @@ typedef struct netmessage_damage_direction
typedef struct netmessage_lobdestroyed_request typedef struct netmessage_lobdestroyed_request
{ {
DPID playerId; // DPID playerId;
int playerId;
signed int objectId; signed int objectId;
}NETMESSAGE_LOBDESTROYED_REQUEST; }NETMESSAGE_LOBDESTROYED_REQUEST;
@ -736,7 +746,8 @@ typedef struct netmessage_predatorsights
signed int zPos: 23; signed int zPos: 23;
signed int zOrient: 9; signed int zOrient: 9;
DPID TargetID; // DPID TargetID;
int TargetID;
// 16 bytes (DPID 4 bytes?) // 16 bytes (DPID 4 bytes?)
@ -744,7 +755,9 @@ typedef struct netmessage_predatorsights
typedef struct netmessage_lobonfire typedef struct netmessage_lobonfire
{ {
DPID playerId; // DPID playerId;
int playerId;
signed int objectId; signed int objectId;
}NETMESSAGE_LOBONFIRE; }NETMESSAGE_LOBONFIRE;
@ -798,7 +811,9 @@ typedef struct netmessage_alienaikilled
int death_time; int death_time;
int GibbFactor; int GibbFactor;
DPID killerId; // DPID killerId;
int killerId;
int killCount; int killCount;
unsigned char AlienType: 2;//alien/predalien/praetorian unsigned char AlienType: 2;//alien/predalien/praetorian
@ -814,16 +829,14 @@ typedef struct netmessage_faralienposition
unsigned int indexIsModuleIndex:1; unsigned int indexIsModuleIndex:1;
unsigned int alienType:2; unsigned int alienType:2;
} NETMESSAGE_FARALIENPOSITION;
}NETMESSAGE_FARALIENPOSITION;
typedef struct netmessage_gibbing typedef struct netmessage_gibbing
{ {
signed int Guid; signed int Guid;
int gibbFactor; int gibbFactor;
int seed; int seed;
}NETMESSAGE_GIBBING; } NETMESSAGE_GIBBING;
typedef struct netmessage_spotaliensound typedef struct netmessage_spotaliensound
{ {
@ -866,12 +879,16 @@ typedef struct netmessage_strategysynch
//for messages that just require a player id //for messages that just require a player id
typedef struct netmessage_playerid typedef struct netmessage_playerid
{ {
DPID playerID; // DPID playerID;
int playerID;
}NETMESSAGE_PLAYERID; }NETMESSAGE_PLAYERID;
typedef struct netmessage_lms_restart typedef struct netmessage_lms_restart
{ {
DPID playerID; // DPID playerID;
int playerID;
int seed; int seed;
}NETMESSAGE_LMS_RESTART; }NETMESSAGE_LMS_RESTART;
@ -912,13 +929,15 @@ extern void InitAVPNetGame(void);
extern void NetCollectMessages(void); extern void NetCollectMessages(void);
extern void NetSendMessages(void); extern void NetSendMessages(void);
extern void EndAVPNetGame(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 //use assignnewsbname instead of addnetgameobjectid
#define AddNetGameObjectID AssignNewSBName #define AddNetGameObjectID AssignNewSBName
extern void AddNetGameObjectID(STRATEGYBLOCK *sbPtr); extern void AddNetGameObjectID(STRATEGYBLOCK *sbPtr);
extern void RecordFinalNetGameScores(void); extern void RecordFinalNetGameScores(void);
extern void DoNetScoresForHostDeath(NETGAME_CHARACTERTYPE myType,NETGAME_CHARACTERTYPE killerType); 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 int EmptySlotInPlayerList(void);
extern void TeleportNetPlayerToAStartingPosition(STRATEGYBLOCK *playerSbPtr, int startOfGame); extern void TeleportNetPlayerToAStartingPosition(STRATEGYBLOCK *playerSbPtr, int startOfGame);
extern int AddUpPlayerFrags(int playerId); 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_LocalObjectDestroyed_Request(STRATEGYBLOCK *sbPtr);
extern void AddNetMsg_ScoreChange(int killerIndex,int victimIndex); 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_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); extern void AddNetMsg_CreateWeapon(char* objectName,int type,VECTORCH* location);
@ -1019,5 +1040,6 @@ extern int LobbiedGame;
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif

View file

@ -5,7 +5,7 @@
extern "C" { extern "C" {
#endif #endif
#include "d3_func.h" //#include "d3_func.h"
/*KJL**************************************************************************************** /*KJL****************************************************************************************
* P R O T O T Y P E S * * P R O T O T Y P E S *
@ -61,14 +61,16 @@ struct D3DLightColourControl
extern struct D3DLightColourControl d3d_light_ctrl; extern struct D3DLightColourControl d3d_light_ctrl;
/* JH 6/4/97 - define a structure to control an alpha channelled coloured overlay */ /* JH 6/4/97 - define a structure to control an alpha channelled coloured overlay */
extern D3DINFO d3d; //extern D3DINFO d3d;
#define d3d_overlays_available ((d3d.ThisDriver.dpcTriCaps.dwSrcBlendCaps & (D3DPBLENDCAPS_SRCALPHA|D3DPBLENDCAPS_INVSRCALPHA))==(D3DPBLENDCAPS_SRCALPHA|D3DPBLENDCAPS_INVSRCALPHA)) //#define d3d_overlays_available ((d3d.ThisDriver.dpcTriCaps.dwSrcBlendCaps & (D3DPBLENDCAPS_SRCALPHA|D3DPBLENDCAPS_INVSRCALPHA))==(D3DPBLENDCAPS_SRCALPHA|D3DPBLENDCAPS_INVSRCALPHA))
#define d3d_overlays_available 1
enum D3DOCC_Mode enum D3DOCC_Mode
{ {
OCCM_NORMAL, /* default behaviour - all other parms ignored */ 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 */ OCCM_ON, /* r,g,b,alpha specify a colour of a light to use instead of white */
}; };
struct D3DOverlayColourControl struct D3DOverlayColourControl
{ {
enum D3DOCC_Mode ctrl; enum D3DOCC_Mode ctrl;

View file

@ -14,7 +14,7 @@
#include "kshape.h" #include "kshape.h"
#include "kzsort.h" #include "kzsort.h"
#include "frustrum.h" #include "frustum.h"
#include "particle.h" #include "particle.h"

View file

@ -11,7 +11,7 @@
#include "kshape.h" #include "kshape.h"
#include "kzsort.h" #include "kzsort.h"
#include "frustrum.h" #include "frustum.h"
#define UseLocalAssert Yes #define UseLocalAssert Yes
#include "ourasert.h" #include "ourasert.h"

View file

@ -5,6 +5,47 @@
extern "C" { extern "C" {
#endif #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 Direct3D globals
*/ */
@ -95,6 +136,7 @@ typedef struct
} RENDERSTATES; } RENDERSTATES;
#endif

View file

@ -1228,7 +1228,9 @@ int NarrowDivide(LONGLONGCH *a, int b);
int WideMulNarrowDiv(int a, int b, int c); int WideMulNarrowDiv(int a, int b, int c);
void RotateVector_ASM(VECTORCH *v, MATRIXCH *m); void RotateVector_ASM(VECTORCH *v, MATRIXCH *m);
void RotateAndCopyVector_ASM(VECTORCH *v1, VECTORCH *v2, 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 #endif

View file

@ -817,11 +817,11 @@ void ReleaseDirectMouse(void);
/* /*
Internal Internal
*/ */
#ifdef AVP_DEBUG_VERSION //#ifdef AVP_DEBUG_VERSION
int textprint(const char* t, ...); int textprint(const char* t, ...);
#else //#else
#define textprint(ignore) //#define textprint(ignore)
#endif //#endif
void MakePaletteShades(VGAPALETTEENTRY *vga_palptr, int hue, int pal_shades_per_hue); void MakePaletteShades(VGAPALETTEENTRY *vga_palptr, int hue, int pal_shades_per_hue);