mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-05-23 14:41:33 -04:00
767ba3bb14
* launch.json cwd * bodge to load gci for testing * stub card stat * gameplay bodges * viewport, ub fixes * add release with debug info cmake variant * be fixes, sound stub * viewport h * d_msg_flow BE * be fopAcM_createItemFromEnemyID * update launch configuration to use iso * more audio stubs * Attempt to set viewport and get messages for brightness check * skip opening scene again, fixed JMessage::TResourceContainer::TCResource::Do_destroy * add guards for viewport changes * moar endian swapping to get Link sitting in PROC_OPENING_SCENE and for dialogues * BE d_msg_class i_data * stub bgm start * fix div by 0 error (for now) * TEMP_BROKEN in d_menu_ring * REQUIRES_GX_LINES * properly stub renderingAmap::draw with REQUIRES_GX_LINES * better stubbing outside of stubs * fix event data getting swapped multiple times * evil draw vp fix * Stub log imgui This redirects all spammy logs to an imgui window that is cleared per frame. This fixes the serious performance dip of the logging, and makes the regular log readable. * Oops move those optimization changes I accidentally committed behind a flag DUSK_SELECTED_OPT * gx_line macro in map * fix audio stubbing * switch to CARD API aurora impl * remove kabufuda from link libs * refactor imgui stuff and add input viewer * merge stub log with refactor * accidentally committed a metaforce header shh * basic map loader * ImGuiConsole: Add missing <thread> include * you may now play as luigi (you may now load stages with bridges) * bloom fix * bloom leak fix * cloud shadow fix * add soft reset button to imgui menu * if it broke dont not fix it * i swear i committed this * BE swap indMtx in JPAResource::setPTev * wnark ct fix * frsqrte implementation from kinoko * Fix Clang compile error in JAISeq::prepare_getSeqData_ * Add endian conversions to dMsgFlow_c::getInitNodeIndex This fixes a freeze when Fado tries to stop you from leaving the starting area. * Add RAII GXTexObj wrapper; fix almost all leaks * Update aurora for indirect texturing * Update aurora for CARD fix * Fix Clang build * More d_msg_flow endian fixes Fixes softlock when trying to talk to Fado and possibly other NPCs. * no frame limiter * get pause menu working * proper frame limiting * particle pointer size fix * improve map loader a bit --------- Co-authored-by: Jasper St. Pierre <jstpierre@mecheye.net> Co-authored-by: TakaRikka <takarikka@outlook.com> Co-authored-by: CraftyBoss <talibabdulmaalik@gmail.com> Co-authored-by: Luke Street <luke@street.dev> Co-authored-by: Lurs <2795933+Lurs@users.noreply.github.com> Co-authored-by: PJB3005 <pieterjan.briers+git@gmail.com> Co-authored-by: tgsm <doodrabbit@hotmail.com> Co-authored-by: Max Roncace <me@caseif.net> Co-authored-by: Phillip Stephens <antidote.crk@gmail.com>
103 lines
2.9 KiB
C++
103 lines
2.9 KiB
C++
#ifndef D_A_OBJ_FLAG2_H
|
|
#define D_A_OBJ_FLAG2_H
|
|
|
|
#include "d/d_cc_d.h"
|
|
#include "f_op/f_op_actor_mng.h"
|
|
|
|
struct daObjFlag2_Attr_c {
|
|
/* 0x00 */ f32 mGravity;
|
|
/* 0x04 */ f32 mSpringCoeeficient;
|
|
/* 0x08 */ f32 mDecayRate;
|
|
/* 0x0C */ f32 mWindCoefficient;
|
|
/* 0x10 */ f32 mTornado;
|
|
};
|
|
|
|
class FlagCloth_c : public J3DPacket {
|
|
public:
|
|
void initFlagPos(cXyz*, fopAc_ac_c*);
|
|
cXyz calcFlagFactor(cXyz*, cXyz*, cXyz*, int);
|
|
void calcFlagFactorSub(cXyz*, cXyz*, cXyz*, f32);
|
|
void calcFlagNormal(cXyz*, int);
|
|
inline void calcFlagNormalBack();
|
|
void initCcSphere(fopAc_ac_c*);
|
|
void setCcSphere();
|
|
void execute();
|
|
cXyz getTargetPos() { return mPositions[4]; }
|
|
|
|
void draw();
|
|
|
|
cXyz* getPos() { return mPositions; }
|
|
cXyz* getNormal() { return mNormals; }
|
|
cXyz* getNormalBack() { return mNormalBacks; }
|
|
cXyz* getVec() { return mVecs; }
|
|
void setSpringRate(f32 rate) { mSpringRate = rate; }
|
|
void setWindRate(f32 rate) { mWindRate = rate; }
|
|
void setDecayRate(f32 rate) { mDecayRate = rate; }
|
|
void setGravity(f32 rate) { mGravity = rate; }
|
|
void setTornado(f32 tornado) { mTornado = tornado; }
|
|
TGXTexObj* getImageTexObj() { return &mTexObj; }
|
|
void setTexCoord_p(void* texCoordP) { mpTexCoord = texCoordP; }
|
|
|
|
/* 0x010 */ dKy_tevstr_c mTevStr;
|
|
/* 0x398 */ TGXTexObj mTexObj;
|
|
/* 0x3B8 */ dCcD_Stts mStts;
|
|
/* 0x3F4 */ dCcD_Sph mSph;
|
|
/* 0x52C */ u8 field_0x52c[0x540 - 0x52c];
|
|
/* 0x540 */ cXyz mPositions[21];
|
|
/* 0x63C */ f32 field_0x63c;
|
|
/* 0x640 */ cXyz mNormals[21];
|
|
/* 0x73C */ f32 field_0x73c;
|
|
/* 0x740 */ cXyz mNormalBacks[21];
|
|
/* 0x740 */ cXyz mVecs[21];
|
|
/* 0x938 */ cXyz* mpFlagPosition;
|
|
/* 0x93C */ Mtx mModelMtx;
|
|
/* 0x96C */ void* mpTexCoord;
|
|
/* 0x970 */ f32 mSpringRate;
|
|
/* 0x974 */ f32 mWindRate;
|
|
/* 0x978 */ f32 mDecayRate;
|
|
/* 0x97C */ f32 mGravity;
|
|
/* 0x980 */ f32 mTornado;
|
|
};
|
|
|
|
/**
|
|
* @ingroup actors-objects
|
|
* @class daObjFlag2_c
|
|
* @brief Flag 2
|
|
*
|
|
* @details
|
|
*
|
|
*/
|
|
class daObjFlag2_c : public fopAc_ac_c {
|
|
public:
|
|
void create_init();
|
|
void initBaseMtx();
|
|
void initCollision();
|
|
void setCollision();
|
|
int createHeap();
|
|
int create();
|
|
int draw();
|
|
~daObjFlag2_c();
|
|
inline int execute();
|
|
|
|
const daObjFlag2_Attr_c& attr() const { return M_attr; }
|
|
|
|
static daObjFlag2_Attr_c const M_attr;
|
|
|
|
private:
|
|
/* 0x0568 */ J3DModel* mModel;
|
|
/* 0x056C */ request_of_phase_process_class mFlagPhase;
|
|
/* 0x0574 */ request_of_phase_process_class mArcPhase;
|
|
/* 0x057C */ dCcD_Stts mStts;
|
|
/* 0x05B8 */ dCcD_Cyl mCyl;
|
|
/* 0x06F4 */ u8 field_0x6f4[0x700 - 0x6f4];
|
|
/* 0x0700 */ FlagCloth_c mFlagCloth;
|
|
/* 0x1084 */ u8 field_0x1084[0x10a0 - 0x1084];
|
|
/* 0x10A0 */ cXyz mFlagPosition;
|
|
/* 0x10AC */ bool mFlagValid;
|
|
/* 0x10AD */ char mFlagName[16];
|
|
};
|
|
|
|
STATIC_ASSERT(sizeof(daObjFlag2_c) == 0x10c0);
|
|
|
|
#endif /* D_A_OBJ_FLAG2_H */
|