From d3beae7c9699033b000def8aeff8cedfe5525f5f Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Mon, 19 Aug 2013 21:17:59 -0700 Subject: Add dumpers for the rest of the stack types --- src/map/script.cpp | 12 ++++++++++-- 1 file 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); } } -- cgit v1.2.3-60-g2f50