More cursor stuff WIP

This commit is contained in:
robojumper
2025-09-15 22:11:00 +02:00
parent f475873a90
commit e9c2ac8f1a
8 changed files with 135 additions and 30 deletions
+5 -13
View File
@@ -10,6 +10,7 @@
#include "s/s_State.hpp"
#include "s/s_StateID.hpp"
#include "toBeSorted/d_emitter.h"
#include "toBeSorted/d_emitter_callbacks.h"
struct dCsGame_HIO_c {
dCsGame_HIO_c();
@@ -35,15 +36,7 @@ struct dCsGame_HIO_c {
/* 0x42 */ u8 field_0x42;
};
class EffectRelatedTmp {
public:
EffectRelatedTmp();
virtual ~EffectRelatedTmp();
void doSomething(EffectsStruct *s);
};
class EffectRelated : public EffectRelatedTmp {
class EffectRelated : public dEmitterCallback_c {
public:
EffectRelated(u32 x = 0x28, f32 y = 3.5f);
virtual ~EffectRelated() {}
@@ -130,8 +123,6 @@ public:
return sInstance;
}
void setSomething(int);
bool fn_801BF5E0() const;
bool fn_801BF630() const;
@@ -141,6 +132,7 @@ public:
public:
enum CursorType_e {
NONE = 0,
BOW = 6,
};
@@ -342,8 +334,8 @@ public:
/* 0x00C */ UI_STATE_MGR_DECLARE(lytItemCursor_c);
/* 0x048 */ EffectsStruct mEffects;
/* 0x07C */ EffectRelated mEffectRelated;
/* 0x080 */ u8 field_0x80[0xC8 - 0x80];
/* 0x07C */ dEmitterCallbackCursorTrail_c mTrailCb;
/* 0x0B0 */ u8 field_0xB0[0xC8 - 0xB0];
/* 0x0C8 */ m2d::ResAccIf_c *mpResAcc;
/* 0x0CC */ d2d::LytBase_c mLyt;
/* 0x15C */ dCsGameAnmGroups_c mAnmGroups;
+3 -3
View File
@@ -43,15 +43,15 @@ public:
return mpEmitterCallback;
}
void setEmitterCallback(dEmitterCallback_c *cb);
void setParticleCallback(dParticleCallback_c *cb);
protected:
void deactivateEmitters();
void stopCalcEmitters();
void playCalcEmitters();
static void loadColors(JPABaseEmitter *emitter, const GXColor *c1, const GXColor *c2, s32 idx1, s32 idx2);
void setEmitterCallback(dEmitterCallback_c *cb);
void setParticleCallback(dParticleCallback_c *cb);
void setImmortal();
static JPABaseEmitter *GetNextEmitter(JPABaseEmitter *head);
+28
View File
@@ -0,0 +1,28 @@
#ifndef D_EMITTER_CALLBACKS_H
#define D_EMITTER_CALLBACKS_H
#include "m/m_vec.h"
#include "toBeSorted/d_emitter.h"
/**
* A callback responsible for emitting the trail left by the red item cursor dot.
* Used by Bow, Gust Bellows, Clawshots, Slingshot.
*/
class dEmitterCallbackCursorTrail_c : public dEmitterCallback_c {
public:
dEmitterCallbackCursorTrail_c(u32 x = 0x28, f32 y = 3.5f);
virtual ~dEmitterCallbackCursorTrail_c() {}
virtual void executeAfter(JPABaseEmitter *) override;
virtual void create(JPABaseEmitter *) override;
virtual void vt_0x20(f32, f32) override;
private:
/* 0x10 */ f32 field_0x10;
/* 0x14 */ u16 field_0x14;
/* 0x16 */ u8 _0x16[0x1C - 0x16];
/* 0x1C */ mVec3_c posNMinus1;
/* 0x28 */ mVec3_c posNMinus2;
};
#endif