Mario Kart 64
Loading...
Searching...
No Matches
update.inc.c
Go to the documentation of this file.
1#include <actors.h>
2
11 switch (itemBox->state) {
12 case 5:
13 itemBox->rot[0] += 0xB6;
14 itemBox->rot[1] -= 0x16C;
15 itemBox->rot[2] += 0xB6;
16 break;
17 case 3:
18 if (itemBox->someTimer == 0x14) {
19 itemBox->state = 5;
20 itemBox->flags = -0x4000;
21 } else {
22 itemBox->someTimer++;
23 itemBox->rot[0] += 0x444;
24 itemBox->rot[1] -= 0x2D8;
25 itemBox->rot[2] += 0x16C;
26 }
27 break;
28 }
29}
30
36void update_actor_item_box(struct ItemBox* itemBox) {
37 switch (itemBox->state) {
38 case 0:
39 itemBox->state = 1;
40 break;
41 case 1:
42 if ((itemBox->pos[1] - itemBox->origY) < 8.66f) {
43 itemBox->pos[1] += 0.45f;
44 } else {
45 itemBox->pos[1] = itemBox->origY + 8.66f;
46 itemBox->state = 2;
47 itemBox->flags = 0xC000;
48 }
49 break;
50 case 2:
51 itemBox->rot[0] += 0xB6;
52 itemBox->rot[1] -= 0x16C;
53 itemBox->rot[2] += 0xB6;
54 break;
55 case 3:
56 if (itemBox->someTimer == 20) {
57 itemBox->state = 0;
58 itemBox->pos[1] = itemBox->resetDistance - 20.0f;
59 itemBox->flags = 0xC000;
60 } else {
61 itemBox->someTimer++;
62 itemBox->rot[0] += 0x444;
63 itemBox->rot[1] -= 0x2D8;
64 itemBox->rot[2] += 0x16C;
65 }
66 break;
67 }
68}
void update_actor_item_box_hot_air_balloon(struct ItemBox *itemBox)
Updates the item box under the hot air balloon object. It used in Luigi Raceway. (here it's just upda...
Definition update.inc.c:10
void update_actor_item_box(struct ItemBox *itemBox)
Updates the item box actor.
Definition update.inc.c:36
Definition actor_types.h:331
s16 someTimer
Definition actor_types.h:334
s16 flags
Definition actor_types.h:333
f32 origY
Definition actor_types.h:343
Vec3f pos
Definition actor_types.h:342
s16 state
Definition actor_types.h:335
f32 resetDistance
Definition actor_types.h:336
Vec3s rot
Definition actor_types.h:340