mouse settings like in Crispy, smooth scaling is on by default (#1023)

* rename bilinear_sharpening->smooth_scaling
This commit is contained in:
Roman Fomin 2023-04-28 17:51:49 +07:00 committed by GitHub
parent 1110d0c1f1
commit 4ab0e888bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 73 additions and 73 deletions

View File

@ -368,8 +368,8 @@ extern gamestate_t wipegamestate;
extern int mouseSensitivity_horiz; // killough extern int mouseSensitivity_horiz; // killough
extern int mouseSensitivity_vert; extern int mouseSensitivity_vert;
extern int mouseSensitivity_horiz2; // [FG] strafe extern int mouseSensitivity_horiz_strafe; // [FG] strafe
extern int mouseSensitivity_vert2; // [FG] look extern int mouseSensitivity_vert_look; // [FG] look
// debug flag to cancel adaptiveness // debug flag to cancel adaptiveness
extern boolean singletics; extern boolean singletics;

View File

@ -1008,12 +1008,12 @@ boolean G_Responder(event_t* ev)
case ev_mouse: case ev_mouse:
if (mouseSensitivity_horiz) // [FG] turn if (mouseSensitivity_horiz) // [FG] turn
mousex = ev->data2*(mouseSensitivity_horiz+5)/10; mousex = ev->data2*(mouseSensitivity_horiz+5)/10;
if (mouseSensitivity_horiz2) // [FG] strafe if (mouseSensitivity_horiz_strafe) // [FG] strafe
mousex2 = ev->data2*(mouseSensitivity_horiz2+5)/10; mousex2 = ev->data2*(mouseSensitivity_horiz_strafe+5)/10;
if (mouseSensitivity_vert) // [FG] move if (mouseSensitivity_vert) // [FG] move
mousey = ev->data3*(mouseSensitivity_vert+5)/10; mousey = ev->data3*(mouseSensitivity_vert+5)/10;
if (mouseSensitivity_vert2) // [FG] look if (mouseSensitivity_vert_look) // [FG] look
mousey2 = ev->data3*(mouseSensitivity_vert2+5)/10; mousey2 = ev->data3*(mouseSensitivity_vert_look+5)/10;
return true; // eat events return true; // eat events
case ev_joyb_down: case ev_joyb_down:

View File

@ -64,7 +64,7 @@ static int window_x, window_y;
int video_display = 0; int video_display = 0;
static int fullscreen_width, fullscreen_height; // [FG] exclusive fullscreen static int fullscreen_width, fullscreen_height; // [FG] exclusive fullscreen
boolean reset_screen; boolean reset_screen;
boolean bilinear_sharpening; boolean smooth_scaling;
void *I_GetSDLWindow(void) void *I_GetSDLWindow(void)
{ {
@ -882,7 +882,7 @@ static inline void I_UpdateRender (void)
SDL_UpdateTexture(texture, NULL, argbbuffer->pixels, argbbuffer->pitch); SDL_UpdateTexture(texture, NULL, argbbuffer->pixels, argbbuffer->pitch);
SDL_RenderClear(renderer); SDL_RenderClear(renderer);
if (bilinear_sharpening) if (smooth_scaling)
{ {
// Render this intermediate texture into the upscaled texture // Render this intermediate texture into the upscaled texture
// using "nearest" integer scaling. // using "nearest" integer scaling.
@ -1816,7 +1816,7 @@ static void I_InitGraphicsMode(void)
SDL_TEXTUREACCESS_STREAMING, SDL_TEXTUREACCESS_STREAMING,
v_w, v_h); v_w, v_h);
if (bilinear_sharpening) if (smooth_scaling)
{ {
CreateUpscaledTexture(v_w, v_h); CreateUpscaledTexture(v_w, v_h);
} }

View File

@ -79,7 +79,7 @@ extern int widescreen; // widescreen mode
extern int video_display; // display index extern int video_display; // display index
extern boolean screenvisible; extern boolean screenvisible;
extern boolean reset_screen; extern boolean reset_screen;
extern boolean bilinear_sharpening; extern boolean smooth_scaling;
extern int gamma2; extern int gamma2;
byte I_GetPaletteIndex(byte *palette, int r, int g, int b); byte I_GetPaletteIndex(byte *palette, int r, int g, int b);

View File

@ -72,8 +72,8 @@ extern boolean chat_on; // in heads-up code
int mouseSensitivity_horiz; // has default // killough int mouseSensitivity_horiz; // has default // killough
int mouseSensitivity_vert; // has default int mouseSensitivity_vert; // has default
int mouseSensitivity_horiz2; // [FG] strafe int mouseSensitivity_horiz_strafe; // [FG] strafe
int mouseSensitivity_vert2; // [FG] look int mouseSensitivity_vert_look; // [FG] look
int showMessages; // Show messages has default, 0 = off, 1 = on int showMessages; // Show messages has default, 0 = off, 1 = on
int show_toggle_messages; int show_toggle_messages;
@ -1508,12 +1508,12 @@ void M_DrawMouse(void)
//jff 4/3/98 clamp horizontal sensitivity display //jff 4/3/98 clamp horizontal sensitivity display
mhmx = mouseSensitivity_horiz; // >23? 23 : mouseSensitivity_horiz; mhmx = mouseSensitivity_horiz; // >23? 23 : mouseSensitivity_horiz;
M_DrawThermo(MouseDef.x,MouseDef.y+LINEHEIGHT*(mouse_horiz+1),24,mhmx); M_DrawThermo(MouseDef.x,MouseDef.y+LINEHEIGHT*(mouse_horiz+1),24,mhmx);
mhmx2 = mouseSensitivity_horiz2; // >23? 23 : mouseSensitivity_horiz; mhmx2 = mouseSensitivity_horiz_strafe; // >23? 23 : mouseSensitivity_horiz;
M_DrawThermo(MouseDef.x,MouseDef.y+LINEHEIGHT*(mouse_horiz2+1),24,mhmx2); M_DrawThermo(MouseDef.x,MouseDef.y+LINEHEIGHT*(mouse_horiz2+1),24,mhmx2);
//jff 4/3/98 clamp vertical sensitivity display //jff 4/3/98 clamp vertical sensitivity display
mvmx = mouseSensitivity_vert; // >23? 23 : mouseSensitivity_vert; mvmx = mouseSensitivity_vert; // >23? 23 : mouseSensitivity_vert;
M_DrawThermo(MouseDef.x,MouseDef.y+LINEHEIGHT*(mouse_vert+1),24,mvmx); M_DrawThermo(MouseDef.x,MouseDef.y+LINEHEIGHT*(mouse_vert+1),24,mvmx);
mvmx2 = mouseSensitivity_vert2; // >23? 23 : mouseSensitivity_vert; mvmx2 = mouseSensitivity_vert_look; // >23? 23 : mouseSensitivity_vert;
M_DrawThermo(MouseDef.x,MouseDef.y+LINEHEIGHT*(mouse_vert2+1),24,mvmx2); M_DrawThermo(MouseDef.x,MouseDef.y+LINEHEIGHT*(mouse_vert2+1),24,mvmx2);
} }
@ -1541,7 +1541,7 @@ void M_MouseHoriz(int choice)
void M_MouseHoriz2(int choice) void M_MouseHoriz2(int choice)
{ {
M_Mouse(choice, &mouseSensitivity_horiz2); M_Mouse(choice, &mouseSensitivity_horiz_strafe);
} }
void M_MouseVert(int choice) void M_MouseVert(int choice)
@ -1551,7 +1551,7 @@ void M_MouseVert(int choice)
void M_MouseVert2(int choice) void M_MouseVert2(int choice)
{ {
M_Mouse(choice, &mouseSensitivity_vert2); M_Mouse(choice, &mouseSensitivity_vert_look);
} }
void M_Mouse(int choice, int *sens) void M_Mouse(int choice, int *sens)
@ -4030,7 +4030,7 @@ setup_menu_t gen_settings1[] = { // General Settings screen1
enum { enum {
gen2_title1, gen2_title1,
gen2_bilinear_sharpening, gen2_smooth_scaling,
gen2_trans, gen2_trans,
gen2_transpct, gen2_transpct,
gen2_stub1, gen2_stub1,
@ -4172,8 +4172,8 @@ setup_menu_t gen_settings2[] = { // General Settings screen2
{"Display Options" ,S_SKIP|S_TITLE, m_null, M_X, {"Display Options" ,S_SKIP|S_TITLE, m_null, M_X,
M_Y + gen2_title1*M_SPC}, M_Y + gen2_title1*M_SPC},
{"Enable bilinear sharpening", S_YESNO, m_null, M_X, {"Smooth Pixel Scaling", S_YESNO, m_null, M_X,
M_Y+ gen2_bilinear_sharpening*M_SPC, {"bilinear_sharpening"}, 0, M_ResetScreen}, M_Y+ gen2_smooth_scaling*M_SPC, {"smooth_scaling"}, 0, M_ResetScreen},
{"Enable predefined translucency", S_YESNO|S_STRICT, m_null, M_X, {"Enable predefined translucency", S_YESNO|S_STRICT, m_null, M_X,
M_Y+ gen2_trans*M_SPC, {"translucency"}, 0, M_Trans}, M_Y+ gen2_trans*M_SPC, {"translucency"}, 0, M_Trans},

View File

@ -249,10 +249,10 @@ default_t defaults[] = {
}, },
{ {
"bilinear_sharpening", "smooth_scaling",
(config_t *) &bilinear_sharpening, NULL, (config_t *) &smooth_scaling, NULL,
{0}, {0,1}, number, ss_gen, wad_no, {1}, {0,1}, number, ss_gen, wad_no,
"enable bilinear sharpening" "enable smooth pixel scaling"
}, },
{ {
@ -1991,6 +1991,56 @@ default_t defaults[] = {
"1 to invert gamepad look axis" "1 to invert gamepad look axis"
}, },
{ //jff 4/3/98 allow unlimited sensitivity
"mouse_sensitivity",
(config_t *) &mouseSensitivity_horiz, NULL,
{5}, {0,UL}, number, ss_none, wad_no,
"adjust horizontal (x) mouse sensitivity for turning"
},
{ //jff 4/3/98 allow unlimited sensitivity
"mouse_sensitivity_y",
(config_t *) &mouseSensitivity_vert, NULL,
{5}, {0,UL}, number, ss_none, wad_no,
"adjust vertical (y) mouse sensitivity for moving"
},
{
"mouse_sensitivity_strafe",
(config_t *) &mouseSensitivity_horiz_strafe, NULL,
{5}, {0,UL}, number, ss_none, wad_no,
"adjust horizontal (x) mouse sensitivity for strafing"
},
{
"mouse_sensitivity_y_look",
(config_t *) &mouseSensitivity_vert_look, NULL,
{5}, {0,UL}, number, ss_none, wad_no,
"adjust vertical (y) mouse sensitivity for looking"
},
{
"mouse_acceleration",
(config_t *) &mouse_acceleration, NULL,
{10}, {0,40}, number, ss_none, wad_no,
"adjust mouse acceleration (0 = 1.0, 40 = 5.0)"
},
{
"mouse_acceleration_threshold",
(config_t *) &mouse_acceleration_threshold, NULL,
{10}, {0,32}, number, ss_none, wad_no,
"adjust mouse acceleration threshold"
},
// [FG] invert vertical axis
{
"mouse_y_invert",
(config_t *) &mouse_y_invert, NULL,
{0}, {0,1}, number, ss_gen, wad_no,
"invert vertical axis"
},
{ {
"novert", "novert",
(config_t *) &novert, NULL, (config_t *) &novert, NULL,
@ -2020,56 +2070,6 @@ default_t defaults[] = {
"1 to grab mouse during play" "1 to grab mouse during play"
}, },
// [FG] invert vertical axis
{
"mouse_y_invert",
(config_t *) &mouse_y_invert, NULL,
{0}, {0,1}, number, ss_gen, wad_no,
"invert vertical axis"
},
{ //jff 4/3/98 allow unlimited sensitivity
"mouse_sensitivity_horiz",
(config_t *) &mouseSensitivity_horiz, NULL,
{10}, {0,UL}, number, ss_none, wad_no,
"adjust horizontal (x) mouse sensitivity for turning"
},
{ //jff 4/3/98 allow unlimited sensitivity
"mouse_sensitivity_vert",
(config_t *) &mouseSensitivity_vert, NULL,
{5}, {0,UL}, number, ss_none, wad_no,
"adjust vertical (y) mouse sensitivity for moving"
},
{
"mouse_sensitivity_horiz_strafe",
(config_t *) &mouseSensitivity_horiz2, NULL,
{5}, {0,UL}, number, ss_none, wad_no,
"adjust horizontal (x) mouse sensitivity for strafing"
},
{
"mouse_sensitivity_vert_look",
(config_t *) &mouseSensitivity_vert2, NULL,
{10}, {0,UL}, number, ss_none, wad_no,
"adjust vertical (y) mouse sensitivity for looking"
},
{
"mouse_acceleration",
(config_t *) &mouse_acceleration, NULL,
{10}, {0,40}, number, ss_none, wad_no,
"adjust mouse acceleration (0 = 1.0, 40 = 5.0)"
},
{
"mouse_acceleration_threshold",
(config_t *) &mouse_acceleration_threshold, NULL,
{10}, {0,32}, number, ss_none, wad_no,
"adjust mouse acceleration threshold"
},
// //
// Chat macro // Chat macro
// //