Elden Grove garbage
Closed this issue · 2 comments
In the Elden Grove (accessible from the main menu by selecting 40852494.MIF and pressing 'F'), there are some garbage voxels at the bottom of the map. If they are rendered by the camera, it causes an out-of-bounds texture access and the game crashes. I'm not sure why there is garbage since this is the only main quest dungeon that has it, and its dimensions are correct (100x100), so perhaps there is some exception in the .MIF file's FLOR
or MAP1
data that the program isn't checking for.
The garbage is there in the game too. Perhaps you should init all 64 texture slots to some valid default?
Debug tip: You can find the uncompressed level map at 0x10AE7
in SAVEGAME.0?
, in the following order MAP1, FLOR, MAP2
. It has a fixed 128x128 size.
That's a good idea. I tried to get to the bottom of the map in Arena but you can't use Passwall on hedges, so looking at the uncompressed save data seems like a better option.
One of the garbage voxels is a diagonal wall with texture ID 196. Perhaps Arena does a modulo to keep the texture indices between 0 and 63?
Edit: Adding a modulo to the voxel IDs seems to fix the problem. All of the textures indices lie within the proper range then.