| 8 | IMPLEMENT(If_Dif); |
| 9 | |
| 10 | bool If_Dif::execute(aithread &thread) const |
| 11 | { |
| 12 | // Parameters |
| 13 | BYTE bModifier, bValue; |
| 14 | WORD wBlock; |
| 15 | thread.readTuple( std::tie( bModifier, bValue, wBlock ) ); |
| 16 | |
| 17 | // Compare diff value |
| 18 | BYTE bDiff = MainController.bIfDif; |
| 19 | if ( bModifier ? (bDiff > bValue) : (bDiff < bValue) ) |
| 20 | thread.setScriptOffset( wBlock ); |
| 21 | |
| 22 | // Save debug info and return |
| 23 | thread.saveDebug(Text::Green, this->getOpcode(), "%u %u %04X", bModifier, bValue, wBlock); |
| 24 | return true; |
| 25 | } |
nothing calls this directly
no test coverage detected