mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2026-11-25 08:07:10 +00:00
Merge branch 'master' of https://github.com/zenorogue/hyperrogue
This commit is contained in:
commit
8cc25f3977
6 files changed
+17
-14
No files matched your search
+1
-1
@@ -186,7 +186,7 @@ void celldrawer::setcolors() {
|
||||
fcol = wcol;
|
||||
}
|
||||
|
||||
else if(c->wall == waShallow)
|
||||
else if(c->wall == waShallow || (c->wall == waStrandedBoat && c->land == laOcean && c->landparam >= tidalphase2))
|
||||
fcol = 0x40C0C0;
|
||||
|
||||
// floor colors for all the lands
|
||||
|
||||
+2
-2
@@ -2451,7 +2451,7 @@ extern bool lshiftclick, lctrlclick;
|
||||
|
||||
EX void reverse_transparent_walls() {
|
||||
int pt = int(PPR::TRANSPARENT_WALL);
|
||||
reverse(&ptds[qp0[pt]], &ptds[qp[pt]]);
|
||||
reverse(ptds.data() + qp0[pt], ptds.data() + qp[pt]);
|
||||
}
|
||||
|
||||
EX void set_vr_sphere() {
|
||||
@@ -2641,7 +2641,7 @@ EX void drawqueue() {
|
||||
auto& ap = (dqi_poly&) *ptds[i];
|
||||
ap.cache = xintval(ap.V * ap.intester);
|
||||
}
|
||||
sort(&ptds[qp0[pp]], &ptds[qp[pp]],
|
||||
sort(ptds.data() + qp0[pp], ptds.data() + qp[pp],
|
||||
[] (const unique_ptr<drawqueueitem>& p1, const unique_ptr<drawqueueitem>& p2) {
|
||||
auto& ap1 = (dqi_poly&) *p1;
|
||||
auto& ap2 = (dqi_poly&) *p2;
|
||||
|
||||
+7
-5
@@ -1028,11 +1028,13 @@ EX void create_los() {
|
||||
}
|
||||
}
|
||||
}
|
||||
int magicrange = 0;
|
||||
for(auto c: dcal) if(!in_line_of_sight(c) && in_line_of_sight_for_player(c)) magicrange = c->cpdist;
|
||||
if(magicrange > 3) markOrb(itOrbInvis);
|
||||
else if(magicrange > 2) markOrb(itOrbFrog), markOrb(itOrbDash), markOrb(itOrbPhasing);
|
||||
else markOrb(itOrbAether);
|
||||
if(lineofsight != los::none) {
|
||||
int magicrange = 0;
|
||||
for(auto c: dcal) if(!in_line_of_sight(c) && in_line_of_sight_for_player(c)) magicrange = c->cpdist;
|
||||
if(magicrange > 3) markOrb(itOrbInvis);
|
||||
else if(magicrange > 2) markOrb(itOrbFrog), markOrb(itOrbDash), markOrb(itOrbPhasing);
|
||||
else markOrb(itOrbAether);
|
||||
}
|
||||
recompute_los = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -351,7 +351,7 @@ EX spatial_info get_spatial_info(cell *c) {
|
||||
return spatial_info{SIDE::WATERLEVEL, SIDE::DEEP, F(DEEP), 0};
|
||||
if(c->wall == waReptile)
|
||||
return spatial_info{SIDE::FLOOR, SIDE::FLOOR, F(FLOOR) | F(DEEP), 0};
|
||||
if(c->wall == waShallow)
|
||||
if(c->wall == waShallow || (c->wall == waStrandedBoat && c->land == laOcean && c->landparam >= tidalphase2))
|
||||
return spatial_info{SIDE::WATERLEVEL, SIDE::SHALLOW, F(SHALLOW) | F(DEEP), 0};
|
||||
if(isWateryOrBoat(c) || isChasmy(c))
|
||||
return spatial_info{SIDE::WATERLEVEL, SIDE::DEEP, F(DEEP), 0};
|
||||
|
||||
@@ -684,6 +684,7 @@ EX void teleportTo(cell *dest) {
|
||||
movecost(from, dest, 2);
|
||||
#if CAP_COMPLEX2
|
||||
mine::auto_teleport_charges();
|
||||
if(mine::in_minesweeper()) ++turncount;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -435,14 +435,14 @@ void game_frame() {
|
||||
vel_y = next_y - where_y;
|
||||
|
||||
if(on_floor) {
|
||||
if(keystate[SDLK_LEFT]) vel_x = -d * modv;
|
||||
else if(keystate[SDLK_RIGHT]) vel_x = d * modv;
|
||||
if(keystate[SDL12(SDLK_LEFT, SDL_SCANCODE_LEFT)]) vel_x = -d * modv;
|
||||
else if(keystate[SDL12(SDLK_RIGHT, SDL_SCANCODE_RIGHT)]) vel_x = d * modv;
|
||||
else vel_x = 0;
|
||||
if(keystate[SDLK_UP]) vel_y = -4 * d * modv;
|
||||
if(keystate[SDL12(SDLK_UP, SDL_SCANCODE_UP)]) vel_y = -4 * d * modv;
|
||||
}
|
||||
else {
|
||||
if(keystate[SDLK_LEFT]) vel_x += -d * .01 * moda;
|
||||
else if(keystate[SDLK_RIGHT]) vel_x += d * .01 * moda;
|
||||
if(keystate[SDL12(SDLK_LEFT, SDL_SCANCODE_LEFT)]) vel_x += -d * .01 * moda;
|
||||
else if(keystate[SDL12(SDLK_RIGHT, SDL_SCANCODE_RIGHT)]) vel_x += d * .01 * moda;
|
||||
vel_y += d * grav * moda;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user