(svn r3625) - Move sl_version inside the functions where they are used to force usage.

This commit is contained in:
Darkvater
2006-02-20 19:12:46 +00:00
parent f579e2ee83
commit 891af38b49

View File

@@ -53,10 +53,6 @@ typedef enum SLRefType {
#define SL_MAX_VERSION 255 #define SL_MAX_VERSION 255
extern uint16 _sl_version; /// the major savegame version identifier
extern byte _sl_minor_version; /// the minor savegame version, DO NOT USE!
enum { enum {
INC_VEHICLE_COMMON = 0, INC_VEHICLE_COMMON = 0,
}; };
@@ -172,6 +168,8 @@ typedef struct SaveLoad {
*/ */
static inline bool CheckSavegameVersionOldStyle(uint16 major, byte minor) static inline bool CheckSavegameVersionOldStyle(uint16 major, byte minor)
{ {
extern uint16 _sl_version;
extern byte _sl_minor_version;
return (_sl_version < major) || (_sl_version == major && _sl_minor_version < minor); return (_sl_version < major) || (_sl_version == major && _sl_minor_version < minor);
} }
@@ -179,6 +177,7 @@ static inline bool CheckSavegameVersionOldStyle(uint16 major, byte minor)
*/ */
static inline bool CheckSavegameVersion(uint16 version) static inline bool CheckSavegameVersion(uint16 version)
{ {
extern uint16 _sl_version;
return _sl_version < version; return _sl_version < version;
} }