21 switch (fake_item_box->
state) {
24 fake_item_box->
rot[0] -= 0xB6;
25 fake_item_box->
rot[1] += 0x16C;
26 fake_item_box->
rot[2] -= 0xB6;
28 temp_f14 = temp_v0_4->
pos[0] - fake_item_box->
pos[0];
29 temp_f16 = temp_v0_4->
pos[1] - fake_item_box->
pos[1];
30 temp_f18 = temp_v0_4->
pos[2] - fake_item_box->
pos[2];
32 temp_f2_2 =
sqrtf((temp_f14 * temp_f14) + (temp_f16 * temp_f16) + (temp_f18 * temp_f18)) / 10.0f;
33 temp_f14 /= temp_f2_2;
34 temp_f16 /= temp_f2_2;
35 temp_f18 /= temp_f2_2;
36 fake_item_box->
pos[0] = temp_v0_4->
pos[0] - temp_f14;
37 fake_item_box->
pos[1] = (temp_v0_4->
pos[1] - temp_f16) - 1.0f;
38 fake_item_box->
pos[2] = temp_v0_4->
pos[2] - temp_f18;
40 fake_item_box->
pos[1], fake_item_box->
pos[2]);
43 if ((temp_v0_4->
type & 0x4000) != 0) {
54 if (fake_item_box->sizeScaling < 1.0f) {
55 fake_item_box->sizeScaling += 0.05f;
56 }
else if (fake_item_box->sizeScaling >= 1.0f) {
57 fake_item_box->sizeScaling = 1.0f;
61 if (fake_item_box->targetY <= fake_item_box->
pos[1]) {
62 fake_item_box->
pos[1] = fake_item_box->targetY;
64 fake_item_box->
pos[1] += 0.2f;
66 if ((fake_item_box->
flags & 0x1000) != 0) {
67 if ((fake_item_box->someTimer <= 0) || (fake_item_box->someTimer >= 0x12D)) {
68 fake_item_box->
flags &= 0xEFFF;
69 fake_item_box->someTimer = 0;
71 fake_item_box->someTimer--;
74 fake_item_box->
rot[0] -= 0xB6;
75 fake_item_box->
rot[1] += 0x16C;
76 fake_item_box->
rot[2] -= 0xB6;
80 if ((fake_item_box->someTimer >= 0x14) || (fake_item_box->someTimer < 0)) {
83 fake_item_box->someTimer++;
84 fake_item_box->
rot[0] += 0x444;
85 fake_item_box->
rot[1] -= 0x2D8;
86 fake_item_box->
rot[2] += 0x16C;
void destroy_actor(struct Actor *actor)
Definition actors.c:1313
void func_802A1064(struct FakeItemBox *fake_item_box)
Definition actors.c:2368
void func_802B4E30(struct Actor *arg0)
Definition actors_extended.c:972
u16 check_bounding_collision(Collision *collision, f32 boundingBoxSize, f32 posX, f32 posY, f32 posZ)
Definition collision.c:1356
void func_800C9060(u8 playerId, u32 soundBits)
Definition external.c:2862
void update_actor_fake_item_box(struct FakeItemBox *fake_item_box)
Updates the fake item box actor.
Definition update.inc.c:9
#define UNUSED
Definition macros.h:23
Player * gPlayerOne
Definition main.c:72
Player gPlayers[NUM_PLAYERS]
Definition main.c:71
struct Controller gControllers[NUM_PLAYERS]
Definition main.c:61
#define Z_TRIG
Definition os.h:393
#define SOUND_ARG_LOAD(sound_bank, byte2, byte3, sound_id)
Definition sounds.h:14
Definition actor_types.h:120
Vec3s rot
Definition actor_types.h:127
s16 flags
Definition actor_types.h:122
Vec3f pos
Definition actor_types.h:129
f32 boundingBoxSize
Definition actor_types.h:126
Definition common_structs.h:62
u16 buttonDepressed
Definition common_structs.h:67
Definition actor_types.h:349
Vec3s rot
Definition actor_types.h:356
f32 boundingBoxSize
Definition actor_types.h:355
f32 sizeScaling
Definition actor_types.h:354
Collision unk30
Definition actor_types.h:362
f32 playerId
Definition actor_types.h:359
s16 state
Definition actor_types.h:353
Vec3f pos
Definition actor_types.h:358
Definition common_structs.h:249
u16 type
Definition common_structs.h:250
s32 soundEffects
Definition common_structs.h:256
Vec3f pos
Definition common_structs.h:259
signed int s32
Definition ultratypes.h:15
unsigned int u32
Definition ultratypes.h:16
float f32
Definition ultratypes.h:34
unsigned char u8
Definition ultratypes.h:12