mirror of
https://github.com/zeldaret/tww.git
synced 2026-06-04 02:46:11 -04:00
Demo matches (#767)
This commit is contained in:
+13
-4
@@ -53,9 +53,8 @@ namespace {
|
||||
u32 randombit(s32 rounds, s32 patt_len) {
|
||||
/* Makes a random rumble pattern by enabling up to rounds random bits */
|
||||
u32 pattern = 0;
|
||||
s32 bit = 1 << 30;
|
||||
for (int i = 0; i < rounds; i++){
|
||||
pattern |= (bit >> (u32)(patt_len * cM_rnd()));
|
||||
pattern |= ((1 << 30) >> (u32)(patt_len * cM_rnd()));
|
||||
}
|
||||
return pattern;
|
||||
}
|
||||
@@ -64,7 +63,12 @@ namespace {
|
||||
/* 8009C73C-8009CCCC .text Run__12dVibration_cFv */
|
||||
int dVibration_c::Run() {
|
||||
mRumbleState = RUMBLE_STATE_RUNNING;
|
||||
if (dComIfGs_checkOptVibration() != 1U){
|
||||
#if VERSION == VERSION_DEMO
|
||||
if (dComIfGs_getOptVibration() != 1U)
|
||||
#else
|
||||
if (dComIfGs_checkOptVibration() != 1U)
|
||||
#endif
|
||||
{
|
||||
mMotor.mShock.mPatternIdx = mMotor.mQuake.mPatternIdx = PATTERN_OFF;
|
||||
mMotor.mShock.mCurrentFrame = mMotor.mQuake.mCurrentFrame = RESET_FRAME;
|
||||
}
|
||||
@@ -359,7 +363,10 @@ void dVibration_c::Pause() {
|
||||
if (mRumbleState == RUMBLE_STATE_PAUSED){
|
||||
return;
|
||||
}
|
||||
if (mMotor.mShock.mPatternIdx != PATTERN_OFF || mMotor.mQuake.mPatternIdx != PATTERN_OFF){
|
||||
#if VERSION > VERSION_DEMO
|
||||
if (mMotor.mShock.mPatternIdx != PATTERN_OFF || mMotor.mQuake.mPatternIdx != PATTERN_OFF)
|
||||
#endif
|
||||
{
|
||||
g_mDoCPd_gamePad[0]->stopMotorWaveHard();
|
||||
g_mDoCPd_gamePad[0]->stopMotorHard();
|
||||
}
|
||||
@@ -374,6 +381,7 @@ void dVibration_c::Pause() {
|
||||
mRumbleState = RUMBLE_STATE_PAUSED;
|
||||
}
|
||||
|
||||
#if VERSION > VERSION_DEMO
|
||||
/* 8009D188-8009D1C4 .text __ct__12dVibration_cFv */
|
||||
dVibration_c::dVibration_c() {
|
||||
setDefault();
|
||||
@@ -383,3 +391,4 @@ dVibration_c::dVibration_c() {
|
||||
dVibration_c::~dVibration_c() {
|
||||
Kill();
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user