Removed most references to PSX, Saturn and E3 Demo.
This commit is contained in:
parent
332acfbf8b
commit
361c131932
35 changed files with 47 additions and 1362 deletions
2
Makefile
2
Makefile
|
@ -14,7 +14,7 @@ CXXFLAGS = $(CFLAGS)
|
||||||
LDLIBS = -m32 $(shell sdl-config --libs) $(shell openal-config --libs)
|
LDLIBS = -m32 $(shell sdl-config --libs) $(shell openal-config --libs)
|
||||||
|
|
||||||
ROOT = main.c files.c winapi.c stubs.c version.c mathline.c opengl.c oglfunc.c openal.c cdplayer.c menus.c net.c frustum.c kshape.c map.c maths.c md5.c mem3dc.c mem3dcpp.cpp module.c morph.c object.c shpanim.c sphere.c tables.c vdb.c
|
ROOT = main.c files.c winapi.c stubs.c version.c mathline.c opengl.c oglfunc.c openal.c cdplayer.c menus.c net.c frustum.c kshape.c map.c maths.c md5.c mem3dc.c mem3dcpp.cpp module.c morph.c object.c shpanim.c sphere.c tables.c vdb.c
|
||||||
AVP = ai_sight.c avpview.c bh_agun.c bh_ais.c bh_alien.c bh_binsw.c bh_cable.c bh_corpse.c bh_deathvol.c bh_debri.c bh_dummy.c bh_fan.c bh_far.c bh_fhug.c bh_gener.c bh_ldoor.c bh_lift.c bh_light.c bh_lnksw.c bh_ltfx.c bh_marin.c bh_mission.c bh_near.c bh_pargen.c bh_plachier.c bh_plift.c bh_pred.c bh_queen.c bh_rubberduck.c bh_selfdest.c bh_snds.c bh_spcl.c bh_swdor.c bh_track.c bh_types.c bh_videoscreen.c bh_waypt.c bh_weap.c bh_xeno.c bonusabilities.c cconvars.cpp cdtrackselection.cpp cheatmodes.c comp_map.c comp_shp.c consolelog.cpp davehook.cpp deaths.c decal.c detaillevels.c dynamics.c dynblock.c equipmnt.c equiputl.cpp extents.c game.c game_statistics.c gamecmds.cpp gamevars.cpp hmodel.c hud.c inventry.c language.c lighting.c load_shp.c los.c maps.c mempool.c messagehistory.c missions.cpp movement.c paintball.c particle.c pfarlocs.c pheromon.c player.c pmove.c psnd.c psndproj.c pvisible.c savegame.c scream.cpp secstats.c sfx.c stratdef.c targeting.c track.c triggers.c weapons.c
|
AVP = ai_sight.c avpview.c bh_agun.c bh_ais.c bh_alien.c bh_binsw.c bh_cable.c bh_corpse.c bh_deathvol.c bh_debri.c bh_dummy.c bh_fan.c bh_far.c bh_fhug.c bh_gener.c bh_ldoor.c bh_lift.c bh_light.c bh_lnksw.c bh_ltfx.c bh_marin.c bh_mission.c bh_near.c bh_pargen.c bh_plachier.c bh_plift.c bh_pred.c bh_queen.c bh_rubberduck.c bh_selfdest.c bh_snds.c bh_spcl.c bh_swdor.c bh_track.c bh_types.c bh_videoscreen.c bh_waypt.c bh_weap.c bh_xeno.c bonusabilities.c cconvars.cpp cdtrackselection.cpp cheatmodes.c comp_map.c comp_shp.c consolelog.cpp davehook.cpp deaths.c decal.c detaillevels.c dynamics.c dynblock.c equipmnt.c equiputl.cpp extents.c game.c game_statistics.c gamecmds.cpp gamevars.cpp hmodel.c hud.c inventry.c language.c lighting.c load_shp.c los.c mempool.c messagehistory.c missions.cpp movement.c paintball.c particle.c pfarlocs.c pheromon.c player.c pmove.c psnd.c psndproj.c pvisible.c savegame.c scream.cpp secstats.c sfx.c stratdef.c targeting.c track.c triggers.c weapons.c
|
||||||
SHAPES = cube.c
|
SHAPES = cube.c
|
||||||
SUPPORT = consbind.cpp consbtch.cpp coordstr.cpp daemon.cpp indexfnt.cpp r2base.cpp r2pos666.cpp reflist.cpp refobj.cpp rentrntq.cpp scstring.cpp strtab.cpp strutil.c trig666.cpp wrapstr.cpp
|
SUPPORT = consbind.cpp consbtch.cpp coordstr.cpp daemon.cpp indexfnt.cpp r2base.cpp r2pos666.cpp reflist.cpp refobj.cpp rentrntq.cpp scstring.cpp strtab.cpp strutil.c trig666.cpp wrapstr.cpp
|
||||||
AVPWIN95 = avpchunk.cpp cheat.c chtcodes.cpp d3d_hud.cpp ddplat.cpp endianio.c ffread.cpp ffstdio.cpp gammacontrol.cpp hierplace.cpp iofocus.cpp jsndsup.cpp kzsort.c langplat.c modcmds.cpp npcsetup.cpp objsetup.cpp pathchnk.cpp platsup.c pldghost.c pldnet.c progress_bar.cpp projload.cpp scrshot.cpp strachnk.cpp system.c usr_io.c vision.c
|
AVPWIN95 = avpchunk.cpp cheat.c chtcodes.cpp d3d_hud.cpp ddplat.cpp endianio.c ffread.cpp ffstdio.cpp gammacontrol.cpp hierplace.cpp iofocus.cpp jsndsup.cpp kzsort.c langplat.c modcmds.cpp npcsetup.cpp objsetup.cpp pathchnk.cpp platsup.c pldghost.c pldnet.c progress_bar.cpp projload.cpp scrshot.cpp strachnk.cpp system.c usr_io.c vision.c
|
||||||
|
|
|
@ -968,8 +968,7 @@ int NPCOrientateToVector(STRATEGYBLOCK *sbPtr, VECTORCH *zAxisVector,int turnspe
|
||||||
mat.mat33 = cos;
|
mat.mat33 = cos;
|
||||||
|
|
||||||
// NOTE : It seems like OrientMat is not being set per frame which
|
// NOTE : It seems like OrientMat is not being set per frame which
|
||||||
// leads to inaccuracy build-up from the matrix multiplies. When this
|
// leads to inaccuracy build-up from the matrix multiplies.
|
||||||
// is fixed, the following PSXAccurateMatrixMultiply can be removed
|
|
||||||
|
|
||||||
if (offset) {
|
if (offset) {
|
||||||
VECTORCH new_offset,delta_offset;
|
VECTORCH new_offset,delta_offset;
|
||||||
|
@ -1000,11 +999,7 @@ int NPCOrientateToVector(STRATEGYBLOCK *sbPtr, VECTORCH *zAxisVector,int turnspe
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PSX
|
|
||||||
PSXAccurateMatrixMultiply(&sbPtr->DynPtr->OrientMat,&mat,&sbPtr->DynPtr->OrientMat);
|
|
||||||
#else
|
|
||||||
MatrixMultiply(&sbPtr->DynPtr->OrientMat,&mat,&sbPtr->DynPtr->OrientMat);
|
MatrixMultiply(&sbPtr->DynPtr->OrientMat,&mat,&sbPtr->DynPtr->OrientMat);
|
||||||
#endif
|
|
||||||
MatrixToEuler(&sbPtr->DynPtr->OrientMat, &sbPtr->DynPtr->OrientEuler);
|
MatrixToEuler(&sbPtr->DynPtr->OrientMat, &sbPtr->DynPtr->OrientEuler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1415,9 +1410,7 @@ void NPCGetMovementDirection(STRATEGYBLOCK *sbPtr, VECTORCH *velocityDirection,
|
||||||
(GMD_myPolyPoints[point1].vy == GMD_myPolyPoints[point2].vy) &&
|
(GMD_myPolyPoints[point1].vy == GMD_myPolyPoints[point2].vy) &&
|
||||||
(GMD_myPolyPoints[point1].vz == GMD_myPolyPoints[point2].vz))
|
(GMD_myPolyPoints[point1].vz == GMD_myPolyPoints[point2].vz))
|
||||||
{
|
{
|
||||||
#if (!Saturn)
|
|
||||||
LOCALASSERT(1==0);
|
LOCALASSERT(1==0);
|
||||||
#endif
|
|
||||||
myPolyEdgeMoveDistances[i] = 0;
|
myPolyEdgeMoveDistances[i] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -180,11 +180,8 @@
|
||||||
#define WOUNDING_SPEED_EFFECTS 1
|
#define WOUNDING_SPEED_EFFECTS 1
|
||||||
|
|
||||||
#define ALIEN_STARTING_HEALTH (30)
|
#define ALIEN_STARTING_HEALTH (30)
|
||||||
#if PSX||Saturn
|
#define NO_OF_FRAGMENTS_FROM_DEAD_ALIEN (10)
|
||||||
#define NO_OF_FRAGMENTS_FROM_DEAD_ALIEN (5)
|
|
||||||
#else
|
|
||||||
#define NO_OF_FRAGMENTS_FROM_DEAD_ALIEN (10)
|
|
||||||
#endif
|
|
||||||
/* random time between 1.5 and 2 seconds,in fixed point, with granularity 1/32th second */
|
/* random time between 1.5 and 2 seconds,in fixed point, with granularity 1/32th second */
|
||||||
#if ULTRAVIOLENCE
|
#if ULTRAVIOLENCE
|
||||||
#define ALIEN_FAR_MOVE_TIME ((48+(FastRandom()&0xF))*(ONE_FIXED>>7))
|
#define ALIEN_FAR_MOVE_TIME ((48+(FastRandom()&0xF))*(ONE_FIXED>>7))
|
||||||
|
|
|
@ -192,9 +192,7 @@ void* BinarySwitchBehaveInit(void* bhdata, STRATEGYBLOCK* sbptr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !Saturn
|
|
||||||
// GLOBALASSERT(bs_bhv->bs_dtype != binswitch_no_display);
|
// GLOBALASSERT(bs_bhv->bs_dtype != binswitch_no_display);
|
||||||
#endif
|
|
||||||
|
|
||||||
// fill in the rest ourselves
|
// fill in the rest ourselves
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
#ifndef BH_DEBRI_H
|
||||||
|
#define BH_DEBRI_H
|
||||||
|
|
||||||
typedef struct OneShotAnimBehaviourType
|
typedef struct OneShotAnimBehaviourType
|
||||||
{
|
{
|
||||||
int counter;
|
int counter;
|
||||||
|
@ -37,12 +40,4 @@ extern void OneShotBehaveFun(STRATEGYBLOCK* sptr);
|
||||||
extern void OneShot_Anim_BehaveFun(STRATEGYBLOCK* sptr);
|
extern void OneShot_Anim_BehaveFun(STRATEGYBLOCK* sptr);
|
||||||
extern void MakeFragments (STRATEGYBLOCK *sbptr);
|
extern void MakeFragments (STRATEGYBLOCK *sbptr);
|
||||||
|
|
||||||
|
|
||||||
#define EXPLOSION_LIFETIME (ONE_FIXED/4)
|
|
||||||
#define EXPLOSION_ANIM_SPEED (ONE_FIXED*16)
|
|
||||||
#define EXPLOSION_LIGHTING_SCALE (ONE_FIXED*16/3)
|
|
||||||
#if PSX || Saturn
|
|
||||||
#define NO_OF_SPRITES_IN_BIG_EXPLOSION 5
|
|
||||||
#else
|
|
||||||
#define NO_OF_SPRITES_IN_BIG_EXPLOSION 10
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -191,7 +191,6 @@ void FarAlienBehaviour(STRATEGYBLOCK *sbPtr)
|
||||||
|
|
||||||
if(PointIsInModule(thisModule, &localCoords)==0)
|
if(PointIsInModule(thisModule, &localCoords)==0)
|
||||||
{
|
{
|
||||||
#if (!PSX)
|
|
||||||
textprint("FAR ALIEN MODULE CONTAINMENT FAILURE \n");
|
textprint("FAR ALIEN MODULE CONTAINMENT FAILURE \n");
|
||||||
|
|
||||||
LOGDXFMT(("Alien containment failure: %s alien is in %s, position is %d,%d,%d:\nModule extents are: %d:%d, %d:%d, %d:%d",
|
LOGDXFMT(("Alien containment failure: %s alien is in %s, position is %d,%d,%d:\nModule extents are: %d:%d, %d:%d, %d:%d",
|
||||||
|
@ -201,7 +200,6 @@ void FarAlienBehaviour(STRATEGYBLOCK *sbPtr)
|
||||||
thisModule->m_maxz,thisModule->m_minz));
|
thisModule->m_maxz,thisModule->m_minz));
|
||||||
|
|
||||||
LOCALASSERT(1==0);
|
LOCALASSERT(1==0);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -922,7 +920,6 @@ void LocateFarNPCInAIModule(STRATEGYBLOCK *sbPtr, AIMODULE *targetModule)
|
||||||
|
|
||||||
if(PointIsInModule(thisModule, &localCoords)==0)
|
if(PointIsInModule(thisModule, &localCoords)==0)
|
||||||
{
|
{
|
||||||
#if (!PSX)
|
|
||||||
textprint("FAR ALIEN MODULE CONTAINMENT FAILURE \n");
|
textprint("FAR ALIEN MODULE CONTAINMENT FAILURE \n");
|
||||||
|
|
||||||
LOGDXFMT(("Alien containment failure: alien is in %s, position is %d,%d,%d:\nModule extents are: %d:%d, %d:%d, %d:%d",
|
LOGDXFMT(("Alien containment failure: alien is in %s, position is %d,%d,%d:\nModule extents are: %d:%d, %d:%d, %d:%d",
|
||||||
|
@ -931,7 +928,6 @@ void LocateFarNPCInAIModule(STRATEGYBLOCK *sbPtr, AIMODULE *targetModule)
|
||||||
thisModule->m_maxz,thisModule->m_minz));
|
thisModule->m_maxz,thisModule->m_minz));
|
||||||
|
|
||||||
LOCALASSERT(1==0);
|
LOCALASSERT(1==0);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -45,15 +45,8 @@ extern AIMODULE *FarNPC_GetTargetAIModuleForMarineRespond(STRATEGYBLOCK *sbPtr);
|
||||||
extern void FarNpc_FlipAround(STRATEGYBLOCK *sbPtr);
|
extern void FarNpc_FlipAround(STRATEGYBLOCK *sbPtr);
|
||||||
|
|
||||||
/* this define to help stop aliens coagulating in the environment */
|
/* this define to help stop aliens coagulating in the environment */
|
||||||
#if SupportWindows95
|
#define MAX_GENERATORNPCSPERMODULE 5
|
||||||
#define MAX_GENERATORNPCSPERMODULE 5
|
#define MAX_VISIBLEGENERATORNPCS 8 //12
|
||||||
#define MAX_VISIBLEGENERATORNPCS 8 //12
|
|
||||||
#else
|
|
||||||
/* PSX & Saturn*/
|
|
||||||
#define MAX_GENERATORNPCSPERMODULE 5
|
|
||||||
#define MAX_VISIBLEGENERATORNPCS 6
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -304,32 +304,15 @@ void LiftBehaveFun(STRATEGYBLOCK* sbptr)
|
||||||
{
|
{
|
||||||
// if there is a dest, set the lift to go
|
// if there is a dest, set the lift to go
|
||||||
// close current stations
|
// close current stations
|
||||||
#if PC_E3DEMO
|
|
||||||
LIFT_STATION* dest_stn = lift_ctrl->lift_stations[lift_ctrl->dest_station];
|
|
||||||
#endif
|
|
||||||
|
|
||||||
lift_stn = lift_ctrl->lift_stations[lift_ctrl->curr_station];
|
lift_stn = lift_ctrl->lift_stations[lift_ctrl->curr_station];
|
||||||
|
|
||||||
#if PC_E3DEMO
|
lift_ctrl->prev_station = lift_ctrl->curr_station;
|
||||||
if(dest_stn->env != AvP.CurrentEnv)
|
if(lift_stn->lift_door)
|
||||||
{
|
{
|
||||||
// turn off inter env lifts
|
// no door - must be on another env
|
||||||
NewOnScreenMessage(GetTextString(TEXTSTRING_DB_ACCESSDENIED));
|
RequestState(lift_stn->lift_door, 0, 0);
|
||||||
RequestState(dest_stn->lift_floor_switch, 0, 0);
|
}
|
||||||
lift_ctrl->dest_station = -1;
|
lift_ctrl->state = I_ls_closing_door;
|
||||||
dest_stn->called = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
lift_ctrl->prev_station = lift_ctrl->curr_station;
|
|
||||||
if(lift_stn->lift_door)
|
|
||||||
{
|
|
||||||
// no door - must be on another env
|
|
||||||
RequestState(lift_stn->lift_door, 0, 0);
|
|
||||||
}
|
|
||||||
lift_ctrl->state = I_ls_closing_door;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -18,19 +18,6 @@
|
||||||
extern int NormalFrameTime;
|
extern int NormalFrameTime;
|
||||||
|
|
||||||
|
|
||||||
#if PSX
|
|
||||||
|
|
||||||
void * LightFXBehaveInit (void * bhdata, STRATEGYBLOCK* sbptr)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
void LightFXBehaveFun (STRATEGYBLOCK* sbptr)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
void * LightFXBehaveInit (void * bhdata, STRATEGYBLOCK* sbptr)
|
void * LightFXBehaveInit (void * bhdata, STRATEGYBLOCK* sbptr)
|
||||||
{
|
{
|
||||||
LIGHT_FX_BEHAV_BLOCK * lfxbb;
|
LIGHT_FX_BEHAV_BLOCK * lfxbb;
|
||||||
|
@ -641,4 +628,3 @@ void SaveStrategy_LightFx(STRATEGYBLOCK* sbPtr)
|
||||||
COPYELEMENT_SAVE(timer2)
|
COPYELEMENT_SAVE(timer2)
|
||||||
COPYELEMENT_SAVE(time_to_next_flicker_state)
|
COPYELEMENT_SAVE(time_to_next_flicker_state)
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
|
@ -3219,10 +3219,8 @@ void WanderMission_Control(STRATEGYBLOCK *sbPtr) {
|
||||||
|
|
||||||
if(PointIsInModule(thisModule, &localCoords)==0)
|
if(PointIsInModule(thisModule, &localCoords)==0)
|
||||||
{
|
{
|
||||||
#if (!PSX)
|
|
||||||
textprint("FAR MARINE MODULE CONTAINMENT FAILURE \n");
|
textprint("FAR MARINE MODULE CONTAINMENT FAILURE \n");
|
||||||
LOCALASSERT(1==0);
|
LOCALASSERT(1==0);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -3573,10 +3571,8 @@ void PathfinderMission_Control(STRATEGYBLOCK *sbPtr) {
|
||||||
|
|
||||||
if(PointIsInModule(thisModule, &localCoords)==0)
|
if(PointIsInModule(thisModule, &localCoords)==0)
|
||||||
{
|
{
|
||||||
#if (!PSX)
|
|
||||||
textprint("FAR MARINE MODULE CONTAINMENT FAILURE \n");
|
textprint("FAR MARINE MODULE CONTAINMENT FAILURE \n");
|
||||||
LOCALASSERT(1==0);
|
LOCALASSERT(1==0);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -3897,10 +3893,8 @@ void GuardMission_Control(STRATEGYBLOCK *sbPtr) {
|
||||||
|
|
||||||
if(PointIsInModule(thisModule, &localCoords)==0)
|
if(PointIsInModule(thisModule, &localCoords)==0)
|
||||||
{
|
{
|
||||||
#if (!PSX)
|
|
||||||
textprint("FAR MARINE MODULE CONTAINMENT FAILURE \n");
|
textprint("FAR MARINE MODULE CONTAINMENT FAILURE \n");
|
||||||
LOCALASSERT(1==0);
|
LOCALASSERT(1==0);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -4247,10 +4241,8 @@ void LocalGuardMission_Control(STRATEGYBLOCK *sbPtr) {
|
||||||
|
|
||||||
if(PointIsInModule(thisModule, &localCoords)==0)
|
if(PointIsInModule(thisModule, &localCoords)==0)
|
||||||
{
|
{
|
||||||
#if (!PSX)
|
|
||||||
textprint("FAR MARINE MODULE CONTAINMENT FAILURE \n");
|
textprint("FAR MARINE MODULE CONTAINMENT FAILURE \n");
|
||||||
LOCALASSERT(1==0);
|
LOCALASSERT(1==0);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -4544,10 +4536,8 @@ void LoiterMission_Control(STRATEGYBLOCK *sbPtr) {
|
||||||
|
|
||||||
if(PointIsInModule(thisModule, &localCoords)==0)
|
if(PointIsInModule(thisModule, &localCoords)==0)
|
||||||
{
|
{
|
||||||
#if (!PSX)
|
|
||||||
textprint("FAR MARINE MODULE CONTAINMENT FAILURE \n");
|
textprint("FAR MARINE MODULE CONTAINMENT FAILURE \n");
|
||||||
LOCALASSERT(1==0);
|
LOCALASSERT(1==0);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -13627,10 +13617,8 @@ void RunAroundOnFireMission_Control(STRATEGYBLOCK *sbPtr) {
|
||||||
|
|
||||||
if(PointIsInModule(thisModule, &localCoords)==0)
|
if(PointIsInModule(thisModule, &localCoords)==0)
|
||||||
{
|
{
|
||||||
#if (!PSX)
|
|
||||||
textprint("FAR MARINE MODULE CONTAINMENT FAILURE \n");
|
textprint("FAR MARINE MODULE CONTAINMENT FAILURE \n");
|
||||||
LOCALASSERT(1==0);
|
LOCALASSERT(1==0);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -246,10 +246,8 @@ void PAQBehaviour(STRATEGYBLOCK *sbPtr)
|
||||||
|
|
||||||
if(PointIsInModule(thisModule, &localCoords)==0)
|
if(PointIsInModule(thisModule, &localCoords)==0)
|
||||||
{
|
{
|
||||||
#if (!PSX)
|
|
||||||
textprint("PAQ MODULE CONTAINMENT FAILURE \n");
|
textprint("PAQ MODULE CONTAINMENT FAILURE \n");
|
||||||
LOCALASSERT(1==0);
|
LOCALASSERT(1==0);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1350,10 +1350,8 @@ void PredatorBehaviour(STRATEGYBLOCK *sbPtr)
|
||||||
|
|
||||||
if(PointIsInModule(thisModule, &localCoords)==0)
|
if(PointIsInModule(thisModule, &localCoords)==0)
|
||||||
{
|
{
|
||||||
#if (!PSX)
|
|
||||||
textprint("FAR PREDATOR MODULE CONTAINMENT FAILURE \n");
|
textprint("FAR PREDATOR MODULE CONTAINMENT FAILURE \n");
|
||||||
LOCALASSERT(1==0);
|
LOCALASSERT(1==0);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -395,14 +395,9 @@ void XenoMorphRoomBehaviour (STRATEGYBLOCK * sbptr)
|
||||||
|
|
||||||
pis->items = ms->items;
|
pis->items = ms->items;
|
||||||
pis->sh_textures = ms->sh_textures;
|
pis->sh_textures = ms->sh_textures;
|
||||||
#if PSX
|
|
||||||
#else
|
|
||||||
pis->sh_instruction[4].sh_instr_data = ms->sh_instruction[4].sh_instr_data;
|
pis->sh_instruction[4].sh_instr_data = ms->sh_instruction[4].sh_instr_data;
|
||||||
#endif
|
|
||||||
|
|
||||||
#if SupportWindows95
|
|
||||||
sbptr->SBdptr->ObTxAnimCtrlBlks = xmrd->tacb;
|
sbptr->SBdptr->ObTxAnimCtrlBlks = xmrd->tacb;
|
||||||
#endif
|
|
||||||
|
|
||||||
sbptr->SBdptr->ObShape = xmrd->ProbesInShape;
|
sbptr->SBdptr->ObShape = xmrd->ProbesInShape;
|
||||||
sbptr->SBdptr->ObShapeData = GetShapeData(xmrd->ProbesInShape);
|
sbptr->SBdptr->ObShapeData = GetShapeData(xmrd->ProbesInShape);
|
||||||
|
@ -499,10 +494,8 @@ void XenoMorphRoomBehaviour (STRATEGYBLOCK * sbptr)
|
||||||
pis->items = xmrd->pis_items_str;
|
pis->items = xmrd->pis_items_str;
|
||||||
pis->sh_textures = xmrd->pis_sht_str;
|
pis->sh_textures = xmrd->pis_sht_str;
|
||||||
|
|
||||||
#if PSX
|
|
||||||
#else
|
|
||||||
pis->sh_instruction[4].sh_instr_data = xmrd->pis_items_str;
|
pis->sh_instruction[4].sh_instr_data = xmrd->pis_items_str;
|
||||||
#endif
|
|
||||||
xmrd->XMR_State = XMRS_Idle;
|
xmrd->XMR_State = XMRS_Idle;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -61,13 +61,8 @@ typedef struct xeno_morph_room_data
|
||||||
|
|
||||||
int timer;
|
int timer;
|
||||||
|
|
||||||
#if PSX
|
|
||||||
struct polyheader ** pis_items_str;
|
|
||||||
struct psx_texture ** pis_sht_str;
|
|
||||||
#else
|
|
||||||
int ** pis_items_str;
|
int ** pis_items_str;
|
||||||
int ** pis_sht_str;
|
int ** pis_sht_str;
|
||||||
#endif
|
|
||||||
|
|
||||||
char doorID[SB_NAME_LENGTH];
|
char doorID[SB_NAME_LENGTH];
|
||||||
STRATEGYBLOCK* DoorToRoom;
|
STRATEGYBLOCK* DoorToRoom;
|
||||||
|
|
|
@ -507,11 +507,8 @@ MODULEMAPBLOCK TempModuleMap = \
|
||||||
0, /* VDB Definition */
|
0, /* VDB Definition */
|
||||||
0, /* Interior Type */
|
0, /* Interior Type */
|
||||||
|
|
||||||
#if Saturn
|
|
||||||
LightType_PerObject, /* MapLightType */
|
|
||||||
#else
|
|
||||||
LightType_PerVertex, /* MapLightType */
|
LightType_PerVertex, /* MapLightType */
|
||||||
#endif
|
|
||||||
{0,0,0}, /* MapOrigin */
|
{0,0,0}, /* MapOrigin */
|
||||||
0, /* MapSimShapes */
|
0, /* MapSimShapes */
|
||||||
0, /* MapViewType */
|
0, /* MapViewType */
|
||||||
|
|
|
@ -398,182 +398,3 @@ extern BOOL AreDamageProfilesEqual(DAMAGE_PROFILE* profile1,DAMAGE_PROFILE* prof
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*KJL*****************************************************************************************
|
|
||||||
* Roxby's old stuff follows. I'm keeping it here 'cos it's very useful as reference material *
|
|
||||||
*****************************************************************************************KJL*/
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
/*
|
|
||||||
Hmmm. Weapons need to be treated differnetly to Other Objects
|
|
||||||
Such as AMMO and Tools. They have things like Info Screen data
|
|
||||||
(Text and schematics) range, damage, weight, incumberance, DM
|
|
||||||
status, Jam status, reliabilty, Vulnerablity.
|
|
||||||
|
|
||||||
This contains the data sturcture and the weapons information
|
|
||||||
for the marine weapons - It may be extended to cover all
|
|
||||||
the predator weapons as well
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
The player can carry up to 100 kg.. Strong huh.
|
|
||||||
|
|
||||||
encumberance - a measure of how `encumbering' the weapon may
|
|
||||||
actually be. It is an abstrcted measure of how much it slows
|
|
||||||
the player down - It shouldnt effect the players fatigue - and
|
|
||||||
how difficult it is to change to another weapon.
|
|
||||||
|
|
||||||
To use a weapon it the players total `USING' encumberance has to
|
|
||||||
less than 50 in a normal corridor and less the 30 in an airduct
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/* Ammo
|
|
||||||
|
|
||||||
Ammo - this is where the weight is....
|
|
||||||
All this rounding... lets play
|
|
||||||
with integers only
|
|
||||||
|
|
||||||
These are only the initial specs, I imagine dramatic alterations.
|
|
||||||
Partic if we want to swap to weights to use shifts rather than divs
|
|
||||||
|
|
||||||
|
|
||||||
10 mm culw rounds (Ceramic - Ultra Light Weight) 0.05 Kg each. (1.5 oz!!)
|
|
||||||
20 mm culw rounds (Ceramic - Ultra Light Weight) 0.08 Kg each. (1.5 oz!!)
|
|
||||||
standard grenades 0.2 Kg each .
|
|
||||||
Heavy grenades 0.4 Kg each.
|
|
||||||
shotgun rounds 0.1 each
|
|
||||||
|
|
||||||
0 standard grenade 1 Kg
|
|
||||||
1 99x10 mm magizines of culw rounds. 5 Kg
|
|
||||||
2 500x10 mm magazines of culw rounds. 25 Kg
|
|
||||||
3 5xstandard grenades 1 Kg
|
|
||||||
4 5 Heavy grenades HE 2 Kg
|
|
||||||
5 5 Heavy grenades Napalm 2 Kg
|
|
||||||
6 5 HEavy grenades Canister 2 Kg
|
|
||||||
7 5 Heavy Grenades Cluster 2 Kg
|
|
||||||
8 5 Heavy Grenades WP 2 Kg
|
|
||||||
9 20x shotgun rounds 2 Kg
|
|
||||||
10 20 litres of fuel 18 Kg
|
|
||||||
11 500x20 mm magizines of culw rounds 40 Kg
|
|
||||||
12 Sonic Gun Power Packs 5 Kg
|
|
||||||
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
Weapons Information
|
|
||||||
|
|
||||||
Weight Kilos
|
|
||||||
Incumberance - Abstract use difficulty.
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define MAX_PLAYER_WEAPONS 10
|
|
||||||
#define MAX_AMMO_TYPES 20
|
|
||||||
|
|
||||||
typedef struct ammo_data{
|
|
||||||
unsigned char weight; /*in 10ths of KG*/
|
|
||||||
unsigned char num_magazines;
|
|
||||||
unsigned short magazine_size;
|
|
||||||
unsigned short spread_radius;
|
|
||||||
unsigned short damage;
|
|
||||||
unsigned char damage_flags;
|
|
||||||
unsigned char flight_flags;
|
|
||||||
} AMMO_DATA;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*damage flags*/
|
|
||||||
|
|
||||||
#define DAMAGE_POINT 0x01 /*point pixel damage*/
|
|
||||||
#define DAMAGE_SPREAD 0x02 /*Equal damage along radius*/
|
|
||||||
#define DAMAGE_TAPER 0x04 /*Decreasing damge on radius*/
|
|
||||||
#define DAMAGE_EXPLOSIVE1 0x08 /*explodes*/
|
|
||||||
#define DAMAGE_EXPLOSIVE2 0x10 /*big explodes*/
|
|
||||||
#define DAMAGE_DELAY 0x20 /*limpet*/
|
|
||||||
#define DAMAGE_FLAME 0x40 /*sets things on fire*/
|
|
||||||
|
|
||||||
|
|
||||||
/*Flight Flags*/
|
|
||||||
|
|
||||||
#define FLIGHT_HAND_GRENADE 0x01
|
|
||||||
#define FLIGHT_BULLET 0x02
|
|
||||||
#define FLIGHT_GRENADE_LNCH 0x04
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct weapon_ammo_attributes{
|
|
||||||
unsigned char ammotype;
|
|
||||||
unsigned char remaining_ammo;
|
|
||||||
unsigned char targeting_flags;
|
|
||||||
unsigned char rate_of_fire; /*frames Between rounds */
|
|
||||||
unsigned char magazine_reload_time; /*frames to reload magazine*/
|
|
||||||
unsigned short failure_risk; /*0 - 2**16*/
|
|
||||||
unsigned char failure_flags;
|
|
||||||
|
|
||||||
} WEAP_AMMO_ATTR;
|
|
||||||
|
|
||||||
/* WEapon data contains the data to maintain, draw weapons
|
|
||||||
generation of these objects comes via the entity*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
*schematic --- for the data retrival
|
|
||||||
*hudata - for drawing the HUD graphic . Note that this is PLATFORM dependent
|
|
||||||
*descriptive text --- to print up in the data retrival
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef struct weapon_data{
|
|
||||||
|
|
||||||
char weapon_flags;
|
|
||||||
char name[8]; /* can be made into something else if ness*/
|
|
||||||
/* YES the address of the platform spec data
|
|
||||||
structure*/
|
|
||||||
void *schematic; /* these contain the file name before the */
|
|
||||||
HUDGRAPHIC *huddata; /* graphic is loaded into here -- LPDDS*/
|
|
||||||
|
|
||||||
char *descriptivetext;
|
|
||||||
|
|
||||||
unsigned char weight; /*in 10ths of KG*/
|
|
||||||
unsigned char encumbrance; /*time it takes to swap the
|
|
||||||
weapon in pixels per sec*/
|
|
||||||
|
|
||||||
|
|
||||||
WEAP_AMMO_ATTR primary;
|
|
||||||
WEAP_AMMO_ATTR secondary;
|
|
||||||
|
|
||||||
#if Saturn
|
|
||||||
char* WDroxptr;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
} WEAPON_DATA;
|
|
||||||
|
|
||||||
|
|
||||||
/*weapon_flags */
|
|
||||||
|
|
||||||
/*targeting flags*/
|
|
||||||
|
|
||||||
#define TARGETING_MANUAL 0x01
|
|
||||||
#define TARGETING_XHAIR 0x02
|
|
||||||
#define TARGETING_SMART 0x04
|
|
||||||
#define TARGETING_XTOS 0x08 /*targeting depends on equip*/
|
|
||||||
#define TARGETING_FAF_TRACK 0x10 /*Fire and forget....!*/
|
|
||||||
#define TARGETING_THROWN 0x20
|
|
||||||
|
|
||||||
/* failure flags */
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -117,8 +117,7 @@ typedef enum environments
|
||||||
I_Mps4,
|
I_Mps4,
|
||||||
I_Surface,
|
I_Surface,
|
||||||
I_Entrance,
|
I_Entrance,
|
||||||
#if PSX || Saturn
|
|
||||||
#else
|
|
||||||
I_Dml1, // 25- Vertigo.rif for Al
|
I_Dml1, // 25- Vertigo.rif for Al
|
||||||
// #ifndef MPLAYER_DEMO
|
// #ifndef MPLAYER_DEMO
|
||||||
I_Dml2, // KJL 16:59:58 05/1/97 - fruitbat.rif for Al
|
I_Dml2, // KJL 16:59:58 05/1/97 - fruitbat.rif for Al
|
||||||
|
@ -131,7 +130,7 @@ typedef enum environments
|
||||||
I_Dml9, // KJL 16:59:58 05/19/97 - mu.rif for Jake
|
I_Dml9, // KJL 16:59:58 05/19/97 - mu.rif for Jake
|
||||||
I_Dml10, // KJL 16:59:58 05/19/97 - mu.rif for Jake
|
I_Dml10, // KJL 16:59:58 05/19/97 - mu.rif for Jake
|
||||||
// #endif
|
// #endif
|
||||||
#endif
|
|
||||||
I_Num_Environments // 34
|
I_Num_Environments // 34
|
||||||
|
|
||||||
}I_AVP_ENVIRONMENTS;
|
}I_AVP_ENVIRONMENTS;
|
||||||
|
@ -249,39 +248,6 @@ extern int Destroy_CurrentEnvironment();
|
||||||
extern void LoadGameFromFile();
|
extern void LoadGameFromFile();
|
||||||
extern void SaveGameToFile();
|
extern void SaveGameToFile();
|
||||||
extern void InitCharacter();
|
extern void InitCharacter();
|
||||||
/*************************************************************/
|
|
||||||
|
|
||||||
/* KJL 15:42:46 10/02/96 - Okay, I don't use HUDGRAPHIC on the PC anymore and I suggest
|
|
||||||
you don't use it on your platform either 'cos it's a mess. (Sorry Roxby, no offense...) */
|
|
||||||
|
|
||||||
/************ HUD GRAPHIC STUFF *********************/
|
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
void* data; /* just about anything you feel like points to the file name*/
|
|
||||||
char* filename;
|
|
||||||
int xdest, ydest; /*screen x y*/
|
|
||||||
int width, height; /*depth and height of dest incase of shrink*/
|
|
||||||
RECT_AVP *srcRect;
|
|
||||||
int hg_flags;
|
|
||||||
|
|
||||||
}HUDGRAPHIC;
|
|
||||||
|
|
||||||
/* where to put the grahic*/
|
|
||||||
|
|
||||||
#define HGflag_NotInVRAM 0x0000001 /*saturn only*/
|
|
||||||
#define HGflag_LoadIntoVDP2 0x0000002 /*saturn only*/
|
|
||||||
#define HGflag_LoadIntoVDP1 0x0000004 /*saturn only*/
|
|
||||||
|
|
||||||
/* how to get the graphic */
|
|
||||||
|
|
||||||
#define HGflag_AlwaysLoadOffDisk 0x00000200 /*cd or HD*/
|
|
||||||
#define HGflag_LoadedIntoMemory 0x00000400 /*loaded into memory*/
|
|
||||||
|
|
||||||
/* source directory for the graphic */
|
|
||||||
|
|
||||||
#define HGflag_MenuDir 0x00010000
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/********************************************************/
|
/********************************************************/
|
||||||
|
@ -304,9 +270,6 @@ extern int UsingDataBase;
|
||||||
|
|
||||||
#define NUM_CREDIT_SCREENS 2
|
#define NUM_CREDIT_SCREENS 2
|
||||||
|
|
||||||
extern HUDGRAPHIC Menu[];
|
|
||||||
extern HUDGRAPHIC CreditScreen[];
|
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
UNLIT,
|
UNLIT,
|
||||||
|
@ -337,6 +300,3 @@ extern volatile char StillFading;
|
||||||
#define GAMEDEF_INCLUDED
|
#define GAMEDEF_INCLUDED
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
131
src/avp/hud.c
131
src/avp/hud.c
|
@ -153,7 +153,6 @@ static void DisplayMarinesAmmo(void);
|
||||||
|
|
||||||
static void DoMotionTracker(void);
|
static void DoMotionTracker(void);
|
||||||
static int DoMotionTrackerBlips(void);
|
static int DoMotionTrackerBlips(void);
|
||||||
//static void UpdateMarineStatusValues(void);
|
|
||||||
|
|
||||||
static void HandleMarineWeapon(void);
|
static void HandleMarineWeapon(void);
|
||||||
static void AimGunSight(int aimingSpeed, TEMPLATE_WEAPON_DATA *twPtr);
|
static void AimGunSight(int aimingSpeed, TEMPLATE_WEAPON_DATA *twPtr);
|
||||||
|
@ -359,7 +358,7 @@ void MaintainHUD(void)
|
||||||
HandleMarineWeapon();
|
HandleMarineWeapon();
|
||||||
|
|
||||||
if (CurrentVisionMode==VISION_MODE_NORMAL) DoMotionTracker();
|
if (CurrentVisionMode==VISION_MODE_NORMAL) DoMotionTracker();
|
||||||
// UpdateMarineStatusValues();
|
|
||||||
CheckWireFrameMode(0);
|
CheckWireFrameMode(0);
|
||||||
//flash health if invulnerable
|
//flash health if invulnerable
|
||||||
if((playerStatusPtr->invulnerabilityTimer/12000 %2)==0)
|
if((playerStatusPtr->invulnerabilityTimer/12000 %2)==0)
|
||||||
|
@ -1039,135 +1038,7 @@ static void DisplayMarinesAmmo(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
static void UpdateMarineStatusValues(void)
|
|
||||||
{
|
|
||||||
PLAYER_WEAPON_DATA *weaponPtr;
|
|
||||||
|
|
||||||
/* access the extra data hanging off the strategy block */
|
|
||||||
PLAYER_STATUS *playerStatusPtr= (PLAYER_STATUS *) (Player->ObStrategyBlock->SBdataptr);
|
|
||||||
GLOBALASSERT(playerStatusPtr);
|
|
||||||
|
|
||||||
{
|
|
||||||
/* player's current weapon */
|
|
||||||
GLOBALASSERT(playerStatusPtr->SelectedWeaponSlot<MAX_NO_OF_WEAPON_SLOTS);
|
|
||||||
|
|
||||||
/* init a pointer to the weapon's data */
|
|
||||||
weaponPtr = &(playerStatusPtr->WeaponSlot[playerStatusPtr->SelectedWeaponSlot]);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
int value=playerStatusPtr->Health>>16; /* stored in 16.16 so shift down */
|
|
||||||
ValueOfHUDDigit[MARINE_HUD_HEALTH_UNITS]=value%10;
|
|
||||||
value/=10;
|
|
||||||
ValueOfHUDDigit[MARINE_HUD_HEALTH_TENS]=value%10;
|
|
||||||
value/=10;
|
|
||||||
ValueOfHUDDigit[MARINE_HUD_HEALTH_HUNDREDS]=value%10;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
#if PC_E3DEMO
|
|
||||||
int value=playerStatusPtr->Energy>>16; /* stored in 16.16 so shift down */
|
|
||||||
#else
|
|
||||||
extern int FrameRate;
|
|
||||||
int value=FrameRate;
|
|
||||||
#endif
|
|
||||||
ValueOfHUDDigit[MARINE_HUD_ENERGY_UNITS]=value%10;
|
|
||||||
value/=10;
|
|
||||||
ValueOfHUDDigit[MARINE_HUD_ENERGY_TENS]=value%10;
|
|
||||||
value/=10;
|
|
||||||
ValueOfHUDDigit[MARINE_HUD_ENERGY_HUNDREDS]=value%10;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
int value=playerStatusPtr->Armour>>16; /* stored in 16.16 so shift down */
|
|
||||||
ValueOfHUDDigit[MARINE_HUD_ARMOUR_UNITS]=value%10;
|
|
||||||
value/=10;
|
|
||||||
ValueOfHUDDigit[MARINE_HUD_ARMOUR_TENS]=value%10;
|
|
||||||
value/=10;
|
|
||||||
ValueOfHUDDigit[MARINE_HUD_ARMOUR_HUNDREDS]=value%10;
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
int value=weaponPtr->PrimaryRoundsRemaining>>16;
|
|
||||||
/* ammo is in 16.16. we want the integer part, rounded up */
|
|
||||||
if ( (weaponPtr->PrimaryRoundsRemaining&0xffff) ) value+=1;
|
|
||||||
|
|
||||||
ValueOfHUDDigit[MARINE_HUD_PRIMARY_AMMO_ROUNDS_UNITS]=value%10;
|
|
||||||
value/=10;
|
|
||||||
ValueOfHUDDigit[MARINE_HUD_PRIMARY_AMMO_ROUNDS_TENS]=value%10;
|
|
||||||
value/=10;
|
|
||||||
ValueOfHUDDigit[MARINE_HUD_PRIMARY_AMMO_ROUNDS_HUNDREDS]=value%10;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
int value=weaponPtr->PrimaryMagazinesRemaining;
|
|
||||||
ValueOfHUDDigit[MARINE_HUD_PRIMARY_AMMO_MAGAZINES_UNITS]=value%10;
|
|
||||||
value/=10;
|
|
||||||
ValueOfHUDDigit[MARINE_HUD_PRIMARY_AMMO_MAGAZINES_TENS]=value%10;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* KJL 14:54:39 03/26/97 - secondary ammo */
|
|
||||||
if ( (weaponPtr->WeaponIDNumber == WEAPON_PULSERIFLE)
|
|
||||||
||(weaponPtr->WeaponIDNumber == WEAPON_MYSTERYGUN) )
|
|
||||||
{
|
|
||||||
int value=weaponPtr->SecondaryRoundsRemaining>>16;
|
|
||||||
/* ammo is in 16.16. we want the integer part, rounded up */
|
|
||||||
if ( (weaponPtr->SecondaryRoundsRemaining&0xffff) ) value+=1;
|
|
||||||
|
|
||||||
ValueOfHUDDigit[MARINE_HUD_SECONDARY_AMMO_ROUNDS_UNITS]=value%10;
|
|
||||||
value/=10;
|
|
||||||
ValueOfHUDDigit[MARINE_HUD_SECONDARY_AMMO_ROUNDS_TENS]=value%10;
|
|
||||||
value/=10;
|
|
||||||
ValueOfHUDDigit[MARINE_HUD_SECONDARY_AMMO_ROUNDS_HUNDREDS]=value%10;
|
|
||||||
|
|
||||||
value=weaponPtr->SecondaryMagazinesRemaining;
|
|
||||||
ValueOfHUDDigit[MARINE_HUD_SECONDARY_AMMO_MAGAZINES_UNITS]=value%10;
|
|
||||||
value/=10;
|
|
||||||
ValueOfHUDDigit[MARINE_HUD_SECONDARY_AMMO_MAGAZINES_TENS]=value%10;
|
|
||||||
|
|
||||||
BLTMarineNumericsToHUD(MARINE_HUD_SECONDARY_AMMO_MAGAZINES_TENS);
|
|
||||||
}
|
|
||||||
else if (weaponPtr->WeaponIDNumber == WEAPON_GRENADELAUNCHER)
|
|
||||||
{
|
|
||||||
/* KJL 11:46:57 04/09/97 - use to display your ammo type */
|
|
||||||
int value;
|
|
||||||
switch(GrenadeLauncherData.SelectedAmmo)
|
|
||||||
{
|
|
||||||
case AMMO_GRENADE:
|
|
||||||
{
|
|
||||||
value=1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case AMMO_FLARE_GRENADE:
|
|
||||||
{
|
|
||||||
value=2;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case AMMO_FRAGMENTATION_GRENADE:
|
|
||||||
{
|
|
||||||
value=3;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case AMMO_PROXIMITY_GRENADE:
|
|
||||||
{
|
|
||||||
value=4;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
{
|
|
||||||
LOCALASSERT(0);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ValueOfHUDDigit[MARINE_HUD_SECONDARY_AMMO_ROUNDS_UNITS]=value;
|
|
||||||
BLTMarineNumericsToHUD(MARINE_HUD_SECONDARY_AMMO_ROUNDS_UNITS);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
BLTMarineNumericsToHUD(MARINE_HUD_PRIMARY_AMMO_MAGAZINES_TENS);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
static void HandleMarineWeapon(void)
|
static void HandleMarineWeapon(void)
|
||||||
{
|
{
|
||||||
PLAYER_WEAPON_DATA *weaponPtr;
|
PLAYER_WEAPON_DATA *weaponPtr;
|
||||||
|
|
|
@ -164,8 +164,7 @@ extern void PlatformSpecificInitAlienHUD(void);
|
||||||
******************REH*/
|
******************REH*/
|
||||||
extern void PlatformSpecificExitingHUD(void);
|
extern void PlatformSpecificExitingHUD(void);
|
||||||
/*KJL******************************************************************************************
|
/*KJL******************************************************************************************
|
||||||
* This is for the PSX (& possibly Saturn). Use this to pass your list of graphics to be drawn *
|
* Use this to pass your list of graphics to be drawn to your GPU. *
|
||||||
* to your GPU. *
|
|
||||||
******************************************************************************************KJL*/
|
******************************************************************************************KJL*/
|
||||||
|
|
||||||
extern void PlatformSpecificEnteringHUD(void);
|
extern void PlatformSpecificEnteringHUD(void);
|
||||||
|
|
|
@ -1,78 +0,0 @@
|
||||||
/*
|
|
||||||
this now contains only the map processing
|
|
||||||
functions for the PC and saturn - compiled in maos
|
|
||||||
have been moved to comp_map
|
|
||||||
*/
|
|
||||||
#include "3dc.h"
|
|
||||||
#include "module.h"
|
|
||||||
#include "inline.h"
|
|
||||||
|
|
||||||
#include "stratdef.h"
|
|
||||||
#include "gamedef.h"
|
|
||||||
|
|
||||||
#define UseLocalAssert Yes
|
|
||||||
|
|
||||||
#include "ourasert.h"
|
|
||||||
|
|
||||||
|
|
||||||
/************ GLOBALS **********/
|
|
||||||
|
|
||||||
|
|
||||||
DISPLAYBLOCK *Player;
|
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************/
|
|
||||||
|
|
||||||
/* MAP TYPE PROCESSING FUNCTIONS*/
|
|
||||||
|
|
||||||
/**************************************************************/
|
|
||||||
/*
|
|
||||||
The functions require a pointer to a display block. It uses "ObType"
|
|
||||||
in the block to select the function.
|
|
||||||
*/
|
|
||||||
|
|
||||||
static void Process_Default_MapType(DISPLAYBLOCK *dblockptr);
|
|
||||||
static void Process_Player_MapType(DISPLAYBLOCK *dblockptr);
|
|
||||||
static void Process_PlayerShipCamera_MapType(DISPLAYBLOCK *dblockptr);
|
|
||||||
static void Process_Sprite_MapType(DISPLAYBLOCK *dblockptr);
|
|
||||||
static void Process_Term_MapType(DISPLAYBLOCK *dblockptr);
|
|
||||||
|
|
||||||
|
|
||||||
void (*MapTypeFunctions[])(DISPLAYBLOCK *dblockptr) =
|
|
||||||
{
|
|
||||||
Process_Default_MapType,
|
|
||||||
Process_Player_MapType,
|
|
||||||
Process_PlayerShipCamera_MapType, /* Player ship camera */
|
|
||||||
Process_Sprite_MapType,
|
|
||||||
Process_Term_MapType
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
static void Process_Default_MapType(DISPLAYBLOCK *dptr)
|
|
||||||
{
|
|
||||||
dptr->ObLightType = LightType_PerVertex;
|
|
||||||
dptr->ObFlags |= ObFlag_MultLSrc;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void Process_Player_MapType(DISPLAYBLOCK *dptr)
|
|
||||||
{
|
|
||||||
Player = dptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void Process_PlayerShipCamera_MapType(DISPLAYBLOCK *dptr)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void Process_Sprite_MapType(DISPLAYBLOCK *dblockptr)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void Process_Term_MapType(DISPLAYBLOCK *dptr)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
|
@ -21,10 +21,6 @@
|
||||||
#define UseLocalAssert Yes
|
#define UseLocalAssert Yes
|
||||||
#include "ourasert.h"
|
#include "ourasert.h"
|
||||||
|
|
||||||
#if PSX
|
|
||||||
#include "psx_cdf.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* prototypes for this file */
|
/* prototypes for this file */
|
||||||
//static void BuildFM_EntryPoints(MODULE *thisModule);
|
//static void BuildFM_EntryPoints(MODULE *thisModule);
|
||||||
//static void BuildFM_ASingleEP(MODULE *thisModule, MODULE *targetModule);
|
//static void BuildFM_ASingleEP(MODULE *thisModule, MODULE *targetModule);
|
||||||
|
@ -41,13 +37,8 @@ extern int ModuleArraySize;
|
||||||
/* prototypes for external functions */
|
/* prototypes for external functions */
|
||||||
int SetupPolygonAccessFromShapeIndex(int shapeIndex);
|
int SetupPolygonAccessFromShapeIndex(int shapeIndex);
|
||||||
int SetupPointAccessFromShapeIndex(int shapeIndex);
|
int SetupPointAccessFromShapeIndex(int shapeIndex);
|
||||||
#if PSX
|
VECTORCH* AccessNextPoint(void);
|
||||||
SVECTOR* AccessNextPoint(void);
|
VECTORCH* AccessPointFromIndex(int index);
|
||||||
SVECTOR* AccessPointFromIndex(int index);
|
|
||||||
#else
|
|
||||||
VECTORCH* AccessNextPoint(void);
|
|
||||||
VECTORCH* AccessPointFromIndex(int index);
|
|
||||||
#endif
|
|
||||||
int *GetPolygonVertexIndices(void);
|
int *GetPolygonVertexIndices(void);
|
||||||
|
|
||||||
/* globals for this file */
|
/* globals for this file */
|
||||||
|
@ -166,12 +157,6 @@ void BuildFarModuleLocs(void)
|
||||||
LOCALASSERT(ThisModuleIndex >= 0);
|
LOCALASSERT(ThisModuleIndex >= 0);
|
||||||
LOCALASSERT(ThisModuleIndex < ModuleArraySize);
|
LOCALASSERT(ThisModuleIndex < ModuleArraySize);
|
||||||
|
|
||||||
#if PSX
|
|
||||||
#ifndef CDEMUL
|
|
||||||
pollhost();
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if logFarLocData
|
#if logFarLocData
|
||||||
fprintf(logfile, "********************************* \n");
|
fprintf(logfile, "********************************* \n");
|
||||||
fprintf(logfile, "Module Index: %d %s\n", ThisModuleIndex,thisModule->name);
|
fprintf(logfile, "Module Index: %d %s\n", ThisModuleIndex,thisModule->name);
|
||||||
|
@ -216,12 +201,6 @@ void BuildFarModuleLocs(void)
|
||||||
fprintf(logfile, "Module Z range: %d %d \n \n", thisModule->m_minz, thisModule->m_maxz);
|
fprintf(logfile, "Module Z range: %d %d \n \n", thisModule->m_minz, thisModule->m_maxz);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if PSX
|
|
||||||
#ifndef CDEMUL
|
|
||||||
pollhost();
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* check for entry points into this module if there aren't any,
|
/* check for entry points into this module if there aren't any,
|
||||||
don't bother with auxilary locations */
|
don't bother with auxilary locations */
|
||||||
|
|
||||||
|
@ -1008,13 +987,8 @@ static int GetModulePointBox(MODULE *thisModule, EPBBEXTENTS *extents)
|
||||||
pointCounter = SetupPointAccessFromShapeIndex(thisModule->m_mapptr->MapShape);
|
pointCounter = SetupPointAccessFromShapeIndex(thisModule->m_mapptr->MapShape);
|
||||||
while(pointCounter>0)
|
while(pointCounter>0)
|
||||||
{
|
{
|
||||||
#if PSX
|
VECTORCH* thisPt = AccessNextPoint();
|
||||||
SVECTOR* thisPt = AccessNextPoint();
|
VECTORCH thisWorldPoint;
|
||||||
VECTORCH thisWorldPoint;
|
|
||||||
#else
|
|
||||||
VECTORCH* thisPt = AccessNextPoint();
|
|
||||||
VECTORCH thisWorldPoint;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
thisWorldPoint.vx = thisPt->vx + thisModule->m_world.vx;
|
thisWorldPoint.vx = thisPt->vx + thisModule->m_world.vx;
|
||||||
thisWorldPoint.vy = thisPt->vy + thisModule->m_world.vy;
|
thisWorldPoint.vy = thisPt->vy + thisModule->m_world.vy;
|
||||||
|
@ -1279,10 +1253,6 @@ static void BuildFM_AuxilaryLocs(MODULE *thisModule)
|
||||||
the location iiiiis inside the shape): if there is no up &
|
the location iiiiis inside the shape): if there is no up &
|
||||||
down polygon, the location is invalidated, and an error code
|
down polygon, the location is invalidated, and an error code
|
||||||
returned (either no up poly, no down poly, no up-or-down poly)
|
returned (either no up poly, no down poly, no up-or-down poly)
|
||||||
|
|
||||||
NB PSX!!!: uses kevin's shape access functions in platsup.c
|
|
||||||
I have added a new short one for Win95 - PSX needs it's own
|
|
||||||
version.
|
|
||||||
----------------------------------------------------------------*/
|
----------------------------------------------------------------*/
|
||||||
static void GetFarLocHeight(FARVALIDATEDLOCATION *location, MODULE *thisModule)
|
static void GetFarLocHeight(FARVALIDATEDLOCATION *location, MODULE *thisModule)
|
||||||
{
|
{
|
||||||
|
|
|
@ -475,14 +475,14 @@ void DoObjectVisibility(STRATEGYBLOCK *sbPtr)
|
||||||
}
|
}
|
||||||
case(I_BehaviourPlatform):
|
case(I_BehaviourPlatform):
|
||||||
{
|
{
|
||||||
PLATFORMLIFT_BEHAVIOUR_BLOCK *platformliftdata = (PLATFORMLIFT_BEHAVIOUR_BLOCK *)sbPtr->SBdataptr;
|
PLATFORMLIFT_BEHAVIOUR_BLOCK *platformliftdata = (PLATFORMLIFT_BEHAVIOUR_BLOCK *)sbPtr->SBdataptr;
|
||||||
//don't make platform lift far if it is currently moving
|
//don't make platform lift far if it is currently moving
|
||||||
//(otherwise the lift won't be able to move)
|
//(otherwise the lift won't be able to move)
|
||||||
if(platformliftdata->state!=PLBS_GoingUp &&
|
if(platformliftdata->state!=PLBS_GoingUp &&
|
||||||
platformliftdata->state!=PLBS_GoingDown)
|
platformliftdata->state!=PLBS_GoingDown)
|
||||||
{
|
{
|
||||||
MakeObjectFar(sbPtr);
|
MakeObjectFar(sbPtr);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case(I_BehaviourBinarySwitch):
|
case(I_BehaviourBinarySwitch):
|
||||||
|
@ -539,11 +539,7 @@ void DoObjectVisibility(STRATEGYBLOCK *sbPtr)
|
||||||
}
|
}
|
||||||
case(I_BehaviourNetGhost):
|
case(I_BehaviourNetGhost):
|
||||||
{
|
{
|
||||||
#if PSX
|
MakeGhostFar(sbPtr);
|
||||||
GLOBALASSERT(1==2);
|
|
||||||
#else
|
|
||||||
MakeGhostFar(sbPtr);
|
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case(I_BehaviourTrackObject):
|
case(I_BehaviourTrackObject):
|
||||||
|
@ -1092,8 +1088,7 @@ void InitInanimateObject(void* bhdata, STRATEGYBLOCK *sbPtr)
|
||||||
/* set the default inanimate object dynamics template: Inanimate for single player,
|
/* set the default inanimate object dynamics template: Inanimate for single player,
|
||||||
and Static for multiplayer
|
and Static for multiplayer
|
||||||
NB some objects are always static, and initialised using
|
NB some objects are always static, and initialised using
|
||||||
the static dynamics template directly
|
the static dynamics template directly */
|
||||||
NB2 PSX: all objects are static */
|
|
||||||
#if SupportWindows95
|
#if SupportWindows95
|
||||||
// if(AvP.Network==I_No_Network) inanimateDynamicsInitialiser = DYNAMICS_TEMPLATE_INANIMATE;
|
// if(AvP.Network==I_No_Network) inanimateDynamicsInitialiser = DYNAMICS_TEMPLATE_INANIMATE;
|
||||||
// else inanimateDynamicsInitialiser = DYNAMICS_TEMPLATE_STATIC;
|
// else inanimateDynamicsInitialiser = DYNAMICS_TEMPLATE_STATIC;
|
||||||
|
|
|
@ -111,28 +111,8 @@ void OperateObjectInLineOfSight(void)
|
||||||
}
|
}
|
||||||
case I_BehaviourDatabase:
|
case I_BehaviourDatabase:
|
||||||
{
|
{
|
||||||
#if PC_E3DEMO||PSX_DEMO
|
|
||||||
/* KJL 10:56:39 05/28/97 - E3DEMO change */
|
|
||||||
/* KJL 10:55:44 05/28/97 - display 'Access Denied' message */
|
|
||||||
NewOnScreenMessage(GetTextString(TEXTSTRING_DB_ACCESSDENIED));
|
|
||||||
#else
|
|
||||||
AvP.GameMode = I_GM_Menus;
|
AvP.GameMode = I_GM_Menus;
|
||||||
|
AvP.DatabaseAccessNum=((DATABASE_BLOCK *)nearestObjectPtr->ObStrategyBlock->SBdataptr)->num;
|
||||||
#if PSX
|
|
||||||
{
|
|
||||||
extern int Global_Database_Num;
|
|
||||||
Global_Database_Num=((DATABASE_BLOCK *)nearestObjectPtr->ObStrategyBlock->SBdataptr)->num;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
AvP.DatabaseAccessNum=((DATABASE_BLOCK *)nearestObjectPtr->ObStrategyBlock->SBdataptr)->num;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* KJL 16:43:01 03/19/97 - CHANGE ME! Need to pass database number */
|
|
||||||
// RJHG - would be ((*DATABASEBLOCK)nearestObjectPtr->ObStrategyBlock->SBDataPtr)->num
|
|
||||||
// CDF - I think it would be ((DATABASE_BLOCK *)nearestObjectPtr->ObStrategyBlock->SBdataptr)->num
|
|
||||||
#endif
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -1131,83 +1131,6 @@ void RestoreAllDDGraphics(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ReleaseHUDGraphic(HUDGRAPHIC* hgptr)
|
|
||||||
{
|
|
||||||
GLOBALASSERT(hgptr);
|
|
||||||
GLOBALASSERT(hgptr->data);
|
|
||||||
ReleaseDDSurface((void*)(*(int*)hgptr->data));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
Windows externs. See win_func
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
void BLTGraphicToScreen(HUDGRAPHIC* hgptr)
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
sets up the drawing of general hud graphics. Bltted
|
|
||||||
to full screen if there is no width and heiht information in
|
|
||||||
the DD HUDGRAPHIC
|
|
||||||
*/
|
|
||||||
|
|
||||||
RECT destRect;
|
|
||||||
|
|
||||||
GLOBALASSERT(hgptr != NULL);
|
|
||||||
|
|
||||||
GLOBALASSERT(1 > 0);
|
|
||||||
|
|
||||||
// HRESULT ddrval;
|
|
||||||
|
|
||||||
LPDIRECTDRAWSURFACE wdds = *((LPDIRECTDRAWSURFACE*)hgptr->data);
|
|
||||||
|
|
||||||
GLOBALASSERT(hgptr->srcRect->top < hgptr->srcRect->bottom);
|
|
||||||
GLOBALASSERT(hgptr->srcRect->left < hgptr->srcRect->right);
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
textprint("%d TOP %d BOTTOM\n", hgptr->srcRect->top , hgptr->srcRect->bottom);
|
|
||||||
textprint("%d LEFT %d RIGHT\n", hgptr->srcRect->left , hgptr->srcRect->right);
|
|
||||||
|
|
||||||
textprint("/n%d TOP %d BOTTOM\n", screenRect.top , screenRect.bottom);
|
|
||||||
textprint("%d LEFT %d RIGHT\n", screenRect.left , screenRect.right);
|
|
||||||
|
|
||||||
WaitForReturn();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
if((hgptr->width == 0) || (hgptr->height == 0))
|
|
||||||
{
|
|
||||||
// ddrval = lpDDSBack->Blt(NULL, wdds, hgptr->srcRect, DDBLT_WAIT, NULL);
|
|
||||||
fprintf(stderr, "BLTGraphicToScreen: w = %d, h = %d\n", hgptr->width, hgptr->height);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* fill in the structure for the dest rect*/
|
|
||||||
|
|
||||||
destRect.top = hgptr->ydest;
|
|
||||||
destRect.bottom = hgptr->ydest + hgptr->height;
|
|
||||||
|
|
||||||
destRect.left = hgptr->xdest;
|
|
||||||
destRect.right = hgptr->xdest + hgptr->width;
|
|
||||||
/*
|
|
||||||
ddrval = lpDDSBack->Blt(&destRect, wdds, hgptr->srcRect, DDBLT_WAIT, NULL);
|
|
||||||
*/
|
|
||||||
fprintf(stderr, "BLTGraphicToScreen: w = %d, h = %d\n", hgptr->width, hgptr->height);
|
|
||||||
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
if(ddrval != DD_OK)
|
|
||||||
{
|
|
||||||
ReleaseDirect3D();
|
|
||||||
exit(0x666009);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/************************** FONTS *************************/
|
/************************** FONTS *************************/
|
||||||
/**********************************************************/
|
/**********************************************************/
|
||||||
/**********************************************************/
|
/**********************************************************/
|
||||||
|
|
|
@ -974,14 +974,6 @@ void KShapeItemsInstr(SHAPEINSTR *shapeinstrptr)
|
||||||
if(pheaderPtr->PolyItemType == I_3dTexturedPolygon)
|
if(pheaderPtr->PolyItemType == I_3dTexturedPolygon)
|
||||||
pheaderPtr->PolyItemType = I_2dTexturedPolygon;
|
pheaderPtr->PolyItemType = I_2dTexturedPolygon;
|
||||||
|
|
||||||
/* KJL 12:57:43 05/29/97 - E3DEMO hack to draw everything in 3d */
|
|
||||||
#if PC_E3DEMO
|
|
||||||
pheaderPtr->PolyFlags &= ~iflag_tx2dor3d;
|
|
||||||
if(pheaderPtr->PolyItemType == I_Gouraud2dTexturedPolygon)
|
|
||||||
pheaderPtr->PolyItemType = I_Gouraud3dTexturedPolygon;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
if(ItemOCSBlock.ocs_clipstate == ocs_cs_totally_on)
|
if(ItemOCSBlock.ocs_clipstate == ocs_cs_totally_on)
|
||||||
{
|
{
|
||||||
CreateItemPtsArray[*shapeitemptr](shapeitemptr, &PointsArray[0]);
|
CreateItemPtsArray[*shapeitemptr](shapeitemptr, &PointsArray[0]);
|
||||||
|
|
|
@ -32,8 +32,6 @@ extern "C" {
|
||||||
#define SuppressWarnings Yes
|
#define SuppressWarnings Yes
|
||||||
|
|
||||||
#define SupportWindows95 Yes
|
#define SupportWindows95 Yes
|
||||||
#define Saturn No
|
|
||||||
#define PSX No
|
|
||||||
#define platform_pc Yes
|
#define platform_pc Yes
|
||||||
#define InterfaceEngine No
|
#define InterfaceEngine No
|
||||||
|
|
||||||
|
|
|
@ -12,10 +12,6 @@
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
/* defines */
|
/* defines */
|
||||||
#if Saturn
|
|
||||||
#define DBGMALLOC 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if SupportWindows95
|
#if SupportWindows95
|
||||||
#if 1
|
#if 1
|
||||||
#define DBGMALLOC 0
|
#define DBGMALLOC 0
|
||||||
|
@ -47,7 +43,7 @@ a separate copy of the string for each malloc - just store the
|
||||||
pointer.
|
pointer.
|
||||||
So, on PC this reduces the data size for the malloc records from 1.04Mb to 320K ! */
|
So, on PC this reduces the data size for the malloc records from 1.04Mb to 320K ! */
|
||||||
|
|
||||||
#if SupportWindows95 || PSX
|
#if SupportWindows95
|
||||||
#define COPY_FILENAME 0 /* new behavior */
|
#define COPY_FILENAME 0 /* new behavior */
|
||||||
#else
|
#else
|
||||||
#define COPY_FILENAME 1 /* previous behavior */
|
#define COPY_FILENAME 1 /* previous behavior */
|
||||||
|
|
|
@ -2311,212 +2311,8 @@ void UpdateParallelStrategy(void);
|
||||||
|
|
||||||
unsigned char* AllocateScreenBuffer(int sbuffersize);
|
unsigned char* AllocateScreenBuffer(int sbuffersize);
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
void *AllocateMem(size_t __size);
|
|
||||||
void DeallocateMem(void *__ptr);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if PSX
|
|
||||||
#ifdef DBGMALLOC
|
|
||||||
extern void *record_malloc(long size, char string[], unsigned long lineno);
|
|
||||||
extern void record_free(void *ptr,char string[], unsigned long lineno);
|
|
||||||
#define AllocateMem(x) record_malloc(x,__FILE__, __LINE__)
|
|
||||||
#define DeallocateMem(x) record_free(x,__FILE__, __LINE__)
|
|
||||||
#else
|
|
||||||
void *AllocateMem(size_t __size);
|
|
||||||
void DeallocateMem(void *__ptr);
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
void *AllocateMem(size_t __size);
|
|
||||||
void DeallocateMem(void *__ptr);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
void ScanDraw_Item_Polygon_VideoModeType_8(int *itemptr);
|
|
||||||
void ScanDraw_Item_Polygon_VideoModeType_15(int *itemptr);
|
|
||||||
void ScanDraw_Item_Polygon_VideoModeType_24(int *itemptr);
|
|
||||||
void ScanDraw_Item_Polygon_VideoModeType_8T(int *itemptr);
|
|
||||||
|
|
||||||
#if (ZBufferTest || SupportZBuffering)
|
|
||||||
void ScanDraw_Item_Polygon_ZBuffer_VideoModeType_8(int *itemptr);
|
|
||||||
void ScanDraw_Item_Polygon_ZBuffer_VideoModeType_15(int *itemptr);
|
|
||||||
void ScanDraw_Item_Polygon_ZBuffer_VideoModeType_24(int *itemptr);
|
|
||||||
void ScanDraw_Item_Polygon_ZBuffer_VideoModeType_8T(int *itemptr);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void ScanDraw_Item_GouraudPolygon_VideoModeType_8(int *itemptr);
|
|
||||||
void ScanDraw_Item_GouraudPolygon_VideoModeType_15(int *itemptr);
|
|
||||||
void ScanDraw_Item_GouraudPolygon_VideoModeType_24(int *itemptr);
|
|
||||||
void ScanDraw_Item_GouraudPolygon_VideoModeType_8T(int *itemptr);
|
|
||||||
|
|
||||||
void ScanDraw_Item_GouraudPolygon_HPV_VideoModeType_15(int *itemptr);
|
|
||||||
void ScanDraw_Item_GouraudPolygon_HPV_VideoModeType_24(int *itemptr);
|
|
||||||
void ScanDraw_Item_GouraudPolygon_HPV_VideoModeType_8T(int *itemptr);
|
|
||||||
|
|
||||||
#if ZBufferTest
|
|
||||||
void ScanDraw_Item_GouraudPolygon_ZBuffer_VideoModeType_8(int *itemptr);
|
|
||||||
void ScanDraw_Item_GouraudPolygon_ZBuffer_VideoModeType_15(int *itemptr);
|
|
||||||
void ScanDraw_Item_GouraudPolygon_ZBuffer_VideoModeType_24(int *itemptr);
|
|
||||||
void ScanDraw_Item_GouraudPolygon_ZBuffer_VideoModeType_8T(int *itemptr);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if SupportZBuffering
|
|
||||||
void ScanDraw_ZB_Item_GouraudPolygon_VideoModeType_8(int *itemptr);
|
|
||||||
void ScanDraw_ZB_Item_GouraudPolygon_VideoModeType_15(int *itemptr);
|
|
||||||
void ScanDraw_ZB_Item_GouraudPolygon_VideoModeType_24(int *itemptr);
|
|
||||||
void ScanDraw_ZB_Item_GouraudPolygon_VideoModeType_8T(int *itemptr);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void ScanDraw_Item_2dTexturePolygon_VideoModeType_8(int *itemptr);
|
|
||||||
void ScanDraw_Item_2dTexturePolygon_VideoModeType_15(int *itemptr);
|
|
||||||
void ScanDraw_Item_2dTexturePolygon_VideoModeType_24(int *itemptr);
|
|
||||||
void ScanDraw_Item_2dTexturePolygon_VideoModeType_8T(int *itemptr);
|
|
||||||
|
|
||||||
#if SupportZBuffering
|
|
||||||
void ScanDraw_ZB_Item_2dTexturePolygon_VideoModeType_8(int *itemptr);
|
|
||||||
void ScanDraw_ZB_Item_2dTexturePolygon_VideoModeType_15(int *itemptr);
|
|
||||||
void ScanDraw_ZB_Item_2dTexturePolygon_VideoModeType_24(int *itemptr);
|
|
||||||
void ScanDraw_ZB_Item_2dTexturePolygon_VideoModeType_8T(int *itemptr);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void ScanDraw_Item_Gouraud2dTexturePolygon_VideoModeType_8(int *itemptr);
|
|
||||||
void ScanDraw_Item_Gouraud2dTexturePolygon_VideoModeType_15(int *itemptr);
|
|
||||||
void ScanDraw_Item_Gouraud2dTexturePolygon_VideoModeType_24(int *itemptr);
|
|
||||||
void ScanDraw_Item_Gouraud2dTexturePolygon_VideoModeType_8T(int *itemptr);
|
|
||||||
|
|
||||||
void ScanDraw_Item_ZB_Gouraud2dTexturePolygon_VideoModeType_8(int *itemptr);
|
|
||||||
void ScanDraw_Item_ZB_Gouraud2dTexturePolygon_VideoModeType_15(int *itemptr);
|
|
||||||
void ScanDraw_Item_ZB_Gouraud2dTexturePolygon_VideoModeType_24(int *itemptr);
|
|
||||||
void ScanDraw_Item_ZB_Gouraud2dTexturePolygon_VideoModeType_8T(int *itemptr);
|
|
||||||
|
|
||||||
|
|
||||||
#if support3dtextures
|
|
||||||
void ScanDraw_Item_3dTexturePolygon_VideoModeType_8(int *itemptr);
|
|
||||||
void ScanDraw_Item_3dTexturePolygon_VideoModeType_15(int *itemptr);
|
|
||||||
void ScanDraw_Item_3dTexturePolygon_VideoModeType_24(int *itemptr);
|
|
||||||
void ScanDraw_Item_3dTexturePolygon_VideoModeType_8T(int *itemptr);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if SupportGouraud3dTextures
|
|
||||||
|
|
||||||
void ScanDraw_Item_Gouraud3dTexturePolygon_VideoModeType_8(int *itemptr);
|
|
||||||
void ScanDraw_Item_Gouraud3dTexturePolygon_VideoModeType_15(int *itemptr);
|
|
||||||
void ScanDraw_Item_Gouraud3dTexturePolygon_VideoModeType_24(int *itemptr);
|
|
||||||
void ScanDraw_Item_Gouraud3dTexturePolygon_VideoModeType_8T(int *itemptr);
|
|
||||||
|
|
||||||
void ScanDraw_Item_Gouraud3dTexturePolygon_Linear_VideoModeType_8(int *itemptr);
|
|
||||||
void ScanDraw_Item_Gouraud3dTexturePolygon_Linear_VideoModeType_15(int *itemptr);
|
|
||||||
void ScanDraw_Item_Gouraud3dTexturePolygon_Linear_VideoModeType_24(int *itemptr);
|
|
||||||
void ScanDraw_Item_Gouraud3dTexturePolygon_Linear_VideoModeType_8T(int *itemptr);
|
|
||||||
|
|
||||||
void ScanDraw_Item_Gouraud3dTexturePolygon_Linear_S_VideoModeType_8(int *itemptr);
|
|
||||||
void ScanDraw_Item_Gouraud3dTexturePolygon_Linear_S_VideoModeType_15(int *itemptr);
|
|
||||||
void ScanDraw_Item_Gouraud3dTexturePolygon_Linear_S_VideoModeType_24(int *itemptr);
|
|
||||||
void ScanDraw_Item_Gouraud3dTexturePolygon_Linear_S_VideoModeType_8T(int *itemptr);
|
|
||||||
|
|
||||||
#if SupportZBuffering
|
|
||||||
|
|
||||||
void ScanDraw_Item_ZB_Gouraud3dTexturePolygon_VideoModeType_8(int *itemptr);
|
|
||||||
void ScanDraw_Item_ZB_Gouraud3dTexturePolygon_VideoModeType_15(int *itemptr);
|
|
||||||
void ScanDraw_Item_ZB_Gouraud3dTexturePolygon_VideoModeType_24(int *itemptr);
|
|
||||||
void ScanDraw_Item_ZB_Gouraud3dTexturePolygon_VideoModeType_8T(int *itemptr);
|
|
||||||
|
|
||||||
void ScanDraw_Item_ZB_Gouraud3dTexturePolygon_Linear_VideoModeType_8(int *itemptr);
|
|
||||||
void ScanDraw_Item_ZB_Gouraud3dTexturePolygon_Linear_VideoModeType_15(int *itemptr);
|
|
||||||
void ScanDraw_Item_ZB_Gouraud3dTexturePolygon_Linear_VideoModeType_24(int *itemptr);
|
|
||||||
void ScanDraw_Item_ZB_Gouraud3dTexturePolygon_Linear_VideoModeType_8T(int *itemptr);
|
|
||||||
|
|
||||||
void ScanDraw_Item_ZB_Gouraud3dTexturePolygon_Linear_S_VideoModeType_8(int *itemptr);
|
|
||||||
void ScanDraw_Item_ZB_Gouraud3dTexturePolygon_Linear_S_VideoModeType_15(int *itemptr);
|
|
||||||
void ScanDraw_Item_ZB_Gouraud3dTexturePolygon_Linear_S_VideoModeType_24(int *itemptr);
|
|
||||||
void ScanDraw_Item_ZB_Gouraud3dTexturePolygon_Linear_S_VideoModeType_8T(int *itemptr);
|
|
||||||
|
|
||||||
#endif /* SupportZBuffering */
|
|
||||||
|
|
||||||
#endif /* SupportGouraud3dTextures */
|
|
||||||
|
|
||||||
#if support3dtextures
|
|
||||||
|
|
||||||
#if SupportZBuffering
|
|
||||||
void ScanDraw_Item_ZB_3dTexturePolygon_VideoModeType_8(int *itemptr);
|
|
||||||
void ScanDraw_Item_ZB_3dTexturePolygon_VideoModeType_15(int *itemptr);
|
|
||||||
void ScanDraw_Item_ZB_3dTexturePolygon_VideoModeType_24(int *itemptr);
|
|
||||||
void ScanDraw_Item_ZB_3dTexturePolygon_VideoModeType_8T(int *itemptr);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void ScanDraw_Item_3dTexturePolygon_QuadI_VideoModeType_8(int *itemptr);
|
|
||||||
void ScanDraw_Item_3dTexturePolygon_QuadI_VideoModeType_15(int *itemptr);
|
|
||||||
void ScanDraw_Item_3dTexturePolygon_QuadI_VideoModeType_24(int *itemptr);
|
|
||||||
void ScanDraw_Item_3dTexturePolygon_QuadI_VideoModeType_8T(int *itemptr);
|
|
||||||
|
|
||||||
#if SupportZBuffering
|
|
||||||
void ScanDraw_ZB_Item_3dTexturePolygon_QuadI_VideoModeType_8(int *itemptr);
|
|
||||||
void ScanDraw_ZB_Item_3dTexturePolygon_QuadI_VideoModeType_15(int *itemptr);
|
|
||||||
void ScanDraw_ZB_Item_3dTexturePolygon_QuadI_VideoModeType_24(int *itemptr);
|
|
||||||
void ScanDraw_ZB_Item_3dTexturePolygon_QuadI_VideoModeType_8T(int *itemptr);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void ScanDraw_Item_3dTexturePolygon_Linear_VideoModeType_8(int *itemptr);
|
|
||||||
void ScanDraw_Item_3dTexturePolygon_Linear_VideoModeType_15(int *itemptr);
|
|
||||||
void ScanDraw_Item_3dTexturePolygon_Linear_VideoModeType_24(int *itemptr);
|
|
||||||
void ScanDraw_Item_3dTexturePolygon_Linear_VideoModeType_8T(int *itemptr);
|
|
||||||
|
|
||||||
#if SupportZBuffering
|
|
||||||
void ScanDraw_Item_ZB_3dTexturePolygon_Linear_VideoModeType_8(int *itemptr);
|
|
||||||
void ScanDraw_Item_ZB_3dTexturePolygon_Linear_VideoModeType_15(int *itemptr);
|
|
||||||
void ScanDraw_Item_ZB_3dTexturePolygon_Linear_VideoModeType_24(int *itemptr);
|
|
||||||
void ScanDraw_Item_ZB_3dTexturePolygon_Linear_VideoModeType_8T(int *itemptr);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void ScanDraw_Item_3dTexturePolygon_Linear_S_VideoModeType_8(int *itemptr);
|
|
||||||
void ScanDraw_Item_3dTexturePolygon_Linear_S_VideoModeType_15(int *itemptr);
|
|
||||||
void ScanDraw_Item_3dTexturePolygon_Linear_S_VideoModeType_24(int *itemptr);
|
|
||||||
void ScanDraw_Item_3dTexturePolygon_Linear_S_VideoModeType_8T(int *itemptr);
|
|
||||||
|
|
||||||
#if SupportZBuffering
|
|
||||||
void ScanDraw_Item_ZB_3dTexturePolygon_Linear_S_VideoModeType_8(int *itemptr);
|
|
||||||
void ScanDraw_Item_ZB_3dTexturePolygon_Linear_S_VideoModeType_15(int *itemptr);
|
|
||||||
void ScanDraw_Item_ZB_3dTexturePolygon_Linear_S_VideoModeType_24(int *itemptr);
|
|
||||||
void ScanDraw_Item_ZB_3dTexturePolygon_Linear_S_VideoModeType_8T(int *itemptr);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* support3dtextures */
|
|
||||||
|
|
||||||
void ScanDraw_Item_Polyline_VideoModeType_8(int *itemptr);
|
|
||||||
void ScanDraw_Item_Polyline_VideoModeType_15(int *itemptr);
|
|
||||||
void ScanDraw_Item_Polyline_VideoModeType_24(int *itemptr);
|
|
||||||
void ScanDraw_Item_Polyline_VideoModeType_8T(int *itemptr);
|
|
||||||
|
|
||||||
void ScanDraw_Item_FilledPolyline_VideoModeType_8(int *itemptr);
|
|
||||||
void ScanDraw_Item_FilledPolyline_VideoModeType_15(int *itemptr);
|
|
||||||
void ScanDraw_Item_FilledPolyline_VideoModeType_24(int *itemptr);
|
|
||||||
void ScanDraw_Item_FilledPolyline_VideoModeType_8T(int *itemptr);
|
|
||||||
|
|
||||||
void ScanDraw_Item_Wireframe_VideoModeType_8(int *itemptr);
|
|
||||||
void ScanDraw_Item_Wireframe_VideoModeType_15(int *itemptr);
|
|
||||||
void ScanDraw_Item_Wireframe_VideoModeType_24(int *itemptr);
|
|
||||||
void ScanDraw_Item_Wireframe_VideoModeType_8T(int *itemptr);
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
void ScanDraw_Item_HUDPolyline_VideoModeType_8(int *itemptr);
|
|
||||||
void ScanDraw_Item_HUDPolyline_VideoModeType_15(int *itemptr);
|
|
||||||
void ScanDraw_Item_HUDPolyline_VideoModeType_24(int *itemptr);
|
|
||||||
void ScanDraw_Item_HUDPolyline_VideoModeType_8T(int *itemptr);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void SetPalette(unsigned char *palette);
|
void SetPalette(unsigned char *palette);
|
||||||
|
|
||||||
void MakeTextureLightingTable6(void);
|
|
||||||
void MakeTextureLightingTable6G(void);
|
|
||||||
void MakeTextureLightingTable15(void);
|
|
||||||
void MakeTextureLightingTable24(void);
|
|
||||||
void MakeTextureLightingTable8T(void);
|
|
||||||
|
|
||||||
void CreatePaletteRemapTable(unsigned char *palette);
|
void CreatePaletteRemapTable(unsigned char *palette);
|
||||||
unsigned char GetRemappedPaletteColour(int r, int g, int b, int bitsize);
|
unsigned char GetRemappedPaletteColour(int r, int g, int b, int bitsize);
|
||||||
|
|
||||||
|
@ -2574,7 +2370,6 @@ TEXTURE* LoadBMP(char *fname, IMAGEHEADER *iheader);
|
||||||
TEXTURE* LoadPGM(char *fname, IMAGEHEADER *iheader);
|
TEXTURE* LoadPGM(char *fname, IMAGEHEADER *iheader);
|
||||||
int LoadPGMPalette(char *fname, unsigned char *palette);
|
int LoadPGMPalette(char *fname, unsigned char *palette);
|
||||||
int LoadPGMPaletteLightingTable(char *filename, unsigned char *palette);
|
int LoadPGMPaletteLightingTable(char *filename, unsigned char *palette);
|
||||||
void MakeTextureLightingTableRaw256(unsigned char *palette);
|
|
||||||
|
|
||||||
void Create_MIP_Map(IMAGEHEADER *iheader);
|
void Create_MIP_Map(IMAGEHEADER *iheader);
|
||||||
|
|
||||||
|
@ -2605,32 +2400,6 @@ typedef struct mousedata {
|
||||||
void ReadKeyboard(void);
|
void ReadKeyboard(void);
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
void ReadEmulatedSaturnControlPad(void);
|
|
||||||
unsigned int CheckPad(void);
|
|
||||||
void ExaminePad(void);
|
|
||||||
/*
|
|
||||||
Saturn Control Pad
|
|
||||||
See pad.h
|
|
||||||
Model S Pad, direct mode
|
|
||||||
*/
|
|
||||||
#define PAD_DOWN 0x0001
|
|
||||||
#define PAD_UP 0x0002
|
|
||||||
#define PAD_LEFT 0x0004
|
|
||||||
#define PAD_RIGHT 0x0008
|
|
||||||
#define PAD_BUTC 0x0010
|
|
||||||
#define PAD_BUTB 0x0020
|
|
||||||
#define PAD_BUTA 0x0040
|
|
||||||
#define PAD_START 0x0080
|
|
||||||
#define PAD_BUTZ 0x0100
|
|
||||||
#define PAD_BUTY 0x0200
|
|
||||||
#define PAD_BUTX 0x0400
|
|
||||||
#define PAD_MODE 0x0800
|
|
||||||
#define PAD_R 0x0800
|
|
||||||
#define PAD_L 0x1000
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
void WaitForReturn(void);
|
void WaitForReturn(void);
|
||||||
|
|
||||||
void CursorHome(void);
|
void CursorHome(void);
|
||||||
|
|
|
@ -527,10 +527,6 @@ typedef struct merged_poly
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#if Saturn
|
|
||||||
#define iflag_sattexture 0x00000080 /* Outcode if outside frame buffer or behind z plane, else just draw */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if platform_pc
|
#if platform_pc
|
||||||
#define iflag_zbuffer_w 0x00000080 /* Z-Buffer, Write-Only */
|
#define iflag_zbuffer_w 0x00000080 /* Z-Buffer, Write-Only */
|
||||||
#endif
|
#endif
|
||||||
|
@ -578,11 +574,6 @@ typedef struct merged_poly
|
||||||
|
|
||||||
#define iflag_sortfarz 0x04000000 /* Use maxz for depth value */
|
#define iflag_sortfarz 0x04000000 /* Use maxz for depth value */
|
||||||
|
|
||||||
#define iflag_bufferxy 0x08000000 /* Internal - Saturn Only
|
|
||||||
- for xy clamped item */
|
|
||||||
|
|
||||||
#define iflag_clampz 0x10000000 /* Internal - Saturn Only
|
|
||||||
- for z clamped item */
|
|
||||||
|
|
||||||
#define iflag_light_corona 0x20000000 /* For use by the placed light strategy */
|
#define iflag_light_corona 0x20000000 /* For use by the placed light strategy */
|
||||||
|
|
||||||
|
@ -781,11 +772,7 @@ typedef struct texelgtx3d {
|
||||||
|
|
||||||
typedef unsigned char TEXTURE;
|
typedef unsigned char TEXTURE;
|
||||||
|
|
||||||
#if Saturn
|
|
||||||
#define ImageNameSize 16
|
|
||||||
#else
|
|
||||||
#define ImageNameSize 128+1
|
#define ImageNameSize 128+1
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct imageheader {
|
typedef struct imageheader {
|
||||||
|
|
|
@ -139,8 +139,6 @@ void DrawWaterFallPoly(VECTORCH *v);
|
||||||
* they will end up in high memory on the Saturn. *
|
* they will end up in high memory on the Saturn. *
|
||||||
************************************************************************************KJL*/
|
************************************************************************************KJL*/
|
||||||
|
|
||||||
VECTORCH Global_LightVector={1,};
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Global variables and arrays
|
Global variables and arrays
|
||||||
*/
|
*/
|
||||||
|
@ -160,10 +158,6 @@ VECTORCH MorphedPts[maxmorphPts];
|
||||||
#endif /* SupportMorphing */
|
#endif /* SupportMorphing */
|
||||||
|
|
||||||
|
|
||||||
#if Saturn
|
|
||||||
extern int PolygonSubdivideEntry(POLYHEADER* itemptr);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static COLOURINTENSITIES ColourIntensityArray[maxrotpts];
|
static COLOURINTENSITIES ColourIntensityArray[maxrotpts];
|
||||||
|
|
||||||
|
|
||||||
|
|
147
src/maths.c
147
src/maths.c
|
@ -333,27 +333,8 @@ int MinInt(int *iarray, int iarraysize)
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void CreateEulerMatrix(e, m1)
|
void CreateEulerMatrix(EULER *e, MATRIXCH *m1)
|
||||||
|
|
||||||
EULER *e;
|
|
||||||
MATRIXCH *m1;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
#if 0
|
|
||||||
|
|
||||||
SVECTOR eulers;
|
|
||||||
|
|
||||||
eulers.vx=(e->EulerX)&4095;
|
|
||||||
eulers.vy=(e->EulerY)&4095;
|
|
||||||
eulers.vz=(e->EulerZ)&4095;
|
|
||||||
|
|
||||||
RotMatrix(&eulers,(MATRIX *)scratchp);
|
|
||||||
|
|
||||||
psx2ch((MATRIX *)scratchp,m1);
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
int t, sx, sy, sz, cx, cy, cz;
|
int t, sx, sy, sz, cx, cy, cz;
|
||||||
|
|
||||||
|
|
||||||
|
@ -428,9 +409,6 @@ void CreateEulerMatrix(e, m1)
|
||||||
/* m33 = cx*cy */
|
/* m33 = cx*cy */
|
||||||
|
|
||||||
m1->mat33=MUL_FIXED(cx,cy);
|
m1->mat33=MUL_FIXED(cx,cy);
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -513,27 +491,9 @@ void CreateEulerVector(EULER *e, VECTORCH *v)
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void MatrixMultiply(m1, m2, m3)
|
void MatrixMultiply(struct matrixch *m1, struct matrixch *m2, struct matrixch *m3)
|
||||||
|
|
||||||
struct matrixch *m1, *m2, *m3;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
#if 0
|
|
||||||
|
|
||||||
PushMatrix();
|
|
||||||
|
|
||||||
ch2psx(m1,(MATRIX *)scratchp);
|
|
||||||
ch2psx(m2,(MATRIX *)(scratchp+(sizeof(MATRIX))));
|
|
||||||
|
|
||||||
MulMatrix0((MATRIX *)scratchp,(MATRIX *)(scratchp+(sizeof(MATRIX))),(MATRIX *)(scratchp+((sizeof(MATRIX)<<1))));
|
|
||||||
|
|
||||||
psx2ch((MATRIX *)(scratchp+((sizeof(MATRIX)<<1))),m3);
|
|
||||||
|
|
||||||
PopMatrix();
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
MATRIXCH TmpMat;
|
MATRIXCH TmpMat;
|
||||||
|
|
||||||
/* m11'' = c1.r1' */
|
/* m11'' = c1.r1' */
|
||||||
|
@ -593,93 +553,16 @@ void MatrixMultiply(m1, m2, m3)
|
||||||
/* Finally, copy TmpMat to m3 */
|
/* Finally, copy TmpMat to m3 */
|
||||||
|
|
||||||
CopyMatrix(&TmpMat, m3);
|
CopyMatrix(&TmpMat, m3);
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PSXAccurateMatrixMultiply(m1, m2, m3)
|
|
||||||
|
|
||||||
struct matrixch *m1, *m2, *m3;
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
MATRIXCH TmpMat;
|
|
||||||
|
|
||||||
/* m11'' = c1.r1' */
|
|
||||||
|
|
||||||
TmpMat.mat11=MUL_FIXED(m1->mat11,m2->mat11);
|
|
||||||
TmpMat.mat11+=MUL_FIXED(m1->mat21,m2->mat12);
|
|
||||||
TmpMat.mat11+=MUL_FIXED(m1->mat31,m2->mat13);
|
|
||||||
|
|
||||||
/* m12'' = c2.r1' */
|
|
||||||
|
|
||||||
TmpMat.mat12=MUL_FIXED(m1->mat12,m2->mat11);
|
|
||||||
TmpMat.mat12+=MUL_FIXED(m1->mat22,m2->mat12);
|
|
||||||
TmpMat.mat12+=MUL_FIXED(m1->mat32,m2->mat13);
|
|
||||||
|
|
||||||
/* m13'' = c3.r1' */
|
|
||||||
|
|
||||||
TmpMat.mat13=MUL_FIXED(m1->mat13,m2->mat11);
|
|
||||||
TmpMat.mat13+=MUL_FIXED(m1->mat23,m2->mat12);
|
|
||||||
TmpMat.mat13+=MUL_FIXED(m1->mat33,m2->mat13);
|
|
||||||
|
|
||||||
/* m21'' = c1.r2' */
|
|
||||||
|
|
||||||
TmpMat.mat21=MUL_FIXED(m1->mat11,m2->mat21);
|
|
||||||
TmpMat.mat21+=MUL_FIXED(m1->mat21,m2->mat22);
|
|
||||||
TmpMat.mat21+=MUL_FIXED(m1->mat31,m2->mat23);
|
|
||||||
|
|
||||||
/* m22'' = c2.r2' */
|
|
||||||
|
|
||||||
TmpMat.mat22=MUL_FIXED(m1->mat12,m2->mat21);
|
|
||||||
TmpMat.mat22+=MUL_FIXED(m1->mat22,m2->mat22);
|
|
||||||
TmpMat.mat22+=MUL_FIXED(m1->mat32,m2->mat23);
|
|
||||||
|
|
||||||
/* m23'' = c3.r2' */
|
|
||||||
|
|
||||||
TmpMat.mat23=MUL_FIXED(m1->mat13,m2->mat21);
|
|
||||||
TmpMat.mat23+=MUL_FIXED(m1->mat23,m2->mat22);
|
|
||||||
TmpMat.mat23+=MUL_FIXED(m1->mat33,m2->mat23);
|
|
||||||
|
|
||||||
/* m31'' = c1.r3' */
|
|
||||||
|
|
||||||
TmpMat.mat31=MUL_FIXED(m1->mat11,m2->mat31);
|
|
||||||
TmpMat.mat31+=MUL_FIXED(m1->mat21,m2->mat32);
|
|
||||||
TmpMat.mat31+=MUL_FIXED(m1->mat31,m2->mat33);
|
|
||||||
|
|
||||||
/* m32'' = c2.r3' */
|
|
||||||
|
|
||||||
TmpMat.mat32=MUL_FIXED(m1->mat12,m2->mat31);
|
|
||||||
TmpMat.mat32+=MUL_FIXED(m1->mat22,m2->mat32);
|
|
||||||
TmpMat.mat32+=MUL_FIXED(m1->mat32,m2->mat33);
|
|
||||||
|
|
||||||
/* m33'' = c3.r3' */
|
|
||||||
|
|
||||||
TmpMat.mat33=MUL_FIXED(m1->mat13,m2->mat31);
|
|
||||||
TmpMat.mat33+=MUL_FIXED(m1->mat23,m2->mat32);
|
|
||||||
TmpMat.mat33+=MUL_FIXED(m1->mat33,m2->mat33);
|
|
||||||
|
|
||||||
/* Finally, copy TmpMat to m3 */
|
|
||||||
|
|
||||||
CopyMatrix(&TmpMat, m3);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
Transpose Matrix
|
Transpose Matrix
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void TransposeMatrixCH(m1)
|
void TransposeMatrixCH(MATRIXCH *m1)
|
||||||
|
|
||||||
MATRIXCH *m1;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -892,11 +775,7 @@ void _RotateVector(VECTORCH *v, MATRIXCH* m)
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void _RotateAndCopyVector(v1, v2, m)
|
void _RotateAndCopyVector(VECTORCH *v1, VECTORCH *v2, MATRIXCH *m)
|
||||||
|
|
||||||
VECTORCH *v1;
|
|
||||||
VECTORCH *v2;
|
|
||||||
MATRIXCH *m;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -916,9 +795,6 @@ void _RotateAndCopyVector(v1, v2, m)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
Matrix to Euler Angles
|
Matrix to Euler Angles
|
||||||
|
@ -1240,12 +1116,6 @@ void MatrixToEuler(MATRIXCH *m, EULER *e)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#if 1
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define j_and_r_change_2 Yes
|
#define j_and_r_change_2 Yes
|
||||||
|
|
||||||
void MatrixToEuler2(MATRIXCH *m, EULER *e)
|
void MatrixToEuler2(MATRIXCH *m, EULER *e)
|
||||||
|
@ -1479,10 +1349,6 @@ void MatrixToEuler2(MATRIXCH *m, EULER *e)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
Normalise a Matrix
|
Normalise a Matrix
|
||||||
|
@ -1749,9 +1615,7 @@ int ArcSin(int s)
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int ArcTan(height_x, width_z)
|
int ArcTan(int height_x, int width_z)
|
||||||
|
|
||||||
int height_x,width_z;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -2854,4 +2718,3 @@ void QuatToMat(QUAT *q,MATRIXCH *m)
|
||||||
m->mat33=ONE_FIXED-q_2xx-q_2yy;
|
m->mat33=ONE_FIXED-q_2xx-q_2yy;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
268
src/mem3dc.c
268
src/mem3dc.c
|
@ -46,13 +46,9 @@
|
||||||
|
|
||||||
#include "ourasert.h"
|
#include "ourasert.h"
|
||||||
|
|
||||||
#if PSX || Saturn
|
#define MAXMALLOCS 2500000
|
||||||
#define MAXMALLOCS 600
|
/* assertion fires if max exceeded */
|
||||||
#else
|
/* changed to 1000000 by DHM 7/4/98; was 70001 */
|
||||||
#define MAXMALLOCS 2500000
|
|
||||||
/* assertion fires if max exceeded */
|
|
||||||
/* changed to 1000000 by DHM 7/4/98; was 70001 */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define MALLOC_FILL_VALUE 0x21
|
#define MALLOC_FILL_VALUE 0x21
|
||||||
#define FREE_FILL_VALUE 0x89
|
#define FREE_FILL_VALUE 0x89
|
||||||
|
@ -113,15 +109,7 @@ extern int textprint(const char* string, ...);
|
||||||
extern void ExitSystem(void);
|
extern void ExitSystem(void);
|
||||||
extern void WaitForReturn(void);
|
extern void WaitForReturn(void);
|
||||||
|
|
||||||
/* textprint on psx impacts frame rate massively if not
|
|
||||||
used just for error messages, so it is often turned off.
|
|
||||||
Hence the use of textprint2 below */
|
|
||||||
|
|
||||||
#if PSX
|
|
||||||
#define textprint2 printf
|
|
||||||
#else
|
|
||||||
#define textprint2 textprint
|
#define textprint2 textprint
|
||||||
#endif
|
|
||||||
|
|
||||||
/* function declarations */
|
/* function declarations */
|
||||||
#if COPY_FILENAME
|
#if COPY_FILENAME
|
||||||
|
@ -173,148 +161,6 @@ void record_free(void *ptr, char const * string, unsigned long lineno)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PSX || Saturn
|
|
||||||
|
|
||||||
#if COPY_FILENAME
|
|
||||||
static int AdjustMallocRecord(unsigned long addr, long size, char string[], unsigned long lineno)
|
|
||||||
#else
|
|
||||||
static int AdjustMallocRecord(unsigned long addr, long size, char const * string, unsigned long lineno)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
int i=0;
|
|
||||||
char *ptr = (char *)addr;
|
|
||||||
static int no_record_init = 1;
|
|
||||||
MALLOC_RECORD *recordPtr = MallocRecord;
|
|
||||||
|
|
||||||
if(no_record_init)
|
|
||||||
{
|
|
||||||
InitMallocRecords();
|
|
||||||
no_record_init = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if(size==FREEING_MEMORY) /* must be freeing memory */
|
|
||||||
{
|
|
||||||
GLOBALASSERT(addr); /* ensure not null addr */
|
|
||||||
|
|
||||||
while(i<MAXMALLOCS)
|
|
||||||
{
|
|
||||||
if(recordPtr->addr==addr)
|
|
||||||
{
|
|
||||||
TotalMallocNum--;
|
|
||||||
|
|
||||||
size = recordPtr->size;
|
|
||||||
|
|
||||||
while (size--)
|
|
||||||
{
|
|
||||||
*ptr++ = FREE_FILL_VALUE;
|
|
||||||
}
|
|
||||||
#ifdef OVERRUN_SIZE
|
|
||||||
{
|
|
||||||
char const * overrun_ptr = overrun_code;
|
|
||||||
int ov_cnt = OVERRUN_SIZE(recordPtr->size);
|
|
||||||
do /* a memcmp - dunno if its supported on all platforms */
|
|
||||||
{
|
|
||||||
if (!*overrun_ptr) overrun_ptr = overrun_code; /* repeat */
|
|
||||||
if (*overrun_ptr++ != *ptr++)
|
|
||||||
{
|
|
||||||
textprint2("\nOut of Bounds!\n%lu bytes allocated to %p\nat %s, line %lu\n", recordPtr->size,(void *)recordPtr->addr,recordPtr->filename,recordPtr->linenum);
|
|
||||||
GLOBALASSERT(!"OUT OF BOUNDS detected in FREE");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
while (--ov_cnt);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
recordPtr->addr = 0;
|
|
||||||
TotalMemAllocated -= recordPtr->size;
|
|
||||||
recordPtr->size = 0;
|
|
||||||
#if COPY_FILENAME
|
|
||||||
recordPtr->filename[0] = 0;
|
|
||||||
#else
|
|
||||||
recordPtr->filename = "";
|
|
||||||
#endif
|
|
||||||
recordPtr->linenum = 0;
|
|
||||||
break; /* exit while loop */
|
|
||||||
}
|
|
||||||
i++;
|
|
||||||
recordPtr++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(i>=MAXMALLOCS)
|
|
||||||
{
|
|
||||||
textprint2("\n\n\n\nFree Error! %s, line %d\n", string, (int)lineno);
|
|
||||||
GLOBALASSERT(0);
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
else /* must be mallocing memory */
|
|
||||||
{
|
|
||||||
TotalMallocNum++;
|
|
||||||
GLOBALASSERT(TotalMallocNum<MAXMALLOCS); /* just increase MAXMALLOCS define above if this fires */
|
|
||||||
|
|
||||||
|
|
||||||
// RWH chack to see that this address isn't already in use
|
|
||||||
i = 0;
|
|
||||||
recordPtr = MallocRecord;
|
|
||||||
while(i<MAXMALLOCS)
|
|
||||||
{
|
|
||||||
if(recordPtr->addr == addr)
|
|
||||||
{
|
|
||||||
GLOBALASSERT(0);
|
|
||||||
}
|
|
||||||
i++;
|
|
||||||
recordPtr++;
|
|
||||||
}
|
|
||||||
i = 0;
|
|
||||||
recordPtr = MallocRecord;
|
|
||||||
while(i<MAXMALLOCS)
|
|
||||||
{
|
|
||||||
if(recordPtr->addr==0)
|
|
||||||
{
|
|
||||||
recordPtr->addr = addr;
|
|
||||||
recordPtr->size = size;
|
|
||||||
TotalMemAllocated += size;
|
|
||||||
#if COPY_FILENAME
|
|
||||||
strcpy(recordPtr->filename, string);
|
|
||||||
#else
|
|
||||||
recordPtr->filename = string;
|
|
||||||
#endif
|
|
||||||
recordPtr->linenum = lineno;
|
|
||||||
while (size--)
|
|
||||||
{
|
|
||||||
*ptr++ = MALLOC_FILL_VALUE;
|
|
||||||
}
|
|
||||||
#ifdef OVERRUN_SIZE
|
|
||||||
{
|
|
||||||
char const * overrun_ptr = overrun_code;
|
|
||||||
int ov_cnt = OVERRUN_SIZE(recordPtr->size);
|
|
||||||
do /* a memcpy */
|
|
||||||
{
|
|
||||||
if (!*overrun_ptr) overrun_ptr = overrun_code; /* repeat */
|
|
||||||
*ptr++ = *overrun_ptr++;
|
|
||||||
}
|
|
||||||
while (--ov_cnt);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
break; /* exit while loop */
|
|
||||||
}
|
|
||||||
i++;
|
|
||||||
recordPtr++;
|
|
||||||
}
|
|
||||||
|
|
||||||
GLOBALASSERT(i<MAXMALLOCS); /* This should never fire - oh well */
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return(1);
|
|
||||||
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
#if COPY_FILENAME
|
#if COPY_FILENAME
|
||||||
static int AdjustMallocRecord(unsigned long addr, long size, char string[], unsigned long lineno)
|
static int AdjustMallocRecord(unsigned long addr, long size, char string[], unsigned long lineno)
|
||||||
#else
|
#else
|
||||||
|
@ -538,7 +384,7 @@ static int AdjustMallocRecord(unsigned long addr, long size, char const * string
|
||||||
return(1);
|
return(1);
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
void DumpMallocInfo(int type)
|
void DumpMallocInfo(int type)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -601,59 +447,6 @@ void DumpMallocInfo(int type)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if PSX
|
|
||||||
long fd;
|
|
||||||
|
|
||||||
fd = PCopen(MALLOCDUMPFILE,1,0);
|
|
||||||
if(fd<0)
|
|
||||||
{
|
|
||||||
fd = PCcreat(MALLOCDUMPFILE,0);
|
|
||||||
PCclose(fd);
|
|
||||||
fd = PCopen(MALLOCDUMPFILE,1,0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(fd<0)
|
|
||||||
{
|
|
||||||
textprint2("\n\n\nfile open error %s", MALLOCDUMPFILE);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
char stringbuf[200];
|
|
||||||
sprintf(stringbuf,"\n\n\n\nOUTSTANDING MEMORY ALLOCATIONS\n\n");
|
|
||||||
#if APPEND_TO_DUMPFILE
|
|
||||||
PClseek(fd,0,2);
|
|
||||||
#endif
|
|
||||||
PCwrite(fd,stringbuf,strlen(stringbuf));
|
|
||||||
for (i=0;i<MAXMALLOCS;i++ )
|
|
||||||
{
|
|
||||||
if(MallocRecord[i].addr!=0)
|
|
||||||
{
|
|
||||||
if (!(MallocRecord[i].linenum & CPPGLOBAL))
|
|
||||||
{
|
|
||||||
sprintf(stringbuf,"\nmalloc: %d bytes,line %d in %s",
|
|
||||||
(int)MallocRecord[i].size, (int)MallocRecord[i].linenum, MallocRecord[i].filename);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sprintf(stringbuf,"\nC++ global construct malloc: %d bytes,line %d in %s",
|
|
||||||
(int)MallocRecord[i].size, (int)(MallocRecord[i].linenum &~CPPGLOBAL), MallocRecord[i].filename);
|
|
||||||
}
|
|
||||||
PCwrite(fd,stringbuf,strlen(stringbuf));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sprintf(stringbuf,"\n\nTotalMemAllocated: %d\nTotalMallocNum: %d\n",
|
|
||||||
(int)TotalMemAllocated, (int)TotalMallocNum);
|
|
||||||
|
|
||||||
PCwrite(fd,stringbuf,strlen(stringbuf));
|
|
||||||
|
|
||||||
PCclose(fd);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -735,59 +528,6 @@ void DumpBoundsCheckInfo(int type)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if PSX
|
|
||||||
long fd;
|
|
||||||
|
|
||||||
fd = PCopen(MALLOCDUMPFILE,1,0);
|
|
||||||
if(fd<0)
|
|
||||||
{
|
|
||||||
fd = PCcreat(MALLOCDUMPFILE,0);
|
|
||||||
PCclose(fd);
|
|
||||||
fd = PCopen(MALLOCDUMPFILE,1,0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(fd<0)
|
|
||||||
{
|
|
||||||
textprint2("\n\n\nfile open error %s", MALLOCDUMPFILE);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
char stringbuf[200];
|
|
||||||
sprintf(stringbuf,"\n\n\n\nBOUNDS_CHECK_PROBLEMS\n\n");
|
|
||||||
#if APPEND_TO_DUMPFILE
|
|
||||||
PClseek(fd,0,2);
|
|
||||||
#endif
|
|
||||||
PCwrite(fd,stringbuf,strlen(stringbuf));
|
|
||||||
for (i=0;i<MAXMALLOCS;i++ )
|
|
||||||
{
|
|
||||||
if(MallocRecord[i].addr!=0)
|
|
||||||
{
|
|
||||||
MALLOC_RECORD *recordPtr = &MallocRecord[i];
|
|
||||||
|
|
||||||
unsigned char const * overrun_ptr = overrun_code;
|
|
||||||
unsigned char const * ptr = (unsigned char const *)recordPtr->addr + recordPtr->size;
|
|
||||||
int ov_cnt = OVERRUN_SIZE(recordPtr->size);
|
|
||||||
do /* a memcmp - dunno if its supported on all platforms */
|
|
||||||
{
|
|
||||||
if (!*overrun_ptr) overrun_ptr = overrun_code; /* repeat */
|
|
||||||
if (*overrun_ptr++ != *ptr++)
|
|
||||||
{
|
|
||||||
sprintf(stringbuf,"\nOut of Bounds!\n%lu bytes allocated to %p\nat %s, line %lu\n", recordPtr->size,(void *)recordPtr->addr,recordPtr->filename,recordPtr->linenum);
|
|
||||||
PCwrite(fd,stringbuf,strlen(stringbuf));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
while (--ov_cnt);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
PCclose(fd);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -239,7 +239,6 @@ private:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define PSXLightMode 0
|
|
||||||
//details of how light data should be altered for different platforms.
|
//details of how light data should be altered for different platforms.
|
||||||
//currently just playstation
|
//currently just playstation
|
||||||
class Light_Scale_Chunk : public Chunk
|
class Light_Scale_Chunk : public Chunk
|
||||||
|
|
|
@ -248,7 +248,6 @@ int SetupPolygonAccessFromShapeIndex(int shapeIndex)
|
||||||
|
|
||||||
/*--------------------Patrick 17/12/96----------------------------
|
/*--------------------Patrick 17/12/96----------------------------
|
||||||
I have added some more shape data access functions......
|
I have added some more shape data access functions......
|
||||||
PSX versions are required.
|
|
||||||
----------------------------------------------------------------*/
|
----------------------------------------------------------------*/
|
||||||
|
|
||||||
static VECTORCH patPointData;
|
static VECTORCH patPointData;
|
||||||
|
@ -353,7 +352,6 @@ int *GetPolygonVertexIndices(void)
|
||||||
|
|
||||||
/*--------------------Roxby 3/7/97----------------------------
|
/*--------------------Roxby 3/7/97----------------------------
|
||||||
I have added some more shape data access functions......
|
I have added some more shape data access functions......
|
||||||
taken from PSX versions
|
|
||||||
----------------------------------------------------------------*/
|
----------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,6 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define platform_pc Yes
|
#define platform_pc Yes
|
||||||
#define Saturn No
|
|
||||||
|
|
||||||
|
|
||||||
/* Types */
|
/* Types */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue