below is the code and moon header i'm trying but for some reason moon.h, moon.w and moon.image giving error:
Field 'w' could not be resolved and structure has no member named 'w'"
any idea? did i missed something?
Code: Select all
#include <genesis.h>
#include "moon.h"
int main()
{
{
// get the image width (in pixel) ==> should be 8pix aligned
u16 w = moon.w;
// get the image height (in pixel) ==> should be 8px aligned
u16 h = moon.h;
// get the palette data of moon
VDP_setPalette(PAL1, moon.palette->data);
// load bitmap data of moon 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(moon.image, 1, w / 8, h / 8, w/8 );
while(1)
{
VDP_waitVSync();
}
return (0);
}
Code: Select all
#ifndef _MOON_H_
#define _MOON_H_
extern const Image moon;
#endif // _MOON_H_