PDA

Voir la version complète : [PSP][Aide] Loading 0xXXXX symbols from file ?


Netaro
02/06/2008, 21h30
So, well, i'm making a game. A game, of course, must use those so called maps.
But there's a problem, that is GBA graphics ( http://www.playeradvance.org/forum/showthread.php?t=4085 ) convert it into .headers, and i want it to be loaded "externally", not to be hardcoded into eboot. So i can write a tool that will transform it into plain txt file with changing the structure to something like
24 24
0x0000 0x0001 0x0003 0x0033 ...
. Problem is, how can i load e.x. 0x0000 to an int using c++ functions?
Obviously, int x =0;
ifstream plik("test.txt");
plik >> x;
cout << x << "\n"; doesn't work.
So, how can i do it?