|
@@ -87,8 +87,8 @@ Font font_load_from_file(SDL_Renderer *renderer, const char *file_path)
|
|
const size_t col = index % FONT_COLS;
|
|
const size_t col = index % FONT_COLS;
|
|
const size_t row = index / FONT_COLS;
|
|
const size_t row = index / FONT_COLS;
|
|
font.glyph_table[index] = (SDL_Rect) {
|
|
font.glyph_table[index] = (SDL_Rect) {
|
|
- .x = col * FONT_CHAR_WIDTH,
|
|
|
|
- .y = row * FONT_CHAR_HEIGHT,
|
|
|
|
|
|
+ .x = (int) col * FONT_CHAR_WIDTH,
|
|
|
|
+ .y = (int) row * FONT_CHAR_HEIGHT,
|
|
.w = FONT_CHAR_WIDTH,
|
|
.w = FONT_CHAR_WIDTH,
|
|
.h = FONT_CHAR_HEIGHT,
|
|
.h = FONT_CHAR_HEIGHT,
|
|
};
|
|
};
|
|
@@ -171,13 +171,17 @@ void render_cursor(SDL_Renderer *renderer, const Font *font)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
// TODO: move the cursor around
|
|
// TODO: move the cursor around
|
|
// TODO: Blinking cursor
|
|
// TODO: Blinking cursor
|
|
// TODO: Multiple lines
|
|
// TODO: Multiple lines
|
|
// TODO: Save/Load file
|
|
// TODO: Save/Load file
|
|
|
|
|
|
-int main(void)
|
|
|
|
|
|
+int main(int argc, char **argv)
|
|
{
|
|
{
|
|
|
|
+ (void) argc;
|
|
|
|
+ (void) argv;
|
|
|
|
+
|
|
scc(SDL_Init(SDL_INIT_VIDEO));
|
|
scc(SDL_Init(SDL_INIT_VIDEO));
|
|
|
|
|
|
SDL_Window *window =
|
|
SDL_Window *window =
|