mirror of
https://github.com/PoetryInCode/simple-rigid-sim.git
synced 2025-06-09 11:03:08 -04:00
formatting and gitignore
This commit is contained in:
parent
2f278ee26a
commit
8300f18761
4
.gitignore
vendored
4
.gitignore
vendored
@ -4,4 +4,6 @@
|
|||||||
|
|
||||||
.vscode
|
.vscode
|
||||||
|
|
||||||
bin/*
|
bin/*
|
||||||
|
|
||||||
|
.ccls-cache/*
|
||||||
|
@ -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());
|
||||||
}
|
}
|
||||||
@ -26,4 +26,4 @@ int Window::initUI() {
|
|||||||
-1,
|
-1,
|
||||||
SDL_RENDERER_ACCELERATED
|
SDL_RENDERER_ACCELERATED
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
10
src/Window.h
10
src/Window.h
@ -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);
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user