diff options
-rw-r--r-- | src/aircraft_cmd.cpp | 10 | ||||
-rw-r--r-- | src/disaster_cmd.cpp | 6 | ||||
-rw-r--r-- | src/oldloader.cpp | 4 | ||||
-rw-r--r-- | src/roadveh_cmd.cpp | 6 | ||||
-rw-r--r-- | src/ship_cmd.cpp | 6 | ||||
-rw-r--r-- | src/train_cmd.cpp | 6 | ||||
-rw-r--r-- | src/vehicle.cpp | 8 | ||||
-rw-r--r-- | src/vehicle_base.h | 6 |
8 files changed, 26 insertions, 26 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp index 25be72919..f4c60c9d1 100644 --- a/src/aircraft_cmd.cpp +++ b/src/aircraft_cmd.cpp @@ -54,17 +54,17 @@ void Aircraft::UpdateDeltaXY(Direction direction) case FLYING: x = MKIT(24, 24, -1, -1); break; default: x = MKIT( 2, 2, -1, -1); break; } - this->z_height = 5; + this->z_extent = 5; break; - case AIR_SHADOW: this->z_height = 1; x = MKIT(2, 2, 0, 0); break; - case AIR_ROTOR: this->z_height = 1; x = MKIT(2, 2, -1, -1); break; + case AIR_SHADOW: this->z_extent = 1; x = MKIT(2, 2, 0, 0); break; + case AIR_ROTOR: this->z_extent = 1; x = MKIT(2, 2, -1, -1); break; } #undef MKIT this->x_offs = GB(x, 0, 8); this->y_offs = GB(x, 8, 8); - this->sprite_width = GB(x, 16, 8); - this->sprite_height = GB(x, 24, 8); + this->x_extent = GB(x, 16, 8); + this->y_extent = GB(x, 24, 8); } diff --git a/src/disaster_cmd.cpp b/src/disaster_cmd.cpp index 0482edeaa..097aaf567 100644 --- a/src/disaster_cmd.cpp +++ b/src/disaster_cmd.cpp @@ -1061,7 +1061,7 @@ void DisasterVehicle::UpdateDeltaXY(Direction direction) { this->x_offs = -1; this->y_offs = -1; - this->sprite_width = 2; - this->sprite_height = 2; - this->z_height = 5; + this->x_extent = 2; + this->y_extent = 2; + this->z_extent = 5; } diff --git a/src/oldloader.cpp b/src/oldloader.cpp index a84cb66fe..ccd64c3b5 100644 --- a/src/oldloader.cpp +++ b/src/oldloader.cpp @@ -1155,8 +1155,8 @@ static const OldChunks vehicle_chunk[] = { OCL_SVAR( OC_UINT8, Vehicle, z_pos ), OCL_SVAR( OC_UINT8, Vehicle, direction ), OCL_NULL( 2 ), ///< x_offs and y_offs, calculated automatically - OCL_NULL( 2 ), ///< sprite_width and sprite_height, calculated automatically - OCL_NULL( 1 ), ///< z_height, calculated automatically + OCL_NULL( 2 ), ///< x_extent and y_extent, calculated automatically + OCL_NULL( 1 ), ///< z_extent, calculated automatically OCL_SVAR( OC_UINT8, Vehicle, owner ), OCL_SVAR( OC_TILE, Vehicle, tile ), diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index 2314a9aa1..2311287ad 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -585,9 +585,9 @@ void RoadVehicle::UpdateDeltaXY(Direction direction) uint32 x = _delta_xy_table[direction]; this->x_offs = GB(x, 0, 8); this->y_offs = GB(x, 8, 8); - this->sprite_width = GB(x, 16, 8); - this->sprite_height = GB(x, 24, 8); - this->z_height = 6; + this->x_extent = GB(x, 16, 8); + this->y_extent = GB(x, 24, 8); + this->z_extent = 6; } static void ClearCrashedStation(Vehicle *v) diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp index ae7bea8b4..a3e460a29 100644 --- a/src/ship_cmd.cpp +++ b/src/ship_cmd.cpp @@ -322,9 +322,9 @@ void Ship::UpdateDeltaXY(Direction direction) uint32 x = _delta_xy_table[direction]; this->x_offs = GB(x, 0, 8); this->y_offs = GB(x, 8, 8); - this->sprite_width = GB(x, 16, 8); - this->sprite_height = GB(x, 24, 8); - this->z_height = 6; + this->x_extent = GB(x, 16, 8); + this->y_extent = GB(x, 24, 8); + this->z_extent = 6; } void RecalcShipStuff(Vehicle *v) diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index 826861fe4..8bd5c2d8a 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -1529,9 +1529,9 @@ void Train::UpdateDeltaXY(Direction direction) uint32 x = _delta_xy_table[direction]; this->x_offs = GB(x, 0, 8); this->y_offs = GB(x, 8, 8); - this->sprite_width = GB(x, 16, 8); - this->sprite_height = GB(x, 24, 8); - this->z_height = 6; + this->x_extent = GB(x, 16, 8); + this->y_extent = GB(x, 24, 8); + this->z_extent = 6; } static void UpdateVarsAfterSwap(Vehicle *v) diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 349ef1b5b..5602fb7b9 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -767,7 +767,7 @@ static void DoDrawVehicle(const Vehicle *v) } AddSortableSpriteToDraw(image, pal, v->x_pos + v->x_offs, v->y_pos + v->y_offs, - v->sprite_width, v->sprite_height, v->z_height, v->z_pos, (v->vehstatus & VS_SHADOW) != 0); + v->x_extent, v->y_extent, v->z_extent, v->z_pos, (v->vehstatus & VS_SHADOW) != 0); } void ViewportAddVehicles(DrawPixelInfo *dpi) @@ -3234,9 +3234,9 @@ void SpecialVehicle::UpdateDeltaXY(Direction direction) { this->x_offs = 0; this->y_offs = 0; - this->sprite_width = 1; - this->sprite_height = 1; - this->z_height = 1; + this->x_extent = 1; + this->y_extent = 1; + this->z_extent = 1; } void StopAllVehicles() diff --git a/src/vehicle_base.h b/src/vehicle_base.h index 7f524cb5f..c2eb7f9e9 100644 --- a/src/vehicle_base.h +++ b/src/vehicle_base.h @@ -223,9 +223,9 @@ public: // 0xfd == custom sprite, 0xfe == custom second head sprite // 0xff == reserved for another custom sprite uint16 cur_image; // sprite number for this vehicle - byte sprite_width; // width of vehicle sprite - byte sprite_height; // height of vehicle sprite - byte z_height; // z-height of vehicle sprite + byte x_extent; // x-extent of vehicle bounding box + byte y_extent; // y-extent of vehicle bounding box + byte z_extent; // z-extent of vehicle bounding box int8 x_offs; // x offset for vehicle sprite int8 y_offs; // y offset for vehicle sprite EngineID engine_type; |