-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStaticMapObject.cpp
51 lines (45 loc) · 1.19 KB
/
StaticMapObject.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#include "stdafx.h"
#include "StaticMapObject.h"
#include <iostream>
#include <stdio.h>
#include <string.h>
#include <windows.system.h>
#include <msclr\marshal_cppstd.h>
using namespace System;
using namespace System::IO;
StaticMapObject::StaticMapObject(){
Z = 0.0f;
AngleX = 0;
AngleY = 0;
AngleZ = 0;
a = 0;
b = 0;
c = 0;
}
StaticMapObject::~StaticMapObject(){}
void StaticMapObject::SetTC(TexturesContainer *texturesContainer, int TexturesContainerCount)
{
this->texturesContainer = texturesContainer;
this->TexturesContainerCount = TexturesContainerCount;
}
void StaticMapObject::LinkTextures()
{
for (int i = 0; i < TexturesContainerCount; i++)
/*texturesContainer[i].GetName() == this->Name
?
textures = texturesContainer[i].GetTexture() : 0;
*/
if (texturesContainer[i].GetName() == this->Name)
{
Textures = texturesContainer[i].GetTexture();
break;
}
else
{
Textures = texturesContainer[1].GetTexture();
}
}
void StaticMapObject::SetTexture(int Count, string Name, int FileCont)
{
Textures[Count] = Draw::LoadTexture("Objects\\" + Name + "\\jpeg\\" + msclr::interop::marshal_as<std::string>(FileCont.ToString()) + ".jpg");
}