diff options
author | peter1138 <peter1138@openttd.org> | 2006-04-30 18:19:37 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2006-04-30 18:19:37 +0000 |
commit | 771b9fc75b99988de79515dcdee117966b0db9fd (patch) | |
tree | 166fdb088d0242af2b08f51fa7d460622f5dda37 /newgrf_engine.c | |
parent | 8faf1838e6fd61772d4dcd4a5bdd43b417046868 (diff) | |
download | openttd-771b9fc75b99988de79515dcdee117966b0db9fd.tar.xz |
(svn r4629) - NewGRF: constify more code that deals with sprite groups, now that ref counting is gone.
Diffstat (limited to 'newgrf_engine.c')
-rw-r--r-- | newgrf_engine.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/newgrf_engine.c b/newgrf_engine.c index 6065f7ad7..84096f1b2 100644 --- a/newgrf_engine.c +++ b/newgrf_engine.c @@ -18,7 +18,7 @@ typedef struct WagonOverride { byte *train_id; int trains; - SpriteGroup *group; + const SpriteGroup *group; } WagonOverride; typedef struct WagonOverrides { @@ -28,8 +28,7 @@ typedef struct WagonOverrides { static WagonOverrides _engine_wagon_overrides[TOTAL_NUM_ENGINES]; -void SetWagonOverrideSprites(EngineID engine, SpriteGroup *group, byte *train_id, - int trains) +void SetWagonOverrideSprites(EngineID engine, const SpriteGroup *group, byte *train_id, int trains) { WagonOverrides *wos; WagonOverride *wo; @@ -98,10 +97,10 @@ void UnloadWagonOverrides(void) // (It isn't and shouldn't be like this in the GRF files since new cargo types // may appear in future - however it's more convenient to store it like this in // memory. --pasky) -static SpriteGroup *engine_custom_sprites[TOTAL_NUM_ENGINES][NUM_GLOBAL_CID]; +static const SpriteGroup *engine_custom_sprites[TOTAL_NUM_ENGINES][NUM_GLOBAL_CID]; static uint32 _engine_grf[TOTAL_NUM_ENGINES]; -void SetCustomEngineSprites(EngineID engine, byte cargo, SpriteGroup *group) +void SetCustomEngineSprites(EngineID engine, byte cargo, const SpriteGroup *group) { assert(engine < TOTAL_NUM_ENGINES); if (engine_custom_sprites[engine][cargo] != NULL) { |