From bb00c9b588b4664f2920b37c13ecb8467d0eef1a Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 31 Jan 2016 10:34:17 +0200 Subject: [PATCH 1/5] Added menu option to control fullscreen toggle shortcut on OS X --- wadsrc/static/menudef.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index add844455..2c04e492d 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -894,6 +894,10 @@ OptionMenu "MiscOptions" Option "Merge left+right Alt/Ctrl/Shift", "k_mergekeys", "OnOff" Option "Alt-Enter toggles fullscreen", "k_allowfullscreentoggle", "OnOff" } + IfOption(Mac) + { + Option "Command-F toggles fullscreen", "k_allowfullscreentoggle", "OnOff" + } Option "Show IWAD selection dialog", "queryiwad", "OnOff" StaticText " " Option "Enable cheats from all games", "allcheats", "OnOff" From 7b0f5575141ec89f4c30813bd165e83691545c96 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 31 Jan 2016 10:42:16 +0200 Subject: [PATCH 2/5] Enabled zoom window button on OS X Independently from OS version the game will enter fullscreen mode when zoom button is clicked Window zooming behavior introduced in Yosemite is available on all supported versions of OS X --- src/posix/cocoa/i_video.mm | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/posix/cocoa/i_video.mm b/src/posix/cocoa/i_video.mm index 1a535c088..2d10a9ccb 100644 --- a/src/posix/cocoa/i_video.mm +++ b/src/posix/cocoa/i_video.mm @@ -70,6 +70,27 @@ @end +@interface NSWindow(EnterFullscreenOnZoom) +- (void)enterFullscreenOnZoom; +@end + +@implementation NSWindow(EnterFullscreenOnZoom) + +- (void)enterFullscreen:(id)sender +{ + ToggleFullscreen = true; +} + +- (void)enterFullscreenOnZoom +{ + NSButton* zoomButton = [self standardWindowButton:NSWindowZoomButton]; + [zoomButton setEnabled:YES]; + [zoomButton setAction:@selector(enterFullscreen:)]; + [zoomButton setTarget:self]; +} + +@end + EXTERN_CVAR(Bool, ticker ) EXTERN_CVAR(Bool, vid_vsync) @@ -676,6 +697,7 @@ void CocoaVideo::SetWindowedMode(const int width, const int height) [m_window setContentSize:windowSize]; [m_window center]; + [m_window enterFullscreenOnZoom]; [m_window exitAppOnClose]; } From 1798fab973c6d526359641b145e323eeb6ba5ba0 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 31 Jan 2016 12:47:24 +0200 Subject: [PATCH 3/5] Added support for Hexen Mac beta It's very similar to Mac demo but also contains MAP41: Maze like DOS full version 1.0 --- src/w_wad.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/w_wad.cpp b/src/w_wad.cpp index 42e5c17b9..d4127ae7b 100644 --- a/src/w_wad.cpp +++ b/src/w_wad.cpp @@ -979,9 +979,11 @@ void FWadCollection::FixMacHexen() const long iwadSize = reader->GetLength(); static const long DEMO_SIZE = 13596228; + static const long BETA_SIZE = 13749984; static const long FULL_SIZE = 21078584; if ( DEMO_SIZE != iwadSize + && BETA_SIZE != iwadSize && FULL_SIZE != iwadSize) { return; @@ -1000,13 +1002,22 @@ void FWadCollection::FixMacHexen() 0x4b, 0x0a, 0x6a, 0x3b, 0xed, 0x3a, 0x6f, 0x31 }; + static const BYTE HEXEN_BETA_MD5[16] = + { + 0x2a, 0xf1, 0xb2, 0x7c, 0xd1, 0x1f, 0xb1, 0x59, + 0xe6, 0x08, 0x47, 0x2a, 0x1b, 0x53, 0xe4, 0x0e + }; + static const BYTE HEXEN_FULL_MD5[16] = { 0xb6, 0x81, 0x40, 0xa7, 0x96, 0xf6, 0xfd, 0x7f, 0x3a, 0x5d, 0x32, 0x26, 0xa3, 0x2b, 0x93, 0xbe }; - if ( 0 != memcmp(HEXEN_DEMO_MD5, checksum, sizeof checksum) + const bool isBeta = 0 == memcmp(HEXEN_BETA_MD5, checksum, sizeof checksum); + + if ( !isBeta + && 0 != memcmp(HEXEN_DEMO_MD5, checksum, sizeof checksum) && 0 != memcmp(HEXEN_FULL_MD5, checksum, sizeof checksum)) { return; @@ -1014,7 +1025,10 @@ void FWadCollection::FixMacHexen() static const int EXTRA_LUMPS = 299; - const int lastLump = GetLastLump(IWAD_FILENUM); + // Hexen Beta is very similar to Demo but it has MAP41: Maze at the end of the WAD + // So keep this map if it's present but discard all extra lumps + + const int lastLump = GetLastLump(IWAD_FILENUM) - (isBeta ? 12 : 0); assert(GetFirstLump(IWAD_FILENUM) + 299 < lastLump); for (int i = lastLump - EXTRA_LUMPS + 1; i <= lastLump; ++i) From 219b6f7c5d519966620a570a5690752a5c64aa90 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sun, 31 Jan 2016 06:51:11 -0600 Subject: [PATCH 4/5] Fix R_DrawFogBoundary for right-edge exclusivity --- src/r_draw.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/r_draw.cpp b/src/r_draw.cpp index 08519c088..f82a843d8 100644 --- a/src/r_draw.cpp +++ b/src/r_draw.cpp @@ -1797,8 +1797,8 @@ void R_DrawFogBoundary (int x1, int x2, short *uclip, short *dclip) // we need to use a new colormap. fixed_t lightstep = rw_lightstep; - fixed_t light = rw_light+lightstep*(x2-x1); - int x = x2; + fixed_t light = rw_light+lightstep*(x2-x1-1); + int x = x2-1; int t2 = uclip[x]; int b2 = dclip[x]; int rcolormap = GETPALOOKUP (light, wallshade); From eb2829ad5ed878473273783a5b33777eb0547083 Mon Sep 17 00:00:00 2001 From: MajorCooke Date: Sun, 31 Jan 2016 09:45:41 -0600 Subject: [PATCH 5/5] - Added CBF_DROPOFF to A_CheckBlock. Checks for actors stuck in tall ledges or dropoffs. --- src/thingdef/thingdef_codeptr.cpp | 4 +++- wadsrc/static/actors/constants.txt | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index f49b92523..8608915f4 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -6200,6 +6200,7 @@ enum CBF CBF_SETMASTER = 1 << 2, //^ but with master. CBF_SETTRACER = 1 << 3, //^ but with tracer. CBF_SETONPTR = 1 << 4, //Sets the pointer change on the actor doing the checking instead of self. + CBF_DROPOFF = 1 << 5, //Check for dropoffs. }; DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CheckBlock) @@ -6219,7 +6220,8 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CheckBlock) } //Nothing to block it so skip the rest. - if (P_TestMobjLocation(mobj)) return; + bool checker = (flags & CBF_DROPOFF) ? P_CheckMove(mobj, mobj->X(), mobj->Y()) : P_TestMobjLocation(mobj); + if (checker) return; if (mobj->BlockingMobj) { diff --git a/wadsrc/static/actors/constants.txt b/wadsrc/static/actors/constants.txt index f02240eda..ad90e71d8 100644 --- a/wadsrc/static/actors/constants.txt +++ b/wadsrc/static/actors/constants.txt @@ -516,6 +516,7 @@ enum CBF_SETMASTER = 1 << 2, //^ but with master. CBF_SETTRACER = 1 << 3, //^ but with tracer. CBF_SETONPTR = 1 << 4, //Sets the pointer change on the actor doing the checking instead of self. + CBF_DROPOFF = 1 << 5, //Check for dropoffs. }; enum