-
Notifications
You must be signed in to change notification settings - Fork 1
Screen
fgrimau edited this page Dec 28, 2019
·
10 revisions
This class is there to handle every screen related thing, such as the creation of the window, the calculation of fps, the loading/stretching of images, the time advance,...
Screen()Screen(const Screen&)~Screen()
Screen& operator=(const Screen&)
int get_height() constint get_width() constSDL_Window* get_window() constSDL_Color get_background_color() constTTF_Font* get_font() constbool is_running() constbool get_key(SDL_Keycode)SDL_Rect get_mouse_pos() constSDL_Renderer* get_renderer() const
int set_height(int)int set_width(int)void set_background_color(SDL_Color)void set_background_color(Uint8, Uint8, Uint8)void toggle_fps_show()
int init()int build_window()SDL_Texture* convert_surface_to_texure(SDL_Surface*)int blit(SDL_Texture*, const SDL_Rect*, int, int)int blit(SDL_Texture*, const SDL_Rect*, int, int, int)int blit(SDL_Texture*, const SDL_Rect*, int, int, int, int)int blit(SDL_Texture*, const SDL_Rect*, SDL_Rect)void handle_events(SDL_Event*)void update_screen()void compute_fps()int m_widthint m_heightint m_tile_sizeUint32 m_start_timeUint32 m_time_elapsedUint32 m_time_since_last_fps_updateUint32 m_fpsbool m_runningbool m_showing_fpsSDL_Texture* m_fps_textureSDL_Surface* m_fps_surfaceSDL_Window* m_windowSDL_Renderer* m_RendererSDL_Color m_font_colorSDL_Color m_background_colorTTF_Font* m_fontSDL_Rect m_mouse_pos