jak-project/common/util
water111 9d80ada016
[jak3] Fix eye slot assignment and textures (#3603)
I found two issues with Jak 3 eyes. The first was simple - we were
missing a `-pc` texture upload in `texture.gc` for `pris2` textures,
which has eye textures for a few characters, like torn or damas.

The second was a little more annoying. Unlike jak 2 and jak 1, jak 3 can
dynamically assign eye slots when merc models are loaded. This involves
modifying eye data to tell the eye renderer where to render, and
modifying the merc model's adgif shaders to point to the correct eye
texture. The modification to the merc adgif shader is problematic since
our PC port of merc assumes this slot is constant.

My solution here was to bypass this whole slot system entirely for jak
3. I modified the GOAL eye renderer to tell the c++ eye renderer the
name of the merc-ctrl containing the eye. Then, the PC C++ Merc renderer
can just look up the merc-ctrl by name. To make this fit nicely in the
existing memory layout, I used a 64-bit fnv hash of the name. (which
honestly is how we should have handled a lot of other texture/model
names stuff...)

Unrelated fix to Overlord2 so it handles the case where file size
changes after the game starts, I had this in jak2/jak1 and forgot it for
jak 3.
2024-07-26 11:42:52 -04:00
..
Assert.cpp Fix cases of string formatting with non string literals (#3304) 2024-01-14 12:02:08 +00:00
Assert.h jak3: fix hud sprite crash + add entity debugger (#3516) 2024-05-13 04:09:25 +01:00
BinaryReader.h Switch to std::span (#3376) 2024-02-18 13:23:19 -05:00
BinaryWriter.h extractor: cleanup, support unicode properly, and add multi-game support (#1609) 2022-07-05 20:38:13 -04:00
BitUtils.cpp update readme and fix always playing str (#1139) 2022-02-08 19:02:47 -05:00
BitUtils.h [decompiler] jak 2 cutscene file support (#2390) 2023-03-22 21:31:13 +00:00
CopyOnWrite.h lint: add include sorting config to clang-format (#1517) 2022-06-22 23:37:46 -04:00
DgoReader.cpp Change important `printf`s to `lg::print` (#3355) 2024-02-01 18:01:41 +00:00
DgoReader.h lint: add include sorting config to clang-format (#1517) 2022-06-22 23:37:46 -04:00
DgoWriter.cpp [jak2] support for multiple out/ directories (#1585) 2022-06-30 21:11:58 -04:00
DgoWriter.h extractor: cleanup, support unicode properly, and add multi-game support (#1609) 2022-07-05 20:38:13 -04:00
FileUtil.cpp REPL related improvements and fixes (#3545) 2024-06-03 00:14:52 -04:00
FileUtil.h REPL related improvements and fixes (#3545) 2024-06-03 00:14:52 -04:00
FilteredValue.h [graphics] TIE extractor (#1026) 2021-12-26 12:33:51 -05:00
FontUtils.cpp New Crowdin updates (#3547) 2024-06-03 01:01:58 -04:00
FontUtils.h g/j2: Fill out `game options` menu (#3003) 2023-09-23 15:08:13 -04:00
FrameLimiter.cpp support c++ tools on macos (#2063) 2022-12-22 17:12:05 -05:00
FrameLimiter.h add more comments/docstrings on first 58 files, try new windows-specific framelimiting (#1134) 2022-02-05 16:30:50 -05:00
Range.h LSP: A bunch of new OpenGOAL language features (#3437) 2024-03-30 19:49:07 -04:00
Serializer.h [tie] support per-proto visibility flags (#2212) 2023-02-11 12:00:05 -05:00
SimpleThreadGroup.cpp lint: add include sorting config to clang-format (#1517) 2022-06-22 23:37:46 -04:00
SimpleThreadGroup.h lint: add include sorting config to clang-format (#1517) 2022-06-22 23:37:46 -04:00
SmallVector.h lint: add include sorting config to clang-format (#1517) 2022-06-22 23:37:46 -04:00
Timer.cpp support c++ tools on macos (#2063) 2022-12-22 17:12:05 -05:00
Timer.h lint: add include sorting config to clang-format (#1517) 2022-06-22 23:37:46 -04:00
Trie.h decomp3: spawn `target`, add merc and particle buckets and some temporary hacks (#3445) 2024-04-05 00:07:39 -04:00
ast_util.cpp LSP: A bunch of new OpenGOAL language features (#3437) 2024-03-30 19:49:07 -04:00
ast_util.h LSP: A bunch of new OpenGOAL language features (#3437) 2024-03-30 19:49:07 -04:00
colors.h [graphics] Ocean Mid (in progress) (#1232) 2022-03-14 19:47:29 -04:00
compress.cpp debugging: Improve event profiler utility (#3561) 2024-06-22 22:01:33 -04:00
compress.h debugging: Improve event profiler utility (#3561) 2024-06-22 22:01:33 -04:00
crc32.cpp [goalc] Cleaned up speedups (#3066) 2023-10-07 10:48:17 -04:00
crc32.h [goalc] speed up jak3 compilation (#3454) 2024-04-06 16:01:17 -04:00
dgo_util.cpp deps: update `fmt` to latest version (#3403) 2024-03-05 22:11:52 -05:00
dgo_util.h 989snd: sound bank loading overhaul (#3185) 2023-12-07 20:22:54 -05:00
dialogs.cpp game: Improve OpenGL version detection and make requirement errors more obvious to the user (#2787) 2023-06-30 21:05:58 -04:00
dialogs.h game: Improve OpenGL version detection and make requirement errors more obvious to the user (#2787) 2023-06-30 21:05:58 -04:00
diff.cpp goalc/repl: cleanup of goalc/REPL code and some QoL improvements (#2104) 2023-01-07 11:24:02 -05:00
diff.h goalc/repl: cleanup of goalc/REPL code and some QoL improvements (#2104) 2023-01-07 11:24:02 -05:00
fnv.h [jak3] Fix eye slot assignment and textures (#3603) 2024-07-26 11:42:52 -04:00
gltf_util.cpp [wip] build actor tool (#3266) 2024-05-18 18:18:25 +02:00
gltf_util.h [wip] build actor tool (#3266) 2024-05-18 18:18:25 +02:00
json_util.cpp g/j2: Integrate highscores with Speedrun.com/JakSpeedruns.com when speedrunner mode is enabled (#3037) 2023-10-11 20:43:55 -04:00
json_util.h [wip] Jak 3 Overlord (#3567) 2024-07-26 09:42:28 -04:00
math_util.h Update documentation and clean up (#129) 2020-11-21 12:52:38 -05:00
os.cpp decompiler: Cleanup duplication in extractor/decompiler and make it easier to enable streamed audio ripping from CLI (#3560) 2024-06-29 01:18:39 -04:00
os.h decompiler: Cleanup duplication in extractor/decompiler and make it easier to enable streamed audio ripping from CLI (#3560) 2024-06-29 01:18:39 -04:00
print_float.cpp deps: update `fmt` to latest version (#3403) 2024-03-05 22:11:52 -05:00
print_float.h [decomp] collectables, fix float bug in a few files (#2082) 2023-01-01 18:05:31 -05:00
read_iso_file.cpp [jak2] Set up extractor (#3042) 2023-10-06 23:09:09 -04:00
read_iso_file.h support c++ tools on macos (#2063) 2022-12-22 17:12:05 -05:00
set_util.h decomp: don't mutate allowed/banned object lists (#2073) 2022-12-30 23:57:01 -05:00
string_util.cpp decomp3: spawn `target`, add merc and particle buckets and some temporary hacks (#3445) 2024-04-05 00:07:39 -04:00
string_util.h formatter: Format `deftype` correctly (#3391) 2024-02-27 20:12:44 -05:00
term_util.cpp tests: make the offline tests aware of the current terminals row count (#2105) 2023-01-07 10:35:12 -05:00
term_util.h log: rotate log files with timestamps and add flag to disable ANSI colors (#2886) 2023-08-08 17:59:37 +01:00
trie_with_duplicates.h Dependency graph work - Part 1 - Preliminary work (#3505) 2024-05-12 12:37:59 -04:00
unicode_util.cpp Fix UTF-8 handling when running the game, env-vars, and setting the project path (#1632) 2022-07-10 19:03:24 -04:00
unicode_util.h utf8: fix locale mis-handling on linux (#1698) 2022-07-23 10:30:23 -04:00