1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-25 07:44:38 +01:00

Merge branch 'fix_2284' of https://github.com/Overv/OpenRCT2 into pre-release-0.0.3

This commit is contained in:
duncanspumpkin
2015-11-11 19:21:26 +00:00
2 changed files with 9 additions and 2 deletions

View File

@@ -26,6 +26,7 @@ extern "C" {
#include "audio.h"
}
#include "mixer.h"
#include <cmath>
Mixer gMixer;
@@ -393,7 +394,7 @@ void Channel::SetPan(float pan)
if (pan < 0) {
Channel::pan = 0;
}
double decibels = (abs(Channel::pan - 0.5) * 2.0) * 100.0;
double decibels = (std::abs(Channel::pan - 0.5) * 2.0) * 100.0;
double attenuation = pow(10, decibels / 20.0);
if (Channel::pan <= 0.5) {
volume_l = 1.0;

View File

@@ -80,6 +80,7 @@ static const uint8 _magicMountainScript[] = {
static uint8* _loadedScript;
static const uint8* _currentScript;
static uint8 _lastOpcode;
static int _scriptNoLoadsSinceRestart;
static int _scriptWaitCounter;
static int _scriptCurrentPreset;
@@ -264,6 +265,8 @@ static void title_skip_opcode()
script_opcode = *_currentScript++;
gTitleScriptCommand++;
_lastOpcode = script_opcode;
switch (script_opcode) {
case TITLE_SCRIPT_WAIT:
_currentScript++;
@@ -314,6 +317,9 @@ static void title_do_next_script_opcode()
return;
}
}
_lastOpcode = script_opcode;
switch (script_opcode) {
case TITLE_SCRIPT_END:
_scriptWaitCounter = 1;
@@ -439,7 +445,7 @@ static void title_update_showcase()
if (gTitleScriptSkipTo != -1 && gTitleScriptSkipLoad != -1)
_scriptWaitCounter = 0;
else if (*(_currentScript - 1) != TITLE_SCRIPT_END)
else if (_lastOpcode != TITLE_SCRIPT_END)
_scriptWaitCounter--;
} while (gTitleScriptSkipTo != -1 && gTitleScriptSkipLoad != -1);