src/tron/zone/zMisc.h

Go to the documentation of this file.
00001 #ifndef ArmageTron_zMisc_H
00002 #define ArmageTron_zMisc_H
00003 
00004 #include "gCycle.h"
00005 
00006 enum Triad {
00007     _false,
00008     _true,
00009     _ignore
00010 };
00011 
00012 struct Triggerer {
00013     gCycle * who;
00014     Triad    positive;
00015     Triad    marked;
00016 };
00017 
00018 /*
00019  *
00020  * Logic table:
00021  *          _false  | _true   | _ignore
00022  *------------------|---------|----------
00023  * _false  |   T    |    F    |    T
00024  * _true   |   F    |    T    |    T
00025  * _ignore |   T    |    T    |    T
00026  *
00027  */
00028 inline bool validateTriad(Triad a, Triad b) {
00029     if (a==_ignore || b==_ignore || a==b)
00030     {
00031         return true;
00032     }
00033     return false;
00034 }
00035 
00036 /*
00037  * HACK 
00038  * This is a very bad solution that hopefully will find a better design
00039  *
00040  * Basis for the "other" data that might be passed to an effect group 
00041  * ATM: only the value from the monitor is passed 
00042  * We use an auto_ptr so we can control if there is a value or not 
00043 */
00044 typedef boost::shared_ptr<REAL> miscDataPtr;
00045 #endif

Generated on Sat Mar 15 22:56:12 2008 for Armagetron Advanced by  doxygen 1.5.4