mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 01:48:15 +03:00
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:
@@ -96,7 +96,7 @@ void towerclass::loadminitower1()
|
||||
{
|
||||
//Loads the first minitower into the array.
|
||||
#if !defined(MAKEANDPLAY)
|
||||
static const int tmap[] = {
|
||||
static const short tmap[] = {
|
||||
12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
|
||||
12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
|
||||
12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
|
||||
@@ -199,7 +199,7 @@ void towerclass::loadminitower1()
|
||||
12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,
|
||||
};
|
||||
#else
|
||||
static const int tmap[100*40] = {0};
|
||||
static const short tmap[100*40] = {0};
|
||||
#endif
|
||||
|
||||
SDL_memcpy(minitower, tmap, sizeof(minitower));
|
||||
@@ -208,7 +208,7 @@ void towerclass::loadminitower1()
|
||||
void towerclass::loadminitower2()
|
||||
{
|
||||
#if !defined(MAKEANDPLAY)
|
||||
static const int tmap[] = {
|
||||
static const short tmap[] = {
|
||||
12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,11,20,21,10,0,20,21,28,28,20,21,28,28,20,12,12,12,12,12,12,12,12,12,12,
|
||||
12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,11,20,21,10,0,20,21,28,28,20,21,28,28,20,12,12,12,12,12,12,12,12,12,12,
|
||||
12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,11,20,21,10,0,20,21,28,28,20,21,28,28,20,12,12,12,12,12,12,12,12,12,12,
|
||||
@@ -311,7 +311,7 @@ void towerclass::loadminitower2()
|
||||
12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,
|
||||
};
|
||||
#else
|
||||
static const int tmap[100*40] = {0};
|
||||
static const short tmap[100*40] = {0};
|
||||
#endif
|
||||
|
||||
SDL_memcpy(minitower, tmap, sizeof(minitower));
|
||||
@@ -321,7 +321,7 @@ void towerclass::loadminitower2()
|
||||
void towerclass::loadbackground()
|
||||
{
|
||||
//Loads the background into the array.
|
||||
static const int tmap[] = {
|
||||
static const short tmap[] = {
|
||||
1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,1,2,0,0,0,0,0,0,0,0,0,0,0,0,5,4,0,0,
|
||||
2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,1,2,0,0,0,0,0,0,0,0,0,0,0,0,5,1,1,4,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,1,2,0,0,0,0,0,0,0,0,0,0,0,0,5,1,1,1,1,4,
|
||||
@@ -450,7 +450,7 @@ void towerclass::loadmap()
|
||||
{
|
||||
//Loads the map into the array.
|
||||
#if !defined(MAKEANDPLAY)
|
||||
static const int tmap[] = {
|
||||
static const short tmap[] = {
|
||||
12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
|
||||
12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
|
||||
12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
|
||||
@@ -1153,7 +1153,7 @@ void towerclass::loadmap()
|
||||
12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
|
||||
};
|
||||
#else
|
||||
static const int tmap[700*40] = {0};
|
||||
static const short tmap[700*40] = {0};
|
||||
#endif
|
||||
|
||||
SDL_memcpy(contents, tmap, sizeof(contents));
|
||||
|
||||
Reference in New Issue
Block a user