ref: 4de94e327d9182a244a29be3ff71e56f18b55b2a
parent: 31e1dbe5dda575cb2ecf0bb910aef476c73b0279
author: Turo Lamminen <turol@iki.fi>
date: Tue Aug 30 16:14:38 EDT 2022
Improve type correctness in heretic DEH code
--- a/src/heretic/deh_frame.c
+++ b/src/heretic/deh_frame.c
@@ -32,7 +32,7 @@
typedef struct
{
int offsets[deh_hhe_num_versions];
- void (*func)();
+ void (*func)(struct mobj_s *, struct player_s *, struct pspdef_s *);
} hhe_action_pointer_t;
// Offsets of action pointers within the Heretic executables.
@@ -216,7 +216,7 @@
return state;
}
-static boolean GetActionPointerForOffset(int offset, void **result)
+static boolean GetActionPointerForOffset(int offset, void (**result)(struct mobj_s *, struct player_s *, struct pspdef_s *))
{
int i;
@@ -289,7 +289,7 @@
if (!strcasecmp(variable_name, "Action pointer"))
{
- void *func;
+ void (*func)(struct mobj_s *, struct player_s *, struct pspdef_s *);
if (!GetActionPointerForOffset(ivalue, &func))
{