[viewer] Surface recovered TOC names in the PAK browser + refresh RE panel
- Move the IDXD->TOC-path resolver into sylpheed-formats as IdxdObject::recover_toc_path() so the CLI `pak list` and the GUI pack browser share one implementation (behaviour-preserving; CLI still resolves 308/1004 on GP_MAIN_GAME_E). - PAK browser now shows each entry's recovered original path (via the name-hash) in green, in both the entry list and the IDXD detail heading. - Replace the stale welcome "RE Notes" table (mesh/audio "unknown") with an accurate reverse-engineered-formats status grid + correct authorship. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -130,6 +130,9 @@ pub struct PakRow {
|
||||
pub format: String,
|
||||
/// Short identity (`ID=…` / `Name=…`), empty for non-IDXD entries.
|
||||
pub identity: String,
|
||||
/// Recovered original TOC path (e.g. `unit\rou_f001.tbl`) via the name-hash,
|
||||
/// when a known scheme reproduces `hash`. `None` = unresolved (~70% of entries).
|
||||
pub name: Option<String>,
|
||||
/// Parsed IDXD detail for the property table, when the entry is an object.
|
||||
pub detail: Option<PakDetail>,
|
||||
/// Decoded presentable payload for the detail pane (subtitle / font / image
|
||||
@@ -799,6 +802,7 @@ fn build_pak_rows(index: &[u8], data: Vec<u8>) -> Result<Vec<PakRow>, String> {
|
||||
size: e.comp_size as usize,
|
||||
format: "(not decoded)".into(),
|
||||
identity: String::new(),
|
||||
name: None,
|
||||
detail: None,
|
||||
content: PakContent::None,
|
||||
});
|
||||
@@ -808,7 +812,7 @@ fn build_pak_rows(index: &[u8], data: Vec<u8>) -> Result<Vec<PakRow>, String> {
|
||||
Ok(payload) => {
|
||||
decoded_budget += payload.len();
|
||||
let format = inner_format_label(&payload);
|
||||
let (identity, detail) = if IdxdObject::is_idxd(&payload) {
|
||||
let (identity, name, detail) = if IdxdObject::is_idxd(&payload) {
|
||||
match IdxdObject::parse(&payload) {
|
||||
Ok(obj) => {
|
||||
let fields = obj
|
||||
@@ -818,6 +822,7 @@ fn build_pak_rows(index: &[u8], data: Vec<u8>) -> Result<Vec<PakRow>, String> {
|
||||
.collect();
|
||||
(
|
||||
obj.identity(),
|
||||
obj.recover_toc_path(e.name_hash),
|
||||
Some(PakDetail {
|
||||
schema_hash: obj.schema_hash,
|
||||
count: obj.count,
|
||||
@@ -825,10 +830,10 @@ fn build_pak_rows(index: &[u8], data: Vec<u8>) -> Result<Vec<PakRow>, String> {
|
||||
}),
|
||||
)
|
||||
}
|
||||
Err(_) => (String::new(), None),
|
||||
Err(_) => (String::new(), None, None),
|
||||
}
|
||||
} else {
|
||||
(String::new(), None)
|
||||
(String::new(), None, None)
|
||||
};
|
||||
// Presentable content for non-IDXD entries (subtitle/font/png/text).
|
||||
let content = if detail.is_some() {
|
||||
@@ -842,6 +847,7 @@ fn build_pak_rows(index: &[u8], data: Vec<u8>) -> Result<Vec<PakRow>, String> {
|
||||
size: payload.len(),
|
||||
format,
|
||||
identity,
|
||||
name,
|
||||
detail,
|
||||
content,
|
||||
});
|
||||
@@ -852,6 +858,7 @@ fn build_pak_rows(index: &[u8], data: Vec<u8>) -> Result<Vec<PakRow>, String> {
|
||||
size: e.comp_size as usize,
|
||||
format: "(read error)".into(),
|
||||
identity: err.to_string(),
|
||||
name: None,
|
||||
detail: None,
|
||||
content: PakContent::None,
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user