mirror of
https://github.com/OpenDriver2/REDRIVER2.git
synced 2024-11-22 10:22:48 +01:00
- [PsyX] minor corrections to PGXP
This commit is contained in:
parent
a1feae3503
commit
21395fa51e
@ -42,8 +42,6 @@ extern PGXPVector3D g_FP_SXYZ0; // direct access PGXP without table lookup
|
||||
extern PGXPVector3D g_FP_SXYZ1;
|
||||
extern PGXPVector3D g_FP_SXYZ2;
|
||||
|
||||
extern int g_pgxpVertexIndex;
|
||||
|
||||
/* clears PGXP vertex buffer */
|
||||
void PGXP_ClearCache();
|
||||
|
||||
|
@ -280,9 +280,12 @@ PGXPVector3D g_FP_SXYZ0; // direct access PGXP without table lookup
|
||||
PGXPVector3D g_FP_SXYZ1;
|
||||
PGXPVector3D g_FP_SXYZ2;
|
||||
|
||||
PGXPVData g_pgxpCache[65535];
|
||||
int g_pgxpVertexIndex = 0;
|
||||
PGXPVData g_pgxpCache[1 << sizeof(ushort)*8];
|
||||
ushort g_pgxpVertexIndex = 0;
|
||||
|
||||
int g_pgxpTransformed = 0;
|
||||
|
||||
// "render" states
|
||||
float g_pgxpZOffset = 0.0f;
|
||||
float g_pgxpZScale = 1.0f;
|
||||
|
||||
@ -330,10 +333,10 @@ int PGXP_GetCacheData(PGXPVData* out, uint lookup, ushort indexhint)
|
||||
}
|
||||
|
||||
// index hint allows us to start from specific index
|
||||
int start = max(0, indexhint - 8);
|
||||
int end = g_pgxpVertexIndex;// min(start + 256, g_pgxpVertexIndex);
|
||||
ushort start = max(0, indexhint - 8);
|
||||
ushort end = g_pgxpVertexIndex;
|
||||
|
||||
for (int i = start; i < end; i++)
|
||||
for (ushort i = start; i < end; i++)
|
||||
{
|
||||
if (g_pgxpCache[i].lookup == lookup)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user