Skip to content
Merged
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
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,11 @@ Master/Darwin/steam/
Master/Darwin/deps/
# Local game data (.dat) for dev builds — copyrighted, never committed
Master/Darwin/localdata/
# DROD RPG macOS build output (reuses the main game's Master/Darwin/deps)
drodrpg/Master/Darwin/custom/
drodrpg/Master/Darwin/release/
drodrpg/Master/Darwin/debug/
drodrpg/Master/Darwin/steam/
drodrpg/Master/Darwin/localdata/
.DS_Store
.idea
32 changes: 32 additions & 0 deletions CompilingDrod_macOS.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,3 +175,35 @@ apart from the Steam TSS data in `localdata/TSS/` (`drod-tss5_0.dat`). It is the
same binary as a full standalone TSS, so it shares the `custom/` build objects — no
recompile when switching between them. TSS-standalone only (not with `--game` /
`--steam`).

## DROD RPG

DROD RPG is a separate game (`drodrpg/`) with its own copy of this modern build
system in **`drodrpg/Master/Darwin`**. Build it exactly the same way:

```
cd drodrpg/Master/Darwin
./build_macos.sh # -> "DROD RPG 2.app" under custom/bin/
./build_macos.sh --steam --steam-appid # Steam build (AppID 3661610)
```

`make drod-custom` / `make drod-release` / `make drod-steam` build just the binary.
`--universal`, `--dmg`, `--build-type`, `--output` and `--name` behave as above.

Notes specific to DROD RPG:

- **Shared code.** DROD RPG uses the repo-root `BackEndLib` and `FrontEndLib`
(only `DRODLib`, `CaravelNet`, `DROD`, `DRODUtil` live under `drodrpg/`). The
Makefile sources those two modules from the repo root automatically.
- **Shared dependencies.** It reuses the main game's from-source libraries in
`Master/Darwin/deps` and the repo-root `metakit` submodule — the dep sets are
identical, so they are built once by `Master/Darwin/build_deps.sh` (invoked
automatically). Build the main game's deps first, or just run RPG's
`build_macos.sh` without `--skip-deps` and it bootstraps them.
- **Game data.** Same three-source split as the main game (see *Game assets*
above). The data file is `drodrpg2_0.dat` — the real build (tilesets,
music and sounds baked in) is not open-source; drop it into
`drodrpg/Master/Darwin/localdata/` (gitignored). The loose Fonts + UI Bitmaps
come from the private **`drodrpgData`** repo (auto-detected as a sibling, or
`--assets /path/to/drodrpgData`); `Help/` and `Licenses/` come from this repo.
It is a single game, so there is no `--game` / variant selection.
7 changes: 4 additions & 3 deletions drodrpg/DROD/DrodScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1138,9 +1138,10 @@ void CDrodScreen::EditGlobalVars(
wstrValue = pGame->GetArrayVarAsString(itemID);
} else if (vType == UVT_int) {
int iVarValue = stats.GetVar(varName, (int)0);
std::basic_stringstream<WCHAR_t> stream;
stream << iVarValue;
wstrValue = stream.str();
// libc++ (macOS) has no std::ctype<char16_t>, so a
// basic_stringstream<WCHAR_t> won't compile; use _itoW.
WCHAR wszIBuf[16];
wstrValue = _itoW(iVarValue, wszIBuf, 10);
}
else {
wstrValue = stats.GetVar(varName, WS("0"));
Expand Down
7 changes: 4 additions & 3 deletions drodrpg/DROD/EntranceSelectDialogWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -589,9 +589,10 @@ void CEntranceSelectDialogWidget::PopulateListBoxFromHoldVars(CCurrentGame* pGam
wVarValue += wszRightBracket;
} else if (vType == UVT_int) {
int iVarValue = stats.GetVar(varName, (int)0);
std::basic_stringstream<WCHAR_t> stream;
stream << iVarValue;
wVarValue = stream.str();
// libc++ (macOS) has no std::ctype<char16_t>, so a
// basic_stringstream<WCHAR_t> won't compile; use _itoW.
WCHAR wszIBuf[16];
wVarValue = _itoW(iVarValue, wszIBuf, 10);
} else {
wVarValue = stats.GetVar(varName, WS("0"));
}
Expand Down
15 changes: 9 additions & 6 deletions drodrpg/DRODLib/I18N.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,23 +51,26 @@ namespace I18N {
bool bHasModifier = bIsShift || bIsCtrl || bIsAlt;
bool bHasNonModifier = keyCode != SDLK_UNKNOWN;

std::basic_stringstream<WCHAR> str;
// Plain WSTRING concatenation rather than a basic_stringstream<WCHAR>:
// libc++ (macOS) lacks the std::ctype<char16_t> facet that char16_t
// streams need.
WSTRING str;

if (bIsShift) {
str << (wModifierCount > 1 && bHasNonModifier ? ShiftShort : ShiftLong);
str += (wModifierCount > 1 && bHasNonModifier ? ShiftShort : ShiftLong);
}

if (bIsCtrl) {
str << (wModifierCount > 1 && bHasNonModifier ? CtrlShort : CtrlLong);
str += (wModifierCount > 1 && bHasNonModifier ? CtrlShort : CtrlLong);
}

if (bIsAlt) {
str << (wModifierCount > 1 && bHasNonModifier ? AltShort : AltLong);
str += (wModifierCount > 1 && bHasNonModifier ? AltShort : AltLong);
}

if (keyCode != SDLK_UNKNOWN)
str << g_pTheDB->GetMessageText(InputCommands::KeyToMID(keyCode));
str += g_pTheDB->GetMessageText(InputCommands::KeyToMID(keyCode));

return str.str();
return str;
}
}
Loading
Loading