Skip to content

Commit

Permalink
Disable auto save on gameover, and disable copy saved game feature.
Browse files Browse the repository at this point in the history
  • Loading branch information
rui-17 committed Jul 19, 2022
1 parent 70f5393 commit acd808a
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 6 deletions.
13 changes: 13 additions & 0 deletions SOURCES/DEFINES.H
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,19 @@

// uncomment this line to go back to DOS file name saving (S0000.LBA), to bypass the DOS truncating issue
//#undef WINDOWS_SAVE

// disable auto saving on game over
#define DISABLE_GAME_OVER_SAVE 1

// uncomment to reenable auto saving on game over
//#undef DISABLE_GAME_OVER_SAVE

// disable copy saved game feature
#define DISABLE_COPY_SAVED_GAME 1

// uncomment to reenable copy saved game feature
//#undef DISABLE_COPY_SAVED_GAME

/*──────────────────────────────────────────────────────────────────────────*/
/*──────────────────────────────────────────────────────────────────────────*/

Expand Down
11 changes: 9 additions & 2 deletions SOURCES/GAMEMENU.C
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,18 @@ UWORD GameVolumeMenu[] = {

UWORD SavedGameMenu[] = {
0, // selected
#ifndef DISABLE_COPY_SAVED_GAME
3, // nb entries
#else
2, // nb entries
#endif
0, // y from top.
0, // .dia num

0, 26, // retour menu prec
#ifndef DISABLE_COPY_SAVED_GAME
0, 41, // copier une sauvegarde
#endif
0, 45 // détruire une sauvegarde

} ;
Expand Down Expand Up @@ -2604,7 +2610,8 @@ void SavedGameManagement()
case 26: // quitter
flag = 1 ;
break ;

// Do not show copy saved game feature any longer, player can pretty much copy save games with Create New Save feature now
#ifndef DISABLE_COPY_SAVED_GAME
case 41: // copier
if( ChoosePlayerName( 41, 1, 0 ) )
{
Expand Down Expand Up @@ -2642,7 +2649,7 @@ void SavedGameManagement()
}
CopyScreen( Screen, Log ) ;
break ;

#endif
case 45: // detruire
if( ChoosePlayerName( 45, 0, 0 ) )
{
Expand Down
8 changes: 4 additions & 4 deletions SOURCES/PERSO.C
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,8 @@ startloop:
}
else // game over
{

// Do not save game when game over is reached any longer
#ifndef DISABLE_GAME_OVER_SAVE
NbFourLeafClover = NbCloverBox / 2 ;
ListObjet[NUM_PERSO].LifePoint = 25 ;
MagicPoint = (MagicLevel*20) / 2 ;
Expand All @@ -1007,12 +1008,11 @@ startloop:
if( GameOverCube != NumCube )
{
NumCube = GameOverCube ;
SceneStartX = SceneStartY = SceneStartZ = -1; // mean use startpos
}

SceneStartX = SceneStartY = SceneStartZ = -1; // mean use startpos (manual save gaming: always use startpos, regardless of GameOverCube being different than NumCube or not, this is to prevent Twinsen spawning in the middle of a cube when loading AUTOSAVE, if Gameover was achieved after loading a manual save)

SaveGame() ;

#endif
GameOver() ;

return 0 ;
Expand Down

0 comments on commit acd808a

Please sign in to comment.