-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNobleDesktop.cpp
More file actions
51 lines (40 loc) · 1.12 KB
/
NobleDesktop.cpp
File metadata and controls
51 lines (40 loc) · 1.12 KB
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
#include "NobleDesktop.h"
namespace Noble::Desktop
{
NobleDesktop::NobleDesktop() :
renderWindow(sf::VideoMode({640, 360}), "NobleDesktop"),
bufferTexture({64, 36}),
bufferSprite(bufferTexture.getTexture())
{
renderWindow.setView(sf::View(sf::Vector2f(32, 18), sf::Vector2f(64 , 36)));
}
void NobleDesktop::Initialise()
{
}
void NobleDesktop::Update()
{
if (renderWindow.isOpen())
{
while (const std::optional<sf::Event> event = renderWindow.pollEvent())
{
if (event->is<sf::Event::Closed>())
{
renderWindow.close();
}
bufferTexture.clear();
//Draw stuff here
bufferTexture.display();
renderWindow.clear();
renderWindow.draw(bufferSprite);
renderWindow.display();
}
}
}
void NobleDesktop::SetPixel(int x, int y, bool value)
{
}
bool NobleDesktop::GetPixel(int x, int y)
{
return false;
}
} // Noble::Desktop