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,
|
const unsigned char* in,
|
||||||
size_t insize
|
size_t insize
|
||||||
);
|
);
|
||||||
|
extern const char* lodepng_error_text(unsigned code);
|
||||||
}
|
}
|
||||||
|
|
||||||
static SDL_Surface* LoadImage(const char *filename, bool noBlend = true, bool noAlpha = false)
|
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 char *data;
|
||||||
unsigned int width, height;
|
unsigned int width, height;
|
||||||
|
unsigned int error;
|
||||||
|
|
||||||
unsigned char *fileIn;
|
unsigned char *fileIn;
|
||||||
size_t length;
|
size_t length;
|
||||||
@@ -44,14 +46,20 @@ static SDL_Surface* LoadImage(const char *filename, bool noBlend = true, bool no
|
|||||||
}
|
}
|
||||||
if (noAlpha)
|
if (noAlpha)
|
||||||
{
|
{
|
||||||
lodepng_decode24(&data, &width, &height, fileIn, length);
|
error = lodepng_decode24(&data, &width, &height, fileIn, length);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lodepng_decode32(&data, &width, &height, fileIn, length);
|
error = lodepng_decode32(&data, &width, &height, fileIn, length);
|
||||||
}
|
}
|
||||||
FILESYSTEM_freeMemory(&fileIn);
|
FILESYSTEM_freeMemory(&fileIn);
|
||||||
|
|
||||||
|
if (error != 0)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "Could not load %s: %s\n", filename, lodepng_error_text(error));
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
loadedImage = SDL_CreateRGBSurfaceFrom(
|
loadedImage = SDL_CreateRGBSurfaceFrom(
|
||||||
data,
|
data,
|
||||||
width,
|
width,
|
||||||
|
|||||||
@@ -1491,8 +1491,6 @@ static void menuactionpress(void)
|
|||||||
case 0:
|
case 0:
|
||||||
//back
|
//back
|
||||||
music.playef(11);
|
music.playef(11);
|
||||||
game.returnmenu();
|
|
||||||
map.nexttowercolour();
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
//yep
|
//yep
|
||||||
@@ -1503,10 +1501,10 @@ static void menuactionpress(void)
|
|||||||
game.deletesettings();
|
game.deletesettings();
|
||||||
game.flashlight = 5;
|
game.flashlight = 5;
|
||||||
game.screenshake = 15;
|
game.screenshake = 15;
|
||||||
game.createmenu(Menu::mainmenu);
|
|
||||||
map.nexttowercolour();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
game.returnmenu();
|
||||||
|
map.nexttowercolour();
|
||||||
break;
|
break;
|
||||||
case Menu::clearcustomdatamenu:
|
case Menu::clearcustomdatamenu:
|
||||||
switch (game.currentmenuoption)
|
switch (game.currentmenuoption)
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ static void menurender(void)
|
|||||||
#ifdef INTERIM_COMMIT
|
#ifdef INTERIM_COMMIT
|
||||||
graphics.Print( 310 - (SDL_arraysize(INTERIM_COMMIT) - 1) * 8, 220, INTERIM_COMMIT, tr/2, tg/2, tb/2);
|
graphics.Print( 310 - (SDL_arraysize(INTERIM_COMMIT) - 1) * 8, 220, INTERIM_COMMIT, tr/2, tg/2, tb/2);
|
||||||
#endif
|
#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){
|
if(music.mmmmmm){
|
||||||
graphics.Print( 10, 230, "[MMMMMM Mod Installed]", tr/2, tg/2, tb/2);
|
graphics.Print( 10, 230, "[MMMMMM Mod Installed]", tr/2, tg/2, tb/2);
|
||||||
|
|||||||
Reference in New Issue
Block a user