summaryrefslogtreecommitdiff
path: root/src/base_media_base.h
diff options
context:
space:
mode:
authorNiels Martin Hansen <nielsm@indvikleren.dk>2018-03-14 15:55:40 +0100
committerMichael Lutz <michi@icosahedron.de>2018-06-05 22:58:35 +0200
commit2ae9df7248923c286e00dd1bf009275034137a7e (patch)
tree748cd2162311172f893838b84c6e723780b3e622 /src/base_media_base.h
parentf946b3da56b22c1fc32a9ffc9008374e4fb4f8c8 (diff)
downloadopenttd-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/base_media_base.h')
-rw-r--r--src/base_media_base.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/base_media_base.h b/src/base_media_base.h
index 15f4372fb..407dcda86 100644
--- a/src/base_media_base.h
+++ b/src/base_media_base.h
@@ -285,8 +285,13 @@ static const uint NUM_SONGS_AVAILABLE = 1 + NUM_SONG_CLASSES * NUM_SONGS_CLASS;
/** Maximum number of songs in the (custom) playlist */
static const uint NUM_SONGS_PLAYLIST = 32;
+/* Functions to read DOS music CAT files, similar to but not quite the same as sound effect CAT files */
+char *GetMusicCatEntryName(const char *filename, size_t entrynum);
+byte *GetMusicCatEntryData(const char *filename, size_t entrynum, size_t &entrylen);
+
enum MusicTrackType {
MTT_STANDARDMIDI, ///< Standard MIDI file
+ MTT_MPSMIDI, ///< MPS GM driver MIDI format (contained in a CAT file)
};
/** Metadata about a music track. */
@@ -295,6 +300,7 @@ struct MusicSongInfo {
byte tracknr; ///< track number of song displayed in UI
const char *filename; ///< file on disk containing song (when used in MusicSet class, this pointer is owned by MD5File object for the file)
MusicTrackType filetype; ///< decoder required for song file
+ int cat_index; ///< entry index in CAT file, for filetype==MTT_MPSMIDI
};
/** All data of a music set. */