Merge branch 'master' of github.com:MathWizz/scratch-html5 into test

Conflicts:
	js/Interpreter.js
	js/primitives/LooksPrims.js
	js/primitives/MotionAndPenPrims.js
	js/primitives/Primitives.js
	js/primitives/SoundPrims.js
	js/primitives/VarListPrims.js

Tested with:
  http://scratch.mit.edu/projects/13841687/
  http://scratch.mit.edu/projects/2192048/
This commit is contained in:
Nathan Dinsmore 2013-11-14 22:21:49 -05:00
commit 07415badbe
6 changed files with 179 additions and 155 deletions

View file

@ -155,8 +155,8 @@ SoundPrims.prototype.primPlayNote = function(b) {
var s = interp.targetSprite();
if (s == null) return;
if (interp.activeThread.firstTime) {
var key = interp.arg(b, 0);
var secs = beatsToSeconds(interp.arg(b, 1));
var key = interp.numarg(b, 0);
var secs = beatsToSeconds(interp.numarg(b, 1));
playNote(s.instrument, key, secs, s);
interp.startTimer(secs);
} else {
@ -168,8 +168,8 @@ SoundPrims.prototype.primPlayDrum = function(b) {
var s = interp.targetSprite();
if (s == null) return;
if (interp.activeThread.firstTime) {
var drum = Math.round(interp.arg(b, 0));
var secs = beatsToSeconds(interp.arg(b, 1));
var drum = Math.round(interp.numarg(b, 0));
var secs = beatsToSeconds(interp.numarg(b, 1));
playDrum(drum, secs, s);
interp.startTimer(secs);
} else {
@ -181,7 +181,7 @@ SoundPrims.prototype.primPlayRest = function(b) {
var s = interp.targetSprite();
if (s == null) return;
if (interp.activeThread.firstTime) {
var secs = beatsToSeconds(interp.arg(b, 0));
var secs = beatsToSeconds(interp.numarg(b, 0));
interp.startTimer(secs);
} else {
interp.checkTimer();
@ -199,12 +199,12 @@ SoundPrims.prototype.primStopAllSounds = function(b) {
SoundPrims.prototype.primChangeVolume = function(b) {
var s = interp.targetSprite();
if (s != null) s.volume += interp.arg(b, 0);
if (s != null) s.volume += interp.numarg(b, 0);
};
SoundPrims.prototype.primSetVolume = function(b) {
var s = interp.targetSprite();
if (s != null) s.volume = interp.arg(b, 0);
if (s != null) s.volume = interp.numarg(b, 0);
};
SoundPrims.prototype.primVolume = function(b) {