GFXMMU: Add transform to automate cleanup and array creation.

This commit is contained in:
JackN 2023-10-13 17:15:33 -04:00
parent 0f0517404e
commit bcaacfcfa2
2 changed files with 27 additions and 1 deletions

2
.gitignore vendored
View File

@ -3,7 +3,7 @@
/sources /sources
/tmp /tmp
.idea/ .idea/
transform*.yaml # transform*.yaml
__pycache__ __pycache__
target/ target/

26
transform-GFXMMU.yaml Normal file
View File

@ -0,0 +1,26 @@
transforms:
- !RenameRegisters
block: .*
from: GFXMMU_(.+)
to: $1
- !RenameFields
fieldset: .*
from: GFXMMU_(.+)
to: $1
- !Rename
from: GFXMMU_(.+)
to: $1
- !DeleteEnums
from: .*(IE|_EN|FI|FF|PD|OC|OB|FC|CL|CE)$
bit_size: 1
- !MakeFieldArray
fieldsets: .*
from: ([A-Z]+)\d+([A-Z]*)
to: $1$2
- !MergeFieldsets
from: ([A-Z]+)\d+([A-Z]*)
to: $1$2
- !MakeRegisterArray
blocks: .*
from: ([A-Z]+)\d+([A-Z]*)
to: $1$2