diff --git a/chunkymap-regen.py b/chunkymap-regen.py index 51b5da4..e787a70 100644 --- a/chunkymap-regen.py +++ b/chunkymap-regen.py @@ -390,7 +390,7 @@ class MTChunks: python_exe_path = None chunks = None decachunks = None - total_newly_rendered = None + rendered_this_session_count = None #region values for subprocess arguments: pixelspernode = 1 @@ -436,7 +436,7 @@ class MTChunks: def __init__(self): #formerly checkpaths() in global scope self.min_indent = " " self.decachunks = {} - self.total_newly_rendered = 0 + self.rendered_this_session_count = 0 os_name="linux" if (os.path.sep!="/"): os_name="windows" @@ -828,8 +828,8 @@ class MTChunks: return "decachunk_"+self.get_decachunk_luid_from_decachunk(decachunky_x, decachunky_z)+".jpg" def get_decachunk_luid_from_chunk(self, chunky_x, chunky_z): - decachunky_x = int(math.floor(chunky_x/10)) - decachunky_z = int(math.floor(chunky_z/10)) + decachunky_x = self.get_decachunky_coord_from_chunky_coord(chunky_x) + decachunky_z = self.get_decachunky_coord_from_chunky_coord(chunky_z) return self.get_chunk_luid(decachunky_x, decachunky_z) def get_decachunk_luid_from_decachunk(self, decachunky_x, decachunky_z): @@ -856,24 +856,31 @@ class MTChunks: def get_signal_path(self): return os.path.join(os.path.dirname(os.path.abspath(__file__)), self.get_signal_name()) + def get_decachunky_coord_from_chunky_coord(self, chunky_x): + return int(math.floor(float(chunky_x)/10.0)) + def check_decachunk_containing_chunk(self, chunky_x, chunky_z): chunk16_coord_list = list() - decachunky_x = int(math.floor(chunky_x/10)) - decachunky_z = int(math.floor(chunky_z/10)) + decachunky_x = self.get_decachunky_coord_from_chunky_coord(chunky_x) + decachunky_z = self.get_decachunky_coord_from_chunky_coord(chunky_z) chunk16x_min = decachunky_x*10 chunk16x_max = chunk16x_min + 15 # NOTE: + 15 even if negative since originally, floor was used chunk16z_min = decachunky_z*10 chunk16z_max = chunk16z_min + 15 # NOTE: + 15 even if negative since originally, floor was used + chunky_x_count=chunk16x_max-chunk16x_min+1 + chunky_z_count=chunk16z_max-chunk16z_min+1 is_any_part_queued = False - chunky_z = chunk16x_min + chunky_z = chunk16z_min + preview_strings = list() while chunky_z <= chunk16z_max: + preview_strings.append("") chunky_x = chunk16x_min - while chunky_x <= chunk16x_max: + while chunky_x <= chunk16x_max: coords = (chunky_x, chunky_z) chunk16_coord_list.append( coords ) if self.todo_index=0: + print(self.min_indent+" "+preview_strings[chunky_offset_z]) + chunky_offset_z -= 1 + print("") decachunk_folder_path = self.get_decachunk_folder_path_from_decachunk(decachunky_x, decachunky_z) if not os.path.isdir(decachunk_folder_path): os.makedirs(decachunk_folder_path) @@ -932,24 +958,27 @@ class MTChunks: def get_chunk_folder_path(self, chunky_x, chunky_z): result = None - decachunky_x = int(math.floor(chunky_x/10)) - decachunky_z = int(math.floor(chunky_z/10)) + decachunky_x = self.get_decachunky_coord_from_chunky_coord(chunky_x) + decachunky_z = self.get_decachunky_coord_from_chunky_coord(chunky_z) result = os.path.join( os.path.join(self.data_16px_path, str(decachunky_x)), str(decachunky_z) ) return result def get_decachunk_folder_path_from_chunk(self, chunky_x, chunky_z): result = None if chunky_x is not None and chunky_z is not None: - hectochunky_x = int(math.floor(chunky_x/100)) - hectochunky_x = int(math.floor(chunky_z/100)) - result = os.path.join( os.path.join(self.data_160px_path, str(hectochunky_x)), str(hectochunky_x) ) + decachunk_x = self.get_decachunky_coord_from_chunky_coord(chunky_x) + decachunk_z = self.get_decachunky_coord_from_chunky_coord(chunky_z) + #hectochunky_x = int(math.floor(chunky_x/100)) + #hectochunky_z = int(math.floor(chunky_z/100)) + #result = os.path.join( os.path.join(self.data_160px_path, str(hectochunky_x)), str(hectochunky_x) ) + result = self.get_decachunk_folder_path_from_decachunk(decachunk_x, decachunk_z) return result def get_decachunk_folder_path_from_decachunk(self, decachunky_x, decachunky_z): result = None if decachunky_x is not None and decachunky_z is not None: - hectochunky_x = int(math.floor(decachunky_x/10)) - hectochunky_x = int(math.floor(decachunky_z/10)) + hectochunky_x = int(math.floor(float(decachunky_x)/10.0)) + hectochunky_z = int(math.floor(float(decachunky_z)/10.0)) result = os.path.join( os.path.join(self.data_160px_path, str(hectochunky_x)), str(hectochunky_x) ) return result @@ -985,8 +1014,8 @@ class MTChunks: #if coords is not None: # chunky_x, chunky_z = coords tmp_path = self.get_chunk_genresults_base_path() - decachunky_x = int(math.floor(chunky_x/10)) - decachunky_z = int(math.floor(chunky_z/10)) + decachunky_x = self.get_decachunky_coord_from_chunky_coord(chunky_x) + decachunky_z = self.get_decachunky_coord_from_chunky_coord(chunky_z) tmp_path = os.path.join( os.path.join(tmp_path, str(decachunky_x)), str(decachunky_z) ) return tmp_path @@ -1186,10 +1215,11 @@ class MTChunks: self.create_chunk_folder(chunky_x, chunky_z) os.rename(tmp_png_path, dest_png_path) print(min_indent+"(moved to '"+dest_png_path+"')") - self.total_newly_rendered += 1 + self.rendered_this_session_count += 1 self.prepare_chunk_meta(chunky_x, chunky_z) # DOES load existing yml if exists self.chunks[chunk_luid].is_fresh = True self.chunks[chunk_luid].metadata["is_empty"] = False + print (min_indent+"{rendered_this_session_count:"+str(self.rendered_this_session_count)+"}") except: print (min_indent+"Could not finish moving '"+tmp_png_path+"' to '"+dest_png_path+"'") else: @@ -1515,7 +1545,7 @@ class MTChunks: this_pos = self.todo_positions[self.todo_index] chunky_x, chunky_z = this_pos chunk_luid = self.get_chunk_luid(chunky_x, chunky_z) - prev_total_newly_rendered = self.total_newly_rendered + prev_rendered_this_session_count = self.rendered_this_session_count is_present, reason_string = self.check_chunk(chunky_x, chunky_z) if is_present: @@ -1533,7 +1563,7 @@ class MTChunks: prev_len = len(self.todo_positions) self._check_map_pseudorecursion_branchfrom(chunky_x, chunky_z) #must check_decachunk_containing_chunk AFTER _check_map_pseudorecursion_branchfrom so check_decachunk_containing_chunk can see if there are more to do before rendering superchunk - if self.total_newly_rendered>prev_total_newly_rendered: + if self.rendered_this_session_count>prev_rendered_this_session_count: self.check_decachunk_containing_chunk(chunky_x, chunky_z) if self.verbose_enable: print(min_indent+"["+str(self.todo_index)+"] branching from "+str((chunky_x, chunky_z))+" (added "+str(len(self.todo_positions)-prev_len)+")") diff --git a/web/chunkymap.php b/web/chunkymap.php index 8c0e2db..6323ce1 100644 --- a/web/chunkymap.php +++ b/web/chunkymap.php @@ -250,11 +250,11 @@ function echo_map_heading_text() { // } // else echo "(missing world name)"; // } -function get_chunk_folder_path($x, $z) { +function get_chunk_folder_path_from_chunky_coords($chunky_x, $chunky_z) { global $chunkymapdata_thisworld_path; //NOTE: floor converts -.5 to -1 (and -1.5 to -2) but .5 to 0 - $decachunk_x = intval(floor($x/10)); - $decachunk_z = intval(floor($z/10)); + $decachunk_x = get_decachunky_coord_from_chunky_coord($chunky_x); + $decachunk_z = get_decachunky_coord_from_chunky_coord($chunky_z); //if ($x<0) { $decachunk_x = $x + $x%10; } //else { $decachunk_x = $x - $x%10; } //if ($z<0) { $decachunk_z = $z + $z%10; } @@ -263,17 +263,175 @@ function get_chunk_folder_path($x, $z) { return $result; } -function get_superchunk_folder_path($x, $z) { +function get_decachunk_folder_path_from_location($x, $z) { global $chunkymapdata_thisworld_path; //NOTE: floor converts -.5 to -1 (and -1.5 to -2) but .5 to 0 - $hectochunk_x = intval(floor($x/100)); - $hectochunk_z = intval(floor($z/100)); + $chunky_x = get_chunky_coord_from_location($x); + $chunky_z = get_chunky_coord_from_location($z); + $decachunky_x = get_decachunky_coord_from_chunky_coord($chunky_x); + $decachunky_z = get_decachunky_coord_from_chunky_coord($chunky_z); + $hectochunk_x = get_hectochunky_coord_from_decachunky_coord($decachunky_x); + $hectochunk_z = get_hectochunky_coord_from_decachunky_coord($decachunky_z); $result = $chunkymapdata_thisworld_path.'/160px/'.$hectochunk_x.'/'.$hectochunk_z; return $result; } +function get_decachunk_folder_path_from_decachunk($chunky_x, $chunky_z) { + global $chunkymapdata_thisworld_path; + //NOTE: floor converts -.5 to -1 (and -1.5 to -2) but .5 to 0 + $hectochunk_x = get_hectochunky_coord_from_decachunky_coord($chunky_x); + $hectochunk_z = get_hectochunky_coord_from_decachunky_coord($chunky_z); + $result = $chunkymapdata_thisworld_path.'/160px/'.$hectochunk_x.'/'.$hectochunk_z; + return $result; +} + +function get_chunky_coord_from_location($location_x) { + $chunk_x = intval($location_x/16); + return $chunk_x; +} + +function get_decachunky_coord_from_chunky_coord($chunky_x) { + return intval(floor((float)$chunky_x/10.0)); +} + +function get_hectochunky_coord_from_decachunky_coord($chunky_x) { + return intval(floor((float)$chunky_x/10.0)); +} + +function get_decachunky_coord_from_location($location_x) { + $chunk_x = get_chunky_coord_from_location($location_x); + $decachunk_x = get_decachunky_coord_from_chunky_coord($chunk_x); + return $decachunk_x; +} + +function get_decachunk_image_name_from_decachunk($x, $z) { + return "decachunk_x"."$x"."z"."$z".".jpg"; +} + +function echo_chunkymap_canvas() { + global $chunkymap_view_x; + global $chunkymap_view_z; + global $chunkymap_view_zoom_multiplier; + global $chunkymap_view_zoom_max; + global $chunkymap_view_zoom_min; + global $showplayers; + + check_world(); + global $chunkymapdata_thisworld_path; + global $world_name; + global $chunkymapdata_worlds_path; + + $x_opener="decachunk_x"; + $z_opener="z"; + $dot_and_ext = ".jpg"; + + if ($chunkymap_view_zoom_multiplier<$chunkymap_view_zoom_min) $chunkymap_view_zoom_multiplier = $chunkymap_view_zoom_min; + if ($chunkymap_view_zoom_multiplier>$chunkymap_view_zoom_max) $chunkymap_view_zoom_multiplier = $chunkymap_view_zoom_max; + + $decachunks_per_page = 1.0/$chunkymap_view_zoom_multiplier; + $view_w = (($decachunks_per_page*160.0)); + $view_h = (($decachunks_per_page*160.0)); + $view_left = (($chunkymap_view_x)) - (($view_w/2.0)); + $view_right = $view_left + $view_w; + //z is cartesian still: + $view_top = (($chunkymap_view_z)) + (($view_h/2.0)); + $view_bottom = $view_top - $view_h; + + echo_chunkymap_anchor(); + echo_chunkymap_controls(); + echo "\r\n"; + echo " ".($chunkymap_view_zoom_multiplier*100.0)."%\r\n";//(string)((int)($chunkymap_view_zoom_multiplier*100+.5)); + //"chunkymapdata/images/compass-rose.png" + //"chunkymapdata/images/start.png" + $decachunky_min_x = get_decachunky_coord_from_location($view_left); + $decachunky_min_z = get_decachunky_coord_from_location($view_bottom); + $decachunky_max_x = get_decachunky_coord_from_location($view_right); + $decachunky_max_z = get_decachunky_coord_from_location($view_top); + $decachunky_count_x = $decachunky_max_x-$decachunky_min_x+1; + $decachunky_count_z = $decachunky_max_z-$decachunky_min_z+1; + + //#region local vars + $generated_yml_path = $chunkymapdata_thisworld_path."/generated.yml"; + //#endregion local vars + + $decachunky_z=$decachunky_max_z; + //echo "
"; + //echo "$decachunky_min_x:$decachunky_max_x,$decachunky_min_z:$decachunky_max_z
"; + $td_placeholder_content=""; + $td_placeholder_content_1px=""; + echo ''."\r\n"; + echo ' '."\r\n"; + echo ' '."\r\n"; + echo " '."\r\n"; + echo ' '."\r\n"; + echo ' '."\r\n"; + $cell_perc=intval(round(100.0/$decachunky_count_x)); + echo ' '."\r\n"; + echo " '."\r\n"; + echo ' '."\r\n"; + echo " '."\r\n"; + echo ' '."\r\n"; + echo ' '."\r\n"; + echo ' '."\r\n"; + echo " '."\r\n"; + echo ' '."\r\n"; + echo ' '."\r\n"; + echo '
'."$td_placeholder_content".'".''.''."$td_placeholder_content".'
".''.''."\r\n"; + echo ' '."\r\n"; + while ($decachunky_z>=$decachunky_min_z) { + echo ' '."\r\n"; + $decachunky_x=$decachunky_min_x; + $cell_perc_remaining=100; + while ($decachunky_x<=$decachunky_max_x) { + $decachunk_file_name=get_decachunk_image_name_from_decachunk($decachunky_x, $decachunky_z); + $decachunk_file_path=get_decachunk_folder_path_from_decachunk($decachunky_x, $decachunky_z).'/'.$decachunk_file_name; + $td_content=""; + if (is_file($decachunk_file_path)) { + $td_content=""; + } + $this_cell_perc=$cell_perc; + if ($cell_perc_remaining>=$this_cell_perc) { + echo " '."\r\n"; + //echo ' '."\r\n"; + $cell_perc_remaining-=$this_cell_perc; + } + $decachunky_x+=1; + } + if ($cell_perc_remaining>0) { + $td_content=$td_placeholder_content_1px; + echo " "."\r\n"; + } + echo ' '."\r\n"; + $decachunky_z-=1; + } + echo '
"."$td_content".''."$decachunky_x,$decachunky_z".'$td_content
'."\r\n"; + echo '
".''.'
'."$td_placeholder_content".'".''.''."$td_placeholder_content".'
'."\r\n"; +} + +function check_world() { + global $chunkymapdata_thisworld_path; + global $world_name; + global $chunkymapdata_worlds_path; + if (!isset($world_name)) { + if ($handle = opendir($chunkymapdata_worlds_path)) { + while (false !== ($file_name = readdir($handle))) { + if (substr($file_name, 0, 1) != ".") { + $file_path = $chunkymapdata_worlds_path."/".$file_name; + if (is_dir($file_path)) { + $world_name=$file_name; + break; + } + } + } + closedir($handle); + } + } + if (isset($world_name)) { + $chunkymapdata_thisworld_path = $chunkymapdata_worlds_path."/".$world_name; + } +} //formerly echo_chunkymap_table -function echo_entire_chunkymap_as_chunk_table() { +function echo_chunkymap_as_chunk_table($show_all_enable) { ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); @@ -303,7 +461,7 @@ function echo_entire_chunkymap_as_chunk_table() { if ($chunkymap_view_zoom_multiplier<$chunkymap_view_zoom_min) $chunkymap_view_zoom_multiplier = $chunkymap_view_zoom_min; if ($chunkymap_view_zoom_multiplier>$chunkymap_view_zoom_max) $chunkymap_view_zoom_multiplier = $chunkymap_view_zoom_max; //$zoom_divisor = (int)(100/$chunkymap_view_zoom_multiplier); - $chunk_assoc = array(); // used for determining which chunks are on the edge, since not all generated map tiles are the same size (edge tile images are smaller and corner ones are smaller yet) + $chunk_assoc = array(); // used for storing players; and used for determining which chunks are on the edge, since not all generated map tiles are the same size (edge tile images are smaller and corner ones are smaller yet) $chunk_count = 0; $x_opener="chunk_x"; $z_opener="z"; @@ -312,29 +470,30 @@ function echo_entire_chunkymap_as_chunk_table() { $chunkz_min = 0; $chunkx_max = 0; $chunkz_max = 0; + $chunks_per_page = (1.0/$chunkymap_view_zoom_multiplier)*10; + + $view_w = (($chunks_per_page*16.0)); + $view_h = (($chunks_per_page*16.0)); + $view_left = (($chunkymap_view_x)) - (($view_w/2.0)); + $view_right = $view_left + $view_w; + //z is cartesian still: + $view_top = (($chunkymap_view_z)) + (($view_h/2.0)); + $view_bottom = $view_top - $view_h; + + if (!$show_all_enable) { + $chunkx_min=intval($view_left/$chunkymap_tile_original_w); + $chunkx_max=intval($view_right/$chunkymap_tile_original_w); + $chunkz_min=intval($view_bottom/$chunkymap_tile_original_w); + $chunkz_max=intval($view_top/$chunkymap_tile_original_w); + } global $showplayers; $players = array(); $player_count = 0; $character_icon_w=8; $character_icon_h=8; global $chunkymapdata_thisworld_path; - if (!isset($world_name)) { - if ($handle = opendir($chunkymapdata_worlds_path)) { - while (false !== ($file_name = readdir($handle))) { - if (substr($file_name, 0, 1) != ".") { - $file_path = $chunkymapdata_worlds_path."/".$file_name; - if (is_dir($file_path)) { - $world_name=$file_name; - break; - } - } - } - closedir($handle); - } - - } + check_world(); if (isset($world_name)) { - $chunkymapdata_thisworld_path = $chunkymapdata_worlds_path."/".$world_name; $generated_yml_path = $chunkymapdata_thisworld_path."/generated.yml"; if (is_file($generated_yml_path)) { $map_dict = get_dict_from_conf($generated_yml_path,":"); @@ -508,17 +667,19 @@ function echo_entire_chunkymap_as_chunk_table() { } $chunk_assoc[$chunk_luid]["is_rendered"] = true; if ($is_verbose) echo "$chunk_luid,"; - if ($x<$chunkx_min) { - $chunkx_min=(int)$x; - } - if ($x>$chunkx_max) { - $chunkx_max=(int)$x; - } - if ($z<$chunkz_min) { - $chunkz_min=(int)$z; - } - if ($z>$chunkz_max) { - $chunkz_max=(int)$z; + if ($show_all_enable) { + if ($x<$chunkx_min) { + $chunkx_min=(int)$x; + } + if ($x>$chunkx_max) { + $chunkx_max=(int)$x; + } + if ($z<$chunkz_min) { + $chunkz_min=(int)$z; + } + if ($z>$chunkz_max) { + $chunkz_max=(int)$z; + } } } else { @@ -568,7 +729,7 @@ function echo_entire_chunkymap_as_chunk_table() { $chunk_yaml_name = $x_opener.$x.$z_opener.$z.$dot_yaml; //$chunk_yaml_path = $chunkymapdata_thisworld_path.'/'.$chunk_yaml_name; //$chunk_yaml_path = $chunks_16px_path.'/'. - $chunk_yaml_path = get_chunk_folder_path($x, $z).'/'.$chunk_yaml_name; + $chunk_yaml_path = get_chunk_folder_path_from_chunky_coords($x, $z).'/'.$chunk_yaml_name; //$chunk_genresult_name = $x_opener.$x.$z_opener.$z.$genresult_suffix_then_dot_then_ext; //$chunk_genresult_path = $chunkymapdata_thisworld_path.'/'.$chunk_img_name; $td_style_suffix=""; @@ -664,7 +825,7 @@ function echo_entire_chunkymap_as_chunk_table() { echo_hold("
"); //causes child's absolute position to be relative to this div's location, as per http://www.w3schools.com/css/tryit.asp?filename=trycss_position_absolute $chunk_luid = "x".$x."z".$z; $chunk_img_name = $x_opener.$x.$z_opener.$z."$dot_and_ext"; - $chunk_img_path = get_chunk_folder_path($x, $z).'/'.$chunk_img_name; + $chunk_img_path = get_chunk_folder_path_from_chunky_coords($x, $z).'/'.$chunk_img_name; if (is_file($chunk_img_path)) { echo_hold( ""); } @@ -761,7 +922,7 @@ function echo_entire_chunkymap_as_chunk_table() { $img_style.="opacity: 0.4; filter: alpha(opacity=40);"; //filter is for IE8 and below $text_style="color:white; opacity: 0.4; filter: alpha(opacity=40);"; //filter is for IE8 and below } - echo_hold( "
$text
" ); + echo_hold( "
$text
" ); } //$position_offset_x+=$character_icon_w; } diff --git a/web/chunkymapdata_default/images/arrow-wide-down.png b/web/chunkymapdata_default/images/arrow-wide-down.png index 403ee41..cd9acfe 100644 Binary files a/web/chunkymapdata_default/images/arrow-wide-down.png and b/web/chunkymapdata_default/images/arrow-wide-down.png differ diff --git a/web/chunkymapdata_default/images/arrow-wide-left.png b/web/chunkymapdata_default/images/arrow-wide-left.png index f2cf2b1..f71272c 100644 Binary files a/web/chunkymapdata_default/images/arrow-wide-left.png and b/web/chunkymapdata_default/images/arrow-wide-left.png differ diff --git a/web/chunkymapdata_default/images/arrow-wide-right.png b/web/chunkymapdata_default/images/arrow-wide-right.png index 5fb2850..3ed484b 100644 Binary files a/web/chunkymapdata_default/images/arrow-wide-right.png and b/web/chunkymapdata_default/images/arrow-wide-right.png differ diff --git a/web/chunkymapdata_default/images/arrow-wide-up.png b/web/chunkymapdata_default/images/arrow-wide-up.png index b80fa1f..71d1766 100644 Binary files a/web/chunkymapdata_default/images/arrow-wide-up.png and b/web/chunkymapdata_default/images/arrow-wide-up.png differ diff --git a/web/chunkymapdata_default/images/chunk-blank-fancy.jpg b/web/chunkymapdata_default/images/chunk-blank-fancy.jpg new file mode 100644 index 0000000..ed54ead Binary files /dev/null and b/web/chunkymapdata_default/images/chunk-blank-fancy.jpg differ diff --git a/web/chunkymapdata_default/images/chunk-blank.jpg b/web/chunkymapdata_default/images/chunk-blank.jpg new file mode 100644 index 0000000..dad38fe Binary files /dev/null and b/web/chunkymapdata_default/images/chunk-blank.jpg differ diff --git a/web/chunkymapdata_default/images/decachunk-blank-fancy.jpg b/web/chunkymapdata_default/images/decachunk-blank-fancy.jpg new file mode 100644 index 0000000..6adba69 Binary files /dev/null and b/web/chunkymapdata_default/images/decachunk-blank-fancy.jpg differ diff --git a/web/chunkymapdata_default/images/decachunk-blank.jpg b/web/chunkymapdata_default/images/decachunk-blank.jpg new file mode 100644 index 0000000..0cffdb6 Binary files /dev/null and b/web/chunkymapdata_default/images/decachunk-blank.jpg differ diff --git a/web/example.php b/web/example.php index 9347628..93189bc 100644 --- a/web/example.php +++ b/web/example.php @@ -12,7 +12,7 @@ error_reporting(E_ALL); if (is_file('chunkymap.php')) { //echo "including..."; include_once('chunkymap.php'); - //echo "about to call echo_entire_chunkymap_as_chunk_table..."; + //echo "about to call echo_chunkymap_as_chunk_table..."; //The following is not needed, since chunkymap.php should be included above and puts all $_REQUEST array variables into $GLOBALS array //if (!isset($_REQUEST['chunkymap_view_x'])) {//if (!isset($chunkymap_view_x)) { @@ -26,9 +26,10 @@ if (is_file('chunkymap.php')) { echo ""; set_chunkymap_view($chunkymap_view_x,$chunkymap_view_z,$chunkymap_view_zoom_multiplier); echo "
"; - echo_entire_chunkymap_as_chunk_table(); + echo_chunkymap_as_chunk_table(false); + echo_chunkymap_canvas(); echo "
"; - //echo "returned from echo_entire_chunkymap_as_chunk_table."; + //echo "returned from echo_chunkymap_as_chunk_table."; } else { echo "missing chunkymap.php"; diff --git a/web/update wamp www.bat b/web/update wamp www.bat new file mode 100644 index 0000000..368f121 --- /dev/null +++ b/web/update wamp www.bat @@ -0,0 +1,12 @@ + +SET SRC_MT_WEB_PATH=%USERPROFILE%\Documents\GitHub\minetest-chunkymap\web +SET DEST_MT_WEBSITE_PATH=C:\wamp\www +copy /y "%SRC_MT_WEB_PATH%\browser.php" "%DEST_MT_WEBSITE_PATH%\" +copy /y "%SRC_MT_WEB_PATH%\chunkymap.php" "%DEST_MT_WEBSITE_PATH%\" +copy /y "%SRC_MT_WEB_PATH%\example.php" "%DEST_MT_WEBSITE_PATH%\" + +SET DEST_MT_WEBSITE_CHUNKYMAP_IMAGES_PATH=%DEST_MT_WEBSITE_PATH%\chunkymapdata\images +copy /y "%SRC_MT_WEB_PATH%\chunkymapdata_default\images\*" "%DEST_MT_WEBSITE_CHUNKYMAP_IMAGES_PATH%" + + +if NOT ["%errorlevel%"]==["0"] pause \ No newline at end of file