d_a_am 100%, no match

This commit is contained in:
LagoLunatic
2023-10-05 22:55:11 -04:00
parent 8d95d62196
commit 7372aa189b
19 changed files with 904 additions and 91 deletions
+1 -1
View File
@@ -414,7 +414,7 @@ config.libs = [
Object(NonMatching, "d/d_snap.cpp"),
Object(Matching, "d/d_point_wind.cpp"),
Object(NonMatching, "d/actor/d_a_agb.cpp"),
Object(Matching, "d/actor/d_a_arrow.cpp", cflags=[*cflags_framework, "-sym off"]),
Object(Matching, "d/actor/d_a_arrow.cpp", extra_cflags=["-sym off"]),
Object(NonMatching, "d/actor/d_a_bg.cpp"),
Object(NonMatching, "d/actor/d_a_bomb.cpp"),
Object(NonMatching, "d/actor/d_a_bomb2.cpp"),
+2 -1
View File
@@ -4,6 +4,7 @@
#include "dolphin/types.h"
#include "JAZelAudio/JAZelAudio_SE.h"
#include "JAZelAudio/JAZelAudio_BGM.h"
#include "dolphin/mtx/mtx.h"
class Vec;
class JAISound;
@@ -80,7 +81,7 @@ public:
void talkOut();
void menuIn();
void menuOut();
void getCameraInfo(Vec*, f32*[][][][], u32);
void getCameraInfo(Vec*, Mtx, u32);
void getCameraMapInfo(u32);
void setCameraPolygonPos(Vec*);
void setCameraGroupInfo(u8);
@@ -645,9 +645,9 @@ public:
}
void setFrame(f32 frame) { mFrame = frame; }
void setLoop(s16 loop) { mLoop = loop; }
bool checkState(u8 state) const { return mState & state; }
BOOL checkState(u8 state) const { return mState & state; }
private:
public:
/* 0x04 */ u8 mAttribute;
/* 0x05 */ u8 mState;
/* 0x06 */ s16 mStart;
+5 -3
View File
@@ -364,9 +364,9 @@ public:
virtual ~cCcD_ObjCommonBase() {}
void ct();
void SetSPrm(u32 sprm) { mSPrm = sprm; }
s32 getSPrm() const { return mSPrm; }
void setRPrm(s32 rprm) { mRPrm = rprm; }
s32 getRPrm() const { return mRPrm; }
u32 getSPrm() const { return mSPrm; }
void SetRPrm(u32 rprm) { mRPrm = rprm; }
u32 getRPrm() const { return mRPrm; }
cCcD_Obj* GetHitObj() { return mHitObj; }
void ClrObj() { mHitObj = NULL; }
u32 MskSPrm(u32 mask) const { return mSPrm & mask; }
@@ -397,6 +397,7 @@ public:
void SetType(u32 type) { mType = type; }
void SetAtp(int atp) { mAtp = atp; }
void ClrSet() { OffSPrmBit(1); }
void OnHitBit() { SetRPrm(1); }
void OffHitBit() { ClrRPrm(1); }
u32 ChkHit() { return MskRPrm(1); }
@@ -495,6 +496,7 @@ public:
void SetTgType(u32 type) { mObjTg.SetType(type); }
void OnTgSPrmBit(u32 flag) { mObjTg.OnSPrmBit(flag); }
void OffAtSetBit() { mObjAt.ClrSet(); }
void OnAtHitBit() { mObjAt.OnHitBit(); }
void OffAtHitBit() { mObjAt.OffHitBit(); }
void OnTgSetBit() { mObjTg.OnSPrmBit(1); }
void OffTgSetBit() { mObjTg.ClrSet(); }
+2 -2
View File
@@ -26,8 +26,8 @@ public:
};
void getBombRestTime();
void getBombCheck_Flag();
s16 getBombRestTime();
s16 getBombCheck_Flag();
void setBombCheck_Flag();
void setBombFire_ON();
void setBombNoHit();
+2 -2
View File
@@ -43,8 +43,8 @@ namespace daBomb2 {
void remove_fuse_effect();
void set_time(int);
void get_time() const;
void chk_eat() const;
s32 get_time() const;
bool chk_eat() const;
void set_eat();
void set_no_hit();
void chk_explode();
+3 -2
View File
@@ -70,7 +70,7 @@ public:
/* 0x290 */ u8 mAttackState;
/* 0x291 */ u8 field_0x291;
/* 0x292 */ u8 field_0x292[0x294 - 0x292];
/* 0x294 */ s16 field_0x294;
/* 0x294 */ s16 mDamageWaitTimer;
/* 0x296 */ s16 mQuakeTimer;
/* 0x298 */ int field_0x298;
/* 0x29C */ u32 field_0x29c;
@@ -91,10 +91,11 @@ public:
/* 0x300 */ f32 field_0x300;
/* 0x304 */ daPy_demo_c mDemo;
u8 getCutType() const { return mAttackState; }
s16 getDamageWaitTimer() const { return mDamageWaitTimer; }
s16 getBodyAngleX() { return mBodyAngle.x; }
s16 getBodyAngleY() { return mBodyAngle.y; }
void changeDemoMoveAngle(s16 angle) { mDemo.setMoveAngle(angle); }
u8 getCutType() const { return mAttackState; }
void onPlayerNoDraw() { field_0x29c |= 0x8000000; }
void offPlayerNoDraw() { field_0x29c &= ~0x8000000; }
+29
View File
@@ -0,0 +1,29 @@
#ifndef D_CC_UTY_H
#define D_CC_UTY_H
#include "SSystem/SComponent/c_cc_d.h"
#include "f_op/f_op_actor.h"
struct CcAtInfo {
/* 0x00 */ cCcD_Obj* mpObj;
/* 0x04 */ fopAc_ac_c* mpActor;
/* 0x08 */ u8 mDamage;
/* 0x09 */ u8 mbDead;
/* 0x0A */ u8 mResultingAttackType;
/* 0x0B */ u8 m0B[0x0E - 0x0B];
/* 0x0E */ s16 m0E;
/* 0x10 */ u8 m10[0x12 - 0x10];
/* 0x12 */ u16 mPlCutBit;
/* 0x14 */ cXyz* pParticlePos;
/* 0x18 */ s32 mHitSoundId;
};
void cc_pl_cut_bit_get();
void at_se_get(cCcD_Obj*);
void at_se_getC(cCcD_Obj*);
void def_se_set(fopAc_ac_c*, cCcD_Obj*, unsigned long);
void def_se_set_p(fopAc_ac_c*, cXyz*, cCcD_Obj*, unsigned long);
void at_power_check(CcAtInfo*);
void cc_at_check(fopAc_ac_c*, CcAtInfo*);
#endif /* D_CC_UTY_H */
+4
View File
@@ -720,6 +720,10 @@ inline void dComIfGs_initDan(s8 i_stageNo) {
g_dComIfG_gameInfo.save.initDan(i_stageNo);
}
inline void dComIfGs_onActor(int i_no, int i_roomNo) {
g_dComIfG_gameInfo.save.onActor(i_no, i_roomNo);
}
inline BOOL dComIfGs_isActor(int i_no, int i_roomNo) {
return g_dComIfG_gameInfo.save.isActor(i_no, i_roomNo);
}
+1 -1
View File
@@ -228,7 +228,7 @@ public:
/* 0x285 */ s8 mHealth;
/* 0x288 */ s32 mItemTableIdx;
/* 0x28C */ u8 mItemStealNum;
/* 0x28D */ u8 mItemStealLeft;
/* 0x28D */ s8 mItemStealLeft;
fopAc_ac_c();
~fopAc_ac_c();
+4
View File
@@ -545,6 +545,10 @@ inline void fopAcM_seStart(fopAc_ac_c* actor, u32 sfxID, u32 param_2) {
mDoAud_seStart(sfxID, &actor->mEyePos, param_2, dComIfGp_getReverb(fopAcM_GetRoomNo(actor)));
}
inline void fopAcM_monsSeStart(fopAc_ac_c* actor, u32 sfxID, u32 param_2) {
mDoAud_monsSeStart(sfxID, &actor->mEyePos, fopAcM_GetID(actor), 0, dComIfGp_getReverb(fopAcM_GetRoomNo(actor)));
}
extern "C" {
void fopAcM_initManager__Fv(void);
void fopAcM_CreateAppend__Fv(void);
+8
View File
@@ -74,6 +74,14 @@ inline void mDoAud_seDeleteObject(Vec* i_sePos) {
mDoAud_zelAudio_c::getInterface()->seDeleteObject(i_sePos);
}
inline void mDoAud_monsSeStart(u32 param_0, Vec* param_1, u32 param_2, u32 param_3, s8 i_reverb) {
mDoAud_zelAudio_c::getInterface()->monsSeStart(param_0, param_1, param_2, param_3, i_reverb);
}
inline void mDoAud_onEnemyDamage() {
mDoAud_zelAudio_c::getInterface()->onEnemyDamage();
}
inline void mDoAud_bgmMuteMtDragon() {
mDoAud_zelAudio_c::getInterface()->bgmMuteMtDragon();
}
+5 -3
View File
@@ -32,7 +32,7 @@ public:
void setFrame(f32 frame) { mFrameCtrl->setFrame(frame); }
void setPlayMode(int i_mode) { mFrameCtrl->setAttribute(i_mode); }
void setLoopFrame(f32 i_frame) { mFrameCtrl->setLoop(i_frame); }
bool isStop() {
BOOL isStop() {
bool stopped = true;
if (!mFrameCtrl->checkState(1) && mFrameCtrl->getRate() != 0.0f) {
stopped = false;
@@ -284,14 +284,16 @@ public:
J3DModel* getModel() { return mpModel; }
void setFrame(f32 frame) { mFrameCtrl.setFrame(frame); }
f32 getFrame() { return mFrameCtrl.getFrame(); }
bool isStop() const { //regswap somewhere here
BOOL isStop() { //regswap somewhere here
bool stopped = true;
if (!mFrameCtrl.checkState(1) && mFrameCtrl.getRate() != 0.0f) {
stopped = false;
}
return stopped;
}
BOOL checkFrame(f32 frame) {
return mFrameCtrl.checkPass(frame);
}
void update();
void updateDL();
+815 -58
View File
File diff suppressed because it is too large Load Diff
+2
View File
@@ -318,6 +318,8 @@ void daArrow_c::arrowUseMp() {
}
// This is a fake inline (not present in debug maps) which is required for ShieldReflect to match.
// It's possible that an inline similar to this was added to the final game even though it didn't exist in the demo,
// as this section of code was missing from the demo's version of ShieldReflect.
inline void setSphereCoordsFromXYAngles(cXyz& xyz, f32 mag, s16 targetAngleX, s16 targetAngleY) {
f32 normZ;
f32 normY;
+1 -1
View File
@@ -540,7 +540,7 @@ void daObjBarrier_ef_c::execute() {
if (((active_flags >> i) & 1)) {
mBtk[i].play();
if ((int)mBtk[i].isStop() == true) {
if (mBtk[i].isStop() == true) {
active_flags ^= 1 << i;
mHitActor[i] = NULL;
}
+13 -4
View File
@@ -50,7 +50,6 @@ public:
int getMsgNormal();
u32 getMsg();
u16 next_msgStatus(u32* msgId);
void anmAtr(u16);
bool checkTalk();
void eventOrder();
void checkOrder();
@@ -151,7 +150,7 @@ const dCcD_SrcCyl daObjTpost_c::m_cyl_src = {
0.0, // Radius
0.0, // Height
};
static const s32 daObjTpost_c::m_send_price[] = {
const s32 daObjTpost_c::m_send_price[] = {
0x05,
0x0A,
0x14
@@ -305,7 +304,12 @@ void daObjTpost_c::cutSetAnmStart(int staffIdx) {
}
void daObjTpost_c::cutSetAnmProc(int staffIdx) {
if(mMorf->isStop()) { //probably regswap in isStop()
// Using the mDoExt_McaMorf::isStop inline causes regswap.
// if(mMorf->isStop()) { //
mDoExt_McaMorf* morf = mMorf;
bool stopped = true;
if (!morf->mFrameCtrl.checkState(1) && morf->mFrameCtrl.getRate() != 0.0f) { stopped = false; }
if (stopped) {
dComIfGp_evmng_cutEnd(staffIdx);
}
}
@@ -835,7 +839,12 @@ void daObjTpost_c::modeTalkXY() {
}
if(field_0x6C9 == 2 || field_0x6C9 == 3) {
if(mMorf->isStop()) { //probably regswap in isStop()
// Using the mDoExt_McaMorf::isStop inline causes regswap.
// if(mMorf->isStop()) {
mDoExt_McaMorf* morf = mMorf;
bool stopped = true;
if (!morf->mFrameCtrl.checkState(1) && morf->mFrameCtrl.getRate() != 0.0f) { stopped = false; }
if (stopped) {
if(cLib_calcTimer(&field_0x8DC) == 0 && talk(1) == dNpcMsgStts_BOX_CLOSED_e) {
modeProc(PROC_INIT, 0);
dComIfGp_event_onEventFlag(8);
+4 -4
View File
@@ -8,12 +8,12 @@
#include "dolphin/types.h"
/* 80067FA0-80067FD0 .text getBombRestTime__8daBomb_cFv */
void daBomb_c::getBombRestTime() {
s16 daBomb_c::getBombRestTime() {
/* Nonmatching */
}
/* 80067FD0-80068000 .text getBombCheck_Flag__8daBomb_cFv */
void daBomb_c::getBombCheck_Flag() {
s16 daBomb_c::getBombCheck_Flag() {
/* Nonmatching */
}
@@ -113,12 +113,12 @@ void daBomb2::Act_c::set_time(int) {
}
/* 80068490-80068498 .text get_time__Q27daBomb25Act_cCFv */
void daBomb2::Act_c::get_time() const {
s32 daBomb2::Act_c::get_time() const {
/* Nonmatching */
}
/* 80068498-800684A0 .text chk_eat__Q27daBomb25Act_cCFv */
void daBomb2::Act_c::chk_eat() const {
bool daBomb2::Act_c::chk_eat() const {
/* Nonmatching */
}
+1 -7
View File
@@ -3,7 +3,7 @@
// Translation Unit: d_cc_uty.cpp
//
#include "d_cc_uty.h"
#include "d/d_cc_uty.h"
#include "dolphin/types.h"
/* 800AE938-800AE9E8 .text cc_pl_cut_bit_get__Fv */
@@ -40,9 +40,3 @@ void at_power_check(CcAtInfo*) {
void cc_at_check(fopAc_ac_c*, CcAtInfo*) {
/* Nonmatching */
}
/* 800AF368-800AF384 .text PrmAbstract<Q37daTsubo5Act_c5Prm_e>__5daObjFPC10fopAc_ac_cQ37daTsubo5Act_c5Prm_eQ37daTsubo5Act_c5Prm_e */
void daObj::PrmAbstract<daTsubo::Act_c::Prm_e>(const fopAc_ac_c*, daTsubo::Act_c::Prm_e, daTsubo::Act_c::Prm_e) {
/* Nonmatching */
}