/** @file src/saveload/house.c Load/save routines for House. */ #include <stdio.h> #include "types.h" #include "saveload.h" #include "../object.h" const SaveLoadDesc g_saveObject[] = { SLD_ENTRY (Object, SLDT_UINT16, index), SLD_ENTRY (Object, SLDT_UINT8, type), SLD_ENTRY (Object, SLDT_UINT8, linkedID), SLD_ENTRY (Object, SLDT_UINT32, flags), SLD_ENTRY (Object, SLDT_UINT8, houseID), SLD_ENTRY (Object, SLDT_UINT8, seenByHouses), SLD_ENTRY (Object, SLDT_UINT32, position), SLD_ENTRY (Object, SLDT_UINT16, hitpoints), SLD_SLD (Object, script, g_saveScriptEngine), SLD_END };
/** @file src/saveload/structure.c Load/save routines for Structure. */ #include <stdio.h> #include <string.h> #include "types.h" #include "saveload.h" #include "../house.h" #include "../structure.h" #include "../pool/structure.h" #include "../pool/pool.h" static const SaveLoadDesc s_saveStructure[] = { SLD_SLD (Structure, o, g_saveObject), SLD_ENTRY (Structure, SLDT_UINT16, creatorHouseID), SLD_ENTRY (Structure, SLDT_UINT16, rotationSpriteDiff), SLD_EMPTY ( SLDT_UINT8), SLD_ENTRY (Structure, SLDT_UINT16, objectType), SLD_ENTRY (Structure, SLDT_UINT8, upgradeLevel), SLD_ENTRY (Structure, SLDT_UINT8, upgradeTimeLeft), SLD_ENTRY (Structure, SLDT_UINT16, countDown), SLD_ENTRY (Structure, SLDT_UINT16, buildCostRemainder), SLD_ENTRY (Structure, SLDT_INT16, state), SLD_ENTRY (Structure, SLDT_UINT16, hitpointsMax), SLD_END }; /** * Load all Structures from a file. * @param fp The file to load from. * @param length The length of the data chunk.