From d3ad5fc663cbbfa4c01fbfbf5cfe6f7df82e7d10 Mon Sep 17 00:00:00 2001 From: Norbert Lange Date: Mon, 8 Jun 2009 18:33:20 +0000 Subject: Initital commit modifying buildsystem and adding a TFMX Module-Player Changes in Paula.cpp/Paula.h + soundfx.cpp: Added (easy) queueing of samples by implementing methods that act similar like writes to the Amiga-Chipset would. Added counting of DMA-Interrupts, that is how often a sample finished playing. Added a base for the interrupt-interval, in most cases this will be the Cia-clockrate. Derived classes can then set the interval without scaling to the samplerate Changes in common/scummsys.h: Only disable warnings with pragmas for MS Compilers that cant do so otherwise. Newer MSVC Versions can and should disable warnings in the Project-Settings. Files in tfmx: Some files for debugging. Wont ever be commited back into trunk so those will contain some messy and hackish code Added: tfmx.h/tfmx.cpp Player for TFMX-Modules. Rest: main.cpp etc. Modified buildsystem to include new directory, modified main.cpp so it calls tfmxmain (tfmxplayer.cpp) instead of starting the GUI. svn-id: r41382 --- base/main.cpp | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'base') diff --git a/base/main.cpp b/base/main.cpp index a091c5885a..5744ec41f0 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -295,6 +295,40 @@ static void setupKeymapper(OSystem &system) { } +#if 1 +void tfmxmain(int argc, const char * const argv[]); + +extern "C" int scummvm_main(int argc, const char * const argv[]) { + Common::String specialDebug; + Common::String command; + + // Verify that the backend has been initialized (i.e. g_system has been set). + assert(g_system); + OSystem &system = *g_system; + + // Register config manager defaults + Base::registerDefaults(); + + // Load the plugins. + PluginManager::instance().loadPlugins(); + + // Init the backend. Must take place after all config data (including + // the command line params) was read. + system.initBackend(); + + // pass control to my own main-function, including arguments + tfmxmain(argc,argv); + + PluginManager::instance().unloadPlugins(); + PluginManager::destroy(); + Common::ConfigManager::destroy(); + Common::SearchManager::destroy(); + GUI::GuiManager::destroy(); + + return 0; +} +#else + extern "C" int scummvm_main(int argc, const char * const argv[]) { Common::String specialDebug; Common::String command; @@ -415,3 +449,5 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) { return 0; } + +#endif -- cgit v1.2.3