Skip to content

Commit

Permalink
try to keep backwards compatibility of the savegame for now, ref #61
Browse files Browse the repository at this point in the history
  • Loading branch information
burner1024 committed Jan 10, 2021
1 parent a3c5a4f commit a0cd957
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions scripts_src/generic/ziwoddor.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
#define Lock_Bonus (-20)

#define TIMER_CLOSE (1)
#define LVAR_Locked (0) // for backwards compatibility of savegames

#include "../template/gdoor.ssl"
13 changes: 12 additions & 1 deletion scripts_src/template/gdoor.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,24 @@ procedure Super_Set_Lockpick_Lock;
prepended by LVAR_
*****************************************************************/

// for backwards compatibility of the savegames. Some scripts use LVAR_Locked, other check the state directly.
#ifdef LVAR_Locked
#define LVAR_Trapped (1)
#define LVAR_Found_Trap (2)
#define LVAR_Set_Door_Status (3)
#define LVAR_Explosion_Attempts (4)
#define LVAR_Gave_Locks_XP (5)
#define LVAR_Gave_Traps_XP (6)
#endif

#ifndef LVAR_Locked
#define LVAR_Trapped (0)
#define LVAR_Found_Trap (1)
#define LVAR_Set_Door_Status (2)
#define LVAR_Explosion_Attempts (3)
#define LVAR_Gave_Locks_XP (4)
#define LVAR_Gave_Traps_XP (5)

#endif

/*******************************************************************

Expand Down

0 comments on commit a0cd957

Please sign in to comment.