|
50 | 50 | #include "Common/FileSystem.h" |
51 | 51 |
|
52 | 52 | #include "Common/ArchiveFileSystem.h" |
53 | | -#include "Common/CDManager.h" |
54 | 53 | #include "Common/GameAudio.h" |
55 | 54 | #include "Common/LocalFileSystem.h" |
56 | 55 | #include "Common/PerfTimer.h" |
@@ -330,84 +329,6 @@ Bool FileSystem::createDirectory(AsciiString directory) |
330 | 329 | return FALSE; |
331 | 330 | } |
332 | 331 |
|
333 | | -//============================================================================ |
334 | | -// FileSystem::areMusicFilesOnCD |
335 | | -//============================================================================ |
336 | | -Bool FileSystem::areMusicFilesOnCD() |
337 | | -{ |
338 | | -#if 1 |
339 | | - return TRUE; |
340 | | -#else |
341 | | - if (!TheCDManager) { |
342 | | - DEBUG_LOG(("FileSystem::areMusicFilesOnCD() - No CD Manager; returning false")); |
343 | | - return FALSE; |
344 | | - } |
345 | | -
|
346 | | - AsciiString cdRoot; |
347 | | - Int dc = TheCDManager->driveCount(); |
348 | | - for (Int i = 0; i < dc; ++i) { |
349 | | - DEBUG_LOG(("FileSystem::areMusicFilesOnCD() - checking drive %d", i)); |
350 | | - CDDriveInterface *cdi = TheCDManager->getDrive(i); |
351 | | - if (!cdi) { |
352 | | - continue; |
353 | | - } |
354 | | -
|
355 | | - cdRoot = cdi->getPath(); |
356 | | - if (!cdRoot.endsWith("\\")) |
357 | | - cdRoot.concat("\\"); |
358 | | -#if RTS_GENERALS |
359 | | - cdRoot.concat("gensec.big"); |
360 | | -#elif RTS_ZEROHOUR |
361 | | - cdRoot.concat("genseczh.big"); |
362 | | -#endif |
363 | | - DEBUG_LOG(("FileSystem::areMusicFilesOnCD() - checking for %s", cdRoot.str())); |
364 | | - File *musicBig = TheLocalFileSystem->openFile(cdRoot.str()); |
365 | | - if (musicBig) |
366 | | - { |
367 | | - DEBUG_LOG(("FileSystem::areMusicFilesOnCD() - found it!")); |
368 | | - musicBig->close(); |
369 | | - return TRUE; |
370 | | - } |
371 | | - } |
372 | | - return FALSE; |
373 | | -#endif |
374 | | -} |
375 | | -//============================================================================ |
376 | | -// FileSystem::loadMusicFilesFromCD |
377 | | -//============================================================================ |
378 | | -void FileSystem::loadMusicFilesFromCD() |
379 | | -{ |
380 | | - if (!TheCDManager) { |
381 | | - return; |
382 | | - } |
383 | | - |
384 | | - AsciiString cdRoot; |
385 | | - Int dc = TheCDManager->driveCount(); |
386 | | - for (Int i = 0; i < dc; ++i) { |
387 | | - CDDriveInterface *cdi = TheCDManager->getDrive(i); |
388 | | - if (!cdi) { |
389 | | - continue; |
390 | | - } |
391 | | - |
392 | | - cdRoot = cdi->getPath(); |
393 | | - if (TheArchiveFileSystem->loadBigFilesFromDirectory(cdRoot, MUSIC_BIG)) { |
394 | | - break; |
395 | | - } |
396 | | - } |
397 | | -} |
398 | | - |
399 | | -//============================================================================ |
400 | | -// FileSystem::unloadMusicFilesFromCD |
401 | | -//============================================================================ |
402 | | -void FileSystem::unloadMusicFilesFromCD() |
403 | | -{ |
404 | | - if (!(TheAudio && TheAudio->isMusicPlayingFromCD())) { |
405 | | - return; |
406 | | - } |
407 | | - |
408 | | - TheArchiveFileSystem->closeArchiveFile( MUSIC_BIG ); |
409 | | -} |
410 | | - |
411 | 332 | //============================================================================ |
412 | 333 | // FileSystem::normalizePath |
413 | 334 | //============================================================================ |
|
0 commit comments