help for sprite in stef mini dev kit

SGDK only sub forum

Moderator: Stef

Post Reply
bastien
Very interested
Posts: 208
Joined: Mon Jun 25, 2007 7:19 pm
Location: Besançon,France
Contact:

help for sprite in stef mini dev kit

Post by bastien » Wed Sep 05, 2007 2:20 pm

////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:

MG
Very interested
Posts: 56
Joined: Wed Feb 28, 2007 8:41 am
Contact:

Post by MG » Thu Sep 06, 2007 7:36 am

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+
Ah ? ben si ? pourquoi pas...

bastien
Very interested
Posts: 208
Joined: Mon Jun 25, 2007 7:19 pm
Location: Besançon,France
Contact:

Post by bastien » Fri Sep 07, 2007 3:28 pm

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?.

bastien
Very interested
Posts: 208
Joined: Mon Jun 25, 2007 7:19 pm
Location: Besançon,France
Contact:

Post by bastien » Sat Sep 08, 2007 1:51 pm

ok another question :) .
does the stef mini dev kit have a lib for add sprites

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Sat Sep 08, 2007 5:56 pm

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).

bastien
Very interested
Posts: 208
Joined: Mon Jun 25, 2007 7:19 pm
Location: Besançon,France
Contact:

Post by bastien » Sun Sep 09, 2007 8:13 am

very thanks for your help stef :lol: .
now i will test that

Post Reply