⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 inputstream.cpp

📁 这个是symbian下的一个蛮庞大的3D游戏源代码!对于学习3D开发的人有很大的帮助!
💻 CPP
字号:
#include <io/InputStream.h>
#include <assert.h>
#include <stdint.h>
#include <config.h>


namespace io
{


int InputStream::skip( int n )
{
	assert( n >= 0 );

	const int buffSize = 256;
	uint8_t buff[buffSize];

	int bytesSkipped = 0;
	while ( bytesSkipped < n )
	{
		int bytes = n - bytesSkipped;
		if ( bytes > buffSize )
			bytes = buffSize;

		bytes = read( buff, bytes );
		bytesSkipped += bytes;

		if ( 0 == bytes )
			break;
	}

	return bytesSkipped;
}


} // io


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -