1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
| <a href="javascript:change_cursor(42);"><img src="images/isometrie/armurerie.png" alt="" width="64" height="64" /></a>
</div>
<div id="carte">
<script type="text/JavaScript">
<!--
var ppmap;
function carte() {
ppmap = $('#ppISO').pp3Diso({
map:'<?php echo $map; ?>', // la map
mapId:1, // id de la map
nbrTitleSetsSlide:100, // pas de mouvement de la map lorsque l'on click dessus
tx:160, // dimension x des tuiles
ty:120, // dimension y des tuiles
prefix:'isometrie/tuiles/map-',
auto_size:false,
mousewheel:true,
onmoveavatar:function(x, y, id) {
myClick(x, y, id);
}
});
ppmap.moveMapOn();
ppmap.cursor('images/cursor-on.png', 'images/cursor-off.png', 0, 0);
var zoom = 0.5;
}
var Choix = 0;
var objets = new Array();
var objetsDecX = new Array();
var objetsDecY = new Array();
objets[1] = 'armurerie.png';
objetsDecX[1] = 0;
objetsDecY[1] = 0;
function change_cursor(n) {
if(IsNumeric(objets[n])) {
ppmap.changeCursor('images/isometrie/tuiles/map-' + objets[n] + '.png', 'images/cursor-off.png', objetsDecX[n], objetsDecY[n]);
}else{
ppmap.changeCursor('images/isometrie/' + objets[n], 'images/cursor-off.png', objetsDecX[n], objetsDecY[n]);
}
Choix = n;
}
function myClick(x, y, id) {
switch(Choix) {
case 2:
ppmap.changeOneMap(x, y, objets[Choix]);
break;
case 1:
ppmap.addObject(x, y, 'images/isometrie/' + objets[Choix], objetsDecX[Choix], objetsDecY[Choix]);
break;
}
} |