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
#include "stdafx.h"

#include "Headers/FlashScene.h"

#include "Core/Headers/StringHelper.h"
#include "Managers/Headers/SceneManager.h"
#include "Core/Time/Headers/ApplicationTimer.h"

namespace Divide {

void FlashScene::processInput(PlayerIndex idx, const U64 deltaTimeUS) {
    Scene::processInput(idx, deltaTimeUS);
}

void FlashScene::processGUI(const U64 deltaTimeUS) {
    D64 FpsDisplay = Time::SecondsToMilliseconds(0.3);
    if (_guiTimersMS[0] >= FpsDisplay) {
        _GUI->modifyText(_ID("fpsDisplay"),
                         Util::StringFormat("FPS: %3.0f. FrameTime: %3.1f",
                                            Time::ApplicationTimer::instance().getFps(),
                                            Time::ApplicationTimer::instance().getFrameTime()));
        _guiTimersMS[0] = 0.0;
    }
}

void FlashScene::processTasks(const U64 deltaTimeUS) {
    Scene::processTasks(deltaTimeUS);
}

bool FlashScene::load(const stringImpl& name) {
    // Load scene resources
    bool loadState = SCENE_LOAD(name, true, true);
    addLight(LightType::DIRECTIONAL, _sceneGraph->getRoot());
    _currentSky = addSky();
    return loadState;
}

bool FlashScene::loadResources(bool continueOnErrors) {
    _sunAngle = vec2<F32>(0.0f, Angle::to_RADIANS(45.0f));
    _sunvector =
        FColour(-cosf(_sunAngle.x) * sinf(_sunAngle.y), -cosf(_sunAngle.y),
                -sinf(_sunAngle.x) * sinf(_sunAngle.y), 0.0f);

    _guiTimersMS.push_back(0.0);
    i = 0;
    return true;
}

void FlashScene::postLoadMainThread() {
    _GUI->addText("fpsDisplay",                          // Unique ID
        RelativePosition2D(RelativeValue(0.0f, 60.0f),
                           RelativeValue(0.0f, 60.0f)),  // Position
        Font::DIVIDE_DEFAULT,                            // Font
        UColour(0, 64, 255, 255),                        // Colour
        Util::StringFormat("FPS: %d", 0));               // Text and arguments

    Scene::postLoadMainThread();
}

};

Commits for Divide-Framework/trunk/Source Code/Scenes/FlashScene/FlashScene.cpp

Diff revisions: vs.
Revision Author Commited Message
1004 Diff Diff IonutCava picture IonutCava Wed 20 Dec, 2017 17:16:32 +0000

[Ionut]
- More GUI cleanup (added multiple GUIButton events)
- Typedef vec4<U8> and vec4<F32> to UColour and FColour respectively for easier to read code.

1003 Diff Diff IonutCava picture IonutCava Tue 19 Dec, 2017 17:08:06 +0000

[Ionut]
- GUI cleanup

979 Diff Diff IonutCava picture IonutCava Tue 21 Nov, 2017 23:24:57 +0000

[Ionut]
- W.I.P. Rework GUI element positioning and scaling
- Update ImGUI and IMGUI_ADDONS

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

890 Diff Diff IonutCava picture IonutCava Sun 14 May, 2017 20:54:59 +0000

[Ionut]
- Add pre-compiled header support
- Initial code for per-stage tessellation computation

867 Diff Diff IonutCava picture IonutCava Mon 20 Feb, 2017 17:01:12 +0000

[IonutCava]
- Rename to_XNN and to_const_XNN functions to reflect the target data type they are converting to.
- Cleanup Angle namespace and remove all “inDegrees” parameters from rotation functions. Use aliases to differentiate between Degree and Radian parameters.
- Profile guided optimizations.

831 Diff Diff IonutCava picture IonutCava Wed 25 Jan, 2017 23:52:34 +0000

[IonutCava]
- More path related updates

816 Diff Diff IonutCava picture IonutCava Fri 13 Jan, 2017 17:05:20 +0000

[IonutCava]
- Allow per player scene state and input source
— Add SceneStatePerPlayer class
— Add device index to InputParams objects.
— ToDo: map players to devide indices

721 IonutCava picture IonutCava Wed 08 Jun, 2016 15:47:49 +0000

[IonutCava]
- Spelling: change all references from our code of “color” to the PROPER British version of “colour” because it sounds 100x better