summaryrefslogtreecommitdiff
path: root/src/newgrf.cpp
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2007-02-10 13:37:32 +0000
committerbjarni <bjarni@openttd.org>2007-02-10 13:37:32 +0000
commit0c8078ae29c2ac5f03d295aebf273150224cb55e (patch)
tree59906a996e65dbe3ecf41015b0f876d77b68498a /src/newgrf.cpp
parent356e47f1087b56244694a646eb73ee6c9264a229 (diff)
downloadopenttd-0c8078ae29c2ac5f03d295aebf273150224cb55e.tar.xz
(svn r8661) -Fix: [depot windows] Enlarge the blocks in the depot window if a sprite is too big to fit (ships and aircraft only)
-Codechange: depot windows default now makes a 1x1 matrix and resize the window by block size*number of blocks This will make less vehicle type specific code and easier to read resizing based on sprite sizes
Diffstat (limited to 'src/newgrf.cpp')
-rw-r--r--src/newgrf.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index 61723b7fb..de4a9c76f 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -3787,6 +3787,7 @@ void LoadNewGRFFile(GRFConfig *config, uint file_index, GrfLoadingStage stage)
}
}
+void InitDepotWindowBlockSizes(void);
void LoadNewGRF(uint load_index, uint file_index)
{
@@ -3822,6 +3823,9 @@ void LoadNewGRF(uint load_index, uint file_index)
// Pre-calculate all refit masks after loading GRF files
CalculateRefitMasks();
+
+ /* Set the block size in the depot windows based on vehicle sprite sizes */
+ InitDepotWindowBlockSizes();
}