Added proof of concept code to render some text to the screen. Split up the two 'screens' that'll be using to keep the code clean.
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
#ifndef _CPU_DISPLAY_H
|
||||
#define _CPU_DISPLAY_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <SDL2/SDL.h>
|
||||
#include <SDL2/SDL_rect.h>
|
||||
#include <SDL2/SDL_render.h>
|
||||
#include <SDL2/SDL_surface.h>
|
||||
#include <SDL2/SDL_ttf.h>
|
||||
#include <SDL2/SDL_pixels.h>
|
||||
|
||||
#define CPU_STATS_DISPLAY_WIDTH 640
|
||||
#define CPU_STATS_DISPLAY_HEIGHT 480
|
||||
#define CPU_STATS_DISPLAY_COLUMN_COUNT 40
|
||||
#define CPU_STATS_DISPLAY_ROW_COUNT 30
|
||||
|
||||
static const char *cpu_display_header_text = "CPU State";
|
||||
|
||||
void renderStatsBox(SDL_Renderer *, TTF_Font *, char *);
|
||||
void renderBorderAndHeader(SDL_Renderer *, TTF_Font *);
|
||||
|
||||
#endif
|
||||
+6
-1
@@ -1,13 +1,18 @@
|
||||
#ifndef _VSCREEN_H
|
||||
#define _VSCREEN_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <SDL2/SDL.h>
|
||||
#include <SDL2/SDL_image.h>
|
||||
#include <SDL2/SDL_rect.h>
|
||||
#include <SDL2/SDL_render.h>
|
||||
|
||||
#define VSCREEN_WIDTH 640
|
||||
#define VSCREEN_HEIGHT 480
|
||||
#define VSCREEN_COLUMN_COUNT 20
|
||||
#define VSCREEN_COLUMN_COUNT 40
|
||||
#define VSCREEN_ROW_COUNT 20
|
||||
|
||||
void renderClientScreen(SDL_Renderer *);
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user