Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Screenshot and input update, requires C++17 #58

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 58 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,32 @@
# Source temporaries
*.cpp~
*.hpp~
src/.*.cpp.swp*
src/.*.hpp.swp*
src/*.cpp~
src/*.hpp~
src/common/*.cpp.swp*
src/common/*.hpp.swp*
src/common/*.cpp~
src/common/*.hpp~
src/sound/*.cpp.swp*
src/sound/*.hpp.swp*
src/sound/*.cpp~
src/sound/*.hpp~
src/server/*.cpp.swp*
src/server/*.hpp.swp*
src/server/*.cpp~
src/server/*.hpp~
src/net/*.cpp.swp*
src/net/*.hpp.swp*
src/net/*.cpp~
src/net/*.hpp~

# Windows binaries
*.exe
*.dll

*a.out
*.so

# QtCreator project user settings
*.user
Expand All @@ -20,17 +45,44 @@ build-*
*.cfg

# Game data
csm.bin
CSM.BIN
CSM.bin
csm.BIN
*.bin
*.BIN
*.tar
*.TAR
CURSED/
CURSED/*
Comment on lines +52 to +53
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not a very good idea to list here all possible add-ons directories. Imagine doing this for Doom or Quake with thousands of add-ons.
Let's leave only directories, related to the original game.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding the three common main addons to ignore is required for undisturbed in source tree development

cursed/
cursed/*
MUSIC/
MUSIC/*
music/
music/*
ADDON1/
ADDON1/*
addon1/
addon1/*
borough/
borough/*
BOROUGH/
BOROUGH/*
USERMAP/
USERMAP/*
usermap/
usermap/*

# Game saves
saves/*
SAVES/*

# Screen shots
*.tga
*.TGA

# Build system
CMakeFiles/*
CMakeFiles
CMakeDoxyfile.in
CMakeDoxygenDefaults.cmake
cmake_install.cmake
install_manifest.txt
CMakeCache.txt
Expand All @@ -44,3 +96,4 @@ MapToTGAConverter
ObjToTGAConverter
PaletteExtractor
PanzerChasm
compile_commands.json
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@
[submodule "src/panzer_ogl_lib"]
path = src/panzer_ogl_lib
url = http://github.com/Panzerschrek/panzer_ogl_lib
[submodule "external/physfs"]
path = external/physfs
url = http://github.com/jopadan/physfs
[submodule "external/cgltf"]
path = external/cgltf
url = http://github.com/jkuhlmann/cgltf
23 changes: 17 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,39 @@ cmake_minimum_required(VERSION 3.1)

project(Chasm-Reverse)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED YES)

include(CheckCXXSourceCompiles)
include(GNUInstallDirs)

set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)

if(MSVC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /D _CRT_SECURE_NO_WARNINGS /MP")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D _CRT_SECURE_NO_WARNINGS /MP")
endif()

option(BUILD_TOOLS "Enable compilation of tools" YES)
include(CheckCXXSourceCompiles)
include(GNUInstallDirs)

set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/external/physfs)

find_package(SDL2 REQUIRED)

include_directories(${SDL2_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/src/ ${CMAKE_CURRENT_SOURCE_DIR}/src/panzer_ogl_lib)
${CMAKE_CURRENT_SOURCE_DIR}/src/
${CMAKE_CURRENT_SOURCE_DIR}/src/panzer_ogl_lib
${CMAKE_CURRENT_SOURCE_DIR}/external/physfs/src
${CMAKE_CURRENT_SOURCE_DIR}/external/cgltf)

# Source and header files
file(GLOB_RECURSE CHASM_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")
file(GLOB_RECURSE CHASM_HEADERS
"${CMAKE_CURRENT_SOURCE_DIR}/src/*.hpp"
"${CMAKE_CURRENT_SOURCE_DIR}/src/*.h"
"${CMAKE_CURRENT_SOURCE_DIR}/src/*.inl")
"${CMAKE_CURRENT_SOURCE_DIR}/src/*.inl"
"${CMAKE_CURRENT_SOURCE_DIR}/external/physfs/src/*.h"
"${CMAKE_CURRENT_SOURCE_DIR}/external/cgltf/*.h")

# Detect MMX support

Expand All @@ -48,6 +58,7 @@ endif()

set(CHASM_LIBS
${SDL2_LIBRARY}
physfs
)

if(WIN32)
Expand Down
Loading
Loading