mirror of
https://github.com/whoahq/whoa.git
synced 2026-11-27 08:13:50 +03:00
chore(build): split out component lib
This commit is contained in:
6 files changed
+24
-4
No files matched your search
@@ -1,44 +0,0 @@
|
||||
#include "glue/CCharacterComponent.hpp"
|
||||
#include "model/CM2Model.hpp"
|
||||
#include <storm/Memory.hpp>
|
||||
|
||||
CCharacterComponent* CCharacterComponent::AllocComponent() {
|
||||
// TODO ObjectAlloc
|
||||
return STORM_NEW(CCharacterComponent);
|
||||
}
|
||||
|
||||
void CCharacterComponent::GeosRenderPrep() {
|
||||
// TODO
|
||||
|
||||
// Default all sections (0 - 2000) to hidden
|
||||
this->m_data.model->SetGeometryVisible(0, 2000, 0);
|
||||
|
||||
// Show base "skin" section (0)
|
||||
this->m_data.model->SetGeometryVisible(0, 0, 1);
|
||||
|
||||
// TODO
|
||||
|
||||
this->m_flags &= ~0x4;
|
||||
}
|
||||
|
||||
void CCharacterComponent::Init(ComponentData* data, const char* a3) {
|
||||
if (data->model) {
|
||||
data->model->Release();
|
||||
}
|
||||
|
||||
this->m_data = *data;
|
||||
|
||||
// TODO
|
||||
}
|
||||
|
||||
void CCharacterComponent::RenderPrep(int32_t a2) {
|
||||
if (this->m_data.flags & 0x1) {
|
||||
if (this->m_flags & 0x4) {
|
||||
this->GeosRenderPrep();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
#ifndef GLUE_C_CHARACTER_COMPONENT_HPP
|
||||
#define GLUE_C_CHARACTER_COMPONENT_HPP
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
class CM2Model;
|
||||
|
||||
struct ComponentData {
|
||||
int32_t raceID = 0;
|
||||
int32_t sexID = 0;
|
||||
int32_t classID = 0;
|
||||
int32_t hairColorID = 0;
|
||||
int32_t skinID = 0;
|
||||
int32_t faceID = 0;
|
||||
int32_t facialHairStyleID = 0;
|
||||
int32_t hairStyleID = 0;
|
||||
CM2Model* model = nullptr;
|
||||
uint32_t flags = 0x0;
|
||||
uint8_t byte28 = 0;
|
||||
};
|
||||
|
||||
class CCharacterComponent {
|
||||
public:
|
||||
// Static functions
|
||||
static CCharacterComponent* AllocComponent();
|
||||
|
||||
// Member variables
|
||||
uint32_t m_flags = 0x1 | 0x2 | 0x4;
|
||||
ComponentData m_data;
|
||||
|
||||
// Member functions
|
||||
void GeosRenderPrep();
|
||||
void Init(ComponentData* data, const char* a3);
|
||||
void RenderPrep(int32_t a2);
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "glue/CCharacterSelection.hpp"
|
||||
#include "client/ClientServices.hpp"
|
||||
#include "component/CCharacterComponent.hpp"
|
||||
#include "db/Db.hpp"
|
||||
#include "glue/CCharacterComponent.hpp"
|
||||
#include "glue/CGlueMgr.hpp"
|
||||
#include "glue/CRealmList.hpp"
|
||||
#include "glue/Types.hpp"
|
||||
|
||||
@@ -12,6 +12,7 @@ target_include_directories(glue
|
||||
target_link_libraries(glue
|
||||
PRIVATE
|
||||
client
|
||||
component
|
||||
console
|
||||
db
|
||||
event
|
||||
|
||||
Reference in new issue
Block a user