mirror of
https://github.com/pmret/papermario.git
synced 2024-11-08 12:02:30 +01:00
PR comments
This commit is contained in:
parent
be25066ca5
commit
9ef9d08761
@ -5,9 +5,9 @@ void func_800287F0(void) {
|
||||
GameStatus* gameStatus;
|
||||
GameStatus* gameStatus2;
|
||||
|
||||
gameStatus = *gGameStatusPtr;
|
||||
gameStatus = GAME_STATUS;
|
||||
gameStatus->stickX = 0;
|
||||
gameStatus2 = *gGameStatusPtr;
|
||||
gameStatus2 = GAME_STATUS;
|
||||
gameStatus->currentButtons = 0;
|
||||
gameStatus->pressedButtons = 0;
|
||||
gameStatus->heldButtons = 0;
|
||||
@ -15,7 +15,7 @@ void func_800287F0(void) {
|
||||
|
||||
// TODO: macro
|
||||
{
|
||||
GameStatus* gameStatus = *gGameStatusPtr;
|
||||
GameStatus* gameStatus = GAME_STATUS;
|
||||
gameStatus->prevButtons = 0;
|
||||
gameStatus->unk_50[0] = 4;
|
||||
gameStatus->unk_48[0] = 15;
|
||||
|
@ -62,7 +62,7 @@ INCLUDE_ASM(s32, "code_42e0_len_1f60", func_80029860);
|
||||
s32 _advance_rng(void) {
|
||||
s32* rngVal = &gRandSeed;
|
||||
|
||||
(*gGameStatusPtr)->nextRNG = *rngVal = (*rngVal * 0x5D588B65) + 1;
|
||||
GAME_STATUS->nextRNG = *rngVal = (*rngVal * 0x5D588B65) + 1;
|
||||
|
||||
return *rngVal;
|
||||
}
|
||||
@ -106,7 +106,7 @@ f32 get_clamped_angle_diff(f32 a, f32 b) {
|
||||
INCLUDE_ASM(f32, "code_42e0_len_1f60", atan2, f32 startX, f32 startZ, f32 endX, f32 endZ);
|
||||
|
||||
f32 get_player_normal_yaw(void) {
|
||||
return atan2(0, 0, (*gGameStatusPtr)->playerTraceNormal.x, (*gGameStatusPtr)->playerTraceNormal.z);
|
||||
return atan2(0, 0, GAME_STATUS->playerTraceNormal.x, GAME_STATUS->playerTraceNormal.z);
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "code_42e0_len_1f60", get_player_normal_pitch);
|
||||
|
@ -190,18 +190,6 @@ void set_action_state(s32 actionState) {
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "code_7bb60_len_41b0", update_locomotion_state);
|
||||
/*void update_locomotion_state(void) {
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
ActionState actionState = ActionState_WALK;
|
||||
|
||||
if (!is_ability_active(Ability_SLOW_GO)) {
|
||||
actionState = ActionState_WALK;
|
||||
if (SQ(playerStatus->stickAxis[0]) + SQ(playerStatus->stickAxis[1]) >= 0xBD2) {
|
||||
actionState = ActionState_RUN;
|
||||
}
|
||||
}
|
||||
set_action_state(actionState);
|
||||
}*/
|
||||
|
||||
// todo these floats don't work
|
||||
#ifdef NON_MATCHING
|
||||
|
@ -280,7 +280,7 @@ void coin_counter_draw_content(UNK_TYPE arg0, s32 posX, s32 posY) {
|
||||
UiStatus* uiStatus = &gUIStatus;
|
||||
s32 iconIndex;
|
||||
|
||||
if ((gPlayerData.coins != uiStatus->displayCoins) && (((*gGameStatusPtr)->frameCounter % 3) == 0)) {
|
||||
if ((gPlayerData.coins != uiStatus->displayCoins) && ((GAME_STATUS->frameCounter % 3) == 0)) {
|
||||
play_sound(0x211);
|
||||
}
|
||||
|
||||
@ -514,7 +514,7 @@ s32 is_status_menu_visible(void) {
|
||||
}
|
||||
|
||||
void status_menu_start_blinking_hp(void) {
|
||||
GameStatus* gameStatus = (*gGameStatusPtr);
|
||||
GameStatus* gameStatus = GAME_STATUS;
|
||||
UiStatus* uiStatus = &gUIStatus;
|
||||
UiStatus* uiStatus2 = &gUIStatus;
|
||||
|
||||
@ -539,7 +539,7 @@ void status_menu_stop_blinking_hp(void) {
|
||||
}
|
||||
|
||||
void status_menu_start_blinking_fp(void) {
|
||||
GameStatus* gameStatus = (*gGameStatusPtr);
|
||||
GameStatus* gameStatus = GAME_STATUS;
|
||||
UiStatus* uiStatus = &gUIStatus;
|
||||
UiStatus* uiStatus2 = &gUIStatus;
|
||||
|
||||
@ -563,7 +563,7 @@ void status_menu_stop_blinking_fp(void) {
|
||||
}
|
||||
|
||||
void status_menu_start_blinking_coins(void) {
|
||||
GameStatus* gameStatus = (*gGameStatusPtr);
|
||||
GameStatus* gameStatus = GAME_STATUS;
|
||||
UiStatus* uiStatus = &gUIStatus;
|
||||
UiStatus* uiStatus2 = &gUIStatus;
|
||||
|
||||
|
@ -7,7 +7,7 @@ void default_trigger_function_handler(s32* arg0) {
|
||||
INCLUDE_ASM(s32, "code_dbd70_len_700", clear_trigger_data);
|
||||
|
||||
void init_trigger_list(void) {
|
||||
if ((*gGameStatusPtr)->isBattle == 0) {
|
||||
if (!GAME_STATUS->isBattle) {
|
||||
*gCurrentTriggerListPtr = gTriggerList1;
|
||||
} else {
|
||||
*gCurrentTriggerListPtr = gTriggerList2;
|
||||
|
@ -27,7 +27,7 @@ void load_map_bg(char* optAssetName) {
|
||||
}
|
||||
|
||||
void func_80145DF8(void) {
|
||||
GameStatus* gameStatus = *gGameStatusPtr;
|
||||
GameStatus* gameStatus = GAME_STATUS;
|
||||
D_801595A0 = 0;
|
||||
D_8014F12F = 0;
|
||||
|
||||
@ -36,7 +36,7 @@ void func_80145DF8(void) {
|
||||
}
|
||||
|
||||
void read_background_size(BackgroundHeader* bg) {
|
||||
GameStatus* gameStatus = *gGameStatusPtr;
|
||||
GameStatus* gameStatus = GAME_STATUS;
|
||||
|
||||
gameStatus->backgroundMaxW = bg->width;
|
||||
gameStatus->backgroundMaxH = bg->height;
|
||||
@ -48,7 +48,7 @@ void read_background_size(BackgroundHeader* bg) {
|
||||
}
|
||||
|
||||
void set_background_size(s16 startX, s16 startY, s16 sizeX, s16 sizeY) {
|
||||
GameStatus* gameStatus = *gGameStatusPtr;
|
||||
GameStatus* gameStatus = GAME_STATUS;
|
||||
|
||||
gameStatus->enableBackground &= ~1;
|
||||
gameStatus->backgroundMaxW = startX;
|
||||
|
@ -58,7 +58,7 @@ s32 play_ambient_sounds(s32 arg0, s32 arg1) {
|
||||
struct_80147230* temp1 = &D_8015C7C0;
|
||||
struct_80147230* temp2 = &D_8015C7C0;
|
||||
|
||||
if ((*gGameStatusPtr)->musicEnabled == 0) {
|
||||
if (!GAME_STATUS->musicEnabled) {
|
||||
func_800554A4(temp1->unk8, arg1);
|
||||
temp1->unk0 &= ~1;
|
||||
return 1;
|
||||
|
@ -1273,17 +1273,17 @@ ApiStatus GotoMapByID(ScriptInstance* script, s32 isInitialCall) {
|
||||
}
|
||||
|
||||
ApiStatus GetEntryID(ScriptInstance* script, s32 isInitialCall) {
|
||||
set_variable(script, *script->ptrReadPos, (*gGameStatusPtr)->entryID);
|
||||
set_variable(script, *script->ptrReadPos, GAME_STATUS->entryID);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetMapID(ScriptInstance* script, s32 isInitialCall) {
|
||||
set_variable(script, *script->ptrReadPos, (*gGameStatusPtr)->mapID);
|
||||
set_variable(script, *script->ptrReadPos, GAME_STATUS->mapID);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetLoadType(ScriptInstance* script, s32 isInitialCall) {
|
||||
set_variable(script, *script->ptrReadPos, (*gGameStatusPtr)->loadType != 0);
|
||||
set_variable(script, *script->ptrReadPos, GAME_STATUS->loadType != 0);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
|
@ -22,13 +22,13 @@ void step_init_state(void) {
|
||||
gameStatus->mapID = 0;
|
||||
gameStatus->entryID = 0;
|
||||
|
||||
(*gGameStatusPtr)->unk_76 = 0;
|
||||
(*gGameStatusPtr)->disableScripts = 0;
|
||||
(*gGameStatusPtr)->unk_7D = 0;
|
||||
(*gGameStatusPtr)->unk_A8 = -1;
|
||||
(*gGameStatusPtr)->unk_AA = 0;
|
||||
(*gGameStatusPtr)->unk_A9 = -1;
|
||||
(*gGameStatusPtr)->demoState = 0;
|
||||
GAME_STATUS->unk_76 = 0;
|
||||
GAME_STATUS->disableScripts = 0;
|
||||
GAME_STATUS->unk_7D = 0;
|
||||
GAME_STATUS->unk_A8 = -1;
|
||||
GAME_STATUS->unk_AA = 0;
|
||||
GAME_STATUS->unk_A9 = -1;
|
||||
GAME_STATUS->demoState = 0;
|
||||
|
||||
general_heap_create();
|
||||
func_8011D890();
|
||||
|
@ -1,13 +1,13 @@
|
||||
#include "common.h"
|
||||
|
||||
void intro_logos_set_fade_alpha(s16 new_alpha) {
|
||||
GameStatus* gameStatus = *gGameStatusPtr;
|
||||
GameStatus* gameStatus = GAME_STATUS;
|
||||
|
||||
gameStatus->bootAlpha = new_alpha;
|
||||
}
|
||||
|
||||
void intro_logos_set_fade_color(s16 arg0) {
|
||||
GameStatus* gameStatus = *gGameStatusPtr;
|
||||
GameStatus* gameStatus = GAME_STATUS;
|
||||
|
||||
gameStatus->bootRed = arg0;
|
||||
gameStatus->bootGreen = arg0;
|
||||
@ -15,7 +15,7 @@ void intro_logos_set_fade_color(s16 arg0) {
|
||||
}
|
||||
|
||||
s16 intro_logos_fade_in(subtract_val) {
|
||||
GameStatus* gameStatus = *gGameStatusPtr;
|
||||
GameStatus* gameStatus = GAME_STATUS;
|
||||
|
||||
if (gameStatus->bootAlpha != 0) {
|
||||
gameStatus->bootAlpha -= subtract_val;
|
||||
@ -29,7 +29,7 @@ s16 intro_logos_fade_in(subtract_val) {
|
||||
}
|
||||
|
||||
s16 intro_logos_fade_out(add_val) {
|
||||
GameStatus* gameStatus = *gGameStatusPtr;
|
||||
GameStatus* gameStatus = GAME_STATUS;
|
||||
|
||||
if (gameStatus->bootAlpha != 0xFF) {
|
||||
gameStatus->bootAlpha += add_val;
|
||||
|
Loading…
Reference in New Issue
Block a user