mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-24 06:50:09 +00:00
geometry specifics in mode code
This commit is contained in:
parent
8a677c28fa
commit
db69276264
6
hyper.h
6
hyper.h
@ -1472,7 +1472,7 @@ bool isAlchAny(eWall w);
|
|||||||
bool isAlchAny(cell *c);
|
bool isAlchAny(cell *c);
|
||||||
|
|
||||||
#define YDIST 101
|
#define YDIST 101
|
||||||
#define MODECODES 255
|
#define MODECODES (1ll<<61)
|
||||||
|
|
||||||
extern cellwalker cwt; // player character position
|
extern cellwalker cwt; // player character position
|
||||||
|
|
||||||
@ -1481,7 +1481,7 @@ extern array<int, motypes> kills;
|
|||||||
|
|
||||||
extern int explore[10], exploreland[10][landtypes], landcount[landtypes];
|
extern int explore[10], exploreland[10][landtypes], landcount[landtypes];
|
||||||
|
|
||||||
typedef int modecode_t;
|
typedef flagtype modecode_t;
|
||||||
extern map<modecode_t, array<int, ittypes> > hiitems;
|
extern map<modecode_t, array<int, ittypes> > hiitems;
|
||||||
|
|
||||||
extern eLand firstland, specialland;
|
extern eLand firstland, specialland;
|
||||||
@ -3832,7 +3832,7 @@ enum eOrbLandRelation {
|
|||||||
namespace torusconfig {
|
namespace torusconfig {
|
||||||
extern int sdx, sdy;
|
extern int sdx, sdy;
|
||||||
|
|
||||||
enum eTorusMode {
|
enum eTorusMode : char {
|
||||||
tmSingleHex,
|
tmSingleHex,
|
||||||
tmSingle,
|
tmSingle,
|
||||||
tmSlantedHex,
|
tmSlantedHex,
|
||||||
|
25
yendor.cpp
25
yendor.cpp
@ -955,6 +955,31 @@ int modecode() {
|
|||||||
mct += irr::density_code() << 21; // 8 bits
|
mct += irr::density_code() << 21; // 8 bits
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 32 bits [29..61) for geometry specifics
|
||||||
|
if(torus) {
|
||||||
|
mct += ll(torusconfig::dx) << 29;
|
||||||
|
mct += ll(torusconfig::dy) << 37;
|
||||||
|
mct += ll(torusconfig::qty) << 45;
|
||||||
|
mct += ll(torusconfig::torusmode) << 53;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(geometry == gQuotient) {
|
||||||
|
mct += ll(current_extra) << 29;
|
||||||
|
mct += ll(fgeomextras[current_extra].current_prime_id) << 37;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(geometry == gCrystal) {
|
||||||
|
mct += ll(ginf[geometry].sides) << 29;
|
||||||
|
mct += ll(ginf[geometry].vertices) << 37;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(geometry == gArchimedean) {
|
||||||
|
unsigned res = 7;
|
||||||
|
for(char c: arcm::current.symbol) res = res * 157 + c;
|
||||||
|
mct += ll(res) << 29;
|
||||||
|
if(PURE) mct ^= (1<<29);
|
||||||
|
}
|
||||||
|
|
||||||
return mct;
|
return mct;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user