Cleanups. (Tim Beckmann)
This commit is contained in:
parent
0677653d4f
commit
86629a3b34
58 changed files with 671 additions and 528 deletions
|
@ -91,7 +91,11 @@ extern void PrintSpottedNumber(void);
|
|||
|
||||
/* prototypes for this file */
|
||||
static STATE_RETURN_CONDITION Execute_MFS_Wait(STRATEGYBLOCK *sbPtr);
|
||||
#if 0
|
||||
static STATE_RETURN_CONDITION Execute_MFS_Hunt(STRATEGYBLOCK *sbPtr);
|
||||
static STATE_RETURN_CONDITION Execute_MNS_DischargeGL(STRATEGYBLOCK *sbPtr);
|
||||
static STATE_RETURN_CONDITION Execute_MNS_Hunt(STRATEGYBLOCK *sbPtr);
|
||||
#endif
|
||||
static STATE_RETURN_CONDITION Execute_MFS_Wander(STRATEGYBLOCK *sbPtr);
|
||||
static STATE_RETURN_CONDITION Execute_MFS_Approach(STRATEGYBLOCK *sbPtr);
|
||||
static STATE_RETURN_CONDITION Execute_MFS_Firing(STRATEGYBLOCK *sbPtr);
|
||||
|
@ -107,13 +111,11 @@ static STATE_RETURN_CONDITION Execute_MNS_Wait(STRATEGYBLOCK *sbPtr);
|
|||
static STATE_RETURN_CONDITION Execute_MNS_DischargeLOSWeapon(STRATEGYBLOCK *sbPtr);
|
||||
static STATE_RETURN_CONDITION Execute_MNS_DischargeShotgun(STRATEGYBLOCK *sbPtr);
|
||||
static STATE_RETURN_CONDITION Execute_MNS_DischargePistol(STRATEGYBLOCK *sbPtr);
|
||||
static STATE_RETURN_CONDITION Execute_MNS_DischargeGL(STRATEGYBLOCK *sbPtr);
|
||||
static STATE_RETURN_CONDITION Execute_MNS_DischargeSADAR(STRATEGYBLOCK *sbPtr);
|
||||
static STATE_RETURN_CONDITION Execute_MNS_DischargeFlamethrower(STRATEGYBLOCK *sbPtr);
|
||||
static STATE_RETURN_CONDITION Execute_MNS_ThrowMolotov(STRATEGYBLOCK *sbPtr);
|
||||
static STATE_RETURN_CONDITION Execute_MNS_DischargeMinigun(STRATEGYBLOCK *sbPtr);
|
||||
static STATE_RETURN_CONDITION Execute_MNS_SentryMode(STRATEGYBLOCK *sbPtr);
|
||||
static STATE_RETURN_CONDITION Execute_MNS_Hunt(STRATEGYBLOCK *sbPtr);
|
||||
static STATE_RETURN_CONDITION Execute_MNS_Respond(STRATEGYBLOCK *sbPtr);
|
||||
static STATE_RETURN_CONDITION Execute_MNS_Retreat(STRATEGYBLOCK *sbPtr);
|
||||
static STATE_RETURN_CONDITION Execute_MNS_Return(STRATEGYBLOCK *sbPtr);
|
||||
|
@ -5942,7 +5944,7 @@ static STATE_RETURN_CONDITION Execute_MFS_SentryMode(STRATEGYBLOCK *sbPtr)
|
|||
}
|
||||
return(SRC_No_Change);
|
||||
}
|
||||
|
||||
#if 0
|
||||
static STATE_RETURN_CONDITION Execute_MFS_Hunt(STRATEGYBLOCK *sbPtr)
|
||||
{
|
||||
MARINE_STATUS_BLOCK *marineStatusPointer;
|
||||
|
@ -5984,6 +5986,7 @@ static STATE_RETURN_CONDITION Execute_MFS_Hunt(STRATEGYBLOCK *sbPtr)
|
|||
marineStatusPointer->stateTimer = MARINE_FAR_MOVE_TIME;
|
||||
return(SRC_No_Change);
|
||||
}
|
||||
#endif
|
||||
|
||||
static STATE_RETURN_CONDITION Execute_MFS_Approach(STRATEGYBLOCK *sbPtr) {
|
||||
|
||||
|
@ -11406,6 +11409,7 @@ void FakeTrackerWheepGenerator(VECTORCH *marinepos, STRATEGYBLOCK *me) {
|
|||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
static STATE_RETURN_CONDITION Execute_MNS_Hunt(STRATEGYBLOCK *sbPtr)
|
||||
{
|
||||
MARINE_STATUS_BLOCK *marineStatusPointer;
|
||||
|
@ -11545,6 +11549,7 @@ static STATE_RETURN_CONDITION Execute_MNS_Hunt(STRATEGYBLOCK *sbPtr)
|
|||
|
||||
return(SRC_No_Change);
|
||||
}
|
||||
#endif
|
||||
|
||||
static STATE_RETURN_CONDITION Execute_MNS_Respond(STRATEGYBLOCK *sbPtr)
|
||||
{
|
||||
|
@ -12600,6 +12605,7 @@ static STATE_RETURN_CONDITION Execute_MNS_ThrowMolotov(STRATEGYBLOCK *sbPtr)
|
|||
return(SRC_No_Change);
|
||||
}
|
||||
|
||||
#if 0
|
||||
static STATE_RETURN_CONDITION Execute_MNS_DischargeGL(STRATEGYBLOCK *sbPtr)
|
||||
{
|
||||
MARINE_STATUS_BLOCK *marineStatusPointer;
|
||||
|
@ -12856,6 +12862,7 @@ static STATE_RETURN_CONDITION Execute_MNS_DischargeGL(STRATEGYBLOCK *sbPtr)
|
|||
}
|
||||
return(SRC_No_Change);
|
||||
}
|
||||
#endif
|
||||
|
||||
static STATE_RETURN_CONDITION Execute_MNS_NewDischargeGL(STRATEGYBLOCK *sbPtr)
|
||||
{
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
extern void MissionObjectiveTriggered(void* mission_objective);
|
||||
extern void MakeMissionVisible(void* mission_objective);
|
||||
extern void MakeMissionPossible(void* mission_objective);
|
||||
extern void StartTriggerPlotFMV(int number);
|
||||
|
||||
void * MissionCompleteBehaveInit(void* bhdata,STRATEGYBLOCK* sbptr)
|
||||
{
|
||||
|
|
|
@ -61,6 +61,8 @@ extern void Execute_Alien_Dying(STRATEGYBLOCK *sbPtr);
|
|||
|
||||
int AlienIsAbleToClimb(STRATEGYBLOCK *sbPtr);
|
||||
int AlienIsAbleToStand(STRATEGYBLOCK *sbPtr);
|
||||
static int StartAlienPounce(STRATEGYBLOCK *sbPtr);
|
||||
static int AlienHasPathToTarget(STRATEGYBLOCK *sbPtr);
|
||||
|
||||
extern ATTACK_DATA Alien_Special_Gripping_Attack;
|
||||
|
||||
|
@ -612,6 +614,7 @@ static enum AMMO_ID GetAttackDamageType(STRATEGYBLOCK *sbPtr,int flagnum) {
|
|||
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void DoAlienAIAttackSound(STRATEGYBLOCK *sbPtr) {
|
||||
|
||||
DYNAMICSBLOCK *dynPtr;
|
||||
|
@ -642,6 +645,7 @@ static void DoAlienAIAttackSound(STRATEGYBLOCK *sbPtr) {
|
|||
#endif
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
static void DoAlienAIRandomHiss(STRATEGYBLOCK *sbPtr) {
|
||||
|
||||
|
@ -2137,7 +2141,7 @@ int AlienIsAwareOfTarget(STRATEGYBLOCK *sbPtr) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
int AlienHasPathToTarget(STRATEGYBLOCK *sbPtr) {
|
||||
static int AlienHasPathToTarget(STRATEGYBLOCK *sbPtr) {
|
||||
|
||||
ALIEN_STATUS_BLOCK *alienStatusPointer=(ALIEN_STATUS_BLOCK *)(sbPtr->SBdataptr);
|
||||
|
||||
|
@ -2147,10 +2151,10 @@ int AlienHasPathToTarget(STRATEGYBLOCK *sbPtr) {
|
|||
{
|
||||
GLOBALASSERT(alienStatusPointer->Target->containingModule);
|
||||
{
|
||||
#if 0
|
||||
PLAYER_STATUS *playerStatusPtr= (PLAYER_STATUS *) (Player->ObStrategyBlock->SBdataptr);
|
||||
LOCALASSERT(playerStatusPtr);
|
||||
|
||||
#if 0
|
||||
if((playerStatusPtr->cloakOn==1)&&(playerStatusPtr->cloakPositionGivenAway==0)) {
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "dynblock.h"
|
||||
#include "dynamics.h"
|
||||
#include "showcmds.h"
|
||||
#include "weapons.h"
|
||||
|
||||
#define UseLocalAssert Yes
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@ Source file for predator AI
|
|||
#include "bh_dummy.h"
|
||||
#include "bh_agun.h"
|
||||
#include "scream.h"
|
||||
#include "game_statistics.h"
|
||||
|
||||
#define UseLocalAssert Yes
|
||||
#include "ourasert.h"
|
||||
|
@ -77,9 +78,15 @@ static PRED_RETURN_CONDITION Execute_PFS_Pathfinder(STRATEGYBLOCK *sbPtr);
|
|||
static PRED_RETURN_CONDITION Execute_PFS_Return(STRATEGYBLOCK *sbPtr);
|
||||
static PRED_RETURN_CONDITION Execute_PFS_Engage(STRATEGYBLOCK *sbPtr);
|
||||
|
||||
#if 0
|
||||
static PRED_RETURN_CONDITION Execute_PNS_Approach(STRATEGYBLOCK *sbPtr);
|
||||
static PRED_RETURN_CONDITION Execute_PNS_Avoidance(STRATEGYBLOCK *sbPtr);
|
||||
static PRED_RETURN_CONDITION Execute_PNS_StandGround(STRATEGYBLOCK *sbPtr);
|
||||
static PRED_RETURN_CONDITION Execute_PNS_NewDischargePistol(STRATEGYBLOCK *sbPtr);
|
||||
static PRED_RETURN_CONDITION Predator_ThreatAnalysis(STRATEGYBLOCK *sbPtr);
|
||||
static void CreateNPCPredatorPlasBolt(VECTORCH *startingPosition, VECTORCH *targetDirection);
|
||||
static void CreateNPCPredatorDisc(VECTORCH *startingPosition, VECTORCH *targetDirection);
|
||||
#endif
|
||||
static PRED_RETURN_CONDITION Execute_PNS_Avoidance(STRATEGYBLOCK *sbPtr);
|
||||
static PRED_RETURN_CONDITION Execute_PNS_Wander(STRATEGYBLOCK *sbPtr);
|
||||
static PRED_RETURN_CONDITION Execute_PNS_Hunt(STRATEGYBLOCK *sbPtr);
|
||||
static PRED_RETURN_CONDITION Execute_PNS_Retreat(STRATEGYBLOCK *sbPtr);
|
||||
|
@ -98,14 +105,11 @@ static PRED_RETURN_CONDITION Execute_PNS_Recover(STRATEGYBLOCK *sbPtr);
|
|||
static PRED_RETURN_CONDITION Execute_PNS_Taunting(STRATEGYBLOCK *sbPtr);
|
||||
static PRED_RETURN_CONDITION Execute_PNS_DischargeSpeargun(STRATEGYBLOCK *sbPtr);
|
||||
static PRED_RETURN_CONDITION Execute_PNS_AttackBrutallyWithPlasmaCaster(STRATEGYBLOCK *sbPtr);
|
||||
static PRED_RETURN_CONDITION Execute_PNS_NewDischargePistol(STRATEGYBLOCK *sbPtr);
|
||||
|
||||
static PRED_RETURN_CONDITION Predator_ThreatAnalysis(STRATEGYBLOCK *sbPtr);
|
||||
static PRED_RETURN_CONDITION Execute_PNS_SelfDestruct(STRATEGYBLOCK *sbPtr);
|
||||
|
||||
static void Execute_Dying(STRATEGYBLOCK *sbPtr);
|
||||
|
||||
static void CreateNPCPredatorPlasBolt(VECTORCH *startingPosition, VECTORCH *targetDirection);
|
||||
static void CreateNPCPredatorDisc(VECTORCH *startingPosition, VECTORCH *targetDirection);
|
||||
static void SetPredatorAnimationSequence(STRATEGYBLOCK *sbPtr,HMODEL_SEQUENCE_TYPES type, int subtype, int length, int tweening);
|
||||
static int PredatorShouldBeCrawling(STRATEGYBLOCK *sbPtr);
|
||||
static int PredatorShouldAttackPlayer(STRATEGYBLOCK *sbPtr);
|
||||
|
@ -2812,6 +2816,7 @@ static PRED_RETURN_CONDITION Execute_PNS_Avoidance(STRATEGYBLOCK *sbPtr)
|
|||
return(PRC_No_Change);
|
||||
}
|
||||
|
||||
#if 0
|
||||
static PRED_RETURN_CONDITION Execute_PNS_Approach(STRATEGYBLOCK *sbPtr)
|
||||
{
|
||||
PREDATOR_STATUS_BLOCK *predatorStatusPointer;
|
||||
|
@ -2914,6 +2919,7 @@ static PRED_RETURN_CONDITION Execute_PNS_Approach(STRATEGYBLOCK *sbPtr)
|
|||
}
|
||||
return(PRC_No_Change);
|
||||
}
|
||||
#endif
|
||||
|
||||
static PRED_RETURN_CONDITION Execute_PNS_EngageWithPistol(STRATEGYBLOCK *sbPtr)
|
||||
{
|
||||
|
@ -3484,6 +3490,7 @@ static PRED_RETURN_CONDITION Execute_PNS_AttackWithWristblade(STRATEGYBLOCK *sbP
|
|||
|
||||
}
|
||||
|
||||
#if 0
|
||||
static PRED_RETURN_CONDITION Execute_PNS_StandGround(STRATEGYBLOCK *sbPtr)
|
||||
{
|
||||
PREDATOR_STATUS_BLOCK *predatorStatusPointer;
|
||||
|
@ -3524,6 +3531,7 @@ static PRED_RETURN_CONDITION Execute_PNS_StandGround(STRATEGYBLOCK *sbPtr)
|
|||
}
|
||||
return(PRC_No_Change);
|
||||
}
|
||||
#endif
|
||||
|
||||
static PRED_RETURN_CONDITION Execute_PNS_SwapWeapon(STRATEGYBLOCK *sbPtr) {
|
||||
|
||||
|
@ -4162,6 +4170,7 @@ static void Execute_Dying(STRATEGYBLOCK *sbPtr)
|
|||
predStatusPointer->stateTimer -= NormalFrameTime;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* Patrick 4/7/97 --------------------------------------------------
|
||||
Behaviour support functions
|
||||
---------------------------------------------------------------------*/
|
||||
|
@ -4255,6 +4264,7 @@ static void CreateNPCPredatorDisc(VECTORCH *startingPosition, VECTORCH *targetDi
|
|||
dynPtr->LinVelocity.vy = MUL_FIXED(targetDirection->vy,PRED_DISCSPEED);
|
||||
dynPtr->LinVelocity.vz = MUL_FIXED(targetDirection->vz,PRED_DISCSPEED);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void SetPredatorAnimationSequence(STRATEGYBLOCK *sbPtr,HMODEL_SEQUENCE_TYPES type, int subtype, int length, int tweening)
|
||||
{
|
||||
|
@ -6479,6 +6489,7 @@ static PRED_RETURN_CONDITION Execute_PNS_AttackBrutallyWithPlasmaCaster(STRATEGY
|
|||
return(PRC_No_Change);
|
||||
}
|
||||
|
||||
#if 0
|
||||
static PRED_RETURN_CONDITION Predator_ThreatAnalysis(STRATEGYBLOCK *sbPtr) {
|
||||
|
||||
PREDATOR_STATUS_BLOCK *predatorStatusPointer;
|
||||
|
@ -6701,6 +6712,7 @@ static PRED_RETURN_CONDITION Execute_PNS_NewDischargePistol(STRATEGYBLOCK *sbPtr
|
|||
#endif
|
||||
return(PRC_No_Change);
|
||||
}
|
||||
#endif
|
||||
|
||||
static PRED_RETURN_CONDITION Execute_PNS_SelfDestruct(STRATEGYBLOCK *sbPtr)
|
||||
{
|
||||
|
|
|
@ -90,6 +90,7 @@ static BOOL TargetIsFiringFlamethrowerAtQueen(STRATEGYBLOCK *sbPtr);
|
|||
static void MakeNonFragable(HMODELCONTROLLER *controller);
|
||||
static void QueenCalculateTargetInfo(STRATEGYBLOCK *sbPtr);
|
||||
void HandleHangarAirlock();
|
||||
static BOOL LockerDoorIsClosed();
|
||||
|
||||
QUEEN_MANOEUVRE Queen_Next_Command;
|
||||
|
||||
|
@ -1144,7 +1145,7 @@ void QueenMove_Walk(STRATEGYBLOCK *sbPtr) {
|
|||
else
|
||||
{
|
||||
VECTORCH velocity;
|
||||
int walkSpeed;
|
||||
//int walkSpeed;
|
||||
|
||||
velocity.vx=sbPtr->DynPtr->OrientMat.mat31;
|
||||
velocity.vy=0;
|
||||
|
@ -4509,7 +4510,7 @@ void QueenBehaviour(STRATEGYBLOCK *sbPtr)
|
|||
}
|
||||
|
||||
|
||||
BOOL LockerDoorIsClosed()
|
||||
static BOOL LockerDoorIsClosed()
|
||||
{
|
||||
TRACK_OBJECT_BEHAV_BLOCK* door;
|
||||
GLOBALASSERT(LockerDoorSbptr);
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "stratdef.h"
|
||||
#include "gamedef.h"
|
||||
#include "bh_types.h"
|
||||
#include "bonusabilities.h"
|
||||
|
||||
#include "weapons.h"
|
||||
#include "comp_shp.h"
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include "dynblock.h"
|
||||
#include "dynamics.h"
|
||||
#include "bh_debri.h"
|
||||
#include "plat_shp.h"
|
||||
|
||||
#define UseLocalAssert Yes
|
||||
#include "ourasert.h"
|
||||
|
|
|
@ -47,6 +47,7 @@ int NewFindThisRoute(WAYPOINT_HEADER *waypoints, WAYPOINT_ROUTE *thisroute,WAYPO
|
|||
void SweepWaypoints(WAYPOINT_HEADER *waypoints, STRATEGYBLOCK *sbPtr, VECTORCH *targetPosition);
|
||||
int FindBestRoute(WAYPOINT_ROUTE *bestroute,WAYPOINT_HEADER *waypoints);
|
||||
int NPCContainsPoint(STRATEGYBLOCK *sbPtr,VECTORCH *point);
|
||||
static int WaypointContainsPoint(WAYPOINT_VOLUME *waypoint, VECTORCH *point);
|
||||
void GetTargetPositionInWaypoint(WAYPOINT_VOLUME *waypoint,VECTORCH *output);
|
||||
|
||||
|
||||
|
@ -270,7 +271,7 @@ int NPCGetWaypointDirection(WAYPOINT_HEADER *waypoints, STRATEGYBLOCK *sbPtr, VE
|
|||
|
||||
}
|
||||
|
||||
int WaypointContainsPoint(WAYPOINT_VOLUME *waypoint, VECTORCH *point) {
|
||||
static int WaypointContainsPoint(WAYPOINT_VOLUME *waypoint, VECTORCH *point) {
|
||||
|
||||
/* 'point' should be in module space. */
|
||||
|
||||
|
|
|
@ -23,11 +23,16 @@
|
|||
#include "bh_alien.h"
|
||||
#include "bh_marin.h"
|
||||
#include "bh_dummy.h"
|
||||
#include "bh_rubberduck.h"
|
||||
#include "pvisible.h"
|
||||
#include "pheromon.h"
|
||||
#include "psnd.h"
|
||||
#include "psndplat.h"
|
||||
#include "huddefs.h"
|
||||
#include "ai_sight.h"
|
||||
#include "targeting.h"
|
||||
#include "inventry.h"
|
||||
#include "game_statistics.h"
|
||||
|
||||
#include "particle.h"
|
||||
#include "sfx.h"
|
||||
|
@ -66,7 +71,6 @@ void InitialiseEnergyBoltBehaviour(DAMAGE_PROFILE *damage, int factor);
|
|||
static void InitialiseFlameThrowerBehaviour(void);
|
||||
void InitialiseDiscBehaviour(STRATEGYBLOCK *target,SECTION_DATA *disc_section);
|
||||
static void InitialiseAlienSpitBehaviour(void);
|
||||
static void InitialiseFragmentationGrenade(VECTORCH *originPtr);
|
||||
STRATEGYBLOCK* InitialiseEnergyBoltBehaviourKernel(VECTORCH *position,MATRIXCH *orient, int player, DAMAGE_PROFILE *damage, int factor);
|
||||
static void InitialiseFrisbeeBehaviour(void);
|
||||
STRATEGYBLOCK* InitialiseFrisbeeBoltBehaviourKernel(VECTORCH *position,MATRIXCH *orient, int player, DAMAGE_PROFILE *damage, int factor);
|
||||
|
@ -80,6 +84,8 @@ STRATEGYBLOCK *PredDisc_GetNewTarget(PC_PRED_DISC_BEHAV_BLOCK *bptr,VECTORCH *di
|
|||
int ObjectIsOnScreen(DISPLAYBLOCK *object);
|
||||
void Frisbee_Hit_Environment(STRATEGYBLOCK *sbPtr,COLLISIONREPORT *reportPtr);
|
||||
void Crunch_Position_For_Players_Weapon(VECTORCH *position);
|
||||
static int SBForcesBounce(STRATEGYBLOCK *sbPtr);
|
||||
static int Reflect(VECTORCH *Incident, VECTORCH *Normal, EULER *Output);
|
||||
|
||||
/*KJL****************************************************************************************
|
||||
* G L O B A L S *
|
||||
|
@ -240,11 +246,10 @@ int FrisbeeSight_FrustrumReject(STRATEGYBLOCK *sbPtr,VECTORCH *localOffset,STRAT
|
|||
)) {
|
||||
/* 90 horizontal, 90 vertical? */
|
||||
#else
|
||||
if ((fixed_offset.vx <0) && (
|
||||
((fixed_offset.vy) < (-fixed_offset.vx))&&(fixed_offset.vy>=0))
|
||||
||((fixed_offset.vy<0)&&((-fixed_offset.vy) < (-fixed_offset.vx))
|
||||
)&&(
|
||||
(fixed_offset.vz>0)
|
||||
if (((fixed_offset.vx <0) && (
|
||||
((fixed_offset.vy) < (-fixed_offset.vx))&&(fixed_offset.vy>=0)))
|
||||
|| (((fixed_offset.vy<0)&&((-fixed_offset.vy) < (-fixed_offset.vx))
|
||||
)&&((fixed_offset.vz>0))
|
||||
)) {
|
||||
/* 90 horizontal, 90 vertical? */
|
||||
#endif
|
||||
|
@ -468,7 +473,6 @@ STRATEGYBLOCK* CreateFrisbeeKernel(VECTORCH *position, MATRIXCH *orient, int fro
|
|||
/* Create HModel. */
|
||||
{
|
||||
SECTION *root_section;
|
||||
SECTION_DATA *local_disc;
|
||||
|
||||
root_section=GetNamedHierarchyFromLibrary("mdisk","Mdisk");
|
||||
|
||||
|
@ -483,6 +487,7 @@ STRATEGYBLOCK* CreateFrisbeeKernel(VECTORCH *position, MATRIXCH *orient, int fro
|
|||
dispPtr->HModelControlBlock=&fblk->HModelController;
|
||||
|
||||
#if 0
|
||||
SECTION_DATA *local_disc;
|
||||
/* Match disks. */
|
||||
local_disc=GetThisSectionData(bblk->HModelController.section_data,"disk");
|
||||
local_disc->World_Offset=disc_section->World_Offset;
|
||||
|
@ -1345,6 +1350,7 @@ extern void ClusterGrenadeBehaviour(STRATEGYBLOCK *sbPtr)
|
|||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void InitialiseFragmentationGrenade(VECTORCH *originPtr)
|
||||
{
|
||||
DISPLAYBLOCK *dispPtr;
|
||||
|
@ -1405,6 +1411,8 @@ static void InitialiseFragmentationGrenade(VECTORCH *originPtr)
|
|||
if(AvP.Network != I_No_Network) AddNetGameObjectID(dispPtr->ObStrategyBlock);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
extern void ProximityGrenadeBehaviour(STRATEGYBLOCK *sbPtr)
|
||||
{
|
||||
DYNAMICSBLOCK *dynPtr = sbPtr->DynPtr;
|
||||
|
@ -3391,7 +3399,7 @@ static void GetGunDirection(VECTORCH *gunDirectionPtr, VECTORCH *positionPtr)
|
|||
Normalise(gunDirectionPtr);
|
||||
}
|
||||
|
||||
int Reflect(VECTORCH *Incident, VECTORCH *Normal, EULER *Output) {
|
||||
static int Reflect(VECTORCH *Incident, VECTORCH *Normal, EULER *Output) {
|
||||
|
||||
int dot,retval;
|
||||
VECTORCH outVec,normInc;
|
||||
|
@ -3420,7 +3428,7 @@ int Reflect(VECTORCH *Incident, VECTORCH *Normal, EULER *Output) {
|
|||
return(retval);
|
||||
}
|
||||
|
||||
int SBForcesBounce(STRATEGYBLOCK *sbPtr) {
|
||||
static int SBForcesBounce(STRATEGYBLOCK *sbPtr) {
|
||||
|
||||
if (sbPtr==NULL) {
|
||||
return(0);
|
||||
|
|
|
@ -27,6 +27,7 @@ void FirePredPistolFlechettes(VECTORCH *base_position,VECTORCH *base_offset,MATR
|
|||
extern void FrisbeeEnergyBoltBehaviour(STRATEGYBLOCK *sbPtr);
|
||||
|
||||
extern int SBIsEnvironment(STRATEGYBLOCK *sbPtr);
|
||||
int ValidTargetForProxMine(STRATEGYBLOCK *obstaclePtr);
|
||||
|
||||
typedef struct OneShotBehaviourType
|
||||
{
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
#include "bh_alien.h"
|
||||
#include "bh_corpse.h"
|
||||
#include "bh_dummy.h"
|
||||
#include "game_statistics.h"
|
||||
|
||||
#define UseLocalAssert Yes
|
||||
#include "ourasert.h"
|
||||
|
@ -4124,7 +4125,9 @@ void Execute_Xeno_TurnToFace_Far(STRATEGYBLOCK *sbPtr)
|
|||
void Execute_Xeno_Follow_Far(STRATEGYBLOCK *sbPtr)
|
||||
{
|
||||
XENO_STATUS_BLOCK *xenoStatusPointer;
|
||||
#if FAR_XENO_ACTIVITY
|
||||
int anglex,angley;
|
||||
#endif
|
||||
|
||||
LOCALASSERT(sbPtr);
|
||||
xenoStatusPointer = (XENO_STATUS_BLOCK *)(sbPtr->SBdataptr);
|
||||
|
@ -4319,7 +4322,9 @@ void Execute_Xeno_Return_Far(STRATEGYBLOCK *sbPtr)
|
|||
void Execute_Xeno_Avoidance_Far(STRATEGYBLOCK *sbPtr)
|
||||
{
|
||||
XENO_STATUS_BLOCK *xenoStatusPointer;
|
||||
#if FAR_XENO_ACTIVITY
|
||||
int anglex,angley;
|
||||
#endif
|
||||
|
||||
LOCALASSERT(sbPtr);
|
||||
xenoStatusPointer = (XENO_STATUS_BLOCK *)(sbPtr->SBdataptr);
|
||||
|
|
|
@ -184,7 +184,7 @@ static DISPLAYBLOCK* CreateGrapplingHook(void)
|
|||
|
||||
}
|
||||
|
||||
extern void GrapplingHookBehaviour(STRATEGYBLOCK *sbPtr)
|
||||
void GrapplingHookBehaviour(STRATEGYBLOCK *sbPtr)
|
||||
{
|
||||
DYNAMICSBLOCK *dynPtr = sbPtr->DynPtr;
|
||||
|
||||
|
|
|
@ -6,3 +6,4 @@ extern void ActivateGrapplingHook(void);
|
|||
extern void HandleGrapplingHookForces(void);
|
||||
extern void RenderGrapplingHook(void);
|
||||
extern void DisengageGrapplingHook(void);
|
||||
void GrapplingHookBehaviour(STRATEGYBLOCK *sbPtr);
|
||||
|
|
|
@ -14,6 +14,8 @@ int CheatMode_Environment=0;
|
|||
extern void CheatMode_GetNextAllowedSpecies(int *speciesPtr, int searchForward);
|
||||
extern void CheatMode_GetNextAllowedEnvironment(int *environmentPtr, int searchForward);
|
||||
extern void CheatMode_CheckOptionsAreValid(void);
|
||||
static int ThereIsAnAllowedEnvironment(void);
|
||||
static int EnvironmentPlayableBySpecies(int environment);
|
||||
|
||||
#define NUMBER_OF_ENVIRONMENTS (MAX_NO_OF_MARINE_EPISODES+MAX_NO_OF_PREDATOR_EPISODES+MAX_NO_OF_ALIEN_EPISODES)
|
||||
#define NUMBER_OF_SPECIES 3
|
||||
|
|
|
@ -180,7 +180,7 @@ MAPBLOCK6 Term_Type6 = {
|
|||
MAPBLOCK8 Player_and_Camera_Type8[] = {
|
||||
#if SupportModules
|
||||
/* Ship */
|
||||
|
||||
{
|
||||
MapType_Player,
|
||||
|
||||
I_ShapeMarinePlayer, /*mainshapelist position 0*/
|
||||
|
@ -188,8 +188,8 @@ MAPBLOCK8 Player_and_Camera_Type8[] = {
|
|||
|
||||
/* MapType_Camera, */
|
||||
|
||||
0, 0, 0, /* Loc */
|
||||
0, 3062, 0, /* Orient */
|
||||
{0, 0, 0}, /* Loc */
|
||||
{0, 3062, 0}, /* Orient */
|
||||
|
||||
ObFlag_MultLSrc
|
||||
|0
|
||||
|
@ -227,7 +227,7 @@ MAPBLOCK8 Player_and_Camera_Type8[] = {
|
|||
0, /* MapMass */
|
||||
0,0,0, /* MapNewtonV */
|
||||
#endif
|
||||
0,0,0, /* MapOrigin */
|
||||
{0,0,0}, /* MapOrigin */
|
||||
|
||||
0, /* MapSimShapes */
|
||||
0, /* MapViewType */
|
||||
|
@ -235,8 +235,8 @@ MAPBLOCK8 Player_and_Camera_Type8[] = {
|
|||
0, /* MapMPtr */
|
||||
|
||||
0, /* MapDPtr */
|
||||
0,0,0, /* MapMOffset */
|
||||
|
||||
{0,0,0} /* MapMOffset */
|
||||
},
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
|
@ -295,10 +295,11 @@ MAPBLOCK8 Player_and_Camera_Type8[] = {
|
|||
/****************************************************************************/
|
||||
/* Map End */
|
||||
#endif /*SupportModules*/
|
||||
{
|
||||
MapType_Term, /* Map Type Function */
|
||||
0, /* Shape */
|
||||
0,0,0, /* Loc */
|
||||
0,0,0, /* Orient */
|
||||
{0,0,0}, /* Loc */
|
||||
{0,0,0}, /* Orient */
|
||||
0, /* Flags 1 */
|
||||
0, /* Flags 2 */
|
||||
0, /* Flags 3 */
|
||||
|
@ -316,13 +317,13 @@ MAPBLOCK8 Player_and_Camera_Type8[] = {
|
|||
0, /* MapMass */
|
||||
0,0,0, /* MapNewtonV */
|
||||
#endif
|
||||
0,0,0, /* MapOrigin */
|
||||
{0,0,0}, /* MapOrigin */
|
||||
0, /* MapSimShapes */
|
||||
0, /* MapViewType */
|
||||
0, /* MapMPtr */
|
||||
0, /* MapDPtr */
|
||||
0,0,0, /* MapMOffset */
|
||||
|
||||
{0,0,0} /* MapMOffset */
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -301,7 +301,9 @@
|
|||
|
||||
void DAVEHOOK_Init(void)
|
||||
{
|
||||
#if 0
|
||||
static SCString* pSCString_TestLeak = new SCString("this is a test memory leak");
|
||||
#endif
|
||||
|
||||
MissionHacks :: TestInit();
|
||||
|
||||
|
|
|
@ -165,6 +165,7 @@ static void MakeStaticBoundingBoxForNRBB(STRATEGYBLOCK *sbPtr);
|
|||
static int RelocateNRBB(STRATEGYBLOCK *sbPtr);
|
||||
|
||||
static void FindLandscapePolygonsInObjectsVicinity(STRATEGYBLOCK *sbPtr);
|
||||
#if 0
|
||||
static signed int DistanceMovedBeforeNRBBHitsNegYPolygon(DYNAMICSBLOCK *dynPtr, struct ColPolyTag *polyPtr, int distanceToMove);
|
||||
static signed int DistanceMovedBeforeNRBBHitsPosYPolygon(DYNAMICSBLOCK *dynPtr, struct ColPolyTag *polyPtr, int distanceToMove);
|
||||
static signed int DistanceMovedBeforeNRBBHitsNegXPolygon(DYNAMICSBLOCK *dynPtr, struct ColPolyTag *polyPtr, int distanceToMove);
|
||||
|
@ -172,6 +173,7 @@ static signed int DistanceMovedBeforeNRBBHitsPosXPolygon(DYNAMICSBLOCK *dynPtr,
|
|||
static signed int DistanceMovedBeforeNRBBHitsNegZPolygon(DYNAMICSBLOCK *dynPtr, struct ColPolyTag *polyPtr, int distanceToMove);
|
||||
static signed int DistanceMovedBeforeNRBBHitsPosZPolygon(DYNAMICSBLOCK *dynPtr, struct ColPolyTag *polyPtr, int distanceToMove);
|
||||
static void TestForValidMovement(STRATEGYBLOCK *sbPtr);
|
||||
#endif
|
||||
static int MoveObject(STRATEGYBLOCK *sbPtr);
|
||||
static void TestForValidPlayerStandUp(STRATEGYBLOCK *sbPtr);
|
||||
static int SteppingUpIsValid(STRATEGYBLOCK *sbPtr);
|
||||
|
@ -188,7 +190,6 @@ static int (*RelocationIsValid)(STRATEGYBLOCK *sbPtr);
|
|||
|
||||
static void MovePlatformLift(STRATEGYBLOCK *sbPtr);
|
||||
static void FindLandscapePolygonsInParticlesPath(PARTICLE *particlePtr, VECTORCH *displacementPtr);
|
||||
void AddEffectsOfForceGenerators(VECTORCH *positionPtr, VECTORCH *impulsePtr, int mass);
|
||||
|
||||
VECTORCH *GetNearestModuleTeleportPoint(MODULE* thisModulePtr, VECTORCH* positionPtr);
|
||||
|
||||
|
@ -1570,17 +1571,13 @@ static int MoveObject(STRATEGYBLOCK *sbPtr)
|
|||
|
||||
if (!wentUpStep)
|
||||
{
|
||||
STRATEGYBLOCK *obstacleSBPtr;
|
||||
STRATEGYBLOCK *obstacleSBPtr = 0;
|
||||
|
||||
if (polygonPtr->ParentObject)
|
||||
if (polygonPtr->ParentObject->ObStrategyBlock)
|
||||
{
|
||||
obstacleSBPtr = polygonPtr->ParentObject->ObStrategyBlock;
|
||||
}
|
||||
else
|
||||
{
|
||||
obstacleSBPtr = 0;
|
||||
}
|
||||
if (polygonPtr->ParentObject->ObStrategyBlock)
|
||||
{
|
||||
obstacleSBPtr = polygonPtr->ParentObject->ObStrategyBlock;
|
||||
}
|
||||
|
||||
DistanceToStepUp = 0;
|
||||
|
||||
|
@ -3479,6 +3476,7 @@ static int AxisToIgnore(VECTORCH *normal)
|
|||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void TestForValidMovement(STRATEGYBLOCK *sbPtr)
|
||||
{
|
||||
#if 1
|
||||
|
@ -3503,6 +3501,7 @@ static void TestForValidMovement(STRATEGYBLOCK *sbPtr)
|
|||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
static int RelocateSphere(STRATEGYBLOCK *sbPtr)
|
||||
{
|
||||
|
|
|
@ -53,5 +53,6 @@ extern void GetPolygonNormal(struct ColPolyTag *polyPtr);
|
|||
extern EULER HeadOrientation;
|
||||
|
||||
extern int ParticleDynamics(PARTICLE *particlePtr, VECTORCH *obstacleNormalPtr, int *moduleIndexPtr);
|
||||
void AddEffectsOfForceGenerators(VECTORCH *positionPtr, VECTORCH *impulsePtr, int mass);
|
||||
|
||||
#endif /* end of preprocessor condition for file wrapping */
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
#include "stratdef.h"
|
||||
#include "gamedef.h"
|
||||
#include "game_statistics.h"
|
||||
#include "messagehistory.h"
|
||||
#include "dynblock.h"
|
||||
#include "dynamics.h"
|
||||
|
||||
|
@ -42,6 +44,7 @@
|
|||
#include "pldnet.h"
|
||||
|
||||
#include "kshape.h"
|
||||
#include "game.h"
|
||||
|
||||
/* KJL 16:00:13 11/22/96 - One of my evil experiments.... */
|
||||
#define PENTIUM_PROFILING_ON 0
|
||||
|
|
6
src/avp/game.h
Normal file
6
src/avp/game.h
Normal file
|
@ -0,0 +1,6 @@
|
|||
#ifndef GAME_H
|
||||
#define GAME_H
|
||||
|
||||
void TimeStampedMessage(char *stringPtr);
|
||||
|
||||
#endif
|
|
@ -12,6 +12,7 @@
|
|||
#include "bh_debri.h"
|
||||
#include "bh_weap.h"
|
||||
#include "pldghost.h"
|
||||
#include "opengl.h"
|
||||
|
||||
#define UseLocalAssert Yes
|
||||
#include "ourasert.h"
|
||||
|
@ -40,7 +41,6 @@ extern int AlienEpisodeToPlay;
|
|||
extern char LevelName[];
|
||||
|
||||
extern AvP_Level_Target_Desc LevelStatsTargets[I_MaxDifficulties][AVP_ENVIRONMENT_END_OF_LIST];
|
||||
extern void DoStatisticsScreen(int completed_level);
|
||||
|
||||
/* Default structure: */
|
||||
AvP_GameStats_Stored DefaultLevelGameStats = {
|
||||
|
@ -78,7 +78,7 @@ AvP_GameStats_Stored DefaultLevelGameStats = {
|
|||
|
||||
#define NEWLINE_SPACING ((ScreenDescriptorBlock.SDB_Height<400)? 12:15)
|
||||
|
||||
extern void CurrentGameStats_Initialise(void)
|
||||
void CurrentGameStats_Initialise(void)
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<STATS_VICTIM_MAXIMUM; i++)
|
||||
|
@ -834,7 +834,7 @@ extern void CurrentGameStats_CreatureKilled(STRATEGYBLOCK *sbPtr,SECTION_DATA *s
|
|||
}
|
||||
|
||||
|
||||
extern void DoFailedLevelStatisticsScreen(void)
|
||||
void DoFailedLevelStatisticsScreen(void)
|
||||
{
|
||||
extern int deathFadeLevel;
|
||||
D3D_FadeDownScreen(deathFadeLevel,0);
|
||||
|
|
|
@ -100,6 +100,9 @@ extern void CurrentGameStats_CreatureKilled(STRATEGYBLOCK *sbPtr,SECTION_DATA *s
|
|||
extern void CurrentGameStats_TrophyCollected(STRATEGYBLOCK *sbPtr);
|
||||
extern void CurrentGameStats_HeadBitten(STRATEGYBLOCK *sbPtr);
|
||||
extern void InitialiseCurrentGameStatistics(void);
|
||||
extern void CurrentGameStats_Initialise(void);
|
||||
extern void DoFailedLevelStatisticsScreen(void);
|
||||
extern void DoStatisticsScreen(int completed_level);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -97,6 +97,7 @@ static void ShowFPS(void)
|
|||
{
|
||||
ShowDebuggingText.FPS = ~ShowDebuggingText.FPS;
|
||||
}
|
||||
#if CONSOLE_DEBUGGING_COMMANDS_ACTIVATED
|
||||
static void ShowEnvironment(void)
|
||||
{
|
||||
ShowDebuggingText.Environment = ~ShowDebuggingText.Environment;
|
||||
|
@ -129,17 +130,19 @@ static void ShowTears(void)
|
|||
{
|
||||
ShowDebuggingText.Tears = ~ShowDebuggingText.Tears;
|
||||
}
|
||||
static void ShowPolyCount(void)
|
||||
{
|
||||
ShowDebuggingText.PolyCount = ~ShowDebuggingText.PolyCount;
|
||||
}
|
||||
static void ShowSounds(void)
|
||||
{
|
||||
ShowDebuggingText.Sounds = ~ShowDebuggingText.Sounds;
|
||||
}
|
||||
#endif
|
||||
static void ShowPolyCount(void)
|
||||
{
|
||||
ShowDebuggingText.PolyCount = ~ShowDebuggingText.PolyCount;
|
||||
}
|
||||
|
||||
|
||||
extern void ChangeToMarine();
|
||||
#if CONSOLE_DEBUGGING_COMMANDS_ACTIVATED
|
||||
static void ChangeToSpecialist_General()
|
||||
{
|
||||
netGameData.myCharacterSubType=NGSCT_General;
|
||||
|
@ -208,6 +211,12 @@ static void ChangeToSpecialist_Pistols()
|
|||
ChangeToMarine();
|
||||
}
|
||||
|
||||
static void ForceAssertionFailure(void)
|
||||
{
|
||||
LOCALASSERT("This assertion has been forced to stop the game"==0);
|
||||
}
|
||||
#endif
|
||||
|
||||
extern void ShowMultiplayerScores(void)
|
||||
{
|
||||
ShowMultiplayerScoreTimer=5*ONE_FIXED;
|
||||
|
@ -225,11 +234,6 @@ static void DoMultiplayerSaySpecies(char* string)
|
|||
AddNetMsg_ChatBroadcast(string,TRUE);
|
||||
}
|
||||
|
||||
static void ForceAssertionFailure(void)
|
||||
{
|
||||
LOCALASSERT("This assertion has been forced to stop the game"==0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void CDCommand_Play(int track)
|
||||
|
@ -265,6 +269,7 @@ static void CDCommand_Volume(int volume)
|
|||
}
|
||||
|
||||
|
||||
#if CONSOLE_DEBUGGING_COMMANDS_ACTIVATED
|
||||
static void GunX(int x)
|
||||
{
|
||||
PLAYER_STATUS *playerStatusPtr= (PLAYER_STATUS *) (Player->ObStrategyBlock->SBdataptr);
|
||||
|
@ -289,12 +294,14 @@ static void GunZ(int z)
|
|||
|
||||
twPtr->RestPosition.vz = z;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void MakeRotatingLight(void)
|
||||
{
|
||||
MakeLightElement(&Player->ObWorld,LIGHTELEMENT_ROTATING);
|
||||
}
|
||||
|
||||
#if CONSOLE_DEBUGGING_COMMANDS_ACTIVATED
|
||||
static void RestartMultiplayer(void)
|
||||
{
|
||||
/* obviously have to be in a network game... */
|
||||
|
@ -309,6 +316,7 @@ static void CompleteLevel(void)
|
|||
{
|
||||
AvP.LevelCompleted = 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
void CreateGameSpecificConsoleCommands(void)
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
#include "load_shp.h"
|
||||
#include "plat_shp.h"
|
||||
#include "avp_userprofile.h"
|
||||
#include "maths.h"
|
||||
#include "opengl.h"
|
||||
|
||||
#define UseLocalAssert Yes
|
||||
#include "ourasert.h"
|
||||
|
@ -4940,7 +4942,7 @@ void LoadHierarchy(SAVE_BLOCK_HEADER* header,HMODELCONTROLLER* controller)
|
|||
{
|
||||
SAVE_BLOCK_HEADER* delta_header;
|
||||
|
||||
while(delta_header = GetNextBlockIfOfType(SaveBlock_HierarchyDelta))
|
||||
while((delta_header = GetNextBlockIfOfType(SaveBlock_HierarchyDelta)))
|
||||
{
|
||||
LoadHierarchyDelta(delta_header,controller);
|
||||
}
|
||||
|
|
|
@ -35,6 +35,8 @@
|
|||
#include "pldghost.h"
|
||||
|
||||
#include "d3d_render.h"
|
||||
#include "kshape.h"
|
||||
#include "opengl.h"
|
||||
#include "bh_ais.h"
|
||||
#include "bh_alien.h"
|
||||
|
||||
|
@ -49,6 +51,7 @@
|
|||
#include "pldnet.h"
|
||||
#include "avp_userprofile.h"
|
||||
#include "hud.h"
|
||||
#include "chnkload.h"
|
||||
|
||||
extern int ScanDrawMode;
|
||||
|
||||
|
@ -1881,7 +1884,6 @@ void DrawWristDisplay(void)
|
|||
{
|
||||
extern HMODELCONTROLLER PlayersWeaponHModelController;
|
||||
SECTION_DATA *sectionPtr;
|
||||
int i;
|
||||
|
||||
char *sectionName[]= {"Dum bar display","Dum 1 display","Dum 2 display","Dum 3 display","Dum 4 display"};
|
||||
|
||||
|
@ -1890,7 +1892,7 @@ void DrawWristDisplay(void)
|
|||
|
||||
RenderPredatorPlasmaCasterCharge(PlayerStatusPtr->PlasmaCasterCharge, §ionPtr->World_Offset, §ionPtr->SecMat);
|
||||
#if 0
|
||||
for (i=0; i<5; i++)
|
||||
for (int i=0; i<5; i++)
|
||||
{
|
||||
DECAL CurrentDecal;
|
||||
extern MODULE *playerPherModule;
|
||||
|
|
|
@ -33,7 +33,6 @@ rounds fired etc etc etc*/
|
|||
void InitialisePlayersInventory(PLAYER_STATUS *playerStatusPtr);
|
||||
void MaintainPlayersInventory(void);
|
||||
void SetPlayerSecurityClearance(STRATEGYBLOCK *sbPtr, unsigned int securityLevel);
|
||||
int SlotForThisWeapon(enum WEAPON_ID weaponID);
|
||||
|
||||
static int AbleToPickupAmmo(enum AMMO_ID ammoID);
|
||||
static int AbleToPickupWeapon(enum WEAPON_ID weaponID);
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
#ifndef INVENTRY_H
|
||||
#define INVENTRY_H
|
||||
|
||||
/*KJL*****************************************************
|
||||
* INVENTRY.H - contains externs to the fns in INVENTRY.C *
|
||||
*****************************************************KJL*/
|
||||
|
@ -13,6 +16,7 @@ extern void MaintainPlayersInventory(void);
|
|||
------------------------------------------------------------------------------*/
|
||||
extern void SetPlayerSecurityClearance(STRATEGYBLOCK *sbPtr, unsigned int securityLevel);
|
||||
extern int ReturnPlayerSecurityClearance(STRATEGYBLOCK *sbPtr, unsigned int securityLevel);
|
||||
int SlotForThisWeapon(enum WEAPON_ID weaponID);
|
||||
|
||||
|
||||
|
||||
|
@ -34,3 +38,5 @@ typedef struct player_starting_equipment
|
|||
extern PLAYER_STARTING_EQUIPMENT StartingEquipment;
|
||||
|
||||
#define PISTOL_INFINITE_AMMO (netGameData.pistolInfiniteAmmo)
|
||||
|
||||
#endif
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include "stratdef.h"
|
||||
#include "gamedef.h"
|
||||
#include "language.h"
|
||||
#include "messagehistory.h"
|
||||
|
||||
#define MAX_NO_OF_MESSAGES_IN_HISTORY 64
|
||||
|
||||
|
|
8
src/avp/messagehistory.h
Normal file
8
src/avp/messagehistory.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
#ifndef MESSAGEHISTORY_H
|
||||
#define MESSAGEHISTORY_H
|
||||
|
||||
void MessageHistory_DisplayPrevious(void);
|
||||
void MessageHistory_Initialise(void);
|
||||
void MessageHistory_Maintain(void);
|
||||
|
||||
#endif
|
|
@ -2,6 +2,7 @@
|
|||
#include "3dc.h"
|
||||
#include "module.h"
|
||||
#include "inline.h"
|
||||
#include "kshape.h"
|
||||
|
||||
#include "paintball.h"
|
||||
#include "showcmds.h"
|
||||
|
|
|
@ -30,5 +30,9 @@ extern void PaintBallMode_DrawCurrentDecalAtTarget(void);
|
|||
extern void PaintBallMode_ChangeSelectedDecalID(int delta);
|
||||
extern void PaintBallMode_ChangeSize(int delta);
|
||||
extern void PaintBallMode_AddDecal(void);
|
||||
extern void PaintBallMode_ChangeSubclass(int delta);
|
||||
extern void PaintBallMode_Randomise(void);
|
||||
extern void PaintBallMode_RemoveDecal(void);
|
||||
extern void PaintBallMode_Rotate(void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -24,15 +24,19 @@
|
|||
#include "sphere.h"
|
||||
#include "bh_rubberduck.h"
|
||||
#include "bh_weap.h"
|
||||
#include "weapons.h"
|
||||
#include "avpview.h"
|
||||
#include "pldghost.h"
|
||||
#include "detaillevels.h"
|
||||
#include "psnd.h"
|
||||
#include "kzsort.h"
|
||||
#include "avp_userprofile.h"
|
||||
#define UseLocalAssert Yes
|
||||
#include "ourasert.h"
|
||||
#include "savegame.h"
|
||||
#include "los.h"
|
||||
#include "chnkload.h"
|
||||
#include "maths.h"
|
||||
|
||||
#include <math.h>
|
||||
|
||||
|
|
|
@ -196,6 +196,10 @@ extern void MakeFocusedExplosion(VECTORCH *originPtr, VECTORCH *blastPositionPtr
|
|||
extern void MakeElectricalExplosion(VECTORCH *positionPtr);
|
||||
void MakeSprayOfSparks(MATRIXCH *orientationPtr, VECTORCH *positionPtr);
|
||||
void PlayerPheromoneTrail(DYNAMICSBLOCK *dynPtr);
|
||||
void MakeGrenadeTrailParticles(VECTORCH *prevPositionPtr, VECTORCH *positionPtr);
|
||||
void MakePlasmaTrailParticles(DYNAMICSBLOCK *dynPtr, int number);
|
||||
void NewTrailPoint(DYNAMICSBLOCK *dynPtr);
|
||||
void TimeScaleThingy();
|
||||
|
||||
|
||||
#define MAX_NO_OF_BLOOD_PARTICLES 500
|
||||
|
|
|
@ -1696,7 +1696,7 @@ static void LoadInMovementValues(void)
|
|||
|
||||
|
||||
|
||||
extern void ThrowAFlare(void)
|
||||
void ThrowAFlare(void)
|
||||
{
|
||||
extern int NumberOfFlaresActive;
|
||||
|
||||
|
|
|
@ -73,6 +73,8 @@ typedef enum player_morph_state
|
|||
extern void InitPlayerMovementData(STRATEGYBLOCK* sbPtr);
|
||||
extern void PlayerBehaviour(STRATEGYBLOCK* sbptr);
|
||||
extern void ExecuteFreeMovement(STRATEGYBLOCK* sbPtr);
|
||||
void ThrowAFlare(void);
|
||||
void StartPlayerTaunt(void);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -297,7 +297,6 @@ void HandleWeaponImpact(VECTORCH *positionPtr, STRATEGYBLOCK *sbPtr, enum AMMO_I
|
|||
|
||||
|
||||
void FireAutoGun(STRATEGYBLOCK *sbPtr);
|
||||
void MakeMatrixFromDirection(VECTORCH *directionPtr, MATRIXCH *matrixPtr);
|
||||
void FindEndOfShape(VECTORCH* endPositionPtr, int shapeIndex);
|
||||
static void CalculateTorque(EULER *rotationPtr, VECTORCH *directionPtr, STRATEGYBLOCK *sbPtr);
|
||||
static void CalculateTorqueAtPoint(EULER *rotationPtr, VECTORCH *pointPtr, STRATEGYBLOCK *sbPtr);
|
||||
|
|
|
@ -64,5 +64,7 @@ extern void D3D_BlitWhiteChar(int x, int y, unsigned char c);
|
|||
/* KJL 17:55:48 18/04/98 - called by HUD.c */
|
||||
extern void Render_HealthAndArmour(unsigned int health, unsigned int armour);
|
||||
extern void Render_MarineAmmo(enum TEXTSTRING_ID ammoText, enum TEXTSTRING_ID magazinesText, unsigned int magazines, enum TEXTSTRING_ID roundsText, unsigned int rounds, int primaryAmmo);
|
||||
void D3D_DrawHUDPredatorDigit(HUDCharDesc *charDescPtr, int scale);
|
||||
void Draw_HUDImage(HUDImageDesc *imageDescPtr);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -6,6 +6,7 @@ extern "C"
|
|||
#include "inline.h"
|
||||
//#include "smacker.h"
|
||||
#include "avp_menus.h"
|
||||
#include "avp_intro.h"
|
||||
extern int NormalFrameTime;
|
||||
extern int GotAnyKey;
|
||||
extern int DebouncedGotAnyKey;
|
||||
|
|
6
src/avp/win95/frontend/avp_intro.h
Normal file
6
src/avp/win95/frontend/avp_intro.h
Normal file
|
@ -0,0 +1,6 @@
|
|||
#ifndef AVP_INTRO_H
|
||||
#define AVP_INTRO_H
|
||||
|
||||
void PlayMenuMusic(void);
|
||||
|
||||
#endif
|
File diff suppressed because it is too large
Load diff
|
@ -143,7 +143,7 @@ extern int LengthOfMenuText(char *textPtr)
|
|||
return (pFont->CalcSize(textPtr).w);
|
||||
}
|
||||
|
||||
extern int RenderMenuText(char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format)
|
||||
extern int RenderMenuText(const char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format)
|
||||
{
|
||||
IndexedFont* pFont = IndexedFont :: GetFont(IntroFont_Light);
|
||||
r2pos R2Pos_StartOfRow;
|
||||
|
@ -1848,4 +1848,4 @@ static void CalculateWidthsOfAAFont(void)
|
|||
|
||||
}
|
||||
|
||||
};
|
||||
};
|
||||
|
|
|
@ -97,7 +97,7 @@ extern void LoadAllAvPMenuGfx(void);
|
|||
extern void LoadAllSplashScreenGfx(void);
|
||||
extern void ReleaseAllAvPMenuGfx(void);
|
||||
|
||||
extern int RenderMenuText(char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format);
|
||||
extern int RenderMenuText(const char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format);
|
||||
|
||||
extern int RenderSmallMenuText(char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format);
|
||||
extern int RenderSmallMenuText_Coloured(char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format, int red, int green, int blue);
|
||||
|
@ -117,5 +117,6 @@ extern int HeightOfMenuGfx(enum AVPMENUGFX_ID menuGfxID);
|
|||
|
||||
|
||||
extern void ClearScreenToBlack(void);
|
||||
extern void InitialiseMenuGfx(void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -23,6 +23,9 @@
|
|||
#include "avp_mp_config.h"
|
||||
#include "psnd.h"
|
||||
#include "savegame.h"
|
||||
#include "game.h"
|
||||
#include "avp_menugfx.hpp"
|
||||
#include "avp_intro.h"
|
||||
|
||||
/* used to get file time */
|
||||
#include <sys/types.h>
|
||||
|
@ -102,7 +105,6 @@ extern void DrawMainMenusBackdrop(void);
|
|||
static void TestValidityOfCheatMenu(void);
|
||||
void SetBriefingTextForEpisode(int episode, I_PLAYER_TYPE playerID);
|
||||
void SetBriefingTextToBlank(void);
|
||||
void RenderBriefingText(int centreY, int brightness);
|
||||
void CheckForKeysWithMultipleAssignments(void);
|
||||
void HandleCheatModeFeatures(void);
|
||||
void ShowMenuFrameRate(void);
|
||||
|
|
|
@ -351,4 +351,6 @@ int AvP_InGameMenus(void);
|
|||
|
||||
int InGameMenusAreRunning(void);
|
||||
|
||||
void RenderBriefingText(int centreY, int brightness);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -15,9 +15,6 @@
|
|||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Version settings *****************************************************/
|
||||
|
||||
/* Constants ***********************************************************/
|
||||
|
@ -84,11 +81,17 @@
|
|||
// not allowed to be NULL
|
||||
};
|
||||
#endif // UseGadgets
|
||||
#endif
|
||||
|
||||
/* Exported globals *****************************************************/
|
||||
|
||||
/* Function prototypes **************************************************/
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Function prototypes **************************************************/
|
||||
void BringDownConsoleWithSayTypedIn();
|
||||
void BringDownConsoleWithSaySpeciesTypedIn();
|
||||
|
||||
|
||||
/* End of the header ****************************************************/
|
||||
|
|
|
@ -12,8 +12,6 @@
|
|||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Version settings *****************************************************/
|
||||
|
||||
|
@ -135,8 +133,6 @@
|
|||
/* End of the header ****************************************************/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1006,6 +1006,7 @@ extern void CheckStateOfObservedPlayer();
|
|||
void MinimalNetCollectMessages(void);
|
||||
void InitAVPNetGameForHost(int species, int gamestyle, int level);
|
||||
void InitAVPNetGameForJoin(void);
|
||||
void CreatePlayersImageInMirror(void);
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
extern "C"
|
||||
{
|
||||
#include "language.h"
|
||||
#include "avp_menus.h"
|
||||
extern SCREENDESCRIPTORBLOCK ScreenDescriptorBlock;
|
||||
//extern LPDIRECTDRAWSURFACE lpDDSBack; // DirectDraw back surface
|
||||
extern int DebouncedGotAnyKey;
|
||||
|
@ -25,7 +26,6 @@ extern void ThisFramesRenderingHasFinished(void);
|
|||
|
||||
extern int AAFontImageNumber;
|
||||
extern int FadingGameInAfterLoading;
|
||||
extern void RenderBriefingText(int centreY, int brightness);
|
||||
|
||||
extern void InGameFlipBuffers();
|
||||
|
||||
|
|
|
@ -22,10 +22,12 @@
|
|||
#include "usr_io.h"
|
||||
#include "hud_map.h"
|
||||
#include "hud.h"
|
||||
#include "messagehistory.h"
|
||||
|
||||
#include "iofocus.h"
|
||||
|
||||
#include "paintball.h"
|
||||
#include "ahudgadg.hpp"
|
||||
#include "avp_menus.h"
|
||||
|
||||
extern int InGameMenusAreRunning(void);
|
||||
|
@ -85,18 +87,18 @@ PLAYER_INPUT_CONFIGURATION DefaultMarineInputPrimaryConfig =
|
|||
KEY_LMOUSE, // FirePrimaryWeapon;
|
||||
KEY_RMOUSE, // FireSecondaryWeapon;
|
||||
|
||||
KEY_RBRACKET, // NextWeapon;
|
||||
KEY_LBRACKET, // PreviousWeapon;
|
||||
KEY_BACKSPACE, // FlashbackWeapon;
|
||||
{KEY_RBRACKET}, // NextWeapon;
|
||||
{KEY_LBRACKET}, // PreviousWeapon;
|
||||
{KEY_BACKSPACE}, // FlashbackWeapon;
|
||||
|
||||
KEY_SLASH, // ImageIntensifier;
|
||||
KEY_FSTOP, // ThrowFlare;
|
||||
KEY_APOSTROPHE, // Jetpack;
|
||||
KEY_SEMICOLON, // Taunt
|
||||
KEY_F1,
|
||||
KEY_F11,
|
||||
KEY_F12,
|
||||
KEY_TAB,
|
||||
{KEY_SLASH}, // ImageIntensifier;
|
||||
{KEY_FSTOP}, // ThrowFlare;
|
||||
{KEY_APOSTROPHE}, // Jetpack;
|
||||
{KEY_SEMICOLON}, // Taunt
|
||||
{KEY_F1},
|
||||
{KEY_F11},
|
||||
{KEY_F12},
|
||||
{KEY_TAB}
|
||||
};
|
||||
PLAYER_INPUT_CONFIGURATION DefaultPredatorInputPrimaryConfig =
|
||||
{
|
||||
|
@ -122,21 +124,21 @@ PLAYER_INPUT_CONFIGURATION DefaultPredatorInputPrimaryConfig =
|
|||
KEY_LMOUSE, // FirePrimaryWeapon;
|
||||
KEY_RMOUSE, // FireSecondaryWeapon;
|
||||
|
||||
KEY_RBRACKET, // NextWeapon;
|
||||
KEY_LBRACKET, // PreviousWeapon;
|
||||
KEY_BACKSPACE, // FlashbackWeapon;
|
||||
{KEY_RBRACKET}, // NextWeapon;
|
||||
{KEY_LBRACKET}, // PreviousWeapon;
|
||||
{KEY_BACKSPACE}, // FlashbackWeapon;
|
||||
|
||||
KEY_FSTOP, // Cloak;
|
||||
KEY_SLASH, // CycleVisionMode;
|
||||
KEY_PAGEUP, // ZoomIn;
|
||||
KEY_PAGEDOWN, // ZoomOut;
|
||||
KEY_APOSTROPHE, // GrapplingHook
|
||||
KEY_COMMA, // RecallDisk
|
||||
KEY_SEMICOLON, // Taunt
|
||||
KEY_F1,
|
||||
KEY_F11,
|
||||
KEY_F12,
|
||||
KEY_TAB,
|
||||
{KEY_FSTOP}, // Cloak;
|
||||
{KEY_SLASH}, // CycleVisionMode;
|
||||
{KEY_PAGEUP}, // ZoomIn;
|
||||
{KEY_PAGEDOWN}, // ZoomOut;
|
||||
{KEY_APOSTROPHE}, // GrapplingHook
|
||||
{KEY_COMMA}, // RecallDisk
|
||||
{KEY_SEMICOLON}, // Taunt
|
||||
{KEY_F1},
|
||||
KEY_F11,
|
||||
KEY_F12,
|
||||
KEY_TAB
|
||||
};
|
||||
|
||||
PLAYER_INPUT_CONFIGURATION DefaultAlienInputPrimaryConfig =
|
||||
|
@ -163,12 +165,12 @@ PLAYER_INPUT_CONFIGURATION DefaultAlienInputPrimaryConfig =
|
|||
KEY_LMOUSE, // FirePrimaryWeapon;
|
||||
KEY_RMOUSE, // FireSecondaryWeapon;
|
||||
|
||||
KEY_SLASH, // AlternateVision;
|
||||
KEY_FSTOP, // Taunt;
|
||||
KEY_F1,
|
||||
KEY_F11,
|
||||
KEY_F12,
|
||||
KEY_TAB,
|
||||
{KEY_SLASH}, // AlternateVision;
|
||||
{KEY_FSTOP}, // Taunt;
|
||||
{KEY_F1},
|
||||
{KEY_F11},
|
||||
{KEY_F12},
|
||||
{KEY_TAB}
|
||||
};
|
||||
#elif 0 // Dutch
|
||||
PLAYER_INPUT_CONFIGURATION DefaultMarineInputPrimaryConfig =
|
||||
|
@ -635,19 +637,19 @@ PLAYER_INPUT_CONFIGURATION DefaultMarineInputSecondaryConfig =
|
|||
KEY_NUMPAD0, // FirePrimaryWeapon;
|
||||
KEY_NUMPADDEL, // FireSecondaryWeapon;
|
||||
|
||||
KEY_MOUSEWHEELUP, // NextWeapon;
|
||||
KEY_MOUSEWHEELDOWN, // PreviousWeapon;
|
||||
KEY_VOID, // FlashbackWeapon;
|
||||
{KEY_MOUSEWHEELUP}, // NextWeapon;
|
||||
{KEY_MOUSEWHEELDOWN}, // PreviousWeapon;
|
||||
{KEY_VOID}, // FlashbackWeapon;
|
||||
|
||||
KEY_VOID, // ImageIntensifier;
|
||||
KEY_VOID, // ThrowFlare;
|
||||
KEY_VOID, // Jetpack;
|
||||
KEY_VOID, // Taunt
|
||||
{KEY_VOID}, // ImageIntensifier;
|
||||
{KEY_VOID}, // ThrowFlare;
|
||||
{KEY_VOID}, // Jetpack;
|
||||
{KEY_VOID}, // Taunt
|
||||
|
||||
KEY_VOID,
|
||||
KEY_VOID,
|
||||
KEY_VOID,
|
||||
KEY_VOID,
|
||||
{KEY_VOID},
|
||||
{KEY_VOID},
|
||||
{KEY_VOID},
|
||||
{KEY_VOID}
|
||||
};
|
||||
|
||||
|
||||
|
@ -677,22 +679,22 @@ PLAYER_INPUT_CONFIGURATION DefaultPredatorInputSecondaryConfig =
|
|||
KEY_NUMPAD0, // FirePrimaryWeapon;
|
||||
KEY_NUMPADDEL, // FireSecondaryWeapon;
|
||||
|
||||
KEY_VOID, // NextWeapon;
|
||||
KEY_VOID, // PreviousWeapon;
|
||||
KEY_VOID, // FlashbackWeapon;
|
||||
{KEY_VOID}, // NextWeapon;
|
||||
{KEY_VOID}, // PreviousWeapon;
|
||||
{KEY_VOID}, // FlashbackWeapon;
|
||||
|
||||
KEY_VOID, // Cloak;
|
||||
KEY_VOID, // CycleVisionMode;
|
||||
KEY_MOUSEWHEELUP, // ZoomIn;
|
||||
KEY_MOUSEWHEELDOWN, // ZoomOut;
|
||||
KEY_VOID, // GrapplingHook;
|
||||
KEY_VOID, // RecallDisk
|
||||
KEY_VOID, // Taunt
|
||||
{KEY_VOID}, // Cloak;
|
||||
{KEY_VOID}, // CycleVisionMode;
|
||||
{KEY_MOUSEWHEELUP}, // ZoomIn;
|
||||
{KEY_MOUSEWHEELDOWN}, // ZoomOut;
|
||||
{KEY_VOID}, // GrapplingHook;
|
||||
{KEY_VOID}, // RecallDisk
|
||||
{KEY_VOID}, // Taunt
|
||||
|
||||
KEY_VOID,
|
||||
KEY_VOID,
|
||||
KEY_VOID,
|
||||
KEY_VOID,
|
||||
{KEY_VOID},
|
||||
KEY_VOID,
|
||||
KEY_VOID,
|
||||
KEY_VOID
|
||||
|
||||
};
|
||||
|
||||
|
@ -720,12 +722,12 @@ PLAYER_INPUT_CONFIGURATION DefaultAlienInputSecondaryConfig =
|
|||
KEY_NUMPAD0, // FirePrimaryWeapon;
|
||||
KEY_NUMPADDEL, // FireSecondaryWeapon;
|
||||
|
||||
KEY_VOID, // AlternateVision;
|
||||
KEY_VOID, // Taunt;
|
||||
KEY_VOID,
|
||||
KEY_VOID,
|
||||
KEY_VOID,
|
||||
KEY_VOID,
|
||||
{KEY_VOID}, // AlternateVision;
|
||||
{KEY_VOID}, // Taunt;
|
||||
{KEY_VOID},
|
||||
{KEY_VOID},
|
||||
{KEY_VOID},
|
||||
{KEY_VOID}
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -317,6 +317,7 @@ typedef struct
|
|||
|
||||
extern void LoadAKeyConfiguration(char* Filename);
|
||||
extern void SaveAKeyConfiguration(char* Filename);
|
||||
void LoadDefaultPrimaryConfigs(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
|
|
|
@ -395,6 +395,7 @@ void UpdateModules(void);
|
|||
void ModuleFunctions(MODULE *mptr, MFUNCTION mf);
|
||||
void AllocateModuleObject(MODULE *mptr);
|
||||
void DeallocateModuleObject(MODULE *mptr);
|
||||
void AllNewModuleHandler(void);
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define _kshape_h_ 1
|
||||
|
||||
#include "particle.h"
|
||||
#include "sphere.h"
|
||||
|
||||
|
||||
typedef struct
|
||||
|
@ -101,6 +102,14 @@ extern void CheckRenderStatesForModule(MODULE *modulePtr);
|
|||
|
||||
extern void RenderDecal(DECAL *decalPtr);
|
||||
extern void RenderParticle(PARTICLE *particlePtr);
|
||||
void RenderInsideAlienTongue(int offset);
|
||||
void RenderPredatorTargetingSegment(int theta, int scale, int drawInRed);
|
||||
void RenderPredatorPlasmaCasterCharge(int value, VECTORCH *worldOffsetPtr, MATRIXCH *orientationPtr);
|
||||
void CreateStarArray(void);
|
||||
void OutputTranslucentPolyList(void);
|
||||
void RenderLightFlare(VECTORCH *positionPtr, unsigned int colour);
|
||||
extern void RenderFlechetteParticle(PARTICLE *particlePtr);
|
||||
void RenderExplosionSurface(VOLUMETRIC_EXPLOSION *explosionPtr);
|
||||
|
||||
/* KJL 10:25:44 7/23/97 - this offset is used to push back the normal game gfx,
|
||||
so that the HUD can be drawn over the top without sinking into walls, etc. */
|
||||
|
|
|
@ -376,7 +376,7 @@ static void UnloadMenuFont()
|
|||
IntroFont_Light.info.ImagePtr = NULL;
|
||||
}
|
||||
|
||||
int LengthOfMenuText(char *textPtr)
|
||||
int LengthOfMenuText(const char *textPtr)
|
||||
{
|
||||
int width = 0;
|
||||
|
||||
|
@ -400,7 +400,7 @@ int LengthOfSmallMenuText(char *textPtr)
|
|||
return width;
|
||||
}
|
||||
|
||||
int RenderMenuText(char *textPtr, int sx, int sy, int alpha, enum AVPMENUFORMAT_ID format)
|
||||
int RenderMenuText(const char *textPtr, int sx, int sy, int alpha, enum AVPMENUFORMAT_ID format)
|
||||
{
|
||||
int width;
|
||||
|
||||
|
|
10
src/net.c
10
src/net.c
|
@ -35,14 +35,22 @@ void DpExtUnInit()
|
|||
|
||||
HRESULT DpExtRecv(int lpDP2A, void *lpidFrom, void *lpidTo, DWORD dwFlags, void *lplpData, LPDWORD lpdwDataSize)
|
||||
{
|
||||
/*
|
||||
fprintf(stderr, "DpExtRecv(%d, %p, %p, %d, %p, %p)\n", lpDP2A, lpidFrom, lpidTo, dwFlags, lplpData, lpdwDataSize);
|
||||
|
||||
*/
|
||||
return 1;
|
||||
}
|
||||
|
||||
HRESULT DpExtSend(int lpDP2A, DPID idFrom, DPID idTo, DWORD dwFlags, void *lpData, DWORD dwDataSize)
|
||||
{
|
||||
/*
|
||||
fprintf(stderr, "DpExtSend(%d, %d, %d, %d, %p, %d)\n", lpDP2A, idFrom, idTo, dwFlags, lpData, dwDataSize);
|
||||
*/
|
||||
FILE *fp = fopen("net.log", "ab");
|
||||
fprintf(fp, "\nDpExtSend(%d, %d, %d, %d, %p, %d) ", lpDP2A, idFrom, idTo, dwFlags, lpData, dwDataSize);
|
||||
fprintf(fp, "time = %d\n", timeGetTime());
|
||||
fwrite(lpData, dwDataSize, 1, fp);
|
||||
fclose(fp);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -8,5 +8,12 @@ void ThisFramesRenderingHasBegun();
|
|||
void ThisFramesRenderingHasFinished();
|
||||
void D3D_SkyPolygon_Output(POLYHEADER *inputPolyPtr, RENDERVERTEX *renderVerticesPtr);
|
||||
void D3D_DrawBackdrop();
|
||||
void D3D_FadeDownScreen(int brightness, int colour);
|
||||
void RenderString(char *stringPtr, int x, int y, int colour);
|
||||
void RenderStringCentred(char *stringPtr, int centreX, int y, int colour);
|
||||
void D3D_DecalSystem_Setup();
|
||||
void D3D_DecalSystem_End();
|
||||
void SecondFlushD3DZBuffer();
|
||||
void D3D_PlayerDamagedOverlay(int intensity);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -147,8 +147,8 @@ void Shape_Fragment_Type::Setup_sh_frags(Fragment_Type_Chunk* ftc)
|
|||
|
||||
sh_fragdesc->sh_fragsound=(SHAPEFRAGMENTSOUND*)PoolAllocateMem(sizeof(SHAPEFRAGMENTSOUND));
|
||||
sh_fragdesc->sh_fragsound->sound_loaded=GetSoundForMainRif (ftsoc->wav_name);
|
||||
sh_fragdesc->sh_fragsound->inner_range=ftsoc->inner_range*local_scale;
|
||||
sh_fragdesc->sh_fragsound->outer_range=ftsoc->outer_range*local_scale;
|
||||
sh_fragdesc->sh_fragsound->inner_range=(unsigned long)(ftsoc->inner_range*local_scale);
|
||||
sh_fragdesc->sh_fragsound->outer_range=(unsigned long)(ftsoc->outer_range*local_scale);
|
||||
sh_fragdesc->sh_fragsound->pitch=ftsoc->pitch;
|
||||
sh_fragdesc->sh_fragsound->max_volume=ftsoc->max_volume;
|
||||
|
||||
|
@ -922,9 +922,9 @@ CTM_ReturnType copy_to_mainshapelist(RIFFHANDLE h, Shape_Chunk * tmpshp, int fla
|
|||
|
||||
if (sflc)
|
||||
{
|
||||
mainshapelist[main_shape_num]->sh_fragdesc->sh_frags[fragpos].x_offset = sflc->frag_loc.x * local_scale;
|
||||
mainshapelist[main_shape_num]->sh_fragdesc->sh_frags[fragpos].y_offset = sflc->frag_loc.y * local_scale;
|
||||
mainshapelist[main_shape_num]->sh_fragdesc->sh_frags[fragpos].z_offset = sflc->frag_loc.z * local_scale;
|
||||
mainshapelist[main_shape_num]->sh_fragdesc->sh_frags[fragpos].x_offset = (int)(sflc->frag_loc.x * local_scale);
|
||||
mainshapelist[main_shape_num]->sh_fragdesc->sh_frags[fragpos].y_offset = (int)(sflc->frag_loc.y * local_scale);
|
||||
mainshapelist[main_shape_num]->sh_fragdesc->sh_frags[fragpos].z_offset = (int)(sflc->frag_loc.z * local_scale);
|
||||
|
||||
}
|
||||
else
|
||||
|
@ -945,8 +945,8 @@ CTM_ReturnType copy_to_mainshapelist(RIFFHANDLE h, Shape_Chunk * tmpshp, int fla
|
|||
{
|
||||
mainshapelist[main_shape_num]->sh_fragdesc->sh_fragsound=(SHAPEFRAGMENTSOUND*)PoolAllocateMem(sizeof(SHAPEFRAGMENTSOUND));
|
||||
mainshapelist[main_shape_num]->sh_fragdesc->sh_fragsound->sound_loaded=GetSoundForMainRif (ftsoc->wav_name);
|
||||
mainshapelist[main_shape_num]->sh_fragdesc->sh_fragsound->inner_range=ftsoc->inner_range*local_scale;
|
||||
mainshapelist[main_shape_num]->sh_fragdesc->sh_fragsound->outer_range=ftsoc->outer_range*local_scale;
|
||||
mainshapelist[main_shape_num]->sh_fragdesc->sh_fragsound->inner_range=(unsigned long)(ftsoc->inner_range*local_scale);
|
||||
mainshapelist[main_shape_num]->sh_fragdesc->sh_fragsound->outer_range=(unsigned long)(ftsoc->outer_range*local_scale);
|
||||
mainshapelist[main_shape_num]->sh_fragdesc->sh_fragsound->pitch=ftsoc->pitch;
|
||||
mainshapelist[main_shape_num]->sh_fragdesc->sh_fragsound->max_volume=ftsoc->max_volume;
|
||||
}
|
||||
|
@ -2176,7 +2176,7 @@ void SetupAnimatingShape(Shape_Chunk* sc,SHAPEHEADER* shp, Shape_Merge_Data_Chun
|
|||
int x=max(-sas->min_x,sas->max_x);
|
||||
int y=max(-sas->min_y,sas->max_y);
|
||||
int z=max(-sas->min_z,sas->max_z);
|
||||
sas->radius=sqrt(x*x+y*y+z*z);
|
||||
sas->radius=(int)sqrt(x*x+y*y+z*z);
|
||||
|
||||
|
||||
sas->vertex_normals=(int*)PoolAllocateMem(sizeof(VECTORCH)*cas->num_verts);
|
||||
|
@ -2327,9 +2327,9 @@ BOOL copy_to_shapeheader (
|
|||
object_float.z=(double)object->location.z;
|
||||
|
||||
VECTORCH object_int;
|
||||
object_int.vx=object_float.x*local_scale;
|
||||
object_int.vy=object_float.y*local_scale;
|
||||
object_int.vz=object_float.z*local_scale;
|
||||
object_int.vx=(int)(object_float.x*local_scale);
|
||||
object_int.vy=(int)(object_float.y*local_scale);
|
||||
object_int.vz=(int)(object_float.z*local_scale);
|
||||
|
||||
for (i=0; i<shphd->numpoints; i++) {
|
||||
tptr[i*3] = (int) ((cshp_ptr->v_list[i].x+object_float.x)*local_scale);
|
||||
|
@ -2653,18 +2653,18 @@ BOOL copy_sprite_to_shapeheader (RIFFHANDLE h, SHAPEHEADER *& shphd,Sprite_Heade
|
|||
|
||||
if(sec)
|
||||
{
|
||||
shphd->shapemaxx =sec->maxx*GlobalScale;
|
||||
shphd->shapeminx =sec->minx*GlobalScale;
|
||||
shphd->shapemaxy =sec->maxy*GlobalScale;
|
||||
shphd->shapeminy =sec->miny*GlobalScale;
|
||||
shphd->shapemaxx =(int)(sec->maxx*GlobalScale);
|
||||
shphd->shapeminx =(int)(sec->minx*GlobalScale);
|
||||
shphd->shapemaxy =(int)(sec->maxy*GlobalScale);
|
||||
shphd->shapeminy =(int)(sec->miny*GlobalScale);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
shphd->shapemaxx =ssc->maxx*GlobalScale;
|
||||
shphd->shapeminx =-ssc->maxx*GlobalScale;
|
||||
shphd->shapemaxy =ssc->maxy*GlobalScale;
|
||||
shphd->shapeminy =-ssc->maxy*GlobalScale;
|
||||
shphd->shapemaxx =(int)(ssc->maxx*GlobalScale);
|
||||
shphd->shapeminx =(int)(-ssc->maxx*GlobalScale);
|
||||
shphd->shapemaxy =(int)(ssc->maxy*GlobalScale);
|
||||
shphd->shapeminy =(int)(-ssc->maxy*GlobalScale);
|
||||
}
|
||||
shphd->shapemaxz =501*GlobalScale;
|
||||
shphd->shapeminz =-501*GlobalScale;
|
||||
|
@ -2876,10 +2876,10 @@ BOOL copy_sprite_to_shapeheader (RIFFHANDLE h, SHAPEHEADER *& shphd,Sprite_Heade
|
|||
tf->txf_uvdata[pos2][l*2+1]=ProcessUVCoord(h,UVC_SPRITE_V,f->UVCoords[3-l][1]<<16,BmpConv[f->Texture]);
|
||||
|
||||
|
||||
tf->txf_uvdata[pos][l*2+8]=-(f->UVCoords[3-l][0]-f->CentreX)*bmpscale*GlobalScale;
|
||||
tf->txf_uvdata[pos][l*2+9]=(f->UVCoords[3-l][1]-f->CentreY)*bmpscale*GlobalScale;
|
||||
tf->txf_uvdata[pos2][l*2+8]=-(f->UVCoords[3-l][0]-f->CentreX)*bmpscale*GlobalScale;
|
||||
tf->txf_uvdata[pos2][l*2+9]=(f->UVCoords[3-l][1]-f->CentreY)*bmpscale*GlobalScale;
|
||||
tf->txf_uvdata[pos][l*2+8]=(int)(-(f->UVCoords[3-l][0]-f->CentreX)*bmpscale*GlobalScale);
|
||||
tf->txf_uvdata[pos][l*2+9]=(int)((f->UVCoords[3-l][1]-f->CentreY)*bmpscale*GlobalScale);
|
||||
tf->txf_uvdata[pos2][l*2+8]=(int)(-(f->UVCoords[3-l][0]-f->CentreX)*bmpscale*GlobalScale);
|
||||
tf->txf_uvdata[pos2][l*2+9]=(int)((f->UVCoords[3-l][1]-f->CentreY)*bmpscale*GlobalScale);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -2893,10 +2893,10 @@ BOOL copy_sprite_to_shapeheader (RIFFHANDLE h, SHAPEHEADER *& shphd,Sprite_Heade
|
|||
tf->txf_uvdata[pos2][l*2+1]=ProcessUVCoord(h,UVC_SPRITE_V,f->UVCoords[l][1]<<16,BmpConv[f->Texture]);
|
||||
|
||||
|
||||
tf->txf_uvdata[pos][l*2+8]=(f->UVCoords[l][0]-f->CentreX)*bmpscale*GlobalScale;
|
||||
tf->txf_uvdata[pos][l*2+9]=(f->UVCoords[l][1]-f->CentreY)*bmpscale*GlobalScale;
|
||||
tf->txf_uvdata[pos2][l*2+8]=(f->UVCoords[l][0]-f->CentreX)*bmpscale*GlobalScale;
|
||||
tf->txf_uvdata[pos2][l*2+9]=(f->UVCoords[l][1]-f->CentreY)*bmpscale*GlobalScale;
|
||||
tf->txf_uvdata[pos][l*2+8]=(int)((f->UVCoords[l][0]-f->CentreX)*bmpscale*GlobalScale);
|
||||
tf->txf_uvdata[pos][l*2+9]=(int)((f->UVCoords[l][1]-f->CentreY)*bmpscale*GlobalScale);
|
||||
tf->txf_uvdata[pos2][l*2+8]=(int)((f->UVCoords[l][0]-f->CentreX)*bmpscale*GlobalScale);
|
||||
tf->txf_uvdata[pos2][l*2+9]=(int)((f->UVCoords[l][1]-f->CentreY)*bmpscale*GlobalScale);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -2975,10 +2975,10 @@ BOOL copy_to_map6(Object_Chunk * ob,MAPBLOCK6* mapblock, int shplst_pos)
|
|||
|
||||
QUAT q;
|
||||
|
||||
q.quatx = -ob->object_data.orientation.x*ONE_FIXED;
|
||||
q.quaty = -ob->object_data.orientation.y*ONE_FIXED;
|
||||
q.quatz = -ob->object_data.orientation.z*ONE_FIXED;
|
||||
q.quatw = ob->object_data.orientation.w*ONE_FIXED;
|
||||
q.quatx = (int)(-ob->object_data.orientation.x*ONE_FIXED);
|
||||
q.quaty = (int)(-ob->object_data.orientation.y*ONE_FIXED);
|
||||
q.quatz = (int)(-ob->object_data.orientation.z*ONE_FIXED);
|
||||
q.quatw = (int)(ob->object_data.orientation.w*ONE_FIXED);
|
||||
|
||||
MATRIXCH m;
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ typedef struct shapeanimationheader
|
|||
|
||||
// Private variables
|
||||
|
||||
unsigned long num_sequences;
|
||||
int num_sequences;
|
||||
|
||||
SHAPEANIMATIONSEQUENCE * anim_sequences;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue