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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
/*
   Copyright (c) 2018 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 _WAR_SCENE_H
#define _WAR_SCENE_H

#include "Scenes/Headers/Scene.h"

namespace Divide {

class SkinnedSubMesh;
class NPC;

namespace AI {
class AITeam;
class AIEntity;
class WarSceneOrder;
};

class WarScene : public Scene {
   public:
    explicit WarScene(PlatformContext& context, ResourceCache& cache, SceneManager& parent, const stringImpl& name);
    ~WarScene();

    bool load(const stringImpl& name) override;
    void postLoadMainThread() override;
    bool loadResources(bool continueOnErrors) override;
    bool initializeAI(bool continueOnErrors) override;
    bool deinitializeAI(bool continueOnErrors) override;
    void processTasks(const U64 deltaTimeUS) override;
    void processGUI(const U64 deltaTimeUS) override;
    void updateSceneStateInternal(const U64 deltaTimeUS);
    U16 registerInputActions() override;

    void registerPoint(U16 teamID, const stringImpl& unitName);
    void printMessage(U8 eventId, const stringImpl& unitName);
    void debugDraw(const Camera& activeCamera, const RenderStagePass& stagePass, GFX::CommandBuffer& bufferInOut) override;

   private:
    void startSimulation(I64 btnGUID);
    void toggleCamera(InputParams param);
    bool removeUnits();
    bool addUnits();
    bool resetUnits();
    void checkGameCompletion();
    void weaponCollision(const RigidBodyComponent& collider);
    AI::AIEntity* findAI(SceneGraphNode* node);

   private:
    SceneGraphNode* _sun;
    GUIMessageBox* _infoBox;
    vectorImpl<SceneGraphNode*> _lightNodes;
    vectorImpl<std::pair<SceneGraphNode*, bool>> _lightNodes2;
    vectorImpl<SceneGraphNode*> _lightNodes3;

   private:  // Game
    U32  _timeLimitMinutes;
    U32  _scoreLimit;
    U32  _runCount;
    U64  _elapsedGameTime;
    bool _sceneReady;
    bool _resetUnits;
    U64 _lastNavMeshBuildTime;
    /// NPC's are the actual game entities
    vectorImpl<SceneGraphNode*> _armyNPCs[2];
    IMPrimitive* _targetLines;
    SceneGraphNode* _flag[2];
    SceneGraphNode* _particleEmitter;
    SceneGraphNode* _firstPersonWeapon;
    /// Teams are factions for AIEntites so they can manage friend/foe situations
    AI::AITeam* _faction[2];
};

};  // namespace Divide

#endif

Commits for Divide-Framework/trunk/Source Code/Scenes/WarScene/Headers/WarScene.h

Diff revisions: vs.
Revision Author Commited Message
1029 Diff Diff IonutCava picture IonutCava Tue 30 Jan, 2018 17:28:39 +0000

[Ionut]
- Update copyright notices

993 Diff Diff IonutCava picture IonutCava Sun 10 Dec, 2017 20:07:57 +0000

[Ionut]
- Finished initial port of the old scene graph system to the new ECS based system.
- Finished converting 2 components to the new ECS system: Transform and RigidBody
- Fixed the “Deploy” build error with the CEGUI OpenGL renderer.
- Compilation now needs C++14 support (it’s sufficiently wide-spread now)

992 Diff Diff IonutCava picture IonutCava Thu 07 Dec, 2017 18:01:51 +0000

[Ionut]
- Split PhysicsComponent into 2, ECS-based, components: TransformComponent and RigidBodyComponent
UNTESTED

990 Diff Diff IonutCava picture IonutCava Tue 05 Dec, 2017 17:20:10 +0000

[Ionut]
- Some SceneGraph and SceneGraphNode cleanup

968 Diff Diff IonutCava picture IonutCava Tue 07 Nov, 2017 17:32:31 +0000

[Ionut]
- Consistent naming between timing variables

957 Diff Diff IonutCava picture IonutCava Tue 31 Oct, 2017 17:15:51 +0000

[Ionut]
- Some SGN node search refactoring
- typedef PlayerIndex

950 Diff Diff IonutCava picture IonutCava Sun 22 Oct, 2017 22:25:05 +0000

[Ionut]
- Revamp camera management
- More work on improving the command buffer system:
— Performance tweaks
— Validation
— Debug features
- Some code cleanup for Object3D stuff (preRender/onRender changes)

Still haven’t fixed random flashing issue

933 Diff Diff IonutCava picture IonutCava Tue 15 Aug, 2017 00:02:05 +0000

[Ionut]
- CommandBuffer Part 2/3: code compiles and splash screen renders and application doesn’t crash (still has drawing issues)

851 Diff Diff IonutCava picture IonutCava Mon 06 Feb, 2017 23:38:14 +0000

[IonutCava]
- Replaced most RenderStage params with RenderStagePass types
- More work on water rendering

836 IonutCava picture IonutCava Fri 27 Jan, 2017 14:59:56 +0000

[IonutCava]
- Update copyright notice