/* * (C) COPYRIGHT Vincent S. Cojot and others 1996-1997 * All Rights Reserved * Licensed Materials - Property of Vincent S. Cojot and others. * Use, duplication or disclosure restricted by Vincent S. Cojot. */ #ifndef __OPERATIONS_H #define __OPERATIONS_H /* ------------------------------------------------*/ /* Ces fonctions servent a calculer La normale et le produit scalaire */ /* de deux vecteurs a deux dimensions (On approxime la troisieme */ /* Dimension car la lumiere est tres loin et on ne cherche pas a */ /* faire des ombres sur le sol. */ /* ------------------------------------------------*/ void Normale1 (float, float, float, float, float *, float *); float ProduitScalaire (float, float, float, float); /* ------------------------------------------------*/ /* Pour le debugging du reseau: Simule d'autres Tanks, */ /* missiles et explosions. */ /* ------------------------------------------------*/ GLvoid SimulationInit(GLvoid); GLvoid SimulationRun(GLvoid); /* ------------------------------------------------*/ /* Pour le traitement des arguments de demarrage du jeu. */ /* ------------------------------------------------*/ GLvoid ProcessCommandArgs(int argc,char *argv[]); GLvoid PrintCorrectArgs(int argc,char *argv[]); /* ------------------------------------------------*/ /* Definitions des matrices globales pour le jeu en reseau. */ /* On y trouve les definitions des structures de donnees de */ /* tous les tanks, missiles et explosions ainsi que des variables */ /* indiquant le nombre de ces objets. */ /* ------------------------------------------------*/ extern TANK Tanks[MAX_TANKS]; extern MISSILE Missiles[MAX_MISSILES]; extern EXPLOSION Explosions[MAX_EXPLOSIONS]; extern TANK DestroyedTanks[MAX_DESTROYED_TANKS]; extern GLint explosion; extern GLint tanks; extern GLint FlyingMissile; extern GLint destroyed; /* ------------------------------------------------*/ /* Definitions des fonctions de gestions des objets animes autres */ /* que notre propre tank: Missiles, tanks enemis et explosions. */ /* ------------------------------------------------*/ extern GLvoid VerifierCollision (GLvoid); extern GLvoid MoveMissiles(GLvoid); extern GLvoid MoveMyMissile(GLvoid); extern GLvoid MoveTanks(GLvoid); extern GLvoid MoveDestroyedTanks(GLvoid); extern GLvoid CallAllExplosions(GLvoid); extern GLint FindStartupPosition(GLvoid); extern GLvoid InsertTank(TANK OneTank); extern GLvoid InsertMissile(MISSILE OneMissile); extern GLvoid InsertExplosion(EXPLOSION OneExplosion); extern GLvoid InsertDestroyedTank(TANK OneDestroyedTank); /* ------------------------------------------------*/ /* Autres definitions globales. */ /* ------------------------------------------------*/ extern TANK OneTank; extern MISSILE OneMissile; extern EXPLOSION OneExplosion; extern TANK OneDestroyedTank; extern GLfloat scenePosz ; /* Veritable coordonnees Z */ extern GLfloat scenePosx ; /* Veritable coordonnees X */ extern GLfloat sceneAngle ; extern GLfloat RandomscenePosz ; extern GLfloat RandomscenePosx ; extern GLfloat RandomsceneAngle ; extern char network_group[255]; extern u_short network_port; extern long network_delay; #endif