Many warnings cleaned up (Tim Beckmann)
Menus.
This commit is contained in:
parent
4508748944
commit
9f006f18fe
115 changed files with 1651 additions and 581 deletions
20
TODO
20
TODO
|
@ -1,19 +1,23 @@
|
|||
[DONE] [08/24/01] Finish OpenGL code.
|
||||
[DONE] [08/26/01] Fix sound code.
|
||||
[DONE] [11/10/01] Save/Load Game support.
|
||||
[DONE] [11/25/01] CD Audio.
|
||||
* Menus.
|
||||
* Progress bar.
|
||||
* Make vidmodes work.
|
||||
* Debug "pure virtual method called"
|
||||
* Proper file loading/saving (ignore case, search certain directories) and
|
||||
config handling (~/.avp/{ge, re, ad, md, pd}/?)
|
||||
* Command line options.
|
||||
* CD Audio.
|
||||
* Joystick support.
|
||||
* Save/Load Game support.
|
||||
* Revisit sound code.
|
||||
* GL_EXT_secondary_color
|
||||
* Revisit sound code. (Try AL_PITCH support, etc)
|
||||
* Try to get demos and regular edition to work.
|
||||
* 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
|
||||
CDs.
|
||||
* Do something with the ingame movies. Might just leave as-is.
|
||||
* Disable Mutliplayer in the Main Menu.
|
||||
* Possible Idea: implement demos?
|
||||
* See if the build process can be made easier for those who download the
|
||||
source.
|
||||
|
@ -28,5 +32,15 @@
|
|||
etc.)
|
||||
* 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
|
||||
inline.h
|
||||
* Remove unused files.
|
||||
* Squelch any unnecessary debug output
|
||||
|
|
258
src/aafont.h
258
src/aafont.h
|
@ -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 */
|
||||
};
|
|
@ -1712,4 +1712,4 @@ void SaveStrategy_Autogun(STRATEGYBLOCK* sbPtr)
|
|||
Save_SoundState(&agunStatusPointer->soundHandle);
|
||||
Save_SoundState(&agunStatusPointer->soundHandle2);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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...
|
||||
VECTORCH test_location;
|
||||
int test_distance = this_distance / 2;
|
||||
testDirn.vx *= this_distance;
|
||||
testDirn.vy *= this_distance;
|
||||
testDirn.vz *= this_distance;
|
||||
|
|
|
@ -257,4 +257,4 @@
|
|||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -45,4 +45,4 @@ extern void MakeFragments (STRATEGYBLOCK *sbptr);
|
|||
#define NO_OF_SPRITES_IN_BIG_EXPLOSION 5
|
||||
#else
|
||||
#define NO_OF_SPRITES_IN_BIG_EXPLOSION 10
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -1255,4 +1255,4 @@ void FarNpc_FlipAround(STRATEGYBLOCK *sbPtr)
|
|||
|
||||
dynPtr->OrientEuler.EulerY += (1024 + FastRandom()%1024);
|
||||
dynPtr->OrientEuler.EulerY &= wrap360;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,4 +60,4 @@ extern void FarNpc_FlipAround(STRATEGYBLOCK *sbPtr);
|
|||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -776,8 +776,6 @@ void PlotFaceHugger(STRATEGYBLOCK *sbPtr) {
|
|||
|
||||
static void Execute_FHNS_Attack(STRATEGYBLOCK *sbPtr)
|
||||
{
|
||||
extern VIEWDESCRIPTORBLOCK *ActiveVDBList[];
|
||||
|
||||
DYNAMICSBLOCK *dynPtr;
|
||||
FACEHUGGER_STATUS_BLOCK *facehuggerStatusPointer;
|
||||
|
||||
|
@ -1332,4 +1330,4 @@ void SaveStrategy_FaceHugger(STRATEGYBLOCK* sbPtr)
|
|||
Save_SoundState(&huggerStatusPointer->soundHandle);
|
||||
Save_SoundState(&huggerStatusPointer->soundHandle2);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -109,4 +109,4 @@ void Wake_Hugger(STRATEGYBLOCK *sbPtr);
|
|||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -128,4 +128,4 @@
|
|||
|
||||
extern void GeneratorBalance_NoteAIDeath();
|
||||
extern void GeneratorBalance_NotePlayerDeath();
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -41,6 +41,3 @@ typedef struct lift_door_tools_template
|
|||
|
||||
extern void* LiftDoorBehaveInit(void* bhdata, STRATEGYBLOCK* sbptr);
|
||||
extern void LiftDoorBehaveFun(STRATEGYBLOCK* sbptr);
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -815,4 +815,4 @@ static void TeleportFloorSwitches
|
|||
{
|
||||
TeleportContents(dest, src, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1149,4 +1149,4 @@ void SaveStrategy_PlacedLight(STRATEGYBLOCK* sbPtr)
|
|||
block->integrity = sbPtr->integrity;
|
||||
block->SBDamageBlock = sbPtr->SBDamageBlock;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -640,4 +640,4 @@ void SaveStrategy_LightFx(STRATEGYBLOCK* sbPtr)
|
|||
COPYELEMENT_SAVE(timer2)
|
||||
COPYELEMENT_SAVE(time_to_next_flicker_state)
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -46,4 +46,4 @@ void * LightFXBehaveInit (void * bhdata, STRATEGYBLOCK* sbptr);
|
|||
void LightFXBehaveFun (STRATEGYBLOCK* sbptr);
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -409,4 +409,4 @@
|
|||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -47,4 +47,4 @@ typedef struct message_behav_block
|
|||
}MESSAGE_BEHAV_BLOCK;
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -830,7 +830,6 @@ static void AlienNearState_Approach(STRATEGYBLOCK *sbPtr)
|
|||
|
||||
/* target acquisition ? */
|
||||
{
|
||||
extern DISPLAYBLOCK *Player;
|
||||
if(VectorDistance(&(alienStatusPointer->Target->DynPtr->Position),&(dynPtr->Position)) < ALIEN_CURVETOPLAYERDIST)
|
||||
{
|
||||
curveToPlayer = 1;
|
||||
|
@ -1327,7 +1326,6 @@ static void AlienNearState_Wander(STRATEGYBLOCK *sbPtr)
|
|||
{
|
||||
ALIEN_STATUS_BLOCK *alienStatusPointer;
|
||||
DYNAMICSBLOCK *dynPtr;
|
||||
int approachingAirDuct = 0;
|
||||
VECTORCH velocityDirection = {0,0,0};
|
||||
|
||||
LOCALASSERT(sbPtr);
|
||||
|
@ -1604,7 +1602,6 @@ static void AlienNearState_Retreat(STRATEGYBLOCK *sbPtr)
|
|||
{
|
||||
ALIEN_STATUS_BLOCK *alienStatusPointer;
|
||||
DYNAMICSBLOCK *dynPtr;
|
||||
int approachingAirDuct = 0;
|
||||
VECTORCH velocityDirection = {0,0,0};
|
||||
|
||||
LOCALASSERT(sbPtr);
|
||||
|
|
|
@ -100,4 +100,4 @@ void PAQIsDamaged(STRATEGYBLOCK *sbPtr, DAMAGE_PROFILE *damage, int multiple);
|
|||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -453,4 +453,4 @@ void SaveStrategy_PlacedHierarchy(STRATEGYBLOCK* sbPtr)
|
|||
Save_SoundState(&ph_bhv->sounds[i].activ_no);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -258,4 +258,4 @@ extern void StartPredatorSelfDestructExplosion(STRATEGYBLOCK *sbPtr);
|
|||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -4860,7 +4860,6 @@ static BOOL TargetIsFiringFlamethrowerAtQueen(STRATEGYBLOCK *sbPtr)
|
|||
static void MakeNonFragable_Recursion(SECTION_DATA *this_section_data)
|
||||
{
|
||||
SECTION_DATA *sdptr;
|
||||
int health_increment;
|
||||
|
||||
sdptr=NULL;
|
||||
|
||||
|
@ -5170,4 +5169,4 @@ void SaveStrategy_Queen(STRATEGYBLOCK* sbPtr)
|
|||
SaveHierarchy(&queenStatusPointer->HModelController);
|
||||
|
||||
Save_SoundState(&queenStatusPointer->soundHandle);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -290,4 +290,4 @@ void SaveStrategy_PlacedSound(STRATEGYBLOCK* sbPtr)
|
|||
|
||||
Save_SoundState(&sbb->activ_no);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -70,4 +70,4 @@ void StopPlacedSoundPlaying(STRATEGYBLOCK* sbptr);
|
|||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -74,4 +74,4 @@ typedef struct xeno_morph_room_data
|
|||
|
||||
} XENO_MORPH_ROOM_DATA;
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -33,4 +33,4 @@ void* InitVideoScreen(void* bhdata,STRATEGYBLOCK *sbPtr);
|
|||
void VideoScreenBehaviour(STRATEGYBLOCK *sbPtr);
|
||||
void VideoScreenIsDamaged(STRATEGYBLOCK *sbPtr, DAMAGE_PROFILE *damage, int multiple);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -995,4 +995,4 @@ void GetTargetPositionInWaypoint(WAYPOINT_VOLUME *waypoint,VECTORCH *output) {
|
|||
|
||||
GLOBALASSERT(WaypointContainsPoint(waypoint,output));
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -364,8 +364,6 @@ static STRATEGYBLOCK* InitialiseFrisbeeBehaviour_ForLoad() {
|
|||
DISPLAYBLOCK *dispPtr;
|
||||
DYNAMICSBLOCK *dynPtr;
|
||||
FRISBEE_BEHAV_BLOCK *bblk;
|
||||
int a;
|
||||
|
||||
|
||||
/* make displayblock with correct shape, etc */
|
||||
dispPtr = MakeObject(I_BehaviourFrisbee,&zeroVect);
|
||||
|
@ -3103,8 +3101,6 @@ static STRATEGYBLOCK* InitialiseDiscBehaviour_ForLoad() {
|
|||
DISPLAYBLOCK *dispPtr;
|
||||
DYNAMICSBLOCK *dynPtr;
|
||||
PC_PRED_DISC_BEHAV_BLOCK *bblk;
|
||||
int a;
|
||||
|
||||
|
||||
/* make displayblock with correct shape, etc */
|
||||
dispPtr = MakeObject(I_BehaviourPredatorDisc_SeekTrack,&zeroVect);
|
||||
|
|
|
@ -193,4 +193,4 @@ typedef struct PredatorDiscBehaviourType {
|
|||
|
||||
} PRED_DISC_BEHAV_BLOCK;
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -1886,7 +1886,6 @@ void Xeno_TurnAndTarget(STRATEGYBLOCK *sbPtr, int *ref_anglex,int *ref_angley) {
|
|||
void Xeno_Limbs_ShootTheRoof(STRATEGYBLOCK *sbPtr) {
|
||||
|
||||
XENO_STATUS_BLOCK *xenoStatusPointer;
|
||||
int anglex,angley;
|
||||
|
||||
LOCALASSERT(sbPtr);
|
||||
xenoStatusPointer = (XENO_STATUS_BLOCK *)(sbPtr->SBdataptr);
|
||||
|
@ -5305,4 +5304,4 @@ void SaveStrategy_Xenoborg(STRATEGYBLOCK* sbPtr)
|
|||
|
||||
Save_SoundState(&xenoStatusPointer->soundHandle1);
|
||||
Save_SoundState(&xenoStatusPointer->soundHandle2);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -231,4 +231,4 @@
|
|||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -445,4 +445,4 @@ void SaveStrategy_Grapple(STRATEGYBLOCK* sbPtr)
|
|||
|
||||
block->dynamics = *sbPtr->DynPtr;
|
||||
block->dynamics.CollisionReportPtr=0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1140,4 +1140,4 @@ extern int AnyCheatModesAllowed(void)
|
|||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ extern MAPBLOCK6 Term_Type6;
|
|||
extern MODULEMAPBLOCK AvpCompiledMaps[];
|
||||
|
||||
MAPHEADER Map[]={
|
||||
|
||||
{
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
|
@ -26,7 +26,8 @@ MAPHEADER Map[]={
|
|||
0,
|
||||
0,
|
||||
0,
|
||||
&Player_and_Camera_Type8[0],
|
||||
&Player_and_Camera_Type8[0]
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
@ -91,8 +92,8 @@ MAPBLOCK6 Empty_Landscape_Type6 = {
|
|||
|
||||
-1, /* No shape */
|
||||
|
||||
0,0,0, /* Loc */
|
||||
0,0,0, /* Orient */
|
||||
{0,0,0}, /* Loc */
|
||||
{0,0,0}, /* Orient */
|
||||
|
||||
ObFlag_MultLSrc
|
||||
/*| ObFlag_BFCRO*/
|
||||
|
@ -125,8 +126,8 @@ MAPBLOCK6 Empty_Object_Type6 = {
|
|||
|
||||
-1, /* No shape */
|
||||
|
||||
0,0,0, /* Loc */
|
||||
0,0,0, /* Orient */
|
||||
{0,0,0}, /* Loc */
|
||||
{0,0,0}, /* Orient */
|
||||
|
||||
ObFlag_MultLSrc |
|
||||
/*| ObFlag_BFCRO*/
|
||||
|
@ -157,8 +158,8 @@ MAPBLOCK6 Term_Type6 = {
|
|||
|
||||
MapType_Term,
|
||||
0,
|
||||
0,0,0,
|
||||
0,0,0,
|
||||
{0,0,0},
|
||||
{0,0,0},
|
||||
0, /* Flags */
|
||||
|
||||
#if StandardStrategyAndCollisions
|
||||
|
@ -352,8 +353,8 @@ MODULEMAPBLOCK AvpCompiledMaps[] = {
|
|||
{
|
||||
MapType_Term, /* Map Type Function */
|
||||
0, /* Shape */
|
||||
0,0,0, /* Loc */
|
||||
0,0,0, /* Orient */
|
||||
{0,0,0}, /* Loc */
|
||||
{0,0,0}, /* Orient */
|
||||
0, /* Flags 1 */
|
||||
0, /* Flags 2 */
|
||||
0, /* Flags 3 */
|
||||
|
@ -371,12 +372,12 @@ MODULEMAPBLOCK AvpCompiledMaps[] = {
|
|||
0, /* MapMass */
|
||||
0,0,0, /* MapNewtonV */
|
||||
#endif
|
||||
0,0,0, /* MapOrigin */
|
||||
{0,0,0}, /* MapOrigin */
|
||||
0, /* MapSimShapes */
|
||||
0, /* MapViewType */
|
||||
0, /* MapMPtr */
|
||||
0, /* MapDPtr */
|
||||
0,0,0, /* MapMOffset */
|
||||
{0,0,0}, /* MapMOffset */
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -388,8 +389,8 @@ MODULE Empty_Module = {
|
|||
"null", /* char m_name[] */
|
||||
0, /* int m_index */
|
||||
0, /* int m_flags */
|
||||
0,0,0, /* VECTOR m_world */
|
||||
"null", /* MREF m_ext */
|
||||
{0,0,0}, /* VECTOR m_world */
|
||||
{"null"}, /* MREF m_ext */
|
||||
0, /* int m_ext_scale */
|
||||
0, /* int m_maxx */
|
||||
0, /* int m_minx */
|
||||
|
@ -399,22 +400,22 @@ MODULE Empty_Module = {
|
|||
0, /* int m_minz */
|
||||
0, /* MODULEMAPBLOCK *m_mapptr */
|
||||
0, /* struct displayblock *m_dptr */
|
||||
"null", /* MREF m_vptr */
|
||||
{"null"}, /* MREF m_vptr */
|
||||
0, /* VMODULE *m_v_ptrs */
|
||||
0, /* struct module **m_link_ptrs */
|
||||
// 0, /* VIEWPORT *m_viewports */
|
||||
0, /* MODULETABLEHEADER *m_table */
|
||||
mfun_null, /* MFUNCTION m_ifvisible */
|
||||
mfun_null, /* MFUNCTION m_ifvinside */
|
||||
"null", /* MREF m_funref */
|
||||
{"null"}, /* MREF m_funref */
|
||||
0, /* Strategy block * */
|
||||
0, /* num lights*/
|
||||
NULL, /* pointer to light blocks*/
|
||||
NULL, /* pointer to extraitemdata */
|
||||
|
||||
{0,0,0,
|
||||
0,0,0,
|
||||
0,0,0,
|
||||
0,0,0,
|
||||
0,0,0},
|
||||
|
||||
#if SupportWindows95
|
||||
0,
|
||||
|
@ -437,8 +438,8 @@ MODULEMAPBLOCK Empty_Module_Map =
|
|||
|
||||
MapType_Default, /* MapType */
|
||||
-1, /* MapShape */
|
||||
0, 0, 0, /* MapWorld */
|
||||
0, 0, 0, /* MapEuler */ /* Orient */
|
||||
{0, 0, 0}, /* MapWorld */
|
||||
{0, 0, 0}, /* MapEuler */ /* Orient */
|
||||
|
||||
0
|
||||
| ObFlag_MultLSrc /* MapFlags */
|
||||
|
@ -461,13 +462,13 @@ MODULEMAPBLOCK Empty_Module_Map =
|
|||
0, /* Interior Type */
|
||||
|
||||
LightType_PerVertex, /* MapLightType */
|
||||
0,0,0, /* MapOrigin */
|
||||
{0,0,0}, /* MapOrigin */
|
||||
0, /* MapSimShapes */
|
||||
0, /* MapViewType */
|
||||
|
||||
0, /* MapMPtr */
|
||||
0, /* MapDPtr */
|
||||
0,0,0, /* MapMOffset */
|
||||
{0,0,0}, /* MapMOffset */
|
||||
|
||||
};
|
||||
|
||||
|
@ -488,8 +489,8 @@ MODULEMAPBLOCK TempModuleMap = \
|
|||
MapType_Default, /* MapType */
|
||||
-1, /* MapShape */
|
||||
|
||||
0, 0, 0, /* MapWorld */
|
||||
0, 0, 0, /* MapEuler */ /* Orient */
|
||||
{0, 0, 0}, /* MapWorld */
|
||||
{0, 0, 0}, /* MapEuler */ /* Orient */
|
||||
|
||||
0 /* flags 1*/
|
||||
| ObFlag_NoInfLSrc
|
||||
|
@ -510,12 +511,12 @@ MODULEMAPBLOCK TempModuleMap = \
|
|||
#else
|
||||
LightType_PerVertex, /* MapLightType */
|
||||
#endif
|
||||
0,0,0, /* MapOrigin */
|
||||
{0,0,0}, /* MapOrigin */
|
||||
0, /* MapSimShapes */
|
||||
0, /* MapViewType */
|
||||
0, /* MapMPtr */
|
||||
0, /* MapDPtr */
|
||||
0,0,0 /* MapMOffset */
|
||||
{0,0,0} /* MapMOffset */
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -69,4 +69,4 @@ extern void DrawDatabaseBackground(void);
|
|||
|
||||
extern void UpdateDatabaseScreen(void);
|
||||
|
||||
extern int DatabaseStateChange();
|
||||
extern int DatabaseStateChange();
|
||||
|
|
|
@ -1726,7 +1726,9 @@ ATTACK_DATA Alien_Attacks[] = {
|
|||
0, /* Multiplayer_Code */
|
||||
0, /* Unique_Code */
|
||||
0, /* wound_flags */
|
||||
AMMO_NONE, /* damage_type */
|
||||
{
|
||||
AMMO_NONE /* damage_type */
|
||||
},
|
||||
0, /* Crouching */
|
||||
0, /* Pouncing */
|
||||
},
|
||||
|
@ -1807,7 +1809,9 @@ ATTACK_DATA Wristblade_Attacks[] = {
|
|||
0, /* Multiplayer_Code */
|
||||
0, /* Unique_Code */
|
||||
0, /* wound_flags */
|
||||
AMMO_NONE, /* damage_type */
|
||||
{
|
||||
AMMO_NONE /* damage_type */
|
||||
},
|
||||
0, /* Crouching */
|
||||
0, /* Pouncing */
|
||||
},
|
||||
|
@ -1904,7 +1908,9 @@ ATTACK_DATA PredStaff_Attacks[] = {
|
|||
0, /* Multiplayer_Code */
|
||||
0, /* Unique_Code */
|
||||
0, /* wound_flags */
|
||||
AMMO_NONE, /* damage_type */
|
||||
{
|
||||
AMMO_NONE /* damage_type */
|
||||
},
|
||||
0, /* Crouching */
|
||||
0, /* Pouncing */
|
||||
},
|
||||
|
|
|
@ -1173,4 +1173,4 @@ void Save_Decals()
|
|||
*decal = DecalStorage[i];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,4 +35,4 @@ extern void SetToMinimalDetailLevels(void);
|
|||
|
||||
extern void SetDetailLevelsFromMenu(void);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -8235,4 +8235,4 @@ BOOL AreDamageProfilesEqual(DAMAGE_PROFILE* profile1,DAMAGE_PROFILE* profile2)
|
|||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -467,4 +467,4 @@ void CreateGameSpecificConsoleVariables(void)
|
|||
|
||||
}
|
||||
|
||||
}; // extern "C"
|
||||
}; // extern "C"
|
||||
|
|
|
@ -1388,8 +1388,6 @@ void Process_Section(HMODELCONTROLLER *controller,SECTION_DATA *this_section_dat
|
|||
&&(render)) {
|
||||
/* Unreal things don't get plotted, either. */
|
||||
|
||||
extern MATRIXCH IdentityMatrix;
|
||||
|
||||
DISPLAYBLOCK dummy_displayblock;
|
||||
SHAPEHEADER *shape_to_use;
|
||||
|
||||
|
@ -2118,8 +2116,6 @@ static void HMTimer_Kernel(HMODELCONTROLLER *controller) {
|
|||
|
||||
void DoHModel(HMODELCONTROLLER *controller, DISPLAYBLOCK *dptr) {
|
||||
|
||||
extern int NormalFrameTime;
|
||||
|
||||
GLOBALASSERT(controller);
|
||||
GLOBALASSERT(dptr);
|
||||
|
||||
|
@ -2245,8 +2241,6 @@ void DoHModelTimer_Recursion(HMODELCONTROLLER *controller,SECTION_DATA *this_sec
|
|||
|
||||
void DoHModelTimer(HMODELCONTROLLER *controller) {
|
||||
|
||||
extern int NormalFrameTime;
|
||||
|
||||
/* 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
|
||||
OTHER HMODEL FUNCTIONS on this model until the next frame! */
|
||||
|
|
|
@ -2070,7 +2070,6 @@ static void DrawAlienTeeth(void)
|
|||
|
||||
if (AlienTeethOffset)
|
||||
{
|
||||
extern int CloakingPhase;
|
||||
int offsetY;
|
||||
|
||||
DISPLAYBLOCK displayblock;
|
||||
|
|
|
@ -255,4 +255,4 @@ extern void DrawOnScreenMessage(unsigned char *messagePtr);
|
|||
}; /* end of C-Linkage spec */
|
||||
#endif
|
||||
|
||||
#endif /* one-time only guard */
|
||||
#endif /* one-time only guard */
|
||||
|
|
|
@ -137,4 +137,4 @@ void InitCharacterMSLReferences()
|
|||
int GetMSLPosFromEnum(CHARACTER_SHAPES shape_enum)
|
||||
{
|
||||
return(LoadedShapesInMSL[shape_enum]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,4 +50,4 @@ typedef struct
|
|||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -621,4 +621,4 @@ void MissionObjective :: TestCompleteNext(void)
|
|||
Yes, // OurBool bHidden
|
||||
|
||||
"LANDING BEACON ACTIVATED. STAND CLEAR AND PREPARE FOR EVAC. ", // ProjChar* pProjCh_TriggeringFeedback,
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -208,4 +208,4 @@ extern void PaintBallMode_Randomise(void)
|
|||
|
||||
PaintBallMode.CurrentDecalRotation = FastRandom()&4095;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,4 +31,4 @@ extern void PaintBallMode_ChangeSelectedDecalID(int delta);
|
|||
extern void PaintBallMode_ChangeSize(int delta);
|
||||
extern void PaintBallMode_AddDecal(void);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -5290,7 +5290,6 @@ extern void RenderParticlesInMirror(void)
|
|||
while(numOfObjects)
|
||||
{
|
||||
DISPLAYBLOCK *objectPtr = OnScreenBlockList[--numOfObjects];
|
||||
STRATEGYBLOCK *sbPtr = objectPtr->ObStrategyBlock;
|
||||
|
||||
if (!objectPtr->ObShape && objectPtr->SfxPtr)
|
||||
{
|
||||
|
@ -5659,4 +5658,4 @@ void Save_PheromoneTrails()
|
|||
*trail = TrailStorage[i];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -94,4 +94,4 @@ int PointIsInModule(MODULE* thisModule, VECTORCH* thisPoint);
|
|||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -28,4 +28,4 @@ int AIModuleAdmitsPheromones(AIMODULE *targetModule);
|
|||
#if SUPER_PHEROMONE_SYSTEM
|
||||
void AddMarinePheromones(AIMODULE *targetModule);
|
||||
void MaintainMarineTargetZone(AIMODULE *targetModule);
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -1702,7 +1702,6 @@ extern void ThrowAFlare(void)
|
|||
|
||||
if (NumberOfFlaresActive<4)
|
||||
{
|
||||
extern VECTORCH CentreOfMuzzleOffset;
|
||||
extern VIEWDESCRIPTORBLOCK *ActiveVDBList[];
|
||||
VIEWDESCRIPTORBLOCK *VDBPtr = ActiveVDBList[0];
|
||||
MATRIXCH mat = VDBPtr->VDB_Mat;
|
||||
|
|
|
@ -82,4 +82,4 @@ extern void ExecuteFreeMovement(STRATEGYBLOCK* sbPtr);
|
|||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -73,7 +73,7 @@ MODULEMAPBLOCK VisibilityDefaultObjectMap =
|
|||
{
|
||||
MapType_Default,
|
||||
I_ShapeCube, /* this is a default value */
|
||||
0,0,0,
|
||||
0,0,0,
|
||||
0,0,0,
|
||||
#if StandardStrategyAndCollisions
|
||||
ObFlag_Dynamic|ObFlag_NewtonMovement|ObFlag_MatMul,
|
||||
|
|
|
@ -96,4 +96,4 @@ extern void SaveGame();
|
|||
extern void LoadSavedGame();
|
||||
extern void ResetNumberOfSaves();
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -74,4 +74,4 @@ void PlayQueenSound(int VoiceType,int SoundCategory,int PitchShift,int* External
|
|||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -293,4 +293,4 @@ void HandleObjectOnFire(DISPLAYBLOCK *dispPtr)
|
|||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,4 +48,4 @@ extern void DrawSfxObject(struct displayblock *dispPtr);
|
|||
|
||||
extern void HandleSfxForObject(DISPLAYBLOCK *dispPtr);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -745,4 +745,4 @@ void GivePlayerCloakAway(void) {
|
|||
|
||||
playerStatusPtr->cloakPositionGivenAway = 1;
|
||||
playerStatusPtr->cloakPositionGivenAwayTimer = PLAYERCLOAK_POSTIONGIVENAWAYTIME;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1094,4 +1094,4 @@ void GetTargetingPointOfObject(DISPLAYBLOCK *objectPtr, VECTORCH *targetPtr)
|
|||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1017,4 +1017,4 @@ void SaveTrackPosition(TRACK_CONTROLLER* tc)
|
|||
if(tc->sound) Save_SoundState(&tc->sound->activ_no);
|
||||
if(tc->end_sound) Save_SoundState(&tc->end_sound->activ_no);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -114,4 +114,4 @@ void SaveTrackPosition(TRACK_CONTROLLER*);
|
|||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -189,4 +189,4 @@ BOOL AnythingInMyModule(MODULE* my_mod)
|
|||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
extern void OperateObjectInLineOfSight(void);
|
||||
extern BOOL AnythingInMyModule(MODULE* my_mod);
|
||||
extern BOOL AnythingInMyModule(MODULE* my_mod);
|
||||
|
|
|
@ -2617,7 +2617,6 @@ void HandleEffectsOfExplosion(STRATEGYBLOCK *objectToIgnorePtr, VECTORCH *centre
|
|||
}
|
||||
/* effect of explosion on object's dynamics */
|
||||
{
|
||||
VECTORCH directionOfForce;
|
||||
EULER rotation;
|
||||
int magnitudeOfForce = 5000*damage/dynPtr->Mass;
|
||||
|
||||
|
@ -8503,8 +8502,6 @@ void PlasmaCaster_Recoil(void *playerStatus, PLAYER_WEAPON_DATA *weaponPtr) {
|
|||
#endif
|
||||
|
||||
if (weaponPtr->StateTimeOutCounter == WEAPONSTATE_INITIALTIMEOUTCOUNT) {
|
||||
|
||||
int multiplyer,a;
|
||||
|
||||
if (playerStatusPtr->PlasmaCasterCharge<Caster_MinCharge) {
|
||||
/* Don't fire at all! */
|
||||
|
@ -8514,6 +8511,7 @@ void PlasmaCaster_Recoil(void *playerStatus, PLAYER_WEAPON_DATA *weaponPtr) {
|
|||
|
||||
/* Fix plasmacaster damage. */
|
||||
#if 0
|
||||
int multiplyer,a;
|
||||
a=playerStatusPtr->PlasmaCasterCharge;
|
||||
|
||||
/* These values computed by hand! */
|
||||
|
@ -11019,7 +11017,6 @@ int PlayerFirePredPistolFlechettes(PLAYER_WEAPON_DATA *weaponPtr) {
|
|||
int PredPistolSecondaryFire(PLAYER_WEAPON_DATA *weaponPtr) {
|
||||
|
||||
TEMPLATE_WEAPON_DATA *twPtr=&TemplateWeapon[weaponPtr->WeaponIDNumber];
|
||||
TEMPLATE_AMMO_DATA *templateAmmoPtr = &TemplateAmmo[twPtr->SecondaryAmmoID];
|
||||
PLAYER_STATUS *playerStatusPtr= (PLAYER_STATUS *) (Player->ObStrategyBlock->SBdataptr);
|
||||
|
||||
LOCALASSERT(playerStatusPtr);
|
||||
|
@ -11691,9 +11688,6 @@ int FireMarineTwoPistols(PLAYER_WEAPON_DATA *weaponPtr, int secondary)
|
|||
DELTA_CONTROLLER *FireRight;
|
||||
DELTA_CONTROLLER *FireLeft;
|
||||
|
||||
EULER judder;
|
||||
MATRIXCH juddermat;
|
||||
|
||||
/* Deduce which pistol can fire, if either? */
|
||||
|
||||
FireRight=Get_Delta_Sequence(&PlayersWeaponHModelController,"FireRight");
|
||||
|
|
|
@ -14,4 +14,4 @@ void GetPathFromRegistry();
|
|||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -171,4 +171,4 @@ void GiveAllWeaponsCheat(void)
|
|||
}
|
||||
}
|
||||
LoadAllWeapons(playerStatusPtr);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -359,4 +359,4 @@ void Cheats :: CommitSuicide(void)
|
|||
// Then apply lots of damage:
|
||||
|
||||
CauseDamageToObject(Player->ObStrategyBlock, &certainDeath, ONE_FIXED,NULL);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,4 +29,4 @@ extern void D3D_PlayerOnFireOverlay(void);
|
|||
extern void CheckWireFrameMode(int shouldBeOn);
|
||||
|
||||
extern void InitForceField(void);
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -52,4 +52,4 @@ HRESULT DPlaySetPlayerData(DPID pid, LPVOID lpData, DWORD dwSize, DWORD dwFlags)
|
|||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -1353,4 +1353,4 @@ ConsoleSymbol* TextInputState :: GetPrvMatchingCompletion(void) const
|
|||
}
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -6,4 +6,4 @@ extern void UpdateGammaSettings(void);
|
|||
extern int RequestedGammaSetting;
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -552,4 +552,4 @@ public:
|
|||
|
||||
#define OHIB Ordered_Heap_Iterator_Backward
|
||||
|
||||
#endif // !_included_heap_tem_hpp_
|
||||
#endif // !_included_heap_tem_hpp_
|
||||
|
|
|
@ -293,4 +293,3 @@ size_t Placed_Hierarchy_Sequence_Chunk::size_chunk()
|
|||
chunk_size+=4+4*num_extra_data;
|
||||
return chunk_size;
|
||||
}
|
||||
|
||||
|
|
|
@ -84,4 +84,4 @@ public:
|
|||
};
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -121,4 +121,4 @@ extern void RestoreAllDDGraphics(void);
|
|||
//extern LPDIRECTDRAW lpDD;
|
||||
//extern LPDIRECTDRAWSURFACE lpDDSBack;
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -73,4 +73,4 @@ void IOFOCUS_Toggle(void)
|
|||
|
||||
/* Internal function definitions ***********************************/
|
||||
|
||||
};
|
||||
};
|
||||
|
|
|
@ -33,4 +33,4 @@ LOADED_SOUND const * GetSound (char const * fname);
|
|||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -19,4 +19,4 @@ void setup_cables (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 setup_sounds (Environment_Data_Chunk * envd);
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -39,4 +39,4 @@ class AVP_Path_Chunk : public Chunk
|
|||
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -26,6 +26,8 @@ extern void ThisFramesRenderingHasFinished(void);
|
|||
extern int AAFontImageNumber;
|
||||
extern int FadingGameInAfterLoading;
|
||||
extern void RenderBriefingText(int centreY, int brightness);
|
||||
|
||||
extern void InGameFlipBuffers();
|
||||
};
|
||||
|
||||
static int CurrentPosition=0;
|
||||
|
@ -179,7 +181,8 @@ void Start_Progress_Bar()
|
|||
#endif
|
||||
ThisFramesRenderingHasFinished();
|
||||
|
||||
FlipBuffers();
|
||||
/* FlipBuffers(); */
|
||||
InGameFlipBuffers();
|
||||
}
|
||||
|
||||
#if 0 /* TODO: disabled for port */
|
||||
|
@ -217,7 +220,8 @@ void Set_Progress_Bar_Position(int pos)
|
|||
#if 0 /* TODO: disabled for port */
|
||||
if (LoadingBarFull) lpDDSBack->Blt(&LoadingBarFull_DestRect,LoadingBarFull,&LoadingBarFull_SrcRect,DDBLT_WAIT,0);
|
||||
#endif
|
||||
FlipBuffers();
|
||||
/* FlipBuffers(); */
|
||||
InGameFlipBuffers();
|
||||
|
||||
/*
|
||||
If this is a network game , then check the received network messages from
|
||||
|
@ -264,7 +268,7 @@ void Game_Has_Loaded(void)
|
|||
CheckForWindowsMessages();
|
||||
ReadUserInput();
|
||||
|
||||
// FlipBuffers();
|
||||
// InGameFlipBuffers();
|
||||
|
||||
ColourFillBackBufferQuad
|
||||
(
|
||||
|
@ -305,7 +309,9 @@ void Game_Has_Loaded(void)
|
|||
ThisFramesRenderingHasFinished();
|
||||
}
|
||||
|
||||
FlipBuffers();
|
||||
/* FlipBuffers(); */
|
||||
InGameFlipBuffers();
|
||||
|
||||
FrameCounterHandler();
|
||||
|
||||
|
||||
|
|
|
@ -25,4 +25,4 @@ void Set_Progress_Bar_Position(int pos);
|
|||
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -323,4 +323,4 @@ typedef struct
|
|||
// ...linkage wrapping added by DHM 17/3/98
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -1271,5 +1271,3 @@ int TriangleWithinFrustrum(void)
|
|||
/* yes, we need to draw poly */
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
19
src/kshape.c
19
src/kshape.c
|
@ -92,22 +92,14 @@ void SetupShapePipeline(void);
|
|||
void ShapePipeline(SHAPEHEADER *shapePtr);
|
||||
|
||||
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 (*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_SeeAliens(RENDERVERTEX *renderVertexPtr);
|
||||
static void VertexIntensity_Pred_SeePredatorTech(RENDERVERTEX *renderVertexPtr);
|
||||
static void VertexIntensity_ImageIntensifier(RENDERVERTEX *renderVertexPtr);
|
||||
static void VertexIntensity_Standard(RENDERVERTEX *renderVertexPtr);
|
||||
static void VertexIntensity_Alien_Sense(RENDERVERTEX *renderVertexPtr);
|
||||
|
||||
static void VertexIntensity_Standard_Opt(RENDERVERTEX *renderVertexPtr);
|
||||
|
@ -157,7 +149,7 @@ VECTORCH Global_LightVector={1,};
|
|||
Global variables and arrays
|
||||
*/
|
||||
|
||||
VECTORCH RotatedPts[maxrotpts]={1,};
|
||||
VECTORCH RotatedPts[maxrotpts]={{1,}};
|
||||
int ItemColour=1;
|
||||
|
||||
|
||||
|
@ -180,9 +172,9 @@ static COLOURINTENSITIES ColourIntensityArray[maxrotpts];
|
|||
|
||||
|
||||
|
||||
RENDERPOLYGON RenderPolygon={1,};
|
||||
RENDERVERTEX VerticesBuffer[9]={1,};
|
||||
static RENDERVERTEX TriangleVerticesBuffer[3]={1,};
|
||||
RENDERPOLYGON RenderPolygon;
|
||||
RENDERVERTEX VerticesBuffer[9]={{1,}};
|
||||
static RENDERVERTEX TriangleVerticesBuffer[3]={{1,}};
|
||||
|
||||
static int *VertexNumberPtr=(int*)1;
|
||||
|
||||
|
@ -5875,7 +5867,7 @@ void RenderSmokeTest(void)
|
|||
{45300,0+ 1000, 26000+-1000},
|
||||
|
||||
};
|
||||
extern int CurrentLightAtPlayer;
|
||||
|
||||
int i;
|
||||
|
||||
if (image) a = 255-a;
|
||||
|
@ -6501,7 +6493,6 @@ void RenderLightFlare(VECTORCH *positionPtr, unsigned int colour)
|
|||
// int particleSize = particlePtr->Size;
|
||||
z=ONE_FIXED;
|
||||
{
|
||||
extern int SmartTargetSightX, SmartTargetSightY;
|
||||
extern SCREENDESCRIPTORBLOCK ScreenDescriptorBlock;
|
||||
centreX = DIV_FIXED(point.vx,point.vz);
|
||||
centreY = DIV_FIXED(point.vy,point.vz);
|
||||
|
|
101
src/main.c
101
src/main.c
|
@ -1,9 +1,11 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include <SDL/SDL.h>
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glext.h>
|
||||
|
||||
#include "fixer.h"
|
||||
|
||||
|
@ -42,7 +44,29 @@ extern unsigned char KeyboardInput[MAX_NUMBER_OF_INPUT_KEYS];
|
|||
extern unsigned char GotAnyKey;
|
||||
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 *buf;
|
||||
// Uint16 redtable[256], greentable[256], bluetable[256];
|
||||
|
||||
if (surface == NULL) {
|
||||
return NULL;
|
||||
|
@ -79,7 +104,21 @@ unsigned char *GetScreenShot24(int *width, int *height)
|
|||
|
||||
*width = surface->w;
|
||||
*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;
|
||||
}
|
||||
|
||||
|
@ -109,7 +148,7 @@ int SetSoftVideoMode(int Width, int Height, int Depth)
|
|||
}
|
||||
|
||||
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();
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
@ -149,16 +188,18 @@ int SetSoftVideoMode(int Width, int Height, int Depth)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int SetOGLVideoMode(int Width, int Height)
|
||||
{
|
||||
SDL_GrabMode isgrab;
|
||||
int isfull;
|
||||
char *ext;
|
||||
|
||||
ScanDrawMode = ScanDrawD3DHardwareRGB;
|
||||
GotMouse = 1;
|
||||
|
||||
if (surface != NULL) {
|
||||
isfull = (surface->flags & SDL_FULLSCREEN);
|
||||
isfull = (surface->flags & SDL_FULLSCREEN) ? 1 : 0;
|
||||
isgrab = SDL_WM_GrabInput(SDL_GRAB_QUERY);
|
||||
|
||||
SDL_FreeSurface(surface);
|
||||
|
@ -166,7 +207,9 @@ int SetOGLVideoMode(int Width, int Height)
|
|||
isfull = 0;
|
||||
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_GREEN_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);
|
||||
|
||||
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();
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
@ -189,13 +232,15 @@ int SetOGLVideoMode(int Width, int Height)
|
|||
// SDL_WM_ToggleFullScreen(surface);
|
||||
// SDL_WM_GrabInput(SDL_GRAB_ON);
|
||||
// SDL_ShowCursor(0);
|
||||
|
||||
|
||||
fprintf(stderr, "SDL: before %08X\n", surface->flags);
|
||||
if (isfull && !(surface->flags & SDL_FULLSCREEN)) {
|
||||
fprintf(stderr, "SDL: doing the fullscreen toggle\n");
|
||||
SDL_WM_ToggleFullScreen(surface);
|
||||
if (surface->flags & SDL_FULLSCREEN)
|
||||
SDL_ShowCursor(0);
|
||||
}
|
||||
|
||||
fprintf(stderr, "SDL: after %08X\n", surface->flags);
|
||||
if (isgrab == SDL_GRAB_ON) {
|
||||
SDL_WM_GrabInput(SDL_GRAB_ON);
|
||||
}
|
||||
|
@ -213,6 +258,7 @@ int SetOGLVideoMode(int Width, int Height)
|
|||
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
glDepthFunc(GL_LEQUAL);
|
||||
glDepthMask(GL_TRUE);
|
||||
glDepthRange(0.0, 1.0);
|
||||
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
|
@ -236,6 +282,29 @@ int SetOGLVideoMode(int Width, int Height)
|
|||
ScreenDescriptorBlock.SDB_ClipUp = 0;
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -631,7 +700,7 @@ void CheckForWindowsMessages()
|
|||
|
||||
if ((KeyboardInput[KEY_LEFTALT]||KeyboardInput[KEY_RIGHTALT]) && DebouncedKeyboardInput[KEY_CR]) {
|
||||
SDL_GrabMode gm;
|
||||
|
||||
printf("SDL: before %08X (toggle)\n", surface->flags);
|
||||
SDL_WM_ToggleFullScreen(surface);
|
||||
|
||||
gm = SDL_WM_GrabInput(SDL_GRAB_QUERY);
|
||||
|
@ -639,6 +708,7 @@ void CheckForWindowsMessages()
|
|||
SDL_ShowCursor(1);
|
||||
else
|
||||
SDL_ShowCursor(0);
|
||||
printf("SDL: after %08X (toggle)\n", surface->flags);
|
||||
}
|
||||
|
||||
if (KeyboardInput[KEY_LEFTCTRL] && DebouncedKeyboardInput[KEY_G]) {
|
||||
|
@ -668,7 +738,7 @@ void InGameFlipBuffers()
|
|||
|
||||
void FlipBuffers()
|
||||
{
|
||||
SDL_GL_SwapBuffers();
|
||||
SDL_Flip(surface);
|
||||
}
|
||||
|
||||
int ExitWindowsSystem()
|
||||
|
@ -715,15 +785,14 @@ int InitSDL()
|
|||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
||||
|
||||
{
|
||||
InitSDL();
|
||||
|
||||
LoadCDTrackList();
|
||||
|
||||
SetFastRandom();
|
||||
|
||||
/* WeWantAnIntro(); */
|
||||
GetPathFromRegistry();
|
||||
#if 0
|
||||
{
|
||||
|
@ -741,7 +810,8 @@ int main(int argc, char *argv[])
|
|||
#endif
|
||||
InitGame();
|
||||
|
||||
SetOGLVideoMode(640, 480);
|
||||
SetSoftVideoMode(640, 480, 16);
|
||||
// SetOGLVideoMode(640, 480);
|
||||
|
||||
InitialVideoMode();
|
||||
|
||||
|
@ -977,7 +1047,8 @@ while(AvP_MainMenus())
|
|||
|
||||
ClearMemoryPool();
|
||||
|
||||
SetOGLVideoMode(640, 480);
|
||||
SetSoftVideoMode(640, 480, 16);
|
||||
// SetOGLVideoMode(640, 480);
|
||||
}
|
||||
|
||||
SoundSys_StopAll();
|
||||
|
|
1405
src/menus.c
1405
src/menus.c
File diff suppressed because it is too large
Load diff
|
@ -21,9 +21,6 @@ int QuickStartMultiplayer=1;
|
|||
DPNAME AVPDPplayerName;
|
||||
int glpDP; /* directplay object */
|
||||
|
||||
static pthread_t NetThread;
|
||||
static pthread_mutex_t NetMutex;
|
||||
|
||||
BOOL DpExtInit(DWORD cGrntdBufs, DWORD cBytesPerBuf, BOOL bErrChcks)
|
||||
{
|
||||
fprintf(stderr, "DpExtInit(%d, %d, %d)\n", cGrntdBufs, cBytesPerBuf, bErrChcks);
|
||||
|
|
|
@ -381,10 +381,12 @@ int PlatPlaySound(int activeIndex)
|
|||
alSourcei (ActiveSounds[activeIndex].ds3DBufferP, AL_BUFFER,
|
||||
GameSounds[si].dsBufferP);
|
||||
|
||||
#if 1 /* PLEASE REMOVE IFDEF! */
|
||||
if (ActiveSounds[activeIndex].loop)
|
||||
alSourcei (ActiveSounds[activeIndex].ds3DBufferP, AL_LOOPING, AL_TRUE);
|
||||
else
|
||||
alSourcei (ActiveSounds[activeIndex].ds3DBufferP, AL_LOOPING, AL_FALSE);
|
||||
#endif
|
||||
|
||||
if (1 || ActiveSounds[activeIndex].pitch != GameSounds[si].pitch) {
|
||||
PlatChangeSoundPitch(activeIndex, ActiveSounds[activeIndex].pitch);
|
||||
|
@ -539,12 +541,12 @@ int PlatDo3dSound(int activeIndex)
|
|||
if (ActiveSounds[activeIndex].paused) {
|
||||
if (distance < (ActiveSounds[activeIndex].threedeedata.outer_range + SOUND_DEACTIVATERANGE)) {
|
||||
PlatStopSound (activeIndex);
|
||||
|
||||
#if 1 /* PLEASE REMOVE IFDEF! */
|
||||
if (ActiveSounds[activeIndex].loop)
|
||||
alSourcei (ActiveSounds[activeIndex].ds3DBufferP, AL_LOOPING, AL_TRUE);
|
||||
else
|
||||
alSourcei (ActiveSounds[activeIndex].ds3DBufferP, AL_LOOPING, AL_FALSE);
|
||||
|
||||
#endif
|
||||
alSourcePlay (ActiveSounds[activeIndex].ds3DBufferP);
|
||||
newVolume = 0;
|
||||
ActiveSounds[activeIndex].paused = 0;
|
||||
|
@ -697,8 +699,9 @@ void PlatEndGameSound(SOUNDINDEX index)
|
|||
|
||||
unsigned int PlatMaxHWSounds()
|
||||
{
|
||||
/*
|
||||
printf("PlatMaxHWSounds()\n");
|
||||
|
||||
*/
|
||||
return 32;
|
||||
}
|
||||
|
||||
|
|
83
src/opengl.c
83
src/opengl.c
|
@ -54,6 +54,10 @@ static D3DTexture *CurrentlyBoundTexture = NULL;
|
|||
#define TA_MAXVERTICES 2048
|
||||
#define TA_MAXTRIANGLES 2048
|
||||
|
||||
#if GL_EXT_secondary_color
|
||||
extern PFNGLSECONDARYCOLORPOINTEREXTPROC pglSecondaryColorPointerEXT;
|
||||
#endif
|
||||
|
||||
typedef struct VertexArray
|
||||
{
|
||||
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 int svarrc, starrc;
|
||||
|
||||
static int haslocked = 0;
|
||||
|
||||
/* Do not call this directly! */
|
||||
static void SetTranslucencyMode(enum TRANSLUCENCY_TYPE mode)
|
||||
{
|
||||
|
@ -90,8 +92,7 @@ static void SetTranslucencyMode(enum TRANSLUCENCY_TYPE mode)
|
|||
if (TRIPTASTIC_CHEATMODE||MOTIONBLUR_CHEATMODE) {
|
||||
glBlendFunc(GL_ONE_MINUS_SRC_ALPHA, GL_SRC_ALPHA);
|
||||
} else {
|
||||
//glDisable(GL_BLEND);
|
||||
glBlendFunc(GL_ONE, GL_ZERO); /* this *should* be optimized */
|
||||
glBlendFunc(GL_ONE, GL_ZERO);
|
||||
}
|
||||
break;
|
||||
case TRANSLUCENCY_NORMAL:
|
||||
|
@ -116,9 +117,6 @@ static void SetTranslucencyMode(enum TRANSLUCENCY_TYPE mode)
|
|||
fprintf(stderr, "RenderPolygon.TranslucencyMode: invalid %d\n", RenderPolygon.TranslucencyMode);
|
||||
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.
|
||||
Might want to try spitting apart the three arrays and using the same vertex
|
||||
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)
|
||||
{
|
||||
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 1
|
||||
glBegin(GL_TRIANGLES);
|
||||
|
@ -242,6 +273,7 @@ static void CheckBoundTextureIsCorrect(D3DTexture *tex)
|
|||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
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);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
CurrentlyBoundTexture->filter = CurrentFilteringMode;
|
||||
|
@ -1717,8 +1750,6 @@ if (stringPtr == NULL) return;
|
|||
|
||||
void RenderString(char *stringPtr, int x, int y, int colour)
|
||||
{
|
||||
if (stringPtr == NULL) return;
|
||||
|
||||
D3D_RenderHUDString(stringPtr,x,y,colour);
|
||||
}
|
||||
|
||||
|
@ -1726,8 +1757,6 @@ void RenderStringCentred(char *stringPtr, int centreX, int y, int colour)
|
|||
{
|
||||
int length = 0;
|
||||
char *ptr = stringPtr;
|
||||
|
||||
if (stringPtr == NULL) return;
|
||||
|
||||
while(*ptr)
|
||||
{
|
||||
|
@ -1741,8 +1770,6 @@ void RenderStringVertically(char *stringPtr, int centreX, int bottomY, int colou
|
|||
struct VertexTag quadVertices[4];
|
||||
int y = bottomY;
|
||||
|
||||
if (stringPtr == NULL) return;
|
||||
|
||||
quadVertices[0].X = centreX - (HUD_FONT_HEIGHT/2) - 1;
|
||||
quadVertices[1].X = quadVertices[0].X;
|
||||
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;
|
||||
r = ((FillColour >> 16) & 0xFF) / 255.0f;
|
||||
a = ((FillColour >> 24) & 0xFF) / 255.0f;
|
||||
|
||||
|
||||
glClearColor(r, g, b, a);
|
||||
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
|
|
@ -37,4 +37,4 @@ typedef struct
|
|||
extern void Generate_Sphere(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
17
src/stubs.c
17
src/stubs.c
|
@ -78,14 +78,12 @@ void StartMenuBackgroundBink()
|
|||
fprintf(stderr, "StartMenuBackgroundBink()\n");
|
||||
}
|
||||
|
||||
#if 0
|
||||
int PlayMenuBackgroundBink()
|
||||
{
|
||||
fprintf(stderr, "PlayMenuBackgroundBink()\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
void EndMenuBackgroundBink()
|
||||
{
|
||||
|
@ -281,7 +279,22 @@ void UnlockSurface()
|
|||
|
||||
void ReleaseDDSurface(void* 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()
|
||||
|
|
|
@ -283,4 +283,4 @@ public:
|
|||
Object_Animation_Sequence* sequences;
|
||||
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -19,6 +19,8 @@ typedef DIRECTDRAWSURFACE DDSurface;
|
|||
|
||||
typedef struct DIRECT3DTEXTURE
|
||||
{
|
||||
unsigned char *buf;
|
||||
|
||||
int id;
|
||||
|
||||
int w;
|
||||
|
|
|
@ -500,6 +500,7 @@ void AwBackupTexture::ChoosePixelFormat(AwTl::CreateTextureParms const & _parmsR
|
|||
|
||||
pixelFormat.alphaB = 1;
|
||||
pixelFormat.validB = 1;
|
||||
pixelFormat.texB = 1;
|
||||
pixelFormat.bitsPerPixel = 32;
|
||||
pixelFormat.redLeftShift = 0;
|
||||
pixelFormat.greenLeftShift = 8;
|
||||
|
@ -513,6 +514,7 @@ void AwBackupTexture::ChoosePixelFormat(AwTl::CreateTextureParms const & _parmsR
|
|||
|
||||
extern "C" {
|
||||
extern int CreateOGLTexture(D3DTexture *, unsigned char *);
|
||||
extern int CreateIMGSurface(D3DTexture *, unsigned char *);
|
||||
};
|
||||
|
||||
AwTl::SurfUnion AwBackupTexture::CreateTexture(AwTl::CreateTextureParms const & _parmsR)
|
||||
|
@ -520,8 +522,11 @@ AwTl::SurfUnion AwBackupTexture::CreateTexture(AwTl::CreateTextureParms const &
|
|||
using namespace AwTl;
|
||||
|
||||
// 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);
|
||||
|
||||
|
@ -571,9 +576,15 @@ AwTl::SurfUnion AwBackupTexture::CreateTexture(AwTl::CreateTextureParms const &
|
|||
/* temp junk */
|
||||
Tex->w = m_nWidth;
|
||||
Tex->h = m_nHeight;
|
||||
CreateOGLTexture(Tex, buf); /* this will set the id */
|
||||
free(buf);
|
||||
|
||||
if (pixelFormat.texB) {
|
||||
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);
|
||||
#if 0
|
||||
|
||||
|
@ -2154,6 +2165,7 @@ DDSurface * AwCreateSurface(char const * _argFormatS, ...)
|
|||
|
||||
pixelFormat.alphaB = 1;
|
||||
pixelFormat.validB = 1;
|
||||
pixelFormat.texB = 0;
|
||||
pixelFormat.bitsPerPixel = 32;
|
||||
pixelFormat.redLeftShift = 0;
|
||||
pixelFormat.greenLeftShift = 8;
|
||||
|
|
|
@ -23,6 +23,7 @@ namespace AwTl {
|
|||
bool palettizedB : 1;
|
||||
bool alphaB : 1;
|
||||
bool validB : 1;
|
||||
bool texB : 1;
|
||||
|
||||
unsigned bitsPerPixel;
|
||||
unsigned redLeftShift;
|
||||
|
|
|
@ -724,4 +724,4 @@ private:
|
|||
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -393,4 +393,4 @@ struct ChunkAnimSequence
|
|||
int num_verts;
|
||||
ChunkVectorFloat* v_normal_list;
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -20,4 +20,4 @@ void CL_Init_All(void);
|
|||
};
|
||||
#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
Loading…
Add table
Add a link
Reference in a new issue