Skip to content

Commit

Permalink
TT item boxes toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
Cotni committed Aug 17, 2024
1 parent 307f23a commit 0e6326c
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 1 deletion.
Binary file modified build/Code.pul
Binary file not shown.
12 changes: 11 additions & 1 deletion code/CTTP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <PulsarEngine/Ghost/UI/GhostUI.hpp>
#include <PulsarEngine/UI/UI.hpp>
#include <PulsarEngine/IO/IO.hpp>
#include <MarioKartWii/Objects/ObjectsMgr.hpp>

namespace CTTP {
Pulsar::System::Inherit CTTPCreate(System::Create);
Expand All @@ -29,11 +30,12 @@ void System::AfterInit() {

Pulsar::UI::SettingsPanel::pageCount++;

Pulsar::UI::SettingsPanel::radioButtonCount[SETTINGSTYPE_DEBUG] = 4; //debug, perf mon, item cheats, block emu
Pulsar::UI::SettingsPanel::radioButtonCount[SETTINGSTYPE_DEBUG] = 5; //debug, perf mon, item cheats, block emu, tt boxes
Pulsar::UI::SettingsPanel::buttonsPerPagePerRow[SETTINGSTYPE_DEBUG][0] = 4; //disabled, full, light, offroad
Pulsar::UI::SettingsPanel::buttonsPerPagePerRow[SETTINGSTYPE_DEBUG][1] = 2;
Pulsar::UI::SettingsPanel::buttonsPerPagePerRow[SETTINGSTYPE_DEBUG][2] = 2;
Pulsar::UI::SettingsPanel::buttonsPerPagePerRow[SETTINGSTYPE_DEBUG][3] = 2;
Pulsar::UI::SettingsPanel::buttonsPerPagePerRow[SETTINGSTYPE_DEBUG][4] = 2;

Pulsar::UI::SettingsPanel::scrollerCount[SETTINGSTYPE_DEBUG] = 1;
Pulsar::UI::SettingsPanel::optionsPerPagePerScroller[SETTINGSTYPE_DEBUG][0] = 4;
Expand Down Expand Up @@ -89,5 +91,13 @@ void System::CheckGhostCheatStatus(const RKG& decompressed, Pulsar::Ghosts::Mana

}

ObjectsMgr* TTBoxes(ObjectsMgr* objectsMgr) {
if (Pulsar::Settings::Mgr::GetSettingValue(static_cast<Pulsar::Settings::Type>(SETTINGSTYPE_DEBUG), SETTINGDEBUG_RADIO_TTBOXES) == DEBUGSETTING_TTBOXES_ENABLED) {
objectsMgr->isTT = false;
}
return objectsMgr;
}
kmBranch(0x8082a650, TTBoxes);


}//namespace CTTP
6 changes: 6 additions & 0 deletions code/CTTP.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ enum DebugSettings {
SETTINGDEBUG_RADIO_PERFMON = 1,
SETTINGDEBUG_RADIO_ITEMCHEATS = 2,
SETTINGDEBUG_RADIO_BLOCK_EMU = 3,
SETTINGDEBUG_RADIO_TTBOXES = 4,

SETTINGDEBUG_SCROLL_KMP = 0 + 6,
};
Expand Down Expand Up @@ -85,6 +86,11 @@ enum DebugSettingsBLOCK_EMU {
DEBUGSETTING_EMU_ALLOWED = 0x1,
};

enum DebugSettingsTTBOXES {
DEBUGSETTING_TTBOXES_ENABLED = 0x0,
DEBUGSETTING_TTBOXES_DISABLED = 0x1
};

enum DebugSettingKMP {
DEBUGSETTING_KMP_DISABLED = 0x0,
DEBUGSETTING_KMP_ALLCPS = 0x1,
Expand Down
Binary file modified resources/Common.bmg
Binary file not shown.
5 changes: 5 additions & 0 deletions resources/Common.txt
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,11 @@
6041 = Yes
6400 = Dolphin users will be blocked from joining your friend rooms.
6401 = Dolphin users will be allowed to join your friend rooms.
6004 = Item Boxes in TTs
6050 = Enabled
6051 = Disabled
6500 = Item boxes will be visible in Time Trials.
6501 = Item boxes will not be visible in Time Trials.
6700 = KMP Info (offline)
6710 = Disabled
6711 = All Checkpoints
Expand Down
Binary file modified resources/UIAssets.szs
Binary file not shown.

0 comments on commit 0e6326c

Please sign in to comment.