1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-10 15:59:53 +00:00

product:: HUD items displayed correctly

This commit is contained in:
Zeno Rogue 2019-08-19 09:39:19 +02:00
parent 3e1fc42dc5
commit e5fb06e6cd
7 changed files with 14 additions and 8 deletions

View File

@ -282,7 +282,7 @@ void display_data::set_projection(int ed) {
shaderside_projection = false;
glhr::new_shader_projection = glhr::shader_projection::standard;
if(vid.consider_shader_projection && pmodel == mdDisk && !spherespecial && !(hyperbolic && vid.alpha <= -1) && GDIM == 2)
if(vid.consider_shader_projection && pmodel == mdDisk && !spherespecial && !(hyperbolic && vid.alpha <= -1) && MDIM == 3)
shaderside_projection = true;
else if(vid.consider_shader_projection && !glhr::noshaders) {
if(pmodel == mdDisk && !spherespecial && !(hyperbolic && vid.alpha <= -1) && GDIM == 3 && apply_models)
@ -410,7 +410,7 @@ void display_data::set_projection(int ed) {
glhr::projection_multiply(glhr::tmtogl_transpose(nisot::local_perspective));
}
}
else if(GDIM == 3) {
else if(MDIM == 4) {
glhr::glmatrix M = glhr::ortho(cd->xsize/current_display->radius/2, -cd->ysize/current_display->radius/2, 1);
using models::clip_max;
using models::clip_min;

View File

@ -1759,7 +1759,8 @@ EX void showCustomizeChar() {
int firsty = dialog::items[0].position / 2;
int scale = firsty - 2 * vid.fsize;
dynamicval<eModel> pm(pmodel, GDIM == 3 ? mdFlatten : mdDisk);
dynamicval<eModel> pm(pmodel, flat_model());
glClear(GL_DEPTH_BUFFER_BIT);
dynamicval<ld> va(vid.alpha, 1);
dynamicval<ld> vs(vid.scale, 1);
dynamicval<ld> vc(vid.camera_angle, 0);

View File

@ -506,7 +506,7 @@ void glapplymatrix(const transmatrix& V) {
return;
}
if(GDIM == 3) {
if(MDIM == 4) {
for(int y=0; y<4; y++)
for(int x=0; x<4; x++) mat[id++] = V[x][y];
}

View File

@ -480,7 +480,8 @@ EX void drawStats() {
bool h = hide_player();
{
dynamicval<eModel> pm(pmodel, GDIM == 3 ? mdFlatten : mdDisk);
dynamicval<eModel> pm(pmodel, flat_model());
glClear(GL_DEPTH_BUFFER_BIT);
// dynamicval<videopar> v(vid, vid);
// vid.alpha = vid.scale = 1;
dynamicval<ld> va(vid.alpha, 1);

View File

@ -1509,6 +1509,8 @@ transmatrix screenpos(ld x, ld y) {
return V;
}
EX eModel flat_model() { return MDIM == 4 ? mdFlatten : mdDisk; }
EX transmatrix atscreenpos(ld x, ld y, ld size) {
transmatrix V = Id;

View File

@ -480,7 +480,8 @@ EX namespace inv {
int j = 0, oc = 6;
if(1) {
dynamicval<eModel> pm(pmodel, GDIM == 3 ? mdFlatten : mdDisk);
dynamicval<eModel> pm(pmodel, flat_model());
glClear(GL_DEPTH_BUFFER_BIT);
// dynamicval<videopar> v(vid, vid);
// vid.alpha = vid.scale = 1;
dynamicval<ld> va(vid.alpha, 1);

View File

@ -1289,7 +1289,8 @@ void drawStats() {
if(!racing::on) return;
dynamicval<eModel> pm(pmodel, GDIM == 3 ? mdFlatten : mdDisk);
dynamicval<eModel> pm(pmodel, flat_model());
glClear(GL_DEPTH_BUFFER_BIT);
initquickqueue();
int bsize = vid.fsize * 2;