Skip to content
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

Merged
merged 10 commits into from
Sep 22, 2024
Merged

Conversation

pymuzard
Copy link
Contributor

No description provided.

Comment on lines 23 to 41

#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)
Copy link
Member

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).

@@ -249,11 +249,17 @@ void LuaFile::load()
"getY", &LuaWidget::getY,
"getWidth", &LuaWidget::getWidth,
"getHeight", &LuaWidget::getHeight,
"setMainColor", &LuaWidget::setBackgroundColor,
Copy link
Member

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".

Copy link
Contributor

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é

@paxo-rch paxo-rch merged commit c199308 into paxo-phone:main Sep 22, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants