From 2775c69238f7e72cbd07dba3e5b5333deb2c8153 Mon Sep 17 00:00:00 2001 From: Gladosse Date: Fri, 21 Jan 2022 17:54:40 +0100 Subject: [PATCH] est-ce que glados ignore les messages de gitea? @glados minor optimization --- sfml/main.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sfml/main.cpp b/sfml/main.cpp index d3e1c9b..ae30e17 100644 --- a/sfml/main.cpp +++ b/sfml/main.cpp @@ -7,7 +7,7 @@ #define SEG_WIDTH 90 const float CH_H = 3; const float CH_W = 1.5; -float CH_HY = 1; //0->flat +float CH_HY = 0; //0->flat sf::Color gray = sf::Color(84, 90, 112); sf::Color lightgray = sf::Color(183, 187, 201); @@ -71,7 +71,8 @@ void gen_road(struct Road* road, float zm = 1) { float w31 = 155 * (s / SEG_WIDTH); float h31 = 70 * (s / SEG_WIDTH); float w30 = 90 * (s / SEG_WIDTH); - float y31 = 178+7; //yes i know simple arithmetics + float h30 = 20 * (s / SEG_WIDTH); + float y31 = 178+h30; //yes i know simple arithmetics float h32 = 30 * (s / SEG_WIDTH); /*pillar*/ road->segments[16] = seg((w31 - w30) / -2, y31, 80, 155, 70, lightgray); @@ -96,7 +97,8 @@ void gen_road(struct Road* road, float zm = 1) { w31 = 155 * (s / SEG_WIDTH); h31 = 70 * (s / SEG_WIDTH); w30 = 90 * (s / SEG_WIDTH); - y31 = 190 + 7; //yes i know simple arithmetics + h30 = 20 * (s / SEG_WIDTH); + y31 = 190 + h30; //yes i know simple arithmetics h32 = 30 * (s / SEG_WIDTH); road->segments[31] = seg((w31-w30) / -2, y31, 120, 155, 70, lightgray); road->segments[32] = seg((w31 - w30) / -2, y31 - h31, 120, 33, 70, lightgray);