From 2f3e165c24b506d67d78edd75a9aa4caa76a9203 Mon Sep 17 00:00:00 2001 From: Rohan Fernandez Date: Sat, 5 Sep 2020 04:13:12 +0530 Subject: [PATCH] - changed namespace from ns_fretBuzz to FRETBUZZ --- .../framework/components/audio_clip.cpp | 2 +- .../framework/components/audio_clip.h | 2 +- .../framework/components/collider_2d.cpp | 2 +- .../framework/components/collider_2d.h | 2 +- .../framework/components/collider_data.h | 2 +- .../gameobject_components/audio_source.cpp | 2 +- .../gameobject_components/audio_source.h | 2 +- .../gameobject_components/behaviour.h | 2 +- .../gameobject_components/camera.cpp | 2 +- .../components/gameobject_components/camera.h | 2 +- .../gameobject_components/canvas.cpp | 2 +- .../components/gameobject_components/canvas.h | 2 +- .../character_controller_2d.cpp | 2 +- .../character_controller_2d.h | 2 +- .../gameobject_components/image.cpp | 2 +- .../components/gameobject_components/image.h | 2 +- .../gameobject_components/light.cpp | 2 +- .../components/gameobject_components/light.h | 2 +- .../gameobject_components/mesh_renderer.cpp | 2 +- .../gameobject_components/mesh_renderer.h | 2 +- .../gameobject_components/rect_collider.cpp | 2 +- .../gameobject_components/rect_collider.h | 2 +- .../sprite_animation_controller.cpp | 2 +- .../sprite_animation_controller.h | 2 +- .../gameobject_components/sprite_renderer.cpp | 2 +- .../gameobject_components/sprite_renderer.h | 2 +- .../gameobject_components/text_renderer.cpp | 2 +- .../gameobject_components/text_renderer.h | 2 +- .../framework/components/raycast_callback.cpp | 2 +- .../framework/components/raycast_callback.h | 2 +- .../framework/components/rect_transform.h | 2 +- .../framework/components/sprite.cpp | 2 +- .../framework/components/sprite.h | 2 +- .../framework/components/sprite_animator.cpp | 2 +- .../framework/components/sprite_animator.h | 2 +- .../framework/components/transform.cpp | 2 +- .../framework/components/transform.h | 2 +- .../framework/components/viewport.cpp | 2 +- .../framework/components/viewport.h | 2 +- .../FretBuzzFramework/framework/fretbuzz.h | 2 +- .../graphics/batch_renderer_manager.cpp | 2 +- .../graphics/batch_renderer_manager.h | 2 +- .../framework/graphics/data_texture.cpp | 2 +- .../framework/graphics/data_texture.h | 2 +- .../framework/graphics/font.cpp | 2 +- .../framework/graphics/font.h | 2 +- .../framework/graphics/font_manager.cpp | 2 +- .../framework/graphics/font_manager.h | 2 +- .../framework/graphics/light_manager.cpp | 2 +- .../framework/graphics/light_manager.h | 2 +- .../graphics/line_batch_renderer.cpp | 2 +- .../framework/graphics/line_batch_renderer.h | 2 +- .../framework/graphics/material.cpp | 2 +- .../framework/graphics/material.h | 2 +- .../framework/graphics/mesh.cpp | 2 +- .../framework/graphics/mesh.h | 2 +- .../framework/graphics/model.cpp | 2 +- .../framework/graphics/model.h | 2 +- .../graphics/post_process_manager.cpp | 2 +- .../framework/graphics/post_process_manager.h | 2 +- .../framework/graphics/rect.h | 2 +- .../framework/graphics/renderer.cpp | 2 +- .../framework/graphics/renderer.h | 2 +- .../framework/graphics/shader.cpp | 2 +- .../framework/graphics/shader.h | 2 +- .../framework/graphics/shader_factory.h | 2 +- .../framework/graphics/shader_manager.cpp | 2 +- .../framework/graphics/shader_manager.h | 2 +- .../graphics/shaders/default_3d_shader.cpp | 2 +- .../graphics/shaders/default_3d_shader.h | 2 +- .../graphics/shaders/default_line_shader.cpp | 2 +- .../graphics/shaders/default_line_shader.h | 2 +- .../graphics/shaders/default_post_process.cpp | 2 +- .../graphics/shaders/default_post_process.h | 2 +- .../shaders/default_sprite_shader.cpp | 2 +- .../graphics/shaders/default_sprite_shader.h | 2 +- .../graphics/shaders/phong_shader.cpp | 2 +- .../framework/graphics/shaders/phong_shader.h | 2 +- .../graphics/sprite_batch_renderer.cpp | 2 +- .../graphics/sprite_batch_renderer.h | 2 +- .../framework/graphics/texture.cpp | 2 +- .../framework/graphics/texture.h | 2 +- .../framework/system/asset_loader.cpp | 2 +- .../framework/system/asset_loader.h | 2 +- .../framework/system/audio_engine.cpp | 2 +- .../framework/system/audio_engine.h | 2 +- .../framework/system/camera_manager.cpp | 2 +- .../framework/system/camera_manager.h | 2 +- .../framework/system/component.cpp | 2 +- .../framework/system/component.h | 2 +- .../framework/system/component_2d.h | 2 +- .../system/editor/editor_inspector.cpp | 2 +- .../system/editor/editor_inspector.h | 2 +- .../framework/system/event/action.h | 2 +- .../framework/system/event/delegate.h | 2 +- .../framework/system/event/event_manager.cpp | 2 +- .../framework/system/event/event_manager.h | 2 +- .../framework/system/event/event_system.cpp | 2 +- .../framework/system/event/event_system.h | 2 +- .../framework/system/game_object.cpp | 2 +- .../framework/system/game_object.h | 2 +- .../framework/system/game_object_2d.cpp | 2 +- .../framework/system/game_object_2d.h | 2 +- .../framework/system/game_startup.h | 2 +- .../framework/system/input.cpp | 2 +- .../framework/system/input.h | 2 +- .../framework/system/layer/layer.cpp | 2 +- .../framework/system/layer/layer.h | 2 +- .../framework/system/layer/layer_manager.cpp | 2 +- .../framework/system/layer/layer_manager.h | 2 +- .../framework/system/layer/layer_mask.cpp | 2 +- .../framework/system/layer/layer_mask.h | 2 +- .../framework/system/log.cpp | 2 +- .../FretBuzzFramework/framework/system/log.h | 22 ++++---- .../framework/system/managed_resource.h | 2 +- .../framework/system/master_renderer.cpp | 2 +- .../framework/system/master_renderer.h | 2 +- .../framework/system/physics_engine.cpp | 2 +- .../framework/system/physics_engine.h | 2 +- .../framework/system/resource_manager.cpp | 2 +- .../framework/system/resource_manager.h | 2 +- .../framework/system/scene_manager.cpp | 2 +- .../framework/system/scene_manager.h | 2 +- .../framework/system/system.cpp | 2 +- .../framework/system/system.h | 2 +- .../system_layer/editor_system_layer.cpp | 2 +- .../system/system_layer/editor_system_layer.h | 2 +- .../system/system_layer/game_system_layer.cpp | 2 +- .../system/system_layer/game_system_layer.h | 2 +- .../system/system_layer/system_layer_base.h | 2 +- .../system_layer/system_layer_stack.cpp | 2 +- .../system/system_layer/system_layer_stack.h | 2 +- .../framework/system/window.cpp | 2 +- .../framework/system/window.h | 2 +- .../FretBuzzFramework/framework/utils/FSM.h | 2 +- .../framework/utils/file_utils.cpp | 2 +- .../framework/utils/file_utils.h | 2 +- .../framework/utils/pool/gameobject_pool.h | 2 +- .../framework/utils/pool/object_pool.h | 2 +- .../framework/utils/resource_container.h | 2 +- FretBuzz/FretBuzzFramework/game_startup.cpp | 2 +- FretBuzz/FretBuzzFramework/main.h | 4 +- .../game/managers/InteractiveObject.cpp | 14 ++--- .../Sandbox/game/managers/InteractiveObject.h | 16 +++--- .../Sandbox/game/managers/bullet/bullet.cpp | 16 +++--- .../Sandbox/game/managers/bullet/bullet.h | 16 +++--- .../game/managers/cursor/cursor_manager.cpp | 10 ++-- .../game/managers/cursor/cursor_manager.h | 8 +-- .../game/managers/enemy/EnemyController.cpp | 16 +++--- .../game/managers/enemy/EnemyController.h | 22 ++++---- .../managers/player/PlayerControllerHM.cpp | 46 +++++++-------- .../game/managers/player/PlayerControllerHM.h | 24 ++++---- .../Sandbox/game/managers/weapon/weapon.cpp | 26 ++++----- .../Sandbox/game/managers/weapon/weapon.h | 16 +++--- .../game/managers/weapon/weapon_manager.h | 8 +-- .../game/managers/weapon/weapon_manger.cpp | 8 +-- .../Sandbox/game/prefab/prefab_bullet.cpp | 16 +++--- FretBuzz/Sandbox/game/prefab/prefab_bullet.h | 6 +- FretBuzz/Sandbox/game/prefab/prefab_enemy.cpp | 18 +++--- FretBuzz/Sandbox/game/prefab/prefab_enemy.h | 4 +- .../game/prefab/prefab_game_manager.cpp | 6 +- .../Sandbox/game/prefab/prefab_game_manager.h | 4 +- .../Sandbox/game/prefab/prefab_player.cpp | 20 +++---- FretBuzz/Sandbox/game/prefab/prefab_player.h | 4 +- FretBuzz/Sandbox/game/prefab/prefab_wall.cpp | 10 ++-- FretBuzz/Sandbox/game/prefab/prefab_wall.h | 4 +- .../Sandbox/game/prefab/prefab_weapon.cpp | 14 ++--- FretBuzz/Sandbox/game/prefab/prefab_weapon.h | 6 +- .../Sandbox/game/scenes/gameplay_scene.cpp | 50 ++++++++--------- FretBuzz/Sandbox/game/scenes/gameplay_scene.h | 2 +- FretBuzz/Sandbox/imgui.ini | 11 +--- FretBuzz/Sandbox/sandbox.cpp | 6 +- FretBuzz/Sandbox/test/CharacterTest.cpp | 32 +++++------ FretBuzz/Sandbox/test/CharacterTest.h | 18 +++--- FretBuzz/Sandbox/test/EnemyTest.cpp | 10 ++-- FretBuzz/Sandbox/test/EnemyTest.h | 6 +- FretBuzz/Sandbox/test/PlayerController.h | 26 ++++----- FretBuzz/Sandbox/test/light_cube.h | 24 ++++---- FretBuzz/Sandbox/test/scenes/init_state.h | 16 +++--- .../Sandbox/test/scenes/threed_test_setup.h | 56 +++++++++---------- FretBuzz/Sandbox/test/test_cube.h | 48 ++++++++-------- 181 files changed, 482 insertions(+), 487 deletions(-) diff --git a/FretBuzz/FretBuzzFramework/framework/components/audio_clip.cpp b/FretBuzz/FretBuzzFramework/framework/components/audio_clip.cpp index a1252a5..23c4593 100644 --- a/FretBuzz/FretBuzzFramework/framework/components/audio_clip.cpp +++ b/FretBuzz/FretBuzzFramework/framework/components/audio_clip.cpp @@ -2,7 +2,7 @@ #include "audio_clip.h" #include -namespace ns_fretBuzz +namespace FRETBUZZ { AudioClip::AudioClip(std::string a_strAudioFilePath) : IManagedResource() diff --git a/FretBuzz/FretBuzzFramework/framework/components/audio_clip.h b/FretBuzz/FretBuzzFramework/framework/components/audio_clip.h index 79ea8c3..fb0981f 100644 --- a/FretBuzz/FretBuzzFramework/framework/components/audio_clip.h +++ b/FretBuzz/FretBuzzFramework/framework/components/audio_clip.h @@ -2,7 +2,7 @@ #include #include -namespace ns_fretBuzz +namespace FRETBUZZ { class AudioClip : public IManagedResource { diff --git a/FretBuzz/FretBuzzFramework/framework/components/collider_2d.cpp b/FretBuzz/FretBuzzFramework/framework/components/collider_2d.cpp index b005f0d..1ba70ae 100644 --- a/FretBuzz/FretBuzzFramework/framework/components/collider_2d.cpp +++ b/FretBuzz/FretBuzzFramework/framework/components/collider_2d.cpp @@ -2,7 +2,7 @@ #include "collider_2d.h" #include -namespace ns_fretBuzz +namespace FRETBUZZ { Collider2D::Collider2D(GameObject2D* a_GameObject2D, ColliderData& a_ColliderData) : IComponent2D(COMPONENT_TYPE::COLLIDER_2D, a_GameObject2D), diff --git a/FretBuzz/FretBuzzFramework/framework/components/collider_2d.h b/FretBuzz/FretBuzzFramework/framework/components/collider_2d.h index 5eb5bc8..3d9d4ac 100644 --- a/FretBuzz/FretBuzzFramework/framework/components/collider_2d.h +++ b/FretBuzz/FretBuzzFramework/framework/components/collider_2d.h @@ -2,7 +2,7 @@ #include #include -namespace ns_fretBuzz +namespace FRETBUZZ { class Collider2D : public IComponent2D, protected b2ContactListener { diff --git a/FretBuzz/FretBuzzFramework/framework/components/collider_data.h b/FretBuzz/FretBuzzFramework/framework/components/collider_data.h index 2fbb591..92d617d 100644 --- a/FretBuzz/FretBuzzFramework/framework/components/collider_data.h +++ b/FretBuzz/FretBuzzFramework/framework/components/collider_data.h @@ -1,7 +1,7 @@ #pragma once #include -namespace ns_fretBuzz +namespace FRETBUZZ { struct ColliderData { diff --git a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/audio_source.cpp b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/audio_source.cpp index 4493fbb..52fa761 100644 --- a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/audio_source.cpp +++ b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/audio_source.cpp @@ -4,7 +4,7 @@ #include "system/game_object.h" #include -namespace ns_fretBuzz +namespace FRETBUZZ { AudioSource::AudioSource(GameObject* a_GameObj, bool a_bIsPlayOnAwake) : IComponent(COMPONENT_TYPE::AUDIO_SOURCE, a_GameObj) diff --git a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/audio_source.h b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/audio_source.h index 29af633..4279465 100644 --- a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/audio_source.h +++ b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/audio_source.h @@ -3,7 +3,7 @@ #include "system/component.h" #include "../audio_clip.h" -namespace ns_fretBuzz +namespace FRETBUZZ { class GameObject; class AudioSource : public IComponent diff --git a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/behaviour.h b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/behaviour.h index ffae14f..3ec804c 100644 --- a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/behaviour.h +++ b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/behaviour.h @@ -3,7 +3,7 @@ #include "system/component_2d.h" #include -namespace ns_fretBuzz +namespace FRETBUZZ { class GameObject; class Behaviour : public IComponent diff --git a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/camera.cpp b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/camera.cpp index 436a768..2050f1e 100644 --- a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/camera.cpp +++ b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/camera.cpp @@ -5,7 +5,7 @@ #include "system/camera_manager.h" #include -namespace ns_fretBuzz +namespace FRETBUZZ { Camera::Camera(GameObject* a_GameObj, Viewport::PROJECTION_TYPE a_ProjectionType, Viewport* a_Viewport, const LayerMask& a_LayerMask, glm::vec4 a_vec4ClearColour) : IComponent(COMPONENT_TYPE::CAMERA, a_GameObj), diff --git a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/camera.h b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/camera.h index aaead8f..dfce2dd 100644 --- a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/camera.h +++ b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/camera.h @@ -3,7 +3,7 @@ #include "components/viewport.h" #include "system/layer/layer_mask.h" -namespace ns_fretBuzz +namespace FRETBUZZ { class GameObject; class Camera : public IComponent diff --git a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/canvas.cpp b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/canvas.cpp index 832ed55..ffdc708 100644 --- a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/canvas.cpp +++ b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/canvas.cpp @@ -2,7 +2,7 @@ #include "canvas.h" #include -namespace ns_fretBuzz +namespace FRETBUZZ { Canvas::Canvas(GameObject2D* a_GameObject2D, CanvasData& a_CanvasData, bool a_bIsEnabled) : IComponent2D(COMPONENT_TYPE::CANVAS, a_GameObject2D, a_bIsEnabled) diff --git a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/canvas.h b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/canvas.h index 9ce2d9c..1eee799 100644 --- a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/canvas.h +++ b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/canvas.h @@ -1,7 +1,7 @@ #pragma once #include "system/component_2d.h" -namespace ns_fretBuzz +namespace FRETBUZZ { enum class CANVAS_SPACE_TYPE { diff --git a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/character_controller_2d.cpp b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/character_controller_2d.cpp index b38ea84..3915ac5 100644 --- a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/character_controller_2d.cpp +++ b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/character_controller_2d.cpp @@ -2,7 +2,7 @@ #include "character_controller_2d.h" #include "system/game_object.h" -namespace ns_fretBuzz +namespace FRETBUZZ { CharacterController2D::CharacterController2D(GameObject* a_GameObject) : IComponent(COMPONENT_TYPE::CHARACTER_CONTROLLER_2D, a_GameObject) diff --git a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/character_controller_2d.h b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/character_controller_2d.h index 9c3e19c..a02a8b6 100644 --- a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/character_controller_2d.h +++ b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/character_controller_2d.h @@ -1,7 +1,7 @@ #pragma once #include "system/component.h" -namespace ns_fretBuzz +namespace FRETBUZZ { class GameObject; class CharacterController2D : public IComponent diff --git a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/image.cpp b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/image.cpp index e407eee..5e13d9d 100644 --- a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/image.cpp +++ b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/image.cpp @@ -5,7 +5,7 @@ #include #include "graphics/shader_manager.h" -namespace ns_fretBuzz +namespace FRETBUZZ { const std::vector Image::s_vectTexcoords = { diff --git a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/image.h b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/image.h index ba15117..814c560 100644 --- a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/image.h +++ b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/image.h @@ -3,7 +3,7 @@ #include "../sprite.h" #include "graphics/material.h" -namespace ns_fretBuzz +namespace FRETBUZZ { class GameObject2D; class Image : public IComponent2D diff --git a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/light.cpp b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/light.cpp index c050f60..0a40b0b 100644 --- a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/light.cpp +++ b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/light.cpp @@ -3,7 +3,7 @@ #include "system/game_object.h" #include "graphics/light_manager.h" -namespace ns_fretBuzz +namespace FRETBUZZ { Light::Light(GameObject* a_GameObj, LIGHT_TYPE a_LightType) : IComponent(COMPONENT_TYPE::LIGHT , a_GameObj ), diff --git a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/light.h b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/light.h index 2d5dc28..d4eaaa0 100644 --- a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/light.h +++ b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/light.h @@ -3,7 +3,7 @@ #include "system/component.h" #include "graphics/shader.h" -namespace ns_fretBuzz +namespace FRETBUZZ { class GameObject; class Light : public IComponent diff --git a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/mesh_renderer.cpp b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/mesh_renderer.cpp index bb93a9b..8d862c6 100644 --- a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/mesh_renderer.cpp +++ b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/mesh_renderer.cpp @@ -3,7 +3,7 @@ #include "system/game_object.h" #include "graphics/shader_manager.h" -namespace ns_fretBuzz +namespace FRETBUZZ { MeshRenderer::MeshRenderer(GameObject* a_GameObject, Mesh& a_Mesh) : IComponent(COMPONENT_TYPE::MESH_RENDERER, a_GameObject), diff --git a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/mesh_renderer.h b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/mesh_renderer.h index 5489b8f..7de0feb 100644 --- a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/mesh_renderer.h +++ b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/mesh_renderer.h @@ -5,7 +5,7 @@ #include "graphics/renderer.h" #include "graphics/mesh.h" -namespace ns_fretBuzz +namespace FRETBUZZ { class GameObject; class MeshRenderer : public IComponent, public IRenderer diff --git a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/rect_collider.cpp b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/rect_collider.cpp index 47a9423..e5cc87f 100644 --- a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/rect_collider.cpp +++ b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/rect_collider.cpp @@ -6,7 +6,7 @@ #include #include "graphics/shader_manager.h" -namespace ns_fretBuzz +namespace FRETBUZZ { RectCollider::RectCollider(GameObject2D* a_GameObject, ColliderData& a_RectColliderData) : diff --git a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/rect_collider.h b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/rect_collider.h index 177cfd3..49a6569 100644 --- a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/rect_collider.h +++ b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/rect_collider.h @@ -2,7 +2,7 @@ #include #include -namespace ns_fretBuzz +namespace FRETBUZZ { class GameObject2D; class RectCollider : public Collider2D diff --git a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/sprite_animation_controller.cpp b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/sprite_animation_controller.cpp index 1066eb0..9b6fb0a 100644 --- a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/sprite_animation_controller.cpp +++ b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/sprite_animation_controller.cpp @@ -3,7 +3,7 @@ #include #include "system/game_object.h" -namespace ns_fretBuzz +namespace FRETBUZZ { SpriteAnimationController::SpriteAnimationController(GameObject* a_GameObj, std::string a_strAnimatorId) : IComponent(COMPONENT_TYPE::SPRITE_ANIMATION_CONTROLLER, a_GameObj) diff --git a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/sprite_animation_controller.h b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/sprite_animation_controller.h index 1059899..9ada95f 100644 --- a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/sprite_animation_controller.h +++ b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/sprite_animation_controller.h @@ -2,7 +2,7 @@ #include "../sprite_animator.h" #include "sprite_renderer.h" -namespace ns_fretBuzz +namespace FRETBUZZ { class SpriteAnimationController : public IComponent { diff --git a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/sprite_renderer.cpp b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/sprite_renderer.cpp index 83102df..398181f 100644 --- a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/sprite_renderer.cpp +++ b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/sprite_renderer.cpp @@ -6,7 +6,7 @@ #include "graphics/sprite_batch_renderer.h" #include "graphics/shader_manager.h" -namespace ns_fretBuzz +namespace FRETBUZZ { SpriteRenderer::SpriteRenderer(GameObject* a_GameObj, Sprite* a_Sprite) : IComponent(COMPONENT_TYPE::SPRITE_RENDERER, a_GameObj), diff --git a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/sprite_renderer.h b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/sprite_renderer.h index b0002d9..3b1c437 100644 --- a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/sprite_renderer.h +++ b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/sprite_renderer.h @@ -4,7 +4,7 @@ #include "graphics/material.h" #include "graphics/renderer.h" -namespace ns_fretBuzz +namespace FRETBUZZ { class GameObject; class SpriteRenderer : public IComponent, public IRenderer diff --git a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/text_renderer.cpp b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/text_renderer.cpp index c191fb0..26d3f6f 100644 --- a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/text_renderer.cpp +++ b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/text_renderer.cpp @@ -2,7 +2,7 @@ #include "text_renderer.h" #include -namespace ns_fretBuzz +namespace FRETBUZZ { TextRenderer::TextRenderer(GameObject* a_GameObj, std::string a_strText, std::string a_strFontName) : IComponent(COMPONENT_TYPE::TEXT_RENDERER, a_GameObj) diff --git a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/text_renderer.h b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/text_renderer.h index 1f27678..6e5d22c 100644 --- a/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/text_renderer.h +++ b/FretBuzz/FretBuzzFramework/framework/components/gameobject_components/text_renderer.h @@ -2,7 +2,7 @@ #include "system/component.h" #include "graphics/font_manager.h" -namespace ns_fretBuzz +namespace FRETBUZZ { class TextRenderer : public IComponent { diff --git a/FretBuzz/FretBuzzFramework/framework/components/raycast_callback.cpp b/FretBuzz/FretBuzzFramework/framework/components/raycast_callback.cpp index 9724724..9ebd87e 100644 --- a/FretBuzz/FretBuzzFramework/framework/components/raycast_callback.cpp +++ b/FretBuzz/FretBuzzFramework/framework/components/raycast_callback.cpp @@ -1,7 +1,7 @@ #include #include "raycast_callback.h" -namespace ns_fretBuzz +namespace FRETBUZZ { void RaycastCallback::reset() { diff --git a/FretBuzz/FretBuzzFramework/framework/components/raycast_callback.h b/FretBuzz/FretBuzzFramework/framework/components/raycast_callback.h index df5746f..f161e6d 100644 --- a/FretBuzz/FretBuzzFramework/framework/components/raycast_callback.h +++ b/FretBuzz/FretBuzzFramework/framework/components/raycast_callback.h @@ -1,7 +1,7 @@ #pragma once #include -namespace ns_fretBuzz +namespace FRETBUZZ { class Collider2D; class RaycastCallback : public b2RayCastCallback diff --git a/FretBuzz/FretBuzzFramework/framework/components/rect_transform.h b/FretBuzz/FretBuzzFramework/framework/components/rect_transform.h index 7770e99..7c60bf3 100644 --- a/FretBuzz/FretBuzzFramework/framework/components/rect_transform.h +++ b/FretBuzz/FretBuzzFramework/framework/components/rect_transform.h @@ -2,7 +2,7 @@ #include "transform.h" #include "graphics/rect.h" -namespace ns_fretBuzz +namespace FRETBUZZ { class RectTransform : public Transform { diff --git a/FretBuzz/FretBuzzFramework/framework/components/sprite.cpp b/FretBuzz/FretBuzzFramework/framework/components/sprite.cpp index 79e9e57..1cf7d03 100644 --- a/FretBuzz/FretBuzzFramework/framework/components/sprite.cpp +++ b/FretBuzz/FretBuzzFramework/framework/components/sprite.cpp @@ -1,7 +1,7 @@ #include #include "sprite.h" -namespace ns_fretBuzz +namespace FRETBUZZ { SpriteGroup::SpriteGroup(Texture* a_pTexture, std::vector a_vectSpriteData) : m_vectSpriteData{a_vectSpriteData}, diff --git a/FretBuzz/FretBuzzFramework/framework/components/sprite.h b/FretBuzz/FretBuzzFramework/framework/components/sprite.h index 823e9f6..ca18fa6 100644 --- a/FretBuzz/FretBuzzFramework/framework/components/sprite.h +++ b/FretBuzz/FretBuzzFramework/framework/components/sprite.h @@ -3,7 +3,7 @@ #include "system/game_object.h" #include "viewport.h" -namespace ns_fretBuzz +namespace FRETBUZZ { class Sprite { diff --git a/FretBuzz/FretBuzzFramework/framework/components/sprite_animator.cpp b/FretBuzz/FretBuzzFramework/framework/components/sprite_animator.cpp index 26afdcc..4ef35f9 100644 --- a/FretBuzz/FretBuzzFramework/framework/components/sprite_animator.cpp +++ b/FretBuzz/FretBuzzFramework/framework/components/sprite_animator.cpp @@ -1,7 +1,7 @@ #include #include "sprite_animator.h" -namespace ns_fretBuzz +namespace FRETBUZZ { void SpriteAnimator::destroyResource() { diff --git a/FretBuzz/FretBuzzFramework/framework/components/sprite_animator.h b/FretBuzz/FretBuzzFramework/framework/components/sprite_animator.h index 6c2ad81..1a0e725 100644 --- a/FretBuzz/FretBuzzFramework/framework/components/sprite_animator.h +++ b/FretBuzz/FretBuzzFramework/framework/components/sprite_animator.h @@ -2,7 +2,7 @@ #include #include "../components/sprite.h" -namespace ns_fretBuzz +namespace FRETBUZZ { class AnimationState { diff --git a/FretBuzz/FretBuzzFramework/framework/components/transform.cpp b/FretBuzz/FretBuzzFramework/framework/components/transform.cpp index 4f11ccc..ac361b9 100644 --- a/FretBuzz/FretBuzzFramework/framework/components/transform.cpp +++ b/FretBuzz/FretBuzzFramework/framework/components/transform.cpp @@ -1,7 +1,7 @@ #include #include "transform.h" -namespace ns_fretBuzz +namespace FRETBUZZ { Transform::Transform(glm::vec3 a_v3Position, glm::vec3 a_v3Rotation, glm::vec3 a_v3Scale, Transform* a_pParentTransform) : m_pParentTransform{ a_pParentTransform } diff --git a/FretBuzz/FretBuzzFramework/framework/components/transform.h b/FretBuzz/FretBuzzFramework/framework/components/transform.h index fc3b436..8c8e2d1 100644 --- a/FretBuzz/FretBuzzFramework/framework/components/transform.h +++ b/FretBuzz/FretBuzzFramework/framework/components/transform.h @@ -1,7 +1,7 @@ #pragma once #include -namespace ns_fretBuzz +namespace FRETBUZZ { class Transform { diff --git a/FretBuzz/FretBuzzFramework/framework/components/viewport.cpp b/FretBuzz/FretBuzzFramework/framework/components/viewport.cpp index 6d6c3d2..39cf83a 100644 --- a/FretBuzz/FretBuzzFramework/framework/components/viewport.cpp +++ b/FretBuzz/FretBuzzFramework/framework/components/viewport.cpp @@ -1,7 +1,7 @@ #include #include "viewport.h" -namespace ns_fretBuzz +namespace FRETBUZZ { Viewport::Viewport(PROJECTION_TYPE a_ProjectionType, glm::mat4 a_mat4Projection, glm::vec2 a_v2OriginXY01, glm::vec2 a_v2DimensionWH01) : m_mat4Projection{ a_mat4Projection }, diff --git a/FretBuzz/FretBuzzFramework/framework/components/viewport.h b/FretBuzz/FretBuzzFramework/framework/components/viewport.h index bb914b4..7a8d83b 100644 --- a/FretBuzz/FretBuzzFramework/framework/components/viewport.h +++ b/FretBuzz/FretBuzzFramework/framework/components/viewport.h @@ -3,7 +3,7 @@ #include "transform.h" #include -namespace ns_fretBuzz +namespace FRETBUZZ { class Viewport { diff --git a/FretBuzz/FretBuzzFramework/framework/fretbuzz.h b/FretBuzz/FretBuzzFramework/framework/fretbuzz.h index 10a99b5..3d1b916 100644 --- a/FretBuzz/FretBuzzFramework/framework/fretbuzz.h +++ b/FretBuzz/FretBuzzFramework/framework/fretbuzz.h @@ -12,7 +12,7 @@ #else #endif -namespace ns_fretBuzz +namespace FRETBUZZ { ///System Consts constexpr char* FRETBUZZ_ON_WINDOW_RESIZE = "FRETBUZZ_ON_WINDOW_RESIZE"; diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/batch_renderer_manager.cpp b/FretBuzz/FretBuzzFramework/framework/graphics/batch_renderer_manager.cpp index a5ba97f..4e3875e 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/batch_renderer_manager.cpp +++ b/FretBuzz/FretBuzzFramework/framework/graphics/batch_renderer_manager.cpp @@ -4,7 +4,7 @@ #include "sprite_batch_renderer.h" #include "line_batch_renderer.h" -namespace ns_fretBuzz +namespace FRETBUZZ { //singleton instance BatchRendererManager* BatchRendererManager:: s_pInstance = nullptr; diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/batch_renderer_manager.h b/FretBuzz/FretBuzzFramework/framework/graphics/batch_renderer_manager.h index 2744dcb..1bad055 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/batch_renderer_manager.h +++ b/FretBuzz/FretBuzzFramework/framework/graphics/batch_renderer_manager.h @@ -1,7 +1,7 @@ #pragma once #include "renderer.h" -namespace ns_fretBuzz +namespace FRETBUZZ { class IBatchRenderer : public IRenderer { diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/data_texture.cpp b/FretBuzz/FretBuzzFramework/framework/graphics/data_texture.cpp index 0ac378b..817eca3 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/data_texture.cpp +++ b/FretBuzz/FretBuzzFramework/framework/graphics/data_texture.cpp @@ -1,7 +1,7 @@ #include #include "data_texture.h" -namespace ns_fretBuzz +namespace FRETBUZZ { DataTexture::DataTexture(unsigned int a_uiWidth, unsigned int a_uiHeight, void* a_pData, GLenum a_ColorFormat) : Texture() diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/data_texture.h b/FretBuzz/FretBuzzFramework/framework/graphics/data_texture.h index 4c01082..b94c1ed 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/data_texture.h +++ b/FretBuzz/FretBuzzFramework/framework/graphics/data_texture.h @@ -1,7 +1,7 @@ #pragma once #include "texture.h" -namespace ns_fretBuzz +namespace FRETBUZZ { class DataTexture : public Texture { diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/font.cpp b/FretBuzz/FretBuzzFramework/framework/graphics/font.cpp index b1e7521..a601d08 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/font.cpp +++ b/FretBuzz/FretBuzzFramework/framework/graphics/font.cpp @@ -3,7 +3,7 @@ #include #include "font.h" -namespace ns_fretBuzz +namespace FRETBUZZ { Font::Font(std::string a_strName) : m_strName{ a_strName } diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/font.h b/FretBuzz/FretBuzzFramework/framework/graphics/font.h index 1175f9e..a854604 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/font.h +++ b/FretBuzz/FretBuzzFramework/framework/graphics/font.h @@ -1,7 +1,7 @@ #pragma once #include -namespace ns_fretBuzz +namespace FRETBUZZ { class Font : public IManagedResource { diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/font_manager.cpp b/FretBuzz/FretBuzzFramework/framework/graphics/font_manager.cpp index 25e24d7..a014302 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/font_manager.cpp +++ b/FretBuzz/FretBuzzFramework/framework/graphics/font_manager.cpp @@ -1,7 +1,7 @@ #include #include "font_manager.h" -namespace ns_fretBuzz +namespace FRETBUZZ { //singleton FontManager* FontManager::s_pInstance = nullptr; diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/font_manager.h b/FretBuzz/FretBuzzFramework/framework/graphics/font_manager.h index a2e11b9..5a337dc 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/font_manager.h +++ b/FretBuzz/FretBuzzFramework/framework/graphics/font_manager.h @@ -3,7 +3,7 @@ #include FT_FREETYPE_H #include "font.h" -namespace ns_fretBuzz +namespace FRETBUZZ { class FontManager { diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/light_manager.cpp b/FretBuzz/FretBuzzFramework/framework/graphics/light_manager.cpp index fdcc21b..bebec67 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/light_manager.cpp +++ b/FretBuzz/FretBuzzFramework/framework/graphics/light_manager.cpp @@ -2,7 +2,7 @@ #include "components/gameobject_components/light.h" #include "light_manager.h" -namespace ns_fretBuzz +namespace FRETBUZZ { //singleton instance LightManager* LightManager::s_pInstance = nullptr; diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/light_manager.h b/FretBuzz/FretBuzzFramework/framework/graphics/light_manager.h index 7432db6..63f10bb 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/light_manager.h +++ b/FretBuzz/FretBuzzFramework/framework/graphics/light_manager.h @@ -1,7 +1,7 @@ #pragma once #include "utils/resource_container.h" -namespace ns_fretBuzz +namespace FRETBUZZ { class Light; class LightManager : public ResourceContainer> diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/line_batch_renderer.cpp b/FretBuzz/FretBuzzFramework/framework/graphics/line_batch_renderer.cpp index a3ccf4f..fdba7df 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/line_batch_renderer.cpp +++ b/FretBuzz/FretBuzzFramework/framework/graphics/line_batch_renderer.cpp @@ -2,7 +2,7 @@ #include "line_batch_renderer.h" #include -namespace ns_fretBuzz +namespace FRETBUZZ { LineBatchRenderer* LineBatchRenderer::s_pInstance = nullptr; diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/line_batch_renderer.h b/FretBuzz/FretBuzzFramework/framework/graphics/line_batch_renderer.h index b89f333..014e795 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/line_batch_renderer.h +++ b/FretBuzz/FretBuzzFramework/framework/graphics/line_batch_renderer.h @@ -2,7 +2,7 @@ #include "batch_renderer_manager.h" #include -namespace ns_fretBuzz +namespace FRETBUZZ { struct LineData { diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/material.cpp b/FretBuzz/FretBuzzFramework/framework/graphics/material.cpp index 541f925..bf10a72 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/material.cpp +++ b/FretBuzz/FretBuzzFramework/framework/graphics/material.cpp @@ -4,7 +4,7 @@ #include "components/gameobject_components/camera.h" #include "system/game_object.h" -namespace ns_fretBuzz +namespace FRETBUZZ { Material::Material() { diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/material.h b/FretBuzz/FretBuzzFramework/framework/graphics/material.h index 75525f4..6c380f3 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/material.h +++ b/FretBuzz/FretBuzzFramework/framework/graphics/material.h @@ -2,7 +2,7 @@ #include "shader.h" #include "texture.h" -namespace ns_fretBuzz +namespace FRETBUZZ { class Camera; class Material diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/mesh.cpp b/FretBuzz/FretBuzzFramework/framework/graphics/mesh.cpp index e73332a..36cf9bf 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/mesh.cpp +++ b/FretBuzz/FretBuzzFramework/framework/graphics/mesh.cpp @@ -2,7 +2,7 @@ #include "mesh.h" #include -namespace ns_fretBuzz +namespace FRETBUZZ { Mesh::Mesh(std::vector a_vectVertices, std::vector a_vectIndices, std::vector a_vectTextures) diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/mesh.h b/FretBuzz/FretBuzzFramework/framework/graphics/mesh.h index eeb99f9..0cff21e 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/mesh.h +++ b/FretBuzz/FretBuzzFramework/framework/graphics/mesh.h @@ -2,7 +2,7 @@ #include "texture.h" #include -namespace ns_fretBuzz +namespace FRETBUZZ { class Mesh { diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/model.cpp b/FretBuzz/FretBuzzFramework/framework/graphics/model.cpp index 06b08c9..4d4a60c 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/model.cpp +++ b/FretBuzz/FretBuzzFramework/framework/graphics/model.cpp @@ -4,7 +4,7 @@ #include "texture.h" #include "components/gameobject_components/mesh_renderer.h" -namespace ns_fretBuzz +namespace FRETBUZZ { Model::Model(std::string a_strModelPath) : IManagedResource() diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/model.h b/FretBuzz/FretBuzzFramework/framework/graphics/model.h index 229c77d..68be69b 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/model.h +++ b/FretBuzz/FretBuzzFramework/framework/graphics/model.h @@ -7,7 +7,7 @@ #include "mesh.h" #include "system/game_object.h" -namespace ns_fretBuzz +namespace FRETBUZZ { struct Node { diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/post_process_manager.cpp b/FretBuzz/FretBuzzFramework/framework/graphics/post_process_manager.cpp index 8f66ebf..3c79013 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/post_process_manager.cpp +++ b/FretBuzz/FretBuzzFramework/framework/graphics/post_process_manager.cpp @@ -5,7 +5,7 @@ #include #include -namespace ns_fretBuzz +namespace FRETBUZZ { //singleton instance PostProcessManager* PostProcessManager:: s_pInstance = nullptr; diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/post_process_manager.h b/FretBuzz/FretBuzzFramework/framework/graphics/post_process_manager.h index 1e48afa..d2f89ee 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/post_process_manager.h +++ b/FretBuzz/FretBuzzFramework/framework/graphics/post_process_manager.h @@ -2,7 +2,7 @@ #include "data_texture.h" #include "material.h" -namespace ns_fretBuzz +namespace FRETBUZZ { class PostProcessManager { diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/rect.h b/FretBuzz/FretBuzzFramework/framework/graphics/rect.h index 57beea1..c1dde96 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/rect.h +++ b/FretBuzz/FretBuzzFramework/framework/graphics/rect.h @@ -1,6 +1,6 @@ #pragma once -namespace ns_fretBuzz +namespace FRETBUZZ { struct Rect { diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/renderer.cpp b/FretBuzz/FretBuzzFramework/framework/graphics/renderer.cpp index 8e61592..e557f09 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/renderer.cpp +++ b/FretBuzz/FretBuzzFramework/framework/graphics/renderer.cpp @@ -1,7 +1,7 @@ #include #include "renderer.h" -namespace ns_fretBuzz +namespace FRETBUZZ { IRenderer::IRenderer() { diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/renderer.h b/FretBuzz/FretBuzzFramework/framework/graphics/renderer.h index 11af6a6..7be0d28 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/renderer.h +++ b/FretBuzz/FretBuzzFramework/framework/graphics/renderer.h @@ -1,7 +1,7 @@ #pragma once #include "material.h" -namespace ns_fretBuzz +namespace FRETBUZZ { class IRenderer { diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/shader.cpp b/FretBuzz/FretBuzzFramework/framework/graphics/shader.cpp index a04e9ee..fc44698 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/shader.cpp +++ b/FretBuzz/FretBuzzFramework/framework/graphics/shader.cpp @@ -7,7 +7,7 @@ #include "shader_manager.h" -namespace ns_fretBuzz +namespace FRETBUZZ { Shader::Shader(const std::string l_strShaderName, SHADER_TYPE a_ShaderType) : diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/shader.h b/FretBuzz/FretBuzzFramework/framework/graphics/shader.h index fbaeecd..68f273c 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/shader.h +++ b/FretBuzz/FretBuzzFramework/framework/graphics/shader.h @@ -3,7 +3,7 @@ #include #include -namespace ns_fretBuzz +namespace FRETBUZZ { class Camera; class Material; diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/shader_factory.h b/FretBuzz/FretBuzzFramework/framework/graphics/shader_factory.h index 79fc1a3..ecff8a2 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/shader_factory.h +++ b/FretBuzz/FretBuzzFramework/framework/graphics/shader_factory.h @@ -5,7 +5,7 @@ #include "shaders/default_line_shader.h" #include "shaders/default_post_process.h" -namespace ns_fretBuzz +namespace FRETBUZZ { struct ShaderFactory { diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/shader_manager.cpp b/FretBuzz/FretBuzzFramework/framework/graphics/shader_manager.cpp index 13654c0..dba6016 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/shader_manager.cpp +++ b/FretBuzz/FretBuzzFramework/framework/graphics/shader_manager.cpp @@ -2,7 +2,7 @@ #include "shader_manager.h" #include "shader_factory.h" -namespace ns_fretBuzz +namespace FRETBUZZ { //singleton instance ShaderManager* ShaderManager::s_pInstance = nullptr; diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/shader_manager.h b/FretBuzz/FretBuzzFramework/framework/graphics/shader_manager.h index 33a6a2b..5168971 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/shader_manager.h +++ b/FretBuzz/FretBuzzFramework/framework/graphics/shader_manager.h @@ -2,7 +2,7 @@ #include "utils/resource_container.h" #include "shader.h" -namespace ns_fretBuzz +namespace FRETBUZZ { class ShaderManager : public ResourceContainer> { diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/shaders/default_3d_shader.cpp b/FretBuzz/FretBuzzFramework/framework/graphics/shaders/default_3d_shader.cpp index 7ed5310..7d5a9b7 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/shaders/default_3d_shader.cpp +++ b/FretBuzz/FretBuzzFramework/framework/graphics/shaders/default_3d_shader.cpp @@ -4,7 +4,7 @@ #include "../shader.h" #include "default_3d_shader.h" -namespace ns_fretBuzz +namespace FRETBUZZ { //singleton instance Default3DShader* Default3DShader::s_pInstance = nullptr; diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/shaders/default_3d_shader.h b/FretBuzz/FretBuzzFramework/framework/graphics/shaders/default_3d_shader.h index d25cf4f..d92c36f 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/shaders/default_3d_shader.h +++ b/FretBuzz/FretBuzzFramework/framework/graphics/shaders/default_3d_shader.h @@ -1,6 +1,6 @@ #pragma once -namespace ns_fretBuzz +namespace FRETBUZZ { class Material; class Camera; diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/shaders/default_line_shader.cpp b/FretBuzz/FretBuzzFramework/framework/graphics/shaders/default_line_shader.cpp index daae0de..dd8a20c 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/shaders/default_line_shader.cpp +++ b/FretBuzz/FretBuzzFramework/framework/graphics/shaders/default_line_shader.cpp @@ -4,7 +4,7 @@ #include "../shader.h" #include "default_line_shader.h" -namespace ns_fretBuzz +namespace FRETBUZZ { //singleton instance DefaultLineShader* DefaultLineShader::s_pInstance = nullptr; diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/shaders/default_line_shader.h b/FretBuzz/FretBuzzFramework/framework/graphics/shaders/default_line_shader.h index 66aa3e3..cc22b68 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/shaders/default_line_shader.h +++ b/FretBuzz/FretBuzzFramework/framework/graphics/shaders/default_line_shader.h @@ -1,6 +1,6 @@ #pragma once -namespace ns_fretBuzz +namespace FRETBUZZ { class Material; class Camera; diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/shaders/default_post_process.cpp b/FretBuzz/FretBuzzFramework/framework/graphics/shaders/default_post_process.cpp index f5b9eff..5aa28a0 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/shaders/default_post_process.cpp +++ b/FretBuzz/FretBuzzFramework/framework/graphics/shaders/default_post_process.cpp @@ -4,7 +4,7 @@ #include "../shader.h" #include "default_post_process.h" -namespace ns_fretBuzz +namespace FRETBUZZ { //singleton instance DefaultPostProcess* DefaultPostProcess::s_pInstance = nullptr; diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/shaders/default_post_process.h b/FretBuzz/FretBuzzFramework/framework/graphics/shaders/default_post_process.h index a97ca90..e9e4f79 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/shaders/default_post_process.h +++ b/FretBuzz/FretBuzzFramework/framework/graphics/shaders/default_post_process.h @@ -1,6 +1,6 @@ #pragma once -namespace ns_fretBuzz +namespace FRETBUZZ { class Material; class Camera; diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/shaders/default_sprite_shader.cpp b/FretBuzz/FretBuzzFramework/framework/graphics/shaders/default_sprite_shader.cpp index 5c4ce02..822f274 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/shaders/default_sprite_shader.cpp +++ b/FretBuzz/FretBuzzFramework/framework/graphics/shaders/default_sprite_shader.cpp @@ -4,7 +4,7 @@ #include "../shader.h" #include "default_sprite_shader.h" -namespace ns_fretBuzz +namespace FRETBUZZ { //singleton instance DefaultSpriteShader* DefaultSpriteShader::s_pInstance = nullptr; diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/shaders/default_sprite_shader.h b/FretBuzz/FretBuzzFramework/framework/graphics/shaders/default_sprite_shader.h index 6f3b77e..dd5b34e 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/shaders/default_sprite_shader.h +++ b/FretBuzz/FretBuzzFramework/framework/graphics/shaders/default_sprite_shader.h @@ -1,6 +1,6 @@ #pragma once -namespace ns_fretBuzz +namespace FRETBUZZ { class Material; class Camera; diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/shaders/phong_shader.cpp b/FretBuzz/FretBuzzFramework/framework/graphics/shaders/phong_shader.cpp index 2da0b13..84be37f 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/shaders/phong_shader.cpp +++ b/FretBuzz/FretBuzzFramework/framework/graphics/shaders/phong_shader.cpp @@ -6,7 +6,7 @@ #include "../light_manager.h" #include "system/game_object.h" -namespace ns_fretBuzz +namespace FRETBUZZ { //singleton instance PhongShader* PhongShader::s_pInstance = nullptr; diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/shaders/phong_shader.h b/FretBuzz/FretBuzzFramework/framework/graphics/shaders/phong_shader.h index 951446a..806d970 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/shaders/phong_shader.h +++ b/FretBuzz/FretBuzzFramework/framework/graphics/shaders/phong_shader.h @@ -1,6 +1,6 @@ #pragma once -namespace ns_fretBuzz +namespace FRETBUZZ { class Material; class Camera; diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/sprite_batch_renderer.cpp b/FretBuzz/FretBuzzFramework/framework/graphics/sprite_batch_renderer.cpp index bb5ea72..319b098 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/sprite_batch_renderer.cpp +++ b/FretBuzz/FretBuzzFramework/framework/graphics/sprite_batch_renderer.cpp @@ -2,7 +2,7 @@ #include "sprite_batch_renderer.h" #include "material.h" -namespace ns_fretBuzz +namespace FRETBUZZ { SpriteBatchRenderer* SpriteBatchRenderer::s_pInstance = nullptr; diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/sprite_batch_renderer.h b/FretBuzz/FretBuzzFramework/framework/graphics/sprite_batch_renderer.h index 56e5c79..27e44e6 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/sprite_batch_renderer.h +++ b/FretBuzz/FretBuzzFramework/framework/graphics/sprite_batch_renderer.h @@ -2,7 +2,7 @@ #include "batch_renderer_manager.h" #include "components/sprite.h" -namespace ns_fretBuzz +namespace FRETBUZZ { class SpriteBatchRenderer : public IBatchRenderer { diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/texture.cpp b/FretBuzz/FretBuzzFramework/framework/graphics/texture.cpp index ac24486..7b52de1 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/texture.cpp +++ b/FretBuzz/FretBuzzFramework/framework/graphics/texture.cpp @@ -2,7 +2,7 @@ #include "texture.h" #include "utils/file_utils.h" -namespace ns_fretBuzz +namespace FRETBUZZ { Texture::Texture(std::string a_strTexturePath) : IManagedResource() diff --git a/FretBuzz/FretBuzzFramework/framework/graphics/texture.h b/FretBuzz/FretBuzzFramework/framework/graphics/texture.h index 9351ff1..bbe8b6d 100644 --- a/FretBuzz/FretBuzzFramework/framework/graphics/texture.h +++ b/FretBuzz/FretBuzzFramework/framework/graphics/texture.h @@ -4,7 +4,7 @@ #include "utils/file_utils.h" #include -namespace ns_fretBuzz +namespace FRETBUZZ { class Texture : public IManagedResource { diff --git a/FretBuzz/FretBuzzFramework/framework/system/asset_loader.cpp b/FretBuzz/FretBuzzFramework/framework/system/asset_loader.cpp index f82307d..750140a 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/asset_loader.cpp +++ b/FretBuzz/FretBuzzFramework/framework/system/asset_loader.cpp @@ -9,7 +9,7 @@ #include #include "framework/graphics/font_manager.h" -namespace ns_fretBuzz +namespace FRETBUZZ { void AssetLoader::loadAssets(ResourceManager* a_pResourceManager) { diff --git a/FretBuzz/FretBuzzFramework/framework/system/asset_loader.h b/FretBuzz/FretBuzzFramework/framework/system/asset_loader.h index 623ceb2..62578e9 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/asset_loader.h +++ b/FretBuzz/FretBuzzFramework/framework/system/asset_loader.h @@ -2,7 +2,7 @@ #include #include "resource_manager.h" -namespace ns_fretBuzz +namespace FRETBUZZ { class AssetLoader { diff --git a/FretBuzz/FretBuzzFramework/framework/system/audio_engine.cpp b/FretBuzz/FretBuzzFramework/framework/system/audio_engine.cpp index 9ea3149..30d5083 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/audio_engine.cpp +++ b/FretBuzz/FretBuzzFramework/framework/system/audio_engine.cpp @@ -1,7 +1,7 @@ #include #include "audio_engine.h" -namespace ns_fretBuzz +namespace FRETBUZZ { //singleton Instance AudioEngine* AudioEngine::s_pInstance = nullptr; diff --git a/FretBuzz/FretBuzzFramework/framework/system/audio_engine.h b/FretBuzz/FretBuzzFramework/framework/system/audio_engine.h index 7ecf6a3..1622d4a 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/audio_engine.h +++ b/FretBuzz/FretBuzzFramework/framework/system/audio_engine.h @@ -1,7 +1,7 @@ #pragma once #include -namespace ns_fretBuzz +namespace FRETBUZZ { class AudioEngine { diff --git a/FretBuzz/FretBuzzFramework/framework/system/camera_manager.cpp b/FretBuzz/FretBuzzFramework/framework/system/camera_manager.cpp index b743b78..e0e1bdd 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/camera_manager.cpp +++ b/FretBuzz/FretBuzzFramework/framework/system/camera_manager.cpp @@ -3,7 +3,7 @@ #include "camera_manager.h" #include "graphics/post_process_manager.h" -namespace ns_fretBuzz +namespace FRETBUZZ { //singleton instance CameraManager* CameraManager::s_pInstance = nullptr; diff --git a/FretBuzz/FretBuzzFramework/framework/system/camera_manager.h b/FretBuzz/FretBuzzFramework/framework/system/camera_manager.h index 1947a55..10ef972 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/camera_manager.h +++ b/FretBuzz/FretBuzzFramework/framework/system/camera_manager.h @@ -3,7 +3,7 @@ #include "system/scene_manager.h" #include "utils/resource_container.h" -namespace ns_fretBuzz +namespace FRETBUZZ { class PostProcessManager; class CameraManager : ResourceContainer> diff --git a/FretBuzz/FretBuzzFramework/framework/system/component.cpp b/FretBuzz/FretBuzzFramework/framework/system/component.cpp index 14ed60c..99cbd32 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/component.cpp +++ b/FretBuzz/FretBuzzFramework/framework/system/component.cpp @@ -4,7 +4,7 @@ #include "game_object_2d.h" #include -namespace ns_fretBuzz +namespace FRETBUZZ { IComponent::IComponent(COMPONENT_TYPE a_ComponentType, GameObject* a_GameObj, bool a_bIsEnabled) : m_ComponentType{ a_ComponentType }, diff --git a/FretBuzz/FretBuzzFramework/framework/system/component.h b/FretBuzz/FretBuzzFramework/framework/system/component.h index 61b3735..e044027 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/component.h +++ b/FretBuzz/FretBuzzFramework/framework/system/component.h @@ -1,7 +1,7 @@ #pragma once #include "components/viewport.h" -namespace ns_fretBuzz +namespace FRETBUZZ { class Camera; diff --git a/FretBuzz/FretBuzzFramework/framework/system/component_2d.h b/FretBuzz/FretBuzzFramework/framework/system/component_2d.h index fce693b..4fc1dfe 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/component_2d.h +++ b/FretBuzz/FretBuzzFramework/framework/system/component_2d.h @@ -2,7 +2,7 @@ #include "component.h" #include "game_object_2d.h" -namespace ns_fretBuzz +namespace FRETBUZZ { class IComponent2D : public IComponent { diff --git a/FretBuzz/FretBuzzFramework/framework/system/editor/editor_inspector.cpp b/FretBuzz/FretBuzzFramework/framework/system/editor/editor_inspector.cpp index b695f7b..3ed4b30 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/editor/editor_inspector.cpp +++ b/FretBuzz/FretBuzzFramework/framework/system/editor/editor_inspector.cpp @@ -3,7 +3,7 @@ #include #include -namespace ns_fretBuzz +namespace FRETBUZZ { //singleton instance Inspector* Inspector::s_pInstance = nullptr; diff --git a/FretBuzz/FretBuzzFramework/framework/system/editor/editor_inspector.h b/FretBuzz/FretBuzzFramework/framework/system/editor/editor_inspector.h index 7a87fc9..eb2cdf1 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/editor/editor_inspector.h +++ b/FretBuzz/FretBuzzFramework/framework/system/editor/editor_inspector.h @@ -2,7 +2,7 @@ #include #include "system/scene_manager.h" -namespace ns_fretBuzz +namespace FRETBUZZ { class Inspector { diff --git a/FretBuzz/FretBuzzFramework/framework/system/event/action.h b/FretBuzz/FretBuzzFramework/framework/system/event/action.h index 619a267..8cb9eee 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/event/action.h +++ b/FretBuzz/FretBuzzFramework/framework/system/event/action.h @@ -3,7 +3,7 @@ #pragma once -namespace ns_fretBuzz +namespace FRETBUZZ { template class Action; diff --git a/FretBuzz/FretBuzzFramework/framework/system/event/delegate.h b/FretBuzz/FretBuzzFramework/framework/system/event/delegate.h index 17abff5..4871284 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/event/delegate.h +++ b/FretBuzz/FretBuzzFramework/framework/system/event/delegate.h @@ -5,7 +5,7 @@ #include "action.h" #include -namespace ns_fretBuzz +namespace FRETBUZZ { class IDelegate { diff --git a/FretBuzz/FretBuzzFramework/framework/system/event/event_manager.cpp b/FretBuzz/FretBuzzFramework/framework/system/event/event_manager.cpp index 3d1f0b3..fcd02dd 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/event/event_manager.cpp +++ b/FretBuzz/FretBuzzFramework/framework/system/event/event_manager.cpp @@ -1,7 +1,7 @@ #include #include "event_manager.h" -namespace ns_fretBuzz +namespace FRETBUZZ { ///singleton instance EventManager* EventManager::s_pInstance = nullptr; diff --git a/FretBuzz/FretBuzzFramework/framework/system/event/event_manager.h b/FretBuzz/FretBuzzFramework/framework/system/event/event_manager.h index dab7a88..f199b55 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/event/event_manager.h +++ b/FretBuzz/FretBuzzFramework/framework/system/event/event_manager.h @@ -4,7 +4,7 @@ #include #include "delegate.h" -namespace ns_fretBuzz +namespace FRETBUZZ { class EventManager { diff --git a/FretBuzz/FretBuzzFramework/framework/system/event/event_system.cpp b/FretBuzz/FretBuzzFramework/framework/system/event/event_system.cpp index a7c9c0d..68fce4f 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/event/event_system.cpp +++ b/FretBuzz/FretBuzzFramework/framework/system/event/event_system.cpp @@ -1,7 +1,7 @@ #include //#include "event_system.h" // -//namespace ns_fretBuzz +//namespace FRETBUZZ //{ // //singleton instance // EventSystem* EventSystem::s_pInstance = nullptr; diff --git a/FretBuzz/FretBuzzFramework/framework/system/event/event_system.h b/FretBuzz/FretBuzzFramework/framework/system/event/event_system.h index 1e92d46..3553f47 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/event/event_system.h +++ b/FretBuzz/FretBuzzFramework/framework/system/event/event_system.h @@ -1,7 +1,7 @@ //#pragma once //#include // -//namespace ns_fretBuzz +//namespace FRETBUZZ //{ // class EventSystem // { diff --git a/FretBuzz/FretBuzzFramework/framework/system/game_object.cpp b/FretBuzz/FretBuzzFramework/framework/system/game_object.cpp index f9bb0b4..5be1601 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/game_object.cpp +++ b/FretBuzz/FretBuzzFramework/framework/system/game_object.cpp @@ -6,7 +6,7 @@ #include "layer/layer_mask.h" #include -namespace ns_fretBuzz +namespace FRETBUZZ { //static counter that specifies the id. int GameObject::s_iID = 0; diff --git a/FretBuzz/FretBuzzFramework/framework/system/game_object.h b/FretBuzz/FretBuzzFramework/framework/system/game_object.h index 64e6805..2867f67 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/game_object.h +++ b/FretBuzz/FretBuzzFramework/framework/system/game_object.h @@ -4,7 +4,7 @@ #include "components/gameobject_components/camera.h" #include -namespace ns_fretBuzz +namespace FRETBUZZ { class GameObject { diff --git a/FretBuzz/FretBuzzFramework/framework/system/game_object_2d.cpp b/FretBuzz/FretBuzzFramework/framework/system/game_object_2d.cpp index 2a9a211..427f2a3 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/game_object_2d.cpp +++ b/FretBuzz/FretBuzzFramework/framework/system/game_object_2d.cpp @@ -3,7 +3,7 @@ #include #include -namespace ns_fretBuzz +namespace FRETBUZZ { GameObject2D::GameObject2D(GameObject& a_ParentGameObject, std::string a_strName, glm::vec3 a_v3Position, glm::vec3 a_v3Rotation, glm::vec3 a_v3Scale, glm::vec2 a_v2DimensionWH, char* a_Layer, bool a_bIsActiveSelf) : diff --git a/FretBuzz/FretBuzzFramework/framework/system/game_object_2d.h b/FretBuzz/FretBuzzFramework/framework/system/game_object_2d.h index 7380208..1849fdf 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/game_object_2d.h +++ b/FretBuzz/FretBuzzFramework/framework/system/game_object_2d.h @@ -2,7 +2,7 @@ #include "components/rect_transform.h" #include "game_object.h" -namespace ns_fretBuzz +namespace FRETBUZZ { class GameObject2D : public GameObject { diff --git a/FretBuzz/FretBuzzFramework/framework/system/game_startup.h b/FretBuzz/FretBuzzFramework/framework/system/game_startup.h index 9bec129..fecbe89 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/game_startup.h +++ b/FretBuzz/FretBuzzFramework/framework/system/game_startup.h @@ -1,6 +1,6 @@ #pragma once -namespace ns_fretBuzz +namespace FRETBUZZ { class ISceneData; struct GameStartup diff --git a/FretBuzz/FretBuzzFramework/framework/system/input.cpp b/FretBuzz/FretBuzzFramework/framework/system/input.cpp index 4bb32fd..4271df9 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/input.cpp +++ b/FretBuzz/FretBuzzFramework/framework/system/input.cpp @@ -2,7 +2,7 @@ #include #include "input.h" -namespace ns_fretBuzz +namespace FRETBUZZ { Input* Input::s_pInput = nullptr; diff --git a/FretBuzz/FretBuzzFramework/framework/system/input.h b/FretBuzz/FretBuzzFramework/framework/system/input.h index c99210a..7de7acd 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/input.h +++ b/FretBuzz/FretBuzzFramework/framework/system/input.h @@ -1,7 +1,7 @@ #pragma once #include -namespace ns_fretBuzz +namespace FRETBUZZ { class Input { diff --git a/FretBuzz/FretBuzzFramework/framework/system/layer/layer.cpp b/FretBuzz/FretBuzzFramework/framework/system/layer/layer.cpp index 8ddd248..39967da 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/layer/layer.cpp +++ b/FretBuzz/FretBuzzFramework/framework/system/layer/layer.cpp @@ -2,7 +2,7 @@ #include "layer.h" #include "layer_manager.h" -namespace ns_fretBuzz +namespace FRETBUZZ { Layer::Layer() : Layer(LayerManager::LAYER_NAME_DEFAULT, LayerManager::LAYER_DEFAULT_ID) diff --git a/FretBuzz/FretBuzzFramework/framework/system/layer/layer.h b/FretBuzz/FretBuzzFramework/framework/system/layer/layer.h index ef0ca38..8f6006e 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/layer/layer.h +++ b/FretBuzz/FretBuzzFramework/framework/system/layer/layer.h @@ -1,6 +1,6 @@ #pragma once -namespace ns_fretBuzz +namespace FRETBUZZ { class Layer { diff --git a/FretBuzz/FretBuzzFramework/framework/system/layer/layer_manager.cpp b/FretBuzz/FretBuzzFramework/framework/system/layer/layer_manager.cpp index 25270d5..1d187bc 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/layer/layer_manager.cpp +++ b/FretBuzz/FretBuzzFramework/framework/system/layer/layer_manager.cpp @@ -2,7 +2,7 @@ #include "layer_manager.h" #include -namespace ns_fretBuzz +namespace FRETBUZZ { LayerManager* LayerManager::s_pInstance = nullptr; diff --git a/FretBuzz/FretBuzzFramework/framework/system/layer/layer_manager.h b/FretBuzz/FretBuzzFramework/framework/system/layer/layer_manager.h index 9828509..aef02b6 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/layer/layer_manager.h +++ b/FretBuzz/FretBuzzFramework/framework/system/layer/layer_manager.h @@ -2,7 +2,7 @@ #include #include "layer.h" -namespace ns_fretBuzz +namespace FRETBUZZ { class LayerManager { diff --git a/FretBuzz/FretBuzzFramework/framework/system/layer/layer_mask.cpp b/FretBuzz/FretBuzzFramework/framework/system/layer/layer_mask.cpp index 868b652..b6940fa 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/layer/layer_mask.cpp +++ b/FretBuzz/FretBuzzFramework/framework/system/layer/layer_mask.cpp @@ -2,7 +2,7 @@ #include "layer_manager.h" #include "layer_mask.h" -namespace ns_fretBuzz +namespace FRETBUZZ { LayerMask::LayerMask(const LayerMask& a_LayerMask) { diff --git a/FretBuzz/FretBuzzFramework/framework/system/layer/layer_mask.h b/FretBuzz/FretBuzzFramework/framework/system/layer/layer_mask.h index 6838ce2..d9886f8 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/layer/layer_mask.h +++ b/FretBuzz/FretBuzzFramework/framework/system/layer/layer_mask.h @@ -3,7 +3,7 @@ #include #include -namespace ns_fretBuzz +namespace FRETBUZZ { class LayerMask { diff --git a/FretBuzz/FretBuzzFramework/framework/system/log.cpp b/FretBuzz/FretBuzzFramework/framework/system/log.cpp index 693e131..4b5a39a 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/log.cpp +++ b/FretBuzz/FretBuzzFramework/framework/system/log.cpp @@ -3,7 +3,7 @@ #include #include -namespace ns_fretBuzz +namespace FRETBUZZ { //singleton instance Log* Log::s_pInstance = nullptr; diff --git a/FretBuzz/FretBuzzFramework/framework/system/log.h b/FretBuzz/FretBuzzFramework/framework/system/log.h index c391d04..046901c 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/log.h +++ b/FretBuzz/FretBuzzFramework/framework/system/log.h @@ -3,7 +3,7 @@ #include #include -namespace ns_fretBuzz +namespace FRETBUZZ { class Log { @@ -29,16 +29,16 @@ namespace ns_fretBuzz }; // Engine loggine macros - #define ENGINE_TRACE(...) ::ns_fretBuzz::Log::GetEngineLogger()->trace(__VA_ARGS__) - #define ENGINE_INFO(...) ::ns_fretBuzz::Log::GetEngineLogger()->info(__VA_ARGS__) - #define ENGINE_WARN(...) ::ns_fretBuzz::Log::GetEngineLogger()->warn(__VA_ARGS__) - #define ENGINE_ERROR(...) ::ns_fretBuzz::Log::GetEngineLogger()->error(__VA_ARGS__) - #define ENGINE_CRITICAL(...) ::ns_fretBuzz::Log::GetEngineLogger()->critical(__VA_ARGS__) + #define ENGINE_TRACE(...) ::FRETBUZZ::Log::GetEngineLogger()->trace(__VA_ARGS__) + #define ENGINE_INFO(...) ::FRETBUZZ::Log::GetEngineLogger()->info(__VA_ARGS__) + #define ENGINE_WARN(...) ::FRETBUZZ::Log::GetEngineLogger()->warn(__VA_ARGS__) + #define ENGINE_ERROR(...) ::FRETBUZZ::Log::GetEngineLogger()->error(__VA_ARGS__) + #define ENGINE_CRITICAL(...) ::FRETBUZZ::Log::GetEngineLogger()->critical(__VA_ARGS__) // Client App logging macros - #define APP_TRACE(...) ::ns_fretBuzz::Log::GetAppLogger()->trace(__VA_ARGS__) - #define APP_INFO(...) ::ns_fretBuzz::Log::GetAppLogger()->info(__VA_ARGS__) - #define APP_WARN(...) ::ns_fretBuzz::Log::GetAppLogger()->warn(__VA_ARGS__) - #define APP_ERROR(...) ::ns_fretBuzz::Log::GetAppLogger()->error(__VA_ARGS__) - #define APP_CRITICAL(...) ::ns_fretBuzz::Log::GetAppLogger()->critical(__VA_ARGS__) + #define APP_TRACE(...) ::FRETBUZZ::Log::GetAppLogger()->trace(__VA_ARGS__) + #define APP_INFO(...) ::FRETBUZZ::Log::GetAppLogger()->info(__VA_ARGS__) + #define APP_WARN(...) ::FRETBUZZ::Log::GetAppLogger()->warn(__VA_ARGS__) + #define APP_ERROR(...) ::FRETBUZZ::Log::GetAppLogger()->error(__VA_ARGS__) + #define APP_CRITICAL(...) ::FRETBUZZ::Log::GetAppLogger()->critical(__VA_ARGS__) } \ No newline at end of file diff --git a/FretBuzz/FretBuzzFramework/framework/system/managed_resource.h b/FretBuzz/FretBuzzFramework/framework/system/managed_resource.h index 645899f..51d292d 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/managed_resource.h +++ b/FretBuzz/FretBuzzFramework/framework/system/managed_resource.h @@ -1,6 +1,6 @@ #pragma once -namespace ns_fretBuzz +namespace FRETBUZZ { class IManagedResource { diff --git a/FretBuzz/FretBuzzFramework/framework/system/master_renderer.cpp b/FretBuzz/FretBuzzFramework/framework/system/master_renderer.cpp index 877e9f5..3b4bbd3 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/master_renderer.cpp +++ b/FretBuzz/FretBuzzFramework/framework/system/master_renderer.cpp @@ -6,7 +6,7 @@ #include #include "system.h" -namespace ns_fretBuzz +namespace FRETBUZZ { //singleton instance MasterRenderer* MasterRenderer::s_pInstance = nullptr; diff --git a/FretBuzz/FretBuzzFramework/framework/system/master_renderer.h b/FretBuzz/FretBuzzFramework/framework/system/master_renderer.h index dae44fd..c59352c 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/master_renderer.h +++ b/FretBuzz/FretBuzzFramework/framework/system/master_renderer.h @@ -8,7 +8,7 @@ #include "graphics/post_process_manager.h" #include "system/editor/editor_inspector.h" -namespace ns_fretBuzz +namespace FRETBUZZ { class SceneManager; diff --git a/FretBuzz/FretBuzzFramework/framework/system/physics_engine.cpp b/FretBuzz/FretBuzzFramework/framework/system/physics_engine.cpp index 6acb66e..9ba2fca 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/physics_engine.cpp +++ b/FretBuzz/FretBuzzFramework/framework/system/physics_engine.cpp @@ -4,7 +4,7 @@ #include "physics_engine.h" #include "system.h" -namespace ns_fretBuzz +namespace FRETBUZZ { PhysicsEngine* PhysicsEngine::s_pInstance = nullptr; diff --git a/FretBuzz/FretBuzzFramework/framework/system/physics_engine.h b/FretBuzz/FretBuzzFramework/framework/system/physics_engine.h index a3e8fbb..43d3045 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/physics_engine.h +++ b/FretBuzz/FretBuzzFramework/framework/system/physics_engine.h @@ -2,7 +2,7 @@ #include #include -namespace ns_fretBuzz +namespace FRETBUZZ { enum class PHYSICS_BODY_TYPE { diff --git a/FretBuzz/FretBuzzFramework/framework/system/resource_manager.cpp b/FretBuzz/FretBuzzFramework/framework/system/resource_manager.cpp index ec7fb83..584f631 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/resource_manager.cpp +++ b/FretBuzz/FretBuzzFramework/framework/system/resource_manager.cpp @@ -1,7 +1,7 @@ #include #include "resource_manager.h" -namespace ns_fretBuzz +namespace FRETBUZZ { ///singletor instance ResourceManager* ResourceManager::s_pInstance = nullptr; diff --git a/FretBuzz/FretBuzzFramework/framework/system/resource_manager.h b/FretBuzz/FretBuzzFramework/framework/system/resource_manager.h index 895058d..cb53c85 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/resource_manager.h +++ b/FretBuzz/FretBuzzFramework/framework/system/resource_manager.h @@ -1,7 +1,7 @@ #pragma once #include "managed_resource.h" -namespace ns_fretBuzz +namespace FRETBUZZ { class ResourceManager { diff --git a/FretBuzz/FretBuzzFramework/framework/system/scene_manager.cpp b/FretBuzz/FretBuzzFramework/framework/system/scene_manager.cpp index 0e01676..2b40dcf 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/scene_manager.cpp +++ b/FretBuzz/FretBuzzFramework/framework/system/scene_manager.cpp @@ -1,7 +1,7 @@ #include #include "scene_manager.h" -namespace ns_fretBuzz +namespace FRETBUZZ { ///singleton instance SceneManager* SceneManager:: s_pInstance = nullptr; diff --git a/FretBuzz/FretBuzzFramework/framework/system/scene_manager.h b/FretBuzz/FretBuzzFramework/framework/system/scene_manager.h index 69f851b..244a8b2 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/scene_manager.h +++ b/FretBuzz/FretBuzzFramework/framework/system/scene_manager.h @@ -3,7 +3,7 @@ #include "game_object.h" #include "components/gameobject_components/camera.h" -namespace ns_fretBuzz +namespace FRETBUZZ { //Each scene state should be inherited from IScene class IScene : public IFSM diff --git a/FretBuzz/FretBuzzFramework/framework/system/system.cpp b/FretBuzz/FretBuzzFramework/framework/system/system.cpp index fc7d4ed..78c705f 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/system.cpp +++ b/FretBuzz/FretBuzzFramework/framework/system/system.cpp @@ -5,7 +5,7 @@ #include #include -namespace ns_fretBuzz +namespace FRETBUZZ { System* System::s_pInstance = nullptr; diff --git a/FretBuzz/FretBuzzFramework/framework/system/system.h b/FretBuzz/FretBuzzFramework/framework/system/system.h index f0916ca..b784699 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/system.h +++ b/FretBuzz/FretBuzzFramework/framework/system/system.h @@ -13,7 +13,7 @@ #include "system_layer/system_layer_stack.h" #include -namespace ns_fretBuzz +namespace FRETBUZZ { class System { diff --git a/FretBuzz/FretBuzzFramework/framework/system/system_layer/editor_system_layer.cpp b/FretBuzz/FretBuzzFramework/framework/system/system_layer/editor_system_layer.cpp index d9f28dd..1f84d06 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/system_layer/editor_system_layer.cpp +++ b/FretBuzz/FretBuzzFramework/framework/system/system_layer/editor_system_layer.cpp @@ -5,7 +5,7 @@ #include #include -namespace ns_fretBuzz +namespace FRETBUZZ { EditorSystemLayer::EditorSystemLayer() : SystemLayerBase("EDITOR") diff --git a/FretBuzz/FretBuzzFramework/framework/system/system_layer/editor_system_layer.h b/FretBuzz/FretBuzzFramework/framework/system/system_layer/editor_system_layer.h index a91ef07..8e2d47e 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/system_layer/editor_system_layer.h +++ b/FretBuzz/FretBuzzFramework/framework/system/system_layer/editor_system_layer.h @@ -2,7 +2,7 @@ #include "system_layer_base.h" #include -namespace ns_fretBuzz +namespace FRETBUZZ { class EditorSystemLayer : public SystemLayerBase { diff --git a/FretBuzz/FretBuzzFramework/framework/system/system_layer/game_system_layer.cpp b/FretBuzz/FretBuzzFramework/framework/system/system_layer/game_system_layer.cpp index 770810b..5d3c907 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/system_layer/game_system_layer.cpp +++ b/FretBuzz/FretBuzzFramework/framework/system/system_layer/game_system_layer.cpp @@ -1,7 +1,7 @@ #include #include "game_system_layer.h" -namespace ns_fretBuzz +namespace FRETBUZZ { GameSystemLayer::GameSystemLayer() : SystemLayerBase("GAME") diff --git a/FretBuzz/FretBuzzFramework/framework/system/system_layer/game_system_layer.h b/FretBuzz/FretBuzzFramework/framework/system/system_layer/game_system_layer.h index 5e36ccd..9cbadc1 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/system_layer/game_system_layer.h +++ b/FretBuzz/FretBuzzFramework/framework/system/system_layer/game_system_layer.h @@ -1,7 +1,7 @@ #pragma once #include "system_layer_base.h" -namespace ns_fretBuzz +namespace FRETBUZZ { class GameSystemLayer : public SystemLayerBase { diff --git a/FretBuzz/FretBuzzFramework/framework/system/system_layer/system_layer_base.h b/FretBuzz/FretBuzzFramework/framework/system/system_layer/system_layer_base.h index f98622d..1eee1a0 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/system_layer/system_layer_base.h +++ b/FretBuzz/FretBuzzFramework/framework/system/system_layer/system_layer_base.h @@ -2,7 +2,7 @@ #include #include "scene_manager.h" -namespace ns_fretBuzz +namespace FRETBUZZ { class SystemLayerBase { diff --git a/FretBuzz/FretBuzzFramework/framework/system/system_layer/system_layer_stack.cpp b/FretBuzz/FretBuzzFramework/framework/system/system_layer/system_layer_stack.cpp index 28591b6..e284d4e 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/system_layer/system_layer_stack.cpp +++ b/FretBuzz/FretBuzzFramework/framework/system/system_layer/system_layer_stack.cpp @@ -1,7 +1,7 @@ #include #include "system_layer_stack.h" -namespace ns_fretBuzz +namespace FRETBUZZ { //singleton SystemLayerStack* SystemLayerStack::s_pInstance = nullptr; diff --git a/FretBuzz/FretBuzzFramework/framework/system/system_layer/system_layer_stack.h b/FretBuzz/FretBuzzFramework/framework/system/system_layer/system_layer_stack.h index da91b05..85ce9a4 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/system_layer/system_layer_stack.h +++ b/FretBuzz/FretBuzzFramework/framework/system/system_layer/system_layer_stack.h @@ -2,7 +2,7 @@ #include "system_layer_base.h" #include -namespace ns_fretBuzz +namespace FRETBUZZ { class SystemLayerStack : ResourceContainer { diff --git a/FretBuzz/FretBuzzFramework/framework/system/window.cpp b/FretBuzz/FretBuzzFramework/framework/system/window.cpp index a297a39..7002967 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/window.cpp +++ b/FretBuzz/FretBuzzFramework/framework/system/window.cpp @@ -3,7 +3,7 @@ #include "components/viewport.h" #include -namespace ns_fretBuzz +namespace FRETBUZZ { //singleton instance Window* Window::s_pInstance = nullptr; diff --git a/FretBuzz/FretBuzzFramework/framework/system/window.h b/FretBuzz/FretBuzzFramework/framework/system/window.h index 4186536..d80124e 100644 --- a/FretBuzz/FretBuzzFramework/framework/system/window.h +++ b/FretBuzz/FretBuzzFramework/framework/system/window.h @@ -3,7 +3,7 @@ #include #include -namespace ns_fretBuzz +namespace FRETBUZZ { class Viewport; class Window diff --git a/FretBuzz/FretBuzzFramework/framework/utils/FSM.h b/FretBuzz/FretBuzzFramework/framework/utils/FSM.h index f370f07..8fb1e35 100644 --- a/FretBuzz/FretBuzzFramework/framework/utils/FSM.h +++ b/FretBuzz/FretBuzzFramework/framework/utils/FSM.h @@ -1,6 +1,6 @@ #pragma once -namespace ns_fretBuzz +namespace FRETBUZZ { class IFSM { diff --git a/FretBuzz/FretBuzzFramework/framework/utils/file_utils.cpp b/FretBuzz/FretBuzzFramework/framework/utils/file_utils.cpp index 42b31fe..85ac80a 100644 --- a/FretBuzz/FretBuzzFramework/framework/utils/file_utils.cpp +++ b/FretBuzz/FretBuzzFramework/framework/utils/file_utils.cpp @@ -1,7 +1,7 @@ #include #include "file_utils.h" -namespace ns_fretBuzz +namespace FRETBUZZ { namespace ns_utils { diff --git a/FretBuzz/FretBuzzFramework/framework/utils/file_utils.h b/FretBuzz/FretBuzzFramework/framework/utils/file_utils.h index 591b027..2f30aed 100644 --- a/FretBuzz/FretBuzzFramework/framework/utils/file_utils.h +++ b/FretBuzz/FretBuzzFramework/framework/utils/file_utils.h @@ -1,7 +1,7 @@ #pragma once #include -namespace ns_fretBuzz +namespace FRETBUZZ { namespace ns_utils { diff --git a/FretBuzz/FretBuzzFramework/framework/utils/pool/gameobject_pool.h b/FretBuzz/FretBuzzFramework/framework/utils/pool/gameobject_pool.h index f45d7a0..33edbbb 100644 --- a/FretBuzz/FretBuzzFramework/framework/utils/pool/gameobject_pool.h +++ b/FretBuzz/FretBuzzFramework/framework/utils/pool/gameobject_pool.h @@ -2,7 +2,7 @@ #include "object_pool.h" #include -namespace ns_fretBuzz +namespace FRETBUZZ { template::value>::type> class GameObjectPool: protected ObjectPool diff --git a/FretBuzz/FretBuzzFramework/framework/utils/pool/object_pool.h b/FretBuzz/FretBuzzFramework/framework/utils/pool/object_pool.h index cf40dfc..755193b 100644 --- a/FretBuzz/FretBuzzFramework/framework/utils/pool/object_pool.h +++ b/FretBuzz/FretBuzzFramework/framework/utils/pool/object_pool.h @@ -1,6 +1,6 @@ #pragma once -namespace ns_fretBuzz +namespace FRETBUZZ { template class ObjectPool diff --git a/FretBuzz/FretBuzzFramework/framework/utils/resource_container.h b/FretBuzz/FretBuzzFramework/framework/utils/resource_container.h index eba5a80..6d5eda0 100644 --- a/FretBuzz/FretBuzzFramework/framework/utils/resource_container.h +++ b/FretBuzz/FretBuzzFramework/framework/utils/resource_container.h @@ -1,6 +1,6 @@ #pragma once -namespace ns_fretBuzz +namespace FRETBUZZ { template class ResourceContainer{}; diff --git a/FretBuzz/FretBuzzFramework/game_startup.cpp b/FretBuzz/FretBuzzFramework/game_startup.cpp index 2e47bf5..cdf9d9a 100644 --- a/FretBuzz/FretBuzzFramework/game_startup.cpp +++ b/FretBuzz/FretBuzzFramework/game_startup.cpp @@ -3,7 +3,7 @@ #include "game_startup.h" #include -namespace ns_fretBuzz +namespace FRETBUZZ { void GameStartup::run() { diff --git a/FretBuzz/FretBuzzFramework/main.h b/FretBuzz/FretBuzzFramework/main.h index e337d81..9606514 100644 --- a/FretBuzz/FretBuzzFramework/main.h +++ b/FretBuzz/FretBuzzFramework/main.h @@ -3,11 +3,11 @@ #include //#include "game/scenes/gameplay_scene.h" -extern void SetStartupData(ns_fretBuzz::GameStartup& a_GameStartupData); +extern void SetStartupData(FRETBUZZ::GameStartup& a_GameStartupData); int main(int argc, char** argv) { - ns_fretBuzz::GameStartup m_GameStartupData; + FRETBUZZ::GameStartup m_GameStartupData; SetStartupData(m_GameStartupData); m_GameStartupData.run(); return 0; diff --git a/FretBuzz/Sandbox/game/managers/InteractiveObject.cpp b/FretBuzz/Sandbox/game/managers/InteractiveObject.cpp index 3b3947d..2463e6b 100644 --- a/FretBuzz/Sandbox/game/managers/InteractiveObject.cpp +++ b/FretBuzz/Sandbox/game/managers/InteractiveObject.cpp @@ -5,10 +5,10 @@ namespace ns_HMGame { - InteractiveObject::InteractiveObject(ns_fretBuzz::GameObject* a_GameObject) - : ns_fretBuzz::Behaviour(a_GameObject) + InteractiveObject::InteractiveObject(FRETBUZZ::GameObject* a_GameObject) + : FRETBUZZ::Behaviour(a_GameObject) { - m_pImage = m_GameObject.getComponent(ns_fretBuzz::COMPONENT_TYPE::IMAGE); + m_pImage = m_GameObject.getComponent(FRETBUZZ::COMPONENT_TYPE::IMAGE); m_vectColor.emplace_back(glm::vec4{ 1.0f, 0.0f, 0.0f, 1.0f }); m_vectColor.emplace_back(glm::vec4{ 0.0f, 1.0f, 0.0f, 1.0f }); m_vectColor.emplace_back(glm::vec4{ 0.0f, 0.0f, 1.0f, 1.0f }); @@ -19,22 +19,22 @@ namespace ns_HMGame m_pImage->setColor(m_vectColor[(++m_iColorIndex) % m_vectColor.size()]); } - void InteractiveObject::onTriggerEnter2D(ns_fretBuzz::Collider2D* a_pICollider2D) + void InteractiveObject::onTriggerEnter2D(FRETBUZZ::Collider2D* a_pICollider2D) { onLabelHit(); } - void InteractiveObject::onTriggerExit2D(ns_fretBuzz::Collider2D* a_pICollider2D) + void InteractiveObject::onTriggerExit2D(FRETBUZZ::Collider2D* a_pICollider2D) { onLabelHit(); } - void InteractiveObject::onCollisionEnter2D(ns_fretBuzz::Collider2D* a_pICollider2D) + void InteractiveObject::onCollisionEnter2D(FRETBUZZ::Collider2D* a_pICollider2D) { onLabelHit(); } - void InteractiveObject::onCollisionExit2D(ns_fretBuzz::Collider2D* a_pICollider2D) + void InteractiveObject::onCollisionExit2D(FRETBUZZ::Collider2D* a_pICollider2D) { onLabelHit(); } diff --git a/FretBuzz/Sandbox/game/managers/InteractiveObject.h b/FretBuzz/Sandbox/game/managers/InteractiveObject.h index 128bb7b..1f4840c 100644 --- a/FretBuzz/Sandbox/game/managers/InteractiveObject.h +++ b/FretBuzz/Sandbox/game/managers/InteractiveObject.h @@ -5,22 +5,22 @@ namespace ns_HMGame { - class InteractiveObject : public ns_fretBuzz::Behaviour + class InteractiveObject : public FRETBUZZ::Behaviour { private: - ns_fretBuzz::Image* m_pImage = nullptr; - ns_fretBuzz::RectCollider* m_pRectCollider = nullptr; + FRETBUZZ::Image* m_pImage = nullptr; + FRETBUZZ::RectCollider* m_pRectCollider = nullptr; std::vector m_vectColor; int m_iColorIndex = 0; public: - InteractiveObject(ns_fretBuzz::GameObject* a_GameObject); + InteractiveObject(FRETBUZZ::GameObject* a_GameObject); void onLabelHit(); - virtual void onTriggerEnter2D(ns_fretBuzz::Collider2D* a_pICollider2D) override; - virtual void onTriggerExit2D(ns_fretBuzz::Collider2D* a_pICollider2D) override; - virtual void onCollisionEnter2D(ns_fretBuzz::Collider2D* a_pICollider2D) override; - virtual void onCollisionExit2D(ns_fretBuzz::Collider2D* a_pICollider2D) override; + virtual void onTriggerEnter2D(FRETBUZZ::Collider2D* a_pICollider2D) override; + virtual void onTriggerExit2D(FRETBUZZ::Collider2D* a_pICollider2D) override; + virtual void onCollisionEnter2D(FRETBUZZ::Collider2D* a_pICollider2D) override; + virtual void onCollisionExit2D(FRETBUZZ::Collider2D* a_pICollider2D) override; }; } \ No newline at end of file diff --git a/FretBuzz/Sandbox/game/managers/bullet/bullet.cpp b/FretBuzz/Sandbox/game/managers/bullet/bullet.cpp index 14b6e55..7c4cb10 100644 --- a/FretBuzz/Sandbox/game/managers/bullet/bullet.cpp +++ b/FretBuzz/Sandbox/game/managers/bullet/bullet.cpp @@ -6,11 +6,11 @@ namespace ns_HMGame { - Bullet::Bullet(ns_fretBuzz::GameObject2D* a_GameObject) - : ns_fretBuzz::Behaviour(a_GameObject) + Bullet::Bullet(FRETBUZZ::GameObject2D* a_GameObject) + : FRETBUZZ::Behaviour(a_GameObject) { - m_pSpriteRenderer = m_GameObject.getComponent(ns_fretBuzz::COMPONENT_TYPE::SPRITE_RENDERER); - m_pCollider2D = m_GameObject.getComponent(ns_fretBuzz::COMPONENT_TYPE::COLLIDER_2D); + m_pSpriteRenderer = m_GameObject.getComponent(FRETBUZZ::COMPONENT_TYPE::SPRITE_RENDERER); + m_pCollider2D = m_GameObject.getComponent(FRETBUZZ::COMPONENT_TYPE::COLLIDER_2D); } void Bullet::setBulletType(std::string a_strBulletSpriteName) @@ -25,22 +25,22 @@ namespace ns_HMGame m_pCollider2D->setLinearVelocity(m_v2Direction * 1000.0f); } - void Bullet::onTriggerEnter2D(ns_fretBuzz::Collider2D* a_pIComponent) + void Bullet::onTriggerEnter2D(FRETBUZZ::Collider2D* a_pIComponent) { WeaponManager::ReturnBulletToPool(dynamic_cast(&m_GameObject)); } - void Bullet::onTriggerExit2D(ns_fretBuzz::Collider2D* a_pIComponent) + void Bullet::onTriggerExit2D(FRETBUZZ::Collider2D* a_pIComponent) { } - void Bullet::onCollisionEnter2D(ns_fretBuzz::Collider2D* a_pIComponent) + void Bullet::onCollisionEnter2D(FRETBUZZ::Collider2D* a_pIComponent) { WeaponManager::ReturnBulletToPool(dynamic_cast(&m_GameObject)); } - void Bullet::onCollisionExit2D(ns_fretBuzz::Collider2D* a_pIComponent) + void Bullet::onCollisionExit2D(FRETBUZZ::Collider2D* a_pIComponent) { } diff --git a/FretBuzz/Sandbox/game/managers/bullet/bullet.h b/FretBuzz/Sandbox/game/managers/bullet/bullet.h index 7f6823d..a29e1f0 100644 --- a/FretBuzz/Sandbox/game/managers/bullet/bullet.h +++ b/FretBuzz/Sandbox/game/managers/bullet/bullet.h @@ -4,11 +4,11 @@ namespace ns_HMGame { - class Bullet : public ns_fretBuzz::Behaviour + class Bullet : public FRETBUZZ::Behaviour { private: - ns_fretBuzz::SpriteRenderer* m_pSpriteRenderer = nullptr; - ns_fretBuzz::Collider2D* m_pCollider2D = nullptr; + FRETBUZZ::SpriteRenderer* m_pSpriteRenderer = nullptr; + FRETBUZZ::Collider2D* m_pCollider2D = nullptr; float m_fLifetime = 0.0f; static constexpr float MAX_LIFETIME = 3.0f; @@ -16,16 +16,16 @@ namespace ns_HMGame glm::vec2 m_v2Direction{1.0f, 1.0f}; public: - Bullet(ns_fretBuzz::GameObject2D* a_GameObject); + Bullet(FRETBUZZ::GameObject2D* a_GameObject); void setBulletType(std::string a_strBulletSpriteName); void shootAt(glm::vec2 a_v2Direction); - virtual void onTriggerEnter2D(ns_fretBuzz::Collider2D* a_pIComponent) override; - virtual void onTriggerExit2D(ns_fretBuzz::Collider2D* a_pIComponent) override; + virtual void onTriggerEnter2D(FRETBUZZ::Collider2D* a_pIComponent) override; + virtual void onTriggerExit2D(FRETBUZZ::Collider2D* a_pIComponent) override; - virtual void onCollisionEnter2D(ns_fretBuzz::Collider2D* a_pIComponent) override; - virtual void onCollisionExit2D(ns_fretBuzz::Collider2D* a_pIComponent) override; + virtual void onCollisionEnter2D(FRETBUZZ::Collider2D* a_pIComponent) override; + virtual void onCollisionExit2D(FRETBUZZ::Collider2D* a_pIComponent) override; void virtual update(const float& a_fDeltaTime) override; }; diff --git a/FretBuzz/Sandbox/game/managers/cursor/cursor_manager.cpp b/FretBuzz/Sandbox/game/managers/cursor/cursor_manager.cpp index c632ad1..d999307 100644 --- a/FretBuzz/Sandbox/game/managers/cursor/cursor_manager.cpp +++ b/FretBuzz/Sandbox/game/managers/cursor/cursor_manager.cpp @@ -4,18 +4,18 @@ namespace ns_HMGame { - CursorManager::CursorManager(ns_fretBuzz::GameObject* a_GameObject, ns_fretBuzz::Camera* a_CameraComponent) - : ns_fretBuzz::Behaviour(a_GameObject) + CursorManager::CursorManager(FRETBUZZ::GameObject* a_GameObject, FRETBUZZ::Camera* a_CameraComponent) + : FRETBUZZ::Behaviour(a_GameObject) { - m_pSpriteAnimator = a_GameObject->getComponent(ns_fretBuzz::COMPONENT_TYPE::SPRITE_ANIMATION_CONTROLLER); + m_pSpriteAnimator = a_GameObject->getComponent(FRETBUZZ::COMPONENT_TYPE::SPRITE_ANIMATION_CONTROLLER); m_pCamComponent = a_CameraComponent; } void CursorManager::update(const float& a_fDeltaTime) { - ns_fretBuzz::Input::GetMousePosition(m_dMouseX, m_dMouseY); + FRETBUZZ::Input::GetMousePosition(m_dMouseX, m_dMouseY); - glm::vec3 l_MousePosition = glm::vec3((float)m_dMouseX - (ns_fretBuzz::Window::getWidth() * 0.5f), (ns_fretBuzz::Window::getHeight() * 0.5f) - (float)m_dMouseY, 0.0f) + m_pCamComponent->m_GameObject.m_Transform.getWorldPosition(); + glm::vec3 l_MousePosition = glm::vec3((float)m_dMouseX - (FRETBUZZ::Window::getWidth() * 0.5f), (FRETBUZZ::Window::getHeight() * 0.5f) - (float)m_dMouseY, 0.0f) + m_pCamComponent->m_GameObject.m_Transform.getWorldPosition(); m_GameObject.m_Transform.setWorldPosition(l_MousePosition); Behaviour::update(a_fDeltaTime); } diff --git a/FretBuzz/Sandbox/game/managers/cursor/cursor_manager.h b/FretBuzz/Sandbox/game/managers/cursor/cursor_manager.h index e7ccc4a..7158156 100644 --- a/FretBuzz/Sandbox/game/managers/cursor/cursor_manager.h +++ b/FretBuzz/Sandbox/game/managers/cursor/cursor_manager.h @@ -4,17 +4,17 @@ namespace ns_HMGame { - class CursorManager : public ns_fretBuzz::Behaviour + class CursorManager : public FRETBUZZ::Behaviour { private: double m_dMouseX = 0.0; double m_dMouseY = 0.0; - ns_fretBuzz::SpriteAnimationController* m_pSpriteAnimator = nullptr; - ns_fretBuzz::Camera* m_pCamComponent = nullptr; + FRETBUZZ::SpriteAnimationController* m_pSpriteAnimator = nullptr; + FRETBUZZ::Camera* m_pCamComponent = nullptr; public: - CursorManager(ns_fretBuzz::GameObject* a_GameObject, ns_fretBuzz::Camera* a_pCamComponent); + CursorManager(FRETBUZZ::GameObject* a_GameObject, FRETBUZZ::Camera* a_pCamComponent); virtual void update(const float& a_fDeltaTime) override; }; } \ No newline at end of file diff --git a/FretBuzz/Sandbox/game/managers/enemy/EnemyController.cpp b/FretBuzz/Sandbox/game/managers/enemy/EnemyController.cpp index 085ee47..df9ed5f 100644 --- a/FretBuzz/Sandbox/game/managers/enemy/EnemyController.cpp +++ b/FretBuzz/Sandbox/game/managers/enemy/EnemyController.cpp @@ -6,17 +6,17 @@ namespace ns_HMGame { - EnemyController::EnemyController(ns_fretBuzz::GameObject* a_GameObject, ns_fretBuzz::GameObject* a_pPlayerUpperGameObj, ns_fretBuzz::GameObject* a_pLegsGameObject) - : ns_fretBuzz::Behaviour(a_GameObject), + EnemyController::EnemyController(FRETBUZZ::GameObject* a_GameObject, FRETBUZZ::GameObject* a_pPlayerUpperGameObj, FRETBUZZ::GameObject* a_pLegsGameObject) + : FRETBUZZ::Behaviour(a_GameObject), m_WeaponData{ WeaponManager::GetWeaponData(WEAPON_M16) } { m_pPlayerUpperGameObj = a_pPlayerUpperGameObj; m_pGameObjCharacterLegs = a_pLegsGameObject; - m_pRectCollider = a_GameObject->getComponent(ns_fretBuzz::COMPONENT_TYPE::COLLIDER_2D); + m_pRectCollider = a_GameObject->getComponent(FRETBUZZ::COMPONENT_TYPE::COLLIDER_2D); - m_pLegsSpriteAnimator = a_pLegsGameObject->getComponent(ns_fretBuzz::COMPONENT_TYPE::SPRITE_ANIMATION_CONTROLLER); - m_pUpperSpriteAnimator = a_pPlayerUpperGameObj->getComponent(ns_fretBuzz::COMPONENT_TYPE::SPRITE_ANIMATION_CONTROLLER); + m_pLegsSpriteAnimator = a_pLegsGameObject->getComponent(FRETBUZZ::COMPONENT_TYPE::SPRITE_ANIMATION_CONTROLLER); + m_pUpperSpriteAnimator = a_pPlayerUpperGameObj->getComponent(FRETBUZZ::COMPONENT_TYPE::SPRITE_ANIMATION_CONTROLLER); } void EnemyController::update(const float& a_fDeltaTime) @@ -43,16 +43,16 @@ namespace ns_HMGame return; } glm::vec3 l_v3PlayerPostion = l_PlayerInstance->m_GameObject.m_Transform.getWorldPosition(); - ns_fretBuzz::Collider2D* l_pRaycastResult = nullptr; + FRETBUZZ::Collider2D* l_pRaycastResult = nullptr; - ns_fretBuzz::PhysicsEngine::Raycast(l_pRaycastResult, { l_v3EnemyPostion.x, l_v3EnemyPostion.y }, { l_v3PlayerPostion.x, l_v3PlayerPostion.y}); + FRETBUZZ::PhysicsEngine::Raycast(l_pRaycastResult, { l_v3EnemyPostion.x, l_v3EnemyPostion.y }, { l_v3PlayerPostion.x, l_v3PlayerPostion.y}); if (l_pRaycastResult == nullptr) { return; } - PlayerControllerHM* m_pPLayerController = l_pRaycastResult->m_GameObject.getComponent(ns_fretBuzz::COMPONENT_TYPE::BEHAVIOUR); + PlayerControllerHM* m_pPLayerController = l_pRaycastResult->m_GameObject.getComponent(FRETBUZZ::COMPONENT_TYPE::BEHAVIOUR); if (m_pPLayerController != nullptr) { glm::vec3 l_v3EnemyToPlayerDirection = glm::normalize(l_v3PlayerPostion - l_v3EnemyPostion); diff --git a/FretBuzz/Sandbox/game/managers/enemy/EnemyController.h b/FretBuzz/Sandbox/game/managers/enemy/EnemyController.h index 064ee60..9566102 100644 --- a/FretBuzz/Sandbox/game/managers/enemy/EnemyController.h +++ b/FretBuzz/Sandbox/game/managers/enemy/EnemyController.h @@ -7,7 +7,7 @@ namespace ns_HMGame { - class EnemyController : public ns_fretBuzz::Behaviour + class EnemyController : public FRETBUZZ::Behaviour { private: float m_fVelocity = 700.0f; @@ -17,13 +17,13 @@ namespace ns_HMGame bool m_bIsRunning = false; - ns_fretBuzz::SpriteAnimationController* m_pUpperSpriteAnimator = nullptr; - ns_fretBuzz::SpriteAnimationController* m_pLegsSpriteAnimator = nullptr; + FRETBUZZ::SpriteAnimationController* m_pUpperSpriteAnimator = nullptr; + FRETBUZZ::SpriteAnimationController* m_pLegsSpriteAnimator = nullptr; - ns_fretBuzz::RectCollider* m_pRectCollider = nullptr; + FRETBUZZ::RectCollider* m_pRectCollider = nullptr; - ns_fretBuzz::GameObject* m_pPlayerUpperGameObj = nullptr; - ns_fretBuzz::GameObject* m_pGameObjCharacterLegs = nullptr; + FRETBUZZ::GameObject* m_pPlayerUpperGameObj = nullptr; + FRETBUZZ::GameObject* m_pGameObjCharacterLegs = nullptr; std::vector m_vectWeaponOver; @@ -32,7 +32,7 @@ namespace ns_HMGame int m_iWeaponOverCount = 0; public: - EnemyController(ns_fretBuzz::GameObject* a_GameObject, ns_fretBuzz::GameObject* a_pPlayerUpperGameObj, ns_fretBuzz::GameObject* a_pLegsGameObject); + EnemyController(FRETBUZZ::GameObject* a_GameObject, FRETBUZZ::GameObject* a_pPlayerUpperGameObj, FRETBUZZ::GameObject* a_pLegsGameObject); virtual void update(const float& a_fDeltaTime) override; @@ -42,9 +42,9 @@ namespace ns_HMGame /*void setAsCurrentWeaponOver(Weapon* a_pWeapon, bool a_bIsOver); - virtual void onCollisionEnter2D(ns_fretBuzz::Collider2D* a_pICollider2D) override; - virtual void onCollisionExit2D(ns_fretBuzz::Collider2D* a_pICollider2D) override; - virtual void onTriggerEnter2D(ns_fretBuzz::Collider2D* a_pICollider2D) override; - virtual void onTriggerExit2D(ns_fretBuzz::Collider2D* a_pICollider2D) override;*/ + virtual void onCollisionEnter2D(FRETBUZZ::Collider2D* a_pICollider2D) override; + virtual void onCollisionExit2D(FRETBUZZ::Collider2D* a_pICollider2D) override; + virtual void onTriggerEnter2D(FRETBUZZ::Collider2D* a_pICollider2D) override; + virtual void onTriggerExit2D(FRETBUZZ::Collider2D* a_pICollider2D) override;*/ }; } \ No newline at end of file diff --git a/FretBuzz/Sandbox/game/managers/player/PlayerControllerHM.cpp b/FretBuzz/Sandbox/game/managers/player/PlayerControllerHM.cpp index f863d5e..d49ffad 100644 --- a/FretBuzz/Sandbox/game/managers/player/PlayerControllerHM.cpp +++ b/FretBuzz/Sandbox/game/managers/player/PlayerControllerHM.cpp @@ -10,19 +10,19 @@ namespace ns_HMGame { PlayerControllerHM* PlayerControllerHM:: s_Instance = nullptr;; - PlayerControllerHM::PlayerControllerHM(ns_fretBuzz::GameObject* a_GameObject, ns_fretBuzz::GameObject* a_pCamGameObject, ns_fretBuzz::GameObject* a_pPlayerUpperGameObj, ns_fretBuzz::GameObject* a_pLegsGameObject) - : ns_fretBuzz::Behaviour(a_GameObject), + PlayerControllerHM::PlayerControllerHM(FRETBUZZ::GameObject* a_GameObject, FRETBUZZ::GameObject* a_pCamGameObject, FRETBUZZ::GameObject* a_pPlayerUpperGameObj, FRETBUZZ::GameObject* a_pLegsGameObject) + : FRETBUZZ::Behaviour(a_GameObject), m_WeaponData{WeaponManager::GetWeaponData(WEAPON_UNARMED)} { s_Instance = this; m_pPlayerUpperGameObj = a_pPlayerUpperGameObj; m_pGameObjCharacterLegs = a_pLegsGameObject; - m_pRectCollider = a_GameObject->getComponent(ns_fretBuzz::COMPONENT_TYPE::COLLIDER_2D); + m_pRectCollider = a_GameObject->getComponent(FRETBUZZ::COMPONENT_TYPE::COLLIDER_2D); m_pCamGameObj = a_pCamGameObject; - m_pLegsSpriteAnimator = a_pLegsGameObject->getComponent(ns_fretBuzz::COMPONENT_TYPE::SPRITE_ANIMATION_CONTROLLER); - m_pUpperSpriteAnimator = a_pPlayerUpperGameObj->getComponent(ns_fretBuzz::COMPONENT_TYPE::SPRITE_ANIMATION_CONTROLLER); + m_pLegsSpriteAnimator = a_pLegsGameObject->getComponent(FRETBUZZ::COMPONENT_TYPE::SPRITE_ANIMATION_CONTROLLER); + m_pUpperSpriteAnimator = a_pPlayerUpperGameObj->getComponent(FRETBUZZ::COMPONENT_TYPE::SPRITE_ANIMATION_CONTROLLER); } void PlayerControllerHM::update(const float& a_fDeltaTime) @@ -36,26 +36,26 @@ namespace ns_HMGame float l_fHorizontalVelocity = 0.0f; float l_fVerticalVelocity = 0.0f; - if (ns_fretBuzz::Input::IsKeyDown(GLFW_KEY_W)) + if (FRETBUZZ::Input::IsKeyDown(GLFW_KEY_W)) { l_fVerticalVelocity += m_fVelocity; } - if (ns_fretBuzz::Input::IsKeyDown(GLFW_KEY_S)) + if (FRETBUZZ::Input::IsKeyDown(GLFW_KEY_S)) { l_fVerticalVelocity -= m_fVelocity; } - if (ns_fretBuzz::Input::IsKeyDown(GLFW_KEY_A)) + if (FRETBUZZ::Input::IsKeyDown(GLFW_KEY_A)) { l_fHorizontalVelocity -= m_fVelocity; } - if (ns_fretBuzz::Input::IsKeyDown(GLFW_KEY_D)) + if (FRETBUZZ::Input::IsKeyDown(GLFW_KEY_D)) { l_fHorizontalVelocity += m_fVelocity; } - ns_fretBuzz::Input::GetMousePosition(m_dMouseX, m_dMouseY); - glm::vec2 l_MousePosition = glm::vec2((float)m_dMouseX - (ns_fretBuzz::Window::getWidth() * 0.5f), (ns_fretBuzz::Window::getHeight() * 0.5f) - (float)m_dMouseY); + FRETBUZZ::Input::GetMousePosition(m_dMouseX, m_dMouseY); + glm::vec2 l_MousePosition = glm::vec2((float)m_dMouseX - (FRETBUZZ::Window::getWidth() * 0.5f), (FRETBUZZ::Window::getHeight() * 0.5f) - (float)m_dMouseY); glm::vec2 l_v2PlayerToMouseDirection = glm::normalize(l_MousePosition); float a_fZ = glm::atan(l_v2PlayerToMouseDirection.x, l_v2PlayerToMouseDirection.y); m_pPlayerUpperGameObj->m_Transform.setLocalRotation({ 0.0f, 0.0f, -a_fZ + M_PI_2 }); @@ -104,33 +104,33 @@ namespace ns_HMGame //std::cout << "x: "<play("attack"); glm::vec3 l_v3PlayerPosition = m_GameObject.m_Transform.getWorldPosition(); m_WeaponData.fire(glm::vec2{l_v3PlayerPosition.x, l_v3PlayerPosition.y} +l_v2PlayerToMouseDirection * 150.0f, l_v2PlayerToMouseDirection, m_pPlayerUpperGameObj->m_Transform.getLocalRotation()); - /*ns_fretBuzz::Collider2D* l_pCollider2D = nullptr; + /*FRETBUZZ::Collider2D* l_pCollider2D = nullptr; glm::vec2 l_v2PlayerPosition = m_GameObject.m_Transform.getWorldPosition(); glm::vec2 l_v2MouseWorldPosition = l_v2PlayerPosition + l_MousePosition; - ns_fretBuzz::PhysicsEngine::Raycast(l_pCollider2D, l_v2PlayerPosition, l_v2MouseWorldPosition); + FRETBUZZ::PhysicsEngine::Raycast(l_pCollider2D, l_v2PlayerPosition, l_v2MouseWorldPosition); if (l_pCollider2D != nullptr) { - InteractiveObject* l_pInteractiveObject = l_pCollider2D->m_GameObject.getComponent(ns_fretBuzz::COMPONENT_TYPE::BEHAVIOUR); + InteractiveObject* l_pInteractiveObject = l_pCollider2D->m_GameObject.getComponent(FRETBUZZ::COMPONENT_TYPE::BEHAVIOUR); if (l_pInteractiveObject != nullptr) { l_pInteractiveObject->onLabelHit(); } }*/ } - else if (ns_fretBuzz::Input::IsMouseBtnPutDown(GLFW_MOUSE_BUTTON_2)) + else if (FRETBUZZ::Input::IsMouseBtnPutDown(GLFW_MOUSE_BUTTON_2)) { WEAPON_TYPE l_CurrentWeaponType = m_WeaponData.getWeaponType(); if (l_CurrentWeaponType != WEAPON_TYPE::WEAPON_UNARMED) @@ -150,28 +150,28 @@ namespace ns_HMGame } APP_ERROR("Tracing weapon throw"); } - else if (ns_fretBuzz::Input::IsMouseBtnPutDown(GLFW_MOUSE_BUTTON_3)) + else if (FRETBUZZ::Input::IsMouseBtnPutDown(GLFW_MOUSE_BUTTON_3)) { m_pUpperSpriteAnimator->play("snap"); } } - void PlayerControllerHM::onCollisionEnter2D(ns_fretBuzz::Collider2D* a_pIComponent) + void PlayerControllerHM::onCollisionEnter2D(FRETBUZZ::Collider2D* a_pIComponent) { //std::cout << "PlayerController::OnCollisionEnter2D:: " << a_pIComponent->m_GameObject.getName() << "\n"; } - void PlayerControllerHM::onCollisionExit2D(ns_fretBuzz::Collider2D* a_pIComponent) + void PlayerControllerHM::onCollisionExit2D(FRETBUZZ::Collider2D* a_pIComponent) { //std::cout << "PlayerController::OnCollisionExit2D:: " << a_pIComponent->m_GameObject.getName() << "\n"; } - void PlayerControllerHM::onTriggerEnter2D(ns_fretBuzz::Collider2D* a_pIComponent) + void PlayerControllerHM::onTriggerEnter2D(FRETBUZZ::Collider2D* a_pIComponent) { //std::cout << "PlayerController::OnTriggerEnter2D:: " << a_pIComponent->m_GameObject.getName() << "\n"; } - void PlayerControllerHM::onTriggerExit2D(ns_fretBuzz::Collider2D* a_pIComponent) + void PlayerControllerHM::onTriggerExit2D(FRETBUZZ::Collider2D* a_pIComponent) { //std::cout << "PlayerController::OnTriggerExit2D:: " << a_pIComponent->m_GameObject.getName() << "\n"; } diff --git a/FretBuzz/Sandbox/game/managers/player/PlayerControllerHM.h b/FretBuzz/Sandbox/game/managers/player/PlayerControllerHM.h index 5a6df60..edd7cb5 100644 --- a/FretBuzz/Sandbox/game/managers/player/PlayerControllerHM.h +++ b/FretBuzz/Sandbox/game/managers/player/PlayerControllerHM.h @@ -7,7 +7,7 @@ namespace ns_HMGame { - class PlayerControllerHM : public ns_fretBuzz::Behaviour + class PlayerControllerHM : public FRETBUZZ::Behaviour { private: static PlayerControllerHM* s_Instance; @@ -19,14 +19,14 @@ namespace ns_HMGame bool m_bIsRunning = false; - ns_fretBuzz::SpriteAnimationController* m_pUpperSpriteAnimator = nullptr; - ns_fretBuzz::SpriteAnimationController* m_pLegsSpriteAnimator = nullptr; + FRETBUZZ::SpriteAnimationController* m_pUpperSpriteAnimator = nullptr; + FRETBUZZ::SpriteAnimationController* m_pLegsSpriteAnimator = nullptr; - ns_fretBuzz::RectCollider* m_pRectCollider = nullptr; + FRETBUZZ::RectCollider* m_pRectCollider = nullptr; - ns_fretBuzz::GameObject* m_pCamGameObj = nullptr; - ns_fretBuzz::GameObject* m_pPlayerUpperGameObj = nullptr; - ns_fretBuzz::GameObject* m_pGameObjCharacterLegs = nullptr; + FRETBUZZ::GameObject* m_pCamGameObj = nullptr; + FRETBUZZ::GameObject* m_pPlayerUpperGameObj = nullptr; + FRETBUZZ::GameObject* m_pGameObjCharacterLegs = nullptr; void manageInput(float a_fDeltaTime); std::vector m_vectWeaponOver; @@ -39,7 +39,7 @@ namespace ns_HMGame void removeFromWeaponOver(Weapon* a_Weapon); public: - PlayerControllerHM(ns_fretBuzz::GameObject* a_GameObject, ns_fretBuzz::GameObject* a_pCamGameObject, ns_fretBuzz::GameObject* a_pPlayerUpperGameObj, ns_fretBuzz::GameObject* a_pLegsGameObject); + PlayerControllerHM(FRETBUZZ::GameObject* a_GameObject, FRETBUZZ::GameObject* a_pCamGameObject, FRETBUZZ::GameObject* a_pPlayerUpperGameObj, FRETBUZZ::GameObject* a_pLegsGameObject); virtual void update(const float& a_fDeltaTime) override; @@ -47,10 +47,10 @@ namespace ns_HMGame void setAsCurrentWeaponOver(Weapon* a_pWeapon, bool a_bIsOver); - virtual void onCollisionEnter2D(ns_fretBuzz::Collider2D* a_pICollider2D) override ; - virtual void onCollisionExit2D (ns_fretBuzz::Collider2D* a_pICollider2D) override ; - virtual void onTriggerEnter2D (ns_fretBuzz::Collider2D* a_pICollider2D) override ; - virtual void onTriggerExit2D (ns_fretBuzz::Collider2D* a_pICollider2D) override ; + virtual void onCollisionEnter2D(FRETBUZZ::Collider2D* a_pICollider2D) override ; + virtual void onCollisionExit2D (FRETBUZZ::Collider2D* a_pICollider2D) override ; + virtual void onTriggerEnter2D (FRETBUZZ::Collider2D* a_pICollider2D) override ; + virtual void onTriggerExit2D (FRETBUZZ::Collider2D* a_pICollider2D) override ; inline static PlayerControllerHM* GetInstance() { diff --git a/FretBuzz/Sandbox/game/managers/weapon/weapon.cpp b/FretBuzz/Sandbox/game/managers/weapon/weapon.cpp index 16ca6d2..93cc6fb 100644 --- a/FretBuzz/Sandbox/game/managers/weapon/weapon.cpp +++ b/FretBuzz/Sandbox/game/managers/weapon/weapon.cpp @@ -6,16 +6,16 @@ namespace ns_HMGame { - Weapon::Weapon(ns_fretBuzz::GameObject2D* a_pGameObject) + Weapon::Weapon(FRETBUZZ::GameObject2D* a_pGameObject) : - ns_fretBuzz::Behaviour(a_pGameObject), + FRETBUZZ::Behaviour(a_pGameObject), m_WeaponData{ WeaponManager::GetWeaponData(WEAPON_TYPE::WEAPON_UNARMED)}, m_CurrentWeaponState{WEAPON_STATE::DROP} { - m_pSpriteRenderer = m_GameObject.getComponent(ns_fretBuzz::COMPONENT_TYPE::SPRITE_RENDERER); - m_pSpriteRenderer->setSprite(ns_fretBuzz::ResourceManager::getResource("weapon_pickup|weapon_M16")->getSprite(0)); + m_pSpriteRenderer = m_GameObject.getComponent(FRETBUZZ::COMPONENT_TYPE::SPRITE_RENDERER); + m_pSpriteRenderer->setSprite(FRETBUZZ::ResourceManager::getResource("weapon_pickup|weapon_M16")->getSprite(0)); - m_pCollider2D = m_GameObject.getComponent(ns_fretBuzz::COMPONENT_TYPE::COLLIDER_2D); + m_pCollider2D = m_GameObject.getComponent(FRETBUZZ::COMPONENT_TYPE::COLLIDER_2D); setWeaponState(m_CurrentWeaponState); } @@ -31,10 +31,10 @@ namespace ns_HMGame return m_WeaponData; } - void Weapon::onTriggerEnter2D(ns_fretBuzz::Collider2D* a_pIComponent) + void Weapon::onTriggerEnter2D(FRETBUZZ::Collider2D* a_pIComponent) { //std::cout << "PlayerController::OnTriggerEnter2D:: " << a_pIComponent->m_GameObject.getName() << "\n"; - ns_HMGame::PlayerControllerHM* l_pPlayerController = a_pIComponent->m_GameObject.getComponent(ns_fretBuzz::COMPONENT_TYPE::BEHAVIOUR); + ns_HMGame::PlayerControllerHM* l_pPlayerController = a_pIComponent->m_GameObject.getComponent(FRETBUZZ::COMPONENT_TYPE::BEHAVIOUR); if (l_pPlayerController != nullptr) { l_pPlayerController->setAsCurrentWeaponOver(this, true); @@ -62,7 +62,7 @@ namespace ns_HMGame m_pCollider2D->setSensor(true); m_pCollider2D->addCollisionLayer("PLAYER"); m_pCollider2D->setFixedRotation(false); - m_pCollider2D->setPhysicsBodyType(ns_fretBuzz::PHYSICS_BODY_TYPE::STATIC); + m_pCollider2D->setPhysicsBodyType(FRETBUZZ::PHYSICS_BODY_TYPE::STATIC); break; } case WEAPON_STATE::IN_USE: @@ -75,7 +75,7 @@ namespace ns_HMGame { m_pCollider2D->setSensor(false); m_pCollider2D->removeCollisionLayer("PLAYER"); - m_pCollider2D->setPhysicsBodyType(ns_fretBuzz::PHYSICS_BODY_TYPE::DYNAMIC); + m_pCollider2D->setPhysicsBodyType(FRETBUZZ::PHYSICS_BODY_TYPE::DYNAMIC); m_pCollider2D->setFixedRotation(false); m_pCollider2D->setAngularVelocity((float)M_PI); m_pCollider2D->setDensity(1.0f); @@ -85,17 +85,17 @@ namespace ns_HMGame } } - void Weapon::onCollisionEnter2D(ns_fretBuzz::Collider2D* a_pIComponent) + void Weapon::onCollisionEnter2D(FRETBUZZ::Collider2D* a_pIComponent) { } - void Weapon::onCollisionExit2D(ns_fretBuzz::Collider2D* a_pIComponent) + void Weapon::onCollisionExit2D(FRETBUZZ::Collider2D* a_pIComponent) { } - void Weapon::onTriggerExit2D(ns_fretBuzz::Collider2D* a_pIComponent) + void Weapon::onTriggerExit2D(FRETBUZZ::Collider2D* a_pIComponent) { - ns_HMGame::PlayerControllerHM* l_pPlayerController = a_pIComponent->m_GameObject.getComponent(ns_fretBuzz::COMPONENT_TYPE::BEHAVIOUR); + ns_HMGame::PlayerControllerHM* l_pPlayerController = a_pIComponent->m_GameObject.getComponent(FRETBUZZ::COMPONENT_TYPE::BEHAVIOUR); if (l_pPlayerController != nullptr) { l_pPlayerController->setAsCurrentWeaponOver(this, false); diff --git a/FretBuzz/Sandbox/game/managers/weapon/weapon.h b/FretBuzz/Sandbox/game/managers/weapon/weapon.h index f782ded..c5b16dd 100644 --- a/FretBuzz/Sandbox/game/managers/weapon/weapon.h +++ b/FretBuzz/Sandbox/game/managers/weapon/weapon.h @@ -33,11 +33,11 @@ namespace ns_HMGame WEAPON_BRICK = 22 }; - class Weapon : public ns_fretBuzz::Behaviour + class Weapon : public FRETBUZZ::Behaviour { private: - ns_fretBuzz::SpriteRenderer* m_pSpriteRenderer = nullptr; - ns_fretBuzz::Collider2D* m_pCollider2D = nullptr; + FRETBUZZ::SpriteRenderer* m_pSpriteRenderer = nullptr; + FRETBUZZ::Collider2D* m_pCollider2D = nullptr; WeaponData m_WeaponData; @@ -52,14 +52,14 @@ namespace ns_HMGame void setWeaponState(WEAPON_STATE a_State); public: - Weapon(ns_fretBuzz::GameObject2D* a_GameObject); + Weapon(FRETBUZZ::GameObject2D* a_GameObject); WeaponData getWeaponData(); void setWeapon(WEAPON_TYPE a_WeaponType); - virtual void onTriggerEnter2D(ns_fretBuzz::Collider2D* a_pIComponent) override; - virtual void onTriggerExit2D(ns_fretBuzz::Collider2D* a_pIComponent) override; - virtual void onCollisionEnter2D(ns_fretBuzz::Collider2D* a_pIComponent) override; - virtual void onCollisionExit2D(ns_fretBuzz::Collider2D* a_pIComponent) override; + virtual void onTriggerEnter2D(FRETBUZZ::Collider2D* a_pIComponent) override; + virtual void onTriggerExit2D(FRETBUZZ::Collider2D* a_pIComponent) override; + virtual void onCollisionEnter2D(FRETBUZZ::Collider2D* a_pIComponent) override; + virtual void onCollisionExit2D(FRETBUZZ::Collider2D* a_pIComponent) override; void startWeaponThrow(glm::vec2 a_v2PlayerToMouseDirection); void pickup(); diff --git a/FretBuzz/Sandbox/game/managers/weapon/weapon_manager.h b/FretBuzz/Sandbox/game/managers/weapon/weapon_manager.h index e124896..26ca9f8 100644 --- a/FretBuzz/Sandbox/game/managers/weapon/weapon_manager.h +++ b/FretBuzz/Sandbox/game/managers/weapon/weapon_manager.h @@ -9,20 +9,20 @@ namespace ns_HMGame { class WeaponData; - class WeaponManager : public ns_fretBuzz::Behaviour + class WeaponManager : public FRETBUZZ::Behaviour { private: static WeaponManager* s_pInstance; std::map m_WeaponMap; - ns_fretBuzz::GameObjectPool m_WeaponPool; - ns_fretBuzz::GameObjectPool m_BulletPool; + FRETBUZZ::GameObjectPool m_WeaponPool; + FRETBUZZ::GameObjectPool m_BulletPool; protected: virtual ~WeaponManager(); public: - WeaponManager(ns_fretBuzz::GameObject* a_GameObject); + WeaponManager(FRETBUZZ::GameObject* a_GameObject); static WeaponData GetWeaponData(WEAPON_TYPE a_WeaponType); static Weapon* AddWeapon(glm::vec3 a_v3Position, WEAPON_TYPE a_WeaponType, bool a_bIsActiv); diff --git a/FretBuzz/Sandbox/game/managers/weapon/weapon_manger.cpp b/FretBuzz/Sandbox/game/managers/weapon/weapon_manger.cpp index 7bc26f4..8cbc27e 100644 --- a/FretBuzz/Sandbox/game/managers/weapon/weapon_manger.cpp +++ b/FretBuzz/Sandbox/game/managers/weapon/weapon_manger.cpp @@ -7,8 +7,8 @@ namespace ns_HMGame //singleton instance WeaponManager* WeaponManager::s_pInstance = nullptr; - WeaponManager::WeaponManager(ns_fretBuzz::GameObject* a_GameObject) - : ns_fretBuzz::Behaviour(a_GameObject), + WeaponManager::WeaponManager(FRETBUZZ::GameObject* a_GameObject) + : FRETBUZZ::Behaviour(a_GameObject), m_WeaponPool(), m_BulletPool() { @@ -65,7 +65,7 @@ namespace ns_HMGame l_pWeaponPrefab->m_Transform.setWorldPosition(a_v3Position); l_pWeaponPrefab->setActive(a_bIsActive); - Weapon* l_pWeapon = l_pWeaponPrefab->getComponent(ns_fretBuzz::COMPONENT_TYPE::BEHAVIOUR); + Weapon* l_pWeapon = l_pWeaponPrefab->getComponent(FRETBUZZ::COMPONENT_TYPE::BEHAVIOUR); l_pWeapon->setWeapon(a_WeaponType); return l_pWeapon; } @@ -77,7 +77,7 @@ namespace ns_HMGame l_pPrefabBullet->m_Transform.setLocalRotation(a_quatRotation); l_pPrefabBullet->m_Transform.setWorldPosition(glm::vec3{a_v2Position,0.0f}); l_pPrefabBullet->setActive(true); - Bullet* l_pBullet = l_pPrefabBullet->getComponent(ns_fretBuzz::COMPONENT_TYPE::BEHAVIOUR); + Bullet* l_pBullet = l_pPrefabBullet->getComponent(FRETBUZZ::COMPONENT_TYPE::BEHAVIOUR); l_pBullet->setBulletType(a_strBulletSpriteName); return l_pBullet; diff --git a/FretBuzz/Sandbox/game/prefab/prefab_bullet.cpp b/FretBuzz/Sandbox/game/prefab/prefab_bullet.cpp index 981f301..4048dac 100644 --- a/FretBuzz/Sandbox/game/prefab/prefab_bullet.cpp +++ b/FretBuzz/Sandbox/game/prefab/prefab_bullet.cpp @@ -6,28 +6,28 @@ namespace ns_HMGame { - PrefabBullet::PrefabBullet(ns_fretBuzz::GameObject* a_ParentGameObject) + PrefabBullet::PrefabBullet(FRETBUZZ::GameObject* a_ParentGameObject) : PrefabBullet(a_ParentGameObject, "BULLET", { 0.0f, 0.0f , 0.0f }, { 0.0f,0.0f,0.0f }, { 1.0f,1.0f,1.0f }, { 10.0f ,10.0f}) { } - PrefabBullet::PrefabBullet(ns_fretBuzz::GameObject* a_ParentGameObject, std::string a_strName, glm::vec3 a_v3Position, glm::vec3 a_v3Rotation, glm::vec3 a_v3Scale, glm::vec2 a_v2DimensionWH) - : ns_fretBuzz::GameObject2D(*a_ParentGameObject, a_strName, a_v3Position, a_v3Rotation, a_v3Scale, a_v2DimensionWH, "BULLET", false) + PrefabBullet::PrefabBullet(FRETBUZZ::GameObject* a_ParentGameObject, std::string a_strName, glm::vec3 a_v3Position, glm::vec3 a_v3Rotation, glm::vec3 a_v3Scale, glm::vec2 a_v2DimensionWH) + : FRETBUZZ::GameObject2D(*a_ParentGameObject, a_strName, a_v3Position, a_v3Rotation, a_v3Scale, a_v2DimensionWH, "BULLET", false) { - ns_fretBuzz::ColliderData l_SensorRectColliderData; + FRETBUZZ::ColliderData l_SensorRectColliderData; l_SensorRectColliderData.m_CategoryMask.addLayers(std::vector{"BULLET"}); l_SensorRectColliderData.m_CollisionMask.addLayers(std::vector{"PLAYER", "ENEMY", "BOUNDARY"}); - l_SensorRectColliderData.m_PhysicsBodyType = ns_fretBuzz::PHYSICS_BODY_TYPE::DYNAMIC; - l_SensorRectColliderData.m_ColliderShape = ns_fretBuzz::ColliderData::SHAPE_RECT; + l_SensorRectColliderData.m_PhysicsBodyType = FRETBUZZ::PHYSICS_BODY_TYPE::DYNAMIC; + l_SensorRectColliderData.m_ColliderShape = FRETBUZZ::ColliderData::SHAPE_RECT; l_SensorRectColliderData.m_bIsSensor = true; l_SensorRectColliderData.m_bIsBullet = false; l_SensorRectColliderData.m_fDensity = 1.0f; - this->addComponent(l_SensorRectColliderData); - this->addComponent(); + this->addComponent(l_SensorRectColliderData); + this->addComponent(); this->addComponent(); } } \ No newline at end of file diff --git a/FretBuzz/Sandbox/game/prefab/prefab_bullet.h b/FretBuzz/Sandbox/game/prefab/prefab_bullet.h index 3fd035f..98e9f46 100644 --- a/FretBuzz/Sandbox/game/prefab/prefab_bullet.h +++ b/FretBuzz/Sandbox/game/prefab/prefab_bullet.h @@ -3,11 +3,11 @@ namespace ns_HMGame { - class PrefabBullet : public ns_fretBuzz::GameObject2D + class PrefabBullet : public FRETBUZZ::GameObject2D { public: - PrefabBullet(ns_fretBuzz::GameObject* a_ParentGameObject); - PrefabBullet(ns_fretBuzz::GameObject* a_ParentGameObject, std::string a_strName, glm::vec3 a_v3Position, glm::vec3 a_v3Rotation, glm::vec3 a_v3Scale, glm::vec2 a_v2DimensionWH); + PrefabBullet(FRETBUZZ::GameObject* a_ParentGameObject); + PrefabBullet(FRETBUZZ::GameObject* a_ParentGameObject, std::string a_strName, glm::vec3 a_v3Position, glm::vec3 a_v3Rotation, glm::vec3 a_v3Scale, glm::vec2 a_v2DimensionWH); }; } \ No newline at end of file diff --git a/FretBuzz/Sandbox/game/prefab/prefab_enemy.cpp b/FretBuzz/Sandbox/game/prefab/prefab_enemy.cpp index b1db872..614ff10 100644 --- a/FretBuzz/Sandbox/game/prefab/prefab_enemy.cpp +++ b/FretBuzz/Sandbox/game/prefab/prefab_enemy.cpp @@ -4,22 +4,22 @@ namespace ns_HMGame { - PrefabEnemy::PrefabEnemy(ns_fretBuzz::GameObject& a_ParentGameObject, std::string a_strName, glm::vec3 a_v3Position, glm::vec3 a_v3Rotation, glm::vec3 a_v3Scale, glm::vec2 a_v2DimensionWH) - : ns_fretBuzz::GameObject2D(a_ParentGameObject, a_strName, a_v3Position, a_v3Rotation, a_v3Scale, a_v2DimensionWH, "ENEMY", true) + PrefabEnemy::PrefabEnemy(FRETBUZZ::GameObject& a_ParentGameObject, std::string a_strName, glm::vec3 a_v3Position, glm::vec3 a_v3Rotation, glm::vec3 a_v3Scale, glm::vec2 a_v2DimensionWH) + : FRETBUZZ::GameObject2D(a_ParentGameObject, a_strName, a_v3Position, a_v3Rotation, a_v3Scale, a_v2DimensionWH, "ENEMY", true) { - ns_fretBuzz::GameObject2D* l_pEnemyUpperGameObj = ns_fretBuzz::GameObject2D::instantiate(*this, "EnemyUpper", { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 1.0f, 1.0f, 1.0f }, { 150.0f, 100.0f }, "ENEMY"); - ns_fretBuzz::GameObject2D* l_pEnemyLowerGameObj = ns_fretBuzz::GameObject2D::instantiate(*this, "EnemyLegs", { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 1.0f, 1.0f, 1.0f }, { 150.0f, 100.0f }, "ENEMY"); + FRETBUZZ::GameObject2D* l_pEnemyUpperGameObj = FRETBUZZ::GameObject2D::instantiate(*this, "EnemyUpper", { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 1.0f, 1.0f, 1.0f }, { 150.0f, 100.0f }, "ENEMY"); + FRETBUZZ::GameObject2D* l_pEnemyLowerGameObj = FRETBUZZ::GameObject2D::instantiate(*this, "EnemyLegs", { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 1.0f, 1.0f, 1.0f }, { 150.0f, 100.0f }, "ENEMY"); - l_pEnemyLowerGameObj->addComponent("EnemyLegs"); - l_pEnemyUpperGameObj->addComponent("Enemy"); + l_pEnemyLowerGameObj->addComponent("EnemyLegs"); + l_pEnemyUpperGameObj->addComponent("Enemy"); - ns_fretBuzz::ColliderData l_RectColliderData; - l_RectColliderData.m_PhysicsBodyType = ns_fretBuzz::PHYSICS_BODY_TYPE::DYNAMIC; + FRETBUZZ::ColliderData l_RectColliderData; + l_RectColliderData.m_PhysicsBodyType = FRETBUZZ::PHYSICS_BODY_TYPE::DYNAMIC; l_RectColliderData.m_CategoryMask.addLayers(std::vector{"ENEMY"}); l_RectColliderData.m_CollisionMask.addLayers(std::vector{"PLAYER", "BOUNDARY", "BULLET"}); - this->addComponent(l_RectColliderData); + this->addComponent(l_RectColliderData); this->addComponent(l_pEnemyUpperGameObj, l_pEnemyLowerGameObj); } } \ No newline at end of file diff --git a/FretBuzz/Sandbox/game/prefab/prefab_enemy.h b/FretBuzz/Sandbox/game/prefab/prefab_enemy.h index 4175d1c..fbd7b64 100644 --- a/FretBuzz/Sandbox/game/prefab/prefab_enemy.h +++ b/FretBuzz/Sandbox/game/prefab/prefab_enemy.h @@ -5,9 +5,9 @@ namespace ns_HMGame { - class PrefabEnemy : public ns_fretBuzz::GameObject2D + class PrefabEnemy : public FRETBUZZ::GameObject2D { public: - PrefabEnemy(ns_fretBuzz::GameObject& a_ParentGameObject, std::string a_strName, glm::vec3 a_v3Position, glm::vec3 a_v3Rotation, glm::vec3 a_v3Scale, glm::vec2 a_v2DimensionWH); + PrefabEnemy(FRETBUZZ::GameObject& a_ParentGameObject, std::string a_strName, glm::vec3 a_v3Position, glm::vec3 a_v3Rotation, glm::vec3 a_v3Scale, glm::vec2 a_v2DimensionWH); }; } \ No newline at end of file diff --git a/FretBuzz/Sandbox/game/prefab/prefab_game_manager.cpp b/FretBuzz/Sandbox/game/prefab/prefab_game_manager.cpp index 4f3c597..1280369 100644 --- a/FretBuzz/Sandbox/game/prefab/prefab_game_manager.cpp +++ b/FretBuzz/Sandbox/game/prefab/prefab_game_manager.cpp @@ -6,10 +6,10 @@ namespace ns_HMGame { - PrefabGameManager::PrefabGameManager(ns_fretBuzz::GameObject& a_ParentGameObject, std::string a_strName) - : ns_fretBuzz::GameObject(a_ParentGameObject, a_strName) + PrefabGameManager::PrefabGameManager(FRETBUZZ::GameObject& a_ParentGameObject, std::string a_strName) + : FRETBUZZ::GameObject(a_ParentGameObject, a_strName) { - auto l_pAudSrc = this->addComponent("beats", true); + auto l_pAudSrc = this->addComponent("beats", true); l_pAudSrc->setVolume(0.0f); this->addComponent(); } diff --git a/FretBuzz/Sandbox/game/prefab/prefab_game_manager.h b/FretBuzz/Sandbox/game/prefab/prefab_game_manager.h index 2a6bf95..75d97d2 100644 --- a/FretBuzz/Sandbox/game/prefab/prefab_game_manager.h +++ b/FretBuzz/Sandbox/game/prefab/prefab_game_manager.h @@ -4,9 +4,9 @@ namespace ns_HMGame { - class PrefabGameManager : public ns_fretBuzz::GameObject + class PrefabGameManager : public FRETBUZZ::GameObject { public: - PrefabGameManager(ns_fretBuzz::GameObject& a_ParentGameObject, std::string a_strName); + PrefabGameManager(FRETBUZZ::GameObject& a_ParentGameObject, std::string a_strName); }; } \ No newline at end of file diff --git a/FretBuzz/Sandbox/game/prefab/prefab_player.cpp b/FretBuzz/Sandbox/game/prefab/prefab_player.cpp index ce0624f..f64f4d9 100644 --- a/FretBuzz/Sandbox/game/prefab/prefab_player.cpp +++ b/FretBuzz/Sandbox/game/prefab/prefab_player.cpp @@ -11,22 +11,22 @@ namespace ns_HMGame PrefabPlayer* PrefabPlayer::getInstance() { return s_pInstance; } - PrefabPlayer::PrefabPlayer(ns_fretBuzz::GameObject& a_ParentGameObject, std::string a_strName, glm::vec3 a_v3Position, glm::vec3 a_v3Rotation, glm::vec3 a_v3Scale, glm::vec2 a_v2DimensionWH) - : ns_fretBuzz::GameObject2D(a_ParentGameObject, a_strName, a_v3Position, a_v3Rotation, a_v3Scale, a_v2DimensionWH, "PLAYER") + PrefabPlayer::PrefabPlayer(FRETBUZZ::GameObject& a_ParentGameObject, std::string a_strName, glm::vec3 a_v3Position, glm::vec3 a_v3Rotation, glm::vec3 a_v3Scale, glm::vec2 a_v2DimensionWH) + : FRETBUZZ::GameObject2D(a_ParentGameObject, a_strName, a_v3Position, a_v3Rotation, a_v3Scale, a_v2DimensionWH, "PLAYER") { - ns_fretBuzz::GameObject2D* l_pPlayerUpperGameObj = ns_fretBuzz::GameObject2D::instantiate(*this, "PlayerUpper", { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 1.0f, 1.0f, 1.0f }, { 150.0f, 100.0f }, "PLAYER", true); - ns_fretBuzz::GameObject2D* l_pPlayerLowerGameObj = ns_fretBuzz::GameObject2D::instantiate(*this, "PlayerLegs", { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 1.0f, 1.0f, 1.0f }, { 150.0f, 100.0f }, "PLAYER", true); - ns_fretBuzz::GameObject* l_pCamGameObj = &ns_fretBuzz::CameraManager::get()->getMainCamera().m_GameObject; + FRETBUZZ::GameObject2D* l_pPlayerUpperGameObj = FRETBUZZ::GameObject2D::instantiate(*this, "PlayerUpper", { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 1.0f, 1.0f, 1.0f }, { 150.0f, 100.0f }, "PLAYER", true); + FRETBUZZ::GameObject2D* l_pPlayerLowerGameObj = FRETBUZZ::GameObject2D::instantiate(*this, "PlayerLegs", { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 1.0f, 1.0f, 1.0f }, { 150.0f, 100.0f }, "PLAYER", true); + FRETBUZZ::GameObject* l_pCamGameObj = &FRETBUZZ::CameraManager::get()->getMainCamera().m_GameObject; - l_pPlayerLowerGameObj->addComponent("CharacterLegs"); - l_pPlayerUpperGameObj->addComponent("Player"); + l_pPlayerLowerGameObj->addComponent("CharacterLegs"); + l_pPlayerUpperGameObj->addComponent("Player"); - ns_fretBuzz::ColliderData l_RectColliderData; - l_RectColliderData.m_PhysicsBodyType = ns_fretBuzz::PHYSICS_BODY_TYPE::DYNAMIC; + FRETBUZZ::ColliderData l_RectColliderData; + l_RectColliderData.m_PhysicsBodyType = FRETBUZZ::PHYSICS_BODY_TYPE::DYNAMIC; l_RectColliderData.m_CollisionMask.addLayers(std::vector{"BOUNDARY", "PICKUP", "BULLET"}); l_RectColliderData.m_CategoryMask.addLayers(std::vector{"PLAYER"}); - this->addComponent(l_RectColliderData); + this->addComponent(l_RectColliderData); this->addComponent(l_pCamGameObj, l_pPlayerUpperGameObj, l_pPlayerLowerGameObj); s_pInstance = this; diff --git a/FretBuzz/Sandbox/game/prefab/prefab_player.h b/FretBuzz/Sandbox/game/prefab/prefab_player.h index cc7227d..e17993e 100644 --- a/FretBuzz/Sandbox/game/prefab/prefab_player.h +++ b/FretBuzz/Sandbox/game/prefab/prefab_player.h @@ -5,7 +5,7 @@ namespace ns_HMGame { - class PrefabPlayer : public ns_fretBuzz::GameObject2D + class PrefabPlayer : public FRETBUZZ::GameObject2D { private: static PrefabPlayer* s_pInstance; @@ -13,6 +13,6 @@ namespace ns_HMGame public: static PrefabPlayer* getInstance(); - PrefabPlayer(ns_fretBuzz::GameObject& a_ParentGameObject, std::string a_strName, glm::vec3 a_v3Position, glm::vec3 a_v3Rotation, glm::vec3 a_v3Scale, glm::vec2 a_v2DimensionWH); + PrefabPlayer(FRETBUZZ::GameObject& a_ParentGameObject, std::string a_strName, glm::vec3 a_v3Position, glm::vec3 a_v3Rotation, glm::vec3 a_v3Scale, glm::vec2 a_v2DimensionWH); }; } \ No newline at end of file diff --git a/FretBuzz/Sandbox/game/prefab/prefab_wall.cpp b/FretBuzz/Sandbox/game/prefab/prefab_wall.cpp index 2df23ea..bfb3492 100644 --- a/FretBuzz/Sandbox/game/prefab/prefab_wall.cpp +++ b/FretBuzz/Sandbox/game/prefab/prefab_wall.cpp @@ -5,17 +5,17 @@ namespace ns_HMGame { - PrefabWall::PrefabWall(ns_fretBuzz::GameObject& a_ParentGameObject, std::string a_strName, glm::vec3 a_v3Position, glm::vec3 a_v3Rotation, glm::vec3 a_v3Scale, glm::vec2 a_v2DimensionWH) - : ns_fretBuzz::GameObject2D(a_ParentGameObject, a_strName, a_v3Position, a_v3Rotation, a_v3Scale, a_v2DimensionWH, "BOUNDARY") + PrefabWall::PrefabWall(FRETBUZZ::GameObject& a_ParentGameObject, std::string a_strName, glm::vec3 a_v3Position, glm::vec3 a_v3Rotation, glm::vec3 a_v3Scale, glm::vec2 a_v2DimensionWH) + : FRETBUZZ::GameObject2D(a_ParentGameObject, a_strName, a_v3Position, a_v3Rotation, a_v3Scale, a_v2DimensionWH, "BOUNDARY") { - ns_fretBuzz::ColliderData l_RectColliderData; + FRETBUZZ::ColliderData l_RectColliderData; l_RectColliderData.m_CategoryMask.addLayers(std::vector{"BOUNDARY"}); l_RectColliderData.m_CollisionMask.addLayers(std::vector{"PLAYER", "ENEMY", "PICKUP", "BULLET"}); l_RectColliderData.m_fFriction = 0.0f; l_RectColliderData.m_fRestitution = 1.0f; - this->addComponent(nullptr, glm::vec4{ 1.0f, 0.0f, 0.0f,1.0f }, true); - this->addComponent(l_RectColliderData); + this->addComponent(nullptr, glm::vec4{ 1.0f, 0.0f, 0.0f,1.0f }, true); + this->addComponent(l_RectColliderData); } } \ No newline at end of file diff --git a/FretBuzz/Sandbox/game/prefab/prefab_wall.h b/FretBuzz/Sandbox/game/prefab/prefab_wall.h index c4cefb4..ac4452b 100644 --- a/FretBuzz/Sandbox/game/prefab/prefab_wall.h +++ b/FretBuzz/Sandbox/game/prefab/prefab_wall.h @@ -4,9 +4,9 @@ namespace ns_HMGame { - class PrefabWall : public ns_fretBuzz::GameObject2D + class PrefabWall : public FRETBUZZ::GameObject2D { public: - PrefabWall(ns_fretBuzz::GameObject& a_ParentGameObject, std::string a_strName, glm::vec3 a_v3Position, glm::vec3 a_v3Rotation, glm::vec3 a_v3Scale, glm::vec2 a_v2DimensionWH); + PrefabWall(FRETBUZZ::GameObject& a_ParentGameObject, std::string a_strName, glm::vec3 a_v3Position, glm::vec3 a_v3Rotation, glm::vec3 a_v3Scale, glm::vec2 a_v2DimensionWH); }; } \ No newline at end of file diff --git a/FretBuzz/Sandbox/game/prefab/prefab_weapon.cpp b/FretBuzz/Sandbox/game/prefab/prefab_weapon.cpp index b40e6ee..59ab0dc 100644 --- a/FretBuzz/Sandbox/game/prefab/prefab_weapon.cpp +++ b/FretBuzz/Sandbox/game/prefab/prefab_weapon.cpp @@ -5,29 +5,29 @@ namespace ns_HMGame { - PrefabWeapon::PrefabWeapon(ns_fretBuzz::GameObject* a_ParentGameObject) + PrefabWeapon::PrefabWeapon(FRETBUZZ::GameObject* a_ParentGameObject) : PrefabWeapon(a_ParentGameObject, "WEAPON", { 0.0f, 0.0f , 0.0f }, { 0.0f,0.0f,0.0f }, { 1.0f,1.0f,1.0f }, {70.0f ,70.0f }) { } - PrefabWeapon::PrefabWeapon(ns_fretBuzz::GameObject* a_ParentGameObject, std::string a_strName, glm::vec3 a_v3Position, glm::vec3 a_v3Rotation, glm::vec3 a_v3Scale, glm::vec2 a_v2DimensionWH) - : ns_fretBuzz::GameObject2D(*a_ParentGameObject, a_strName, a_v3Position, a_v3Rotation, a_v3Scale, a_v2DimensionWH, "PICKUP", false) + PrefabWeapon::PrefabWeapon(FRETBUZZ::GameObject* a_ParentGameObject, std::string a_strName, glm::vec3 a_v3Position, glm::vec3 a_v3Rotation, glm::vec3 a_v3Scale, glm::vec2 a_v2DimensionWH) + : FRETBUZZ::GameObject2D(*a_ParentGameObject, a_strName, a_v3Position, a_v3Rotation, a_v3Scale, a_v2DimensionWH, "PICKUP", false) { - ns_fretBuzz::ColliderData l_SensorRectColliderData; + FRETBUZZ::ColliderData l_SensorRectColliderData; l_SensorRectColliderData.m_CategoryMask.addLayers(std::vector{"PICKUP"}); l_SensorRectColliderData.m_CollisionMask.addLayers(std::vector{"PLAYER", "BOUNDARY"}); - l_SensorRectColliderData.m_ColliderShape = ns_fretBuzz::ColliderData::SHAPE_RECT; + l_SensorRectColliderData.m_ColliderShape = FRETBUZZ::ColliderData::SHAPE_RECT; l_SensorRectColliderData.m_bIsSensor = false; l_SensorRectColliderData.m_bIsBullet = false; l_SensorRectColliderData.m_fDensity = 1.0f; l_SensorRectColliderData.m_fLinearDamping = 0.5f; l_SensorRectColliderData.m_fAngularDamping = 0.5f; - this->addComponent(); - this->addComponent(l_SensorRectColliderData); + this->addComponent(); + this->addComponent(l_SensorRectColliderData); this->addComponent(); } } \ No newline at end of file diff --git a/FretBuzz/Sandbox/game/prefab/prefab_weapon.h b/FretBuzz/Sandbox/game/prefab/prefab_weapon.h index 3a78e67..886430c 100644 --- a/FretBuzz/Sandbox/game/prefab/prefab_weapon.h +++ b/FretBuzz/Sandbox/game/prefab/prefab_weapon.h @@ -4,10 +4,10 @@ namespace ns_HMGame { - class PrefabWeapon : public ns_fretBuzz::GameObject2D + class PrefabWeapon : public FRETBUZZ::GameObject2D { public: - PrefabWeapon(ns_fretBuzz::GameObject* a_ParentGameObject, std::string a_strName, glm::vec3 a_v3Position, glm::vec3 a_v3Rotation, glm::vec3 a_v3Scale, glm::vec2 a_v2DimensionWH); - PrefabWeapon(ns_fretBuzz::GameObject* a_ParentGameObject); + PrefabWeapon(FRETBUZZ::GameObject* a_ParentGameObject, std::string a_strName, glm::vec3 a_v3Position, glm::vec3 a_v3Rotation, glm::vec3 a_v3Scale, glm::vec2 a_v2DimensionWH); + PrefabWeapon(FRETBUZZ::GameObject* a_ParentGameObject); }; } \ No newline at end of file diff --git a/FretBuzz/Sandbox/game/scenes/gameplay_scene.cpp b/FretBuzz/Sandbox/game/scenes/gameplay_scene.cpp index ca87ea4..284d06d 100644 --- a/FretBuzz/Sandbox/game/scenes/gameplay_scene.cpp +++ b/FretBuzz/Sandbox/game/scenes/gameplay_scene.cpp @@ -22,47 +22,47 @@ namespace ns_HMGame { GameplayScene::GameplayScene(std::string a_strSceneName): - ns_fretBuzz::IScene(a_strSceneName) + FRETBUZZ::IScene(a_strSceneName) { PrefabGameManager* l_pGameManager = new PrefabGameManager(m_refRootGameObject, "GameManager"); - ns_fretBuzz::GameObject* m_pCam = ns_fretBuzz::GameObject::instantiate(m_refRootGameObject, "Main_Cam", { 0.0f, 0.0f , 0.0f }, { 0.0f, M_PI , 0.0f }, { 1.0f, 1.0f, 1.0f }); - ns_fretBuzz::OrthographicViewport l_CamViewport(-1.0f, 1.0f); - ns_fretBuzz::Camera* l_pCamComponent = m_pCam->addComponent(ns_fretBuzz::Viewport::PROJECTION_TYPE::ORTHOGRAPHIC, &l_CamViewport, ns_fretBuzz::LayerMask(ns_fretBuzz::LayerMask::PREDEFINED_MASK::EVERYTHING), glm::vec4{ 70.0/255.0f, 114.0f/255.0f, 136.0f/255.0f,1.0f}); + FRETBUZZ::GameObject* m_pCam = FRETBUZZ::GameObject::instantiate(m_refRootGameObject, "Main_Cam", { 0.0f, 0.0f , 0.0f }, { 0.0f, M_PI , 0.0f }, { 1.0f, 1.0f, 1.0f }); + FRETBUZZ::OrthographicViewport l_CamViewport(-1.0f, 1.0f); + FRETBUZZ::Camera* l_pCamComponent = m_pCam->addComponent(FRETBUZZ::Viewport::PROJECTION_TYPE::ORTHOGRAPHIC, &l_CamViewport, FRETBUZZ::LayerMask(FRETBUZZ::LayerMask::PREDEFINED_MASK::EVERYTHING), glm::vec4{ 70.0/255.0f, 114.0f/255.0f, 136.0f/255.0f,1.0f}); - /*ns_fretBuzz::GameObject2D* m_pGameObjectUI = ns_fretBuzz::GameObject2D::instantiate(m_refRootGameObject, "Canvas", { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 1.0f, 1.0f, 1.0f },{ 200.0f, 100.0f }, ns_fretBuzz::Layer()); - ns_fretBuzz::ns_UI::CanvasData l_uiPlayerCanvasData; - l_uiPlayerCanvasData.m_CanvasSpaceType = ns_fretBuzz::ns_UI::CANVAS_SPACE_TYPE::SCREEN_SPACE_OVERLAY; + /*FRETBUZZ::GameObject2D* m_pGameObjectUI = FRETBUZZ::GameObject2D::instantiate(m_refRootGameObject, "Canvas", { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 1.0f, 1.0f, 1.0f },{ 200.0f, 100.0f }, FRETBUZZ::Layer()); + FRETBUZZ::ns_UI::CanvasData l_uiPlayerCanvasData; + l_uiPlayerCanvasData.m_CanvasSpaceType = FRETBUZZ::ns_UI::CANVAS_SPACE_TYPE::SCREEN_SPACE_OVERLAY; l_uiPlayerCanvasData.m_pCamera = l_pCamComponent; - ns_fretBuzz::ns_UI::Canvas* m_pCanvas = ns_fretBuzz::ns_UI::Canvas::addToGameObject(*m_pGameObjectUI, l_uiPlayerCanvasData); - ns_fretBuzz::GameObject2D* m_pImgWeapon = ns_fretBuzz::GameObject2D::instantiate(*m_pGameObjectUI, "img", { -300.0f, -250.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 1.0f, 1.0f, 1.0f }, { 200.0f, 100.0f }, ns_fretBuzz::Layer()); - ns_fretBuzz::Image* m_pImage = ns_fretBuzz::Image::addToGameObject(*m_pImgWeapon, ns_fretBuzz::ResourceManager::getResource("weapon_pickup|weapon_golf_club")->getSprite(0), { 0.0f, 0.0f, 0.0f, 1.0f }); - ns_fretBuzz::TextRenderer* m_pTxtRnd = ns_fretBuzz::TextRenderer::addToGameObject(*m_pImgWeapon, "asd", "Cousine-Regular");*/ + FRETBUZZ::ns_UI::Canvas* m_pCanvas = FRETBUZZ::ns_UI::Canvas::addToGameObject(*m_pGameObjectUI, l_uiPlayerCanvasData); + FRETBUZZ::GameObject2D* m_pImgWeapon = FRETBUZZ::GameObject2D::instantiate(*m_pGameObjectUI, "img", { -300.0f, -250.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 1.0f, 1.0f, 1.0f }, { 200.0f, 100.0f }, FRETBUZZ::Layer()); + FRETBUZZ::Image* m_pImage = FRETBUZZ::Image::addToGameObject(*m_pImgWeapon, FRETBUZZ::ResourceManager::getResource("weapon_pickup|weapon_golf_club")->getSprite(0), { 0.0f, 0.0f, 0.0f, 1.0f }); + FRETBUZZ::TextRenderer* m_pTxtRnd = FRETBUZZ::TextRenderer::addToGameObject(*m_pImgWeapon, "asd", "Cousine-Regular");*/ - ns_fretBuzz::GameObject* m_pCam2 = ns_fretBuzz::GameObject::instantiate(*m_pCam, "Camera2", { 0.0f, 0.0f , 0.0f }, { 0.0f, 0.0f , 0.0f }, { 1.0f, 1.0f, 1.0f }); - ns_fretBuzz::OrthographicViewport l_CamViewport2(-0.5, 0.5, -0.5, 0.5, -1.0f, 1.0f, {0.7f, 0.7f}, {0.3f, 0.3 }); - ns_fretBuzz::Camera* l_pCamComponent2 = m_pCam2->addComponent(ns_fretBuzz::Viewport::PROJECTION_TYPE::ORTHOGRAPHIC, &l_CamViewport2, ns_fretBuzz::LayerMask(ns_fretBuzz::LayerMask::PREDEFINED_MASK::EVERYTHING), glm::vec4{ 225.0f / 255.0f, 95.0f / 255.0f, 60.0f/255.0f,1.0f }); + FRETBUZZ::GameObject* m_pCam2 = FRETBUZZ::GameObject::instantiate(*m_pCam, "Camera2", { 0.0f, 0.0f , 0.0f }, { 0.0f, 0.0f , 0.0f }, { 1.0f, 1.0f, 1.0f }); + FRETBUZZ::OrthographicViewport l_CamViewport2(-0.5, 0.5, -0.5, 0.5, -1.0f, 1.0f, {0.7f, 0.7f}, {0.3f, 0.3 }); + FRETBUZZ::Camera* l_pCamComponent2 = m_pCam2->addComponent(FRETBUZZ::Viewport::PROJECTION_TYPE::ORTHOGRAPHIC, &l_CamViewport2, FRETBUZZ::LayerMask(FRETBUZZ::LayerMask::PREDEFINED_MASK::EVERYTHING), glm::vec4{ 225.0f / 255.0f, 95.0f / 255.0f, 60.0f/255.0f,1.0f }); - ns_fretBuzz::Input::setCursorEnability(true, false); - ns_fretBuzz::GameObject2D* l_pCursor = ns_fretBuzz::GameObject2D::instantiate(m_refRootGameObject, "Cursor", { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 2.0f, 2.0f, 1.0f }, { 50.0f, 50.0f }); - l_pCursor->addComponent("Cursor"); + FRETBUZZ::Input::setCursorEnability(true, false); + FRETBUZZ::GameObject2D* l_pCursor = FRETBUZZ::GameObject2D::instantiate(m_refRootGameObject, "Cursor", { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 2.0f, 2.0f, 1.0f }, { 50.0f, 50.0f }); + l_pCursor->addComponent("Cursor"); l_pCursor->addComponent(l_pCamComponent); - ns_fretBuzz::GameObject2D* l_pLabelGameObj1 = new PrefabWall(m_refRootGameObject, "WALL1", { 0.0f, 30.0f, 0.0f }, { 0.0f, 0.0f , 0.0f }, { 1.0f, 1.0f, 1.0f }, { 400.0f, 100.0f }); - ns_fretBuzz::GameObject2D* l_pLabelGameObj2 = new PrefabWall(m_refRootGameObject, "WALL2", { 150.0f, -130.0f, 0.0f }, { 0.0f, 0.0f , 0.0f}, { 1.0f, 1.0f, 1.0f }, { 100.0f, 300.0f }); - ns_fretBuzz::GameObject2D* l_pLabelGameObj3 = new PrefabWall(m_refRootGameObject, "WALL3", {-200.0f, -330.0f, 0.0f }, { 0.0f, 0.0f , 0.0f }, { 1.0f, 1.0f, 1.0f }, { 800.0f, 100.0f }); - ns_fretBuzz::GameObject2D* l_pLabelGameObj4 = new PrefabWall(m_refRootGameObject, "WALL4", { -550.0f, -130.0f, 0.0f }, { 0.0f, 0.0f , 0.0f }, { 1.0f, 1.0f, 1.0f }, { 100.0f, 300.0f }); + FRETBUZZ::GameObject2D* l_pLabelGameObj1 = new PrefabWall(m_refRootGameObject, "WALL1", { 0.0f, 30.0f, 0.0f }, { 0.0f, 0.0f , 0.0f }, { 1.0f, 1.0f, 1.0f }, { 400.0f, 100.0f }); + FRETBUZZ::GameObject2D* l_pLabelGameObj2 = new PrefabWall(m_refRootGameObject, "WALL2", { 150.0f, -130.0f, 0.0f }, { 0.0f, 0.0f , 0.0f}, { 1.0f, 1.0f, 1.0f }, { 100.0f, 300.0f }); + FRETBUZZ::GameObject2D* l_pLabelGameObj3 = new PrefabWall(m_refRootGameObject, "WALL3", {-200.0f, -330.0f, 0.0f }, { 0.0f, 0.0f , 0.0f }, { 1.0f, 1.0f, 1.0f }, { 800.0f, 100.0f }); + FRETBUZZ::GameObject2D* l_pLabelGameObj4 = new PrefabWall(m_refRootGameObject, "WALL4", { -550.0f, -130.0f, 0.0f }, { 0.0f, 0.0f , 0.0f }, { 1.0f, 1.0f, 1.0f }, { 100.0f, 300.0f }); /// Player - ns_fretBuzz::GameObject2D* m_pPlayerGameObject = new PrefabPlayer(m_refRootGameObject, "Player", { 0.0f, -100.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 2.0f, 2.0f, 1.0f }, { 40.0f, 40.0f }); + FRETBUZZ::GameObject2D* m_pPlayerGameObject = new PrefabPlayer(m_refRootGameObject, "Player", { 0.0f, -100.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 2.0f, 2.0f, 1.0f }, { 40.0f, 40.0f }); /// Enemy - ns_fretBuzz::GameObject2D* m_pEnemyGameObject1 = new PrefabEnemy(m_refRootGameObject, "Enemy1", { 0.0f, -200.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 2.0f, 2.0f, 1.0f }, { 40.0f, 40.0f }); - ns_fretBuzz::GameObject2D* m_pEnemyGameObject2 = new PrefabEnemy(m_refRootGameObject, "Enemy2", { 300.0f, 200.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 2.0f, 2.0f, 1.0f }, { 40.0f, 40.0f }); + FRETBUZZ::GameObject2D* m_pEnemyGameObject1 = new PrefabEnemy(m_refRootGameObject, "Enemy1", { 0.0f, -200.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 2.0f, 2.0f, 1.0f }, { 40.0f, 40.0f }); + FRETBUZZ::GameObject2D* m_pEnemyGameObject2 = new PrefabEnemy(m_refRootGameObject, "Enemy2", { 300.0f, 200.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 2.0f, 2.0f, 1.0f }, { 40.0f, 40.0f }); - //ns_fretBuzz::GameObject2D* l_pPickupGameObj = new ns_HMGame::PrefabWeapon(&m_refRootGameObject, "WEAPON", { -375.0f, -100.0f , 0.0f }, { 0.0f, 0.0f , 0.0f }, { 1.0f, 1.0f, 1.0f }, { 70.0f, 70.0f }); + //FRETBUZZ::GameObject2D* l_pPickupGameObj = new ns_HMGame::PrefabWeapon(&m_refRootGameObject, "WEAPON", { -375.0f, -100.0f , 0.0f }, { 0.0f, 0.0f , 0.0f }, { 1.0f, 1.0f, 1.0f }, { 70.0f, 70.0f }); WeaponManager::AddWeapon({ -200.0f, 200.0f , 0.0f }, WEAPON_DOUBLE_BARREL, true); WeaponManager::AddWeapon({ -300.0f, 70.0f , 0.0f }, WEAPON_M16, true); diff --git a/FretBuzz/Sandbox/game/scenes/gameplay_scene.h b/FretBuzz/Sandbox/game/scenes/gameplay_scene.h index cec5c81..bcb589c 100644 --- a/FretBuzz/Sandbox/game/scenes/gameplay_scene.h +++ b/FretBuzz/Sandbox/game/scenes/gameplay_scene.h @@ -3,7 +3,7 @@ namespace ns_HMGame { - class GameplayScene : public ns_fretBuzz::IScene + class GameplayScene : public FRETBUZZ::IScene { public: GameplayScene(std::string a_strSceneName); diff --git a/FretBuzz/Sandbox/imgui.ini b/FretBuzz/Sandbox/imgui.ini index b1f22c1..086be0d 100644 --- a/FretBuzz/Sandbox/imgui.ini +++ b/FretBuzz/Sandbox/imgui.ini @@ -4,11 +4,10 @@ Size=400,400 Collapsed=0 [Window][EDITOR] -ViewportPos=1157,110 -ViewportId=0xA4D966FE -Size=699,407 +ViewportPos=1200,253 +ViewportId=0x3C09363C +Size=699,813 Collapsed=0 -DockId=0x00000002,0 [Window][HIERARCHY] ViewportPos=1157,110 @@ -16,10 +15,6 @@ ViewportId=0xA4D966FE Pos=0,409 Size=699,404 Collapsed=0 -DockId=0x00000003,0 [Docking][Data] -DockNode ID=0x00000001 Pos=1157,110 Size=699,813 Split=Y Selected=0xBEB83641 - DockNode ID=0x00000002 Parent=0x00000001 SizeRef=699,407 Selected=0x3C09363C - DockNode ID=0x00000003 Parent=0x00000001 SizeRef=699,404 Selected=0xBEB83641 diff --git a/FretBuzz/Sandbox/sandbox.cpp b/FretBuzz/Sandbox/sandbox.cpp index 785a404..56e0088 100644 --- a/FretBuzz/Sandbox/sandbox.cpp +++ b/FretBuzz/Sandbox/sandbox.cpp @@ -3,7 +3,7 @@ #include "game/scenes/gameplay_scene.h" #include "test/scenes/threed_test_setup.h" -void SetStartupData(ns_fretBuzz::GameStartup& a_GameStartupData) +void SetStartupData(FRETBUZZ::GameStartup& a_GameStartupData) { a_GameStartupData.m_strWindowName = "FretBuzz"; a_GameStartupData.m_uiScreenWidth = 1200; @@ -12,8 +12,8 @@ void SetStartupData(ns_fretBuzz::GameStartup& a_GameStartupData) a_GameStartupData.m_vectScenes = { - //new ns_fretBuzz::SceneData("3d_Test"), - new ns_fretBuzz::SceneData("GamePlay") + //new FRETBUZZ::SceneData("3d_Test"), + new FRETBUZZ::SceneData("GamePlay") /*new SceneData("mainmenustate"), new SceneData("scorestate")*/ }; diff --git a/FretBuzz/Sandbox/test/CharacterTest.cpp b/FretBuzz/Sandbox/test/CharacterTest.cpp index 865e476..eedcc68 100644 --- a/FretBuzz/Sandbox/test/CharacterTest.cpp +++ b/FretBuzz/Sandbox/test/CharacterTest.cpp @@ -9,14 +9,14 @@ namespace ns_HMGame { - CharacterTest::CharacterTest(ns_fretBuzz::GameObject& a_ParentGameObject , std::string a_Name, ns_fretBuzz::GameObject* a_CamGameObject, GameObject& a_refOriginGameObject) - : ns_fretBuzz::GameObject2D(a_ParentGameObject, a_Name, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 2.0f, 2.0f, 1.0f }, { 50.0f, 50.0f }) + CharacterTest::CharacterTest(FRETBUZZ::GameObject& a_ParentGameObject , std::string a_Name, FRETBUZZ::GameObject* a_CamGameObject, GameObject& a_refOriginGameObject) + : FRETBUZZ::GameObject2D(a_ParentGameObject, a_Name, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 2.0f, 2.0f, 1.0f }, { 50.0f, 50.0f }) { - m_pAudSrc = this->addComponent("beats"); - m_pSpriteAnimator = this->addComponent("Player" ); + m_pAudSrc = this->addComponent("beats"); + m_pSpriteAnimator = this->addComponent("Player" ); - ns_fretBuzz::ColliderData l_RectColliderData; - m_pRectCollider = this->addComponent(l_RectColliderData); + FRETBUZZ::ColliderData l_RectColliderData; + m_pRectCollider = this->addComponent(l_RectColliderData); m_pAudSrc->play(); m_pAudSrc->setLooping(true); @@ -25,40 +25,40 @@ namespace ns_HMGame m_pRefOriginGameObject = &a_refOriginGameObject; - ns_fretBuzz::Input::setCursorEnability(true); + FRETBUZZ::Input::setCursorEnability(true); } void CharacterTest::update(const float& a_fDeltaTime) { - if (ns_fretBuzz::Input::IsKeyDown(GLFW_KEY_G)) + if (FRETBUZZ::Input::IsKeyDown(GLFW_KEY_G)) { m_pAudSrc->play(); } - if (ns_fretBuzz::Input::IsKeyDown(GLFW_KEY_H)) + if (FRETBUZZ::Input::IsKeyDown(GLFW_KEY_H)) { m_pAudSrc->restart(); } - if (ns_fretBuzz::Input::IsKeyDown(GLFW_KEY_J)) + if (FRETBUZZ::Input::IsKeyDown(GLFW_KEY_J)) { m_pAudSrc->stop(); } - if (ns_fretBuzz::Input::IsKeyDown(GLFW_KEY_K)) + if (FRETBUZZ::Input::IsKeyDown(GLFW_KEY_K)) { m_pAudSrc->pause(); } - if (ns_fretBuzz::Input::IsMouseBtnPutDown(GLFW_MOUSE_BUTTON_1)) + if (FRETBUZZ::Input::IsMouseBtnPutDown(GLFW_MOUSE_BUTTON_1)) { m_pSpriteAnimator->play("attack"); } - if (ns_fretBuzz::Input::IsMouseBtnPutDown(GLFW_MOUSE_BUTTON_2)) + if (FRETBUZZ::Input::IsMouseBtnPutDown(GLFW_MOUSE_BUTTON_2)) { m_pSpriteAnimator->play("humanshield"); } - if (ns_fretBuzz::Input::IsMouseBtnPutDown(GLFW_MOUSE_BUTTON_3)) + if (FRETBUZZ::Input::IsMouseBtnPutDown(GLFW_MOUSE_BUTTON_3)) { m_pSpriteAnimator->play("snap"); } @@ -115,10 +115,10 @@ namespace ns_HMGame }*/ //std::cout << "Angle to rotate :: "<< l_fAngleToRotate <<"\n"; - ns_fretBuzz::GameObject::update(a_fDeltaTime); + FRETBUZZ::GameObject::update(a_fDeltaTime); }; - void CharacterTest::render(const ns_fretBuzz::Camera& a_Camera) + void CharacterTest::render(const FRETBUZZ::Camera& a_Camera) { GameObject::render(a_Camera); }; diff --git a/FretBuzz/Sandbox/test/CharacterTest.h b/FretBuzz/Sandbox/test/CharacterTest.h index e83003d..2c7faef 100644 --- a/FretBuzz/Sandbox/test/CharacterTest.h +++ b/FretBuzz/Sandbox/test/CharacterTest.h @@ -12,14 +12,14 @@ namespace ns_HMGame { - class CharacterTest : public ns_fretBuzz::GameObject2D + class CharacterTest : public FRETBUZZ::GameObject2D { private: - ns_fretBuzz::AudioSource* m_pAudSrc = nullptr; - ns_fretBuzz::SpriteAnimationController* m_pSpriteAnimator = nullptr; - ns_fretBuzz::RectCollider* m_pRectCollider = nullptr; + FRETBUZZ::AudioSource* m_pAudSrc = nullptr; + FRETBUZZ::SpriteAnimationController* m_pSpriteAnimator = nullptr; + FRETBUZZ::RectCollider* m_pRectCollider = nullptr; - ns_fretBuzz::GameObject* m_pcamGameObj = nullptr; + FRETBUZZ::GameObject* m_pcamGameObj = nullptr; bool isAudioPlaying = false; @@ -37,12 +37,12 @@ namespace ns_HMGame public: - ns_fretBuzz::GameObject* m_pTestGameObject1 = nullptr; - ns_fretBuzz::GameObject* m_pTestGameObject2 = nullptr; + FRETBUZZ::GameObject* m_pTestGameObject1 = nullptr; + FRETBUZZ::GameObject* m_pTestGameObject2 = nullptr; - CharacterTest(GameObject& a_ParentGameObject, std::string a_strName, ns_fretBuzz::GameObject* a_CamGameObject, GameObject& a_refOriginGameObject); + CharacterTest(GameObject& a_ParentGameObject, std::string a_strName, FRETBUZZ::GameObject* a_CamGameObject, GameObject& a_refOriginGameObject); virtual void update(const float& a_fDeltaTime) override; - virtual void render(const ns_fretBuzz::Camera& a_Camera) override; + virtual void render(const FRETBUZZ::Camera& a_Camera) override; }; } \ No newline at end of file diff --git a/FretBuzz/Sandbox/test/EnemyTest.cpp b/FretBuzz/Sandbox/test/EnemyTest.cpp index 7533994..ccdc041 100644 --- a/FretBuzz/Sandbox/test/EnemyTest.cpp +++ b/FretBuzz/Sandbox/test/EnemyTest.cpp @@ -3,15 +3,15 @@ namespace ns_HMGame { EnemyTest::EnemyTest(GameObject& a_ParentGameObject, std::string a_strName) - : ns_fretBuzz::GameObject2D(a_ParentGameObject, a_strName, { 300.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 2.0f, 2.0f, 1.0f }, { 150.0f, 100.0f }) + : FRETBUZZ::GameObject2D(a_ParentGameObject, a_strName, { 300.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 2.0f, 2.0f, 1.0f }, { 150.0f, 100.0f }) { - m_pSpriteAnimator = this->addComponent("Enemy"); + m_pSpriteAnimator = this->addComponent("Enemy"); - ns_fretBuzz::ColliderData l_RectColliderData; - l_RectColliderData.m_PhysicsBodyType = ns_fretBuzz::PHYSICS_BODY_TYPE::KINEMATIC; + FRETBUZZ::ColliderData l_RectColliderData; + l_RectColliderData.m_PhysicsBodyType = FRETBUZZ::PHYSICS_BODY_TYPE::KINEMATIC; l_RectColliderData.m_bIsFixedRotation = true; l_RectColliderData.m_v2DimensionWH = { 50.0f, 50.0f }; - m_pRectCollider = this->addComponent(l_RectColliderData); + m_pRectCollider = this->addComponent(l_RectColliderData); } //void EnemyTest::update(float a_fDeltaTime) {} diff --git a/FretBuzz/Sandbox/test/EnemyTest.h b/FretBuzz/Sandbox/test/EnemyTest.h index b11f8f0..bd12861 100644 --- a/FretBuzz/Sandbox/test/EnemyTest.h +++ b/FretBuzz/Sandbox/test/EnemyTest.h @@ -6,12 +6,12 @@ namespace ns_HMGame { - class EnemyTest : public ns_fretBuzz::GameObject2D + class EnemyTest : public FRETBUZZ::GameObject2D { private: - ns_fretBuzz::SpriteAnimationController* m_pSpriteAnimator = nullptr; + FRETBUZZ::SpriteAnimationController* m_pSpriteAnimator = nullptr; - ns_fretBuzz::RectCollider* m_pRectCollider = nullptr; + FRETBUZZ::RectCollider* m_pRectCollider = nullptr; public: EnemyTest(GameObject& a_ParentGameObject, std::string a_strName); diff --git a/FretBuzz/Sandbox/test/PlayerController.h b/FretBuzz/Sandbox/test/PlayerController.h index a69cb39..188eb17 100644 --- a/FretBuzz/Sandbox/test/PlayerController.h +++ b/FretBuzz/Sandbox/test/PlayerController.h @@ -9,7 +9,7 @@ namespace ns_HMGame { - class PlayerController : public ns_fretBuzz::Behaviour + class PlayerController : public FRETBUZZ::Behaviour { private: double m_MouseX, m_MouseY; @@ -18,15 +18,15 @@ namespace ns_HMGame glm::vec2 m_v2LastMouseXY; glm::vec3 m_v3PitchYawRoll; - ns_fretBuzz::Camera* m_pPerspectiveCamera = nullptr; + FRETBUZZ::Camera* m_pPerspectiveCamera = nullptr; public: - PlayerController(ns_fretBuzz::GameObject* a_GameObject) - : ns_fretBuzz::Behaviour(a_GameObject) + PlayerController(FRETBUZZ::GameObject* a_GameObject) + : FRETBUZZ::Behaviour(a_GameObject) { - ns_fretBuzz::Input::setCursorEnability(true, true); - m_pPerspectiveCamera = m_GameObject.getComponent(ns_fretBuzz::COMPONENT_TYPE::CAMERA); + FRETBUZZ::Input::setCursorEnability(true, true); + m_pPerspectiveCamera = m_GameObject.getComponent(FRETBUZZ::COMPONENT_TYPE::CAMERA); } protected: @@ -35,25 +35,25 @@ namespace ns_HMGame { float l_fVelocity = a_fDeltaTime * 3.0f; - if (ns_fretBuzz::Input::IsKeyDown(GLFW_KEY_A)) + if (FRETBUZZ::Input::IsKeyDown(GLFW_KEY_A)) { m_GameObject.m_Transform.setLocalPosition(m_GameObject.m_Transform.getLocalPosition() + (m_GameObject.m_Transform.getRight() * l_fVelocity)); } - else if (ns_fretBuzz::Input::IsKeyDown(GLFW_KEY_D)) + else if (FRETBUZZ::Input::IsKeyDown(GLFW_KEY_D)) { m_GameObject.m_Transform.setLocalPosition(m_GameObject.m_Transform.getLocalPosition() + (m_GameObject.m_Transform.getRight() * -l_fVelocity)); } - if (ns_fretBuzz::Input::IsKeyDown(GLFW_KEY_W)) + if (FRETBUZZ::Input::IsKeyDown(GLFW_KEY_W)) { m_GameObject.m_Transform.setLocalPosition(m_GameObject.m_Transform.getLocalPosition() + (m_GameObject.m_Transform.getForward() * l_fVelocity)); } - else if (ns_fretBuzz::Input::IsKeyDown(GLFW_KEY_S)) + else if (FRETBUZZ::Input::IsKeyDown(GLFW_KEY_S)) { m_GameObject.m_Transform.setLocalPosition(m_GameObject.m_Transform.getLocalPosition() + (m_GameObject.m_Transform.getForward() * -l_fVelocity)); } - ns_fretBuzz::Input::GetMousePosition(m_MouseX, m_MouseY); + FRETBUZZ::Input::GetMousePosition(m_MouseX, m_MouseY); if (m_bIsFirstRun && m_MouseX == 0.0f && m_MouseY == 0.0f) { return; @@ -86,7 +86,7 @@ namespace ns_HMGame m_GameObject.m_Transform.setLocalRotation(glm::quat({m_v3PitchYawRoll.x, m_v3PitchYawRoll.y, m_v3PitchYawRoll.z})); - int l_iScrollValue = ns_fretBuzz::Input::GetMouseScroll(); + int l_iScrollValue = FRETBUZZ::Input::GetMouseScroll(); if (l_iScrollValue == 1 || l_iScrollValue == -1) { m_pPerspectiveCamera->zoom(5.0f * l_iScrollValue); @@ -106,7 +106,7 @@ namespace ns_HMGame Behaviour::update(a_fDeltaTime); } - virtual void render(const glm::mat4& a_mat4Transformation, const ns_fretBuzz::Camera& a_Camera) override + virtual void render(const glm::mat4& a_mat4Transformation, const FRETBUZZ::Camera& a_Camera) override { Behaviour::render(a_mat4Transformation,a_Camera); } diff --git a/FretBuzz/Sandbox/test/light_cube.h b/FretBuzz/Sandbox/test/light_cube.h index 370b6db..09cb493 100644 --- a/FretBuzz/Sandbox/test/light_cube.h +++ b/FretBuzz/Sandbox/test/light_cube.h @@ -9,7 +9,7 @@ namespace ns_HMGame { - class light_cube : public ns_fretBuzz::GameObject + class light_cube : public FRETBUZZ::GameObject { public: @@ -21,11 +21,11 @@ namespace ns_HMGame glm::vec4 m_v4LightColor = {1.0f, 1.0f, 1.0f, 1.0f}; - ns_fretBuzz::Light* m_pLight = nullptr; + FRETBUZZ::Light* m_pLight = nullptr; glm::vec3 m_v3LightPosition; - ns_fretBuzz::Material m_Material; + FRETBUZZ::Material m_Material; float m_vertices[108] = { -0.5f, -0.5f, -0.5f, // Bottom-left @@ -71,14 +71,14 @@ namespace ns_HMGame -0.5f, 0.5f, 0.5f // bottom-left }; - light_cube(ns_fretBuzz::GameObject& a_ParentGameObject, std::string a_strName, glm::vec3 a_v3Position, ns_fretBuzz::Light::LIGHT_TYPE a_LightType, float a_fIntensity = 2.0f) + light_cube(FRETBUZZ::GameObject& a_ParentGameObject, std::string a_strName, glm::vec3 a_v3Position, FRETBUZZ::Light::LIGHT_TYPE a_LightType, float a_fIntensity = 2.0f) : GameObject(a_ParentGameObject, a_strName, a_v3Position, { 0.0f, 0.0f, 0.0f }, { 1.0f, 1.0f, 1.0f }) { - m_Material.setShader(*ns_fretBuzz::ShaderManager::getShaderOfType(ns_fretBuzz::Shader::DEFAULT_3D)); + m_Material.setShader(*FRETBUZZ::ShaderManager::getShaderOfType(FRETBUZZ::Shader::DEFAULT_3D)); //m_pTexture = ResourceManager::getResource("container"); - m_pLight = ns_fretBuzz::Light::addToGameObject(*this, a_LightType); - ns_fretBuzz::Light::LightSource& l_LightSource = m_pLight->m_LightSource; + m_pLight = FRETBUZZ::Light::addToGameObject(*this, a_LightType); + FRETBUZZ::Light::LightSource& l_LightSource = m_pLight->m_LightSource; l_LightSource.m_v4LightPosition = glm::vec4(1.0f, 1.0f, 1.0f, 1.0f); l_LightSource.m_v3LightDirection = m_Transform.getForward(); @@ -109,7 +109,7 @@ namespace ns_HMGame virtual void update(const float& a_fDeltaTime) override { - if (m_pLight->getType() == ns_fretBuzz::Light::LIGHT_TYPE::POINT) + if (m_pLight->getType() == FRETBUZZ::Light::LIGHT_TYPE::POINT) { rot = rot + (float)M_PI * a_fDeltaTime * 0.5f; m_Transform.setLocalRotation({ rot, rot , rot }); @@ -120,11 +120,11 @@ namespace ns_HMGame m_Transform.setWorldPosition(l_newPosition); } - if (ns_fretBuzz::Input::IsKeyPutDown(GLFW_KEY_0)) + if (FRETBUZZ::Input::IsKeyPutDown(GLFW_KEY_0)) { m_pLight->m_LightSource.m_fIntensity -= 0.1f; } - else if (ns_fretBuzz::Input::IsKeyPutDown(GLFW_KEY_1)) + else if (FRETBUZZ::Input::IsKeyPutDown(GLFW_KEY_1)) { m_pLight->m_LightSource.m_fIntensity += 0.1f; } @@ -142,9 +142,9 @@ namespace ns_HMGame return m_Transform.getWorldPosition(); } - virtual void render(const ns_fretBuzz::Camera& a_Camera) override + virtual void render(const FRETBUZZ::Camera& a_Camera) override { - if (m_pLight->getType() != ns_fretBuzz::Light::LIGHT_TYPE::SPOT) + if (m_pLight->getType() != FRETBUZZ::Light::LIGHT_TYPE::SPOT) { m_Material.m_MaterialData.m_v4Albedo = m_v4LightColor; m_Material.bind(a_Camera); diff --git a/FretBuzz/Sandbox/test/scenes/init_state.h b/FretBuzz/Sandbox/test/scenes/init_state.h index 74d4727..0b1af38 100644 --- a/FretBuzz/Sandbox/test/scenes/init_state.h +++ b/FretBuzz/Sandbox/test/scenes/init_state.h @@ -13,7 +13,7 @@ #include "components//gameobject_components/image.h" #include "system/core/window.h" -namespace ns_fretBuzz +namespace FRETBUZZ { class InitState : public IScene { @@ -22,29 +22,29 @@ namespace ns_fretBuzz IScene(a_strSceneName) { - GameObject2D* l_pLabelGameObj1 = GameObject2D::instantiate(m_refRootGameObject, "LABEL1", { 0.0f, 0.0f , 0.0f }, { 0.0f, 0.0f , 0.0f }, { 1.0f, 1.0f, 1.0f }, { 150.0f, 100.0f }, ns_fretBuzz::Layer()); + GameObject2D* l_pLabelGameObj1 = GameObject2D::instantiate(m_refRootGameObject, "LABEL1", { 0.0f, 0.0f , 0.0f }, { 0.0f, 0.0f , 0.0f }, { 1.0f, 1.0f, 1.0f }, { 150.0f, 100.0f }, FRETBUZZ::Layer()); l_pLabelGameObj1->addComponent(nullptr, glm::vec4{ 1.0f, 0.0f, 0.0f,1.0f }, true); //SpriteRenderer::addToGameObject(*l_pLabelGameObj1, { 0.0f, 1.0f, 0.0f,1.0f }, { 150.0f, 100.0f }); ColliderData l_RectColliderData; l_pLabelGameObj1->addComponent(l_RectColliderData); - GameObject2D* l_pLabelGameObj2 = GameObject2D::instantiate(*l_pLabelGameObj1, "LABEL2", { 50.0f, 50.0f , 0.0f }, { 0.0f, 0.0f , 0.0f }, { 1.0f, 1.0f, 1.0f }, { 150.0f, 100.0f }, ns_fretBuzz::Layer()); + GameObject2D* l_pLabelGameObj2 = GameObject2D::instantiate(*l_pLabelGameObj1, "LABEL2", { 50.0f, 50.0f , 0.0f }, { 0.0f, 0.0f , 0.0f }, { 1.0f, 1.0f, 1.0f }, { 150.0f, 100.0f }, FRETBUZZ::Layer()); l_pLabelGameObj2->addComponent(nullptr, glm::vec4{ 0.0f, 1.0f, 0.0f,1.0f }, true); //SpriteRenderer::addToGameObject(*l_pLabelGameObj2, { 1.0f, 1.0f, 0.0f,1.0f }, { 150.0f, 100.0f }); l_pLabelGameObj2->addComponent(l_RectColliderData); - GameObject2D* l_pLabelGameObj3 = GameObject2D::instantiate(*l_pLabelGameObj2, "LABEL3", { 50.0f, 50.0f , 0.0f }, { 0.0f, 0.0f , 0.0f }, { 1.0f, 1.0f, 1.0f }, { 150.0f, 100.0f }, ns_fretBuzz::Layer()); + GameObject2D* l_pLabelGameObj3 = GameObject2D::instantiate(*l_pLabelGameObj2, "LABEL3", { 50.0f, 50.0f , 0.0f }, { 0.0f, 0.0f , 0.0f }, { 1.0f, 1.0f, 1.0f }, { 150.0f, 100.0f }, FRETBUZZ::Layer()); l_pLabelGameObj3->addComponent(nullptr, glm::vec4{ 0.0f, 0.0f, 1.0f,1.0f }, true); //SpriteRenderer::addToGameObject(*l_pLabelGameObj3, { 0.8f, 0.3f, 0.5f,1.0f }, { 150.0f, 100.0f }); l_pLabelGameObj3->addComponent(l_RectColliderData); - GameObject2D* l_pLabelGameObj4 = GameObject2D::instantiate(*l_pLabelGameObj3, "LABEL4", { 50.0f, 50.0f , 0.0f }, { 0.0f, 0.0f , 0.0f }, { 1.0f, 1.0f, 1.0f }, { 150.0f, 100.0f }, ns_fretBuzz::Layer()); + GameObject2D* l_pLabelGameObj4 = GameObject2D::instantiate(*l_pLabelGameObj3, "LABEL4", { 50.0f, 50.0f , 0.0f }, { 0.0f, 0.0f , 0.0f }, { 1.0f, 1.0f, 1.0f }, { 150.0f, 100.0f }, FRETBUZZ::Layer()); l_pLabelGameObj4->addComponent(nullptr, glm::vec4{ 1.0f, 1.0f, 0.0f,1.0f }, true); //SpriteRenderer::addToGameObject(*l_pLabelGameObj4, { 0.0f, 1.0f, 1.0f,1.0f }, { 150.0f, 100.0f }); l_pLabelGameObj4->addComponent(l_RectColliderData); - GameObject2D* l_pLabelGameObj5 = GameObject2D::instantiate(*l_pLabelGameObj4, "LABEL5", { 50.0f, 50.0f , 0.0f }, { 0.0f, 0.0f , 0.0f }, { 1.0f, 1.0f, 1.0f }, { 150.0f, 100.0f }, ns_fretBuzz::Layer()); + GameObject2D* l_pLabelGameObj5 = GameObject2D::instantiate(*l_pLabelGameObj4, "LABEL5", { 50.0f, 50.0f , 0.0f }, { 0.0f, 0.0f , 0.0f }, { 1.0f, 1.0f, 1.0f }, { 150.0f, 100.0f }, FRETBUZZ::Layer()); l_pLabelGameObj5->addComponent(nullptr, glm::vec4{ 0.0f, 1.0f, 1.0f,1.0f }, true); //SpriteRenderer::addToGameObject(*l_pLabelGameObj5, { 1.0f, 0.0f, 1.0f,1.0f }, { 150.0f, 100.0f }); l_pLabelGameObj5->addComponent(l_RectColliderData); @@ -53,10 +53,10 @@ namespace ns_fretBuzz //SpriteRenderer::addToGameObject(*l_pLabelGameObj6, { 1.0f, 1.0f, 1.0f,1.0f }, { 150.0f, 100.0f }); //RectCollider::addToGameObject(*l_pLabelGameObj6, { 150.0f, 100.0f }); - GameObject2D* MainParent = GameObject2D::instantiate(m_refRootGameObject, "Main_Parent", { 0.0f, 0.0f , 0.0f }, { 0.0f, 0.0f , 0.0f }, { 1.0f, 1.0f, 1.0f }, { 150.0f, 100.0f }, ns_fretBuzz::Layer()); + GameObject2D* MainParent = GameObject2D::instantiate(m_refRootGameObject, "Main_Parent", { 0.0f, 0.0f , 0.0f }, { 0.0f, 0.0f , 0.0f }, { 1.0f, 1.0f, 1.0f }, { 150.0f, 100.0f }, FRETBUZZ::Layer()); CharacterTest* l_gameObjChar = new CharacterTest(*MainParent, "character_test", MainParent, m_refRootGameObject); - GameObject* m_pCam = GameObject::instantiate(*MainParent, "Main_Cam", { 0.0f, 0.0f , 0.0f }, { 0.0f, M_PI , 0.0f }, { 1.0f, 1.0f, 1.0f }, ns_fretBuzz::Layer(), true); + GameObject* m_pCam = GameObject::instantiate(*MainParent, "Main_Cam", { 0.0f, 0.0f , 0.0f }, { 0.0f, M_PI , 0.0f }, { 1.0f, 1.0f, 1.0f }, FRETBUZZ::Layer(), true); OrthographicViewport l_MainCam(-1.0f, 1.0f); m_pCam->addComponent(Viewport::PROJECTION_TYPE::ORTHOGRAPHIC, &l_MainCam, LayerMask()); diff --git a/FretBuzz/Sandbox/test/scenes/threed_test_setup.h b/FretBuzz/Sandbox/test/scenes/threed_test_setup.h index a594538..e1fecf2 100644 --- a/FretBuzz/Sandbox/test/scenes/threed_test_setup.h +++ b/FretBuzz/Sandbox/test/scenes/threed_test_setup.h @@ -11,10 +11,10 @@ namespace ns_HMGame { - class threed_test_scene: public ns_fretBuzz::IScene + class threed_test_scene: public FRETBUZZ::IScene { private: - ns_fretBuzz::GameObject* m_pThreeDManager = nullptr; + FRETBUZZ::GameObject* m_pThreeDManager = nullptr; ns_HMGame::test_cube* m_pCube1 = nullptr; ns_HMGame::test_cube* m_pCube2 = nullptr; ns_HMGame::test_cube* m_pCube3 = nullptr; @@ -25,58 +25,58 @@ namespace ns_HMGame light_cube* m_pLightCube4 = nullptr; light_cube* m_pLightCube5 = nullptr; - ns_fretBuzz::Model* m_pModel = nullptr; + FRETBUZZ::Model* m_pModel = nullptr; public: threed_test_scene(std::string a_strSceneName) : IScene(a_strSceneName) { - ns_fretBuzz::GameObject* m_pManager = ns_fretBuzz::GameObject::instantiate(m_refRootGameObject, "3D_Manager", { 0.0f, 0.0f, 5.0f }, + FRETBUZZ::GameObject* m_pManager = FRETBUZZ::GameObject::instantiate(m_refRootGameObject, "3D_Manager", { 0.0f, 0.0f, 5.0f }, { 0.0f, M_PI, 0.0f }, { 1.0f, 1.0f, 1.0f }); - ns_fretBuzz::PerspectiveViewport l_PerspectiveViewport(60.0f, 1.0f, 50.0f); - ns_fretBuzz::Camera* l_pMainCam = m_pManager->addComponent(ns_fretBuzz::Viewport::PROJECTION_TYPE::PERSPECTIVE, &l_PerspectiveViewport, ns_fretBuzz::LayerMask(ns_fretBuzz::LayerMask::PREDEFINED_MASK::EVERYTHING)); + FRETBUZZ::PerspectiveViewport l_PerspectiveViewport(60.0f, 1.0f, 50.0f); + FRETBUZZ::Camera* l_pMainCam = m_pManager->addComponent(FRETBUZZ::Viewport::PROJECTION_TYPE::PERSPECTIVE, &l_PerspectiveViewport, FRETBUZZ::LayerMask(FRETBUZZ::LayerMask::PREDEFINED_MASK::EVERYTHING)); m_pManager->addComponent(); - ns_fretBuzz::GameObject* m_pCam2GameObj = ns_fretBuzz::GameObject::instantiate(*m_pManager, "Cam2", { 0.0f, 0.0f, 0.0f }, + FRETBUZZ::GameObject* m_pCam2GameObj = FRETBUZZ::GameObject::instantiate(*m_pManager, "Cam2", { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 1.0f, 1.0f, 1.0f }); - ns_fretBuzz::PerspectiveViewport l_PerspectiveViewport2(60.0f, 1.0f, 50.0f, { 0.7, 0.7 }, { 0.3, 0.3 }); - ns_fretBuzz::Camera* l_pMainCam2 = m_pCam2GameObj->addComponent(ns_fretBuzz::Viewport::PROJECTION_TYPE::PERSPECTIVE, &l_PerspectiveViewport2, ns_fretBuzz::LayerMask(ns_fretBuzz::LayerMask::PREDEFINED_MASK::EVERYTHING)); + FRETBUZZ::PerspectiveViewport l_PerspectiveViewport2(60.0f, 1.0f, 50.0f, { 0.7, 0.7 }, { 0.3, 0.3 }); + FRETBUZZ::Camera* l_pMainCam2 = m_pCam2GameObj->addComponent(FRETBUZZ::Viewport::PROJECTION_TYPE::PERSPECTIVE, &l_PerspectiveViewport2, FRETBUZZ::LayerMask(FRETBUZZ::LayerMask::PREDEFINED_MASK::EVERYTHING)); - ns_fretBuzz::GameObject* m_pNanoSuit = ns_fretBuzz::GameObject::instantiate(m_refRootGameObject, "NanoSuitMain", { 0.0f, 0.0f, 0.0f },{ 0.0f, 0.0f, 0.0f }, { 1.0f, 1.0f, 1.0f }); - ns_fretBuzz::Model::addToGameObject(*m_pNanoSuit, *ns_fretBuzz::ResourceManager::getResource("nanosuit//nanosuit.obj")); + FRETBUZZ::GameObject* m_pNanoSuit = FRETBUZZ::GameObject::instantiate(m_refRootGameObject, "NanoSuitMain", { 0.0f, 0.0f, 0.0f },{ 0.0f, 0.0f, 0.0f }, { 1.0f, 1.0f, 1.0f }); + FRETBUZZ::Model::addToGameObject(*m_pNanoSuit, *FRETBUZZ::ResourceManager::getResource("nanosuit//nanosuit.obj")); ////Canvas Overlay - //ns_fretBuzz::GameObject2D* m_pGameObjectUI = ns_fretBuzz::GameObject2D::instantiate(m_refRootGameObject, "Canvas", { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 1.0f, 1.0f, 1.0f }, { 200.0f, 100.0f }, ns_fretBuzz::Layer()); - //ns_fretBuzz::ns_UI::CanvasData l_uiPlayerCanvasData; - //l_uiPlayerCanvasData.m_CanvasSpaceType = ns_fretBuzz::ns_UI::CANVAS_SPACE_TYPE::SCREEN_SPACE_CAMERA; + //FRETBUZZ::GameObject2D* m_pGameObjectUI = FRETBUZZ::GameObject2D::instantiate(m_refRootGameObject, "Canvas", { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 1.0f, 1.0f, 1.0f }, { 200.0f, 100.0f }, FRETBUZZ::Layer()); + //FRETBUZZ::ns_UI::CanvasData l_uiPlayerCanvasData; + //l_uiPlayerCanvasData.m_CanvasSpaceType = FRETBUZZ::ns_UI::CANVAS_SPACE_TYPE::SCREEN_SPACE_CAMERA; //l_uiPlayerCanvasData.m_pCamera = l_pMainCam; //l_uiPlayerCanvasData.m_fPlaneDistance = 1.05f; - //ns_fretBuzz::ns_UI::Canvas* m_pCanvas = ns_fretBuzz::ns_UI::Canvas::addToGameObject(*m_pGameObjectUI, l_uiPlayerCanvasData); - //ns_fretBuzz::GameObject2D* m_pImgWeapon = ns_fretBuzz::GameObject2D::instantiate(*m_pGameObjectUI, "img", { 0.5f, -0.5f, 0.0f }, { 0.0f, M_PI, 0.0f }, { 1.0f, 1.0f, 1.0f }, { 0.3f, 0.3f }, ns_fretBuzz::Layer()); - //ns_fretBuzz::Image* m_pImage = ns_fretBuzz::Image::addToGameObject(*m_pImgWeapon, ns_fretBuzz::ResourceManager::getResource("weapon_pickup|weapon_golf_club")->getSprite(0), { 0.0f, 0.0f, 0.0f, 1.0f }); + //FRETBUZZ::ns_UI::Canvas* m_pCanvas = FRETBUZZ::ns_UI::Canvas::addToGameObject(*m_pGameObjectUI, l_uiPlayerCanvasData); + //FRETBUZZ::GameObject2D* m_pImgWeapon = FRETBUZZ::GameObject2D::instantiate(*m_pGameObjectUI, "img", { 0.5f, -0.5f, 0.0f }, { 0.0f, M_PI, 0.0f }, { 1.0f, 1.0f, 1.0f }, { 0.3f, 0.3f }, FRETBUZZ::Layer()); + //FRETBUZZ::Image* m_pImage = FRETBUZZ::Image::addToGameObject(*m_pImgWeapon, FRETBUZZ::ResourceManager::getResource("weapon_pickup|weapon_golf_club")->getSprite(0), { 0.0f, 0.0f, 0.0f, 1.0f }); /*m_pCube2 = new test_cube(m_refRootGameObject, "Cube2", { 1.0f, 4.0f, 3.0f }); m_pCube3 = new test_cube(m_refRootGameObject, "Cube3", { 2.0f, 0.0f, 0.0f });*/ - m_pLightCube1 = new light_cube(*m_pManager, "Light1", {0.0f, 0.0f, 0.0f}, ns_fretBuzz::Light::LIGHT_TYPE::SPOT, 1.0f); - m_pLightCube2 = new light_cube(m_refRootGameObject, "Light2", { 1.0f, 3.0f, 1.0f }, ns_fretBuzz::Light::LIGHT_TYPE::POINT); - m_pLightCube3 = new light_cube(m_refRootGameObject, "Light3", { 1.0f, 6.0f, 2.0f }, ns_fretBuzz::Light::LIGHT_TYPE::POINT); - m_pLightCube4 = new light_cube(m_refRootGameObject, "Light4", { 1.0f, 9.0f, 3.0f }, ns_fretBuzz::Light::LIGHT_TYPE::POINT); - m_pLightCube5 = new light_cube(m_refRootGameObject, "Light5", { 1.0f, 12.0f, 4.0f }, ns_fretBuzz::Light::LIGHT_TYPE::POINT); + m_pLightCube1 = new light_cube(*m_pManager, "Light1", {0.0f, 0.0f, 0.0f}, FRETBUZZ::Light::LIGHT_TYPE::SPOT, 1.0f); + m_pLightCube2 = new light_cube(m_refRootGameObject, "Light2", { 1.0f, 3.0f, 1.0f }, FRETBUZZ::Light::LIGHT_TYPE::POINT); + m_pLightCube3 = new light_cube(m_refRootGameObject, "Light3", { 1.0f, 6.0f, 2.0f }, FRETBUZZ::Light::LIGHT_TYPE::POINT); + m_pLightCube4 = new light_cube(m_refRootGameObject, "Light4", { 1.0f, 9.0f, 3.0f }, FRETBUZZ::Light::LIGHT_TYPE::POINT); + m_pLightCube5 = new light_cube(m_refRootGameObject, "Light5", { 1.0f, 12.0f, 4.0f }, FRETBUZZ::Light::LIGHT_TYPE::POINT); /*m_pCube2->setCamGameObject(m_pManager); m_pCube3->setCamGameObject(m_pManager);*/ m_pCube1 = new test_cube(m_refRootGameObject, "Cube1", { -4.0f, 3.0f, -1.0f }, m_pNanoSuit); - ns_fretBuzz::GameObject2D* m_pPlant0 = ns_fretBuzz::GameObject2D::instantiate(m_refRootGameObject, "Plant0", { 0.0f, 0.0f, -5.0f }, { 0.0f, 0.0f, 0.0f }, { 1.0f, 1.0f, 1.0f }, {2.0f, 2.0f}); - ns_fretBuzz::Image* l_pPlantImg0 = m_pPlant0->addComponent(nullptr, glm::vec4{ 1.0f, 0.0f, 0.0f, 1.0f }); + FRETBUZZ::GameObject2D* m_pPlant0 = FRETBUZZ::GameObject2D::instantiate(m_refRootGameObject, "Plant0", { 0.0f, 0.0f, -5.0f }, { 0.0f, 0.0f, 0.0f }, { 1.0f, 1.0f, 1.0f }, {2.0f, 2.0f}); + FRETBUZZ::Image* l_pPlantImg0 = m_pPlant0->addComponent(nullptr, glm::vec4{ 1.0f, 0.0f, 0.0f, 1.0f }); - ns_fretBuzz::GameObject2D* m_pPlant1 = ns_fretBuzz::GameObject2D::instantiate(m_refRootGameObject, "Plant1", { 5.0f, 0.0f, -5.0f }, { 0.0f, 0.0f, 0.0f }, { 1.0f, 1.0f, 1.0f }, { 2.0f, 2.0f }); - ns_fretBuzz::Image* l_pPlantImg1 = m_pPlant1->addComponent(nullptr, glm::vec4{ 1.0f, 0.0f, 0.0f, 1.0f }); + FRETBUZZ::GameObject2D* m_pPlant1 = FRETBUZZ::GameObject2D::instantiate(m_refRootGameObject, "Plant1", { 5.0f, 0.0f, -5.0f }, { 0.0f, 0.0f, 0.0f }, { 1.0f, 1.0f, 1.0f }, { 2.0f, 2.0f }); + FRETBUZZ::Image* l_pPlantImg1 = m_pPlant1->addComponent(nullptr, glm::vec4{ 1.0f, 0.0f, 0.0f, 1.0f }); - ns_fretBuzz::GameObject2D* m_pPlant2 = ns_fretBuzz::GameObject2D::instantiate(m_refRootGameObject, "Plant2", { -5.0f, 0.0f, -5.0f }, { 0.0f, 0.0f, 0.0f }, { 1.0f, 1.0f, 1.0f }, { 2.0f, 2.0f }); - ns_fretBuzz::Image* l_pPlantImg2 = m_pPlant2->addComponent(nullptr, glm::vec4{ 1.0f, 0.0f, 0.0f, 1.0f }); + FRETBUZZ::GameObject2D* m_pPlant2 = FRETBUZZ::GameObject2D::instantiate(m_refRootGameObject, "Plant2", { -5.0f, 0.0f, -5.0f }, { 0.0f, 0.0f, 0.0f }, { 1.0f, 1.0f, 1.0f }, { 2.0f, 2.0f }); + FRETBUZZ::Image* l_pPlantImg2 = m_pPlant2->addComponent(nullptr, glm::vec4{ 1.0f, 0.0f, 0.0f, 1.0f }); } }; } \ No newline at end of file diff --git a/FretBuzz/Sandbox/test/test_cube.h b/FretBuzz/Sandbox/test/test_cube.h index 6eb486b..0e52e3a 100644 --- a/FretBuzz/Sandbox/test/test_cube.h +++ b/FretBuzz/Sandbox/test/test_cube.h @@ -10,7 +10,7 @@ namespace ns_HMGame { - class test_cube: public ns_fretBuzz::GameObject + class test_cube: public FRETBUZZ::GameObject { public: @@ -20,12 +20,12 @@ namespace ns_HMGame unsigned int m_VBO = 0; unsigned int m_IBO = 0; - ns_fretBuzz::Shader* m_pShader = nullptr; - ns_fretBuzz::Texture* m_pDiffuseTexture = nullptr; - ns_fretBuzz::Texture* m_pSpecularTexture = nullptr; + FRETBUZZ::Shader* m_pShader = nullptr; + FRETBUZZ::Texture* m_pDiffuseTexture = nullptr; + FRETBUZZ::Texture* m_pSpecularTexture = nullptr; - ns_fretBuzz::Material m_Material; - ns_fretBuzz::Material m_HighlighterMaterial; + FRETBUZZ::Material m_Material; + FRETBUZZ::Material m_HighlighterMaterial; float m_vertices[288] = { -0.5f, -0.5f, -0.5f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, // Bottom-left @@ -71,20 +71,20 @@ namespace ns_HMGame -0.5f, 0.5f, 0.5f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f // bottom-left }; - ns_fretBuzz::GameObject* m_pNanoSuit = nullptr; + FRETBUZZ::GameObject* m_pNanoSuit = nullptr; - test_cube(ns_fretBuzz::GameObject& a_ParentGameObject, std::string a_strName, glm::vec3 a_Position, ns_fretBuzz::GameObject* a_pNanoSuit) - : ns_fretBuzz::GameObject(a_ParentGameObject, a_strName, a_Position, { 0.0f, 0.0f, 0.0f }, { 1.0f, 1.0f, 1.0f }) + test_cube(FRETBUZZ::GameObject& a_ParentGameObject, std::string a_strName, glm::vec3 a_Position, FRETBUZZ::GameObject* a_pNanoSuit) + : FRETBUZZ::GameObject(a_ParentGameObject, a_strName, a_Position, { 0.0f, 0.0f, 0.0f }, { 1.0f, 1.0f, 1.0f }) { m_pNanoSuit = a_pNanoSuit; - m_Material.setShader(*ns_fretBuzz::ShaderManager::getShaderOfType(ns_fretBuzz::Shader::PHONG)); - m_pDiffuseTexture = ns_fretBuzz::ResourceManager::getResource("container_diffuse"); - m_pSpecularTexture = ns_fretBuzz::ResourceManager::getResource("container_specular"); + m_Material.setShader(*FRETBUZZ::ShaderManager::getShaderOfType(FRETBUZZ::Shader::PHONG)); + m_pDiffuseTexture = FRETBUZZ::ResourceManager::getResource("container_diffuse"); + m_pSpecularTexture = FRETBUZZ::ResourceManager::getResource("container_specular"); m_Material.m_MaterialData.m_pTexDiffuse = m_pDiffuseTexture; m_Material.m_MaterialData.m_pTexSpecular = m_pSpecularTexture; - m_HighlighterMaterial.setShader(*ns_fretBuzz::ShaderManager::getShaderOfType(ns_fretBuzz::Shader::DEFAULT_3D)); + m_HighlighterMaterial.setShader(*FRETBUZZ::ShaderManager::getShaderOfType(FRETBUZZ::Shader::DEFAULT_3D)); m_HighlighterMaterial.m_MaterialData.m_v4Albedo = { 0.0f, 1.0f, 0.0f, 1.0f }; glGenVertexArrays(1, &m_VAO); @@ -112,39 +112,39 @@ namespace ns_HMGame //m_Transform.setLocalRotation({ rot, rot , rot }); glm::vec3 l_v3Scale = m_pNanoSuit->m_Transform.getLocalScale(); - if (ns_fretBuzz::Input::IsMouseBtnDown(GLFW_MOUSE_BUTTON_1)) + if (FRETBUZZ::Input::IsMouseBtnDown(GLFW_MOUSE_BUTTON_1)) { m_pNanoSuit->m_Transform.setLocalScale({ l_v3Scale + l_v3Scale * a_fDeltaTime *2.0F }); } - else if (ns_fretBuzz::Input::IsMouseBtnDown(GLFW_MOUSE_BUTTON_2)) + else if (FRETBUZZ::Input::IsMouseBtnDown(GLFW_MOUSE_BUTTON_2)) { m_pNanoSuit->m_Transform.setLocalScale({ l_v3Scale - l_v3Scale * a_fDeltaTime *2.0F }); } - if (ns_fretBuzz::Input::IsKeyPutDown(GLFW_KEY_C)) + if (FRETBUZZ::Input::IsKeyPutDown(GLFW_KEY_C)) { - ns_fretBuzz::PostProcessManager::togglePostProcess(!ns_fretBuzz::PostProcessManager::isPostProcessActive()); + FRETBUZZ::PostProcessManager::togglePostProcess(!FRETBUZZ::PostProcessManager::isPostProcessActive()); } - if (ns_fretBuzz::Input::IsKeyPutDown(GLFW_KEY_R)) + if (FRETBUZZ::Input::IsKeyPutDown(GLFW_KEY_R)) { - ns_fretBuzz::PostProcessManager::setPostProcessType(ns_fretBuzz::Material::EDGE_DETECT); + FRETBUZZ::PostProcessManager::setPostProcessType(FRETBUZZ::Material::EDGE_DETECT); } - else if (ns_fretBuzz::Input::IsKeyPutDown(GLFW_KEY_T)) + else if (FRETBUZZ::Input::IsKeyPutDown(GLFW_KEY_T)) { - ns_fretBuzz::PostProcessManager::setPostProcessType(ns_fretBuzz::Material::BLUR); + FRETBUZZ::PostProcessManager::setPostProcessType(FRETBUZZ::Material::BLUR); } - else if (ns_fretBuzz::Input::IsKeyPutDown(GLFW_KEY_Y)) + else if (FRETBUZZ::Input::IsKeyPutDown(GLFW_KEY_Y)) { - ns_fretBuzz::PostProcessManager::setPostProcessType(ns_fretBuzz::Material::SHARPEN); + FRETBUZZ::PostProcessManager::setPostProcessType(FRETBUZZ::Material::SHARPEN); } GameObject::update(a_fDeltaTime); } - virtual void render(const ns_fretBuzz::Camera& a_Camera) override + virtual void render(const FRETBUZZ::Camera& a_Camera) override { //glStencilFunc(GL_EQUAL, 1, 0xFF); m_Material.bind(a_Camera);