mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 05:51:20 +00:00
Merge branch 'master' into vulkan2
This commit is contained in:
commit
6afe9d09f3
33 changed files with 4267 additions and 3899 deletions
|
@ -394,6 +394,7 @@ bool FCajunMaster::DoAddBot (FLevelLocals *Level, uint8_t *info, botskill_t skil
|
|||
else
|
||||
Printf ("%s joined the game\n", players[bnum].userinfo.GetName());
|
||||
|
||||
Level->localEventManager->PlayerEntered(bnum, false);
|
||||
Level->DoReborn (bnum, true);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1754,7 +1754,7 @@ void C_MidPrint (FFont *font, const char *msg, bool bold)
|
|||
if (msg != nullptr)
|
||||
{
|
||||
auto color = (EColorRange)PrintColors[bold? PRINTLEVELS+1 : PRINTLEVELS];
|
||||
Printf(PRINT_NONOTIFY, TEXTCOLOR_ESCAPESTR "%c%s\n%s\n%s\n", color, console_bar, msg, console_bar);
|
||||
Printf(PRINT_HIGH|PRINT_NONOTIFY, TEXTCOLOR_ESCAPESTR "%c%s\n%s\n%s\n", color, console_bar, msg, console_bar);
|
||||
|
||||
bool altscale = false;
|
||||
if (font == nullptr)
|
||||
|
|
|
@ -44,7 +44,6 @@
|
|||
#include "utf8.h"
|
||||
|
||||
EventManager staticEventManager;
|
||||
EventManager eventManager;
|
||||
|
||||
void EventManager::CallOnRegister()
|
||||
{
|
||||
|
@ -262,7 +261,12 @@ void EventManager::InitStaticHandlers(FLevelLocals *l, bool map)
|
|||
void EventManager::Shutdown()
|
||||
{
|
||||
// delete handlers.
|
||||
TArray<DStaticEventHandler *> list;
|
||||
for (DStaticEventHandler* handler = LastEventHandler; handler; handler = handler->prev)
|
||||
{
|
||||
list.Push(handler);
|
||||
}
|
||||
for (auto handler : list)
|
||||
{
|
||||
handler->Destroy();
|
||||
}
|
||||
|
@ -631,11 +635,6 @@ DEFINE_ACTION_FUNCTION(DStaticEventHandler, SetOrder)
|
|||
PARAM_SELF_PROLOGUE(DStaticEventHandler);
|
||||
PARAM_INT(order);
|
||||
|
||||
/* not really needed - this is never checked again. To re-add, the handlers need a pointer to their manager but that's not worth it just for this check.
|
||||
if (eventManager.CheckHandler(self))
|
||||
return 0;
|
||||
*/
|
||||
|
||||
self->Order = order;
|
||||
return 0;
|
||||
}
|
||||
|
@ -1223,7 +1222,7 @@ void DStaticEventHandler::NewGame()
|
|||
//
|
||||
void DStaticEventHandler::OnDestroy()
|
||||
{
|
||||
eventManager.UnregisterHandler(this);
|
||||
owner->UnregisterHandler(this);
|
||||
Super::OnDestroy();
|
||||
}
|
||||
|
||||
|
|
|
@ -332,5 +332,4 @@ struct EventManager
|
|||
|
||||
};
|
||||
|
||||
extern EventManager eventManager;
|
||||
extern EventManager staticEventManager;
|
||||
extern EventManager staticEventManager;
|
||||
|
|
|
@ -80,7 +80,6 @@ FFont::FFont (const char *name, const char *nametemplate, const char *filetempla
|
|||
|
||||
noTranslate = notranslate;
|
||||
Lump = fdlump;
|
||||
FontHeight = 0;
|
||||
GlobalKerning = false;
|
||||
FontName = name;
|
||||
Next = FirstFont;
|
||||
|
@ -111,9 +110,8 @@ FFont::FFont (const char *name, const char *nametemplate, const char *filetempla
|
|||
// For anything else, each folder is being treated as an atomic, self-contained unit and mixing from different glyph sets is blocked.
|
||||
Wads.GetLumpsInFolder(path, folderdata, nametemplate == nullptr);
|
||||
|
||||
if (nametemplate == nullptr)
|
||||
//if (nametemplate == nullptr)
|
||||
{
|
||||
// Only take font.inf from the actual folder we are processing but not from an older folder that may have been superseded.
|
||||
FStringf infpath("fonts/%s/font.inf", filetemplate);
|
||||
|
||||
unsigned index = folderdata.FindEx([=](const FolderEntry &entry)
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
#include "i_soundfont.h"
|
||||
#include "i_system.h"
|
||||
#include "v_video.h"
|
||||
#include "gstrings.h"
|
||||
|
||||
|
||||
void ClearSaveGames();
|
||||
|
@ -1105,6 +1106,7 @@ void M_StartupEpisodeMenu(FGameStartup *gs)
|
|||
}
|
||||
|
||||
|
||||
int posx = (int)ld->mXpos;
|
||||
int posy = (int)ld->mYpos;
|
||||
int topy = posy;
|
||||
|
||||
|
@ -1132,6 +1134,23 @@ void M_StartupEpisodeMenu(FGameStartup *gs)
|
|||
}
|
||||
|
||||
if (!isOld) ld->mSelectedItem = ld->mItems.Size();
|
||||
|
||||
for (unsigned i = 0; i < AllEpisodes.Size(); i++)
|
||||
{
|
||||
DMenuItemBase *it = nullptr;
|
||||
if (AllEpisodes[i].mPicName.IsNotEmpty())
|
||||
{
|
||||
FTextureID tex = GetMenuTexture(AllEpisodes[i].mPicName);
|
||||
if (AllEpisodes[i].mEpisodeName.IsEmpty() || TexMan.OkForLocalization(tex, AllEpisodes[i].mEpisodeName))
|
||||
continue; // We do not measure patch based entries. They are assumed to fit
|
||||
}
|
||||
const char *c = AllEpisodes[i].mEpisodeName;
|
||||
if (*c == '$') c = GStrings(c + 1);
|
||||
int textwidth = ld->mFont->StringWidth(c);
|
||||
int textright = posx + textwidth;
|
||||
if (posx + textright > 320) posx = std::max(0, 320 - textright);
|
||||
}
|
||||
|
||||
for(unsigned i = 0; i < AllEpisodes.Size(); i++)
|
||||
{
|
||||
DMenuItemBase *it = nullptr;
|
||||
|
@ -1139,11 +1158,11 @@ void M_StartupEpisodeMenu(FGameStartup *gs)
|
|||
{
|
||||
FTextureID tex = GetMenuTexture(AllEpisodes[i].mPicName);
|
||||
if (AllEpisodes[i].mEpisodeName.IsEmpty() || TexMan.OkForLocalization(tex, AllEpisodes[i].mEpisodeName))
|
||||
it = CreateListMenuItemPatch(ld->mXpos, posy, ld->mLinespacing, AllEpisodes[i].mShortcut, tex, NAME_Skillmenu, i);
|
||||
it = CreateListMenuItemPatch(posx, posy, ld->mLinespacing, AllEpisodes[i].mShortcut, tex, NAME_Skillmenu, i);
|
||||
}
|
||||
if (it == nullptr)
|
||||
{
|
||||
it = CreateListMenuItemText(ld->mXpos, posy, ld->mLinespacing, AllEpisodes[i].mShortcut,
|
||||
it = CreateListMenuItemText(posx, posy, ld->mLinespacing, AllEpisodes[i].mShortcut,
|
||||
AllEpisodes[i].mEpisodeName, ld->mFont, ld->mFontColor, ld->mFontColor2, NAME_Skillmenu, i);
|
||||
}
|
||||
ld->mItems.Push(it);
|
||||
|
|
|
@ -993,7 +993,7 @@ void FLevelLocals::Serialize(FSerializer &arc, bool hubload)
|
|||
// [ZZ] serialize events
|
||||
arc("firstevent", localEventManager->FirstEventHandler)
|
||||
("lastevent", localEventManager->LastEventHandler);
|
||||
localEventManager->CallOnRegister();
|
||||
if (arc.isReading()) localEventManager->CallOnRegister();
|
||||
Thinkers.SerializeThinkers(arc, hubload);
|
||||
arc("polyobjs", Polyobjects);
|
||||
SerializeSubsectors(arc, "subsectors");
|
||||
|
|
|
@ -548,6 +548,14 @@ void V_UpdateModeSize (int width, int height)
|
|||
// The optimal scale will always be to fit a virtual 640 pixel wide display onto the screen.
|
||||
// Exceptions are made for a few ranges where the available virtual width is > 480.
|
||||
|
||||
// This reference size is being used so that on 800x450 (small 16:9) a scale of 2 gets used.
|
||||
|
||||
CleanXfac = std::min(screen->GetWidth() / 400, screen->GetHeight() / 240);
|
||||
if (CleanXfac >= 4) CleanXfac--; // Otherwise we do not have enough space for the episode/skill menus in some languages.
|
||||
CleanYfac = CleanXfac;
|
||||
CleanWidth = screen->GetWidth() / CleanXfac;
|
||||
CleanHeight = screen->GetHeight() / CleanYfac;
|
||||
|
||||
int w = screen->GetWidth();
|
||||
int factor;
|
||||
if (w < 640) factor = 1;
|
||||
|
@ -555,10 +563,6 @@ void V_UpdateModeSize (int width, int height)
|
|||
else if (w >= 1600 && w < 1920) factor = 3;
|
||||
else factor = w / 640;
|
||||
|
||||
CleanXfac = CleanYfac = factor;
|
||||
CleanWidth = width / CleanXfac;
|
||||
CleanHeight = height / CleanYfac;
|
||||
|
||||
CleanYfac_1 = CleanXfac_1 = MAX(1, int (CleanXfac * 0.7));
|
||||
CleanWidth_1 = width / CleanXfac_1;
|
||||
CleanHeight_1 = height / CleanYfac_1;
|
||||
|
|
|
@ -433,7 +433,6 @@ IWad
|
|||
Compatibility = "Shorttex"
|
||||
MustContain = "MAP01"
|
||||
BannerColors = "a8 00 00", "a8 a8 a8"
|
||||
Load = "nerve.wad"
|
||||
IgnoreTitlePatches = 1
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,9 +1,9 @@
|
|||
name,language,male,female,neutral,object
|
||||
ao_esp,es,o,a,o,o
|
||||
e_de,de,,e,,
|
||||
e_in,de,,in,,
|
||||
in_de,de,,in,,
|
||||
e_fr,fr,,e,,
|
||||
ao_ptb,ptb,o,a,o,o
|
||||
ao_ptb,pt,o,a,o,o
|
||||
,,,,,
|
||||
,,,,,
|
||||
ao_rus,ru,,а,о,о
|
||||
|
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,2 @@
|
|||
FontHeight 11
|
||||
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue