How put my sprites into new SGDK project?

SGDK only sub forum

Moderator: Stef

alko
Very interested
Posts: 172
Joined: Thu Aug 07, 2014 9:31 am
Location: Russian Federation

Re: How put my sprites into new SGDK project?

Post by alko »

Code: Select all

VDP_drawImageEx(APLAN, &fog, TILE_ATTR_FULL(PAL0, FALSE, FALSE, FALSE, ind), 0, 0, FALSE, TRUE);
VDP_drawImageEx(APLAN, &fog, TILE_ATTR_FULL(PAL0, FALSE, FALSE, FALSE, ind), 320, 0, FALSE, TRUE);
Image

:lol:

Code: Select all

VDP_drawImageEx(APLAN, &fog, TILE_ATTR_FULL(PAL0, FALSE, FALSE, FALSE, ind), 0, 0, FALSE, TRUE);
VDP_drawImageEx(APLAN, &fog, TILE_ATTR_FULL(PAL0, FALSE, FALSE, FALSE, ind), 180, 0, FALSE, TRUE);
Image

:lol:
Image
alko
Very interested
Posts: 172
Joined: Thu Aug 07, 2014 9:31 am
Location: Russian Federation

Re: How put my sprites into new SGDK project?

Post by alko »

understood...
VDP_drawImageEx(APLAN, &fog, TILE_ATTR_FULL(PAL0, FALSE, FALSE, FALSE, ind), 40, 0, FALSE, TRUE);

but appears glitches.
Image
Image
alko
Very interested
Posts: 172
Joined: Thu Aug 07, 2014 9:31 am
Location: Russian Federation

Re: How put my sprites into new SGDK project?

Post by alko »

I had to reduce sprites init.

Code: Select all

  SPR_init(58);
Image
Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: How put my sprites into new SGDK project?

Post by Stef »

That means you were using all reserved VRAM for background tiles, indeed you have to take care about how much tiles you reserve for background and sprites :)
alko
Very interested
Posts: 172
Joined: Thu Aug 07, 2014 9:31 am
Location: Russian Federation

Re: How put my sprites into new SGDK project?

Post by alko »

thanx, already I know.

now I can't cope with mirroring planes.
ATTR flag mirror only tiles, but the order of the tiles remains unchanged.
necessary to alter the function VDP_drawImageEx() for mirror.
Image
Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: How put my sprites into new SGDK project?

Post by Stef »

Yeah, if you want to mirror a complete or part of the plan, you need to do it by yourself, you can play with the VDP_setTileMapData(..) method for that :)
alko
Very interested
Posts: 172
Joined: Thu Aug 07, 2014 9:31 am
Location: Russian Federation

Re: How put my sprites into new SGDK project?

Post by alko »

I can not understand how should use the method VDP_setTileMapData()

I try to experiment, something like this:

Code: Select all

ind = TILE_USERINDEX;
for(i=1;i<512;i++)
{
VDP_setTileMapData( BPLAN,TILE_ATTR(PAL1, FALSE, FALSE, TRUE),ind,i,TRUE);
}
still incomprehensible.
Image
Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: How put my sprites into new SGDK project?

Post by Stef »

I think you will better prepare and build your complete tilemap in ram before then you can use the method I pointed you to upload it at once in VRAM :-)
Post Reply