mirror of https://github.com/nmlgc/ReC98.git
[Decompilation] Define generic function pointer types
Going with the classic pointer-in-typedef approach here, because the syntax you'd otherwise have to use is terribly inconsistent. It'd be farfunc_t *near near_ptr_to_far_func; but nearfunc_t near *near_ptr_to_near_func; And that'd hopefully be the last change to ReC98.h for a long time! Those glacial compile times if every .c file is affected… Really stands out if your build system is otherwise perfect. Part of P0030, funded by zorg.
This commit is contained in:
parent
c7fc4ca41d
commit
ac2117040c
11
ReC98.h
11
ReC98.h
|
@ -45,6 +45,17 @@
|
|||
#define RES_PARASIZE ((sizeof(resident_t) + 0xF) >> 4)
|
||||
// ------
|
||||
|
||||
/// Typedefs
|
||||
/// --------
|
||||
// Generic callback function types. Note the difference between function
|
||||
// distance (nearfunc / farfunc) and pointer variable distance
|
||||
// (t_near / t_far).
|
||||
typedef void (near pascal *near nearfunc_t_near)(void);
|
||||
typedef void ( far pascal *near farfunc_t_near)(void);
|
||||
typedef void (near pascal * far nearfunc_t_far)(void);
|
||||
typedef void ( far pascal * far farfunc_t_far)(void);
|
||||
/// --------
|
||||
|
||||
#define RES_X 640
|
||||
#define RES_Y 400
|
||||
|
||||
|
|
Loading…
Reference in New Issue