mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-03-30 13:41:48 +03:00
Compare commits
19 Commits
2.3.4
...
2.3-update
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
abe3eb6077 | ||
|
|
cfa0d04bbb | ||
|
|
cc3dc8d329 | ||
|
|
b1760fbf90 | ||
|
|
6b5953f3f5 | ||
|
|
0aa76cde56 | ||
|
|
0e51dc48de | ||
|
|
ea5f772636 | ||
|
|
d66505eacb | ||
|
|
c2ef76fc06 | ||
|
|
c6664186f3 | ||
|
|
fa19bc3832 | ||
|
|
326d96b506 | ||
|
|
a57010e55b | ||
|
|
b2b2fcb867 | ||
|
|
a1381102f8 | ||
|
|
774f8c31a7 | ||
|
|
80ea585085 | ||
|
|
e78de4662c |
@@ -1084,6 +1084,7 @@ bool entityclass::disableentity(int t)
|
||||
entities[t].size = -1;
|
||||
entities[t].type = -1;
|
||||
entities[t].rule = -1;
|
||||
entities[t].isplatform = false;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1228,7 +1229,8 @@ void entityclass::createentity(int xp, int yp, int t, int meta1, int meta2, int
|
||||
if (entities[i].invis
|
||||
&& entities[i].size == -1
|
||||
&& entities[i].type == -1
|
||||
&& entities[i].rule == -1)
|
||||
&& entities[i].rule == -1
|
||||
&& !entities[i].isplatform)
|
||||
{
|
||||
reuse = true;
|
||||
entptr = &entities[i];
|
||||
|
||||
@@ -4009,7 +4009,7 @@ void Game::deletestats(void)
|
||||
}
|
||||
swnrecord = 0;
|
||||
swnbestrank = 0;
|
||||
bestgamedeaths = 0;
|
||||
bestgamedeaths = -1;
|
||||
#ifndef MAKEANDPLAY
|
||||
graphics.setflipmode = false;
|
||||
#endif
|
||||
@@ -5854,6 +5854,21 @@ std::string Game::timetstring( int t )
|
||||
return tempstring;
|
||||
}
|
||||
|
||||
void Game::timestringcenti(char* buffer, const size_t buffer_size)
|
||||
{
|
||||
/* 16 chars should be plenty for int32s */
|
||||
char hours_str[16] = {'\0'};
|
||||
if (hours > 0)
|
||||
{
|
||||
SDL_snprintf(hours_str, sizeof(hours_str), "%i:", hours);
|
||||
}
|
||||
SDL_snprintf(
|
||||
buffer, buffer_size,
|
||||
"%s%02i:%02i.%02i",
|
||||
hours_str, minutes, seconds, frames * 100 / 30
|
||||
);
|
||||
}
|
||||
|
||||
void Game::returnmenu(void)
|
||||
{
|
||||
if (menustack.empty())
|
||||
@@ -5937,6 +5952,12 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
|
||||
switch (t)
|
||||
{
|
||||
case Menu::mainmenu:
|
||||
if (ingame_titlemode)
|
||||
{
|
||||
/* We shouldn't be here! */
|
||||
SDL_assert(0 && "Entering main menu from in-game options!");
|
||||
break;
|
||||
}
|
||||
#if !defined(MAKEANDPLAY)
|
||||
option("play");
|
||||
#endif
|
||||
|
||||
@@ -136,6 +136,8 @@ public:
|
||||
|
||||
std::string timetstring(int t);
|
||||
|
||||
void timestringcenti(char* buffer, size_t buffer_size);
|
||||
|
||||
void returnmenu(void);
|
||||
void returntomenu(enum Menu::MenuName t);
|
||||
void createmenu(enum Menu::MenuName t, bool samemenu = false);
|
||||
|
||||
@@ -1778,70 +1778,70 @@ void Graphics::drawtrophytext(void)
|
||||
switch(obj.trophytype)
|
||||
{
|
||||
case 1:
|
||||
Print( -1, 6, "SPACE STATION 1 MASTERED", temp, temp2, temp3, true);
|
||||
Print( -1, 16, "Obtain a V Rank in this Time Trial", temp, temp2, temp3, true);
|
||||
bprint( -1, 6, "SPACE STATION 1 MASTERED", temp, temp2, temp3, true);
|
||||
bprint( -1, 16, "Obtain a V Rank in this Time Trial", temp, temp2, temp3, true);
|
||||
break;
|
||||
case 2:
|
||||
Print( -1, 6, "LABORATORY MASTERED", temp, temp2, temp3, true);
|
||||
Print( -1, 16, "Obtain a V Rank in this Time Trial", temp, temp2, temp3, true);
|
||||
bprint( -1, 6, "LABORATORY MASTERED", temp, temp2, temp3, true);
|
||||
bprint( -1, 16, "Obtain a V Rank in this Time Trial", temp, temp2, temp3, true);
|
||||
break;
|
||||
case 3:
|
||||
Print( -1, 6, "THE TOWER MASTERED", temp, temp2, temp3, true);
|
||||
Print( -1, 16, "Obtain a V Rank in this Time Trial", temp, temp2, temp3, true);
|
||||
bprint( -1, 6, "THE TOWER MASTERED", temp, temp2, temp3, true);
|
||||
bprint( -1, 16, "Obtain a V Rank in this Time Trial", temp, temp2, temp3, true);
|
||||
break;
|
||||
case 4:
|
||||
Print( -1, 6, "SPACE STATION 2 MASTERED", temp, temp2, temp3, true);
|
||||
Print( -1, 16, "Obtain a V Rank in this Time Trial", temp, temp2, temp3, true);
|
||||
bprint( -1, 6, "SPACE STATION 2 MASTERED", temp, temp2, temp3, true);
|
||||
bprint( -1, 16, "Obtain a V Rank in this Time Trial", temp, temp2, temp3, true);
|
||||
break;
|
||||
case 5:
|
||||
Print( -1, 6, "WARP ZONE MASTERED", temp, temp2, temp3, true);
|
||||
Print( -1, 16, "Obtain a V Rank in this Time Trial", temp, temp2, temp3, true);
|
||||
bprint( -1, 6, "WARP ZONE MASTERED", temp, temp2, temp3, true);
|
||||
bprint( -1, 16, "Obtain a V Rank in this Time Trial", temp, temp2, temp3, true);
|
||||
break;
|
||||
case 6:
|
||||
Print( -1, 6, "FINAL LEVEL MASTERED", temp, temp2, temp3, true);
|
||||
Print( -1, 16, "Obtain a V Rank in this Time Trial", temp, temp2, temp3, true);
|
||||
bprint( -1, 6, "FINAL LEVEL MASTERED", temp, temp2, temp3, true);
|
||||
bprint( -1, 16, "Obtain a V Rank in this Time Trial", temp, temp2, temp3, true);
|
||||
break;
|
||||
case 7:
|
||||
Print( -1, 6, "GAME COMPLETE", temp, temp2, temp3, true);
|
||||
Print( -1, 16, "Complete the game", temp, temp2, temp3, true);
|
||||
bprint( -1, 6, "GAME COMPLETE", temp, temp2, temp3, true);
|
||||
bprint( -1, 16, "Complete the game", temp, temp2, temp3, true);
|
||||
break;
|
||||
case 8:
|
||||
Print( -1, 6, "FLIP MODE COMPLETE", temp, temp2, temp3, true);
|
||||
Print( -1, 16, "Complete the game in flip mode", temp, temp2, temp3, true);
|
||||
bprint( -1, 6, "FLIP MODE COMPLETE", temp, temp2, temp3, true);
|
||||
bprint( -1, 16, "Complete the game in flip mode", temp, temp2, temp3, true);
|
||||
break;
|
||||
case 9:
|
||||
Print( -1, 11, "Win with less than 50 deaths", temp, temp2, temp3, true);
|
||||
bprint( -1, 11, "Win with less than 50 deaths", temp, temp2, temp3, true);
|
||||
break;
|
||||
case 10:
|
||||
Print( -1, 11, "Win with less than 100 deaths", temp, temp2, temp3, true);
|
||||
bprint( -1, 11, "Win with less than 100 deaths", temp, temp2, temp3, true);
|
||||
break;
|
||||
case 11:
|
||||
Print( -1, 11, "Win with less than 250 deaths", temp, temp2, temp3, true);
|
||||
bprint( -1, 11, "Win with less than 250 deaths", temp, temp2, temp3, true);
|
||||
break;
|
||||
case 12:
|
||||
Print( -1, 11, "Win with less than 500 deaths", temp, temp2, temp3, true);
|
||||
bprint( -1, 11, "Win with less than 500 deaths", temp, temp2, temp3, true);
|
||||
break;
|
||||
case 13:
|
||||
Print( -1, 11, "Last 5 seconds on the Super Gravitron", temp, temp2, temp3, true);
|
||||
bprint( -1, 11, "Last 5 seconds on the Super Gravitron", temp, temp2, temp3, true);
|
||||
break;
|
||||
case 14:
|
||||
Print( -1, 11, "Last 10 seconds on the Super Gravitron", temp, temp2, temp3, true);
|
||||
bprint( -1, 11, "Last 10 seconds on the Super Gravitron", temp, temp2, temp3, true);
|
||||
break;
|
||||
case 15:
|
||||
Print( -1, 11, "Last 15 seconds on the Super Gravitron", temp, temp2, temp3, true);
|
||||
bprint( -1, 11, "Last 15 seconds on the Super Gravitron", temp, temp2, temp3, true);
|
||||
break;
|
||||
case 16:
|
||||
Print( -1, 11, "Last 20 seconds on the Super Gravitron", temp, temp2, temp3, true);
|
||||
bprint( -1, 11, "Last 20 seconds on the Super Gravitron", temp, temp2, temp3, true);
|
||||
break;
|
||||
case 17:
|
||||
Print( -1, 11, "Last 30 seconds on the Super Gravitron", temp, temp2, temp3, true);
|
||||
bprint( -1, 11, "Last 30 seconds on the Super Gravitron", temp, temp2, temp3, true);
|
||||
break;
|
||||
case 18:
|
||||
Print( -1, 11, "Last 1 minute on the Super Gravitron", temp, temp2, temp3, true);
|
||||
bprint( -1, 11, "Last 1 minute on the Super Gravitron", temp, temp2, temp3, true);
|
||||
break;
|
||||
case 20:
|
||||
Print( -1, 6, "MASTER OF THE UNIVERSE", temp, temp2, temp3, true);
|
||||
Print( -1, 16, "Complete the game in no death mode", temp, temp2, temp3, true);
|
||||
bprint( -1, 6, "MASTER OF THE UNIVERSE", temp, temp2, temp3, true);
|
||||
bprint( -1, 16, "Complete the game in no death mode", temp, temp2, temp3, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1938,7 +1938,7 @@ void Graphics::drawentity(const int i, const int yoff)
|
||||
wrapX = true;
|
||||
wrappedPoint.x += 320;
|
||||
}
|
||||
else if (tpoint.x > 300)
|
||||
else if (tpoint.x > 288)
|
||||
{
|
||||
wrapX = true;
|
||||
wrappedPoint.x -= 320;
|
||||
@@ -1950,7 +1950,7 @@ void Graphics::drawentity(const int i, const int yoff)
|
||||
wrapY = true;
|
||||
wrappedPoint.y += 232;
|
||||
}
|
||||
else if (tpoint.y > 210)
|
||||
else if (tpoint.y > 200)
|
||||
{
|
||||
wrapY = true;
|
||||
wrappedPoint.y -= 232;
|
||||
|
||||
@@ -22,6 +22,7 @@ extern "C"
|
||||
const unsigned char* in,
|
||||
size_t insize
|
||||
);
|
||||
extern const char* lodepng_error_text(unsigned code);
|
||||
}
|
||||
|
||||
static SDL_Surface* LoadImage(const char *filename, bool noBlend = true, bool noAlpha = false)
|
||||
@@ -33,6 +34,7 @@ static SDL_Surface* LoadImage(const char *filename, bool noBlend = true, bool no
|
||||
|
||||
unsigned char *data;
|
||||
unsigned int width, height;
|
||||
unsigned int error;
|
||||
|
||||
unsigned char *fileIn;
|
||||
size_t length;
|
||||
@@ -44,14 +46,20 @@ static SDL_Surface* LoadImage(const char *filename, bool noBlend = true, bool no
|
||||
}
|
||||
if (noAlpha)
|
||||
{
|
||||
lodepng_decode24(&data, &width, &height, fileIn, length);
|
||||
error = lodepng_decode24(&data, &width, &height, fileIn, length);
|
||||
}
|
||||
else
|
||||
{
|
||||
lodepng_decode32(&data, &width, &height, fileIn, length);
|
||||
error = lodepng_decode32(&data, &width, &height, fileIn, length);
|
||||
}
|
||||
FILESYSTEM_freeMemory(&fileIn);
|
||||
|
||||
if (error != 0)
|
||||
{
|
||||
fprintf(stderr, "Could not load %s: %s\n", filename, lodepng_error_text(error));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
loadedImage = SDL_CreateRGBSurfaceFrom(
|
||||
data,
|
||||
width,
|
||||
|
||||
@@ -286,6 +286,26 @@ static void startmode(const int mode)
|
||||
fadetomodedelay = 19;
|
||||
}
|
||||
|
||||
static void handlefadetomode(void)
|
||||
{
|
||||
if (game.ingame_titlemode)
|
||||
{
|
||||
/* We shouldn't be here! */
|
||||
SDL_assert(0 && "Loading a mode from in-game options!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (fadetomodedelay > 0)
|
||||
{
|
||||
--fadetomodedelay;
|
||||
}
|
||||
else
|
||||
{
|
||||
fadetomode = false;
|
||||
script.startgamemode(gotomode);
|
||||
}
|
||||
}
|
||||
|
||||
static int* user_changing_volume = NULL;
|
||||
static int previous_volume = 0;
|
||||
|
||||
@@ -1471,8 +1491,6 @@ static void menuactionpress(void)
|
||||
case 0:
|
||||
//back
|
||||
music.playef(11);
|
||||
game.returnmenu();
|
||||
map.nexttowercolour();
|
||||
break;
|
||||
default:
|
||||
//yep
|
||||
@@ -1483,10 +1501,10 @@ static void menuactionpress(void)
|
||||
game.deletesettings();
|
||||
game.flashlight = 5;
|
||||
game.screenshake = 15;
|
||||
game.createmenu(Menu::mainmenu);
|
||||
map.nexttowercolour();
|
||||
break;
|
||||
}
|
||||
game.returnmenu();
|
||||
map.nexttowercolour();
|
||||
break;
|
||||
case Menu::clearcustomdatamenu:
|
||||
switch (game.currentmenuoption)
|
||||
@@ -1928,15 +1946,7 @@ void titleinput(void)
|
||||
|
||||
if (fadetomode)
|
||||
{
|
||||
if (fadetomodedelay > 0)
|
||||
{
|
||||
--fadetomodedelay;
|
||||
}
|
||||
else
|
||||
{
|
||||
fadetomode = false;
|
||||
script.startgamemode(gotomode);
|
||||
}
|
||||
handlefadetomode();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6105,7 +6105,7 @@ const short* otherlevelclass::loadlevel(int rx, int ry)
|
||||
};
|
||||
|
||||
|
||||
obj.createentity((8 * 8), (12 * 8), 1, 0, 0, -10000, -10000, 10000, 100000); // Enemy
|
||||
obj.createentity((8 * 8), (11 * 8), 1, 0, 0, -10000, -10000, 10000, 100000); // Enemy
|
||||
obj.nearelephant = true;
|
||||
|
||||
roomtileset = 0; // (Use space station tileset)
|
||||
@@ -6150,7 +6150,7 @@ const short* otherlevelclass::loadlevel(int rx, int ry)
|
||||
};
|
||||
|
||||
|
||||
obj.createentity(8 * 8, -248 + (12 * 8), 1, 0, 0, -10000, -10000, 10000, 100000); // Enemy
|
||||
obj.createentity(8 * 8, -240 + (11 * 8), 1, 0, 0, -10000, -10000, 10000, 100000); // Enemy
|
||||
obj.nearelephant = true;
|
||||
|
||||
roomtileset = 0; // (Use space station tileset)
|
||||
@@ -6509,7 +6509,7 @@ const short* otherlevelclass::loadlevel(int rx, int ry)
|
||||
};
|
||||
|
||||
|
||||
obj.createentity(-328 + (8 * 8), (12 * 8), 1, 0, 0, -10000, -10000, 10000, 100000); // Enemy
|
||||
obj.createentity(-320 + (8 * 8), (11 * 8), 1, 0, 0, -10000, -10000, 10000, 100000); // Enemy
|
||||
obj.nearelephant = true;
|
||||
|
||||
obj.createentity(240, 72, 10, 1, 8120); // (savepoint)
|
||||
@@ -6555,7 +6555,7 @@ const short* otherlevelclass::loadlevel(int rx, int ry)
|
||||
};
|
||||
|
||||
|
||||
obj.createentity(-328 + (8 * 8), -248 + (12 * 8), 1, 0, 0, -10000, -10000, 10000, 100000); // Enemy
|
||||
obj.createentity(-320 + (8 * 8), -240 + (11 * 8), 1, 0, 0, -10000, -10000, 10000, 100000); // Enemy
|
||||
obj.nearelephant = true;
|
||||
|
||||
roomtileset = 0; // (Use space station tileset)
|
||||
|
||||
@@ -159,7 +159,7 @@ static void menurender(void)
|
||||
#ifdef INTERIM_COMMIT
|
||||
graphics.Print( 310 - (SDL_arraysize(INTERIM_COMMIT) - 1) * 8, 220, INTERIM_COMMIT, tr/2, tg/2, tb/2);
|
||||
#endif
|
||||
graphics.Print( 310 - (6*8), 230, "v2.3.4", tr/2, tg/2, tb/2);
|
||||
graphics.Print( 310 - (6*8), 230, "v2.3.6", tr/2, tg/2, tb/2);
|
||||
|
||||
if(music.mmmmmm){
|
||||
graphics.Print( 10, 230, "[MMMMMM Mod Installed]", tr/2, tg/2, tb/2);
|
||||
@@ -987,7 +987,7 @@ static void menurender(void)
|
||||
std::string tempstring = "You rescued all the crewmates!";
|
||||
graphics.Print(0, 100, tempstring, tr, tg, tb, true);
|
||||
|
||||
tempstring = "And you found " + help.number(game.ndmresulttrinkets) + " trinkets.";
|
||||
tempstring = "And you found " + help.number(game.ndmresulttrinkets) + " trinket" + (game.ndmresulttrinkets == 1 ? "" : "s") + ".";
|
||||
graphics.Print(0, 110, tempstring, tr, tg, tb, true);
|
||||
|
||||
graphics.Print(0, 160, "A new trophy has been awarded and", tr, tg, tb, true);
|
||||
@@ -1572,7 +1572,7 @@ void gamecompleterender(void)
|
||||
}
|
||||
|
||||
|
||||
if (graphics.onscreen(740 + position))
|
||||
if (graphics.onscreen(750 + position))
|
||||
{
|
||||
graphics.Print(40, 740 + position, "Beta Testing by", tr, tg, tb);
|
||||
graphics.bigprint(60, 750 + position, "Sam Kaplan", tr, tg, tb);
|
||||
@@ -1741,10 +1741,12 @@ void gamerender(void)
|
||||
}
|
||||
}
|
||||
|
||||
if (graphics.fademode==0 && !game.intimetrial && !game.isingamecompletescreen() && game.swngame != 1 && game.showingametimer)
|
||||
if (graphics.fademode==0 && !game.intimetrial && !game.isingamecompletescreen() && (!game.swnmode || game.swngame != 1) && game.showingametimer)
|
||||
{
|
||||
char buffer[40 + 1]; /* Screen width 40, ASCII only */
|
||||
graphics.bprint(6, 6, "TIME:", 255,255,255);
|
||||
graphics.bprint(46, 6, game.timestring(), 196, 196, 196);
|
||||
game.timestringcenti(buffer, sizeof(buffer));
|
||||
graphics.bprint(46, 6, buffer, 196, 196, 196);
|
||||
}
|
||||
|
||||
if(map.extrarow==0 || (map.custommode && map.roomname!=""))
|
||||
@@ -1803,7 +1805,7 @@ void gamerender(void)
|
||||
{
|
||||
/* Screen width 40 chars, 4 per char */
|
||||
char buffer[160 + 1];
|
||||
static const char raw[] = "- Press %s to Teleport - ";
|
||||
static const char raw[] = "- Press %s to Teleport -";
|
||||
const char* final_string = interact_prompt(
|
||||
buffer,
|
||||
sizeof(buffer),
|
||||
@@ -1952,6 +1954,9 @@ void gamerender(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
char buffer[40 + 1]; /* Screen width 40, ASCII only */
|
||||
game.timestringcenti(buffer, sizeof(buffer));
|
||||
|
||||
//Draw OSD stuff
|
||||
graphics.bprint(6, 18, "TIME :", 255,255,255);
|
||||
graphics.bprint(6, 30, "DEATH:", 255, 255, 255);
|
||||
@@ -1959,11 +1964,11 @@ void gamerender(void)
|
||||
|
||||
if(game.timetrialparlost)
|
||||
{
|
||||
graphics.bprint(56, 18, game.timestring(), 196, 80, 80);
|
||||
graphics.bprint(56, 18, buffer, 196, 80, 80);
|
||||
}
|
||||
else
|
||||
{
|
||||
graphics.bprint(56, 18, game.timestring(), 196, 196, 196);
|
||||
graphics.bprint(56, 18, buffer, 196, 196, 196);
|
||||
}
|
||||
if(game.deathcounts>0)
|
||||
{
|
||||
@@ -2112,7 +2117,7 @@ void maprender(void)
|
||||
graphics.drawimage(2, 40 + (i * 12), 21 + (j * 9), false);
|
||||
}
|
||||
}
|
||||
graphics.Print(-1, 105, "NO SIGNAL", 245, 245, 245, true);
|
||||
graphics.bprint(-1, 105, "NO SIGNAL", 245, 245, 245, true);
|
||||
}
|
||||
#ifndef NO_CUSTOM_LEVELS
|
||||
else if(map.custommode)
|
||||
|
||||
@@ -3493,6 +3493,8 @@ void scriptclass::hardreset(void)
|
||||
|
||||
game.disabletemporaryaudiopause = true;
|
||||
|
||||
game.ingame_titlemode = false;
|
||||
|
||||
//dwgraphicsclass
|
||||
graphics.backgrounddrawn = false;
|
||||
graphics.textbox.clear();
|
||||
|
||||
Reference in New Issue
Block a user