| 10 | using namespace BWAPI; |
| 11 | |
| 12 | void 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 | } |
nothing calls this directly
no test coverage detected