- game->camera = PUSH_LT(
- lt,
- create_camera(renderer, game->font),
- destroy_camera);
- if (game->camera == NULL) {
- RETURN_LT(lt, NULL);
+ game->settings = create_settings();
+
+ game->renderer = renderer;
+
+ for (Cursor_Style style = 0; style < CURSOR_STYLE_N; ++style) {
+ game->cursor.texs[style] = PUSH_LT(
+ lt,
+ texture_from_bmp(cursor_style_tex_files[style], renderer),
+ SDL_DestroyTexture);
+ if (SDL_SetTextureBlendMode(
+ game->cursor.texs[style],
+ SDL_ComposeCustomBlendMode(
+ SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR,
+ SDL_BLENDFACTOR_ONE_MINUS_SRC_COLOR,
+ SDL_BLENDOPERATION_ADD,
+ SDL_BLENDFACTOR_ONE,
+ SDL_BLENDFACTOR_ZERO,
+ SDL_BLENDOPERATION_ADD)) < 0) {
+ log_warn("SDL error: %s\n", SDL_GetError());
+ }