本文整理汇总了C++中common::ReadStream::readUint16BE方法的典型用法代码示例。如果您正苦于以下问题:C++ ReadStream::readUint16BE方法的具体用法?C++ ReadStream::readUint16BE怎么用?C++ ReadStream::readUint16BE使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类common::ReadStream
的用法示例。
在下文中一共展示了ReadStream::readUint16BE方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: loadIntroSong
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);
}
}
示例2: readBG
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();
}
示例3: readBG
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();
}
示例4: loadCmdList
/**
* 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);
}
}
}
示例5: readHotspot
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();
}
示例6: loadBackgroundObjects
/**
* 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);
}
}
}
示例7: loadHotspots
/**
* 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);
}
}
示例8: loadCatchallList
/**
* 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);
}
}
示例9: readCmd
/**
* 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();
}