Get the game working

Mostly just needed to resolve screen size which is now retrieved via ui context.
This commit is contained in:
Ted John authored and Gymnasiast committed 2017-05-29 22:38:43 +02:00
1 parent 7163973bd2
commit bd9839ff50
47 files changed
+208 -153

No files matched your search

+11 -11
View File
@@ -22,7 +22,17 @@
using namespace OpenRCT2::Ui;
CursorRepository::CursorRepository()
CursorRepository::~CursorRepository()
{
for (size_t i = 0; i < CURSOR_COUNT; i++)
{
SDL_FreeCursor(_loadedCursors[i]);
_loadedCursors[i] = nullptr;
}
_currentCursor = CURSOR_UNDEFINED;
}
void CursorRepository::LoadCursors()
{
// Using system cursors
_loadedCursors[CURSOR_ARROW] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_ARROW);
@@ -42,16 +52,6 @@ CursorRepository::CursorRepository()
SetCurrentCursor(CURSOR_ARROW);
}
CursorRepository::~CursorRepository()
{
for (size_t i = 0; i < CURSOR_COUNT; i++)
{
SDL_FreeCursor(_loadedCursors[i]);
_loadedCursors[i] = nullptr;
}
_currentCursor = CURSOR_UNDEFINED;
}
CURSOR_ID CursorRepository::GetCurrentCursor()
{
return _currentCursor;