Merge pull request #252 from robojumper/more_cursor_stuff

Cursor Cleanup
This commit is contained in:
robojumper
2025-09-27 12:21:38 +02:00
committed by GitHub
25 changed files with 1476 additions and 487 deletions
+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
+1 -3
View File
@@ -1,14 +1,13 @@
#ifndef EVENT_MANAGER_H
#define EVENT_MANAGER_H
#include "common.h"
#include "d/a/obj/d_a_obj_base.h"
#include "f/f_base.h"
#include "sized_string.h"
#include "toBeSorted/event.h"
class dAcBase_c;
class dAcObjBase_c;
class EventManager {
public:
@@ -53,7 +52,6 @@ public:
static bool FUN_800a0ba0();
private:
/* 0x000 */ u8 _000[0x084 - 0x000];
/* 0x084 */ Event mCurrentEvent;
/* 0x0C4 */ u8 _0C4[0x184 - 0x0C4];
+46
View File
@@ -0,0 +1,46 @@
#ifndef EVENT_MANAGER_UTIL_H
#define EVENT_MANAGER_UTIL_H
#include "d/d_base.h"
#include "d/d_message.h"
#include "d/lyt/d_lyt_deposit.h"
#include "d/lyt/d_lyt_map.h"
#include "d/lyt/d_lyt_shop.h"
#include "toBeSorted/event_manager.h"
#include "toBeSorted/misc_actor.h"
// Pulling these functions out into a separate file to avoid circular dependencies
inline bool EventManagerNotDrawControl0x80() {
return EventManager::isInEvent() && (dBase_c::s_DrawControlFlags & 0x80) == 0;
}
inline bool EventManagerNotSkyKeepPuzzle() {
return EventManager::isInEvent() && !checkIsInSkykeepPuzzle();
}
inline bool EventManagerNotInShop() {
return EventManager::isInEvent() && dLytShop_c::GetInstance() == nullptr;
}
inline bool EventManagerNotInDeposit() {
return EventManager::isInEvent() && dLytDeposit_c::GetInstance() == nullptr;
}
inline bool EventManagerIsInMap() {
return EventManager::isInEvent() && dLytMap_c::GetInstance() != nullptr;
}
inline bool EventManagerIsMapOpen() {
return EventManagerIsInMap() && dLytMap_c::GetInstance()->isOpenMaybe();
}
inline bool EventManagerIsMapOpenAndMessage() {
return EventManagerIsMapOpen() && !dMessage_c::getInstance()->getField_0x328();
}
inline bool EventManagerIsMapOpenAnd0x9008Eq10() {
return EventManagerIsMapOpen() && dLytMap_c::GetInstance()->isSomeMapFieldEq10();
}
#endif