mirror of
https://github.com/thepigeongenerator/tetris_clone.git
synced 2025-12-17 14:05:45 +01:00
add font
This commit is contained in:
BIN
assets/pixeldroid_botic-regular.ttf
Normal file
BIN
assets/pixeldroid_botic-regular.ttf
Normal file
Binary file not shown.
@@ -1 +0,0 @@
|
|||||||
uwu
|
|
||||||
@@ -26,7 +26,7 @@ void renderer_init(RenderData* const render_data, GameData const* const game_dat
|
|||||||
SDL_Renderer* const renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_PRESENTVSYNC);
|
SDL_Renderer* const renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_PRESENTVSYNC);
|
||||||
if (renderer == NULL) error(ERROR_SDL_RENDERER_INIT, "Renderer failed to be created! SDL Error: %s", SDL_GetError());
|
if (renderer == NULL) error(ERROR_SDL_RENDERER_INIT, "Renderer failed to be created! SDL Error: %s", SDL_GetError());
|
||||||
|
|
||||||
TTF_Font* const font = TTF_OpenFont("/usr/share/fonts/TTF/JetBrainsMono-Regular.ttf", PX_DENS);
|
TTF_Font* const font = TTF_OpenFont("pixeldroid_botic-regular.ttf", PX_DENS);
|
||||||
if (font == NULL) error(ERROR_SDL_FONT_INIT, "Failed to open font! TTF Error: %s", TTF_GetError());
|
if (font == NULL) error(ERROR_SDL_FONT_INIT, "Failed to open font! TTF Error: %s", TTF_GetError());
|
||||||
|
|
||||||
// initialize the render data
|
// initialize the render data
|
||||||
|
|||||||
Reference in New Issue
Block a user