Mercurial > otakunoraifu
comparison scn2k/scn2k_impl.cc @ 15:38226842bac8
Fixed new_pt in global calls
author | thib |
---|---|
date | Mon, 11 Aug 2008 15:52:41 +0000 |
parents | 2e6a92ed913b |
children | 92765a5661f7 |
comparison
equal
deleted
inserted
replaced
14:8da1d92ac8f8 | 15:38226842bac8 |
---|---|
533 } | 533 } |
534 if (cmd.cmd_type != CMD_OTHER) return; | 534 if (cmd.cmd_type != CMD_OTHER) return; |
535 if (cmd.cmd1 == 0 && cmd.cmd2 == 1) { | 535 if (cmd.cmd1 == 0 && cmd.cmd2 == 1) { |
536 if (cmd.cmd3 == 0x0b) { // global jump | 536 if (cmd.cmd3 == 0x0b) { // global jump |
537 int call_no = 0; | 537 int call_no = 0; |
538 if (cmd.args.size() >= 2) call_no = cmd.args[1].value; | 538 if (cmd.args.size() >= 2) call_no = cmd.args[1].value; |
539 eprintf("global jump to %d\n",cmd.args[0].value); | 539 eprintf("global jump to %d\n",cmd.args[0].value); |
540 if (! ChangeScript(cmd.args[0].value, call_no)) return; // 読み込めない; abort. | 540 if (! ChangeScript(cmd.args[0].value, call_no)) return; // 読み込めない; abort. |
541 cmd.clear(); | 541 cmd.clear(); |
542 } else if (cmd.cmd3 == 0x0c || cmd.cmd3 == 0x12) { // call (0x12 の方は微妙) | 542 } else if (cmd.cmd3 == 0x0c || cmd.cmd3 == 0x12) { // call (0x12 の方は微妙) |
543 int new_scn = cmd.args[0].value; | 543 int new_scn = cmd.args[0].value; |
544 int new_pt = 0; | 544 int new_pt = 0; |
545 if (cmd.args.size() >= 1) { // subroutine number が付く | 545 if (cmd.args.size() >= 2) { // subroutine number が付く |
546 // 引数が付くのもあるらしい | 546 // 引数が付くのもあるらしい |
547 new_pt = cmd.args[1].value; | 547 new_pt = cmd.args[1].value; |
548 } | 548 } |
549 if (new_scn == SCN_INFO_MENU) { // menu call | 549 if (new_scn == SCN_INFO_MENU) { // menu call |
550 config.GetParam("#CANCELCALL", 2, &new_scn, &new_pt); | 550 config.GetParam("#CANCELCALL", 2, &new_scn, &new_pt); |