void SoundHandler::loadIntroSong(Common::ReadStream &in) { for (int varnt = 0; varnt < _vm->_numVariant; varnt++) { uint16 numBuf = in.readUint16BE(); if (varnt == _vm->_gameVariant) _DOSIntroSong = _vm->_text->getTextData(numBuf); } }
void Parser::readBG(Common::ReadStream &in, background_t &curBG) { curBG.verbIndex = in.readUint16BE(); curBG.nounIndex = in.readUint16BE(); curBG.commentIndex = in.readSint16BE(); curBG.matchFl = (in.readByte() != 0); curBG.roomState = in.readByte(); curBG.bonusIndex = in.readByte(); }
void Parser::readBG(Common::ReadStream &in, Background &curBG) { curBG._verbIndex = in.readUint16BE(); curBG._nounIndex = in.readUint16BE(); curBG._commentIndex = in.readSint16BE(); curBG._matchFl = (in.readByte() != 0); curBG._roomState = in.readByte(); curBG._bonusIndex = in.readByte(); }
void Voice8Header::load(Common::ReadStream &stream) { oneShotHiSamples = stream.readUint32BE(); repeatHiSamples = stream.readUint32BE(); samplesPerHiCycle = stream.readUint32BE(); samplesPerSec = stream.readUint16BE(); octaves = stream.readByte(); compression = stream.readByte(); volume = stream.readUint32BE(); }
/** * Load _cmdList from Hugo.dat */ void Parser::loadCmdList(Common::ReadStream &in) { cmd tmpCmd; memset(&tmpCmd, 0, sizeof(tmpCmd)); for (int varnt = 0; varnt < _vm->_numVariant; varnt++) { uint16 numElem = in.readUint16BE(); if (varnt == _vm->_gameVariant) { _cmdListSize = numElem; _cmdList = (cmd **)malloc(sizeof(cmd *) * _cmdListSize); } for (int16 i = 0; i < numElem; i++) { uint16 numSubElem = in.readUint16BE(); if (varnt == _vm->_gameVariant) _cmdList[i] = (cmd *)malloc(sizeof(cmd) * numSubElem); for (int16 j = 0; j < numSubElem; j++) readCmd(in, (varnt == _vm->_gameVariant) ? _cmdList[i][j] : tmpCmd); } } }
void MouseHandler::readHotspot(Common::ReadStream &in, Hotspot &hotspot) { hotspot._screenIndex = in.readSint16BE(); hotspot._x1 = in.readSint16BE(); hotspot._y1 = in.readSint16BE(); hotspot._x2 = in.readSint16BE(); hotspot._y2 = in.readSint16BE(); hotspot._actIndex = in.readUint16BE(); hotspot._viewx = in.readSint16BE(); hotspot._viewy = in.readSint16BE(); hotspot._direction = in.readSint16BE(); }
/** * Read _backgrounObjects from Hugo.dat */ void Parser::loadBackgroundObjects(Common::ReadStream &in) { background_t tmpBG; memset(&tmpBG, 0, sizeof(tmpBG)); for (int varnt = 0; varnt < _vm->_numVariant; varnt++) { uint16 numElem = in.readUint16BE(); if (varnt == _vm->_gameVariant) { _backgroundObjectsSize = numElem; _backgroundObjects = (background_t **)malloc(sizeof(background_t *) * numElem); } for (int i = 0; i < numElem; i++) { uint16 numSubElem = in.readUint16BE(); if (varnt == _vm->_gameVariant) _backgroundObjects[i] = (background_t *)malloc(sizeof(background_t) * numSubElem); for (int j = 0; j < numSubElem; j++) readBG(in, (varnt == _vm->_gameVariant) ? _backgroundObjects[i][j] : tmpBG); } } }
/** * Load hotspots data from hugo.dat */ void MouseHandler::loadHotspots(Common::ReadStream &in) { Hotspot *wrkHotspots = 0; Hotspot tmp; memset(&tmp, 0, sizeof(tmp)); for (int varnt = 0; varnt < _vm->_numVariant; varnt++) { int numRows = in.readUint16BE(); if (varnt == _vm->_gameVariant) _hotspots = wrkHotspots = (Hotspot *)malloc(sizeof(Hotspot) * numRows); for (int i = 0; i < numRows; i++) readHotspot(in, (varnt == _vm->_gameVariant) ? wrkHotspots[i] : tmp); } }
/** * Read _catchallList from Hugo.dat */ void Parser::loadCatchallList(Common::ReadStream &in) { background_t *wrkCatchallList = 0; background_t tmpBG; memset(&tmpBG, 0, sizeof(tmpBG)); for (int varnt = 0; varnt < _vm->_numVariant; varnt++) { uint16 numElem = in.readUint16BE(); if (varnt == _vm->_gameVariant) _catchallList = wrkCatchallList = (background_t *)malloc(sizeof(background_t) * numElem); for (int i = 0; i < numElem; i++) readBG(in, (varnt == _vm->_gameVariant) ? wrkCatchallList[i] : tmpBG); } }
/** * Read a cmd structure from Hugo.dat */ void Parser::readCmd(Common::ReadStream &in, cmd &curCmd) { curCmd.verbIndex = in.readUint16BE(); curCmd.reqIndex = in.readUint16BE(); curCmd.textDataNoCarryIndex = in.readUint16BE(); curCmd.reqState = in.readByte(); curCmd.newState = in.readByte(); curCmd.textDataWrongIndex = in.readUint16BE(); curCmd.textDataDoneIndex = in.readUint16BE(); curCmd.actIndex = in.readUint16BE(); }