Skip to content

Commit

Permalink
proper resource dumping in gui
Browse files Browse the repository at this point in the history
  • Loading branch information
pizzart committed Oct 26, 2023
1 parent 119238e commit 340ee4e
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions bff-gui/src/panels/top.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use bff::class::Class;
use bff::names::Name;
use bff::traits::TryIntoVersionPlatform;
use egui;
use image::EncodableLayout;

use crate::{load_bigfile, Artifact};

Expand Down Expand Up @@ -106,17 +105,19 @@ pub fn menubar(
.add_filter("raw", &[resource.class_name.to_string()])
.save_file()
{
let data = match &resource.data {
bff::bigfile::resource::ResourceData::Data(data) => data.clone(),
bff::bigfile::resource::ResourceData::SplitData {
link_header,
body,
} => [link_header.clone(), body.clone()].concat(),
};
File::create(path)
let mut w = File::create(path).unwrap();
bigfile
.as_ref()
.unwrap()
.write_all(data.as_bytes())
.dump_resource(resource, &mut w)
.unwrap();
// let data = match &resource.data {
// bff::bigfile::resource::ResourceData::Data(data) => data.clone(),
// bff::bigfile::resource::ResourceData::SplitData {
// link_header,
// body,
// } => [link_header.clone(), body.clone()].concat(),
// };
}
}
});
Expand Down

0 comments on commit 340ee4e

Please sign in to comment.