src/newgrf_spritegroup.h
branchnoai
changeset 9631 8a2d1c2ceb88
parent 9628 b5c2449616b5
child 7703 bc4b879b7324
--- a/src/newgrf_spritegroup.h	Wed Jun 27 01:01:16 2007 +0000
+++ b/src/newgrf_spritegroup.h	Sat Jul 07 09:20:52 2007 +0000
@@ -8,6 +8,19 @@
 #include "town.h"
 #include "industry.h"
 
+/**
+ * Gets the value of a so-called newgrf "register".
+ * @param i index of the register
+ * @pre i < 0x110
+ * @return the value of the register
+ */
+static inline uint32 GetRegister(uint i)
+{
+	assert(i < 0x110);
+	extern uint32 _temp_store[0x110];
+	return _temp_store[i];
+}
+
 struct SpriteGroup;
 
 
@@ -135,6 +148,13 @@
 	struct DrawTileSprites *dts;
 };
 
+struct IndustryProductionSpriteGroup {
+	uint8 version;
+	uint16 substract_input[3];
+	uint16 add_output[2];
+	uint8 again;
+};
+
 /* List of different sprite group types */
 enum SpriteGroupType {
 	SGT_INVALID,
@@ -144,6 +164,7 @@
 	SGT_CALLBACK,
 	SGT_RESULT,
 	SGT_TILELAYOUT,
+	SGT_INDUSTRY_PRODUCTION,
 };
 
 /* Common wrapper for all the different sprite group types */
@@ -157,6 +178,7 @@
 		CallbackResultSpriteGroup callback;
 		ResultSpriteGroup result;
 		TileLayoutSpriteGroup layout;
+		IndustryProductionSpriteGroup indprod;
 	} g;
 };