forked from WoWs-Builder-Team/minimap_renderer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
render_dual.py
26 lines (19 loc) · 809 Bytes
/
render_dual.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import os
from os import path
from src.replay_parser import ReplayParser
from renderer.data import ReplayData
from renderer.render import RenderDual
DIR = os.path.dirname(__file__)
REPLAY_DIR = path.join(DIR, "replays")
if __name__ == "__main__":
with (
open(path.join(REPLAY_DIR, "team1.wowsreplay"), "rb") as gt,
open(path.join(REPLAY_DIR, "team2.wowsreplay"), "rb") as rt,
):
g_replay_info = ReplayParser(gt, True).get_info()
g_replay_data: ReplayData = g_replay_info["hidden"]["replay_data"]
r_replay_info = ReplayParser(rt, True).get_info()
r_replay_data: ReplayData = r_replay_info["hidden"]["replay_data"]
RenderDual(
g_replay_data, r_replay_data, green_tag="Alpha", red_tag="Bravo"
).start("minimap_dual.mp4")