mirror of
https://gitlab.com/drummyfish/anarch.git
synced 2024-11-21 08:25:05 -05:00
Add quick win option
This commit is contained in:
parent
c7b1dd2677
commit
7a34b61d55
21
game.h
21
game.h
@ -3048,11 +3048,25 @@ void SFG_updatePlayerHeight()
|
||||
RCL_CAMERA_COLL_HEIGHT_BELOW;
|
||||
}
|
||||
|
||||
void SFG_winLevel()
|
||||
{
|
||||
SFG_levelEnds();
|
||||
SFG_setGameState(SFG_GAME_STATE_WIN);
|
||||
SFG_playGameSound(2,255);
|
||||
SFG_processEvent(SFG_EVENT_VIBRATE,0);
|
||||
SFG_processEvent(SFG_EVENT_LEVEL_WON,SFG_currentLevel.levelNumber + 1);
|
||||
}
|
||||
|
||||
/**
|
||||
Part of SFG_gameStep() for SFG_GAME_STATE_PLAYING.
|
||||
*/
|
||||
void SFG_gameStepPlaying()
|
||||
{
|
||||
#if SFG_QUICK_WIN
|
||||
if (SFG_game.stateTime > 500)
|
||||
SFG_winLevel();
|
||||
#endif
|
||||
|
||||
if (
|
||||
(SFG_keyIsDown(SFG_KEY_C) && SFG_keyIsDown(SFG_KEY_DOWN)) ||
|
||||
SFG_keyIsDown(SFG_KEY_MENU))
|
||||
@ -3394,12 +3408,7 @@ void SFG_gameStepPlaying()
|
||||
break;
|
||||
|
||||
case SFG_LEVEL_ELEMENT_FINISH:
|
||||
SFG_levelEnds();
|
||||
SFG_setGameState(SFG_GAME_STATE_WIN);
|
||||
SFG_playGameSound(2,255);
|
||||
SFG_processEvent(SFG_EVENT_VIBRATE,0);
|
||||
SFG_processEvent(
|
||||
SFG_EVENT_LEVEL_WON,SFG_currentLevel.levelNumber + 1);
|
||||
SFG_winLevel();
|
||||
eliminate = 0;
|
||||
break;
|
||||
|
||||
|
@ -25,6 +25,7 @@
|
||||
#endif
|
||||
|
||||
// #define SFG_START_LEVEL 1
|
||||
// #define SFG_QUICK_WIN 1
|
||||
#define SFG_IMMORTAL 1
|
||||
// #define SFG_ALL_LEVELS 1
|
||||
// #define SFG_UNLOCK_DOOR 1
|
||||
|
@ -447,6 +447,13 @@
|
||||
#define SFG_IMMORTAL 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
Developer setting, with 1 every level is won immediately after start.
|
||||
*/
|
||||
#ifndef SFG_QUICK_WIN
|
||||
#define SFG_QUICK_WIN 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
Reveals all levels to be played.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user