Fixed alpha textures properly on PSP
Some checks failed
Build Dusk / run-tests (push) Successful in 1m25s
Build Dusk / build-linux (push) Failing after 1m13s
Build Dusk / build-psp (push) Successful in 2m2s
Build Dusk / build-dolphin (push) Successful in 2m22s

This commit is contained in:
2026-02-08 09:54:40 -06:00
parent ad9e841a42
commit 53dd36efdd
5 changed files with 51 additions and 87 deletions

View File

@@ -8,6 +8,7 @@
#include "assetpaletteimage.h"
#include "assert/assert.h"
#include "display/texture.h"
#include "display/palette/palettelist.h"
errorret_t assetPaletteImageLoad(void *data, void *output) {
assertNotNull(data, "Data pointer cannot be NULL.");
@@ -19,6 +20,9 @@ errorret_t assetPaletteImageLoad(void *data, void *output) {
// Fix endian
assetData->width = le32toh(assetData->width);
assetData->height = le32toh(assetData->height);
const palette_t *pal = PALETTE_LIST[assetData->paletteIndex];
assertNotNull(pal, "Palette index is out of bounds");
textureInit(
texture,
@@ -27,7 +31,7 @@ errorret_t assetPaletteImageLoad(void *data, void *output) {
TEXTURE_FORMAT_PALETTE,
(texturedata_t){
.palette = {
.palette = assetData->paletteIndex,
.palette = pal,
.data = assetData->palette
}
}