Add: NewGRF support for 16-in-16-out industries

This commit is contained in:
Niels Martin Hansen
2018-07-26 19:29:54 +02:00
parent 8859381d30
commit e66cec8f86
14 changed files with 392 additions and 75 deletions

View File

@@ -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;
};
/**