本文整理汇总了C++中GetU16函数的典型用法代码示例。如果您正苦于以下问题:C++ GetU16函数的具体用法?C++ GetU16怎么用?C++ GetU16使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetU16函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: GetU16
Position NetworkMessage::GetPosition()
{
Position pos;
pos.x = GetU16();
pos.y = GetU16();
pos.z = GetByte();
return pos;
}
开发者ID:PrzemolKing,项目名称:wedoserver,代码行数:8,代码来源:networkmessage.cpp
示例2: FCPassLabel
void FCPassLabel( void ) {
//=====================
// Pass label to run-time routine.
call_handle handle;
handle = InitCall( GetU16() );
CGAddParm( handle, CGBackName( (back_handle)GetLabel( GetU16() ), TY_POINTER ), TY_POINTER );
CGDone( CGCall( handle ) );
}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:11,代码来源:fcio.c
示例3: mDefinition
Dictionary::Dictionary(char const *filename) : mDefinition(null)
{
mFile = LoadFile("english.dictionary", &mFileSize);
if(mFile != null)
{
uint8 const *p = mFile;
uint8 const *bufferEnd = p + mFileSize;
char const *id = (char const *)p;
if(strncmp(id, "dictionary", 10) == 0)
{
p += 10;
mVersion = GetU16(p);
mNumWords = GetU32(p);
mWord = (char *)p;
p += mNumWords * 8;
mDefinition = new char *[mNumWords];
int wordIndex = 0;
while(p < bufferEnd)
{
mDefinition[wordIndex] = (char *)p;
uint16 definitionMask = GetU16(p);
for(int i = 0; i < eWordType::kNumWordTypes; ++i)
{
if((definitionMask & (1 << i)) != 0)
{
if(*p++ == eReferenceType::kNone)
{
p += strlen((char *)p) + 1;
}
else
{
p += 3;
}
}
}
++wordIndex;
}
}
}
SaveAsJSON();
}
开发者ID:cskilbeck,项目名称:MakeTheWords,代码行数:49,代码来源:Dictionary.cpp
示例4: DtFieldSubstring
void DtFieldSubstring( void ) {
//==========================
// Data initialize a substring character item within a structure.
sym_id fd;
intstar4 base;
intstar4 first;
intstar4 last;
char name[MAX_SYMLEN+1];
base = DXPop();
first = DXPop();
fd = GetPtr();
last = GetInt();
if( last != 0 ) {
last += first - 1;
} else {
last = DXPop();
}
GetU16(); // skip typing information
if( DoSubstring( first, last, fd->u.fd.xt.size ) ) {
DXPush( base + first - 1 );
DtItemSize = last - first + 1;
} else {
STFieldName( fd, name );
Error( EV_SSTR_INVALID, name, StmtKeywords[ PR_DATA ] );
}
}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:29,代码来源:fcdata.c
示例5: DtSubstring
void DtSubstring( void ) {
//=====================
// Data initialize a character substring.
intstar4 first;
intstar4 last;
sym_id cv;
cv = GetPtr();
GetU16(); // skip typing information
first = DXPop();
if( cv != NULL ) {
if( DtFlags & DT_SS_NO_HIGH ) {
last = cv->u.ns.xt.size;
DtFlags &= ~DT_SS_NO_HIGH;
} else {
last = DXPop();
}
} else {
last = first + GetInt() - 1;
}
if( !DoSubstring( first, last, InitVar->u.ns.xt.size ) ) {
NameStmtErr( EV_SSTR_INVALID, InitVar, PR_DATA );
}
DtOffset += first - 1;
DtItemSize = last - first + 1;
}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:28,代码来源:fcdata.c
示例6: DtExp
void DtExp( void ) {
//===============
// Exponentiate constants.
intstar4 op2;
intstar4 op1;
intstar4 result;
op1 = DXPop();
op2 = DXPop();
if( op1 == 0 ) {
if( op2 <= 0 ) {
Error( EX_Z_2_NOT_POS );
}
DXPush( 0 );
} else if( op2 < 0 ) {
DXPush( 0 );
} else {
result = 1;
while( op2 != 0 ) {
result *= op1;
--op2;
}
DXPush( result );
}
GetU16(); // skip typing information
}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:28,代码来源:fcdata.c
示例7: Equivalent
static void Equivalent( cg_op op_code ) {
//===========================================
cg_name op1;
cg_name op2;
unsigned_16 typ_info;
cg_type typ1;
cg_type typ2;
typ_info = GetU16();
typ1 = GetType1( typ_info );
typ2 = GetType2( typ_info );
op1 = XPopValue( typ1 );
op2 = XPopValue( typ2 );
typ1 = CGType( op1 );
if( typ1 != TY_BOOLEAN ) {
op1 = CGCompare( O_NE, op1, CGInteger( 0, typ1 ), typ1 );
}
typ2 = CGType( op2 );
if( typ2 != TY_BOOLEAN ) {
op2 = CGCompare( O_NE, op2, CGInteger( 0, typ2 ), typ2 );
}
XPush( CGCompare( op_code, op1, op2, TY_UINT_1 ) );
}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:25,代码来源:fclogic.c
示例8: FCMulMixCX
void FCMulMixCX( void ) {
//====================
// Multiply a complex by a scalar.
XMulDivMix( O_TIMES, true, GetU16() );
}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:7,代码来源:fccmplx.c
示例9: FCCat
void FCCat( void ) {
//===============
// Do concatenation operation.
XPush( Concat( GetU16(), XPop() ) );
}
开发者ID:Ukusbobra,项目名称:open-watcom-v2,代码行数:7,代码来源:fcstring.c
示例10: FCFreeLabel
void FCFreeLabel( void ) {
//=====================
// Free specified label since it will no longer be referenced.
DoneLabel( GetU16() );
}
开发者ID:bhanug,项目名称:open-watcom-v2,代码行数:7,代码来源:fcflow.c
示例11: FCMulMixXC
void FCMulMixXC( void ) {
//====================
// Multiply a scalar by a complex.
XMulDivMix( O_TIMES, false, GetU16() );
}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:7,代码来源:fccmplx.c
示例12: FCDivMixCX
void FCDivMixCX( void ) {
//====================
// Divide a complex by a scalar.
XMulDivMix( O_DIV, true, GetU16() );
}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:7,代码来源:fccmplx.c
示例13: FCMulCmplx
void FCMulCmplx( void ) {
//====================
// Multiply one complex number by another.
#if _CPU == 8086 || _CPU == 386
if( CPUOpts & CPUOPT_FPC ) {
// generate call to runtime complex multiply
XCmplxOp( RT_C8MUL );
} else {
// do multiplication inline
InLineMulCC( GetU16() );
}
#else
// For risc we just inline the entire code
InLineMulCC( GetU16() );
#endif
}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:17,代码来源:fccmplx.c
示例14: DtUMinus
void DtUMinus( void ) {
//==================
// Negate constant.
DXPush( -DXPop() );
GetU16(); // skip typing information
}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:8,代码来源:fcdata.c
示例15: FCJmpFalse
void FCJmpFalse( void ) {
//====================
unsigned_16 typ_info;
cg_type typ;
cg_name bool_expr;
typ_info = GetU16();
typ = GetType( typ_info );
if( IntType( typ_info ) ) {
bool_expr = CGCompare( O_NE, XPopValue( typ ),
CGInteger( 0, typ ), typ );
} else {
bool_expr = XPopValue( typ );
}
CGControl( O_IF_FALSE, bool_expr, GetLabel( GetU16() ) );
}
开发者ID:bhanug,项目名称:open-watcom-v2,代码行数:17,代码来源:fcflow.c
示例16: GetU16
std::string NetworkMessage::GetString()
{
uint16_t stringlen = GetU16();
if(stringlen >= (16384 - m_ReadPos))
return std::string();
char* v = (char*)(m_MsgBuf + m_ReadPos);
m_ReadPos += stringlen;
return std::string(v, stringlen);
}
开发者ID:cp1337,项目名称:devland,代码行数:10,代码来源:networkmessage.cpp
示例17: GetU16
std::string NetworkMessage::GetString()
{
uint16_t stringlen = GetU16();
if(stringlen >= (NETWORKMESSAGE_MAXSIZE - m_ReadPos))
return std::string();
char* v = (char*)(m_MsgBuf + m_ReadPos);
m_ReadPos += stringlen;
return std::string(v, stringlen);
}
开发者ID:OMARTINEZ210,项目名称:server,代码行数:10,代码来源:networkmessage.cpp
示例18: DtUnaryMul
void DtUnaryMul( void ) {
//====================
// Multiply constants.
intstar4 op;
op = DXPop();
DXPush( op * op );
GetU16(); // skip typing information
}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:11,代码来源:fcdata.c
示例19: FCConjg
void FCConjg( void ) {
//=================
cg_cmplx z;
cg_type typ;
typ = GetType( GetU16() );
XPopCmplx( &z, typ );
XPush( CGUnary( O_UMINUS, z.imagpart, CmplxBaseType( typ ) ) );
XPush( z.realpart );
}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:11,代码来源:fccmplx.c
示例20: FCDbgLine
void FCDbgLine( void ) {
//====================
// Generate line # information.
unsigned_16 line_num;
line_num = GetU16();
if( ( SubProgId->ns.flags & SY_SUBPROG_TYPE ) == SY_BLOCK_DATA ) return;
DBLineNum( line_num );
}
开发者ID:Ukusbobra,项目名称:open-watcom-v2,代码行数:11,代码来源:fcdbg.c
注:本文中的GetU16函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论