N64: if user has inserted a rumble-pak, rumble with shaking screen
svn-id: r47289
This commit is contained in:
parent
7db58ae29e
commit
6c6604d589
3 changed files with 13 additions and 6 deletions
|
@ -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)
|
||||
|
|
|
@ -117,6 +117,7 @@ protected:
|
|||
int _mouseHotspotX, _mouseHotspotY;
|
||||
|
||||
controller_data_buttons *_ctrlData; // Controller data read from the N64 serial interface
|
||||
bool _controllerHasRumble;
|
||||
|
||||
bool _dirtyOffscreen;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue