Skip to content

Commit

Permalink
- moved status bar base class to 'common'.
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Oct 31, 2020
1 parent e6c96bc commit 53a6b9e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
4 changes: 3 additions & 1 deletion src/CMakeLists.txt
Expand Up @@ -588,6 +588,7 @@ file( GLOB HEADER_FILES
common/utility/*.h
common/engine/*.h
common/menu/*.h
common/statusbar/*.h
common/fonts/*.h
common/objects/*.h
common/filesystem/*.h
Expand Down Expand Up @@ -905,7 +906,6 @@ set (PCH_SOURCES
g_statusbar/sbarinfo.cpp
g_statusbar/sbar_mugshot.cpp
g_statusbar/shared_sbar.cpp
g_statusbar/base_sbar.cpp
rendering/2d/f_wipe.cpp
rendering/2d/v_blend.cpp
rendering/hwrenderer/hw_entrypoint.cpp
Expand Down Expand Up @@ -1107,6 +1107,7 @@ set (PCH_SOURCES
common/menu/resolutionmenu.cpp
common/menu/menudef.cpp
common/menu/savegamemanager.cpp
common/statusbar/base_sbar.cpp

common/rendering/v_framebuffer.cpp
common/rendering/v_video.cpp
Expand Down Expand Up @@ -1245,6 +1246,7 @@ include_directories( .
common/console
common/engine
common/menu
common/statusbar
common/fonts
common/objects
common/rendering
Expand Down
4 changes: 2 additions & 2 deletions src/common/scripting/interface/vmnatives.cpp
Expand Up @@ -289,7 +289,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(DStatusBarCore, BeginHUD, BeginHUD)

DHUDFont* CreateHudFont(FFont* fnt, int spac, int mono, int sx, int sy)
{
return (Create<DHUDFont>(fnt, spac, EMonospacing(mono), sy, sy));
return Create<DHUDFont>(fnt, spac, EMonospacing(mono), sy, sy);
}

DEFINE_ACTION_FUNCTION_NATIVE(DHUDFont, Create, CreateHudFont)
Expand All @@ -300,7 +300,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(DHUDFont, Create, CreateHudFont)
PARAM_INT(mono);
PARAM_INT(sx);
PARAM_INT(sy);
ACTION_RETURN_POINTER(Create<DHUDFont>(fnt, spac, EMonospacing(mono), sy, sy));
ACTION_RETURN_POINTER(CreateHudFont(fnt, spac, mono, sy, sy));
}


Expand Down
Expand Up @@ -52,7 +52,7 @@ static int CrosshairNum;


IMPLEMENT_CLASS(DStatusBarCore, true, false)
IMPLEMENT_CLASS(DHUDFont, true, false);
IMPLEMENT_CLASS(DHUDFont, false, false);


CVAR(Color, crosshaircolor, 0xff0000, CVAR_ARCHIVE);
Expand Down
Expand Up @@ -51,8 +51,11 @@ enum DI_Flags
DI_SCREEN_LEFT_TOP = DI_SCREEN_TOP | DI_SCREEN_LEFT,
DI_SCREEN_RIGHT_TOP = DI_SCREEN_TOP | DI_SCREEN_RIGHT,
DI_SCREEN_LEFT_BOTTOM = DI_SCREEN_BOTTOM | DI_SCREEN_LEFT,
DI_SCREEN_LEFT_CENTER = DI_SCREEN_VCENTER | DI_SCREEN_LEFT,
DI_SCREEN_RIGHT_BOTTOM = DI_SCREEN_BOTTOM | DI_SCREEN_RIGHT,
DI_SCREEN_RIGHT_CENTER = DI_SCREEN_VCENTER | DI_SCREEN_RIGHT,
DI_SCREEN_CENTER = DI_SCREEN_VCENTER | DI_SCREEN_HCENTER,
DI_SCREEN_CENTER_TOP = DI_SCREEN_TOP | DI_SCREEN_HCENTER,
DI_SCREEN_CENTER_BOTTOM = DI_SCREEN_BOTTOM | DI_SCREEN_HCENTER,
DI_SCREEN_OFFSETS = DI_SCREEN_HOFFSET | DI_SCREEN_VOFFSET,

Expand Down Expand Up @@ -101,10 +104,10 @@ enum DI_Flags
//
//============================================================================

class DHUDFont : public DObject
class DHUDFont : public DObject
{
// this blocks CreateNew on this class which is the intent here.
DECLARE_ABSTRACT_CLASS(DHUDFont, DObject);
DECLARE_CLASS(DHUDFont, DObject);

public:
FFont* mFont;
Expand All @@ -113,6 +116,8 @@ class DHUDFont : public DObject
int mShadowX;
int mShadowY;

DHUDFont() = default;

DHUDFont(FFont* f, int sp, EMonospacing ms, int sx, int sy)
: mFont(f), mSpacing(sp), mMonospacing(ms), mShadowX(sx), mShadowY(sy)
{}
Expand Down

0 comments on commit 53a6b9e

Please sign in to comment.