So i set up 2 Images:
Code: Select all
const u32 movtile[2][8] =
{{
0x81111111,
0x18111111,
0x11811111,
0x81181111,
0x81118118,
0x11111811,
0x11111181,
0x11111118
},
{
0x11111118,
0x11111181,
0x11111811,
0x81118111,
0x81181118,
0x11811111,
0x18111111,
0x81111111
}};
...
for (x = 0; x<8;x++)
{
movtile_A[x] = movtile[0][x];
movtile_B[x] = movtile[1][x];
// movtile_C[] is just a cache
}
Code: Select all
for (x = 0; x<8;x++)
{
movtile_C[x] = movtile_A[x];
movtile_A[x] = movtile_A[x] << 4 | movtile_B[x] >> 28;
movtile_B[x] = movtile_B[x] << 4 | movtile_C[x] >> 28;
}
VDP_loadTileData( (const u32 *)movtile_A, 3, 1, 0);
VDP_loadTileData( (const u32 *)movtile_B, 4, 1, 0);
VDP_loadTileData( (const u32 *)movtile_B, 43, 1, 0);
VDP_loadTileData( (const u32 *)movtile_A, 44, 1, 0);
Only problem now is instead of defining every tile i like to shift by hand in a field of arrays i´d like to access the tileset i imported with rescomp.
Code: Select all
// gfx.res
TILESET tiles_image "gfx/tiles.png" 0
// main.c
VDP_loadTileSet( &tiles_image, TILE1, 0); //ts_1 is a tileset
Code: Select all
for (x = 0; x<8;x++)
{
movtile_A[x] = tiles_image.tiles[1][x];
movtile_B[x] = tiles_image.tiles[2][x];
// movtile_C[] is just a cache
}
src\main.c|243|error: subscripted value is neither array nor pointer nor vector|