(svn r662) [newgrf] Moved grfspecial.c to newgrf.c/newgrf.h

This commit is contained in:
dominik 2004-11-17 18:49:55 +00:00
parent 0f24c74b14
commit 4612dcdb48
7 changed files with 8 additions and 36 deletions

View File

@ -13,7 +13,7 @@ CFILES = ai.c aircraft_cmd.c aircraft_gui.c airport_gui.c
train_cmd.c train_gui.c tree_cmd.c ttd.c
tunnelbridge_cmd.c unmovable_cmd.c vehicle.c
viewport.c water_cmd.c widget.c window.c screenshot.c
airport.c grfspecial.c terraform_gui.c sprite.c ;
airport.c newgrf.c terraform_gui.c sprite.c ;
LANGFILES = english.txt swedish.txt french.txt german.txt italian.txt slovak.txt hungarian.txt norwegian.txt danish.txt czech.txt galician.txt polish.txt romanian.txt;

View File

@ -516,7 +516,7 @@ C_SOURCES = \
ai.c ai_build.c ai_new.c ai_pathfinder.c ai_shared.c aircraft_cmd.c \
aircraft_gui.c airport.c airport_gui.c aystar.c bridge_gui.c \
clear_cmd.c command.c console.c console_cmds.c disaster_cmd.c dock_gui.c dummy_land.c economy.c \
engine.c engine_gui.c fileio.c gfx.c graph_gui.c grfspecial.c \
engine.c engine_gui.c fileio.c gfx.c graph_gui.c newgrf.c \
industry_cmd.c industry_gui.c intro_gui.c landscape.c main_gui.c \
minilzo.c misc.c misc_cmd.c misc_gui.c music_gui.c namegen.c network.c \
network_gui.c news_gui.c oldloader.c order_cmd.c order_gui.c \

View File

@ -8,6 +8,7 @@
#include "engine.h"
#include "station.h"
#include "sprite.h"
#include "newgrf.h"
/* TTDPatch extended GRF format codec
* (c) Petr Baudis 2004 (GPL'd)
@ -23,36 +24,7 @@ extern int _replace_sprites_count[16];
extern int _replace_sprites_offset[16];
extern int _traininfo_vehicle_pitch;
struct GRFFile {
char *filename;
uint32 grfid;
uint16 flags;
uint16 sprite_offset;
struct GRFFile *next;
/* A sprite group contains all sprites of a given vehicle (or multiple
* vehicles) when carrying given cargo. It consists of several sprite
* sets. Group ids are refered as "cargo id"s by TTDPatch
* documentation, contributing to the global confusion.
*
* A sprite set contains all sprites of a given vehicle carrying given
* cargo at a given *stage* - that is usually its load stage. Ie. you
* can have a spriteset for an empty wagon, wagon full of coal,
* half-filled wagon etc. Each spriteset contains eight sprites (one
* per direction) or four sprites if the vehicle is symmetric. */
int spriteset_start;
int spriteset_numsets;
int spriteset_numents;
int spriteset_feature;
int spritegroups_count;
struct SpriteGroup *spritegroups;
struct StationSpec stations[256];
};
static struct GRFFile *_cur_grffile, *_first_grffile;
static struct GRFFile *_cur_grffile;
static int _cur_spriteid;
static int _cur_stage;
extern int _custom_sprites_base;

View File

@ -13,7 +13,7 @@
//#define WANT_LOCKED
/* These are used in grfspecial.c: */
/* These are used in newgrf.c: */
int _skip_sprites = 0;
int _replace_sprites_count[16];

View File

@ -1122,7 +1122,7 @@ uint32 GetCustomStationRelocation(struct StationSpec *spec, struct Station *stat
error("Custom station 0x%08x::0x%02x has no sprites associated.",
spec->grfid, spec->localidx);
/* This is what gets subscribed of dtss->image in grfspecial.c,
/* This is what gets subscribed of dtss->image in newgrf.c,
* so it's probably kinda "default offset". Try to use it as
* emergency measure. */
return 0x42D;

View File

@ -212,7 +212,7 @@ SOURCE=.\gfx.c
# End Source File
# Begin Source File
SOURCE=.\grfspecial.c
SOURCE=.\newgrf.c
# End Source File
# Begin Source File

View File

@ -419,7 +419,7 @@
</FileConfiguration>
</File>
<File
RelativePath=".\grfspecial.c">
RelativePath=".\newgrf.c">
</File>
<File
RelativePath="landscape.c">