Neutral identifiers; check the Adventure TU's inline virtuals
Rename identifiers that came from third-party offset headers to neutral names (only CDisplay and StringTable are proven by the binary's own strings). Annotate the four in-class virtual bodies (0x401430-0x401450); all match. Totals: 25 MATCH, 1 NONMATCHING. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
29c59bd31e
commit
0445661954
3 files changed
+52
-48
No files matched your search
@@ -3,7 +3,7 @@
|
||||
// Game-side actor (model instance) interface. Only slots seen in matched code are named;
|
||||
// vf_N placeholders keep the vtable offsets right (slot N = offset N*4).
|
||||
|
||||
class CActorInterface {
|
||||
class CActor {
|
||||
public:
|
||||
virtual void vf_000();
|
||||
virtual void vf_001();
|
||||
+44
-40
@@ -10,12 +10,12 @@ void __cdecl FormatString(char* out, int id, const char* a1, const char* a2, con
|
||||
const char* a4, const char* a5, const char* a6, const char* a7,
|
||||
const char* a8, const char* a9);
|
||||
|
||||
class CXStr {
|
||||
class EQString {
|
||||
public:
|
||||
CXStr() : m_p(0) {}
|
||||
~CXStr();
|
||||
// FUNCTION: EQGAME 0x00571f70 ??4CXStr@@QAEAAV0@PBD@Z
|
||||
CXStr& operator=(const char* s);
|
||||
EQString() : m_p(0) {}
|
||||
~EQString();
|
||||
// FUNCTION: EQGAME 0x00571f70 ??4EQString@@QAEAAV0@PBD@Z
|
||||
EQString& operator=(const char* s);
|
||||
|
||||
void* m_p;
|
||||
};
|
||||
@@ -23,22 +23,22 @@ public:
|
||||
class StringTable {
|
||||
public:
|
||||
// FUNCTION: EQGAME 0x005dfa00
|
||||
const char* getString(int id, bool* found);
|
||||
const char* GetString(int id, bool* found);
|
||||
};
|
||||
|
||||
class CEverQuest {
|
||||
class CGameClient {
|
||||
public:
|
||||
// FUNCTION: EQGAME 0x004982c6
|
||||
void dsp_chat(const char* text, int color, bool log);
|
||||
void DisplayChat(const char* text, int color, bool log);
|
||||
};
|
||||
|
||||
class CTipWnd {
|
||||
class CWnd_9928e0 {
|
||||
public:
|
||||
// FUNCTION: EQGAME 0x00564e7e
|
||||
void Unk_564e7e(int a, int b);
|
||||
};
|
||||
|
||||
class EQ_Item {
|
||||
class CItem {
|
||||
public:
|
||||
// FUNCTION: EQGAME 0x005e0fc0
|
||||
int Unk_5e0fc0();
|
||||
@@ -49,7 +49,7 @@ struct LdonThemePoints {
|
||||
int unk[4];
|
||||
};
|
||||
|
||||
struct CharData {
|
||||
struct PlayerData {
|
||||
char pad0000[0x103c];
|
||||
unsigned int adventurePoints; // 0x103c
|
||||
char pad1040[0x1058 - 0x1040];
|
||||
@@ -57,20 +57,20 @@ struct CharData {
|
||||
};
|
||||
|
||||
// GLOBAL: EQGAME 0x00905d00
|
||||
extern CharData* pinstCharData;
|
||||
extern PlayerData* g_pPlayerData;
|
||||
// GLOBAL: EQGAME 0x00905cb0
|
||||
extern StringTable* pinstStringTable;
|
||||
extern StringTable* g_pStringTable;
|
||||
// GLOBAL: EQGAME 0x00988df0
|
||||
extern CEverQuest* pinstCEverQuest;
|
||||
extern CGameClient* g_pGameClient;
|
||||
// GLOBAL: EQGAME 0x009928e0
|
||||
extern CTipWnd* pinstCTipWndCONTEXT;
|
||||
extern CWnd_9928e0* g_pWnd_9928e0;
|
||||
|
||||
struct CAdventureEntry {
|
||||
CAdventureEntry(const char* name, int value);
|
||||
|
||||
bool m_bValid;
|
||||
int m_4;
|
||||
CXStr m_name;
|
||||
EQString m_name;
|
||||
int m_value;
|
||||
int m_value2;
|
||||
int m_index;
|
||||
@@ -99,14 +99,18 @@ public:
|
||||
virtual const char* GetThemeName(int theme, bool shortName) = 0; // 0x14
|
||||
virtual int GetConfirmStringId(int quantity, int cost) = 0; // 0x18
|
||||
virtual int GetResultStringId(int count, bool a, bool b) = 0; // 0x1c
|
||||
// FUNCTION: EQGAME 0x0040143a
|
||||
virtual int GetType() = 0; // 0x20
|
||||
// FUNCTION: EQGAME 0x00401430
|
||||
virtual void SetLastPoints(unsigned int points) = 0; // 0x24
|
||||
// FUNCTION: EQGAME 0x0040143e
|
||||
virtual void AddPoints(int points) = 0; // 0x28
|
||||
virtual unsigned int GetLastPoints(); // 0x2c (0x004c5edf)
|
||||
virtual bool vf30(); // 0x30 (0x004b11e7)
|
||||
virtual int GetSellPrice(EQ_Item* item, int quantity) = 0; // 0x34
|
||||
virtual int GetSellPrice(CItem* item, int quantity) = 0; // 0x34
|
||||
virtual bool vf38(); // 0x38 (0x00495a87)
|
||||
virtual int vf3c(); // 0x3c (0x004250f0)
|
||||
// FUNCTION: EQGAME 0x00401450
|
||||
virtual const char* GetCurrencyName() = 0; // 0x40
|
||||
virtual bool vf44(); // 0x44 (0x00495a87)
|
||||
virtual int vf48(); // 0x48 (0x0056f736)
|
||||
@@ -128,9 +132,9 @@ public:
|
||||
virtual int GetResultStringId(int count, bool a, bool b);
|
||||
virtual int GetType() { return 6; }
|
||||
virtual void SetLastPoints(unsigned int points) { m_lastPoints = points; }
|
||||
virtual void AddPoints(int points) { pinstCharData->adventurePoints += points; }
|
||||
virtual int GetSellPrice(EQ_Item* item, int quantity);
|
||||
virtual const char* GetCurrencyName() { return pinstStringTable->getString(0x1734, 0); }
|
||||
virtual void AddPoints(int points) { g_pPlayerData->adventurePoints += points; }
|
||||
virtual int GetSellPrice(CItem* item, int quantity);
|
||||
virtual const char* GetCurrencyName() { return g_pStringTable->GetString(0x1734, 0); }
|
||||
|
||||
int m_8;
|
||||
const char* m_themeNames[6];
|
||||
@@ -149,26 +153,26 @@ void CAdventureCurrency::ShowSpent()
|
||||
{
|
||||
char msg[128];
|
||||
char num[12];
|
||||
if (m_lastPoints > pinstCharData->adventurePoints) {
|
||||
unsigned int spent = m_lastPoints - pinstCharData->adventurePoints;
|
||||
if (m_lastPoints > g_pPlayerData->adventurePoints) {
|
||||
unsigned int spent = m_lastPoints - g_pPlayerData->adventurePoints;
|
||||
sprintf(num, "%d", spent);
|
||||
FormatString(msg, spent != 1 ? 8544 : 8543, num, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
pinstCEverQuest->dsp_chat(msg, 0x114, true);
|
||||
g_pGameClient->DisplayChat(msg, 0x114, true);
|
||||
}
|
||||
m_lastPoints = pinstCharData->adventurePoints;
|
||||
m_lastPoints = g_pPlayerData->adventurePoints;
|
||||
}
|
||||
|
||||
// FUNCTION: EQGAME 0x004014fc
|
||||
void CAdventureCurrency::Refresh()
|
||||
{
|
||||
if (pinstCTipWndCONTEXT)
|
||||
pinstCTipWndCONTEXT->Unk_564e7e(0x25, 0);
|
||||
if (g_pWnd_9928e0)
|
||||
g_pWnd_9928e0->Unk_564e7e(0x25, 0);
|
||||
}
|
||||
|
||||
// FUNCTION: EQGAME 0x00401510
|
||||
int CAdventureCurrency::GetThemePoints(int theme)
|
||||
{
|
||||
return pinstCharData->themePoints[theme].points;
|
||||
return g_pPlayerData->themePoints[theme].points;
|
||||
}
|
||||
|
||||
// FUNCTION: EQGAME 0x00401527
|
||||
@@ -193,18 +197,18 @@ int CAdventureCurrency::GetResultStringId(int count, bool a, bool b)
|
||||
// FUNCTION: EQGAME 0x0040158e
|
||||
void CAdventureCurrency::LoadStrings()
|
||||
{
|
||||
m_themeNames[0] = pinstStringTable->getString(0x2155, 0);
|
||||
m_themeNames[1] = pinstStringTable->getString(0x2156, 0);
|
||||
m_themeNames[2] = pinstStringTable->getString(0x2157, 0);
|
||||
m_themeNames[3] = pinstStringTable->getString(0x2158, 0);
|
||||
m_themeNames[4] = pinstStringTable->getString(0x2159, 0);
|
||||
m_themeNames[5] = pinstStringTable->getString(0x215a, 0);
|
||||
m_themeShortNames[0] = pinstStringTable->getString(0x2149, 0);
|
||||
m_themeShortNames[1] = pinstStringTable->getString(0x214a, 0);
|
||||
m_themeShortNames[2] = pinstStringTable->getString(0x214b, 0);
|
||||
m_themeShortNames[3] = pinstStringTable->getString(0x214c, 0);
|
||||
m_themeShortNames[4] = pinstStringTable->getString(0x214d, 0);
|
||||
m_themeShortNames[5] = pinstStringTable->getString(0x214e, 0);
|
||||
m_themeNames[0] = g_pStringTable->GetString(0x2155, 0);
|
||||
m_themeNames[1] = g_pStringTable->GetString(0x2156, 0);
|
||||
m_themeNames[2] = g_pStringTable->GetString(0x2157, 0);
|
||||
m_themeNames[3] = g_pStringTable->GetString(0x2158, 0);
|
||||
m_themeNames[4] = g_pStringTable->GetString(0x2159, 0);
|
||||
m_themeNames[5] = g_pStringTable->GetString(0x215a, 0);
|
||||
m_themeShortNames[0] = g_pStringTable->GetString(0x2149, 0);
|
||||
m_themeShortNames[1] = g_pStringTable->GetString(0x214a, 0);
|
||||
m_themeShortNames[2] = g_pStringTable->GetString(0x214b, 0);
|
||||
m_themeShortNames[3] = g_pStringTable->GetString(0x214c, 0);
|
||||
m_themeShortNames[4] = g_pStringTable->GetString(0x214d, 0);
|
||||
m_themeShortNames[5] = g_pStringTable->GetString(0x214e, 0);
|
||||
}
|
||||
|
||||
// FUNCTION: EQGAME 0x00401687
|
||||
@@ -218,7 +222,7 @@ const char* CAdventureCurrency::GetThemeName(int theme, bool shortName)
|
||||
}
|
||||
|
||||
// FUNCTION: EQGAME 0x004016aa
|
||||
int CAdventureCurrency::GetSellPrice(EQ_Item* item, int quantity)
|
||||
int CAdventureCurrency::GetSellPrice(CItem* item, int quantity)
|
||||
{
|
||||
return (item->Unk_5e0fc0() + 1) * 70 / 100 * quantity;
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
// Spell casting particle points: while a spell is being cast, effects are attached to the
|
||||
// caster's hand/chest/foot points and faded out. Lives at the very start of .text.
|
||||
|
||||
#include "eqgame/CActorInterface.h"
|
||||
#include "eqgame/CActor.h"
|
||||
|
||||
// FUNCTION: EQGAME 0x0046d655
|
||||
unsigned int GetGameTime();
|
||||
@@ -22,12 +22,12 @@ struct CList {
|
||||
};
|
||||
|
||||
struct CSpellPointEffect : CListNode {
|
||||
CSpellPointEffect(CActorInterface* actor);
|
||||
CSpellPointEffect(CActor* actor);
|
||||
void Reset();
|
||||
void Release();
|
||||
void Update(unsigned int now);
|
||||
|
||||
CActorInterface* m_pActor;
|
||||
CActor* m_pActor;
|
||||
unsigned int m_startTime;
|
||||
unsigned int m_lastTime;
|
||||
};
|
||||
@@ -37,7 +37,7 @@ struct CSpellPointManager {
|
||||
void RemoveFree(CSpellPointEffect* effect);
|
||||
void Process();
|
||||
void Clear();
|
||||
void Add(CActorInterface* actor);
|
||||
void Add(CActor* actor);
|
||||
|
||||
CList m_active;
|
||||
CList m_free;
|
||||
@@ -46,7 +46,7 @@ struct CSpellPointManager {
|
||||
class CDisplay {
|
||||
public:
|
||||
// FUNCTION: EQGAME 0x00439a46
|
||||
void ReleaseActor(CActorInterface* actor);
|
||||
void ReleaseActor(CActor* actor);
|
||||
};
|
||||
|
||||
// GLOBAL: EQGAME 0x00905d24
|
||||
@@ -212,7 +212,7 @@ void CSpellPointManager::Clear()
|
||||
}
|
||||
|
||||
// FUNCTION: EQGAME 0x00401335
|
||||
CSpellPointEffect::CSpellPointEffect(CActorInterface* actor)
|
||||
CSpellPointEffect::CSpellPointEffect(CActor* actor)
|
||||
{
|
||||
next = 0;
|
||||
prev = 0;
|
||||
@@ -221,7 +221,7 @@ CSpellPointEffect::CSpellPointEffect(CActorInterface* actor)
|
||||
}
|
||||
|
||||
// FUNCTION: EQGAME 0x00401351
|
||||
void CSpellPointManager::Add(CActorInterface* actor)
|
||||
void CSpellPointManager::Add(CActor* actor)
|
||||
{
|
||||
CSpellPointEffect* effect = (CSpellPointEffect*)m_free.head;
|
||||
actor->SetUnk0C(0);
|
||||
|
||||
Reference in new issue
Block a user