summaryrefslogtreecommitdiff
path: root/src/map/script.cpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2013-08-19 21:17:59 -0700
committerBen Longbons <b.r.longbons@gmail.com>2013-08-19 21:17:59 -0700
commitd3beae7c9699033b000def8aeff8cedfe5525f5f (patch)
tree18e5bc906239ac169bd57c83988fa37e0e60af85 /src/map/script.cpp
parentd2c34c4b9b36d5f9ef7a327b62fc69efcd874f08 (diff)
downloadtmwa-d3beae7c9699033b000def8aeff8cedfe5525f5f.tar.gz
tmwa-d3beae7c9699033b000def8aeff8cedfe5525f5f.tar.bz2
tmwa-d3beae7c9699033b000def8aeff8cedfe5525f5f.tar.xz
tmwa-d3beae7c9699033b000def8aeff8cedfe5525f5f.zip
Add dumpers for the rest of the stack types
Diffstat (limited to 'src/map/script.cpp')
-rw-r--r--src/map/script.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/map/script.cpp b/src/map/script.cpp
index 56524d6..3c95bc1 100644
--- a/src/map/script.cpp
+++ b/src/map/script.cpp
@@ -4464,7 +4464,6 @@ void run_func(ScriptState *st)
PRINTF("stack dump :");
for (script_data& d : st->stack->stack_datav)
{
- // this is not *nearly* complete enough to be useful ...
switch (d.type)
{
case ByteCode::INT:
@@ -4485,7 +4484,16 @@ void run_func(ScriptState *st)
case ByteCode::POS:
PRINTF(" pos(%d)", d.u.numi);
break;
- default: // ?
+ case ByteCode::STR:
+ PRINTF(" str(%s)", d.u.str);
+ break;
+ case ByteCode::CONSTSTR:
+ PRINTF(" cstr(%s)", d.u.str);
+ break;
+ case ByteCode::FUNC_REF:
+ PRINTF(" func(%s)", builtin_functions[d.u.numi].name);
+ break;
+ default:
PRINTF(" %d,%d", d.type, d.u.numi);
}
}