void loadTexturel ();
void loadPNames ();
void applyPatch ( Texture * tex, TexturePatch& patch );
};
void freePic ' (Pic * pic ); void freeTexture ( Texture * tex );
//////////////////////////// global vars /////////////////////////////////
extern Vertex * vertices;
extern LineDef * lines;
extern SideDef * sides;
extern Sector * sectors;

Компьютерная графика. Полигональные модели

extern Segment * segs;
extern SSector * subSectors;
extern Node * nodes;
extern Thing * things;
extern long * texturel;
extern char * pnames;
extern RGB playPal [14][256];
extern char colorMap [34][256];
extern int numVertices; extern int numLines; extern int nutttSides; extern int numSectors; extern int numSegs; extern int numSubSectors; extern int numNodes; extern int numThings; extern short numPNames; #endif
El // File Wad.cpp
#include <fcnti.h>
#include <io.h>
#include <malloc.h>
#include <process.h>
#include <stdio.h>
#include <string.h>
#include <sys\stat.h>
#include "Wad.h"
Vertex * vertices = NULL;
LineDef * lines = NULL;
SideDef * sides = NULL;
Sector * sectors = NULL;
Segment * segs = NULL;
SSector * subSectors = NULL;
Node * nodes = NULL;
Thing * things = NULL;
long * texturel = NULL;
char * pnames = NULL;
RGB playPal[14][256]; char colorMap [34][256];
int numVertices;
int numLines;
int numSides;
int numSectors;
int numSegs;
int numSubSectors;
int numNodes;
int numThings;
short numPNames;
/////////////////////////// Wad File methods ////////////////////////////

13. Элементы виртуальной реальност

WadFile :: WadFile ( const char * name ) {
if ((file = open (strcpy (fileName, name), 0_RDONLY|0_BINARY)) == -1) {
printf ("\nCannot open %s.", name ); exit ( 1 );

⇐ Предыдущая| |Следующая ⇒