// pvfpoolresolve 用归档 API 把池偏移解析成真实字符串, // 确认 origin_cinematic_10..13 在池里的内容与文件名一致。 package main import ( "flag" "fmt" platformpvf "longheng.io/server/internal/platform/pvf" ) func main() { input := flag.String("pvf", "", "input PVF") flag.Parse() archive, err := platformpvf.Open(*input) if err != nil { panic(err) } fmt.Println("=== 已知引用(来自 scene.etc 影片块)对照 ===") known := []struct { ref int name string }{ {0x02513B14, "origin_cinematic_01"}, {0x02513BAC, "origin_cinematic_02"}, {0x02513C4E, "origin_cinematic_03"}, {0x02513CE8, "origin_cinematic_04"}, {0x02513D84, "origin_cinematic_05"}, {0x02513EC8, "origin_cinematic_06"}, {0x02513F60, "origin_cinematic_09"}, {0x025140F8, "cinematic_06"}, {0x0251417C, "cinematic_07"}, {0x0251420C, "origin_cinematic_07"}, {0x0251429E, "cinematic_09"}, {0x0251436A, "origin_cinematic_08"}, {0x025143FA, "cinematic_11"}, } for _, k := range known { s := archive.ResolveString(k.ref) mark := "OK" if s != "Video/movie/"+k.name+".avi" { mark = "**不一致**" } fmt.Printf(" 0x%08X %-22s → %q %s\n", k.ref, k.name, s, mark) } fmt.Println("\n=== 候选引用(origin_cinematic_10..13,来自 townmovielist.etc)===") cands := []struct { ref int want string }{ {0x0349D3BA, "origin_cinematic_10"}, {0x0349D402, "origin_cinematic_11"}, {0x0349D44A, "origin_cinematic_12"}, {0x0349D492, "origin_cinematic_13"}, } for _, c := range cands { s := archive.ResolveString(c.ref) mark := "OK" if s != "Video/movie/"+c.want+".avi" { mark = "**不一致**" } fmt.Printf(" 0x%08X %-22s → %q %s\n", c.ref, c.want, s, mark) } fmt.Println("\n=== 用 FindStringMagicOffsets 反查(更可靠)===") wants := []string{} for i := 1; i <= 13; i++ { wants = append(wants, fmt.Sprintf("Video/movie/origin_cinematic_%02d.avi", i)) } got := archive.FindStringMagicOffsets(wants) for _, w := range wants { if off, ok := got[w]; ok { fmt.Printf(" %-40s 0x%08X\n", w, off) } else { fmt.Printf(" %-40s ❌ 不在池中\n", w) } } }