mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 14:01:45 +00:00
Merge remote-tracking branch 'origin/master' into vulkan2
This commit is contained in:
commit
3c594c6c93
17 changed files with 125 additions and 85 deletions
|
@ -1855,7 +1855,7 @@ CCMD (toggle)
|
|||
val = var->GetGenericRep (CVAR_Bool);
|
||||
val.Bool = !val.Bool;
|
||||
var->SetGenericRep (val, CVAR_Bool);
|
||||
Printf ("\"%s\" is \"%s\"\n", var->GetName(),
|
||||
Printf ("\"%s\" = \"%s\"\n", var->GetName(),
|
||||
val.Bool ? "true" : "false");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -863,7 +863,7 @@ void D_Display ()
|
|||
{
|
||||
FTexture *tex;
|
||||
int x;
|
||||
FString pstring = "By ";
|
||||
FString pstring = GStrings("TXT_BY");
|
||||
|
||||
tex = TexMan.GetTextureByName(gameinfo.PauseSign, true);
|
||||
x = (SCREENWIDTH - tex->GetDisplayWidth() * CleanXfac)/2 +
|
||||
|
@ -871,7 +871,7 @@ void D_Display ()
|
|||
screen->DrawTexture (tex, x, 4, DTA_CleanNoMove, true, TAG_DONE);
|
||||
if (paused && multiplayer)
|
||||
{
|
||||
pstring += players[paused - 1].userinfo.GetName();
|
||||
pstring << ' ' << players[paused - 1].userinfo.GetName();
|
||||
screen->DrawText(SmallFont, CR_RED,
|
||||
(screen->GetWidth() - SmallFont->StringWidth(pstring)*CleanXfac) / 2,
|
||||
(tex->GetDisplayHeight() * CleanYfac) + 4, pstring, DTA_CleanNoMove, true, TAG_DONE);
|
||||
|
|
|
@ -66,6 +66,7 @@
|
|||
#include "i_time.h"
|
||||
#include "i_system.h"
|
||||
#include "vm.h"
|
||||
#include "gstrings.h"
|
||||
|
||||
EXTERN_CVAR (Int, disableautosave)
|
||||
EXTERN_CVAR (Int, autosavecount)
|
||||
|
@ -2187,6 +2188,13 @@ void Net_DoCommand (int type, uint8_t **stream, int player)
|
|||
case DEM_GIVECHEAT:
|
||||
s = ReadString (stream);
|
||||
cht_Give (&players[player], s, ReadLong (stream));
|
||||
if (player != consoleplayer)
|
||||
{
|
||||
FString message = GStrings("TXT_X_CHEATS");
|
||||
message.Substitute("%s", players[player].userinfo.GetName());
|
||||
Printf("%s: give %s\n", message.GetChars(), s);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case DEM_TAKECHEAT:
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
#include "cmdlib.h"
|
||||
#include "serializer.h"
|
||||
#include "vm.h"
|
||||
#include "gstrings.h"
|
||||
|
||||
static FRandom pr_pickteam ("PickRandomTeam");
|
||||
|
||||
|
@ -314,7 +315,7 @@ static void UpdateTeam (int pnum, int team, bool update)
|
|||
|
||||
if ((dmflags2 & DF2_NO_TEAM_SWITCH) && (alwaysapplydmflags || deathmatch) && TeamLibrary.IsValidTeam (info->GetTeam()))
|
||||
{
|
||||
Printf ("Team changing has been disabled!\n");
|
||||
Printf ("%s\n", GStrings("TXT_NO_TEAM_CHANGE"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -329,10 +330,18 @@ static void UpdateTeam (int pnum, int team, bool update)
|
|||
|
||||
if (update && oldteam != team)
|
||||
{
|
||||
FString message;
|
||||
if (TeamLibrary.IsValidTeam (team))
|
||||
Printf ("%s joined the %s team\n", info->GetName(), Teams[team].GetName ());
|
||||
{
|
||||
message = GStrings("TXT_JOINED_TEAM");
|
||||
message.Substitute("%t", Teams[team].GetName());
|
||||
}
|
||||
else
|
||||
Printf ("%s is now a loner\n", info->GetName());
|
||||
{
|
||||
message = GStrings("TXT_LONER");
|
||||
}
|
||||
message.Substitute("%s", info->GetName());
|
||||
Printf("%s\n", message.GetChars());
|
||||
}
|
||||
// Let the player take on the team's color
|
||||
R_BuildPlayerTranslation (pnum);
|
||||
|
|
|
@ -1673,16 +1673,9 @@ void G_DoPlayerPop(int playernum)
|
|||
{
|
||||
playeringame[playernum] = false;
|
||||
|
||||
if (deathmatch)
|
||||
{
|
||||
Printf("%s left the game with %d frags\n",
|
||||
players[playernum].userinfo.GetName(),
|
||||
players[playernum].fragcount);
|
||||
}
|
||||
else
|
||||
{
|
||||
Printf("%s left the game\n", players[playernum].userinfo.GetName());
|
||||
}
|
||||
FString message = GStrings(deathmatch? "TXT_LEFTWITHFRAGS" : "TXT_LEFTTHEGAME");
|
||||
message.Substitute("%s", players[playernum].userinfo.GetName());
|
||||
message.Substitute("%d", FStringf("%d", players[playernum].fragcount));
|
||||
|
||||
// [RH] Revert each player to their own view if spying through the player who left
|
||||
for (int ii = 0; ii < MAXPLAYERS; ++ii)
|
||||
|
@ -1754,7 +1747,7 @@ static bool CheckSingleWad (const char *name, bool &printRequires, bool printwar
|
|||
{
|
||||
if (!printRequires)
|
||||
{
|
||||
Printf ("This savegame needs these wads:\n%s", name);
|
||||
Printf ("%s:\n%s", GStrings("TXT_SAVEGAMENEEDS"), name);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1790,6 +1783,12 @@ bool G_CheckSaveGameWads (FSerializer &arc, bool printwarn)
|
|||
return true;
|
||||
}
|
||||
|
||||
static void LoadGameError(const char *label, const char *append = "")
|
||||
{
|
||||
FString message = GStrings(label);
|
||||
message.Substitute("%s", savename);
|
||||
Printf ("%s %s\n", message.GetChars(), append);
|
||||
}
|
||||
|
||||
void G_DoLoadGame ()
|
||||
{
|
||||
|
@ -1805,13 +1804,13 @@ void G_DoLoadGame ()
|
|||
std::unique_ptr<FResourceFile> resfile(FResourceFile::OpenResourceFile(savename.GetChars(), true, true));
|
||||
if (resfile == nullptr)
|
||||
{
|
||||
Printf ("Could not read savegame '%s'\n", savename.GetChars());
|
||||
LoadGameError("TXT_COULDNOTREAD");
|
||||
return;
|
||||
}
|
||||
FResourceLump *info = resfile->FindLump("info.json");
|
||||
if (info == nullptr)
|
||||
{
|
||||
Printf("'%s' is not a valid savegame: Missing 'info.json'.\n", savename.GetChars());
|
||||
LoadGameError("TXT_NOINFOJSON");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1821,7 +1820,7 @@ void G_DoLoadGame ()
|
|||
FSerializer arc(nullptr);
|
||||
if (!arc.OpenReader((const char *)data, info->LumpSize))
|
||||
{
|
||||
Printf("Failed to access savegame info\n");
|
||||
LoadGameError("TXT_FAILEDTOREADSG");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1839,27 +1838,30 @@ void G_DoLoadGame ()
|
|||
// have this information.
|
||||
if (engine.IsEmpty())
|
||||
{
|
||||
Printf("Savegame is from an incompatible version\n");
|
||||
LoadGameError("TXT_INCOMPATIBLESG");
|
||||
}
|
||||
else
|
||||
{
|
||||
Printf("Savegame is from another ZDoom-based engine: %s\n", engine.GetChars());
|
||||
LoadGameError("TXT_IOTHERENGINESG", engine.GetChars());
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (SaveVersion < MINSAVEVER || SaveVersion > SAVEVER)
|
||||
{
|
||||
Printf("Savegame is from an incompatible version");
|
||||
FString message;
|
||||
if (SaveVersion < MINSAVEVER)
|
||||
{
|
||||
Printf(": %d (%d is the oldest supported)", SaveVersion, MINSAVEVER);
|
||||
message = GStrings("TXT_TOOOLDSG");
|
||||
message.Substitute("%e", FStringf("%d", MINSAVEVER));
|
||||
}
|
||||
else
|
||||
{
|
||||
Printf(": %d (%d is the highest supported)", SaveVersion, SAVEVER);
|
||||
message = GStrings("TXT_TOONEWSG");
|
||||
message.Substitute("%e", FStringf("%d", SAVEVER));
|
||||
}
|
||||
Printf("\n");
|
||||
message.Substitute("%d", FStringf("%d", SaveVersion));
|
||||
LoadGameError(message);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1870,7 +1872,7 @@ void G_DoLoadGame ()
|
|||
|
||||
if (map.IsEmpty())
|
||||
{
|
||||
Printf("Savegame is missing the current map\n");
|
||||
LoadGameError("TXT_NOMAPSG");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1886,14 +1888,14 @@ void G_DoLoadGame ()
|
|||
info = resfile->FindLump("globals.json");
|
||||
if (info == nullptr)
|
||||
{
|
||||
Printf("'%s' is not a valid savegame: Missing 'globals.json'.\n", savename.GetChars());
|
||||
LoadGameError("TXT_NOGLOBALSJSON");
|
||||
return;
|
||||
}
|
||||
|
||||
data = info->CacheLump();
|
||||
if (!arc.OpenReader((const char *)data, info->LumpSize))
|
||||
{
|
||||
Printf("Failed to access savegame info\n");
|
||||
LoadGameError("TXT_SGINFOERR");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1959,20 +1961,19 @@ void G_SaveGame (const char *filename, const char *description)
|
|||
{
|
||||
if (sendsave || gameaction == ga_savegame)
|
||||
{
|
||||
Printf ("A game save is still pending.\n");
|
||||
return;
|
||||
Printf ("%s\n", GStrings("TXT_SAVEPENDING"));
|
||||
}
|
||||
else if (!usergame)
|
||||
{
|
||||
Printf ("not in a saveable game\n");
|
||||
Printf ("%s\n", GStrings("TXT_NOTSAVEABLE"));
|
||||
}
|
||||
else if (gamestate != GS_LEVEL)
|
||||
{
|
||||
Printf ("not in a level\n");
|
||||
Printf ("%s\n", GStrings("TXT_NOTINLEVEL"));
|
||||
}
|
||||
else if (players[consoleplayer].health <= 0 && !multiplayer)
|
||||
{
|
||||
Printf ("player is dead in a single-player game\n");
|
||||
Printf ("%s\n", GStrings("TXT_SPPLAYERDEAD"));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2291,7 +2292,7 @@ void G_DoSaveGame (bool okForQuicksave, FString filename, const char *descriptio
|
|||
if (longsavemessages) Printf ("%s (%s)\n", GStrings("GGSAVED"), filename.GetChars());
|
||||
else Printf ("%s\n", GStrings("GGSAVED"));
|
||||
}
|
||||
else Printf(PRINT_HIGH, "Save failed\n");
|
||||
else Printf(PRINT_HIGH, "%s\n", GStrings("TXT_SAVEFAILED"));
|
||||
|
||||
|
||||
BackupSaveName = filename;
|
||||
|
|
|
@ -193,6 +193,11 @@ void DPusher::Tick ()
|
|||
|
||||
if (m_Type == p_push)
|
||||
{
|
||||
if (m_Source == nullptr)
|
||||
{
|
||||
Destroy();
|
||||
return;
|
||||
}
|
||||
// Seek out all pushable things within the force radius of this
|
||||
// point pusher. Crosses sectors, so use blockmap.
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ void cht_DoMDK(player_t *player, const char *mod)
|
|||
{
|
||||
if (player->mo == NULL)
|
||||
{
|
||||
Printf("What do you want to kill outside of a game?\n");
|
||||
Printf("%s\n", GStrings("TXT_WHAT_KILL"));
|
||||
}
|
||||
else if (!deathmatch)
|
||||
{
|
||||
|
@ -94,7 +94,6 @@ void cht_DoCheat (player_t *player, int cheat)
|
|||
AActor *item;
|
||||
FString smsg;
|
||||
const char *msg = "";
|
||||
char msgbuild[32];
|
||||
int i;
|
||||
|
||||
// No cheating when not having a pawn attached.
|
||||
|
@ -204,25 +203,25 @@ void cht_DoCheat (player_t *player, int cheat)
|
|||
case CHT_NOTARGET:
|
||||
player->cheats ^= CF_NOTARGET;
|
||||
if (player->cheats & CF_NOTARGET)
|
||||
msg = "notarget ON";
|
||||
msg = GStrings("TXT_NOTARGET_ON");
|
||||
else
|
||||
msg = "notarget OFF";
|
||||
msg = GStrings("TXT_NOTARGET_OFF");
|
||||
break;
|
||||
|
||||
case CHT_ANUBIS:
|
||||
player->cheats ^= CF_FRIGHTENING;
|
||||
if (player->cheats & CF_FRIGHTENING)
|
||||
msg = "\"Quake with fear!\"";
|
||||
msg = GStrings("TXT_ANUBIS_ON");
|
||||
else
|
||||
msg = "No more ogre armor";
|
||||
msg = GStrings("TXT_ANUBIS_OFF");
|
||||
break;
|
||||
|
||||
case CHT_CHASECAM:
|
||||
player->cheats ^= CF_CHASECAM;
|
||||
if (player->cheats & CF_CHASECAM)
|
||||
msg = "chasecam ON";
|
||||
msg = GStrings("TXT_CHASECAM_ON");
|
||||
else
|
||||
msg = "chasecam OFF";
|
||||
msg = GStrings("TXT_CHASECAM_OFF");
|
||||
R_ResetViewInterpolation ();
|
||||
break;
|
||||
|
||||
|
@ -326,10 +325,18 @@ void cht_DoCheat (player_t *player, int cheat)
|
|||
{
|
||||
int killcount = primaryLevel->Massacre (cheat == CHT_MASSACRE2);
|
||||
// killough 3/22/98: make more intelligent about plural
|
||||
// Ty 03/27/98 - string(s) *not* externalized
|
||||
mysnprintf (msgbuild, countof(msgbuild), "%d %s%s Killed", killcount,
|
||||
cheat==CHT_MASSACRE2 ? "Baddie" : "Monster", killcount==1 ? "" : "s");
|
||||
msg = msgbuild;
|
||||
if (killcount == 1)
|
||||
{
|
||||
msg = GStrings(cheat == CHT_MASSACRE? "TXT_MONSTER_KILLED" : "TXT_BADDIE_KILLED");
|
||||
}
|
||||
else
|
||||
{
|
||||
// Note: Do not use the language string directly as a format template!
|
||||
smsg = GStrings(cheat == CHT_MASSACRE? "TXT_MONSTERS_KILLED" : "TXT_BADDIES_KILLED");
|
||||
FStringf countstr("%d", killcount);
|
||||
smsg.Substitute("%d", countstr);
|
||||
msg = smsg.GetChars();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -352,64 +359,64 @@ void cht_DoCheat (player_t *player, int cheat)
|
|||
{
|
||||
if (player->mo->IsKindOf("PlayerChunk"))
|
||||
{
|
||||
Printf("Unable to resurrect. Player is no longer connected to its body.\n");
|
||||
Printf("%s\n", GStrings("TXT_NO_RESURRECT"));
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
player->Resurrect();
|
||||
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case CHT_GIMMIEA:
|
||||
cht_Give (player, "ArtiInvulnerability");
|
||||
msg = "Valador's Ring of Invunerability";
|
||||
msg = GStrings("TAG_ARTIINVULNERABILITY");
|
||||
break;
|
||||
|
||||
case CHT_GIMMIEB:
|
||||
cht_Give (player, "ArtiInvisibility");
|
||||
msg = "Shadowsphere";
|
||||
msg = GStrings("TAG_ARTIINVISIBILITY");
|
||||
break;
|
||||
|
||||
case CHT_GIMMIEC:
|
||||
cht_Give (player, "ArtiHealth");
|
||||
msg = "Quartz Flask";
|
||||
msg = GStrings("TAG_ARTIHEALTH");
|
||||
break;
|
||||
|
||||
case CHT_GIMMIED:
|
||||
cht_Give (player, "ArtiSuperHealth");
|
||||
msg = "Mystic Urn";
|
||||
msg = GStrings("TAG_ARTISUPERHEALTH");
|
||||
break;
|
||||
|
||||
case CHT_GIMMIEE:
|
||||
cht_Give (player, "ArtiTomeOfPower");
|
||||
msg = "Tyketto's Tome of Power";
|
||||
msg = GStrings("TAG_ARTITOMEOFPOWER");
|
||||
break;
|
||||
|
||||
case CHT_GIMMIEF:
|
||||
cht_Give (player, "ArtiTorch");
|
||||
msg = "Torch";
|
||||
msg = GStrings("TAG_ARTITORCH");
|
||||
break;
|
||||
|
||||
case CHT_GIMMIEG:
|
||||
cht_Give (player, "ArtiTimeBomb");
|
||||
msg = "Delmintalintar's Time Bomb of the Ancients";
|
||||
msg = GStrings("TAG_ARTIFIREBOMB");
|
||||
break;
|
||||
|
||||
case CHT_GIMMIEH:
|
||||
cht_Give (player, "ArtiEgg");
|
||||
msg = "Torpol's Morph Ovum";
|
||||
msg = GStrings("TAG_ARTIEGG");
|
||||
break;
|
||||
|
||||
case CHT_GIMMIEI:
|
||||
cht_Give (player, "ArtiFly");
|
||||
msg = "Inhilicon's Wings of Wrath";
|
||||
msg = GStrings("TAG_ARTIFLY");
|
||||
break;
|
||||
|
||||
case CHT_GIMMIEJ:
|
||||
cht_Give (player, "ArtiTeleport");
|
||||
msg = "Darchala's Chaos Device";
|
||||
msg = GStrings("TAG_ARTITELEPORT");
|
||||
break;
|
||||
|
||||
case CHT_GIMMIEZ:
|
||||
|
@ -417,7 +424,7 @@ void cht_DoCheat (player_t *player, int cheat)
|
|||
{
|
||||
cht_Give (player, "artifacts");
|
||||
}
|
||||
msg = "All artifacts!";
|
||||
msg = GStrings("TAG_ALL_ARTIFACTS");
|
||||
break;
|
||||
|
||||
case CHT_TAKEWEAPS:
|
||||
|
@ -444,9 +451,10 @@ void cht_DoCheat (player_t *player, int cheat)
|
|||
break;
|
||||
|
||||
case CHT_MDK:
|
||||
if (player->mo == NULL)
|
||||
if (player->mo == nullptr)
|
||||
{
|
||||
Printf ("What do you want to kill outside of a game?\n");
|
||||
Printf ("%s\n", GStrings("TXT_WHAT_KILL"));
|
||||
return;
|
||||
}
|
||||
else if (!deathmatch)
|
||||
{
|
||||
|
@ -512,7 +520,7 @@ void cht_DoCheat (player_t *player, int cheat)
|
|||
|
||||
case CHT_CLEARFROZENPROPS:
|
||||
player->cheats &= ~(CF_FROZEN|CF_TOTALLYFROZEN);
|
||||
msg = "Frozen player properties turned off";
|
||||
msg = GStrings("TXT_NOT_FROZEN");
|
||||
break;
|
||||
|
||||
case CHT_FREEZE:
|
||||
|
@ -528,13 +536,17 @@ void cht_DoCheat (player_t *player, int cheat)
|
|||
break;
|
||||
}
|
||||
|
||||
if (!*msg) // [SO] Don't print blank lines!
|
||||
if (!msg || !*msg) // [SO] Don't print blank lines!
|
||||
return;
|
||||
|
||||
if (player == &players[consoleplayer])
|
||||
Printf ("%s\n", msg);
|
||||
else if (cheat != CHT_CHASECAM)
|
||||
Printf ("%s cheats: %s\n", player->userinfo.GetName(), msg);
|
||||
{
|
||||
FString message = GStrings("TXT_X_CHEATS");
|
||||
message.Substitute("%s", player->userinfo.GetName());
|
||||
Printf("%s: %s\n", message.GetChars(), msg);
|
||||
}
|
||||
}
|
||||
|
||||
FString cht_Morph(player_t *player, PClassActor *morphclass, bool quickundo)
|
||||
|
|
|
@ -65,6 +65,7 @@
|
|||
#include "gi.h"
|
||||
|
||||
#include "gameconfigfile.h"
|
||||
#include "gstrings.h"
|
||||
|
||||
FGameConfigFile *GameConfig;
|
||||
|
||||
|
@ -511,7 +512,7 @@ void WritePNGfile (FileWriter *file, const uint8_t *buffer, const PalEntry *pale
|
|||
!M_AppendPNGText (file, "Software", software) ||
|
||||
!M_FinishPNG (file))
|
||||
{
|
||||
Printf ("Could not create screenshot.\n");
|
||||
Printf ("%s\n", GStrings("TXT_SCREENSHOTERR"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
#include "scripting/types.h"
|
||||
|
||||
int DMenu::InMenu;
|
||||
static ScaleOverrider *CurrentScaleOverrider;
|
||||
//
|
||||
// Todo: Move these elsewhere
|
||||
//
|
||||
|
@ -348,7 +349,7 @@ bool DMenu::TranslateKeyboardEvents()
|
|||
//
|
||||
//=============================================================================
|
||||
|
||||
void M_StartControlPanel (bool makeSound)
|
||||
void M_StartControlPanel (bool makeSound, bool scaleoverride)
|
||||
{
|
||||
// intro might call this repeatedly
|
||||
if (CurrentMenu != nullptr)
|
||||
|
@ -372,6 +373,8 @@ void M_StartControlPanel (bool makeSound)
|
|||
}
|
||||
BackbuttonTime = 0;
|
||||
BackbuttonAlpha = 0;
|
||||
if (scaleoverride && !CurrentScaleOverrider) CurrentScaleOverrider = new ScaleOverrider;
|
||||
else if (!scaleoverride && CurrentScaleOverrider) delete CurrentScaleOverrider;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
|
@ -912,6 +915,8 @@ void M_ClearMenus()
|
|||
CurrentMenu = parent;
|
||||
}
|
||||
menuactive = MENU_Off;
|
||||
if (CurrentScaleOverrider) delete CurrentScaleOverrider;
|
||||
CurrentScaleOverrider = nullptr;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
|
|
|
@ -347,7 +347,7 @@ void M_PreviousMenu ();
|
|||
void M_ParseMenuDefs();
|
||||
void M_StartupEpisodeMenu(FGameStartup *gs);
|
||||
void M_StartupSkillMenu(FGameStartup *gs);
|
||||
void M_StartControlPanel (bool makeSound);
|
||||
void M_StartControlPanel (bool makeSound, bool scaleoverride = true);
|
||||
void M_SetMenu(FName menu, int param = -1);
|
||||
void M_StartMessage(const char *message, int messagemode, FName action = NAME_None);
|
||||
DMenu *StartPickerMenu(DMenu *parent, const char *name, FColorCVar *cvar);
|
||||
|
|
|
@ -381,6 +381,7 @@ void P_StartConversation (AActor *npc, AActor *pc, bool facetalker, bool saveang
|
|||
I_SetMusicVolume (dlg_musicvolume);
|
||||
S_Sound (npc, CHAN_VOICE|CHAN_NOPAUSE, CurNode->SpeakerVoice, 1, ATTN_NORM);
|
||||
}
|
||||
M_StartControlPanel(false, true);
|
||||
|
||||
// Create the menu. This may be a user-defined class so check if it is good to use.
|
||||
FName cls = CurNode->MenuClassName;
|
||||
|
@ -405,7 +406,6 @@ void P_StartConversation (AActor *npc, AActor *pc, bool facetalker, bool saveang
|
|||
}
|
||||
|
||||
// And open the menu
|
||||
M_StartControlPanel (false);
|
||||
M_ActivateMenu((DMenu*)cmenu);
|
||||
menuactive = MENU_OnNoPause;
|
||||
}
|
||||
|
|
|
@ -156,9 +156,9 @@ void DFrameBuffer::DrawRateStuff ()
|
|||
int textScale = active_con_scale();
|
||||
|
||||
chars = mysnprintf (fpsbuff, countof(fpsbuff), "%2llu ms (%3llu fps)", (unsigned long long)howlong, (unsigned long long)LastCount);
|
||||
rate_x = Width / textScale - ConFont->StringWidth(&fpsbuff[0]);
|
||||
Clear (rate_x * textScale, 0, Width, ConFont->GetHeight() * textScale, GPalette.BlackIndex, 0);
|
||||
DrawText (ConFont, CR_WHITE, rate_x, 0, (char *)&fpsbuff[0],
|
||||
rate_x = Width / textScale - NewConsoleFont->StringWidth(&fpsbuff[0]);
|
||||
Clear (rate_x * textScale, 0, Width, NewConsoleFont->GetHeight() * textScale, GPalette.BlackIndex, 0);
|
||||
DrawText (NewConsoleFont, CR_WHITE, rate_x, 0, (char *)&fpsbuff[0],
|
||||
DTA_VirtualWidth, screen->GetWidth() / textScale,
|
||||
DTA_VirtualHeight, screen->GetHeight() / textScale,
|
||||
DTA_KeepRatio, true, TAG_DONE);
|
||||
|
|
|
@ -436,7 +436,7 @@ class PoisonCloud : Actor
|
|||
Mass 0x7fffffff;
|
||||
+NOBLOCKMAP +NOGRAVITY +DROPOFF
|
||||
+NODAMAGETHRUST
|
||||
+DONTSPLASH +FOILINVUL +CANBLAST +BLOODLESSIMPACT +BLOCKEDBYSOLIDACTORS +FORCEZERORADIUSDMG
|
||||
+DONTSPLASH +FOILINVUL +CANBLAST +BLOODLESSIMPACT +BLOCKEDBYSOLIDACTORS +FORCEZERORADIUSDMG +OLDRADIUSDMG
|
||||
RenderStyle "Translucent";
|
||||
Alpha 0.6;
|
||||
DeathSound "PoisonShroomDeath";
|
||||
|
|
|
@ -49,9 +49,6 @@ extend class PlayerPawn
|
|||
Class<Inventory> type;
|
||||
let player = self.player;
|
||||
|
||||
if (PlayerNumber() != consoleplayer)
|
||||
A_Log(String.Format ("%s is a cheater: give %s\n", player.GetUserName(), name));
|
||||
|
||||
if (player.mo == NULL || player.health <= 0)
|
||||
{
|
||||
return;
|
||||
|
|
|
@ -82,6 +82,7 @@ class ConversationMenu : Menu
|
|||
PlayerInfo mPlayer;
|
||||
int mSelection;
|
||||
int ConversationPauseTic;
|
||||
int LineHeight;
|
||||
|
||||
int SpeechWidth;
|
||||
int ReplyWidth;
|
||||
|
@ -107,6 +108,7 @@ class ConversationMenu : Menu
|
|||
|
||||
ReplyWidth = 320-50-10;
|
||||
SpeechWidth = screen.GetWidth()/CleanXfac - 24*2;
|
||||
LineHeight = SmallFont.GetHeight();
|
||||
|
||||
FormatSpeakerMessage();
|
||||
return FormatReplies(activereply);
|
||||
|
@ -174,8 +176,8 @@ class ConversationMenu : Menu
|
|||
mResponseLines.Push(goodbyestr);
|
||||
|
||||
// Determine where the top of the reply list should be positioned.
|
||||
mYpos = MIN (140, 192 - mResponseLines.Size() * OptionMenuSettings.mLinespacing);
|
||||
i = 44 + mResponseLines.Size() * OptionMenuSettings.mLinespacing;
|
||||
mYpos = MIN (140, 192 - mResponseLines.Size() * LineHeight);
|
||||
i = 44 + mResponseLines.Size() * LineHeight;
|
||||
if (mYpos - 100 < i - screen.GetHeight() / CleanYfac / 2)
|
||||
{
|
||||
mYpos = i - screen.GetHeight() / CleanYfac / 2 + 100;
|
||||
|
@ -305,7 +307,7 @@ class ConversationMenu : Menu
|
|||
override bool MouseEvent(int type, int x, int y)
|
||||
{
|
||||
int sel = -1;
|
||||
int fh = OptionMenuSettings.mLinespacing;
|
||||
int fh = LineHeight;
|
||||
|
||||
// convert x/y from screen to virtual coordinates, according to CleanX/Yfac use in DrawTexture
|
||||
x = ((x - (screen.GetWidth() / 2)) / CleanXfac) + 160;
|
||||
|
@ -382,7 +384,7 @@ class ConversationMenu : Menu
|
|||
virtual void DrawSpeakerText(bool dimbg)
|
||||
{
|
||||
String speakerName;
|
||||
int linesize = OptionMenuSettings.mLinespacing * CleanYfac;
|
||||
int linesize = LineHeight * CleanYfac;
|
||||
int cnt = mDialogueLines.Count();
|
||||
|
||||
// Who is talking to you?
|
||||
|
@ -434,10 +436,10 @@ class ConversationMenu : Menu
|
|||
{
|
||||
// Dim the screen behind the PC's choices.
|
||||
screen.Dim(0, 0.45, (24 - 160) * CleanXfac + screen.GetWidth() / 2, (mYpos - 2 - 100) * CleanYfac + screen.GetHeight() / 2,
|
||||
272 * CleanXfac, MIN(mResponseLines.Size() * OptionMenuSettings.mLinespacing + 4, 200 - mYpos) * CleanYfac);
|
||||
272 * CleanXfac, MIN(mResponseLines.Size() * LineHeight + 4, 200 - mYpos) * CleanYfac);
|
||||
|
||||
int y = mYpos;
|
||||
int fontheight = OptionMenuSettings.mLinespacing;
|
||||
int fontheight = LineHeight;
|
||||
|
||||
int response = 0;
|
||||
for (int i = 0; i < mResponseLines.Size(); i++)
|
||||
|
|
|
@ -285,7 +285,7 @@ class Menu : Object native ui version("2.4")
|
|||
|
||||
static void DrawConText (int color, int x, int y, String str)
|
||||
{
|
||||
screen.DrawText (ConFont, color, x, y, str, DTA_CellX, 8 * CleanXfac, DTA_CellY, 8 * CleanYfac);
|
||||
screen.DrawText (ConFont, color, x, y, str, DTA_CellX, 16 * CleanXfac_1, DTA_CellY, 16 * CleanYfac_1);
|
||||
}
|
||||
|
||||
static int OptionColor(int color)
|
||||
|
|
|
@ -744,13 +744,13 @@ class OptionMenuSliderBase : OptionMenuItem
|
|||
if (!mSliderShort)
|
||||
{
|
||||
Menu.DrawConText(Font.CR_WHITE, x, cy, "\x10\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x12");
|
||||
Menu.DrawConText(Font.FindFontColor(gameinfo.mSliderColor), x + int((5 + ((ccur * 78) / range)) * CleanXfac_1), cy, "\x13");
|
||||
Menu.DrawConText(Font.FindFontColor(gameinfo.mSliderColor), x + int((5 + ((ccur * 78) / range)) * 2 * CleanXfac_1), cy, "\x13");
|
||||
}
|
||||
else
|
||||
{
|
||||
// On 320x200 we need a shorter slider
|
||||
Menu.DrawConText(Font.CR_WHITE, x, cy, "\x10\x11\x11\x11\x11\x11\x12");
|
||||
Menu.DrawConText(Font.FindFontColor(gameinfo.mSliderColor), x + int((5 + ((ccur * 38) / range)) * CleanXfac_1), cy, "\x13");
|
||||
Menu.DrawConText(Font.FindFontColor(gameinfo.mSliderColor), x + int((5 + ((ccur * 38) / range)) * 2 * CleanXfac_1), cy, "\x13");
|
||||
right -= 5*8*CleanXfac;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue