Skip to content

Commit

Permalink
- add drawable.center action
Browse files Browse the repository at this point in the history
- add drawables to specific resource id
- add experience to level and update player to use it
- add hasDrawable to game
- add ImageFile
- add outline shader
- add setPalette to LevelObject
- add support for Tiled map files (saved as json)
- add support to creating textures from color arrays
- add TexturePacks
- batch level sprites
- draw cel objects using palettes (shaders)
- fix mouse wheel not working when maximized and stretched
- make BitmapButton inherit from Image
- merge image and bitmapButton
- merge Movie and MovieStub
- play sound when walking
- prevent duplicate drawable ids
- refactor animation to use TexturePack
- refactor audio/sound related code
- refactor BitmapButton and Image to use Sprite2 with palette support
- refactor cel code
- refactor Event
- refactor hardcoded tile sizes
- refactor IgnoreResource
- refactor ItemClass/PlayerClass to use BaseClass
- refactor level objects to use BaseLevelObject
- refactor level to draw base of pillar as 64x32 tile (faster)
- refactor parsers that use textures
- refactor player
- refactor StringButton
- refactor tileMaps to be TexturePacks
- remove ActImageSetTextureRectVec
- replace mapbox::variant with C++17's variant
- update BUILD.txt
- update cursor to allow setting color/palette
- update drawables with new palette textures code
- update Game.cpp
- update README.md
- update texture code
- use c++17's clamp
  • Loading branch information
demo committed Jan 7, 2018
1 parent 38e2a3b commit 6268b90
Show file tree
Hide file tree
Showing 354 changed files with 9,718 additions and 6,858 deletions.
15 changes: 8 additions & 7 deletions BUILD.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ uses C++ features that are present only in VS2017.
The provided project expects the following folders in the root of the
project to build properly.

/PhysicsFS - https://icculus.org/physfs/downloads/physfs-2.0.3.tar.bz2
/PhysicsFS - https://icculus.org/physfs
Compile using MinSizeRel.

/SFML - http://www.sfml-dev.org/files/SFML-2.3.2-windows-vc14-32-bit.zip
/SFML - http://www.sfml-dev.org/
SFML 2.5.0

/FFmpeg - http://ffmpeg.zeranoe.com/builds/
Get both 32 bit shared and dev packages (version 2.x or 3.x)
Expand Down Expand Up @@ -47,15 +48,15 @@ swscale-3.dll (FFmpeg 2)

Linux

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

sudo apt-get install libphysfs-dev
sudo apt-get install libsfml-dev
sudo apt install libphysfs-dev
sudo apt install libsfml-dev

Optional (for movie support) FFmpeg:

sudo apt-get install libavdevice-dev libavformat-dev libavfilter-dev libavcodec-dev libswscale-dev libavutil-dev
sudo apt install libavdevice-dev libavformat-dev libavfilter-dev libavcodec-dev libswscale-dev libavutil-dev

Movie support is enabled by default (CMake), unless FFmpeg isn't found.
In CMake, set DGENGINE_MOVIE_SUPPORT to FALSE to skip movie support.
Expand Down
76 changes: 43 additions & 33 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
cmake_minimum_required(VERSION 3.8.0 FATAL_ERROR)

project(DGEngine)

if(CMAKE_CXX_COMPILER_ID STREQUAL GNU)
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
message(FATAL_ERROR "GCC 5.0+ is required")
endif()

if(NOT BEOS)
add_definitions(-Wall)
endif()
Expand All @@ -20,7 +16,7 @@ if(DGENGINE_MOVIE_SUPPORT)
find_package(FFmpeg COMPONENTS avcodec avformat avutil swscale)
endif()
find_package(PhysFS REQUIRED)
find_package(SFML 2.3 REQUIRED system window graphics network audio)
find_package(SFML 2.4 REQUIRED system window graphics network audio)

include_directories(./src)

Expand All @@ -30,18 +26,16 @@ set(SOURCE_FILES
src/Anchor.h
src/Animation.cpp
src/Animation.h
src/AudioSource.h
src/BitmapButton.cpp
src/BitmapButton.h
src/BitmapFont.cpp
src/BitmapFont.h
src/BitmapText.cpp
src/BitmapText.h
src/Button.cpp
src/Button.h
src/Cel.cpp
src/Cel.h
src/CelCache.h
src/CelUtils.cpp
src/CelUtils.h
src/CachedImagePack.h
src/Circle.cpp
src/Circle.h
src/DrawableText.h
Expand All @@ -63,6 +57,7 @@ set(SOURCE_FILES
src/IgnoreResource.h
src/Image.cpp
src/Image.h
src/Image2.h
src/ImageUtils.cpp
src/ImageUtils.h
src/InputText.cpp
Expand All @@ -75,9 +70,10 @@ set(SOURCE_FILES
src/Min.h
src/Movie2.cpp
src/Movie2.h
src/MovieStub.cpp
src/MovieStub.h
src/Music2.cpp
src/Music2.h
src/MusicLoops.cpp
src/MusicLoops.h
src/Palette.cpp
src/Palette.h
src/Pcx.cpp
Expand All @@ -94,8 +90,11 @@ set(SOURCE_FILES
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/StringButton.cpp
src/StringButton.h
src/StringText.cpp
Expand All @@ -109,10 +108,8 @@ set(SOURCE_FILES
src/UIObject.h
src/Utils.cpp
src/Utils.h
src/UIText.h
src/Variable.cpp
src/Variable.h
src/Variant.h
src/VarOrPredicate.h
src/View2.cpp
src/View2.h
Expand All @@ -133,6 +130,7 @@ set(SOURCE_FILES
src/Actions/ActiontList.h
src/Actions/ActItem.h
src/Actions/ActLevel.h
src/Actions/ActLevelObject.h
src/Actions/ActLoad.h
src/Actions/ActLoadingScreen.h
src/Actions/ActMenu.h
Expand All @@ -143,19 +141,17 @@ set(SOURCE_FILES
src/Actions/ActResource.h
src/Actions/ActSound.h
src/Actions/ActText.h
src/Actions/ActTexture.h
src/Actions/ActUIText.h
src/Actions/ActVariable.h
src/Actions/ActVisibility.h
src/Game/CelLevelObject.cpp
src/Game/CelLevelObject.h
src/Game/BaseClass.cpp
src/Game/BaseClass.h
src/Game/BaseLevelObject.cpp
src/Game/BaseLevelObject.h
src/Game/Formula.cpp
src/Game/Formula.h
src/Game/fsa.h
src/Game/GameProperties.cpp
src/Game/GameProperties.h
src/Game/ImageLevelObject.cpp
src/Game/ImageLevelObject.h
src/Game/Item.cpp
src/Game/Item.h
src/Game/ItemClass.cpp
Expand Down Expand Up @@ -188,7 +184,14 @@ set(SOURCE_FILES
src/Game/PlayerClass.h
src/Game/Quest.cpp
src/Game/Quest.h
src/Game/SimpleLevelObject.cpp
src/Game/SimpleLevelObject.h
src/Game/stlastar.h
src/ImageContainers/CelImageContainer.cpp
src/ImageContainers/CelImageContainer.h
src/ImageContainers/ImageContainer.h
src/ImageContainers/SimpleImageContainer.cpp
src/ImageContainers/SimpleImageContainer.h
src/Json/JsonParser.h
src/Json/JsonUtils.cpp
src/Json/JsonUtils.h
Expand All @@ -198,16 +201,12 @@ set(SOURCE_FILES
src/Parser/ParseAnimation.h
src/Parser/ParseAudio.cpp
src/Parser/ParseAudio.h
src/Parser/ParseAudioCommon.cpp
src/Parser/ParseAudioCommon.h
src/Parser/ParseBitmapFont.cpp
src/Parser/ParseBitmapFont.h
src/Parser/ParseButton.cpp
src/Parser/ParseButton.h
src/Parser/ParseCelFile.cpp
src/Parser/ParseCelFile.h
src/Parser/ParseCelTexture.cpp
src/Parser/ParseCelTexture.h
src/Parser/ParseCelTexturePack.cpp
src/Parser/ParseCelTexturePack.h
src/Parser/ParseCircle.cpp
src/Parser/ParseCircle.h
src/Parser/ParseCondition.cpp
Expand All @@ -224,6 +223,8 @@ set(SOURCE_FILES
src/Parser/ParseIcon.h
src/Parser/ParseImage.cpp
src/Parser/ParseImage.h
src/Parser/ParseImageContainer.cpp
src/Parser/ParseImageContainer.h
src/Parser/ParseInputText.cpp
src/Parser/ParseInputText.h
src/Parser/ParseKeyboard.cpp
Expand Down Expand Up @@ -255,6 +256,8 @@ set(SOURCE_FILES
src/Parser/ParseText.h
src/Parser/ParseTexture.cpp
src/Parser/ParseTexture.h
src/Parser/ParseTexturePack.cpp
src/Parser/ParseTexturePack.h
src/Parser/ParseVariable.cpp
src/Parser/ParseVariable.h
src/Parser/Game/ParseItem.cpp
Expand Down Expand Up @@ -320,11 +323,18 @@ set(SOURCE_FILES
src/rapidjson/internal/swap.h
src/rapidjson/msinttypes/inttypes.h
src/rapidjson/msinttypes/stdint.h
src/variant/optional.hpp
src/variant/recursive_wrapper.hpp
src/variant/variant.hpp
src/variant/variant_io.hpp
src/variant/variant_visitor.hpp
src/TexturePacks/CachedTexturePack.cpp
src/TexturePacks/CachedTexturePack.h
src/TexturePacks/RectTexturePack.cpp
src/TexturePacks/RectTexturePack.h
src/TexturePacks/SimpleIndexedTexturePack.cpp
src/TexturePacks/SimpleIndexedTexturePack.h
src/TexturePacks/SimpleTexturePack.cpp
src/TexturePacks/SimpleTexturePack.h
src/TexturePacks/TexturePack.cpp
src/TexturePacks/TexturePack.h
src/TexturePacks/VectorTexturePack.cpp
src/TexturePacks/VectorTexturePack.h
)

if(FFmpeg_FOUND)
Expand Down Expand Up @@ -373,5 +383,5 @@ if(SFML_FOUND)
target_link_libraries(${PROJECT_NAME} ${SFML_LIBRARIES})
endif()

set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 14)
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 17)
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD_REQUIRED ON)
Loading

0 comments on commit 6268b90

Please sign in to comment.