mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-04-22 15:47:19 +00:00
added MakeScreenShot and MakeAutoSave functions to FLevelLocals
# Conflicts: # src/g_game.h # wadsrc/static/zscript/base.zs
This commit is contained in:
parent
9ef338282d
commit
c147990452
5 changed files with 29 additions and 4 deletions
|
@ -130,6 +130,7 @@ CVAR (Bool, storesavepic, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
|||
CVAR (Bool, longsavemessages, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
CVAR (String, save_dir, "", CVAR_ARCHIVE|CVAR_GLOBALCONFIG);
|
||||
CVAR (Bool, cl_waitforsave, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG);
|
||||
CVAR (Bool, enablescriptscreenshot, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG);
|
||||
EXTERN_CVAR (Float, con_midtime);
|
||||
|
||||
//==========================================================================
|
||||
|
@ -1741,7 +1742,7 @@ void G_DoPlayerPop(int playernum)
|
|||
players[playernum].DestroyPSprites();
|
||||
}
|
||||
|
||||
void G_ScreenShot (char *filename)
|
||||
void G_ScreenShot (const char *filename)
|
||||
{
|
||||
shotfile = filename;
|
||||
gameaction = ga_screenshot;
|
||||
|
@ -2902,6 +2903,26 @@ DEFINE_ACTION_FUNCTION(FLevelLocals, StartSlideshow)
|
|||
return 0;
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(FLevelLocals, MakeScreenShot)
|
||||
{
|
||||
if (enablescriptscreenshot)
|
||||
{
|
||||
G_ScreenShot("");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void G_MakeAutoSave()
|
||||
{
|
||||
gameaction = ga_autosave;
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(FLevelLocals, MakeAutoSave)
|
||||
{
|
||||
G_MakeAutoSave();
|
||||
return 0;
|
||||
}
|
||||
|
||||
DEFINE_GLOBAL(players)
|
||||
DEFINE_GLOBAL(playeringame)
|
||||
DEFINE_GLOBAL(PlayerClasses)
|
||||
|
|
|
@ -72,7 +72,7 @@ void G_WorldDone (void);
|
|||
void G_Ticker (void);
|
||||
bool G_Responder (event_t* ev);
|
||||
|
||||
void G_ScreenShot (char *filename);
|
||||
void G_ScreenShot (const char* filename);
|
||||
void G_StartSlideshow(FName whichone);
|
||||
|
||||
FString G_BuildSaveName (const char *prefix, int slot);
|
||||
|
|
|
@ -1981,7 +1981,8 @@ MISCMNU_QUERYIWAD = "Show IWAD selection dialog";
|
|||
MISCMNU_ALLCHEATS = "Enable cheats from all games";
|
||||
MISCMNU_ENABLEAUTOSAVES = "Enable autosaves";
|
||||
MISCMNU_AUTOSAVECOUNT = "Number of autosaves";
|
||||
MISCMNU_SAVELOADCONFIRMATION = "Save/Load confirmation";
|
||||
MISCMNU_SAVELOADCONFIRMATION = "Save/Load confirmation";
|
||||
MISCMNU_ENABLESCRIPTSCREENSHOTS = "Enable making screenshots by scripts";
|
||||
MISCMNU_DEHLOAD = "Load *.deh/*.bex lumps";
|
||||
MISCMNU_CACHENODES = "Cache nodes";
|
||||
MISCMNU_CACHETIME = "Time threshold for node caching";
|
||||
|
|
|
@ -1102,9 +1102,10 @@ OptionMenu "MiscOptions" protected
|
|||
StaticText " "
|
||||
Option "$MISCMNU_ALLCHEATS", "allcheats", "OnOff"
|
||||
Option "$MISCMNU_ENABLEAUTOSAVES", "disableautosave", "Autosave"
|
||||
Option "$MISCMNU_SAVELOADCONFIRMATION", "saveloadconfirmation", "OnOff"
|
||||
Option "$MISCMNU_SAVELOADCONFIRMATION", "saveloadconfirmation", "OnOff"
|
||||
Slider "$MISCMNU_AUTOSAVECOUNT", "autosavecount", 1, 20, 1, 0
|
||||
Option "$MISCMNU_DEHLOAD", "dehload", "dehopt"
|
||||
Option "$MISCMNU_ENABLESCRIPTSCREENSHOTS", "enablescriptscreenshot", "OnOff"
|
||||
Option "$MISCMNU_INTERSCROLL", "nointerscrollabort", "OffOn"
|
||||
StaticText " "
|
||||
Option "$MISCMNU_CACHENODES", "gl_cachenodes", "OnOff"
|
||||
|
|
|
@ -685,6 +685,8 @@ struct LevelLocals native
|
|||
native play int ExecuteSpecial(int special, Actor activator, line linedef, bool lineside, int arg1 = 0, int arg2 = 0, int arg3 = 0, int arg4 = 0, int arg5 = 0);
|
||||
native static void GiveSecret(Actor activator, bool printmsg = true, bool playsound = true);
|
||||
native static void StartSlideshow(Name whichone = 'none');
|
||||
native static void MakeScreenShot();
|
||||
native static void MakeAutoSave();
|
||||
native void WorldDone();
|
||||
native static void RemoveAllBots(bool fromlist);
|
||||
native static Vector2 GetAutomapPosition();
|
||||
|
|
Loading…
Reference in a new issue