MCPcopy Create free account
hub / github.com/bwapi/bwapi / execute

Method execute

bwapi/BWScriptEmulator/If_Dif.cpp:10–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8IMPLEMENT(If_Dif);
9
10bool 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}

Callers

nothing calls this directly

Calls 4

setScriptOffsetMethod · 0.80
saveDebugMethod · 0.80
getOpcodeMethod · 0.80
readTupleMethod · 0.45

Tested by

no test coverage detected