summaryrefslogtreecommitdiff
path: root/src/newgrf_spritegroup.h
diff options
context:
space:
mode:
authorNiels Martin Hansen <nielsm@indvikleren.dk>2018-07-26 19:29:54 +0200
committerNiels Martin Hansen <nielsm@indvikleren.dk>2018-11-03 21:43:54 +0100
commite66cec8f86357918c58b20bd3cc67330f277a5e1 (patch)
tree1d34c8882bdc3fa2150ebcd06ea5e9ce247cd68a /src/newgrf_spritegroup.h
parent8859381d301a60169e167431c97cb084b7730ead (diff)
downloadopenttd-e66cec8f86357918c58b20bd3cc67330f277a5e1.tar.xz
Add: NewGRF support for 16-in-16-out industries
Diffstat (limited to 'src/newgrf_spritegroup.h')
-rw-r--r--src/newgrf_spritegroup.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/newgrf_spritegroup.h b/src/newgrf_spritegroup.h
index 6adf7c2ac..6f038fd13 100644
--- a/src/newgrf_spritegroup.h
+++ b/src/newgrf_spritegroup.h
@@ -15,6 +15,7 @@
#include "town_type.h"
#include "engine_type.h"
#include "house_type.h"
+#include "industry_type.h"
#include "newgrf_callbacks.h"
#include "newgrf_generic.h"
@@ -277,9 +278,14 @@ struct IndustryProductionSpriteGroup : SpriteGroup {
IndustryProductionSpriteGroup() : SpriteGroup(SGT_INDUSTRY_PRODUCTION) {}
uint8 version;
- int16 subtract_input[3]; // signed
- uint16 add_output[2]; // unsigned
+ uint8 num_input; ///< How many subtract_input values are valid
+ int16 subtract_input[INDUSTRY_NUM_INPUTS]; ///< Take this much of the input cargo (can be negative, is indirect in cb version 1+)
+ CargoID cargo_input[INDUSTRY_NUM_INPUTS]; ///< Which input cargoes to take from (only cb version 2)
+ uint8 num_output; ///< How many add_output values are valid
+ uint16 add_output[INDUSTRY_NUM_OUTPUTS]; ///< Add this much output cargo when successful (unsigned, is indirect in cb version 1+)
+ CargoID cargo_output[INDUSTRY_NUM_OUTPUTS]; ///< Which output cargoes to add to (only cb version 2)
uint8 again;
+
};
/**