Minor fixes, get PRESS START rendering

This commit is contained in:
Phillip Stephens 2022-02-05 07:22:30 -08:00
parent 18cb40268a
commit 06a1c6e8ac
Signed by: Antidote
GPG Key ID: F8BEE4C83DACA60D
6 changed files with 26 additions and 12 deletions

View File

@ -39,7 +39,7 @@ void CObjectReference::Lock() {
} }
void CObjectReference::CancelLoad() { void CObjectReference::CancelLoad() {
if (xC_objectStore && IsLoading()) { if ((xC_objectStore != nullptr) && IsLoading()) {
xC_objectStore->GetFactory().CancelBuild(x4_objTag); xC_objectStore->GetFactory().CancelBuild(x4_objTag);
x3_loading = false; x3_loading = false;
} }

View File

@ -189,8 +189,8 @@ void CModel::DisableTextureTimeout() { sIsTextureTimeoutEnabled = false; }
#pragma region CCubeModel #pragma region CCubeModel
CCubeModel::CCubeModel(const std::vector<std::unique_ptr<CCubeSurface>>* surfaces, CCubeModel::CCubeModel(std::vector<std::unique_ptr<CCubeSurface>>* surfaces,
const std::vector<TCachedToken<CTexture>>* textures, const u8* materialData, std::vector<TCachedToken<CTexture>>* textures, const u8* materialData,
const std::vector<zeus::CVector3f>* positions, const std::vector<zeus::CColor>* colors, const std::vector<zeus::CVector3f>* positions, const std::vector<zeus::CColor>* colors,
const std::vector<zeus::CVector3f>* normals, const std::vector<zeus::CVector2f>* texCoords, const std::vector<zeus::CVector3f>* normals, const std::vector<zeus::CVector2f>* texCoords,
const std::vector<std::array<s16, 2>>* packedTexCoords, const zeus::CAABox& aabox, u8 flags, const std::vector<std::array<s16, 2>>* packedTexCoords, const zeus::CAABox& aabox, u8 flags,
@ -229,7 +229,11 @@ CCubeMaterial CCubeModel::GetMaterialByIndex(u32 idx) {
return CCubeMaterial(matData + materialOffset + (materialCount * 4) + 4); return CCubeMaterial(matData + materialOffset + (materialCount * 4) + 4);
} }
void CCubeModel::UnlockTextures() {} void CCubeModel::UnlockTextures() {
for (TCachedToken<CTexture>& tex : *x1c_textures) {
tex.Unlock();
}
}
void CCubeModel::MakeTexturesFromMats(const u8* ptr, std::vector<TCachedToken<CTexture>>& textures, IObjectStore* store, void CCubeModel::MakeTexturesFromMats(const u8* ptr, std::vector<TCachedToken<CTexture>>& textures, IObjectStore* store,
bool b1) { bool b1) {

View File

@ -77,7 +77,7 @@ private:
const std::vector<std::array<s16, 2>>* x18_packedTexCoords; // was a pointer to void const std::vector<std::array<s16, 2>>* x18_packedTexCoords; // was a pointer to void
public: public:
ModelInstance(const std::vector<std::unique_ptr<CCubeSurface>>* surfaces, const u8* material, ModelInstance(std::vector<std::unique_ptr<CCubeSurface>>* surfaces, const u8* material,
const std::vector<zeus::CVector3f>* positions, const std::vector<zeus::CColor>* colors, const std::vector<zeus::CVector3f>* positions, const std::vector<zeus::CColor>* colors,
const std::vector<zeus::CVector3f>* normals, const std::vector<zeus::CVector2f>* texCoords, const std::vector<zeus::CVector3f>* normals, const std::vector<zeus::CVector2f>* texCoords,
const std::vector<std::array<s16, 2>>* packedTexCoords) const std::vector<std::array<s16, 2>>* packedTexCoords)
@ -103,7 +103,7 @@ private:
}; };
ModelInstance x0_modelInstance; ModelInstance x0_modelInstance;
const std::vector<TCachedToken<CTexture>>* x1c_textures; std::vector<TCachedToken<CTexture>>* x1c_textures;
zeus::CAABox x20_worldAABB; zeus::CAABox x20_worldAABB;
CCubeSurface* x38_firstUnsortedSurf = nullptr; CCubeSurface* x38_firstUnsortedSurf = nullptr;
CCubeSurface* x3c_firstSortedSurf = nullptr; CCubeSurface* x3c_firstSortedSurf = nullptr;
@ -112,8 +112,8 @@ private:
u32 x44_idx; u32 x44_idx;
public: public:
CCubeModel(const std::vector<std::unique_ptr<CCubeSurface>>* surfaces, CCubeModel(std::vector<std::unique_ptr<CCubeSurface>>* surfaces,
const std::vector<TCachedToken<CTexture>>* textures, const u8* materialData, std::vector<TCachedToken<CTexture>>* textures, const u8* materialData,
const std::vector<zeus::CVector3f>* positions, const std::vector<zeus::CColor>* colors, const std::vector<zeus::CVector3f>* positions, const std::vector<zeus::CColor>* colors,
const std::vector<zeus::CVector3f>* normals, const std::vector<zeus::CVector2f>* texCoords, const std::vector<zeus::CVector3f>* normals, const std::vector<zeus::CVector2f>* texCoords,
const std::vector<std::array<s16, 2>>* packedTexCoords, const zeus::CAABox& aabox, u8 flags, bool b1, const std::vector<std::array<s16, 2>>* packedTexCoords, const zeus::CAABox& aabox, u8 flags, bool b1,

View File

@ -23,11 +23,12 @@ bool CGuiModel::GetIsFinishedLoadingWidgetSpecific() {
if (!xb8_model.IsLoaded()) { if (!xb8_model.IsLoaded()) {
return false; return false;
} }
xb8_model->GetInstance().Touch(0); //xb8_model->GetInstance().Touch(0);
return xb8_model->IsLoaded(0); return true; //xb8_model->IsLoaded(0);
} }
void CGuiModel::Touch() { void CGuiModel::Touch() {
return;
CModel* const model = xb8_model.GetObj(); CModel* const model = xb8_model.GetObj();
if (model == nullptr) { if (model == nullptr) {
@ -38,6 +39,7 @@ void CGuiModel::Touch() {
} }
void CGuiModel::Draw(const CGuiWidgetDrawParms& parms) { void CGuiModel::Draw(const CGuiWidgetDrawParms& parms) {
return;
CGraphics::SetModelMatrix(x34_worldXF); CGraphics::SetModelMatrix(x34_worldXF);
if (!xb8_model) { if (!xb8_model) {
return; return;

View File

@ -2046,7 +2046,15 @@ void CFrontEndUI::Draw() {
x38_pressStart->GetHeight() / 480.f * vPad); x38_pressStart->GetHeight() / 480.f * vPad);
zeus::CColor color = zeus::skWhite; zeus::CColor color = zeus::skWhite;
color.a() = x64_pressStartAlpha; color.a() = x64_pressStartAlpha;
m_pressStartQuad->draw(color, 1.f, rect); aurora::shaders::queue_textured_quad(
aurora::shaders::CameraFilterType::Blend,
x38_pressStart->GetTexture()->ref,
aurora::shaders::ZTest::None,
color,
1.f,
rect,
0.f
);
} }
if (xc0_attractCount > 0) { if (xc0_attractCount > 0) {

View File

@ -69,7 +69,7 @@ private:
float x34_stopTime = 0.0f; float x34_stopTime = 0.0f;
float x38_textStartTime = 0.f; float x38_textStartTime = 0.f;
float x3c_sfxInterval = 0.0f; float x3c_sfxInterval = 0.0f;
bool x40_strIdx = false; u32 x40_strIdx = 0;
bool x44_24_transFinished : 1 = true; bool x44_24_transFinished : 1 = true;
bool x44_25_stopSoon : 1 = false; bool x44_25_stopSoon : 1 = false;
bool x44_26_goingUp : 1 = false; bool x44_26_goingUp : 1 = false;