Page 2 of 2

Re: How put my sprites into new SGDK project?

Posted: Sun Dec 06, 2015 10:52 pm
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:

Re: How put my sprites into new SGDK project?

Posted: Sun Dec 06, 2015 11:40 pm
by alko
understood...
VDP_drawImageEx(APLAN, &fog, TILE_ATTR_FULL(PAL0, FALSE, FALSE, FALSE, ind), 40, 0, FALSE, TRUE);

but appears glitches.
Image

Re: How put my sprites into new SGDK project?

Posted: Mon Dec 07, 2015 7:14 pm
by alko
I had to reduce sprites init.

Code: Select all

  SPR_init(58);

Re: How put my sprites into new SGDK project?

Posted: Wed Dec 09, 2015 12:37 pm
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 :)

Re: How put my sprites into new SGDK project?

Posted: Wed Dec 09, 2015 3:09 pm
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.

Re: How put my sprites into new SGDK project?

Posted: Wed Dec 09, 2015 4:12 pm
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 :)

Re: How put my sprites into new SGDK project?

Posted: Thu Dec 10, 2015 11:48 pm
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.

Re: How put my sprites into new SGDK project?

Posted: Fri Dec 11, 2015 8:02 pm
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 :-)