Commit Graph

1606 Commits

Author SHA1 Message Date
Jan
2073265a86 feat: add templated iw4 material loading 2025-06-26 22:40:30 +01:00
Jan
f897a41188 refactor: extract experimental iw4 material dumping into separate dumper 2025-06-25 22:09:01 +01:00
Jan
223dfcd4f8 refactor: move material asset dumpers to material folder 2025-06-25 21:35:35 +01:00
Jan
110ae473e8 chore: remove old iw4 json code 2025-06-25 19:47:23 +01:00
Jan
6c114fe58a refactor: extract material name into common source file 2025-06-25 19:34:09 +01:00
Jan
dceca0ec9a refactor: use templating for JsonMaterialLoader 2025-06-25 19:16:53 +01:00
Jan
79b0706fc1 refactor: use templating for JsonMaterials 2025-06-25 18:30:07 +01:00
Jan
0736b8043b refactor: use templates for JsonMaterialDumper of IW5 and T6 2025-06-24 22:26:39 +01:00
Jan
2876c9cb48 chore: remove unused generic xmodel file 2025-06-24 20:06:20 +01:00
Jan
308816a38e chore: write game into dumped jsons to prevent mixup of incompatible formats 2025-06-24 19:50:24 +01:00
Jan
79b4313384 refactor: update T6 loading code for x64 support 2025-06-24 17:08:45 +01:00
Jan
a9a8597323 refactor: update IW3 loading code for x64 support 2025-06-24 17:08:45 +01:00
Jan
37e5e940b0 refactor: update IW5 loading code for x64 support 2025-06-24 17:08:45 +01:00
Jan
f70932684c fix: fix single pointer leaf structs that have non-matching cross platform structure 2025-06-24 17:08:45 +01:00
Jan
1736f38d78 refactor: update T5 loading code for x64 support 2025-06-23 18:29:04 +01:00
Jan
dd9b0915d9 fix: wrong XQuat structs for iw3,t5 2025-06-22 21:38:11 +01:00
Jan
377ef5ca5c fix: not passing correct zone ptr to content loader 2025-06-22 21:21:07 +01:00
2230efbd27 chore: make xquat and xquat2 structs to improve handling from zcg 2025-06-19 20:45:19 +01:00
Jan
80558af9a1 fix: accessing freed memory when writing gltf inverseBindMatrix 2025-06-19 18:59:27 +01:00
Jan
818a8d7459 fix: Loading String arrays for x86 2025-06-19 18:59:27 +01:00
Jan
d612d8f1a6 fix: WavWriter outputting invalid files when compiled as x64 2025-06-19 18:59:27 +01:00
Jan
d30e2e6532 chore: fix annoying IW4 cross-type pointer reusage with dirty hack
The game reuses pointer across different types as long as bytes and size matches
This leads to non-pointer and pointer types being reused
To fix this loading code now handles block memory offsets by nulling
and block offsets to non-block data with pointing to raw block data
The behaviour only seems to realistically happen on nulled memory
2025-06-19 18:59:26 +01:00
Jan
667d76e50e wip: change redirect pointer to lookup 2025-06-19 18:59:26 +01:00
Jan
788bf1cc5d chore: make allocating redirect entry work with ptr directly 2025-06-19 18:59:25 +01:00
Jan
3c16da006c chore: make sure that pointer resolving via lookup always resolves something 2025-06-19 18:59:25 +01:00
Jan
bd9a680bb0 fix: pointer lookup for assets that should be reusable 2025-06-19 18:59:24 +01:00
Jan
930867f07f fix: properly load matching structure dynamic array inside non-matching structure embed 2025-06-19 18:59:24 +01:00
Jan
884ad57bf4 fix: dynamic fill loading missing conditions on unions 2025-06-19 18:59:24 +01:00
Jan
fe1bbce7aa fix: do not resolve pointers like alias for x64 2025-06-19 18:59:23 +01:00
Jan
43be997a22 fix: doing wrong alignment on dynamic filling 2025-06-19 18:59:23 +01:00
Jan
ee027502ca fix: Make LoadPtrArray reusable methods for x64 2025-06-19 18:59:23 +01:00
Jan
333cbed5f9 fix: fill structs in runtime block that are not matching structure 2025-06-19 18:59:22 +01:00
Jan
4ec5b52b0b fix: filling x64 structs with dynamic array size 2025-06-19 18:59:22 +01:00
Jan
e035e5deb7 fix: try fixing alias resolving via redirection for x64 for real 2025-06-19 18:59:22 +01:00
Jan
e120d01697 fix: dynamic array reallocation for x64 2025-06-19 18:59:21 +01:00
Jan
967a378b4e chore: temporarly adjust pointer insertion 2025-06-19 18:59:21 +01:00
Jan
f517130ef0 fix: not properly inserting pointer in x64 zone loading 2025-06-19 18:59:21 +01:00
Jan
6c8ec53821 fix: make x64 modified loading code compatible with x86 again 2025-06-19 18:59:20 +01:00
Jan
03ccede91c refactor: implement base x64 fastfile loading for iw4 2025-06-19 18:59:20 +01:00
Jan
78d8fba6f8 refactor: make ZoneInputStream a reference in zone loading 2025-06-14 00:39:58 +01:00
f6d7831e6e chore: implement base skeleton for architecture independent zone loading 2025-06-14 00:39:55 +01:00
49867a3474 fix: accidentally dumping iwi cubemaps as 2D 2025-05-30 19:41:25 +02:00
dc43671930 Changed structure of IWI header writing so 2D images are last. 2025-05-30 17:22:09 +08:00
Jan
2a4c0dcb43 fix: dumping xmodels with multiple surfaces and no bones 2025-05-11 20:55:52 +01:00
35cb6636a1 fix: linux build 2025-05-02 23:26:12 +02:00
Jan
b92e85dc14 refactor: hide implementation of loading steps inside file 2025-05-02 22:08:08 +01:00
Jan
955df98279 refactor: hide implementation details of zone loading processors 2025-05-02 22:08:07 +01:00
Jan
eb16dfcd00 refactor: merge ZoneInputStream interface with only implementation 2025-05-02 22:08:07 +01:00
Jan
4ce82ad63c refactor: update ZoneLoading classes codestyle 2025-05-02 22:08:07 +01:00
446c38d8ee refactor: reorder members of zcg generated classes 2025-05-02 22:08:06 +01:00