Compilation fix for many files

Former-commit-id: 44e4110ffb
This commit is contained in:
Henrique Gemignani Passos Lima 2022-10-06 02:34:32 +03:00
parent 8c4c08865b
commit 94eb8324a8
9 changed files with 43 additions and 36 deletions

View File

@ -5,6 +5,7 @@
#include "Kyoto/Audio/CSfxHandle.hpp" #include "Kyoto/Audio/CSfxHandle.hpp"
class CVector3f;
class CSfxManager { class CSfxManager {
public: public:
static void Update(f32 dt); static void Update(f32 dt);

View File

@ -17,6 +17,7 @@
#include "rstl/pair.hpp" #include "rstl/pair.hpp"
class CSkinnedModel; class CSkinnedModel;
class CModel;
class CCubeRenderer { class CCubeRenderer {
public: public:

View File

@ -14,6 +14,7 @@ public:
// TODO vtable // TODO vtable
}; };
class IObjectStore;
class COsContext; class COsContext;
class CMemorySys; class CMemorySys;
class CResFactory; class CResFactory;

View File

@ -7,33 +7,33 @@
class CCameraHint { class CCameraHint {
public: public:
CCameraHint(uint overrideFlags, CBallCamera::EBallCameraBehaviour behaviour, f32 minDist, CCameraHint(uint overrideFlags, CBallCamera::EBallCameraBehaviour behaviour, float minDist,
f32 maxDist, f32 backwardsDist, const CVector3f& lookAtOffset, float maxDist, float backwardsDist, const CVector3f& lookAtOffset,
const CVector3f& chaseLookAtOffset, const CVector3f& ballToCam, f32 fov, const CVector3f& chaseLookAtOffset, const CVector3f& ballToCam, float fov,
f32 attitudeRange, f32 azimuthRange, f32 anglePerSecond, f32 clampVelRange, float attitudeRange, float azimuthRange, float anglePerSecond, float clampVelRange,
f32 clampRotRange, f32 elevation, f32 interpolateTime, f32 clampVelTime, float clampRotRange, float elevation, float interpolateTime, float clampVelTime,
f32 controlInterpDur); float controlInterpDur);
virtual ~CCameraHint(); virtual ~CCameraHint();
private: private:
uint mOverrideFlags; uint mOverrideFlags;
CBallCamera::EBallCameraBehaviour mBehaviour; CBallCamera::EBallCameraBehaviour mBehaviour;
f32 mMinDist; float mMinDist;
f32 mMaxDist; float mMaxDist;
f32 mBackwardsDist; float mBackwardsDist;
CVector3f mLookAtOffset; CVector3f mLookAtOffset;
CVector3f mChaseLookAtOffset; CVector3f mChaseLookAtOffset;
CVector3f mBallToCam; CVector3f mBallToCam;
f32 mFov; float mFov;
f32 mAttitudeRange; float mAttitudeRange;
f32 mAzimuthRange; float mAzimuthRange;
f32 mAnglePerSecond; float mAnglePerSecond;
f32 mClampVelRange; float mClampVelRange;
f32 mClampRotRange; float mClampRotRange;
f32 mElevation; float mElevation;
f32 mInterpolateTime; float mInterpolateTime;
f32 mClampVelTime; float mClampVelTime;
f32 mControlInterpDur; float mControlInterpDur;
}; };
#endif // __CCAMERAHINT_HPP__ #endif // __CCAMERAHINT_HPP__

View File

@ -53,8 +53,8 @@ inline void CGX::SetTevKAlphaSel(GXTevStageID stageId, GXTevKAlphaSel sel) {
#include "Kyoto/Math/CTransform4f.hpp" #include "Kyoto/Math/CTransform4f.hpp"
CVector3f sPlayerPosition; CVector3f sPlayerPosition = CVector3f::Zero();
CVector3f CCubeMaterial::sViewingFrom; CVector3f CCubeMaterial::sViewingFrom = CVector3f::Zero();
static CTransform4f sTextureProjectionTransform = CTransform4f::Identity(); static CTransform4f sTextureProjectionTransform = CTransform4f::Identity();
void CCubeMaterial::SetupBlendMode(uint blendFactors, const CModelFlags& flags, bool alphaTest) { void CCubeMaterial::SetupBlendMode(uint blendFactors, const CModelFlags& flags, bool alphaTest) {

View File

@ -1,5 +1,7 @@
#include "MetroidPrime/CObjectList.hpp" #include "MetroidPrime/CObjectList.hpp"
#include "MetroidPrime/CEntity.hpp"
CObjectList::SObjectListEntry::SObjectListEntry() : mEnt(nullptr), mNext(-1), mPrev(-1) {} CObjectList::SObjectListEntry::SObjectListEntry() : mEnt(nullptr), mNext(-1), mPrev(-1) {}
CObjectList::CObjectList(EGameObjectList list) : mListType(list), mFirstId(-1), mCount(0) { CObjectList::CObjectList(EGameObjectList list) : mListType(list), mFirstId(-1), mCount(0) {

View File

@ -1,17 +1,20 @@
#include "Kyoto/Graphics/CGraphics.hpp" #include "Kyoto/Graphics/CGraphics.hpp"
#include "Kyoto/Graphics/CTexture.hpp"
#include "MetaRender/CCubeRenderer.hpp" #include "MetaRender/CCubeRenderer.hpp"
#include "MetroidPrime/Cameras/CCameraFilterPass.hpp" #include "MetroidPrime/Cameras/CCameraFilterPass.hpp"
#include "stdlib.h"
// FIXME non-matching https://decomp.me/scratch/8N81d // FIXME non-matching https://decomp.me/scratch/8N81d
void CCameraFilterPass::DrawWideScreen(const CColor& color, const CTexture* tex, f32 lod) { void CCameraFilterPass::DrawWideScreen(const CColor& color, const CTexture* tex, f32 lod) {
const rstl::pair< CVector2f, CVector2f > vp = gpRender->SetViewportOrtho(true, -4096.f, 4096.f); const rstl::pair< CVector2f, CVector2f > vp = gpRender->SetViewportOrtho(true, -4096.f, 4096.f);
f32 left = vp.first.mX; f32 left = vp.first.GetX();
f32 dVar5 = -((vp.second.mX - vp.first.mX) * 0.0625f * 9.f - (vp.second.mY - vp.first.mY)) * 0.5f; f32 dVar5 = -((vp.second.GetX() - vp.first.GetX()) * 0.0625f * 9.f - (vp.second.GetY() - vp.first.GetY())) * 0.5f;
f32 bottom = vp.first.mY; f32 bottom = vp.first.GetY();
f32 right = vp.second.mX; f32 right = vp.second.GetX();
f32 top = vp.second.mY; f32 top = vp.second.GetY();
gpRender->SetDepthReadWrite(false, false); gpRender->SetDepthReadWrite(false, false);
gpRender->SetModelMatrix(CTransform4f::sIdentity); gpRender->SetModelMatrix(CTransform4f::Identity());
if (tex != nullptr) { if (tex != nullptr) {
tex->Load(GX_TEXMAP0, CTexture::Repeat); tex->Load(GX_TEXMAP0, CTexture::Repeat);
} }

View File

@ -1,12 +1,12 @@
#include "MetroidPrime/Cameras/CCameraHint.hpp" #include "MetroidPrime/Cameras/CCameraHint.hpp"
#include "Kyoto/Alloc/CMemory.hpp" #include "Kyoto/Alloc/CMemory.hpp"
CCameraHint::CCameraHint(uint overrideFlags, CBallCamera::EBallCameraBehaviour behaviour, CCameraHint::CCameraHint(uint overrideFlags, CBallCamera::EBallCameraBehaviour behaviour, float minDist,
float minDist, float maxDist, float backwardsDist, CVector3f* lookAtOffset, float maxDist, float backwardsDist, const CVector3f& lookAtOffset,
CVector3f* chaseLookAtOffset, CVector3f* ballToCam, float fov, const CVector3f& chaseLookAtOffset, const CVector3f& ballToCam, float fov,
float attitudeRange, float azimuthRange, float anglePerSecond, float attitudeRange, float azimuthRange, float anglePerSecond, float clampVelRange,
float clampVelRange, float clampRotRange, float elevation, float clampRotRange, float elevation, float interpolateTime, float clampVelTime,
float InterpolationTime, float clampVelTime, float controlInterpDur) float controlInterpDur)
: mOverrideFlags(overrideFlags) : mOverrideFlags(overrideFlags)
, mBehaviour(behaviour) , mBehaviour(behaviour)
, mMinDist(minDist) , mMinDist(minDist)
@ -17,7 +17,6 @@ CCameraHint::CCameraHint(uint overrideFlags, CBallCamera::EBallCameraBehaviour b
, mBallToCam(ballToCam) , mBallToCam(ballToCam)
, mFov(fov) , mFov(fov)
, mAttitudeRange(attitudeRange) , mAttitudeRange(attitudeRange)
, mAzimuthRnage(azimuthRange)
, mAnglePerSecond(anglePerSecond) , mAnglePerSecond(anglePerSecond)
, mClampVelRange(clampVelRange) , mClampVelRange(clampVelRange)
, mClampRotRange(clampRotRange) , mClampRotRange(clampRotRange)

View File

@ -134,7 +134,7 @@ CMain::CMain()
, x120_(0.f) , x120_(0.f)
, x124_(0.f) , x124_(0.f)
, x128_gameGlobalObjects(nullptr) , x128_gameGlobalObjects(nullptr)
, x12c_flowState(kFS_Default) , x12c_restartMode(kRM_Default)
, x130_frameTimes(0xF4240) , x130_frameTimes(0xF4240)
, x15c_frameTimeIdx(0) , x15c_frameTimeIdx(0)
, x160_24_finished(false) , x160_24_finished(false)
@ -688,7 +688,7 @@ int CMain::RsMain(int argc, const char* const* argv) {
needsReset = true; needsReset = true;
} }
if (needsReset) { if (needsReset) {
x12c_flowState = kFS_Default; x12c_restartMode = kRM_Default;
CStreamAudioManager::StopAll(); CStreamAudioManager::StopAll();
PADRecalibrate(0xf0000000); PADRecalibrate(0xf0000000);
CGraphics::SetIsBeginSceneClearFb(true); CGraphics::SetIsBeginSceneClearFb(true);