[4245] | 1 | |
---|
| 2 | |
---|
[4679] | 3 | /* |
---|
[4245] | 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 |
---|
[9927] | 14 | main-programmer: |
---|
[4679] | 15 | co-programmer: |
---|
[4245] | 16 | */ |
---|
[5357] | 17 | #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY |
---|
[4245] | 18 | |
---|
| 19 | |
---|
[6222] | 20 | #include "executor/executor.h" |
---|
[7193] | 21 | #include "util/loading/factory.h" |
---|
| 22 | #include "util/loading/load_param.h" |
---|
[6222] | 23 | |
---|
[7488] | 24 | |
---|
[4245] | 25 | #include "test_entity.h" |
---|
[9869] | 26 | #include "debug.h" |
---|
[8490] | 27 | |
---|
| 28 | |
---|
[9927] | 29 | |
---|
| 30 | |
---|
[5087] | 31 | #include "state.h" |
---|
[4245] | 32 | |
---|
| 33 | |
---|
| 34 | |
---|
[9869] | 35 | #include "class_id_DEPRECATED.h" |
---|
| 36 | ObjectListDefinition(TestEntity); |
---|
| 37 | CREATE_FACTORY(TestEntity); |
---|
[9406] | 38 | |
---|
[6222] | 39 | |
---|
[9003] | 40 | |
---|
[9927] | 41 | /** |
---|
| 42 | * |
---|
| 43 | */ |
---|
[4762] | 44 | TestEntity::TestEntity () |
---|
[4679] | 45 | { |
---|
[6222] | 46 | this->init(); |
---|
| 47 | } |
---|
[4245] | 48 | |
---|
[4714] | 49 | |
---|
[9927] | 50 | /** |
---|
| 51 | * |
---|
| 52 | */ |
---|
[6222] | 53 | TestEntity::TestEntity(const TiXmlElement* root) |
---|
| 54 | { |
---|
| 55 | this->init(); |
---|
[9927] | 56 | |
---|
| 57 | if( root != NULL) |
---|
[6222] | 58 | this->loadParams(root); |
---|
[4245] | 59 | } |
---|
| 60 | |
---|
| 61 | |
---|
[9927] | 62 | /** |
---|
| 63 | * |
---|
| 64 | */ |
---|
[4679] | 65 | TestEntity::~TestEntity () |
---|
[6222] | 66 | {} |
---|
| 67 | |
---|
| 68 | |
---|
[9927] | 69 | /** |
---|
| 70 | * |
---|
| 71 | */ |
---|
[6222] | 72 | void TestEntity::init() |
---|
[4462] | 73 | { |
---|
[9869] | 74 | this->registerObject(this, TestEntity::_objectList); |
---|
[9931] | 75 | this->toList(OM_GROUP_01); |
---|
[4462] | 76 | } |
---|
[4245] | 77 | |
---|
[9927] | 78 | |
---|
[6222] | 79 | /** |
---|
| 80 | * loads the Settings of a MD2Creature from an XML-element. |
---|
| 81 | * @param root the XML-element to load the MD2Creature's properties from |
---|
| 82 | */ |
---|
| 83 | void TestEntity::loadParams(const TiXmlElement* root) |
---|
| 84 | { |
---|
[6512] | 85 | WorldEntity::loadParams(root); |
---|
[6222] | 86 | } |
---|
| 87 | |
---|
| 88 | |
---|
[4488] | 89 | |
---|
[9927] | 90 | /** |
---|
| 91 | * |
---|
| 92 | */ |
---|
[4679] | 93 | void TestEntity::tick (float time) |
---|
[4245] | 94 | { |
---|
[6222] | 95 | |
---|
[4245] | 96 | } |
---|
| 97 | |
---|
| 98 | |
---|
[9927] | 99 | /** |
---|
| 100 | * |
---|
| 101 | */ |
---|
| 102 | void TestEntity::draw() const |
---|
[7071] | 103 | { |
---|
[9931] | 104 | glPushMatrix(); |
---|
| 105 | glPushAttrib(GL_ENABLE_BIT); |
---|
[7488] | 106 | |
---|
[9931] | 107 | glMatrixMode(GL_MODELVIEW); |
---|
| 108 | glDisable(GL_LIGHTING); |
---|
[9932] | 109 | |
---|
| 110 | /* Move the object near the starting point of our spaceship*/ |
---|
[9931] | 111 | glTranslatef(-1200.0f, 300.0f, 700.0f); |
---|
| 112 | |
---|
| 113 | |
---|
| 114 | |
---|
| 115 | |
---|
[9932] | 116 | |
---|
| 117 | |
---|
[9931] | 118 | glPopAttrib(); |
---|
| 119 | glPopMatrix(); |
---|
[7071] | 120 | } |
---|
[5087] | 121 | |
---|
[4245] | 122 | |
---|
[7071] | 123 | |
---|
[7488] | 124 | |
---|