UPDATE!wmsetusXX.obj contains world map textures. The object textures used for grounds are size of 128x128 pixels. Here's an example:
Here is 1 block which includes the first 4 textures from wmsetusXX.obj. There are 16 polygons and/or 32 triangles in one block. Each polygon has been made to show 4 32x32 texture area which are the small square areas in the image above.
As I described geometry before I wrote UV coordinates also while I hadn't researched it much yet. Turns out I was correct, but here's better struct with explanation after:
struct
{
u8 face indices [6]; // Describes which indices are connected to each other. See first post, there is an example of face indices for blocks used in sea.
u8 U vertex 1;
u8 V vertex 1:
u8 U vertex 2;
u8 V vertex 2;
u8 U vertex 3;
u8 V vertex 3;
u4 Texture page [4-bits]; // This changes the texture page according to value (0-F)
u4 CLUT_ID [4-bits]; // The current palettes CLUT info. This needs to point for the texture you are using (first row 0-3, second row 4-7, and so on...).
u8 Material type; // Defines if the geometry is mountain, forest, sea or so on.... (00 seems to be forest)
u8 Unknown; // I'm not quite sure what this operates, but it seems to change texture pages too. Currently got only the sea textures while changing the value.
u8 Unknown; // Also unknown, however the last 4-bits seems to operate collision somehow
}Triangle
Now for the UV's. Each UV must be set according to triangle's face indices. UV values are from 00 to FF. They are set to indicate a rectangular area where the texture is present in current texture page. For example, if you have 128x128 texture and you want to fill a block with 16 polygon, you have to give each U and V coordinate a value in 2D axis where (0,0) indicates top left corner and (FF,FF) bottom left corner. The textures used in wmsetusXX.obj are 128x128 and it contains 16 32x32 textures so if you want to give a specific texture, you set each face indices UV's to the corresponding area by scaling UV's according to texture location on the page.
Here's an example how I did the image above (and great demonstration of my paint skills
):
Blue dots are face indices. In this example the top left dots values are (U = 0x00, V = 0x00).
Middle dots values are (U = 0x7F, V = 0x7F).
Bottom right dots values are (U = 0xFF, V = 0xFF).
This indicates that the UV area contains the whole area. While there is now 4 polygons used for showing one texture, you can set the area inside 1 polygon also. It's also possible to enlarge it, but it needs more "waypoints" (dots) to determine in between the desired area and making it manually is frustrating.
So, this means that in theory it is possible to use large textures in world, but since the memory space is limited it may be difficult. I'll look on this later.
If you have questions please ask. I'm pretty tired and noticing my own mistakes and the "shortness" of this post makes me think I may have forgotten to explain something so ask if there's something you don't understand or needs a little explanation.