Closed haroldo-ok closed 1 year ago
Starting to look at the bug. Working branch: https://github.com/haroldo-ok/choice4genesis/tree/fix-background-image-bug
It does not seem to be a tileMap problem; if the tilemap part gets commented out, the bug still happens. VDP_loadTileSet()
does return null, though, indicating that it is running out of memory.
void VN_showImage(const Image *image, VDPPlane plane, u16 palNum, u16 x, u16 y) {
VDP_loadTileSet(image->tileset, imageInfo.tileNumber, DMA);
TileMap *tmap = unpackTileMap(image->tilemap, NULL);
VDP_setTileMapEx(plane, tmap, TILE_ATTR_FULL(palNum, FALSE, FALSE, FALSE, imageInfo.tileNumber),
x, y, 0, 0, tmap->w, tmap->h, CPU);
MEM_free(tmap);
VDP_setPalette(palNum, (u16*)image->palette->data);
imageInfo.tileNumber += image->tileset->numTile;
}
Tested various permutations of the code, with various configurations, even going as far as removing compression; the problem persists.
ok keep me posted im sure youll get it!! Im working on the text in the meantime! thanks! On Sunday, January 8, 2023 at 05:49:53 PM EST, Haroldo de Oliveira Pinheiro @.***> wrote:
It does not seem to be a tileMap problem; if the tilemap part gets commented out, the bug still happens. VDP_loadTileSet() does return null, though, indicating that it is running out of memory. void VN_showImage(const Image *image, VDPPlane plane, u16 palNum, u16 x, u16 y) { VDP_loadTileSet(image->tileset, imageInfo.tileNumber, DMA);
TileMap *tmap = unpackTileMap(image->tilemap, NULL);
VDP_setTileMapEx(plane, tmap, TILE_ATTR_FULL(palNum, FALSE, FALSE, FALSE, imageInfo.tileNumber),
x, y, 0, 0, tmap->w, tmap->h, CPU);
MEM_free(tmap);
VDP_setPalette(palNum, (u16*)image->palette->data);
imageInfo.tileNumber += image->tileset->numTile;
} Tested various permutations of the code, with various configurations, even going as far as removing compression; the problem persists.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
i knew you could do it! it works! On Sunday, January 8, 2023 at 05:49:53 PM EST, Haroldo de Oliveira Pinheiro @.***> wrote:
It does not seem to be a tileMap problem; if the tilemap part gets commented out, the bug still happens. VDP_loadTileSet() does return null, though, indicating that it is running out of memory. void VN_showImage(const Image *image, VDPPlane plane, u16 palNum, u16 x, u16 y) { VDP_loadTileSet(image->tileset, imageInfo.tileNumber, DMA);
TileMap *tmap = unpackTileMap(image->tilemap, NULL);
VDP_setTileMapEx(plane, tmap, TILE_ATTR_FULL(palNum, FALSE, FALSE, FALSE, imageInfo.tileNumber),
x, y, 0, 0, tmap->w, tmap->h, CPU);
MEM_free(tmap);
VDP_setPalette(palNum, (u16*)image->palette->data);
imageInfo.tileNumber += image->tileset->numTile;
} Tested various permutations of the code, with various configurations, even going as far as removing compression; the problem persists.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
Thanks!
Okay, thanks; it seems that, indeed, that image is being displayed incorrectly, no matter how many ways one tries to convert it. I'll have to take a look at this one later.
bug.zip