1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 11:33:03 +01:00

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
2017-03-26 21:42:07 +01:00
committed by Gymnasiast
parent 7163973bd2
commit bd9839ff50
47 changed files with 208 additions and 153 deletions

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;