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

multiplayer features, also input configuration More...

#include "hyper.h"

Classes

struct  hr::multi::config
 
struct  hr::multi::key_configurer
 
struct  hr::multi::joy_configurer
 
struct  hr::multi::shmup_configurer
 

Namespaces

 hr
 

Macros

#define SHMUPAXES_BASE   4
 
#define SHMUPAXES   ((SHMUPAXES_BASE) + 4 * (MAXPLAYER))
 
#define SHMUPAXES_CUR   ((SHMUPAXES_BASE) + 4 * playercfg)
 
#define SCJOY   16
 
#define NUMACT   128
 

Enumerations

enum  pcmds {
  pcForward, pcBackward, pcTurnLeft, pcTurnRight,
  pcMoveUp, pcMoveRight, pcMoveDown, pcMoveLeft,
  pcFire, pcFace, pcFaceFire, pcDrop,
  pcCenter, pcOrbPower, pcOrbKey
}
 

Functions

EX void hr::multi::recall ()
 
string hr::multi::listkeys (int id)
 
string hr::multi::dsc (int id)
 
EX void hr::multi::resetScores ()
 
void hr::multi::handleConfig (int sym, int uni)
 
EX string hr::multi::player_count_name (int p)
 
EX reaction_t hr::multi::get_key_configurer (int sc, vector< string > &sct)
 
EX void hr::multi::configure ()
 
EX void hr::multi::showConfigureMultiplayer ()
 
void hr::multi::pressaction (int id)
 
EX bool hr::multi::notremapped (int sym)
 
EX void hr::multi::initConfig ()
 
EX void hr::multi::handleInput (int delta)
 
EX void hr::multi::leaveGame (int i)
 
EX bool hr::multi::playerActive (int p)
 
EX int hr::multi::activePlayers ()
 
EX cell * hr::multi::multiPlayerTarget (int i)
 
EX void hr::multi::checklastmove ()
 
EX void hr::multi::handleMulti (int delta)
 
EX void hr::multi::mousemovement (cell *c)
 

Variables

EX config hr::multi::scfg
 
EX charstyle hr::multi::scs [MAXPLAYER]
 
EX int hr::multi::players = 1
 
EX cellwalker hr::multi::player [MAXPLAYER]
 
EX vector< int > hr::multi::revive_queue
 
EX cell * hr::multi::origpos [MAXPLAYER]
 
EX cell * hr::multi::origtarget [MAXPLAYER]
 
EX bool hr::multi::flipped [MAXPLAYER]
 
EX int hr::multi::treasures [MAXPLAYER]
 
EX int hr::multi::kills [MAXPLAYER]
 
EX int hr::multi::deaths [MAXPLAYER]
 
EX bool hr::multi::alwaysuse = false
 
EX transmatrix hr::multi::whereis [MAXPLAYER]
 
EX transmatrix hr::multi::crosscenter [MAXPLAYER]
 
EX double hr::multi::ccdist [MAXPLAYER]
 
EX cell * hr::multi::ccat [MAXPLAYER]
 
bool hr::multi::combo [MAXPLAYER]
 
EX int hr::multi::cpid
 
EX int hr::multi::cpid_edit
 
EX movedir hr::multi::whereto [MAXPLAYER]
 
EX double hr::multi::mdx [MAXPLAYER]
 
EX double hr::multi::mdy [MAXPLAYER]
 
vector< string > hr::multi::playercmds_shmup
 
vector< string > hr::multi::playercmds_shmup3
 
vector< string > hr::multi::playercmds_turn
 
vector< string > hr::multi::pancmds
 
vector< string > hr::multi::pancmds3
 
const char * hr::multi::axemodes [SHMUPAXES]
 
const char * hr::multi::axemodes3 [4]
 
EX int hr::multi::centerplayer = -1
 
char * hr::multi::axeconfigs [24]
 
int hr::multi::numaxeconfigs
 
int * hr::multi::dzconfigs [24]
 
bool hr::multi::configdead
 
EX int hr::multi::actionspressed [NUMACT]
 
EX int hr::multi::axespressed [SHMUPAXES]
 
EX int hr::multi::lactionpressed [NUMACT]
 
EX int hr::multi::tableid [7] = {1, 2, 4, 5, 6, 7, 8}
 
bool hr::multi::needinput = true
 

Detailed Description

multiplayer features, also input configuration

running several games at once – used in the Tutorial and Dual Geometry mode

Variable Documentation

◆ playercmds_shmup

vector<string> hr::multi::playercmds_shmup
Initial value:
= {
"forward", "backward", "turn left", "turn right",
"move up", "move right", "move down", "move left",
"throw a knife", "face the pointer", "throw at the pointer",
"drop Dead Orb", "center the map on me", "Orb power (target: mouse)",
"Orb power (target: facing)"
}

◆ playercmds_shmup3

vector<string> hr::multi::playercmds_shmup3
Initial value:
= {
"rotate up", "rotate down", "rotate left", "rotate right",
"move forward", "strafe right", "move backward", "strafe left",
"throw a knife", "face the pointer", "throw at the pointer",
"drop Dead Orb", "center the map on me", "Orb power (target: mouse)",
"Orb power (target: facing)"
}

◆ playercmds_turn

vector<string> hr::multi::playercmds_turn
Initial value:
= {
"move up-right", "move up-left", "move down-right", "move down-left",
"move up", "move right", "move down", "move left",
"stay in place (left + right)", "cancel move", "leave the game",
"drop Dead Orb (up + down)", "center the map on me", "",
""
}

◆ pancmds

vector<string> hr::multi::pancmds
Initial value:
= {
"pan up", "pan right", "pan down", "pan left",
"rotate left", "rotate right", "home",
"world overview", "review your quest", "inventory", "main menu"
}

◆ pancmds3

vector<string> hr::multi::pancmds3
Initial value:
= {
"look up", "look right", "look down", "look left",
"rotate left", "rotate right", "home",
"world overview", "review your quest", "inventory", "main menu",
"scroll forward", "scroll backward"
}

◆ axemodes3

const char* hr::multi::axemodes3[4]
Initial value:
= {
"do nothing",
"camera forward",
"camera rotate X",
"camera rotate Y"
}