Patch parser for the Empress Effects ZOIA. It takes binary patch and parses its content as structured Golang struct.
Lots of module are still not implemented, any help is appreciated to create module parsers.
This graph has been generated with the script in _example
and the patch 005_zoia_Clown_Shoes.bin
:
package main
import (
"fmt"
"io/ioutil"
"github.com/mdouchement/zoia"
"gopkg.in/yaml.v2"
)
func main() {
data, err := ioutil.ReadFile("011_zoia_Crunch_Time.bin")
check(err)
patch := zoia.Parse(data)
payload, err := yaml.Marshal(patch)
check(err)
fmt.Println(string(payload))
// fmt.Println(patch[:patch.Header.PatchLength])
}
func check(err error) {
if err != nil {
panic(err)
}
}
+----+----+----+----+----+----+----+----+
| 0 | 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 | 27 | 28 | 29 | 30 | 31 |
| 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 |
+----+----+----+----+----+----+----+----+
[header][module#0][module#1][#patch_cables][patch_cables][#pages][page#1][page#2][padding]
^-------------------------------- Patch length ---------------------------------^
- Extended Colours has been added
[header][module#0][module#1][#patch_cables][patch_cables][#pages][page#1][page#2][module#0_extra][module#1_extra][padding]
^--------------------------------------------------- Patch length ----------------------------------------------^
GPLv3
All PRs are welcome.
- Fork it
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create new Pull Request