From 9914ddf3ee13721a33aa356812b3e07e70b6db89 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sat, 11 Apr 2020 00:00:31 +0200 Subject: [PATCH] rogueviz::banachtarski:: revived --- rogueviz/banachtarski.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/rogueviz/banachtarski.cpp b/rogueviz/banachtarski.cpp index 047280cd..a3bb5ce0 100644 --- a/rogueviz/banachtarski.cpp +++ b/rogueviz/banachtarski.cpp @@ -291,7 +291,6 @@ ld alphaof(hyperpoint h) { #define ForInfos for(auto& cci: infos) void bantar_frame() { - setGLProjection(); ForInfos cci.second.w = cci.second.c->wall, @@ -387,7 +386,7 @@ void bantar_frame() { gmatrix.clear(); - currentmap->draw(); + drawthemap(); if(0) for(auto p: parent) if(gmatrix.count(p.first) && gmatrix.count(p.second) && infos[p.first].gid == i && infos[p.second].gid == i) queueline(tC0(gmatrix[p.first]), tC0(gmatrix[p.second]), 0xFFFFFFFF, 2); subscr[i] = move(ptds); @@ -414,6 +413,8 @@ void bantar_frame() { cci.second.c->item = cci.second.it, cci.second.c->monst = cci.second.mo, cci.second.c->land = cci.second.land; + + ptds.clear(); } void bantar_anim() { @@ -425,9 +426,10 @@ void bantar_anim() { while(!breakanim) { ticks = SDL_GetTicks() - t; - bantar_frame(); + pushScreen(bantar_frame); + drawscreen(); + popScreen(); - SDL_GL_SwapBuffers(); SDL_Event ev; while(SDL_PollEvent(&ev)) if(ev.type == SDL_KEYDOWN || ev.type == SDL_MOUSEBUTTONDOWN)