diff options
author | rubidium <rubidium@openttd.org> | 2007-10-20 20:06:55 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-10-20 20:06:55 +0000 |
commit | 5718567d1ee860ca01fc927ca3cbb1c8c37d84d0 (patch) | |
tree | 5d2ab777da0af72af2a6805d4bac7c1927e89b34 /src/gfxinit.cpp | |
parent | 4e32964c18084280162d609bbda71eb3d53f0a38 (diff) | |
download | openttd-5718567d1ee860ca01fc927ca3cbb1c8c37d84d0.tar.xz |
(svn r11316) -Codechange: add support for the half-tile (selection) graphics.
Diffstat (limited to 'src/gfxinit.cpp')
-rw-r--r-- | src/gfxinit.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/gfxinit.cpp b/src/gfxinit.cpp index cba9c5461..f5263aad4 100644 --- a/src/gfxinit.cpp +++ b/src/gfxinit.cpp @@ -28,11 +28,6 @@ struct FileList { MD5File landscape[3]; ///< landscape specific grf files }; -enum { - SKIP = 0xFFFE, - END = 0xFFFF -}; - #include "table/files.h" #include "table/landscape_sprite.h" @@ -49,6 +44,13 @@ static const SpriteID * const _slopes_spriteindexes[] = { _slopes_spriteindexes_3, }; +static const SpriteID * const _halftile_foundation_spriteindexes[] = { + _halftile_foundation_spriteindexes_0, + _halftile_foundation_spriteindexes_1, + _halftile_foundation_spriteindexes_2, + _halftile_foundation_spriteindexes_3, +}; + static uint LoadGrfFile(const char* filename, uint load_index, int file_index) { @@ -386,6 +388,12 @@ static void LoadSpriteTables() load_index++; // SPR_EMPTY_BOUNDING_BOX + assert(load_index == SPR_HALFTILE_FOUNDATION_BASE); + LoadGrfIndexed("halffndw.grf", _halftile_foundation_spriteindexes[_opt.landscape], i++); + + load_index = SPR_HALFTILE_SELECTION_BASE; + load_index += LoadGrfFile("halfselw.grf", load_index, i++); + assert(load_index == SPR_FLAGS_BASE); load_index += LoadGrfFile("flags.grf", load_index, i++); |