mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-01-18 06:31:45 +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: Polyobjects could contain segs that weren't flagged as such.
|
||||||
- fixed: Trying to show a popup crashed in the SBARINFO code because of a
|
- fixed: Trying to show a popup crashed in the SBARINFO code because of a
|
||||||
missing NULL pointer check.
|
missing NULL pointer check.
|
||||||
|
|
|
@ -2142,6 +2142,7 @@ static void M_DrawPlayerSlider (int x, int y, int cur)
|
||||||
|
|
||||||
static void M_PlayerSetupDrawer ()
|
static void M_PlayerSetupDrawer ()
|
||||||
{
|
{
|
||||||
|
const int LINEHEIGHT = 16;
|
||||||
int x, xo, yo;
|
int x, xo, yo;
|
||||||
EColorRange label, value;
|
EColorRange label, value;
|
||||||
DWORD color;
|
DWORD color;
|
||||||
|
|
|
@ -178,7 +178,7 @@ struct menu_t {
|
||||||
int scrolltop;
|
int scrolltop;
|
||||||
int scrollpos;
|
int scrollpos;
|
||||||
int y;
|
int y;
|
||||||
void (*PreDraw)(void);
|
bool (*PreDraw)(void);
|
||||||
bool DontDim;
|
bool DontDim;
|
||||||
void (*EscapeHandler)(void);
|
void (*EscapeHandler)(void);
|
||||||
};
|
};
|
||||||
|
@ -264,6 +264,7 @@ extern menustack_t MenuStack[16];
|
||||||
extern int MenuStackDepth;
|
extern int MenuStackDepth;
|
||||||
|
|
||||||
extern bool OptionsActive;
|
extern bool OptionsActive;
|
||||||
|
extern int skullAnimCounter;
|
||||||
|
|
||||||
extern menu_t *CurrentMenu;
|
extern menu_t *CurrentMenu;
|
||||||
extern int CurrentItem;
|
extern int CurrentItem;
|
||||||
|
|
|
@ -107,8 +107,6 @@ CVAR (Bool, show_obituaries, true, CVAR_ARCHIVE)
|
||||||
EXTERN_CVAR (Bool, longsavemessages)
|
EXTERN_CVAR (Bool, longsavemessages)
|
||||||
EXTERN_CVAR (Bool, screenshot_quiet)
|
EXTERN_CVAR (Bool, screenshot_quiet)
|
||||||
|
|
||||||
extern int skullAnimCounter;
|
|
||||||
|
|
||||||
EXTERN_CVAR (Bool, cl_run)
|
EXTERN_CVAR (Bool, cl_run)
|
||||||
EXTERN_CVAR (Int, crosshair)
|
EXTERN_CVAR (Int, crosshair)
|
||||||
EXTERN_CVAR (Bool, freelook)
|
EXTERN_CVAR (Bool, freelook)
|
||||||
|
@ -1651,7 +1649,7 @@ void M_OptDrawer ()
|
||||||
|
|
||||||
if (CurrentMenu->PreDraw != NULL)
|
if (CurrentMenu->PreDraw != NULL)
|
||||||
{
|
{
|
||||||
CurrentMenu->PreDraw ();
|
if (CurrentMenu->PreDraw ()) return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CurrentMenu->y != 0)
|
if (CurrentMenu->y != 0)
|
||||||
|
@ -3002,7 +3000,7 @@ static void DefaultCustomColors ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ColorPickerDrawer ()
|
static bool ColorPickerDrawer ()
|
||||||
{
|
{
|
||||||
DWORD newColor = MAKEARGB(255,
|
DWORD newColor = MAKEARGB(255,
|
||||||
int(ColorPickerItems[2].a.fval),
|
int(ColorPickerItems[2].a.fval),
|
||||||
|
@ -3021,6 +3019,7 @@ static void ColorPickerDrawer ()
|
||||||
"Old", DTA_CleanNoMove_1, true, TAG_DONE);
|
"Old", DTA_CleanNoMove_1, true, TAG_DONE);
|
||||||
screen->DrawText (SmallFont, CR_WHITE, x+(48+24-SmallFont->StringWidth("New")/2)*CleanXfac_1, y,
|
screen->DrawText (SmallFont, CR_WHITE, x+(48+24-SmallFont->StringWidth("New")/2)*CleanXfac_1, y,
|
||||||
"New", DTA_CleanNoMove_1, true, TAG_DONE);
|
"New", DTA_CleanNoMove_1, true, TAG_DONE);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SetColorPickerSliders ()
|
static void SetColorPickerSliders ()
|
||||||
|
@ -3117,7 +3116,7 @@ CCMD (menu_mouse)
|
||||||
MouseOptions ();
|
MouseOptions ();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void DrawJoystickConfigMenuHeader()
|
static bool DrawJoystickConfigMenuHeader()
|
||||||
{
|
{
|
||||||
FString joyname = SELECTED_JOYSTICK->GetName();
|
FString joyname = SELECTED_JOYSTICK->GetName();
|
||||||
screen->DrawText(BigFont, gameinfo.gametype & GAME_DoomChex ? CR_RED : CR_UNTRANSLATED,
|
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->DrawText(SmallFont, gameinfo.gametype & GAME_DoomChex ? CR_RED : CR_UNTRANSLATED,
|
||||||
(screen->GetWidth() - SmallFont->StringWidth(joyname) * CleanXfac_1) / 2, (8 + BigFont->GetHeight()) * CleanYfac_1,
|
(screen->GetWidth() - SmallFont->StringWidth(joyname) * CleanXfac_1) / 2, (8 + BigFont->GetHeight()) * CleanYfac_1,
|
||||||
joyname, DTA_CleanNoMove_1, true, TAG_DONE);
|
joyname, DTA_CleanNoMove_1, true, TAG_DONE);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void UpdateJoystickConfigMenu(IJoystickConfig *joy)
|
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 *ReadRetailNode (FileReader *lump, DWORD &prevSpeakerType);
|
||||||
static FStrifeDialogueNode *ReadTeaserNode (FileReader *lump, DWORD &prevSpeakerType);
|
static FStrifeDialogueNode *ReadTeaserNode (FileReader *lump, DWORD &prevSpeakerType);
|
||||||
static void ParseReplies (FStrifeDialogueReply **replyptr, Response *responses);
|
static void ParseReplies (FStrifeDialogueReply **replyptr, Response *responses);
|
||||||
static void DrawConversationMenu ();
|
static bool DrawConversationMenu ();
|
||||||
static void PickConversationReply ();
|
static void PickConversationReply ();
|
||||||
static void CleanupConversationMenu ();
|
static void CleanupConversationMenu ();
|
||||||
static void ConversationMenuEscaped ();
|
static void ConversationMenuEscaped ();
|
||||||
|
@ -804,6 +804,7 @@ void P_StartConversation (AActor *npc, AActor *pc, bool facetalker, bool saveang
|
||||||
OptionsActive = true;
|
OptionsActive = true;
|
||||||
menuactive = MENU_OnNoPause;
|
menuactive = MENU_OnNoPause;
|
||||||
ConversationPauseTic = gametic + 20;
|
ConversationPauseTic = gametic + 20;
|
||||||
|
|
||||||
M_SwitchMenu (&ConversationMenu);
|
M_SwitchMenu (&ConversationMenu);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -838,10 +839,13 @@ void P_ResumeConversation ()
|
||||||
//
|
//
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
static void DrawConversationMenu ()
|
static bool DrawConversationMenu ()
|
||||||
{
|
{
|
||||||
const char *speakerName;
|
const char *speakerName;
|
||||||
int i, x, y, linesize;
|
int i, x, y, linesize;
|
||||||
|
int width, fontheight;
|
||||||
|
menuitem_t *item;
|
||||||
|
int labelofs;
|
||||||
|
|
||||||
player_t *cp = &players[consoleplayer];
|
player_t *cp = &players[consoleplayer];
|
||||||
|
|
||||||
|
@ -851,7 +855,7 @@ static void DrawConversationMenu ()
|
||||||
if (CurNode == NULL)
|
if (CurNode == NULL)
|
||||||
{
|
{
|
||||||
M_ClearMenus ();
|
M_ClearMenus ();
|
||||||
return;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// [CW] Freeze the game depending on MAPINFO options.
|
// [CW] Freeze the game depending on MAPINFO options.
|
||||||
|
@ -925,8 +929,53 @@ static void DrawConversationMenu ()
|
||||||
screen->DrawTexture (TexMan(((AInventory *)GetDefaultByType (RUNTIME_CLASS(ACoin)))->Icon),
|
screen->DrawTexture (TexMan(((AInventory *)GetDefaultByType (RUNTIME_CLASS(ACoin)))->Icon),
|
||||||
2, 189, DTA_320x200, true, TAG_DONE);
|
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
|
// PickConversationReply
|
||||||
|
|
|
@ -3574,7 +3574,7 @@ void P_SetupLevel (char *lumpname, int position)
|
||||||
{
|
{
|
||||||
unsigned int startTime, endTime;
|
unsigned int startTime, endTime;
|
||||||
|
|
||||||
startTime = I_MSTime ();
|
startTime = I_FPSTime ();
|
||||||
TArray<FNodeBuilder::FPolyStart> polyspots, anchors;
|
TArray<FNodeBuilder::FPolyStart> polyspots, anchors;
|
||||||
P_GetPolySpots (map, polyspots, anchors);
|
P_GetPolySpots (map, polyspots, anchors);
|
||||||
FNodeBuilder::FLevel leveldata =
|
FNodeBuilder::FLevel leveldata =
|
||||||
|
@ -3591,7 +3591,7 @@ void P_SetupLevel (char *lumpname, int position)
|
||||||
segs, numsegs,
|
segs, numsegs,
|
||||||
subsectors, numsubsectors,
|
subsectors, numsubsectors,
|
||||||
vertexes, numvertexes);
|
vertexes, numvertexes);
|
||||||
endTime = I_MSTime ();
|
endTime = I_FPSTime ();
|
||||||
DPrintf ("BSP generation took %.3f sec (%d segs)\n", (endTime - startTime) * 0.001, numsegs);
|
DPrintf ("BSP generation took %.3f sec (%d segs)\n", (endTime - startTime) * 0.001, numsegs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue