Changeset 9161 in orxonox.OLD for branches/presentation/src
- Timestamp:
- Jul 4, 2006, 6:07:10 PM (18 years ago)
- Location:
- branches/presentation/src/world_entities/npcs
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/presentation/src/world_entities/npcs/npc.cc
r9003 r9161 51 51 void NPC::loadParams(const TiXmlElement* root) 52 52 { 53 if(root != NULL)54 53 WorldEntity::loadParams(root); 55 54 } -
branches/presentation/src/world_entities/npcs/npc_test.cc
r8724 r9161 23 23 #include "shader.h" 24 24 #include "state.h" 25 #include "stdlibincl.h"26 25 #include "debug.h" 27 26 27 #include "loading/factory.h" 28 #include "loading/load_param.h" 28 29 29 using namespace std;30 CREATE_FACTORY(NPC2, CL_NPC_TEST2); 30 31 31 32 32 NPC2::NPC2( )33 NPC2::NPC2(const TiXmlElement* root) 33 34 : NPC(NULL) 34 35 { … … 47 48 48 49 this->randomRotAxis = VECTOR_RAND(1); 50 51 if (root != NULL) 52 this->loadParams(root); 49 53 } 50 54 … … 55 59 Shader::unload(this->shader); 56 60 gluDeleteQuadric(this->obj); 61 } 62 63 64 void NPC2::loadParams(const TiXmlElement* root) 65 { 66 NPC::loadParams(root); 67 57 68 } 58 69 … … 67 78 void NPC2::draw() const 68 79 { 69 //glMatrixMode(GL_MODELVIEW);70 //glPushMatrix();71 //float matrix[4][4];72 // 73 ///* translate */74 //glTranslatef (this->getAbsCoor ().x,75 //this->getAbsCoor ().y,76 //this->getAbsCoor ().z);77 ///* rotate */78 //this->getAbsDir ().matrix (matrix);79 //glMultMatrixf((float*)matrix);80 // 81 //if (this->shader != NULL && this->shader != Shader::getActiveShader())82 //shader->activateShader();83 //gluSphere(this->obj, 3, 10, 10);84 //shader->deactivateShader();85 // 86 // 87 / / /* if (this->model)88 //this->model->draw();*/89 //glPopMatrix();80 glMatrixMode(GL_MODELVIEW); 81 glPushMatrix(); 82 float matrix[4][4]; 83 84 /* translate */ 85 glTranslatef (this->getAbsCoor ().x, 86 this->getAbsCoor ().y, 87 this->getAbsCoor ().z); 88 /* rotate */ 89 this->getAbsDir ().matrix (matrix); 90 glMultMatrixf((float*)matrix); 91 92 if (this->shader != NULL && this->shader != Shader::getActiveShader()) 93 shader->activateShader(); 94 gluSphere(this->obj, 3, 10, 10); 95 shader->deactivateShader(); 96 97 98 /* if (this->model) 99 this->model->draw();*/ 100 glPopMatrix(); 90 101 } 91 102 -
branches/presentation/src/world_entities/npcs/npc_test.h
r6981 r9161 11 11 12 12 public: 13 NPC2 ( );13 NPC2 (const TiXmlElement* root); 14 14 virtual ~NPC2 (); 15 15 16 virtual void loadParams(const TiXmlElement* root); 16 17 17 18 void addAI(AI* ai); -
branches/presentation/src/world_entities/npcs/npc_test1.cc
r8724 r9161 24 24 #include "power_ups/turret_power_up.h" 25 25 #include "power_ups/laser_power_up.h" 26 27 using namespace std;28 26 29 27
Note: See TracChangeset
for help on using the changeset viewer.