# HG changeset patch # User glx # Date 2007-05-05 23:21:49 # Node ID a506578448c92e805e3fe91f3e12f3776378858f # Parent 74c76316bd96e5c1ede2075172587bc3972567dd (svn r9791) -Fix (r9779, FS#766): add TownLayoutByte to correctly save town layout value diff --git a/src/openttd.h b/src/openttd.h --- a/src/openttd.h +++ b/src/openttd.h @@ -212,6 +212,11 @@ enum TownLayout { NUM_TLS, ///< Number of town layouts }; +/* It needs to be 8bits, because we save and load it as such */ +/** Define basic enum properties */ +template <> struct EnumPropsT : MakeEnumPropsT {}; +typedef TinyEnumT TownLayoutByte; //typedefing-enumification of TownLayout + enum { NUM_PRICES = 49, }; diff --git a/src/variables.h b/src/variables.h --- a/src/variables.h +++ b/src/variables.h @@ -232,7 +232,7 @@ struct Patches { bool pause_on_newgame; ///< Whether to start new games paused or not. - TownLayout town_layout; ///< Select town layout + TownLayoutByte town_layout; ///< Select town layout }; VARDEF Patches _patches;