-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathACKWRAP.C
79 lines (66 loc) · 1.65 KB
/
ACKWRAP.C
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
//#include <windows.h>
#include "windowsredef.h"
#include <stdlib.h>
#include <stdio.h>
//#include <dos.h>
//#include <mem.h>
//#include <io.h>
//#include <fcntl.h>
#include <time.h>
#include <string.h>
//#include <sys\stat.h>
#include "ACK3D.H"
#include "ACKENG.H"
#include "ACKEXT.H"
typedef struct {
int sel;
int off;
} SELOFF;
extern char AckKeyboardSetup;
extern SELOFF OldKeybdInt;
extern char AckTimerSetup;
extern SELOFF OldTimerInt;
void AckSetIntVector(int VecNum,int sel,int VecOff);
//------------------------------------------------------------------------
// Frees up buffers and closes any resource file that may be open.
// After calling this function, do NOT call AckBuildView() or
// AckDisplayScreen()
//------------------------------------------------------------------------
short AckWrapUp (ACKENG * ae)
{
AckFree (LongTanTable);
AckFree (LongInvTanTable);
AckFree (CosTable);
AckFree (SinTable);
AckFree (LongCosTable);
AckFree (xNextTable);
AckFree (yNextTable);
AckFree (ViewCosTable);
AckFree (AdjustTable);
if (ae->OverlayBuffer != NULL)
AckFree (ae->OverlayBuffer);
ae->OverlayBuffer = NULL;
if (ae->BkgdBuffer != NULL)
AckFree (ae->BkgdBuffer);
ae->BkgdBuffer = NULL;
if (ae->ScreenBuffer != NULL)
AckFree (ae->ScreenBuffer);
ae->ScreenBuffer = NULL;
if (rsHandle)
{
_lclose(rsHandle);
rsHandle = 0;
}
if (AckKeyboardSetup)
{
// AckSetIntVector(9,OldKeybdInt.sel,OldKeybdInt.off);
AckKeyboardSetup = 0;
}
if (AckTimerSetup)
{
// AckSetIntVector(0x1C,OldTimerInt.sel,OldTimerInt.off);
AckTimerSetup = 0;
}
return (0);
}
// **** End of Source ****