mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-07-13 14:25:26 +00:00
Compare commits
26 commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
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 |
16 changed files with 109 additions and 29 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 |
|
@ -813,6 +813,10 @@ void Game::updatestate(void)
|
||||||
if (!map.custommode && nocompetitive())
|
if (!map.custommode && nocompetitive())
|
||||||
{
|
{
|
||||||
returntolab();
|
returntolab();
|
||||||
|
|
||||||
|
startscript = true;
|
||||||
|
newscript = "disableaccessibility";
|
||||||
|
|
||||||
state = 0;
|
state = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1884,7 +1888,10 @@ void Game::updatestate(void)
|
||||||
advancetext = false;
|
advancetext = false;
|
||||||
completestop = false;
|
completestop = false;
|
||||||
state = 0;
|
state = 0;
|
||||||
if(!muted && music.currentsong>-1) music.fadeMusicVolumeIn(3000);
|
if (music.currentsong > -1)
|
||||||
|
{
|
||||||
|
music.fadeMusicVolumeIn(3000);
|
||||||
|
}
|
||||||
graphics.showcutscenebars = false;
|
graphics.showcutscenebars = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -1938,20 +1945,19 @@ void Game::updatestate(void)
|
||||||
if(map.custommodeforreal)
|
if(map.custommodeforreal)
|
||||||
{
|
{
|
||||||
graphics.fademode = 2;
|
graphics.fademode = 2;
|
||||||
if(!muted && ed.levmusic>0) music.fadeMusicVolumeIn(3000);
|
|
||||||
if(ed.levmusic>0) music.fadeout();
|
|
||||||
state=1014;
|
state=1014;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
returntoeditor();
|
returntoeditor();
|
||||||
if(!muted && ed.levmusic>0) music.fadeMusicVolumeIn(3000);
|
|
||||||
if(ed.levmusic>0) music.fadeout();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(!muted && ed.levmusic>0) music.fadeMusicVolumeIn(3000);
|
if (ed.levmusic > 0)
|
||||||
|
{
|
||||||
|
music.fadeMusicVolumeIn(3000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
graphics.showcutscenebars = false;
|
graphics.showcutscenebars = false;
|
||||||
break;
|
break;
|
||||||
|
@ -4001,6 +4007,9 @@ void Game::deletestats(void)
|
||||||
bestlives[i] = -1;
|
bestlives[i] = -1;
|
||||||
bestrank[i] = -1;
|
bestrank[i] = -1;
|
||||||
}
|
}
|
||||||
|
swnrecord = 0;
|
||||||
|
swnbestrank = 0;
|
||||||
|
bestgamedeaths = 0;
|
||||||
#ifndef MAKEANDPLAY
|
#ifndef MAKEANDPLAY
|
||||||
graphics.setflipmode = false;
|
graphics.setflipmode = false;
|
||||||
#endif
|
#endif
|
||||||
|
@ -5853,6 +5862,12 @@ void Game::returnmenu(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* FIXME: Super bad kludge, don't hardcode this! */
|
||||||
|
if (currentmenuname == Menu::ed_music)
|
||||||
|
{
|
||||||
|
music.fadeout();
|
||||||
|
}
|
||||||
|
|
||||||
MenuStackFrame& frame = menustack[menustack.size()-1];
|
MenuStackFrame& frame = menustack[menustack.size()-1];
|
||||||
|
|
||||||
//Store this in case createmenu() removes the stack frame
|
//Store this in case createmenu() removes the stack frame
|
||||||
|
@ -6874,7 +6889,7 @@ void Game::returntoingame(void)
|
||||||
gamestate = MAPMODE;
|
gamestate = MAPMODE;
|
||||||
DEFER_CALLBACK(setflipmode);
|
DEFER_CALLBACK(setflipmode);
|
||||||
DEFER_CALLBACK(setfademode);
|
DEFER_CALLBACK(setfademode);
|
||||||
if (!map.custommode && !graphics.flipmode)
|
if (!map.custommode && !graphics.setflipmode)
|
||||||
{
|
{
|
||||||
obj.flags[73] = true;
|
obj.flags[73] = true;
|
||||||
}
|
}
|
||||||
|
@ -6888,8 +6903,13 @@ void Game::unlockAchievement(const char *name) {
|
||||||
#endif
|
#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;
|
prevgamestate = gamestate;
|
||||||
gamestate = newgamestate;
|
gamestate = newgamestate;
|
||||||
graphics.resumegamemode = false;
|
graphics.resumegamemode = false;
|
||||||
|
@ -6898,10 +6918,6 @@ void Game::mapmenuchange(const int newgamestate)
|
||||||
if (prevgamestate == GAMEMODE)
|
if (prevgamestate == GAMEMODE)
|
||||||
{
|
{
|
||||||
graphics.menuoffset = 240;
|
graphics.menuoffset = 240;
|
||||||
if (map.extrarow)
|
|
||||||
{
|
|
||||||
graphics.menuoffset -= 10;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -245,7 +245,7 @@ public:
|
||||||
int tapleft, tapright;
|
int tapleft, tapright;
|
||||||
|
|
||||||
//Menu interaction stuff
|
//Menu interaction stuff
|
||||||
void mapmenuchange(const int newgamestate);
|
void mapmenuchange(const int newgamestate, const bool user_initiated);
|
||||||
bool mapheld;
|
bool mapheld;
|
||||||
int menupage;
|
int menupage;
|
||||||
int lastsaved;
|
int lastsaved;
|
||||||
|
|
|
@ -2124,7 +2124,7 @@ void gameinput(void)
|
||||||
else if (game.companion == 0)
|
else if (game.companion == 0)
|
||||||
{
|
{
|
||||||
//Alright, normal teleporting
|
//Alright, normal teleporting
|
||||||
game.mapmenuchange(TELEPORTERMODE);
|
game.mapmenuchange(TELEPORTERMODE, true);
|
||||||
|
|
||||||
game.useteleporter = true;
|
game.useteleporter = true;
|
||||||
game.initteleportermode();
|
game.initteleportermode();
|
||||||
|
@ -2279,7 +2279,7 @@ void gameinput(void)
|
||||||
//quitting the super gravitron
|
//quitting the super gravitron
|
||||||
game.mapheld = true;
|
game.mapheld = true;
|
||||||
//Quit menu, same conditions as in game menu
|
//Quit menu, same conditions as in game menu
|
||||||
game.mapmenuchange(MAPMODE);
|
game.mapmenuchange(MAPMODE, true);
|
||||||
game.gamesaved = false;
|
game.gamesaved = false;
|
||||||
game.gamesavefailed = false;
|
game.gamesavefailed = false;
|
||||||
game.menupage = 20; // The Map Page
|
game.menupage = 20; // The Map Page
|
||||||
|
@ -2299,7 +2299,7 @@ void gameinput(void)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//Normal map screen, do transition later
|
//Normal map screen, do transition later
|
||||||
game.mapmenuchange(MAPMODE);
|
game.mapmenuchange(MAPMODE, true);
|
||||||
map.cursordelay = 0;
|
map.cursordelay = 0;
|
||||||
map.cursorstate = 0;
|
map.cursorstate = 0;
|
||||||
game.gamesaved = false;
|
game.gamesaved = false;
|
||||||
|
@ -2320,7 +2320,7 @@ void gameinput(void)
|
||||||
{
|
{
|
||||||
game.mapheld = true;
|
game.mapheld = true;
|
||||||
//Quit menu, same conditions as in game menu
|
//Quit menu, same conditions as in game menu
|
||||||
game.mapmenuchange(MAPMODE);
|
game.mapmenuchange(MAPMODE, true);
|
||||||
game.gamesaved = false;
|
game.gamesaved = false;
|
||||||
game.gamesavefailed = false;
|
game.gamesavefailed = false;
|
||||||
game.menupage = 30; // Pause screen
|
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!
|
game.scmhurt = false; //Just in case the supercrewmate is fucking this up!
|
||||||
if (game.supercrewmate)
|
if (game.supercrewmate)
|
||||||
{
|
{
|
||||||
|
|
|
@ -202,9 +202,6 @@ void musicclass::play(int t)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_doFadeInVol = false;
|
|
||||||
m_doFadeOutVol = false;
|
|
||||||
|
|
||||||
if (currentsong == 0 || currentsong == 7 || (!map.custommode && (currentsong == 0+num_mmmmmm_tracks || currentsong == 7+num_mmmmmm_tracks)))
|
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
|
// Level Complete theme, no fade in or repeat
|
||||||
|
@ -214,6 +211,8 @@ void musicclass::play(int t)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
m_doFadeInVol = false;
|
||||||
|
m_doFadeOutVol = false;
|
||||||
musicVolume = MIX_MAX_VOLUME;
|
musicVolume = MIX_MAX_VOLUME;
|
||||||
Mix_VolumeMusic(musicVolume);
|
Mix_VolumeMusic(musicVolume);
|
||||||
}
|
}
|
||||||
|
@ -242,6 +241,8 @@ void musicclass::play(int t)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
m_doFadeInVol = false;
|
||||||
|
m_doFadeOutVol = false;
|
||||||
fadeMusicVolumeIn(3000);
|
fadeMusicVolumeIn(3000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -280,6 +281,8 @@ void musicclass::haltdasmusik(void)
|
||||||
void musicclass::silencedasmusik(void)
|
void musicclass::silencedasmusik(void)
|
||||||
{
|
{
|
||||||
musicVolume = 0;
|
musicVolume = 0;
|
||||||
|
m_doFadeInVol = false;
|
||||||
|
m_doFadeOutVol = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct FadeState
|
struct FadeState
|
||||||
|
@ -325,6 +328,11 @@ static enum FadeCode processmusicfade(struct FadeState* state, int* volume)
|
||||||
|
|
||||||
void musicclass::fadeMusicVolumeIn(int ms)
|
void musicclass::fadeMusicVolumeIn(int ms)
|
||||||
{
|
{
|
||||||
|
if (halted())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
m_doFadeInVol = true;
|
m_doFadeInVol = true;
|
||||||
m_doFadeOutVol = false;
|
m_doFadeOutVol = false;
|
||||||
|
|
||||||
|
@ -342,6 +350,11 @@ void musicclass::fadeMusicVolumeIn(int ms)
|
||||||
|
|
||||||
void musicclass::fadeMusicVolumeOut(const int fadeout_ms)
|
void musicclass::fadeMusicVolumeOut(const int fadeout_ms)
|
||||||
{
|
{
|
||||||
|
if (halted())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
m_doFadeInVol = false;
|
m_doFadeInVol = false;
|
||||||
m_doFadeOutVol = true;
|
m_doFadeOutVol = true;
|
||||||
|
|
||||||
|
@ -396,7 +409,7 @@ void musicclass::processmusic(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This needs to come after processing fades */
|
/* This needs to come after processing fades */
|
||||||
if (nicefade && Mix_PausedMusic() == 1)
|
if (nicefade && halted())
|
||||||
{
|
{
|
||||||
play(nicechange);
|
play(nicechange);
|
||||||
nicechange = -1;
|
nicechange = -1;
|
||||||
|
@ -522,3 +535,8 @@ void musicclass::resumeef(void)
|
||||||
{
|
{
|
||||||
Mix_Resume(-1);
|
Mix_Resume(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool musicclass::halted(void)
|
||||||
|
{
|
||||||
|
return Mix_PausedMusic() == 1;
|
||||||
|
}
|
||||||
|
|
|
@ -44,6 +44,8 @@ public:
|
||||||
void pauseef(void);
|
void pauseef(void);
|
||||||
void resumeef(void);
|
void resumeef(void);
|
||||||
|
|
||||||
|
bool halted(void);
|
||||||
|
|
||||||
std::vector<SoundTrack> soundTracks;
|
std::vector<SoundTrack> soundTracks;
|
||||||
std::vector<MusicTrack> musicTracks;
|
std::vector<MusicTrack> musicTracks;
|
||||||
SoundSystem soundSystem;
|
SoundSystem soundSystem;
|
||||||
|
|
|
@ -56,7 +56,7 @@ static NetworkBackend backends[NUM_BACKENDS];
|
||||||
|
|
||||||
int NETWORK_init(void)
|
int NETWORK_init(void)
|
||||||
{
|
{
|
||||||
int32_t any = 0;
|
int32_t i, any = 0;
|
||||||
#define ASSIGN_BACKEND(name, index) \
|
#define ASSIGN_BACKEND(name, index) \
|
||||||
backends[index].Init = name##_init; \
|
backends[index].Init = name##_init; \
|
||||||
backends[index].Shutdown = name##_shutdown; \
|
backends[index].Shutdown = name##_shutdown; \
|
||||||
|
@ -72,7 +72,6 @@ int NETWORK_init(void)
|
||||||
#endif
|
#endif
|
||||||
#undef ASSIGN_BACKEND
|
#undef ASSIGN_BACKEND
|
||||||
#if NUM_BACKENDS > 0
|
#if NUM_BACKENDS > 0
|
||||||
int32_t i;
|
|
||||||
for (i = 0; i < NUM_BACKENDS; i += 1)
|
for (i = 0; i < NUM_BACKENDS; i += 1)
|
||||||
{
|
{
|
||||||
backends[i].IsInit = backends[i].Init();
|
backends[i].IsInit = backends[i].Init();
|
||||||
|
|
|
@ -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 - (4*8), 230, "v2.3", tr/2, tg/2, tb/2);
|
graphics.Print( 310 - (6*8), 230, "v2.3.4", 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);
|
||||||
|
|
|
@ -205,13 +205,14 @@ void maprenderfixed(void)
|
||||||
|| !script.running)
|
|| !script.running)
|
||||||
{
|
{
|
||||||
graphics.menuoffset += 25;
|
graphics.menuoffset += 25;
|
||||||
int threshold = map.extrarow ? 230 : 240;
|
int threshold = 240;
|
||||||
if (graphics.menuoffset >= threshold)
|
if (graphics.menuoffset >= threshold)
|
||||||
{
|
{
|
||||||
graphics.menuoffset = threshold;
|
graphics.menuoffset = threshold;
|
||||||
//go back to gamemode!
|
//go back to gamemode!
|
||||||
game.mapheld = true;
|
game.mapheld = true;
|
||||||
game.gamestate = GAMEMODE;
|
game.gamestate = GAMEMODE;
|
||||||
|
graphics.resumegamemode = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -24,7 +24,7 @@ ScreenSettings::ScreenSettings(void)
|
||||||
windowWidth = 320;
|
windowWidth = 320;
|
||||||
windowHeight = 240;
|
windowHeight = 240;
|
||||||
fullscreen = false;
|
fullscreen = false;
|
||||||
useVsync = false;
|
useVsync = true; // Now that uncapped is the default...
|
||||||
stretch = 0;
|
stretch = 0;
|
||||||
linearFilter = false;
|
linearFilter = false;
|
||||||
badSignal = false;
|
badSignal = false;
|
||||||
|
|
|
@ -1349,7 +1349,8 @@ void scriptclass::run(void)
|
||||||
{
|
{
|
||||||
if (words[1] == "teleporter")
|
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
|
game.useteleporter = false; //good heavens don't actually use it
|
||||||
}
|
}
|
||||||
|
|
|
@ -6724,6 +6724,26 @@ void scriptclass::load(const std::string& name)
|
||||||
};
|
};
|
||||||
filllines(lines);
|
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
|
else
|
||||||
{
|
{
|
||||||
loadother(t);
|
loadother(t);
|
||||||
|
|
|
@ -2232,7 +2232,10 @@ bool editorclass::save(std::string& _path)
|
||||||
msg = xml::update_element_delete_contents(data, "levelMetaData");
|
msg = xml::update_element_delete_contents(data, "levelMetaData");
|
||||||
|
|
||||||
int temp_platv[numrooms];
|
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)
|
if (mapwidth < maxwidth)
|
||||||
{
|
{
|
||||||
|
|
|
@ -143,7 +143,7 @@ static const inline struct ImplFunc* get_gamestate_funcs(
|
||||||
FUNC_LIST_END
|
FUNC_LIST_END
|
||||||
|
|
||||||
FUNC_LIST_BEGIN(TELEPORTERMODE)
|
FUNC_LIST_BEGIN(TELEPORTERMODE)
|
||||||
{Func_fixed, maprenderfixed},
|
{Func_fixed, teleporterrenderfixed},
|
||||||
{Func_delta, teleporterrender},
|
{Func_delta, teleporterrender},
|
||||||
{Func_input, teleportermodeinput},
|
{Func_input, teleportermodeinput},
|
||||||
{Func_fixed, maplogic},
|
{Func_fixed, maplogic},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue