mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r662) [newgrf] Moved grfspecial.c to newgrf.c/newgrf.h
This commit is contained in:
parent
0f24c74b14
commit
4612dcdb48
|
@ -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
|
train_cmd.c train_gui.c tree_cmd.c ttd.c
|
||||||
tunnelbridge_cmd.c unmovable_cmd.c vehicle.c
|
tunnelbridge_cmd.c unmovable_cmd.c vehicle.c
|
||||||
viewport.c water_cmd.c widget.c window.c screenshot.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;
|
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;
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -516,7 +516,7 @@ C_SOURCES = \
|
||||||
ai.c ai_build.c ai_new.c ai_pathfinder.c ai_shared.c aircraft_cmd.c \
|
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 \
|
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 \
|
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 \
|
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 \
|
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 \
|
network_gui.c news_gui.c oldloader.c order_cmd.c order_gui.c \
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
#include "station.h"
|
#include "station.h"
|
||||||
#include "sprite.h"
|
#include "sprite.h"
|
||||||
|
#include "newgrf.h"
|
||||||
|
|
||||||
/* TTDPatch extended GRF format codec
|
/* TTDPatch extended GRF format codec
|
||||||
* (c) Petr Baudis 2004 (GPL'd)
|
* (c) Petr Baudis 2004 (GPL'd)
|
||||||
|
@ -23,36 +24,7 @@ extern int _replace_sprites_count[16];
|
||||||
extern int _replace_sprites_offset[16];
|
extern int _replace_sprites_offset[16];
|
||||||
extern int _traininfo_vehicle_pitch;
|
extern int _traininfo_vehicle_pitch;
|
||||||
|
|
||||||
struct GRFFile {
|
static struct GRFFile *_cur_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 int _cur_spriteid;
|
static int _cur_spriteid;
|
||||||
static int _cur_stage;
|
static int _cur_stage;
|
||||||
extern int _custom_sprites_base;
|
extern int _custom_sprites_base;
|
|
@ -13,7 +13,7 @@
|
||||||
//#define WANT_LOCKED
|
//#define WANT_LOCKED
|
||||||
|
|
||||||
|
|
||||||
/* These are used in grfspecial.c: */
|
/* These are used in newgrf.c: */
|
||||||
|
|
||||||
int _skip_sprites = 0;
|
int _skip_sprites = 0;
|
||||||
int _replace_sprites_count[16];
|
int _replace_sprites_count[16];
|
||||||
|
|
|
@ -1122,7 +1122,7 @@ uint32 GetCustomStationRelocation(struct StationSpec *spec, struct Station *stat
|
||||||
|
|
||||||
error("Custom station 0x%08x::0x%02x has no sprites associated.",
|
error("Custom station 0x%08x::0x%02x has no sprites associated.",
|
||||||
spec->grfid, spec->localidx);
|
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
|
* so it's probably kinda "default offset". Try to use it as
|
||||||
* emergency measure. */
|
* emergency measure. */
|
||||||
return 0x42D;
|
return 0x42D;
|
||||||
|
|
2
ttd.dsp
2
ttd.dsp
|
@ -212,7 +212,7 @@ SOURCE=.\gfx.c
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\grfspecial.c
|
SOURCE=.\newgrf.c
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
|
|
@ -419,7 +419,7 @@
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\grfspecial.c">
|
RelativePath=".\newgrf.c">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="landscape.c">
|
RelativePath="landscape.c">
|
||||||
|
|
Loading…
Reference in New Issue