2019-11-02 13:17:24 -04:00
|
|
|
|
#include <stdio.h>
|
|
|
|
|
#include <dos.h>
|
|
|
|
|
#include <io.h>
|
|
|
|
|
|
|
|
|
|
#include "ack3d.h"
|
|
|
|
|
#include "ackeng.h"
|
|
|
|
|
#include "ackext.h"
|
|
|
|
|
|
2019-11-02 13:44:19 -04:00
|
|
|
|
extern char AckKeyboardSetup;
|
2019-11-02 13:51:40 -04:00
|
|
|
|
extern void (__interrupt __far *OldKeybdInt)();
|
2019-11-02 13:44:19 -04:00
|
|
|
|
extern char AckTimerSetup;
|
2019-11-02 13:51:40 -04:00
|
|
|
|
extern void (__interrupt __far *OldTimerInt)();
|
2019-11-02 13:17:24 -04:00
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
// Frees up buffers and closes any resource file that may be open.
|
|
|
|
|
// After calling this function, do NOT call AckBuildView() or
|
|
|
|
|
// AckDisplayScreen()
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
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)
|
|
|
|
|
{
|
|
|
|
|
close (rsHandle);
|
|
|
|
|
rsHandle = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (AckKeyboardSetup)
|
|
|
|
|
{
|
2019-11-02 13:51:40 -04:00
|
|
|
|
_dos_setvect(0x9, OldKeybdInt);
|
2019-11-02 13:17:24 -04:00
|
|
|
|
AckKeyboardSetup = 0;
|
|
|
|
|
}
|
|
|
|
|
if (AckTimerSetup)
|
|
|
|
|
{
|
2019-11-02 13:51:40 -04:00
|
|
|
|
_dos_setvect(0x1C, OldTimerInt);
|
2019-11-02 13:17:24 -04:00
|
|
|
|
AckTimerSetup = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return (0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// **** End of Source ****
|