Changeset 9863 in orxonox.OLD for branches/new_class_id/src
- Timestamp:
- Oct 2, 2006, 4:53:38 PM (18 years ago)
- Location:
- branches/new_class_id/src
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/collision_reaction/collision_handle.h
r9715 r9863 64 64 65 65 std::vector<Collision*> collisionList; //!< a list full of collisions 66 /// TODO Take a std::set here! 66 67 std::vector<ClassID> targetList; //!< a list of target classes for filtering @TODO TAKE SET INSTEAD OF VECTOR HERE 67 68 -
branches/new_class_id/src/lib/graphics/importer/material.cc
r9833 r9863 261 261 } 262 262 263 264 265 /**266 * @brief Adds a Texture Path to the List of already existing Paths267 * @param pathName The Path to add.268 */269 void Material::addTexturePath(const std::string& pathName)270 {271 printf("HUPS\n");272 //ResourceManager::getInstance()->addImageDir(pathName);273 }274 263 275 264 /** -
branches/new_class_id/src/lib/graphics/importer/material.h
r9823 r9863 67 67 const Texture& diffuseTexture(unsigned int i = 0) const { return this->textures[i]; }; 68 68 69 static void addTexturePath(const std::string& pathName);70 71 69 static const std::string& blendFuncToString(GLenum blendFunc); 72 70 static GLenum stringToBlendFunc(const std::string& blendFuncString); -
branches/new_class_id/src/lib/graphics/importer/md2/md2Model.cc
r9828 r9863 92 92 rebuildInfo(); 93 93 94 this->debug();94 //this->debug(); 95 95 } 96 96 -
branches/new_class_id/src/lib/graphics/importer/objModel.cc
r9831 r9863 19 19 20 20 #include <string.h> 21 #include "loading/resource_manager.h" 21 22 22 23 #define PARSELINELENGTH 8192 … … 76 77 else 77 78 this->objPath = "./"; 78 Material::addTexturePath(this->objPath);79 Resources::ResourceManager::getInstance()->addResourcePath("Texture", this->objPath); 79 80 80 81 this->readFromObjFile (fileName); -
branches/new_class_id/src/lib/graphics/text_engine/resource_font.cc
r9854 r9863 21 21 PRINTF(5)("NOT FOUND FONT: %s\n", fontName.c_str()); 22 22 std::string fileName = this->Resource::locateFile(fontName); 23 24 printf("FONTFILE %s TO %s\n", fontName.c_str(), fileName.c_str());25 23 26 24 this->Font::loadFontFromTTF(fileName, renderSize); -
branches/new_class_id/src/orxonox.cc
r9861 r9863 570 570 } 571 571 572 printf("finished inizialisation\n");572 PRINTF(5)("finished inizialisation\n"); 573 573 orx->start(); 574 574 -
branches/new_class_id/src/story_entities/game_world.cc
r9833 r9863 151 151 152 152 153 PRINTF( 0)("Loading the GameWorld\n");153 PRINTF(4)("Loading the GameWorld\n"); 154 154 155 155 PRINTF(3)("> Loading world: '%s'\n", getLoadFile().c_str()); … … 336 336 } 337 337 338 PRINTF( 0)("GameWorld::mainLoop() - Exiting the main loop\n");338 PRINTF(4)("GameWorld::mainLoop() - Exiting the main loop\n"); 339 339 } 340 340 -
branches/new_class_id/src/story_entities/menu/game_menu.cc
r9856 r9863 199 199 { 200 200 201 printf("%s\n", se->getMenuScreenshoot().c_str());201 PRINTF(3)("Load image %s\n", se->getMenuScreenshoot().c_str()); 202 202 OrxGui::GLGuiImageButton* button = new OrxGui::GLGuiImageButton(se->getName(), se->getStoryID(), se->getMenuScreenshoot(), image); 203 203 button->startLevel.connect(this, &GameMenu::startLevel); -
branches/new_class_id/src/story_entities/menu/glgui_imagebutton.cc
r9406 r9863 14 14 */ 15 15 16 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_SHELL17 16 18 17 #include "glgui_imagebutton.h" … … 45 44 void GLGuiImageButton::receivedFocus() 46 45 { 47 printf("%s:: %s\n", this->label().c_str(), this->imageName.c_str());46 PRINTF(4)("%s:: %s\n", this->label().c_str(), this->imageName.c_str()); 48 47 49 48 this->image->loadImageFromFile(this->imageName); -
branches/new_class_id/src/util/hud.cc
r9715 r9863 185 185 if (State::getPlayer() && State::getPlayer()->getPlayable() && State::getObjectManager()) 186 186 { 187 printf("UPDATING RADAR\n");187 PRINTF(4)("UPDATING RADAR\n"); 188 188 this->_radar->setCenterNode(State::getPlayer()->getPlayable()); 189 189 this->_radar->addEntityList(&State::getObjectManager()->getEntityList((OM_LIST)(State::getPlayer()->getPlayable()->getOMListNumber()+1)), Color(.4, .4, 1.0)); -
branches/new_class_id/src/world_entities/skydome.cc
r9833 r9863 44 44 void Skydome::init() 45 45 { 46 PRINTF( 0)("Skydome init\n");46 PRINTF(4)("Skydome init\n"); 47 47 48 48 this->registerObject(this, Skydome::_objectList); … … 63 63 Skydome::~Skydome() 64 64 { 65 PRINTF( 0)("Deleting Skydome\n");65 PRINTF(4)("Deleting Skydome\n"); 66 66 67 67 if (glIsTexture(texture)) -
branches/new_class_id/src/world_entities/weapons/aim.cc
r9715 r9863 51 51 Aim::~Aim () 52 52 { 53 /* if (this->text != NULL)54 delete this->text;*/53 /* if (this->text != NULL) 54 delete this->text;*/ 55 55 } 56 56 … … 80 80 81 81 82 /* this->text = new Text();83 this->text->setLayer(this->getLayer());84 this->text->setParent2D(this);85 this->text->setRelCoor2D(10, -50);86 this->text->setParentMode2D(E2D_PARENT_MOVEMENT);87 this->text->setText("Testing");*/82 /* this->text = new Text(); 83 this->text->setLayer(this->getLayer()); 84 this->text->setParent2D(this); 85 this->text->setRelCoor2D(10, -50); 86 this->text->setParentMode2D(E2D_PARENT_MOVEMENT); 87 this->text->setText("Testing");*/ 88 88 } 89 89 … … 93 93 94 94 LoadParam(root, "texture", this, Aim, setTexture) 95 95 .describe("the texture-file to load onto the Aim"); 96 96 97 97 LoadParam(root, "size", this, Aim, setSize) 98 98 .describe("the size of the Aim in Pixels"); 99 99 100 100 LoadParam(root, "rotation-speed", this, Aim, setRotationSpeed) 101 101 .describe("the Speed with which the Aim should rotate"); 102 102 103 103 LoadParam(root, "target-group", this, Aim, setTargetGroupS); … … 118 118 //if (this->getParent() != (*entity)) 119 119 { 120 printf("found target::: %d %s::%s\n", (*entity)->getOMListNumber(), (*entity)->getClassCName(), (*entity)->getCName());120 // printf("found target::: %d %s::%s\n", (*entity)->getOMListNumber(), (*entity)->getClassCName(), (*entity)->getCName()); 121 121 this->anim->replay(); 122 122 this->setParentSoft(*entity, 5); … … 126 126 } 127 127 128 129 128 //if no target found: 129 this->setParent(PNode::getNullParent()); 130 130 } 131 131 … … 166 166 this->shiftDir2D(dt * rotationSpeed); 167 167 168 // char outputText[100];169 // sprintf(outputText, "%s - distance: %f\n", this->getParent()->getName(), (this->source->getAbsCoor() - this->getAbsCoor()).len());170 // this->text->setText(outputText);171 172 173 // if (this->source->getAbsCoor().x > this->getAbsCoor().x )168 // char outputText[100]; 169 // sprintf(outputText, "%s - distance: %f\n", this->getParent()->getName(), (this->source->getAbsCoor() - this->getAbsCoor()).len()); 170 // this->text->setText(outputText); 171 172 173 // if (this->source->getAbsCoor().x > this->getAbsCoor().x ) 174 174 diffVec = ( this->getAbsCoor() - this->source->getAbsCoor() ); 175 //only look for target if the aim hasn`t locked a target yet or if the actual target is out of range176 175 //only look for target if the aim hasn`t locked a target yet or if the actual target is out of range 176 if(this->getParent() == PNode::getNullParent() || 177 177 diffVec.len() > range )// || 178 179 180 181 182 183 184 // float z = 0.0f;185 // glReadPixels ((int)this->getAbsCoor2D().x,186 // GraphicsEngine::getInstance()->getResolutionY()-(int)this->getAbsCoor2D().y-1,187 // 1,188 // 1,189 // GL_DEPTH_COMPONENT,190 // GL_FLOAT,191 // &z);192 //193 //194 // GLdouble objX=.0, objY=.0, objZ=.0;195 // gluUnProject(this->getAbsCoor2D().x,196 // GraphicsEngine::getInstance()->getResolutionY()-this->getAbsCoor2D().y-1,197 // .99, // z198 // GraphicsEngine::modMat,199 // GraphicsEngine::projMat,200 // GraphicsEngine::viewPort,201 // &objX,202 // &objY,203 // &objZ );204 //aa205 // this->setAbsCoor(objX, objY, objZ);178 //( acos( (this->source->getAbsDirX()).dot(diffVec)/(diffVec.len() * (this->source->getAbsDirX()).len() ) ) > angle)) 179 { 180 this->setParentSoft(PNode::getNullParent(),5); 181 this->searchTarget(); 182 } 183 184 // float z = 0.0f; 185 // glReadPixels ((int)this->getAbsCoor2D().x, 186 // GraphicsEngine::getInstance()->getResolutionY()-(int)this->getAbsCoor2D().y-1, 187 // 1, 188 // 1, 189 // GL_DEPTH_COMPONENT, 190 // GL_FLOAT, 191 // &z); 192 // 193 // 194 // GLdouble objX=.0, objY=.0, objZ=.0; 195 // gluUnProject(this->getAbsCoor2D().x, 196 // GraphicsEngine::getInstance()->getResolutionY()-this->getAbsCoor2D().y-1, 197 // .99, // z 198 // GraphicsEngine::modMat, 199 // GraphicsEngine::projMat, 200 // GraphicsEngine::viewPort, 201 // &objX, 202 // &objY, 203 // &objZ ); 204 //aa 205 // this->setAbsCoor(objX, objY, objZ); 206 206 } 207 207 … … 212 212 { 213 213 214 if( this->getParent() != PNode::getNullParent() )214 if( this->getParent() != PNode::getNullParent() ) 215 215 { 216 glPushMatrix();217 glTranslatef(this->getAbsCoor2D().x, this->getAbsCoor2D().y, 0);218 219 glRotatef(this->getAbsDir2D(), 0,0,1);220 this->material.select();221 glBegin(GL_TRIANGLE_STRIP);222 glTexCoord2f(0, 0);223 glVertex2f(-this->getSizeX2D(), -this->getSizeY2D());224 glTexCoord2f(1, 0);225 glVertex2f(this->getSizeX2D(), -this->getSizeY2D());226 glTexCoord2f(0, 1);227 glVertex2f(-this->getSizeX2D(), this->getSizeY2D());228 glTexCoord2f(1, 1);229 glVertex2f(this->getSizeX2D(), this->getSizeY2D());230 glEnd();231 glPopMatrix();216 glPushMatrix(); 217 glTranslatef(this->getAbsCoor2D().x, this->getAbsCoor2D().y, 0); 218 219 glRotatef(this->getAbsDir2D(), 0,0,1); 220 this->material.select(); 221 glBegin(GL_TRIANGLE_STRIP); 222 glTexCoord2f(0, 0); 223 glVertex2f(-this->getSizeX2D(), -this->getSizeY2D()); 224 glTexCoord2f(1, 0); 225 glVertex2f(this->getSizeX2D(), -this->getSizeY2D()); 226 glTexCoord2f(0, 1); 227 glVertex2f(-this->getSizeX2D(), this->getSizeY2D()); 228 glTexCoord2f(1, 1); 229 glVertex2f(this->getSizeX2D(), this->getSizeY2D()); 230 glEnd(); 231 glPopMatrix(); 232 232 } 233 233 -
branches/new_class_id/src/world_entities/weapons/weapon_manager.cc
r9757 r9863 17 17 */ 18 18 19 #define DEBUG_SPECIAL_MODULE 4 //DEBUG_MODULE_WEAPON19 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WEAPON 20 20 21 21 #include "weapon_manager.h" … … 302 302 weapon->setDefaultTarget(this->crosshair); 303 303 } 304 PRINTF( 3)("Added a new Weapon (%s::%s) to the WeaponManager: config %i/ slot %i\n", weapon->getClassCName(), weapon->getCName(), configID, slotID);304 PRINTF(4)("Added a new Weapon (%s::%s) to the WeaponManager: config %i/ slot %i\n", weapon->getClassCName(), weapon->getCName(), configID, slotID); 305 305 return true; 306 306 } -
branches/new_class_id/src/world_entities/weather_effects/cloud_effect.cc
r9833 r9863 81 81 82 82 void CloudEffect::init() { 83 PRINTF( 0)("Initializing CloudEffect\n");83 PRINTF(4)("Initializing CloudEffect\n"); 84 84 85 85 // default values … … 176 176 177 177 void CloudEffect::deactivate() { 178 PRINTF( 0)("Deactivating CloudEffect\n");178 PRINTF(4)("Deactivating CloudEffect\n"); 179 179 180 180 this->skydome->deactivate();
Note: See TracChangeset
for help on using the changeset viewer.