mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-29 20:50:58 +00:00
Merge branch 'master' into next
This commit is contained in:
commit
5b93230a94
5 changed files with 73 additions and 9 deletions
|
@ -9,7 +9,7 @@ environment:
|
|||
# c:\mingw-w64 i686 has gcc 6.3.0, so use c:\msys64 7.3.0 instead
|
||||
MINGW_SDK: c:\msys64\mingw32
|
||||
# c:\msys64 x86_64 has gcc 8.2.0, so use c:\mingw-w64 7.3.0 instead
|
||||
MINGW_SDK_64: C:\mingw-w64\x86_64-7.3.0-posix-seh-rt_v5-rev0\mingw64
|
||||
MINGW_SDK_64: C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64
|
||||
CFLAGS: -Wall -W -Werror -Wno-error=implicit-fallthrough -Wimplicit-fallthrough=3 -Wno-tautological-compare -Wno-error=suggest-attribute=noreturn
|
||||
NASM_ZIP: nasm-2.12.01
|
||||
NASM_URL: http://www.nasm.us/pub/nasm/releasebuilds/2.12.01/win64/nasm-2.12.01-win64.zip
|
||||
|
@ -83,8 +83,8 @@ before_build:
|
|||
- ccache -V
|
||||
- ccache -s
|
||||
- if [%NOUPX%] == [1] ( set "NOUPX=NOUPX=1" ) else ( set "NOUPX=" )
|
||||
- set "SRB2_MFLAGS=-C src WARNINGMODE=1 CCACHE=1 GCC73=1 NOOBJDUMP=1 %NOUPX%"
|
||||
- if [%X86_64%] == [1] ( set "MINGW_FLAGS=MINGW64=1 X86_64=1" ) else ( set "MINGW_FLAGS=MINGW=1 GCC91=1" )
|
||||
- set "SRB2_MFLAGS=-C src WARNINGMODE=1 CCACHE=1 NOOBJDUMP=1 %NOUPX%"
|
||||
- if [%X86_64%] == [1] ( set "MINGW_FLAGS=MINGW64=1 X86_64=1 GCC81=1" ) else ( set "MINGW_FLAGS=MINGW=1 GCC91=1" )
|
||||
- set "SRB2_MFLAGS=%SRB2_MFLAGS% %MINGW_FLAGS% %CONFIGURATION%=1"
|
||||
|
||||
build_script:
|
||||
|
|
67
src/m_menu.c
67
src/m_menu.c
|
@ -10520,15 +10520,78 @@ static void M_HandleConnectIP(INT32 choice)
|
|||
break;
|
||||
|
||||
case KEY_DEL:
|
||||
if (setupm_ip[0])
|
||||
if (setupm_ip[0] && !shiftdown) // Shift+Delete is used for something else.
|
||||
{
|
||||
S_StartSound(NULL,sfx_menu1); // Tails
|
||||
setupm_ip[0] = 0;
|
||||
}
|
||||
break;
|
||||
if (!shiftdown) // Shift+Delete is used for something else.
|
||||
break;
|
||||
|
||||
/* FALLTHRU */
|
||||
default:
|
||||
l = strlen(setupm_ip);
|
||||
|
||||
if ( ctrldown ) {
|
||||
switch (choice) {
|
||||
case 'v':
|
||||
case 'V': // ctrl+v, pasting
|
||||
{
|
||||
const char *paste = I_ClipboardPaste();
|
||||
|
||||
if (paste != NULL) {
|
||||
strncat(setupm_ip, paste, 28-1 - l); // Concat the ip field with clipboard
|
||||
if (strlen(paste) != 0) // Don't play sound if nothing was pasted
|
||||
S_StartSound(NULL,sfx_menu1); // Tails
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case KEY_INS:
|
||||
case 'c':
|
||||
case 'C': // ctrl+c, ctrl+insert, copying
|
||||
I_ClipboardCopy(setupm_ip, l);
|
||||
S_StartSound(NULL,sfx_menu1); // Tails
|
||||
break;
|
||||
|
||||
case 'x':
|
||||
case 'X': // ctrl+x, cutting
|
||||
I_ClipboardCopy(setupm_ip, l);
|
||||
S_StartSound(NULL,sfx_menu1); // Tails
|
||||
setupm_ip[0] = 0;
|
||||
break;
|
||||
|
||||
default: // otherwise do nothing
|
||||
break;
|
||||
}
|
||||
break; // don't check for typed keys
|
||||
}
|
||||
|
||||
if ( shiftdown ) {
|
||||
switch (choice) {
|
||||
case KEY_INS: // shift+insert, pasting
|
||||
{
|
||||
const char *paste = I_ClipboardPaste();
|
||||
|
||||
if (paste != NULL) {
|
||||
strncat(setupm_ip, paste, 28-1 - l); // Concat the ip field with clipboard
|
||||
if (strlen(paste) != 0) // Don't play sound if nothing was pasted
|
||||
S_StartSound(NULL,sfx_menu1); // Tails
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case KEY_DEL: // shift+delete, cutting
|
||||
I_ClipboardCopy(setupm_ip, l);
|
||||
S_StartSound(NULL,sfx_menu1); // Tails
|
||||
setupm_ip[0] = 0;
|
||||
break;
|
||||
default: // otherwise do nothing.
|
||||
break;
|
||||
}
|
||||
break; // don't check for typed keys
|
||||
}
|
||||
|
||||
if (l >= 28-1)
|
||||
break;
|
||||
|
||||
|
|
|
@ -324,8 +324,8 @@ UINT8 ASTBlendPixel_8bpp(UINT8 background, UINT8 foreground, int style, UINT8 al
|
|||
else if (style != AST_TRANSLUCENT)
|
||||
{
|
||||
RGBA_t texel;
|
||||
RGBA_t bg = V_GetColor(background);
|
||||
RGBA_t fg = V_GetColor(foreground);
|
||||
RGBA_t bg = V_GetMasterColor(background);
|
||||
RGBA_t fg = V_GetMasterColor(foreground);
|
||||
texel.rgba = ASTBlendPixel(bg, fg, style, alpha);
|
||||
return NearestColor(texel.s.red, texel.s.green, texel.s.blue);
|
||||
}
|
||||
|
@ -1664,7 +1664,7 @@ static void R_CreateFadeColormaps(void)
|
|||
#define GETCOLOR \
|
||||
px = colormaps[i%256]; \
|
||||
fade = (i/256) * (256 / FADECOLORMAPROWS); \
|
||||
rgba = V_GetColor(px);
|
||||
rgba = V_GetMasterColor(px);
|
||||
|
||||
// to black
|
||||
makeblack:
|
||||
|
|
|
@ -388,7 +388,7 @@ void I_UpdateMouseGrab(void)
|
|||
{
|
||||
if (SDL_WasInit(SDL_INIT_VIDEO) == SDL_INIT_VIDEO && window != NULL
|
||||
&& SDL_GetMouseFocus() == window && SDL_GetKeyboardFocus() == window
|
||||
&& !IGNORE_MOUSE)
|
||||
&& USE_MOUSEINPUT && !IGNORE_MOUSE)
|
||||
SDLdoGrabMouse();
|
||||
}
|
||||
|
||||
|
|
|
@ -64,6 +64,7 @@ void V_CubeApply(UINT8 *red, UINT8 *green, UINT8 *blue);
|
|||
|
||||
// Retrieve the ARGB value from a palette color index
|
||||
#define V_GetColor(color) (pLocalPalette[color&0xFF])
|
||||
#define V_GetMasterColor(color) (pMasterPalette[color&0xFF])
|
||||
|
||||
// Bottom 8 bits are used for parameter (screen or character)
|
||||
#define V_PARAMMASK 0x000000FF
|
||||
|
|
Loading…
Reference in a new issue