Wing Commander
Reconstructed Win32 source (1996)
Loading...
Searching...
No Matches
nearheap.c File Reference

Near-heap descriptor allocation and compaction carried over from DOS. More...

#include <process.h>
#include "wc1.h"

Go to the source code of this file.

Functions

unsigned short MergeAdjacentNearHeapBlocks (int descriptorAddress)
int ReleaseNearHeapBlock (int descriptorAddress)
void PurgeNearHeapBlocks (unsigned short flags)
unsigned short InitializeNearHeap (void)
void ShutdownNearHeap (void)
void * AllocateNearHeapBlockFromEnd (int size, unsigned short flags)
void * AllocateNearHeapBlockByFlags (int size, unsigned short flags)
void FreeNearHeapBlock (void *pointer)
int GetNearHeapBlockSize (void *pointer)

Variables

int nNearHeapSize
int nNearHeapBase
int nCurrentNearHeapFirstDescriptor
void * pCurrentNearHeapAlloc
short nNavMapMaximumPositionX
short nNavigationMapMinimumCoordX
unsigned short awMapNavObjectiveLabelIndex [16]
short nNavMapMaximumPosY
short nNavMapCentreX
short nNavigationMapMinimumPositionY
TextContext stCurrentNavMapTxtCtx
static short nNearHeapActive = 0
short nNearHeapMaxDescriptors = 0x80
static unsigned int nNearHeapRelocationBytes = 0

Detailed Description

Near-heap descriptor allocation and compaction carried over from DOS.

Address range 40e890-40efdf.

Definition in file nearheap.c.

Function Documentation

◆ AllocateNearHeapBlockByFlags()

◆ AllocateNearHeapBlockFromEnd()

◆ FreeNearHeapBlock()

◆ GetNearHeapBlockSize()

◆ InitializeNearHeap()

◆ MergeAdjacentNearHeapBlocks()

unsigned short MergeAdjacentNearHeapBlocks ( int descriptorAddress)

◆ PurgeNearHeapBlocks()

◆ ReleaseNearHeapBlock()

◆ ShutdownNearHeap()

Variable Documentation

◆ awMapNavObjectiveLabelIndex

unsigned short awMapNavObjectiveLabelIndex[16]

Definition at line 18 of file nearheap.c.

Referenced by BuildMap(), and SelectNavObjectiveAtPoint().

◆ nCurrentNearHeapFirstDescriptor

◆ nNavigationMapMinimumCoordX

short nNavigationMapMinimumCoordX

Definition at line 17 of file nearheap.c.

Referenced by CheckPoint(), and SetScale().

◆ nNavigationMapMinimumPositionY

short nNavigationMapMinimumPositionY

Definition at line 21 of file nearheap.c.

Referenced by CheckPoint(), and SetScale().

◆ nNavMapCentreX

short nNavMapCentreX

Definition at line 20 of file nearheap.c.

Referenced by ScaleNavMapCoordinates(), and SetScale().

◆ nNavMapMaximumPositionX

short nNavMapMaximumPositionX

Definition at line 16 of file nearheap.c.

Referenced by CheckPoint(), and SetScale().

◆ nNavMapMaximumPosY

short nNavMapMaximumPosY

Definition at line 19 of file nearheap.c.

Referenced by CheckPoint(), and SetScale().

◆ nNearHeapActive

short nNearHeapActive = 0
static

Definition at line 64 of file nearheap.c.

Referenced by InitializeNearHeap(), PurgeNearHeapBlocks(), and ShutdownNearHeap().

◆ nNearHeapBase

◆ nNearHeapMaxDescriptors

short nNearHeapMaxDescriptors = 0x80

◆ nNearHeapRelocationBytes

unsigned int nNearHeapRelocationBytes = 0
static

Definition at line 66 of file nearheap.c.

Referenced by InitializeNearHeap(), and ShutdownNearHeap().

◆ nNearHeapSize

◆ pCurrentNearHeapAlloc

void* pCurrentNearHeapAlloc

Definition at line 15 of file nearheap.c.

Referenced by InitializeNearHeap(), and ShutdownNearHeap().

◆ stCurrentNavMapTxtCtx

TextContext stCurrentNavMapTxtCtx

Definition at line 22 of file nearheap.c.

Referenced by DrawNavLocationReadout(), InflightComputer(), and UpdateInflightNavText().