(svn r16909) -Fix [FS#2996]: NewGRF stations would be triggering assertions all over the place when using the more advanced station types.

-Change: make (rail) waypoints sub classes of 'base stations', make buoys waypoints and unify code between them where possible.
This commit is contained in:
rubidium
2009-07-22 08:59:57 +00:00
parent 2646a99d29
commit 68ead6b84f
40 changed files with 689 additions and 693 deletions

View File

@@ -41,7 +41,7 @@
#include "saveload_internal.h"
extern const uint16 SAVEGAME_VERSION = 122;
extern const uint16 SAVEGAME_VERSION = 123;
SavegameType _savegame_type; ///< type of savegame we are loading
@@ -873,6 +873,7 @@ size_t SlCalcObjMemberLength(const void *object, const SaveLoad *sld)
break;
case SL_WRITEBYTE: return 1; // a byte is logically of size 1
case SL_VEH_INCLUDE: return SlCalcObjLength(object, GetVehicleDescription(VEH_END));
case SL_ST_INCLUDE: return SlCalcObjLength(object, GetBaseStationDescription());
default: NOT_REACHED();
}
return 0;
@@ -934,6 +935,10 @@ bool SlObjectMember(void *ptr, const SaveLoad *sld)
SlObject(ptr, GetVehicleDescription(VEH_END));
break;
case SL_ST_INCLUDE:
SlObject(ptr, GetBaseStationDescription());
break;
default: NOT_REACHED();
}
return true;