Page 42 of 57

Posted: Thu Feb 06, 2014 4:03 pm
by Mixail
Stef wrote:The "sprite" sample use it in a very transparent fashion. You basically just need to declare your image in resource file with compression parameter and that is done. Then you have all the tools.h file to handle manually decompression but if you use advanced method as VDP_drawImage(..) or VDP_drawImageEx(..) SGDK will handle it by itself (same for the new TileCache feature).
How use this function: Image *allocateImage(const Image *image); ?

Posted: Thu Feb 06, 2014 4:13 pm
by Stef
/**
* \brief
* Allocate Image structure which can receive unpacked image data of the specified Image.
* If source is not packed the function only allocate space for simple shallow copy of the source.
*
* \param image
* Source Image we want to allocate the unpacked Image object.
* \return
* The new allocated Image object which can receive the unpacked Image, note that returned image
* is allocated in a single bloc and can be released with Mem_Free(image).<br/>
* <i>NULL</i> is returned if there is not enough memory to store the unpacked image.
*/
Image *allocateImage(const Image *image);
And the Image structure is build from your IMAGE resources (see the rescomp.txt file for more details).

Posted: Fri Feb 07, 2014 10:05 am
by Mixail
rescomp don't working on Window XP :(

Posted: Fri Feb 07, 2014 1:12 pm
by Stef
Mixail wrote:rescomp don't working on Window XP :(
Oh really ? I do not use any win api stuff so win XP, win 2000 or whatever should not be a problem. I tried to make it cross platform... You have the sources in the tools directory if you want to give a try :) But in the meantime, can your report me the error you got on win XP ?

Posted: Fri Feb 07, 2014 2:32 pm
by Mixail
sample/sound
Image
sample/sprite
Image

Oh, i think it's just a problem from the '/' character used to separate folder... this indeed may not work on win xp (but does on win vista and after). I need to fix that !

Posted: Fri Feb 07, 2014 3:13 pm
by nolddor
Hi again Stef!

How to I generate the *.h file from a res/*.vgm now?

In SGDK 0.94 I only put the vgm into the res folder and I included the *.h in my code

Another question, Is Html sgdk Documentation outdated? I don't find the new functions

Posted: Fri Feb 07, 2014 3:36 pm
by Stef
hi nolddor,

You have to use .res file to declare your resources (as the VGM file).
you can look in the provided "sound" sample to have an example :)
I know it looks less user friendly to do this way but it is far more powerful as you can handle many more different type of resources ans set extra parameters !

Posted: Fri Feb 07, 2014 7:19 pm
by Stef
Mixail wrote: Oh, i think it's just a problem from the '/' character used to separate folder... this indeed may not work on win xp (but does on win vista and after). I need to fix that !
Should be fixed !
You can redownload the whole SGDK archive or just take the last rescomp.exe from here:
http://sgdk.googlecode.com/svn/trunk/bin/rescomp.exe

Posted: Fri Feb 07, 2014 7:51 pm
by Mixail
Stef wrote:
Mixail wrote: Oh, i think it's just a problem from the '/' character used to separate folder... this indeed may not work on win xp (but does on win vista and after). I need to fix that !
Should be fixed !
You can redownload the whole SGDK archive or just take the last rescomp.exe from here:
http://sgdk.googlecode.com/svn/trunk/bin/rescomp.exe
Thank you very much.

Posted: Tue Feb 18, 2014 9:40 pm
by oofwill
Hi

What's the problem with VDP_setTileMap()?

After installing SGDK 0.95, I have this message while compiling: (without any changes in my code)

Code: Select all

gestion_map.c|49|error: too many arguments to function `VDP_setTileMap'|
My command is :

Code: Select all

VDP_setTileMap(BPLAN, TILE_ATTR(0,0,0,0)+(z), k, l);
(Same error without "+(z)"...)

EDIT : Ok, I have to use VDP_setTileMapXY(); instead...

Posted: Wed Feb 19, 2014 4:23 pm
by Stef
Seems to be a wrong deprecation... Sorry for the problem !

Posted: Sat Mar 01, 2014 8:28 pm
by pckid
Hello Stef

I get to compile on eclipse my main.c

But i would like to learn to compile in dos only.

In my project i copy all

src , res, inc in my drirectory project.

and i start %GDK_WIN%\bin\make -f %GDK_WIN%\makefile.gen

I don't get in my out directory , the bin file.

Do you know why ?

Image

thanks

Edit : i find, sorry, we must to start cmd dos in admin user.

Posted: Thu Mar 06, 2014 10:28 am
by Stef
Hi pckid,

Sorry i didn't see the message sooner but the bug you got is actually a bug from GCC which happen randomly (sometime it crashs without any reason). You just have to restart it and it will pass :)

Posted: Thu Mar 06, 2014 10:33 am
by pckid
Thanks Stef,
i send so on the Gamopat Forum, cause we speak together with touko there.

But, if i start my cmd dos in admin user (right click), the compile work fine !

I saw the code to move sonic, it's you which write this ? great code

Posted: Thu Mar 06, 2014 11:48 am
by Stef
Weird that admin rights fix that issue but if it does :)
Yeah it's me which wrote the sonic sprite example, thanks for the comment :) It could be improved in many ways but it was to show quickly how use the SGDK sprite features :)