本文整理汇总了C++中CR_RESERVED函数的典型用法代码示例。如果您正苦于以下问题:C++ CR_RESERVED函数的具体用法?C++ CR_RESERVED怎么用?C++ CR_RESERVED使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了CR_RESERVED函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: CR_BIND_DERIVED
#include "Sim/Units/CommandAI/CommandAI.h"
#include "Sim/Units/UnitDef.h"
#include "Sim/Misc/LosHandler.h"
#include "Game/SelectedUnits.h"
#include "LogOutput.h"
#include "creg/STL_List.h"
#include "mmgr.h"
CR_BIND_DERIVED(CTransportUnit, CUnit, );
CR_REG_METADATA(CTransportUnit, (
CR_MEMBER(transported),
CR_MEMBER(transportCapacityUsed),
CR_MEMBER(transportMassUsed),
CR_RESERVED(16),
CR_POSTLOAD(PostLoad)
));
CR_BIND(CTransportUnit::TransportedUnit,);
CR_REG_METADATA_SUB(CTransportUnit,TransportedUnit,(
CR_MEMBER(unit),
CR_MEMBER(piece),
CR_MEMBER(size),
CR_MEMBER(mass),
CR_RESERVED(8)
));
CTransportUnit::CTransportUnit()
: transportCapacityUsed(0),
开发者ID:genxinzou,项目名称:svn-spring-archive,代码行数:31,代码来源:TransportUnit.cpp
示例2: CR_BIND_DERIVED
#include "WeaponProjectiles/MissileProjectile.h"
#include "GlobalUnsynced.h"
CR_BIND_DERIVED(CFlareProjectile, CProjectile, (float3(0,0,0),float3(0,0,0),0,0));
CR_REG_METADATA(CFlareProjectile,(
CR_SETFLAG(CF_Synced),
CR_MEMBER(activateFrame),
CR_MEMBER(deathFrame),
CR_MEMBER(numSub),
CR_MEMBER(lastSub),
CR_MEMBER(subPos),
CR_MEMBER(subSpeed),
CR_MEMBER(alphaFalloff),
CR_RESERVED(8)
));
CFlareProjectile::CFlareProjectile(const float3& pos, const float3& speed, CUnit* owner, int activateFrame GML_PARG_C):
//! these are synced, but neither weapon nor piece
//! (only created by units that can drop flares)
CProjectile(pos, speed, owner, true, false, false GML_PARG_P),
activateFrame(activateFrame),
deathFrame(activateFrame + (owner? owner->unitDef->flareTime: 1)),
numSub(0),
lastSub(0)
{
alphaFalloff = owner? 1.0f / owner->unitDef->flareTime: 1.0f;
checkCol = false;
useAirLos = true;
SetRadius(45);
开发者ID:DeadnightWarrior,项目名称:spring,代码行数:31,代码来源:FlareProjectile.cpp
示例3: CR_BIND_DERIVED
#include "NetProtocol.h"
#include "GlobalUnsynced.h"
#include "ConfigHandler.h"
#include "LogOutput.h"
#include "Util.h"
#include "TimeProfiler.h"
#include "creg/STL_Map.h"
CR_BIND_DERIVED(CEngineOutHandler, CObject, )
CR_REG_METADATA(CEngineOutHandler, (
CR_MEMBER(id_skirmishAI),
CR_MEMBER(team_skirmishAIs),
CR_RESERVED(128)
));
static inline bool isUnitInLosOrRadarOfAllyTeam(const CUnit& unit, const int allyTeamId) {
return unit.losStatus[allyTeamId] & (LOS_INLOS | LOS_INRADAR);
}
/////////////////////////////
// BEGIN: Exception Handling
bool CEngineOutHandler::IsCatchExceptions() {
static bool init = false;
static bool isCatchExceptions;
开发者ID:horazont,项目名称:spring,代码行数:30,代码来源:EngineOutHandler.cpp
示例4: CR_BIND_DERIVED
CR_BIND_DERIVED(CLargeBeamLaserProjectile, CWeaponProjectile, (float3(0,0,0),float3(0,0,0),float3(0,0,0),float3(0,0,0),NULL,NULL));
CR_REG_METADATA(CLargeBeamLaserProjectile,(
CR_MEMBER(startPos),
CR_MEMBER(endPos),
CR_MEMBER(corecolstart),
CR_MEMBER(kocolstart),
CR_MEMBER(thickness),
CR_MEMBER(corethickness),
CR_MEMBER(flaresize),
CR_MEMBER(tilelength),
CR_MEMBER(scrollspeed),
CR_MEMBER(pulseSpeed),
CR_MEMBER(beamtex),
CR_MEMBER(side),
CR_RESERVED(16)
));
CLargeBeamLaserProjectile::CLargeBeamLaserProjectile(const float3& startPos, const float3& endPos,
const float3& color, const float3& color2, CUnit* owner, const WeaponDef* weaponDef):
CWeaponProjectile(startPos + (endPos - startPos) * 0.5f, ZeroVector, owner, 0, ZeroVector, weaponDef, 0, false, 1),
startPos(startPos),
endPos(endPos),
decay(1.0f)
//thickness(thickness),
//corethickness(corethickness),
//flaresize(flaresize),
//tilelength(tilelength),
//scrollspeed(scrollspeed),
//pulseSpeed(pulseSpeed)
{
开发者ID:genxinzou,项目名称:svn-spring-archive,代码行数:31,代码来源:LargeBeamLaserProjectile.cpp
示例5: CR_BIND_DERIVED_INTERFACE
CR_BIND_DERIVED_INTERFACE(AMoveType, CObject);
CR_REG_METADATA(AMoveType, (
CR_MEMBER(owner),
CR_MEMBER(goalPos),
CR_MEMBER(oldPos),
CR_MEMBER(oldSlowUpdatePos),
CR_MEMBER(maxSpeed),
CR_MEMBER(maxSpeedDef),
CR_MEMBER(maxWantedSpeed),
CR_MEMBER(repairBelowHealth),
CR_MEMBER(useHeading),
CR_ENUM_MEMBER(progressState),
CR_RESERVED(32)
));
AMoveType::AMoveType(CUnit* owner):
owner(owner),
goalPos(owner? owner->pos: ZeroVector),
oldPos(owner? owner->pos: ZeroVector),
oldSlowUpdatePos(oldPos),
useHeading(true),
progressState(Done),
maxSpeed(owner->unitDef->speed / GAME_SPEED),
maxSpeedDef(owner->unitDef->speed / GAME_SPEED),
开发者ID:FriedRice,项目名称:spring,代码行数:30,代码来源:MoveType.cpp
示例6: CR_SETFLAG
CR_SETFLAG(CF_Synced),
CR_MEMBER(targeted),
// CR_MEMBER(weaponDef),
CR_MEMBER(weaponDefName),
CR_MEMBER(target),
CR_MEMBER(targetPos),
CR_MEMBER(startpos),
CR_MEMBER(colorTeam),
CR_MEMBER(ttl),
CR_MEMBER(bounces),
CR_MEMBER(keepBouncing),
CR_MEMBER(cegTag),
CR_MEMBER(cegID),
CR_MEMBER(interceptTarget),
CR_MEMBER(id),
CR_RESERVED(15),
CR_POSTLOAD(PostLoad)
));
CWeaponProjectile::CWeaponProjectile(): CProjectile()
{
targeted = false;
weaponDef = 0;
target = 0;
projectileType = WEAPON_BASE_PROJECTILE;
ttl = 0;
colorTeam = 0;
interceptTarget = 0;
bounces = 0;
keepBouncing = true;
cegID = -1U;
开发者ID:niavok,项目名称:spring,代码行数:31,代码来源:WeaponProjectile.cpp
示例7: CR_MEMBER
CR_MEMBER(dispList),
CR_MEMBER(cegID),
// NOTE: what about this?
// CR_MEMBER(omp),
CR_MEMBER(spinVec),
CR_MEMBER(spinSpeed),
CR_MEMBER(spinAngle),
CR_MEMBER(oldSmoke),
CR_MEMBER(oldSmokeDir),
CR_MEMBER(alphaThreshold),
// CR_MEMBER(target),
CR_MEMBER(drawTrail),
CR_MEMBER(curCallback),
CR_MEMBER(age),
CR_MEMBER(colorTeam),
CR_RESERVED(36)
));
void CPieceProjectile::creg_Serialize(creg::ISerializer& s)
{
s.Serialize(numCallback, sizeof(int));
for (int i = 0; i < 8; i++) {
s.Serialize(oldInfos[i], sizeof(CPieceProjectile::OldInfo));
}
}
CPieceProjectile::CPieceProjectile(const float3& pos, const float3& speed, LocalModelPiece* lmp, int f, CUnit* owner, float radius):
CProjectile(pos, speed, owner, true, false, true),
flags(f),
dispList(lmp? lmp->dispListID: 0),
omp(NULL),
开发者ID:niavok,项目名称:spring,代码行数:31,代码来源:PieceProjectile.cpp
示例8: CR_MEMBER
CR_MEMBER(mapy),
CR_MEMBER(mapSquares),
CR_MEMBER(hmapx),
CR_MEMBER(hmapy),
CR_MEMBER(pwr2mapx),
CR_MEMBER(pwr2mapy),
CR_MEMBER(tempNum),
CR_MEMBER(godMode),
CR_MEMBER(globalLOS),
CR_MEMBER(cheatEnabled),
CR_MEMBER(noHelperAIs),
CR_MEMBER(editDefsEnabled),
CR_MEMBER(useLuaGaia),
CR_MEMBER(randSeed),
CR_MEMBER(initRandSeed),
CR_RESERVED(64)
));
/**
* Initializes variables in CGlobalSynced
*/
CGlobalSynced::CGlobalSynced()
{
mapx = 512;
mapy = 512;
mapxm1 = mapx - 1;
mapym1 = mapy - 1;
mapxp1 = mapx + 1;
mapyp1 = mapy + 1;
mapSquares = mapx * mapy;
开发者ID:gajop,项目名称:spring,代码行数:31,代码来源:GlobalSynced.cpp
示例9: CR_BIND_DERIVED
#include "Sim/Units/UnitDef.h"
#include "Sim/Units/UnitTypes/Building.h"
#include "Sim/Units/UnitTypes/TransportUnit.h"
#include "Sim/MoveTypes/MoveDefHandler.h"
#include "Sim/MoveTypes/HoverAirMoveType.h"
#include "System/creg/STL_List.h"
#include "System/myMath.h"
#define AIRTRANSPORT_DOCKING_RADIUS 16
#define AIRTRANSPORT_DOCKING_ANGLE 50
CR_BIND_DERIVED(CTransportCAI,CMobileCAI , );
CR_REG_METADATA(CTransportCAI, (
CR_MEMBER(toBeTransportedUnitId),
CR_RESERVED(1),
CR_MEMBER(lastCall),
CR_MEMBER(unloadType),
CR_MEMBER(dropSpots),
CR_MEMBER(isFirstIteration),
CR_MEMBER(lastDropPos),
CR_MEMBER(approachVector),
CR_MEMBER(endDropPos),
CR_RESERVED(16)
));
CTransportCAI::CTransportCAI()
: CMobileCAI()
, unloadType(-1)
, toBeTransportedUnitId(-1)
, lastCall(0)
开发者ID:AlexDiede,项目名称:spring,代码行数:31,代码来源:TransportCAI.cpp
示例10: CR_BIND
#include "Sim/Units/Unit.h"
#include "Sim/Units/UnitHandler.h"
#include "Sim/Units/UnitDef.h"
#include "ExternalAI/GlobalAI.h"
#include "ExternalAI/GlobalAIHandler.h"
#include "System/EventHandler.h"
#include "creg/STL_List.h"
#include "creg/STL_Map.h"
#include "creg/STL_Set.h"
#include "NetProtocol.h"
CR_BIND(CTeam,);
CR_REG_METADATA(CTeam, (
CR_MEMBER(teamNum),
CR_RESERVED(1),
CR_MEMBER(isDead),
CR_MEMBER(gaia),
CR_MEMBER(color),
CR_MEMBER(leader),
CR_MEMBER(lineageRoot),
CR_MEMBER(handicap),
CR_MEMBER(side),
CR_MEMBER(isAI),
CR_MEMBER(luaAI),
CR_MEMBER(dllAI),
CR_MEMBER(units),
CR_MEMBER(startPos),
CR_MEMBER(metal),
CR_MEMBER(energy),
CR_MEMBER(metalPull),
开发者ID:genxinzou,项目名称:svn-spring-archive,代码行数:31,代码来源:Team.cpp
示例11: CR_BIND_DERIVED
#include "creg/STL_List.h"
CR_BIND_DERIVED(CFireProjectile, CProjectile, (float3(0,0,0),float3(0,0,0),NULL,0,0,0,0));
CR_BIND(CFireProjectile::SubParticle, );
CR_REG_METADATA(CFireProjectile,(
CR_SETFLAG(CF_Synced),
CR_MEMBER(ttl),
CR_MEMBER(emitPos),
CR_MEMBER(emitRadius),
CR_MEMBER(particleTime),
CR_MEMBER(particleSize),
CR_MEMBER(ageSpeed),
CR_MEMBER(subParticles2),
CR_MEMBER(subParticles),
CR_RESERVED(16)
));
CR_REG_METADATA_SUB(CFireProjectile, SubParticle, (
CR_MEMBER(pos),
CR_MEMBER(posDif),
CR_MEMBER(age),
CR_MEMBER(maxSize),
CR_MEMBER(rotSpeed),
CR_MEMBER(smokeType),
CR_RESERVED(8)
));
CFireProjectile::CFireProjectile(const float3& pos, const float3& speed, CUnit* owner, int emitTtl, float emitRadius, int particleTtl, float particleSize GML_PARG_C):
//! these are synced, but neither weapon nor piece
开发者ID:DeadnightWarrior,项目名称:spring,代码行数:31,代码来源:FireProjectile.cpp
示例12: CR_BIND
#include "System/EventHandler.h"
#include "System/NetProtocol.h"
#include "System/LogOutput.h"
#include "System/Sound.h"
#include "creg/STL_List.h"
#define DRAW_QUAD_SIZE 32
CInMapDraw* inMapDrawer = NULL;
CR_BIND(CInMapDraw, );
CR_REG_METADATA(CInMapDraw, (
CR_MEMBER(drawQuads),
CR_RESERVED(4)
));
CR_BIND(CInMapDraw::MapPoint, );
CR_REG_METADATA_SUB(CInMapDraw, MapPoint, (
CR_MEMBER(pos),
CR_MEMBER(label),
CR_MEMBER(senderAllyTeam),
CR_MEMBER(senderSpectator),
CR_RESERVED(4),
CR_SERIALIZER(Serialize)
));
CR_BIND(CInMapDraw::MapLine, );
开发者ID:genxinzou,项目名称:svn-spring-archive,代码行数:30,代码来源:InMapDraw.cpp
示例13: CR_MEMBER
CR_MEMBER(creationTime),
CR_MEMBER(lifeTime),
CR_MEMBER(color),
CR_MEMBER(dir1),
CR_MEMBER(dir2),
CR_MEMBER(drawTrail),
CR_MEMBER(dirpos1),
CR_MEMBER(dirpos2),
CR_MEMBER(midpos),
CR_MEMBER(middir),
CR_MEMBER(drawSegmented),
CR_MEMBER(firstSegment),
CR_MEMBER(lastSegment),
CR_MEMBER(drawCallbacker),
CR_MEMBER(texture),
CR_RESERVED(4)
));
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CSmokeTrailProjectile::CSmokeTrailProjectile(
CUnit* owner,
const float3& pos1,
const float3& pos2,
const float3& dir1,
const float3& dir2,
bool firstSegment,
bool lastSegment,
float size,
开发者ID:9heart,项目名称:spring,代码行数:31,代码来源:SmokeTrailProjectile.cpp
示例14: CR_BIND
#include "Command.h"
#include "System/creg/creg_cond.h"
namespace springLegacyAI {
CR_BIND(Command, );
CR_REG_METADATA(Command, (
CR_MEMBER(id),
CR_MEMBER(options),
CR_MEMBER(params),
CR_MEMBER(tag),
CR_MEMBER(timeOut),
CR_RESERVED(16)
));
CR_BIND(CommandDescription, );
CR_REG_METADATA(CommandDescription, (
CR_MEMBER(id),
CR_MEMBER(type),
CR_MEMBER(name),
CR_MEMBER(action),
CR_MEMBER(iconname),
CR_MEMBER(mouseicon),
CR_MEMBER(tooltip),
CR_MEMBER(hidden),
CR_MEMBER(disabled),
CR_MEMBER(showUnique),
CR_MEMBER(onlyTexture),
开发者ID:9heart,项目名称:spring,代码行数:30,代码来源:Command.cpp
注:本文中的CR_RESERVED函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论