feat(profile): more symbols

This commit is contained in:
phaneron 2025-04-15 20:44:29 -04:00
parent ea452811d6
commit 0d8380a6a5
19 changed files with 355 additions and 101 deletions

View file

@ -12,9 +12,14 @@
// TSingletonInstanceId<T>
#define COMMON_INSTANCE_ID(T) \
STORM_TS_LIST(T); \
typedef struct TInstanceId_##T##__v_table TInstanceId_##T##__v_table; \
typedef struct TInstanceId_##T TInstanceId_##T; \
typedef struct TSingletonInstanceId_##T TSingletonInstanceId_##T; \
struct TInstanceId_##T##__v_table { \
void* v_fn_00_scalar_deleting_destructor; \
}; \
struct TInstanceId_##T { \
TInstanceId_##T##__v_table* v_table; \
TSLinkedNode_##T b_base; \
uint32_t m_id; \
}; \

View file

@ -15,6 +15,7 @@
DECLARE_ENUM(SCHEDSTATE);
DECLARE_STRUCT(EvtContext);
DECLARE_STRUCT(EvtContextQueue);
DECLARE_STRUCT(EvtTimer);
DECLARE_HANDLE(HPROPCONTEXT);
DECLARE_HANDLE(HEVENTCONTEXT);
@ -32,7 +33,6 @@ COMMON_INSTANCE_ID(EvtContext);
// class EvtContext : public TSingletonInstanceId<EvtContext, offsetof(TInstanceId<EvtContext>, m_id)>
struct EvtContext {
TSingletonInstanceId_EvtContext b_base;
uint32_t unkA;
// Member variables
SCritSect m_critsect;
uint32_t m_currTime;
@ -45,11 +45,6 @@ struct EvtContext {
uint32_t m_schedWeight;
uint32_t m_schedSmoothWeight;
int32_t m_schedRebalance;
int32_t unkXX;
int32_t unkXY;
int32_t unkXZ;
int32_t unkYY;
int32_t unkYZ;
// TSExplicitList<EvtHandler, offsetof(EvtHandler, link)> m_queueHandlerList[EVENTIDS];
TSExplicitList_EvtHandler m_queueHandlerList[36];
// TSExplicitList<EvtMessage, offsetof(EvtMessage, link)> m_queueMessageList;
@ -60,8 +55,17 @@ struct EvtContext {
EvtIdTable_pointer_to_EvtTimer m_timerIdTable;
EvtTimerQueue m_timerQueue;
HPROPCONTEXT m_propContext;
int32_t unk264;
int32_t unk268;
int32_t unk26C;
void* m_callContext;
uint32_t m_startWatchdog;
};
STORM_TS_PRIORITY_QUEUE(EvtContext);
// class EvtContextQueue : public TSPriorityQueue<EvtContext>
struct EvtContextQueue {
TSPriorityQueue_EvtContext b_base;
};
#endif

View file

@ -0,0 +1,25 @@
#ifndef EVENT_THREAD_H
#define EVENT_THREAD_H
DECLARE_STRUCT(EvtThread);
#include "storm/thread.h"
#include "storm/list.h"
#include "storm/queue.h"
STORM_TS_LIST(EvtThread);
// class EvtThread : public TSLinkedNode<EvtThread>
struct EvtThread {
TSLinkedNode_EvtThread b_base;
uint32_t m_threadSlot;
uint32_t m_threadCount;
uint32_t m_weightTotal;
uint32_t m_weightAvg;
uint32_t m_contextCount;
uint32_t m_rebalance;
SEvent m_wakeEvent;
EvtContextQueue m_contextQueue;
};
#endif

View file

@ -44,6 +44,7 @@
#include "event/keydown.h"
#include "event/message.h"
#include "event/timer.h"
#include "event/thread.h"
#include "framescript/object.h"
#include "framescript/event_object.h"

View file

@ -21,11 +21,15 @@ struct CSBasePriority {
#define STORM_TS_TIMER_PRIORITY(T) \
typedef struct TSTimerPriority_##T TSTimerPriority_##T; \
struct TSTimerPriority_##T { \
void** v_table; \
CSBasePriority b_base; \
T m_val; \
}
#define STORM_TS_PRIORITY_QUEUE(T) \
typedef CSBasePriorityQueue TSPriorityQueue_##T
typedef struct TSPriorityQueue_##T TSPriorityQueue_##T; \
struct TSPriorityQueue_##T { \
CSBasePriority b_base; \
}
#endif

View file

@ -11,7 +11,7 @@ DECLARE_STRUCT(SThread);
typedef struct CSRWLock CSRWLock;
struct SCritSect {
uint8_t m_critsect[24];
uint8_t m_critsect[40];
};
struct CSRWLock {