mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2026-01-30 19:42:51 +03:00
chore(glue): add skeleton of CCharacterComponent class
This commit is contained in:
parent
f0200c7c08
commit
d76e6142b7
2
lib/bc
2
lib/bc
@ -1 +1 @@
|
|||||||
Subproject commit 4e116bd69a5d0d0c979ef43cf86cbb8181cc19c1
|
Subproject commit 367b8149f36a1e4c2aad066e0cf9cd1e07ae7d88
|
||||||
@ -1 +1 @@
|
|||||||
Subproject commit 0401d901376995c7a209125b8cb12f1ceaa46fb7
|
Subproject commit 9a3b3aeafd7e48194d0a5a3fbe459b965f5d12fa
|
||||||
@ -1 +1 @@
|
|||||||
Subproject commit ce9c709029f92dc5b0bed2d3739c5013e4b6b903
|
Subproject commit af834cafa755de27a87b3400adb89b205e567166
|
||||||
@ -1 +1 @@
|
|||||||
Subproject commit 0c3ceb876666f7b84dc8d4918eadbbc8e380cd5b
|
Subproject commit 328613d0e8ebc0ed46af63a1248d213be4fbf601
|
||||||
@ -471,7 +471,7 @@ int32_t InitializeGlobal() {
|
|||||||
// );
|
// );
|
||||||
|
|
||||||
// sub_86D430(v8->m_intValue);
|
// sub_86D430(v8->m_intValue);
|
||||||
OsTimeStartup(SystemMethod2);
|
OsTimeStartup(Timing_QueryPerformanceCounter);
|
||||||
|
|
||||||
// ConsoleCommandRegister("timingInfo", (int)sub_4032A0, 0, 0);
|
// ConsoleCommandRegister("timingInfo", (int)sub_4032A0, 0, 0);
|
||||||
|
|
||||||
|
|||||||
1
src/glue/CCharacterComponent.cpp
Normal file
1
src/glue/CCharacterComponent.cpp
Normal file
@ -0,0 +1 @@
|
|||||||
|
#include "glue/CCharacterComponent.cpp"
|
||||||
17
src/glue/CCharacterComponent.hpp
Normal file
17
src/glue/CCharacterComponent.hpp
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#ifndef GLUE_C_CHARACTER_COMPONENT_HPP
|
||||||
|
#define GLUE_C_CHARACTER_COMPONENT_HPP
|
||||||
|
|
||||||
|
#include "net/Types.hpp"
|
||||||
|
#include <storm/Array.hpp>
|
||||||
|
|
||||||
|
class CSimpleModelFFX;
|
||||||
|
class CM2Model;
|
||||||
|
|
||||||
|
class CCharacterComponent {
|
||||||
|
public:
|
||||||
|
// Static variables
|
||||||
|
|
||||||
|
// Static functions
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // GLUE_C_CHARACTER_COMPONENT_HPP
|
||||||
8
src/glue/CCharacterCreation.cpp
Normal file
8
src/glue/CCharacterCreation.cpp
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#include "glue/CCharacterCreation.hpp"
|
||||||
|
|
||||||
|
float CCharacterCreation::m_charFacing = 0.0;
|
||||||
|
CharacterCreationDisplay CCharacterCreation::m_character = {};
|
||||||
|
|
||||||
|
void CCharacterCreation::Initialize() {
|
||||||
|
CCharacterCreation::m_charFacing = 0.0;
|
||||||
|
}
|
||||||
25
src/glue/CCharacterCreation.hpp
Normal file
25
src/glue/CCharacterCreation.hpp
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
#ifndef GLUE_C_CHARACTER_CREATION_HPP
|
||||||
|
#define GLUE_C_CHARACTER_CREATION_HPP
|
||||||
|
|
||||||
|
#include "net/Types.hpp"
|
||||||
|
#include <storm/Array.hpp>
|
||||||
|
|
||||||
|
class CSimpleModelFFX;
|
||||||
|
class CM2Model;
|
||||||
|
|
||||||
|
struct CharacterCreationDisplay {
|
||||||
|
CHARACTER_CREATE_INFO m_characterInfo;
|
||||||
|
CM2Model* m_characterModel;
|
||||||
|
};
|
||||||
|
|
||||||
|
class CCharacterCreation {
|
||||||
|
public:
|
||||||
|
// Static variables
|
||||||
|
static float m_charFacing;
|
||||||
|
static CharacterCreationDisplay m_character;
|
||||||
|
|
||||||
|
// Static functions
|
||||||
|
static void Initialize();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // GLUE_C_CHARACTER_CREATION_HPP
|
||||||
@ -31,6 +31,10 @@ CharacterSelectionDisplay::CharacterSelectionDisplay()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void CCharacterSelection::Initialize() {
|
||||||
|
// Empty method
|
||||||
|
}
|
||||||
|
|
||||||
void CCharacterSelection::RenderPrep() {
|
void CCharacterSelection::RenderPrep() {
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,6 +34,7 @@ class CCharacterSelection {
|
|||||||
static int32_t m_selectionIndex;
|
static int32_t m_selectionIndex;
|
||||||
|
|
||||||
// Static functions
|
// Static functions
|
||||||
|
static void Initialize();
|
||||||
static void RenderPrep();
|
static void RenderPrep();
|
||||||
static void SetBackgroundModel(const char* modelPath);
|
static void SetBackgroundModel(const char* modelPath);
|
||||||
static void EnumerateCharactersCallback(CHARACTER_INFO& info, void* param);
|
static void EnumerateCharactersCallback(CHARACTER_INFO& info, void* param);
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
#include "glue/CGlueMgr.hpp"
|
#include "glue/CGlueMgr.hpp"
|
||||||
#include "glue/CRealmList.hpp"
|
#include "glue/CRealmList.hpp"
|
||||||
#include "glue/CCharacterSelection.hpp"
|
#include "glue/CCharacterSelection.hpp"
|
||||||
|
#include "glue/CCharacterCreation.hpp"
|
||||||
#include "console/Console.hpp"
|
#include "console/Console.hpp"
|
||||||
#include "client/Client.hpp"
|
#include "client/Client.hpp"
|
||||||
#include "client/ClientServices.hpp"
|
#include "client/ClientServices.hpp"
|
||||||
@ -868,6 +869,9 @@ void CGlueMgr::Resume() {
|
|||||||
|
|
||||||
OsCreateDirectory("Logs", 0);
|
OsCreateDirectory("Logs", 0);
|
||||||
|
|
||||||
|
CCharacterSelection::Initialize();
|
||||||
|
CCharacterCreation::Initialize();
|
||||||
|
|
||||||
CWOWClientStatus status;
|
CWOWClientStatus status;
|
||||||
|
|
||||||
if (!SLogCreate("Logs\\GlueXML.log", 0, &status.m_logFile)) {
|
if (!SLogCreate("Logs\\GlueXML.log", 0, &status.m_logFile)) {
|
||||||
|
|||||||
@ -1286,6 +1286,12 @@ struct CHARACTER_INFO {
|
|||||||
uint8_t firstLogin;
|
uint8_t firstLogin;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct CHARACTER_CREATE_INFO {
|
||||||
|
uint8_t unk[24];
|
||||||
|
uint32_t raceID;
|
||||||
|
uint32_t sexID;
|
||||||
|
};
|
||||||
|
|
||||||
struct CLIENT_NETSTATS {
|
struct CLIENT_NETSTATS {
|
||||||
uint32_t bytesSent;
|
uint32_t bytesSent;
|
||||||
uint32_t messagesSent;
|
uint32_t messagesSent;
|
||||||
|
|||||||
@ -2,6 +2,9 @@
|
|||||||
#include "ui/Types.hpp"
|
#include "ui/Types.hpp"
|
||||||
#include "util/Lua.hpp"
|
#include "util/Lua.hpp"
|
||||||
#include "util/Unimplemented.hpp"
|
#include "util/Unimplemented.hpp"
|
||||||
|
#include "db/Db.hpp"
|
||||||
|
#include "clientobject/Unit_C.hpp"
|
||||||
|
#include "glue/CCharacterCreation.hpp"
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
int32_t Script_SetCharCustomizeFrame(lua_State* L) {
|
int32_t Script_SetCharCustomizeFrame(lua_State* L) {
|
||||||
@ -17,7 +20,19 @@ int32_t Script_ResetCharCustomize(lua_State* L) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t Script_GetNameForRace(lua_State* L) {
|
int32_t Script_GetNameForRace(lua_State* L) {
|
||||||
WHOA_UNIMPLEMENTED(0);
|
auto raceID = CCharacterCreation::m_character.m_characterInfo.raceID;
|
||||||
|
auto sexID = CCharacterCreation::m_character.m_characterInfo.sexID;
|
||||||
|
auto record = g_chrRacesDB.GetRecord(raceID);
|
||||||
|
auto raceName = CGUnit_C::GetDisplayRaceNameFromRecord(record, sexID);
|
||||||
|
if (record && raceName) {
|
||||||
|
lua_pushstring(L, raceName);
|
||||||
|
lua_pushstring(L, record->m_clientFileString);
|
||||||
|
} else {
|
||||||
|
lua_pushnil(L);
|
||||||
|
lua_pushnil(L);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t Script_GetFactionForRace(lua_State* L) {
|
int32_t Script_GetFactionForRace(lua_State* L) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user