mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 21:07:17 +00:00
ads-game:: footer/copyright shown
This commit is contained in:
parent
3808d93a11
commit
cc1d2c1b48
@ -1,9 +1,12 @@
|
|||||||
/* Main file of Relative Hell. */
|
/* Main file of Relative Hell. */
|
||||||
|
/* Compile with mymake -O3 rogueviz/ads/ads-game */
|
||||||
/* Best run with -ads-menu; more detailed options are available too */
|
/* Best run with -ads-menu; more detailed options are available too */
|
||||||
|
|
||||||
|
#define VER_RH "0.1"
|
||||||
|
|
||||||
#ifdef RELHELL
|
#ifdef RELHELL
|
||||||
|
|
||||||
#define CUSTOM_CAPTION "Relative Hell 0.9"
|
#define CUSTOM_CAPTION "Relative Hell " VER_RH
|
||||||
#define MAXMDIM 4
|
#define MAXMDIM 4
|
||||||
#define CAP_INV 0
|
#define CAP_INV 0
|
||||||
#define CAP_COMPLEX2 0
|
#define CAP_COMPLEX2 0
|
||||||
|
@ -187,6 +187,19 @@ void draw_game_cell(const cell_to_draw& cd) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void view_footer() {
|
||||||
|
if(inHighQual) return;
|
||||||
|
string str = "Relative Hell ";
|
||||||
|
str += VER_RH;
|
||||||
|
if(main_rock) str += " dS";
|
||||||
|
else str += " AdS";
|
||||||
|
if(paused) str += " (paused)";
|
||||||
|
if(!nofps) str += XLAT(" fps: ") + its(calcfps());
|
||||||
|
str += " " + copyright_shown;
|
||||||
|
|
||||||
|
queuestr(10, vid.yres-vid.fsize, 0, vid.fsize/2, str, 0x202020, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
void view_ads_game() {
|
void view_ads_game() {
|
||||||
displayed.clear();
|
displayed.clear();
|
||||||
|
|
||||||
@ -292,6 +305,9 @@ void view_ads_game() {
|
|||||||
queuestr(shiftless(Id), .1, str, 0xFFFF00, 8);
|
queuestr(shiftless(Id), .1, str, 0xFFFF00, 8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
copyright_shown = "";
|
||||||
|
view_footer();
|
||||||
}
|
}
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
@ -570,6 +570,8 @@ void view_ds_game() {
|
|||||||
queuecurve(shiftless(sphereflip), 0xFF0000C0, bad == 0 ? 0x00000060 : 0xFFFFFF10, PPR::SUPERLINE);
|
queuecurve(shiftless(sphereflip), 0xFF0000C0, bad == 0 ? 0x00000060 : 0xFFFFFF10, PPR::SUPERLINE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
view_footer();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ds_restart() {
|
void ds_restart() {
|
||||||
|
@ -77,6 +77,8 @@ ld smoothstep(ld x) {
|
|||||||
return x * x * (3-2*x);
|
return x * x * (3-2*x);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string copyright_shown;
|
||||||
|
|
||||||
void draw_texture(texture_to_use& tu) {
|
void draw_texture(texture_to_use& tu) {
|
||||||
if(!talpha) return;
|
if(!talpha) return;
|
||||||
auto& et = *tu.tx;
|
auto& et = *tu.tx;
|
||||||
@ -169,10 +171,13 @@ void draw_texture(texture_to_use& tu) {
|
|||||||
poly.tinf = &et.tinf;
|
poly.tinf = &et.tinf;
|
||||||
poly.flags |= POLY_TRIANGLES;
|
poly.flags |= POLY_TRIANGLES;
|
||||||
poly.offset_texture = 0;
|
poly.offset_texture = 0;
|
||||||
|
|
||||||
|
copyright_shown = et.copyright;
|
||||||
}
|
}
|
||||||
|
|
||||||
void draw_textures() {
|
void draw_textures() {
|
||||||
pick_textures();
|
pick_textures();
|
||||||
|
copyright_shown = "";
|
||||||
for(auto& tu: textures_to_use)
|
for(auto& tu: textures_to_use)
|
||||||
if(current.shift > tu.from && current.shift < tu.to)
|
if(current.shift > tu.from && current.shift < tu.to)
|
||||||
draw_texture(tu);
|
draw_texture(tu);
|
||||||
|
@ -111,6 +111,8 @@ int draw_per_frame = 1000;
|
|||||||
|
|
||||||
ads_object *main_rock;
|
ads_object *main_rock;
|
||||||
|
|
||||||
|
extern string copyright_shown;
|
||||||
|
|
||||||
int XSCALE = 48;
|
int XSCALE = 48;
|
||||||
int YSCALE = 48;
|
int YSCALE = 48;
|
||||||
int talpha = 32;
|
int talpha = 32;
|
||||||
|
Loading…
Reference in New Issue
Block a user