|
|
@@ -1,13 +1,13 @@
|
|
|
-#include "scene.h"
|
|
|
-#include "project.h"
|
|
|
+#include "CScene.h"
|
|
|
+#include "CProject.h"
|
|
|
|
|
|
#include "../core.h"
|
|
|
#include "../fs/utils.h"
|
|
|
|
|
|
using namespace wp::core;
|
|
|
|
|
|
-scene::scene (
|
|
|
- scenes::camera* camera,
|
|
|
+CScene::CScene (
|
|
|
+ Scenes::CCamera* camera,
|
|
|
irr::video::SColorf ambientColor,
|
|
|
bool bloom,
|
|
|
irr::f64 bloomStrength,
|
|
|
@@ -23,7 +23,7 @@ scene::scene (
|
|
|
irr::f64 cameraShakeRoughness,
|
|
|
irr::f64 cameraShakeSpeed,
|
|
|
irr::video::SColorf clearColor,
|
|
|
- scenes::projection* orthogonalProjection,
|
|
|
+ Scenes::CProjection* orthogonalProjection,
|
|
|
irr::video::SColorf skylightColor) :
|
|
|
m_camera (camera),
|
|
|
m_ambientColor (ambientColor),
|
|
|
@@ -46,7 +46,7 @@ scene::scene (
|
|
|
{
|
|
|
}
|
|
|
|
|
|
-scene* scene::fromFile (const irr::io::path& filename)
|
|
|
+CScene* CScene::fromFile (const irr::io::path& filename)
|
|
|
{
|
|
|
json content = json::parse (wp::fs::utils::loadFullFile (filename));
|
|
|
|
|
|
@@ -172,25 +172,25 @@ scene* scene::fromFile (const irr::io::path& filename)
|
|
|
throw std::runtime_error ("General section must have skylight color");
|
|
|
}
|
|
|
|
|
|
- scene* scene = new class scene (
|
|
|
- scenes::camera::fromJSON (*camera_it),
|
|
|
- wp::core::atoSColorf (*ambientcolor_it),
|
|
|
- *bloom_it,
|
|
|
- *bloomstrength_it,
|
|
|
- *bloomthreshold_it,
|
|
|
- *camerafade_it,
|
|
|
- *cameraparallax_it,
|
|
|
- *cameraparallaxamount_it,
|
|
|
- *cameraparallaxdelay_it,
|
|
|
- *cameraparallaxmouseinfluence_it,
|
|
|
- *camerapreview_it,
|
|
|
- *camerashake_it,
|
|
|
- *camerashakeamplitude_it,
|
|
|
- *camerashakeroughness_it,
|
|
|
- *camerashakespeed_it,
|
|
|
- wp::core::atoSColorf (*clearcolor_it),
|
|
|
- scenes::projection::fromJSON (*orthogonalprojection_it),
|
|
|
- wp::core::atoSColorf (*skylightcolor_it)
|
|
|
+ CScene* scene = new CScene (
|
|
|
+ Scenes::CCamera::fromJSON (*camera_it),
|
|
|
+ wp::core::atoSColorf (*ambientcolor_it),
|
|
|
+ *bloom_it,
|
|
|
+ *bloomstrength_it,
|
|
|
+ *bloomthreshold_it,
|
|
|
+ *camerafade_it,
|
|
|
+ *cameraparallax_it,
|
|
|
+ *cameraparallaxamount_it,
|
|
|
+ *cameraparallaxdelay_it,
|
|
|
+ *cameraparallaxmouseinfluence_it,
|
|
|
+ *camerapreview_it,
|
|
|
+ *camerashake_it,
|
|
|
+ *camerashakeamplitude_it,
|
|
|
+ *camerashakeroughness_it,
|
|
|
+ *camerashakespeed_it,
|
|
|
+ wp::core::atoSColorf (*clearcolor_it),
|
|
|
+ Scenes::CProjection::fromJSON (*orthogonalprojection_it),
|
|
|
+ wp::core::atoSColorf (*skylightcolor_it)
|
|
|
);
|
|
|
|
|
|
json::const_iterator cur = (*objects_it).begin ();
|
|
|
@@ -199,7 +199,7 @@ scene* scene::fromFile (const irr::io::path& filename)
|
|
|
for (; cur != end; cur ++)
|
|
|
{
|
|
|
scene->insertObject (
|
|
|
- object::fromJSON (*cur)
|
|
|
+ CObject::fromJSON (*cur)
|
|
|
);
|
|
|
}
|
|
|
|
|
|
@@ -207,112 +207,112 @@ scene* scene::fromFile (const irr::io::path& filename)
|
|
|
}
|
|
|
|
|
|
|
|
|
-std::vector<object*>* scene::getObjects ()
|
|
|
+std::vector<CObject*>* CScene::getObjects ()
|
|
|
{
|
|
|
return &this->m_objects;
|
|
|
}
|
|
|
|
|
|
-void scene::insertObject (object* object)
|
|
|
+void CScene::insertObject (CObject* object)
|
|
|
{
|
|
|
this->m_objects.push_back (object);
|
|
|
}
|
|
|
|
|
|
-project* scene::getProject ()
|
|
|
+CProject* CScene::getProject ()
|
|
|
{
|
|
|
return this->m_project;
|
|
|
}
|
|
|
|
|
|
-void scene::setProject (project* project)
|
|
|
+void CScene::setProject (CProject* project)
|
|
|
{
|
|
|
this->m_project = project;
|
|
|
}
|
|
|
|
|
|
-scenes::camera* scene::getCamera ()
|
|
|
+Scenes::CCamera* CScene::getCamera ()
|
|
|
{
|
|
|
return this->m_camera;
|
|
|
}
|
|
|
|
|
|
-const irr::video::SColorf &scene::getAmbientColor() const
|
|
|
+const irr::video::SColorf &CScene::getAmbientColor() const
|
|
|
{
|
|
|
return this->m_ambientColor;
|
|
|
}
|
|
|
|
|
|
-bool scene::isBloom () const
|
|
|
+bool CScene::isBloom () const
|
|
|
{
|
|
|
return this->m_bloom;
|
|
|
}
|
|
|
|
|
|
-irr::f64 scene::getBloomStrength () const
|
|
|
+irr::f64 CScene::getBloomStrength () const
|
|
|
{
|
|
|
return this->m_bloomStrength;
|
|
|
}
|
|
|
|
|
|
-irr::f64 scene::getBloomThreshold () const
|
|
|
+irr::f64 CScene::getBloomThreshold () const
|
|
|
{
|
|
|
return this->m_bloomThreshold;
|
|
|
}
|
|
|
|
|
|
-bool scene::isCameraFade () const
|
|
|
+bool CScene::isCameraFade () const
|
|
|
{
|
|
|
return this->m_cameraFade;
|
|
|
}
|
|
|
|
|
|
-bool scene::isCameraParallax () const
|
|
|
+bool CScene::isCameraParallax () const
|
|
|
{
|
|
|
return this->m_cameraParallax;
|
|
|
}
|
|
|
|
|
|
-irr::f64 scene::getCameraParallaxAmount () const
|
|
|
+irr::f64 CScene::getCameraParallaxAmount () const
|
|
|
{
|
|
|
return this->m_cameraParallaxAmount;
|
|
|
}
|
|
|
|
|
|
-irr::f64 scene::getCameraParallaxDelay () const
|
|
|
+irr::f64 CScene::getCameraParallaxDelay () const
|
|
|
{
|
|
|
return this->m_cameraParallaxDelay;
|
|
|
}
|
|
|
|
|
|
-irr::f64 scene::getCameraParallaxMouseInfluence () const
|
|
|
+irr::f64 CScene::getCameraParallaxMouseInfluence () const
|
|
|
{
|
|
|
return this->m_cameraParallaxMouseInfluence;
|
|
|
}
|
|
|
|
|
|
-bool scene::isCameraPreview () const
|
|
|
+bool CScene::isCameraPreview () const
|
|
|
{
|
|
|
return this->m_cameraPreview;
|
|
|
}
|
|
|
|
|
|
-bool scene::isCameraShake () const
|
|
|
+bool CScene::isCameraShake () const
|
|
|
{
|
|
|
return this->m_cameraShake;
|
|
|
}
|
|
|
|
|
|
-irr::f64 scene::getCameraShakeAmplitude () const
|
|
|
+irr::f64 CScene::getCameraShakeAmplitude () const
|
|
|
{
|
|
|
return this->m_cameraShakeAmplitude;
|
|
|
}
|
|
|
|
|
|
-irr::f64 scene::getCameraShakeRoughness () const
|
|
|
+irr::f64 CScene::getCameraShakeRoughness () const
|
|
|
{
|
|
|
return this->m_cameraShakeRoughness;
|
|
|
}
|
|
|
|
|
|
-irr::f64 scene::getCameraShakeSpeed () const
|
|
|
+irr::f64 CScene::getCameraShakeSpeed () const
|
|
|
{
|
|
|
return this->m_cameraShakeSpeed;
|
|
|
}
|
|
|
|
|
|
-const irr::video::SColorf &scene::getClearColor () const
|
|
|
+const irr::video::SColorf &CScene::getClearColor () const
|
|
|
{
|
|
|
return this->m_clearColor;
|
|
|
}
|
|
|
|
|
|
-scenes::projection *scene::getOrthogonalProjection () const
|
|
|
+Scenes::CProjection* CScene::getOrthogonalProjection () const
|
|
|
{
|
|
|
return this->m_orthogonalProjection;
|
|
|
}
|
|
|
|
|
|
-const irr::video::SColorf &scene::getSkylightColor () const
|
|
|
+const irr::video::SColorf &CScene::getSkylightColor () const
|
|
|
{
|
|
|
return this->m_skylightColor;
|
|
|
}
|