- Timestamp:
- Aug 27, 2005, 3:39:26 PM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/defs/functor_list.h
r5153 r5155 97 97 #define l_XML_ELEM_FUNC //!< The function to parse an XML_ELEM 98 98 #define l_XML_ELEM_NAME "XML" //!< The name of an XML_ELEM 99 //#define l_XML_ELEM_PARAM Parameter //!< the type of the parameter XML_ELEM99 //#define l_XML_ELEM_PARAM Parameter //!< the type of the parameter XML_ELEM 100 100 #define l_XML_ELEM_DEFAULT NULL //!< The dafault Value for an XML_ELEM 101 101 -
trunk/src/glmenu/glmenu_imagescreen.cc
r5090 r5155 22 22 #include "material.h" 23 23 #include "factory.h" 24 #include "load_param.h" 24 25 25 26 CREATE_FACTORY(GLMenuImageScreen); -
trunk/src/lib/particles/particle_system.cc
r4863 r5155 23 23 #include "field.h" 24 24 25 #include "load_param.h" 25 26 #include "compiler.h" 26 27 #include "material.h" -
trunk/src/lib/physics/physics_connection.cc
r4836 r5155 25 25 26 26 #include "factory.h" 27 #include "load_param.h" 27 28 28 29 using namespace std; -
trunk/src/util/loading/factory.cc
r4836 r5155 16 16 17 17 #include "factory.h" 18 19 #include "shell_command.h" 18 20 #include "game_loader.h" 19 20 21 using namespace std; 21 22 … … 68 69 69 70 if( Factory::first == NULL) 71 { 70 72 Factory::first = factory; 73 ShellCommand<Factory>::registerCommand("create", CL_FACTORY, &Factory::fabricate); 74 } 71 75 else 72 76 { … … 79 83 } 80 84 } 85 86 void Factory::fabricate(const char* className, const char* entityName) 87 { 88 if (className == NULL) 89 return; 90 Factory* fac = Factory::first; 91 92 while (fac != NULL) 93 { 94 if (!strcmp(className, fac->getName())) 95 { 96 PRINTF(3)("Create a new Object of type %s\n", fac->getName()); 97 BaseObject* object = fac->fabricate(NULL); 98 if (object != NULL) 99 { 100 object->setName(entityName); 101 } 102 break; 103 } 104 fac = fac->next; 105 } 106 } -
trunk/src/util/loading/factory.h
r4932 r5155 26 26 27 27 #include "tinyxml.h" 28 #include "load_param.h"29 28 #include "base_object.h" 30 29 #include "debug.h" … … 44 43 ~Factory (); 45 44 46 45 void fabricate(const char* className, const char* entityName); 47 46 virtual BaseObject* fabricate(const TiXmlElement* root) = NULL; 48 47 -
trunk/src/util/shell_command.cc
r5154 r5155 139 139 while(elem != NULL) 140 140 { 141 printf("%s \n", elem->getName());141 printf("%s::%s\n", elem->className, elem->getName()); 142 142 if (!strncasecmp (executionString, elem->className, strlen(elem->className)) && 143 143 (*(executionString+strlen(elem->className)) == ' ' || … … 170 170 while(*commandBegin == ' ') 171 171 commandBegin++; 172 tList<BaseObject>* list = 172 tList<BaseObject>* list = ClassList::getList(elem->classID); 173 173 if (list == NULL) 174 174 break; -
trunk/src/util/shell_command.h
r5153 r5155 10 10 11 11 #include "helper_functions.h" 12 #include "functor_list.h"13 12 #include "substring.h" 13 #include "functor_list.h" 14 14 15 15 #include <stdarg.h> -
trunk/src/world_entities/player.cc
r5145 r5155 83 83 { 84 84 this->init(); 85 this->loadParams(root); 85 if (root != NULL) 86 this->loadParams(root); 86 87 87 88 //weapons: -
trunk/src/world_entities/skybox.cc
r4998 r5155 23 23 #include "factory.h" 24 24 25 #include "load_param.h" 25 26 #include "material.h" 26 27 #include "vector.h"
Note: See TracChangeset
for help on using the changeset viewer.