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

Method PatchLoop

neo/d3xp/script/Script_Compiler.cpp:1678–1692  ·  view source on GitHub ↗

================ idCompiler::PatchLoop ================ */

Source from the content-addressed store, hash-verified

1676================
1677*/
1678void idCompiler::PatchLoop( int start, int continuePos ) {
1679 int i;
1680 statement_t *pos;
1681
1682 pos = &gameLocal.program.GetStatement( start );
1683 for( i = start; i < gameLocal.program.NumStatements(); i++, pos++ ) {
1684 if ( pos->op == OP_BREAK ) {
1685 pos->op = OP_GOTO;
1686 pos->a = JumpFrom( i );
1687 } else if ( pos->op == OP_CONTINUE ) {
1688 pos->op = OP_GOTO;
1689 pos->a = JumpDef( i, continuePos );
1690 }
1691 }
1692}
1693
1694/*
1695================

Callers

nothing calls this directly

Calls 1

NumStatementsMethod · 0.45

Tested by

no test coverage detected