//#if !defined(AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_)
//#define AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_
#ifndef GLOBAL_HPP
#define GLOBAL_HPP

#include <afxwin.h>
//#include <windows.h>
#include <string>
#include <fstream>
#include <stdio.h>
#include <math.h>
#include <gl/gl.h>


using namespace std;

void gluPerspective( float fovy, float aspect, float zNear, float zFar );

// colour
typedef struct RGB_t {
	SHORT r;
	SHORT g;
	SHORT b;
} COL;

// vertex
typedef struct VEC8_t {
	float x;
	float y;
} VEC8;

// vertex
typedef struct VEC12_t {
	float x;
	float y;
	float z;
} VEC12;

// vertex & alpha
typedef struct VEC16_t {
	float x;
	float y;
	float z;
	float a;
} VEC16;

// polygon
typedef struct POLY_t {
	int pointCount;
	short surfaceId;
	short *point;
	VEC12 center;
	VEC12 normal;
} POLY;


// short scaled percentage 0 .. 256  ( must be 2 bytes! )
typedef short IP2;

// float scaled percentage  0.0 .. 100.0 ( must be 4 bytes )
typedef float FP4;

// degrees
typedef float DEG4;

// surface attributes
typedef struct SURF_T {
	string name;	
	COL col;
	short flag;
	short diff;
	// ........
	// ignored all other attributes!! not useful for now
} SURF;



#endif

