diff --git a/Data/Sys/GameSettings/GP7E01.ini b/Data/Sys/GameSettings/GP7E01.ini index 4c6b1cae11..d11f5e8a92 100644 --- a/Data/Sys/GameSettings/GP7E01.ini +++ b/Data/Sys/GameSettings/GP7E01.ini @@ -1454,24 +1454,6 @@ $Mechanics - Slow Shroom Orb Rolls 1-5 [gamemasterplc] 0418d1ac 40820020 *Orb is more balanced. -$Mechanics - Stars are Free [gamemasterplc] -04188774 3b800000 -0418876c 3b800000 -204ed598 40800030 -044ed598 48000030 -044ed754 38800000 -e2000001 80008000 -204f62c0 38030001 -044f62c4 38000000 -044f690c 38600000 -e2000001 80008000 -*Stars cost nothing instead of the usual 20 coins. - -$Mechanics - Stars Cost 40 Coins [Ralf] -0418876c 3b800014 -04188774 3b800028 -*Only works in Grand Canal and Bowser's Enchanted Inferno - $Mechanics - Use Multiple Orbs in the Same Turn [Ralf] 041E3764 3860FFFF *Does not work with CPUs diff --git a/Data/Sys/Themes/Mario Party Netplay/modifications.png b/Data/Sys/Themes/Mario Party Netplay/modifications.png new file mode 100644 index 0000000000..a30511cd39 Binary files /dev/null and b/Data/Sys/Themes/Mario Party Netplay/modifications.png differ diff --git a/Data/Sys/Themes/Mario Party Netplay/modifications@2x.png b/Data/Sys/Themes/Mario Party Netplay/modifications@2x.png new file mode 100644 index 0000000000..bee5a597c2 Binary files /dev/null and b/Data/Sys/Themes/Mario Party Netplay/modifications@2x.png differ diff --git a/Data/User/GameSettings/GMPE01.ini b/Data/User/GameSettings/GMPE01.ini index 12fce41924..15f1ebf341 100644 --- a/Data/User/GameSettings/GMPE01.ini +++ b/Data/User/GameSettings/GMPE01.ini @@ -1,10 +1,10 @@ [Gecko_Enabled] $!!! - README $QOL - Allow Digital Presses for Map Screen +$QOL - CPUs can use Bowser Suit and Item Bags $QOL - Faster Boot Time $QOL - Increased Board Speed $QOL - Increased Taunt Capabilities $QOL - Instant Text Display -$QOL - Rumble Always Off $QOL - Show Controller Port Number of Who Paused $QOL - Unlock Everything diff --git a/Data/User/GameSettings/GP7E01.ini b/Data/User/GameSettings/GP7E01.ini index 3ef1dafad6..d513811538 100644 --- a/Data/User/GameSettings/GP7E01.ini +++ b/Data/User/GameSettings/GP7E01.ini @@ -1,5 +1,5 @@ [Gecko_Enabled] -$QOL - Controller Options Always Acesssible +$QOL - Controller Options Always Accessible $QOL - Faster Boot Time $QOL - Increased Board Speed $QOL - Increased Orb Throwing Speed diff --git a/Source/Core/DolphinQt/Config/GeckoCodeWidget.cpp b/Source/Core/DolphinQt/Config/GeckoCodeWidget.cpp index d87162214d..5ec4c977c9 100644 --- a/Source/Core/DolphinQt/Config/GeckoCodeWidget.cpp +++ b/Source/Core/DolphinQt/Config/GeckoCodeWidget.cpp @@ -89,9 +89,6 @@ void GeckoCodeWidget::CreateWidgets() m_add_code = new NonDefaultQPushButton(tr("&Add New Code...")); m_edit_code = new NonDefaultQPushButton(tr("&Edit Code...")); m_remove_code = new NonDefaultQPushButton(tr("&Remove Code")); - m_download_codes = new NonDefaultQPushButton(tr("Download Codes")); - - m_download_codes->setToolTip(tr("Download Codes from the WiiRD Database")); m_code_list->setEnabled(!m_game_id.empty()); m_name_label->setEnabled(!m_game_id.empty()); @@ -102,7 +99,6 @@ void GeckoCodeWidget::CreateWidgets() m_add_code->setEnabled(!m_game_id.empty()); m_edit_code->setEnabled(false); m_remove_code->setEnabled(false); - m_download_codes->setEnabled(!m_game_id.empty()); auto* layout = new QVBoxLayout; @@ -135,7 +131,6 @@ void GeckoCodeWidget::CreateWidgets() btn_layout->addWidget(m_add_code); btn_layout->addWidget(m_edit_code); btn_layout->addWidget(m_remove_code); - btn_layout->addWidget(m_download_codes); layout->addLayout(btn_layout); @@ -155,7 +150,6 @@ void GeckoCodeWidget::ConnectWidgets() connect(m_add_code, &QPushButton::clicked, this, &GeckoCodeWidget::AddCode); connect(m_remove_code, &QPushButton::clicked, this, &GeckoCodeWidget::RemoveCode); connect(m_edit_code, &QPushButton::clicked, this, &GeckoCodeWidget::EditCode); - connect(m_download_codes, &QPushButton::clicked, this, &GeckoCodeWidget::DownloadCodes); connect(m_warning, &CheatWarningWidget::OpenCheatEnableSettings, this, &GeckoCodeWidget::OpenGeneralSettings); #ifdef USE_RETRO_ACHIEVEMENTS @@ -346,43 +340,3 @@ void GeckoCodeWidget::UpdateList() m_code_list->setDragDropMode(QAbstractItemView::InternalMove); } - -void GeckoCodeWidget::DownloadCodes() -{ - bool success; - - std::vector codes = Gecko::DownloadCodes(m_gametdb_id, &success); - - if (!success) - { - ModalMessageBox::critical(this, tr("Error"), tr("Failed to download codes.")); - return; - } - - if (codes.empty()) - { - ModalMessageBox::critical(this, tr("Error"), tr("File contained no codes.")); - return; - } - - size_t added_count = 0; - - for (const auto& code : codes) - { - auto it = std::find(m_gecko_codes.begin(), m_gecko_codes.end(), code); - - if (it == m_gecko_codes.end()) - { - m_gecko_codes.push_back(code); - added_count++; - } - } - - UpdateList(); - SaveCodes(); - - ModalMessageBox::information( - this, tr("Download complete"), - tr("Downloaded %1 codes. (added %2)") - .arg(QString::number(codes.size()), QString::number(added_count))); -} diff --git a/Source/Core/DolphinQt/Config/PropertiesDialog.cpp b/Source/Core/DolphinQt/Config/PropertiesDialog.cpp index 404f34eb03..bdd718f2f5 100644 --- a/Source/Core/DolphinQt/Config/PropertiesDialog.cpp +++ b/Source/Core/DolphinQt/Config/PropertiesDialog.cpp @@ -63,8 +63,8 @@ PropertiesDialog::PropertiesDialog(QWidget* parent, const UICommon::GameFile& ga connect(graphics_mod_list, &GraphicsModListWidget::OpenGraphicsSettings, this, &PropertiesDialog::OpenGraphicsSettings); - const int padding_width = 120; - const int padding_height = 100; + const int padding_width = 600; + const int padding_height = 1100; tab_widget->addTab(GetWrappedWidget(game_config, this, padding_width, padding_height), tr("Game Config")); tab_widget->addTab(GetWrappedWidget(patches, this, padding_width, padding_height), tr("Patches")); @@ -106,3 +106,50 @@ PropertiesDialog::PropertiesDialog(QWidget* parent, const UICommon::GameFile& ga setLayout(layout); tab_widget->setCurrentIndex(3); } + +GeckoDialog::GeckoDialog(QWidget* parent) : QDialog(parent) +{ + setWindowTitle(QStringLiteral("%1").arg(QString::fromStdString("Modifications"))); + setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); + + QVBoxLayout* layout = new QVBoxLayout(); + QTabWidget* tab_widget = new QTabWidget(this); + GeckoCodeWidget* mp4_gecko = new GeckoCodeWidget("GMPE01", "GMPE01", 0); + GeckoCodeWidget* mp5_gecko = new GeckoCodeWidget("GP5E01", "GP5E01", 0); + GeckoCodeWidget* mp6_gecko = new GeckoCodeWidget("GP6E01", "GP6E01", 0); + GeckoCodeWidget* mp7_gecko = new GeckoCodeWidget("GP7E01", "GP7E01", 0); + GeckoCodeWidget* mp8_gecko = new GeckoCodeWidget("RM8E01", "RM8E01", 0); + + connect(mp4_gecko, &GeckoCodeWidget::OpenGeneralSettings, this, + &GeckoDialog::OpenGeneralSettings); + connect(mp5_gecko, &GeckoCodeWidget::OpenGeneralSettings, this, + &GeckoDialog::OpenGeneralSettings); + connect(mp6_gecko, &GeckoCodeWidget::OpenGeneralSettings, this, + &GeckoDialog::OpenGeneralSettings); + connect(mp7_gecko, &GeckoCodeWidget::OpenGeneralSettings, this, + &GeckoDialog::OpenGeneralSettings); + connect(mp8_gecko, &GeckoCodeWidget::OpenGeneralSettings, this, + &GeckoDialog::OpenGeneralSettings); + + const int padding_width = 600; + const int padding_height = 1100; + + tab_widget->addTab(GetWrappedWidget(mp4_gecko, this, padding_width, padding_height), + tr("Mario Party 4")); + tab_widget->addTab(GetWrappedWidget(mp5_gecko, this, padding_width, padding_height), + tr("Mario Party 5")); + tab_widget->addTab(GetWrappedWidget(mp6_gecko, this, padding_width, padding_height), + tr("Mario Party 6")); + tab_widget->addTab(GetWrappedWidget(mp7_gecko, this, padding_width, padding_height), + tr("Mario Party 7")); + tab_widget->addTab(GetWrappedWidget(mp8_gecko, this, padding_width, padding_height), + tr("Mario Party 8")); + + layout->addWidget(tab_widget); + + QDialogButtonBox* close_box = new QDialogButtonBox(QDialogButtonBox::Close); + connect(close_box, &QDialogButtonBox::rejected, this, &QDialog::reject); + + layout->addWidget(close_box); + setLayout(layout); +} diff --git a/Source/Core/DolphinQt/Config/PropertiesDialog.h b/Source/Core/DolphinQt/Config/PropertiesDialog.h index 29d282a6e8..b45472a0b9 100644 --- a/Source/Core/DolphinQt/Config/PropertiesDialog.h +++ b/Source/Core/DolphinQt/Config/PropertiesDialog.h @@ -23,3 +23,13 @@ signals: void OpenAchievementSettings(); #endif // USE_RETRO_ACHIEVEMENTS }; + +class GeckoDialog final : public QDialog +{ + Q_OBJECT +public: + explicit GeckoDialog(QWidget* parent); + +signals: + void OpenGeneralSettings(); +}; diff --git a/Source/Core/DolphinQt/MainWindow.cpp b/Source/Core/DolphinQt/MainWindow.cpp index 2667e893d5..341d042e55 100644 --- a/Source/Core/DolphinQt/MainWindow.cpp +++ b/Source/Core/DolphinQt/MainWindow.cpp @@ -67,7 +67,7 @@ #include "Core/State.h" #include "Core/System.h" #include "Core/WiiUtils.h" - +#include "PropertiesDialog.h" #include "DiscIO/DirectoryBlob.h" #include "DiscIO/NANDImporter.h" #include "DiscIO/RiivolutionPatcher.h" @@ -699,7 +699,7 @@ void MainWindow::ConnectToolBar() connect(m_tool_bar, &ToolBar::GraphicsPressed, this, &MainWindow::ShowGraphicsWindow); connect(m_tool_bar, &ToolBar::StartNetPlayPressed, this, &MainWindow::ShowNetPlaySetupDialog); - + connect(m_tool_bar, &ToolBar::ViewGeckoCodes, this, &MainWindow::ShowGeckoCodes); connect(m_tool_bar, &ToolBar::StepPressed, m_code_widget, &CodeWidget::Step); connect(m_tool_bar, &ToolBar::StepOverPressed, m_code_widget, &CodeWidget::StepOver); connect(m_tool_bar, &ToolBar::StepOutPressed, m_code_widget, &CodeWidget::StepOut); @@ -2192,3 +2192,16 @@ void MainWindow::ShowRiivolutionBootWidget(const UICommon::GameFile& game) AddRiivolutionPatches(boot_params.get(), std::move(w.GetPatches())); StartGame(std::move(boot_params)); } + +void MainWindow::ShowGeckoCodes() +{ + if (!m_gecko_dialog) + { + m_gecko_dialog = new GeckoDialog(this); + InstallHotkeyFilter(m_gecko_dialog); + } + + m_gecko_dialog->show(); + m_gecko_dialog->raise(); + m_gecko_dialog->activateWindow(); +} diff --git a/Source/Core/DolphinQt/MainWindow.h b/Source/Core/DolphinQt/MainWindow.h index 84cdae2f91..101b699b08 100644 --- a/Source/Core/DolphinQt/MainWindow.h +++ b/Source/Core/DolphinQt/MainWindow.h @@ -31,6 +31,7 @@ class FreeLookWindow; class GameList; class GBATASInputWindow; class GCTASInputWindow; +class GeckoDialog; class GraphicsWindow; class HotkeyScheduler; class InfinityBaseWindow; @@ -213,6 +214,7 @@ private: void dragEnterEvent(QDragEnterEvent* event) override; void dropEvent(QDropEvent* event) override; QSize sizeHint() const override; + void ShowGeckoCodes(); #ifdef _WIN32 // This gets called for each event from the Windows message queue. @@ -237,7 +239,7 @@ private: bool m_is_screensaver_inhibited = false; u32 m_state_slot = 1; std::unique_ptr m_pending_boot; - + GeckoDialog* m_gecko_dialog = nullptr; ControllersWindow* m_controllers_window = nullptr; SettingsWindow* m_settings_window = nullptr; GraphicsWindow* m_graphics_window = nullptr; @@ -246,7 +248,6 @@ private: InfinityBaseWindow* m_infinity_window = nullptr; MappingWindow* m_hotkey_window = nullptr; FreeLookWindow* m_freelook_window = nullptr; - HotkeyScheduler* m_hotkey_scheduler; NetPlayDialog* m_netplay_dialog; DiscordHandler* m_netplay_discord; diff --git a/Source/Core/DolphinQt/NetPlay/NetPlayBrowser.cpp b/Source/Core/DolphinQt/NetPlay/NetPlayBrowser.cpp index e50f22ad26..67454e9c9e 100644 --- a/Source/Core/DolphinQt/NetPlay/NetPlayBrowser.cpp +++ b/Source/Core/DolphinQt/NetPlay/NetPlayBrowser.cpp @@ -105,7 +105,7 @@ void NetPlayBrowser::Refresh() std::map filters; if (m_check_hide_incompatible->isChecked()) - filters["version"] = Common::GetScmDescStr(); + filters["version"] = "MPN"; if (!m_edit_name->text().isEmpty()) filters["name"] = m_edit_name->text().toStdString(); diff --git a/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp b/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp index 6a02f5c8e2..bbdad9aa25 100644 --- a/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp +++ b/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp @@ -264,7 +264,7 @@ void NetPlayDialog::CreateMainLayout() m_main_layout->addLayout(options_widget, 2, 0, 1, -1, Qt::AlignRight); m_main_layout->setRowStretch(1, 1000); - + m_buffer_size_box->setFixedSize(100, 20); setLayout(m_main_layout); } @@ -1297,4 +1297,4 @@ void NetPlayDialog::OnActiveGeckoCodes(std::string codeStr) void NetPlayDialog::OnActiveARCodes(std::string codeStr) { DisplayMessage(QString::fromStdString(codeStr), "cornflowerblue"); -} \ No newline at end of file +} diff --git a/Source/Core/DolphinQt/NetPlay/NetPlaySetupDialog.cpp b/Source/Core/DolphinQt/NetPlay/NetPlaySetupDialog.cpp index 9228573155..ea842a8295 100644 --- a/Source/Core/DolphinQt/NetPlay/NetPlaySetupDialog.cpp +++ b/Source/Core/DolphinQt/NetPlay/NetPlaySetupDialog.cpp @@ -371,7 +371,7 @@ void NetPlaySetupDialog::show() m_host_server_name->setText(QString::fromStdString(nickname)); } m_connection_type->setCurrentIndex(1); - m_tab_widget->setCurrentIndex(2); // start on browser + m_tab_widget->setCurrentIndex(2); PopulateGameList(); QDialog::show(); @@ -444,7 +444,7 @@ void NetPlaySetupDialog::RefreshBrowser() filters["name"] = m_edit_name->text().toStdString(); if (true) - filters["version"] = Common::GetScmDescStr(); + filters["version"] = "MPN"; if (!m_radio_all->isChecked()) filters["password"] = std::to_string(m_radio_private->isChecked()); diff --git a/Source/Core/DolphinQt/ToolBar.cpp b/Source/Core/DolphinQt/ToolBar.cpp index 53131b232d..284fc490da 100644 --- a/Source/Core/DolphinQt/ToolBar.cpp +++ b/Source/Core/DolphinQt/ToolBar.cpp @@ -133,7 +133,7 @@ void ToolBar::MakeActions() m_config_action = addAction(tr("Config"), this, &ToolBar::SettingsPressed); m_graphics_action = addAction(tr("Graphics"), this, &ToolBar::GraphicsPressed); m_controllers_action = addAction(tr("Controllers"), this, &ToolBar::ControllersPressed); - + m_view_gecko_codes_action = addAction(tr("Modifications"), this, &ToolBar::ViewGeckoCodes); // Ensure every button has about the same width std::vector items; for (const auto& action : @@ -196,6 +196,7 @@ void ToolBar::UpdateIcons() m_screenshot_action->setIcon(Resources::GetThemeIcon("screenshot")); m_config_action->setIcon(Resources::GetThemeIcon("config")); m_controllers_action->setIcon(Resources::GetThemeIcon("classic")); + m_view_gecko_codes_action->setIcon(Resources::GetThemeIcon("modifications")); m_graphics_action->setIcon(Resources::GetThemeIcon("graphics")); m_start_netplay_action->setIcon(Resources::GetThemeIcon("wifi")); } diff --git a/Source/Core/DolphinQt/ToolBar.h b/Source/Core/DolphinQt/ToolBar.h index 8aa3fa73c4..efec279190 100644 --- a/Source/Core/DolphinQt/ToolBar.h +++ b/Source/Core/DolphinQt/ToolBar.h @@ -34,7 +34,7 @@ signals: void GraphicsPressed(); void StartNetPlayPressed(); - + void ViewGeckoCodes(); void StepPressed(); void StepOverPressed(); void StepOutPressed(); @@ -59,9 +59,10 @@ private: QAction* m_config_action; QAction* m_controllers_action; QAction* m_graphics_action; - QAction* m_start_netplay_action; + QAction* m_view_gecko_codes_action; + QAction* m_step_action; QAction* m_step_over_action; QAction* m_step_out_action; diff --git a/Source/Core/UICommon/NetPlayIndex.cpp b/Source/Core/UICommon/NetPlayIndex.cpp index aaaa4549a8..406bca310e 100644 --- a/Source/Core/UICommon/NetPlayIndex.cpp +++ b/Source/Core/UICommon/NetPlayIndex.cpp @@ -95,12 +95,10 @@ NetPlayIndex::List(const std::map& filters) const auto& player_count = entry.get("player_count"); const auto& port = entry.get("port"); const auto& in_game = entry.get("in_game"); - const auto& version = entry.get("version"); if (!name.is() || !region.is() || !method.is() || !server_id.is() || !game_id.is() || !has_password.is() || - !player_count.is() || !port.is() || !in_game.is() || - !version.is()) + !player_count.is() || !port.is() || !in_game.is()) { continue; } @@ -111,7 +109,7 @@ NetPlayIndex::List(const std::map& filters) session.game_id = game_id.to_str(); session.server_id = server_id.to_str(); session.method = method.to_str(); - session.version = version.to_str(); + session.version = "MPN"; session.has_password = has_password.get(); session.player_count = static_cast(player_count.get()); session.port = static_cast(port.get()); @@ -169,8 +167,8 @@ bool NetPlayIndex::Add(const NetPlaySession& session) "&game=" + request.EscapeComponent(session.game_id) + "&password=" + std::to_string(session.has_password) + "&method=" + session.method + "&server_id=" + session.server_id + "&in_game=" + std::to_string(session.in_game) + - "&port=" + std::to_string(session.port) + "&player_count=" + - std::to_string(session.player_count) + "&version=" + Common::GetScmDescStr(), + "&port=" + std::to_string(session.port) + "&player_count=" + std::to_string(session.player_count) + + "&version=MPN", {{"X-Is-Dolphin", "1"}}, Common::HttpRequest::AllowedReturnCodes::All); if (!response.has_value())