File: agx_dumpstructs.py

package info (click to toggle)
m1n1 1.5.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,468 kB
  • sloc: python: 42,002; ansic: 33,376; asm: 1,101; makefile: 271; xml: 177; sh: 116
file content (19 lines) | stat: -rw-r--r-- 558 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env python3
# SPDX-License-Identifier: MIT

import sys, pathlib, time
sys.path.append(str(pathlib.Path(__file__).resolve().parents[1]))

from m1n1.constructutils import *
from m1n1.fw.agx import microsequence, initdata

#for v in initdata.__all__:
#for v in initdata.__dict__:
def dump(module):
    for v in module.__dict__:
        struct = getattr(module, v)
        if isinstance(struct, type) and issubclass(struct, ConstructClass) and struct is not ConstructClass:
            print(struct.to_rust())
            print()

dump(microsequence)