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

4
.gitignore vendored
View File

@ -4,4 +4,6 @@
.vscode
bin/*
bin/*
.ccls-cache/*

View File

@ -1,17 +1,17 @@
#include "Window.h"
int Window::setClearColor(Color c) {
void Window::setClearColor(Color 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].g = g;
clearColor[0].b = b;
clearColor[0].a = a;
}
int Window::initUI() {
void Window::initUI() {
if(SDL_Init(SDL_INIT_EVERYTHING) != 0) {
fprintf(stderr,"\033[92m[ ERROR ] Could not initialize SDL:\n%s\n", SDL_GetError());
}
@ -26,4 +26,4 @@ int Window::initUI() {
-1,
SDL_RENDERER_ACCELERATED
);
}
}

View File

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