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


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

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


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

示例1: LoadState

//
// ExplosionObj::LoadState
//
// Load a state configuration scope
//
void ExplosionObj::LoadState(FScope *fScope)
{
  // Call parent scope first
  MapObj::LoadState(fScope);

  fScope = fScope->GetFunction(SCOPE_CONFIG);
  FScope *sScope;

  while ((sScope = fScope->NextFunction()) != NULL)
  {
    switch (sScope->NameCrc())
    {
      case 0x9E64852D: // "Damage"
        damage.LoadState(sScope);
        break;

      case 0x6F5B0CAF: // "SourceUnit"
        StdLoad::TypeReaper(sScope, sourceUnit);
        break;

      case 0x5B0A6F84: // "SourceTeam"
        sourceTeam = Team::Name2Team(StdLoad::TypeString(sScope));
        break;
    }
  }
}
开发者ID:ZhouWeikuan,项目名称:darkreign2,代码行数:31,代码来源:explosionobj.cpp

示例2: Load

  //
  // Load
  //
  void TransportUnload::Load(FScope *fScope)
  {
    FScope *sScope;

    while ((sScope = fScope->NextFunction()) != NULL)
    {
      switch (sScope->NameCrc())
      {
        case 0x22C4A13F: // "StateMachine"
          inst.LoadState(sScope);
          break;

        case 0xA302E408: // "Destination"
          StdLoad::TypeVector(sScope, destination);
          break;

        case 0xD3D101D2: // "MoveHandle"
          moveHandle.LoadState(sScope);
          break;

        default:
          LoadTaskData(sScope);
          break;
      }
    }    
  }
开发者ID:ZhouWeikuan,项目名称:darkreign2,代码行数:29,代码来源:tasks_transportunload.cpp

示例3: Load

  //
  // Load
  //
  void SquadFormation::Load(FScope *fScope)
  {
    FScope *sScope;

    while ((sScope = fScope->NextFunction()) != NULL)
    {
      switch (sScope->NameCrc())
      {
        case 0x22C4A13F: // "StateMachine"
          inst.LoadState(sScope);
          break;

        case 0x7223612A: // "Formation"
          formation = StdLoad::TypeU32(sScope);
          break;

        case 0x693D5359: // "Location"
          StdLoad::TypeVector(sScope, location);
          break;

        case 0x04BC5B80: // "Direction"
          direction = StdLoad::TypeF32(sScope);
          break;

        default:
          LoadTaskData(sScope);
          break;
      }
    }
  }
开发者ID:ZhouWeikuan,项目名称:darkreign2,代码行数:33,代码来源:tasks_squadformation.cpp

示例4: LoadState

//
// LoadState
//
// Load state configuration
//
void SpyObj::LoadState(FScope *fScope)
{
  // Call parent scope first
  UnitObj::LoadState(fScope);

  // Get specific config scope
  if ((fScope = fScope->GetFunction(SCOPE_CONFIG, FALSE)) != NULL)
  {
    FScope *sScope;

    while ((sScope = fScope->NextFunction()) != NULL)
    {
      switch (sScope->NameCrc())
      {
        case 0x95B674EF: // "MorphTeam"
          morphTeam = Team::Name2Team(StdLoad::TypeString(sScope));
          break;

        case 0x65DBDDCC: // "MorphType"
          StdLoad::TypeReaperObjType(sScope, morphType);
          Resolver::Type(morphType);
          break;
      }
    }
  }
}
开发者ID:grasmanek94,项目名称:darkreign2,代码行数:31,代码来源:spyobj.cpp

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

示例6: LoadState

//
// ResourceObj::LoadState
//
// Load a state configuration scope
//
void ResourceObj::LoadState(FScope *fScope)
{
  // Call parent scope first
  MapObj::LoadState(fScope);

  if ((fScope = fScope->GetFunction(SCOPE_CONFIG, FALSE)) != NULL)
  {
    FScope *sScope;

    while ((sScope = fScope->NextFunction()) != NULL)
    {
      switch (sScope->NameCrc())
      {
        case 0x5457F5AB: // "TeamHaveSeen"
          teamsHaveSeen = Game::TeamBitfield(StdLoad::TypeU32(sScope));
          break;

        case 0x7C8A86BB: // "ResourcePercent"
          resource = StdLoad::TypePercentage(sScope, ResourceType()->GetResourceMax());
          AdjustResource();
          break;
      }
    }
  }
}
开发者ID:grasmanek94,项目名称:darkreign2,代码行数:30,代码来源:resourceobj.cpp

示例7: Load

//
// Load
//
void UnitExplore::Load(FScope *fScope)
{
    FScope *sScope;

    while ((sScope = fScope->NextFunction()) != NULL)
    {
        switch (sScope->NameCrc())
        {
        case 0x22C4A13F: // "StateMachine"
            inst.LoadState(sScope);
            break;

        case 0xD3D101D2: // "MoveHandle"
            moveHandle.LoadState(sScope);
            break;

        case 0x7BCDC81D: // "HangUntil"
            hangUntil = StdLoad::TypeU32(sScope);
            break;

        default:
            LoadTaskData(sScope);
            break;
        }
    }
}
开发者ID:supermukmin,项目名称:darkreign2,代码行数:29,代码来源:tasks_unitexplore.cpp

示例8: Load

  //
  // Load
  //
  void SquadMoveTogether::Load(FScope *fScope)
  {
    FScope *sScope;

    while ((sScope = fScope->NextFunction()) != NULL)
    {
      switch (sScope->NameCrc())
      {
        case 0x22C4A13F: // "StateMachine"
          inst.LoadState(sScope);
          break;

        case 0xA302E408: // "Destination"
          StdLoad::TypeVector(sScope, destination);
          break;

        case 0x04BC5B80: // "Direction"
          direction = StdLoad::TypeF32(sScope);
          break;

        case 0x82698073: // "Trail"
          StdLoad::TypeReaper(sScope, trail);
          break;

        case 0xA3998582: // "TrailIndex"
          index = StdLoad::TypeU32(sScope);
          break;

        default:
          LoadTaskData(sScope);
          break;
      }
    }  
  }
开发者ID:ZhouWeikuan,项目名称:darkreign2,代码行数:37,代码来源:tasks_squadmovetogether.cpp

示例9: while

  //
  // LoadState
  //
  // Load state information
  //
  void Transport::Manager::LoadState(FScope *scope)
  {
    FScope *sScope;

    while ((sScope = scope->NextFunction()) != NULL)
    {
      switch (sScope->NameCrc())
      {
        case 0xDFB7F0C8: // "Transport"
        {
          // Load and resolve the transport object
          TransportObjPtr reaper;
          StdLoad::TypeReaper(sScope, reaper);
          Resolver::Object<TransportObj, TransportObjType>(reaper);

          if (reaper.Alive())
          {
            if (Transport *transport = FindIdleTransport(*reaper))
            {
              transport->LoadState(sScope);
            }
          }       
          break;
        }
      }
    }
  }
开发者ID:grasmanek94,项目名称:darkreign2,代码行数:32,代码来源:strategic_transport_manager.cpp

示例10: Load

  //
  // Load
  //
  void UnitIdle::Load(FScope *fScope)
  {
    FScope *sScope;

    while ((sScope = fScope->NextFunction()) != NULL)
    {
      switch (sScope->NameCrc())
      {
        case 0x22C4A13F: // "StateMachine"
          inst.LoadState(sScope);
          break;

        case 0x5AB44811: // "Timer"
          timer.LoadState(sScope);
          break;

        case 0xA7DAA62B: // "AnimationCrc"
          animationCrc = StdLoad::TypeU32(sScope);
          break;

        default:
          LoadTaskData(sScope);
          break;
      }
    }
  }
开发者ID:ZhouWeikuan,项目名称:darkreign2,代码行数:29,代码来源:tasks_unitidle.cpp

示例11: LoadState

  //
  // LoadState
  //
  // Load state information
  //
  void Transport::LoadState(FScope *scope)
  {
    FScope *sScope;

    while ((sScope = scope->NextFunction()) != NULL)
    {
      switch (sScope->NameCrc())
      {
        case 0x693D5359: // "Location"
          StdLoad::TypeVector(sScope, location);
          break;

        case 0x8810AE3C: // "Script"
          script = manager.GetObject().GetScriptManager().FindScript(StdLoad::TypeU32(sScope));

          if (script)
          {
            AssignToSquad(script);
          }
          break;

        case 0x8669FADC: // "Flag"
          flag = StdLoad::TypeU32(sScope);
          break;
      }
    }
  }
开发者ID:grasmanek94,项目名称:darkreign2,代码行数:32,代码来源:strategic_transport.cpp

示例12: 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

示例13: LoadState

//
// SquadObj::LoadState
//
// Load a state configuration scope
//
void SquadObj::LoadState(FScope *fScope)
{
  // Call parent scope first
  GameObj::LoadState(fScope);

  // Get specific config scope
  fScope = fScope->GetFunction(SCOPE_CONFIG);
  FScope *sScope;

  while ((sScope = fScope->NextFunction()) != NULL)
  {
    switch (sScope->NameCrc())
    {
      case 0xEDF0E1CF: // "Team"
        SetTeam(Team::Name2Team(StdLoad::TypeString(sScope)));
        break;

      case 0x2F382D90: // "ModifierSettings"
        settings.LoadState(sScope);
        break;

      case 0xE3554C44: // "Node"
      {
        ListNode *node = list.Append();
        StdLoad::TypeReaper(sScope, *node);
        node->LoadState(sScope);
        break;
      }
    }
  }
}
开发者ID:ZhouWeikuan,项目名称:darkreign2,代码行数:36,代码来源:squadobj.cpp

示例14: ModifierProperties

  //
  // Constructor
  //
  Table::Table(FScope *fScope)
  {
    // Setup the modifiers
    modifiers = new ModifierProperties *[numModifiers];
    for (U32 m = 0; m < numModifiers; m++)
    {
      modifiers[m] = new ModifierProperties(*Tactical::modifiers[m]);
    }

    FScope *sScope;
    while ((sScope = fScope->NextFunction()) != NULL)
    {
      switch (sScope->NameCrc())
      {
        case 0xFEB2541D: // "ConfigureModifier"
        {
          U8 index;
          const char *modifier = StdLoad::TypeString(sScope);
          if (FindModifierIndex(Crc::CalcStr(modifier), index))
          {
            modifiers[index]->Load(sScope);
          }
          else
          {
            sScope->ScopeError("Could not find modifier '%s'", modifier);
          }
          break;
        }
      }
    }
  }
开发者ID:ZhouWeikuan,项目名称:darkreign2,代码行数:34,代码来源:tactical.cpp

示例15: ASSERT

  //
  // LoadState
  //
  // Load state information
  //
  void Asset::Request::LoadState(FScope *scope, void *context)
  {
    // The context holds a pointer to the asset manager
    Manager *manager = reinterpret_cast<Manager *>(context);

    ASSERT(manager)

    FScope *sScope;

    while ((sScope = scope->NextFunction()) != NULL)
    {
      switch (sScope->NameCrc())
      {
        case 0x411AC76D: // "Parent"
          Item::LoadState(sScope, context);
          break;

        case 0x8810AE3C: // "Script"
          script = manager->GetObject().GetScriptManager().FindScript(StdLoad::TypeU32(sScope));
          break;

        case 0xB5EA6B79: // "Handle"
          handle = StdLoad::TypeU32(sScope);
          break;
      }
    }
  }
开发者ID:grasmanek94,项目名称:darkreign2,代码行数:32,代码来源:strategic_asset_request.cpp


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