|
OpenCoD2-Plus
Call of Duty 2 client & server, rebuilt
|
Functions | |
| load (path) | |
| values (cxx, names, protocol, tmp) | |
| header (names, vals) | |
| main () | |
Variables | |
| ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | |
| NAMES = os.path.join(ROOT, 'test', 'bgame_plus_consts.txt') | |
| HEADER = os.path.join(ROOT, 'src', 'PC', 'bgame', 'bg_plus_consts.h') | |
| list | INCLUDES = ['qcommon/qcommon.h', 'bgame/bg_public.h', 'game/g_shared.h'] |
Writes the constants of CoD2rev-Plus's bgame for the engine's.
python3 scripts/bgame_plus_consts.py [--cxx c++] [--check]
The engine's bgame (src/PC/bgame) follows CoD2rev-Plus's (src/bgame) line by
line, but cannot include its headers (their types clash with the engine's).
This compiles a program with CoD2rev-Plus's headers, once for each protocol,
that prints the value of each name in test/bgame_plus_consts.txt, and writes
them as #defines to src/PC/bgame/bg_plus_consts.h; a name whose value
differs between 1.0 and 1.3 is an error. With --check it only compares the
header with what it would write.
| bgame_plus_consts.header | ( | names, | |
| vals ) |
| bgame_plus_consts.load | ( | path | ) |
| bgame_plus_consts.main | ( | ) |
| bgame_plus_consts.values | ( | cxx, | |
| names, | |||
| protocol, | |||
| tmp ) |
| bgame_plus_consts.HEADER = os.path.join(ROOT, 'src', 'PC', 'bgame', 'bg_plus_consts.h') |
| list bgame_plus_consts.INCLUDES = ['qcommon/qcommon.h', 'bgame/bg_public.h', 'game/g_shared.h'] |
| bgame_plus_consts.NAMES = os.path.join(ROOT, 'test', 'bgame_plus_consts.txt') |
| bgame_plus_consts.ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) |