diff src/industry.h @ 7610:b5bdd89a6aa2 draft

(svn r11139) -Codechange: add support for persistent storage for NewGRFs.
author rubidium <rubidium@openttd.org>
date Sat, 22 Sep 2007 13:56:38 +0000
parents d36c95230702
children 804a2d831b36
line wrap: on
line diff
--- a/src/industry.h
+++ b/src/industry.h
@@ -7,6 +7,7 @@
 
 #include "oldpool.h"
 #include "helpers.hpp"
+#include "newgrf_storage.h"
 
 typedef byte IndustryGfx;
 typedef uint8 IndustryType;
@@ -94,6 +95,8 @@
  * Defines the internal data of a functionnal industry
  */
 struct Industry : PoolItem<Industry, IndustryID, &_Industry_pool> {
+	typedef PersistentStorageArray<uint32, 16> PersistentStorage;
+
 	TileIndex xy;                       ///< coordinates of the primary tile the industry is built one
 	byte width;
 	byte height;
@@ -121,6 +124,8 @@
 	Date last_cargo_accepted_at;        ///< Last day cargo was accepted by this industry
 	byte selected_layout;               ///< Which tile layout was used when creating the industry
 
+	PersistentStorage psa;              ///< Persistent storage for NewGRF industries.
+
 	Industry(TileIndex tile = 0) : xy(tile) {}
 	~Industry();