mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
- added an engine credits menu page.
This commit is contained in:
parent
c0c18db7cd
commit
a4d8e68b9f
10 changed files with 58 additions and 838 deletions
|
@ -466,6 +466,16 @@ bool M_SetMenu(FName menu, int param, FName caller)
|
|||
case NAME_SkillMenu:
|
||||
GameStartupInfo.Skill = param;
|
||||
break;
|
||||
|
||||
case NAME_EngineCredits:
|
||||
case NAME_EngineCredits2:
|
||||
{
|
||||
auto m = DMenu::CurrentMenu;
|
||||
DMenu::CurrentMenu = m->mParentMenu;
|
||||
m->mParentMenu = nullptr;
|
||||
toDelete.Push(m);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
switch (menu)
|
||||
|
|
|
@ -67,7 +67,7 @@ public:
|
|||
bool Activate(FName caller) override
|
||||
{
|
||||
M_MenuSound(CursorSound);
|
||||
M_SetMenu(mAction, mParam);
|
||||
M_SetMenu(mAction, mParam, static_cast<DOptionMenu*>(DMenu::CurrentMenu)->GetDescriptor()->mMenuName);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -50,4 +50,6 @@ xx(Alresamplers)
|
|||
xx(AdvSoundOptions)
|
||||
xx(JoystickConfigMenu)
|
||||
xx(JoystickOptions)
|
||||
xx(EngineCredits)
|
||||
xx(EngineCredits2)
|
||||
|
||||
|
|
|
@ -66,7 +66,6 @@ set( PCH_SOURCES
|
|||
src/gameexec.cpp
|
||||
src/gamevars.cpp
|
||||
src/global.cpp
|
||||
src/menus.cpp
|
||||
src/namesdyn.cpp
|
||||
src/network.cpp
|
||||
src/osdcmds.cpp
|
||||
|
|
|
@ -1,225 +0,0 @@
|
|||
//-------------------------------------------------------------------------
|
||||
/*
|
||||
Copyright (C) 2016 EDuke32 developers and contributors
|
||||
|
||||
This file is part of EDuke32.
|
||||
|
||||
EDuke32 is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License version 2
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
#include "ns.h" // Must come before everything else!
|
||||
|
||||
#include "cheats.h"
|
||||
#include "compat.h"
|
||||
#include "demo.h"
|
||||
#include "duke3d.h"
|
||||
|
||||
#include "menus.h"
|
||||
#include "osdcmds.h"
|
||||
#include "savegame.h"
|
||||
#include "superfasthash.h"
|
||||
#include "gamecvars.h"
|
||||
#include "gamecontrol.h"
|
||||
#include "c_bind.h"
|
||||
#include "../../glbackend/glbackend.h"
|
||||
|
||||
bool ShowOptionMenu();
|
||||
|
||||
namespace ImGui
|
||||
{
|
||||
void ShowDemoWindow(bool*);
|
||||
}
|
||||
|
||||
BEGIN_DUKE_NS
|
||||
|
||||
#if 0
|
||||
|
||||
void Menu_Init(void)
|
||||
{
|
||||
int32_t i, j, k;
|
||||
|
||||
if (FURY)
|
||||
// prepare shareware
|
||||
if (VOLUMEONE)
|
||||
{
|
||||
// blue out episodes beyond the first
|
||||
for (i = 1; i < g_volumeCnt; ++i)
|
||||
{
|
||||
if (MEL_EPISODE[i])
|
||||
{
|
||||
ME_EPISODE[i].entry = &MEO_EPISODE_SHAREWARE;
|
||||
ME_EPISODE[i].flags |= MEF_LookDisabled;
|
||||
}
|
||||
}
|
||||
M_EPISODE.numEntries = g_volumeCnt; // remove User Map (and spacer)
|
||||
MEOS_NETOPTIONS_EPISODE.numOptions = 1;
|
||||
MenuEntry_DisableOnCondition(&ME_NETOPTIONS_EPISODE, 1);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void Menu_PreDraw(MenuID_t cm, MenuEntry_t *entry, const vec2_t origin)
|
||||
{
|
||||
int32_t i, j, l = 0;
|
||||
|
||||
switch (cm)
|
||||
{
|
||||
|
||||
case MENU_CREDITS4: // JBF 20031220
|
||||
{
|
||||
#define MENU_YOFFSET 40
|
||||
#define MENU_INCREMENT(x) (oy += ((x) << 16)) // maybe this should have been MENU_EXCREMENT instead
|
||||
|
||||
int32_t oy = origin.y;
|
||||
|
||||
mgametextcenter(origin.x, MENU_INCREMENT(MENU_YOFFSET), "Developers");
|
||||
creditsminitext(origin.x + (160 << 16), MENU_INCREMENT(11), "Richard \"TerminX\" Gobeille", 8);
|
||||
creditsminitext(origin.x + (160 << 16), MENU_INCREMENT(7), "Evan \"Hendricks266\" Ramos", 8);
|
||||
creditsminitext(origin.x + (160 << 16), MENU_INCREMENT(7), "Alex \"pogokeen\" Dawson", 8);
|
||||
|
||||
mgametextcenter(origin.x, MENU_INCREMENT(11), "Retired developers");
|
||||
creditsminitext(origin.x + (160 << 16), MENU_INCREMENT(11), "Pierre-Loup \"Plagman\" Griffais", 8);
|
||||
creditsminitext(origin.x + (160 << 16), MENU_INCREMENT(7), "Philipp \"Helixhorned\" Kutin", 8);
|
||||
|
||||
mgametextcenter(origin.x, MENU_INCREMENT(11), "Special thanks to");
|
||||
creditsminitext(origin.x + (160 << 16), MENU_INCREMENT(11), "Jonathon \"JonoF\" Fowler", 8);
|
||||
|
||||
mgametextcenter(origin.x, MENU_INCREMENT(11), "Uses BUILD Engine technology by");
|
||||
creditsminitext(origin.x + (160 << 16), MENU_INCREMENT(11), "Ken \"Awesoken\" Silverman", 8);
|
||||
|
||||
#undef MENU_INCREMENT
|
||||
#undef MENU_YOFFSET
|
||||
}
|
||||
break;
|
||||
|
||||
case MENU_CREDITS5:
|
||||
l = 7;
|
||||
|
||||
mgametextcenter(origin.x, origin.y + ((38-l)<<16), "License and Other Contributors");
|
||||
{
|
||||
static const char *header[] =
|
||||
{
|
||||
"This program is distributed under the terms of the",
|
||||
"GNU General Public License version 2 as published by the",
|
||||
"Free Software Foundation. See gpl-2.0.txt for details.",
|
||||
"BUILD engine technology available under license. See buildlic.txt.",
|
||||
nullptr,
|
||||
"The EDuke32 team thanks the following people for their contributions:",
|
||||
nullptr,
|
||||
};
|
||||
static const char *body[] =
|
||||
{
|
||||
"Alexey Skrybykin", // Nuke.YKT - Polymost fixes
|
||||
"Bioman", // GTK work, APT repository and package upkeep
|
||||
"Brandon Bergren", // "Bdragon" - tiles.cfg
|
||||
"Charlie Honig", // "CONAN" - showview command
|
||||
"Dan Gaskill", // "DeeperThought" - testing
|
||||
"David Koenig", // "Bargle" - Merged a couple of things from duke3d_w32
|
||||
"Ed Coolidge", // Mapster32 improvements
|
||||
"Emile Belanger", // original Android work
|
||||
"Fox", // various patches
|
||||
"Hunter_rus", // tons of stuff
|
||||
"James Bentler", // Mapster32 improvements
|
||||
"Jasper Foreman", // netcode contributions
|
||||
"Javier Martinez", // "Malone3D" - EDuke 2.1.1 components
|
||||
"Jeff Hart", // website graphics
|
||||
"Jonathan Strander", // "Mblackwell" - testing and feature speccing
|
||||
"Jordon Moss", // "Striker" - various patches, OldMP work
|
||||
"Jose del Castillo", // "Renegado" - EDuke 2.1.1 components
|
||||
"Lachlan McDonald", // official EDuke32 icon
|
||||
"LSDNinja", // OS X help and testing
|
||||
"Marcus Herbert", // "rhoenie" - OS X compatibility work
|
||||
"Matthew Palmer", // "Usurper" - testing and eduke32.com domain
|
||||
"Matt Saettler", // original DOS EDuke/WW2GI enhancements
|
||||
"NY00123", // Linux / SDL usability patches
|
||||
"Ozkan Sezer", // SDL/GTK version checking improvements
|
||||
"Peter Green", // "Plugwash" - dynamic remapping, custom gametypes
|
||||
"Peter Veenstra", // "Qbix" - port to 64-bit
|
||||
"Robin Green", // CON array support
|
||||
"Ryan Gordon", // "icculus" - icculus.org Duke3D port sound code
|
||||
"Stephen Anthony", // early 64-bit porting work
|
||||
"tueidj", // Wii port
|
||||
};
|
||||
EDUKE32_STATIC_ASSERT(ARRAY_SIZE(body) % 3 == 0);
|
||||
static const char *footer[] =
|
||||
{
|
||||
nullptr,
|
||||
"Visit eduke32.com for news and updates",
|
||||
};
|
||||
|
||||
static constexpr int header_numlines = ARRAY_SIZE(header);
|
||||
static constexpr int body_numlines = ARRAY_SIZE(body);
|
||||
static constexpr int footer_numlines = ARRAY_SIZE(footer);
|
||||
|
||||
static constexpr int CCOLUMNS = 3;
|
||||
static constexpr int CCOLXBUF = 20;
|
||||
|
||||
int c;
|
||||
i = 0;
|
||||
for (c = 0; c < header_numlines; c++)
|
||||
if (header[c])
|
||||
creditsminitext(origin.x + (160<<16), origin.y + ((17+10+10+8+4+(c*7)-l)<<16), header[c], 8);
|
||||
i += c;
|
||||
for (c = 0; c < body_numlines; c++)
|
||||
if (body[c])
|
||||
creditsminitext(origin.x + ((CCOLXBUF+((320-CCOLXBUF*2)/(CCOLUMNS*2)) +((320-CCOLXBUF*2)/CCOLUMNS)*(c/(body_numlines/CCOLUMNS)))<<16), origin.y + ((17+10+10+8+4+((c%(body_numlines/CCOLUMNS))*7)+(i*7)-l)<<16), body[c], 8);
|
||||
i += c/CCOLUMNS;
|
||||
for (c = 0; c < footer_numlines; c++)
|
||||
if (footer[c])
|
||||
creditsminitext(origin.x + (160<<16), origin.y + ((17+10+10+8+4+(c*7)+(i*7)-l)<<16), footer[c], 8);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Functions where a "newValue" or similar is passed are run *before* the linked variable is actually changed.
|
||||
That way you can compare the new and old values and potentially block the change.
|
||||
*/
|
||||
static void Menu_EntryLinkActivate(MenuEntry_t *entry)
|
||||
{
|
||||
else if (entry == &ME_NETHOST_LAUNCH)
|
||||
{
|
||||
// master does whatever it wants
|
||||
if (g_netServer)
|
||||
{
|
||||
Net_FillNewGame(&pendingnewgame, 1);
|
||||
Net_StartNewGame();
|
||||
Net_SendNewGame(1, NULL);
|
||||
}
|
||||
else if (voting == -1)
|
||||
{
|
||||
Net_SendMapVoteInitiate();
|
||||
Menu_Change(MENU_NETWAITVOTES);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
END_DUKE_NS
|
|
@ -57,91 +57,6 @@ inline int G_CheckPlayerColor(int color)
|
|||
}
|
||||
|
||||
|
||||
#if 0
|
||||
|
||||
enum MenuIndex_t {
|
||||
MENU_NULL = INT32_MIN, // sentinel for "do nothing"
|
||||
MENU_CLOSE = -2, // sentinel for "close the menu"/"no menu"
|
||||
MENU_PREVIOUS = -1, // sentinel for "go to previous menu"
|
||||
MENU_MAIN = 0, // done
|
||||
MENU_MAIN_INGAME = 50, // done
|
||||
MENU_EPISODE = 100, // done
|
||||
MENU_USERMAP = 101,
|
||||
MENU_NEWGAMECUSTOM = 102, // done
|
||||
MENU_NEWGAMECUSTOMSUB = 103,// done
|
||||
MENU_SKILL = 110, // done
|
||||
MENU_OPTIONS = 202,
|
||||
MENU_GAMESETUP = 200,
|
||||
MENU_CHEATS = 800, // IF script hacked
|
||||
MENU_CHEATENTRY = 801, // IF script hacked
|
||||
MENU_CHEAT_WARP = 802,
|
||||
MENU_CHEAT_SKILL = 803,
|
||||
MENU_DISPLAYSETUP = 234,
|
||||
MENU_SCREENSETUP = 233, // HUD
|
||||
MENU_COLCORR = 231, // color correction
|
||||
MENU_COLCORR_INGAME = 232, // almost the same for ingame - not needed
|
||||
MENU_VIDEOSETUP = 203,
|
||||
MENU_POLYMOST = 230,
|
||||
MENU_POLYMER = 240, // Who needs a renderer that's folding performance-wise with a single light?
|
||||
MENU_SOUND = 700,
|
||||
MENU_SOUND_INGAME = 701, // Just the same with different exit logic.
|
||||
MENU_ADVSOUND = 702, // Only needed for space reasons. Fold into main sound menu.
|
||||
MENU_PLAYER = 20002,
|
||||
MENU_MACROS = 20004,
|
||||
MENU_CONTROLS = 220,
|
||||
MENU_KEYBOARDSETUP = 204,
|
||||
MENU_KEYBOARDKEYS = 209,
|
||||
MENU_MOUSESETUP = 205,
|
||||
MENU_MOUSEBTNS = 210, // folded with keyboard
|
||||
MENU_MOUSEADVANCED = 212,
|
||||
MENU_JOYSTICKSETUP = 206,
|
||||
MENU_JOYSTICKBTNS = 207,
|
||||
MENU_JOYSTICKAXES = 208,
|
||||
MENU_JOYSTICKAXIS = 213,
|
||||
MENU_LOAD = 300,
|
||||
MENU_SAVE = 350,
|
||||
MENU_STORY = 400,
|
||||
MENU_F1HELP = 401,
|
||||
MENU_CREDITS = 990,
|
||||
MENU_CREDITS2 = 991,
|
||||
MENU_CREDITS3 = 992,
|
||||
MENU_CREDITS4 = 993,
|
||||
MENU_CREDITS5 = 994,
|
||||
MENU_QUIT = 500,
|
||||
MENU_QUITTOTITLE = 501,
|
||||
MENU_QUIT_INGAME = 502,
|
||||
|
||||
MENU_SAVESETUP = 750,
|
||||
|
||||
MENU_SAVECLEANVERIFY = 751,
|
||||
MENU_LOADVERIFY = 1000,
|
||||
MENU_LOADDELVERIFY = 1100,
|
||||
MENU_NEWVERIFY = 1500,
|
||||
MENU_SAVEVERIFY = 2000,
|
||||
MENU_SAVEDELVERIFY = 2100,
|
||||
MENU_COLCORRRESETVERIFY = 2200,
|
||||
MENU_KEYSRESETVERIFY = 2201,
|
||||
MENU_KEYSCLASSICVERIFY = 2202,
|
||||
MENU_JOYSTANDARDVERIFY = 2203,
|
||||
MENU_JOYPROVERIFY = 2204,
|
||||
MENU_JOYCLEARVERIFY = 2205,
|
||||
MENU_ADULTPASSWORD = 10001,
|
||||
MENU_RESETPLAYER = 15000,
|
||||
MENU_BUYDUKE = 20000,
|
||||
|
||||
MENU_NETSETUP = 600,
|
||||
MENU_NETWAITMASTER = 601,
|
||||
MENU_NETWAITVOTES = 603,
|
||||
MENU_NETWORK = 20001,
|
||||
MENU_NETHOST = 20010,
|
||||
MENU_NETOPTIONS = 20011,
|
||||
MENU_NETUSERMAP = 20012,
|
||||
MENU_NETJOIN = 20020,
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
END_DUKE_NS
|
||||
|
||||
#endif
|
||||
|
|
|
@ -62,7 +62,6 @@ set( PCH_SOURCES
|
|||
src/gamedef.cpp
|
||||
src/gameexec.cpp
|
||||
src/global.cpp
|
||||
src/menus.cpp
|
||||
src/namesdyn.cpp
|
||||
src/net.cpp
|
||||
src/osdcmds.cpp
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
//-------------------------------------------------------------------------
|
||||
/*
|
||||
Copyright (C) 2016 EDuke32 developers and contributors
|
||||
|
||||
This file is part of EDuke32.
|
||||
|
||||
EDuke32 is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License version 2
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
//-------------------------------------------------------------------------
|
||||
#include "ns.h" // Must come before everything else!
|
||||
|
||||
#include "compat.h"
|
||||
#include "duke3d.h"
|
||||
#include "osdcmds.h"
|
||||
#include "savegame.h"
|
||||
#include "demo.h"
|
||||
|
||||
#include "menus.h"
|
||||
#include "cheats.h"
|
||||
#include "gamecvars.h"
|
||||
#include "menu/menu.h"
|
||||
#include "version.h"
|
||||
#include "../../glbackend/glbackend.h"
|
||||
|
||||
BEGIN_RR_NS
|
||||
|
||||
#if 0
|
||||
|
||||
|
||||
case MENU_CREDITS31:
|
||||
l = 7;
|
||||
|
||||
mgametextcenter(origin.x, origin.y + ((55-l)<<16), "Developer");
|
||||
creditsminitext(origin.x + (160<<16), origin.y + ((60+10-l)<<16), "Alexey \"Nuke.YKT\" Skrybykin", 8);
|
||||
|
||||
mgametextcenter(origin.x, origin.y + ((85-l)<<16), "Tester & support");
|
||||
creditsminitext(origin.x + (160<<16), origin.y + ((90+10-l)<<16), "Sergey \"Maxi Clouds\" Skrybykin", 8);
|
||||
|
||||
mgametextcenter(origin.x, origin.y + ((115-l)<<16), "Special thanks to");
|
||||
creditsminitext(origin.x + (160<<16), origin.y + ((120+10-l)<<16), "Evan \"Hendricks266\" Ramos", 8);
|
||||
creditsminitext(origin.x + (160<<16), origin.y + ((120+20-l)<<16), "Richard \"TerminX\" Gobeille", 8);
|
||||
creditsminitext(origin.x + (160<<16), origin.y + ((120+30-l)<<16), "\"NY00123\"", 8);
|
||||
creditsminitext(origin.x + (160<<16), origin.y + ((120+40-l)<<16), "\"MetHy\"", 8);
|
||||
|
||||
break;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
END_RR_NS
|
|
@ -56,468 +56,6 @@ inline int G_CheckPlayerColor(int color)
|
|||
}
|
||||
|
||||
|
||||
#if 0
|
||||
|
||||
|
||||
enum MenuIndex_t {
|
||||
MENU_NULL = INT32_MIN, // sentinel for "do nothing"
|
||||
MENU_CLOSE = -2, // sentinel for "close the menu"/"no menu"
|
||||
MENU_PREVIOUS = -1, // sentinel for "go to previous menu"
|
||||
MENU_MAIN = 0,
|
||||
MENU_MAIN_INGAME = 50,
|
||||
MENU_EPISODE = 100,
|
||||
MENU_USERMAP = 101,
|
||||
MENU_SKILL = 110,
|
||||
MENU_GAMESETUP = 200,
|
||||
MENU_OPTIONS = 202,
|
||||
MENU_VIDEOSETUP = 203,
|
||||
MENU_KEYBOARDSETUP = 204,
|
||||
MENU_MOUSESETUP = 205,
|
||||
MENU_JOYSTICKSETUP = 206,
|
||||
MENU_JOYSTICKBTNS = 207,
|
||||
MENU_JOYSTICKAXES = 208,
|
||||
MENU_KEYBOARDKEYS = 209,
|
||||
MENU_MOUSEBTNS = 210,
|
||||
MENU_MOUSEADVANCED = 212,
|
||||
MENU_JOYSTICKAXIS = 213,
|
||||
MENU_TOUCHSETUP = 214,
|
||||
MENU_TOUCHSENS = 215,
|
||||
MENU_TOUCHBUTTONS = 216,
|
||||
MENU_CONTROLS = 220,
|
||||
MENU_POLYMOST = 230,
|
||||
MENU_COLCORR = 231,
|
||||
MENU_COLCORR_INGAME = 232,
|
||||
MENU_SCREENSETUP = 233,
|
||||
MENU_DISPLAYSETUP = 234,
|
||||
MENU_POLYMER = 240,
|
||||
MENU_LOAD = 300,
|
||||
MENU_SAVE = 350,
|
||||
MENU_STORY = 400,
|
||||
MENU_F1HELP = 401,
|
||||
MENU_F1HELP2 = 402,
|
||||
MENU_QUIT = 500,
|
||||
MENU_QUITTOTITLE = 501,
|
||||
MENU_QUIT_INGAME = 502,
|
||||
MENU_NETSETUP = 600,
|
||||
MENU_NETWAITMASTER = 601,
|
||||
MENU_NETWAITVOTES = 603,
|
||||
MENU_SOUND = 700,
|
||||
MENU_SOUND_INGAME = 701,
|
||||
MENU_ADVSOUND = 702,
|
||||
MENU_CDPLAYER = 703,
|
||||
MENU_SAVESETUP = 750,
|
||||
MENU_SAVECLEANVERIFY = 751,
|
||||
MENU_CHEATS = 800,
|
||||
MENU_CHEATENTRY = 801,
|
||||
MENU_CHEAT_WARP = 802,
|
||||
MENU_CHEAT_SKILL = 803,
|
||||
MENU_CREDITS = 960,
|
||||
MENU_CREDITS2 = 961,
|
||||
MENU_CREDITS3 = 962,
|
||||
MENU_CREDITS4 = 963,
|
||||
MENU_CREDITS5 = 964,
|
||||
MENU_CREDITS6 = 965,
|
||||
MENU_CREDITS7 = 966,
|
||||
MENU_CREDITS8 = 967,
|
||||
MENU_CREDITS9 = 968,
|
||||
MENU_CREDITS10 = 969,
|
||||
MENU_CREDITS11 = 970,
|
||||
MENU_CREDITS12 = 971,
|
||||
MENU_CREDITS13 = 972,
|
||||
MENU_CREDITS14 = 973,
|
||||
MENU_CREDITS15 = 974,
|
||||
MENU_CREDITS16 = 975,
|
||||
MENU_CREDITS17 = 976,
|
||||
MENU_CREDITS18 = 977,
|
||||
MENU_CREDITS19 = 978,
|
||||
MENU_CREDITS20 = 979,
|
||||
MENU_CREDITS21 = 980,
|
||||
MENU_CREDITS22 = 981,
|
||||
MENU_CREDITS23 = 982,
|
||||
MENU_CREDITS24 = 983,
|
||||
MENU_CREDITS25 = 984,
|
||||
MENU_CREDITS26 = 985,
|
||||
MENU_CREDITS27 = 986,
|
||||
MENU_CREDITS28 = 987,
|
||||
MENU_CREDITS29 = 988,
|
||||
MENU_CREDITS30 = 989,
|
||||
MENU_CREDITS31 = 990,
|
||||
MENU_CREDITS32 = 991,
|
||||
MENU_CREDITS33 = 992,
|
||||
MENU_LOADVERIFY = 1000,
|
||||
MENU_LOADDELVERIFY = 1100,
|
||||
MENU_NEWVERIFY = 1500,
|
||||
MENU_SAVEVERIFY = 2000,
|
||||
MENU_SAVEDELVERIFY = 2100,
|
||||
MENU_ADULTPASSWORD = 10001,
|
||||
MENU_RESETPLAYER = 15000,
|
||||
MENU_BUYDUKE = 20000,
|
||||
MENU_NETWORK = 20001,
|
||||
MENU_PLAYER = 20002,
|
||||
MENU_MACROS = 20004,
|
||||
MENU_NETHOST = 20010,
|
||||
MENU_NETOPTIONS = 20011,
|
||||
MENU_NETUSERMAP = 20012,
|
||||
MENU_NETJOIN = 20020,
|
||||
};
|
||||
|
||||
|
||||
|
||||
typedef int32_t MenuID_t;
|
||||
|
||||
|
||||
typedef enum MenuAnimationType_t
|
||||
{ // Note: This enum is for logical categories, not visual types.
|
||||
MA_None,
|
||||
MA_Return,
|
||||
MA_Advance,
|
||||
} MenuAnimationType_t;
|
||||
|
||||
|
||||
typedef enum MenuEntryType_t
|
||||
{
|
||||
Dummy,
|
||||
Link,
|
||||
Option,
|
||||
Custom2Col,
|
||||
RangeInt32,
|
||||
RangeFloat,
|
||||
#ifdef MENU_ENABLE_RANGEDOUBLE
|
||||
RangeDouble,
|
||||
#endif
|
||||
String,
|
||||
Spacer,
|
||||
} MenuEntryType_t;
|
||||
|
||||
typedef struct MenuEntryFormat_t
|
||||
{
|
||||
int32_t marginBottom;
|
||||
int32_t indent;
|
||||
int32_t width; // 0: center, >0: width of the label column (left-aligned options), <0: -width of everything (right-aligned)
|
||||
} MenuEntryFormat_t;
|
||||
|
||||
|
||||
typedef struct MenuMenuFormat_t
|
||||
{
|
||||
vec2_t pos;
|
||||
int32_t bottomcutoff; // >0: the bottom edge of the menu before automatic scrolling kicks in, <0: -total height for vertical justification
|
||||
} MenuMenuFormat_t;
|
||||
|
||||
typedef struct MenuLink_t
|
||||
{
|
||||
// traits
|
||||
MenuID_t linkID;
|
||||
MenuAnimationType_t animation;
|
||||
} MenuLink_t;
|
||||
typedef struct MenuOptionSet_t
|
||||
{
|
||||
// traits
|
||||
char const **optionNames;
|
||||
int32_t *optionValues; // If NULL, the identity of currentOption is assumed.
|
||||
|
||||
// pop-up list appearance
|
||||
MenuMenuFormat_t *menuFormat;
|
||||
MenuEntryFormat_t *entryFormat;
|
||||
MenuFont_t *font;
|
||||
|
||||
// traits
|
||||
int32_t numOptions;
|
||||
|
||||
// pop-up list state
|
||||
int32_t currentEntry;
|
||||
int32_t scrollPos;
|
||||
|
||||
// appearance
|
||||
uint8_t features; // bit 1 = disable left/right arrows, bit 2 = disable list
|
||||
|
||||
int32_t getMarginBottom() const { return mulscale16(entryFormat->marginBottom, font->zoom); }
|
||||
int32_t getIndent() const { return mulscale16(entryFormat->indent, font->zoom); }
|
||||
} MenuOptionSet_t;
|
||||
typedef struct MenuOption_t
|
||||
{
|
||||
// appearance
|
||||
MenuFont_t *font;
|
||||
|
||||
// traits
|
||||
MenuOptionSet_t *options; // so that common sets such as Yes/No, On/Off can be reused
|
||||
|
||||
// effect
|
||||
FBaseCVar *cVar;
|
||||
|
||||
// state
|
||||
int32_t currentOption;
|
||||
} MenuOption_t;
|
||||
typedef struct MenuCustom2Col_t
|
||||
{
|
||||
// effect
|
||||
uint8_t *column[2];
|
||||
char const **key;
|
||||
|
||||
// appearance
|
||||
MenuFont_t *font;
|
||||
|
||||
// effect
|
||||
size_t numvalid;
|
||||
|
||||
// appearance
|
||||
int32_t columnWidth;
|
||||
|
||||
// state
|
||||
int8_t screenOpen;
|
||||
} MenuCustom2Col_t;
|
||||
|
||||
enum MenuRangeFlags_t
|
||||
{
|
||||
DisplayTypeInteger = 1,
|
||||
DisplayTypePercent = 2,
|
||||
DisplayTypeNormalizedDecimal = 3,
|
||||
DisplayTypeMask = (1<<0)|(1<<1),
|
||||
|
||||
EnforceIntervals = 1<<7,
|
||||
};
|
||||
typedef struct MenuRangeInt32_t
|
||||
{
|
||||
// effect
|
||||
FIntCVar *cVar;
|
||||
|
||||
// appearance
|
||||
MenuFont_t *font;
|
||||
|
||||
// traits
|
||||
int32_t min;
|
||||
int32_t max;
|
||||
int32_t onehundredpercent; // 0 implies max
|
||||
int32_t steps;
|
||||
|
||||
uint8_t flags;
|
||||
} MenuRangeInt32_t;
|
||||
typedef struct MenuRangeFloat_t
|
||||
{
|
||||
// effect
|
||||
FFloatCVar *cVar;
|
||||
|
||||
// appearance
|
||||
MenuFont_t *font;
|
||||
|
||||
// traits
|
||||
float min;
|
||||
float max;
|
||||
float onehundredpercent; // 0 implies 1.0
|
||||
int32_t steps;
|
||||
|
||||
uint8_t flags;
|
||||
} MenuRangeFloat_t;
|
||||
#ifdef MENU_ENABLE_RANGEDOUBLE
|
||||
typedef struct MenuRangeDouble_t
|
||||
{
|
||||
// effect
|
||||
double *variable;
|
||||
|
||||
// appearance
|
||||
MenuFont_t *font;
|
||||
|
||||
// traits
|
||||
double min;
|
||||
double max;
|
||||
double onehundredpercent; // 0 implies 1.0
|
||||
int32_t steps;
|
||||
|
||||
uint8_t flags;
|
||||
} MenuRangeDouble_t;
|
||||
#endif
|
||||
typedef struct MenuString_t
|
||||
{
|
||||
// state
|
||||
char* editfield;
|
||||
|
||||
// effect
|
||||
char* variable;
|
||||
|
||||
// appearance
|
||||
MenuFont_t *font;
|
||||
|
||||
// effect
|
||||
int32_t bufsize;
|
||||
int32_t flags;
|
||||
} MenuString_t;
|
||||
typedef struct MenuSpacer_t
|
||||
{
|
||||
int32_t height;
|
||||
} MenuSpacer_t;
|
||||
|
||||
// For internal use only.
|
||||
enum MenuEntryFlags_t
|
||||
{
|
||||
MEF_Disabled = 1<<0,
|
||||
MEF_LookDisabled = 1<<1,
|
||||
MEF_Hidden = 1<<2,
|
||||
};
|
||||
|
||||
typedef struct MenuEntry_t
|
||||
{
|
||||
// traits
|
||||
const char *name;
|
||||
|
||||
// appearance
|
||||
MenuFont_t *font;
|
||||
MenuEntryFormat_t *format;
|
||||
|
||||
void *entry;
|
||||
MenuEntryType_t type;
|
||||
|
||||
// state
|
||||
int32_t flags;
|
||||
int32_t ytop, ybottom;
|
||||
|
||||
int32_t getMarginBottom() const { return mulscale16(format->marginBottom, font->zoom); }
|
||||
int32_t getIndent() const { return mulscale16(format->indent, font->zoom); }
|
||||
int32_t getHeight() const
|
||||
{
|
||||
return type == Spacer ? mulscale16(((MenuSpacer_t *)entry)->height, font->zoom) : font->get_yline();
|
||||
}
|
||||
} MenuEntry_t;
|
||||
|
||||
|
||||
typedef enum MenuType_t
|
||||
{
|
||||
Menu,
|
||||
Panel,
|
||||
Verify,
|
||||
Message,
|
||||
TextForm,
|
||||
FileSelect,
|
||||
CdPlayer,
|
||||
} MenuType_t;
|
||||
|
||||
typedef struct MenuMenu_t
|
||||
{
|
||||
const char *title;
|
||||
|
||||
MenuMenuFormat_t *format;
|
||||
|
||||
MenuEntry_t **entrylist;
|
||||
int32_t numEntries;
|
||||
|
||||
// state
|
||||
int32_t currentEntry, currentColumn;
|
||||
int32_t scrollPos;
|
||||
} MenuMenu_t;
|
||||
typedef struct MenuPanel_t
|
||||
{
|
||||
const char *title;
|
||||
|
||||
MenuID_t previousID;
|
||||
MenuAnimationType_t previousAnimation;
|
||||
MenuID_t nextID;
|
||||
MenuAnimationType_t nextAnimation;
|
||||
} MenuPanel_t;
|
||||
typedef struct MenuVerify_t
|
||||
{
|
||||
vec2_t cursorpos;
|
||||
|
||||
MenuID_t linkID;
|
||||
MenuAnimationType_t animation;
|
||||
} MenuVerify_t;
|
||||
typedef struct MenuMessage_t
|
||||
{
|
||||
vec2_t cursorpos;
|
||||
|
||||
MenuID_t linkID;
|
||||
MenuAnimationType_t animation;
|
||||
} MenuMessage_t;
|
||||
enum MenuTextFormFlags_t
|
||||
{
|
||||
MTF_Password = 1<<0,
|
||||
};
|
||||
typedef struct MenuTextForm_t
|
||||
{
|
||||
// state
|
||||
char *input;
|
||||
|
||||
// traits
|
||||
const char *instructions;
|
||||
int32_t bufsize;
|
||||
uint8_t flags;
|
||||
} MenuTextForm_t;
|
||||
typedef struct MenuFileSelect_t
|
||||
{
|
||||
const char *title;
|
||||
|
||||
// appearance
|
||||
MenuMenuFormat_t *format[2];
|
||||
MenuFont_t *font[2];
|
||||
|
||||
// traits
|
||||
const char *pattern;
|
||||
char *destination;
|
||||
|
||||
// state
|
||||
//CACHE1D_FIND_REC *findhigh[2];
|
||||
int32_t scrollPos[2];
|
||||
|
||||
// appearance
|
||||
int32_t marginBottom[2];
|
||||
|
||||
// state
|
||||
//fnlist_t fnlist;
|
||||
int32_t currentList;
|
||||
|
||||
int32_t getMarginBottom(size_t index) const { return mulscale16(marginBottom[index], font[index]->zoom); }
|
||||
} MenuFileSelect_t;
|
||||
|
||||
typedef struct Menu_t
|
||||
{
|
||||
void *object;
|
||||
MenuID_t menuID;
|
||||
MenuID_t parentID;
|
||||
MenuAnimationType_t parentAnimation;
|
||||
MenuType_t type;
|
||||
} Menu_t;
|
||||
|
||||
typedef struct MenuAnimation_t
|
||||
{
|
||||
int32_t(*out)(struct MenuAnimation_t *);
|
||||
int32_t(*in)(struct MenuAnimation_t *);
|
||||
|
||||
Menu_t *previous;
|
||||
Menu_t *current;
|
||||
|
||||
int32_t start;
|
||||
int32_t length;
|
||||
} MenuAnimation_t;
|
||||
|
||||
extern MenuAnimation_t m_animation;
|
||||
|
||||
extern MenuID_t g_currentMenu;
|
||||
extern Menu_t *m_currentMenu;
|
||||
|
||||
extern int32_t g_quitDeadline;
|
||||
extern int32_t voting;
|
||||
int Menu_Change(MenuID_t cm);
|
||||
void Menu_AnimateChange(int32_t cm, MenuAnimationType_t animtype);
|
||||
int32_t Menu_IsTextInput(Menu_t *cm);
|
||||
void Menu_Init(void);
|
||||
void Menu_Open(uint8_t playerID);
|
||||
void Menu_Close(uint8_t playerID);
|
||||
void M_DisplayMenus(void);
|
||||
|
||||
extern MenuFont_t MF_Redfont, MF_Bluefont, MF_Minifont;
|
||||
|
||||
#define M_MOUSETIMEOUT 210
|
||||
extern int32_t m_mouselastactivity;
|
||||
|
||||
extern int32_t m_mousewake_watchpoint, m_menuchange_watchpoint;
|
||||
// alpha increments of 3 --> 255 / 3 = 85 --> round up to power of 2 --> 128 --> divide by 2 --> 64 alphatabs required
|
||||
// use 16 anyway :P
|
||||
# define MOUSEUSEALPHA (videoGetRenderMode() != REND_CLASSIC || numalphatabs >= 15)
|
||||
# define MOUSEALPHA (MOUSEUSEALPHA ? clamp(((int32_t) totalclock - m_mouselastactivity - 90)*3, 0, 255) : 0)
|
||||
# define CURSORALPHA (MOUSEUSEALPHA ? clamp(((int32_t) totalclock - m_mouselastactivity - 90)*2 + (255/3), (255/3), 255) : 255/3)
|
||||
# define MOUSEACTIVECONDITION ((int32_t) totalclock - m_mouselastactivity < M_MOUSETIMEOUT)
|
||||
# define MOUSEACTIVECONDITIONAL(condition) (MOUSEACTIVECONDITION && (condition))
|
||||
# define MOUSEINACTIVECONDITIONAL(condition) (!MOUSEACTIVECONDITION && (condition))
|
||||
# define MOUSEWATCHPOINTCONDITIONAL(condition) ((condition) || m_mousewake_watchpoint || m_menuchange_watchpoint == 3)
|
||||
|
||||
#endif
|
||||
|
||||
END_RR_NS
|
||||
|
||||
|
|
|
@ -656,9 +656,10 @@ OptionMenu "OptionsMenu"
|
|||
Submenu "$OPTMNU_GAMEPLAY", "GameplayOptions"
|
||||
Submenu "$OPTMNU_MISCELLANEOUS", "MiscOptions"
|
||||
StaticText " "
|
||||
Submenu "$MNU_ENGINECREDITS", "EngineCredits"
|
||||
SafeCommand "$OPTMNU_DEFAULTS", "reset2defaults"
|
||||
SafeCommand "$OPTMNU_RESETTOSAVED", "reset2saved"
|
||||
Command "$OPTMNU_CONSOLE", "menuconsole"
|
||||
//Command "$OPTMNU_CONSOLE", "menuconsole"
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------------------
|
||||
|
@ -1726,3 +1727,46 @@ OptionMenu "MultiOptionsMenu"
|
|||
Option "$NETMNU_FFIRE", "m_ffire", "OnOff"
|
||||
SafeCommand "$NETMNU_ACCEPT", "MultiAccept"
|
||||
}
|
||||
|
||||
OptionMenu "EngineCredits"
|
||||
{
|
||||
title "$MNU_CREDITS"
|
||||
Submenu " ---->", "EngineCredits2"
|
||||
StaticText "Developer"
|
||||
StaticText "Christoph Oelckers", 0
|
||||
StaticText " "
|
||||
StaticText "Special thanks to"
|
||||
StaticText "Rachael Alexanderson", 0
|
||||
StaticText "Magnus Norddahl", 0
|
||||
StaticText "Nigel Rowand", 0
|
||||
StaticText "Martin Howe", 0
|
||||
StaticText "Nash Muhandes", 0
|
||||
StaticText " "
|
||||
|
||||
}
|
||||
|
||||
OptionMenu "EngineCredits2"
|
||||
{
|
||||
title "$MNU_CREDITS"
|
||||
Submenu " <----", "EngineCredits"
|
||||
StaticText "EDuke32 / VoidSW"
|
||||
StaticText "Richard \"TerminX\" Gobeille", 0
|
||||
StaticText "Evan \"Hendricks266\" Ramos", 0
|
||||
StaticText "Alex \"pogokeen\" Dawson", 0
|
||||
StaticText ""
|
||||
StaticText "Retired developers"
|
||||
StaticText "Pierre-Loup \"Plagman\" Griffais", 0
|
||||
StaticText "Philipp \"Helixhorned\" Kutin", 0
|
||||
StaticText ""
|
||||
StaticText "RedNukem / NBlood"
|
||||
StaticText "Alexey \"Nuke.YKT\" Skrybykin", 0
|
||||
StaticText ""
|
||||
StaticText "PCExhumed"
|
||||
StaticText "Alexey \"Nuke.YKT\" Skrybykin", 0
|
||||
StaticText "sirlemonhead", 0
|
||||
StaticText ""
|
||||
StaticText "Special thanks to"
|
||||
StaticText "Jonathon \"JonoF\" Fowler", 0
|
||||
}
|
||||
|
||||
|
Loading…
Reference in a new issue