Logo Search packages:      
Sourcecode: scummvm version File versions  Download package

uint16 Cine::RawScript::getLabel ( const FWScriptInfo info,
byte  index,
uint16  offset 
) const

find the next label from current position

Parameters:
info Script info instance
index Label index to look for
offset Current position in script
Returns:
Position of next instruction following the label
computeScriptStackFromScript replacement

Definition at line 482 of file script_fw.cpp.

References _data, and getNextLabel().

Referenced by Cine::FWScript::o2_gotoIfDiffNearest(), Cine::FWScript::o2_gotoIfEquNearest(), Cine::FWScript::o2_gotoIfInfEquNearest(), Cine::FWScript::o2_gotoIfInfNearest(), Cine::FWScript::o2_gotoIfSupEquNearest(), and Cine::FWScript::o2_gotoIfSupNearest().

            {

      assert(_data);
      int pos = offset;

      while ((pos = getNextLabel(info, pos)) >= 0) {
            if (_data[pos++] == index) {
                  return pos;
            }
      }

      return -pos - 1;
}


Generated by  Doxygen 1.6.0   Back to index