Refactored functions

The decompiled versions were inconsistent.
This commit is contained in:
arookas 2016-02-22 21:42:49 -05:00
parent c56444d7ca
commit 5e25a1aada
2 changed files with 11 additions and 18 deletions

View file

@ -62,16 +62,10 @@ builtin startMareBottleDemo();
builtin isFinishMareBottleDemo();
function waitForFinishDemo() {
while (true) {
if (isDemoMode()) {
break;
}
while (!isDemoMode()) {
yield;
}
while (true) {
if (isDemoMode() == false) {
break;
}
while (isDemoMode()) {
yield;
}
}

View file

@ -56,7 +56,7 @@ function talk(msgID, flags) {
}
else {
yield;
while (getTalkMode() != true) {
while (!getTalkMode()) {
yield;
}
}
@ -81,10 +81,9 @@ function select(msgID, flags) {
}
}
else {
do {
yield;
while (getTalkMode() != true) {
yield;
}
} while (!getTalkMode());
}
return getTalkSelectedValue();
}
@ -103,20 +102,20 @@ builtin forceCloseTalk();
// functions
function forceTalk(handle) {
var res = __forceStartTalk(handle);
if (res == true) {
var result = __forceStartTalk(handle);
if (result) {
while (!isTalkModeNow()) {
yield;
}
}
return res;
return result;
}
function forceTalkExceptNpc(handle) {
var res = __forceStartTalkExceptNpc(handle);
if (res == true) {
var result = __forceStartTalkExceptNpc(handle);
if (result) {
while (!isTalkModeNow()) {
yield;
}
}
return res;
return result;
}