![]() |
|
Sht files? - Printable Version +- LCKB (https://lckb.dev/forum) +-- Forum: ** OLD LCKB DATABASE ** (https://lckb.dev/forum/forumdisplay.php?fid=109) +--- Forum: General Section (https://lckb.dev/forum/forumdisplay.php?fid=216) +---- Forum: General (https://lckb.dev/forum/forumdisplay.php?fid=183) +---- Thread: Sht files? (/showthread.php?tid=2145) Pages:
1
2
|
- Koko - 07-05-2013 Hey, Does anyone know whats the relation between .wtr files (the terrain part i mean) and .[CeNsOrEd] files? Ive been trying to understand that for a while but i cant find anything logic. What ive noticed is that there are 1536*1536*2 bytes in junos .[CeNsOrEd] file, which makes me think theres a short for each height... but wouldnt there be 1537*1537*2 bytes then? Well, idk, need a hand here... Thanks! - fonsy84 - 07-05-2013 [CeNsOrEd] is for elevation map in the gs setting , and wtr is for elevation in the client side , example , u have in map (client ) alevation 90 , u must create [CeNsOrEd] whit elevation 90 , if u use more or less u see the other ppl in the map underground or fly , u understand? - Koko - 07-05-2013 Yep ikr. What i dont understand is how the height works in the [CeNsOrEd]. Coz it doesnt seem to be (just like in the .wtr) the real height. - fonsy84 - 07-05-2013 usually gets the maximum height of the map in the [CeNsOrEd], this is because if you climb a high mountain, you would cease to see that player on the map. - Koko - 07-05-2013 Im not sure you understand my question :p Lets try to explain that way: i wonder how is the height encrypted in a .[CeNsOrEd] file. Is it as in the wtr a height pos for each coord with a math formula, or is it different? - someone - 07-05-2013 This is the height map equation: The heightmap is a matrix[w][h] of floats, and x is an unsigned short(data that reads from [CeNsOrEd] file, unsigned short are 2 bytes) network byte order - Koko - 07-05-2013 and x is an unsigned short(...) network byte order I dont get that part at all :/ Also, why is there only width*height shorts? That means theres no data for the (0,y) line? Edit: and finally, theres no math operation applied to the heights? (while there is in the wtr) - someone - 07-05-2013 The y part is the value (which is x/100) The unsigned short is is 2 bytes long, so it reads 2 bytes every time, and in the file it is stored in the network byte order(ntohs) - Koko - 07-05-2013 Ok i think i got it. Thanks alot! - someone - 07-05-2013 This is the correct one(the one that I posted above will get the map rotated with 90 degrees and inverted): |