Skip to content

Commit

Permalink
- add automap code
Browse files Browse the repository at this point in the history
- add FFmpeg4 support
- add gamma shader
- add horizontal/vertical offset to StringText (SFML 2.5.0)
- add if.regex condition
- add min/max value to InputText
- add multiple if condition action (ex: if x == 1 and y == 2)
- add new game actions
- add new scancodes to keyboard parser
- add palette support to BitmapFont
- allow setting action for any key press
- allow unmounting folders from physfs search path
- changed elapsed time code to process more steps in regards to the current fps limit
- fix blurry level when using odd window size by forcing level view to be even in size
- fully implement load/save game
- initial Spell implementation
- make add/remove gold code generic for all items that have the quantity/capacity properties
- refactor game object query syntax
- refactor getVar*
- refactor level drawing to support multiple layers (for automap)
- refactor Namer into Classifier
- refactor replaceVars to replace vars between || instead of between %% to avoid conflicts with queries
- refactor sfeMovie
- remane val to value
- remove support for old PhysFS
- replace captureInputEvents bool with InputEvent in Button/Level
- replace regex search with string::find
- replace string conversions with C++17's charconv
- require SFML 2.5
- update tileset generation code
- use string_view where appropriate

- update gamefiles
- add some initial quests (poisoned water, ogden's sign, farmer's orchard, etc)
- add all default levels (Diablo + Hellfire)
- add automap for all level types + flare
  • Loading branch information
DGEngine committed Nov 25, 2018
1 parent 680b5a5 commit d0c8363
Show file tree
Hide file tree
Showing 1,266 changed files with 30,826 additions and 12,683 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
/gamefilesd/res/icon.png
/gamefileshf.zip
/gamefileshf/res/icon.png
/fantasycore.zip
/hellfire
/hellfire.*
/hfmonk
Expand Down
8 changes: 7 additions & 1 deletion BUILD.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ The provided project expects the following folders in the root of the
project to build properly.

/PhysicsFS - https://icculus.org/physfs
version >= 2.1
Compile using MinSizeRel.

/SFML - http://www.sfml-dev.org/
Expand Down Expand Up @@ -49,7 +50,7 @@ swscale-3.dll (FFmpeg 2)
Linux

To compile in Linux (Ubuntu), you need gcc or clang with C++17 support
and to have both PhysicsFS and SFML 2.5 installed.
and to have both PhysicsFS >= 2.1 and SFML >= 2.5 installed.

sudo apt install libphysfs-dev
sudo apt install libsfml-dev
Expand All @@ -71,3 +72,8 @@ cmake CMakeLists.txt -DDGENGINE_MOVIE_SUPPORT:BOOL=FALSE

Both PhysicsFS and SFML must be installed.
FFmpeg is also required for movie support.

Clang variant bug

There's a bug in clang which affects libstdc++'s <variant>.
I you get errors with clang, use -stdlib=libc++ instead.
89 changes: 57 additions & 32 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ cmake_minimum_required(VERSION 3.8.0 FATAL_ERROR)

project(DGEngine)

if(CMAKE_CXX_COMPILER_ID STREQUAL GNU)
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++")
add_definitions(-Wall -stdlib=libc++)
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if(NOT BEOS)
add_definitions(-Wall)
endif()
Expand All @@ -16,7 +19,7 @@ if(DGENGINE_MOVIE_SUPPORT)
find_package(FFmpeg COMPONENTS avcodec avformat avutil swscale)
endif()
find_package(PhysFS REQUIRED)
find_package(SFML 2.4 REQUIRED system window graphics network audio)
find_package(SFML 2.5 REQUIRED system window graphics network audio)

include_directories(./src)

Expand All @@ -38,6 +41,7 @@ set(SOURCE_FILES
src/BitmapText.h
src/Button.cpp
src/Button.h
src/CachedImagePack.cpp
src/CachedImagePack.h
src/Circle.cpp
src/Circle.h
Expand All @@ -57,12 +61,14 @@ set(SOURCE_FILES
src/Game.h
src/GameUtils.cpp
src/GameUtils.h
src/IfCondition.cpp
src/IfCondition.h
src/IgnoreResource.h
src/Image.cpp
src/Image.h
src/Image2.h
src/ImageUtils.cpp
src/ImageUtils.h
src/InputEvent.h
src/InputText.cpp
src/InputText.h
src/LoadingScreen.cpp
Expand All @@ -73,10 +79,6 @@ set(SOURCE_FILES
src/Min.h
src/Movie2.cpp
src/Movie2.h
src/Music2.cpp
src/Music2.h
src/MusicLoops.cpp
src/MusicLoops.h
src/Palette.cpp
src/Palette.h
src/Pcx.cpp
Expand All @@ -90,20 +92,18 @@ set(SOURCE_FILES
src/ResourceManager.h
src/ScrollableText.cpp
src/ScrollableText.h
src/SFMLUtils.cpp
src/SFMLUtils.h
src/Shaders.cpp
src/Shaders.h
src/Sol.cpp
src/Sol.h
src/Sprite2.h
src/StreamReader.h
src/StringButton.cpp
src/StringButton.h
src/StringText.cpp
src/StringText.h
src/Text2.cpp
src/Text2.h
src/Text.cpp
src/Text.h
src/TextureInfo.h
src/TextUtils.cpp
src/TextUtils.h
src/TileSet.cpp
Expand All @@ -112,8 +112,6 @@ set(SOURCE_FILES
src/Variable.cpp
src/Variable.h
src/VarOrPredicate.h
src/View2.cpp
src/View2.h
src/Actions/ActAction.h
src/Actions/ActAudio.h
src/Actions/ActButton.h
Expand All @@ -123,6 +121,7 @@ set(SOURCE_FILES
src/Actions/ActEvent.h
src/Actions/ActFade.h
src/Actions/ActFocus.h
src/Actions/ActFont.h
src/Actions/ActGame.h
src/Actions/ActImage.h
src/Actions/ActInputText.h
Expand All @@ -146,30 +145,34 @@ set(SOURCE_FILES
src/Actions/ActVariable.h
src/Actions/ActVisibility.h
src/endian/big_endian.hpp
src/endian/helpers.hpp
src/endian/is_big_endian.hpp
src/endian/little_endian.hpp
src/endian/stream.hpp
src/endian/stream_reader.hpp
src/endian/stream_writer.hpp
src/Game/BaseClass.cpp
src/Game/BaseClass.h
src/endian/detail/helpers.hpp
src/endian/detail/stream.hpp
src/Game/BaseClassActions.cpp
src/Game/BaseClassActions.h
src/Game/BaseClassDefaults.h
src/Game/BaseLevelObject.cpp
src/Game/BaseLevelObject.h
src/Game/Classifier.cpp
src/Game/Classifier.h
src/Game/Classifiers.h
src/Game/Formula.cpp
src/Game/Formula.h
src/Game/fsa.h
src/Game/GameHashes.h
src/Game/GameProperties.cpp
src/Game/GameProperties.h
src/Game/Inventories.h
src/Game/Inventory.cpp
src/Game/Inventory.h
src/Game/Item.cpp
src/Game/Item.h
src/Game/ItemClass.cpp
src/Game/ItemClass.h
src/Game/ItemCollection.cpp
src/Game/ItemCollection.h
src/Game/ItemLocation.h
src/Game/ItemProperties.h
src/Game/ItemTypes.h
src/Game/ItemXY.h
src/Game/Level.cpp
src/Game/Level.h
Expand All @@ -180,9 +183,8 @@ set(SOURCE_FILES
src/Game/LevelMap.cpp
src/Game/LevelMap.h
src/Game/LevelObject.h
src/Game/LevelObjectClass.h
src/Game/MapCoord.h
src/Game/Namer.cpp
src/Game/Namer.h
src/Game/Number.h
src/Game/PairXY.h
src/Game/PathFinder.cpp
Expand All @@ -195,15 +197,22 @@ set(SOURCE_FILES
src/Game/Quest.h
src/Game/SimpleLevelObject.cpp
src/Game/SimpleLevelObject.h
src/Game/Spell.cpp
src/Game/Spell.h
src/Game/SpellClass.cpp
src/Game/SpellClass.h
src/Game/stlastar.h
src/Game/Save/SaveItem.cpp
src/Game/Save/SaveItem.h
src/Game/Save/SaveLevel.cpp
src/Game/Save/SaveLevel.h
src/Game/Save/SavePlayer.cpp
src/Game/Save/SavePlayer.h
src/Game/Save/SaveProperties.h
src/Game/Save/SaveSimpleLevelObject.cpp
src/Game/Save/SaveSimpleLevelObject.h
src/Game/Save/SaveUtils.cpp
src/Game/Save/SaveUtils.h
src/gsl/gsl
src/gsl/gsl_algorithm
src/gsl/gsl_assert
Expand Down Expand Up @@ -288,6 +297,8 @@ set(SOURCE_FILES
src/Parser/ParseTexturePack.h
src/Parser/ParseVariable.cpp
src/Parser/ParseVariable.h
src/Parser/Game/ParseClassifier.cpp
src/Parser/Game/ParseClassifier.h
src/Parser/Game/ParseItem.cpp
src/Parser/Game/ParseItem.h
src/Parser/Game/ParseItemClass.cpp
Expand All @@ -296,14 +307,18 @@ set(SOURCE_FILES
src/Parser/Game/ParseLevel.h
src/Parser/Game/ParseLevelObject.cpp
src/Parser/Game/ParseLevelObject.h
src/Parser/Game/ParseNamer.cpp
src/Parser/Game/ParseNamer.h
src/Parser/Game/ParseLevelObjectClass.cpp
src/Parser/Game/ParseLevelObjectClass.h
src/Parser/Game/ParsePlayer.cpp
src/Parser/Game/ParsePlayer.h
src/Parser/Game/ParsePlayerClass.cpp
src/Parser/Game/ParsePlayerClass.h
src/Parser/Game/ParseQuest.cpp
src/Parser/Game/ParseQuest.h
src/Parser/Game/ParseSpell.cpp
src/Parser/Game/ParseSpell.h
src/Parser/Game/ParseSpellClass.cpp
src/Parser/Game/ParseSpellClass.h
src/Parser/Utils/ParseUtils.cpp
src/Parser/Utils/ParseUtils.h
src/Parser/Utils/ParseUtilsIdx.cpp
Expand All @@ -315,6 +330,7 @@ set(SOURCE_FILES
src/Predicates/Predicate.h
src/Predicates/PredIO.h
src/Predicates/PredItem.h
src/Predicates/PredLevelObject.h
src/Predicates/PredPlayer.h
src/rapidjson/allocators.h
src/rapidjson/document.h
Expand Down Expand Up @@ -351,6 +367,19 @@ set(SOURCE_FILES
src/rapidjson/internal/swap.h
src/rapidjson/msinttypes/inttypes.h
src/rapidjson/msinttypes/stdint.h
src/SFML/Image2.h
src/SFML/Music2.cpp
src/SFML/Music2.h
src/SFML/MusicLoops.cpp
src/SFML/MusicLoops.h
src/SFML/SFMLUtils.cpp
src/SFML/SFMLUtils.h
src/SFML/Sprite2.cpp
src/SFML/Sprite2.h
src/SFML/View2.cpp
src/SFML/View2.h
src/TexturePacks/BitmapFontTexturePack.cpp
src/TexturePacks/BitmapFontTexturePack.h
src/TexturePacks/CachedTexturePack.cpp
src/TexturePacks/CachedTexturePack.h
src/TexturePacks/IndexedTexturePack.cpp
Expand All @@ -363,8 +392,10 @@ set(SOURCE_FILES
src/TexturePacks/TexturePack.h
src/TexturePacks/VectorTexturePack.cpp
src/TexturePacks/VectorTexturePack.h
src/Utils/FixedMap.h
src/Utils/Helper2D.h
src/Utils/iterator_tpl.h
src/Utils/LRUCache.h
src/Utils/ReverseIterable.h
src/Utils/Utils.cpp
src/Utils/Utils.h
Expand All @@ -376,22 +407,16 @@ if(FFmpeg_FOUND)
src/sfeMovie/AudioStream.hpp
src/sfeMovie/Demuxer.cpp
src/sfeMovie/Demuxer.hpp
src/sfeMovie/Macros.cpp
src/sfeMovie/Macros.hpp
src/sfeMovie/Movie.cpp
src/sfeMovie/Movie.hpp
src/sfeMovie/MovieImpl.cpp
src/sfeMovie/MovieImpl.hpp
src/sfeMovie/Stream.cpp
src/sfeMovie/Stream.hpp
src/sfeMovie/StreamSelection.cpp
src/sfeMovie/StreamSelection.hpp
src/sfeMovie/Timer.cpp
src/sfeMovie/Timer.hpp
src/sfeMovie/TimerPriorities.cpp
src/sfeMovie/TimerPriorities.hpp
src/sfeMovie/Utilities.cpp
src/sfeMovie/Utilities.hpp
src/sfeMovie/VideoStream.cpp
src/sfeMovie/VideoStream.hpp
)
Expand Down
Loading

0 comments on commit d0c8363

Please sign in to comment.