Compare commits

...

35 Commits
v2.3.3 ... main

Author SHA1 Message Date
Nichole Mattera 8ea8fbe82d Updated version number 3 months ago
Nichole Mattera 06cbff44b7 Merge tag '2.3.6' 3 months ago
Ethan Lee abe3eb6077 2.3.6 5 months ago
Misa cfa0d04bbb `LoadImage`: Check LodePNG return value and print errors 5 months ago
Misa cc3dc8d329 Don't go back to main menu when deleting main game save data 5 months ago
Ethan Lee b1760fbf90 2.3.5 5 months ago
Misa 6b5953f3f5 Remove extra "s" 5 months ago
Misa 0aa76cde56 Fix warp sprites of big sprites sometimes not being drawn 5 months ago
Misa 0e51dc48de Outline "NO SIGNAL" 5 months ago
Misa ea5f772636 Outline trophy text 5 months ago
Misa d66505eacb Add centiseconds to timer overlays 5 months ago
Misa c2ef76fc06 Fix in-game timer going away after playing Super Gravitron 5 months ago
Misa c6664186f3 `hardreset`: Reset `ingame_titlemode` 5 months ago
Misa fa19bc3832 Add asserts if `ingame_titlemode` in unexpected places 5 months ago
Misa 326d96b506 Pull out fade mode handling into separate function 5 months ago
Misa a57010e55b Fix regression from 2.3 with `destroy(platforms)` 5 months ago
Misa b2b2fcb867 Fix elephant placement across rooms 5 months ago
Misa a1381102f8 Remove space at end of Press %s to Teleport 5 months ago
Misa 774f8c31a7 Fix winning in No Death Mode saying "One trinkets" 5 months ago
Misa 80ea585085 Fix Pauli Kohberger's name stopping being drawn too early 5 months ago
Misa e78de4662c `deletestats`: Properly reset `bestgamedeaths` 5 months ago
Nichole Mattera ee7908b08a Updated version number 7 months ago
Nichole Mattera 005c23bcfd Merge tag '2.3.4' 7 months ago
Ethan Lee 3469a44489 2.3.4 8 months ago
Misa 222e45ada1 Music: Do not do fades if not playing 8 months ago
Misa 6c848a8bb9 Move `Mix_PausedMusic()` call into wrapper function 8 months ago
Misa b5501e4b29 Kludge-fix being able to play music in editor 8 months ago
Misa 7c29bb862a Reset some stats that weren't being reset in deletestats 8 months ago
Misa 2b9b4c39cb Reset fade booleans when silencing music 8 months ago
Misa 3c6cb0167d Fix platv values outside map size being saved as 67372036 8 months ago
Misa 406a19ceb6 Don't check `!muted` when fading music after completion prompt 8 months ago
Misa 3d090792d2 Don't touch music when completing custom level 8 months ago
Misa b6645de749 Fix dying during collection prompt persisting effects 8 months ago
Misa 25af54529b Don't check `map.extrarow` when opening map 9 months ago
Misa f467f86dc2 Use `resumegamemode` to track menu animation 9 months ago
  1. 4
      desktop_version/Makefile.switch
  2. 4
      desktop_version/src/Entity.cpp
  3. 52
      desktop_version/src/Game.cpp
  4. 2
      desktop_version/src/Game.h
  5. 60
      desktop_version/src/Graphics.cpp
  6. 12
      desktop_version/src/GraphicsResources.cpp
  7. 36
      desktop_version/src/Input.cpp
  8. 12
      desktop_version/src/Map.cpp
  9. 19
      desktop_version/src/Music.cpp
  10. 2
      desktop_version/src/Music.h
  11. 8
      desktop_version/src/Otherlevel.cpp
  12. 23
      desktop_version/src/Render.cpp
  13. 1
      desktop_version/src/RenderFixed.cpp
  14. 2
      desktop_version/src/Script.cpp
  15. 5
      desktop_version/src/editor.cpp

4
desktop_version/Makefile.switch

@ -44,7 +44,7 @@ INCLUDES := ../third_party/lodepng ../third_party/physfs ../third_party/tinyxml2
APP_TITLE := NX-VVVVVV
APP_AUTHOR := Nichole Mattera (Based off work by Terry Cavanagh)
APP_VERSION := 2.3.3
APP_VERSION := 2.3.6
#---------------------------------------------------------------------------------
# options for code generation
@ -54,7 +54,7 @@ ARCH := -march=armv8-a+crc+crypto -mtune=cortex-a57 -mtp=soft -fPIE
CFLAGS := -g -Wall -O2 -ffunction-sections \
$(ARCH) $(DEFINES)
CFLAGS += $(INCLUDE) -DMAKEANDPLAY -D__SWITCH__ -DNO_EDITOR -DPHYSFS_SUPPORTS_DEFAULT=0 -DPHYSFS_SUPPORTS_ZIP=1
CFLAGS += $(INCLUDE) -D__SWITCH__ -DNO_EDITOR -DPHYSFS_SUPPORTS_DEFAULT=0 -DPHYSFS_SUPPORTS_ZIP=1
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions

4
desktop_version/src/Entity.cpp

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

52
desktop_version/src/Game.cpp

@ -1888,7 +1888,10 @@ void Game::updatestate(void)
advancetext = false;
completestop = false;
state = 0;
if(!muted && music.currentsong>-1) music.fadeMusicVolumeIn(3000);
if (music.currentsong > -1)
{
music.fadeMusicVolumeIn(3000);
}
graphics.showcutscenebars = false;
break;
@ -1942,20 +1945,19 @@ void Game::updatestate(void)
if(map.custommodeforreal)
{
graphics.fademode = 2;
if(!muted && ed.levmusic>0) music.fadeMusicVolumeIn(3000);
if(ed.levmusic>0) music.fadeout();
state=1014;
}
else
{
returntoeditor();
if(!muted && ed.levmusic>0) music.fadeMusicVolumeIn(3000);
if(ed.levmusic>0) music.fadeout();
}
}
else
{
if(!muted && ed.levmusic>0) music.fadeMusicVolumeIn(3000);
if (ed.levmusic > 0)
{
music.fadeMusicVolumeIn(3000);
}
}
graphics.showcutscenebars = false;
break;
@ -4005,6 +4007,9 @@ void Game::deletestats(void)
bestlives[i] = -1;
bestrank[i] = -1;
}
swnrecord = 0;
swnbestrank = 0;
bestgamedeaths = -1;
#ifndef MAKEANDPLAY
graphics.setflipmode = false;
#endif
@ -5861,6 +5866,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())
@ -5869,6 +5889,12 @@ void Game::returnmenu(void)
return;
}
/* FIXME: Super bad kludge, don't hardcode this! */
if (currentmenuname == Menu::ed_music)
{
music.fadeout();
}
MenuStackFrame& frame = menustack[menustack.size()-1];
//Store this in case createmenu() removes the stack frame
@ -5938,6 +5964,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
@ -6918,9 +6950,7 @@ void Game::unlockAchievement(const char *name) {
void Game::mapmenuchange(const int newgamestate, const bool user_initiated)
{
if (user_initiated
&& graphics.menuoffset > 0
&& graphics.menuoffset < 240)
if (user_initiated && graphics.resumegamemode)
{
return;
}
@ -6933,10 +6963,6 @@ void Game::mapmenuchange(const int newgamestate, const bool user_initiated)
if (prevgamestate == GAMEMODE)
{
graphics.menuoffset = 240;
if (map.extrarow)
{
graphics.menuoffset -= 10;
}
}
else
{

2
desktop_version/src/Game.h

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

60
desktop_version/src/Graphics.cpp

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

12
desktop_version/src/GraphicsResources.cpp

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

36
desktop_version/src/Input.cpp

@ -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;
@ -1540,8 +1560,6 @@ static void menuactionpress(void)
case 0:
//back
music.playef(11);
game.returnmenu();
map.nexttowercolour();
break;
default:
//yep
@ -1552,10 +1570,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)
@ -1997,15 +2015,7 @@ void titleinput(void)
if (fadetomode)
{
if (fadetomodedelay > 0)
{
--fadetomodedelay;
}
else
{
fadetomode = false;
script.startgamemode(gotomode);
}
handlefadetomode();
}
}

12
desktop_version/src/Map.cpp

@ -865,6 +865,18 @@ void mapclass::resetplayer(const bool player_died)
}
}
if (game.state == 0 && !script.running && game.completestop)
{
/* Looks like a collection dialogue was interrupted.
* Undo its effects! */
game.advancetext = false;
graphics.showcutscenebars = false;
if (music.currentsong > -1)
{
music.fadeMusicVolumeIn(3000);
}
}
game.scmhurt = false; //Just in case the supercrewmate is fucking this up!
if (game.supercrewmate)
{

19
desktop_version/src/Music.cpp

@ -281,6 +281,8 @@ void musicclass::haltdasmusik(void)
void musicclass::silencedasmusik(void)
{
musicVolume = 0;
m_doFadeInVol = false;
m_doFadeOutVol = false;
}
struct FadeState
@ -326,6 +328,11 @@ static enum FadeCode processmusicfade(struct FadeState* state, int* volume)
void musicclass::fadeMusicVolumeIn(int ms)
{
if (halted())
{
return;
}
m_doFadeInVol = true;
m_doFadeOutVol = false;
@ -343,6 +350,11 @@ void musicclass::fadeMusicVolumeIn(int ms)
void musicclass::fadeMusicVolumeOut(const int fadeout_ms)
{
if (halted())
{
return;
}
m_doFadeInVol = false;
m_doFadeOutVol = true;
@ -397,7 +409,7 @@ void musicclass::processmusic(void)
}
/* This needs to come after processing fades */
if (nicefade && Mix_PausedMusic() == 1)
if (nicefade && halted())
{
play(nicechange);
nicechange = -1;
@ -523,3 +535,8 @@ void musicclass::resumeef(void)
{
Mix_Resume(-1);
}
bool musicclass::halted(void)
{
return Mix_PausedMusic() == 1;
}

2
desktop_version/src/Music.h

@ -44,6 +44,8 @@ public:
void pauseef(void);
void resumeef(void);
bool halted(void);
std::vector<SoundTrack> soundTracks;
std::vector<MusicTrack> musicTracks;
SoundSystem soundSystem;

8
desktop_version/src/Otherlevel.cpp

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

23
desktop_version/src/Render.cpp

@ -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.3", 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);
@ -1045,7 +1045,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);
@ -1634,7 +1634,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);
@ -1803,10 +1803,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!=""))
@ -1865,7 +1867,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),
@ -2014,6 +2016,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);
@ -2021,11 +2026,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)
{
@ -2174,7 +2179,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)

1
desktop_version/src/RenderFixed.cpp

@ -212,6 +212,7 @@ void maprenderfixed(void)
//go back to gamemode!
game.mapheld = true;
game.gamestate = GAMEMODE;
graphics.resumegamemode = false;
}
}
else

2
desktop_version/src/Script.cpp

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

5
desktop_version/src/editor.cpp

@ -2232,7 +2232,10 @@ bool editorclass::save(std::string& _path)
msg = xml::update_element_delete_contents(data, "levelMetaData");
int temp_platv[numrooms];
SDL_memset(temp_platv, 4 /* default */, sizeof(temp_platv));
for (size_t i = 0; i < SDL_arraysize(temp_platv); ++i)
{
temp_platv[i] = 4; /* default */
}
if (mapwidth < maxwidth)
{

Loading…
Cancel
Save