- Timestamp:
- Nov 18, 2005, 6:09:01 PM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/defs/class_id.h
r5458 r5634 213 213 CL_TRACK_ELEMENT = 0x00000b0b, 214 214 CL_NUMBER = 0x00000b0c, 215 CL_EXECUTOR = 0x00000b0d, 215 216 CL_FAST_FACTORY = 0x00000c01, 216 217 CL_SHELL = 0x00000c10, -
trunk/src/defs/functor_list.h
r5391 r5634 30 30 //! defines the maximum count of arguments function pointers might have 31 31 #define FUNCTOR_MAX_ARGUMENTS 5 32 33 typedef enum 34 { 35 ParameterNull = 0, 36 ParameterBool = 1, 37 ParameterChar = 2, 38 ParameterString = 4, 39 ParameterInt = 8, 40 ParameterUInt = 16, 41 ParameterFloat = 32, 42 ParameterLong = 64, 43 ParameterXML = 128, 44 /* ... */ 45 } ParameterType; 46 32 #include "multi_type.h" 47 33 48 34 #define l_BOOL_TYPE bool //!< The type of an BOOL 49 35 #define l_BOOL_FUNC isBool //!< The function to call to parse BOOL 50 36 #define l_BOOL_NAME "bool" //!< The name of an BOOL 51 #define l_BOOL_PARAM ParameterBool//!< the type of the parameter BOOL37 #define l_BOOL_PARAM MT_BOOL //!< the type of the parameter BOOL 52 38 #define l_BOOL_DEFAULT false //!< a default Value for an BOOL 53 39 … … 56 42 #define l_INT_FUNC isInt //!< The function to call to parse INT 57 43 #define l_INT_NAME "int" //!< The name of an INT 58 #define l_INT_PARAM ParameterInt//!< the type of the parameter INT44 #define l_INT_PARAM MT_INT //!< the type of the parameter INT 59 45 #define l_INT_DEFAULT 0 //!< a default Value for an INT 60 46 … … 62 48 #define l_UINT_FUNC isInt //!< The function to call to parse UINT 63 49 #define l_UINT_NAME "unsigned int" //!< The name of an UINT 64 #define l_UINT_PARAM ParameterUInt//!< the type of the parameter UINT50 #define l_UINT_PARAM MT_INT //!< the type of the parameter UINT 65 51 #define l_UINT_DEFAULT 0 //!< a default Value for an UINT 66 52 … … 68 54 #define l_LONG_FUNC isInt //!< The function to parse a LONG 69 55 #define l_LONG_NAME "long" //!< The name of a LONG 70 #define l_LONG_PARAM ParameterLong//!< the type of the parameter LONG56 #define l_LONG_PARAM MT_INT //!< the type of the parameter LONG 71 57 #define l_LONG_DEFAULT 0 //!< a default Value for a LONG 72 58 … … 80 66 #define l_FLOAT_FUNC isFloat //!< The function to parse a FLOAT 81 67 #define l_FLOAT_NAME "float" //!< The name of a FLOAT 82 #define l_FLOAT_PARAM ParameterFloat//!< the type of the parameter FLOAT68 #define l_FLOAT_PARAM MT_FLOAT //!< the type of the parameter FLOAT 83 69 #define l_FLOAT_DEFAULT 0.0 //!< a default Value for a FLOAT 84 70 … … 91 77 #define l_STRING_FUNC isString //!< The function to parse a STRING 92 78 #define l_STRING_NAME "string" //!< The name of a STRING 93 #define l_STRING_PARAM ParameterString//!< the type of the parameter STRING79 #define l_STRING_PARAM MT_STRING //!< the type of the parameter STRING 94 80 #define l_STRING_DEFAULT "" //!< a default Value for an STRING 95 81 -
trunk/src/lib/Makefile.am
r5536 r5634 40 40 util/helper_functions.cc \ 41 41 util/multi_type.cc \ 42 util/executor/executor.cc \ 42 43 math/vector.cc \ 43 44 math/curve.cc … … 57 58 util/helper_functions.h \ 58 59 util/multi_type.h \ 60 util/executor/executor.h \ 59 61 math/vector.h \ 60 62 math/curve.h -
trunk/src/lib/Makefile.in
r5536 r5634 58 58 ini_parser.$(OBJEXT) substring.$(OBJEXT) color.$(OBJEXT) \ 59 59 helper_functions.$(OBJEXT) multi_type.$(OBJEXT) \ 60 vector.$(OBJEXT) curve.$(OBJEXT)60 executor.$(OBJEXT) vector.$(OBJEXT) curve.$(OBJEXT) 61 61 libORXlibs_a_OBJECTS = $(am_libORXlibs_a_OBJECTS) 62 62 DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) … … 229 229 util/helper_functions.cc \ 230 230 util/multi_type.cc \ 231 util/executor/executor.cc \ 231 232 math/vector.cc \ 232 233 math/curve.cc … … 246 247 util/helper_functions.h \ 247 248 util/multi_type.h \ 249 util/executor/executor.h \ 248 250 math/vector.h \ 249 251 math/curve.h … … 311 313 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/color.Po@am__quote@ 312 314 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curve.Po@am__quote@ 315 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/executor.Po@am__quote@ 313 316 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helper_functions.Po@am__quote@ 314 317 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ini_parser.Po@am__quote@ … … 458 461 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 459 462 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o multi_type.obj `if test -f 'util/multi_type.cc'; then $(CYGPATH_W) 'util/multi_type.cc'; else $(CYGPATH_W) '$(srcdir)/util/multi_type.cc'; fi` 463 464 executor.o: util/executor/executor.cc 465 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT executor.o -MD -MP -MF "$(DEPDIR)/executor.Tpo" -c -o executor.o `test -f 'util/executor/executor.cc' || echo '$(srcdir)/'`util/executor/executor.cc; \ 466 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/executor.Tpo" "$(DEPDIR)/executor.Po"; else rm -f "$(DEPDIR)/executor.Tpo"; exit 1; fi 467 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/executor/executor.cc' object='executor.o' libtool=no @AMDEPBACKSLASH@ 468 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 469 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o executor.o `test -f 'util/executor/executor.cc' || echo '$(srcdir)/'`util/executor/executor.cc 470 471 executor.obj: util/executor/executor.cc 472 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT executor.obj -MD -MP -MF "$(DEPDIR)/executor.Tpo" -c -o executor.obj `if test -f 'util/executor/executor.cc'; then $(CYGPATH_W) 'util/executor/executor.cc'; else $(CYGPATH_W) '$(srcdir)/util/executor/executor.cc'; fi`; \ 473 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/executor.Tpo" "$(DEPDIR)/executor.Po"; else rm -f "$(DEPDIR)/executor.Tpo"; exit 1; fi 474 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/executor/executor.cc' object='executor.obj' libtool=no @AMDEPBACKSLASH@ 475 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 476 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o executor.obj `if test -f 'util/executor/executor.cc'; then $(CYGPATH_W) 'util/executor/executor.cc'; else $(CYGPATH_W) '$(srcdir)/util/executor/executor.cc'; fi` 460 477 461 478 vector.o: math/vector.cc … … 621 638 622 639 distdir: $(DISTFILES) 623 $(mkdir_p) $(distdir)/coord $(distdir)/graphics/render2D $(distdir)/lang $(distdir)/math $(distdir)/util 640 $(mkdir_p) $(distdir)/coord $(distdir)/graphics/render2D $(distdir)/lang $(distdir)/math $(distdir)/util $(distdir)/util/executor 624 641 @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ 625 642 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ -
trunk/src/lib/shell/shell_command.cc
r5555 r5634 584 584 switch (this->parameters[i]) 585 585 { 586 case ParameterBool:586 case MT_BOOL: 587 587 this->defaultValue[i].setInt(va_arg(defaultList, int)); 588 588 break; 589 case ParameterChar:589 case MT_CHAR: 590 590 this->defaultValue[i].setChar((char)va_arg(defaultList, int)); 591 591 break; 592 case ParameterString:592 case MT_STRING: 593 593 this->defaultValue[i].setString(va_arg(defaultList, char*)); 594 594 break; 595 case ParameterInt:595 case MT_INT: 596 596 this->defaultValue[i].setInt(va_arg(defaultList, int)); 597 597 break; 598 case ParameterUInt:598 /* case MT_UINT: 599 599 this->defaultValue[i].setInt((int)va_arg(defaultList, unsigned int)); 600 break; 601 case ParameterFloat:600 break;*/ 601 case MT_FLOAT: 602 602 this->defaultValue[i].setFloat(va_arg(defaultList, double)); 603 603 break; 604 case ParameterLong:604 /* case MT_LONG: 605 605 this->defaultValue[i].setInt((int) va_arg(defaultList, long)); 606 break; 606 break;*/ 607 607 default: 608 608 break; … … 654 654 const char* ShellCommandBase::paramToString(long parameter) 655 655 { 656 switch (parameter) 656 return MultiType::MultiTypeToString((MT_Type)parameter); 657 // FIXME 658 /* switch (parameter) 657 659 { 658 660 case ParameterBool: … … 680 682 return "NULL"; 681 683 break; 682 } 683 } 684 }*/ 685 } -
trunk/src/util/loading/load_param.cc
r5549 r5634 80 80 switch (tmpType) 81 81 { 82 case ParameterInt:82 case MT_INT: 83 83 sprintf(defaultVal, "%d", va_arg(types, int)); 84 84 break; 85 case ParameterLong:85 /* case MT_LONG: 86 86 sprintf(defaultVal, "%0.3f", va_arg(types, l_LONG_TYPE)); 87 break; 88 case ParameterFloat:87 break;*/ 88 case MT_FLOAT: 89 89 sprintf(defaultVal, "%0.3f", va_arg(types, double)); 90 90 break; 91 case ParameterString:91 case MT_STRING: 92 92 sprintf(defaultVal, "%s", va_arg(types, l_STRING_TYPE)); 93 93 break; 94 case ParameterXML:94 case MT_EXT1: 95 95 sprintf(defaultVal, ""); 96 96 break; -
trunk/src/util/loading/load_param_description.cc
r5556 r5634 71 71 if (i > 0) 72 72 PRINT(3)(","); 73 switch (this->types[i]) 74 { 75 default: 76 PRINTF(3)("none"); 77 break; 78 case ParameterBool: 79 PRINT(3)("bool"); 80 break; 81 case ParameterChar: 82 PRINT(3)("char"); 83 break; 84 case ParameterString: 85 PRINT(3)("string"); 86 break; 87 case ParameterInt: 88 PRINT(3)("int"); 89 break; 90 case ParameterUInt: 91 PRINT(3)("Uint"); 92 break; 93 case ParameterFloat: 94 PRINT(3)("float"); 95 break; 96 case ParameterLong: 97 PRINT(3)("long"); 98 break; 99 case ParameterXML: 100 PRINT(3)("XML"); 101 break; 102 } 73 // FIXME 74 // switch (this->types[i]) 75 // { 76 // default: 77 // PRINTF(3)("none"); 78 // break; 79 // case ParameterBool: 80 // PRINT(3)("bool"); 81 // break; 82 // case ParameterChar: 83 // PRINT(3)("char"); 84 // break; 85 // case ParameterString: 86 // PRINT(3)("string"); 87 // break; 88 // case ParameterInt: 89 // PRINT(3)("int"); 90 // break; 91 // case ParameterUInt: 92 // PRINT(3)("Uint"); 93 // break; 94 // case ParameterFloat: 95 // PRINT(3)("float"); 96 // break; 97 // case ParameterLong: 98 // PRINT(3)("long"); 99 // break; 100 // case ParameterXML: 101 // PRINT(3)("XML"); 102 // break; 103 // } 103 104 } 104 105 PRINT(3)("</%s>", this->paramName); … … 113 114 if (i > 0) 114 115 PRINT(3)(", "); 115 if (this->types[i] & ParameterString)116 if (this->types[i] & MT_STRING) 116 117 { // leave brackets !! 117 118 PRINT(3)("\"%s\"", this->defaultValues[i]); -
trunk/src/world_entities/player.cc
r5556 r5634 33 33 #include "event.h" 34 34 35 #include "executor/executor.h" 35 36 36 37 using namespace std; … … 118 119 void Player::init() 119 120 { 121 Executor* test = new ExecutorObjective<Player>("test", "Player", &Player::ADDWEAPON); 122 120 123 // this->setRelDir(Quaternion(M_PI, Vector(1,0,0))); 121 124 this->setClassID(CL_PLAYER, "Player"); … … 161 164 this->weaponMan->setSlotPosition(9, Vector(-2.5, -0.3, 2.0)); 162 165 this->weaponMan->setSlotDirection(9, Quaternion(+M_PI, Vector(1,0,0))); 163 164 166 } 165 167
Note: See TracChangeset
for help on using the changeset viewer.