Changeset 8145 in orxonox.OLD for trunk/src/lib
- Timestamp:
- Jun 5, 2006, 11:49:26 AM (18 years ago)
- Location:
- trunk/src/lib
- Files:
-
- 3 deleted
- 16 edited
- 93 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/BuildLibs.am
r7954 r8145 3 3 $(LIB_PREFIX)/libORXlibs.a \ 4 4 $(LIB_PREFIX)/shell/libORXshell.a \ 5 $(LIB_PREFIX)/gui/qt _gui/libORXqtgui.a \6 $(LIB_PREFIX)/gui/gl _gui/libORXglgui.a \5 $(LIB_PREFIX)/gui/qt/libORXqtgui.a \ 6 $(LIB_PREFIX)/gui/gl/libORXglgui.a \ 7 7 $(LIB_PREFIX)/gui/libORXbasegui.a \ 8 8 $(LIB_PREFIX)/graphics/importer/libORXimporter.a \ -
trunk/src/lib/collision_reaction/cr_engine.h
r7927 r8145 51 51 52 52 /** @returns an instance to a collision object. instead of creating new object this ones can be resycled */ 53 inline Collision* getCollisionObject() { /* return the first element of the cache list*/ }53 inline Collision* getCollisionObject() { /* return the first element of the cache list*/ } 54 54 /** @param collision: returns the Collision object back to the cache list */ 55 55 inline void putCollisionObject(Collision* collision) { this->cachedCollisions.push_back(collision); } -
trunk/src/lib/event/event_handler.cc
r8061 r8145 337 337 else 338 338 { 339 SDL_WM_GrabInput(SDL_GRAB_ON);339 // SDL_WM_GrabInput(SDL_GRAB_ON); 340 340 SDL_ShowCursor(SDL_DISABLE); 341 341 } -
trunk/src/lib/graphics/importer/primitive_model.cc
r7729 r8145 104 104 105 105 // defining the binding Faces. 106 unsignedint v1, v2, v3, v4;106 int v1, v2, v3, v4; 107 107 for (int i = 0; i <= detail * 2 -1; i++) 108 108 { … … 235 235 } 236 236 //defining Faces 237 unsignedint v1, v2, v3, v4;237 int v1, v2, v3, v4; 238 238 for (int i = 0; i < detail-1; i++) 239 239 for (int j = 0; j < detail-1; j++) -
trunk/src/lib/graphics/importer/texture.cc
r7790 r8145 218 218 this->setTexture(Texture::loadTexToGL(this->data->getStoredImage())); 219 219 } 220 return true; 220 221 } 221 222 -
trunk/src/lib/graphics/importer/texture.h
r7790 r8145 34 34 bool setSurface(SDL_Surface* newSurface); 35 35 /** @returns true if the Surface has an Alpha Value. */ 36 bool setAlpha(bool hasAlpha) { this->bAlpha = hasAlpha; };36 bool setAlpha(bool hasAlpha) { this->bAlpha = hasAlpha; return this->bAlpha; }; 37 37 bool setTexture(GLuint texture); 38 38 -
trunk/src/lib/gui/Makefile.am
r7661 r8145 23 23 SUBDIRS = \ 24 24 . \ 25 gl _gui\26 qt _gui25 gl \ 26 qt 27 27 28 28 # gtk_gui -
trunk/src/lib/lang/base_object.cc
r7954 r8145 154 154 if (classID != CL_NULL) 155 155 return this->isA(classID); 156 else 157 return false; 156 158 } 157 159 -
trunk/src/lib/lang/class_list.cc
r7429 r8145 335 335 PRINT(0)("| knows %d Classes\n|\n", ClassList::classList->size()); 336 336 char niceString[100]; 337 unsignedint lenCount = 0;337 int lenCount = 0; 338 338 339 339 list<ClassList>::iterator cl; -
trunk/src/lib/math/rect2D.cc
r7919 r8145 36 36 Rect2D::Rect2D(float x, float y, float width, float height) 37 37 { 38 this->setLeft(x), this->setTop(y); 38 this->setLeft(x), 39 this->setTop(y); 39 40 this->setSize(width, height); 40 41 } -
trunk/src/lib/math/vector.h
r8035 r8145 79 79 inline const Vector& operator= (const Vector& v) { this->x = v.x; this->y = v.y; this->z = v.z; return *this; }; 80 80 /** copy constructor* @param v the sVec3D to assign to this vector. @returns the vector v */ 81 inline const Vector& operator= (const sVec3D& v) { this->x = v[0]; this->y = v[1]; this->z = v[2]; }82 inline const Vector& operator= (const float* v) { this->x = v[0]; this->y = v[1]; this->z = v[2]; }81 inline const Vector& operator= (const sVec3D& v) { this->x = v[0]; this->y = v[1]; this->z = v[2]; return *this; } 82 inline const Vector& operator= (const float* v) { this->x = v[0]; this->y = v[1]; this->z = v[2]; return *this; } 83 83 /** @param v: the other vector \return the dot product of the vectors */ 84 84 float dot (const Vector& v) const { return x*v.x+y*v.y+z*v.z; }; -
trunk/src/lib/shell/shell_buffer.cc
r7764 r8145 41 41 ShellBuffer* ShellBuffer::singletonRef = NULL; 42 42 std::list<std::string> ShellBuffer::buffer; 43 char ShellBuffer::bufferArray[SHELL_BUFFER_SIZE]; 44 43 45 44 46 /** … … 62 64 * @param line the Line as in the first argument in printf 63 65 */ 64 boolShellBuffer::addBufferLineStatic(const char* line, ...)66 void ShellBuffer::addBufferLineStatic(const char* line, ...) 65 67 { 66 va_list arguments;67 va_start(arguments, line);68 69 68 static OrxThread::Mutex ShellBuffer__bufferMutex; 70 69 71 70 OrxThread::MutexLock bufferLock(&ShellBuffer__bufferMutex); 71 72 va_list arguments; 73 va_start(arguments, line); 74 vsnprintf(ShellBuffer::bufferArray, SHELL_BUFFER_SIZE, line, arguments); 75 va_end(arguments); 76 72 77 #if DEBUG_LEVEL < 3 73 78 if (ShellBuffer::singletonRef == NULL) 74 79 #endif 75 vprintf(line, arguments);80 printf(ShellBuffer::bufferArray); 76 81 #if DEBUG_LEVEL < 3 77 82 else … … 79 84 if (ShellBuffer::singletonRef != NULL) 80 85 #endif 81 ShellBuffer::singletonRef->addBufferLine(line, arguments); 82 return true; 86 ShellBuffer::singletonRef->addBufferLine(ShellBuffer::bufferArray); 83 87 } 84 88 … … 91 95 * and displays the line as the First Line of the display-buffer 92 96 */ 93 void ShellBuffer::addBufferLine(const char* line , va_list arguments)97 void ShellBuffer::addBufferLine(const char* line) 94 98 { 95 // copy the output to the bufferArray 96 vsprintf(this->bufferArray, line, arguments); 97 98 std::string inputBuffer = this->keepBuffer + this->bufferArray; 99 std::string inputBuffer = this->keepBuffer + line; 99 100 100 101 int lineBegin = 0; -
trunk/src/lib/shell/shell_buffer.h
r7762 r8145 32 32 inline static bool isInstanciated() { return (ShellBuffer::singletonRef == NULL)?false:true; }; 33 33 34 static booladdBufferLineStatic(const char* line, ...);35 void addBufferLine(const char* line , va_list arg);34 static void addBufferLineStatic(const char* line, ...); 35 void addBufferLine(const char* line); 36 36 37 37 /// BUFFER … … 56 56 unsigned int maxBufferSize; //!< The Size of the buffer 57 57 58 char bufferArray[SHELL_BUFFER_SIZE]; //!< a BUFFER for fast writing59 58 std::string keepBuffer; //!< a BUFFER to have multi-non-newLine commands be copied into the shell. 60 59 … … 62 61 63 62 // The Beginning of buffer (buffer.front()) is the last added line. 63 static char bufferArray[SHELL_BUFFER_SIZE]; //!< a BUFFER for fast writing 64 64 static std::list<std::string> buffer; //!< A list of stored char-arrays(strings) to store the history 65 65 }; -
trunk/src/lib/shell/shell_command.h
r7742 r8145 34 34 * $ ClassName [ObjectName] commandNameInShell [parameters] 35 35 */ 36 //#define SHELL_COMMAND(command, class, function) \37 // ShellCommand* shell_command_##class##_##command = ShellCommand<class>::registerCommand(#command, #class, &class::function)38 36 #define SHELL_COMMAND(command, class, function) \ 39 37 OrxShell::ShellCommand* shell_command_##class##_##command = OrxShell::ShellCommand::registerCommand(#command, #class, createExecutor<class>(&class::function)) -
trunk/src/lib/util/color.h
r7195 r8145 16 16 { 17 17 public: 18 Color(float r, float g, float b, float a) :_r(r), _g(g), _b(b), _a(a) {}; 19 Color(const Color& c) { _r = c._r; _g = c._g; _b = c._b; _a = c._a; }; 20 21 float r() const { return _r; } 22 float& r() { return _r; } 23 float g() const { return _g; } 24 float& g() { return _g; } 25 float b() const { return _b; } 26 float& b() { return _b; } 27 float a() const { return _a; } 28 float& a() { return _a; } 29 30 public: 18 31 static Vector RGBtoHSV (const Vector& RGB); 19 32 static void RGBtoHSV (const Vector& RGB, Vector& HSV); … … 24 37 static float minrgb(float r, float g, float b); 25 38 static float maxrgb(float r, float g, float b); 39 40 float _r; //!< Red Value. 41 float _g; //!< Green Value. 42 float _b; //!< Blue Value. 43 float _a; //!< Alpha Value. 44 26 45 }; 27 46 -
trunk/src/lib/util/count_pointer.h
r6669 r8145 11 11 explicit CountPointer(X* p = 0) // allocate a new counter 12 12 : itsCounter(0) { if (p) itsCounter = new counter(p); } 13 ~CountPointer() { release(); }13 virtual ~CountPointer() { release(); } 14 14 CountPointer(const CountPointer& r) { acquire(r.itsCounter); } 15 15 CountPointer& operator=(const CountPointer& r)
Note: See TracChangeset
for help on using the changeset viewer.