includes are accurate and formatted
This commit is contained in:
@@ -1,27 +1,27 @@
|
|||||||
#include "Window.h"
|
#include "Window.h"
|
||||||
|
|
||||||
|
#include <SDL2/SDL.h>
|
||||||
|
|
||||||
namespace yaze {
|
namespace yaze {
|
||||||
namespace Application {
|
namespace Application {
|
||||||
namespace Core {
|
namespace Core {
|
||||||
|
|
||||||
// TODO: pass in the size of the window as argument
|
// TODO: pass in the size of the window as argument
|
||||||
void Window::Create() {
|
void Window::Create() {
|
||||||
if (SDL_Init(SDL_INIT_EVERYTHING)) {
|
if (SDL_Init(SDL_INIT_EVERYTHING)) {
|
||||||
SDL_Log("SDL_Init: %s\n", SDL_GetError());
|
SDL_Log("SDL_Init: %s\n", SDL_GetError());
|
||||||
} else {
|
} else {
|
||||||
window = SDL_CreateWindow("Yet Another Zelda3 Editor", // window title
|
window = SDL_CreateWindow("Yet Another Zelda3 Editor", // window title
|
||||||
SDL_WINDOWPOS_UNDEFINED, // initial x position
|
SDL_WINDOWPOS_UNDEFINED, // initial x position
|
||||||
SDL_WINDOWPOS_UNDEFINED, // initial y position
|
SDL_WINDOWPOS_UNDEFINED, // initial y position
|
||||||
1200, // width, in pixels
|
1200, // width, in pixels
|
||||||
800, // height, in pixels
|
800, // height, in pixels
|
||||||
SDL_WINDOW_RESIZABLE // window flags
|
SDL_WINDOW_RESIZABLE // window flags
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_Window* Window::Get() {
|
SDL_Window* Window::Get() { return window; }
|
||||||
return window;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Window::Destroy() {
|
void Window::Destroy() {
|
||||||
SDL_DestroyWindow(window);
|
SDL_DestroyWindow(window);
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ namespace Core {
|
|||||||
class Window {
|
class Window {
|
||||||
public:
|
public:
|
||||||
void Create();
|
void Create();
|
||||||
SDL_Window* Get();
|
|
||||||
void Destroy();
|
void Destroy();
|
||||||
|
SDL_Window* Get();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SDL_Window* window = nullptr;
|
SDL_Window* window = nullptr;
|
||||||
|
|||||||
Reference in New Issue
Block a user