Browse Source

Fix the bug that required a huge number of file handles simultaneously for big models

master
parent
commit
49e13f71fe
Signed by: govanify GPG Key ID: DE62E1E2A6145556
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      kh2mdlx.cpp

+ 2
- 0
kh2mdlx.cpp View File

@@ -300,6 +300,8 @@ void write_packet(int vert_count, int bone_count, int face_count,
fseek(kh2v, 0x0, SEEK_END);
dma_entry->vif_len = ftell(kh2v) / 16;
dma_entry->res1 = 0x3000;

fclose(kh2v);
// TOFIX: we don't know yet where in the final file our packet will
// end up so we blank it out for now.
dma_entry->vif_off = 0;


Loading…
Cancel
Save