当前位置: 首页>>代码示例>>C++>>正文


C++ ReadStream::readUint16BE方法代码示例

本文整理汇总了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);
	}
}
开发者ID:YakBizzarro,项目名称:scummvm,代码行数:7,代码来源:sound.cpp

示例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();
}
开发者ID:peres,项目名称:scummvm,代码行数:8,代码来源:parser.cpp

示例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();
}
开发者ID:Bundesdrucker,项目名称:scummvm,代码行数:8,代码来源:parser.cpp

示例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);
		}
	}
}
开发者ID:peres,项目名称:scummvm,代码行数:22,代码来源:parser.cpp

示例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();
}
开发者ID:AlbanBedel,项目名称:scummvm,代码行数:11,代码来源:mouse.cpp

示例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);
		}
	}
}
开发者ID:peres,项目名称:scummvm,代码行数:25,代码来源:parser.cpp

示例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);
	}
}
开发者ID:AlbanBedel,项目名称:scummvm,代码行数:16,代码来源:mouse.cpp

示例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);
	}
}
开发者ID:peres,项目名称:scummvm,代码行数:18,代码来源:parser.cpp

示例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();
}
开发者ID:peres,项目名称:scummvm,代码行数:13,代码来源:parser.cpp


注:本文中的common::ReadStream::readUint16BE方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。