diff options
author | frosch <frosch@openttd.org> | 2009-11-07 22:47:54 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2009-11-07 22:47:54 +0000 |
commit | ba1fc280e3b0c13baedc2ef54dabb2deec41c818 (patch) | |
tree | f8f51f5d18355d9205052bad2e90e068e9bfacb6 /src/newgrf.cpp | |
parent | 7984d90c40f4d55cad9f34d0acac27beb701a63a (diff) | |
download | openttd-ba1fc280e3b0c13baedc2ef54dabb2deec41c818.tar.xz |
(svn r18005) -Codechange: Convert the Prices struct into an array and an enum.
Diffstat (limited to 'src/newgrf.cpp')
-rw-r--r-- | src/newgrf.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 7c35388c8..21412ef95 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -418,17 +418,17 @@ static void MapSpriteMappingRecolour(PalSpriteID *grf_sprite) } /** - * Converts TTD(P) Base Price pointers into the index used by OTTD + * Converts TTD(P) Base Price pointers into the enum used by OTTD * See http://wiki.ttdpatch.net/tiki-index.php?page=BaseCosts * @param base_pointer TTD(P) Base Price Pointer * @param error_location Function name for grf error messages * @param index If #base_pointer is valid, #index is assigned to the matching price; else it is left unchanged */ -static void ConvertTTDBasePrice(uint32 base_pointer, const char *error_location, byte *index) +static void ConvertTTDBasePrice(uint32 base_pointer, const char *error_location, Price *index) { /* Special value for 'none' */ if (base_pointer == 0) { - *index = 0xFF; + *index = INVALID_PRICE; return; } @@ -440,7 +440,7 @@ static void ConvertTTDBasePrice(uint32 base_pointer, const char *error_location, return; } - *index = (base_pointer - start) / size; + *index = (Price)((base_pointer - start) / size); } enum ChangeInfoResult { |