Permalink
Browse files

In development, use only WAVs and show framerate.

  • Loading branch information...
1 parent ea82adb commit 9ff6cc327d4439c42068deea09d517adb44349a1 @stephank committed Jun 6, 2010
Showing with 8 additions and 4 deletions.
  1. +1 −0 Makefile
  2. +3 −0 arashi.html
  3. +2 −3 src/engine.js
  4. +2 −1 src/soundkit.js
View
@@ -39,6 +39,7 @@ dist/arashi.html: arashi.html
-e '/script src="src\//d' \
-e 's/<\/head>/<script src="arashi.js"><\/script><\/head>/' \
-e 's/jquery\.js/jquery.min.js/' \
+ -e '/arashi_devmode/d' \
| ${JAVA} -jar ${HTMLCOMP} \
--compress-js --compress-css \
--remove-intertag-spaces --remove-quotes \
View
@@ -6,6 +6,9 @@
<link rel=stylesheet media=screen href="arashi.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.js"></script>
+
+<script>window.arashi_devmode = true;</script>
+
<script src="src/globals.js"></script>
<script src="src/engine.js"></script>
<script src="src/random.js"></script>
View
@@ -1,7 +1,6 @@
Engine = {
machine: null,
- state: null,
- showFps: false
+ state: null
};
Engine.start = function() {
@@ -99,7 +98,7 @@ Engine.render = function() {
}
// Draw frame render time in ms
- if (this.showFps) {
+ if (window.arashi_devmode) {
var d = new Date() - s;
c.beginPath();
c.save();
View
@@ -12,7 +12,8 @@ var Snd = (function() {
var dummyAudio = $('<audio></audio>')[0],
extension = 'none';
if (dummyAudio.canPlayType) {
- if (dummyAudio.canPlayType('audio/ogg; codecs="vorbis"') !== 'no') {
+ if (!window.arashi_devmode &&
+ dummyAudio.canPlayType('audio/ogg; codecs="vorbis"') !== 'no') {
extension = 'ogg';
}
else {

0 comments on commit 9ff6cc3

Please sign in to comment.