Hi,
I am busy with sprites in MSX-C and I have an issue that is puzzling me.
I wrote a little testprogram to display a sprite in screen 5, it doesnt give compiling errors and it does display a sprite, only the design is screwed up.
here is the code:
#pragma nonrec #include <stdio.h> #include <glib.h> int i; int x; int y; int *plspr[32] = 0x07,0x04,0x04,0x04,0x04,0x04,0x04,0x04, 0x04,0x04,0x0C,0x18,0x30,0x60,0xC0,0xFF, 0xE0,0x20,0x20,0x20,0x20,0x20,0x20,0x20, 0x20,0x20,0x30,0x18,0x0C,0x06,0x03,0xFF; int *plclr[16] = 0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F, 0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F; main() { screen((TINY)5); ginit(); color((TINY)15, (TINY)0, (TINY)0); cls(); /* display sprite */ inispr((TINY)2); sprite((TINY)0, plspr); colspr((TINY)0, plclr); putspr((TINY)0, 50, 50,(TINY)0, (TINY)0); }
It is probably the sprite pattern table i am not correctly adressing or something in that order, but i cannot get it to work.
I was thinking about a for statement, but am not sure how to proceed. There is not much on MSX-C, i have got a ANSI C book next to me, but not sure if i should use for instance i++ untill 31 is reached etc etc.
Does anyone have some experience with this matter?
Aangemeld of registreer om reacties te plaatsen