WIP Some tweaks

Add define macro for DEFAULT_WIDTH and DEFAULT_HEIGHT.
Disable drawing outline for Tris.
This commit is contained in:
Stephen Seo 2021-03-31 22:15:50 +09:00
parent 61e336786f
commit 0403d0d646
3 changed files with 9 additions and 7 deletions

View file

@ -14,6 +14,8 @@
#define SHOW_HELP_WIDTH (state->get_width() / 2.0f) #define SHOW_HELP_WIDTH (state->get_width() / 2.0f)
#define SHOW_HELP_HEIGHT (state->get_height() / 2.0f) #define SHOW_HELP_HEIGHT (state->get_height() / 2.0f)
#define DEFAULT_WIDTH 800
#define DEFAULT_HEIGHT 600
#define CHANGE_SIZE_MIN_X 800 #define CHANGE_SIZE_MIN_X 800
#define CHANGE_SIZE_MAX_X 1920 #define CHANGE_SIZE_MAX_X 1920
#define CHANGE_SIZE_MIN_Y 600 #define CHANGE_SIZE_MIN_Y 600

View file

@ -13,8 +13,8 @@
#define STARTING_HELP_FADE_RATE 0.2f #define STARTING_HELP_FADE_RATE 0.2f
Tri::State::State(int argc, char **argv) : Tri::State::State(int argc, char **argv) :
width(800), width(DEFAULT_WIDTH),
height(600), height(DEFAULT_HEIGHT),
dt(1.0f/60.0f), dt(1.0f/60.0f),
notificationAlpha(1.0f), notificationAlpha(1.0f),
trisIndex(0), trisIndex(0),

View file

@ -35,11 +35,11 @@ Tri::Shape& Tri::Triangle::draw() {
{transformed[1].x, transformed[1].y}, {transformed[1].x, transformed[1].y},
{transformed[2].x, transformed[2].y}, {transformed[2].x, transformed[2].y},
fillColor); fillColor);
DrawTriangleLines( // DrawTriangleLines(
{transformed[0].x, transformed[0].y}, // {transformed[0].x, transformed[0].y},
{transformed[1].x, transformed[1].y}, // {transformed[1].x, transformed[1].y},
{transformed[2].x, transformed[2].y}, // {transformed[2].x, transformed[2].y},
outlineColor); // outlineColor);
return *this; return *this;
} }