aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/platform/n64/Makefile12
-rw-r--r--backends/platform/n64/osys_n64.h1
-rw-r--r--backends/platform/n64/osys_n64_base.cpp6
3 files changed, 13 insertions, 6 deletions
diff --git a/backends/platform/n64/Makefile b/backends/platform/n64/Makefile
index dcf95ff0d3..4252cb9668 100644
--- a/backends/platform/n64/Makefile
+++ b/backends/platform/n64/Makefile
@@ -53,12 +53,12 @@ USE_RGB_COLOR=0
ENABLED=STATIC_PLUGIN
-ENABLE_SCUMM=$(ENABLED)
-#ENABLE_SKY=$(ENABLED)
-#ENABLE_SCI=$(ENABLED)
-#ENABLE_GOB=$(ENABLED)
-#ENABLE_PARALLACTION=$(ENABLED)
-#ENABLE_KYRA=$(ENABLED)
+ENABLE_SCUMM = $(ENABLED)
+#ENABLE_SKY = $(ENABLED)
+#ENABLE_SCI = $(ENABLED)
+#ENABLE_GOB = $(ENABLED)
+#ENABLE_PARALLACTION = $(ENABLED)
+#ENABLE_KYRA = $(ENABLED)
#ENABLE_AGOS = $(ENABLED)
#ENABLE_AGI = $(ENABLED)
#ENABLE_QUEEN = $(ENABLED)
diff --git a/backends/platform/n64/osys_n64.h b/backends/platform/n64/osys_n64.h
index 881533fc87..9ca2e05dd4 100644
--- a/backends/platform/n64/osys_n64.h
+++ b/backends/platform/n64/osys_n64.h
@@ -117,6 +117,7 @@ protected:
int _mouseHotspotX, _mouseHotspotY;
controller_data_buttons *_ctrlData; // Controller data read from the N64 serial interface
+ bool _controllerHasRumble;
bool _dirtyOffscreen;
diff --git a/backends/platform/n64/osys_n64_base.cpp b/backends/platform/n64/osys_n64_base.cpp
index 6625607ba8..9479081897 100644
--- a/backends/platform/n64/osys_n64_base.cpp
+++ b/backends/platform/n64/osys_n64_base.cpp
@@ -135,6 +135,7 @@ OSystem_N64::OSystem_N64() {
_dirtyOffscreen = false;
_ctrlData = (controller_data_buttons*)memalign(8, sizeof(controller_data_buttons));
+ _controllerHasRumble = (identifyPak(0) == 2);
_fsFactory = new N64FilesystemFactory();
@@ -602,6 +603,11 @@ void OSystem_N64::unlockScreen() {
}
void OSystem_N64::setShakePos(int shakeOffset) {
+
+ // If a rumble pak is plugged in and screen shakes, rumble!
+ if(shakeOffset && _controllerHasRumble) rumblePakEnable(1, 0);
+ else if(!shakeOffset && _controllerHasRumble) rumblePakEnable(0, 0);
+
_shakeOffset = shakeOffset;
_dirtyOffscreen = true;