Closed MaKiPL closed 5 years ago
texSwitch-> (bitarray) (O)(W)(R)(H)(E)(X)(DD)
DD-shadow X-unk E-isEnterable - how does the game know which place? H-hidden? R-road W-water O-other unknown tex
unk2->flags
flags-> (W)0000000 W- is walkable? other 7- unknown
implemented
I began researching the remaining unknown two bytes at polygons per block in world map. I grouped all data from 768 segments and it's all blocks into distinct table to understand possible entries for the values:
https://1drv.ms/x/s!AnuxqNb0u63hg2mlzVvVfKQHJ56d
The key is the first unknown byte and looks like is used to be used to distinguish between textures. For example 0x40 means water, but the 'water' should also be tweaked because there are many water textures. Another example is 0x08 which marks all available enterable places therefore it might be actually a bitflag. Tests and values editing incoming.
*Note about roads: I didn't test it yet, but it might be related to TIM orig.x and y for roads. Therefore casual UV > tex.width/tex.height happens here and finally making the texture to not appear at all. Solution might be checking the origXY and substracting the values to get real UV