mirror of
https://github.com/brmlab/brmlife.git
synced 2025-08-03 02:13:35 +02:00
map::on_tick(): Move to map.cc
This commit is contained in:
parent
ba9d51fda0
commit
ea4f18b642
2 changed files with 8 additions and 5 deletions
7
map.cc
7
map.cc
|
@ -47,6 +47,13 @@ tile::tile_in_dir(int dir_x, int dir_y)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
map::on_tick(void)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < w * h; i++)
|
||||||
|
tiles[i]->on_tick();
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
map::print_map(void)
|
map::print_map(void)
|
||||||
{
|
{
|
||||||
|
|
6
map.h
6
map.h
|
@ -55,11 +55,7 @@ public:
|
||||||
return *tiles[y * w + x];
|
return *tiles[y * w + x];
|
||||||
};
|
};
|
||||||
|
|
||||||
void on_tick(void)
|
void on_tick(void);
|
||||||
{
|
|
||||||
for (int i = 0; i < w * h; i++)
|
|
||||||
tiles[i]->on_tick();
|
|
||||||
}
|
|
||||||
|
|
||||||
void print_map(void);
|
void print_map(void);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue