Add blinking box to indicate frames
This commit is contained in:
parent
e48e566dd2
commit
e8eba7e90c
@ -481,6 +481,8 @@ int main(int argc, char *argv[])
|
||||
.src = { .w = PWIDTH, .h = PHEIGHT },
|
||||
};
|
||||
|
||||
bool f = true;
|
||||
SDL_SetRenderDrawColor(renderer, 0xff, 0x00, 0x00, 0xff);
|
||||
SDL_Event event;
|
||||
uint64_t prevt = SDL_GetTicks64();
|
||||
while (1) {
|
||||
@ -569,10 +571,16 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
f = !f;
|
||||
|
||||
SDL_RenderClear(renderer);
|
||||
mapdraw();
|
||||
objsdraw(t);
|
||||
entitydraw(&p, t);
|
||||
if (f) {
|
||||
const SDL_Rect i = { .x = 10, .y = 10, .w = 20, .h = 20 };
|
||||
SDL_RenderFillRect(renderer, &i);
|
||||
}
|
||||
SDL_RenderPresent(renderer);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user