mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 20:20:40 +00:00
-minor cleanup and backporting of con_pulsetext from Raze.
This commit is contained in:
parent
9285d91918
commit
03a0cf943e
5 changed files with 8 additions and 7 deletions
|
@ -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];
|
||||
|
|
|
@ -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<NUM_KEYS> 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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -43,7 +43,11 @@
|
|||
#elif defined(__solaris__) || defined(__OpenBSD__) || defined(__DragonFly__)
|
||||
#define _msize(p) (*((size_t*)(p)-1))
|
||||
#elif !defined(_WIN32)
|
||||
#ifdef __FreeBSD__
|
||||
#include <malloc_np.h>
|
||||
#else
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
#define _msize(p) malloc_usable_size(p) // from glibc/FreeBSD
|
||||
#endif
|
||||
|
||||
|
|
|
@ -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<DHUDMessage>(font, msg, 1.5f, 0.375f, 0, 0, color, con_midtime), MAKE_ID('C','N','T','R'));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue