lots of small changes that didn't get checked in
This commit is contained in:
parent
1fcf3c028a
commit
936a5198e4
15 changed files with 126 additions and 47 deletions
2
Makefile
2
Makefile
|
@ -9,7 +9,7 @@ LDLIBS += `sdl-config --libs`
|
|||
|
||||
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...
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
#define SAVE_GAME_ON 1
|
||||
|
||||
#include "AvP_MenuGfx.hpp"
|
||||
#include "avp_menugfx.hpp"
|
||||
#include "language.h"
|
||||
|
||||
enum MENUSSTATE_ID
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
#include "kshape.h"
|
||||
#include "kzsort.h"
|
||||
#include "frustrum.h"
|
||||
#include "frustum.h"
|
||||
|
||||
#include "particle.h"
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#include "kshape.h"
|
||||
#include "kzsort.h"
|
||||
#include "frustrum.h"
|
||||
#include "frustum.h"
|
||||
|
||||
#define UseLocalAssert Yes
|
||||
#include "ourasert.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
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue