/****************************************************************************** This source file is part of AstroMenace game (Hardcore 3D space shooter with spaceship upgrade possibilities.) For the latest info, see http://www.viewizard.com/ File name: BasePart.cpp Copyright (c) 2006-2007 Michael Kurinnoy, Viewizard All Rights Reserved. File Version: 1.2 ****************************************************************************** AstroMenace game source code available under "dual licensing" model. The licensing options available are: * Commercial Licensing. This is the appropriate option if you are creating proprietary applications and you are not prepared to distribute and share the source code of your application. Contact us for pricing at viewizard@viewizard.com * Open Source Licensing. This is the appropriate option if you want to share the source code of your application with everyone you distribute it to, and you also want to give them the right to share who uses it. You should have received a copy of the GNU General Public License version 3 with this source codes. If not, see . ******************************************************************************/ /// подключаем нужные файлы #include "BasePart.h" //----------------------------------------------------------------------------- // Конструктор, инициализация всех переменных //----------------------------------------------------------------------------- void CBasePart::Create(int BasePartNum) { ObjectType = 13; ObjectStatus = 1; // чужой // задали первичный, нужно случайным образом найти if (BasePartNum == 1 || BasePartNum == 2 || BasePartNum == 6 || BasePartNum == 8) { int Rand = 1 + vw_iRandNum(4); if (Rand < 1) Rand = 1; if (Rand > 5) Rand = 5; BasePartNum = BasePartNum*10 + Rand; } ObjectCreationType = BasePartNum; // это слишком большие объекты + практически не освещаются и плоские, т.е. попиксельное освещение не нужно ShaderType = -1; // перебираем и ставим нужные данные switch (BasePartNum) { case 11: LoadObjectData("DATA/MODELS/SPACEBASE/1/1.VW3D", this, 0); goto case1next; case 12: LoadObjectData("DATA/MODELS/SPACEBASE/1/2.VW3D", this, 0); goto case1next; case 13: LoadObjectData("DATA/MODELS/SPACEBASE/1/3.VW3D", this, 0); goto case1next; case 14: LoadObjectData("DATA/MODELS/SPACEBASE/1/4.VW3D", this, 0); goto case1next; case 15: LoadObjectData("DATA/MODELS/SPACEBASE/1/5.VW3D", this, 0); case1next: Texture[0] = vw_FindTextureByName("DATA/MODELS/SPACEBASE/aster.jpg"); TextureIllum[0] = 0; Texture[1] = vw_FindTextureByName("DATA/MODELS/SPACEBASE/allalpha.tga"); TextureIllum[1] = 0; Texture[2] = vw_FindTextureByName("DATA/MODELS/SPACEBASE/metal.jpg"); TextureIllum[2] = 0; GFXQuantity = 8; GFXLocation = new VECTOR3D[GFXQuantity]; GFX = new eParticleSystem*[GFXQuantity]; for (int i=0; i