summaryrefslogtreecommitdiff
path: root/src/game/assets.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/assets.cpp')
-rw-r--r--src/game/assets.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/game/assets.cpp b/src/game/assets.cpp
index 62663a9..6ee7aff 100644
--- a/src/game/assets.cpp
+++ b/src/game/assets.cpp
@@ -9,6 +9,18 @@
void assets_init( GAME_DATA *game ) {
game->assets.test = gl_texture_from_file( game->gl, "uvtest.png" );
game->assets.fonts_init = 0;
+
+ for( I32 idx = 0; idx < SDL_NUM_SYSTEM_CURSORS; ++idx )
+ game->assets.cursors[idx] = SDL_CreateSystemCursor( (SDL_SystemCursor)idx );
+}
+
+void assets_destroy( GAME_DATA* game ) {
+ for( I32 idx = 0; idx < SDL_NUM_SYSTEM_CURSORS; ++idx ) {
+ if( !game->assets.cursors[idx] )
+ continue;
+ SDL_FreeCursor( game->assets.cursors[idx] );
+ game->assets.cursors[idx] = 0;
+ }
}
void assets_create_fonts( struct GAME_DATA *game ) {