summaryrefslogtreecommitdiff
path: root/src/newgrf.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/newgrf.cpp')
-rw-r--r--src/newgrf.cpp8
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 {