Change all tilemaps to be short[1200] instead of int[1200]

This removes around megabyte from the binary, so a stripped -Og binary
went from 4.0 megabytes to 2.9 megabytes, and an unstripped -O0 binary
went from 8.1 megabytes to 7.1 megabytes, which means I can now finally
upload an unstripped -O0 binary to Discord without having to give money
to Discord for their dumb Nitro thing or whatever.
This commit is contained in:
Misa
2020-07-18 21:06:35 -07:00
committed by Ethan Lee
parent df96b2a594
commit 6c85fae339
16 changed files with 460 additions and 460 deletions

View File

@@ -1324,7 +1324,7 @@ void mapclass::loadlevel(int rx, int ry)
{
tileset = 1;
extrarow = 1;
const int* tmap = otherlevel.loadlevel(rx, ry);
const short* tmap = otherlevel.loadlevel(rx, ry);
SDL_memcpy(contents, tmap, sizeof(contents));
roomname = otherlevel.roomname;
tileset = otherlevel.roomtileset;
@@ -1342,7 +1342,7 @@ void mapclass::loadlevel(int rx, int ry)
}
case 2: //The Lab
{
const int* tmap = lablevel.loadlevel(rx, ry);
const short* tmap = lablevel.loadlevel(rx, ry);
SDL_memcpy(contents, tmap, sizeof(contents));
roomname = lablevel.roomname;
tileset = 1;
@@ -1390,7 +1390,7 @@ void mapclass::loadlevel(int rx, int ry)
break;
case 4: //The Warpzone
{
const int* tmap = warplevel.loadlevel(rx, ry);
const short* tmap = warplevel.loadlevel(rx, ry);
SDL_memcpy(contents, tmap, sizeof(contents));
roomname = warplevel.roomname;
tileset = 1;
@@ -1408,7 +1408,7 @@ void mapclass::loadlevel(int rx, int ry)
}
case 5: //Space station
{
const int* tmap = spacestation2.loadlevel(rx, ry);
const short* tmap = spacestation2.loadlevel(rx, ry);
SDL_memcpy(contents, tmap, sizeof(contents));
roomname = spacestation2.roomname;
tileset = 0;
@@ -1416,7 +1416,7 @@ void mapclass::loadlevel(int rx, int ry)
}
case 6: //final level
{
const int* tmap = finallevel.loadlevel(finalx, finaly);
const short* tmap = finallevel.loadlevel(finalx, finaly);
SDL_memcpy(contents, tmap, sizeof(contents));
roomname = finallevel.roomname;
tileset = 1;
@@ -1587,7 +1587,7 @@ void mapclass::loadlevel(int rx, int ry)
}
case 11: //Tower Hallways //Content is held in final level routine
{
const int* tmap = finallevel.loadlevel(rx, ry);
const short* tmap = finallevel.loadlevel(rx, ry);
SDL_memcpy(contents, tmap, sizeof(contents));
roomname = finallevel.roomname;
tileset = 2;
@@ -1687,7 +1687,7 @@ void mapclass::loadlevel(int rx, int ry)
roomname = room.roomname;
extrarow = 1;
const int* tmap = ed.loadlevel(rx, ry);
const short* tmap = ed.loadlevel(rx, ry);
SDL_memcpy(contents, tmap, sizeof(contents));