RenderEventListeners.cpp

Go to the documentation of this file.
00001 /*
00002 SagaEngine library
00003 Copyright (c) 2002-2006 Skalden Studio AS
00004 
00005 This software is provided 'as-is', without any express or implied 
00006 warranty. In no event will the authors be held liable for any 
00007 damages arising from the use of this software.
00008 
00009 Permission is granted to distribute the library under the terms of the 
00010 Q Public License version 1.0. Be sure to read and understand the license
00011 before using the library. It should be included here, or you may read it
00012 at http://www.trolltech.com/products/qt/licenses/licensing/qpl
00013 
00014 The original version of this library can be located at:
00015 http://www.sagaengine.com/
00016 
00017 Rune Myrland
00018 rune@skalden.com
00019 */
00020 
00021 
00022 #include "RenderEventListeners.hpp"
00023 #include "RenderEventListener.hpp"
00024 #include "util/error/Log.hpp"
00025 
00026 namespace se_ogre {
00027     void RenderEventListeners
00028     ::castInitEngine() {
00029         for(int i = 0; i < listenerCount_; ++i) {
00030             bool ret = listeners_[i]->initEngineEvent();
00031             Assert(ret);
00032         }
00033     }
00034 
00035 
00036     void RenderEventListeners
00037     ::castInitGame() {
00038         for(int i = 0; i < listenerCount_; ++i) {
00039             bool ret = listeners_[i]->initGameEvent();
00040             Assert(ret);
00041         }
00042     }
00043 
00044 
00045     void RenderEventListeners
00046     ::castInitLevel() {
00047         for(int i = 0; i < listenerCount_; ++i) {
00048             bool ret = listeners_[i]->initLevelEvent();
00049             Assert(ret);
00050         }
00051     }
00052 
00053 
00054     void RenderEventListeners
00055     ::castCleanupLevel() {
00056         for(int i = 0; i < listenerCount_; ++i) {
00057             listeners_[i]->cleanupLevelEvent();
00058         }
00059     }
00060 
00061 
00062     void RenderEventListeners
00063     ::castCleanupGame() {
00064         for(int i = 0; i < listenerCount_; ++i) {
00065             listeners_[i]->cleanupGameEvent();
00066         }
00067     }
00068 
00069 
00070     void RenderEventListeners
00071     ::castCleanupEngine() {
00072         for(int i = 0; i < listenerCount_; ++i) {
00073             listeners_[i]->cleanupEngineEvent();
00074         }
00075     }
00076 
00077 
00078     void RenderEventListeners
00079     ::castUpdateLights(float gameClock) {
00080         for(int i = 0; i < listenerCount_; ++i) {
00081             listeners_[i]->updateLights(gameClock);
00082         }
00083     }
00084 
00085 
00086     void RenderEventListeners
00087     ::castUpdateMaterials(float gameClock) {
00088         for(int i = 0; i < listenerCount_; ++i) {
00089             listeners_[i]->updateMaterials(gameClock);
00090         }
00091     }
00092 
00093 
00094     void RenderEventListeners
00095     ::castUpdateImpostors(float gameClock) {
00096         for(int i = 0; i < listenerCount_; ++i) {
00097             listeners_[i]->updateImpostors(gameClock);
00098         }
00099     }
00100 
00101 
00102     void RenderEventListeners
00103     ::addListener(RenderEventListener* listener) {
00104         Assert(listenerCount_ < MAX_LISTENERS - 1);
00105         listeners_[ listenerCount_++ ] = listener;
00106     }
00107 
00108 
00109     void RenderEventListeners
00110     ::removeListener(RenderEventListener* listener) {
00111         for(int i = 0; i < listenerCount_; ++i) {
00112             if(listeners_[i] == listener) {
00113                 listeners_[i] = listeners_[ --listenerCount_ ];
00114                 return;
00115             }
00116         }
00117     }
00118 
00119 }

Home Page | SagaEngine trunk (updated nightly) reference generated Sun Dec 2 20:06:05 2007 by Doxygen version 1.3.9.1.

SourceForge.net Logo