PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

strange for a nioubie...

why can't i use 'IntegerToString' function (that is in the Tools) in my DoGameState when i can use the FullPath (that is also in the Tools, just a few lines over) ?!?

Code:

IntegerToString( m_myint, m_mystring );

results in:
'IntegerToString': undeclared identifier

Code:

m_mypath = FullPath( m_myfile );

works...

i may be tired :')
try typing this:

g_Tools->IntegerToString( m_myint, m_mystring );


that should work!
You forgot to specify out of which class the memberfunction should be used. FullPath worked because it is probably also a global function of some sort, and IntegerToString only exists in the Tools class.

R
That's completely correct. To clarify: The tools class has a member 'FullPath', and the overloaded.h file has a inline function FullPath. That one is used when the DLL's are not loaded yet, for example, for loading the DLL's themselves from a relative path. Of course, you don't want to use a medium sized inline function all over the place, so we have TWO FullPath thingy's.
thanks :')

i am tired ... i tried:

m_Tools->IntegerToString( m_myint, m_mystring );

'm' or 'g' ... not very far :)
in the same line:

i'd like to use the TgaLoad function that loads a 8 bits paletizzed picture and his palet:

Code:

bool SurfaceImpl::TgaZLoad( char* file, int w, int h, PalEntry* dest, Pixel* pal )


this is in the Surface definition, how can i call it from my InitGameState() ?

(by the way, i don't need to create or load the 16 surface or draw it, just the 8 array and his palet)

**sorry, learning objects**