diff --git a/polymer/build/include/editor.h b/polymer/build/include/editor.h index 39fa30eb0..e35c7edac 100644 --- a/polymer/build/include/editor.h +++ b/polymer/build/include/editor.h @@ -84,7 +84,9 @@ void clearmidstatbar16(void); int getnumber256(char namestart[80], int num, int maxnumber, char sign); int getnumber16(char namestart[80], int num, int maxnumber, char sign); void printmessage256(char name[82]); -void printmessage16(char name[82]); +void _printmessage16(const char *fmt, ...); + +#define printmessage16(fmt, ...) lastpm16time = totalclock, _printmessage16(fmt, ## __VA_ARGS__) void getpoint(int searchxe, int searchye, int *x, int *y); int getpointhighlight(int xplc, int yplc); diff --git a/polymer/build/src/build.c b/polymer/build/src/build.c index 5f9dfdb35..5e5bf2db7 100644 --- a/polymer/build/src/build.c +++ b/polymer/build/src/build.c @@ -52,8 +52,6 @@ extern char spritecol2d[MAXTILES][2]; char noclip=0; -void _printmessage16(char name[82]); - int vel, svel, angvel; // 0 1 2 3 4 5 6 7 @@ -5752,8 +5750,8 @@ void overheadeditor(void) { ExtLoadMap(boardfilename); - if (mapversion < 7) printmessage16("Map loaded successfully and autoconverted to V7!"); - else printmessage16("Map loaded successfully."); + if (mapversion < 7) printmessage16("Map %s loaded successfully and autoconverted to V7!",boardfilename); + else printmessage16("Map %s loaded successfully.",boardfilename); } updatenumsprites(); startposx = posx; //this is same @@ -6006,8 +6004,8 @@ CANCEL: } } - if (mapversion < 7) printmessage16("Map loaded successfully and autoconverted to V7!"); - else printmessage16("Map loaded successfully."); + if (mapversion < 7) printmessage16("Map %s loaded successfully and autoconverted to V7!",boardfilename); + else printmessage16("Map %s loaded successfully.",boardfilename); } updatenumsprites(); startposx = posx; //this is same @@ -7759,15 +7757,21 @@ void keytimerstuff(void) posz -= (horiz-101)*(vel/40); */ } -void _printmessage16(char name[82]) +void _printmessage16(const char *fmt, ...) { - char snotbuf[60]; int i; + char snotbuf[60]; + char tmpstr[64]; + va_list va; + + va_start(va, fmt); + Bvsnprintf(tmpstr, 64, fmt, va); + va_end(va); i = 0; - while ((name[i] != 0) && (i < 54)) + while ((tmpstr[i] != 0) && (i < 54)) { - snotbuf[i] = name[i]; + snotbuf[i] = tmpstr[i]; i++; } while (i < 54) @@ -7781,13 +7785,6 @@ void _printmessage16(char name[82]) enddrawing(); } -void printmessage16(char name[82]) -{ - _printmessage16(name); - lastpm16time = totalclock; -} - - void printmessage256(char name[82]) { char snotbuf[40]; diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index df3865f8a..68a22766a 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -200,6 +200,10 @@ void ExtLoadMap(const char *mapname) int i; int sky=0; int j; + + getmessageleng = 0; + getmessagetimeoff = 0; + // PreCache Wall Tiles /* for(j=0;j