diff options
author | peter1138 <peter1138@openttd.org> | 2007-03-23 20:55:45 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2007-03-23 20:55:45 +0000 |
commit | 68572f1076de258cc8ec26926d1e87503f6a9aae (patch) | |
tree | e63cd1b8346fd2727f464367928e91ad1aac22ca /src/station_gui.cpp | |
parent | 8353032129970458bfb76c40972e9a575432c6a0 (diff) | |
download | openttd-68572f1076de258cc8ec26926d1e87503f6a9aae.tar.xz |
(svn r9418) -Codechange: Implement actions 1/2/3 for cargos, callback handler and custom icon sprites
Diffstat (limited to 'src/station_gui.cpp')
-rw-r--r-- | src/station_gui.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/station_gui.cpp b/src/station_gui.cpp index bb26460b4..6188130a0 100644 --- a/src/station_gui.cpp +++ b/src/station_gui.cpp @@ -674,7 +674,16 @@ static void DrawCargoIcons(CargoID i, uint waiting, int x, int y) if (num == 0) return; const CargoSpec *cs = GetCargo(i); - SpriteID sprite = cs->sprite; + SpriteID sprite; + + if (cs->sprite == 0xFFFF) { + /* A value of 0xFFFF indicates we should draw a custom icon */ + sprite = GetCustomCargoSprite(cs); + } else { + sprite = cs->sprite; + } + + if (sprite == 0) return; do { DrawSprite(sprite, PAL_NONE, x, y); |