clean up
This commit is contained in:
parent
be8d84b980
commit
c6e85d2d38
25
cat.html
25
cat.html
|
@ -1042,20 +1042,15 @@ var game = {
|
||||||
|
|
||||||
this.resize();
|
this.resize();
|
||||||
|
|
||||||
//if (game.ios) {
|
window.requestAnimFrame = (function(){
|
||||||
// this.interval = setInterval(mainloop, 20);
|
return window.requestAnimationFrame ||
|
||||||
//} else {
|
window.webkitRequestAnimationFrame ||
|
||||||
window.requestAnimFrame = (function(){
|
window.mozRequestAnimationFrame ||
|
||||||
return window.requestAnimationFrame ||
|
window.oRequestAnimationFrame ||
|
||||||
window.webkitRequestAnimationFrame ||
|
window.msRequestAnimationFrame ||
|
||||||
window.mozRequestAnimationFrame ||
|
function( callback ){
|
||||||
window.oRequestAnimationFrame ||
|
window.setTimeout(mainloop, 1000 / 60);
|
||||||
window.msRequestAnimationFrame ||
|
};
|
||||||
function( callback ){
|
|
||||||
window.setTimeout(mainloop, 1000 / 60);
|
|
||||||
};
|
|
||||||
})();
|
|
||||||
//}
|
|
||||||
|
|
||||||
this.canvas.addEventListener('mousedown', this.handlemousedown, false);
|
this.canvas.addEventListener('mousedown', this.handlemousedown, false);
|
||||||
this.canvas.addEventListener('mouseup', this.handlemouseup, false);
|
this.canvas.addEventListener('mouseup', this.handlemouseup, false);
|
||||||
|
@ -3332,11 +3327,9 @@ console.log("lev " + lev + " newwid " + newwid + " ratio " + ratio);
|
||||||
// find where you clicked
|
// find where you clicked
|
||||||
if ((realx >= levsel_contx) && (realx <= levsel_contx + levsel_contw) &&
|
if ((realx >= levsel_contx) && (realx <= levsel_contx + levsel_contw) &&
|
||||||
(realy >= levsel_conty) && (realy <= levsel_conty + levsel_conth)) {
|
(realy >= levsel_conty) && (realy <= levsel_conty + levsel_conth)) {
|
||||||
/* TODO: this currently works on ios */
|
|
||||||
//game.setstate("title");
|
//game.setstate("title");
|
||||||
wipe.start("title", "out", 15);
|
wipe.start("title", "out", 15);
|
||||||
} else {
|
} else {
|
||||||
/* TODO: this DOESN'T works on ios */
|
|
||||||
var gridx,gridy,levsel;
|
var gridx,gridy,levsel;
|
||||||
|
|
||||||
gridx = Math.floor(adjustx / GRIDSIZE);
|
gridx = Math.floor(adjustx / GRIDSIZE);
|
||||||
|
|
Loading…
Reference in New Issue