So it was not a real problem for me, but right now I have got a real weird logical issue. I looked through the whole source and debugged a lot of it, but I do not really get, why the map cache is read correctly, although the standard supplied map cache is in a different format.
What am I talking about?
I tried reading the map cache the way the source does and I ran from one problem into another.
The way rAthena source reads the map cache is exactly as documented(since todays bugfix):
uint32 file size
uint16 map count
[map count times]{
char [12] map name
uint16 map width
uint16 map height
uint32 compressed data size
byte [compressed data size] data
}
Well besides the documentation issue, that I will report after this topic is solved, which is again:
If you view the map cache with a Hexeditor you can see almost clearly that the structure of the file cannot fit to this description and not even to the source with which it is read!
I found out that the structure has to be like this:
uint32 file size
uint32 map count
[map count times]{
char [12] map name
uint16 map width
uint16 map height
uint32 compressed data size
byte [compressed data size] data
}
Otherwise you will not be able to read the file correctly, not even the first map("alb_ship"). So how is it possible that the source can read it, even if it is in a wrong format?
Question
Lemongrass
So as you might have noticed, I have posted a problem with the documentation of the map cache format yesterday.
http://rathena.org/board/tracker/issue-6860-map-cachetxt/
So it was not a real problem for me, but right now I have got a real weird logical issue. I looked through the whole source and debugged a lot of it, but I do not really get, why the map cache is read correctly, although the standard supplied map cache is in a different format.
What am I talking about?
I tried reading the map cache the way the source does and I ran from one problem into another.
The way rAthena source reads the map cache is exactly as documented(since todays bugfix):
uint32 file size
uint16 map count
[map count times]{
char [12] map name
uint16 map width
uint16 map height
uint32 compressed data size
byte [compressed data size] data
}
Well besides the documentation issue, that I will report after this topic is solved, which is again:
vs
But anyway. My real problem is as follows:
If you view the map cache with a Hexeditor you can see almost clearly that the structure of the file cannot fit to this description and not even to the source with which it is read!
I found out that the structure has to be like this:
uint32 file size
uint32 map count
[map count times]{
char [12] map name
uint16 map width
uint16 map height
uint32 compressed data size
byte [compressed data size] data
}
Otherwise you will not be able to read the file correctly, not even the first map("alb_ship"). So how is it possible that the source can read it, even if it is in a wrong format?
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.