Fichier texte en cours : Idées - Programmation.txt






GUIButton :

         - ajouter une image possible quand on a cliqué dessus

CryEngine :


PARTIE ENGINE :


         - gEnv->pGame->GetIGameFramework()->GetIGameRulesSystem()->Set[A.Z](...)

                  -> on peut appeler tous les modules à partir d'un objet globale gEnv

         - bool CGameRules::Init(IGameObject* pGameObject)

                  -> gEnv->pGame->GetIGameFramework()->GetIGameRulesSystem()->SetCurrentGameRules(this);

         - class CGameRules

                  -> pour instancier une règle de jeu
         
         - CGameObjectExtensionHelper

         - void PostInit

                  -> Initialisation suivant la destruction de l'objet

         - REGISTER_INT("mono_targetfps", 0, 0, "Defines target FPS for Mono Application.");

                  - pour initialiser une variable de type entier

         - m_pGameFramework->PreUpdate

         - m_pGameFramework->PostUpdate

         - GAME_LONGNAME & GAME_NAME :

                  static const char* GAME_NAME = "GameZero";

                  static const char* GAME_LONGNAME = "CRYENGINE SDK Game Example";

                  static const char* GAME_GUID = "{00000000-1111-2222-3333-444444444444}";
         
         - Shutdown()

         - GameEndLevel()

         - RegisterGameObject :

         RegisterGameObject("Player", "", eGORF_HiddenInEditor);          

         RegisterGameObject("ViewExtension", "", eGORF_NoEntityClass);          

         RegisterGameObject("GameRules", "", eGORF_HiddenInEditor);


         - virtual void Release() override;

         - pGameObject->BindToNetwork()

         - REGISTER_CVAR2("gamezero_cam_fov", &m_camFOV, 60.0f, VF_NULL, "Camera FOV.");

         - virtual void GetMemoryUsage(ICrySizer* pSizer) const override {}

         - Events :

         virtual void HandleEvent(const SGameObjectEvent& event) override {}          

         virtual void ProcessEvent(SEntityEvent& event) override {}

         - Memory Usage counter :

         virtual void GetMemoryUsage(ICrySizer* s) const          
         {                   
                  SIZER_SUBCOMPONENT_NAME(s, "CFlowGameEntityFactory");                   
                  s->AddObject(this, sizeof(*this) );                   
                  s->AddObject(m_inputs);                   
                  s->AddObject(m_outputs);                   
         }

         - bool SerializeXML()

         - ICrySizer :

         - CRY_ASSERT_MESSAGE(m_callbacks.empty(), "Using global callback with individually specified callbacks: not supported");

         - FUNCTION_PROFILER(GetISystem(), PROFILE_ACTION);

         - RegisterProperties(...)

                  if (tables.pPropertiesTable)          
                  {                                     
                           tables.pPropertiesTable->SetValue("object_Model", "editor/objects/sphere.cgf");          
                  }

         - void EnablePlayer(bool bPlayer);

         - virtual bool SetGameMode(bool bGameMode) override;          

         - virtual IEntity* GetPlayer() override;

         - virtual void HidePlayer(bool bHide) override;

         - virtual void SetPlayerPosAng(Vec3 pos, Vec3 viewDir) override;

         - virtual void OnBeforeLevelLoad() override;          

         - virtual void OnAfterLevelLoad(const char* levelName, const char* levelFolder) override;          

         - virtual void OnCloseLevel() override {}          

         - virtual void OnSaveLevel() override {}

         - gEnv->pLog->LogWarning("Failed spawning player");

         - IEntity* CEditorGame::GetPlayer() { return gEnv->pEntitySystem->GetEntity(LOCAL_PLAYER_ENTITY_ID); }

         - bool CEditorGame::ConfigureNetContext(bool on)
         {
                  bool ok = false;

                  IGameFramework* pGameFramework = m_pGame->GetIGameFramework();

                  if (on == m_bEnabled)
                  {
                           ok = true;
                  }
                  else if (on)
                  {
                           SGameContextParams ctx;

                           SGameStartParams gameParams;
                           gameParams.flags = eGSF_Server
                                    | eGSF_NoSpawnPlayer
                                    | eGSF_Client
                                    | eGSF_NoLevelLoading
                                    | eGSF_BlockingClientConnect
                                    | eGSF_NoGameRules
                                    | eGSF_NoQueries;

                           gameParams.flags |= eGSF_LocalOnly;
                           gameParams.connectionString = "";
                           gameParams.hostname = "localhost";
                           gameParams.port = 60695;
                           gameParams.pContextParams = &ctx;
                           gameParams.maxPlayers = 1;

                           if (pGameFramework->StartGameContext(&gameParams))
                                    ok = true;
                  }
                  else
                  {
                           pGameFramework->EndGameContext();
                           gEnv->pNetwork->SyncWithGame(eNGS_Shutdown);
                           ok = true;
                  }

                  m_bEnabled = on && ok;
                  return ok;
         }

         - void CEditorGame::OnBeforeLevelLoad()
         {
                  EnablePlayer(false);
                  ConfigureNetContext(true);
                  m_pGame->GetIGameFramework()->GetIGameRulesSystem()->CreateGameRules("SinglePlayer");
                  m_pGame->GetIGameFramework()->GetILevelSystem()->OnLoadingStart(0);
         }

         void CEditorGame::OnAfterLevelLoad(const char* levelName, const char* levelFolder)
         {
                  ILevelInfo* pLevel = m_pGame->GetIGameFramework()->GetILevelSystem()->SetEditorLoadedLevel(levelName);
                  m_pGame->GetIGameFramework()->GetILevelSystem()->OnLoadingComplete(pLevel);
                  EnablePlayer(true);
         }


         - public IEngineModule :

                  - CRYINTERFACE_SIMPLE(IEngineModule)          CRYGENERATE_SINGLETONCLASS(CEngineModule_CryFont, "EngineModule_CryFont", 0x6758643f43214957, 0x9b920d898d31f434)

         - ModuleInitISystem(pSystem, "CryFont");

         - V_RETURN(hr);

         -          int LoadFontFromFile(const string& szFileName);          
                  int LoadFontFromMemory(unsigned char* pFileBuffer, int iDataSize);

         - (IConsoleCmdArgs* pArgs)

         - CryLogAlways("Using FreeType %d.%d.%d", FREETYPE_MAJOR, FREETYPE_MINOR, FREETYPE_PATCH);

         - struct CLightEntity : public ILightSource, public Cry3DEngineBase

         - IRenderer* pRenderer

         - une classe pour gérer les fichiers Bitmap CFBitmap

         - DrawString(float x, float y, const char* pStr)

         - pSystem->CompressDataBlock()

         - struct SNodeInfo;

         - class C3DEngine : public I3DEngine, public Cry3DEngineBase

         - virtual void OnFrameStart();
         
         - virtual bool LoadLevel(const char* szFolderName, const char* szMissionName);

         - virtual void UnloadLevel();          

         - virtual void PostLoadLevel();

         - CryEngineDecalInfo :

         - int GetLoadedObjectCount();
         
         - ColorB(0x00, 0xff, 0xff), // cyan

         - SEffect* pEffect = AddEffect("default");

         pEffect->AddPass();

         - virtual float GetTerrainZ(int x, int y);
         
         - virtual voidSetFogColor(const Vec3& vFogColor);          

         virtual Vec3 GetFogColor();

         - const uint8 CCRC8::m_table[256] =
         {          
                  0x00, 0x07, 0x0e, 0x09, 0x1c, 0x1b, 0x12, 0x15,          0x38, 0x3f, 0x36, 0x31, 0x24, 0x23, 0x2a, 0x2d

         }

         -          
                  struct ICVar;
                  class CNetNub;
                  class CNetContext;
                  struct INetworkMember;
                  struct IConsoleCmdArgs;
                  class CNetworkInspector;
                  class CServiceManager;
         
         -
                  #ifdef NET_THREAD_TIMING
                           #define NET_START_THREAD_TIMER() CNetwork::Get()->ThreadTimerStart()
                           #define NET_STOP_THREAD_TIMER() CNetwork::Get()->ThreadTimerStop()
                           #define NET_TICK_THREAD_TIMER() CNetwork::Get()->ThreadTimerTick()
                  #else
                           #define NET_START_THREAD_TIMER()
                           #define NET_STOP_THREAD_TIMER()
                           #define NET_TICK_THREAD_TIMER()
                  #endif

         -

                  struct PerformanceGuard
                  {
                           SNetworkPerformance* m_pCounter;
                           uint64 m_nOldVal;

                           PerformanceGuard(SNetworkPerformance* p, uint64 oldVal)
                           {
                                    m_pCounter = p;
                                    m_nOldVal = oldVal;
                                    p->m_nNetworkSync = CryGetTicks();
                           }

                           ~PerformanceGuard()
                           {
                                    m_pCounter->m_nNetworkSync = CryGetTicks() - m_pCounter->m_nNetworkSync + m_nOldVal;
                           }

                  };


PARTIE NETWORK :

         - GetMemoryStatistics(ICrySizer* pSizer);

         - const char* GetHostName();

         - void SetCDKey(const char* key);

         - SNetGameInfo GetNetGameInfo();

         - CWorkQueue

         - virtual const CNetCVars& GetCVars()

         - bool m_bQuitting;

         - PRINTF_PARAMS :

         - #define NetComment(...)

         - void NetLog(const char* fmt, ...) PRINTF_PARAMS(1, 2); // CryLog
         
         - COUNTER(clientCheckContext);

         - static const int TIMER_HERTZ = 250;

         -