From 18172274650040a1851b2eab7828aaed524fb573 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Sat, 16 Apr 2016 16:50:45 -1000 Subject: [PATCH] CCameraManager imps --- .../DNAMP1/ScriptObjects/CameraShaker.hpp | 16 +-- Runtime/Audio/CSfxManager.cpp | 19 +++ Runtime/Audio/CSfxManager.hpp | 17 ++- Runtime/CFluidPlaneManager.cpp | 0 Runtime/CFluidPlaneManager.hpp | 13 ++ Runtime/CMakeLists.txt | 2 + Runtime/CStateManager.cpp | 8 ++ Runtime/CStateManager.hpp | 55 ++++++-- Runtime/CWeaponMgr.cpp | 0 Runtime/CWeaponMgr.hpp | 13 ++ Runtime/Camera/CCameraFilter.cpp | 0 Runtime/Camera/CCameraFilter.hpp | 35 +++++ Runtime/Camera/CCameraManager.cpp | 127 ++++++++++++++++++ Runtime/Camera/CCameraManager.hpp | 30 ++++- Runtime/Camera/CCameraShakeData.cpp | 37 +++++ Runtime/Camera/CCameraShakeData.hpp | 18 ++- Runtime/Camera/CGameCamera.hpp | 5 +- Runtime/Camera/CMakeLists.txt | 3 +- Runtime/Input/CRumbleVoice.hpp | 5 +- Runtime/World/CActorModelParticles.cpp | 0 Runtime/World/CActorModelParticles.hpp | 13 ++ Runtime/World/CEnvFxManager.cpp | 0 Runtime/World/CEnvFxManager.hpp | 13 ++ Runtime/World/CGameArea.hpp | 23 ++++ Runtime/World/CMakeLists.txt | 6 +- Runtime/World/CScriptWater.cpp | 0 Runtime/World/CScriptWater.hpp | 15 +++ Runtime/World/CTeamAiTypes.cpp | 0 Runtime/World/CTeamAiTypes.hpp | 13 ++ 29 files changed, 452 insertions(+), 34 deletions(-) create mode 100644 Runtime/CFluidPlaneManager.cpp create mode 100644 Runtime/CFluidPlaneManager.hpp create mode 100644 Runtime/CWeaponMgr.cpp create mode 100644 Runtime/CWeaponMgr.hpp create mode 100644 Runtime/Camera/CCameraFilter.cpp create mode 100644 Runtime/Camera/CCameraFilter.hpp create mode 100644 Runtime/World/CActorModelParticles.cpp create mode 100644 Runtime/World/CActorModelParticles.hpp create mode 100644 Runtime/World/CEnvFxManager.cpp create mode 100644 Runtime/World/CEnvFxManager.hpp create mode 100644 Runtime/World/CScriptWater.cpp create mode 100644 Runtime/World/CScriptWater.hpp create mode 100644 Runtime/World/CTeamAiTypes.cpp create mode 100644 Runtime/World/CTeamAiTypes.hpp diff --git a/DataSpec/DNAMP1/ScriptObjects/CameraShaker.hpp b/DataSpec/DNAMP1/ScriptObjects/CameraShaker.hpp index 905d029e3..fbf4f8dea 100644 --- a/DataSpec/DNAMP1/ScriptObjects/CameraShaker.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/CameraShaker.hpp @@ -13,14 +13,14 @@ struct CameraShaker : IScriptObject { DECL_YAML String<-1> name; - Value unknown1; - Value unknown2; - Value unknown3; - Value unknown4; - Value unknown5; - Value unknown6; - Value unknown7; - Value unknown8; + Value xA; + Value xB; + Value yA; + Value yB; + Value zA; + Value zB; + Value duration; + Value shakeY; }; } } diff --git a/Runtime/Audio/CSfxManager.cpp b/Runtime/Audio/CSfxManager.cpp index e69de29bb..14d019604 100644 --- a/Runtime/Audio/CSfxManager.cpp +++ b/Runtime/Audio/CSfxManager.cpp @@ -0,0 +1,19 @@ +#include "CSfxManager.hpp" + +namespace urde +{ + +void CSfxManager::AddListener(ESfxChannels, + const zeus::CVector3f& vec1, const zeus::CVector3f& vec2, + const zeus::CVector3f& right, const zeus::CVector3f& up, + float, float, float, u32, u8) +{ +} + +void CSfxManager::UpdateListener(const zeus::CVector3f& pos, const zeus::CVector3f& dir, + const zeus::CVector3f& heading, const zeus::CVector3f& up, + u8 vol) +{ +} + +} diff --git a/Runtime/Audio/CSfxManager.hpp b/Runtime/Audio/CSfxManager.hpp index dcfed9699..2667161c8 100644 --- a/Runtime/Audio/CSfxManager.hpp +++ b/Runtime/Audio/CSfxManager.hpp @@ -12,8 +12,11 @@ namespace urde class CSfxManager { +public: enum class ESfxChannels { + Zero, + One }; enum class ESfxAudibility @@ -58,7 +61,7 @@ class CSfxManager virtual void Play()=0; virtual void Stop()=0; virtual bool Ready()=0; - virtual ESfxAudibility GetAudible(const CVector3f&)=0; + virtual ESfxAudibility GetAudible(const zeus::CVector3f&)=0; virtual u32 GetVoice() const=0; void Release() {m_available = true;} @@ -78,7 +81,7 @@ class CSfxManager void Play(); void Stop(); bool Ready(); - ESfxAudibility GetAudible(const CVector3f&); + ESfxAudibility GetAudible(const zeus::CVector3f&); u32 GetVoice() const; u32 GetHandle() const {return m_emitterHandle;} @@ -99,7 +102,7 @@ class CSfxManager void Play(); void Stop(); bool Ready(); - ESfxAudibility GetAudible(const CVector3f&) {return Aud3;} + ESfxAudibility GetAudible(const zeus::CVector3f&) {return ESfxAudibility::Aud3;} u32 GetVoice() const {return m_voiceHandle;} void SetVolume(s16 vol) {m_vol = vol;} @@ -126,6 +129,14 @@ class CSfxManager static u32 kAllAreas; static ESfxChannels GetCurrentChannel() {return m_currentChannel;} + static void AddListener(ESfxChannels, + const zeus::CVector3f& pos, const zeus::CVector3f& dir, + const zeus::CVector3f& heading, const zeus::CVector3f& up, + float frontRadius, float surroundRadius, float soundSpeed, + u32 flags /* 0x1 for doppler */, u8 vol); + static void UpdateListener(const zeus::CVector3f& pos, const zeus::CVector3f& dir, + const zeus::CVector3f& heading, const zeus::CVector3f& up, + u8 vol); }; } diff --git a/Runtime/CFluidPlaneManager.cpp b/Runtime/CFluidPlaneManager.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/Runtime/CFluidPlaneManager.hpp b/Runtime/CFluidPlaneManager.hpp new file mode 100644 index 000000000..23f4a506e --- /dev/null +++ b/Runtime/CFluidPlaneManager.hpp @@ -0,0 +1,13 @@ +#ifndef __URDE_CFLUIDPLANEMANAGER_HPP__ +#define __URDE_CFLUIDPLANEMANAGER_HPP__ + +namespace urde +{ + +class CFluidPlaneManager +{ +}; + +} + +#endif // __URDE_CFLUIDPLANEMANAGER_HPP__ diff --git a/Runtime/CMakeLists.txt b/Runtime/CMakeLists.txt index fa3c72536..66839c502 100644 --- a/Runtime/CMakeLists.txt +++ b/Runtime/CMakeLists.txt @@ -29,6 +29,8 @@ add_library(RuntimeCommon CIOWin.hpp CIOWinManager.hpp CIOWinManager.cpp CStateManager.hpp CStateManager.cpp + CWeaponMgr.hpp CWeaponMgr.cpp + CFluidPlaneManager.hpp CFluidPlaneManager.cpp CGameState.hpp CGameState.cpp CScriptMailbox.hpp CScriptMailbox.cpp CPlayerState.hpp CPlayerState.cpp diff --git a/Runtime/CStateManager.cpp b/Runtime/CStateManager.cpp index a1fa8651d..3af66c41a 100644 --- a/Runtime/CStateManager.cpp +++ b/Runtime/CStateManager.cpp @@ -1,4 +1,12 @@ #include "CStateManager.hpp" +#include "Camera/CCameraShakeData.hpp" +#include "CSortedLists.hpp" +#include "CWeaponMgr.hpp" +#include "CFluidPlaneManager.hpp" +#include "World/CEnvFxManager.hpp" +#include "World/CActorModelParticles.hpp" +#include "World/CTeamAiTypes.hpp" +#include "Input/CRumbleManager.hpp" namespace urde { diff --git a/Runtime/CStateManager.hpp b/Runtime/CStateManager.hpp index f8472ec63..76a069bba 100644 --- a/Runtime/CStateManager.hpp +++ b/Runtime/CStateManager.hpp @@ -6,6 +6,8 @@ #include "ScriptObjectSupport.hpp" #include "GameObjectLists.hpp" #include "Camera/CCameraManager.hpp" +#include "Camera/CCameraFilter.hpp" +#include "CRandom16.hpp" namespace urde { @@ -14,26 +16,45 @@ class CMapWorldInfo; class CPlayerState; class CWorldTransManager; class CObjectList; +class CSortedListManager; +class CWeaponMgr; +class CFluidPlaneManager; +class CEnvFxManager; +class CActorModelParticles; +class CTeamAiTypes; +class CRumbleManager; class CStateManager { TUniqueId x8_idArr[1024] = {}; std::unique_ptr x80c_allObjs; - std::unique_ptr x814_allObjs; - std::unique_ptr x81c_allObjs; - std::unique_ptr x824_allObjs; - std::unique_ptr x82c_allObjs; - std::unique_ptr x834_allObjs; - std::unique_ptr x83c_allObjs; - std::unique_ptr x844_allObjs; + std::unique_ptr x814_actorObjs; + std::unique_ptr x81c_physActorObjs; + std::unique_ptr x824_cameraObjs; + std::unique_ptr x82c_lightObjs; + std::unique_ptr x834_listenAiObjs; + std::unique_ptr x83c_aiWaypointObjs; + std::unique_ptr x844_platformAndDoorObjs; std::list x858_; // x86c_stateManagerContainer; + std::unique_ptr x870_cameraManager; + std::unique_ptr x874_sortedListManager; + std::unique_ptr x878_weaponManager; + std::unique_ptr x87c_fluidPlaneManager; + std::unique_ptr x880_envFxManager; + std::unique_ptr x884_actorModelParticles; + std::unique_ptr x888_teamAiTypes; + std::unique_ptr x88c_rumbleManager; - + CRandom16 x8f8_random; + CRandom16* x8fc_activeRandom = nullptr; std::shared_ptr x8b8_playerState; + CCameraFilterPass xaf8_camFilterPasses[9]; + CCameraBlurPass xc88_camBlurPasses[9]; + public: CStateManager(const std::weak_ptr&, const std::weak_ptr&, @@ -42,15 +63,27 @@ public: const std::shared_ptr& GetPlayerState() const {return x8b8_playerState;} - void GetObjectListById() const + const CObjectList* GetObjectListById(EGameObjectList type) const { + const std::unique_ptr* lists = &x80c_allObjs; + return lists[int(type)].get(); } - void GetObjectById(TUniqueId uid) const + CObjectList* GetObjectListById(EGameObjectList type) { - + std::unique_ptr* lists = &x80c_allObjs; + return lists[int(type)].get(); + } + CEntity* GetObjectById(TUniqueId uid) + { + return x80c_allObjs->GetObjectById(uid); } void SendScriptMsg(TUniqueId uid, TEditorId eid, EScriptObjectMessage msg, EScriptObjectState state); TUniqueId AllocateUniqueId(); + CRandom16* GetActiveRandom() {return x8fc_activeRandom;} + + CRumbleManager& GetRumbleManager() {return *x88c_rumbleManager;} + + CCameraFilterPass& GetCameraFilterPass(int idx) {return xaf8_camFilterPasses[idx];} }; } diff --git a/Runtime/CWeaponMgr.cpp b/Runtime/CWeaponMgr.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/Runtime/CWeaponMgr.hpp b/Runtime/CWeaponMgr.hpp new file mode 100644 index 000000000..9f8e56573 --- /dev/null +++ b/Runtime/CWeaponMgr.hpp @@ -0,0 +1,13 @@ +#ifndef __URDE_CWEAPONMGR_HPP__ +#define __URDE_CWEAPONMGR_HPP__ + +namespace urde +{ + +class CWeaponMgr +{ +}; + +} + +#endif // __URDE_CWEAPONMGR_HPP__ diff --git a/Runtime/Camera/CCameraFilter.cpp b/Runtime/Camera/CCameraFilter.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/Runtime/Camera/CCameraFilter.hpp b/Runtime/Camera/CCameraFilter.hpp new file mode 100644 index 000000000..68f8af8c9 --- /dev/null +++ b/Runtime/Camera/CCameraFilter.hpp @@ -0,0 +1,35 @@ +#ifndef __URDE_CCAMERAFILTER_HPP__ +#define __URDE_CCAMERAFILTER_HPP__ + +#include "zeus/CColor.hpp" +#include "RetroTypes.hpp" + +namespace urde +{ + +class CCameraFilterPass +{ +public: + enum class EFilterType + { + Zero, + One + }; + enum class EFilterShape + { + Zero, + One + }; +private: +public: + void SetFilter(EFilterType type, EFilterShape shape, float, const zeus::CColor& color, u32); + void DisableFilter(float); +}; + +class CCameraBlurPass +{ +}; + +} + +#endif // __URDE_CCAMERAFILTER_HPP__ diff --git a/Runtime/Camera/CCameraManager.cpp b/Runtime/Camera/CCameraManager.cpp index a3988e55b..7cc5865ea 100644 --- a/Runtime/Camera/CCameraManager.cpp +++ b/Runtime/Camera/CCameraManager.cpp @@ -1,5 +1,10 @@ #include "CCameraManager.hpp" #include "CCameraShakeData.hpp" +#include "Audio/CSfxManager.hpp" +#include "CGameCamera.hpp" +#include "CStateManager.hpp" +#include "Input/CRumbleManager.hpp" +#include "World/CScriptWater.hpp" namespace urde { @@ -7,6 +12,128 @@ namespace urde CCameraManager::CCameraManager(TUniqueId curCameraId) : x0_curCameraId(curCameraId) { + CSfxManager::AddListener(CSfxManager::ESfxChannels::One, + zeus::CVector3f::skZero, zeus::CVector3f::skZero, + {1.f, 0.f, 0.f}, {0.f, 0.f, 1.f}, 50.f, 50.f, 1000.f, 1, 0x7f); +} + +zeus::CVector3f CCameraManager::GetGlobalCameraTranslation(const CStateManager& stateMgr) const +{ + const CGameCamera* camera = GetCurrentCamera(stateMgr); + return camera->GetTransform() * x30_shakeOffset; +} + +zeus::CTransform CCameraManager::GetCurrentCameraTransform(const CStateManager& stateMgr) const +{ + const CGameCamera* camera = GetCurrentCamera(stateMgr); + return camera->GetTransform() * zeus::CTransform::Translate(x30_shakeOffset); +} + +void CCameraManager::RemoveCameraShaker(int id) +{ + for (auto it=x18_shakers.begin() ; it != x18_shakers.end() ; ++it) + if (it->x20_shakerId == id) + { + x18_shakers.erase(it); + break; + } +} + +int CCameraManager::AddCameraShaker(const CCameraShakeData& data) +{ + x18_shakers.emplace_back(data); + x18_shakers.back().x20_shakerId = ++x2c_lastShakeId; + return x2c_lastShakeId; +} + +void CCameraManager::AddCinemaCamera(TUniqueId id, CStateManager& stateMgr) +{ + x4_cineCameras.push_back(id); +} + +void CCameraManager::SetInsideFluid(bool val, TUniqueId fluidId) +{ + if (val) + { + ++x74_fluidCounter; + x78_fluidId = fluidId; + } + else + --x74_fluidCounter; +} + +void CCameraManager::Update(float dt, CStateManager& stateMgr) +{ + const CGameCamera* camera = GetCurrentCamera(stateMgr); + zeus::CVector3f heading = camera->GetTransform().m_basis * zeus::CVector3f{0.f, 1.f, 0.f}; + CSfxManager::UpdateListener(camera->GetTransform().m_origin, zeus::CVector3f::skZero, + heading, {0.f, 0.f, 1.f}, 0x7f); + x30_shakeOffset = zeus::CVector3f::skZero; + + for (auto it=x18_shakers.begin() ; it != x18_shakers.end() ;) + { + if (it->x1c_curTime >= it->x18_duration) + { + it = x18_shakers.erase(it); + continue; + } + x30_shakeOffset += it->GeneratePoint(dt, *stateMgr.GetActiveRandom()); + ++it; + } + + if (x18_shakers.size()) + { + if (!x86_25_rumbling || x86_24_) + { + stateMgr.GetRumbleManager().Rumble(ERumbleFxId::Seven, stateMgr, ERumblePriority::Two); + x86_25_rumbling = true; + } + } + else + { + x86_25_rumbling = false; + if (x84_rumbleId != -1) + { + stateMgr.GetRumbleManager().StopRumble(x84_rumbleId); + x84_rumbleId = -1; + } + } + + if (x74_fluidCounter) + { + CScriptWater* water = dynamic_cast(stateMgr.GetObjectById(x78_fluidId)); + if (water) + { + // TODO: Finish + zeus::CColor tmpColor; // Get from water + zeus::CVector2f tmpVector; // Get from camera + x3c_fog.SetFogExplicit(ERglFogMode::Four, tmpColor, tmpVector); + stateMgr.GetCameraFilterPass(4).SetFilter(CCameraFilterPass::EFilterType::One, + CCameraFilterPass::EFilterShape::Zero, + 0.f, tmpColor, -1); + } + x86_26_inWater = true; + } + else + { + x86_26_inWater = false; + x3c_fog.DisableFog(); + stateMgr.GetCameraFilterPass(4).DisableFilter(dt); + } + + x3c_fog.Update(dt); +} + +CGameCamera* CCameraManager::GetCurrentCamera(CStateManager& stateMgr) const +{ + CObjectList* camList = stateMgr.GetObjectListById(EGameObjectList::GameCamera); + return static_cast(camList->GetObjectById(GetCurrentCameraId())); +} + +const CGameCamera* CCameraManager::GetCurrentCamera(const CStateManager& stateMgr) const +{ + const CObjectList* camList = stateMgr.GetObjectListById(EGameObjectList::GameCamera); + return static_cast(camList->GetObjectById(GetCurrentCameraId())); } } diff --git a/Runtime/Camera/CCameraManager.hpp b/Runtime/Camera/CCameraManager.hpp index e3546a9bd..d4d433ed4 100644 --- a/Runtime/Camera/CCameraManager.hpp +++ b/Runtime/Camera/CCameraManager.hpp @@ -18,9 +18,26 @@ class CCameraManager TUniqueId x0_curCameraId; std::vector x4_cineCameras; std::list x18_shakers; - zeus::CVector3f x30_; - CFirstPersonCamera* x7c_fpCamera; - CBallCamera* x80_ballCamera; + u32 x2c_lastShakeId = 0; + zeus::CVector3f x30_shakeOffset; + CGameArea::CAreaFog x3c_fog; + int x74_fluidCounter = 0; + TUniqueId x78_fluidId = kInvalidUniqueId; + CFirstPersonCamera* x7c_fpCamera = nullptr; + CBallCamera* x80_ballCamera = nullptr; + s16 x84_rumbleId = -1; + + union + { + struct + { + bool x86_24_ : 1; + bool x86_25_rumbling : 1; + bool x86_26_inWater : 1; + }; + u8 _dummy = 0; + }; + public: CCameraManager(TUniqueId curCameraId); @@ -31,14 +48,15 @@ public: } bool IsInCinematicCamera() const {return x4_cineCameras.size() != 0;} zeus::CVector3f GetGlobalCameraTranslation(const CStateManager& stateMgr) const; - zeus::CTransform GetGlobalCameraTransform(const CStateManager& stateMgr) const; - void RemoveCameraShaker(int); + zeus::CTransform GetCurrentCameraTransform(const CStateManager& stateMgr) const; + void RemoveCameraShaker(int id); + int AddCameraShaker(const CCameraShakeData& data); void AddCinemaCamera(TUniqueId, CStateManager& stateMgr); void SetInsideFluid(bool, TUniqueId); void Update(float dt, CStateManager& stateMgr); CGameCamera* GetCurrentCamera(CStateManager& stateMgr) const; const CGameCamera* GetCurrentCamera(const CStateManager& stateMgr) const; - void SetCurrentCameraId(TUniqueId id, CStateManager& stateMgr); + void SetCurrentCameraId(TUniqueId id, CStateManager& stateMgr) {x0_curCameraId = id;} TUniqueId GetCurrentCameraId() const { if (x4_cineCameras.size()) diff --git a/Runtime/Camera/CCameraShakeData.cpp b/Runtime/Camera/CCameraShakeData.cpp index e69de29bb..d03aa2ca6 100644 --- a/Runtime/Camera/CCameraShakeData.cpp +++ b/Runtime/Camera/CCameraShakeData.cpp @@ -0,0 +1,37 @@ +#include "CCameraShakeData.hpp" +#include "CRandom16.hpp" + +namespace urde +{ + +CCameraShakeData::CCameraShakeData(float xA, float xB, float yA, float yB, + float zA, float zB, float duration, bool shakeY) +: x0_pointA(xA, yA, zA), xc_pointB(xB, yB, zB), x18_duration(duration), x40_shakeY(shakeY) {} + +zeus::CVector3f CCameraShakeData::GeneratePoint(float dt, CRandom16& r) +{ + x3c_cycleTimeLeft -= dt; + if (x3c_cycleTimeLeft <= 0.f) + { + x3c_cycleTimeLeft = r.Range(1.f / 60.f, 0.1f); + float zVal = r.Range(-1.f, 1.f); + float yVal = 0.f; + if (x40_shakeY) + yVal = r.Range(-1.f, 1.f); + float xVal = r.Range(-1.f, 1.f); + zeus::CVector3f shakeVec(xVal, yVal, zVal); + if (!shakeVec.canBeNormalized()) + shakeVec = {0.f, 0.f, 1.f}; + else + shakeVec.normalize(); + x30_velocity = (shakeVec - x24_position) / x3c_cycleTimeLeft; + } + + x24_position += x30_velocity * dt; + float interp = zeus::clamp(0.f, 1.f - (x18_duration - x1c_curTime) / x18_duration, 1.f); + + x1c_curTime += dt; + return x24_position * zeus::CVector3f::lerp(x0_pointA, xc_pointB, interp); +} + +} diff --git a/Runtime/Camera/CCameraShakeData.hpp b/Runtime/Camera/CCameraShakeData.hpp index e2073a0e5..2b4eaba26 100644 --- a/Runtime/Camera/CCameraShakeData.hpp +++ b/Runtime/Camera/CCameraShakeData.hpp @@ -1,13 +1,29 @@ #ifndef __URDE_CCAMERASHAKEDATA_HPP__ #define __URDE_CCAMERASHAKEDATA_HPP__ +#include "zeus/CVector3f.hpp" +#include "RetroTypes.hpp" + namespace urde { +class CRandom16; class CCameraShakeData { + friend class CCameraManager; + zeus::CVector3f x0_pointA; + zeus::CVector3f xc_pointB; + float x18_duration; + float x1c_curTime = 0.f; + u32 x20_shakerId = 0; + zeus::CVector3f x24_position; + zeus::CVector3f x30_velocity; + float x3c_cycleTimeLeft; + bool x40_shakeY; public: - CCameraShakeData(float, float, float, float, float, float, float, bool); + CCameraShakeData(float xA, float xB, float yA, float yB, + float zA, float zB, float duration, bool shakeY); + zeus::CVector3f GeneratePoint(float dt, CRandom16& r); }; } diff --git a/Runtime/Camera/CGameCamera.hpp b/Runtime/Camera/CGameCamera.hpp index 3aa81cad6..ff363d93f 100644 --- a/Runtime/Camera/CGameCamera.hpp +++ b/Runtime/Camera/CGameCamera.hpp @@ -1,14 +1,17 @@ #ifndef __URDE_CGAMECAMERA_HPP__ #define __URDE_CGAMECAMERA_HPP__ -#include "CActor.hpp" +#include "World/CActor.hpp" +#include "zeus/CTransform.hpp" namespace urde { class CGameCamera : public CActor { + zeus::CTransform x34_; public: + const zeus::CTransform& GetTransform() const {return x34_;} }; } diff --git a/Runtime/Camera/CMakeLists.txt b/Runtime/Camera/CMakeLists.txt index 4450cf0c8..a6c3e4037 100644 --- a/Runtime/Camera/CMakeLists.txt +++ b/Runtime/Camera/CMakeLists.txt @@ -5,4 +5,5 @@ add_library(RuntimeCommonCamera CBallCamera.hpp CBallCamera.cpp CPathCamera.hpp CPathCamera.cpp CCinematicCamera.hpp CCinematicCamera.cpp - CCameraShakeData.hpp CCameraShakeData.cpp) + CCameraShakeData.hpp CCameraShakeData.cpp + CCameraFilter.hpp CCameraFilter.cpp) diff --git a/Runtime/Input/CRumbleVoice.hpp b/Runtime/Input/CRumbleVoice.hpp index 34945b942..9cb274f67 100644 --- a/Runtime/Input/CRumbleVoice.hpp +++ b/Runtime/Input/CRumbleVoice.hpp @@ -7,11 +7,12 @@ namespace urde { enum class ERumbleFxId { - + Seven = 7 }; enum class ERumblePriority { - None + None, + Two = 2 }; struct SAdsrData; diff --git a/Runtime/World/CActorModelParticles.cpp b/Runtime/World/CActorModelParticles.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/Runtime/World/CActorModelParticles.hpp b/Runtime/World/CActorModelParticles.hpp new file mode 100644 index 000000000..9808f145d --- /dev/null +++ b/Runtime/World/CActorModelParticles.hpp @@ -0,0 +1,13 @@ +#ifndef __URDE_CACTORMODELPARTICLES_HPP__ +#define __URDE_CACTORMODELPARTICLES_HPP__ + +namespace urde +{ + +class CActorModelParticles +{ +}; + +} + +#endif // __URDE_CACTORMODELPARTICLES_HPP__ diff --git a/Runtime/World/CEnvFxManager.cpp b/Runtime/World/CEnvFxManager.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/Runtime/World/CEnvFxManager.hpp b/Runtime/World/CEnvFxManager.hpp new file mode 100644 index 000000000..c1eeca9eb --- /dev/null +++ b/Runtime/World/CEnvFxManager.hpp @@ -0,0 +1,13 @@ +#ifndef __URDE_CENVFXMANAGER_HPP__ +#define __URDE_CENVFXMANAGER_HPP__ + +namespace urde +{ + +class CEnvFxManager +{ +}; + +} + +#endif // __URDE_CENVFXMANAGER_HPP__ diff --git a/Runtime/World/CGameArea.hpp b/Runtime/World/CGameArea.hpp index 62af34047..8046a209a 100644 --- a/Runtime/World/CGameArea.hpp +++ b/Runtime/World/CGameArea.hpp @@ -1,11 +1,34 @@ #ifndef __URDE_CGAMEAREA_HPP__ #define __URDE_CGAMEAREA_HPP__ +#include "zeus/CVector2f.hpp" +#include "zeus/CColor.hpp" +#include "RetroTypes.hpp" + namespace urde { +enum class ERglFogMode +{ + Four = 4 +}; + class CGameArea { +public: + class CAreaFog + { + zeus::CVector2f x4_ = {0.f, 1024.f}; + zeus::CVector2f xc_ = {0.f, 1024.f}; + zeus::CVector2f x14_; + zeus::CVector3f x1c_ = {0.5f}; + zeus::CVector3f x28_ = {0.5f}; + float x34_ = 0.f; + public: + void SetFogExplicit(ERglFogMode, const zeus::CColor& color, const zeus::CVector2f& vec); + void DisableFog(); + void Update(float dt); + }; }; } diff --git a/Runtime/World/CMakeLists.txt b/Runtime/World/CMakeLists.txt index 04255ccb6..18be68d45 100644 --- a/Runtime/World/CMakeLists.txt +++ b/Runtime/World/CMakeLists.txt @@ -6,4 +6,8 @@ add_library(RuntimeCommonWorld CAi.hpp CAi.cpp CEntity.hpp CEntity.cpp CPhysicsActor.hpp CPhysicsActor.cpp - CWorldTransManager.hpp CWorldTransManager.cpp) + CWorldTransManager.hpp CWorldTransManager.cpp + CEnvFxManager.hpp CEnvFxManager.cpp + CActorModelParticles.hpp CActorModelParticles.cpp + CTeamAiTypes.hpp CTeamAiTypes.cpp + CScriptWater.hpp CScriptWater.cpp) diff --git a/Runtime/World/CScriptWater.cpp b/Runtime/World/CScriptWater.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/Runtime/World/CScriptWater.hpp b/Runtime/World/CScriptWater.hpp new file mode 100644 index 000000000..d910d3947 --- /dev/null +++ b/Runtime/World/CScriptWater.hpp @@ -0,0 +1,15 @@ +#ifndef __URDE_CSCRIPTWATER_HPP__ +#define __URDE_CSCRIPTWATER_HPP__ + +#include "CActor.hpp" + +namespace urde +{ + +class CScriptWater : public CActor +{ +}; + +} + +#endif // __URDE_CSCRIPTWATER_HPP__ diff --git a/Runtime/World/CTeamAiTypes.cpp b/Runtime/World/CTeamAiTypes.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/Runtime/World/CTeamAiTypes.hpp b/Runtime/World/CTeamAiTypes.hpp new file mode 100644 index 000000000..e87f334ed --- /dev/null +++ b/Runtime/World/CTeamAiTypes.hpp @@ -0,0 +1,13 @@ +#ifndef __URDE_CTEAMAITYPES_HPP__ +#define __URDE_CTEAMAITYPES_HPP__ + +namespace urde +{ + +class CTeamAiTypes +{ +}; + +} + +#endif // __URDE_CTEAMAITYPES_HPP__