1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-20 23:50:27 +00:00

vertex debug

This commit is contained in:
Zeno Rogue 2020-04-21 23:37:25 +02:00
parent 052be86915
commit 93f1090891
2 changed files with 11 additions and 2 deletions

View File

@ -1386,6 +1386,11 @@ EX namespace ods {
void dqi_poly::draw() {
if(flags & POLY_DEBUG) debug_this();
if(debugflags & DF_VERTEX) {
println(hlog, tie(band_shift, V, offset, cnt, offset_texture, outline, linewidth, flags, intester, cache), (cell*) tinf);
for(int i=0; i<cnt; i++) print(hlog, (*tab)[i]);
println(hlog);
}
#if CAP_ODS
if(vid.stereo_mode == sODS) {
@ -2007,17 +2012,20 @@ EX void draw_main() {
}
}
else {
DEBB(DF_GRAPH, ("draw_main1"));
if(ray::in_use && !ray::comparison_mode) {
ray::cast();
reset_projection();
}
DEBB(DF_GRAPH, ("outcircle"));
for(auto& ptd: ptds) if(ptd->prio == PPR::OUTCIRCLE)
ptd->draw();
if(two_sided_model()) draw_backside();
for(auto& ptd: ptds) if(ptd->prio != PPR::OUTCIRCLE) {
DEBBI(DF_VERTEX, ("prio: ", int(ptd->prio), " color ", ptd->color));
dynamicval<int> ss(spherespecial, among(ptd->prio, PPR::MOBILE_ARROW, PPR::OUTCIRCLE, PPR::CIRCLE) ? 0 : spherespecial);
ptd->draw();
}

View File

@ -25,7 +25,8 @@ EX FILE *debugfile;
#define DF_GP 2048
#define DF_POLY 4096
#define DF_LOG 8192
#define DF_KEYS "imwesxufgbtopl"
#define DF_VERTEX 16384
#define DF_KEYS "imwesxufgbtoplv"
#endif
EX int debugflags = DF_INIT | DF_ERROR | DF_WARN | DF_MSG | DF_TIME | DF_LOG;