[4151] | 1 | |
---|
| 2 | |
---|
| 3 | /* |
---|
| 4 | orxonox - the future of 3D-vertical-scrollers |
---|
| 5 | |
---|
| 6 | Copyright (C) 2004 orx |
---|
| 7 | |
---|
| 8 | This program is free software; you can redistribute it and/or modify |
---|
| 9 | it under the terms of the GNU General Public License as published by |
---|
| 10 | the Free Software Foundation; either version 2, or (at your option) |
---|
| 11 | any later version. |
---|
| 12 | |
---|
| 13 | ### File Specific |
---|
| 14 | main-programmer: Patrick Boenzli |
---|
| 15 | co-programmer: |
---|
| 16 | */ |
---|
| 17 | |
---|
| 18 | |
---|
| 19 | #include "test_entity.h" |
---|
| 20 | #include "stdincl.h" |
---|
| 21 | #include "model.h" |
---|
[4152] | 22 | #include "md2Model.h" |
---|
[4151] | 23 | |
---|
| 24 | using namespace std; |
---|
| 25 | |
---|
| 26 | |
---|
| 27 | |
---|
| 28 | TestEntity::TestEntity () : WorldEntity() |
---|
[4159] | 29 | { |
---|
[4189] | 30 | //this->md2Model = new MD2Model(); |
---|
[4152] | 31 | |
---|
[4189] | 32 | this->md2Model2 = new MD2Model2(); |
---|
| 33 | this->md2Model2->loadModel("../data/models/tris.md2"); |
---|
| 34 | this->md2Model2->loadSkin("../data/models/tris.pcx"); |
---|
[4151] | 35 | } |
---|
| 36 | |
---|
| 37 | |
---|
| 38 | TestEntity::~TestEntity () |
---|
[4153] | 39 | {} |
---|
[4151] | 40 | |
---|
| 41 | |
---|
[4163] | 42 | void TestEntity::tick (float time) |
---|
| 43 | { |
---|
[4224] | 44 | //this->md2Model2->tick(time); |
---|
[4163] | 45 | } |
---|
[4151] | 46 | |
---|
[4153] | 47 | |
---|
[4151] | 48 | void TestEntity::hit (WorldEntity* weapon, Vector* loc) {} |
---|
| 49 | |
---|
[4153] | 50 | |
---|
[4151] | 51 | void TestEntity::destroy () {} |
---|
| 52 | |
---|
[4153] | 53 | |
---|
[4151] | 54 | void TestEntity::collide (WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags) {} |
---|
| 55 | |
---|
[4153] | 56 | |
---|
[4151] | 57 | void TestEntity::draw () |
---|
| 58 | { |
---|
| 59 | glMatrixMode(GL_MODELVIEW); |
---|
| 60 | glPushMatrix(); |
---|
| 61 | float matrix[4][4]; |
---|
| 62 | |
---|
| 63 | glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z); |
---|
[4189] | 64 | this->getAbsDir().matrix (matrix); |
---|
[4151] | 65 | glMultMatrixf((float*)matrix); |
---|
| 66 | |
---|
[4168] | 67 | |
---|
[4152] | 68 | /* TESTGING TESTING TESTING */ |
---|
[4189] | 69 | //this->material->select(); |
---|
[4163] | 70 | //this->md2Model->draw(this->model); |
---|
[4189] | 71 | //this->md2Model->animate(); |
---|
[4151] | 72 | |
---|
[4189] | 73 | this->md2Model2->draw(); |
---|
[4224] | 74 | |
---|
[4189] | 75 | |
---|
[4151] | 76 | glPopMatrix(); |
---|
| 77 | } |
---|
| 78 | |
---|