mirror of
https://github.com/pmret/papermario.git
synced 2024-11-09 12:32:38 +01:00
Most PR comments
This commit is contained in:
parent
adfa9feb31
commit
6fa31ae20a
@ -31,7 +31,7 @@ typedef struct MapConfig {
|
|||||||
} tattle;
|
} tattle;
|
||||||
} MapConfig; // size = 0x40
|
} MapConfig; // size = 0x40
|
||||||
|
|
||||||
typedef s32(*MapInit)(void);
|
typedef s32 (*MapInit)(void);
|
||||||
|
|
||||||
#define MAP_ID_MAX_LEN 7 ///< "xxx_yyy" excluding null terminator.
|
#define MAP_ID_MAX_LEN 7 ///< "xxx_yyy" excluding null terminator.
|
||||||
typedef struct Map {
|
typedef struct Map {
|
||||||
|
@ -97,7 +97,7 @@ extern f64 D_802EB000;
|
|||||||
extern f64 D_802EB008;
|
extern f64 D_802EB008;
|
||||||
|
|
||||||
extern Entity* D_802EB3A0;
|
extern Entity* D_802EB3A0;
|
||||||
extern s32 D_8015C7D0;
|
extern s32 D_8015C7D0[3];
|
||||||
|
|
||||||
extern UNK_TYPE D_0A0031E0;
|
extern UNK_TYPE D_0A0031E0;
|
||||||
extern UNK_TYPE D_0A001508;
|
extern UNK_TYPE D_0A001508;
|
||||||
|
@ -8,11 +8,10 @@ void create_shadow_callback(Shadow* shadow) {
|
|||||||
|
|
||||||
//TODO: make sure this is the right struct for this.
|
//TODO: make sure this is the right struct for this.
|
||||||
s32 func_802E0DB0(Shadow* shadow) {
|
s32 func_802E0DB0(Shadow* shadow) {
|
||||||
|
|
||||||
if (((shadow->unk_06 & 4) != 0) && (gPlayerStatus.flags & 2) != 0) {
|
if (((shadow->unk_06 & 4) != 0) && (gPlayerStatus.flags & 2) != 0) {
|
||||||
return 1;
|
return TRUE;
|
||||||
}
|
}
|
||||||
return 0;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "code_102610_len_2330", func_802E0DE0);
|
INCLUDE_ASM(s32, "code_102610_len_2330", func_802E0DE0);
|
||||||
@ -31,14 +30,13 @@ void func_802E10F4(Entity* entity) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void func_802E114C(void) {
|
void func_802E114C(void) {
|
||||||
|
func_80027088(TRUE);
|
||||||
func_80027088(1);
|
|
||||||
disable_player_input();
|
disable_player_input();
|
||||||
gPlayerStatusPtr->currentSpeed = 0.0f;
|
gPlayerStatusPtr->currentSpeed = 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_802E117C(void) {
|
void func_802E117C(void) {
|
||||||
func_80027088(0);
|
func_80027088(FALSE);
|
||||||
enable_player_input();
|
enable_player_input();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -53,7 +51,7 @@ void save_game_at_player_position(void) {
|
|||||||
|
|
||||||
void func_802E1204(Entity* entity) {
|
void func_802E1204(Entity* entity) {
|
||||||
|
|
||||||
if (get_global_flag(0xF8405BDF) == 0) {
|
if (!get_global_flag(0xF8405BDF)) {
|
||||||
s32* temp = &D_802EB390;
|
s32* temp = &D_802EB390;
|
||||||
*temp = 0;
|
*temp = 0;
|
||||||
load_string(0x1D0000, temp);
|
load_string(0x1D0000, temp);
|
||||||
|
@ -9,11 +9,9 @@ void func_802E4AEC(s32 entityIndex) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void func_802E4B10(Entity* entity) {
|
void func_802E4B10(Entity* entity) {
|
||||||
f32 temp_f0;
|
|
||||||
Entity* entityTemp;
|
|
||||||
struct802E4B10* temp = entity->dataBuf;
|
struct802E4B10* temp = entity->dataBuf;
|
||||||
|
Entity* entityTemp = get_entity_by_index(temp->unk_00);
|
||||||
|
|
||||||
entityTemp = get_entity_by_index(temp->unk_00);
|
|
||||||
entity->position.x = entityTemp->position.x;
|
entity->position.x = entityTemp->position.x;
|
||||||
entity->position.y = entityTemp->position.y + 14.0f;
|
entity->position.y = entityTemp->position.y + 14.0f;
|
||||||
entity->position.z = entityTemp->position.z;
|
entity->position.z = entityTemp->position.z;
|
||||||
@ -66,7 +64,6 @@ void func_802E5308(Entity* entity) {
|
|||||||
func_802E3650(entity);
|
func_802E3650(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "code_105f90", func_802E5324);
|
INCLUDE_ASM(s32, "code_105f90", func_802E5324);
|
||||||
|
|
||||||
void func_802E540C(Entity* entity) {
|
void func_802E540C(Entity* entity) {
|
||||||
|
@ -39,7 +39,7 @@ u32 func_80025D74(void* arg0, const unsigned char* str, s32 count) {
|
|||||||
OSPiHandle** handle = &carthandle;
|
OSPiHandle** handle = &carthandle;
|
||||||
|
|
||||||
osEPiReadIo(*handle, 0xB3FF0000, &data);
|
osEPiReadIo(*handle, 0xB3FF0000, &data);
|
||||||
if (data != 0x49533634) {
|
if (data != ASCII_TO_U32('I', 'S', '6', '4')) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
osEPiReadIo(*handle, 0xB3FF0004, &data);
|
osEPiReadIo(*handle, 0xB3FF0004, &data);
|
||||||
|
@ -58,16 +58,16 @@ INCLUDE_ASM(s32, "code_109660_len_1270", func_802E854C);
|
|||||||
|
|
||||||
s32 func_802E8858(Entity* entity) {
|
s32 func_802E8858(Entity* entity) {
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
s32 phi_a0 = 0;
|
s32 phi_a0 = FALSE;
|
||||||
|
|
||||||
if (entity->unk_06 & 1) {
|
if (entity->unk_06 & 1) {
|
||||||
if ((playerStatus->actionState == ActionState_GROUND_POUND) || (playerStatus->actionState == ActionState_ULTRA_POUND)) {
|
if ((playerStatus->actionState == ActionState_GROUND_POUND) || (playerStatus->actionState == ActionState_ULTRA_POUND)) {
|
||||||
set_action_state(ActionState_FALLING);
|
set_action_state(ActionState_FALLING);
|
||||||
phi_a0 = 1;
|
phi_a0 = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (phi_a0 != 0) {
|
if (phi_a0) {
|
||||||
func_802E7F6C(entity);
|
func_802E7F6C(entity);
|
||||||
func_80110BCC(entity, &D_802EAE7C);
|
func_80110BCC(entity, &D_802EAE7C);
|
||||||
func_80110678(entity);
|
func_80110678(entity);
|
||||||
@ -82,16 +82,16 @@ void func_802E88EC(Entity* entity, f32 arg1) {
|
|||||||
struct802E7F40* temp = entity->dataBuf;
|
struct802E7F40* temp = entity->dataBuf;
|
||||||
|
|
||||||
if (temp->unk_00 != -1) {
|
if (temp->unk_00 != -1) {
|
||||||
s32 flag = 0;
|
s32 flag = FALSE;
|
||||||
|
|
||||||
// can't do || here, or gcc realizes it can reuse the temp->unk_04 load
|
// can't do || here, or gcc realizes it can reuse the temp->unk_04 load
|
||||||
if ((temp->unk_04 == 0xFFFF)) {
|
if (temp->unk_04 == 0xFFFF) {
|
||||||
flag = 1;
|
flag = TRUE;
|
||||||
} else if ((get_global_flag(temp->unk_04) == 0)) {
|
} else if (!get_global_flag(temp->unk_04)) {
|
||||||
flag = 1;
|
flag = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flag != 0) {
|
if (flag) {
|
||||||
make_item_entity(temp->unk_00, entity->position.x, entity->position.y + D_802EB370, entity->position.z, 0xA, 0,
|
make_item_entity(temp->unk_00, entity->position.x, entity->position.y + D_802EB370, entity->position.z, 0xA, 0,
|
||||||
func_800E546C(), temp->unk_04);
|
func_800E546C(), temp->unk_04);
|
||||||
}
|
}
|
||||||
@ -103,15 +103,16 @@ typedef struct struct802E89B0 {
|
|||||||
/* 0x04 */ s32 unk_04;
|
/* 0x04 */ s32 unk_04;
|
||||||
/* 0x08 */ s32 unk_08;
|
/* 0x08 */ s32 unk_08;
|
||||||
/* 0x0C */ s32 unk_0C;
|
/* 0x0C */ s32 unk_0C;
|
||||||
/* 0x10 */ char unk_10[4];
|
/* 0x10 */ s32 unk_10;
|
||||||
/* 0x14 */ s32 unk_14;
|
/* 0x14 */ s32 unk_14;
|
||||||
|
/* 0x18 */ f32 unk_18;
|
||||||
} struct802E89B0;
|
} struct802E89B0;
|
||||||
|
|
||||||
void func_802E89B0(Entity* entity) {
|
void func_802E89B0(Entity* entity) {
|
||||||
struct802E89B0* temp_s0;
|
struct802E89B0* temp_s0;
|
||||||
|
|
||||||
temp_s0 = entity->dataBuf;
|
temp_s0 = entity->dataBuf;
|
||||||
if (get_global_flag(temp_s0->unk_14) != 0) {
|
if (get_global_flag(temp_s0->unk_14)) {
|
||||||
temp_s0->unk_04 = 0x10;
|
temp_s0->unk_04 = 0x10;
|
||||||
func_8010FD68(entity);
|
func_8010FD68(entity);
|
||||||
}
|
}
|
||||||
|
@ -166,7 +166,6 @@ extern TlbMappablePage D_80197000;
|
|||||||
extern EffectTableEntry D_8007F210[135];
|
extern EffectTableEntry D_8007F210[135];
|
||||||
|
|
||||||
s32 play_effect(s32 effectIndex) {
|
s32 play_effect(s32 effectIndex) {
|
||||||
|
|
||||||
EffectTableEntry* effectTable = &D_8007F210[0];
|
EffectTableEntry* effectTable = &D_8007F210[0];
|
||||||
EffectTableEntry* effectEntry;
|
EffectTableEntry* effectEntry;
|
||||||
Effect* curEffect;
|
Effect* curEffect;
|
||||||
|
2
src/si.c
2
src/si.c
@ -112,7 +112,7 @@ ApiStatus si_handle_sleep_seconds(ScriptInstance* script) {
|
|||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
script->functionTemp[0].s -= 1;
|
script->functionTemp[0].s--;
|
||||||
return !script->functionTemp[0].s;
|
return !script->functionTemp[0].s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,14 +50,12 @@ ApiStatus func_80240000_8C7F90(ScriptInstance* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
#include "world/common/CheckPartnerFlags1000.inc.c"
|
#include "world/common/CheckPartnerFlags1000.inc.c"
|
||||||
|
|
||||||
// 8C85E0
|
|
||||||
Vec4f N(entryList)[] = {
|
Vec4f N(entryList)[] = {
|
||||||
{ -340.0f, 0.0f, 348.0f, 48.0f },
|
{ -340.0f, 0.0f, 348.0f, 48.0f },
|
||||||
{ 480.0f, 0.0f, 0.0f, 270.0f },
|
{ 480.0f, 0.0f, 0.0f, 270.0f },
|
||||||
{ -310.0f, 20.0f, -80.0f, 135.0f },
|
{ -310.0f, 20.0f, -80.0f, 135.0f },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
MapConfig N(config) = {
|
MapConfig N(config) = {
|
||||||
.main = N(Main),
|
.main = N(Main),
|
||||||
.entryList = N(entryList),
|
.entryList = N(entryList),
|
||||||
|
Loading…
Reference in New Issue
Block a user