- Timestamp:
- Aug 19, 2005, 3:21:27 AM (20 years ago)
- Location:
- trunk/src
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/Makefile.am
r5068 r5075 33 33 34 34 orxonox_SOURCES = orxonox.cc \ 35 util/shell.cc \ 35 36 util/loading/game_loader.cc \ 36 37 util/track/track_manager.cc \ … … 46 47 util/loading/load_param.cc \ 47 48 util/state.cc \ 48 util/shell.cc \49 49 util/user_control.cc \ 50 50 story_entities/story_entity.cc \ -
trunk/src/Makefile.in
r5068 r5075 53 53 binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) 54 54 PROGRAMS = $(bin_PROGRAMS) 55 am_orxonox_OBJECTS = orxonox-orxonox.$(OBJEXT) \55 am_orxonox_OBJECTS = orxonox-orxonox.$(OBJEXT) orxonox-shell.$(OBJEXT) \ 56 56 orxonox-game_loader.$(OBJEXT) orxonox-track_manager.$(OBJEXT) \ 57 57 orxonox-track_node.$(OBJEXT) orxonox-pilot_node.$(OBJEXT) \ … … 62 62 orxonox-resource_manager.$(OBJEXT) orxonox-factory.$(OBJEXT) \ 63 63 orxonox-load_param.$(OBJEXT) orxonox-state.$(OBJEXT) \ 64 orxonox- shell.$(OBJEXT) orxonox-user_control.$(OBJEXT) \65 orxonox- story_entity.$(OBJEXT) orxonox-campaign.$(OBJEXT) \66 orxonox-world .$(OBJEXT) orxonox-world_entity.$(OBJEXT) \67 orxonox- camera.$(OBJEXT) orxonox-player.$(OBJEXT) \68 orxonox- npc.$(OBJEXT) orxonox-environment.$(OBJEXT) \69 orxonox-sky sphere.$(OBJEXT) orxonox-skybox.$(OBJEXT) \70 orxonox- terrain.$(OBJEXT) orxonox-satellite.$(OBJEXT) \64 orxonox-user_control.$(OBJEXT) orxonox-story_entity.$(OBJEXT) \ 65 orxonox-campaign.$(OBJEXT) orxonox-world.$(OBJEXT) \ 66 orxonox-world_entity.$(OBJEXT) orxonox-camera.$(OBJEXT) \ 67 orxonox-player.$(OBJEXT) orxonox-npc.$(OBJEXT) \ 68 orxonox-environment.$(OBJEXT) orxonox-skysphere.$(OBJEXT) \ 69 orxonox-skybox.$(OBJEXT) orxonox-terrain.$(OBJEXT) \ 70 orxonox-satellite.$(OBJEXT) \ 71 71 orxonox-character_attributes.$(OBJEXT) \ 72 72 orxonox-test_entity.$(OBJEXT) orxonox-weapon_manager.$(OBJEXT) \ … … 291 291 292 292 orxonox_SOURCES = orxonox.cc \ 293 util/shell.cc \ 293 294 util/loading/game_loader.cc \ 294 295 util/track/track_manager.cc \ … … 304 305 util/loading/load_param.cc \ 305 306 util/state.cc \ 306 util/shell.cc \307 307 util/user_control.cc \ 308 308 story_entities/story_entity.cc \ … … 579 579 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(orxonox_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o orxonox-orxonox.obj `if test -f 'orxonox.cc'; then $(CYGPATH_W) 'orxonox.cc'; else $(CYGPATH_W) '$(srcdir)/orxonox.cc'; fi` 580 580 581 orxonox-shell.o: util/shell.cc 582 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(orxonox_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT orxonox-shell.o -MD -MP -MF "$(DEPDIR)/orxonox-shell.Tpo" -c -o orxonox-shell.o `test -f 'util/shell.cc' || echo '$(srcdir)/'`util/shell.cc; \ 583 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/orxonox-shell.Tpo" "$(DEPDIR)/orxonox-shell.Po"; else rm -f "$(DEPDIR)/orxonox-shell.Tpo"; exit 1; fi 584 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/shell.cc' object='orxonox-shell.o' libtool=no @AMDEPBACKSLASH@ 585 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/orxonox-shell.Po' tmpdepfile='$(DEPDIR)/orxonox-shell.TPo' @AMDEPBACKSLASH@ 586 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 587 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(orxonox_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o orxonox-shell.o `test -f 'util/shell.cc' || echo '$(srcdir)/'`util/shell.cc 588 589 orxonox-shell.obj: util/shell.cc 590 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(orxonox_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT orxonox-shell.obj -MD -MP -MF "$(DEPDIR)/orxonox-shell.Tpo" -c -o orxonox-shell.obj `if test -f 'util/shell.cc'; then $(CYGPATH_W) 'util/shell.cc'; else $(CYGPATH_W) '$(srcdir)/util/shell.cc'; fi`; \ 591 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/orxonox-shell.Tpo" "$(DEPDIR)/orxonox-shell.Po"; else rm -f "$(DEPDIR)/orxonox-shell.Tpo"; exit 1; fi 592 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/shell.cc' object='orxonox-shell.obj' libtool=no @AMDEPBACKSLASH@ 593 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/orxonox-shell.Po' tmpdepfile='$(DEPDIR)/orxonox-shell.TPo' @AMDEPBACKSLASH@ 594 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 595 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(orxonox_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o orxonox-shell.obj `if test -f 'util/shell.cc'; then $(CYGPATH_W) 'util/shell.cc'; else $(CYGPATH_W) '$(srcdir)/util/shell.cc'; fi` 596 581 597 orxonox-game_loader.o: util/loading/game_loader.cc 582 598 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(orxonox_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT orxonox-game_loader.o -MD -MP -MF "$(DEPDIR)/orxonox-game_loader.Tpo" -c -o orxonox-game_loader.o `test -f 'util/loading/game_loader.cc' || echo '$(srcdir)/'`util/loading/game_loader.cc; \ … … 786 802 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 787 803 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(orxonox_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o orxonox-state.obj `if test -f 'util/state.cc'; then $(CYGPATH_W) 'util/state.cc'; else $(CYGPATH_W) '$(srcdir)/util/state.cc'; fi` 788 789 orxonox-shell.o: util/shell.cc790 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(orxonox_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT orxonox-shell.o -MD -MP -MF "$(DEPDIR)/orxonox-shell.Tpo" -c -o orxonox-shell.o `test -f 'util/shell.cc' || echo '$(srcdir)/'`util/shell.cc; \791 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/orxonox-shell.Tpo" "$(DEPDIR)/orxonox-shell.Po"; else rm -f "$(DEPDIR)/orxonox-shell.Tpo"; exit 1; fi792 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/shell.cc' object='orxonox-shell.o' libtool=no @AMDEPBACKSLASH@793 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/orxonox-shell.Po' tmpdepfile='$(DEPDIR)/orxonox-shell.TPo' @AMDEPBACKSLASH@794 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@795 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(orxonox_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o orxonox-shell.o `test -f 'util/shell.cc' || echo '$(srcdir)/'`util/shell.cc796 797 orxonox-shell.obj: util/shell.cc798 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(orxonox_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT orxonox-shell.obj -MD -MP -MF "$(DEPDIR)/orxonox-shell.Tpo" -c -o orxonox-shell.obj `if test -f 'util/shell.cc'; then $(CYGPATH_W) 'util/shell.cc'; else $(CYGPATH_W) '$(srcdir)/util/shell.cc'; fi`; \799 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/orxonox-shell.Tpo" "$(DEPDIR)/orxonox-shell.Po"; else rm -f "$(DEPDIR)/orxonox-shell.Tpo"; exit 1; fi800 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/shell.cc' object='orxonox-shell.obj' libtool=no @AMDEPBACKSLASH@801 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/orxonox-shell.Po' tmpdepfile='$(DEPDIR)/orxonox-shell.TPo' @AMDEPBACKSLASH@802 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@803 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(orxonox_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o orxonox-shell.obj `if test -f 'util/shell.cc'; then $(CYGPATH_W) 'util/shell.cc'; else $(CYGPATH_W) '$(srcdir)/util/shell.cc'; fi`804 804 805 805 orxonox-user_control.o: util/user_control.cc -
trunk/src/defs/debug.h
r5048 r5075 27 27 28 28 #include "confincl.h" 29 #include "shell.h" 29 30 30 31 #include <stdio.h> … … 97 98 #define PRINTFVDEBUG PRINTF5 98 99 100 //#ifdef 101 //#define PRINTF(x) PRINT(x) 102 #define PRINT_EXEC Shell::addBufferLineStatic 103 99 104 #ifdef DEBUG 100 105 … … 105 110 #define PRINTF1 \ 106 111 if (SOFT_DEBUG_LEVEL >= ERR) \ 107 printf("ERROR::%s:%d:", __FILE__, __LINE__) && printf112 printf("ERROR::%s:%d:", __FILE__, __LINE__) && PRINT_EXEC 108 113 #else 109 114 #define PRINTF1 if (NO) … … 113 118 #define PRINTF2 \ 114 119 if (SOFT_DEBUG_LEVEL >= WARN) \ 115 printf("WARNING::%s:%d:", __FILE__, __LINE__) && printf120 printf("WARNING::%s:%d:", __FILE__, __LINE__) && PRINT_EXEC 116 121 117 122 #else … … 122 127 #define PRINTF3 \ 123 128 if (SOFT_DEBUG_LEVEL >= INFO) \ 124 printf("INFO::%s:%d:", __FILE__, __LINE__) && printf129 printf("INFO::%s:%d:", __FILE__, __LINE__) && PRINT_EXEC 125 130 #else 126 131 #define PRINTF3 if (NO) … … 130 135 #define PRINTF4 \ 131 136 if (SOFT_DEBUG_LEVEL >= DEBUG) \ 132 printf("DEBUG::%s:%d:", __FILE__, __LINE__) && printf137 printf("DEBUG::%s:%d:", __FILE__, __LINE__) && PRINT_EXEC 133 138 #else 134 139 #define PRINTF4 if (NO) … … 138 143 #define PRINTF5 \ 139 144 if (SOFT_DEBUG_LEVEL >= vDEBUG) \ 140 printf("VERYDEBUG::%s:%d:", __FILE__, __LINE__) && printf145 printf("VERYDEBUG::%s:%d:", __FILE__, __LINE__) && PRINT_EXEC 141 146 #else 142 147 #define PRINTF5 if (NO) … … 148 153 149 154 #define PRINTF0 \ 150 printf("%s:%d::", __FILE__, __LINE__) && printf155 printf("%s:%d::", __FILE__, __LINE__) && PRINT_EXEC 151 156 152 157 … … 168 173 #define PRINT1 \ 169 174 if (SOFT_DEBUG_LEVEL >= ERR) \ 170 printf175 PRINT_EXEC 171 176 #else 172 177 #define PRINT1 if (NO) … … 176 181 #define PRINT2 \ 177 182 if (SOFT_DEBUG_LEVEL >= WARN) \ 178 printf183 PRINT_EXEC 179 184 180 185 #else … … 185 190 #define PRINT3 \ 186 191 if (SOFT_DEBUG_LEVEL >= INFO) \ 187 printf192 PRINT_EXEC 188 193 #else 189 194 #define PRINT3 if (NO) … … 193 198 #define PRINT4 \ 194 199 if (SOFT_DEBUG_LEVEL >= DEBUG) \ 195 printf200 PRINT_EXEC 196 201 #else 197 202 #define PRINT4 if (NO) … … 201 206 #define PRINT5 \ 202 207 if (SOFT_DEBUG_LEVEL >= vDEBUG) \ 203 printf("VERYDEBUG::%s:%d:", __FILE__, __LINE__) && printf208 PRINT_EXEC("VERYDEBUG::%s:%d:", __FILE__, __LINE__) && PRINT_EXEC 204 209 #else 205 210 #define PRINT5 if (NO) … … 212 217 213 218 #define PRINT0 \ 214 printf219 PRINT_EXEC 215 220 216 221 #endif /* _DEBUG_H */ -
trunk/src/defs/stdincl.h
r4697 r5075 2 2 \file stdincl.h 3 3 \brief This file includes default headers that nearly every Class needs. 4 4 5 5 no Class is defined here, but many headers to classes, and more general Headers like the openGL-header. 6 6 */ … … 23 23 24 24 #include "error.h" 25 #include "debug.h"26 25 #include "globals.h" 27 26 -
trunk/src/lib/event/key_mapper.cc
r5015 r5075 24 24 #include "ini_parser.h" 25 25 #include "key_names.h" 26 #include "debug.h" 26 27 27 28 using namespace std; -
trunk/src/lib/graphics/importer/md2Model.cc
r4836 r5075 18 18 #include "material.h" 19 19 20 #include "debug.h" 20 21 #include "resource_manager.h" 21 22 … … 84 85 if( unlikely(this->data == NULL)) 85 86 PRINTF(0)("The model was not found, MD2Model Loader finished abnormaly. Update the data-repos\n"); 86 87 87 88 this->scaleFactor = this->data->scaleFactor; 88 89 this->setAnim(BOOM); … … 381 382 */ 382 383 383 384 384 385 385 386 -
trunk/src/lib/graphics/spatial_separation/quadtree.cc
r4968 r5075 22 22 23 23 #include "material.h" 24 24 #include "debug.h" 25 25 26 26 using namespace std; -
trunk/src/lib/graphics/spatial_separation/quadtree_node.cc
r4968 r5075 23 23 #include "list.h" 24 24 #include "vector.h" 25 #include "debug.h" 25 26 26 27 using namespace std; -
trunk/src/lib/graphics/spatial_separation/spatial_separation.cc
r4968 r5075 17 17 18 18 #include "spatial_separation.h" 19 19 20 #include "abstract_model.h" 20 21 #include "quadtree.h" 22 #include "debug.h" 21 23 22 24 using namespace std; -
trunk/src/lib/graphics/text_engine.cc
r5072 r5075 103 103 { 104 104 this->text = new char[1]; 105 strcpy(this->text, "");105 *this->text = '\0'; 106 106 } 107 107 108 108 109 109 // setting up the Text-Width if DYNAMIC 110 if (this->type == TEXT_DYNAMIC )110 if (this->type == TEXT_DYNAMIC && this->alignment != TEXT_ALIGN_LEFT) 111 111 { 112 112 Glyph** glyphArray = this->font->getGlyphArray(); -
trunk/src/util/shell.cc
r5074 r5075 21 21 #include "list.h" 22 22 23 #include <stdarg.h> 24 #include <stdio.h> 25 23 26 using namespace std; 24 27 … … 41 44 42 45 43 this->addBufferLine("asjflksjdvklasmv", NULL);44 TextEngine::getInstance()->debug();46 //this->addBufferLineStatic("asjflksjdvklasmv %s", "doom"); 47 //TextEngine::getInstance()->debug(); 45 48 //exit(-1); 46 49 } … … 73 76 while(bufferDisplaySize > this->bufferText->getSize()) 74 77 { 75 Text* newText = TextEngine::getInstance()->createText("fonts/earth.ttf", 30, TEXT_DYNAMIC, 0, 255, 0);78 Text* newText = TextEngine::getInstance()->createText("fonts/earth.ttf", 10, TEXT_DYNAMIC, 0, 255, 0); 76 79 newText->setAlignment(TEXT_ALIGN_LEFT); 77 80 newText->setPosition2D(5, 5); … … 120 123 * @todo optimize 121 124 */ 122 void Shell::addBufferLine(const char* line, va_list args) 123 { 124 char tmp[1024];// = new char* 125 vsprintf(tmp, line, args); 126 127 char* newLine = new char[strlen(tmp)+1]; 128 strcpy(newLine, tmp); 129 130 this->buffer->addAtBeginning(newLine); 131 132 if (this->buffer->getSize() > this->bufferSize) 133 { 134 delete this->buffer->firstElement(); 135 this->buffer->remove(this->buffer->firstElement()); 136 } 125 bool Shell::addBufferLineStatic(const char* line, ...) 126 { 127 va_list arguments; 128 va_start(arguments, line); 129 130 if (Shell::singletonRef == NULL) 131 vprintf(line, arguments); 132 else 133 Shell::singletonRef->addBufferLine(line, arguments); 134 return true; 135 } 136 137 void Shell::addBufferLine(const char* line, va_list arguments) 138 { 139 vsprintf(this->bufferArray, line, arguments); 140 141 char* newLine = new char[strlen(this->bufferArray)+1]; 142 strcpy(newLine, this->bufferArray); 143 144 // this->buffer->add(newLine); 145 146 // if (this->buffer->getSize() > this->bufferSize) 147 // { 148 // delete this->buffer->firstElement(); 149 // this->buffer->remove(this->buffer->firstElement()); 150 // } 137 151 138 152 this->bufferText->firstElement()->setText(newLine); 139 140 153 } 141 154 -
trunk/src/util/shell.h
r5074 r5075 10 10 #include "event_listener.h" 11 11 12 #include <stdio.h>13 12 #include <stdarg.h> 14 15 13 16 14 // FORWARD DECLARATION … … 44 42 // BUFFER // 45 43 void flushBuffers(); 46 void addBufferLine(const char* Line, va_list args); 44 static bool addBufferLineStatic(const char* line, ...); 45 void addBufferLine(const char* line, va_list arg); 47 46 void moveBuffer(int lineCount); 48 47 const char* getBufferLine(unsigned int lineNumber); … … 81 80 tList<Text>* bufferText; //!< A list of stored bufferTexts for the display of the buffer 82 81 Text* inputLineText; //!< The inputLine of the Shell 82 83 char bufferArray[10000]; //!< a BUFFER for fast writing 84 83 85 }; 84 86
Note: See TracChangeset
for help on using the changeset viewer.