Merge branch 'master' into jgrpp
# Conflicts: # src/company_cmd.cpp # src/company_func.h # src/core/overflowsafe_type.hpp # src/engine.cpp # src/music/midifile.cpp # src/network/network_command.cpp # src/newgrf_debug_gui.cpp # src/newgrf_roadstop.h # src/newgrf_spritegroup.cpp # src/os/macosx/crashlog_osx.cpp # src/os/unix/crashlog_unix.cpp # src/pathfinder/yapf/yapf_common.hpp # src/road_gui.cpp # src/saveload/engine_sl.cpp # src/script/api/script_depotlist.cpp # src/script/api/script_roadtypelist.cpp # src/settings_gui.cpp # src/settings_type.h # src/strings.cpp # src/table/settings/game_settings.ini
This commit is contained in:
@@ -37,9 +37,9 @@ static const int MS_TO_REFTIME = 1000 * 10; ///< DirectMusic time base is 100 ns
|
||||
static const int MIDITIME_TO_REFTIME = 10; ///< Time base of the midi file reader is 1 us.
|
||||
|
||||
|
||||
#define FOURCC_INFO mmioFOURCC('I','N','F','O')
|
||||
#define FOURCC_fmt mmioFOURCC('f','m','t',' ')
|
||||
#define FOURCC_data mmioFOURCC('d','a','t','a')
|
||||
#define FOURCC_INFO mmioFOURCC('I', 'N', 'F', 'O')
|
||||
#define FOURCC_fmt mmioFOURCC('f', 'm', 't', ' ')
|
||||
#define FOURCC_data mmioFOURCC('d', 'a', 't', 'a')
|
||||
|
||||
/** A DLS file. */
|
||||
struct DLSFile {
|
||||
|
||||
@@ -377,7 +377,7 @@ static bool FixupMidiData(MidiFile &target)
|
||||
while (cur_block < target.blocks.size()) {
|
||||
MidiFile::DataBlock &block = target.blocks[cur_block];
|
||||
MidiFile::TempoChange &tempo = target.tempos[cur_tempo];
|
||||
MidiFile::TempoChange &next_tempo = target.tempos[cur_tempo+1];
|
||||
MidiFile::TempoChange &next_tempo = target.tempos[cur_tempo + 1];
|
||||
if (block.ticktime <= next_tempo.ticktime) {
|
||||
/* block is within the current tempo */
|
||||
int64 tickdiff = block.ticktime - last_ticktime;
|
||||
@@ -792,12 +792,12 @@ struct MpsMachine {
|
||||
|
||||
/* Always reset percussion channel to program 0 */
|
||||
this->target.blocks.push_back(MidiFile::DataBlock());
|
||||
AddMidiData(this->target.blocks.back(), MIDIST_PROGCHG+9, 0x00);
|
||||
AddMidiData(this->target.blocks.back(), MIDIST_PROGCHG + 9, 0x00);
|
||||
|
||||
/* Technically should be an endless loop, but having
|
||||
* a maximum (about 10 minutes) avoids getting stuck,
|
||||
* in case of corrupted data. */
|
||||
for (uint32 tick = 0; tick < 100000; tick+=1) {
|
||||
for (uint32_t tick = 0; tick < 100000; tick += 1) {
|
||||
this->target.blocks.push_back(MidiFile::DataBlock());
|
||||
auto &block = this->target.blocks.back();
|
||||
block.ticktime = tick;
|
||||
|
||||
Reference in New Issue
Block a user