Skip to content

Commit

Permalink
Adding rumble functions
Browse files Browse the repository at this point in the history
  • Loading branch information
vitor251093 committed Feb 7, 2025
1 parent 7d41c21 commit 21b0b1a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/plugins/Plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ class Plugin
virtual bool overrideMouseTouchCoords(int width, int height, int& x, int& y, bool& touching) {return false;}
void _superApplyTouchKeyMaskToTouchControls(u16* touchX, u16* touchY, bool* isTouching, u32 TouchKeyMask, u16 sensitivity, bool resetOnEdge);
virtual void applyTouchKeyMaskToTouchControls(u16* touchX, u16* touchY, bool* isTouching, u32 TouchKeyMask);
virtual bool shouldRumble() {return false;}

bool shouldExportTextures() {
return ExportTextures;
Expand Down
4 changes: 4 additions & 0 deletions src/plugins/PluginKingdomHeartsDays.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,10 @@ void PluginKingdomHeartsDays::applyTouchKeyMaskToTouchControls(u16* touchX, u16*
}
}

bool PluginKingdomHeartsDays::shouldRumble() {
return nds->ARM7Read8(getU32ByCart(SHOULD_RUMBLE_ADDRESS_US, SHOULD_RUMBLE_ADDRESS_EU, SHOULD_RUMBLE_ADDRESS_JP, SHOULD_RUMBLE_ADDRESS_JP_REV1)) == 0x01;
}

void PluginKingdomHeartsDays::hudToggle()
{
HUDState = (HUDState + 1) % 4;
Expand Down
1 change: 1 addition & 0 deletions src/plugins/PluginKingdomHeartsDays.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class PluginKingdomHeartsDays : public Plugin

void applyHotkeyToInputMaskOrTouchControls(u32* InputMask, u16* touchX, u16* touchY, bool* isTouching, u32* HotkeyMask, u32* HotkeyPress);
void applyAddonKeysToInputMaskOrTouchControls(u32* InputMask, u16* touchX, u16* touchY, bool* isTouching, u32* HotkeyMask, u32* HotkeyPress);
bool shouldRumble();

bool overrideMouseTouchCoords_cameraControl(int width, int height, int& x, int& y, bool& touching);
bool overrideMouseTouchCoords_singleScreen(int width, int height, int& x, int& y, bool& touching);
Expand Down

0 comments on commit 21b0b1a

Please sign in to comment.