Commit Graph
258 Commits
Author SHA1 Message Date
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
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
moandGitHub b5d50120ad feat: T4 xanim binary dumping and loading (#854) 2026-06-27 14:16:50 +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
040826b1f3 Add dumping support for PS3, Wii U and Xenon server fast files (#826)
Co-authored-by: hindercanrun <[email protected]>
2026-06-16 10:45:03 +02:00
44d6710991 feat: initial T4 support (#807)
* feat: initial T4 support

* chore: adjust t4 symbols a bit for accuracy

* chore: add PackIndex asset to T4

* chore: remove unused AssetXModelPieces

* chore: add default and global asset pools loader for T4

* chore: use separate defines for T4 in ImageDumper

* chore: remove unnecessary namespaces in gfximage_actions

* chore: small things

* chore: fix T4 PhysPreset type

* chore: use proper XQuat2 type for T4 xanims

* chore: fix errors on T4 types

* chore: use iw3 like struct for XModelStreamInfo

* docs: add basic docs for T4

* chore: add basic ObjCompiler setup for T4

* chore: adjust loaded sound definition

* chore: make sure t4 material has the correct alignment

* chore: make sure t4 uses similar names for assets as other games

* fix: asset references should not be reusable

* chore: add content writer for t4

* feat: add t4 localize loader

* chore: reorder game ids to be alphabetically ordered

---------

Co-authored-by: Jan Laupetin <[email protected]>
2026-06-07 14:06:33 +02:00
JanandGitHub ab7d8f5670 fix: various wrong alignment values (#823)
* fix: alignment mistakes on various games

* chore: reduce overhead of zcg definition with members fields

* fix: make sure Material alloc alignment is 4
2026-06-07 01:14:37 +00:00
JanandGitHub 036b27568c fix: t6 must use two separate structs for quat indices (#824)
Otherwise arraysize cannot be adjusted from appropriate parent struct
2026-06-07 00:37:16 +00: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 5cf0ce37c1 feat: calculate model collision tree with leafs 2026-05-24 11:13:55 +02:00
Jan Laupetin 8a791816ed chore: set XSurface deformed property when applicable 2026-05-24 11:13:54 +02:00
Jan Laupetin 2d2ea30b45 fix: iw5 uses isFrictionInfinity as well 2026-05-03 16:00:30 +02:00
Jan Laupetin b7a22973e6 chore: make sure xmodel flags are unsigned 2026-05-03 13:09:03 +02:00
Jan Laupetin 08c128addd feat: accept aliases for asset type names 2026-05-02 18:08:12 +02:00
Jan Laupetin 0cbe0c2891 chore: adjust asset type names for light def 2026-05-02 16:01:11 +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
Jan Laupetin 4d66911203 fix: incomplete iw3 part classification 2026-05-01 21:52:10 +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 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 edcc6774c7 fix: not reusing cbrushedge_t type in iw3,iw4 clipMap 2026-03-14 16:01:30 +01:00
Jan Laupetin 161ab45306 chore: handle iw4 technique flags 2026-03-14 09:09:57 +01:00
Jan Laupetin dbe5cffb2f feat: use templated techset compiler for IW4 2026-03-14 09:09:56 +01:00
Jan Laupetin bb9dba4132 chore: add CommonCodeSourceInfos for IW4 2026-03-14 09:09:45 +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 b2f51b2ae1 fix: technique loading tech flags 2026-03-02 22:09:00 +00:00
Jan Laupetin c0a7114b24 chore: add tests for techset and technique compilation 2026-03-02 22:08:59 +00:00
Jan Laupetin 9a527c16fa feat: add t6 vertexdecl sub asset creator 2026-03-02 22:08:57 +00:00
Jan Laupetin e66030a5df chore: improve game shader types 2026-03-02 22:08:56 +00:00
Jan Laupetin a6d63e9b31 fix: constraint on asset name arrays 2026-03-02 22:08:56 +00:00
Jan Laupetin e749514972 fix: compilation with CommonTechset 2026-03-02 22:08:55 +00:00
Jan Laupetin bf9beb1458 chore: make sure TechsetCompilerT6 sets proper worldVertFormat 2026-03-02 22:08:55 +00:00
Jan Laupetin f7e0cb3c45 chore: call common djb2 implementations in game hashing funcs 2026-02-23 08:15:05 +01:00
Jan Laupetin aa47ffa629 refactor: introduce subasset loading 2026-02-05 18:17:15 +01:00
Jan Laupetin e5784d09ed refactor: retrieve asset names from IGame 2026-02-05 17:36:55 +01:00
Jan Laupetin 00546740e4 fix: filling union members that are not supposed to be written
* This causes some pointers to be partially overwritten when filling in the wrong order as well
2026-01-17 00:45:21 +00:00
Jan Laupetin 0a06a01e67 feat: dump t5 techsets and techniques 2026-01-13 20:24:00 +00:00
Jan Laupetin 4cdccba016 feat: add embedded image loader for every supported game 2026-01-05 09:50:21 +00:00