Initial commit: Theriapolis baseline at port/godot branch point

Captures the pre-Godot-port state of the codebase. This is the rollback
anchor for the Godot port (M0 of theriapolis-rpg-implementation-plan-godot-port.md).
All Phase 0 through Phase 6.5 work is included; Phase 7 is in flight.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Christopher Wiebe
2026-04-30 20:40:51 -07:00
commit b451f83174
525 changed files with 75786 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
using Theriapolis.Game;
// Resolve content directories relative to the executable.
// Distribution: Data/ and Gfx/ sit next to the exe (absolute path)
// Development: walk up from the exe to find Content/Data and Content/Gfx
string dataDir = ResolveContentDir("Data");
string gfxDir = ResolveContentDir("Gfx");
static string ResolveContentDir(string subdir)
{
// 1. "<subdir>" next to the executable — distribution layout
string local = Path.Combine(AppContext.BaseDirectory, subdir);
if (Directory.Exists(local)) return local;
// 2. Walk up from the exe to find Content/<subdir> — development layout.
// Trim the trailing separator first: on Windows AppContext.BaseDirectory ends
// with '\', and GetDirectoryName on a trailing-slash path strips the slash
// without ascending, wasting one iteration.
string? dir = AppContext.BaseDirectory.TrimEnd(
Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
for (int i = 0; i < 6; i++)
{
if (dir is null) break;
string candidate = Path.Combine(dir, "Content", subdir);
if (Directory.Exists(candidate)) return candidate;
dir = Path.GetDirectoryName(dir);
}
return local; // missing-file errors will surface from the consumer with the bad path
}
using var game = new Game1
{
ContentDataDirectory = dataDir,
ContentGfxDirectory = gfxDir,
};
game.Run();
@@ -0,0 +1,35 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>Theriapolis.Desktop</RootNamespace>
<AssemblyName>Theriapolis.Desktop</AssemblyName>
<LangVersion>12</LangVersion>
<!-- Required for MonoGame DesktopGL native libs to copy correctly -->
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64;osx-arm64</RuntimeIdentifiers>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.2.1105" />
<!-- MonoGame.Content.Builder.Task is added here when content assets are ready (Phase 2+).
Phase 0/1 generates all textures at runtime; no content pipeline pass needed. -->
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Theriapolis.Game\Theriapolis.Game.csproj" />
</ItemGroup>
<!-- Copy content data + gfx assets to output alongside the executable -->
<ItemGroup>
<Content Include="..\Content\Data\**\*"
Link="Data\%(RecursiveDir)%(Filename)%(Extension)"
CopyToOutputDirectory="PreserveNewest" />
<Content Include="..\Content\Gfx\**\*"
Link="Gfx\%(RecursiveDir)%(Filename)%(Extension)"
CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<!-- MonoGame content pipeline reference (activate in Phase 2+ when assets exist):
<ItemGroup>
<MonoGameContentReference Include="..\Content\Content.mgcb" />
</ItemGroup>
-->
</Project>