0 Members and 2 Guests are viewing this topic.
Cool But why don't you use a relative path so we could put the textures.bmp.tns in the same directory as the game?
Quote from: Matrefeytontias on June 14, 2013, 08:18:56 amAlso beware : the program is much, MUCH slower on an emulator than on-calc. At least on my PC That's strange, all programs I've seen so far were a bit faster on an emulator than in reality. Also, it's quite fast in nspire_emu on my PC. Faster would be too fast
Also beware : the program is much, MUCH slower on an emulator than on-calc. At least on my PC
fopen("textures.bmp.tns", "r")
Did you put textures.bmp.tns in “/documents/ndless/“ ?
Quote from: lkj on June 14, 2013, 04:32:07 pmCool But why don't you use a relative path so we could put the textures.bmp.tns in the same directory as the game?Because they are not automatically handled by the Nspire, and because I was too lazy to write a function to do it at the time I wrote the demo but it's something planned for the engine.
int nSDL_EnableRelativePaths(char **argv) { char buf[256], *p; strcpy(buf, argv[0]); p = strrchr(buf, '/'); if (!p) return -1; *p = '\0'; return NU_Set_Current_Dir(buf) ? -1 : 0;}
@Spenceboy98 no problem, but you'd prefer to wait a little until I put in the lib some things to make its use easier (I have some defines in mind).