- Main Page
- Classes
- Files

- File List
- File Members

# C:/Documents and Settings/Adam Schwartz/My Documents/um/code/intro.h

Go to the documentation of this file.

    00001 // *********************************************************
    00002 // Intro.h - has most of the global variables needed in the game.
    00003 // Sets up and initializes programming constants, and other very important variables.
    00004 // *********************************************************
    00005
    00006
    00007 float cax,cay; //camera angles
    00008
    00009 // DEVELOPMENT VARIABLES
    00010 float test2=0;
    00011 float temp=0;
    00012
    00013 // voiceSound
    00014 boolean voiceSound =1;
    00015
    00016 //bullet life, 1= pos x, 2= pos z, 3= angle y
    00017 float BL[10][4]; //bullet life
    00018
    00019 float aiSt[20]; //speed limit???
    00020
    00021 float aiRSt[20];//rotation speed limit???
    00022
    00023 //explosion
    00024 float EX[10][2];
    00025
    00026 //PROGRAMMING CONSTANTS
    00027 const int M=0; //mode - battle mode
    00028 const int L=1; //life
    00029 const int X=2; //x position
    00030 const int Z=3; //z position
    00031 const int SS=4; //speed - two S's to distinguish from float S
    00032
    00033 const int RS=5; //rotation speed of vehicle
    00034
    00035 const int AY=7; //y angle
    00036
    00037 const int NX=8; //new xval?
    00038 const int NZ=9; //new xval?
    00039 const int NX2=10;
    00040 const int NZ2=11;
    00041
    00042 const int DX=12; //destination x
    00043 const int DZ=13; //destination z
    00044
    00045 const int ET=14; //enemy target - number of enemy
    00046 const int FW=15; //to fire weapon
    00047 const int PR=16; //bullet power
    00048 const int EN=17; //enemy #?
    00049 const int NX3=18;
    00050 const int NZ3=19;
    00051 const int AC=20; //acceleration
    00052 const int WR=21; //weapon recoil- how much time till anther fire
    00053
    00054 const int LS=22; //listening to commander between unit and commander
    00055 const int TM=23;
    00056
    00057 const int OWN=24; //who's the owner of such---for bullet
    00058 const int HIT=25; //counts up till next time unit can say "i'm hit"
    00059 const int DAM=26; //counts up till next time unit can say "i'm badly damgaged"
    00060 const int MOVM=27; //move mode for hurrying up
    00061
    00062 //RL=28 taken
    00063 const int CM=29; //command to unit
    00064 const int WR2=30; //weapon recoil for machine gun- how much time till anther fire
    00065 const int AR=31; //attack range- adjusted to keep units in range
    00066 const int PER=32; //person speaking
    00067 const int ML=33; //max life- calculate color
    00068 const int MOVEABLE=34; // distingish between buildings and vehicles (TEMP CODE TRICK to reduce programming work)
    00069
    00070 //AI states
    00071 const int noTurn=0;
    00072 const int explore=1;
    00073 const int setDest=2;
    00074 const int turnDet=3;
    00075 const int speedTo=4;
    00076
    00077 // vehicle states???
    00078 const int alert=1;
    00079 const int runAway=2;
    00080 const int fire=3;
    00081 const int damage=2;
    00082 const int death=1;
    00083
    00084 //for LS for units (listening status)
    00085 const int idle=0;
    00086 const int listening=1;
    00087
    00088 //for CM- needs WORK
    00089 const int attack= 1;
    00090 const int stop= 2; //same as idle
    00091 const int ffire= 3;
    00092 const int nfire= 4;
    00093 const int hfire= 5;
    00094
    00095 const int follow= 6;
    00096 const int retreat= 7;
    00097 const int move= 8;
    00098
    00099 //team
    00100 const int gold=0;
    00101 const int red=1;
    00102
    00103 //for INTERFACE
    00104 int enemiesLeft=0;
    00105 int alliesLeft=0;
    00106
    00107 //for debugging
    00108 int player=gold;
    00109
    00110 //bullets
    00111 const int BUL_LIFE=0;
    00112 const int BULX=1;
    00113 const int BULZ=2;
    00114 const int BULA=3;
    00115 const int BUL_OWNER=4;
    00116 //--------------------------
    00117
    00118
    00119 //click waiters for checking if mouse clicked or pressed.
    00120 int clickWaiter[20][3]; // [x]  [0- limit, 1- time to wait, 2- if done or not]
    00121
    00122 //amount variables
    00123 int am=10; //amount
    00124 int Wam=10;
    00125 int Eam=10; //enemy amount?
    00126
    00127
    00128
    00129 //mode that determines which music is played at what moment
    00130 int musicMode=0;
    00131
    00132 //music constants
    00133 int m_combat=9;
    00134 int m_death=6;
    00135 int m_title=7;
    00136 int m_idle=8;
    00137
    00138 //determines if game started, game in progress, or game ended, or in menu
    00139 int gameMode=0;
    00140
    00141 //determines how many units are selected or not, so that the commands can be applied to all
    00142 //      works in junction with drag select
    00143 int multiSelect=0;
    00144 int multiSelCount=0;
    00145
    00146 //mouse click- for dragging
    00147 int mouseClick=0; //0 = nothing, 1= clicked, 2= dragged
    00148 int mouseCounter=0; //counter
    00149
    00150 //for multi select code.
    00151 const int clicked=1;
    00152 const int dragged=2;
    00153
    00154
    00155 //"catch" variables that find in a loop whether all vehicles are destroyed.
    00156 int goldDeath=0;
    00157 int redDeath=0;
    00158
    00159 //OBJECT RANGES_____________
    00160 // tour plane object ids.
    00161 const int tourPlaneStart=300;
    00162 const int tourPlaneEnd=35;
    00163
    00164 // bullet object ids.
    00165 const int bullNumStart=50; //bullet number
    00166 const int bullNumEnd=99;
    00167
    00168 // vehicle object ids.
    00169 const int vehicleNumStart=100;
    00170 const int vehicleNumEnd=200;
    00171 //---------------------------
    00172
    00173
    00174 //new building updated
    00175 //Makes a building. Input paramaters: building's id, the id of its roof, size of building,
    00176 //it's x position, its z position, building's texture, roof's texture
    00177
    00178
    00179 //id, Uval- how much to accelerate, sppedL- limit
    00180 void acce(int id,float Uval,float speedL) {