From f2fc3fc2cb15dc78a2d980e6e6e91ce2f7dd0c62 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 23 Nov 2019 12:38:38 +0100 Subject: [PATCH] - WIP commit. --- source/build/include/baselayer.h | 11 ++ source/common/fonts/v_font.cpp | 2 +- source/common/gamecontrol.cpp | 2 + source/common/menu/listmenu.cpp | 59 +++++++++- source/common/menu/menu.h | 107 ++++++++---------- source/common/menu/menudef.cpp | 88 ++++++++++++-- source/common/utility/stringtable.cpp | 4 +- source/duke3d/src/duke3d.h | 6 + source/duke3d/src/menus.cpp | 16 --- source/rr/src/menus.cpp | 30 ----- wadsrc/static/demolition/language.csv | 13 +++ wadsrc/static/demolition/menudef.txt | 68 ++++++----- wadsrc/static/{ => demolition}/textcolors.txt | 0 wadsrc/static/language.txt | 0 14 files changed, 248 insertions(+), 158 deletions(-) create mode 100644 wadsrc/static/demolition/language.csv rename wadsrc/static/{ => demolition}/textcolors.txt (100%) delete mode 100644 wadsrc/static/language.txt diff --git a/source/build/include/baselayer.h b/source/build/include/baselayer.h index 2e0cb6ce2..864b1cd09 100644 --- a/source/build/include/baselayer.h +++ b/source/build/include/baselayer.h @@ -168,6 +168,14 @@ struct GameStats int timesecnd; }; +enum ETextOrientation +{ + TOR_Default, + TOR_Left, + TOR_Center, + TOR_Right +}; + struct GameInterface { virtual ~GameInterface() {} @@ -179,6 +187,9 @@ struct GameInterface virtual bool mouseInactiveConditional(bool condition) { return condition; } virtual FString statFPS() { return "FPS display not available"; } virtual GameStats getStats() { return {}; } + virtual void DrawNativeMenuText(int fontnum, int palnum, int xpos, int ypos, float fontscale, const char* text, int orientation = TOR_Default) {} + virtual int GetMenuFontHeight(int fontnum) { return 16; /* something arbitrarily non-zero */ } + virtual int GetMenuTextWidth(int fontnum, const char* text) { return 10 * strlen(text); } }; extern GameInterface* gi; diff --git a/source/common/fonts/v_font.cpp b/source/common/fonts/v_font.cpp index b8d381414..7bb57e7c7 100644 --- a/source/common/fonts/v_font.cpp +++ b/source/common/fonts/v_font.cpp @@ -403,7 +403,7 @@ void V_InitFontColors () TranslationLookup.Clear(); TranslationColors.Clear(); - while ((lump = fileSystem.Iterate("textcolors.txt", &lastlump)) != -1) + while ((lump = fileSystem.Iterate("demolition/textcolors.txt", &lastlump)) != -1) { FScanner sc(lump); while (sc.GetString()) diff --git a/source/common/gamecontrol.cpp b/source/common/gamecontrol.cpp index 62aefcd3e..d6f32708e 100644 --- a/source/common/gamecontrol.cpp +++ b/source/common/gamecontrol.cpp @@ -24,6 +24,7 @@ #include "z_music.h" #include "statistics.h" #include "menu.h" +#include "gstrings.h" #ifndef NETCODE_DISABLE #include "enet.h" #endif @@ -378,6 +379,7 @@ int CONFIG_Init() { playername = userConfig.CommandName; } + GStrings.LoadStrings(); V_InitFonts(); buttonMap.SetGameAliases(); Mus_Init(); diff --git a/source/common/menu/listmenu.cpp b/source/common/menu/listmenu.cpp index d7b31e52d..0264808e4 100644 --- a/source/common/menu/listmenu.cpp +++ b/source/common/menu/listmenu.cpp @@ -39,6 +39,7 @@ #include "d_event.h" #include "menu.h" #include "v_draw.h" +#include "baselayer.h" //============================================================================= // @@ -254,10 +255,14 @@ void DListMenu::Drawer () PreDraw(); for(unsigned i=0;imItems.Size(); i++) { - if (mDesc->mItems[i]->mEnabled) mDesc->mItems[i]->Drawer(mDesc->mSelectedItem == (int)i); + auto o = origin; + if (mDesc->mItems[i]->mEnabled) mDesc->mItems[i]->Drawer(o, mDesc->mSelectedItem == (int)i); + o.y += gi->GetMenuFontHeight(mDesc->mNativeFontNum); } + /* if (mDesc->mSelectedItem >= 0 && mDesc->mSelectedItem < (int)mDesc->mItems.Size()) mDesc->mItems[mDesc->mSelectedItem]->DrawSelector(mDesc->mSelectOfsX, mDesc->mSelectOfsY, mDesc->mSelector); + */ PostDraw(); Super::Drawer(); } @@ -281,7 +286,7 @@ void FListMenuItem::Ticker() { } -void FListMenuItem::Drawer(bool selected) +void FListMenuItem::Drawer(const vec2_t& origin, bool selected) { } @@ -380,7 +385,7 @@ FListMenuItemStaticPatch::FListMenuItemStaticPatch(int x, int y, FTexture *patch mCentered = centered; } -void FListMenuItemStaticPatch::Drawer(bool selected) +void FListMenuItemStaticPatch::Drawer(const vec2_t& origin, bool selected) { if (!mTexture) { @@ -417,7 +422,7 @@ FListMenuItemStaticText::FListMenuItemStaticText(int x, int y, const char *text, mCentered = centered; } -void FListMenuItemStaticText::Drawer(bool selected) +void FListMenuItemStaticText::Drawer(const vec2_t& origin, bool selected) { const char *text = mText; if (text != NULL) @@ -521,7 +526,7 @@ FListMenuItemText::~FListMenuItemText() { } -void FListMenuItemText::Drawer(bool selected) +void FListMenuItemText::Drawer(const vec2_t& origin, bool selected) { const char *text = mText; if (mText.Len()) @@ -543,6 +548,48 @@ int FListMenuItemText::GetWidth() } +//============================================================================= +// +// native text item +// +//============================================================================= + +FListMenuItemNativeText::FListMenuItemNativeText(int x, int y, int height, int hotkey, const FString& text, int fontnum, int palnum, float fontscale, FName child, int param) + : FListMenuItemSelectable(x, y, height, child, param) +{ + mText = text; + mFontnum = NIT_BigFont; + mPalnum = NIT_ActiveColor; + mFontscale = fontscale; + mHotkey = hotkey; +} + +FListMenuItemNativeText::~FListMenuItemNativeText() +{ +} + +void FListMenuItemNativeText::Drawer(const vec2_t& origin, bool selected) +{ + const char* text = mText; + if (mText.Len()) + { + if (*text == '$') text = GStrings(text + 1); + gi->DrawNativeMenuText(mFontnum, selected ? NIT_SelectedColor : mPalnum, mXpos + origin.x, mYpos + origin.y, mFontscale, text); + } +} + +int FListMenuItemText::GetWidth() +{ + const char* text = mText; + if (mText.Len()) + { + if (*text == '$') text = GStrings(text + 1); + return mFont->StringWidth(text); + } + return 1; +} + + //============================================================================= // // patch item @@ -556,7 +603,7 @@ FListMenuItemPatch::FListMenuItemPatch(int x, int y, int height, int hotkey, FTe mTexture = patch; } -void FListMenuItemPatch::Drawer(bool selected) +void FListMenuItemPatch::Drawer(const vec2_t& origin, bool selected) { DrawTexture (&twod, mTexture, mXpos, mYpos, DTA_Clean, true, TAG_DONE); } diff --git a/source/common/menu/menu.h b/source/common/menu/menu.h index b1aaddb65..8615693c9 100644 --- a/source/common/menu/menu.h +++ b/source/common/menu/menu.h @@ -53,6 +53,18 @@ enum EMenuKey MKEY_MBNo, }; +enum ENativeFontValues +{ + NIT_BigFont, + NIT_SmallFont, + NIT_TinyFont, + + NIT_ActiveColor = -1, + NIT_InactiveColor = -2, + NIT_SelectedColor = -3 + // positive values for color are direct palswap indices. +}; + struct FGameStartup { @@ -118,11 +130,13 @@ struct FListMenuDescriptor : public FMenuDescriptor int mAutoselect; // this can only be set by internal menu creation functions int mScriptId; int mSecondaryId; + int mNativeFontNum, mNativePalNum; + float mNativeFontScale; FFont *mFont; EColorRange mFontColor; EColorRange mFontColor2; FMenuDescriptor *mRedirect; // used to redirect overlong skill and episode menus to option menu based alternatives - bool mCenter; + int mCenter; void Reset() { @@ -140,6 +154,9 @@ struct FListMenuDescriptor : public FMenuDescriptor mFontColor2 = CR_UNTRANSLATED; mScriptId = 0; mSecondaryId = 0; + mNativeFontNum = NIT_BigFont; + mNativePalNum = NIT_ActiveColor; + mNativeFontScale = 1.f; } }; @@ -289,7 +306,7 @@ public: virtual bool CheckCoordinate(int x, int y); virtual void Ticker(); - virtual void Drawer(bool selected); + virtual void Drawer(const vec2_t &origin, bool selected); virtual bool Selectable(); virtual bool Activate(); virtual FName GetAction(int *pparam); @@ -317,7 +334,7 @@ protected: public: FListMenuItemStaticPatch(int x, int y, FTexture *patch, bool centered); - void Drawer(bool selected); + void Drawer(const vec2_t& origin, bool selected); }; class FListMenuItemStaticText : public FListMenuItem @@ -331,56 +348,9 @@ protected: public: FListMenuItemStaticText(int x, int y, const char *text, FFont *font, EColorRange color, bool centered); ~FListMenuItemStaticText(); - void Drawer(bool selected); + void Drawer(const vec2_t& origin, bool selected) override; }; -//============================================================================= -// -// the player sprite window -// -//============================================================================= -#if 0 -class FListMenuItemPlayerDisplay : public FListMenuItem -{ - FListMenuDescriptor *mOwner; - FTexture *mBackdrop; - FRemapTable mRemap; - FPlayerClass *mPlayerClass; - int mPlayerTics; - bool mNoportrait; - uint8_t mRotation; - uint8_t mMode; // 0: automatic (used by class selection), 1: manual (used by player setup) - uint8_t mTranslate; - int mSkin; - int mRandomClass; - int mRandomTimer; - int mClassNum; - - void SetPlayerClass(int classnum, bool force = false); - bool UpdatePlayerClass(); - void UpdateRandomClass(); - void UpdateTranslation(); - -public: - - enum - { - PDF_ROTATION = 0x10001, - PDF_SKIN = 0x10002, - PDF_CLASS = 0x10003, - PDF_MODE = 0x10004, - PDF_TRANSLATE = 0x10005, - }; - - FListMenuItemPlayerDisplay(FListMenuDescriptor *menu, int x, int y, PalEntry c1, PalEntry c2, bool np, FName action); - ~FListMenuItemPlayerDisplay(); - virtual void Ticker(); - virtual void Drawer(bool selected); - bool SetValue(int i, int value); -}; -#endif - - //============================================================================= // // selectable items @@ -396,12 +366,12 @@ protected: public: FListMenuItemSelectable(int x, int y, int height, FName childmenu, int mParam = -1); - bool CheckCoordinate(int x, int y); - bool Selectable(); - bool CheckHotkey(int c); - bool Activate(); - bool MouseEvent(int type, int x, int y); - FName GetAction(int *pparam); + bool CheckCoordinate(int x, int y) override; + bool Selectable() override; + bool CheckHotkey(int c) override; + bool Activate() override; + bool MouseEvent(int type, int x, int y) override; + FName GetAction(int *pparam) override; }; class FListMenuItemText : public FListMenuItemSelectable @@ -413,17 +383,32 @@ class FListMenuItemText : public FListMenuItemSelectable public: FListMenuItemText(int x, int y, int height, int hotkey, const FString &text, FFont *font, EColorRange color, EColorRange color2, FName child, int param = 0); ~FListMenuItemText(); - void Drawer(bool selected); - int GetWidth(); + void Drawer(const vec2_t& origin, bool selected) override; + int GetWidth() override; }; +class FListMenuItemNativeText : public FListMenuItemSelectable +{ + // This draws the item with the game frontend's native text drawer and uses a front end defined font, it takes only symbolic constants as parameters. + FString mText; + int mFontnum; + int mPalnum; + float mFontscale; +public: + FListMenuItemNativeText(int x, int y, int height, int hotkey, const FString& text, int fontnum, int palnum, float fontscale, FName child, int param = 0); + ~FListMenuItemNativeText(); + void Drawer(const vec2_t& origin, bool selected) override; + int GetWidth() override; +}; + + class FListMenuItemPatch : public FListMenuItemSelectable { FTexture* mTexture; public: FListMenuItemPatch(int x, int y, int height, int hotkey, FTexture* patch, FName child, int param = 0); - void Drawer(bool selected); - int GetWidth(); + void Drawer(const vec2_t& origin, bool selected) override; + int GetWidth() override; }; //============================================================================= diff --git a/source/common/menu/menudef.cpp b/source/common/menu/menudef.cpp index dbb1f7ab6..cbf085cd1 100644 --- a/source/common/menu/menudef.cpp +++ b/source/common/menu/menudef.cpp @@ -159,7 +159,7 @@ static bool CheckSkipGameBlock(FScanner &sc) if (!(filter & 1)) // todo: apply correct filter. { SkipSubBlock(sc); - return true; + return !sc.CheckString("else"); } return false; } @@ -362,26 +362,90 @@ static void ParseListMenuBody(FScanner &sc, FListMenuDescriptor *desc) if (desc->mSelectedItem == -1) desc->mSelectedItem = desc->mItems.Size()-1; } - else if (sc.Compare("Font")) + else if (sc.Compare("NativeTextItem")) { + sc.MustGetString(); + FString text = sc.String; + sc.MustGetStringName(","); + sc.MustGetString(); + int hotkey = sc.String[0]; + sc.MustGetStringName(","); + sc.MustGetString(); + FName action = sc.String; + int param = 0; + if (sc.CheckString(",")) + { + sc.MustGetNumber(); + param = sc.Number; + } + + auto it = new FListMenuItemNativeText(desc->mXpos, desc->mYpos, desc->mLinespacing, hotkey, text, desc->mNativeFontNum, desc->mNativePalNum, desc->mNativeFontScale, action, param); + desc->mItems.Push(it); + desc->mYpos += desc->mLinespacing; + if (desc->mSelectedItem == -1) desc->mSelectedItem = desc->mItems.Size() - 1; + + } + else if (sc.Compare("NativeFont")) + { + desc->mNativePalNum = NIT_ActiveColor; + desc->mNativeFontScale = 1.f; sc.MustGetString(); - FFont *newfont = V_GetFont(sc.String); - if (newfont != NULL) desc->mFont = newfont; + if (sc.Compare("Big")) desc->mNativeFontNum = NIT_BigFont; + else if (sc.Compare("Small")) desc->mNativeFontNum = NIT_SmallFont; + else if (sc.Compare("Tiny")) desc->mNativeFontNum = NIT_TinyFont; + else sc.ScriptError("Unknown native font type"); if (sc.CheckString(",")) { sc.MustGetString(); - desc->mFontColor2 = desc->mFontColor = V_FindFontColor((FName)sc.String); + if (sc.Compare("Active")) desc->mNativePalNum = NIT_ActiveColor; + else if (sc.Compare("Inactive")) desc->mNativePalNum = NIT_InactiveColor; + else if (sc.Compare("Selected")) desc->mNativePalNum = NIT_SelectedColor; + else + { + char* ep; + int v = (int)strtoll(sc.String, &ep, 0); + if (*ep != 0) sc.ScriptError("Unknown native palette"); + desc->mNativePalNum = v; + } if (sc.CheckString(",")) { - sc.MustGetString(); - desc->mFontColor2 = V_FindFontColor((FName)sc.String); + sc.MustGetFloat(); + desc->mNativeFontScale = sc.Float; + } + } + } + else if (sc.Compare("Position")) + { + sc.MustGetNumber(); + sc.MustGetStringName(","); + desc->mXpos = sc.Number; + sc.MustGetNumber(); + desc->mYpos = sc.Number; + if (sc.CheckString(",")) + { + desc->mCenter = sc.Number; + } + } + else if (sc.Compare("Font")) + { + sc.MustGetString(); + FFont* newfont = V_GetFont(sc.String); + if (newfont != NULL) desc->mFont = newfont; + if (sc.CheckString(",")) + { + sc.MustGetString(); + desc->mFontColor2 = desc->mFontColor = V_FindFontColor((FName)sc.String); + if (sc.CheckString(",")) + { + sc.MustGetString(); + desc->mFontColor2 = V_FindFontColor((FName)sc.String); } } - else - { - desc->mFontColor = OptionSettings.mFontColor; - desc->mFontColor2 = OptionSettings.mFontColorValue; - } + else + { + desc->mFontColor = OptionSettings.mFontColor; + desc->mFontColor2 = OptionSettings.mFontColorValue; + } } else if (sc.Compare("NetgameMessage")) { diff --git a/source/common/utility/stringtable.cpp b/source/common/utility/stringtable.cpp index bd5d3fcd4..838af71fa 100644 --- a/source/common/utility/stringtable.cpp +++ b/source/common/utility/stringtable.cpp @@ -60,13 +60,13 @@ void FStringTable::LoadStrings () int lastlump, lump; lastlump = 0; - while ((lump = fileSystem.Iterate("Language/lmacros", &lastlump, ELookupMode::NoExtension)) != -1) + while ((lump = fileSystem.Iterate("demolition/lmacros", &lastlump, ELookupMode::NoExtension)) != -1) { readMacros(lump); } lastlump = 0; - while ((lump = fileSystem.Iterate ("Language/language", &lastlump, ELookupMode::NoExtension)) != -1) + while ((lump = fileSystem.Iterate ("demolition/language", &lastlump, ELookupMode::NoExtension)) != -1) { auto lumpdata = fileSystem.GetFileData(lump); diff --git a/source/duke3d/src/duke3d.h b/source/duke3d/src/duke3d.h index b8c1c5771..e78c8835b 100644 --- a/source/duke3d/src/duke3d.h +++ b/source/duke3d/src/duke3d.h @@ -154,6 +154,12 @@ struct GameInterface : ::GameInterface bool mouseInactiveConditional(bool condition) override; FString statFPS() override; GameStats getStats() override; + // Access to the front end specific menu code. Use is restricted to the main menu, the ingame menu and the skill/episode selection. + // Everything else is either custom screens or will use the generic option menu style. + void DrawNativeMenuText(int fontnum, int palnum, int xpos, int ypos, float fontscale, const char* text, int orientation = TOR_Default) override; + int GetMenuFontHeight(int fontnum) override; + int GetMenuTextWidth(int fontnum, const char* text) override; + }; END_DUKE_NS diff --git a/source/duke3d/src/menus.cpp b/source/duke3d/src/menus.cpp index 02e20a3f9..f22e38e6d 100644 --- a/source/duke3d/src/menus.cpp +++ b/source/duke3d/src/menus.cpp @@ -192,22 +192,6 @@ they effectively stand in for curly braces as struct initializers. MenuGameplayStemEntry g_MenuGameplayEntries[MAXMENUGAMEPLAYENTRIES]; -// common font types -// tilenums are set after namesdyn runs - -// emptychar x,y between x,y zoom cursorLeft cursorCenter cursorScale textflags -// tilenum shade_deselected shade_disabled pal pal_selected pal_deselected pal_disabled -MenuFont_t MF_Redfont = { { 5<<16, 15<<16 }, { 0, 0 }, 65536, 20<<16, 110<<16, 65536, TEXT_BIGALPHANUM | TEXT_UPPERCASE, - -1, 10, 0, 0, 0, 0, 1, - 0, 0, 1 }; -MenuFont_t MF_Bluefont = { { 5<<16, 7<<16 }, { 0, 0 }, 65536, 10<<16, 110<<16, 32768, 0, - -1, 10, 0, 0, 10, 10, 16, - 0, 0, 16 }; -MenuFont_t MF_Minifont = { { 4<<16, 5<<16 }, { 1<<16, 1<<16 }, 65536, 10<<16, 110<<16, 32768, 0, - -1, 10, 0, 0, 2, 2, 0, - 0, 0, 16 }; - - static MenuMenuFormat_t MMF_Top_Main = { { MENU_MARGIN_CENTER<<16, 55<<16, }, -(170<<16) }; static MenuMenuFormat_t MMF_Top_Episode = { { MENU_MARGIN_CENTER<<16, 48<<16, }, -(190<<16) }; static MenuMenuFormat_t MMF_Top_NewGameCustom = { { MENU_MARGIN_CENTER<<16, 48<<16, }, -(190<<16) }; diff --git a/source/rr/src/menus.cpp b/source/rr/src/menus.cpp index ad42eb674..e246ea230 100644 --- a/source/rr/src/menus.cpp +++ b/source/rr/src/menus.cpp @@ -1693,36 +1693,6 @@ void Menu_Init(void) } } -#if 0 - // prepare sound setup - if (WW2GI) - ME_SOUND_DUKETALK.name = "GI talk:"; - else if (NAM) - ME_SOUND_DUKETALK.name = "Grunt talk:"; - - if (IONMAIDEN) - { - MF_Redfont.between.x = 2<<16; - MF_Redfont.cursorScale = 32768; - MF_Redfont.zoom = 16384; - MF_Bluefont.zoom = 16384; - - // hack; should swap out pointers - MF_Minifont = MF_Bluefont; - - MMF_Top_Main.pos.x = 40<<16; - MMF_Top_Main.pos.y = 130<<16; - MMF_Top_Main.bottomcutoff = 190<<16; - M_OPTIONS.format = &MMF_Top_Main; - - MEF_MainMenu.width = MEF_OptionsMenu.width = -(160<<16); - MEF_MainMenu.marginBottom = 7<<16; - - M_OPTIONS.title = NoTitle; - - SELECTDIR_z = 16384; - } -#endif if (RR) { diff --git a/wadsrc/static/demolition/language.csv b/wadsrc/static/demolition/language.csv new file mode 100644 index 000000000..cfd2f5717 --- /dev/null +++ b/wadsrc/static/demolition/language.csv @@ -0,0 +1,13 @@ +default,Identifier,Remarks,Filter,eng enc ena enz eni ens enj enb enl ent enw,cs,de,el,eo,es,esm esn esg esc esa esd esv eso esr ess esf esl esy esz esb ese esh esi esu,fi,fr,hu,it,jp,ko,nl,pl,pt,ptg,ro,ru,sr +,,,,,,,,,,,,,,,,,,,,,,, +New Game,MNU_NEWGAME,,,,Nová hra,Neues Spiel,,Nova Ludo,Nueva Partida,,Uusi peli,Nouvelle Partie,,Nuovo gioco,新規ゲーム,새로운 게임,Nieuw spel,Nowa Gra,Novo Jogo,,,Новая игра,Нова игра +Options,MNU_OPTIONS,,,,Možnosti,Optionen,,Agordoj,Opciones,,Asetukset,Options,,Opzioni,オプション,설정,Opties,Opcje,Opções,,,Настройки,Подешавања +Quit,MNU_QUITGAME,,,,Ukončit hru,Spiel verlassen,,Ĉesigi Ludon,Salir del juego,,Lopeta peli,Quitter le jeu,,Esci dal gioco,終了,게임 종료,Verlaat spel,Wyjdź z Gry,Sair,,,Выход,Заврши игру +Load Game,MNU_LOADGAME,,,,Načíst hru,Spiel laden,,Ŝarĝi Ludon,Cargar Partida,,Lataa peli,Chargement,,Carica gioco,ロード,게임 불러오기,Laden spel,Wczytaj Grę,Carregar,,,Загрузка,Учитај игру +Save Game,MNU_SAVEGAME,,,,Uložit hru,Spiel sichern,,Konservi Ludon,Guardar Partida,,Tallenna peli,Sauvegarde,,Salva gioco,セーブ,게임 저장하기,Opslaan spel,Zapisz Grę,Salvar,Gravar,,Сохранение,Сачувај игру +Help,MNU_HELP,,,,,Hilfe,,,,,,Aide,,,,,,,,,,, +Continue,MNU_CONTINUE,,,,,Fortfahren,,,,,,,,,,,,,,,,, +Credits,MNU_CREDITS,,,,,,,,,,,,,,,,,,,,,, +Cool Stuff,MNU_COOLSTUFF,,,,,Cooles Zeug,,,,,,,,,,,,,,,,, +Multiplayer,MNU_MULTIPLAYER,,,,,Mehrspieler,,,,,,,,,,,,,,,,, +End Game,MNU_ENDGAME,,,,,Spiel beenden,,,,,,,,,,,,,,,,, \ No newline at end of file diff --git a/wadsrc/static/demolition/menudef.txt b/wadsrc/static/demolition/menudef.txt index 402209124..d3298200d 100644 --- a/wadsrc/static/demolition/menudef.txt +++ b/wadsrc/static/demolition/menudef.txt @@ -8,54 +8,62 @@ LISTMENU "MainMenu" { ifgame(Duke, Nam, WW2GI, Fury) { - linespacing 15 - class "Duke.MainMenu" - TextItem "$MNU_NEWGAME", "n", "PlayerclassMenu" - //TextItem "$MNU_MULTIPLAYER", "m", "MultiMenu" // In EDuke this replaces "New Game" when in networking mode. Kept here as a reminder (I'm not going to support EDuke's C/S implementation) ifgame(fury) { - TextItem "$MNU_CONTINUE", "l", "LoadGameMenu" + position 40, 130, -160 } else { - TextItem "$MNU_LOADGAME", "l", "LoadGameMenu" + position 160, 55 } - TextItem "$MNU_OPTIONS", "o", "OptionsMenu" - TextItem "$MNU_HELP", "h", "HelpMenu" - TextItem "$MNU_CREDITS", "c", "CreditsMenu" - TextItem "$MNU_QUITGAME", "q", "QuitMenu" + linespacing 15 + class "Duke.MainMenu" + NativeTextItem "$MNU_NEWGAME", "n", "PlayerclassMenu" + //NativeTextItem "$MNU_MULTIPLAYER", "m", "MultiMenu" // In EDuke this replaces "New Game" when in networking mode. Kept here as a reminder (I'm not going to support EDuke's C/S implementation) + ifgame(fury) + { + NativeTextItem "$MNU_CONTINUE", "l", "LoadGameMenu" + } + else + { + NativeTextItem "$MNU_LOADGAME", "l", "LoadGameMenu" + } + NativeTextItem "$MNU_OPTIONS", "o", "OptionsMenu" + NativeTextItem "$MNU_HELP", "h", "HelpMenu" + NativeTextItem "$MNU_CREDITS", "c", "CreditsMenu" + NativeTextItem "$MNU_QUITGAME", "q", "QuitMenu" } ifgame(Redneck, RedneckRides) { linespacing 15 - TextItem "$MNU_NEWGAME", "n", "PlayerclassMenu" - //TextItem "$MNU_MULTIPLAYER", "m", "MultiMenu" // In EDuke this replaces "New Game" when in networking mode. Kept here as a reminder (I'm not going to support EDuke's C/S implementation) - TextItem "$MNU_LOADGAME", "l", "LoadGameMenu" - TextItem "$MNU_OPTIONS", "o", "OptionsMenu" - TextItem "$MNU_HELP", "h", "HelpMenu" - TextItem "$MNU_CREDITS", "c", "CreditsMenu" - TextItem "$MNU_QUITGAME", "q", "QuitMenu" + NativeTextItem "$MNU_NEWGAME", "n", "PlayerclassMenu" + //NativeTextItem "$MNU_MULTIPLAYER", "m", "MultiMenu" // In EDuke this replaces "New Game" when in networking mode. Kept here as a reminder (I'm not going to support EDuke's C/S implementation) + NativeTextItem "$MNU_LOADGAME", "l", "LoadGameMenu" + NativeTextItem "$MNU_OPTIONS", "o", "OptionsMenu" + NativeTextItem "$MNU_HELP", "h", "HelpMenu" + NativeTextItem "$MNU_CREDITS", "c", "CreditsMenu" + NativeTextItem "$MNU_QUITGAME", "q", "QuitMenu" } ifgame(Blood) { linespacing 15 - TextItem "$MNU_NEWGAME", "n", "PlayerclassMenu" - TextItem "$MNU_MULTIPLAYER", "m", "MultiMenu" - TextItem "$MNU_OPTIONS", "o", "OptionsMenu" - TextItem "$MNU_LOADGAME", "l", "LoadGameMenu" - TextItem "$MNU_HELP", "h", "HelpMenu" - TextItem "$MNU_CREDITS", "c", "CreditsMenu" - TextItem "$MNU_QUITGAME", "q", "QuitMenu" + NativeTextItem "$MNU_NEWGAME", "n", "PlayerclassMenu" + NativeTextItem "$MNU_MULTIPLAYER", "m", "MultiMenu" + NativeTextItem "$MNU_OPTIONS", "o", "OptionsMenu" + NativeTextItem "$MNU_LOADGAME", "l", "LoadGameMenu" + NativeTextItem "$MNU_HELP", "h", "HelpMenu" + NativeTextItem "$MNU_CREDITS", "c", "CreditsMenu" + NativeTextItem "$MNU_QUITGAME", "q", "QuitMenu" } ifgame(ShadowWarrior) { linespacing 15 - TextItem "$MNU_NEWGAME", "n", "PlayerclassMenu" - TextItem "$MNU_LOADGAME", "l", "LoadGameMenu" - TextItem "$MNU_SAVEGAME", "s", "SaveGameMenu" - TextItem "$MNU_OPTIONS", "o", "OptionsMenu" - TextItem "$MNU_COOLSTUFF", "h", "HelpMenu" - TextItem "$MNU_QUITGAME", "q", "QuitMenu" + NativeTextItem "$MNU_NEWGAME", "n", "PlayerclassMenu" + NativeTextItem "$MNU_LOADGAME", "l", "LoadGameMenu" + NativeTextItem "$MNU_SAVEGAME", "s", "SaveGameMenu" + NativeTextItem "$MNU_OPTIONS", "o", "OptionsMenu" + NativeTextItem "$MNU_COOLSTUFF", "h", "HelpMenu" + NativeTextItem "$MNU_QUITGAME", "q", "QuitMenu" } } diff --git a/wadsrc/static/textcolors.txt b/wadsrc/static/demolition/textcolors.txt similarity index 100% rename from wadsrc/static/textcolors.txt rename to wadsrc/static/demolition/textcolors.txt diff --git a/wadsrc/static/language.txt b/wadsrc/static/language.txt deleted file mode 100644 index e69de29bb..000000000