MCPcopy Create free account
hub / github.com/dhewm/dhewm3 / DisassembleStatement

Method DisassembleStatement

neo/game/script/Script_Program.cpp:1687–1711  ·  view source on GitHub ↗

============== idProgram::DisassembleStatement ============== */

Source from the content-addressed store, hash-verified

1685==============
1686*/
1687void idProgram::DisassembleStatement( idFile *file, int instructionPointer ) const {
1688 const opcode_t *op;
1689 const statement_t *statement;
1690
1691 statement = &statements[ instructionPointer ];
1692 op = &idCompiler::opcodes[ statement->op ];
1693 file->Printf( "%20s(%d):\t%6d: %15s\t", fileList[ statement->file ].c_str(), statement->linenumber, instructionPointer, op->opname );
1694
1695 if ( statement->a ) {
1696 file->Printf( "\ta: " );
1697 statement->a->PrintInfo( file, instructionPointer );
1698 }
1699
1700 if ( statement->b ) {
1701 file->Printf( "\tb: " );
1702 statement->b->PrintInfo( file, instructionPointer );
1703 }
1704
1705 if ( statement->c ) {
1706 file->Printf( "\tc: " );
1707 statement->c->PrintInfo( file, instructionPointer );
1708 }
1709
1710 file->Printf( "\n" );
1711}
1712
1713/*
1714==============

Callers

nothing calls this directly

Calls 3

PrintfMethod · 0.45
c_strMethod · 0.45
PrintInfoMethod · 0.45

Tested by

no test coverage detected