Code: Select all
#include <genesis.h>
#include "moon.h"
int main( )
{
// get the image width (in pixel) ==> should be 8pix aligned
u16 w = moon[0];
// get the image height (in pixel) ==> should be 8px aligned
u16 h = moon[1];
// get the palette at moon[2 to 17]
VDP_setPalette(PAL1, &moon[2]);
// load bitmap data at moon[18....] in VRAM
// w/8 = width in tiles we want to load
// h/8 = height in tile we want to load
// w/8 = width in tiles of the bitamp
// the 3rd arg is needed because you could load only a part of the bitmap if you want but SGDK needs the width as reference
VDP_loadBMPTileData((u32*) &moon[18], 1, w / 8, h / 8, w/8 );
while(1)
{
VDP_waitVSync();
}
return 0;
}
main.c||In function `main':|
main.c|7|error: subscripted value is neither array nor pointer|
main.c|9|error: subscripted value is neither array nor pointer|
main.c|12|error: subscripted value is neither array nor pointer|
main.c|20|error: subscripted value is neither array nor pointer|
||=== Build finished: 4 errors, 0 warnings (0 minutes, 1 seconds) ===|
To be honest, I'm not even sure what the array moon[] is even pointing to... data in the moon.o file?!?!
Any help appreciated