当前位置: 首页>>代码示例>>C++>>正文


C++ FScope::NameStr方法代码示例

本文整理汇总了C++中FScope::NameStr方法的典型用法代码示例。如果您正苦于以下问题:C++ FScope::NameStr方法的具体用法?C++ FScope::NameStr怎么用?C++ FScope::NameStr使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FScope的用法示例。


在下文中一共展示了FScope::NameStr方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: 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;
          }
        }
      }
    }
开发者ID:grasmanek94,项目名称:darkreign2,代码行数:38,代码来源:viewer_action.cpp

示例2: 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;
        }
      }
    }
  }
开发者ID:ZhouWeikuan,项目名称:darkreign2,代码行数:35,代码来源:cursor.cpp

示例3: 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;
          }

//.........这里部分代码省略.........
开发者ID:grasmanek94,项目名称:darkreign2,代码行数:101,代码来源:viewer_action.cpp

示例4: script

  //
  // Constructor
  //
  Script::State::State(Script &script, const char *name, FScope *fScope)
  : script(script),
    settings(&Setting::nodeState),
    conditions(&Condition::nodeState),
    transitions(&Transition::nodeState),
    name(name)
  {
    FScope *sScope;
    FScope *iScope;

    // Load the settings
    iScope = fScope->GetFunction("Settings", FALSE);
    if (iScope)
    {
      while ((sScope = iScope->NextFunction()) != NULL)
      {
        switch (sScope->NameCrc())
        {
          case 0x32BBA19C: // "Setting"
            settings.Append(Setting::Create(script, sScope));
            break;

          default:
            sScope->ScopeError("Unknown function '%s' in settings", sScope->NameStr());
        }
      }
    }

    // Load the action
    iScope = fScope->GetFunction("Action", FALSE);
    if (iScope)
    {
      action = Action::Create(script, iScope);
    }
    else
    {
      action = NULL;
    }

    // Load the conditions
    iScope = fScope->GetFunction("Conditions", FALSE);

    if (iScope)
    {
      while ((sScope = iScope->NextFunction()) != NULL)
      {
        switch (sScope->NameCrc())
        {
          case 0x6A34146A: // "Condition"
            conditions.Append(Condition::Create(script, sScope));
            break;

          case 0xFBCD164A: // "Status"
          {
            GameIdent code = StdLoad::TypeString(sScope);

            if (transitions.Exists(code.crc))
            {
              sScope->ScopeError("Status '%s' already defined", code.str);
            }

            // Add the new transition
            transitions.Add(code.crc, Transition::Create(sScope));
            break;
          }

          default:
            sScope->ScopeError("Unknown function '%s' in conditions", sScope->NameStr());
        }
      }
    }

    completed = transitions.Find(Status::Completed);
  }
开发者ID:grasmanek94,项目名称:darkreign2,代码行数:77,代码来源:strategic_script_state.cpp


注:本文中的FScope::NameStr方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。