From b2bffd5eb17212b60b62ab86a8559213ed3820af Mon Sep 17 00:00:00 2001 From: Patrick Davison Date: Sun, 2 Dec 2012 13:27:12 -0800 Subject: Image updates and mapspecs fixes. Fixed a bug where every checkpoint was called "checkpoint A" Fixed a bug where requesting solution during a path would break it. Fixed a bug regarding tutorial success. --- css/maps.css | 4 ++-- images/OverlayStart2.png | Bin 3564 -> 3580 bytes images/OverlayTiles.xcf | Bin 42183 -> 63460 bytes images/Path1XRock.png | Bin 4144 -> 3162 bytes images/Path2xRock.png | Bin 4100 -> 3168 bytes images/paths/Path1-1.png | Bin 1577 -> 1309 bytes images/paths/Path1-2.png | Bin 1424 -> 1384 bytes images/paths/Path1-3.png | Bin 1459 -> 1267 bytes images/paths/Path1-4.png | Bin 1812 -> 1446 bytes images/paths/Path2-1.png | Bin 1503 -> 1230 bytes images/paths/Path2-2.png | Bin 1456 -> 1285 bytes images/paths/Path2-3.png | Bin 1406 -> 1185 bytes images/paths/Path2-4.png | Bin 1466 -> 1313 bytes includes/datas.php | 6 +++--- includes/maps.php | 3 ++- js/mapspecs.js | 44 +++++++++----------------------------------- 16 files changed, 16 insertions(+), 41 deletions(-) diff --git a/css/maps.css b/css/maps.css index 8e49789..62c11b4 100644 --- a/css/maps.css +++ b/css/maps.css @@ -173,12 +173,12 @@ .grid_td_rockxpath1 { background: url(../images/Path1XRock.png); - background-color: #666666; + background-color: #555; color: #fff; } .grid_td_rockxpath2 { background: url(../images/Path2XRock.png); - background-color: #666666; + background-color: #777; color: #fff; } diff --git a/images/OverlayStart2.png b/images/OverlayStart2.png index 123cddd..ca82929 100644 Binary files a/images/OverlayStart2.png and b/images/OverlayStart2.png differ diff --git a/images/OverlayTiles.xcf b/images/OverlayTiles.xcf index 1e304bb..6aaf0cb 100644 Binary files a/images/OverlayTiles.xcf and b/images/OverlayTiles.xcf differ diff --git a/images/Path1XRock.png b/images/Path1XRock.png index 24d84f1..e64fcbb 100644 Binary files a/images/Path1XRock.png and b/images/Path1XRock.png differ diff --git a/images/Path2xRock.png b/images/Path2xRock.png index c5a2aa5..3abf42a 100644 Binary files a/images/Path2xRock.png and b/images/Path2xRock.png differ diff --git a/images/paths/Path1-1.png b/images/paths/Path1-1.png index 65556a3..93f204d 100644 Binary files a/images/paths/Path1-1.png and b/images/paths/Path1-1.png differ diff --git a/images/paths/Path1-2.png b/images/paths/Path1-2.png index 42559e7..fce34ad 100644 Binary files a/images/paths/Path1-2.png and b/images/paths/Path1-2.png differ diff --git a/images/paths/Path1-3.png b/images/paths/Path1-3.png index 736a123..6cca507 100644 Binary files a/images/paths/Path1-3.png and b/images/paths/Path1-3.png differ diff --git a/images/paths/Path1-4.png b/images/paths/Path1-4.png index ef1f17d..00f75d4 100644 Binary files a/images/paths/Path1-4.png and b/images/paths/Path1-4.png differ diff --git a/images/paths/Path2-1.png b/images/paths/Path2-1.png index b167e69..c1e47bc 100644 Binary files a/images/paths/Path2-1.png and b/images/paths/Path2-1.png differ diff --git a/images/paths/Path2-2.png b/images/paths/Path2-2.png index 8f32a28..51cc0e7 100644 Binary files a/images/paths/Path2-2.png and b/images/paths/Path2-2.png differ diff --git a/images/paths/Path2-3.png b/images/paths/Path2-3.png index 266bfb4..6c83526 100644 Binary files a/images/paths/Path2-3.png and b/images/paths/Path2-3.png differ diff --git a/images/paths/Path2-4.png b/images/paths/Path2-4.png index bf73208..f856209 100644 Binary files a/images/paths/Path2-4.png and b/images/paths/Path2-4.png differ diff --git a/includes/datas.php b/includes/datas.php index f1f4377..fa04300 100644 --- a/includes/datas.php +++ b/includes/datas.php @@ -304,9 +304,9 @@ function applyCareerMazesAchievements($userID) { */ function getCompletedChallenges($userID, $mapID, $solution, $moves, $paths) { //mapID 5 is the tutorial, and is treated specially - $firephp = FirePHP::getInstance(true); - $firephp->log("In challenges"); - if($mapID < 10) { + //$firephp = FirePHP::getInstance(true); + //$firephp->log("In challenges"); + if($mapID <= 10) { if ($mapID == 5 && $moves == 75) { onCompletedTutorial($userID); } diff --git a/includes/maps.php b/includes/maps.php index 2b20eac..b6912a2 100644 --- a/includes/maps.php +++ b/includes/maps.php @@ -74,7 +74,8 @@ function DisplayMap($mapMatrix, $idprefix = 1, $style = 'normal', $speed = NULL)
"; break; case 'a': case 'b': case 'c': case 'd': case 'e': - $maptable .= " + $checkpoint = strtoupper($mapMatrix[$i][$j]); + $maptable .= "
"; break; diff --git a/js/mapspecs.js b/js/mapspecs.js index 5299b60..5a64d83 100644 --- a/js/mapspecs.js +++ b/js/mapspecs.js @@ -33,11 +33,6 @@ var mapType; // 1 = simple, 2 = normal, ...; used for mixpanel tracking var pressedGoTime = 0; -// function loadAllSolutions() { - // for(var i in jsonmapdata.solutions) { - // } -// } - function loadSol(sol, moves) { if (sol == null) if (document.getElementById('mapsol') != undefined) @@ -62,7 +57,6 @@ function loadSol(sol, moves) { if (moves && mapid) { updateDsp(mapid, 'dspCount', moves+ " moves"); } - } function showNotification(html) { @@ -163,20 +157,12 @@ function updateDsp(mapid, element, data) { } function getmapdata(mapid) { - var rawjson = jsonmapdata[mapid]; - if (typeof(JSON) == 'undefined') { - //text = document.getElementById(mapid+',mapdata').innerHTML; - text = rawjson; - mapdata[mapid] = !(/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(text.replace(/"(\\.|[^"\\])*"/g, ''))) && eval('(' + text + ')'); - //mapdata[mapid] = eval(document.getElementById(mapid+',mapdata').innerHTML); - } else { - //mapdata[mapid] = JSON.parse(document.getElementById(mapid+',mapdata').innerHTML); - mapdata[mapid] = JSON.parse(rawjson); - } - + + if (typeof(mapdata[mapid]) != 'object') + mapdata[mapid] = decryptJSON(jsonmapdata[mapid]); + blocks[mapid] = mapdata[mapid].walls; solution[mapid] = '.'; - updateDsp(mapid, 'dspWalls', blocks[mapid]+" walls"); } @@ -206,15 +192,10 @@ function requestSol(mapID) { function requestSolDone() { var JO; - if (typeof(JSON) == 'undefined') { - text = ajax.response; - JO = !(/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(text.replace(/"(\\.|[^"\\])*"/g, ''))) && eval('(' + text + ')'); - } else { - JO = JSON.parse(ajax.response); - } + JO = decryptJSON(ajax.response); if (JO.solution == 'undefined') return; - clearwalls(JO.mapid); + //clearwalls(JO.mapid); loadSol(JO.mapid + ":" + JO.solution, JO.moves); } @@ -242,7 +223,8 @@ function clearwalls(mapid) { } } solution[mapid] = undefined; - getmapdata(mapid); + //!! + //getmapdata(mapid); } function resetwalls(mapid) { @@ -253,7 +235,6 @@ function resetwalls(mapid) { } function request_path_done() { - var JO = decryptJSON(ajax.response); var mapid = JO.mapid; mapjson[mapid] = JO; @@ -289,7 +270,6 @@ function request_path_done() { mapdata[mapid].restoreTiles = new Array(); mapdata[mapid].pathColor = new Object; - mapdata[mapid].pathsPending = JO.path.length; mapdata[mapid].isMultiPath = (JO.path.length > 1); @@ -299,8 +279,6 @@ function request_path_done() { animatePath(JO.path[i].path, mapid, JO.path[i].start, i); } - - //Mark off challenges //TODO: Temporarly disabled because it breaks the tutorial; if(isChallenge && 2 == 4) @@ -318,9 +296,8 @@ function decryptJSON(text) { var JO; if (typeof(JSON) == 'undefined') { JO = !(/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(text.replace(/"(\\.|[^"\\])*"/g, ''))) && eval('(' + text + ')'); - //mapdata[mapid] = eval(document.getElementById(mapid+',mapdata').innerHTML); } else { - JO = JSON.parse(ajax.response); + JO = JSON.parse(text); } return JO; } @@ -341,9 +318,6 @@ function animatePath(path, mapid, start, pathNumber) { } function animatePathDone(mapid) { - - //console.log('Animate Path Done', mapid); - scoresRequestPage(mapid, currentPage[mapid]); document.getElementById(mapid+',btn').disabled = false; if (isChallenge == true) { -- cgit v1.2.3