changeset 6:2c890434e30f

Add call_no in global jumps
author thib
date Mon, 04 Aug 2008 16:22:51 +0000
parents aa0577c1a494
children fa8511a21d05
files scn2k/scn2k_impl.cc
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scn2k/scn2k_impl.cc
+++ b/scn2k/scn2k_impl.cc
@@ -534,8 +534,10 @@ void Scn2k::SysExec(Cmd& cmd) {
 	if (cmd.cmd_type != CMD_OTHER) return;
 	if (cmd.cmd1 == 0 && cmd.cmd2 == 1) {
 		if (cmd.cmd3 == 0x0b) { // global jump
+		    int call_no = 0;
+		    if (cmd.args.size() >= 2) call_no = cmd.args[1].value;    
 			eprintf("global jump to %d\n",cmd.args[0].value);
-			if (! ChangeScript(cmd.args[0].value, 0)) return; // 読み込めない; abort.
+			if (! ChangeScript(cmd.args[0].value, call_no)) return; // 読み込めない; abort.
 			cmd.clear();
 		} else if (cmd.cmd3 == 0x0c || cmd.cmd3 == 0x12) { // call (0x12 の方は微妙)
 			int new_scn = cmd.args[0].value;