19 Commits

Author SHA1 Message Date
Ethan Lee
abe3eb6077 2.3.6 2021-12-22 08:20:25 -05:00
Misa
cfa0d04bbb LoadImage: Check LodePNG return value and print errors
Dvoid from Discord just reported a crash when trying to load a
custom tiles2.png that was encoded weirdly.

The problem is that we don't check the return value from LodePNG, so
LodePNG gives us a null pointer, and then SDL_CreateRGBSurfaceFrom
doesn't check this null pointer, which then propagates until we crash in
SDL_ConvertSurfaceFormat (or rather, one of its sub-functions), and we
would probably crash somewhere else anyway if it continued.

After properly checking LodePNG's return value, along with printing the
error, it turns out that Dvoid's custom tiles2.png had an "invalid CRC".
I don't know what this means but it sounds worrying. `feh` can read the
file correctly but it also reports a "CRC error".
2021-12-21 23:59:44 -08:00
Misa
cc3dc8d329 Don't go back to main menu when deleting main game save data
Going back to the main menu allowed for glitchiness to occur if you
deleted your save data while in in-game options. This meant you could
then load back in to the game, and then quit to the menu, then open the
options and then jump back in-game, exploring the state of the game
after hardreset() had been called on it. Which is: pretty glitchy.

For example, this meant having your room coordinates be 0,0 (which is
different from 100,100, which is the actual 0,0, thanks for the
100-indexing Terry), which caused some of the room transitions to be
disabled because room transitions were disabled if the
game.door_up/down/left/right variables were -2 or less, and they were
computed based on room coordinates, which meant some of them went
negative if you were 0,0 and not 100,100. At least this was the case
until I removed those variables for, at best, doing nothing, and at
worst, being actively harmful.

Anyways, so deleting your save data now just takes you back to the
previous menu, much like deleting custom level data does. I don't know
why deleting save data put you back on the main menu in the first place.
It's not like the options menu needed to be reloaded or anything. I
checked and this was the behavior in 2.0 as well, so it was probably
added for a dumb reason.

I considered prohibiting data deletion if you were ingame_titlemode, but
as of the moment it seems to be okay (if albeit weird, e.g. returning to
menu while in Secret Lab doesn't place your cursor on the "play"
button), and I can always add such a prohibition later if it was really
causing problems. Can't think of anything bad off of the top of my head,
though.

Btw thanks to Elomavi for discovering that you could do this glitch.
2021-12-21 23:58:22 -08:00
Ethan Lee
b1760fbf90 2.3.5 2021-12-21 10:05:46 -05:00
Misa
6b5953f3f5 Remove extra "s"
I manually rebased 774f8c31a7 and didn't
notice this. The C++ way of doing things where you add together strings
(or worse, bit shift them) is convoluted and lets you easily miss
things like this. If this was a printf format string it'd be
"trinket%ss." which would stick out like a sore thumb.
2021-12-20 20:30:07 -08:00
Misa
0aa76cde56 Fix warp sprites of big sprites sometimes not being drawn
I noticed when going frame-by-frame in Vertigo that sometimes the
wrapping enemies at the top sometimes just "popped" in frame. This is
because the sprite warp code only draws the warping sprite of sprites at
the bottom of the screen if they're below y=210. However, the warp point
starts at y=232, and warp sprites can be at most 32x32, which is exactly
the case with the Vertigo sprites, which are exactly 32x32. So the warp
code should start warping sprites if they're below y=200 (232 - 32)
instead.

Horizontal warping also has this problem; it warps at x=320 and
starts drawing warp sprites at x=300, even though it should start
drawing at x=288 (320 - 32). I've gone ahead and fixed that as well.
2021-12-20 20:22:43 -08:00
Misa
0e51dc48de Outline "NO SIGNAL"
This is just in case the background gets changed by a custom level or
something to be something that would otherwise result in bad contrast.
Also if it needs to go outside the box for some reason. And I just like
the look of the outline.
2021-12-20 20:22:43 -08:00
Misa
ea5f772636 Outline trophy text
Whew, look at all those copy-pasted print statements!

Doing this because of the in-game timer feature. The text would
otherwise clash harshly with the timer otherwise. Even with the outline
it still clashes, but at least there's an outline so it's not as harsh.
2021-12-20 20:22:43 -08:00
Misa
d66505eacb Add centiseconds to timer overlays
This adds centiseconds to the in-game timer, as well as the time trial
timer.

This is to aid speedrun moderators in determining when exactly a run was
completed, which they can't easily do if the timer only has a precision
up to a second.
2021-12-20 20:22:42 -08:00
Misa
c2ef76fc06 Fix in-game timer going away after playing Super Gravitron
The problem was that it also needed to check that game.swnmode was true,
in addition to game.swngame being 1, to actually check that the Super
Gravitron was being played.
2021-12-20 20:21:22 -08:00
Misa
c6664186f3 hardreset: Reset ingame_titlemode
You'll note that getting in to the glitchy state of the game (the state
where you could play the game after it had hardreset() called on it)
required the player to quit to menu with ingame_titlemode set to true.
Well, quitting to menu calls hardreset(). So if hardreset() is called
when quitting, then you can no longer preserve ingame_titlemode that
way. This is a bit overkill, but I'm just taking precautions.
2021-12-20 16:59:11 -08:00
Misa
fa19bc3832 Add asserts if ingame_titlemode in unexpected places
The game will now assert if the main menu is created while
ingame_titlemode is true, or if we attempt to load into a mode while
it's true. And if assertions are disabled then it just stops doing it
anyway.

I don't think there's any way to get a glitched ingame_titlemode again,
ever since I removed save data deletion taking you back to the main
menu. But I've had enough bugs with the fact that we more-or-less use
the same state for main menu options and in-game options, and that
glitched ingame_titlemode bug DID just happen, so I'm taking
precautions.
2021-12-20 16:58:30 -08:00
Misa
326d96b506 Pull out fade mode handling into separate function
The next commit will add logic that more-or-less quits the whole block
if ingame_titlemode, and instead of adding another layer of indentation
I will just pull this into its own function so we can use a return
statement.
2021-12-20 16:58:26 -08:00
Misa
a57010e55b Fix regression from 2.3 with destroy(platforms)
2.3 introduced a regression with destroy(platforms). The problem was
that isplatform wasn't being set to false when the entity got disabled,
so if the platform was moving, it would keep moving until it hit a wall,
instead of stopping immediately.
2021-12-20 16:57:59 -08:00
Misa
b2b2fcb867 Fix elephant placement across rooms
Okay, so, this is the elephant sprite, right?

https://i.imgur.com/dtS70zk.png

This is how it looks in the actual game, when you stitch all the rooms
together:

https://i.imgur.com/aztVnFT.png

Looks kind of messed-up, doesn't it?

Okay, so, in the bottom two rooms (11,9) and (12,9), the elephant is
placed at y-position -152. But in (11,8) and (12,8), it's placed at
y-position 96. This is despite the fact that -152 plus 240 is 88, not
96.

Similarly, in the left two rooms (11,8) and (11,9), the elephant is
placed at x-position 64, but in the right two rooms (12,8) and (12,9),
the elephant is placed at -264. This is despite the fact that 64 minus
320 is -256, not -264.

All of this stems from the calculations in Otherlevel.cpp using offsets
of -248 and -328 instead of -240 and -320.

So there's an 8-pixel offset that causes the elephant to be chopped off
when viewed with all the rooms stitched together. Simple enough to fix.
For the y-position fixes, I decremented the initial 8-pixel multiplier
as well, else the elephant would sink into the floor.

And this is what the elephant looks like now after stitching:

https://i.imgur.com/27ePLm1.png

Thanks to Tzann for pointing this out.
2021-12-20 16:57:15 -08:00
Misa
a1381102f8 Remove space at end of Press %s to Teleport
This wasn't there in 2.2 and previous. I accidentally introduced it in.
2021-12-20 16:53:42 -08:00
Misa
774f8c31a7 Fix winning in No Death Mode saying "One trinkets"
While dying in No Death Mode was fixed to no longer say "One trinkets"
in 2.3, if you win in No Death Mode with one trinket, the game would say
"One trinkets".

So to fix this, just slot a ternary in there. The code is already kind
of bad anyways and is going to be refactored/de-STLed in the future
regardless, so I'm not feeling too badly about shoving a ternary in
there like that.
2021-12-20 16:52:20 -08:00
Misa
80ea585085 Fix Pauli Kohberger's name stopping being drawn too early
This is because the y-position of the graphics.onscreen() check was a
little too high. Then their name (under Beta Testing) would suddenly
disappear too early. You'd have to look real close to spot it, but it
does happen. It's cuz the credits are all kinda hardcoded, which is
probably bad, but fixing that would have to come later...
2021-12-20 16:49:55 -08:00
Misa
e78de4662c deletestats: Properly reset bestgamedeaths
While I was testing deleting data while you were in-game, I noticed that
deleting data gave you all the "Win with less than X deaths" trophies,
even if you never got any of them before deleting data. Well, it turns
out that if you have the best game death count of 0, then you win every
trophy, and if you have the best game death count of -1 then that means
you haven't completed the game yet.

This reset was added in e3bfc79d4a, so at
least it's not in 2.3, but I only have myself to blame for making this
mistake. Whoops.
2021-12-20 13:40:01 -05:00
9 changed files with 110 additions and 60 deletions

View File

@@ -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];

View File

@@ -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

View File

@@ -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);

View File

@@ -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;

View File

@@ -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,

View File

@@ -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();
}
}

View File

@@ -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)

View File

@@ -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)

View File

@@ -3493,6 +3493,8 @@ void scriptclass::hardreset(void)
game.disabletemporaryaudiopause = true;
game.ingame_titlemode = false;
//dwgraphicsclass
graphics.backgrounddrawn = false;
graphics.textbox.clear();