Many warnings cleaned up (Tim Beckmann)

Menus.
This commit is contained in:
Steven Fuller 2001-12-06 00:22:46 +00:00 committed by Patryk Obara
parent 4508748944
commit 9f006f18fe
115 changed files with 1651 additions and 581 deletions

20
TODO
View file

@ -1,19 +1,23 @@
[DONE] [08/24/01] Finish OpenGL code. [DONE] [08/24/01] Finish OpenGL code.
[DONE] [08/26/01] Fix sound code. [DONE] [08/26/01] Fix sound code.
[DONE] [11/10/01] Save/Load Game support.
[DONE] [11/25/01] CD Audio.
* Menus. * Menus.
* Progress bar.
* Make vidmodes work.
* Debug "pure virtual method called" * Debug "pure virtual method called"
* Proper file loading/saving (ignore case, search certain directories) and * Proper file loading/saving (ignore case, search certain directories) and
config handling (~/.avp/{ge, re, ad, md, pd}/?) config handling (~/.avp/{ge, re, ad, md, pd}/?)
* Command line options. * Command line options.
* CD Audio.
* Joystick support. * Joystick support.
* Save/Load Game support. * GL_EXT_secondary_color
* Revisit sound code. * Revisit sound code. (Try AL_PITCH support, etc)
* Try to get demos and regular edition to work. * Try to get demos and regular edition to work.
* See what FOX/Rebellion has to say (if anything) about redistribution of the * See what FOX/Rebellion has to say (if anything) about redistribution of the
demos and if its possible to create an installer for regular/gold edition demos and if its possible to create an installer for regular/gold edition
CDs. CDs.
* Do something with the ingame movies. Might just leave as-is. * Do something with the ingame movies. Might just leave as-is.
* Disable Mutliplayer in the Main Menu.
* Possible Idea: implement demos? * Possible Idea: implement demos?
* See if the build process can be made easier for those who download the * See if the build process can be made easier for those who download the
source. source.
@ -28,5 +32,15 @@
etc.) etc.)
* Release new version. And fix bugs, and release new version, and so on. * Release new version. And fix bugs, and release new version, and so on.
---- ----
* Command line:
[-h | --help] Display this help message
[-v | --version] Display the game version
[-f | --fullscreen] Run the game fullscreen
[-w | --windowed] Run the game in a window
[-s | --nosound] Do not access the soundcard
[-c | --nocdrom] Do not access the CD-ROM
--debug enable debug mode
* Debug, verify, and reimplant the inline functions in mathline.c to * Debug, verify, and reimplant the inline functions in mathline.c to
inline.h inline.h
* Remove unused files.
* Squelch any unnecessary debug output

View file

@ -1,258 +0,0 @@
char AAFontWidths[256] = {
0, /* 0 */
0, /* 1 */
0, /* 2 */
0, /* 3 */
0, /* 4 */
0, /* 5 */
0, /* 6 */
0, /* 7 */
0, /* 8 */
0, /* 9 */
0, /* 10 */
0, /* 11 */
0, /* 12 */
0, /* 13 */
0, /* 14 */
0, /* 15 */
0, /* 16 */
0, /* 17 */
0, /* 18 */
0, /* 19 */
0, /* 20 */
0, /* 21 */
0, /* 22 */
0, /* 23 */
0, /* 24 */
0, /* 25 */
0, /* 26 */
0, /* 27 */
0, /* 28 */
0, /* 29 */
0, /* 30 */
0, /* 31 */
3, /* 32 */
2, /* 33 */
5, /* 34 */
6, /* 35 */
6, /* 36 */
9, /* 37 */
8, /* 38 */
3, /* 39 */
4, /* 40 */
4, /* 41 */
4, /* 42 */
6, /* 43 */
3, /* 44 */
4, /* 45 */
3, /* 46 */
4, /* 47 */
6, /* 48 */
5, /* 49 */
6, /* 50 */
6, /* 51 */
6, /* 52 */
6, /* 53 */
6, /* 54 */
6, /* 55 */
6, /* 56 */
6, /* 57 */
2, /* 58 */
2, /* 59 */
6, /* 60 */
6, /* 61 */
6, /* 62 */
7, /* 63 */
11, /* 64 */
8, /* 65 */
8, /* 66 */
8, /* 67 */
8, /* 68 */
7, /* 69 */
7, /* 70 */
8, /* 71 */
7, /* 72 */
3, /* 73 */
6, /* 74 */
8, /* 75 */
7, /* 76 */
9, /* 77 */
8, /* 78 */
8, /* 79 */
7, /* 80 */
8, /* 81 */
8, /* 82 */
7, /* 83 */
7, /* 84 */
8, /* 85 */
7, /* 86 */
10, /* 87 */
7, /* 88 */
7, /* 89 */
7, /* 90 */
4, /* 91 */
4, /* 92 */
4, /* 93 */
6, /* 94 */
7, /* 95 */
5, /* 96 */
6, /* 97 */
7, /* 98 */
6, /* 99 */
7, /* 100 */
6, /* 101 */
4, /* 102 */
7, /* 103 */
6, /* 104 */
3, /* 105 */
4, /* 106 */
6, /* 107 */
3, /* 108 */
9, /* 109 */
6, /* 110 */
7, /* 111 */
7, /* 112 */
6, /* 113 */
5, /* 114 */
6, /* 115 */
4, /* 116 */
6, /* 117 */
6, /* 118 */
9, /* 119 */
6, /* 120 */
6, /* 121 */
6, /* 122 */
5, /* 123 */
2, /* 124 */
5, /* 125 */
6, /* 126 */
2, /* 127 */
2, /* 128 */
2, /* 129 */
2, /* 130 */
6, /* 131 */
2, /* 132 */
2, /* 133 */
2, /* 134 */
2, /* 135 */
6, /* 136 */
14, /* 137 */
16, /* 138 */
13, /* 139 */
16, /* 140 */
16, /* 141 */
15, /* 142 */
15, /* 143 */
2, /* 144 */
2, /* 145 */
2, /* 146 */
2, /* 147 */
2, /* 148 */
2, /* 149 */
2, /* 150 */
16, /* 151 */
15, /* 152 */
10, /* 153 */
14, /* 154 */
16, /* 155 */
14, /* 156 */
15, /* 157 */
15, /* 158 */
2, /* 159 */
2, /* 160 */
2, /* 161 */
6, /* 162 */
6, /* 163 */
6, /* 164 */
7, /* 165 */
2, /* 166 */
2, /* 167 */
6, /* 168 */
8, /* 169 */
4, /* 170 */
7, /* 171 */
2, /* 172 */
2, /* 173 */
8, /* 174 */
2, /* 175 */
14, /* 176 */
16, /* 177 */
14, /* 178 */
2, /* 179 */
6, /* 180 */
2, /* 181 */
2, /* 182 */
2, /* 183 */
2, /* 184 */
2, /* 185 */
4, /* 186 */
7, /* 187 */
9, /* 188 */
9, /* 189 */
2, /* 190 */
7, /* 191 */
8, /* 192 */
8, /* 193 */
8, /* 194 */
2, /* 195 */
8, /* 196 */
8, /* 197 */
11, /* 198 */
8, /* 199 */
7, /* 200 */
7, /* 201 */
7, /* 202 */
7, /* 203 */
3, /* 204 */
3, /* 205 */
4, /* 206 */
4, /* 207 */
8, /* 208 */
8, /* 209 */
8, /* 210 */
8, /* 211 */
8, /* 212 */
8, /* 213 */
8, /* 214 */
2, /* 215 */
8, /* 216 */
8, /* 217 */
8, /* 218 */
8, /* 219 */
8, /* 220 */
7, /* 221 */
2, /* 222 */
6, /* 223 */
6, /* 224 */
6, /* 225 */
6, /* 226 */
2, /* 227 */
6, /* 228 */
6, /* 229 */
10, /* 230 */
6, /* 231 */
6, /* 232 */
6, /* 233 */
6, /* 234 */
6, /* 235 */
3, /* 236 */
4, /* 237 */
4, /* 238 */
4, /* 239 */
6, /* 240 */
6, /* 241 */
7, /* 242 */
7, /* 243 */
7, /* 244 */
7, /* 245 */
7, /* 246 */
2, /* 247 */
9, /* 248 */
6, /* 249 */
6, /* 250 */
6, /* 251 */
6, /* 252 */
6, /* 253 */
2, /* 254 */
0 /* 255 */
};

View file

@ -1712,4 +1712,4 @@ void SaveStrategy_Autogun(STRATEGYBLOCK* sbPtr)
Save_SoundState(&agunStatusPointer->soundHandle); Save_SoundState(&agunStatusPointer->soundHandle);
Save_SoundState(&agunStatusPointer->soundHandle2); Save_SoundState(&agunStatusPointer->soundHandle2);
} }

View file

@ -3521,7 +3521,6 @@ int New_GetAvoidanceDirection(STRATEGYBLOCK *sbPtr, NPC_AVOIDANCEMANAGER *manage
{ {
// What follows is an attempt to make sure we don't jump off any cliffs... // What follows is an attempt to make sure we don't jump off any cliffs...
VECTORCH test_location; VECTORCH test_location;
int test_distance = this_distance / 2;
testDirn.vx *= this_distance; testDirn.vx *= this_distance;
testDirn.vy *= this_distance; testDirn.vy *= this_distance;
testDirn.vz *= this_distance; testDirn.vz *= this_distance;

View file

@ -257,4 +257,4 @@
#endif #endif
#endif #endif

View file

@ -45,4 +45,4 @@ extern void MakeFragments (STRATEGYBLOCK *sbptr);
#define NO_OF_SPRITES_IN_BIG_EXPLOSION 5 #define NO_OF_SPRITES_IN_BIG_EXPLOSION 5
#else #else
#define NO_OF_SPRITES_IN_BIG_EXPLOSION 10 #define NO_OF_SPRITES_IN_BIG_EXPLOSION 10
#endif #endif

View file

@ -1255,4 +1255,4 @@ void FarNpc_FlipAround(STRATEGYBLOCK *sbPtr)
dynPtr->OrientEuler.EulerY += (1024 + FastRandom()%1024); dynPtr->OrientEuler.EulerY += (1024 + FastRandom()%1024);
dynPtr->OrientEuler.EulerY &= wrap360; dynPtr->OrientEuler.EulerY &= wrap360;
} }

View file

@ -60,4 +60,4 @@ extern void FarNpc_FlipAround(STRATEGYBLOCK *sbPtr);
} }
#endif #endif
#endif #endif

View file

@ -776,8 +776,6 @@ void PlotFaceHugger(STRATEGYBLOCK *sbPtr) {
static void Execute_FHNS_Attack(STRATEGYBLOCK *sbPtr) static void Execute_FHNS_Attack(STRATEGYBLOCK *sbPtr)
{ {
extern VIEWDESCRIPTORBLOCK *ActiveVDBList[];
DYNAMICSBLOCK *dynPtr; DYNAMICSBLOCK *dynPtr;
FACEHUGGER_STATUS_BLOCK *facehuggerStatusPointer; FACEHUGGER_STATUS_BLOCK *facehuggerStatusPointer;
@ -1332,4 +1330,4 @@ void SaveStrategy_FaceHugger(STRATEGYBLOCK* sbPtr)
Save_SoundState(&huggerStatusPointer->soundHandle); Save_SoundState(&huggerStatusPointer->soundHandle);
Save_SoundState(&huggerStatusPointer->soundHandle2); Save_SoundState(&huggerStatusPointer->soundHandle2);
} }

View file

@ -109,4 +109,4 @@ void Wake_Hugger(STRATEGYBLOCK *sbPtr);
} }
#endif #endif
#endif #endif

View file

@ -128,4 +128,4 @@
extern void GeneratorBalance_NoteAIDeath(); extern void GeneratorBalance_NoteAIDeath();
extern void GeneratorBalance_NotePlayerDeath(); extern void GeneratorBalance_NotePlayerDeath();
#endif #endif

View file

@ -41,6 +41,3 @@ typedef struct lift_door_tools_template
extern void* LiftDoorBehaveInit(void* bhdata, STRATEGYBLOCK* sbptr); extern void* LiftDoorBehaveInit(void* bhdata, STRATEGYBLOCK* sbptr);
extern void LiftDoorBehaveFun(STRATEGYBLOCK* sbptr); extern void LiftDoorBehaveFun(STRATEGYBLOCK* sbptr);

View file

@ -815,4 +815,4 @@ static void TeleportFloorSwitches
{ {
TeleportContents(dest, src, 0); TeleportContents(dest, src, 0);
} }
} }

View file

@ -1149,4 +1149,4 @@ void SaveStrategy_PlacedLight(STRATEGYBLOCK* sbPtr)
block->integrity = sbPtr->integrity; block->integrity = sbPtr->integrity;
block->SBDamageBlock = sbPtr->SBDamageBlock; block->SBDamageBlock = sbPtr->SBDamageBlock;
} }

View file

@ -640,4 +640,4 @@ 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 #endif

View file

@ -46,4 +46,4 @@ void * LightFXBehaveInit (void * bhdata, STRATEGYBLOCK* sbptr);
void LightFXBehaveFun (STRATEGYBLOCK* sbptr); void LightFXBehaveFun (STRATEGYBLOCK* sbptr);
#endif #endif

View file

@ -409,4 +409,4 @@
#endif #endif
#endif #endif

View file

@ -47,4 +47,4 @@ typedef struct message_behav_block
}MESSAGE_BEHAV_BLOCK; }MESSAGE_BEHAV_BLOCK;
#endif #endif

View file

@ -830,7 +830,6 @@ static void AlienNearState_Approach(STRATEGYBLOCK *sbPtr)
/* target acquisition ? */ /* target acquisition ? */
{ {
extern DISPLAYBLOCK *Player;
if(VectorDistance(&(alienStatusPointer->Target->DynPtr->Position),&(dynPtr->Position)) < ALIEN_CURVETOPLAYERDIST) if(VectorDistance(&(alienStatusPointer->Target->DynPtr->Position),&(dynPtr->Position)) < ALIEN_CURVETOPLAYERDIST)
{ {
curveToPlayer = 1; curveToPlayer = 1;
@ -1327,7 +1326,6 @@ static void AlienNearState_Wander(STRATEGYBLOCK *sbPtr)
{ {
ALIEN_STATUS_BLOCK *alienStatusPointer; ALIEN_STATUS_BLOCK *alienStatusPointer;
DYNAMICSBLOCK *dynPtr; DYNAMICSBLOCK *dynPtr;
int approachingAirDuct = 0;
VECTORCH velocityDirection = {0,0,0}; VECTORCH velocityDirection = {0,0,0};
LOCALASSERT(sbPtr); LOCALASSERT(sbPtr);
@ -1604,7 +1602,6 @@ static void AlienNearState_Retreat(STRATEGYBLOCK *sbPtr)
{ {
ALIEN_STATUS_BLOCK *alienStatusPointer; ALIEN_STATUS_BLOCK *alienStatusPointer;
DYNAMICSBLOCK *dynPtr; DYNAMICSBLOCK *dynPtr;
int approachingAirDuct = 0;
VECTORCH velocityDirection = {0,0,0}; VECTORCH velocityDirection = {0,0,0};
LOCALASSERT(sbPtr); LOCALASSERT(sbPtr);

View file

@ -100,4 +100,4 @@ void PAQIsDamaged(STRATEGYBLOCK *sbPtr, DAMAGE_PROFILE *damage, int multiple);
} }
#endif #endif
#endif #endif

View file

@ -453,4 +453,4 @@ void SaveStrategy_PlacedHierarchy(STRATEGYBLOCK* sbPtr)
Save_SoundState(&ph_bhv->sounds[i].activ_no); Save_SoundState(&ph_bhv->sounds[i].activ_no);
} }
} }

View file

@ -258,4 +258,4 @@ extern void StartPredatorSelfDestructExplosion(STRATEGYBLOCK *sbPtr);
#endif #endif
#endif #endif

View file

@ -4860,7 +4860,6 @@ static BOOL TargetIsFiringFlamethrowerAtQueen(STRATEGYBLOCK *sbPtr)
static void MakeNonFragable_Recursion(SECTION_DATA *this_section_data) static void MakeNonFragable_Recursion(SECTION_DATA *this_section_data)
{ {
SECTION_DATA *sdptr; SECTION_DATA *sdptr;
int health_increment;
sdptr=NULL; sdptr=NULL;
@ -5170,4 +5169,4 @@ void SaveStrategy_Queen(STRATEGYBLOCK* sbPtr)
SaveHierarchy(&queenStatusPointer->HModelController); SaveHierarchy(&queenStatusPointer->HModelController);
Save_SoundState(&queenStatusPointer->soundHandle); Save_SoundState(&queenStatusPointer->soundHandle);
} }

View file

@ -290,4 +290,4 @@ void SaveStrategy_PlacedSound(STRATEGYBLOCK* sbPtr)
Save_SoundState(&sbb->activ_no); Save_SoundState(&sbb->activ_no);
} }

View file

@ -70,4 +70,4 @@ void StopPlacedSoundPlaying(STRATEGYBLOCK* sbptr);
#endif #endif
#endif #endif

View file

@ -74,4 +74,4 @@ typedef struct xeno_morph_room_data
} XENO_MORPH_ROOM_DATA; } XENO_MORPH_ROOM_DATA;
#endif #endif

View file

@ -33,4 +33,4 @@ void* InitVideoScreen(void* bhdata,STRATEGYBLOCK *sbPtr);
void VideoScreenBehaviour(STRATEGYBLOCK *sbPtr); void VideoScreenBehaviour(STRATEGYBLOCK *sbPtr);
void VideoScreenIsDamaged(STRATEGYBLOCK *sbPtr, DAMAGE_PROFILE *damage, int multiple); void VideoScreenIsDamaged(STRATEGYBLOCK *sbPtr, DAMAGE_PROFILE *damage, int multiple);
#endif #endif

View file

@ -995,4 +995,4 @@ void GetTargetPositionInWaypoint(WAYPOINT_VOLUME *waypoint,VECTORCH *output) {
GLOBALASSERT(WaypointContainsPoint(waypoint,output)); GLOBALASSERT(WaypointContainsPoint(waypoint,output));
} }

View file

@ -364,8 +364,6 @@ static STRATEGYBLOCK* InitialiseFrisbeeBehaviour_ForLoad() {
DISPLAYBLOCK *dispPtr; DISPLAYBLOCK *dispPtr;
DYNAMICSBLOCK *dynPtr; DYNAMICSBLOCK *dynPtr;
FRISBEE_BEHAV_BLOCK *bblk; FRISBEE_BEHAV_BLOCK *bblk;
int a;
/* make displayblock with correct shape, etc */ /* make displayblock with correct shape, etc */
dispPtr = MakeObject(I_BehaviourFrisbee,&zeroVect); dispPtr = MakeObject(I_BehaviourFrisbee,&zeroVect);
@ -3103,8 +3101,6 @@ static STRATEGYBLOCK* InitialiseDiscBehaviour_ForLoad() {
DISPLAYBLOCK *dispPtr; DISPLAYBLOCK *dispPtr;
DYNAMICSBLOCK *dynPtr; DYNAMICSBLOCK *dynPtr;
PC_PRED_DISC_BEHAV_BLOCK *bblk; PC_PRED_DISC_BEHAV_BLOCK *bblk;
int a;
/* make displayblock with correct shape, etc */ /* make displayblock with correct shape, etc */
dispPtr = MakeObject(I_BehaviourPredatorDisc_SeekTrack,&zeroVect); dispPtr = MakeObject(I_BehaviourPredatorDisc_SeekTrack,&zeroVect);

View file

@ -193,4 +193,4 @@ typedef struct PredatorDiscBehaviourType {
} PRED_DISC_BEHAV_BLOCK; } PRED_DISC_BEHAV_BLOCK;
#endif #endif

View file

@ -1886,7 +1886,6 @@ void Xeno_TurnAndTarget(STRATEGYBLOCK *sbPtr, int *ref_anglex,int *ref_angley) {
void Xeno_Limbs_ShootTheRoof(STRATEGYBLOCK *sbPtr) { void Xeno_Limbs_ShootTheRoof(STRATEGYBLOCK *sbPtr) {
XENO_STATUS_BLOCK *xenoStatusPointer; XENO_STATUS_BLOCK *xenoStatusPointer;
int anglex,angley;
LOCALASSERT(sbPtr); LOCALASSERT(sbPtr);
xenoStatusPointer = (XENO_STATUS_BLOCK *)(sbPtr->SBdataptr); xenoStatusPointer = (XENO_STATUS_BLOCK *)(sbPtr->SBdataptr);
@ -5305,4 +5304,4 @@ void SaveStrategy_Xenoborg(STRATEGYBLOCK* sbPtr)
Save_SoundState(&xenoStatusPointer->soundHandle1); Save_SoundState(&xenoStatusPointer->soundHandle1);
Save_SoundState(&xenoStatusPointer->soundHandle2); Save_SoundState(&xenoStatusPointer->soundHandle2);
} }

View file

@ -231,4 +231,4 @@
#endif #endif
#endif #endif

View file

@ -445,4 +445,4 @@ void SaveStrategy_Grapple(STRATEGYBLOCK* sbPtr)
block->dynamics = *sbPtr->DynPtr; block->dynamics = *sbPtr->DynPtr;
block->dynamics.CollisionReportPtr=0; block->dynamics.CollisionReportPtr=0;
} }

View file

@ -1140,4 +1140,4 @@ extern int AnyCheatModesAllowed(void)
} }
} }
return 0; return 0;
} }

View file

@ -18,7 +18,7 @@ extern MAPBLOCK6 Term_Type6;
extern MODULEMAPBLOCK AvpCompiledMaps[]; extern MODULEMAPBLOCK AvpCompiledMaps[];
MAPHEADER Map[]={ MAPHEADER Map[]={
{
0, 0,
0, 0,
0, 0,
@ -26,7 +26,8 @@ MAPHEADER Map[]={
0, 0,
0, 0,
0, 0,
&Player_and_Camera_Type8[0], &Player_and_Camera_Type8[0]
}
}; };
@ -91,8 +92,8 @@ MAPBLOCK6 Empty_Landscape_Type6 = {
-1, /* No shape */ -1, /* No shape */
0,0,0, /* Loc */ {0,0,0}, /* Loc */
0,0,0, /* Orient */ {0,0,0}, /* Orient */
ObFlag_MultLSrc ObFlag_MultLSrc
/*| ObFlag_BFCRO*/ /*| ObFlag_BFCRO*/
@ -125,8 +126,8 @@ MAPBLOCK6 Empty_Object_Type6 = {
-1, /* No shape */ -1, /* No shape */
0,0,0, /* Loc */ {0,0,0}, /* Loc */
0,0,0, /* Orient */ {0,0,0}, /* Orient */
ObFlag_MultLSrc | ObFlag_MultLSrc |
/*| ObFlag_BFCRO*/ /*| ObFlag_BFCRO*/
@ -157,8 +158,8 @@ MAPBLOCK6 Term_Type6 = {
MapType_Term, MapType_Term,
0, 0,
0,0,0, {0,0,0},
0,0,0, {0,0,0},
0, /* Flags */ 0, /* Flags */
#if StandardStrategyAndCollisions #if StandardStrategyAndCollisions
@ -352,8 +353,8 @@ MODULEMAPBLOCK AvpCompiledMaps[] = {
{ {
MapType_Term, /* Map Type Function */ MapType_Term, /* Map Type Function */
0, /* Shape */ 0, /* Shape */
0,0,0, /* Loc */ {0,0,0}, /* Loc */
0,0,0, /* Orient */ {0,0,0}, /* Orient */
0, /* Flags 1 */ 0, /* Flags 1 */
0, /* Flags 2 */ 0, /* Flags 2 */
0, /* Flags 3 */ 0, /* Flags 3 */
@ -371,12 +372,12 @@ MODULEMAPBLOCK AvpCompiledMaps[] = {
0, /* MapMass */ 0, /* MapMass */
0,0,0, /* MapNewtonV */ 0,0,0, /* MapNewtonV */
#endif #endif
0,0,0, /* MapOrigin */ {0,0,0}, /* MapOrigin */
0, /* MapSimShapes */ 0, /* MapSimShapes */
0, /* MapViewType */ 0, /* MapViewType */
0, /* MapMPtr */ 0, /* MapMPtr */
0, /* MapDPtr */ 0, /* MapDPtr */
0,0,0, /* MapMOffset */ {0,0,0}, /* MapMOffset */
} }
}; };
@ -388,8 +389,8 @@ MODULE Empty_Module = {
"null", /* char m_name[] */ "null", /* char m_name[] */
0, /* int m_index */ 0, /* int m_index */
0, /* int m_flags */ 0, /* int m_flags */
0,0,0, /* VECTOR m_world */ {0,0,0}, /* VECTOR m_world */
"null", /* MREF m_ext */ {"null"}, /* MREF m_ext */
0, /* int m_ext_scale */ 0, /* int m_ext_scale */
0, /* int m_maxx */ 0, /* int m_maxx */
0, /* int m_minx */ 0, /* int m_minx */
@ -399,22 +400,22 @@ MODULE Empty_Module = {
0, /* int m_minz */ 0, /* int m_minz */
0, /* MODULEMAPBLOCK *m_mapptr */ 0, /* MODULEMAPBLOCK *m_mapptr */
0, /* struct displayblock *m_dptr */ 0, /* struct displayblock *m_dptr */
"null", /* MREF m_vptr */ {"null"}, /* MREF m_vptr */
0, /* VMODULE *m_v_ptrs */ 0, /* VMODULE *m_v_ptrs */
0, /* struct module **m_link_ptrs */ 0, /* struct module **m_link_ptrs */
// 0, /* VIEWPORT *m_viewports */ // 0, /* VIEWPORT *m_viewports */
0, /* MODULETABLEHEADER *m_table */ 0, /* MODULETABLEHEADER *m_table */
mfun_null, /* MFUNCTION m_ifvisible */ mfun_null, /* MFUNCTION m_ifvisible */
mfun_null, /* MFUNCTION m_ifvinside */ mfun_null, /* MFUNCTION m_ifvinside */
"null", /* MREF m_funref */ {"null"}, /* MREF m_funref */
0, /* Strategy block * */ 0, /* Strategy block * */
0, /* num lights*/ 0, /* num lights*/
NULL, /* pointer to light blocks*/ NULL, /* pointer to light blocks*/
NULL, /* pointer to extraitemdata */ NULL, /* pointer to extraitemdata */
{0,0,0,
0,0,0, 0,0,0,
0,0,0, 0,0,0},
0,0,0,
#if SupportWindows95 #if SupportWindows95
0, 0,
@ -437,8 +438,8 @@ MODULEMAPBLOCK Empty_Module_Map =
MapType_Default, /* MapType */ MapType_Default, /* MapType */
-1, /* MapShape */ -1, /* MapShape */
0, 0, 0, /* MapWorld */ {0, 0, 0}, /* MapWorld */
0, 0, 0, /* MapEuler */ /* Orient */ {0, 0, 0}, /* MapEuler */ /* Orient */
0 0
| ObFlag_MultLSrc /* MapFlags */ | ObFlag_MultLSrc /* MapFlags */
@ -461,13 +462,13 @@ MODULEMAPBLOCK Empty_Module_Map =
0, /* Interior Type */ 0, /* Interior Type */
LightType_PerVertex, /* MapLightType */ LightType_PerVertex, /* MapLightType */
0,0,0, /* MapOrigin */ {0,0,0}, /* MapOrigin */
0, /* MapSimShapes */ 0, /* MapSimShapes */
0, /* MapViewType */ 0, /* MapViewType */
0, /* MapMPtr */ 0, /* MapMPtr */
0, /* MapDPtr */ 0, /* MapDPtr */
0,0,0, /* MapMOffset */ {0,0,0}, /* MapMOffset */
}; };
@ -488,8 +489,8 @@ MODULEMAPBLOCK TempModuleMap = \
MapType_Default, /* MapType */ MapType_Default, /* MapType */
-1, /* MapShape */ -1, /* MapShape */
0, 0, 0, /* MapWorld */ {0, 0, 0}, /* MapWorld */
0, 0, 0, /* MapEuler */ /* Orient */ {0, 0, 0}, /* MapEuler */ /* Orient */
0 /* flags 1*/ 0 /* flags 1*/
| ObFlag_NoInfLSrc | ObFlag_NoInfLSrc
@ -510,12 +511,12 @@ MODULEMAPBLOCK TempModuleMap = \
#else #else
LightType_PerVertex, /* MapLightType */ LightType_PerVertex, /* MapLightType */
#endif #endif
0,0,0, /* MapOrigin */ {0,0,0}, /* MapOrigin */
0, /* MapSimShapes */ 0, /* MapSimShapes */
0, /* MapViewType */ 0, /* MapViewType */
0, /* MapMPtr */ 0, /* MapMPtr */
0, /* MapDPtr */ 0, /* MapDPtr */
0,0,0 /* MapMOffset */ {0,0,0} /* MapMOffset */
}; };

View file

@ -69,4 +69,4 @@ extern void DrawDatabaseBackground(void);
extern void UpdateDatabaseScreen(void); extern void UpdateDatabaseScreen(void);
extern int DatabaseStateChange(); extern int DatabaseStateChange();

View file

@ -1726,7 +1726,9 @@ ATTACK_DATA Alien_Attacks[] = {
0, /* Multiplayer_Code */ 0, /* Multiplayer_Code */
0, /* Unique_Code */ 0, /* Unique_Code */
0, /* wound_flags */ 0, /* wound_flags */
AMMO_NONE, /* damage_type */ {
AMMO_NONE /* damage_type */
},
0, /* Crouching */ 0, /* Crouching */
0, /* Pouncing */ 0, /* Pouncing */
}, },
@ -1807,7 +1809,9 @@ ATTACK_DATA Wristblade_Attacks[] = {
0, /* Multiplayer_Code */ 0, /* Multiplayer_Code */
0, /* Unique_Code */ 0, /* Unique_Code */
0, /* wound_flags */ 0, /* wound_flags */
AMMO_NONE, /* damage_type */ {
AMMO_NONE /* damage_type */
},
0, /* Crouching */ 0, /* Crouching */
0, /* Pouncing */ 0, /* Pouncing */
}, },
@ -1904,7 +1908,9 @@ ATTACK_DATA PredStaff_Attacks[] = {
0, /* Multiplayer_Code */ 0, /* Multiplayer_Code */
0, /* Unique_Code */ 0, /* Unique_Code */
0, /* wound_flags */ 0, /* wound_flags */
AMMO_NONE, /* damage_type */ {
AMMO_NONE /* damage_type */
},
0, /* Crouching */ 0, /* Crouching */
0, /* Pouncing */ 0, /* Pouncing */
}, },

View file

@ -1173,4 +1173,4 @@ void Save_Decals()
*decal = DecalStorage[i]; *decal = DecalStorage[i];
} }
} }

View file

@ -35,4 +35,4 @@ extern void SetToMinimalDetailLevels(void);
extern void SetDetailLevelsFromMenu(void); extern void SetDetailLevelsFromMenu(void);
#endif #endif

View file

@ -8235,4 +8235,4 @@ BOOL AreDamageProfilesEqual(DAMAGE_PROFILE* profile1,DAMAGE_PROFILE* profile2)
{ {
return FALSE; return FALSE;
} }
} }

View file

@ -467,4 +467,4 @@ void CreateGameSpecificConsoleVariables(void)
} }
}; // extern "C" }; // extern "C"

View file

@ -1388,8 +1388,6 @@ void Process_Section(HMODELCONTROLLER *controller,SECTION_DATA *this_section_dat
&&(render)) { &&(render)) {
/* Unreal things don't get plotted, either. */ /* Unreal things don't get plotted, either. */
extern MATRIXCH IdentityMatrix;
DISPLAYBLOCK dummy_displayblock; DISPLAYBLOCK dummy_displayblock;
SHAPEHEADER *shape_to_use; SHAPEHEADER *shape_to_use;
@ -2118,8 +2116,6 @@ static void HMTimer_Kernel(HMODELCONTROLLER *controller) {
void DoHModel(HMODELCONTROLLER *controller, DISPLAYBLOCK *dptr) { void DoHModel(HMODELCONTROLLER *controller, DISPLAYBLOCK *dptr) {
extern int NormalFrameTime;
GLOBALASSERT(controller); GLOBALASSERT(controller);
GLOBALASSERT(dptr); GLOBALASSERT(dptr);
@ -2245,8 +2241,6 @@ void DoHModelTimer_Recursion(HMODELCONTROLLER *controller,SECTION_DATA *this_sec
void DoHModelTimer(HMODELCONTROLLER *controller) { void DoHModelTimer(HMODELCONTROLLER *controller) {
extern int NormalFrameTime;
/* Be VERY careful with this function - it can put the timer and the /* Be VERY careful with this function - it can put the timer and the
position computations out of step. Once you've called this, call NO position computations out of step. Once you've called this, call NO
OTHER HMODEL FUNCTIONS on this model until the next frame! */ OTHER HMODEL FUNCTIONS on this model until the next frame! */

View file

@ -2070,7 +2070,6 @@ static void DrawAlienTeeth(void)
if (AlienTeethOffset) if (AlienTeethOffset)
{ {
extern int CloakingPhase;
int offsetY; int offsetY;
DISPLAYBLOCK displayblock; DISPLAYBLOCK displayblock;

View file

@ -255,4 +255,4 @@ extern void DrawOnScreenMessage(unsigned char *messagePtr);
}; /* end of C-Linkage spec */ }; /* end of C-Linkage spec */
#endif #endif
#endif /* one-time only guard */ #endif /* one-time only guard */

View file

@ -137,4 +137,4 @@ void InitCharacterMSLReferences()
int GetMSLPosFromEnum(CHARACTER_SHAPES shape_enum) int GetMSLPosFromEnum(CHARACTER_SHAPES shape_enum)
{ {
return(LoadedShapesInMSL[shape_enum]); return(LoadedShapesInMSL[shape_enum]);
} }

View file

@ -50,4 +50,4 @@ typedef struct
#endif #endif
#endif #endif

View file

@ -621,4 +621,4 @@ void MissionObjective :: TestCompleteNext(void)
Yes, // OurBool bHidden Yes, // OurBool bHidden
"LANDING BEACON ACTIVATED. STAND CLEAR AND PREPARE FOR EVAC. ", // ProjChar* pProjCh_TriggeringFeedback, "LANDING BEACON ACTIVATED. STAND CLEAR AND PREPARE FOR EVAC. ", // ProjChar* pProjCh_TriggeringFeedback,
#endif #endif

View file

@ -208,4 +208,4 @@ extern void PaintBallMode_Randomise(void)
PaintBallMode.CurrentDecalRotation = FastRandom()&4095; PaintBallMode.CurrentDecalRotation = FastRandom()&4095;
} }

View file

@ -31,4 +31,4 @@ extern void PaintBallMode_ChangeSelectedDecalID(int delta);
extern void PaintBallMode_ChangeSize(int delta); extern void PaintBallMode_ChangeSize(int delta);
extern void PaintBallMode_AddDecal(void); extern void PaintBallMode_AddDecal(void);
#endif #endif

View file

@ -5290,7 +5290,6 @@ extern void RenderParticlesInMirror(void)
while(numOfObjects) while(numOfObjects)
{ {
DISPLAYBLOCK *objectPtr = OnScreenBlockList[--numOfObjects]; DISPLAYBLOCK *objectPtr = OnScreenBlockList[--numOfObjects];
STRATEGYBLOCK *sbPtr = objectPtr->ObStrategyBlock;
if (!objectPtr->ObShape && objectPtr->SfxPtr) if (!objectPtr->ObShape && objectPtr->SfxPtr)
{ {
@ -5659,4 +5658,4 @@ void Save_PheromoneTrails()
*trail = TrailStorage[i]; *trail = TrailStorage[i];
} }
} }

View file

@ -94,4 +94,4 @@ int PointIsInModule(MODULE* thisModule, VECTORCH* thisPoint);
} }
#endif #endif
#endif #endif

View file

@ -28,4 +28,4 @@ int AIModuleAdmitsPheromones(AIMODULE *targetModule);
#if SUPER_PHEROMONE_SYSTEM #if SUPER_PHEROMONE_SYSTEM
void AddMarinePheromones(AIMODULE *targetModule); void AddMarinePheromones(AIMODULE *targetModule);
void MaintainMarineTargetZone(AIMODULE *targetModule); void MaintainMarineTargetZone(AIMODULE *targetModule);
#endif #endif

View file

@ -1702,7 +1702,6 @@ extern void ThrowAFlare(void)
if (NumberOfFlaresActive<4) if (NumberOfFlaresActive<4)
{ {
extern VECTORCH CentreOfMuzzleOffset;
extern VIEWDESCRIPTORBLOCK *ActiveVDBList[]; extern VIEWDESCRIPTORBLOCK *ActiveVDBList[];
VIEWDESCRIPTORBLOCK *VDBPtr = ActiveVDBList[0]; VIEWDESCRIPTORBLOCK *VDBPtr = ActiveVDBList[0];
MATRIXCH mat = VDBPtr->VDB_Mat; MATRIXCH mat = VDBPtr->VDB_Mat;

View file

@ -82,4 +82,4 @@ extern void ExecuteFreeMovement(STRATEGYBLOCK* sbPtr);
#endif #endif
#endif #endif

View file

@ -73,7 +73,7 @@ MODULEMAPBLOCK VisibilityDefaultObjectMap =
{ {
MapType_Default, MapType_Default,
I_ShapeCube, /* this is a default value */ I_ShapeCube, /* this is a default value */
0,0,0, 0,0,0,
0,0,0, 0,0,0,
#if StandardStrategyAndCollisions #if StandardStrategyAndCollisions
ObFlag_Dynamic|ObFlag_NewtonMovement|ObFlag_MatMul, ObFlag_Dynamic|ObFlag_NewtonMovement|ObFlag_MatMul,

View file

@ -96,4 +96,4 @@ extern void SaveGame();
extern void LoadSavedGame(); extern void LoadSavedGame();
extern void ResetNumberOfSaves(); extern void ResetNumberOfSaves();
#endif #endif

View file

@ -74,4 +74,4 @@ void PlayQueenSound(int VoiceType,int SoundCategory,int PitchShift,int* External
}; };
#endif #endif
#endif #endif

View file

@ -293,4 +293,4 @@ void HandleObjectOnFire(DISPLAYBLOCK *dispPtr)
#endif #endif
} }
} }

View file

@ -48,4 +48,4 @@ extern void DrawSfxObject(struct displayblock *dispPtr);
extern void HandleSfxForObject(DISPLAYBLOCK *dispPtr); extern void HandleSfxForObject(DISPLAYBLOCK *dispPtr);
#endif #endif

View file

@ -745,4 +745,4 @@ void GivePlayerCloakAway(void) {
playerStatusPtr->cloakPositionGivenAway = 1; playerStatusPtr->cloakPositionGivenAway = 1;
playerStatusPtr->cloakPositionGivenAwayTimer = PLAYERCLOAK_POSTIONGIVENAWAYTIME; playerStatusPtr->cloakPositionGivenAwayTimer = PLAYERCLOAK_POSTIONGIVENAWAYTIME;
} }

View file

@ -1094,4 +1094,4 @@ void GetTargetingPointOfObject(DISPLAYBLOCK *objectPtr, VECTORCH *targetPtr)
} }
} }
} }

View file

@ -1017,4 +1017,4 @@ void SaveTrackPosition(TRACK_CONTROLLER* tc)
if(tc->sound) Save_SoundState(&tc->sound->activ_no); if(tc->sound) Save_SoundState(&tc->sound->activ_no);
if(tc->end_sound) Save_SoundState(&tc->end_sound->activ_no); if(tc->end_sound) Save_SoundState(&tc->end_sound->activ_no);
} }

View file

@ -114,4 +114,4 @@ void SaveTrackPosition(TRACK_CONTROLLER*);
} }
#endif #endif
#endif #endif

View file

@ -189,4 +189,4 @@ BOOL AnythingInMyModule(MODULE* my_mod)
} }
return(0); return(0);
} }

View file

@ -1,2 +1,2 @@
extern void OperateObjectInLineOfSight(void); extern void OperateObjectInLineOfSight(void);
extern BOOL AnythingInMyModule(MODULE* my_mod); extern BOOL AnythingInMyModule(MODULE* my_mod);

View file

@ -2617,7 +2617,6 @@ void HandleEffectsOfExplosion(STRATEGYBLOCK *objectToIgnorePtr, VECTORCH *centre
} }
/* effect of explosion on object's dynamics */ /* effect of explosion on object's dynamics */
{ {
VECTORCH directionOfForce;
EULER rotation; EULER rotation;
int magnitudeOfForce = 5000*damage/dynPtr->Mass; int magnitudeOfForce = 5000*damage/dynPtr->Mass;
@ -8503,8 +8502,6 @@ void PlasmaCaster_Recoil(void *playerStatus, PLAYER_WEAPON_DATA *weaponPtr) {
#endif #endif
if (weaponPtr->StateTimeOutCounter == WEAPONSTATE_INITIALTIMEOUTCOUNT) { if (weaponPtr->StateTimeOutCounter == WEAPONSTATE_INITIALTIMEOUTCOUNT) {
int multiplyer,a;
if (playerStatusPtr->PlasmaCasterCharge<Caster_MinCharge) { if (playerStatusPtr->PlasmaCasterCharge<Caster_MinCharge) {
/* Don't fire at all! */ /* Don't fire at all! */
@ -8514,6 +8511,7 @@ void PlasmaCaster_Recoil(void *playerStatus, PLAYER_WEAPON_DATA *weaponPtr) {
/* Fix plasmacaster damage. */ /* Fix plasmacaster damage. */
#if 0 #if 0
int multiplyer,a;
a=playerStatusPtr->PlasmaCasterCharge; a=playerStatusPtr->PlasmaCasterCharge;
/* These values computed by hand! */ /* These values computed by hand! */
@ -11019,7 +11017,6 @@ int PlayerFirePredPistolFlechettes(PLAYER_WEAPON_DATA *weaponPtr) {
int PredPistolSecondaryFire(PLAYER_WEAPON_DATA *weaponPtr) { int PredPistolSecondaryFire(PLAYER_WEAPON_DATA *weaponPtr) {
TEMPLATE_WEAPON_DATA *twPtr=&TemplateWeapon[weaponPtr->WeaponIDNumber]; TEMPLATE_WEAPON_DATA *twPtr=&TemplateWeapon[weaponPtr->WeaponIDNumber];
TEMPLATE_AMMO_DATA *templateAmmoPtr = &TemplateAmmo[twPtr->SecondaryAmmoID];
PLAYER_STATUS *playerStatusPtr= (PLAYER_STATUS *) (Player->ObStrategyBlock->SBdataptr); PLAYER_STATUS *playerStatusPtr= (PLAYER_STATUS *) (Player->ObStrategyBlock->SBdataptr);
LOCALASSERT(playerStatusPtr); LOCALASSERT(playerStatusPtr);
@ -11691,9 +11688,6 @@ int FireMarineTwoPistols(PLAYER_WEAPON_DATA *weaponPtr, int secondary)
DELTA_CONTROLLER *FireRight; DELTA_CONTROLLER *FireRight;
DELTA_CONTROLLER *FireLeft; DELTA_CONTROLLER *FireLeft;
EULER judder;
MATRIXCH juddermat;
/* Deduce which pistol can fire, if either? */ /* Deduce which pistol can fire, if either? */
FireRight=Get_Delta_Sequence(&PlayersWeaponHModelController,"FireRight"); FireRight=Get_Delta_Sequence(&PlayersWeaponHModelController,"FireRight");

View file

@ -14,4 +14,4 @@ void GetPathFromRegistry();
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#endif #endif

View file

@ -171,4 +171,4 @@ void GiveAllWeaponsCheat(void)
} }
} }
LoadAllWeapons(playerStatusPtr); LoadAllWeapons(playerStatusPtr);
} }

View file

@ -359,4 +359,4 @@ void Cheats :: CommitSuicide(void)
// Then apply lots of damage: // Then apply lots of damage:
CauseDamageToObject(Player->ObStrategyBlock, &certainDeath, ONE_FIXED,NULL); CauseDamageToObject(Player->ObStrategyBlock, &certainDeath, ONE_FIXED,NULL);
} }

View file

@ -29,4 +29,4 @@ extern void D3D_PlayerOnFireOverlay(void);
extern void CheckWireFrameMode(int shouldBeOn); extern void CheckWireFrameMode(int shouldBeOn);
extern void InitForceField(void); extern void InitForceField(void);
#endif #endif

View file

@ -52,4 +52,4 @@ HRESULT DPlaySetPlayerData(DPID pid, LPVOID lpData, DWORD dwSize, DWORD dwFlags)
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif

View file

@ -1353,4 +1353,4 @@ ConsoleSymbol* TextInputState :: GetPrvMatchingCompletion(void) const
} }
#endif #endif

View file

@ -6,4 +6,4 @@ extern void UpdateGammaSettings(void);
extern int RequestedGammaSetting; extern int RequestedGammaSetting;
#endif #endif

View file

@ -552,4 +552,4 @@ public:
#define OHIB Ordered_Heap_Iterator_Backward #define OHIB Ordered_Heap_Iterator_Backward
#endif // !_included_heap_tem_hpp_ #endif // !_included_heap_tem_hpp_

View file

@ -293,4 +293,3 @@ size_t Placed_Hierarchy_Sequence_Chunk::size_chunk()
chunk_size+=4+4*num_extra_data; chunk_size+=4+4*num_extra_data;
return chunk_size; return chunk_size;
} }

View file

@ -84,4 +84,4 @@ public:
}; };
#endif #endif

View file

@ -121,4 +121,4 @@ extern void RestoreAllDDGraphics(void);
//extern LPDIRECTDRAW lpDD; //extern LPDIRECTDRAW lpDD;
//extern LPDIRECTDRAWSURFACE lpDDSBack; //extern LPDIRECTDRAWSURFACE lpDDSBack;
#endif #endif

View file

@ -73,4 +73,4 @@ void IOFOCUS_Toggle(void)
/* Internal function definitions ***********************************/ /* Internal function definitions ***********************************/
}; };

View file

@ -33,4 +33,4 @@ LOADED_SOUND const * GetSound (char const * fname);
#endif #endif
#endif #endif

View file

@ -19,4 +19,4 @@ void setup_cables (Environment_Data_Chunk * envd);
void DealWithExternalObjectStategies (Environment_Data_Chunk * envd); void DealWithExternalObjectStategies (Environment_Data_Chunk * envd);
void Create_Xenoborg_Morph_Jobby(Object_Chunk * ob, int AnimationShape, MODULE * mod, MORPHCTRL * mc); void Create_Xenoborg_Morph_Jobby(Object_Chunk * ob, int AnimationShape, MODULE * mod, MORPHCTRL * mc);
void setup_sounds (Environment_Data_Chunk * envd); void setup_sounds (Environment_Data_Chunk * envd);
#endif #endif

View file

@ -39,4 +39,4 @@ class AVP_Path_Chunk : public Chunk
}; };
#endif #endif

View file

@ -26,6 +26,8 @@ extern void ThisFramesRenderingHasFinished(void);
extern int AAFontImageNumber; extern int AAFontImageNumber;
extern int FadingGameInAfterLoading; extern int FadingGameInAfterLoading;
extern void RenderBriefingText(int centreY, int brightness); extern void RenderBriefingText(int centreY, int brightness);
extern void InGameFlipBuffers();
}; };
static int CurrentPosition=0; static int CurrentPosition=0;
@ -179,7 +181,8 @@ void Start_Progress_Bar()
#endif #endif
ThisFramesRenderingHasFinished(); ThisFramesRenderingHasFinished();
FlipBuffers(); /* FlipBuffers(); */
InGameFlipBuffers();
} }
#if 0 /* TODO: disabled for port */ #if 0 /* TODO: disabled for port */
@ -217,7 +220,8 @@ void Set_Progress_Bar_Position(int pos)
#if 0 /* TODO: disabled for port */ #if 0 /* TODO: disabled for port */
if (LoadingBarFull) lpDDSBack->Blt(&LoadingBarFull_DestRect,LoadingBarFull,&LoadingBarFull_SrcRect,DDBLT_WAIT,0); if (LoadingBarFull) lpDDSBack->Blt(&LoadingBarFull_DestRect,LoadingBarFull,&LoadingBarFull_SrcRect,DDBLT_WAIT,0);
#endif #endif
FlipBuffers(); /* FlipBuffers(); */
InGameFlipBuffers();
/* /*
If this is a network game , then check the received network messages from If this is a network game , then check the received network messages from
@ -264,7 +268,7 @@ void Game_Has_Loaded(void)
CheckForWindowsMessages(); CheckForWindowsMessages();
ReadUserInput(); ReadUserInput();
// FlipBuffers(); // InGameFlipBuffers();
ColourFillBackBufferQuad ColourFillBackBufferQuad
( (
@ -305,7 +309,9 @@ void Game_Has_Loaded(void)
ThisFramesRenderingHasFinished(); ThisFramesRenderingHasFinished();
} }
FlipBuffers(); /* FlipBuffers(); */
InGameFlipBuffers();
FrameCounterHandler(); FrameCounterHandler();

View file

@ -25,4 +25,4 @@ void Set_Progress_Bar_Position(int pos);
#endif #endif

View file

@ -323,4 +323,4 @@ typedef struct
// ...linkage wrapping added by DHM 17/3/98 // ...linkage wrapping added by DHM 17/3/98
#endif #endif
#endif #endif

View file

@ -1271,5 +1271,3 @@ int TriangleWithinFrustrum(void)
/* yes, we need to draw poly */ /* yes, we need to draw poly */
return 1; return 1;
} }

View file

@ -92,22 +92,14 @@ void SetupShapePipeline(void);
void ShapePipeline(SHAPEHEADER *shapePtr); void ShapePipeline(SHAPEHEADER *shapePtr);
static void GouraudPolygon_Construct(POLYHEADER *polyPtr); static void GouraudPolygon_Construct(POLYHEADER *polyPtr);
static void GouraudPolygon_Output(POLYHEADER *inputPolyPtr, RENDERVERTEX *renderVerticesPtr);
static void TexturedPolygon_Construct(POLYHEADER *polyPtr);
static void TexturedPolygon_Output(POLYHEADER *inputPolyPtr, RENDERVERTEX *renderVerticesPtr);
static void GouraudTexturedPolygon_Construct(POLYHEADER *polyPtr); static void GouraudTexturedPolygon_Construct(POLYHEADER *polyPtr);
static void (*VertexIntensity)(RENDERVERTEX *renderVertexPtr); static void (*VertexIntensity)(RENDERVERTEX *renderVertexPtr);
static void VertexIntensity_Hierarchical(RENDERVERTEX *renderVertexPtr);
static void VertexIntensity_PreLit(RENDERVERTEX *renderVertexPtr);
static void VertexIntensity_Pred_Thermal(RENDERVERTEX *renderVertexPtr); static void VertexIntensity_Pred_Thermal(RENDERVERTEX *renderVertexPtr);
static void VertexIntensity_Pred_SeeAliens(RENDERVERTEX *renderVertexPtr); static void VertexIntensity_Pred_SeeAliens(RENDERVERTEX *renderVertexPtr);
static void VertexIntensity_Pred_SeePredatorTech(RENDERVERTEX *renderVertexPtr); static void VertexIntensity_Pred_SeePredatorTech(RENDERVERTEX *renderVertexPtr);
static void VertexIntensity_ImageIntensifier(RENDERVERTEX *renderVertexPtr); static void VertexIntensity_ImageIntensifier(RENDERVERTEX *renderVertexPtr);
static void VertexIntensity_Standard(RENDERVERTEX *renderVertexPtr);
static void VertexIntensity_Alien_Sense(RENDERVERTEX *renderVertexPtr); static void VertexIntensity_Alien_Sense(RENDERVERTEX *renderVertexPtr);
static void VertexIntensity_Standard_Opt(RENDERVERTEX *renderVertexPtr); static void VertexIntensity_Standard_Opt(RENDERVERTEX *renderVertexPtr);
@ -157,7 +149,7 @@ VECTORCH Global_LightVector={1,};
Global variables and arrays Global variables and arrays
*/ */
VECTORCH RotatedPts[maxrotpts]={1,}; VECTORCH RotatedPts[maxrotpts]={{1,}};
int ItemColour=1; int ItemColour=1;
@ -180,9 +172,9 @@ static COLOURINTENSITIES ColourIntensityArray[maxrotpts];
RENDERPOLYGON RenderPolygon={1,}; RENDERPOLYGON RenderPolygon;
RENDERVERTEX VerticesBuffer[9]={1,}; RENDERVERTEX VerticesBuffer[9]={{1,}};
static RENDERVERTEX TriangleVerticesBuffer[3]={1,}; static RENDERVERTEX TriangleVerticesBuffer[3]={{1,}};
static int *VertexNumberPtr=(int*)1; static int *VertexNumberPtr=(int*)1;
@ -5875,7 +5867,7 @@ void RenderSmokeTest(void)
{45300,0+ 1000, 26000+-1000}, {45300,0+ 1000, 26000+-1000},
}; };
extern int CurrentLightAtPlayer;
int i; int i;
if (image) a = 255-a; if (image) a = 255-a;
@ -6501,7 +6493,6 @@ void RenderLightFlare(VECTORCH *positionPtr, unsigned int colour)
// int particleSize = particlePtr->Size; // int particleSize = particlePtr->Size;
z=ONE_FIXED; z=ONE_FIXED;
{ {
extern int SmartTargetSightX, SmartTargetSightY;
extern SCREENDESCRIPTORBLOCK ScreenDescriptorBlock; extern SCREENDESCRIPTORBLOCK ScreenDescriptorBlock;
centreX = DIV_FIXED(point.vx,point.vz); centreX = DIV_FIXED(point.vx,point.vz);
centreY = DIV_FIXED(point.vy,point.vz); centreY = DIV_FIXED(point.vy,point.vz);

View file

@ -1,9 +1,11 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <ctype.h>
#include <SDL/SDL.h> #include <SDL/SDL.h>
#include <GL/gl.h> #include <GL/gl.h>
#include <GL/glext.h>
#include "fixer.h" #include "fixer.h"
@ -42,7 +44,29 @@ extern unsigned char KeyboardInput[MAX_NUMBER_OF_INPUT_KEYS];
extern unsigned char GotAnyKey; extern unsigned char GotAnyKey;
extern int NormalFrameTime; extern int NormalFrameTime;
static SDL_Surface *surface; SDL_Surface *surface;
#if GL_EXT_secondary_color
PFNGLSECONDARYCOLORPOINTEREXTPROC pglSecondaryColorPointerEXT;
#endif
/* ** */
int CheckToken(const char *str, const char *item)
{
const char *p;
int len = strlen(item);
p = str;
while ((p = strstr(p, item)) != NULL) {
char x = *(p + len);
if ( (x == 0) || (isspace(x)) )
return 1;
p += len;
}
return 0;
}
/* ** */ /* ** */
@ -63,6 +87,7 @@ void ReadJoysticks()
unsigned char *GetScreenShot24(int *width, int *height) unsigned char *GetScreenShot24(int *width, int *height)
{ {
unsigned char *buf; unsigned char *buf;
// Uint16 redtable[256], greentable[256], bluetable[256];
if (surface == NULL) { if (surface == NULL) {
return NULL; return NULL;
@ -79,7 +104,21 @@ unsigned char *GetScreenShot24(int *width, int *height)
*width = surface->w; *width = surface->w;
*height = surface->h; *height = surface->h;
#if 0
if (SDL_GetGammaRamp(redtable, greentable, bluetable) != -1) {
unsigned char *ptr;
int i;
ptr = buf;
for (i = 0; i < surface->w*surface->h; i++) {
ptr[i*3+0] = redtable[ptr[i*3+0]];
ptr[i*3+1] = greentable[ptr[i*3+1]];
ptr[i*3+2] = bluetable[ptr[i*3+2]];
ptr += 3;
}
}
#endif
return buf; return buf;
} }
@ -109,7 +148,7 @@ int SetSoftVideoMode(int Width, int Height, int Depth)
} }
if ((surface = SDL_SetVideoMode(Width, Height, Depth, SDL_SWSURFACE|SDL_DOUBLEBUF)) == NULL) { if ((surface = SDL_SetVideoMode(Width, Height, Depth, SDL_SWSURFACE|SDL_DOUBLEBUF)) == NULL) {
fprintf(stderr, "SDL SetVideoMode failed: %s\n", SDL_GetError()); fprintf(stderr, "(Software) SDL SetVideoMode failed: %s\n", SDL_GetError());
SDL_Quit(); SDL_Quit();
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
@ -149,16 +188,18 @@ int SetSoftVideoMode(int Width, int Height, int Depth)
return 0; return 0;
} }
int SetOGLVideoMode(int Width, int Height) int SetOGLVideoMode(int Width, int Height)
{ {
SDL_GrabMode isgrab; SDL_GrabMode isgrab;
int isfull; int isfull;
char *ext;
ScanDrawMode = ScanDrawD3DHardwareRGB; ScanDrawMode = ScanDrawD3DHardwareRGB;
GotMouse = 1; GotMouse = 1;
if (surface != NULL) { if (surface != NULL) {
isfull = (surface->flags & SDL_FULLSCREEN); isfull = (surface->flags & SDL_FULLSCREEN) ? 1 : 0;
isgrab = SDL_WM_GrabInput(SDL_GRAB_QUERY); isgrab = SDL_WM_GrabInput(SDL_GRAB_QUERY);
SDL_FreeSurface(surface); SDL_FreeSurface(surface);
@ -166,7 +207,9 @@ int SetOGLVideoMode(int Width, int Height)
isfull = 0; isfull = 0;
isgrab = SDL_GRAB_OFF; isgrab = SDL_GRAB_OFF;
} }
fprintf(stderr, "SDL: isfull = %d, isgrab = %d\n", isfull, isgrab);
SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 5); SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 5);
SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 5); SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 5);
SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 5); SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 5);
@ -174,7 +217,7 @@ int SetOGLVideoMode(int Width, int Height)
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
if ((surface = SDL_SetVideoMode(Width, Height, 0, SDL_OPENGL)) == NULL) { if ((surface = SDL_SetVideoMode(Width, Height, 0, SDL_OPENGL)) == NULL) {
fprintf(stderr, "SDL SetVideoMode failed: %s\n", SDL_GetError()); fprintf(stderr, "(OpenGL) SDL SetVideoMode failed: %s\n", SDL_GetError());
SDL_Quit(); SDL_Quit();
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
@ -189,13 +232,15 @@ int SetOGLVideoMode(int Width, int Height)
// SDL_WM_ToggleFullScreen(surface); // SDL_WM_ToggleFullScreen(surface);
// SDL_WM_GrabInput(SDL_GRAB_ON); // SDL_WM_GrabInput(SDL_GRAB_ON);
// SDL_ShowCursor(0); // SDL_ShowCursor(0);
fprintf(stderr, "SDL: before %08X\n", surface->flags);
if (isfull && !(surface->flags & SDL_FULLSCREEN)) { if (isfull && !(surface->flags & SDL_FULLSCREEN)) {
fprintf(stderr, "SDL: doing the fullscreen toggle\n");
SDL_WM_ToggleFullScreen(surface); SDL_WM_ToggleFullScreen(surface);
if (surface->flags & SDL_FULLSCREEN) if (surface->flags & SDL_FULLSCREEN)
SDL_ShowCursor(0); SDL_ShowCursor(0);
} }
fprintf(stderr, "SDL: after %08X\n", surface->flags);
if (isgrab == SDL_GRAB_ON) { if (isgrab == SDL_GRAB_ON) {
SDL_WM_GrabInput(SDL_GRAB_ON); SDL_WM_GrabInput(SDL_GRAB_ON);
} }
@ -213,6 +258,7 @@ int SetOGLVideoMode(int Width, int Height)
glEnable(GL_DEPTH_TEST); glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL); glDepthFunc(GL_LEQUAL);
glDepthMask(GL_TRUE);
glDepthRange(0.0, 1.0); glDepthRange(0.0, 1.0);
glEnable(GL_TEXTURE_2D); glEnable(GL_TEXTURE_2D);
@ -236,6 +282,29 @@ int SetOGLVideoMode(int Width, int Height)
ScreenDescriptorBlock.SDB_ClipUp = 0; ScreenDescriptorBlock.SDB_ClipUp = 0;
ScreenDescriptorBlock.SDB_ClipDown = Height; ScreenDescriptorBlock.SDB_ClipDown = Height;
ext = (char *)glGetString(GL_EXTENSIONS);
printf("OpenGL Extensions: %s\n", ext);
#if GL_EXT_secondary_color
pglSecondaryColorPointerEXT = NULL;
if (CheckToken(ext, "GL_EXT_seconary_color")) {
printf("Found GL_EXT_seconary_color... ");
pglSecondaryColorPointerEXT = SDL_GL_GetProcAddress("glSecondaryColorPointerEXT");
if (pglSecondaryColorPointerEXT == NULL) {
printf("but the driver lied...\n");
} else {
printf("and it's good!\n");
}
} else {
printf("GL_EXT_seconary_color not found...\n");
}
#endif
InitOpenGL();
return 0; return 0;
} }
@ -631,7 +700,7 @@ void CheckForWindowsMessages()
if ((KeyboardInput[KEY_LEFTALT]||KeyboardInput[KEY_RIGHTALT]) && DebouncedKeyboardInput[KEY_CR]) { if ((KeyboardInput[KEY_LEFTALT]||KeyboardInput[KEY_RIGHTALT]) && DebouncedKeyboardInput[KEY_CR]) {
SDL_GrabMode gm; SDL_GrabMode gm;
printf("SDL: before %08X (toggle)\n", surface->flags);
SDL_WM_ToggleFullScreen(surface); SDL_WM_ToggleFullScreen(surface);
gm = SDL_WM_GrabInput(SDL_GRAB_QUERY); gm = SDL_WM_GrabInput(SDL_GRAB_QUERY);
@ -639,6 +708,7 @@ void CheckForWindowsMessages()
SDL_ShowCursor(1); SDL_ShowCursor(1);
else else
SDL_ShowCursor(0); SDL_ShowCursor(0);
printf("SDL: after %08X (toggle)\n", surface->flags);
} }
if (KeyboardInput[KEY_LEFTCTRL] && DebouncedKeyboardInput[KEY_G]) { if (KeyboardInput[KEY_LEFTCTRL] && DebouncedKeyboardInput[KEY_G]) {
@ -668,7 +738,7 @@ void InGameFlipBuffers()
void FlipBuffers() void FlipBuffers()
{ {
SDL_GL_SwapBuffers(); SDL_Flip(surface);
} }
int ExitWindowsSystem() int ExitWindowsSystem()
@ -715,15 +785,14 @@ int InitSDL()
} }
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
InitSDL(); InitSDL();
LoadCDTrackList(); LoadCDTrackList();
SetFastRandom(); SetFastRandom();
/* WeWantAnIntro(); */
GetPathFromRegistry(); GetPathFromRegistry();
#if 0 #if 0
{ {
@ -741,7 +810,8 @@ int main(int argc, char *argv[])
#endif #endif
InitGame(); InitGame();
SetOGLVideoMode(640, 480); SetSoftVideoMode(640, 480, 16);
// SetOGLVideoMode(640, 480);
InitialVideoMode(); InitialVideoMode();
@ -977,7 +1047,8 @@ while(AvP_MainMenus())
ClearMemoryPool(); ClearMemoryPool();
SetOGLVideoMode(640, 480); SetSoftVideoMode(640, 480, 16);
// SetOGLVideoMode(640, 480);
} }
SoundSys_StopAll(); SoundSys_StopAll();

File diff suppressed because it is too large Load diff

View file

@ -21,9 +21,6 @@ int QuickStartMultiplayer=1;
DPNAME AVPDPplayerName; DPNAME AVPDPplayerName;
int glpDP; /* directplay object */ int glpDP; /* directplay object */
static pthread_t NetThread;
static pthread_mutex_t NetMutex;
BOOL DpExtInit(DWORD cGrntdBufs, DWORD cBytesPerBuf, BOOL bErrChcks) BOOL DpExtInit(DWORD cGrntdBufs, DWORD cBytesPerBuf, BOOL bErrChcks)
{ {
fprintf(stderr, "DpExtInit(%d, %d, %d)\n", cGrntdBufs, cBytesPerBuf, bErrChcks); fprintf(stderr, "DpExtInit(%d, %d, %d)\n", cGrntdBufs, cBytesPerBuf, bErrChcks);

View file

@ -381,10 +381,12 @@ int PlatPlaySound(int activeIndex)
alSourcei (ActiveSounds[activeIndex].ds3DBufferP, AL_BUFFER, alSourcei (ActiveSounds[activeIndex].ds3DBufferP, AL_BUFFER,
GameSounds[si].dsBufferP); GameSounds[si].dsBufferP);
#if 1 /* PLEASE REMOVE IFDEF! */
if (ActiveSounds[activeIndex].loop) if (ActiveSounds[activeIndex].loop)
alSourcei (ActiveSounds[activeIndex].ds3DBufferP, AL_LOOPING, AL_TRUE); alSourcei (ActiveSounds[activeIndex].ds3DBufferP, AL_LOOPING, AL_TRUE);
else else
alSourcei (ActiveSounds[activeIndex].ds3DBufferP, AL_LOOPING, AL_FALSE); alSourcei (ActiveSounds[activeIndex].ds3DBufferP, AL_LOOPING, AL_FALSE);
#endif
if (1 || ActiveSounds[activeIndex].pitch != GameSounds[si].pitch) { if (1 || ActiveSounds[activeIndex].pitch != GameSounds[si].pitch) {
PlatChangeSoundPitch(activeIndex, ActiveSounds[activeIndex].pitch); PlatChangeSoundPitch(activeIndex, ActiveSounds[activeIndex].pitch);
@ -539,12 +541,12 @@ int PlatDo3dSound(int activeIndex)
if (ActiveSounds[activeIndex].paused) { if (ActiveSounds[activeIndex].paused) {
if (distance < (ActiveSounds[activeIndex].threedeedata.outer_range + SOUND_DEACTIVATERANGE)) { if (distance < (ActiveSounds[activeIndex].threedeedata.outer_range + SOUND_DEACTIVATERANGE)) {
PlatStopSound (activeIndex); PlatStopSound (activeIndex);
#if 1 /* PLEASE REMOVE IFDEF! */
if (ActiveSounds[activeIndex].loop) if (ActiveSounds[activeIndex].loop)
alSourcei (ActiveSounds[activeIndex].ds3DBufferP, AL_LOOPING, AL_TRUE); alSourcei (ActiveSounds[activeIndex].ds3DBufferP, AL_LOOPING, AL_TRUE);
else else
alSourcei (ActiveSounds[activeIndex].ds3DBufferP, AL_LOOPING, AL_FALSE); alSourcei (ActiveSounds[activeIndex].ds3DBufferP, AL_LOOPING, AL_FALSE);
#endif
alSourcePlay (ActiveSounds[activeIndex].ds3DBufferP); alSourcePlay (ActiveSounds[activeIndex].ds3DBufferP);
newVolume = 0; newVolume = 0;
ActiveSounds[activeIndex].paused = 0; ActiveSounds[activeIndex].paused = 0;
@ -697,8 +699,9 @@ void PlatEndGameSound(SOUNDINDEX index)
unsigned int PlatMaxHWSounds() unsigned int PlatMaxHWSounds()
{ {
/*
printf("PlatMaxHWSounds()\n"); printf("PlatMaxHWSounds()\n");
*/
return 32; return 32;
} }

View file

@ -54,6 +54,10 @@ static D3DTexture *CurrentlyBoundTexture = NULL;
#define TA_MAXVERTICES 2048 #define TA_MAXVERTICES 2048
#define TA_MAXTRIANGLES 2048 #define TA_MAXTRIANGLES 2048
#if GL_EXT_secondary_color
extern PFNGLSECONDARYCOLORPOINTEREXTPROC pglSecondaryColorPointerEXT;
#endif
typedef struct VertexArray typedef struct VertexArray
{ {
GLfloat v[4]; GLfloat v[4];
@ -80,8 +84,6 @@ static VertexArray *svarr = &varr[TA_MAXVERTICES], *svarrp = &varr[TA_MAXVERTICE
static TriangleArray *starr = &tarr[TA_MAXTRIANGLES], *starrp = &tarr[TA_MAXTRIANGLES]; static TriangleArray *starr = &tarr[TA_MAXTRIANGLES], *starrp = &tarr[TA_MAXTRIANGLES];
static int svarrc, starrc; static int svarrc, starrc;
static int haslocked = 0;
/* Do not call this directly! */ /* Do not call this directly! */
static void SetTranslucencyMode(enum TRANSLUCENCY_TYPE mode) static void SetTranslucencyMode(enum TRANSLUCENCY_TYPE mode)
{ {
@ -90,8 +92,7 @@ static void SetTranslucencyMode(enum TRANSLUCENCY_TYPE mode)
if (TRIPTASTIC_CHEATMODE||MOTIONBLUR_CHEATMODE) { if (TRIPTASTIC_CHEATMODE||MOTIONBLUR_CHEATMODE) {
glBlendFunc(GL_ONE_MINUS_SRC_ALPHA, GL_SRC_ALPHA); glBlendFunc(GL_ONE_MINUS_SRC_ALPHA, GL_SRC_ALPHA);
} else { } else {
//glDisable(GL_BLEND); glBlendFunc(GL_ONE, GL_ZERO);
glBlendFunc(GL_ONE, GL_ZERO); /* this *should* be optimized */
} }
break; break;
case TRANSLUCENCY_NORMAL: case TRANSLUCENCY_NORMAL:
@ -116,9 +117,6 @@ static void SetTranslucencyMode(enum TRANSLUCENCY_TYPE mode)
fprintf(stderr, "RenderPolygon.TranslucencyMode: invalid %d\n", RenderPolygon.TranslucencyMode); fprintf(stderr, "RenderPolygon.TranslucencyMode: invalid %d\n", RenderPolygon.TranslucencyMode);
return; return;
} }
//if (mode != TRANSLUCENCY_OFF && CurrentTranslucencyMode == TRANSLUCENCY_OFF)
// glEnable(GL_BLEND);
} }
/* /*
@ -126,25 +124,58 @@ A few things:
- Vertices with a specular color are done twice. - Vertices with a specular color are done twice.
Might want to try spitting apart the three arrays and using the same vertex Might want to try spitting apart the three arrays and using the same vertex
array for both passes. array for both passes.
- Fix code for separate color support.
*/ */
void InitOpenGL()
{
CurrentTranslucencyMode = TRANSLUCENCY_OFF;
glBlendFunc(GL_ONE, GL_ZERO);
CurrentFilteringMode = FILTERING_BILINEAR_OFF;
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
CurrentlyBoundTexture = NULL;
glBindTexture(GL_TEXTURE_2D, 0);
glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(4, GL_FLOAT, sizeof(varr[0]), varr[0].v);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexCoordPointer(2, GL_FLOAT, sizeof(varr[0]), varr[0].t);
glEnableClientState(GL_COLOR_ARRAY);
glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(varr[0]), varr[0].c);
#if 0
#if GL_EXT_secondary_color
if (useseparate) {
glEnableClientState(GL_SEPARATE_COLOR_ARRAY_EXT);
pglSecondaryColorPointerEXT(4, GL_UNSIGNED_BYTE, sizeof(svarr[0]), svarr[0].c);
} else {
glDisableClientState(GL_SEPARATE_COLOR_ARRAY_EXT);
}
#endif
#endif
tarrc = 0;
tarrp = tarr;
varrc = 0;
varrp = varr;
starrc = 0;
starrp = starr;
svarrc = 0;
svarrp = svarr;
}
static void FlushTriangleBuffers(int backup) static void FlushTriangleBuffers(int backup)
{ {
int i; int i;
if (haslocked == 0) {
glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(4, GL_FLOAT, sizeof(varr[0]), varr[0].v);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexCoordPointer(2, GL_FLOAT, sizeof(varr[0]), varr[0].t);
glEnableClientState(GL_COLOR_ARRAY);
glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(varr[0]), varr[0].c);
haslocked = 1;
}
if (tarrc) { if (tarrc) {
#if 1 #if 1
glBegin(GL_TRIANGLES); glBegin(GL_TRIANGLES);
@ -242,6 +273,7 @@ static void CheckBoundTextureIsCorrect(D3DTexture *tex)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
break; break;
default: default:
break;
} }
tex->filter = CurrentFilteringMode; tex->filter = CurrentFilteringMode;
@ -267,6 +299,7 @@ static void CheckFilteringModeIsCorrect(enum FILTERING_MODE_ID filter)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
break; break;
default: default:
break;
} }
CurrentlyBoundTexture->filter = CurrentFilteringMode; CurrentlyBoundTexture->filter = CurrentFilteringMode;
@ -1717,8 +1750,6 @@ if (stringPtr == NULL) return;
void RenderString(char *stringPtr, int x, int y, int colour) void RenderString(char *stringPtr, int x, int y, int colour)
{ {
if (stringPtr == NULL) return;
D3D_RenderHUDString(stringPtr,x,y,colour); D3D_RenderHUDString(stringPtr,x,y,colour);
} }
@ -1726,8 +1757,6 @@ void RenderStringCentred(char *stringPtr, int centreX, int y, int colour)
{ {
int length = 0; int length = 0;
char *ptr = stringPtr; char *ptr = stringPtr;
if (stringPtr == NULL) return;
while(*ptr) while(*ptr)
{ {
@ -1741,8 +1770,6 @@ void RenderStringVertically(char *stringPtr, int centreX, int bottomY, int colou
struct VertexTag quadVertices[4]; struct VertexTag quadVertices[4];
int y = bottomY; int y = bottomY;
if (stringPtr == NULL) return;
quadVertices[0].X = centreX - (HUD_FONT_HEIGHT/2) - 1; quadVertices[0].X = centreX - (HUD_FONT_HEIGHT/2) - 1;
quadVertices[1].X = quadVertices[0].X; quadVertices[1].X = quadVertices[0].X;
quadVertices[2].X = quadVertices[0].X+2+HUD_FONT_HEIGHT*1; quadVertices[2].X = quadVertices[0].X+2+HUD_FONT_HEIGHT*1;
@ -2355,7 +2382,7 @@ void ColourFillBackBuffer(int FillColour)
g = ((FillColour >> 8) & 0xFF) / 255.0f; g = ((FillColour >> 8) & 0xFF) / 255.0f;
r = ((FillColour >> 16) & 0xFF) / 255.0f; r = ((FillColour >> 16) & 0xFF) / 255.0f;
a = ((FillColour >> 24) & 0xFF) / 255.0f; a = ((FillColour >> 24) & 0xFF) / 255.0f;
glClearColor(r, g, b, a); glClearColor(r, g, b, a);
glClear(GL_COLOR_BUFFER_BIT); glClear(GL_COLOR_BUFFER_BIT);

View file

@ -37,4 +37,4 @@ typedef struct
extern void Generate_Sphere(void); extern void Generate_Sphere(void);
#endif #endif

View file

@ -78,14 +78,12 @@ void StartMenuBackgroundBink()
fprintf(stderr, "StartMenuBackgroundBink()\n"); fprintf(stderr, "StartMenuBackgroundBink()\n");
} }
#if 0
int PlayMenuBackgroundBink() int PlayMenuBackgroundBink()
{ {
fprintf(stderr, "PlayMenuBackgroundBink()\n"); fprintf(stderr, "PlayMenuBackgroundBink()\n");
return 0; return 0;
} }
#endif
void EndMenuBackgroundBink() void EndMenuBackgroundBink()
{ {
@ -281,7 +279,22 @@ void UnlockSurface()
void ReleaseDDSurface(void* DDSurface) void ReleaseDDSurface(void* DDSurface)
{ {
/*
fprintf(stderr, "ReleaseDDSurface(%p)\n", DDSurface); fprintf(stderr, "ReleaseDDSurface(%p)\n", DDSurface);
*/
D3DTexture *t = (D3DTexture *)DDSurface;
if (t->id > 0) {
fprintf(stderr, "ReleaseDDSurface(%p) - OpenGL Object (tex = %d, %d, %d)\n", DDSurface, t->id, t->w, t->h);
} else {
if (t->buf) {
free(t->buf);
} else {
fprintf(stderr, "ReleaseDDSurface(%p) - What is This? (tex = %d, %d, %d)\n", DDSurface, t->id, t->w, t->h);
}
}
free(t);
} }
BOOL ChangeDirectDrawObject() BOOL ChangeDirectDrawObject()

View file

@ -283,4 +283,4 @@ public:
Object_Animation_Sequence* sequences; Object_Animation_Sequence* sequences;
}; };
#endif #endif

View file

@ -19,6 +19,8 @@ typedef DIRECTDRAWSURFACE DDSurface;
typedef struct DIRECT3DTEXTURE typedef struct DIRECT3DTEXTURE
{ {
unsigned char *buf;
int id; int id;
int w; int w;

View file

@ -500,6 +500,7 @@ void AwBackupTexture::ChoosePixelFormat(AwTl::CreateTextureParms const & _parmsR
pixelFormat.alphaB = 1; pixelFormat.alphaB = 1;
pixelFormat.validB = 1; pixelFormat.validB = 1;
pixelFormat.texB = 1;
pixelFormat.bitsPerPixel = 32; pixelFormat.bitsPerPixel = 32;
pixelFormat.redLeftShift = 0; pixelFormat.redLeftShift = 0;
pixelFormat.greenLeftShift = 8; pixelFormat.greenLeftShift = 8;
@ -513,6 +514,7 @@ void AwBackupTexture::ChoosePixelFormat(AwTl::CreateTextureParms const & _parmsR
extern "C" { extern "C" {
extern int CreateOGLTexture(D3DTexture *, unsigned char *); extern int CreateOGLTexture(D3DTexture *, unsigned char *);
extern int CreateIMGSurface(D3DTexture *, unsigned char *);
}; };
AwTl::SurfUnion AwBackupTexture::CreateTexture(AwTl::CreateTextureParms const & _parmsR) AwTl::SurfUnion AwBackupTexture::CreateTexture(AwTl::CreateTextureParms const & _parmsR)
@ -520,8 +522,11 @@ AwTl::SurfUnion AwBackupTexture::CreateTexture(AwTl::CreateTextureParms const &
using namespace AwTl; using namespace AwTl;
// fprintf(stderr, "AwBackupTexture::CreateTexture(...) This is where we could convert the image to RGB/RGBA, and so on\n"); // fprintf(stderr, "AwBackupTexture::CreateTexture(...) This is where we could convert the image to RGB/RGBA, and so on\n");
if (_parmsR.originalWidthP) *_parmsR.originalWidthP = m_nWidth;
if (_parmsR.originalHeightP) *_parmsR.originalHeightP = m_nHeight;
D3DTexture *Tex = new D3DTexture; D3DTexture *Tex = (D3DTexture *)malloc(sizeof(D3DTexture));
unsigned char *buf = (unsigned char *)malloc(m_nWidth * m_nHeight * 4); unsigned char *buf = (unsigned char *)malloc(m_nWidth * m_nHeight * 4);
@ -571,9 +576,15 @@ AwTl::SurfUnion AwBackupTexture::CreateTexture(AwTl::CreateTextureParms const &
/* temp junk */ /* temp junk */
Tex->w = m_nWidth; Tex->w = m_nWidth;
Tex->h = m_nHeight; Tex->h = m_nHeight;
CreateOGLTexture(Tex, buf); /* this will set the id */ if (pixelFormat.texB) {
free(buf); Tex->buf = NULL; /* not used */
CreateOGLTexture(Tex, buf); /* this will set the id */
free(buf);
} else {
Tex->buf = buf; /* hey, I need this! */
CreateIMGSurface(Tex, buf);
}
return static_cast<SurfUnion>(Tex); return static_cast<SurfUnion>(Tex);
#if 0 #if 0
@ -2154,6 +2165,7 @@ DDSurface * AwCreateSurface(char const * _argFormatS, ...)
pixelFormat.alphaB = 1; pixelFormat.alphaB = 1;
pixelFormat.validB = 1; pixelFormat.validB = 1;
pixelFormat.texB = 0;
pixelFormat.bitsPerPixel = 32; pixelFormat.bitsPerPixel = 32;
pixelFormat.redLeftShift = 0; pixelFormat.redLeftShift = 0;
pixelFormat.greenLeftShift = 8; pixelFormat.greenLeftShift = 8;

View file

@ -23,6 +23,7 @@ namespace AwTl {
bool palettizedB : 1; bool palettizedB : 1;
bool alphaB : 1; bool alphaB : 1;
bool validB : 1; bool validB : 1;
bool texB : 1;
unsigned bitsPerPixel; unsigned bitsPerPixel;
unsigned redLeftShift; unsigned redLeftShift;

View file

@ -724,4 +724,4 @@ private:
#endif #endif

View file

@ -393,4 +393,4 @@ struct ChunkAnimSequence
int num_verts; int num_verts;
ChunkVectorFloat* v_normal_list; ChunkVectorFloat* v_normal_list;
}; };
#endif #endif

View file

@ -20,4 +20,4 @@ void CL_Init_All(void);
}; };
#endif #endif
#endif // !_included_cl_init_h_ #endif // !_included_cl_init_h_

Some files were not shown because too many files have changed in this diff Show more