# HG changeset patch # User thib # Date 1217866971 0 # Node ID 2c890434e30f7b49e444293346981103c5cdad11 # Parent aa0577c1a4940d2da8522ffbb7d7329e6c43efb8 Add call_no in global jumps diff --git a/scn2k/scn2k_impl.cc b/scn2k/scn2k_impl.cc --- 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;