many text work and scripts
This commit is contained in:
214
event_graphic_struct.hexpat
Normal file
214
event_graphic_struct.hexpat
Normal file
@@ -0,0 +1,214 @@
|
||||
import type.base;
|
||||
|
||||
|
||||
struct vertex {
|
||||
s16 X;
|
||||
s16 Y;
|
||||
s16 Z;
|
||||
s16 d;
|
||||
};
|
||||
|
||||
struct objShiftInfo {
|
||||
u32 hz[5];
|
||||
s32 shiftX;
|
||||
s32 shiftY;
|
||||
s32 shiftZ;
|
||||
u32 hz2[5];
|
||||
|
||||
|
||||
};
|
||||
|
||||
struct shadedTexturedPolyInfo1E {
|
||||
type::Hex<u32> hz_cho;
|
||||
u8 color1[3];
|
||||
type::Hex<u8> gpuCmdId;
|
||||
type::Hex<u32> vertex1;
|
||||
type::Hex<u16> clut;
|
||||
type::Hex<u8> texCoord1Y;
|
||||
type::Hex<u8> texCoord1X;
|
||||
type::Hex<u32> color2;
|
||||
type::Hex<u32> vertex2;
|
||||
type::Hex<u16> texPage;
|
||||
type::Hex<u8> texCoord2Y;
|
||||
type::Hex<u8> texCoord2X;
|
||||
type::Hex<u32> color3;
|
||||
type::Hex<u32> vertex3;
|
||||
|
||||
type::Hex<u8> texCoord3Y;
|
||||
type::Hex<u8> texCoord3X;
|
||||
u16 dummy;
|
||||
type::Hex<u32> color4;
|
||||
type::Hex<u32> vertex4;
|
||||
|
||||
type::Hex<u8> texCoord4Y;
|
||||
type::Hex<u8> texCoord4X;
|
||||
u16 dummy2;
|
||||
};
|
||||
|
||||
struct shadedTexturedPoly {
|
||||
shadedTexturedPolyInfo1E poly1;
|
||||
shadedTexturedPolyInfo1E poly2;
|
||||
u32 vertexId1;
|
||||
u32 vertexId2;
|
||||
u32 vertexId3;
|
||||
u32 vertexId4;
|
||||
};
|
||||
|
||||
|
||||
struct texturedPolyInfo18 {
|
||||
type::Hex<u32> hz_cho;
|
||||
u8 color1[3];
|
||||
type::Hex<u8> gpuCmdId;
|
||||
type::Hex<u32> vertex1;
|
||||
type::Hex<u8> texCoord1Y;
|
||||
type::Hex<u8> texCoord1X;
|
||||
type::Hex<u16> clut;
|
||||
type::Hex<u32> vertex2;
|
||||
type::Hex<u8> texCoord2Y;
|
||||
type::Hex<u8> texCoord2X;
|
||||
type::Hex<u16> texPage;
|
||||
type::Hex<u32> vertex3;
|
||||
|
||||
type::Hex<u8> texCoord3Y;
|
||||
type::Hex<u8> texCoord3X;
|
||||
u16 dummy;
|
||||
type::Hex<u32> vertex4;
|
||||
|
||||
type::Hex<u8> texCoord4Y;
|
||||
type::Hex<u8> texCoord4X;
|
||||
u16 dummy2;
|
||||
};
|
||||
|
||||
struct texturedPoly {
|
||||
texturedPolyInfo18 poly1;
|
||||
texturedPolyInfo18 poly2;
|
||||
u32 vertexId1;
|
||||
u32 vertexId2;
|
||||
u32 vertexId3;
|
||||
u32 vertexId4;
|
||||
};
|
||||
|
||||
struct shadedTextured3PolyInfo17 {
|
||||
type::Hex<u32> hz_cho;
|
||||
u8 color1[3];
|
||||
type::Hex<u8> gpuCmdId;
|
||||
type::Hex<u32> vertex1;
|
||||
type::Hex<u16> clut;
|
||||
type::Hex<u8> texCoord1Y;
|
||||
type::Hex<u8> texCoord1X;
|
||||
type::Hex<u32> color2;
|
||||
type::Hex<u32> vertex2;
|
||||
type::Hex<u16> texPage;
|
||||
type::Hex<u8> texCoord2Y;
|
||||
type::Hex<u8> texCoord2X;
|
||||
type::Hex<u32> color3;
|
||||
type::Hex<u32> vertex3;
|
||||
|
||||
type::Hex<u8> texCoord3Y;
|
||||
type::Hex<u8> texCoord3X;
|
||||
u16 dummy;
|
||||
};
|
||||
|
||||
struct shadedTextured3Poly {
|
||||
shadedTextured3PolyInfo17 poly1;
|
||||
shadedTextured3PolyInfo17 poly2;
|
||||
u32 vertexId1;
|
||||
u32 vertexId2;
|
||||
u32 vertexId3;
|
||||
};
|
||||
|
||||
struct shadedPolyInfo16 {
|
||||
type::Hex<u32> hz_cho;
|
||||
u8 color1[3];
|
||||
type::Hex<u8> gpuCmdId;
|
||||
type::Hex<u32> vertex1;
|
||||
type::Hex<u32> color2;
|
||||
type::Hex<u32> vertex2;
|
||||
type::Hex<u32> color3;
|
||||
type::Hex<u32> vertex3;
|
||||
type::Hex<u32> color4;
|
||||
type::Hex<u32> vertex4;
|
||||
};
|
||||
|
||||
struct shadedPoly {
|
||||
shadedPolyInfo16 poly1;
|
||||
shadedPolyInfo16 poly2;
|
||||
u32 vertexId1;
|
||||
u32 vertexId2;
|
||||
u32 vertexId3;
|
||||
u32 vertexId4;
|
||||
};
|
||||
|
||||
struct textured3PolyInfo13 {
|
||||
type::Hex<u32> hz_cho;
|
||||
u8 color1[3];
|
||||
type::Hex<u8> gpuCmdId;
|
||||
type::Hex<u32> vertex1;
|
||||
type::Hex<u8> texCoord1Y;
|
||||
type::Hex<u8> texCoord1X;
|
||||
type::Hex<u16> clut;
|
||||
type::Hex<u32> vertex2;
|
||||
type::Hex<u8> texCoord2Y;
|
||||
type::Hex<u8> texCoord2X;
|
||||
type::Hex<u16> texPage;
|
||||
type::Hex<u32> vertex3;
|
||||
|
||||
type::Hex<u8> texCoord3Y;
|
||||
type::Hex<u8> texCoord3X;
|
||||
u16 dummy;
|
||||
};
|
||||
|
||||
struct textured3Poly {
|
||||
textured3PolyInfo13 poly1;
|
||||
textured3PolyInfo13 poly2;
|
||||
u32 vertexId1;
|
||||
u32 vertexId2;
|
||||
u32 vertexId3;
|
||||
};
|
||||
|
||||
struct cmdChunk {
|
||||
u8 cmdCnt;
|
||||
u8 chunkSize;
|
||||
u16 headerFuck;
|
||||
|
||||
if (cmdCnt == 7) {
|
||||
shadedTexturedPoly poly;
|
||||
} else if (cmdCnt == 6) {
|
||||
texturedPoly poly;
|
||||
} else if (cmdCnt == 5) {
|
||||
shadedPoly poly;
|
||||
} else if (cmdCnt == 3) {
|
||||
shadedTextured3Poly poly;
|
||||
} else if (cmdCnt == 2) {
|
||||
textured3Poly poly;
|
||||
}
|
||||
};
|
||||
|
||||
struct gpuPacket {
|
||||
u16 globalChunkCnt;
|
||||
u16 localChunkCnt;
|
||||
u32 objectId;
|
||||
cmdChunk chunks[globalChunkCnt];
|
||||
|
||||
};
|
||||
|
||||
struct sceneObject {
|
||||
u32 objectPtr;
|
||||
gpuPacket gpu @ objectPtr;
|
||||
};
|
||||
|
||||
|
||||
struct p2event3d {
|
||||
|
||||
u16 objectsCnt;
|
||||
u16 someObjCtr;
|
||||
u32 vertexArrayPtr;
|
||||
u32 shiftInfoPtr;
|
||||
|
||||
sceneObject objects[objectsCnt];
|
||||
vertex vertexes[(shiftInfoPtr - vertexArrayPtr)/8] @ vertexArrayPtr;
|
||||
objShiftInfo shiftArray[objectsCnt] @ shiftInfoPtr;
|
||||
};
|
||||
|
||||
char sourceName[16] @ 0x00;
|
||||
p2event3d eventScene @ 0x10;
|
||||
Reference in New Issue
Block a user