OpenRA3 v0.0.1: C++26 modules, BIG4/RefPack reader, minimal skirmish

This commit is contained in:
EnderTheCoder
2026-09-12 00:26:45 +08:00
commit 3ad380c81e
24 changed files with 2630 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
#!/usr/bin/env bash
# Sparse-clone the GPLv3 SAGE 1.0 engine sources used as OpenRA3's reference.
#
# Usage: tools/fetch_reference.sh [destination]
set -euo pipefail
REPO="https://github.com/electronicarts/CnC_Generals_Zero_Hour.git"
DEST="${1:-reference/CnC_Generals_Zero_Hour}"
if [ -d "$DEST/.git" ]; then
echo "reference already present at $DEST"
exit 0
fi
mkdir -p "$(dirname "$DEST")"
git clone --depth 1 --filter=blob:none --sparse "$REPO" "$DEST"
git -C "$DEST" sparse-checkout set Generals GeneralsMD
echo "reference ready at $DEST"
+26
View File
@@ -0,0 +1,26 @@
# Ghidra helpers
OpenRA3's retail facts are recovered through the Ghidra MCP bridge. The retail
module is loaded as `ra3_1.12.game` (image base `0x400000`, x86 32-bit).
## Quick queries
```text
decompile_function(address=0x00623e40) # GameLogic::startNewGame
decompile_function(address=0x0060c4a0) # MessageStream::appendMessage
get_function_by_address(address=0x00cd8ce4) # TheGameLogic global
get_xrefs_to(address=0x00ce3a78) # who touches the skirmish setup
search_strings(search_term="SkirmishGameInfo")
```
## Recording a finding
When a layout or constant is recovered:
1. Add it to [`../../docs/REVERSE_ENGINEERING.md`](../../docs/REVERSE_ENGINEERING.md)
with its retail address.
2. Cite the address in the OpenRA3 source comment that depends on it.
3. Add a test that pins the behaviour.
The goal is that every assertion in the code can be re-derived from the binary
by someone who has never seen this repo.