- [Psy-X] added custom DR_PSYX_TEX primitive

This commit is contained in:
Ilya Shurumov 2021-03-16 01:43:40 +06:00
parent 8b69472094
commit c5cbfd36ea
3 changed files with 27 additions and 1 deletions

View File

@ -630,6 +630,14 @@ typedef struct {
u_long code[2];
} DR_STP; /* Drawing STP */
/*
* PSY-X commands
*/
typedef struct {
DECLARE_P_ADDR
u_long code[1];
} DR_PSYX_TEX;
/*
* Environment
@ -822,6 +830,12 @@ extern void GetDrawArea(DR_AREA *p);
extern void GetDrawOffset(DR_OFFSET *p);
extern void GetDrawEnv2(DR_ENV *p);
/*
* PSY-X commands
*/
extern void SetPsyXTexture(DR_PSYX_TEX *p, uint grTextureId);
extern DISPENV activeDispEnv;
extern DRAWENV activeDrawEnv;

View File

@ -1314,6 +1314,12 @@ int ParsePrimitive(uintptr_t primPtr)
break;
}
case 0xB0:
{
// [A] Psy-X custom texture packet
DR_PSYX_TEX* drtex = (DR_PSYX_TEX*)pTag;
break;
}
case 0xE0: // DR_ENV commands
{
uint i;

View File

@ -643,4 +643,10 @@ void SetPolyG4(POLY_G4* p)
void TermPrim(void* p)
{
termPrim(p);
}
}
void SetPsyXTexture(DR_PSYX_TEX* p, uint grTextureId)
{
setlen(p, 1);
p->code[0] = 0xB1000000 | grTextureId;
}