Browse Source

working on more exact map markers

master
poikilos 9 years ago
committed by Jacob Gustafson
parent
commit
19bd22e67f
  1. 2
      install-chunkymap-on-ubuntu.sh
  2. 14
      minetestmapper-numpy.py
  3. 2
      web/chunkymap.php

2
install-chunkymap-on-ubuntu.sh

@ -72,7 +72,7 @@ python replace-with-current-user.py # the py file only manipulates the shell sc
chmod +x "$CHUNKYMAP_DEST/chunkymap-generator.sh"
chmod +x "$CHUNKYMAP_DEST/chunkymap-generator.sh"
chmod -x "$CHUNKYMAP_DEST/unused/chunkymap-regen.sh"
chmod -x "$CHUNKYMAP_DEST/unused/chunkymap-regen-players.sh"
chmod -x "$CHUNKYMAP_DEST/unused/chunkymap-cronjob"

14
minetestmapper-numpy.py

@ -38,14 +38,14 @@ except:
BytesIO = cStringIO.StringIO
#
#
# wrapper around PIL 1.1.6 Image.save to preserve PNG metadata
#
# public domain, Nick Galbreath
# http://blog.client9.com/2007/08/28/python-pil-and-png-metadata-take-2.html
#
# public domain, Nick Galbreath
# http://blog.client9.com/2007/08/28/python-pil-and-png-metadata-take-2.html
#
def pngsave(im, file):
# these can be automatically added to Image.info dict
# these can be automatically added to Image.info dict
# they are not user-added metadata
reserved = ('interlace', 'gamma', 'dpi', 'transparency', 'aspect')
@ -1023,9 +1023,9 @@ def draw_image(world,uid_to_color):
# worldlimits are measured in cubes of 16x16x16
pngminx = minx*16
pngmaxx = maxx*16
pngmaxx = maxx*16+16
pngminz = minz*16
pngmaxz = maxz*16
pngmaxz = maxz*16+16
pngregion=[pngminx, pngmaxx, pngminz, pngmaxz]
print("Saving to: "+ args.output)

2
web/chunkymap.php

@ -735,7 +735,7 @@ function echo_chunkymap_canvas($show_player_names_enable, $decachunks_enable, $c
}
function process_view_change() {
//NOTE: this should be exactly the same math as php uses to make sure there are the same #of tiles displayed as were loaded by php
if (current_w>current_h) {
if (ctx.canvas.width>ctx.canvas.height) { //if (current_w>current_h) {
camera_w = (800) * (1.0/zoom);
camera_h = camera_w/current_ratio;
}

Loading…
Cancel
Save