menu settings
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1873 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -153,7 +153,7 @@ alias new_sound_quality [
|
||||
maxsoundsatonce 10
|
||||
footsteps 1
|
||||
bulletairsound 0
|
||||
bulletbouncesound 0
|
||||
bulletbouncesound 1
|
||||
] [ // low
|
||||
maxsoundsatonce 5
|
||||
footsteps 0
|
||||
@@ -208,8 +208,8 @@ menuitem "No! Take me back!" "showmenu controls"
|
||||
|
||||
newmenu video
|
||||
|
||||
menuitemtextinput "Screen width: " "$scr_w" "scr_w $arg1"
|
||||
menuitemtextinput "Screen height: " "$scr_h" "scr_h $arg1"
|
||||
menuitemtextinput "Screen width: " "$scr_w" "scr_w $arg1"
|
||||
menuitemtextinput "Screen height: " "$scr_h" "scr_h $arg1"
|
||||
|
||||
menuitemcheckbox "Fullscreen: " "$fullscreen" "fullscreen $arg1"
|
||||
menuitemslider "Gamma: " 30 300 "$gamma" 5 "" "gamma $arg1"
|
||||
@@ -249,13 +249,14 @@ menuitemslider "Sound volume: " 0 255 "$soundvol" 16 "" "soundvol $arg1"
|
||||
menuitemslider "Music volume: " 0 255 "$musicvol" 16 "" "musicvol $arg1"
|
||||
menuitemslider "Sounds at once: " 0 100 "$maxsoundsatonce" 2 "" "maxsoundsatonce $arg1"
|
||||
menuitemcheckbox "Footsteps: " "$footsteps" "footsteps $arg1"
|
||||
menuitemcheckbox "Bullets: " "$bulletairsound" "bulletairsound $arg1; bulletbouncesound $arg1"
|
||||
menuitemcheckbox "Bullet hit: " "$bulletbouncesound" "bulletbouncesound $arg1"
|
||||
menuitemcheckbox "Bullet near-miss: " "$bulletairsound" "bulletairsound $arg1"
|
||||
|
||||
|
||||
newmenu game
|
||||
|
||||
menuitemcheckbox "Auto reload: " "$autoreload" "autoreload $arg1"
|
||||
menuitemcheckbox "Auto getmap: " "$autogetmap" "autogetmap $arg1"
|
||||
menuitemcheckbox "Auto weapon reload: " "$autoreload" "autoreload $arg1"
|
||||
menuitemcheckbox "Auto map download: " "$autogetmap" "autogetmap $arg1"
|
||||
menuitemslider "Player skins: " 0 2 "$teamdisplaymode" 1 [normal "colored vests" "full color"] "teamdisplaymode $arg1"
|
||||
|
||||
|
||||
@@ -264,6 +265,7 @@ newmenu HUD
|
||||
menuitemcheckbox "Show stats: " "(= $hidestats 0)" "hidestats (= $arg1 0)"
|
||||
menuitemcheckbox "Show gun: " "$hudgun" "hudgun $arg1"
|
||||
menuitemcheckbox "Show radar: " "(= $hideradar 0)" "hideradar (= $arg1 0)"
|
||||
menuitemcheckbox "Show team icon: " "(= $hideteam 0)" "hideteam (= $arg1 0)"
|
||||
menuitemcheckbox "Show votes: " "(= $hidevote 0)" "hidevote (= $arg1 0)"
|
||||
menuitemcheckbox "Show icons: " "(= $hidehudequipment 0)" "hidehudequipment (= $arg1 0)"
|
||||
menuitemcheckbox "Show console: " "(= $hideconsole 0)" "hideconsole (= $arg1 0)"
|
||||
|
||||
@@ -96,13 +96,6 @@ void writeinitcfg()
|
||||
fprintf(f, "vsync %d\n", vsync);
|
||||
extern int fullscreen;
|
||||
fprintf(f, "fullscreen %d\n", fullscreen > 0 ? 1 : 0);
|
||||
// FIXME!!!
|
||||
/*
|
||||
extern int soundchans, soundfreq, soundbufferlen;
|
||||
fprintf(f, "soundchans %d\n", soundchans);
|
||||
fprintf(f, "soundfreq %d\n", soundfreq);
|
||||
fprintf(f, "soundbufferlen %d\n", soundbufferlen);
|
||||
*/
|
||||
fclose(f);
|
||||
}
|
||||
|
||||
|
||||
@@ -162,15 +162,15 @@ struct mitemtextinput : mitemtext
|
||||
virtual void render(int x, int y, int w)
|
||||
{
|
||||
bool selection = isselection();
|
||||
int tw = text_width(text);
|
||||
if(selection) blendbox(x+tw, y-FONTH/6, x+w+FONTH, y+FONTH+FONTH/6, false);
|
||||
int tw = max(text_width(text), VIRTW/4);
|
||||
if(selection) renderbg(x+w-tw, y-FONTH/6, tw, NULL);
|
||||
draw_text(text, x, y);
|
||||
int offset = text_width(input.buf, input.pos>=0 ? input.pos : -1);
|
||||
if(selection) rendercursor(x+tw+offset, y, char_width(input.pos>=0 ? input.buf[input.pos] : '_'));
|
||||
draw_text(input.buf, x+tw, y);
|
||||
if(selection) rendercursor(x+w-tw+offset, y, char_width(input.pos>=0 ? input.buf[input.pos] : '_'));
|
||||
draw_text(input.buf, x+w-tw, y);
|
||||
}
|
||||
|
||||
virtual void focus(bool on)
|
||||
virtual void focus(bool on)
|
||||
{
|
||||
SDL_EnableUNICODE(on);
|
||||
if(!strlen(input.buf)) setdefaultvalue();
|
||||
@@ -241,7 +241,6 @@ struct mitemslider : mitem
|
||||
draw_text(curval, x+tw, y);
|
||||
|
||||
blendbox(x+w-sliderwidth, y+FONTH/3, x+w, y+FONTH*2/3, false, -1, &gray);
|
||||
|
||||
int offset = (int)(cval/((float)range)*sliderwidth);
|
||||
blendbox(x+w-sliderwidth+offset-FONTH/6, y, x+w-sliderwidth+offset+FONTH/6, y+FONTH, false, -1, sel ? &whitepulse : &white);
|
||||
}
|
||||
|
||||
@@ -56,6 +56,7 @@ VARP(hidestats, 0, 1, 1);
|
||||
VARP(crosshairfx, 0, 1, 1);
|
||||
VARP(crosshairteamsign, 0, 1, 1);
|
||||
VARP(hideradar, 0, 0, 1);
|
||||
VARP(hideteam, 0, 0, 1);
|
||||
VARP(radarres, 1, 64, 1024);
|
||||
VARP(radarentsize, 1, 4, 64);
|
||||
VARP(hidectfhud, 0, 0, 1);
|
||||
@@ -416,7 +417,7 @@ void gl_drawhud(int w, int h, int curfps, int nquads, int curvert, bool underwat
|
||||
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
if(!menu && (!hideradar || showmap)) drawradar(w, h);
|
||||
else drawteamicons(w, h);
|
||||
else if(!hideteam) drawteamicons(w, h);
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
|
||||
char *infostr = editinfo();
|
||||
|
||||
@@ -585,6 +585,7 @@ void particle_fireball(int type, vec &o)
|
||||
newparticle(o, vec(0, 0, 0), (int)((parttypes[type].sz-1.0f)*100.0f), type);
|
||||
}
|
||||
|
||||
VARP(bulletbouncesound, 0, 1, 1);
|
||||
VARP(bullethole, 0, 1, 1);
|
||||
VARP(bulletholettl, 0, 10000, 30000);
|
||||
VARP(bulletbouncesoundrad, 0, 15, 1000);
|
||||
@@ -601,7 +602,7 @@ bool addbullethole(vec &from, vec &to, float radius, bool noisy)
|
||||
o.add(ray.mul(dist));
|
||||
o.add(vec(surface).mul(0.005f));
|
||||
newparticle(o, surface, bulletholettl, 7);
|
||||
if(noisy && bulletbouncesoundrad && o.dist(camera1->o) <= bulletbouncesoundrad) playsound(S_BULLETHIT, &o, SP_LOW);
|
||||
if(noisy && bulletbouncesound && bulletbouncesoundrad && o.dist(camera1->o) <= bulletbouncesoundrad) playsound(S_BULLETHIT, &o, SP_LOW);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -619,6 +620,7 @@ bool addscorchmark(vec &o, float radius)
|
||||
|
||||
VARP(shotline, 0, 1, 1);
|
||||
VARP(shotlinettl, 0, 75, 10000);
|
||||
VARP(bulletairsound, 0, 1, 1);
|
||||
VARP(bulletairsoundrad, 0, 15, 1000);
|
||||
VARP(bulletairsoundsourcerad, 0, 8, 1000);
|
||||
VARP(bulletairsounddestrad, 0, 8, 1000);
|
||||
@@ -650,7 +652,7 @@ void addshotline(dynent *pl, vec &from, vec &to)
|
||||
vec soundpos(unitv);
|
||||
soundpos.mul(fd/(fd+td)*dist);
|
||||
soundpos.add(from);
|
||||
if(soundpos.dist(camera1->o) > bulletairsoundrad) return; // outside player radius
|
||||
if(!bulletairsound || soundpos.dist(camera1->o) > bulletairsoundrad) return; // outside player radius
|
||||
playsound(S_BULLETAIR1 + rnd(2), &soundpos, SP_LOW);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user