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

racing mode More...

#include "hyper.h"

Classes

struct  hr::racing::race_cellinfo
 
struct  hr::racing::ghostmoment
 
struct  hr::racing::ghost
 
struct  hr::racing::hr_track_failure
 

Namespaces

 hr
 

Typedefs

typedef unsigned char hr::racing::uchar
 
typedef map< eLand, vector< ghost > > hr::racing::raceset
 

Functions

void hr::racing::set_race_configurer ()
 
EX void hr::racing::apply_seed ()
 
uchar hr::racing::frac_to_uchar (ld x)
 
uchar hr::racing::angle_to_uchar (ld x)
 
ld hr::racing::uchar_to_frac (uchar x)
 
transmatrix hr::racing::spin_uchar (uchar x)
 
raceset & hr::racing::ghostset ()
 
raceset & hr::racing::oghostset ()
 
int hr::racing::get_score_in_land (eLand l)
 
string hr::racing::ghost_filename (string seed, modecode_t mcode)
 
void hr::racing::hread (hstream &hs, ghostmoment &m)
 
void hr::racing::hwrite (hstream &hs, const ghostmoment &m)
 
void hr::racing::hread (hstream &hs, ghost &gh)
 
void hr::racing::hwrite (hstream &hs, const ghost &gh)
 
bool hr::racing::read_ghosts (string seed, modecode_t mcode)
 
void hr::racing::write_ghosts (string seed, int mcode)
 
transmatrix hr::racing::get_ghostmoment_matrix (ghostmoment &p)
 
void hr::racing::fix_cave (cell *c)
 
bool hr::racing::keep_to_crossroads ()
 
bool hr::racing::bad (cell *c2, cell *c)
 
int hr::racing::rcelldist (cell *c)
 
int hr::racing::pcelldist (cell *c)
 
int hr::racing::trackval (cell *c)
 
void hr::racing::tie_info (cell *c, int from_track, int comp)
 
race_cellinfo & hr::racing::get_info (cell *c)
 
void hr::racing::find_track (cell *start, int sign, int len)
 
EX void hr::racing::block_cells (vector< cell * > to_block, function< bool(cell *)> blockbound)
 
EX void hr::racing::make_bounded_track (cell *s)
 
EX void hr::racing::generate_track ()
 
EX bool hr::racing::force_standard_centering ()
 
EX bool hr::racing::use_standard_centering ()
 
EX bool hr::racing::set_view ()
 
void hr::racing::show ()
 
int hr::racing::readArgs ()
 
EX string hr::racing::racetimeformat (int t)
 
void hr::racing::track_chooser (string new_track)
 
void hr::racing::race_projection ()
 
EX void hr::racing::thurston_racing ()
 
void hr::racing::raceconfigurer ()
 
EX void hr::racing::configure_race ()
 
void hr::racing::uploadScore ()
 
EX void hr::racing::displayScore (eLand l)
 
EX void hr::racing::race_won ()
 
void hr::racing::draw_ghost_at (ghost &ghost, cell *w, const transmatrix &V, ghostmoment &p)
 
bool hr::racing::ghost_finished (ghost &ghost)
 
ghostmoment & hr::racing::get_ghostmoment (ghost &ghost)
 
void hr::racing::draw_ghost (ghost &ghost)
 
transmatrix hr::racing::racerel (ld rel)
 
EX int hr::racing::get_percentage (cell *c)
 
EX int hr::racing::get_percentage (int i)
 
void hr::racing::draw_ghost_state (ghost &ghost)
 
EX void hr::racing::drawStats ()
 
EX void hr::racing::markers ()
 
EX void hr::racing::add_debug (cell *c)
 

Variables

EX bool hr::racing::guiding = false
 
EX bool hr::racing::on
 
EX bool hr::racing::player_relative = false
 
EX bool hr::racing::standard_centering = false
 
EX bool hr::racing::track_ready
 
bool hr::racing::official_race = false
 
int hr::racing::TWIDTH
 
EX ld hr::racing::race_advance = 0
 
EX int hr::racing::ghosts_to_show = 5
 
EX int hr::racing::ghosts_to_save = 10
 
vector< race_cellinfo > hr::racing::rti
 
EX vector< cell * > hr::racing::track
 
map< cell *, int > hr::racing::rti_id
 
EX int hr::racing::trophy [MAXPLAYER]
 
EX string hr::racing::track_code = "OFFICIAL"
 
transmatrix hr::racing::straight
 
int hr::racing::race_try
 
EX int hr::racing::race_start_tick
 
EX int hr::racing::race_finish_tick [MAXPLAYER]
 
map< pair< string, modecode_t >, raceset > hr::racing::race_ghosts
 
map< pair< string, modecode_t >, raceset > hr::racing::official_race_ghosts
 
array< vector< ghostmoment >, MAXPLAYER > hr::racing::current_history
 
string hr::racing::ghost_prefix = "default"
 
int hr::racing::race_checksum
 
ld hr::racing::start_line_width
 
int hr::racing::length
 
bool hr::racing::use_exhaustive_distance
 
EX bool hr::racing::bounded_track
 
bool hr::racing::inrec = false
 
EX ld hr::racing::race_angle = 90
 
int hr::racing::tstart
 
int hr::racing::tstop
 
heptspin hr::racing::sview
 
auto hr::racing::hook
 
EX vector< eLand > hr::racing::race_lands
 
vector< string > hr::racing::playercmds_race
 
int hr::racing::playercfg
 
bool hr::racing::editing_track
 
string hr::racing::new_track
 
bool hr::racing::alternate = false
 
auto hr::racing::hooks1
 
map< string, map< eLand, int > > hr::racing::scoreboard
 

Detailed Description

racing mode

Variable Documentation

◆ hook

auto hr::racing::hook
Initial value:
=
addHook(hooks_args, 100, readArgs)
+ addHook(clearmemory, 0, []() {
track_ready = false;
track.clear();
rti.clear();
rti_id.clear();
for(auto &ch: current_history) ch.clear();
})

◆ race_lands

EX vector<eLand> hr::racing::race_lands
Initial value:
= {
laHunting,
laCrossroads,
laJungle,
laDesert,
laRedRock,
laDragon,
laMirror,
laRuins,
laCaves,
laWildWest,
laIce,
laHell,
laTerracotta,
laElementalWall,
laDryForest,
laDeadCaves,
laAsteroids
}

◆ playercmds_race

vector<string> hr::racing::playercmds_race
Initial value:
= {
"forward", "backward", "turn left", "turn right",
"forward", "backward", "turn left", "turn right",
"", "", "",
"", "change camera", "", ""
}

◆ hooks1

auto hr::racing::hooks1
Initial value:
=
addHook(hooks_o_key, 90, [] {
if(racing::on) { set_race_configurer(); return named_dialog(XLAT("racing menu"), raceconfigurer); }
else return named_functionality();
})
hr::XLAT
string XLAT(string)
Definition: language.cpp:319