Mercurial > fife-parpg
annotate engine/core/controller/engine.h @ 697:ecaa4d98f05f tip
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
* Most of the GUIChan code has been refactored into its own gui/guichan module. However, references to the GuiFont class still persist in the Engine and GuiManager code and these will need further refactoring.
* GuiManager is now an abstract base class which specific implementations (e.g. GUIChan) should subclass.
* The GUIChan GUI code is now a concrete implementation of GuiManager, most of which is in the new GuiChanGuiManager class.
* The GUI code in the Console class has been refactored out of the Console and into the GUIChan module as its own GuiChanConsoleWidget class. The rest of the Console class related to executing commands was left largely unchanged.
* Existing client code may need to downcast the GuiManager pointer received from FIFE::Engine::getGuiManager() to GuiChanGuiManager, since not all functionality is represented in the GuiManager abstract base class. Python client code can use the new GuiChanGuiManager.castTo static method for this purpose.
author | M. George Hansen <technopolitica@gmail.com> |
---|---|
date | Sat, 18 Jun 2011 00:28:40 -1000 |
parents | ca1fcb96907d |
children |
rev | line source |
---|---|
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
1 /*************************************************************************** |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
2 * Copyright (C) 2005-2008 by the FIFE team * |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
3 * http://www.fifengine.de * |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
4 * This file is part of FIFE. * |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
5 * * |
46
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
6 * FIFE is free software; you can redistribute it and/or * |
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
7 * modify it under the terms of the GNU Lesser General Public * |
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
8 * License as published by the Free Software Foundation; either * |
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
9 * version 2.1 of the License, or (at your option) any later version. * |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
10 * * |
46
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
11 * This library is distributed in the hope that it will be useful, * |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
46
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * |
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
14 * Lesser General Public License for more details. * |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
15 * * |
46
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
16 * You should have received a copy of the GNU Lesser General Public * |
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
17 * License along with this library; if not, write to the * |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
18 * Free Software Foundation, Inc., * |
46
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
20 ***************************************************************************/ |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
21 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
22 #ifndef FIFE_ENGINE_H |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
23 #define FIFE_ENGINE_H |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
24 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
25 // Standard C++ library includes |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
26 #include <map> |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
27 #include <string> |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
28 #include <vector> |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
29 |
287
fdb1e98fd8b6
* Create an autorelease pool, so autoreleased SDL objects don't leak (Mac OS X specific issue)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
201
diff
changeset
|
30 // Platform specific includes |
fdb1e98fd8b6
* Create an autorelease pool, so autoreleased SDL objects don't leak (Mac OS X specific issue)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
201
diff
changeset
|
31 #ifdef USE_COCOA |
fdb1e98fd8b6
* Create an autorelease pool, so autoreleased SDL objects don't leak (Mac OS X specific issue)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
201
diff
changeset
|
32 #include <objc/runtime.h> |
fdb1e98fd8b6
* Create an autorelease pool, so autoreleased SDL objects don't leak (Mac OS X specific issue)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
201
diff
changeset
|
33 #endif |
fdb1e98fd8b6
* Create an autorelease pool, so autoreleased SDL objects don't leak (Mac OS X specific issue)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
201
diff
changeset
|
34 |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
35 // 3rd party library includes |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
36 #include <SDL.h> |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
37 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
38 // FIFE includes |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
39 // These includes are split up in two parts, separated by one empty line |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
40 // First block: files included from the FIFE root src directory |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
41 // Second block: files included from the same folder |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
42 #include "enginesettings.h" |
635
3094988564d5
* Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
422
diff
changeset
|
43 #include "video/devicecaps.h" |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
44 |
694
ca1fcb96907d
Added pre- and post-rendering hooks for executing custom rendering code.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
45 typedef void (*Callback)(); |
ca1fcb96907d
Added pre- and post-rendering hooks for executing custom rendering code.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
46 |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
47 namespace gcn { |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
48 class Graphics; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
49 } |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
50 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
51 namespace FIFE { |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
52 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
53 class SoundManager; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
54 class RenderBackend; |
697
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
694
diff
changeset
|
55 class GuiManager; |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
56 class VFS; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
57 class VFSSourceFactory; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
58 class EventManager; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
59 class TimeManager; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
60 class ImagePool; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
61 class AnimationPool; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
62 class Model; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
63 class LogManager; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
64 class GuiFont; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
65 class Cursor; |
201
a9c4b895ed02
removed duplicate forward declaration for VFS in engine.h. Also added a forward declaration for SoundClipPool in engine.h because it has a pointer to a SoundClipPool.
vtchill@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
144
diff
changeset
|
66 class SoundClipPool; |
422
9d94f4676d17
Moved the management of cameras into the Map class. The View class no longer exists since it now serves no purpose. The engine class itself holds the renderers and these get passed to each map that is loaded and then passed to each camera on each map. This change makes it possible for multiple maps to be loaded at the same time with the same camera id without a name clash. fixes[t:342]
vtchill@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
378
diff
changeset
|
67 class RendererBase; |
654
5d6b1820b953
* Added the ability to change screen modes on the fly. This works both in OpenGL and SDL modes.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
653
diff
changeset
|
68 class Image; |
697
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
694
diff
changeset
|
69 class FontManager; |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
694
diff
changeset
|
70 class GuiManager; |
654
5d6b1820b953
* Added the ability to change screen modes on the fly. This works both in OpenGL and SDL modes.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
653
diff
changeset
|
71 |
5d6b1820b953
* Added the ability to change screen modes on the fly. This works both in OpenGL and SDL modes.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
653
diff
changeset
|
72 class IEngineChangeListener { |
5d6b1820b953
* Added the ability to change screen modes on the fly. This works both in OpenGL and SDL modes.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
653
diff
changeset
|
73 public: |
5d6b1820b953
* Added the ability to change screen modes on the fly. This works both in OpenGL and SDL modes.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
653
diff
changeset
|
74 virtual ~IEngineChangeListener() {} |
5d6b1820b953
* Added the ability to change screen modes on the fly. This works both in OpenGL and SDL modes.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
653
diff
changeset
|
75 |
5d6b1820b953
* Added the ability to change screen modes on the fly. This works both in OpenGL and SDL modes.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
653
diff
changeset
|
76 /** Screen mode has been changed |
5d6b1820b953
* Added the ability to change screen modes on the fly. This works both in OpenGL and SDL modes.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
653
diff
changeset
|
77 */ |
5d6b1820b953
* Added the ability to change screen modes on the fly. This works both in OpenGL and SDL modes.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
653
diff
changeset
|
78 virtual void onScreenModeChanged(const ScreenMode& newmode) = 0; |
5d6b1820b953
* Added the ability to change screen modes on the fly. This works both in OpenGL and SDL modes.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
653
diff
changeset
|
79 }; |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
80 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
81 /** Engine acts as a controller to the whole system |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
82 * Responsibilities of the engine are: |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
83 * - Construct and initialize engine internals |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
84 * - Clean-up when the program ends |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
85 * - Act as an entry point to the engine subsystems |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
86 */ |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
87 class Engine { |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
88 public: |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
89 /** Constructor |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
90 */ |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
91 Engine(); |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
92 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
93 /** Destructor |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
94 */ |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
95 virtual ~Engine(); |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
96 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
97 /** Gets settings class for engine |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
98 */ |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
99 EngineSettings& getSettings(); |
635
3094988564d5
* Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
422
diff
changeset
|
100 |
3094988564d5
* Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
422
diff
changeset
|
101 /** Gets device capabilities |
3094988564d5
* Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
422
diff
changeset
|
102 */ |
642
6e2151325017
* Added the ability to query the current running screen mode
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
635
diff
changeset
|
103 const DeviceCaps& getDeviceCaps() const; |
6e2151325017
* Added the ability to query the current running screen mode
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
635
diff
changeset
|
104 |
654
5d6b1820b953
* Added the ability to change screen modes on the fly. This works both in OpenGL and SDL modes.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
653
diff
changeset
|
105 /** Changes the screen mode. |
5d6b1820b953
* Added the ability to change screen modes on the fly. This works both in OpenGL and SDL modes.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
653
diff
changeset
|
106 * This should be called instead of the renderer's setScreenMode() function. |
5d6b1820b953
* Added the ability to change screen modes on the fly. This works both in OpenGL and SDL modes.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
653
diff
changeset
|
107 * It takes care of any objects that need to be re-created after switching |
5d6b1820b953
* Added the ability to change screen modes on the fly. This works both in OpenGL and SDL modes.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
653
diff
changeset
|
108 * screen modes. |
5d6b1820b953
* Added the ability to change screen modes on the fly. This works both in OpenGL and SDL modes.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
653
diff
changeset
|
109 * |
5d6b1820b953
* Added the ability to change screen modes on the fly. This works both in OpenGL and SDL modes.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
653
diff
changeset
|
110 * @param mode A valid ScreenMode retrieved from FIFE::DeviceCaps::getNearestScreenMode() |
5d6b1820b953
* Added the ability to change screen modes on the fly. This works both in OpenGL and SDL modes.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
653
diff
changeset
|
111 * @return The new Screen Image |
5d6b1820b953
* Added the ability to change screen modes on the fly. This works both in OpenGL and SDL modes.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
653
diff
changeset
|
112 */ |
5d6b1820b953
* Added the ability to change screen modes on the fly. This works both in OpenGL and SDL modes.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
653
diff
changeset
|
113 Image* changeScreenMode(const ScreenMode& mode); |
5d6b1820b953
* Added the ability to change screen modes on the fly. This works both in OpenGL and SDL modes.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
653
diff
changeset
|
114 |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
115 /** Initializes the engine |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
116 */ |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
117 void init(); |
144
d2f1e81fbe2c
* Fixed a scons issue, where libraries checked for C instead of C++
phoku@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
118 |
d2f1e81fbe2c
* Fixed a scons issue, where libraries checked for C instead of C++
phoku@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
119 /** Explicit destruction of engine |
d2f1e81fbe2c
* Fixed a scons issue, where libraries checked for C instead of C++
phoku@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
120 */ |
d2f1e81fbe2c
* Fixed a scons issue, where libraries checked for C instead of C++
phoku@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
121 void destroy(); |
635
3094988564d5
* Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
422
diff
changeset
|
122 |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
123 /** Initializes the continuous processing of the engine |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
124 * Call this only once in your program |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
125 */ |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
126 void initializePumping(); |
635
3094988564d5
* Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
422
diff
changeset
|
127 |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
128 /** Finalizes the continuous processing of the engine |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
129 * Call this only once in your program, after you have called |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
130 * initializePumping + (pump() * N times) |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
131 */ |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
132 void finalizePumping(); |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
133 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
134 /** Runs one cycle for the engine |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
135 */ |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
136 void pump(); |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
137 |
694
ca1fcb96907d
Added pre- and post-rendering hooks for executing custom rendering code.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
138 /** Register a callback function to call before rendering the main |
ca1fcb96907d
Added pre- and post-rendering hooks for executing custom rendering code.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
139 * scene. |
ca1fcb96907d
Added pre- and post-rendering hooks for executing custom rendering code.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
140 */ |
ca1fcb96907d
Added pre- and post-rendering hooks for executing custom rendering code.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
141 void registerPreRenderCallback(Callback callback); |
ca1fcb96907d
Added pre- and post-rendering hooks for executing custom rendering code.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
142 |
ca1fcb96907d
Added pre- and post-rendering hooks for executing custom rendering code.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
143 /** Register a callback function to call after rendering the main |
ca1fcb96907d
Added pre- and post-rendering hooks for executing custom rendering code.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
144 * scene. |
ca1fcb96907d
Added pre- and post-rendering hooks for executing custom rendering code.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
145 */ |
ca1fcb96907d
Added pre- and post-rendering hooks for executing custom rendering code.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
146 void registerPostRenderCallback(Callback callback); |
ca1fcb96907d
Added pre- and post-rendering hooks for executing custom rendering code.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
147 |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
148 /** Provides access point to the SoundManager |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
149 */ |
378
64738befdf3b
bringing in the changes from the build_system_rework branch in preparation for the 0.3.0 release. This commit will require the Jan2010 devkit. Clients will also need to be modified to the new way to import fife.
vtchill@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
287
diff
changeset
|
150 SoundManager* getSoundManager() const { return m_soundmanager; } |
635
3094988564d5
* Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
422
diff
changeset
|
151 |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
152 /** Provides access point to the EventManager |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
153 */ |
378
64738befdf3b
bringing in the changes from the build_system_rework branch in preparation for the 0.3.0 release. This commit will require the Jan2010 devkit. Clients will also need to be modified to the new way to import fife.
vtchill@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
287
diff
changeset
|
154 EventManager* getEventManager() const { return m_eventmanager; } |
635
3094988564d5
* Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
422
diff
changeset
|
155 |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
156 /** Provides access point to the TimeManager |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
157 */ |
378
64738befdf3b
bringing in the changes from the build_system_rework branch in preparation for the 0.3.0 release. This commit will require the Jan2010 devkit. Clients will also need to be modified to the new way to import fife.
vtchill@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
287
diff
changeset
|
158 TimeManager* getTimeManager() const { return m_timemanager; } |
635
3094988564d5
* Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
422
diff
changeset
|
159 |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
160 /** Provides access point to the GuiManager |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
161 */ |
697
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
694
diff
changeset
|
162 GuiManager* getGuiManager() const { return m_guimanager; } |
635
3094988564d5
* Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
422
diff
changeset
|
163 |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
164 /** Provides access point to the ImagePool |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
165 */ |
378
64738befdf3b
bringing in the changes from the build_system_rework branch in preparation for the 0.3.0 release. This commit will require the Jan2010 devkit. Clients will also need to be modified to the new way to import fife.
vtchill@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
287
diff
changeset
|
166 ImagePool* getImagePool() const { return m_imagepool; } |
635
3094988564d5
* Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
422
diff
changeset
|
167 |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
168 /** Provides access point to the AnimationPool |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
169 */ |
378
64738befdf3b
bringing in the changes from the build_system_rework branch in preparation for the 0.3.0 release. This commit will require the Jan2010 devkit. Clients will also need to be modified to the new way to import fife.
vtchill@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
287
diff
changeset
|
170 AnimationPool* getAnimationPool() const { return m_animpool; } |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
171 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
172 /** Provides access point to the SoundClipPool |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
173 */ |
378
64738befdf3b
bringing in the changes from the build_system_rework branch in preparation for the 0.3.0 release. This commit will require the Jan2010 devkit. Clients will also need to be modified to the new way to import fife.
vtchill@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
287
diff
changeset
|
174 SoundClipPool* getSoundClipPool() const { return m_soundclippool; } |
635
3094988564d5
* Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
422
diff
changeset
|
175 |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
176 /** Provides access point to the RenderBackend |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
177 */ |
378
64738befdf3b
bringing in the changes from the build_system_rework branch in preparation for the 0.3.0 release. This commit will require the Jan2010 devkit. Clients will also need to be modified to the new way to import fife.
vtchill@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
287
diff
changeset
|
178 RenderBackend* getRenderBackend() const { return m_renderbackend; } |
635
3094988564d5
* Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
422
diff
changeset
|
179 |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
180 /** Provides access point to the Model |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
181 */ |
378
64738befdf3b
bringing in the changes from the build_system_rework branch in preparation for the 0.3.0 release. This commit will require the Jan2010 devkit. Clients will also need to be modified to the new way to import fife.
vtchill@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
287
diff
changeset
|
182 Model* getModel() const { return m_model; } |
635
3094988564d5
* Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
422
diff
changeset
|
183 |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
184 /** Provides access point to the LogManager |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
185 */ |
378
64738befdf3b
bringing in the changes from the build_system_rework branch in preparation for the 0.3.0 release. This commit will require the Jan2010 devkit. Clients will also need to be modified to the new way to import fife.
vtchill@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
287
diff
changeset
|
186 LogManager* getLogManager() const { return m_logmanager; } |
635
3094988564d5
* Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
422
diff
changeset
|
187 |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
188 /** Returns default font used in the engine |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
189 */ |
378
64738befdf3b
bringing in the changes from the build_system_rework branch in preparation for the 0.3.0 release. This commit will require the Jan2010 devkit. Clients will also need to be modified to the new way to import fife.
vtchill@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
287
diff
changeset
|
190 GuiFont* getDefaultFont() const { return m_defaultfont; } |
635
3094988564d5
* Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
422
diff
changeset
|
191 |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
192 /** Provides access point to the VFS |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
193 */ |
378
64738befdf3b
bringing in the changes from the build_system_rework branch in preparation for the 0.3.0 release. This commit will require the Jan2010 devkit. Clients will also need to be modified to the new way to import fife.
vtchill@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
287
diff
changeset
|
194 VFS* getVFS() const { return m_vfs; } |
635
3094988564d5
* Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
422
diff
changeset
|
195 |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
196 /** Returns cursor used in the engine |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
197 */ |
378
64738befdf3b
bringing in the changes from the build_system_rework branch in preparation for the 0.3.0 release. This commit will require the Jan2010 devkit. Clients will also need to be modified to the new way to import fife.
vtchill@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
287
diff
changeset
|
198 Cursor* getCursor() const { return m_cursor; } |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
199 |
654
5d6b1820b953
* Added the ability to change screen modes on the fly. This works both in OpenGL and SDL modes.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
653
diff
changeset
|
200 /** Adds new change listener |
5d6b1820b953
* Added the ability to change screen modes on the fly. This works both in OpenGL and SDL modes.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
653
diff
changeset
|
201 * @param listener to add |
5d6b1820b953
* Added the ability to change screen modes on the fly. This works both in OpenGL and SDL modes.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
653
diff
changeset
|
202 */ |
5d6b1820b953
* Added the ability to change screen modes on the fly. This works both in OpenGL and SDL modes.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
653
diff
changeset
|
203 void addChangeListener(IEngineChangeListener* listener); |
5d6b1820b953
* Added the ability to change screen modes on the fly. This works both in OpenGL and SDL modes.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
653
diff
changeset
|
204 |
5d6b1820b953
* Added the ability to change screen modes on the fly. This works both in OpenGL and SDL modes.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
653
diff
changeset
|
205 /** Removes associated change listener |
5d6b1820b953
* Added the ability to change screen modes on the fly. This works both in OpenGL and SDL modes.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
653
diff
changeset
|
206 * @param listener to remove |
5d6b1820b953
* Added the ability to change screen modes on the fly. This works both in OpenGL and SDL modes.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
653
diff
changeset
|
207 */ |
5d6b1820b953
* Added the ability to change screen modes on the fly. This works both in OpenGL and SDL modes.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
653
diff
changeset
|
208 void removeChangeListener(IEngineChangeListener* listener); |
5d6b1820b953
* Added the ability to change screen modes on the fly. This works both in OpenGL and SDL modes.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
653
diff
changeset
|
209 |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
210 private: |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
211 void preInit(); |
635
3094988564d5
* Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
422
diff
changeset
|
212 |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
213 RenderBackend* m_renderbackend; |
697
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
694
diff
changeset
|
214 GuiManager* m_guimanager; |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
215 EventManager* m_eventmanager; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
216 SoundManager* m_soundmanager; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
217 TimeManager* m_timemanager; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
218 ImagePool* m_imagepool; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
219 AnimationPool* m_animpool; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
220 SoundClipPool* m_soundclippool; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
221 VFS* m_vfs; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
222 Model* m_model; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
223 LogManager* m_logmanager; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
224 GuiFont* m_defaultfont; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
225 Cursor* m_cursor; |
144
d2f1e81fbe2c
* Fixed a scons issue, where libraries checked for C instead of C++
phoku@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
226 bool m_destroyed; |
635
3094988564d5
* Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
422
diff
changeset
|
227 |
694
ca1fcb96907d
Added pre- and post-rendering hooks for executing custom rendering code.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
228 Callback m_prerender_callback; |
ca1fcb96907d
Added pre- and post-rendering hooks for executing custom rendering code.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
229 Callback m_postrender_callback; |
ca1fcb96907d
Added pre- and post-rendering hooks for executing custom rendering code.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
230 |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
231 EngineSettings m_settings; |
635
3094988564d5
* Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
422
diff
changeset
|
232 DeviceCaps m_devcaps; |
287
fdb1e98fd8b6
* Create an autorelease pool, so autoreleased SDL objects don't leak (Mac OS X specific issue)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
201
diff
changeset
|
233 |
642
6e2151325017
* Added the ability to query the current running screen mode
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
635
diff
changeset
|
234 ScreenMode m_screenMode; |
6e2151325017
* Added the ability to query the current running screen mode
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
635
diff
changeset
|
235 |
422
9d94f4676d17
Moved the management of cameras into the Map class. The View class no longer exists since it now serves no purpose. The engine class itself holds the renderers and these get passed to each map that is loaded and then passed to each camera on each map. This change makes it possible for multiple maps to be loaded at the same time with the same camera id without a name clash. fixes[t:342]
vtchill@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
378
diff
changeset
|
236 std::vector<RendererBase*> m_renderers; |
9d94f4676d17
Moved the management of cameras into the Map class. The View class no longer exists since it now serves no purpose. The engine class itself holds the renderers and these get passed to each map that is loaded and then passed to each camera on each map. This change makes it possible for multiple maps to be loaded at the same time with the same camera id without a name clash. fixes[t:342]
vtchill@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
378
diff
changeset
|
237 |
654
5d6b1820b953
* Added the ability to change screen modes on the fly. This works both in OpenGL and SDL modes.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
653
diff
changeset
|
238 std::vector<IEngineChangeListener*> m_changelisteners; |
5d6b1820b953
* Added the ability to change screen modes on the fly. This works both in OpenGL and SDL modes.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
653
diff
changeset
|
239 |
287
fdb1e98fd8b6
* Create an autorelease pool, so autoreleased SDL objects don't leak (Mac OS X specific issue)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
201
diff
changeset
|
240 #ifdef USE_COCOA |
fdb1e98fd8b6
* Create an autorelease pool, so autoreleased SDL objects don't leak (Mac OS X specific issue)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
201
diff
changeset
|
241 objc_object *m_autoreleasePool; |
fdb1e98fd8b6
* Create an autorelease pool, so autoreleased SDL objects don't leak (Mac OS X specific issue)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
201
diff
changeset
|
242 #endif |
fdb1e98fd8b6
* Create an autorelease pool, so autoreleased SDL objects don't leak (Mac OS X specific issue)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
201
diff
changeset
|
243 |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
244 }; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
245 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
246 }//FIFE |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
247 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
248 #endif |