diff --git a/source/common/2d/v_draw.cpp b/source/common/2d/v_draw.cpp index 2ed21030a..a37f930f3 100644 --- a/source/common/2d/v_draw.cpp +++ b/source/common/2d/v_draw.cpp @@ -803,7 +803,7 @@ bool ParseDrawTextureTags(F2DDrawer *drawer, FGameTexture *img, double x, double } else if (intval >= FSMode_Predefined && intval < FSMode_Predefined_Max) { - static const uint16_t modes[] = { FSMode_ScaleToFit43, FSMode_ScaleToFit43, FSMode_ScaleToFit43, FSMode_ScaleToFit43, FSMode_ScaleToFit43Top}; + static const uint8_t modes[] = { FSMode_ScaleToFit43, FSMode_ScaleToFit43, FSMode_ScaleToFit43, FSMode_ScaleToFit43, FSMode_ScaleToFit43Top}; static const uint16_t widths[] = { 320, 320, 640, 640, 320}; static const uint16_t heights[] = { 200, 240, 400, 480, 200}; parms->fsscalemode = modes[intval - FSMode_Predefined]; diff --git a/source/common/console/c_bind.cpp b/source/common/console/c_bind.cpp index 884c3a401..1aad2d255 100644 --- a/source/common/console/c_bind.cpp +++ b/source/common/console/c_bind.cpp @@ -155,7 +155,6 @@ const char *KeyNames[NUM_KEYS] = FKeyBindings Bindings; FKeyBindings DoubleBindings; FKeyBindings AutomapBindings; -FKeyBindings ShiftBindings; static unsigned int DClickTime[NUM_KEYS]; static FixedBitArray DClicked; @@ -698,7 +697,6 @@ void ReadBindings(int lump, bool override) sc.MustGetString(); } key = GetConfigKeyFromName(sc.String); - assert(key); sc.MustGetString(); dest->SetBind(key, sc.String, override); } diff --git a/source/common/console/c_bind.h b/source/common/console/c_bind.h index 62f1235c5..ada3cb84e 100644 --- a/source/common/console/c_bind.h +++ b/source/common/console/c_bind.h @@ -87,7 +87,6 @@ public: extern FKeyBindings Bindings; extern FKeyBindings DoubleBindings; extern FKeyBindings AutomapBindings; -extern FKeyBindings ShiftBindings; bool C_DoKey (event_t *ev, FKeyBindings *binds, FKeyBindings *doublebinds); diff --git a/source/common/utility/m_alloc.h b/source/common/utility/m_alloc.h index 14e9cbb9a..471d42fae 100644 --- a/source/common/utility/m_alloc.h +++ b/source/common/utility/m_alloc.h @@ -43,7 +43,11 @@ #elif defined(__solaris__) || defined(__OpenBSD__) || defined(__DragonFly__) #define _msize(p) (*((size_t*)(p)-1)) #elif !defined(_WIN32) +#ifdef __FreeBSD__ +#include +#else #include +#endif #define _msize(p) malloc_usable_size(p) // from glibc/FreeBSD #endif diff --git a/source/core/console/c_console.cpp b/source/core/console/c_console.cpp index b6b2bbb87..195b6eb0a 100644 --- a/source/core/console/c_console.cpp +++ b/source/core/console/c_console.cpp @@ -1460,7 +1460,7 @@ static bool C_HandleKey (event_t *ev, FCommandBuffer &buffer) case GK_PGUP: if (ev->data3 & (GKM_SHIFT|GKM_CTRL)) { // Scroll console buffer up one page - RowAdjust += (screen->GetHeight()-4)/active_con_scale(twod) / + RowAdjust += (twod->GetHeight()-4)/active_con_scale(twod) / ((gamestate == GS_FULLCONSOLE || gamestate == GS_STARTUP) ? CurrentConsoleFont->GetHeight() : CurrentConsoleFont->GetHeight()*2) - 3; } else if (RowAdjust < conbuffer->GetFormattedLineCount()) @@ -1483,7 +1483,7 @@ static bool C_HandleKey (event_t *ev, FCommandBuffer &buffer) case GK_PGDN: if (ev->data3 & (GKM_SHIFT|GKM_CTRL)) { // Scroll console buffer down one page - const int scrollamt = (screen->GetHeight()-4)/active_con_scale(twod) / + const int scrollamt = (twod->GetHeight()-4)/active_con_scale(twod) / ((gamestate == GS_FULLCONSOLE || gamestate == GS_STARTUP) ? CurrentConsoleFont->GetHeight() : CurrentConsoleFont->GetHeight()*2) - 3; if (RowAdjust < scrollamt) { @@ -1862,7 +1862,7 @@ void C_MidPrint (FFont *font, const char *msg, bool bold) if (msg != nullptr) { auto color = (EColorRange)PrintColors[bold? PRINTLEVELS+1 : PRINTLEVELS]; - Printf(PRINT_HIGH, TEXTCOLOR_ESCAPESTR "%c%s\n%s\n%s\n", color, console_bar, msg, console_bar); + Printf(PRINT_HIGH|PRINT_NONOTIFY, TEXTCOLOR_ESCAPESTR "%c%s\n%s\n%s\n", color, console_bar, msg, console_bar); StatusBar->AttachMessage (Create(font, msg, 1.5f, 0.375f, 0, 0, color, con_midtime), MAKE_ID('C','N','T','R')); }