Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/*
   Copyright (c) 2016 DIVIDE-Studio
   Copyright (c) 2009 Ionut Cava

   This file is part of DIVIDE Framework.

   Permission is hereby granted, free of charge, to any person obtaining a copy
   of this software
   and associated documentation files (the "Software"), to deal in the Software
   without restriction,
   including without limitation the rights to use, copy, modify, merge, publish,
   distribute, sublicense,
   and/or sell copies of the Software, and to permit persons to whom the
   Software is furnished to do so,
   subject to the following conditions:

   The above copyright notice and this permission notice shall be included in
   all copies or substantial portions of the Software.

   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   IMPLIED,
   INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
   PARTICULAR PURPOSE AND NONINFRINGEMENT.
   IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
   DAMAGES OR OTHER LIABILITY,
   WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
   IN CONNECTION WITH THE SOFTWARE
   OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

 */

#ifndef _DIVIDE_SCENE_LIST_H_
#define _DIVIDE_SCENE_LIST_H_

// Initial application scene (menu, scene transition, etc) :
#include "Scenes/DefaultScene/Headers/DefaultScene.h"

// Factory scenes:
#include "Scenes/MainScene/Headers/MainScene.h"
#include "Scenes/CubeScene/Headers/CubeScene.h"
#include "Scenes/NetworkScene/Headers/NetworkScene.h"
#include "Scenes/PingPongScene/Headers/PingPongScene.h"
#include "Scenes/FlashScene/Headers/FlashScene.h"
#include "Scenes/TenisScene/Headers/TenisScene.h"
#include "Scenes/PhysXScene/Headers/PhysXScene.h"
#include "Scenes/WarScene/Headers/WarScene.h"
#include "Scenes/ShadowScene/Headers/ShadowScene.h"
#include "Scenes/ReflectionScene/Headers/ReflectionScene.h"

#include <boost/functional/factory.hpp>
#include <boost/preprocessor/cat.hpp>

#define STRUCT_NAME(M) BOOST_PP_CAT(M, RegisterStruct)
#define VAR_NAME(M) BOOST_PP_CAT(M, RegisterVariable)

 /// usage: REGISTER_SCENE(A,B) where: - A is the scene's class name
 ///                                    -B is the name used to refer to that
 ///                                      scene in the XML files
 /// Call this function after each scene declaration
#define REGISTER_SCENE_W_NAME(scene, sceneName)                 \
static struct STRUCT_NAME(scene) {                              \
  STRUCT_NAME(scene)();                                         \
} VAR_NAME(scene);                                              \
                                                                \
STRUCT_NAME(scene)::STRUCT_NAME(scene)()  {                     \
    g_sceneFactory[sceneName]  = boost::factory<scene*>(); \
}
 /// same as REGISTER_SCENE(A,B) but in this case the scene's name in XML must be the same as the class name
#define REGISTER_SCENE(scene) REGISTER_SCENE_W_NAME(scene, #scene)

#define INIT_SCENE_FACTORY \
    namespace { \
        typedef hashMapImpl<stringImpl, std::function<Scene*(const stringImpl& name)> > SceneFactory; \
        SceneFactory g_sceneFactory; \
    };\
    REGISTER_SCENE(DefaultScene)\
    REGISTER_SCENE(MainScene)\
    REGISTER_SCENE(CubeScene)\
    REGISTER_SCENE(NetworkScene)\
    REGISTER_SCENE(PingPongScene)\
    REGISTER_SCENE(FlashScene)\
    REGISTER_SCENE(TenisScene)\
    REGISTER_SCENE(PhysXScene)\
    REGISTER_SCENE(WarScene)\
    REGISTER_SCENE(ShadowScene)\
    REGISTER_SCENE(ReflectionScene)

#endif

Commits for Divide-Framework/trunk/Source Code/SceneList.h

Diff revisions: vs.
Revision Author Commited Message
719 Diff Diff IonutCava picture IonutCava Fri 03 Jun, 2016 16:20:08 +0000

[IonutCava]
- More SceneManager – ScenePool splitting of responsibilities
- DefaultScene will be the first scene loaded by the application. If nothing is specified in XML, it will default to "DefaultScene"

717 Diff Diff IonutCava picture IonutCava Wed 01 Jun, 2016 16:09:11 +0000

[IonutCava]
- Added initial code for 2 test scenes: ShadowScene and ReflectionScene that will be used to fix and update the shadowing and the reflection systems respectively
- More scene switch bug fixes
— XML scene data is now optional. Scenes can be created entirely form code if needed

704 Diff Diff IonutCava picture IonutCava Thu 12 May, 2016 16:24:17 +0000

[IonutCava]
- More work on the DefaultScene:
— Automatically list each available scene as a button that will load the actual desired scene

699 Diff Diff IonutCava picture IonutCava Tue 10 May, 2016 16:16:57 +0000

[IonutCava]
- Initial key binding code with external XML support
— Allow separation of actions and keys
— Specify actions in code by id
— Specify action id for each Key state
— Allow key modifiers: Left/Right Alt, Left/Right Ctrl

- Initial default scene code

692 Diff Diff IonutCava picture IonutCava Wed 27 Apr, 2016 16:24:26 +0000

[IonutCava]
- Resource system cleanup:
— Resource name and resource file location (if any) is now passed only via explicit constructors! (ResourceDescriptors already contain this data, so why use setters?)
- Fix a bug with ortho projection matrix calculation (set m[3][3] to 1. this was skipped when the identity() call was changed to zero() in the ortho() function)
— This also fixed text rendering

686 Diff Diff IonutCava picture IonutCava Thu 21 Apr, 2016 16:24:19 +0000

[IonutCava]
- Refactor the scene self-registering system to prevent linker related issues
- Add a SGNRelationshipCache class that can quickly verify if any 2 given nodes are related in any way
— This should speed up Octree updates by a lot

note: The template refactoring code has significantly slowed down performance for reasons yet unknown. Investigating.

648 Diff Diff IonutCava picture IonutCava Sun 21 Feb, 2016 16:32:52 +0000

[IonutCava]
- Update copyright notice
- Move BoundingBox and BoundingSphere to a new BoundsComponent
— Add a temp hack in SceneGraphNode to update these

350 Diff Diff IonutCava picture IonutCava Tue 10 Feb, 2015 16:25:39 +0000

[Ionut]
- Simplified some Util-namespace level functions by using STL algorithms where possible
- Formatted the entire codebase using clang-format with the following style: "{BasedOnStyle: Google, IndentWidth: 4}"
- Attempted to make ProfileTimer thread-safe (temp fix until std::chrono works properly in Visual Studio)

343 Diff Diff IonutCava picture IonutCava Thu 15 Jan, 2015 17:30:12 +0000

[Ionut]
- Refactored 2 singletons into static classes (Console and TerrainLoader)
- Changed some C-casts to static_casts
- Updated copyright notices

262 k1ngp1n picture k1ngp1n Tue 06 May, 2014 21:04:00 +0000

[Ionut] [[BR]]
- Some AI refactoring (basic AIEntity <-> AESOP interoperability) [[BR]]
- Some render batch sorting code refactored and fixed (wasn’t properly sorted in FINAL_STAGE) [[BR]]
- Simplified RenderStateBlockDescriptor and deferred hash value calculation [[BR]]
- Basic draw call count implementation [[BR]]
- Renamed some classes [[BR]]