summaryrefslogtreecommitdiff
path: root/src/game/assets.cpp
diff options
context:
space:
mode:
author2lag <96544487+2lag@users.noreply.github.com>2026-08-08 17:33:36 +0200
committer2lag <96544487+2lag@users.noreply.github.com>2026-08-08 17:33:36 +0200
commit2973df584978d9aae6f164ce0204179c8a28b3ae (patch)
treec1b793c8e0d17aeb66c5197bc28acca84b2c98ab /src/game/assets.cpp
parente540910745aad31378452eec25aacfb3f346191a (diff)
console, textbox changes, some other shit
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 ) {