diff --git a/doc/samples/btphystest.cpp b/doc/samples/btphystest.cpp index c01abf2d..1593441a 100644 --- a/doc/samples/btphystest.cpp +++ b/doc/samples/btphystest.cpp @@ -206,7 +206,7 @@ void BtPhysTest::InitApp() } #endif //USE_WALL - PhysicsObject* BasePhyobj = NULL; + PhysicsObject* BasePhyobj = nullptr; #if USE_PLATFORM { quat NewRotation = quat::fromeuler_xyz(0.f, 0.f, 0.f); @@ -617,7 +617,7 @@ void BtPhysTest::TickGame(float seconds) if (m_simulation->RayHits(HitResult, ERT_Closest, Character->GetTransform()[3].xyz, (Character->GetTransform()[3].xyz + vec3(.0f, -1.f, .0f)), Character)) Character->AttachTo(HitResult.m_collider_list[0], true, true); else - Character->AttachTo(NULL); + Character->AttachTo(nullptr); } } #endif //USE_CHARACTER @@ -690,7 +690,7 @@ void BtPhysTest::TickDraw(float seconds, Scene &scene) m_cat_sdata->m_tex_uniform = m_cat_texture->GetTexture()->GetTextureUniform(); m_cat_sdata->m_sprite_flip = ((rand(2) == 1)?(1.f):(0.f)) / (float)(NB_SPRITE * PARTICLE_SIZE); PhysObj->SetCustomShaderData(m_cat_sdata); - m_cat_sdata = NULL; + m_cat_sdata = nullptr; } #endif //USE_BODIES #endif //CAT_MODE diff --git a/doc/samples/physics/easycharactercontroller.h b/doc/samples/physics/easycharactercontroller.h index 9e43a014..717c3a88 100644 --- a/doc/samples/physics/easycharactercontroller.h +++ b/doc/samples/physics/easycharactercontroller.h @@ -1,12 +1,14 @@ // -// Lol Engine +// Lol Engine // -// Copyright: (c) 2010-2013 Sam Hocevar -// (c) 2009-2013 Benjamin "Touky" Huet -// This program is free software; you can redistribute it and/or -// modify it under the terms of the Do What The Fuck You Want To -// Public License, Version 2, as published by Sam Hocevar. See -// http://www.wtfpl.net/ for more details. +// Copyright © 2009—2015 Benjamin “Touky” Huet +// © 2010—2015 Sam Hocevar +// +// This library is free software. It comes without any warranty, to +// the extent permitted by applicable law. You can redistribute it +// and/or modify it under the terms of the Do What the Fuck You Want +// to Public License, Version 2, as published by the WTFPL Task Force. +// See http://www.wtfpl.net/ for more details. // #pragma once @@ -40,8 +42,8 @@ class EasyCharacterController : public EasyPhysic, public: EasyCharacterController(WorldEntity* NewOwnerEntity) : EasyPhysic(NewOwnerEntity), - m_pair_caching_object(NULL), - m_character(NULL), + m_pair_caching_object(nullptr), + m_character(nullptr), m_step_height(.0f), m_base_is_updating(false), m_base_cached_movement(vec3(0.f)), diff --git a/doc/samples/physics/easyconstraint.h b/doc/samples/physics/easyconstraint.h index fc5c0084..4e862651 100644 --- a/doc/samples/physics/easyconstraint.h +++ b/doc/samples/physics/easyconstraint.h @@ -36,15 +36,15 @@ class EasyConstraint public: EasyConstraint() : - m_typed_constraint(NULL), - m_p2p_constraint(NULL), - m_hinge_constraint(NULL), - m_slider_constraint(NULL), - m_cone_twist_constraint(NULL), - m_6dof_constraint(NULL), - m_owner_simulation(NULL), - m_a_physobj(NULL), - m_b_physobj(NULL), + m_typed_constraint(nullptr), + m_p2p_constraint(nullptr), + m_hinge_constraint(nullptr), + m_slider_constraint(nullptr), + m_cone_twist_constraint(nullptr), + m_6dof_constraint(nullptr), + m_owner_simulation(nullptr), + m_a_physobj(nullptr), + m_b_physobj(nullptr), m_a_transform(lol::mat4(1.f)), m_b_transform(lol::mat4(1.f)), m_using_ref_a(false), @@ -55,11 +55,11 @@ public: ~EasyConstraint() { delete m_typed_constraint; - m_p2p_constraint = NULL; - m_hinge_constraint = NULL; - m_slider_constraint = NULL; - m_cone_twist_constraint = NULL; - m_6dof_constraint = NULL; + m_p2p_constraint = nullptr; + m_hinge_constraint = nullptr; + m_slider_constraint = nullptr; + m_cone_twist_constraint = nullptr; + m_6dof_constraint = nullptr; } void AddToSimulation(class Simulation* current_simulation); diff --git a/doc/samples/physics/easyphysics.cpp b/doc/samples/physics/easyphysics.cpp index b35792ca..232634f4 100644 --- a/doc/samples/physics/easyphysics.cpp +++ b/doc/samples/physics/easyphysics.cpp @@ -30,26 +30,26 @@ namespace phys //-- EasyPhysic::EasyPhysic(WorldEntity* NewOwnerEntity) : - m_collision_object(NULL), - m_ghost_object(NULL), - m_rigid_body(NULL), + m_collision_object(nullptr), + m_ghost_object(nullptr), + m_rigid_body(nullptr), m_local_inertia(btVector3(.0f, .0f, .0f)), - m_collision_shape(NULL), - m_convex_shape(NULL), - m_motion_state(NULL), + m_collision_shape(nullptr), + m_convex_shape(nullptr), + m_motion_state(nullptr), m_mass(.0f), m_hit_restitution(.0f), m_collision_group(1), m_collision_mask(1), m_owner_entity(NewOwnerEntity), - m_owner_simulation(NULL), - m_base_physic(NULL) + m_owner_simulation(nullptr), + m_base_physic(nullptr) { } EasyPhysic::~EasyPhysic() { - m_rigid_body = NULL; + m_rigid_body = nullptr; delete m_collision_object; delete m_collision_shape; delete m_motion_state; diff --git a/doc/samples/physics/easyphysics.h b/doc/samples/physics/easyphysics.h index c6d3019a..490415ba 100644 --- a/doc/samples/physics/easyphysics.h +++ b/doc/samples/physics/easyphysics.h @@ -46,7 +46,7 @@ public: virtual void SetShapeToCylinder(lol::vec3& cyl_size); virtual void SetShapeToCapsule(float radius, float height); - virtual bool CanChangeCollisionChannel() { return (m_rigid_body == NULL); } + virtual bool CanChangeCollisionChannel() { return (m_rigid_body == nullptr); } virtual mat4 GetTransform(); virtual void SetTransform(const vec3& base_location, const quat& base_rotation = quat(mat3(1.0f))); protected: @@ -130,7 +130,7 @@ public: for (int i = 0; i < m_base_physic->m_based_physic_list.count(); ++i) if (m_base_physic->m_based_physic_list[i] == this) m_base_physic->m_based_physic_list.remove(i--); - m_base_physic = NULL; + m_base_physic = nullptr; } } diff --git a/doc/samples/physics/lolphysics.h b/doc/samples/physics/lolphysics.h index 2dc14daf..cd882505 100644 --- a/doc/samples/physics/lolphysics.h +++ b/doc/samples/physics/lolphysics.h @@ -1,8 +1,14 @@ // -// LolPhysics +// Lol Engine // -// Copyright: (c) 2009-2013 Benjamin "Touky" Huet -// (c) 2012 Sam Hocevar +// Copyright © 2012—2015 Sam Hocevar +// © 2009—2013 Benjamin “Touky” Huet +// +// This library is free software. It comes without any warranty, to +// the extent permitted by applicable law. You can redistribute it +// and/or modify it under the terms of the Do What the Fuck You Want +// to Public License, Version 2, as published by the WTFPL Task Force. +// See http://www.wtfpl.net/ for more details. // #pragma once @@ -154,11 +160,11 @@ public: }; //Returns true when hitting something. If SourceCaster is set, it will be ignored by Raycast. - bool RayHits(RayCastResult& HitResult, eRaycastType RaycastType, const vec3& RayFrom, const vec3& RayTo, EasyPhysic* SourceCaster=NULL) + bool RayHits(RayCastResult& HitResult, eRaycastType RaycastType, const vec3& RayFrom, const vec3& RayTo, EasyPhysic* SourceCaster = nullptr) { bool bResult = false; - btCollisionWorld::RayResultCallback* BtRayResult = NULL; + btCollisionWorld::RayResultCallback* BtRayResult = nullptr; btCollisionWorld::ClosestRayResultCallback* BtRayResult_Closest; btCollisionWorld::AllHitsRayResultCallback* BtRayResult_AllHits; @@ -334,7 +340,7 @@ private: //Adds the given EasyPhysic to the correct list. void ObjectRegistration(bool AddObject, EasyPhysic* NewEP, eEasyPhysicType CurType) { - array* SearchList = NULL; + array* SearchList = nullptr; switch(CurType) { case EEPT_Dynamic: @@ -375,13 +381,13 @@ private: } else { - NewEP->m_owner_simulation = NULL; + NewEP->m_owner_simulation = nullptr; SearchList->remove_item(NewEP); } } void ObjectRegistration(bool AddObject, EasyConstraint* NewEC) { - array* SearchList = NULL; + array* SearchList = nullptr; SearchList = &m_constraint_list; if (AddObject) @@ -391,7 +397,7 @@ private: } else { - NewEC->m_owner_simulation = NULL; + NewEC->m_owner_simulation = nullptr; SearchList->remove_item(NewEC); } } diff --git a/doc/tutorial/11_fractal.cpp b/doc/tutorial/11_fractal.cpp index 6b8c66e3..b1991694 100644 --- a/doc/tutorial/11_fractal.cpp +++ b/doc/tutorial/11_fractal.cpp @@ -106,15 +106,15 @@ public: } #if !defined __native_client__ - m_centertext = new Text(NULL, "data/font/ascii.png"); + m_centertext = new Text(nullptr, "data/font/ascii.png"); m_centertext->SetPos(vec3(5, (float)m_window_size.y - 15, 1)); Ticker::Ref(m_centertext); - m_mousetext = new Text(NULL, "data/font/ascii.png"); + m_mousetext = new Text(nullptr, "data/font/ascii.png"); m_mousetext->SetPos(vec3(5, (float)m_window_size.y - 29, 1)); Ticker::Ref(m_mousetext); - m_zoomtext = new Text(NULL, "data/font/ascii.png"); + m_zoomtext = new Text(nullptr, "data/font/ascii.png"); m_zoomtext->SetPos(vec3(5, (float)m_window_size.y - 43, 1)); Ticker::Ref(m_zoomtext); #endif diff --git a/src/easymesh/easymeshlua.cpp b/src/easymesh/easymeshlua.cpp index 0928be38..765f5a36 100644 --- a/src/easymesh/easymeshlua.cpp +++ b/src/easymesh/easymeshlua.cpp @@ -1,7 +1,7 @@ // // MY CLASS TYPE // -// Copyright 2009-2015 Benjamin "Touky" Huet +// Copyright © 2009-2015 Benjamin "Touky" Huet // // This program is free software. It comes without any warranty, to // the extent permitted by applicable law. You can redistribute it diff --git a/src/lol/algorithm/portal.h b/src/lol/algorithm/portal.h index 44e6bde2..2a5ee717 100644 --- a/src/lol/algorithm/portal.h +++ b/src/lol/algorithm/portal.h @@ -252,7 +252,7 @@ class PortalRoom friend class PortalDoor; public: - PortalRoom(TE* element=nullptr) + PortalRoom(TE* element = nullptr) { m_element = element; } diff --git a/src/lol/math/geometry.h b/src/lol/math/geometry.h index 12aef6f6..dc1c6d5b 100644 --- a/src/lol/math/geometry.h +++ b/src/lol/math/geometry.h @@ -1,12 +1,14 @@ // -// Lol Engine +// Lol Engine // -// Copyright: (c) 2010-2013 Sam Hocevar -// (c) 2010-2013 Benjamin "Touky" Huet -// This program is free software; you can redistribute it and/or -// modify it under the terms of the Do What The Fuck You Want To -// Public License, Version 2, as published by Sam Hocevar. See -// http://www.wtfpl.net/ for more details. +// Copyright © 2010—2015 Sam Hocevar +// © 2010—2015 Benjamin "Touky" Huet +// +// This library is free software. It comes without any warranty, to +// the extent permitted by applicable law. You can redistribute it +// and/or modify it under the terms of the Do What the Fuck You Want +// to Public License, Version 2, as published by the WTFPL Task Force. +// See http://www.wtfpl.net/ for more details. // #pragma once @@ -277,7 +279,7 @@ typedef SafeEnum RayIntersect; int TestRayVsRay(vec3 const &ray_p00, vec3 const &ray_p01, vec3 const &ray_p10, vec3 const &ray_p11, vec3 &isec_p); -bool TestPointVsFrustum(const vec3& point, const mat4& frustum, vec3* result_point=nullptr); +bool TestPointVsFrustum(const vec3& point, const mat4& frustum, vec3* result_point = nullptr); //Ray/Plane : Normal must be given normalized. returns 1 if succeeded. template