1
0
mirror of https://github.com/garraflavatra/go-fmp.git synced 2025-06-28 04:25:11 +00:00
This commit is contained in:
2025-06-12 21:21:55 +02:00
parent f72d9510d4
commit 7fa7a3787d
7 changed files with 83 additions and 71 deletions

View File

@ -3,28 +3,31 @@ package fmp
func (ctx *FmpFile) Tables() []*FmpTable {
tables := make([]*FmpTable, 0)
for _, chunk := range ctx.Chunks {
if chunk.Key != 3 || chunk.Type != FMP_CHUNK_SIMPLE_KEY_VALUE {
for key, ent := range *ctx.Dictionary {
if key != 3 {
continue
}
println("Found a 3")
for _, chunk = range ctx.Chunks {
if chunk.Key != 16 {
for key, ent = range *ent.Children {
if key != 16 {
continue
}
println("Found a 3.16")
for _, chunk = range ctx.Chunks {
if chunk.Key != 5 {
for key, ent = range *ent.Children {
if key != 5 {
continue
}
println("Found a 3.16.5")
for tablePath, chunk := range ctx.Chunks {
if chunk.Key >= 128 {
for tablePath := range *ent.Children {
if key >= 128 {
continue
}
// Found a table!
println("Found one at", tablePath)
println("Found a table at 3.16.5.", tablePath)
}
}
}