[Scummvm-cvs-logs] SF.net SVN: scummvm:[47289] scummvm/trunk/backends/platform/n64

Hkz at users.sourceforge.net Hkz at users.sourceforge.net
Wed Jan 13 14:53:32 CET 2010


Revision: 47289
          http://scummvm.svn.sourceforge.net/scummvm/?rev=47289&view=rev
Author:   Hkz
Date:     2010-01-13 13:53:31 +0000 (Wed, 13 Jan 2010)

Log Message:
-----------
N64: if user has inserted a rumble-pak, rumble with shaking screen

Modified Paths:
--------------
    scummvm/trunk/backends/platform/n64/Makefile
    scummvm/trunk/backends/platform/n64/osys_n64.h
    scummvm/trunk/backends/platform/n64/osys_n64_base.cpp

Modified: scummvm/trunk/backends/platform/n64/Makefile
===================================================================
--- scummvm/trunk/backends/platform/n64/Makefile	2010-01-13 11:14:04 UTC (rev 47288)
+++ scummvm/trunk/backends/platform/n64/Makefile	2010-01-13 13:53:31 UTC (rev 47289)
@@ -53,12 +53,12 @@
 
 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)

Modified: scummvm/trunk/backends/platform/n64/osys_n64.h
===================================================================
--- scummvm/trunk/backends/platform/n64/osys_n64.h	2010-01-13 11:14:04 UTC (rev 47288)
+++ scummvm/trunk/backends/platform/n64/osys_n64.h	2010-01-13 13:53:31 UTC (rev 47289)
@@ -117,6 +117,7 @@
 	int _mouseHotspotX, _mouseHotspotY;
 
 	controller_data_buttons *_ctrlData; // Controller data read from the N64 serial interface
+	bool _controllerHasRumble;
 
 	bool _dirtyOffscreen;
 

Modified: scummvm/trunk/backends/platform/n64/osys_n64_base.cpp
===================================================================
--- scummvm/trunk/backends/platform/n64/osys_n64_base.cpp	2010-01-13 11:14:04 UTC (rev 47288)
+++ scummvm/trunk/backends/platform/n64/osys_n64_base.cpp	2010-01-13 13:53:31 UTC (rev 47289)
@@ -135,6 +135,7 @@
 	_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::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;
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list