mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-09-25 13:27:12 +03:00
Compare commits
3
Commits
2.3.5
...
2.3-updates
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
abe3eb6077 | ||
|
|
cfa0d04bbb | ||
|
|
cc3dc8d329 |
@@ -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,
|
||||
|
||||
@@ -1491,8 +1491,6 @@ static void menuactionpress(void)
|
||||
case 0:
|
||||
//back
|
||||
music.playef(11);
|
||||
game.returnmenu();
|
||||
map.nexttowercolour();
|
||||
break;
|
||||
default:
|
||||
//yep
|
||||
@@ -1503,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)
|
||||
|
||||
@@ -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.5", 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);
|
||||
|
||||
Reference in New Issue
Block a user