summaryrefslogtreecommitdiff
path: root/src/newgrf.cpp
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2007-05-15 21:36:58 +0000
committerbelugas <belugas@openttd.org>2007-05-15 21:36:58 +0000
commit3fb4003534dd66e7909568069e117438f88638b8 (patch)
tree70f568a4e7749c7071ef405f07b8f2998266f606 /src/newgrf.cpp
parentd2776ccde91e64b0402af22b512a8f6677fca86e (diff)
downloadopenttd-3fb4003534dd66e7909568069e117438f88638b8.tar.xz
(svn r9850) -Codechange: Introduction of the Override/Substitute manager. Currently only used for newhouses.
Basically, it is more a gathering of IDs from grf files and ingame data.
Diffstat (limited to 'src/newgrf.cpp')
-rw-r--r--src/newgrf.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index d2e2c21e8..3dc46fcbf 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -40,6 +40,7 @@
#include "cargotype.h"
#include "industry.h"
#include "newgrf_canal.h"
+#include "newgrf_commons.h"
/* TTDPatch extended GRF format codec
* (c) Petr Baudis 2004 (GPL'd)
@@ -1246,7 +1247,7 @@ static bool TownHouseChangeInfo(uint hid, int numinfo, int prop, byte **bufp, in
_cur_grffile->housespec = CallocT<HouseSpec*>(HOUSE_MAX);
/* Reset any overrides that have been set. */
- ResetHouseOverrides();
+ _house_mngr.ResetOverride();
}
housespec = &_cur_grffile->housespec[hid];
@@ -1372,7 +1373,7 @@ static bool TownHouseChangeInfo(uint hid, int numinfo, int prop, byte **bufp, in
return false;
}
- AddHouseOverride(hid, override);
+ _house_mngr.Add(hid, override);
}
break;
@@ -4591,7 +4592,7 @@ static void FinaliseHouseArray()
for (int i = 0; i < HOUSE_MAX; i++) {
HouseSpec *hs = file->housespec[i];
if (hs != NULL) {
- SetHouseSpec(hs);
+ _house_mngr.SetEntitySpec(hs);
if (hs->min_date < 1930) reset_dates = false;
}
}