mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 00:02:45 +03:00
feat(component): partially implement CCharacterComponent::RenderPrepSections
This commit is contained in:
parent
66d3579173
commit
23fb30c2fd
@ -2,11 +2,17 @@
|
||||
#include "model/CM2Model.hpp"
|
||||
#include <storm/Memory.hpp>
|
||||
|
||||
int32_t s_bInRenderPrep = 0;
|
||||
|
||||
CCharacterComponent* CCharacterComponent::AllocComponent() {
|
||||
// TODO ObjectAlloc
|
||||
return STORM_NEW(CCharacterComponent);
|
||||
}
|
||||
|
||||
void CCharacterComponent::CreateBaseTexture() {
|
||||
// TODO
|
||||
}
|
||||
|
||||
void CCharacterComponent::GeosRenderPrep() {
|
||||
// TODO
|
||||
|
||||
@ -44,6 +50,10 @@ int32_t CCharacterComponent::ItemsLoaded(int32_t a2) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
void CCharacterComponent::PrepSections() {
|
||||
// TODO
|
||||
}
|
||||
|
||||
int32_t CCharacterComponent::RenderPrep(int32_t a2) {
|
||||
if (this->m_data.flags & 0x1) {
|
||||
if (this->m_flags & 0x4) {
|
||||
@ -73,7 +83,23 @@ int32_t CCharacterComponent::RenderPrep(int32_t a2) {
|
||||
}
|
||||
|
||||
void CCharacterComponent::RenderPrepSections() {
|
||||
s_bInRenderPrep = 1;
|
||||
|
||||
if (this->m_flags & 0x4) {
|
||||
this->GeosRenderPrep();
|
||||
}
|
||||
|
||||
if (!this->m_baseTexture) {
|
||||
this->CreateBaseTexture();
|
||||
}
|
||||
|
||||
this->PrepSections();
|
||||
|
||||
this->m_flags &= ~0x1;
|
||||
|
||||
// TODO
|
||||
|
||||
s_bInRenderPrep = 0;
|
||||
}
|
||||
|
||||
int32_t CCharacterComponent::VariationsLoaded(int32_t a2) {
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
#define COMPONENT_C_CHARACTER_COMPONENT_HPP
|
||||
|
||||
#include "component/Types.hpp"
|
||||
#include "gx/Texture.hpp"
|
||||
#include <cstdint>
|
||||
|
||||
class CM2Model;
|
||||
@ -50,11 +51,14 @@ class CCharacterComponent {
|
||||
// Member variables
|
||||
uint32_t m_flags = 0x1 | 0x2 | 0x4;
|
||||
ComponentData m_data;
|
||||
HTEXTURE m_baseTexture = nullptr;
|
||||
|
||||
// Member functions
|
||||
void CreateBaseTexture();
|
||||
void GeosRenderPrep();
|
||||
void Init(ComponentData* data, const char* a3);
|
||||
int32_t ItemsLoaded(int32_t a2);
|
||||
void PrepSections();
|
||||
int32_t RenderPrep(int32_t a2);
|
||||
void RenderPrepSections();
|
||||
int32_t VariationsLoaded(int32_t a2);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user