Page 1 of 1

help for sprite in stef mini dev kit

Posted: Wed Sep 05, 2007 2:20 pm
by bastien
////for the english///////

hi i am a newbie in genesis dev so i request your help for add a sprite with stef mini dev kit.
if that's possible i want a code with just a sprite for learn and understand it.
thanks for your future reply :D..

/// pour les français :lol: ////

bonjour,
Je débute en programmation mégadrive et j aimerait savoir comment on peut ajouter des sprites avec le mini dev kit de stef.
si possbile j aimerait qu on me donne un code avec juste un sprite pour que je puisse l étudier te le comprendre.

merci pour vos futures réponses

Bastien

P.s sorry for my bad english so :p im a french :lol:

Posted: Thu Sep 06, 2007 7:36 am
by MG
Yop !

In this thread you have all the things to begin the development for MD.

http://www.spritesmind.net/_GenDev/foru ... c.php?t=53

Lot of examples.
But for sprites you can convert bmp pictures with some Kaneda tools.

(http://www.spritesmind.net)

A+

Posted: Fri Sep 07, 2007 3:28 pm
by bastien
thanks for you help :) .
but i use stef mini dev's kit and i think the other code in this page is for Sgcc/Xgcc?.

Posted: Sat Sep 08, 2007 1:51 pm
by bastien
ok another question :) .
does the stef mini dev kit have a lib for add sprites

Posted: Sat Sep 08, 2007 5:56 pm
by Stef
bastien wrote:thanks for you help :) .
but i use stef mini dev's kit and i think the other code in this page is for Sgcc/Xgcc?.
Here's the definitions of sprite stuff in the lib :

Code: Select all

typedef struct
{
    s16 posx;
    s16 posy;
    u16 tile_attr;
    u8 size;
    u8 link;
} _spritedef;


void VDP_resetSprites();

void VDP_setSprite(u16 index, u16 x, u16 y, u8 size, u16 tile_attr, u8 link);
void VDP_setSpriteP(u16 index, const _spritedef *sprite);
void VDP_setSpriteDirect(u16 index, u16 x, u16 y, u8 size, u16 tile_attr, u8 link);
void VDP_setSpriteDirectP(u16 index, const _spritedef *sprite);

void VDP_setSprites(u16 index, const _spritedef *sprites, u16 num);

void VDP_updateSprites();
They are very basics sprite functions, you must have a good knowledge about the VDP sprite capabilities before using that ;)
"SpriteDirect" functions directly modify sprite data in VDP where others use a table cache (then updateSprites is needed for VDP update).

Posted: Sun Sep 09, 2007 8:13 am
by bastien
very thanks for your help stef :lol: .
now i will test that