|
OpenCoD2-Plus
Call of Duty 2 client & server, rebuilt
|
opencod2-plus is a reconstruction of Call of Duty 2 multiplayer (1.3 and 1.0) whose dedicated server, and the client's local server, run OpenCoD2-Plus Server's code over the reconstructed engine. This page is the map; the rules are in boundaries.md, the decisions in adr/.
| Layer | Directories | Origin | Language |
|---|---|---|---|
| Engine (client, renderer, sound, UI, cgame, effects) | src/PC/* | reconstruction of the 1.3 binaries (upstream opencod2) | C sources compiled as C++ (gnu++17) |
| Data blobs | src/blobs, build/native_gen, build/win_gen | the original binaries' .data/.bss/literals | C, .S |
| Platform glue | src/Mac (GL behind a Direct3D interface), src/stubs, src/unix, src/win32, src/web | upstream + this fork | C/C++ |
| Vendored OpenCoD2-Plus Server | src/script, src/server, src/game, src/bgame, src/qcommon, src/universal, src/xanim, src/libcod, src/stringed, src/unix, src/win32, src/zlib (unzip), a header each in src/ui and src/misc; plus mods/bots and six test scripts | OpenCoD2-Plus Server, byte for byte (list: test/vendored_files.txt) | C++ |
| Bridge | src/compat | generated by scripts/gen_script_bridge.py + hand-written thunks | C++ |
| Headers | src/headers | shared layouts with COD2_ASSERT_FIELD/SIZE pins | C/C++ |
src/unix and src/win32 are OpenCoD2-Plus Server's platform code in the dedicated server; the engine's own platform files are listed in test/plus_replaces.txt.
| Target | Engine | OpenCoD2-Plus Server | Bridge modules |
|---|---|---|---|
| cod2_lnxded, cod2_win32_ded.exe (dedicated) | only code it never runs (linked for symbols) + stubs | VM, server, game, bgame, core, xanim, libcod | script, server |
| cod2_linux, cod2_win32.exe, cod2 (web) (client) | everything | VM, server, game, bgame, collision, libcod but on Win64 and the web (local games, built with LISTEN_SERVER) | script, client_server |
| Option | Default | Effect |
|---|---|---|
| COD2_CXX_ALL | ON | engine C sources built as C++ through extern "C" wrappers |
| COD2_PLUS_LIBCOD | ON | libcod in the dedicated server and local games |
| COD2_WIN32_CLIENT | OFF | MinGW builds the client instead of the dedicated server |
| COD2_WIN32_REAL_D3D9 | ON | Windows client on real Direct3D 9 + d3dx9 HLSL (OFF: GL device) |
| COD2_FEATURE_CFLAGS | "" | -DCOD2_PATCH_10 builds 1.0 (protocol 115) |
Details: ../development/building.md.
| Subsystem | Notes |
|---|---|
| Dedicated server, script VM, game, core, libcod | server.md |
| Client: local server, collision, prediction, server commands, entities | client.md |
| Renderer (Direct3D 9 path, tables, outdoor map) | renderer.md |
| Effects (EffectsCore) | effects.md |