Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maniacs Feature - "Skip Dialogs" from Fatal Mix. #3147

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 54 additions & 3 deletions src/game_interpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4667,13 +4667,64 @@ bool Game_Interpreter::CommandManiacChangePictureId(lcf::rpg::EventCommand const
return true;
}

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

Output::Warning("Maniac Patch: Command SetGameOption not supported");
return true;
int optType = com.parameters[1];

switch (optType) //optType
{
case 0: { // behavior when game's window is inactive.
int whenInactive = ValueOrVariable(com.parameters[0], com.parameters[2]); // pause_game || run_game;

Output::Warning("Maniac Patch - Command SetGameOption: \"Pause When Inactive\" toggle is not supported");
return true;
}
case 1: { // Fatal Mix.
int fps = ValueOrVariable(com.parameters[0], com.parameters[2]); // int FPS
int testPlayToggle = ValueOrVariableBitfield(0, 0, com.parameters[3]); // TestPlay_FromGame || TestPlay_Off || TestPlay_On;
int SkipDialogs = ValueOrVariableBitfield(0, 1, com.parameters[3]); // Rshift_SkipDialogs_Off || Rshift_SkipDialogs_On || SkipDialogs_fromEasyRPG?;

Output::Warning("Maniac Patch - Command SetGameOption: Fatal Mix is not supported");
return true;
}
case 2: { // Pictures Limit.
return true; // <---- EasyRPG has a dynamic limit of maximum pictures on screen, skip it.
}
case 3: { // Skip Frames.
int skipAmount = ValueOrVariable(com.parameters[0], com.parameters[2]); // NoSkip || Skip 1/5 || Skip 1/3 || Skip 1/2

Output::Warning("Maniac Patch - Command SetGameOption: Skipping Frames is not supported");
return true;
}
case 4: { // Mouse - text window Operation, AKA .mouse.disableMsgProcession(n) (IDK what that is)
int value = ValueOrVariable(com.parameters[0], com.parameters[2]); // ???

Output::Warning("Maniac Patch - Command SetGameOption: Mouse's Text Window Operation is not supported");
return true;
}
case 5: { // Battle Screen Display Position
int btlOrigin = ValueOrVariable(com.parameters[0], com.parameters[2]); // center || topLeft || bottomLeft || topRight || bottomRight || top || bottom || Left || right;

Output::Warning("Maniac Patch - Command SetGameOption: Reposition Battle UI is not supported");
return true;
}
case 6: { // Number of Multiple Animation Running at same time (battle animations)?
int AnimAmount = ValueOrVariable(com.parameters[0], com.parameters[2]); // int ammount

Output::Warning("Maniac Patch - Command SetGameOption: Changing the ammount of animations is not supported");
return true;
}
case 7: { // WinFaceSize (IDK what that is)
Output::Warning("Maniac Patch - Command SetGameOption: WinFaceSize is not supported");
return true;
}
default:
return true;
}
}

bool Game_Interpreter::CommandManiacControlStrings(lcf::rpg::EventCommand const& com) {
Expand Down
8 changes: 8 additions & 0 deletions src/window_message.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,14 @@ void Window_Message::UpdateMessage() {
text_index = text_prev;
continue;
}

if (Player::debug_flag && Input::IsPressed(Input::CANCEL)){
line_char_counter = 0;
if (strlen(text_index) < 3 && !pending_message.HasNumberInput() && pending_message.GetNumChoices() <= 0) {
SetWait(5);
FinishMessageProcessing();
}
}
}
}
}
Expand Down
Loading