| | 122 | 0x03: function dialog(message, type, option) { |
| | 123 | this.scanArgs(arguments, '.?NSN'); |
| | 124 | message = message ? CP932.decode(message.toStrValue()._value) : ""; |
| | 125 | type = type ? type.toIntValue()._value : 0; |
| | 126 | option = option ? CP932.decode(option.toStrValue()._value) : ""; |
| | 127 | if(type & ~0xf) return; |
| | 128 | if(type & 2) { |
| | 129 | this.stat.assign(0, new IntValue(window.confirm(message) ? 6 : 7)); |
| | 130 | } else { |
| | 131 | window.alert(message); |
| | 132 | this.stat.assign(0, new IntValue(1)); |
| | 133 | } |
| | 134 | }, |
| | 302 | 0x34: function stick(v, notrigerMask) { |
| | 303 | this.scanArgs(arguments, 'vNN'); |
| | 304 | notrigerMask = notrigerMask ? notrigerMask.toIntValue()._value : 0; |
| | 305 | var state = 0; |
| | 306 | if(this.keyPressed[37]) state |= 1; // カーソルキー左(←) |
| | 307 | if(this.keyPressed[38]) state |= 2; // カーソルキー上(↑) |
| | 308 | if(this.keyPressed[39]) state |= 4; // カーソルキー右(→) |
| | 309 | if(this.keyPressed[40]) state |= 8; // カーソルキー下(↓) |
| | 310 | if(this.keyPressed[32]) state |= 16; // スペースキー |
| | 311 | if(this.keyPressed[13]) state |= 32; // Enterキー |
| | 312 | if(this.keyPressed[17]) state |= 64; // Ctrlキー |
| | 313 | if(this.keyPressed[27]) state |= 128; // ESCキー |
| | 314 | if(this.keyPressed[1]) state |= 256; // マウスの左ボタン |
| | 315 | if(this.keyPressed[2]) state |= 512; // マウスの右ボタン |
| | 316 | if(this.keyPressed[9]) state |= 1024; // TABキー |
| | 317 | var lastState = this.lastStickState || 0; |
| | 318 | var trigger = state & ~lastState; |
| | 319 | this.lastStickState = state; |
| | 320 | v.assign(new IntValue(trigger | state & notrigerMask)); |
| | 321 | } |