mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-07-04 13:31:10 -04:00
Merge branch 'develop' of garrettjoecox.github.com:HarbourMasters/Shipwright into let-it-snow
This commit is contained in:
@@ -26,6 +26,10 @@
|
||||
#define Audio_SeqCmd8(playerIdx, a, b, c) \
|
||||
Audio_QueueSeqCmd(0x80000000 | ((u8)playerIdx << 24) | ((u8)a << 16) | ((u8)b << 8) | ((u8)c))
|
||||
#define Audio_SeqCmdF(playerIdx, a) Audio_QueueSeqCmd(0xF0000000 | ((u8)playerIdx << 24) | ((u8)a))
|
||||
#define BTN_CUSTOM_RSTICK_UP ((CONTROLLERBUTTONS_T)0x01000000)
|
||||
#define BTN_CUSTOM_RSTICK_DOWN ((CONTROLLERBUTTONS_T)0x02000000)
|
||||
#define BTN_CUSTOM_RSTICK_LEFT ((CONTROLLERBUTTONS_T)0x04000000)
|
||||
#define BTN_CUSTOM_RSTICK_RIGHT ((CONTROLLERBUTTONS_T)0x08000000)
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ f32 vol;
|
||||
@@ -1261,13 +1265,26 @@ void Audio_OcaUpdateBtnMap(bool customControls) {
|
||||
sOcarinaA4BtnMap = BTN_CUSTOM_OCARINA_NOTE_A4;
|
||||
sOcarinaF4BtnMap = BTN_CUSTOM_OCARINA_NOTE_F4;
|
||||
sOcarinaD4BtnMap = BTN_CUSTOM_OCARINA_NOTE_D4;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
sOcarinaD5BtnMap = BTN_CUP;
|
||||
sOcarinaB4BtnMap = BTN_CLEFT;
|
||||
sOcarinaA4BtnMap = BTN_CRIGHT;
|
||||
sOcarinaF4BtnMap = BTN_CDOWN;
|
||||
sOcarinaD4BtnMap = BTN_A;
|
||||
}
|
||||
if (CVarGetInteger(CVAR_SETTING("CustomOcarina.Dpad"), 0)) {
|
||||
sOcarinaD5BtnMap |= BTN_DUP;
|
||||
sOcarinaB4BtnMap |= BTN_DLEFT;
|
||||
sOcarinaA4BtnMap |= BTN_DRIGHT;
|
||||
sOcarinaF4BtnMap |= BTN_DDOWN;
|
||||
}
|
||||
if (CVarGetInteger(CVAR_SETTING("CustomOcarina.RightStick"), 0)) {
|
||||
sOcarinaD5BtnMap |= BTN_CUSTOM_RSTICK_UP;
|
||||
sOcarinaB4BtnMap |= BTN_CUSTOM_RSTICK_LEFT;
|
||||
sOcarinaA4BtnMap |= BTN_CUSTOM_RSTICK_RIGHT;
|
||||
sOcarinaF4BtnMap |= BTN_CUSTOM_RSTICK_DOWN;
|
||||
}
|
||||
|
||||
sOcarinaAllowedBtnMask = (
|
||||
sOcarinaD5BtnMap |
|
||||
@@ -1289,6 +1306,21 @@ void Audio_GetOcaInput(void) {
|
||||
sPrevOcarinaBtnPress = sp18;
|
||||
sCurOcaStick.x = input->rel.stick_x;
|
||||
sCurOcaStick.y = input->rel.stick_y;
|
||||
s8 rstick_x = input->cur.right_stick_x;
|
||||
s8 rstick_y = input->cur.right_stick_y;
|
||||
const s8 sensitivity = 64;
|
||||
if (rstick_x > sensitivity) {
|
||||
sCurOcarinaBtnPress |= BTN_CUSTOM_RSTICK_RIGHT;
|
||||
}
|
||||
if (rstick_x < -sensitivity) {
|
||||
sCurOcarinaBtnPress |= BTN_CUSTOM_RSTICK_LEFT;
|
||||
}
|
||||
if (rstick_y > sensitivity) {
|
||||
sCurOcarinaBtnPress |= BTN_CUSTOM_RSTICK_UP;
|
||||
}
|
||||
if (rstick_y < -sensitivity) {
|
||||
sCurOcarinaBtnPress |= BTN_CUSTOM_RSTICK_DOWN;
|
||||
}
|
||||
}
|
||||
|
||||
f32 Audio_OcaAdjStick(s8 inp) {
|
||||
|
||||
+65
-47
@@ -1,8 +1,29 @@
|
||||
#include "global.h"
|
||||
|
||||
#include "align_asset_macro.h"
|
||||
#include "soh/OTRGlobals.h"
|
||||
#include "soh/ResourceManagerHelpers.h"
|
||||
|
||||
// #region SOH [HD Textures]
|
||||
#define drGfxPrintFontData "__OTR__textures/font/sGfxPrintFontData"
|
||||
static const ALIGN_ASSET(2) char rGfxPrintFontData[] = drGfxPrintFontData;
|
||||
|
||||
#define drGfxPrintFontDataAlt "__OTR__alt/textures/font/sGfxPrintFontData"
|
||||
static const ALIGN_ASSET(2) char rGfxPrintFontDataAlt[] = drGfxPrintFontDataAlt;
|
||||
|
||||
bool sHasArchiveTexture = false;
|
||||
|
||||
// OTRTODO: this isn't as clean as it could be if we implemented
|
||||
// the GfxPrint texture extraction to `.otr` as described in
|
||||
// https://github.com/HarbourMasters/Shipwright/issues/2762
|
||||
|
||||
// Checks if we have a gfx font as a resource in an archive, which needs to be rendered differently
|
||||
bool GfxPrint_HasArchiveTexture() {
|
||||
return ResourceMgr_FileExists(rGfxPrintFontData) ||
|
||||
(ResourceMgr_IsAltAssetsEnabled() && ResourceMgr_FileExists(rGfxPrintFontDataAlt));
|
||||
}
|
||||
// #endregion
|
||||
|
||||
u16 sGfxPrintFontTLUT[64] = {
|
||||
0x0000, 0xFFFF, 0x0000, 0xFFFF, 0x0000, 0xFFFF, 0x0000, 0xFFFF, 0x0000, 0xFFFF, 0x0000, 0xFFFF, 0x0000,
|
||||
0xFFFF, 0x0000, 0xFFFF, 0x0000, 0x0000, 0xFFFF, 0xFFFF, 0x0000, 0x0000, 0xFFFF, 0xFFFF, 0x0000, 0x0000,
|
||||
@@ -132,29 +153,6 @@ u8 sGfxPrintFontData[(16 * 256) / 2] = {
|
||||
// Can be used to set GFXP_FLAG_ENLARGE by default
|
||||
static u8 sDefaultSpecialFlags;
|
||||
|
||||
#define drGfxPrintFontData "__OTR__textures/font/sGfxPrintFontData";
|
||||
static const ALIGN_ASSET(2) char rGfxPrintFontData[] = drGfxPrintFontData;
|
||||
|
||||
#define drGfxPrintFontDataAlt "__OTR__alt/textures/font/sGfxPrintFontData";
|
||||
static const ALIGN_ASSET(2) char rGfxPrintFontDataAlt[] = drGfxPrintFontDataAlt;
|
||||
|
||||
// OTRTODO: this isn't as clean as it could be if we implemented
|
||||
// the GfxPrint texture extraction to `.otr` as described in
|
||||
// https://github.com/HarbourMasters/Shipwright/issues/2762
|
||||
typedef enum {hardcoded, otrDefault, otrAlt} font_texture_t;
|
||||
font_texture_t GfxPrint_TextureToUse() {
|
||||
if (ResourceMgr_IsAltAssetsEnabled() && ResourceMgr_FileExists(rGfxPrintFontDataAlt)) {
|
||||
// If we have alt assets enabled, and we have alt prefixed font texture, use that
|
||||
return otrAlt;
|
||||
} else if (ResourceMgr_FileExists(rGfxPrintFontData)) {
|
||||
// if we have a non alt prefixed font texture, use that
|
||||
return otrDefault;
|
||||
}
|
||||
|
||||
// default to hardcoded font
|
||||
return hardcoded;
|
||||
}
|
||||
|
||||
void GfxPrint_Setup(GfxPrint* this) {
|
||||
s32 width = 16;
|
||||
s32 height = 256;
|
||||
@@ -166,35 +164,31 @@ void GfxPrint_Setup(GfxPrint* this) {
|
||||
G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE,
|
||||
G_AC_NONE | G_ZS_PRIM | G_RM_XLU_SURF | G_RM_XLU_SURF2);
|
||||
gDPSetCombineMode(this->dList++, G_CC_DECALRGBA, G_CC_DECALRGBA);
|
||||
|
||||
|
||||
|
||||
if (GfxPrint_TextureToUse() == hardcoded) {
|
||||
gDPLoadTextureBlock_4b(this->dList++, sGfxPrintFontData, G_IM_FMT_CI, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
// SOH [HD Textures] Font data from an archive has 4 times the width as the letter columns are side by side
|
||||
if (sHasArchiveTexture) {
|
||||
gDPLoadTextureBlock_4b(this->dList++, rGfxPrintFontData, G_IM_FMT_CI, width * 4, height, 0,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK,
|
||||
G_TX_NOLOD, G_TX_NOLOD);
|
||||
} else {
|
||||
gDPLoadTextureBlock_4b(this->dList++,
|
||||
GfxPrint_TextureToUse() == otrAlt ? rGfxPrintFontDataAlt : rGfxPrintFontData,
|
||||
G_IM_FMT_CI, width * 4, height, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
gDPLoadTextureBlock_4b(this->dList++, sGfxPrintFontData, G_IM_FMT_CI, width, height, 0,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK,
|
||||
G_TX_NOLOD, G_TX_NOLOD);
|
||||
}
|
||||
|
||||
|
||||
gDPLoadTLUT(this->dList++, 64, 256, sGfxPrintFontTLUT);
|
||||
|
||||
for (i = 1; i < 4; i++) {
|
||||
if (GfxPrint_TextureToUse() != hardcoded) {
|
||||
gDPSetTile(this->dList++, G_IM_FMT_RGBA, G_IM_SIZ_4b, 1, 0, i * 2, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK,
|
||||
G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||
} else {
|
||||
gDPSetTile(this->dList++, G_IM_FMT_CI, G_IM_SIZ_4b, 1, 0, i * 2, i, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK,
|
||||
G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||
}
|
||||
gDPSetTile(this->dList++, G_IM_FMT_CI, G_IM_SIZ_4b, 1, 0, i * 2, i, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK,
|
||||
G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||
gDPSetTileSize(this->dList++, i * 2, 0, 0, 60, 1020);
|
||||
}
|
||||
|
||||
gDPSetColor(this->dList++, G_SETPRIMCOLOR, this->color.rgba);
|
||||
|
||||
/*gDPLoadMultiTile_4b(this->dList++, sGfxPrintRainbowData, 0, 1, G_IM_FMT_CI, 2, 8, 0, 0, 1, 7, 4,
|
||||
// SOH [Port] Rainbow disabled until LUS supports multiple palettes and tiles
|
||||
/*
|
||||
gDPLoadMultiTile_4b(this->dList++, sGfxPrintRainbowData, 0, 1, G_IM_FMT_CI, 2, 8, 0, 0, 1, 7, 4,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 1, 3, G_TX_NOLOD, G_TX_NOLOD);
|
||||
|
||||
gDPLoadTLUT(this->dList++, 16, 320, sGfxPrintRainbowTLUT);
|
||||
@@ -203,7 +197,8 @@ void GfxPrint_Setup(GfxPrint* this) {
|
||||
gDPSetTile(this->dList++, G_IM_FMT_CI, G_IM_SIZ_4b, 1, 0, i * 2 + 1, 4, G_TX_NOMIRROR | G_TX_WRAP, 3,
|
||||
G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, 1, G_TX_NOLOD);
|
||||
gDPSetTileSize(this->dList++, i * 2 + 1, 0, 0, 4, 28);
|
||||
}*/
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
void GfxPrint_SetColor(GfxPrint* this, u32 r, u32 g, u32 b, u32 a) {
|
||||
@@ -250,6 +245,16 @@ void GfxPrint_PrintCharImpl(GfxPrint* this, u8 c) {
|
||||
}
|
||||
}
|
||||
|
||||
// SOH [HD Textures] The font data is normally 4 sets of 2 columns overlayed on top of each other with
|
||||
// different CI palette values. Custom font data from archives instead are all 4 sets laid out side by side.
|
||||
// This means we have to compute an additional offset value that represents which of the 4 sets a letter is from.
|
||||
u16 assetOffsetX = 0;
|
||||
if (sHasArchiveTexture) {
|
||||
// Multiplied by the offset of 2 columns before added with the original value below
|
||||
assetOffsetX = (c & 0x3) * (256 * 2);
|
||||
tile = 0;
|
||||
}
|
||||
|
||||
if (this->flags & GFXP_FLAG_SHADOW) {
|
||||
gDPSetColor(this->dList++, G_SETPRIMCOLOR, 0);
|
||||
|
||||
@@ -259,7 +264,7 @@ void GfxPrint_PrintCharImpl(GfxPrint* this, u8 c) {
|
||||
1 << 9);
|
||||
} else {
|
||||
gSPTextureRectangle(this->dList++, this->posX + 4, this->posY + 4, this->posX + 4 + 32, this->posY + 4 + 32,
|
||||
tile, (u16)(c & 4) * 64, (u16)(c >> 3) * 256, 1 << 10, 1 << 10);
|
||||
tile, assetOffsetX + (u16)(c & 4) * 64, (u16)(c >> 3) * 256, 1 << 10, 1 << 10);
|
||||
}
|
||||
|
||||
gDPSetColor(this->dList++, G_SETPRIMCOLOR, this->color.rgba);
|
||||
@@ -269,20 +274,31 @@ void GfxPrint_PrintCharImpl(GfxPrint* this, u8 c) {
|
||||
gSPTextureRectangle(this->dList++, (this->posX) << 1, (this->posY) << 1, (this->posX + 32) << 1,
|
||||
(this->posY + 32) << 1, tile, (u16)(c & 4) * 64, (u16)(c >> 3) * 256, 1 << 9, 1 << 9);
|
||||
} else {
|
||||
gSPTextureRectangle(this->dList++, this->posX, this->posY, this->posX + 32, this->posY + 32,
|
||||
GfxPrint_TextureToUse() != hardcoded ? 0 : tile, (GfxPrint_TextureToUse() != hardcoded ? ((128 * 4) * offset) : 0) + (u16)((c & 4) * 64),
|
||||
(u16)(c >> 3) * 256, 1 << 10, 1 << 10);
|
||||
gSPTextureRectangle(this->dList++, this->posX, this->posY, this->posX + 32, this->posY + 32, tile,
|
||||
assetOffsetX + (u16)((c & 4) * 64), (u16)(c >> 3) * 256, 1 << 10, 1 << 10);
|
||||
}
|
||||
|
||||
this->posX += CVarGetInteger(CVAR_DEVELOPER_TOOLS("GfxPrintChar.Spacing"), 32);
|
||||
}
|
||||
|
||||
void GfxPrint_PrintStringWithSize(GfxPrint* this, const void* buffer, u32 charSize, u32 charCount) {
|
||||
OTRGfxPrint((const char*)buffer, this, GfxPrint_PrintCharImpl);
|
||||
const char* str = (const char*)buffer;
|
||||
u32 count = charSize * charCount;
|
||||
|
||||
// SOH [Port] Process the string with our wrapper that converts Japanese UTF8 characters for the print system
|
||||
OTRGfxPrint(str, this, GfxPrint_PrintCharImpl);
|
||||
// while (count != 0) {
|
||||
// GfxPrint_PrintChar(this, *(str++));
|
||||
// count--;
|
||||
// }
|
||||
}
|
||||
|
||||
void GfxPrint_PrintString(GfxPrint* this, const char* str) {
|
||||
// SOH [Port] Process the string with our wrapper that converts Japanese UTF8 characters for the print system
|
||||
OTRGfxPrint(str, this, GfxPrint_PrintCharImpl);
|
||||
// while (*str != '\0') {
|
||||
// GfxPrint_PrintChar(this, *(str++));
|
||||
// }
|
||||
}
|
||||
|
||||
void* GfxPrint_Callback(void* arg, const char* str, size_t size) {
|
||||
@@ -314,6 +330,8 @@ void GfxPrint_Init(GfxPrint* this) {
|
||||
} else {
|
||||
this->flags &= ~GFXP_FLAG_ENLARGE;
|
||||
}
|
||||
|
||||
sHasArchiveTexture = GfxPrint_HasArchiveTexture();
|
||||
}
|
||||
|
||||
void GfxPrint_Destroy(GfxPrint* this) {
|
||||
|
||||
+26
-27
@@ -1260,7 +1260,7 @@ void Actor_Destroy(Actor* actor, PlayState* play) {
|
||||
NameTag_RemoveAllForActor(actor);
|
||||
}
|
||||
|
||||
void func_8002D7EC(Actor* actor) {
|
||||
void Actor_UpdatePos(Actor* actor) {
|
||||
f32 speedRate = R_UPDATE_RATE * 0.5f;
|
||||
|
||||
actor->world.pos.x += (actor->velocity.x * speedRate) + actor->colChkInfo.displacement.x;
|
||||
@@ -1268,7 +1268,7 @@ void func_8002D7EC(Actor* actor) {
|
||||
actor->world.pos.z += (actor->velocity.z * speedRate) + actor->colChkInfo.displacement.z;
|
||||
}
|
||||
|
||||
void func_8002D868(Actor* actor) {
|
||||
void Actor_UpdateVelocityXZGravity(Actor* actor) {
|
||||
actor->velocity.x = Math_SinS(actor->world.rot.y) * actor->speedXZ;
|
||||
actor->velocity.z = Math_CosS(actor->world.rot.y) * actor->speedXZ;
|
||||
|
||||
@@ -1278,12 +1278,12 @@ void func_8002D868(Actor* actor) {
|
||||
}
|
||||
}
|
||||
|
||||
void Actor_MoveForward(Actor* actor) {
|
||||
func_8002D868(actor);
|
||||
func_8002D7EC(actor);
|
||||
void Actor_MoveXZGravity(Actor* actor) {
|
||||
Actor_UpdateVelocityXZGravity(actor);
|
||||
Actor_UpdatePos(actor);
|
||||
}
|
||||
|
||||
void func_8002D908(Actor* actor) {
|
||||
void Actor_UpdateVelocityXYZ(Actor* actor) {
|
||||
f32 sp24 = Math_CosS(actor->world.rot.x) * actor->speedXZ;
|
||||
|
||||
actor->velocity.x = Math_SinS(actor->world.rot.y) * sp24;
|
||||
@@ -1291,17 +1291,17 @@ void func_8002D908(Actor* actor) {
|
||||
actor->velocity.z = Math_CosS(actor->world.rot.y) * sp24;
|
||||
}
|
||||
|
||||
void func_8002D97C(Actor* actor) {
|
||||
func_8002D908(actor);
|
||||
func_8002D7EC(actor);
|
||||
void Actor_MoveXYZ(Actor* actor) {
|
||||
Actor_UpdateVelocityXYZ(actor);
|
||||
Actor_UpdatePos(actor);
|
||||
}
|
||||
|
||||
void func_8002D9A4(Actor* actor, f32 arg1) {
|
||||
void Actor_SetProjectileSpeed(Actor* actor, f32 arg1) {
|
||||
actor->speedXZ = Math_CosS(actor->world.rot.x) * arg1;
|
||||
actor->velocity.y = -Math_SinS(actor->world.rot.x) * arg1;
|
||||
}
|
||||
|
||||
void func_8002D9F8(Actor* actor, SkelAnime* skelAnime) {
|
||||
void Actor_UpdatePosByAnimation(Actor* actor, SkelAnime* skelAnime) {
|
||||
Vec3f sp1C;
|
||||
|
||||
SkelAnime_UpdateTranslation(skelAnime, &sp1C, actor->shape.rot.y);
|
||||
@@ -1350,20 +1350,20 @@ f32 Actor_WorldDistXZToPoint(Actor* actor, Vec3f* refPoint) {
|
||||
return Math_Vec3f_DistXZ(&actor->world.pos, refPoint);
|
||||
}
|
||||
|
||||
void func_8002DBD0(Actor* actor, Vec3f* result, Vec3f* arg2) {
|
||||
f32 cosRot2Y;
|
||||
f32 sinRot2Y;
|
||||
void Actor_WorldToActorCoords(Actor* actor, Vec3f* dest, Vec3f* pos) {
|
||||
f32 cosY;
|
||||
f32 sinY;
|
||||
f32 deltaX;
|
||||
f32 deltaZ;
|
||||
|
||||
cosRot2Y = Math_CosS(actor->shape.rot.y);
|
||||
sinRot2Y = Math_SinS(actor->shape.rot.y);
|
||||
deltaX = arg2->x - actor->world.pos.x;
|
||||
deltaZ = arg2->z - actor->world.pos.z;
|
||||
cosY = Math_CosS(actor->shape.rot.y);
|
||||
sinY = Math_SinS(actor->shape.rot.y);
|
||||
deltaX = pos->x - actor->world.pos.x;
|
||||
deltaZ = pos->z - actor->world.pos.z;
|
||||
|
||||
result->x = (deltaX * cosRot2Y) - (deltaZ * sinRot2Y);
|
||||
result->z = (deltaX * sinRot2Y) + (deltaZ * cosRot2Y);
|
||||
result->y = arg2->y - actor->world.pos.y;
|
||||
dest->x = (deltaX * cosY) - (deltaZ * sinY);
|
||||
dest->z = (deltaX * sinY) + (deltaZ * cosY);
|
||||
dest->y = pos->y - actor->world.pos.y;
|
||||
}
|
||||
|
||||
f32 Actor_HeightDiff(Actor* actorA, Actor* actorB) {
|
||||
@@ -2107,14 +2107,13 @@ s32 Actor_OfferGetItem(Actor* actor, PlayState* play, s32 getItemId, f32 xzRange
|
||||
return false;
|
||||
}
|
||||
|
||||
// TODO: Rename to GiveItemIdFromActorWithFixedRange or similar
|
||||
// If you're doing something for randomizer, you're probably looking for GiveItemEntryFromActorWithFixedRange
|
||||
void func_8002F554(Actor* actor, PlayState* play, s32 getItemId) {
|
||||
void Actor_OfferGetItemNearby(Actor* actor, PlayState* play, s32 getItemId) {
|
||||
Actor_OfferGetItem(actor, play, getItemId, 50.0f, 10.0f);
|
||||
}
|
||||
|
||||
void func_8002F580(Actor* actor, PlayState* play) {
|
||||
func_8002F554(actor, play, GI_NONE);
|
||||
void Actor_OfferCarry(Actor* actor, PlayState* play) {
|
||||
Actor_OfferGetItemNearby(actor, play, GI_NONE);
|
||||
}
|
||||
|
||||
u32 Actor_HasNoParent(Actor* actor, PlayState* play) {
|
||||
@@ -4615,13 +4614,13 @@ s32 func_80035124(Actor* actor, PlayState* play) {
|
||||
if (Actor_HasParent(actor, play)) {
|
||||
actor->params = 1;
|
||||
} else if (!(actor->bgCheckFlags & 1)) {
|
||||
Actor_MoveForward(actor);
|
||||
Actor_MoveXZGravity(actor);
|
||||
Math_SmoothStepToF(&actor->speedXZ, 0.0f, 1.0f, 0.1f, 0.0f);
|
||||
} else if ((actor->bgCheckFlags & 2) && (actor->velocity.y < -4.0f)) {
|
||||
ret = 1;
|
||||
} else {
|
||||
actor->shape.rot.x = actor->shape.rot.z = 0;
|
||||
func_8002F580(actor, play);
|
||||
Actor_OfferCarry(actor, play);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
|
||||
@@ -1604,7 +1604,7 @@ void Cutscene_Command_Textbox(PlayState* play, CutsceneContext* csCtx, CsCmdText
|
||||
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_BONGO_BONGO, RG_SHADOW_MEDALLION);
|
||||
break;
|
||||
case 0x40:
|
||||
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_GIFT_FROM_SAGES, RG_LIGHT_MEDALLION);
|
||||
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_GIFT_FROM_RAURU, RG_LIGHT_MEDALLION);
|
||||
break;
|
||||
case 0x72:
|
||||
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_TOT_LIGHT_ARROWS_CUTSCENE, RG_LIGHT_ARROWS);
|
||||
|
||||
@@ -322,7 +322,7 @@ void EnAObj_Update(Actor* thisx, PlayState* play) {
|
||||
EnAObj* this = (EnAObj*)thisx;
|
||||
|
||||
this->actionFunc(this, play);
|
||||
Actor_MoveForward(&this->dyna.actor);
|
||||
Actor_MoveXZGravity(&this->dyna.actor);
|
||||
|
||||
if (this->dyna.actor.gravity != 0.0f) {
|
||||
if (this->dyna.actor.params != A_OBJ_BOULDER_FRAGMENT) {
|
||||
|
||||
@@ -588,7 +588,7 @@ void EnItem00_Init(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
|
||||
if ((getItemId != GI_NONE) && !Actor_HasParent(&this->actor, play)) {
|
||||
func_8002F554(&this->actor, play, getItemId);
|
||||
Actor_OfferGetItemNearby(&this->actor, play, getItemId);
|
||||
}
|
||||
|
||||
EnItem00_SetupAction(this, func_8001E5C8);
|
||||
@@ -831,7 +831,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
|
||||
|
||||
} else {
|
||||
sp3A = 1;
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
}
|
||||
|
||||
if (sp3A || D_80157D94[0]) {
|
||||
@@ -956,7 +956,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
|
||||
params = &this->actor.params;
|
||||
|
||||
if ((getItemId != GI_NONE) && !Actor_HasParent(&this->actor, play)) {
|
||||
func_8002F554(&this->actor, play, getItemId);
|
||||
Actor_OfferGetItemNearby(&this->actor, play, getItemId);
|
||||
}
|
||||
|
||||
switch (*params) {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
void (*sKaleidoScopeUpdateFunc)(PlayState* play);
|
||||
void (*sKaleidoScopeDrawFunc)(PlayState* play);
|
||||
f32 gBossMarkScale;
|
||||
f32 gBossMarkScale = 1.0f;
|
||||
u32 D_8016139C;
|
||||
PauseMapMarksData* gLoadedPauseMarkDataTable;
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ void ArmsHook_Wait(ArmsHook* this, PlayState* play) {
|
||||
s32 length = ((player->heldItemAction == PLAYER_IA_HOOKSHOT) ? 13 : 26) * CVarGetFloat(CVAR_CHEAT("HookshotReachMultiplier"), 1.0f);
|
||||
|
||||
ArmsHook_SetupAction(this, ArmsHook_Shoot);
|
||||
func_8002D9A4(&this->actor, 20.0f);
|
||||
Actor_SetProjectileSpeed(&this->actor, 20.0f);
|
||||
this->actor.parent = &GET_PLAYER(play)->actor;
|
||||
this->timer = length;
|
||||
}
|
||||
@@ -250,7 +250,7 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
Math_Vec3f_Diff(&this->actor.world.pos, &this->actor.prevPos, &prevFrameDiff);
|
||||
Math_Vec3f_Sum(&this->unk_1E8, &prevFrameDiff, &this->unk_1E8);
|
||||
this->actor.shape.rot.x = Math_Atan2S(this->actor.speedXZ, -this->actor.velocity.y);
|
||||
|
||||
@@ -869,7 +869,7 @@ void BgDyYoseizo_Update(Actor* thisx, PlayState* play2) {
|
||||
}
|
||||
}
|
||||
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
this->heightOffset = this->scale * 7500.0f;
|
||||
Actor_SetFocus(&this->actor, this->heightOffset);
|
||||
this->actor.focus.pos.y = this->heightOffset;
|
||||
|
||||
@@ -59,7 +59,7 @@ void BgHaka_Destroy(Actor* thisx, PlayState* play) {
|
||||
void func_8087B758(BgHaka* this, Player* player) {
|
||||
Vec3f sp1C;
|
||||
|
||||
func_8002DBD0(&this->dyna.actor, &sp1C, &player->actor.world.pos);
|
||||
Actor_WorldToActorCoords(&this->dyna.actor, &sp1C, &player->actor.world.pos);
|
||||
if (fabsf(sp1C.x) < 34.6f && sp1C.z > -112.8f && sp1C.z < -36.0f) {
|
||||
player->stateFlags2 |= PLAYER_STATE2_FORCE_SAND_FLOOR_SOUND;
|
||||
}
|
||||
|
||||
@@ -190,7 +190,7 @@ void BgHakaShip_Update(Actor* thisx, PlayState* play) {
|
||||
|
||||
this->actionFunc(this, play);
|
||||
if (this->dyna.actor.params == 0) {
|
||||
Actor_MoveForward(&this->dyna.actor);
|
||||
Actor_MoveXZGravity(&this->dyna.actor);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -210,7 +210,7 @@ void func_8087FFC0(BgHakaTrap* this, PlayState* play) {
|
||||
f32 zNonNegative;
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
func_8002DBD0(&this->dyna.actor, &sp28, &player->actor.world.pos);
|
||||
Actor_WorldToActorCoords(&this->dyna.actor, &sp28, &player->actor.world.pos);
|
||||
|
||||
sine = Math_SinS(this->dyna.actor.shape.rot.y);
|
||||
cosine = Math_CosS(this->dyna.actor.shape.rot.y);
|
||||
@@ -434,7 +434,7 @@ void func_808809E4(BgHakaTrap* this, PlayState* play, s16 arg2) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
Vec3f sp18;
|
||||
|
||||
func_8002DBD0(&this->dyna.actor, &sp18, &player->actor.world.pos);
|
||||
Actor_WorldToActorCoords(&this->dyna.actor, &sp18, &player->actor.world.pos);
|
||||
|
||||
if ((fabsf(sp18.x) < 70.0f) && (fabsf(sp18.y) < 100.0f) && (sp18.z < 500.0f) &&
|
||||
(GET_PLAYER(play)->currentBoots != PLAYER_BOOTS_IRON)) {
|
||||
|
||||
@@ -396,7 +396,7 @@ void BgHakaZou_Update(Actor* thisx, PlayState* play) {
|
||||
this->actionFunc(this, play);
|
||||
|
||||
if (this->dyna.actor.params == 3) {
|
||||
Actor_MoveForward(&this->dyna.actor);
|
||||
Actor_MoveXZGravity(&this->dyna.actor);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@ void BgHeavyBlock_MovePiece(BgHeavyBlock* this, PlayState* play) {
|
||||
|
||||
thisx->velocity.x *= 0.98f;
|
||||
thisx->velocity.z *= 0.98f;
|
||||
func_8002D7EC(thisx);
|
||||
Actor_UpdatePos(thisx);
|
||||
thisx->shape.rot.x += thisx->world.rot.x;
|
||||
thisx->shape.rot.y += thisx->world.rot.y;
|
||||
thisx->shape.rot.z += thisx->world.rot.z;
|
||||
@@ -385,7 +385,7 @@ void BgHeavyBlock_Fly(BgHeavyBlock* this, PlayState* play) {
|
||||
Vec3f pos;
|
||||
f32 raycastResult;
|
||||
|
||||
Actor_MoveForward(&this->dyna.actor);
|
||||
Actor_MoveXZGravity(&this->dyna.actor);
|
||||
pos.x = this->dyna.actor.home.pos.x;
|
||||
pos.y = this->dyna.actor.home.pos.y + 1000.0f;
|
||||
pos.z = this->dyna.actor.home.pos.z;
|
||||
@@ -459,7 +459,7 @@ void BgHeavyBlock_Land(BgHeavyBlock* this, PlayState* play) {
|
||||
Math_StepToF(&this->dyna.actor.velocity.y, 0.0f, 3.0f);
|
||||
this->dyna.actor.gravity = 0.0f;
|
||||
this->dyna.actor.world.pos = this->dyna.actor.home.pos;
|
||||
Actor_MoveForward(&this->dyna.actor);
|
||||
Actor_MoveXZGravity(&this->dyna.actor);
|
||||
this->dyna.actor.home.pos = this->dyna.actor.world.pos;
|
||||
switch (this->dyna.actor.params & 0xFF) {
|
||||
case HEAVYBLOCK_UNBREAKABLE_OUTSIDE_CASTLE:
|
||||
|
||||
@@ -181,7 +181,7 @@ void BgHidanDalm_Update(Actor* thisx, PlayState* play) {
|
||||
BgHidanDalm* this = (BgHidanDalm*)thisx;
|
||||
|
||||
this->actionFunc(this, play);
|
||||
Actor_MoveForward(&this->dyna.actor);
|
||||
Actor_MoveXZGravity(&this->dyna.actor);
|
||||
Actor_UpdateBgCheckInfo(play, &this->dyna.actor, 10.0f, 15.0f, 32.0f, 5);
|
||||
}
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ s32 BgHidanFirewall_CheckProximity(BgHidanFirewall* this, PlayState* play) {
|
||||
Vec3f distance;
|
||||
|
||||
player = GET_PLAYER(play);
|
||||
func_8002DBD0(&this->actor, &distance, &player->actor.world.pos);
|
||||
Actor_WorldToActorCoords(&this->actor, &distance, &player->actor.world.pos);
|
||||
|
||||
if (fabsf(distance.x) < 100.0f && fabsf(distance.z) < 120.0f) {
|
||||
return 1;
|
||||
@@ -146,7 +146,7 @@ void BgHidanFirewall_ColliderFollowPlayer(BgHidanFirewall* this, PlayState* play
|
||||
|
||||
player = GET_PLAYER(play);
|
||||
|
||||
func_8002DBD0(&this->actor, &sp30, &player->actor.world.pos);
|
||||
Actor_WorldToActorCoords(&this->actor, &sp30, &player->actor.world.pos);
|
||||
if (sp30.x < -70.0f) {
|
||||
sp30.x = -70.0f;
|
||||
} else {
|
||||
|
||||
@@ -200,7 +200,7 @@ void BgHidanFwbig_MoveCollider(BgHidanFwbig* this, PlayState* play) {
|
||||
f32 cs;
|
||||
f32 sn;
|
||||
|
||||
func_8002DBD0(&this->actor, &projPos, &player->actor.world.pos);
|
||||
Actor_WorldToActorCoords(&this->actor, &projPos, &player->actor.world.pos);
|
||||
projPos.z = ((projPos.z >= 0.0f) ? 1.0f : -1.0f) * 25.0f * -1.0f;
|
||||
if (this->direction == 0) {
|
||||
projPos.x = CLAMP(projPos.x, -360.0f, 360.0f);
|
||||
|
||||
@@ -294,7 +294,7 @@ void func_80888860(BgHidanHamstep* this, PlayState* play) {
|
||||
s32 pad2;
|
||||
s32 quakeIndex;
|
||||
|
||||
Actor_MoveForward(&this->dyna.actor);
|
||||
Actor_MoveXZGravity(&this->dyna.actor);
|
||||
|
||||
if (((this->dyna.actor.world.pos.y - this->dyna.actor.home.pos.y) < (-20.0f - this->dyna.actor.minVelocityY)) &&
|
||||
(this->dyna.actor.velocity.y <= 0.0f)) {
|
||||
@@ -343,7 +343,7 @@ void func_80888A58(BgHidanHamstep* this, PlayState* play) {
|
||||
s32 pad2;
|
||||
s32 quakeIndex;
|
||||
|
||||
Actor_MoveForward(&this->dyna.actor);
|
||||
Actor_MoveXZGravity(&this->dyna.actor);
|
||||
func_80888694(this, (BgHidanHamstep*)this->dyna.actor.parent);
|
||||
|
||||
if (((this->dyna.actor.params & 0xFF) <= 0) || ((this->dyna.actor.params & 0xFF) >= 6)) {
|
||||
|
||||
@@ -125,12 +125,12 @@ void func_80889C18(BgHidanKousi* this, PlayState* play) {
|
||||
this->dyna.actor.speedXZ = 2.0f;
|
||||
BgHidanKousi_SetupAction(this, func_80889C90);
|
||||
}
|
||||
Actor_MoveForward(&this->dyna.actor);
|
||||
Actor_MoveXZGravity(&this->dyna.actor);
|
||||
func_8002F974(&this->dyna.actor, NA_SE_EV_METALDOOR_SLIDE - SFX_FLAG);
|
||||
}
|
||||
|
||||
void func_80889C90(BgHidanKousi* this, PlayState* play) {
|
||||
func_8002D7EC(&this->dyna.actor);
|
||||
Actor_UpdatePos(&this->dyna.actor);
|
||||
if (D_80889E40[this->dyna.actor.params & 0xFF] <
|
||||
Math_Vec3f_DistXYZ(&this->dyna.actor.home.pos, &this->dyna.actor.world.pos)) {
|
||||
func_80889ACC(this);
|
||||
|
||||
@@ -335,7 +335,7 @@ void BgHidanRock_Update(Actor* thisx, PlayState* play) {
|
||||
|
||||
this->actionFunc(this, play);
|
||||
if (this->actionFunc == func_8088B79C) {
|
||||
Actor_MoveForward(&this->dyna.actor);
|
||||
Actor_MoveXZGravity(&this->dyna.actor);
|
||||
Actor_UpdateBgCheckInfo(play, &this->dyna.actor, 0.0f, 0.0f, 0.0f, 4);
|
||||
}
|
||||
|
||||
|
||||
@@ -175,7 +175,7 @@ void BgIceTurara_Fall(BgIceTurara* this, PlayState* play) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
Actor_MoveForward(&this->dyna.actor);
|
||||
Actor_MoveXZGravity(&this->dyna.actor);
|
||||
this->dyna.actor.world.pos.y += 40.0f;
|
||||
Actor_UpdateBgCheckInfo(play, &this->dyna.actor, 0.0f, 0.0f, 0.0f, 4);
|
||||
this->dyna.actor.world.pos.y -= 40.0f;
|
||||
|
||||
@@ -149,7 +149,7 @@ void BgJyaHaheniron_SetupChairCrumble(BgJyaHaheniron* this) {
|
||||
void BgJyaHaheniron_ChairCrumble(BgJyaHaheniron* this, PlayState* play) {
|
||||
Vec3f vec;
|
||||
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 5.0f, 8.0f, 0.0f, 0x85);
|
||||
if ((this->actor.bgCheckFlags & 9) || ((this->collider.base.atFlags & AT_HIT) && (this->collider.base.at != NULL) &&
|
||||
(this->collider.base.at->category == ACTORCAT_PLAYER))) {
|
||||
@@ -173,7 +173,7 @@ void BgJyaHaheniron_SetupPillarCrumble(BgJyaHaheniron* this) {
|
||||
|
||||
void BgJyaHaheniron_PillarCrumble(BgJyaHaheniron* this, PlayState* play) {
|
||||
if (this->timer >= 8) {
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
} else if (this->timer >= 17) {
|
||||
BgJyaHaheniron_SpawnFragments(play, &this->actor.world.pos, D_808987A0);
|
||||
Actor_Kill(&this->actor);
|
||||
|
||||
@@ -331,7 +331,7 @@ void func_8089E650(BgMizuMovebg* this, PlayState* play) {
|
||||
this->dyna.actor.speedXZ = dist;
|
||||
}
|
||||
func_80035844(&this->dyna.actor.world.pos, &waypoint, &this->dyna.actor.world.rot, 1);
|
||||
func_8002D97C(&this->dyna.actor);
|
||||
Actor_MoveXYZ(&this->dyna.actor);
|
||||
dx = waypoint.x - this->dyna.actor.world.pos.x;
|
||||
dy = waypoint.y - this->dyna.actor.world.pos.y;
|
||||
dz = waypoint.z - this->dyna.actor.world.pos.z;
|
||||
|
||||
@@ -162,7 +162,7 @@ void BgMoriBigst_SetupFall(BgMoriBigst* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void BgMoriBigst_Fall(BgMoriBigst* this, PlayState* play) {
|
||||
Actor_MoveForward(&this->dyna.actor);
|
||||
Actor_MoveXZGravity(&this->dyna.actor);
|
||||
if (this->dyna.actor.world.pos.y <= this->dyna.actor.home.pos.y) {
|
||||
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y;
|
||||
BgMoriBigst_SetupLanding(this, play);
|
||||
|
||||
@@ -245,7 +245,7 @@ void BgMoriHashigo_LadderFall(BgMoriHashigo* this, PlayState* play) {
|
||||
static f32 bounceSpeed[3] = { 4.0f, 2.7f, 1.7f };
|
||||
Actor* thisx = &this->dyna.actor;
|
||||
|
||||
Actor_MoveForward(thisx);
|
||||
Actor_MoveXZGravity(thisx);
|
||||
if ((thisx->bgCheckFlags & 1) && (thisx->velocity.y < 0.0f)) {
|
||||
if (this->bounceCounter >= ARRAY_COUNT(bounceSpeed)) {
|
||||
BgMoriHashigo_SetupLadderRest(this);
|
||||
|
||||
@@ -149,7 +149,7 @@ void BgMoriRakkatenjo_Fall(BgMoriRakkatenjo* this, PlayState* play) {
|
||||
Actor* thisx = &this->dyna.actor;
|
||||
s32 quake;
|
||||
|
||||
Actor_MoveForward(thisx);
|
||||
Actor_MoveXZGravity(thisx);
|
||||
if ((thisx->velocity.y < 0.0f) && (thisx->world.pos.y <= 403.0f)) {
|
||||
if (this->bounceCount >= ARRAY_COUNT(bounceVel)) {
|
||||
BgMoriRakkatenjo_SetupRest(this);
|
||||
|
||||
@@ -64,7 +64,7 @@ void BgPushbox_UpdateImpl(BgPushbox* this, PlayState* play) {
|
||||
: ((this->dyna.actor.speedXZ > 1.0f) ? 1.0f : this->dyna.actor.speedXZ);
|
||||
Math_StepToF(&this->dyna.actor.speedXZ, 0.0f, 0.2f);
|
||||
this->dyna.actor.world.rot.y = this->dyna.unk_158;
|
||||
Actor_MoveForward(&this->dyna.actor);
|
||||
Actor_MoveXZGravity(&this->dyna.actor);
|
||||
Actor_UpdateBgCheckInfo(play, &this->dyna.actor, 20.0f, 40.0f, 40.0f, 0x1D);
|
||||
}
|
||||
|
||||
|
||||
@@ -319,7 +319,7 @@ void func_808B43D0(BgSpot15Rrbox* this, PlayState* play) {
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
|
||||
}
|
||||
|
||||
Actor_MoveForward(actor);
|
||||
Actor_MoveXZGravity(actor);
|
||||
|
||||
if (actor->world.pos.y <= BGCHECK_Y_MIN + 10.0f) {
|
||||
// "Lon Lon wooden crate fell too much"
|
||||
|
||||
@@ -500,7 +500,7 @@ void func_808B5B58(BgSpot16Bombstone* this) {
|
||||
void func_808B5B6C(BgSpot16Bombstone* this, PlayState* play) {
|
||||
Actor* actor = &this->actor;
|
||||
|
||||
Actor_MoveForward(actor);
|
||||
Actor_MoveXZGravity(actor);
|
||||
actor->shape.rot.x += this->unk_210;
|
||||
actor->shape.rot.z += this->unk_212;
|
||||
|
||||
|
||||
@@ -247,7 +247,7 @@ void func_808B8F08(BgSpot18Obj* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
Math_StepToF(&this->dyna.actor.speedXZ, 1.2f, 0.1f);
|
||||
Actor_MoveForward(&this->dyna.actor);
|
||||
Actor_MoveXZGravity(&this->dyna.actor);
|
||||
func_808B8DDC(this, play);
|
||||
|
||||
if (Math3D_Dist2DSq(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.z, this->dyna.actor.home.pos.x,
|
||||
|
||||
@@ -142,7 +142,7 @@ void func_808BAF40(BgTokiSwd* this, PlayState* play) {
|
||||
} else {
|
||||
Player* player = GET_PLAYER(play);
|
||||
if (Actor_IsFacingPlayer(&this->actor, 0x2000)) {
|
||||
func_8002F580(&this->actor, play);
|
||||
Actor_OfferCarry(&this->actor, play);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -404,7 +404,7 @@ void BgYdanSp_WallWebIdle(BgYdanSp* this, PlayState* play) {
|
||||
this->dyna.actor.home.pos.y = this->dyna.actor.world.pos.y + 80.0f;
|
||||
BgYdanSp_BurnWeb(this, play);
|
||||
} else if (player->heldItemAction == PLAYER_IA_DEKU_STICK && player->unk_860 != 0) {
|
||||
func_8002DBD0(&this->dyna.actor, &sp30, &player->meleeWeaponInfo[0].tip);
|
||||
Actor_WorldToActorCoords(&this->dyna.actor, &sp30, &player->meleeWeaponInfo[0].tip);
|
||||
if (fabsf(sp30.x) < 100.0f && sp30.z < 1.0f && sp30.y < 200.0f) {
|
||||
OnePointCutscene_Init(play, 3020, 40, &this->dyna.actor, MAIN_CAM);
|
||||
Math_Vec3f_Copy(&this->dyna.actor.home.pos, &player->meleeWeaponInfo[0].tip);
|
||||
|
||||
@@ -1045,7 +1045,7 @@ void BossDodongo_Update(Actor* thisx, PlayState* play2) {
|
||||
thisx->shape.rot.y = thisx->world.rot.y;
|
||||
|
||||
Math_SmoothStepToF(&thisx->shape.yOffset, this->unk_228, 1.0f, 100.0f, 0.0f);
|
||||
Actor_MoveForward(thisx);
|
||||
Actor_MoveXZGravity(thisx);
|
||||
BossDodongo_UpdateDamage(this, play);
|
||||
Actor_UpdateBgCheckInfo(play, thisx, 10.0f, 10.0f, 20.0f, 4);
|
||||
Math_SmoothStepToF(&this->unk_208, 0, 1, 0.001f, 0.0);
|
||||
|
||||
@@ -950,9 +950,9 @@ void BossFd_Fly(BossFd* this, PlayState* play) {
|
||||
Math_ApproachF(&this->fwork[BFD_TURN_RATE], this->fwork[BFD_TURN_RATE_MAX], 1.0f, 20000.0f);
|
||||
Math_ApproachF(&this->actor.speedXZ, this->fwork[BFD_FLY_SPEED], 1.0f, 0.1f);
|
||||
if (this->work[BFD_ACTION_STATE] < BOSSFD_SKULL_FALL) {
|
||||
func_8002D908(&this->actor);
|
||||
Actor_UpdateVelocityXYZ(&this->actor);
|
||||
}
|
||||
func_8002D7EC(&this->actor);
|
||||
Actor_UpdatePos(&this->actor);
|
||||
|
||||
this->work[BFD_LEAD_BODY_SEG]++;
|
||||
if (this->work[BFD_LEAD_BODY_SEG] >= 100) {
|
||||
|
||||
@@ -4027,8 +4027,8 @@ void BossGanon_LightBall_Update(Actor* thisx, PlayState* play2) {
|
||||
yDistFromLink = (player->actor.world.pos.y + 40.0f) - this->actor.world.pos.y;
|
||||
zDistFromLink = player->actor.world.pos.z - this->actor.world.pos.z;
|
||||
|
||||
func_8002D908(&this->actor);
|
||||
func_8002D7EC(&this->actor);
|
||||
Actor_UpdateVelocityXYZ(&this->actor);
|
||||
Actor_UpdatePos(&this->actor);
|
||||
|
||||
switch (this->unk_1C2) {
|
||||
case 0:
|
||||
@@ -4306,8 +4306,8 @@ void func_808E1EB4(Actor* thisx, PlayState* play2) {
|
||||
}
|
||||
}
|
||||
|
||||
func_8002D908(&this->actor);
|
||||
func_8002D7EC(&this->actor);
|
||||
Actor_UpdateVelocityXYZ(&this->actor);
|
||||
Actor_UpdatePos(&this->actor);
|
||||
|
||||
this->unk_1A6++;
|
||||
|
||||
@@ -4432,8 +4432,8 @@ void func_808E2544(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
func_8002D908(&this->actor);
|
||||
func_8002D7EC(&this->actor);
|
||||
Actor_UpdateVelocityXYZ(&this->actor);
|
||||
Actor_UpdatePos(&this->actor);
|
||||
|
||||
this->unk_1A6++;
|
||||
|
||||
@@ -4520,8 +4520,8 @@ void func_808E2544(Actor* thisx, PlayState* play) {
|
||||
if ((player->meleeWeaponState != 0) && (player->meleeWeaponAnimation >= 0x18) && (this->actor.xzDistToPlayer < 80.0f)) {
|
||||
this->unk_1C2 = 0xC;
|
||||
this->actor.speedXZ = -30.0f;
|
||||
func_8002D908(&this->actor);
|
||||
func_8002D7EC(&this->actor);
|
||||
Actor_UpdateVelocityXYZ(&this->actor);
|
||||
Actor_UpdatePos(&this->actor);
|
||||
this->unk_1F0 = dorf->unk_1FC;
|
||||
numEffects = 10;
|
||||
break;
|
||||
@@ -4537,8 +4537,8 @@ void func_808E2544(Actor* thisx, PlayState* play) {
|
||||
this->unk_1C2 = 0xC;
|
||||
this->actor.speedXZ = -30.0f;
|
||||
|
||||
func_8002D908(&this->actor);
|
||||
func_8002D7EC(&this->actor);
|
||||
Actor_UpdateVelocityXYZ(&this->actor);
|
||||
Actor_UpdatePos(&this->actor);
|
||||
|
||||
this->unk_1F0.x = Rand_CenteredFloat(700.0f) + dorf->unk_1FC.x;
|
||||
this->unk_1F0.y = Rand_CenteredFloat(200.0f) + dorf->unk_1FC.y;
|
||||
|
||||
@@ -2048,7 +2048,7 @@ void BossGanon2_Update(Actor* thisx, PlayState* play) {
|
||||
if (this->unk_392 != 0) {
|
||||
this->unk_392--;
|
||||
}
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
this->actor.shape.rot = this->actor.world.rot;
|
||||
if (this->unk_335 != 0) {
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 60.0f, 60.0f, 100.0f, 5);
|
||||
|
||||
@@ -723,7 +723,7 @@ void BossGanondrof_Stunned(BossGanondrof* this, PlayState* play) {
|
||||
this->actor.gravity = 0.0f;
|
||||
}
|
||||
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
}
|
||||
|
||||
void BossGanondrof_SetupBlock(BossGanondrof* this, PlayState* play) {
|
||||
@@ -809,8 +809,8 @@ void BossGanondrof_Charge(BossGanondrof* this, PlayState* play) {
|
||||
Math_FAtan2F(vecToLink.y, sqrtf(SQ(vecToLink.x) + SQ(vecToLink.z))) * (0x8000 / M_PI);
|
||||
}
|
||||
|
||||
func_8002D908(thisx);
|
||||
func_8002D7EC(thisx);
|
||||
Actor_UpdateVelocityXYZ(thisx);
|
||||
Actor_UpdatePos(thisx);
|
||||
Math_ApproachF(&thisx->speedXZ, 10.0f, 1.0f, 0.5f);
|
||||
if ((sqrtf(SQ(dxCenter) + SQ(dzCenter)) > 280.0f) || (thisx->xyzDistToPlayerSq < SQ(100.0f))) {
|
||||
this->work[GND_ACTION_STATE] = CHARGE_FINISH;
|
||||
@@ -819,7 +819,7 @@ void BossGanondrof_Charge(BossGanondrof* this, PlayState* play) {
|
||||
break;
|
||||
case CHARGE_FINISH:
|
||||
thisx->gravity = 0.2f;
|
||||
Actor_MoveForward(thisx);
|
||||
Actor_MoveXZGravity(thisx);
|
||||
osSyncPrintf("YP %f @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n", thisx->world.pos.y);
|
||||
if (thisx->world.pos.y < 5.0f) {
|
||||
thisx->world.pos.y = 5.0f;
|
||||
|
||||
@@ -1937,7 +1937,7 @@ void BossGoma_Update(Actor* thisx, PlayState* play) {
|
||||
this->actor.shape.rot.y = this->actor.world.rot.y;
|
||||
|
||||
if (!this->doNotMoveThisFrame) {
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
} else {
|
||||
this->doNotMoveThisFrame = false;
|
||||
}
|
||||
|
||||
@@ -1501,7 +1501,7 @@ void BossMo_IntroCs(BossMo* this, PlayState* play) {
|
||||
this->cameraAtVel.z * this->cameraSpeedMod);
|
||||
Math_ApproachF(&this->cameraSpeedMod, 1.0f, 1.0f, this->cameraAccel);
|
||||
} else if (this->csState < MO_INTRO_REVEAL) {
|
||||
func_8002D908(&this->actor);
|
||||
Actor_UpdateVelocityXYZ(&this->actor);
|
||||
this->cameraEye.x += this->actor.velocity.x;
|
||||
this->cameraEye.y += this->actor.velocity.y;
|
||||
this->cameraEye.z += this->actor.velocity.z;
|
||||
@@ -2164,12 +2164,12 @@ void BossMo_Core(BossMo* this, PlayState* play) {
|
||||
spD0 = (s16)(Math_FAtan2F(spD8, sqrtf(SQ(spDC) + SQ(spD4))) * (0x8000 / M_PI));
|
||||
Math_ApproachS(&this->actor.world.rot.y, spCC, this->tentMaxAngle, this->tentSpeed);
|
||||
Math_ApproachS(&this->actor.world.rot.x, spD0, this->tentMaxAngle, this->tentSpeed);
|
||||
func_8002D908(&this->actor);
|
||||
Actor_UpdateVelocityXYZ(&this->actor);
|
||||
} else {
|
||||
this->actor.world.pos.y += this->actor.velocity.y;
|
||||
this->actor.velocity.y -= 1.0f;
|
||||
}
|
||||
func_8002D7EC(&this->actor);
|
||||
Actor_UpdatePos(&this->actor);
|
||||
temp = (this->actor.world.pos.y < -200.0f) ? 5 : 1;
|
||||
this->actor.world.pos.y -= 20.0f;
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 50.0f, 20.0f, 100.0f, temp);
|
||||
@@ -2346,7 +2346,7 @@ void BossMo_UpdateTent(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
}
|
||||
Math_ApproachS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 0xA, 0xC8);
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
Math_ApproachF(&this->actor.speedXZ, 0.0, 1.0f, 0.02f);
|
||||
|
||||
if (BossMo_NearLand(&this->actor.world.pos, 40)) {
|
||||
|
||||
@@ -1068,8 +1068,8 @@ void BossSst_HeadDeath(BossSst* this, PlayState* play) {
|
||||
player->actor.world.pos.z = sRoomCenter.z + (400.0f * Math_CosS(this->actor.shape.rot.y)) -
|
||||
(Math_SinS(this->actor.shape.rot.y) * -120.0f);
|
||||
player->actor.shape.rot.y = Actor_WorldYawTowardPoint(&player->actor, &sRoomCenter);
|
||||
func_8002DBD0(&this->actor, &sCameraEye, &GET_ACTIVE_CAM(play)->eye);
|
||||
func_8002DBD0(&this->actor, &sCameraAt, &GET_ACTIVE_CAM(play)->at);
|
||||
Actor_WorldToActorCoords(&this->actor, &sCameraEye, &GET_ACTIVE_CAM(play)->eye);
|
||||
Actor_WorldToActorCoords(&this->actor, &sCameraAt, &GET_ACTIVE_CAM(play)->at);
|
||||
this->radius = -350.0f;
|
||||
this->actor.world.pos.x = sRoomCenter.x - (Math_SinS(this->actor.shape.rot.y) * 350.0f);
|
||||
this->actor.world.pos.z = sRoomCenter.z - (Math_CosS(this->actor.shape.rot.y) * 350.0f);
|
||||
@@ -2654,8 +2654,8 @@ void BossSst_UpdateHead(Actor* thisx, PlayState* play) {
|
||||
s32 pad;
|
||||
BossSst* this = (BossSst*)thisx;
|
||||
|
||||
func_8002DBD0(&this->actor, &sHandOffsets[RIGHT], &sHands[RIGHT]->actor.world.pos);
|
||||
func_8002DBD0(&this->actor, &sHandOffsets[LEFT], &sHands[LEFT]->actor.world.pos);
|
||||
Actor_WorldToActorCoords(&this->actor, &sHandOffsets[RIGHT], &sHands[RIGHT]->actor.world.pos);
|
||||
Actor_WorldToActorCoords(&this->actor, &sHandOffsets[LEFT], &sHands[LEFT]->actor.world.pos);
|
||||
|
||||
sHandYawOffsets[LEFT] = sHands[LEFT]->actor.shape.rot.y - thisx->shape.rot.y;
|
||||
sHandYawOffsets[RIGHT] = sHands[RIGHT]->actor.shape.rot.y - thisx->shape.rot.y;
|
||||
|
||||
@@ -599,8 +599,8 @@ void BossTw_TurnToPlayer(BossTw* this, PlayState* play) {
|
||||
Math_ApproachS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 5, this->rotateSpeed);
|
||||
Math_ApproachS(&this->actor.shape.rot.x, 0, 5, this->rotateSpeed);
|
||||
Math_ApproachF(&this->rotateSpeed, 4096.0f, 1.0f, 200.0f);
|
||||
func_8002D908(&this->actor);
|
||||
func_8002D7EC(&this->actor);
|
||||
Actor_UpdateVelocityXYZ(&this->actor);
|
||||
Actor_UpdatePos(&this->actor);
|
||||
if (this->timers[0] == 0) {
|
||||
if ((otherTw->actionFunc != BossTw_ShootBeam) && this->work[CAN_SHOOT]) {
|
||||
this->work[CAN_SHOOT] = false;
|
||||
@@ -671,8 +671,8 @@ void BossTw_FlyTo(BossTw* this, PlayState* play) {
|
||||
Math_ApproachS(&this->actor.shape.rot.x, pitchTarget, 0xA, this->rotateSpeed);
|
||||
Math_ApproachF(&this->rotateSpeed, 4096.0f, 1.0f, 100.0f);
|
||||
Math_ApproachF(&this->actor.speedXZ, 10.0f, 1.0f, 1.0f);
|
||||
func_8002D908(&this->actor);
|
||||
func_8002D7EC(&this->actor);
|
||||
Actor_UpdateVelocityXYZ(&this->actor);
|
||||
Actor_UpdatePos(&this->actor);
|
||||
|
||||
if ((this->timers[0] == 0) || (xzDist < 70.0f)) {
|
||||
BossTw_SetupTurnToPlayer(this, play);
|
||||
@@ -2337,8 +2337,8 @@ void BossTw_DeathBall(BossTw* this, PlayState* play) {
|
||||
Math_ApproachS(&this->actor.world.rot.x, Math_FAtan2F(yDiff, sqrtf(SQ(xDiff) + SQ(zDiff))) * (32768 / M_PI), 5,
|
||||
this->rotateSpeed);
|
||||
Math_ApproachS(&this->actor.world.rot.y, yaw, 5, this->rotateSpeed);
|
||||
func_8002D908(&this->actor);
|
||||
func_8002D7EC(&this->actor);
|
||||
Actor_UpdateVelocityXYZ(&this->actor);
|
||||
Actor_UpdatePos(&this->actor);
|
||||
}
|
||||
|
||||
void BossTw_TwinrovaSetupDeathCS(BossTw* this, PlayState* play) {
|
||||
@@ -3937,8 +3937,8 @@ void BossTw_BlastFire(BossTw* this, PlayState* play) {
|
||||
case 10:
|
||||
this->blastActive = true;
|
||||
if (this->timers[0] == 0) {
|
||||
func_8002D908(&this->actor);
|
||||
func_8002D7EC(&this->actor);
|
||||
Actor_UpdateVelocityXYZ(&this->actor);
|
||||
Actor_UpdatePos(&this->actor);
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_TWINROBA_SHOOT_FIRE & ~SFX_FLAG);
|
||||
} else {
|
||||
Vec3f velocity;
|
||||
@@ -4127,8 +4127,8 @@ void BossTw_BlastIce(BossTw* this, PlayState* play) {
|
||||
this->blastActive = true;
|
||||
|
||||
if (this->timers[0] == 0) {
|
||||
func_8002D908(&this->actor);
|
||||
func_8002D7EC(&this->actor);
|
||||
Actor_UpdateVelocityXYZ(&this->actor);
|
||||
Actor_UpdatePos(&this->actor);
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_TWINROBA_SHOOT_FREEZE - SFX_FLAG);
|
||||
} else {
|
||||
Vec3f velocity;
|
||||
@@ -5447,7 +5447,7 @@ void BossTw_TwinrovaFly(BossTw* this, PlayState* play) {
|
||||
Math_ApproachS(&this->actor.shape.rot.y, yaw, 0xA, this->rotateSpeed);
|
||||
Math_ApproachF(&this->rotateSpeed, 2000.0f, 1.0f, 100.0f);
|
||||
Math_ApproachF(&this->actor.speedXZ, 30.0f, 1.0f, 2.0f);
|
||||
func_8002D908(&this->actor);
|
||||
Actor_UpdateVelocityXYZ(&this->actor);
|
||||
Math_ApproachF(&this->actor.world.pos.x, this->targetPos.x, 0.1f, fabsf(this->actor.velocity.x) * 1.5f);
|
||||
Math_ApproachF(&this->actor.world.pos.y, this->targetPos.y, 0.1f, fabsf(this->actor.velocity.y) * 1.5f);
|
||||
Math_ApproachF(&this->targetPos.y, 380.0f, 1.0f, 2.0f);
|
||||
|
||||
@@ -1310,7 +1310,7 @@ void BossVa_BodyPhase3(BossVa* this, PlayState* play) {
|
||||
this->actor.speedXZ = 0.0f;
|
||||
}
|
||||
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
if (SkelAnime_Update(&this->skelAnime) && (sFightPhase >= PHASE_4)) {
|
||||
BossVa_SetupBodyPhase4(this, play);
|
||||
}
|
||||
@@ -1510,7 +1510,7 @@ void BossVa_BodyPhase4(BossVa* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
this->actor.focus.pos = this->actor.world.pos;
|
||||
this->actor.focus.pos.y += 60.0f;
|
||||
if (((play->gameplayFrames % 2) == 0) && (this->timer == 0)) {
|
||||
|
||||
@@ -947,7 +947,7 @@ void DemoEffect_UpdateLightRingTriforce(DemoEffect* this, PlayState* play) {
|
||||
void DemoEffect_UpdateCreationFireball(DemoEffect* this, PlayState* play) {
|
||||
DemoEffect* effect;
|
||||
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
this->actor.speedXZ = this->actor.speedXZ + (this->actor.gravity * 0.5f);
|
||||
|
||||
if (this->fireBall.timer != 0) {
|
||||
@@ -2128,7 +2128,7 @@ void DemoEffect_DrawGetItem(Actor* thisx, PlayState* play) {
|
||||
rg = RG_SHADOW_MEDALLION;
|
||||
break;
|
||||
case DEMO_EFFECT_MEDAL_LIGHT:
|
||||
rc = RC_GIFT_FROM_SAGES;
|
||||
rc = RC_GIFT_FROM_RAURU;
|
||||
rg = RG_LIGHT_MEDALLION;
|
||||
break;
|
||||
case DEMO_EFFECT_LIGHTARROW:
|
||||
|
||||
@@ -571,7 +571,7 @@ void DemoGj_InitRubblePile1(DemoGj* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_8097A000(DemoGj* this, PlayState* play) {
|
||||
Actor_MoveForward(&this->dyna.actor);
|
||||
Actor_MoveXZGravity(&this->dyna.actor);
|
||||
|
||||
this->rotationVec.x += (s16)(kREG(18));
|
||||
this->rotationVec.y += (s16)(kREG(19) + 1000);
|
||||
@@ -635,7 +635,7 @@ void DemoGj_InitRubblePile2(DemoGj* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_8097A238(DemoGj* this, PlayState* play) {
|
||||
Actor_MoveForward(&this->dyna.actor);
|
||||
Actor_MoveXZGravity(&this->dyna.actor);
|
||||
|
||||
this->rotationVec.x += (s16)(kREG(31));
|
||||
this->rotationVec.y += (s16)(kREG(32) + 1000);
|
||||
@@ -699,7 +699,7 @@ void DemoGj_InitRubblePile3(DemoGj* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_8097A474(DemoGj* this, PlayState* play) {
|
||||
Actor_MoveForward(&this->dyna.actor);
|
||||
Actor_MoveXZGravity(&this->dyna.actor);
|
||||
|
||||
this->rotationVec.x += (s16)(kREG(44));
|
||||
this->rotationVec.y += (s16)(kREG(45) + 1000);
|
||||
@@ -747,7 +747,7 @@ void DemoGj_InitRubblePile4(DemoGj* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_8097A644(DemoGj* this, PlayState* play) {
|
||||
Actor_MoveForward(&this->dyna.actor);
|
||||
Actor_MoveXZGravity(&this->dyna.actor);
|
||||
|
||||
this->rotationVec.x += (s16)(kREG(57));
|
||||
this->rotationVec.y += (s16)(kREG(58) + 1000);
|
||||
@@ -795,7 +795,7 @@ void DemoGj_InitRubblePile5(DemoGj* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_8097A814(DemoGj* this, PlayState* play) {
|
||||
Actor_MoveForward(&this->dyna.actor);
|
||||
Actor_MoveXZGravity(&this->dyna.actor);
|
||||
|
||||
this->rotationVec.x += (s16)(kREG(70));
|
||||
this->rotationVec.y += (s16)(kREG(71) + 1000);
|
||||
@@ -843,7 +843,7 @@ void DemoGj_InitRubblePile6(DemoGj* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_8097A9E4(DemoGj* this, PlayState* play) {
|
||||
Actor_MoveForward(&this->dyna.actor);
|
||||
Actor_MoveXZGravity(&this->dyna.actor);
|
||||
|
||||
this->rotationVec.x += (s16)(kREG(83));
|
||||
this->rotationVec.y += (s16)(kREG(84) + 1000);
|
||||
@@ -891,7 +891,7 @@ void DemoGj_InitRubblePile7(DemoGj* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_8097ABB4(DemoGj* this, PlayState* play) {
|
||||
Actor_MoveForward(&this->dyna.actor);
|
||||
Actor_MoveXZGravity(&this->dyna.actor);
|
||||
|
||||
this->rotationVec.x += (s16)(kREG(15));
|
||||
this->rotationVec.y += (s16)(kREG(14) + 1000);
|
||||
|
||||
@@ -159,11 +159,11 @@ void func_8097CC08(DemoGo* this) {
|
||||
} else {
|
||||
this->actor.speedXZ = (kREG(15) * 0.01f) + 1.2f;
|
||||
}
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
}
|
||||
|
||||
void func_8097CCC0(DemoGo* this) {
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
}
|
||||
|
||||
void func_8097CCE0(DemoGo* this, PlayState* play) {
|
||||
|
||||
@@ -68,7 +68,7 @@ f32 func_809946BC(PlayState* play, DoorGerudo* this, f32 arg2, f32 arg3, f32 arg
|
||||
playerPos.x = player->actor.world.pos.x;
|
||||
playerPos.y = player->actor.world.pos.y + arg2;
|
||||
playerPos.z = player->actor.world.pos.z;
|
||||
func_8002DBD0(&this->dyna.actor, &sp1C, &playerPos);
|
||||
Actor_WorldToActorCoords(&this->dyna.actor, &sp1C, &playerPos);
|
||||
|
||||
if ((arg3 < fabsf(sp1C.x)) || (arg4 < fabsf(sp1C.y))) {
|
||||
return FLT_MAX;
|
||||
|
||||
@@ -249,7 +249,7 @@ void DoorKiller_FallAsRubble(DoorKiller* this, PlayState* play) {
|
||||
} else {
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
func_8002D7EC(&this->actor);
|
||||
Actor_UpdatePos(&this->actor);
|
||||
}
|
||||
|
||||
s32 DoorKiller_IsHit(Actor* thisx, PlayState* play) {
|
||||
@@ -376,7 +376,7 @@ void DoorKiller_FallOver(DoorKiller* this, PlayState* play) {
|
||||
if (!(this->hasHitPlayerOrGround & 1)) {
|
||||
Vec3f playerPosRelToDoor;
|
||||
Player* player = GET_PLAYER(play);
|
||||
func_8002DBD0(&this->actor, &playerPosRelToDoor, &player->actor.world.pos);
|
||||
Actor_WorldToActorCoords(&this->actor, &playerPosRelToDoor, &player->actor.world.pos);
|
||||
if ((fabsf(playerPosRelToDoor.y) < 20.0f) && (fabsf(playerPosRelToDoor.x) < 20.0f) &&
|
||||
(playerPosRelToDoor.z < 100.0f) && (playerPosRelToDoor.z > 0.0f)) {
|
||||
this->hasHitPlayerOrGround |= 1;
|
||||
@@ -438,7 +438,7 @@ void DoorKiller_Wait(DoorKiller* this, PlayState* play) {
|
||||
Vec3f playerPosRelToDoor;
|
||||
s16 angleToFacingPlayer;
|
||||
|
||||
func_8002DBD0(&this->actor, &playerPosRelToDoor, &player->actor.world.pos);
|
||||
Actor_WorldToActorCoords(&this->actor, &playerPosRelToDoor, &player->actor.world.pos);
|
||||
|
||||
// playerIsOpening is set by player
|
||||
if (this->playerIsOpening) {
|
||||
|
||||
@@ -261,7 +261,7 @@ void DoorShutter_Init(Actor* thisx, PlayState* play2) {
|
||||
DoorShutter_SetupAction(this, DoorShutter_SetupType);
|
||||
this->unk_16B = phi_a3;
|
||||
if (this->doorType == SHUTTER_KEY_LOCKED || this->doorType == SHUTTER_BOSS) {
|
||||
if (!Flags_GetSwitch(play, this->dyna.actor.params & 0x3F)) {
|
||||
if (GameInteractor_Should(VB_LOCK_BOSS_DOOR, !Flags_GetSwitch(play, this->dyna.actor.params & 0x3F), this)) {
|
||||
this->unk_16E = 10;
|
||||
}
|
||||
Actor_SetFocus(&this->dyna.actor, 60.0f);
|
||||
@@ -322,7 +322,7 @@ f32 func_80996840(PlayState* play, DoorShutter* this, f32 arg2, f32 arg3, f32 ar
|
||||
sp28.x = player->actor.world.pos.x;
|
||||
sp28.y = player->actor.world.pos.y + arg2;
|
||||
sp28.z = player->actor.world.pos.z;
|
||||
func_8002DBD0(&this->dyna.actor, &sp1C, &sp28);
|
||||
Actor_WorldToActorCoords(&this->dyna.actor, &sp1C, &sp28);
|
||||
if (arg3 < fabsf(sp1C.x) || arg4 < fabsf(sp1C.y)) {
|
||||
return FLT_MAX;
|
||||
} else {
|
||||
@@ -543,7 +543,7 @@ void func_80997220(DoorShutter* this, PlayState* play) {
|
||||
if (this->dyna.actor.room >= 0) {
|
||||
Vec3f vec;
|
||||
|
||||
func_8002DBD0(&this->dyna.actor, &vec, &player->actor.world.pos);
|
||||
Actor_WorldToActorCoords(&this->dyna.actor, &vec, &player->actor.world.pos);
|
||||
this->dyna.actor.room =
|
||||
play->transiActorCtx.list[(u16)this->dyna.actor.params >> 0xA].sides[(vec.z < 0.0f) ? 0 : 1].room;
|
||||
if (room != this->dyna.actor.room) {
|
||||
@@ -600,7 +600,7 @@ void func_80997568(DoorShutter* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_809975C0(DoorShutter* this, PlayState* play) {
|
||||
Actor_MoveForward(&this->dyna.actor);
|
||||
Actor_MoveXZGravity(&this->dyna.actor);
|
||||
Actor_UpdateBgCheckInfo(play, &this->dyna.actor, 0.0f, 0.0f, 0.0f, 4);
|
||||
if (this->dyna.actor.bgCheckFlags & 1) {
|
||||
DoorShutter_SetupAction(this, func_809976B8);
|
||||
|
||||
@@ -541,7 +541,7 @@ void EnAm_MoveToHome(EnAm* this, PlayState* play) {
|
||||
// turn away from a wall if touching one
|
||||
if ((this->dyna.actor.speedXZ != 0.0f) && (this->dyna.actor.bgCheckFlags & 8)) {
|
||||
this->dyna.actor.world.rot.y = this->dyna.actor.wallYaw;
|
||||
Actor_MoveForward(&this->dyna.actor);
|
||||
Actor_MoveXZGravity(&this->dyna.actor);
|
||||
}
|
||||
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
@@ -649,7 +649,7 @@ void EnAm_Lunge(EnAm* this, PlayState* play) {
|
||||
if ((this->dyna.actor.speedXZ != 0.0f) && (this->dyna.actor.bgCheckFlags & 8)) {
|
||||
this->dyna.actor.world.rot.y =
|
||||
(this->dyna.actor.wallYaw - this->dyna.actor.world.rot.y) + this->dyna.actor.wallYaw;
|
||||
Actor_MoveForward(&this->dyna.actor);
|
||||
Actor_MoveXZGravity(&this->dyna.actor);
|
||||
this->dyna.actor.bgCheckFlags &= ~8;
|
||||
}
|
||||
|
||||
@@ -901,7 +901,7 @@ void EnAm_Update(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
Actor_MoveForward(&this->dyna.actor);
|
||||
Actor_MoveXZGravity(&this->dyna.actor);
|
||||
Actor_UpdateBgCheckInfo(play, &this->dyna.actor, 20.0f, 28.0f, 80.0f, 0x1D);
|
||||
}
|
||||
|
||||
|
||||
@@ -250,7 +250,7 @@ void EnAni_Update(Actor* thisx, PlayState* play) {
|
||||
|
||||
Collider_UpdateCylinder(&this->actor, &this->collider);
|
||||
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, 0.0f, 0.0f, 4);
|
||||
if ((play->csCtx.state != CS_STATE_IDLE) && (play->csCtx.npcActions[0] != NULL)) {
|
||||
switch (this->unk_2AA) {
|
||||
|
||||
@@ -448,7 +448,7 @@ void EnAnubice_Update(Actor* thisx, PlayState* play) {
|
||||
this->actionFunc(this, play);
|
||||
|
||||
this->actor.velocity.y += this->actor.gravity;
|
||||
func_8002D7EC(&this->actor);
|
||||
Actor_UpdatePos(&this->actor);
|
||||
|
||||
if (!this->isLinkOutOfRange) {
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 5.0f, 5.0f, 10.0f, 0x1D);
|
||||
|
||||
@@ -179,7 +179,7 @@ void EnAnubiceFire_Update(Actor* thisx, PlayState* play) {
|
||||
|
||||
Actor_SetScale(&this->actor, this->scale);
|
||||
this->actionFunc(this, play);
|
||||
func_8002D7EC(&this->actor);
|
||||
Actor_UpdatePos(&this->actor);
|
||||
this->unk_160[0] = this->actor.world.pos;
|
||||
|
||||
for (i = 4; i >= 0; i--) {
|
||||
|
||||
@@ -230,11 +230,11 @@ void EnArrow_Shoot(EnArrow* this, PlayState* play) {
|
||||
Math_Vec3f_Copy(&this->unk_210, &this->actor.world.pos);
|
||||
|
||||
if (this->actor.params >= ARROW_SEED) {
|
||||
func_8002D9A4(&this->actor, 80.0f);
|
||||
Actor_SetProjectileSpeed(&this->actor, 80.0f);
|
||||
this->timer = 15;
|
||||
this->actor.shape.rot.x = this->actor.shape.rot.y = this->actor.shape.rot.z = 0;
|
||||
} else {
|
||||
func_8002D9A4(&this->actor, 150.0f);
|
||||
Actor_SetProjectileSpeed(&this->actor, 150.0f);
|
||||
this->timer = 12;
|
||||
}
|
||||
}
|
||||
@@ -372,7 +372,7 @@ void EnArrow_Fly(EnArrow* this, PlayState* play) {
|
||||
}
|
||||
} else {
|
||||
Math_Vec3f_Copy(&this->unk_210, &this->actor.world.pos);
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
|
||||
if ((this->touchedPoly =
|
||||
BgCheck_ProjectileLineTest(&play->colCtx, &this->actor.prevPos, &this->actor.world.pos, &hitPoint,
|
||||
@@ -424,7 +424,7 @@ void func_809B45E0(EnArrow* this, PlayState* play) {
|
||||
|
||||
void func_809B4640(EnArrow* this, PlayState* play) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
|
||||
if (DECR(this->timer) == 0) {
|
||||
Actor_Kill(&this->actor);
|
||||
|
||||
@@ -334,9 +334,9 @@ void EnAttackNiw_Update(Actor* thisx, PlayState* play) {
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, 20.0f, 60.0f, 0x1D);
|
||||
|
||||
if (this->actionFunc == func_809B5670) {
|
||||
func_8002D97C(&this->actor);
|
||||
Actor_MoveXYZ(&this->actor);
|
||||
} else {
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
}
|
||||
|
||||
if (this->actor.floorHeight <= BGCHECK_Y_MIN) {
|
||||
|
||||
@@ -216,7 +216,7 @@ void EnBa_FallAsBlob(EnBa* this, PlayState* play) {
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
} else {
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 30.0f, 28.0f, 80.0f, 5);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1241,7 +1241,7 @@ void EnBb_Update(Actor* thisx, PlayState* play2) {
|
||||
this->actionFunc(this, play);
|
||||
if ((this->actor.params <= ENBB_BLUE) && (this->actor.speedXZ >= -6.0f) &&
|
||||
((this->actor.flags & ACTOR_FLAG_DRAGGED_BY_ARROW) == 0)) {
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
}
|
||||
if (this->moveMode == BBMOVE_NORMAL) {
|
||||
if ((this->actor.world.pos.y - 20.0f) <= this->actor.floorHeight) {
|
||||
|
||||
@@ -192,7 +192,7 @@ void EnBdfire_Update(Actor* thisx, PlayState* play) {
|
||||
|
||||
this->unk_156++;
|
||||
this->actionFunc(this, play);
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
}
|
||||
|
||||
void EnBdfire_DrawFire(EnBdfire* this, PlayState* play) {
|
||||
|
||||
@@ -505,7 +505,7 @@ void func_809BDC08(EnBigokuta* this, PlayState* play) {
|
||||
}
|
||||
|
||||
phi_v1 = (Actor_WorldDistXZToPoint(&player->actor, &this->actor.home.pos) - 180.0f) * (8.0f / 15);
|
||||
func_8002DBD0(&this->actor, &sp28, &player->actor.world.pos);
|
||||
Actor_WorldToActorCoords(&this->actor, &sp28, &player->actor.world.pos);
|
||||
if (fabsf(sp28.x) > 263.0f || ((sp28.z > 0.0f) && !Actor_IsFacingPlayer(&this->actor, 0x1B00) &&
|
||||
!Player_IsFacingActor(&this->actor, 0x2000, play))) {
|
||||
phi_v1 -= 0x80;
|
||||
|
||||
@@ -625,9 +625,9 @@ void EnBili_Update(Actor* thisx, PlayState* play2) {
|
||||
}
|
||||
}
|
||||
if (this->actionFunc == EnBili_Recoil) {
|
||||
func_8002D97C(&this->actor);
|
||||
Actor_MoveXYZ(&this->actor);
|
||||
} else {
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
}
|
||||
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 5.0f, this->collider.dim.radius, this->collider.dim.height, 7);
|
||||
|
||||
@@ -162,7 +162,7 @@ void EnBom_Move(EnBom* this, PlayState* play) {
|
||||
this->actor.world.rot.y = ((this->actor.wallYaw - this->actor.world.rot.y) + this->actor.wallYaw) - 0x8000;
|
||||
}
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EV_BOMB_BOUND);
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
this->actor.speedXZ *= 0.7f;
|
||||
this->actor.bgCheckFlags &= ~8;
|
||||
}
|
||||
@@ -176,11 +176,11 @@ void EnBom_Move(EnBom* this, PlayState* play) {
|
||||
this->actor.velocity.y *= -0.3f;
|
||||
this->actor.bgCheckFlags &= ~2;
|
||||
} else if (this->timer >= 4) {
|
||||
func_8002F580(&this->actor, play);
|
||||
Actor_OfferCarry(&this->actor, play);
|
||||
}
|
||||
}
|
||||
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
}
|
||||
|
||||
void EnBom_WaitForRelease(EnBom* this, PlayState* play) {
|
||||
|
||||
@@ -198,8 +198,8 @@ void EnBomChu_UpdateFloorPoly(EnBomChu* this, CollisionPoly* floorPoly, PlayStat
|
||||
|
||||
// A hack for preventing bombchus from sticking to ledges.
|
||||
// The visual rotation reverts the sign inversion (shape.rot.x = -world.rot.x).
|
||||
// The better fix would be making func_8002D908 compute XYZ velocity better,
|
||||
// or not using it and make the bombchu compute its own velocity.
|
||||
// The better fix would be making Actor_UpdateVelocityXYZ compute XYZ velocity
|
||||
// better, or not using it and make the bombchu compute its own velocity.
|
||||
this->actor.world.rot.x = -this->actor.world.rot.x;
|
||||
}
|
||||
}
|
||||
@@ -429,7 +429,7 @@ void EnBomChu_Update(Actor* thisx, PlayState* play2) {
|
||||
}
|
||||
|
||||
this->actionFunc(this, play);
|
||||
func_8002D97C(&this->actor);
|
||||
Actor_MoveXYZ(&this->actor);
|
||||
|
||||
this->collider.elements[0].dim.worldSphere.center.x = this->actor.world.pos.x;
|
||||
this->collider.elements[0].dim.worldSphere.center.y = this->actor.world.pos.y;
|
||||
|
||||
@@ -194,7 +194,7 @@ void EnBombf_GrowBomb(EnBombf* this, PlayState* play) {
|
||||
}
|
||||
} else {
|
||||
if (!Actor_HasParent(&this->actor, play)) {
|
||||
func_8002F580(&this->actor, play);
|
||||
Actor_OfferCarry(&this->actor, play);
|
||||
} else {
|
||||
player->actor.child = NULL;
|
||||
player->heldActor = NULL;
|
||||
@@ -244,7 +244,7 @@ void EnBombf_Move(EnBombf* this, PlayState* play) {
|
||||
func_8002F850(play, &this->actor);
|
||||
this->actor.velocity.y *= -0.5f;
|
||||
} else if (this->timer >= 4) {
|
||||
func_8002F580(&this->actor, play);
|
||||
Actor_OfferCarry(&this->actor, play);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -335,7 +335,7 @@ void EnBombf_Update(Actor* thisx, PlayState* play) {
|
||||
this->actionFunc(this, play);
|
||||
|
||||
if (thisx->params == BOMBFLOWER_BODY) {
|
||||
Actor_MoveForward(thisx);
|
||||
Actor_MoveXZGravity(thisx);
|
||||
}
|
||||
|
||||
if (thisx->gravity != 0.0f) {
|
||||
@@ -357,7 +357,7 @@ void EnBombf_Update(Actor* thisx, PlayState* play) {
|
||||
thisx->world.rot.y = ((thisx->wallYaw - thisx->world.rot.y) + thisx->wallYaw) - 0x8000;
|
||||
}
|
||||
Audio_PlayActorSound2(thisx, NA_SE_EV_BOMB_BOUND);
|
||||
Actor_MoveForward(thisx);
|
||||
Actor_MoveXZGravity(thisx);
|
||||
DREG(6) = 1;
|
||||
Actor_UpdateBgCheckInfo(play, thisx, 5.0f, 10.0f, 0.0f, 0x1F);
|
||||
DREG(6) = 0;
|
||||
|
||||
@@ -150,8 +150,8 @@ void EnBoom_Fly(EnBoom* this, PlayState* play) {
|
||||
}
|
||||
|
||||
// Set xyz speed, move forward, and play the boomerang sound
|
||||
func_8002D9A4(&this->actor, 12.0f);
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_SetProjectileSpeed(&this->actor, 12.0f);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
func_8002F974(&this->actor, NA_SE_IT_BOOMERANG_FLY - SFX_FLAG);
|
||||
|
||||
// If the boomerang collides with EnItem00 or a Skulltula token, set grabbed pointer to pick it up
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
/*
|
||||
set on init unless treasure flag is set
|
||||
if clear, chest moves (Actor_MoveForward) (falls, likely)
|
||||
if clear, chest moves (Actor_MoveXZGravity) (falls, likely)
|
||||
ends up cleared from SWITCH_FLAG_FALL types when switch flag is set
|
||||
*/
|
||||
#define ENBOX_MOVE_IMMOBILE (1 << 0)
|
||||
@@ -449,10 +449,10 @@ void EnBox_WaitOpen(EnBox* this, PlayState* play) {
|
||||
Flags_SetTreasure(play, this->dyna.actor.params & 0x1F);
|
||||
} else {
|
||||
player = GET_PLAYER(play);
|
||||
func_8002DBD0(&this->dyna.actor, &sp4C, &player->actor.world.pos);
|
||||
Actor_WorldToActorCoords(&this->dyna.actor, &sp4C, &player->actor.world.pos);
|
||||
if (sp4C.z > -50.0f && sp4C.z < 0.0f && fabsf(sp4C.y) < 10.0f && fabsf(sp4C.x) < 20.0f &&
|
||||
Player_IsFacingActor(&this->dyna.actor, 0x3000, play)) {
|
||||
func_8002F554(&this->dyna.actor, play, -(this->dyna.actor.params >> 5 & 0x7F));
|
||||
Actor_OfferGetItemNearby(&this->dyna.actor, play, -(this->dyna.actor.params >> 5 & 0x7F));
|
||||
}
|
||||
if (Flags_GetTreasure(play, this->dyna.actor.params & 0x1F)) {
|
||||
EnBox_SetupAction(this, EnBox_Open);
|
||||
@@ -551,7 +551,7 @@ void EnBox_Update(Actor* thisx, PlayState* play) {
|
||||
this->actionFunc(this, play);
|
||||
|
||||
if (!(this->movementFlags & ENBOX_MOVE_IMMOBILE)) {
|
||||
Actor_MoveForward(&this->dyna.actor);
|
||||
Actor_MoveXZGravity(&this->dyna.actor);
|
||||
Actor_UpdateBgCheckInfo(play, &this->dyna.actor, 0.0f, 0.0f, 0.0f, 0x1C);
|
||||
}
|
||||
|
||||
|
||||
@@ -401,7 +401,7 @@ void EnBubble_Regrow(EnBubble* this, PlayState* play) {
|
||||
void EnBubble_Update(Actor* thisx, PlayState* play) {
|
||||
EnBubble* this = (EnBubble*)thisx;
|
||||
|
||||
func_8002D7EC(&this->actor);
|
||||
Actor_UpdatePos(&this->actor);
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 16.0f, 16.0f, 0.0f, 7);
|
||||
this->actionFunc(this, play);
|
||||
Actor_SetFocus(&this->actor, this->actor.shape.yOffset);
|
||||
|
||||
@@ -414,7 +414,7 @@ void EnButte_Update(Actor* thisx, PlayState* play) {
|
||||
this->actionFunc(this, play);
|
||||
|
||||
if (this->actor.update != NULL) {
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
Math_StepToF(&this->actor.world.pos.y, this->posYTarget, 0.6f);
|
||||
if (this->actor.xyzDistToPlayerSq < 5000.0f) {
|
||||
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
|
||||
|
||||
@@ -795,7 +795,7 @@ void EnBw_Update(Actor* thisx, PlayState* play2) {
|
||||
this->unk_234 = Actor_TestFloorInDirection(thisx, play, 50.0f, thisx->world.rot.y);
|
||||
if ((this->unk_220 == 4) || (this->unk_220 == 6) || (this->unk_220 == 5) || (this->unk_220 == 1) ||
|
||||
(this->unk_234 != 0)) {
|
||||
Actor_MoveForward(thisx);
|
||||
Actor_MoveXZGravity(thisx);
|
||||
}
|
||||
Actor_UpdateBgCheckInfo(play, thisx, 20.0f, 30.0f, 21.0f, 0x1F);
|
||||
}
|
||||
|
||||
@@ -251,9 +251,9 @@ void EnClearTag_Init(Actor* thisx, PlayState* play) {
|
||||
this->actor.speedXZ = MAX(10.0f, Actor_WorldDistXZToActor(thisx, &GET_PLAYER(gPlayState)->actor) * 0.33f);
|
||||
} else {
|
||||
this->actor.speedXZ = 35.0f;
|
||||
func_8002D908(&this->actor);
|
||||
Actor_UpdateVelocityXYZ(&this->actor);
|
||||
for (j = 0; j <= 0; j++) {
|
||||
func_8002D7EC(&this->actor);
|
||||
Actor_UpdatePos(&this->actor);
|
||||
}
|
||||
this->actor.scale.x = 0.4f;
|
||||
this->actor.scale.y = 0.4f;
|
||||
@@ -262,7 +262,7 @@ void EnClearTag_Init(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
this->actor.shape.rot.x = -this->actor.shape.rot.x;
|
||||
|
||||
func_8002D908(&this->actor);
|
||||
Actor_UpdateVelocityXYZ(&this->actor);
|
||||
Collider_SetCylinder(play, &this->collider, &this->actor, &sLaserCylinderInit);
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_IT_SWORD_REFLECT_MG);
|
||||
} else { // Initialize the Arwing.
|
||||
@@ -502,7 +502,7 @@ void EnClearTag_Update(Actor* thisx, PlayState* play2) {
|
||||
this->actor.shape.rot.x = -this->actor.shape.rot.x;
|
||||
|
||||
// Update the Arwing's velocity.
|
||||
func_8002D908(&this->actor);
|
||||
Actor_UpdateVelocityXYZ(&this->actor);
|
||||
this->actor.velocity.x += this->acceleration.x;
|
||||
this->actor.velocity.y += this->acceleration.y;
|
||||
this->actor.velocity.z += this->acceleration.z;
|
||||
@@ -524,7 +524,7 @@ void EnClearTag_Update(Actor* thisx, PlayState* play2) {
|
||||
this->crashingTimer--;
|
||||
}
|
||||
|
||||
func_8002D7EC(&this->actor);
|
||||
Actor_UpdatePos(&this->actor);
|
||||
|
||||
Actor_SetFocus(&this->actor, 0.0f);
|
||||
|
||||
@@ -569,7 +569,7 @@ void EnClearTag_Update(Actor* thisx, PlayState* play2) {
|
||||
break;
|
||||
|
||||
case CLEAR_TAG_STATE_LASER:
|
||||
func_8002D7EC(&this->actor);
|
||||
Actor_UpdatePos(&this->actor);
|
||||
|
||||
// Check if the laser has hit a target.
|
||||
if (this->collider.base.atFlags & AT_HIT) {
|
||||
|
||||
@@ -308,7 +308,7 @@ void EnCow_Update(Actor* thisx, PlayState* play2) {
|
||||
|
||||
CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliders[0].base);
|
||||
CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliders[1].base);
|
||||
Actor_MoveForward(thisx);
|
||||
Actor_MoveXZGravity(thisx);
|
||||
Actor_UpdateBgCheckInfo(play, thisx, 0.0f, 0.0f, 0.0f, 4);
|
||||
if (SkelAnime_Update(&this->skelAnime) != 0) {
|
||||
if (this->skelAnime.animation == &gCowBodyChewAnim) {
|
||||
|
||||
@@ -452,10 +452,10 @@ void EnCrow_Update(Actor* thisx, PlayState* play) {
|
||||
if (this->actionFunc != EnCrow_Respawn) {
|
||||
if (this->actor.colChkInfo.health != 0) {
|
||||
height = 20.0f * scale;
|
||||
func_8002D97C(&this->actor);
|
||||
Actor_MoveXYZ(&this->actor);
|
||||
} else {
|
||||
height = 0.0f;
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
}
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 12.0f * scale, 25.0f * scale, 50.0f * scale, 7);
|
||||
} else {
|
||||
|
||||
@@ -318,7 +318,7 @@ s32 EnCs_HandleWalking(EnCs* this, PlayState* play) {
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->walkAngle, 1, 2500, 0);
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
this->actor.speedXZ = this->walkSpeed;
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, 0.0f, 0.0f, 4);
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -545,7 +545,7 @@ void EnDaiku_EscapeRun(EnDaiku* this, PlayState* play) {
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, ry, 1, 0xFA0, 0);
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
Math_SmoothStepToF(&this->actor.speedXZ, this->runSpeed, 0.6f, dxz, 0.0f);
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, 0.0f, 0.0f, 4);
|
||||
|
||||
if (this->subCamActive) {
|
||||
|
||||
@@ -434,7 +434,7 @@ void EnDaikuKakariko_Run(EnDaikuKakariko* this, PlayState* play) {
|
||||
Math_SmoothStepToF(&this->actor.speedXZ, this->runSpeed, 0.8f, runDist, 0.0f);
|
||||
}
|
||||
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
|
||||
if (this->flags & 0x40) {
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, 0.0f, 0.0f, 4);
|
||||
|
||||
@@ -1030,7 +1030,7 @@ void EnDekubaba_DeadStickDrop(EnDekubaba* this, PlayState* play) {
|
||||
return;
|
||||
}
|
||||
|
||||
func_8002F554(&this->actor, play, GI_STICKS_1);
|
||||
Actor_OfferGetItemNearby(&this->actor, play, GI_STICKS_1);
|
||||
}
|
||||
|
||||
// Update and associated functions
|
||||
@@ -1131,7 +1131,7 @@ void EnDekubaba_Update(Actor* thisx, PlayState* play) {
|
||||
this->actionFunc(this, play);
|
||||
|
||||
if (this->actionFunc == EnDekubaba_PrunedSomersault) {
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 10.0f, this->size * 15.0f, 10.0f, 5);
|
||||
} else if (this->actionFunc != EnDekubaba_DeadStickDrop) {
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, 0.0f, 0.0f, 4);
|
||||
|
||||
@@ -480,7 +480,7 @@ void EnDekunuts_Update(Actor* thisx, PlayState* play) {
|
||||
if (this->actor.params != DEKUNUTS_FLOWER) {
|
||||
EnDekunuts_ColliderCheck(this, play);
|
||||
this->actionFunc(this, play);
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, this->collider.dim.radius, this->collider.dim.height,
|
||||
0x1D);
|
||||
Collider_UpdateCylinder(&this->actor, &this->collider);
|
||||
|
||||
@@ -512,7 +512,7 @@ void EnDh_Update(Actor* thisx, PlayState* play) {
|
||||
|
||||
EnDh_CollisionCheck(this, play);
|
||||
this->actionFunc(this, play);
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, 45.0f, 45.0f, 0x1D);
|
||||
this->actor.focus.pos = this->headPos;
|
||||
Collider_UpdateCylinder(&this->actor, &this->collider1);
|
||||
|
||||
@@ -495,7 +495,7 @@ void EnDns_Update(Actor* thisx, PlayState* play) {
|
||||
Actor_SetFocus(&this->actor, 60.0f);
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
this->actionFunc(this, play);
|
||||
if (this->standOnGround) {
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, 20.0f, 20.0f, 4);
|
||||
|
||||
@@ -425,7 +425,7 @@ void EnDntJiji_Update(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
}
|
||||
this->actionFunc(this, play);
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, 20.0f, 60.0f, 0x1D);
|
||||
Collider_UpdateCylinder(&this->actor, &this->collider);
|
||||
if (this->isSolid != 0) {
|
||||
|
||||
@@ -814,7 +814,7 @@ void EnDntNomal_Update(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
}
|
||||
this->actionFunc(this, play);
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, 20.0f, 60.0f, 0x1D);
|
||||
if (this->type == ENDNTNOMAL_TARGET) {
|
||||
Collider_SetQuadVertices(&this->targetQuad, &this->targetVtx[0], &this->targetVtx[1], &this->targetVtx[2],
|
||||
|
||||
@@ -434,7 +434,7 @@ void func_809F74C4(EnDodojr* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_809F758C(EnDodojr* this, PlayState* play) {
|
||||
func_8002D868(&this->actor);
|
||||
Actor_UpdateVelocityXZGravity(&this->actor);
|
||||
func_809F6730(this, play, &this->actor.world.pos);
|
||||
|
||||
if (DECR(this->timer4) == 0) {
|
||||
@@ -491,7 +491,7 @@ void func_809F773C(EnDodojr* this, PlayState* play) {
|
||||
void func_809F77AC(EnDodojr* this, PlayState* play) {
|
||||
this->rootScale = 1.2f;
|
||||
this->rootScale *= ((f32)this->actor.colorFilterTimer / 8);
|
||||
func_8002D868(&this->actor);
|
||||
Actor_UpdateVelocityXZGravity(&this->actor);
|
||||
|
||||
if (func_809F68B0(this, play) != 0) {
|
||||
this->timer3 = 60;
|
||||
@@ -506,7 +506,7 @@ void func_809F784C(EnDodojr* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_809F786C(EnDodojr* this, PlayState* play) {
|
||||
func_8002D868(&this->actor);
|
||||
Actor_UpdateVelocityXZGravity(&this->actor);
|
||||
|
||||
if (func_809F68B0(this, play) != 0) {
|
||||
func_809F6AC4(this);
|
||||
@@ -539,7 +539,7 @@ void func_809F78EC(EnDodojr* this, PlayState* play) {
|
||||
|
||||
void func_809F799C(EnDodojr* this, PlayState* play) {
|
||||
this->actor.flags |= ACTOR_FLAG_PLAY_HIT_SFX;
|
||||
func_8002D868(&this->actor);
|
||||
Actor_UpdateVelocityXZGravity(&this->actor);
|
||||
|
||||
if (func_809F68B0(this, play) != 0) {
|
||||
func_809F6994(this);
|
||||
@@ -563,7 +563,7 @@ void func_809F7A00(EnDodojr* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_809F7AB8(EnDodojr* this, PlayState* play) {
|
||||
func_8002D868(&this->actor);
|
||||
Actor_UpdateVelocityXZGravity(&this->actor);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, 0, 4, 1000, 10);
|
||||
this->actor.world.rot.x = this->actor.shape.rot.x;
|
||||
|
||||
@@ -613,7 +613,7 @@ void EnDodojr_Update(Actor* thisx, PlayState* play) {
|
||||
EnDodojr* this = (EnDodojr*)thisx;
|
||||
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
func_809F70E8(this, play);
|
||||
|
||||
if (this->actionFunc != func_809F73AC) {
|
||||
|
||||
@@ -775,7 +775,7 @@ void EnDodongo_Update(Actor* thisx, PlayState* play) {
|
||||
EnDodongo_CollisionCheck(this, play);
|
||||
if (this->actor.colChkInfo.damageEffect != 0xE) {
|
||||
this->actionFunc(this, play);
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 75.0f, 60.0f, 70.0f, 0x1D);
|
||||
if (this->actor.bgCheckFlags & 2) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIZA_DOWN);
|
||||
|
||||
@@ -485,7 +485,7 @@ void EnDog_Update(Actor* thisx, PlayState* play) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, this->collider.dim.radius, this->collider.dim.height * 0.5f, 0.0f,
|
||||
5);
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
this->actionFunc(this, play);
|
||||
Collider_UpdateCylinder(&this->actor, &this->collider);
|
||||
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
|
||||
|
||||
@@ -197,7 +197,7 @@ void EnDoor_Idle(EnDoor* this, PlayState* play) {
|
||||
s16 phi_v0;
|
||||
|
||||
doorType = this->actor.params >> 7 & 7;
|
||||
func_8002DBD0(&this->actor, &playerPosRelToDoor, &player->actor.world.pos);
|
||||
Actor_WorldToActorCoords(&this->actor, &playerPosRelToDoor, &player->actor.world.pos);
|
||||
if (this->playerIsOpening != 0) {
|
||||
this->actionFunc = EnDoor_Open;
|
||||
Animation_PlayOnceSetSpeed(&this->skelAnime, D_809FCECC[this->animStyle],
|
||||
|
||||
@@ -616,7 +616,7 @@ void EnDu_Update(Actor* thisx, PlayState* play) {
|
||||
this->actor.world.pos.y += this->actor.velocity.y;
|
||||
this->actor.world.pos.z += this->actor.velocity.z;
|
||||
} else {
|
||||
func_8002D7EC(&this->actor);
|
||||
Actor_UpdatePos(&this->actor);
|
||||
}
|
||||
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, 0.0f, 0.0f, 4);
|
||||
|
||||
@@ -86,7 +86,7 @@ void EnDyExtra_Update(Actor* thisx, PlayState* play) {
|
||||
this->actor.scale.z = this->scale.z;
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_PL_SPIRAL_HEAL_BEAM - SFX_FLAG);
|
||||
this->actionFunc(this, play);
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
}
|
||||
|
||||
void EnDyExtra_Draw(Actor* thisx, PlayState* play) {
|
||||
|
||||
@@ -648,9 +648,9 @@ void EnEiyer_Update(Actor* thisx, PlayState* play) {
|
||||
this->actionFunc(this, play);
|
||||
|
||||
if (this->actor.world.rot.x == 0 || this->actionFunc == EnEiyer_Stunned) {
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
} else {
|
||||
func_8002D97C(&this->actor);
|
||||
Actor_MoveXYZ(&this->actor);
|
||||
}
|
||||
|
||||
if (this->actionFunc == EnEiyer_Glide || this->actionFunc == EnEiyer_DiveAttack ||
|
||||
|
||||
@@ -508,14 +508,14 @@ void func_80A02C98(EnElf* this, Vec3f* targetPos, f32 arg2) {
|
||||
func_80A02BD8(this, targetPos, arg2);
|
||||
Math_StepToF(&this->actor.velocity.x, xVelTarget, 1.5f);
|
||||
Math_StepToF(&this->actor.velocity.z, zVelTarget, 1.5f);
|
||||
func_8002D7EC(&this->actor);
|
||||
Actor_UpdatePos(&this->actor);
|
||||
}
|
||||
|
||||
void func_80A02E30(EnElf* this, Vec3f* targetPos) {
|
||||
func_80A02BD8(this, targetPos, 0.2f);
|
||||
this->actor.velocity.x = (targetPos->x + this->unk_28C.x) - this->actor.world.pos.x;
|
||||
this->actor.velocity.z = (targetPos->z + this->unk_28C.z) - this->actor.world.pos.z;
|
||||
func_8002D7EC(&this->actor);
|
||||
Actor_UpdatePos(&this->actor);
|
||||
this->actor.world.pos.x = targetPos->x + this->unk_28C.x;
|
||||
this->actor.world.pos.z = targetPos->z + this->unk_28C.z;
|
||||
}
|
||||
@@ -523,7 +523,7 @@ void func_80A02E30(EnElf* this, Vec3f* targetPos) {
|
||||
void func_80A02EC0(EnElf* this, Vec3f* targetPos) {
|
||||
func_80A02BD8(this, targetPos, 0.2f);
|
||||
this->actor.velocity.x = this->actor.velocity.z = 0.0f;
|
||||
func_8002D7EC(&this->actor);
|
||||
Actor_UpdatePos(&this->actor);
|
||||
this->actor.world.pos.x = targetPos->x + this->unk_28C.x;
|
||||
this->actor.world.pos.z = targetPos->z + this->unk_28C.z;
|
||||
}
|
||||
@@ -570,7 +570,7 @@ void func_80A03018(EnElf* this, PlayState* play) {
|
||||
|
||||
Math_SmoothStepToS(&this->unk_2BC, targetYaw, 10, this->unk_2AC, 0x20);
|
||||
this->actor.world.rot.y = this->unk_2BC;
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
}
|
||||
|
||||
void func_80A03148(EnElf* this, Vec3f* arg1, f32 arg2, f32 arg3, f32 arg4) {
|
||||
@@ -598,7 +598,7 @@ void func_80A03148(EnElf* this, Vec3f* arg1, f32 arg2, f32 arg3, f32 arg4) {
|
||||
|
||||
Math_StepToF(&this->actor.velocity.x, xVelTarget, 5.0f);
|
||||
Math_StepToF(&this->actor.velocity.z, zVelTarget, 5.0f);
|
||||
func_8002D7EC(&this->actor);
|
||||
Actor_UpdatePos(&this->actor);
|
||||
}
|
||||
|
||||
void func_80A0329C(EnElf* this, PlayState* play) {
|
||||
|
||||
@@ -337,7 +337,7 @@ void EnExItem_ExitChest(EnExItem* this, PlayState* play) {
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
}
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
}
|
||||
|
||||
void EnExItem_FairyMagic(EnExItem* this, PlayState* play) {
|
||||
|
||||
@@ -370,7 +370,7 @@ void EnExRuppy_Update(Actor* thisx, PlayState* play) {
|
||||
if (this->timer != 0) {
|
||||
this->timer--;
|
||||
}
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, 20.0f, 50.0f, 0x1C);
|
||||
}
|
||||
|
||||
|
||||
@@ -681,7 +681,7 @@ void EnFd_Update(Actor* thisx, PlayState* play) {
|
||||
} else if (this->actionFunc != EnFd_WaitForCore) {
|
||||
EnFd_ColliderCheck(this, play);
|
||||
}
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, 0.0f, 0.0f, 4);
|
||||
EnFd_Fade(this, play);
|
||||
this->actionFunc(this, play);
|
||||
|
||||
@@ -193,13 +193,13 @@ void EnFdFire_DanceTowardsPlayer(EnFdFire* this, PlayState* play) {
|
||||
if (this->actor.speedXZ < 0.1f) {
|
||||
this->actor.speedXZ = 5.0f;
|
||||
}
|
||||
func_8002D868(&this->actor);
|
||||
Actor_UpdateVelocityXZGravity(&this->actor);
|
||||
}
|
||||
}
|
||||
|
||||
void EnFdFire_Disappear(EnFdFire* this, PlayState* play) {
|
||||
Math_SmoothStepToF(&this->actor.speedXZ, 0.0f, 0.6f, 9.0f, 0.0f);
|
||||
func_8002D868(&this->actor);
|
||||
Actor_UpdateVelocityXZGravity(&this->actor);
|
||||
Math_SmoothStepToF(&this->scale, 0.0f, 0.3f, 0.1f, 0.0f);
|
||||
this->actor.shape.shadowScale = 20.0f;
|
||||
this->actor.shape.shadowScale *= (this->scale / 3.0f);
|
||||
@@ -218,7 +218,7 @@ void EnFdFire_Update(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
func_8002D7EC(&this->actor);
|
||||
Actor_UpdatePos(&this->actor);
|
||||
this->actionFunc(this, play);
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 12.0f, 10.0f, 0.0f, 5);
|
||||
|
||||
|
||||
@@ -296,7 +296,7 @@ void EnFhgFire_LightningShock(EnFhgFire* this, PlayState* play) {
|
||||
EffectSsFhgFlash_SpawnShock(play, &this->actor, &pos, 200, FHGFLASH_SHOCK_NO_ACTOR);
|
||||
}
|
||||
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
Collider_UpdateCylinder(&this->actor, &this->collider);
|
||||
if (player->invincibilityTimer == 0) {
|
||||
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
|
||||
@@ -440,8 +440,8 @@ void EnFhgFire_EnergyBall(EnFhgFire* this, PlayState* play) {
|
||||
dxL = player->actor.world.pos.x - this->actor.world.pos.x;
|
||||
dyL = player->actor.world.pos.y + 40.0f - this->actor.world.pos.y;
|
||||
dzL = player->actor.world.pos.z - this->actor.world.pos.z;
|
||||
func_8002D908(&this->actor);
|
||||
func_8002D7EC(&this->actor);
|
||||
Actor_UpdateVelocityXYZ(&this->actor);
|
||||
Actor_UpdatePos(&this->actor);
|
||||
if (this->work[FHGFIRE_VARIANCE_TIMER] & 1) {
|
||||
Actor_SetScale(&this->actor, 6.0f);
|
||||
} else {
|
||||
|
||||
@@ -336,7 +336,7 @@ void EnFireRock_Update(Actor* thisx, PlayState* play) {
|
||||
thisx->gravity = -0.3f - (this->scale * 7.0f);
|
||||
}
|
||||
if (this->type != FIRE_ROCK_ON_FLOOR) {
|
||||
Actor_MoveForward(thisx);
|
||||
Actor_MoveXZGravity(thisx);
|
||||
Actor_UpdateBgCheckInfo(play, thisx, 50.0f, 50.0f, 100.0f, 0x1C);
|
||||
}
|
||||
|
||||
|
||||
@@ -692,12 +692,12 @@ void EnFirefly_Update(Actor* thisx, PlayState* play2) {
|
||||
|
||||
if (!(this->actor.flags & ACTOR_FLAG_DRAGGED_BY_ARROW)) {
|
||||
if ((this->actor.colChkInfo.health == 0) || (this->actionFunc == EnFirefly_Stunned)) {
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
} else {
|
||||
if (this->actionFunc != EnFirefly_Rebound) {
|
||||
this->actor.world.rot.x = 0x1554 - this->actor.shape.rot.x;
|
||||
}
|
||||
func_8002D97C(&this->actor);
|
||||
Actor_MoveXYZ(&this->actor);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -692,7 +692,7 @@ void EnFish_OrdinaryUpdate(EnFish* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if ((this->actionFunc == NULL) || (this->actionFunc(this, play), (this->actor.update != NULL))) {
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
|
||||
if (this->unk_250 != 0) {
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 17.5f, 4.0f, 0.0f, this->unk_250);
|
||||
@@ -731,7 +731,7 @@ void EnFish_RespawningUpdate(EnFish* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if ((this->actionFunc == NULL) || (this->actionFunc(this, play), (this->actor.update != NULL))) {
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
|
||||
if (this->respawnTimer == 20) {
|
||||
this->actor.draw = EnFish_Draw;
|
||||
|
||||
@@ -1052,7 +1052,7 @@ void EnFloormas_Update(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
|
||||
if (this->actionFunc != EnFloormas_GrabLink) {
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
}
|
||||
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, this->actor.scale.x * 3000.0f, 0.0f, 0x1D);
|
||||
|
||||
@@ -583,7 +583,7 @@ void EnFr_UpdateActive(Actor* thisx, PlayState* play) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
SkelAnime_Update(&this->skelAnimeButterfly);
|
||||
EnFr_ButterflyPath(this, play);
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -253,7 +253,7 @@ void EnFu_Update(Actor* thisx, PlayState* play) {
|
||||
|
||||
Collider_UpdateCylinder(&this->actor, &this->collider);
|
||||
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, 0.0f, 0.0f, 4);
|
||||
if ((!(this->behaviorFlags & FU_WAIT)) && (SkelAnime_Update(&this->skelanime) != 0)) {
|
||||
Animation_Change(&this->skelanime, this->skelanime.animation, 1.0f, 0.0f,
|
||||
|
||||
@@ -367,7 +367,7 @@ void EnFw_Update(Actor* thisx, PlayState* play) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_HOOKSHOT_ATTACHED)) {
|
||||
// not attached to hookshot.
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 10.0f, 20.0f, 0.0f, 5);
|
||||
this->actionFunc(this, play);
|
||||
if (this->damageTimer == 0 && this->explosionTimer == 0 && this->actionFunc == EnFw_Run) {
|
||||
|
||||
@@ -698,7 +698,7 @@ void EnFz_Update(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
|
||||
Math_StepToF(&this->actor.speedXZ, this->speedXZ, 0.2f);
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
|
||||
if (this->updateBgInfo) {
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, 20.0f, 20.0f, 5);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user