mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 13:07:16 +00:00
Removed references to private/daily.cpp and private/hypersteam.cpp. Also removed HAVE_ACHIEVEMENTS as it was redundant to CAP_ACHIEVE
This commit is contained in:
parent
7b99248c06
commit
7982ea0e58
@ -99,13 +99,24 @@ EX const char* leadernames[NUMLEADER] = {
|
|||||||
#define LB_RACING 81
|
#define LB_RACING 81
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
EX void achievement_init();
|
||||||
|
EX string myname();
|
||||||
|
EX void achievement_close();
|
||||||
|
EX void achievement_pump();
|
||||||
|
|
||||||
|
/** gain the given achievement.
|
||||||
|
* @param s name of the achievement, e.g., DIAMOND1
|
||||||
|
* @param flags one of the constants from namespace rg. The achievement is only awarded if special modes are matched exactly.
|
||||||
|
*/
|
||||||
|
EX void achievement_gain(const char* s, char flags IS(0));
|
||||||
|
|
||||||
EX bool haveLeaderboard(int id);
|
EX bool haveLeaderboard(int id);
|
||||||
EX int get_currentscore(int id);
|
EX int get_currentscore(int id);
|
||||||
EX void set_priority_board(int id);
|
EX void set_priority_board(int id);
|
||||||
EX int get_sync_status();
|
EX int get_sync_status();
|
||||||
EX bool score_loaded(int id);
|
EX bool score_loaded(int id);
|
||||||
EX int score_default(int id);
|
EX int score_default(int id);
|
||||||
|
EX void improveItemScores();
|
||||||
EX void upload_score(int id, int v);
|
EX void upload_score(int id, int v);
|
||||||
|
|
||||||
string achievementMessage[3];
|
string achievementMessage[3];
|
||||||
@ -228,29 +239,24 @@ EX void achievement_log(const char* s, char flags) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
EX void achievement_init();
|
#ifndef LEADER
|
||||||
EX string myname();
|
#define LEADER "Unknown"
|
||||||
EX void achievement_close();
|
#define LEADERFULL "Unknown"
|
||||||
|
#endif
|
||||||
|
|
||||||
/** gain the given achievement.
|
#if !CAP_ACHIEVE
|
||||||
* @param s name of the achievement, e.g., DIAMOND1
|
|
||||||
* @param flags one of the constants from namespace rg. The achievement is only awarded if special modes are matched exactly.
|
|
||||||
*/
|
|
||||||
EX void achievement_gain(const char* s, char flags IS(0));
|
|
||||||
|
|
||||||
#if ISSTEAM
|
|
||||||
void improveItemScores();
|
|
||||||
#include "private/hypersteam.cpp"
|
|
||||||
#elif !ISANDROID && !ISIOS
|
|
||||||
void achievement_init() {}
|
void achievement_init() {}
|
||||||
string myname() { return "Rogue"; }
|
string myname() { return "Rogue"; }
|
||||||
void achievement_close() {}
|
void achievement_close() {}
|
||||||
// gain the achievement with the given name.
|
// gain the achievement with the given name.
|
||||||
// flags: 'e' - for Euclidean, 's' - for Shmup, '7' - for heptagonal
|
// flags: 'e' - for Euclidean, 's' - for Shmup, '7' - for heptagonal
|
||||||
// Only awarded if special modes are matched exactly.
|
// Only awarded if special modes are matched exactly.
|
||||||
void achievement_gain(const char* s, char flags IS(0)) {
|
void achievement_gain(const char* s, char flags) {
|
||||||
achievement_log(s, flags);
|
achievement_log(s, flags);
|
||||||
}
|
}
|
||||||
|
void achievement_pump() {}
|
||||||
|
EX int get_sync_status() { return 0; }
|
||||||
|
EX void set_priority_board(int) { }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// gain the achievement for collecting a number of 'it'.
|
// gain the achievement for collecting a number of 'it'.
|
||||||
@ -655,7 +661,7 @@ int specific_what = 0;
|
|||||||
EX void improve_score(int i, eItem what) {
|
EX void improve_score(int i, eItem what) {
|
||||||
if(offlineMode) return;
|
if(offlineMode) return;
|
||||||
LATE( improve_score(i, what); )
|
LATE( improve_score(i, what); )
|
||||||
#ifdef HAVE_ACHIEVEMENTS
|
#if CAP_ACHIEVE
|
||||||
if(haveLeaderboard(i)) updateHi(what, get_currentscore(i));
|
if(haveLeaderboard(i)) updateHi(what, get_currentscore(i));
|
||||||
if(items[what] && haveLeaderboard(i)) {
|
if(items[what] && haveLeaderboard(i)) {
|
||||||
if(items[what] > get_currentscore(i) && score_loaded(i)) {
|
if(items[what] > get_currentscore(i) && score_loaded(i)) {
|
||||||
@ -669,7 +675,7 @@ EX void improve_score(int i, eItem what) {
|
|||||||
// scores for special challenges
|
// scores for special challenges
|
||||||
EX void achievement_score(int cat, int number) {
|
EX void achievement_score(int cat, int number) {
|
||||||
if(offlineMode) return;
|
if(offlineMode) return;
|
||||||
#ifdef HAVE_ACHIEVEMENTS
|
#if CAP_ACHIEVE
|
||||||
if(cheater) return;
|
if(cheater) return;
|
||||||
if(casual) return;
|
if(casual) return;
|
||||||
LATE( achievement_score(cat, number); )
|
LATE( achievement_score(cat, number); )
|
||||||
@ -775,7 +781,7 @@ EX void achievement_final(bool really_final) {
|
|||||||
|
|
||||||
LATE( achievement_final(really_final); )
|
LATE( achievement_final(really_final); )
|
||||||
|
|
||||||
#ifdef HAVE_ACHIEVEMENTS
|
#if CAP_ACHIEVE
|
||||||
if(ticks > next_stat_tick) {
|
if(ticks > next_stat_tick) {
|
||||||
upload_score(LB_STATISTICS, time(NULL));
|
upload_score(LB_STATISTICS, time(NULL));
|
||||||
next_stat_tick = ticks + 600000;
|
next_stat_tick = ticks + 600000;
|
||||||
@ -910,7 +916,7 @@ EX void check_total_victory() {
|
|||||||
EX void achievement_victory(bool hyper) {
|
EX void achievement_victory(bool hyper) {
|
||||||
DEBBI(DF_STEAM, ("achievement_victory"))
|
DEBBI(DF_STEAM, ("achievement_victory"))
|
||||||
if(offlineMode) return;
|
if(offlineMode) return;
|
||||||
#ifdef HAVE_ACHIEVEMENTS
|
#if CAP_ACHIEVE
|
||||||
if(cheater) return;
|
if(cheater) return;
|
||||||
if(casual) return;
|
if(casual) return;
|
||||||
if(bow::weapon) return;
|
if(bow::weapon) return;
|
||||||
@ -1044,13 +1050,9 @@ EX string get_rich_presence_text() {
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef HAVE_ACHIEVEMENTS
|
|
||||||
void achievement_pump() {}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/** display the last achievement gained. */
|
/** display the last achievement gained. */
|
||||||
EX void achievement_display() {
|
EX void achievement_display() {
|
||||||
#ifdef HAVE_ACHIEVEMENTS
|
#if CAP_ACHIEVE
|
||||||
if(achievementTimer) {
|
if(achievementTimer) {
|
||||||
int col = (ticks - achievementTimer);
|
int col = (ticks - achievementTimer);
|
||||||
if(col > 5000) { achievementTimer = 0; return; }
|
if(col > 5000) { achievementTimer = 0; return; }
|
||||||
@ -1080,9 +1082,4 @@ EX int score_default(int i) {
|
|||||||
else return 0;
|
else return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef HAVE_ACHIEVEMENTS
|
|
||||||
EX int get_sync_status() { return 0; }
|
|
||||||
EX void set_priority_board(int) { }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -132,9 +132,7 @@
|
|||||||
#include "rogueviz/rogueviz-all.cpp"
|
#include "rogueviz/rogueviz-all.cpp"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CAP_DAILY
|
#if !CAP_DAILY
|
||||||
#include "private/daily.cpp"
|
|
||||||
#else
|
|
||||||
namespace hr { namespace daily { bool on; int historical; } }
|
namespace hr { namespace daily { bool on; int historical; } }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
10
yendor.cpp
10
yendor.cpp
@ -122,7 +122,7 @@ EX namespace yendor {
|
|||||||
|
|
||||||
int tscorelast;
|
int tscorelast;
|
||||||
|
|
||||||
void uploadScore() {
|
EX void uploadScore() {
|
||||||
int tscore = 0;
|
int tscore = 0;
|
||||||
for(int i=1; i<YENDORLEVELS; i++)
|
for(int i=1; i<YENDORLEVELS; i++)
|
||||||
if(bestscore[0][i]) tscore += 999 + bestscore[0][i];
|
if(bestscore[0][i]) tscore += 999 + bestscore[0][i];
|
||||||
@ -763,18 +763,18 @@ EX namespace tactic {
|
|||||||
if(csum > recordsum[xc][land]) recordsum[xc][land] = csum;
|
if(csum > recordsum[xc][land]) recordsum[xc][land] = csum;
|
||||||
}
|
}
|
||||||
|
|
||||||
void record() {
|
EX void record() {
|
||||||
record(lasttactic, items[treasureType(lasttactic)]);
|
record(lasttactic, items[treasureType(lasttactic)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void unrecord(eLand land, flagtype xc = modecode()) {
|
EX void unrecord(eLand land, flagtype xc IS(modecode())) {
|
||||||
if(land >=0 && land < landtypes) {
|
if(land >=0 && land < landtypes) {
|
||||||
for(int i=0; i<MAXTAC-1; i++) lsc[xc][land][i] = lsc[xc][land][i+1];
|
for(int i=0; i<MAXTAC-1; i++) lsc[xc][land][i] = lsc[xc][land][i+1];
|
||||||
lsc[xc][land][MAXTAC-1] = -1;
|
lsc[xc][land][MAXTAC-1] = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void unrecord() {
|
EX void unrecord() {
|
||||||
unrecord(lasttactic);
|
unrecord(lasttactic);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -795,7 +795,7 @@ EX namespace tactic {
|
|||||||
achievement_score(lb, tscore);
|
achievement_score(lb, tscore);
|
||||||
}
|
}
|
||||||
|
|
||||||
void uploadScore() {
|
EX void uploadScore() {
|
||||||
uploadScoreCode(0, LB_PURE_TACTICS);
|
uploadScoreCode(0, LB_PURE_TACTICS);
|
||||||
uploadScoreCode(2, LB_PURE_TACTICS_SHMUP);
|
uploadScoreCode(2, LB_PURE_TACTICS_SHMUP);
|
||||||
uploadScoreCode(4, LB_PURE_TACTICS_COOP);
|
uploadScoreCode(4, LB_PURE_TACTICS_COOP);
|
||||||
|
Loading…
Reference in New Issue
Block a user