Commit Graph
306 Commits
Author SHA1 Message Date
Jan LaupetinandGitHub 04b6b5b4bf refactor: physpreset codestyle (#928)
* chore: adjust phys preset code to use similar code style

* fix: infinity friction for t6

* fix: t6 phys preset canFloat qboolean

* chore: move iw5 phys preset enum strings to enum strings header

* chore: add phys preset tests for all games

* chore: rename PhysPresetFields headers
2026-07-22 21:08:36 +02:00
37bb67a3a5 feat: add T4 PhysPreset support (#925)
* feat: add T4 PhysPreset support

* chore: slight adjustment to how the max friction constant is named

---------

Co-authored-by: Jan Laupetin <[email protected]>
2026-07-21 23:56:59 +02:00
moandGitHub 2188f49a08 feat: templated tracer loading and dumping for IW4 and IW5 (#921)
Relates to https://github.com/Laupetin/OpenAssetTools/issues/626
2026-07-20 23:36:40 +02:00
moandGitHub 786ccc14d3 fix: prevent IWD paths from matching nested filenames (#908)
Fixes https://github.com/Laupetin/OpenAssetTools/issues/887
2026-07-18 11:44:55 +02:00
Jan LaupetinandGitHub a87850d36e fix: csv stream special cases (#902)
* chore: add tests for csv stream

* fix: csv values must have quotes when they contain a new line

* fix: csv reader did not properly handle special cases
2026-07-12 18:00:46 +02:00
e45272137f feat: T4 and T5 physconstraints dumping (#879)
* feat: T4 and T5 physconstraints dumping

* chore: small style adjustments

---------

Co-authored-by: Jan Laupetin <[email protected]>
2026-07-12 14:17:11 +02:00
Jan LaupetinandGitHub 0874f0c36f feat: font generation from ttf (#882)
* chore: add file variant of json fonts

* chore: add stb dependency

* feat: generate fonts from ttf files

* chore: add option to add yOffset to file font

* chore: dynamically adjust generated font bitmap size

* fix: printable characters should respect ISO-8859-1 control characters

* chore: do not write missing glyphs into the bitmap

* chore: remove test texture conversion

* chore: adjust font compiler for iw3,iw4,iw5,t4,t5

* chore: add possibility to fill color channels when converting

* fix: games other than t6 use rgba for fonts

* fix: make sure no mipmaps are set on loaddef

* fix: t4 and iw3 use dimensions in image loaddef

* chore: also include optional glyphs in fonts
2026-07-08 23:35:58 +02:00
Jan LaupetinandGitHub c385f50a0e feat: add support for t4 materials (#891)
* feat: add support for t4 materials

* fix: t4 material struct
2026-07-08 22:50:22 +02:00
Jan LaupetinandGitHub 013f6ebf70 fix: remove non-existant camera region in IW5 (#889) 2026-07-08 07:33:46 +02:00
bdc4c19466 feat: T6 font_s dumper (#850)
* feat: T6 font dumper

* feat: implement templated loader and writer for fonts in t6

---------

Co-authored-by: Jan Laupetin <[email protected]>
2026-07-03 23:15:55 +02:00
3fb8b2bb17 feat: font loading and dumping (#866)
* feat: font loading and dumping

* chore: make font properties unsigned if possible

* chore: use merge_patch to dump json font

* chore: font material is required

* chore: move static methods from font loader and dumper to anonymous namespace

* chore: make sure loaded fonts have their glyphs sorted

* chore: add macros for json NLOHMANN_TO_JSON_METHOD and NLOHMANN_FROM_JSON_METHOD

* feat: encode printable letters as string in json

Co-authored-by: hindercanrun <[email protected]>

* chore: omit redundant glyph count from jsons

---------

Co-authored-by: Jan Laupetin <[email protected]>
Co-authored-by: hindercanrun <[email protected]>
Co-authored-by: MrIkso <[email protected]>
2026-07-03 19:26:12 +02:00
fb4b00398c feat: T4 weapon loading and dumping (#869)
* feat: T4 weapon loading and dumping

* chore: adjust naming of weapon enum values

* chore: fix typo in type names

* chore: rename t4 weapon loader files

* feat: dump and load gdt weapons for t4

* chore: weapon loaders to use similar logic

---------

Co-authored-by: Jan Laupetin <[email protected]>
2026-07-02 07:10:24 +02:00
ee63355fd2 feat: IW3 weapon loading and dumping (#867)
* feat: IW3 weapon loading and dumping

* chore: adjust weapon strings for iw3

* chore: use original capitalization for aifuseTime

* chore: remove unused alternative iw3 csp fields

* chore: add missing checks and style the code similar to t5

* chore: small code smells in t5 weapon loader

* feat: add iw3 gdt loader

* chore: adjust weapon loader file names to t5 style

* feat: add gdt dumper for iw3 weapons

---------

Co-authored-by: Jan Laupetin <[email protected]>
2026-06-30 22:25:06 +02:00
JanandGitHub 3ab002db1d fix: make info strings case insensitive (#871) 2026-06-30 20:19:18 +02:00
228e40d17f feat: T4 MapEnts dumper (#865)
* feat: T4 MapEnts dumper

* chore: use common map_ents logic for filename

---------

Co-authored-by: Jan Laupetin <[email protected]>
2026-06-29 08:28:45 +02:00
moandGitHub 8c61fa3b62 feat: T4 XModel dumper (#852) 2026-06-25 15:03:07 +02:00
JanandGitHub 087ce0c208 feat: unlinker auto paths (#848)
* chore: extract shared search paths code from modman

* feat: automatically detect search paths for game directories

* chore: adjust log levels for loading and unload search paths

* fix: move iwd to obj common
2026-06-20 20:35:47 +02:00
JanandGitHub b4477ac1a9 refactor: accuracy graph subassets (#847)
* refactor: use subassets to load accuracy graphs for iw4,iw5,t5,t6

* fix: not dumping anim names for t5 weapons and t6 attachment unique

* refactor: dump accuracy graphs like a subasset

* refactor: use shared method for accuracy graph filenames
2026-06-20 17:16:37 +02:00
JanandGitHub b5acacf680 fix: weapon anims indirect assets (#846)
* fix: t6 attachment unique not considering xanims indirect references

* fix: consider t5 weapon anims indirect references to anim assets
2026-06-20 15:15:32 +02:00
JanandGitHub c84e3076f1 feat: t6 flametables (#845)
* feat: add flametable loading and dumping for T6

* chore: add additional validation logic of game for t6 weapon loading
2026-06-20 11:50:43 +00:00
Paging RedGitHubnjohnson <gitea.nicholasjohnson.info>Jan Laupetin
5b11848f4d feat: T5 weapon dumping & loading (#792)
* Update docs.

* Add weapon constants.

* Register asset dumper.

* Add fields and strings for weapon parsing.

* Add gdt and raw weapon loader.

* Add weapon dumper.

* Clang format.

* Update T5 strings.

* Fix forgotten rename.

* Clang format.

* fix: add missing t5 weapon fields

* chore: properly sort,format and check size of t5 weapon enum strings

* chore: remove unused functions

* chore: add t5 weapon checks and defaults

* format enum strings

* chore: make FlameTable struct use pascal case name

* feat: dump and load flametable

* fix: make loaded weapons match vanilla data

---------

Co-authored-by: njohnson <gitea.nicholasjohnson.info>
Co-authored-by: Jan Laupetin <[email protected]>
2026-06-20 13:03:36 +02:00
JanandGitHub 0d0f928267 feat: add binary xanim support for remaining games (#818)
* refactor: use generic loader for iw3 xanims

* refactor: use generic dumper for iw3 xanims

* chore: use templating on XAnimDumper

* chore: use templating on XAnimLoader

* feat: dump xanims for T5

* feat: load binary t5 xanims

* feat: load and dump t6 xanims

* feat: load and dump iw4,iw5 xanims

* chore: make sure iw3 and t5 notify about unsupported delta3D

* chore: also use CommonVec3U8 and CommonVec3U16 for non delta trans track
2026-06-06 14:47:51 +00:00
0c22dddd0e feat: IW3 xanim dumping/loading in CoD4 Mod Tools raw binary format (#768)
* feat: IW3 dump xanim to cod4 mod tools compatible binary

* chore: add XAnimPartType enum to game headers

* chore: use XAnimPartType in XAnimDumperIW3

* chore: extract xanim filename into XAnimCommon

* chore: prefer emplace_back over push_back

* chore: small code style improvements

* chore: use proper unsigned types for XAnimParts structs

* chore: use better understandable calculations for bitfields

* chore: use game names for parts

* chore: rename method to WriteNoteTracks

* chore: adds comments and improve clearity of what the game does

* chore: extract stream writing methods into StreamUtils

* chore: use vec3 for XAnimPartTransFrames mins and size

* chore: properly differ between XQuat and XQuat2 structs

* chore: use constants for xanim flags

* chore: use optional for delta track quats and trans

* chore: split delta track writing methods into quat and trans

* chore: add assertion for bDelta

* chore: simplify quat frame encoding indexing

* chore: simplify float to int bit casting

* chore: do not throw exception on failing to reconstruct bone tracks

* feat: add xanim loader for iw3

* fix: make sure to sort quats and trans like the game

* chore: prevent empty dumped files on bad xanim data

* chore: ensure no exception on zero frames in xanim notifies

* test: add system test for iw3 xanims

---------

Co-authored-by: Jan Laupetin <[email protected]>
2026-06-01 22:52:49 +02:00
Jan Laupetin 71ca182524 feat: properly parse data from xenon ipaks 2026-05-12 23:44:53 +02:00
Jan Laupetin e1bb8ae4d2 chore: enable reading of big endian ipaks 2026-05-11 23:54:25 +02:00
Jan Laupetin 2d2ea30b45 fix: iw5 uses isFrictionInfinity as well 2026-05-03 16:00:30 +02:00
Jan Laupetin 0c1bc747dc chore: update default root bone name to empty string and do not specify if matching default name 2026-05-03 13:51:56 +02:00
Jan Laupetin d6a736eb5d feat: preserve root bone name when dumping xmodels with omitted default armature 2026-05-03 13:09:02 +02:00
Paging RedandGitHub 759a3ccf0e Merge pull request #753 from pagingred/iw5_physpreset_dumper
feat: phys presets dumping and loading for IW3, IW5, T5
2026-05-02 12:01:59 +02:00
JanandGitHub 6b7752376a Merge pull request #780 from Laupetin/fix/iw3-part-classification
fix: incomplete iw3 part classification
2026-05-01 22:37:59 +02:00
Jan Laupetin 4d66911203 fix: incomplete iw3 part classification 2026-05-01 21:52:10 +02:00
Michael OliverandJan Laupetin 98d8ea9005 fix: xmodel glTF dumps dropping COLOR_0 vertex attributes 2026-05-01 21:48:28 +02:00
Paging RedGitHubnjohnson <gitea.nicholasjohnson.info>Jan Laupetin
010ac3ad3e Add IW3 PhysPreset dump logic (#744)
* Copied template from font.

* Create PhysPreset writer from Font dumper template.

* Completely refactor to match previous implementation.

* Remove files from previous implementation.

* Fix PhysPresetFields.

* Add missing fields and correct order.

* Add static infinity check as builtin does not work.

* Wasn't clang formatted.

* Remove unused 'perSurfaceSndAlias' field.

* Removed unsupported vals (tracer & vehicle) and un-needed vals (material).

* Make order match struct and mark 'tempDefaultToCylinder' as QBOOLEAN.

* Make order match struct and clamp vals for 'mass' and 'tempDefaultToCylinder'.

* Remove un-needed includes and add limits for float max.

* Remove clamping of mass.

* Use float max to determine if friction is infinite.

* Clang format.

* chore: formatting

* chore: do not use classes for obj constants

---------

Co-authored-by: njohnson <gitea.nicholasjohnson.info>
Co-authored-by: Jan Laupetin <[email protected]>
2026-04-23 23:27:34 +02:00
Jan Laupetin eee44b5860 chore: use ordered_json for gltf
order is based on what blender does
https://github.com/KhronosGroup/glTF-Blender-IO/blob/7bea3666f8b5043292e578501a779f244d8e8f06/addons/io_scene_gltf2/io/exp/export.py#L48
2026-04-20 20:08:46 +01:00
Jan Laupetin 2ba00acedd chore: make sure iw5 can use its special vertex material samplers 2026-03-19 18:26:57 +01:00
Jan Laupetin a497efe67b feat: compile iw5 techsets 2026-03-18 23:04:41 +01:00
Jan Laupetin 72f285178b feat: add techset dumping for iw5 2026-03-18 23:04:35 +01:00
Jan Laupetin b93925c306 fix: inconsistencies on t5 technique compilation 2026-03-15 15:31:01 +01:00
Jan Laupetin 04870e8fbf chore: use templated code for t5 techset dumping 2026-03-14 23:23:10 +01:00
Jan Laupetin daa891a922 feat: add techset compiling for IW3 2026-03-14 20:54:59 +01:00
Jan Laupetin 5993c88897 feat: dump iw3 technique sets 2026-03-14 20:54:59 +01:00
Jan Laupetin 161ab45306 chore: handle iw4 technique flags 2026-03-14 09:09:57 +01:00
Jan Laupetin bb9dba4132 chore: add CommonCodeSourceInfos for IW4 2026-03-14 09:09:45 +01:00
Jan Laupetin 90d7f92ddd chore: replace all usages of removed ClassUtils macros 2026-03-06 00:13:04 +01:00
Jan Laupetin d469af2328 chore: use namespace for FileUtils 2026-03-05 20:27:47 +01:00
Jan Laupetin 1611c222cc chore: add logic for computing precompiled index on material pass 2026-03-04 22:00:30 +00:00
Jan Laupetin 12199b5395 fix: not properly respecting code const array boundaries when dumping techniques 2026-03-02 22:09:02 +00:00
Jan Laupetin b2f51b2ae1 fix: technique loading tech flags 2026-03-02 22:09:00 +00:00
Jan Laupetin aec1372c5b fix: vertex decl compiler not recognizing abbreviations with more than 1 digit 2026-03-02 22:08:59 +00:00
Jan Laupetin 38abe459e1 fix: errors with common techset dumping
* not respecting transposing matrices
* not respecting arrays
2026-03-02 22:08:58 +00:00