void parseOpcodeConst(Instruction &instr, Common::SeekableReadStream &ncs) { switch (instr.type) { case kInstTypeInt: instr.constValueInt = ncs.readSint32BE(); break; case kInstTypeFloat: instr.constValueFloat = ncs.readIEEEFloatBE(); break; case kInstTypeString: case kInstTypeResource: instr.constValueString = readStringQuoting(ncs, ncs.readUint16BE()); break; case kInstTypeObject: instr.constValueObject = ncs.readUint32BE(); break; default: throw Common::Exception("Illegal type for opcode CONST: 0x%02X", (uint8)instr.type); } instr.argTypes[0] = kOpcodeArgVariable; instr.argCount = 1; }