diff --git a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl index 14c08945d..37238d940 100644 --- a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl +++ b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl @@ -340,15 +340,27 @@ PS_OUT PS_QuestType(PS_IN In) return Out; } -PS_OUT PS_UVMult(PS_IN In) +PS_OUT PS_Spell_Anim(PS_IN In) { PS_OUT Out; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; - float4 color = g_Texture.Sample(DefaultSampler, In.vTexcoord); + float4 Color = float4(1.f,1.f,1.f,1.f); + float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord); - color.a *= Alpha; - Out.vColor = color; + Color = tex1; + + float2 texpos = g_fImageSipos1.xy / g_fCurrent_Size; + float2 texsize = g_fImageSipos1.zw / g_fCurrent_Size; + float2 texlocal = (In.vTexcoord - texpos) / texsize; + bool inside = all(texlocal >= 0.0f && texlocal <= 1.0f); + float4 tex2 = g_Texture1.Sample(DefaultSampler, In.vTexcoord); + + if (inside) + Color = lerp(Color, tex2, tex2.a); + + Color.a *= Alpha; + Out.vColor = Color; return Out; } @@ -1229,14 +1241,14 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_QuestType(); } - pass UVMult + pass Spell_Anim { SetRasterizerState(RS_Default); SetDepthStencilState(DSS_Default, 0); SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); VertexShader = compile vs_5_0 VS_MAIN(); GeometryShader = NULL; - PixelShader = compile ps_5_0 PS_UVMult(); + PixelShader = compile ps_5_0 PS_Spell_Anim(); } pass NineSlice diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj b/Jusin154_Team3D/Client/Default/Client.vcxproj index bde546c29..5044bc5f1 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj @@ -226,6 +226,7 @@ call Update_Resources.bat + @@ -316,6 +317,7 @@ call Update_Resources.bat + diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters index 38138848c..4f90ccdaf 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters @@ -256,6 +256,9 @@ 04.Mechanic\State\Broom + + 04.Mechanic\Skill\Skill_Data + 02.GameObjects\Effect\Revelio @@ -326,9 +329,6 @@ {1bfec6dc-f008-4d18-87d6-be38824b1272} - - {c5b61cb3-bc5f-4429-8715-b309dcf054b2} - {2b209526-b728-4fba-a184-b9224d72903a} @@ -566,6 +566,12 @@ {19a2325e-1184-4ee0-92e1-657bf184418c} + + {c5b61cb3-bc5f-4429-8715-b309dcf054b2} + + + {2bc5b43e-0e24-49d4-95b0-549ad4428201} + @@ -817,6 +823,9 @@ 02.GameObjects\Effect\Revelio + + 04.Mechanic\Skill\Skill_Data + diff --git a/Jusin154_Team3D/Client/Private/EffectPool.cpp b/Jusin154_Team3D/Client/Private/EffectPool.cpp index a98e630a5..777012efe 100644 --- a/Jusin154_Team3D/Client/Private/EffectPool.cpp +++ b/Jusin154_Team3D/Client/Private/EffectPool.cpp @@ -124,7 +124,7 @@ HRESULT CEffectPool::Ready_Effect() ))) return E_FAIL; - if (FAILED(Create_Effect(SKILL_TYPE::BOMBARD, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* { + if (FAILED(Create_Effect(SKILL_TYPE::BOMBARDA, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* { CBombard* pEffect = nullptr; diff --git a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp index 09a00cf64..1e30d6175 100644 --- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp +++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp @@ -134,7 +134,7 @@ HRESULT CLevel_GamePlay::Ready_Background() HRESULT CLevel_GamePlay::Ready_Layer_UI(const _wstring& strLayerTag) { - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, LAYER_UI))) { + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Private/Magic_Icon.cpp b/Jusin154_Team3D/Client/Private/Magic_Icon.cpp index 5128a6f15..b06a7c3d6 100644 --- a/Jusin154_Team3D/Client/Private/Magic_Icon.cpp +++ b/Jusin154_Team3D/Client/Private/Magic_Icon.cpp @@ -117,7 +117,7 @@ HRESULT CMagic_Icon::Render() _vector CMagic_Icon::Get_WorldPostion() { - return m_pOwner->Get_WorldPostion(); + return m_pTransformCom->Get_State(STATE::POSITION); } HRESULT CMagic_Icon::Bind_ShaderResources() diff --git a/Jusin154_Team3D/Client/Private/Player_States.cpp b/Jusin154_Team3D/Client/Private/Player_States.cpp index 7c9e84cce..4ba738dda 100644 --- a/Jusin154_Team3D/Client/Private/Player_States.cpp +++ b/Jusin154_Team3D/Client/Private/Player_States.cpp @@ -885,7 +885,7 @@ HRESULT CPlayer::Behavior_CombatExitCheck() { pairAnimInfo = m_Animation[STATEANIM::ACCIO]; Add_Event(pairAnimInfo.first, - [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::BOMBARD, this);m_eSpell = STATEANIM::END; }, + [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::BOMBARDA, this);m_eSpell = STATEANIM::END; }, 0.25f); m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); } diff --git a/Jusin154_Team3D/Client/Private/Skill_Data.cpp b/Jusin154_Team3D/Client/Private/Skill_Data.cpp new file mode 100644 index 000000000..bcb5590be --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Skill_Data.cpp @@ -0,0 +1 @@ +#include "pch.h" diff --git a/Jusin154_Team3D/Client/Private/Spell_UI.cpp b/Jusin154_Team3D/Client/Private/Spell_UI.cpp index e2cde53dc..43c6c45ce 100644 --- a/Jusin154_Team3D/Client/Private/Spell_UI.cpp +++ b/Jusin154_Team3D/Client/Private/Spell_UI.cpp @@ -184,7 +184,7 @@ HRESULT CSpell_UI::Render() _vector CSpell_UI::Get_WorldPostion() { - return m_pOwner->Get_WorldPostion(); + return m_pTransformCom->Get_State(STATE::POSITION); } HRESULT CSpell_UI::Bind_ShaderResources() diff --git a/Jusin154_Team3D/Client/Public/Client_Enum.h b/Jusin154_Team3D/Client/Public/Client_Enum.h index 037545448..b711a541b 100644 --- a/Jusin154_Team3D/Client/Public/Client_Enum.h +++ b/Jusin154_Team3D/Client/Public/Client_Enum.h @@ -18,7 +18,14 @@ namespace Client enum class EFFECT_TYPE { EFFECT, TRAIL, END }; - enum class SKILL_TYPE { JAP, BOMBARD, DESCENDO, PROTEGO, REVELIO ,END }; + enum class SKILL_TYPE { + ARESTO_MOMENTUM, GLACIUS, LEVIOSO, TRANSFORM, ASSIO, + DEPULSO, DESCENDO, FLIPENDO, CONFRINGO, DIFFINDO, EXPELLIARMUS, + BOMBARDA, INCENDIO, DISILLUSIONMENT, LUMOS, REPARO, WINGARDIUM_LEVIOSA, + CONJURING_SPELL, ALTERING_SPELL, EVANESCO, AVADA_KEDAVRA, CRUCIO, IMPERIO, + BEAST_PETTING_BRUSH, BEAST_FEED, NAB_SACK, JAP, REVELIO, PROTEGO, STUPEFY, + ANCIENT_MAGIC_THROW, ANCIENT_MAGIC, ALOHOMORA, PETRIFICUS_TOTALUS, END + }; enum class BLOOM_TYPE { NONE, BASIC, MULTIPLY, END }; } diff --git a/Jusin154_Team3D/Client/Public/Client_Struct.h b/Jusin154_Team3D/Client/Public/Client_Struct.h index 5c631300c..c3c76619d 100644 --- a/Jusin154_Team3D/Client/Public/Client_Struct.h +++ b/Jusin154_Team3D/Client/Public/Client_Struct.h @@ -19,11 +19,12 @@ namespace Client typedef struct tagSpellInfo { _uint iSpell_ID{}; - _wstring pSpell_Name{}; + _wstring pSpell_Name; _uint iSpell_Type{}; _uint iSpell_CoolTime{}; + _uint iAnimNum{}; + _wstring pSpellInfo; _bool bSpell_Lock = false; _bool bEquip_Spell = false; - }SPELLINFO; }; diff --git a/Jusin154_Team3D/Client/Public/Skill_Data.h b/Jusin154_Team3D/Client/Public/Skill_Data.h new file mode 100644 index 000000000..1f8db1ae1 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Skill_Data.h @@ -0,0 +1,5 @@ +#pragma once +class CSkill_Data +{ +}; + diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl index 14c08945d..37238d940 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl @@ -340,15 +340,27 @@ PS_OUT PS_QuestType(PS_IN In) return Out; } -PS_OUT PS_UVMult(PS_IN In) +PS_OUT PS_Spell_Anim(PS_IN In) { PS_OUT Out; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; - float4 color = g_Texture.Sample(DefaultSampler, In.vTexcoord); + float4 Color = float4(1.f,1.f,1.f,1.f); + float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord); - color.a *= Alpha; - Out.vColor = color; + Color = tex1; + + float2 texpos = g_fImageSipos1.xy / g_fCurrent_Size; + float2 texsize = g_fImageSipos1.zw / g_fCurrent_Size; + float2 texlocal = (In.vTexcoord - texpos) / texsize; + bool inside = all(texlocal >= 0.0f && texlocal <= 1.0f); + float4 tex2 = g_Texture1.Sample(DefaultSampler, In.vTexcoord); + + if (inside) + Color = lerp(Color, tex2, tex2.a); + + Color.a *= Alpha; + Out.vColor = Color; return Out; } @@ -1229,14 +1241,14 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_QuestType(); } - pass UVMult + pass Spell_Anim { SetRasterizerState(RS_Default); SetDepthStencilState(DSS_Default, 0); SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); VertexShader = compile vs_5_0 VS_MAIN(); GeometryShader = NULL; - PixelShader = compile ps_5_0 PS_UVMult(); + PixelShader = compile ps_5_0 PS_Spell_Anim(); } pass NineSlice diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj b/Jusin154_Team3D/Editor/Default/Editor.vcxproj index cfc315435..90acba622 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj @@ -257,7 +257,9 @@ + + @@ -413,7 +415,9 @@ + + diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters index 489c9d9b0..0fa1be799 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters @@ -369,7 +369,7 @@ {c87ea325-8242-4bc4-aec7-b102a5b1c847} - + {8d15e456-f0d7-45b6-b725-7f1a8c0f6b0f} @@ -436,6 +436,12 @@ {99652c97-4011-4d1f-84fb-7e6aa9f6ec1a} + + {4aa98871-8d80-4757-b616-e96f4e840857} + + + {3949bd3b-1686-43e3-822c-d3eabe41653e} + @@ -812,7 +818,7 @@ 02.GameObjects\Layer_Effect\Effect\10.Levioso - + 50.UI\Spell_Canvas\Spell_Panel\Spell_List @@ -852,6 +858,12 @@ 02.GameObjects\Env\03.MapElement\Light + + 50.UI\Spell_Canvas\Spell_Panel\Spell_Anim + + + 50.UI\Spell_Data + @@ -1227,7 +1239,7 @@ 02.GameObjects\Layer_Effect\Effect\10.Levioso - + 50.UI\Spell_Canvas\Spell_Panel\Spell_List @@ -1267,6 +1279,12 @@ 02.GameObjects\Env\03.MapElement\Light + + 50.UI\Spell_Canvas\Spell_Panel\Spell_Anim + + + 50.UI\Spell_Data + diff --git a/Jusin154_Team3D/Editor/Private/Eessential_Spell_Slot.cpp b/Jusin154_Team3D/Editor/Private/Eessential_Spell_Slot.cpp index 923cc1afb..7f376933b 100644 --- a/Jusin154_Team3D/Editor/Private/Eessential_Spell_Slot.cpp +++ b/Jusin154_Team3D/Editor/Private/Eessential_Spell_Slot.cpp @@ -3,18 +3,18 @@ #include "GameInstance.h" CEessential_Spell_Slot::CEessential_Spell_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) - :CElementObject(pDevice, pContext) + :CElementObject(pDevice, pContext) { } CEessential_Spell_Slot::CEessential_Spell_Slot(const CEessential_Spell_Slot& rhs) - :CElementObject(rhs) + :CElementObject(rhs) { } HRESULT CEessential_Spell_Slot::Initialize_Prototype() { - return S_OK; + return S_OK; } HRESULT CEessential_Spell_Slot::Initialize(void* pArg) @@ -44,7 +44,7 @@ HRESULT CEessential_Spell_Slot::Initialize(void* pArg) m_fOffSetY = 80.f; m_iCols = 4; m_pVIBufferCom->Set_Cloned(true); - m_pVIBufferCom->Set_Pos( -731.f, -300.f, m_fOffSetX, m_fOffSetY, m_iCols); + m_pVIBufferCom->Set_Pos(-731.f, -300.f, m_fOffSetX, m_fOffSetY, m_iCols); m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); return S_OK; } @@ -88,8 +88,10 @@ void CEessential_Spell_Slot::Update(_float fTimeDelta) m_fAlpha = 0.f; } } - m_fTime += fTimeDelta * m_fTimeMult; + Hover(); + + m_fTime += fTimeDelta * m_fTimeMult; __super::Update(fTimeDelta); } @@ -165,7 +167,25 @@ void CEessential_Spell_Slot::Hover() fMouse.x -= m_pOwner->Get_WorldPostion().m128_f32[0]; fMouse.y -= m_pOwner->Get_WorldPostion().m128_f32[1]; - m_pVIBufferCom->Set_Mouse_Hover(fMouse); + m_bPrevHover = m_bHover; + m_bHover = (m_iSpellType = m_pVIBufferCom->Set_Mouse_Hover(fMouse)); + if (m_iSpellType != -1) + { + m_bHover = true; + if (m_bHover == true && m_bPrevHover == false) + { + m_iSpellType += ENUM_CLASS(SKILL_TYPE::JAP); + static_cast(m_pOwner)->Set_SkillType(m_iSpellType); + } + } + else + { + m_bHover = false; + if (m_bHover == false && m_bPrevHover == true) + { + static_cast(m_pOwner)->Set_SkillType(m_iSpellType); + } + } } diff --git a/Jusin154_Team3D/Editor/Private/EffectPool.cpp b/Jusin154_Team3D/Editor/Private/EffectPool.cpp index 0e10cb8fc..787968562 100644 --- a/Jusin154_Team3D/Editor/Private/EffectPool.cpp +++ b/Jusin154_Team3D/Editor/Private/EffectPool.cpp @@ -126,7 +126,7 @@ HRESULT CEffectPool::Ready_Effect() ))) return E_FAIL; - if (FAILED(Create_Effect(SKILL_TYPE::BOMBARD, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* { + if (FAILED(Create_Effect(SKILL_TYPE::BOMBARDA, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* { CBombard* pEffect = nullptr; @@ -135,7 +135,7 @@ HRESULT CEffectPool::Ready_Effect() return pEffect;} ))) return E_FAIL; - if (FAILED(Create_Effect(SKILL_TYPE::DECENDO, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* { + if (FAILED(Create_Effect(SKILL_TYPE::DESCENDO, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* { CDecendo* pEffect = nullptr; diff --git a/Jusin154_Team3D/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp index e7df5b4bc..f9d179fa8 100644 --- a/Jusin154_Team3D/Editor/Private/Loader.cpp +++ b/Jusin154_Team3D/Editor/Private/Loader.cpp @@ -77,6 +77,7 @@ #include "Spell_Header.h" #include "Spell_Header_Line.h" #include "Spell_Vidio_Border.h" +#include "Spell_Anim.h" #include "IMGUIUI.h" @@ -503,12 +504,215 @@ HRESULT CLoader::Loading_For_UI() return S_OK; }); - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Item"), CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("../Bin/Resources/Textures/GadgetWheel/Item%d.png"), 8)))) { return E_FAIL; } + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Accio"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Accio\\Accio%d.png"), 151)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Altering_Spell"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Altering_Spell\\Altering_Spell%d.png"), 349)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Alohomora"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Alohomora\\Alohomora%d.png"), 394)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Ancient_Magic"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Ancient_Magic\\Ancient_Magic%d.png"), 152)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Ancient_Magic_Throw"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Ancient_Magic_Throw\\Ancient_Magic_Throw%d.png"), 89)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Arresto_Momentum"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Arresto_Momentum\\Arresto_Momentum%d.png"), 120)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Avada_Kedavra"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Avada_Kedavra\\Avada_Kedavra%d.png"), 208)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Basic_Cast"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Basic_Cast\\Basic_Cast%d.png"), 308)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Beast_Feed"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Beast_Feed\\Beast_Feed%d.png"), 378)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Beast_Petting_Brush"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Beast_Petting_Brush\\Beast_Petting_Brush%d.png"), 327)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Bombarda"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Bombarda\\Bombarda%d.png"), 262)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Confringo"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Confringo\\Confringo%d.png"), 157)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Conjuring_Spell"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Conjuring_Spell\\Conjuring_Spell%d.png"), 115)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Descendo"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Descendo\\Descendo%d.png"), 155)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Depulso"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Depulso\\Depulso%d.png"), 152)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Diffindo"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Diffindo\\Diffindo%d.png"), 150)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Disillusionment"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Disillusionment\\Disillusionment%d.png"), 260)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Evanesco"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Evanesco\\Evanesco%d.png"), 136)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Expelliarmus"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Expelliarmus\\Expelliarmus%d.png"), 146)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Flipendo"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Flipendo\\Flipendo%d.png"), 188)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Glacius"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Glacius\\Glacius%d.png"), 156)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Imperio"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Imperio\\Imperio%d.png"), 462)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Incendio"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Incendio\\Incendio%d.png"), 213)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Levioso"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Levioso\\Levioso%d.png"), 180)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Lumos"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Lumos\\Lumos%d.png"), 365)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Nab_Sack"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Nab_Sack\\Nab_Sack%d.png"), 235)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Petrificus_Totalus"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Petrificus_Totalus\\Petrificus_Totalus%d.png"), 275)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Protego"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Protego\\Protego%d.png"), 285)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Reparo"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Reparo\\Reparo%d.png"), 385)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Revelio"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Revelio\\Revelio%d.png"), 227)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Stupefy"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Stupefy\\Stupefy%d.png"), 222)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Transformation"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Transformation\\Transformation%d.png"), 146)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Wingardium_Leviosa"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Wingardium_Leviosa\\Wingardium_Leviosa%d.png"), 273)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Crucio"), + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Crucio\\Crucio%d.png"), 216)))) + { + return E_FAIL; + } + m_strMessage = TEXT("Model Loading.."); CVIBuffer_UI_Instance::UI_INSTANCE_DESC SpellSlotUIDesc{}; @@ -760,6 +964,10 @@ HRESULT CLoader::Loading_For_UI() { return E_FAIL; } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpell_Anim::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CIMGUIUI::Create(m_pDevice, m_pContext)))) { @@ -777,10 +985,10 @@ HRESULT CLoader::Loading_For_UI() } HRESULT CLoader::Loading_For_Effect() { - + m_strMessage = TEXT("PhysX Meshes Loading.."); { - + // Dumping Box CRigidBody_Dynamic::RIGIDBODY_PROTOTYPE_DYNAMIC_DESC Desc{}; { @@ -858,7 +1066,7 @@ HRESULT CLoader::Loading_For_Effect() return S_OK; - }); + }); Asset_FileLoad("../Bin/Resources/Textures/Effect/Flipbooks", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath) { @@ -873,7 +1081,7 @@ HRESULT CLoader::Loading_For_Effect() return S_OK; - }); + }); Asset_FileLoad("../Bin/Resources/Textures/Effect/Gradients", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath) { @@ -941,15 +1149,15 @@ HRESULT CLoader::Loading_For_Effect() futures.emplace_back(Deferred_ModelLoad( MODEL::NONANIM, "../Bin/Resources/Models/SkyBox/SkyBox.fbx", XMMatrixIdentity(), TEXT("Prototype_Component_SkyboxModel") - )); + )); futures.emplace_back(Deferred_ModelLoad( - MODEL::ANIM, "../Bin/Resources/Models/Human/Npc/Npc.bin", XMMatrixRotationY(XMConvertToRadians(180.f))* XMMatrixIdentity(), + MODEL::ANIM, "../Bin/Resources/Models/Human/Npc/Npc.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), TEXT("Prototype_Component_Npc_Model") )); futures.emplace_back(Deferred_ModelLoad( - MODEL::ANIM, "../Bin/Resources/Models/Object/Wand/Wand.fbx", XMMatrixScaling(0.01f, 0.01f, 0.01f)* XMMatrixIdentity(), + MODEL::ANIM, "../Bin/Resources/Models/Object/Wand/Wand.fbx", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixIdentity(), TEXT("Prototype_Component_Wand_Model") )); @@ -1162,12 +1370,12 @@ HRESULT CLoader::Loading_For_PhysXLevel() PSX::PxTransform pxPivotTransform = PSX::PxTransform(PSX::PxVec3(3.5f, 1.5f, 0.f)); Desc.pxMassCenter = pxPivotTransform; - Desc.eLockFlag = { - PSX::PxRigidDynamicLockFlag::eLOCK_ANGULAR_X | + Desc.eLockFlag = { + PSX::PxRigidDynamicLockFlag::eLOCK_ANGULAR_X | //PSX::PxRigidDynamicLockFlag::eLOCK_ANGULAR_Y | - PSX::PxRigidDynamicLockFlag::eLOCK_ANGULAR_Z | - PSX::PxRigidDynamicLockFlag::eLOCK_LINEAR_Y | - PSX::PxRigidDynamicLockFlag::eLOCK_LINEAR_X | + PSX::PxRigidDynamicLockFlag::eLOCK_ANGULAR_Z | + PSX::PxRigidDynamicLockFlag::eLOCK_LINEAR_Y | + PSX::PxRigidDynamicLockFlag::eLOCK_LINEAR_X | PSX::PxRigidDynamicLockFlag::eLOCK_LINEAR_Z }; Desc.vAutoDamping = { 10.f, 10.f }; @@ -1198,7 +1406,7 @@ HRESULT CLoader::Loading_For_PhysXLevel() } } - { + { if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_CCT_CAPSULE"), CCharacter_Controller::Create(m_pDevice, m_pContext)))) { return E_FAIL; } @@ -1299,13 +1507,13 @@ HRESULT CLoader::Loading_For_PhysXLevel() //if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CDummy_PhysXFixedDoor::Create(m_pDevice, m_pContext)))) { // return E_FAIL; //} - if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CDummy_PhysXPlayable::Create(m_pDevice, m_pContext)))){ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CDummy_PhysXPlayable::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CDummy_PhysXMonster::Create(m_pDevice, m_pContext)))){ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CDummy_PhysXMonster::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CDummy_PhysXMesh::Create(m_pDevice, m_pContext)))){ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CDummy_PhysXMesh::Create(m_pDevice, m_pContext)))) { return E_FAIL; } if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CDummy_PhysXWall::Create(m_pDevice, m_pContext)))) { @@ -1314,10 +1522,10 @@ HRESULT CLoader::Loading_For_PhysXLevel() if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CDummy_PhysXPlatform::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CMapObject_Collision::Create(m_pDevice, m_pContext)))){ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CMapObject_Collision::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CMapObject_LOD::Create(m_pDevice, m_pContext)))){ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CMapObject_LOD::Create(m_pDevice, m_pContext)))) { return E_FAIL; } @@ -1355,22 +1563,22 @@ HRESULT CLoader::Loading_For_Bloom() #pragma endregion if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Desc_Box"), - CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/Box/Box.bin", XMMatrixScaling(10.f, 10.f, 10.f) * XMMatrixIdentity())))){ + CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/Box/Box.bin", XMMatrixScaling(10.f, 10.f, 10.f) * XMMatrixIdentity())))) { return E_FAIL; } if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Model_DummyPlane"), - CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/Effect/DummyPlane/DummyPlane.fbx", XMMatrixTranslation(0.f, -10.f, 0.f) * XMMatrixIdentity())))){ + CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/Effect/DummyPlane/DummyPlane.fbx", XMMatrixTranslation(0.f, -10.f, 0.f) * XMMatrixIdentity())))) { return E_FAIL; } if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Desc_Globe"), // RG DDS NormalMap - CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/Object/DragonGlobe/DragonGlobe.fbx", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixIdentity())))){ + CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/Object/DragonGlobe/DragonGlobe.fbx", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixIdentity())))) { return E_FAIL; } if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Desc_Globe2"), // RGB DDS NormalMap - CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/Object/DragonGlobe2/DragonGlobe.fbx", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixIdentity())))){ + CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/Object/DragonGlobe2/DragonGlobe.fbx", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixIdentity())))) { return E_FAIL; } @@ -1380,23 +1588,23 @@ HRESULT CLoader::Loading_For_Bloom() /* Hog_Props */ if (FAILED(MapFolderLoad("C:\\Users\\kimnuri\\Desktop\\MeshTable\\Game\\Environment\\Hogwarts\\Meshes\\Props", - ".fbx", true, ModelPrototypeTags, ModelPrototypePath))){ + ".fbx", true, ModelPrototypeTags, ModelPrototypePath))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CHair::Create(m_pDevice, m_pContext)))){ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CHair::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CDummy_Globe::Create(m_pDevice, m_pContext)))){ - return E_FAIL; - } - - if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CDummy_Cube::Create(m_pDevice, m_pContext)))){ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CDummy_Globe::Create(m_pDevice, m_pContext)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CDummy_Plane::Create(m_pDevice, m_pContext)))){ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CDummy_Cube::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CDummy_Plane::Create(m_pDevice, m_pContext)))) { return E_FAIL; } @@ -1498,13 +1706,13 @@ HRESULT CLoader::MapFolderLoad(const _char* pDirectoryPath, const _char* pFileEx void APIENTRY Deferred_FolderLoad_Main(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, const _char* pDirectoryPath, const _char* pFileExt, _bool bUseTag, vector** OutContents) { if (FAILED(CoInitializeEx(nullptr, 0))) { - return ; + return; } *OutContents = new vector; for (const auto& file : filesystem::directory_iterator(pDirectoryPath)) { - if (file.is_directory()){ continue; } + if (file.is_directory()) { continue; } if (strcmp(file.path().extension().string().c_str(), pFileExt)) { continue; } FOLDER_LOAD* pContents = new FOLDER_LOAD; @@ -1706,7 +1914,7 @@ HRESULT CLoader::Loading_For_ObjectViewer() #pragma endregion futures.emplace_back(Deferred_ModelLoad( - MODEL::ANIM, "../Bin/Resources/Models/Human/Npc/Npc.bin",XMMatrixRotationY(XMConvertToRadians(180.f))* XMMatrixIdentity(), + MODEL::ANIM, "../Bin/Resources/Models/Human/Npc/Npc.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), TEXT("Prototype_Component_Npc_Model") )); futures.emplace_back(Deferred_ModelLoad( @@ -1714,7 +1922,7 @@ HRESULT CLoader::Loading_For_ObjectViewer() TEXT("Prototype_Component_Wand_Model") )); futures.emplace_back(Deferred_ModelLoad( - MODEL::ANIM, "../Bin/Resources/Models/Object/Broom/Broom.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixRotationY(XMConvertToRadians(180.f))* XMMatrixIdentity(), + MODEL::ANIM, "../Bin/Resources/Models/Object/Broom/Broom.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), TEXT("Prototype_Component_Broom_Model") )); futures.emplace_back(Deferred_ModelLoad( @@ -1884,7 +2092,7 @@ HRESULT CLoader::Loading_For_MapViewer() vector ModelPrototypePath = {}; #pragma region HOGSMEADE - + ///* Terrain*/ //if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Collision\\Terrain", // ".bin", true, ModelPrototypeTags, ModelPrototypePath))) @@ -2068,7 +2276,7 @@ HRESULT CLoader::Loading_For_MapViewer() //if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_J\\Collision", // ".bin", false, ModelPrototypeTags, ModelPrototypePath))) // return E_FAIL; - + /* Light */ if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\LightPosts", ".fbx", true, ModelPrototypeTags, ModelPrototypePath))) @@ -2078,316 +2286,316 @@ HRESULT CLoader::Loading_For_MapViewer() #ifdef gimch -//vector> jobFutures; -// -//_uint iLoadCount = 46; -//vector*> Contents(iLoadCount); + //vector> jobFutures; + // + //_uint iLoadCount = 46; + //vector*> Contents(iLoadCount); + + //{ + // { /* Terrain */ + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Collision\\Terrain", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\Terrain", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // } + // { /* TScrolls */ + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_TScrolls\\Meshes", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_TScrolls\\Collisions", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // } + // { /* 3BroomStick*/ + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_ThreeBroomsticks\\Meshes", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_ThreeBroomsticks\\Collision", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_ThreeBroomsticks\\Meshes\\3Broom_Kit", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // } + // { /* Ollivanders*/ + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Ollivanders\\Meshes", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Ollivanders\\Collision", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // } + // { /* Gatehouse*/ + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Gatehouse\\Meshes", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // } + // { /* BLDG_QuidditchShop */ + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_QuidditchShop\\Meshes", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_QuidditchShop\\Collision", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // } + // { /* BLDG_HogsheadInn */ + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_HogsheadInn\\Meshes", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_HogsheadInn\\Collision", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // } + // { /* BLDG_Honeydukes */ + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Honeydukes\\Meshes", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Honeydukes\\Collision", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // } + // { /* BLDG_OwlPost */ + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_OwlPost\\Meshes", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_OwlPost\\Collision", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // } + // { /* BLDG_TeaShop */ + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_TeaShop\\Meshes", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_TeaShop\\Collision", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // } + // { /* BLDG_Zonkos */ + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Zonkos\\Meshes", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Zonkos\\Collision", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // } + // { /* BLDG_DB_GR */ + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_DB_GR\\Meshes", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_DB_GR\\Collision", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // } + // { /* BLDG_Potions */ + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Potions\\Meshes", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Potions\\Collisions", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // } + // { /* BLDG_Salon */ + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Salon\\Meshes", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Salon\\Collision", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // } + // { /* Hengist_Tree */ + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\Vegetation\\Hengist_Tree", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Collision\\Vegetation", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // } + // { /* GEN A*/ + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_A\\Meshes", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_A\\Collision", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // } + // { /* GEN B*/ + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_B\\Meshes", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_B\\Collision", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // } + // { /* GEN C*/ + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_C\\Meshes", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_C\\Collision", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // } + // { /* GEN E*/ + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_E\\Meshes", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_E\\Collision", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // } + // { /* GEN F*/ + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_F\\Meshes", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_F\\Collision", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // } + // { /* GEN G*/ + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_G\\Meshes", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_G\\Collision", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // } + // { /* GEN H*/ + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_H\\Meshes", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_H\\Collision", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // } + // { /* GEN J*/ + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_J\\Meshes", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // jobFutures.emplace_back(Deferred_FolderLoad( + // "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_J\\Collision", + // ".bin", false, + // &Contents[jobFutures.size()] + // )); + // } + //} + // + // for (auto& jobFuture : jobFutures) + // { + // jobFuture.get(); + // } + // + // for (_uint i = 0; i < Contents.size(); ++i) { + // for (_uint j = 0; j < (Contents[i])->size(); ++j) { + // FOLDER_LOAD* pContents = (*Contents[i])[j]; + // if (true == pContents->bLoadTags) { + // ModelPrototypeTags.push_back(pContents->pModelTag); + // ModelPrototypePath.push_back(pContents->pathModel); + // } + // + // if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, pContents->pModelTag, pContents->pLoadedModel))) { + // return E_FAIL; + // } + // + // for (_uint k = 0; k < pContents->pRigidBodyTags.size(); ++k) { + // if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, pContents->pRigidBodyTags[k], pContents->LoadedRigidBody[k]))) { + // return E_FAIL; + // } + // } + // + // } + // } -//{ -// { /* Terrain */ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Collision\\Terrain", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\Terrain", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// { /* TScrolls */ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_TScrolls\\Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_TScrolls\\Collisions", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// { /* 3BroomStick*/ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_ThreeBroomsticks\\Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_ThreeBroomsticks\\Collision", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_ThreeBroomsticks\\Meshes\\3Broom_Kit", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// { /* Ollivanders*/ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Ollivanders\\Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Ollivanders\\Collision", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// { /* Gatehouse*/ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Gatehouse\\Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// { /* BLDG_QuidditchShop */ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_QuidditchShop\\Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_QuidditchShop\\Collision", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// { /* BLDG_HogsheadInn */ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_HogsheadInn\\Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_HogsheadInn\\Collision", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// { /* BLDG_Honeydukes */ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Honeydukes\\Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Honeydukes\\Collision", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// { /* BLDG_OwlPost */ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_OwlPost\\Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_OwlPost\\Collision", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// { /* BLDG_TeaShop */ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_TeaShop\\Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_TeaShop\\Collision", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// { /* BLDG_Zonkos */ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Zonkos\\Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Zonkos\\Collision", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// { /* BLDG_DB_GR */ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_DB_GR\\Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_DB_GR\\Collision", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// { /* BLDG_Potions */ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Potions\\Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Potions\\Collisions", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// { /* BLDG_Salon */ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Salon\\Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Salon\\Collision", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// { /* Hengist_Tree */ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\Vegetation\\Hengist_Tree", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Collision\\Vegetation", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// { /* GEN A*/ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_A\\Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_A\\Collision", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// { /* GEN B*/ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_B\\Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_B\\Collision", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// { /* GEN C*/ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_C\\Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_C\\Collision", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// { /* GEN E*/ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_E\\Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_E\\Collision", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// { /* GEN F*/ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_F\\Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_F\\Collision", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// { /* GEN G*/ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_G\\Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_G\\Collision", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// { /* GEN H*/ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_H\\Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_H\\Collision", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// { /* GEN J*/ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_J\\Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_J\\Collision", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -//} -// -// for (auto& jobFuture : jobFutures) -// { -// jobFuture.get(); -// } -// -// for (_uint i = 0; i < Contents.size(); ++i) { -// for (_uint j = 0; j < (Contents[i])->size(); ++j) { -// FOLDER_LOAD* pContents = (*Contents[i])[j]; -// if (true == pContents->bLoadTags) { -// ModelPrototypeTags.push_back(pContents->pModelTag); -// ModelPrototypePath.push_back(pContents->pathModel); -// } -// -// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, pContents->pModelTag, pContents->pLoadedModel))) { -// return E_FAIL; -// } -// -// for (_uint k = 0; k < pContents->pRigidBodyTags.size(); ++k) { -// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, pContents->pRigidBodyTags[k], pContents->LoadedRigidBody[k]))) { -// return E_FAIL; -// } -// } -// -// } -// } - m_strMessage = TEXT("쉐이더를(을) 로딩 중 입니다."); if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, FX_INSTANCE_PROP_MODEL, @@ -2415,7 +2623,7 @@ HRESULT CLoader::Loading_For_MapViewer() CVIBuffer_Terrain::Create(m_pDevice, m_pContext, "../Bin/Resources/Data/Map/T_LandscapeStreamingProxy_0_LOD1_D.png")))) return E_FAIL; - + CVIBuffer_Model_Instance::INSTANCE_DESC InstanceDesc = {}; InstanceDesc.iNum = 200; diff --git a/Jusin154_Team3D/Editor/Private/Player_States.cpp b/Jusin154_Team3D/Editor/Private/Player_States.cpp index 1c3ace254..e314d77f8 100644 --- a/Jusin154_Team3D/Editor/Private/Player_States.cpp +++ b/Jusin154_Team3D/Editor/Private/Player_States.cpp @@ -549,7 +549,7 @@ HRESULT CPlayer::Behavior_CombatExitCheck() case STATEANIM::ACCIO: pairAnimInfo = m_Animation[STATEANIM::ACCIO]; - m_pEffectPool->Use_Skill(SKILL_TYPE::BOMBARD, this); + m_pEffectPool->Use_Skill(SKILL_TYPE::BOMBARDA, this); break; @@ -557,7 +557,7 @@ HRESULT CPlayer::Behavior_CombatExitCheck() { pairAnimInfo = m_Animation[STATEANIM::DESCENDO]; - m_pEffectPool->Use_Skill(SKILL_TYPE::DECENDO, this); + m_pEffectPool->Use_Skill(SKILL_TYPE::DESCENDO, this); } break; default: diff --git a/Jusin154_Team3D/Editor/Private/Spell_Anim.cpp b/Jusin154_Team3D/Editor/Private/Spell_Anim.cpp new file mode 100644 index 000000000..8ffec41f8 --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/Spell_Anim.cpp @@ -0,0 +1,241 @@ +#include "pch.h" +#include "Spell_Anim.h" +#include "GameInstance.h" + +CSpell_Anim::CSpell_Anim(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CSpell_Anim::CSpell_Anim(const CSpell_Anim& rhs) + :CElementObject(rhs) +{ +} + +HRESULT CSpell_Anim::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CSpell_Anim::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 0.f; + Desc.fY = 0.f; + Desc.fSizeX = 470.f; + Desc.fSizeY = 250.f; + + m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) }; + + if (FAILED(__super::Initialize(&Desc))) + { + return E_FAIL; + } + if (FAILED(Ready_Components(pArg))) + { + return E_FAIL; + } + + m_fTimeMult = 3.f; + m_fAlpha = 1.f; + m_fAlphaTime = 3.f; + m_fSortZ = 0.01f; + m_iTotalFrames = 216; + m_fFrameTime = 0.1f; + m_iCurrentFrame = 0; + m_bAnim_Start = false; + return S_OK; +} + +void CSpell_Anim::Priority_Update(_float fTimeDelta) +{ + __super::Priority_Update(fTimeDelta); +} + +void CSpell_Anim::Update(_float fTimeDelta) +{ + if (m_bFadeIn == true) + { + if (m_fAlpha <= 1.f) + m_fAlpha += fTimeDelta * m_fAlphaTime; + + if (m_fAlpha >= 1.f) + { + m_bFadeIn = false; + m_fAlpha = 1.f; + } + } + + if (m_bFadeOut == true) + { + if (m_fAlpha >= 0.f) + m_fAlpha -= fTimeDelta; + + if (m_fAlpha <= 0.f) + { + m_bFadeOut = false; + m_fAlpha = 0.f; + } + } + + if (m_pGameInstance->Key_Down(DIK_9)) + { + m_bAnim_Start = !m_bAnim_Start; + } + if (m_bAnim_Start) + { + m_fTime += fTimeDelta * m_fTimeMult; + } + else + m_iCurrentFrame = 0; + + if (m_fTime >= m_fFrameTime) + { + m_iCurrentFrame++; + m_fTime -= m_fFrameTime; + + if (m_iCurrentFrame >= m_iTotalFrames) + m_iCurrentFrame = 0; + } + + __super::Update(fTimeDelta); +} + +void CSpell_Anim::Late_Update(_float fTimeDelta) +{ + if (m_bVisible) { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + } + __super::Late_Update(fTimeDelta); +} + +HRESULT CSpell_Anim::Render() +{ + if (FAILED(Bind_ShaderResources())) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ALPHABLEND)))) + { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) + { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) + { + return E_FAIL; + } + + return S_OK; +} + +_vector CSpell_Anim::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +void CSpell_Anim::Anim_Start(_uint iSpell_Id) +{ +} + +void CSpell_Anim::Anim_End() +{ +} + +HRESULT CSpell_Anim::Bind_ShaderResources() +{ + if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", m_iCurrentFrame))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float)))) + { + return E_FAIL; + } + return S_OK; +} + +HRESULT CSpell_Anim::Ready_Components(void* pArg) +{ + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Crucio"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + + return S_OK; +} + + +CSpell_Anim* CSpell_Anim::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CSpell_Anim* pInstance = new CSpell_Anim(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CSpell_Anim"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CSpell_Anim::Clone(void* pArg, CGameObject* pOwner) +{ + CSpell_Anim* pInstance = new CSpell_Anim(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CSpell_Anim"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CSpell_Anim::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +void CSpell_Anim::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Editor/Private/Spell_Canvas.cpp b/Jusin154_Team3D/Editor/Private/Spell_Canvas.cpp index 13d0525bd..e711775e1 100644 --- a/Jusin154_Team3D/Editor/Private/Spell_Canvas.cpp +++ b/Jusin154_Team3D/Editor/Private/Spell_Canvas.cpp @@ -39,7 +39,6 @@ HRESULT CSpell_Canvas::Initialize(void* pArg) { return E_FAIL; } - return S_OK; } @@ -132,9 +131,7 @@ void CSpell_Canvas::Free() SAFE_RELEASE(m_pVIBufferCom); } -#ifdef _DEBUG void CSpell_Canvas::Describe_Entity() { } -#endif // _DEBUG diff --git a/Jusin154_Team3D/Editor/Private/Spell_Data.cpp b/Jusin154_Team3D/Editor/Private/Spell_Data.cpp new file mode 100644 index 000000000..decc62317 --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/Spell_Data.cpp @@ -0,0 +1,91 @@ +#include "pch.h" +#include "Spell_Data.h" +#include "GameObject.h" + +CSpell_Data::CSpell_Data(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CGameObject(pDevice, pContext) +{ +} + +CSpell_Data::CSpell_Data(const CSpell_Data& rhs) + :CGameObject(rhs) +{ +} + +HRESULT CSpell_Data::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CSpell_Data::Initialize(void* pArg) +{ + return S_OK; +} + +void CSpell_Data::Priority_Update(_float fTimeDelta) +{ +} + +void CSpell_Data::Update(_float fTimeDelta) +{ +} + +void CSpell_Data::Late_Update(_float fTimeDelta) +{ +} + +HRESULT CSpell_Data::Render() +{ + return S_OK; +} + +_vector CSpell_Data::Get_WorldPostion() +{ + return _vector(); +} + +HRESULT CSpell_Data::Bind_ShaderResources() +{ + return S_OK; +} + +HRESULT CSpell_Data::Ready_Components(void* pArg) +{ + return S_OK; +} + +CSpell_Data* CSpell_Data::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CSpell_Data* pInstance = new CSpell_Data(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CSpell_Data"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CSpell_Data::Clone(void* pArg, CGameObject* pOwner) +{ + CSpell_Data* pInstance = new CSpell_Data(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CSpell_Data"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CSpell_Data::Free() +{ + __super::Free(); + +} + +void CSpell_Data::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Editor/Private/Spell_List.cpp b/Jusin154_Team3D/Editor/Private/Spell_List.cpp index 2f93ffc37..57eaeca74 100644 --- a/Jusin154_Team3D/Editor/Private/Spell_List.cpp +++ b/Jusin154_Team3D/Editor/Private/Spell_List.cpp @@ -3,18 +3,18 @@ #include "GameInstance.h" CSpell_List::CSpell_List(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) - :CElementObject(pDevice, pContext) + :CElementObject(pDevice, pContext) { } CSpell_List::CSpell_List(const CSpell_List& rhs) - :CElementObject(rhs) + :CElementObject(rhs) { } HRESULT CSpell_List::Initialize_Prototype() { - return S_OK; + return S_OK; } HRESULT CSpell_List::Initialize(void* pArg) @@ -178,7 +178,24 @@ void CSpell_List::Hover() fMouse.x -= m_pOwner->Get_WorldPostion().m128_f32[0]; fMouse.y -= m_pOwner->Get_WorldPostion().m128_f32[1]; - m_pVIBufferCom->Set_Mouse_Hover(fMouse); + m_bPrevHover = m_bHover; + m_bHover = (m_iSpellType = m_pVIBufferCom->Set_Mouse_Hover(fMouse)); + if (m_iSpellType != -1) + { + m_bHover = true; + if (m_bHover == true && m_bPrevHover == false) + { + static_cast(m_pOwner)->Set_SkillType(m_iSpellType); + } + } + else + { + m_bHover = false; + if (m_bHover == false && m_bPrevHover == true) + { + static_cast(m_pOwner)->Set_SkillType(m_iSpellType); + } + } } diff --git a/Jusin154_Team3D/Editor/Private/Spell_Panel.cpp b/Jusin154_Team3D/Editor/Private/Spell_Panel.cpp index 7a9613978..5825737f7 100644 --- a/Jusin154_Team3D/Editor/Private/Spell_Panel.cpp +++ b/Jusin154_Team3D/Editor/Private/Spell_Panel.cpp @@ -49,6 +49,7 @@ HRESULT CSpell_Panel::Initialize(void* pArg) return E_FAIL; } m_fCanvasAlpha = 1.f; + m_fSortZ = 0.04f; return S_OK; } diff --git a/Jusin154_Team3D/Editor/Private/Spell_Preview.cpp b/Jusin154_Team3D/Editor/Private/Spell_Preview.cpp index 3d187563a..782652f26 100644 --- a/Jusin154_Team3D/Editor/Private/Spell_Preview.cpp +++ b/Jusin154_Team3D/Editor/Private/Spell_Preview.cpp @@ -47,6 +47,7 @@ HRESULT CSpell_Preview::Initialize(void* pArg) SizeUpX(512.f); SizeUpY(270.f); m_iSpellType = ENUM_CLASS(SPELLTYPE::CONTROL); + m_fSortZ = 0.02f; return S_OK; } diff --git a/Jusin154_Team3D/Editor/Private/Spell_Vidio_Border.cpp b/Jusin154_Team3D/Editor/Private/Spell_Vidio_Border.cpp index 094e65afd..b5f0d702b 100644 --- a/Jusin154_Team3D/Editor/Private/Spell_Vidio_Border.cpp +++ b/Jusin154_Team3D/Editor/Private/Spell_Vidio_Border.cpp @@ -1,6 +1,7 @@ #include "pch.h" #include "Spell_Vidio_Border.h" #include "GameInstance.h" +#include "Spell_Anim.h" CSpell_Vidio_Border::CSpell_Vidio_Border(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) :CElementObject(pDevice, pContext) @@ -87,6 +88,7 @@ void CSpell_Vidio_Border::Update(_float fTimeDelta) } m_fTime += fTimeDelta * m_fTimeMult; + __super::Update(fTimeDelta); } @@ -185,7 +187,10 @@ HRESULT CSpell_Vidio_Border::Ready_Components(void* pArg) { return E_FAIL; } - + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Anim)))) + { + return E_FAIL; + } return S_OK; } diff --git a/Jusin154_Team3D/Editor/Public/Editor_Define.h b/Jusin154_Team3D/Editor/Public/Editor_Define.h index c598c6618..809fed838 100644 --- a/Jusin154_Team3D/Editor/Public/Editor_Define.h +++ b/Jusin154_Team3D/Editor/Public/Editor_Define.h @@ -28,13 +28,22 @@ namespace Editor enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, TRAIL_BLUR , TRAIL_BLOOM, END }; enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, BLEND, BLEND_NOWORLD, BLOOM, BLOOM_NOWORLD, END }; - enum class SHADER_PASS_UIEDITOR { DEFAULT, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, UVMULT, NINECLICE, ROTATION, SLOT, TYPE, HPBAR, MAGIC_METER, MAGIC_ICON, REMOVEUV, REVELIO, POTION, MAGIC_ITEM, SPELL_PREVIEW, SPELL_HEADER, SPELL_HEADER_LINE, END }; + enum class SHADER_PASS_UIEDITOR { DEFAULT, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, SPELL_ANIM, NINECLICE, ROTATION, SLOT, TYPE, HPBAR, MAGIC_METER, MAGIC_ICON, REMOVEUV, REVELIO, POTION, MAGIC_ITEM, SPELL_PREVIEW, SPELL_HEADER, SPELL_HEADER_LINE, END }; enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, MAGIC_METER, SPELL_LIST, EESSENTIAL_SPELL_SOLT, EESSENTIAL_SPELL, COLOR, SPELL_HOVER, SPELL_SLOT_EFFECT, END }; enum class EFFECT_TYPE { EFFECT, TRAIL, END }; - enum class SKILL_TYPE{ JAP , BOMBARD , DECENDO , PROTEGO , REVELIO , LEVIOSO ,END }; + enum class SKILL_TYPE{ ARESTO_MOMENTUM, GLACIUS, LEVIOSO, TRANSFORM, // 노란색 + ASSIO, DEPULSO, DESCENDO, FLIPENDO, // 보라색 + CONFRINGO, DIFFINDO, EXPELLIARMUS, BOMBARDA, INCENDIO, // 빨간색 + DISILLUSIONMENT, LUMOS, REPARO, WINGARDIUM_LEVIOSA, // 하늘색 + CONJURING_SPELL, ALTERING_SPELL, EVANESCO, // 연녹색 + AVADA_KEDAVRA, CRUCIO, IMPERIO, // 진녹색 + BEAST_PETTING_BRUSH, BEAST_FEED, NAB_SACK, // 하늘색 + JAP , REVELIO, PROTEGO, STUPEFY, // 검은색 + ANCIENT_MAGIC_THROW, ANCIENT_MAGIC, ALOHOMORA, PETRIFICUS_TOTALUS, END }; + enum class BLOOM_TYPE { NONE , BASIC , MULTIPLY , END}; } diff --git a/Jusin154_Team3D/Editor/Public/Eessential_Spell_Slot.h b/Jusin154_Team3D/Editor/Public/Eessential_Spell_Slot.h index 7aadab096..6c0619e09 100644 --- a/Jusin154_Team3D/Editor/Public/Eessential_Spell_Slot.h +++ b/Jusin154_Team3D/Editor/Public/Eessential_Spell_Slot.h @@ -43,6 +43,8 @@ class CEessential_Spell_Slot final : public CElementObject _float m_fOffSetY{}; _uint m_iCols{}; + _bool m_bHover = { false }; + _bool m_bPrevHover = { false }; public: static CEessential_Spell_Slot* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Editor/Public/Spell_Anim.h b/Jusin154_Team3D/Editor/Public/Spell_Anim.h new file mode 100644 index 000000000..678f2b36a --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/Spell_Anim.h @@ -0,0 +1,51 @@ +#pragma once + +#include "Editor_Define.h" +#include "ElementObject.h" + +NS_BEGIN(Editor) + +class CSpell_Anim final : public CElementObject +{ +private: + CSpell_Anim(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CSpell_Anim(const CSpell_Anim& rhs); + virtual ~CSpell_Anim() = default; + +public: + virtual void Priority_Update(_float fTimeDelta); + virtual void Update(_float fTimeDelta); + virtual void Late_Update(_float fTimeDelta); + virtual HRESULT Render() override; + virtual _vector Get_WorldPostion() override; + +public: + void Anim_Start(_uint iSpell_Id); + void Anim_End(); + +private: + virtual HRESULT Bind_ShaderResources() override; + virtual HRESULT Ready_Components(void* pArg) override; + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + +private: + CTexture* m_pDiffuse_TextureCom = { nullptr }; + CTexture* m_pDesendo_TextureCom = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + + _int m_iTotalFrames{}; // 전체 프레임 수 + _float m_fFrameTime{}; // 한 프레임당 시간(초) + _int m_iCurrentFrame{}; // 현재 보여줄 프레임 + + _uint m_iSpell_Index{}; + _bool m_bAnim_Start = { false }; +public: + static CSpell_Anim* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; + void Describe_Entity() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Editor/Public/Spell_Data.h b/Jusin154_Team3D/Editor/Public/Spell_Data.h new file mode 100644 index 000000000..86c6f33f6 --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/Spell_Data.h @@ -0,0 +1,41 @@ +#pragma once + +#include "Editor_Define.h" +#include "GameObject.h" + +NS_BEGIN(Engine) +class CGameObject; +NS_END + +NS_BEGIN(Editor) + +class CSpell_Data final : public CGameObject +{ + CSpell_Data(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CSpell_Data(const CSpell_Data& rhs); + virtual ~CSpell_Data() = default; + +public: + virtual void Priority_Update(_float fTimeDelta); + virtual void Update(_float fTimeDelta); + virtual void Late_Update(_float fTimeDelta); + virtual HRESULT Render() override; + virtual _vector Get_WorldPostion() override; + +private: + virtual HRESULT Bind_ShaderResources() override; + virtual HRESULT Ready_Components(void* pArg) override; + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + +private: + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + CGameObject* m_pSpell_Panel = { nullptr }; +public: + static CSpell_Data* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; + void Describe_Entity() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Editor/Public/Spell_List.h b/Jusin154_Team3D/Editor/Public/Spell_List.h index e4a085e4b..7e81f303a 100644 --- a/Jusin154_Team3D/Editor/Public/Spell_List.h +++ b/Jusin154_Team3D/Editor/Public/Spell_List.h @@ -47,6 +47,9 @@ class CSpell_List final : public CElementObject _float m_fOffSetY{}; _uint m_iCols{}; + _bool m_bHover = { false }; + _bool m_bPrevHover = { false }; + public: static CSpell_List* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Editor/Public/Spell_Panel.h b/Jusin154_Team3D/Editor/Public/Spell_Panel.h index fc3e3dcc6..8fa70c623 100644 --- a/Jusin154_Team3D/Editor/Public/Spell_Panel.h +++ b/Jusin154_Team3D/Editor/Public/Spell_Panel.h @@ -23,6 +23,11 @@ class CSpell_Panel final : public CPanelObject virtual HRESULT Render() override; virtual _vector Get_WorldPostion() override; +public: + void SlotHoverOn(); + void SlotHoverOff(); + void SlotHover(); + private: virtual HRESULT Bind_ShaderResources() override; virtual HRESULT Ready_Components(void* pArg) override; @@ -46,6 +51,8 @@ class CSpell_Panel final : public CPanelObject CGameObject* m_pSpell_Preview = { nullptr }; CGameObject* m_pSpell_Vidio_Border = { nullptr }; + _uint m_iSlotHover_Index{}; + public: static CSpell_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Editor/Public/Spell_Vidio_Border.h b/Jusin154_Team3D/Editor/Public/Spell_Vidio_Border.h index d447cc059..3263a8c70 100644 --- a/Jusin154_Team3D/Editor/Public/Spell_Vidio_Border.h +++ b/Jusin154_Team3D/Editor/Public/Spell_Vidio_Border.h @@ -27,9 +27,12 @@ class CSpell_Vidio_Border final : public CElementObject private: CTexture* m_pDiffuse_TextureCom = { nullptr }; + CTexture* m_pDesendo_TextureCom = { nullptr }; CShader* m_pShaderCom = { nullptr }; CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + CGameObject* m_pSpell_Anim = { nullptr }; + public: static CSpell_Vidio_Border* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Engine/Private/Renderer.cpp b/Jusin154_Team3D/Engine/Private/Renderer.cpp index 72f5ad2b5..70e8b59e1 100644 --- a/Jusin154_Team3D/Engine/Private/Renderer.cpp +++ b/Jusin154_Team3D/Engine/Private/Renderer.cpp @@ -12,12 +12,12 @@ CRenderer::CRenderer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) { SAFE_ADDREF(m_pDevice); SAFE_ADDREF(m_pContext); - SAFE_ADDREF(m_pGameInstance); + SAFE_ADDREF(m_pGameInstance); } HRESULT CRenderer::Add_RenderGroup(RENDER eRenderGroup, CGameObject* pRenderObject) { - if (nullptr == pRenderObject || pRenderObject->isDead()){ + if (nullptr == pRenderObject || pRenderObject->isDead()) { return E_FAIL; } @@ -78,7 +78,7 @@ void CRenderer::Render() Describe_Entitiy(); m_pGameInstance->RenderTarget_Debuger(); - if(m_pGameInstance->Key_Pressing(DIK_F10)){ + if (m_pGameInstance->Key_Pressing(DIK_F10)) { Render_Debug(); } #endif @@ -232,7 +232,7 @@ void CRenderer::Render_Combined() if (FAILED(m_pGameInstance->Begin_MRT(TEXT("MRT_Combined")))) { return; } - { + { // Bind_Resorces m_pShader->Bind_Matrix("g_WorldMatrix", &m_WorldMatrix); @@ -321,7 +321,7 @@ void CRenderer::Render_EnvironmentPostProcess() } m_pShader->Bind_Matrix("g_WorldMatrix", &m_WorldMatrix); - m_pShader->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix); + m_pShader->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix); m_pShader->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix); m_pShader->Bind_Matrix("g_invMatView", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW_INV)); m_pShader->Bind_Matrix("g_invmatProj", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ_INV)); @@ -473,7 +473,7 @@ void CRenderer::Render_Blur() if (nullptr != pRenderObject) if (FAILED(pRenderObject->Render_Blur())) { assert(false); - } + } SAFE_RELEASE(pRenderObject); } @@ -495,11 +495,11 @@ void CRenderer::Render_Blur() if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Blur"), m_pShader, "g_BlurTexture"))) { return; } - + if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Blur_Weight"), m_pShader, "g_BlurWeightTexture"))) { return; } - + m_pShader->Begin(ENUM_CLASS(SHADER_PASS_DEFERRED::BLUR)); m_pVIBuffer->Bind_Resources(); @@ -615,6 +615,7 @@ void CRenderer::Render_Bloom() void CRenderer::Render_UI() { + m_RenderObjects[ENUM_CLASS(RENDER::UI)].sort([](CGameObject* pDest, CGameObject* pSrc)->_bool { _float3 vDstPos = {}; _float3 vSrcPos = {}; @@ -624,6 +625,8 @@ void CRenderer::Render_UI() return vDstPos.z > vSrcPos.z; }); // z 소팅 + + for (auto& pRenderObject : m_RenderObjects[ENUM_CLASS(RENDER::UI)]) { if (nullptr != pRenderObject) { @@ -875,7 +878,7 @@ HRESULT CRenderer::Initialize() return E_FAIL; } - + if (FAILED(Ready_ShadowDepthStencilView(g_iMaxShadowWidth, g_iMaxShadowHeight))) { return E_FAIL; } @@ -982,7 +985,7 @@ HRESULT CRenderer::Initialize() } m_pWeightBlendShader = (CShader*)m_pGameInstance->Clone_Asset_Prototype(g_iStaticLevel, FX_WEIGHTBELND, nullptr, nullptr); - + if (nullptr == m_pWeightBlendShader) { return E_FAIL; } @@ -1073,11 +1076,11 @@ void CRenderer::Describe_Entitiy() GUI::DragFloat("Max Radius", &m_fDOF_ENV_AmountRadius, 0.1f, 0.0f, 10.0f, "%.2f"); - if (m_fDOF_ENV_StartDistance < m_fDOF_ENV_FocusDistance){ + if (m_fDOF_ENV_StartDistance < m_fDOF_ENV_FocusDistance) { m_fDOF_ENV_StartDistance = m_fDOF_ENV_FocusDistance; } - if (m_fDOF_ENV_MaxEnd < m_fDOF_ENV_StartDistance + 1.0f){ + if (m_fDOF_ENV_MaxEnd < m_fDOF_ENV_StartDistance + 1.0f) { m_fDOF_ENV_MaxEnd = m_fDOF_ENV_StartDistance + 1.0f; } diff --git a/Jusin154_Team3D/Engine/Private/VIBuffer_UI_Instance.cpp b/Jusin154_Team3D/Engine/Private/VIBuffer_UI_Instance.cpp index 357a5a182..46981233b 100644 --- a/Jusin154_Team3D/Engine/Private/VIBuffer_UI_Instance.cpp +++ b/Jusin154_Team3D/Engine/Private/VIBuffer_UI_Instance.cpp @@ -265,7 +265,7 @@ void CVIBuffer_UI_Instance::Set_Index_Renge_Color(_uint StartIndex, _uint EndInd m_pContext->Unmap(m_pVBInstance, 0); } -_uint CVIBuffer_UI_Instance::Set_Mouse_Hover(_float2 fMousePos) +_int CVIBuffer_UI_Instance::Set_Mouse_Hover(_float2 fMousePos) { D3D11_MAPPED_SUBRESOURCE SubResource{}; @@ -273,7 +273,7 @@ _uint CVIBuffer_UI_Instance::Set_Mouse_Hover(_float2 fMousePos) VTX_INSTANCE_UI* pVertices = static_cast(SubResource.pData); - _uint hoveredIndex = (_uint)-1; + _int hoveredIndex = -1; for (_uint i = 0; i < m_iNumInstance; i++) { _float2 pos = pVertices[i].fPos; @@ -292,11 +292,13 @@ _uint CVIBuffer_UI_Instance::Set_Mouse_Hover(_float2 fMousePos) if (PtInRect(&rcInstance, pt)) { pVertices[i].bHover = 1.f; - hoveredIndex = i; // ✅ 인덱스 저장 + hoveredIndex = i; + break; } else { pVertices[i].bHover = 0.f; + hoveredIndex = -1; } } diff --git a/Jusin154_Team3D/Engine/Public/VIBuffer_UI_Instance.h b/Jusin154_Team3D/Engine/Public/VIBuffer_UI_Instance.h index 2ad90c4aa..75278c14b 100644 --- a/Jusin154_Team3D/Engine/Public/VIBuffer_UI_Instance.h +++ b/Jusin154_Team3D/Engine/Public/VIBuffer_UI_Instance.h @@ -33,7 +33,7 @@ class ENGINE_DLL CVIBuffer_UI_Instance final : public CVIBuffer_Instance void Set_Cloned(_bool isCloned) { m_isCloned = isCloned; } void Set_ImageUV(UI_ATLAS_DESC* AtlasUV); void Set_Index_Renge_Color(_uint StartIndex, _uint EndIndex, _float4 vColor); - _uint Set_Mouse_Hover(_float2 fMousePos); + _int Set_Mouse_Hover(_float2 fMousePos); private: VTX_INSTANCE_UI* m_pInstanceVertices = { nullptr };