X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Feditor.c;h=8ea4472cef8931abc2f9514461f5716795d72090;hb=0a87fde47bcff35f196024766f8d0d00319a28d1;hp=6ec17e91ef08e8cfd5ebbc684f8c601686cf8b1c;hpb=59c2e609872b70cb4c458004cd9e2fe22c86a54b;p=rocksndiamonds.git diff --git a/src/editor.c b/src/editor.c index 6ec17e91..8ea4472c 100644 --- a/src/editor.c +++ b/src/editor.c @@ -18,11 +18,29 @@ #include "buttons.h" #include "files.h" +/* positions in the level editor */ +#define ED_WIN_MB_LEFT_XPOS 7 +#define ED_WIN_MB_LEFT_YPOS 6 +#define ED_WIN_LEVELNR_XPOS 77 +#define ED_WIN_LEVELNR_YPOS 7 +#define ED_WIN_MB_MIDDLE_XPOS 7 +#define ED_WIN_MB_MIDDLE_YPOS 258 +#define ED_WIN_MB_RIGHT_XPOS 77 +#define ED_WIN_MB_RIGHT_YPOS 258 + +/* other constants for the editor */ +#define ED_SCROLL_NO 0 +#define ED_SCROLL_LEFT 1 +#define ED_SCROLL_RIGHT 2 +#define ED_SCROLL_UP 4 +#define ED_SCROLL_DOWN 8 + +/* delay value to avoid too fast scrolling etc. */ #define CHOICE_DELAY_VALUE 100 static int level_xpos,level_ypos; -static BOOL edit_mode; -static BOOL name_typing; +static boolean edit_mode; +static boolean name_typing; static int new_element1 = EL_MAUERWERK; static int new_element2 = EL_LEERRAUM; static int new_element3 = EL_ERDREICH; @@ -638,7 +656,7 @@ void LevelEd(int mx, int my, int button) { static int last_button = 0; static int in_field_pressed = FALSE; - static BOOL use_floodfill = FALSE; + static boolean use_floodfill = FALSE; int x = (mx-SX)/MINI_TILEX; int y = (my-SY)/MINI_TILEY;