mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-04-01 00:07:02 +00:00
removed obsolete profiling
This commit is contained in:
parent
c4ab8cca8b
commit
95d4e942e2
@ -2405,8 +2405,6 @@ EX void drawqueue() {
|
|||||||
glClear(GL_STENCIL_BUFFER_BIT);
|
glClear(GL_STENCIL_BUFFER_BIT);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
profile_start(3);
|
|
||||||
|
|
||||||
sort_drawqueue();
|
sort_drawqueue();
|
||||||
|
|
||||||
DEBB(DF_GRAPH, ("sort walls"));
|
DEBB(DF_GRAPH, ("sort walls"));
|
||||||
@ -2437,8 +2435,6 @@ EX void drawqueue() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
profile_stop(3);
|
|
||||||
|
|
||||||
#if CAP_SDL
|
#if CAP_SDL
|
||||||
if(current_display->stereo_active() && !vid.usingGL) {
|
if(current_display->stereo_active() && !vid.usingGL) {
|
||||||
|
|
||||||
|
10
graph.cpp
10
graph.cpp
@ -4667,8 +4667,6 @@ EX void drawthemap() {
|
|||||||
if(sightrange_bonus > 0 && !allowIncreasedSight())
|
if(sightrange_bonus > 0 && !allowIncreasedSight())
|
||||||
sightrange_bonus = 0;
|
sightrange_bonus = 0;
|
||||||
|
|
||||||
profile_frame();
|
|
||||||
profile_start(0);
|
|
||||||
swap(gmatrix0, gmatrix);
|
swap(gmatrix0, gmatrix);
|
||||||
gmatrix.clear();
|
gmatrix.clear();
|
||||||
current_display->all_drawn_copies.clear();
|
current_display->all_drawn_copies.clear();
|
||||||
@ -4742,7 +4740,6 @@ EX void drawthemap() {
|
|||||||
|
|
||||||
arrowtraps.clear();
|
arrowtraps.clear();
|
||||||
|
|
||||||
profile_start(1);
|
|
||||||
make_actual_view();
|
make_actual_view();
|
||||||
currentmap->draw_all();
|
currentmap->draw_all();
|
||||||
drawWormSegments();
|
drawWormSegments();
|
||||||
@ -4757,10 +4754,7 @@ EX void drawthemap() {
|
|||||||
|
|
||||||
callhooks(hooks_frame);
|
callhooks(hooks_frame);
|
||||||
|
|
||||||
profile_stop(1);
|
|
||||||
profile_start(4);
|
|
||||||
drawMarkers();
|
drawMarkers();
|
||||||
profile_stop(4);
|
|
||||||
drawFlashes();
|
drawFlashes();
|
||||||
|
|
||||||
mapeditor::draw_dtshapes();
|
mapeditor::draw_dtshapes();
|
||||||
@ -4818,7 +4812,6 @@ EX void drawthemap() {
|
|||||||
lmouseover = mousedest.d >= 0 ? cwt.at->modmove(cwt.spin + mousedest.d) : cwt.at;
|
lmouseover = mousedest.d >= 0 ? cwt.at->modmove(cwt.spin + mousedest.d) : cwt.at;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
profile_stop(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EX void drawmovestar(double dx, double dy) {
|
EX void drawmovestar(double dx, double dy) {
|
||||||
@ -5006,14 +4999,11 @@ EX void drawfullmap() {
|
|||||||
if(cmode & sm::DRAW) mapeditor::drawGrid();
|
if(cmode & sm::DRAW) mapeditor::drawGrid();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
profile_start(2);
|
|
||||||
|
|
||||||
drawaura();
|
drawaura();
|
||||||
#if CAP_QUEUE
|
#if CAP_QUEUE
|
||||||
drawqueue();
|
drawqueue();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
profile_stop(2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ISMOBILE
|
#if ISMOBILE
|
||||||
|
@ -63,7 +63,6 @@ EX int hyper_main(int argc, char **argv) {
|
|||||||
#endif
|
#endif
|
||||||
mainloop();
|
mainloop();
|
||||||
finishAll();
|
finishAll();
|
||||||
profile_info();
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
12
shmup.cpp
12
shmup.cpp
@ -26,18 +26,6 @@ ld sqdist(shiftpoint a, shiftpoint b) {
|
|||||||
else return intval(a.h, unshift(b, a.shift));
|
else return intval(a.h, unshift(b, a.shift));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
const char *lastprofile = "";
|
|
||||||
int lt = 0;
|
|
||||||
|
|
||||||
void profile(const char *buf) {
|
|
||||||
int gt = SDL_GetTicks();
|
|
||||||
printf("%4d %s\n", gt - lt, lastprofile);
|
|
||||||
lt = gt;
|
|
||||||
lastprofile = buf;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if HDR
|
#if HDR
|
||||||
#define SCALE cgi.scalefactor
|
#define SCALE cgi.scalefactor
|
||||||
#define SCALE2 (SCALE*SCALE)
|
#define SCALE2 (SCALE*SCALE)
|
||||||
|
40
util.cpp
40
util.cpp
@ -72,46 +72,6 @@ EX ld ilerp(ld a0, ld a1, ld x) {
|
|||||||
return (x-a0) / (a1-a0);
|
return (x-a0) / (a1-a0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// debug utilities
|
|
||||||
|
|
||||||
#if CAP_PROFILING
|
|
||||||
|
|
||||||
#define FRAMES 64
|
|
||||||
#define CATS 16
|
|
||||||
|
|
||||||
long long proftable[16][FRAMES];
|
|
||||||
int pframeid;
|
|
||||||
|
|
||||||
void profile_frame() {
|
|
||||||
pframeid++; pframeid %= FRAMES;
|
|
||||||
for(int t=0; t<16; t++) proftable[t][pframeid] = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
EX void profile_start(int t) { proftable[t][pframeid] -= getms(); }
|
|
||||||
EX void profile_stop(int t) { proftable[t][pframeid] += getms(); }
|
|
||||||
|
|
||||||
void profile_info() {
|
|
||||||
for(int t=0; t<16; t++) {
|
|
||||||
sort(proftable[t], proftable[t]+FRAMES);
|
|
||||||
if(proftable[t][FRAMES-1] == 0) continue;
|
|
||||||
long long sum = 0;
|
|
||||||
for(int f=0; f<FRAMES; f++) sum += proftable[t][f];
|
|
||||||
printf("Category %d: avg = %Ld, %Ld..%Ld..%Ld..%Ld..%Ld\n",
|
|
||||||
t, sum / FRAMES, proftable[t][0], proftable[t][16], proftable[t][32],
|
|
||||||
proftable[t][48], proftable[t][63]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !CAP_PROFILING
|
|
||||||
#if HDR
|
|
||||||
#define profile_frame()
|
|
||||||
#define profile_start(t)
|
|
||||||
#define profile_stop(t)
|
|
||||||
#define profile_info()
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
EX purehookset hooks_tests;
|
EX purehookset hooks_tests;
|
||||||
|
|
||||||
EX string simplify(const string& s) {
|
EX string simplify(const string& s) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user