mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-20 18:52:28 +00:00
[client] Make the hud update function type explicit
This commit is contained in:
parent
99e12872e5
commit
5f01dc9fb5
2 changed files with 5 additions and 1 deletions
|
@ -28,6 +28,8 @@
|
|||
#ifndef __client_hud_h
|
||||
#define __client_hud_h
|
||||
|
||||
struct view_s;
|
||||
|
||||
enum {
|
||||
hud_href,
|
||||
hud_update,
|
||||
|
@ -43,6 +45,8 @@ enum {
|
|||
hud_comp_count
|
||||
};
|
||||
|
||||
typedef void (*hud_update_f) (struct view_s);
|
||||
|
||||
typedef struct hud_subpic_s {
|
||||
struct qpic_s *pic;
|
||||
uint32_t x, y;
|
||||
|
|
|
@ -278,7 +278,7 @@ draw_update (ecs_pool_t *pool)
|
|||
{
|
||||
uint32_t count = pool->count;
|
||||
uint32_t *ent = pool->dense;
|
||||
void (**func) (view_t) = pool->data;
|
||||
hud_update_f *func = pool->data;
|
||||
while (count-- > 0) {
|
||||
view_t view = { .id = *ent++, .reg = hud_registry };
|
||||
(*func++) (view);
|
||||
|
|
Loading…
Reference in a new issue