diff --git a/src/object.cc b/src/object.cc index b4f18f0..4df1512 100644 --- a/src/object.cc +++ b/src/object.cc @@ -1481,11 +1481,11 @@ int objectSetLocation(Object* obj, int tile, int elevation, Rect* rect) if (isEmpty != _obj_last_is_empty || (((currentSquare >> 16) & 0xF000) >> 12) != (((previousSquare >> 16) & 0xF000) >> 12)) { if (!_obj_last_is_empty) { - _tile_fill_roof(_obj_last_roof_x, _obj_last_roof_y, elevation, 1); + tile_fill_roof(_obj_last_roof_x, _obj_last_roof_y, elevation, true); } if (!isEmpty) { - _tile_fill_roof(roofX, roofY, elevation, 0); + tile_fill_roof(roofX, roofY, elevation, false); } if (rect != NULL) { @@ -1528,7 +1528,7 @@ int _obj_reset_roof() { int fid = buildFid(OBJ_TYPE_TILE, (_square[gDude->elevation]->field_0[_obj_last_roof_x + 100 * _obj_last_roof_y] >> 16) & 0xFFF, 0, 0, 0); if (fid != buildFid(OBJ_TYPE_TILE, 1, 0, 0, 0)) { - _tile_fill_roof(_obj_last_roof_x, _obj_last_roof_y, gDude->elevation, 1); + tile_fill_roof(_obj_last_roof_x, _obj_last_roof_y, gDude->elevation, 1); } return 0; } diff --git a/src/tile.cc b/src/tile.cc index e3165a6..4d247f8 100644 --- a/src/tile.cc +++ b/src/tile.cc @@ -1266,12 +1266,12 @@ static void roof_fill_on(int x, int y, int elevation) } // 0x4B23D4 -void _tile_fill_roof(int a1, int a2, int elevation, int a4) +void tile_fill_roof(int x, int y, int elevation, bool on) { - if (a4) { - roof_fill_on(a1, a2, elevation); + if (on) { + roof_fill_on(x, y, elevation); } else { - roof_fill_off(a1, a2, elevation); + roof_fill_off(x, y, elevation); } } diff --git a/src/tile.h b/src/tile.h index 54f20a0..398e777 100644 --- a/src/tile.h +++ b/src/tile.h @@ -48,7 +48,7 @@ int squareTileFromScreenXY(int screenX, int screenY, int elevation); void squareTileScreenToCoord(int screenX, int screenY, int elevation, int* coordX, int* coordY); void squareTileScreenToCoordRoof(int screenX, int screenY, int elevation, int* coordX, int* coordY); void tileRenderRoofsInRect(Rect* rect, int elevation); -void _tile_fill_roof(int x, int y, int elevation, int a4); +void tile_fill_roof(int x, int y, int elevation, bool on); void tileRenderFloorsInRect(Rect* rect, int elevation); bool _square_roof_intersect(int x, int y, int elevation); void _grid_render(Rect* rect, int elevation);