- lots, lots and lots of changes of some complex types to typedefs

This commit is contained in:
Ilya Shurumov 2020-12-08 22:45:14 +06:00
parent a5fac885e9
commit 0bd12cf1b3
46 changed files with 646 additions and 622 deletions

View File

@ -12,14 +12,14 @@
struct RNCheader struct RNCheader
{ {
unsigned long identifier; //must contain 'R', 'N', 'C', method u_int identifier; //must contain 'R', 'N', 'C', method
unsigned long unpackSize; //unpacked data size u_int unpackSize; //unpacked data size
unsigned long packSize; //packed data size (excludes this header) u_int packSize; //packed data size (excludes this header)
unsigned short unpackChecksum; //unpacked data checksum u_short unpackChecksum; //unpacked data checksum
unsigned short packChecksum; //packed data checksum u_short packChecksum; //packed data checksum
unsigned char leeway; //not used u_char leeway; //not used
unsigned char blocks; //number of sections u_char blocks; //number of sections
//unsigned char start; //first byte of data //u_char start; //first byte of data
}; };
#define RNC_HEADER_LENGTH 18 #define RNC_HEADER_LENGTH 18

View File

@ -592,7 +592,7 @@ void ApplyDamage(CAR_DATA *cp, char region, int value, char fakeDamage)
// End Line: 1169 // End Line: 1169
// [D] [T] // [D] [T]
int DamageCar3D(CAR_DATA *cp, LONGVECTOR* delta, int strikeVel, CAR_DATA *pOtherCar) int DamageCar3D(CAR_DATA *cp, LONGVECTOR4* delta, int strikeVel, CAR_DATA *pOtherCar)
{ {
char region; char region;
int value; int value;
@ -949,9 +949,9 @@ int CarBuildingCollision(CAR_DATA *cp, BUILDING_BOX *building, CELL_OBJECT *cop,
VECTOR tempwhere; VECTOR tempwhere;
SVECTOR boxDisp; SVECTOR boxDisp;
VECTOR velocity; VECTOR velocity;
LONGVECTOR pointVel; LONGVECTOR4 pointVel;
LONGVECTOR reaction; LONGVECTOR4 reaction;
LONGVECTOR lever; LONGVECTOR4 lever;
VECTOR LeafPosition; VECTOR LeafPosition;
VECTOR lamp_velocity; VECTOR lamp_velocity;
int debris_colour; int debris_colour;

View File

@ -11,7 +11,7 @@ extern int bFindCollisionTime(CDATA2D *cd, CRET2D *collisionResult); // 0x0001CC
extern void ApplyDamage(CAR_DATA *cp, char region, int value, char fakeDamage); // 0x0001CEEC extern void ApplyDamage(CAR_DATA *cp, char region, int value, char fakeDamage); // 0x0001CEEC
extern int DamageCar3D(CAR_DATA *cp, LONGVECTOR* delta, int strikeVel, CAR_DATA *pOtherCar); // 0x0001D0B0 extern int DamageCar3D(CAR_DATA *cp, LONGVECTOR4* delta, int strikeVel, CAR_DATA *pOtherCar); // 0x0001D0B0
extern void DamageCar(CAR_DATA *cp, CDATA2D *cd, CRET2D *collisionResult, int strikeVel); // 0x0001D454 extern void DamageCar(CAR_DATA *cp, CDATA2D *cd, CRET2D *collisionResult, int strikeVel); // 0x0001D454

View File

@ -629,9 +629,9 @@ void ExplosionCollisionCheck(CAR_DATA *cp, EXOBJECT *pE)
int carLength[2]; int carLength[2];
CRET2D collisionResult; CRET2D collisionResult;
VECTOR velocity; VECTOR velocity;
LONGVECTOR pointVel; LONGVECTOR4 pointVel;
LONGVECTOR reaction; LONGVECTOR4 reaction;
LONGVECTOR lever; LONGVECTOR4 lever;
isCar = (cp != &car_data[TANNER_COLLIDER_CARID]); isCar = (cp != &car_data[TANNER_COLLIDER_CARID]);

View File

@ -47,8 +47,8 @@ unsigned short paddCamera;
char cameraview = 0; char cameraview = 0;
int CameraCnt = 0; int CameraCnt = 0;
static LONGVECTOR basePos; // [A] static LONGVECTOR4 basePos; // [A]
static long baseDir = 0; static int baseDir = 0;
char tracking_car = 0; char tracking_car = 0;

View File

@ -93,8 +93,8 @@ CAR_POLY carPolyBuffer[2001];
void plotNewCarModel(CAR_MODEL *car, int palette) void plotNewCarModel(CAR_MODEL *car, int palette)
{ {
plotCarGlobals _pg; plotCarGlobals _pg;
ulong lightlevel; u_int lightlevel;
ulong underIntensity; u_int underIntensity;
SVECTOR v = { 0, -4096, 0 }; SVECTOR v = { 0, -4096, 0 };
lightlevel = combointensity | 0x3000000; lightlevel = combointensity | 0x3000000;
@ -194,7 +194,7 @@ void plotCarPolyB3(int numTris, CAR_POLY *src, SVECTOR *vlist, plotCarGlobals *p
{ {
int Z; int Z;
int indices; int indices;
ulong FT3rgb; u_int FT3rgb;
SVECTOR *v2; SVECTOR *v2;
SVECTOR *v1; SVECTOR *v1;
SVECTOR *v0; SVECTOR *v0;
@ -301,7 +301,7 @@ void plotCarPolyFT3(int numTris, CAR_POLY *src, SVECTOR *vlist, plotCarGlobals *
int Z; int Z;
POLY_FT3 *prim; POLY_FT3 *prim;
OTTYPE *ot; OTTYPE *ot;
long FT3rgb; int FT3rgb;
int reg; int reg;
prim = (POLY_FT3 *)pg->primptr; prim = (POLY_FT3 *)pg->primptr;
@ -419,7 +419,7 @@ void plotCarPolyGT3(int numTris, CAR_POLY *src, SVECTOR *vlist, SVECTOR *nlist,
prim = (POLY_GT3 *)pg->primptr; prim = (POLY_GT3 *)pg->primptr;
long GT3rgb = pg->intensity | 0x34000000; int GT3rgb = pg->intensity | 0x34000000;
gte_ldrgb(&GT3rgb); gte_ldrgb(&GT3rgb);
while (numTris > 0) while (numTris > 0)
@ -538,7 +538,7 @@ void plotCarPolyGT3nolight(int numTris, CAR_POLY *src, SVECTOR *vlist, plotCarGl
prim = (POLY_FT3*)pg->primptr; prim = (POLY_FT3*)pg->primptr;
long GT3rgb = pg->intensity | 0x34000000; int GT3rgb = pg->intensity | 0x34000000;
gte_ldrgb(&GT3rgb); gte_ldrgb(&GT3rgb);
while (numTris > 0) while (numTris > 0)
@ -1028,6 +1028,7 @@ void DrawCar(CAR_DATA *cp, int view)
void DrawCarObject(CAR_MODEL *car, MATRIX *matrix, VECTOR *pos, int palette, CAR_DATA *cp, int detail) void DrawCarObject(CAR_MODEL *car, MATRIX *matrix, VECTOR *pos, int palette, CAR_DATA *cp, int detail)
{ {
static unsigned long savedSP; static unsigned long savedSP;
VECTOR modelLocation; VECTOR modelLocation;
SVECTOR cog; SVECTOR cog;
@ -1420,8 +1421,8 @@ void DrawWheelObject(MODEL *model, SVECTOR *verts, int transparent, int wheelnum
int combo; int combo;
POLY_FT4 *poly; POLY_FT4 *poly;
POLYFT4 *src; POLYFT4 *src;
ulong dim; u_int dim;
ulong bright; u_int bright;
src = (POLYFT4*)model->poly_block; src = (POLYFT4*)model->poly_block;
poly = (POLY_FT4 *)current->primptr; poly = (POLY_FT4 *)current->primptr;
@ -1637,7 +1638,7 @@ void ComputeCarLightingLevels(CAR_DATA *cp, char detail)
CVECTOR c0; CVECTOR c0;
CVECTOR c1; CVECTOR c1;
CVECTOR c2; CVECTOR c2;
long GT3rgb; int GT3rgb;
if (gTimeOfDay > -1) if (gTimeOfDay > -1)
{ {

View File

@ -104,7 +104,7 @@ int test555 = 0;
// End Line: 1435 // End Line: 1435
// [D] [T] // [D] [T]
int InitCar(CAR_DATA* cp, int direction, LONGVECTOR* startPos, unsigned char control, int model, int palette, char* extraData) int InitCar(CAR_DATA* cp, int direction, LONGVECTOR4* startPos, unsigned char control, int model, int palette, char* extraData)
{ {
VECTOR tmpStart; VECTOR tmpStart;
@ -132,7 +132,7 @@ int InitCar(CAR_DATA* cp, int direction, LONGVECTOR* startPos, unsigned char con
if (control == CONTROL_TYPE_NONE) if (control == CONTROL_TYPE_NONE)
return 1; return 1;
InitCarPhysics(cp, (LONGVECTOR *)&tmpStart, direction); InitCarPhysics(cp, (LONGVECTOR4 *)&tmpStart, direction);
cp->ap.palette = palette; cp->ap.palette = palette;
cp->controlType = control; cp->controlType = control;
@ -559,7 +559,7 @@ void CivCarFX(CAR_DATA* cp)
// BUGS: sometimes not getting right lane when road direction switched // BUGS: sometimes not getting right lane when road direction switched
int GetNextRoadInfo(CAR_DATA* cp, int randomExit, int* turnAngle, int* startDist, CIV_ROUTE_ENTRY* oldNode) int GetNextRoadInfo(CAR_DATA* cp, int randomExit, int* turnAngle, int* startDist, CIV_ROUTE_ENTRY* oldNode)
{ {
unsigned long junctionFlags; u_int junctionFlags;
DRIVER2_JUNCTION* jn; DRIVER2_JUNCTION* jn;
DRIVER2_ROAD_INFO currentRoadInfo; DRIVER2_ROAD_INFO currentRoadInfo;
@ -2829,7 +2829,7 @@ const int EVENT_CAR_SPEED = 60;
const int DistanceTriggerCarMoves = 700; // 5000; const int DistanceTriggerCarMoves = 700; // 5000;
// [D] [T] [A] // [D] [T] [A]
int CreateCivCarWotDrivesABitThenStops(int direction, LONGVECTOR* startPos, LONGVECTOR* stopPos, unsigned char internalModel, int palette) int CreateCivCarWotDrivesABitThenStops(int direction, LONGVECTOR4* startPos, LONGVECTOR4* stopPos, unsigned char internalModel, int palette)
{ {
unsigned char* slot; unsigned char* slot;
CAR_DATA* carCnt; CAR_DATA* carCnt;
@ -2947,14 +2947,14 @@ int CreateCivCarWotDrivesABitThenStops(int direction, LONGVECTOR* startPos, LONG
// End Line: 5132 // End Line: 5132
// [D] [T] // [D] [T]
int CreateStationaryCivCar(int direction, long orientX, long orientZ, LONGVECTOR* startPos, int externalModel, int palette, int controlFlags) int CreateStationaryCivCar(int direction, long orientX, long orientZ, LONGVECTOR4* startPos, int externalModel, int palette, int controlFlags)
{ {
unsigned char* slot; unsigned char* slot;
CAR_DATA* newCar; CAR_DATA* newCar;
CAR_DATA* carCnt; CAR_DATA* carCnt;
int model; int model;
EXTRA_CIV_DATA civDat; EXTRA_CIV_DATA civDat;
long tmpQ[4]; LONGQUATERNION tmpQ;
model = -1; model = -1;
@ -3258,9 +3258,9 @@ int PingInCivCar(int minPingInDist)
DRIVER2_ROAD_INFO roadInfo; DRIVER2_ROAD_INFO roadInfo;
EXTRA_CIV_DATA civDat; EXTRA_CIV_DATA civDat;
unsigned char possibleLanes[12]; u_char possibleLanes[12];
// carDistLanes removed as it's unused // carDistLanes removed as it's unused
long pos[4]; LONGVECTOR4 pos;
int distSq; int distSq;
int dir; int dir;
int curveLength; int curveLength;
@ -5900,7 +5900,7 @@ void CreateRoadblock(void)
if((str && ROAD_IS_AI_LANE(str, laneNo) || crv && ROAD_IS_AI_LANE(crv, laneNo)) && if((str && ROAD_IS_AI_LANE(str, laneNo) || crv && ROAD_IS_AI_LANE(crv, laneNo)) &&
CellEmpty(&currentPos, lbody)) CellEmpty(&currentPos, lbody))
{ {
newSlot = CreateStationaryCivCar(dir2NextRow + (Random2(0) * 0x10001 >> (laneNo) & 0x3ffU) - 512, 0, 0, (LONGVECTOR *)&currentPos, externalCopModel, 0, 2); newSlot = CreateStationaryCivCar(dir2NextRow + (Random2(0) * 0x10001 >> (laneNo) & 0x3ffU) - 512, 0, 0, (LONGVECTOR4 *)&currentPos, externalCopModel, 0, 2);
if (newSlot == -1) if (newSlot == -1)
break; break;
@ -5977,7 +5977,7 @@ void CreateRoadblock(void)
test42 = delta; test42 = delta;
newSlot = CreateStationaryCivCar(faceDir + (Random2(0) * 0x10001 >> (delta >> 9 & 0x1fU) & 0x3ffU) - 512, 0, 0, (LONGVECTOR *)&currentPos, externalCopModel, 0, 2); newSlot = CreateStationaryCivCar(faceDir + (Random2(0) * 0x10001 >> (delta >> 9 & 0x1fU) & 0x3ffU) - 512, 0, 0, (LONGVECTOR4 *)&currentPos, externalCopModel, 0, 2);
if (newSlot == -1) if (newSlot == -1)
break; break;

View File

@ -12,7 +12,7 @@ extern char makeLimoPullOver;
extern char junctionLightsPhase[2]; extern char junctionLightsPhase[2];
extern int InitCar(CAR_DATA *cp, int direction, LONGVECTOR* startPos, unsigned char control, int model, int palette, char *extraData); // 0x00023DE8 extern int InitCar(CAR_DATA *cp, int direction, LONGVECTOR4* startPos, unsigned char control, int model, int palette, char *extraData); // 0x00023DE8
extern CAR_DATA * FindClosestCar(int x, int y, int z, int *distToCarSq); // 0x0002D11C extern CAR_DATA * FindClosestCar(int x, int y, int z, int *distToCarSq); // 0x0002D11C
@ -46,9 +46,9 @@ extern int TrafficLightCycle(int exit); // 0x0002CF18
extern void InitCivCars(); // 0x0002CDA4 extern void InitCivCars(); // 0x0002CDA4
extern int CreateCivCarWotDrivesABitThenStops(int direction, LONGVECTOR* startPos, LONGVECTOR* stopPos, unsigned char internalModel, int palette); // 0x000286E0 extern int CreateCivCarWotDrivesABitThenStops(int direction, LONGVECTOR4* startPos, LONGVECTOR4* stopPos, unsigned char internalModel, int palette); // 0x000286E0
extern int CreateStationaryCivCar(int direction, long orientX, long orientZ, LONGVECTOR* startPos, int externalModel, int palette, int controlFlags); // 0x00028960 extern int CreateStationaryCivCar(int direction, long orientX, long orientZ, LONGVECTOR4* startPos, int externalModel, int palette, int controlFlags); // 0x00028960
extern int PingInCivCar(int minPingInDist); // 0x00028DB4 extern int PingInCivCar(int minPingInDist); // 0x00028DB4

View File

@ -366,17 +366,17 @@ void Getlong(char *dest, char *source)
/* end block 4 */ /* end block 4 */
// End Line: 953 // End Line: 953
static long rseed[17]; // offset 0xBD510 static int rseed[17]; // offset 0xBD510
static int randomindex = 0; static int randomindex = 0;
static int randomcounter = 0; static int randomcounter = 0;
// [D] [T] // [D] [T]
void RandomInit(long i1, long i2) void RandomInit(int i1, int i2)
{ {
int step; int step;
int count; int count;
long *sd; int*sd;
step = 0x3b1cb49; step = 0x3b1cb49;
@ -432,7 +432,7 @@ void RandomInit(long i1, long i2)
extern int frameStart; extern int frameStart;
// [D] [T] // [D] [T]
long Random2(int step) int Random2(int step)
{ {
return (CameraCnt - frameStart) * (CameraCnt - frameStart) * 0x19660d + 0x3c6ef35fU >> 8 & 0xffff; return (CameraCnt - frameStart) * (CameraCnt - frameStart) * 0x19660d + 0x3c6ef35fU >> 8 & 0xffff;
} }

View File

@ -21,9 +21,9 @@ extern void ScaleCamera(); // 0x0002D5C8
extern void Getlong(char *dest, char *source); // 0x0002D678 extern void Getlong(char *dest, char *source); // 0x0002D678
extern void RandomInit(long i1, long i2); // 0x0002D6A8 extern void RandomInit(int i1, int i2); // 0x0002D6A8
extern long Random2(int step); // 0x0002D724 extern int Random2(int step); // 0x0002D724
#endif #endif

View File

@ -980,7 +980,7 @@ int TriggerInGameCutsceneSystem(int cutscene)
InitPlayer(&player[player_id], cp, InitPlayer(&player[player_id], cp,
stream->SourceType.controlType, stream->SourceType.controlType,
stream->SourceType.rotation, stream->SourceType.rotation,
(LONGVECTOR* )&stream->SourceType.position, (LONGVECTOR4* )&stream->SourceType.position,
stream->SourceType.model, stream->SourceType.model,
stream->SourceType.palette, stream->SourceType.palette,
&padid[player_id]); &padid[player_id]);
@ -1006,7 +1006,7 @@ int TriggerInGameCutsceneSystem(int cutscene)
else else
{ {
slot = CreateStationaryCivCar(stream->SourceType.rotation, 0, 1024, slot = CreateStationaryCivCar(stream->SourceType.rotation, 0, 1024,
(LONGVECTOR* )&stream->SourceType.position, (LONGVECTOR4* )&stream->SourceType.position,
stream->SourceType.model, stream->SourceType.model,
stream->SourceType.palette, 0); stream->SourceType.palette, 0);

View File

@ -5071,7 +5071,7 @@ void DrawRainDrops(void)
// [D] [T] // [D] [T]
void AddRainDrops(void) void AddRainDrops(void)
{ {
static unsigned long rand; static u_int rand;
int first; int first;
int RainIndex; int RainIndex;
@ -5187,7 +5187,7 @@ void AddRainDrops(void)
// [D] [T] // [D] [T]
void DisplaySplashes(void) void DisplaySplashes(void)
{ {
static unsigned long rand; static u_int rand;
int d1; int d1;
int d2; int d2;

View File

@ -27,7 +27,7 @@ short* RoadMapDataRegions[4];
int NumTempJunctions = 0; int NumTempJunctions = 0;
DRIVER2_JUNCTION *Driver2JunctionsPtr = NULL; DRIVER2_JUNCTION *Driver2JunctionsPtr = NULL;
ulong *Driver2TempJunctionsPtr = NULL; u_int* Driver2TempJunctionsPtr = NULL;
DRIVER2_CURVE *Driver2CurvesPtr = NULL; DRIVER2_CURVE *Driver2CurvesPtr = NULL;
int NumDriver2Curves = 0; int NumDriver2Curves = 0;
@ -423,7 +423,7 @@ int FindSurfaceD2(VECTOR *pos, VECTOR *normal, VECTOR *out, sdPlane **plane)
// [D] [T] // [D] [T]
int sdHeightOnPlane(VECTOR *pos, sdPlane *plane) int sdHeightOnPlane(VECTOR *pos, sdPlane *plane)
{ {
long angle; int angle;
int i, d; int i, d;
DRIVER2_CURVE *curve; DRIVER2_CURVE *curve;
int lx; int lx;

View File

@ -51,7 +51,7 @@ extern ROAD_MAP_LUMP_DATA roadMapLumpData;
extern int NumTempJunctions; extern int NumTempJunctions;
extern DRIVER2_JUNCTION *Driver2JunctionsPtr; extern DRIVER2_JUNCTION *Driver2JunctionsPtr;
extern ulong *Driver2TempJunctionsPtr; extern u_int* Driver2TempJunctionsPtr;
extern int NumDriver2Junctions; extern int NumDriver2Junctions;
extern int NumDriver2Straights; extern int NumDriver2Straights;

View File

@ -95,7 +95,7 @@ void* model_tile_ptrs[MAX_DRAWN_TILES];
void* anim_obj_buffer[MAX_DRAWN_ANIMATING]; void* anim_obj_buffer[MAX_DRAWN_ANIMATING];
void* spriteList[MAX_DRAWN_SPRITES]; void* spriteList[MAX_DRAWN_SPRITES];
unsigned long planeColours[8]; u_int planeColours[8];
MATRIX inv_camera_matrix; MATRIX inv_camera_matrix;
MATRIX face_camera; MATRIX face_camera;
@ -1115,11 +1115,11 @@ void DrawMapPSX(int* comp_val)
// End Line: 2710 // End Line: 2710
// [D] [T] // [D] [T]
void SetupPlaneColours(ulong ambient) void SetupPlaneColours(uint ambient)
{ {
unsigned long r; uint r;
unsigned long g; uint g;
unsigned long b; uint b;
if ((gWeather - 1U > 1) && gTimeOfDay != 0 && gTimeOfDay != 2) if ((gWeather - 1U > 1) && gTimeOfDay != 0 && gTimeOfDay != 2)
{ {
@ -1964,7 +1964,7 @@ void PlotBuildingModelSubdivNxN(MODEL* model, int rot, _pct* pc, int n)
prims = (POLY_FT4*)pc->primptr; prims = (POLY_FT4*)pc->primptr;
setPolyFT4(prims); setPolyFT4(prims);
*(ulong*)&prims->r0 = pc->colour; *(uint*)&prims->r0 = pc->colour;
// retrieve first three verts // retrieve first three verts
gte_stsxy3(&prims->x0, &prims->x1, &prims->x2); gte_stsxy3(&prims->x0, &prims->x1, &prims->x2);
@ -2162,7 +2162,7 @@ void RenderModel(MODEL* model, MATRIX* matrix, VECTOR* pos, int zBias, int flags
// End Line: 5772 // End Line: 5772
// [D] [T] // [D] [T]
ulong normalIndex(SVECTOR* verts, uint vidx) u_int normalIndex(SVECTOR* verts, uint vidx)
{ {
SVECTOR* v0; SVECTOR* v0;
SVECTOR* v1; SVECTOR* v1;

View File

@ -58,7 +58,7 @@ extern void addSubdivSpriteShadow(POLYFT4*src, SVECTOR *verts, int z); // 0x0003
extern void DrawMapPSX(int *comp_val); // 0x0003F6B0 extern void DrawMapPSX(int *comp_val); // 0x0003F6B0
extern void SetupPlaneColours(unsigned long ambient); // 0x00040218 extern void SetupPlaneColours(uint ambient); // 0x00040218
extern void SetupDrawMapPSX(); // 0x00040408 extern void SetupDrawMapPSX(); // 0x00040408
@ -80,7 +80,7 @@ extern void PlotBuildingModelSubdivNxN(MODEL *model, int rot, _pct *pc, int n);
extern void RenderModel(MODEL *model, MATRIX *matrix, VECTOR *pos, int zBias, int flags, int subdiv, int nrot); // 0x0004143C extern void RenderModel(MODEL *model, MATRIX *matrix, VECTOR *pos, int zBias, int flags, int subdiv, int nrot); // 0x0004143C
extern unsigned long normalIndex(SVECTOR *verts, unsigned int vidx); // 0x000415E4 extern u_int normalIndex(SVECTOR *verts, unsigned int vidx); // 0x000415E4
#endif #endif

View File

@ -1358,10 +1358,10 @@ void MissionSay(int phrase)
// End Line: 5495 // End Line: 5495
// [D] [T] // [D] [T]
long jsqrt(ulong a) int jsqrt(u_int a)
{ {
long b0; int b0;
long b1; int b1;
if (a < 2) if (a < 2)
return a; return a;
@ -1532,12 +1532,12 @@ void DoDopplerSFX(void)
int num_noisy_cars; int num_noisy_cars;
int sirens; int sirens;
ulong car_dist[MAX_CARS]; uint car_dist[MAX_CARS];
ushort indexlist[MAX_CARS]; ushort indexlist[MAX_CARS];
CAR_DATA* car_ptr; CAR_DATA* car_ptr;
int dx, dz; int dx, dz;
ulong dist; uint dist;
num_noisy_cars = 0; num_noisy_cars = 0;
@ -1688,14 +1688,14 @@ void DoDopplerSFX(void)
siren_noise[j].chan = Start3DTrackingSound(-1, (siren & 0xff00) >> 8, siren & 0xff, siren_noise[j].chan = Start3DTrackingSound(-1, (siren & 0xff00) >> 8, siren & 0xff,
(VECTOR*)car_data[car].hd.where.t, (VECTOR*)car_data[car].hd.where.t,
car_data[car].st.n.linearVelocity); (LONGVECTOR3*)car_data[car].st.n.linearVelocity);
} }
else else
{ {
// play music // play music
siren_noise[j].chan = Start3DTrackingSound(-1, SOUND_BANK_ENVIRONMENT, 5, siren_noise[j].chan = Start3DTrackingSound(-1, SOUND_BANK_ENVIRONMENT, 5,
(VECTOR*)car_data[car].hd.where.t, (VECTOR*)car_data[car].hd.where.t,
car_data[car].st.n.linearVelocity); (LONGVECTOR3*)car_data[car].st.n.linearVelocity);
} }
LockChannel(siren_noise[j].chan); LockChannel(siren_noise[j].chan);
@ -1719,7 +1719,7 @@ void DoDopplerSFX(void)
SetChannelPosition3(siren_noise[j].chan, SetChannelPosition3(siren_noise[j].chan,
(VECTOR*)car_data[car].hd.where.t, (VECTOR*)car_data[car].hd.where.t,
car_data[car].st.n.linearVelocity, (LONGVECTOR3*)car_data[car].st.n.linearVelocity,
pitch * -30 - 3000, j * 4 - (pitch * 48 - 4096), 0); pitch * -30 - 3000, j * 4 - (pitch * 48 - 4096), 0);
} }
@ -1801,7 +1801,9 @@ void DoDopplerSFX(void)
else else
sample = bank * 3; sample = bank * 3;
car_noise[j].chan = Start3DTrackingSound(-1, SOUND_BANK_CARS, sample, (VECTOR*)car_data[car].hd.where.t, car_data[car].st.n.linearVelocity); car_noise[j].chan = Start3DTrackingSound(-1, SOUND_BANK_CARS, sample,
(VECTOR*)car_data[car].hd.where.t,
(LONGVECTOR3*)car_data[car].st.n.linearVelocity);
LockChannel(car_noise[j].chan); LockChannel(car_noise[j].chan);
break; break;
@ -1853,7 +1855,10 @@ void DoDopplerSFX(void)
else else
sample = bank * 3; sample = bank * 3;
car_noise[j].chan = Start3DTrackingSound(-1, SOUND_BANK_CARS, sample, (VECTOR*)car_data[car].hd.where.t, car_data[car].st.n.linearVelocity); car_noise[j].chan = Start3DTrackingSound(-1, SOUND_BANK_CARS, sample,
(VECTOR*)car_data[car].hd.where.t,
(LONGVECTOR3*)car_data[car].st.n.linearVelocity);
LockChannel(car_noise[j].chan); LockChannel(car_noise[j].chan);
} }
@ -1871,7 +1876,10 @@ void DoDopplerSFX(void)
car_noise[j].in_use = 1; car_noise[j].in_use = 1;
SetChannelPosition3(car_noise[j].chan, (VECTOR*)car_data[car].hd.where.t, car_data[car].st.n.linearVelocity, volume, pitch, 0); SetChannelPosition3(car_noise[j].chan,
(VECTOR*)car_data[car].hd.where.t,
(LONGVECTOR3*)car_data[car].st.n.linearVelocity,
volume, pitch, 0);
} }
// bark on player // bark on player
@ -1935,9 +1943,9 @@ void DoDopplerSFX(void)
// End Line: 2219 // End Line: 2219
// [D] [T] // [D] [T]
void DoPoliceLoudhailer(int cars, ushort* indexlist, ulong* dist) void DoPoliceLoudhailer(int cars, ushort* indexlist, uint* dist)
{ {
long rnd; int rnd;
int carId; int carId;
int i; int i;
int time; int time;
@ -1968,7 +1976,10 @@ void DoPoliceLoudhailer(int cars, ushort* indexlist, ulong* dist)
if (car_ptr->controlType == CONTROL_TYPE_PURSUER_AI && car_ptr->ai.p.dying == 0 && if (car_ptr->controlType == CONTROL_TYPE_PURSUER_AI && car_ptr->ai.p.dying == 0 &&
time < loudhail_time && rnd == (rnd / 31) * 31) time < loudhail_time && rnd == (rnd / 31) * 31)
{ {
Start3DTrackingSound(-1, SOUND_BANK_VOICES, rnd % 2 + 13, (VECTOR*)car_ptr->hd.where.t, car_ptr->st.n.linearVelocity); Start3DTrackingSound(-1, SOUND_BANK_VOICES, rnd % 2 + 13,
(VECTOR*)car_ptr->hd.where.t,
(LONGVECTOR3*)car_ptr->st.n.linearVelocity);
loudhail_time = 0; loudhail_time = 0;
break; break;
} }
@ -2031,7 +2042,7 @@ void DoPoliceLoudhailer(int cars, ushort* indexlist, ulong* dist)
void CollisionSound(char player_id, CAR_DATA* cp, int impact, int car_car) void CollisionSound(char player_id, CAR_DATA* cp, int impact, int car_car)
{ {
int chan; int chan;
long rnd; int rnd;
int playerid; int playerid;
int phrase; int phrase;
int sample; int sample;
@ -2045,8 +2056,8 @@ void CollisionSound(char player_id, CAR_DATA* cp, int impact, int car_car)
if (NumPlayers > 1 && NoPlayerControl == 0) if (NumPlayers > 1 && NoPlayerControl == 0)
{ {
int dx, dz; int dx, dz;
unsigned long p0dst; u_int p0dst;
unsigned long p1dst; u_int p1dst;
dx = cp->hd.where.t[0] - player[0].pos[0]; dx = cp->hd.where.t[0] - player[0].pos[0];
dz = cp->hd.where.t[2] - player[0].pos[2]; dz = cp->hd.where.t[2] - player[0].pos[2];
@ -2167,7 +2178,7 @@ void CollisionSound(char player_id, CAR_DATA* cp, int impact, int car_car)
// [D] [T] // [D] [T]
void ExplosionSound(VECTOR* pos, int type) void ExplosionSound(VECTOR* pos, int type)
{ {
long rnd; int rnd;
int sc2; int sc2;
int sc1; int sc1;
int bang; int bang;
@ -2245,8 +2256,8 @@ void ExplosionSound(VECTOR* pos, int type)
// [D] [T] // [D] [T]
void JerichoSpeak(void) void JerichoSpeak(void)
{ {
static unsigned int j_said = 0; static u_int j_said = 0;
long rnd; int rnd;
short* playerFelony; short* playerFelony;
rnd = Random2(3); rnd = Random2(3);
@ -2354,7 +2365,7 @@ void SoundTasks(void)
int chan; int chan;
int vol; int vol;
VECTOR* position; VECTOR* position;
long* velocity; LONGVECTOR3* velocity;
PLAYER* lcp; PLAYER* lcp;
CAR_DATA* cp; CAR_DATA* cp;
@ -2402,7 +2413,7 @@ void SoundTasks(void)
if (cp) if (cp)
{ {
position = (VECTOR*)cp->hd.where.t; position = (VECTOR*)cp->hd.where.t;
velocity = cp->st.n.linearVelocity; velocity = (LONGVECTOR3*)cp->st.n.linearVelocity;
if (lcp->car_is_sounding < 2) if (lcp->car_is_sounding < 2)
vol = lcp->revsvol; vol = lcp->revsvol;
@ -2660,7 +2671,7 @@ void InitTunnels(char n)
// End Line: 6756 // End Line: 6756
// [D] [T] // [D] [T]
int AddTunnel(long x1, long y1, long z1, long x2, long y2, long z2) int AddTunnel(int x1, int y1, int z1, int x2, int y2, int z2)
{ {
if (tunnels.tunnel_cnt >= tunnels.num_tunnels) if (tunnels.tunnel_cnt >= tunnels.num_tunnels)
return -1; return -1;
@ -2946,7 +2957,7 @@ int SetEnvSndVol(int snd, int vol)
// End Line: 7206 // End Line: 7206
// [D] [T] // [D] [T]
void SetEnvSndPos(int snd, long px, long pz) void SetEnvSndPos(int snd, int px, int pz)
{ {
if (envsnd[snd].type != 3) if (envsnd[snd].type != 3)
return; return;
@ -2981,7 +2992,7 @@ void SetEnvSndPos(int snd, long px, long pz)
// End Line: 3578 // End Line: 3578
// [D] [T] // [D] [T]
int AddEnvSnd(int type, char flags, int bank, int sample, int vol, long px, long pz, long px2, long pz2) int AddEnvSnd(int type, char flags, int bank, int sample, int vol, int px, int pz, int px2, int pz2)
{ {
envsound* ep; envsound* ep;
@ -3573,7 +3584,7 @@ void CalcEffPos2(envsound* ep, envsoundinfo* E, int pl)
void UpdateEnvSnd(envsound* ep, envsoundinfo* E, int pl) void UpdateEnvSnd(envsound* ep, envsoundinfo* E, int pl)
{ {
int channel; int channel;
long* velocity; LONGVECTOR3* velocity;
int i; int i;
int snd; int snd;
@ -3598,7 +3609,7 @@ void UpdateEnvSnd(envsound* ep, envsoundinfo* E, int pl)
} }
if (ep[snd].flags & 0x10) if (ep[snd].flags & 0x10)
velocity = player[pl].camera_vel; velocity = (LONGVECTOR3*)player[pl].camera_vel;
else else
velocity = NULL; velocity = NULL;
@ -3706,7 +3717,9 @@ void LeadHorn(CAR_DATA* cp)
else else
carBank = cp->ap.model - 1; carBank = cp->ap.model - 1;
Start3DTrackingSound(-1, SOUND_BANK_CARS, carBank * 3 + 2, (VECTOR*)cp->hd.where.t, cp->st.n.linearVelocity); Start3DTrackingSound(-1, SOUND_BANK_CARS, carBank * 3 + 2,
(VECTOR*)cp->hd.where.t,
(LONGVECTOR3*)cp->st.n.linearVelocity);
horn_time = 0; horn_time = 0;
} }

View File

@ -54,13 +54,13 @@ extern void BodSay(int phrase); // 0x00052694
extern void MissionSay(int phrase); // 0x000526D0 extern void MissionSay(int phrase); // 0x000526D0
extern long jsqrt(unsigned long a); // 0x0005270C extern int jsqrt(u_int a); // 0x0005270C
extern void InitDopplerSFX(); // 0x0004E710 extern void InitDopplerSFX(); // 0x0004E710
extern void DoDopplerSFX(); // 0x0004E790 extern void DoDopplerSFX(); // 0x0004E790
extern void DoPoliceLoudhailer(int cars, unsigned short *indexlist, unsigned long *dist); // 0x0004F4A0 extern void DoPoliceLoudhailer(int cars, unsigned short *indexlist, uint* dist); // 0x0004F4A0
extern void CollisionSound(char player_id, CAR_DATA *cp, int impact, int car_car); // 0x0004F668 extern void CollisionSound(char player_id, CAR_DATA *cp, int impact, int car_car); // 0x0004F668
@ -76,7 +76,7 @@ extern void InitMusic(int musicnum); // 0x000500E4
extern void InitTunnels(char n); // 0x0005243C extern void InitTunnels(char n); // 0x0005243C
extern int AddTunnel(long x1, long y1, long z1, long x2, long y2, long z2); // 0x00052848 extern int AddTunnel(int x1, int y1, int z1, int x2, int y2, int z2); // 0x00052848
extern void Tunnels(tunnelinfo *T); // 0x0005027C extern void Tunnels(tunnelinfo *T); // 0x0005027C
@ -86,9 +86,9 @@ extern void InitEnvSnd(int num_envsnds); // 0x00052388
extern int SetEnvSndVol(int snd, int vol); // 0x00052168 extern int SetEnvSndVol(int snd, int vol); // 0x00052168
extern void SetEnvSndPos(int snd, long px, long pz); // 0x00052904 extern void SetEnvSndPos(int snd, int px, int pz); // 0x00052904
extern int AddEnvSnd(int type, char flags, int bank, int sample, int vol, long px, long pz, long px2, long pz2); // 0x00050C08 extern int AddEnvSnd(int type, char flags, int bank, int sample, int vol, int px, int pz, int px2, int pz2); // 0x00050C08
extern void IdentifyZone(envsound *ep, envsoundinfo *E, int pl); // 0x00050E08 extern void IdentifyZone(envsound *ep, envsoundinfo *E, int pl); // 0x00050E08

View File

@ -63,7 +63,7 @@
// [D] [T] // [D] [T]
void InitCarPhysics(CAR_DATA* cp, long(*startpos)[4], int direction) void InitCarPhysics(CAR_DATA* cp, LONGVECTOR4* startpos, int direction)
{ {
int ty; int ty;
int odz; int odz;
@ -690,7 +690,7 @@ void GlobalTimeStep(void)
static RigidBodyState _d1[MAX_CARS]; // offset 0x820 static RigidBodyState _d1[MAX_CARS]; // offset 0x820
int howHard; int howHard;
long tmp; int tmp;
RigidBodyState* thisState_i; RigidBodyState* thisState_i;
RigidBodyState* thisState_j; RigidBodyState* thisState_j;
RigidBodyState* thisDelta; RigidBodyState* thisDelta;
@ -702,14 +702,14 @@ void GlobalTimeStep(void)
RigidBodyState* tp; RigidBodyState* tp;
RigidBodyState* d0; RigidBodyState* d0;
RigidBodyState* d1; RigidBodyState* d1;
LONGVECTOR AV; LONGVECTOR4 AV;
LONGQUATERNION delta_orientation; LONGQUATERNION delta_orientation;
LONGVECTOR normal; LONGVECTOR4 normal;
LONGVECTOR collisionpoint; LONGVECTOR4 collisionpoint;
LONGVECTOR lever0; LONGVECTOR4 lever0;
LONGVECTOR lever1; LONGVECTOR4 lever1;
LONGVECTOR torque; LONGVECTOR4 torque;
LONGVECTOR pointVel0; LONGVECTOR4 pointVel0;
VECTOR velocity; VECTOR velocity;
int depth; int depth;
int RKstep; int RKstep;
@ -794,7 +794,7 @@ void GlobalTimeStep(void)
if (cp->hd.mayBeColliding == 0) if (cp->hd.mayBeColliding == 0)
{ {
long* orient = st->n.orientation; long* orient = st->n.orientation; // LONGQUATERNION
st->n.fposition[0] += st->n.linearVelocity[0] >> 8; st->n.fposition[0] += st->n.linearVelocity[0] >> 8;
st->n.fposition[1] += st->n.linearVelocity[1] >> 8; st->n.fposition[1] += st->n.linearVelocity[1] >> 8;
@ -854,7 +854,7 @@ void GlobalTimeStep(void)
thisDelta = _d1; thisDelta = _d1;
} }
long* orient = thisState_i->n.orientation; long* orient = thisState_i->n.orientation; // LONGQUATERNION
thisDelta[i].n.fposition[0] = thisState_i->n.linearVelocity[0] >> 8; thisDelta[i].n.fposition[0] = thisState_i->n.linearVelocity[0] >> 8;
thisDelta[i].n.fposition[1] = thisState_i->n.linearVelocity[1] >> 8; thisDelta[i].n.fposition[1] = thisState_i->n.linearVelocity[1] >> 8;
@ -1906,7 +1906,7 @@ void CheckCarToCarCollisions(void)
// End Line: 5532 // End Line: 5532
// [D] [T] // [D] [T]
void ProcessCarPad(CAR_DATA* cp, ulong pad, char PadSteer, char use_analogue) void ProcessCarPad(CAR_DATA* cp, u_int pad, char PadSteer, char use_analogue)
{ {
int player_id; int player_id;
int int_steer; int int_steer;
@ -2430,7 +2430,7 @@ void CheckCarEffects(CAR_DATA* cp, int player_id)
{ {
SetChannelPosition3(player[player_id].skidding.chan, SetChannelPosition3(player[player_id].skidding.chan,
(VECTOR*)cp->hd.where.t, (VECTOR*)cp->hd.where.t,
cp->st.n.linearVelocity, (LONGVECTOR3*)cp->st.n.linearVelocity,
(skidsound - 10000) * 3 / 4 - 5000, (skidsound - 10000) * 3 / 4 - 5000,
skidsound * 1024 / 13000 + 3072 + player_id * 8, 0); skidsound * 1024 / 13000 + 3072 + player_id * 8, 0);
} }
@ -2499,7 +2499,8 @@ void CheckCarEffects(CAR_DATA* cp, int player_id)
pitch = 3584; pitch = 3584;
SetChannelPosition3(player[player_id].wheelnoise.chan, SetChannelPosition3(player[player_id].wheelnoise.chan,
(VECTOR*)cp->hd.where.t, cp->st.n.linearVelocity, (VECTOR*)cp->hd.where.t,
(LONGVECTOR3*)cp->st.n.linearVelocity,
spd * 50 - 10000, spd * 50 - 10000,
pitch + player_id * 8, 0); pitch + player_id * 8, 0);
} }

View File

@ -6,7 +6,7 @@ extern int playerghost;
extern int playerhitcopsanyway; extern int playerhitcopsanyway;
extern char continuous_track; extern char continuous_track;
extern void InitCarPhysics(CAR_DATA *cp, LONGVECTOR* startpos, int direction); // 0x0005381C extern void InitCarPhysics(CAR_DATA *cp, LONGVECTOR4* startpos, int direction); // 0x0005381C
extern void TempBuildHandlingMatrix(CAR_DATA *cp, int init); // 0x000539E8 extern void TempBuildHandlingMatrix(CAR_DATA *cp, int init); // 0x000539E8
@ -30,7 +30,7 @@ extern void InitialiseCarHandling(); // 0x00056A6C
extern void CheckCarToCarCollisions(); // 0x000556E0 extern void CheckCarToCarCollisions(); // 0x000556E0
extern void ProcessCarPad(CAR_DATA *cp, unsigned long pad, char PadSteer, char use_analogue); // 0x00055A9C extern void ProcessCarPad(CAR_DATA *cp, u_int pad, char PadSteer, char use_analogue); // 0x00055A9C
extern void InitSkidding(); // 0x00056CB8 extern void InitSkidding(); // 0x00056CB8

View File

@ -263,7 +263,7 @@ void LeadUpdateState(CAR_DATA* cp)
tmpStart.vz = z; tmpStart.vz = z;
tmpStart.vy = MapHeight(&tmpStart) - cp->ap.carCos->wheelDisp[0].vy; tmpStart.vy = MapHeight(&tmpStart) - cp->ap.carCos->wheelDisp[0].vy;
InitCarPhysics(cp, (LONGVECTOR*)&tmpStart, cp->ai.l.targetDir); InitCarPhysics(cp, (LONGVECTOR4*)&tmpStart, cp->ai.l.targetDir);
// start him up // start him up
cp->ai.l.dstate = 3; cp->ai.l.dstate = 3;
@ -489,11 +489,11 @@ void LeadUpdateState(CAR_DATA* cp)
// End Line: 1283 // End Line: 1283
// [D] [T] // [D] [T]
ulong LeadPadResponse(CAR_DATA* cp) u_int LeadPadResponse(CAR_DATA* cp)
{ {
int dif; int dif;
int avel; int avel;
ulong t0; u_int t0;
int deltaVel; int deltaVel;
int deltaAVel; int deltaAVel;
int deltaPos; int deltaPos;
@ -3738,7 +3738,7 @@ void SelectExit(CAR_DATA* cp, DRIVER2_JUNCTION* junction)
// End Line: 7436 // End Line: 7436
// [D] [T] // [D] [T]
ulong FreeRoamer(CAR_DATA* cp) u_int FreeRoamer(CAR_DATA* cp)
{ {
LeadHorn(cp); LeadHorn(cp);
DamageBar.position = cp->totalDamage; DamageBar.position = cp->totalDamage;
@ -3821,7 +3821,7 @@ ulong FreeRoamer(CAR_DATA* cp)
// End Line: 10453 // End Line: 10453
// [D] [T] // [D] [T]
ulong hypot(long x, long y) u_int hypot(int x, int y)
{ {
int t; int t;

View File

@ -8,7 +8,7 @@ extern void InitLead(CAR_DATA *cp); // 0x000E7128
extern void LeadUpdateState(CAR_DATA *cp); // 0x000E73E8 extern void LeadUpdateState(CAR_DATA *cp); // 0x000E73E8
extern unsigned long LeadPadResponse(CAR_DATA *cp); // 0x000E7994 extern u_int LeadPadResponse(CAR_DATA *cp); // 0x000E7994
extern void FakeMotion(CAR_DATA *cp); // 0x000E7DE8 extern void FakeMotion(CAR_DATA *cp); // 0x000E7DE8
@ -34,9 +34,9 @@ extern void SetTarget(CAR_DATA *cp, int cr, int heading, int *nextJunction); //
extern void SelectExit(CAR_DATA *cp, DRIVER2_JUNCTION *junction); // 0x000EC5E4 extern void SelectExit(CAR_DATA *cp, DRIVER2_JUNCTION *junction); // 0x000EC5E4
extern unsigned long FreeRoamer(CAR_DATA *cp); // 0x000EC99C extern u_int FreeRoamer(CAR_DATA *cp); // 0x000EC99C
extern unsigned long hypot(long x, long y); // 0x000ECB28 extern u_int hypot(int x, int y); // 0x000ECB28
#endif #endif

View File

@ -142,7 +142,7 @@ static PAUSEMODE PauseMode = PAUSEMODE_PAUSE;
unsigned char defaultPlayerModel[2] = { 0 }; // offset 0xAA604 unsigned char defaultPlayerModel[2] = { 0 }; // offset 0xAA604
unsigned char defaultPlayerPalette = 0; // offset 0xAA606 unsigned char defaultPlayerPalette = 0; // offset 0xAA606
ulong* transparent_buffer; uint* transparent_buffer;
// system? // system?
int gameinit = 0; int gameinit = 0;
@ -888,7 +888,7 @@ void GameInit(void)
gStartOnFoot = (plStart->type == 2); gStartOnFoot = (plStart->type == 2);
InitPlayer(&player[i], &car_data[i], plStart->controlType, plStart->rotation, (LONGVECTOR *)&plStart->position, plStart->model, plStart->palette, &padid); InitPlayer(&player[i], &car_data[i], plStart->controlType, plStart->rotation, (LONGVECTOR4 *)&plStart->position, plStart->model, plStart->palette, &padid);
if (gStartOnFoot == 0) if (gStartOnFoot == 0)
{ {
@ -1151,7 +1151,7 @@ char paused = 0;
char gRightWayUp = 0; // cheat char gRightWayUp = 0; // cheat
int num_active_cars = 0; int num_active_cars = 0;
unsigned long lead_pad = 0; u_int lead_pad = 0;
int numInactiveCars = 0; int numInactiveCars = 0;
int leadCarId = 0; int leadCarId = 0;
@ -1161,7 +1161,7 @@ VECTOR leadcar_pos;
// [D] // [D]
void StepSim(void) void StepSim(void)
{ {
static unsigned long t0; // offset 0x0 static u_int t0; // offset 0x0
static char t1; // offset 0x4 static char t1; // offset 0x4
static char t2; // offset 0x5 static char t2; // offset 0x5
static int oldsp; // offset 0x8 static int oldsp; // offset 0x8
@ -1197,7 +1197,7 @@ void StepSim(void)
oldsp = SetSp(0x1f8003e8); // i don't know what this does oldsp = SetSp(0x1f8003e8); // i don't know what this does
lead_pad = (ulong)controller_bits; lead_pad = (uint)controller_bits;
if (player[0].playerCarId < 0) if (player[0].playerCarId < 0)
playerFelony = &pedestrianFelony; playerFelony = &pedestrianFelony;
@ -2145,7 +2145,7 @@ void DrawGame(void)
g_enableSwapInterval = 1; g_enableSwapInterval = 1;
#endif #endif
static unsigned long frame = 0; static int frame = 0;
if (NumPlayers == 1 || NoPlayerControl != 0) if (NumPlayers == 1 || NoPlayerControl != 0)
{ {
@ -3346,7 +3346,10 @@ void DealWithHorn(char* hr, int i)
channel = i != 0 ? 5 : 2; channel = i != 0 ? 5 : 2;
SetChannelPosition3(channel, (VECTOR*)car->hd.where.t, car->st.n.linearVelocity, -2000, i * 8 + 4096, 0); SetChannelPosition3(channel,
(VECTOR*)car->hd.where.t,
(LONGVECTOR3*)car->st.n.linearVelocity,
-2000, i * 8 + 4096, 0);
} }
*hr = (*hr + 1) % 3; *hr = (*hr + 1) % 3;

View File

@ -497,7 +497,10 @@ void DoCutsceneSound(void)
if (cutscene_timer == 180) if (cutscene_timer == 180)
{ {
Start3DTrackingSound(-1, SOUND_BANK_MISSION, GetMissionSound(26), (VECTOR*)car_data[2].hd.where.t, car_data[2].st.n.linearVelocity); Start3DTrackingSound(-1, SOUND_BANK_MISSION,
GetMissionSound(26),
(VECTOR*)car_data[2].hd.where.t,
(LONGVECTOR3*)car_data[2].st.n.linearVelocity);
} }
if (cutscene_timer < 641) if (cutscene_timer < 641)
@ -719,7 +722,7 @@ void InitializeMissionSound(void)
void DoMissionSound(void) void DoMissionSound(void)
{ {
int chan; int chan;
LONGVECTOR V; LONGVECTOR4 V;
VECTOR* P; VECTOR* P;
int i; int i;
static int channel = 0; static int channel = 0;
@ -784,7 +787,10 @@ void DoMissionSound(void)
chan = GetFreeChannel(); chan = GetFreeChannel();
StartSound(chan, SOUND_BANK_MISSION, GetMissionSound(20), -1500, 4096); StartSound(chan, SOUND_BANK_MISSION, GetMissionSound(20), -1500, 4096);
SetChannelPosition3(chan, (VECTOR*)car_data[carId].hd.where.t, car_data[carId].st.n.linearVelocity, -1500, 4096 - Mission.timer[0].count / 750, 0); SetChannelPosition3(chan,
(VECTOR*)car_data[carId].hd.where.t,
(LONGVECTOR3*)car_data[carId].st.n.linearVelocity,
-1500, 4096 - Mission.timer[0].count / 750, 0);
} }
} }
} }
@ -956,7 +962,7 @@ void DoMissionSound(void)
V[1] = pos[1] - C[1]; V[1] = pos[1] - C[1];
V[2] = pos[2] - C[2]; V[2] = pos[2] - C[2];
SetChannelPosition3(holdall, (VECTOR*)C, (long*)V, 0, 4096, 0); SetChannelPosition3(holdall, (VECTOR*)C, (LONGVECTOR3*)V, 0, 4096, 0);
pos[0] = C[0]; pos[0] = C[0];
pos[1] = C[1]; pos[1] = C[1];

View File

@ -195,7 +195,7 @@ int wantedTimeOfDay = -1;
int wantedWeather = -1; int wantedWeather = -1;
MS_TARGET* MissionTargets; MS_TARGET* MissionTargets;
unsigned long* MissionScript; u_int* MissionScript;
char* MissionStrings; char* MissionStrings;
char* gMissionTitle = NULL; char* gMissionTitle = NULL;
@ -210,7 +210,7 @@ static char NewLeadDelay = 0;
#define MISSIOH_IDENT (('D' << 24) | ('2' << 16) | ('M' << 8) | 'S' ) #define MISSIOH_IDENT (('D' << 24) | ('2' << 16) | ('M' << 8) | 'S' )
MR_MISSION Mission; MR_MISSION Mission;
u_long MissionStack[16][16]; u_int MissionStack[16][16];
MR_THREAD MissionThreads[16]; MR_THREAD MissionThreads[16];
unsigned char playercollected[2] = { 0, 0 }; unsigned char playercollected[2] = { 0, 0 };
@ -283,7 +283,7 @@ void InitialiseMissionDefaults(void)
Mission.message_string[i] = NULL; Mission.message_string[i] = NULL;
} }
Driver2TempJunctionsPtr = (ulong *)_overlay_buffer; Driver2TempJunctionsPtr = (uint*)_overlay_buffer;
NumTempJunctions = 0; NumTempJunctions = 0;
gPlayerWithTheFlag = -1; gPlayerWithTheFlag = -1;
last_flag = -1; last_flag = -1;
@ -388,9 +388,9 @@ void LoadMission(int missionnum)
int *routedata; int *routedata;
uint loadsize; uint loadsize;
char filename[32]; char filename[32];
unsigned long header; u_int header;
unsigned long length; u_int length;
unsigned long offset; u_int offset;
InitialiseMissionDefaults(); InitialiseMissionDefaults();
@ -440,7 +440,7 @@ void LoadMission(int missionnum)
MissionHeader = MissionLoadAddress; MissionHeader = MissionLoadAddress;
MissionTargets = (MS_TARGET *)((int)&MissionLoadAddress->id + MissionLoadAddress->size); MissionTargets = (MS_TARGET *)((int)&MissionLoadAddress->id + MissionLoadAddress->size);
MissionScript = (ulong *)(MissionTargets + 16); MissionScript = (u_int *)(MissionTargets + 16);
MissionStrings = (char *)(((MS_TARGET *)MissionScript)->data + MissionLoadAddress->strings); MissionStrings = (char *)(((MS_TARGET *)MissionScript)->data + MissionLoadAddress->strings);
if (MissionLoadAddress->route && !NewLevel) if (MissionLoadAddress->route && !NewLevel)
@ -1476,7 +1476,7 @@ void SetPlayerMessage(int player, char *message, int priority, int seconds)
// [D] [T] // [D] [T]
int TargetComplete(MS_TARGET *target, int player) int TargetComplete(MS_TARGET *target, int player)
{ {
unsigned long complete; u_int complete;
if (player == 0) if (player == 0)
{ {
@ -1534,7 +1534,7 @@ int TargetComplete(MS_TARGET *target, int player)
// [D] [T] // [D] [T]
int TargetActive(MS_TARGET *target, int player) int TargetActive(MS_TARGET *target, int player)
{ {
unsigned long active; u_int active;
if (player == 0) if (player == 0)
{ {
@ -1801,7 +1801,7 @@ void HandleMissionThreads(void)
int i; int i;
MR_THREAD* thread; MR_THREAD* thread;
int running; int running;
unsigned long value; u_int value;
for (i = 0; i < 16; i++) for (i = 0; i < 16; i++)
MissionTargets[i].data[1] &= ~0x600; MissionTargets[i].data[1] &= ~0x600;
@ -1873,7 +1873,7 @@ void HandleMissionThreads(void)
// End Line: 5061 // End Line: 5061
// [D] [T] // [D] [T]
int MRCommand(MR_THREAD *thread, ulong cmd) int MRCommand(MR_THREAD *thread, u_int cmd)
{ {
long val1; long val1;
long val2; long val2;
@ -2125,7 +2125,7 @@ int MRCommand(MR_THREAD *thread, ulong cmd)
// End Line: 7384 // End Line: 7384
// [D] [T] // [D] [T]
int MROperator(MR_THREAD *thread, ulong op) int MROperator(MR_THREAD *thread, u_int op)
{ {
long val1; long val1;
long val2; long val2;
@ -2202,7 +2202,7 @@ int MROperator(MR_THREAD *thread, ulong op)
// End Line: 7496 // End Line: 7496
// [D] [T] // [D] [T]
int MRFunction(MR_THREAD *thread, ulong fnc) int MRFunction(MR_THREAD *thread, u_int fnc)
{ {
long value; long value;
@ -2241,7 +2241,7 @@ int MRFunction(MR_THREAD *thread, ulong fnc)
// End Line: 7546 // End Line: 7546
// [D] [T] // [D] [T]
void MRInitialiseThread(MR_THREAD *thread, ulong *pc, unsigned char player) void MRInitialiseThread(MR_THREAD *thread, u_int *pc, u_char player)
{ {
thread->active = 1; thread->active = 1;
thread->pc = pc; thread->pc = pc;
@ -2275,7 +2275,7 @@ void MRInitialiseThread(MR_THREAD *thread, ulong *pc, unsigned char player)
// End Line: 7570 // End Line: 7570
// [D] [T] // [D] [T]
void MRStartThread(MR_THREAD *callingthread, ulong addr, unsigned char player) void MRStartThread(MR_THREAD *callingthread, u_int addr, unsigned char player)
{ {
int i; int i;
for (i = 0; i < 16; i++) for (i = 0; i < 16; i++)
@ -2501,7 +2501,7 @@ long MRGetParam(MR_THREAD *thread)
// End Line: 7778 // End Line: 7778
// [D] [T] // [D] [T]
long MRGetVariable(MR_THREAD *thread, ulong var) long MRGetVariable(MR_THREAD *thread, u_int var)
{ {
switch (var) switch (var)
{ {
@ -2537,7 +2537,7 @@ long MRGetVariable(MR_THREAD *thread, ulong var)
// End Line: 7830 // End Line: 7830
// [D] [T] // [D] [T]
void MRSetVariable(MR_THREAD *thread, ulong var, long value) void MRSetVariable(MR_THREAD *thread, u_int var, long value)
{ {
switch (var) switch (var)
{ {
@ -2678,12 +2678,12 @@ int MRProcessTarget(MR_THREAD *thread, MS_TARGET *target)
{ {
int phrase; int phrase;
int playerId; int playerId;
unsigned long dist; u_int dist;
char *message; char *message;
int ret; int ret;
VECTOR tv; VECTOR tv;
VECTOR pv; VECTOR pv;
LONGVECTOR pos; LONGVECTOR4 pos;
int slot; int slot;
ret = 0; ret = 0;
@ -3443,7 +3443,7 @@ int MRCreateCar(MS_TARGET *target)
{ {
int curslot; int curslot;
int newslot; int newslot;
LONGVECTOR pos; LONGVECTOR4 pos;
char playerid; char playerid;
pos[0] = target->data[3]; pos[0] = target->data[3];

View File

@ -72,7 +72,7 @@ extern int MaxPlayerDamage[2];
extern COP_DATA gCopData; extern COP_DATA gCopData;
extern MS_TARGET *MissionTargets; extern MS_TARGET *MissionTargets;
extern unsigned long *MissionScript; extern u_int*MissionScript;
extern char *MissionStrings; extern char *MissionStrings;
extern char *gMissionTitle; extern char *gMissionTitle;
@ -117,15 +117,15 @@ extern void SetConfusedCar(int slot); // 0x0006444C
extern void HandleMissionThreads(); // 0x00061C5C extern void HandleMissionThreads(); // 0x00061C5C
extern int MRCommand(MR_THREAD *thread, unsigned long cmd); // 0x00061E3C extern int MRCommand(MR_THREAD *thread, u_int cmd); // 0x00061E3C
extern int MROperator(MR_THREAD *thread, unsigned long op); // 0x00064498 extern int MROperator(MR_THREAD *thread, u_int op); // 0x00064498
extern int MRFunction(MR_THREAD *thread, unsigned long fnc); // 0x000645AC extern int MRFunction(MR_THREAD *thread, u_int fnc); // 0x000645AC
extern void MRInitialiseThread(MR_THREAD *thread, unsigned long *pc, unsigned char player); // 0x00064614 extern void MRInitialiseThread(MR_THREAD *thread, u_int *pc, u_char player); // 0x00064614
extern void MRStartThread(MR_THREAD *callingthread, unsigned long addr, unsigned char player); // 0x00064630 extern void MRStartThread(MR_THREAD *callingthread, u_int addr, u_char player); // 0x00064630
extern int MRStopThread(MR_THREAD *thread); // 0x00064690 extern int MRStopThread(MR_THREAD *thread); // 0x00064690
@ -139,9 +139,9 @@ extern long MRPop(MR_THREAD *thread); // 0x00064744
extern long MRGetParam(MR_THREAD *thread); // 0x00064760 extern long MRGetParam(MR_THREAD *thread); // 0x00064760
extern long MRGetVariable(MR_THREAD *thread, unsigned long var); // 0x000647CC extern long MRGetVariable(MR_THREAD *thread, u_int var); // 0x000647CC
extern void MRSetVariable(MR_THREAD *thread, unsigned long var, long value); // 0x000648B0 extern void MRSetVariable(MR_THREAD *thread, u_int var, long value); // 0x000648B0
extern int MRProcessTarget(MR_THREAD *thread, MS_TARGET *target); // 0x00062470 extern int MRProcessTarget(MR_THREAD *thread, MS_TARGET *target); // 0x00062470

View File

@ -128,7 +128,7 @@ int gMapYOffset = 181;
/* WARNING: Could not reconcile some variable overlaps */ /* WARNING: Could not reconcile some variable overlaps */
// [D] [T] // [D] [T]
void DrawTargetBlip(VECTOR *pos, unsigned char r, unsigned char g, unsigned char b, ulong flags) void DrawTargetBlip(VECTOR *pos, u_char r, u_char g, u_char b, int flags)
{ {
int ysize; int ysize;
POLY_FT4 *poly; POLY_FT4 *poly;
@ -254,7 +254,7 @@ void DrawTargetBlip(VECTOR *pos, unsigned char r, unsigned char g, unsigned char
/* WARNING: Could not reconcile some variable overlaps */ /* WARNING: Could not reconcile some variable overlaps */
// [D] [T] // [D] [T]
void DrawTargetArrow(VECTOR *pos, ulong flags) void DrawTargetArrow(VECTOR *pos, int flags)
{ {
int dy; int dy;
int dx; int dx;
@ -375,7 +375,7 @@ void DrawTargetArrow(VECTOR *pos, ulong flags)
// End Line: 1822 // End Line: 1822
// [D] [T] // [D] [T]
void DrawPlayerDot(VECTOR *pos, short rot, unsigned char r, unsigned char g, int b, ulong flags) void DrawPlayerDot(VECTOR *pos, short rot, u_char r, u_char g, u_char b, int flags)
{ {
int sn; int sn;
int cs; int cs;
@ -575,11 +575,11 @@ void ProcessOverlayLump(char *lump_ptr, int lump_size)
// End Line: 2100 // End Line: 2100
// [D] [T] // [D] [T]
ulong Long2DDistance(VECTOR *pPoint1, VECTOR *pPoint2) u_int Long2DDistance(VECTOR *pPoint1, VECTOR *pPoint2)
{ {
int tempTheta; int tempTheta;
int theta; int theta;
ulong result; u_int result;
VECTOR delta; VECTOR delta;
delta.vx = ABS(pPoint1->vx - pPoint2->vx); delta.vx = ABS(pPoint1->vx - pPoint2->vx);

View File

@ -10,15 +10,15 @@ extern int gMapYOffset;
extern int map_x_shift; extern int map_x_shift;
extern int map_z_shift; extern int map_z_shift;
extern void DrawTargetBlip(VECTOR *pos, unsigned char r, unsigned char g, unsigned char b, unsigned long flags); // 0x00016280 extern void DrawTargetBlip(VECTOR *pos, u_char r, u_char g, u_char b, int flags); // 0x00016280
extern void DrawTargetArrow(VECTOR *pos, unsigned long flags); // 0x00016578 extern void DrawTargetArrow(VECTOR *pos, int flags); // 0x00016578
extern void DrawPlayerDot(VECTOR *pos, short rot, unsigned char r, unsigned char g, int b, unsigned long flags); // 0x00016814 extern void DrawPlayerDot(VECTOR *pos, short rot, u_char r, u_char g, u_char b, int flags); // 0x00016814
extern void ProcessOverlayLump(char *lump_ptr, int lump_size); // 0x00016AE8 extern void ProcessOverlayLump(char *lump_ptr, int lump_size); // 0x00016AE8
extern unsigned long Long2DDistance(VECTOR *pPoint1, VECTOR *pPoint2); // 0x00016C0C extern u_int Long2DDistance(VECTOR *pPoint1, VECTOR *pPoint2); // 0x00016C0C
extern void InitOverheadMap(); // 0x000197BC extern void InitOverheadMap(); // 0x000197BC

View File

@ -730,7 +730,7 @@ void SaveReplay(int direction)
} }
else else
{ {
sprintf(filename, "CHASE.D2RP", gCurrentMissionNumber); sprintf(filename, "CHASE.D2RP");// , gCurrentMissionNumber);
} }
#else #else
sprintf(filename, "CHASE.D2RP", gCurrentMissionNumber); sprintf(filename, "CHASE.D2RP", gCurrentMissionNumber);

View File

@ -98,7 +98,7 @@ int bKilled = 0;
PEDESTRIAN_ROADS pedestrian_roads; PEDESTRIAN_ROADS pedestrian_roads;
unsigned long tannerPad; u_int tannerPad;
extern short padd; extern short padd;
SVECTOR camAngle; SVECTOR camAngle;
static int oldCamView; static int oldCamView;
@ -144,8 +144,8 @@ int powerCounter = 0;
void IHaveThePower(void) void IHaveThePower(void)
{ {
CAR_DATA* cp; CAR_DATA* cp;
LONGVECTOR force = { 0x9000, 0, 0, 0 }; LONGVECTOR4 force = { 0x9000, 0, 0, 0 };
LONGVECTOR point = { 0, 0, 90, 0 }; LONGVECTOR4 point = { 0, 0, 90, 0 };
if (GameLevel != 1) if (GameLevel != 1)
return; return;
@ -254,7 +254,7 @@ void IHaveThePower(void)
// End Line: 2398 // End Line: 2398
// [D] [T] // [D] [T]
void ProcessTannerPad(PEDESTRIAN* pPed, ulong pad, char PadSteer, char use_analogue) void ProcessTannerPad(PEDESTRIAN* pPed, uint pad, char PadSteer, char use_analogue)
{ {
sdPlane* SurfacePtr; sdPlane* SurfacePtr;
int direction; int direction;
@ -890,7 +890,7 @@ void DestroyPedestrian(PEDESTRIAN* pPed)
/* WARNING: Type propagation algorithm not settling */ /* WARNING: Type propagation algorithm not settling */
// [D] [T] // [D] [T]
int ActivatePlayerPedestrian(CAR_DATA* pCar, char* padId, int direction, LONGVECTOR* position, PED_MODEL_TYPES playerType) int ActivatePlayerPedestrian(CAR_DATA* pCar, char* padId, int direction, LONGVECTOR4* position, PED_MODEL_TYPES playerType)
{ {
int wbody; int wbody;
int side; int side;
@ -1227,7 +1227,7 @@ void PlaceRoadBlockCops(void)
int i; int i;
int numCops; int numCops;
CAR_DATA* pCopCars[16]; CAR_DATA* pCopCars[16];
LONGVECTOR disp; LONGVECTOR4 disp;
if (numCopPeds >= 8) if (numCopPeds >= 8)
return; return;
@ -1306,7 +1306,7 @@ void PlaceRoadBlockCops(void)
// End Line: 4496 // End Line: 4496
// [D] [T] // [D] [T]
int CreatePedAtLocation(LONGVECTOR* pPos, int pedType) int CreatePedAtLocation(LONGVECTOR4* pPos, int pedType)
{ {
PEDESTRIAN* pPed; PEDESTRIAN* pPed;
@ -2389,7 +2389,7 @@ void SetupGetInCar(PEDESTRIAN* pPed)
int playerId; int playerId;
int entrySide; int entrySide;
LONGVECTOR pos; LONGVECTOR4 pos;
pPed->flags &= ~4; pPed->flags &= ~4;
pPed->speed = 0; pPed->speed = 0;
@ -3492,9 +3492,9 @@ int FindPointOfCollision(CAR_DATA* pCar, PEDESTRIAN* pPed)
int TannerCarCollisionCheck(VECTOR* pPos, int dir, int bQuick) int TannerCarCollisionCheck(VECTOR* pPos, int dir, int bQuick)
{ {
CAR_DATA* cp1; CAR_DATA* cp1;
LONGVECTOR pointVel; LONGVECTOR4 pointVel;
LONGVECTOR reaction; LONGVECTOR4 reaction;
LONGVECTOR lever; LONGVECTOR4 lever;
int strikeVel; int strikeVel;
SVECTOR boxDisp; SVECTOR boxDisp;
CAR_COSMETICS* car_cos; CAR_COSMETICS* car_cos;
@ -3696,7 +3696,7 @@ void SetupCivJump(PEDESTRIAN* pPed, CAR_DATA* cp)
short scale; short scale;
int dx; int dx;
short angle; short angle;
LONGVECTOR dir; LONGVECTOR4 dir;
if (pPed->type != PED_ACTION_JUMP) if (pPed->type != PED_ACTION_JUMP)
{ {

View File

@ -16,7 +16,7 @@ extern PEDESTRIAN *pUsedPeds;
extern void IHaveThePower(); // 0x0006DD34 extern void IHaveThePower(); // 0x0006DD34
extern void ProcessTannerPad(PEDESTRIAN *pPed, unsigned long pad, char PadSteer, char use_analogue); // 0x0006DF54 extern void ProcessTannerPad(PEDESTRIAN *pPed, u_int pad, char PadSteer, char use_analogue); // 0x0006DF54
extern void InitTanner(); // 0x0006E408 extern void InitTanner(); // 0x0006E408
@ -30,13 +30,13 @@ extern void DestroyCivPedestrians(); // 0x00072FD0
extern void DestroyPedestrian(PEDESTRIAN *pPed); // 0x00071FB4 extern void DestroyPedestrian(PEDESTRIAN *pPed); // 0x00071FB4
extern int ActivatePlayerPedestrian(CAR_DATA *pCar, char *padId, int direction, LONGVECTOR* position, PED_MODEL_TYPES playerType); // 0x0006E6C4 extern int ActivatePlayerPedestrian(CAR_DATA *pCar, char *padId, int direction, LONGVECTOR4* position, PED_MODEL_TYPES playerType); // 0x0006E6C4
extern PEDESTRIAN * CreatePedestrian(); // 0x000720AC extern PEDESTRIAN * CreatePedestrian(); // 0x000720AC
extern void PlaceRoadBlockCops(); // 0x0006EC88 extern void PlaceRoadBlockCops(); // 0x0006EC88
extern int CreatePedAtLocation(LONGVECTOR* pPos, int pedType); // 0x0006F00C extern int CreatePedAtLocation(LONGVECTOR4* pPos, int pedType); // 0x0006F00C
extern void DrawAllPedestrians(); // 0x00072290 extern void DrawAllPedestrians(); // 0x00072290

View File

@ -38,7 +38,7 @@ PEDESTRIAN *pPlayerPed = NULL;
PLAYER player[8]; PLAYER player[8];
// [D] [T] // [D] [T]
void InitPlayer(PLAYER *locPlayer, CAR_DATA *cp, char carCtrlType, int direction, LONGVECTOR* startPos, int externModel, int palette, char *padid) void InitPlayer(PLAYER *locPlayer, CAR_DATA *cp, char carCtrlType, int direction, LONGVECTOR4* startPos, int externModel, int palette, char *padid)
{ {
int model; int model;
uint playerType; uint playerType;

View File

@ -4,7 +4,7 @@
extern PLAYER player[8]; extern PLAYER player[8];
extern PEDESTRIAN *pPlayerPed; extern PEDESTRIAN *pPlayerPed;
extern void InitPlayer(PLAYER *locPlayer, CAR_DATA *cp, char carCtrlType, int direction, LONGVECTOR* startPos, int externModel, int palette, char *padid); // 0x000739D8 extern void InitPlayer(PLAYER *locPlayer, CAR_DATA *cp, char carCtrlType, int direction, LONGVECTOR4* startPos, int externModel, int palette, char *padid); // 0x000739D8
extern void ChangeCarPlayerToPed(int playerID); // 0x00073334 extern void ChangeCarPlayerToPed(int playerID); // 0x00073334

View File

@ -352,7 +352,7 @@ void LoadFont(char *buffer)
// End Line: 1697 // End Line: 1697
// [D] [T] // [D] [T]
void StoreClut2(ulong *pDest, int x, int y) void StoreClut2(u_long *pDest, int x, int y)
{ {
RECT16 rect; RECT16 rect;

View File

@ -15,7 +15,7 @@ extern void PrintStringCentred(char *pString, short y); // 0x00074BD8
extern void LoadFont(char *buffer); // 0x00073CC8 extern void LoadFont(char *buffer); // 0x00073CC8
extern void StoreClut2(unsigned long *pDest, int x, int y); // 0x00074C28 extern void StoreClut2(u_long *pDest, int x, int y); // 0x00074C28
extern void SetCLUT16Flags(unsigned short clutID, unsigned short mask, char transparent); // 0x00074C64 extern void SetCLUT16Flags(unsigned short clutID, unsigned short mask, char transparent); // 0x00074C64

View File

@ -866,11 +866,11 @@ int valid_region(int x, int z)
// End Line: 2932 // End Line: 2932
// [D] [T] // [D] [T]
int cjpPlay(int stream, ulong *ppad, char *psteer, char *ptype) int cjpPlay(int stream, u_int *ppad, char *psteer, char *ptype)
{ {
int ret; int ret;
int t1; int t1;
ulong t0; u_int t0;
#ifdef CUTSCENE_RECORDER #ifdef CUTSCENE_RECORDER
if (stream < 0) if (stream < 0)
@ -926,11 +926,11 @@ int cjpPlay(int stream, ulong *ppad, char *psteer, char *ptype)
char ReplayMode = 0; char ReplayMode = 0;
// [D] [T] // [D] [T]
void cjpRecord(int stream, ulong *ppad, char *psteer, char *ptype) void cjpRecord(int stream, u_int *ppad, char *psteer, char *ptype)
{ {
int tmp; int tmp;
int t1; int t1;
ulong t0; u_int t0;
if (stream > -1 && stream < NumReplayStreams) if (stream > -1 && stream < NumReplayStreams)
{ {
@ -1068,7 +1068,7 @@ void AllocateReplayStream(REPLAY_STREAM *stream, int maxpad)
// End Line: 3467 // End Line: 3467
// [D] [T] // [D] [T]
int Get(int stream, ulong *pt0) int Get(int stream, u_int *pt0)
{ {
REPLAY_STREAM* rstream; REPLAY_STREAM* rstream;
@ -1078,7 +1078,7 @@ int Get(int stream, ulong *pt0)
if (rstream->PadRecordBuffer+1 <= rstream->PadRecordBufferEnd) if (rstream->PadRecordBuffer+1 <= rstream->PadRecordBufferEnd)
{ {
ulong t0 = (rstream->PadRecordBuffer->pad << 8) | rstream->PadRecordBuffer->analogue; uint t0 = (rstream->PadRecordBuffer->pad << 8) | rstream->PadRecordBuffer->analogue;
*pt0 = t0; *pt0 = t0;
if (rstream->playbackrun < rstream->PadRecordBuffer->run) if (rstream->playbackrun < rstream->PadRecordBuffer->run)
@ -1138,10 +1138,10 @@ int Get(int stream, ulong *pt0)
// End Line: 3545 // End Line: 3545
// [D] [T] // [D] [T]
int Put(int stream, ulong *pt0) int Put(int stream, u_int*pt0)
{ {
REPLAY_STREAM *rstream; REPLAY_STREAM *rstream;
ulong t0; u_int t0;
PADRECORD *padbuf; PADRECORD *padbuf;
rstream = &ReplayStreams[stream]; rstream = &ReplayStreams[stream];

View File

@ -36,15 +36,15 @@ extern int IsPingInfoAvailable();
extern int valid_region(int x, int z); // 0x0001AF34 extern int valid_region(int x, int z); // 0x0001AF34
extern int cjpPlay(int stream, unsigned long *ppad, char *psteer, char *ptype); // 0x0001AFFC extern int cjpPlay(int stream, u_int*ppad, char *psteer, char *ptype); // 0x0001AFFC
extern void cjpRecord(int stream, unsigned long *ppad, char *psteer, char *ptype); // 0x0001AD50 extern void cjpRecord(int stream, u_int*ppad, char *psteer, char *ptype); // 0x0001AD50
extern void AllocateReplayStream(REPLAY_STREAM *stream, int maxpad); // 0x0001B17C extern void AllocateReplayStream(REPLAY_STREAM *stream, int maxpad); // 0x0001B17C
extern int Get(int stream, unsigned long *pt0); // 0x0001B1F0 extern int Get(int stream, u_int* pt0); // 0x0001B1F0
extern int Put(int stream, unsigned long *pt0); // 0x0001B280 extern int Put(int stream, u_int* pt0); // 0x0001B280
extern void RecordWaypoint(); // 0x0001B364 extern void RecordWaypoint(); // 0x0001B364

View File

@ -20,7 +20,7 @@
#define SPU_CHANNEL_COUNT 24 #define SPU_CHANNEL_COUNT 24
LONGVECTOR dummylong = { 0, 0, 0, 0 }; LONGVECTOR3 dummylong = { 0, 0, 0 };
long bankaddr[2] = { 0 }; long bankaddr[2] = { 0 };
long banksize[2] = { 88064, 412672 }; long banksize[2] = { 88064, 412672 };
@ -138,7 +138,7 @@ void ClearChannelFields(int channel)
channels[channel].position.vx = 0; channels[channel].position.vx = 0;
channels[channel].position.vy = 0; channels[channel].position.vy = 0;
channels[channel].position.vz = 0; channels[channel].position.vz = 0;
channels[channel].srcvelocity = dummylong; channels[channel].srcvelocity = (LONGVECTOR3*)dummylong;
channels[channel].player = 0; channels[channel].player = 0;
} }
@ -278,7 +278,7 @@ void SetReverbState(int on)
// [D] [T] // [D] [T]
void SetReverbInGameState(int on) void SetReverbInGameState(int on)
{ {
long cl; int cl;
cl = 0xffff; cl = 0xffff;
@ -319,7 +319,7 @@ void SetReverbInGameState(int on)
// [D] [T] // [D] [T]
int SetReverbChannelState(int ch, int on) int SetReverbChannelState(int ch, int on)
{ {
long cl; int cl;
int prev; int prev;
cl = SPU_KEYCH(ch); cl = SPU_KEYCH(ch);
@ -438,7 +438,7 @@ int StartSound(int channel, int bank, int sample, int volume, int pitch)
// End Line: 685 // End Line: 685
// [D] [T] // [D] [T]
int Start3DTrackingSound(int channel, int bank, int sample, VECTOR *position, long *velocity) int Start3DTrackingSound(int channel, int bank, int sample, VECTOR *position, LONGVECTOR3* velocity)
{ {
if (channel < 0) if (channel < 0)
channel = GetFreeChannel(); channel = GetFreeChannel();
@ -447,7 +447,7 @@ int Start3DTrackingSound(int channel, int bank, int sample, VECTOR *position, lo
return -1; return -1;
channels[channel].srcposition = position; channels[channel].srcposition = position;
channels[channel].srcvelocity = velocity ? velocity : dummylong; channels[channel].srcvelocity = velocity ? velocity : (LONGVECTOR3*)dummylong;
channels[channel].srcpitch = 4096; channels[channel].srcpitch = 4096;
channels[channel].srcvolume = 0; channels[channel].srcvolume = 0;
@ -480,7 +480,7 @@ int Start3DSoundVolPitch(int channel, int bank, int sample, int x, int y, int z,
return -1; return -1;
channels[channel].srcposition = &channels[channel].position; channels[channel].srcposition = &channels[channel].position;
channels[channel].srcvelocity = dummylong; channels[channel].srcvelocity = (LONGVECTOR3*)dummylong;
channels[channel].position.vx = x; channels[channel].position.vx = x;
channels[channel].position.vy = y; channels[channel].position.vy = y;
channels[channel].position.vz = z; channels[channel].position.vz = z;
@ -600,7 +600,7 @@ int CompleteSoundSetup(int channel, int bank, int sample, int pitch, int proximi
// [D] [T] // [D] [T]
void SetChannelPitch(int channel, int pitch) void SetChannelPitch(int channel, int pitch)
{ {
long rate; int rate;
if (channel < 0 || channel >= MAX_SFX_CHANNELS) // [A] if (channel < 0 || channel >= MAX_SFX_CHANNELS) // [A]
return; return;
@ -684,11 +684,11 @@ void SetChannelVolume(int channel, int volume, int proximity)
// [D] [T] // [D] [T]
void ComputeDoppler(CHANNEL_DATA *ch) void ComputeDoppler(CHANNEL_DATA *ch)
{ {
long dist; int dist;
long seperationrate; int seperationrate;
VECTOR *srcPos; VECTOR *srcPos;
long *srcVel; long* srcVel; // LONGVECTOR3
PLAYER *pl; PLAYER *pl;
int dx, dy, dz; int dx, dy, dz;
@ -701,7 +701,7 @@ void ComputeDoppler(CHANNEL_DATA *ch)
return; return;
} }
srcVel = ch->srcvelocity; srcVel = (long*)ch->srcvelocity;
pl = &player[ch->player]; pl = &player[ch->player];
@ -748,7 +748,7 @@ void ComputeDoppler(CHANNEL_DATA *ch)
// End Line: 3578 // End Line: 3578
// [D] [T] // [D] [T]
void SetChannelPosition3(int channel, VECTOR *position, long *velocity, int volume, int pitch, int proximity) void SetChannelPosition3(int channel, VECTOR *position, LONGVECTOR3* velocity, int volume, int pitch, int proximity)
{ {
if (channel < 0 || channel >= MAX_SFX_CHANNELS) if (channel < 0 || channel >= MAX_SFX_CHANNELS)
return; return;
@ -756,7 +756,7 @@ void SetChannelPosition3(int channel, VECTOR *position, long *velocity, int volu
if (camera_change != 1 && old_camera_change != 1 && sound_paused == 0) if (camera_change != 1 && old_camera_change != 1 && sound_paused == 0)
{ {
channels[channel].srcposition = position; channels[channel].srcposition = position;
channels[channel].srcvelocity = velocity ? velocity : dummylong; channels[channel].srcvelocity = velocity ? velocity : (LONGVECTOR3*)dummylong;
channels[channel].srcvolume = volume; channels[channel].srcvolume = volume;
if (gSoundMode == 1) if (gSoundMode == 1)
@ -1288,7 +1288,7 @@ void UnlockChannel(int c)
void SoundHandler(void) void SoundHandler(void)
{ {
int ct; int ct;
long off; int off;
off = 0; off = 0;
@ -1765,9 +1765,9 @@ void UpdateVolumeAttributesS(int channel, int proximity)
int player_id; int player_id;
VECTOR *pos; VECTOR *pos;
VECTOR *cam_pos; VECTOR *cam_pos;
long dist; int dist;
int cam_ang, ang; int cam_ang, ang;
long damp; int damp;
player_id = channels[channel].player; player_id = channels[channel].player;
@ -2082,7 +2082,7 @@ int FESound(int sample)
return -1; return -1;
channels[channel].srcposition = NULL; channels[channel].srcposition = NULL;
channels[channel].srcvelocity = dummylong; channels[channel].srcvelocity = (LONGVECTOR3*)dummylong;
channels[channel].srcvolume = 4096; channels[channel].srcvolume = 4096;
return CompleteSoundSetup(channel, 1, sample, 2048, -1); return CompleteSoundSetup(channel, 1, sample, 2048, -1);

View File

@ -29,7 +29,7 @@ extern char SetPlayerOwnsChannel(int chan, char player); // 0x0007ABA8
extern int StartSound(int channel, int bank, int sample, int volume, int pitch); // 0x0007A7F8 extern int StartSound(int channel, int bank, int sample, int volume, int pitch); // 0x0007A7F8
extern int Start3DTrackingSound(int channel, int bank, int sample, VECTOR *position, long *velocity); // 0x0007A994 extern int Start3DTrackingSound(int channel, int bank, int sample, VECTOR *position, LONGVECTOR3* velocity); // 0x0007A994
extern int Start3DSoundVolPitch(int channel, int bank, int sample, int x, int y, int z, int volume, int pitch); // 0x0007A894 extern int Start3DSoundVolPitch(int channel, int bank, int sample, int x, int y, int z, int volume, int pitch); // 0x0007A894
@ -41,7 +41,7 @@ extern void SetChannelVolume(int channel, int volume, int proximity); // 0x0007A
extern void ComputeDoppler(CHANNEL_DATA *ch); // 0x000795C4 extern void ComputeDoppler(CHANNEL_DATA *ch); // 0x000795C4
extern void SetChannelPosition3(int channel, VECTOR *position, long *velocity, int volume, int pitch, int proximity); // 0x0007ABCC extern void SetChannelPosition3(int channel, VECTOR *position, LONGVECTOR3* velocity, int volume, int pitch, int proximity); // 0x0007ABCC
extern void PauseXM(); // 0x00079734 extern void PauseXM(); // 0x00079734

View File

@ -1241,7 +1241,7 @@ int tsetinfo[32];
void SendTPage(void) void SendTPage(void)
{ {
unsigned char old; unsigned char old;
ulong *clutptr; uint*clutptr;
int slot; int slot;
int npalettes; int npalettes;
int tpage2send; int tpage2send;
@ -1274,7 +1274,7 @@ void SendTPage(void)
LoadImage(&cluts, (u_long *)(model_spool_buffer + 0xE000 + 4)); LoadImage(&cluts, (u_long *)(model_spool_buffer + 0xE000 + 4));
clutptr = (ulong *)(texture_cluts[tpage2send]); clutptr = (uint*)(texture_cluts[tpage2send]);
i = 0; i = 0;
while (i < npalettes) while (i < npalettes)
@ -1282,7 +1282,7 @@ void SendTPage(void)
clutptr[0] = getClut(cluts.x + 16, cluts.y) << 0x10 | getClut(cluts.x, cluts.y); clutptr[0] = getClut(cluts.x + 16, cluts.y) << 0x10 | getClut(cluts.x, cluts.y);
clutptr[1] = getClut(cluts.x + 48, cluts.y) << 0x10 | getClut(cluts.x + 32, cluts.y); clutptr[1] = getClut(cluts.x + 48, cluts.y) << 0x10 | getClut(cluts.x + 32, cluts.y);
clutptr+=2; clutptr += 2;
cluts.y++; cluts.y++;

View File

@ -54,9 +54,9 @@ int texture_is_icon = 0;
char* texturename_buffer = NULL; char* texturename_buffer = NULL;
int NoTextureMemory = 0; int NoTextureMemory = 0;
unsigned short texture_pages[128]; u_short texture_pages[128];
unsigned short texture_cluts[128][32]; u_short texture_cluts[128][32];
unsigned char tpageloaded[128]; u_char tpageloaded[128];
int MaxSpecCluts; int MaxSpecCluts;
int slotsused; int slotsused;
@ -66,7 +66,7 @@ RECT16 fontclutpos;
RECT16 mapclutpos; RECT16 mapclutpos;
DVECTOR slot_clutpos[19]; DVECTOR slot_clutpos[19];
DVECTOR slot_tpagepos[19]; DVECTOR slot_tpagepos[19];
unsigned char tpageslots[19]; u_char tpageslots[19];
TP *tpage_position = NULL; TP *tpage_position = NULL;
TEXINF* tpage_ids[128] = { 0 }; TEXINF* tpage_ids[128] = { 0 };

View File

@ -845,7 +845,7 @@ void drawMesh(MVERTEX(*VSP)[5][5], int m, int n, _pct *pc)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
// [A] custom implemented function // [A] custom implemented function
void SubdivNxM(char *polys, ulong n, ulong m, int ofse) void SubdivNxM(char *polys, int n, int m, int ofse)
{ {
MVERTEX subdivVerts[5][5]; MVERTEX subdivVerts[5][5];

View File

@ -9,7 +9,7 @@ extern void makeMesh(MVERTEX (*VSP)[5][5], int m, int n); // 0x000420B0
extern void drawMesh(MVERTEX (*VSP)[5][5], int m, int n, _pct *pc); // 0x00042650 extern void drawMesh(MVERTEX (*VSP)[5][5], int m, int n, _pct *pc); // 0x00042650
extern void SubdivNxM(char *polys, unsigned long n, unsigned long m, int ofse); // 0x00042AEC extern void SubdivNxM(char *polys, int n, int m, int ofse); // 0x00042AEC
extern void TileNxN(MODEL *model, int levels, int Dofse); // 0x00042F40 extern void TileNxN(MODEL *model, int levels, int Dofse); // 0x00042F40

View File

@ -249,14 +249,14 @@ void StepOneCar(CAR_DATA* cp)
int a, b, speed; int a, b, speed;
int count, i; int count, i;
CAR_LOCALS _cl; CAR_LOCALS _cl;
LONGVECTOR deepestNormal; LONGVECTOR4 deepestNormal;
LONGVECTOR deepestLever; LONGVECTOR4 deepestLever;
LONGVECTOR deepestPoint; LONGVECTOR4 deepestPoint;
LONGVECTOR pointPos; LONGVECTOR4 pointPos;
LONGVECTOR surfacePoint; LONGVECTOR4 surfacePoint;
LONGVECTOR surfaceNormal; LONGVECTOR4 surfaceNormal;
LONGVECTOR lever; LONGVECTOR4 lever;
LONGVECTOR reaction; LONGVECTOR4 reaction;
VECTOR direction; VECTOR direction;
sdPlane* SurfacePtr; sdPlane* SurfacePtr;
@ -813,11 +813,11 @@ void AddWheelForcesDriver1(CAR_DATA* cp, CAR_LOCALS* cl)
int friction_coef; int friction_coef;
int oldSpeed; int oldSpeed;
int wheelspd; int wheelspd;
LONGVECTOR wheelPos; LONGVECTOR4 wheelPos;
LONGVECTOR surfacePoint; LONGVECTOR4 surfacePoint;
LONGVECTOR surfaceNormal; LONGVECTOR4 surfaceNormal;
VECTOR force; VECTOR force;
LONGVECTOR pointVel; LONGVECTOR4 pointVel;
int frontFS; int frontFS;
int rearFS; int rearFS;
sdPlane* SurfacePtr; sdPlane* SurfacePtr;

File diff suppressed because it is too large Load Diff

View File

@ -388,7 +388,7 @@ void GameDebugKeys(int nKey, bool down)
CAR_DATA *pCar = &car_data[player[0].playerCarId]; CAR_DATA *pCar = &car_data[player[0].playerCarId];
LONGVECTOR startpos = { LONGVECTOR4 startpos = {
pCar->hd.where.t[0], pCar->hd.where.t[0],
pCar->hd.where.t[1], pCar->hd.where.t[1],
pCar->hd.where.t[2], pCar->hd.where.t[2],