2000-09-25 17:43:52 +02:00
|
|
|
/*************/
|
|
|
|
/*** Utils ***/
|
|
|
|
/*************/
|
|
|
|
|
|
|
|
#ifndef __UTILS_HEADER__
|
|
|
|
#define __UTILS_HEADER__
|
|
|
|
|
2000-12-04 17:47:34 +01:00
|
|
|
#include <vector3.h>
|
2000-11-24 23:34:20 +01:00
|
|
|
#include <gl\gl.h>
|
|
|
|
#include <gl\glu.h>
|
2000-10-27 02:06:19 +02:00
|
|
|
|
2000-11-24 23:34:20 +01:00
|
|
|
/**************************************************************************************/
|
|
|
|
typedef signed char s8;
|
|
|
|
typedef signed short s16;
|
|
|
|
typedef signed long s32;
|
|
|
|
//typedef long long s64;
|
|
|
|
|
|
|
|
typedef unsigned char u8;
|
|
|
|
typedef unsigned short u16;
|
|
|
|
typedef unsigned long u32;
|
|
|
|
//typedef unsigned long long u64;
|
|
|
|
|
|
|
|
typedef s8 S8;
|
|
|
|
typedef s16 S16;
|
|
|
|
typedef s32 S32;
|
|
|
|
//typedef s64 S64;
|
|
|
|
|
|
|
|
typedef u8 U8;
|
|
|
|
typedef u16 U16;
|
|
|
|
typedef u32 U32;
|
|
|
|
//typedef u64 U64;
|
2000-09-25 17:43:52 +02:00
|
|
|
|
|
|
|
/**************************************************************************************/
|
2001-02-01 23:48:22 +01:00
|
|
|
class GString;
|
2001-02-14 23:35:47 +01:00
|
|
|
class CMapEditDoc;
|
2000-09-25 17:43:52 +02:00
|
|
|
void DbgMsg(const char * pszFmt,...);
|
2000-10-27 20:18:30 +02:00
|
|
|
|
2000-09-25 17:43:52 +02:00
|
|
|
void BuildGLBox(float XMin,float XMax,float YMin,float YMax,float ZMin,float ZMax);
|
|
|
|
void BuildGLBoxNoNormals(float XMin,float XMax,float YMin,float YMax,float ZMin,float ZMax);
|
2000-10-25 23:00:54 +02:00
|
|
|
void BuildGLQuad(float XMin,float XMax,float YMin,float YMax,float Z);
|
2000-09-25 17:43:52 +02:00
|
|
|
|
2000-11-17 22:36:13 +01:00
|
|
|
CPoint IDToPoint(int ID,int Width);
|
|
|
|
int PointToID(CPoint &Pnt,int Width);
|
|
|
|
|
2000-12-04 17:47:34 +01:00
|
|
|
void SaveTGA(char *Filename,int W,int H,u8 *Data);
|
|
|
|
void SaveBmp(char *Filename,int Width,int Height,RGBQUAD *Pal,u8 *Image);
|
2000-11-24 23:34:20 +01:00
|
|
|
|
2000-12-04 17:47:34 +01:00
|
|
|
void BGR2RGB(int W,int H,u8 *Data);
|
2000-11-28 00:07:07 +01:00
|
|
|
|
|
|
|
void SetFileExt(char *InName,char *OutName,char *Ext);
|
2001-02-01 23:48:22 +01:00
|
|
|
|
|
|
|
void MakeFullFilename(const char *RelName,GString &Out);
|
|
|
|
void MakePathRel2App(const char* In,char *Out);
|
2001-02-06 23:25:39 +01:00
|
|
|
GString GetWorkingPath();
|
2001-02-07 19:46:59 +01:00
|
|
|
void CheckFilename(GString &Filename);
|
2001-02-14 23:35:47 +01:00
|
|
|
|
|
|
|
|
2000-09-25 17:43:52 +02:00
|
|
|
#endif
|