Page 1 of 1

LoadImage(const uint8_t* pBegin, const uint8_t* pEnd )

PostPosted: Oct 12, 2004 @ 1:17pm
by BIGBEN

PostPosted: Oct 12, 2004 @ 4:37pm
by Kzinti

PostPosted: Oct 12, 2004 @ 5:02pm
by BIGBEN

PostPosted: Oct 12, 2004 @ 5:08pm
by BIGBEN

PostPosted: Oct 12, 2004 @ 5:13pm
by BIGBEN
And, of course my in.gif is only 1006 bytes. So buffer [32000] is enogh (and the third variant works, when I use other that doest - they also load not only incomplite image it is also have a wrong pallet)

PostPosted: Oct 12, 2004 @ 5:29pm
by Kzinti

PostPosted: Oct 12, 2004 @ 5:50pm
by BIGBEN
:D Yes.
But as I've mentioned above I need to build up one file containing some tile set, for example office.dat.
And then to load images form it (not all but only needed).
Sure to load them I'll need to use this:
inSurf = LoadImage(pDisplay, &buffer[x], &buffer[y] );

Of course now I use the easy one LoadImage( _T("some.gif") ), but I draw now some more tiles, and it would be not only safety, but also useful(some of them less than a 1024 bytes) to store them in one data file.
And please don't say me about intresources or one big surface. :lol:

Have you tested your function:
Surface* LoadImage( const uint8_t* pBegin, const uint8_t* pEnd );
from an image.h file.

If yes, then what code you used for testing and, I suppose, loading an image?

PostPosted: Oct 12, 2004 @ 6:03pm
by Kzinti

PostPosted: Oct 12, 2004 @ 7:10pm
by BIGBEN

PostPosted: Oct 15, 2004 @ 5:26pm
by BIGBEN
After searching the net about structure of data files I found that it is useful to put my data in one file with a stepoffbits value in the header of the file, for fast access to the real data just from reading the first 16 bits of the header. Everything works perfect. :)
Thank you Thierry for your advice not to use buffering when it is absolutely not necessary )
And BTW, if you like shooters another one is coming, it is an action RPG advanture game. (I'm developing it around a year) It is called !PYROMANIA! and coming soon (I hope) :D

PostPosted: Oct 15, 2004 @ 6:11pm
by Kzinti

PostPosted: Oct 15, 2004 @ 8:48pm
by Guest

PostPosted: Oct 16, 2004 @ 9:07pm
by BIGBEN