-
Notifications
You must be signed in to change notification settings - Fork 15
d_a_obj_soil OK #285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
d_a_obj_soil OK #285
Conversation
Report for SOUE01 (3754ad2 - 612eb87)Total functions: 76971 (-2) ✅ 26 new matches
|
| /* 0x708 */ dAcRef_c<dAcTbox_c> mTboxLink; | ||
| /* 0x714 */ dAcRef_c<dTgInsect_c> mInsectLink; | ||
| /* 0x720 */ DowsingTarget mDowsingTarget; | ||
| /* 0x740 */ GXColor mColors[2]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to be GXColor? or does something like mColor work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I use mColor, it uses __construct_array in the constructor, same for nw4r::ut::Color
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunate. GXColor is fine then
| #include "common.h" | ||
| #include "d/a/d_a_base.h" | ||
| #include "d/a/obj/d_a_obj_base.h" | ||
| #include "d/a/obj/d_a_obj_tbox.h" | ||
| #include "d/col/bg/d_bg_w.h" | ||
| #include "d/col/cc/d_cc_d.h" | ||
| #include "d/t/d_t_insect.h" | ||
| #include "m/m3d/m_smdl.h" | ||
| #include "m/m_vec.h" | ||
| #include "nw4r/g3d/res/g3d_resfile.h" | ||
| #include "rvl/GX/GXTypes.h" | ||
| #include "s/s_State.hpp" | ||
| #include "s/s_StateMgr.hpp" | ||
| #include "toBeSorted/dowsing_target.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for d_a_obj_tbox and d_t_insect remove the headers - We should forward declare in the header since its just used for declaring member reference
include/d/col/c/c_cc_d.h
Outdated
| void OffCoSet() { | ||
| mCo.OffSPrm(1); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
theres already a ClrCoSet inline
src/REL/d/a/obj/d_a_obj_soil.cpp
Outdated
| } | ||
|
|
||
| int dAcOsoil_c::actorCreate() { | ||
| mSubtype = mParams & 0xF; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for future reference, there was an getFromParams inline introduced that should be preferrable to use when accessing params1/mParams
src/REL/d/a/obj/d_a_obj_soil.cpp
Outdated
| } | ||
| if (dScGame_c::currentSpawnInfo.stageName == "F200") { | ||
| static const mVec3_c posOnSkyloft(-7301, 3768, -9309); | ||
| if (PSVECSquareDistance(mPosition, posOnSkyloft) < 360000) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try a vec inline or use VECSquareDistance.
360000.f?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should all floats have the .f suffix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally unless it’s a setting where the parameter is explicitly a float I would say yes.
There have been cases where doubles where emitted due to not having a float specifier - this just clears up a float is really used
src/REL/d/a/obj/d_a_obj_soil.cpp
Outdated
| // this feels fake | ||
| f32 five; | ||
| f32 posZ; | ||
| f32 newY; | ||
| f32 posX; | ||
| f32 posY; | ||
| posZ = mPosition.z; | ||
| posX = mPosition.x; | ||
| posY = mPosition.y; | ||
| five = 5; | ||
| newY = posY + five; | ||
| mPositionCopy2.x = posX; | ||
| mPositionCopy2.z = posZ; | ||
| mPositionCopy2.y = newY; | ||
| mPositionCopy3.x = posX; | ||
| mPositionCopy3.y = newY; | ||
| mPositionCopy3.z = posZ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generally dealing with mPositionCopy2 and mPositionCopy3 have been odd. CopyFrom/CopyTo inlines sometimes fixes it.
sometimes it will consolidate the mPosition.y + 5 into one addtion even if its written twice
eb88941 to
612eb87
Compare
No description provided.