diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6c8372ca35f..bc88800eeae 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1301,7 +1301,7 @@ endif() if( APPLE ) set_target_properties(zdoom PROPERTIES - LINK_FLAGS "-framework Carbon -framework Cocoa -framework IOKit -framework OpenGL" + LINK_FLAGS "-framework Cocoa -framework IOKit -framework OpenGL" MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/posix/osx/zdoom-info.plist" ) endif() diff --git a/src/compatibility.cpp b/src/compatibility.cpp index 947b7ffaef9..8c3cc16c5c0 100644 --- a/src/compatibility.cpp +++ b/src/compatibility.cpp @@ -465,7 +465,7 @@ void CheckCompatibility(MapData *map) // When playing Doom IWAD levels force COMPAT_SHORTTEX and COMPATF_LIGHT. // I'm not sure if the IWAD maps actually need COMPATF_LIGHT but it certainly does not hurt. // TNT's MAP31 also needs COMPATF_STAIRINDEX but that only gets activated for TNT.WAD. - if (Wads.GetLumpFile(map->lumpnum) == 1 && (gameinfo.flags & GI_COMPATSHORTTEX) && level.maptype == MAPTYPE_DOOM) + if (Wads.GetLumpFile(map->lumpnum) == Wads.GetIwadNum() && (gameinfo.flags & GI_COMPATSHORTTEX) && level.maptype == MAPTYPE_DOOM) { ii_compatflags = COMPATF_SHORTTEX|COMPATF_LIGHT; if (gameinfo.flags & GI_COMPATSTAIRS) ii_compatflags |= COMPATF_STAIRINDEX; diff --git a/src/d_iwad.cpp b/src/d_iwad.cpp index 44ecb2ff5ee..ebce048bc5c 100644 --- a/src/d_iwad.cpp +++ b/src/d_iwad.cpp @@ -182,6 +182,21 @@ void FIWadManager::ParseIWadInfo(const char *fn, const char *data, int datasize, sc.MustGetString(); iwad->Required = sc.String; } + else if (sc.Compare("StartupType")) + { + sc.MustGetStringName("="); + sc.MustGetString(); + FString sttype = sc.String; + if (!sttype.CompareNoCase("DOOM")) + iwad->StartupType = FStartupInfo::DoomStartup; + else if (!sttype.CompareNoCase("HERETIC")) + iwad->StartupType = FStartupInfo::HereticStartup; + else if (!sttype.CompareNoCase("HEXEN")) + iwad->StartupType = FStartupInfo::HexenStartup; + else if (!sttype.CompareNoCase("STRIFE")) + iwad->StartupType = FStartupInfo::StrifeStartup; + else iwad->StartupType = FStartupInfo::DefaultStartup; + } else { sc.ScriptError("Unknown keyword '%s'", sc.String); @@ -739,6 +754,7 @@ const FIWADInfo *FIWadManager::FindIWAD(TArray &wadfiles, const char *i DoomStartupInfo.BkColor = iwad_info->BkColor; DoomStartupInfo.FgColor = iwad_info->FgColor; } + if (DoomStartupInfo.Type == 0) DoomStartupInfo.Type = iwad_info->StartupType; I_SetIWADInfo(); return iwad_info; } diff --git a/src/d_main.cpp b/src/d_main.cpp index 923d510ec9e..90dbb99b4c3 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -328,12 +328,12 @@ void D_PostEvent (const event_t *ev) int look = int(ev->y * m_pitch * mouse_sensitivity * 16.0); if (invertmouse) look = -look; - G_AddViewPitch (look); + G_AddViewPitch (look, true); events[eventhead].y = 0; } if (!Button_Strafe.bDown && !lookstrafe) { - G_AddViewAngle (int(ev->x * m_yaw * mouse_sensitivity * 8.0)); + G_AddViewAngle (int(ev->x * m_yaw * mouse_sensitivity * 8.0), true); events[eventhead].x = 0; } if ((events[eventhead].x | events[eventhead].y) == 0) diff --git a/src/d_main.h b/src/d_main.h index e5abd0e0130..1fa0368d6ec 100644 --- a/src/d_main.h +++ b/src/d_main.h @@ -74,6 +74,23 @@ struct WadStuff FString Name; }; +struct FStartupInfo +{ + FString Name; + uint32_t FgColor; // Foreground color for title banner + uint32_t BkColor; // Background color for title banner + FString Song; + int Type; + enum + { + DefaultStartup, + DoomStartup, + HereticStartup, + HexenStartup, + StrifeStartup, + }; +}; + struct FIWADInfo { FString Name; // Title banner text for this IWAD @@ -85,6 +102,7 @@ struct FIWADInfo uint32_t FgColor = 0; // Foreground color for title banner uint32_t BkColor = 0xc0c0c0; // Background color for title banner EGameType gametype = GAME_Doom; // which game are we playing? + int StartupType = FStartupInfo::DefaultStartup; // alternate startup type FString MapInfo; // Base mapinfo to load TArray Load; // Wads to be loaded with this one. TArray Lumps; // Lump names for identification @@ -104,24 +122,6 @@ struct FFoundWadInfo } }; -struct FStartupInfo -{ - FString Name; - uint32_t FgColor; // Foreground color for title banner - uint32_t BkColor; // Background color for title banner - FString Song; - int Type; - enum - { - DefaultStartup, - DoomStartup, - HereticStartup, - HexenStartup, - StrifeStartup, - }; - -}; - extern FStartupInfo DoomStartupInfo; //========================================================================== diff --git a/src/g_game.cpp b/src/g_game.cpp index d3dd47f4624..db5c1cb2e6a 100644 --- a/src/g_game.cpp +++ b/src/g_game.cpp @@ -608,24 +608,20 @@ void G_BuildTiccmd (ticcmd_t *cmd) if (Button_Right.bDown) { G_AddViewAngle (angleturn[tspeed]); - LocalKeyboardTurner = true; } if (Button_Left.bDown) { G_AddViewAngle (-angleturn[tspeed]); - LocalKeyboardTurner = true; } } if (Button_LookUp.bDown) { G_AddViewPitch (lookspeed[speed]); - LocalKeyboardTurner = true; } if (Button_LookDown.bDown) { G_AddViewPitch (-lookspeed[speed]); - LocalKeyboardTurner = true; } if (Button_MoveUp.bDown) @@ -701,12 +697,10 @@ void G_BuildTiccmd (ticcmd_t *cmd) if (joyaxes[JOYAXIS_Pitch] != 0) { G_AddViewPitch(joyint(joyaxes[JOYAXIS_Pitch] * 2048)); - LocalKeyboardTurner = true; } if (joyaxes[JOYAXIS_Yaw] != 0) { G_AddViewAngle(joyint(-1280 * joyaxes[JOYAXIS_Yaw])); - LocalKeyboardTurner = true; } side -= joyint(sidemove[speed] * joyaxes[JOYAXIS_Side]); @@ -794,7 +788,7 @@ void G_BuildTiccmd (ticcmd_t *cmd) //[Graf Zahl] This really helps if the mouse update rate can't be increased! CVAR (Bool, smooth_mouse, false, CVAR_GLOBALCONFIG|CVAR_ARCHIVE) -void G_AddViewPitch (int look) +void G_AddViewPitch (int look, bool mouse) { if (gamestate == GS_TITLELEVEL) { @@ -837,11 +831,11 @@ void G_AddViewPitch (int look) } if (look != 0) { - LocalKeyboardTurner = smooth_mouse; + LocalKeyboardTurner = (!mouse || smooth_mouse); } } -void G_AddViewAngle (int yaw) +void G_AddViewAngle (int yaw, bool mouse) { if (gamestate == GS_TITLELEVEL) { @@ -857,7 +851,7 @@ void G_AddViewAngle (int yaw) LocalViewAngle -= yaw; if (yaw != 0) { - LocalKeyboardTurner = smooth_mouse; + LocalKeyboardTurner = (!mouse || smooth_mouse); } } @@ -2199,7 +2193,7 @@ static void PutSaveWads (FSerializer &arc) arc.AddString("Game WAD", name); // Name of wad the map resides in - if (Wads.GetLumpFile (level.lumpnum) > 1) + if (Wads.GetLumpFile (level.lumpnum) > Wads.GetIwadNum()) { name = Wads.GetWadName (Wads.GetLumpFile (level.lumpnum)); arc.AddString("Map WAD", name); diff --git a/src/g_game.h b/src/g_game.h index 3a11e31f214..2ac019059cb 100644 --- a/src/g_game.h +++ b/src/g_game.h @@ -89,10 +89,10 @@ void G_DoReborn (int playernum, bool freshbot); void G_DoPlayerPop(int playernum); // Adds pitch to consoleplayer's viewpitch and clamps it -void G_AddViewPitch (int look); +void G_AddViewPitch (int look, bool mouse = false); // Adds to consoleplayer's viewangle if allowed -void G_AddViewAngle (int yaw); +void G_AddViewAngle (int yaw, bool mouse = false); #define BODYQUESIZE 32 class AActor; diff --git a/src/gameconfigfile.cpp b/src/gameconfigfile.cpp index cfbbe5fb79a..f6fc12dfa9e 100644 --- a/src/gameconfigfile.cpp +++ b/src/gameconfigfile.cpp @@ -149,7 +149,10 @@ FGameConfigFile::FGameConfigFile () SetValueForKey ("Path", "$PROGDIR", true); #else SetValueForKey ("Path", "~/" GAME_DIR, true); - SetValueForKey ("Path", SHARE_DIR, true); + SetValueForKey ("Path", "/usr/local/share/doom", true); + SetValueForKey ("Path", "/usr/local/share/games/doom", true); + SetValueForKey ("Path", "/usr/share/doom", true); + SetValueForKey ("Path", "/usr/share/games/doom", true); #endif SetValueForKey ("Path", "$DOOMWADDIR", true); } diff --git a/src/gi.cpp b/src/gi.cpp index 202122b3245..19cfd3ee7f3 100644 --- a/src/gi.cpp +++ b/src/gi.cpp @@ -63,6 +63,7 @@ DEFINE_FIELD_X(GameInfoStruct, gameinfo_t, intermissioncounter) DEFINE_FIELD_X(GameInfoStruct, gameinfo_t, statusscreen_single) DEFINE_FIELD_X(GameInfoStruct, gameinfo_t, statusscreen_coop) DEFINE_FIELD_X(GameInfoStruct, gameinfo_t, statusscreen_dm) +DEFINE_FIELD_X(GameInfoStruct, gameinfo_t, mSliderColor) const char *GameNames[17] = @@ -382,9 +383,9 @@ void FMapInfoParser::ParseGameInfo() GAMEINFOKEY_COLOR(dimcolor, "dimcolor") GAMEINFOKEY_FLOAT(dimamount, "dimamount") GAMEINFOKEY_FLOAT(bluramount, "bluramount") + GAMEINFOKEY_STRING(mSliderColor, "menuslidercolor") GAMEINFOKEY_INT(definventorymaxamount, "definventorymaxamount") GAMEINFOKEY_INT(defaultrespawntime, "defaultrespawntime") - GAMEINFOKEY_INT(defaultrespawntime, "defaultrespawntime") GAMEINFOKEY_INT(defaultdropstyle, "defaultdropstyle") GAMEINFOKEY_STRING(Endoom, "endoom") GAMEINFOKEY_STRINGARRAY(quitmessages, "addquitmessages", 0, false) diff --git a/src/gi.h b/src/gi.h index 97ce7f99cda..b4aacbaf75f 100644 --- a/src/gi.h +++ b/src/gi.h @@ -173,6 +173,7 @@ struct gameinfo_t FName mFontColorHeader; FName mFontColorHighlight; FName mFontColorSelection; + FName mSliderColor; FString mBackButton; double gibfactor; int TextScreenX; diff --git a/src/gl/data/gl_data.cpp b/src/gl/data/gl_data.cpp index d0b1a4a28d1..9a7c2e0379f 100644 --- a/src/gl/data/gl_data.cpp +++ b/src/gl/data/gl_data.cpp @@ -87,7 +87,7 @@ void AdjustSpriteOffsets() for (int i = 0; i < numtex; i++) { - if (Wads.GetLumpFile(i) > 1) break; // we are past the IWAD + if (Wads.GetLumpFile(i) > Wads.GetIwadNum()) break; // we are past the IWAD if (Wads.GetLumpNamespace(i) == ns_sprites && Wads.GetLumpFile(i) == Wads.GetIwadNum()) { char str[9]; diff --git a/src/gl/shaders/gl_postprocessshader.cpp b/src/gl/shaders/gl_postprocessshader.cpp index d4ab9bbc908..1b62b1b1438 100644 --- a/src/gl/shaders/gl_postprocessshader.cpp +++ b/src/gl/shaders/gl_postprocessshader.cpp @@ -239,7 +239,7 @@ void PostProcessShaderInstance::BindTextures() GLuint handle = 0; glGenTextures(1, &handle); glBindTexture(GL_TEXTURE_2D, handle); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, tex->GetWidth(), tex->GetHeight(), 0, GL_RGBA, GL_UNSIGNED_BYTE, bitmap.GetPixels()); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, tex->GetWidth(), tex->GetHeight(), 0, GL_BGRA, GL_UNSIGNED_BYTE, bitmap.GetPixels()); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); mTextureHandles[tex] = handle; diff --git a/src/gl/system/gl_framebuffer.cpp b/src/gl/system/gl_framebuffer.cpp index f4e68791e60..b10b8b418d2 100644 --- a/src/gl/system/gl_framebuffer.cpp +++ b/src/gl/system/gl_framebuffer.cpp @@ -182,8 +182,10 @@ void OpenGLFrameBuffer::Update() Unlock(); CheckBench(); - int clientWidth = ViewportScaledWidth(IsFullscreen() ? VideoWidth : GetClientWidth()); - int clientHeight = ViewportScaledHeight(IsFullscreen() ? VideoHeight : GetClientHeight()); + int initialWidth = IsFullscreen() ? VideoWidth : GetClientWidth(); + int initialHeight = IsFullscreen() ? VideoHeight : GetClientHeight(); + int clientWidth = ViewportScaledWidth(initialWidth, initialHeight); + int clientHeight = ViewportScaledHeight(initialWidth, initialHeight); if (clientWidth > 0 && clientHeight > 0 && (Width != clientWidth || Height != clientHeight)) { // Do not call Resize here because it's only for software canvases diff --git a/src/gl/system/gl_swframebuffer.cpp b/src/gl/system/gl_swframebuffer.cpp index 937778847f5..85bddf8c64c 100644 --- a/src/gl/system/gl_swframebuffer.cpp +++ b/src/gl/system/gl_swframebuffer.cpp @@ -1304,8 +1304,8 @@ void OpenGLSWFrameBuffer::Flip() if (!IsFullscreen()) { - int clientWidth = ViewportScaledWidth(GetClientWidth()); - int clientHeight = ViewportScaledHeight(GetClientHeight()); + int clientWidth = ViewportScaledWidth(GetClientWidth(), GetClientHeight()); + int clientHeight = ViewportScaledHeight(GetClientWidth(), GetClientHeight()); if (clientWidth > 0 && clientHeight > 0 && (Width != clientWidth || Height != clientHeight)) { Resize(clientWidth, clientHeight); diff --git a/src/info.cpp b/src/info.cpp index 1eee76fcdf9..94b263105f7 100644 --- a/src/info.cpp +++ b/src/info.cpp @@ -355,8 +355,16 @@ void PClassActor::RegisterIDs() return; } + FActorInfo *actorInfo = ActorInfo(); + + if (nullptr == actorInfo) + { + // Undefined class, exiting + return; + } + // Conversation IDs have never been filtered by game so we cannot start doing that. - auto ConversationID = ActorInfo()->ConversationID; + auto ConversationID = actorInfo->ConversationID; if (ConversationID > 0) { StrifeTypes[ConversationID] = cls; @@ -365,9 +373,9 @@ void PClassActor::RegisterIDs() Printf(TEXTCOLOR_RED"Conversation ID %d refers to hidden class type '%s'\n", ConversationID, cls->TypeName.GetChars()); } } - if (ActorInfo()->GameFilter == GAME_Any || (ActorInfo()->GameFilter & gameinfo.gametype)) + if (actorInfo->GameFilter == GAME_Any || (ActorInfo()->GameFilter & gameinfo.gametype)) { - auto SpawnID = ActorInfo()->SpawnID; + auto SpawnID = actorInfo->SpawnID; if (SpawnID > 0) { SpawnableThings[SpawnID] = cls; @@ -376,7 +384,7 @@ void PClassActor::RegisterIDs() Printf(TEXTCOLOR_RED"Spawn ID %d refers to hidden class type '%s'\n", SpawnID, cls->TypeName.GetChars()); } } - auto DoomEdNum = ActorInfo()->DoomEdNum; + auto DoomEdNum = actorInfo->DoomEdNum; if (DoomEdNum != -1) { FDoomEdEntry *oldent = DoomEdMap.CheckKey(DoomEdNum); diff --git a/src/intermission/intermission_parse.cpp b/src/intermission/intermission_parse.cpp index d8f46d2c3c5..2c3114afe97 100644 --- a/src/intermission/intermission_parse.cpp +++ b/src/intermission/intermission_parse.cpp @@ -299,7 +299,7 @@ bool FIntermissionActionTextscreen::ParseKey(FScanner &sc) else { // only print an error if coming from a PWAD - if (Wads.GetLumpFile(sc.LumpNum) > 1) + if (Wads.GetLumpFile(sc.LumpNum) > Wads.GetIwadNum()) sc.ScriptMessage("Unknown text lump '%s'", sc.String); mText.Format("Unknown text lump '%s'", sc.String); } diff --git a/src/menu/videomenu.cpp b/src/menu/videomenu.cpp index 7d434843b40..cea99cd4225 100644 --- a/src/menu/videomenu.cpp +++ b/src/menu/videomenu.cpp @@ -74,7 +74,6 @@ EXTERN_CVAR (Int, vid_defwidth) EXTERN_CVAR (Int, vid_defheight) EXTERN_CVAR (Int, vid_defbits) EXTERN_CVAR (Bool, fullscreen) -EXTERN_CVAR (Bool, vid_tft) // Defined below int testingmode; // Holds time to revert to old mode int OldWidth, OldHeight, OldBits; @@ -87,43 +86,12 @@ CUSTOM_CVAR (Int, menu_screenratios, -1, CVAR_ARCHIVE) { self = -1; } - else if (self == 4 && !vid_tft) - { - self = 0; - } else { BuildModesList (screen->VideoWidth, screen->VideoHeight, DisplayBits); } } -CUSTOM_CVAR (Bool, vid_tft, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG) -{ - const int OptionMenuItemOptionBase_OP_VALUES = 0x11001; - - DOptionMenuDescriptor *opt = GetVideoModeMenu(); - if (opt != NULL) - { - DMenuItemBase *it = opt->GetItem("menu_screenratios"); - if (it != NULL) - { - if (self) - { - it->SetString(OptionMenuItemOptionBase_OP_VALUES, "RatiosTFT"); - } - else - { - it->SetString(OptionMenuItemOptionBase_OP_VALUES, "Ratios"); - } - } - } - setsizeneeded = true; - if (StatusBar != NULL) - { - StatusBar->CallScreenSizeChanged(); - } -} - //============================================================================= // @@ -278,7 +246,6 @@ void M_InitVideoModesMenu () size_t currval = 0; M_RefreshModesList(); - vid_tft.Callback(); for (unsigned int i = 1; i <= 32 && currval < countof(BitTranslate); i++) { diff --git a/src/posix/cocoa/i_common.h b/src/posix/cocoa/i_common.h index 5b2d6f6cb68..be395cf7652 100644 --- a/src/posix/cocoa/i_common.h +++ b/src/posix/cocoa/i_common.h @@ -56,9 +56,6 @@ extern RenderBufferOptions rbOpts; // Version of AppKit framework we are interested in // The following values are needed to build with earlier SDKs -#define AppKit10_4 824 -#define AppKit10_5 949 -#define AppKit10_6 1038 #define AppKit10_7 1138 #define AppKit10_8 1187 #define AppKit10_9 1265 @@ -69,11 +66,6 @@ extern RenderBufferOptions rbOpts; @end -inline bool I_IsHiDPISupported() -{ - return NSAppKitVersionNumber >= AppKit10_7; -} - void I_ProcessEvent(NSEvent* event); void I_ProcessJoysticks(); @@ -82,124 +74,4 @@ NSSize I_GetContentViewSize(const NSWindow* window); void I_SetMainWindowVisible(bool visible); void I_SetNativeMouse(bool wantNative); - -// The following definitions are required to build with older OS X SDKs - -#if MAC_OS_X_VERSION_MAX_ALLOWED < 1050 - -typedef unsigned int NSUInteger; -typedef int NSInteger; - -typedef float CGFloat; - -// From HIToolbox/Events.h -enum -{ - kVK_ANSI_F = 0x03, - kVK_Return = 0x24, - kVK_Tab = 0x30, - kVK_Space = 0x31, - kVK_Delete = 0x33, - kVK_Escape = 0x35, - kVK_Command = 0x37, - kVK_Shift = 0x38, - kVK_CapsLock = 0x39, - kVK_Option = 0x3A, - kVK_Control = 0x3B, - kVK_RightShift = 0x3C, - kVK_RightOption = 0x3D, - kVK_RightControl = 0x3E, - kVK_Function = 0x3F, - kVK_F17 = 0x40, - kVK_VolumeUp = 0x48, - kVK_VolumeDown = 0x49, - kVK_Mute = 0x4A, - kVK_F18 = 0x4F, - kVK_F19 = 0x50, - kVK_F20 = 0x5A, - kVK_F5 = 0x60, - kVK_F6 = 0x61, - kVK_F7 = 0x62, - kVK_F3 = 0x63, - kVK_F8 = 0x64, - kVK_F9 = 0x65, - kVK_F11 = 0x67, - kVK_F13 = 0x69, - kVK_F16 = 0x6A, - kVK_F14 = 0x6B, - kVK_F10 = 0x6D, - kVK_F12 = 0x6F, - kVK_F15 = 0x71, - kVK_Help = 0x72, - kVK_Home = 0x73, - kVK_PageUp = 0x74, - kVK_ForwardDelete = 0x75, - kVK_F4 = 0x76, - kVK_End = 0x77, - kVK_F2 = 0x78, - kVK_PageDown = 0x79, - kVK_F1 = 0x7A, - kVK_LeftArrow = 0x7B, - kVK_RightArrow = 0x7C, - kVK_DownArrow = 0x7D, - kVK_UpArrow = 0x7E -}; - -static const NSOpenGLPixelFormatAttribute NSOpenGLPFAAllowOfflineRenderers = NSOpenGLPixelFormatAttribute(96); - -@interface NSWindow(SetCollectionBehavior) -- (void)setCollectionBehavior:(NSUInteger)collectionBehavior; -@end - -typedef NSUInteger NSWindowCollectionBehavior; - -#endif // prior to 10.5 - - -#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060 - -enum -{ - NSApplicationActivationPolicyRegular -}; - -typedef NSInteger NSApplicationActivationPolicy; - -@interface NSApplication(ActivationPolicy) -- (BOOL)setActivationPolicy:(NSApplicationActivationPolicy)activationPolicy; -@end - -@interface NSWindow(SetStyleMask) -- (void)setStyleMask:(NSUInteger)styleMask; -@end - -#endif // prior to 10.6 - - -#if MAC_OS_X_VERSION_MAX_ALLOWED < 1070 - -@interface NSView(HiDPIStubs) -- (NSPoint)convertPointToBacking:(NSPoint)aPoint; -- (NSSize)convertSizeToBacking:(NSSize)aSize; -- (NSSize)convertSizeFromBacking:(NSSize)aSize; - -- (void)setWantsBestResolutionOpenGLSurface:(BOOL)flag; -@end - -@interface NSView(Compatibility) -- (NSRect)convertRectToBacking:(NSRect)aRect; -@end - -@interface NSScreen(HiDPIStubs) -- (NSRect)convertRectToBacking:(NSRect)aRect; -@end - -static const NSWindowCollectionBehavior NSWindowCollectionBehaviorFullScreenAuxiliary = NSWindowCollectionBehavior(1 << 8); - -static const auto NSOpenGLPFAOpenGLProfile = NSOpenGLPixelFormatAttribute(96); -static const auto NSOpenGLProfileVersionLegacy = NSOpenGLPixelFormatAttribute(0x1000); -static const auto NSOpenGLProfileVersion3_2Core = NSOpenGLPixelFormatAttribute(0x3200); - -#endif // prior to 10.7 - #endif // COCOA_I_COMMON_INCLUDED diff --git a/src/posix/cocoa/i_input.mm b/src/posix/cocoa/i_input.mm index 4f0aa25d5ea..7eda4785dfa 100644 --- a/src/posix/cocoa/i_input.mm +++ b/src/posix/cocoa/i_input.mm @@ -479,12 +479,9 @@ void NSEventToGameMousePosition(NSEvent* inEvent, event_t* outEvent) const NSView* view = [window contentView]; const NSPoint screenPos = [NSEvent mouseLocation]; - const NSPoint windowPos = [window convertScreenToBase:screenPos]; - - const NSPoint viewPos = I_IsHiDPISupported() - ? [view convertPointToBacking:windowPos] - : [view convertPoint:windowPos fromView:nil]; - + const NSRect screenRect = NSMakeRect(screenPos.x, screenPos.y, 0, 0); + const NSRect windowRect = [window convertRectFromScreen:screenRect]; + const NSPoint viewPos = [view convertPointToBacking:windowRect.origin]; const CGFloat frameHeight = I_GetContentViewSize(window).height; const CGFloat posX = ( viewPos.x - rbOpts.shiftX) / rbOpts.pixelScale; diff --git a/src/posix/cocoa/i_main.mm b/src/posix/cocoa/i_main.mm index 0b49a6d2146..4ac42261ae8 100644 --- a/src/posix/cocoa/i_main.mm +++ b/src/posix/cocoa/i_main.mm @@ -273,10 +273,7 @@ int OriginalMain(int argc, char** argv) // --------------------------------------------------------------------------- -@interface ApplicationController : NSResponder -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060 - -#endif +@interface ApplicationController : NSResponder { } diff --git a/src/posix/cocoa/i_video.mm b/src/posix/cocoa/i_video.mm index e0f1e6c6863..b8765c1a670 100644 --- a/src/posix/cocoa/i_video.mm +++ b/src/posix/cocoa/i_video.mm @@ -35,8 +35,6 @@ #include "i_common.h" -#import - // Avoid collision between DObject class and Objective-C #define Class ObjectClass @@ -69,19 +67,6 @@ #undef Class -#if MAC_OS_X_VERSION_MAX_ALLOWED < 1070 - -@implementation NSView(Compatibility) - -- (NSRect)convertRectToBacking:(NSRect)aRect -{ - return [self convertRect:aRect toView:[self superview]]; -} - -@end - -#endif // prior to 10.7 - @implementation NSWindow(ExitAppOnClose) - (void)exitAppOnClose @@ -304,7 +289,6 @@ - (void)setCursor:(NSCursor*)cursor bool m_fullscreen; bool m_hiDPI; - void SetStyleMask(NSUInteger styleMask); void SetFullscreenMode(int width, int height); void SetWindowedMode(int width, int height); void SetMode(int width, int height, bool fullscreen, bool hiDPI); @@ -510,18 +494,14 @@ - (void)setCursor:(NSCursor*)cursor attributes[i++] = NSOpenGLPixelFormatAttribute(24); attributes[i++] = NSOpenGLPFAStencilSize; attributes[i++] = NSOpenGLPixelFormatAttribute(8); - - if (NSAppKitVersionNumber >= AppKit10_5 && !vid_autoswitch) + attributes[i++] = NSOpenGLPFAOpenGLProfile; + attributes[i++] = profile; + + if (!vid_autoswitch) { attributes[i++] = NSOpenGLPFAAllowOfflineRenderers; } - if (NSAppKitVersionNumber >= AppKit10_7) - { - attributes[i++] = NSOpenGLPFAOpenGLProfile; - attributes[i++] = profile; - } - attributes[i] = NSOpenGLPixelFormatAttribute(0); return [[NSOpenGLPixelFormat alloc] initWithAttributes:attributes]; @@ -553,9 +533,9 @@ - (void)setCursor:(NSCursor*)cursor // There is no support for OpenGL 3.3 before Mavericks defaultProfile = NSOpenGLProfileVersionLegacy; } - else if (0 == vid_renderer && vid_glswfb && NSAppKitVersionNumber < AppKit10_7) + else if (0 == vid_renderer && 0 == vid_glswfb) { - // There is no support for OpenGL 3.x before Lion + // Software renderer uses OpenGL 2.1 for blitting defaultProfile = NSOpenGLProfileVersionLegacy; } else if (const char* const glversion = Args->CheckValue("-glversion")) @@ -738,26 +718,6 @@ - (void)setCursor:(NSCursor*)cursor } -static bool HasModernFullscreenAPI() -{ - return NSAppKitVersionNumber >= AppKit10_6; -} - -void CocoaVideo::SetStyleMask(const NSUInteger styleMask) -{ - // Before 10.6 it's impossible to change window's style mask - // To workaround this new window should be created with required style mask - // This method should not be called when running on Snow Leopard or newer - - assert(!HasModernFullscreenAPI()); - - CocoaWindow* tempWindow = CreateCocoaWindow(styleMask); - [tempWindow setContentView:[m_window contentView]]; - - [m_window close]; - m_window = tempWindow; -} - void CocoaVideo::SetFullscreenMode(const int width, const int height) { NSScreen* screen = [m_window screen]; @@ -783,20 +743,8 @@ static bool HasModernFullscreenAPI() if (!m_fullscreen) { - if (HasModernFullscreenAPI()) - { - [m_window setLevel:LEVEL_FULLSCREEN]; - [m_window setStyleMask:STYLE_MASK_FULLSCREEN]; - } - else - { - // Old Carbon-based way to make fullscreen window above dock and menu - // It's supported on 64-bit, but on 10.6 and later the following is preferred: - // [NSWindow setLevel:NSMainMenuWindowLevel + 1] - - SetSystemUIMode(kUIModeAllHidden, 0); - SetStyleMask(STYLE_MASK_FULLSCREEN); - } + [m_window setLevel:LEVEL_FULLSCREEN]; + [m_window setStyleMask:STYLE_MASK_FULLSCREEN]; [m_window setHidesOnDeactivate:YES]; } @@ -821,16 +769,8 @@ static bool HasModernFullscreenAPI() if (m_fullscreen) { - if (HasModernFullscreenAPI()) - { - [m_window setLevel:LEVEL_WINDOWED]; - [m_window setStyleMask:STYLE_MASK_WINDOWED]; - } - else - { - SetSystemUIMode(kUIModeNormal, 0); - SetStyleMask(STYLE_MASK_WINDOWED); - } + [m_window setLevel:LEVEL_WINDOWED]; + [m_window setStyleMask:STYLE_MASK_WINDOWED]; [m_window setHidesOnDeactivate:NO]; } @@ -851,11 +791,8 @@ static bool HasModernFullscreenAPI() return; } - if (I_IsHiDPISupported()) - { - NSOpenGLView* const glView = [m_window contentView]; - [glView setWantsBestResolutionOpenGLSurface:hiDPI]; - } + NSOpenGLView* const glView = [m_window contentView]; + [glView setWantsBestResolutionOpenGLSurface:hiDPI]; if (fullscreen) { @@ -1115,11 +1052,7 @@ static bool HasModernFullscreenAPI() void CocoaFrameBuffer::SetVSync(bool vsync) { -#if MAC_OS_X_VERSION_MAX_ALLOWED < 1050 - const long value = vsync ? 1 : 0; -#else // 10.5 or newer const GLint value = vsync ? 1 : 0; -#endif // prior to 10.5 [[NSOpenGLContext currentContext] setValues:&value forParameter:NSOpenGLCPSwapInterval]; @@ -1237,11 +1170,7 @@ static bool HasModernFullscreenAPI() void SDLGLFB::SetVSync(bool vsync) { -#if MAC_OS_X_VERSION_MAX_ALLOWED < 1050 - const long value = vsync ? 1 : 0; -#else // 10.5 or newer const GLint value = vsync ? 1 : 0; -#endif // prior to 10.5 [[NSOpenGLContext currentContext] setValues:&value forParameter:NSOpenGLCPSwapInterval]; @@ -1473,14 +1402,7 @@ void I_SetFPSLimit(int limit) CUSTOM_CVAR(Bool, vid_hidpi, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) { - if (I_IsHiDPISupported()) - { - CocoaVideo::UseHiDPI(self); - } - else if (0 != self) - { - self = 0; - } + CocoaVideo::UseHiDPI(self); } diff --git a/src/posix/cocoa/st_console.mm b/src/posix/cocoa/st_console.mm index 67f906c6918..87d93038f9a 100644 --- a/src/posix/cocoa/st_console.mm +++ b/src/posix/cocoa/st_console.mm @@ -113,11 +113,8 @@ [m_window center]; [m_window exitAppOnClose]; - if (NSAppKitVersionNumber >= AppKit10_7) - { - // Do not allow fullscreen mode for this window - [m_window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenAuxiliary]; - } + // Do not allow fullscreen mode for this window + [m_window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenAuxiliary]; [[m_window contentView] addSubview:m_scrollView]; diff --git a/src/posix/osx/iwadpicker_cocoa.mm b/src/posix/osx/iwadpicker_cocoa.mm index 9367dc53f47..6b8a10b6a7a 100644 --- a/src/posix/osx/iwadpicker_cocoa.mm +++ b/src/posix/osx/iwadpicker_cocoa.mm @@ -50,10 +50,6 @@ #include #include -#if MAC_OS_X_VERSION_MAX_ALLOWED < 1050 -// Missing type definition for 10.4 and earlier -typedef unsigned int NSUInteger; -#endif // prior to 10.5 CVAR(String, osx_additional_parameters, "", CVAR_ARCHIVE | CVAR_NOSET | CVAR_GLOBALCONFIG); @@ -68,10 +64,7 @@ static const char* const tableHeaders[NUM_COLUMNS] = { "IWAD", "Game" }; // Class to convert the IWAD data into a form that Cocoa can use. -@interface IWADTableData : NSObject -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060 - -#endif +@interface IWADTableData : NSObject { NSMutableArray *data; } diff --git a/src/posix/sdl/sdlvideo.cpp b/src/posix/sdl/sdlvideo.cpp index 905e2de78a1..c1d83065909 100644 --- a/src/posix/sdl/sdlvideo.cpp +++ b/src/posix/sdl/sdlvideo.cpp @@ -501,14 +501,6 @@ void SDLFB::SetVSync (bool vsync) if (CGLContextObj context = CGLGetCurrentContext()) { // Apply vsync for native backend only (where OpenGL context is set) - -#if MAC_OS_X_VERSION_MAX_ALLOWED < 1050 - // Inconsistency between 10.4 and 10.5 SDKs: - // third argument of CGLSetParameter() is const long* on 10.4 and const GLint* on 10.5 - // So, GLint typedef'ed to long instead of int to workaround this issue - typedef long GLint; -#endif // prior to 10.5 - const GLint value = vsync ? 1 : 0; CGLSetParameter(context, kCGLCPSwapInterval, &value); } diff --git a/src/r_videoscale.cpp b/src/r_videoscale.cpp index 29c4eb03e2e..ff8e7eb2867 100644 --- a/src/r_videoscale.cpp +++ b/src/r_videoscale.cpp @@ -24,6 +24,7 @@ #include #include "c_dispatch.h" #include "c_cvars.h" +#include "v_video.h" #define NUMSCALEMODES 5 @@ -64,6 +65,8 @@ CUSTOM_CVAR(Int, vid_scalemode, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) self = 0; } +CVAR(Bool, vid_cropaspect, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) + bool ViewportLinearScale() { if (isOutOfBounds(vid_scalemode)) @@ -72,17 +75,21 @@ bool ViewportLinearScale() return (vid_scalefactor > 1.0) ? true : vScaleTable[vid_scalemode].isLinear; } -int ViewportScaledWidth(int width) +int ViewportScaledWidth(int width, int height) { if (isOutOfBounds(vid_scalemode)) vid_scalemode = 0; + if (vid_cropaspect && height > 0) + width = ((float)width/height > ActiveRatio(width, height)) ? (int)(height * ActiveRatio(width, height)) : width; return vScaleTable[vid_scalemode].GetScaledWidth((int)((float)width * vid_scalefactor)); } -int ViewportScaledHeight(int height) +int ViewportScaledHeight(int width, int height) { if (isOutOfBounds(vid_scalemode)) vid_scalemode = 0; + if (vid_cropaspect && height > 0) + height = ((float)width/height < ActiveRatio(width, height)) ? (int)(width / ActiveRatio(width, height)) : height; return vScaleTable[vid_scalemode].GetScaledHeight((int)((float)height * vid_scalefactor)); } diff --git a/src/r_videoscale.h b/src/r_videoscale.h index 002fc7c38f6..2fcbbc85b87 100644 --- a/src/r_videoscale.h +++ b/src/r_videoscale.h @@ -25,7 +25,7 @@ #define __VIDEOSCALE_H__ EXTERN_CVAR (Int, vid_scalemode) bool ViewportLinearScale(); -int ViewportScaledWidth(int width); -int ViewportScaledHeight(int height); +int ViewportScaledWidth(int width, int height); +int ViewportScaledHeight(int width, int height); bool ViewportIsScaled43(); #endif //__VIDEOSCALE_H__ \ No newline at end of file diff --git a/src/v_font.cpp b/src/v_font.cpp index 309f8d56024..b475fb5581f 100644 --- a/src/v_font.cpp +++ b/src/v_font.cpp @@ -2361,7 +2361,7 @@ void V_InitFontColors () // which are used by the menu. So we have no choice but to skip this lump so that // all colors work properly. // The text colors should be the end user's choice anyway. - if (Wads.GetLumpFile(lump) == 1) continue; + if (Wads.GetLumpFile(lump) == Wads.GetIwadNum()) continue; } FScanner sc(lump); while (sc.GetString()) diff --git a/src/v_video.cpp b/src/v_video.cpp index 4bbe646ad95..9268125341f 100644 --- a/src/v_video.cpp +++ b/src/v_video.cpp @@ -783,7 +783,7 @@ void DSimpleCanvas::Unlock () //========================================================================== DFrameBuffer::DFrameBuffer (int width, int height, bool bgra) - : DSimpleCanvas (ViewportScaledWidth(width), ViewportScaledHeight(height), bgra) + : DSimpleCanvas (ViewportScaledWidth(width, height), ViewportScaledHeight(width, height), bgra) { LastMS = LastSec = FrameCount = LastCount = LastTic = 0; Accel2D = false; @@ -1592,16 +1592,6 @@ void V_Shutdown() V_ClearFonts(); } -EXTERN_CVAR (Bool, vid_tft) -CUSTOM_CVAR (Bool, vid_nowidescreen, false, CVAR_GLOBALCONFIG|CVAR_ARCHIVE) -{ - setsizeneeded = true; - if (StatusBar != NULL) - { - StatusBar->CallScreenSizeChanged(); - } -} - CUSTOM_CVAR (Int, vid_aspect, 0, CVAR_GLOBALCONFIG|CVAR_ARCHIVE) { setsizeneeded = true; @@ -1632,17 +1622,6 @@ int ActiveFakeRatio(int width, int height) { fakeratio = 0; } - if (vid_nowidescreen) - { - if (!vid_tft) - { - fakeratio = 0; - } - else - { - fakeratio = (height * 5 / 4 == width) ? 4 : 0; - } - } return fakeratio; } diff --git a/src/version.h b/src/version.h index e96c40af952..f736bd90907 100644 --- a/src/version.h +++ b/src/version.h @@ -48,17 +48,17 @@ const char *GetVersionString(); #ifdef GIT_DESCRIPTION #define VERSIONSTR GIT_DESCRIPTION #else -#define VERSIONSTR "3.2.0" +#define VERSIONSTR "3.2.1" #endif // The version as seen in the Windows resource -#define RC_FILEVERSION 3,2,0,0 -#define RC_PRODUCTVERSION 3,2,0,0 +#define RC_FILEVERSION 3,2,1,0 +#define RC_PRODUCTVERSION 3,2,1,0 #define RC_PRODUCTVERSION2 VERSIONSTR // These are for content versioning. The current state is '3.2'. #define VER_MAJOR 3 #define VER_MINOR 2 -#define VER_REVISION 0 +#define VER_REVISION 1 // Version identifier for network games. // Bump it every time you do a release unless you're certain you diff --git a/wadsrc/static/language.enu b/wadsrc/static/language.enu index 387477151cb..e68c9ae86e6 100644 --- a/wadsrc/static/language.enu +++ b/wadsrc/static/language.enu @@ -2191,6 +2191,7 @@ VIDMNU_FULLSCREEN = "Fullscreen"; VIDMNU_HIDPI = "Retina/HiDPI support"; VIDMNU_ASPECTRATIO = "Aspect ratio"; VIDMNU_FORCEASPECT = "Force aspect ratio"; +VIDMNU_CROPASPECT = "Forced ratio style"; VIDMNU_5X4ASPECTRATIO = "Enable 5:4 aspect ratio"; VIDMNU_SCALEMODE = "Resolution scale"; VIDMNU_SCALEFACTOR = "Scale Factor"; @@ -2381,6 +2382,7 @@ OPTVAL_VTAZDOOM = "Auto (ZDoom Preferred)"; OPTVAL_VTAVANILLA = "Auto (Vanilla Preferred)"; OPTVAL_SCALENEAREST = "Scaled (Nearest)"; OPTVAL_SCALELINEAR = "Scaled (Linear)"; +OPTVAL_LETTERBOX = "Letterbox"; // Colors C_BRICK = "\cabrick"; diff --git a/wadsrc/static/mapinfo/chex.txt b/wadsrc/static/mapinfo/chex.txt index 87ecf5aa452..1eab8b20eae 100644 --- a/wadsrc/static/mapinfo/chex.txt +++ b/wadsrc/static/mapinfo/chex.txt @@ -39,6 +39,7 @@ gameinfo dimcolor = "ff d7 00" dimamount = 0.2 bluramount = 0.0 + menuslidercolor = "Orange" definventorymaxamount = 25 defaultrespawntime = 12 defaultdropstyle = 1 diff --git a/wadsrc/static/mapinfo/doomcommon.txt b/wadsrc/static/mapinfo/doomcommon.txt index b4fea47a6cd..cb97fbabf4c 100644 --- a/wadsrc/static/mapinfo/doomcommon.txt +++ b/wadsrc/static/mapinfo/doomcommon.txt @@ -39,6 +39,7 @@ gameinfo dimcolor = "ff d7 00" dimamount = 0.2 bluramount = 0.0 + menuslidercolor = "Orange" definventorymaxamount = 25 defaultrespawntime = 12 defaultdropstyle = 1 diff --git a/wadsrc/static/mapinfo/heretic.txt b/wadsrc/static/mapinfo/heretic.txt index 3481f82af98..63468afb56d 100644 --- a/wadsrc/static/mapinfo/heretic.txt +++ b/wadsrc/static/mapinfo/heretic.txt @@ -39,6 +39,7 @@ gameinfo dimcolor = "00 00 ff" dimamount = 0.2 bluramount = 0 + menuslidercolor = "Orange" definventorymaxamount = 16 defaultrespawntime = 12 defaultdropstyle = 1 diff --git a/wadsrc/static/mapinfo/hexen.txt b/wadsrc/static/mapinfo/hexen.txt index 64cf3b4f7c3..8c959c33be1 100644 --- a/wadsrc/static/mapinfo/hexen.txt +++ b/wadsrc/static/mapinfo/hexen.txt @@ -38,6 +38,7 @@ gameinfo dimcolor = "00 00 ff" dimamount = 0.2 bluramount = 0.0 + menuslidercolor = "Orange" definventorymaxamount = 25 defaultrespawntime = 12 defaultdropstyle = 1 diff --git a/wadsrc/static/mapinfo/mindefaults.txt b/wadsrc/static/mapinfo/mindefaults.txt index 4199a0a6f42..ad7c1395fe1 100644 --- a/wadsrc/static/mapinfo/mindefaults.txt +++ b/wadsrc/static/mapinfo/mindefaults.txt @@ -28,6 +28,7 @@ gameinfo dimcolor = "6f 00 6b" dimamount = 0.8 bluramount = 0.0 + menuslidercolor = "Orange" definventorymaxamount = 25 defaultrespawntime = 12 defaultdropstyle = 1 diff --git a/wadsrc/static/mapinfo/strife.txt b/wadsrc/static/mapinfo/strife.txt index 5d320dd26b9..1a57e5337ac 100644 --- a/wadsrc/static/mapinfo/strife.txt +++ b/wadsrc/static/mapinfo/strife.txt @@ -39,6 +39,7 @@ gameinfo dimcolor = "ff d7 00" dimamount = 0.2 bluramount = 0 + menuslidercolor = "Orange" definventorymaxamount = 25 defaultrespawntime = 16 defaultdropstyle = 2 diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index fd46b153b99..3d0621c3f29 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -1842,15 +1842,6 @@ OptionValue ForceRatios 6.0, "21:9" } OptionValue Ratios -{ - 0.0, "4:3" - 1.0, "16:9" - 2.0, "16:10" - 3.0, "17:10" - 6.0, "21:9" - -1, "$OPTVAL_ALL" -} -OptionValue RatiosTFT { 0.0, "4:3" 4.0, "5:4" @@ -1868,6 +1859,11 @@ OptionValue ScaleModes 3, "640x400" 4, "1280x800" } +OptionValue CropAspect +{ + 0, "$OPTVAL_STRETCH" + 1, "$OPTVAL_LETTERBOX" +} OptionMenu VideoModeMenu protected { @@ -1880,7 +1876,7 @@ OptionMenu VideoModeMenu protected } Option "$VIDMNU_ASPECTRATIO", "menu_screenratios", "Ratios" Option "$VIDMNU_FORCEASPECT", "vid_aspect", "ForceRatios" - Option "$VIDMNU_5X4ASPECTRATIO", "vid_tft", "YesNo" + Option "$VIDMNU_CROPASPECT", "vid_cropaspect", "CropAspect" Option "$VIDMNU_SCALEMODE", "vid_scalemode", "ScaleModes" Slider "$VIDMNU_SCALEFACTOR", "vid_scalefactor", 0.25, 2.0, 0.25, 2 StaticText " " diff --git a/wadsrc/static/zscript.txt b/wadsrc/static/zscript.txt index 1cabc497533..919e2f97f0a 100644 --- a/wadsrc/static/zscript.txt +++ b/wadsrc/static/zscript.txt @@ -1,4 +1,4 @@ -version "2.5" +version "3.3" #include "zscript/base.txt" #include "zscript/sounddata.txt" #include "zscript/mapdata.txt" diff --git a/wadsrc/static/zscript/base.txt b/wadsrc/static/zscript/base.txt index f9fd571ed6a..898265995e3 100644 --- a/wadsrc/static/zscript/base.txt +++ b/wadsrc/static/zscript/base.txt @@ -333,6 +333,7 @@ struct GameInfoStruct native native GIFont mStatscreenFinishedFont; native double gibfactor; native bool intermissioncounter; + native Name mSliderColor; } class Object native diff --git a/wadsrc/static/zscript/doom/archvile.txt b/wadsrc/static/zscript/doom/archvile.txt index 8e0a98dcb8e..c6c3f53a81f 100644 --- a/wadsrc/static/zscript/doom/archvile.txt +++ b/wadsrc/static/zscript/doom/archvile.txt @@ -136,7 +136,7 @@ extend class Actor A_PlaySound(snd, CHAN_WEAPON); int newdam = targ.DamageMobj (self, self, initialdmg, (flags & VAF_DMGTYPEAPPLYTODIRECT)? damagetype : 'none'); - TraceBleed (newdam > 0 ? newdam : initialdmg, targ); + targ.TraceBleed (newdam > 0 ? newdam : initialdmg, self); Actor fire = tracer; if (fire) @@ -170,7 +170,7 @@ extend class Actor // don't move it if the vile lost sight if (!target.CheckSight (dest, 0) ) return; - SetOrigin(dest.Vec3Angle(24, dest.angle, height), true); + SetOrigin(dest.Vec3Angle(24, dest.angle, spawnheight), true); } void A_FireCrackle() diff --git a/wadsrc/static/zscript/menu/optionmenuitems.txt b/wadsrc/static/zscript/menu/optionmenuitems.txt index a778dc682f3..f08dca713d4 100644 --- a/wadsrc/static/zscript/menu/optionmenuitems.txt +++ b/wadsrc/static/zscript/menu/optionmenuitems.txt @@ -694,13 +694,13 @@ class OptionMenuSliderBase : OptionMenuItem if (!mSliderShort) { Menu.DrawConText(Font.CR_WHITE, x, cy, "\x10\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x12"); - Menu.DrawConText(Font.CR_ORANGE, x + int((5 + ((ccur * 78) / range)) * CleanXfac_1), cy, "\x13"); + Menu.DrawConText(Font.FindFontColor(gameinfo.mSliderColor), x + int((5 + ((ccur * 78) / range)) * CleanXfac_1), cy, "\x13"); } else { // On 320x200 we need a shorter slider Menu.DrawConText(Font.CR_WHITE, x, cy, "\x10\x11\x11\x11\x11\x11\x12"); - Menu.DrawConText(Font.CR_ORANGE, x + int((5 + ((ccur * 38) / range)) * CleanXfac_1), cy, "\x13"); + Menu.DrawConText(Font.FindFontColor(gameinfo.mSliderColor), x + int((5 + ((ccur * 38) / range)) * CleanXfac_1), cy, "\x13"); right -= 5*8*CleanXfac_1; } diff --git a/wadsrc/static/zscript/menu/playercontrols.txt b/wadsrc/static/zscript/menu/playercontrols.txt index 4200627d907..6b3a9bcf491 100644 --- a/wadsrc/static/zscript/menu/playercontrols.txt +++ b/wadsrc/static/zscript/menu/playercontrols.txt @@ -506,7 +506,7 @@ class ListMenuItemSlider : ListMenuItemSelectable y = (y - 100) * CleanYfac + screen.GetHeight() / 2; screen.DrawText (ConFont, Font.CR_WHITE, x, y, "\x10\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x12", DTA_CellX, 8 * CleanXfac, DTA_CellY, 8 * CleanYfac); - screen.DrawText (ConFont, Font.CR_ORANGE, x + (5 + (int)((cur * 78) / range)) * CleanXfac, y, "\x13", DTA_CellX, 8 * CleanXfac, DTA_CellY, 8 * CleanYfac); + screen.DrawText (ConFont, Font.FindFontColor(gameinfo.mSliderColor), x + (5 + (int)((cur * 78) / range)) * CleanXfac, y, "\x13", DTA_CellX, 8 * CleanXfac, DTA_CellY, 8 * CleanYfac); } //=============================================================================