OpenCoD2-Plus
Call of Duty 2 client & server, rebuilt
Loading...
Searching...
No Matches
bgame_plus_consts Namespace Reference

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']

Detailed Description

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.

Function Documentation

◆ header()

bgame_plus_consts.header ( names,
vals )

◆ load()

bgame_plus_consts.load ( path)

◆ main()

bgame_plus_consts.main ( )

◆ values()

bgame_plus_consts.values ( cxx,
names,
protocol,
tmp )

Variable Documentation

◆ HEADER

bgame_plus_consts.HEADER = os.path.join(ROOT, 'src', 'PC', 'bgame', 'bg_plus_consts.h')

◆ INCLUDES

list bgame_plus_consts.INCLUDES = ['qcommon/qcommon.h', 'bgame/bg_public.h', 'game/g_shared.h']

◆ NAMES

bgame_plus_consts.NAMES = os.path.join(ROOT, 'test', 'bgame_plus_consts.txt')

◆ ROOT

bgame_plus_consts.ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))