From 973f983d2c048eda9f732f4f1e90197e007a4bf5 Mon Sep 17 00:00:00 2001 From: gered Date: Sun, 3 Nov 2019 13:06:11 -0500 Subject: [PATCH] update acklib headers for use in cpp sources. add missing declarations --- ack_lib/ACK3D.H | 23 +++++++++++++++++++++++ ack_lib/ACKENG.H | 8 ++++++++ ack_lib/ACKEXT.H | 8 ++++++++ ack_lib/ACKRTN4.ASM | 5 +++-- ack_lib/IFF.H | 8 ++++++++ 5 files changed, 50 insertions(+), 2 deletions(-) diff --git a/ack_lib/ACK3D.H b/ack_lib/ACK3D.H index 3c4bf25..b2ae777 100644 --- a/ack_lib/ACK3D.H +++ b/ack_lib/ACK3D.H @@ -10,6 +10,10 @@ #include +#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 diff --git a/ack_lib/ACKENG.H b/ack_lib/ACKENG.H index 683e03c..13b0bb0 100644 --- a/ack_lib/ACKENG.H +++ b/ack_lib/ACKENG.H @@ -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 diff --git a/ack_lib/ACKEXT.H b/ack_lib/ACKEXT.H index 3eb5391..706b99e 100644 --- a/ack_lib/ACKEXT.H +++ b/ack_lib/ACKEXT.H @@ -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 diff --git a/ack_lib/ACKRTN4.ASM b/ack_lib/ACKRTN4.ASM index 10189f5..ad4cf56 100644 --- a/ack_lib/ACKRTN4.ASM +++ b/ack_lib/ACKRTN4.ASM @@ -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 diff --git a/ack_lib/IFF.H b/ack_lib/IFF.H index 6c551ad..c0ed00c 100644 --- a/ack_lib/IFF.H +++ b/ack_lib/IFF.H @@ -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