ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

base-backend.cpp

Go to the documentation of this file.
00001 /* ScummVM - Graphic Adventure Engine
00002  *
00003  * ScummVM is the legal property of its developers, whose names
00004  * are too numerous to list here. Please refer to the COPYRIGHT
00005  * file distributed with this source distribution.
00006  *
00007  * This program is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU General Public License
00009  * as published by the Free Software Foundation; either version 2
00010  * of the License, or (at your option) any later version.
00011  *
00012  * This program is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00020  *
00021  */
00022 
00023 #include "backends/base-backend.h"
00024 
00025 #ifndef DISABLE_DEFAULT_EVENT_MANAGER
00026 #include "backends/events/default/default-events.h"
00027 #endif
00028 
00029 #ifndef DISABLE_DEFAULT_AUDIOCD_MANAGER
00030 #include "backends/audiocd/default/default-audiocd.h"
00031 #endif
00032 
00033 
00034 #include "gui/message.h"
00035 
00036 void BaseBackend::displayMessageOnOSD(const char *msg) {
00037     // Display the message for 1.5 seconds
00038     GUI::TimedMessageDialog dialog(msg, 1500);
00039     dialog.runModal();
00040 }
00041 
00042 void BaseBackend::initBackend() {
00043     // Init Event manager
00044 #ifndef DISABLE_DEFAULT_EVENT_MANAGER
00045     if (!_eventManager)
00046         _eventManager = new DefaultEventManager(getDefaultEventSource());
00047 #endif
00048 
00049     // Init audio CD manager
00050 #ifndef DISABLE_DEFAULT_AUDIOCD_MANAGER
00051     if (!_audiocdManager)
00052         _audiocdManager = new DefaultAudioCDManager();
00053 #endif
00054 
00055     OSystem::initBackend();
00056 }
00057 
00058 void BaseBackend::fillScreen(uint32 col) {
00059     Graphics::Surface *screen = lockScreen();
00060     if (screen && screen->getPixels())
00061         memset(screen->getPixels(), col, screen->h * screen->pitch);
00062     unlockScreen();
00063 }


Generated on Sat Mar 16 2019 05:01:19 for ResidualVM by doxygen 1.7.1
curved edge   curved edge