Skip to content

Commit 91871fd

Browse files
committed
Organizing Maniac's SetGameOption
That will help me seeing how to implement the alternative skip dialogs. Update game_interpreter.cpp
1 parent e2527f0 commit 91871fd

File tree

1 file changed

+54
-3
lines changed

1 file changed

+54
-3
lines changed

Diff for: src/game_interpreter.cpp

+54-3
Original file line numberDiff line numberDiff line change
@@ -4667,13 +4667,64 @@ bool Game_Interpreter::CommandManiacChangePictureId(lcf::rpg::EventCommand const
46674667
return true;
46684668
}
46694669

4670-
bool Game_Interpreter::CommandManiacSetGameOption(lcf::rpg::EventCommand const&) {
4670+
bool Game_Interpreter::CommandManiacSetGameOption(lcf::rpg::EventCommand const& com) {
4671+
// #ManiacSetGameOption, "",[optIsVar, optType, opt, bitshift(moreOpt)]
46714672
if (!Player::IsPatchManiac()) {
46724673
return true;
46734674
}
46744675

4675-
Output::Warning("Maniac Patch: Command SetGameOption not supported");
4676-
return true;
4676+
int optType = com.parameters[1];
4677+
4678+
switch (optType) //optType
4679+
{
4680+
case 0: { // behavior when game's window is inactive.
4681+
int whenInactive = ValueOrVariable(com.parameters[0], com.parameters[2]); // pause_game || run_game;
4682+
4683+
Output::Warning("Maniac Patch - Command SetGameOption: \"Pause When Inactive\" toggle is not supported");
4684+
return true;
4685+
}
4686+
case 1: { // Fatal Mix.
4687+
int fps = ValueOrVariable(com.parameters[0], com.parameters[2]); // int FPS
4688+
int testPlayToggle = ValueOrVariableBitfield(0, 0, com.parameters[3]); // TestPlay_FromGame || TestPlay_Off || TestPlay_On;
4689+
int SkipDialogs = ValueOrVariableBitfield(0, 1, com.parameters[3]); // Rshift_SkipDialogs_Off || Rshift_SkipDialogs_On || SkipDialogs_fromEasyRPG?;
4690+
4691+
Output::Warning("Maniac Patch - Command SetGameOption: Fatal Mix is not supported");
4692+
return true;
4693+
}
4694+
case 2: { // Pictures Limit.
4695+
return true; // <---- EasyRPG has a dynamic limit of maximum pictures on screen, skip it.
4696+
}
4697+
case 3: { // Skip Frames.
4698+
int skipAmount = ValueOrVariable(com.parameters[0], com.parameters[2]); // NoSkip || Skip 1/5 || Skip 1/3 || Skip 1/2
4699+
4700+
Output::Warning("Maniac Patch - Command SetGameOption: Skipping Frames is not supported");
4701+
return true;
4702+
}
4703+
case 4: { // Mouse - text window Operation, AKA .mouse.disableMsgProcession(n) (IDK what that is)
4704+
int value = ValueOrVariable(com.parameters[0], com.parameters[2]); // ???
4705+
4706+
Output::Warning("Maniac Patch - Command SetGameOption: Mouse's Text Window Operation is not supported");
4707+
return true;
4708+
}
4709+
case 5: { // Battle Screen Display Position
4710+
int btlOrigin = ValueOrVariable(com.parameters[0], com.parameters[2]); // center || topLeft || bottomLeft || topRight || bottomRight || top || bottom || Left || right;
4711+
4712+
Output::Warning("Maniac Patch - Command SetGameOption: Reposition Battle UI is not supported");
4713+
return true;
4714+
}
4715+
case 6: { // Number of Multiple Animation Running at same time (battle animations)?
4716+
int AnimAmount = ValueOrVariable(com.parameters[0], com.parameters[2]); // int ammount
4717+
4718+
Output::Warning("Maniac Patch - Command SetGameOption: Changing the ammount of animations is not supported");
4719+
return true;
4720+
}
4721+
case 7: { // WinFaceSize (IDK what that is)
4722+
Output::Warning("Maniac Patch - Command SetGameOption: WinFaceSize is not supported");
4723+
return true;
4724+
}
4725+
default:
4726+
return true;
4727+
}
46774728
}
46784729

46794730
bool Game_Interpreter::CommandManiacControlStrings(lcf::rpg::EventCommand const& com) {

0 commit comments

Comments
 (0)