mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-27 22:42:57 +00:00
- fixed: The player setup menu used the main menu's line spacing which
for all non-Doom games was too wide. - fixed: Strife's dialogues cannot use the new options menu code to draw themselves so now they use a stripped down version of the old code. - Replaced I_MSTime with I_FPSTime in node builder timing because basetime will not be initialized yet if a map is started directly from the commandline. SVN r2096 (trunk)
This commit is contained in:
parent
8bbd90b200
commit
4b64df6778
6 changed files with 71 additions and 12 deletions
|
@ -1,4 +1,12 @@
|
|||
January 2, 2010 (Changes by Graf Zahl)
|
||||
January 3, 2010 (Changes by Graf Zahl)
|
||||
- fixed: The player setup menu used the main menu's line spacing which
|
||||
for all non-Doom games was too wide.
|
||||
- fixed: Strife's dialogues cannot use the new options menu code to draw
|
||||
themselves so now they use a stripped down version of the old code.
|
||||
- Replaced I_MSTime with I_FPSTime in node builder timing because basetime
|
||||
will not be initialized yet if a map is started directly from the commandline.
|
||||
|
||||
January 2, 2010 (Changes by Graf Zahl)
|
||||
- fixed: Polyobjects could contain segs that weren't flagged as such.
|
||||
- fixed: Trying to show a popup crashed in the SBARINFO code because of a
|
||||
missing NULL pointer check.
|
||||
|
|
|
@ -2142,6 +2142,7 @@ static void M_DrawPlayerSlider (int x, int y, int cur)
|
|||
|
||||
static void M_PlayerSetupDrawer ()
|
||||
{
|
||||
const int LINEHEIGHT = 16;
|
||||
int x, xo, yo;
|
||||
EColorRange label, value;
|
||||
DWORD color;
|
||||
|
|
|
@ -178,7 +178,7 @@ struct menu_t {
|
|||
int scrolltop;
|
||||
int scrollpos;
|
||||
int y;
|
||||
void (*PreDraw)(void);
|
||||
bool (*PreDraw)(void);
|
||||
bool DontDim;
|
||||
void (*EscapeHandler)(void);
|
||||
};
|
||||
|
@ -264,6 +264,7 @@ extern menustack_t MenuStack[16];
|
|||
extern int MenuStackDepth;
|
||||
|
||||
extern bool OptionsActive;
|
||||
extern int skullAnimCounter;
|
||||
|
||||
extern menu_t *CurrentMenu;
|
||||
extern int CurrentItem;
|
||||
|
|
|
@ -107,8 +107,6 @@ CVAR (Bool, show_obituaries, true, CVAR_ARCHIVE)
|
|||
EXTERN_CVAR (Bool, longsavemessages)
|
||||
EXTERN_CVAR (Bool, screenshot_quiet)
|
||||
|
||||
extern int skullAnimCounter;
|
||||
|
||||
EXTERN_CVAR (Bool, cl_run)
|
||||
EXTERN_CVAR (Int, crosshair)
|
||||
EXTERN_CVAR (Bool, freelook)
|
||||
|
@ -1651,7 +1649,7 @@ void M_OptDrawer ()
|
|||
|
||||
if (CurrentMenu->PreDraw != NULL)
|
||||
{
|
||||
CurrentMenu->PreDraw ();
|
||||
if (CurrentMenu->PreDraw ()) return;
|
||||
}
|
||||
|
||||
if (CurrentMenu->y != 0)
|
||||
|
@ -3002,7 +3000,7 @@ static void DefaultCustomColors ()
|
|||
}
|
||||
}
|
||||
|
||||
static void ColorPickerDrawer ()
|
||||
static bool ColorPickerDrawer ()
|
||||
{
|
||||
DWORD newColor = MAKEARGB(255,
|
||||
int(ColorPickerItems[2].a.fval),
|
||||
|
@ -3021,6 +3019,7 @@ static void ColorPickerDrawer ()
|
|||
"Old", DTA_CleanNoMove_1, true, TAG_DONE);
|
||||
screen->DrawText (SmallFont, CR_WHITE, x+(48+24-SmallFont->StringWidth("New")/2)*CleanXfac_1, y,
|
||||
"New", DTA_CleanNoMove_1, true, TAG_DONE);
|
||||
return false;
|
||||
}
|
||||
|
||||
static void SetColorPickerSliders ()
|
||||
|
@ -3117,7 +3116,7 @@ CCMD (menu_mouse)
|
|||
MouseOptions ();
|
||||
}
|
||||
|
||||
static void DrawJoystickConfigMenuHeader()
|
||||
static bool DrawJoystickConfigMenuHeader()
|
||||
{
|
||||
FString joyname = SELECTED_JOYSTICK->GetName();
|
||||
screen->DrawText(BigFont, gameinfo.gametype & GAME_DoomChex ? CR_RED : CR_UNTRANSLATED,
|
||||
|
@ -3127,6 +3126,7 @@ static void DrawJoystickConfigMenuHeader()
|
|||
screen->DrawText(SmallFont, gameinfo.gametype & GAME_DoomChex ? CR_RED : CR_UNTRANSLATED,
|
||||
(screen->GetWidth() - SmallFont->StringWidth(joyname) * CleanXfac_1) / 2, (8 + BigFont->GetHeight()) * CleanYfac_1,
|
||||
joyname, DTA_CleanNoMove_1, true, TAG_DONE);
|
||||
return false;
|
||||
}
|
||||
|
||||
static void UpdateJoystickConfigMenu(IJoystickConfig *joy)
|
||||
|
|
|
@ -117,7 +117,7 @@ static void LoadScriptFile(FileReader *lump, int numnodes);
|
|||
static FStrifeDialogueNode *ReadRetailNode (FileReader *lump, DWORD &prevSpeakerType);
|
||||
static FStrifeDialogueNode *ReadTeaserNode (FileReader *lump, DWORD &prevSpeakerType);
|
||||
static void ParseReplies (FStrifeDialogueReply **replyptr, Response *responses);
|
||||
static void DrawConversationMenu ();
|
||||
static bool DrawConversationMenu ();
|
||||
static void PickConversationReply ();
|
||||
static void CleanupConversationMenu ();
|
||||
static void ConversationMenuEscaped ();
|
||||
|
@ -804,6 +804,7 @@ void P_StartConversation (AActor *npc, AActor *pc, bool facetalker, bool saveang
|
|||
OptionsActive = true;
|
||||
menuactive = MENU_OnNoPause;
|
||||
ConversationPauseTic = gametic + 20;
|
||||
|
||||
M_SwitchMenu (&ConversationMenu);
|
||||
}
|
||||
}
|
||||
|
@ -838,10 +839,13 @@ void P_ResumeConversation ()
|
|||
//
|
||||
//============================================================================
|
||||
|
||||
static void DrawConversationMenu ()
|
||||
static bool DrawConversationMenu ()
|
||||
{
|
||||
const char *speakerName;
|
||||
int i, x, y, linesize;
|
||||
int width, fontheight;
|
||||
menuitem_t *item;
|
||||
int labelofs;
|
||||
|
||||
player_t *cp = &players[consoleplayer];
|
||||
|
||||
|
@ -851,7 +855,7 @@ static void DrawConversationMenu ()
|
|||
if (CurNode == NULL)
|
||||
{
|
||||
M_ClearMenus ();
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
// [CW] Freeze the game depending on MAPINFO options.
|
||||
|
@ -925,8 +929,53 @@ static void DrawConversationMenu ()
|
|||
screen->DrawTexture (TexMan(((AInventory *)GetDefaultByType (RUNTIME_CLASS(ACoin)))->Icon),
|
||||
2, 189, DTA_320x200, true, TAG_DONE);
|
||||
}
|
||||
|
||||
y = CurrentMenu->y;
|
||||
|
||||
if (gameinfo.gametype & GAME_Raven)
|
||||
{
|
||||
labelofs = 2;
|
||||
y -= 2;
|
||||
fontheight = 9;
|
||||
}
|
||||
else
|
||||
{
|
||||
labelofs = 0;
|
||||
fontheight = 8;
|
||||
}
|
||||
for (i = 0; i < CurrentMenu->numitems; i++, y += fontheight)
|
||||
{
|
||||
item = CurrentMenu->items + i;
|
||||
|
||||
width = SmallFont->StringWidth(item->label);
|
||||
x = CurrentMenu->indent + 14;
|
||||
|
||||
screen->DrawText (SmallFont, CR_GREEN, x, y, item->label, DTA_Clean, true, TAG_DONE);
|
||||
|
||||
if (item->b.position != 0)
|
||||
{
|
||||
char tbuf[16];
|
||||
|
||||
mysnprintf (tbuf, countof(tbuf), "%d.", item->b.position);
|
||||
x = CurrentMenu->indent - SmallFont->StringWidth (tbuf);
|
||||
screen->DrawText (SmallFont, CR_GREY, x, y, tbuf, DTA_Clean, true, TAG_DONE);
|
||||
}
|
||||
|
||||
if (i == CurrentItem &&
|
||||
(skullAnimCounter < 6 || menuactive == MENU_WaitKey))
|
||||
{
|
||||
int x = (CurrentMenu->indent + 3 - 160) * CleanXfac + screen->GetWidth() / 2;
|
||||
int yy = (y-1+labelofs - 100) * CleanYfac + screen->GetHeight() / 2;
|
||||
screen->DrawText (ConFont, CR_RED, x, yy, "\xd",
|
||||
DTA_CellX, 8 * CleanXfac,
|
||||
DTA_CellY, 8 * CleanYfac,
|
||||
TAG_DONE);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// PickConversationReply
|
||||
|
|
|
@ -3574,7 +3574,7 @@ void P_SetupLevel (char *lumpname, int position)
|
|||
{
|
||||
unsigned int startTime, endTime;
|
||||
|
||||
startTime = I_MSTime ();
|
||||
startTime = I_FPSTime ();
|
||||
TArray<FNodeBuilder::FPolyStart> polyspots, anchors;
|
||||
P_GetPolySpots (map, polyspots, anchors);
|
||||
FNodeBuilder::FLevel leveldata =
|
||||
|
@ -3591,7 +3591,7 @@ void P_SetupLevel (char *lumpname, int position)
|
|||
segs, numsegs,
|
||||
subsectors, numsubsectors,
|
||||
vertexes, numvertexes);
|
||||
endTime = I_MSTime ();
|
||||
endTime = I_FPSTime ();
|
||||
DPrintf ("BSP generation took %.3f sec (%d segs)\n", (endTime - startTime) * 0.001, numsegs);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue