[add] 물 쉐이더 수정
[fix] 머테리얼 이상한 리소스 수정
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include "MapObject_Collision.h"
|
||||
#include "MapElement_Light.h"
|
||||
#include "MapElement_Interactable.h"
|
||||
#include "MapElement_Lake.h"
|
||||
#include "Layer.h"
|
||||
|
||||
CMapInfo::CMapInfo()
|
||||
@@ -312,7 +313,7 @@ HRESULT CMapInfo::Load_LightElements(const _char* pFileName)
|
||||
{
|
||||
tinyxml2::XMLDocument xmlDoc;
|
||||
|
||||
string strPath = "../Bin/Resources/Data/Map/" + string(pFileName) + ".xml";
|
||||
string strPath = "../Bin/Resources/Data/Map/Light/" + string(pFileName) + ".xml";
|
||||
|
||||
if ((tinyxml2::XML_SUCCESS != xmlDoc.LoadFile(strPath.c_str())))
|
||||
return E_FAIL;
|
||||
@@ -390,7 +391,7 @@ HRESULT CMapInfo::Load_LightElements(const _char* pFileName)
|
||||
return E_FAIL;
|
||||
}
|
||||
#ifndef 기무리
|
||||
MSG_BOX("Successed to Load File");
|
||||
//MSG_BOX("Successed to Load File");
|
||||
#endif
|
||||
|
||||
return S_OK;
|
||||
@@ -400,7 +401,7 @@ HRESULT CMapInfo::Load_InteractableElements(const _char* pFileName)
|
||||
{
|
||||
tinyxml2::XMLDocument xmlDoc;
|
||||
|
||||
string strPath = "../Bin/Resources/Data/Map/" + string(pFileName) + ".xml";
|
||||
string strPath = "../Bin/Resources/Data/Map/Interactable/" + string(pFileName) + ".xml";
|
||||
|
||||
if ((tinyxml2::XML_SUCCESS != xmlDoc.LoadFile(strPath.c_str())))
|
||||
return E_FAIL;
|
||||
@@ -463,6 +464,115 @@ HRESULT CMapInfo::Load_InteractableElements(const _char* pFileName)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMapInfo::Load_WaterElemet(const _char* pFileName)
|
||||
{
|
||||
tinyxml2::XMLDocument xmlDoc;
|
||||
|
||||
string strPath = "../Bin/Resources/Data/Map/Water/" + string(pFileName) + ".xml";
|
||||
|
||||
if ((tinyxml2::XML_SUCCESS != xmlDoc.LoadFile(strPath.c_str())))
|
||||
return E_FAIL;
|
||||
|
||||
tinyxml2::XMLElement* root = xmlDoc.FirstChildElement("MapObjects_Water");
|
||||
|
||||
if (nullptr == root)
|
||||
{
|
||||
MSG_BOX("Failed to Find root");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
for (auto* Object = root->FirstChildElement("Object"); Object; Object = Object->NextSiblingElement("Object"))
|
||||
{
|
||||
CMapElement_Lake::MAPOBJECT_LAKE_DESC Desc = {};
|
||||
|
||||
/* Model Prototypes */
|
||||
Object->QueryUnsignedAttribute("Lod_Level", &Desc.iMaxLodLevel);
|
||||
|
||||
string strTag = {};
|
||||
for (auto* PrototypeTag = Object->FirstChildElement("PrototypeTag"); PrototypeTag; PrototypeTag = PrototypeTag->NextSiblingElement("PrototypeTag"))
|
||||
{
|
||||
strTag = PrototypeTag->GetText();
|
||||
|
||||
Desc.ModelPrototypeTags.push_back(CMyTools::ToWstring(strTag));
|
||||
}
|
||||
for (auto* PrototypeTag = Object->FirstChildElement("ShollowPrototypeTag"); PrototypeTag; PrototypeTag = PrototypeTag->NextSiblingElement("ShollowPrototypeTag"))
|
||||
{
|
||||
strTag = PrototypeTag->GetText();
|
||||
|
||||
Desc.ShallowModelPrototypeTags.push_back(CMyTools::ToWstring(strTag));
|
||||
}
|
||||
|
||||
/* Transform */
|
||||
auto* Position = Object->FirstChildElement("Position");
|
||||
Position->QueryFloatAttribute("x", &Desc.vPosition.x);
|
||||
Position->QueryFloatAttribute("y", &Desc.vPosition.y);
|
||||
Position->QueryFloatAttribute("z", &Desc.vPosition.z);
|
||||
|
||||
auto* Scale = Object->FirstChildElement("Scale");
|
||||
Scale->QueryFloatAttribute("x", &Desc.vScale.x);
|
||||
Scale->QueryFloatAttribute("y", &Desc.vScale.y);
|
||||
Scale->QueryFloatAttribute("z", &Desc.vScale.z);
|
||||
|
||||
auto* Rotation = Object->FirstChildElement("Rotation");
|
||||
Rotation->QueryFloatAttribute("x", &Desc.vRotation.x);
|
||||
Rotation->QueryFloatAttribute("y", &Desc.vRotation.y);
|
||||
Rotation->QueryFloatAttribute("z", &Desc.vRotation.z);
|
||||
|
||||
|
||||
auto* Radius = Object->FirstChildElement("Radius");
|
||||
Radius->QueryFloatAttribute("value", &Desc.fRadius);
|
||||
|
||||
auto* TimeSpeed = Object->FirstChildElement("TimeSpeed");
|
||||
TimeSpeed->QueryFloatAttribute("value", &Desc.fTimeSpeed);
|
||||
|
||||
auto* RefractionStrength = Object->FirstChildElement("RefractionStrength");
|
||||
RefractionStrength->QueryFloatAttribute("value", &Desc.fRefractionStrength);
|
||||
|
||||
auto* RefractionPow = Object->FirstChildElement("RefractionPow");
|
||||
RefractionPow->QueryFloatAttribute("value", &Desc.fRefractionPow);
|
||||
|
||||
auto* UVValue1 = Object->FirstChildElement("UVValue1");
|
||||
UVValue1->QueryFloatAttribute("value", &Desc.fUVValue1);
|
||||
|
||||
auto* UVValue2 = Object->FirstChildElement("UVValue2");
|
||||
UVValue2->QueryFloatAttribute("value", &Desc.fUVValue2);
|
||||
|
||||
auto* UVValue3 = Object->FirstChildElement("UVValue3");
|
||||
UVValue3->QueryFloatAttribute("value", &Desc.fUVValue3);
|
||||
|
||||
// float2 값들
|
||||
auto* UVSpeed = Object->FirstChildElement("UVSpeed");
|
||||
UVSpeed->QueryFloatAttribute("x", &Desc.vUVSpeed.x);
|
||||
UVSpeed->QueryFloatAttribute("y", &Desc.vUVSpeed.y);
|
||||
|
||||
auto* LargeUVSpeed = Object->FirstChildElement("LargeUVSpeed");
|
||||
LargeUVSpeed->QueryFloatAttribute("x", &Desc.vLargeUVSpeed.x);
|
||||
LargeUVSpeed->QueryFloatAttribute("y", &Desc.vLargeUVSpeed.y);
|
||||
|
||||
auto* SubUVSpeed3 = Object->FirstChildElement("SubUVSpeed3");
|
||||
SubUVSpeed3->QueryFloatAttribute("x", &Desc.vSubUVSpeed3.x);
|
||||
SubUVSpeed3->QueryFloatAttribute("y", &Desc.vSubUVSpeed3.y);
|
||||
|
||||
// float4 값들
|
||||
auto* RefractionColor = Object->FirstChildElement("RefractionColor");
|
||||
RefractionColor->QueryFloatAttribute("x", &Desc.vRefractionColor.x);
|
||||
RefractionColor->QueryFloatAttribute("y", &Desc.vRefractionColor.y);
|
||||
RefractionColor->QueryFloatAttribute("z", &Desc.vRefractionColor.z);
|
||||
RefractionColor->QueryFloatAttribute("w", &Desc.vRefractionColor.w);
|
||||
|
||||
auto* SurfaceColor = Object->FirstChildElement("SurfaceColor");
|
||||
SurfaceColor->QueryFloatAttribute("x", &Desc.vSurfaceColor.x);
|
||||
SurfaceColor->QueryFloatAttribute("y", &Desc.vSurfaceColor.y);
|
||||
SurfaceColor->QueryFloatAttribute("z", &Desc.vSurfaceColor.z);
|
||||
SurfaceColor->QueryFloatAttribute("w", &Desc.vSurfaceColor.w);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMapElement_Lake>(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Element_Lake"), &Desc)))
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMapInfo::Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex)
|
||||
{
|
||||
m_pGameInstance = CGameInstance::GetInstance();
|
||||
|
||||
Reference in New Issue
Block a user