mirror of
https://github.com/zeldaret/ss
synced 2026-10-27 20:32:11 -04:00
Match d_t_beetle (100%)
This commit is contained in:
@@ -12,10 +12,8 @@ updateBeetle__11dTgBeetle_cFR14dAcBoomerang_c = .text:0x00000620; // type:functi
|
||||
__dt__11dTgBeetle_cFv = .text:0x00000680; // type:function size:0x5C
|
||||
_ctors = .ctors:0x00000000; // type:label scope:global
|
||||
_dtors = .dtors:0x00000000; // type:label scope:global
|
||||
lbl_302_rodata_0 = .rodata:0x00000000; // type:object size:0x4 data:float
|
||||
dTgBeetle__scaleMultiplier = .rodata:0x00000004; // type:object size:0xC align:4 data:float
|
||||
lbl_302_rodata_4.y = .rodata:0x00000010; // type:object size:0x4 align:4 data:float
|
||||
lbl_302_rodata_4.z = .rodata:0x00000014; // type:object size:0x4 align:4 data:float
|
||||
lbl_302_rodata_0 = .rodata:0x00000000; // type:object size:0x4 scope:global data:float
|
||||
lbl_302_rodata_4 = .rodata:0x00000004; // type:object size:0x14 scope:local align:4 data:float
|
||||
g_profile_BEETLE_TAG = .data:0x00000000; // type:object size:0x10
|
||||
lbl_302_data_10 = .data:0x00000010; // type:object size:0x5 data:string
|
||||
dTgBeetle__vtable = .data:0x00000018; // type:object size:0x74
|
||||
lbl_302_data_10 = .data:0x00000010; // type:object size:0x8 scope:local data:string
|
||||
__vt__11dTgBeetle_c = .data:0x00000018; // type:object size:0x74
|
||||
|
||||
+1
-1
@@ -2898,7 +2898,7 @@ config.libs = [
|
||||
Rel(NonMatching, "d_t_bb_quake", "REL/d/t/d_t_bb_quake.cpp"),
|
||||
Rel(NonMatching, "d_t_bcal_tag", "REL/d/t/d_t_bcal_tag.cpp"),
|
||||
Rel(NonMatching, "d_t_bcz", "REL/d/t/d_t_bcz.cpp"),
|
||||
Rel(NonMatching, "d_t_beetle", "REL/d/t/d_t_beetle.cpp"),
|
||||
Rel(Matching, "d_t_beetle", "REL/d/t/d_t_beetle.cpp"),
|
||||
Rel(Matching, "d_t_belt_obstacle", "REL/d/t/d_t_belt_obstacle.cpp"),
|
||||
Rel(NonMatching, "d_t_clef_game", "REL/d/t/d_t_clef_game.cpp"),
|
||||
Rel(NonMatching, "d_t_clef_manager", "REL/d/t/d_t_clef_manager.cpp"),
|
||||
|
||||
+20
-18
@@ -10,6 +10,8 @@
|
||||
|
||||
SPECIAL_ACTOR_PROFILE(BEETLE_TAG, dTgBeetle_c, fProfile::BEETLE_TAG, 0x297, 0, 0);
|
||||
|
||||
extern "C" const f32 lbl_302_rodata_0 = 0.0f;
|
||||
|
||||
int dTgBeetle_c::create() {
|
||||
if (dScGame_c::currentSpawnInfo.stageName == "F103") { // flooded faron woods
|
||||
if (mActorSubtype) {
|
||||
@@ -37,7 +39,7 @@ int dTgBeetle_c::create() {
|
||||
mZoneShape = SphereShape;
|
||||
}
|
||||
}
|
||||
matrixCreateFromPosRotYScale(mMatrix1, mPosition, mRotation.y, mScale, nullptr, 0);
|
||||
matrixCreateFromPosRotYScale(mMatrix1, mPosition, mRotation.y, mScale, nullptr, 0.0f);
|
||||
return SUCCEEDED;
|
||||
}
|
||||
}
|
||||
@@ -48,7 +50,7 @@ int dTgBeetle_c::doDelete() {
|
||||
|
||||
int dTgBeetle_c::actorExecute() {
|
||||
if (mPastOnly == 1 && !mActorSubtype) {
|
||||
if (dTimeAreaMgr_c::GetInstance()->checkPositionIsInPastState(mRoomID, mPosition, nullptr, 1.0f) == 0) {
|
||||
if (dTimeAreaMgr_c::GetInstance()->checkPositionIsInPastState(mRoomID, mPosition, nullptr, 1.0f) == 0.0f) {
|
||||
return SUCCEEDED;
|
||||
}
|
||||
}
|
||||
@@ -75,17 +77,8 @@ int dTgBeetle_c::actorExecute() {
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
u32 dTgBeetle_c::isWithinSphere(
|
||||
const mVec3_c &position
|
||||
) const { // fn_302_520 is position within a sphere the size of the zone
|
||||
|
||||
mVec3_c diff = position - (mPosition + mScale.y * mVec3_c::Ey * 1.0f);
|
||||
|
||||
diff.x /= mScale.x;
|
||||
diff.y /= mScale.y;
|
||||
diff.z /= mScale.z;
|
||||
|
||||
return diff.mag() <= 1.0f; // is beetle within a certain distance from center
|
||||
int dTgBeetle_c::draw() {
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
u32 dTgBeetle_c::isWithinCylinder(
|
||||
@@ -101,7 +94,7 @@ u32 dTgBeetle_c::isWithinCylinder(
|
||||
diff.y /= mScale.y;
|
||||
diff.z /= mScale.z;
|
||||
|
||||
if (diff.absXZ() <= 0.01f && diff.y <= 0.5f) {
|
||||
if (diff.absXZ() <= 1.0f && diff.y <= 0.5f) {
|
||||
returnCheck = 1;
|
||||
}
|
||||
|
||||
@@ -112,6 +105,19 @@ u32 dTgBeetle_c::isWithinCylinder(
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
u32 dTgBeetle_c::isWithinSphere(
|
||||
const mVec3_c &position
|
||||
) const { // fn_302_520 is position within a sphere the size of the zone
|
||||
|
||||
mVec3_c diff = position - (mPosition + mScale.y * mVec3_c::Ey * 1.0f);
|
||||
|
||||
diff.x /= mScale.x;
|
||||
diff.y /= mScale.y;
|
||||
diff.z /= mScale.z;
|
||||
|
||||
return diff.mag() <= 1.0f; // is beetle within a certain distance from center
|
||||
}
|
||||
|
||||
void dTgBeetle_c::updateBeetle(dAcBoomerang_c &boomerang) { // fn_302_620 update beetle based on zone type
|
||||
if (mZoneType == LeafZone) { // leaf zone
|
||||
return boomerang.setField_0x8CC(0x20);
|
||||
@@ -123,7 +129,3 @@ void dTgBeetle_c::updateBeetle(dAcBoomerang_c &boomerang) { // fn_302_620 update
|
||||
return boomerang.setRemainingFlightTime(-1);
|
||||
}
|
||||
}
|
||||
|
||||
int dTgBeetle_c::draw() {
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user