formatting and gitignore

This commit is contained in:
Solomon W. 2020-06-03 17:15:04 -04:00
parent 2f278ee26a
commit 8300f18761
3 changed files with 12 additions and 10 deletions

2
.gitignore vendored
View File

@ -5,3 +5,5 @@
.vscode .vscode
bin/* bin/*
.ccls-cache/*

View File

@ -1,17 +1,17 @@
#include "Window.h" #include "Window.h"
int Window::setClearColor(Color c) { void Window::setClearColor(Color c) {
clearColor = &c; clearColor = &c;
} }
int Window::setClearColor(uint8_t r,Uint8 g,Uint8 b,Uint8 a) { void Window::setClearColor(uint8_t r,Uint8 g,Uint8 b,Uint8 a) {
clearColor[0].r = r; clearColor[0].r = r;
clearColor[0].g = g; clearColor[0].g = g;
clearColor[0].b = b; clearColor[0].b = b;
clearColor[0].a = a; clearColor[0].a = a;
} }
int Window::initUI() { void Window::initUI() {
if(SDL_Init(SDL_INIT_EVERYTHING) != 0) { if(SDL_Init(SDL_INIT_EVERYTHING) != 0) {
fprintf(stderr,"\033[92m[ ERROR ] Could not initialize SDL:\n%s\n", SDL_GetError()); fprintf(stderr,"\033[92m[ ERROR ] Could not initialize SDL:\n%s\n", SDL_GetError());
} }

View File

@ -7,8 +7,8 @@ class Window {
Color *clearColor = new Color(BLACK); Color *clearColor = new Color(BLACK);
SDL_Window *win; SDL_Window *win;
SDL_Renderer *rend; SDL_Renderer *rend;
virtual int update() {}; virtual int update();
int initUI() {}; void initUI();
int setClearColor(Color c) {}; void setClearColor(Color c);
int setClearColor(Uint8 r,Uint8 g,Uint8 b,Uint8 a) {}; void setClearColor(Uint8 r,Uint8 g,Uint8 b,Uint8 a);
}; };