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