Actions

World Map Applet: Difference between revisions

From RuneWiki

No edit summary
Line 14: Line 14:
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.
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===
===Loading Data===
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).
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 <code>"worldmap" + sha + ".jag"</code>, where ''sha'' is half of the SHA signature represented as bytes, and concatenated:<syntaxhighlight lang="java">
When downloading remotely the URL it loads is <code>"worldmap" + sha + ".jag"</code>, where ''sha'' is half of the SHA signature represented as bytes, and concatenated:<syntaxhighlight lang="java">
Line 22: Line 24:
</syntaxhighlight>
</syntaxhighlight>


=== worldmap.jag Files ===
===worldmap.jag Files===
worldmap.jag is a BZip2 archive like the ones stored in main_file_cache.idx0.
worldmap.jag is a BZip2 archive like the ones stored in main_file_cache.idx0.


The files it has inside are:
The files it has inside are:


* size.dat
*size.dat
* labels.dat
*labels.dat
* floorcol.dat
*floorcol.dat
* underlay.dat
*underlay.dat
* overlay.dat
*overlay.dat
* loc.dat
*loc.dat
* mapscene
*mapscene
* mapfunction
*mapfunction
* b12_full
*b12_full
* 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.

Revision as of 16:57, 5 September 2021

Applet with all the interfaces expanded
World Map export for revision 374's map

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.

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];
}

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
  • mapfunction
  • b12_full
  • index.dat

Some of these files are already available in the game cache.