summaryrefslogtreecommitdiffstats
path: root/js/mapspecs.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/mapspecs.js')
-rw-r--r--js/mapspecs.js19
1 files changed, 18 insertions, 1 deletions
diff --git a/js/mapspecs.js b/js/mapspecs.js
index 5a124b1..cf2450a 100644
--- a/js/mapspecs.js
+++ b/js/mapspecs.js
@@ -21,6 +21,7 @@ else if (document.attachEvent) { // IE 8-
var wallColor = false;
var wallEmblem = false;
+var wallOrientation = 0;
var isChallenge = false;
var isTutorial = false;
@@ -84,6 +85,13 @@ function changeWallEmblem(newEmblem) {
loadSol(null);
}
+function linkEmblem(emblem, orientation) {
+ orientation = orientation - 0;
+ var url = 'images/marks/';
+ if (orientation == 0) return url+emblem;
+ return url+'rotate.php?r='+orientation+'&emblem='+emblem;
+}
+
function grid_click(obj) {
//Prepare data
@@ -141,9 +149,18 @@ function grid_click(obj) {
wallEmblem = playerWallEmblem;
}
}
+ //TODO: Copy below - above w/ userObj
+ if (wallOrientation == false) {
+ if (typeof userObj !== 'undefined' && userObj.wallOrientation !== '') {
+ wallOrientation = userObj.wallOrientation;
+ }
+ }
+
obj.style.backgroundColor = wallColor;
if (wallEmblem !== false) {
- obj.style.backgroundImage="url(images/marks/"+wallEmblem+")";
+ //obj.style.backgroundImage="url(images/marks/"+wallEmblem+")";
+ //obj.style.backgroundImage="url(images/marks/rotate.php?r=1&emblem="+wallEmblem+")";
+ obj.style.backgroundImage="url("+linkEmblem(wallEmblem, wallOrientation)+")";
}
//Add Wall