1
0
Fork 0
mirror of https://github.com/doukutsu-rs/doukutsu-rs synced 2024-11-26 15:23:38 +00:00

equipment opcodes

This commit is contained in:
Alula 2020-09-11 14:58:21 +02:00
parent 95438d8561
commit 2b9e7151dc
No known key found for this signature in database
GPG key ID: 3E00485503A1D8BA

View file

@ -1034,9 +1034,23 @@ impl TextScriptVM {
exec_state = TextScriptExecutionState::Running(event, cursor.position() as u32); exec_state = TextScriptExecutionState::Running(event, cursor.position() as u32);
} }
OpCode::EQp => {
let mask = read_cur_varint(&mut cursor)? as u16;
game_scene.player.equip.0 |= mask;
exec_state = TextScriptExecutionState::Running(event, cursor.position() as u32);
}
OpCode::EQm => {
let mask = read_cur_varint(&mut cursor)? as u16;
game_scene.player.equip.0 &= !mask;
exec_state = TextScriptExecutionState::Running(event, cursor.position() as u32);
}
// unimplemented opcodes // unimplemented opcodes
// Zero operands // Zero operands
OpCode::AEp | OpCode::CAT | OpCode::CIL | OpCode::CPS | OpCode::CAT | OpCode::CIL | OpCode::CPS |
OpCode::CRE | OpCode::CSS | OpCode::ESC | OpCode::FLA | OpCode::CRE | OpCode::CSS | OpCode::ESC | OpCode::FLA |
OpCode::INI | OpCode::LDP | OpCode::MLP | OpCode::INI | OpCode::LDP | OpCode::MLP |
OpCode::SAT | OpCode::SLP | OpCode::SPS | OpCode::SAT | OpCode::SLP | OpCode::SPS |
@ -1047,7 +1061,7 @@ impl TextScriptVM {
} }
// One operand codes // One operand codes
OpCode::BOA | OpCode::BSL | OpCode::FOB | OpCode::NUM | OpCode::DNA | OpCode::BOA | OpCode::BSL | OpCode::FOB | OpCode::NUM | OpCode::DNA |
OpCode::MPp | OpCode::SKm | OpCode::SKp | OpCode::EQp | OpCode::EQm | OpCode::MPp | OpCode::SKm | OpCode::SKp |
OpCode::UNJ | OpCode::MPJ | OpCode::XX1 | OpCode::SIL | OpCode::SOU | OpCode::UNJ | OpCode::MPJ | OpCode::XX1 | OpCode::SIL | OpCode::SOU |
OpCode::SSS | OpCode::ACH => { OpCode::SSS | OpCode::ACH => {
let par_a = read_cur_varint(&mut cursor)?; let par_a = read_cur_varint(&mut cursor)?;