mirror of
https://github.com/OpenDriver2/REDRIVER2.git
synced 2024-11-22 10:22:48 +01:00
- few optimizations
This commit is contained in:
parent
459131407c
commit
db073a7287
@ -1300,10 +1300,11 @@ void DrawMapPSX(int* comp_val)
|
||||
int cellx, cellz;
|
||||
int hloop, vloop;
|
||||
|
||||
#if 0 //def PSX
|
||||
#ifdef PSX
|
||||
CELL_ITERATOR& ci = *(CELL_ITERATOR*)(u_char*)getScratchAddr(0);
|
||||
MATRIX& mRotStore = *(MATRIX*)((u_char*)getScratchAddr(0) + sizeof(CELL_ITERATOR));
|
||||
DrawMapData& drawData = *(DrawMapData*)((u_char*)getScratchAddr(0) + sizeof(CELL_ITERATOR) + sizeof(MATRIX));
|
||||
static_assert(sizeof(CELL_ITERATOR) + sizeof(MATRIX) + sizeof(DrawMapData) < 1024, "scratchpad overflow");
|
||||
#else
|
||||
CELL_ITERATOR ci;
|
||||
MATRIX mRotStore;
|
||||
|
@ -751,9 +751,6 @@ void GlobalTimeStep(void)
|
||||
void SetShadowPoints(CAR_DATA* c0, VECTOR* outpoints)
|
||||
{
|
||||
int i;
|
||||
SVECTOR disp;
|
||||
VECTOR pointPos;
|
||||
VECTOR surfaceNormal;
|
||||
CAR_COSMETICS* car_cos;
|
||||
|
||||
sdPlane* surfacePtr;
|
||||
@ -766,15 +763,10 @@ void SetShadowPoints(CAR_DATA* c0, VECTOR* outpoints)
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
disp = car_cos->cPoints[i];
|
||||
|
||||
gte_ldv0(&disp);
|
||||
|
||||
gte_ldv0(&car_cos->cPoints[i]);
|
||||
gte_rtv0tr();
|
||||
|
||||
gte_stlvnl(&pointPos);
|
||||
|
||||
FindSurfaceD2(&pointPos, &surfaceNormal, &outpoints[i], &surfacePtr);
|
||||
gte_stlvnl(&outpoints[i]);
|
||||
outpoints[i].vy = MapHeight(&outpoints[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user