diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index e3d563a39..79d2b6da4 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -1140,6 +1140,41 @@ vec2_t G_ScreenText(const int32_t font, return size; } +vec2_t G_ScreenTextShadow(int32_t sx, int32_t sy, + const int32_t font, + int32_t x, int32_t y, const int32_t z, const int32_t blockangle, const int32_t charangle, + const char *str, const int32_t shade, int32_t pal, int32_t o, const int32_t alpha, + int32_t xspace, int32_t yline, int32_t xbetween, int32_t ybetween, const int32_t f, + const int32_t x1, const int32_t y1, const int32_t x2, const int32_t y2) +{ + vec2_t size = { 0, 0, }; // eventually the return value + + if (!(o & ROTATESPRITE_FULL16)) + { + sx <<= 16; + sy <<= 16; + x <<= 16; + y <<= 16; + xspace <<= 16; + yline <<= 16; + xbetween <<= 16; + ybetween <<= 16; + } + + G_ScreenText(font, x + scale(sx,z,65536), y + scale(sy,z,65536), z, blockangle, charangle, str, 127, 4, o|ROTATESPRITE_FULL16, alpha, xspace, yline, xbetween, ybetween, f, x1, y1, x2, y2); + + size = G_ScreenText(font, x, y, z, blockangle, charangle, str, shade, pal, o|ROTATESPRITE_FULL16, alpha, xspace, yline, xbetween, ybetween, f, x1, y1, x2, y2); + + // return values in the same manner we receive them + if (!(o & ROTATESPRITE_FULL16)) + { + size.x >>= 16; + size.y >>= 16; + } + + return size; +} + // flags // 4: small font, wrap strings? int32_t G_PrintGameText(int32_t hack, int32_t tile, int32_t x, int32_t y, const char *t, @@ -1176,7 +1211,7 @@ int32_t G_PrintGameText(int32_t hack, int32_t tile, int32_t x, int32_t y, cons } // order is important, this bit comes after the rest - if (hack & 2) // squishtext + if ((hack & 2) && !NAM) // squishtext --xbetween; if (x == (160<<16)) @@ -1254,6 +1289,15 @@ int32_t minitext_(int32_t x,int32_t y,const char *t,int32_t s,int32_t p,int32_t return x; } +void creditsminitext(int32_t x,int32_t y,const char *t,int32_t p,int32_t sb) +{ + int32_t f = TEXT_XCENTER; + + if (!minitext_lowercase) + f |= TEXT_UPPERCASE; + + G_ScreenTextShadow(1, 1, MINIFONT, x, y, 65536, 0, 0, t, 0, p, sb, 0, 4, 8, 1, 0, f, 0, 0, xdim-1, ydim-1); +} void G_AddUserQuote(const char *daquote) { diff --git a/polymer/eduke32/source/game.h b/polymer/eduke32/source/game.h index 04401165c..a100b162f 100644 --- a/polymer/eduke32/source/game.h +++ b/polymer/eduke32/source/game.h @@ -311,6 +311,7 @@ int32_t G_PrintGameText(int32_t hack,int32_t tile,int32_t x,int32_t y,const char int32_t GetTime(void); int32_t kopen4loadfrommod(const char *filename,char searchfirst); int32_t minitext_(int32_t x,int32_t y,const char *t,int32_t s,int32_t p,int32_t sb); +void creditsminitext(int32_t x,int32_t y,const char *t,int32_t p,int32_t sb); int32_t mpgametext(int32_t y,const char *t,int32_t s,int32_t dabits); int32_t startwin_run(void); @@ -369,6 +370,7 @@ extern int32_t G_GetStringTile(int32_t font, char *t, int32_t f); extern vec2_t G_ScreenTextSize(const int32_t font, int32_t x, int32_t y, const int32_t z, const int32_t blockangle, const char *str, const int32_t o, int32_t xspace, int32_t yline, int32_t xbetween, int32_t ybetween, const int32_t f, const int32_t x1, const int32_t y1, const int32_t x2, const int32_t y2); extern void G_AddCoordsFromRotation(vec2_t *coords, const vec2_t *unitDirection, const int32_t magnitude); extern vec2_t G_ScreenText(const int32_t font, int32_t x, int32_t y, const int32_t z, const int32_t blockangle, const int32_t charangle, const char *str, const int32_t shade, int32_t pal, int32_t o, const int32_t alpha, int32_t xspace, int32_t yline, int32_t xbetween, int32_t ybetween, const int32_t f, int32_t x1, int32_t y1, int32_t x2, int32_t y2); +extern vec2_t G_ScreenTextShadow(int32_t sx, int32_t sy, const int32_t font, int32_t x, int32_t y, const int32_t z, const int32_t blockangle, const int32_t charangle, const char *str, const int32_t shade, int32_t pal, int32_t o, const int32_t alpha, int32_t xspace, int32_t yline, int32_t xbetween, int32_t ybetween, const int32_t f, int32_t x1, int32_t y1, int32_t x2, int32_t y2); int32_t app_main(int32_t argc,const char **argv); void fadepal(int32_t r,int32_t g,int32_t b,int32_t start,int32_t end,int32_t step); diff --git a/polymer/eduke32/source/menus.c b/polymer/eduke32/source/menus.c index bc4eac4e4..34c19d1c0 100644 --- a/polymer/eduke32/source/menus.c +++ b/polymer/eduke32/source/menus.c @@ -1912,37 +1912,30 @@ cheat_for_port_credits: if (g_scriptVersion != 14) l = (-2); mgametext(160,38-l,"Programming and Project Management",0,2+8+16); p = "Richard \"TerminX\" Gobeille"; - minitextshade(161-(Bstrlen(p)<<1), 39+10-l, p, 127, 4, 10+16+128); - minitext(160-(Bstrlen(p)<<1), 38+10-l, p, 8, 10+16+128); + creditsminitext(160, 38+10-l, p, 8, 10+16+128); mgametext(160,58-l,"Polymer Rendering System",0,2+8+16); p = "Pierre-Loup \"Plagman\" Griffais"; - minitextshade(161-(Bstrlen(p)<<1), 59+10-l, p, 127, 4, 10+16+128); - minitext(160-(Bstrlen(p)<<1), 58+10-l, p, 8, 10+16+128); + creditsminitext(160, 58+10-l, p, 8, 10+16+128); mgametext(160,78-l,"Additional Engine and Game Programming",0,2+8+16); p = "Philipp \"Helixhorned\" Kutin"; - minitextshade(161-(Bstrlen(p)<<1), 79+10-l, p, 127, 4, 10+16+128); - minitext(160-(Bstrlen(p)<<1), 78+10-l, p, 8, 10+16+128); + creditsminitext(160, 78+10-l, p, 8, 10+16+128); mgametext(160,98-l,"\"JFDuke3D\" and \"JFBuild\" code",0,2+8+16); p = "Jonathon \"JonoF\" Fowler"; - minitextshade(161-(Bstrlen(p)<<1), 99+10-l, p, 127, 4, 10+16+128); - minitext(160-(Bstrlen(p)<<1), 98+10-l, p, 8, 10+16+128); + creditsminitext(160, 98+10-l, p, 8, 10+16+128); mgametext(160,118-l,"Legacy \"NAM\", \"WWII GI\", and \"EDuke\" Code",0,2+8+16); p = "Matt \"Matteus\" Saettler"; - minitextshade(161-(Bstrlen(p)<<1), 119+10-l, p, 127, 4, 10+16+128); - minitext(160-(Bstrlen(p)<<1), 118+10-l, p, 8, 10+16+128); + creditsminitext(160, 118+10-l, p, 8, 10+16+128); mgametext(160,138-l,"Core BUILD Engine functionality",0,2+8+16); p = "Ken \"Awesoken\" Silverman"; - minitextshade(161-(Bstrlen(p)<<1), 139+10-l, p, 127, 4, 10+16+128); - minitext(160-(Bstrlen(p)<<1), 138+10-l, p, 8, 10+16+128); + creditsminitext(160, 138+10-l, p, 8, 10+16+128); p = "Visit www.eduke32.com for news and updates"; - minitextshade(161-(Bstrlen(p)<<1), 139+10+10+10+10+4-l, p, 127, 4, 10+16+128); - minitext(160-(Bstrlen(p)<<1), 138+10+10+10+10+4-l, p, 8, 10+16+128); + creditsminitext(160, 138+10+10+10+10+4-l, p, 8, 10+16+128); break; case MENU_CREDITS5: @@ -2007,29 +2000,19 @@ cheat_for_port_credits2: i = 0; for (m=0; m