First of all i have a visual basic background so my C can be bad.
i have some problems getting my thingy to work. First off topic, my game always crashes after a certain frames. Why is this? i mean i had it some other time and then i looked like a variable i declared everytime the function was called took in all space. Is this right that every time i declare the same int i that it takes everytime some memory?
anyhow i have this problem with connection a directory name to a string. I tried alot but just won't work:
here is what i have tried:
Code: Select all
sprintf(buffer, "Themes/ dirEntry->d_name /Block1.png");
Blocks[1] = loadImage(buffer);
sprintf(buffer, "Themes/" + dirEntry->d_name + "/Block1.png");
Blocks[1] = loadImage(buffer);
sprintf(buffer, "Themes/" & dirEntry->d_name & "/Block1.png");
Blocks[1] = loadImage(buffer);
the last question is something that has to do with displaying pictures. I use the png library and i use the graphics.h files distributed with the tutorial of Yeldarb. I load up the picture and displays them this works fine. However i want to change the picture so i try to free the memory and then reload it but everytime it freezes up.
P.S. is there something to debug psp software? like a windows prog that can run the program and shows where it halts (so i can see better what is the problem.)
greets ghoti