OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4ConfigDeveloper Class Reference

#include <C4Config.h>

Public Member Functions

void CompileFunc (StdCompiler *pComp)
 
void AddRecentlyEditedScenario (const char *fn)
 

Public Attributes

int32_t AutoFileReload
 
char TodoFilename [CFG_MaxString+1]
 
char AltTodoFilename [CFG_MaxString+1]
 
int32_t MaxScriptMRU
 
int32_t DebugShapeTextures
 
bool ShowHelp
 
char RecentlyEditedSzenarios [CFG_MaxEditorMRU][CFG_MaxString+1]
 

Detailed Description

Definition at line 81 of file C4Config.h.

Member Function Documentation

void C4ConfigDeveloper::AddRecentlyEditedScenario ( const char *  fn)

Definition at line 100 of file C4Config.cpp.

References CFG_MaxEditorMRU, CFG_MaxString, and RecentlyEditedSzenarios.

Referenced by C4Console::FileNew(), C4Console::FileOpen(), C4Console::FileOpenWPlrs(), and C4Console::FileSaveAs().

101 {
102  if (!fn || !*fn) return;
103  // Put given scenario first in list by moving all other scenarios down
104  // Check how many scenarios to move down the list. Stop moving down when the given scenario is in the list
105  int32_t move_down_num;
106  for (move_down_num = 0; move_down_num < CFG_MaxEditorMRU - 1; ++move_down_num)
107  if (!strncmp(fn, RecentlyEditedSzenarios[move_down_num], CFG_MaxString))
108  break;
109  // Move them down
110  for (int32_t i = move_down_num; i > 0; --i)
112  // Put current scenario in
113  strncpy(RecentlyEditedSzenarios[0], fn, CFG_MaxString);
114 }
char RecentlyEditedSzenarios[CFG_MaxEditorMRU][CFG_MaxString+1]
Definition: C4Config.h:90

Here is the caller graph for this function:

void C4ConfigDeveloper::CompileFunc ( StdCompiler pComp)

Definition at line 88 of file C4Config.cpp.

References AltTodoFilename, AutoFileReload, CFG_MaxEditorMRU, DebugShapeTextures, FormatString(), MaxScriptMRU, mkNamingAdapt(), RecentlyEditedSzenarios, s, ShowHelp, TodoFilename, and StdCompiler::Value().

89 {
90  pComp->Value(mkNamingAdapt(AutoFileReload, "AutoFileReload", 1 , false, true));
91  pComp->Value(mkNamingAdapt(s(TodoFilename), "TodoFilename", "{SCENARIO}/TODO.txt", false, true));
92  pComp->Value(mkNamingAdapt(s(AltTodoFilename), "AltTodoFilename2", "{USERPATH}/TODO.txt", false, true));
93  pComp->Value(mkNamingAdapt(MaxScriptMRU, "MaxScriptMRU", 30 , false, false));
94  pComp->Value(mkNamingAdapt(DebugShapeTextures, "DebugShapeTextures", 0 , false, true));
95  pComp->Value(mkNamingAdapt(ShowHelp, "ShowHelp", true , false, false));
96  for (int32_t i = 0; i < CFG_MaxEditorMRU; ++i)
97  pComp->Value(mkNamingAdapt(s(RecentlyEditedSzenarios[i]), FormatString("EditorMRU%02d", (int)i).getData(), "", false, false));
98 }
int32_t DebugShapeTextures
Definition: C4Config.h:88
StdNamingAdapt< T > mkNamingAdapt(T &&rValue, const char *szName)
Definition: StdAdaptors.h:93
char TodoFilename[CFG_MaxString+1]
Definition: C4Config.h:85
int32_t AutoFileReload
Definition: C4Config.h:84
int32_t MaxScriptMRU
Definition: C4Config.h:87
void Value(const T &rStruct)
Definition: StdCompiler.h:170
char RecentlyEditedSzenarios[CFG_MaxEditorMRU][CFG_MaxString+1]
Definition: C4Config.h:90
char AltTodoFilename[CFG_MaxString+1]
Definition: C4Config.h:86
#define s
StdStrBuf FormatString(const char *szFmt,...)
Definition: StdBuf.cpp:277

Here is the call graph for this function:

Member Data Documentation

char C4ConfigDeveloper::AltTodoFilename[CFG_MaxString+1]

Definition at line 86 of file C4Config.h.

Referenced by CompileFunc(), and C4MessageInput::ProcessCommand().

int32_t C4ConfigDeveloper::AutoFileReload

Definition at line 84 of file C4Config.h.

Referenced by CompileFunc(), and C4Game::InitGame().

int32_t C4ConfigDeveloper::DebugShapeTextures

Definition at line 88 of file C4Config.h.

Referenced by CompileFunc(), and C4TextureShape::Load().

int32_t C4ConfigDeveloper::MaxScriptMRU

Definition at line 87 of file C4Config.h.

Referenced by CompileFunc(), and C4Console::RegisterRecentInput().

char C4ConfigDeveloper::RecentlyEditedSzenarios[CFG_MaxEditorMRU][CFG_MaxString+1]

Definition at line 90 of file C4Config.h.

Referenced by AddRecentlyEditedScenario(), and CompileFunc().

bool C4ConfigDeveloper::ShowHelp

Definition at line 89 of file C4Config.h.

Referenced by CompileFunc().

char C4ConfigDeveloper::TodoFilename[CFG_MaxString+1]

Definition at line 85 of file C4Config.h.

Referenced by CompileFunc(), and C4MessageInput::ProcessCommand().


The documentation for this class was generated from the following files: