本文整理汇总了C++中FScope::NextArgString方法的典型用法代码示例。如果您正苦于以下问题:C++ FScope::NextArgString方法的具体用法?C++ FScope::NextArgString怎么用?C++ FScope::NextArgString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FScope
的用法示例。
在下文中一共展示了FScope::NextArgString方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ProcessStandardCursors
//
// Process a StandardCursors scope
//
void ProcessStandardCursors(FScope *fScope)
{
FScope *sScope;
while ((sScope = fScope->NextFunction()) != NULL)
{
switch (sScope->NameCrc())
{
case 0x8F651465: // "Default"
standardCrs[DEFAULT] = FindByName(sScope->NextArgString());
break;
case 0x23C19271: // "IBeam"
standardCrs[IBEAM] = FindByName(sScope->NextArgString());
break;
case 0x6E758990: // "Wait"
standardCrs[WAIT] = FindByName(sScope->NextArgString());
break;
case 0x65D94636: // "No"
standardCrs[NO] = FindByName(sScope->NextArgString());
break;
default:
{
LOG_ERR(("Unknown standard cursor type [%s]", sScope->NameStr()));
break;
}
}
}
}
示例2: LoadState
//
// Load the modifier settings
//
void ModifierSettings::LoadState(FScope *fScope)
{
// Load the settings
FScope *sScope;
while ((sScope = fScope->NextFunction()) != NULL)
{
switch (sScope->NameCrc())
{
case 0x1F2EDF02: // "Set"
{
const char *modifier = sScope->NextArgString();
const char *setting = sScope->NextArgString();
U8 modifierIndex;
U8 settingIndex;
if (
FindModifier(Crc::CalcStr(modifier), &modifierIndex) &&
FindSetting(modifierIndex, Crc::CalcStr(setting), &settingIndex))
{
Set(modifierIndex, settingIndex);
}
else
{
LOG_WARN(("Invalid modifier setting combination %s:%s", modifier, setting))
}
break;
}
}
}
}
示例3: NextInstruction
//
// Step to the next instruction "At" instruction
//
void Cineractive::NextInstruction()
{
ASSERT(instructions)
FScope *fScope;
nextScope = NULL;
// Step to the next "At"
while ((fScope = instructions->NextFunction()) != NULL)
{
LOG_VIEWER(("NextInstruction: [%s]", fScope->NameStr()))
switch (fScope->NameCrc())
{
case 0x3F159CC9: // "DefineDebriefing"
{
debriefings.Add(Crc::CalcStr(fScope->NextArgString()), fScope);
break;
}
case 0xBF046B0F: // "At"
{
nextScope = fScope;
nextCycle = Utils::FtoLNearest(nextScope->NextArgFPoint() * GameTime::CYCLESPERSECOND);
return;
}
default:
{
LOG_WARN(("Unexpected function [%s] in Cineractive", fScope->NameStr()))
break;
}
}
}
}
示例4: name
//
// Obj::Obj
//
// Constructor
//
Obj::Obj(FScope *fScope, const char *name) :
name(name)
{
FScope *sScope;
defaultLocation = NULL;
// Process each function
while ((sScope = fScope->NextFunction()) != NULL)
{
switch (sScope->NameCrc())
{
case 0x1E534497: // "Tag"
{
U32 tag = Crc::CalcStr(sScope->NextArgString());
tags.Add(tag, new Location(sScope, name));
break;
}
case 0x1D9D48EC: // "Type"
{
U32 type = Crc::CalcStr(sScope->NextArgString());
types.Add(type, new Location(sScope, name));
break;
}
case 0x666BCB68: // "Property"
{
properties.Append(new PropertyLocation(sScope, name));
break;
}
case 0x8F651465: // "Default"
if (defaultLocation)
{
sScope->ScopeError("Default has already been specified");
}
defaultLocation = new Location(sScope, name);
break;
}
}
}
示例5: ProcessCreateTractionType
//
// ProcessCreateTractionType
//
// Process a traction creation scope
//
void ProcessCreateTractionType(FScope *fScope)
{
ASSERT(initialized);
ASSERT(fScope);
FScope *sScope;
U32 defaultSlope = 30;
// Get the traction type index
U8 traction = TractionIndex(fScope->NextArgString());
// Process each function
while ((sScope = fScope->NextFunction()) != NULL)
{
switch (sScope->NameCrc())
{
case 0x1788F661: // "DefaultSlope"
defaultSlope = StdLoad::TypeU32(sScope, Range<U32>(0, 90));
break;
case 0x841386F6: // "OverSurface"
{
// Get the type index
U8 surface = SurfaceIndex(sScope->NextArgString());
// Get the balance data for this combination
BalanceData &data = table->GetBalance(surface, traction);
// Speed is a percentage between 5% and 100%
data.speed = StdLoad::TypeF32(sScope, Range<F32>(MIN_PASSABLE_SPEED, 1.0F));
// The slope is between 0 and 90, where 0 is horizontal
data.slope = (U8)defaultSlope;
// Health modifier is a percentage of maximum hitpoints
data.health = StdLoad::TypeF32(sScope, data.health, Range<F32>(-1.0F, 1.0F));
break;
}
}
}
}
示例6: ExecBlock
//
// Execute a block of commands
//
void Cineractive::ExecBlock(FScope *fScope)
{
FScope *sScope;
while ((sScope = fScope->NextFunction()) != NULL)
{
LOG_VIEWER(("Exec: [%s]", sScope->NameStr()))
switch (sScope->NameCrc())
{
case 0x9D71F205: // "Movie"
{
// Disable movies in multiplayer campaigns
if (!MultiPlayer::Data::Online())
{
if (moviePrim)
{
delete moviePrim;
}
moviePrim = new Movie(this, sScope);
}
break;
}
case 0x0DA67726: // "AlphaNear"
Vid::renderState.status.alphaNear = alphaNear = sScope->NextArgInteger();
break;
case 0x70600744: // "DisableIFace"
{
DisableIFace(sScope->NextArgInteger());
break;
}
case 0x72C1779F: // "DisableHUD"
{
DisableHUD(sScope->NextArgInteger());
break;
}
case 0x288F19CB: // "DisableInput"
{
DisableInput(sScope->NextArgInteger());
break;
}
case 0xAA268B85: // "DisableShroud"
{
DisableShroud(sScope->NextArgInteger());
break;
}
case 0x47518EE4: // "EndCineractive"
{
Terminate();
break;
}
case 0x7E8E3E05: // "SkipPoint"
{
RestoreDisplay();
break;
}
case 0xEA4227E1: // "SetBookmark"
{
SetBookmark(sScope);
break;
}
case 0xDDD6437A: // "DefaultCamera"
{
LOG_VIEWER(("DefaultCamera"))
if (Demo::IsPlaying())
{
SetCurrent("Playback0", StdLoad::TypeU32(sScope, U32(FALSE), Range<U32>::flag), sScope);
}
else
{
SetCurrent("default", StdLoad::TypeU32(sScope, U32(FALSE), Range<U32>::flag), sScope);
}
break;
}
case 0xF4356EC8: // "SetCamera"
{
SetCurrent(sScope->NextArgString(), FALSE, sScope);
break;
}
case 0x9805A0A6: // "Mesh"
{
AddPrim(primitiveList, new Mesh(this, sScope));
break;
}
//.........这里部分代码省略.........