summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--images/btns/email.pngbin0 -> 1340 bytes
-rw-r--r--images/btns/facebook.pngbin0 -> 2198 bytes
-rw-r--r--images/btns/googleplus.pngbin0 -> 1788 bytes
-rw-r--r--images/btns/twitter.pngbin0 -> 2264 bytes
-rw-r--r--includes/mapclass.php154
-rw-r--r--updating.php64
6 files changed, 218 insertions, 0 deletions
diff --git a/images/btns/email.png b/images/btns/email.png
new file mode 100644
index 0000000..cf874c7
--- /dev/null
+++ b/images/btns/email.png
Binary files differ
diff --git a/images/btns/facebook.png b/images/btns/facebook.png
new file mode 100644
index 0000000..0009f04
--- /dev/null
+++ b/images/btns/facebook.png
Binary files differ
diff --git a/images/btns/googleplus.png b/images/btns/googleplus.png
new file mode 100644
index 0000000..62aa4b9
--- /dev/null
+++ b/images/btns/googleplus.png
Binary files differ
diff --git a/images/btns/twitter.png b/images/btns/twitter.png
new file mode 100644
index 0000000..edec9ee
--- /dev/null
+++ b/images/btns/twitter.png
Binary files differ
diff --git a/includes/mapclass.php b/includes/mapclass.php
new file mode 100644
index 0000000..ddf08cd
--- /dev/null
+++ b/includes/mapclass.php
@@ -0,0 +1,154 @@
+<?
+// MAP CLASS OBJECT
+// Snap - 12/14/2012
+
+//Remember, $this->value NOT $this->$value;
+
+//Our psuedo enums.
+define("TileType", 0);
+define("TileValue", 1);
+
+define("TileEmpty", 'o');
+define("TileStart", 's');
+define("TileFinish", 'f');
+define("TileCheckpoint", 'c');
+define("TileRock", 'r');
+define("TileTeleportIn", 't');
+define("TileTeleportOut", 'u');
+define("TileUnbuildable", 'q');
+define("TileSinglePath", 'x');
+
+class map {
+ public $name;
+ public $tiles;
+
+ public $teleports;
+ public $checkpoints;
+ public $height;
+ public $width;
+ public $isBlind;
+ public $isMultiPath;
+
+ public $code;
+
+ public function __construct($code = NULL) {
+ if ($code !== NULL)
+ $this->applyMapFromOldCode($code);
+ //echo "Construct complete";
+ }
+
+ public function applyMapFromOldCode($code) {
+ //echo "decoding mapcode: [$code]";
+ unset($this->tiles);
+
+ $tmp = explode( ":", $code);
+ $headers = explode( '.', $tmp[0]);
+ $splitCode = explode( '.', $tmp[1]);
+
+ $dimensions = explode( 'x', $headers[0]);
+ $this->width = $dimensions[0];
+ $this->height = $dimensions[1];
+ $this->name = $headers[5]; //Map Name
+
+ //Make assumptions:
+ $this->isMultiPath = false;
+ $this->isBlind = false;
+ $this->teleports = 0;
+ $this->checkpoints = 0;
+
+ $t = -1;
+ $index = 0;
+ for ($y = 0; $y < $this->height; $y++) { //Number of Rows
+ for ($x = 0; $x < $this->width; $x++) { //Number of Columns
+ $t++;
+ $next = substr($splitCode[$index], 0, strlen($splitCode[$index]) - 1);
+
+ //Are we at the next target, if there is one.
+ if ($next == $t AND $next != '') {
+
+ //Update tile.
+ $type = substr($splitCode[$index], -1, 1);
+
+ $value = '';
+ // Count checkpoints and etc.
+ switch ($type) {
+ case 'S':
+ $this->isMultiPath = true;
+ $value = 1;
+ $type = 's';
+ break;
+ case 'R':
+ $value = 1;
+ $type = 'r';
+ break;
+ case 'q':
+ $value = 2;
+ $type = 'r';
+ break;
+ //Probably a more intelligent way to do this; but it works:
+ case 'a': $value = ''; $type = 'c'; break;
+ case 'b': $value = 2; $type = 'c'; break;
+ case 'c': $value = 3; $type = 'c'; break;
+ case 'd': $value = 4; $type = 'c'; break;
+ case 'e': $value = 5; $type = 'c'; break;
+
+ case 't': $value = ''; $type = 't'; break;
+ case 'm': $value = 2; $type = 't'; break;
+ case 'g': $value = 3; $type = 't'; break;
+ case 'i': $value = 4; $type = 't'; break;
+ case 'k': $value = 5; $type = 't'; break;
+
+ case 'u': $value = ''; $type = 'u'; break;
+ case 'n': $value = 2; $type = 'u'; break;
+ case 'h': $value = 3; $type = 'u'; break;
+ case 'j': $value = 4; $type = 'u'; break;
+ case 'l': $value = 5; $type = 'u'; break;
+ }
+
+ $this->tiles[$y][$x][TileType] = $type;
+ $this->tiles[$y][$x][TileValue] = $value;
+ $index++;
+ //Start from 0 again.
+ $t = -1;
+
+ } else {
+ $this->tiles[$y][$x][TileType] = 'o'; //Empty Tile
+ }
+ }
+ }
+ }
+
+ //Creates the map based on a new code.
+ public function applyMapFromNewCode($code) {
+ $this->code = $code;
+ }
+
+ //Outputs the new code.
+ public function getCode() {
+ //If we already have the code on hand...
+ if ($this->code)
+ return $this->code;
+ //Otherwise we need to build the code:
+ }
+
+ //Other "Magical" functions.
+ public function __toString() {
+ return $this->name;
+ }
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+?>
diff --git a/updating.php b/updating.php
new file mode 100644
index 0000000..55f133f
--- /dev/null
+++ b/updating.php
@@ -0,0 +1,64 @@
+<html>
+
+<head>
+<title>Pathery.com - Updating</title>
+
+<style>
+body {
+background-color: #121212;
+color:#ddd
+}
+
+.update {
+ background-color: #222229;
+ margin:0 auto;
+ margin-top: 200px;
+ width:400px;
+ border: 0px outset #aaa;
+ padding: 10px;
+ border-radius: 25px;
+}
+h3 {
+ text-align: center;
+}
+
+.buttons a {
+ margin: 10px;
+ opacity: 0.7;
+ filter: alpha(opacity=70);
+}
+.buttons a:hover {
+ opacity: 1;
+ filter: alpha(opacity=100);
+}
+
+a {
+ text-decoration: underline;
+ color: #aaaa99;
+}
+a:hover {
+ text-decoration: underline;
+ color: #FFFFFF;
+}
+</style>
+
+</head>
+<body>
+
+
+<div class='update'>
+<h3>Pathery.com is updating...</h3>
+<p>Would you like to use this time to be social?</p>
+<div class='buttons'>
+<a href='http://www.facebook.com/Pathery' target='top' title='Facebook' alt='Facebook'><img src='images/btns/facebook.png' /></a>
+<a href='https://twitter.com/Pathery' target='top' title='Twitter' alt='Twitter'><img src='images/btns/twitter.png' /></a>
+<a href='https://plus.google.com/105148482605711831543' target='top' title='Google Plus' alt='Google Plus'><img src='images/btns/googleplus.png' /></a>
+</div>
+<p>The website should return shortly.
+<a href='http://www.pathery.com/' title='(refreshes page)'>Check Now</a>
+</div>
+
+
+
+</body>
+</html> \ No newline at end of file