This commit is contained in:
parent
0133d85f65
commit
183fc41a07
3 changed files with 32 additions and 10 deletions
|
@ -74,16 +74,7 @@ u8 CPadVibrationManager::s_currentIntensityValues[2];
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
void CPadVibrationManager::init()
|
void CPadVibrationManager::init()
|
||||||
{
|
{
|
||||||
int i,j;
|
stopAllVibration();
|
||||||
|
|
||||||
for(i=0;i<2;i++)
|
|
||||||
{
|
|
||||||
for(j=0;j<MAX_VIBES_PER_PAD;j++)
|
|
||||||
{
|
|
||||||
s_vibeControls[i][j].m_active=false;
|
|
||||||
}
|
|
||||||
s_currentIntensityValues[i]=0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
|
@ -177,5 +168,25 @@ void CPadVibrationManager::setVibration(int _port,VIBE_TYPE _type,u8 _ferocity)
|
||||||
vc->m_ferocity=_ferocity;
|
vc->m_ferocity=_ferocity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Function:
|
||||||
|
Purpose:
|
||||||
|
Params:
|
||||||
|
Returns:
|
||||||
|
---------------------------------------------------------------------- */
|
||||||
|
void CPadVibrationManager::stopAllVibration()
|
||||||
|
{
|
||||||
|
int i,j;
|
||||||
|
|
||||||
|
for(i=0;i<2;i++)
|
||||||
|
{
|
||||||
|
for(j=0;j<MAX_VIBES_PER_PAD;j++)
|
||||||
|
{
|
||||||
|
s_vibeControls[i][j].m_active=false;
|
||||||
|
}
|
||||||
|
s_currentIntensityValues[i]=0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*===========================================================================
|
/*===========================================================================
|
||||||
end */
|
end */
|
|
@ -54,6 +54,8 @@ public:
|
||||||
static void setVibration(int _port,VIBE_TYPE _type,u8 _ferocity=255);
|
static void setVibration(int _port,VIBE_TYPE _type,u8 _ferocity=255);
|
||||||
static u8 getCurrentVibrationIntensity(int _port) {return s_currentIntensityValues[_port];}
|
static u8 getCurrentVibrationIntensity(int _port) {return s_currentIntensityValues[_port];}
|
||||||
|
|
||||||
|
static void stopAllVibration();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,6 +23,13 @@
|
||||||
#include "system\vid.h"
|
#include "system\vid.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __PAD_PADS_H__
|
||||||
|
#include "pad\pads.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __PAD_VIBE_H__
|
||||||
|
#include "pad\vibe.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -89,6 +96,8 @@ void GameState::think()
|
||||||
#endif
|
#endif
|
||||||
ASSERT(s_pendingScene); // There really should be a scene pending before you shutdown..!
|
ASSERT(s_pendingScene); // There really should be a scene pending before you shutdown..!
|
||||||
s_currentScene->shutdown();
|
s_currentScene->shutdown();
|
||||||
|
CPadVibrationManager::stopAllVibration();
|
||||||
|
PadUpdate();
|
||||||
#ifdef __VERSION_DEBUG__
|
#ifdef __VERSION_DEBUG__
|
||||||
int loss;
|
int loss;
|
||||||
loss=MainRam.RamUsed-s_baseMemory;
|
loss=MainRam.RamUsed-s_baseMemory;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue