mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-11-07 17:23:00 +00:00
nilrider:: sublevels structure and rendering
This commit is contained in:
@@ -418,6 +418,8 @@ void level::init() {
|
||||
}
|
||||
|
||||
init_plan();
|
||||
|
||||
for(auto s: sublevels) s->init();
|
||||
}
|
||||
|
||||
xy_float level::get_xy_f(hyperpoint h) {
|
||||
@@ -482,8 +484,8 @@ int nilrider_shift = 2633;
|
||||
void level::draw_level(const shiftmatrix& V) {
|
||||
int id = 0;
|
||||
init_statues();
|
||||
curlev->init_shapes();
|
||||
curlev->init_textures();
|
||||
init_shapes();
|
||||
init_textures();
|
||||
|
||||
for(auto& t: triangles) {
|
||||
bool gotit = current.collected_triangles & Flag(id);
|
||||
@@ -525,6 +527,11 @@ void level::draw_level(const shiftmatrix& V) {
|
||||
}
|
||||
}
|
||||
|
||||
void level::draw_level_rec(const shiftmatrix& V) {
|
||||
draw_level(V);
|
||||
for(auto sub: sublevels) sub->draw_level_rec(V);
|
||||
}
|
||||
|
||||
void cleanup_texture(texture::texture_data*& d) {
|
||||
if(d) delete d;
|
||||
d = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user