diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index c10c5bd84..fabcd34cd 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -2227,7 +2227,7 @@ static int32_t swall[MAXXDIM], lwall[MAXXDIM+4]; int32_t xdimen = -1, xdimenrecip, halfxdimen, xdimenscale, xdimscale; int32_t ydimen; static int32_t wx1, wy1, wx2, wy2; -intptr_t /*viewoffset,*/ frameoffset; +intptr_t frameoffset; static int32_t nrx1[8], nry1[8], nrx2[8], nry2[8]; // JBF 20031206: Thanks Ken @@ -8606,7 +8606,6 @@ int32_t drawrooms(int32_t daposx, int32_t daposy, int32_t daposz, draw_rainbow_background(); #endif - //frameoffset = frameplace + viewoffset; frameoffset = frameplace + windowy1*bytesperline + windowx1; //if (smostwallcnt < 0) @@ -13555,12 +13554,6 @@ void setview(int32_t x1, int32_t y1, int32_t x2, int32_t y2) for (i=windowx1; i<=windowx2; i++) { startumost[i] = windowy1, startdmost[i] = windowy2+1; } for (i=windowx2+1; i= 8 && ud.statusbarmode == 0) { - /* - y1 = y2; - x2 = (xdim - scale(xdim,ud.statusbarscale,100)) >> 1; - x1 = xdim-x2; - x1 -= x1%tilesizx[dapicnum]; - for (y=y1-y1%tilesizy[dapicnum]; y> 1; for (y=y2-y2%tilesizy[dapicnum]; y 0) S_PlaySound(THUD); + if (getrendermode() >= REND_POLYMOST && ud.screen_size == 8 && ud.statusbarmode == 0) ud.statusbarmode = 1; else ud.screen_size -= 4; @@ -7575,29 +7565,30 @@ void G_HandleLocalKeys(void) } else { - ud.statusbarscale += 4; - G_SetStatusBarScale(ud.statusbarscale); + G_SetStatusBarScale(ud.statusbarscale+4); } + G_UpdateScreenArea(); } if (BUTTON(gamefunc_Shrink_Screen)) { CONTROL_ClearButton(gamefunc_Shrink_Screen); + if (!SHIFTS_IS_PRESSED) { - if (ud.screen_size < 64) S_PlaySound(THUD); + if (ud.screen_size < 64) + S_PlaySound(THUD); + if (getrendermode() >= REND_POLYMOST && ud.screen_size == 8 && ud.statusbarmode == 1) ud.statusbarmode = 0; else ud.screen_size += 4; } else { - ud.statusbarscale -= 4; - if (ud.statusbarscale < 37) - ud.statusbarscale = 37; - G_SetStatusBarScale(ud.statusbarscale); + G_SetStatusBarScale(max(ud.statusbarscale-4, 37)); } + G_UpdateScreenArea(); } } diff --git a/polymer/eduke32/source/menus.c b/polymer/eduke32/source/menus.c index 2fd120cc0..0debb919c 100644 --- a/polymer/eduke32/source/menus.c +++ b/polymer/eduke32/source/menus.c @@ -2986,21 +2986,26 @@ cheat_for_port_credits2: break; case 3: { - int32_t i; - i = ud.screen_size; + const int32_t ossize = ud.screen_size; + barsm(d+8,yy+7, &ud.screen_size,-4,x==io,MENUHIGHLIGHT(io),0); - if (getrendermode() >= REND_POLYMOST && i < ud.screen_size && i == 8 && ud.statusbarmode == 1) + + // ud.screen_size 8 is the largest classic HUD + if (getrendermode() >= REND_POLYMOST && ossize == 8) { - ud.statusbarmode = 0; - if (ud.statusbarscale != 100) - ud.screen_size = i; - } - else if (getrendermode() >= REND_POLYMOST && i > ud.screen_size && i == 8 && ud.statusbarmode == 0) - { - if (ud.statusbarscale != 100) + if (ud.screen_size > ossize && ud.statusbarmode == 1) { - ud.statusbarmode = 1; - ud.screen_size = i; + ud.statusbarmode = 0; + if (ud.statusbarscale != 100) + ud.screen_size = ossize; + } + else if (ud.screen_size < ossize && ud.statusbarmode == 0) + { + if (ud.statusbarscale != 100) + { + ud.statusbarmode = 1; + ud.screen_size = ossize; + } } } } @@ -3011,10 +3016,7 @@ cheat_for_port_credits2: sbs = sbsl = ud.statusbarscale-37; barsm(d+8,yy+7, &sbs,4,x==io,MENUHIGHLIGHT(io),0); if (x == io && sbs != sbsl) - { - sbs += 37; - G_SetStatusBarScale(sbs); - } + G_SetStatusBarScale(sbs+37); } break; case 5: