mirror of https://github.com/OpenTTD/OpenTTD
(svn r4917) - NewGRF: remove _custom_sprites_base, now used only to rejig vehicle images from ttd games, as we redetermine all vehicle images after game load anyway.
parent
dc1408097f
commit
910aa90bd3
2
newgrf.c
2
newgrf.c
|
@ -36,7 +36,6 @@
|
||||||
* served as subject to the initial testing of this codec. */
|
* served as subject to the initial testing of this codec. */
|
||||||
|
|
||||||
|
|
||||||
uint16 _custom_sprites_base;
|
|
||||||
static int _skip_sprites; // XXX
|
static int _skip_sprites; // XXX
|
||||||
static uint _file_index; // XXX
|
static uint _file_index; // XXX
|
||||||
SpriteID _signal_base = 0;
|
SpriteID _signal_base = 0;
|
||||||
|
@ -2902,7 +2901,6 @@ void LoadNewGRF(uint load_index, uint file_index)
|
||||||
/* Load newgrf sprites
|
/* Load newgrf sprites
|
||||||
* in each loading stage, (try to) open each file specified in the config
|
* in each loading stage, (try to) open each file specified in the config
|
||||||
* and load information from it. */
|
* and load information from it. */
|
||||||
_custom_sprites_base = load_index;
|
|
||||||
for (stage = 0; stage <= 2; stage++) {
|
for (stage = 0; stage <= 2; stage++) {
|
||||||
uint slot = file_index;
|
uint slot = file_index;
|
||||||
GRFConfig *c;
|
GRFConfig *c;
|
||||||
|
|
|
@ -392,7 +392,6 @@ static void FixOldVehicles(void)
|
||||||
|
|
||||||
extern TileIndex _animated_tile_list[256];
|
extern TileIndex _animated_tile_list[256];
|
||||||
extern char _name_array[512][32];
|
extern char _name_array[512][32];
|
||||||
extern uint16 _custom_sprites_base;
|
|
||||||
|
|
||||||
static byte _old_vehicle_multiplier;
|
static byte _old_vehicle_multiplier;
|
||||||
static uint8 _old_map3[OLD_MAP_SIZE * 2];
|
static uint8 _old_map3[OLD_MAP_SIZE * 2];
|
||||||
|
@ -1219,9 +1218,6 @@ static bool LoadOldVehicle(LoadgameState *ls, int num)
|
||||||
v->orders = GetOrder(REMAP_ORDER_IDX(_old_order_ptr));
|
v->orders = GetOrder(REMAP_ORDER_IDX(_old_order_ptr));
|
||||||
}
|
}
|
||||||
AssignOrder(&v->current_order, UnpackOldOrder(_old_order));
|
AssignOrder(&v->current_order, UnpackOldOrder(_old_order));
|
||||||
/* TTDPatch maps sprites from 0x2000 up. */
|
|
||||||
if (v->cur_image >= 0x2000)
|
|
||||||
v->cur_image -= 0x2000 - _custom_sprites_base;
|
|
||||||
|
|
||||||
/* For some reason we need to correct for this */
|
/* For some reason we need to correct for this */
|
||||||
switch (v->spritenum) {
|
switch (v->spritenum) {
|
||||||
|
|
Loading…
Reference in New Issue