Commit a13f23b6 authored by anotherguest's avatar anotherguest

Add start and stop music playing to script page

parent 378bb262
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#include "io/gfx/font.h" #include "io/gfx/font.h"
#include "io/gfx/paletteeffects.h" #include "io/gfx/paletteeffects.h"
#include "io/gfx/video.h" #include "io/gfx/video.h"
#include "io/sound.h"
/** /**
* This is the 0sc format * This is the 0sc format
...@@ -225,6 +225,10 @@ int Scene::play () { ...@@ -225,6 +225,10 @@ int Scene::play () {
downOrRight || downOrRight ||
((globalTicks-lastTicks) >= pageTime * 1000 && pageTime != 256 && pageTime != 0)) { ((globalTicks-lastTicks) >= pageTime * 1000 && pageTime != 256 && pageTime != 0)) {
if(pages[sceneIndex].stopMusic) {
stopMusic();
}
if (upOrLeft) sceneIndex--; if (upOrLeft) sceneIndex--;
else sceneIndex++; else sceneIndex++;
...@@ -259,6 +263,10 @@ int Scene::play () { ...@@ -259,6 +263,10 @@ int Scene::play () {
} }
if(pages[sceneIndex].musicFile) {
playMusic(pages[sceneIndex].musicFile);
}
newpage = 0; newpage = 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment