diff --git a/mini.cpp b/mini.cpp index a7afa78..46dbb7a 100644 --- a/mini.cpp +++ b/mini.cpp @@ -6,8 +6,9 @@ #include "gifenc.h" #include "jail_audio.h" #include "jshader.h" +#include -#define MAX_TEXTURES 100 +//#define MAX_TEXTURES 100 #ifdef MACOS_BUNDLE #include @@ -24,6 +25,13 @@ struct surface_t { uint32_t size; }; +struct font_t { + struct special_char_t { uint8_t character; SDL_Rect glyph; SDL_Point displacement; }; + int8_t spacing; + SDL_Rect characters[96]; + special_char_t specials[64]; +}; + int fps=0; int fps_counter=0; uint32_t fps_timer=0; @@ -38,7 +46,7 @@ bool screen_cursor = true; int desktop_width = 0; int desktop_height = 0; -surface_t surfaces[MAX_TEXTURES]; +std::vector surfaces; surface_t *screen_surface = &surfaces[0]; surface_t *dest_surface = screen_surface; surface_t *source_surface = NULL; @@ -173,12 +181,14 @@ void reinit() { ds::trans=0; ds::fill_pattern = 0b1111111111111111; ds::fill_trans = false; - for (int i=1; i