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

Method execute

bwapi/BWScriptEmulator/ScriptOpcodes.cpp:12–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10using namespace BWAPI;
11
12void aithread::execute()
13{
14 // Reset bytes read
15 this->dwBytesRead = 0;
16
17 // Check if binary is loaded
18 if ( !pbAIScriptBinary )
19 {
20 Broodwar << Text::Red << "No binary loaded!" << std::endl;
21 return this->killThread();
22 }
23
24 // Read opcodes until one of them requests a break
25 while ( AISCRIPT::Opcode::readOpcode(*this) )
26 {
27 if ( this->dwScriptOffset == 0 )
28 {
29 Broodwar << Text::Red << "Script offset is 0!" << std::endl;
30 return this->killThread();
31 }
32 } // read loop
33
34}

Callers

nothing calls this directly

Calls 1

killThreadMethod · 0.95

Tested by

no test coverage detected