mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
- consolidation of exit and quit CCMDs.
This commit is contained in:
parent
59fce59a26
commit
250fa0b847
5 changed files with 24 additions and 313 deletions
|
@ -47,14 +47,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
|
||||
BEGIN_BLD_NS
|
||||
|
||||
static inline int osdcmd_quit(osdcmdptr_t UNUSED(parm))
|
||||
{
|
||||
UNREFERENCED_CONST_PARAMETER(parm);
|
||||
OSD_ShowDisplay(0);
|
||||
QuitGame();
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int osdcmd_changelevel(osdcmdptr_t parm)
|
||||
{
|
||||
int32_t volume,level;
|
||||
|
@ -509,72 +501,24 @@ int32_t registerosdcommands(void)
|
|||
OSD_RegisterFunction("changelevel","changelevel <volume> <level>: warps to the given level", osdcmd_changelevel);
|
||||
OSD_RegisterFunction("map","map <mapfile>: loads the given user map", osdcmd_map);
|
||||
OSD_RegisterFunction("demo","demo <demofile or demonum>: starts the given demo", osdcmd_demo);
|
||||
// }
|
||||
//
|
||||
// OSD_RegisterFunction("cmenu","cmenu <#>: jumps to menu", osdcmd_cmenu);
|
||||
OSD_RegisterFunction("crosshaircolor","crosshaircolor: changes the crosshair color", osdcmd_crosshaircolor);
|
||||
OSD_RegisterFunction("crosshairreset", "crosshairreset: restores the original crosshair", osdcmd_resetcrosshair);
|
||||
|
||||
OSD_RegisterFunction("give","give <all|health|weapons|ammo|armor|keys|inventory>: gives requested item", osdcmd_give);
|
||||
OSD_RegisterFunction("god","god: toggles god mode", osdcmd_god);
|
||||
// OSD_RegisterFunction("activatecheat","activatecheat <id>: activates a cheat code", osdcmd_activatecheat);
|
||||
//
|
||||
//#ifdef DEBUGGINGAIDS
|
||||
// OSD_RegisterFunction("inittimer","debug", osdcmd_inittimer);
|
||||
//#endif
|
||||
//#if !defined NETCODE_DISABLE
|
||||
// OSD_RegisterFunction("kick","kick <id>: kicks a multiplayer client. See listplayers.", osdcmd_kick);
|
||||
// OSD_RegisterFunction("kickban","kickban <id>: kicks a multiplayer client and prevents them from reconnecting. See listplayers.", osdcmd_kickban);
|
||||
//
|
||||
// OSD_RegisterFunction("listplayers","listplayers: lists currently connected multiplayer clients", osdcmd_listplayers);
|
||||
//#endif
|
||||
OSD_RegisterFunction("music","music E<ep>L<lev>: change music", osdcmd_music);
|
||||
//
|
||||
//#if !defined NETCODE_DISABLE
|
||||
// OSD_RegisterFunction("name","name: change your multiplayer nickname", osdcmd_name);
|
||||
//#endif
|
||||
//
|
||||
OSD_RegisterFunction("noclip","noclip: toggles clipping mode", osdcmd_noclip);
|
||||
//
|
||||
//#if !defined NETCODE_DISABLE
|
||||
// OSD_RegisterFunction("password","password: sets multiplayer game password", osdcmd_password);
|
||||
//#endif
|
||||
//
|
||||
// OSD_RegisterFunction("printtimes", "printtimes: prints VM timing statistics", osdcmd_printtimes);
|
||||
//
|
||||
// OSD_RegisterFunction("purgesaves", "purgesaves: deletes obsolete and unreadable save files", osdcmd_purgesaves);
|
||||
//
|
||||
OSD_RegisterFunction("quicksave","quicksave: performs a quick save", osdcmd_quicksave);
|
||||
OSD_RegisterFunction("quickload","quickload: performs a quick load", osdcmd_quickload);
|
||||
OSD_RegisterFunction("quit","quit: exits the game immediately", osdcmd_quit);
|
||||
OSD_RegisterFunction("exit","exit: exits the game immediately", osdcmd_quit);
|
||||
//
|
||||
// OSD_RegisterFunction("restartmap", "restartmap: restarts the current map", osdcmd_restartmap);
|
||||
OSD_RegisterFunction("restartsound","restartsound: reinitializes the sound system",osdcmd_restartsound);
|
||||
OSD_RegisterFunction("restartsound","restartsound: reinitializes the sound system",osdcmd_restartsound);
|
||||
OSD_RegisterFunction("restartvid","restartvid: reinitializes the video mode",osdcmd_restartvid);
|
||||
//#if !defined LUNATIC
|
||||
// OSD_RegisterFunction("addlogvar","addlogvar <gamevar>: prints the value of a gamevar", osdcmd_addlogvar);
|
||||
// OSD_RegisterFunction("setvar","setvar <gamevar> <value>: sets the value of a gamevar", osdcmd_setvar);
|
||||
// OSD_RegisterFunction("setvarvar","setvarvar <gamevar1> <gamevar2>: sets the value of <gamevar1> to <gamevar2>", osdcmd_setvar);
|
||||
// OSD_RegisterFunction("setactorvar","setactorvar <actor#> <gamevar> <value>: sets the value of <actor#>'s <gamevar> to <value>", osdcmd_setactorvar);
|
||||
//#else
|
||||
// OSD_RegisterFunction("lua", "lua \"Lua code...\": runs Lunatic code", osdcmd_lua);
|
||||
//#endif
|
||||
OSD_RegisterFunction("screenshot","screenshot [format]: takes a screenshot.", osdcmd_screenshot);
|
||||
//
|
||||
// OSD_RegisterFunction("spawn","spawn <picnum> [palnum] [cstat] [ang] [x y z]: spawns a sprite with the given properties",osdcmd_spawn);
|
||||
|
||||
OSD_RegisterFunction("unbound", NULL, osdcmd_unbound);
|
||||
|
||||
OSD_RegisterFunction("vidmode","vidmode <xdim> <ydim> <bpp> <fullscreen>: change the video mode",osdcmd_vidmode);
|
||||
#ifdef USE_OPENGL
|
||||
baselayer_osdcmd_vidmode_func = osdcmd_vidmode;
|
||||
#endif
|
||||
//
|
||||
//#ifndef NETCODE_DISABLE
|
||||
// OSD_RegisterFunction("dumpmapstates", "Dumps current snapshots to CL/Srv_MapStates.bin", osdcmd_dumpmapstate);
|
||||
// OSD_RegisterFunction("playerinfo", "Prints information about the current player", osdcmd_playerinfo);
|
||||
//#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ enum rendmode_t {
|
|||
|
||||
#define MAXVOXMIPS 5
|
||||
|
||||
#if !defined GEKKO && !defined __OPENDINGUX__
|
||||
|
||||
# define MAXSECTORS MAXSECTORSV8
|
||||
# define MAXWALLS MAXWALLSV8
|
||||
# define MAXSPRITES MAXSPRITESV8
|
||||
|
@ -66,39 +66,9 @@ enum rendmode_t {
|
|||
// additional space beyond wall, in walltypes:
|
||||
# define M32_FIXME_WALLS 512
|
||||
# define M32_FIXME_SECTORS 2
|
||||
#else
|
||||
# define MAXSECTORS MAXSECTORSV7
|
||||
# define MAXWALLS MAXWALLSV7
|
||||
# define MAXSPRITES MAXSPRITESV7
|
||||
|
||||
#ifdef GEKKO
|
||||
# define MAXXDIM 860
|
||||
# define MAXYDIM 490
|
||||
# else
|
||||
# define MAXXDIM 320
|
||||
# define MAXYDIM 200
|
||||
# endif
|
||||
|
||||
# define MINXDIM MAXXDIM
|
||||
# define MINYDIM MAXYDIM
|
||||
# define M32_FIXME_WALLS 0
|
||||
# define M32_FIXME_SECTORS 0
|
||||
#endif
|
||||
|
||||
#ifdef LUNATIC
|
||||
# define NEW_MAP_FORMAT
|
||||
// A marker for LuaJIT C function callbacks, but not merely:
|
||||
# define LUNATIC_CB ATTRIBUTE((used))
|
||||
// Used for variables and functions referenced from Lua:
|
||||
# define LUNATIC_EXTERN ATTRIBUTE((used))
|
||||
# define LUNATIC_FASTCALL
|
||||
#else
|
||||
# ifdef NEW_MAP_FORMAT
|
||||
# error "New map format can only be used with Lunatic"
|
||||
# endif
|
||||
# define LUNATIC_EXTERN static
|
||||
# define LUNATIC_FASTCALL __fastcall
|
||||
#endif
|
||||
|
||||
#define MAXWALLSB ((MAXWALLS>>2)+(MAXWALLS>>3))
|
||||
|
||||
|
@ -150,34 +120,25 @@ enum rendmode_t {
|
|||
#define YAX_CEILING 0 // don't change!
|
||||
#define YAX_FLOOR 1 // don't change!
|
||||
|
||||
# ifdef NEW_MAP_FORMAT
|
||||
# define YAX_MAXBUNCHES 512
|
||||
# define YAX_BIT__COMPAT 1024
|
||||
# define YAX_NEXTWALLBIT__COMPAT(Cf) (1<<(10+Cf))
|
||||
# define YAX_NEXTWALLBITS__COMPAT (YAX_NEXTWALLBIT__COMPAT(0)|YAX_NEXTWALLBIT__COMPAT(1))
|
||||
# else
|
||||
|
||||
# define YAX_MAXBUNCHES 256
|
||||
# define YAX_BIT 1024
|
||||
// "has next wall when constrained"-bit (1<<10: ceiling, 1<<11: floor)
|
||||
# define YAX_NEXTWALLBIT(Cf) (1<<(10+Cf))
|
||||
# define YAX_NEXTWALLBITS (YAX_NEXTWALLBIT(0)|YAX_NEXTWALLBIT(1))
|
||||
# endif
|
||||
|
||||
|
||||
int32_t get_alwaysshowgray(void); // editor only
|
||||
void yax_updategrays(int32_t posze);
|
||||
|
||||
#ifdef YAX_ENABLE
|
||||
# ifdef NEW_MAP_FORMAT
|
||||
// New map format -- no hijacking of otherwise used members.
|
||||
# define YAX_PTRNEXTWALL(Ptr, Wall, Cf) (*(&Ptr[Wall].upwall + Cf))
|
||||
# define YAX_NEXTWALLDEFAULT(Cf) (-1)
|
||||
# else
|
||||
|
||||
// More user tag hijacking: lotag/extra. :/
|
||||
# define YAX_PTRNEXTWALL(Ptr, Wall, Cf) (*(int16_t *)(&Ptr[Wall].lotag + (playing_blood ? 1 : 2)*Cf))
|
||||
# define YAX_NEXTWALLDEFAULT(Cf) (playing_blood ? 0 : ((Cf)==YAX_CEILING) ? 0 : -1)
|
||||
extern int16_t yax_bunchnum[MAXSECTORS][2];
|
||||
extern int16_t yax_nextwall[MAXWALLS][2];
|
||||
# endif
|
||||
|
||||
|
||||
# define YAX_NEXTWALL(Wall, Cf) YAX_PTRNEXTWALL(wall, Wall, Cf)
|
||||
|
||||
|
@ -190,9 +151,7 @@ void yax_updategrays(int32_t posze);
|
|||
|
||||
extern int32_t r_tror_nomaskpass;
|
||||
|
||||
# ifdef NEW_MAP_FORMAT
|
||||
// Moved below declarations of sector, wall, sprite.
|
||||
# else
|
||||
|
||||
int16_t yax_getbunch(int16_t i, int16_t cf);
|
||||
static FORCE_INLINE void yax_getbunches(int16_t i, int16_t *cb, int16_t *fb)
|
||||
{
|
||||
|
@ -201,7 +160,7 @@ static FORCE_INLINE void yax_getbunches(int16_t i, int16_t *cb, int16_t *fb)
|
|||
}
|
||||
int16_t yax_getnextwall(int16_t wal, int16_t cf);
|
||||
void yax_setnextwall(int16_t wal, int16_t cf, int16_t thenextwall);
|
||||
# endif
|
||||
|
||||
|
||||
void yax_setbunch(int16_t i, int16_t cf, int16_t bunchnum);
|
||||
void yax_setbunches(int16_t i, int16_t cb, int16_t fb);
|
||||
|
@ -364,156 +323,6 @@ EDUKE32_STATIC_ASSERT(sizeof(sectortype) == sizeof(usectortype));
|
|||
EDUKE32_STATIC_ASSERT(sizeof(walltype) == sizeof(uwalltype));
|
||||
EDUKE32_STATIC_ASSERT(sizeof(spritetype) == sizeof(uspritetype));
|
||||
|
||||
#ifdef NEW_MAP_FORMAT
|
||||
|
||||
# define SECTORVX_SZ1 offsetof(sectortypevx, ceilingpicnum)
|
||||
# define SECTORVX_SZ4 sizeof(sectortypevx)-offsetof(sectortypevx, visibility)
|
||||
|
||||
static inline void copy_v7_from_vx_sector(usectortypev7 *v7sec, const sectortypevx *vxsec)
|
||||
{
|
||||
/* [wallptr..wallnum] */
|
||||
Bmemcpy(v7sec, vxsec, SECTORVX_SZ1);
|
||||
|
||||
/* ceiling* */
|
||||
v7sec->ceilingpicnum = vxsec->ceilingpicnum;
|
||||
v7sec->ceilingheinum = vxsec->ceilingheinum;
|
||||
v7sec->ceilingstat = vxsec->ceilingstat;
|
||||
v7sec->ceilingz = vxsec->ceilingz;
|
||||
v7sec->ceilingshade = vxsec->ceilingshade;
|
||||
v7sec->ceilingpal = vxsec->ceilingpal;
|
||||
v7sec->ceilingxpanning = vxsec->ceilingxpanning;
|
||||
v7sec->ceilingypanning = vxsec->ceilingypanning;
|
||||
|
||||
/* floor* */
|
||||
v7sec->floorpicnum = vxsec->floorpicnum;
|
||||
v7sec->floorheinum = vxsec->floorheinum;
|
||||
v7sec->floorstat = vxsec->floorstat;
|
||||
v7sec->floorz = vxsec->floorz;
|
||||
v7sec->floorshade = vxsec->floorshade;
|
||||
v7sec->floorpal = vxsec->floorpal;
|
||||
v7sec->floorxpanning = vxsec->floorxpanning;
|
||||
v7sec->floorypanning = vxsec->floorypanning;
|
||||
|
||||
/* [visibility..extra] */
|
||||
Bmemcpy(&v7sec->visibility, &vxsec->visibility, SECTORVX_SZ4);
|
||||
|
||||
/* Clear YAX_BIT of ceiling and floor. (New-map format build saves TROR
|
||||
* maps as map-text.) */
|
||||
v7sec->ceilingstat &= ~YAX_BIT__COMPAT;
|
||||
v7sec->floorstat &= ~YAX_BIT__COMPAT;
|
||||
}
|
||||
|
||||
static inline void inplace_vx_from_v7_sector(sectortypevx *vxsec)
|
||||
{
|
||||
const sectortypev7 *v7sec = (sectortypev7 *)vxsec;
|
||||
usectortypev7 bakv7sec;
|
||||
|
||||
// Can't do this in-place since the members were rearranged.
|
||||
Bmemcpy(&bakv7sec, v7sec, sizeof(sectortypev7));
|
||||
|
||||
/* [wallptr..wallnum] is already at the right place */
|
||||
|
||||
/* ceiling* */
|
||||
vxsec->ceilingpicnum = bakv7sec.ceilingpicnum;
|
||||
vxsec->ceilingheinum = bakv7sec.ceilingheinum;
|
||||
vxsec->ceilingstat = bakv7sec.ceilingstat;
|
||||
vxsec->ceilingz = bakv7sec.ceilingz;
|
||||
vxsec->ceilingshade = bakv7sec.ceilingshade;
|
||||
vxsec->ceilingpal = bakv7sec.ceilingpal;
|
||||
vxsec->ceilingxpanning = bakv7sec.ceilingxpanning;
|
||||
vxsec->ceilingypanning = bakv7sec.ceilingypanning;
|
||||
|
||||
/* floor* */
|
||||
vxsec->floorpicnum = bakv7sec.floorpicnum;
|
||||
vxsec->floorheinum = bakv7sec.floorheinum;
|
||||
vxsec->floorstat = bakv7sec.floorstat;
|
||||
vxsec->floorz = bakv7sec.floorz;
|
||||
vxsec->floorshade = bakv7sec.floorshade;
|
||||
vxsec->floorpal = bakv7sec.floorpal;
|
||||
vxsec->floorxpanning = bakv7sec.floorxpanning;
|
||||
vxsec->floorypanning = bakv7sec.floorypanning;
|
||||
|
||||
/* [visibility..extra] */
|
||||
Bmemmove(&vxsec->visibility, &bakv7sec.visibility, SECTORVX_SZ4);
|
||||
}
|
||||
|
||||
static inline void inplace_vx_tweak_sector(sectortypevx *vxsec, int32_t yaxp)
|
||||
{
|
||||
if (yaxp)
|
||||
{
|
||||
int32_t cisext = (vxsec->ceilingstat&YAX_BIT__COMPAT);
|
||||
int32_t fisext = (vxsec->floorstat&YAX_BIT__COMPAT);
|
||||
|
||||
vxsec->ceilingbunch = cisext ? vxsec->ceilingxpanning : -1;
|
||||
vxsec->floorbunch = fisext ? vxsec->floorxpanning : -1;
|
||||
|
||||
if (cisext)
|
||||
vxsec->ceilingxpanning = 0;
|
||||
if (fisext)
|
||||
vxsec->floorxpanning = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
vxsec->ceilingbunch = vxsec->floorbunch = -1;
|
||||
}
|
||||
|
||||
/* Clear YAX_BIT of ceiling and floor (map-int VX doesn't use it). */
|
||||
vxsec->ceilingstat &= ~YAX_BIT__COMPAT;
|
||||
vxsec->floorstat &= ~YAX_BIT__COMPAT;
|
||||
}
|
||||
|
||||
# undef SECTORVX_SZ1
|
||||
# undef SECTORVX_SZ4
|
||||
|
||||
# define WALLVX_SZ2 offsetof(walltypevx, blend)-offsetof(walltypevx, cstat)
|
||||
|
||||
static inline void copy_v7_from_vx_wall(uwalltypev7 *v7wal, const walltypevx *vxwal)
|
||||
{
|
||||
/* [x..nextsector] */
|
||||
Bmemcpy(v7wal, vxwal, offsetof(walltypevx, upwall));
|
||||
/* [cstat..extra] */
|
||||
Bmemcpy(&v7wal->cstat, &vxwal->cstat, WALLVX_SZ2);
|
||||
/* Clear YAX_NEXTWALLBITS. */
|
||||
v7wal->cstat &= ~YAX_NEXTWALLBITS__COMPAT;
|
||||
}
|
||||
|
||||
static inline void inplace_vx_from_v7_wall(walltypevx *vxwal)
|
||||
{
|
||||
const walltypev7 *v7wal = (walltypev7 *)vxwal;
|
||||
|
||||
/* [cstat..extra] */
|
||||
Bmemmove(&vxwal->cstat, &v7wal->cstat, WALLVX_SZ2);
|
||||
|
||||
vxwal->blend = vxwal->filler_ = 0;
|
||||
}
|
||||
|
||||
static inline void inplace_vx_tweak_wall(walltypevx *vxwal, int32_t yaxp)
|
||||
{
|
||||
if (yaxp)
|
||||
{
|
||||
int32_t haveupwall = (vxwal->cstat & YAX_NEXTWALLBIT__COMPAT(YAX_CEILING));
|
||||
int32_t havednwall = (vxwal->cstat & YAX_NEXTWALLBIT__COMPAT(YAX_FLOOR));
|
||||
|
||||
vxwal->upwall = haveupwall ? vxwal->lotag : -1;
|
||||
vxwal->dnwall = havednwall ? vxwal->extra : -1;
|
||||
|
||||
if (haveupwall)
|
||||
vxwal->lotag = 0;
|
||||
if (havednwall)
|
||||
vxwal->extra = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
vxwal->upwall = vxwal->dnwall = -1;
|
||||
}
|
||||
|
||||
/* Clear YAX_NEXTWALLBITS (map-int VX doesn't use it). */
|
||||
vxwal->cstat &= ~YAX_NEXTWALLBITS__COMPAT;
|
||||
}
|
||||
|
||||
# undef WALLVX_SZ2
|
||||
|
||||
#endif
|
||||
|
||||
#include "clip.h"
|
||||
|
||||
|
@ -607,28 +416,7 @@ EXTERN uint32_t wallchanged[MAXWALLS + M32_FIXME_WALLS];
|
|||
EXTERN uint32_t spritechanged[MAXSPRITES];
|
||||
#endif
|
||||
|
||||
#ifdef NEW_MAP_FORMAT
|
||||
static FORCE_INLINE int16_t yax_getbunch(int16_t i, int16_t cf)
|
||||
{
|
||||
return cf ? sector[i].floorbunch : sector[i].ceilingbunch;
|
||||
}
|
||||
|
||||
static FORCE_INLINE void yax_getbunches(int16_t i, int16_t *cb, int16_t *fb)
|
||||
{
|
||||
*cb = yax_getbunch(i, YAX_CEILING);
|
||||
*fb = yax_getbunch(i, YAX_FLOOR);
|
||||
}
|
||||
|
||||
static FORCE_INLINE int16_t yax_getnextwall(int16_t wal, int16_t cf)
|
||||
{
|
||||
return cf ? wall[wal].dnwall : wall[wal].upwall;
|
||||
}
|
||||
|
||||
static FORCE_INLINE void yax_setnextwall(int16_t wal, int16_t cf, int16_t thenextwall)
|
||||
{
|
||||
YAX_NEXTWALL(wal, cf) = thenextwall;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef USE_STRUCT_TRACKERS
|
||||
static FORCE_INLINE void sector_tracker_hook__(intptr_t const address)
|
||||
|
@ -996,7 +784,7 @@ typedef struct {
|
|||
typedef struct artheader_t {
|
||||
int32_t tilestart, tileend, numtiles;
|
||||
} artheader_t;
|
||||
#define ARTv1_UNITOFFSET 24 // using siseof does not work because picanm_t is not the in-file format.
|
||||
#define ARTv1_UNITOFFSET 24 // using sizeof does not work because picanm_t is not the in-file format.
|
||||
|
||||
int32_t enginePreInit(void); // a partial setup of the engine used for launch windows
|
||||
int32_t engineInit(void);
|
||||
|
|
|
@ -110,6 +110,14 @@ const char * OSD_StripColors(char *outBuf, const char *inBuf)
|
|||
return ptr;
|
||||
}
|
||||
|
||||
static inline int osdcmd_quit(osdcmdptr_t UNUSED(parm))
|
||||
{
|
||||
UNREFERENCED_CONST_PARAMETER(parm);
|
||||
throw ExitEvent(0);
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
|
||||
int OSD_Exec(const char *szScript)
|
||||
{
|
||||
int err = 0;
|
||||
|
@ -552,8 +560,10 @@ void OSD_Init(void)
|
|||
OSD_RegisterFunction("bind", R"(bind <key> <string>: associates a keypress with a string of console input. Type "bind showkeys" for a list of keys and "listsymbols" for a list of valid console commands.)", osdcmd_bind);
|
||||
OSD_RegisterFunction("unbind", "unbind <key>: unbinds a key", osdcmd_unbind);
|
||||
OSD_RegisterFunction("unbindall", "unbindall: unbinds all keys", osdcmd_unbindall);
|
||||
|
||||
// atexit(OSD_Cleanup);
|
||||
OSD_RegisterFunction("quit", "quit: exits the game immediately", osdcmd_quit);
|
||||
OSD_RegisterFunction("exit", "exit: exits the game immediately", osdcmd_quit);
|
||||
OSD_RegisterFunction("changelevel", "changelevel <level>: warps to the given level", osdcmd_changelevel);
|
||||
// atexit(OSD_Cleanup);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -39,20 +39,12 @@ BEGIN_DUKE_NS
|
|||
|
||||
struct osdcmd_cheatsinfo osdcmd_cheatsinfo_stat = { -1, 0, 0 };
|
||||
|
||||
static inline int osdcmd_quit(osdcmdptr_t UNUSED(parm))
|
||||
{
|
||||
UNREFERENCED_CONST_PARAMETER(parm);
|
||||
OSD_ShowDisplay(0);
|
||||
G_GameQuit();
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int osdcmd_changelevel(osdcmdptr_t parm)
|
||||
{
|
||||
int32_t volume=0,level;
|
||||
char *p;
|
||||
|
||||
if (!VOLUMEONE)
|
||||
if ((g_gameType & GAMEFLAG_DUKE) && (g_gameType & GAMEFLAG_SHAREWARE))
|
||||
{
|
||||
if (parm->numparms != 2) return OSDCMD_SHOWHELP;
|
||||
|
||||
|
@ -1143,11 +1135,9 @@ int32_t registerosdcommands(void)
|
|||
OSD_RegisterFunction("playerinfo", "Prints information about the current player", osdcmd_playerinfo);
|
||||
#endif
|
||||
|
||||
if (VOLUMEONE)
|
||||
OSD_RegisterFunction("changelevel","changelevel <level>: warps to the given level", osdcmd_changelevel);
|
||||
if (!VOLUMEONE)
|
||||
else
|
||||
{
|
||||
OSD_RegisterFunction("changelevel","changelevel <volume> <level>: warps to the given level", osdcmd_changelevel);
|
||||
OSD_RegisterFunction("map","map <mapfile>: loads the given user map", osdcmd_map);
|
||||
OSD_RegisterFunction("demo","demo <demofile or demonum>: starts the given demo", osdcmd_demo);
|
||||
}
|
||||
|
@ -1159,9 +1149,6 @@ int32_t registerosdcommands(void)
|
|||
OSD_RegisterFunction("god","god: toggles god mode", osdcmd_god);
|
||||
OSD_RegisterFunction("activatecheat","activatecheat <id>: activates a cheat code", osdcmd_activatecheat);
|
||||
|
||||
#ifdef DEBUGGINGAIDS
|
||||
OSD_RegisterFunction("inittimer","debug", osdcmd_inittimer);
|
||||
#endif
|
||||
OSD_RegisterFunction("music","music E<ep>L<lev>: change music", osdcmd_music);
|
||||
|
||||
OSD_RegisterFunction("noclip","noclip: toggles clipping mode", osdcmd_noclip);
|
||||
|
@ -1173,20 +1160,14 @@ int32_t registerosdcommands(void)
|
|||
|
||||
OSD_RegisterFunction("quicksave","quicksave: performs a quick save", osdcmd_quicksave);
|
||||
OSD_RegisterFunction("quickload","quickload: performs a quick load", osdcmd_quickload);
|
||||
OSD_RegisterFunction("quit","quit: exits the game immediately", osdcmd_quit);
|
||||
OSD_RegisterFunction("exit","exit: exits the game immediately", osdcmd_quit);
|
||||
|
||||
OSD_RegisterFunction("restartmap", "restartmap: restarts the current map", osdcmd_restartmap);
|
||||
OSD_RegisterFunction("restartsound","restartsound: reinitializes the sound system",osdcmd_restartsound);
|
||||
OSD_RegisterFunction("restartvid","restartvid: reinitializes the video mode",osdcmd_restartvid);
|
||||
#if !defined LUNATIC
|
||||
OSD_RegisterFunction("addlogvar","addlogvar <gamevar>: prints the value of a gamevar", osdcmd_addlogvar);
|
||||
OSD_RegisterFunction("setvar","setvar <gamevar> <value>: sets the value of a gamevar", osdcmd_setvar);
|
||||
OSD_RegisterFunction("setvarvar","setvarvar <gamevar1> <gamevar2>: sets the value of <gamevar1> to <gamevar2>", osdcmd_setvar);
|
||||
OSD_RegisterFunction("setactorvar","setactorvar <actor#> <gamevar> <value>: sets the value of <actor#>'s <gamevar> to <value>", osdcmd_setactorvar);
|
||||
#else
|
||||
OSD_RegisterFunction("lua", "lua \"Lua code...\": runs Lunatic code", osdcmd_lua);
|
||||
#endif
|
||||
OSD_RegisterFunction("screenshot","screenshot [format]: takes a screenshot.", osdcmd_screenshot);
|
||||
|
||||
OSD_RegisterFunction("spawn","spawn <picnum> [palnum] [cstat] [ang] [x y z]: spawns a sprite with the given properties",osdcmd_spawn);
|
||||
|
|
|
@ -34,14 +34,6 @@ BEGIN_RR_NS
|
|||
|
||||
struct osdcmd_cheatsinfo osdcmd_cheatsinfo_stat = { -1, 0, 0 };
|
||||
|
||||
static inline int osdcmd_quit(osdcmdptr_t UNUSED(parm))
|
||||
{
|
||||
UNREFERENCED_CONST_PARAMETER(parm);
|
||||
OSD_ShowDisplay(0);
|
||||
G_GameQuit();
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int osdcmd_changelevel(osdcmdptr_t parm)
|
||||
{
|
||||
int32_t volume=0,level;
|
||||
|
@ -923,11 +915,9 @@ static int osdcmd_printtimes(osdcmdptr_t UNUSED(parm))
|
|||
int32_t registerosdcommands(void)
|
||||
{
|
||||
|
||||
if (VOLUMEONE)
|
||||
OSD_RegisterFunction("changelevel","changelevel <level>: warps to the given level", osdcmd_changelevel);
|
||||
if (!VOLUMEONE)
|
||||
else
|
||||
{
|
||||
OSD_RegisterFunction("changelevel","changelevel <volume> <level>: warps to the given level", osdcmd_changelevel);
|
||||
OSD_RegisterFunction("map","map <mapfile>: loads the given user map", osdcmd_map);
|
||||
OSD_RegisterFunction("demo","demo <demofile or demonum>: starts the given demo", osdcmd_demo);
|
||||
}
|
||||
|
@ -967,8 +957,6 @@ int32_t registerosdcommands(void)
|
|||
|
||||
OSD_RegisterFunction("quicksave","quicksave: performs a quick save", osdcmd_quicksave);
|
||||
OSD_RegisterFunction("quickload","quickload: performs a quick load", osdcmd_quickload);
|
||||
OSD_RegisterFunction("quit","quit: exits the game immediately", osdcmd_quit);
|
||||
OSD_RegisterFunction("exit","exit: exits the game immediately", osdcmd_quit);
|
||||
|
||||
OSD_RegisterFunction("restartmap", "restartmap: restarts the current map", osdcmd_restartmap);
|
||||
OSD_RegisterFunction("restartsound","restartsound: reinitializes the sound system",osdcmd_restartsound);
|
||||
|
|
Loading…
Reference in a new issue