summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Davison <snapwilliam@gmail.com>2013-01-26 02:23:17 -0800
committerPatrick Davison <snapwilliam@gmail.com>2013-01-26 02:23:17 -0800
commit3534d26ca916c9d493889c392010e5026326f548 (patch)
tree233051b2a8dae828537d46e9d92f7d4b6373172d
parentae3bbe1c82ab5cca5bf9f26843efe8d3fd52185c (diff)
downloadpathery-3534d26ca916c9d493889c392010e5026326f548.tar.xz
Improved DisplayMapThumbnail
-rw-r--r--includes/mapclass.php2
-rw-r--r--includes/maps.php31
2 files changed, 3 insertions, 30 deletions
diff --git a/includes/mapclass.php b/includes/mapclass.php
index fa4d865..53609a7 100644
--- a/includes/mapclass.php
+++ b/includes/mapclass.php
@@ -91,6 +91,8 @@ class map {
case 'r': $value = ''; $type = TileRock; break;
case 'R': $value = 2; $type = TileRock; break;
case 'q': $value = 3; $type = TileRock; break;
+ case 'x': $value = ''; $type = TileSinglePath; break;
+ case 'X': $value = 2; $type = TileSinglePath; break;
//Probably a more intelligent way to do this; but it works:
case 'a': $value = ''; $type = TileCheckpoint; break;
case 'b': $value = 2; $type = TileCheckpoint; break;
diff --git a/includes/maps.php b/includes/maps.php
index d41505a..e5b6fdc 100644
--- a/includes/maps.php
+++ b/includes/maps.php
@@ -300,36 +300,7 @@ function DisplayMapThumbnail($map, $link = false) {
for ($x = 0; $x < $map->width; $x++) { //Number of Columns
$value = $map->tiles[$y][$x][TileValue];
$type = $map->tiles[$y][$x][TileType];
- switch($type) {
- case TileEmpty:
- $r .= "<td class='o'></td>";
- //$r .= "<td class='grid_td'></td>";
- break;
- case TileCheckpoint:
- $r .= "<td class='$type$value'></td>";
- //$r .= "<td class='c'></td>";
- break;
- case TileRock:
- $r .= "<td class='grid_td_rocks'></td>";
- //$r .= "<td style='background-color:#c33; width:4px; height:4px;'></td>";
- break;
- case TileStart:
- $r .= "<td class='grid_td_start'></td>";
- //$r .= "<td style='background-color:#2c2; width:4px; height:4px;'></td>";
- break;
- case TileFinish:
- $r .= "<td class='grid_td_finish'></td>";
- //$r .= "<td style='background-color:#666; width:4px; height:4px;'></td>";
- break;
- case TileTeleportIn:
- $r .= "<td class='$type$value'></td>";
- //$r .= "<td style='background-color:#666; width:4px; height:4px;'></td>";
- break;
- case TileTeleportOut:
- $r .= "<td class='$type$value'></td>";
- //$r .= "<td style='background-color:#666; width:4px; height:4px;'></td>";
- break;
- }
+ $r .= "<td class='$type$value'></td>";
}
$r .= "</tr>";
}