Changed #defined constants to consts; typedef struct -> struct
parent
8ffdf2583e
commit
a8665d2042
|
@ -48,14 +48,14 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define AUDIO_TRACK 13 // total number of audio tracks on the CD
|
const int AUDIO_TRACK = 13; // total number of audio tracks on the CD
|
||||||
#define MAX_STEP 0.2f // maximum time for a step
|
const float MAX_STEP = 0.2f; // maximum time for a step
|
||||||
|
|
||||||
#define WINDOW_DX (640+6) // dimensions in windowed mode
|
const int WINDOW_DX = (640+6); // dimensions in windowed mode
|
||||||
#define WINDOW_DY (480+25)
|
const int WINDOW_DY = (480+25);
|
||||||
|
|
||||||
#define USE_THREAD false // true does not work!
|
#define USE_THREAD false // true does not work!
|
||||||
#define TIME_THREAD 0.02f
|
const float TIME_THREAD = 0.02f;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
|
|
||||||
|
|
||||||
#define D3D_OVERLOADS
|
#define D3D_OVERLOADS
|
||||||
|
|
||||||
#include <d3d.h>
|
#include <d3d.h>
|
||||||
|
|
||||||
#include "graphics/d3d/d3dengine.h"
|
#include "graphics/d3d/d3dengine.h"
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
class CInstanceManager;
|
class CInstanceManager;
|
||||||
|
|
||||||
|
|
||||||
#define MAXEVENT 100
|
const int MAXEVENT = 100;
|
||||||
|
|
||||||
// Events.
|
// Events.
|
||||||
|
|
||||||
|
@ -528,7 +528,7 @@ enum EventMsg
|
||||||
EVENT_FORCE_DWORD = 0x7fffffff
|
EVENT_FORCE_DWORD = 0x7fffffff
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct
|
struct Event
|
||||||
{
|
{
|
||||||
EventMsg event; // event (EVENT *)
|
EventMsg event; // event (EVENT *)
|
||||||
long param; // parameter
|
long param; // parameter
|
||||||
|
@ -538,45 +538,44 @@ typedef struct
|
||||||
float axeZ; // control the Z axis (-1 .. 1)
|
float axeZ; // control the Z axis (-1 .. 1)
|
||||||
short keyState; // state of the keyboard (KS_ *)
|
short keyState; // state of the keyboard (KS_ *)
|
||||||
float rTime; // relative time
|
float rTime; // relative time
|
||||||
}
|
};
|
||||||
Event;
|
|
||||||
|
|
||||||
|
|
||||||
#define VK_BUTTON1 (0x100+1) // joystick button 1
|
const int VK_BUTTON1 = (0x100+1); // joystick button 1
|
||||||
#define VK_BUTTON2 (0x100+2) // joystick button 2
|
const int VK_BUTTON2 = (0x100+2); // joystick button 2
|
||||||
#define VK_BUTTON3 (0x100+3) // joystick button 3
|
const int VK_BUTTON3 = (0x100+3); // joystick button 3
|
||||||
#define VK_BUTTON4 (0x100+4) // joystick button 4
|
const int VK_BUTTON4 = (0x100+4); // joystick button 4
|
||||||
#define VK_BUTTON5 (0x100+5) // joystick button 5
|
const int VK_BUTTON5 = (0x100+5); // joystick button 5
|
||||||
#define VK_BUTTON6 (0x100+6) // joystick button 6
|
const int VK_BUTTON6 = (0x100+6); // joystick button 6
|
||||||
#define VK_BUTTON7 (0x100+7) // joystick button 7
|
const int VK_BUTTON7 = (0x100+7); // joystick button 7
|
||||||
#define VK_BUTTON8 (0x100+8) // joystick button 8
|
const int VK_BUTTON8 = (0x100+8); // joystick button 8
|
||||||
#define VK_BUTTON9 (0x100+9) // joystick button 9
|
const int VK_BUTTON9 = (0x100+9); // joystick button 9
|
||||||
#define VK_BUTTON10 (0x100+10) // joystick button 10
|
const int VK_BUTTON10 = (0x100+10); // joystick button 10
|
||||||
#define VK_BUTTON11 (0x100+11) // joystick button 11
|
const int VK_BUTTON11 = (0x100+11); // joystick button 11
|
||||||
#define VK_BUTTON12 (0x100+12) // joystick button 12
|
const int VK_BUTTON12 = (0x100+12); // joystick button 12
|
||||||
#define VK_BUTTON13 (0x100+13) // joystick button 13
|
const int VK_BUTTON13 = (0x100+13); // joystick button 13
|
||||||
#define VK_BUTTON14 (0x100+14) // joystick button 14
|
const int VK_BUTTON14 = (0x100+14); // joystick button 14
|
||||||
#define VK_BUTTON15 (0x100+15) // joystick button 15
|
const int VK_BUTTON15 = (0x100+15); // joystick button 15
|
||||||
#define VK_BUTTON16 (0x100+16) // joystick button 16
|
const int VK_BUTTON16 = (0x100+16); // joystick button 16
|
||||||
#define VK_BUTTON17 (0x100+17) // joystick button 17
|
const int VK_BUTTON17 = (0x100+17); // joystick button 17
|
||||||
#define VK_BUTTON18 (0x100+18) // joystick button 18
|
const int VK_BUTTON18 = (0x100+18); // joystick button 18
|
||||||
#define VK_BUTTON19 (0x100+19) // joystick button 19
|
const int VK_BUTTON19 = (0x100+19); // joystick button 19
|
||||||
#define VK_BUTTON20 (0x100+20) // joystick button 20
|
const int VK_BUTTON20 = (0x100+20); // joystick button 20
|
||||||
#define VK_BUTTON21 (0x100+21) // joystick button 21
|
const int VK_BUTTON21 = (0x100+21); // joystick button 21
|
||||||
#define VK_BUTTON22 (0x100+22) // joystick button 22
|
const int VK_BUTTON22 = (0x100+22); // joystick button 22
|
||||||
#define VK_BUTTON23 (0x100+23) // joystick button 23
|
const int VK_BUTTON23 = (0x100+23); // joystick button 23
|
||||||
#define VK_BUTTON24 (0x100+24) // joystick button 24
|
const int VK_BUTTON24 = (0x100+24); // joystick button 24
|
||||||
#define VK_BUTTON25 (0x100+25) // joystick button 25
|
const int VK_BUTTON25 = (0x100+25); // joystick button 25
|
||||||
#define VK_BUTTON26 (0x100+26) // joystick button 26
|
const int VK_BUTTON26 = (0x100+26); // joystick button 26
|
||||||
#define VK_BUTTON27 (0x100+27) // joystick button 27
|
const int VK_BUTTON27 = (0x100+27); // joystick button 27
|
||||||
#define VK_BUTTON28 (0x100+28) // joystick button 28
|
const int VK_BUTTON28 = (0x100+28); // joystick button 28
|
||||||
#define VK_BUTTON29 (0x100+29) // joystick button 29
|
const int VK_BUTTON29 = (0x100+29); // joystick button 29
|
||||||
#define VK_BUTTON30 (0x100+30) // joystick button 30
|
const int VK_BUTTON30 = (0x100+30); // joystick button 30
|
||||||
#define VK_BUTTON31 (0x100+31) // joystick button 31
|
const int VK_BUTTON31 = (0x100+31); // joystick button 31
|
||||||
#define VK_BUTTON32 (0x100+32) // joystick button 32
|
const int VK_BUTTON32 = (0x100+32); // joystick button 32
|
||||||
|
|
||||||
#define VK_WHEELUP (0x200+1) // Mousewheel up
|
const int VK_WHEELUP = (0x200+1); // Mousewheel up
|
||||||
#define VK_WHEELDOWN (0x200+2) // Mousewheel down
|
const int VK_WHEELDOWN = (0x200+2); // Mousewheel down
|
||||||
|
|
||||||
|
|
||||||
enum KeyRank
|
enum KeyRank
|
||||||
|
|
|
@ -17,39 +17,43 @@
|
||||||
// global.h
|
// global.h
|
||||||
|
|
||||||
|
|
||||||
|
enum BuildType
|
||||||
#define BUILD_FACTORY (1<<0) // factory
|
{
|
||||||
#define BUILD_DERRICK (1<<1) // derrick
|
BUILD_FACTORY = (1<<0), // factory
|
||||||
#define BUILD_CONVERT (1<<2) // converter
|
BUILD_DERRICK = (1<<1), // derrick
|
||||||
#define BUILD_RADAR (1<<3) // radar
|
BUILD_CONVERT = (1<<2), // converter
|
||||||
#define BUILD_ENERGY (1<<4) // factory of cells
|
BUILD_RADAR = (1<<3), // radar
|
||||||
#define BUILD_NUCLEAR (1<<5) // nuclear power plant
|
BUILD_ENERGY = (1<<4), // factory of cells
|
||||||
#define BUILD_STATION (1<<6) // base station
|
BUILD_NUCLEAR = (1<<5), // nuclear power plant
|
||||||
#define BUILD_REPAIR (1<<7) // repair center
|
BUILD_STATION = (1<<6), // base station
|
||||||
#define BUILD_TOWER (1<<8) // defense tower
|
BUILD_REPAIR = (1<<7), // repair center
|
||||||
#define BUILD_RESEARCH (1<<9) // research center
|
BUILD_TOWER = (1<<8), // defense tower
|
||||||
#define BUILD_LABO (1<<10) // laboratory
|
BUILD_RESEARCH = (1<<9), // research center
|
||||||
#define BUILD_PARA (1<<11) // lightning protection
|
BUILD_LABO = (1<<10), // laboratory
|
||||||
#define BUILD_INFO (1<<12) // information terminal
|
BUILD_PARA = (1<<11), // lightning protection
|
||||||
#define BUILD_GFLAT (1<<16) // flat floor
|
BUILD_INFO = (1<<12), // information terminal
|
||||||
#define BUILD_FLAG (1<<17) // puts / removes colored flag
|
BUILD_GFLAT = (1<<16), // flat floor
|
||||||
|
BUILD_FLAG = (1<<17) // puts / removes colored flag
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
// Do not change values was because of backups (bits = ...).
|
// Do not change values was because of backups (bits = ...).
|
||||||
|
enum ResearchType
|
||||||
#define RESEARCH_TANK (1<<0) // caterpillars
|
{
|
||||||
#define RESEARCH_FLY (1<<1) // wings
|
RESEARCH_TANK = (1<<0), // caterpillars
|
||||||
#define RESEARCH_CANON (1<<2) // cannon
|
RESEARCH_FLY = (1<<1), // wings
|
||||||
#define RESEARCH_TOWER (1<<3) // defense tower
|
RESEARCH_CANON = (1<<2), // cannon
|
||||||
#define RESEARCH_ATOMIC (1<<4) // nuclear
|
RESEARCH_TOWER = (1<<3), // defense tower
|
||||||
#define RESEARCH_THUMP (1<<5) // thumper
|
RESEARCH_ATOMIC = (1<<4), // nuclear
|
||||||
#define RESEARCH_SHIELD (1<<6) // shield
|
RESEARCH_THUMP = (1<<5), // thumper
|
||||||
#define RESEARCH_PHAZER (1<<7) // phazer gun
|
RESEARCH_SHIELD = (1<<6), // shield
|
||||||
#define RESEARCH_iPAW (1<<8) // legs of insects
|
RESEARCH_PHAZER = (1<<7), // phazer gun
|
||||||
#define RESEARCH_iGUN (1<<9) // cannon of insects
|
RESEARCH_iPAW = (1<<8), // legs of insects
|
||||||
#define RESEARCH_RECYCLER (1<<10) // recycler
|
RESEARCH_iGUN = (1<<9), // cannon of insects
|
||||||
#define RESEARCH_SUBM (1<<11) // submarine
|
RESEARCH_RECYCLER = (1<<10), // recycler
|
||||||
#define RESEARCH_SNIFFER (1<<12) // sniffer
|
RESEARCH_SUBM = (1<<11), // submarine
|
||||||
|
RESEARCH_SNIFFER = (1<<12) // sniffer
|
||||||
|
};
|
||||||
|
|
||||||
extern long g_id; // unique identifier
|
extern long g_id; // unique identifier
|
||||||
extern long g_build; // constructible buildings
|
extern long g_build; // constructible buildings
|
||||||
|
|
|
@ -23,13 +23,12 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
struct BaseClass
|
||||||
{
|
{
|
||||||
int totalPossible;
|
int totalPossible;
|
||||||
int totalUsed;
|
int totalUsed;
|
||||||
void** classPointer;
|
void** classPointer;
|
||||||
}
|
};
|
||||||
BaseClass;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -22,24 +22,22 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
||||||
#define METAMAX 5
|
const int METAMAX = 5;
|
||||||
|
|
||||||
typedef struct
|
struct MetaHeader
|
||||||
{
|
{
|
||||||
char name[14]; // file name (8.3 max)
|
char name[14]; // file name (8.3 max)
|
||||||
int start; // position from the beginning of the metafile
|
int start; // position from the beginning of the metafile
|
||||||
int len; // length of the file
|
int len; // length of the file
|
||||||
}
|
};
|
||||||
MetaHeader;
|
|
||||||
|
|
||||||
typedef struct
|
struct MetaFile
|
||||||
{
|
{
|
||||||
char name[50]; // name of the metafile
|
char name[50]; // name of the metafile
|
||||||
FILE* stream; // channel
|
FILE* stream; // channel
|
||||||
int total; // number of files
|
int total; // number of files
|
||||||
MetaHeader* headers; // headers of files
|
MetaHeader* headers; // headers of files
|
||||||
}
|
};
|
||||||
MetaFile;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ enum ClassType
|
||||||
CLASS_BLITZ = 27,
|
CLASS_BLITZ = 27,
|
||||||
};
|
};
|
||||||
|
|
||||||
#define CLASS_MAX 30
|
const int CLASS_MAX = 30;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -203,18 +203,18 @@ enum Error
|
||||||
|
|
||||||
// Keyboard state.
|
// Keyboard state.
|
||||||
|
|
||||||
#define KS_PAGEUP (1<<4)
|
const int KS_PAGEUP = (1<<4);
|
||||||
#define KS_PAGEDOWN (1<<5)
|
const int KS_PAGEDOWN = (1<<5);
|
||||||
#define KS_SHIFT (1<<6)
|
const int KS_SHIFT = (1<<6);
|
||||||
#define KS_CONTROL (1<<7)
|
const int KS_CONTROL = (1<<7);
|
||||||
#define KS_MLEFT (1<<8)
|
const int KS_MLEFT = (1<<8);
|
||||||
#define KS_MRIGHT (1<<9)
|
const int KS_MRIGHT = (1<<9);
|
||||||
#define KS_NUMUP (1<<10)
|
const int KS_NUMUP = (1<<10);
|
||||||
#define KS_NUMDOWN (1<<11)
|
const int KS_NUMDOWN = (1<<11);
|
||||||
#define KS_NUMLEFT (1<<12)
|
const int KS_NUMLEFT = (1<<12);
|
||||||
#define KS_NUMRIGHT (1<<13)
|
const int KS_NUMRIGHT = (1<<13);
|
||||||
#define KS_NUMPLUS (1<<14)
|
const int KS_NUMPLUS = (1<<14);
|
||||||
#define KS_NUMMINUS (1<<15)
|
const int KS_NUMMINUS = (1<<15);
|
||||||
|
|
||||||
|
|
||||||
// Procedures.
|
// Procedures.
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define MAX_VERTICES 2000
|
const int MAX_VERTICES = 2000;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -243,14 +243,13 @@ bool CModFile::ReadDXF(char *filename, float min, float max)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
struct InfoMOD
|
||||||
{
|
{
|
||||||
int rev;
|
int rev;
|
||||||
int vers;
|
int vers;
|
||||||
int total;
|
int total;
|
||||||
int reserve[10];
|
int reserve[10];
|
||||||
}
|
};
|
||||||
InfoMOD;
|
|
||||||
|
|
||||||
|
|
||||||
// Change nom.bmp to nom.tga
|
// Change nom.bmp to nom.tga
|
||||||
|
|
|
@ -27,7 +27,7 @@ class CInstanceManager;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
struct OldModelTriangle1
|
||||||
{
|
{
|
||||||
char bUsed; // true -> using
|
char bUsed; // true -> using
|
||||||
char bSelect; // true -> selected
|
char bSelect; // true -> selected
|
||||||
|
@ -38,10 +38,9 @@ typedef struct
|
||||||
char texName[20];
|
char texName[20];
|
||||||
float min;
|
float min;
|
||||||
float max;
|
float max;
|
||||||
}
|
}; // length = 196 bytes
|
||||||
OldModelTriangle1; // length = 196 bytes
|
|
||||||
|
|
||||||
typedef struct
|
struct OldModelTriangle2
|
||||||
{
|
{
|
||||||
char bUsed; // true -> used
|
char bUsed; // true -> used
|
||||||
char bSelect; // true -> selected
|
char bSelect; // true -> selected
|
||||||
|
@ -57,10 +56,9 @@ typedef struct
|
||||||
short reserve2;
|
short reserve2;
|
||||||
short reserve3;
|
short reserve3;
|
||||||
short reserve4;
|
short reserve4;
|
||||||
}
|
};
|
||||||
OldModelTriangle2;
|
|
||||||
|
|
||||||
typedef struct
|
struct ModelTriangle
|
||||||
{
|
{
|
||||||
char bUsed; // true -> used
|
char bUsed; // true -> used
|
||||||
char bSelect; // true -> selected
|
char bSelect; // true -> selected
|
||||||
|
@ -76,8 +74,7 @@ typedef struct
|
||||||
short reserve2;
|
short reserve2;
|
||||||
short reserve3;
|
short reserve3;
|
||||||
short reserve4;
|
short reserve4;
|
||||||
}
|
}; // length = 208 bytes
|
||||||
ModelTriangle; // length = 208 bytes
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -19,10 +19,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
|
||||||
#define STRICT
|
|
||||||
#define D3D_OVERLOADS
|
|
||||||
|
|
||||||
|
|
||||||
extern bool InitCurrentDirectory();
|
extern bool InitCurrentDirectory();
|
||||||
extern bool SetProfileString(char* section, char* key, char* string);
|
extern bool SetProfileString(char* section, char* key, char* string);
|
||||||
extern bool GetProfileString(char* section, char* key, char* buffer, int max);
|
extern bool GetProfileString(char* section, char* key, char* buffer, int max);
|
||||||
|
|
|
@ -49,12 +49,11 @@ void SetGlobalGamerName(char *name)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
struct KeyDesc
|
||||||
{
|
{
|
||||||
KeyRank key;
|
KeyRank key;
|
||||||
char name[20];
|
char name[20];
|
||||||
}
|
};
|
||||||
KeyDesc;
|
|
||||||
|
|
||||||
static KeyDesc keyTable[22] =
|
static KeyDesc keyTable[22] =
|
||||||
{
|
{
|
||||||
|
|
|
@ -44,104 +44,107 @@ enum ResType
|
||||||
|
|
||||||
// Resources of type RES_TEXT.
|
// Resources of type RES_TEXT.
|
||||||
|
|
||||||
#define RT_VERSION_ID 1
|
enum ResTextType
|
||||||
#define RT_DISINFO_TITLE 2
|
{
|
||||||
#define RT_WINDOW_MAXIMIZED 3
|
RT_VERSION_ID = 1,
|
||||||
#define RT_WINDOW_MINIMIZED 4
|
RT_DISINFO_TITLE = 2,
|
||||||
#define RT_WINDOW_STANDARD 5
|
RT_WINDOW_MAXIMIZED = 3,
|
||||||
#define RT_WINDOW_CLOSE 6
|
RT_WINDOW_MINIMIZED = 4,
|
||||||
|
RT_WINDOW_STANDARD = 5,
|
||||||
|
RT_WINDOW_CLOSE = 6,
|
||||||
|
|
||||||
#define RT_STUDIO_TITLE 10
|
RT_STUDIO_TITLE = 10,
|
||||||
#define RT_SCRIPT_NEW 20
|
RT_SCRIPT_NEW = 20,
|
||||||
#define RT_NAME_DEFAULT 21
|
RT_NAME_DEFAULT = 21,
|
||||||
#define RT_IO_NEW 22
|
RT_IO_NEW = 22,
|
||||||
#define RT_KEY_OR 23
|
RT_KEY_OR = 23,
|
||||||
|
|
||||||
#define RT_TITLE_BASE 40
|
RT_TITLE_BASE = 40,
|
||||||
#define RT_TITLE_INIT 41
|
RT_TITLE_INIT = 41,
|
||||||
#define RT_TITLE_TRAINER 42
|
RT_TITLE_TRAINER = 42,
|
||||||
#define RT_TITLE_DEFI 43
|
RT_TITLE_DEFI = 43,
|
||||||
#define RT_TITLE_MISSION 44
|
RT_TITLE_MISSION = 44,
|
||||||
#define RT_TITLE_FREE 45
|
RT_TITLE_FREE = 45,
|
||||||
#define RT_TITLE_PROTO 46
|
RT_TITLE_PROTO = 46,
|
||||||
#define RT_TITLE_SETUP 47
|
RT_TITLE_SETUP = 47,
|
||||||
#define RT_TITLE_NAME 48
|
RT_TITLE_NAME = 48,
|
||||||
#define RT_TITLE_PERSO 49
|
RT_TITLE_PERSO = 49,
|
||||||
#define RT_TITLE_WRITE 50
|
RT_TITLE_WRITE = 50,
|
||||||
#define RT_TITLE_READ 51
|
RT_TITLE_READ = 51,
|
||||||
#define RT_TITLE_USER 52
|
RT_TITLE_USER = 52,
|
||||||
#define RT_TITLE_TEEN 53
|
RT_TITLE_TEEN = 53,
|
||||||
|
|
||||||
#define RT_PLAY_CHAPt 60
|
RT_PLAY_CHAPt = 60,
|
||||||
#define RT_PLAY_CHAPd 61
|
RT_PLAY_CHAPd = 61,
|
||||||
#define RT_PLAY_CHAPm 62
|
RT_PLAY_CHAPm = 62,
|
||||||
#define RT_PLAY_CHAPf 63
|
RT_PLAY_CHAPf = 63,
|
||||||
#define RT_PLAY_CHAPp 64
|
RT_PLAY_CHAPp = 64,
|
||||||
#define RT_PLAY_LISTt 65
|
RT_PLAY_LISTt = 65,
|
||||||
#define RT_PLAY_LISTd 66
|
RT_PLAY_LISTd = 66,
|
||||||
#define RT_PLAY_LISTm 67
|
RT_PLAY_LISTm = 67,
|
||||||
#define RT_PLAY_LISTf 68
|
RT_PLAY_LISTf = 68,
|
||||||
#define RT_PLAY_LISTp 69
|
RT_PLAY_LISTp = 69,
|
||||||
#define RT_PLAY_RESUME 70
|
RT_PLAY_RESUME = 70,
|
||||||
#define RT_PLAY_CHAPu 71
|
RT_PLAY_CHAPu = 71,
|
||||||
#define RT_PLAY_LISTu 72
|
RT_PLAY_LISTu = 72,
|
||||||
#define RT_PLAY_CHAPte 73
|
RT_PLAY_CHAPte = 73,
|
||||||
#define RT_PLAY_LISTk 74
|
RT_PLAY_LISTk = 74,
|
||||||
|
|
||||||
#define RT_SETUP_DEVICE 80
|
RT_SETUP_DEVICE = 80,
|
||||||
#define RT_SETUP_MODE 81
|
RT_SETUP_MODE = 81,
|
||||||
#define RT_SETUP_KEY1 82
|
RT_SETUP_KEY1 = 82,
|
||||||
#define RT_SETUP_KEY2 83
|
RT_SETUP_KEY2 = 83,
|
||||||
|
|
||||||
#define RT_PERSO_FACE 90
|
RT_PERSO_FACE = 90,
|
||||||
#define RT_PERSO_GLASSES 91
|
RT_PERSO_GLASSES = 91,
|
||||||
#define RT_PERSO_HAIR 92
|
RT_PERSO_HAIR = 92,
|
||||||
#define RT_PERSO_COMBI 93
|
RT_PERSO_COMBI = 93,
|
||||||
#define RT_PERSO_BAND 94
|
RT_PERSO_BAND = 94,
|
||||||
|
|
||||||
#define RT_DIALOG_TITLE 100
|
RT_DIALOG_TITLE = 100,
|
||||||
#define RT_DIALOG_ABORT 101
|
RT_DIALOG_ABORT = 101,
|
||||||
#define RT_DIALOG_QUIT 102
|
RT_DIALOG_QUIT = 102,
|
||||||
#define RT_DIALOG_YES 103
|
RT_DIALOG_YES = 103,
|
||||||
#define RT_DIALOG_NO 104
|
RT_DIALOG_NO = 104,
|
||||||
#define RT_DIALOG_DELOBJ 105
|
RT_DIALOG_DELOBJ = 105,
|
||||||
#define RT_DIALOG_DELGAME 106
|
RT_DIALOG_DELGAME = 106,
|
||||||
#define RT_DIALOG_YESDEL 107
|
RT_DIALOG_YESDEL = 107,
|
||||||
#define RT_DIALOG_NODEL 108
|
RT_DIALOG_NODEL = 108,
|
||||||
#define RT_DIALOG_LOADING 109
|
RT_DIALOG_LOADING = 109,
|
||||||
#define RT_DIALOG_YESQUIT 110
|
RT_DIALOG_YESQUIT = 110,
|
||||||
#define RT_DIALOG_NOQUIT 111
|
RT_DIALOG_NOQUIT = 111,
|
||||||
|
|
||||||
#define RT_STUDIO_LISTTT 120
|
RT_STUDIO_LISTTT = 120,
|
||||||
#define RT_STUDIO_COMPOK 121
|
RT_STUDIO_COMPOK = 121,
|
||||||
#define RT_STUDIO_PROGSTOP 122
|
RT_STUDIO_PROGSTOP = 122,
|
||||||
|
|
||||||
#define RT_SATCOM_LIST 140
|
RT_SATCOM_LIST = 140,
|
||||||
#define RT_SATCOM_BOT 141
|
RT_SATCOM_BOT = 141,
|
||||||
#define RT_SATCOM_BUILDING 142
|
RT_SATCOM_BUILDING = 142,
|
||||||
#define RT_SATCOM_FRET 143
|
RT_SATCOM_FRET = 143,
|
||||||
#define RT_SATCOM_ALIEN 144
|
RT_SATCOM_ALIEN = 144,
|
||||||
#define RT_SATCOM_NULL 145
|
RT_SATCOM_NULL = 145,
|
||||||
#define RT_SATCOM_ERROR1 146
|
RT_SATCOM_ERROR1 = 146,
|
||||||
#define RT_SATCOM_ERROR2 147
|
RT_SATCOM_ERROR2 = 147,
|
||||||
|
|
||||||
#define RT_IO_OPEN 150
|
RT_IO_OPEN = 150,
|
||||||
#define RT_IO_SAVE 151
|
RT_IO_SAVE = 151,
|
||||||
#define RT_IO_LIST 152
|
RT_IO_LIST = 152,
|
||||||
#define RT_IO_NAME 153
|
RT_IO_NAME = 153,
|
||||||
#define RT_IO_DIR 154
|
RT_IO_DIR = 154,
|
||||||
#define RT_IO_PRIVATE 155
|
RT_IO_PRIVATE = 155,
|
||||||
#define RT_IO_PUBLIC 156
|
RT_IO_PUBLIC = 156,
|
||||||
|
|
||||||
#define RT_GENERIC_DEV1 170
|
RT_GENERIC_DEV1 = 170,
|
||||||
#define RT_GENERIC_DEV2 171
|
RT_GENERIC_DEV2 = 171,
|
||||||
#define RT_GENERIC_EDIT1 172
|
RT_GENERIC_EDIT1 = 172,
|
||||||
#define RT_GENERIC_EDIT2 173
|
RT_GENERIC_EDIT2 = 173,
|
||||||
|
|
||||||
#define RT_INTERFACE_REC 180
|
RT_INTERFACE_REC = 180,
|
||||||
|
|
||||||
#define RT_MESSAGE_WIN 200
|
RT_MESSAGE_WIN = 200,
|
||||||
#define RT_MESSAGE_LOST 201
|
RT_MESSAGE_LOST = 201,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
static CD3DEngine* g_engine = 0;
|
static CD3DEngine* g_engine = 0;
|
||||||
|
|
|
@ -22,8 +22,6 @@
|
||||||
#include <d3d.h>
|
#include <d3d.h>
|
||||||
|
|
||||||
|
|
||||||
#define NAN 999999
|
|
||||||
|
|
||||||
#define D3DFVF_VERTEX2 (D3DFVF_XYZ|D3DFVF_NORMAL|D3DFVF_TEX2)
|
#define D3DFVF_VERTEX2 (D3DFVF_XYZ|D3DFVF_NORMAL|D3DFVF_TEX2)
|
||||||
|
|
||||||
struct D3DVERTEX2
|
struct D3DVERTEX2
|
||||||
|
|
|
@ -31,8 +31,8 @@ class CSound;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define BLITZPARA 200.0f // radius of lightning protection
|
const float BLITZPARA = 200.0f; // radius of lightning protection
|
||||||
#define BLITZMAX 50
|
const int BLITZMAX = 50;
|
||||||
|
|
||||||
enum BlitzPhase
|
enum BlitzPhase
|
||||||
{
|
{
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define DIMEXPAND 4 // extension of the dimensions
|
const int DIMEXPAND = 4; // extension of the dimensions
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -28,15 +28,14 @@ class CTerrain;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define MAXCLOUDLINE 100
|
const int MAXCLOUDLINE = 100;
|
||||||
|
|
||||||
typedef struct
|
struct CloudLine
|
||||||
{
|
{
|
||||||
short x, y; // beginning
|
short x, y; // beginning
|
||||||
short len; // in length x
|
short len; // in length x
|
||||||
float px1, px2, pz;
|
float px1, px2, pz;
|
||||||
}
|
};
|
||||||
CloudLine;
|
|
||||||
|
|
||||||
|
|
||||||
class CCloud
|
class CCloud
|
||||||
|
|
|
@ -26,21 +26,20 @@ class CInstanceManager;
|
||||||
class CD3DEngine;
|
class CD3DEngine;
|
||||||
|
|
||||||
|
|
||||||
#define D3DMAXLIGHT 100
|
const int D3DMAXLIGHT = 100;
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
struct LightProg
|
||||||
{
|
{
|
||||||
float starting;
|
float starting;
|
||||||
float ending;
|
float ending;
|
||||||
float current;
|
float current;
|
||||||
float progress;
|
float progress;
|
||||||
float speed;
|
float speed;
|
||||||
}
|
};
|
||||||
LightProg;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
struct Light
|
||||||
{
|
{
|
||||||
char bUsed; // true -> light exists
|
char bUsed; // true -> light exists
|
||||||
char bEnable; // true -> light turned on
|
char bEnable; // true -> light turned on
|
||||||
|
@ -54,8 +53,7 @@ typedef struct
|
||||||
LightProg colorRed;
|
LightProg colorRed;
|
||||||
LightProg colorGreen;
|
LightProg colorGreen;
|
||||||
LightProg colorBlue;
|
LightProg colorBlue;
|
||||||
}
|
};
|
||||||
Light;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define MAX_COLORS 9
|
const int MAX_COLORS = 9;
|
||||||
|
|
||||||
static float table_color[MAX_COLORS*3] =
|
static float table_color[MAX_COLORS*3] =
|
||||||
{
|
{
|
||||||
|
@ -57,7 +57,7 @@ static float table_color[MAX_COLORS*3] =
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#define MAX_STATES 10
|
const int MAX_STATES = 10;
|
||||||
|
|
||||||
static int table_state[MAX_STATES] =
|
static int table_state[MAX_STATES] =
|
||||||
{
|
{
|
||||||
|
@ -74,7 +74,7 @@ static int table_state[MAX_STATES] =
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#define MAX_NAMES 23
|
const int MAX_NAMES = 23;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -43,8 +43,8 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define FOG_HSUP 10.0f
|
const float FOG_HSUP = 10.0f;
|
||||||
#define FOG_HINF 100.0f
|
const float FOG_HINF = 100.0f;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -30,17 +30,20 @@ class CWater;
|
||||||
class CObject;
|
class CObject;
|
||||||
|
|
||||||
|
|
||||||
#define MAXPARTICULE 500
|
const int MAXPARTICULE = 500;
|
||||||
#define MAXPARTITYPE 5
|
const int MAXPARTITYPE = 5;
|
||||||
#define MAXTRACK 100
|
const int MAXTRACK = 100;
|
||||||
#define MAXTRACKLEN 10
|
const int MAXTRACKLEN = 10;
|
||||||
#define MAXPARTIFOG 100
|
const int MAXPARTIFOG = 100;
|
||||||
#define MAXWHEELTRACE 1000
|
const int MAXWHEELTRACE = 1000;
|
||||||
|
|
||||||
#define SH_WORLD 0 // particle in the world in the interface
|
enum ParticulePlace
|
||||||
#define SH_FRONT 1 // particle in the world on the interface
|
{
|
||||||
#define SH_INTERFACE 2 // particle in the interface
|
SH_WORLD = 0, // particle in the world in the interface
|
||||||
#define SH_MAX 3
|
SH_FRONT = 1, // particle in the world on the interface
|
||||||
|
SH_INTERFACE = 2, // particle in the interface
|
||||||
|
SH_MAX = 3
|
||||||
|
};
|
||||||
|
|
||||||
// type == 0 -> triangles
|
// type == 0 -> triangles
|
||||||
// type == 1 -> effect00 (black background)
|
// type == 1 -> effect00 (black background)
|
||||||
|
@ -198,7 +201,7 @@ enum ParticulePhase
|
||||||
PARPHEND = 1,
|
PARPHEND = 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct
|
struct Particule
|
||||||
{
|
{
|
||||||
char bUsed; // true -> particle used
|
char bUsed; // true -> particle used
|
||||||
char bRay; // true -> ray with goal
|
char bRay; // true -> ray with goal
|
||||||
|
@ -227,10 +230,9 @@ typedef struct
|
||||||
CObject* objFather; // father object (for example reactor)
|
CObject* objFather; // father object (for example reactor)
|
||||||
short objRank; // rank of the object, or -1
|
short objRank; // rank of the object, or -1
|
||||||
short trackRank; // rank of the drag
|
short trackRank; // rank of the drag
|
||||||
}
|
};
|
||||||
Particule;
|
|
||||||
|
|
||||||
typedef struct
|
struct Track
|
||||||
{
|
{
|
||||||
char bUsed; // true -> drag used
|
char bUsed; // true -> drag used
|
||||||
char bDrawParticule;
|
char bDrawParticule;
|
||||||
|
@ -242,16 +244,14 @@ typedef struct
|
||||||
int head; // head to write index
|
int head; // head to write index
|
||||||
D3DVECTOR pos[MAXTRACKLEN];
|
D3DVECTOR pos[MAXTRACKLEN];
|
||||||
float len[MAXTRACKLEN];
|
float len[MAXTRACKLEN];
|
||||||
}
|
};
|
||||||
Track;
|
|
||||||
|
|
||||||
typedef struct
|
struct WheelTrace
|
||||||
{
|
{
|
||||||
ParticuleType type; // type PARTI*
|
ParticuleType type; // type PARTI*
|
||||||
D3DVECTOR pos[4]; // rectangle positions
|
D3DVECTOR pos[4]; // rectangle positions
|
||||||
float startTime; // beginning of life
|
float startTime; // beginning of life
|
||||||
}
|
};
|
||||||
WheelTrace;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -27,9 +27,9 @@ class CD3DEngine;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define MAXPLANET 10
|
const int MAXPLANET = 10;
|
||||||
|
|
||||||
typedef struct
|
struct Planet
|
||||||
{
|
{
|
||||||
char bUsed; // true -> planet exists
|
char bUsed; // true -> planet exists
|
||||||
FPOINT start; // initial position in degrees
|
FPOINT start; // initial position in degrees
|
||||||
|
@ -40,8 +40,7 @@ typedef struct
|
||||||
char name[20]; // name of the texture
|
char name[20]; // name of the texture
|
||||||
FPOINT uv1, uv2; // texture mapping
|
FPOINT uv1, uv2; // texture mapping
|
||||||
char bTGA; // texture .TGA
|
char bTGA; // texture .TGA
|
||||||
}
|
};
|
||||||
Planet;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -67,23 +67,21 @@ enum PyroType
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
struct PyroBurnPart
|
||||||
{
|
{
|
||||||
int part;
|
int part;
|
||||||
D3DVECTOR initialPos;
|
D3DVECTOR initialPos;
|
||||||
D3DVECTOR finalPos;
|
D3DVECTOR finalPos;
|
||||||
D3DVECTOR initialAngle;
|
D3DVECTOR initialAngle;
|
||||||
D3DVECTOR finalAngle;
|
D3DVECTOR finalAngle;
|
||||||
}
|
};
|
||||||
PyroBurnPart;
|
|
||||||
|
|
||||||
typedef struct
|
struct PyroLightOper
|
||||||
{
|
{
|
||||||
float progress;
|
float progress;
|
||||||
float intensity;
|
float intensity;
|
||||||
D3DCOLORVALUE color;
|
D3DCOLORVALUE color;
|
||||||
}
|
};
|
||||||
PyroLightOper;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
#include "graphics/common/terrain.h"
|
#include "graphics/common/terrain.h"
|
||||||
|
|
||||||
|
|
||||||
#define BMPHEAD 1078
|
const int BMPHEAD = 1078;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
|
||||||
|
#include "math/old/math3d.h"
|
||||||
#include "graphics/d3d/d3dengine.h"
|
#include "graphics/d3d/d3dengine.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -28,7 +29,7 @@ class CWater;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define FLATLIMIT (5.0f*PI/180.0f)
|
const float FLATLIMIT = (5.0f*PI/180.0f);
|
||||||
|
|
||||||
|
|
||||||
enum TerrainRes
|
enum TerrainRes
|
||||||
|
@ -44,9 +45,9 @@ enum TerrainRes
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#define MAXBUILDINGLEVEL 100
|
const int MAXBUILDINGLEVEL = 100;
|
||||||
|
|
||||||
typedef struct
|
struct BuildingLevel
|
||||||
{
|
{
|
||||||
D3DVECTOR center;
|
D3DVECTOR center;
|
||||||
float factor;
|
float factor;
|
||||||
|
@ -58,40 +59,36 @@ typedef struct
|
||||||
float bboxMaxX;
|
float bboxMaxX;
|
||||||
float bboxMinZ;
|
float bboxMinZ;
|
||||||
float bboxMaxZ;
|
float bboxMaxZ;
|
||||||
}
|
};
|
||||||
BuildingLevel;
|
|
||||||
|
|
||||||
|
|
||||||
#define MAXMATTERRAIN 100
|
const int MAXMATTERRAIN = 100;
|
||||||
|
|
||||||
typedef struct
|
struct TerrainMaterial
|
||||||
{
|
{
|
||||||
short id;
|
short id;
|
||||||
char texName[20];
|
char texName[20];
|
||||||
float u,v;
|
float u,v;
|
||||||
float hardness;
|
float hardness;
|
||||||
char mat[4]; // up, right, down, left
|
char mat[4]; // up, right, down, left
|
||||||
}
|
};
|
||||||
TerrainMaterial;
|
|
||||||
|
|
||||||
typedef struct
|
struct DotLevel
|
||||||
{
|
{
|
||||||
short id;
|
short id;
|
||||||
char mat[4]; // up, right, down, left
|
char mat[4]; // up, right, down, left
|
||||||
}
|
};
|
||||||
DotLevel;
|
|
||||||
|
|
||||||
|
|
||||||
#define MAXFLYINGLIMIT 10
|
const int MAXFLYINGLIMIT = 10;
|
||||||
|
|
||||||
typedef struct
|
struct FlyingLimit
|
||||||
{
|
{
|
||||||
D3DVECTOR center;
|
D3DVECTOR center;
|
||||||
float extRadius;
|
float extRadius;
|
||||||
float intRadius;
|
float intRadius;
|
||||||
float maxHeight;
|
float maxHeight;
|
||||||
}
|
};
|
||||||
FlyingLimit;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -26,10 +26,10 @@ class CInstanceManager;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define SMALLFONT 10.0f
|
const float SMALLFONT = 10.0f;
|
||||||
#define BIGFONT 15.0f
|
const float BIGFONT = 15.0f;
|
||||||
|
|
||||||
#define NORMSTRETCH 0.8f
|
const float NORMSTRETCH = 0.8f;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -58,10 +58,10 @@ enum FontColor
|
||||||
COLOR_TABLE = 0x70,
|
COLOR_TABLE = 0x70,
|
||||||
};
|
};
|
||||||
|
|
||||||
#define FONT_MASK 0x03
|
const int FONT_MASK = 0x03;
|
||||||
#define TITLE_MASK 0x0c
|
const int TITLE_MASK = 0x0c;
|
||||||
#define COLOR_MASK 0x70
|
const int COLOR_MASK = 0x70;
|
||||||
#define IMAGE_MASK 0x80
|
const int IMAGE_MASK = 0x80;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -29,20 +29,19 @@ class CSound;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define MAXWATERLINE 500
|
const int MAXWATERLINE = 500;
|
||||||
|
|
||||||
typedef struct
|
struct WaterLine
|
||||||
{
|
{
|
||||||
short x, y; // beginning
|
short x, y; // beginning
|
||||||
short len; // length by x
|
short len; // length by x
|
||||||
float px1, px2, pz;
|
float px1, px2, pz;
|
||||||
}
|
};
|
||||||
WaterLine;
|
|
||||||
|
|
||||||
|
|
||||||
#define MAXWATVAPOR 10
|
const int MAXWATVAPOR = 10;
|
||||||
|
|
||||||
typedef struct
|
struct WaterVapor
|
||||||
{
|
{
|
||||||
bool bUsed;
|
bool bUsed;
|
||||||
ParticuleType type;
|
ParticuleType type;
|
||||||
|
@ -50,8 +49,7 @@ typedef struct
|
||||||
float delay;
|
float delay;
|
||||||
float time;
|
float time;
|
||||||
float last;
|
float last;
|
||||||
}
|
};
|
||||||
WaterVapor;
|
|
||||||
|
|
||||||
|
|
||||||
enum WaterType
|
enum WaterType
|
||||||
|
|
|
@ -47,12 +47,12 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define SIZEBLOC_TEXTURE 50
|
const int SIZEBLOC_TEXTURE = 50;
|
||||||
#define SIZEBLOC_TRANSFORM 100
|
const int SIZEBLOC_TRANSFORM = 100;
|
||||||
#define SIZEBLOC_MINMAX 5
|
const int SIZEBLOC_MINMAX = 5;
|
||||||
#define SIZEBLOC_LIGHT 10
|
const int SIZEBLOC_LIGHT = 10;
|
||||||
#define SIZEBLOC_MATERIAL 100
|
const int SIZEBLOC_MATERIAL = 100;
|
||||||
#define SIZEBLOC_TRIANGLE 200
|
const int SIZEBLOC_TRIANGLE = 200;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -5616,14 +5616,13 @@ void CD3DEngine::DrawMouse()
|
||||||
FPOINT pos, ppos, dim;
|
FPOINT pos, ppos, dim;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
typedef struct
|
struct Mouse
|
||||||
{
|
{
|
||||||
D3DMouse type;
|
D3DMouse type;
|
||||||
int icon1, icon2, iconShadow;
|
int icon1, icon2, iconShadow;
|
||||||
int mode1, mode2;
|
int mode1, mode2;
|
||||||
float hotx, hoty;
|
float hotx, hoty;
|
||||||
}
|
};
|
||||||
Mouse;
|
|
||||||
|
|
||||||
static Mouse table[] =
|
static Mouse table[] =
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,9 +36,9 @@ class CSound;
|
||||||
class CTerrain;
|
class CTerrain;
|
||||||
|
|
||||||
|
|
||||||
#define D3DMAXOBJECT 1200
|
const int D3DMAXOBJECT = 1200;
|
||||||
#define D3DMAXSHADOW 500
|
const int D3DMAXSHADOW = 500;
|
||||||
#define D3DMAXGROUNDSPOT 100
|
const int D3DMAXGROUNDSPOT = 100;
|
||||||
|
|
||||||
|
|
||||||
enum D3DTypeObj
|
enum D3DTypeObj
|
||||||
|
@ -97,39 +97,38 @@ enum D3DShadowType
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#define D3DSTATENORMAL 0 // normal opaque materials
|
const int D3DSTATENORMAL = 0; // normal opaque materials
|
||||||
#define D3DSTATETTb (1<<0) // the transparent texture (black = no)
|
const int D3DSTATETTb = (1<<0); // the transparent texture (black = no)
|
||||||
#define D3DSTATETTw (1<<1) // the transparent texture (white = no)
|
const int D3DSTATETTw = (1<<1); // the transparent texture (white = no)
|
||||||
#define D3DSTATETD (1<<2) // the transparent diffuse color
|
const int D3DSTATETD = (1<<2); // the transparent diffuse color
|
||||||
#define D3DSTATEWRAP (1<<3) // texture wrappe
|
const int D3DSTATEWRAP = (1<<3); // texture wrappe
|
||||||
#define D3DSTATECLAMP (1<<4) // texture borders with solid color
|
const int D3DSTATECLAMP = (1<<4); // texture borders with solid color
|
||||||
#define D3DSTATELIGHT (1<<5) // light texture (ambient max)
|
const int D3DSTATELIGHT = (1<<5); // light texture (ambient max)
|
||||||
#define D3DSTATEDUALb (1<<6) // double black texturing
|
const int D3DSTATEDUALb = (1<<6); // double black texturing
|
||||||
#define D3DSTATEDUALw (1<<7) // double white texturing
|
const int D3DSTATEDUALw = (1<<7); // double white texturing
|
||||||
#define D3DSTATEPART1 (1<<8) // part 1 (no change in. MOD!)
|
const int D3DSTATEPART1 = (1<<8); // part 1 (no change in. MOD!)
|
||||||
#define D3DSTATEPART2 (1<<9) // part 2
|
const int D3DSTATEPART2 = (1<<9); // part 2
|
||||||
#define D3DSTATEPART3 (1<<10) // part 3
|
const int D3DSTATEPART3 = (1<<10); // part 3
|
||||||
#define D3DSTATEPART4 (1<<11) // part 4
|
const int D3DSTATEPART4 = (1<<11); // part 4
|
||||||
#define D3DSTATE2FACE (1<<12) // double-sided face
|
const int D3DSTATE2FACE = (1<<12); // double-sided face
|
||||||
#define D3DSTATEALPHA (1<<13) // image using alpha channel
|
const int D3DSTATEALPHA = (1<<13); // image using alpha channel
|
||||||
#define D3DSTATESECOND (1<<14) // always use 2nd floor texturing
|
const int D3DSTATESECOND = (1<<14); // always use 2nd floor texturing
|
||||||
#define D3DSTATEFOG (1<<15) // causes the fog
|
const int D3DSTATEFOG = (1<<15); // causes the fog
|
||||||
#define D3DSTATETCb (1<<16) // the transparent color (black = no)
|
const int D3DSTATETCb = (1<<16); // the transparent color (black = no)
|
||||||
#define D3DSTATETCw (1<<17) // the transparent color (white = no)
|
const int D3DSTATETCw = (1<<17); // the transparent color (white = no)
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
struct D3DTriangle
|
||||||
{
|
{
|
||||||
D3DVERTEX2 triangle[3];
|
D3DVERTEX2 triangle[3];
|
||||||
D3DMATERIAL7 material;
|
D3DMATERIAL7 material;
|
||||||
int state;
|
int state;
|
||||||
char texName1[20];
|
char texName1[20];
|
||||||
char texName2[20];
|
char texName2[20];
|
||||||
}
|
};
|
||||||
D3DTriangle;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
struct D3DObjLevel6
|
||||||
{
|
{
|
||||||
int totalPossible;
|
int totalPossible;
|
||||||
int totalUsed;
|
int totalUsed;
|
||||||
|
@ -137,56 +136,50 @@ typedef struct
|
||||||
int state;
|
int state;
|
||||||
D3DTypeTri type; // D3DTYPE6x
|
D3DTypeTri type; // D3DTYPE6x
|
||||||
D3DVERTEX2 vertex[1];
|
D3DVERTEX2 vertex[1];
|
||||||
}
|
};
|
||||||
D3DObjLevel6;
|
|
||||||
|
|
||||||
typedef struct
|
struct D3DObjLevel5
|
||||||
{
|
{
|
||||||
int totalPossible;
|
int totalPossible;
|
||||||
int totalUsed;
|
int totalUsed;
|
||||||
int reserve;
|
int reserve;
|
||||||
D3DObjLevel6* table[1];
|
D3DObjLevel6* table[1];
|
||||||
}
|
};
|
||||||
D3DObjLevel5;
|
|
||||||
|
|
||||||
typedef struct
|
struct D3DObjLevel4
|
||||||
{
|
{
|
||||||
int totalPossible;
|
int totalPossible;
|
||||||
int totalUsed;
|
int totalUsed;
|
||||||
float min, max;
|
float min, max;
|
||||||
D3DObjLevel5* table[1];
|
D3DObjLevel5* table[1];
|
||||||
}
|
};
|
||||||
D3DObjLevel4;
|
|
||||||
|
|
||||||
typedef struct
|
struct D3DObjLevel3
|
||||||
{
|
{
|
||||||
int totalPossible;
|
int totalPossible;
|
||||||
int totalUsed;
|
int totalUsed;
|
||||||
int objRank;
|
int objRank;
|
||||||
D3DObjLevel4* table[1];
|
D3DObjLevel4* table[1];
|
||||||
}
|
};
|
||||||
D3DObjLevel3;
|
|
||||||
|
|
||||||
typedef struct
|
struct D3DObjLevel2
|
||||||
{
|
{
|
||||||
int totalPossible;
|
int totalPossible;
|
||||||
int totalUsed;
|
int totalUsed;
|
||||||
char texName1[20];
|
char texName1[20];
|
||||||
char texName2[20];
|
char texName2[20];
|
||||||
D3DObjLevel3* table[1];
|
D3DObjLevel3* table[1];
|
||||||
}
|
};
|
||||||
D3DObjLevel2;
|
|
||||||
|
|
||||||
typedef struct
|
struct D3DObjLevel1
|
||||||
{
|
{
|
||||||
int totalPossible;
|
int totalPossible;
|
||||||
int totalUsed;
|
int totalUsed;
|
||||||
D3DObjLevel2* table[1];
|
D3DObjLevel2* table[1];
|
||||||
}
|
};
|
||||||
D3DObjLevel1;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
struct D3DObject
|
||||||
{
|
{
|
||||||
char bUsed; // true -> object exists
|
char bUsed; // true -> object exists
|
||||||
char bVisible; // true -> visible object
|
char bVisible; // true -> visible object
|
||||||
|
@ -201,10 +194,9 @@ typedef struct
|
||||||
float radius; // radius of the sphere at the origin
|
float radius; // radius of the sphere at the origin
|
||||||
int shadowRank; // rank of the associated shadow
|
int shadowRank; // rank of the associated shadow
|
||||||
float transparency; // transparency of the object (0 .. 1)
|
float transparency; // transparency of the object (0 .. 1)
|
||||||
}
|
};
|
||||||
D3DObject;
|
|
||||||
|
|
||||||
typedef struct
|
struct D3DShadow
|
||||||
{
|
{
|
||||||
char bUsed; // true -> object exists
|
char bUsed; // true -> object exists
|
||||||
char bHide; // true -> invisible shadow (object carried by ex.)
|
char bHide; // true -> invisible shadow (object carried by ex.)
|
||||||
|
@ -216,10 +208,9 @@ typedef struct
|
||||||
float radius; // radius of the shadow
|
float radius; // radius of the shadow
|
||||||
float intensity; // intensity of the shadow
|
float intensity; // intensity of the shadow
|
||||||
float height; // height from the ground
|
float height; // height from the ground
|
||||||
}
|
};
|
||||||
D3DShadow;
|
|
||||||
|
|
||||||
typedef struct
|
struct D3DGroundSpot
|
||||||
{
|
{
|
||||||
char bUsed; // true -> object exists
|
char bUsed; // true -> object exists
|
||||||
D3DCOLORVALUE color; // color of the shadow
|
D3DCOLORVALUE color; // color of the shadow
|
||||||
|
@ -229,10 +220,9 @@ typedef struct
|
||||||
float radius; // radius of the shadow
|
float radius; // radius of the shadow
|
||||||
D3DVECTOR drawPos; // drawn to position the shade
|
D3DVECTOR drawPos; // drawn to position the shade
|
||||||
float drawRadius; // radius of the shadow drawn
|
float drawRadius; // radius of the shadow drawn
|
||||||
}
|
};
|
||||||
D3DGroundSpot;
|
|
||||||
|
|
||||||
typedef struct
|
struct D3DGroundMark
|
||||||
{
|
{
|
||||||
char bUsed; // true -> object exists
|
char bUsed; // true -> object exists
|
||||||
char bDraw; // true -> drawn mark
|
char bDraw; // true -> drawn mark
|
||||||
|
@ -247,8 +237,7 @@ typedef struct
|
||||||
float drawIntensity; // current drawn
|
float drawIntensity; // current drawn
|
||||||
int dx, dy; // dimensions table
|
int dx, dy; // dimensions table
|
||||||
char* table; // pointer to the table
|
char* table; // pointer to the table
|
||||||
}
|
};
|
||||||
D3DGroundMark;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -48,14 +48,14 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define BASE_LAND_TIME 7.5f // hard landing
|
const float BASE_LAND_TIME = 7.5f; // hard landing
|
||||||
#define BASE_TAKO_TIME 10.0f // hard landing
|
const float BASE_TAKO_TIME = 10.0f; // hard landing
|
||||||
#define BASE_DOOR_TIME 6.0f // time opening / closing
|
const float BASE_DOOR_TIME = 6.0f; // time opening / closing
|
||||||
#define BASE_DOOR_TIME2 2.0f // time opening / closing suppl.
|
const float BASE_DOOR_TIME2 = 2.0f; // time opening / closing suppl.
|
||||||
#define BASE_PORTICO_TIME_MOVE 16.0f // gate advance time
|
const float BASE_PORTICO_TIME_MOVE = 16.0f; // gate advance time
|
||||||
#define BASE_PORTICO_TIME_DOWN 4.0f // gate length down
|
const float BASE_PORTICO_TIME_DOWN = 4.0f; // gate length down
|
||||||
#define BASE_PORTICO_TIME_OPEN 4.0f // gate opening duration
|
const float BASE_PORTICO_TIME_OPEN = 4.0f; // gate opening duration
|
||||||
#define BASE_TRANSIT_TIME 15.0f // transit duration
|
const float BASE_TRANSIT_TIME = 15.0f; // transit duration
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -31,15 +31,16 @@ class CCamera;
|
||||||
class CObject;
|
class CObject;
|
||||||
|
|
||||||
|
|
||||||
|
enum AutoBaseParam
|
||||||
#define PARAM_STOP 0 // run=0 -> stops and open
|
{
|
||||||
#define PARAM_LANDING 1 // run=1 -> landing
|
PARAM_STOP = 0, // run=0 -> stops and open
|
||||||
#define PARAM_PORTICO 2 // run=2 -> gate on the ground
|
PARAM_LANDING = 1, // run=1 -> landing
|
||||||
#define PARAM_FIXSCENE 3 // run=3 -> open and stops to win / lost
|
PARAM_PORTICO = 2, // run=2 -> gate on the ground
|
||||||
#define PARAM_TRANSIT1 11 // run=11 -> transit in space
|
PARAM_FIXSCENE = 3, // run=3 -> open and stops to win / lost
|
||||||
#define PARAM_TRANSIT2 12 // run=12 -> transit in space
|
PARAM_TRANSIT1 = 11, // run=11 -> transit in space
|
||||||
#define PARAM_TRANSIT3 13 // run=13 -> transit in space
|
PARAM_TRANSIT2 = 12, // run=12 -> transit in space
|
||||||
|
PARAM_TRANSIT3 = 13 // run=13 -> transit in space
|
||||||
|
};
|
||||||
|
|
||||||
enum AutoBasePhase
|
enum AutoBasePhase
|
||||||
{
|
{
|
||||||
|
|
|
@ -43,8 +43,8 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define DERRICK_DELAY 10.0f // duration of the extraction
|
const float DERRICK_DELAY = 10.0f; // duration of the extraction
|
||||||
#define DERRICK_DELAYu 30.0f // same, but for uranium
|
const float DERRICK_DELAYu = 30.0f; // same, but for uranium
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -46,8 +46,8 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define ENERGY_POWER 0.4f // Necessary energy for a battery
|
const float ENERGY_POWER = 0.4f; // Necessary energy for a battery
|
||||||
#define ENERGY_DELAY 12.0f // processing time
|
const float ENERGY_DELAY = 12.0f; // processing time
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ class CObject;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
struct HustonLens
|
||||||
{
|
{
|
||||||
int parti;
|
int parti;
|
||||||
ParticuleType type;
|
ParticuleType type;
|
||||||
|
@ -40,11 +40,10 @@ typedef struct
|
||||||
float dim;
|
float dim;
|
||||||
float total;
|
float total;
|
||||||
float off;
|
float off;
|
||||||
}
|
};
|
||||||
HustonLens;
|
|
||||||
|
|
||||||
|
|
||||||
#define HUSTONMAXLENS 20
|
const int HUSTONMAXLENS = 20;
|
||||||
|
|
||||||
|
|
||||||
class CAutoHuston : public CAuto
|
class CAutoHuston : public CAuto
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define LABO_DELAY 20.0f // duration of the analysis
|
const float LABO_DELAY = 20.0f; // duration of the analysis
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define NUCLEAR_DELAY 30.0f // duration of the generation
|
const float NUCLEAR_DELAY = 30.0f; // duration of the generation
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -44,20 +44,20 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define PARAM_DEPOSE 2 // run=2 -> deposits the spaceship
|
const int PARAM_DEPOSE = 2; // run=2 -> deposits the spaceship
|
||||||
|
|
||||||
#define PORTICO_POSa 75.0f
|
const float PORTICO_POSa = 75.0f;
|
||||||
#define PORTICO_POSb 65.0f
|
const float PORTICO_POSb = 65.0f;
|
||||||
#define PORTICO_ANGLE1a ( 25.0f*PI/180.0f)
|
const float PORTICO_ANGLE1a = ( 25.0f*PI/180.0f);
|
||||||
#define PORTICO_ANGLE1b ( 70.0f*PI/180.0f)
|
const float PORTICO_ANGLE1b = ( 70.0f*PI/180.0f);
|
||||||
#define PORTICO_ANGLE2a (-37.5f*PI/180.0f)
|
const float PORTICO_ANGLE2a = (-37.5f*PI/180.0f);
|
||||||
#define PORTICO_ANGLE2b (-62.5f*PI/180.0f)
|
const float PORTICO_ANGLE2b = (-62.5f*PI/180.0f);
|
||||||
#define PORTICO_ANGLE3a (-77.5f*PI/180.0f)
|
const float PORTICO_ANGLE3a = (-77.5f*PI/180.0f);
|
||||||
#define PORTICO_ANGLE3b (-30.0f*PI/180.0f)
|
const float PORTICO_ANGLE3b = (-30.0f*PI/180.0f);
|
||||||
|
|
||||||
#define PORTICO_TIME_MOVE 16.0f
|
const float PORTICO_TIME_MOVE = 16.0f;
|
||||||
#define PORTICO_TIME_DOWN 4.0f
|
const float PORTICO_TIME_DOWN = 4.0f;
|
||||||
#define PORTICO_TIME_OPEN 12.0f
|
const float PORTICO_TIME_OPEN = 12.0f;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define OPEN_DELAY 8.0f // duration of opening
|
const float OPEN_DELAY = 8.0f; // duration of opening
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -47,8 +47,8 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define TOWER_SCOPE 200.0f // range of beam
|
const float TOWER_SCOPE = 200.0f; // range of beam
|
||||||
#define ENERGY_FIRE 0.125f // energy consumed by fire
|
const float ENERGY_FIRE = 0.125f; // energy consumed by fire
|
||||||
|
|
||||||
|
|
||||||
// Object's constructor.
|
// Object's constructor.
|
||||||
|
|
|
@ -69,7 +69,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define MAXTRACERECORD 1000
|
const int MAXTRACERECORD = 1000;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ class CSound;
|
||||||
class CParticule;
|
class CParticule;
|
||||||
|
|
||||||
|
|
||||||
#define BRAINMAXSCRIPT 10
|
const int BRAINMAXSCRIPT = 10;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -59,12 +59,11 @@ enum TraceOper
|
||||||
TO_PEN = 4, // color change
|
TO_PEN = 4, // color change
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct
|
struct TraceRecord
|
||||||
{
|
{
|
||||||
TraceOper oper;
|
TraceOper oper;
|
||||||
float param;
|
float param;
|
||||||
}
|
};
|
||||||
TraceRecord;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
|
|
||||||
|
|
||||||
#define ADJUST_ANGLE false // true -> adjusts the angles of the members
|
#define ADJUST_ANGLE false // true -> adjusts the angles of the members
|
||||||
#define START_TIME 1000.0f // beginning of the relative time
|
const float START_TIME = 1000.0f; // beginning of the relative time
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -32,19 +32,24 @@ class CBrain;
|
||||||
class CPhysics;
|
class CPhysics;
|
||||||
class CObject;
|
class CObject;
|
||||||
|
|
||||||
|
enum MotionAntAction
|
||||||
|
{
|
||||||
|
MA_MARCH = 0,
|
||||||
|
MA_STOP = 1,
|
||||||
|
MA_SPEC = 2
|
||||||
|
};
|
||||||
|
|
||||||
#define MA_MARCH 0
|
enum MotionAntSpecialAction
|
||||||
#define MA_STOP 1
|
{
|
||||||
#define MA_SPEC 2
|
MAS_PREPARE = 0,
|
||||||
|
MAS_FIRE = 1,
|
||||||
#define MAS_PREPARE 0
|
MAS_TERMINATE = 2,
|
||||||
#define MAS_FIRE 1
|
MAS_BURN = 3,
|
||||||
#define MAS_TERMINATE 2
|
MAS_RUIN = 4,
|
||||||
#define MAS_BURN 3
|
MAS_BACK1 = 5,
|
||||||
#define MAS_RUIN 4
|
MAS_BACK2 = 6,
|
||||||
#define MAS_BACK1 5
|
MAS_BACK3 = 7
|
||||||
#define MAS_BACK2 6
|
};
|
||||||
#define MAS_BACK3 7
|
|
||||||
|
|
||||||
|
|
||||||
class CMotionAnt : public CMotion
|
class CMotionAnt : public CMotion
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
|
|
||||||
|
|
||||||
#define ADJUST_ANGLE false // true -> adjusts the angles of the members
|
#define ADJUST_ANGLE false // true -> adjusts the angles of the members
|
||||||
#define START_TIME 1000.0f // beginning of the relative time
|
const float START_TIME = 1000.0f; // beginning of the relative time
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -33,12 +33,18 @@ class CPhysics;
|
||||||
class CObject;
|
class CObject;
|
||||||
|
|
||||||
|
|
||||||
#define MB_MARCH 0
|
enum MotionBeeAction
|
||||||
#define MB_SPEC 1
|
{
|
||||||
|
MB_MARCH = 0,
|
||||||
|
MB_SPEC = 1
|
||||||
|
};
|
||||||
|
|
||||||
#define MBS_HOLD 0
|
enum MotionBeeSpecialAction
|
||||||
#define MBS_BURN 1
|
{
|
||||||
#define MBS_RUIN 2
|
MBS_HOLD = 0,
|
||||||
|
MBS_BURN = 1,
|
||||||
|
MBS_RUIN = 2
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
class CMotionBee : public CMotion
|
class CMotionBee : public CMotion
|
||||||
|
|
|
@ -46,9 +46,9 @@
|
||||||
|
|
||||||
|
|
||||||
#define ADJUST_ANGLE false // true -> adjusts the angles of the members
|
#define ADJUST_ANGLE false // true -> adjusts the angles of the members
|
||||||
#define ADJUST_ACTION (3*3*3*3*MH_SPEC+3*3*3*MHS_SATCOM)
|
const int ADJUST_ACTION = (3*3*3*3*MH_SPEC+3*3*3*MHS_SATCOM);
|
||||||
|
|
||||||
#define START_TIME 1000.0f // beginning of the relative time
|
const float START_TIME = 1000.0f; // beginning of the relative time
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -34,30 +34,36 @@ class CPhysics;
|
||||||
class CObject;
|
class CObject;
|
||||||
|
|
||||||
|
|
||||||
#define MH_MARCH 0
|
enum MotionHumanAction
|
||||||
#define MH_MARCHTAKE 1
|
{
|
||||||
#define MH_TURN 2
|
MH_MARCH = 0,
|
||||||
#define MH_STOP 3
|
MH_MARCHTAKE = 1,
|
||||||
#define MH_FLY 4
|
MH_TURN = 2,
|
||||||
#define MH_SWIM 5
|
MH_STOP = 3,
|
||||||
#define MH_SPEC 6
|
MH_FLY = 4,
|
||||||
|
MH_SWIM = 5,
|
||||||
|
MH_SPEC = 6
|
||||||
|
};
|
||||||
|
|
||||||
#define MHS_FIRE 0
|
enum MotionHumanSpecialAction
|
||||||
#define MHS_GUN 1
|
{
|
||||||
#define MHS_TAKE 2
|
MHS_FIRE = 0,
|
||||||
#define MHS_TAKEOTHER 3
|
MHS_GUN = 1,
|
||||||
#define MHS_TAKEHIGH 4
|
MHS_TAKE = 2,
|
||||||
#define MHS_UPRIGHT 5
|
MHS_TAKEOTHER = 3,
|
||||||
#define MHS_WIN 6
|
MHS_TAKEHIGH = 4,
|
||||||
#define MHS_LOST 7
|
MHS_UPRIGHT = 5,
|
||||||
#define MHS_DEADg 8
|
MHS_WIN = 6,
|
||||||
#define MHS_DEADg1 9
|
MHS_LOST = 7,
|
||||||
#define MHS_DEADg2 10
|
MHS_DEADg = 8,
|
||||||
#define MHS_DEADg3 11
|
MHS_DEADg1 = 9,
|
||||||
#define MHS_DEADg4 12
|
MHS_DEADg2 = 10,
|
||||||
#define MHS_DEADw 13
|
MHS_DEADg3 = 11,
|
||||||
#define MHS_FLAG 14
|
MHS_DEADg4 = 12,
|
||||||
#define MHS_SATCOM 15
|
MHS_DEADw = 13,
|
||||||
|
MHS_FLAG = 14,
|
||||||
|
MHS_SATCOM = 15
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
class CMotionHuman : public CMotion
|
class CMotionHuman : public CMotion
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
|
|
||||||
|
|
||||||
#define ADJUST_ANGLE false // true -> adjusts the angles of the members
|
#define ADJUST_ANGLE false // true -> adjusts the angles of the members
|
||||||
#define START_TIME 1000.0f // beginning of the relative time
|
const float START_TIME = 1000.0f; // beginning of the relative time
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
|
|
||||||
|
|
||||||
#define ADJUST_ANGLE false // true -> adjusts the angles of the members
|
#define ADJUST_ANGLE false // true -> adjusts the angles of the members
|
||||||
#define START_TIME 1000.0f // beginning of the relative time
|
const float START_TIME = 1000.0f; // beginning of the relative time
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -33,16 +33,22 @@ class CPhysics;
|
||||||
class CObject;
|
class CObject;
|
||||||
|
|
||||||
|
|
||||||
#define MS_MARCH 0
|
enum MotionSpiderAction
|
||||||
#define MS_STOP 1
|
{
|
||||||
#define MS_SPEC 2
|
MS_MARCH = 0,
|
||||||
|
MS_STOP = 1,
|
||||||
|
MS_SPEC = 2
|
||||||
|
};
|
||||||
|
|
||||||
#define MSS_BURN 0
|
enum MotionSpiderSpecialAction
|
||||||
#define MSS_RUIN 1
|
{
|
||||||
#define MSS_EXPLO 2
|
MSS_BURN = 0,
|
||||||
#define MSS_BACK1 3
|
MSS_RUIN = 1,
|
||||||
#define MSS_BACK2 4
|
MSS_EXPLO = 2,
|
||||||
#define MSS_BACK3 5
|
MSS_BACK1 = 3,
|
||||||
|
MSS_BACK2 = 4,
|
||||||
|
MSS_BACK3 = 5
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
class CMotionSpider : public CMotion
|
class CMotionSpider : public CMotion
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define START_TIME 1000.0f // beginning of the relative time
|
const float START_TIME = 1000.0f; // beginning of the relative time
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -34,10 +34,13 @@ class CBrain;
|
||||||
class CPhysics;
|
class CPhysics;
|
||||||
|
|
||||||
|
|
||||||
#define MT_ERROR 0
|
enum MotionTotoAction
|
||||||
#define MT_WARNING 1
|
{
|
||||||
#define MT_INFO 2
|
MT_ERROR = 0,
|
||||||
#define MT_MESSAGE 3
|
MT_WARNING = 1,
|
||||||
|
MT_INFO = 2,
|
||||||
|
MT_MESSAGE = 3
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
class CMotionToto : public CMotion
|
class CMotionToto : public CMotion
|
||||||
|
|
|
@ -43,10 +43,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define ARM_NEUTRAL_ANGLE1 110.0f*PI/180.0f
|
|
||||||
#define ARM_NEUTRAL_ANGLE2 -130.0f*PI/180.0f
|
|
||||||
#define ARM_NEUTRAL_ANGLE3 -50.0f*PI/180.0f
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Object's constructor.
|
// Object's constructor.
|
||||||
|
|
|
@ -43,10 +43,10 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define START_TIME 1000.0f // beginning of the relative time
|
const float START_TIME = 1000.0f; // beginning of the relative time
|
||||||
#define TIME_UPDOWN 2.0f // time for up / down
|
const float TIME_UPDOWN = 2.0f; // time for up / down
|
||||||
#define DOWN_ALTITUDE 3.0f // underground distance
|
const float DOWN_ALTITUDE = 3.0f; // underground distance
|
||||||
#define WORM_PART 7 // number of parts of a worm
|
const int WORM_PART = 7; // number of parts of a worm
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -91,11 +91,11 @@
|
||||||
|
|
||||||
|
|
||||||
#define ADJUST_ONBOARD false // true -> adjusts the camera ONBOARD
|
#define ADJUST_ONBOARD false // true -> adjusts the camera ONBOARD
|
||||||
#define ADJUST_ARM false // true -> adjusts the manipulator arm
|
#define ADJUST_ARM false // true -> adjusts the manipulator arm
|
||||||
#define VIRUS_DELAY 60.0f // duration of virus infection
|
const float VIRUS_DELAY = 60.0f; // duration of virus infection
|
||||||
#define LOSS_SHIELD 0.24f // loss of the shield by shot
|
const float LOSS_SHIELD = 0.24f; // loss of the shield by shot
|
||||||
#define LOSS_SHIELD_H 0.10f // loss of the shield for humans
|
const float LOSS_SHIELD_H = 0.10f; // loss of the shield for humans
|
||||||
#define LOSS_SHIELD_M 0.02f // loss of the shield for the laying
|
const float LOSS_SHIELD_M = 0.02f; // loss of the shield for the laying
|
||||||
|
|
||||||
#if ADJUST_ONBOARD
|
#if ADJUST_ONBOARD
|
||||||
static float debug_x = 0.0f;
|
static float debug_x = 0.0f;
|
||||||
|
|
|
@ -42,11 +42,11 @@ class CScript;
|
||||||
|
|
||||||
// The father of all parts must always be the part number zero!
|
// The father of all parts must always be the part number zero!
|
||||||
|
|
||||||
#define OBJECTMAXPART 40
|
const int OBJECTMAXPART = 40;
|
||||||
#define MAXCRASHSPHERE 40
|
const int MAXCRASHSPHERE = 40;
|
||||||
#define OBJECTMAXDESELLIST 10
|
const int OBJECTMAXDESELLIST = 10;
|
||||||
#define OBJECTMAXINFO 10
|
const int OBJECTMAXINFO = 10;
|
||||||
#define OBJECTMAXCMDLINE 20
|
const int OBJECTMAXCMDLINE = 20;
|
||||||
|
|
||||||
enum ObjectType
|
enum ObjectType
|
||||||
{
|
{
|
||||||
|
@ -303,7 +303,7 @@ enum ObjectMaterial
|
||||||
OM_MINERAL = 5, // stone
|
OM_MINERAL = 5, // stone
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct
|
struct ObjectPart
|
||||||
{
|
{
|
||||||
char bUsed;
|
char bUsed;
|
||||||
int object; // number of the object in CD3DEngine
|
int object; // number of the object in CD3DEngine
|
||||||
|
@ -319,10 +319,9 @@ typedef struct
|
||||||
D3DMATRIX matRotate;
|
D3DMATRIX matRotate;
|
||||||
D3DMATRIX matTransform;
|
D3DMATRIX matTransform;
|
||||||
D3DMATRIX matWorld;
|
D3DMATRIX matWorld;
|
||||||
}
|
};
|
||||||
ObjectPart;
|
|
||||||
|
|
||||||
typedef struct
|
struct Character
|
||||||
{
|
{
|
||||||
float wheelFront; // position X of the front wheels
|
float wheelFront; // position X of the front wheels
|
||||||
float wheelBack; // position X of the back wheels
|
float wheelBack; // position X of the back wheels
|
||||||
|
@ -330,15 +329,13 @@ typedef struct
|
||||||
float wheelRight; // position Z of the right wheels
|
float wheelRight; // position Z of the right wheels
|
||||||
float height; // normal height on top of ground
|
float height; // normal height on top of ground
|
||||||
D3DVECTOR posPower; // position of the battery
|
D3DVECTOR posPower; // position of the battery
|
||||||
}
|
};
|
||||||
Character;
|
|
||||||
|
|
||||||
typedef struct
|
struct Info
|
||||||
{
|
{
|
||||||
char name[20]; // name of the information
|
char name[20]; // name of the information
|
||||||
float value; // value of the information
|
float value; // value of the information
|
||||||
}
|
};
|
||||||
Info;
|
|
||||||
|
|
||||||
enum ExploType
|
enum ExploType
|
||||||
{
|
{
|
||||||
|
|
|
@ -81,7 +81,7 @@
|
||||||
|
|
||||||
|
|
||||||
#define CBOT_STACK true // saves the stack of programs CBOT
|
#define CBOT_STACK true // saves the stack of programs CBOT
|
||||||
#define UNIT 4.0f
|
const float UNIT = 4.0f;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,7 @@ class CDisplayInfo;
|
||||||
class CSound;
|
class CSound;
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
struct EndTake
|
||||||
{
|
{
|
||||||
D3DVECTOR pos;
|
D3DVECTOR pos;
|
||||||
float dist;
|
float dist;
|
||||||
|
@ -97,26 +97,24 @@ typedef struct
|
||||||
int lost; // lost if <=
|
int lost; // lost if <=
|
||||||
bool bImmediat;
|
bool bImmediat;
|
||||||
char message[100];
|
char message[100];
|
||||||
}
|
};
|
||||||
EndTake;
|
|
||||||
|
|
||||||
|
|
||||||
#define MAXNEWSCRIPTNAME 20
|
const int MAXNEWSCRIPTNAME = 20;
|
||||||
|
|
||||||
typedef struct
|
struct NewScriptName
|
||||||
{
|
{
|
||||||
bool bUsed;
|
bool bUsed;
|
||||||
ObjectType type;
|
ObjectType type;
|
||||||
char name[40];
|
char name[40];
|
||||||
}
|
};
|
||||||
NewScriptName;
|
|
||||||
|
|
||||||
|
|
||||||
#define MAXSHOWLIMIT 5
|
const int MAXSHOWLIMIT = 5;
|
||||||
#define MAXSHOWPARTI 200
|
const int MAXSHOWPARTI = 200;
|
||||||
#define SHOWLIMITTIME 20.0f
|
const float SHOWLIMITTIME = 20.0f;
|
||||||
|
|
||||||
typedef struct
|
struct ShowLimit
|
||||||
{
|
{
|
||||||
bool bUsed;
|
bool bUsed;
|
||||||
D3DVECTOR pos;
|
D3DVECTOR pos;
|
||||||
|
@ -126,17 +124,16 @@ typedef struct
|
||||||
CObject* link;
|
CObject* link;
|
||||||
float duration;
|
float duration;
|
||||||
float time;
|
float time;
|
||||||
}
|
};
|
||||||
ShowLimit;
|
|
||||||
|
|
||||||
|
|
||||||
#define SATCOM_HUSTON 0
|
const int SATCOM_HUSTON = 0;
|
||||||
#define SATCOM_SAT 1
|
const int SATCOM_SAT = 1;
|
||||||
#define SATCOM_OBJECT 2
|
const int SATCOM_OBJECT = 2;
|
||||||
#define SATCOM_LOADING 3
|
const int SATCOM_LOADING = 3;
|
||||||
#define SATCOM_PROG 4
|
const int SATCOM_PROG = 4;
|
||||||
#define SATCOM_SOLUCE 5
|
const int SATCOM_SOLUCE = 5;
|
||||||
#define SATCOM_MAX 6
|
const int SATCOM_MAX = 6;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
|
|
||||||
|
|
||||||
#include "common/misc.h"
|
#include "common/misc.h"
|
||||||
|
#include "math/old/math3d.h"
|
||||||
|
|
||||||
|
|
||||||
class CInstanceManager;
|
class CInstanceManager;
|
||||||
|
@ -39,19 +40,19 @@ class CDisplayText;
|
||||||
class CSound;
|
class CSound;
|
||||||
|
|
||||||
|
|
||||||
#define TAKE_DIST 6.0f // distance to an object to pick it
|
const float TAKE_DIST = 6.0f; // distance to an object to pick it
|
||||||
#define TAKE_DIST_OTHER 1.5f // additional distance if on friend
|
const float TAKE_DIST_OTHER = 1.5f; // additional distance if on friend
|
||||||
|
|
||||||
//?#define ARM_NEUTRAL_ANGLE1 155.0f*PI/180.0f
|
//?const float ARM_NEUTRAL_ANGLE1 = 155.0f*PI/180.0f;
|
||||||
//?#define ARM_NEUTRAL_ANGLE2 -125.0f*PI/180.0f
|
//?const float ARM_NEUTRAL_ANGLE2 = -125.0f*PI/180.0f;
|
||||||
//?#define ARM_NEUTRAL_ANGLE3 -45.0f*PI/180.0f
|
//?const float ARM_NEUTRAL_ANGLE3 = -45.0f*PI/180.0f;
|
||||||
#define ARM_NEUTRAL_ANGLE1 110.0f*PI/180.0f
|
const float ARM_NEUTRAL_ANGLE1 = 110.0f*PI/180.0f;
|
||||||
#define ARM_NEUTRAL_ANGLE2 -130.0f*PI/180.0f
|
const float ARM_NEUTRAL_ANGLE2 = -130.0f*PI/180.0f;
|
||||||
#define ARM_NEUTRAL_ANGLE3 -50.0f*PI/180.0f
|
const float ARM_NEUTRAL_ANGLE3 = -50.0f*PI/180.0f;
|
||||||
|
|
||||||
#define ARM_STOCK_ANGLE1 110.0f*PI/180.0f
|
const float ARM_STOCK_ANGLE1 = 110.0f*PI/180.0f;
|
||||||
#define ARM_STOCK_ANGLE2 -100.0f*PI/180.0f
|
const float ARM_STOCK_ANGLE2 = -100.0f*PI/180.0f;
|
||||||
#define ARM_STOCK_ANGLE3 -70.0f*PI/180.0f
|
const float ARM_STOCK_ANGLE3 = -70.0f*PI/180.0f;
|
||||||
|
|
||||||
|
|
||||||
class CTask
|
class CTask
|
||||||
|
|
|
@ -30,8 +30,8 @@ class CPhysics;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define BUILDMARGIN 16.0f
|
const float BUILDMARGIN = 16.0f;
|
||||||
#define TBMAXLIGHT 4
|
const int TBMAXLIGHT = 4;
|
||||||
|
|
||||||
|
|
||||||
enum TaskBuildPhase
|
enum TaskBuildPhase
|
||||||
|
|
|
@ -40,9 +40,9 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define ENERGY_FIRE (0.25f/2.5f) // energy consumed/shot
|
const float ENERGY_FIRE = (0.25f/2.5f); // energy consumed/shot
|
||||||
#define ENERGY_FIREr (0.25f/1.5f) // energy consumed/ray
|
const float ENERGY_FIREr = (0.25f/1.5f); // energy consumed/ray
|
||||||
#define ENERGY_FIREi (0.10f/2.5f) // energy consumed/organic
|
const float ENERGY_FIREi = (0.10f/2.5f); // energy consumed/organic
|
||||||
|
|
||||||
|
|
||||||
// Object's constructor.
|
// Object's constructor.
|
||||||
|
|
|
@ -39,9 +39,9 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define FLY_DIST_GROUND 80.0f // minimum distance to remain on the ground
|
const float FLY_DIST_GROUND = 80.0f; // minimum distance to remain on the ground
|
||||||
#define FLY_DEF_HEIGHT 50.0f // default flying height
|
const float FLY_DEF_HEIGHT = 50.0f; // default flying height
|
||||||
#define BM_DIM_STEP 5.0f
|
const float BM_DIM_STEP = 5.0f;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ class CObject;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define MAXPOINTS 500
|
const int MAXPOINTS = 500;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -42,14 +42,14 @@
|
||||||
#include "object/task/taskmanip.h"
|
#include "object/task/taskmanip.h"
|
||||||
|
|
||||||
|
|
||||||
//?#define MARGIN_FRONT 2.0f
|
//?const float MARGIN_FRONT = 2.0f;
|
||||||
//?#define MARGIN_BACK 2.0f
|
//?const float MARGIN_BACK = 2.0f;
|
||||||
//?#define MARGIN_FRIEND 2.0f
|
//?const float MARGIN_FRIEND = 2.0f;
|
||||||
//?#define MARGIN_BEE 5.0f
|
//?const float MARGIN_BEE = 5.0f;
|
||||||
#define MARGIN_FRONT 4.0f //OK 1.9
|
const float MARGIN_FRONT = 4.0f; //OK 1.9
|
||||||
#define MARGIN_BACK 4.0f //OK 1.9
|
const float MARGIN_BACK = 4.0f; //OK 1.9
|
||||||
#define MARGIN_FRIEND 4.0f //OK 1.9
|
const float MARGIN_FRIEND = 4.0f; //OK 1.9
|
||||||
#define MARGIN_BEE 5.0f //OK 1.9
|
const float MARGIN_BEE = 5.0f; //OK 1.9
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -40,8 +40,8 @@
|
||||||
#include "object/task/taskrecover.h"
|
#include "object/task/taskrecover.h"
|
||||||
|
|
||||||
|
|
||||||
#define ENERGY_RECOVER 0.25f // energy consumed by recovery
|
const float ENERGY_RECOVER = 0.25f; // energy consumed by recovery
|
||||||
#define RECOVER_DIST 11.8f
|
const float RECOVER_DIST = 11.8f;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
#include "object/task/taskshield.h"
|
#include "object/task/taskshield.h"
|
||||||
|
|
||||||
|
|
||||||
#define ENERGY_TIME 20.0f // maximum duration if full battery
|
const float ENERGY_TIME = 20.0f; // maximum duration if full battery
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -30,8 +30,8 @@ class CPhysics;
|
||||||
class CObject;
|
class CObject;
|
||||||
|
|
||||||
|
|
||||||
#define RADIUS_SHIELD_MIN 40.0f // minimal radius of the protected zone
|
const float RADIUS_SHIELD_MIN = 40.0f; // minimum radius of the protected zone
|
||||||
#define RADIUS_SHIELD_MAX 100.0f // maximal radius of the protected zone
|
const float RADIUS_SHIELD_MAX = 100.0f; // maximum radius of the protected zone
|
||||||
|
|
||||||
|
|
||||||
enum TaskShieldPhase
|
enum TaskShieldPhase
|
||||||
|
|
|
@ -44,8 +44,8 @@
|
||||||
#include "object/task/taskterraform.h"
|
#include "object/task/taskterraform.h"
|
||||||
|
|
||||||
|
|
||||||
#define ENERGY_TERRA 0.40f // energy consumed by blow
|
const float ENERGY_TERRA = 0.40f; // energy consumed by blow
|
||||||
#define ACTION_RADIUS 400.0f
|
const float ACTION_RADIUS = 400.0f;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -49,9 +49,9 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define LANDING_SPEED 3.0f
|
const float LANDING_SPEED = 3.0f;
|
||||||
#define LANDING_ACCEL 5.0f
|
const float LANDING_ACCEL = 5.0f;
|
||||||
#define LANDING_ACCELh 1.5f
|
const float LANDING_ACCELh = 1.5f;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ enum PhysicsMode
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
struct Motion
|
||||||
{
|
{
|
||||||
D3DVECTOR advanceAccel; // acceleration starting (+)
|
D3DVECTOR advanceAccel; // acceleration starting (+)
|
||||||
D3DVECTOR recedeAccel; // acceleration starting (+)
|
D3DVECTOR recedeAccel; // acceleration starting (+)
|
||||||
|
@ -78,8 +78,7 @@ typedef struct
|
||||||
D3DVECTOR realSpeed; // real speed(+/-)
|
D3DVECTOR realSpeed; // real speed(+/-)
|
||||||
|
|
||||||
D3DVECTOR finalInclin; // final inclination
|
D3DVECTOR finalInclin; // final inclination
|
||||||
}
|
};
|
||||||
Motion;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -53,10 +53,10 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define CBOT_IPF 100 // CBOT: number of instructions / frame
|
const int CBOT_IPF = 100; // CBOT: number of instructions / frame
|
||||||
|
|
||||||
#define ERM_CONT 0 // if error -> continue
|
const int ERM_CONT = 0; // if error -> continue
|
||||||
#define ERM_STOP 1 // if error -> stop
|
const int ERM_STOP = 1; // if error -> stop
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -35,8 +35,8 @@
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
#define LXIMAGE 640
|
const int LXIMAGE = 640;
|
||||||
#define LYIMAGE 480
|
const int LYIMAGE = 480;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -22,10 +22,10 @@
|
||||||
#include <dsound.h>
|
#include <dsound.h>
|
||||||
|
|
||||||
|
|
||||||
#define MAXFILES 200
|
const int MAXFILES = 200;
|
||||||
#define MAXSOUND 32
|
const int MAXSOUND = 32;
|
||||||
#define MAXVOLUME 20
|
const int MAXVOLUME = 20;
|
||||||
#define MAXOPER 4
|
const int MAXOPER = 4;
|
||||||
|
|
||||||
class CInstanceManager;
|
class CInstanceManager;
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@ enum SoundNext
|
||||||
SOPER_LOOP = 3,
|
SOPER_LOOP = 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct
|
struct SoundOper
|
||||||
{
|
{
|
||||||
char bUsed;
|
char bUsed;
|
||||||
float finalAmplitude;
|
float finalAmplitude;
|
||||||
|
@ -131,10 +131,9 @@ typedef struct
|
||||||
float totalTime;
|
float totalTime;
|
||||||
float currentTime;
|
float currentTime;
|
||||||
SoundNext nextOper;
|
SoundNext nextOper;
|
||||||
}
|
};
|
||||||
SoundOper;
|
|
||||||
|
|
||||||
typedef struct
|
struct SoundChannel
|
||||||
{
|
{
|
||||||
char bUsed; // buffer used?
|
char bUsed; // buffer used?
|
||||||
char bMute; // silence?
|
char bMute; // silence?
|
||||||
|
@ -151,8 +150,7 @@ typedef struct
|
||||||
float volume; // 2D: volume 1..0 depending on position
|
float volume; // 2D: volume 1..0 depending on position
|
||||||
float pan; // 2D: pan -1..+1 depending on position
|
float pan; // 2D: pan -1..+1 depending on position
|
||||||
SoundOper oper[MAXOPER];
|
SoundOper oper[MAXOPER];
|
||||||
}
|
};
|
||||||
SoundChannel;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -33,8 +33,8 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define DELAY1 0.4f
|
const float DELAY1 = 0.4f;
|
||||||
#define DELAY2 0.1f
|
const float DELAY2 = 0.1f;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -33,8 +33,8 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define DELAY1 0.4f
|
const float DELAY1 = 0.4f;
|
||||||
#define DELAY2 0.1f
|
const float DELAY2 = 0.1f;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -32,23 +32,26 @@ class CParticule;
|
||||||
class CSound;
|
class CSound;
|
||||||
|
|
||||||
|
|
||||||
#define STATE_ENABLE (1<<0) // active
|
enum ControlState
|
||||||
#define STATE_CHECK (1<<1) // pressed
|
{
|
||||||
#define STATE_HILIGHT (1<<2) // overflown by mouse
|
STATE_ENABLE = (1<<0), // active
|
||||||
#define STATE_PRESS (1<<3) // pressed by mouse
|
STATE_CHECK = (1<<1), // pressed
|
||||||
#define STATE_VISIBLE (1<<4) // visible
|
STATE_HILIGHT = (1<<2), // overflown by mouse
|
||||||
#define STATE_DEAD (1<<5) // inaccessible (x)
|
STATE_PRESS = (1<<3), // pressed by mouse
|
||||||
#define STATE_DEFAULT (1<<6) // actuated by RETURN
|
STATE_VISIBLE = (1<<4), // visible
|
||||||
#define STATE_OKAY (1<<7) // green point at the bottom right
|
STATE_DEAD = (1<<5), // inaccessible (x)
|
||||||
#define STATE_SHADOW (1<<8) // shadow
|
STATE_DEFAULT = (1<<6), // actuated by RETURN
|
||||||
#define STATE_GLINT (1<<9) // dynamic reflection
|
STATE_OKAY = (1<<7), // green point at the bottom right
|
||||||
#define STATE_CARD (1<<10) // tab
|
STATE_SHADOW = (1<<8), // shadow
|
||||||
#define STATE_EXTEND (1<<11) // extended mode
|
STATE_GLINT = (1<<9), // dynamic reflection
|
||||||
#define STATE_SIMPLY (1<<12) // undecorated
|
STATE_CARD = (1<<10), // tab
|
||||||
#define STATE_FRAME (1<<13) // framework highlighting
|
STATE_EXTEND = (1<<11), // extended mode
|
||||||
#define STATE_WARNING (1<<14) // framework hatched yellow / black
|
STATE_SIMPLY = (1<<12), // undecorated
|
||||||
#define STATE_VALUE (1<<15) // displays the value
|
STATE_FRAME = (1<<13), // framework highlighting
|
||||||
#define STATE_RUN (1<<16) // running program
|
STATE_WARNING = (1<<14), // framework hatched yellow / black
|
||||||
|
STATE_VALUE = (1<<15), // displays the value
|
||||||
|
STATE_RUN = (1<<16) // running program
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -950,12 +950,11 @@ CObject* CDisplayInfo::SearchToto()
|
||||||
|
|
||||||
// Creating the list of objects.
|
// Creating the list of objects.
|
||||||
|
|
||||||
typedef struct
|
struct ObjectList
|
||||||
{
|
{
|
||||||
int total;
|
int total;
|
||||||
ObjectType type;
|
ObjectType type;
|
||||||
}
|
};
|
||||||
ObjectList;
|
|
||||||
|
|
||||||
void ObjectAdd(ObjectList list[], ObjectType type)
|
void ObjectAdd(ObjectList list[], ObjectType type)
|
||||||
{
|
{
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define FONTSIZE 12.0f
|
const float FONTSIZE = 12.0f;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ enum TextType
|
||||||
TT_MESSAGE = 4,
|
TT_MESSAGE = 4,
|
||||||
};
|
};
|
||||||
|
|
||||||
#define MAXDTLINE 4
|
const int MAXDTLINE = 4;
|
||||||
|
|
||||||
|
|
||||||
class CDisplayText
|
class CDisplayText
|
||||||
|
|
|
@ -38,13 +38,13 @@
|
||||||
#include "ui/edit.h"
|
#include "ui/edit.h"
|
||||||
|
|
||||||
|
|
||||||
#define MARGX (5.0f/640.0f)
|
const float MARGX = (5.0f/640.0f);
|
||||||
#define MARGY (5.0f/480.0f)
|
const float MARGY = (5.0f/480.0f);
|
||||||
#define MARGYS (4.0f/480.0f)
|
const float MARGYS = (4.0f/480.0f);
|
||||||
#define MARGY1 (1.0f/480.0f)
|
const float MARGY1 = (1.0f/480.0f);
|
||||||
#define DELAY_DBCLICK 0.3f // time limit for double-click
|
const float DELAY_DBCLICK = 0.3f; // time limit for double-click
|
||||||
#define DELAY_SCROLL 0.1f // time limit for scroll
|
const float DELAY_SCROLL = 0.1f; // time limit for scroll
|
||||||
#define BIG_FONT 1.6f // expansion for \b;
|
const float BIG_FONT = 1.6f; // expansion for \b;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -28,15 +28,15 @@ class CScroll;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define EDITSTUDIOMAX 20000 // maximum number of characters in CBOT edit
|
const int EDITSTUDIOMAX = 20000; // maximum number of characters in CBOT edit
|
||||||
#define EDITLINEMAX 1000 // maximum total number of lines
|
const int EDITLINEMAX = 1000; // maximum total number of lines
|
||||||
#define EDITIMAGEMAX 50 // maximum total number of lines with images
|
const int EDITIMAGEMAX = 50; // maximum total number of lines with images
|
||||||
#define EDITLINKMAX 100 // maximum number of links
|
const int EDITLINKMAX = 100; // maximum number of links
|
||||||
#define EDITHISTORYMAX 50 // max number of levels preserves
|
const int EDITHISTORYMAX = 50; // max number of levels preserves
|
||||||
|
|
||||||
#define EDITUNDOMAX 20 // max number of successive undo
|
const int EDITUNDOMAX = 20; // max number of successive undo
|
||||||
|
|
||||||
typedef struct
|
struct EditUndo
|
||||||
{
|
{
|
||||||
char* text; // original text
|
char* text; // original text
|
||||||
int len; // length of the text
|
int len; // length of the text
|
||||||
|
@ -44,8 +44,7 @@ typedef struct
|
||||||
int cursor2; // offset cursor
|
int cursor2; // offset cursor
|
||||||
int lineFirst; // the first line displayed.
|
int lineFirst; // the first line displayed.
|
||||||
|
|
||||||
}
|
};
|
||||||
EditUndo;
|
|
||||||
|
|
||||||
enum OperUndo
|
enum OperUndo
|
||||||
{
|
{
|
||||||
|
@ -54,35 +53,31 @@ enum OperUndo
|
||||||
OPERUNDO_DELETE = 2, // deleting characters
|
OPERUNDO_DELETE = 2, // deleting characters
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct
|
struct ImageLine
|
||||||
{
|
{
|
||||||
char name[40]; // name of the image (without diagram \)
|
char name[40]; // name of the image (without diagram \)
|
||||||
float offset; // vertical offset (v texture)
|
float offset; // vertical offset (v texture)
|
||||||
float height; // height of the part (dv texture)
|
float height; // height of the part (dv texture)
|
||||||
float width; // width
|
float width; // width
|
||||||
}
|
};
|
||||||
ImageLine;
|
|
||||||
|
|
||||||
typedef struct
|
struct HyperLink
|
||||||
{
|
{
|
||||||
char name[40]; // text file name (without help \)
|
char name[40]; // text file name (without help \)
|
||||||
char marker[20]; // name of the marker
|
char marker[20]; // name of the marker
|
||||||
}
|
};
|
||||||
HyperLink;
|
|
||||||
|
|
||||||
typedef struct
|
struct HyperMarker
|
||||||
{
|
{
|
||||||
char name[20]; // name of the marker
|
char name[20]; // name of the marker
|
||||||
int pos; // position in the text
|
int pos; // position in the text
|
||||||
}
|
};
|
||||||
HyperMarker;
|
|
||||||
|
|
||||||
typedef struct
|
struct HyperHistory
|
||||||
{
|
{
|
||||||
char filename[50]; // full file name text
|
char filename[50]; // full file name text
|
||||||
int firstLine; // rank of the first displayed line
|
int firstLine; // rank of the first displayed line
|
||||||
}
|
};
|
||||||
HyperHistory;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ class CTarget;
|
||||||
class CCamera;
|
class CCamera;
|
||||||
|
|
||||||
|
|
||||||
#define MAXCONTROL 100
|
const int MAXCONTROL = 100;
|
||||||
|
|
||||||
|
|
||||||
class CInterface
|
class CInterface
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define MARGING 4.0f
|
const float MARGING = 4.0f;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -28,8 +28,8 @@ class CButton;
|
||||||
class CScroll;
|
class CScroll;
|
||||||
|
|
||||||
|
|
||||||
#define LISTMAXDISPLAY 20 // maximum number of visible lines
|
const int LISTMAXDISPLAY = 20; // maximum number of visible lines
|
||||||
#define LISTMAXTOTAL 100 // maximum total number of lines
|
const int LISTMAXTOTAL = 100; // maximum total number of lines
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -61,15 +61,15 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define KEY_VISIBLE 6 // number of visible keys redefinable
|
const int KEY_VISIBLE = 6; // number of visible keys redefinable
|
||||||
|
|
||||||
#if _SCHOOL & _TEEN
|
#if _SCHOOL & _TEEN
|
||||||
#define KEY_TOTAL 13 // total number of keys redefinable
|
const int KEY_TOTAL = 13; // total number of keys redefinable
|
||||||
#else
|
#else
|
||||||
#define KEY_TOTAL 21 // total number of keys redefinable
|
const int KEY_TOTAL = 21; // total number of keys redefinable
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define WELCOME_LENGTH 6.0f
|
const int WELCOME_LENGTH = 6.0f;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -34,25 +34,23 @@ class CParticule;
|
||||||
class CSound;
|
class CSound;
|
||||||
|
|
||||||
|
|
||||||
#define USERLISTMAX 100
|
const int USERLISTMAX = 100;
|
||||||
#define MAXSCENE 1000
|
const int MAXSCENE = 1000;
|
||||||
|
|
||||||
typedef struct
|
struct SceneInfo
|
||||||
{
|
{
|
||||||
char numTry;
|
char numTry;
|
||||||
char bPassed;
|
char bPassed;
|
||||||
}
|
};
|
||||||
SceneInfo;
|
|
||||||
|
|
||||||
typedef struct
|
struct GamerPerso
|
||||||
{
|
{
|
||||||
int face; // face
|
int face; // face
|
||||||
int glasses; // glasses
|
int glasses; // glasses
|
||||||
D3DCOLORVALUE colorHair; // hair color
|
D3DCOLORVALUE colorHair; // hair color
|
||||||
D3DCOLORVALUE colorCombi; // spacesuit volor
|
D3DCOLORVALUE colorCombi; // spacesuit volor
|
||||||
D3DCOLORVALUE colorBand; // strips color
|
D3DCOLORVALUE colorBand; // strips color
|
||||||
}
|
};
|
||||||
GamerPerso;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -40,8 +40,8 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define ZOOM_MIN 1.0f
|
const float ZOOM_MIN = 1.0f;
|
||||||
#define ZOOM_MAX 16.0f
|
const float ZOOM_MAX = 16.0f;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ class CRobotMain;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define MAPMAXOBJECT 100
|
const int MAPMAXOBJECT = 100;
|
||||||
|
|
||||||
enum MapColor
|
enum MapColor
|
||||||
{
|
{
|
||||||
|
@ -48,7 +48,7 @@ enum MapColor
|
||||||
MAPCOLOR_BBOX,
|
MAPCOLOR_BBOX,
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct
|
struct MapObject
|
||||||
{
|
{
|
||||||
char bUsed;
|
char bUsed;
|
||||||
CObject* object;
|
CObject* object;
|
||||||
|
@ -56,8 +56,7 @@ typedef struct
|
||||||
ObjectType type;
|
ObjectType type;
|
||||||
FPOINT pos;
|
FPOINT pos;
|
||||||
float dir;
|
float dir;
|
||||||
}
|
};
|
||||||
MapObject;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ class CD3DEngine;
|
||||||
class CButton;
|
class CButton;
|
||||||
|
|
||||||
|
|
||||||
#define SCROLL_WIDTH (15.0f/640.0f)
|
const float SCROLL_WIDTH = (15.0f/640.0f);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -35,8 +35,8 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define CURSOR_WIDTH (10.0f/640.0f)
|
const float CURSOR_WIDTH = (10.0f/640.0f);
|
||||||
#define HOLE_WIDTH (5.0f/480.0f)
|
const float HOLE_WIDTH = (5.0f/480.0f);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ class CCompass;
|
||||||
class CTarget;
|
class CTarget;
|
||||||
|
|
||||||
|
|
||||||
#define MAXWINDOW 100
|
const int MAXWINDOW = 100;
|
||||||
|
|
||||||
|
|
||||||
class CWindow : public CControl
|
class CWindow : public CControl
|
||||||
|
|
Loading…
Reference in New Issue