From 5859c681e3f1bc73bff625421cb015236445e8f8 Mon Sep 17 00:00:00 2001 From: terminx Date: Thu, 25 May 2006 04:27:33 +0000 Subject: [PATCH] La la la git-svn-id: https://svn.eduke32.com/eduke32@184 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/game.c | 10 ++++++++-- polymer/eduke32/source/gamedef.c | 2 +- polymer/eduke32/source/menus.c | 28 ++++++++++++++++++++++++---- polymer/eduke32/source/player.c | 12 ++---------- 4 files changed, 35 insertions(+), 17 deletions(-) diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 20bae793b..e70833e60 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -7134,14 +7134,20 @@ void nonsharedkeys(void) CONTROL_ClearButton( gamefunc_Enlarge_Screen ); if(ud.screen_size > 0) sound(THUD); - ud.screen_size -= 4; + if(ud.screen_size == 8 && ud.statusbarmode == 0 && bpp > 8 && ud.statusbarscale != 100) + ud.statusbarmode = 1; + else ud.screen_size -= 4; vscrn(); } if( BUTTON( gamefunc_Shrink_Screen ) ) { CONTROL_ClearButton( gamefunc_Shrink_Screen ); if(ud.screen_size < 64) sound(THUD); - ud.screen_size += 4; + if(ud.screen_size == 4 && ud.statusbarscale == 100 && ud.statusbarmode == 1) + ud.statusbarmode == 0; + if(ud.screen_size == 8 && ud.statusbarmode == 1 && bpp > 8) + ud.statusbarmode = 0; + else ud.screen_size += 4; vscrn(); } } diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index ae1e62b29..0d2653a8a 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -5044,7 +5044,7 @@ void AddSystemVars() Bsprintf(aszBuf,"WEAPON%d_FIREDELAY",SHOTGUN_WEAPON); AddGameVar(aszBuf, 4, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); Bsprintf(aszBuf,"WEAPON%d_TOTALTIME",SHOTGUN_WEAPON); - AddGameVar(aszBuf, 31, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); + AddGameVar(aszBuf, 30, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); Bsprintf(aszBuf,"WEAPON%d_HOLDDELAY",SHOTGUN_WEAPON); AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); Bsprintf(aszBuf,"WEAPON%d_FLAGS",SHOTGUN_WEAPON); diff --git a/polymer/eduke32/source/menus.c b/polymer/eduke32/source/menus.c index 0e7eebb9a..24534f9b7 100644 --- a/polymer/eduke32/source/menus.c +++ b/polymer/eduke32/source/menus.c @@ -2248,14 +2248,34 @@ cheat_for_port_credits: case 1: if (x==io) ud.levelstats = 1-ud.levelstats; modval(0,1,(int *)&ud.levelstats,1,probey==io); gametextpal(d,yy, ud.levelstats ? "Shown" : "Hidden", MENUHIGHLIGHT(io), 0); break; - case 2: barsm(d+8,yy+7, (short *)&ud.screen_size,-4,x==io,MENUHIGHLIGHT(io),PHX(-5)); break; + case 2: + { + int i; + i = ud.screen_size; + barsm(d+8,yy+7, (short *)&ud.screen_size,-4,x==io,MENUHIGHLIGHT(io),PHX(-5)); + if(i < ud.screen_size && i == 8 && ud.statusbarmode == 1 && bpp > 8) + { + ud.statusbarmode = 0; + if(ud.statusbarscale != 100) + ud.screen_size = i; + } + else if(i > ud.screen_size && i == 8 && ud.statusbarmode == 0 && bpp > 8) + { + if(ud.statusbarscale != 100) + { + ud.statusbarmode = 1; + ud.screen_size = i; + } + } + } + break; case 3: { short sbs, sbsl; - sbs = sbsl = scale(max(0,ud.statusbarscale-50),63,100-50); - barsm(d+8,yy+7, (short *)&sbs,9,x==io,MENUHIGHLIGHT(io),PHX(-5)); + sbs = sbsl = ud.statusbarscale-37; + barsm(d+8,yy+7, (short *)&sbs,8,x==io,MENUHIGHLIGHT(io),PHX(-5)); if (x == io && sbs != sbsl) { - sbs = scale(sbs,100-50,63)+50; + sbs += 37; setstatusbarscale(sbs); } } diff --git a/polymer/eduke32/source/player.c b/polymer/eduke32/source/player.c index 5419b7c4a..33d25b3f6 100644 --- a/polymer/eduke32/source/player.c +++ b/polymer/eduke32/source/player.c @@ -2000,16 +2000,8 @@ void displaymasks(short snum) if(ps[snum].scuba_on) { - if(ud.screen_size > 4) - { - rotatesprite(43<<16,(200-8-tilesizy[SCUBAMASK])<<16,65536,0,SCUBAMASK,0,p,2+16,windowx1,windowy1,windowx2,windowy2); - rotatesprite((320-43)<<16,(200-8-tilesizy[SCUBAMASK])<<16,65536,1024,SCUBAMASK,0,p,2+4+16,windowx1,windowy1,windowx2,windowy2); - } - else - { - rotatesprite(43<<16,(200-tilesizy[SCUBAMASK])<<16,65536,0,SCUBAMASK,0,p,2+16,windowx1,windowy1,windowx2,windowy2); - rotatesprite((320-43)<<16,(200-tilesizy[SCUBAMASK])<<16,65536,1024,SCUBAMASK,0,p,2+4+16,windowx1,windowy1,windowx2,windowy2); - } + rotatesprite(43<<16,(200-tilesizy[SCUBAMASK])<<16,65536,0,SCUBAMASK,0,p,2+16,windowx1,windowy1,windowx2,windowy2); + rotatesprite((320-43)<<16,(200-tilesizy[SCUBAMASK])<<16,65536,1024,SCUBAMASK,0,p,2+4+16,windowx1,windowy1,windowx2,windowy2); } }