(svn r16666) -Codechange: replace GetHouseSpecs() by HouseSpec::Get(), hide _house_specs[]

This commit is contained in:
smatz
2009-06-26 14:02:27 +00:00
parent af78d6a9bb
commit b668c24d46
7 changed files with 57 additions and 56 deletions

View File

@@ -12,6 +12,7 @@
#include "newgrf_commons.h"
#include "station_map.h"
#include "tree_map.h"
#include "core/mem_func.hpp"
/** Constructor of generic class
* @param offset end of original data for this entity. i.e: houses = 110
@@ -146,11 +147,11 @@ void HouseOverrideManager::SetEntitySpec(const HouseSpec *hs)
return;
}
memcpy(&_house_specs[house_id], hs, sizeof(*hs));
MemCpyT(HouseSpec::Get(house_id), hs);
/* Now add the overrides. */
for (int i = 0; i != max_offset; i++) {
HouseSpec *overridden_hs = GetHouseSpecs(i);
HouseSpec *overridden_hs = HouseSpec::Get(i);
if (entity_overrides[i] != hs->local_id || grfid_overrides[i] != hs->grffile->grfid) continue;