From 54e1f1b740914e69017225f9bf5d54840491953b Mon Sep 17 00:00:00 2001 From: Alexey Andreyev Date: Wed, 27 Mar 2024 18:27:13 +0300 Subject: [PATCH 1/5] README: add section how to run the build --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index b5a2374..824ea09 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,10 @@ cmake --build build -j 5 **Mesa drivers on Linux:** if you are trying to run with Mesa drivers and are getting issues with OpenGL context try messing with `MESA_GL_VERSION_OVERRIDE` when running like so: `MESA_GL_VERSION_OVERRIDE=4.3FC MESA_GLSL_VERSION_OVERRIDE=430 bin/donut` +## Running + +The binary called `donut` should be launched from the root of the original game deployment (similar to original `Simpsons` binary). Additional assets from the `assets` source directory (both `windows` and `shaders`) should also be copied to the root of the original game deployment. + ## Docs * [Chunks](dev/Chunks.md) * [Commands](dev/Commands.md) From 7957f2b429aaf588c9eccc20fd65c71a84975744 Mon Sep 17 00:00:00 2001 From: Alexey Andreyev Date: Wed, 27 Mar 2024 18:28:38 +0300 Subject: [PATCH 2/5] README: clean up section levels --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 824ea09..b42df18 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ You still need to have the original game assets in order to use this. -# Building +## Building Clone the code using: `git clone --recursive https://github.com/plowteam/donut.git` @@ -32,7 +32,7 @@ Linux:~/$ ./vcpkg install sdl2 bullet3 openal-soft fmt If you don't want to use vcpkg; CMake will fallback on installed system dependencies, or manually specified package directories. -## Windows +### Windows * Install [Visual Studio 2019](https://visualstudio.microsoft.com/downloads/) * Install [CMake](https://cmake.org/download/) @@ -47,7 +47,7 @@ cd donut cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows ``` -## Linux +### Linux *Note: These instructions are for Ubuntu, but can be easily applied to other distros.* From c43b7e2c5e5e92bd6e3e56fe09b640726f956eba Mon Sep 17 00:00:00 2001 From: Alexey Andreyev Date: Wed, 27 Mar 2024 18:30:04 +0300 Subject: [PATCH 3/5] cmake: improve dependencies list Add missing glm dependency. Add links to project websites of the dependencies. --- CMakeLists.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3865e9b..7c93540 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,10 +39,11 @@ mark_as_advanced(_CXX_FILESYSTEM_HAVE_HEADER) mark_as_advanced(_CXX_FILESYSTEM_HAVE_EXPERIMENTAL_HEADER) # Dependencies -find_package(SDL2 REQUIRED) -find_package(fmt REQUIRED) -find_package(OpenAL REQUIRED) #find_package(openal-soft CONFIG REQUIRED) -find_package(Bullet REQUIRED) +find_package(SDL2 REQUIRED) # https://www.libsdl.org +find_package(fmt REQUIRED) # https://fmt.dev +find_package(OpenAL REQUIRED) #find_package(openal-soft CONFIG REQUIRED) # https://github.com/kcat/openal-soft +find_package(Bullet REQUIRED) # http://www.bulletphysics.com/Bullet/ +find_package(glm REQUIRED) # http://glm.g-truc.net # Setup an interface library for Bullet, this allows us to target Debug/Release configurations properly. # This should be resolved once https://github.com/microsoft/vcpkg/pull/9098 is merged. From e366ea95a96a470dab6aa40a6cebf711c3c6d88f Mon Sep 17 00:00:00 2001 From: Alexey Andreyev Date: Wed, 27 Mar 2024 18:33:02 +0300 Subject: [PATCH 4/5] core: Add missing header, fix build To use uint8_t from cstdint --- src/Core/MemoryStream.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Core/MemoryStream.h b/src/Core/MemoryStream.h index 82ece52..57115b5 100644 --- a/src/Core/MemoryStream.h +++ b/src/Core/MemoryStream.h @@ -5,6 +5,7 @@ #include #include #include +#include namespace Donut { From d199941cc97ee01ebaf103d174c9bdcbd97e45ee Mon Sep 17 00:00:00 2001 From: Alexey Andreyev Date: Wed, 27 Mar 2024 18:35:23 +0300 Subject: [PATCH 5/5] character: fix build in formatting user-defined types Tested with fmt library version 10.2.0 See also: https://fmt.dev/latest/api.html#udt --- src/Character.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Character.cpp b/src/Character.cpp index df957d2..b85f4b1 100644 --- a/src/Character.cpp +++ b/src/Character.cpp @@ -41,7 +41,7 @@ void Character::LoadModel(const std::string& name) case P3D::ChunkType::Texture: Game::GetInstance().GetResourceManager().LoadTexture(*P3D::Texture::Load(*chunk)); break; case P3D::ChunkType::PolySkin: _skinModel->LoadPolySkin(*P3D::PolySkin::Load(*chunk)); break; case P3D::ChunkType::Skeleton: _skeleton = std::make_unique(*P3D::Skeleton::Load(*chunk)); break; - default: fmt::print("unhandled chunk {1} in character {0}\n", name, chunk->GetType()); break; + default: fmt::print("unhandled chunk {1} in character {0}\n", name, fmt::underlying(chunk->GetType())); break; } } }