1
0
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:
Zeno Rogue
2024-08-18 13:56:46 +02:00
parent 9e9d60635c
commit 81ea54746b
4 changed files with 87 additions and 17 deletions

View File

@@ -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;