Fast-64 / fast64

Blender based editor for scenes, meshes, and more in first-party N64 games
GNU General Public License v3.0
316 stars 74 forks source link

[OoT] Link import fails to import eye and mouth textures as flipbook #404

Closed Dragorn421 closed 3 months ago

Dragorn421 commented 3 months ago

So the eye/mouth textures are missing and Link has a rgb(0,0,0) face

After investigating this is because https://github.com/zeldaret/oot/pull/1928 changed e.g. void* sEyeTextures[][8] to void* sEyeTextures[][PLAYER_EYES_MAX] (8 -> PLAYER_EYES_MAX). But the regex in fast64 for finding these arrays (here https://github.com/Fast-64/fast64/blob/2b44b24d40fd93299ba9697fb5a20b508b7aac47/fast64_internal/oot/oot_texture_array.py#L147 ) assumes a decimal or hexadecimal length, so it "didn't see" those arrays anymore

changing the regex to also allow basically a C identifier like [0-9a-zA-Z_] fixes this full fixed regex void\s*\*\s*([0-9a-zA-Z\_]*)\s*\[\s*\]\s*\[[0-9a-zA-Z_]*\]\s*=\s*\{(.*?)\}\s*; https://regex101.com/r/y5timv/1

linkW ![image](https://github.com/user-attachments/assets/6cf9e381-85f3-4841-904c-aa6cebb57c48)