aboutsummaryrefslogtreecommitdiff
path: root/project/src/lib-std.c
diff options
context:
space:
mode:
Diffstat (limited to 'project/src/lib-std.c')
-rw-r--r--project/src/lib-std.c50
1 files changed, 50 insertions, 0 deletions
diff --git a/project/src/lib-std.c b/project/src/lib-std.c
index 5855450..03d9061 100644
--- a/project/src/lib-std.c
+++ b/project/src/lib-std.c
@@ -5514,6 +5514,56 @@ uint GetMkwMusicSlot ( uint tid )
}
}
+///////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////
+
+int FindTrackSlot ( ccp name, bool allow_arenas )
+{
+ int idx = ScanTrack(name);
+ if ( idx >= 0 )
+ return idx;
+
+ if (allow_arenas)
+ {
+ idx = ScanArena(name);
+ if ( idx >= 0 )
+ return idx + MKW_ARENA_BEG;
+ }
+
+ return -1;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+int FindArenaSlot ( ccp name, bool allow_tracks )
+{
+ int idx = ScanArena(name);
+ if ( idx >= 0 )
+ return idx + MKW_ARENA_BEG;
+
+ if (allow_tracks)
+ {
+ idx = ScanTrack(name);
+ if ( idx >= 0 )
+ return idx;
+ }
+
+ return -1;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+const TrackInfo_t * FindTrackInfo ( ccp name, bool allow_arenas )
+{
+ return GetTrackInfo(FindTrackSlot(name,allow_arenas));
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+const TrackInfo_t * FindArenaInfo ( ccp name, bool allow_tracks )
+{
+ return GetTrackInfo(FindArenaSlot(name,allow_tracks));
+}
//
///////////////////////////////////////////////////////////////////////////////
/////////////// apple only ///////////////