1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-22 17:49:43 +01:00

Indicate what special roomnames are in the levels

This just adds booleans roomname_special to the level classes in
preparation for the localization system to use them.

This commit is part of rewritten history of the localization branch.
The original (unsquashed) commit history can be found here:
https://github.com/Dav999-v/VVVVVV/tree/localization-orig
This commit is contained in:
Dav999-v 2022-12-29 04:58:49 +01:00 committed by Misa Elizabeth Kai
parent 0ed2cb1bc0
commit f8fd51fc95
12 changed files with 35 additions and 0 deletions

View file

@ -13,6 +13,8 @@ const short* finalclass::loadlevel(int rx, int ry)
warpx = false;
warpy = false;
roomname_special = false;
switch(t)
{
#if !defined(MAKEANDPLAY)
@ -156,6 +158,7 @@ const short* finalclass::loadlevel(int rx, int ry)
warpy = true;
roomname = "glitch";
roomname_special = true;
result = contents;
break;
}
@ -206,6 +209,7 @@ const short* finalclass::loadlevel(int rx, int ry)
warpy = true;
roomname = "glitch";
roomname_special = true;
result = contents;
break;
}
@ -254,6 +258,7 @@ const short* finalclass::loadlevel(int rx, int ry)
warpy = true;
roomname = "change";
roomname_special = true;
result = contents;
break;
}
@ -304,6 +309,7 @@ const short* finalclass::loadlevel(int rx, int ry)
warpy = true;
roomname = "change";
roomname_special = true;
result = contents;
break;
}
@ -351,6 +357,7 @@ const short* finalclass::loadlevel(int rx, int ry)
warpy = true;
roomname = "change";
roomname_special = true;
result = contents;
break;
}
@ -508,6 +515,7 @@ const short* finalclass::loadlevel(int rx, int ry)
warpy = true;
roomname = "glitch";
roomname_special = true;
result = contents;
break;
}
@ -954,6 +962,7 @@ const short* finalclass::loadlevel(int rx, int ry)
warpx = true;
roomname = "change";
roomname_special = true;
result = contents;
break;
}
@ -1004,6 +1013,7 @@ const short* finalclass::loadlevel(int rx, int ry)
warpx = true;
roomname = "change";
roomname_special = true;
result = contents;
break;
}
@ -2603,6 +2613,7 @@ const short* finalclass::loadlevel(int rx, int ry)
{
static const short contents[1200] = {0};
roomname = "Outer Space";
roomname_special = true;
//game.test = true;
//game.teststring = "ERROR: Map not found in Final Area";

View file

@ -7,6 +7,7 @@ public:
const short* loadlevel(int rx, int ry);
const char* roomname;
bool roomname_special;
bool warpx, warpy;
};

View file

@ -25,6 +25,7 @@ const short* labclass::loadlevel(int rx, int ry)
const short* result;
rcol = 0;
roomname = "";
roomname_special = false;
switch(t)
{

View file

@ -7,6 +7,7 @@ public:
const short* loadlevel(int rx, int ry);
const char* roomname;
bool roomname_special;
int rcol;
};
#endif /* LABCLASS_H */

View file

@ -83,6 +83,8 @@ mapclass::mapclass(void)
setroomname("");
hiddenname = "";
roomname_special = false;
}
static char roomname_static[SCREEN_WIDTH_CHARS];
@ -1536,6 +1538,8 @@ void mapclass::loadlevel(int rx, int ry)
warpy = true;
}
roomname_special = false;
switch(t)
{
#if !defined(MAKEANDPLAY)
@ -1547,6 +1551,7 @@ void mapclass::loadlevel(int rx, int ry)
const short* tmap = otherlevel.loadlevel(rx, ry);
copy_short_to_int(contents, tmap, SDL_arraysize(contents));
setroomname(otherlevel.roomname);
roomname_special = otherlevel.roomname_special;
hiddenname = otherlevel.hiddenname;
tileset = otherlevel.roomtileset;
break;
@ -1556,6 +1561,7 @@ void mapclass::loadlevel(int rx, int ry)
const short* tmap = lablevel.loadlevel(rx, ry);
copy_short_to_int(contents, tmap, SDL_arraysize(contents));
setroomname(lablevel.roomname);
roomname_special = lablevel.roomname_special;
tileset = 1;
background = 2;
graphics.rcol = lablevel.rcol;
@ -1603,6 +1609,7 @@ void mapclass::loadlevel(int rx, int ry)
const short* tmap = warplevel.loadlevel(rx, ry);
copy_short_to_int(contents, tmap, SDL_arraysize(contents));
setroomname(warplevel.roomname);
roomname_special = warplevel.roomname_special;
tileset = 1;
background = 3;
graphics.rcol = warplevel.rcol;
@ -1621,6 +1628,7 @@ void mapclass::loadlevel(int rx, int ry)
const short* tmap = spacestation2.loadlevel(rx, ry);
copy_short_to_int(contents, tmap, SDL_arraysize(contents));
setroomname(spacestation2.roomname);
roomname_special = spacestation2.roomname_special;
tileset = 0;
break;
}
@ -1629,6 +1637,7 @@ void mapclass::loadlevel(int rx, int ry)
const short* tmap = finallevel.loadlevel(rx, ry);
copy_short_to_int(contents, tmap, SDL_arraysize(contents));
setroomname(finallevel.roomname);
roomname_special = finallevel.roomname_special;
tileset = 1;
background = 3;
graphics.backgrounddrawn = false;
@ -1788,6 +1797,7 @@ void mapclass::loadlevel(int rx, int ry)
const short* tmap = finallevel.loadlevel(rx, ry);
copy_short_to_int(contents, tmap, SDL_arraysize(contents));
setroomname(finallevel.roomname);
roomname_special = finallevel.roomname_special;
tileset = 2;
if (rx == 108)
{

View file

@ -114,6 +114,7 @@ public:
const char* roomname;
bool roomname_special;
const char* hiddenname;
//Special tower stuff

View file

@ -15,6 +15,7 @@ const short* otherlevelclass::loadlevel(int rx, int ry)
t = rx + (ry * 100);
const short* result;
roomname = "";
roomname_special = false;
hiddenname = "Dimension VVVVVV";
switch(t)

View file

@ -7,6 +7,7 @@ public:
const short* loadlevel(int rx, int ry);
const char* roomname;
bool roomname_special;
const char* hiddenname;
int roomtileset;

View file

@ -17,6 +17,7 @@ const short* spacestation2class::loadlevel(int rx, int ry)
const short* result;
roomname = "Untitled room";
roomname_special = false;
switch(t)
{
@ -2556,10 +2557,12 @@ const short* spacestation2class::loadlevel(int rx, int ry)
if(game.nodeathmode)
{
roomname = "I Can't Believe You Got This Far";
roomname_special = true;
}
else if (game.intimetrial)
{
roomname = "Imagine Spikes There, if You Like";
roomname_special = true;
}
result = contents;
break;
@ -3625,6 +3628,7 @@ const short* spacestation2class::loadlevel(int rx, int ry)
{
static const short contents[1200] = {0};
roomname = "Outer Space";
roomname_special = true;
obj.fatal_bottom();
result = contents;
break;

View file

@ -6,6 +6,7 @@ class spacestation2class
public:
const short* loadlevel(int rx, int ry);
const char* roomname;
bool roomname_special;
};
#endif /* SPACESTATION2_H */

View file

@ -20,6 +20,7 @@ const short* warpclass::loadlevel(int rx, int ry)
warpy = false;
roomname = "Untitled room";
roomname_special = false;
switch(t)
{
@ -1130,6 +1131,7 @@ const short* warpclass::loadlevel(int rx, int ry)
{
static const short contents[1200] = {0};
//roomname = "Outer Space";
//roomname_special = true;
result = contents;
break;
}

View file

@ -6,6 +6,7 @@ class warpclass
public:
const short* loadlevel(int rx, int ry);
const char* roomname;
bool roomname_special;
int rcol;
bool warpx, warpy;
};