Review tile_fill_roof
This commit is contained in:
parent
9599d63f45
commit
18afce71b0
|
@ -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 (isEmpty != _obj_last_is_empty || (((currentSquare >> 16) & 0xF000) >> 12) != (((previousSquare >> 16) & 0xF000) >> 12)) {
|
||||||
if (!_obj_last_is_empty) {
|
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) {
|
if (!isEmpty) {
|
||||||
_tile_fill_roof(roofX, roofY, elevation, 0);
|
tile_fill_roof(roofX, roofY, elevation, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rect != NULL) {
|
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);
|
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)) {
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1266,12 +1266,12 @@ static void roof_fill_on(int x, int y, int elevation)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 0x4B23D4
|
// 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) {
|
if (on) {
|
||||||
roof_fill_on(a1, a2, elevation);
|
roof_fill_on(x, y, elevation);
|
||||||
} else {
|
} else {
|
||||||
roof_fill_off(a1, a2, elevation);
|
roof_fill_off(x, y, elevation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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 squareTileScreenToCoord(int screenX, int screenY, int elevation, int* coordX, int* coordY);
|
||||||
void squareTileScreenToCoordRoof(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 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);
|
void tileRenderFloorsInRect(Rect* rect, int elevation);
|
||||||
bool _square_roof_intersect(int x, int y, int elevation);
|
bool _square_roof_intersect(int x, int y, int elevation);
|
||||||
void _grid_render(Rect* rect, int elevation);
|
void _grid_render(Rect* rect, int elevation);
|
||||||
|
|
Loading…
Reference in New Issue