Target.h

Go to the documentation of this file.
00001 /* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 5 -*- */
00002 
00003 /*
00004  * Combination of a first person action and a real time strategy battle game.
00005  */
00006 
00007 /*
00008  * Target.h
00009  * MetalWarriors
00010  * $Revision: 1.3 $
00011  *
00012  * Created by Daniel Aarno on Sun Oct 12 2003.
00013  * Copyright (c) 2003 Daniel Aarno and Erik Ytterberg - All rights reserved.
00014  *
00015  *     This program is free software; you can redistribute it and/or modify
00016  *     it under the terms of the GNU General Public License as published by
00017  *     the Free Software Foundation; either version 2 of the License, or
00018  *     (at your option) any later version.
00019  *
00020  *     This program is distributed in the hope that it will be useful,
00021  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
00022  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00023  *     GNU General Public License for more details.
00024  *
00025  *     You should have received a copy of the GNU General Public License
00026  *     along with this program; if not, write to the Free Software
00027  *     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00028  */
00029 
00030 #ifndef TARGET_H
00031 #define TARGET_H
00032 
00033 typedef enum
00034   {
00035     TARGET_GROUND,
00036     TARGET_AIR_TO_GROUND,
00037     TARGET_GROUND_TO_AIR,
00038     TARGET_MAP_MARKER
00039   }TargetType;
00040 
00041 class Target{
00042  public:
00043     TargetType type;
00044     void *originator;
00045     Target(TargetType target_type, void *origin) : type(target_type), originator(origin) {}
00046 };
00047 
00048 class GroundTarget : public Target
00049 {
00050  public:
00051   float coord[3];
00052   GroundTarget(TargetType target_type, void *origin, float *c) : Target( target_type, origin)
00053     {
00054       coord[0] = c[0];
00055       coord[1] = c[1];
00056       coord[2] = c[2];
00057     }   
00058 };
00059 
00060 #endif /*TARGET_H*/

Generated on Sun Mar 11 15:33:23 2007 for MetalWarriors by  doxygen 1.4.7