jak-project/decompiler/level_extractor
Luminar Light 0ae0938965
Only remove -vis from name if it is part of the name. (#3257)
During level extraction, the last 4 characters of the level name are
always removed, because it is assumed that '-vis' is there. But it isn't
always there. This is especially true in post-TPL games.

This causes multiple problems:
- There can be levels in the extraction that will miss their last 4
characters from their name, which is sad, and may make it harder to
identify them.
- If there are '-vis'-less levels whose names are identical apart from
the last 4 characters, the extractor will only get the last one (it
probably extracts all but overwrites everything but the last one). For
example 'ctyasha' and 'ctykora'.

This issue affects the glb extraction and the entities json extraction.

I personally think that just keeping the -vis in the name would be the
best solution, but I guess there was a reason why it was decided that it
should be removed from the name. So to adapt to this, my implementation
will still remove '-vis' from the name, but only if it is actually in
the name - otherwise it won't remove anything.

I hope my changes didn't break anything. Extraction seemed to run fine
after my changes, and I was able to see both ctyasha and ctykora json
files. And didn't see any '-vis', so it is still properly removed.

---------

Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
2024-02-24 14:13:48 -05:00
..
BspHeader.cpp decompiler: allow jak 3 texture and model extraction (#3080) 2023-10-11 19:32:12 -04:00
BspHeader.h [jak 2] Export the collision mesh (#2977) 2023-09-10 17:32:18 -04:00
common_formats.h [glb export] Export bones. (#3087) 2023-10-14 16:49:23 -04:00
extract_actors.cpp Save entities to JSON, and make custom level building a little faster (#2973) 2023-09-09 17:06:39 -04:00
extract_actors.h Save entities to JSON, and make custom level building a little faster (#2973) 2023-09-09 17:06:39 -04:00
extract_collide_frags.cpp Rip collision based on config flag (#3348) 2024-01-29 22:15:42 +01:00
extract_collide_frags.h Rip collision based on config flag (#3348) 2024-01-29 22:15:42 +01:00
extract_common.cpp lint: add include sorting config to clang-format (#1517) 2022-06-22 23:37:46 -04:00
extract_common.h lint: add include sorting config to clang-format (#1517) 2022-06-22 23:37:46 -04:00
extract_joint_group.cpp [glb export] Export bones. (#3087) 2023-10-14 16:49:23 -04:00
extract_joint_group.h [glb export] Export bones. (#3087) 2023-10-14 16:49:23 -04:00
extract_level.cpp Only remove -vis from name if it is part of the name. (#3257) 2024-02-24 14:13:48 -05:00
extract_level.h Rip collision based on config flag (#3348) 2024-01-29 22:15:42 +01:00
extract_merc.cpp [glb export] Export bones. (#3087) 2023-10-14 16:49:23 -04:00
extract_merc.h [merc2] Support emerc (#2147) 2023-01-22 18:30:31 -05:00
extract_shrub.cpp [jak2] Support per-proto shrub visibility (#3228) 2023-12-02 12:16:14 -05:00
extract_shrub.h [jak2] misc fixes to renderers (#2488) 2023-04-14 21:13:45 -04:00
extract_tfrag.cpp Update to C++20 (#3193) 2024-02-17 14:14:23 -05:00
extract_tfrag.h [jak2] fix atest flag in tfrag (#2381) 2023-03-21 20:40:29 -04:00
extract_tie.cpp decompiler: allow jak 3 texture and model extraction (#3080) 2023-10-11 19:32:12 -04:00
extract_tie.h [decomp] Decompile some time-of-day stuff, support new style Jak 2 time of day (#1943) 2022-10-08 13:33:03 -04:00
fr3_to_gltf.cpp [glb export] Export bones. (#3087) 2023-10-14 16:49:23 -04:00
fr3_to_gltf.h [glb export] Export bones. (#3087) 2023-10-14 16:49:23 -04:00
MercData.cpp [jak2] Floating point blerc (#2715) 2023-06-11 12:35:08 -04:00
MercData.h [jak2] Floating point blerc (#2715) 2023-06-11 12:35:08 -04:00
notes.txt [graphics] tfrag3 renderer (#978) 2021-12-04 12:33:18 -05:00
tfrag_tie_fixup.cpp cleanup our cmake and build warnings (#2876) 2023-08-08 20:53:16 -04:00
tfrag_tie_fixup.h Add a gltf level exporter (#1719) 2022-08-05 12:25:35 -04:00