home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2006 July & August
/
PCWorld_2006-07-08_cd.bin
/
temacd
/
planearcade
/
planearcade.exe
/
Tank3.bmp
/
modellib.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
2004-07-21
|
28KB
|
722 lines
#include "main.h"
//----------------
//Global
//----------------
MODELLIB ModelLib;
//Incializacia vsetkych modelov
//-------------------------------------------------------------
void MODELLIB::Initialize()
{
D3DMATERIAL9 StructureMaterial = GetMaterial(GetColor(0.7f,0.7f,0.7f),
GetColor(1.0f,1.0f,1.0f),
GetColor(0.5f,0.5f,0.5f),
GetColor(0.4f,0.4f,0.4f),4.5f);
D3DMATERIAL9 MesserSchmittMaterial = GetMaterial(GetColor(0.7f,0.7f,0.7f),
GetColor(1.0f,1.0f,1.0f),
GetColor(0.5f,0.5f,0.5f),
GetColor(0.2f,0.2f,0.2f),4.5f);
D3DMATERIAL9 BombarderMaterial = GetMaterial(GetColor(1.0f,1.0f,1.0f),
GetColor(1.5f,1.5f,1.5f),
GetColor(0.5f,0.5f,0.5f),
GetColor(0.2f,0.2f,0.2f),4.5f);
D3DMATERIAL9 TruckMaterial = GetMaterial(GetColor(0.7f,0.7f,0.7f),
GetColor(1.0f,1.0f,1.0f),
GetColor(0.5f,0.5f,0.5f),
GetColor(0.2f,0.2f,0.2f),4.5f);
//=============//
/////////////////
//MESSERSCHMITT//
/////////////////
//=============//
//normal model
//------------
MesserSchmitt_ModelNormal.Specular = true;
MesserSchmitt_ModelNormal.Normals = false;
MesserSchmitt_ModelNormal.SmoothShading = false;
MesserSchmitt_ModelNormal.InitializeAse(1,"models/messerschmitt/messerschmitt.ase");
MesserSchmitt_ModelNormal.LoadAse(0,"models/messerschmitt/messerschmitt.ase");
MesserSchmitt_ModelNormal.LoadTexture("models/messerschmitt/messernormal.bmp",GetColor(1.0f,0.0f,1.0f));
MesserSchmitt_ModelNormal.Sca = F_Scale;
MesserSchmitt_ModelNormal.SetMaterial(MesserSchmittMaterial);
//destroy model
//-------------
MesserSchmitt_ModelDestroyed.Normals = false;
MesserSchmitt_ModelDestroyed.SmoothShading = false;
MesserSchmitt_ModelDestroyed.InitializeAse(1,"models/messerschmitt/messerschmitt.ase");
MesserSchmitt_ModelDestroyed.LoadAse(0,"models/messerschmitt/messerschmitt.ase");
MesserSchmitt_ModelDestroyed.LoadTexture("models/messerschmitt/messerdestroy.bmp",GetColor(1.0f,0.0f,1.0f));
MesserSchmitt_ModelDestroyed.Sca = F_Scale;
MesserSchmitt_ModelDestroyed.SetMaterial(MesserSchmittMaterial);
//======//
//////////
//VOLKER//
//////////
//======//
//normal model
//------------
Volker_ModelNormal.Specular = true;
Volker_ModelNormal.Normals = false;
Volker_ModelNormal.SmoothShading = false;
Volker_ModelNormal.InitializeAse(1,"models/Volker/Volker.ase");
Volker_ModelNormal.LoadAse(0,"models/Volker/Volker.ase");
Volker_ModelNormal.LoadTexture("models/Volker/Volkernormal.bmp",GetColor(1.0f,0.0f,1.0f));
Volker_ModelNormal.Sca = F_Scale;
Volker_ModelNormal.SetMaterial(MesserSchmittMaterial);
//destroy model
//-------------
Volker_ModelDestroyed.Normals = false;
Volker_ModelDestroyed.SmoothShading = false;
Volker_ModelDestroyed.InitializeAse(1,"models/Volker/Volker.ase");
Volker_ModelDestroyed.LoadAse(0,"models/Volker/Volker.ase");
Volker_ModelDestroyed.LoadTexture("models/Volker/Volkerdestroy.bmp",GetColor(1.0f,0.0f,1.0f));
Volker_ModelDestroyed.Sca = F_Scale;
Volker_ModelDestroyed.SetMaterial(MesserSchmittMaterial);
//=============//
/////////////////
//BOMBARDER //
/////////////////
//=============//
//normal model
//------------
Bombarder_ModelNormal.Specular = true;
Bombarder_ModelNormal.Normals = false;
Bombarder_ModelNormal.SmoothShading = false;
Bombarder_ModelNormal.InitializeAse(1,"models/bombarder/bombarder.ase");
Bombarder_ModelNormal.LoadAse(0,"models/bombarder/bombarder.ase");
Bombarder_ModelNormal.LoadTexture("models/bombarder/bombardernormal.bmp",GetColor(1.0f,0.0f,1.0f));
Bombarder_ModelNormal.Sca = F_Scale;
Bombarder_ModelNormal.SetMaterial(BombarderMaterial);
//destroy model
//-------------
Bombarder_ModelDestroyed.Normals = false;
Bombarder_ModelDestroyed.SmoothShading = false;
Bombarder_ModelDestroyed.InitializeAse(1,"models/bombarder/bombarder.ase");
Bombarder_ModelDestroyed.LoadAse(0,"models/bombarder/bombarder.ase");
Bombarder_ModelDestroyed.LoadTexture("models/bombarder/bombarderdestroy.bmp",GetColor(1.0f,0.0f,1.0f));
Bombarder_ModelDestroyed.Sca = F_Scale;
Bombarder_ModelDestroyed.SetMaterial(BombarderMaterial);
//======//
//////////
//VRTULA//
//////////
//======//
Vrtula.Lighting = false;
Vrtula.InitializeAse(1,"models/vrtula/vrtula.ase");
Vrtula.LoadAse(0,"models/vrtula/vrtula.ase");
Vrtula.LoadTexture("models/vrtula/vrtula.bmp",GetColor(1.0f,0.0f,1.0f));
Vrtula.SetMaterial(TruckMaterial);
//==========//
//////////////
//STRUCTURES//
//////////////
//==========//
//
//budova
Structure_Budova.SmoothShading = false;
Structure_Budova.Normals = false;
Structure_Budova.InitializeAse(1,"models/structures/budova.ase");
Structure_Budova.LoadAse(0,"models/structures/budova.ase");
Structure_Budova.LoadTexture("models/structures/budova.bmp",GetColor(0,1,0));
Structure_Budova.Sca = F_Scale;
Structure_Budova.SetMaterial(StructureMaterial);
Structure_BudovaDestroy.SmoothShading = false;
Structure_BudovaDestroy.Normals = false;
Structure_BudovaDestroy.InitializeAse(1,"models/structures/budova.ase");
Structure_BudovaDestroy.LoadAse(0,"models/structures/budova.ase");
Structure_BudovaDestroy.LoadTexture("models/structures/budovadestroy.bmp",GetColor(0,1,0));
Structure_BudovaDestroy.Sca = F_Scale;
Structure_BudovaDestroy.SetMaterial(StructureMaterial);
//
//tovaren
Structure_Tovaren.SmoothShading = false;
Structure_Tovaren.Normals = false;
Structure_Tovaren.InitializeAse(1,"models/structures/tovaren.ase");
Structure_Tovaren.LoadAse(0,"models/structures/tovaren.ase");
Structure_Tovaren.LoadTexture("models/structures/Tovaren.bmp",GetColor(0,1,0));
Structure_Tovaren.Sca = F_Scale;
Structure_Tovaren.SetMaterial(StructureMaterial);
Structure_TovarenDestroy.SmoothShading = false;
Structure_TovarenDestroy.Normals = false;
Structure_TovarenDestroy.InitializeAse(1,"models/structures/tovaren.ase");
Structure_TovarenDestroy.LoadAse(0,"models/structures/tovaren.ase");
Structure_TovarenDestroy.LoadTexture("models/structures/Tovarendestroy.bmp",GetColor(0,1,0));
Structure_TovarenDestroy.Sca = F_Scale;
Structure_TovarenDestroy.SetMaterial(StructureMaterial);
//
//komin
Structure_Komin.Normals = false;
Structure_Komin.SmoothShading = false;
Structure_Komin.InitializeAse(1,"models/structures/Komin.ase");
Structure_Komin.LoadAse(0,"models/structures/komin.ase");
Structure_Komin.LoadTexture("models/structures/Komin.bmp",GetColor(0,1,0));
Structure_Komin.Sca = F_Scale;
Structure_Komin.SetMaterial(StructureMaterial);
Structure_KominDestroy.SmoothShading = false;
Structure_KominDestroy.Normals = false;
Structure_KominDestroy.InitializeAse(1,"models/structures/Komin.ase");
Structure_KominDestroy.LoadAse(0,"models/structures/komin.ase");
Structure_KominDestroy.LoadTexture("models/structures/Komindestroy.bmp",GetColor(0,1,0));
Structure_KominDestroy.Sca =F_Scale;
Structure_KominDestroy.SetMaterial(StructureMaterial);
//
//sklad
Structure_Sklad.SmoothShading = false;
Structure_Sklad.Normals = false;
Structure_Sklad.InitializeAse(1,"models/structures/sklad.ase");
Structure_Sklad.LoadAse(0,"models/structures/sklad.ase");
Structure_Sklad.LoadTexture("models/structures/sklad.bmp",GetColor(0,1,0));
Structure_Sklad.Sca = F_Scale;
Structure_Sklad.SetMaterial(StructureMaterial);
Structure_SkladDestroy.SmoothShading = false;
Structure_SkladDestroy.Normals = false;
Structure_SkladDestroy.InitializeAse(1,"models/structures/sklad.ase");
Structure_SkladDestroy.LoadAse(0,"models/structures/sklad.ase");
Structure_SkladDestroy.LoadTexture("models/structures/skladdestroy.bmp",GetColor(0,1,0));
Structure_SkladDestroy.Sca = F_Scale;
Structure_SkladDestroy.SetMaterial(StructureMaterial);
//
//stan
Structure_Stan.SmoothShading = false;
Structure_Stan.Normals = false;
Structure_Stan.InitializeAse(1,"models/structures/stan.ase");
Structure_Stan.LoadAse(0,"models/structures/stan.ase");
Structure_Stan.LoadTexture("models/structures/Stan.bmp",GetColor(0,1,0));
Structure_Stan.Sca = F_Scale;
Structure_Stan.SetMaterial(StructureMaterial);
Structure_StanDestroy.SmoothShading = false;
Structure_StanDestroy.Normals = false;
Structure_StanDestroy.InitializeAse(1,"models/structures/stan.ase");
Structure_StanDestroy.LoadAse(0,"models/structures/stan.ase");
Structure_StanDestroy.LoadTexture("models/structures/Standestroy.bmp",GetColor(0,1,0));
Structure_StanDestroy.Sca = F_Scale;
Structure_StanDestroy.SetMaterial(StructureMaterial);
//
//Letisko
Structure_Letisko.SmoothShading = false;
Structure_Letisko.Normals = false;
Structure_Letisko.InitializeAse(1,"models/structures/Letisko.ase");
Structure_Letisko.LoadAse(0,"models/structures/Letisko.ase");
Structure_Letisko.LoadTexture("models/structures/Letisko.bmp",GetColor(0,1,0));
Structure_Letisko.Sca = F_Scale;
Structure_Letisko.SetMaterial(StructureMaterial);
Structure_LetiskoDestroy.SmoothShading = false;
Structure_LetiskoDestroy.Normals = false;
Structure_LetiskoDestroy.InitializeAse(1,"models/structures/Letisko.ase");
Structure_LetiskoDestroy.LoadAse(0,"models/structures/Letisko.ase");
Structure_LetiskoDestroy.LoadTexture("models/structures/Letiskodestroy.bmp",GetColor(0,1,0));
Structure_LetiskoDestroy.Sca = F_Scale;
Structure_LetiskoDestroy.SetMaterial(StructureMaterial);
//
//Hangar
Structure_Hangar.SmoothShading = false;
Structure_Hangar.Normals = false;
Structure_Hangar.InitializeAse(1,"models/structures/Hangar.ase");
Structure_Hangar.LoadAse(0,"models/structures/Hangar.ase");
Structure_Hangar.LoadTexture("models/structures/Hangar.bmp",GetColor(0,1,0));
Structure_Hangar.Sca = F_Scale;
Structure_Hangar.SetMaterial(StructureMaterial);
Structure_HangarDestroy.SmoothShading = false;
Structure_HangarDestroy.Normals = false;
Structure_HangarDestroy.InitializeAse(1,"models/structures/Hangar.ase");
Structure_HangarDestroy.LoadAse(0,"models/structures/Hangar.ase");
Structure_HangarDestroy.LoadTexture("models/structures/Hangardestroy.bmp",GetColor(0,1,0));
Structure_HangarDestroy.Sca = F_Scale;
Structure_HangarDestroy.SetMaterial(StructureMaterial);
//
//Dom1
Structure_Dom1.SmoothShading = false;
Structure_Dom1.Normals = false;
Structure_Dom1.InitializeAse(1,"models/structures/Dom1.ase");
Structure_Dom1.LoadAse(0,"models/structures/Dom1.ase");
Structure_Dom1.LoadTexture("models/structures/Dom1.bmp",GetColor(0,1,0));
Structure_Dom1.Sca = F_Scale;
Structure_Dom1.SetMaterial(StructureMaterial);
Structure_Dom1Destroy.SmoothShading = false;
Structure_Dom1Destroy.Normals = false;
Structure_Dom1Destroy.InitializeAse(1,"models/structures/Dom1.ase");
Structure_Dom1Destroy.LoadAse(0,"models/structures/Dom1.ase");
Structure_Dom1Destroy.LoadTexture("models/structures/Dom1destroy.bmp",GetColor(0,1,0));
Structure_Dom1Destroy.Sca = F_Scale;
Structure_Dom1Destroy.SetMaterial(StructureMaterial);
//
//Dom2
Structure_Dom2.SmoothShading = false;
Structure_Dom2.Normals = false;
Structure_Dom2.InitializeAse(1,"models/structures/Dom2.ase");
Structure_Dom2.LoadAse(0,"models/structures/Dom2.ase");
Structure_Dom2.LoadTexture("models/structures/Dom2.bmp",GetColor(0,1,0));
Structure_Dom2.Sca = F_Scale;
Structure_Dom2.SetMaterial(StructureMaterial);
Structure_Dom2Destroy.SmoothShading = false;
Structure_Dom2Destroy.Normals = false;
Structure_Dom2Destroy.InitializeAse(1,"models/structures/Dom2.ase");
Structure_Dom2Destroy.LoadAse(0,"models/structures/Dom2.ase");
Structure_Dom2Destroy.LoadTexture("models/structures/Dom2destroy.bmp",GetColor(0,1,0));
Structure_Dom2Destroy.Sca = F_Scale;
Structure_Dom2Destroy.SetMaterial(StructureMaterial);
//
//Kostol
Structure_Kostol.SmoothShading = false;
Structure_Kostol.Normals = false;
Structure_Kostol.InitializeAse(1,"models/structures/Kostol.ase");
Structure_Kostol.LoadAse(0,"models/structures/Kostol.ase");
Structure_Kostol.LoadTexture("models/structures/Kostol.bmp",GetColor(0,1,0));
Structure_Kostol.Sca = F_Scale;
Structure_Kostol.SetMaterial(StructureMaterial);
Structure_KostolDestroy.SmoothShading = false;
Structure_KostolDestroy.Normals = false;
Structure_KostolDestroy.InitializeAse(1,"models/structures/Kostol.ase");
Structure_KostolDestroy.LoadAse(0,"models/structures/Kostol.ase");
Structure_KostolDestroy.LoadTexture("models/structures/Kostoldestroy.bmp",GetColor(0,1,0));
Structure_KostolDestroy.Sca = F_Scale;
Structure_KostolDestroy.SetMaterial(StructureMaterial);
//
//Tank1
Structure_Tank1.SmoothShading = false;
Structure_Tank1.Normals = false;
Structure_Tank1.InitializeAse(1,"models/structures/Tank1.ase");
Structure_Tank1.LoadAse(0,"models/structures/Tank1.ase");
Structure_Tank1.LoadTexture("models/structures/Tank1.bmp",GetColor(0,1,0));
Structure_Tank1.Sca = F_Scale;
Structure_Tank1.SetMaterial(StructureMaterial);
Structure_Tank1Destroy.SmoothShading = false;
Structure_Tank1Destroy.Normals = false;
Structure_Tank1Destroy.InitializeAse(1,"models/structures/Tank1.ase");
Structure_Tank1Destroy.LoadAse(0,"models/structures/Tank1.ase");
Structure_Tank1Destroy.LoadTexture("models/structures/Tank1destroy.bmp",GetColor(0,1,0));
Structure_Tank1Destroy.Sca = F_Scale;
Structure_Tank1Destroy.SetMaterial(StructureMaterial);
//
//Tank2
Structure_Tank2.SmoothShading = false;
Structure_Tank2.Normals = false;
Structure_Tank2.InitializeAse(1,"models/structures/Tank2.ase");
Structure_Tank2.LoadAse(0,"models/structures/Tank2.ase");
Structure_Tank2.LoadTexture("models/structures/Tank2.bmp",GetColor(0,1,0));
Structure_Tank2.Sca = F_Scale;
Structure_Tank2.SetMaterial(StructureMaterial);
Structure_Tank2Destroy.SmoothShading = false;
Structure_Tank2Destroy.Normals = false;
Structure_Tank2Destroy.InitializeAse(1,"models/structures/Tank2.ase");
Structure_Tank2Destroy.LoadAse(0,"models/structures/Tank2.ase");
Structure_Tank2Destroy.LoadTexture("models/structures/Tank2destroy.bmp",GetColor(0,1,0));
Structure_Tank2Destroy.Sca = F_Scale;
Structure_Tank2Destroy.SetMaterial(StructureMaterial);
//
//Conv1
Structure_Conv1.SmoothShading = false;
Structure_Conv1.Normals = false;
Structure_Conv1.InitializeAse(1,"models/structures/Conv1.ase");
Structure_Conv1.LoadAse(0,"models/structures/Conv1.ase");
Structure_Conv1.LoadTexture("models/structures/Conv1.bmp",GetColor(0,1,0));
Structure_Conv1.Sca = F_Scale;
Structure_Conv1.SetMaterial(StructureMaterial);
Structure_Conv1Destroy.SmoothShading = false;
Structure_Conv1Destroy.Normals = false;
Structure_Conv1Destroy.InitializeAse(1,"models/structures/Conv1.ase");
Structure_Conv1Destroy.LoadAse(0,"models/structures/Conv1.ase");
Structure_Conv1Destroy.LoadTexture("models/structures/Conv1destroy.bmp",GetColor(0,1,0));
Structure_Conv1Destroy.Sca = F_Scale;
Structure_Conv1Destroy.SetMaterial(StructureMaterial);
//
//Conv2
Structure_Conv2.SmoothShading = false;
Structure_Conv2.Normals = false;
Structure_Conv2.InitializeAse(1,"models/structures/Conv2.ase");
Structure_Conv2.LoadAse(0,"models/structures/Conv2.ase");
Structure_Conv2.LoadTexture("models/structures/Conv2.bmp",GetColor(0,1,0));
Structure_Conv2.Sca = F_Scale;
Structure_Conv2.SetMaterial(StructureMaterial);
Structure_Conv2Destroy.SmoothShading = false;
Structure_Conv2Destroy.Normals = false;
Structure_Conv2Destroy.InitializeAse(1,"models/structures/Conv2.ase");
Structure_Conv2Destroy.LoadAse(0,"models/structures/Conv2.ase");
Structure_Conv2Destroy.LoadTexture("models/structures/Conv2destroy.bmp",GetColor(0,1,0));
Structure_Conv2Destroy.Sca = F_Scale;
Structure_Conv2Destroy.SetMaterial(StructureMaterial);
//
//Plane
Structure_Plane.SmoothShading = false;
Structure_Plane.Normals = false;
Structure_Plane.InitializeAse(1,"models/structures/Plane.ase");
Structure_Plane.LoadAse(0,"models/structures/Plane.ase");
Structure_Plane.LoadTexture("models/messerschmitt/messernormal.bmp",GetColor(0,1,0));
Structure_Plane.Sca = F_Scale;
Structure_Plane.SetMaterial(StructureMaterial);
Structure_PlaneDestroy.SmoothShading = false;
Structure_PlaneDestroy.Normals = false;
Structure_PlaneDestroy.InitializeAse(1,"models/structures/Plane.ase");
Structure_PlaneDestroy.LoadAse(0,"models/structures/Plane.ase");
Structure_PlaneDestroy.LoadTexture("models/messerschmitt/messerdestroy.bmp",GetColor(0,1,0));
Structure_PlaneDestroy.Sca = F_Scale;
Structure_PlaneDestroy.SetMaterial(StructureMaterial);
//
//Mesto1
Structure_Mesto1.SmoothShading = false;
Structure_Mesto1.Normals = false;
Structure_Mesto1.InitializeAse(1,"models/structures/Mesto1.ase");
Structure_Mesto1.LoadAse(0,"models/structures/Mesto1.ase");
Structure_Mesto1.LoadTexture("models/structures/Mesto.bmp",GetColor(0,1,0));
Structure_Mesto1.Sca = F_Scale;
Structure_Mesto1.SetMaterial(StructureMaterial);
Structure_Mesto1Destroy.SmoothShading = false;
Structure_Mesto1Destroy.Normals = false;
Structure_Mesto1Destroy.InitializeAse(1,"models/structures/Mesto1.ase");
Structure_Mesto1Destroy.LoadAse(0,"models/structures/Mesto1.ase");
Structure_Mesto1Destroy.LoadTexture("models/structures/Mestodestroy.bmp",GetColor(0,1,0));
Structure_Mesto1Destroy.Sca = F_Scale;
Structure_Mesto1Destroy.SetMaterial(StructureMaterial);
//
//Mesto2
Structure_Mesto2.SmoothShading = false;
Structure_Mesto2.Normals = false;
Structure_Mesto2.InitializeAse(1,"models/structures/Mesto2.ase");
Structure_Mesto2.LoadAse(0,"models/structures/Mesto2.ase");
Structure_Mesto2.LoadTexture("models/structures/Mesto.bmp",GetColor(0,1,0));
Structure_Mesto2.Sca = F_Scale;
Structure_Mesto2.SetMaterial(StructureMaterial);
Structure_Mesto2Destroy.SmoothShading = false;
Structure_Mesto2Destroy.Normals = false;
Structure_Mesto2Destroy.InitializeAse(1,"models/structures/Mesto2.ase");
Structure_Mesto2Destroy.LoadAse(0,"models/structures/Mesto2.ase");
Structure_Mesto2Destroy.LoadTexture("models/structures/Mestodestroy.bmp",GetColor(0,1,0));
Structure_Mesto2Destroy.Sca = F_Scale;
Structure_Mesto2Destroy.SetMaterial(StructureMaterial);
//
//Mesto3
Structure_Mesto3.SmoothShading = false;
Structure_Mesto3.Normals = false;
Structure_Mesto3.InitializeAse(1,"models/structures/Mesto3.ase");
Structure_Mesto3.LoadAse(0,"models/structures/Mesto3.ase");
Structure_Mesto3.LoadTexture("models/structures/Mesto.bmp",GetColor(0,1,0));
Structure_Mesto3.Sca = F_Scale;
Structure_Mesto3.SetMaterial(StructureMaterial);
Structure_Mesto3Destroy.SmoothShading = false;
Structure_Mesto3Destroy.Normals = false;
Structure_Mesto3Destroy.InitializeAse(1,"models/structures/Mesto3.ase");
Structure_Mesto3Destroy.LoadAse(0,"models/structures/Mesto3.ase");
Structure_Mesto3Destroy.LoadTexture("models/structures/Mestodestroy.bmp",GetColor(0,1,0));
Structure_Mesto3Destroy.Sca = F_Scale;
Structure_Mesto3Destroy.SetMaterial(StructureMaterial);
//
//Mesto4
Structure_Mesto4.SmoothShading = false;
Structure_Mesto4.Normals = false;
Structure_Mesto4.InitializeAse(1,"models/structures/Mesto4.ase");
Structure_Mesto4.LoadAse(0,"models/structures/Mesto4.ase");
Structure_Mesto4.LoadTexture("models/structures/Mesto.bmp",GetColor(0,1,0));
Structure_Mesto4.Sca = F_Scale;
Structure_Mesto4.SetMaterial(StructureMaterial);
Structure_Mesto4Destroy.SmoothShading = false;
Structure_Mesto4Destroy.Normals = false;
Structure_Mesto4Destroy.InitializeAse(1,"models/structures/Mesto4.ase");
Structure_Mesto4Destroy.LoadAse(0,"models/structures/Mesto4.ase");
Structure_Mesto4Destroy.LoadTexture("models/structures/Mestodestroy.bmp",GetColor(0,1,0));
Structure_Mesto4Destroy.Sca = F_Scale;
Structure_Mesto4Destroy.SetMaterial(StructureMaterial);
//
//BillBoard
Structure_BillBoard.SmoothShading = false;
Structure_BillBoard.Lighting = false;
Structure_BillBoard.InitializeAse(1,"models/structures/BillBoard.ase");
Structure_BillBoard.LoadAse(0,"models/structures/BillBoard.ase");
Structure_BillBoard.LoadTexture("models/structures/BillBoard.bmp",GetColor(1.0f,1.0f,0.0f,1.0f));
Structure_BillBoard.Sca = F_Scale;
Structure_BillBoard.SetMaterial(StructureMaterial);
//
//Strom1
Structure_Strom1.SmoothShading = false;
Structure_Strom1.Lighting = false;
Structure_Strom1.InitializeAse(1,"models/structures/Strom1.ase");
Structure_Strom1.LoadAse(0,"models/structures/Strom1.ase");
Structure_Strom1.LoadTexture("models/structures/Strom1.bmp",GetColor(1.0f,1.0f,0.0f,1.0f));
Structure_Strom1.Sca = F_Scale;
Structure_Strom1.SetMaterial(StructureMaterial);
//
//Strom2
Structure_Strom2.SmoothShading = false;
Structure_Strom2.Lighting = false;
Structure_Strom2.InitializeAse(1,"models/structures/Strom2.ase");
Structure_Strom2.LoadAse(0,"models/structures/Strom2.ase");
Structure_Strom2.LoadTexture("models/structures/Strom2.bmp",GetColor(1.0f,1.0f,0.0f,1.0f));
Structure_Strom2.Sca = F_Scale;
Structure_Strom2.SetMaterial(StructureMaterial);
//
//Strom2
Structure_Strom3.SmoothShading = false;
Structure_Strom3.Lighting = false;
Structure_Strom3.InitializeAse(1,"models/structures/Strom3.ase");
Structure_Strom3.LoadAse(0,"models/structures/Strom3.ase");
Structure_Strom3.LoadTexture("models/structures/Strom3.bmp",GetColor(1.0f,1.0f,0.0f,1.0f));
Structure_Strom3.Sca = F_Scale;
Structure_Strom3.SetMaterial(StructureMaterial);
//
//Strom4
Structure_Strom4.SmoothShading = false;
Structure_Strom4.Lighting = false;
Structure_Strom4.InitializeAse(1,"models/structures/Strom4.ase");
Structure_Strom4.LoadAse(0,"models/structures/Strom4.ase");
Structure_Strom4.LoadTexture("models/structures/Strom4.bmp",GetColor(1.0f,1.0f,0.0f,1.0f));
Structure_Strom4.Sca = F_Scale;
Structure_Strom4.SetMaterial(StructureMaterial);
//
//Palma1
Structure_Palma1.SmoothShading = false;
Structure_Palma1.Lighting = false;
Structure_Palma1.InitializeAse(1,"models/structures/Palma1.ase");
Structure_Palma1.LoadAse(0,"models/structures/Palma1.ase");
Structure_Palma1.LoadTexture("models/structures/Palma1.bmp",GetColor(1.0f,0.0f,0.0f,0.0f));
Structure_Palma1.Sca = F_Scale;
Structure_Palma1.SetMaterial(StructureMaterial);
//
//Palma2
Structure_Palma2.SmoothShading = false;
Structure_Palma2.Lighting = false;
Structure_Palma2.InitializeAse(1,"models/structures/Palma2.ase");
Structure_Palma2.LoadAse(0,"models/structures/Palma2.ase");
Structure_Palma2.LoadTexture("models/structures/Palma2.bmp",GetColor(1.0f,0.0f,0.0f,0.0f));
Structure_Palma2.Sca = F_Scale;
Structure_Palma2.SetMaterial(StructureMaterial);
//=====//
/////////
//TRUCK//
/////////
//=====//
//podvozok
Truck_ModelBack.Specular = false;
Truck_ModelBack.Normals = false;
Truck_ModelBack.SmoothShading = false;
Truck_ModelBack.InitializeAse(1,"models/truck/truckback.ase");
Truck_ModelBack.LoadAse(0,"models/truck/truckback.ase");
Truck_ModelBack.LoadTexture("models/truck/trucknormal.bmp",GetColor(1.0f,0.0f,1.0f));
Truck_ModelBack.Sca = F_Scale;
Truck_ModelBack.SetMaterial(TruckMaterial);
//delo
Truck_ModelCannon.Specular = false;
Truck_ModelCannon.Normals = false;
Truck_ModelCannon.SmoothShading = false;
Truck_ModelCannon.InitializeAse(1,"models/truck/truckcannon.ase");
Truck_ModelCannon.LoadAse(0,"models/truck/truckcannon.ase");
Truck_ModelCannon.LoadTexture("models/truck/trucknormal.bmp",GetColor(1.0f,0.0f,1.0f));
Truck_ModelCannon.Sca = F_Scale;
Truck_ModelCannon.SetMaterial(TruckMaterial);
//destroyed
Truck_ModelDestroyed.Specular = false;
Truck_ModelDestroyed.Normals = false;
Truck_ModelDestroyed.SmoothShading = false;
Truck_ModelDestroyed.InitializeAse(1,"models/truck/truckDestroyed.ase");
Truck_ModelDestroyed.LoadAse(0,"models/truck/truckDestroyed.ase");
Truck_ModelDestroyed.LoadTexture("models/truck/truckDestroy.bmp",GetColor(1.0f,0.0f,1.0f));
Truck_ModelDestroyed.Sca = F_Scale;
Truck_ModelDestroyed.SetMaterial(TruckMaterial);
}
//vrati pointer na strucutrure
//------------------------------------------------------------
MODEL *MODELLIB::GetStructure(int MIndex)
{
switch (MIndex)
{
case Index_Structure_Budova:
return &Structure_Budova ;
case Index_Structure_Tovaren:
return &Structure_Tovaren ;
case Index_Structure_Komin:
return &Structure_Komin ;
case Index_Structure_Sklad:
return &Structure_Sklad ;
case Index_Structure_Stan:
return &Structure_Stan ;
case Index_Structure_Letisko:
return &Structure_Letisko ;
case Index_Structure_Hangar:
return &Structure_Hangar;
case Index_Structure_Dom1:
return &Structure_Dom1;
case Index_Structure_Dom2:
return &Structure_Dom2;
case Index_Structure_Kostol:
return &Structure_Kostol;
case Index_Structure_Tank1:
return &Structure_Tank1;
case Index_Structure_Tank2:
return &Structure_Tank2;
case Index_Structure_Conv1:
return &Structure_Conv1;
case Index_Structure_Conv2:
return &Structure_Conv2;
case Index_Structure_Plane:
return &Structure_Plane;
case Index_Structure_Mesto1:
return &Structure_Mesto1;
case Index_Structure_Mesto2:
return &Structure_Mesto2;
case Index_Structure_Mesto3:
return &Structure_Mesto3;
case Index_Structure_Mesto4:
return &Structure_Mesto4;
case Index_Structure_BillBoard:
return &Structure_BillBoard;
case Index_Structure_Strom1:
return &Structure_Strom1;
case Index_Structure_Strom2:
return &Structure_Strom2;
case Index_Structure_Strom3:
return &Structure_Strom3;
case Index_Structure_Strom4:
return &Structure_Strom4;
case Index_Structure_Palma1:
return &Structure_Palma1;
case Index_Structure_Palma2:
return &Structure_Palma2;
}
return &Structure_Budova;
}
//vrati pointer na znicenu strucutrure
//------------------------------------------------------------
MODEL *MODELLIB::GetDestroyedStructure(int MIndex)
{
switch (MIndex)
{
case Index_Structure_Budova:
return &Structure_BudovaDestroy ;
case Index_Structure_Tovaren:
return &Structure_TovarenDestroy ;
case Index_Structure_Komin:
return &Structure_KominDestroy ;
case Index_Structure_Sklad:
return &Structure_SkladDestroy ;
case Index_Structure_Stan:
return &Structure_StanDestroy ;
case Index_Structure_Letisko:
return &Structure_LetiskoDestroy ;
case Index_Structure_Hangar:
return &Structure_HangarDestroy ;
case Index_Structure_Dom1:
return &Structure_Dom1Destroy ;
case Index_Structure_Dom2:
return &Structure_Dom2Destroy ;
case Index_Structure_Kostol:
return &Structure_KostolDestroy;
case Index_Structure_Tank1:
return &Structure_Tank1Destroy;
case Index_Structure_Tank2:
return &Structure_Tank2Destroy;
case Index_Structure_Conv1:
return &Structure_Conv1Destroy;
case Index_Structure_Conv2:
return &Structure_Conv2Destroy;
case Index_Structure_Plane:
return &Structure_PlaneDestroy;
case Index_Structure_Mesto1:
return &Structure_Mesto1Destroy;
case Index_Structure_Mesto2:
return &Structure_Mesto2Destroy;
case Index_Structure_Mesto3:
return &Structure_Mesto3Destroy;
case Index_Structure_Mesto4:
return &Structure_Mesto4Destroy;
case Index_Structure_BillBoard:
return &Structure_BillBoard;
case Index_Structure_Strom1:
return &Structure_Strom1;
case Index_Structure_Strom2:
return &Structure_Strom2;
case Index_Structure_Strom3:
return &Structure_Strom3;
case Index_Structure_Strom4:
return &Structure_Strom4;
case Index_Structure_Palma1:
return &Structure_Palma1;
case Index_Structure_Palma2:
return &Structure_Palma2;
}
return &Structure_Budova;
}