X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fmisc.c;h=b344ba6f2a9e65365ea36b4fe7c14359b13c9aeb;hb=7891415ca10eb882506eaaa3bca720ec75723a0e;hp=9fa1153550d80a6df83737e2a80a3e4f71c1591c;hpb=9c6293f12f9dea224bff9050050253e9f52e3819;p=rocksndiamonds.git diff --git a/src/libgame/misc.c b/src/libgame/misc.c index 9fa11535..b344ba6f 100644 --- a/src/libgame/misc.c +++ b/src/libgame/misc.c @@ -112,7 +112,7 @@ static void sleep_milliseconds(unsigned long milliseconds_delay) boolean do_busy_waiting = (milliseconds_delay < 5 ? TRUE : FALSE); #if defined(PLATFORM_MSDOS) - /* don't use select() to perform waiting operations under DOS/Windows + /* don't use select() to perform waiting operations under DOS environment; always use a busy loop for waiting instead */ do_busy_waiting = TRUE; #endif @@ -1206,6 +1206,17 @@ boolean FileIsMusic(char *basename) return FALSE; } +boolean FileIsArtworkType(char *basename, int type) +{ + if ((type == TREE_TYPE_GRAPHICS_DIR && FileIsGraphic(basename)) || + (type == TREE_TYPE_SOUNDS_DIR && FileIsSound(basename)) || + (type == TREE_TYPE_MUSIC_DIR && FileIsMusic(basename))) + return TRUE; + + return FALSE; +} + + /* ========================================================================= */ /* functions only needed for non-Unix (non-command-line) systems */ /* ========================================================================= */