1 /* 2 * The contents of this file are subject to the Mozilla Public License 3 * Version 1.0 (the "License"); you may not use this file except in 4 * compliance with the License. You may obtain a copy of the License at 5 * http://www.mozilla.org/MPL/ 6 * 7 * Software distributed under the License is distributed on an "AS IS" 8 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the 9 * License for the specific language governing rights and limitations 10 * under the License. 11 * 12 * The Initial Developer of this code is David Baum. 13 * Portions created by David Baum are Copyright (C) 1998 David Baum. 14 * All Rights Reserved. 15 * 16 * Portions created by John Hansen are Copyright (C) 2005 John Hansen. 17 * All Rights Reserved. 18 * 19 */ 20 21 #ifndef __RCX_Target_h 22 #define __RCX_Target_h 23 24 #ifndef __RCX_Constants_h 25 #include "RCX_Constants.h" 26 #endif 27 28 typedef enum 29 { 30 kRCX_RCXTarget = 0, // original RCX 31 kRCX_CMTarget, // CyberMaster 32 kRCX_ScoutTarget, // Scout 33 kRCX_RCX2Target, // RCX 2.0 34 kRCX_SpyboticsTarget, // Spybotics 35 kRCX_SwanTarget // Dick Swan's alternate firmware 36 } RCX_TargetType; 37 38 39 class RCX_Target 40 { 41 public: 42 struct Range { 43 int fBase; 44 int fCount; 45 }; 46 47 RCX_TargetType fType; 48 const char* fName; 49 const char* fDefine; 50 const char* fDefValue; 51 52 Range fRanges[kRCX_ChunkTypeCount]; 53 54 int fMaxGlobalVars; 55 int fMaxTaskVars; 56 bool fResources; 57 bool fEvents; 58 bool fArrays; 59 bool fRestrictedMath; 60 bool fSubParams; 61 bool fHasExtendedMathOps; 62 63 bool SourceWritable(int source) const; 64 int GetChunkLimit(RCX_ChunkType type) const; 65 }; 66 67 68 extern const RCX_Target *getTarget(RCX_TargetType type); 69 70 71 #endif 72