diff options
author | Fabio Battaglia | 2010-01-13 13:53:31 +0000 |
---|---|---|
committer | Fabio Battaglia | 2010-01-13 13:53:31 +0000 |
commit | 6c6604d5897f828fb26f2884fa70c596671d30cc (patch) | |
tree | 17080d95a71ee0aca678f400ec28a311dea9aaf8 /backends/platform/n64 | |
parent | 7db58ae29e9503a51ed27979b4959a9170ccd390 (diff) | |
download | scummvm-rg350-6c6604d5897f828fb26f2884fa70c596671d30cc.tar.gz scummvm-rg350-6c6604d5897f828fb26f2884fa70c596671d30cc.tar.bz2 scummvm-rg350-6c6604d5897f828fb26f2884fa70c596671d30cc.zip |
N64: if user has inserted a rumble-pak, rumble with shaking screen
svn-id: r47289
Diffstat (limited to 'backends/platform/n64')
-rw-r--r-- | backends/platform/n64/Makefile | 12 | ||||
-rw-r--r-- | backends/platform/n64/osys_n64.h | 1 | ||||
-rw-r--r-- | backends/platform/n64/osys_n64_base.cpp | 6 |
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; |