Skip to content

Commit

Permalink
Fixed console title bar text. Nobody was setting the title text strin…
Browse files Browse the repository at this point in the history
…gs until the control panel was opened, since the old Con_Startup stuff is no longer used during engine startup (and thus should be renamed to Con_UI or just UI_*).
  • Loading branch information
skyjake committed Mar 27, 2007
1 parent 3568e86 commit 7ae2187
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 11 deletions.
4 changes: 0 additions & 4 deletions doomsday/build/mac/Doomsday.xcodeproj/project.pbxproj
Expand Up @@ -479,7 +479,6 @@
B0F17898087C5A230051F24A /* ui_panel.h in Headers */ = {isa = PBXBuildFile; fileRef = B02AC49906B3FA91005824AD /* ui_panel.h */; };
B0F17899087C5A230051F24A /* sys_findfile.h in Headers */ = {isa = PBXBuildFile; fileRef = B02AC49B06B3FA91005824AD /* sys_findfile.h */; };
B0F1789A087C5A230051F24A /* sys_path.h in Headers */ = {isa = PBXBuildFile; fileRef = B02AC49C06B3FA91005824AD /* sys_path.h */; };
B0F1789B087C5A230051F24A /* zconf.h in Headers */ = {isa = PBXBuildFile; fileRef = B02AC49D06B3FA91005824AD /* zconf.h */; };
B0F1789C087C5A230051F24A /* sys_dylib.h in Headers */ = {isa = PBXBuildFile; fileRef = B013500E06EDD51E007861F2 /* sys_dylib.h */; };
B0F1789D087C5A230051F24A /* rend_bias.h in Headers */ = {isa = PBXBuildFile; fileRef = B0E3D3E107903967007811F6 /* rend_bias.h */; };
B0F178A1087C5A230051F24A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
Expand Down Expand Up @@ -1000,7 +999,6 @@
B02AC49906B3FA91005824AD /* ui_panel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ui_panel.h; path = ../../engine/portable/include/ui_panel.h; sourceTree = SOURCE_ROOT; };
B02AC49B06B3FA91005824AD /* sys_findfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sys_findfile.h; path = ../../engine/unix/include/sys_findfile.h; sourceTree = SOURCE_ROOT; };
B02AC49C06B3FA91005824AD /* sys_path.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sys_path.h; path = ../../engine/unix/include/sys_path.h; sourceTree = SOURCE_ROOT; };
B02AC49D06B3FA91005824AD /* zconf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = zconf.h; path = ../../external/zlib/include/zconf.h; sourceTree = SOURCE_ROOT; };
B02AC85006B41788005824AD /* cl_frame.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cl_frame.c; path = ../../engine/portable/src/cl_frame.c; sourceTree = SOURCE_ROOT; };
B02AC85106B41788005824AD /* cl_main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cl_main.c; path = ../../engine/portable/src/cl_main.c; sourceTree = SOURCE_ROOT; };
B02AC85206B41788005824AD /* cl_mobj.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cl_mobj.c; path = ../../engine/portable/src/cl_mobj.c; sourceTree = SOURCE_ROOT; wrapsLines = 1; };
Expand Down Expand Up @@ -1997,7 +1995,6 @@
B02AC49706B3FA91005824AD /* ui_main.h */,
B02AC49806B3FA91005824AD /* ui_mpi.h */,
B02AC49906B3FA91005824AD /* ui_panel.h */,
B02AC49D06B3FA91005824AD /* zconf.h */,
B02AC38D06B3FA91005824AD /* cl_def.h */,
B02AC38E06B3FA91005824AD /* cl_frame.h */,
B02AC38F06B3FA91005824AD /* cl_mobj.h */,
Expand Down Expand Up @@ -2384,7 +2381,6 @@
B0F17898087C5A230051F24A /* ui_panel.h in Headers */,
B0F17899087C5A230051F24A /* sys_findfile.h in Headers */,
B0F1789A087C5A230051F24A /* sys_path.h in Headers */,
B0F1789B087C5A230051F24A /* zconf.h in Headers */,
B0F1789C087C5A230051F24A /* sys_dylib.h in Headers */,
B0F1789D087C5A230051F24A /* rend_bias.h in Headers */,
B0DAE5CE09823E47000A8265 /* p_dmu.h in Headers */,
Expand Down
1 change: 1 addition & 0 deletions doomsday/engine/portable/include/con_start.h
Expand Up @@ -31,6 +31,7 @@
extern int startupLogo;
extern boolean startupScreen;

void Con_InitUI(void);
void Con_StartupInit(void);
void Con_StartupDone(void);
int Con_DrawTitle(float alpha);
Expand Down
4 changes: 0 additions & 4 deletions doomsday/engine/portable/src/con_busy.c
Expand Up @@ -80,10 +80,6 @@ static int busyFontHgt; // Height of the font.
static DGLuint texLoading[2];
static DGLuint texScreenshot; // Captured screenshot of the latest frame.

static char *titleText = "";
static char secondaryTitleText[256];
static char statusText[256];

// CODE --------------------------------------------------------------------

/**
Expand Down
20 changes: 17 additions & 3 deletions doomsday/engine/portable/src/con_start.c
Expand Up @@ -60,14 +60,27 @@ int startupLogo;

// PRIVATE DATA DEFINITIONS ------------------------------------------------

static char *titleText = "";
static char *titleText = "Doomsday " DOOMSDAY_VERSION_TEXT;
static char secondaryTitleText[256];
static char statusText[256];
static int fontHgt = 8; // Height of the font.
char *bitmap = NULL;

// CODE --------------------------------------------------------------------

/**
* Initializes the Doomsday console user interface. This is called when
* engine startup is complete.
*/
void Con_InitUI(void)
{
// Update the secondary title and the game status.
strncpy(secondaryTitleText, (char *) gx.GetVariable(DD_GAME_ID),
sizeof(secondaryTitleText) - 1);
strncpy(statusText, (char *) gx.GetVariable(DD_GAME_MODE),
sizeof(statusText) - 1);
}

/*
* The startup screen mode is used during engine startup. In startup
* mode, the whole screen is used for console output.
Expand Down Expand Up @@ -169,11 +182,12 @@ int Con_DrawTitle(float alpha)
{
int width = 0;
int height = UI_TITLE_HGT;
int oldFont = FR_GetCurrent();

gl.MatrixMode(DGL_MODELVIEW);
gl.PushMatrix();
gl.LoadIdentity();

FR_SetFont(glFontVariable[GLFS_BOLD]);
height = FR_TextHeight("W") + UI_BORDER;
UI_DrawTitleEx(titleText, height, alpha);
Expand All @@ -195,7 +209,7 @@ int Con_DrawTitle(float alpha)
gl.MatrixMode(DGL_MODELVIEW);
gl.PopMatrix();

FR_SetFont(glFontFixed);
FR_SetFont(oldFont);
return height;
}

Expand Down
3 changes: 3 additions & 0 deletions doomsday/engine/portable/src/dd_main.c
Expand Up @@ -441,6 +441,9 @@ void DD_Main(void)
else
Con_Executef(CMDS_CMDLINE, false, "net server start");
}

// Final preparations for using the console UI.
Con_InitUI();

DD_GameLoop(); // Never returns...
}
Expand Down

0 comments on commit 7ae2187

Please sign in to comment.