mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-07-09 20:35:35 +00:00
Compare commits
45 commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
abe3eb6077 | ||
![]() |
cfa0d04bbb | ||
![]() |
cc3dc8d329 | ||
![]() |
b1760fbf90 | ||
![]() |
6b5953f3f5 | ||
![]() |
0aa76cde56 | ||
![]() |
0e51dc48de | ||
![]() |
ea5f772636 | ||
![]() |
d66505eacb | ||
![]() |
c2ef76fc06 | ||
![]() |
c6664186f3 | ||
![]() |
fa19bc3832 | ||
![]() |
326d96b506 | ||
![]() |
a57010e55b | ||
![]() |
b2b2fcb867 | ||
![]() |
a1381102f8 | ||
![]() |
774f8c31a7 | ||
![]() |
80ea585085 | ||
![]() |
e78de4662c | ||
![]() |
3469a44489 | ||
![]() |
222e45ada1 | ||
![]() |
6c848a8bb9 | ||
![]() |
b5501e4b29 | ||
![]() |
7c29bb862a | ||
![]() |
2b9b4c39cb | ||
![]() |
3c6cb0167d | ||
![]() |
406a19ceb6 | ||
![]() |
3d090792d2 | ||
![]() |
b6645de749 | ||
![]() |
25af54529b | ||
![]() |
f467f86dc2 | ||
![]() |
ca35c53c1a | ||
![]() |
b667e44bcf | ||
![]() |
70d3c999be | ||
![]() |
6f315af42d | ||
![]() |
c8fcbc1256 | ||
![]() |
a302692ab2 | ||
![]() |
a59e9d51db | ||
![]() |
82971296c2 | ||
![]() |
4ecec8a327 | ||
![]() |
f1ae40a7c5 | ||
![]() |
d501a6245f | ||
![]() |
514d56ee20 | ||
![]() |
9cfbd1ae51 | ||
![]() |
96812f8046 |
20 changed files with 217 additions and 87 deletions
8
desktop_version/fixupMac.sh
Executable file
8
desktop_version/fixupMac.sh
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
# flibit has this solely for convenience when cleaning up Mac binaries.
|
||||
|
||||
install_name_tool -change /usr/local/lib/libSDL2-2.0.0.dylib @rpath/libSDL2-2.0.0.dylib VVVVVV
|
||||
install_name_tool -change /usr/local/lib/libSDL2_mixer-2.0.0.dylib @rpath/libSDL2_mixer-2.0.0.dylib VVVVVV
|
||||
strip -S VVVVVV
|
||||
otool -L VVVVVV
|
Binary file not shown.
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 4.2 KiB |
|
@ -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];
|
||||
|
|
|
@ -813,6 +813,10 @@ void Game::updatestate(void)
|
|||
if (!map.custommode && nocompetitive())
|
||||
{
|
||||
returntolab();
|
||||
|
||||
startscript = true;
|
||||
newscript = "disableaccessibility";
|
||||
|
||||
state = 0;
|
||||
break;
|
||||
}
|
||||
|
@ -1884,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;
|
||||
|
||||
|
@ -1938,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;
|
||||
|
@ -4001,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
|
||||
|
@ -5845,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())
|
||||
|
@ -5853,6 +5877,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
|
||||
|
@ -5922,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
|
||||
|
@ -6874,7 +6910,7 @@ void Game::returntoingame(void)
|
|||
gamestate = MAPMODE;
|
||||
DEFER_CALLBACK(setflipmode);
|
||||
DEFER_CALLBACK(setfademode);
|
||||
if (!map.custommode && !graphics.flipmode)
|
||||
if (!map.custommode && !graphics.setflipmode)
|
||||
{
|
||||
obj.flags[73] = true;
|
||||
}
|
||||
|
@ -6888,8 +6924,13 @@ void Game::unlockAchievement(const char *name) {
|
|||
#endif
|
||||
}
|
||||
|
||||
void Game::mapmenuchange(const int newgamestate)
|
||||
void Game::mapmenuchange(const int newgamestate, const bool user_initiated)
|
||||
{
|
||||
if (user_initiated && graphics.resumegamemode)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
prevgamestate = gamestate;
|
||||
gamestate = newgamestate;
|
||||
graphics.resumegamemode = false;
|
||||
|
@ -6898,10 +6939,6 @@ void Game::mapmenuchange(const int newgamestate)
|
|||
if (prevgamestate == GAMEMODE)
|
||||
{
|
||||
graphics.menuoffset = 240;
|
||||
if (map.extrarow)
|
||||
{
|
||||
graphics.menuoffset -= 10;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
@ -245,7 +247,7 @@ public:
|
|||
int tapleft, tapright;
|
||||
|
||||
//Menu interaction stuff
|
||||
void mapmenuchange(const int newgamestate);
|
||||
void mapmenuchange(const int newgamestate, const bool user_initiated);
|
||||
bool mapheld;
|
||||
int menupage;
|
||||
int lastsaved;
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2124,7 +2134,7 @@ void gameinput(void)
|
|||
else if (game.companion == 0)
|
||||
{
|
||||
//Alright, normal teleporting
|
||||
game.mapmenuchange(TELEPORTERMODE);
|
||||
game.mapmenuchange(TELEPORTERMODE, true);
|
||||
|
||||
game.useteleporter = true;
|
||||
game.initteleportermode();
|
||||
|
@ -2279,7 +2289,7 @@ void gameinput(void)
|
|||
//quitting the super gravitron
|
||||
game.mapheld = true;
|
||||
//Quit menu, same conditions as in game menu
|
||||
game.mapmenuchange(MAPMODE);
|
||||
game.mapmenuchange(MAPMODE, true);
|
||||
game.gamesaved = false;
|
||||
game.gamesavefailed = false;
|
||||
game.menupage = 20; // The Map Page
|
||||
|
@ -2299,7 +2309,7 @@ void gameinput(void)
|
|||
else
|
||||
{
|
||||
//Normal map screen, do transition later
|
||||
game.mapmenuchange(MAPMODE);
|
||||
game.mapmenuchange(MAPMODE, true);
|
||||
map.cursordelay = 0;
|
||||
map.cursorstate = 0;
|
||||
game.gamesaved = false;
|
||||
|
@ -2320,7 +2330,7 @@ void gameinput(void)
|
|||
{
|
||||
game.mapheld = true;
|
||||
//Quit menu, same conditions as in game menu
|
||||
game.mapmenuchange(MAPMODE);
|
||||
game.mapmenuchange(MAPMODE, true);
|
||||
game.gamesaved = false;
|
||||
game.gamesavefailed = false;
|
||||
game.menupage = 30; // Pause screen
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -202,9 +202,6 @@ void musicclass::play(int t)
|
|||
return;
|
||||
}
|
||||
|
||||
m_doFadeInVol = false;
|
||||
m_doFadeOutVol = false;
|
||||
|
||||
if (currentsong == 0 || currentsong == 7 || (!map.custommode && (currentsong == 0+num_mmmmmm_tracks || currentsong == 7+num_mmmmmm_tracks)))
|
||||
{
|
||||
// Level Complete theme, no fade in or repeat
|
||||
|
@ -214,6 +211,8 @@ void musicclass::play(int t)
|
|||
}
|
||||
else
|
||||
{
|
||||
m_doFadeInVol = false;
|
||||
m_doFadeOutVol = false;
|
||||
musicVolume = MIX_MAX_VOLUME;
|
||||
Mix_VolumeMusic(musicVolume);
|
||||
}
|
||||
|
@ -242,6 +241,8 @@ void musicclass::play(int t)
|
|||
}
|
||||
else
|
||||
{
|
||||
m_doFadeInVol = false;
|
||||
m_doFadeOutVol = false;
|
||||
fadeMusicVolumeIn(3000);
|
||||
}
|
||||
}
|
||||
|
@ -280,6 +281,8 @@ void musicclass::haltdasmusik(void)
|
|||
void musicclass::silencedasmusik(void)
|
||||
{
|
||||
musicVolume = 0;
|
||||
m_doFadeInVol = false;
|
||||
m_doFadeOutVol = false;
|
||||
}
|
||||
|
||||
struct FadeState
|
||||
|
@ -325,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;
|
||||
|
||||
|
@ -342,6 +350,11 @@ void musicclass::fadeMusicVolumeIn(int ms)
|
|||
|
||||
void musicclass::fadeMusicVolumeOut(const int fadeout_ms)
|
||||
{
|
||||
if (halted())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
m_doFadeInVol = false;
|
||||
m_doFadeOutVol = true;
|
||||
|
||||
|
@ -396,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;
|
||||
|
@ -522,3 +535,8 @@ void musicclass::resumeef(void)
|
|||
{
|
||||
Mix_Resume(-1);
|
||||
}
|
||||
|
||||
bool musicclass::halted(void)
|
||||
{
|
||||
return Mix_PausedMusic() == 1;
|
||||
}
|
||||
|
|
|
@ -44,6 +44,8 @@ public:
|
|||
void pauseef(void);
|
||||
void resumeef(void);
|
||||
|
||||
bool halted(void);
|
||||
|
||||
std::vector<SoundTrack> soundTracks;
|
||||
std::vector<MusicTrack> musicTracks;
|
||||
SoundSystem soundSystem;
|
||||
|
|
|
@ -56,7 +56,7 @@ static NetworkBackend backends[NUM_BACKENDS];
|
|||
|
||||
int NETWORK_init(void)
|
||||
{
|
||||
int32_t any = 0;
|
||||
int32_t i, any = 0;
|
||||
#define ASSIGN_BACKEND(name, index) \
|
||||
backends[index].Init = name##_init; \
|
||||
backends[index].Shutdown = name##_shutdown; \
|
||||
|
@ -72,7 +72,6 @@ int NETWORK_init(void)
|
|||
#endif
|
||||
#undef ASSIGN_BACKEND
|
||||
#if NUM_BACKENDS > 0
|
||||
int32_t i;
|
||||
for (i = 0; i < NUM_BACKENDS; i += 1)
|
||||
{
|
||||
backends[i].IsInit = backends[i].Init();
|
||||
|
|
|
@ -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 - (4*8), 230, "v2.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);
|
||||
|
@ -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)
|
||||
|
|
|
@ -205,13 +205,14 @@ void maprenderfixed(void)
|
|||
|| !script.running)
|
||||
{
|
||||
graphics.menuoffset += 25;
|
||||
int threshold = map.extrarow ? 230 : 240;
|
||||
int threshold = 240;
|
||||
if (graphics.menuoffset >= threshold)
|
||||
{
|
||||
graphics.menuoffset = threshold;
|
||||
//go back to gamemode!
|
||||
game.mapheld = true;
|
||||
game.gamestate = GAMEMODE;
|
||||
graphics.resumegamemode = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -24,7 +24,7 @@ ScreenSettings::ScreenSettings(void)
|
|||
windowWidth = 320;
|
||||
windowHeight = 240;
|
||||
fullscreen = false;
|
||||
useVsync = false;
|
||||
useVsync = true; // Now that uncapped is the default...
|
||||
stretch = 0;
|
||||
linearFilter = false;
|
||||
badSignal = false;
|
||||
|
|
|
@ -1349,7 +1349,8 @@ void scriptclass::run(void)
|
|||
{
|
||||
if (words[1] == "teleporter")
|
||||
{
|
||||
game.mapmenuchange(TELEPORTERMODE);
|
||||
game.gamestate = GAMEMODE; /* to set prevgamestate */
|
||||
game.mapmenuchange(TELEPORTERMODE, false);
|
||||
|
||||
game.useteleporter = false; //good heavens don't actually use it
|
||||
}
|
||||
|
@ -3492,6 +3493,8 @@ void scriptclass::hardreset(void)
|
|||
|
||||
game.disabletemporaryaudiopause = true;
|
||||
|
||||
game.ingame_titlemode = false;
|
||||
|
||||
//dwgraphicsclass
|
||||
graphics.backgrounddrawn = false;
|
||||
graphics.textbox.clear();
|
||||
|
|
|
@ -6724,6 +6724,26 @@ void scriptclass::load(const std::string& name)
|
|||
};
|
||||
filllines(lines);
|
||||
}
|
||||
else if (SDL_strcmp(t, "disableaccessibility") == 0)
|
||||
{
|
||||
static const char* lines[] = {
|
||||
"cutscene()",
|
||||
"untilbars()",
|
||||
|
||||
"squeak(terminal)",
|
||||
"text(gray,0,114,3)",
|
||||
"Please disable invincibility",
|
||||
"and/or slowdown before entering",
|
||||
"the Super Gravitron.",
|
||||
"position(center)",
|
||||
"speak",
|
||||
|
||||
"endtext",
|
||||
"endcutscene()",
|
||||
"untilbars()",
|
||||
};
|
||||
filllines(lines);
|
||||
}
|
||||
else
|
||||
{
|
||||
loadother(t);
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -143,7 +143,7 @@ static const inline struct ImplFunc* get_gamestate_funcs(
|
|||
FUNC_LIST_END
|
||||
|
||||
FUNC_LIST_BEGIN(TELEPORTERMODE)
|
||||
{Func_fixed, maprenderfixed},
|
||||
{Func_fixed, teleporterrenderfixed},
|
||||
{Func_delta, teleporterrender},
|
||||
{Func_input, teleportermodeinput},
|
||||
{Func_fixed, maplogic},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue