mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-07 06:40:15 +00:00
Decompile some more of z_player_lib (#137)
* Progress on z_player_lib, Named fields in Player struct * More functions decompiled * Matched another function * A few more functions * Ran formatter * Rename some variables and add comments where appropriate, change types of unknowns * Create PlayerActionFunc type * Fix uncaught syntax error and issues from effects merge * Rename invincible to invincibilityTimer, refactor long comments in Player struct * Properly rename all occurences of invincibilityTimer
This commit is contained in:
parent
b8b334f90a
commit
5df0e9b6f8
13 changed files with 567 additions and 67 deletions
|
@ -16,7 +16,7 @@ typedef struct EnBoom {
|
|||
/* 0x01D4 */ u8 returnTimer; // returns to Link when 0
|
||||
/* 0x01D5 */ u8 activeTimer; // increments once every update
|
||||
/* 0x01D8 */ u32 effectIndex; // set by Effect_Add
|
||||
/* 0x01DC */ u32 unk_1DC[0x7];
|
||||
/* 0x01DC */ Struct_80090480_arg2 unk_1DC;
|
||||
/* 0x01F8 */ EnBoomActionFunc actionFunc;
|
||||
} EnBoom; // size = 0x01FC
|
||||
|
||||
|
|
|
@ -788,7 +788,7 @@ void EnFloormas_GrabLink(EnFloormas* this, GlobalContext* globalCtx) {
|
|||
this->actor.posRot.pos.z = Math_Coss(this->actor.shape.rot.y) * (xzDelta * 0.1f) + player->actor.posRot.pos.z;
|
||||
|
||||
// let go
|
||||
if (!(player->stateFlags2 & 0x80) || (player->unk_A78 < 0)) {
|
||||
if (!(player->stateFlags2 & 0x80) || (player->invincibilityTimer < 0)) {
|
||||
attachedA = this->actor.attachedA;
|
||||
attachedB = this->actor.attachedB;
|
||||
|
||||
|
|
|
@ -881,7 +881,7 @@ void func_80AEC780(EnRu1* this, GlobalContext* globalCtx) {
|
|||
|
||||
globalCtx->csCtx.segment = &D_80AF0880;
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
player->unk_838 = 0.0f;
|
||||
player->linearVelocity = 0.0f;
|
||||
this->action = 8;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -297,7 +297,7 @@ void EnWallmas_WaitToDrop(EnWallmas* this, GlobalContext* globalCtx) {
|
|||
|
||||
void EnWallmas_Drop(EnWallmas* this, GlobalContext* globalCtx) {
|
||||
Player* player = PLAYER;
|
||||
if (!func_8008E988(globalCtx) && (player->stateFlags2 & 0x10) == 0 && (player->unk_A78 >= 0) &&
|
||||
if (!func_8008E988(globalCtx) && (player->stateFlags2 & 0x10) == 0 && (player->invincibilityTimer >= 0) &&
|
||||
(this->actor.xzDistanceFromLink < 30.0f) && (this->actor.yDistanceFromLink < -5.0f) &&
|
||||
(-(f32)(player->unk_4DA + 0xA) < this->actor.yDistanceFromLink)) {
|
||||
EnWallmas_TakePlayerBegin(this, globalCtx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue