1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-06 06:10:21 +00:00

Fix/cleanup/rephrase miscellaneous stuff (#983)

* Add parens around params usage in VEC_SET macro

* Remove unnecessary space character in a xml

* Use defines instead of magic values in head/tail magic comments

* Use `OS_USEC_TO_CYCLES` to make a time look better in `Graph_TaskSet00`

* `0x25800` -> `sizeof(u16[SCREEN_HEIGHT][SCREEN_WIDTH])`

* `0x803DA800` -> `0x80400000 - frame buffer size`

* Use `OS_VI_` defines instead of hex

* Add empty line after some variable declarations

* Remove unused `extern CutsceneData` in `z_bg_dy_yoseizo.c`

* `Matrix_MtxFToYXZRotS` does not use `MTXMODE_`

* Use `MTXMODE_` more

* Remove `ASCII_TO_U32`, use `'IS64'`

* Add explicit `!= NULL` in some ternaries

* Use `INV_CONTENT`, `AMMO` macros more

* Use `PLAYER_AP_` enum more to compare to `Player#heldItemActionParam`

* Get rid of lowercase hex (outside libultra)

* `gWindMill*` -> `gWindmill*`

* Format and small fix enums in `z_boss_mo.h`

* Use `CHECK_BTN_ANY` more

* Fix xz/xy mistake in comment in tektite

* Rephrase comments mentioning "the devs" in a more neutral way

* Clean-up some objectively useless parens

* Fix some negative values written as u16 instead of s16 in ichains

* `SKJ_ACTON_` -> `SKJ_ACTION_`

* Run formatter

* Fix unk_ offset of `TransformUpdateIndex#unk_10` -> `unk_0E`

* Remove comments using in-game text

* Remove `U` suffix from integer literals

* Revert "Remove `ASCII_TO_U32`, use `'IS64'`"

This reverts commit c801337dde.

* Use `PLAYER_STR_*` to compare to `CUR_UPG_VALUE(UPG_STRENGTH)`

* Add empty line after decl x2

* Revert "Use `PLAYER_STR_*` to compare to `CUR_UPG_VALUE(UPG_STRENGTH)`"

This reverts commit d80bdb32da.

* Make `CUR_UPG_VALUE(UPG_STRENGTH)` compare to integers (eventually needs its own enum)

* Only use `PLAYER_SHIELD_` enum with `Player#currentShield`

* Only use `PLAYER_TUNIC_` enum with `Player#currentTunic`
This commit is contained in:
Dragorn421 2021-10-03 05:17:09 +02:00 committed by GitHub
parent 5c95f70d59
commit f1d27bf653
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
82 changed files with 327 additions and 323 deletions

View file

@ -126,13 +126,13 @@ typedef enum {
/* 00 */ SKJ_ACTION_FADE,
/* 01 */ SKJ_ACTION_WAIT_TO_SHOOT_NEEDLE,
/* 02 */ SKJ_ACTION_SARIA_SONG_IDLE,
/* 03 */ SKJ_ACTON_WAIT_FOR_DEATH_ANIM,
/* 03 */ SKJ_ACTION_WAIT_FOR_DEATH_ANIM,
/* 04 */ SKJ_ACTION_PICK_NEXT_FIHGT_ACTION,
/* 05 */ SKJ_ACTON_WAIT_FOR_LAND_ANIM,
/* 06 */ SKJ_ACTON_RESET_FIGHT,
/* 07 */ SKJ_ACTON_FIGHT,
/* 08 */ SKJ_ACTON_NEEDLE_RECOVER,
/* 09 */ SKJ_ACTON_SPAWN_DEATH_EFFECT,
/* 05 */ SKJ_ACTION_WAIT_FOR_LAND_ANIM,
/* 06 */ SKJ_ACTION_RESET_FIGHT,
/* 07 */ SKJ_ACTION_FIGHT,
/* 08 */ SKJ_ACTION_NEEDLE_RECOVER,
/* 09 */ SKJ_ACTION_SPAWN_DEATH_EFFECT,
/* 10 */ SKJ_ACTION_SARIA_SONG_WAIT_IN_RANGE,
/* 11 */ SKJ_ACTION_SARIA_SONG_WAIT_FOR_SONG,
/* 12 */ SKJ_ACTION_SARIA_SONG_AFTER_SONG,
@ -307,9 +307,9 @@ void EnSkj_SetupAction(EnSkj* this, u8 action) {
switch (action) {
case SKJ_ACTION_FADE:
case SKJ_ACTON_WAIT_FOR_DEATH_ANIM:
case SKJ_ACTION_WAIT_FOR_DEATH_ANIM:
case SKJ_ACTION_PICK_NEXT_FIHGT_ACTION:
case SKJ_ACTON_SPAWN_DEATH_EFFECT:
case SKJ_ACTION_SPAWN_DEATH_EFFECT:
case SKJ_ACTION_SARIA_SONG_START_TRADE:
case SKJ_ACTION_SARIA_SONG_WAIT_FOR_LANDING:
case SKJ_ACTION_SARIA_SONG_WAIT_FOR_LANDING_ANIM:
@ -739,7 +739,7 @@ void EnSkj_SariasSongKidIdle(EnSkj* this, GlobalContext* globalCtx) {
void EnSkj_SetupDie(EnSkj* this) {
EnSkj_ChangeAnim(this, SKJ_ANIM_DIE);
EnSkj_SetupAction(this, SKJ_ACTON_WAIT_FOR_DEATH_ANIM);
EnSkj_SetupAction(this, SKJ_ACTION_WAIT_FOR_DEATH_ANIM);
}
void EnSkj_WaitForDeathAnim(EnSkj* this, GlobalContext* globalCtx) {
@ -772,7 +772,7 @@ void func_80AFF2A0(EnSkj* this) {
EnSkj_CalculateCenter(this);
this->actor.speedXZ = 0.0f;
EnSkj_ChangeAnim(this, SKJ_ANIM_LAND);
EnSkj_SetupAction(this, SKJ_ACTON_WAIT_FOR_LAND_ANIM);
EnSkj_SetupAction(this, SKJ_ACTION_WAIT_FOR_LAND_ANIM);
}
void EnSkj_WaitForLandAnim(EnSkj* this, GlobalContext* globalCtx) {
@ -788,7 +788,7 @@ void func_80AFF334(EnSkj* this) {
this->battleExitTimer = 400;
this->unk_2EC = 600.0f;
EnSkj_ChangeAnim(this, SKJ_ANIM_LOOK_LEFT_RIGHT);
EnSkj_SetupAction(this, SKJ_ACTON_RESET_FIGHT);
EnSkj_SetupAction(this, SKJ_ACTION_RESET_FIGHT);
}
void EnSkj_ResetFight(EnSkj* this, GlobalContext* globalCtx) {
@ -806,7 +806,7 @@ void EnSkj_SetupStand(EnSkj* this) {
this->unk_2F0 = 0.0f;
this->unk_2EC = 600.0f;
EnSkj_ChangeAnim(this, SKJ_ANIM_FIGHTING_STANCE);
EnSkj_SetupAction(this, SKJ_ACTON_FIGHT);
EnSkj_SetupAction(this, SKJ_ACTION_FIGHT);
}
void EnSkj_Fight(EnSkj* this, GlobalContext* globalCtx) {
@ -854,7 +854,7 @@ void EnSkj_Fight(EnSkj* this, GlobalContext* globalCtx) {
void EnSkj_SetupNeedleRecover(EnSkj* this) {
Animation_Reverse(&this->skelAnime);
EnSkj_SetupAction(this, SKJ_ACTON_NEEDLE_RECOVER);
EnSkj_SetupAction(this, SKJ_ACTION_NEEDLE_RECOVER);
}
void EnSkj_NeedleRecover(EnSkj* this, GlobalContext* globalCtx) {
@ -865,7 +865,7 @@ void EnSkj_NeedleRecover(EnSkj* this, GlobalContext* globalCtx) {
void EnSkj_SetupSpawnDeathEffect(EnSkj* this) {
this->backfilpFlag = 1;
EnSkj_SetupAction(this, SKJ_ACTON_SPAWN_DEATH_EFFECT);
EnSkj_SetupAction(this, SKJ_ACTION_SPAWN_DEATH_EFFECT);
}
void EnSkj_SpawnDeathEffect(EnSkj* this, GlobalContext* globalCtx) {