Changeset 5381 in orxonox.OLD for branches/2d-recalc/src/world_entities/weapons
- Timestamp:
- Oct 15, 2005, 7:13:23 PM (19 years ago)
- Location:
- branches/2d-recalc/src/world_entities/weapons
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2d-recalc/src/world_entities/weapons/crosshair.cc
r5378 r5381 65 65 this->setLayer(E2D_TOP); 66 66 this->setRotationSpeed(5); 67 this->setSize( GraphicsEngine::getInstance()->getResolutionX()/10.0);67 this->setSize(0.1); 68 68 69 this->setBindNode(this);69 // this->setBindNode(this); 70 70 this->material = new Material; 71 71 … … 73 73 74 74 // center the mouse on the screen, and also hide the cursors 75 SDL_WarpMouse(GraphicsEngine::getInstance()->getResolutionX()/2, GraphicsEngine::getInstance()->getResolutionY()/2);75 // SDL_WarpMouse(GraphicsEngine::getInstance()->getResolutionX()/2, GraphicsEngine::getInstance()->getResolutionY()/2); 76 76 GraphicsEngine::showMouse(false); 77 77 GraphicsEngine::stealWMEvents(true); … … 121 121 if (event.type == EV_MOUSE_MOTION) 122 122 { 123 this->setAbsCoor2D (event.x, event.y);123 this->setAbsCoor2Dpx(event.x, event.y); 124 124 } 125 125 } … … 134 134 this->shiftDir2D(dt * rotationSpeed); 135 135 136 137 136 float z = 0.0f; 138 glReadPixels ((int)this->getAbsCoor2D ().x,139 GraphicsEngine::getInstance()->getResolutionY()-(int)this->getAbsCoor2D ().y-1,137 glReadPixels ((int)this->getAbsCoor2Dpx().x, 138 GraphicsEngine::getInstance()->getResolutionY()-(int)this->getAbsCoor2Dpx().y-1, 140 139 1, 141 140 1, … … 146 145 147 146 GLdouble objX=.0, objY=.0, objZ=.0; 148 gluUnProject(this->getAbsCoor2D ().x,149 GraphicsEngine::getInstance()->getResolutionY()-this->getAbsCoor2D ().y-1,147 gluUnProject(this->getAbsCoor2Dpx().x, 148 GraphicsEngine::getInstance()->getResolutionY()-this->getAbsCoor2Dpx().y-1, 150 149 .99, // z 151 150 GraphicsEngine::modMat, … … 166 165 glPushMatrix(); 167 166 glTranslatef(this->getAbsCoor2D().x, this->getAbsCoor2D().y, 0); 167 // printf("%f, %f\n", this->getAbsCoor2D().x, this->getAbsCoor2D().y); 168 168 169 169 glRotatef(this->getAbsDir2D(), 0,0,1); -
branches/2d-recalc/src/world_entities/weapons/weapon_manager.cc
r5208 r5381 106 106 this->crossHairSizeAnim = new tAnimation<Crosshair>(this->crosshair, &Crosshair::setSize); 107 107 this->crossHairSizeAnim->setInfinity(ANIM_INF_REWIND); 108 this->crossHairSizeAnim->addKeyFrame( 50, .1, ANIM_LINEAR);109 this->crossHairSizeAnim->addKeyFrame( 100, .05, ANIM_LINEAR);110 this->crossHairSizeAnim->addKeyFrame( 50, .01, ANIM_LINEAR);108 this->crossHairSizeAnim->addKeyFrame(.1, .1, ANIM_LINEAR); 109 this->crossHairSizeAnim->addKeyFrame(.2, .05, ANIM_LINEAR); 110 this->crossHairSizeAnim->addKeyFrame(.1, .01, ANIM_LINEAR); 111 111 } 112 112
Note: See TracChangeset
for help on using the changeset viewer.