From efd80a08bd5de21956872a615f1d03f2dd90cee2 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sat, 23 Jan 1999 02:04:27 +0100 Subject: [PATCH] rnd-19990123-1 --- src/editor.c | 100 ++++++++++++++++++++++++++++++++++++++++++++------ src/files.c | 81 ++++++++++++++++++++-------------------- src/main.h | 100 ++++++++++++++++++++++++++------------------------ src/misc.c | 33 ++++++++++++++--- src/screens.c | 16 ++++++-- src/tools.c | 5 ++- 6 files changed, 229 insertions(+), 106 deletions(-) diff --git a/src/editor.c b/src/editor.c index 8570bd19..65c9f33f 100644 --- a/src/editor.c +++ b/src/editor.c @@ -11,6 +11,8 @@ * editor.c * ***********************************************************/ +#include + #include "editor.h" #include "screens.h" #include "tools.h" @@ -135,14 +137,14 @@ #define ED_CTRL_ID_SINGLE_ITEMS 0 #define ED_CTRL_ID_CONNECTED_ITEMS 1 #define ED_CTRL_ID_LINE 2 -#define ED_CTRL_ID_TEXT 3 +#define ED_CTRL_ID_ARC 3 #define ED_CTRL_ID_RECTANGLE 4 #define ED_CTRL_ID_FILLED_BOX 5 #define ED_CTRL_ID_WRAP_UP 6 -#define ED_CTRL_ID_PROPERTIES 7 +#define ED_CTRL_ID_TEXT 7 #define ED_CTRL_ID_FLOOD_FILL 8 #define ED_CTRL_ID_WRAP_LEFT 9 -#define ED_CTRL_ID_UNUSED1 10 +#define ED_CTRL_ID_PROPERTIES 10 #define ED_CTRL_ID_WRAP_RIGHT 11 #define ED_CTRL_ID_RANDOM_PLACEMENT 12 #define ED_CTRL_ID_GRAB_BRUSH 13 @@ -246,14 +248,14 @@ static struct { 's', "draw single items" }, { 'd', "draw connected items" }, { 'l', "draw lines" }, - { 't', "enter text elements" }, + { 'a', "draw arcs" }, { 'r', "draw outline rectangles" }, { 'R', "draw filled rectangles" }, { '\0', "wrap (rotate) level up" }, - { '?', "properties of drawing element" }, + { 't', "enter text elements" }, { 'f', "flood fill" }, { '\0', "wrap (rotate) level left" }, - { '\0', "" }, + { '?', "properties of drawing element" }, { '\0', "wrap (rotate) level right" }, { '\0', "random element placement" }, { 'b', "grab brush" }, @@ -902,6 +904,7 @@ static void CreateControlButtons() if (id == ED_CTRL_ID_SINGLE_ITEMS || id == ED_CTRL_ID_CONNECTED_ITEMS || id == ED_CTRL_ID_LINE || + id == ED_CTRL_ID_ARC || id == ED_CTRL_ID_TEXT || id == ED_CTRL_ID_RECTANGLE || id == ED_CTRL_ID_FILLED_BOX || @@ -2768,8 +2771,7 @@ static void DrawLine(int from_x, int from_y, int to_x, int to_y, for (x=0; x<=len_x; x++) { - int y = (int)(a * x + 0.5) * (to_y < from_y ? -1 : +1); - + y = (int)(a * x + 0.5) * (to_y < from_y ? -1 : +1); DrawLineElement(from_x + x, from_y + y, element, change_level); } } @@ -2782,8 +2784,7 @@ static void DrawLine(int from_x, int from_y, int to_x, int to_y, for (y=0; y<=len_y; y++) { - int x = (int)(a * y + 0.5) * (to_x < from_x ? -1 : +1); - + x = (int)(a * y + 0.5) * (to_x < from_x ? -1 : +1); DrawLineElement(from_x + x, from_y + y, element, change_level); } } @@ -2811,6 +2812,76 @@ static void DrawFilledBox(int from_x, int from_y, int to_x, int to_y, DrawLine(from_x, y, to_x, y, element, change_level); } +static void DrawArcExt(int from_x, int from_y, int to_x2, int to_y2, + int element, boolean change_level) +{ + int to_x = to_x2 - (to_x2 > from_x ? +1 : -1); + int to_y = to_y2 - (to_y2 > from_y ? +1 : -1); + int len_x = ABS(to_x - from_x); + int len_y = ABS(to_y - from_y); + int radius, x, y; + + radius = (int)(sqrt((float)(len_x * len_x + len_y * len_y)) + 0.5); + + /* not optimal (some points get drawn twice) but simple, + and fast enough for the few points we are drawing */ + + for (x=0; x<=radius; x++) + { + int sx, sy, lx, ly; + + y = (int)(sqrt((float)(radius * radius - x * x)) + 0.5); + + sx = from_x + x * (from_x < to_x2 ? +1 : -1); + sy = from_y + y * (from_y < to_y2 ? +1 : -1); + lx = sx + level_xpos; + ly = sy + level_ypos; + + if (IN_ED_FIELD(sx, sy) && IN_LEV_FIELD(lx, ly)) + DrawLineElement(sx, sy, element, change_level); + } + + for (y=0; y<=radius; y++) + { + int sx, sy, lx, ly; + + x = (int)(sqrt((float)(radius * radius - y * y)) + 0.5); + + sx = from_x + x * (from_x < to_x2 ? +1 : -1); + sy = from_y + y * (from_y < to_y2 ? +1 : -1); + lx = sx + level_xpos; + ly = sy + level_ypos; + + if (IN_ED_FIELD(sx, sy) && IN_LEV_FIELD(lx, ly)) + DrawLineElement(sx, sy, element, change_level); + } +} + +static void DrawArc(int from_x, int from_y, int to_x, int to_y, + int element, boolean change_level) +{ + int to_x2 = to_x + (to_x < from_x ? -1 : +1); + int to_y2 = to_y + (to_y > from_y ? +1 : -1); + + DrawArcExt(from_x, from_y, to_x2, to_y2, element, change_level); +} + +#if 0 +static void DrawCircle(int from_x, int from_y, int to_x, int to_y, + int element, boolean change_level) +{ + int to_x2 = to_x + (to_x < from_x ? -1 : +1); + int to_y2 = to_y + (to_y > from_y ? +1 : -1); + int mirror_to_x2 = from_x - (to_x2 - from_x); + int mirror_to_y2 = from_y - (to_y2 - from_y); + + DrawArcExt(from_x, from_y, to_x2, to_y2, element, change_level); + DrawArcExt(from_x, from_y, mirror_to_x2, to_y2, element, change_level); + DrawArcExt(from_x, from_y, to_x2, mirror_to_y2, element, change_level); + DrawArcExt(from_x, from_y, mirror_to_x2, mirror_to_y2, element,change_level); +} +#endif + static void DrawAreaBorder(int from_x, int from_y, int to_x, int to_y) { int from_sx, from_sy; @@ -3400,6 +3471,7 @@ static void HandleDrawingAreas(struct GadgetInfo *gi) break; case ED_CTRL_ID_LINE: + case ED_CTRL_ID_ARC: case ED_CTRL_ID_RECTANGLE: case ED_CTRL_ID_FILLED_BOX: case ED_CTRL_ID_GRAB_BRUSH: @@ -3413,6 +3485,8 @@ static void HandleDrawingAreas(struct GadgetInfo *gi) if (drawing_function == ED_CTRL_ID_LINE) draw_func = DrawLine; + else if (drawing_function == ED_CTRL_ID_ARC) + draw_func = DrawArc; else if (drawing_function == ED_CTRL_ID_RECTANGLE) draw_func = DrawRectangle; else if (drawing_function == ED_CTRL_ID_FILLED_BOX) @@ -3756,6 +3830,7 @@ static void HandleControlButtons(struct GadgetInfo *gi) case ED_CTRL_ID_SINGLE_ITEMS: case ED_CTRL_ID_CONNECTED_ITEMS: case ED_CTRL_ID_LINE: + case ED_CTRL_ID_ARC: case ED_CTRL_ID_TEXT: case ED_CTRL_ID_RECTANGLE: case ED_CTRL_ID_FILLED_BOX: @@ -4112,6 +4187,9 @@ static void HandleDrawingAreaInfo(struct GadgetInfo *gi) case ED_CTRL_ID_LINE: infotext = "Drawing line"; break; + case ED_CTRL_ID_ARC: + infotext = "Drawing arc"; + break; case ED_CTRL_ID_TEXT: infotext = "Setting text cursor"; break; @@ -4149,7 +4227,7 @@ static void HandleDrawingAreaInfo(struct GadgetInfo *gi) /* misuse this function to draw brush cursor, if needed */ if (edit_mode == ED_MODE_DRAWING && draw_with_brush && !button_status) { - if (IN_ED_FIELD(sx,sy) && IN_LEV_FIELD(lx, ly)) + if (IN_ED_FIELD(sx, sy) && IN_LEV_FIELD(lx, ly)) CopyBrushToCursor(sx, sy); else DeleteBrushFromCursor(); diff --git a/src/files.c b/src/files.c index e56759e0..77585d6c 100644 --- a/src/files.c +++ b/src/files.c @@ -290,8 +290,8 @@ static void setLevelInfoToDefaults() level.high_speed = FALSE; - strcpy(level.name, "Nameless Level"); - strcpy(level.author, "Anonymous"); + strcpy(level.name, NAMELESS_LEVEL_NAME); + strcpy(level.author, ANONYMOUS_NAME); for(i=0; iname = getStringCopy("non-existing"); - ldi->author = NULL; + ldi->name = getStringCopy(ANONYMOUS_NAME); + ldi->author = getStringCopy(ANONYMOUS_NAME); ldi->levels = 0; ldi->first_level = 0; ldi->sort_priority = LEVELCLASS_UNDEFINED; /* default: least priority */ @@ -1408,7 +1407,7 @@ int getLastPlayedLevelOfLevelSeries(char *level_series_name) { char *token_value; int level_series_nr = getLevelSeriesNrFromLevelSeriesName(level_series_name); - int last_level_nr = 0; + int last_level_nr = leveldir[level_series_nr].first_level; if (!level_series_name) return 0; @@ -1563,9 +1562,13 @@ static void SaveUserLevelInfo() return; } + /* always start with reliable default values */ + setLevelDirInfoToDefaults(&ldi); + ldi.name = getLoginName(); + ldi.author = getRealName(); ldi.levels = 100; - ldi.first_level = 0; + ldi.first_level = 1; ldi.sort_priority = LEVELCLASS_USER_START; ldi.readonly = FALSE; diff --git a/src/main.h b/src/main.h index 00d49ab9..121b1081 100644 --- a/src/main.h +++ b/src/main.h @@ -479,8 +479,8 @@ extern int num_bg_loops; /* often used screen positions */ #define SX 8 #define SY 8 -#define REAL_SX (SX-2) -#define REAL_SY (SY-2) +#define REAL_SX (SX - 2) +#define REAL_SY (SY - 2) #define DX 566 #define DY 60 #define VX DX @@ -489,29 +489,29 @@ extern int num_bg_loops; #define EY (VY - 44) #define TILEX 32 #define TILEY 32 -#define MINI_TILEX (TILEX/2) -#define MINI_TILEY (TILEY/2) -#define MICRO_TILEX (TILEX/8) -#define MICRO_TILEY (TILEY/8) -#define MIDPOSX (SCR_FIELDX/2) -#define MIDPOSY (SCR_FIELDY/2) -#define SXSIZE (SCR_FIELDX*TILEX) -#define SYSIZE (SCR_FIELDY*TILEY) -#define FXSIZE ((SCR_FIELDX+2)*TILEX) -#define FYSIZE ((SCR_FIELDY+2)*TILEY) +#define MINI_TILEX (TILEX / 2) +#define MINI_TILEY (TILEY / 2) +#define MICRO_TILEX (TILEX / 8) +#define MICRO_TILEY (TILEY / 8) +#define MIDPOSX (SCR_FIELDX / 2) +#define MIDPOSY (SCR_FIELDY / 2) +#define SXSIZE (SCR_FIELDX * TILEX) +#define SYSIZE (SCR_FIELDY * TILEY) +#define FXSIZE ((SCR_FIELDX + 2) * TILEX) +#define FYSIZE ((SCR_FIELDY + 2) * TILEY) #define DXSIZE 100 #define DYSIZE 280 #define VXSIZE DXSIZE #define VYSIZE 100 #define EXSIZE DXSIZE #define EYSIZE (VXSIZE + 44) -#define FULL_SXSIZE (2+SXSIZE+2) -#define FULL_SYSIZE (2+SYSIZE+2) +#define FULL_SXSIZE (2 + SXSIZE + 2) +#define FULL_SYSIZE (2 + SYSIZE + 2) #define MICROLEV_XSIZE ((STD_LEV_FIELDX + 2) * MICRO_TILEX) #define MICROLEV_YSIZE ((STD_LEV_FIELDY + 2) * MICRO_TILEY) #define MICROLEV_XPOS (SX + (SXSIZE - MICROLEV_XSIZE) / 2) #define MICROLEV_YPOS (SX + 12 * TILEY - MICRO_TILEY) -#define MICROLABEL_YPOS (MICROLEV_YPOS+MICROLEV_YSIZE+12) +#define MICROLABEL_YPOS (MICROLEV_YPOS + MICROLEV_YSIZE + 7) #define FONT1_XSIZE 32 #define FONT1_YSIZE 32 #define FONT2_XSIZE 14 @@ -1087,35 +1087,35 @@ extern int num_bg_loops; /* graphics from "RocksFont" */ #define GFX_CHAR_START (GFX_START_ROCKSFONT) -#define GFX_CHAR_ASCII0 (GFX_CHAR_START-32) -#define GFX_CHAR_AUSRUF (GFX_CHAR_ASCII0+33) -#define GFX_CHAR_ZOLL (GFX_CHAR_ASCII0+34) -#define GFX_CHAR_DOLLAR (GFX_CHAR_ASCII0+36) -#define GFX_CHAR_PROZ (GFX_CHAR_ASCII0+37) -#define GFX_CHAR_APOSTR (GFX_CHAR_ASCII0+39) -#define GFX_CHAR_KLAMM1 (GFX_CHAR_ASCII0+40) -#define GFX_CHAR_KLAMM2 (GFX_CHAR_ASCII0+41) -#define GFX_CHAR_PLUS (GFX_CHAR_ASCII0+43) -#define GFX_CHAR_KOMMA (GFX_CHAR_ASCII0+44) -#define GFX_CHAR_MINUS (GFX_CHAR_ASCII0+45) -#define GFX_CHAR_PUNKT (GFX_CHAR_ASCII0+46) -#define GFX_CHAR_SLASH (GFX_CHAR_ASCII0+47) -#define GFX_CHAR_0 (GFX_CHAR_ASCII0+48) -#define GFX_CHAR_9 (GFX_CHAR_ASCII0+57) -#define GFX_CHAR_DOPPEL (GFX_CHAR_ASCII0+58) -#define GFX_CHAR_SEMIKL (GFX_CHAR_ASCII0+59) -#define GFX_CHAR_LT (GFX_CHAR_ASCII0+60) -#define GFX_CHAR_GLEICH (GFX_CHAR_ASCII0+61) -#define GFX_CHAR_GT (GFX_CHAR_ASCII0+62) -#define GFX_CHAR_FRAGE (GFX_CHAR_ASCII0+63) -#define GFX_CHAR_AT (GFX_CHAR_ASCII0+64) -#define GFX_CHAR_A (GFX_CHAR_ASCII0+65) -#define GFX_CHAR_Z (GFX_CHAR_ASCII0+90) -#define GFX_CHAR_AE (GFX_CHAR_ASCII0+91) -#define GFX_CHAR_OE (GFX_CHAR_ASCII0+92) -#define GFX_CHAR_UE (GFX_CHAR_ASCII0+93) -#define GFX_CHAR_COPY (GFX_CHAR_ASCII0+94) -#define GFX_CHAR_END (GFX_CHAR_START+79) +#define GFX_CHAR_ASCII0 (GFX_CHAR_START - 32) +#define GFX_CHAR_AUSRUF (GFX_CHAR_ASCII0 + 33) +#define GFX_CHAR_ZOLL (GFX_CHAR_ASCII0 + 34) +#define GFX_CHAR_DOLLAR (GFX_CHAR_ASCII0 + 36) +#define GFX_CHAR_PROZ (GFX_CHAR_ASCII0 + 37) +#define GFX_CHAR_APOSTR (GFX_CHAR_ASCII0 + 39) +#define GFX_CHAR_KLAMM1 (GFX_CHAR_ASCII0 + 40) +#define GFX_CHAR_KLAMM2 (GFX_CHAR_ASCII0 + 41) +#define GFX_CHAR_PLUS (GFX_CHAR_ASCII0 + 43) +#define GFX_CHAR_KOMMA (GFX_CHAR_ASCII0 + 44) +#define GFX_CHAR_MINUS (GFX_CHAR_ASCII0 + 45) +#define GFX_CHAR_PUNKT (GFX_CHAR_ASCII0 + 46) +#define GFX_CHAR_SLASH (GFX_CHAR_ASCII0 + 47) +#define GFX_CHAR_0 (GFX_CHAR_ASCII0 + 48) +#define GFX_CHAR_9 (GFX_CHAR_ASCII0 + 57) +#define GFX_CHAR_DOPPEL (GFX_CHAR_ASCII0 + 58) +#define GFX_CHAR_SEMIKL (GFX_CHAR_ASCII0 + 59) +#define GFX_CHAR_LT (GFX_CHAR_ASCII0 + 60) +#define GFX_CHAR_GLEICH (GFX_CHAR_ASCII0 + 61) +#define GFX_CHAR_GT (GFX_CHAR_ASCII0 + 62) +#define GFX_CHAR_FRAGE (GFX_CHAR_ASCII0 + 63) +#define GFX_CHAR_AT (GFX_CHAR_ASCII0 + 64) +#define GFX_CHAR_A (GFX_CHAR_ASCII0 + 65) +#define GFX_CHAR_Z (GFX_CHAR_ASCII0 + 90) +#define GFX_CHAR_AE (GFX_CHAR_ASCII0 + 91) +#define GFX_CHAR_OE (GFX_CHAR_ASCII0 + 92) +#define GFX_CHAR_UE (GFX_CHAR_ASCII0 + 93) +#define GFX_CHAR_COPY (GFX_CHAR_ASCII0 + 94) +#define GFX_CHAR_END (GFX_CHAR_START + 79) /* the names of the sounds */ #define SND_ALCHEMY 0 @@ -1245,6 +1245,12 @@ extern int num_bg_loops; /* default name for empty highscore entry */ #define EMPTY_PLAYER_NAME "no name" +/* default name for unknown player names */ +#define ANONYMOUS_NAME "anonymous" + +/* default name for new levels */ +#define NAMELESS_LEVEL_NAME "nameless level" + /* values for button_status */ #define MB_NOT_PRESSED FALSE #define MB_RELEASED FALSE @@ -1303,9 +1309,9 @@ extern int num_bg_loops; #define DOOR_GFX_PAGEY2 DYSIZE /* for DrawGraphicAnimation() [tools.c] and AnimateToon() [cartoons.c] */ -#define ANIM_NORMAL 0 -#define ANIM_OSCILLATE 1 -#define ANIM_REVERSE 2 +#define ANIM_NORMAL 0 +#define ANIM_OSCILLATE 1 +#define ANIM_REVERSE 2 /* values for game_emulation */ #define EMU_NONE 0 diff --git a/src/misc.c b/src/misc.c index 0e113727..9aec199e 100644 --- a/src/misc.c +++ b/src/misc.c @@ -235,8 +235,8 @@ char *getLoginName() { struct passwd *pwd; - if (!(pwd = getpwuid(getuid()))) - return "ANONYMOUS"; + if ((pwd = getpwuid(getuid())) == NULL) + return ANONYMOUS_NAME; else return pwd->pw_name; } @@ -245,10 +245,33 @@ char *getRealName() { struct passwd *pwd; - if (!(pwd = getpwuid(getuid()))) - return "ANONYMOUS"; + if ((pwd = getpwuid(getuid())) == NULL || strlen(pwd->pw_gecos) == 0) + return ANONYMOUS_NAME; else - return pwd->pw_gecos; + { + static char real_name[1024]; + char *from_ptr = pwd->pw_gecos, *to_ptr = real_name; + + if (strchr(pwd->pw_gecos, 'ß') == NULL) + return pwd->pw_gecos; + + /* the user's real name contains a 'ß' character (german sharp s), + which has no equivalent in upper case letters (which our fonts use) */ + while (*from_ptr != '\0' && (long)(to_ptr - real_name) < 1024 - 2) + { + if (*from_ptr != 'ß') + *to_ptr++ = *from_ptr++; + else + { + from_ptr++; + *to_ptr++ = 's'; + *to_ptr++ = 's'; + } + } + *to_ptr = '\0'; + + return real_name; + } } char *getHomeDir() diff --git a/src/screens.c b/src/screens.c index 2395c467..109b1283 100644 --- a/src/screens.c +++ b/src/screens.c @@ -319,8 +319,10 @@ static int helpscreen_action[] = GFX_MORAST_LEER,1,100, HA_NEXT, GFX_BETON,1,100, HA_NEXT, GFX_MAUERWERK,1,100, HA_NEXT, - GFX_MAUER_R1,3,4, GFX_MAUERWERK,1,20, GFX_LEERRAUM,1,10, - GFX_MAUER_L1,3,4, GFX_MAUERWERK,1,20, GFX_LEERRAUM,1,10, HA_NEXT, + GFX_MAUER_L1, 3,4, GFX_MAUERWERK,1,20, GFX_LEERRAUM,1,10, + GFX_MAUER_R1, 3,4, GFX_MAUERWERK,1,20, GFX_LEERRAUM,1,10, + GFX_MAUER_UP, 3,4, GFX_MAUERWERK,1,20, GFX_LEERRAUM,1,10, + GFX_MAUER_DOWN,3,4, GFX_MAUERWERK,1,20, GFX_LEERRAUM,1,10, HA_NEXT, GFX_UNSICHTBAR,1,100, HA_NEXT, GFX_FELSBODEN,1,100, HA_NEXT, GFX_CHAR_A,30,4, GFX_CHAR_AUSRUF,32,4, HA_NEXT, @@ -406,6 +408,10 @@ static int helpscreen_action[] = GFX_AUSGANG_AUF+2,1,2, GFX_AUSGANG_AUF+1,1,2, HA_NEXT, GFX_AUSGANG_AUF+0,4,2, GFX_AUSGANG_AUF+3,1,2, GFX_AUSGANG_AUF+2,1,2, GFX_AUSGANG_AUF+1,1,2, HA_NEXT, + GFX_SOKOBAN_OBJEKT,1,100, HA_NEXT, + GFX_SOKOBAN_FELD_LEER,1,100, HA_NEXT, + GFX_SOKOBAN_FELD_VOLL,1,100, HA_NEXT, + GFX_SPEED_PILL,1,100, HA_NEXT, HA_END }; static char *helpscreen_eltext[][2] = @@ -416,7 +422,7 @@ static char *helpscreen_eltext[][2] = {"Quicksand: You cannot pass it,", "but rocks can fall though it"}, {"Massive Wall:", "Nothing can go through it"}, {"Normal Wall: You can't go through", "it, but you can bomb it away"}, - {"Growing Wall: Grows to the left or", "right if there is an empty field"}, + {"Growing Wall: Grows in several di-", "rections if there is an empty field"}, {"Invisible Wall: Behaves like normal","wall, but is invisible"}, {"Old Wall: Like normal wall, but", "some things can fall down from it"}, {"Letter Wall: Looks like a letter,", "behaves like a normal wall"}, @@ -467,6 +473,10 @@ static char *helpscreen_eltext[][2] = {"Magic Wall (BD style):", "Changes rocks and BD style diamonds"}, {"Exit door: Opens if you have enough","emeralds to finish the level"}, {"Open exit door: Enter here to leave","the level and exit the actual game"}, + {"Sokoban element: Object which must", "be pushed to an empty field"}, + {"Sokoban element: Empty field where", "a Sokoban object can be placed on"}, + {"Sokoban element: Field with object", "which can be pushed away"}, + {"Speed pill: Lets the player run", "twice as fast as normally"}, }; static int num_helpscreen_els = sizeof(helpscreen_eltext)/(2*sizeof(char *)); diff --git a/src/tools.c b/src/tools.c index 51014b9a..8006573e 100644 --- a/src/tools.c +++ b/src/tools.c @@ -1530,7 +1530,10 @@ void DrawMicroLevel(int xpos, int ypos, boolean restart) } /* redraw micro level label, if needed */ - if (DelayReached(&label_delay, MICROLEVEL_LABEL_DELAY)) + if (strcmp(level.name, NAMELESS_LEVEL_NAME) != 0 && + strcmp(level.author, ANONYMOUS_NAME) != 0 && + strcmp(level.author, leveldir[leveldir_nr].name) != 0 && + DelayReached(&label_delay, MICROLEVEL_LABEL_DELAY)) { label_counter = (label_counter + 1) % 23; label_state = (label_counter >= 0 && label_counter <= 7 ? 1 : -- 2.34.1