diff --git a/.DS_Store b/.DS_Store index 3f1a500..567434d 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/COPY/.DS_Store b/COPY/.DS_Store index 1847ff1..fa86136 100644 Binary files a/COPY/.DS_Store and b/COPY/.DS_Store differ diff --git a/COPY/Minecraft-Overviewer-minecraft113-fixed/.DS_Store b/COPY/Minecraft-Overviewer-minecraft113-fixed/.DS_Store index 196c1a3..e1798ae 100644 Binary files a/COPY/Minecraft-Overviewer-minecraft113-fixed/.DS_Store and b/COPY/Minecraft-Overviewer-minecraft113-fixed/.DS_Store differ diff --git a/COPY/Minecraft-Overviewer-minecraft113-fixed/docs/signs.rst b/COPY/Minecraft-Overviewer-minecraft113-fixed/docs/signs.rst index baaf690..a78d0c0 100755 --- a/COPY/Minecraft-Overviewer-minecraft113-fixed/docs/signs.rst +++ b/COPY/Minecraft-Overviewer-minecraft113-fixed/docs/signs.rst @@ -45,7 +45,7 @@ A more complicated filter function can construct a more customized display text: def chestFilter(poi): if poi['id'] == "Chest": - return "Chest with %d items" % len(poi['Items']) + return "Chest with %d items" % len(poi.get('Items', [])) It is also possible to return a tuple from the filter function to specify a hovertext different from the text displayed in the info window. The first entry of the tuple will @@ -53,7 +53,7 @@ be used as the hover text, the second will be used as the info window content:: def chestFilter(poi): if poi['id'] == "Chest": - return ("Chest", "Chest with %d items" % len(poi['Items'])) + return ("Chest", "Chest with %d items" % len(poi.get('Items', []))) Because of the way the config file is loaded, if you need to import a function or module for use in your filter function, you need to explicitly load it into the global namespace:: diff --git a/COPY/Minecraft-Overviewer-minecraft113-fixed/overviewer_core/.DS_Store b/COPY/Minecraft-Overviewer-minecraft113-fixed/overviewer_core/.DS_Store index 5cecd89..9631d23 100644 Binary files a/COPY/Minecraft-Overviewer-minecraft113-fixed/overviewer_core/.DS_Store and b/COPY/Minecraft-Overviewer-minecraft113-fixed/overviewer_core/.DS_Store differ diff --git a/COPY/Minecraft-Overviewer-minecraft113-fixed/overviewer_core/data/.DS_Store b/COPY/Minecraft-Overviewer-minecraft113-fixed/overviewer_core/data/.DS_Store deleted file mode 100644 index 86a1d0b..0000000 Binary files a/COPY/Minecraft-Overviewer-minecraft113-fixed/overviewer_core/data/.DS_Store and /dev/null differ diff --git a/COPY/Minecraft-Overviewer-minecraft113-fixed/overviewer_core/data/js_src/util.js b/COPY/Minecraft-Overviewer-minecraft113-fixed/overviewer_core/data/js_src/util.js index 7afe306..3aa19bb 100755 --- a/COPY/Minecraft-Overviewer-minecraft113-fixed/overviewer_core/data/js_src/util.js +++ b/COPY/Minecraft-Overviewer-minecraft113-fixed/overviewer_core/data/js_src/util.js @@ -267,6 +267,12 @@ overviewer.util = { [], ovconf.marker_groups, {collapsed: false}).addTo(overviewer.map); } + for (var marker_group in ovconf.marker_groups) { + var mg = ovconf.marker_groups[marker_group]; + if (mg.options.default_checked) { + mg.addTo(overviewer.map); + } + } overviewer.util.updateHash(); }); @@ -334,8 +340,8 @@ overviewer.util = { for (var mkidx = 0; mkidx < markers[obj.path].length; mkidx++) { var marker_group = new L.layerGroup(); var marker_entry = markers[obj.path][mkidx]; - var icon = L.icon({iconUrl: marker_entry.icon, - className: "ov-marker"}); + L.Util.setOptions(marker_group, {default_checked: marker_entry.checked}); + var icon = L.divIcon({html: ``}); console.log("marker group:", marker_entry.displayName, marker_entry.groupName); for (var dbidx = 0; dbidx < markersDB[marker_entry.groupName].raw.length; dbidx++) { @@ -343,8 +349,7 @@ overviewer.util = { var latlng = overviewer.util.fromWorldToLatLng(db.x, db.y, db.z, obj); var m_icon; if (db.icon != undefined) { - m_icon = L.icon({iconUrl: db.icon, - className: "ov-marker"}); + m_icon = L.divIcon({html: ``}); } else { m_icon = icon; } diff --git a/COPY/Minecraft-Overviewer-minecraft113-fixed/overviewer_core/data/web_assets/overviewer.css b/COPY/Minecraft-Overviewer-minecraft113-fixed/overviewer_core/data/web_assets/overviewer.css index 6aefa2d..46cd3f3 100755 --- a/COPY/Minecraft-Overviewer-minecraft113-fixed/overviewer_core/data/web_assets/overviewer.css +++ b/COPY/Minecraft-Overviewer-minecraft113-fixed/overviewer_core/data/web_assets/overviewer.css @@ -56,10 +56,10 @@ body { line-height: 160%; text-align: center; padding: 0px 6px; - + background-image: url('control-bg.png'); background-repeat: repeat-x; - + border: 1px solid #A9BBDF; border-radius: 2px 2px; box-shadow: rgba(0, 0, 0, 0.347656) 2px 2px 3px; @@ -81,11 +81,11 @@ body { .customControl > div.dropDown { font-size: 12px; background-color: white; - + border: 1px solid #A9BBDF; border-radius: 2px 2px; box-shadow: rgba(0, 0, 0, 0.347656) 2px 2px 3px; - + display: none; } @@ -143,7 +143,7 @@ div#searchDropDown { div.searchResultItem { overflow: hidden; - text-overflow: ellipsis; + text-overflow: ellipsis; } div.searchResultItem img { @@ -165,9 +165,22 @@ div.worldcontrol select { font-size: 1.2em; } -.leaflet-control-container .progress.leaflet-control { +.leaflet-container .coordbox, .leaflet-container .progress { + box-shadow: none; + font-size: 11px; background: rgba(255, 255, 255, 0.7); margin: 0; padding: 0 5px; color: #333; } + +.ov-marker { + position:relative; + margin-left:-50%; + margin-top:-50%; +} + +.leaflet-div-icon { + background: 0; + border: 0; +} diff --git a/COPY/Minecraft-Overviewer-minecraft113-fixed/overviewer_core/src/Draw.c b/COPY/Minecraft-Overviewer-minecraft113-fixed/overviewer_core/src/Draw.c index fca0518..c31a299 100755 --- a/COPY/Minecraft-Overviewer-minecraft113-fixed/overviewer_core/src/Draw.c +++ b/COPY/Minecraft-Overviewer-minecraft113-fixed/overviewer_core/src/Draw.c @@ -64,13 +64,6 @@ #define INK8(ink) (*(UINT8*)ink) #define INK32(ink) (*(INT32*)ink) -/* like (a * b + 127) / 255), but much faster on most platforms */ -#define MULDIV255(a, b, tmp)\ - (tmp = (a) * (b) + 128, ((((tmp) >> 8) + (tmp)) >> 8)) - -#define BLEND(mask, in1, in2, tmp1, tmp2)\ - (MULDIV255(in1, 255 - mask, tmp1) + MULDIV255(in2, mask, tmp2)) - /* -------------------------------------------------------------------- */ /* Primitives */ /* -------------------------------------------------------------------- */ @@ -100,14 +93,14 @@ point32(Imaging im, int x, int y, int ink) static inline void point32rgba(Imaging im, int x, int y, int ink) { - unsigned int tmp1, tmp2; + unsigned int tmp1; if (x >= 0 && x < im->xsize && y >= 0 && y < im->ysize) { UINT8* out = (UINT8*) im->image[y]+x*4; UINT8* in = (UINT8*) &ink; - out[0] = BLEND(in[3], out[0], in[0], tmp1, tmp2); - out[1] = BLEND(in[3], out[1], in[1], tmp1, tmp2); - out[2] = BLEND(in[3], out[2], in[2], tmp1, tmp2); + out[0] = BLEND(in[3], out[0], in[0], tmp1); + out[1] = BLEND(in[3], out[1], in[1], tmp1); + out[2] = BLEND(in[3], out[2], in[2], tmp1); } } @@ -159,7 +152,7 @@ static inline void hline32rgba(Imaging im, int x0, int y0, int x1, int ink) { int tmp; - unsigned int tmp1, tmp2; + unsigned int tmp1; if (y0 >= 0 && y0 < im->ysize) { if (x0 > x1) @@ -176,9 +169,9 @@ hline32rgba(Imaging im, int x0, int y0, int x1, int ink) UINT8* out = (UINT8*) im->image[y0]+x0*4; UINT8* in = (UINT8*) &ink; while (x0 <= x1) { - out[0] = BLEND(in[3], out[0], in[0], tmp1, tmp2); - out[1] = BLEND(in[3], out[1], in[1], tmp1, tmp2); - out[2] = BLEND(in[3], out[2], in[2], tmp1, tmp2); + out[0] = BLEND(in[3], out[0], in[0], tmp1); + out[1] = BLEND(in[3], out[1], in[1], tmp1); + out[2] = BLEND(in[3], out[2], in[2], tmp1); x0++; out += 4; } } diff --git a/COPY/Minecraft-Overviewer-minecraft113-fixed/overviewer_core/src/overviewer.h b/COPY/Minecraft-Overviewer-minecraft113-fixed/overviewer_core/src/overviewer.h index 83734a2..c5fd035 100755 --- a/COPY/Minecraft-Overviewer-minecraft113-fixed/overviewer_core/src/overviewer.h +++ b/COPY/Minecraft-Overviewer-minecraft113-fixed/overviewer_core/src/overviewer.h @@ -33,7 +33,7 @@ // increment this value if you've made a change to the c extesion // and want to force users to rebuild -#define OVERVIEWER_EXTENSION_VERSION 54 +#define OVERVIEWER_EXTENSION_VERSION 55 /* Python PIL, and numpy headers */ #include @@ -42,11 +42,6 @@ /* Fix Pillow on mingw-w64 which includes windows.h in Imaging.h */ #undef TRANSPARENT -/* like (a * b + 127) / 255), but much faster on most platforms - from PIL's _imaging.c */ -#define MULDIV255(a, b, tmp) \ - (tmp = (a) * (b) + 128, ((((tmp) >> 8) + (tmp)) >> 8)) - /* macro for getting a value out of various numpy arrays the 3D arrays have interesting, swizzled coordinates because minecraft (anvil) stores blocks in y/z/x order for 3D, z/x order for 2D */