本文整理汇总了C++中Int32函数的典型用法代码示例。如果您正苦于以下问题:C++ Int32函数的具体用法?C++ Int32怎么用?C++ Int32使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Int32函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Inherited
StageDataBase::StageDataBase(void) :
Inherited(),
_sfPartitionRangeBegin (Int32(-1)),
_sfPartitionRangeEnd (Int32(-1)),
_sfGroupMode (Int32(0))
{
}
示例2: returnValue
Vec2f CSMNativeWindow::translateToScreenCoordinatesAbs(Real32 rX,
Real32 rY)
{
Vec2f returnValue(0, 0);
X11Window qChild = 0;
Int32 qW = 0;
Int32 qH = 0;
XTranslateCoordinates( _pDisplay,
_pXWindow->getWindow(),
_pRootWindow,
Int32(rX),
Int32(rY),
& qW,
& qH,
& qChild);
returnValue.setValues(qW, qH);
return returnValue;
}
示例3: Int32
hsIntRect *hsRect::Truncate(hsIntRect* r) const
{
r->fLeft = Int32(fLeft);
r->fTop = Int32(fTop);
r->fRight = Int32(fRight);
r->fBottom = Int32(fBottom);
return r;
}
示例4: rand
void MinusLife::onApply(Player& player, World& world, Int32 duration) const
{
Int32 hit = (Int32(D6_MAX_LIFE) / 7) + rand() % (Int32(D6_MAX_LIFE) / 2);
if (player.hit(Float32(hit)))
{
player.playSound(PlayerSounds::Type::WasKilled);
}
world.getMessageQueue().add(player, Format("Life -{0}") << hit);
}
示例5: Inherited
PostShaderStageDataBase::PostShaderStageDataBase(void) :
Inherited(),
_mfShaderMaterials (),
_sfWidth (Int32(0)),
_sfHeight (Int32(0)),
_mfRenderTargets (),
_sfCamera (NULL)
{
}
示例6: Inherited
TextureImageChunkBase::TextureImageChunkBase(void) :
Inherited(),
_sfTexture (NULL),
_sfLevel (Int32(0)),
_sfLayer (Int32(-1)),
_sfAccess (GLenum(GL_READ_ONLY)),
_sfFormat (GLenum(GL_NONE))
{
}
示例7: Inherited
FogStageDataBase::FogStageDataBase(void) :
Inherited(),
_sfFogMaterial (NULL),
_sfWidth (Int32(0)),
_sfHeight (Int32(0)),
_sfRenderTarget (NULL),
_sfCamera (NULL)
{
}
示例8: VAL_SERIES
*/ REBINT PD_String(REBPVS *pvs)
/*
***********************************************************************/
{
REBVAL *data = pvs->value;
REBVAL *val = pvs->setval;
REBINT n = 0;
REBCNT i;
REBINT c;
REBSER *ser = VAL_SERIES(data);
if (IS_INTEGER(pvs->select)) {
n = Int32(pvs->select) + VAL_INDEX(data) - 1;
}
else return PE_BAD_SELECT;
if (val == 0) {
if (n < 0 || (REBCNT)n >= SERIES_TAIL(ser)) return PE_NONE;
if (IS_BINARY(data)) {
SET_INTEGER(pvs->store, *BIN_SKIP(ser, n));
} else {
SET_CHAR(pvs->store, GET_ANY_CHAR(ser, n));
}
return PE_USE;
}
if (n < 0 || (REBCNT)n >= SERIES_TAIL(ser)) return PE_BAD_RANGE;
if (IS_CHAR(val)) {
c = VAL_CHAR(val);
if (c > MAX_CHAR) return PE_BAD_SET;
}
else if (IS_INTEGER(val)) {
c = Int32(val);
if (c > MAX_CHAR || c < 0) return PE_BAD_SET;
if (IS_BINARY(data)) { // special case for binary
if (c > 0xff) Trap_Range(val);
BIN_HEAD(ser)[n] = (REBYTE)c;
return PE_OK;
}
}
else if (ANY_BINSTR(val)) {
i = VAL_INDEX(val);
if (i >= VAL_TAIL(val)) return PE_BAD_SET;
c = GET_ANY_CHAR(VAL_SERIES(val), i);
}
else
return PE_BAD_SELECT;
TRAP_PROTECT(ser);
if (BYTE_SIZE(ser) && c > 0xff) Widen_String(ser);
SET_ANY_CHAR(ser, n, c);
return PE_OK;
}
示例9: Inherited
ShadowMapEngineBase::ShadowMapEngineBase(void) :
Inherited(),
_sfShadowTexChunk (NULL),
_sfWidth (Int32(512)),
_sfHeight (Int32(512)),
_sfOffsetBias (Real32(4.f)),
_sfOffsetFactor (Real32(10.f)),
_sfShadowTravMask (UInt32(TypeTraits<UInt32>::BitsSet))
{
}
示例10: Inherited
DisplayFilterGroupBase::DisplayFilterGroupBase(void) :
Inherited(),
_sfCalibrationPatternFilter(NULL),
_sfResolutionFilter (NULL),
_sfColorFilter (NULL),
_sfDistortionFilter (NULL),
_sfDrawerId (Int32(-1)),
_sfDrawableId (Int32(-1))
{
}
示例11: Inherited
MultiDisplayWindowBase::MultiDisplayWindowBase(void) :
Inherited(),
_sfHServers (),
_sfVServers (),
_sfManageClientViewports (bool(true)),
_sfXOverlap (Int32(0)),
_sfYOverlap (Int32(0)),
_sfMaxDepth (Int32(999))
{
}
示例12: Int32
Int32 FBOViewport::getPixelBottom(void) const
{
if(getBottom() > 1)
return Int32(getBottom());
if(getFrameBufferObject() == NULL)
return Int32(getBottom());
return Int32(getFrameBufferObject()->getHeight() * getBottom());
}
示例13: verifySignature
//////////////////////////////////////////////////////////////////////////////
// STATIC
void
verifySignature(std::streambuf & istrm, UInt8 validSig)
{
UInt8 val;
read(istrm, val);
if (val != validSig)
{
BLOCXX_THROW(BadSignatureException,
Format("Received invalid signature. Got: %1 Expected: %2", Int32(val),
Int32(validSig)).c_str());
}
}
示例14: Inherited
StencilChunkBase::StencilChunkBase(void) :
Inherited(),
_sfStencilFunc (GLenum(GL_NONE)),
_sfStencilValue (Int32(0)),
_sfStencilMask (UInt32(0x1)),
_sfStencilOpFail (GLenum(GL_KEEP)),
_sfStencilOpZFail (GLenum(GL_KEEP)),
_sfStencilOpZPass (GLenum(GL_KEEP)),
_sfClearBuffer (Int32(0)),
_sfBitMask (UInt32(0xFFFFFFFF))
{
}
示例15: getQuadtreeDepth
Int32 getQuadtreeDepth(Int32 iSamplesX, Int32 iSamplesY, Int32 iTileSize)
{
#ifdef WIN32
return Int32(log(Real32(getQuadtreeLeafNodeCount(iSamplesX,
iSamplesY,
iTileSize)))/log(2.f) +
1.f);
#else
return Int32(log2(Real32(getQuadtreeLeafNodeCount(iSamplesX,
iSamplesY,
iTileSize))) + 1.f);
#endif
}