Updated splashpack structure
This commit is contained in:
BIN
output.bin
BIN
output.bin
Binary file not shown.
@@ -10,13 +10,14 @@ namespace psxsplash {
|
|||||||
|
|
||||||
class GameObject final {
|
class GameObject final {
|
||||||
public:
|
public:
|
||||||
psyqo::Vec3 position;
|
|
||||||
psyqo::Matrix33 rotation;
|
|
||||||
union {
|
union {
|
||||||
Tri *polygons;
|
Tri *polygons;
|
||||||
uint32_t polygonsOffset;
|
uint32_t polygonsOffset;
|
||||||
};
|
};
|
||||||
int polyCount;
|
psyqo::Vec3 position;
|
||||||
|
psyqo::Matrix33 rotation;
|
||||||
|
uint16_t polyCount;
|
||||||
|
uint16_t reserved;
|
||||||
};
|
};
|
||||||
static_assert(sizeof(GameObject) == 56, "GameObject is not 56 bytes");
|
static_assert(sizeof(GameObject) == 56, "GameObject is not 56 bytes");
|
||||||
} // namespace psxsplash
|
} // namespace psxsplash
|
||||||
@@ -38,7 +38,8 @@ eastl::vector<psxsplash::GameObject *> LoadSplashpack(uint8_t *data) {
|
|||||||
|
|
||||||
for (uint16_t i = 0; i < header->clutCount; i++) {
|
for (uint16_t i = 0; i < header->clutCount; i++) {
|
||||||
psxsplash::SPLASHPACKClut *clut = reinterpret_cast<psxsplash::SPLASHPACKClut *>(curentPointer);
|
psxsplash::SPLASHPACKClut *clut = reinterpret_cast<psxsplash::SPLASHPACKClut *>(curentPointer);
|
||||||
psxsplash::Renderer::getInstance().vramUpload(clut->clut, clut->clutPackingX * 16, clut->clutPackingY, clut->length, 1);
|
uint8_t* clutOffset = data + clut->clutOffset;
|
||||||
|
psxsplash::Renderer::getInstance().vramUpload((uint16_t*) clutOffset, clut->clutPackingX * 16, clut->clutPackingY, clut->length, 1);
|
||||||
curentPointer += sizeof(psxsplash::SPLASHPACKClut);
|
curentPointer += sizeof(psxsplash::SPLASHPACKClut);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ struct SPLASHPACKFileHeader {
|
|||||||
uint16_t gameObjectCount;
|
uint16_t gameObjectCount;
|
||||||
uint16_t textureAtlasCount;
|
uint16_t textureAtlasCount;
|
||||||
uint16_t clutCount;
|
uint16_t clutCount;
|
||||||
uint16_t pad;
|
uint16_t pad[3];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SPLASHPACKTextureAtlas {
|
struct SPLASHPACKTextureAtlas {
|
||||||
@@ -24,8 +24,7 @@ struct SPLASHPACKTextureAtlas {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct SPLASHPACKClut {
|
struct SPLASHPACKClut {
|
||||||
uint16_t clut[256];
|
uint32_t clutOffset;
|
||||||
|
|
||||||
uint16_t clutPackingX;
|
uint16_t clutPackingX;
|
||||||
uint16_t clutPackingY;
|
uint16_t clutPackingY;
|
||||||
uint16_t length;
|
uint16_t length;
|
||||||
|
|||||||
Reference in New Issue
Block a user