29 Commits
Author SHA1 Message Date
moandJan Laupetin 4da55a351a feat: add T4 menu dumping and loading (#986)
* feat: add T4 menu dumping

* chore: align with latest changes

* feat: add T4 menu loading

Load T4 menulists and menu files through the shared menu parser.

Preserve T4-specific menu and listbox fields and cover loading, dumping, linking, and round-trip behaviour.

* chore: make flag fields unsigned

* chore: rename `expOperationEnum` -> `operationEnum`

* chore: use default enum numeration for T4 operationEnum

* chore: remove unused members of operationEnum

* chore: remove redundant op from operationEnum

* refactor: align T4 expression operand names with IW3

* chore: small adjustment to iw3,t4 types

---------

Co-authored-by: Jan Laupetin <[email protected]>
2026-09-03 23:19:03 +02:00
moandJan Laupetin 51770e7ae5 feat: IW3 menu dumping and loading (#909)
* feat: IW3 menu dumping

* fix: IW3 menu dumper preserve menu ownerdraw flag masks

* fix: IW3 menu dumper preserve numeric script arguments

Emit numeric tokens without quotes so the linker keeps colour arguments separate.

Before: `"0.1" "0.1" "0.12" "0.5"` becomes `"0.10.10.120.5"`
After: `0.1 0.1 0.12 0.5`

This fixes `mouseExit` colour commands failing to clear menu hover borders.

* fix: IW3 menu dumper preserve empty item text

Keep explicit empty text distinct from null text when dumping menu items.

This fixes CD-key values overflowing their input boxes.

* test: cover IW3 menu dumper material case

* test: cover IW3 menu list path precedence

* chore: clang format

* fix: reverse order of union to avoid edge case bug in zcg

* feat: IW3 menu loading

* fix: validate menu expression name table

* chore: explain numeric token quoting in comment

* refactor: simplify menu dump fallback path

* chore: add more dynamic window flags

* refactor: reuse IW3 menu window flag constants

* refactor: use explicit menu item feature lookup

* refactor: represent menu item text as optional

* refactor: clarify shared IW3 and IW4 menu constants

IW4 only extends the type enum so they can be shared

* refactor: clarify IW3 menu zone state naming

* fix: log IW3 menu conversion failures

* refactor: align IW3 menu list loader with IW4

* refactor: align IW3 menu dumpers with IW4

* refactor: align IW3 menu converter with IW4

* chore: use default enum numeration for operationEnum

* chore: small optimization on edit field capability initialization

* fix: iw3 menu optimizations for rect not considering relative position to parent

* chore: align iw3 menu converting closer to iw4

* chore: align iw3 menu dumping closer to iw4

* fix: not dumping menu flags properties correctly

* chore: adjust iw3 expression dumping to work similar to iw4

* chore: adjust iw3 expression converting to work similar to iw4

* chore: use unordered_map for MenuExpressionMatchers

---------

Co-authored-by: Jan Laupetin <[email protected]>
2026-08-31 00:04:01 +02:00
moandJan Laupetin 76e5bb17a2 feat: templated vehicle loading and dumping for IW4 and IW5 (#929)
* feat: templated vehicle loading and dumping for IW4 and IW5

* chore: restructure vehicle tests into separate files

---------

Co-authored-by: Jan Laupetin <[email protected]>
2026-07-26 00:28:44 +02:00
Jan Laupetin 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
moandJan Laupetin 62ee9dab40 feat: T4 LoadedSound dumper (#855)
* feat: T4 LoadedSound dumper

* chore: make t4 loaded sound dumper not parse wav

---------

Co-authored-by: Jan Laupetin <[email protected]>
2026-06-29 18:59:28 +02:00
Jan Laupetin 0c4a2771ef chore: add unit tests for iw3 techsets 2026-03-20 23:51:19 +01:00
Jan Laupetin 7bb9cfcbfa chore: add unit tests for iw4 techsets 2026-03-20 23:03:02 +01:00
Jan Laupetin 3b0416fa99 chore: add unit tests for iw5 techsets 2026-03-20 22:20:20 +01:00
Jan Laupetin 8d0e3f054c chore: add unit tests for t5 techsets 2026-03-20 20:58:14 +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 c0a7114b24 chore: add tests for techset and technique compilation 2026-03-02 22:08:59 +00:00
Jan Laupetin aa47ffa629 refactor: introduce subasset loading 2026-02-05 18:17:15 +01:00
Jan Laupetin 94cc12f4af fix: add platform to test code 2025-10-27 21:01:04 +01:00
Jan Laupetin 6a84d1ea68 chore: generalize IAssetDumper interface 2025-10-15 20:06:01 +01:00
Jan Laupetin c6e9cbedda feat: report on unlinking progress 2025-10-14 23:20:56 +01:00
Jan Laupetin 734173066b refactor: only refer to game id in zone 2025-08-31 18:00:27 +01:00
Jan Laupetin 46fb919a52 refactor: do not nest asset namespaces in game namespaces
* Duplicated namespace names are kind of annoying
2025-08-06 00:50:35 +02:00
Jan Laupetin 0dfa57446c refactor: streamline material dumping 2025-07-29 23:37:41 +01:00
Jan Laupetin dbec702075 refactor: use IAssetDumper interface on implementations directly 2025-07-27 23:13:26 +01:00
Jan Laupetin bca5fd3f1a chore: add tests for font icon json writing and loading 2025-07-23 22:52:26 +01:00
Jan Laupetin 75c7949d3f chore: remove unused t6 material property probeMipBits 2025-07-08 19:12:26 +02:00
Jan Laupetin 790729f5e0 chore: remove unused t5 material property maxStreamedMips 2025-07-08 19:08:46 +02:00
Jan Laupetin 90cc7dacbb chore: use http schema url 2025-07-07 22:49:57 +02:00
Jan Laupetin c53b17a3db feat: add json schema url to dumped materials 2025-07-06 16:52:37 +02:00
Jan Laupetin 238ac293ab chore: add tests for t5 material dumping and loading 2025-07-06 15:56:12 +02:00
Jan 31d7ac26fe chore: remove hashIndex from t6 json material as it is always 0 2025-07-05 13:27:49 +02:00
Jan 65c8cd6198 feat: add json material loading/writing for iw3 2025-07-05 13:27:49 +02:00
Jan 40427cf34f fix: using wrong enum for mipmaps in iw4,iw5 material tests 2025-07-05 13:27:49 +02:00
Jan 9827218f4a chore: add tests for material dumpers 2025-06-29 12:41:54 +01:00