Files
AVA2/tools/generate_all_gameplay_modules.py
T

36 lines
1.4 KiB
Python

import re
import subprocess
from pathlib import Path
root = Path(__file__).resolve().parents[1]
upstream = root / "upstream/ava2-client"
modules_spec = [
("item", "initItem", "UserInterface/PythonItemModule.cpp"),
("player", "initPlayer", "UserInterface/PythonPlayerModule.cpp"),
("chrmgr", "initchrmgr", "UserInterface/PythonCharacterManagerModule.cpp"),
("chr", "initchr", "UserInterface/PythonCharacterModule.cpp"),
("chat", "initChat", "UserInterface/PythonChatModule.cpp"),
("snd", "initsnd", "UserInterface/PythonSoundManagerModule.cpp"),
("background", "initBackground", "UserInterface/PythonBackgroundModule.cpp"),
]
# We need to collect:
# 1. All methods per module
# 2. All constants per module with their exact evaluated integer values!
# Let's inspect which headers define all the constants needed.
# For ItemData: all enums in CItemData
# For GameType.h: c_Equipment_*, c_Inventory_*, c_Costume_*, etc.
# For Packet.h: EPointTypes, etc.
# For InstanceBase.h: CInstanceBase enums (DIR_*, etc.)
# For RaceData.h / RaceMotionData.h: CRaceMotionData enums (NAME_*, etc.)
# For PythonPlayer.h: CPythonPlayer enums
# For PythonItem.h: CPythonItem enums
# For PythonChat.h: CPythonChat enums
# For PythonBackground.h: CPythonBackground enums
# Let us construct a single unified C++ file that stubs all external Win32/D3D dependencies,
# includes the relevant enums and constants from upstream, and prints:
# MODULE:NAME:VALUE