Skip to content

Commit abba49e

Browse files
committed
TOBEREMOVED: Added some testing code for the "RuntimeFlags" feature
1 parent 14de44b commit abba49e

3 files changed

Lines changed: 25 additions & 0 deletions

File tree

src/game_config_game.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ void Game_ConfigGame::LoadFromArgs(CmdlineParser& cp) {
8181
if (cp.ParseNext(arg, 0, "--no-patch")) {
8282
patch_support.Set(false);
8383
patch_dynrpg.Lock(false);
84+
patch_destiny.Lock(false);
8485
patch_maniac.Lock(false);
8586
patch_unlock_pics.Lock(false);
8687
patch_common_this_event.Lock(false);
@@ -101,6 +102,11 @@ void Game_ConfigGame::LoadFromArgs(CmdlineParser& cp) {
101102
patch_override = true;
102103
continue;
103104
}
105+
if (cp.ParseNext(arg, 0, {"--patch-destiny", "--no-patch-destiny"})) {
106+
patch_destiny.Set(arg.ArgIsOn());
107+
patch_override = true;
108+
continue;
109+
}
104110
if (cp.ParseNext(arg, 1, {"--patch-maniac", "--no-patch-maniac"})) {
105111
patch_maniac.Set(arg.ArgIsOn());
106112

@@ -202,6 +208,10 @@ void Game_ConfigGame::LoadFromStream(Filesystem_Stream::InputStream& is) {
202208
patch_override = true;
203209
}
204210

211+
if (patch_destiny.FromIni(ini)) {
212+
patch_override = true;
213+
}
214+
205215
if (patch_maniac.FromIni(ini)) {
206216
patch_override = true;
207217
}

src/game_destiny.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,15 @@ bool Game_Destiny::Main(SaveEventExecFrame& frame)
156156
const char* script;
157157
InterpretFlag flag;
158158

159+
160+
//TOBEREMOVED:
161+
if (StartsWith(frame.commands[frame.current_command].string, "$output ")) {
162+
auto msg = ToString(frame.commands[frame.current_command].string).substr(8);
163+
Output::InfoStr(msg);
164+
return true;
165+
}
166+
//
167+
159168
script = _interpreter.MakeString(frame);
160169
flag = InterpretFlag::IF_EXIT;
161170

src/game_interpreter.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2039,6 +2039,12 @@ std::optional<bool> Game_Interpreter::HandleDynRpgScript(const lcf::rpg::EventCo
20392039

20402040
std::string command = ToString(com.string);
20412041

2042+
//TOBEREMOVED:
2043+
if (StartsWith(command, "@test_output")) {
2044+
command = std::string("@easyrpg_output") + command.substr(12);
2045+
}
2046+
//
2047+
20422048
// Concat everything that is not another command or a new comment block
20432049
for (size_t i = index + 1; i < list.size(); ++i) {
20442050
const auto& cmd = list[i];

0 commit comments

Comments
 (0)