diff options
author | Niels Martin Hansen <nielsm@indvikleren.dk> | 2018-03-14 15:55:40 +0100 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2018-06-05 22:58:35 +0200 |
commit | 2ae9df7248923c286e00dd1bf009275034137a7e (patch) | |
tree | 748cd2162311172f893838b84c6e723780b3e622 /src/music/midifile.hpp | |
parent | f946b3da56b22c1fc32a9ffc9008374e4fb4f8c8 (diff) | |
download | openttd-2ae9df7248923c286e00dd1bf009275034137a7e.tar.xz |
Feature: Decoder for DOS version music
This is based on reverse-engineering the TTD DOS driver for General MIDI music.
Diffstat (limited to 'src/music/midifile.hpp')
-rw-r--r-- | src/music/midifile.hpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/music/midifile.hpp b/src/music/midifile.hpp index d077f63cd..e41435364 100644 --- a/src/music/midifile.hpp +++ b/src/music/midifile.hpp @@ -17,6 +17,8 @@ #include "midi.h" #include <vector> +struct MusicSongInfo; + struct MidiFile { struct DataBlock { uint32 ticktime; ///< tick number since start of file this block should be triggered at @@ -35,6 +37,8 @@ struct MidiFile { uint16 tickdiv; ///< ticks per quarter note bool LoadFile(const char *filename); + bool LoadMpsData(const byte *data, size_t length); + bool LoadSong(const MusicSongInfo &song); void MoveFrom(MidiFile &other); static bool ReadSMFHeader(const char *filename, SMFHeader &header); |