From fb4dc48add6939a9eb63c177f55c169f31154648 Mon Sep 17 00:00:00 2001 From: Justin Scofield <47263509+scawful@users.noreply.github.com> Date: Mon, 8 Aug 2022 08:31:02 -0400 Subject: [PATCH] chore: make window dimensions a constant --- src/app/core/constants.h | 7 +++++++ src/app/core/controller.cc | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/app/core/constants.h b/src/app/core/constants.h index 54eba4c7..9cb5e80f 100644 --- a/src/app/core/constants.h +++ b/src/app/core/constants.h @@ -39,6 +39,13 @@ namespace yaze { namespace app { namespace core { +//=========================================================================================== +// Window Variables +//=========================================================================================== + +constexpr int kScreenWidth = 1200; +constexpr int kScreenHeight = 800; + //=========================================================================================== // 65816 LanguageDefinition //=========================================================================================== diff --git a/src/app/core/controller.cc b/src/app/core/controller.cc index 4930d166..cd7fcf11 100644 --- a/src/app/core/controller.cc +++ b/src/app/core/controller.cc @@ -154,8 +154,8 @@ absl::Status Controller::CreateWindow() { SDL_CreateWindow("Yet Another Zelda3 Editor", // window title SDL_WINDOWPOS_UNDEFINED, // initial x position SDL_WINDOWPOS_UNDEFINED, // initial y position - 1200, // width, in pixels - 800, // height, in pixels + kScreenWidth, // width, in pixels + kScreenHeight, // height, in pixels SDL_WINDOW_RESIZABLE | SDL_WINDOW_OPENGL), sdl_deleter()); if (window_ == nullptr) {