-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Application Démineur #96
Conversation
lib/graphics/src/color.hpp
Outdated
|
||
#define COLOR_WHITE graphics::packRGB565(255, 255, 255) | ||
#define COLOR_BLACK graphics::packRGB565(0, 0, 0) | ||
#define COLOR_RED graphics::packRGB565(255, 0, 0) | ||
#define COLOR_GREEN graphics::packRGB565(0, 128, 0) | ||
#define COLOR_BLUE graphics::packRGB565(0, 0, 255) | ||
|
||
#define COLOR_YELLOW graphics::packRGB565(255, 255, 0) | ||
#define COLOR_GREY graphics::packRGB565(128, 128, 128) | ||
#define COLOR_MAGENTA graphics::packRGB565(255, 0, 255) | ||
#define COLOR_CYAN graphics::packRGB565(0, 255, 255) | ||
#define COLOR_VIOLET graphics::packRGB565(128, 0, 128) | ||
#define COLOR_ORANGE graphics::packRGB565(255, 165, 0) | ||
#define COLOR_PINK graphics::packRGB565(255,192,203) | ||
|
||
#define COLOR_LIGHT_GREEN graphics::packRGB565(0, 255, 0) | ||
#define COLOR_LIGHT_ORANGE graphics::packRGB565(255, 213, 128) | ||
#define COLOR_LIGHT_BLUE graphics::packRGB565(173,216,230) | ||
#define COLOR_LIGHT_GREY graphics::packRGB565(211,211,211) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alors, le define
va juste remplacer naïvement l'ancien symbole par le nouveau,
donc dans le code, au lieu d'avoir une valeur statique, e.g. 0xFFFF
, il va avoir graphics::packRGB565(255, 255, 255)
,
qui est plus couteux (car je pense pas que le compileur change ça en une constante, mais que le calcul est bien effectué lors de l'exécution), donc il faudrait peut-être ajouter une fonction graphics::spackRGB565()
qui elle serait une constexpr
(ou l'équivalent pour les fonctions).
lib/lua/src/lua_file.cpp
Outdated
@@ -249,11 +249,17 @@ void LuaFile::load() | |||
"getY", &LuaWidget::getY, | |||
"getWidth", &LuaWidget::getWidth, | |||
"getHeight", &LuaWidget::getHeight, | |||
"setMainColor", &LuaWidget::setBackgroundColor, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dans le futur (actuellement on est bon), il faudrait pas retirer directement les fonctions mais attendre un peu avec un "deprecated".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oui parce que moi ça m'a pas aidé
No description provided.