Skip to content

Commit

Permalink
- fix font size (gamefiles)
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
dgcor committed Sep 8, 2022
1 parent b5d82d0 commit ffe88fb
Show file tree
Hide file tree
Showing 895 changed files with 32,431 additions and 22,917 deletions.
8 changes: 7 additions & 1 deletion .editorconfig
Expand Up @@ -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
Expand Down Expand Up @@ -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
101 changes: 101 additions & 0 deletions .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
97 changes: 97 additions & 0 deletions .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
77 changes: 40 additions & 37 deletions .github/workflows/main.yml
Expand Up @@ -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
12 changes: 4 additions & 8 deletions .gitignore
@@ -1,3 +1,6 @@
!.vscode/launch.json
.vscode/*
/*.AppImage
/*.cbp
/*.db
/*.depend
Expand Down Expand Up @@ -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
Expand All @@ -46,12 +44,10 @@
/hfvoice.*
/Makefile
/obj
/PhysicsFS
/out
/portable
/Release
/Release NoMovie
/Release Static
/Release Static NoMovie
/sfeMovie
/SFML
/x64

0 comments on commit ffe88fb

Please sign in to comment.