mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-02-02 22:01:41 +00:00
- text screen helper stuff for cutscene system.
This commit is contained in:
parent
933fa62782
commit
e5baef837a
4 changed files with 17 additions and 3 deletions
|
@ -51,6 +51,8 @@
|
||||||
#include "s_music.h"
|
#include "s_music.h"
|
||||||
#include "m_argv.h"
|
#include "m_argv.h"
|
||||||
|
|
||||||
|
CVAR(Bool, inter_subtitles, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG);
|
||||||
|
|
||||||
DObject* runner;
|
DObject* runner;
|
||||||
PClass* runnerclass;
|
PClass* runnerclass;
|
||||||
PType* runnerclasstype;
|
PType* runnerclasstype;
|
||||||
|
|
|
@ -6,6 +6,9 @@
|
||||||
#include "s_soundinternal.h"
|
#include "s_soundinternal.h"
|
||||||
#include "gamestate.h"
|
#include "gamestate.h"
|
||||||
#include "zstring.h"
|
#include "zstring.h"
|
||||||
|
#include "c_cvars.h"
|
||||||
|
|
||||||
|
EXTERN_CVAR(Bool, inter_subtitles)
|
||||||
|
|
||||||
using CompletionFunc = std::function<void(bool)>;
|
using CompletionFunc = std::function<void(bool)>;
|
||||||
|
|
||||||
|
|
|
@ -56,6 +56,8 @@
|
||||||
#include "v_draw.h"
|
#include "v_draw.h"
|
||||||
#include "doommenu.h"
|
#include "doommenu.h"
|
||||||
#include "sbar.h"
|
#include "sbar.h"
|
||||||
|
#include "screenjob.h"
|
||||||
|
#include "vm.h"
|
||||||
|
|
||||||
FIntermissionDescriptorList IntermissionDescriptors;
|
FIntermissionDescriptorList IntermissionDescriptors;
|
||||||
|
|
||||||
|
@ -73,10 +75,17 @@ IMPLEMENT_POINTERS_END
|
||||||
extern int NoWipe;
|
extern int NoWipe;
|
||||||
|
|
||||||
CVAR(Bool, nointerscrollabort, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG);
|
CVAR(Bool, nointerscrollabort, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG);
|
||||||
CVAR(Bool, inter_subtitles, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG);
|
|
||||||
|
|
||||||
CVAR(Bool, inter_classic_scaling, true, CVAR_ARCHIVE);
|
CVAR(Bool, inter_classic_scaling, true, CVAR_ARCHIVE);
|
||||||
|
|
||||||
|
DEFINE_ACTION_FUNCTION(_Screen, GetTextScreenSize)
|
||||||
|
{
|
||||||
|
auto scale = active_con_scaletext(twod, generic_ui);
|
||||||
|
int hudwidth = twod->GetWidth() / scale;
|
||||||
|
int hudheight = twod->GetHeight() / scale;
|
||||||
|
ACTION_RETURN_VEC2(DVector2(hudwidth, hudheight));
|
||||||
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
//
|
//
|
||||||
// This also gets used by the title loop.
|
// This also gets used by the title loop.
|
||||||
|
@ -376,7 +385,6 @@ void DIntermissionScreenText::Drawer ()
|
||||||
Super::Drawer();
|
Super::Drawer();
|
||||||
if (mTicker >= mTextDelay)
|
if (mTicker >= mTextDelay)
|
||||||
{
|
{
|
||||||
FGameTexture *pic;
|
|
||||||
int w;
|
int w;
|
||||||
size_t count;
|
size_t count;
|
||||||
int c;
|
int c;
|
||||||
|
@ -446,7 +454,7 @@ void DIntermissionScreenText::Drawer ()
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
pic = font->GetChar (c, mTextColor, &w);
|
w = font->GetCharWidth(c);
|
||||||
w += kerning;
|
w += kerning;
|
||||||
w *= fontscale;
|
w *= fontscale;
|
||||||
if (cx + w > twod->GetWidth())
|
if (cx + w > twod->GetWidth())
|
||||||
|
|
|
@ -412,6 +412,7 @@ struct Screen native
|
||||||
native static Color PaletteColor(int index);
|
native static Color PaletteColor(int index);
|
||||||
native static int GetWidth();
|
native static int GetWidth();
|
||||||
native static int GetHeight();
|
native static int GetHeight();
|
||||||
|
native static Vector2 GetTextScreenSize();
|
||||||
native static void Clear(int left, int top, int right, int bottom, Color color, int palcolor = -1);
|
native static void Clear(int left, int top, int right, int bottom, Color color, int palcolor = -1);
|
||||||
native static void Dim(Color col, double amount, int x, int y, int w, int h, ERenderStyle style = STYLE_Translucent);
|
native static void Dim(Color col, double amount, int x, int y, int w, int h, ERenderStyle style = STYLE_Translucent);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue