HyperRogue  11.3d
game/visualization engine based on non-Euclidean geometry
Namespaces | Macros | Functions | Variables
commandline.cpp File Reference

Commandline options support. More...

#include "hyper.h"

Namespaces

 hr
 

Macros

#define PHASE(x)   { if(arg::curphase > x) arg::phaseerror(x); else if(arg::curphase < x) return 2; }
 
#define PHASEFROM(x)   { if(arg::curphase < x) return 2; }
 
#define TOGGLE(x, param, act)
 

Functions

EX eLand hr::arg::readland (const string &ss)
 
EX eItem hr::arg::readItem (const string &ss)
 
EX eMonster hr::arg::readMonster (const string &ss)
 
EX void hr::initializeCLI ()
 
EX void hr::arg::lshift ()
 
EX void hr::arg::unshift ()
 
EX void hr::arg::shift ()
 
EX bool hr::arg::nomore ()
 
const EX string & hr::arg::args ()
 
const EX char * hr::arg::argcs ()
 
EX int hr::arg::argi ()
 
EX unsigned hr::arg::arghex ()
 
EX ld hr::arg::argf ()
 
EX bool hr::arg::argis (const string &s)
 
EX void hr::arg::shift_arg_formula (ld &x, const reaction_t &r IS(reaction_t()))
 
EX void hr::arg::cheat ()
 
EX void hr::arg::init (int argc, char **argv)
 
EX void hr::arg::phaseerror (int x)
 
EX void hr::arg::launch_dialog (const reaction_t &r IS(reaction_t()))
 
EX int hr::arg::readCommon ()
 
EX int hr::arg::readLocal ()
 
EX void hr::arg::read (int phase)
 

Variables

const EX char * hr::scorefile = "hyperrogue.log"
 
EX int hr::arg::curphase
 
EX vector< string > hr::arg::argument
 
EX int hr::arg::pos
 
bool hr::arg::dialog_launched = false
 
EX purehookset hr::hooks_config
 
EX hookset< int()> * hr::hooks_args
 
auto hr::arg::ah = addHook(hooks_args, 0, readCommon)
 

Detailed Description

Commandline options support.

Macro Definition Documentation

◆ TOGGLE

#define TOGGLE (   x,
  param,
  act 
)
Value:
else if(args()[0] == '-' && args()[1] == x && !args()[2]) { PHASEFROM(2); showstartmenu = false; act; } \
else if(args()[0] == '-' && args()[1] == x && args()[2] == '1') { PHASEFROM(2); showstartmenu = false; if(!param) act; } \
else if(args()[0] == '-' && args()[1] == x && args()[2] == '0') { PHASEFROM(2); showstartmenu = false; if(param) act; }