1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-08 07:20:16 +00:00

Decompile z_play.c and Match/Document some of z_view.c (#74)

* Decompile z_play.c and Match/Document some of z_view.c

Also fix the last non matching in z_sample.c and update some game state functions.

* Suggestions from PR #74

* Fix undefined reference to Gameplay_DrawOverlay

* Suggestion from PR #74 (2)

* Fix a fake argument in func_800BC450
This commit is contained in:
Roman971 2020-04-16 23:36:12 +02:00 committed by GitHub
parent 9ac1f8130d
commit 262f6c507c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
278 changed files with 5139 additions and 5939 deletions

View file

@ -69,7 +69,7 @@ static ActorDamageChart damageChart = { {
{ 0x0, 0x2 }, { 0x0, 0x2 }, { 0x0, 0x8 }, { 0x0, 0x4 }, { 0x0, 0x0 }, { 0x0, 0x0 }, { 0x0, 0x4 }, { 0x0, 0x0 },
} };
static InitChainEntry initChain[3] = {
static InitChainEntry initChain[] = {
ICHAIN_S8(naviEnemyId, 0x30, 1),
ICHAIN_F32(unk_4C, 0x157C, 1),
ICHAIN_F32_DIV1000(gravity, 0xFA24, 0),
@ -295,7 +295,7 @@ void EnWallmas_WaitToDrop(EnWallmas* this, GlobalContext* globalCtx) {
void EnWallmas_Drop(EnWallmas* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
if ((func_8008E988(globalCtx) == 0) && (player->stateFlags2 & 0x10) == 0 && (player->unk_A78 >= 0) &&
if (!func_8008E988(globalCtx) && (player->stateFlags2 & 0x10) == 0 && (player->unk_A78 >= 0) &&
(this->actor.xzDistanceFromLink < 30.0f) && (this->actor.yDistanceFromLink < -5.0f) &&
(-(f32)(player->unk_4DA + 0xA) < this->actor.yDistanceFromLink)) {
EnWallmas_TakePlayerBegin(this, globalCtx);
@ -417,14 +417,14 @@ void EnWallmas_TakePlayer(EnWallmas* this, GlobalContext* globalCtx) {
this->actor.posRot.pos.y = this->actor.posRot.pos.y + 10.0f;
}
if (gSaveContext.link_age != 0) {
if (LINK_IS_CHILD) {
player->actor.posRot.pos.y = this->actor.posRot.pos.y - 30.0f;
} else {
player->actor.posRot.pos.y = this->actor.posRot.pos.y - 50.0f;
}
if (this->timer == -0x1E) {
if (gSaveContext.link_age != 0) {
if (LINK_IS_CHILD) {
func_8002F7DC(&this->actor, NA_SE_VO_LI_TAKEN_AWAY_KID);
} else {
func_8002F7DC(&this->actor, NA_SE_VO_LI_TAKEN_AWAY);
@ -436,8 +436,7 @@ void EnWallmas_TakePlayer(EnWallmas* this, GlobalContext* globalCtx) {
this->timer = this->timer + 2;
} else {
Math_ApproxF(&this->actor.posRot.pos.y,
player->actor.posRot.pos.y + (gSaveContext.link_age != 0 ? 30.0f : 50.0f), 5.0f);
Math_ApproxF(&this->actor.posRot.pos.y, player->actor.posRot.pos.y + (LINK_IS_CHILD ? 30.0f : 50.0f), 5.0f);
}
Math_ApproxF(&this->actor.posRot.pos.x, player->actor.posRot.pos.x, 3.0f);
@ -445,7 +444,7 @@ void EnWallmas_TakePlayer(EnWallmas* this, GlobalContext* globalCtx) {
if (this->timer == 0x1E) {
func_80078884(NA_SE_OC_ABYSS);
func_800C0C88(globalCtx);
Gameplay_TriggerRespawn(globalCtx);
}
}