PRIVATE: some more functions implemented
This commit is contained in:
parent
cae1b214a8
commit
ccef0fb704
4 changed files with 112 additions and 44 deletions
|
@ -1,5 +1,6 @@
|
|||
#include "common/str.h"
|
||||
#include "common/debug.h"
|
||||
#include "common/system.h"
|
||||
|
||||
#include "grammar.h"
|
||||
#include "private.h"
|
||||
|
@ -35,6 +36,30 @@ void Sound(ArgArray args) {
|
|||
}
|
||||
}
|
||||
|
||||
void Bitmap(ArgArray args) {
|
||||
assert(args.size() == 1 || args.size() == 3);
|
||||
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
|
||||
char *f = args[0].str;
|
||||
if (args.size() == 3) {
|
||||
x = args[1].val;
|
||||
y = args[2].val;
|
||||
}
|
||||
|
||||
debug("Bitmap(%s, %d, %d)", f, x, y);
|
||||
Common::String *s = new Common::String(args[0].str);
|
||||
_private->loadImage(*s, x, y);
|
||||
}
|
||||
|
||||
void Timer(ArgArray args) {
|
||||
debug("Timer(%d, %s, %s)", args[0].val, args[1].str, args[2].str);
|
||||
g_system->delayMillis(1000 * args[0].val);
|
||||
Common::String *s = new Common::String(args[1].str);
|
||||
_nextSetting = s;
|
||||
}
|
||||
|
||||
|
||||
void execFunction(char *name, ArgArray args) {
|
||||
if (strcmp(name, "ChgMode") == 0) {
|
||||
|
@ -50,7 +75,15 @@ void execFunction(char *name, ArgArray args) {
|
|||
else if (strcmp(name, "Sound") == 0) {
|
||||
Sound(args);
|
||||
}
|
||||
|
||||
else if (strcmp(name, "Bitmap") == 0) {
|
||||
Bitmap(args);
|
||||
}
|
||||
else if (strcmp(name, "Timer") == 0) {
|
||||
Timer(args);
|
||||
}
|
||||
else if (strcmp(name, "Exit") == 0) {
|
||||
;
|
||||
}
|
||||
else
|
||||
assert(0);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue