Hi Paul,
It does uses the dirt mesh , it only applies the gold material on it . So no miracles in here .
Aww, right. I saw that in the refreshMesh render request code, indeed. Well, that pretty much explains it.
Endianess not the problem of OS, but of the CPU it runs.
Which platform do you want port to for that instance ?
Well yes, but the CPU (and not the OS) means a certain behaviour regarding the endianess, so it's all the same problem, right?
I'd like to get a solution that:
- is cross-platform
- permits humans to understand the most possible what a mesh does when reading the filename.
Hence, using a bitset is something that must be changed. By reading the current code, here is what I understand:
1. Get the wall type neighbors by reverse order:
- If they are the same, it puts a '1' from bit at place 1 to place 7, every two digits.
2. Check the diagonal neighbors to the right and use place 2 and 4 for them
3. Check the diagonal neighbors to the left and use place 6 and 8 for them.
Then check for the existence of the mesh and rotate (shift) the bits until we find one fitting.
The bitset might be reversed because of endianess/cpu problems as you said.
So, if I understand correctly, you simply have to check every same tile type corners including diagonals
and open a file according to those data?
I don't think we should "rotate" the tiles description. It's simply a mix between another wanted feature, I guess, and it's never happening/working,
since I never see badly turned tiles while in-game.
So, I'd propose the following naming convention, for instance:
<TileType>_NneEesSswWwn.mesh
E.g.: Dirt_NneEesSswWwn.mesh
where:
NESW: means North, East, South, West same wall neighbors type, meaning the straight corresponding are full of the same tile type.
ne/es/sw/wn: means north-east, east-south, south-west, west-north same wall neighbors type, meaning the diagonal tile is full.
The corners order should have to be always the same.
Example 1:
Dirt_NE.mesh would mean it's a dirt tile which north and east tiles are also dirt walls, but every other are either empty or another wall type.
Water_SswWwnN.mesh mean it's water : south, south-west, west, north-west and north neighbors are the same tile type.
Using string characters, this would be understandable for a human and cross-platform (same filename whatever the CPU/endianess).
What do you all think about it?
Ah, btw, it seems I don't have write access to SVN so I won't be able to push the scripts fixes. Can you do that for me?
Regards,