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

Fix and improve some non matchings (#229)

This commit is contained in:
Roman971 2020-06-30 20:44:07 +02:00 committed by GitHub
parent b55fc9a4e0
commit 4a64c556b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 62 additions and 779 deletions

View file

@ -323,6 +323,7 @@ void BgSpot01Idohashira_Init(Actor* thisx, GlobalContext* globalCtx) {
}
#ifdef NON_MATCHING
// regalloc differences
void func_808AB700(BgSpot01Idohashira* this, GlobalContext* globalCtx) {
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
Gfx* dispRefs[5];

View file

@ -172,8 +172,6 @@ static SceneSelectEntry sScenes[] = {
{ "title", Select_LoadTitle, 0x0000 },
};
#ifdef NON_MATCHING
// mostly regalloc, a good amount of instruction ordering. confirmed equivalent in game.
void Select_UpdateMenu(SelectContext* this) {
Input* controller1;
s32 pad;
@ -315,7 +313,8 @@ void Select_UpdateMenu(SelectContext* this) {
}
if (CHECK_PAD(controller1->press, L_TRIG)) {
this->unk_1DC = (++this->unk_1DC + 7) % 7;
this->unk_1DC++;
this->unk_1DC = (this->unk_1DC + 7) % 7;
this->currentScene = this->unk_20C = this->unk_1E0[this->unk_1DC];
}
@ -324,10 +323,13 @@ void Select_UpdateMenu(SelectContext* this) {
if (this->unk_21C < -7) {
this->unk_220 = 0;
this->unk_21C = 0;
this->currentScene++;
this->currentScene = (this->currentScene + this->count) % this->count;
this->currentScene = (++this->currentScene + this->count) % this->count;
if (this->currentScene == ((this->unk_20C + this->count + 0x13) % this->count)) {
this->unk_20C = (++this->unk_20C + this->count) % this->count;
this->unk_20C++;
this->unk_20C = (this->unk_20C + this->count) % this->count;
}
}
@ -336,13 +338,16 @@ void Select_UpdateMenu(SelectContext* this) {
this->unk_21C = 0;
if (this->currentScene == this->unk_20C) {
this->unk_20C = ((this->unk_20C - 2) + this->count) % this->count;
this->unk_20C -= 2;
this->unk_20C = (this->unk_20C + this->count) % this->count;
}
this->currentScene = ((--this->currentScene) + this->count) % this->count;
this->currentScene--;
this->currentScene = (this->currentScene + this->count) % this->count;
if (this->currentScene == ((this->unk_20C + this->count) % this->count)) {
this->unk_20C = (--this->unk_20C + this->count) % this->count;
this->unk_20C--;
this->unk_20C = (this->unk_20C + this->count) % this->count;
}
}
@ -369,9 +374,6 @@ void Select_UpdateMenu(SelectContext* this) {
this->unk_230 = 0;
}
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/overlays/gamestates/ovl_select/Select_UpdateMenu.s")
#endif
void Select_PrintMenu(SelectContext* this, GfxPrint* printer) {
s32 scene;