From ffe88fb481079b74934fe3479eade6506d380db8 Mon Sep 17 00:00:00 2001 From: dgcor Date: Thu, 8 Sep 2022 21:36:31 +0000 Subject: [PATCH] - fix font size (gamefiles) - fix formulas parser - fix quantity in inventory - fix queryList of player item to return only the existing items - modernize C++ - refactor file structure - remove project and add CMakePresets.json - remove Visual Studio project - splitIntoMultiple = true in ActItemLoadFromLevel by default - try and find DGEngine.core on parent dir first - update DGEngine core - update gamefiles - use ccache if available - use GameInputEvents instead of keys/scancodes --- .editorconfig | 8 +- .github/workflows/deploy_linux.yml | 101 + .github/workflows/deploy_windows.yml | 97 + .github/workflows/main.yml | 77 +- .gitignore | 12 +- BUILD.txt | 33 +- CMakeLists.txt | 382 +- CMakePresets.json | 394 ++ DGEngine.core/.editorconfig | 4 +- DGEngine.core/.github/workflows/main.yml | 59 +- DGEngine.core/.gitignore | 3 + DGEngine.core/BUILD.txt | 32 +- DGEngine.core/CMakeLists.txt | 584 +-- DGEngine.core/CMakePresets.json | 368 ++ DGEngine.core/DGEngine.core.vcxproj | 973 ----- DGEngine.core/LICENSE.txt | 6 +- DGEngine.core/README.md | 10 +- DGEngine.core/cmake_modules/FindSFML.cmake | 368 -- DGEngine.core/docs/actions/readme.md | 4 + DGEngine.core/docs/configuration-files.md | 47 + DGEngine.core/docs/drawables/animation.md | 49 + DGEngine.core/docs/drawables/button.md | 118 + DGEngine.core/docs/drawables/circle.md | 125 + DGEngine.core/docs/drawables/game.md | 52 + DGEngine.core/docs/drawables/image.md | 194 + DGEngine.core/docs/drawables/inputText.md | 95 + DGEngine.core/docs/drawables/loadingScreen.md | 107 + DGEngine.core/docs/drawables/menu.md | 234 ++ DGEngine.core/docs/drawables/movie.md | 58 + DGEngine.core/docs/drawables/panel.md | 66 + DGEngine.core/docs/drawables/readme.md | 26 + DGEngine.core/docs/drawables/rectangle.md | 123 + DGEngine.core/docs/drawables/scrollable.md | 91 + DGEngine.core/docs/drawables/shape.md | 196 + DGEngine.core/docs/drawables/text.md | 168 + DGEngine.core/docs/img/circle-1.png | Bin 0 -> 136 bytes DGEngine.core/docs/img/circle-2.png | Bin 0 -> 293 bytes DGEngine.core/docs/img/circle-3.png | Bin 0 -> 410 bytes DGEngine.core/docs/img/circle-4.png | Bin 0 -> 471 bytes DGEngine.core/docs/img/image-1.png | Bin 0 -> 83 bytes DGEngine.core/docs/img/image-2.png | Bin 0 -> 101 bytes DGEngine.core/docs/img/image-3.png | Bin 0 -> 88 bytes DGEngine.core/docs/img/image-4.png | Bin 0 -> 176 bytes DGEngine.core/docs/img/rectangle-1.png | Bin 0 -> 95 bytes DGEngine.core/docs/img/rectangle-2.png | Bin 0 -> 83 bytes DGEngine.core/docs/img/rectangle-3.png | Bin 0 -> 138 bytes DGEngine.core/docs/img/rectangle-4.png | Bin 0 -> 105 bytes DGEngine.core/docs/img/shape-1.png | Bin 0 -> 91 bytes DGEngine.core/docs/img/shape-2.png | Bin 0 -> 161 bytes DGEngine.core/docs/img/shape-3.png | Bin 0 -> 161 bytes DGEngine.core/docs/img/shape-4.png | Bin 0 -> 189 bytes DGEngine.core/docs/img/shape-5.png | Bin 0 -> 122 bytes DGEngine.core/docs/img/shape-6.png | Bin 0 -> 120 bytes DGEngine.core/docs/img/shape-7.png | Bin 0 -> 877 bytes DGEngine.core/docs/readme.md | 27 + DGEngine.core/docs/resources/audio.md | 32 + DGEngine.core/docs/resources/file.md | 35 + DGEngine.core/docs/resources/font.md | 115 + .../docs/resources/gameInputEvent.md | 45 + .../docs/resources/imageContainer.md | 68 + DGEngine.core/docs/resources/inputEvent.md | 124 + DGEngine.core/docs/resources/load.md | 47 + DGEngine.core/docs/resources/mountFile.md | 57 + DGEngine.core/docs/resources/palette.md | 89 + DGEngine.core/docs/resources/readme.md | 24 + DGEngine.core/docs/resources/shader.md | 174 + DGEngine.core/docs/resources/sound.md | 32 + DGEngine.core/docs/resources/texture.md | 102 + DGEngine.core/docs/resources/texturePack.md | 401 ++ DGEngine.core/docs/resources/variable.md | 33 + DGEngine.core/src/EventManager.h | 102 - DGEngine.core/src/Font.h | 15 - DGEngine.core/src/{Actions => Game}/Action.h | 0 DGEngine.core/src/Game/ActionQueryable.h | 12 + .../src/{ => Game}/Actions/ActAction.h | 4 +- .../src/{ => Game}/Actions/ActAnimation.h | 6 +- .../src/{ => Game}/Actions/ActAudio.h | 4 +- .../src/{ => Game}/Actions/ActButton.h | 6 +- .../src/{ => Game}/Actions/ActCondition.h | 10 +- .../src/{ => Game}/Actions/ActCursor.h | 5 +- .../src/{ => Game}/Actions/ActDrawable.h | 16 +- .../src/{ => Game}/Actions/ActEvent.h | 12 +- .../src/{ => Game}/Actions/ActFade.h | 6 +- .../src/{ => Game}/Actions/ActFocus.h | 11 +- .../src/{ => Game}/Actions/ActFont.h | 6 +- .../src/{ => Game}/Actions/ActGame.h | 22 +- DGEngine.core/src/{ => Game}/Actions/ActIO.h | 10 +- .../src/{ => Game}/Actions/ActImage.h | 20 +- .../src/{ => Game}/Actions/ActInputText.h | 6 +- .../src/{ => Game}/Actions/ActLoad.h | 8 +- .../src/{ => Game}/Actions/ActLoadingScreen.h | 7 +- .../src/{ => Game}/Actions/ActMenu.h | 23 +- .../src/{ => Game}/Actions/ActMount.h | 9 +- .../src/{ => Game}/Actions/ActMovie.h | 6 +- .../src/{ => Game}/Actions/ActPalette.h | 4 +- .../src/{ => Game}/Actions/ActRandom.h | 10 +- .../src/{ => Game}/Actions/ActResource.h | 31 +- .../src/{ => Game}/Actions/ActScrollable.h | 6 +- .../src/{ => Game}/Actions/ActShader.h | 6 +- .../src/{ => Game}/Actions/ActSound.h | 8 +- .../src/{ => Game}/Actions/ActText.h | 12 +- .../src/{ => Game}/Actions/ActVariable.h | 30 +- .../src/{ => Game}/Actions/ActVisibility.h | 4 +- .../Actions/ActionList.h} | 4 +- DGEngine.core/src/{ => Game}/Alignment.h | 0 DGEngine.core/src/{ => Game}/Anchor.h | 0 DGEngine.core/src/{ => Game}/AnimationInfo.h | 0 DGEngine.core/src/{ => Game}/AnimationType.h | 0 .../src/{ => Game}/BaseAnimation.cpp | 10 - DGEngine.core/src/{ => Game}/BaseAnimation.h | 6 +- DGEngine.core/src/{ => Game}/BindingFlags.h | 0 DGEngine.core/src/{ => Game}/BlendMode.h | 0 .../src/{ => Game/Drawables}/Animation.cpp | 3 +- .../src/{ => Game/Drawables}/Animation.h | 2 +- .../src/{ => Game/Drawables}/BindableText.cpp | 2 +- .../src/{ => Game/Drawables}/BindableText.h | 2 +- .../src/{ => Game/Drawables}/BitmapButton.cpp | 2 +- .../src/{ => Game/Drawables}/BitmapButton.h | 9 +- .../src/{ => Game/Drawables}/BitmapText.cpp | 5 +- .../src/{ => Game/Drawables}/BitmapText.h | 7 +- .../src/{ => Game/Drawables}/Button.cpp | 44 +- .../src/{ => Game/Drawables}/Button.h | 8 +- .../src/{ => Game/Drawables}/Circle.cpp | 5 +- .../src/{ => Game/Drawables}/Circle.h | 2 +- .../src/{ => Game/Drawables}/DrawableText.h | 14 +- .../src/{ => Game/Drawables}/Image.cpp | 10 +- .../src/{ => Game/Drawables}/Image.h | 36 +- .../src/{ => Game/Drawables}/InputText.cpp | 17 +- .../src/{ => Game/Drawables}/InputText.h | 0 .../{ => Game/Drawables}/LoadingScreen.cpp | 2 +- .../src/{ => Game/Drawables}/LoadingScreen.h | 5 +- .../src/{ => Game/Drawables}/Menu.cpp | 56 +- DGEngine.core/src/{ => Game/Drawables}/Menu.h | 9 +- .../src/{ => Game/Drawables}/Movie2.cpp | 9 +- .../src/{ => Game/Drawables}/Movie2.h | 8 +- .../src/{ => Game/Drawables}/Panel.cpp | 16 +- .../src/{ => Game/Drawables}/Panel.h | 5 +- .../src/{ => Game/Drawables}/Rectangle.cpp | 5 +- .../src/{ => Game/Drawables}/Rectangle.h | 2 +- .../src/{ => Game/Drawables}/Scrollable.cpp | 7 +- .../src/{ => Game/Drawables}/Scrollable.h | 5 +- .../src/{ => Game/Drawables}/Shape.cpp | 5 +- .../src/{ => Game/Drawables}/Shape.h | 2 +- .../src/{ => Game/Drawables}/StringButton.cpp | 2 +- .../src/{ => Game/Drawables}/StringButton.h | 0 .../src/{ => Game/Drawables}/StringText.cpp | 20 +- .../src/{ => Game/Drawables}/StringText.h | 23 +- .../src/{ => Game/Drawables}/Text.cpp | 2 +- DGEngine.core/src/{ => Game/Drawables}/Text.h | 27 +- DGEngine.core/src/{ => Game}/Event.cpp | 0 DGEngine.core/src/{ => Game}/Event.h | 4 +- DGEngine.core/src/Game/EventManager.cpp | 104 + DGEngine.core/src/Game/EventManager.h | 29 + DGEngine.core/src/{ => Game}/FadeInOut.cpp | 5 +- DGEngine.core/src/{ => Game}/FadeInOut.h | 4 +- DGEngine.core/src/{ => Game}/Formula.cpp | 12 +- DGEngine.core/src/{ => Game}/Formula.h | 4 +- DGEngine.core/src/{ => Game}/Formulas.h | 0 DGEngine.core/src/{ => Game}/Game.cpp | 797 +--- DGEngine.core/src/{ => Game}/Game.h | 203 +- .../src/Game/GameInputEventManager.cpp | 28 + .../src/Game/GameInputEventManager.h | 18 + DGEngine.core/src/Game/GameQueryable.cpp | 510 +++ DGEngine.core/src/Game/GameQueryable.h | 37 + DGEngine.core/src/{ => Game}/IfCondition.cpp | 5 +- DGEngine.core/src/{ => Game}/IfCondition.h | 4 +- DGEngine.core/src/{ => Game}/IgnoreResource.h | 5 +- DGEngine.core/src/{ => Game}/InputEvent.cpp | 46 +- DGEngine.core/src/{ => Game}/InputEvent.h | 5 +- .../src/{Predicates => Game}/Predicate.h | 0 .../src/{ => Game}/Predicates/PredIO.h | 10 +- DGEngine.core/src/Game/QueryObject.h | 60 + DGEngine.core/src/Game/Queryable.cpp | 25 + DGEngine.core/src/Game/Queryable.h | 18 + DGEngine.core/src/Game/ResourceBundle.h | 78 + .../src/{ => Game}/ResourceManager.cpp | 77 +- .../src/{ => Game}/ResourceManager.h | 251 +- DGEngine.core/src/Game/Save/SaveProperties.h | 9 - DGEngine.core/src/Game/Save/SaveUtils.cpp | 149 - .../src/{ => Game}/ShaderManager.cpp | 8 +- DGEngine.core/src/{ => Game}/ShaderManager.h | 2 +- DGEngine.core/src/{ => Game}/TextureInfo.h | 4 +- DGEngine.core/src/Game/TextureQueryable.h | 11 + DGEngine.core/src/Game/UIObject.cpp | 26 + DGEngine.core/src/{ => Game}/UIObject.h | 9 +- .../src/{ => Game/Utils}/CmdLineUtils.cpp | 1 + .../src/{ => Game/Utils}/CmdLineUtils.h | 0 .../src/{ => Game/Utils}/FileUtils.cpp | 4 +- .../src/{ => Game/Utils}/FileUtils.h | 0 .../src/{ => Game/Utils}/GameUtils.cpp | 229 +- .../src/{ => Game/Utils}/GameUtils.h | 25 +- .../src/{ => Game/Utils}/ImageUtils.cpp | 2 +- .../src/{ => Game/Utils}/ImageUtils.h | 5 +- .../src/{ => Game/Utils}/TextUtils.cpp | 17 +- .../src/{ => Game/Utils}/TextUtils.h | 13 +- DGEngine.core/src/Game/Utils/UIObjectUtils.h | 33 + DGEngine.core/src/Game/Utils/VarUtils.cpp | 144 + DGEngine.core/src/Game/Utils/VarUtils.h | 147 + DGEngine.core/src/Game/VarOrPredicate.h | 9 + DGEngine.core/src/Game/VarOrQueryObject.h | 9 + DGEngine.core/src/Game/Variable.h | 29 + DGEngine.core/src/Game/VariableManager.cpp | 191 + DGEngine.core/src/Game/VariableManager.h | 61 + DGEngine.core/src/Hooks.h | 4 +- DGEngine.core/src/Json/JsonUtils.cpp | 318 +- DGEngine.core/src/Json/JsonUtils.h | 76 +- DGEngine.core/src/Json/SaveUtils.cpp | 218 + .../src/{Game/Save => Json}/SaveUtils.h | 65 +- .../src/Parser/Actions/ParseActionActions.cpp | 16 + .../src/Parser/Actions/ParseActionActions.h | 10 + .../Parser/Actions/ParseAnimationActions.cpp | 35 + .../Parser/Actions/ParseAnimationActions.h | 14 + .../src/Parser/Actions/ParseAudioActions.cpp | 67 + .../src/Parser/Actions/ParseAudioActions.h | 26 + .../src/Parser/Actions/ParseButtonActions.cpp | 36 + .../src/Parser/Actions/ParseButtonActions.h | 16 + .../ParseConditionActions.cpp} | 32 +- .../Parser/Actions/ParseConditionActions.h | 18 + .../src/Parser/Actions/ParseCursorActions.cpp | 56 + .../src/Parser/Actions/ParseCursorActions.h | 24 + .../Parser/Actions/ParseDrawableActions.cpp | 276 ++ .../src/Parser/Actions/ParseDrawableActions.h | 72 + .../src/Parser/Actions/ParseEventActions.cpp | 33 + .../src/Parser/Actions/ParseEventActions.h | 16 + .../src/Parser/Actions/ParseFadeActions.cpp | 36 + .../src/Parser/Actions/ParseFadeActions.h | 12 + .../src/Parser/Actions/ParseFocusActions.cpp | 48 + .../src/Parser/Actions/ParseFocusActions.h | 22 + .../src/Parser/Actions/ParseFontActions.cpp | 16 + .../src/Parser/Actions/ParseFontActions.h | 10 + .../src/Parser/Actions/ParseGameActions.cpp | 75 + .../src/Parser/Actions/ParseGameActions.h | 28 + .../src/Parser/Actions/ParseIOActions.cpp | 42 + .../src/Parser/Actions/ParseIOActions.h | 18 + .../src/Parser/Actions/ParseImageActions.cpp | 85 + .../src/Parser/Actions/ParseImageActions.h | 22 + .../Parser/Actions/ParseInputTextActions.cpp | 13 + .../Parser/Actions/ParseInputTextActions.h | 10 + .../src/Parser/Actions/ParseLoadActions.cpp | 53 + .../src/Parser/Actions/ParseLoadActions.h | 14 + .../Actions/ParseLoadingScreenActions.cpp | 18 + .../Actions/ParseLoadingScreenActions.h | 12 + .../src/Parser/Actions/ParseMenuActions.cpp | 134 + .../src/Parser/Actions/ParseMenuActions.h | 28 + .../src/Parser/Actions/ParseMountActions.cpp | 29 + .../src/Parser/Actions/ParseMountActions.h | 14 + .../src/Parser/Actions/ParseMovieActions.cpp | 18 + .../src/Parser/Actions/ParseMovieActions.h | 12 + .../Parser/Actions/ParsePaletteActions.cpp | 35 + .../src/Parser/Actions/ParsePaletteActions.h | 14 + .../src/Parser/Actions/ParseRandomActions.cpp | 42 + .../src/Parser/Actions/ParseRandomActions.h | 12 + .../Parser/Actions/ParseResourceActions.cpp | 52 + .../src/Parser/Actions/ParseResourceActions.h | 18 + .../Parser/Actions/ParseScrollableActions.cpp | 15 + .../Parser/Actions/ParseScrollableActions.h | 10 + .../src/Parser/Actions/ParseShaderActions.cpp | 63 + .../src/Parser/Actions/ParseShaderActions.h | 22 + .../src/Parser/Actions/ParseSoundActions.cpp | 26 + .../src/Parser/Actions/ParseSoundActions.h | 12 + .../src/Parser/Actions/ParseTextActions.cpp | 93 + .../src/Parser/Actions/ParseTextActions.h | 18 + .../Parser/Actions/ParseVariableActions.cpp | 61 + .../src/Parser/Actions/ParseVariableActions.h | 18 + .../Parser/Actions/ParseVisibilityActions.cpp | 20 + .../Parser/Actions/ParseVisibilityActions.h | 12 + .../src/Parser/Drawables/ParseAnimation.cpp | 88 + .../Parser/{ => Drawables}/ParseAnimation.h | 3 - .../src/Parser/Drawables/ParseButton.cpp | 129 + .../src/Parser/Drawables/ParseButton.h | 26 + .../src/Parser/Drawables/ParseCircle.cpp | 49 + .../src/Parser/{ => Drawables}/ParseCircle.h | 5 - .../src/Parser/Drawables/ParseDrawable.cpp | 91 + .../src/Parser/Drawables/ParseDrawable.h | 31 + .../src/Parser/Drawables/ParseImage.cpp | 55 + .../src/Parser/Drawables/ParseImage.h | 67 + .../Parser/{ => Drawables}/ParseInputText.cpp | 50 +- .../Parser/{ => Drawables}/ParseInputText.h | 5 - .../{ => Drawables}/ParseLoadingScreen.cpp | 23 +- .../{ => Drawables}/ParseLoadingScreen.h | 0 .../src/Parser/Drawables/ParseMenu.cpp | 91 + .../src/Parser/Drawables/ParseMenu.h | 14 + .../src/Parser/Drawables/ParseMenuItem.cpp | 266 ++ .../ParseMenuItem.h} | 22 +- .../src/Parser/Drawables/ParseMovie.cpp | 63 + .../src/Parser/{ => Drawables}/ParseMovie.h | 8 +- .../src/Parser/Drawables/ParsePanel.cpp | 41 + .../src/Parser/{ => Drawables}/ParsePanel.h | 5 - .../src/Parser/Drawables/ParseRectangle.cpp | 49 + .../Parser/{ => Drawables}/ParseRectangle.h | 5 - .../src/Parser/Drawables/ParseScrollable.cpp | 58 + .../src/Parser/Drawables/ParseScrollable.h | 14 + .../src/Parser/Drawables/ParseShape.cpp | 47 + .../src/Parser/{ => Drawables}/ParseShape.h | 5 - .../src/Parser/Drawables/ParseText.cpp | 118 + .../src/Parser/Drawables/ParseText.h | 35 + DGEngine.core/src/Parser/Game/ParseGame.cpp | 104 + DGEngine.core/src/Parser/Game/ParseGame.h | 12 + .../src/Parser/{ => Game}/ParseIcon.cpp | 11 +- .../src/Parser/{ => Game}/ParseIcon.h | 0 .../src/Parser/Game/ParseSaveDir.cpp | 18 + DGEngine.core/src/Parser/Game/ParseSaveDir.h | 8 + DGEngine.core/src/Parser/ParseAction.cpp | 936 +---- DGEngine.core/src/Parser/ParseAction.h | 4 +- DGEngine.core/src/Parser/ParseAnimation.cpp | 135 - DGEngine.core/src/Parser/ParseButton.cpp | 211 - DGEngine.core/src/Parser/ParseButton.h | 23 - DGEngine.core/src/Parser/ParseCircle.cpp | 93 - DGEngine.core/src/Parser/ParseCommon.cpp | 66 + DGEngine.core/src/Parser/ParseCommon.h | 16 + DGEngine.core/src/Parser/ParseCondition.h | 18 - DGEngine.core/src/Parser/ParseCursor.cpp | 7 +- DGEngine.core/src/Parser/ParseCursor.h | 4 +- DGEngine.core/src/Parser/ParseEvent.cpp | 3 +- DGEngine.core/src/Parser/ParseFile.cpp | 497 +-- DGEngine.core/src/Parser/ParseFile.h | 20 +- DGEngine.core/src/Parser/ParseFileBytes.cpp | 64 - .../src/Parser/ParseGameInputEvent.cpp | 27 + .../src/Parser/ParseGameInputEvent.h | 10 + DGEngine.core/src/Parser/ParseImage.cpp | 135 - DGEngine.core/src/Parser/ParseImage.h | 19 - DGEngine.core/src/Parser/ParseInputEvent.cpp | 171 +- DGEngine.core/src/Parser/ParseInputEvent.h | 3 + DGEngine.core/src/Parser/ParseMenu.cpp | 362 -- DGEngine.core/src/Parser/ParseMenuButton.cpp | 115 - DGEngine.core/src/Parser/ParseMenuButton.h | 33 - DGEngine.core/src/Parser/ParseMountFile.cpp | 8 +- DGEngine.core/src/Parser/ParseMountFile.h | 2 +- DGEngine.core/src/Parser/ParseMovie.cpp | 121 - DGEngine.core/src/Parser/ParsePanel.cpp | 62 - DGEngine.core/src/Parser/ParsePredicate.cpp | 4 +- DGEngine.core/src/Parser/ParsePredicate.h | 2 +- DGEngine.core/src/Parser/ParseRectangle.cpp | 94 - DGEngine.core/src/Parser/ParseScrollable.cpp | 102 - DGEngine.core/src/Parser/ParseScrollable.h | 21 - DGEngine.core/src/Parser/ParseShape.cpp | 89 - DGEngine.core/src/Parser/ParseText.cpp | 155 - DGEngine.core/src/Parser/ParseText.h | 24 - DGEngine.core/src/Parser/ParseTexturePack.cpp | 639 --- DGEngine.core/src/Parser/ParseTexturePack.h | 49 - DGEngine.core/src/Parser/ParseVariable.cpp | 4 +- DGEngine.core/src/Parser/Parser.cpp | 6 +- .../src/Parser/{ => Resources}/ParseAudio.cpp | 9 +- .../src/Parser/{ => Resources}/ParseAudio.h | 4 +- .../{ => Resources}/ParseAudioCommon.cpp | 2 +- .../Parser/{ => Resources}/ParseAudioCommon.h | 0 .../src/Parser/Resources/ParseFileBytes.cpp | 42 + .../Parser/{ => Resources}/ParseFileBytes.h | 2 - .../src/Parser/{ => Resources}/ParseFont.cpp | 53 +- .../src/Parser/{ => Resources}/ParseFont.h | 2 - .../{ => Resources}/ParseImageContainer.cpp | 63 +- .../{ => Resources}/ParseImageContainer.h | 4 +- .../Parser/{ => Resources}/ParsePalette.cpp | 59 +- .../src/Parser/{ => Resources}/ParsePalette.h | 2 - .../src/Parser/Resources/ParseResource.h | 45 + .../Parser/{ => Resources}/ParseShader.cpp | 19 +- .../src/Parser/{ => Resources}/ParseShader.h | 0 .../src/Parser/{ => Resources}/ParseSound.cpp | 33 +- .../src/Parser/{ => Resources}/ParseSound.h | 6 +- .../Parser/{ => Resources}/ParseTexture.cpp | 59 +- .../src/Parser/{ => Resources}/ParseTexture.h | 4 +- .../src/Parser/Resources/ParseTexturePack.cpp | 17 + .../src/Parser/Resources/ParseTexturePack.h | 10 + .../TexturePacks/ParseBitmapFontTexturePack.h | 59 + .../TexturePacks/ParseCompositeTexturePack.h | 134 + .../ParseImageContainerTexturePack.cpp | 35 + .../ParseImageContainerTexturePack.h | 47 + .../ParseMultiTextureTexturePack.h | 58 + .../ParseSingleTextureTexturePack.cpp | 29 + .../ParseSingleTextureTexturePack.h | 68 + .../TexturePacks/ParseStackedTexturePack.h | 34 + .../ParseTexturePackAnimatedTextures.h | 45 + .../TexturePacks/ParseTexturePackIndexes.h | 63 + .../TexturePacks/ParseTexturePackRects.h | 80 + .../TexturePacks/ParseTexturePacks.cpp | 55 + .../TexturePacks/ParseTexturePacks.h | 100 + DGEngine.core/src/Parser/Utils/ParseUtils.cpp | 3 +- .../src/Parser/Utils/ParseUtilsKey.cpp | 145 +- .../src/Parser/Utils/ParseUtilsKey.h | 35 +- .../src/Parser/Utils/ParseUtilsVal.cpp | 97 +- .../src/Parser/Utils/ParseUtilsVal.h | 57 +- DGEngine.core/src/Queryable.h | 43 - .../src/{ => Resources}/AudioSource.h | 5 +- .../src/{ => Resources}/BitmapFont.cpp | 12 +- .../src/{ => Resources}/BitmapFont.h | 5 +- .../src/{ => Resources}/CachedImagePack.cpp | 0 .../src/{ => Resources}/CachedImagePack.h | 8 +- DGEngine.core/src/{ => Resources}/FileBytes.h | 2 +- DGEngine.core/src/Resources/Font.h | 19 + .../src/{ => Resources}/FreeTypeFont.h | 0 .../ImageContainer.h | 6 +- .../ImageContainers/SimpleImageContainer.cpp | 2 +- .../ImageContainers/SimpleImageContainer.h | 2 +- DGEngine.core/src/{ => Resources}/Palette.cpp | 6 +- DGEngine.core/src/{ => Resources}/Palette.h | 10 +- DGEngine.core/src/Resources/Shader.cpp | 24 + DGEngine.core/src/{ => Resources}/Shader.h | 3 + .../TexturePack.cpp | 10 +- .../{TexturePacks => Resources}/TexturePack.h | 17 +- .../TexturePacks/BitmapFontTexturePack.cpp | 12 +- .../TexturePacks/BitmapFontTexturePack.h | 6 +- .../TexturePacks/CompositeTexturePack.cpp | 8 +- .../TexturePacks/CompositeTexturePack.h | 9 +- .../ImageContainerTexturePack.cpp | 90 + .../TexturePacks/ImageContainerTexturePack.h | 37 + .../TexturePacks/IndexedTexturePack.cpp | 9 +- .../TexturePacks/IndexedTexturePack.h | 13 +- .../MultiImageContainerTexturePack.cpp | 132 + .../MultiImageContainerTexturePack.h | 39 + .../TexturePacks/MultiTexturePack.cpp | 148 + .../Resources/TexturePacks/MultiTexturePack.h | 40 + .../TexturePacks/RectTexturePack.cpp | 12 +- .../TexturePacks/RectTexturePack.h | 10 +- .../TexturePacks/SimpleTexturePack.cpp | 43 + .../TexturePacks/SimpleTexturePack.h | 14 + .../TexturePacks/SingleTexturePack.cpp | 87 + .../TexturePacks/SingleTexturePack.h | 34 + .../TexturePacks/StackedTexturePack.cpp | 10 +- .../TexturePacks/StackedTexturePack.h | 5 +- .../TexturePacks/TexturePackGroup.cpp | 101 + .../Resources/TexturePacks/TexturePackGroup.h | 27 + DGEngine.core/src/SFML/CompositeSprite.h | 24 +- DGEngine.core/src/SFML/Music2.cpp | 100 +- DGEngine.core/src/SFML/Music2.h | 12 +- DGEngine.core/src/SFML/MusicLoops.cpp | 29 +- DGEngine.core/src/SFML/PhysFSStream.h | 7 +- DGEngine.core/src/SFML/SFMLUtils.h | 2 +- DGEngine.core/src/SFML/Sprite2.cpp | 2 +- DGEngine.core/src/SFML/Sprite2.h | 16 +- DGEngine.core/src/SFML/Surface.cpp | 24 +- DGEngine.core/src/SFML/Surface.h | 9 +- DGEngine.core/src/SFML/Text2.cpp | 4 +- DGEngine.core/src/SFML/Text2.h | 2 +- DGEngine.core/src/SFML/VertexArray2.cpp | 2 +- DGEngine.core/src/SFML/VertexArray2.h | 4 +- DGEngine.core/src/SFML/VertexShape.h | 2 +- DGEngine.core/src/SFML/View2.cpp | 6 +- DGEngine.core/src/SFML/View2.h | 16 +- DGEngine.core/src/SFML/dr_wav.h | 3650 +++++++++++++---- DGEngine.core/src/SFML/sfeMovie/AVFunc.cpp | 201 + DGEngine.core/src/SFML/sfeMovie/AVFunc.hpp | 118 + .../src/{ => SFML}/sfeMovie/AudioStream.cpp | 71 +- .../src/{ => SFML}/sfeMovie/AudioStream.hpp | 0 .../src/{ => SFML}/sfeMovie/Demuxer.cpp | 40 +- .../src/{ => SFML}/sfeMovie/Demuxer.hpp | 16 +- .../src/{ => SFML}/sfeMovie/Movie.cpp | 0 .../src/{ => SFML}/sfeMovie/Movie.hpp | 0 .../src/{ => SFML}/sfeMovie/MovieImpl.cpp | 16 +- .../src/{ => SFML}/sfeMovie/MovieImpl.hpp | 1 + .../src/{ => SFML}/sfeMovie/Stream.cpp | 33 +- .../src/{ => SFML}/sfeMovie/Stream.hpp | 0 .../{ => SFML}/sfeMovie/StreamSelection.hpp | 0 .../src/{ => SFML}/sfeMovie/Timer.cpp | 0 .../src/{ => SFML}/sfeMovie/Timer.hpp | 0 .../{ => SFML}/sfeMovie/TimerPriorities.hpp | 0 .../src/{ => SFML}/sfeMovie/VideoStream.cpp | 33 +- .../src/{ => SFML}/sfeMovie/VideoStream.hpp | 0 DGEngine.core/src/StreamReader.h | 8 - .../src/TexturePacks/CachedTexturePack.cpp | 218 - .../src/TexturePacks/CachedTexturePack.h | 65 - .../src/TexturePacks/SimpleTexturePack.cpp | 375 -- .../src/TexturePacks/SimpleTexturePack.h | 93 - DGEngine.core/src/UIObject.cpp | 40 - DGEngine.core/src/Utils/EasedValue.h | 4 +- DGEngine.core/src/Utils/ElapsedTime.h | 4 +- DGEngine.core/src/Utils/FixedArray.h | 35 +- DGEngine.core/src/Utils/FixedMap.h | 37 +- DGEngine.core/src/Utils/LoadLibrary.cpp | 33 + DGEngine.core/src/Utils/LoadLibrary.h | 8 + DGEngine.core/src/Utils/NumberVector.h | 4 +- DGEngine.core/src/Utils/PairXY.h | 14 +- DGEngine.core/src/Utils/Random.cpp | 4 + DGEngine.core/src/Utils/Random.h | 107 + DGEngine.core/src/Utils/StreamReader.h | 8 + DGEngine.core/src/Utils/StringHash.cpp | 21 + DGEngine.core/src/Utils/StringHash.h | 64 + DGEngine.core/src/Utils/UnorderedStringMap.h | 18 - DGEngine.core/src/Utils/Utils.cpp | 6 +- DGEngine.core/src/Utils/Utils.h | 150 +- DGEngine.core/src/Utils/Vector2D.h | 20 +- .../src/{ => Utils}/endian/big_endian.hpp | 26 +- .../src/{ => Utils}/endian/detail/big.hpp | 30 +- .../src/{ => Utils}/endian/detail/helpers.hpp | 26 +- .../src/{ => Utils}/endian/detail/little.hpp | 30 +- .../src/{ => Utils}/endian/detail/stream.hpp | 30 +- .../src/{ => Utils}/endian/is_big_endian.hpp | 0 .../src/{ => Utils}/endian/little_endian.hpp | 24 +- DGEngine.core/src/Utils/endian/network.hpp | 21 + .../src/{ => Utils}/endian/stream_reader.hpp | 36 +- .../src/{ => Utils}/endian/stream_writer.hpp | 25 +- DGEngine.core/src/Utils/re.c | 2 +- DGEngine.core/src/VarOrPredicate.h | 10 - DGEngine.core/src/Variable.cpp | 81 - DGEngine.core/src/Variable.h | 15 - DGEngine.core/src/rapidjson/allocators.h | 520 ++- .../src/rapidjson/cursorstreamwrapper.h | 2 +- DGEngine.core/src/rapidjson/document.h | 569 ++- DGEngine.core/src/rapidjson/encodedstream.h | 2 +- DGEngine.core/src/rapidjson/encodings.h | 2 +- DGEngine.core/src/rapidjson/error/en.h | 50 +- DGEngine.core/src/rapidjson/error/error.h | 57 +- DGEngine.core/src/rapidjson/filereadstream.h | 2 +- DGEngine.core/src/rapidjson/filewritestream.h | 2 +- DGEngine.core/src/rapidjson/fwd.h | 4 +- .../src/rapidjson/internal/biginteger.h | 23 +- DGEngine.core/src/rapidjson/internal/clzll.h | 71 + DGEngine.core/src/rapidjson/internal/diyfp.h | 24 +- DGEngine.core/src/rapidjson/internal/dtoa.h | 12 +- .../src/rapidjson/internal/ieee754.h | 2 +- DGEngine.core/src/rapidjson/internal/itoa.h | 2 +- DGEngine.core/src/rapidjson/internal/meta.h | 2 +- DGEngine.core/src/rapidjson/internal/pow10.h | 2 +- DGEngine.core/src/rapidjson/internal/regex.h | 9 +- DGEngine.core/src/rapidjson/internal/stack.h | 2 +- .../src/rapidjson/internal/strfunc.h | 16 +- DGEngine.core/src/rapidjson/internal/strtod.h | 17 +- DGEngine.core/src/rapidjson/internal/swap.h | 2 +- DGEngine.core/src/rapidjson/istreamwrapper.h | 2 +- DGEngine.core/src/rapidjson/memorybuffer.h | 2 +- DGEngine.core/src/rapidjson/memorystream.h | 2 +- DGEngine.core/src/rapidjson/ostreamwrapper.h | 2 +- DGEngine.core/src/rapidjson/pointer.h | 89 +- DGEngine.core/src/rapidjson/prettywriter.h | 4 +- DGEngine.core/src/rapidjson/rapidjson.h | 106 +- DGEngine.core/src/rapidjson/reader.h | 118 +- DGEngine.core/src/rapidjson/schema.h | 857 ++-- DGEngine.core/src/rapidjson/stream.h | 2 +- DGEngine.core/src/rapidjson/stringbuffer.h | 2 +- DGEngine.core/src/rapidjson/uri.h | 500 +++ DGEngine.core/src/rapidjson/writer.h | 17 +- DGEngine.core/vcpkg/ports/sfml/portfile.cmake | 56 + DGEngine.core/vcpkg/ports/sfml/usage | 7 + DGEngine.core/vcpkg/ports/sfml/vcpkg.json | 24 + DGEngine.sln | 111 - DGEngine.vcxproj | 919 ----- README.md | 9 +- cmake_modules/FindSFML.cmake | 368 -- gamefilesd/lang/en/main.json | 13 +- gamefilesd/level/keys.json | 10 +- gamefilesd/level/map/town/items.json | 2 +- gamefilesd/main.json | 26 +- gamefilesd/res/actions.json | 32 + gamefilesd/res/icon.png | Bin 0 -> 618 bytes gamefilesd/res/level/actions/basePanel.json | 9 +- gamefilesd/res/level/actions/msgBox.json | 2 +- .../res/level/actions/showAllSpells.json | 603 +-- gamefilesd/towners/adria/buy/listItems.json | 16 +- gamefilesd/towners/adria/panel.json | 26 +- .../towners/adria/recharge/listItems.json | 16 +- gamefilesd/towners/adria/sell/listItems.json | 16 +- .../towners/cain/identify/listItems.json | 16 +- gamefilesd/towners/cain/panel.json | 26 +- gamefilesd/towners/common/loadPanel.json | 27 + .../towners/common/loadScrollbarPanel.json | 7 + gamefilesd/towners/common/loadTabKeys.json | 12 + gamefilesd/towners/farnham/panel.json | 26 +- gamefilesd/towners/gillian/panel.json | 26 +- .../towners/griswold/buy/listItems.json | 16 +- .../griswold/buyPremium/listItems.json | 16 +- gamefilesd/towners/griswold/panel.json | 26 +- .../towners/griswold/repair/listItems.json | 16 +- .../towners/griswold/sell/listItems.json | 16 +- gamefilesd/towners/ogden/panel.json | 26 +- gamefilesd/towners/pepin/buy/listItems.json | 16 +- gamefilesd/towners/pepin/panel.json | 26 +- gamefilesd/towners/wirt/buy/listItems.json | 12 +- gamefilesd/towners/wirt/panel.json | 26 +- gamefilesd/ui/credits.json | 2 +- gamefilesd/ui/dataMissing.json | 2 +- gamefilesd/ui/gameInfo.json | 13 +- gamefilesd/ui/gameInputEvents.json | 39 + gamefilesd/ui/inputEvents.json | 6 + gamefilesd/ui/intro.json | 2 +- gamefilesd/ui/level/char/disableKeys.json | 47 +- gamefilesd/ui/level/char/panel.json | 62 +- gamefilesd/ui/level/char/panelQuests.json | 11 +- gamefilesd/ui/level/char/removeGold.json | 4 +- gamefilesd/ui/level/gameSettings.json | 8 - gamefilesd/ui/level/menu/common.json | 13 +- gamefilesd/ui/level/menu/game.json | 4 +- gamefilesd/ui/level/menu/game2.json | 18 +- gamefilesd/ui/level/saveSettings.json | 11 - gamefilesd/ui/level/settingsFile.json | 8 + gamefilesd/ui/level/showText.json | 2 +- gamefilesd/ui/loadMain.json | 9 +- gamefilesd/ui/mainMenu.json | 21 +- gamefilesd/ui/mods.json | 4 +- gamefilesd/ui/playVideo.json | 2 +- gamefilesd/ui/saveSettings.json | 8 - gamefilesd/ui/settings.json | 505 +-- gamefilesd/ui/settingsFile.json | 16 +- gamefilesd/ui/settingsShaders.json | 13 +- gamefilesd/ui/singlePlayer/delete.json | 4 +- gamefilesd/ui/singlePlayer/main.json | 4 +- gamefilesd/ui/singlePlayer/newName.json | 4 + gamefilesd/ui/singlePlayer/newNameExists.json | 4 +- .../ui/singlePlayer/newNameTooShort.json | 2 +- gamefilesd/ui/singlePlayer/select.json | 24 +- gamefilesd/ui/splashScreen.json | 2 +- gamefilesd2/level/loadFull.json | 2 +- gamefilesd2/level/newGame.json | 2 +- gamefilesd2/main.json | 28 +- gamefilesd2/res/fonts.json | 30 +- gamefilesd2/res/icon.png | Bin 0 -> 562 bytes gamefilesd2/ui/cinematics.json | 2 +- gamefilesd2/ui/credits.json | 9 +- gamefilesd2/ui/credits_stringFont.json | 9 +- gamefilesd2/ui/mainMenu.json | 17 +- gamefilesd2/ui/mainMenuBase.json | 4 +- gamefilesd2/ui/singlePlayer/delete.json | 4 +- gamefilesd2/ui/singlePlayer/main.json | 6 +- .../ui/singlePlayer/newNameExists.json | 4 +- .../ui/singlePlayer/newNameTooShort.json | 2 +- gamefilesd2/ui/singlePlayer/select.json | 14 +- gamefilesd2/ui/splashScreen.json | 2 +- gamefilesdex/level/item/potions.json | 129 + gamefilesdex/level/item/scrolls.json | 201 + gamefilesdex/level/map/town/items.json | 141 + gamefilesdex/level/player/Rogue/defaults.json | 51 + .../level/player/Sorceror/defaults.json | 52 + .../level/player/Warrior/defaults.json | 66 + gamefilesdex/main.json | 28 +- gamefilesdex/res/level/actions/basePanel.json | 9 +- gamefilesdex/ui/level/char/panel.json | 62 +- gamefilesdex/ui/mainMenu.json | 21 +- gamefilesflare/main.json | 28 +- gamefilesflare/ui/credits.json | 9 +- gamefilesflare/ui/level/char/panel.json | 59 +- gamefilesflare/ui/level/menu/common.json | 13 +- gamefilesflare/ui/level/menu/game2.json | 18 +- gamefilesflare/ui/loadMain.json | 9 +- gamefilesflare/ui/mainMenu.json | 19 +- gamefilesflare/ui/singlePlayer/main.json | 4 +- gamefilesflare/ui/singlePlayer/select.json | 24 +- gamefileshf/main.json | 26 +- gamefileshf/res/icon.png | Bin 0 -> 655 bytes .../res/level/actions/showAllSpells.json | 663 +-- gamefileshf/ui/betaNotSupported.json | 2 +- gamefileshf/ui/level/menu/common.json | 13 +- gamefileshf/ui/level/menu/game.json | 4 +- gamefileshf/ui/level/menu/game2.json | 22 +- gamefileshf/ui/mainMenu.json | 19 +- gamefileshf/ui/singlePlayer/main.json | 4 +- gamefileshf/ui/splashScreen.json | 2 +- gamefileshf/ui/support.json | 2 +- launch.vs.json | 53 + pkg/linux/dgengine.desktop | 10 + pkg/linux/icon.png | Bin 0 -> 618 bytes src/{ => Game}/Actions/ActItem.h | 21 +- src/{ => Game}/Actions/ActLevel.h | 31 +- src/{ => Game}/Actions/ActLevelObject.h | 17 +- src/{ => Game}/Actions/ActPlayer.h | 19 +- src/{ => Game}/Actions/ActQuest.h | 7 +- src/Game/Classifier.h | 6 +- src/Game/Classifiers.h | 3 +- src/{ => Game}/Game2.cpp | 13 +- src/{ => Game}/Game2.h | 7 +- src/Game/GameHashes.h | 2 +- src/Game/GameProperties.h | 94 - src/Game/{ => Inventory}/Inventories.h | 22 +- src/Game/{ => Inventory}/Inventory.cpp | 55 +- src/Game/{ => Inventory}/Inventory.h | 43 +- src/Game/Item.cpp | 680 --- src/Game/Item.h | 144 - src/Game/Item/Item.cpp | 352 ++ src/Game/Item/Item.h | 116 + src/Game/{ => Item}/ItemClass.cpp | 11 +- src/Game/{ => Item}/ItemClass.h | 63 +- src/Game/Item/ItemLevelObject.cpp | 339 ++ src/Game/Item/ItemLevelObject.h | 43 + src/Game/{ => Item}/ItemLocation.h | 11 +- .../{Save/SaveItem.cpp => Item/ItemSave.cpp} | 9 +- src/Game/Item/ItemSave.h | 14 + src/Game/Level.cpp | 963 ----- src/Game/{ => Level}/FlagsVector.h | 0 src/Game/Level/Level.cpp | 334 ++ src/Game/{ => Level}/Level.h | 51 +- src/Game/Level/LevelBase.cpp | 364 ++ src/Game/Level/LevelBase.h | 218 + src/Game/{ => Level}/LevelCell.cpp | 0 src/Game/{ => Level}/LevelCell.h | 35 +- src/Game/Level/LevelDraw.cpp | 190 + src/Game/Level/LevelDraw.h | 13 + src/Game/Level/LevelDrawable.h | 17 + src/Game/Level/LevelDrawableManager.cpp | 116 + src/Game/Level/LevelDrawableManager.h | 40 + src/Game/{ => Level}/LevelFlags.h | 0 src/Game/{ => Level}/LevelHelper.cpp | 10 +- src/Game/{ => Level}/LevelHelper.h | 8 +- src/Game/Level/LevelInputManager.cpp | 150 + src/Game/Level/LevelInputManager.h | 27 + src/Game/Level/LevelItem.cpp | 219 + src/Game/Level/LevelItem.h | 36 + src/Game/Level/LevelLayer.h | 38 + .../LevelLayers}/ColorLevelLayer.cpp | 2 +- .../{ => Level/LevelLayers}/ColorLevelLayer.h | 0 .../LevelLayers}/TextureLevelLayer.cpp | 2 +- .../LevelLayers}/TextureLevelLayer.h | 3 +- .../LevelLayers}/TilesetLevelLayer.cpp | 10 +- .../LevelLayers}/TilesetLevelLayer.h | 4 +- src/Game/{ => Level}/LevelMap.cpp | 12 +- src/Game/{ => Level}/LevelMap.h | 110 +- src/Game/Level/LevelObjectManager.cpp | 179 + src/Game/Level/LevelObjectManager.h | 232 ++ src/Game/Level/LevelQuest.cpp | 50 + src/Game/Level/LevelQuest.h | 20 + .../SaveLevel.cpp => Level/LevelSave.cpp} | 36 +- src/Game/Level/LevelSave.h | 17 + src/Game/{ => Level}/LevelSurface.cpp | 5 +- src/Game/{ => Level}/LevelSurface.h | 2 + src/Game/Level/LevelUIObject.cpp | 256 ++ src/Game/Level/LevelUIObject.h | 22 + src/Game/{ => Level}/PathFinder.cpp | 0 src/Game/{ => Level}/PathFinder.h | 7 +- src/Game/{ => Level}/fsa.h | 0 src/Game/{ => Level}/stlastar.h | 0 src/Game/LevelBase.cpp | 780 ---- src/Game/LevelBase.h | 426 -- src/Game/LevelLayer.h | 32 - src/Game/{ => LevelObject}/LevelObject.cpp | 63 +- src/Game/{ => LevelObject}/LevelObject.h | 84 +- .../{ => LevelObject}/LevelObjectClass.cpp | 9 +- src/Game/{ => LevelObject}/LevelObjectClass.h | 29 +- .../LevelObjectClassDefaults.h | 4 +- src/Game/LevelObject/LevelObjectQueryable.cpp | 24 + src/Game/LevelObject/LevelObjectQueryable.h | 16 + src/Game/Player.h | 25 - src/Game/{ => Player}/Player.cpp | 19 +- src/Game/Player/Player.h | 18 + src/Game/Player/PlayerBase.cpp | 386 ++ src/Game/Player/PlayerBase.h | 230 ++ src/Game/{ => Player}/PlayerClass.cpp | 7 +- src/Game/{ => Player}/PlayerClass.h | 56 +- src/Game/Player/PlayerInventories.cpp | 155 + src/Game/Player/PlayerInventories.h | 65 + src/Game/Player/PlayerLevelObject.cpp | 398 ++ src/Game/Player/PlayerLevelObject.h | 29 + src/Game/Player/PlayerMove.cpp | 190 + src/Game/Player/PlayerMove.h | 25 + src/Game/Player/PlayerProperties.cpp | 454 ++ src/Game/Player/PlayerProperties.h | 87 + .../SavePlayer.cpp => Player/PlayerSave.cpp} | 25 +- src/Game/Player/PlayerSave.h | 13 + src/Game/Player/PlayerSpells.cpp | 43 + src/Game/Player/PlayerSpells.h | 33 + src/Game/PlayerBase.cpp | 1468 ------- src/Game/PlayerBase.h | 350 -- src/{ => Game}/Predicates/PredItem.h | 6 +- src/{ => Game}/Predicates/PredLevelObject.h | 10 +- src/{ => Game}/Predicates/PredPlayer.h | 10 +- src/Game/Properties/AnimationSpeed.h | 12 + src/Game/Properties/InventoryPosition.h | 12 + src/Game/Properties/LevelObjValue.h | 7 + src/Game/Properties/PlayerAnimation.h | 24 + .../PlayerDirection.cpp} | 2 +- src/Game/Properties/PlayerDirection.h | 20 + src/Game/Properties/PlayerInventory.h | 11 + src/Game/Properties/PlayerItemMount.h | 15 + src/Game/Properties/PlayerStatus.h | 12 + src/Game/{ => Quest}/Quest.cpp | 2 +- src/Game/{ => Quest}/Quest.h | 8 +- src/Game/Save/SaveItem.h | 14 - src/Game/Save/SaveLevel.h | 16 - src/Game/Save/SavePlayer.h | 13 - src/Game/Save/SaveSimpleLevelObject.h | 13 - src/{ => Game}/ShaderManager2.cpp | 2 +- src/{ => Game}/ShaderManager2.h | 2 +- src/Game/SimpleLevelObject.cpp | 194 - src/Game/SimpleLevelObject.h | 90 - .../SimpleLevelObject/SimpleLevelObject.cpp | 107 + .../SimpleLevelObject/SimpleLevelObject.h | 66 + .../SimpleLevelObjectClass.h | 31 +- .../SimpleLevelObjectLevelObject.cpp | 88 + .../SimpleLevelObjectLevelObject.h | 15 + .../SimpleLevelObjectSave.cpp} | 12 +- .../SimpleLevelObject/SimpleLevelObjectSave.h | 13 + src/Game/Spell.h | 170 - src/Game/{ => Spell}/Spell.cpp | 128 +- src/Game/Spell/Spell.h | 121 + src/Game/Spell/SpellInstance.cpp | 73 + src/Game/Spell/SpellInstance.h | 23 + src/{ => Game/Utils}/CmdLineUtils2.cpp | 7 +- src/{ => Game/Utils}/CmdLineUtils2.h | 0 src/{ => Game/Utils}/GameUtils2.cpp | 1 + src/Game/Utils/GameUtils2.h | 28 + src/GameUtils2.h | 29 - src/Main.cpp | 6 +- src/Parser/Actions/ParseItemActions.cpp | 114 + src/Parser/Actions/ParseItemActions.h | 30 + src/Parser/Actions/ParseLevelActions.cpp | 197 + src/Parser/Actions/ParseLevelActions.h | 56 + .../Actions/ParseLevelObjectActions.cpp | 46 + src/Parser/Actions/ParseLevelObjectActions.h | 18 + src/Parser/Actions/ParsePlayerActions.cpp | 128 + src/Parser/Actions/ParsePlayerActions.h | 32 + src/Parser/Actions/ParseQuestActions.cpp | 42 + src/Parser/Actions/ParseQuestActions.h | 14 + .../{ => Classifier}/ParseClassifier.cpp | 6 +- src/Parser/{ => Classifier}/ParseClassifier.h | 0 src/Parser/{ => Drawables}/ParsePanel2.cpp | 22 +- src/Parser/{ => Drawables}/ParsePanel2.h | 0 src/Parser/{ => Item}/ParseItem.cpp | 33 +- src/Parser/{ => Item}/ParseItem.h | 4 +- src/Parser/{ => Item}/ParseItemClass.cpp | 110 +- src/Parser/{ => Item}/ParseItemClass.h | 0 src/Parser/Level/ParseLevel.cpp | 147 + src/Parser/{ => Level}/ParseLevel.h | 3 +- src/Parser/Level/ParseLevelAutoMap.cpp | 69 + src/Parser/Level/ParseLevelAutoMap.h | 11 + src/Parser/Level/ParseLevelLayer.cpp | 138 + src/Parser/Level/ParseLevelLayer.h | 20 + src/Parser/Level/ParseLevelMap.cpp | 236 ++ src/Parser/Level/ParseLevelMap.h | 11 + .../{ => LevelObject}/ParseLevelObject.cpp | 32 +- .../{ => LevelObject}/ParseLevelObject.h | 0 .../ParseLevelObjectClass.cpp | 85 +- .../{ => LevelObject}/ParseLevelObjectClass.h | 0 .../ParseLevelObjectClassCommon.cpp | 38 + .../LevelObject/ParseLevelObjectClassCommon.h | 109 + .../LevelObject/ParseLevelObjectCommon.cpp | 34 + .../LevelObject/ParseLevelObjectCommon.h | 11 + src/Parser/ParseAction2.cpp | 332 +- src/Parser/ParseAction2.h | 2 +- src/Parser/ParseFile2.cpp | 170 +- src/Parser/ParseLevel.cpp | 567 --- src/Parser/ParsePlayer.cpp | 288 -- src/Parser/ParsePredicate2.cpp | 6 +- src/Parser/ParsePredicate2.h | 2 +- src/Parser/ParseSpell.cpp | 172 - src/Parser/ParseTexturePack2.cpp | 501 --- src/Parser/Player/ParsePlayer.cpp | 101 + src/Parser/{ => Player}/ParsePlayer.h | 0 src/Parser/{ => Player}/ParsePlayerClass.cpp | 111 +- src/Parser/{ => Player}/ParsePlayerClass.h | 0 src/Parser/Player/ParsePlayerInventories.cpp | 155 + src/Parser/Player/ParsePlayerInventories.h | 11 + src/Parser/Player/ParsePlayerSpells.cpp | 49 + src/Parser/Player/ParsePlayerSpells.h | 11 + src/Parser/{ => Quest}/ParseQuest.cpp | 11 +- src/Parser/{ => Quest}/ParseQuest.h | 2 +- .../{ => Resources}/ParseImageContainer2.cpp | 14 +- .../{ => Resources}/ParseImageContainer2.h | 2 +- src/Parser/{ => Resources}/ParseTexture2.cpp | 10 +- src/Parser/{ => Resources}/ParseTexture2.h | 0 src/Parser/Resources/ParseTexturePack2.cpp | 137 + .../{ => Resources}/ParseTexturePack2.h | 0 .../ParseCompositeTexturePack2.cpp | 56 + .../TexturePacks/ParseCompositeTexturePack2.h | 12 + .../ParseImageContainerTexturePack2.cpp | 121 + .../ParseImageContainerTexturePack2.h | 12 + src/Parser/Spell/ParseSpell.cpp | 114 + src/Parser/{ => Spell}/ParseSpell.h | 0 src/Parser/Utils/ParseUtilsGameKey.cpp | 59 +- src/Parser/Utils/ParseUtilsGameKey.h | 10 +- src/Parser/Utils/ParseUtilsGameVal.cpp | 6 +- src/Parser/Utils/ParseUtilsGameVal.h | 15 +- src/PhysFSArchiverMPQ.cpp | 31 +- src/RegisterHooks.cpp | 8 +- src/{ => Resources}/DS1.cpp | 1 - src/{ => Resources}/DS1.h | 4 +- src/{ => Resources}/Dun.cpp | 2 +- src/{ => Resources}/Dun.h | 0 .../ImageContainers/CELImageContainer.cpp | 2 +- .../ImageContainers/CELImageContainer.h | 4 +- .../ImageContainers/CL2ImageContainer.cpp | 2 +- .../ImageContainers/CL2ImageContainer.h | 4 +- .../ImageContainers/DC6ImageContainer.cpp | 2 +- .../ImageContainers/DC6ImageContainer.h | 4 +- .../ImageContainers/DCCImageContainer.cpp | 2 +- .../ImageContainers/DCCImageContainer.h | 4 +- .../ImageContainers/DT1ImageContainer.cpp | 0 .../ImageContainers/DT1ImageContainer.h | 15 +- src/{ => Resources}/Min.cpp | 2 +- src/{ => Resources}/Min.h | 4 +- src/{ => Resources}/Pcx.cpp | 2 +- src/{ => Resources}/Pcx.h | 0 .../TexturePacks/CompositeTexturePack2.cpp | 2 +- .../TexturePacks/CompositeTexturePack2.h | 2 +- .../ImageContainerTexturePack2.cpp | 90 + .../TexturePacks/ImageContainerTexturePack2.h | 22 + .../TexturePacks/IndexedTexturePack2.cpp | 0 .../TexturePacks/IndexedTexturePack2.h | 4 +- .../MultiImageContainerTexturePack2.cpp | 74 + .../MultiImageContainerTexturePack2.h | 18 + .../TexturePacks/StackedTexturePack2.cpp | 0 .../TexturePacks/StackedTexturePack2.h | 4 +- src/{TileSet.h => Resources/TileBlock.h} | 27 +- src/{ => Resources}/TileSet.cpp | 2 +- src/Resources/TileSet.h | 19 + src/SFML/GradientCircle.h | 10 +- src/TexturePacks/CachedTexturePack2.cpp | 159 - src/TexturePacks/CachedTexturePack2.h | 34 - .../src => src}/Utils/iterator_tpl.h | 112 +- vcpkg/triplets/x64-windows-static.cmake | 7 - vcpkg/triplets/x86-windows-static.cmake | 7 - 895 files changed, 32431 insertions(+), 22917 deletions(-) create mode 100644 .github/workflows/deploy_linux.yml create mode 100644 .github/workflows/deploy_windows.yml create mode 100644 CMakePresets.json create mode 100644 DGEngine.core/CMakePresets.json delete mode 100644 DGEngine.core/DGEngine.core.vcxproj delete mode 100644 DGEngine.core/cmake_modules/FindSFML.cmake create mode 100644 DGEngine.core/docs/actions/readme.md create mode 100644 DGEngine.core/docs/configuration-files.md create mode 100644 DGEngine.core/docs/drawables/animation.md create mode 100644 DGEngine.core/docs/drawables/button.md create mode 100644 DGEngine.core/docs/drawables/circle.md create mode 100644 DGEngine.core/docs/drawables/game.md create mode 100644 DGEngine.core/docs/drawables/image.md create mode 100644 DGEngine.core/docs/drawables/inputText.md create mode 100644 DGEngine.core/docs/drawables/loadingScreen.md create mode 100644 DGEngine.core/docs/drawables/menu.md create mode 100644 DGEngine.core/docs/drawables/movie.md create mode 100644 DGEngine.core/docs/drawables/panel.md create mode 100644 DGEngine.core/docs/drawables/readme.md create mode 100644 DGEngine.core/docs/drawables/rectangle.md create mode 100644 DGEngine.core/docs/drawables/scrollable.md create mode 100644 DGEngine.core/docs/drawables/shape.md create mode 100644 DGEngine.core/docs/drawables/text.md create mode 100644 DGEngine.core/docs/img/circle-1.png create mode 100644 DGEngine.core/docs/img/circle-2.png create mode 100644 DGEngine.core/docs/img/circle-3.png create mode 100644 DGEngine.core/docs/img/circle-4.png create mode 100644 DGEngine.core/docs/img/image-1.png create mode 100644 DGEngine.core/docs/img/image-2.png create mode 100644 DGEngine.core/docs/img/image-3.png create mode 100644 DGEngine.core/docs/img/image-4.png create mode 100644 DGEngine.core/docs/img/rectangle-1.png create mode 100644 DGEngine.core/docs/img/rectangle-2.png create mode 100644 DGEngine.core/docs/img/rectangle-3.png create mode 100644 DGEngine.core/docs/img/rectangle-4.png create mode 100644 DGEngine.core/docs/img/shape-1.png create mode 100644 DGEngine.core/docs/img/shape-2.png create mode 100644 DGEngine.core/docs/img/shape-3.png create mode 100644 DGEngine.core/docs/img/shape-4.png create mode 100644 DGEngine.core/docs/img/shape-5.png create mode 100644 DGEngine.core/docs/img/shape-6.png create mode 100644 DGEngine.core/docs/img/shape-7.png create mode 100644 DGEngine.core/docs/readme.md create mode 100644 DGEngine.core/docs/resources/audio.md create mode 100644 DGEngine.core/docs/resources/file.md create mode 100644 DGEngine.core/docs/resources/font.md create mode 100644 DGEngine.core/docs/resources/gameInputEvent.md create mode 100644 DGEngine.core/docs/resources/imageContainer.md create mode 100644 DGEngine.core/docs/resources/inputEvent.md create mode 100644 DGEngine.core/docs/resources/load.md create mode 100644 DGEngine.core/docs/resources/mountFile.md create mode 100644 DGEngine.core/docs/resources/palette.md create mode 100644 DGEngine.core/docs/resources/readme.md create mode 100644 DGEngine.core/docs/resources/shader.md create mode 100644 DGEngine.core/docs/resources/sound.md create mode 100644 DGEngine.core/docs/resources/texture.md create mode 100644 DGEngine.core/docs/resources/texturePack.md create mode 100644 DGEngine.core/docs/resources/variable.md delete mode 100644 DGEngine.core/src/EventManager.h delete mode 100644 DGEngine.core/src/Font.h rename DGEngine.core/src/{Actions => Game}/Action.h (100%) create mode 100644 DGEngine.core/src/Game/ActionQueryable.h rename DGEngine.core/src/{ => Game}/Actions/ActAction.h (89%) rename DGEngine.core/src/{ => Game}/Actions/ActAnimation.h (96%) rename DGEngine.core/src/{ => Game}/Actions/ActAudio.h (98%) rename DGEngine.core/src/{ => Game}/Actions/ActButton.h (94%) rename DGEngine.core/src/{ => Game}/Actions/ActCondition.h (95%) rename DGEngine.core/src/{ => Game}/Actions/ActCursor.h (97%) rename DGEngine.core/src/{ => Game}/Actions/ActDrawable.h (98%) rename DGEngine.core/src/{ => Game}/Actions/ActEvent.h (85%) rename DGEngine.core/src/{ => Game}/Actions/ActFade.h (90%) rename DGEngine.core/src/{ => Game}/Actions/ActFocus.h (90%) rename DGEngine.core/src/{ => Game}/Actions/ActFont.h (92%) rename DGEngine.core/src/{ => Game}/Actions/ActGame.h (92%) rename DGEngine.core/src/{ => Game}/Actions/ActIO.h (95%) rename DGEngine.core/src/{ => Game}/Actions/ActImage.h (92%) rename DGEngine.core/src/{ => Game}/Actions/ActInputText.h (79%) rename DGEngine.core/src/{ => Game}/Actions/ActLoad.h (92%) rename DGEngine.core/src/{ => Game}/Actions/ActLoadingScreen.h (79%) rename DGEngine.core/src/{ => Game}/Actions/ActMenu.h (95%) rename DGEngine.core/src/{ => Game}/Actions/ActMount.h (88%) rename DGEngine.core/src/{ => Game}/Actions/ActMovie.h (87%) rename DGEngine.core/src/{ => Game}/Actions/ActPalette.h (97%) rename DGEngine.core/src/{ => Game}/Actions/ActRandom.h (84%) rename DGEngine.core/src/{ => Game}/Actions/ActResource.h (97%) rename DGEngine.core/src/{ => Game}/Actions/ActScrollable.h (81%) rename DGEngine.core/src/{ => Game}/Actions/ActShader.h (90%) rename DGEngine.core/src/{ => Game}/Actions/ActSound.h (93%) rename DGEngine.core/src/{ => Game}/Actions/ActText.h (95%) rename DGEngine.core/src/{ => Game}/Actions/ActVariable.h (80%) rename DGEngine.core/src/{ => Game}/Actions/ActVisibility.h (93%) rename DGEngine.core/src/{Actions/ActiontList.h => Game/Actions/ActionList.h} (88%) rename DGEngine.core/src/{ => Game}/Alignment.h (100%) rename DGEngine.core/src/{ => Game}/Anchor.h (100%) rename DGEngine.core/src/{ => Game}/AnimationInfo.h (100%) rename DGEngine.core/src/{ => Game}/AnimationType.h (100%) rename DGEngine.core/src/{ => Game}/BaseAnimation.cpp (96%) rename DGEngine.core/src/{ => Game}/BaseAnimation.h (91%) rename DGEngine.core/src/{ => Game}/BindingFlags.h (100%) rename DGEngine.core/src/{ => Game}/BlendMode.h (100%) rename DGEngine.core/src/{ => Game/Drawables}/Animation.cpp (98%) rename DGEngine.core/src/{ => Game/Drawables}/Animation.h (98%) rename DGEngine.core/src/{ => Game/Drawables}/BindableText.cpp (95%) rename DGEngine.core/src/{ => Game/Drawables}/BindableText.h (94%) rename DGEngine.core/src/{ => Game/Drawables}/BitmapButton.cpp (94%) rename DGEngine.core/src/{ => Game/Drawables}/BitmapButton.h (53%) rename DGEngine.core/src/{ => Game/Drawables}/BitmapText.cpp (97%) rename DGEngine.core/src/{ => Game/Drawables}/BitmapText.h (88%) rename DGEngine.core/src/{ => Game/Drawables}/Button.cpp (89%) rename DGEngine.core/src/{ => Game/Drawables}/Button.h (91%) rename DGEngine.core/src/{ => Game/Drawables}/Circle.cpp (85%) rename DGEngine.core/src/{ => Game/Drawables}/Circle.h (97%) rename DGEngine.core/src/{ => Game/Drawables}/DrawableText.h (71%) rename DGEngine.core/src/{ => Game/Drawables}/Image.cpp (94%) rename DGEngine.core/src/{ => Game/Drawables}/Image.h (61%) rename DGEngine.core/src/{ => Game/Drawables}/InputText.cpp (93%) rename DGEngine.core/src/{ => Game/Drawables}/InputText.h (100%) rename DGEngine.core/src/{ => Game/Drawables}/LoadingScreen.cpp (97%) rename DGEngine.core/src/{ => Game/Drawables}/LoadingScreen.h (89%) rename DGEngine.core/src/{ => Game/Drawables}/Menu.cpp (85%) rename DGEngine.core/src/{ => Game/Drawables}/Menu.h (89%) rename DGEngine.core/src/{ => Game/Drawables}/Movie2.cpp (90%) rename DGEngine.core/src/{ => Game/Drawables}/Movie2.h (93%) rename DGEngine.core/src/{ => Game/Drawables}/Panel.cpp (92%) rename DGEngine.core/src/{ => Game/Drawables}/Panel.h (93%) rename DGEngine.core/src/{ => Game/Drawables}/Rectangle.cpp (85%) rename DGEngine.core/src/{ => Game/Drawables}/Rectangle.h (97%) rename DGEngine.core/src/{ => Game/Drawables}/Scrollable.cpp (93%) rename DGEngine.core/src/{ => Game/Drawables}/Scrollable.h (94%) rename DGEngine.core/src/{ => Game/Drawables}/Shape.cpp (88%) rename DGEngine.core/src/{ => Game/Drawables}/Shape.h (97%) rename DGEngine.core/src/{ => Game/Drawables}/StringButton.cpp (97%) rename DGEngine.core/src/{ => Game/Drawables}/StringButton.h (100%) rename DGEngine.core/src/{ => Game/Drawables}/StringText.cpp (91%) rename DGEngine.core/src/{ => Game/Drawables}/StringText.h (75%) rename DGEngine.core/src/{ => Game/Drawables}/Text.cpp (95%) rename DGEngine.core/src/{ => Game/Drawables}/Text.h (70%) rename DGEngine.core/src/{ => Game}/Event.cpp (100%) rename DGEngine.core/src/{ => Game}/Event.h (87%) create mode 100644 DGEngine.core/src/Game/EventManager.cpp create mode 100644 DGEngine.core/src/Game/EventManager.h rename DGEngine.core/src/{ => Game}/FadeInOut.cpp (94%) rename DGEngine.core/src/{ => Game}/FadeInOut.h (88%) rename DGEngine.core/src/{ => Game}/Formula.cpp (98%) rename DGEngine.core/src/{ => Game}/Formula.h (97%) rename DGEngine.core/src/{ => Game}/Formulas.h (100%) rename DGEngine.core/src/{ => Game}/Game.cpp (56%) rename DGEngine.core/src/{ => Game}/Game.h (57%) create mode 100644 DGEngine.core/src/Game/GameInputEventManager.cpp create mode 100644 DGEngine.core/src/Game/GameInputEventManager.h create mode 100644 DGEngine.core/src/Game/GameQueryable.cpp create mode 100644 DGEngine.core/src/Game/GameQueryable.h rename DGEngine.core/src/{ => Game}/IfCondition.cpp (96%) rename DGEngine.core/src/{ => Game}/IfCondition.h (87%) rename DGEngine.core/src/{ => Game}/IgnoreResource.h (93%) rename DGEngine.core/src/{ => Game}/InputEvent.cpp (63%) rename DGEngine.core/src/{ => Game}/InputEvent.h (97%) rename DGEngine.core/src/{Predicates => Game}/Predicate.h (100%) rename DGEngine.core/src/{ => Game}/Predicates/PredIO.h (78%) create mode 100644 DGEngine.core/src/Game/QueryObject.h create mode 100644 DGEngine.core/src/Game/Queryable.cpp create mode 100644 DGEngine.core/src/Game/Queryable.h create mode 100644 DGEngine.core/src/Game/ResourceBundle.h rename DGEngine.core/src/{ => Game}/ResourceManager.cpp (92%) rename DGEngine.core/src/{ => Game}/ResourceManager.h (63%) delete mode 100644 DGEngine.core/src/Game/Save/SaveProperties.h delete mode 100644 DGEngine.core/src/Game/Save/SaveUtils.cpp rename DGEngine.core/src/{ => Game}/ShaderManager.cpp (96%) rename DGEngine.core/src/{ => Game}/ShaderManager.h (96%) rename DGEngine.core/src/{ => Game}/TextureInfo.h (77%) create mode 100644 DGEngine.core/src/Game/TextureQueryable.h create mode 100644 DGEngine.core/src/Game/UIObject.cpp rename DGEngine.core/src/{ => Game}/UIObject.h (69%) rename DGEngine.core/src/{ => Game/Utils}/CmdLineUtils.cpp (96%) rename DGEngine.core/src/{ => Game/Utils}/CmdLineUtils.h (100%) rename DGEngine.core/src/{ => Game/Utils}/FileUtils.cpp (98%) rename DGEngine.core/src/{ => Game/Utils}/FileUtils.h (100%) rename DGEngine.core/src/{ => Game/Utils}/GameUtils.cpp (72%) rename DGEngine.core/src/{ => Game/Utils}/GameUtils.h (81%) rename DGEngine.core/src/{ => Game/Utils}/ImageUtils.cpp (99%) rename DGEngine.core/src/{ => Game/Utils}/ImageUtils.h (92%) rename DGEngine.core/src/{ => Game/Utils}/TextUtils.cpp (86%) rename DGEngine.core/src/{ => Game/Utils}/TextUtils.h (85%) create mode 100644 DGEngine.core/src/Game/Utils/UIObjectUtils.h create mode 100644 DGEngine.core/src/Game/Utils/VarUtils.cpp create mode 100644 DGEngine.core/src/Game/Utils/VarUtils.h create mode 100644 DGEngine.core/src/Game/VarOrPredicate.h create mode 100644 DGEngine.core/src/Game/VarOrQueryObject.h create mode 100644 DGEngine.core/src/Game/Variable.h create mode 100644 DGEngine.core/src/Game/VariableManager.cpp create mode 100644 DGEngine.core/src/Game/VariableManager.h create mode 100644 DGEngine.core/src/Json/SaveUtils.cpp rename DGEngine.core/src/{Game/Save => Json}/SaveUtils.h (74%) create mode 100644 DGEngine.core/src/Parser/Actions/ParseActionActions.cpp create mode 100644 DGEngine.core/src/Parser/Actions/ParseActionActions.h create mode 100644 DGEngine.core/src/Parser/Actions/ParseAnimationActions.cpp create mode 100644 DGEngine.core/src/Parser/Actions/ParseAnimationActions.h create mode 100644 DGEngine.core/src/Parser/Actions/ParseAudioActions.cpp create mode 100644 DGEngine.core/src/Parser/Actions/ParseAudioActions.h create mode 100644 DGEngine.core/src/Parser/Actions/ParseButtonActions.cpp create mode 100644 DGEngine.core/src/Parser/Actions/ParseButtonActions.h rename DGEngine.core/src/Parser/{ParseCondition.cpp => Actions/ParseConditionActions.cpp} (77%) create mode 100644 DGEngine.core/src/Parser/Actions/ParseConditionActions.h create mode 100644 DGEngine.core/src/Parser/Actions/ParseCursorActions.cpp create mode 100644 DGEngine.core/src/Parser/Actions/ParseCursorActions.h create mode 100644 DGEngine.core/src/Parser/Actions/ParseDrawableActions.cpp create mode 100644 DGEngine.core/src/Parser/Actions/ParseDrawableActions.h create mode 100644 DGEngine.core/src/Parser/Actions/ParseEventActions.cpp create mode 100644 DGEngine.core/src/Parser/Actions/ParseEventActions.h create mode 100644 DGEngine.core/src/Parser/Actions/ParseFadeActions.cpp create mode 100644 DGEngine.core/src/Parser/Actions/ParseFadeActions.h create mode 100644 DGEngine.core/src/Parser/Actions/ParseFocusActions.cpp create mode 100644 DGEngine.core/src/Parser/Actions/ParseFocusActions.h create mode 100644 DGEngine.core/src/Parser/Actions/ParseFontActions.cpp create mode 100644 DGEngine.core/src/Parser/Actions/ParseFontActions.h create mode 100644 DGEngine.core/src/Parser/Actions/ParseGameActions.cpp create mode 100644 DGEngine.core/src/Parser/Actions/ParseGameActions.h create mode 100644 DGEngine.core/src/Parser/Actions/ParseIOActions.cpp create mode 100644 DGEngine.core/src/Parser/Actions/ParseIOActions.h create mode 100644 DGEngine.core/src/Parser/Actions/ParseImageActions.cpp create mode 100644 DGEngine.core/src/Parser/Actions/ParseImageActions.h create mode 100644 DGEngine.core/src/Parser/Actions/ParseInputTextActions.cpp create mode 100644 DGEngine.core/src/Parser/Actions/ParseInputTextActions.h create mode 100644 DGEngine.core/src/Parser/Actions/ParseLoadActions.cpp create mode 100644 DGEngine.core/src/Parser/Actions/ParseLoadActions.h create mode 100644 DGEngine.core/src/Parser/Actions/ParseLoadingScreenActions.cpp create mode 100644 DGEngine.core/src/Parser/Actions/ParseLoadingScreenActions.h create mode 100644 DGEngine.core/src/Parser/Actions/ParseMenuActions.cpp create mode 100644 DGEngine.core/src/Parser/Actions/ParseMenuActions.h create mode 100644 DGEngine.core/src/Parser/Actions/ParseMountActions.cpp create mode 100644 DGEngine.core/src/Parser/Actions/ParseMountActions.h create mode 100644 DGEngine.core/src/Parser/Actions/ParseMovieActions.cpp create mode 100644 DGEngine.core/src/Parser/Actions/ParseMovieActions.h create mode 100644 DGEngine.core/src/Parser/Actions/ParsePaletteActions.cpp create mode 100644 DGEngine.core/src/Parser/Actions/ParsePaletteActions.h create mode 100644 DGEngine.core/src/Parser/Actions/ParseRandomActions.cpp create mode 100644 DGEngine.core/src/Parser/Actions/ParseRandomActions.h create mode 100644 DGEngine.core/src/Parser/Actions/ParseResourceActions.cpp create mode 100644 DGEngine.core/src/Parser/Actions/ParseResourceActions.h create mode 100644 DGEngine.core/src/Parser/Actions/ParseScrollableActions.cpp create mode 100644 DGEngine.core/src/Parser/Actions/ParseScrollableActions.h create mode 100644 DGEngine.core/src/Parser/Actions/ParseShaderActions.cpp create mode 100644 DGEngine.core/src/Parser/Actions/ParseShaderActions.h create mode 100644 DGEngine.core/src/Parser/Actions/ParseSoundActions.cpp create mode 100644 DGEngine.core/src/Parser/Actions/ParseSoundActions.h create mode 100644 DGEngine.core/src/Parser/Actions/ParseTextActions.cpp create mode 100644 DGEngine.core/src/Parser/Actions/ParseTextActions.h create mode 100644 DGEngine.core/src/Parser/Actions/ParseVariableActions.cpp create mode 100644 DGEngine.core/src/Parser/Actions/ParseVariableActions.h create mode 100644 DGEngine.core/src/Parser/Actions/ParseVisibilityActions.cpp create mode 100644 DGEngine.core/src/Parser/Actions/ParseVisibilityActions.h create mode 100644 DGEngine.core/src/Parser/Drawables/ParseAnimation.cpp rename DGEngine.core/src/Parser/{ => Drawables}/ParseAnimation.h (73%) create mode 100644 DGEngine.core/src/Parser/Drawables/ParseButton.cpp create mode 100644 DGEngine.core/src/Parser/Drawables/ParseButton.h create mode 100644 DGEngine.core/src/Parser/Drawables/ParseCircle.cpp rename DGEngine.core/src/Parser/{ => Drawables}/ParseCircle.h (60%) create mode 100644 DGEngine.core/src/Parser/Drawables/ParseDrawable.cpp create mode 100644 DGEngine.core/src/Parser/Drawables/ParseDrawable.h create mode 100644 DGEngine.core/src/Parser/Drawables/ParseImage.cpp create mode 100644 DGEngine.core/src/Parser/Drawables/ParseImage.h rename DGEngine.core/src/Parser/{ => Drawables}/ParseInputText.cpp (58%) rename DGEngine.core/src/Parser/{ => Drawables}/ParseInputText.h (59%) rename DGEngine.core/src/Parser/{ => Drawables}/ParseLoadingScreen.cpp (72%) rename DGEngine.core/src/Parser/{ => Drawables}/ParseLoadingScreen.h (100%) create mode 100644 DGEngine.core/src/Parser/Drawables/ParseMenu.cpp create mode 100644 DGEngine.core/src/Parser/Drawables/ParseMenu.h create mode 100644 DGEngine.core/src/Parser/Drawables/ParseMenuItem.cpp rename DGEngine.core/src/Parser/{ParseMenu.h => Drawables/ParseMenuItem.h} (58%) create mode 100644 DGEngine.core/src/Parser/Drawables/ParseMovie.cpp rename DGEngine.core/src/Parser/{ => Drawables}/ParseMovie.h (53%) create mode 100644 DGEngine.core/src/Parser/Drawables/ParsePanel.cpp rename DGEngine.core/src/Parser/{ => Drawables}/ParsePanel.h (61%) create mode 100644 DGEngine.core/src/Parser/Drawables/ParseRectangle.cpp rename DGEngine.core/src/Parser/{ => Drawables}/ParseRectangle.h (59%) create mode 100644 DGEngine.core/src/Parser/Drawables/ParseScrollable.cpp create mode 100644 DGEngine.core/src/Parser/Drawables/ParseScrollable.h create mode 100644 DGEngine.core/src/Parser/Drawables/ParseShape.cpp rename DGEngine.core/src/Parser/{ => Drawables}/ParseShape.h (61%) create mode 100644 DGEngine.core/src/Parser/Drawables/ParseText.cpp create mode 100644 DGEngine.core/src/Parser/Drawables/ParseText.h create mode 100644 DGEngine.core/src/Parser/Game/ParseGame.cpp create mode 100644 DGEngine.core/src/Parser/Game/ParseGame.h rename DGEngine.core/src/Parser/{ => Game}/ParseIcon.cpp (64%) rename DGEngine.core/src/Parser/{ => Game}/ParseIcon.h (100%) create mode 100644 DGEngine.core/src/Parser/Game/ParseSaveDir.cpp create mode 100644 DGEngine.core/src/Parser/Game/ParseSaveDir.h delete mode 100644 DGEngine.core/src/Parser/ParseAnimation.cpp delete mode 100644 DGEngine.core/src/Parser/ParseButton.cpp delete mode 100644 DGEngine.core/src/Parser/ParseButton.h delete mode 100644 DGEngine.core/src/Parser/ParseCircle.cpp create mode 100644 DGEngine.core/src/Parser/ParseCommon.cpp create mode 100644 DGEngine.core/src/Parser/ParseCommon.h delete mode 100644 DGEngine.core/src/Parser/ParseCondition.h delete mode 100644 DGEngine.core/src/Parser/ParseFileBytes.cpp create mode 100644 DGEngine.core/src/Parser/ParseGameInputEvent.cpp create mode 100644 DGEngine.core/src/Parser/ParseGameInputEvent.h delete mode 100644 DGEngine.core/src/Parser/ParseImage.cpp delete mode 100644 DGEngine.core/src/Parser/ParseImage.h delete mode 100644 DGEngine.core/src/Parser/ParseMenu.cpp delete mode 100644 DGEngine.core/src/Parser/ParseMenuButton.cpp delete mode 100644 DGEngine.core/src/Parser/ParseMenuButton.h delete mode 100644 DGEngine.core/src/Parser/ParseMovie.cpp delete mode 100644 DGEngine.core/src/Parser/ParsePanel.cpp delete mode 100644 DGEngine.core/src/Parser/ParseRectangle.cpp delete mode 100644 DGEngine.core/src/Parser/ParseScrollable.cpp delete mode 100644 DGEngine.core/src/Parser/ParseScrollable.h delete mode 100644 DGEngine.core/src/Parser/ParseShape.cpp delete mode 100644 DGEngine.core/src/Parser/ParseText.cpp delete mode 100644 DGEngine.core/src/Parser/ParseText.h delete mode 100644 DGEngine.core/src/Parser/ParseTexturePack.cpp delete mode 100644 DGEngine.core/src/Parser/ParseTexturePack.h rename DGEngine.core/src/Parser/{ => Resources}/ParseAudio.cpp (96%) rename DGEngine.core/src/Parser/{ => Resources}/ParseAudio.h (91%) rename DGEngine.core/src/Parser/{ => Resources}/ParseAudioCommon.cpp (98%) rename DGEngine.core/src/Parser/{ => Resources}/ParseAudioCommon.h (100%) create mode 100644 DGEngine.core/src/Parser/Resources/ParseFileBytes.cpp rename DGEngine.core/src/Parser/{ => Resources}/ParseFileBytes.h (66%) rename DGEngine.core/src/Parser/{ => Resources}/ParseFont.cpp (78%) rename DGEngine.core/src/Parser/{ => Resources}/ParseFont.h (83%) rename DGEngine.core/src/Parser/{ => Resources}/ParseImageContainer.cpp (57%) rename DGEngine.core/src/Parser/{ => Resources}/ParseImageContainer.h (74%) rename DGEngine.core/src/Parser/{ => Resources}/ParsePalette.cpp (63%) rename DGEngine.core/src/Parser/{ => Resources}/ParsePalette.h (66%) create mode 100644 DGEngine.core/src/Parser/Resources/ParseResource.h rename DGEngine.core/src/Parser/{ => Resources}/ParseShader.cpp (85%) rename DGEngine.core/src/Parser/{ => Resources}/ParseShader.h (100%) rename DGEngine.core/src/Parser/{ => Resources}/ParseSound.cpp (92%) rename DGEngine.core/src/Parser/{ => Resources}/ParseSound.h (86%) rename DGEngine.core/src/Parser/{ => Resources}/ParseTexture.cpp (72%) rename DGEngine.core/src/Parser/{ => Resources}/ParseTexture.h (78%) create mode 100644 DGEngine.core/src/Parser/Resources/ParseTexturePack.cpp create mode 100644 DGEngine.core/src/Parser/Resources/ParseTexturePack.h create mode 100644 DGEngine.core/src/Parser/Resources/TexturePacks/ParseBitmapFontTexturePack.h create mode 100644 DGEngine.core/src/Parser/Resources/TexturePacks/ParseCompositeTexturePack.h create mode 100644 DGEngine.core/src/Parser/Resources/TexturePacks/ParseImageContainerTexturePack.cpp create mode 100644 DGEngine.core/src/Parser/Resources/TexturePacks/ParseImageContainerTexturePack.h create mode 100644 DGEngine.core/src/Parser/Resources/TexturePacks/ParseMultiTextureTexturePack.h create mode 100644 DGEngine.core/src/Parser/Resources/TexturePacks/ParseSingleTextureTexturePack.cpp create mode 100644 DGEngine.core/src/Parser/Resources/TexturePacks/ParseSingleTextureTexturePack.h create mode 100644 DGEngine.core/src/Parser/Resources/TexturePacks/ParseStackedTexturePack.h create mode 100644 DGEngine.core/src/Parser/Resources/TexturePacks/ParseTexturePackAnimatedTextures.h create mode 100644 DGEngine.core/src/Parser/Resources/TexturePacks/ParseTexturePackIndexes.h create mode 100644 DGEngine.core/src/Parser/Resources/TexturePacks/ParseTexturePackRects.h create mode 100644 DGEngine.core/src/Parser/Resources/TexturePacks/ParseTexturePacks.cpp create mode 100644 DGEngine.core/src/Parser/Resources/TexturePacks/ParseTexturePacks.h delete mode 100644 DGEngine.core/src/Queryable.h rename DGEngine.core/src/{ => Resources}/AudioSource.h (90%) rename DGEngine.core/src/{ => Resources}/BitmapFont.cpp (94%) rename DGEngine.core/src/{ => Resources}/BitmapFont.h (93%) rename DGEngine.core/src/{ => Resources}/CachedImagePack.cpp (100%) rename DGEngine.core/src/{ => Resources}/CachedImagePack.h (68%) rename DGEngine.core/src/{ => Resources}/FileBytes.h (56%) create mode 100644 DGEngine.core/src/Resources/Font.h rename DGEngine.core/src/{ => Resources}/FreeTypeFont.h (100%) rename DGEngine.core/src/{ImageContainers => Resources}/ImageContainer.h (82%) rename DGEngine.core/src/{ => Resources}/ImageContainers/SimpleImageContainer.cpp (97%) rename DGEngine.core/src/{ => Resources}/ImageContainers/SimpleImageContainer.h (96%) rename DGEngine.core/src/{ => Resources}/Palette.cpp (97%) rename DGEngine.core/src/{ => Resources}/Palette.h (62%) create mode 100644 DGEngine.core/src/Resources/Shader.cpp rename DGEngine.core/src/{ => Resources}/Shader.h (84%) rename DGEngine.core/src/{TexturePacks => Resources}/TexturePack.cpp (84%) rename DGEngine.core/src/{TexturePacks => Resources}/TexturePack.h (86%) rename DGEngine.core/src/{ => Resources}/TexturePacks/BitmapFontTexturePack.cpp (95%) rename DGEngine.core/src/{ => Resources}/TexturePacks/BitmapFontTexturePack.h (90%) rename DGEngine.core/src/{ => Resources}/TexturePacks/CompositeTexturePack.cpp (97%) rename DGEngine.core/src/{ => Resources}/TexturePacks/CompositeTexturePack.h (87%) create mode 100644 DGEngine.core/src/Resources/TexturePacks/ImageContainerTexturePack.cpp create mode 100644 DGEngine.core/src/Resources/TexturePacks/ImageContainerTexturePack.h rename DGEngine.core/src/{ => Resources}/TexturePacks/IndexedTexturePack.cpp (89%) rename DGEngine.core/src/{ => Resources}/TexturePacks/IndexedTexturePack.h (83%) create mode 100644 DGEngine.core/src/Resources/TexturePacks/MultiImageContainerTexturePack.cpp create mode 100644 DGEngine.core/src/Resources/TexturePacks/MultiImageContainerTexturePack.h create mode 100644 DGEngine.core/src/Resources/TexturePacks/MultiTexturePack.cpp create mode 100644 DGEngine.core/src/Resources/TexturePacks/MultiTexturePack.h rename DGEngine.core/src/{ => Resources}/TexturePacks/RectTexturePack.cpp (84%) rename DGEngine.core/src/{ => Resources}/TexturePacks/RectTexturePack.h (93%) create mode 100644 DGEngine.core/src/Resources/TexturePacks/SimpleTexturePack.cpp create mode 100644 DGEngine.core/src/Resources/TexturePacks/SimpleTexturePack.h create mode 100644 DGEngine.core/src/Resources/TexturePacks/SingleTexturePack.cpp create mode 100644 DGEngine.core/src/Resources/TexturePacks/SingleTexturePack.h rename DGEngine.core/src/{ => Resources}/TexturePacks/StackedTexturePack.cpp (87%) rename DGEngine.core/src/{ => Resources}/TexturePacks/StackedTexturePack.h (85%) create mode 100644 DGEngine.core/src/Resources/TexturePacks/TexturePackGroup.cpp create mode 100644 DGEngine.core/src/Resources/TexturePacks/TexturePackGroup.h create mode 100644 DGEngine.core/src/SFML/sfeMovie/AVFunc.cpp create mode 100644 DGEngine.core/src/SFML/sfeMovie/AVFunc.hpp rename DGEngine.core/src/{ => SFML}/sfeMovie/AudioStream.cpp (79%) rename DGEngine.core/src/{ => SFML}/sfeMovie/AudioStream.hpp (100%) rename DGEngine.core/src/{ => SFML}/sfeMovie/Demuxer.cpp (94%) rename DGEngine.core/src/{ => SFML}/sfeMovie/Demuxer.hpp (97%) rename DGEngine.core/src/{ => SFML}/sfeMovie/Movie.cpp (100%) rename DGEngine.core/src/{ => SFML}/sfeMovie/Movie.hpp (100%) rename DGEngine.core/src/{ => SFML}/sfeMovie/MovieImpl.cpp (97%) rename DGEngine.core/src/{ => SFML}/sfeMovie/MovieImpl.hpp (99%) rename DGEngine.core/src/{ => SFML}/sfeMovie/Stream.cpp (84%) rename DGEngine.core/src/{ => SFML}/sfeMovie/Stream.hpp (100%) rename DGEngine.core/src/{ => SFML}/sfeMovie/StreamSelection.hpp (100%) rename DGEngine.core/src/{ => SFML}/sfeMovie/Timer.cpp (100%) rename DGEngine.core/src/{ => SFML}/sfeMovie/Timer.hpp (100%) rename DGEngine.core/src/{ => SFML}/sfeMovie/TimerPriorities.hpp (100%) rename DGEngine.core/src/{ => SFML}/sfeMovie/VideoStream.cpp (88%) rename DGEngine.core/src/{ => SFML}/sfeMovie/VideoStream.hpp (100%) delete mode 100644 DGEngine.core/src/StreamReader.h delete mode 100644 DGEngine.core/src/TexturePacks/CachedTexturePack.cpp delete mode 100644 DGEngine.core/src/TexturePacks/CachedTexturePack.h delete mode 100644 DGEngine.core/src/TexturePacks/SimpleTexturePack.cpp delete mode 100644 DGEngine.core/src/TexturePacks/SimpleTexturePack.h delete mode 100644 DGEngine.core/src/UIObject.cpp create mode 100644 DGEngine.core/src/Utils/LoadLibrary.cpp create mode 100644 DGEngine.core/src/Utils/LoadLibrary.h create mode 100644 DGEngine.core/src/Utils/Random.cpp create mode 100644 DGEngine.core/src/Utils/Random.h create mode 100644 DGEngine.core/src/Utils/StreamReader.h create mode 100644 DGEngine.core/src/Utils/StringHash.cpp create mode 100644 DGEngine.core/src/Utils/StringHash.h rename DGEngine.core/src/{ => Utils}/endian/big_endian.hpp (83%) rename DGEngine.core/src/{ => Utils}/endian/detail/big.hpp (82%) rename DGEngine.core/src/{ => Utils}/endian/detail/helpers.hpp (79%) rename DGEngine.core/src/{ => Utils}/endian/detail/little.hpp (82%) rename DGEngine.core/src/{ => Utils}/endian/detail/stream.hpp (78%) rename DGEngine.core/src/{ => Utils}/endian/is_big_endian.hpp (100%) rename DGEngine.core/src/{ => Utils}/endian/little_endian.hpp (83%) create mode 100644 DGEngine.core/src/Utils/endian/network.hpp rename DGEngine.core/src/{ => Utils}/endian/stream_reader.hpp (83%) rename DGEngine.core/src/{ => Utils}/endian/stream_writer.hpp (76%) delete mode 100644 DGEngine.core/src/VarOrPredicate.h delete mode 100644 DGEngine.core/src/Variable.cpp delete mode 100644 DGEngine.core/src/Variable.h create mode 100644 DGEngine.core/src/rapidjson/internal/clzll.h create mode 100644 DGEngine.core/src/rapidjson/uri.h create mode 100644 DGEngine.core/vcpkg/ports/sfml/portfile.cmake create mode 100644 DGEngine.core/vcpkg/ports/sfml/usage create mode 100644 DGEngine.core/vcpkg/ports/sfml/vcpkg.json delete mode 100755 DGEngine.sln delete mode 100644 DGEngine.vcxproj delete mode 100755 cmake_modules/FindSFML.cmake create mode 100644 gamefilesd/res/icon.png create mode 100644 gamefilesd/towners/common/loadPanel.json create mode 100644 gamefilesd/towners/common/loadScrollbarPanel.json create mode 100644 gamefilesd/towners/common/loadTabKeys.json create mode 100644 gamefilesd/ui/gameInputEvents.json create mode 100644 gamefilesd/ui/inputEvents.json delete mode 100755 gamefilesd/ui/level/gameSettings.json delete mode 100755 gamefilesd/ui/level/saveSettings.json create mode 100644 gamefilesd/ui/level/settingsFile.json delete mode 100755 gamefilesd/ui/saveSettings.json create mode 100644 gamefilesd2/res/icon.png create mode 100644 gamefilesdex/level/item/potions.json create mode 100644 gamefilesdex/level/item/scrolls.json create mode 100644 gamefilesdex/level/map/town/items.json create mode 100644 gamefilesdex/level/player/Rogue/defaults.json create mode 100644 gamefilesdex/level/player/Sorceror/defaults.json create mode 100644 gamefilesdex/level/player/Warrior/defaults.json create mode 100644 gamefileshf/res/icon.png create mode 100644 launch.vs.json create mode 100644 pkg/linux/dgengine.desktop create mode 100644 pkg/linux/icon.png rename src/{ => Game}/Actions/ActItem.h (97%) mode change 100755 => 100644 rename src/{ => Game}/Actions/ActLevel.h (93%) mode change 100755 => 100644 rename src/{ => Game}/Actions/ActLevelObject.h (86%) mode change 100755 => 100644 rename src/{ => Game}/Actions/ActPlayer.h (95%) mode change 100755 => 100644 rename src/{ => Game}/Actions/ActQuest.h (92%) mode change 100755 => 100644 rename src/{ => Game}/Game2.cpp (73%) rename src/{ => Game}/Game2.h (50%) delete mode 100755 src/Game/GameProperties.h rename src/Game/{ => Inventory}/Inventories.h (86%) mode change 100755 => 100644 rename src/Game/{ => Inventory}/Inventory.cpp (92%) mode change 100755 => 100644 rename src/Game/{ => Inventory}/Inventory.h (81%) mode change 100755 => 100644 delete mode 100755 src/Game/Item.cpp delete mode 100755 src/Game/Item.h create mode 100644 src/Game/Item/Item.cpp create mode 100644 src/Game/Item/Item.h rename src/Game/{ => Item}/ItemClass.cpp (96%) mode change 100755 => 100644 rename src/Game/{ => Item}/ItemClass.h (71%) mode change 100755 => 100644 create mode 100644 src/Game/Item/ItemLevelObject.cpp create mode 100644 src/Game/Item/ItemLevelObject.h rename src/Game/{ => Item}/ItemLocation.h (77%) mode change 100755 => 100644 rename src/Game/{Save/SaveItem.cpp => Item/ItemSave.cpp} (89%) mode change 100755 => 100644 create mode 100644 src/Game/Item/ItemSave.h delete mode 100755 src/Game/Level.cpp rename src/Game/{ => Level}/FlagsVector.h (100%) mode change 100755 => 100644 create mode 100644 src/Game/Level/Level.cpp rename src/Game/{ => Level}/Level.h (65%) mode change 100755 => 100644 create mode 100644 src/Game/Level/LevelBase.cpp create mode 100644 src/Game/Level/LevelBase.h rename src/Game/{ => Level}/LevelCell.cpp (100%) mode change 100755 => 100644 rename src/Game/{ => Level}/LevelCell.h (59%) mode change 100755 => 100644 create mode 100644 src/Game/Level/LevelDraw.cpp create mode 100644 src/Game/Level/LevelDraw.h create mode 100644 src/Game/Level/LevelDrawable.h create mode 100644 src/Game/Level/LevelDrawableManager.cpp create mode 100644 src/Game/Level/LevelDrawableManager.h rename src/Game/{ => Level}/LevelFlags.h (100%) mode change 100755 => 100644 rename src/Game/{ => Level}/LevelHelper.cpp (97%) mode change 100755 => 100644 rename src/Game/{ => Level}/LevelHelper.h (85%) mode change 100755 => 100644 create mode 100644 src/Game/Level/LevelInputManager.cpp create mode 100644 src/Game/Level/LevelInputManager.h create mode 100644 src/Game/Level/LevelItem.cpp create mode 100644 src/Game/Level/LevelItem.h create mode 100644 src/Game/Level/LevelLayer.h rename src/Game/{ => Level/LevelLayers}/ColorLevelLayer.cpp (91%) mode change 100755 => 100644 rename src/Game/{ => Level/LevelLayers}/ColorLevelLayer.h (100%) mode change 100755 => 100644 rename src/Game/{ => Level/LevelLayers}/TextureLevelLayer.cpp (97%) mode change 100755 => 100644 rename src/Game/{ => Level/LevelLayers}/TextureLevelLayer.h (95%) mode change 100755 => 100644 rename src/Game/{ => Level/LevelLayers}/TilesetLevelLayer.cpp (96%) mode change 100755 => 100644 rename src/Game/{ => Level/LevelLayers}/TilesetLevelLayer.h (92%) mode change 100755 => 100644 rename src/Game/{ => Level}/LevelMap.cpp (97%) mode change 100755 => 100644 rename src/Game/{ => Level}/LevelMap.h (54%) mode change 100755 => 100644 create mode 100644 src/Game/Level/LevelObjectManager.cpp create mode 100644 src/Game/Level/LevelObjectManager.h create mode 100644 src/Game/Level/LevelQuest.cpp create mode 100644 src/Game/Level/LevelQuest.h rename src/Game/{Save/SaveLevel.cpp => Level/LevelSave.cpp} (75%) mode change 100755 => 100644 create mode 100644 src/Game/Level/LevelSave.h rename src/Game/{ => Level}/LevelSurface.cpp (61%) mode change 100755 => 100644 rename src/Game/{ => Level}/LevelSurface.h (91%) mode change 100755 => 100644 create mode 100644 src/Game/Level/LevelUIObject.cpp create mode 100644 src/Game/Level/LevelUIObject.h rename src/Game/{ => Level}/PathFinder.cpp (100%) mode change 100755 => 100644 rename src/Game/{ => Level}/PathFinder.h (87%) mode change 100755 => 100644 rename src/Game/{ => Level}/fsa.h (100%) mode change 100755 => 100644 rename src/Game/{ => Level}/stlastar.h (100%) mode change 100755 => 100644 delete mode 100644 src/Game/LevelBase.cpp delete mode 100644 src/Game/LevelBase.h delete mode 100755 src/Game/LevelLayer.h rename src/Game/{ => LevelObject}/LevelObject.cpp (84%) mode change 100755 => 100644 rename src/Game/{ => LevelObject}/LevelObject.h (56%) mode change 100755 => 100644 rename src/Game/{ => LevelObject}/LevelObjectClass.cpp (85%) mode change 100755 => 100644 rename src/Game/{ => LevelObject}/LevelObjectClass.h (64%) mode change 100755 => 100644 rename src/Game/{ => LevelObject}/LevelObjectClassDefaults.h (93%) mode change 100755 => 100644 create mode 100644 src/Game/LevelObject/LevelObjectQueryable.cpp create mode 100644 src/Game/LevelObject/LevelObjectQueryable.h delete mode 100755 src/Game/Player.h rename src/Game/{ => Player}/Player.cpp (78%) mode change 100755 => 100644 create mode 100644 src/Game/Player/Player.h create mode 100644 src/Game/Player/PlayerBase.cpp create mode 100644 src/Game/Player/PlayerBase.h rename src/Game/{ => Player}/PlayerClass.cpp (95%) mode change 100755 => 100644 rename src/Game/{ => Player}/PlayerClass.h (70%) mode change 100755 => 100644 create mode 100644 src/Game/Player/PlayerInventories.cpp create mode 100644 src/Game/Player/PlayerInventories.h create mode 100644 src/Game/Player/PlayerLevelObject.cpp create mode 100644 src/Game/Player/PlayerLevelObject.h create mode 100644 src/Game/Player/PlayerMove.cpp create mode 100644 src/Game/Player/PlayerMove.h create mode 100644 src/Game/Player/PlayerProperties.cpp create mode 100644 src/Game/Player/PlayerProperties.h rename src/Game/{Save/SavePlayer.cpp => Player/PlayerSave.cpp} (92%) mode change 100755 => 100644 create mode 100644 src/Game/Player/PlayerSave.h create mode 100644 src/Game/Player/PlayerSpells.cpp create mode 100644 src/Game/Player/PlayerSpells.h delete mode 100644 src/Game/PlayerBase.cpp delete mode 100644 src/Game/PlayerBase.h rename src/{ => Game}/Predicates/PredItem.h (91%) mode change 100755 => 100644 rename src/{ => Game}/Predicates/PredLevelObject.h (88%) mode change 100755 => 100644 rename src/{ => Game}/Predicates/PredPlayer.h (93%) mode change 100755 => 100644 create mode 100644 src/Game/Properties/AnimationSpeed.h create mode 100644 src/Game/Properties/InventoryPosition.h create mode 100644 src/Game/Properties/LevelObjValue.h create mode 100644 src/Game/Properties/PlayerAnimation.h rename src/Game/{GameProperties.cpp => Properties/PlayerDirection.cpp} (96%) mode change 100755 => 100644 create mode 100644 src/Game/Properties/PlayerDirection.h create mode 100644 src/Game/Properties/PlayerInventory.h create mode 100644 src/Game/Properties/PlayerItemMount.h create mode 100644 src/Game/Properties/PlayerStatus.h rename src/Game/{ => Quest}/Quest.cpp (93%) mode change 100755 => 100644 rename src/Game/{ => Quest}/Quest.h (75%) mode change 100755 => 100644 delete mode 100755 src/Game/Save/SaveItem.h delete mode 100755 src/Game/Save/SaveLevel.h delete mode 100755 src/Game/Save/SavePlayer.h delete mode 100755 src/Game/Save/SaveSimpleLevelObject.h rename src/{ => Game}/ShaderManager2.cpp (97%) rename src/{ => Game}/ShaderManager2.h (81%) delete mode 100755 src/Game/SimpleLevelObject.cpp delete mode 100755 src/Game/SimpleLevelObject.h create mode 100644 src/Game/SimpleLevelObject/SimpleLevelObject.cpp create mode 100644 src/Game/SimpleLevelObject/SimpleLevelObject.h rename src/Game/{ => SimpleLevelObject}/SimpleLevelObjectClass.h (67%) mode change 100755 => 100644 create mode 100644 src/Game/SimpleLevelObject/SimpleLevelObjectLevelObject.cpp create mode 100644 src/Game/SimpleLevelObject/SimpleLevelObjectLevelObject.h rename src/Game/{Save/SaveSimpleLevelObject.cpp => SimpleLevelObject/SimpleLevelObjectSave.cpp} (84%) mode change 100755 => 100644 create mode 100644 src/Game/SimpleLevelObject/SimpleLevelObjectSave.h delete mode 100755 src/Game/Spell.h rename src/Game/{ => Spell}/Spell.cpp (67%) mode change 100755 => 100644 create mode 100644 src/Game/Spell/Spell.h create mode 100644 src/Game/Spell/SpellInstance.cpp create mode 100644 src/Game/Spell/SpellInstance.h rename src/{ => Game/Utils}/CmdLineUtils2.cpp (94%) rename src/{ => Game/Utils}/CmdLineUtils2.h (100%) rename src/{ => Game/Utils}/GameUtils2.cpp (99%) create mode 100644 src/Game/Utils/GameUtils2.h delete mode 100644 src/GameUtils2.h create mode 100644 src/Parser/Actions/ParseItemActions.cpp create mode 100644 src/Parser/Actions/ParseItemActions.h create mode 100644 src/Parser/Actions/ParseLevelActions.cpp create mode 100644 src/Parser/Actions/ParseLevelActions.h create mode 100644 src/Parser/Actions/ParseLevelObjectActions.cpp create mode 100644 src/Parser/Actions/ParseLevelObjectActions.h create mode 100644 src/Parser/Actions/ParsePlayerActions.cpp create mode 100644 src/Parser/Actions/ParsePlayerActions.h create mode 100644 src/Parser/Actions/ParseQuestActions.cpp create mode 100644 src/Parser/Actions/ParseQuestActions.h rename src/Parser/{ => Classifier}/ParseClassifier.cpp (95%) rename src/Parser/{ => Classifier}/ParseClassifier.h (100%) rename src/Parser/{ => Drawables}/ParsePanel2.cpp (72%) rename src/Parser/{ => Drawables}/ParsePanel2.h (100%) rename src/Parser/{ => Item}/ParseItem.cpp (55%) rename src/Parser/{ => Item}/ParseItem.h (65%) rename src/Parser/{ => Item}/ParseItemClass.cpp (64%) rename src/Parser/{ => Item}/ParseItemClass.h (100%) create mode 100644 src/Parser/Level/ParseLevel.cpp rename src/Parser/{ => Level}/ParseLevel.h (87%) create mode 100644 src/Parser/Level/ParseLevelAutoMap.cpp create mode 100644 src/Parser/Level/ParseLevelAutoMap.h create mode 100644 src/Parser/Level/ParseLevelLayer.cpp create mode 100644 src/Parser/Level/ParseLevelLayer.h create mode 100644 src/Parser/Level/ParseLevelMap.cpp create mode 100644 src/Parser/Level/ParseLevelMap.h rename src/Parser/{ => LevelObject}/ParseLevelObject.cpp (63%) rename src/Parser/{ => LevelObject}/ParseLevelObject.h (100%) rename src/Parser/{ => LevelObject}/ParseLevelObjectClass.cpp (58%) rename src/Parser/{ => LevelObject}/ParseLevelObjectClass.h (100%) create mode 100644 src/Parser/LevelObject/ParseLevelObjectClassCommon.cpp create mode 100644 src/Parser/LevelObject/ParseLevelObjectClassCommon.h create mode 100644 src/Parser/LevelObject/ParseLevelObjectCommon.cpp create mode 100644 src/Parser/LevelObject/ParseLevelObjectCommon.h delete mode 100644 src/Parser/ParseLevel.cpp delete mode 100644 src/Parser/ParsePlayer.cpp delete mode 100644 src/Parser/ParseSpell.cpp delete mode 100644 src/Parser/ParseTexturePack2.cpp create mode 100644 src/Parser/Player/ParsePlayer.cpp rename src/Parser/{ => Player}/ParsePlayer.h (100%) rename src/Parser/{ => Player}/ParsePlayerClass.cpp (67%) rename src/Parser/{ => Player}/ParsePlayerClass.h (100%) create mode 100644 src/Parser/Player/ParsePlayerInventories.cpp create mode 100644 src/Parser/Player/ParsePlayerInventories.h create mode 100644 src/Parser/Player/ParsePlayerSpells.cpp create mode 100644 src/Parser/Player/ParsePlayerSpells.h rename src/Parser/{ => Quest}/ParseQuest.cpp (75%) rename src/Parser/{ => Quest}/ParseQuest.h (87%) rename src/Parser/{ => Resources}/ParseImageContainer2.cpp (86%) rename src/Parser/{ => Resources}/ParseImageContainer2.h (89%) rename src/Parser/{ => Resources}/ParseTexture2.cpp (92%) rename src/Parser/{ => Resources}/ParseTexture2.h (100%) create mode 100644 src/Parser/Resources/ParseTexturePack2.cpp rename src/Parser/{ => Resources}/ParseTexturePack2.h (100%) create mode 100644 src/Parser/Resources/TexturePacks/ParseCompositeTexturePack2.cpp create mode 100644 src/Parser/Resources/TexturePacks/ParseCompositeTexturePack2.h create mode 100644 src/Parser/Resources/TexturePacks/ParseImageContainerTexturePack2.cpp create mode 100644 src/Parser/Resources/TexturePacks/ParseImageContainerTexturePack2.h create mode 100644 src/Parser/Spell/ParseSpell.cpp rename src/Parser/{ => Spell}/ParseSpell.h (100%) rename src/{ => Resources}/DS1.cpp (99%) mode change 100755 => 100644 rename src/{ => Resources}/DS1.h (98%) mode change 100755 => 100644 rename src/{ => Resources}/Dun.cpp (96%) mode change 100755 => 100644 rename src/{ => Resources}/Dun.h (100%) mode change 100755 => 100644 rename src/{ => Resources}/ImageContainers/CELImageContainer.cpp (99%) mode change 100755 => 100644 rename src/{ => Resources}/ImageContainers/CELImageContainer.h (93%) mode change 100755 => 100644 rename src/{ => Resources}/ImageContainers/CL2ImageContainer.cpp (99%) mode change 100755 => 100644 rename src/{ => Resources}/ImageContainers/CL2ImageContainer.h (92%) mode change 100755 => 100644 rename src/{ => Resources}/ImageContainers/DC6ImageContainer.cpp (99%) mode change 100755 => 100644 rename src/{ => Resources}/ImageContainers/DC6ImageContainer.h (94%) mode change 100755 => 100644 rename src/{ => Resources}/ImageContainers/DCCImageContainer.cpp (99%) mode change 100755 => 100644 rename src/{ => Resources}/ImageContainers/DCCImageContainer.h (93%) mode change 100755 => 100644 rename src/{ => Resources}/ImageContainers/DT1ImageContainer.cpp (100%) mode change 100755 => 100644 rename src/{ => Resources}/ImageContainers/DT1ImageContainer.h (94%) mode change 100755 => 100644 rename src/{ => Resources}/Min.cpp (96%) mode change 100755 => 100644 rename src/{ => Resources}/Min.h (92%) mode change 100755 => 100644 rename src/{ => Resources}/Pcx.cpp (98%) mode change 100755 => 100644 rename src/{ => Resources}/Pcx.h (100%) mode change 100755 => 100644 rename src/{ => Resources}/TexturePacks/CompositeTexturePack2.cpp (99%) rename src/{ => Resources}/TexturePacks/CompositeTexturePack2.h (81%) create mode 100644 src/Resources/TexturePacks/ImageContainerTexturePack2.cpp create mode 100644 src/Resources/TexturePacks/ImageContainerTexturePack2.h rename src/{ => Resources}/TexturePacks/IndexedTexturePack2.cpp (100%) rename src/{ => Resources}/TexturePacks/IndexedTexturePack2.h (70%) create mode 100644 src/Resources/TexturePacks/MultiImageContainerTexturePack2.cpp create mode 100644 src/Resources/TexturePacks/MultiImageContainerTexturePack2.h rename src/{ => Resources}/TexturePacks/StackedTexturePack2.cpp (100%) rename src/{ => Resources}/TexturePacks/StackedTexturePack2.h (70%) rename src/{TileSet.h => Resources/TileBlock.h} (50%) mode change 100755 => 100644 rename src/{ => Resources}/TileSet.cpp (95%) mode change 100755 => 100644 create mode 100644 src/Resources/TileSet.h delete mode 100644 src/TexturePacks/CachedTexturePack2.cpp delete mode 100644 src/TexturePacks/CachedTexturePack2.h rename {DGEngine.core/src => src}/Utils/iterator_tpl.h (73%) delete mode 100644 vcpkg/triplets/x64-windows-static.cmake delete mode 100644 vcpkg/triplets/x86-windows-static.cmake diff --git a/.editorconfig b/.editorconfig index ce053634..ad08aa1d 100755 --- a/.editorconfig +++ b/.editorconfig @@ -7,7 +7,7 @@ indent_size = 4 indent_style = space insert_final_newline = true -[gamefiles**.json] +[{*.json,.vscode/**.json,gamefiles**.json}] charset = utf-8 end_of_line = lf indent_size = 2 @@ -35,3 +35,9 @@ indent_size = unset indent_style = unset insert_final_newline = unset trim_trailing_whitespace = unset + +[src/Utils/iterator_tpl.h] +indent_size = unset +indent_style = unset +insert_final_newline = unset +trim_trailing_whitespace = unset diff --git a/.github/workflows/deploy_linux.yml b/.github/workflows/deploy_linux.yml new file mode 100644 index 00000000..f67ad661 --- /dev/null +++ b/.github/workflows/deploy_linux.yml @@ -0,0 +1,101 @@ +name: Deploy_Linux + +on: + workflow_dispatch: + +jobs: + deploy_linux: + name: linux deploy + runs-on: ubuntu-22.04 + steps: + - name: Checkout DGEngine + uses: actions/checkout@v3 + + - name: Restore cached dependencies + id: cache-linux-x64 + uses: actions/cache@v3 + with: + path: /home/runner/work/sfml + key: cache-linux-x64 + + - name: Install dependencies + run: | + sudo apt install -yq --no-install-suggests --no-install-recommends fuse > /dev/null + sudo apt install -yq --no-install-suggests --no-install-recommends libphysfs-dev > /dev/null + sudo apt install -yq --no-install-suggests --no-install-recommends libalut-dev libflac-dev libgl1-mesa-dev libudev-dev libvorbis-dev libxcursor-dev libxrandr-dev > /dev/null + sudo apt install -yq --no-install-suggests --no-install-recommends libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libswscale-dev > /dev/null + + - name: CMake build and install SFML + if: steps.cache-linux-x64.outputs.cache-hit != 'true' + run: | + git clone -q --depth=1 --branch=feature/scancode https://github.com/dgcor/SFML.git /home/runner/work/sfml > /dev/null + git -C /home/runner/work/sfml pull > /dev/null + cd /home/runner/work/sfml + export CC=/usr/bin/gcc-11 + export CXX=/usr/bin/g++-11 + cmake /home/runner/work/sfml/CMakeLists.txt + sudo cmake --build . --config Release --target install + + - name: Install SFML + if: steps.cache-linux-x64.outputs.cache-hit == 'true' + run: | + cd /home/runner/work/sfml + sudo make install + + - name: Setup Ninja Build + uses: turtlesec-no/get-ninja@main + + - name: CMake build DGEngine + run: | + export CC=/usr/bin/gcc-11 + export CXX=/usr/bin/g++-11 + cmake CMakeLists.txt -G "Ninja" + cmake --build . --config Release + + - name: Install LinuxDeploy + run: | + wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage -N + chmod +x linuxdeploy-x86_64.AppImage + + - name: Create AppImage + run: | + ./linuxdeploy-x86_64.AppImage \ + --executable=DGEngine \ + --appdir out/appdir \ + --desktop-file=pkg/linux/dgengine.desktop \ + --icon-file=pkg/linux/icon.png \ + --output=appimage + mv DGEngine-*-x86_64.AppImage DGEngine-x86_64.AppImage + + - name: Create DGEngine zip + run: 7z a DGEngine-linux-x86_64.AppImage.zip DGEngine-x86_64.AppImage LICENSE.* README.* main.json gamefiles* + + - name: Create AppImage with movie support + run: | + ./linuxdeploy-x86_64.AppImage \ + --executable=DGEngine \ + --library=/lib/x86_64-linux-gnu/libavcodec.so.58 \ + --library=/lib/x86_64-linux-gnu/libavformat.so.58 \ + --library=/lib/x86_64-linux-gnu/libavutil.so.56 \ + --library=/lib/x86_64-linux-gnu/libswresample.so.3 \ + --library=/lib/x86_64-linux-gnu/libswscale.so.5 \ + --appdir out/appdir \ + --desktop-file=pkg/linux/dgengine.desktop \ + --icon-file=pkg/linux/icon.png \ + --output=appimage + mv -f DGEngine-*-x86_64.AppImage DGEngine-x86_64.AppImage + + - name: Create DGEngine zip with movie support + run: 7z a DGEngine-linux-ffmpeg-x86_64.AppImage.zip DGEngine-x86_64.AppImage LICENSE.* README.* main.json gamefiles* + + - name: Create DGEngine zip artifact + uses: actions/upload-artifact@v3 + with: + name: artifact-DGEngine-linux-x86_64 + path: DGEngine-linux-x86_64.AppImage.zip + + - name: Create DGEngine zip artifact with movie support + uses: actions/upload-artifact@v3 + with: + name: artifact-DGEngine-linux-ffmpeg-x86_64 + path: DGEngine-linux-ffmpeg-x86_64.AppImage.zip diff --git a/.github/workflows/deploy_windows.yml b/.github/workflows/deploy_windows.yml new file mode 100644 index 00000000..6e77ae5d --- /dev/null +++ b/.github/workflows/deploy_windows.yml @@ -0,0 +1,97 @@ +name: Deploy_Windows + +on: + workflow_dispatch: + +jobs: + deploy_windows_x86: + name: windows deploy x86 + runs-on: windows-2022 + steps: + - name: Checkout DGEngine + uses: actions/checkout@v3 + + - name: Restore cached dependencies + id: cache-windows-x86 + uses: actions/cache@v3 + with: + path: C:/vcpkg/installed + key: cache-windows-x86 + + - name: Install dependencies + if: steps.cache-windows-x86.outputs.cache-hit != 'true' + run: vcpkg install physfs sfml ` + --overlay-ports=DGEngine.core/vcpkg/ports ` + --overlay-triplets=DGEngine.core/vcpkg/triplets ` + --triplet=x86-windows + + - name: Setup MSVC + uses: TheMrMilchmann/setup-msvc-dev@v2 + with: + arch: x86 + + - name: Setup Ninja Build + uses: turtlesec-no/get-ninja@main + + - name: CMake build DGEngine + run: | + cmake --preset windows-x86-release -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake + cmake --build --preset windows-x86-release + + - name: Create DGEngine zip + run: 7z a DGEngine-windows-x86.zip ` + ./out/build/windows-x86-release/*.exe ` + ./out/build/windows-x86-release/*.dll ` + LICENSE.* README.* main.json gamefiles* + + - name: Create DGEngine zip artifact + uses: actions/upload-artifact@v3 + with: + name: artifact-DGEngine-windows-x86 + path: DGEngine-windows-x86.zip + + deploy_windows_x64: + name: windows deploy x64 + runs-on: windows-2022 + steps: + - name: Checkout DGEngine + uses: actions/checkout@v3 + + - name: Restore cached dependencies + id: cache-windows-x64 + uses: actions/cache@v3 + with: + path: C:/vcpkg/installed + key: cache-windows-x64 + + - name: Install dependencies + if: steps.cache-windows-x64.outputs.cache-hit != 'true' + run: vcpkg install physfs sfml ` + --overlay-ports=DGEngine.core/vcpkg/ports ` + --overlay-triplets=DGEngine.core/vcpkg/triplets ` + --triplet=x64-windows + + - name: Setup MSVC + uses: TheMrMilchmann/setup-msvc-dev@v2 + with: + arch: x64 + + - name: Setup Ninja Build + uses: turtlesec-no/get-ninja@main + + - name: CMake build DGEngine + run: | + cmake --preset windows-x64-release -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake + cmake --build --preset windows-x64-release + + - name: Create DGEngine zip + run: 7z a DGEngine-windows-x64.zip ` + ./out/build/windows-x64-release/*.exe ` + ./out/build/windows-x64-release/*.dll ` + LICENSE.* README.* main.json gamefiles* + + - name: Create DGEngine zip artifact + uses: actions/upload-artifact@v3 + with: + name: artifact-DGEngine-windows-x64 + path: DGEngine-windows-x64.zip diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f1cda04d..b3b9bbab 100755 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,83 +2,86 @@ name: CI on: push: - branches: [ master ] pull_request: - branches: [ master ] jobs: build_linux: name: linux build - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Checkout DGEngine - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Restore cached dependencies - id: cache-linux - uses: actions/cache@v1 + id: cache-linux-x64 + uses: actions/cache@v3 with: path: /home/runner/work/sfml - key: cache-linux + key: cache-linux-x64 - name: Install dependencies - run: sudo apt install -yq --no-install-suggests --no-install-recommends libx11-dev libxrandr-dev libxi-dev libudev-dev libgl1-mesa-dev libalut-dev libvorbis-dev libflac-dev libphysfs-dev > /dev/null + run: | + sudo apt install -yq --no-install-suggests --no-install-recommends libphysfs-dev > /dev/null + sudo apt install -yq --no-install-suggests --no-install-recommends libalut-dev libflac-dev libgl1-mesa-dev libudev-dev libvorbis-dev libxcursor-dev libxrandr-dev > /dev/null + sudo apt install -yq --no-install-suggests --no-install-recommends libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libswscale-dev > /dev/null - - name: CMake + make SFML - if: steps.cache-linux.outputs.cache-hit != 'true' + - name: CMake build and install SFML + if: steps.cache-linux-x64.outputs.cache-hit != 'true' run: | - git clone -q --depth=1 --branch=2.5.x https://github.com/SFML/SFML.git /home/runner/work/sfml > /dev/null + git clone -q --depth=1 --branch=feature/scancode https://github.com/dgcor/SFML.git /home/runner/work/sfml > /dev/null git -C /home/runner/work/sfml pull > /dev/null cd /home/runner/work/sfml export CC=/usr/bin/gcc-11 export CXX=/usr/bin/g++-11 cmake /home/runner/work/sfml/CMakeLists.txt - sudo make install + sudo cmake --build . --config Release --target install - name: Install SFML - if: steps.cache-linux.outputs.cache-hit == 'true' + if: steps.cache-linux-x64.outputs.cache-hit == 'true' run: | cd /home/runner/work/sfml sudo make install - - name: CMake + make DGEngine + - name: Setup Ninja Build + uses: turtlesec-no/get-ninja@main + + - name: CMake build DGEngine run: | export CC=/usr/bin/gcc-11 export CXX=/usr/bin/g++-11 - cmake CMakeLists.txt - make + cmake CMakeLists.txt -G "Ninja" + cmake --build . build_windows: name: windows build - runs-on: windows-2019 + runs-on: windows-2022 steps: - name: Checkout DGEngine - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Restore cached dependencies - id: cache-windows - uses: actions/cache@v1 + id: cache-windows-x64 + uses: actions/cache@v3 with: path: C:/vcpkg/installed - key: cache-windows + key: cache-windows-x64 - name: Install dependencies - if: steps.cache-windows.outputs.cache-hit != 'true' - run: vcpkg install physfs:x86-windows-static sfml:x86-windows-static - - - name: Setup MSBuild - uses: microsoft/setup-msbuild@v1.0.2 + if: steps.cache-windows-x64.outputs.cache-hit != 'true' + run: vcpkg install physfs sfml ` + --overlay-ports=DGEngine.core/vcpkg/ports ` + --overlay-triplets=DGEngine.core/vcpkg/triplets ` + --triplet=x64-windows - - name: MSBuild DGEngine - run: | - vcpkg integrate install - msbuild DGEngine.vcxproj /p:Configuration="Release Static NoMovie" /p:Platform=Win32 + - name: Setup MSVC + uses: TheMrMilchmann/setup-msvc-dev@v2 + with: + arch: x64 - - name: Create DGEngine.zip - run: 7z a DGEngine.zip "./Release Static NoMovie/*.exe" LICENSE.* README.* main.json gamefiles* + - name: Setup Ninja Build + uses: turtlesec-no/get-ninja@main - - name: Create artifact - uses: actions/upload-artifact@v1 - with: - name: DGEngine-windows-x86 - path: DGEngine.zip + - name: CMake build DGEngine + run: | + cmake --preset windows-x64-debug -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake + cmake --build --preset windows-x64-debug diff --git a/.gitignore b/.gitignore index c4819301..ad0838c8 100755 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +!.vscode/launch.json +.vscode/* +/*.AppImage /*.cbp /*.db /*.depend @@ -31,11 +34,6 @@ /DGEngine.dir /DIABDAT /DIABDAT.* -/FFMPEG* -/FFmpeg* -/gamefilesd/res/icon.png -/gamefilesd2/res/icon.png -/gamefileshf/res/icon.png /hellfire /hellfire.* /hfmonk @@ -46,12 +44,10 @@ /hfvoice.* /Makefile /obj -/PhysicsFS +/out /portable /Release /Release NoMovie /Release Static /Release Static NoMovie -/sfeMovie -/SFML /x64 diff --git a/BUILD.txt b/BUILD.txt index fd325305..21791271 100755 --- a/BUILD.txt +++ b/BUILD.txt @@ -1,24 +1,29 @@ * Windows -To compile in Windows, you can use CMake or the Visual Studio 2019 project. +To compile in Windows, you can use CMake or open the folder with Visual Studio 2022. The easiest way to get the required dependencies is to use vcpkg. -vcpkg install physfs:x86-windows sfml:x86-windows ffmpeg:x86-windows -vcpkg install physfs:x86-windows-static sfml:x86-windows-static ffmpeg:x86-windows-static -vcpkg install physfs:x64-windows sfml:x64-windows ffmpeg:x64-windows -vcpkg install physfs:x64-windows-static sfml:x64-windows-static ffmpeg:x64-windows-static +Because SFML 2.6 is not yet released, you need to use a pre release version. +You can include it in vcpkg using a custom port for vcpkg. +https://github.com/dgcor/SFML/tree/feature/scancode + +vcpkg install physfs sfml ffmpeg --overlay-ports=vcpkg/ports --triplet=x86-windows +vcpkg install physfs sfml ffmpeg --overlay-ports=vcpkg/ports --triplet=x86-windows-static +vcpkg install physfs sfml ffmpeg --overlay-ports=vcpkg/ports --triplet=x64-windows +vcpkg install physfs sfml ffmpeg --overlay-ports=vcpkg/ports --triplet=x64-windows-static There is a custom vcpkg triplet that links ffmpeg dynamically. -vcpkg install physfs:x86-windows-static sfml:x86-windows-static ffmpeg:x86-windows-static --overlay-triplets=vcpkg/triplets -vcpkg install physfs:x64-windows-static sfml:x64-windows-static ffmpeg:x64-windows-static --overlay-triplets=vcpkg/triplets +vcpkg install physfs sfml ffmpeg --triplet=x86-windows-static --overlay-ports=vcpkg/ports --overlay-triplets=vcpkg/triplets +vcpkg install physfs sfml ffmpeg --triplet=x64-windows-static --overlay-ports=vcpkg/ports --overlay-triplets=vcpkg/triplets /PhysicsFS - https://icculus.org/physfs version >= 2.1 /SFML - https://www.sfml-dev.org/ - SFML 2.5.0 + SFML 2.6.0 (in development) + https://github.com/dgcor/SFML/tree/feature/scancode /FFmpeg - https://ffmpeg.zeranoe.com/builds/ Get both shared and dev packages (version 3.x or 4.x) @@ -29,10 +34,17 @@ USE_SFML_MOVIE_STUB which uses a stub class that does nothing instead. * Linux To compile in Linux (Ubuntu), you need gcc or clang with C++20 support -and to have both PhysicsFS >= 2.1 and SFML >= 2.5 installed. +and to have both PhysicsFS >= 2.1 and SFML >= 2.6 installed. + +Because SFML 2.6 is not yet released, you need to use a pre release version. +You will have to install it manually from this branch: +https://github.com/dgcor/SFML/tree/feature/scancode + +For Ubuntu, you can see which dependencies are required by analysing the CI build scripts +under .github\workflows\*.yml sudo apt install libphysfs-dev -sudo apt install libsfml-dev +sudo apt install libsfml-dev (skip this step until SFML 2.6 is released) Optional (for movie support) FFmpeg: @@ -81,3 +93,4 @@ instead of the built-in implementation. To disable this behavior, run like this: cmake CMakeLists.txt -DDYNAMIC_STORMLIB:BOOL=FALSE If StormLib.dll/libstorm.so isn't found, the built-in implementation is used. +In Windows, the StormLib.dll must be built with Multi-Byte Character Set, not Unicode. diff --git a/CMakeLists.txt b/CMakeLists.txt index bad5c713..3ae600dd 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,22 +1,21 @@ cmake_minimum_required(VERSION 3.12.4 FATAL_ERROR) -project(DGEngine) +# use ccache if available +find_program(CCACHE_PROGRAM ccache) +if(CCACHE_PROGRAM) + message(STATUS "Found ccache in ${CCACHE_PROGRAM}") + set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}") +endif() -add_subdirectory(DGEngine.core) +project(DGEngine) -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 MATCHES "GNU") - if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 11.0) - message(FATAL_ERROR "GCC version must be at least 11!") - endif() - if(NOT BEOS) - add_definitions(-Wall) - endif() +if(IS_DIRECTORY "${PROJECT_SOURCE_DIR}/../DGEngine.core") + add_subdirectory(${PROJECT_SOURCE_DIR}/../DGEngine.core DGEngine.core) +else() + add_subdirectory(DGEngine.core) endif() -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake_modules") +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake_modules") option(DIABLO_FORMAT_SUPPORT "Enable Diablo 1-2 file format support" TRUE) option(MPQ_SUPPORT "Enable physfs MPQ support" TRUE) @@ -28,171 +27,243 @@ if(MOVIE_SUPPORT) find_package(FFmpeg COMPONENTS avcodec avformat avutil swscale) endif() find_package(PhysFS REQUIRED) -find_package(SFML 2.5 REQUIRED system window graphics network audio) +find_package(SFML 2.5 COMPONENTS audio graphics REQUIRED) include_directories(src) set(SOURCE_FILES src/Main.cpp - src/CmdLineUtils2.cpp - src/CmdLineUtils2.h - src/Dun.cpp - src/Dun.h - src/Game2.cpp - src/Game2.h - src/GameUtils2.cpp - src/GameUtils2.h - src/Pcx.cpp - src/Pcx.h src/RegisterHooks.cpp src/RegisterHooks.h - src/ShaderManager2.cpp - src/ShaderManager2.h - src/TileSet.cpp - src/TileSet.h - src/Actions/ActItem.h - src/Actions/ActLevel.h - src/Actions/ActLevelObject.h - src/Actions/ActPlayer.h - src/Actions/ActQuest.h src/Game/Classifier.cpp src/Game/Classifier.h src/Game/Classifiers.h - src/Game/ColorLevelLayer.cpp - src/Game/ColorLevelLayer.h - src/Game/FlagsVector.h - src/Game/fsa.h + src/Game/Game2.cpp + src/Game/Game2.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/ItemLocation.h - src/Game/Level.cpp - src/Game/Level.h - src/Game/LevelBase.cpp - src/Game/LevelBase.h - src/Game/LevelCell.cpp - src/Game/LevelCell.h - src/Game/LevelFlags.h - src/Game/LevelLayer.h - src/Game/LevelMap.cpp - src/Game/LevelMap.h - src/Game/LevelObject.cpp - src/Game/LevelObject.h - src/Game/LevelObjectClass.cpp - src/Game/LevelObjectClass.h - src/Game/LevelObjectClassDefaults.h - src/Game/LevelSurface.cpp - src/Game/LevelSurface.h src/Game/LightMap.h src/Game/LightSource.h - src/Game/PathFinder.cpp - src/Game/PathFinder.h - src/Game/Player.cpp - src/Game/Player.h - src/Game/PlayerBase.cpp - src/Game/PlayerBase.h - src/Game/PlayerClass.cpp - src/Game/PlayerClass.h - src/Game/Quest.cpp - src/Game/Quest.h - src/Game/SimpleLevelObject.cpp - src/Game/SimpleLevelObject.h - src/Game/SimpleLevelObjectClass.h - src/Game/Spell.cpp - src/Game/Spell.h - src/Game/stlastar.h - src/Game/TextureLevelLayer.cpp - src/Game/TextureLevelLayer.h - src/Game/TilesetLevelLayer.cpp - src/Game/TilesetLevelLayer.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/SaveSimpleLevelObject.cpp - src/Game/Save/SaveSimpleLevelObject.h + src/Game/ShaderManager2.cpp + src/Game/ShaderManager2.h + src/Game/Actions/ActItem.h + src/Game/Actions/ActLevel.h + src/Game/Actions/ActLevelObject.h + src/Game/Actions/ActPlayer.h + src/Game/Actions/ActQuest.h + src/Game/Inventory/Inventories.h + src/Game/Inventory/Inventory.cpp + src/Game/Inventory/Inventory.h + src/Game/Item/Item.cpp + src/Game/Item/Item.h + src/Game/Item/ItemClass.cpp + src/Game/Item/ItemClass.h + src/Game/Item/ItemLevelObject.cpp + src/Game/Item/ItemLevelObject.h + src/Game/Item/ItemLocation.h + src/Game/Item/ItemSave.cpp + src/Game/Item/ItemSave.h + src/Game/Level/FlagsVector.h + src/Game/Level/fsa.h + src/Game/Level/Level.cpp + src/Game/Level/Level.h + src/Game/Level/LevelBase.cpp + src/Game/Level/LevelBase.h + src/Game/Level/LevelCell.cpp + src/Game/Level/LevelCell.h + src/Game/Level/LevelDraw.cpp + src/Game/Level/LevelDraw.h + src/Game/Level/LevelDrawable.h + src/Game/Level/LevelDrawableManager.cpp + src/Game/Level/LevelDrawableManager.h + src/Game/Level/LevelFlags.h + src/Game/Level/LevelInputManager.cpp + src/Game/Level/LevelInputManager.h + src/Game/Level/LevelItem.cpp + src/Game/Level/LevelItem.h + src/Game/Level/LevelLayer.h + src/Game/Level/LevelMap.cpp + src/Game/Level/LevelMap.h + src/Game/Level/LevelObjectManager.cpp + src/Game/Level/LevelObjectManager.h + src/Game/Level/LevelQuest.cpp + src/Game/Level/LevelQuest.h + src/Game/Level/LevelSave.cpp + src/Game/Level/LevelSave.h + src/Game/Level/LevelSurface.cpp + src/Game/Level/LevelSurface.h + src/Game/Level/LevelUIObject.cpp + src/Game/Level/LevelUIObject.h + src/Game/Level/PathFinder.cpp + src/Game/Level/PathFinder.h + src/Game/Level/stlastar.h + src/Game/Level/LevelLayers/ColorLevelLayer.cpp + src/Game/Level/LevelLayers/ColorLevelLayer.h + src/Game/Level/LevelLayers/TextureLevelLayer.cpp + src/Game/Level/LevelLayers/TextureLevelLayer.h + src/Game/Level/LevelLayers/TilesetLevelLayer.cpp + src/Game/Level/LevelLayers/TilesetLevelLayer.h + src/Game/LevelObject/LevelObject.cpp + src/Game/LevelObject/LevelObject.h + src/Game/LevelObject/LevelObjectClass.cpp + src/Game/LevelObject/LevelObjectClass.h + src/Game/LevelObject/LevelObjectClassDefaults.h + src/Game/LevelObject/LevelObjectQueryable.cpp + src/Game/LevelObject/LevelObjectQueryable.h + src/Game/Player/Player.cpp + src/Game/Player/Player.h + src/Game/Player/PlayerBase.cpp + src/Game/Player/PlayerBase.h + src/Game/Player/PlayerClass.cpp + src/Game/Player/PlayerClass.h + src/Game/Player/PlayerInventories.cpp + src/Game/Player/PlayerInventories.h + src/Game/Player/PlayerLevelObject.cpp + src/Game/Player/PlayerLevelObject.h + src/Game/Player/PlayerMove.cpp + src/Game/Player/PlayerMove.h + src/Game/Player/PlayerProperties.cpp + src/Game/Player/PlayerProperties.h + src/Game/Player/PlayerSave.cpp + src/Game/Player/PlayerSave.h + src/Game/Player/PlayerSpells.cpp + src/Game/Player/PlayerSpells.h + src/Game/Predicates/PredItem.h + src/Game/Predicates/PredLevelObject.h + src/Game/Predicates/PredPlayer.h + src/Game/Properties/AnimationSpeed.h + src/Game/Properties/InventoryPosition.h + src/Game/Properties/LevelObjValue.h + src/Game/Properties/PlayerAnimation.h + src/Game/Properties/PlayerDirection.cpp + src/Game/Properties/PlayerDirection.h + src/Game/Properties/PlayerInventory.h + src/Game/Properties/PlayerItemMount.h + src/Game/Properties/PlayerStatus.h + src/Game/Quest/Quest.cpp + src/Game/Quest/Quest.h + src/Game/SimpleLevelObject/SimpleLevelObject.cpp + src/Game/SimpleLevelObject/SimpleLevelObject.h + src/Game/SimpleLevelObject/SimpleLevelObjectClass.h + src/Game/SimpleLevelObject/SimpleLevelObjectLevelObject.cpp + src/Game/SimpleLevelObject/SimpleLevelObjectLevelObject.h + src/Game/SimpleLevelObject/SimpleLevelObjectSave.cpp + src/Game/SimpleLevelObject/SimpleLevelObjectSave.h + src/Game/Spell/Spell.cpp + src/Game/Spell/Spell.h + src/Game/Spell/SpellInstance.cpp + src/Game/Spell/SpellInstance.h + src/Game/Utils/CmdLineUtils2.cpp + src/Game/Utils/CmdLineUtils2.h + src/Game/Utils/GameUtils2.cpp + src/Game/Utils/GameUtils2.h src/Parser/ParseAction2.cpp src/Parser/ParseAction2.h - src/Parser/ParseClassifier.cpp - src/Parser/ParseClassifier.h src/Parser/ParseFile2.cpp src/Parser/ParseFile2.h - src/Parser/ParseItem.cpp - src/Parser/ParseItem.h - src/Parser/ParseItemClass.cpp - src/Parser/ParseItemClass.h - src/Parser/ParseLevel.cpp - src/Parser/ParseLevel.h - src/Parser/ParseLevelObject.cpp - src/Parser/ParseLevelObject.h - src/Parser/ParseLevelObjectClass.cpp - src/Parser/ParseLevelObjectClass.h - src/Parser/ParsePanel2.cpp - src/Parser/ParsePanel2.h - src/Parser/ParsePlayer.cpp - src/Parser/ParsePlayer.h - src/Parser/ParsePlayerClass.cpp - src/Parser/ParsePlayerClass.h src/Parser/ParsePredicate2.cpp src/Parser/ParsePredicate2.h - src/Parser/ParseQuest.cpp - src/Parser/ParseQuest.h - src/Parser/ParseSpell.cpp - src/Parser/ParseSpell.h - src/Parser/ParseTexture2.cpp - src/Parser/ParseTexture2.h - src/Parser/ParseTexturePack2.cpp - src/Parser/ParseTexturePack2.h + src/Parser/Actions/ParseItemActions.cpp + src/Parser/Actions/ParseItemActions.h + src/Parser/Actions/ParseLevelActions.cpp + src/Parser/Actions/ParseLevelActions.h + src/Parser/Actions/ParseLevelObjectActions.cpp + src/Parser/Actions/ParseLevelObjectActions.h + src/Parser/Actions/ParsePlayerActions.cpp + src/Parser/Actions/ParsePlayerActions.h + src/Parser/Actions/ParseQuestActions.cpp + src/Parser/Actions/ParseQuestActions.h + src/Parser/Classifier/ParseClassifier.cpp + src/Parser/Classifier/ParseClassifier.h + src/Parser/Drawables/ParsePanel2.cpp + src/Parser/Drawables/ParsePanel2.h + src/Parser/Item/ParseItem.cpp + src/Parser/Item/ParseItem.h + src/Parser/Item/ParseItemClass.cpp + src/Parser/Item/ParseItemClass.h + src/Parser/Level/ParseLevel.cpp + src/Parser/Level/ParseLevel.h + src/Parser/Level/ParseLevelAutoMap.cpp + src/Parser/Level/ParseLevelAutoMap.h + src/Parser/Level/ParseLevelLayer.cpp + src/Parser/Level/ParseLevelLayer.h + src/Parser/Level/ParseLevelMap.cpp + src/Parser/Level/ParseLevelMap.h + src/Parser/LevelObject/ParseLevelObject.cpp + src/Parser/LevelObject/ParseLevelObject.h + src/Parser/LevelObject/ParseLevelObjectClass.cpp + src/Parser/LevelObject/ParseLevelObjectClass.h + src/Parser/LevelObject/ParseLevelObjectClassCommon.cpp + src/Parser/LevelObject/ParseLevelObjectClassCommon.h + src/Parser/LevelObject/ParseLevelObjectCommon.cpp + src/Parser/LevelObject/ParseLevelObjectCommon.h + src/Parser/Player/ParsePlayer.cpp + src/Parser/Player/ParsePlayer.h + src/Parser/Player/ParsePlayerClass.cpp + src/Parser/Player/ParsePlayerClass.h + src/Parser/Player/ParsePlayerInventories.cpp + src/Parser/Player/ParsePlayerInventories.h + src/Parser/Player/ParsePlayerSpells.cpp + src/Parser/Player/ParsePlayerSpells.h + src/Parser/Quest/ParseQuest.cpp + src/Parser/Quest/ParseQuest.h + src/Parser/Resources/ParseTexture2.cpp + src/Parser/Resources/ParseTexture2.h + src/Parser/Resources/ParseTexturePack2.cpp + src/Parser/Resources/ParseTexturePack2.h + src/Parser/Resources/TexturePacks/ParseCompositeTexturePack2.cpp + src/Parser/Resources/TexturePacks/ParseCompositeTexturePack2.h + src/Parser/Resources/TexturePacks/ParseImageContainerTexturePack2.cpp + src/Parser/Resources/TexturePacks/ParseImageContainerTexturePack2.h + src/Parser/Spell/ParseSpell.cpp + src/Parser/Spell/ParseSpell.h src/Parser/Utils/ParseUtilsGameKey.cpp src/Parser/Utils/ParseUtilsGameKey.h src/Parser/Utils/ParseUtilsGameVal.cpp src/Parser/Utils/ParseUtilsGameVal.h - src/Predicates/PredItem.h - src/Predicates/PredLevelObject.h - src/Predicates/PredPlayer.h + src/Resources/Dun.cpp + src/Resources/Dun.h + src/Resources/Pcx.cpp + src/Resources/Pcx.h + src/Resources/TexturePacks/CompositeTexturePack2.cpp + src/Resources/TexturePacks/CompositeTexturePack2.h + src/Resources/TexturePacks/ImageContainerTexturePack2.cpp + src/Resources/TexturePacks/ImageContainerTexturePack2.h + src/Resources/TexturePacks/IndexedTexturePack2.cpp + src/Resources/TexturePacks/IndexedTexturePack2.h + src/Resources/TexturePacks/MultiImageContainerTexturePack2.cpp + src/Resources/TexturePacks/MultiImageContainerTexturePack2.h + src/Resources/TexturePacks/StackedTexturePack2.cpp + src/Resources/TexturePacks/StackedTexturePack2.h + src/Resources/TileBlock.h + src/Resources/TileSet.cpp + src/Resources/TileSet.h src/SFML/GradientCircle.cpp src/SFML/GradientCircle.h - src/TexturePacks/CachedTexturePack2.cpp - src/TexturePacks/CachedTexturePack2.h - src/TexturePacks/CompositeTexturePack2.cpp - src/TexturePacks/CompositeTexturePack2.h - src/TexturePacks/IndexedTexturePack2.cpp - src/TexturePacks/IndexedTexturePack2.h - src/TexturePacks/StackedTexturePack2.cpp - src/TexturePacks/StackedTexturePack2.h + src/Utils/iterator_tpl.h ) if(DIABLO_FORMAT_SUPPORT) add_definitions(-DDGENGINE_DIABLO_FORMAT_SUPPORT) SET(SOURCE_FILES ${SOURCE_FILES} - src/DS1.cpp - src/DS1.h - src/Min.cpp - src/Min.h - src/Game/LevelHelper.cpp - src/Game/LevelHelper.h - src/ImageContainers/CELImageContainer.cpp - src/ImageContainers/CELImageContainer.h - src/ImageContainers/CL2ImageContainer.cpp - src/ImageContainers/CL2ImageContainer.h - src/ImageContainers/DC6ImageContainer.cpp - src/ImageContainers/DC6ImageContainer.h - src/ImageContainers/DCCImageContainer.cpp - src/ImageContainers/DCCImageContainer.h - src/ImageContainers/DT1ImageContainer.cpp - src/ImageContainers/DT1ImageContainer.h - src/Parser/ParseImageContainer2.cpp - src/Parser/ParseImageContainer2.h + src/Game/Level/LevelHelper.cpp + src/Game/Level/LevelHelper.h + src/Parser/Resources/ParseImageContainer2.cpp + src/Parser/Resources/ParseImageContainer2.h + src/Resources/DS1.cpp + src/Resources/DS1.h + src/Resources/ImageContainers/CELImageContainer.cpp + src/Resources/ImageContainers/CELImageContainer.h + src/Resources/ImageContainers/CL2ImageContainer.cpp + src/Resources/ImageContainers/CL2ImageContainer.h + src/Resources/ImageContainers/DC6ImageContainer.cpp + src/Resources/ImageContainers/DC6ImageContainer.h + src/Resources/ImageContainers/DCCImageContainer.cpp + src/Resources/ImageContainers/DCCImageContainer.h + src/Resources/ImageContainers/DT1ImageContainer.cpp + src/Resources/ImageContainers/DT1ImageContainer.h + src/Resources/Min.cpp + src/Resources/Min.h ) if(MPQ_SUPPORT) @@ -234,13 +305,26 @@ endif() add_executable(${PROJECT_NAME} ${SOURCE_FILES}) +if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") + target_compile_options(${PROJECT_NAME} PRIVATE -Wall -stdlib=libc++) + target_link_options(${PROJECT_NAME} PRIVATE -stdlib=libc++) +elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU") + if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 11.1) + message(FATAL_ERROR "GCC version must be at least 11.1!") + endif() + target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wpedantic) +elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + target_compile_options(${PROJECT_NAME} PRIVATE /GF /EHsc /W3 /wd4250 /wd4996) + target_link_options(${PROJECT_NAME} PRIVATE /OPT:ICF /OPT:REF) +endif() + if(FFmpeg_FOUND) include_directories(${FFmpeg_INCLUDES}) target_link_libraries(${PROJECT_NAME} ${FFmpeg_LIBRARIES}) endif() -include_directories(${PHYSFS_INCLUDE_DIRS} ${SFML_INCLUDE_DIR}) -target_link_libraries(${PROJECT_NAME} ${PHYSFS_LIBRARY} ${SFML_LIBRARIES}) +include_directories(${PHYSFS_INCLUDE_DIRS}) +target_link_libraries(${PROJECT_NAME} ${PHYSFS_LIBRARY} sfml-audio sfml-graphics) target_link_libraries(${PROJECT_NAME} DGEngine.core) diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 00000000..7236200c --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,394 @@ +{ + "version": 3, + "configurePresets": [ + { + "name": "linux-base", + "description": "Target Linux.", + "hidden": true, + "generator": "Ninja", + "binaryDir": "${sourceDir}/out/build/${presetName}", + "installDir": "${sourceDir}/out/install/${presetName}", + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Linux" + } + }, + { + "name": "linux-base-clang", + "description": "Target Linux (clang).", + "hidden": true, + "inherits": "linux-base", + "cacheVariables": { + "CMAKE_C_COMPILER": "clang", + "CMAKE_CXX_COMPILER": "clang++" + } + }, + { + "name": "linux-base-gcc", + "description": "Target Linux (gcc).", + "hidden": true, + "inherits": "linux-base", + "cacheVariables": { + "CMAKE_C_COMPILER": "gcc", + "CMAKE_CXX_COMPILER": "g++" + } + }, + { + "name": "linux-base-x64", + "hidden": true, + "inherits": "linux-base", + "architecture": { + "value": "x64", + "strategy": "external" + } + }, + { + "name": "linux-base-x64-clang", + "hidden": true, + "inherits": "linux-base-clang", + "architecture": { + "value": "x64", + "strategy": "external" + } + }, + { + "name": "linux-base-x64-gcc", + "hidden": true, + "inherits": "linux-base-gcc", + "architecture": { + "value": "x64", + "strategy": "external" + } + }, + { + "name": "linux-x64-debug", + "displayName": "x64 Debug", + "description": "Target Linux (64-bit). (Debug)", + "inherits": "linux-base-x64", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug" + } + }, + { + "name": "linux-x64-debug-clang", + "displayName": "x64 Debug Clang", + "description": "Target Linux Clang (64-bit). (Debug)", + "inherits": "linux-base-x64-clang", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug" + } + }, + { + "name": "linux-x64-debug-gcc", + "displayName": "x64 Debug GCC", + "description": "Target Linux GCC (64-bit). (Debug)", + "inherits": "linux-base-x64-gcc", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug" + } + }, + { + "name": "linux-x64-debug-nomovie", + "displayName": "x64 Debug NoMovie", + "inherits": "linux-x64-debug", + "cacheVariables": { + "MOVIE_SUPPORT": false + } + }, + { + "name": "linux-x64-release", + "displayName": "x64 Release", + "description": "Target Linux (64-bit). (Release)", + "inherits": "linux-x64-debug", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + }, + { + "name": "linux-x64-release-clang", + "displayName": "x64 Release Clang", + "description": "Target Linux Clang (64-bit). (Release)", + "inherits": "linux-x64-debug-clang", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + }, + { + "name": "linux-x64-release-gcc", + "displayName": "x64 Release GCC", + "description": "Target Linux GCC (64-bit). (Release)", + "inherits": "linux-x64-debug-gcc", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + }, + { + "name": "linux-x64-release-nomovie", + "displayName": "x64 Release NoMovie", + "inherits": "linux-x64-release", + "cacheVariables": { + "MOVIE_SUPPORT": false + } + }, + { + "name": "windows-base", + "description": "Target Windows with the Visual Studio development environment.", + "hidden": true, + "generator": "Ninja", + "binaryDir": "${sourceDir}/out/build/${presetName}", + "installDir": "${sourceDir}/out/install/${presetName}", + "cacheVariables": { + "CMAKE_C_COMPILER": "cl.exe", + "CMAKE_CXX_COMPILER": "cl.exe", + "CMAKE_TOOLCHAIN_FILE": { + "value": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake", + "type": "FILEPATH" + } + }, + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Windows" + } + }, + { + "name": "windows-x64-debug", + "displayName": "x64 Debug", + "description": "Target Windows (64-bit) with the Visual Studio development environment. (Debug)", + "inherits": "windows-base", + "architecture": { + "value": "x64", + "strategy": "external" + }, + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "VCPKG_TARGET_TRIPLET": "x64-windows" + } + }, + { + "name": "windows-x64-debug-nodiabloformatsupport", + "displayName": "x64 Debug NoDiabloFormatSupport", + "inherits": "windows-x64-debug", + "cacheVariables": { + "DIABLO_FORMAT_SUPPORT": false + } + }, + { + "name": "windows-x64-debug-nomovie", + "displayName": "x64 Debug NoMovie", + "inherits": "windows-x64-debug", + "cacheVariables": { + "MOVIE_SUPPORT": false + } + }, + { + "name": "windows-x64-release", + "displayName": "x64 Release", + "description": "Target Windows (64-bit) with the Visual Studio development environment. (Release)", + "inherits": "windows-x64-debug", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + }, + { + "name": "windows-x64-release-nomovie", + "displayName": "x64 Release NoMovie", + "inherits": "windows-x64-release", + "cacheVariables": { + "MOVIE_SUPPORT": false + } + }, + { + "name": "windows-x64-release-nomovie-static", + "displayName": "x64 Release NoMovie Static", + "inherits": "windows-x64-release-static", + "cacheVariables": { + "MOVIE_SUPPORT": false + } + }, + { + "name": "windows-x64-release-static", + "displayName": "x64 Release Static", + "inherits": "windows-x64-release", + "cacheVariables": { + "VCPKG_TARGET_TRIPLET": "x64-windows-static" + } + }, + { + "name": "windows-x86-debug", + "displayName": "x86 Debug", + "description": "Target Windows (32-bit) with the Visual Studio development environment. (Debug)", + "inherits": "windows-base", + "architecture": { + "value": "x86", + "strategy": "external" + }, + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "VCPKG_TARGET_TRIPLET": "x86-windows" + } + }, + { + "name": "windows-x86-debug-nodiabloformatsupport", + "displayName": "x86 Debug NoDiabloFormatSupport", + "inherits": "windows-x86-debug", + "cacheVariables": { + "DIABLO_FORMAT_SUPPORT": false + } + }, + { + "name": "windows-x86-debug-nomovie", + "displayName": "x86 Debug NoMovie", + "inherits": "windows-x86-debug", + "cacheVariables": { + "MOVIE_SUPPORT": false + } + }, + { + "name": "windows-x86-release", + "displayName": "x86 Release", + "description": "Target Windows (32-bit) with the Visual Studio development environment. (Release)", + "inherits": "windows-x86-debug", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + }, + { + "name": "windows-x86-release-nomovie", + "displayName": "x86 Release NoMovie", + "inherits": "windows-x86-release", + "cacheVariables": { + "MOVIE_SUPPORT": false + } + }, + { + "name": "windows-x86-release-nomovie-static", + "displayName": "x86 Release NoMovie Static", + "inherits": "windows-x86-release-static", + "cacheVariables": { + "MOVIE_SUPPORT": false + } + }, + { + "name": "windows-x86-release-static", + "displayName": "x86 Release Static", + "inherits": "windows-x86-release", + "cacheVariables": { + "VCPKG_TARGET_TRIPLET": "x86-windows-static" + } + } + ], + "buildPresets": [ + { + "name": "linux-x64-debug", + "configurePreset": "linux-x64-debug", + "displayName": "x64 Debug" + }, + { + "name": "linux-x64-debug-clang", + "configurePreset": "linux-x64-debug-clang", + "displayName": "x64 Debug" + }, + { + "name": "linux-x64-debug-gcc", + "configurePreset": "linux-x64-debug-gcc", + "displayName": "x64 Debug" + }, + { + "name": "linux-x64-debug-nomovie", + "configurePreset": "linux-x64-debug-nomovie", + "displayName": "x64 Debug NoMovie" + }, + { + "name": "linux-x64-release", + "configurePreset": "linux-x64-release", + "displayName": "x64 Release" + }, + { + "name": "linux-x64-release-clang", + "configurePreset": "linux-x64-release-clang", + "displayName": "x64 Release" + }, + { + "name": "linux-x64-release-gcc", + "configurePreset": "linux-x64-release-gcc", + "displayName": "x64 Release" + }, + { + "name": "linux-x64-release-nomovie", + "configurePreset": "linux-x64-release-nomovie", + "displayName": "x64 Release NoMovie" + }, + { + "name": "windows-x64-debug", + "configurePreset": "windows-x64-debug", + "displayName": "x64 Debug" + }, + { + "name": "windows-x64-debug-nodiabloformatsupport", + "configurePreset": "windows-x64-debug-nodiabloformatsupport", + "displayName": "x64 Debug NoDiabloFormatSupport" + }, + { + "name": "windows-x64-debug-nomovie", + "configurePreset": "windows-x64-debug-nomovie", + "displayName": "x64 Debug NoMovie" + }, + { + "name": "windows-x64-release", + "configurePreset": "windows-x64-release", + "displayName": "x64 Release" + }, + { + "name": "windows-x64-release-nomovie", + "configurePreset": "windows-x64-release-nomovie", + "displayName": "x64 Release NoMovie" + }, + { + "name": "windows-x64-release-nomovie-static", + "configurePreset": "windows-x64-release-nomovie-static", + "displayName": "x64 Release NoMovie Static" + }, + { + "name": "windows-x64-release-static", + "configurePreset": "windows-x64-release-static", + "displayName": "x64 Release Static" + }, + { + "name": "windows-x86-debug", + "configurePreset": "windows-x86-debug", + "displayName": "x86 Debug" + }, + { + "name": "windows-x86-debug-nodiabloformatsupport", + "configurePreset": "windows-x86-debug-nodiabloformatsupport", + "displayName": "x86 Debug NoDiabloFormatSupport" + }, + { + "name": "windows-x86-debug-nomovie", + "configurePreset": "windows-x86-debug-nomovie", + "displayName": "x86 Debug NoMovie" + }, + { + "name": "windows-x86-release", + "configurePreset": "windows-x86-release", + "displayName": "x86 Release" + }, + { + "name": "windows-x86-release-nomovie", + "configurePreset": "windows-x86-release-nomovie", + "displayName": "x86 Release NoMovie" + }, + { + "name": "windows-x86-release-nomovie-static", + "configurePreset": "windows-x86-release-nomovie-static", + "displayName": "x86 Release NoMovie Static" + }, + { + "name": "windows-x86-release-static", + "configurePreset": "windows-x86-release-static", + "displayName": "x86 Release Static" + } + ] +} \ No newline at end of file diff --git a/DGEngine.core/.editorconfig b/DGEngine.core/.editorconfig index 68920355..54460995 100644 --- a/DGEngine.core/.editorconfig +++ b/DGEngine.core/.editorconfig @@ -7,7 +7,7 @@ indent_size = 4 indent_style = space insert_final_newline = true -[gamefiles**.json] +[{*.json,.vscode/**.json,gamefiles**.json}] charset = utf-8 end_of_line = lf indent_size = 2 @@ -42,7 +42,7 @@ indent_style = unset insert_final_newline = unset trim_trailing_whitespace = unset -[src/Utils/{iterator_tpl.h,re.*}] +[src/Utils/re.*] indent_size = unset indent_style = unset insert_final_newline = unset diff --git a/DGEngine.core/.github/workflows/main.yml b/DGEngine.core/.github/workflows/main.yml index 05fe047a..6c915983 100644 --- a/DGEngine.core/.github/workflows/main.yml +++ b/DGEngine.core/.github/workflows/main.yml @@ -9,25 +9,28 @@ on: jobs: build_linux: name: linux build - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Checkout DGEngine.core - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Restore cached dependencies - id: cache-linux - uses: actions/cache@v1 + id: cache-linux-x64 + uses: actions/cache@v3 with: path: /home/runner/work/sfml - key: cache-linux + key: cache-linux-x64 - name: Install dependencies - run: sudo apt install -yq --no-install-suggests --no-install-recommends libx11-dev libxrandr-dev libxi-dev libudev-dev libgl1-mesa-dev libalut-dev libvorbis-dev libflac-dev libphysfs-dev > /dev/null + run: | + sudo apt install -yq --no-install-suggests --no-install-recommends libphysfs-dev > /dev/null + sudo apt install -yq --no-install-suggests --no-install-recommends libalut-dev libflac-dev libgl1-mesa-dev libudev-dev libvorbis-dev libxcursor-dev libxrandr-dev > /dev/null + sudo apt install -yq --no-install-suggests --no-install-recommends libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libswscale-dev > /dev/null - name: CMake + make SFML - if: steps.cache-linux.outputs.cache-hit != 'true' + if: steps.cache-linux-x64.outputs.cache-hit != 'true' run: | - git clone -q --depth=1 --branch=2.5.x https://github.com/SFML/SFML.git /home/runner/work/sfml > /dev/null + git clone -q --depth=1 --branch=feature/scancode https://github.com/dgcor/SFML.git /home/runner/work/sfml > /dev/null git -C /home/runner/work/sfml pull > /dev/null cd /home/runner/work/sfml export CC=/usr/bin/gcc-11 @@ -36,40 +39,48 @@ jobs: sudo make install - name: Install SFML - if: steps.cache-linux.outputs.cache-hit == 'true' + if: steps.cache-linux-x64.outputs.cache-hit == 'true' run: | cd /home/runner/work/sfml sudo make install - - name: CMake + make DGEngine.core + - name: Setup Ninja Build + uses: turtlesec-no/get-ninja@main + + - name: CMake build DGEngine.core run: | export CC=/usr/bin/gcc-11 export CXX=/usr/bin/g++-11 - cmake CMakeLists.txt - make + cmake CMakeLists.txt -G "Ninja" + cmake --build . build_windows: name: windows build - runs-on: windows-2019 + runs-on: windows-2022 steps: - name: Checkout DGEngine.core - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Restore cached dependencies - id: cache-windows - uses: actions/cache@v1 + id: cache-windows-x64 + uses: actions/cache@v3 with: path: C:/vcpkg/installed - key: cache-windows + key: cache-windows-x64 - name: Install dependencies - if: steps.cache-windows.outputs.cache-hit != 'true' - run: vcpkg install physfs:x86-windows-static sfml:x86-windows-static + if: steps.cache-windows-x64.outputs.cache-hit != 'true' + run: vcpkg install physfs sfml --overlay-ports=vcpkg/ports --overlay-triplets=vcpkg/triplets --triplet=x64-windows + + - name: Setup MSVC + uses: TheMrMilchmann/setup-msvc-dev@v2 + with: + arch: x64 - - name: Setup MSBuild - uses: microsoft/setup-msbuild@v1.0.2 + - name: Setup Ninja Build + uses: turtlesec-no/get-ninja@main - - name: MSBuild DGEngine.core + - name: CMake build DGEngine.core run: | - vcpkg integrate install - msbuild DGEngine.core.vcxproj /p:Configuration="Release Static NoMovie" /p:Platform=Win32 + cmake --preset windows-x64-release -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake + cmake --build --preset windows-x64-release diff --git a/DGEngine.core/.gitignore b/DGEngine.core/.gitignore index 6ccc9943..1d6118d6 100644 --- a/DGEngine.core/.gitignore +++ b/DGEngine.core/.gitignore @@ -1,3 +1,5 @@ +.vscode/* +/*.AppImage /*.cbp /*.db /*.depend @@ -22,6 +24,7 @@ /DGEngine.core.dir /Makefile /obj +/out /portable /Release /Release NoMovie diff --git a/DGEngine.core/BUILD.txt b/DGEngine.core/BUILD.txt index 2ca7cc14..66c131ae 100644 --- a/DGEngine.core/BUILD.txt +++ b/DGEngine.core/BUILD.txt @@ -1,24 +1,29 @@ * Windows -To compile in Windows, you can use CMake or the Visual Studio 2019 project. +To compile in Windows, you can use CMake or open the folder with Visual Studio 2022. The easiest way to get the required dependencies is to use vcpkg. -vcpkg install physfs:x86-windows sfml:x86-windows ffmpeg:x86-windows -vcpkg install physfs:x86-windows-static sfml:x86-windows-static ffmpeg:x86-windows-static -vcpkg install physfs:x64-windows sfml:x64-windows ffmpeg:x64-windows -vcpkg install physfs:x64-windows-static sfml:x64-windows-static ffmpeg:x64-windows-static +Because SFML 2.6 is not yet released, you need to use a pre release version. +You can include it in vcpkg using a custom port for vcpkg. +https://github.com/dgcor/SFML/tree/feature/scancode + +vcpkg install physfs sfml ffmpeg --overlay-ports=vcpkg/ports --triplet=x86-windows +vcpkg install physfs sfml ffmpeg --overlay-ports=vcpkg/ports --triplet=x86-windows-static +vcpkg install physfs sfml ffmpeg --overlay-ports=vcpkg/ports --triplet=x64-windows +vcpkg install physfs sfml ffmpeg --overlay-ports=vcpkg/ports --triplet=x64-windows-static There is a custom vcpkg triplet that links ffmpeg dynamically. -vcpkg install physfs:x86-windows-static sfml:x86-windows-static ffmpeg:x86-windows-static --overlay-triplets=vcpkg/triplets -vcpkg install physfs:x64-windows-static sfml:x64-windows-static ffmpeg:x64-windows-static --overlay-triplets=vcpkg/triplets +vcpkg install physfs sfml ffmpeg --triplet=x86-windows-static --overlay-ports=vcpkg/ports --overlay-triplets=vcpkg/triplets +vcpkg install physfs sfml ffmpeg --triplet=x64-windows-static --overlay-ports=vcpkg/ports --overlay-triplets=vcpkg/triplets /PhysicsFS - https://icculus.org/physfs version >= 2.1 /SFML - https://www.sfml-dev.org/ - SFML 2.5.0 + SFML 2.6.0 (in development) + https://github.com/dgcor/SFML/tree/feature/scancode /FFmpeg - https://ffmpeg.zeranoe.com/builds/ Get both shared and dev packages (version 3.x or 4.x) @@ -29,10 +34,17 @@ USE_SFML_MOVIE_STUB which uses a stub class that does nothing instead. * Linux To compile in Linux (Ubuntu), you need gcc or clang with C++20 support -and to have both PhysicsFS >= 2.1 and SFML >= 2.5 installed. +and to have both PhysicsFS >= 2.1 and SFML >= 2.6 installed. + +Because SFML 2.6 is not yet released, you need to use a pre release version. +You will have to install it manually from this branch: +https://github.com/dgcor/SFML/tree/feature/scancode + +For Ubuntu, you can see which dependencies are required by analysing the CI build scripts +under .github\workflows\*.yml sudo apt install libphysfs-dev -sudo apt install libsfml-dev +sudo apt install libsfml-dev (skip this step until SFML 2.6 is released) Optional (for movie support) FFmpeg: diff --git a/DGEngine.core/CMakeLists.txt b/DGEngine.core/CMakeLists.txt index 1b0de8aa..5ee70974 100644 --- a/DGEngine.core/CMakeLists.txt +++ b/DGEngine.core/CMakeLists.txt @@ -1,20 +1,15 @@ cmake_minimum_required(VERSION 3.12.4 FATAL_ERROR) -project(DGEngine.core VERSION 1.0.0) - -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 MATCHES "GNU") - if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 11.0) - message(FATAL_ERROR "GCC version must be at least 11!") - endif() - if(NOT BEOS) - add_definitions(-Wall) - endif() +# use ccache if available +find_program(CCACHE_PROGRAM ccache) +if(CCACHE_PROGRAM) + message(STATUS "Found ccache in ${CCACHE_PROGRAM}") + set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}") endif() -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake_modules") +project(DGEngine.core VERSION 1.1.0) + +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake_modules") option(MOVIE_SUPPORT "Enable Movie support" TRUE) option(FALLBACK_TO_LOWERCASE "Enable falling back to all lowercase names if file is not found" TRUE) @@ -23,217 +18,298 @@ if(MOVIE_SUPPORT) find_package(FFmpeg COMPONENTS avcodec avformat avutil swscale) endif() find_package(PhysFS REQUIRED) -find_package(SFML 2.5 REQUIRED system window graphics network audio) +find_package(SFML 2.6 COMPONENTS audio graphics REQUIRED) include_directories(src) set(SOURCE_FILES - src/Alignment.h - src/Anchor.h - src/Animation.cpp - src/Animation.h - src/AnimationInfo.h - src/AnimationType.h - src/AudioSource.h - src/BaseAnimation.cpp - src/BaseAnimation.h - src/BindableText.cpp - src/BindableText.h - src/BindingFlags.h - src/BitmapButton.cpp - src/BitmapButton.h - src/BitmapFont.cpp - src/BitmapFont.h - src/BitmapText.cpp - src/BitmapText.h - src/BlendMode.h - src/Button.cpp - src/Button.h - src/CachedImagePack.cpp - src/CachedImagePack.h - src/Circle.cpp - src/Circle.h - src/CmdLineUtils.cpp - src/CmdLineUtils.h - src/DrawableText.h - src/Event.cpp - src/Event.h - src/EventManager.h - src/FadeInOut.cpp - src/FadeInOut.h - src/FileBytes.h - src/FileUtils.cpp - src/FileUtils.h - src/Font.h - src/Formula.cpp - src/Formula.h - src/Formulas.h - src/FreeTypeFont.h - src/Game.cpp - src/Game.h - src/GameUtils.cpp - src/GameUtils.h src/Hooks.cpp src/Hooks.h - src/IfCondition.cpp - src/IfCondition.h - src/IgnoreResource.h - src/Image.cpp - src/Image.h - src/ImageUtils.cpp - src/ImageUtils.h - src/InputEvent.cpp - src/InputEvent.h - src/InputText.cpp - src/InputText.h - src/LoadingScreen.cpp - src/LoadingScreen.h - src/Menu.cpp - src/Menu.h - src/Movie2.cpp - src/Movie2.h - src/Palette.cpp - src/Palette.h - src/Panel.cpp - src/Panel.h - src/Queryable.h - src/Rectangle.cpp - src/Rectangle.h - src/ResourceManager.cpp - src/ResourceManager.h - src/Scrollable.cpp - src/Scrollable.h - src/Shader.h - src/ShaderManager.cpp - src/ShaderManager.h - src/Shape.cpp - src/Shape.h - src/StreamReader.h - src/StringButton.cpp - src/StringButton.h - src/StringText.cpp - src/StringText.h - src/Text.cpp - src/Text.h - src/TextureInfo.h - src/TextUtils.cpp - src/TextUtils.h - src/UIObject.cpp - src/UIObject.h - src/Variable.cpp - src/Variable.h - src/VarOrPredicate.h - src/Actions/ActAction.h - src/Actions/ActAnimation.h - src/Actions/ActAudio.h - src/Actions/ActButton.h - src/Actions/ActCondition.h - src/Actions/ActCursor.h - src/Actions/ActDrawable.h - 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 - src/Actions/ActIO.h - src/Actions/Action.h - src/Actions/ActiontList.h - src/Actions/ActLoad.h - src/Actions/ActLoadingScreen.h - src/Actions/ActMenu.h - src/Actions/ActMount.h - src/Actions/ActMovie.h - src/Actions/ActPalette.h - src/Actions/ActRandom.h - src/Actions/ActResource.h - src/Actions/ActScrollable.h - src/Actions/ActShader.h - src/Actions/ActSound.h - src/Actions/ActText.h - src/Actions/ActVariable.h - src/Actions/ActVisibility.h - src/Game/Save/SaveProperties.h - src/Game/Save/SaveUtils.cpp - src/Game/Save/SaveUtils.h - src/ImageContainers/ImageContainer.h - src/ImageContainers/SimpleImageContainer.cpp - src/ImageContainers/SimpleImageContainer.h + src/Game/Action.h + src/Game/ActionQueryable.h + src/Game/Alignment.h + src/Game/Anchor.h + src/Game/AnimationInfo.h + src/Game/AnimationType.h + src/Game/BaseAnimation.cpp + src/Game/BaseAnimation.h + src/Game/BindingFlags.h + src/Game/BlendMode.h + src/Game/Event.cpp + src/Game/Event.h + src/Game/EventManager.cpp + src/Game/EventManager.h + src/Game/FadeInOut.cpp + src/Game/FadeInOut.h + src/Game/Formula.cpp + src/Game/Formula.h + src/Game/Formulas.h + src/Game/Game.cpp + src/Game/Game.h + src/Game/GameInputEventManager.cpp + src/Game/GameInputEventManager.h + src/Game/GameQueryable.cpp + src/Game/GameQueryable.h + src/Game/IfCondition.cpp + src/Game/IfCondition.h + src/Game/IgnoreResource.h + src/Game/InputEvent.cpp + src/Game/InputEvent.h + src/Game/Predicate.h + src/Game/Queryable.cpp + src/Game/Queryable.h + src/Game/QueryObject.h + src/Game/ResourceBundle.h + src/Game/ResourceManager.cpp + src/Game/ResourceManager.h + src/Game/ShaderManager.cpp + src/Game/ShaderManager.h + src/Game/TextureInfo.h + src/Game/TextureQueryable.h + src/Game/UIObject.cpp + src/Game/UIObject.h + src/Game/Variable.h + src/Game/VariableManager.cpp + src/Game/VariableManager.h + src/Game/VarOrPredicate.h + src/Game/VarOrQueryObject.h + src/Game/Actions/ActAction.h + src/Game/Actions/ActAnimation.h + src/Game/Actions/ActAudio.h + src/Game/Actions/ActButton.h + src/Game/Actions/ActCondition.h + src/Game/Actions/ActCursor.h + src/Game/Actions/ActDrawable.h + src/Game/Actions/ActEvent.h + src/Game/Actions/ActFade.h + src/Game/Actions/ActFocus.h + src/Game/Actions/ActFont.h + src/Game/Actions/ActGame.h + src/Game/Actions/ActImage.h + src/Game/Actions/ActInputText.h + src/Game/Actions/ActIO.h + src/Game/Actions/ActionList.h + src/Game/Actions/ActLoad.h + src/Game/Actions/ActLoadingScreen.h + src/Game/Actions/ActMenu.h + src/Game/Actions/ActMount.h + src/Game/Actions/ActMovie.h + src/Game/Actions/ActPalette.h + src/Game/Actions/ActRandom.h + src/Game/Actions/ActResource.h + src/Game/Actions/ActScrollable.h + src/Game/Actions/ActShader.h + src/Game/Actions/ActSound.h + src/Game/Actions/ActText.h + src/Game/Actions/ActVariable.h + src/Game/Actions/ActVisibility.h + src/Game/Drawables/Animation.cpp + src/Game/Drawables/Animation.h + src/Game/Drawables/BindableText.cpp + src/Game/Drawables/BindableText.h + src/Game/Drawables/BitmapButton.cpp + src/Game/Drawables/BitmapButton.h + src/Game/Drawables/BitmapText.cpp + src/Game/Drawables/BitmapText.h + src/Game/Drawables/Button.cpp + src/Game/Drawables/Button.h + src/Game/Drawables/Circle.cpp + src/Game/Drawables/Circle.h + src/Game/Drawables/DrawableText.h + src/Game/Drawables/Image.cpp + src/Game/Drawables/Image.h + src/Game/Drawables/InputText.cpp + src/Game/Drawables/InputText.h + src/Game/Drawables/LoadingScreen.cpp + src/Game/Drawables/LoadingScreen.h + src/Game/Drawables/Menu.cpp + src/Game/Drawables/Menu.h + src/Game/Drawables/Movie2.cpp + src/Game/Drawables/Movie2.h + src/Game/Drawables/Panel.cpp + src/Game/Drawables/Panel.h + src/Game/Drawables/Rectangle.cpp + src/Game/Drawables/Rectangle.h + src/Game/Drawables/Scrollable.cpp + src/Game/Drawables/Scrollable.h + src/Game/Drawables/Shape.cpp + src/Game/Drawables/Shape.h + src/Game/Drawables/StringButton.cpp + src/Game/Drawables/StringButton.h + src/Game/Drawables/StringText.cpp + src/Game/Drawables/StringText.h + src/Game/Drawables/Text.cpp + src/Game/Drawables/Text.h + src/Game/Predicates/PredIO.h + src/Game/Utils/CmdLineUtils.cpp + src/Game/Utils/CmdLineUtils.h + src/Game/Utils/FileUtils.cpp + src/Game/Utils/FileUtils.h + src/Game/Utils/GameUtils.cpp + src/Game/Utils/GameUtils.h + src/Game/Utils/ImageUtils.cpp + src/Game/Utils/ImageUtils.h + src/Game/Utils/TextUtils.cpp + src/Game/Utils/TextUtils.h + src/Game/Utils/UIObjectUtils.h + src/Game/Utils/VarUtils.cpp + src/Game/Utils/VarUtils.h src/Json/JsonParser.h src/Json/JsonUtils.cpp src/Json/JsonUtils.h + src/Json/SaveUtils.cpp + src/Json/SaveUtils.h src/Parser/ParseAction.cpp src/Parser/ParseAction.h - src/Parser/ParseAnimation.cpp - src/Parser/ParseAnimation.h - src/Parser/ParseAudio.cpp - src/Parser/ParseAudio.h - src/Parser/ParseAudioCommon.cpp - src/Parser/ParseAudioCommon.h - src/Parser/ParseButton.cpp - src/Parser/ParseButton.h - src/Parser/ParseCircle.cpp - src/Parser/ParseCircle.h - src/Parser/ParseCondition.cpp - src/Parser/ParseCondition.h + src/Parser/ParseCommon.cpp + src/Parser/ParseCommon.h src/Parser/ParseCursor.cpp src/Parser/ParseCursor.h src/Parser/ParseEvent.cpp src/Parser/ParseEvent.h src/Parser/ParseFile.cpp src/Parser/ParseFile.h - src/Parser/ParseFileBytes.cpp - src/Parser/ParseFileBytes.h - src/Parser/ParseFont.cpp - src/Parser/ParseFont.h - src/Parser/ParseIcon.cpp - src/Parser/ParseIcon.h - src/Parser/ParseImage.cpp - src/Parser/ParseImage.h - src/Parser/ParseImageContainer.cpp - src/Parser/ParseImageContainer.h + src/Parser/ParseGameInputEvent.cpp + src/Parser/ParseGameInputEvent.h src/Parser/ParseInputEvent.cpp src/Parser/ParseInputEvent.h - src/Parser/ParseInputText.cpp - src/Parser/ParseInputText.h - src/Parser/ParseLoadingScreen.cpp - src/Parser/ParseLoadingScreen.h - src/Parser/ParseMenu.cpp - src/Parser/ParseMenu.h - src/Parser/ParseMenuButton.cpp - src/Parser/ParseMenuButton.h src/Parser/ParseMountFile.cpp src/Parser/ParseMountFile.h - src/Parser/ParseMovie.cpp - src/Parser/ParseMovie.h - src/Parser/ParsePalette.cpp - src/Parser/ParsePalette.h - src/Parser/ParsePanel.cpp - src/Parser/ParsePanel.h src/Parser/ParsePredicate.cpp src/Parser/ParsePredicate.h src/Parser/Parser.cpp src/Parser/Parser.h - src/Parser/ParseRectangle.cpp - src/Parser/ParseRectangle.h src/Parser/ParserProperties.h - src/Parser/ParseScrollable.cpp - src/Parser/ParseScrollable.h - src/Parser/ParseShader.cpp - src/Parser/ParseShader.h - src/Parser/ParseShape.cpp - src/Parser/ParseShape.h - src/Parser/ParseSound.cpp - src/Parser/ParseSound.h - src/Parser/ParseText.cpp - 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/Actions/ParseActionActions.cpp + src/Parser/Actions/ParseActionActions.h + src/Parser/Actions/ParseAnimationActions.cpp + src/Parser/Actions/ParseAnimationActions.h + src/Parser/Actions/ParseAudioActions.cpp + src/Parser/Actions/ParseAudioActions.h + src/Parser/Actions/ParseButtonActions.cpp + src/Parser/Actions/ParseButtonActions.h + src/Parser/Actions/ParseConditionActions.cpp + src/Parser/Actions/ParseConditionActions.h + src/Parser/Actions/ParseCursorActions.cpp + src/Parser/Actions/ParseCursorActions.h + src/Parser/Actions/ParseDrawableActions.cpp + src/Parser/Actions/ParseDrawableActions.h + src/Parser/Actions/ParseEventActions.cpp + src/Parser/Actions/ParseEventActions.h + src/Parser/Actions/ParseFadeActions.cpp + src/Parser/Actions/ParseFadeActions.h + src/Parser/Actions/ParseFocusActions.cpp + src/Parser/Actions/ParseFocusActions.h + src/Parser/Actions/ParseFontActions.cpp + src/Parser/Actions/ParseFontActions.h + src/Parser/Actions/ParseGameActions.cpp + src/Parser/Actions/ParseGameActions.h + src/Parser/Actions/ParseImageActions.cpp + src/Parser/Actions/ParseImageActions.h + src/Parser/Actions/ParseInputTextActions.cpp + src/Parser/Actions/ParseInputTextActions.h + src/Parser/Actions/ParseIOActions.cpp + src/Parser/Actions/ParseIOActions.h + src/Parser/Actions/ParseLoadActions.cpp + src/Parser/Actions/ParseLoadActions.h + src/Parser/Actions/ParseLoadingScreenActions.cpp + src/Parser/Actions/ParseLoadingScreenActions.h + src/Parser/Actions/ParseMenuActions.cpp + src/Parser/Actions/ParseMenuActions.h + src/Parser/Actions/ParseMountActions.cpp + src/Parser/Actions/ParseMountActions.h + src/Parser/Actions/ParseMovieActions.cpp + src/Parser/Actions/ParseMovieActions.h + src/Parser/Actions/ParsePaletteActions.cpp + src/Parser/Actions/ParsePaletteActions.h + src/Parser/Actions/ParseRandomActions.cpp + src/Parser/Actions/ParseRandomActions.h + src/Parser/Actions/ParseResourceActions.cpp + src/Parser/Actions/ParseResourceActions.h + src/Parser/Actions/ParseScrollableActions.cpp + src/Parser/Actions/ParseScrollableActions.h + src/Parser/Actions/ParseShaderActions.cpp + src/Parser/Actions/ParseShaderActions.h + src/Parser/Actions/ParseSoundActions.cpp + src/Parser/Actions/ParseSoundActions.h + src/Parser/Actions/ParseTextActions.cpp + src/Parser/Actions/ParseTextActions.h + src/Parser/Actions/ParseVariableActions.cpp + src/Parser/Actions/ParseVariableActions.h + src/Parser/Actions/ParseVisibilityActions.cpp + src/Parser/Actions/ParseVisibilityActions.h + src/Parser/Drawables/ParseAnimation.cpp + src/Parser/Drawables/ParseAnimation.h + src/Parser/Drawables/ParseButton.cpp + src/Parser/Drawables/ParseButton.h + src/Parser/Drawables/ParseCircle.cpp + src/Parser/Drawables/ParseCircle.h + src/Parser/Drawables/ParseDrawable.cpp + src/Parser/Drawables/ParseDrawable.h + src/Parser/Drawables/ParseImage.cpp + src/Parser/Drawables/ParseImage.h + src/Parser/Drawables/ParseInputText.cpp + src/Parser/Drawables/ParseInputText.h + src/Parser/Drawables/ParseLoadingScreen.cpp + src/Parser/Drawables/ParseLoadingScreen.h + src/Parser/Drawables/ParseMenu.cpp + src/Parser/Drawables/ParseMenu.h + src/Parser/Drawables/ParseMenuItem.cpp + src/Parser/Drawables/ParseMenuItem.h + src/Parser/Drawables/ParseMovie.cpp + src/Parser/Drawables/ParseMovie.h + src/Parser/Drawables/ParsePanel.cpp + src/Parser/Drawables/ParsePanel.h + src/Parser/Drawables/ParseRectangle.cpp + src/Parser/Drawables/ParseRectangle.h + src/Parser/Drawables/ParseScrollable.cpp + src/Parser/Drawables/ParseScrollable.h + src/Parser/Drawables/ParseShape.cpp + src/Parser/Drawables/ParseShape.h + src/Parser/Drawables/ParseText.cpp + src/Parser/Drawables/ParseText.h + src/Parser/Game/ParseGame.cpp + src/Parser/Game/ParseGame.h + src/Parser/Game/ParseIcon.cpp + src/Parser/Game/ParseIcon.h + src/Parser/Game/ParseSaveDir.cpp + src/Parser/Game/ParseSaveDir.h + src/Parser/Resources/ParseAudio.cpp + src/Parser/Resources/ParseAudio.h + src/Parser/Resources/ParseAudioCommon.cpp + src/Parser/Resources/ParseAudioCommon.h + src/Parser/Resources/ParseFileBytes.cpp + src/Parser/Resources/ParseFileBytes.h + src/Parser/Resources/ParseFont.cpp + src/Parser/Resources/ParseFont.h + src/Parser/Resources/ParseImageContainer.cpp + src/Parser/Resources/ParseImageContainer.h + src/Parser/Resources/ParsePalette.cpp + src/Parser/Resources/ParsePalette.h + src/Parser/Resources/ParseResource.h + src/Parser/Resources/ParseShader.cpp + src/Parser/Resources/ParseShader.h + src/Parser/Resources/ParseSound.cpp + src/Parser/Resources/ParseSound.h + src/Parser/Resources/ParseTexture.cpp + src/Parser/Resources/ParseTexture.h + src/Parser/Resources/ParseTexturePack.cpp + src/Parser/Resources/ParseTexturePack.h + src/Parser/Resources/TexturePacks/ParseBitmapFontTexturePack.h + src/Parser/Resources/TexturePacks/ParseCompositeTexturePack.h + src/Parser/Resources/TexturePacks/ParseImageContainerTexturePack.cpp + src/Parser/Resources/TexturePacks/ParseImageContainerTexturePack.h + src/Parser/Resources/TexturePacks/ParseMultiTextureTexturePack.h + src/Parser/Resources/TexturePacks/ParseSingleTextureTexturePack.cpp + src/Parser/Resources/TexturePacks/ParseSingleTextureTexturePack.h + src/Parser/Resources/TexturePacks/ParseStackedTexturePack.h + src/Parser/Resources/TexturePacks/ParseTexturePackAnimatedTextures.h + src/Parser/Resources/TexturePacks/ParseTexturePackIndexes.h + src/Parser/Resources/TexturePacks/ParseTexturePackRects.h + src/Parser/Resources/TexturePacks/ParseTexturePacks.cpp + src/Parser/Resources/TexturePacks/ParseTexturePacks.h src/Parser/Utils/ParseUtils.cpp src/Parser/Utils/ParseUtils.h src/Parser/Utils/ParseUtilsIdx.cpp @@ -242,8 +318,45 @@ set(SOURCE_FILES src/Parser/Utils/ParseUtilsKey.h src/Parser/Utils/ParseUtilsVal.cpp src/Parser/Utils/ParseUtilsVal.h - src/Predicates/Predicate.h - src/Predicates/PredIO.h + src/Resources/AudioSource.h + src/Resources/BitmapFont.cpp + src/Resources/BitmapFont.h + src/Resources/CachedImagePack.cpp + src/Resources/CachedImagePack.h + src/Resources/FileBytes.h + src/Resources/Font.h + src/Resources/FreeTypeFont.h + src/Resources/ImageContainer.h + src/Resources/Palette.cpp + src/Resources/Palette.h + src/Resources/Shader.cpp + src/Resources/Shader.h + src/Resources/TexturePack.cpp + src/Resources/TexturePack.h + src/Resources/ImageContainers/SimpleImageContainer.cpp + src/Resources/ImageContainers/SimpleImageContainer.h + src/Resources/TexturePacks/BitmapFontTexturePack.cpp + src/Resources/TexturePacks/BitmapFontTexturePack.h + src/Resources/TexturePacks/CompositeTexturePack.cpp + src/Resources/TexturePacks/CompositeTexturePack.h + src/Resources/TexturePacks/ImageContainerTexturePack.cpp + src/Resources/TexturePacks/ImageContainerTexturePack.h + src/Resources/TexturePacks/IndexedTexturePack.cpp + src/Resources/TexturePacks/IndexedTexturePack.h + src/Resources/TexturePacks/MultiImageContainerTexturePack.cpp + src/Resources/TexturePacks/MultiImageContainerTexturePack.h + src/Resources/TexturePacks/MultiTexturePack.cpp + src/Resources/TexturePacks/MultiTexturePack.h + src/Resources/TexturePacks/RectTexturePack.cpp + src/Resources/TexturePacks/RectTexturePack.h + src/Resources/TexturePacks/SimpleTexturePack.cpp + src/Resources/TexturePacks/SimpleTexturePack.h + src/Resources/TexturePacks/SingleTexturePack.cpp + src/Resources/TexturePacks/SingleTexturePack.h + src/Resources/TexturePacks/StackedTexturePack.cpp + src/Resources/TexturePacks/StackedTexturePack.h + src/Resources/TexturePacks/TexturePackGroup.cpp + src/Resources/TexturePacks/TexturePackGroup.h src/SFML/CompositeSprite.cpp src/SFML/CompositeSprite.h src/SFML/dr_wav.h @@ -270,37 +383,27 @@ set(SOURCE_FILES src/SFML/View2.h src/SFML/Wave2.cpp src/SFML/Wave2.h - src/TexturePacks/BitmapFontTexturePack.cpp - src/TexturePacks/BitmapFontTexturePack.h - src/TexturePacks/CachedTexturePack.cpp - src/TexturePacks/CachedTexturePack.h - src/TexturePacks/CompositeTexturePack.cpp - src/TexturePacks/CompositeTexturePack.h - src/TexturePacks/IndexedTexturePack.cpp - src/TexturePacks/IndexedTexturePack.h - src/TexturePacks/RectTexturePack.cpp - src/TexturePacks/RectTexturePack.h - src/TexturePacks/SimpleTexturePack.cpp - src/TexturePacks/SimpleTexturePack.h - src/TexturePacks/StackedTexturePack.cpp - src/TexturePacks/StackedTexturePack.h - src/TexturePacks/TexturePack.cpp - src/TexturePacks/TexturePack.h src/Utils/EasedValue.h src/Utils/EasingFunctions.h src/Utils/ElapsedTime.h src/Utils/FixedArray.h src/Utils/FixedMap.h src/Utils/Helper2D.h - src/Utils/iterator_tpl.h + src/Utils/LoadLibrary.cpp + src/Utils/LoadLibrary.h src/Utils/LRUCache.h src/Utils/Number.h src/Utils/NumberVector.h src/Utils/PairXY.h src/Utils/re.c src/Utils/re.h + src/Utils/Random.cpp + src/Utils/Random.h src/Utils/Regex.h src/Utils/ReverseIterable.h + src/Utils/StreamReader.h + src/Utils/StringHash.cpp + src/Utils/StringHash.h src/Utils/UnorderedStringMap.h src/Utils/Utils.cpp src/Utils/Utils.h @@ -309,22 +412,24 @@ set(SOURCE_FILES if(FFmpeg_FOUND) SET(SOURCE_FILES ${SOURCE_FILES} - src/sfeMovie/AudioStream.cpp - src/sfeMovie/AudioStream.hpp - src/sfeMovie/Demuxer.cpp - src/sfeMovie/Demuxer.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.hpp - src/sfeMovie/Timer.cpp - src/sfeMovie/Timer.hpp - src/sfeMovie/TimerPriorities.hpp - src/sfeMovie/VideoStream.cpp - src/sfeMovie/VideoStream.hpp + src/SFML/sfeMovie/AudioStream.cpp + src/SFML/sfeMovie/AudioStream.hpp + src/SFML/sfeMovie/AVFunc.cpp + src/SFML/sfeMovie/AVFunc.hpp + src/SFML/sfeMovie/Demuxer.cpp + src/SFML/sfeMovie/Demuxer.hpp + src/SFML/sfeMovie/Movie.cpp + src/SFML/sfeMovie/Movie.hpp + src/SFML/sfeMovie/MovieImpl.cpp + src/SFML/sfeMovie/MovieImpl.hpp + src/SFML/sfeMovie/Stream.cpp + src/SFML/sfeMovie/Stream.hpp + src/SFML/sfeMovie/StreamSelection.hpp + src/SFML/sfeMovie/Timer.cpp + src/SFML/sfeMovie/Timer.hpp + src/SFML/sfeMovie/TimerPriorities.hpp + src/SFML/sfeMovie/VideoStream.cpp + src/SFML/sfeMovie/VideoStream.hpp ) else() add_definitions(-DDGENGINE_MOVIE_STUB) @@ -336,6 +441,19 @@ endif() add_library(${PROJECT_NAME} ${SOURCE_FILES}) +if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") + target_compile_options(${PROJECT_NAME} PRIVATE -Wall -stdlib=libc++) + target_link_options(${PROJECT_NAME} PRIVATE -stdlib=libc++) +elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU") + if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 11.1) + message(FATAL_ERROR "GCC version must be at least 11.1!") + endif() + target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wpedantic) +elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + target_compile_options(${PROJECT_NAME} PRIVATE /GF /EHsc /W3 /wd4250 /wd4996) + target_link_options(${PROJECT_NAME} PRIVATE /OPT:ICF /OPT:REF) +endif() + target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src) if(FFmpeg_FOUND) @@ -343,8 +461,8 @@ if(FFmpeg_FOUND) target_link_libraries(${PROJECT_NAME} ${FFmpeg_LIBRARIES}) endif() -include_directories(${PHYSFS_INCLUDE_DIRS} ${SFML_INCLUDE_DIR}) -target_link_libraries(${PROJECT_NAME} ${PHYSFS_LIBRARY} ${SFML_LIBRARIES}) +include_directories(${PHYSFS_INCLUDE_DIRS}) +target_link_libraries(${PROJECT_NAME} ${PHYSFS_LIBRARY} sfml-audio sfml-graphics) set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 20) set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD_REQUIRED ON) diff --git a/DGEngine.core/CMakePresets.json b/DGEngine.core/CMakePresets.json new file mode 100644 index 00000000..27203a89 --- /dev/null +++ b/DGEngine.core/CMakePresets.json @@ -0,0 +1,368 @@ +{ + "version": 3, + "configurePresets": [ + { + "name": "linux-base", + "description": "Target Linux.", + "hidden": true, + "generator": "Ninja", + "binaryDir": "${sourceDir}/out/build/${presetName}", + "installDir": "${sourceDir}/out/install/${presetName}", + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Linux" + } + }, + { + "name": "linux-base-clang", + "description": "Target Linux (clang).", + "hidden": true, + "inherits": "linux-base", + "cacheVariables": { + "CMAKE_C_COMPILER": "clang", + "CMAKE_CXX_COMPILER": "clang++" + } + }, + { + "name": "linux-base-gcc", + "description": "Target Linux (gcc).", + "hidden": true, + "inherits": "linux-base", + "cacheVariables": { + "CMAKE_C_COMPILER": "gcc", + "CMAKE_CXX_COMPILER": "g++" + } + }, + { + "name": "linux-base-x64", + "hidden": true, + "inherits": "linux-base", + "architecture": { + "value": "x64", + "strategy": "external" + } + }, + { + "name": "linux-base-x64-clang", + "hidden": true, + "inherits": "linux-base-clang", + "architecture": { + "value": "x64", + "strategy": "external" + } + }, + { + "name": "linux-base-x64-gcc", + "hidden": true, + "inherits": "linux-base-gcc", + "architecture": { + "value": "x64", + "strategy": "external" + } + }, + { + "name": "linux-x64-debug", + "displayName": "x64 Debug", + "description": "Target Linux (64-bit). (Debug)", + "inherits": "linux-base-x64", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug" + } + }, + { + "name": "linux-x64-debug-clang", + "displayName": "x64 Debug Clang", + "description": "Target Linux Clang (64-bit). (Debug)", + "inherits": "linux-base-x64-clang", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug" + } + }, + { + "name": "linux-x64-debug-gcc", + "displayName": "x64 Debug GCC", + "description": "Target Linux GCC (64-bit). (Debug)", + "inherits": "linux-base-x64-gcc", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug" + } + }, + { + "name": "linux-x64-debug-nomovie", + "displayName": "x64 Debug NoMovie", + "inherits": "linux-x64-debug", + "cacheVariables": { + "MOVIE_SUPPORT": false + } + }, + { + "name": "linux-x64-release", + "displayName": "x64 Release", + "description": "Target Linux (64-bit). (Release)", + "inherits": "linux-x64-debug", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + }, + { + "name": "linux-x64-release-clang", + "displayName": "x64 Release Clang", + "description": "Target Linux Clang (64-bit). (Release)", + "inherits": "linux-x64-debug-clang", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + }, + { + "name": "linux-x64-release-gcc", + "displayName": "x64 Release GCC", + "description": "Target Linux GCC (64-bit). (Release)", + "inherits": "linux-x64-debug-gcc", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + }, + { + "name": "linux-x64-release-nomovie", + "displayName": "x64 Release NoMovie", + "inherits": "linux-x64-release", + "cacheVariables": { + "MOVIE_SUPPORT": false + } + }, + { + "name": "windows-base", + "description": "Target Windows with the Visual Studio development environment.", + "hidden": true, + "generator": "Ninja", + "binaryDir": "${sourceDir}/out/build/${presetName}", + "installDir": "${sourceDir}/out/install/${presetName}", + "cacheVariables": { + "CMAKE_C_COMPILER": "cl.exe", + "CMAKE_CXX_COMPILER": "cl.exe", + "CMAKE_TOOLCHAIN_FILE": { + "value": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake", + "type": "FILEPATH" + } + }, + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Windows" + } + }, + { + "name": "windows-x64-debug", + "displayName": "x64 Debug", + "description": "Target Windows (64-bit) with the Visual Studio development environment. (Debug)", + "inherits": "windows-base", + "architecture": { + "value": "x64", + "strategy": "external" + }, + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "VCPKG_TARGET_TRIPLET": "x64-windows" + } + }, + { + "name": "windows-x64-debug-nomovie", + "displayName": "x64 Debug NoMovie", + "inherits": "windows-x64-debug", + "cacheVariables": { + "MOVIE_SUPPORT": false + } + }, + { + "name": "windows-x64-release", + "displayName": "x64 Release", + "description": "Target Windows (64-bit) with the Visual Studio development environment. (Release)", + "inherits": "windows-x64-debug", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + }, + { + "name": "windows-x64-release-nomovie", + "displayName": "x64 Release NoMovie", + "inherits": "windows-x64-release", + "cacheVariables": { + "MOVIE_SUPPORT": false + } + }, + { + "name": "windows-x64-release-nomovie-static", + "displayName": "x64 Release NoMovie Static", + "inherits": "windows-x64-release-static", + "cacheVariables": { + "MOVIE_SUPPORT": false + } + }, + { + "name": "windows-x64-release-static", + "displayName": "x64 Release Static", + "inherits": "windows-x64-release", + "cacheVariables": { + "VCPKG_TARGET_TRIPLET": "x64-windows-static" + } + }, + { + "name": "windows-x86-debug", + "displayName": "x86 Debug", + "description": "Target Windows (32-bit) with the Visual Studio development environment. (Debug)", + "inherits": "windows-base", + "architecture": { + "value": "x86", + "strategy": "external" + }, + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "VCPKG_TARGET_TRIPLET": "x86-windows" + } + }, + { + "name": "windows-x86-debug-nomovie", + "displayName": "x86 Debug NoMovie", + "inherits": "windows-x86-debug", + "cacheVariables": { + "MOVIE_SUPPORT": false + } + }, + { + "name": "windows-x86-release", + "displayName": "x86 Release", + "description": "Target Windows (32-bit) with the Visual Studio development environment. (Release)", + "inherits": "windows-x86-debug", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + }, + { + "name": "windows-x86-release-nomovie", + "displayName": "x86 Release NoMovie", + "inherits": "windows-x86-release", + "cacheVariables": { + "MOVIE_SUPPORT": false + } + }, + { + "name": "windows-x86-release-nomovie-static", + "displayName": "x86 Release NoMovie Static", + "inherits": "windows-x86-release-static", + "cacheVariables": { + "MOVIE_SUPPORT": false + } + }, + { + "name": "windows-x86-release-static", + "displayName": "x86 Release Static", + "inherits": "windows-x86-release", + "cacheVariables": { + "VCPKG_TARGET_TRIPLET": "x86-windows-static" + } + } + ], + "buildPresets": [ + { + "name": "linux-x64-debug", + "configurePreset": "linux-x64-debug", + "displayName": "x64 Debug" + }, + { + "name": "linux-x64-debug-clang", + "configurePreset": "linux-x64-debug-clang", + "displayName": "x64 Debug" + }, + { + "name": "linux-x64-debug-gcc", + "configurePreset": "linux-x64-debug-gcc", + "displayName": "x64 Debug" + }, + { + "name": "linux-x64-debug-nomovie", + "configurePreset": "linux-x64-debug-nomovie", + "displayName": "x64 Debug NoMovie" + }, + { + "name": "linux-x64-release", + "configurePreset": "linux-x64-release", + "displayName": "x64 Release" + }, + { + "name": "linux-x64-release-clang", + "configurePreset": "linux-x64-release-clang", + "displayName": "x64 Release" + }, + { + "name": "linux-x64-release-gcc", + "configurePreset": "linux-x64-release-gcc", + "displayName": "x64 Release" + }, + { + "name": "linux-x64-release-nomovie", + "configurePreset": "linux-x64-release-nomovie", + "displayName": "x64 Release NoMovie" + }, + { + "name": "windows-x64-debug", + "configurePreset": "windows-x64-debug", + "displayName": "x64 Debug" + }, + { + "name": "windows-x64-debug-nomovie", + "configurePreset": "windows-x64-debug-nomovie", + "displayName": "x64 Debug NoMovie" + }, + { + "name": "windows-x64-release", + "configurePreset": "windows-x64-release", + "displayName": "x64 Release" + }, + { + "name": "windows-x64-release-nomovie", + "configurePreset": "windows-x64-release-nomovie", + "displayName": "x64 Release NoMovie" + }, + { + "name": "windows-x64-release-nomovie-static", + "configurePreset": "windows-x64-release-nomovie-static", + "displayName": "x64 Release NoMovie Static" + }, + { + "name": "windows-x64-release-static", + "configurePreset": "windows-x64-release-static", + "displayName": "x64 Release Static" + }, + { + "name": "windows-x86-debug", + "configurePreset": "windows-x86-debug", + "displayName": "x86 Debug" + }, + { + "name": "windows-x86-debug-nomovie", + "configurePreset": "windows-x86-debug-nomovie", + "displayName": "x86 Debug NoMovie" + }, + { + "name": "windows-x86-release", + "configurePreset": "windows-x86-release", + "displayName": "x86 Release" + }, + { + "name": "windows-x86-release-nomovie", + "configurePreset": "windows-x86-release-nomovie", + "displayName": "x86 Release NoMovie" + }, + { + "name": "windows-x86-release-nomovie-static", + "configurePreset": "windows-x86-release-nomovie-static", + "displayName": "x86 Release NoMovie Static" + }, + { + "name": "windows-x86-release-static", + "configurePreset": "windows-x86-release-static", + "displayName": "x86 Release Static" + } + ] +} \ No newline at end of file diff --git a/DGEngine.core/DGEngine.core.vcxproj b/DGEngine.core/DGEngine.core.vcxproj deleted file mode 100644 index 212c0194..00000000 --- a/DGEngine.core/DGEngine.core.vcxproj +++ /dev/null @@ -1,973 +0,0 @@ - - - - - Debug Clang - Win32 - - - Debug Clang - x64 - - - Debug Code Analysis - Win32 - - - Debug Code Analysis - x64 - - - Debug NoMovie - Win32 - - - Debug NoMovie - x64 - - - Debug - Win32 - - - Debug - x64 - - - Release NoMovie - Win32 - - - Release NoMovie - x64 - - - Release Static NoMovie - Win32 - - - Release Static NoMovie - x64 - - - Release Static - Win32 - - - Release Static - x64 - - - Release - Win32 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - true - true - - - true - true - true - - - true - true - true - - - true - true - true - - - true - true - true - - - true - true - true - - - true - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - true - true - - - true - true - true - - - true - true - true - - - true - true - true - - - true - true - true - - - true - true - true - - - true - true - true - - - true - true - true - - - true - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {1B91743F-9C8A-4E06-9950-31D959E5622E} - DGEngine - DGEngine.core - 10.0 - - - - StaticLibrary - true - v142 - MultiByte - - - StaticLibrary - true - v142 - MultiByte - - - StaticLibrary - true - v142 - MultiByte - - - StaticLibrary - true - v142 - MultiByte - - - StaticLibrary - true - v142 - MultiByte - - - StaticLibrary - true - v142 - MultiByte - - - StaticLibrary - true - ClangCL - MultiByte - - - StaticLibrary - true - ClangCL - MultiByte - - - StaticLibrary - false - v142 - true - MultiByte - - - StaticLibrary - false - v142 - true - MultiByte - - - StaticLibrary - false - v142 - true - MultiByte - - - StaticLibrary - false - v142 - true - MultiByte - - - StaticLibrary - false - v142 - MultiByte - true - - - StaticLibrary - false - v142 - MultiByte - true - - - StaticLibrary - false - v142 - MultiByte - true - - - StaticLibrary - false - v142 - MultiByte - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - DGEngine.core.dir\$(Platform)\$(Configuration)\ - - - DGEngine.core.dir\$(Platform)\$(Configuration)\ - - - DGEngine.core.dir\$(Platform)\$(Configuration)\ - NativeRecommendedRules.ruleset - true - true - - - DGEngine.core.dir\$(Platform)\$(Configuration)\ - NativeRecommendedRules.ruleset - true - true - - - DGEngine.core.dir\$(Platform)\$(Configuration)\ - - - DGEngine.core.dir\$(Platform)\$(Configuration)\ - - - DGEngine.core.dir\$(Platform)\$(Configuration)\ - - - DGEngine.core.dir\$(Platform)\$(Configuration)\ - - - DGEngine.core.dir\$(Platform)\$(Configuration)\ - - - DGEngine.core.dir\$(Platform)\$(Configuration)\ - - - DGEngine.core.dir\$(Platform)\$(Configuration)\ - - - DGEngine.core.dir\$(Platform)\$(Configuration)\ - - - DGEngine.core.dir\$(Platform)\$(Configuration)\ - - - DGEngine.core.dir\$(Platform)\$(Configuration)\ - - - DGEngine.core.dir\$(Platform)\$(Configuration)\ - - - DGEngine.core.dir\$(Platform)\$(Configuration)\ - - - true - - - true - - - true - - - false - - - - .\src;%(AdditionalIncludeDirectories) - true - false - 4250;4996 - stdcpplatest - Disabled - %(PreprocessorDefinitions) - true - Level3 - - - DebugFastLink - - - - - .\src;%(AdditionalIncludeDirectories) - true - false - 4250;4996 - stdcpplatest - Disabled - %(PreprocessorDefinitions) - true - Level3 - - - DebugFastLink - - - - - .\src;%(AdditionalIncludeDirectories) - true - false - 4250;4996 - true - stdcpplatest - Disabled - %(PreprocessorDefinitions) - true - Level3 - - - DebugFastLink - - - - - .\src;%(AdditionalIncludeDirectories) - true - false - 4250;4996 - true - stdcpplatest - Disabled - %(PreprocessorDefinitions) - true - Level3 - - - DebugFastLink - - - - - .\src;%(AdditionalIncludeDirectories) - true - false - 4250;4996 - stdcpplatest - Disabled - DGENGINE_MOVIE_STUB;%(PreprocessorDefinitions) - true - Level3 - - - DebugFastLink - - - - - .\src;%(AdditionalIncludeDirectories) - true - false - 4250;4996 - stdcpplatest - Disabled - DGENGINE_MOVIE_STUB;%(PreprocessorDefinitions) - true - Level3 - - - DebugFastLink - - - - - .\src;%(AdditionalIncludeDirectories) - true - false - stdcpplatest - Disabled - DGENGINE_MOVIE_STUB;%(PreprocessorDefinitions) - true - false - Level3 - - - sfml-audio-d.lib;sfml-graphics-d.lib;sfml-main-d.lib;sfml-network-d.lib;sfml-system-d.lib;sfml-window-d.lib;physfs.lib;avcodec.lib;avdevice.lib;avfilter.lib;avformat.lib;avutil.lib;swresample.lib;swscale.lib;%(AdditionalDependencies) - true - - - - - .\src;%(AdditionalIncludeDirectories) - true - false - stdcpplatest - Disabled - DGENGINE_MOVIE_STUB;%(PreprocessorDefinitions) - true - false - Level3 - - - sfml-audio-d.lib;sfml-graphics-d.lib;sfml-main-d.lib;sfml-network-d.lib;sfml-system-d.lib;sfml-window-d.lib;physfs.lib;avcodec.lib;avdevice.lib;avfilter.lib;avformat.lib;avutil.lib;swresample.lib;swscale.lib;%(AdditionalDependencies) - true - - - - - .\src;%(AdditionalIncludeDirectories) - true - false - 4250;4996 - true - AnySuitable - true - stdcpplatest - Full - %(PreprocessorDefinitions) - true - Level3 - - - true - No - true - - - - - .\src;%(AdditionalIncludeDirectories) - true - false - 4250;4996 - true - AnySuitable - true - stdcpplatest - Full - %(PreprocessorDefinitions) - true - Level3 - - - true - No - true - - - - - .\src;%(AdditionalIncludeDirectories) - true - false - 4250;4996 - true - AnySuitable - true - stdcpplatest - Full - DGENGINE_MOVIE_STUB;%(PreprocessorDefinitions) - true - Level3 - - - true - No - true - - - - - .\src;%(AdditionalIncludeDirectories) - true - false - 4250;4996 - true - AnySuitable - true - stdcpplatest - Full - DGENGINE_MOVIE_STUB;%(PreprocessorDefinitions) - true - Level3 - - - true - No - true - - - - - .\src;%(AdditionalIncludeDirectories) - true - false - 4250;4996 - true - AnySuitable - true - stdcpplatest - Full - SFML_STATIC;%(PreprocessorDefinitions) - MultiThreaded - true - Level3 - - - bcrypt.lib;opengl32.lib;secur32.lib;winmm.lib;ws2_32.lib;%(AdditionalDependencies) - true - No - true - - - - - .\src;%(AdditionalIncludeDirectories) - true - false - 4250;4996 - true - AnySuitable - true - stdcpplatest - Full - SFML_STATIC;%(PreprocessorDefinitions) - MultiThreaded - true - Level3 - - - bcrypt.lib;opengl32.lib;secur32.lib;winmm.lib;ws2_32.lib;%(AdditionalDependencies) - true - No - true - - - - - .\src;%(AdditionalIncludeDirectories) - true - false - 4250;4996 - true - AnySuitable - true - stdcpplatest - Full - DGENGINE_MOVIE_STUB;SFML_STATIC;%(PreprocessorDefinitions) - MultiThreaded - true - Level3 - - - opengl32.lib;winmm.lib;%(AdditionalDependencies) - true - No - true - - - - - .\src;%(AdditionalIncludeDirectories) - true - false - 4250;4996 - true - AnySuitable - true - stdcpplatest - Full - DGENGINE_MOVIE_STUB;SFML_STATIC;%(PreprocessorDefinitions) - MultiThreaded - true - Level3 - - - opengl32.lib;winmm.lib;%(AdditionalDependencies) - true - No - true - - - - - - \ No newline at end of file diff --git a/DGEngine.core/LICENSE.txt b/DGEngine.core/LICENSE.txt index 18b99320..f82aecb1 100644 --- a/DGEngine.core/LICENSE.txt +++ b/DGEngine.core/LICENSE.txt @@ -15,16 +15,12 @@ https://github.com/steinwurf/endian PhysFS uses the zlib license. -https://icculus.org/physfs/ +https://github.com/icculus/physfs RapidJSON uses the MIT license. https://github.com/Tencent/rapidjson -Simple Iterator Template implementation by Vinícius Garcia uses the MIT license. - -https://github.com/VinGarcia/Simple-Iterator-Template - SFML Animation class based on an implementation by Maximilian Wagenbach. It uses the zlib/png license. diff --git a/DGEngine.core/README.md b/DGEngine.core/README.md index 7f89b751..582864ef 100644 --- a/DGEngine.core/README.md +++ b/DGEngine.core/README.md @@ -2,14 +2,18 @@ DGEngine core is a 2D game engine. +### Documentation + +Documentation on DGEngine core under [docs](docs/readme.md). + ### Example Here is a simple example on how to use DGEngine core: ```cpp -#include "CmdLineUtils.h" -#include "FileUtils.h" -#include "Game.h" +#include "Game/Game.h" +#include "Game/Utils/CmdLineUtils.h" +#include "Game/Utils/FileUtils.h" #include int main(int argc, char* argv[]) diff --git a/DGEngine.core/cmake_modules/FindSFML.cmake b/DGEngine.core/cmake_modules/FindSFML.cmake deleted file mode 100644 index 871f8662..00000000 --- a/DGEngine.core/cmake_modules/FindSFML.cmake +++ /dev/null @@ -1,368 +0,0 @@ -# This script locates the SFML library -# ------------------------------------ -# -# Usage -# ----- -# -# When you try to locate the SFML libraries, you must specify which modules you want to use (system, window, graphics, network, audio, main). -# If none is given, the SFML_LIBRARIES variable will be empty and you'll end up linking to nothing. -# example: -# find_package(SFML COMPONENTS graphics window system) // find the graphics, window and system modules -# -# You can enforce a specific version, either MAJOR.MINOR or only MAJOR. -# If nothing is specified, the version won't be checked (i.e. any version will be accepted). -# example: -# find_package(SFML COMPONENTS ...) // no specific version required -# find_package(SFML 2 COMPONENTS ...) // any 2.x version -# find_package(SFML 2.4 COMPONENTS ...) // version 2.4 or greater -# -# By default, the dynamic libraries of SFML will be found. To find the static ones instead, -# you must set the SFML_STATIC_LIBRARIES variable to TRUE before calling find_package(SFML ...). -# Since you have to link yourself all the SFML dependencies when you link it statically, the following -# additional variables are defined: SFML_XXX_DEPENDENCIES and SFML_DEPENDENCIES (see their detailed -# description below). -# In case of static linking, the SFML_STATIC macro will also be defined by this script. -# example: -# set(SFML_STATIC_LIBRARIES TRUE) -# find_package(SFML 2 COMPONENTS network system) -# -# On Mac OS X if SFML_STATIC_LIBRARIES is not set to TRUE then by default CMake will search for frameworks unless -# CMAKE_FIND_FRAMEWORK is set to "NEVER" for example. Please refer to CMake documentation for more details. -# Moreover, keep in mind that SFML frameworks are only available as release libraries unlike dylibs which -# are available for both release and debug modes. -# -# If SFML is not installed in a standard path, you can use the SFML_ROOT CMake (or environment) variable -# to tell CMake where SFML is. -# -# Output -# ------ -# -# This script defines the following variables: -# - For each specified module XXX (system, window, graphics, network, audio, main): -# - SFML_XXX_LIBRARY_DEBUG: the name of the debug library of the xxx module (set to SFML_XXX_LIBRARY_RELEASE is no debug version is found) -# - SFML_XXX_LIBRARY_RELEASE: the name of the release library of the xxx module (set to SFML_XXX_LIBRARY_DEBUG is no release version is found) -# - SFML_XXX_LIBRARY: the name of the library to link to for the xxx module (includes both debug and optimized names if necessary) -# - SFML_XXX_FOUND: true if either the debug or release library of the xxx module is found -# - SFML_XXX_DEPENDENCIES: the list of libraries the module depends on, in case of static linking -# - SFML_LIBRARIES: the list of all libraries corresponding to the required modules -# - SFML_FOUND: true if all the required modules are found -# - SFML_INCLUDE_DIR: the path where SFML headers are located (the directory containing the SFML/Config.hpp file) -# - SFML_DEPENDENCIES: the list of libraries SFML depends on, in case of static linking -# -# example: -# find_package(SFML 2 COMPONENTS system window graphics audio REQUIRED) -# include_directories(${SFML_INCLUDE_DIR}) -# add_executable(myapp ...) -# target_link_libraries(myapp ${SFML_LIBRARIES}) - -# define the SFML_STATIC macro if static build was chosen -if(SFML_STATIC_LIBRARIES) - add_definitions(-DSFML_STATIC) -endif() - -# define the list of search paths for headers and libraries -set(FIND_SFML_PATHS - ${SFML_ROOT} - $ENV{SFML_ROOT} - ~/Library/Frameworks - /Library/Frameworks - /usr/local - /usr - /sw - /opt/local - /opt/csw - /opt) - -# find the SFML include directory -find_path(SFML_INCLUDE_DIR SFML/Config.hpp - PATH_SUFFIXES include - PATHS ${FIND_SFML_PATHS}) - -# check the version number -set(SFML_VERSION_OK TRUE) -if(SFML_FIND_VERSION AND SFML_INCLUDE_DIR) - # extract the major and minor version numbers from SFML/Config.hpp - # we have to handle framework a little bit differently: - if("${SFML_INCLUDE_DIR}" MATCHES "SFML.framework") - set(SFML_CONFIG_HPP_INPUT "${SFML_INCLUDE_DIR}/Headers/Config.hpp") - else() - set(SFML_CONFIG_HPP_INPUT "${SFML_INCLUDE_DIR}/SFML/Config.hpp") - endif() - FILE(READ "${SFML_CONFIG_HPP_INPUT}" SFML_CONFIG_HPP_CONTENTS) - STRING(REGEX REPLACE ".*#define SFML_VERSION_MAJOR ([0-9]+).*" "\\1" SFML_VERSION_MAJOR "${SFML_CONFIG_HPP_CONTENTS}") - STRING(REGEX REPLACE ".*#define SFML_VERSION_MINOR ([0-9]+).*" "\\1" SFML_VERSION_MINOR "${SFML_CONFIG_HPP_CONTENTS}") - STRING(REGEX REPLACE ".*#define SFML_VERSION_PATCH ([0-9]+).*" "\\1" SFML_VERSION_PATCH "${SFML_CONFIG_HPP_CONTENTS}") - if (NOT "${SFML_VERSION_PATCH}" MATCHES "^[0-9]+$") - set(SFML_VERSION_PATCH 0) - endif() - math(EXPR SFML_REQUESTED_VERSION "${SFML_FIND_VERSION_MAJOR} * 10000 + ${SFML_FIND_VERSION_MINOR} * 100 + ${SFML_FIND_VERSION_PATCH}") - - # if we could extract them, compare with the requested version number - if (SFML_VERSION_MAJOR) - # transform version numbers to an integer - math(EXPR SFML_VERSION "${SFML_VERSION_MAJOR} * 10000 + ${SFML_VERSION_MINOR} * 100 + ${SFML_VERSION_PATCH}") - - # compare them - if(SFML_VERSION LESS SFML_REQUESTED_VERSION) - set(SFML_VERSION_OK FALSE) - endif() - else() - # SFML version is < 2.0 - if (SFML_REQUESTED_VERSION GREATER 10900) - set(SFML_VERSION_OK FALSE) - set(SFML_VERSION_MAJOR 1) - set(SFML_VERSION_MINOR x) - set(SFML_VERSION_PATCH x) - endif() - endif() -endif() - -# find the requested modules -set(SFML_FOUND TRUE) # will be set to false if one of the required modules is not found -foreach(FIND_SFML_COMPONENT ${SFML_FIND_COMPONENTS}) - string(TOLOWER ${FIND_SFML_COMPONENT} FIND_SFML_COMPONENT_LOWER) - string(TOUPPER ${FIND_SFML_COMPONENT} FIND_SFML_COMPONENT_UPPER) - set(FIND_SFML_COMPONENT_NAME sfml-${FIND_SFML_COMPONENT_LOWER}) - - # no suffix for sfml-main, it is always a static library - if(FIND_SFML_COMPONENT_LOWER STREQUAL "main") - # release library - find_library(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE - NAMES ${FIND_SFML_COMPONENT_NAME} - PATH_SUFFIXES lib64 lib - PATHS ${FIND_SFML_PATHS}) - - # debug library - find_library(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG - NAMES ${FIND_SFML_COMPONENT_NAME}-d - PATH_SUFFIXES lib64 lib - PATHS ${FIND_SFML_PATHS}) - else() - # static release library - find_library(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_STATIC_RELEASE - NAMES ${FIND_SFML_COMPONENT_NAME}-s - PATH_SUFFIXES lib64 lib - PATHS ${FIND_SFML_PATHS}) - - # static debug library - find_library(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_STATIC_DEBUG - NAMES ${FIND_SFML_COMPONENT_NAME}-s-d - PATH_SUFFIXES lib64 lib - PATHS ${FIND_SFML_PATHS}) - - # dynamic release library - find_library(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DYNAMIC_RELEASE - NAMES ${FIND_SFML_COMPONENT_NAME} - PATH_SUFFIXES lib64 lib - PATHS ${FIND_SFML_PATHS}) - - # dynamic debug library - find_library(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DYNAMIC_DEBUG - NAMES ${FIND_SFML_COMPONENT_NAME}-d - PATH_SUFFIXES lib64 lib - PATHS ${FIND_SFML_PATHS}) - - # choose the entries that fit the requested link type - if(SFML_STATIC_LIBRARIES) - if(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_STATIC_RELEASE) - set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE ${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_STATIC_RELEASE}) - endif() - if(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_STATIC_DEBUG) - set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG ${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_STATIC_DEBUG}) - endif() - else() - if(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DYNAMIC_RELEASE) - set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE ${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DYNAMIC_RELEASE}) - endif() - if(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DYNAMIC_DEBUG) - set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG ${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DYNAMIC_DEBUG}) - endif() - endif() - endif() - - if (SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG OR SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE) - # library found - set(SFML_${FIND_SFML_COMPONENT_UPPER}_FOUND TRUE) - - # if both are found, set SFML_XXX_LIBRARY to contain both - if (SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG AND SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE) - set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY debug ${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG} - optimized ${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE}) - endif() - - # if only one debug/release variant is found, set the other to be equal to the found one - if (SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG AND NOT SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE) - # debug and not release - set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE ${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG}) - set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY ${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG}) - endif() - if (SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE AND NOT SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG) - # release and not debug - set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG ${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE}) - set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY ${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE}) - endif() - else() - # library not found - set(SFML_FOUND FALSE) - set(SFML_${FIND_SFML_COMPONENT_UPPER}_FOUND FALSE) - set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY "") - set(FIND_SFML_MISSING "${FIND_SFML_MISSING} SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY") - endif() - - # mark as advanced - MARK_AS_ADVANCED(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY - SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE - SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG - SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_STATIC_RELEASE - SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_STATIC_DEBUG - SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DYNAMIC_RELEASE - SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DYNAMIC_DEBUG) - - # add to the global list of libraries - set(SFML_LIBRARIES ${SFML_LIBRARIES} "${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY}") -endforeach() - -# in case of static linking, we must also define the list of all the dependencies of SFML libraries -if(SFML_STATIC_LIBRARIES) - - # detect the OS - if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") - set(FIND_SFML_OS_WINDOWS 1) - elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") - set(FIND_SFML_OS_LINUX 1) - elseif(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") - set(FIND_SFML_OS_FREEBSD 1) - elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - set(FIND_SFML_OS_MACOSX 1) - endif() - - # start with an empty list - set(SFML_DEPENDENCIES) - set(FIND_SFML_DEPENDENCIES_NOTFOUND) - - # macro that searches for a 3rd-party library - macro(find_sfml_dependency output friendlyname) - # No lookup in environment variables (PATH on Windows), as they may contain wrong library versions - find_library(${output} NAMES ${ARGN} PATHS ${FIND_SFML_PATHS} PATH_SUFFIXES lib NO_SYSTEM_ENVIRONMENT_PATH) - if(${${output}} STREQUAL "${output}-NOTFOUND") - unset(output) - set(FIND_SFML_DEPENDENCIES_NOTFOUND "${FIND_SFML_DEPENDENCIES_NOTFOUND} ${friendlyname}") - endif() - endmacro() - - # sfml-system - list(FIND SFML_FIND_COMPONENTS "system" FIND_SFML_SYSTEM_COMPONENT) - if(NOT ${FIND_SFML_SYSTEM_COMPONENT} EQUAL -1) - - # update the list -- these are only system libraries, no need to find them - if(FIND_SFML_OS_LINUX OR FIND_SFML_OS_FREEBSD OR FIND_SFML_OS_MACOSX) - set(SFML_SYSTEM_DEPENDENCIES "pthread") - endif() - if(FIND_SFML_OS_LINUX) - set(SFML_SYSTEM_DEPENDENCIES ${SFML_SYSTEM_DEPENDENCIES} "rt") - endif() - if(FIND_SFML_OS_WINDOWS) - set(SFML_SYSTEM_DEPENDENCIES "winmm") - endif() - set(SFML_DEPENDENCIES ${SFML_SYSTEM_DEPENDENCIES} ${SFML_DEPENDENCIES}) - endif() - - # sfml-network - list(FIND SFML_FIND_COMPONENTS "network" FIND_SFML_NETWORK_COMPONENT) - if(NOT ${FIND_SFML_NETWORK_COMPONENT} EQUAL -1) - - # update the list -- these are only system libraries, no need to find them - if(FIND_SFML_OS_WINDOWS) - set(SFML_NETWORK_DEPENDENCIES "ws2_32") - endif() - set(SFML_DEPENDENCIES ${SFML_NETWORK_DEPENDENCIES} ${SFML_DEPENDENCIES}) - endif() - - # sfml-window - list(FIND SFML_FIND_COMPONENTS "window" FIND_SFML_WINDOW_COMPONENT) - if(NOT ${FIND_SFML_WINDOW_COMPONENT} EQUAL -1) - - # find libraries - if(FIND_SFML_OS_LINUX OR FIND_SFML_OS_FREEBSD) - find_sfml_dependency(X11_LIBRARY "X11" X11) - find_sfml_dependency(LIBXCB_LIBRARIES "XCB" xcb libxcb) - find_sfml_dependency(X11_XCB_LIBRARY "X11-xcb" X11-xcb libX11-xcb) - find_sfml_dependency(XCB_RANDR_LIBRARY "xcb-randr" xcb-randr libxcb-randr) - find_sfml_dependency(XCB_IMAGE_LIBRARY "xcb-image" xcb-image libxcb-image) - endif() - - if(FIND_SFML_OS_LINUX) - find_sfml_dependency(UDEV_LIBRARIES "UDev" udev libudev) - endif() - - # update the list - if(FIND_SFML_OS_WINDOWS) - set(SFML_WINDOW_DEPENDENCIES ${SFML_WINDOW_DEPENDENCIES} "opengl32" "winmm" "gdi32") - elseif(FIND_SFML_OS_LINUX) - set(SFML_WINDOW_DEPENDENCIES ${SFML_WINDOW_DEPENDENCIES} "GL" ${X11_LIBRARY} ${LIBXCB_LIBRARIES} ${X11_XCB_LIBRARY} ${XCB_RANDR_LIBRARY} ${XCB_IMAGE_LIBRARY} ${UDEV_LIBRARIES}) - elseif(FIND_SFML_OS_FREEBSD) - set(SFML_WINDOW_DEPENDENCIES ${SFML_WINDOW_DEPENDENCIES} "GL" ${X11_LIBRARY} ${LIBXCB_LIBRARIES} ${X11_XCB_LIBRARY} ${XCB_RANDR_LIBRARY} ${XCB_IMAGE_LIBRARY} "usbhid") - elseif(FIND_SFML_OS_MACOSX) - set(SFML_WINDOW_DEPENDENCIES ${SFML_WINDOW_DEPENDENCIES} "-framework OpenGL -framework Foundation -framework AppKit -framework IOKit -framework Carbon") - endif() - set(SFML_DEPENDENCIES ${SFML_WINDOW_DEPENDENCIES} ${SFML_DEPENDENCIES}) - endif() - - # sfml-graphics - list(FIND SFML_FIND_COMPONENTS "graphics" FIND_SFML_GRAPHICS_COMPONENT) - if(NOT ${FIND_SFML_GRAPHICS_COMPONENT} EQUAL -1) - - # find libraries - find_sfml_dependency(FREETYPE_LIBRARY "FreeType" freetype) - find_sfml_dependency(JPEG_LIBRARY "libjpeg" jpeg) - - # update the list - set(SFML_GRAPHICS_DEPENDENCIES ${FREETYPE_LIBRARY} ${JPEG_LIBRARY}) - set(SFML_DEPENDENCIES ${SFML_GRAPHICS_DEPENDENCIES} ${SFML_DEPENDENCIES}) - endif() - - # sfml-audio - list(FIND SFML_FIND_COMPONENTS "audio" FIND_SFML_AUDIO_COMPONENT) - if(NOT ${FIND_SFML_AUDIO_COMPONENT} EQUAL -1) - - # find libraries - find_sfml_dependency(OPENAL_LIBRARY "OpenAL" openal openal32) - find_sfml_dependency(OGG_LIBRARY "Ogg" ogg) - find_sfml_dependency(VORBIS_LIBRARY "Vorbis" vorbis) - find_sfml_dependency(VORBISFILE_LIBRARY "VorbisFile" vorbisfile) - find_sfml_dependency(VORBISENC_LIBRARY "VorbisEnc" vorbisenc) - find_sfml_dependency(FLAC_LIBRARY "FLAC" FLAC) - - # update the list - set(SFML_AUDIO_DEPENDENCIES ${OPENAL_LIBRARY} ${FLAC_LIBRARY} ${VORBISENC_LIBRARY} ${VORBISFILE_LIBRARY} ${VORBIS_LIBRARY} ${OGG_LIBRARY}) - set(SFML_DEPENDENCIES ${SFML_DEPENDENCIES} ${SFML_AUDIO_DEPENDENCIES}) - endif() - -endif() - -# handle errors -if(NOT SFML_VERSION_OK) - # SFML version not ok - set(FIND_SFML_ERROR "SFML found but version too low (requested: ${SFML_FIND_VERSION}, found: ${SFML_VERSION_MAJOR}.${SFML_VERSION_MINOR}.${SFML_VERSION_PATCH})") - set(SFML_FOUND FALSE) -elseif(SFML_STATIC_LIBRARIES AND FIND_SFML_DEPENDENCIES_NOTFOUND) - set(FIND_SFML_ERROR "SFML found but some of its dependencies are missing (${FIND_SFML_DEPENDENCIES_NOTFOUND})") - set(SFML_FOUND FALSE) -elseif(NOT SFML_FOUND) - # include directory or library not found - set(FIND_SFML_ERROR "Could NOT find SFML (missing: ${FIND_SFML_MISSING})") -endif() -if (NOT SFML_FOUND) - if(SFML_FIND_REQUIRED) - # fatal error - message(FATAL_ERROR ${FIND_SFML_ERROR}) - elseif(NOT SFML_FIND_QUIETLY) - # error but continue - message("${FIND_SFML_ERROR}") - endif() -endif() - -# handle success -if(SFML_FOUND AND NOT SFML_FIND_QUIETLY) - message(STATUS "Found SFML ${SFML_VERSION_MAJOR}.${SFML_VERSION_MINOR}.${SFML_VERSION_PATCH} in ${SFML_INCLUDE_DIR}") -endif() diff --git a/DGEngine.core/docs/actions/readme.md b/DGEngine.core/docs/actions/readme.md new file mode 100644 index 00000000..d2f0a8e9 --- /dev/null +++ b/DGEngine.core/docs/actions/readme.md @@ -0,0 +1,4 @@ +# Actions + +Actions can be used on button clicks, keyboard inputs, or timed events in the game to perform some game action. +Actions are identified by their `name`. diff --git a/DGEngine.core/docs/configuration-files.md b/DGEngine.core/docs/configuration-files.md new file mode 100644 index 00000000..704845b7 --- /dev/null +++ b/DGEngine.core/docs/configuration-files.md @@ -0,0 +1,47 @@ +# Configuration Files + +DGEngine use JSON files to create user interfaces and everything that happens in-game. +These JSON files are not 100% valid JSON files, since you can have repeated elements (not standard JSON). +They are processed in order. + +Configuration properties are divided into categories: + +* Game Configuration +* Resources +* Drawables +* Actions + +## Json types + +Type | Description | Examples +-------- | ---------------------------------------- | ---------------------------- +action | action object (json) or action id (text) | `{ "acion": { "name": "game.close" } }`, `{ "acion": "close" }` +bool | boolean | `{ "bool": true }` +double | decimal number | `{ "double": 10.0 }`, `{ "double": -5.12 }` +enum | enum value (text) or values (json array) | `{ "enum": "top" }`, `{ "enum": ["top", "left"] }` +id | id value (text). 0-9, a-z, A-Z or _ | `{ "id": "img1" }` +int | number | `{ "int": 10 }`, `{ "int": -5 }` +intArr | json array with n ints | `{ "intArr": [0, 1, 2, 3, 4, 5, 6, 7] }` +intRect | json array with 4 ints | `{ "intRect": [0, 0, 100, 100] }` +intVec | json array with 2 ints | `{ "intVec": [0, 1] }` +json | json element | `{ "json": { "id": "img1", "file": "img1.png" } }` +text | utf8 string | `{ "text": "value" }`, `{ "text": "" }`, `{ "text": "Hello\nWorld" }` +textArr | json array with n utf8 strings | `{ "textArr": ["value1", "value2", "value3"] }` +time | miliseconds (int) or seconds (double) | `{ "time": 50 }` is equivalent to `{ "time": 0.05 }` +variable | game variable. bool, int, double or text | `{ "variable": 50 }`, `{ "variable": 2.5 }`, `{ "variable": "text" }` + +## Game Configuration + +[Drawables](drawables/game.md) + +## Resources + +[Resources](resources/readme.md) + +## Drawables + +[Drawables](drawables/readme.md) + +## Actions + +[Actions](actions/readme.md) diff --git a/DGEngine.core/docs/drawables/animation.md b/DGEngine.core/docs/drawables/animation.md new file mode 100644 index 00000000..bb5be967 --- /dev/null +++ b/DGEngine.core/docs/drawables/animation.md @@ -0,0 +1,49 @@ +# Animation + +An `animation` is a UI element with a `texturePack` to provide the different images and refresh rate. +An animation inherits from `image` and can have a color and an outline. + +### Example + +```json +"animation": { + "id": "anim", + "texturePack": "logo" +} +``` + +### Properties + +Name | Type | Default | Description +----------------- | ------- | --------------------- | ---------------------------- +`animationType` | text | looped | animation type (looped, backAndForth, playOnce) +`color` | color | white | fill color +`enableOutline` | bool | false | enable outline (sprite shader) +`frames` | int | 1 or texturePack size | number of frames +`outline` | color | transparent | outline color (sprite shader) +`outlineIgnore` | color | transparent | outline ignore color (sprite shader) +`pause` | bool | false | pause state +`refresh` | time | 50 | refresh rate +**`texture`** | texture | null | texture to use +**`texturePack`** | texture | null | texturePack to use + +Properties in **bold** are required. + +An animation requires a `texture` or a `texturePack`. If both properties are set, `texture` takes precedence. + +All animations use the game's current sprite shader, which applies palettes and outline effects. + +### Examples + +#### Animation + +```json +{ + "init": true, + "animation": { + "id": "anim", + "texturePack": "logo", + "refresh": 50 + } +} +``` diff --git a/DGEngine.core/docs/drawables/button.md b/DGEngine.core/docs/drawables/button.md new file mode 100644 index 00000000..85efd0ab --- /dev/null +++ b/DGEngine.core/docs/drawables/button.md @@ -0,0 +1,118 @@ +# Button + +A `button` is a UI element that inherits from `image` or `text` and reacts to mouse input. +You have `BitmapButton`s and `StringButtons`s, depending on whether you use a `texture`, +`texturePack` or a `font`. + +Bitmap buttons are derived from `image` elements, so you use the same properties. + +String buttons are derived from `text` elements, so you use the same properties. + +### Example + +```json +"button": { + "id": "button1", + "font": "font1", + "text": "goodbye", + "onClick": { "name": "game.close" } +} +``` + +### Properties + +#### BitmapButton + +Bitmap Buttons share the same properties of `image` drawables. + +#### StringButton + +String Buttons share the same properties of `text` drawables. + +#### Button + +Name | Type | Default | Description +-------------------- | --------------- | ------- | ---------------------------- +`captureInputEvents` | bool or textArr | false | capture input events. true captures all events +`clickUp` | bool | false | fire click event on click release +`enable` | bool | true | enable button click +`focusOnClick` | bool | true | focus button on click +`focusSound` | text | | focus sound +`focus` | bool | false | enable focus +`onClickDrag` | text | | click and drag action while mouse is not released +`onClickIn` | text | | click in action +`onClickOut` | text | | click out action +`onClick` | text | | click action +`onDoubleClick` | text | | double click action +`onFocus` | text | | focus action +`onHoverEnter` | text | | hover enter action +`onHoverLeave` | text | | hover leave action +`onRightClick` | text | | right click action +`sound` | text | | click sound + +Properties in **bold** are required. + +`captureInputEvents` captures input events when the drawable is updated. if the drawable is +on top of other drawables, it captures events so underlying drawables don't react to them. +This is useful to make fullscreen buttons that capture events of other UI elements when a prompt +is visible that needs user input. + +There is a list of valid `captureInputEvents`: + +Name | Description +---------------- | ---------------------------- +`none` | none +`leftClick` | left click +`middleClick` | middle click +`rightClick` | right click +`mousePress` | mouse press +`mouseMove` | mouse move +`mouseRelease` | mouse release +`mouseScroll` | mouse scroll +`keyPress` | key press +`textEnter` | text enter +`touchBegin` | touch begin +`touchMove` | touch move +`touchEnd` | touch end +`allLeftclick` | all except left click +`allMiddleClick` | all except middle click +`allRightClick` | all except right click +`all` | all + +### Examples + +#### BitmapButton + +```json +{ + "init": true, + "texture": { + "id": "red", + "color": "0xFF0000", + "size": [1, 1] + }, + "button": { + "id": "text1", + "position": ["center", "center"], + "texture": "red", + "textureRect": [80, 20], + "onClick": { "name": "game.close" } + } +} +``` + +#### StringButton + +```json +{ + "init": true, + "button": { + "id": "text1", + "position": ["center", "center"], + "font": "font1", + "fontSize": 20, + "text": "close", + "onClick": { "name": "game.close" } + } +} +``` diff --git a/DGEngine.core/docs/drawables/circle.md b/DGEngine.core/docs/drawables/circle.md new file mode 100644 index 00000000..24437ce9 --- /dev/null +++ b/DGEngine.core/docs/drawables/circle.md @@ -0,0 +1,125 @@ +# Circle + +A `circle` is a UI element with a radius and it can have a color, an outline or a texture. + +### Example + +```json +"circle": { + "id": "circle", + "position": ["center", "center"], + "radius": 16, + "color": "0xFF0000" +} +``` + +### Properties + +Name | Type | Default | Description +------------------ | ------- | ------- | ---------------------------- +`color` | color | white | fill color +`outlineColor` | color | white | border/outline color +`outlineThickness` | int | 0 | border thickness +`radius` | int | 0 | radius +`texture` | texture | null | texture to use +`textureRect` | intRect | [0,0] | textureRect to use. If the property is present but invalid, the current window size is used + +Properties in **bold** are required. + +A circle's size is read only and is calculated from the radius. + +### Examples + +#### Circle with red fill + +![](../img/circle-1.png) + +```json +{ + "init": true, + "circle": { + "id": "circle", + "position": ["center", "center"], + "radius": 16, + "color": "0xFF0000" + } +} +``` + +#### Circle with black and white checkers pattern texture + +![](../img/circle-2.png) + +```json +{ + "init": true, + "texture": { + "id": "pattern", + "color": [ + "0xFFFFFF", "0x000000", + "0x000000", "0xFFFFFF" + ], + "size": [2, 2] + }, + "circle": { + "id": "circle", + "position": ["center", "center"], + "radius": 16, + "texture": "pattern", + "textureRect": [32, 32] + } +} +``` + +#### Circle with stretched black and yellow checkers pattern texture + +![](../img/circle-3.png) + +```json +{ + "init": true, + "texture": { + "id": "pattern", + "color": [ + "0xFFFF00", "0x000000", + "0x000000", "0xFFFF00" + ], + "size": [2, 2] + }, + "circle": { + "id": "circle", + "position": ["center", "center"], + "radius": 16, + "texture": "pattern", + "textureRect": [8, 8] + } +} +``` + +#### Circle with black and white checkers pattern texture, blue 2px border and yellow fill color + +![](../img/circle-4.png) + +```json +{ + "init": true, + "texture": { + "id": "pattern", + "color": [ + "0xFFFFFF", "0x000000", + "0x000000", "0xFFFFFF" + ], + "size": [2, 2] + }, + "circle": { + "id": "circle", + "position": ["center", "center"], + "radius": 16, + "color": "0xFFFF00", + "outlineColor": "0x0000FF", + "outlineThickness": 2, + "texture": "pattern", + "textureRect": [32, 32] + } +} +``` diff --git a/DGEngine.core/docs/drawables/game.md b/DGEngine.core/docs/drawables/game.md new file mode 100644 index 00000000..41aad4f5 --- /dev/null +++ b/DGEngine.core/docs/drawables/game.md @@ -0,0 +1,52 @@ +# Game + +The `game` drawable is the UI element that handles the whole game engine. +It is responsible for listening for user input, drawing and updating. +The game element is automatically created when starting the engine and +can be configured using a number of properties and actions. + +### Properties + +Name | Type | Default | Description +-------------- | ------ | --------- | ---------------------------- +`framerate` | int | 60 | framerate in frames per second. Value between 30 and 240. 0 to disable. +`fullsceen` | bool | false | fullscreen window +`icon` | text | | load window icon image path +`init` | bool | false | initialize the `game` and show the window +`keepAR` | bool | true | keeps the aspect ratio when resizing and `stretchToFit` is `true` +`maxHeight` | int | 0 | maximum window height before stretching content. Value >= minWindowSize.Y. 0 to disable +`minSize` | intVec | [640,480] | minimum window size +`onClose` | text | | close action. If no action is defined, the game is closed, otherwise the action should close the game +`onFocusGain` | text | | focus gain action +`onFocusLoss` | text | | focus loss action +`onResize` | text | | resize action +`position` | intVec | | window position +`refSize` | intVec | [640,480] | reference window size +`saveDir` | text | | save directory +`smoothScreen` | bool | false | smooth the screen when stretched +`stretchToFit` | bool | false | stretches the window content when resizing +`title` | text | | window's title +`version` | text | | version +`size` | intVec | [640,480] | window size +`windowedSize` | intVec | [640,480] | windowed size when not in fullscreen (read only) + +Properties in **bold** are required. + +### Example + +```json +{ + "game": { + "title" : "DGEngine", + "version": "1.0", + "refSize": [640, 480], + "minSize": [800, 600], + "size": [800, 600], + "framerate": 60, + "keepAR": true, + "stretchToFit": true, + "smoothScreen": true, + "init": true + } +} +``` diff --git a/DGEngine.core/docs/drawables/image.md b/DGEngine.core/docs/drawables/image.md new file mode 100644 index 00000000..1ca8957f --- /dev/null +++ b/DGEngine.core/docs/drawables/image.md @@ -0,0 +1,194 @@ +# Image + +An `image` is a UI element with a texture that can have a color and an outline. +The difference between a `rectangle` and an `image` is that an image requires a texture. + +### Example + +```json +"image": { + "id": "img", + "texture": "background" +} +``` + +### Properties + +Name | Type | Default | Description +----------------- | ------- | ------------ | ---------------------------- +`background` | bool | false | automatically position background image +`color` | color | white | fill color +`enableOutline` | bool | false | enable outline (sprite shader) +`outline` | color | transparent | outline color (sprite shader) +`outlineIgnore` | color | transparent | outline ignore color (sprite shader) +`resizable` | bool | false | resize image on window resize +`stretch` | bool | false | stretch image on window resize +**`texture`** | texture | null | texture to use +`textureIndex` | int | 0 | texturePack image index to use +**`texturePack`** | texture | null | texturePack to use +`textureRect` | intRect | texture size | textureRect to use. If the property is present but invalid, the current window size is used + +Properties in **bold** are required. + +An image requires a `texture` or a `texturePack`. If both properties are set, `texture` takes precedence. + +An image repeats the texture by default if the `textureRect` is bigger than the texture size. +The `size` of the image matches the `textureRect`. + +A background image will be automatically centered in the screen and positioned/resized on window resize. +The properties `anchor`, `resizable`, `stretch`, `position` and `relativeCoords` are ignored when +`background` is `true`. + +The `image` drawable uses a composite sprite underneath. This means it can display images from `TexturePack`s +that use multiple images to make the final image. + +All images use the game's current sprite shader, which applies palettes and outline effects. + +### Examples + +#### Image (2x2) + +```json +{ + "init": true, + "texture": { + "id": "pattern", + "color": [ + "0xFFFFFF", "0x000000", + "0x000000", "0xFFFFFF" + ], + "size": [2, 2] + }, + "image": { + "id": "img", + "position": ["center", "center"], + "texture": "pattern" + } +} +``` + +#### Image (32x32) with texture repeated + +![](../img/image-1.png) + +```json +{ + "init": true, + "texture": { + "id": "pattern", + "color": [ + "0xFFFFFF", "0x000000", + "0x000000", "0xFFFFFF" + ], + "size": [2, 2] + }, + "image": { + "id": "img", + "position": ["center", "center"], + "texture": "pattern", + "textureRect": [32, 32] + } +} +``` + +#### Image (32x32) with texture repeated and red fill color + +![](../img/image-2.png) + +```json +{ + "windowSize": [704, 528], + "init": true, + "texture": { + "id": "pattern", + "color": [ + "0xFFFFFF", "0x000000", + "0x000000", "0xFFFFFF" + ], + "size": [2, 2] + }, + "image": { + "id": "img", + "position": ["center", "center"], + "texture": "pattern", + "textureRect": [32, 32], + "color": "0xFF0000" + } +} +``` + +#### Image (32x32) with texture repeated and expanding on resize + +![](../img/image-3.png) + +```json +{ + "windowSize": [704, 528], + "init": true, + "texture": { + "id": "pattern", + "color": [ + "0xFFFFFF", "0x000000", + "0x000000", "0xFFFFFF" + ], + "size": [2, 2] + }, + "image": { + "id": "img", + "anchor": "all", + "position": ["center", "center"], + "texture": "pattern", + "textureRect": [32, 32], + "resizable": true + } +} +``` + +#### Image (32x32) with texture repeated and stretching on resize + +![](../img/image-4.png) + +```json +{ + "windowSize": [704, 528], + "init": true, + "texture": { + "id": "pattern", + "color": [ + "0xFFFFFF", "0x000000", + "0x000000", "0xFFFFFF" + ], + "size": [2, 2] + }, + "image": { + "id": "img", + "anchor": "all", + "position": ["center", "center"], + "texture": "pattern", + "textureRect": [32, 32], + "resizable": true, + "stretch": true + } +} +``` + +#### Background image + +```json +{ + "init": true, + "texture": { + "id": "pattern", + "color": [ + "0xFF0000", "0x000000", + "0x000000", "0xFF0000" + ], + "size": [2, 2] + }, + "image": { + "id": "img", + "texture": "pattern", + "background": true + } +} +``` diff --git a/DGEngine.core/docs/drawables/inputText.md b/DGEngine.core/docs/drawables/inputText.md new file mode 100644 index 00000000..00194767 --- /dev/null +++ b/DGEngine.core/docs/drawables/inputText.md @@ -0,0 +1,95 @@ +# InputText + +An `inputText` is a UI element that captures keyboard input and displays it. +Input texts are derived from `text` elements, so you use the same properties, +except the `binding` properties. + +### Example + +```json +"inputText": { + "id": "name", + "font": "font1", + "minLength": 1, + "maxLength": 15, + "regex": "[\\w ]*", + "onClick": { "name": "load", "file": "level/newGame.json" }, + "onMinLength": { "name": "load", "file": "ui/singlePlayer/newNameTooShort.json" } +} +``` + +### Properties + +Name | Type | Default | Description +------------- | -------- | ------- | ---------------------------- +`minLength` | int | | minimum text length +`maxLength` | int | | maximum text length +`minValue` | variable | | minimum value +`maxValue` | variable | | maximum value +`regex` | text | | input validation regex +`onClick` | text | | action to execute on enter key if the input is valid +`onMinLength` | int | | action to execute on enter key if the length is smaller than the minimum length + +Properties in **bold** are required. + +The `minValue` and `maxValue` check if the input is included (value >= min and value <= max) +and ignore input text that invalidates this condition. + +If you set a `minValue` of 10 on an empty `inputText`, you won't be able to type in any value. + +Regex expressions, if set, prevent the you from typing values that don't satisfy the final text value. +Use them only to filter out certain chars. Don't define regexes that require a minimum length. +Use `minLength` instead. + +The `onClick` and `onMinLength` actions are executed when the `inputText.click` action is executed. + +### Examples + +#### InputText with a length between 1 and 15 chars + +```json +{ + "init": true, + "inputText": { + "id": "name", + "font": "font", + "minLength": 1, + "maxLength": 15, + "onClick": { "name": "game.close" }, + "onMinLength": { "name": "game.close" } + } +} +``` + +#### InputText that only accepts numbers bigger than 0 + +```json +{ + "init": true, + "inputText": { + "id": "name", + "font": "font", + "regex": "[1-9]\\d*", + "onClick": { "name": "game.close" }, + "onMinLength": { "name": "game.close" } + } +} +``` + +#### InputText that only accepts numbers between 1 and 9000 + +```json +{ + "init": true, + "inputText": { + "id": "name", + "font": "font", + "minLength": 1, + "maxLength": 4, + "maxValue": 9000, + "regex": "[1-9]\\d*", + "onClick": { "name": "game.close" }, + "onMinLength": { "name": "game.close" } + } +} +``` diff --git a/DGEngine.core/docs/drawables/loadingScreen.md b/DGEngine.core/docs/drawables/loadingScreen.md new file mode 100644 index 00000000..49699200 --- /dev/null +++ b/DGEngine.core/docs/drawables/loadingScreen.md @@ -0,0 +1,107 @@ +# LoadingScreen + +A `loadingScreen` is a UI element that is shown when the game is loading. No other drawable +is drawn when a loading screen is active. + +### Example + +```json +"loadingScreen": { + "texture": "cut2", + "size": [533, 22], + "anchor": "none", + "progressBarOffset": [53, 37], + "color": "0x700901", + "onComplete": { + "name": "game.close" + } +} +``` + +### Properties + +Name | Type | Default | Description +------------------- | ------- | ------------ | ---------------------------- +`texture` | text | | texture +`texturePack` | text | | texturePack used for loading screen animation +`frames` | intVec | [min,max] | texturePack frame range +`textureRect` | intRect | texture size | teture rect. size of the loadingScreen +`color` | text | transparent | progress bar color +`progressBarOffset` | text | | progress bar position offset +`size` | text | | progress bar size +`onComplete` | text | | on complete action + +Properties in **bold** are required. + +When both `texture` and `texturePack` are set, `texture` takes precedence. + +If `texturePack` is set, the animation is updated based on the current loading screen progress. + +### Examples + +#### LoadingScreen using texture and progress bar + +```json +{ + "init": true, + "loadingScreen": { + "texture": "loadingTexture", + "size": [533, 22], + "anchor": "none", + "progressBarOffset": [53, 37], + "color": "0x700901", + "onComplete": { + "name": "game.close" + } + } +} +``` + +#### LoadingScreen using texture and progress bar + +```json +{ + "init": true, + "loadingScreen": { + "texturePack": "loadingAnimation", + "size": [533, 22], + "anchor": "none", + "progressBarOffset": [53, 37], + "color": "0x700901", + "onComplete": { + "name": "game.close" + } + } +} +``` + +#### LoadingScreen using only progress bar + +```json +{ + "init": true, + "loadingScreen": { + "size": [533, 22], + "anchor": "none", + "progressBarOffset": [53, 37], + "color": "0x700901", + "onComplete": { + "name": "game.close" + } + } +} +``` + +#### Empty loadingScreen + +```json +{ + "init": true, + "loadingScreen": { + "anchor": "none", + "onComplete": { + "name": "game.close" + } + } +} +``` diff --git a/DGEngine.core/docs/drawables/menu.md b/DGEngine.core/docs/drawables/menu.md new file mode 100644 index 00000000..76b1ef13 --- /dev/null +++ b/DGEngine.core/docs/drawables/menu.md @@ -0,0 +1,234 @@ +# Menu + +A `menu` is a UI element that presents a list of `StringButton`s and automatically positions +them based on the menu's position, size and drawing area of the buttons. + +String button properties are defined in the menu object and used for each button in the menu. + +### Example + +```json + +"menu": { + "id": "menu1", + "font": "font42g", + "position": [319, 192], + "sound": "titlslct", + "focus": true, + "focusSound": "titlemov", + "items": [ + { + "text": "Play Game", + "onClick": { + "name": "load", + "file": "game/load.json" + } + }, + { + "text": "Exit Game", + "onClick": { + "name": "game.close" + } + } + ] +} +``` + +### Properties + +Name | Type | Default | Description +------------------------- | ------------- | ------- | ---------------------------- +**`