Minor refactoring
This commit is contained in:
parent
0a5a3b653d
commit
592e008914
@ -413,45 +413,45 @@ set_target_properties(libzip_external_lib PROPERTIES
|
|||||||
# Основной проект space-game001
|
# Основной проект space-game001
|
||||||
# ===========================================
|
# ===========================================
|
||||||
add_executable(space-game001
|
add_executable(space-game001
|
||||||
main.cpp
|
src/main.cpp
|
||||||
Game.cpp
|
src/Game.cpp
|
||||||
Game.h
|
src/Game.h
|
||||||
Environment.cpp
|
src/Environment.cpp
|
||||||
Environment.h
|
src/Environment.h
|
||||||
Renderer.cpp
|
src/render/Renderer.cpp
|
||||||
Renderer.h
|
src/render/Renderer.h
|
||||||
ShaderManager.cpp
|
src/render/ShaderManager.cpp
|
||||||
ShaderManager.h
|
src/render/ShaderManager.h
|
||||||
TextureManager.cpp
|
src/render/TextureManager.cpp
|
||||||
TextureManager.h
|
src/render/TextureManager.h
|
||||||
TextModel.cpp
|
src/TextModel.cpp
|
||||||
TextModel.h
|
src/TextModel.h
|
||||||
AudioPlayerAsync.cpp
|
src/AudioPlayerAsync.cpp
|
||||||
AudioPlayerAsync.h
|
src/AudioPlayerAsync.h
|
||||||
BoneAnimatedModel.cpp
|
src/BoneAnimatedModel.cpp
|
||||||
BoneAnimatedModel.h
|
src/BoneAnimatedModel.h
|
||||||
ZLMath.cpp
|
src/utils/ZLMath.cpp
|
||||||
ZLMath.h
|
src/utils/ZLMath.h
|
||||||
OpenGlExtensions.cpp
|
src/render/OpenGlExtensions.cpp
|
||||||
OpenGlExtensions.h
|
src/render/OpenGlExtensions.h
|
||||||
Utils.cpp
|
src/utils/Utils.cpp
|
||||||
Utils.h
|
src/utils/Utils.h
|
||||||
SparkEmitter.cpp
|
src/SparkEmitter.cpp
|
||||||
SparkEmitter.h
|
src/SparkEmitter.h
|
||||||
PlanetObject.cpp
|
src/planet/PlanetObject.cpp
|
||||||
PlanetObject.h
|
src/planet/PlanetObject.h
|
||||||
PlanetData.cpp
|
src/planet/PlanetData.cpp
|
||||||
PlanetData.h
|
src/planet/PlanetData.h
|
||||||
Perlin.cpp
|
src/utils/Perlin.cpp
|
||||||
Perlin.h
|
src/utils/Perlin.h
|
||||||
StoneObject.cpp
|
src/planet/StoneObject.cpp
|
||||||
StoneObject.h
|
src/planet/StoneObject.h
|
||||||
FrameBuffer.cpp
|
src/render/FrameBuffer.cpp
|
||||||
FrameBuffer.h
|
src/render/FrameBuffer.h
|
||||||
UiManager.cpp
|
src/UiManager.cpp
|
||||||
UiManager.h
|
src/UiManager.h
|
||||||
Projectile.h
|
src/Projectile.h
|
||||||
Projectile.cpp
|
src/Projectile.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
# Установка проекта по умолчанию для Visual Studio
|
# Установка проекта по умолчанию для Visual Studio
|
||||||
@ -459,12 +459,8 @@ set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT s
|
|||||||
|
|
||||||
# include-пути проекта
|
# include-пути проекта
|
||||||
target_include_directories(space-game001 PRIVATE
|
target_include_directories(space-game001 PRIVATE
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}"
|
"${CMAKE_CURRENT_SOURCE_DIR}/src"
|
||||||
#"${CMAKE_CURRENT_SOURCE_DIR}/gl"
|
"${CMAKE_CURRENT_SOURCE_DIR}/external"
|
||||||
#"${CMAKE_CURRENT_SOURCE_DIR}/cmakeaudioplayer/include"
|
|
||||||
#"${SDL2_INSTALL_DIR}/include"
|
|
||||||
#"${SDL2_INSTALL_DIR}/include/SDL2"
|
|
||||||
#"${LIBZIP_INSTALL_DIR}-Release/include" # Добавил include-путь для libzip
|
|
||||||
)
|
)
|
||||||
|
|
||||||
set_target_properties(space-game001 PROPERTIES
|
set_target_properties(space-game001 PROPERTIES
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
|
||||||
#include "Renderer.h"
|
#include "render/Renderer.h"
|
||||||
#include "TextureManager.h"
|
#include "render/TextureManager.h"
|
||||||
|
|
||||||
namespace ZL
|
namespace ZL
|
||||||
{
|
{
|
||||||
@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "ZLMath.h"
|
#include "utils/ZLMath.h"
|
||||||
#include "Renderer.h"
|
#include "render/Renderer.h"
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
#include "Environment.h"
|
#include "Environment.h"
|
||||||
|
|
||||||
#include "Utils.h"
|
#include "utils/Utils.h"
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
|
|
||||||
namespace ZL {
|
namespace ZL {
|
||||||
@ -1,9 +1,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "ZLMath.h"
|
#include "utils/ZLMath.h"
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL.h>
|
||||||
#endif
|
#endif
|
||||||
#include "OpenGlExtensions.h"
|
#include "render/OpenGlExtensions.h"
|
||||||
|
|
||||||
namespace ZL {
|
namespace ZL {
|
||||||
|
|
||||||
7
Game.cpp → src/Game.cpp
Executable file → Normal file
7
Game.cpp → src/Game.cpp
Executable file → Normal file
@ -1,12 +1,11 @@
|
|||||||
#include "Game.h"
|
#include "Game.h"
|
||||||
#include "AnimatedModel.h"
|
#include "AnimatedModel.h"
|
||||||
#include "BoneAnimatedModel.h"
|
#include "BoneAnimatedModel.h"
|
||||||
#include "Utils.h"
|
#include "utils/Utils.h"
|
||||||
#include "OpenGlExtensions.h"
|
#include "render/OpenGlExtensions.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include "TextureManager.h"
|
#include "render/TextureManager.h"
|
||||||
#include "TextModel.h"
|
#include "TextModel.h"
|
||||||
#include "StoneObject.h"
|
|
||||||
#include <random>
|
#include <random>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
7
Game.h → src/Game.h
Executable file → Normal file
7
Game.h → src/Game.h
Executable file → Normal file
@ -1,11 +1,10 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "OpenGlExtensions.h"
|
#include "render/Renderer.h"
|
||||||
#include "Renderer.h"
|
|
||||||
#include "Environment.h"
|
#include "Environment.h"
|
||||||
#include "TextureManager.h"
|
#include "render/TextureManager.h"
|
||||||
#include "SparkEmitter.h"
|
#include "SparkEmitter.h"
|
||||||
#include "PlanetObject.h"
|
#include "planet/PlanetObject.h"
|
||||||
#include "UiManager.h"
|
#include "UiManager.h"
|
||||||
#include "Projectile.h"
|
#include "Projectile.h"
|
||||||
|
|
||||||
@ -1,8 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "ZLMath.h"
|
#include "utils/ZLMath.h"
|
||||||
#include "Renderer.h"
|
#include "render/Renderer.h"
|
||||||
#include "TextureManager.h"
|
#include "render/TextureManager.h"
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
namespace ZL {
|
namespace ZL {
|
||||||
@ -1,7 +1,7 @@
|
|||||||
#include "SparkEmitter.h"
|
#include "SparkEmitter.h"
|
||||||
#include <random>
|
#include <random>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include "OpenGlExtensions.h"
|
//#include "renderer/OpenGlExtensions.h"
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include "external/nlohmann/json.hpp"
|
#include "external/nlohmann/json.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@ -1,8 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "ZLMath.h"
|
#include "utils/ZLMath.h"
|
||||||
#include "Renderer.h"
|
#include "render/Renderer.h"
|
||||||
#include "TextureManager.h"
|
#include "render/TextureManager.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -1,7 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "ZLMath.h"
|
#include "utils/ZLMath.h"
|
||||||
#include "Renderer.h"
|
#include "render/Renderer.h"
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
|
|
||||||
@ -1,5 +1,5 @@
|
|||||||
#include "UiManager.h"
|
#include "UiManager.h"
|
||||||
#include "Utils.h"
|
#include "utils/Utils.h"
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
@ -1,7 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Renderer.h"
|
#include "render/Renderer.h"
|
||||||
#include "TextureManager.h"
|
#include "render/TextureManager.h"
|
||||||
#include "Environment.h"
|
#include "Environment.h"
|
||||||
#include "external/nlohmann/json.hpp"
|
#include "external/nlohmann/json.hpp"
|
||||||
#include <string>
|
#include <string>
|
||||||
0
gl/glext.h → src/gl/glext.h
Executable file → Normal file
0
gl/glext.h → src/gl/glext.h
Executable file → Normal file
0
main.cpp → src/main.cpp
Executable file → Normal file
0
main.cpp → src/main.cpp
Executable file → Normal file
@ -1,8 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "ZLMath.h"
|
#include "utils/ZLMath.h"
|
||||||
#include "Perlin.h"
|
#include "utils/Perlin.h"
|
||||||
#include "Renderer.h" // Äëÿ VertexDataStruct
|
#include "render/Renderer.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -1,7 +1,7 @@
|
|||||||
#include "PlanetObject.h"
|
#include "PlanetObject.h"
|
||||||
#include <random>
|
#include <random>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include "OpenGlExtensions.h"
|
#include "render/OpenGlExtensions.h"
|
||||||
#include "Environment.h"
|
#include "Environment.h"
|
||||||
#include "StoneObject.h"
|
#include "StoneObject.h"
|
||||||
|
|
||||||
@ -1,8 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "ZLMath.h"
|
#include "utils/ZLMath.h"
|
||||||
#include "Renderer.h"
|
#include "render/Renderer.h"
|
||||||
#include "TextureManager.h"
|
#include "render/TextureManager.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@ -13,10 +13,10 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include "Perlin.h"
|
#include "utils/Perlin.h"
|
||||||
#include "PlanetData.h"
|
#include "PlanetData.h"
|
||||||
#include "StoneObject.h"
|
#include "StoneObject.h"
|
||||||
#include "FrameBuffer.h"
|
#include "render/FrameBuffer.h"
|
||||||
|
|
||||||
namespace ZL {
|
namespace ZL {
|
||||||
|
|
||||||
@ -1,10 +1,10 @@
|
|||||||
#include "StoneObject.h"
|
#include "StoneObject.h"
|
||||||
|
|
||||||
#include "Utils.h"
|
#include "utils/Utils.h"
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#include <random>
|
#include <random>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include "Renderer.h"
|
#include "render/Renderer.h"
|
||||||
#include "PlanetData.h"
|
#include "PlanetData.h"
|
||||||
|
|
||||||
namespace ZL {
|
namespace ZL {
|
||||||
@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "ZLMath.h"
|
#include "utils/ZLMath.h"
|
||||||
#include "Renderer.h"
|
#include "render/Renderer.h"
|
||||||
#include "PlanetData.h"
|
#include "PlanetData.h"
|
||||||
|
|
||||||
namespace ZL {
|
namespace ZL {
|
||||||
2
OpenGlExtensions.cpp → src/render/OpenGlExtensions.cpp
Executable file → Normal file
2
OpenGlExtensions.cpp → src/render/OpenGlExtensions.cpp
Executable file → Normal file
@ -1,6 +1,6 @@
|
|||||||
#include "OpenGlExtensions.h"
|
#include "OpenGlExtensions.h"
|
||||||
|
|
||||||
#include "Utils.h"
|
#include "utils/Utils.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
|
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
|
||||||
0
OpenGlExtensions.h → src/render/OpenGlExtensions.h
Executable file → Normal file
0
OpenGlExtensions.h → src/render/OpenGlExtensions.h
Executable file → Normal file
2
Renderer.cpp → src/render/Renderer.cpp
Executable file → Normal file
2
Renderer.cpp → src/render/Renderer.cpp
Executable file → Normal file
@ -1,4 +1,4 @@
|
|||||||
#include "Renderer.h"
|
#include "render/Renderer.h"
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
namespace ZL {
|
namespace ZL {
|
||||||
2
Renderer.h → src/render/Renderer.h
Executable file → Normal file
2
Renderer.h → src/render/Renderer.h
Executable file → Normal file
@ -1,7 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "OpenGlExtensions.h"
|
#include "OpenGlExtensions.h"
|
||||||
#include "ZLMath.h"
|
#include "utils/ZLMath.h"
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include "ShaderManager.h"
|
#include "ShaderManager.h"
|
||||||
0
ShaderManager.cpp → src/render/ShaderManager.cpp
Executable file → Normal file
0
ShaderManager.cpp → src/render/ShaderManager.cpp
Executable file → Normal file
2
ShaderManager.h → src/render/ShaderManager.h
Executable file → Normal file
2
ShaderManager.h → src/render/ShaderManager.h
Executable file → Normal file
@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "OpenGlExtensions.h"
|
#include "OpenGlExtensions.h"
|
||||||
#include "Utils.h"
|
#include "utils/Utils.h"
|
||||||
|
|
||||||
namespace ZL {
|
namespace ZL {
|
||||||
|
|
||||||
3
TextureManager.cpp → src/render/TextureManager.cpp
Executable file → Normal file
3
TextureManager.cpp → src/render/TextureManager.cpp
Executable file → Normal file
@ -1,4 +1,5 @@
|
|||||||
#include "TextureManager.h"
|
#include "render/TextureManager.h"
|
||||||
|
#include "render/OpenGlExtensions.h"
|
||||||
#ifdef PNG_ENABLED
|
#ifdef PNG_ENABLED
|
||||||
#include "png.h"
|
#include "png.h"
|
||||||
#endif
|
#endif
|
||||||
2
TextureManager.h → src/render/TextureManager.h
Executable file → Normal file
2
TextureManager.h → src/render/TextureManager.h
Executable file → Normal file
@ -1,7 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "OpenGlExtensions.h"
|
#include "OpenGlExtensions.h"
|
||||||
#include "Utils.h"
|
#include "utils/Utils.h"
|
||||||
|
|
||||||
#ifdef EMSCRIPTEN
|
#ifdef EMSCRIPTEN
|
||||||
#define PNG_ENABLED
|
#define PNG_ENABLED
|
||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include "ZLMath.h"
|
#include "utils/ZLMath.h"
|
||||||
|
|
||||||
namespace ZL {
|
namespace ZL {
|
||||||
|
|
||||||
2
Utils.cpp → src/utils/Utils.cpp
Executable file → Normal file
2
Utils.cpp → src/utils/Utils.cpp
Executable file → Normal file
@ -1,4 +1,4 @@
|
|||||||
#include "Utils.h"
|
#include "utils/Utils.h"
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
0
Utils.h → src/utils/Utils.h
Executable file → Normal file
0
Utils.h → src/utils/Utils.h
Executable file → Normal file
@ -1,4 +1,4 @@
|
|||||||
#include "ZLMath.h"
|
#include "utils/ZLMath.h"
|
||||||
|
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
0
ZLMath.h → src/utils/ZLMath.h
Executable file → Normal file
0
ZLMath.h → src/utils/ZLMath.h
Executable file → Normal file
Loading…
Reference in New Issue
Block a user