mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-19 22:02:57 +01:00
format top spin seat position offset array
This commit is contained in:
@@ -221,56 +221,11 @@ rct_xy16 loc_7667AC[] = {
|
|||||||
* Can be calculated as Rounddown(34*sin(x)+0.5)
|
* Can be calculated as Rounddown(34*sin(x)+0.5)
|
||||||
* where x is in 7.5 deg segments.
|
* where x is in 7.5 deg segments.
|
||||||
*/
|
*/
|
||||||
sint8 SeatPositionOffset[] = {
|
static sint8 TopSpinSeatPositionOffset[] = {
|
||||||
0,
|
0, 4, 9, 13, 17, 21, 24, 27, 29, 31, 33, 34, 34, 34, 33, 31,
|
||||||
4,
|
29, 27, 24, 21, 17, 13, 9, 4, 0, -3, -8, -12, -16, -20, -23, -26,
|
||||||
9,
|
-28, -30, -32, -33, -33, -33, -32, -30, -28, -26, -23, -20, -16, -12, -8, -3,
|
||||||
13,
|
0
|
||||||
17,
|
|
||||||
21,
|
|
||||||
24,
|
|
||||||
27,
|
|
||||||
29,
|
|
||||||
31,
|
|
||||||
33,
|
|
||||||
34,
|
|
||||||
34,
|
|
||||||
34,
|
|
||||||
33,
|
|
||||||
31,
|
|
||||||
29,
|
|
||||||
27,
|
|
||||||
24,
|
|
||||||
21,
|
|
||||||
17,
|
|
||||||
13,
|
|
||||||
9,
|
|
||||||
4,
|
|
||||||
0,
|
|
||||||
-3,
|
|
||||||
-8,
|
|
||||||
-12,
|
|
||||||
-16,
|
|
||||||
-20,
|
|
||||||
-23,
|
|
||||||
-26,
|
|
||||||
-28,
|
|
||||||
-30,
|
|
||||||
-32,
|
|
||||||
-33,
|
|
||||||
-33,
|
|
||||||
-33,
|
|
||||||
-32,
|
|
||||||
-30,
|
|
||||||
-28,
|
|
||||||
-26,
|
|
||||||
-23,
|
|
||||||
-20,
|
|
||||||
-16,
|
|
||||||
-12,
|
|
||||||
-8,
|
|
||||||
-3,
|
|
||||||
0
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* rct2: 0x0076750D */
|
/* rct2: 0x0076750D */
|
||||||
@@ -387,19 +342,19 @@ void top_spin_paint_vehicle(sint8 al, sint8 cl, uint8 rideIndex, uint8 direction
|
|||||||
};
|
};
|
||||||
seatCoords.z += RCT2_ADDRESS(0x14280BC, sint16)[armRotation];
|
seatCoords.z += RCT2_ADDRESS(0x14280BC, sint16)[armRotation];
|
||||||
|
|
||||||
assert(armRotation < sizeof(SeatPositionOffset));
|
assert(armRotation < sizeof(TopSpinSeatPositionOffset));
|
||||||
switch (direction) {
|
switch (direction) {
|
||||||
case 0:
|
case 0:
|
||||||
seatCoords.x -= SeatPositionOffset[armRotation];
|
seatCoords.x -= TopSpinSeatPositionOffset[armRotation];
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
seatCoords.y += SeatPositionOffset[armRotation];
|
seatCoords.y += TopSpinSeatPositionOffset[armRotation];
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
seatCoords.x += SeatPositionOffset[armRotation];
|
seatCoords.x += TopSpinSeatPositionOffset[armRotation];
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
seatCoords.y -= SeatPositionOffset[armRotation];
|
seatCoords.y -= TopSpinSeatPositionOffset[armRotation];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user