Skip to content
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

arrow, tag_ret, obj_Ygush00, kytag06, nh: all OK #499

Merged
merged 3 commits into from
Oct 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,11 @@


# Helper function for single-object RELs
def Rel(status, rel_name, cpp_name):
def Rel(status, rel_name, cpp_name, extra_cflags=[]):
return {
"lib": rel_name,
"mw_version": "GC/1.3.2",
"cflags": cflags_rel,
"cflags": cflags_rel + extra_cflags,
"host": True,
"objects": [
Object(status, cpp_name),
Expand All @@ -211,8 +211,8 @@ def Rel(status, rel_name, cpp_name):


# Helper function for actor RELs
def ActorRel(status, rel_name):
return Rel(status, rel_name, f"d/actor/{rel_name}.cpp")
def ActorRel(status, rel_name, extra_cflags=[]):
return Rel(status, rel_name, f"d/actor/{rel_name}.cpp", extra_cflags=extra_cflags)


# Helper function for JSystem libraries
Expand Down Expand Up @@ -414,7 +414,7 @@ def DolphinLib(lib_name, objects):
Object(NonMatching, "d/d_snap.cpp"),
Object(Matching, "d/d_point_wind.cpp"),
Object(NonMatching, "d/actor/d_a_agb.cpp"),
Object(NonMatching, "d/actor/d_a_arrow.cpp"),
Object(Matching, "d/actor/d_a_arrow.cpp", cflags=[*cflags_framework, "-sym off"]),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should just be -sym off, right? cflags_rel already includes cflags_framework

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

arrow isn't it a rel, it's an actor in main.dol.
If I do cflags=["-sym off"] it won't compile at all, it seems to replace all the flags with just "-sym off", instead of adding them.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah. we can fix that I suppose, but for now

Object(NonMatching, "d/actor/d_a_bg.cpp"),
Object(NonMatching, "d/actor/d_a_bomb.cpp"),
Object(NonMatching, "d/actor/d_a_bomb2.cpp"),
Expand All @@ -429,7 +429,7 @@ def DolphinLib(lib_name, objects):
Object(NonMatching, "d/actor/d_a_ib.cpp"),
Object(NonMatching, "d/actor/d_a_item.cpp"),
Object(Matching, "d/actor/d_a_itembase.cpp"),
Object(NonMatching, "d/actor/d_a_nh.cpp"),
Object(Matching, "d/actor/d_a_nh.cpp"),
Object(NonMatching, "d/actor/d_a_npc_fa1.cpp"),
Object(NonMatching, "d/actor/d_a_obj_search.cpp"),
Object(NonMatching, "d/actor/d_a_player.cpp"),
Expand Down Expand Up @@ -1239,7 +1239,7 @@ def DolphinLib(lib_name, objects):
ActorRel(NonMatching, "d_a_kytag03"),
ActorRel(NonMatching, "d_a_kytag04"),
ActorRel(NonMatching, "d_a_kytag05"),
ActorRel(NonMatching, "d_a_kytag06"),
ActorRel(Matching, "d_a_kytag06"),
ActorRel(NonMatching, "d_a_kytag07"),
ActorRel(NonMatching, "d_a_lamp"),
ActorRel(NonMatching, "d_a_lod_bg"),
Expand All @@ -1250,7 +1250,7 @@ def DolphinLib(lib_name, objects):
ActorRel(NonMatching, "d_a_msw"),
ActorRel(NonMatching, "d_a_mtoge"),
ActorRel(NonMatching, "d_a_obj_AjavW"),
ActorRel(NonMatching, "d_a_obj_Ygush00"),
ActorRel(Matching, "d_a_obj_Ygush00", extra_cflags=["-sym off"]),
ActorRel(NonMatching, "d_a_obj_akabe"),
ActorRel(NonMatching, "d_a_obj_barrel"),
ActorRel(NonMatching, "d_a_obj_barrel2"),
Expand Down Expand Up @@ -1292,7 +1292,7 @@ def DolphinLib(lib_name, objects):
ActorRel(NonMatching, "d_a_pirate_flag"),
ActorRel(NonMatching, "d_a_race_item"),
ActorRel(NonMatching, "d_a_rd"),
ActorRel(Matching, "d_a_rectangle"),
ActorRel(Matching, "d_a_rectangle"),
ActorRel(NonMatching, "d_a_salvage"),
ActorRel(NonMatching, "d_a_sbox"),
ActorRel(NonMatching, "d_a_sk"),
Expand Down Expand Up @@ -1602,7 +1602,7 @@ def DolphinLib(lib_name, objects):
ActorRel(NonMatching, "d_a_tag_etc"),
ActorRel(NonMatching, "d_a_tag_island"),
ActorRel(NonMatching, "d_a_tag_kf1"),
ActorRel(NonMatching, "d_a_tag_ret"),
ActorRel(Matching, "d_a_tag_ret", extra_cflags=["-sym off"]),
ActorRel(NonMatching, "d_a_tag_volcano"),
ActorRel(NonMatching, "d_a_title"),
ActorRel(NonMatching, "d_a_tn"),
Expand Down
6 changes: 6 additions & 0 deletions include/JSystem/JParticle/JPAEmitter.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ class JPABaseEmitter {
void setGlobalRTMatrix(MtxP mtx) {
JPASetRMtxTVecfromMtx(mtx, mGlobalRotation, mGlobalTranslation);
}
void setGlobalTranslation(f32 x, f32 y, f32 z) { mGlobalTranslation.set(x, y, z); }
void setGlobalParticleScale(const JGeometry::TVec3<float>& scale) {
mGlobalScale.set(scale);
mGlobalScale2D.set(scale);
}
void setMaxFrame(s32 maxFrame) { mMaxFrame = maxFrame; }

void stopCreateParticle() { setStatus(JPAEmtrStts_StopEmit); }

Expand Down
12 changes: 6 additions & 6 deletions include/SSystem/SComponent/c_lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,19 +85,19 @@ inline T cLib_maxLimit(T val, T max) {
return (T)ret;
}

template <typename T>
T cLib_getRndValue(T min, T range) {
return (T)(min + cM_rndF((f32)range));
}

template <typename T>
T cLib_calcTimer(T* value) {
if (*value != 0) {
if ((s32)*value != 0) {
*value = *value - 1;
}
return *value;
}

template <typename T>
T cLib_getRndValue(T min, T range) {
return (T)(min + cM_rndF((f32)range));
}

void MtxInit(void);
void MtxTrans(f32, f32, f32, u8);
void MtxScale(f32, f32, f32, u8);
Expand Down
8 changes: 4 additions & 4 deletions include/d/actor/d_a_arrow.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ class daArrow_c : fopAc_ac_c {
void arrowShooting();
void arrowUseMp();
void ShieldReflect();
void check_water_in();
bool check_water_in();
BOOL changeArrowMp();
void changeArrowType();
daArrow_c* changeArrowType();
void changeArrowTypeNotReady();
void setRoomInfo();
void setKeepMatrix();
Expand Down Expand Up @@ -79,7 +79,7 @@ class daArrow_c : fopAc_ac_c {
/* 0x360 */ dCcD_Stts mStts;
/* 0x39C */ dCcD_Cps mCps;
/* 0x4D4 */ dCcD_Sph mSph;
/* 0x600 */ u8 field_0x600[0x601 - 0x600];
/* 0x600 */ bool field_0x600;
/* 0x601 */ u8 mArrowType;
/* 0x602 */ s16 field_0x602;
/* 0x604 */ s16 field_0x604;
Expand Down Expand Up @@ -111,7 +111,7 @@ class daArrow_c : fopAc_ac_c {
/* 0x6A0 */ s32 field_0x6a0;
/* 0x6A4 */ s32 mInWaterTimer;
/* 0x6A8 */ cXyz field_0x6a8;
/* 0x6B4 */ u8 field_0x6B4[0x6E4 - 0x6B4];
/* 0x6B4 */ Mtx field_0x6b4;
/* 0x6E4 */ u8 field_0x6e4;
/* 0x6E5 */ u8 field_0x6E5[0x6E6 - 0x6E5];
/* 0x6E6 */ csXyz field_0x6e6;
Expand Down
2 changes: 1 addition & 1 deletion include/d/actor/d_a_player.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class daPy_py_c : public fopAc_ac_c {
virtual void getGroundY() = 0;
virtual void getTactMusic() const;
virtual void getTactTimerCancel() const;
virtual void checkPlayerGuard() const;
virtual BOOL checkPlayerGuard() const;
virtual void getGrabMissActor();
virtual u32 checkPlayerFly() const;
virtual void checkFrontRoll() const;
Expand Down
4 changes: 2 additions & 2 deletions include/d/actor/d_a_player_link.h
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ class daPy_lk_c : public daPy_py_c {
void setDamageEmitter();
void endFlameDamageEmitter();
void endDamageEmitter();
void setItemWaterEffect(fopAc_ac_c*, int, int);
static u32 setItemWaterEffect(fopAc_ac_c*, int, int);
void getDemoLookActor();
void setTinkleCeiverModel();
void setTalismanModel();
Expand Down Expand Up @@ -1010,7 +1010,7 @@ class daPy_lk_c : public daPy_py_c {
virtual void getGroundY();
virtual void getTactMusic() const;
virtual void getTactTimerCancel() const;
virtual void checkPlayerGuard() const;
virtual BOOL checkPlayerGuard() const;
virtual void getGrabMissActor();
virtual u32 checkPlayerFly() const;
virtual void checkFrontRoll() const;
Expand Down
9 changes: 6 additions & 3 deletions include/d/d_bg_s.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ class cBgS {
public:
cBgS() {}

bool GetTriPla(cBgS_PolyInfo&) const;
cM3dGPla* GetTriPla(cBgS_PolyInfo&) const;
cM3dGPla* i_GetTriPla(cBgS_PolyInfo& polyInfo) const {
return GetTriPla(polyInfo.GetBgIndex(), polyInfo.GetPolyIndex());
}
bool Regist(cBgW*, u32, void*);
int Release(cBgW*);
bool LineCross(cBgS_LinChk*);
Expand Down Expand Up @@ -101,8 +104,8 @@ class dBgS : public cBgS {
void GetLinkNo(cBgS_PolyInfo&);
int GetWallCode(cBgS_PolyInfo&);
int GetSpecialCode(cBgS_PolyInfo&);
void GetAttributeCodeDirect(cBgS_PolyInfo&);
void GetAttributeCode(cBgS_PolyInfo&);
s32 GetAttributeCodeDirect(cBgS_PolyInfo&);
s32 GetAttributeCode(cBgS_PolyInfo&);
void GetGroundCode(cBgS_PolyInfo&);
void GetPolyId2(int, int, int, u32, u32);
int GetCamMoveBG(cBgS_PolyInfo&);
Expand Down
2 changes: 1 addition & 1 deletion include/d/d_bg_s_lin_chk.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class dBgS_LinChk : public cBgS_LinChk, public dBgS_Chk {
SetPolyPassChk(GetPolyPassChkInfo());
SetGrpPassChk(GetGrpPassChkInfo());
}
/* 80077D64 */ void Set(cXyz const* pi_start, cXyz const* pi_end, fopAc_ac_c const*);
/* 80077D64 */ void Set(cXyz* pi_start, cXyz* pi_end, fopAc_ac_c*);

/* 80077CDC */ virtual ~dBgS_LinChk() {}

Expand Down
15 changes: 12 additions & 3 deletions include/d/d_com_inf_game.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,10 @@ class dComIfG_play_c {
s16 getItemMagicCount() { return mItemMagicCount; }
void setItemMagicCount(s16 magic) { mItemMagicCount += magic; }

void setItemLifeCount(f32 num) {
mItemLifeCount += num;
}
void setItemLifeCount(f32 num) { mItemLifeCount += num; }

s16 getItemArrowNumCount() { return mItemArrowNumCount; }
void setItemArrowNumCount(s16 num) { mItemArrowNumCount += num; }

u8 checkMesgCancelButton() { return field_0x4949; }

Expand Down Expand Up @@ -1149,6 +1150,14 @@ inline void dComIfGp_setItemMagicCount(s16 magic) {
g_dComIfG_gameInfo.play.setItemMagicCount(magic);
}

inline s16 dComIfGp_getItemArrowNumCount() {
return g_dComIfG_gameInfo.play.getItemArrowNumCount();
}

inline void dComIfGp_getItemArrowNumCount(s16 num) {
return g_dComIfG_gameInfo.play.setItemArrowNumCount(num);
}

inline u8 dComIfGp_checkMesgCancelButton() {
return g_dComIfG_gameInfo.play.checkMesgCancelButton();
}
Expand Down
7 changes: 7 additions & 0 deletions include/d/d_jnt_hit.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ struct __jnt_hit_data_c {

class JntHit_c {
public:
void CreateInit();
void CylHitPosAngleOffset(cXyz*, csXyz*, cXyz*, csXyz*, cXyz, cXyz, float);
void Cyl2HitPosAngleOffset(cXyz*, csXyz*, cXyz*, csXyz*, cXyz, cXyz, float);
void SphHitPosAngleOffset(cXyz*, csXyz*, cXyz*, csXyz*, cXyz, float);
void HitBufferUpdate(int*, cXyz*, int, csXyz*, cXyz*);
s32 searchJntHitPosAngleOffset(cXyz*, csXyz*, cXyz*, csXyz*);

J3DModel* getModel() { return mpModel; }

/* 0x00 */ __jnt_hit_data_c* mpHitData;
Expand Down
1 change: 1 addition & 0 deletions include/d/d_kankyo.h
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ void dKy_Sound_init();
void dKy_change_colpat(u8 param_0);
u8 dKy_pship_existense_chk();
void dKy_Itemgetcol_chg_move();
void dKy_arrowcol_chg_on(cXyz*, int);
void dKy_arrowcol_chg_move();
void dKy_setLight_init();
void GxXFog_set();
Expand Down
Loading