21 startingXPos = temp_v0->
posX;
22 startingYPos = temp_v0->
posY;
23 startingZPos = temp_v0->
posZ;
27 startingXPos = temp_v0->
posX;
28 startingYPos = temp_v0->
posY;
29 startingZPos = temp_v0->
posZ;
116 sp7E = bombKart->
state;
123 var_f22 = bombKart->
bombPos[0];
124 var_f20 = bombKart->
bombPos[1];
125 var_f24 = bombKart->
bombPos[2];
131 if ((sp7E != 0) && (sp7E != 4)) {
136 temp_f0 = var_f22 - var_v0->
pos[0];
137 temp_f2 = var_f20 - var_v0->
pos[1];
138 temp_f12 = var_f24 - var_v0->
pos[2];
139 if ((((temp_f0 * temp_f0) + (temp_f2 * temp_f2)) + (temp_f12 * temp_f12)) < 25.0f) {
143 var_v0->
type &= ~0x2000;
150 if (!(var_v0->
effects & 0x80000000)) {
151 temp_f0 = var_f22 - var_v0->
pos[0];
152 temp_f2 = var_f20 - var_v0->
pos[1];
153 temp_f12 = var_f24 - var_v0->
pos[2];
154 if ((((temp_f0 * temp_f0) + (temp_f2 * temp_f2)) + (temp_f12 * temp_f12)) < 25.0f) {
169 var_s1 = (var_s1 + 356) % 360;
170 temp_t6 = (var_s1 * 0xFFFF) / 360;
171 sp118 =
coss(temp_t6) * 25.0;
172 temp_f0_3 =
sins(temp_t6) * 25.0;
174 var_f22 = temp_v0_2->
posX + sp118;
175 var_f20 = bombKart->
yPos + 3.5f;
176 var_f24 = temp_v0_2->
posZ + temp_f0_3;
180 temp_t7 = (((var_s1 + 1) % 360) * 0xFFFF) / 360;
181 sp118 =
coss(temp_t7) * 25.0;
182 temp_f0_3 =
sins(temp_t7) * 25.0;
189 var_s1 = (var_s1 + 4) % 360;
190 temp_t6 = (var_s1 * 0xFFFF) / 360;
191 sp118 =
coss(temp_t6) * 25.0;
192 temp_f0_3 =
sins(temp_t6) * 25.0;
194 var_f22 = temp_v0_2->
posX + sp118;
195 var_f20 = bombKart->
yPos + 3.5f;
196 var_f24 = temp_v0_2->
posZ + temp_f0_3;
200 temp_t7 = (((var_s1 + 1) % 360) * 0xFFFF) / 360;
201 sp118 =
coss(temp_t7) * 25.0;
202 temp_f0_3 =
sins(temp_t7) * 25.0;
209 var_f20 = bombKart->
yPos + 3.5f;
221 if (((
s32) spCA) < 0x1A) {
242 temp_f0_4 =
sqrtf((temp_f14 * temp_f14) + (temp_f16 * temp_f16));
243 if (temp_f0_4 > 0.01f) {
244 var_f22 += (bombKart->
unk_3C * temp_f14) / temp_f0_4;
245 var_f24 += (bombKart->
unk_3C * temp_f16) / temp_f0_4;
247 var_f22 += temp_f14 / 5.0f;
248 var_f24 += temp_f16 / 5.0f;
252 if (var_f20 < (-1000.0)) {
253 var_f20 = bombKart->
bombPos[1];
267 var_f20 += 3.0f - (var_s1 * 0.3f);
275 sp108 = 2.0f * var_s1;
276 sp118 =
coss(0xFFFF - spC2) * var_s1;
277 var_f18 =
sins(0xFFFF - spC2) * var_s1;
279 temp_f2_4 = (var_f20 - 2.3f) + (sp108 / 3.0f);
288 sp118 =
coss(0xFFFF - spC2) * 1.5f;
289 var_f18 =
sins(0xFFFF - spC2) * 1.5f;
290 temp_f16_2 = var_f20 - 2.3f;
291 temp_f12_3 = (sp7C % 3) * 0.15f;
292 temp_f14_2 = temp_f16_2 - temp_f12_3;
293 temp_f12_4 = temp_f16_2 + temp_f12_3;
298 var_f20 +=
sins((sp7C * 0x13FFEC) / 360);
299 sp7C = (sp7C + 1) % 18;
301 bombKart2 = bombKart;
302 bombKart2->
wheel1Pos[0] = (sp118 - var_f18) + var_f22;
304 bombKart2->
wheel1Pos[2] = (var_f18 + sp118) + var_f24;
305 bombKart2->
wheel2Pos[0] = (var_f18 + sp118) + var_f22;
307 bombKart2->
wheel2Pos[2] = (var_f18 - sp118) + var_f24;
308 bombKart2->
wheel3Pos[0] = ((-sp118) - var_f18) + var_f22;
310 bombKart2->
wheel3Pos[2] = ((-var_f18) + sp118) + var_f24;
311 bombKart2->
wheel4Pos[0] = ((-sp118) + var_f18) + var_f22;
313 bombKart2->
wheel4Pos[2] = ((-var_f18) - sp118) + var_f24;
314 bombKart2->
bombPos[0] = var_f22;
315 bombKart2->
bombPos[1] = var_f20;
316 bombKart2->
bombPos[2] = var_f24;
320 bombKart2->
state = sp7E;
#define NUM_BOMB_KARTS_VERSUS
Definition bomb_kart.h:9
void func_8000DF8C(s32 bombKartId)
Definition bomb_kart.inc.c:59
void set_bomb_kart_spawn_positions(void)
Definition bomb_kart.inc.c:1
s16 gCurrentCourseId
Definition code_800029B0.c:30
u16 check_bounding_collision(Collision *collision, f32 boundingBoxSize, f32 posX, f32 posY, f32 posZ)
Definition collision.c:1358
f32 calculate_surface_height(f32 x, f32 y, f32 z, u16 index)
Definition collision.c:529
f32 get_surface_height(f32 posX, f32 posY, f32 posZ)
Returns the height of the surface below the provided position. Used to set actors onto the course mes...
Definition collision.c:1470
@ COURSE_FRAPPE_SNOWLAND
Definition course.h:36
@ COURSE_YOSHI_VALLEY
Definition course.h:35
@ COURSE_AWARD_CEREMONY
Definition course.h:51
u16 gPathCountByPathIndex[4]
Definition cpu_vehicles_camera_path.c:181
Vec3f D_80162FC0
Definition cpu_vehicles_camera_path.c:53
Vec3f D_80162FB0
Definition cpu_vehicles_camera_path.c:52
Collision D_80164038[NUM_BOMB_KARTS_MAX]
Definition cpu_vehicles_camera_path.c:150
TrackPathPoint * gTrackPaths[4]
Definition cpu_vehicles_camera_path.c:174
s16 D_8016347E
Definition cpu_vehicles_camera_path.c:125
BombKart gBombKarts[NUM_BOMB_KARTS_MAX]
Definition cpu_vehicles_camera_path.c:149
u16 gNearestPathPointByPlayerId[12]
Definition cpu_vehicles_camera_path.c:163
s16 D_8016347C
Definition cpu_vehicles_camera_path.c:124
s16 func_8000D2B4(f32, f32, f32, s16, s32)
Definition path_utils.inc.c:553
#define UNUSED
Definition macros.h:23
Player gPlayers[NUM_PLAYERS]
Definition main.c:68
Player * gPlayerFour
Definition main.c:72
f32 sins(u16 arg0)
Definition math_util.c:1086
s32 get_angle_between_two_vectors(Vec3f arg0, Vec3f arg1)
Definition math_util.c:84
f32 coss(u16 arg0)
Definition math_util.c:1090
Definition bomb_kart.h:19
u16 startingState
Definition bomb_kart.h:21
u16 pathPointIndex
Definition bomb_kart.h:20
f32 unk_04
Definition bomb_kart.h:22
f32 startingZPos
Definition bomb_kart.h:24
f32 startingXPos
Definition bomb_kart.h:23
Definition bomb_kart.h:33
Vec3f wheel3Pos
Definition bomb_kart.h:42
u16 circleTimer
Definition bomb_kart.h:49
Vec3f wheel1Pos
Definition bomb_kart.h:40
Vec3f wheel2Pos
Definition bomb_kart.h:41
Vec3f wheel4Pos
Definition bomb_kart.h:43
u16 someRot
Definition bomb_kart.h:45
s16 unk_4C
Definition bomb_kart.h:51
u16 state
Definition bomb_kart.h:47
u16 bounceTimer
Definition bomb_kart.h:48
f32 yPos
Definition bomb_kart.h:53
f32 unk_3C
Definition bomb_kart.h:44
Vec3f bombPos
Definition bomb_kart.h:39
u16 pathPointIndex
Definition bomb_kart.h:46
u16 unk_4A
Definition bomb_kart.h:50
Definition common_structs.h:132
u16 meshIndexZX
Definition common_structs.h:139
Definition common_structs.h:249
u32 effects
Definition common_structs.h:298
u16 type
Definition common_structs.h:250
s32 soundEffects
Definition common_structs.h:256
Vec3f pos
Definition common_structs.h:259
s16 posX
Definition path.h:7
s16 posZ
Definition path.h:9
s16 posY
Definition path.h:8
signed int s32
Definition ultratypes.h:15
float f32
Definition ultratypes.h:34
unsigned short int u16
Definition ultratypes.h:14