Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix up build and improve readme file #29

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ You still need to have the original game assets in order to use this.
<img src="https://files.facepunch.com/Layla/2019/August/11/2019-08-09_22-11-26.png" width="45%">
</a>

# Building
## Building

Clone the code using: `git clone --recursive https://github.com/plowteam/donut.git`

Expand All @@ -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/)
Expand All @@ -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.*

Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/Character.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<Skeleton>(*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;
}
}
}
Expand Down
1 change: 1 addition & 0 deletions src/Core/MemoryStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <string>
#include <vector>
#include <cstring>
#include <cstdint>

namespace Donut
{
Expand Down