merge upstream

This commit is contained in:
theo3
2023-12-30 17:25:11 -08:00
507 changed files with 14444 additions and 14095 deletions
@@ -15,7 +15,7 @@ void CloudStaircaseTransitionManager_Main(CloudStaircaseTransitionManager* this)
this->y = 0;
}
if (((CheckPlayerInRegion(this->x, this->y, 0x14, 0x40) != 0) &&
(((gPlayerEntity.y.HALF.HI - gRoomControls.origin_y) + gPlayerEntity.z.HALF.HI) < 0)) &&
(((gPlayerEntity.base.y.HALF.HI - gRoomControls.origin_y) + gPlayerEntity.base.z.HALF.HI) < 0)) &&
(gRoomControls.scroll_y == gRoomControls.origin_y)) {
MemClear(&gRoomTransition.player_status, sizeof(PlayerRoomStatus));
gRoomTransition.transitioningOut = 1;
+8 -8
View File
@@ -77,8 +77,8 @@ bool32 DiggingCaveEntranceManager_CheckEnterEntrance(DiggingCaveEntranceManager*
u16 offsetX, offsetY, offsetX2, offsetY2;
u32 tmp, tmp2;
if (gDiggingCaveEntranceTransition.isDiggingCave) {
offsetX = gPlayerEntity.x.HALF.HI - gRoomControls.origin_x;
offsetY = gPlayerEntity.y.HALF.HI - gRoomControls.origin_y;
offsetX = gPlayerEntity.base.x.HALF.HI - gRoomControls.origin_x;
offsetY = gPlayerEntity.base.y.HALF.HI - gRoomControls.origin_y;
offsetX2 = (entr->sourceTilePosition & TILE_POS_X_COMPONENT) * 16 + 8;
offsetY2 = ((entr->sourceTilePosition & TILE_POS_Y_COMPONENT) >> 6) * 16 + 0x18;
tmp = offsetX - offsetX2;
@@ -89,10 +89,10 @@ bool32 DiggingCaveEntranceManager_CheckEnterEntrance(DiggingCaveEntranceManager*
DiggingCaveEntranceManager_EnterEntrance(this, entr);
return TRUE;
} else {
if (COORD_TO_TILE(&gPlayerEntity) != entr->sourceTilePosition)
if (COORD_TO_TILE(&gPlayerEntity.base) != entr->sourceTilePosition)
return FALSE;
offsetY2 = gRoomControls.origin_y + ((entr->sourceTilePosition >> 6) << 4) + 6;
if (gPlayerEntity.y.HALF.HI >= offsetY2)
if (gPlayerEntity.base.y.HALF.HI >= offsetY2)
return FALSE;
DiggingCaveEntranceManager_EnterEntrance(this, entr);
return TRUE;
@@ -109,10 +109,10 @@ void DiggingCaveEntranceManager_EnterEntrance(DiggingCaveEntranceManager* this,
gRoomControls.area = entr->targetArea;
gRoomControls.room = entr->targetRoom;
gDiggingCaveEntranceTransition.entrance = entr;
gDiggingCaveEntranceTransition.offsetX =
gPlayerEntity.x.HALF.HI - gRoomControls.origin_x - ((entr->sourceTilePosition & TILE_POS_X_COMPONENT) * 16);
gDiggingCaveEntranceTransition.offsetY =
gPlayerEntity.y.HALF.HI - gRoomControls.origin_y - ((entr->sourceTilePosition & TILE_POS_Y_COMPONENT) >> 2);
gDiggingCaveEntranceTransition.offsetX = gPlayerEntity.base.x.HALF.HI - gRoomControls.origin_x -
((entr->sourceTilePosition & TILE_POS_X_COMPONENT) * 16);
gDiggingCaveEntranceTransition.offsetY = gPlayerEntity.base.y.HALF.HI - gRoomControls.origin_y -
((entr->sourceTilePosition & TILE_POS_Y_COMPONENT) >> 2);
#ifndef EU
isDiggingCave = gDiggingCaveEntranceTransition.isDiggingCave;
+2 -2
View File
@@ -121,7 +121,7 @@ static void EzloHintManager_Action3(EzloHintManager* this) {
if (gPlayerState.flags &
(PL_BUSY | PL_DROWNING | PL_USE_PORTAL | PL_FALLING | PL_IN_MINECART | PL_CAPTURED))
return;
if (gPlayerEntity.z.HALF.HI != 0)
if (gPlayerEntity.base.z.HALF.HI != 0)
return;
gPlayerState.jump_status = 0;
CreateEzloHint(this->msg_idx, this->msg_height);
@@ -136,7 +136,7 @@ static void EzloHintManager_Action3(EzloHintManager* this) {
return;
case 3:
/* wait for player to finish talking */
if (gPlayerEntity.action == PLAYER_NORMAL || gPlayerEntity.action == PLAYER_MINISH) {
if (gPlayerEntity.base.action == PLAYER_NORMAL || gPlayerEntity.base.action == PLAYER_MINISH) {
gPlayerState.controlMode = CONTROL_1;
ResetPlayerEventPriority();
SetFlag(this->flag1);
+8 -6
View File
@@ -7,8 +7,10 @@
* If you leave the room without picking the item up and enter again, the item falls from the sky again.
*/
#include "manager/fallingItemManager.h"
#include "flags.h"
#include "object.h"
#include "object/itemOnGround.h"
#include "room.h"
void FallingItemManager_Init(FallingItemManager*);
@@ -32,13 +34,13 @@ void FallingItemManager_Init(FallingItemManager* this) {
void FallingItemManager_Action1(FallingItemManager* this) {
if (CheckFlags(this->field_0x3e)) {
Entity* object = CreateObject(GROUND_ITEM, super->type, super->type2);
ItemOnGroundEntity* object = (ItemOnGroundEntity*)CreateObject(GROUND_ITEM, super->type, super->type2);
if (object != NULL) {
object->timer = this->field_0x35;
object->collisionLayer = this->field_0x36;
object->x.HALF.HI = this->field_0x38 + gRoomControls.origin_x;
object->y.HALF.HI = this->field_0x3a + gRoomControls.origin_y;
object->field_0x86.HWORD = this->field_0x3c;
object->base.timer = this->field_0x35;
object->base.collisionLayer = this->field_0x36;
object->base.x.HALF.HI = this->field_0x38 + gRoomControls.origin_x;
object->base.y.HALF.HI = this->field_0x3a + gRoomControls.origin_y;
object->unk_86 = this->field_0x3c;
}
DeleteThisEntity();
}
+1 -1
View File
@@ -112,7 +112,7 @@ void FightManager_LoadFight(FightManager* this) {
while (prop->kind != 0xFF) {
ent = LoadRoomEntity(prop++);
if ((ent != NULL) && (ent->kind == ENEMY)) {
ent->field_0x6c.HALF.HI |= 0x40;
((GenericEntity*)ent)->field_0x6c.HALF.HI |= 0x40;
FightManagerHelper_Monitor(monitor, ent, counter++);
}
if (counter >= 7) {
+13 -11
View File
@@ -5,10 +5,12 @@
* @brief Spawns the shop items for the kinstones for the goron merchant.
*/
#include "manager/goronMerchantShopManager.h"
#include "asm.h"
#include "flags.h"
#include "object.h"
#include "item.h"
#include "object.h"
#include "object/itemForSale.h"
typedef struct {
u16 minType;
@@ -59,17 +61,17 @@ void GoronMerchantShopManager_Main(GoronMerchantShopManager* this) {
count = 0;
for (count = 0; count < 3;) {
if (CheckGlobalFlag(GORON_KAKERA_L + count) == 0) {
Entity* object =
CreateObject(SHOP_ITEM, ITEM_KINSTONE, ((s32)Random() % spawnData->numTypes) + spawnData->minType);
ItemForSaleEntity* object = (ItemForSaleEntity*)CreateObject(
SHOP_ITEM, ITEM_KINSTONE, ((s32)Random() % spawnData->numTypes) + spawnData->minType);
if (object != NULL) {
object->timer = 1;
object->subtimer = count;
object->x.HALF.HI = spawnData->x + gRoomControls.origin_x;
object->y.HALF.HI = spawnData->y + gRoomControls.origin_y;
object->field_0x80.HWORD = spawnData->x;
object->field_0x82.HWORD = spawnData->y;
object->collisionLayer = 1;
object->parent = (Entity*)this;
object->base.timer = 1;
object->base.subtimer = count;
object->base.x.HALF.HI = spawnData->x + gRoomControls.origin_x;
object->base.y.HALF.HI = spawnData->y + gRoomControls.origin_y;
object->unk_80 = spawnData->x;
object->unk_82 = spawnData->y;
object->base.collisionLayer = 1;
object->base.parent = (Entity*)this;
this->itemActive[count] = 1;
}
}
+4 -2
View File
@@ -155,8 +155,10 @@ void sub_0805B210(HoleManager* this) {
gRoomTransition.player_status.start_pos_y = tmp->unk_06;
break;
case 1:
gRoomTransition.player_status.start_pos_x = gPlayerEntity.x.HALF.HI - gRoomControls.origin_x + tmp->unk_04;
gRoomTransition.player_status.start_pos_y = gPlayerEntity.y.HALF.HI - gRoomControls.origin_y + tmp->unk_06;
gRoomTransition.player_status.start_pos_x =
gPlayerEntity.base.x.HALF.HI - gRoomControls.origin_x + tmp->unk_04;
gRoomTransition.player_status.start_pos_y =
gPlayerEntity.base.y.HALF.HI - gRoomControls.origin_y + tmp->unk_06;
break;
case 2:
gRoomTransition.player_status.start_pos_x = tmp->unk_04;
+12 -10
View File
@@ -8,10 +8,12 @@
* Creates the signs on the houses in hyrule town.
*/
#include "manager/houseSignManager.h"
#include "area.h"
#include "object.h"
#include "room.h"
#include "asm.h"
#include "object.h"
#include "object/houseSign.h"
#include "room.h"
typedef struct {
u16 x;
@@ -56,15 +58,15 @@ void HouseSignManager_Main(HouseSignManager* this) {
u32 bitfieldFlag = 1 << type2;
if ((((this->bitfield & bitfieldFlag) == 0) &&
(CheckRectOnScreen(spawnData->x, spawnData->y, 0x10, 0x10) != 0))) {
Entity* object = CreateObject(HOUSE_SIGN, spawnData->type, type2);
HouseSignEntity* object = (HouseSignEntity*)CreateObject(HOUSE_SIGN, spawnData->type, type2);
if (object != NULL) {
object->frameIndex = spawnData->frameIndex;
object->x.HALF.HI = gRoomControls.origin_x + spawnData->x;
object->y.HALF.HI = gRoomControls.origin_y + spawnData->y;
object->parent = (Entity*)this;
object->field_0x80.HWORD = spawnData->x;
object->field_0x82.HWORD = spawnData->y;
object->collisionLayer = spawnData->collisionLayer;
object->base.frameIndex = spawnData->frameIndex;
object->base.x.HALF.HI = gRoomControls.origin_x + spawnData->x;
object->base.y.HALF.HI = gRoomControls.origin_y + spawnData->y;
object->base.parent = (Entity*)this;
object->unk_80 = spawnData->x;
object->unk_82 = spawnData->y;
object->base.collisionLayer = spawnData->collisionLayer;
this->bitfield |= bitfieldFlag;
}
}
+3 -3
View File
@@ -13,11 +13,11 @@
void HyruleTownBellManager_Main(HyruleTownBellManager* this) {
RoomControls* roomControls = &gRoomControls;
u32 a = roomControls->origin_x + 0x1f8;
u32 x = (a - gPlayerEntity.x.HALF.HI) + 0x10;
u32 x = (a - gPlayerEntity.base.x.HALF.HI) + 0x10;
u32 b = roomControls->origin_y + 0x140;
u32 y = (b - gPlayerEntity.y.HALF.HI) + 0x10;
u32 y = (b - gPlayerEntity.base.y.HALF.HI) + 0x10;
if (super->action == 0) {
if (x < 0x20 && y < 0x20 && gPlayerEntity.z.HALF.HI < -0x18 && gPlayerState.framestate == PL_STATE_CAPE) {
if (x < 0x20 && y < 0x20 && gPlayerEntity.base.z.HALF.HI < -0x18 && gPlayerState.framestate == PL_STATE_CAPE) {
super->action++;
super->timer = 90;
SoundReq(SFX_10A);
+4 -4
View File
@@ -49,8 +49,8 @@ void LightManager_Main(LightManager* this) {
if (gArea.lightType == 2) {
gScreen.lcd.displayControl &= ~DISPCNT_WIN0_ON;
} else {
if (CheckRectOnScreen(gPlayerEntity.x.HALF.HI - gRoomControls.origin_x,
gPlayerEntity.y.HALF.HI - gRoomControls.origin_y, 0, 0)) {
if (CheckRectOnScreen(gPlayerEntity.base.x.HALF.HI - gRoomControls.origin_x,
gPlayerEntity.base.y.HALF.HI - gRoomControls.origin_y, 0, 0)) {
gScreen.lcd.displayControl |= DISPCNT_WIN0_ON;
} else {
gScreen.lcd.displayControl &= ~DISPCNT_WIN0_ON;
@@ -79,8 +79,8 @@ void LightManager_Main(LightManager* this) {
}
super->timer = uVar3;
sub_0801E160(gPlayerEntity.x.HALF.HI - gRoomControls.scroll_x,
gPlayerEntity.y.HALF.HI - gRoomControls.scroll_y - 9 + gPlayerEntity.z.HALF.HI,
sub_0801E160(gPlayerEntity.base.x.HALF.HI - gRoomControls.scroll_x,
gPlayerEntity.base.y.HALF.HI - gRoomControls.scroll_y - 9 + gPlayerEntity.base.z.HALF.HI,
uVar3 + this->unk20);
}
}
+2 -2
View File
@@ -88,8 +88,8 @@ void LightRayManager_Action1(LightRayManager* this) {
if (prop->unk0 == 0xff)
return;
x = gPlayerEntity.x.HALF.HI / 16;
y = gPlayerEntity.y.HALF.HI / 16;
x = gPlayerEntity.base.x.HALF.HI / 16;
y = gPlayerEntity.base.y.HALF.HI / 16;
for (; prop->unk0 != 0xff; prop++) {
if (prop->unk0 != this->unk_21) {
+6 -6
View File
@@ -164,7 +164,7 @@ void MiscManager_Type1(MiscManager* this) {
PutAwayItems();
}
if (super->timer == 60) {
gPlayerEntity.animationState = super->subtimer;
gPlayerEntity.base.animationState = super->subtimer;
}
if (!--super->timer) {
super->action = 3;
@@ -298,7 +298,7 @@ void sub_08059278(void) {
void MiscManager_Type8(MiscManager* this) {
super->action = 1;
gRoomControls.camera_target = &gPlayerEntity;
gRoomControls.camera_target = &gPlayerEntity.base;
}
void MiscManager_Type9(MiscManager* this) {
@@ -363,9 +363,9 @@ void MiscManager_TypeB(MiscManager* this) {
}
bool32 sub_080593CC(MiscManager* this) {
if (!(gPlayerState.flags & PL_MINISH) && gPlayerState.swim_state != 0 && gPlayerEntity.animationState == 0 &&
if (!(gPlayerState.flags & PL_MINISH) && gPlayerState.swim_state != 0 && gPlayerEntity.base.animationState == 0 &&
(gPlayerState.playerInput.heldInput & INPUT_ANY_DIRECTION) == INPUT_UP) {
return EntityWithinDistance(&gPlayerEntity, this->unk_38, this->unk_3a + 0xC, 6);
return EntityWithinDistance(&gPlayerEntity.base, this->unk_38, this->unk_3a + 0xC, 6);
}
return FALSE;
}
@@ -395,7 +395,7 @@ void MiscManager_TypeD(MiscManager* this) {
if (gRoomVars.didEnterScrolling) {
StartPlayerScript(gUnk_08108380[gRoomControls.scroll_direction]);
} else {
StartPlayerScript(gUnk_08108380[gPlayerEntity.animationState >> 1]);
StartPlayerScript(gUnk_08108380[gPlayerEntity.base.animationState >> 1]);
}
}
DeleteThisEntity();
@@ -431,7 +431,7 @@ void MiscManager_TypeE(MiscManager* this) {
#if defined(USA) || defined(DEMO_USA) || defined(DEMO_JP)
void MiscManager_TypeF(MiscManager* this) {
SetEntityPriority((Entity*)this, PRIO_PLAYER_EVENT);
if (gPlayerEntity.action == PLAYER_TALKEZLO) {
if (gPlayerEntity.base.action == PLAYER_TALKEZLO) {
DeleteThisEntity();
}
gInput.heldKeys |= SELECT_BUTTON;
+1 -1
View File
@@ -14,7 +14,7 @@ void MoveableObjectManager_Main(MoveableObjectManager* this) {
Entity* object = CreateObject(super->timer, super->type, super->type2);
if (!object)
return;
object->field_0x86.HWORD = this->flags;
((GenericEntity*)object)->field_0x86.HWORD = this->flags;
if (CheckFlags(this->flags)) {
object->x.HALF.HI = this->unk_36 | (this->unk_37 & 0xF) << 8; // r1
object->y.HALF.HI = this->unk_3c & 0xFFF;
+14 -12
View File
@@ -5,8 +5,10 @@
* @brief Creates pushable furniture based on a room property list.
*/
#include "manager/pushableFurnitureManager.h"
#include "flags.h"
#include "object.h"
#include "object/pushableFurniture.h"
#include "room.h"
void PushableFurnitureManager_Init(PushableFurnitureManager*);
@@ -35,16 +37,16 @@ void PushableFurnitureManager_Init(PushableFurnitureManager* this) {
this->unk_28 = 0;
this->unk_29 = 0;
while (tmp->unk_00 != 0xFF && super->timer < 0x20) {
Entity* obj;
obj = CreateObject(PUSHABLE_FURNITURE, tmp->unk_01, tmp->unk_02);
if (obj) {
obj->timer = tmp->unk_03;
obj->x.HALF.HI = gRoomControls.origin_x + tmp->unk_04;
obj->y.HALF.HI = gRoomControls.origin_y + tmp->unk_06;
obj->parent = (Entity*)this;
obj->collisionLayer = 1;
obj->field_0x82.HALF.HI = super->timer;
obj->field_0x82.HALF.LO = tmp->unk_00;
PushableFurnitureEntity* furniture =
(PushableFurnitureEntity*)CreateObject(PUSHABLE_FURNITURE, tmp->unk_01, tmp->unk_02);
if (furniture) {
furniture->base.timer = tmp->unk_03;
furniture->base.x.HALF.HI = gRoomControls.origin_x + tmp->unk_04;
furniture->base.y.HALF.HI = gRoomControls.origin_y + tmp->unk_06;
furniture->base.parent = (Entity*)this;
furniture->base.collisionLayer = 1;
furniture->unk_83 = super->timer;
furniture->unk_82 = tmp->unk_00;
this->unk_29 |= 1 << super->timer;
}
tmp++;
@@ -75,13 +77,13 @@ void PushableFurnitureManager_Action2(PushableFurnitureManager* this) {
void sub_0805C7CC(PushableFurnitureManager* this) {
if (gPlayerState.flags & PL_MINISH) {
if (gPlayerEntity.y.HALF.HI < this->unk_2a + 0x10) {
if (gPlayerEntity.base.y.HALF.HI < this->unk_2a + 0x10) {
super->subAction = 1;
} else {
super->subAction = 0;
}
} else {
if (gPlayerEntity.y.HALF.HI < this->unk_2a + 0x28) {
if (gPlayerEntity.base.y.HALF.HI < this->unk_2a + 0x28) {
super->subAction = 3;
} else {
super->subAction = 2;
+13 -13
View File
@@ -93,7 +93,7 @@ void sub_080588F8(RollingBarrelManager* this) {
}
}
if (super->timer) {
s32 tmp = gPlayerEntity.y.HALF.HI - gRoomControls.origin_y;
s32 tmp = gPlayerEntity.base.y.HALF.HI - gRoomControls.origin_y;
u32 tmp2;
tmp2 = (((unsigned)(tmp - 0x50 < 0 ? 0x50 - tmp : tmp - 0x50) >> 3) * 0x3000) + 0x4000;
if (super->subtimer == 0) {
@@ -134,14 +134,14 @@ void sub_08058A04(RollingBarrelManager* this) {
{ 0x9C, 0x78, 0x1A, 0x16 }, { 0x9A, 0x70, 0x1A, 0x18 },
{ 0x98, 0x64, 0x1E, 0x1E }, { 0x98, 0x6A, 0x1C, 0x10 } };
s32 tmp = gPlayerEntity.x.HALF.HI - gRoomControls.origin_x;
s32 tmp2 = gPlayerEntity.y.HALF.HI - gRoomControls.origin_y;
s32 tmp = gPlayerEntity.base.x.HALF.HI - gRoomControls.origin_x;
s32 tmp2 = gPlayerEntity.base.y.HALF.HI - gRoomControls.origin_y;
if ((this->unk_20 - 0x118 < 0xDu) && CheckGlobalFlag(LV1TARU_OPEN) && (tmp - 0x6d < 0x17u) &&
(tmp2 - 0x45 < 0x17u) && (gPlayerEntity.z.HALF.HI == 0)) {
(tmp2 - 0x45 < 0x17u) && (gPlayerEntity.base.z.HALF.HI == 0)) {
gPlayerState.queued_action = PLAYER_FALL;
gPlayerState.field_0x38 = 0;
gPlayerEntity.x.HALF.HI = gRoomControls.origin_x + 0x78;
gPlayerEntity.y.HALF.HI = gRoomControls.origin_y + 0x50;
gPlayerEntity.base.x.HALF.HI = gRoomControls.origin_x + 0x78;
gPlayerEntity.base.y.HALF.HI = gRoomControls.origin_y + 0x50;
return;
}
if (tmp < 0x78) {
@@ -176,8 +176,8 @@ u32 sub_08058B08(RollingBarrelManager* this, u32 unk1, u32 unk2, const struct_08
tmp -= unk1;
tmp >>= 3;
unk3 += tmp;
tmp2 = (gPlayerEntity.x.HALF.HI - gRoomControls.origin_x - unk3->unk_0);
tmp3 = (gPlayerEntity.y.HALF.HI - gRoomControls.origin_y - unk3->unk_2);
tmp2 = (gPlayerEntity.base.x.HALF.HI - gRoomControls.origin_x - unk3->unk_0);
tmp3 = (gPlayerEntity.base.y.HALF.HI - gRoomControls.origin_y - unk3->unk_2);
return ((tmp2 < unk3->unk_4) && (tmp3 < unk3->unk_6));
}
}
@@ -230,8 +230,8 @@ void sub_08058BC8(RollingBarrelManager* this) {
void sub_08058CB0(RollingBarrelManager* this) {
static const u16 gUnk_08108300[4] = { 0xA4, 0x4C, 0xF4, 0x9C };
u32 tmp = gPlayerEntity.x.HALF.HI - gRoomControls.origin_x;
u32 tmp2 = gPlayerEntity.y.HALF.HI - gRoomControls.origin_y;
u32 tmp = gPlayerEntity.base.x.HALF.HI - gRoomControls.origin_x;
u32 tmp2 = gPlayerEntity.base.y.HALF.HI - gRoomControls.origin_y;
u32 tmp3;
if (tmp < 0x78) {
tmp3 = 1;
@@ -248,12 +248,12 @@ void sub_08058CB0(RollingBarrelManager* this) {
}
void sub_08058CFC(void) {
u32 tmp = gPlayerEntity.y.HALF.HI - gRoomControls.scroll_y;
u32 tmp = gPlayerEntity.base.y.HALF.HI - gRoomControls.scroll_y;
if (tmp < 0x4C) {
sub_080044AE(&gPlayerEntity, 0xC0, 0x10);
sub_080044AE(&gPlayerEntity.base, 0xC0, 0x10);
}
if (tmp > 0x54) {
sub_080044AE(&gPlayerEntity, 0xC0, 0);
sub_080044AE(&gPlayerEntity.base, 0xC0, 0);
}
}
+2 -2
View File
@@ -22,10 +22,10 @@ void SpecialWarpManager_Main(SpecialWarpManager* this) {
if (super->timer == 0 || gPlayerState.floor_type == SURFACE_LADDER) {
for (data = this->warpList; data->posX != 0xffff; data++) {
collisionLayer = (data->unk_07.all & 0x3);
if ((collisionLayer & gPlayerEntity.collisionLayer) != 0) {
if ((collisionLayer & gPlayerEntity.base.collisionLayer) != 0) {
if ((gPlayerState.flags & PL_MINISH) != 0 || data->unk_07.b.unk2 != 0) {
if (CheckPlayerInRegion(data->posX, data->posY, data->width, data->height) &&
gPlayerEntity.z.HALF.HI == 0) {
gPlayerEntity.base.z.HALF.HI == 0) {
DoExitTransition(GetCurrentRoomProperty(data->roomProperty));
}
}
+3 -3
View File
@@ -334,14 +334,14 @@ void TempleOfDropletsManager_Type6_Action1(TempleOfDropletsManager* this) {
}
void TempleOfDropletsManager_Type6_Action2(TempleOfDropletsManager* this) {
if ((gPlayerEntity.health != 0) && (gPlayerEntity.z.HALF.HI == 0) && (!gPlayerState.item)) {
if ((gPlayerEntity.base.health != 0) && (gPlayerEntity.base.z.HALF.HI == 0) && (!gPlayerState.item)) {
switch (gPlayerState.framestate_last) {
case PL_STATE_IDLE:
case PL_STATE_WALK:
if (sub_0805A73C(this)) {
super->action++;
sub_08004168(&gPlayerEntity);
gPlayerEntity.animationState = 4;
sub_08004168(&gPlayerEntity.base);
gPlayerEntity.base.animationState = 4;
RequestPriorityDuration((Entity*)this, 600);
SetPlayerControl(0xFF);
gPauseMenuOptions.disabled = 1;
+2 -2
View File
@@ -24,10 +24,10 @@ void TilePuzzleManager_Main(TilePuzzleManager* this) {
super->action = IN_PROGRESS;
super->subtimer = super->timer;
this->own_tile = (((this->x >> 4) & 0x3fU) | ((this->y >> 4) & 0x3fU) << 6);
this->player_previous_tile = this->player_current_tile = COORD_TO_TILE((&gPlayerEntity));
this->player_previous_tile = this->player_current_tile = COORD_TO_TILE((&gPlayerEntity.base));
break;
case 1:
this->player_current_tile = COORD_TO_TILE((&gPlayerEntity));
this->player_current_tile = COORD_TO_TILE((&gPlayerEntity.base));
if (this->player_current_tile != this->player_previous_tile) {
this->player_previous_tile = this->player_current_tile;
switch (GetTileType(this->player_current_tile, super->type2)) {
+7 -7
View File
@@ -63,8 +63,8 @@ void Vaati3StartManager_Type0_Action1(Vaati3StartManager* this) {
s32 distY;
Entity* object;
distX = gPlayerEntity.x.HALF.HI - (gRoomControls.origin_x + 0x88);
distY = gPlayerEntity.y.HALF.HI - (gRoomControls.origin_y + 0x40);
distX = gPlayerEntity.base.x.HALF.HI - (gRoomControls.origin_x + 0x88);
distY = gPlayerEntity.base.y.HALF.HI - (gRoomControls.origin_y + 0x40);
if (distX * distX + distY * distY < 0x901) {
super->action = 2;
super->subAction = 0;
@@ -76,7 +76,7 @@ void Vaati3StartManager_Type0_Action1(Vaati3StartManager* this) {
object->x.HALF.HI = gRoomControls.origin_x + 0x88;
object->y.HALF.HI = gRoomControls.origin_y + 0x48;
}
object = CreateSpeechBubbleExclamationMark(&gPlayerEntity, 8, 0xfffffff0);
object = CreateSpeechBubbleExclamationMark(&gPlayerEntity.base, 8, 0xfffffff0);
if (object != NULL) {
object->spritePriority.b0 = 3;
}
@@ -85,10 +85,10 @@ void Vaati3StartManager_Type0_Action1(Vaati3StartManager* this) {
}
void Vaati3StartManager_Type0_Action2(Vaati3StartManager* this) {
gPlayerEntity.animationState = 0;
if (gPlayerEntity.z.HALF.HI != 0) {
if (gPlayerEntity.y.HALF.HI < (gRoomControls.origin_y + 0x48)) {
gPlayerEntity.y.HALF.HI = gRoomControls.origin_y + 0x48;
gPlayerEntity.base.animationState = 0;
if (gPlayerEntity.base.z.HALF.HI != 0) {
if (gPlayerEntity.base.y.HALF.HI < (gRoomControls.origin_y + 0x48)) {
gPlayerEntity.base.y.HALF.HI = gRoomControls.origin_y + 0x48;
}
} else {
if (--super->timer == 0) {
+4 -4
View File
@@ -11,10 +11,10 @@
void WaterfallBottomManager_Main(WaterfallBottomManager* this) {
SetTile(0x4014, 0x5c3, 1);
if ((gRoomControls.origin_y + 200 < gPlayerEntity.y.HALF.HI) &&
((u32)(gPlayerEntity.x.HALF.HI - gRoomControls.origin_x) - 0x30 < 0x11)) {
gPlayerEntity.collisionLayer = 3;
UpdateSpriteForCollisionLayer(&gPlayerEntity);
if ((gRoomControls.origin_y + 200 < gPlayerEntity.base.y.HALF.HI) &&
((u32)(gPlayerEntity.base.x.HALF.HI - gRoomControls.origin_x) - 0x30 < 0x11)) {
gPlayerEntity.base.collisionLayer = 3;
UpdateSpriteForCollisionLayer(&gPlayerEntity.base);
}
DeleteManager(super);
}
+2 -2
View File
@@ -153,11 +153,11 @@ void sub_080596E0(WeatherChangeManager* this) {
}
u32 sub_08059844(void) {
return gPlayerEntity.x.HALF.HI - gRoomControls.origin_x > gRoomControls.width >> 1;
return gPlayerEntity.base.x.HALF.HI - gRoomControls.origin_x > gRoomControls.width >> 1;
}
u32 sub_0805986C(void) {
return gPlayerEntity.x.HALF.HI - gRoomControls.origin_x > 0x200;
return gPlayerEntity.base.x.HALF.HI - gRoomControls.origin_x > 0x200;
}
void sub_08059894(const u16* unk1, const u16* unk2, u32 unk3) {