mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-10-13 05:37:38 +00:00
updated to 10.0c
This commit is contained in:
@@ -86,7 +86,7 @@ bool wrongMode(char flags) {
|
||||
if(yendor::on) return true;
|
||||
if(peace::on) return true;
|
||||
if(tactic::on) return true;
|
||||
#ifdef TOUR
|
||||
#if CAP_TOUR
|
||||
if(tour::on) return true;
|
||||
#endif
|
||||
if(chaosmode != (flags == 'C')) return true;
|
||||
@@ -106,7 +106,7 @@ void achievement_log(const char* s, char flags) {
|
||||
if(achievementsReceived[i] == s) return;
|
||||
achievementsReceived.push_back(s);
|
||||
|
||||
#ifndef NOSAVE
|
||||
#if CAP_SAVE
|
||||
remove_emergency_save();
|
||||
|
||||
FILE *f = fopen(scorefile, "at");
|
||||
@@ -124,20 +124,16 @@ void achievement_log(const char* s, char flags) {
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef STEAM
|
||||
#if ISSTEAM
|
||||
void improveItemScores();
|
||||
#include "private/hypersteam.cpp"
|
||||
#else
|
||||
#ifndef ANDROID
|
||||
#ifndef IOS
|
||||
#elif !ISANDROID && !ISIOS
|
||||
void achievement_init() {}
|
||||
void achievement_close() {}
|
||||
void achievement_gain(const char* s, char flags) {
|
||||
achievement_log(s, flags);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void achievement_collection(eItem it, int prevgold, int newgold) {
|
||||
if(cheater) return;
|
||||
@@ -213,7 +209,7 @@ void achievement_collection(eItem it, int prevgold, int newgold) {
|
||||
if(q == 8) achievement_gain("GRAIL4");
|
||||
}
|
||||
|
||||
if(q == U10) {
|
||||
if(q == (inv::on ? 25 : 10)) {
|
||||
if(it == itDiamond) achievement_gain("DIAMOND2");
|
||||
if(it == itRuby) achievement_gain("RUBY2");
|
||||
if(it == itHyperstone) achievement_gain("HYPER2");
|
||||
@@ -269,7 +265,7 @@ void achievement_collection(eItem it, int prevgold, int newgold) {
|
||||
if(it == itBull) achievement_gain("BULL2");
|
||||
}
|
||||
|
||||
if(q == R10) {
|
||||
if(q == (inv::on ? 50 : 25)) {
|
||||
if(it == itDiamond) achievement_gain("DIAMOND3");
|
||||
if(it == itRuby) achievement_gain("RUBY3");
|
||||
if(it == itHyperstone) achievement_gain("HYPER3");
|
||||
@@ -523,7 +519,7 @@ void achievement_final(bool really_final) {
|
||||
#ifdef HAVE_ACHIEVEMENTS
|
||||
upload_score(LB_STATISTICS, time(NULL));
|
||||
if(cheater) return;
|
||||
#ifdef TOUR
|
||||
#if CAP_TOUR
|
||||
if(tour::on) return;
|
||||
#endif
|
||||
|
||||
@@ -581,7 +577,7 @@ void achievement_final(bool really_final) {
|
||||
}
|
||||
|
||||
if(total_improved >= 2) {
|
||||
#ifndef ANDROID
|
||||
#if !ISANDROID
|
||||
addMessage(XLAT("Your total treasure has been recorded in the " LEADERFULL "."));
|
||||
addMessage(XLAT("Congratulations!"));
|
||||
#endif
|
||||
@@ -591,14 +587,14 @@ void achievement_final(bool really_final) {
|
||||
else if(total_improved && specific_improved)
|
||||
addMessage(XLAT("You have improved your total and '%1' high score!", iinf[specific_what].name));
|
||||
else if(total_improved) {
|
||||
#ifndef ANDROID
|
||||
#if !ISANDROID
|
||||
addMessage(XLAT("You have improved your total high score on " LEADER ". Congratulations!"));
|
||||
#endif
|
||||
}
|
||||
else if(specific_improved >= 2)
|
||||
addMessage(XLAT("You have improved %1 of your specific high scores!", its(specific_improved)));
|
||||
else if(specific_improved) {
|
||||
#ifndef ANDROID
|
||||
#if !ISANDROID
|
||||
addMessage(XLAT("You have improved your '%1' high score on " LEADER "!", iinf[specific_what].name));
|
||||
#endif
|
||||
}
|
||||
@@ -658,7 +654,7 @@ void achievement_victory(bool hyper) {
|
||||
if(improved) {
|
||||
if(improved >= 4) {
|
||||
if(!hyper) addMessage(XLAT("This is your first victory!"));
|
||||
#ifndef ANDROID
|
||||
#if !ISANDROID
|
||||
addMessage(XLAT("This has been recorded in the " LEADERFULL "."));
|
||||
#endif
|
||||
addMessage(XLAT("The faster you get here, the better you are!"));
|
||||
@@ -700,12 +696,12 @@ void achievement_display() {
|
||||
col /= 10; col *= 0x10101;
|
||||
displayfr(vid.xres/2, vid.yres/4, 2, vid.fsize * 2, achievementMessage[0], col & 0xFFFF00, 8);
|
||||
int w = 2 * vid.fsize;
|
||||
#ifndef MOBILE
|
||||
#if ISMOBILE==0
|
||||
while(w>3 && textwidth(w, achievementMessage[1]) > vid.xres) w--;
|
||||
#endif
|
||||
displayfr(vid.xres/2, vid.yres/4 + vid.fsize*2, 2, w, achievementMessage[1], col, 8);
|
||||
w = vid.fsize;
|
||||
#ifndef MOBILE
|
||||
#if ISMOBILE==0
|
||||
while(w>3 && textwidth(w, achievementMessage[2]) > vid.xres) w--;
|
||||
#endif
|
||||
displayfr(vid.xres/2, vid.yres/4 + vid.fsize*4, 2, w, achievementMessage[2], col, 8);
|
||||
|
Reference in New Issue
Block a user