Skip to content

Commit

Permalink
extra 오프셋 업데이트(v4 이상)
Browse files Browse the repository at this point in the history
  • Loading branch information
storycraft committed Jan 13, 2021
1 parent 5a68f0c commit c4f5682
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scn-script-inserter/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,14 @@ fn main() {
offsets.resources.offset_pos = (offsets.resources.offset_pos as i32 + diff) as u32;
offsets.resources.data_pos = (offsets.resources.data_pos as i32 + diff) as u32;
offsets.resources.lengths_pos = (offsets.resources.lengths_pos as i32 + diff) as u32;

if header.version > 3 {
let extra = offsets.extra.unwrap();
offsets.extra.unwrap().offset_pos = (extra.offset_pos as i32 + diff) as u32;
offsets.extra.unwrap().data_pos = (extra.data_pos as i32 + diff) as u32;
offsets.extra.unwrap().lengths_pos = (extra.lengths_pos as i32 + diff) as u32;
}

offsets.strings = new_string_offsets;
// 오프셋 업데이트
{
Expand Down

0 comments on commit c4f5682

Please sign in to comment.