added #include hyper.h to all cpp files

This commit is contained in:
Zeno Rogue 2019-09-05 09:15:40 +02:00
parent 19a54cfa9d
commit 9647cbd47e
82 changed files with 85 additions and 6 deletions

View File

@ -5,6 +5,7 @@
* \brief This file contains the routines to convert HyperRogue's old vector graphics into 3D models * \brief This file contains the routines to convert HyperRogue's old vector graphics into 3D models
*/ */
#include "hyper.h"
#include "earcut.hpp" #include "earcut.hpp"
namespace hr { namespace hr {

View File

@ -7,6 +7,7 @@
* This routines are general, i.e., not necessarily Steam-specific. * This routines are general, i.e., not necessarily Steam-specific.
*/ */
#include "hyper.h"
namespace hr { namespace hr {
#define NUMLEADER 82 #define NUMLEADER 82

View File

@ -7,6 +7,7 @@
* These are tilings available in the 'Archimedean' option in Geometry Experiments; simpler Archimedean tilings are defined in other files. * These are tilings available in the 'Archimedean' option in Geometry Experiments; simpler Archimedean tilings are defined in other files.
*/ */
#include "hyper.h"
namespace hr { namespace hr {
EX namespace arcm { EX namespace arcm {

View File

@ -5,6 +5,7 @@
* \brief This file implements routines related to barriers (Great Walls and similar). * \brief This file implements routines related to barriers (Great Walls and similar).
*/ */
#include "hyper.h"
namespace hr { namespace hr {
EX bool checkBarriersFront(cellwalker bb, int q IS(5), bool cross IS(false)) { EX bool checkBarriersFront(cellwalker bb, int q IS(5), bool cross IS(false)) {

View File

@ -5,6 +5,7 @@
* \brief This file implements the basic graphical routines * \brief This file implements the basic graphical routines
*/ */
#include "hyper.h"
namespace hr { namespace hr {
EX int fontscale = 100; EX int fontscale = 100;

View File

@ -12,10 +12,11 @@
* This routines are general, i.e., not necessarily Steam-specific. * This routines are general, i.e., not necessarily Steam-specific.
*/ */
// horocycles #include "hyper.h"
namespace hr { namespace hr {
// horocycles
EX int newRoundTableRadius() { EX int newRoundTableRadius() {
return 28 + 2 * items[itHolyGrail]; return 28 + 2 * items[itHolyGrail];
} }

View File

@ -5,6 +5,7 @@
* \brief Binary tilings in 2D and 3D * \brief Binary tilings in 2D and 3D
*/ */
#include "hyper.h"
namespace hr { namespace hr {
EX namespace binary { EX namespace binary {

View File

@ -5,6 +5,7 @@
* \brief special graphical effects, such as the Blizzard and arrow traps * \brief special graphical effects, such as the Blizzard and arrow traps
*/ */
#include "hyper.h"
namespace hr { namespace hr {
struct snowball { struct snowball {

View File

@ -7,6 +7,7 @@
* Start with locations.cpp * Start with locations.cpp
*/ */
#include "hyper.h"
namespace hr { namespace hr {
#if HDR #if HDR

View File

@ -7,6 +7,7 @@
* See content.cpp for actual items, monsters, walls and lands. * See content.cpp for actual items, monsters, walls and lands.
*/ */
#include "hyper.h"
namespace hr { namespace hr {
// --- help --- // --- help ---

View File

@ -5,6 +5,7 @@
* \brief Commandline options support * \brief Commandline options support
*/ */
#include "hyper.h"
namespace hr { namespace hr {
#if CAP_COMMANDLINE #if CAP_COMMANDLINE

View File

@ -7,6 +7,7 @@
* Includes: whirlwind, whirlpool, elec, princess, clearing, mirror, hive, heat + livecaves, etc. * Includes: whirlwind, whirlpool, elec, princess, clearing, mirror, hive, heat + livecaves, etc.
*/ */
#include "hyper.h"
namespace hr { namespace hr {
EX namespace whirlwind { EX namespace whirlwind {

View File

@ -7,6 +7,7 @@
* Includes: Brownian, Irradiated, Free Fall * Includes: Brownian, Irradiated, Free Fall
*/ */
#include "hyper.h"
#ifdef CAP_COMPLEX2 #ifdef CAP_COMPLEX2
namespace hr { namespace hr {

View File

@ -5,6 +5,7 @@
* \brief Configuration -- initial settings, saving/loading ini files, menus, etc. * \brief Configuration -- initial settings, saving/loading ini files, menus, etc.
*/ */
#include "hyper.h"
namespace hr { namespace hr {
#if HDR #if HDR

View File

@ -8,7 +8,6 @@
* Old things are sorted according to type, but this is not necessary for new content. * Old things are sorted according to type, but this is not necessary for new content.
*/ */
#ifndef MONSTER #ifndef MONSTER
#define MONSTER(a,b,c,d,e,f,g,h) #define MONSTER(a,b,c,d,e,f,g,h)
#endif #endif

View File

@ -5,6 +5,7 @@
* \brief Routines related to controlling the game * \brief Routines related to controlling the game
*/ */
#include "hyper.h"
namespace hr { namespace hr {
int frames; int frames;

View File

@ -5,6 +5,7 @@
* \brief Multi-dimensional (aka crystal) geometries. * \brief Multi-dimensional (aka crystal) geometries.
*/ */
#include "hyper.h"
namespace hr { namespace hr {
EX namespace crystal { EX namespace crystal {

View File

@ -5,6 +5,7 @@
* \brief Debugging and cheating * \brief Debugging and cheating
*/ */
#include "hyper.h"
namespace hr { namespace hr {
EX int steplimit = 0; EX int steplimit = 0;

View File

@ -5,6 +5,7 @@
* \brief Implementation of various generic dialogs and elements of dialog windows * \brief Implementation of various generic dialogs and elements of dialog windows
*/ */
#include "hyper.h"
namespace hr { namespace hr {
EX const char* COLORBAR = "###"; EX const char* COLORBAR = "###";

View File

@ -5,6 +5,7 @@
* \brief Rendering shapes (dqi_draw), queue of shapes to render (ptds), etc. * \brief Rendering shapes (dqi_draw), queue of shapes to render (ptds), etc.
*/ */
#include "hyper.h"
namespace hr { namespace hr {
#if HDR #if HDR

View File

@ -5,6 +5,7 @@
* \brief Euclidean geometry, including 2D, 3D, and quotient spaces * \brief Euclidean geometry, including 2D, 3D, and quotient spaces
*/ */
#include "hyper.h"
namespace hr { namespace hr {
// 2D Euclidean space // 2D Euclidean space

View File

@ -8,6 +8,7 @@
* Screens which display this exponential growth (e.g. 'size of the world' in geometry experiments) are also implemented here. * Screens which display this exponential growth (e.g. 'size of the world' in geometry experiments) are also implemented here.
*/ */
#include "hyper.h"
namespace hr { namespace hr {
int subtype(cell *c) { int subtype(cell *c) {

View File

@ -5,6 +5,7 @@
* \brief Field Quotient geometry * \brief Field Quotient geometry
*/ */
#include "hyper.h"
#if CAP_FIELD #if CAP_FIELD
namespace hr { namespace hr {

View File

@ -6,6 +6,7 @@
* \brief Implementation of various simple flags for lands, items, monsters, and walls. * \brief Implementation of various simple flags for lands, items, monsters, and walls.
*/ */
#include "hyper.h"
namespace hr { namespace hr {
const flagtype& classflag(eItem it) { return iinf[it].flags; } const flagtype& classflag(eItem it) { return iinf[it].flags; }

View File

@ -6,6 +6,7 @@
* \brief Adjusting the floor shapes to various geometries. * \brief Adjusting the floor shapes to various geometries.
*/ */
#include "hyper.h"
namespace hr { namespace hr {
#if CAP_SHAPES #if CAP_SHAPES

View File

@ -5,6 +5,7 @@
* \brief Routines for game itself: movement of PC and monsters, basic mechanics, etc. * \brief Routines for game itself: movement of PC and monsters, basic mechanics, etc.
*/ */
#include "hyper.h"
namespace hr { namespace hr {
#if HDR #if HDR

View File

@ -7,6 +7,7 @@
* Implementation of this menu, and computation of the statistics shown there * Implementation of this menu, and computation of the statistics shown there
*/ */
#include "hyper.h"
namespace hr { namespace hr {
int eupage = 0; int eupage = 0;

View File

@ -5,6 +5,7 @@
* \brief Calculation of basic, and less basic, constants in each geometry * \brief Calculation of basic, and less basic, constants in each geometry
*/ */
#include "hyper.h"
namespace hr { namespace hr {
#if HDR #if HDR

View File

@ -5,6 +5,7 @@
* \brief Matrices to transform between coordinates of various cells, coordinates of cell corners, etc. * \brief Matrices to transform between coordinates of various cells, coordinates of cell corners, etc.
*/ */
#include "hyper.h"
namespace hr { namespace hr {
transmatrix &ggmatrix(cell *c); transmatrix &ggmatrix(cell *c);

View File

@ -7,6 +7,7 @@
* This is generally not used for standard pure and bitruncated tilings, even though they are technically Goldberg too. * This is generally not used for standard pure and bitruncated tilings, even though they are technically Goldberg too.
*/ */
#include "hyper.h"
namespace hr { namespace hr {
EX namespace gp { EX namespace gp {

View File

@ -5,6 +5,7 @@
* \brief Drawing cells, monsters, items, etc. * \brief Drawing cells, monsters, items, etc.
*/ */
#include "hyper.h"
namespace hr { namespace hr {
int last_firelimit, firelimit; int last_firelimit, firelimit;

View File

@ -5,6 +5,7 @@
* \brief Building and displaying help text * \brief Building and displaying help text
*/ */
#include "hyper.h"
namespace hr { namespace hr {
EX string help; EX string help;

View File

@ -7,6 +7,7 @@
* Start with locations.cpp * Start with locations.cpp
*/ */
#include "hyper.h"
namespace hr { namespace hr {
#define MIRR(x) x.mirrored #define MIRR(x) x.mirrored

View File

@ -5,6 +5,7 @@
* \brief Implementation of the history mode, including the long band and long spiral. * \brief Implementation of the history mode, including the long band and long spiral.
*/ */
#include "hyper.h"
namespace hr { namespace hr {
#if CAP_SDL #if CAP_SDL

View File

@ -5,6 +5,7 @@
* \brief Routines related to displaying various things, and writing them to console and files. Nicer than the standard C++ streams. * \brief Routines related to displaying various things, and writing them to console and files. Nicer than the standard C++ streams.
*/ */
#include "hyper.h"
namespace hr { namespace hr {
EX FILE *debugfile; EX FILE *debugfile;

View File

@ -5,6 +5,7 @@
* \brief Heads-Up display: items collected, monsters killed, radar, etc. * \brief Heads-Up display: items collected, monsters killed, radar, etc.
*/ */
#include "hyper.h"
namespace hr { namespace hr {
#if HDR #if HDR

View File

@ -19,6 +19,7 @@
* \brief the hyper_main function * \brief the hyper_main function
*/ */
#include "hyper.h"
#if CU_HYPER #if CU_HYPER
#if ISLINUX #if ISLINUX

View File

@ -9,6 +9,7 @@
* For nonisotropic geometries, it rather refers to nonisotropic.cpp. * For nonisotropic geometries, it rather refers to nonisotropic.cpp.
*/ */
#include "hyper.h"
namespace hr { namespace hr {
#if HDR #if HDR

View File

@ -5,6 +5,7 @@
* \brief mapping hyperpoints to the screen, and related functions * \brief mapping hyperpoints to the screen, and related functions
*/ */
#include "hyper.h"
namespace hr { namespace hr {
ld ghx, ghy, ghgx, ghgy; ld ghx, ghy, ghgx, ghgy;

View File

@ -5,6 +5,7 @@
* \brief Orb Strategy Mode * \brief Orb Strategy Mode
*/ */
#include "hyper.h"
namespace hr { namespace hr {
EX namespace inv { EX namespace inv {

View File

@ -5,6 +5,7 @@
* \brief Irregular (Voronoi) tilings * \brief Irregular (Voronoi) tilings
*/ */
#include "hyper.h"
namespace hr { namespace hr {
EX namespace irr { EX namespace irr {

View File

@ -7,6 +7,7 @@
* See also bigstuff.cpp (for larger structures) and complex.cpp (for more complex land generation) * See also bigstuff.cpp (for larger structures) and complex.cpp (for more complex land generation)
*/ */
#include "hyper.h"
namespace hr { namespace hr {
// land generation routines // land generation routines

View File

@ -5,6 +5,7 @@
* \brief unlocking lands, which lands could be found beyond the wall, validity of various lands depending on the settings * \brief unlocking lands, which lands could be found beyond the wall, validity of various lands depending on the settings
*/ */
#include "hyper.h"
namespace hr { namespace hr {
EX bool nodisplay(eMonster m) { EX bool nodisplay(eMonster m) {

View File

@ -7,8 +7,7 @@
// #define CHECKTRANS // #define CHECKTRANS
#define NUMLAN 7 #include "hyper.h"
namespace hr { namespace hr {
EX const char *dnameof(eMonster m) { return minf[m].name; } EX const char *dnameof(eMonster m) { return minf[m].name; }
@ -17,6 +16,8 @@ EX const char *dnameof(eWall w) { return winf[w].name; }
EX const char *dnameof(eItem i) { return iinf[i].name; } EX const char *dnameof(eItem i) { return iinf[i].name; }
#if HDR #if HDR
#define NUMLAN 7
struct stringpar { struct stringpar {
string v; string v;
stringpar(string s) : v(s) { } stringpar(string s) : v(s) { }

View File

@ -1,6 +1,7 @@
// Hyperbolic Rogue -- old config file format (disabled by default) // Hyperbolic Rogue -- old config file format (disabled by default)
// Copyright (C) 2011-2019 Zeno Rogue, see 'hyper.cpp' for details // Copyright (C) 2011-2019 Zeno Rogue, see 'hyper.cpp' for details
#include "hyper.h"
#if CAP_LEGACY #if CAP_LEGACY
namespace hr { namespace hr {

View File

@ -11,6 +11,7 @@
* geometries, though. This file implements the basic types and functions for navigating both graphs. * geometries, though. This file implements the basic types and functions for navigating both graphs.
*/ */
#include "hyper.h"
namespace hr { namespace hr {
#if HDR #if HDR

View File

@ -5,6 +5,7 @@
* \brief HyperRogue editors (map and vector graphics) * \brief HyperRogue editors (map and vector graphics)
*/ */
#include "hyper.h"
namespace hr { namespace hr {
EX namespace mapeditor { EX namespace mapeditor {

View File

@ -7,6 +7,7 @@
// -- overview -- // -- overview --
#include "hyper.h"
#define BLACKISH 0x404040 #define BLACKISH 0x404040
#define REDDISH 0x400000 #define REDDISH 0x400000

View File

@ -5,6 +5,7 @@
* \brief initialization, and stuff related to mobiles * \brief initialization, and stuff related to mobiles
*/ */
#include "hyper.h"
namespace hr { namespace hr {
#if CU_INIT #if CU_INIT

View File

@ -8,6 +8,7 @@
* drawing.cpp, and basegraph.cpp are important. * drawing.cpp, and basegraph.cpp are important.
*/ */
#include "hyper.h"
namespace hr { namespace hr {
EX namespace polygonal { EX namespace polygonal {

View File

@ -5,6 +5,7 @@
* \brief monster generation * \brief monster generation
*/ */
#include "hyper.h"
namespace hr { namespace hr {
EX bool timerghost = true; EX bool timerghost = true;

View File

@ -5,6 +5,7 @@
* \brief multiplayer features, also input configuration * \brief multiplayer features, also input configuration
*/ */
#include "hyper.h"
namespace hr { namespace hr {
EX namespace multi { EX namespace multi {

View File

@ -5,6 +5,7 @@
* \brief running several games at once -- used in the Tutorial and Dual Geometry mode * \brief running several games at once -- used in the Tutorial and Dual Geometry mode
*/ */
#include "hyper.h"
namespace hr { namespace hr {
#if HDR #if HDR

View File

@ -5,6 +5,7 @@
* \brief paper model generator * \brief paper model generator
*/ */
#include "hyper.h"
#if CAP_MODEL #if CAP_MODEL
namespace hr { namespace netgen { namespace hr { namespace netgen {

View File

@ -5,6 +5,7 @@
* \brief built-in font (used e.g. in the web version) * \brief built-in font (used e.g. in the web version)
*/ */
#include "hyper.h"
namespace hr { namespace hr {
#if CAP_TABFONT #if CAP_TABFONT

View File

@ -5,6 +5,7 @@
* \brief nonisotropic spaces (Solv and Nil) * \brief nonisotropic spaces (Solv and Nil)
*/ */
#include "hyper.h"
namespace hr { namespace hr {
EX namespace nisot { EX namespace nisot {

View File

@ -5,6 +5,7 @@
* \brief Orb generation: which orbs in which lands, functions generating prize/local orbs, etc. * \brief Orb generation: which orbs in which lands, functions generating prize/local orbs, etc.
*/ */
#include "hyper.h"
namespace hr { namespace hr {
// orbgen flags // orbgen flags

View File

@ -5,6 +5,7 @@
* \brief Implementation of various Orb effects, and their properties such as default and maximum charges * \brief Implementation of various Orb effects, and their properties such as default and maximum charges
*/ */
#include "hyper.h"
namespace hr { namespace hr {
EX bool markOrb(eItem it) { EX bool markOrb(eItem it) {

View File

@ -8,6 +8,7 @@
* as well as more complex ones (Emerald, Palace, Field Pattern) * as well as more complex ones (Emerald, Palace, Field Pattern)
*/ */
#include "hyper.h"
namespace hr { namespace hr {
EX int ctof(cell *c) { EX int ctof(cell *c) {

View File

@ -5,6 +5,7 @@
* \brief tables that the complex patterns (Emerald, Palace, Field Pattern) are based on * \brief tables that the complex patterns (Emerald, Palace, Field Pattern) are based on
*/ */
#include "hyper.h"
namespace hr { namespace hr {
// === EMERALD PATTERN === // === EMERALD PATTERN ===

View File

@ -5,6 +5,7 @@
* \brief Kite-and-dart tiling, both in R^2 and H^3 * \brief Kite-and-dart tiling, both in R^2 and H^3
*/ */
#include "hyper.h"
namespace hr { namespace hr {
EX namespace kite { EX namespace kite {

View File

@ -5,6 +5,7 @@
* \brief shapes used for the vector graphics, mostly hand-drawn (the vector data is here), some procedurally generated * \brief shapes used for the vector graphics, mostly hand-drawn (the vector data is here), some procedurally generated
*/ */
#include "hyper.h"
#if CAP_SHAPES #if CAP_SHAPES
namespace hr { namespace hr {

View File

@ -5,6 +5,7 @@
* \brief the mission screen, and routines related to it * \brief the mission screen, and routines related to it
*/ */
#include "hyper.h"
namespace hr { namespace hr {
EX bool quitsaves() { return (items[itOrbSafety] && CAP_SAVE && !archimedean); } EX bool quitsaves() { return (items[itOrbSafety] && CAP_SAVE && !archimedean); }

View File

@ -5,6 +5,7 @@
* \brief quotient spaces * \brief quotient spaces
*/ */
#include "hyper.h"
namespace hr { namespace hr {
// --- quotient geometry --- // --- quotient geometry ---

View File

@ -5,6 +5,7 @@
* \brief racing mode * \brief racing mode
*/ */
#include "hyper.h"
namespace hr { namespace hr {
EX namespace racing { EX namespace racing {

View File

@ -9,6 +9,7 @@
* hyperbolic honeycombs rely on binary:: to deal with floating point errors (just like archimedean) * hyperbolic honeycombs rely on binary:: to deal with floating point errors (just like archimedean)
*/ */
#include "hyper.h"
namespace hr { namespace hr {
#if MAXMDIM >= 4 #if MAXMDIM >= 4

View File

@ -9,6 +9,7 @@
* and then either used as a OpenGL texture (e.g. in the Hypersian Rug mode), or saved. * and then either used as a OpenGL texture (e.g. in the Hypersian Rug mode), or saved.
*/ */
#include "hyper.h"
namespace hr { namespace hr {
#if CAP_GL #if CAP_GL

View File

@ -7,6 +7,7 @@
* See also surface.cpp for constant curvature surfaces. * See also surface.cpp for constant curvature surfaces.
*/ */
#include "hyper.h"
namespace hr { namespace hr {
#if CAP_RUG #if CAP_RUG

View File

@ -5,7 +5,7 @@
* \brief memory saving: memory saving mode, memory warnings, etc. * \brief memory saving: memory saving mode, memory warnings, etc.
*/ */
#include "hyper.h"
namespace hr { namespace hr {
#if HDR #if HDR

View File

@ -5,6 +5,7 @@
* \brief local highscore lists * \brief local highscore lists
*/ */
#include "hyper.h"
#if CAP_SAVE #if CAP_SAVE
namespace hr { namespace scores { namespace hr { namespace scores {

View File

@ -5,6 +5,7 @@
* \brief screenshots, SVG format, animations, start animations * \brief screenshots, SVG format, animations, start animations
*/ */
#include "hyper.h"
namespace hr { namespace hr {
bool hide_hud = true; bool hide_hud = true;

View File

@ -8,6 +8,7 @@
* If CAP_SHADER is 1, we are using GLSL shaders. * If CAP_SHADER is 1, we are using GLSL shaders.
*/ */
#include "hyper.h"
namespace hr { namespace hr {
#ifndef DEBUG_GL #ifndef DEBUG_GL

View File

@ -5,6 +5,7 @@
* \brief shoot'em up mode * \brief shoot'em up mode
*/ */
#include "hyper.h"
namespace hr { namespace hr {
// joysticks for controlling the mobile shmup mode // joysticks for controlling the mobile shmup mode

View File

@ -5,6 +5,7 @@
* \brief sound effects and music * \brief sound effects and music
*/ */
#include "hyper.h"
namespace hr { namespace hr {
EX const char *musicfile = ""; EX const char *musicfile = "";

View File

@ -5,6 +5,7 @@
* \brief spherical spaces * \brief spherical spaces
*/ */
#include "hyper.h"
namespace hr { namespace hr {
// --- spherical geometry --- // --- spherical geometry ---

View File

@ -7,6 +7,7 @@
* See http://webmath2.unito.it/paginepersonali/sergio.console/CurveSuperfici/AG15.pdf for a nice reference * See http://webmath2.unito.it/paginepersonali/sergio.console/CurveSuperfici/AG15.pdf for a nice reference
*/ */
#include "hyper.h"
#if CAP_SURFACE #if CAP_SURFACE
namespace hr { namespace hr {

View File

@ -5,6 +5,7 @@
* \brief changing game modes, starting, closing, loading and saving games * \brief changing game modes, starting, closing, loading and saving games
*/ */
#include "hyper.h"
namespace hr { namespace hr {
#if HDR #if HDR

View File

@ -5,6 +5,7 @@
* \brief texture mode, also the basic definitions of textures, used in 3D mode * \brief texture mode, also the basic definitions of textures, used in 3D mode
*/ */
#include "hyper.h"
#if CAP_TEXTURE #if CAP_TEXTURE
namespace hr { namespace hr {

View File

@ -5,6 +5,7 @@
* \brief the Tutorial and presentation system * \brief the Tutorial and presentation system
*/ */
#include "hyper.h"
namespace hr { namespace hr {
EX namespace tour { EX namespace tour {

View File

@ -5,6 +5,7 @@
* \brief user-defined shapes * \brief user-defined shapes
*/ */
#include "hyper.h"
#if CAP_SHAPES #if CAP_SHAPES
namespace hr { namespace hr {

View File

@ -5,6 +5,7 @@
* \brief basic utility functions: maths, parsing expressions * \brief basic utility functions: maths, parsing expressions
*/ */
#include "hyper.h"
namespace hr { namespace hr {
#if CAP_TIMEOFDAY #if CAP_TIMEOFDAY

View File

@ -5,6 +5,7 @@
* \brief Yendor Quest/Challenge, Pure Tactics Mode, Peace Mode * \brief Yendor Quest/Challenge, Pure Tactics Mode, Peace Mode
*/ */
#include "hyper.h"
namespace hr { namespace hr {
namespace peace { extern bool on; } namespace peace { extern bool on; }