This commit is contained in:
dark-samus 2020-11-21 04:29:48 -05:00
parent 63429d6ad2
commit 227626e9a7
9 changed files with 40 additions and 34 deletions

View File

@ -10,7 +10,7 @@ void create_shadow_callback(Shadow* shadow) {
//TODO: make sure this is the right struct for this.
s32 func_802E0DB0(Shadow* shadow) {
if (((shadow->unk_06 & 4) != 0) && (gPlayerStatus.flags & 2) != 0) {
return 1;
}
@ -109,7 +109,7 @@ void func_802E1350(Entity* entity) {
}
}
void func_802E13B8(Entity *entity) {
void func_802E13B8(Entity* entity) {
Trigger* trigger = (Trigger*)entity->dataBuf; // TODO: Fix this
entity_init_Hammer23Block_normal(entity);

View File

@ -73,14 +73,14 @@ void func_802E1660(Entity* entity) {
func_802E153C(entity);
if(entity->unk_06 & 0x40) {
if(playerStatus->actionState == ActionState_HAMMER) {
if(gPlayerData.hammerLevel < 0) {
if (entity->unk_06 & 0x40) {
if (playerStatus->actionState == ActionState_HAMMER) {
if (gPlayerData.hammerLevel < 0) {
return;
}
func_8010FD68(entity);
if(temp->attachedEntity == NULL) {
if (temp->attachedEntity == NULL) {
return;
}
@ -89,25 +89,25 @@ void func_802E1660(Entity* entity) {
}
}
if(playerStatus->actionState == ActionState_SPIN_JUMP) {
if (playerStatus->actionState == ActionState_SPIN_JUMP) {
return;
}
if(temp2[3] == 4) {
if(temp2[0] != 0) {
if (temp2[3] == 4) {
if (temp2[0] != 0) {
return;
}
}
if(!(entity->unk_06 & 1)) {
if(!(entity->unk_06 & 0x80)) {
if (!(entity->unk_06 & 1)) {
if (!(entity->unk_06 & 0x80)) {
return;
}
}
func_8010FD68(entity);
if(temp->attachedEntity == NULL) {
if (temp->attachedEntity == NULL) {
return;
}
@ -141,7 +141,7 @@ void func_802E1EA8(Entity* entity) {
INCLUDE_ASM(s32, "code_102c80", func_802E1EDC);
void func_802E234C(Entity* entity) {
PlayerStatus* playerStatus = &gPlayerStatus;
PlayerStatus* playerStatus = &gPlayerStatus;
struct802E1400* temp = (struct802E1400*)entity->dataBuf;
playerStatus->animFlags |= 0x1000000;
@ -205,13 +205,13 @@ void func_802E2EB0(Entity* entity) {
((struct802E1400*)entity->dataBuf)->unk_38 = entity->position.y;
type = get_entity_type((u8)entity->listIndex);
if((type - 24) < 3) {
if ((type - 24) < 3) {
entity->scale.x = 0.5f;
entity->scale.y = 0.5f;
entity->scale.z = 0.5f;
}
switch(type) {
switch (type) {
case 21:
case 24:
a1 = &D_0A0031E0;
@ -241,7 +241,7 @@ void func_802E2EB0(Entity* entity) {
break;
}
if(a2 == NULL) {
if (a2 == NULL) {
return;
}
@ -255,11 +255,11 @@ INCLUDE_ASM(void, "code_102c80", func_802E2EB0, Entity* entity);
//Needs rodata support
void func_802E2FD0(Entity* entity) {
u32 type;
void *addr = NULL;
void* addr = NULL;
type = get_entity_type(entity->listIndex);
switch(type) {
switch (type) {
case 21:
addr = &D_802E9C8C;
break;
@ -290,7 +290,7 @@ void func_802E2FD0(Entity* entity) {
break;
}
if(addr == NULL) {
if (addr == NULL) {
return;
}
@ -298,4 +298,4 @@ void func_802E2FD0(Entity* entity) {
}
#else
INCLUDE_ASM(s32, "code_102c80", func_802E2FD0);
#endif
#endif

View File

@ -62,7 +62,7 @@ s32 func_802E3650(Entity* entity) {
itemEntity->position.y = entity->position.y + 4.0f;
}
}
}
}
return ret;
}
@ -144,7 +144,8 @@ void func_802E38D8(Entity* entity) {
if ((temp->unk_04 == 0) || (temp->unk_06 == 0)) {
temp->unk_03 = 1;
func_8010FBC0(get_entity_by_index(create_entity(&D_802EA07C, entity->position.x, entity->position.y, entity->position.z, entity->rotation.y, 0x80000000)), &D_802E9E54);
func_8010FBC0(get_entity_by_index(create_entity(&D_802EA07C, entity->position.x, entity->position.y, entity->position.z,
entity->rotation.y, 0x80000000)), &D_802E9E54);
entity->flags |= 0x20000020;
}
}
@ -212,4 +213,4 @@ s32 entity_init_HammerBlock_small(Entity* entity) {
entity->scale.x = 0.5f;
entity->scale.y = 0.5f;
entity->scale.z = 0.5f;
}
}

View File

@ -51,7 +51,7 @@ void func_802E40A0(Entity* entity) {
UNK_PTR ptr;
entityType = get_entity_type(entity->listIndex);
if ((entityType == 0x12) || (entityType == 0x14) ){
if ((entityType == 0x12) || (entityType == 0x14)) {
play_model_animation(entity->virtualModelIndex, &D_00000094);
} else {
play_model_animation(entity->virtualModelIndex, &D_00000094_2);
@ -105,7 +105,8 @@ void func_802E421C(Entity* entity) {
phi_a0 = &D_802EA0A0;
}
}
temp_s2 = create_entity(phi_a0, entity->position.x, entity->position.y, entity->position.z, entity->rotation.y, 0x80000000);
temp_s2 = create_entity(phi_a0, entity->position.x, entity->position.y, entity->position.z, entity->rotation.y,
0x80000000);
entityTemp = get_entity_by_index(temp_s2);
entityTemp->flags |= 1;
@ -128,7 +129,8 @@ void func_802E421C(Entity* entity) {
} else {
phi_a0 = &D_802EA63C;
}
entityTemp = get_entity_by_index(create_entity(phi_a0, entity->position.x, entity->position.y, entity->position.z, entity->rotation.y, 0x80000000));
entityTemp = get_entity_by_index(create_entity(phi_a0, entity->position.x, entity->position.y, entity->position.z,
entity->rotation.y, 0x80000000));
entityTemp->alpha = entity->alpha;
if (((entity->flags & 1) != 0) || ((u32) entity->alpha < 0xFF)) {
entityTemp->alpha = 0x20;

View File

@ -128,7 +128,8 @@ s8 func_802E55A8(Entity* entity, StaticEntityData* data) {
temp_s2 = D_8015C7D0;
entity_init_Hammer23Block_normal(entity);
someEntity = get_entity_by_index(create_entity(data, entity->position.x, entity->position.y, entity->position.z, 0.0f, 0x80000000));
someEntity = get_entity_by_index(create_entity(data, entity->position.x, entity->position.y, entity->position.z, 0.0f,
0x80000000));
temp_v1 = someEntity->dataBuf;
temp_v1->unk_00 = entity->listIndex;
if (temp_s2 == 0) {

View File

@ -91,4 +91,4 @@ void func_802E5F7C(Entity* entity) {
temp->unk_128 = &D_0A000800;
temp->unk_12C = &D_0A000750;
entity->unk_3C = func_802E586C;
}
}

View File

@ -28,7 +28,7 @@ typedef struct struct802E8BC0 {
/* 0x00 */ char unk_00[4];
/* 0x04 */ s32 unk_04;
/* 0x08 */ char unk_08[4];
/* 0x0C */ s32 unk_0C;
/* 0x0C */ s32 unk_0C;
} struct802E8BC0;
MapConfig* get_current_map_header(void);
@ -36,9 +36,9 @@ void disable_player_input(void);
void disable_player_static_collisions(void);
void move_player(s32, f32, f32);
void func_802E8BC0(Entity *entity) {
PlayerStatus *playerStatus = &gPlayerStatus;
PlayerStatus *playerStatus2 = &gPlayerStatus;
void func_802E8BC0(Entity* entity) {
PlayerStatus* playerStatus = &gPlayerStatus;
PlayerStatus* playerStatus2 = &gPlayerStatus;
struct802E8BC0* temp = (struct802E8BC0*)entity->dataBuf;
MapConfig* mapConfig = get_current_map_header();
f32 temp_f20;

View File

@ -100,7 +100,8 @@ INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_80111790);
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_801117DC);
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", create_entity, StaticEntityData* data, s32 x, s32 y, s32 z, s32 arg4, s32 flags);
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", create_entity, StaticEntityData* data, s32 x, s32 y, s32 z, s32 arg4,
s32 flags);
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", create_shadow_from_data);

View File

@ -222,7 +222,8 @@ INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80072170);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_800721D0);
INCLUDE_ASM(UNK_TYPE, "os/code_4ac90_len_3910", func_80072230, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5);
INCLUDE_ASM(UNK_TYPE, "os/code_4ac90_len_3910", func_80072230, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4,
s32 arg5);
INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80072290);