mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-25 01:20:37 +00:00
modecode for product geometries
This commit is contained in:
parent
63bd06e75c
commit
7aed1b8551
@ -221,6 +221,8 @@ enum eGeometryClass { gcHyperbolic, gcEuclid, gcSphere, gcSol, gcNil, gcProduct
|
|||||||
|
|
||||||
enum class eVariation { bitruncated, pure, goldberg, irregular, dual };
|
enum class eVariation { bitruncated, pure, goldberg, irregular, dual };
|
||||||
|
|
||||||
|
typedef flagtype modecode_t;
|
||||||
|
|
||||||
struct geometryinfo {
|
struct geometryinfo {
|
||||||
const char* tiling_name;
|
const char* tiling_name;
|
||||||
const char* quotient_name;
|
const char* quotient_name;
|
||||||
|
2
hyper.h
2
hyper.h
@ -419,8 +419,6 @@ typedef function<int(struct cell*)> cellfunction;
|
|||||||
#define YDIST 101
|
#define YDIST 101
|
||||||
#define MODECODES (1ll<<61)
|
#define MODECODES (1ll<<61)
|
||||||
|
|
||||||
typedef flagtype modecode_t;
|
|
||||||
|
|
||||||
#define GUNRANGE 3
|
#define GUNRANGE 3
|
||||||
|
|
||||||
// loops
|
// loops
|
||||||
|
@ -902,7 +902,7 @@ EX void saveStats(bool emergency IS(false)) {
|
|||||||
if((tactic::on || yendor::on) && !items[itOrbSafety] && !cheater) {
|
if((tactic::on || yendor::on) && !items[itOrbSafety] && !cheater) {
|
||||||
int t = (int) (timer - timerstart);
|
int t = (int) (timer - timerstart);
|
||||||
|
|
||||||
ll xcode = modecode();
|
modecode_t xcode = modecode();
|
||||||
|
|
||||||
if(tactic::on) {
|
if(tactic::on) {
|
||||||
int score = items[treasureType(specialland)];
|
int score = items[treasureType(specialland)];
|
||||||
@ -913,7 +913,7 @@ EX void saveStats(bool emergency IS(false)) {
|
|||||||
int(xcode)*999 + tactic::id + 256 * score + (xcode>>32)*7);
|
int(xcode)*999 + tactic::id + 256 * score + (xcode>>32)*7);
|
||||||
fprintf(f, "TACTICS %s %d %d %d %d %d %d %d %d date: %s\n", VER,
|
fprintf(f, "TACTICS %s %d %d %d %d %d %d %d %d date: %s\n", VER,
|
||||||
tactic::id, specialland, score, turncount, t, int(timerstart),
|
tactic::id, specialland, score, turncount, t, int(timerstart),
|
||||||
c, xcode, buf);
|
c, int(xcode), buf);
|
||||||
tactic::record(specialland, score);
|
tactic::record(specialland, score);
|
||||||
anticheat::nextid(tactic::id, VER, c);
|
anticheat::nextid(tactic::id, VER, c);
|
||||||
}
|
}
|
||||||
@ -924,7 +924,7 @@ EX void saveStats(bool emergency IS(false)) {
|
|||||||
yendor::lastchallenge, items[itOrbYendor], yendor::won, turncount, t, int(timerstart),
|
yendor::lastchallenge, items[itOrbYendor], yendor::won, turncount, t, int(timerstart),
|
||||||
anticheat::certify(yendor::won ? "WON" : "LOST", turncount, t, (int) timerstart,
|
anticheat::certify(yendor::won ? "WON" : "LOST", turncount, t, (int) timerstart,
|
||||||
int(xcode)*999 + yendor::lastchallenge + 256 * items[itOrbYendor] + (xcode>>32)*7),
|
int(xcode)*999 + yendor::lastchallenge + 256 * items[itOrbYendor] + (xcode>>32)*7),
|
||||||
xcode,
|
int(xcode),
|
||||||
buf);
|
buf);
|
||||||
|
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
@ -1054,6 +1054,8 @@ int modecodetable[42][6] = {
|
|||||||
// unused codes: 6 (cheat/tampered), 25, 254, 255
|
// unused codes: 6 (cheat/tampered), 25, 254, 255
|
||||||
|
|
||||||
modecode_t modecode() {
|
modecode_t modecode() {
|
||||||
|
// bit 61: product
|
||||||
|
if(prod) return PIU(modecode()) | (1ll << 61);
|
||||||
#if CAP_SAVE
|
#if CAP_SAVE
|
||||||
if(anticheat::tampered || cheater || geometry >= gGUARD) return 6;
|
if(anticheat::tampered || cheater || geometry >= gGUARD) return 6;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user