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 >
C/C++ Source or Header  |  2004-07-21  |  28KB  |  722 lines

  1.  
  2. #include "main.h"
  3.  
  4. //----------------
  5. //Global
  6. //----------------
  7. MODELLIB ModelLib;
  8.  
  9. //Incializacia vsetkych modelov
  10. //-------------------------------------------------------------
  11. void MODELLIB::Initialize()
  12. {
  13.  
  14.  
  15.     D3DMATERIAL9 StructureMaterial = GetMaterial(GetColor(0.7f,0.7f,0.7f),
  16.                                                  GetColor(1.0f,1.0f,1.0f),
  17.                                                  GetColor(0.5f,0.5f,0.5f),
  18.                                                  GetColor(0.4f,0.4f,0.4f),4.5f);
  19.  
  20.     D3DMATERIAL9 MesserSchmittMaterial = GetMaterial(GetColor(0.7f,0.7f,0.7f),
  21.                                                      GetColor(1.0f,1.0f,1.0f),
  22.                                                      GetColor(0.5f,0.5f,0.5f),
  23.                                                      GetColor(0.2f,0.2f,0.2f),4.5f);
  24.  
  25.     D3DMATERIAL9 BombarderMaterial = GetMaterial(GetColor(1.0f,1.0f,1.0f),
  26.                                                  GetColor(1.5f,1.5f,1.5f),
  27.                                                  GetColor(0.5f,0.5f,0.5f),
  28.                                                  GetColor(0.2f,0.2f,0.2f),4.5f);
  29.  
  30.     D3DMATERIAL9 TruckMaterial = GetMaterial(GetColor(0.7f,0.7f,0.7f),
  31.                                              GetColor(1.0f,1.0f,1.0f),
  32.                                              GetColor(0.5f,0.5f,0.5f),
  33.                                              GetColor(0.2f,0.2f,0.2f),4.5f);
  34.  
  35.     //=============//
  36.     /////////////////
  37.     //MESSERSCHMITT//
  38.     /////////////////
  39.     //=============//
  40.     
  41.     //normal model
  42.     //------------
  43.     MesserSchmitt_ModelNormal.Specular = true;
  44.     MesserSchmitt_ModelNormal.Normals = false;
  45.     MesserSchmitt_ModelNormal.SmoothShading = false;
  46.     MesserSchmitt_ModelNormal.InitializeAse(1,"models/messerschmitt/messerschmitt.ase");
  47.     MesserSchmitt_ModelNormal.LoadAse(0,"models/messerschmitt/messerschmitt.ase");
  48.     MesserSchmitt_ModelNormal.LoadTexture("models/messerschmitt/messernormal.bmp",GetColor(1.0f,0.0f,1.0f));
  49.     MesserSchmitt_ModelNormal.Sca = F_Scale;
  50.     MesserSchmitt_ModelNormal.SetMaterial(MesserSchmittMaterial);
  51.  
  52.     //destroy model
  53.     //-------------
  54.     MesserSchmitt_ModelDestroyed.Normals = false;
  55.     MesserSchmitt_ModelDestroyed.SmoothShading = false;
  56.     MesserSchmitt_ModelDestroyed.InitializeAse(1,"models/messerschmitt/messerschmitt.ase");
  57.     MesserSchmitt_ModelDestroyed.LoadAse(0,"models/messerschmitt/messerschmitt.ase");
  58.     MesserSchmitt_ModelDestroyed.LoadTexture("models/messerschmitt/messerdestroy.bmp",GetColor(1.0f,0.0f,1.0f));
  59.     MesserSchmitt_ModelDestroyed.Sca = F_Scale;
  60.     MesserSchmitt_ModelDestroyed.SetMaterial(MesserSchmittMaterial);
  61.  
  62.     //======//
  63.     //////////
  64.     //VOLKER//
  65.     //////////
  66.     //======//
  67.     
  68.     //normal model
  69.     //------------
  70.     Volker_ModelNormal.Specular = true;
  71.     Volker_ModelNormal.Normals = false;
  72.     Volker_ModelNormal.SmoothShading = false;
  73.     Volker_ModelNormal.InitializeAse(1,"models/Volker/Volker.ase");
  74.     Volker_ModelNormal.LoadAse(0,"models/Volker/Volker.ase");
  75.     Volker_ModelNormal.LoadTexture("models/Volker/Volkernormal.bmp",GetColor(1.0f,0.0f,1.0f));
  76.     Volker_ModelNormal.Sca = F_Scale;
  77.     Volker_ModelNormal.SetMaterial(MesserSchmittMaterial);
  78.  
  79.     //destroy model
  80.     //-------------
  81.     Volker_ModelDestroyed.Normals = false;
  82.     Volker_ModelDestroyed.SmoothShading = false;
  83.     Volker_ModelDestroyed.InitializeAse(1,"models/Volker/Volker.ase");
  84.     Volker_ModelDestroyed.LoadAse(0,"models/Volker/Volker.ase");
  85.     Volker_ModelDestroyed.LoadTexture("models/Volker/Volkerdestroy.bmp",GetColor(1.0f,0.0f,1.0f));
  86.     Volker_ModelDestroyed.Sca = F_Scale;
  87.     Volker_ModelDestroyed.SetMaterial(MesserSchmittMaterial);
  88.  
  89.  
  90.     //=============//
  91.     /////////////////
  92.     //BOMBARDER    //
  93.     /////////////////
  94.     //=============//
  95.     
  96.     //normal model
  97.     //------------
  98.     Bombarder_ModelNormal.Specular = true;
  99.     Bombarder_ModelNormal.Normals = false;
  100.     Bombarder_ModelNormal.SmoothShading = false;
  101.     Bombarder_ModelNormal.InitializeAse(1,"models/bombarder/bombarder.ase");
  102.     Bombarder_ModelNormal.LoadAse(0,"models/bombarder/bombarder.ase");
  103.     Bombarder_ModelNormal.LoadTexture("models/bombarder/bombardernormal.bmp",GetColor(1.0f,0.0f,1.0f));
  104.     Bombarder_ModelNormal.Sca = F_Scale;
  105.     Bombarder_ModelNormal.SetMaterial(BombarderMaterial);
  106.  
  107.     //destroy model
  108.     //-------------
  109.     Bombarder_ModelDestroyed.Normals = false;
  110.     Bombarder_ModelDestroyed.SmoothShading = false;
  111.     Bombarder_ModelDestroyed.InitializeAse(1,"models/bombarder/bombarder.ase");
  112.     Bombarder_ModelDestroyed.LoadAse(0,"models/bombarder/bombarder.ase");
  113.     Bombarder_ModelDestroyed.LoadTexture("models/bombarder/bombarderdestroy.bmp",GetColor(1.0f,0.0f,1.0f));
  114.     Bombarder_ModelDestroyed.Sca = F_Scale;
  115.     Bombarder_ModelDestroyed.SetMaterial(BombarderMaterial);
  116.  
  117.     //======//
  118.     //////////
  119.     //VRTULA//
  120.     //////////
  121.     //======//
  122.  
  123.     Vrtula.Lighting = false;
  124.     Vrtula.InitializeAse(1,"models/vrtula/vrtula.ase");
  125.     Vrtula.LoadAse(0,"models/vrtula/vrtula.ase");
  126.     Vrtula.LoadTexture("models/vrtula/vrtula.bmp",GetColor(1.0f,0.0f,1.0f));
  127.     Vrtula.SetMaterial(TruckMaterial);
  128.  
  129.     //==========//
  130.     //////////////
  131.     //STRUCTURES//
  132.     //////////////
  133.     //==========//
  134.  
  135.     //
  136.     //budova
  137.     Structure_Budova.SmoothShading = false;
  138.     Structure_Budova.Normals = false;
  139.     Structure_Budova.InitializeAse(1,"models/structures/budova.ase");
  140.     Structure_Budova.LoadAse(0,"models/structures/budova.ase");
  141.     Structure_Budova.LoadTexture("models/structures/budova.bmp",GetColor(0,1,0));
  142.     Structure_Budova.Sca = F_Scale;
  143.     Structure_Budova.SetMaterial(StructureMaterial);
  144.  
  145.     Structure_BudovaDestroy.SmoothShading = false;
  146.     Structure_BudovaDestroy.Normals = false;
  147.     Structure_BudovaDestroy.InitializeAse(1,"models/structures/budova.ase");
  148.     Structure_BudovaDestroy.LoadAse(0,"models/structures/budova.ase");
  149.     Structure_BudovaDestroy.LoadTexture("models/structures/budovadestroy.bmp",GetColor(0,1,0));
  150.     Structure_BudovaDestroy.Sca = F_Scale;
  151.     Structure_BudovaDestroy.SetMaterial(StructureMaterial);
  152.  
  153.     //
  154.     //tovaren
  155.     Structure_Tovaren.SmoothShading = false;
  156.     Structure_Tovaren.Normals = false;
  157.     Structure_Tovaren.InitializeAse(1,"models/structures/tovaren.ase");
  158.     Structure_Tovaren.LoadAse(0,"models/structures/tovaren.ase");
  159.     Structure_Tovaren.LoadTexture("models/structures/Tovaren.bmp",GetColor(0,1,0));
  160.     Structure_Tovaren.Sca = F_Scale;
  161.     Structure_Tovaren.SetMaterial(StructureMaterial);
  162.  
  163.     Structure_TovarenDestroy.SmoothShading = false;
  164.     Structure_TovarenDestroy.Normals = false;
  165.     Structure_TovarenDestroy.InitializeAse(1,"models/structures/tovaren.ase");
  166.     Structure_TovarenDestroy.LoadAse(0,"models/structures/tovaren.ase");
  167.     Structure_TovarenDestroy.LoadTexture("models/structures/Tovarendestroy.bmp",GetColor(0,1,0));
  168.     Structure_TovarenDestroy.Sca = F_Scale;
  169.     Structure_TovarenDestroy.SetMaterial(StructureMaterial);
  170.  
  171.     //
  172.     //komin
  173.     Structure_Komin.Normals = false;
  174.     Structure_Komin.SmoothShading = false;
  175.     Structure_Komin.InitializeAse(1,"models/structures/Komin.ase");
  176.     Structure_Komin.LoadAse(0,"models/structures/komin.ase");
  177.     Structure_Komin.LoadTexture("models/structures/Komin.bmp",GetColor(0,1,0));
  178.     Structure_Komin.Sca = F_Scale;
  179.     Structure_Komin.SetMaterial(StructureMaterial);
  180.  
  181.     Structure_KominDestroy.SmoothShading = false;
  182.     Structure_KominDestroy.Normals = false;
  183.     Structure_KominDestroy.InitializeAse(1,"models/structures/Komin.ase");
  184.     Structure_KominDestroy.LoadAse(0,"models/structures/komin.ase");
  185.     Structure_KominDestroy.LoadTexture("models/structures/Komindestroy.bmp",GetColor(0,1,0));
  186.     Structure_KominDestroy.Sca =F_Scale;
  187.     Structure_KominDestroy.SetMaterial(StructureMaterial);
  188.  
  189.     //
  190.     //sklad
  191.     Structure_Sklad.SmoothShading = false;
  192.     Structure_Sklad.Normals = false;
  193.     Structure_Sklad.InitializeAse(1,"models/structures/sklad.ase");
  194.     Structure_Sklad.LoadAse(0,"models/structures/sklad.ase");
  195.     Structure_Sklad.LoadTexture("models/structures/sklad.bmp",GetColor(0,1,0));
  196.     Structure_Sklad.Sca = F_Scale;
  197.     Structure_Sklad.SetMaterial(StructureMaterial);
  198.  
  199.     Structure_SkladDestroy.SmoothShading = false;
  200.     Structure_SkladDestroy.Normals = false;
  201.     Structure_SkladDestroy.InitializeAse(1,"models/structures/sklad.ase");
  202.     Structure_SkladDestroy.LoadAse(0,"models/structures/sklad.ase");
  203.     Structure_SkladDestroy.LoadTexture("models/structures/skladdestroy.bmp",GetColor(0,1,0));
  204.     Structure_SkladDestroy.Sca = F_Scale;
  205.     Structure_SkladDestroy.SetMaterial(StructureMaterial);
  206.  
  207.     //
  208.     //stan
  209.     Structure_Stan.SmoothShading = false;
  210.     Structure_Stan.Normals = false;
  211.     Structure_Stan.InitializeAse(1,"models/structures/stan.ase");
  212.     Structure_Stan.LoadAse(0,"models/structures/stan.ase");
  213.     Structure_Stan.LoadTexture("models/structures/Stan.bmp",GetColor(0,1,0));
  214.     Structure_Stan.Sca = F_Scale;
  215.     Structure_Stan.SetMaterial(StructureMaterial);
  216.  
  217.     Structure_StanDestroy.SmoothShading = false;
  218.     Structure_StanDestroy.Normals = false;
  219.     Structure_StanDestroy.InitializeAse(1,"models/structures/stan.ase");
  220.     Structure_StanDestroy.LoadAse(0,"models/structures/stan.ase");
  221.     Structure_StanDestroy.LoadTexture("models/structures/Standestroy.bmp",GetColor(0,1,0));
  222.     Structure_StanDestroy.Sca = F_Scale;
  223.     Structure_StanDestroy.SetMaterial(StructureMaterial);
  224.  
  225.     //
  226.     //Letisko
  227.     Structure_Letisko.SmoothShading = false;
  228.     Structure_Letisko.Normals = false;
  229.     Structure_Letisko.InitializeAse(1,"models/structures/Letisko.ase");
  230.     Structure_Letisko.LoadAse(0,"models/structures/Letisko.ase");
  231.     Structure_Letisko.LoadTexture("models/structures/Letisko.bmp",GetColor(0,1,0));
  232.     Structure_Letisko.Sca = F_Scale;
  233.     Structure_Letisko.SetMaterial(StructureMaterial);
  234.  
  235.     Structure_LetiskoDestroy.SmoothShading = false;
  236.     Structure_LetiskoDestroy.Normals = false;
  237.     Structure_LetiskoDestroy.InitializeAse(1,"models/structures/Letisko.ase");
  238.     Structure_LetiskoDestroy.LoadAse(0,"models/structures/Letisko.ase");
  239.     Structure_LetiskoDestroy.LoadTexture("models/structures/Letiskodestroy.bmp",GetColor(0,1,0));
  240.     Structure_LetiskoDestroy.Sca = F_Scale;
  241.     Structure_LetiskoDestroy.SetMaterial(StructureMaterial);
  242.  
  243.     //
  244.     //Hangar
  245.     Structure_Hangar.SmoothShading = false;
  246.     Structure_Hangar.Normals = false;
  247.     Structure_Hangar.InitializeAse(1,"models/structures/Hangar.ase");
  248.     Structure_Hangar.LoadAse(0,"models/structures/Hangar.ase");
  249.     Structure_Hangar.LoadTexture("models/structures/Hangar.bmp",GetColor(0,1,0));
  250.     Structure_Hangar.Sca = F_Scale;
  251.     Structure_Hangar.SetMaterial(StructureMaterial);
  252.  
  253.     Structure_HangarDestroy.SmoothShading = false;
  254.     Structure_HangarDestroy.Normals = false;
  255.     Structure_HangarDestroy.InitializeAse(1,"models/structures/Hangar.ase");
  256.     Structure_HangarDestroy.LoadAse(0,"models/structures/Hangar.ase");
  257.     Structure_HangarDestroy.LoadTexture("models/structures/Hangardestroy.bmp",GetColor(0,1,0));
  258.     Structure_HangarDestroy.Sca = F_Scale;
  259.     Structure_HangarDestroy.SetMaterial(StructureMaterial);
  260.  
  261.     //
  262.     //Dom1
  263.     Structure_Dom1.SmoothShading = false;
  264.     Structure_Dom1.Normals = false;
  265.     Structure_Dom1.InitializeAse(1,"models/structures/Dom1.ase");
  266.     Structure_Dom1.LoadAse(0,"models/structures/Dom1.ase");
  267.     Structure_Dom1.LoadTexture("models/structures/Dom1.bmp",GetColor(0,1,0));
  268.     Structure_Dom1.Sca = F_Scale;
  269.     Structure_Dom1.SetMaterial(StructureMaterial);
  270.  
  271.     Structure_Dom1Destroy.SmoothShading = false;
  272.     Structure_Dom1Destroy.Normals = false;
  273.     Structure_Dom1Destroy.InitializeAse(1,"models/structures/Dom1.ase");
  274.     Structure_Dom1Destroy.LoadAse(0,"models/structures/Dom1.ase");
  275.     Structure_Dom1Destroy.LoadTexture("models/structures/Dom1destroy.bmp",GetColor(0,1,0));
  276.     Structure_Dom1Destroy.Sca = F_Scale;
  277.     Structure_Dom1Destroy.SetMaterial(StructureMaterial);
  278.  
  279.     //
  280.     //Dom2
  281.     Structure_Dom2.SmoothShading = false;
  282.     Structure_Dom2.Normals = false;
  283.     Structure_Dom2.InitializeAse(1,"models/structures/Dom2.ase");
  284.     Structure_Dom2.LoadAse(0,"models/structures/Dom2.ase");
  285.     Structure_Dom2.LoadTexture("models/structures/Dom2.bmp",GetColor(0,1,0));
  286.     Structure_Dom2.Sca = F_Scale;
  287.     Structure_Dom2.SetMaterial(StructureMaterial);
  288.  
  289.     Structure_Dom2Destroy.SmoothShading = false;
  290.     Structure_Dom2Destroy.Normals = false;
  291.     Structure_Dom2Destroy.InitializeAse(1,"models/structures/Dom2.ase");
  292.     Structure_Dom2Destroy.LoadAse(0,"models/structures/Dom2.ase");
  293.     Structure_Dom2Destroy.LoadTexture("models/structures/Dom2destroy.bmp",GetColor(0,1,0));
  294.     Structure_Dom2Destroy.Sca = F_Scale;
  295.     Structure_Dom2Destroy.SetMaterial(StructureMaterial);
  296.  
  297.     //
  298.     //Kostol
  299.     Structure_Kostol.SmoothShading = false;
  300.     Structure_Kostol.Normals = false;
  301.     Structure_Kostol.InitializeAse(1,"models/structures/Kostol.ase");
  302.     Structure_Kostol.LoadAse(0,"models/structures/Kostol.ase");
  303.     Structure_Kostol.LoadTexture("models/structures/Kostol.bmp",GetColor(0,1,0));
  304.     Structure_Kostol.Sca = F_Scale;
  305.     Structure_Kostol.SetMaterial(StructureMaterial);
  306.  
  307.     Structure_KostolDestroy.SmoothShading = false;
  308.     Structure_KostolDestroy.Normals = false;
  309.     Structure_KostolDestroy.InitializeAse(1,"models/structures/Kostol.ase");
  310.     Structure_KostolDestroy.LoadAse(0,"models/structures/Kostol.ase");
  311.     Structure_KostolDestroy.LoadTexture("models/structures/Kostoldestroy.bmp",GetColor(0,1,0));
  312.     Structure_KostolDestroy.Sca = F_Scale;
  313.     Structure_KostolDestroy.SetMaterial(StructureMaterial);
  314.  
  315.     //
  316.     //Tank1
  317.     Structure_Tank1.SmoothShading = false;
  318.     Structure_Tank1.Normals = false;
  319.     Structure_Tank1.InitializeAse(1,"models/structures/Tank1.ase");
  320.     Structure_Tank1.LoadAse(0,"models/structures/Tank1.ase");
  321.     Structure_Tank1.LoadTexture("models/structures/Tank1.bmp",GetColor(0,1,0));
  322.     Structure_Tank1.Sca = F_Scale;
  323.     Structure_Tank1.SetMaterial(StructureMaterial);
  324.  
  325.     Structure_Tank1Destroy.SmoothShading = false;
  326.     Structure_Tank1Destroy.Normals = false;
  327.     Structure_Tank1Destroy.InitializeAse(1,"models/structures/Tank1.ase");
  328.     Structure_Tank1Destroy.LoadAse(0,"models/structures/Tank1.ase");
  329.     Structure_Tank1Destroy.LoadTexture("models/structures/Tank1destroy.bmp",GetColor(0,1,0));
  330.     Structure_Tank1Destroy.Sca = F_Scale;
  331.     Structure_Tank1Destroy.SetMaterial(StructureMaterial);
  332.  
  333.     //
  334.     //Tank2
  335.     Structure_Tank2.SmoothShading = false;
  336.     Structure_Tank2.Normals = false;
  337.     Structure_Tank2.InitializeAse(1,"models/structures/Tank2.ase");
  338.     Structure_Tank2.LoadAse(0,"models/structures/Tank2.ase");
  339.     Structure_Tank2.LoadTexture("models/structures/Tank2.bmp",GetColor(0,1,0));
  340.     Structure_Tank2.Sca = F_Scale;
  341.     Structure_Tank2.SetMaterial(StructureMaterial);
  342.  
  343.     Structure_Tank2Destroy.SmoothShading = false;
  344.     Structure_Tank2Destroy.Normals = false;
  345.     Structure_Tank2Destroy.InitializeAse(1,"models/structures/Tank2.ase");
  346.     Structure_Tank2Destroy.LoadAse(0,"models/structures/Tank2.ase");
  347.     Structure_Tank2Destroy.LoadTexture("models/structures/Tank2destroy.bmp",GetColor(0,1,0));
  348.     Structure_Tank2Destroy.Sca = F_Scale;
  349.     Structure_Tank2Destroy.SetMaterial(StructureMaterial);
  350.  
  351.     //
  352.     //Conv1
  353.     Structure_Conv1.SmoothShading = false;
  354.     Structure_Conv1.Normals = false;
  355.     Structure_Conv1.InitializeAse(1,"models/structures/Conv1.ase");
  356.     Structure_Conv1.LoadAse(0,"models/structures/Conv1.ase");
  357.     Structure_Conv1.LoadTexture("models/structures/Conv1.bmp",GetColor(0,1,0));
  358.     Structure_Conv1.Sca = F_Scale;
  359.     Structure_Conv1.SetMaterial(StructureMaterial);
  360.  
  361.     Structure_Conv1Destroy.SmoothShading = false;
  362.     Structure_Conv1Destroy.Normals = false;
  363.     Structure_Conv1Destroy.InitializeAse(1,"models/structures/Conv1.ase");
  364.     Structure_Conv1Destroy.LoadAse(0,"models/structures/Conv1.ase");
  365.     Structure_Conv1Destroy.LoadTexture("models/structures/Conv1destroy.bmp",GetColor(0,1,0));
  366.     Structure_Conv1Destroy.Sca = F_Scale;
  367.     Structure_Conv1Destroy.SetMaterial(StructureMaterial);
  368.  
  369.     //
  370.     //Conv2
  371.     Structure_Conv2.SmoothShading = false;
  372.     Structure_Conv2.Normals = false;
  373.     Structure_Conv2.InitializeAse(1,"models/structures/Conv2.ase");
  374.     Structure_Conv2.LoadAse(0,"models/structures/Conv2.ase");
  375.     Structure_Conv2.LoadTexture("models/structures/Conv2.bmp",GetColor(0,1,0));
  376.     Structure_Conv2.Sca = F_Scale;
  377.     Structure_Conv2.SetMaterial(StructureMaterial);
  378.  
  379.     Structure_Conv2Destroy.SmoothShading = false;
  380.     Structure_Conv2Destroy.Normals = false;
  381.     Structure_Conv2Destroy.InitializeAse(1,"models/structures/Conv2.ase");
  382.     Structure_Conv2Destroy.LoadAse(0,"models/structures/Conv2.ase");
  383.     Structure_Conv2Destroy.LoadTexture("models/structures/Conv2destroy.bmp",GetColor(0,1,0));
  384.     Structure_Conv2Destroy.Sca = F_Scale;
  385.     Structure_Conv2Destroy.SetMaterial(StructureMaterial);
  386.  
  387.     //
  388.     //Plane
  389.     Structure_Plane.SmoothShading = false;
  390.     Structure_Plane.Normals = false;
  391.     Structure_Plane.InitializeAse(1,"models/structures/Plane.ase");
  392.     Structure_Plane.LoadAse(0,"models/structures/Plane.ase");
  393.     Structure_Plane.LoadTexture("models/messerschmitt/messernormal.bmp",GetColor(0,1,0));
  394.     Structure_Plane.Sca = F_Scale;
  395.     Structure_Plane.SetMaterial(StructureMaterial);
  396.  
  397.     Structure_PlaneDestroy.SmoothShading = false;
  398.     Structure_PlaneDestroy.Normals = false;
  399.     Structure_PlaneDestroy.InitializeAse(1,"models/structures/Plane.ase");
  400.     Structure_PlaneDestroy.LoadAse(0,"models/structures/Plane.ase");
  401.     Structure_PlaneDestroy.LoadTexture("models/messerschmitt/messerdestroy.bmp",GetColor(0,1,0));
  402.     Structure_PlaneDestroy.Sca = F_Scale;
  403.     Structure_PlaneDestroy.SetMaterial(StructureMaterial);
  404.  
  405.     //
  406.     //Mesto1
  407.     Structure_Mesto1.SmoothShading = false;
  408.     Structure_Mesto1.Normals = false;
  409.     Structure_Mesto1.InitializeAse(1,"models/structures/Mesto1.ase");
  410.     Structure_Mesto1.LoadAse(0,"models/structures/Mesto1.ase");
  411.     Structure_Mesto1.LoadTexture("models/structures/Mesto.bmp",GetColor(0,1,0));
  412.     Structure_Mesto1.Sca = F_Scale;
  413.     Structure_Mesto1.SetMaterial(StructureMaterial);
  414.  
  415.     Structure_Mesto1Destroy.SmoothShading = false;
  416.     Structure_Mesto1Destroy.Normals = false;
  417.     Structure_Mesto1Destroy.InitializeAse(1,"models/structures/Mesto1.ase");
  418.     Structure_Mesto1Destroy.LoadAse(0,"models/structures/Mesto1.ase");
  419.     Structure_Mesto1Destroy.LoadTexture("models/structures/Mestodestroy.bmp",GetColor(0,1,0));
  420.     Structure_Mesto1Destroy.Sca = F_Scale;
  421.     Structure_Mesto1Destroy.SetMaterial(StructureMaterial);
  422.  
  423.     //
  424.     //Mesto2
  425.     Structure_Mesto2.SmoothShading = false;
  426.     Structure_Mesto2.Normals = false;
  427.     Structure_Mesto2.InitializeAse(1,"models/structures/Mesto2.ase");
  428.     Structure_Mesto2.LoadAse(0,"models/structures/Mesto2.ase");
  429.     Structure_Mesto2.LoadTexture("models/structures/Mesto.bmp",GetColor(0,1,0));
  430.     Structure_Mesto2.Sca = F_Scale;
  431.     Structure_Mesto2.SetMaterial(StructureMaterial);
  432.  
  433.     Structure_Mesto2Destroy.SmoothShading = false;
  434.     Structure_Mesto2Destroy.Normals = false;
  435.     Structure_Mesto2Destroy.InitializeAse(1,"models/structures/Mesto2.ase");
  436.     Structure_Mesto2Destroy.LoadAse(0,"models/structures/Mesto2.ase");
  437.     Structure_Mesto2Destroy.LoadTexture("models/structures/Mestodestroy.bmp",GetColor(0,1,0));
  438.     Structure_Mesto2Destroy.Sca = F_Scale;
  439.     Structure_Mesto2Destroy.SetMaterial(StructureMaterial);
  440.  
  441.     //
  442.     //Mesto3
  443.     Structure_Mesto3.SmoothShading = false;
  444.     Structure_Mesto3.Normals = false;
  445.     Structure_Mesto3.InitializeAse(1,"models/structures/Mesto3.ase");
  446.     Structure_Mesto3.LoadAse(0,"models/structures/Mesto3.ase");
  447.     Structure_Mesto3.LoadTexture("models/structures/Mesto.bmp",GetColor(0,1,0));
  448.     Structure_Mesto3.Sca = F_Scale;
  449.     Structure_Mesto3.SetMaterial(StructureMaterial);
  450.  
  451.     Structure_Mesto3Destroy.SmoothShading = false;
  452.     Structure_Mesto3Destroy.Normals = false;
  453.     Structure_Mesto3Destroy.InitializeAse(1,"models/structures/Mesto3.ase");
  454.     Structure_Mesto3Destroy.LoadAse(0,"models/structures/Mesto3.ase");
  455.     Structure_Mesto3Destroy.LoadTexture("models/structures/Mestodestroy.bmp",GetColor(0,1,0));
  456.     Structure_Mesto3Destroy.Sca = F_Scale;
  457.     Structure_Mesto3Destroy.SetMaterial(StructureMaterial);
  458.  
  459.     //
  460.     //Mesto4
  461.     Structure_Mesto4.SmoothShading = false;
  462.     Structure_Mesto4.Normals = false;
  463.     Structure_Mesto4.InitializeAse(1,"models/structures/Mesto4.ase");
  464.     Structure_Mesto4.LoadAse(0,"models/structures/Mesto4.ase");
  465.     Structure_Mesto4.LoadTexture("models/structures/Mesto.bmp",GetColor(0,1,0));
  466.     Structure_Mesto4.Sca = F_Scale;
  467.     Structure_Mesto4.SetMaterial(StructureMaterial);
  468.  
  469.     Structure_Mesto4Destroy.SmoothShading = false;
  470.     Structure_Mesto4Destroy.Normals = false;
  471.     Structure_Mesto4Destroy.InitializeAse(1,"models/structures/Mesto4.ase");
  472.     Structure_Mesto4Destroy.LoadAse(0,"models/structures/Mesto4.ase");
  473.     Structure_Mesto4Destroy.LoadTexture("models/structures/Mestodestroy.bmp",GetColor(0,1,0));
  474.     Structure_Mesto4Destroy.Sca = F_Scale;
  475.     Structure_Mesto4Destroy.SetMaterial(StructureMaterial);
  476.  
  477.     //
  478.     //BillBoard
  479.     Structure_BillBoard.SmoothShading = false;
  480.     Structure_BillBoard.Lighting = false;
  481.     Structure_BillBoard.InitializeAse(1,"models/structures/BillBoard.ase");
  482.     Structure_BillBoard.LoadAse(0,"models/structures/BillBoard.ase");
  483.     Structure_BillBoard.LoadTexture("models/structures/BillBoard.bmp",GetColor(1.0f,1.0f,0.0f,1.0f));
  484.     Structure_BillBoard.Sca = F_Scale;
  485.     Structure_BillBoard.SetMaterial(StructureMaterial);
  486.  
  487.     //
  488.     //Strom1
  489.     Structure_Strom1.SmoothShading = false;
  490.     Structure_Strom1.Lighting = false;
  491.     Structure_Strom1.InitializeAse(1,"models/structures/Strom1.ase");
  492.     Structure_Strom1.LoadAse(0,"models/structures/Strom1.ase");
  493.     Structure_Strom1.LoadTexture("models/structures/Strom1.bmp",GetColor(1.0f,1.0f,0.0f,1.0f));
  494.     Structure_Strom1.Sca = F_Scale;
  495.     Structure_Strom1.SetMaterial(StructureMaterial);
  496.  
  497.     //
  498.     //Strom2
  499.     Structure_Strom2.SmoothShading = false;
  500.     Structure_Strom2.Lighting = false;
  501.     Structure_Strom2.InitializeAse(1,"models/structures/Strom2.ase");
  502.     Structure_Strom2.LoadAse(0,"models/structures/Strom2.ase");
  503.     Structure_Strom2.LoadTexture("models/structures/Strom2.bmp",GetColor(1.0f,1.0f,0.0f,1.0f));
  504.     Structure_Strom2.Sca = F_Scale;
  505.     Structure_Strom2.SetMaterial(StructureMaterial);
  506.  
  507.     //
  508.     //Strom2
  509.     Structure_Strom3.SmoothShading = false;
  510.     Structure_Strom3.Lighting = false;
  511.     Structure_Strom3.InitializeAse(1,"models/structures/Strom3.ase");
  512.     Structure_Strom3.LoadAse(0,"models/structures/Strom3.ase");
  513.     Structure_Strom3.LoadTexture("models/structures/Strom3.bmp",GetColor(1.0f,1.0f,0.0f,1.0f));
  514.     Structure_Strom3.Sca = F_Scale;
  515.     Structure_Strom3.SetMaterial(StructureMaterial);
  516.  
  517.     //
  518.     //Strom4
  519.     Structure_Strom4.SmoothShading = false;
  520.     Structure_Strom4.Lighting = false;
  521.     Structure_Strom4.InitializeAse(1,"models/structures/Strom4.ase");
  522.     Structure_Strom4.LoadAse(0,"models/structures/Strom4.ase");
  523.     Structure_Strom4.LoadTexture("models/structures/Strom4.bmp",GetColor(1.0f,1.0f,0.0f,1.0f));
  524.     Structure_Strom4.Sca = F_Scale;
  525.     Structure_Strom4.SetMaterial(StructureMaterial);
  526.  
  527.     //
  528.     //Palma1
  529.     Structure_Palma1.SmoothShading = false;
  530.     Structure_Palma1.Lighting = false;
  531.     Structure_Palma1.InitializeAse(1,"models/structures/Palma1.ase");
  532.     Structure_Palma1.LoadAse(0,"models/structures/Palma1.ase");
  533.     Structure_Palma1.LoadTexture("models/structures/Palma1.bmp",GetColor(1.0f,0.0f,0.0f,0.0f));
  534.     Structure_Palma1.Sca = F_Scale;
  535.     Structure_Palma1.SetMaterial(StructureMaterial);
  536.  
  537.     //
  538.     //Palma2
  539.     Structure_Palma2.SmoothShading = false;
  540.     Structure_Palma2.Lighting = false;
  541.     Structure_Palma2.InitializeAse(1,"models/structures/Palma2.ase");
  542.     Structure_Palma2.LoadAse(0,"models/structures/Palma2.ase");
  543.     Structure_Palma2.LoadTexture("models/structures/Palma2.bmp",GetColor(1.0f,0.0f,0.0f,0.0f));
  544.     Structure_Palma2.Sca = F_Scale;
  545.     Structure_Palma2.SetMaterial(StructureMaterial);
  546.  
  547.     //=====//
  548.     /////////
  549.     //TRUCK//
  550.     /////////
  551.     //=====//
  552.  
  553.     //podvozok
  554.     Truck_ModelBack.Specular = false;
  555.     Truck_ModelBack.Normals = false;
  556.     Truck_ModelBack.SmoothShading = false;
  557.     Truck_ModelBack.InitializeAse(1,"models/truck/truckback.ase");
  558.     Truck_ModelBack.LoadAse(0,"models/truck/truckback.ase");
  559.     Truck_ModelBack.LoadTexture("models/truck/trucknormal.bmp",GetColor(1.0f,0.0f,1.0f));
  560.     Truck_ModelBack.Sca = F_Scale;
  561.     Truck_ModelBack.SetMaterial(TruckMaterial);
  562.  
  563.     //delo
  564.     Truck_ModelCannon.Specular = false;
  565.     Truck_ModelCannon.Normals = false;
  566.     Truck_ModelCannon.SmoothShading = false;
  567.     Truck_ModelCannon.InitializeAse(1,"models/truck/truckcannon.ase");
  568.     Truck_ModelCannon.LoadAse(0,"models/truck/truckcannon.ase");
  569.     Truck_ModelCannon.LoadTexture("models/truck/trucknormal.bmp",GetColor(1.0f,0.0f,1.0f));
  570.     Truck_ModelCannon.Sca = F_Scale;
  571.     Truck_ModelCannon.SetMaterial(TruckMaterial);
  572.  
  573.     //destroyed
  574.     Truck_ModelDestroyed.Specular = false;
  575.     Truck_ModelDestroyed.Normals = false;
  576.     Truck_ModelDestroyed.SmoothShading = false;
  577.     Truck_ModelDestroyed.InitializeAse(1,"models/truck/truckDestroyed.ase");
  578.     Truck_ModelDestroyed.LoadAse(0,"models/truck/truckDestroyed.ase");
  579.     Truck_ModelDestroyed.LoadTexture("models/truck/truckDestroy.bmp",GetColor(1.0f,0.0f,1.0f));
  580.     Truck_ModelDestroyed.Sca = F_Scale;
  581.     Truck_ModelDestroyed.SetMaterial(TruckMaterial);
  582.  
  583.  
  584.  
  585. }
  586.  
  587. //vrati pointer na strucutrure
  588. //------------------------------------------------------------
  589. MODEL *MODELLIB::GetStructure(int MIndex)
  590. {
  591.  
  592.     switch (MIndex)
  593.     {
  594.         case Index_Structure_Budova:
  595.             return &Structure_Budova ;
  596.         case Index_Structure_Tovaren:
  597.             return &Structure_Tovaren ;
  598.         case Index_Structure_Komin:
  599.             return &Structure_Komin ;
  600.         case Index_Structure_Sklad:
  601.             return &Structure_Sklad ;
  602.         case Index_Structure_Stan:
  603.             return &Structure_Stan ;
  604.         case Index_Structure_Letisko:
  605.             return &Structure_Letisko ;
  606.         case Index_Structure_Hangar:
  607.             return &Structure_Hangar;
  608.         case Index_Structure_Dom1:
  609.             return &Structure_Dom1;
  610.         case Index_Structure_Dom2:
  611.             return &Structure_Dom2;
  612.         case Index_Structure_Kostol:
  613.             return &Structure_Kostol;
  614.  
  615.         case Index_Structure_Tank1:
  616.             return &Structure_Tank1;
  617.         case Index_Structure_Tank2:
  618.             return &Structure_Tank2;
  619.         case Index_Structure_Conv1:
  620.             return &Structure_Conv1;
  621.         case Index_Structure_Conv2:
  622.             return &Structure_Conv2;
  623.         case Index_Structure_Plane:
  624.             return &Structure_Plane;
  625.  
  626.         case Index_Structure_Mesto1:
  627.             return &Structure_Mesto1;
  628.         case Index_Structure_Mesto2:
  629.             return &Structure_Mesto2;
  630.         case Index_Structure_Mesto3:
  631.             return &Structure_Mesto3;
  632.         case Index_Structure_Mesto4:
  633.             return &Structure_Mesto4;
  634.         
  635.         case Index_Structure_BillBoard:
  636.             return &Structure_BillBoard;
  637.  
  638.         case Index_Structure_Strom1:
  639.             return &Structure_Strom1;
  640.         case Index_Structure_Strom2:
  641.             return &Structure_Strom2;
  642.         case Index_Structure_Strom3:
  643.             return &Structure_Strom3;
  644.         case Index_Structure_Strom4:
  645.             return &Structure_Strom4;
  646.         case Index_Structure_Palma1:
  647.             return &Structure_Palma1;
  648.         case Index_Structure_Palma2:
  649.             return &Structure_Palma2;
  650.     }
  651.  
  652.     return &Structure_Budova;
  653.  
  654. }
  655.  
  656. //vrati pointer na znicenu strucutrure
  657. //------------------------------------------------------------
  658. MODEL *MODELLIB::GetDestroyedStructure(int MIndex)
  659. {
  660.  
  661.     switch (MIndex)
  662.     {
  663.         case Index_Structure_Budova:
  664.             return &Structure_BudovaDestroy ;
  665.         case Index_Structure_Tovaren:
  666.             return &Structure_TovarenDestroy ;
  667.         case Index_Structure_Komin:
  668.             return &Structure_KominDestroy ;
  669.         case Index_Structure_Sklad:
  670.             return &Structure_SkladDestroy ;
  671.         case Index_Structure_Stan:
  672.             return &Structure_StanDestroy ;
  673.         case Index_Structure_Letisko:
  674.             return &Structure_LetiskoDestroy ;
  675.         case Index_Structure_Hangar:
  676.             return &Structure_HangarDestroy ;
  677.         case Index_Structure_Dom1:
  678.             return &Structure_Dom1Destroy ;
  679.         case Index_Structure_Dom2:
  680.             return &Structure_Dom2Destroy ;
  681.         case Index_Structure_Kostol:
  682.             return &Structure_KostolDestroy;
  683.  
  684.         case Index_Structure_Tank1:
  685.             return &Structure_Tank1Destroy;
  686.         case Index_Structure_Tank2:
  687.             return &Structure_Tank2Destroy;
  688.         case Index_Structure_Conv1:
  689.             return &Structure_Conv1Destroy;
  690.         case Index_Structure_Conv2:
  691.             return &Structure_Conv2Destroy;
  692.         case Index_Structure_Plane:
  693.             return &Structure_PlaneDestroy;
  694.  
  695.         case Index_Structure_Mesto1:
  696.             return &Structure_Mesto1Destroy;
  697.         case Index_Structure_Mesto2:
  698.             return &Structure_Mesto2Destroy;
  699.         case Index_Structure_Mesto3:
  700.             return &Structure_Mesto3Destroy;
  701.         case Index_Structure_Mesto4:
  702.             return &Structure_Mesto4Destroy;
  703.  
  704.         case Index_Structure_BillBoard:
  705.             return &Structure_BillBoard;
  706.  
  707.         case Index_Structure_Strom1:
  708.             return &Structure_Strom1;
  709.         case Index_Structure_Strom2:
  710.             return &Structure_Strom2;
  711.         case Index_Structure_Strom3:
  712.             return &Structure_Strom3;
  713.         case Index_Structure_Strom4:
  714.             return &Structure_Strom4;
  715.         case Index_Structure_Palma1:
  716.             return &Structure_Palma1;
  717.         case Index_Structure_Palma2:
  718.             return &Structure_Palma2;
  719.     }
  720.  
  721.     return &Structure_Budova;
  722. }