mirror of
https://github.com/zeldaret/tmc
synced 2026-08-19 13:54:04 -04:00
cleanup
This commit is contained in:
+1
-1
@@ -65,7 +65,7 @@ void CollisionMain(void) {
|
||||
|
||||
doCollision = &gDoCollision;
|
||||
// Check to see if we should disable collision this frame
|
||||
if (gPlayerState.field_0x8b != 0) {
|
||||
if (gPlayerState.controlMode != CONTROL_ENABLED) {
|
||||
u32 flags = gPlayerEntity.flags;
|
||||
COLLISION_OFF(&gPlayerEntity);
|
||||
doCollision();
|
||||
|
||||
+2
-2
@@ -29,7 +29,7 @@ void PositionEntityOnTop(Entity* ent, Entity* ent2) {
|
||||
ResolveEntityOnTop(ent, ent2);
|
||||
}
|
||||
|
||||
void PositionRelative(Entity* source, Entity* target, s32 offsetX, s32 offsetY) { // r0, r1, r2, r3
|
||||
void PositionRelative(Entity* source, Entity* target, s32 offsetX, s32 offsetY) {
|
||||
s32 x;
|
||||
s32 y;
|
||||
|
||||
@@ -39,7 +39,7 @@ void PositionRelative(Entity* source, Entity* target, s32 offsetX, s32 offsetY)
|
||||
y = source->y.WORD;
|
||||
target->y.WORD = y + offsetY;
|
||||
|
||||
target->z = source->z; // ldr
|
||||
target->z = source->z;
|
||||
target->collisionLayer = source->collisionLayer;
|
||||
UpdateSpriteForCollisionLayer(target);
|
||||
}
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ Entity* CreateEnemy(u32 subtype, u32 form) {
|
||||
|
||||
enemy = GetEmptyEntity();
|
||||
if (enemy != NULL) {
|
||||
enemy->kind = 3;
|
||||
enemy->kind = ENEMY;
|
||||
enemy->id = subtype;
|
||||
enemy->type = form;
|
||||
AppendEntityToList(enemy, 4);
|
||||
|
||||
+13
-13
@@ -17,12 +17,12 @@ void sub_0805FA04(void) {
|
||||
DispReset(1);
|
||||
MemClear(&gBG0Buffer, sizeof(gBG0Buffer));
|
||||
MemClear(&gBG3Buffer, sizeof(gBG3Buffer));
|
||||
gScreen.lcd.displayControl = 0x940;
|
||||
gScreen.lcd.displayControl = DISPCNT_BG0_ON | DISPCNT_BG3_ON | DISPCNT_OBJ_1D_MAP;
|
||||
gScreen.bg0.xOffset = 0;
|
||||
gScreen.bg0.yOffset = 0;
|
||||
gScreen.bg3.xOffset = 0;
|
||||
gScreen.bg3.yOffset = 0;
|
||||
gScreen.bg3.control = 0x1e0f;
|
||||
gScreen.bg3.control = BGCNT_SCREENBASE(30) | BGCNT_PRIORITY(3) | BGCNT_CHARBASE(3);
|
||||
gScreen.bg3.updated = 1;
|
||||
MessageInitialize();
|
||||
MemClear((void*)&gUnk_02032EC0, sizeof(UI));
|
||||
@@ -39,35 +39,35 @@ void sub_0805FA98(void) {
|
||||
int iVar1;
|
||||
|
||||
switch (gInput.newKeys) {
|
||||
case 0x40:
|
||||
case DPAD_UP:
|
||||
gMenu.focusCoords[1] -= 1;
|
||||
break;
|
||||
case 0x80:
|
||||
case DPAD_DOWN:
|
||||
gMenu.focusCoords[1] += 1;
|
||||
break;
|
||||
case 0x200:
|
||||
case L_BUTTON:
|
||||
gMenu.focusCoords[0] ^= 1;
|
||||
if (gMenu.focusCoords[0] == 0) {
|
||||
gScreen.bg0.control = 0x1f0c;
|
||||
gScreen.bg3.control = 0x1e0f;
|
||||
gScreen.bg0.control = BGCNT_SCREENBASE(31) | BGCNT_CHARBASE(3);
|
||||
gScreen.bg3.control = BGCNT_SCREENBASE(30) | BGCNT_CHARBASE(3) | BGCNT_PRIORITY(3);
|
||||
} else {
|
||||
gScreen.bg0.control = 0x1f0f;
|
||||
gScreen.bg3.control = 0x1e0c;
|
||||
gScreen.bg0.control = BGCNT_SCREENBASE(31) | BGCNT_CHARBASE(3) | BGCNT_PRIORITY(3);
|
||||
gScreen.bg3.control = BGCNT_SCREENBASE(30) | BGCNT_CHARBASE(3);
|
||||
}
|
||||
break;
|
||||
case 0x100:
|
||||
case R_BUTTON:
|
||||
gSaveHeader->gameLanguage = gMenu.unk16;
|
||||
MessageFromTarget(gMenu.unk14 * 0x100 + gMenu.unk15);
|
||||
break;
|
||||
case 0x2:
|
||||
case B_BUTTON:
|
||||
MessageInitialize();
|
||||
break;
|
||||
default:
|
||||
switch (gInput.unk4) {
|
||||
case 0x20:
|
||||
case DPAD_LEFT:
|
||||
iVar1 = -1;
|
||||
break;
|
||||
case 0x10:
|
||||
case DPAD_RIGHT:
|
||||
iVar1 = 1;
|
||||
break;
|
||||
default:
|
||||
|
||||
+4
-4
@@ -31,14 +31,14 @@ void HandleChooseDemoScreen(void) {
|
||||
void sub_080A2E40(void) {
|
||||
DispReset(1);
|
||||
InitSoundPlayingInfo();
|
||||
MemClear((void*)0x6000000, 0x80);
|
||||
MemClear((void*)VRAM, 0x80);
|
||||
MessageInitialize();
|
||||
EraseAllEntities();
|
||||
sub_080ADD30();
|
||||
sub_0801CFA8(0);
|
||||
MemClear(&gUnk_02032EC0, 0x3b4);
|
||||
MemClear(&gChooseFileState, 0x30);
|
||||
MemClear(&gBG0Buffer, 0x800);
|
||||
MemClear(&gUnk_02032EC0, sizeof gUnk_02032EC0);
|
||||
MemClear(&gChooseFileState, sizeof gChooseFileState);
|
||||
MemClear(&gBG0Buffer, sizeof gBG0Buffer);
|
||||
sub_08053320();
|
||||
LoadPaletteGroup(0xb5);
|
||||
LoadGfxGroup(0x56);
|
||||
|
||||
@@ -81,7 +81,7 @@ void sub_080318DC(Entity* this) {
|
||||
}
|
||||
|
||||
if (this->health == 0) {
|
||||
this->knockbackDirection = ((this->knockbackDirection + (7 & Random())) - 4) & 0x1f;
|
||||
this->knockbackDirection = DirectionNormalize((this->knockbackDirection + (7 & Random())) - 4);
|
||||
this->knockbackDuration += this->type2 * 3;
|
||||
sub_08032338(this);
|
||||
}
|
||||
|
||||
+1
-1
@@ -150,7 +150,7 @@ void sub_08021984(Entity* this) {
|
||||
|
||||
void sub_08021A10(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (sub_080041A0(this, &gPlayerEntity, 120, 80) && sub_08021D00(this) == 0) {
|
||||
if (EntityInRectRadius(this, &gPlayerEntity, 120, 80) && sub_08021D00(this) == 0) {
|
||||
if (--this->actionDelay == 0) {
|
||||
this->action = 3;
|
||||
this->actionDelay = (Random() & 0x3f) + 30;
|
||||
|
||||
@@ -210,7 +210,7 @@ void sub_08028BC4(Entity* this) {
|
||||
if (iVar1 != NULL) {
|
||||
iVar1->spritePriority.b0 = 3;
|
||||
iVar1->z.HALF.HI -= 12;
|
||||
SetDefaultPriority(iVar1, 2);
|
||||
SetDefaultPriority(iVar1, PRIO_MESSAGE);
|
||||
}
|
||||
SetFlag(this->field_0x86.HWORD);
|
||||
sub_0802925C(this);
|
||||
@@ -390,14 +390,14 @@ void sub_08028F0C(Entity* this) {
|
||||
|
||||
bool32 sub_08028F98(Entity* this, u32 param_2) {
|
||||
Entity* ent = sub_08049DF4(1);
|
||||
if (ent == NULL || sub_080041A0(this, ent, 0x28, 0x28)) {
|
||||
if (ent == NULL || EntityInRectRadius(this, ent, 0x28, 0x28)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (param_2 != 2) {
|
||||
u32 distance = param_2 ? 0x58 : 0x50;
|
||||
|
||||
if (!sub_080041A0(this, ent, distance, distance)) {
|
||||
if (!EntityInRectRadius(this, ent, distance, distance)) {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ u32 sub_08022B20(Entity* this) {
|
||||
if (!sub_08049DF4(2))
|
||||
return 0;
|
||||
|
||||
return sub_080041A0(this, &gPlayerEntity, 0x24, 0x24);
|
||||
return EntityInRectRadius(this, &gPlayerEntity, 36, 36);
|
||||
}
|
||||
|
||||
void sub_08022B44(Entity* this) {
|
||||
|
||||
+2
-2
@@ -180,7 +180,7 @@ void sub_08020E78(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08020E98(Entity* this) {
|
||||
if (PlayerInRange(this, 1, 0x38)) {
|
||||
if (PlayerInRange(this, 1, 56)) {
|
||||
if (sub_0802169C(this, gUnk_020000B0)) {
|
||||
this->action = 8;
|
||||
sub_08021218(this, 7, this->animationState);
|
||||
@@ -190,7 +190,7 @@ void sub_08020E98(Entity* this) {
|
||||
this->action = 8;
|
||||
sub_08021218(this, 7, this->animationState);
|
||||
} else {
|
||||
this->direction ^= 0x10;
|
||||
this->direction = DirectionTurnAround(this->direction);
|
||||
sub_0802124C(this);
|
||||
sub_08021644(this);
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ void sub_08045454(Entity* this) {
|
||||
|
||||
/* Can we create enough new entities? */
|
||||
count = gUnk_080D180C[this->type];
|
||||
if (72 - count <= gEntCount)
|
||||
if (MAX_ENTITIES + 1 - count <= gEntCount)
|
||||
return;
|
||||
|
||||
/* Create 2-5 new MiniFireballGuy */
|
||||
|
||||
+1
-1
@@ -143,7 +143,7 @@ void sub_080325C4(Entity* this) {
|
||||
|
||||
u32 sub_080325E8(Entity* this) {
|
||||
if (((sub_08049FA0(this) != 0) && (sub_08049FDC(this, 1) != 0)) &&
|
||||
(sub_080041A0(this, gUnk_020000B0, 0x68, 0x40) != 0)) {
|
||||
(EntityInRectRadius(this, gUnk_020000B0, 0x68, 0x40) != 0)) {
|
||||
if (((GetFacingDirection(this, gUnk_020000B0) - (DirectionRound(this->frame)) + 2) & 0x1F) < 5) {
|
||||
this->action = 3;
|
||||
this->actionDelay = 0xC;
|
||||
|
||||
+1
-1
@@ -241,7 +241,7 @@ void Lakitu_Cloudless(Entity* this) {
|
||||
|
||||
bool32 sub_0803CA4C(Entity* this) {
|
||||
if (sub_0806FCB8(this, gPlayerEntity.x.HALF.HI, gPlayerEntity.y.HALF.HI, 0x28) == 0) {
|
||||
if (sub_080041A0(this, &gPlayerEntity, 0x70, 0x50)) {
|
||||
if (EntityInRectRadius(this, &gPlayerEntity, 0x70, 0x50)) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ void sub_08027DA4(Entity* this) {
|
||||
|
||||
void sub_08027E40(Entity* this) {
|
||||
if (this->actionDelay == 2 && this->field_0x80.HALF.LO != 0xff) {
|
||||
SetDefaultPriority(this, 3);
|
||||
SetDefaultPriority(this, PRIO_NO_BLOCK);
|
||||
sub_08028224(this->field_0x80.HALF.LO);
|
||||
}
|
||||
sub_0804A7D4(this);
|
||||
|
||||
@@ -224,7 +224,7 @@ void sub_08033FFC(Entity* this) {
|
||||
if (((*(Entity**)&this->field_0x74)->flags & 0x80) != 0) {
|
||||
gRoomControls.cameraTarget = &gPlayerEntity;
|
||||
sub_08034420(this);
|
||||
gPlayerState.field_0x8b = 1;
|
||||
gPlayerState.controlMode = 1;
|
||||
sub_080791D0();
|
||||
SoundReq(BGM_BOSS_THEME);
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ void sub_080231BC(Entity* this) {
|
||||
this->field_0x78.HWORD = 0x1e;
|
||||
this->palette.b.b0 = 5;
|
||||
this->direction = Random() & 0x1f;
|
||||
this->animationState = Direction8ToAnimationState(this->direction);
|
||||
this->animationState = Direction8ToAnimationState(Direction8RoundUp(this->direction));
|
||||
InitializeAnimation(this, this->animationState);
|
||||
}
|
||||
}
|
||||
@@ -225,7 +225,7 @@ void sub_08023398(Entity* this) {
|
||||
u32 uVar4;
|
||||
|
||||
sub_08004596(this, sub_08049F84(this, 1));
|
||||
uVar4 = Direction8ToAnimationState(this->direction);
|
||||
uVar4 = Direction8ToAnimationState(Direction8RoundUp(this->direction));
|
||||
if (uVar4 != this->animationState) {
|
||||
this->animationState = uVar4;
|
||||
InitializeAnimation(this, uVar4 + this->field_0x7a.HALF.HI);
|
||||
@@ -249,7 +249,7 @@ void sub_080234D8(Entity* this) {
|
||||
this->action = 2;
|
||||
this->palette.b.b0 = 5;
|
||||
this->direction = Random() & 0x1f;
|
||||
this->animationState = Direction8ToAnimationState(this->direction);
|
||||
this->animationState = Direction8ToAnimationState(Direction8RoundUp(this->direction));
|
||||
sub_08023A88(this, this->animationState);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -403,7 +403,7 @@ void sub_080244E8(Entity* this) {
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (sub_080041A0(this, this->child, 6, 6)) {
|
||||
if (EntityInRectRadius(this, this->child, 6, 6)) {
|
||||
Entity* ent;
|
||||
|
||||
this->field_0x80.HALF.LO += 1;
|
||||
@@ -424,7 +424,7 @@ void sub_080244E8(Entity* this) {
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (sub_080041A0(this, this->child, 6, 6)) {
|
||||
if (EntityInRectRadius(this, this->child, 6, 6)) {
|
||||
Entity* ent;
|
||||
|
||||
this->field_0x80.HALF.LO += 1;
|
||||
|
||||
+1
-1
@@ -95,7 +95,7 @@ void sub_080450A8(Entity* this) {
|
||||
|
||||
/* Can we create enough new entities? */
|
||||
count = gUnk_080D16D0[this->type];
|
||||
if (72 - count <= gEntCount)
|
||||
if (MAX_ENTITIES + 1 - count <= gEntCount)
|
||||
return;
|
||||
|
||||
/* Create 2-4 new MiniSlime */
|
||||
|
||||
@@ -220,7 +220,7 @@ void VaatiWrathType0Action1(Entity* this) {
|
||||
this->actionDelay = 0x1e;
|
||||
gScreenTransition.field_0x38 |= 1;
|
||||
gRoomControls.cameraTarget = &gPlayerEntity;
|
||||
gPlayerState.field_0x8b = 1;
|
||||
gPlayerState.controlMode = 1;
|
||||
break;
|
||||
default:
|
||||
sub_08042004(this);
|
||||
@@ -567,7 +567,7 @@ void sub_08041BE8(Entity* this) {
|
||||
if (sub_08079F8C() != 0) {
|
||||
this->subAction = 1;
|
||||
this->actionDelay = 120;
|
||||
this->updatePriority = 3;
|
||||
this->updatePriority = PRIO_NO_BLOCK;
|
||||
InitAnimationForceUpdate(this, 10);
|
||||
|
||||
entity = ((VaatiWrathHeapStruct*)this->myHeap)->type1;
|
||||
@@ -576,7 +576,7 @@ void sub_08041BE8(Entity* this) {
|
||||
((VaatiWrathHeapStruct*)this->myHeap)->type1 = NULL;
|
||||
|
||||
entity = ((VaatiWrathHeapStruct*)this->myHeap)->type2;
|
||||
entity->updatePriority = 3;
|
||||
entity->updatePriority = PRIO_NO_BLOCK;
|
||||
sub_080AE068(entity);
|
||||
LoadFixedGFX(entity, 0x1f5);
|
||||
sub_0801D2B4(entity, 0x16b);
|
||||
|
||||
+5
-5
@@ -136,15 +136,15 @@ void ResetEntityPriority(void) {
|
||||
|
||||
void RequestPriority(Entity* this) {
|
||||
this->updatePriorityPrev = this->updatePriority;
|
||||
this->updatePriority = PRIO_REQUESTED;
|
||||
if (SetMinPriority(PRIO_REQUESTED))
|
||||
this->updatePriority = PRIO_MESSAGE;
|
||||
if (SetMinPriority(PRIO_MESSAGE))
|
||||
gPriorityHandler.requester = this;
|
||||
}
|
||||
|
||||
void RequestPriorityOverPlayer(Entity* this) {
|
||||
SetPlayerControl(1);
|
||||
this->updatePriorityPrev = this->updatePriority;
|
||||
this->updatePriority = PRIO_OVERRIDE_MESSAGE;
|
||||
this->updatePriority = PRIO_NO_BLOCK;
|
||||
if (SetMinPriority(PRIO_PLAYER))
|
||||
gPriorityHandler.requester = this;
|
||||
}
|
||||
@@ -157,7 +157,7 @@ void RevokePriorityOverPlayer(Entity* this) {
|
||||
void RequestPriorityDuration(Entity* this, u32 time) {
|
||||
if (this != NULL) {
|
||||
this->updatePriorityPrev = this->updatePriority;
|
||||
this->updatePriority = PRIO_OVERRIDE_MESSAGE;
|
||||
this->updatePriority = PRIO_NO_BLOCK;
|
||||
}
|
||||
if (SetMinPriority(PRIO_PLAYER))
|
||||
gPriorityHandler.requester = this;
|
||||
@@ -197,7 +197,7 @@ void SetRoomReloadPriority() {
|
||||
}
|
||||
|
||||
void SetInitializationPriority() {
|
||||
gPriorityHandler.sys_priority = PRIO_INITIALIZING;
|
||||
gPriorityHandler.sys_priority = PRIO_HIGHEST;
|
||||
}
|
||||
|
||||
void ResetSystemPriority() {
|
||||
|
||||
+4
-4
@@ -38,9 +38,9 @@ void DoFade(u32 fadeType, u32 fadeSpeed) {
|
||||
}
|
||||
if ((fadeType & 8) != 0) {
|
||||
gUnk_03000000.spritesOffset = 1;
|
||||
gScreen.bg1.control |= 0x40;
|
||||
gScreen.bg2.control |= 0x40;
|
||||
gScreen.bg3.control |= 0x40;
|
||||
gScreen.bg1.control |= BGCNT_MOSAIC;
|
||||
gScreen.bg2.control |= BGCNT_MOSAIC;
|
||||
gScreen.bg3.control |= BGCNT_MOSAIC;
|
||||
}
|
||||
if ((fadeType & 0x10) != 0) {
|
||||
sub_0801E1B8(gFadeControl.field_0x16, gFadeControl.field_0x18);
|
||||
@@ -57,7 +57,7 @@ void sub_080500F4(u32 arg0) {
|
||||
gFadeControl.fadeSpeed = arg0;
|
||||
gFadeControl.fadeType ^= 1;
|
||||
gFadeControl.active = 1;
|
||||
gFadeControl.fadeDuration = 0x100;
|
||||
gFadeControl.fadeDuration = 256;
|
||||
}
|
||||
|
||||
void sub_08050110(u32 param_1, u32 param_2, u32 fadeType, u32 fadeSpeed) {
|
||||
|
||||
+1
-9
@@ -1,12 +1,4 @@
|
||||
// #define DEF_FLAGS( name, ... ) \
|
||||
// const char* const name##_flags[] = { \
|
||||
// "BEGIN", \
|
||||
// __VA_ARGS__ \
|
||||
// "END" \
|
||||
// };
|
||||
|
||||
// DEF_FLAGS(global, "a",
|
||||
// "b");
|
||||
#include "flags.h"
|
||||
|
||||
const char* const globalFlagNames[] = {
|
||||
"BEGIN",
|
||||
|
||||
+13
-13
@@ -71,8 +71,8 @@ void DummyIntr(void) {
|
||||
|
||||
void EnableVBlankIntr(void) {
|
||||
INTR_VECTOR = gIntrMain;
|
||||
REG_DISPSTAT = 0x5028;
|
||||
REG_IE = 0x2005;
|
||||
REG_DISPSTAT = DISPSTAT_VCOUNT_INTR | DISPSTAT_VBLANK_INTR | (80 << 8);
|
||||
REG_IE = INTR_FLAG_VBLANK | INTR_FLAG_VCOUNT | INTR_FLAG_GAMEPAK;
|
||||
REG_IME = 1;
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ void VBlankIntr(void) {
|
||||
}
|
||||
|
||||
void HBlankIntr(void) {
|
||||
REG_DISPSTAT = 0x5028;
|
||||
REG_DISPSTAT = DISPSTAT_VCOUNT_INTR | DISPSTAT_VBLANK_INTR | (80 << 8);
|
||||
m4aSoundMain();
|
||||
}
|
||||
|
||||
@@ -111,9 +111,9 @@ void sub_08016BF8(void) {
|
||||
}
|
||||
|
||||
void UpdateDisplayControls(void) {
|
||||
if (gUnk_03000000.update && ((gScreen.lcd.displayControl & 0x1000) != 0)) {
|
||||
if (gUnk_03000000.update && (gScreen.lcd.displayControl & DISPCNT_OBJ_ON)) {
|
||||
gUnk_03000000.update = 0;
|
||||
DmaCopy32(3, &gUnk_03000000.oam, 0x07000000, 0x400);
|
||||
DmaCopy32(3, &gUnk_03000000.oam, OAM, OAM_SIZE);
|
||||
}
|
||||
sub_08016CA8(&gScreen.bg0);
|
||||
sub_08016CA8(&gScreen.bg1);
|
||||
@@ -126,7 +126,7 @@ void sub_08016CA8(BgSettings* bg) {
|
||||
u32 dest;
|
||||
bg->updated = 0;
|
||||
dest = bg->control;
|
||||
DmaCopy32(3, bg->tilemap, ((dest << 3) & 0xF800) + 0x06000000, gUnk_080B2CD8[dest >> 14]);
|
||||
DmaCopy32(3, bg->tilemap, ((dest << 3) & 0xF800) + VRAM, gUnk_080B2CD8[dest >> 14]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,9 +189,9 @@ void PlayerUpdate(Entity* this) {
|
||||
if ((gPlayerState.flags & 0x80000) != 0) {
|
||||
sub_08077B20();
|
||||
if ((gPlayerState.flags & 0x200000) != 0) {
|
||||
gPlayerState.playerAction = 0x18;
|
||||
gPlayerState.playerAction = PLAYER_ROLL;
|
||||
gPlayerState.flags &= ~0x80000;
|
||||
gPlayerState.hurtBlinkSpeed = 0xf0;
|
||||
gPlayerState.hurtBlinkSpeed = 240;
|
||||
COLLISION_ON(this);
|
||||
} else {
|
||||
COLLISION_OFF(this);
|
||||
@@ -224,7 +224,7 @@ void HandlePlayerLife(Entity* this) {
|
||||
SoundReq(SFX_86);
|
||||
|
||||
gPlayerState.flags &= ~(0x2000000 | 0x200);
|
||||
if (gPlayerState.flags & 0x400)
|
||||
if (gPlayerState.flags & PL_BURNING)
|
||||
ResetPlayer();
|
||||
if ((gPlayerState.flags & 0x400000) && !gPlayerState.field_0xa0[0])
|
||||
sub_0807A108();
|
||||
@@ -242,7 +242,7 @@ void HandlePlayerLife(Entity* this) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((gPlayerState.field_0x8b != 0) || (gMessage.doTextBox & 0x7f))
|
||||
if ((gPlayerState.controlMode != CONTROL_ENABLED) || (gMessage.doTextBox & 0x7f))
|
||||
return;
|
||||
|
||||
gRoomVars.unk2 = gMessage.doTextBox & 0x7f;
|
||||
@@ -294,7 +294,7 @@ void sub_080171F0(void) {
|
||||
gPlayerEntity.field_0x7a.HWORD--;
|
||||
|
||||
gPlayerEntity.bitfield &= ~0x80;
|
||||
if (gPlayerEntity.action != 0x14)
|
||||
if (gPlayerEntity.action != PLAYER_DROWN)
|
||||
COPY_FLAG_FROM_TO(gPlayerState.flags, 0x2, 0x10000);
|
||||
|
||||
gPlayerState.flags &= ~2;
|
||||
@@ -318,7 +318,7 @@ void sub_080171F0(void) {
|
||||
if (gPlayerState.flags & 0x400000)
|
||||
gUnk_03004040[0]->spriteOffsetY = gUnk_03004040[1]->spriteOffsetY = gUnk_03004040[2]->spriteOffsetY = 0;
|
||||
|
||||
if (gPlayerEntity.action == 0x1d)
|
||||
if (gPlayerEntity.action == PLAYER_08072F34)
|
||||
gPlayerState.flags |= 0x20000000;
|
||||
else
|
||||
gPlayerState.flags &= ~0x20000000;
|
||||
@@ -327,7 +327,7 @@ void sub_080171F0(void) {
|
||||
if (gPlayerState.jumpStatus & 0xc0)
|
||||
gPlayerEntity.iframes = 0xfe;
|
||||
|
||||
if (gPlayerEntity.action != 0x17) {
|
||||
if (gPlayerEntity.action != PLAYER_ROOMTRANSITION) {
|
||||
sub_08077FEC(gPlayerEntity.action);
|
||||
}
|
||||
}
|
||||
|
||||
+5
-5
@@ -158,17 +158,17 @@ static void HandleTitlescreen(void) {
|
||||
// Blend first and second layer
|
||||
gScreen.controls.layerFXControl = BLDCNT_TGT1_BG2 | BLDCNT_TGT2_BG3 | BLDCNT_EFFECT_BLEND;
|
||||
gScreen.controls.alphaBlend = BLDALPHA_BLEND(9, 9);
|
||||
gScreen.bg1.control = 0x1c09;
|
||||
gScreen.bg1.control = BGCNT_SCREENBASE(28) | BGCNT_PRIORITY(1) | BGCNT_CHARBASE(2);
|
||||
gScreen.bg2.control = BGCNT_SCREENBASE(29) | BGCNT_PRIORITY(2);
|
||||
gScreen.bg3.control = BGCNT_SCREENBASE(30) | BGCNT_PRIORITY(3);
|
||||
gScreen.lcd.displayControl |= DISPCNT_BG1_ON | DISPCNT_BG2_ON | DISPCNT_BG3_ON | DISPCNT_OBJ_ON;
|
||||
gScreen.bg1.yOffset = 0xff60;
|
||||
gScreen.bg1.yOffset = -160;
|
||||
} else {
|
||||
gScreen.controls.layerFXControl = BLDCNT_TGT1_BG0 | BLDCNT_TGT2_BG1 | BLDCNT_EFFECT_BLEND;
|
||||
gScreen.controls.alphaBlend = BLDALPHA_BLEND(9, 9);
|
||||
gScreen.bg0.control = BGCNT_SCREENBASE(29) | BGCNT_PRIORITY(2);
|
||||
gScreen.bg1.control = 0x1E03;
|
||||
gScreen.bg2.control = BGCNT_PRIORITY(1) | BGCNT_CHARBASE(2) | BGCNT_256COLOR | BGCNT_SCREENBASE(28) |
|
||||
gScreen.bg1.control = BGCNT_SCREENBASE(30) | BGCNT_PRIORITY(3);
|
||||
gScreen.bg2.control = BGCNT_SCREENBASE(28) | BGCNT_PRIORITY(1) | BGCNT_CHARBASE(2) | BGCNT_256COLOR |
|
||||
BGCNT_WRAP | BGCNT_TXT512x256;
|
||||
gScreen.lcd.displayControl |= DISPCNT_MODE_1;
|
||||
gScreen.lcd.displayControl |= DISPCNT_BG0_ON | DISPCNT_BG1_ON | DISPCNT_OBJ_ON;
|
||||
@@ -284,7 +284,7 @@ static void HandleJapaneseTitlescreenAnimationIntro(void) {
|
||||
if (GetAdvanceState() == ADVANCE_KEY_PRESSED || gScreen.bg1.yOffset == 0) {
|
||||
gIntroState.subState++;
|
||||
gScreen.bg1.yOffset = 0;
|
||||
gScreen.bg1.control = 0xc09;
|
||||
gScreen.bg1.control = BGCNT_SCREENBASE(12) | BGCNT_PRIORITY(1) | BGCNT_CHARBASE(2);
|
||||
gFadeControl.mask = 0x00000040;
|
||||
DoFade(6, 0x10);
|
||||
SoundReq(SFX_F8);
|
||||
|
||||
@@ -61,7 +61,7 @@ void sub_080768F8(ItemBehavior* this, u32 arg1) {
|
||||
if ((gPlayerState.flags & PL_MINISH) == 0) {
|
||||
this->field_0x5[2] = 0x10;
|
||||
} else {
|
||||
gPlayerState.field_0x8 = 0xc14;
|
||||
gPlayerState.animation = 0xc14;
|
||||
}
|
||||
sub_08077D38(this, arg1);
|
||||
sub_08076964(this, arg1);
|
||||
|
||||
@@ -72,7 +72,7 @@ void sub_08076758(ItemBehavior* this, u32 arg1) {
|
||||
gPlayerEntity.field_0x7a.HWORD = 2;
|
||||
gPlayerEntity.zVelocity = 0x20000;
|
||||
gPlayerState.jumpStatus |= 0x10;
|
||||
gPlayerState.field_0x8 = 0x288;
|
||||
gPlayerState.animation = 0x288;
|
||||
SoundReq(SFX_172);
|
||||
}
|
||||
} else {
|
||||
|
||||
+23
-23
@@ -18,7 +18,7 @@ extern void HandleGameOverScreen(void);
|
||||
extern void HandleCreditsScreen(void);
|
||||
extern void HandleDebugTextScreen(void);
|
||||
|
||||
static void sub_08055F70(void);
|
||||
static void InitOverlays(void);
|
||||
static bool32 SoftResetKeysPressed(void);
|
||||
|
||||
void (*const sScreenHandlers[])(void) = {
|
||||
@@ -40,7 +40,7 @@ static void sub_080560B8(void);
|
||||
void AgbMain(void) {
|
||||
int var0;
|
||||
|
||||
sub_08055F70();
|
||||
InitOverlays();
|
||||
InitSound();
|
||||
InitDMA();
|
||||
InitSaveData();
|
||||
@@ -101,7 +101,7 @@ extern u8 gUnk_080B2CD8_2[];
|
||||
extern u8 gUnk_080B2CD8_3[];
|
||||
extern u8 gUnk_02000030[];
|
||||
|
||||
static void sub_08055F70(void) {
|
||||
static void InitOverlays(void) {
|
||||
u32 size;
|
||||
|
||||
DisableInterruptsAndDMA();
|
||||
@@ -185,15 +185,15 @@ NONMATCH("asm/non_matching/sub_080560B8.inc", static void sub_080560B8(void)) {
|
||||
u32 temp;
|
||||
u32 b;
|
||||
|
||||
if (!sub_08056134()) {
|
||||
switch ((s32)Read_02000000((void*)0x2000000)) {
|
||||
if (!CheckHeaderValid()) {
|
||||
switch ((s32)Read_02000000(gSaveHeader)) {
|
||||
case 1:
|
||||
if (sub_08056134())
|
||||
if (CheckHeaderValid())
|
||||
break;
|
||||
case 0:
|
||||
case -1:
|
||||
default:
|
||||
MemCopy(&sDefaultSettings, (void*)0x2000000, 16);
|
||||
MemCopy(&sDefaultSettings, gSaveHeader, sizeof *gSaveHeader);
|
||||
Write_02000000(gSaveHeader);
|
||||
break;
|
||||
}
|
||||
@@ -206,14 +206,13 @@ NONMATCH("asm/non_matching/sub_080560B8.inc", static void sub_080560B8(void)) {
|
||||
b = TRUE;
|
||||
}
|
||||
if (b) {
|
||||
MemClear((u8*)&gUnk_02000010.signature, 0x20);
|
||||
MemClear(&gUnk_02000010, sizeof gUnk_02000010);
|
||||
gUnk_02000010.signature = SIGNATURE;
|
||||
}
|
||||
}
|
||||
END_NONMATCH
|
||||
|
||||
u32 sub_08056134(void) {
|
||||
|
||||
u32 CheckHeaderValid(void) {
|
||||
if ((gSaveHeader->signature != SIGNATURE) || (gSaveHeader->saveFileId >= NUM_SAVE_SLOTS) ||
|
||||
(gSaveHeader->messageSpeed >= MAX_MSG_SPEED) || (gSaveHeader->brightnessPref >= MAX_BRIGHTNESS)
|
||||
#ifdef EU
|
||||
@@ -259,26 +258,27 @@ void sub_08056250() {
|
||||
}
|
||||
|
||||
void sub_08056260(void) {
|
||||
u32 temp;
|
||||
Main* temp2;
|
||||
u32 restore;
|
||||
Main* m;
|
||||
|
||||
REG_DISPCNT = 0x80;
|
||||
REG_KEYCNT = 0x8304;
|
||||
REG_DISPCNT = DISPCNT_FORCED_BLANK;
|
||||
REG_KEYCNT = KEY_AND_INTR | L_BUTTON | R_BUTTON | SELECT_BUTTON;
|
||||
REG_IME = 0;
|
||||
temp = REG_IE;
|
||||
REG_IE = 0x3000;
|
||||
restore = REG_IE;
|
||||
REG_IE = INTR_FLAG_KEYPAD | INTR_FLAG_GAMEPAK;
|
||||
REG_IME = 1;
|
||||
Stop();
|
||||
REG_IME = 0;
|
||||
REG_IE = temp;
|
||||
REG_IE = restore;
|
||||
REG_IME = 1;
|
||||
temp2 = &gMain;
|
||||
asm("ldrb r1, [r0, #0x1]");
|
||||
temp2->field_0x1 = 0;
|
||||
m = &gMain;
|
||||
*(vu8*)&m->field_0x1; // force a read
|
||||
m->field_0x1 = 0;
|
||||
}
|
||||
|
||||
|
||||
// Convert AABB to screen coordinates and check if it's within the viewport
|
||||
u32 sub_080562CC(u32 x0, u32 y0, u32 x1, u32 y1) {
|
||||
u32 CheckRegionOnScreen(u32 x0, u32 y0, u32 x1, u32 y1) {
|
||||
u32 result;
|
||||
u32 x = ((gRoomControls.roomScrollX - gRoomControls.roomOriginX) - x0 + DISPLAY_WIDTH);
|
||||
u32 y = ((gRoomControls.roomScrollY - gRoomControls.roomOriginY) - y0 + DISPLAY_HEIGHT);
|
||||
@@ -292,10 +292,10 @@ u32 sub_080562CC(u32 x0, u32 y0, u32 x1, u32 y1) {
|
||||
}
|
||||
|
||||
// Iterate over array of AABBs and check if any fit on screen
|
||||
u16 sub_08056300(u16* arr) {
|
||||
u16 CheckRegionsOnScreen(u16* arr) {
|
||||
u16* i;
|
||||
for (i = arr; *i != 0xff; i += 5) {
|
||||
if (sub_080562CC(i[1], i[2], i[3], i[4]) != 0)
|
||||
if (CheckRegionOnScreen(i[1], i[2], i[3], i[4]))
|
||||
return *i;
|
||||
}
|
||||
return 0xff;
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
#include "functions.h"
|
||||
|
||||
extern void sub_08056250(void);
|
||||
extern void sub_080570B8(Entity*);
|
||||
void sub_080570F8(void);
|
||||
|
||||
extern void (*const gUnk_08107C5C[])(Entity*);
|
||||
extern void (*const gUnk_08107C48[])(Entity*);
|
||||
@@ -25,7 +23,7 @@ void Manager1_Main(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080570B8(Entity* this) {
|
||||
static void sub_080570B8(Entity* this) {
|
||||
u8* pbVar1;
|
||||
|
||||
LoadGfxGroup(((u8*)&this->zVelocity)[0]);
|
||||
@@ -38,8 +36,8 @@ void sub_080570B8(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080570F8(void) {
|
||||
gScreen.lcd.displayControl &= 0xf7ff;
|
||||
static void sub_080570F8(void) {
|
||||
gScreen.lcd.displayControl &= ~DISPCNT_BG3_ON;
|
||||
gScreen.controls.layerFXControl = 0;
|
||||
sub_08056250();
|
||||
}
|
||||
@@ -51,7 +49,7 @@ void sub_08057118(Entity* this) {
|
||||
((u8*)&this->zVelocity)[2] = 0;
|
||||
this->action = 1;
|
||||
gScreen.bg3.control = 0x1e04;
|
||||
gScreen.lcd.displayControl |= 0x800;
|
||||
gScreen.lcd.displayControl |= DISPCNT_BG3_ON;
|
||||
gScreen.controls.layerFXControl = 0x3648;
|
||||
gScreen.controls.alphaBlend = 0x1000;
|
||||
RegisterTransitionManager(this, sub_080570B8, sub_080570F8);
|
||||
|
||||
@@ -15,7 +15,7 @@ void sub_08059A58(Manager12*);
|
||||
|
||||
void sub_08059A2C(Manager12*);
|
||||
|
||||
u32 sub_08056300(u16* arr);
|
||||
u32 CheckRegionsOnScreen(u16* arr);
|
||||
extern u16 gUnk_081083DA;
|
||||
extern u16 gUnk_081083F2;
|
||||
extern u16 gUnk_08108398;
|
||||
@@ -48,7 +48,7 @@ void Manager12_Main(Manager12* this) {
|
||||
this->field_0x21 = 0xff;
|
||||
this->field_0x20 = 0xff;
|
||||
RegisterTransitionManager(this, sub_08059A2C, NULL);
|
||||
SetDefaultPriority((Entity*)this, 6);
|
||||
SetDefaultPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
}
|
||||
sub_08059A58(this);
|
||||
}
|
||||
@@ -128,7 +128,7 @@ void sub_08059B18(void) {
|
||||
bool32 sub_08059C8C(Manager12* this, u32 param_2, u8* param_3, u16* param_4) {
|
||||
bool32 bVar2;
|
||||
|
||||
*param_3 = sub_08056300(param_4);
|
||||
*param_3 = CheckRegionsOnScreen(param_4);
|
||||
if ((*param_3 != 0xff) && (gRoomVars.unk_10[param_2] != *param_3)) {
|
||||
gRoomVars.unk_10[param_2] = *param_3;
|
||||
return TRUE;
|
||||
@@ -154,24 +154,24 @@ void TryLoadPrologueHyruleTown(void) {
|
||||
u32 tmp;
|
||||
|
||||
if (gRoomControls.areaID != AREA_FESTIVAL_TOWN) {
|
||||
tmp = sub_08056300(&gUnk_08108398);
|
||||
tmp = CheckRegionsOnScreen(&gUnk_08108398);
|
||||
if (tmp != 0xff) {
|
||||
sub_08059CC0(0, tmp);
|
||||
}
|
||||
tmp = sub_08056300(&gUnk_081083AE);
|
||||
tmp = CheckRegionsOnScreen(&gUnk_081083AE);
|
||||
if ((tmp != 0xff) && (sub_08059CC0(1, tmp), tmp == 2)) {
|
||||
sub_08059B18();
|
||||
}
|
||||
tmp = sub_08056300(&gUnk_081083C4);
|
||||
tmp = CheckRegionsOnScreen(&gUnk_081083C4);
|
||||
if (tmp != 0xff) {
|
||||
sub_08059CC0(2, tmp);
|
||||
}
|
||||
} else {
|
||||
tmp = sub_08056300(&gUnk_081083DA);
|
||||
tmp = CheckRegionsOnScreen(&gUnk_081083DA);
|
||||
if (tmp != 0xff) {
|
||||
sub_08059CC0(0, tmp);
|
||||
}
|
||||
tmp = sub_08056300(&gUnk_081083F2);
|
||||
tmp = CheckRegionsOnScreen(&gUnk_081083F2);
|
||||
if (tmp != 0xff) {
|
||||
sub_08059CC0(2, tmp);
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ void sub_08059E80(Manager14* this) {
|
||||
this->manager.action = 4;
|
||||
this->manager.unk_10 |= 0x20;
|
||||
gScreen.bg3.control = 0x1E04;
|
||||
gScreen.lcd.displayControl |= 0x800;
|
||||
gScreen.lcd.displayControl |= DISPCNT_BG3_ON;
|
||||
gScreen.controls.layerFXControl = 0x3E48;
|
||||
gScreen.controls.alphaBlend = 0x1000;
|
||||
gScreen.bg3.xOffset = 0x80;
|
||||
@@ -142,7 +142,7 @@ void sub_0805A0C0(Manager14* this) {
|
||||
this->manager.unk_0f = 4;
|
||||
gScreen.controls.alphaBlend = gUnk_08108588[this->manager.unk_0e--];
|
||||
if (this->manager.unk_0e == 0xFF) {
|
||||
gScreen.lcd.displayControl &= ~0x800;
|
||||
gScreen.lcd.displayControl &= ~DISPCNT_BG3_ON;
|
||||
sub_08056250();
|
||||
DeleteThisEntity();
|
||||
}
|
||||
@@ -179,7 +179,7 @@ void sub_0805A1D8(Manager14* this) {
|
||||
gScreen.bg3.xOffset = gRoomControls.bg3OffsetX.HALF.HI;
|
||||
gRoomControls.bg3OffsetY.WORD -= 0x1000;
|
||||
gScreen.bg3.yOffset = gRoomControls.bg3OffsetY.HALF.HI;
|
||||
if (gScreen.lcd.displayControl & 0x800) {
|
||||
if (gScreen.lcd.displayControl & DISPCNT_BG3_ON) {
|
||||
sub_0805A114(6, this->unk_20 >> 1);
|
||||
if (this->unk_22 == 0 && (gMain.ticks & 0x1F) == 0) {
|
||||
this->unk_24++;
|
||||
@@ -194,6 +194,6 @@ void nullsub_495() {
|
||||
|
||||
void sub_0805A25C() {
|
||||
gScreen.controls.layerFXControl = 0;
|
||||
gScreen.lcd.displayControl &= ~0x800;
|
||||
gScreen.lcd.displayControl &= ~DISPCNT_BG3_ON;
|
||||
sub_08056250();
|
||||
}
|
||||
|
||||
+41
-39
@@ -46,7 +46,7 @@ void sub_0805A298(Manager15* this) {
|
||||
this->unk_23 = 2;
|
||||
}
|
||||
sub_0805AAF0(this->unk_23);
|
||||
gScreen.lcd.displayControl |= 0x4800;
|
||||
gScreen.lcd.displayControl |= DISPCNT_WIN1_ON | DISPCNT_BG3_ON;
|
||||
}
|
||||
sub_0805A8EC(this);
|
||||
}
|
||||
@@ -67,7 +67,7 @@ void sub_0805A2E4(Manager15* this) {
|
||||
} else {
|
||||
this->manager.action = 3;
|
||||
}
|
||||
gScreen.lcd.displayControl |= 0x4800;
|
||||
gScreen.lcd.displayControl |= DISPCNT_WIN1_ON | DISPCNT_BG3_ON;
|
||||
}
|
||||
} else {
|
||||
gUnk_081085F8[this->manager.action](this);
|
||||
@@ -96,7 +96,7 @@ void sub_0805A394(Manager15* this) {
|
||||
}
|
||||
SetLocalFlag(LV1_16_1STEND);
|
||||
ClearRoomFlag(0);
|
||||
gScreen.lcd.displayControl &= 0xB7FF;
|
||||
gScreen.lcd.displayControl &= ~(DISPCNT_WIN1_ON | DISPCNT_BG3_ON);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
@@ -117,11 +117,11 @@ void sub_0805A3D4(Manager15* this) {
|
||||
if (!CheckLocalFlag(this->unk_3e)) {
|
||||
ClearFlag(this->unk_3c);
|
||||
this->manager.action = 1;
|
||||
gScreen.lcd.displayControl &= 0xB7FF;
|
||||
gScreen.lcd.displayControl &= ~(DISPCNT_WIN1_ON | DISPCNT_BG3_ON);
|
||||
} else {
|
||||
SetFlag(this->unk_3c);
|
||||
this->manager.action = 3;
|
||||
gScreen.lcd.displayControl |= 0x4800;
|
||||
gScreen.lcd.displayControl |= DISPCNT_WIN1_ON | DISPCNT_BG3_ON;
|
||||
}
|
||||
} else {
|
||||
gUnk_0810860C[this->manager.action](this);
|
||||
@@ -181,16 +181,16 @@ void sub_0805A500(Manager15* this) {
|
||||
if (CheckLocalFlag(0x36)) {
|
||||
this->unk_23 = 3;
|
||||
this->manager.action = 5;
|
||||
gScreen.lcd.displayControl |= 0x4800;
|
||||
gScreen.lcd.displayControl |= DISPCNT_WIN1_ON | DISPCNT_BG3_ON;
|
||||
} else {
|
||||
if (CheckLocalFlag(0x34)) {
|
||||
this->unk_23 = 4;
|
||||
this->manager.action = 3;
|
||||
gScreen.lcd.displayControl |= 0x4800;
|
||||
gScreen.lcd.displayControl |= DISPCNT_WIN1_ON | DISPCNT_BG3_ON;
|
||||
} else {
|
||||
this->unk_23 = 4;
|
||||
this->manager.action = 1;
|
||||
gScreen.lcd.displayControl &= 0xB7FF;
|
||||
gScreen.lcd.displayControl &= ~(DISPCNT_WIN1_ON | DISPCNT_BG3_ON);
|
||||
}
|
||||
}
|
||||
sub_0805AAF0(this->unk_23);
|
||||
@@ -200,7 +200,7 @@ void sub_0805A500(Manager15* this) {
|
||||
sub_0805AA58(this);
|
||||
sub_0805A9CC(this);
|
||||
if (gRoomControls.unk2 == 1) {
|
||||
gScreen.lcd.displayControl |= 0x80 << 7;
|
||||
gScreen.lcd.displayControl |= DISPCNT_WIN1_ON;
|
||||
this->manager.unk_0d = 1;
|
||||
return;
|
||||
}
|
||||
@@ -209,7 +209,7 @@ void sub_0805A500(Manager15* this) {
|
||||
this->manager.unk_0d = 0;
|
||||
if (this->unk_20 == gRoomControls.roomID)
|
||||
return;
|
||||
gScreen.lcd.displayControl &= 0xB7FF;
|
||||
gScreen.lcd.displayControl &= ~(DISPCNT_WIN1_ON | DISPCNT_BG3_ON);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
@@ -281,12 +281,12 @@ void sub_0805A6E8(Manager15* this) {
|
||||
this->manager.action++;
|
||||
}
|
||||
this->unk_2c = 0x1000;
|
||||
tmp = gScreen.lcd.displayControl | 0x4800;
|
||||
tmp = gScreen.lcd.displayControl | DISPCNT_WIN1_ON | DISPCNT_BG3_ON;
|
||||
gScreen.lcd.displayControl = tmp;
|
||||
}
|
||||
|
||||
u32 sub_0805A73C(Manager15* this) {
|
||||
return CheckPlayerProximity(this->unk_38 - 0x6, this->unk_3a - 0x6, 0xC, 0xC);
|
||||
return CheckPlayerProximity(this->unk_38 - 6, this->unk_3a - 6, 12, 12);
|
||||
}
|
||||
|
||||
void sub_0805A758(Manager15* this) {
|
||||
@@ -304,10 +304,10 @@ void sub_0805A76C(Manager15* this) {
|
||||
this->manager.action++;
|
||||
sub_08004168(&gPlayerEntity);
|
||||
gPlayerEntity.animationState = 4;
|
||||
RequestPriorityDuration((Entity*)this, 0x258);
|
||||
RequestPriorityDuration((Entity*)this, 600);
|
||||
SetPlayerControl(0xFF);
|
||||
gUnk_02034490[0] = 1;
|
||||
gRoomControls.cameraTarget = 0;
|
||||
gRoomControls.cameraTarget = NULL;
|
||||
sub_08077B20();
|
||||
}
|
||||
}
|
||||
@@ -315,8 +315,8 @@ void sub_0805A76C(Manager15* this) {
|
||||
}
|
||||
|
||||
void sub_0805A7E4(Manager15* this) {
|
||||
if (gPlayerState.playerAction != 0x12) {
|
||||
gPlayerState.playerAction = 0x12;
|
||||
if (gPlayerState.playerAction != PLAYER_WARP) {
|
||||
gPlayerState.playerAction = PLAYER_WARP;
|
||||
gPlayerState.field_0x38 = 0;
|
||||
gPlayerState.field_0x39 = 0;
|
||||
}
|
||||
@@ -332,7 +332,7 @@ void sub_0805A804(Manager15* this) {
|
||||
}
|
||||
this->manager.unk_0d = 1;
|
||||
this->manager.unk_10 |= 0x20;
|
||||
SetDefaultPriority((Entity*)this, 6);
|
||||
SetDefaultPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
break;
|
||||
case 1:
|
||||
if (CheckLocalFlag(this->unk_3e))
|
||||
@@ -364,7 +364,7 @@ void sub_0805A804(Manager15* this) {
|
||||
void sub_0805AAC8(Manager15*);
|
||||
|
||||
void sub_0805A89C(Manager15* this) {
|
||||
SetDefaultPriority((Entity*)this, 6);
|
||||
SetDefaultPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
this->manager.action = 1;
|
||||
this->manager.unk_10 |= 0x20;
|
||||
this->manager.unk_0e = 8;
|
||||
@@ -383,7 +383,7 @@ void sub_0805A8EC(Manager15* this) {
|
||||
sub_0805AA58(this);
|
||||
sub_0805A94C(this);
|
||||
if (gRoomControls.unk2 == 1) {
|
||||
gScreen.lcd.displayControl |= 0x4000;
|
||||
gScreen.lcd.displayControl |= DISPCNT_WIN1_ON;
|
||||
this->manager.unk_0d = 1;
|
||||
} else {
|
||||
if (!this->manager.unk_0d)
|
||||
@@ -391,7 +391,7 @@ void sub_0805A8EC(Manager15* this) {
|
||||
this->manager.unk_0d = 0;
|
||||
if (this->unk_20 == gRoomControls.roomID)
|
||||
return;
|
||||
gScreen.lcd.displayControl &= 0xB7FF;
|
||||
gScreen.lcd.displayControl &= ~(DISPCNT_WIN1_ON | DISPCNT_BG3_ON);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
@@ -404,23 +404,23 @@ void sub_0805A94C(Manager15* this) {
|
||||
tmp2 = tmp1 + 0x100;
|
||||
if (tmp1 < 0)
|
||||
tmp1 = 0;
|
||||
if (tmp1 > 0xF0)
|
||||
tmp1 = 0xF0;
|
||||
if (tmp1 > DISPLAY_WIDTH)
|
||||
tmp1 = DISPLAY_WIDTH;
|
||||
if (tmp2 < 0)
|
||||
tmp2 = 0;
|
||||
if (tmp2 > 0xF0)
|
||||
tmp2 = 0xF0;
|
||||
if (tmp2 > DISPLAY_WIDTH)
|
||||
tmp2 = DISPLAY_WIDTH;
|
||||
gScreen.controls.window1HorizontalDimensions = (tmp1 << 8 | tmp2);
|
||||
tmp1 = -gScreen.bg3.yOffset;
|
||||
tmp2 = tmp1 + 0x100;
|
||||
if (tmp1 < 0)
|
||||
tmp1 = 0;
|
||||
if (tmp1 > 0xA0)
|
||||
tmp1 = 0xA0;
|
||||
if (tmp1 > DISPLAY_HEIGHT)
|
||||
tmp1 = DISPLAY_HEIGHT;
|
||||
if (tmp2 < 0)
|
||||
tmp2 = 0;
|
||||
if (tmp2 > 0xA0)
|
||||
tmp2 = 0xA0;
|
||||
if (tmp2 > DISPLAY_HEIGHT)
|
||||
tmp2 = DISPLAY_HEIGHT;
|
||||
gScreen.controls.window1VerticalDimensions = (tmp1 << 8 | tmp2);
|
||||
}
|
||||
|
||||
@@ -432,18 +432,18 @@ void sub_0805A9CC(Manager15* this) {
|
||||
tmp2 = tmp1 + 0x100;
|
||||
if (tmp1 < 0)
|
||||
tmp1 = 0;
|
||||
if (tmp1 > 0xF0)
|
||||
tmp1 = 0xF0;
|
||||
if (tmp1 > DISPLAY_WIDTH)
|
||||
tmp1 = DISPLAY_WIDTH;
|
||||
if (tmp2 < 0)
|
||||
tmp2 = 0;
|
||||
if (tmp2 > 0xF0)
|
||||
tmp2 = 0xF0;
|
||||
if (tmp2 > DISPLAY_WIDTH)
|
||||
tmp2 = DISPLAY_WIDTH;
|
||||
gScreen.controls.window1HorizontalDimensions = tmp1 << 8 | tmp2;
|
||||
tmp1 = gRoomControls.roomScrollY - this->unk_26 + this->unk_36;
|
||||
gScreen.bg3.yOffset = tmp1 & 0x3F;
|
||||
tmp3 = (&gBG3Buffer[((tmp1 / 0x40) << 8)]);
|
||||
gScreen.bg3.tilemap = (u32*)tmp3;
|
||||
gScreen.controls.window1VerticalDimensions = 0xa0;
|
||||
gScreen.controls.window1VerticalDimensions = DISPLAY_HEIGHT;
|
||||
if (this->unk_28 == tmp3)
|
||||
return;
|
||||
this->unk_28 = tmp3;
|
||||
@@ -483,14 +483,16 @@ void sub_0805AADC(u32 unk0) {
|
||||
void sub_0805AAF0(u32 unk0) {
|
||||
sub_0805AADC(unk0);
|
||||
gScreen.controls.layerFXControl = 0x3E48;
|
||||
gScreen.controls.alphaBlend = 0x1008;
|
||||
gScreen.bg3.control = 0x1E04;
|
||||
gScreen.controls.alphaBlend = BLDALPHA_BLEND(8, 16);
|
||||
gScreen.bg3.control = BGCNT_SCREENBASE(30) | BGCNT_CHARBASE(1);
|
||||
gScreen.bg3.tilemap = &gBG3Buffer;
|
||||
gScreen.bg3.xOffset = 0;
|
||||
gScreen.bg3.yOffset = 0;
|
||||
gScreen.bg3.updated = 1;
|
||||
gScreen.controls.windowInsideControl = 0x3F3F;
|
||||
gScreen.controls.windowOutsideControl = 0x37;
|
||||
gScreen.controls.window1HorizontalDimensions = 0xF0;
|
||||
gScreen.controls.window1VerticalDimensions = 0xA0;
|
||||
gScreen.controls.windowInsideControl =
|
||||
WININ_WIN0_BG_ALL | WININ_WIN0_OBJ | WININ_WIN1_BG_ALL | WININ_WIN1_OBJ | WININ_WIN0_CLR | WININ_WIN1_CLR;
|
||||
gScreen.controls.windowOutsideControl =
|
||||
WINOUT_WIN01_BG0 | WINOUT_WIN01_BG1 | WINOUT_WIN01_BG2 | WINOUT_WIN01_OBJ | WINOUT_WIN01_CLR;
|
||||
gScreen.controls.window1HorizontalDimensions = DISPLAY_WIDTH;
|
||||
gScreen.controls.window1VerticalDimensions = DISPLAY_HEIGHT;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ void Manager18_Main(Manager18* this) {
|
||||
this->manager.unk_0e = 0;
|
||||
this->manager.unk_0f = 8;
|
||||
this->field_0x20 = gUnk_0810865C[0];
|
||||
SetDefaultPriority((Entity*)this, 6);
|
||||
SetDefaultPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
if (gArea.onEnter == NULL) {
|
||||
RegisterTransitionManager(this, sub_0805AEDC, sub_0805AF3C);
|
||||
} else {
|
||||
@@ -47,10 +47,10 @@ void Manager18_Main(Manager18* this) {
|
||||
}
|
||||
|
||||
void sub_0805AEDC(Manager18* this) {
|
||||
gScreen.bg3.control = 0x1e05;
|
||||
gScreen.lcd.displayControl |= 0x800;
|
||||
gScreen.controls.layerFXControl = 0x3648;
|
||||
gScreen.controls.alphaBlend = (this != NULL) ? this->field_0x20 : 0x1000;
|
||||
gScreen.bg3.control = BGCNT_SCREENBASE(30) | BGCNT_PRIORITY(1) | BGCNT_CHARBASE(1);
|
||||
gScreen.lcd.displayControl |= DISPCNT_BG3_ON;
|
||||
gScreen.controls.layerFXControl = BLDCNT_TGT1_BG3 | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_BG1 | BLDCNT_TGT2_BG2 | BLDCNT_TGT2_OBJ | BLDCNT_TGT2_BD;
|
||||
gScreen.controls.alphaBlend = (this != NULL) ? this->field_0x20 : BLDALPHA_BLEND(0, 16);
|
||||
gScreen.bg3.xOffset = gRoomControls.roomScrollX + gRoomControls.bg3OffsetX.HALF.HI;
|
||||
gScreen.bg3.yOffset = gRoomControls.roomScrollY + gRoomControls.bg3OffsetY.HALF.HI;
|
||||
if (this != NULL) {
|
||||
@@ -60,6 +60,6 @@ void sub_0805AEDC(Manager18* this) {
|
||||
|
||||
void sub_0805AF3C(Manager18* this) {
|
||||
this->manager.unk_10 &= 0xdf;
|
||||
gScreen.lcd.displayControl &= 0xf7ff;
|
||||
gScreen.lcd.displayControl &= ~DISPCNT_BG3_ON;
|
||||
gScreen.controls.layerFXControl = 0;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ void Manager19_Main(Manager* this) {
|
||||
if (this->action == 0) {
|
||||
this->action = 1;
|
||||
this->unk_10 |= 0x20;
|
||||
SetDefaultPriority((Entity*)this, 6);
|
||||
SetDefaultPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
if (gArea.onEnter == NULL) {
|
||||
RegisterTransitionManager(this, sub_0805AFFC, NULL);
|
||||
} else {
|
||||
@@ -30,8 +30,8 @@ void Manager19_Main(Manager* this) {
|
||||
}
|
||||
|
||||
void sub_0805AFFC(Manager* this) {
|
||||
gScreen.bg3.control = 0x1e03;
|
||||
gScreen.lcd.displayControl |= 0x800;
|
||||
gScreen.bg3.control = BGCNT_PRIORITY(3) | BGCNT_SCREENBASE(30);
|
||||
gScreen.lcd.displayControl |= DISPCNT_BG3_ON;
|
||||
gScreen.bg3.xOffset = gRoomControls.roomScrollX + gRoomControls.bg3OffsetX.HALF.HI;
|
||||
gScreen.bg3.yOffset = gRoomControls.roomScrollY + gRoomControls.bg3OffsetY.HALF.HI;
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ void sub_0805B328(Manager1A*);
|
||||
void sub_0805B048(Manager1A* this) {
|
||||
struct_08108764* tmp;
|
||||
Entity* obj;
|
||||
SetDefaultPriority((Entity*)&this->manager, 6);
|
||||
SetDefaultPriority((Entity*)&this->manager, PRIO_PLAYER_EVENT);
|
||||
MemClear(&this->unk_20, 0x20);
|
||||
this->manager.action = 1;
|
||||
this->unk_3f = gRoomControls.roomID;
|
||||
@@ -197,7 +197,7 @@ void sub_0805B2B0(Manager1A* this) {
|
||||
if (tmp2 > 12) {
|
||||
tmp2 = 12;
|
||||
}
|
||||
gScreen.lcd.displayControl |= 0x800;
|
||||
gScreen.lcd.displayControl |= DISPCNT_BG3_ON;
|
||||
gRoomControls.bg3OffsetX.HALF.HI = gRoomControls.roomScrollX + this->unk_34 + tmp;
|
||||
gScreen.bg3.xOffset = gRoomControls.roomScrollX + this->unk_34 + tmp;
|
||||
gRoomControls.bg3OffsetY.HALF.HI = gRoomControls.roomScrollY + this->unk_36 + tmp2;
|
||||
@@ -211,7 +211,7 @@ void sub_0805B328(Manager1A* this) {
|
||||
tmp = &gUnk_08108764[this->manager.unk_0a];
|
||||
LoadResourceAsync(&gGlobalGfxAndPalettes[tmp->unk_0c->unk_00], 0x0600F000, 0x800);
|
||||
gScreen.bg3.control = 0x1E07;
|
||||
gScreen.lcd.displayControl |= 0x800;
|
||||
gScreen.lcd.displayControl |= DISPCNT_BG3_ON;
|
||||
gScreen.bg3.xOffset = gRoomControls.bg3OffsetX.HALF.HI;
|
||||
gScreen.bg3.yOffset = gRoomControls.bg3OffsetY.HALF.HI;
|
||||
gScreen.controls.layerFXControl &= ~0x8;
|
||||
|
||||
@@ -29,7 +29,7 @@ void Manager1B_Main(Manager1B* this) {
|
||||
if (this->manager.action == 0) {
|
||||
this->manager.action = 1;
|
||||
this->manager.unk_10 |= 0x20;
|
||||
SetDefaultPriority((Entity*)this, 6);
|
||||
SetDefaultPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
if (this->manager.unk_0a != 0) {
|
||||
RegisterTransitionManager(this, sub_0805B4B4, NULL);
|
||||
}
|
||||
@@ -70,7 +70,7 @@ void sub_0805B4D0(u32 param_1) {
|
||||
|
||||
LoadGfxGroup(gUnk_08108C5C[param_1]);
|
||||
gScreen.bg3.control = 0x1e07;
|
||||
gScreen.lcd.displayControl |= 0x800;
|
||||
gScreen.lcd.displayControl |= DISPCNT_BG3_ON;
|
||||
gScreen.bg3.xOffset = (gRoomControls.roomScrollX - gRoomControls.roomOriginX) >> 2;
|
||||
|
||||
uVar2 = (gRoomControls.roomScrollY - gRoomControls.roomOriginY) >> 1;
|
||||
|
||||
@@ -13,7 +13,7 @@ void Manager1D_Main(Manager* this) {
|
||||
void sub_0805B5E0(Manager* this) {
|
||||
this->action = 1;
|
||||
|
||||
gScreen.lcd.displayControl |= 0x800;
|
||||
gScreen.lcd.displayControl |= DISPCNT_BG3_ON;
|
||||
gScreen.bg3.control = gUnk_08108C88[this->unk_0a];
|
||||
gRoomControls.bg3OffsetY.WORD = 0;
|
||||
gRoomControls.bg3OffsetX.WORD = 0;
|
||||
|
||||
@@ -53,7 +53,7 @@ void sub_080575C8(u32 param) {
|
||||
s32 bgOffset;
|
||||
|
||||
gUnk_0200B650 = 0;
|
||||
*(u16*)0x4000000 = 0;
|
||||
REG_DISPCNT = 0;
|
||||
LoadGfxGroup(param);
|
||||
gRoomVars.unk_10[0] = param;
|
||||
|
||||
@@ -62,7 +62,7 @@ void sub_080575C8(u32 param) {
|
||||
gScreen.bg3.yOffset = bgOffset & 0x3f;
|
||||
gScreen.bg3.xOffset = 0;
|
||||
gScreen.bg3.tilemap = &gMapDataTopSpecial[(bgOffset / 0x40) * 0x200];
|
||||
gScreen.bg3.control = 0x1d49;
|
||||
gScreen.bg3.control = BGCNT_SCREENBASE(29) | BGCNT_PRIORITY(1) | BGCNT_CHARBASE(2) | BGCNT_MOSAIC;
|
||||
gScreen.bg3.updated = 1;
|
||||
|
||||
bgOffset = (gRoomControls.roomScrollY - gRoomControls.roomOriginY);
|
||||
@@ -70,16 +70,17 @@ void sub_080575C8(u32 param) {
|
||||
gScreen.bg1.yOffset = bgOffset & 0x3f;
|
||||
gScreen.bg1.xOffset = 0;
|
||||
gScreen.bg1.tilemap = &gMapDataTopSpecial[0x2000 + (bgOffset / 0x40) * 0x200];
|
||||
gScreen.bg1.control = 0x1e49;
|
||||
gScreen.bg1.control = BGCNT_SCREENBASE(30) | BGCNT_PRIORITY(1) | BGCNT_CHARBASE(2) | BGCNT_MOSAIC;
|
||||
gScreen.bg1.updated = 1;
|
||||
gScreen.controls.layerFXControl = 0x3c48;
|
||||
gScreen.controls.alphaBlend = 0x609;
|
||||
gScreen.lcd.displayControl |= 0xa00;
|
||||
gScreen.controls.layerFXControl =
|
||||
BLDCNT_TGT1_BG3 | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_BG2 | BLDCNT_TGT2_BG3 | BLDCNT_TGT2_OBJ | BLDCNT_TGT2_BD;
|
||||
gScreen.controls.alphaBlend = BLDALPHA_BLEND(9, 6);
|
||||
gScreen.lcd.displayControl |= DISPCNT_BG3_ON | DISPCNT_BG1_ON;
|
||||
}
|
||||
|
||||
void sub_08057688(void) {
|
||||
gScreen.bg3.control = 0x1d48;
|
||||
gScreen.bg1.control = 0x1e48;
|
||||
gScreen.bg3.control = BGCNT_SCREENBASE(29) | BGCNT_CHARBASE(2) | BGCNT_MOSAIC;
|
||||
gScreen.bg1.control = BGCNT_SCREENBASE(30) | BGCNT_CHARBASE(2) | BGCNT_MOSAIC;
|
||||
}
|
||||
|
||||
void sub_080576A0(Manager2* this) {
|
||||
|
||||
@@ -42,7 +42,7 @@ void sub_0805D280(Manager2E* this) {
|
||||
if (this->manager.unk_0e == 0) {
|
||||
this->manager.unk_0e = 0x1e;
|
||||
}
|
||||
SetDefaultPriority((Entity*)this, 6);
|
||||
SetDefaultPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
}
|
||||
|
||||
void sub_0805D2C0(Manager2E* this) {
|
||||
@@ -80,7 +80,7 @@ void sub_0805D344(Manager2E* this) {
|
||||
this->manager.unk_0e = 0x1e;
|
||||
}
|
||||
this->manager.unk_0f = this->manager.unk_0e;
|
||||
SetDefaultPriority((Entity*)this, 6);
|
||||
SetDefaultPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
}
|
||||
|
||||
void sub_0805D36C(Manager2E* this) {
|
||||
|
||||
@@ -16,7 +16,7 @@ void Manager2F_Main(Manager* this) {
|
||||
if (this->action == 0) {
|
||||
this->action = 1;
|
||||
this->unk_10 |= 0x20;
|
||||
SetDefaultPriority((Entity*)this, 6);
|
||||
SetDefaultPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
if (gArea.onEnter == NULL) {
|
||||
RegisterTransitionManager(this, sub_0805D470, NULL);
|
||||
} else {
|
||||
@@ -34,7 +34,7 @@ void Manager2F_Main(Manager* this) {
|
||||
void sub_0805D470(Manager* this) {
|
||||
LoadGfxGroup(0x4c);
|
||||
gScreen.bg3.control = 0x1e07;
|
||||
gScreen.lcd.displayControl |= 0x800;
|
||||
gScreen.lcd.displayControl |= DISPCNT_BG3_ON;
|
||||
gScreen.bg3.xOffset = gRoomControls.roomScrollX + gRoomControls.bg3OffsetX.HALF.HI;
|
||||
gScreen.bg3.yOffset = gRoomControls.roomScrollY + gRoomControls.bg3OffsetY.HALF.HI;
|
||||
}
|
||||
|
||||
+16
-22
@@ -28,7 +28,7 @@ void Manager31_Main(Manager31* this) {
|
||||
s32 count;
|
||||
|
||||
if (this->manager.action == 0) {
|
||||
this->manager.action += 1;
|
||||
this->manager.action++;
|
||||
if (CheckGlobalFlag(GORON_KAKERA_L) != 0 && CheckGlobalFlag(GORON_KAKERA_M) != 0 &&
|
||||
CheckGlobalFlag(GORON_KAKERA_R) != 0) {
|
||||
if (CheckGlobalFlag(GORON_KAKERA_LV2) == 0) {
|
||||
@@ -36,28 +36,22 @@ void Manager31_Main(Manager31* this) {
|
||||
SetGlobalFlag(GORON_KAKERA_LV2);
|
||||
goto clearGlobalFlags;
|
||||
}
|
||||
} else {
|
||||
if (CheckGlobalFlag(GORON_KAKERA_LV3) == 0) {
|
||||
if (CheckGlobalFlag(LV2_CLEAR) != 0) {
|
||||
SetGlobalFlag(GORON_KAKERA_LV3);
|
||||
goto clearGlobalFlags;
|
||||
}
|
||||
} else {
|
||||
if (CheckGlobalFlag(GORON_KAKERA_LV4) == 0) {
|
||||
if (CheckGlobalFlag(LV3_CLEAR) != 0) {
|
||||
SetGlobalFlag(GORON_KAKERA_LV4);
|
||||
goto clearGlobalFlags;
|
||||
}
|
||||
} else {
|
||||
if (CheckGlobalFlag(GORON_KAKERA_LV5) == 0 && CheckGlobalFlag(LV4_CLEAR) != 0) {
|
||||
SetGlobalFlag(GORON_KAKERA_LV5);
|
||||
clearGlobalFlags:
|
||||
ClearGlobalFlag(GORON_KAKERA_L);
|
||||
ClearGlobalFlag(GORON_KAKERA_M);
|
||||
ClearGlobalFlag(GORON_KAKERA_R);
|
||||
}
|
||||
}
|
||||
} else if (CheckGlobalFlag(GORON_KAKERA_LV3) == 0) {
|
||||
if (CheckGlobalFlag(LV2_CLEAR) != 0) {
|
||||
SetGlobalFlag(GORON_KAKERA_LV3);
|
||||
goto clearGlobalFlags;
|
||||
}
|
||||
} else if (CheckGlobalFlag(GORON_KAKERA_LV4) == 0) {
|
||||
if (CheckGlobalFlag(LV3_CLEAR) != 0) {
|
||||
SetGlobalFlag(GORON_KAKERA_LV4);
|
||||
goto clearGlobalFlags;
|
||||
}
|
||||
} else if (CheckGlobalFlag(GORON_KAKERA_LV5) == 0 && CheckGlobalFlag(LV4_CLEAR) != 0) {
|
||||
SetGlobalFlag(GORON_KAKERA_LV5);
|
||||
clearGlobalFlags:
|
||||
ClearGlobalFlag(GORON_KAKERA_L);
|
||||
ClearGlobalFlag(GORON_KAKERA_M);
|
||||
ClearGlobalFlag(GORON_KAKERA_R);
|
||||
}
|
||||
}
|
||||
this->itemActive[2] = 0;
|
||||
|
||||
@@ -73,7 +73,7 @@ void sub_0805D860(Manager32* this) {
|
||||
case 0:
|
||||
this->manager.unk_0d = 1;
|
||||
this->field_0x20 = 0x80;
|
||||
gScreen.lcd.displayControl |= 0x800;
|
||||
gScreen.lcd.displayControl |= DISPCNT_BG3_ON;
|
||||
break;
|
||||
case 1:
|
||||
if (--this->field_0x20 == 0x10) {
|
||||
@@ -95,7 +95,7 @@ void sub_0805D860(Manager32* this) {
|
||||
default:
|
||||
if (--this->manager.unk_0e == 0) {
|
||||
sub_0801E104();
|
||||
gScreen.lcd.displayControl &= 0xf7ff;
|
||||
gScreen.lcd.displayControl &= ~DISPCNT_BG3_ON;
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
@@ -107,7 +107,7 @@ void sub_0805D900(Manager32* this) {
|
||||
this->manager.unk_0d = 1;
|
||||
this->manager.unk_0e = 0x2d;
|
||||
this->field_0x20 = 1;
|
||||
gScreen.lcd.displayControl |= 0x800;
|
||||
gScreen.lcd.displayControl |= DISPCNT_BG3_ON;
|
||||
break;
|
||||
case 1:
|
||||
if (--this->manager.unk_0e == 0) {
|
||||
@@ -126,7 +126,7 @@ void sub_0805D900(Manager32* this) {
|
||||
this->field_0x20 += 4;
|
||||
if (this->field_0x20 > 0x80) {
|
||||
sub_0801E104();
|
||||
gScreen.lcd.displayControl &= 0xf7ff;
|
||||
gScreen.lcd.displayControl &= ~DISPCNT_BG3_ON;
|
||||
DeleteThisEntity();
|
||||
}
|
||||
break;
|
||||
@@ -164,7 +164,7 @@ void sub_0805DA08(u32 x, u32 y, u32 param_3) {
|
||||
affineDstData->pa = ((gSineTable[(param_3 + i + y) & 0xff] * x) >> 8) + gScreen.bg3.xOffset;
|
||||
affineDstData = (struct BgAffineDstData*)&affineDstData->pb;
|
||||
}
|
||||
sub_0805622C(&gUnk_02017AA0[gUnk_03003DE4[0] * 0xa0], 0x400001c, 0xa2600001);
|
||||
sub_0805622C(&gUnk_02017AA0[gUnk_03003DE4[0] * 0xa0], REG_ADDR_BG3HOFS, 0xa2600001);
|
||||
}
|
||||
|
||||
void sub_0805DA90(Manager32* this, u32 param_2) {
|
||||
@@ -177,7 +177,7 @@ void sub_0805DA90(Manager32* this, u32 param_2) {
|
||||
AppendEntityToList((Entity*)manager, 8);
|
||||
}
|
||||
if (gArea.onEnter != NULL) {
|
||||
gScreen.lcd.displayControl &= 0xf7ff;
|
||||
gScreen.lcd.displayControl &= ~DISPCNT_BG3_ON;
|
||||
RoomExitCallback();
|
||||
//! @bug: this always variable points to ROM, not a Manager*
|
||||
DeleteManager((Manager*)gArea.onEnter);
|
||||
|
||||
@@ -32,7 +32,7 @@ void CreateManager36(Entity* entity, ScriptExecutionContext* context) {
|
||||
manager->subtype = 0x36;
|
||||
manager->unk_0a = context->intVariable;
|
||||
AppendEntityToList((Entity*)manager, 6);
|
||||
SetDefaultPriority((Entity*)manager, 6);
|
||||
SetDefaultPriority((Entity*)manager, PRIO_PLAYER_EVENT);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ void sub_0805E140(Manager39* this) {
|
||||
this->unk_20 = gRoomControls.roomID;
|
||||
this->manager.unk_0e = 0x78;
|
||||
this->manager.unk_0f = 0x3c;
|
||||
SetDefaultPriority((Entity*)this, 7);
|
||||
SetDefaultPriority((Entity*)this, PRIO_HIGHEST);
|
||||
sub_0805E1F8(gUnk_08108DE8[gArea.locationIndex], CheckIsDungeon());
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ void sub_0805E18C(Manager39* this) {
|
||||
if (this->manager.unk_0b) {
|
||||
if (!--this->manager.unk_0f) {
|
||||
this->manager.unk_0b = 0;
|
||||
gPlayerState.field_0x8b = 1;
|
||||
gPlayerState.controlMode = 1;
|
||||
ResetSystemPriority();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ void sub_08057E30();
|
||||
u32 sub_08057E40();
|
||||
void sub_08057E7C(u32);
|
||||
|
||||
extern u32 sub_08056300(const u16*);
|
||||
extern u32 CheckRegionsOnScreen(const u16*);
|
||||
|
||||
extern const u8 gGlobalGfxAndPalettes[];
|
||||
|
||||
@@ -66,7 +66,7 @@ void Manager7_Main(Manager7* this) {
|
||||
this->manager.unk_0e = 8;
|
||||
this->unk_20 = 0xFF;
|
||||
|
||||
SetDefaultPriority((Entity*)this, 6);
|
||||
SetDefaultPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
RegisterTransitionManager(this, sub_08057E30, 0);
|
||||
}
|
||||
if (sub_08057E40(this)) {
|
||||
@@ -113,7 +113,7 @@ void sub_08057E30(Manager7* this) {
|
||||
}
|
||||
|
||||
u32 sub_08057E40(Manager7* this) {
|
||||
u32 tmp = sub_08056300(gUnk_08108050);
|
||||
u32 tmp = CheckRegionsOnScreen(gUnk_08108050);
|
||||
if (tmp != 0xFF) {
|
||||
gRoomVars.unk_10[0] = tmp;
|
||||
return 1;
|
||||
@@ -124,7 +124,7 @@ u32 sub_08057E40(Manager7* this) {
|
||||
|
||||
void sub_08057E64() {
|
||||
u32 tmp;
|
||||
tmp = sub_08056300(gUnk_08108050);
|
||||
tmp = CheckRegionsOnScreen(gUnk_08108050);
|
||||
if (tmp != 0xFF) {
|
||||
sub_08057E7C(tmp);
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ void sub_08058514(ManagerA* this) {
|
||||
case 3:
|
||||
if (gPlayerEntity.action != 1 && gPlayerEntity.action != 9)
|
||||
return;
|
||||
gPlayerState.field_0x8b = 1;
|
||||
gPlayerState.controlMode = 1;
|
||||
ResetPlayerEventPriority();
|
||||
SetFlag(this->unk_3c);
|
||||
DeleteThisEntity();
|
||||
|
||||
@@ -42,7 +42,7 @@ void ManagerB_Init(ManagerB* this) {
|
||||
if (!this->unk_3c) {
|
||||
ManagerB_LoadFight(&this->manager);
|
||||
}
|
||||
SetDefaultPriority((Entity*)this, 3);
|
||||
SetDefaultPriority((Entity*)this, PRIO_NO_BLOCK);
|
||||
} else {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
@@ -148,7 +148,7 @@ void ManagerBHelper_Main(Manager* this) {
|
||||
Entity* current;
|
||||
if (this->action == 0) {
|
||||
this->action = 1;
|
||||
SetDefaultPriority((Entity*)this, 3);
|
||||
SetDefaultPriority((Entity*)this, PRIO_NO_BLOCK);
|
||||
}
|
||||
// go through and check all monitored enemies.
|
||||
anyRemaining = 0;
|
||||
|
||||
@@ -286,7 +286,7 @@ void sub_08058D34() {
|
||||
LoadGfxGroup(0x16);
|
||||
tmp = gScreen.lcd.displayControl;
|
||||
tmp2 = 0;
|
||||
gScreen.lcd.displayControl |= 1;
|
||||
gScreen.lcd.displayControl |= DISPCNT_MODE_1;
|
||||
gScreen.bg2.control = 0xBC82;
|
||||
gScreen.bg1.control = 0x5E86;
|
||||
gScreen.bg1.xOffset = 0;
|
||||
|
||||
@@ -209,7 +209,7 @@ void sub_08059094(ManagerF* this) {
|
||||
void sub_080590E0(ManagerF* this) {
|
||||
if (!this->manager.action) {
|
||||
this->manager.action = 1;
|
||||
SetDefaultPriority((Entity*)this, 6);
|
||||
SetDefaultPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
}
|
||||
if (CheckLocalFlag(0x6c)) {
|
||||
if (CheckLocalFlag(0x4b)) {
|
||||
@@ -427,7 +427,7 @@ void sub_080594DC(ManagerF* this) {
|
||||
|
||||
#if defined(USA) || defined(DEMO_USA) || defined(DEMO_JP)
|
||||
void sub_08059548(ManagerF* this) {
|
||||
SetDefaultPriority((Entity*)this, 6);
|
||||
SetDefaultPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
if (gPlayerEntity.action == 0x16) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ void (*const gNPCFunctions[][3])(Entity* ent) = {
|
||||
[GREGAL] = { Gregal, NULL, Gregal_Fusion },
|
||||
[MAYOR_HAGEN] = { MayorHagen, NULL, MayorHagen_Fusion },
|
||||
[BIG_GORON] = { BigGoron, NULL, NULL },
|
||||
[EZLO_CAP] = { EzloCap, NULL, NULL },
|
||||
[EZLO] = { Ezlo, NULL, NULL },
|
||||
[NPC_UNK_4E] = { NPC4E, NULL, NPC4E_Fusion },
|
||||
[NPC_UNK_4F] = { NPC4F, NULL, NULL },
|
||||
[CLOTHES_RACK] = { ClothesRack, NULL, NULL },
|
||||
|
||||
+1
-1
@@ -153,7 +153,7 @@ void sub_080634E4(Entity* this, ScriptExecutionContext* context) {
|
||||
}
|
||||
|
||||
void sub_080634EC(Entity* this) {
|
||||
gRoomVars.itemForSaleIndex = gUnk_0810C88C[this->type2];
|
||||
gRoomVars.shopItemType = gUnk_0810C88C[this->type2];
|
||||
}
|
||||
|
||||
void sub_08063504(Entity* this, ScriptExecutionContext* context) {
|
||||
|
||||
+7
-7
@@ -44,7 +44,7 @@ void sub_0806CF30(Entity* this) {
|
||||
this->action = 1;
|
||||
this->subAction = 1;
|
||||
this->field_0x68.HWORD = this->x.HALF.HI;
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
sub_0806D0B0(this);
|
||||
sub_0807DD64(this);
|
||||
} else {
|
||||
@@ -133,7 +133,7 @@ void sub_0806D1D0(Entity* this) {
|
||||
this->spriteSettings.draw = 3;
|
||||
this->frameIndex = 0;
|
||||
this->actionDelay = 0x1e;
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
}
|
||||
|
||||
switch (this->subAction) {
|
||||
@@ -174,7 +174,7 @@ void sub_0806D274(Entity* this) {
|
||||
this->spritePriority.b0 = 7;
|
||||
this->frameIndex = 2;
|
||||
this->actionDelay = 8;
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
npc = CreateNPC(0x4c, 3, 0);
|
||||
if (npc != NULL) {
|
||||
npc->child = this;
|
||||
@@ -221,7 +221,7 @@ void sub_0806D348(Entity* this) {
|
||||
this->spritePriority.b0 = 6;
|
||||
this->spriteSettings.draw = 0;
|
||||
this->frameIndex = 5;
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
}
|
||||
if (this->child->frameIndex == 4) {
|
||||
this->spriteSettings.draw = 3;
|
||||
@@ -239,7 +239,7 @@ void sub_0806D3C0(Entity* this) {
|
||||
}
|
||||
this->action = 1;
|
||||
this->hitbox = &gHitbox_3;
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
sub_0807DD64(this);
|
||||
} else {
|
||||
this->x.HALF.HI = this->parent->x.HALF.HI;
|
||||
@@ -262,7 +262,7 @@ void sub_0806D41C(Entity* this) {
|
||||
sub_0806D4C0(this, 1);
|
||||
sub_0806D4C0(this, 2);
|
||||
sub_0806D4C0(this, 3);
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
} else {
|
||||
ExecuteScriptForEntity(this, NULL);
|
||||
HandleEntity0x82Actions(this);
|
||||
@@ -286,7 +286,7 @@ void sub_0806D4C0(Entity* this, u32 param) {
|
||||
npc->parent = this;
|
||||
CopyPosition(this, npc);
|
||||
ResolveEntityOnTop(this, npc);
|
||||
SetDefaultPriority(npc, 2);
|
||||
SetDefaultPriority(npc, PRIO_MESSAGE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -24,7 +24,7 @@ void Carpenter(Entity* this) {
|
||||
break;
|
||||
this->action = 1;
|
||||
this->field_0x68.HALF.HI = 0;
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
sub_0807DD64(this);
|
||||
|
||||
case 1:
|
||||
@@ -52,14 +52,14 @@ void Carpenter(Entity* this) {
|
||||
|
||||
void Carpenter_Head(Entity* this) {
|
||||
if (this->type < 2) {
|
||||
SetExtraSpriteFrame(this, 0, this->frame & 0xffffff7f);
|
||||
SetExtraSpriteFrame(this, 0, this->frame & ~0x80);
|
||||
SetExtraSpriteFrame(this, 1, this->frameIndex);
|
||||
SetExtraSpriteFrame(this, 2, this->frameSpriteSettings & 0x3f);
|
||||
SetSpriteSubEntryOffsetData1(this, 1, 0);
|
||||
SetSpriteSubEntryOffsetData2(this, 1, 2);
|
||||
sub_0807000C(this);
|
||||
} else {
|
||||
SetExtraSpriteFrame(this, 0, this->frame & 0xffffff7f);
|
||||
SetExtraSpriteFrame(this, 0, this->frame & ~0x80);
|
||||
SetExtraSpriteFrame(this, 1, this->frameIndex);
|
||||
SetSpriteSubEntryOffsetData1(this, 1, 0);
|
||||
sub_0807000C(this);
|
||||
@@ -94,7 +94,7 @@ void Carpenter_Fusion(Entity* this) {
|
||||
if (LoadExtraSpriteData(this, &gUnk_08110CA8[this->type * 4]) != 0) {
|
||||
this->action = this->action + 1;
|
||||
this->spriteSettings.draw = 1;
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
InitializeAnimation(this, (u32)this->type * 8 + 2);
|
||||
}
|
||||
} else {
|
||||
|
||||
+2
-2
@@ -153,7 +153,7 @@ void sub_0806799C(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if ((gMessage.doTextBox & 0x7f) == 0) {
|
||||
sub_08067B08(this);
|
||||
SetDefaultPriority(this, 1);
|
||||
SetDefaultPriority(this, PRIO_PLAYER);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -319,7 +319,7 @@ void sub_08067C44(Entity* this) {
|
||||
} else {
|
||||
this->action = 4;
|
||||
sub_08067790(this);
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
}
|
||||
this->interactType = 0;
|
||||
SoundReq(SFX_VO_CAT);
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ void sub_0806E4B8(Entity* this) {
|
||||
this->action += 1;
|
||||
this->field_0x68.HALF.LO = sub_0801E99C(this);
|
||||
sub_080787A8(this, this->field_0x68.HALF.LO);
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
this->subAction = 0;
|
||||
sub_0806E4EC(this);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ void sub_0806E730(Entity* this) {
|
||||
this->action += 1;
|
||||
this->field_0x68.HALF.LO = sub_0801E99C(this);
|
||||
sub_080787A8(this, this->field_0x68.HALF.LO);
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
this->subAction = 0;
|
||||
sub_0806E764(this);
|
||||
}
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ void Dampe(Entity* this) {
|
||||
case 0:
|
||||
this->action = 1;
|
||||
this->spriteSettings.draw = 1;
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
sub_0807DD50(this);
|
||||
return;
|
||||
case 1:
|
||||
|
||||
+3
-3
@@ -66,7 +66,7 @@ void sub_08069B44(Entity* this) {
|
||||
this->animationState = 2;
|
||||
this->field_0x6a.HALF.LO = 0xff;
|
||||
this->field_0x74.HALF.LO = sub_0801E99C(this);
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
InitAnimationForceUpdate(this, 10);
|
||||
if ((this->flags & 2) != 0) {
|
||||
sub_0807DD50(this);
|
||||
@@ -273,7 +273,7 @@ u32 sub_08069F90(Entity* this) {
|
||||
if ((this->type == 2) && (CheckLocalFlag(MACHI_02_DOG) == 0)) {
|
||||
return 1;
|
||||
} else {
|
||||
return sub_080041A0(this, &gPlayerEntity, 0x14, 0x14);
|
||||
return EntityInRectRadius(this, &gPlayerEntity, 0x14, 0x14);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -362,7 +362,7 @@ void Dog_Fusion(Entity* this) {
|
||||
if (sub_08069EF0(this) != 0) {
|
||||
this->action += 1;
|
||||
this->spriteSettings.draw = 1;
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
InitializeAnimation(this, 0x23);
|
||||
}
|
||||
} else {
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ void DrLeft(Entity* this) {
|
||||
if (this->type == 0) {
|
||||
if (this->action == 0) {
|
||||
this->action += 1;
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
sub_0807DD50(this);
|
||||
}
|
||||
ExecuteScriptForEntity(this, NULL);
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ extern ScreenTransitionData gUnk_0813AD38;
|
||||
void Emma(Entity* this) {
|
||||
if (this->action == 0) {
|
||||
this->action += 1;
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
sub_0807DD50(this);
|
||||
} else {
|
||||
sub_0807DD94(this, 0);
|
||||
|
||||
+1
-1
@@ -77,7 +77,7 @@ void sub_08065AA4(Entity* this) {
|
||||
sub_0806F118(this);
|
||||
} else {
|
||||
this->action = 3;
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
sub_08065A50(this);
|
||||
}
|
||||
InitAnimationForceUpdate(this, sub_0806F5A4(GetFacingDirection(this, &gPlayerEntity)));
|
||||
|
||||
@@ -9,10 +9,10 @@ const u8 gUnk_08114134[];
|
||||
const u8 gUnk_08114144[];
|
||||
|
||||
// Ezlo as a cap in the Minish Woods, is destroyed as soon as link wears ezlo
|
||||
void EzloCap(Entity* this) {
|
||||
void Ezlo(Entity* this) {
|
||||
if (this->action == 0) {
|
||||
this->action += 1;
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
sub_0807DD50(this);
|
||||
}
|
||||
ExecuteScriptForEntity(this, NULL);
|
||||
+1
-1
@@ -12,7 +12,7 @@ void sub_0806BC58(Entity* this);
|
||||
ASM_FUNC("asm/non_matching/farmers/Farmers.inc", void Farmers(Entity* this))
|
||||
|
||||
void sub_0806BC58(Entity* this) {
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
}
|
||||
|
||||
void Farmers_Head(Entity* this) {
|
||||
|
||||
+2
-2
@@ -18,7 +18,7 @@ void Festari(Entity* this) {
|
||||
void sub_0805FE10(Entity* this) {
|
||||
this->action = 1;
|
||||
this->spriteSettings.draw = TRUE;
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
this->field_0x68.HALF.LO = sub_0801E99C(this);
|
||||
sub_08078784(this, this->field_0x68.HALF.LO);
|
||||
sub_0807DD50(this);
|
||||
@@ -113,7 +113,7 @@ void Festari_Fusion(Entity* this) {
|
||||
if (this->action == 0) {
|
||||
this->action += 1;
|
||||
this->spriteSettings.draw = 1;
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
InitAnimationForceUpdate(this, 8);
|
||||
} else {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
|
||||
@@ -32,7 +32,7 @@ void ForestMinish(Entity* this) {
|
||||
this->spriteSettings.draw = TRUE;
|
||||
this->field_0x68.HALF.HI = this->animationState = this->actionDelay << 1;
|
||||
this->actionDelay = 0;
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
StartCutscene(this, (u16*)gUnk_08109D18[this->type2]);
|
||||
sub_0807DD50(this);
|
||||
}
|
||||
@@ -267,7 +267,7 @@ void ForestMinish_Fusion(Entity* this) {
|
||||
if (LoadExtraSpriteData(this, &gUnk_0810A348)) {
|
||||
this->action++;
|
||||
this->spriteSettings.draw = TRUE;
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
InitializeAnimation(this, 6);
|
||||
}
|
||||
} else {
|
||||
|
||||
+2
-2
@@ -10,7 +10,7 @@ void Gentari(Entity* this) {
|
||||
case 0:
|
||||
this->action = 1;
|
||||
this->spriteSettings.draw = TRUE;
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
this->field_0x68.HALF.LO = sub_0801E99C(this);
|
||||
sub_08078784(this, this->field_0x68.HALF.LO);
|
||||
sub_0807DD50(this);
|
||||
@@ -36,7 +36,7 @@ void Gentari_Fusion(Entity* this) {
|
||||
if (this->action == 0) {
|
||||
this->action++;
|
||||
this->spriteSettings.draw = TRUE;
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
InitAnimationForceUpdate(this, 10);
|
||||
} else {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
|
||||
@@ -94,7 +94,7 @@ void sub_08065D18(Entity* this) {
|
||||
this->spriteSettings.draw = 1;
|
||||
this->spriteRendering.alphaBlend = 1;
|
||||
*(u32**)&this->field_0x6c = &gUnk_08110188;
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
InitAnimationForceUpdate(this, 2);
|
||||
gScreen.controls.layerFXControl = 0x3f40;
|
||||
gScreen.controls.alphaBlend = 0x1000;
|
||||
|
||||
+12
-14
@@ -8,12 +8,12 @@
|
||||
#include "script.h"
|
||||
#include "save.h"
|
||||
|
||||
extern u32 GoronMerchant_GetSalePrice(Entity*);
|
||||
static u32 GoronMerchant_GetSalePrice(Entity*);
|
||||
|
||||
extern void (*const gUnk_08111B88[])(Entity*);
|
||||
extern void (*const gUnk_08111B98[])(Entity*);
|
||||
|
||||
const u16 GoronMerchant_KinstonePrices[];
|
||||
static const u16 sKinstonePrices[];
|
||||
|
||||
extern u32 sub_0801E7D0(u32);
|
||||
|
||||
@@ -78,8 +78,6 @@ void sub_08069654(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08069660(Entity* this) {
|
||||
u32 uVar1;
|
||||
|
||||
MessageNoOverlap(0x2c1c, this);
|
||||
gMessage.field_0x10 = (u16)GoronMerchant_GetSalePrice(this);
|
||||
}
|
||||
@@ -98,16 +96,16 @@ void sub_08069684(void) {
|
||||
}
|
||||
|
||||
void sub_080696B0(void) {
|
||||
gRoomVars.itemForSaleIndex = 0;
|
||||
gRoomVars.shopItemType = 0;
|
||||
}
|
||||
|
||||
u32 GoronMerchant_GetSalePrice(Entity* this) {
|
||||
static u32 GoronMerchant_GetSalePrice(Entity* this) {
|
||||
u32 restockCount;
|
||||
u32 temp;
|
||||
u32 kinstoneType;
|
||||
s32 itemForSale;
|
||||
|
||||
itemForSale = gRoomVars.field_0x7;
|
||||
itemForSale = gRoomVars.shopItemType2;
|
||||
if (itemForSale > 0x70) {
|
||||
kinstoneType = 1;
|
||||
} else {
|
||||
@@ -129,17 +127,17 @@ u32 GoronMerchant_GetSalePrice(Entity* this) {
|
||||
if (CheckGlobalFlag(GORON_KAKERA_LV5)) {
|
||||
restockCount = 4;
|
||||
}
|
||||
return GoronMerchant_KinstonePrices[restockCount * 3 + kinstoneType];
|
||||
return sKinstonePrices[restockCount * 3 + kinstoneType];
|
||||
}
|
||||
|
||||
void GoronMerchant_TryToBuyKinstone(Entity* this, ScriptExecutionContext* context) {
|
||||
s32 salePrice = GoronMerchant_GetSalePrice(this);
|
||||
if (salePrice <= gSave.stats.rupees) {
|
||||
if (sub_0801E7D0(gRoomVars.field_0x7) < 99) {
|
||||
if (sub_0801E7D0(gRoomVars.shopItemType2) < 99) {
|
||||
ModRupees(-salePrice);
|
||||
sub_080A7C18(0x5c, gRoomVars.field_0x7, 0);
|
||||
gRoomVars.itemForSaleIndex = 0;
|
||||
gRoomVars.field_0x7 = 0;
|
||||
sub_080A7C18(0x5c, gRoomVars.shopItemType2, 0);
|
||||
gRoomVars.shopItemType = 0;
|
||||
gRoomVars.shopItemType2 = 0;
|
||||
context->condition = 1;
|
||||
} else {
|
||||
MessageNoOverlap(0x2c1f, this);
|
||||
@@ -149,7 +147,7 @@ void GoronMerchant_TryToBuyKinstone(Entity* this, ScriptExecutionContext* contex
|
||||
MessageNoOverlap(0x2c1e, this);
|
||||
context->condition = 0;
|
||||
}
|
||||
gActiveScriptInfo.flags = gActiveScriptInfo.flags | 1;
|
||||
gActiveScriptInfo.flags |= 1;
|
||||
}
|
||||
|
||||
void (*const gUnk_08111B88[])(Entity*) = {
|
||||
@@ -163,7 +161,7 @@ void (*const gUnk_08111B98[])(Entity*) = {
|
||||
sub_08069654,
|
||||
};
|
||||
|
||||
const u16 GoronMerchant_KinstonePrices[] = {
|
||||
static const u16 sKinstonePrices[] = {
|
||||
#ifdef EU
|
||||
200,
|
||||
100,
|
||||
|
||||
+5
-5
@@ -19,7 +19,7 @@ void sub_0806CAF4(Entity* this) {
|
||||
|
||||
if (this->action == 0) {
|
||||
this->action += 1;
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
npc = CreateNPC(0x4a, 1, 0);
|
||||
if (npc != NULL) {
|
||||
npc->parent = this;
|
||||
@@ -46,7 +46,7 @@ void sub_0806CB80(Entity* this) {
|
||||
this->action += 1;
|
||||
this->animationState = 2;
|
||||
this->frameIndex = 0;
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
}
|
||||
if (this->parent != NULL) {
|
||||
this->frameIndex = (this->parent->frame & 3) + 0x21;
|
||||
@@ -57,7 +57,7 @@ void sub_0806CBB4(Entity* this) {
|
||||
if (this->action == 0) {
|
||||
this->action += 1;
|
||||
this->animationState = 2;
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
InitializeAnimation(this, 0x11);
|
||||
}
|
||||
GetNextFrame(this);
|
||||
@@ -74,7 +74,7 @@ void sub_0806CC08(Entity* this) {
|
||||
case 0:
|
||||
this->action = 1;
|
||||
this->spriteSettings.draw = 1;
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
sub_0807DD64(this);
|
||||
case 1:
|
||||
if (this->interactType == 2) {
|
||||
@@ -154,7 +154,7 @@ void Gregal_Fusion(Entity* this) {
|
||||
if (this->action == 0) {
|
||||
this->action += 1;
|
||||
this->spriteSettings.draw = 1;
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
InitAnimationForceUpdate(this, 6);
|
||||
} else {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
|
||||
@@ -20,7 +20,7 @@ void HurdyGurdyMan(Entity* this) {
|
||||
if (LoadExtraSpriteData(this, &gUnk_081144F0) != 0) {
|
||||
this->action = 1;
|
||||
this->field_0x68.HALF.HI = 0;
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
sub_0807DD50(this);
|
||||
}
|
||||
break;
|
||||
@@ -36,7 +36,7 @@ void HurdyGurdyMan(Entity* this) {
|
||||
pointerToArray = pointerToArray + 3;
|
||||
}
|
||||
sub_0801DFB4(this, (u32)*pointerToArray, (u32)pointerToArray[1], (u32)pointerToArray[2]);
|
||||
gPlayerState.field_0x8b = 3;
|
||||
gPlayerState.controlMode = CONTROL_DISABLED;
|
||||
} else {
|
||||
sub_0807DD94(this, NULL);
|
||||
}
|
||||
@@ -79,7 +79,7 @@ void HurdyGurdyMan_Fusion(Entity* this) {
|
||||
if (uVar1 != 0) {
|
||||
this->action += 1;
|
||||
this->spriteSettings.draw = 1;
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
InitializeAnimation(this, 10);
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -11,7 +11,7 @@ void KingGustaf(Entity* this) {
|
||||
this->action += 1;
|
||||
this->spriteRendering.alphaBlend = 1;
|
||||
this->collisionLayer = 2;
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
sub_0807DD50(this);
|
||||
gScreen.controls.layerFXControl = 0x3f40;
|
||||
gScreen.controls.alphaBlend = 0x1000;
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ void Librari(Entity* this) {
|
||||
this->animationState = this->actionDelay;
|
||||
this->field_0x68.HALF.LO = sub_0801E99C(this);
|
||||
sub_08078784(this, this->field_0x68.HALF.LO);
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
sub_0807DD50(this);
|
||||
break;
|
||||
case 1:
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ bool32 sub_0806C454(Entity* this) {
|
||||
if (LoadExtraSpriteData(this, &gUnk_08113754) == 0) {
|
||||
return FALSE;
|
||||
} else {
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ extern u16 gUnk_0810C34C[];
|
||||
void Marcy(Entity* this) {
|
||||
if (this->action == 0) {
|
||||
this->action += 1;
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
sub_0807DD64(this);
|
||||
}
|
||||
sub_0807DD94(this, NULL);
|
||||
|
||||
@@ -19,7 +19,7 @@ void MayorHagen(Entity* this) {
|
||||
this->action = 1;
|
||||
this->field_0x68.HALF.HI = 0;
|
||||
this->field_0x68.HALF.LO = sub_0801E99C(this);
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
sub_0807DD50(this);
|
||||
break;
|
||||
case 1:
|
||||
|
||||
+1
-1
@@ -65,7 +65,7 @@ void sub_08068780(Entity* this) {
|
||||
this->action = 1;
|
||||
this->spriteSettings.draw = TRUE;
|
||||
this->animationState = this->type;
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
sub_0807DD50(this);
|
||||
break;
|
||||
case 1:
|
||||
|
||||
@@ -12,7 +12,7 @@ void MinishEzlo(Entity* this) {
|
||||
}
|
||||
this->action += 1;
|
||||
this->animationState = this->actionDelay * 2;
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
sub_0807DD50(this);
|
||||
}
|
||||
ExecuteScriptForEntity(this, NULL);
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ void Mutoh(Entity* this) {
|
||||
if (LoadExtraSpriteData(this, &gUnk_08110C00)) {
|
||||
this->action = 1;
|
||||
this->spriteSettings.draw = TRUE;
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
sub_0807DD50(this);
|
||||
}
|
||||
break;
|
||||
|
||||
+1
-1
@@ -79,7 +79,7 @@ void sub_0806B41C(Entity* this) {
|
||||
if (this->field_0x68.HALF.LO == 33)
|
||||
tmp += 3;
|
||||
sub_0801DFB4(this, tmp[0], tmp[1], tmp[2]);
|
||||
gPlayerState.field_0x8b = 3;
|
||||
gPlayerState.controlMode = CONTROL_DISABLED;
|
||||
} else {
|
||||
sub_0807DD94(this, NULL);
|
||||
}
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ extern u32 sub_080028F4(const u8*);
|
||||
void Pita(Entity* this) {
|
||||
if (this->action == 0) {
|
||||
this->action += 1;
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
ResolveEntityOnTop(this, this);
|
||||
this->hitbox = &gUnk_0810C428;
|
||||
sub_0807DD64(this);
|
||||
|
||||
+3
-3
@@ -55,7 +55,7 @@ void sub_0806A3D8(Entity* this) {
|
||||
|
||||
this->action = 1;
|
||||
this->actionDelay = 0xb4;
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
sub_0806A8C8(this);
|
||||
uVar1 = StartCutscene(this, &script_08012F0C);
|
||||
*(ScriptExecutionContext**)&this->cutsceneBeh = uVar1;
|
||||
@@ -196,7 +196,7 @@ void sub_0806A830(Entity* this) {
|
||||
if (this->action == 0) {
|
||||
this->action = 1;
|
||||
InitializeAnimation(this, 0x14);
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
}
|
||||
if ((gActiveScriptInfo.unk_00 & 0x200) != 0) {
|
||||
DeleteThisEntity();
|
||||
@@ -215,7 +215,7 @@ void sub_0806A890(Entity* this) {
|
||||
if (this->action == 0) {
|
||||
this->action = 1;
|
||||
InitializeAnimation(this, 0x15);
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
}
|
||||
GetNextFrame(this);
|
||||
if ((this->frame & 0x80) != 0) {
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ void sub_08065080(Entity* this) {
|
||||
|
||||
this->action = 1;
|
||||
this->spriteSettings.draw = 1;
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
InitializeAnimation(this, 4);
|
||||
sub_08078778(this);
|
||||
#ifndef EU
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ void sub_0806A1F8(Entity* this) {
|
||||
iVar1 = LoadExtraSpriteData(this, paVar2);
|
||||
if (iVar1) {
|
||||
this->action = 1;
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
sub_0807DD50(this);
|
||||
InitializeAnimation(this, 0);
|
||||
}
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ void Teachers(Entity* this) {
|
||||
this->spriteSettings.draw = TRUE;
|
||||
this->animationState = this->actionDelay;
|
||||
this->field_0x68.HALF.HI = 0;
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
sub_0807DD50(this);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -57,7 +57,7 @@ void sub_0806AC3C(Entity* this) {
|
||||
if (this->animIndex <= 3) {
|
||||
s32 unk;
|
||||
Entity* link = &gPlayerEntity;
|
||||
if (sub_080041A0(this, link, 0x18, 0x18)) {
|
||||
if (EntityInRectRadius(this, link, 0x18, 0x18)) {
|
||||
unk = GetFacingDirection(this, link) & 0x1e;
|
||||
} else {
|
||||
unk = this->animationState * 4;
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ void VaatiAction0(Entity* this) {
|
||||
this->spriteSettings.draw = 1;
|
||||
this->field_0x68.HALF.LO = 0;
|
||||
this->field_0x68.HALF.HI = 0;
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
sub_0807DD64(this);
|
||||
VaatiAction1(this);
|
||||
}
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ void Wheaton(Entity* this) {
|
||||
if (this->action == 0) {
|
||||
this->action++;
|
||||
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
|
||||
ResolveEntityOnTop(this, this);
|
||||
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ void sub_08066CCC(Entity* this) {
|
||||
this->action = 1;
|
||||
this->spriteSettings.draw = 1;
|
||||
PrependEntityToList(this, 7);
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
sub_0807DD50(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ void ZeldaFollower(Entity* this) {
|
||||
this->animationState = 4;
|
||||
this->field_0x68.HALF.LO = 0;
|
||||
this->field_0x68.HALF.HI = 0;
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
InitAnimationForceUpdate(this, 0);
|
||||
sub_0806854C(this, NULL);
|
||||
}
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ void (*const gObjectFunctions[])(Entity*) = {
|
||||
[BUTTON] = Button,
|
||||
[OBJECT_4] = Object4,
|
||||
[POT] = Pot,
|
||||
[OBJECT_6] = Object6,
|
||||
[EZLO_CAP] = EzloCap,
|
||||
[PUSHED_BLOCK] = BlockPushed,
|
||||
[LOCKED_DOOR] = LockedDoor,
|
||||
[OBJECT_9] = Object9,
|
||||
|
||||
@@ -34,7 +34,7 @@ void sub_08098D1C(Entity* this) {
|
||||
this->spriteSettings.draw = TRUE;
|
||||
sub_08098E88(this);
|
||||
}
|
||||
SetDefaultPriority(this, 6);
|
||||
SetDefaultPriority(this, PRIO_PLAYER_EVENT);
|
||||
InitAnimationForceUpdate(this, 0);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -211,7 +211,7 @@ void sub_0809B5EC(Entity* this) {
|
||||
u32 sub_0809B688(Entity* this) {
|
||||
u32 ret;
|
||||
|
||||
ret = sub_080041A0(this, &gPlayerEntity, 6, 12);
|
||||
ret = EntityInRectRadius(this, &gPlayerEntity, 6, 12);
|
||||
if (ret == 1 && gPlayerState.field_0xd != 16) {
|
||||
ret = 0;
|
||||
}
|
||||
|
||||
+8
-8
@@ -16,7 +16,7 @@ extern u32 sub_08081E3C(Entity*);
|
||||
|
||||
void sub_08081AE0(Entity* this) {
|
||||
COLLISION_OFF(this);
|
||||
this->updatePriority = 3;
|
||||
this->updatePriority = PRIO_NO_BLOCK;
|
||||
this->y.HALF.HI++;
|
||||
if (this->cutsceneBeh.HWORD != 0) {
|
||||
this->collisionLayer = this->cutsceneBeh.HWORD;
|
||||
@@ -158,11 +158,11 @@ Entity* sub_08081D74(Entity* this) {
|
||||
}
|
||||
} else {
|
||||
if (gPlayerState.flags & 0x400000) {
|
||||
if (sub_080041A0(this, gUnk_03004040[0], 5, 6)) {
|
||||
if (EntityInRectRadius(this, gUnk_03004040[0], 5, 6)) {
|
||||
ent = gUnk_03004040[0];
|
||||
} else if (sub_080041A0(this, gUnk_03004040[1], 5, 6)) {
|
||||
} else if (EntityInRectRadius(this, gUnk_03004040[1], 5, 6)) {
|
||||
ent = gUnk_03004040[1];
|
||||
} else if (sub_080041A0(this, gUnk_03004040[2], 5, 6)) {
|
||||
} else if (EntityInRectRadius(this, gUnk_03004040[2], 5, 6)) {
|
||||
ent = gUnk_03004040[2];
|
||||
}
|
||||
}
|
||||
@@ -176,7 +176,7 @@ u32 sub_08081E0C(Entity* this) {
|
||||
if (tmp->z.HALF.HI != 0 || !sub_08079F8C()) {
|
||||
return 0;
|
||||
} else {
|
||||
return sub_080041A0(this, tmp, 5, 6);
|
||||
return EntityInRectRadius(this, tmp, 5, 6);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,13 +234,13 @@ u32 sub_08081F00(u32* unk1, u32* unk2) {
|
||||
void sub_08081F24(Entity* this) {
|
||||
Entity* fx = CreateFx(this, FX_DASH, 0x40);
|
||||
if (fx) {
|
||||
fx->updatePriority = 3;
|
||||
fx->updatePriority = PRIO_NO_BLOCK;
|
||||
fx->x.HALF.HI += 7;
|
||||
fx->y.HALF.HI += 5;
|
||||
}
|
||||
fx = CreateFx(this, FX_DASH, 0x40);
|
||||
if (fx) {
|
||||
fx->updatePriority = 3;
|
||||
fx->updatePriority = PRIO_NO_BLOCK;
|
||||
fx->x.HALF.HI -= 7;
|
||||
fx->y.HALF.HI += 5;
|
||||
}
|
||||
@@ -252,7 +252,7 @@ u32 sub_08081F7C(Entity* this, u32 r7) {
|
||||
return 1;
|
||||
if (--this->actionDelay > 6) {
|
||||
if (this->child)
|
||||
this->child->spriteOffsetY = 0xfc;
|
||||
this->child->spriteOffsetY = -4;
|
||||
} else {
|
||||
if (this->actionDelay == 6) {
|
||||
SetFlag(this->field_0x86.HWORD);
|
||||
|
||||
+1
-1
@@ -120,7 +120,7 @@ void sub_0809F69C(Entity* this) {
|
||||
void sub_0809F6CC(Entity* this) {
|
||||
|
||||
if (((gRoomControls.unk6 & 4) == 0) && (--this->actionDelay == 0)) {
|
||||
gPlayerState.field_0x8b = 1;
|
||||
gPlayerState.controlMode = 1;
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -469,7 +469,7 @@ void GreatFairy_InitializeAnimation(Entity* this) {
|
||||
this->type2 = this->type % temp;
|
||||
this->collisionLayer = 2;
|
||||
InitializeAnimation(this, this->type2);
|
||||
SetDefaultPriority(this, 2);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
}
|
||||
|
||||
Entity* GreatFairy_CreateForm(Entity* this, u32 curForm, u32 parameter) {
|
||||
@@ -516,7 +516,7 @@ void sub_08087424(Entity* this, ScriptExecutionContext* context) {
|
||||
if (ent != NULL) {
|
||||
ent->parent = &gPlayerEntity;
|
||||
CopyPosition(&gPlayerEntity, ent);
|
||||
SetDefaultPriority(ent, 2);
|
||||
SetDefaultPriority(ent, PRIO_MESSAGE);
|
||||
}
|
||||
|
||||
switch (context->intVariable) {
|
||||
|
||||
@@ -31,7 +31,7 @@ static void sub_0808E6A0(Entity* this) {
|
||||
this->spriteSettings.draw = 0;
|
||||
this->hitbox = &gUnk_08121C58;
|
||||
this->collisionLayer = 3;
|
||||
this->updatePriority = 3;
|
||||
this->updatePriority = PRIO_NO_BLOCK;
|
||||
}
|
||||
|
||||
static void sub_0808E6E4(Entity* this) {
|
||||
|
||||
@@ -27,7 +27,7 @@ static bool32 sub_080867CC(u32);
|
||||
void sub_0808681C(Entity*);
|
||||
static u8 sub_08086954(Entity*);
|
||||
|
||||
extern u32 sub_080562CC(u32, u32, u32, u32);
|
||||
extern u32 CheckRegionOnScreen(u32, u32, u32, u32);
|
||||
extern void sub_08078AC0(u32, u32, u32);
|
||||
|
||||
extern void (*const gUnk_081206B4[])(Entity*);
|
||||
@@ -46,14 +46,14 @@ void sub_080866D8(Entity* this) {
|
||||
this->action = 1;
|
||||
*((u32*)(&this->field_0x68)) = 0;
|
||||
this->field_0x6c.HALF.LO = this->actionDelay;
|
||||
SetDefaultPriority(this, 6);
|
||||
SetDefaultPriority(this, PRIO_PLAYER_EVENT);
|
||||
}
|
||||
|
||||
prop = GetCurrentRoomProperty(this->field_0x6c.HALF.LO);
|
||||
for (i = 0; prop->unk0 != 0xFFFF && i < 32; prop++, i++) {
|
||||
int mask = 1 << i;
|
||||
if ((*((u32*)(&this->field_0x68)) & mask) == 0 && sub_080867CC(prop->unk5) &&
|
||||
sub_080562CC(prop->unk0, prop->unk2, 32, 32)) {
|
||||
CheckRegionOnScreen(prop->unk0, prop->unk2, 32, 32)) {
|
||||
entity = CreateObject(HOUSE_DOOR_EXT, prop->unk7, prop->unk6);
|
||||
if (entity) {
|
||||
entity->field_0x6c.HALF.LO = i;
|
||||
@@ -85,7 +85,7 @@ static bool32 sub_080867CC(u32 arg0) {
|
||||
}
|
||||
|
||||
void sub_080867E4(Entity* this) {
|
||||
if (!sub_080562CC(this->field_0x68.HWORD, this->field_0x6a.HWORD, 32, 32)) {
|
||||
if (!CheckRegionOnScreen(this->field_0x68.HWORD, this->field_0x6a.HWORD, 32, 32)) {
|
||||
*((u32*)(&this->parent->field_0x68)) = *((u32*)(&this->parent->field_0x68)) & ~(1 << this->field_0x6c.HALF.LO);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ void sub_08080F20(Entity* this) {
|
||||
this->field_0x6c.HWORD = 0;
|
||||
this->field_0x68.HALF.LO = 0;
|
||||
this->actionDelay = 0;
|
||||
SetDefaultPriority(this, 3);
|
||||
SetDefaultPriority(this, PRIO_NO_BLOCK);
|
||||
this->field_0x1c = sub_0808147C(this->type);
|
||||
gUnk_0811E7E8[this->field_0x68.HALF.HI](this);
|
||||
} else {
|
||||
@@ -338,7 +338,7 @@ void sub_08081404(Entity* this, u32 arg1) {
|
||||
|
||||
bool32 sub_08081420(Entity* this) {
|
||||
if (CheckShouldPlayItemGetCutscene(this)) {
|
||||
SetDefaultPriority(this, 6);
|
||||
SetDefaultPriority(this, PRIO_PLAYER_EVENT);
|
||||
CreateItemEntity(this->type, this->type2, 0);
|
||||
return TRUE;
|
||||
} else {
|
||||
|
||||
@@ -34,7 +34,7 @@ void LilypadSmall(Entity* this) {
|
||||
u32 sub_08097ADC(Entity* this) {
|
||||
if ((gPlayerState.flags & PL_MINISH) == 0) {
|
||||
return 0;
|
||||
} else if (sub_080041A0(this, &gPlayerEntity, 8, 8) == 0) {
|
||||
} else if (EntityInRectRadius(this, &gPlayerEntity, 8, 8) == 0) {
|
||||
return 0;
|
||||
} else if (sub_08079F8C() == 0) {
|
||||
return 0;
|
||||
|
||||
@@ -94,7 +94,7 @@ void sub_080917DC(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_080918A4(Entity* this) {
|
||||
if (sub_080041A0(this, &gPlayerEntity, 2, 2) != 0) {
|
||||
if (EntityInRectRadius(this, &gPlayerEntity, 2, 2) != 0) {
|
||||
gPlayerEntity.x.HALF.HI = this->x.HALF.HI;
|
||||
gPlayerEntity.y.HALF.HI = this->y.HALF.HI;
|
||||
if (gPlayerEntity.z.HALF.HI > -0x10) {
|
||||
|
||||
@@ -31,7 +31,7 @@ void sub_08090F00(Entity* this) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
if ((gPlayerState.flags & PL_MINISH) && sub_080041A0(this, &gPlayerEntity, 4, 4) &&
|
||||
if ((gPlayerState.flags & PL_MINISH) && EntityInRectRadius(this, &gPlayerEntity, 4, 4) &&
|
||||
(gPlayerEntity.z.HALF.HI == 0) && (((u16)gPlayerState.field_0x90.HALF.LO) & gUnk_0812225C[this->type2])) {
|
||||
DoExitTransition(GetCurrentRoomProperty(this->actionDelay));
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user