0 Members and 2 Guests are viewing this topic.
free(screen); return 0;
screen = (char*)malloc(SCREEN_BYTES_SIZE * sizeof(char));
Hi Spenceboy98,A couple of tips I've learned that may be able to help:1. After free; you can set your pointer to NULL:free(screen);screen = NULL;return 0;And so I suggest for every free to set the pointer to NULL. Because should you call free again on the same pointer, free(NULL) won't crash! See the C standard 7.20.3.2: http://www.open-std.org/JTC1/SC22/wg14/www/docs/n1124.pdfBut that may be an indication that you are freeing the same memory twice.2. Are you using an emulator or only transferring to your calculator? I only say because if you use an emulator; besides being faster you can add printf (amongst other things) to see the values of variables:printf("Screen pointer is at address %p\n", screen);3. Are you using anything for the graphics? That is entirely your choice; but nRGBLib (http://ourl.ca/14731) is really helpful! In there is a macro:#define GetNewScreenBuffer() malloc(SCREEN_BYTES_SIZE)(https://bitbucket.org/totorigolo/nrgblib/src/9a736d6ff9e432e7e1df2122c03d8b39c05d6dd2/src/include/nCOMMON.h?at=default)And I am thinking you could use that instead of writing it yourself.If you post your source code I'll take a look to see why the calculator reboots on exit. I've chased down a few of these now! Have a great day!
I've tipped people at TI-Planet about it ( http://tiplanet.org/forum/viewtopic.php?f=17&t=11982 ), hopefully this will provide more beta-testers
Looks nice, is it like Scipi/HOMER-16's computer zombie game? And yeah maybe the points could be a bit larger and there should be a bit of color.