home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HOT Scene Stuff
/
hotscenestuffzyklop1996.iso
/
demos
/
sunknown
/
seg.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1994-04-06
|
865b
|
44 lines
// SEG.CPP //////////////////////////////////////////////////////////////////
// Thomas H.
// INCLUDES /////////////////////////////////////////////////////////////////
#include <stdio.h>
#include <alloc.h>
#include <stdlib.h>
#include "global.h"
#include "seg.h"
// VARS /////////////////////////////////////////////////////////////////////
long seg_total;
// EXTERNALS ////////////////////////////////////////////////////////////////
extern void newhandler(void);
// METHODS //////////////////////////////////////////////////////////////////
// CONSTRUCTOR
seg_C::seg_C(long len)
{
seglen=len+16l;
seg_total+=seglen;
ptr=ptr2=(byte*)farmalloc(seglen);
if (!ptr)
newhandler();
ptr=(byte*)((long)ptr+0x10000);
ptr-=4;
}
// DESTRUCTOR
seg_C::~seg_C()
{
seg_total-=seglen;
if (ptr2)
farfree(ptr2);
}