merge
This commit is contained in:
commit
c5044d42de
1
.gitignore
vendored
1
.gitignore
vendored
@ -400,3 +400,4 @@ jumpingbird.*
|
||||
jumpingbird.data
|
||||
build
|
||||
build-emcmake
|
||||
thirdparty1
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include "Math.h"
|
||||
#include "ZLMath.h"
|
||||
#include "Renderer.h"
|
||||
#include <unordered_map>
|
||||
|
||||
|
||||
532
CMakeLists.txt
Normal file
532
CMakeLists.txt
Normal file
@ -0,0 +1,532 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
project(space-game001 LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
set(BUILD_CONFIGS Debug Release)
|
||||
|
||||
# ==============================
|
||||
# Папка для всех сторонних либ
|
||||
# ==============================
|
||||
set(THIRDPARTY_DIR "${CMAKE_SOURCE_DIR}/thirdparty1")
|
||||
file(MAKE_DIRECTORY "${THIRDPARTY_DIR}")
|
||||
|
||||
macro(log msg)
|
||||
message(STATUS "${msg}")
|
||||
endmacro()
|
||||
|
||||
# ===========================================
|
||||
# 1) ZLIB (zlib131.zip → zlib-1.3.1) - без изменений
|
||||
# ===========================================
|
||||
set(ZLIB_ARCHIVE "${THIRDPARTY_DIR}/zlib131.zip")
|
||||
set(ZLIB_SRC_DIR "${THIRDPARTY_DIR}/zlib-1.3.1")
|
||||
set(ZLIB_BUILD_DIR "${ZLIB_SRC_DIR}/build")
|
||||
set(ZLIB_INSTALL_DIR "${ZLIB_SRC_DIR}/install")
|
||||
|
||||
if(NOT EXISTS "${ZLIB_ARCHIVE}")
|
||||
log("Downloading zlib131.zip ...")
|
||||
file(DOWNLOAD
|
||||
"https://www.zlib.net/zlib131.zip"
|
||||
"${ZLIB_ARCHIVE}"
|
||||
SHOW_PROGRESS
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT EXISTS "${ZLIB_SRC_DIR}/CMakeLists.txt")
|
||||
log("Extracting zlib131.zip to zlib-1.3.1 ...")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar xvf "${ZLIB_ARCHIVE}"
|
||||
WORKING_DIRECTORY "${THIRDPARTY_DIR}"
|
||||
RESULT_VARIABLE _zlib_extract_res
|
||||
)
|
||||
if(NOT _zlib_extract_res EQUAL 0)
|
||||
message(FATAL_ERROR "Failed to extract zlib archive")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(MAKE_DIRECTORY "${ZLIB_BUILD_DIR}")
|
||||
|
||||
# проверяем, собран ли уже zlib
|
||||
set(_have_zlib FALSE)
|
||||
foreach(candidate
|
||||
"${ZLIB_INSTALL_DIR}/lib/zlibstatic.lib"
|
||||
)
|
||||
if(EXISTS "${candidate}")
|
||||
set(_have_zlib TRUE)
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
|
||||
if(NOT _have_zlib)
|
||||
log("Configuring zlib ...")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-G "${CMAKE_GENERATOR}"
|
||||
-S "${ZLIB_SRC_DIR}"
|
||||
-B "${ZLIB_BUILD_DIR}"
|
||||
-DCMAKE_INSTALL_PREFIX=${ZLIB_INSTALL_DIR}
|
||||
RESULT_VARIABLE _zlib_cfg_res
|
||||
)
|
||||
if(NOT _zlib_cfg_res EQUAL 0)
|
||||
message(FATAL_ERROR "zlib configure failed")
|
||||
endif()
|
||||
|
||||
foreach(cfg IN LISTS BUILD_CONFIGS)
|
||||
log("Building ZLIB (${cfg}) ...")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
--build "${ZLIB_BUILD_DIR}" --config ${cfg}
|
||||
RESULT_VARIABLE _zlib_build_res
|
||||
)
|
||||
if(NOT _zlib_build_res EQUAL 0)
|
||||
message(FATAL_ERROR "ZLIB build failed for configuration ${cfg}")
|
||||
endif()
|
||||
|
||||
log("Installing ZLIB (${cfg}) ...")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
--install "${ZLIB_BUILD_DIR}" --config ${cfg}
|
||||
RESULT_VARIABLE _zlib_inst_res
|
||||
)
|
||||
if(NOT _zlib_inst_res EQUAL 0)
|
||||
message(FATAL_ERROR "ZLIB install failed for configuration ${cfg}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# ИСПРАВЛЕНИЕ: Используем свойства для конкретных конфигураций
|
||||
add_library(zlib_external_lib UNKNOWN IMPORTED GLOBAL)
|
||||
set_target_properties(zlib_external_lib PROPERTIES
|
||||
# Динамическая линковка (если zlib.lib - это импорт-библиотека для zlibd.dll)
|
||||
#IMPORTED_LOCATION_DEBUG "${ZLIB_INSTALL_DIR}/lib/zlibd.lib"
|
||||
#IMPORTED_LOCATION_RELEASE "${ZLIB_INSTALL_DIR}/lib/zlib.lib"
|
||||
|
||||
# Можно также указать статические библиотеки, если вы хотите их использовать
|
||||
IMPORTED_LOCATION_DEBUG "${ZLIB_INSTALL_DIR}/lib/zlibstaticd.lib"
|
||||
IMPORTED_LOCATION_RELEASE "${ZLIB_INSTALL_DIR}/lib/zlibstatic.lib"
|
||||
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${ZLIB_INSTALL_DIR}/include"
|
||||
)
|
||||
|
||||
# ===========================================
|
||||
# 2) SDL2 (release-2.32.10.zip → SDL-release-2.32.10) - без изменений
|
||||
# ===========================================
|
||||
set(SDL2_ARCHIVE "${THIRDPARTY_DIR}/release-2.32.10.zip")
|
||||
set(SDL2_SRC_DIR "${THIRDPARTY_DIR}/SDL-release-2.32.10")
|
||||
set(SDL2_BUILD_DIR "${SDL2_SRC_DIR}/build")
|
||||
set(SDL2_INSTALL_DIR "${SDL2_SRC_DIR}/install")
|
||||
|
||||
if(NOT EXISTS "${SDL2_ARCHIVE}")
|
||||
log("Downloading SDL2 release-2.32.10.zip ...")
|
||||
file(DOWNLOAD
|
||||
"https://github.com/libsdl-org/SDL/archive/refs/tags/release-2.32.10.zip"
|
||||
"${SDL2_ARCHIVE}"
|
||||
SHOW_PROGRESS
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT EXISTS "${SDL2_SRC_DIR}/CMakeLists.txt")
|
||||
log("Extracting SDL2 archive to SDL-release-2.32.10 ...")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar xvf "${SDL2_ARCHIVE}"
|
||||
WORKING_DIRECTORY "${THIRDPARTY_DIR}"
|
||||
RESULT_VARIABLE _sdl_extract_res
|
||||
)
|
||||
if(NOT _sdl_extract_res EQUAL 0)
|
||||
message(FATAL_ERROR "Failed to extract SDL2 archive")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(MAKE_DIRECTORY "${SDL2_BUILD_DIR}")
|
||||
|
||||
set(_have_sdl2 FALSE)
|
||||
foreach(candidate
|
||||
"${SDL2_INSTALL_DIR}/lib/SDL2.lib"
|
||||
"${SDL2_INSTALL_DIR}/lib/SDL2-static.lib"
|
||||
"${SDL2_INSTALL_DIR}/lib/SDL2d.lib"
|
||||
)
|
||||
if(EXISTS "${candidate}")
|
||||
set(_have_sdl2 TRUE)
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(NOT _have_sdl2)
|
||||
log("Configuring SDL2 ...")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-G "${CMAKE_GENERATOR}"
|
||||
-S "${SDL2_SRC_DIR}"
|
||||
-B "${SDL2_BUILD_DIR}"
|
||||
-DCMAKE_INSTALL_PREFIX=${SDL2_INSTALL_DIR}
|
||||
-DCMAKE_PREFIX_PATH=${ZLIB_INSTALL_DIR} # путь к zlib для SDL2
|
||||
RESULT_VARIABLE _sdl_cfg_res
|
||||
)
|
||||
if(NOT _sdl_cfg_res EQUAL 0)
|
||||
message(FATAL_ERROR "SDL2 configure failed")
|
||||
endif()
|
||||
|
||||
# --- ИЗМЕНЕНИЕ: Цикл по конфигурациям Debug и Release ---
|
||||
foreach(cfg IN LISTS BUILD_CONFIGS)
|
||||
log("Building SDL2 (${cfg}) ...")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
--build "${SDL2_BUILD_DIR}" --config ${cfg}
|
||||
RESULT_VARIABLE _sdl_build_res
|
||||
)
|
||||
if(NOT _sdl_build_res EQUAL 0)
|
||||
message(FATAL_ERROR "SDL2 build failed for configuration ${cfg}")
|
||||
endif()
|
||||
|
||||
log("Installing SDL2 (${cfg}) ...")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
--install "${SDL2_BUILD_DIR}" --config ${cfg}
|
||||
RESULT_VARIABLE _sdl_inst_res
|
||||
)
|
||||
if(NOT _sdl_inst_res EQUAL 0)
|
||||
message(FATAL_ERROR "SDL2 install failed for configuration ${cfg}")
|
||||
endif()
|
||||
endforeach()
|
||||
# ------------------------------------------------------
|
||||
endif()
|
||||
|
||||
|
||||
# ИСПРАВЛЕНИЕ: SDL2: Используем свойства для конкретных конфигураций
|
||||
add_library(SDL2_external_lib UNKNOWN IMPORTED GLOBAL)
|
||||
set_target_properties(SDL2_external_lib PROPERTIES
|
||||
# Динамическая линковка SDL2
|
||||
IMPORTED_LOCATION_DEBUG "${SDL2_INSTALL_DIR}/lib/SDL2d.lib"
|
||||
IMPORTED_LOCATION_RELEASE "${SDL2_INSTALL_DIR}/lib/SDL2.lib"
|
||||
# Оба include-пути: и include, и include/SDL2
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${SDL2_INSTALL_DIR}/include;${SDL2_INSTALL_DIR}/include/SDL2"
|
||||
)
|
||||
|
||||
# SDL2main (обычно статическая)
|
||||
add_library(SDL2main_external_lib UNKNOWN IMPORTED GLOBAL)
|
||||
set_target_properties(SDL2main_external_lib PROPERTIES
|
||||
# ИСПРАВЛЕНО: Указываем пути для Debug и Release, используя
|
||||
# соглашение, что Debug имеет суффикс 'd', а Release — нет.
|
||||
IMPORTED_LOCATION_DEBUG "${SDL2_INSTALL_DIR}/lib/SDL2maind.lib"
|
||||
IMPORTED_LOCATION_RELEASE "${SDL2_INSTALL_DIR}/lib/SDL2main.lib"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${SDL2_INSTALL_DIR}/include"
|
||||
)
|
||||
|
||||
log("-----${SDL2_INSTALL_DIR}/lib/SDL2maind.lib")
|
||||
|
||||
# ===========================================
|
||||
# 3) libpng (v1.6.51.zip → libpng-1.6.51) - без изменений
|
||||
# ===========================================
|
||||
set(LIBPNG_ARCHIVE "${THIRDPARTY_DIR}/v1.6.51.zip")
|
||||
set(LIBPNG_SRC_DIR "${THIRDPARTY_DIR}/libpng-1.6.51")
|
||||
set(LIBPNG_BUILD_DIR "${LIBPNG_SRC_DIR}/build")
|
||||
set(LIBPNG_INSTALL_DIR "${LIBPNG_SRC_DIR}/install") # на будущее
|
||||
|
||||
if(NOT EXISTS "${LIBPNG_ARCHIVE}")
|
||||
log("Downloading libpng v1.6.51.zip ...")
|
||||
file(DOWNLOAD
|
||||
"https://github.com/pnggroup/libpng/archive/refs/tags/v1.6.51.zip"
|
||||
"${LIBPNG_ARCHIVE}"
|
||||
SHOW_PROGRESS
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT EXISTS "${LIBPNG_SRC_DIR}/CMakeLists.txt")
|
||||
log("Extracting libpng v1.6.51.zip to libpng-1.6.51 ...")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar xvf "${LIBPNG_ARCHIVE}"
|
||||
WORKING_DIRECTORY "${THIRDPARTY_DIR}"
|
||||
RESULT_VARIABLE _png_extract_res
|
||||
)
|
||||
if(NOT _png_extract_res EQUAL 0)
|
||||
message(FATAL_ERROR "Failed to extract libpng archive")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(MAKE_DIRECTORY "${LIBPNG_BUILD_DIR}")
|
||||
|
||||
# Проверяем, есть ли уже .lib (build/Debug или install/lib)
|
||||
set(_libpng_candidates
|
||||
"${LIBPNG_BUILD_DIR}/Debug/libpng16_staticd.lib"
|
||||
"${LIBPNG_BUILD_DIR}/Release/libpng16_static.lib"
|
||||
)
|
||||
|
||||
set(_have_png FALSE)
|
||||
foreach(candidate IN LISTS _libpng_candidates)
|
||||
if(EXISTS "${candidate}")
|
||||
set(_have_png TRUE)
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(NOT _have_png)
|
||||
log("Configuring libpng ...")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-G "${CMAKE_GENERATOR}"
|
||||
-S "${LIBPNG_SRC_DIR}"
|
||||
-B "${LIBPNG_BUILD_DIR}"
|
||||
-DCMAKE_INSTALL_PREFIX=${LIBPNG_INSTALL_DIR}
|
||||
-DCMAKE_PREFIX_PATH=${ZLIB_INSTALL_DIR}
|
||||
-DZLIB_ROOT=${ZLIB_INSTALL_DIR}
|
||||
RESULT_VARIABLE _png_cfg_res
|
||||
)
|
||||
if(NOT _png_cfg_res EQUAL 0)
|
||||
message(FATAL_ERROR "libpng configure failed")
|
||||
endif()
|
||||
|
||||
# --- ИЗМЕНЕНИЕ: Цикл по конфигурациям Debug и Release ---
|
||||
foreach(cfg IN LISTS BUILD_CONFIGS)
|
||||
log("Building libpng (${cfg}) ...")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
--build "${LIBPNG_BUILD_DIR}" --config ${cfg}
|
||||
RESULT_VARIABLE _png_build_res
|
||||
)
|
||||
if(NOT _png_build_res EQUAL 0)
|
||||
message(FATAL_ERROR "libpng build failed for configuration ${cfg}")
|
||||
endif()
|
||||
|
||||
# Поскольку вы не используете "cmake --install" для libpng,
|
||||
# здесь нет необходимости в дополнительном шаге установки.
|
||||
# Файлы .lib будут сгенерированы в подкаталоге ${LIBPNG_BUILD_DIR}/${cfg} (например, build/Debug или build/Release).
|
||||
|
||||
endforeach()
|
||||
# ------------------------------------------------------
|
||||
endif()
|
||||
|
||||
add_library(libpng_external_lib UNKNOWN IMPORTED GLOBAL)
|
||||
set_target_properties(libpng_external_lib PROPERTIES
|
||||
# Предполагая, что libpng использует статический вариант
|
||||
IMPORTED_LOCATION_DEBUG "${LIBPNG_BUILD_DIR}/Debug/libpng16_staticd.lib"
|
||||
IMPORTED_LOCATION_RELEASE "${LIBPNG_BUILD_DIR}/Release/libpng16_static.lib"
|
||||
|
||||
# png.h, pngconf.h – в SRC, pnglibconf.h – в BUILD
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${LIBPNG_SRC_DIR};${LIBPNG_BUILD_DIR}"
|
||||
)
|
||||
|
||||
# ===========================================
|
||||
# 4) libzip (v1.11.4.zip → libzip-1.11.4) - НОВАЯ ЗАВИСИМОСТЬ
|
||||
# ===========================================
|
||||
set(LIBZIP_ARCHIVE "${THIRDPARTY_DIR}/v1.11.4.zip")
|
||||
set(LIBZIP_SRC_DIR "${THIRDPARTY_DIR}/libzip-1.11.4")
|
||||
set(LIBZIP_BUILD_DIR "${LIBZIP_SRC_DIR}/build")
|
||||
#set(LIBZIP_INSTALL_DIR "${LIBZIP_SRC_DIR}/install")
|
||||
set(LIBZIP_BASE_DIR "${LIBZIP_SRC_DIR}/install")
|
||||
|
||||
if(NOT EXISTS "${LIBZIP_ARCHIVE}")
|
||||
log("Downloading libzip v1.11.4.zip ...")
|
||||
file(DOWNLOAD
|
||||
"https://github.com/nih-at/libzip/archive/refs/tags/v1.11.4.zip"
|
||||
"${LIBZIP_ARCHIVE}"
|
||||
SHOW_PROGRESS
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT EXISTS "${LIBZIP_SRC_DIR}/CMakeLists.txt")
|
||||
log("Extracting libzip v1.11.4.zip to libzip-1.11.4 ...")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar xvf "${LIBZIP_ARCHIVE}"
|
||||
WORKING_DIRECTORY "${THIRDPARTY_DIR}"
|
||||
RESULT_VARIABLE _zip_extract_res
|
||||
)
|
||||
if(NOT _zip_extract_res EQUAL 0)
|
||||
message(FATAL_ERROR "Failed to extract libzip archive")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(MAKE_DIRECTORY "${LIBZIP_BUILD_DIR}")
|
||||
|
||||
# Проверяем, собран ли уже libzip
|
||||
set(_have_zip FALSE)
|
||||
foreach(candidate
|
||||
"${LIBZIP_BASE_DIR}-Debug/lib/zip.lib"
|
||||
"${LIBZIP_BASE_DIR}-Release/lib/zip.lib"
|
||||
)
|
||||
if(EXISTS "${candidate}")
|
||||
set(_have_zip TRUE)
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
|
||||
if(NOT _have_zip)
|
||||
foreach(cfg IN LISTS BUILD_CONFIGS)
|
||||
log("Configuring libzip (${cfg})...")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-G "${CMAKE_GENERATOR}"
|
||||
-S "${LIBZIP_SRC_DIR}"
|
||||
-B "${LIBZIP_SRC_DIR}/build-${cfg}"
|
||||
-DCMAKE_INSTALL_PREFIX=${LIBZIP_BASE_DIR}-${cfg}
|
||||
-DCMAKE_PREFIX_PATH=${ZLIB_INSTALL_DIR}
|
||||
-DZLIB_ROOT=${ZLIB_INSTALL_DIR}
|
||||
-DENABLE_COMMONCRYPTO=OFF
|
||||
-DENABLE_GNUTLS=OFF
|
||||
-DENABLE_MBEDTLS=OFF
|
||||
-DENABLE_OPENSSL=OFF
|
||||
-DENABLE_WINDOWS_CRYPTO=OFF
|
||||
-DENABLE_FUZZ=OFF
|
||||
RESULT_VARIABLE _zip_cfg_res
|
||||
)
|
||||
if(NOT _zip_cfg_res EQUAL 0)
|
||||
message(FATAL_ERROR "libzip configure failed")
|
||||
endif()
|
||||
log("Building libzip (${cfg}) ...")
|
||||
|
||||
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} --build "${LIBZIP_SRC_DIR}/build-${cfg}" --config ${cfg} -v
|
||||
RESULT_VARIABLE _zip_build_res
|
||||
)
|
||||
if(NOT _zip_build_res EQUAL 0)
|
||||
message(FATAL_ERROR "libzip build failed for configuration ${cfg}")
|
||||
endif()
|
||||
|
||||
log("Installing libzip (${cfg}) ...")
|
||||
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} --install "${LIBZIP_SRC_DIR}/build-${cfg}" --config ${cfg} -v
|
||||
RESULT_VARIABLE _zip_inst_res
|
||||
)
|
||||
if(NOT _zip_inst_res EQUAL 0)
|
||||
message(FATAL_ERROR "libzip install failed for configuration ${cfg}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
|
||||
add_library(libzip_external_lib UNKNOWN IMPORTED GLOBAL)
|
||||
set_target_properties(libzip_external_lib PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG "${LIBZIP_BASE_DIR}-Debug/lib/zip.lib" # ИСПРАВЛЕНО
|
||||
IMPORTED_LOCATION_RELEASE "${LIBZIP_BASE_DIR}-Release/lib/zip.lib" # ИСПРАВЛЕНО
|
||||
|
||||
INTERFACE_INCLUDE_DIRECTORIES "$<IF:$<CONFIG:Debug>,${LIBZIP_BASE_DIR}-Debug/include,${LIBZIP_BASE_DIR}-Release/include>"
|
||||
# libzip требует zlib для линковки
|
||||
INTERFACE_LINK_LIBRARIES zlib_external_lib
|
||||
)
|
||||
|
||||
# ===========================================
|
||||
# Основной проект space-game001
|
||||
# ===========================================
|
||||
add_executable(space-game001
|
||||
main.cpp
|
||||
Game.cpp
|
||||
Game.h
|
||||
Environment.cpp
|
||||
Environment.h
|
||||
Renderer.cpp
|
||||
Renderer.h
|
||||
ShaderManager.cpp
|
||||
ShaderManager.h
|
||||
TextureManager.cpp
|
||||
TextureManager.h
|
||||
TextModel.cpp
|
||||
TextModel.h
|
||||
AudioPlayerAsync.cpp
|
||||
AudioPlayerAsync.h
|
||||
BoneAnimatedModel.cpp
|
||||
BoneAnimatedModel.h
|
||||
ZLMath.cpp
|
||||
ZLMath.h
|
||||
OpenGlExtensions.cpp
|
||||
OpenGlExtensions.h
|
||||
Utils.cpp
|
||||
Utils.h
|
||||
)
|
||||
|
||||
# Установка проекта по умолчанию для Visual Studio
|
||||
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT space-game001)
|
||||
|
||||
# include-пути проекта
|
||||
target_include_directories(space-game001 PRIVATE
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
#"${CMAKE_CURRENT_SOURCE_DIR}/gl"
|
||||
#"${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
|
||||
OUTPUT_NAME "space-game001"
|
||||
)
|
||||
|
||||
# Определения препроцессора:
|
||||
# PNG_ENABLED – включает код PNG в TextureManager
|
||||
# SDL_MAIN_HANDLED – отключает переопределение main -> SDL_main
|
||||
target_compile_definitions(space-game001 PRIVATE
|
||||
PNG_ENABLED
|
||||
SDL_MAIN_HANDLED
|
||||
)
|
||||
|
||||
# Линкуем с SDL2main, если он вообще установлен
|
||||
target_link_libraries(space-game001 PRIVATE SDL2main_external_lib)
|
||||
|
||||
# Линкуем сторонние библиотеки
|
||||
target_link_libraries(space-game001 PRIVATE
|
||||
SDL2_external_lib
|
||||
libpng_external_lib
|
||||
zlib_external_lib
|
||||
libzip_external_lib
|
||||
)
|
||||
|
||||
# Линкуем OpenGL (Windows)
|
||||
if(WIN32)
|
||||
target_link_libraries(space-game001 PRIVATE opengl32)
|
||||
endif()
|
||||
|
||||
# ===========================================
|
||||
# Копирование SDL2d.dll и zlibd.dll рядом с exe
|
||||
# ===========================================
|
||||
if (WIN32)
|
||||
|
||||
# SDL2: в Debug - SDL2d.dll, в Release - SDL2.dll
|
||||
set(SDL2_DLL_SRC "$<IF:$<CONFIG:Debug>,${SDL2_INSTALL_DIR}/bin/SDL2d.dll,${SDL2_INSTALL_DIR}/bin/SDL2.dll>")
|
||||
set(SDL2_DLL_DST "$<IF:$<CONFIG:Debug>,$<TARGET_FILE_DIR:space-game001>/SDL2d.dll,$<TARGET_FILE_DIR:space-game001>/SDL2.dll>")
|
||||
|
||||
|
||||
set(LIBZIP_DLL_SRC "$<IF:$<CONFIG:Debug>,${LIBZIP_BASE_DIR}-Debug/bin/zip.dll,${LIBZIP_BASE_DIR}-Release/bin/zip.dll>")
|
||||
|
||||
add_custom_command(TARGET space-game001 POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "Copying DLLs to output folder..."
|
||||
|
||||
# Копируем SDL2 (целевое имя всегда SDL2.dll)
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
"${SDL2_DLL_SRC}"
|
||||
"${SDL2_DLL_DST}"
|
||||
|
||||
# Копируем LIBZIP (целевое имя всегда zip.dll)
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
"${LIBZIP_DLL_SRC}"
|
||||
"$<TARGET_FILE_DIR:space-game001>/zip.dll"
|
||||
)
|
||||
endif()
|
||||
|
||||
# ===========================================
|
||||
# Копирование ресурсов после сборки
|
||||
# ===========================================
|
||||
|
||||
# Какие папки с ресурсами нужно копировать
|
||||
set(RUNTIME_RESOURCE_DIRS
|
||||
"resources"
|
||||
"shaders"
|
||||
)
|
||||
|
||||
# Копируем ресурсы и шейдеры в папку exe и в корень build/
|
||||
foreach(resdir IN LISTS RUNTIME_RESOURCE_DIRS)
|
||||
add_custom_command(TARGET space-game001 POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "Copying ${resdir} to runtime folders..."
|
||||
# 1) туда, где лежит exe (build/Debug, build/Release и т.п.)
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||
"${CMAKE_SOURCE_DIR}/${resdir}"
|
||||
"$<TARGET_FILE_DIR:space-game001>/${resdir}"
|
||||
# 2) в корень build, если захочешь запускать из этой папки
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||
"${CMAKE_SOURCE_DIR}/${resdir}"
|
||||
"${CMAKE_BINARY_DIR}/${resdir}"
|
||||
)
|
||||
endforeach()
|
||||
@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include "Math.h"
|
||||
#include "ZLMath.h"
|
||||
#ifdef __linux__
|
||||
#include <SDL2/SDL.h>
|
||||
#endif
|
||||
|
||||
28
Game.cpp
28
Game.cpp
@ -17,6 +17,23 @@ namespace ZL
|
||||
const char* CONST_ZIP_FILE = "";
|
||||
#endif
|
||||
|
||||
Vector4f generateRandomQuaternion(std::mt19937& gen)
|
||||
{
|
||||
// Ðàñïðåäåëåíèå äëÿ ãåíåðàöèè ñëó÷àéíûõ êîîðäèíàò êâàòåðíèîíà
|
||||
std::normal_distribution<> distrib(0.0, 1.0);
|
||||
|
||||
// Ãåíåðèðóåì ÷åòûðå ñëó÷àéíûõ ÷èñëà èç íîðìàëüíîãî ðàñïðåäåëåíèÿ N(0, 1).
|
||||
// Íîðìàëèçàöèÿ ýòîãî âåêòîðà äàåò ðàâíîìåðíîå ðàñïðåäåëåíèå ïî 4D-ñôåðå (ò.å. êâàòåðíèîí åäèíè÷íîé äëèíû).
|
||||
Vector4f randomQuat = {
|
||||
(float)distrib(gen),
|
||||
(float)distrib(gen),
|
||||
(float)distrib(gen),
|
||||
(float)distrib(gen)
|
||||
};
|
||||
|
||||
return randomQuat.normalized();
|
||||
}
|
||||
|
||||
|
||||
// --- Îñíîâíàÿ ôóíêöèÿ ãåíåðàöèè ---
|
||||
std::vector<BoxCoords> generateRandomBoxCoords(int N)
|
||||
@ -76,8 +93,14 @@ namespace ZL
|
||||
|
||||
if (accepted)
|
||||
{
|
||||
// Êîîðäèíàòû ïîäõîäÿò, äîáàâëÿåì îáúåêò
|
||||
boxCoordsArr.emplace_back(BoxCoords{ newPos, Matrix3f::Identity() });
|
||||
// 2. Ãåíåðèðóåì ñëó÷àéíûé êâàòåðíèîí
|
||||
Vector4f randomQuat = generateRandomQuaternion(gen);
|
||||
|
||||
// 3. Ïðåîáðàçóåì åãî â ìàòðèöó âðàùåíèÿ
|
||||
Matrix3f randomMatrix = QuatToMatrix(randomQuat);
|
||||
|
||||
// 4. Äîáàâëÿåì îáúåêò ñ íîâîé ñëó÷àéíîé ìàòðèöåé
|
||||
boxCoordsArr.emplace_back(BoxCoords{ newPos, randomMatrix });
|
||||
generatedCount++;
|
||||
}
|
||||
attempts++;
|
||||
@ -267,6 +290,7 @@ void Game::drawBoxes()
|
||||
renderer.RotateMatrix(Environment::inverseShipMatrix);
|
||||
renderer.TranslateMatrix(-Environment::shipPosition);
|
||||
renderer.TranslateMatrix(boxCoordsArr[i].pos);
|
||||
renderer.RotateMatrix(boxCoordsArr[i].m);
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, boxTexture->getTexID());
|
||||
renderer.DrawVertexRenderStruct(boxRenderArr[i]);
|
||||
|
||||
80
Readme.md
80
Readme.md
@ -1,3 +1,83 @@
|
||||
# Windows
|
||||
|
||||
download from https://cmake.org/download/
|
||||
|
||||
Windows x64 Installer: cmake-4.2.0-windows-x86_64.msi
|
||||
|
||||
|
||||
download from https://github.com/libsdl-org/SDL/releases/tag/release-2.32.10
|
||||
|
||||
SDL2-2.32.10-win32-x64.zip
|
||||
|
||||
SDL2-2.32.10:
|
||||
|
||||
```
|
||||
cd C:\..\SDL-realese-2.32.10
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G "Visual Studio 18 2026" -DCMAKE_INSTALL_PREFIX=install ..
|
||||
cmake --build . --config Debug
|
||||
cmake --install . --config Debug
|
||||
```
|
||||
|
||||
download from https://www.zlib.net/
|
||||
|
||||
zlib source code, version 1.3.1, zipfile format (1616K, SHA-256 hash 72af66d44fcc14c22013b46b814d5d2514673dda3d115e64b690c1ad636e7b17):
|
||||
US (zlib.net)
|
||||
|
||||
zlib-1.3.1:
|
||||
|
||||
```
|
||||
cd C:\..\zlib-1.3.1
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G "Visual Studio 18 2026" -DCMAKE_INSTALL_PREFIX=install ..
|
||||
cmake --build . --config Debug
|
||||
cmake --install . --config Debug
|
||||
```
|
||||
|
||||
download from https://github.com/pnggroup/libpng/releases/tag/v1.6.51
|
||||
|
||||
Source code (zip)
|
||||
|
||||
libpng-1.6.51:
|
||||
|
||||
```
|
||||
cd C:\..\libpng-1.6.51
|
||||
mkdir build
|
||||
cd build
|
||||
```
|
||||
|
||||
To build libpng, you need to specify the path to the zlib installation directory as follows:
|
||||
|
||||
```
|
||||
cmake -DCMAKE_PREFIX_PATH="../zlib-1.3.1/build/install" -DCMAKE_INSTALL_PREFIX=install -G "Visual Studio 18 2026" ..
|
||||
cmake --build . --config Debug
|
||||
cmake --install . --config Debug
|
||||
```
|
||||
|
||||
Настройка проекта в Visual Studio:
|
||||
|
||||
Перейдите в Project Properties (правый клик на проект, "Properties").
|
||||
|
||||
C/C++ - ОБЩИЕ; Дополнительные каталоги включаемых файлов, проверить чтобы был добавлен путь к папке include:(пример)
|
||||
|
||||
..\SDL-release-2.32.10\include;..\libpng-1.6.51\build\install\include;C:\Work\OpenAL 1.1 SDK\include;..\Projects\libogg\include;..\vorbis\include
|
||||
|
||||
|
||||
Компоновщик - ОБЩИЕ; Доподнительные каталоги библиотек (пример)
|
||||
|
||||
..\SDL-release-2.32.10\build\install\lib;..\libpng-1.6.51\build\install\lib;..\zlib-1.3.1\build\install\lib
|
||||
|
||||
Компоновщик - ВВОД; Дополнительные зависимости, добавить zlibstaticd.lib (пример)
|
||||
|
||||
zlibstaticd.lib;libpng16_staticd.lib;SDL2d.lib;SDL2maind.lib;opengl32.lib;glu32.lib;shell32.lib;opengl32.lib;glu32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib
|
||||
|
||||
|
||||
в папку ..\projectGAME01\x64\Debug добавить файл SDL2d.dll
|
||||
который можно скопировать из папки ..\SDL-release-2.32.10\build\Debug
|
||||
|
||||
|
||||
# Script to run:
|
||||
|
||||
```
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "OpenGlExtensions.h"
|
||||
#include "Math.h"
|
||||
#include "ZLMath.h"
|
||||
#include <exception>
|
||||
#include <stdexcept>
|
||||
#include "ShaderManager.h"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "Math.h"
|
||||
#include "ZLMath.h"
|
||||
#include "Renderer.h"
|
||||
#include <unordered_map>
|
||||
|
||||
|
||||
1514
Math.cpp → ZLMath.cpp
Executable file → Normal file
1514
Math.cpp → ZLMath.cpp
Executable file → Normal file
File diff suppressed because it is too large
Load Diff
@ -141,4 +141,4 @@ namespace ZL {
|
||||
Matrix4f MultMatrixMatrix(const Matrix4f& m1, const Matrix4f& m2);
|
||||
Matrix4f MakeMatrix4x4(const Matrix3f& m, const Vector3f pos);
|
||||
|
||||
};
|
||||
};
|
||||
@ -1,31 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.31402.337
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "space-game001", "space-game001.vcxproj", "{400A41AE-F904-4D49-9DBC-95934D0EF82E}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{400A41AE-F904-4D49-9DBC-95934D0EF82E}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{400A41AE-F904-4D49-9DBC-95934D0EF82E}.Debug|x64.Build.0 = Debug|x64
|
||||
{400A41AE-F904-4D49-9DBC-95934D0EF82E}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{400A41AE-F904-4D49-9DBC-95934D0EF82E}.Debug|x86.Build.0 = Debug|Win32
|
||||
{400A41AE-F904-4D49-9DBC-95934D0EF82E}.Release|x64.ActiveCfg = Release|x64
|
||||
{400A41AE-F904-4D49-9DBC-95934D0EF82E}.Release|x64.Build.0 = Release|x64
|
||||
{400A41AE-F904-4D49-9DBC-95934D0EF82E}.Release|x86.ActiveCfg = Release|Win32
|
||||
{400A41AE-F904-4D49-9DBC-95934D0EF82E}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {C3D1B89D-D5F1-4E33-8439-56D6C43B07A2}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@ -1,184 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>16.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{400a41ae-f904-4d49-9dbc-95934d0ef82e}</ProjectGuid>
|
||||
<RootNamespace>ZeptoLabTest1</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
<ProjectName>space-game001</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<TargetName>Viola</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>PNG_ENABLED;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>..\SDL2-2.28.3\include;..\lpng1645\build\install\include;C:\Work\OpenAL 1.1 SDK\include;..\Projects\libogg\include;..\vorbis\include</AdditionalIncludeDirectories>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>libpng16_staticd.lib;SDL2.lib;SDL2main.lib;opengl32.lib;glu32.lib;shell32.lib;opengl32.lib;glu32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\SDL2-2.28.3\lib\x64;..\lpng1645\build\install\lib</AdditionalLibraryDirectories>
|
||||
<EntryPointSymbol>
|
||||
</EntryPointSymbol>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>C:\Work\SDL2-2.28.3\include;C:\Work\Projects\lpng1645\build\install\include;C:\Work\OpenAL 1.1 SDK\include;C:\Work\Projects\libogg\include;C:\Work\Projects\vorbis\include</AdditionalIncludeDirectories>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>libogg_static.lib;audioplayer.lib;vorbisfile.lib;vorbis.lib;OpenAL32.lib;SDL2.lib;SDL2main.lib;opengl32.lib;glu32.lib;shell32.lib;opengl32.lib;glu32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>C:\Work\Projects\ZeptoLabTest1\cmakeaudioplayer\build\Release;C:\Work\SDL2-2.28.3\lib\x64;C:\Work\Projects\vorbis\build\lib\Release;C:\Work\OpenAL 1.1 SDK\libs\Win64;C:\Work\Projects\libogg\win32\VS2010\x64\Release</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="AudioPlayerAsync.cpp" />
|
||||
<ClCompile Include="BoneAnimatedModel.cpp" />
|
||||
<ClCompile Include="Environment.cpp" />
|
||||
<ClCompile Include="Game.cpp" />
|
||||
<ClCompile Include="main.cpp" />
|
||||
<ClCompile Include="Math.cpp" />
|
||||
<ClCompile Include="OpenGlExtensions.cpp" />
|
||||
<ClCompile Include="Renderer.cpp" />
|
||||
<ClCompile Include="ShaderManager.cpp" />
|
||||
<ClCompile Include="TextModel.cpp" />
|
||||
<ClCompile Include="TextureManager.cpp" />
|
||||
<ClCompile Include="Utils.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="AnimatedModel.h" />
|
||||
<ClInclude Include="AudioPlayerAsync.h" />
|
||||
<ClInclude Include="BoneAnimatedModel.h" />
|
||||
<ClInclude Include="Environment.h" />
|
||||
<ClInclude Include="Game.h" />
|
||||
<ClInclude Include="Math.h" />
|
||||
<ClInclude Include="OpenGlExtensions.h" />
|
||||
<ClInclude Include="Renderer.h" />
|
||||
<ClInclude Include="ShaderManager.h" />
|
||||
<ClInclude Include="TextModel.h" />
|
||||
<ClInclude Include="TextureManager.h" />
|
||||
<ClInclude Include="Utils.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@ -1,93 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="main.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="TextureManager.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Renderer.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ShaderManager.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="OpenGlExtensions.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Math.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Utils.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Game.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="BoneAnimatedModel.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="TextModel.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Environment.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="AudioPlayerAsync.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="TextureManager.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Renderer.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ShaderManager.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="OpenGlExtensions.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Math.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Utils.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Game.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="AnimatedModel.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="BoneAnimatedModel.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="TextModel.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Environment.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="AudioPlayerAsync.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
Loading…
Reference in New Issue
Block a user