From c6e85d2d38ae4f2d4f1c32c0609d818dc56fff37 Mon Sep 17 00:00:00 2001 From: Rob Pearce Date: Sat, 27 Aug 2016 06:17:52 +0000 Subject: [PATCH] clean up --- cat.html | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/cat.html b/cat.html index 93d148b..73d3bc8 100644 --- a/cat.html +++ b/cat.html @@ -1042,20 +1042,15 @@ var game = { this.resize(); - //if (game.ios) { - // this.interval = setInterval(mainloop, 20); - //} else { - window.requestAnimFrame = (function(){ - return window.requestAnimationFrame || - window.webkitRequestAnimationFrame || - window.mozRequestAnimationFrame || - window.oRequestAnimationFrame || - window.msRequestAnimationFrame || - function( callback ){ - window.setTimeout(mainloop, 1000 / 60); - }; - })(); - //} + window.requestAnimFrame = (function(){ + return window.requestAnimationFrame || + window.webkitRequestAnimationFrame || + window.mozRequestAnimationFrame || + window.oRequestAnimationFrame || + window.msRequestAnimationFrame || + function( callback ){ + window.setTimeout(mainloop, 1000 / 60); + }; this.canvas.addEventListener('mousedown', this.handlemousedown, false); this.canvas.addEventListener('mouseup', this.handlemouseup, false); @@ -3332,11 +3327,9 @@ console.log("lev " + lev + " newwid " + newwid + " ratio " + ratio); // find where you clicked if ((realx >= levsel_contx) && (realx <= levsel_contx + levsel_contw) && (realy >= levsel_conty) && (realy <= levsel_conty + levsel_conth)) { - /* TODO: this currently works on ios */ //game.setstate("title"); wipe.start("title", "out", 15); } else { - /* TODO: this DOESN'T works on ios */ var gridx,gridy,levsel; gridx = Math.floor(adjustx / GRIDSIZE);