diff --git a/INIT/CasioRAM.mem b/INIT/CasioRAM.mem index 2281524..d5b3b62 100644 Binary files a/INIT/CasioRAM.mem and b/INIT/CasioRAM.mem differ diff --git a/SuperCbr.g1a b/SuperCbr.g1a index eb55acc..dc37058 100644 Binary files a/SuperCbr.g1a and b/SuperCbr.g1a differ diff --git a/src/world.c b/src/world.c index 3024f6f..bcafa34 100755 --- a/src/world.c +++ b/src/world.c @@ -179,16 +179,17 @@ void world_draw() int my0=camera_y(); int sx0=mx0%8; int sy0=my0%8; - int mx=mx0; - for (int i=0; i<=17; i++) + //int mx=mx0; + int mx, my; + for (int i=0, mx=mx0; i<=17; i++, mx+=8) { - int my=my0; - for (int j=0; j<=9; j++) + //int my=my0; + for (int j=0, my=my0; j<=9; j++, my+=8) { display_cell(mx, my, 8*i-sx0, 8*j-sy0,0); //ap - my+=8; + //my+=8; } - mx+=8; + //mx+=8; } bonus_draw(); @@ -204,7 +205,7 @@ void world_draw() for (int i=0; i<=17; i++) { int my=my0; - for (int j=0; j<=9; j++) + for (int j=0; j<=9; j++) { display_cell(mx, my, 8*i-sx0, 8*j-sy0,1); //pp my+=8; @@ -254,9 +255,9 @@ void world_set(int w, int h, int x, int y, cell_t const * a) // Calculates the new struct size int size= 4*sizeof(int) + sizeof(cell_t)*w*h; - map_current=(map_t*)malloc_prof(size); - if (map_current==0) - malloc_error(); + + // Copy map into ram + map_current=(map_t*)malloc_prof(size); if (map_current==0) malloc_error(); // Copy the map to ram map_current->w = w;