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

Decompile Player (#387)

* Setup player decomp

* Decompile z_player.c and z_player_lib.c

* Decompile remaining z_player.c functions

* Various player improvements

* Player progress (some non matchings and .data migrated)

* Player progress (reposition data and fix some non matchings)

* Cleanup, improve and document parts of z_player_lib.c/z_player.c

* Fix player renames in z_en_st.c

* Fix missing open/close disps in z_player.c

* Minor player fixes

* Address player comments
This commit is contained in:
Roman971 2020-09-19 03:45:39 +02:00 committed by GitHub
parent b29c268f37
commit 14191307e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
686 changed files with 16334 additions and 39630 deletions

View file

@ -350,7 +350,7 @@ void func_80A5399C(EnHeishi2* this, GlobalContext* globalCtx) {
var = 0;
if (gSaveContext.infTable[7] & 0x40) {
if (!(gSaveContext.infTable[7] & 0x80)) {
if (func_8008F080(globalCtx) == 1) {
if (Player_GetMask(globalCtx) == PLAYER_MASK_KEATON) {
if (this->unk_309 == 0) {
this->actor.textId = 0x200A; // "Wha-ha-ha-hah! Do you think you're in disguise, Mr. Hero?"
} else {
@ -401,19 +401,19 @@ void func_80A53AD4(EnHeishi2* this, GlobalContext* globalCtx) {
this->unk_300 = 6;
if (func_8002F194(&this->actor, globalCtx) != 0) {
exchangeItemId = func_8002F368(globalCtx);
if (exchangeItemId == 1) { // exchangeItemId = zelda's letter
if (exchangeItemId == EXCH_ITEM_LETTER_ZELDA) {
func_80078884(NA_SE_SY_CORRECT_CHIME);
player->actor.textId = 0x2010; // "Oh, this is...this is surely Princess Zelda's handwriting!"
this->unk_300 = 5;
this->actionFunc = func_80A53C0C;
} else if (exchangeItemId != 0) { // exchangeItemId != nothing
} else if (exchangeItemId != EXCH_ITEM_NONE) {
player->actor.textId = 0x200F; // "I don't want that!"
}
} else {
yawDiffTemp = this->actor.yawTowardsLink - this->actor.shape.rot.y;
yawDiff = ABS(yawDiffTemp);
if (!(120.0f < this->actor.xzDistFromLink) && (yawDiff < 0x4300)) {
func_8002F298(&this->actor, globalCtx, 100.0f, 1);
func_8002F298(&this->actor, globalCtx, 100.0f, EXCH_ITEM_LETTER_ZELDA);
}
}
}
@ -539,7 +539,7 @@ void func_80A540C0(EnHeishi2* this, GlobalContext* globalCtx) {
case 0:
this->actor.textId = 0x2020; // "My boy will be very happy with this!.."
func_8010B720(globalCtx, this->actor.textId);
func_8008F08C(globalCtx);
Player_UnsetMask(globalCtx);
gSaveContext.infTable[7] |= 0x80;
gSaveContext.itemGetInf[3] |= 0x100;
Item_Give(globalCtx, ITEM_SOLD_OUT);