[prboom+] 02/04: Imported Upstream version 2.5.1.4~svn4457+dfsg1
Fabian Greffrath
fabian at moszumanska.debian.org
Mon Nov 30 06:32:44 UTC 2015
This is an automated email from the git hooks/post-receive script.
fabian pushed a commit to branch master
in repository prboom+.
commit 6323d0739672c6acd496e5aa1be275a3efa83158
Author: Fabian Greffrath <fabian+debian at greffrath.com>
Date: Mon Nov 30 06:54:47 2015 +0100
Imported Upstream version 2.5.1.4~svn4457+dfsg1
---
ICONS/prboom-plus.bash | 43 ++++++++++++++++++++++++++++---------------
src/m_menu.c | 2 +-
src/p_setup.c | 8 ++++----
src/r_defs.h | 2 +-
src/r_main.c | 15 ++++++++++-----
src/r_main.h | 1 +
6 files changed, 45 insertions(+), 26 deletions(-)
diff --git a/ICONS/prboom-plus.bash b/ICONS/prboom-plus.bash
index b3f7a5e..e5449f7 100644
--- a/ICONS/prboom-plus.bash
+++ b/ICONS/prboom-plus.bash
@@ -5,31 +5,44 @@ _prboom_plus()
local cur prev words cword
_init_completion || return
- case $prev in
+ # Save the previous switch on the command line in the prevsw variable
+ local i prevsw=""
+ for (( i=1; $cword > 1 && i <= $cword; i++ )); do
+ if [[ ${words[i]} == -* ]]; then
+ prevsw=${words[i]}
+ fi
+ done
+
+ # Allow adding more than one file with the same extension to the same switch
+ case $prevsw in
-iwad|-file)
_filedir wad
;;
-deh)
- _filedir bex deh
+ _filedir '@(bex|deh)'
;;
- -record|-playdemo|-timedemo|-fastdemo|-recordfromto)
+ -record*|-*demo)
_filedir lmp
;;
esac
if [[ $cur == -* ]]; then
- COMPREPLY=( $( compgen -W '-1 -2 -3 -altdeath -aspect -auto -avg
- -avidemo -bexout -blockmap -boom_deh_parser -complevel -config
- -deathmatch -debugfile -deh -devparm -emulate -fast -fastdemo -ffmap
- -file -force_force_boom_brainawake -force_lxdoom_demo_compatibility
- -force_monster_avoid_hazards -force_no_dropoff -force_prboom_friction
- -force_remove_slime_trails -force_truncated_sector_specials -fullscreen
- -geom -height -iwad -levelstat -noaccel -noblit -nocheats -nodraw
- -nodrawers -nofullscreen -nojoy -nomonsters -nomouse -nomusic -nosfx
- -nosound -nowindow -playdemo -port -record -recordfromto
- -reject_pad_with_ff -resetgamma -respawn -save -setmem -shorttics
- -shotdir -skill -skipsec -solo-net -spechit -timedemo -timer -viddump
- -videodriver -vidmode -viewangle -warp -width -window' -- "$cur" ) )
+ COMPREPLY=( $( compgen -W '-1 -2 -3 -altdeath -aspect -auto -avg
+ -avidemo -bexout -blockmap -complevel -config -deathmatch -debugfile
+ -deh -devparm -fast -fastdemo -ffmap -file -fullscreen -geom -height
+ -iwad -levelstat -noaccel -noblit -nocheats -nodraw -nodrawers
+ -nofullscreen -nojoy -nomonsters -nomouse -nomusic -nosfx -nosound
+ -nowindow -playdemo -port -record -recordfromto -resetgamma -respawn
+ -save -shorttics -shotdir -skill -skipsec -solo-net -spechit -timedemo
+ -timer -viddump -videodriver -vidmode -viewangle -warp -width -window' \
+ -- "$cur" ) )
+ else
+ # DoLooseFiles() takes any file names on the command line before the
+ # first switch parm and inserts the appropriate -file, -deh or -playdemo
+ # switch in front of them.
+ if [[ -z "$prevsw" ]]; then
+ _filedir '@(bex|deh|lmp|wad)'
+ fi
fi
} &&
diff --git a/src/m_menu.c b/src/m_menu.c
index 3ef3eb9..b249f0a 100644
--- a/src/m_menu.c
+++ b/src/m_menu.c
@@ -3269,7 +3269,7 @@ setup_menu_t gen_settings8[] = { // General Settings screen4
#ifdef GL_DOOM
{"Texture Options", S_SKIP|S_TITLE,m_null,G_X,G_Y+ 1*8},
{"Texture Filter Mode", S_CHOICE, m_null, G_X, G_Y+2 *8, {"gl_texture_filter"}, 0, 0, M_ChangeTextureParams, gltexfilters},
- {"Spritre Filter Mode", S_CHOICE, m_null, G_X, G_Y+3 *8, {"gl_sprite_filter"}, 0, 0, M_ChangeTextureParams, gltexfilters},
+ {"Sprite Filter Mode", S_CHOICE, m_null, G_X, G_Y+3 *8, {"gl_sprite_filter"}, 0, 0, M_ChangeTextureParams, gltexfilters},
{"Patch Filter Mode", S_CHOICE, m_null, G_X, G_Y+4 *8, {"gl_patch_filter"}, 0, 0, M_ChangeTextureParams, gltexfilters},
{"Anisotropic filter", S_CHOICE, m_null, G_X, G_Y+5 *8, {"gl_texture_filter_anisotropic"}, 0, 0, M_ChangeTextureParams, gltexfilters_anisotropics},
{"Texture format", S_CHOICE, m_null, G_X, G_Y+6 *8, {"gl_tex_format_string"}, 0, 0, M_ChangeTextureParams, gltexformats},
diff --git a/src/p_setup.c b/src/p_setup.c
index e80f71a..442f9bc 100644
--- a/src/p_setup.c
+++ b/src/p_setup.c
@@ -2296,11 +2296,11 @@ static void R_CalcSegsLength(void)
for (i=0; i<numsegs; i++)
{
seg_t *li = segs+i;
- fixed_t dx = li->v2->px - li->v1->px;
- fixed_t dy = li->v2->py - li->v1->py;
- li->length = (fixed_t)sqrt((double)dx*dx + (double)dy*dy);
+ int_64_t dx = (int_64_t)li->v2->px - li->v1->px;
+ int_64_t dy = (int_64_t)li->v2->py - li->v1->py;
+ li->length = (int_64_t)sqrt((double)dx*dx + (double)dy*dy);
// [crispy] re-calculate angle used for rendering
- li->pangle = R_PointToAngle2(li->v1->px, li->v1->py, li->v2->px, li->v2->py);
+ li->pangle = R_PointToAngleEx2(li->v1->px, li->v1->py, li->v2->px, li->v2->py);
}
}
diff --git a/src/r_defs.h b/src/r_defs.h
index 1120fd7..1ac677f 100644
--- a/src/r_defs.h
+++ b/src/r_defs.h
@@ -284,7 +284,7 @@ typedef struct
fixed_t offset;
angle_t angle;
angle_t pangle; // re-calculated angle used for rendering
- fixed_t length; // fix long wall wobble
+ int_64_t length; // fix long wall wobble
side_t* sidedef;
line_t* linedef;
diff --git a/src/r_main.c b/src/r_main.c
index 778cd70..0f96196 100644
--- a/src/r_main.c
+++ b/src/r_main.c
@@ -243,19 +243,24 @@ angle_t R_PointToAngle2(fixed_t x1, fixed_t y1, fixed_t x, fixed_t y)
angle_t R_PointToAngleEx(fixed_t x, fixed_t y)
{
+ return R_PointToAngleEx2(viewx, viewy, x, y);
+}
+
+angle_t R_PointToAngleEx2(fixed_t x1, fixed_t y1, fixed_t x, fixed_t y)
+{
// [crispy] fix overflows for very long distances
- int64_t y_viewy = (int64_t)y - viewy;
- int64_t x_viewx = (int64_t)x - viewx;
+ int64_t y_viewy = (int64_t)y - y1;
+ int64_t x_viewx = (int64_t)x - x1;
// [crispy] the worst that could happen is e.g. INT_MIN-INT_MAX = 2*INT_MIN
if (x_viewx < INT_MIN || x_viewx > INT_MAX ||y_viewy < INT_MIN || y_viewy > INT_MAX)
{
// [crispy] preserving the angle by halfing the distance in both directions
- x = (int)(x_viewx / 2 + viewx);
- y = (int)(y_viewy / 2 + viewy);
+ x = (int)(x_viewx / 2 + x1);
+ y = (int)(y_viewy / 2 + y1);
}
- return R_PointToAngleSlope(viewx, viewy, x, y, SlopeDivEx);
+ return R_PointToAngleSlope(x1, y1, x, y, SlopeDivEx);
}
diff --git a/src/r_main.h b/src/r_main.h
index 0c02810..96ab1b0 100644
--- a/src/r_main.h
+++ b/src/r_main.h
@@ -145,6 +145,7 @@ subsector_t *R_PointInSubsector(fixed_t x, fixed_t y);
//e6y: made more precise
angle_t R_PointToAngleEx(fixed_t x, fixed_t y);
+angle_t R_PointToAngleEx2(fixed_t x1, fixed_t y1, fixed_t x, fixed_t y);
angle_t R_PointToPseudoAngle(fixed_t x, fixed_t y);
extern int r_have_internal_hires;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/prboom+.git
More information about the Pkg-games-commits
mailing list