diff --git a/polymer/eduke32/build/include/editor.h b/polymer/eduke32/build/include/editor.h index 507d85733..1f427ee72 100644 --- a/polymer/eduke32/build/include/editor.h +++ b/polymer/eduke32/build/include/editor.h @@ -316,10 +316,20 @@ void _printmessage16(const char *fmt, ...) ATTRIBUTE((format(printf,1,2))); extern char lastpm16buf[156]; -int32_t fillsector(int16_t sectnum, int32_t fillcolor); // fillcolor == -1: default (pulsating) +int32_t fillsector_maybetrans(int16_t sectnum, int32_t fillcolor, uint8_t dotrans); // fillcolor == -1: default (pulsating) int32_t ask_if_sure(const char *query, uint32_t flags); int32_t editor_ask_function(const char *question, const char *dachars, int32_t numchars); +static inline int32_t fillsector(int16_t sectnum, int32_t fillcolor) +{ + return fillsector_maybetrans(sectnum, fillcolor, 1); +} + +static inline int32_t fillsector_notrans(int16_t sectnum, int32_t fillcolor) +{ + return fillsector_maybetrans(sectnum, fillcolor, 0); +} + void spriteoncfz(int32_t i, int32_t *czptr, int32_t *fzptr) ATTRIBUTE((nonnull(2,3))); void DoSpriteOrnament(int32_t i); diff --git a/polymer/eduke32/build/src/build.c b/polymer/eduke32/build/src/build.c index 290e77573..470de4619 100644 --- a/polymer/eduke32/build/src/build.c +++ b/polymer/eduke32/build/src/build.c @@ -2926,7 +2926,7 @@ static int32_t bakframe_fillandfade(char **origframeptr, int32_t sectnum, const enddrawing(); } - fillsector(sectnum, editorcolors[9]); + fillsector_notrans(sectnum, editorcolors[9]); fade_editor_screen(editorcolors[9]); return ask_if_sure(querystr, 0); @@ -6202,9 +6202,10 @@ end_point_dragging: // now is a good time to ask... for (comp=0; comp<2; comp++) for (k=0; k>3]&(1<<(i&7))) - fillsector(i, editorcolors[12]); + fillsector_notrans(i, editorcolors[12]); fade_editor_screen(editorcolors[12] | (movecol<<8)); moveonwp = ask_if_sure("Also move formerly wall-connected sectors?",0); @@ -6444,8 +6445,8 @@ end_point_dragging: } { - fillsector(i, editorcolors[9]); - fillsector(joinsector[0], editorcolors[9]); + fillsector_notrans(i, editorcolors[9]); + fillsector_notrans(joinsector[0], editorcolors[9]); fade_editor_screen(editorcolors[9]); if (!ask_if_sure("Really join non-adjacent sectors? (Y/N)", 0)) @@ -9973,7 +9974,7 @@ static inline int32_t imod(int32_t a, int32_t b) } #endif -int32_t fillsector(int16_t sectnum, int32_t fillcolor) +int32_t fillsector_maybetrans(int16_t sectnum, int32_t fillcolor, uint8_t dotrans) { if (sectnum == -1) return 0; @@ -10096,7 +10097,7 @@ int32_t fillsector(int16_t sectnum, int32_t fillcolor) if (fillist[z+1] > rborder) fillist[z+1] = rborder; - drawline16(fillist[z]+1,sy, fillist[z+1]-1,sy, -col); //editorcolors[fillcolor] + drawline16(fillist[z]+1,sy, fillist[z+1]-1,sy, dotrans ? -col : col); //editorcolors[fillcolor] } } } diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index 846313620..256b76b30 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -7164,7 +7164,7 @@ static void Keys2d(void) if (fb >= 0) { for (SECTORS_OF_BUNCH(fb,YAX_FLOOR, i)) - fillsector(i, editorcolors[11]); + fillsector_notrans(i, editorcolors[11]); fade_editor_screen(editorcolors[11]); if (ask_if_sure("Clear all TROR extensions from marked sectors?", 0))