Remove some hard coded numbers

This commit is contained in:
Michael Steenbeek 2018-03-08 12:45:38 +01:00
parent 87bdd4d079
commit 7a982503a8
2 changed files with 3 additions and 3 deletions

View File

@ -1442,7 +1442,7 @@ static bool sub_679074(rct_drawpixelinfo *dpi, sint32 imageId, sint16 x, sint16
static bool sub_679023(rct_drawpixelinfo *dpi, sint32 imageId, sint32 x, sint32 y) static bool sub_679023(rct_drawpixelinfo *dpi, sint32 imageId, sint32 x, sint32 y)
{ {
const uint8 * palette = nullptr; const uint8 * palette = nullptr;
imageId &= 0xBFFFFFFF; imageId &= ~IMAGE_TYPE_TRANSPARENT;
if (imageId & IMAGE_TYPE_REMAP) { if (imageId & IMAGE_TYPE_REMAP) {
_currentImageType = IMAGE_TYPE_REMAP; _currentImageType = IMAGE_TYPE_REMAP;
sint32 index = (imageId >> 19) & 0x7F; sint32 index = (imageId >> 19) & 0x7F;

View File

@ -848,7 +848,7 @@ bool track_paint_util_draw_station_covers_2(paint_session * session, enum edge_t
if (baseImageId & IMAGE_TYPE_TRANSPARENT) if (baseImageId & IMAGE_TYPE_TRANSPARENT)
{ {
imageId = (baseImageId & 0xBFFFFFFF) + imageOffset; imageId = (baseImageId & ~IMAGE_TYPE_TRANSPARENT) + imageOffset;
sub_98197C( sub_98197C(
session, imageId, (sint8)offset.x, (sint8)offset.y, bounds.x, bounds.y, (sint8)bounds.z, offset.z, boundsOffset.x, session, imageId, (sint8)offset.x, (sint8)offset.y, bounds.x, bounds.y, (sint8)bounds.z, offset.z, boundsOffset.x,
boundsOffset.y, boundsOffset.z); boundsOffset.y, boundsOffset.z);
@ -856,7 +856,7 @@ bool track_paint_util_draw_station_covers_2(paint_session * session, enum edge_t
uint32 edi = session->TrackColours[SCHEME_TRACK] & (0b11111 << 19); uint32 edi = session->TrackColours[SCHEME_TRACK] & (0b11111 << 19);
// weird jump // weird jump
imageId = (baseImageId | edi) + 0x3800000 + imageOffset + 12; imageId = (baseImageId | edi) + ((1 << 23) | (1 << 24) | (1 << 25)) + imageOffset + 12;
sub_98199C( sub_98199C(
session, imageId, (sint8)offset.x, (sint8)offset.y, bounds.x, bounds.y, (sint8)bounds.z, offset.z, boundsOffset.x, session, imageId, (sint8)offset.x, (sint8)offset.y, bounds.x, bounds.y, (sint8)bounds.z, offset.z, boundsOffset.x,
boundsOffset.y, boundsOffset.z); boundsOffset.y, boundsOffset.z);