From 8b667e76722a4bfec4ff9ad00ed8a00768ddeaba Mon Sep 17 00:00:00 2001 From: schneefux Date: Mon, 18 Nov 2013 16:32:30 +0100 Subject: fixed some stuff, compiled --- FXMAZE.G1A | Bin 57716 -> 56120 bytes engine.c | 15 +++++++++++---- global.c | 1 + 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/FXMAZE.G1A b/FXMAZE.G1A index b351cfc..22ee124 100644 Binary files a/FXMAZE.G1A and b/FXMAZE.G1A differ diff --git a/engine.c b/engine.c index 5db84c4..15b9686 100644 --- a/engine.c +++ b/engine.c @@ -64,8 +64,6 @@ void combSort(int* order, float* dist, int amount) } } -#define PI 3.141592653589793238464 - // perform a shoot static void pshoot() { @@ -298,9 +296,18 @@ void cast() int foundsprite = FALSE, spritehere; spriteDist = (float *) calloc(spritecnt, sizeof(float)); - if(spriteDist == NULL)error("Memory; locate spriteDist"); + if(spriteDist == NULL) + { + char msg[20]; + sprintf(&msg, "locate spriteDist: %d B", spritecnt * sizeof(float)); + } spriteOrder = (int *) calloc(spritecnt, sizeof(int)); - if(spriteOrder == NULL)error("Memory; locate spriteOrder"); + if(spriteOrder == NULL) + { + char msg[20]; + sprintf(&msg, "locate spriteOrder: %d B", spritecnt * sizeof(float)); + error("Memory; locate spriteOrder"); + } for(x = 0; x < spritecnt; x++) { diff --git a/global.c b/global.c index 10dd7db..1d54c67 100644 --- a/global.c +++ b/global.c @@ -107,4 +107,5 @@ void error(char * msg) PrintMini(1,1, "ERROR!"); PrintMini(1, 10, msg); display_vram(); + while(1); } -- cgit v1.3.1