flood-it: Fixed buttons position #193

Merged
mxlgv merged 1 commits from flood-it-fix-buttons-position into main 2025-04-03 12:32:22 +02:00
2 changed files with 6 additions and 2 deletions

View File

@@ -225,8 +225,10 @@ void draw_window()
// Main buttons to fill the board // Main buttons to fill the board
#define FILL_BUTTON_SIZE BUTTON_SIZE+8 #define FILL_BUTTON_SIZE BUTTON_SIZE+8
for (i=0;i<6;i++) for (i=0;i<6;i++) {
DefineButton(i%3*FILL_BUTTON_SIZE+17,i/3*FILL_BUTTON_SIZE+15,FILL_BUTTON_SIZE,FILL_BUTTON_SIZE, i+100,FIELD_COLORS[i]); DefineButton(i%3*FILL_BUTTON_SIZE+17,calc(i/3)*FILL_BUTTON_SIZE+15,
FILL_BUTTON_SIZE,FILL_BUTTON_SIZE, i+100,FIELD_COLORS[i]);
}
// Menu buttons // Menu buttons
for (i=0;i<3;i++) for (i=0;i<3;i++)

View File

@@ -27,6 +27,8 @@ dword I_Path = 0;
#define true 1 #define true 1
#define false 0 #define false 0
inline fastcall dword calc(EAX) { return EAX; }
mxlgv marked this conversation as resolved Outdated
Outdated
Review

What kind of hack is this? Is there no other way to fix this by optimization or something?

What kind of hack is this? Is there no other way to fix this by optimization or something?
Outdated
Review

It turns out C-- doesn't support parentheses and this is a workaround.

It turns out C-- doesn't support parentheses and this is a workaround.
//------------------------------------------------------------------------- //-------------------------------------------------------------------------