mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-06-24 01:04:08 +00:00
bringris:: refactored clear_map
This commit is contained in:
parent
1bdcbcc2a0
commit
04b6d43427
@ -171,6 +171,7 @@ void shift_block(int dir, bool camera_only = false);
|
|||||||
void rotate_block(int dir, bool camera_only = false);
|
void rotate_block(int dir, bool camera_only = false);
|
||||||
|
|
||||||
void start_new_game();
|
void start_new_game();
|
||||||
|
void clear_map();
|
||||||
void save();
|
void save();
|
||||||
void load();
|
void load();
|
||||||
|
|
||||||
@ -1919,12 +1920,7 @@ void reset_view() {
|
|||||||
pView = tView;
|
pView = tView;
|
||||||
}
|
}
|
||||||
|
|
||||||
void start_new_game() {
|
void clear_map() {
|
||||||
|
|
||||||
timerstart = time(NULL);
|
|
||||||
|
|
||||||
for(auto& p: piecelist) p.count = 0;
|
|
||||||
|
|
||||||
for(auto lev: level) for(int z=0; z<=camera_level+1; z++) {
|
for(auto lev: level) for(int z=0; z<=camera_level+1; z++) {
|
||||||
cell *c = get_at(lev, -z);
|
cell *c = get_at(lev, -z);
|
||||||
setdist(c, 7, nullptr);
|
setdist(c, 7, nullptr);
|
||||||
@ -1945,6 +1941,15 @@ void start_new_game() {
|
|||||||
c->wall = waWaxWall;
|
c->wall = waWaxWall;
|
||||||
c->landparam = (get_hipso(z) & 0xFCFCFC) >> 2;
|
c->landparam = (get_hipso(z) & 0xFCFCFC) >> 2;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void start_new_game() {
|
||||||
|
|
||||||
|
timerstart = time(NULL);
|
||||||
|
|
||||||
|
for(auto& p: piecelist) p.count = 0;
|
||||||
|
|
||||||
|
clear_map();
|
||||||
|
|
||||||
at = get_at(get_center(), -cur.well_size - 1);
|
at = get_at(get_center(), -cur.well_size - 1);
|
||||||
next_shape_id = choose_piece();
|
next_shape_id = choose_piece();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user