update acklib headers for use in cpp sources. add missing declarations

This commit is contained in:
Gered 2019-11-03 13:06:11 -05:00
parent 0789a528be
commit 973f983d2c
5 changed files with 50 additions and 2 deletions

View file

@ -10,6 +10,10 @@
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
// USED TO RID OURSELVES OF THE MANY CASTING PROBLEMS
#define CAST(t,f) (t)(f)
@ -396,6 +400,12 @@ short AckWrapUp(ACKENG *ae);
//*************************************************************************
// The user callable functions defined in ACKUTIL.C.
//*************************************************************************
// Establish a hook into interrupt 9 for keyboard handling
void AckSetupKeyboard(void);
// Establish a hook into the user timer interrupt
void AckSetupTimer(void);
// Internal memory allocation for development purposes
void *AckMalloc(size_t mSize);
@ -438,5 +448,18 @@ void AckSetTextMode(void);
// Displays the contents of ScreenBuffer and OverlayBuffer if desired.
short AckDisplayScreen(void);
//*************************************************************************
// The user callable functions defined in ACKRTN4.ASM.
//*************************************************************************
// Sets the rate at which the timer interrupt will be called
void AckSpeedUp(int rate);
// Restores original timer interrupt call rate
void AckSlowDown(void);
#ifdef __cplusplus
};
#endif
#endif

View file

@ -8,6 +8,10 @@
#ifndef ACKENG_H_INCLUDED
#define ACKENG_H_INCLUDED
#ifdef __cplusplus
extern "C" {
#endif
#define TRANS_WALLS 0
#define FLOOR_ACTIVE 1
#define USE_XMS 0 // Set to 0 if XMS not desired
@ -65,5 +69,9 @@ typedef struct _slicer {
struct _slicer *Next; // References the wall slice behind the current slice
} SLICE;
#ifdef __cplusplus
};
#endif
#endif

View file

@ -3,6 +3,10 @@
#ifndef ACKEXT_H_INCLUDED
#define ACKEXT_H_INCLUDED
#ifdef __cplusplus
extern "C" {
#endif
extern UCHAR *BackArray[];
extern long xPglobal;
extern long yPglobal;
@ -124,5 +128,9 @@ extern volatile long AckTimerCounter;
extern volatile short AckTmCount;
extern volatile short AckTmDelay;
#ifdef __cplusplus
};
#endif
#endif

View file

@ -137,12 +137,13 @@ proc Mymemset_ near
;±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±
; void AckSpeedUp(void)
; void AckSpeedUp(int rate)
; eax: rate
;±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±
proc AckSpeedUp_ near
push ebx
push edx
mov bx,ax
mov ebx,eax
mov ax,0FFFFH
xor dx,dx
idiv bx

View file

@ -1,6 +1,10 @@
#ifndef IFF_H_INCLUDED
#define IFF_H_INCLUDED
#ifdef __cplusplus
extern "C" {
#endif
#ifndef NULL
#define NULL 0
#endif
@ -98,5 +102,9 @@ void ByteFlipShort(short *);
short iffswab(unsigned short);
short swab(unsigned short);
#ifdef __cplusplus
};
#endif
#endif