|
|
@ -788,11 +788,19 @@ Rush Hour database from Michael Fogleman.\n\n") |
|
|
|
(in-data-dir "Font.bmp") renderer)) |
|
|
|
(unless font-texture (return 1)) |
|
|
|
|
|
|
|
(var textures-to-destroy ([] (* SDL_Texture)) |
|
|
|
(array background-texture |
|
|
|
grid-texture |
|
|
|
pieces-texture |
|
|
|
win-texture |
|
|
|
theme-button-texture |
|
|
|
undo-button-texture |
|
|
|
font-texture)) |
|
|
|
|
|
|
|
(sdl-print-time-delta start-load-ticks "Textures loaded") |
|
|
|
|
|
|
|
(srand (type-cast (SDL_GetPerformanceCounter) int)) |
|
|
|
|
|
|
|
;; TODO NEXT: display turn count |
|
|
|
;; (game-board-load "IBBxooIooLDDJAALooJoKEEMFFKooMGGHHHM") |
|
|
|
(game-board-load-next-puzzle) |
|
|
|
|
|
|
@ -1051,20 +1059,10 @@ Rush Hour database from Michael Fogleman.\n\n") |
|
|
|
|
|
|
|
(when g-puzzle-list (free (type-cast g-puzzle-list (* void)))) |
|
|
|
|
|
|
|
(SDL_DestroyTexture background-texture) |
|
|
|
(set background-texture null) |
|
|
|
(SDL_DestroyTexture grid-texture) |
|
|
|
(set grid-texture null) |
|
|
|
(SDL_DestroyTexture pieces-texture) |
|
|
|
(set pieces-texture null) |
|
|
|
(SDL_DestroyTexture win-texture) |
|
|
|
(set win-texture null) |
|
|
|
(SDL_DestroyTexture theme-button-texture) |
|
|
|
(set theme-button-texture null) |
|
|
|
(SDL_DestroyTexture undo-button-texture) |
|
|
|
(set undo-button-texture null) |
|
|
|
(SDL_DestroyTexture font-texture) |
|
|
|
(set undo-button-texture null) |
|
|
|
(var i int 0) |
|
|
|
(while (< i (array-size textures-to-destroy)) |
|
|
|
(SDL_DestroyTexture (at i textures-to-destroy)) |
|
|
|
(incr i)) |
|
|
|
|
|
|
|
(SDL_DestroyRenderer renderer) |
|
|
|
|
|
|
|