Skip to content

Commit

Permalink
- make PSX build happy by turning off scratchpad operations
Browse files Browse the repository at this point in the history
  • Loading branch information
SoapyMan committed Jan 29, 2022
1 parent afea562 commit b839691
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src_rebuild/Game/C/cars.c
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ void DrawCarWheels(CAR_DATA *cp, MATRIX *RearMatrix, VECTOR *pos, int zclip)
MODEL *WheelModelBack;
MODEL *WheelModelFront;

#ifdef PSX
#if 0 //def PSX
MATRIX& FrontMatrix = *(MATRIX*)(u_char*)getScratchAddr(0);
MATRIX& SteerMatrix = *(MATRIX*)((u_char*)getScratchAddr(0) + sizeof(MATRIX));
VECTOR& WheelPos = *(VECTOR*)((u_char*)getScratchAddr(0) + sizeof(MATRIX) * 2);
Expand Down Expand Up @@ -803,7 +803,7 @@ void PlayerCarFX(CAR_DATA *cp)
// [D] [T]
void plotNewCarModel(CAR_MODEL* car, int palette)
{
#ifdef PSX
#if 0 //def PSX
plotCarGlobals& _pg = *(plotCarGlobals*)(u_char*)getScratchAddr(0);
#else
plotCarGlobals _pg;
Expand Down
8 changes: 4 additions & 4 deletions src_rebuild/Game/C/draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ void addSubdivSpriteShadow(POLYFT4* src, SVECTOR* verts, int z)

m = 4;

#ifdef PSX
#if 0 //def PSX
MVERTEX5x5& subdiVerts = *(MVERTEX5x5*)(u_char*)getScratchAddr(0);
#else
MVERTEX5x5 subdiVerts;
Expand Down Expand Up @@ -179,7 +179,7 @@ void DrawSprites(PACKED_CELL_OBJECT** sprites, int numFound)
int numShadows;
int count;

#ifdef PSX
#if 0 //def PSX
MVERTEX5x5& subdiVerts = *(MVERTEX5x5*)(u_char*)getScratchAddr(0);
#else
MVERTEX5x5 subdiVerts;
Expand Down Expand Up @@ -780,7 +780,7 @@ void PlotBuildingModelSubdivNxN(MODEL* model, int rot, _pct* pc, int n)
SVECTOR* srcVerts;
int combo;

#ifdef PSX
#if 0//def PSX
MVERTEX5x5& subdiVerts = *(MVERTEX5x5*)(u_char*)getScratchAddr(0);
#else
MVERTEX5x5 subdiVerts;
Expand Down Expand Up @@ -1041,7 +1041,7 @@ void PlotModelSubdivNxN(MODEL* model, int rot, _pct* pc, int n)
SVECTOR* srcVerts;
int combo;

#ifdef PSX
#if 0//def PSX
MVERTEX5x5& subdiVerts = *(MVERTEX5x5*)(u_char*)getScratchAddr(0);
#else
MVERTEX5x5 subdiVerts;
Expand Down
4 changes: 2 additions & 2 deletions src_rebuild/Game/C/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ void StepSim(void)
pauseflag = 1;
}

oldsp = SetSp((u_long)((u_char*)getScratchAddr(0) + 0x3e8)); // i don't know what this does
//oldsp = SetSp((u_long)((u_char*)getScratchAddr(0) + 0x3e8)); // i don't know what this does

lead_pad = (u_int)controller_bits;

Expand Down Expand Up @@ -1148,7 +1148,7 @@ void StepSim(void)
DoScenaryCollisions();
CheckPlayerMiscFelonies();

SetSp(oldsp);
//SetSp(oldsp);

CameraCnt++;

Expand Down
2 changes: 1 addition & 1 deletion src_rebuild/Game/C/objcoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ char lineClear(VECTOR *v1, VECTOR *v2)
int xd; // $a0
int zd; // $v1

#ifdef PSX
#if 0 //def PSX
CELL_ITERATOR& ci = *(CELL_ITERATOR*)((u_char*)getScratchAddr(0) + 1024 - sizeof(CELL_ITERATOR));
#else
CELL_ITERATOR ci;
Expand Down

0 comments on commit b839691

Please sign in to comment.