grfspecial.c
changeset 399 b156fa8bcd63
parent 398 160e40c179fd
child 400 ad545734c8de
equal deleted inserted replaced
398:160e40c179fd 399:b156fa8bcd63
    18  * served as subject to the initial testing of this codec. */
    18  * served as subject to the initial testing of this codec. */
    19 
    19 
    20 extern int _skip_sprites;
    20 extern int _skip_sprites;
    21 extern int _replace_sprites_count[16];
    21 extern int _replace_sprites_count[16];
    22 extern int _replace_sprites_offset[16];
    22 extern int _replace_sprites_offset[16];
    23 
       
    24 struct StationSpec {
       
    25 	uint32 classid;
       
    26 	byte tiles;
       
    27 	DrawTileSprites renderdata[8];
       
    28 };
       
    29 
    23 
    30 struct GRFFile {
    24 struct GRFFile {
    31 	char *filename;
    25 	char *filename;
    32 	uint32 grfid;
    26 	uint32 grfid;
    33 	uint16 flags;
    27 	uint16 flags;
  1223 
  1217 
  1224 				foreach_draw_tile_seq(seq, (DrawTileSeqStruct*) stat->renderdata[j].seq) {
  1218 				foreach_draw_tile_seq(seq, (DrawTileSeqStruct*) stat->renderdata[j].seq) {
  1225 					seq->image += _cur_grffile->spritegroups[groupid].loading[0];
  1219 					seq->image += _cur_grffile->spritegroups[groupid].loading[0];
  1226 				}
  1220 				}
  1227 			}
  1221 			}
  1228 			/* FIXME: This means several GRF files defining new stations
  1222 			SetCustomStation(stid, stat);
  1229 			 * will override each other, but the stid should be GRF-specific
       
  1230 			 * instead! --pasky */
       
  1231 			SetCustomStation(stat->classid, stid, stat->renderdata, stat->tiles);
       
  1232 			stat->classid = 0;
  1223 			stat->classid = 0;
  1233 		}
  1224 		}
  1234 		return;
  1225 		return;
  1235 	}
  1226 	}
  1236 
  1227