Skip to content

Commit

Permalink
Screenshot and input update, requires C++17
Browse files Browse the repository at this point in the history
* SystemEvents in KeyChecker
* ControlMenu now looks like ChasmPortable
* add remappable keys present in original portable release like center_view and weapon_next/prev
* SavesComment now contains time instead of LevelHealth
* TGAWrite modification for screenshots
* use strcasestr and strcasecmp
* switch from KeyboardState to InputState allowing other input device type states
* use char32_t instead of unsigned int for KeyCode
* allow mouse control remap
* allow rotate/wrap for msaa and pixel_size
* fix character input in window resolution video menu
* modify WriteTGA to support RGBA32 flipped input if palette equals nullptr
* add SystemEvent support to KeyChecker
* add screenshot implementation
* use timestamp for saves instead of Level and Health
* add LICENSE
* add add-on list in README.md
* add physfs and tinygltfloader as submodule in external
* support loading new TAR format csm.bin with PhysicsFS
  • Loading branch information
Jon Daniel committed Aug 4, 2023
1 parent d9efad5 commit 852bd14
Show file tree
Hide file tree
Showing 37 changed files with 2,001 additions and 683 deletions.
62 changes: 57 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/*
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 Down
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/tinygltfloader"]
path = external/tinygltfloader
url = http://github.com/syoyo/tinygltfloader/
[submodule "external/physfs"]
path = external/physfs
url = http://github.com/jopadan/physfs
11 changes: 9 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ 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)

if(MSVC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /D _CRT_SECURE_NO_WARNINGS /MP")
Expand All @@ -14,10 +15,15 @@ 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)

# Source and header files
file(GLOB_RECURSE CHASM_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")
Expand Down Expand Up @@ -48,6 +54,7 @@ endif()

set(CHASM_LIBS
${SDL2_LIBRARY}
physfs
)

if(WIN32)
Expand Down
Loading

0 comments on commit 852bd14

Please sign in to comment.