World Map Applet: Difference between revisions
From RuneWiki
No edit summary |
|||
Line 39: | Line 39: | ||
*overlay.dat | *overlay.dat | ||
*loc.dat | *loc.dat | ||
*mapscene | *mapscene.dat | ||
*mapfunction | *mapfunction.dat | ||
*b12_full | *b12_full.dat | ||
*index.dat | *index.dat | ||
Some of these files are already available in the game cache. | Some of these files are already available in the game cache. | ||
=== Reconstructing worldmap.jag === | |||
b12_full.dat is a font from the title archive. | |||
mapscene.dat and mapfunction.dat are sprites from the media archive. | |||
loc.dat, floorcol.dat, overlay.dat, underlay.dat, size.dat, and labels.dat are created specifically for this applet. |
Revision as of 22:48, 11 September 2021
Resources
src: https://git.runewiki.org/Old_Engine/WorldMap
jar: https://runewiki.org/archive/worldmap/WorldMap-1.0.jar
data: https://runewiki.org/archive/worldmap/3xx-worldmap.jag
Functions
Click and drag the mouse to pan around the map.
Open the Overlay interface to pan around the map quicker.
Open the Key interface to show a list of icons and click on them to highlight all of those icons in the world.
Press "E" to export an image of the full worldmap. In the original source, it was saved as a raw RGB image and the image dimensions was in the file name. If you use my fork it will be exported to PNG for you.
Loading Data
Initially the client will try to read worldmap.dat from the cache directory (e.g. C:\.file_store_32). It will check the SHA signature of the file against Signature.sha saved in the applet code.
If that fails, the client attempts to load the latest worldmap.jag archive. If the applet is running as a frame it will load it locally from the working directory as "worldmap.jag." Otherwise, it will download from an HTTP server (the codebase of the applet or localhost). It will only download up to Signature.len bytes and must be changed if there is a data update.
When downloading remotely the URL it loads is "worldmap" + sha + ".jag"
, where sha is half of the SHA signature represented as bytes, and concatenated:
for (int i = 0; i < 10; i++) {
sha = sha + Signature.sha[k];
}
An example of this URL may look like "http://127.0.0.1/worldmap-76-598983-53362150-12116.jag"
worldmap.jag Files
worldmap.jag is a BZip2 archive like the ones stored in main_file_cache.idx0.
The files it has inside are:
- size.dat
- labels.dat
- floorcol.dat
- underlay.dat
- overlay.dat
- loc.dat
- mapscene.dat
- mapfunction.dat
- b12_full.dat
- index.dat
Some of these files are already available in the game cache.
Reconstructing worldmap.jag
b12_full.dat is a font from the title archive.
mapscene.dat and mapfunction.dat are sprites from the media archive.
loc.dat, floorcol.dat, overlay.dat, underlay.dat, size.dat, and labels.dat are created specifically for this applet.