[add] MapData Load and Save

[add] MapContainerObject
[add] MapPartObject NonLod and Lod
This commit is contained in:
JinhoBa
2025-11-11 22:29:55 +09:00
parent 6036b1fe4e
commit a83842ed92
21 changed files with 1579 additions and 205 deletions
@@ -0,0 +1,311 @@
<?xml version="1.0" encoding="UTF-8"?>
<Land>
<Container Name="3Broom_Ext">
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
<PartObject Lod_Level="3">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Ext_Awning_Trim</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Ext_Awning_Trim_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Ext_Awning_Trim_Lod2</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Ext_Awning_Trim_Lod3</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="3">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_barrels</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_barrels_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_barrels_Lod2</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_barrels_Lod3</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="1">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_barrels_sign</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_barrels_sign_Lod1</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="2">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_barrel_stands</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_barrel_stands_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_barrel_stands_Lod2</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="3">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_chimneys_B</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_chimneys_B_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_chimneys_B_Lod2</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_chimneys_B_Lod3</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="2">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_decals</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_decals_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_decals_Lod2</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="1">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_Decals_A</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_Decals_A_Lod1</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="2">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Ext_DoorFrameSide</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Ext_DoorFrameSide_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Ext_DoorFrameSide_Lod2</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="0">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_Dormer_Wood_Slats</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="2">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_roof</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_roof_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_roof_Lod2</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="2">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_roof_copper_tops</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_roof_copper_tops_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_roof_copper_tops_Lod2</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="1">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_roof_decals</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_roof_decals_Lod1</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="2">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_side_garden_box</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_side_garden_box_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_side_garden_box_Lod2</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="3">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_trim</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_trim_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_trim_Lod2</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_trim_Lod3</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="3">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_trim_stone</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_trim_stone_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_trim_stone_Lod2</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_trim_stone_Lod3</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="2">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_walls</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_walls_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_walls_Lod2</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="1">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_wood_Corbels</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_wood_Corbels_Lod1</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="3">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_fireplace</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_fireplace_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_fireplace_Lod2</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_fireplace_Lod3</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="2">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Door_L</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Door_L_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Door_L_Lod2</PrototypeTag>
<Position x="-1.05" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="2">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Door_R</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Door_R_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Door_R_Lod2</PrototypeTag>
<Position x="1.05" y="0" z="0"/>
<Scale x="0.99999952" y="1" z="0.99999952"/>
<Rotation x="-0" y="180" z="-0"/>
</PartObject>
<PartObject Lod_Level="2">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_DoorFrame</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_DoorFrame_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_DoorFrame_Lod2</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="1">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Window_Glass</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Window_Glass_Lod1</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="3">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Roof_Debris_A</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Roof_Debris_A_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Roof_Debris_A_Lod2</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Roof_Debris_A_Lod3</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="3">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Roof_Debris_B</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Roof_Debris_B_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Roof_Debris_B_Lod2</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Roof_Debris_B_Lod3</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
</Container>
<Container Name="3Broom_Int">
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
<PartObject Lod_Level="2">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_Bar</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_Bar_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_Bar_Lod2</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="2">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_floors</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_floors_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_floors_Lod2</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="1">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_stairs_A</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_stairs_A_Lod1</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="2">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_stairs_B</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_stairs_B_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_stairs_B_Lod2</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="1">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_stairs_D</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_stairs_D_Lod1</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="2">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_Stairs_Upper_Floors</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_Stairs_Upper_Floors_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_Stairs_Upper_Floors_Lod2</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="3">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_walls</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_walls_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_walls_Lod2</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_walls_Lod3</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="1">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_windows</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_windows_Lod1</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="3">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_A</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_A_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_A_Lod2</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_A_Lod3</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="3">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_B</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_B_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_B_Lod2</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_B_Lod3</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="3">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_C</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_C_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_C_Lod2</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_C_Lod3</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="2">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_Stairs</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_Stairs_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_Stairs_Lod2</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="2">
<PrototypeTag>Prototype_GameObject_SM_Broom_01</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_Broom_01_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_Broom_01_Lod2</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
</Container>
</Land>
@@ -0,0 +1,320 @@
<?xml version="1.0" encoding="UTF-8"?>
<Land>
<Container Name="3Broom_Ext">
<Position x="44.396912" y="-9.5367432e-07" z="30.934399"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
<PartObject Lod_Level="2">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Ext_DoorFrameSide</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Ext_DoorFrameSide_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Ext_DoorFrameSide_Lod2</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="3">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Ext_Awning_Trim</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Ext_Awning_Trim_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Ext_Awning_Trim_Lod2</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Ext_Awning_Trim_Lod3</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="2">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_decals</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_decals_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_decals_Lod2</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="3">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_chimneys_B</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_chimneys_B_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_chimneys_B_Lod2</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_chimneys_B_Lod3</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="3">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_barrels</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_barrels_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_barrels_Lod2</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_barrels_Lod3</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="2">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_barrel_stands</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_barrel_stands_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_barrel_stands_Lod2</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="1">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_barrels_sign</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_barrels_sign_Lod1</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="1">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_Decals_A</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_Decals_A_Lod1</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="2">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_DoorFrame</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_DoorFrame_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_DoorFrame_Lod2</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="0">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_Dormer_Wood_Slats</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="3">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_fireplace</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_fireplace_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_fireplace_Lod2</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_fireplace_Lod3</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="2">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_roof</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_roof_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_roof_Lod2</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="2">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_roof_copper_tops</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_roof_copper_tops_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_roof_copper_tops_Lod2</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="1">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_roof_decals</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_roof_decals_Lod1</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="2">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_side_garden_box</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_side_garden_box_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_side_garden_box_Lod2</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="3">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_trim</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_trim_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_trim_Lod2</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_trim_Lod3</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="3">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_trim_stone</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_trim_stone_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_trim_stone_Lod2</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_trim_stone_Lod3</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="2">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_walls</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_walls_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_walls_Lod2</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="2">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Door_R</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Door_R_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Door_R_Lod2</PrototypeTag>
<Position x="1.05" y="0" z="0"/>
<Scale x="0.99999958" y="1" z="0.99999958"/>
<Rotation x="0" y="2.2123847" z="0"/>
</PartObject>
<PartObject Lod_Level="1">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_wood_Corbels</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_ext_wood_Corbels_Lod1</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="2">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Door_L</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Door_L_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Door_L_Lod2</PrototypeTag>
<Position x="-1.05" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="1">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Window_Glass</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Window_Glass_Lod1</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="3">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Roof_Debris_A</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Roof_Debris_A_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Roof_Debris_A_Lod2</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Roof_Debris_A_Lod3</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="3">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Roof_Debris_B</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Roof_Debris_B_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Roof_Debris_B_Lod2</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_Roof_Debris_B_Lod3</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="3">
<PrototypeTag>Prototype_GameObject_SM_DSkull</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_DSkull_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_DSkull_Lod2</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_DSkull_Lod3</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
</Container>
<Container Name="3Broom_Int">
<Position x="22.056229" y="0" z="38.276192"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
<PartObject Lod_Level="1">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_stairs_A</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_stairs_A_Lod1</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="2">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_Bar</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_Bar_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_Bar_Lod2</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="2">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_floors</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_floors_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_floors_Lod2</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="2">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_stairs_B</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_stairs_B_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_stairs_B_Lod2</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="1">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_windows</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_windows_Lod1</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="1">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_stairs_D</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_stairs_D_Lod1</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="2">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_Stairs_Upper_Floors</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_Stairs_Upper_Floors_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_Stairs_Upper_Floors_Lod2</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="3">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_walls</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_walls_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_walls_Lod2</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_walls_Lod3</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="3">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_A</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_A_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_A_Lod2</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_A_Lod3</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="3">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_B</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_B_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_B_Lod2</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_B_Lod3</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="3">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_C</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_C_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_C_Lod2</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_C_Lod3</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="2">
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_Stairs</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_Stairs_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_3Broom_int_wood_Stairs_Lod2</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
<PartObject Lod_Level="2">
<PrototypeTag>Prototype_GameObject_SM_Broom_01</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_Broom_01_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_Broom_01_Lod2</PrototypeTag>
<Position x="0" y="0" z="0"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</PartObject>
</Container>
</Land>
@@ -164,7 +164,7 @@ PS_OUT PS_MAIN(PS_IN In)
PS_OUT Out;
vector vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
if (vMtrlDiffuse.a < 0.4f)
if (vMtrlDiffuse.a < 0.1f)
{
discard;
}
@@ -180,7 +180,7 @@ PS_OUT PS_MAIN(PS_IN In)
return Out;
}
PS_OUT PS_MAIN_OUTLINE(PS_IN In)
PS_OUT PS_MAIN_SELECT(PS_IN In)
{
PS_OUT Out;
@@ -195,7 +195,7 @@ PS_OUT PS_MAIN_OUTLINE(PS_IN In)
float3 vNormal = mul(vNormalDesc.xyz * 2.f - 1.f, WorldMatrix);
Out.vDiffuse = vMtrlDiffuse;
Out.vDiffuse = vMtrlDiffuse * float4(0.f, 1.f, 1.f, 0.3f);
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
Out.vDepth = float4(In.vProjPos.z / In.vProjPos.w, In.vProjPos.w / g_fFar, 0.0f, 1.f);
return Out;
@@ -439,4 +439,14 @@ technique11 MeshTechnique11
GeometryShader = NULL;
PixelShader = compile ps_5_0 PS_EFFECT_UVMOVE();
}
pass MapToolPass // 11
{
SetRasterizerState(RS_Default);
SetDepthStencilState(DSS_Default, 0);
SetBlendState(BS_None, 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_MAIN_SELECT();
}
}
@@ -354,6 +354,21 @@
<ClInclude Include="..\public\MapObject_LOD.h">
<Filter>02.GameObjects\Env\02.MapObject\LOD</Filter>
</ClInclude>
<ClInclude Include="..\public\MapContainer.h">
<Filter>02.GameObjects\Env\01.MapContainer</Filter>
</ClInclude>
<ClInclude Include="..\public\BuildingContainer.h">
<Filter>02.GameObjects\Env\01.MapContainer\BuildingContainer</Filter>
</ClInclude>
<ClInclude Include="..\public\MapObject.h">
<Filter>02.GameObjects\Env\02.MapObject</Filter>
</ClInclude>
<ClInclude Include="..\public\MapObject_Static.h">
<Filter>02.GameObjects\Env\02.MapObject\Static</Filter>
</ClInclude>
<ClInclude Include="..\public\MapObject_LOD.h">
<Filter>02.GameObjects\Env\02.MapObject\LOD</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Image Include="Editor.ico">
@@ -523,6 +538,21 @@
<ClCompile Include="..\private\MapObject_LOD.cpp">
<Filter>02.GameObjects\Env\02.MapObject\LOD</Filter>
</ClCompile>
<ClCompile Include="..\private\MapContainer.cpp">
<Filter>02.GameObjects\Env\01.MapContainer</Filter>
</ClCompile>
<ClCompile Include="..\private\BuildingContainer.cpp">
<Filter>02.GameObjects\Env\01.MapContainer\BuildingContainer</Filter>
</ClCompile>
<ClCompile Include="..\private\MapObject.cpp">
<Filter>02.GameObjects\Env\02.MapObject</Filter>
</ClCompile>
<ClCompile Include="..\private\MapObject_Static.cpp">
<Filter>02.GameObjects\Env\02.MapObject\Static</Filter>
</ClCompile>
<ClCompile Include="..\private\MapObject_LOD.cpp">
<Filter>02.GameObjects\Env\02.MapObject\LOD</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Editor.rc">
@@ -1,6 +1,9 @@
#include "pch.h"
#include "BuildingContainer.h"
#include "PartObject.h"
#include "Terrain.h"
#include "Layer.h"
#include "VIBuffer_Terrain.h"
CBuildingContainer::CBuildingContainer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
:CMapContainer(pDevice, pContext)
@@ -15,6 +18,8 @@ CBuildingContainer::CBuildingContainer(const CBuildingContainer& rhs)
void CBuildingContainer::Priority_Update(_float fTimeDelta)
{
__super::Priority_Update(fTimeDelta);
m_bSelected = false;
}
void CBuildingContainer::Update(_float fTimeDelta)
@@ -24,6 +29,13 @@ void CBuildingContainer::Update(_float fTimeDelta)
void CBuildingContainer::Late_Update(_float fTimeDelta)
{
if (m_bSelected)
{
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&m_vPosition), 1.f));
m_pTransformCom->Set_Scale(m_vScale);
m_pTransformCom->Rotation(XMConvertToRadians(m_vRotation.x), XMConvertToRadians(m_vRotation.y), XMConvertToRadians(m_vRotation.z));
}
__super::Late_Update(fTimeDelta);
}
@@ -43,10 +55,22 @@ HRESULT CBuildingContainer::Initialize(void* pArg)
return E_FAIL;
}
if (FAILED(__super::Ready_Components(pArg))) {
if (FAILED(Ready_Components(pArg))) {
return E_FAIL;
}
MAP_CONTAINER_DESC* pDesc = static_cast<MAP_CONTAINER_DESC*>(pArg);
m_strName = pDesc->strName;
m_vPosition = pDesc->vPosition;
m_vScale = pDesc->vScale;
m_vRotation = pDesc->vRotation;
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&m_vPosition), 1.f));
m_pTransformCom->Set_Scale(m_vScale);
m_pTransformCom->Rotation(XMConvertToRadians(m_vRotation.x), XMConvertToRadians(m_vRotation.y), XMConvertToRadians(m_vRotation.z));
return S_OK;
}
@@ -97,4 +121,44 @@ void CBuildingContainer::Free()
void CBuildingContainer::Describe_Entity()
{
if (m_bDead)
return;
if (nullptr == m_pGameInstance)
return;
GUI::Text(m_strName.c_str());
GUI::Text("----- Transfrom ----");
GUI::InputFloat("X##Position", &m_vPosition.x, 0.1f, 1.f);
GUI::InputFloat("Y##Position", &m_vPosition.y, 0.1f, 1.f);
GUI::InputFloat("Z##Position", &m_vPosition.z, 0.1f, 1.f);
if (m_pGameInstance->Mouse_Down(DIM_LBUTTON) && m_pGameInstance->Key_Pressing(DIK_LSHIFT))
{
CTerrain* pTerrain = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::MAP), TEXT("Layer_Terrain"))->Get_Object<CTerrain>();
if (nullptr != pTerrain)
{
pTerrain->Get_Component<CVIBuffer_Terrain>()->Picking(pTerrain->Get_Component<CTransform>(), m_vPosition);
}
}
GUI::Text("----- Rotation ----");
GUI::InputFloat("X##Rotation", &m_vRotation.x, 10.f, 45.f);
GUI::InputFloat("Y##Rotation", &m_vRotation.y, 10.f, 45.f);
GUI::InputFloat("Z##Rotation", &m_vRotation.z, 10.f, 45.f);
GUI::Text("----- Scale ----");
GUI::InputFloat("X##Scale", &m_vScale.x, 0.1f, 1.f);
GUI::InputFloat("Y##Scale", &m_vScale.y, 0.1f, 1.f);
GUI::InputFloat("Z##Scale", &m_vScale.z, 0.1f, 1.f);
m_vScale.x = max(0.01f, m_vScale.x);
m_vScale.y = max(0.01f, m_vScale.y);
m_vScale.z = max(0.01f, m_vScale.z);
if (GUI::Button("Delete"))
m_bDead = true;
m_bSelected = true;
}
@@ -95,8 +95,8 @@ HRESULT CLevel_MapViewer::Ready_Layer_Terrain(const _wstring& strLayerTag)
HRESULT CLevel_MapViewer::Ready_Layer_BuildingContainer(const _wstring& strLayerTag)
{
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBuildingContainer>(g_iStaticLevel, NEXT_LEVEL, strLayerTag)))
return E_FAIL;
//if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBuildingContainer>(g_iStaticLevel, NEXT_LEVEL, strLayerTag)))
// return E_FAIL;
return S_OK;
}
+25 -4
View File
@@ -661,15 +661,13 @@ HRESULT CLoader::Loading_For_MapViewer()
vector<_wstring> ModelPrototypeTags;
for (const auto& file : filesystem::directory_iterator("C:\\Users\\82103\\Desktop\\MapRe\\Game\\Environment\\Hogsmeade\\BLDG_ThreeBroomsticks\\Meshes"))
{
if (file.is_directory())
continue;
string ext = file.path().extension().string();
if (strcmp(ext.c_str(), ".fbx"))
if (strcmp(ext.c_str(), ".bin"))
continue;
_char szFilePath[MAX_PATH] = {};
@@ -680,12 +678,35 @@ HRESULT CLoader::Loading_For_MapViewer()
/*For Prototype_Component_Model_*/
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, strFileName,
CModel::Create(m_pDevice, m_pContext,szFilePath, MODEL::ENVIROMENT, XMMatrixIdentity(), 0))))
CModel::Create(m_pDevice, m_pContext, MODEL::ENVIROMENT, szFilePath))))
return E_FAIL;
ModelPrototypeTags.push_back(strFileName);
}
for (const auto& file : filesystem::directory_iterator("C:\\Users\\82103\\Desktop\\MapRe\\Game\\Environment\\Hogsmeade\\BLDG_ThreeBroomsticks\\Meshes\\3Broom_Kit"))
{
if (file.is_directory())
continue;
string ext = file.path().extension().string();
if (strcmp(ext.c_str(), ".fbx"))
continue;
_char szFilePath[MAX_PATH] = {};
strcpy_s(szFilePath, MAX_PATH, file.path().string().c_str());
_wstring strFileName = L"Prototype_GameObject_" + file.path().stem().wstring();
/*For Prototype_Component_Model_*/
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, strFileName,
CModel::Create(m_pDevice, m_pContext, MODEL::ENVIROMENT, szFilePath))))
return E_FAIL;
ModelPrototypeTags.push_back(strFileName);
}
m_strMessage = TEXT("쉐이더를(을) 로딩 중 입니다.");
@@ -2,6 +2,9 @@
#include "MapContainer.h"
#include "PartObject.h"
#include "MapObject_LOD.h"
#include "MapObject_Static.h"
CMapContainer::CMapContainer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
:CContainerObject(pDevice, pContext)
{
@@ -22,6 +25,7 @@ HRESULT CMapContainer::Initialize(void* pArg)
if (FAILED(__super::Initialize(pArg))) {
return E_FAIL;
}
return S_OK;
}
@@ -54,6 +58,64 @@ HRESULT CMapContainer::Render()
return S_OK;
}
HRESULT CMapContainer::Save_PartObjects(tinyxml2::XMLDocument& Doc, tinyxml2::XMLElement* Container)
{
for (auto& piar : m_PartObjects)
{
CMapObject* pMapObject = dynamic_cast<CMapObject*>(piar.second);
if (nullptr == pMapObject)
return E_FAIL;
// <PartObject>
tinyxml2::XMLElement* PartObject = Doc.NewElement("PartObject");
PartObject->SetAttribute("Lod_Level", pMapObject->Get_LodLevel());
Container->InsertEndChild(PartObject);
for (_uint i = 0; i < pMapObject->Get_LodLevel() + 1; ++i)
{
// <PrototypeTag>ÅØ½ºÆ®</PrototypeTag>
tinyxml2::XMLElement* proto = Doc.NewElement("PrototypeTag");
proto->SetText(CMyTools::ToString(pMapObject->Get_PrototypeTag(i)).c_str());
PartObject->InsertEndChild(proto);
}
// <Position x="0.0" y="0.0" z="0.0"/>
tinyxml2::XMLElement* PositionElem = Doc.NewElement("Position");
_float3 vPosition = {};
XMStoreFloat3(&vPosition, pMapObject->Get_Component<CTransform>()->Get_State(STATE::POSITION));
PositionElem->SetAttribute("x", vPosition.x);
PositionElem->SetAttribute("y", vPosition.y);
PositionElem->SetAttribute("z", vPosition.z);
PartObject->InsertEndChild(PositionElem);
// <Scale x="0.0" y="0.0" z="0.0"/>
tinyxml2::XMLElement* ScaleElem = Doc.NewElement("Scale");
_float3 pScale = pMapObject->Get_Component<CTransform>()->Get_Scale();
ScaleElem->SetAttribute("x", pScale.x);
ScaleElem->SetAttribute("y", pScale.y);
ScaleElem->SetAttribute("z", pScale.z);
PartObject->InsertEndChild(ScaleElem);
// <Rotation x="0.0" y="0.0" z="0.0"/>
tinyxml2::XMLElement* RotationElem = Doc.NewElement("Rotation");
_float3 vRotation = {};
XMStoreFloat3(&vRotation, pMapObject->Get_Component<CTransform>()->Get_RollPitchYawVector());
RotationElem->SetAttribute("x", vRotation.x);
RotationElem->SetAttribute("y", vRotation.y);
RotationElem->SetAttribute("z", vRotation.z);
PartObject->InsertEndChild(RotationElem);
}
return S_OK;
}
void CMapContainer::Free()
{
__super::Free();
+41 -27
View File
@@ -49,30 +49,6 @@ void CMapObject::Late_Update(_float fTimeDelta)
HRESULT CMapObject::Render()
{
if (FAILED(Bind_ShaderResources())) {
return E_FAIL;
}
//_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
//for (_uint i = 0; i < iNumMeshes; i++)
//{
// if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom, "g_DiffuseTexture", aiTextureType_DIFFUSE, 0))) {
// return E_FAIL;
// }
// if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom, "g_NormalTexture", aiTextureType_NORMALS, 0))) {
// return E_FAIL;
// }
// if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::DEFAULT)))) {
// return E_FAIL;
// }
// if (FAILED(m_pModelCom->Render(i))) {
// return E_FAIL;
// }
//}
return S_OK;
}
@@ -91,9 +67,6 @@ HRESULT CMapObject::Initialize(void* pArg)
if (FAILED(__super::Initialize(pArg)))
return E_FAIL;
if (FAILED(Ready_Components()))
return E_FAIL;
#ifdef _DEBUG
m_bSelected = false;
m_vPosition = _float3(0.f, 0.f, 0.f);
@@ -104,6 +77,32 @@ HRESULT CMapObject::Initialize(void* pArg)
return S_OK;
}
_wstring CMapObject::Get_PrototypeTag(_uint iLodIndex)
{
return _wstring();
}
return S_OK;
}
HRESULT CMapObject::Initialize(void* pArg)
{
if (FAILED(__super::Initialize(pArg)))
return E_FAIL;
if (FAILED(Ready_Components()))
return E_FAIL;
#ifdef _DEBUG
m_bSelected = false;
m_vPosition = _float3(0.f, 0.f, 0.f);
m_vRotation = _float3(0.f, 0.f, 0.f);
m_vScale = _float3(1.f, 1.f, 1.f);
#endif // _DEBUG
//if (FAILED(m_pShaderCom->Bind_RawValue("g_vCamPosition", m_pGameInstance->Get_CamPosition(), sizeof(_float4)))) {
// return E_FAIL;
//}
HRESULT CMapObject::Ready_Components()
{
__super::Ready_Components(nullptr);
@@ -116,6 +115,21 @@ HRESULT CMapObject::Bind_ShaderResources()
return S_OK;
}
return pInstance;
}
CGameObject* CMapObject::Clone(void* pArg, CGameObject* pOwner)
{
CMapObject* pInstance = new CMapObject(*this);
if (FAILED(pInstance->Initialize(pArg)))
{
MSG_BOX("Failed to Cloned : CMapObject");
Safe_Release(pInstance);
}
return pInstance;
}
void CMapObject::Free()
{
@@ -41,9 +41,13 @@ HRESULT CMapObject_LOD::Initialize(void* pArg)
#ifdef _DEBUG
m_bSelected = false;
m_vPosition = _float3(0.f, 0.f, 0.f);
m_vRotation = _float3(0.f, 0.f, 0.f);
m_vScale = _float3(1.f, 1.f, 1.f);
m_vPosition = pDesc->vPosition;
m_vScale = pDesc->vScale;
m_vRotation = pDesc->vRotation;
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&m_vPosition), 1.f));
m_pTransformCom->Set_Scale(m_vScale);
m_pTransformCom->Rotation(XMConvertToRadians(m_vRotation.x), XMConvertToRadians(m_vRotation.y), XMConvertToRadians(m_vRotation.z));
#endif // _DEBUG
return S_OK;
@@ -72,8 +76,11 @@ void CMapObject_LOD::Late_Update(_float fTimeDelta)
}
#endif
XMStoreFloat4x4(&m_CombinedWorldMatrix, m_pTransformCom->Get_XMWorldMatrix() * m_pParentTransformCom->Get_XMWorldMatrix());
_float4 vPos;
XMStoreFloat4(&vPos, Get_WorldPostion());
//XMStoreFloat4(&vPos, Get_WorldPostion());
XMStoreFloat4(&vPos, m_pTransformCom->Get_State(STATE::POSITION));
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this, vPos, 20.f);
}
@@ -83,7 +90,7 @@ HRESULT CMapObject_LOD::Render()
return E_FAIL;
}
_uint iNumMeshes = m_pModelComs[0]->Get_NumMeshes();
_uint iNumMeshes = m_pModelComs[m_iLodIndex]->Get_NumMeshes();
for (_uint i = 0; i < iNumMeshes; i++)
{
@@ -93,10 +100,19 @@ HRESULT CMapObject_LOD::Render()
if (FAILED(m_pModelComs[0]->Bind_Material(i, m_pShaderCom, "g_NormalTexture", aiTextureType_NORMALS, 0))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::DEFAULT)))) {
return E_FAIL;
if (m_bSelected)
{
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::MAPTOOL)))) {
return E_FAIL;
}
}
else
{
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::DEFAULT)))) {
return E_FAIL;
}
}
if (FAILED(m_pModelComs[m_iLodIndex]->Render(i))) {
return E_FAIL;
@@ -122,6 +138,8 @@ HRESULT CMapObject_LOD::Add_LodModel(const _tchar* pModelPrototypeTag)
reinterpret_cast<CComponent**>(&pModel))))
return E_FAIL;
m_ModelPrototypeTags.push_back(pModelPrototypeTag);
++m_iMaxLodLevel;
m_pModelComs.push_back(pModel);
@@ -154,9 +172,10 @@ HRESULT CMapObject_LOD::Ready_Components()
HRESULT CMapObject_LOD::Bind_ShaderResources()
{
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", &m_CombinedWorldMatrix))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
return E_FAIL;
}
@@ -43,27 +43,45 @@ HRESULT CMapObject_Manager::Initialize(void* pArg)
if (FAILED(__super::Initialize(pArg)))
return E_FAIL;
m_pContainer = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::MAP), TEXT("Layer_Building"))->Get_Object<CBuildingContainer>();
if (FAILED(Ready_Components()))
return E_FAIL;
SAFE_ADDREF(m_pContainer);
m_iContainerObjectIndex = 99;
//m_pContainer = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::MAP), TEXT("Layer_Building"))->Get_Object<CBuildingContainer>();
return S_OK;
}
void CMapObject_Manager::Priority_Update(_float fTimeDelta)
{
for (auto* pObject : m_MapObjects)
{
pObject->Priority_Update(fTimeDelta);
}
}
void CMapObject_Manager::Update(_float fTimeDelta)
{
GUI::Begin("File");
if (GUI::Button("Save_XML"))
if (GUI::Button("Save_Map"))
{
Save_MapData("Test");
}
if (GUI::Button("Load_Map"))
{
Load_MapData("Test");
}
GUI::InputText("Containter Name", m_szSaveContainerName, MAX_PATH);
if (GUI::Button("Save_Container"))
{
Save_ContainerData("ContainerTest", m_szSaveContainerName);
}
if (GUI::Button("Load_Container"))
{
Load_ContainerData("ContainerTest", m_szSaveContainerName);
}
GUI::End();
Update_PrototypeList();
@@ -72,11 +90,31 @@ void CMapObject_Manager::Update(_float fTimeDelta)
Update_Edit();
Update_ContainerObject();
for (auto* pObject : m_MapObjects)
{
pObject->Update(fTimeDelta);
}
}
void CMapObject_Manager::Late_Update(_float fTimeDelta)
{
auto iter = m_MapObjects.begin();
for (; iter != m_MapObjects.end();)
{
if ((*iter)->isDead())
{
SAFE_RELEASE(*iter);
iter = m_MapObjects.erase(iter);
}
else
{
(*iter)->Late_Update(fTimeDelta);
++iter;
}
}
}
HRESULT CMapObject_Manager::Render()
@@ -86,6 +124,8 @@ HRESULT CMapObject_Manager::Render()
HRESULT CMapObject_Manager::Ready_Components()
{
__super::Ready_Components(nullptr);
return S_OK;
}
@@ -96,72 +136,224 @@ HRESULT CMapObject_Manager::Bind_ShaderResources()
HRESULT CMapObject_Manager::Save_MapData(const _char* pFileName)
{
//const list<CGameObject*>* pObjectList = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::MAP), TEXT("Layer_MapObject"))->Get_Objects();
tinyxml2::XMLDocument doc;
string strPath = "../Bin/Resources/Data/Map/" + string(pFileName) + ".xml";
//if (nullptr == pObjectList)
// return E_FAIL;
tinyxml2::XMLError loadResult = doc.LoadFile(strPath.c_str());
//tinyxml2::XMLDocument doc;
tinyxml2::XMLElement* land = {};
tinyxml2::XMLElement* container = {};
//doc.InsertFirstChild(doc.NewDeclaration());
if (loadResult != tinyxml2::XML_SUCCESS)
{
doc.InsertFirstChild(doc.NewDeclaration());
//tinyxml2::XMLElement* land = doc.NewElement("Land");
//doc.InsertEndChild(land);
land = doc.NewElement("Land");
doc.InsertEndChild(land);
//for (auto& pObjcet : *pObjectList)
//{
// CMapObject* pMapObject = dynamic_cast<CMapObject*>(pObjcet);
}
else
{
land = doc.FirstChildElement("Land");
}
// if (nullptr == pMapObject)
// continue;
CLayer* pLayer = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::MAP), TEXT("Layer_Building"));
// // <Model>
// tinyxml2::XMLElement* model = doc.NewElement("Model");
// land->InsertEndChild(model);
if (nullptr == pLayer)
return E_FAIL;
const list<CGameObject*>* pList = pLayer->Get_Objects();
// // <PrototypeTag>ÅØ½ºÆ®</PrototypeTag>
// tinyxml2::XMLElement* proto = doc.NewElement("PrototypeTag");
// proto->SetText(CMyTools::ToString(pMapObject->Get_PrototypeTag()).c_str());
// model->InsertEndChild(proto);
// // <Position x="0.0" y="0.0" z="0.0"/>
// tinyxml2::XMLElement* PositionElem = doc.NewElement("Position");
for (auto pGamObject : *pList)
{
CBuildingContainer* pContainerObject = dynamic_cast<CBuildingContainer*>(pGamObject);
// _float3 vPosition = {};
// XMStoreFloat3(&vPosition, pMapObject->Get_WorldPostion());
//
// PositionElem->SetAttribute("x", vPosition.x);
// PositionElem->SetAttribute("y", vPosition.y);
// PositionElem->SetAttribute("z", vPosition.z);
// model->InsertEndChild(PositionElem);
if (nullptr == pContainerObject)
return E_FAIL;
// // <Scale x="0.0" y="0.0" z="0.0"/>
// tinyxml2::XMLElement* ScaleElem = doc.NewElement("Scale");
string strName = pContainerObject->Get_Name();
// _float3 pScale = pMapObject->Get_Component<CTransform>()->Get_Scale();
// ScaleElem->SetAttribute("x", pScale.x);
// ScaleElem->SetAttribute("y", pScale.y);
// ScaleElem->SetAttribute("z", pScale.z);
// model->InsertEndChild(ScaleElem);
tinyxml2::XMLElement* container = doc.NewElement("Container");
container->SetAttribute("Name", strName.c_str());
land->InsertEndChild(container);
// // <Rotation x="0.0" y="0.0" z="0.0"/>
// tinyxml2::XMLElement* RotationElem = doc.NewElement("Rotation");
_float3 vPosition = {};
XMStoreFloat3(&vPosition, pGamObject->Get_Component<CTransform>()->Get_State(STATE::POSITION));
// _float3 vRotation = {};
// XMStoreFloat3(&vRotation, pMapObject->Get_Component<CTransform>()->Get_RollPitchYawVector());
//
// RotationElem->SetAttribute("x", vRotation.x);
// RotationElem->SetAttribute("y", vRotation.y);
// RotationElem->SetAttribute("z", vRotation.z);
// model->InsertEndChild(RotationElem);
_float3 vScale = pGamObject->Get_Component<CTransform>()->Get_Scale();
//}
//string strPath = "../Bin/Resources/Data/Map/" + string(pFileName) + ".xml";
_float3 vRotation = {};
XMStoreFloat3(&vRotation, pGamObject->Get_Component<CTransform>()->Get_RollPitchYawVector());
vRotation.x = XMConvertToDegrees(vRotation.x);
vRotation.y = XMConvertToDegrees(vRotation.y);
vRotation.z = XMConvertToDegrees(vRotation.z);
//// ÀúÀå
//if (doc.SaveFile(strPath.c_str()) != tinyxml2::XML_SUCCESS) {
// return E_FAIL;
//}
#pragma region CONTAINER_TRANSFORM
tinyxml2::XMLElement* Position = doc.NewElement("Position");
Position->SetAttribute("x", vPosition.x);
Position->SetAttribute("y", vPosition.y);
Position->SetAttribute("z", vPosition.z);
container->InsertEndChild(Position);
tinyxml2::XMLElement* Scale = doc.NewElement("Scale");
Scale->SetAttribute("x", vScale.x);
Scale->SetAttribute("y", vScale.y);
Scale->SetAttribute("z", vScale.z);
container->InsertEndChild(Scale);
tinyxml2::XMLElement* Rotation = doc.NewElement("Rotation");
Rotation->SetAttribute("x", vRotation.x);
Rotation->SetAttribute("y", vRotation.y);
Rotation->SetAttribute("z", vRotation.z);
container->InsertEndChild(Rotation);
#pragma endregion
#pragma region SAVE_PARTOBJECT
if (FAILED(pContainerObject->Save_PartObjects(doc, container)))
return E_FAIL;
}
#pragma endregion
// ÀúÀå
if (doc.SaveFile(strPath.c_str()) != tinyxml2::XML_SUCCESS) {
MSG_BOX("Failed to Save File");
}
else
{
MSG_BOX("Succeed to Save File");
}
return S_OK;
return S_OK;
}
HRESULT CMapObject_Manager::Save_ContainerData(const _char* pFileName, const _char* pContainerName)
{
if (true == m_MapObjects.empty())
return E_FAIL;
tinyxml2::XMLDocument doc;
string strPath = "../Bin/Resources/Data/Map/" + string(pFileName) + ".xml";
tinyxml2::XMLError loadResult = doc.LoadFile(strPath.c_str());
tinyxml2::XMLElement* land = {};
tinyxml2::XMLElement* container = {};
if (loadResult != tinyxml2::XML_SUCCESS)
{
doc.InsertFirstChild(doc.NewDeclaration());
land = doc.NewElement("Land");
doc.InsertEndChild(land);
container = doc.NewElement("Container");
container->SetAttribute("Name", pContainerName);
land->InsertEndChild(container);
}
else
{
land = doc.FirstChildElement("Land");
container = doc.NewElement("Container");
container->SetAttribute("Name", pContainerName);
land->InsertEndChild(container);
}
#pragma region CONTAINER_DEFAULT_TRANSFORM
tinyxml2::XMLElement* Position = doc.NewElement("Position");
Position->SetAttribute("x", 0.f);
Position->SetAttribute("y", 0.f);
Position->SetAttribute("z", 0.f);
container->InsertEndChild(Position);
tinyxml2::XMLElement* Scale = doc.NewElement("Scale");
Scale->SetAttribute("x", 1.f);
Scale->SetAttribute("y", 1.f);
Scale->SetAttribute("z", 1.f);
container->InsertEndChild(Scale);
tinyxml2::XMLElement* Rotation = doc.NewElement("Rotation");
Rotation->SetAttribute("x", 0.f);
Rotation->SetAttribute("y", 0.f);
Rotation->SetAttribute("z", 0.f);
container->InsertEndChild(Rotation);
#pragma endregion
#pragma region SAVE_PARTOBJECT
for (auto& pMapObject : m_MapObjects)
{
// <PartObject>
tinyxml2::XMLElement* PartObject = doc.NewElement("PartObject");
PartObject->SetAttribute("Lod_Level", pMapObject->Get_LodLevel());
container->InsertEndChild(PartObject);
for (_uint i = 0; i < pMapObject->Get_LodLevel() + 1; ++i)
{
// <PrototypeTag>ÅØ½ºÆ®</PrototypeTag>
tinyxml2::XMLElement* proto = doc.NewElement("PrototypeTag");
proto->SetText(CMyTools::ToString(pMapObject->Get_PrototypeTag(i)).c_str());
PartObject->InsertEndChild(proto);
}
//m_pMapObjects = pLayer->Get_Objects();
_float3 vPosition = {};
XMStoreFloat3(&vPosition, pMapObject->Get_Component<CTransform>()->Get_State(STATE::POSITION));
PositionElem->SetAttribute("x", vPosition.x);
PositionElem->SetAttribute("y", vPosition.y);
PositionElem->SetAttribute("z", vPosition.z);
PartObject->InsertEndChild(PositionElem);
if (false == m_MapObjects.empty())
{
for (auto pMapObject : m_MapObjects)
{
CMapObject* pCurrentMapObject = static_cast<CMapObject*>(pMapObject);
_float3 pScale = pMapObject->Get_Component<CTransform>()->Get_Scale();
ScaleElem->SetAttribute("x", pScale.x);
ScaleElem->SetAttribute("y", pScale.y);
ScaleElem->SetAttribute("z", pScale.z);
PartObject->InsertEndChild(ScaleElem);
wstring strPrototypeTag = pCurrentMapObject->Get_PrototypeTag();
_float3 vRotation = {};
XMStoreFloat3(&vRotation, pMapObject->Get_Component<CTransform>()->Get_RollPitchYawVector());
vRotation.x = XMConvertToDegrees(vRotation.x);
vRotation.y = XMConvertToDegrees(vRotation.y);
vRotation.z = XMConvertToDegrees(vRotation.z);
RotationElem->SetAttribute("x", vRotation.x);
RotationElem->SetAttribute("y", vRotation.y);
RotationElem->SetAttribute("z", vRotation.z);
PartObject->InsertEndChild(RotationElem);
SAFE_RELEASE(pMapObject);
}
m_MapObjects.clear();
m_pSelectObject = nullptr;
#pragma endregion
// ÀúÀå
if (doc.SaveFile(strPath.c_str()) != tinyxml2::XML_SUCCESS) {
MSG_BOX("Failed to Save File");
}
else
{
MSG_BOX("Succeed to Save File");
}
return S_OK;
}
@@ -180,51 +372,277 @@ HRESULT CMapObject_Manager::Load_MapData(const _char* pFileName)
if (nullptr == root)
{
MSG_BOX("Failed to Find root");
return E_FAIL;
return S_OK;
}
///* Map */
//MAP_DATA Map_Data = {};
/* Container */
for (auto* Container = root->FirstChildElement("Container"); Container; Container = Container->NextSiblingElement("Container"))
{
const _char* pName = {};
//for (auto* land = root->FirstChildElement("Model"); land; land = land->NextSiblingElement("Model"))
//{
// tinyxml2::XMLElement* protoElem = land->FirstChildElement("PrototypeTag");
Container->QueryStringAttribute("Name", &pName);
#pragma region ADD_CONTAINER_OBJECT
// const _char* pPrototypeTag = protoElem->GetText();
CBuildingContainer* pContainerObject = { nullptr };
CMapContainer::MAP_CONTAINER_DESC ContainerDesc = {};
// if (nullptr != pPrototypeTag)
// {
// string strPtotoypeTag = pPrototypeTag;
// Map_Data.strPrototypeTag = CMyTools::ToWstring(strPtotoypeTag);
// }
// else
// {
// Map_Data.strPrototypeTag = L"";
// }
auto* ContainerPosition = Container->FirstChildElement("Position");
ContainerPosition->QueryFloatAttribute("x", &ContainerDesc.vPosition.x);
ContainerPosition->QueryFloatAttribute("y", &ContainerDesc.vPosition.y);
ContainerPosition->QueryFloatAttribute("z", &ContainerDesc.vPosition.z);
// protoElem = land->FirstChildElement("Position");
// if (nullptr == protoElem)
// return E_FAIL;
// protoElem->QueryFloatAttribute("x", &Map_Data.vPosition.x);
// protoElem->QueryFloatAttribute("y", &Map_Data.vPosition.y);
// protoElem->QueryFloatAttribute("z", &Map_Data.vPosition.z);
auto* ContainerScale = Container->FirstChildElement("Scale");
ContainerScale->QueryFloatAttribute("x", &ContainerDesc.vScale.x);
ContainerScale->QueryFloatAttribute("y", &ContainerDesc.vScale.y);
ContainerScale->QueryFloatAttribute("z", &ContainerDesc.vScale.z);
// protoElem = land->FirstChildElement("Scale");
// if (nullptr == protoElem)
// return E_FAIL;
// protoElem->QueryFloatAttribute("x", &Map_Data.vScale.x);
// protoElem->QueryFloatAttribute("y", &Map_Data.vScale.y);
// protoElem->QueryFloatAttribute("z", &Map_Data.vScale.z);
auto* ContainerRotation = Container->FirstChildElement("Rotation");
ContainerRotation->QueryFloatAttribute("x", &ContainerDesc.vRotation.x);
ContainerRotation->QueryFloatAttribute("y", &ContainerDesc.vRotation.y);
ContainerRotation->QueryFloatAttribute("z", &ContainerDesc.vRotation.z);
// protoElem = land->FirstChildElement("Rotation");
// if (nullptr == protoElem)
// return E_FAIL;
// protoElem->QueryFloatAttribute("x", &Map_Data.vRotation.x);
// protoElem->QueryFloatAttribute("y", &Map_Data.vRotation.y);
// protoElem->QueryFloatAttribute("z", &Map_Data.vRotation.z);
ContainerDesc.strName = string(pName);
m_pGameInstance->Add_GameObject_ToLayer<CBuildingContainer>(
g_iStaticLevel, ENUM_CLASS(LEVEL::MAP), TEXT("Layer_Building"), &ContainerDesc, nullptr, reinterpret_cast<CGameObject**>(&pContainerObject));
#pragma endregion
#pragma region ADD_PARTOBJECT
for (auto* PartObject = Container->FirstChildElement("PartObject"); PartObject; PartObject = PartObject->NextSiblingElement("PartObject"))
{
_uint iLodLevel = {};
PartObject->QueryUnsignedAttribute("Lod_Level", &iLodLevel);
#pragma region MAPOBJECT_STATIC
if (0 == iLodLevel) /* MapObject_Static */
{
CMapObject_Static::MAPOBJECT_STATIC_DESC Desc = {};
string strTag = {};
auto* PrototypeTag = PartObject->FirstChildElement("PrototypeTag");
strTag = PrototypeTag->GetText();
Desc.strModelPrototypeTag = CMyTools::ToWstring(strTag);
Desc.pParentTransform = pContainerObject->Get_Component<CTransform>();
const string strKey = strTag;
/* Position */
tinyxml2::XMLElement* Position = PartObject->FirstChildElement("Position");
Position->QueryFloatAttribute("x", &Desc.vPosition.x);
Position->QueryFloatAttribute("y", &Desc.vPosition.y);
Position->QueryFloatAttribute("z", &Desc.vPosition.z);
/* Scale */
tinyxml2::XMLElement* Scale = PartObject->FirstChildElement("Scale");
Scale->QueryFloatAttribute("x", &Desc.vScale.x);
Scale->QueryFloatAttribute("y", &Desc.vScale.y);
Scale->QueryFloatAttribute("z", &Desc.vScale.z);
/* Rotation */
tinyxml2::XMLElement* Rotation = PartObject->FirstChildElement("Rotation");
Rotation->QueryFloatAttribute("x", &Desc.vRotation.x);
Rotation->QueryFloatAttribute("y", &Desc.vRotation.y);
Rotation->QueryFloatAttribute("z", &Desc.vRotation.z);
pContainerObject->Add_Part<CMapObject_Static>(strKey, g_iStaticLevel, nullptr, &Desc);
}
#pragma endregion
#pragma region MAPOBJECT_LOD
else
{
CMapObject_LOD::MAPOBJECT_LOD_DESC Desc = {};
string strTag = {};
for (auto* PrototypeTag = PartObject->FirstChildElement("PrototypeTag"); PrototypeTag; PrototypeTag = PrototypeTag->NextSiblingElement("PrototypeTag"))
{
strTag = PrototypeTag->GetText();
Desc.ModelPrototypeTags.push_back(CMyTools::ToWstring(strTag));
}
Desc.pParentTransform = pContainerObject->Get_Component<CTransform>();
const string strKey = strTag;
/* Position */
tinyxml2::XMLElement* Position = PartObject->FirstChildElement("Position");
Position->QueryFloatAttribute("x", &Desc.vPosition.x);
Position->QueryFloatAttribute("y", &Desc.vPosition.y);
Position->QueryFloatAttribute("z", &Desc.vPosition.z);
/* Scale */
tinyxml2::XMLElement* Scale = PartObject->FirstChildElement("Scale");
Scale->QueryFloatAttribute("x", &Desc.vScale.x);
Scale->QueryFloatAttribute("y", &Desc.vScale.y);
Scale->QueryFloatAttribute("z", &Desc.vScale.z);
/* Rotation */
tinyxml2::XMLElement* Rotation = PartObject->FirstChildElement("Rotation");
Rotation->QueryFloatAttribute("x", &Desc.vRotation.x);
Rotation->QueryFloatAttribute("y", &Desc.vRotation.y);
Rotation->QueryFloatAttribute("z", &Desc.vRotation.z);
pContainerObject->Add_Part<CMapObject_LOD>(strKey, g_iStaticLevel, nullptr, &Desc);
}
#pragma endregion
}
#pragma endregion
}
return S_OK;
}
HRESULT CMapObject_Manager::Load_ContainerData(const _char* pFileName, const _char* pContainerName)
{
tinyxml2::XMLDocument xmlDoc;
string strPath = "../Bin/Resources/Data/Map/" + string(pFileName) + ".xml";
if ((tinyxml2::XML_SUCCESS != xmlDoc.LoadFile(strPath.c_str())))
return E_FAIL;
tinyxml2::XMLElement* root = xmlDoc.FirstChildElement("Land");
if (nullptr == root)
{
MSG_BOX("Failed to Find root");
return S_OK;
}
tinyxml2::XMLElement* TargetContainer = { nullptr };
for (auto* Container = root->FirstChildElement("Container"); Container; Container = Container->NextSiblingElement("Container"))
{
const _char* pName = {};
Container->QueryStringAttribute("Name", &pName);
if (!strcmp(pContainerName, pName))
{
TargetContainer = Container;
break;
}
}
/* Failed to find Container */
if (nullptr == TargetContainer)
{
xmlDoc.Clear();
MSG_BOX("Failed to find Container");
return S_OK;
}
#pragma region ADD_CONTAINER_OBJECT
CBuildingContainer* pContainerObject = { nullptr };
CMapContainer::MAP_CONTAINER_DESC ContainerDesc = {};
auto* ContainerPosition = TargetContainer->FirstChildElement("Position");
ContainerPosition->QueryFloatAttribute("x", &ContainerDesc.vPosition.x);
ContainerPosition->QueryFloatAttribute("y", &ContainerDesc.vPosition.y);
ContainerPosition->QueryFloatAttribute("z", &ContainerDesc.vPosition.z);
auto* ContainerScale = TargetContainer->FirstChildElement("Scale");
ContainerScale->QueryFloatAttribute("x", &ContainerDesc.vScale.x);
ContainerScale->QueryFloatAttribute("y", &ContainerDesc.vScale.y);
ContainerScale->QueryFloatAttribute("z", &ContainerDesc.vScale.z);
auto* ContainerRotation = TargetContainer->FirstChildElement("Rotation");
ContainerRotation->QueryFloatAttribute("x", &ContainerDesc.vRotation.x);
ContainerRotation->QueryFloatAttribute("y", &ContainerDesc.vRotation.y);
ContainerRotation->QueryFloatAttribute("z", &ContainerDesc.vRotation.z);
ContainerDesc.strName = string(pContainerName);
m_pGameInstance->Add_GameObject_ToLayer<CBuildingContainer>(
g_iStaticLevel, ENUM_CLASS(LEVEL::MAP), TEXT("Layer_Building"), &ContainerDesc, nullptr, reinterpret_cast<CGameObject**>(&pContainerObject));
#pragma endregion
#pragma region ADD_PARTOBJECT
for (auto* PartObject = TargetContainer->FirstChildElement("PartObject"); PartObject; PartObject = PartObject->NextSiblingElement("PartObject"))
{
_uint iLodLevel = {};
PartObject->QueryUnsignedAttribute("Lod_Level", &iLodLevel);
#pragma region MAPOBJECT_STATIC
if (0 == iLodLevel) /* MapObject_Static */
{
CMapObject_Static::MAPOBJECT_STATIC_DESC Desc = {};
string strTag = {};
auto* PrototypeTag = PartObject->FirstChildElement("PrototypeTag");
strTag = PrototypeTag->GetText();
Desc.strModelPrototypeTag = CMyTools::ToWstring(strTag);
Desc.iMaxLodLevel = iLodLevel;
Desc.pParentTransform = pContainerObject->Get_Component<CTransform>();
const string strKey = strTag;
/* Position */
tinyxml2::XMLElement* Position = PartObject->FirstChildElement("Position");
Position->QueryFloatAttribute("x", &Desc.vPosition.x);
Position->QueryFloatAttribute("y", &Desc.vPosition.y);
Position->QueryFloatAttribute("z", &Desc.vPosition.z);
/* Scale */
tinyxml2::XMLElement* Scale = PartObject->FirstChildElement("Scale");
Scale->QueryFloatAttribute("x", &Desc.vScale.x);
Scale->QueryFloatAttribute("y", &Desc.vScale.y);
Scale->QueryFloatAttribute("z", &Desc.vScale.z);
/* Rotation */
tinyxml2::XMLElement* Rotation = PartObject->FirstChildElement("Rotation");
Rotation->QueryFloatAttribute("x", &Desc.vRotation.x);
Rotation->QueryFloatAttribute("y", &Desc.vRotation.y);
Rotation->QueryFloatAttribute("z", &Desc.vRotation.z);
pContainerObject->Add_Part<CMapObject_Static>(strKey, g_iStaticLevel, nullptr, &Desc);
}
#pragma endregion
#pragma region MAPOBJECT_LOD
else
{
CMapObject_LOD::MAPOBJECT_LOD_DESC Desc = {};
string strTag = {};
for (auto* PrototypeTag = PartObject->FirstChildElement("PrototypeTag"); PrototypeTag; PrototypeTag = PrototypeTag->NextSiblingElement("PrototypeTag"))
{
strTag = PrototypeTag->GetText();
Desc.ModelPrototypeTags.push_back(CMyTools::ToWstring(strTag));
}
Desc.iMaxLodLevel = iLodLevel;
Desc.pParentTransform = pContainerObject->Get_Component<CTransform>();
const string strKey = strTag;
/* Position */
tinyxml2::XMLElement* Position = PartObject->FirstChildElement("Position");
Position->QueryFloatAttribute("x", &Desc.vPosition.x);
Position->QueryFloatAttribute("y", &Desc.vPosition.y);
Position->QueryFloatAttribute("z", &Desc.vPosition.z);
/* Scale */
tinyxml2::XMLElement* Scale = PartObject->FirstChildElement("Scale");
Scale->QueryFloatAttribute("x", &Desc.vScale.x);
Scale->QueryFloatAttribute("y", &Desc.vScale.y);
Scale->QueryFloatAttribute("z", &Desc.vScale.z);
/* Rotation */
tinyxml2::XMLElement* Rotation = PartObject->FirstChildElement("Rotation");
Rotation->QueryFloatAttribute("x", &Desc.vRotation.x);
Rotation->QueryFloatAttribute("y", &Desc.vRotation.y);
Rotation->QueryFloatAttribute("z", &Desc.vRotation.z);
pContainerObject->Add_Part<CMapObject_LOD>(strKey, g_iStaticLevel, nullptr, &Desc);
}
#pragma endregion
}
#pragma endregion
// m_MapDatas.push_back(Map_Data);
//}
return S_OK;
}
@@ -232,7 +650,6 @@ HRESULT CMapObject_Manager::Load_MapData(const _char* pFileName)
void CMapObject_Manager::Update_PrototypeList()
{
GUI::Begin("Model Prototype List");
GUI::Checkbox("bLOD", &m_bLOD);
for (auto& Tag : m_ModelPrototypeTags)
{
if (_wstring::npos != Tag.find(L"Lod"))
@@ -240,16 +657,25 @@ void CMapObject_Manager::Update_PrototypeList()
if (ImGui::Button(CMyTools::ToString(Tag).c_str()))
{
if(false == m_bLOD)
_uint iNumLodModel = {};
if(false == Find_Lod_Prototype(Tag, &iNumLodModel))
{
CMapObject_Static::MAPOBJECT_STATIC_DESC Desc = {};
Desc.pModelPrototypeTag = Tag.c_str();
Desc.pParentTransform = m_pContainer->Get_Component<CTransform>();
Desc.strModelPrototypeTag = Tag;
Desc.pParentTransform = m_pTransformCom;
Desc.vPosition = _float3(0.f, 0.f, 0.f);
Desc.vRotation = _float3(0.f, 0.f, 0.f);
Desc.vScale = _float3(1.f, 1.f, 1.f);
CMapObject_Static* pMapObject = { nullptr };
const string strKey = CMyTools::ToString(Tag);
m_pContainer->Add_Part<CMapObject_Static>(strKey, 0, &pMapObject, &Desc);
pMapObject = m_pGameInstance->Clone_Prototype<CMapObject_Static>(g_iStaticLevel, &Desc);
/* if(FAILED(m_pContainer->Add_Part<CMapObject_Static>(strKey, 0, &pMapObject, &Desc)))
break;*/
m_MapObjects.push_back(pMapObject);
}
@@ -257,45 +683,34 @@ void CMapObject_Manager::Update_PrototypeList()
{
CMapObject_LOD::MAPOBJECT_LOD_DESC Desc = {};
vector<const _tchar*> PrototypeTags;
vector<_wstring> PrototypeTags;
PrototypeTags.push_back(Tag.c_str());
PrototypeTags.push_back(Tag);
Desc.iMaxLodLevel = 0;
Desc.ModelPrototypeTags = PrototypeTags;
Desc.pParentTransform = m_pContainer->Get_Component<CTransform>();
Desc.pParentTransform = m_pTransformCom;
Desc.vPosition = _float3(0.f, 0.f, 0.f);
Desc.vRotation = _float3(0.f, 0.f, 0.f);
Desc.vScale = _float3(1.f, 1.f, 1.f);
CMapObject_Static* pMapObject = { nullptr };
CMapObject_LOD* pMapObject = { nullptr };
const string strKey = CMyTools::ToString(Tag);
m_pContainer->Add_Part<CMapObject_LOD>(strKey, 0, nullptr, &Desc);
pMapObject = m_pGameInstance->Clone_Prototype<CMapObject_LOD>(g_iStaticLevel, &Desc);
//if (FAILED(m_pContainer->Add_Part<CMapObject_LOD>(strKey, 0, &pMapObject, &Desc)))
// break;
m_MapObjects.push_back(pMapObject);
}
}
}
GUI::End();
GUI::Begin("LOD Model Prototype List");
for (auto& Tag : m_LODModelPrototypeTags)
{
if (ImGui::Button(CMyTools::ToString(Tag).c_str()))
{
if (nullptr != m_pSelectObject)
{
CMapObject_LOD* pLodObject = dynamic_cast<CMapObject_LOD*>(m_pSelectObject);
if (nullptr != pLodObject)
for (_uint i = 0; i < iNumLodModel; ++i)
{
pLodObject->Add_LodModel(Tag.c_str());
}
else
{
MSG_BOX("Failed to Add Lod Model");
}
if (m_pSelectObject->isDead())
m_pSelectObject = nullptr;
_wstring strLodTag = Tag + L"_Lod" + to_wstring(i + 1);
pMapObject->Add_LodModel(strLodTag.c_str());
}
}
}
}
@@ -355,6 +770,58 @@ void CMapObject_Manager::Update_Edit()
GUI::End();
}
void CMapObject_Manager::Update_ContainerObject()
{
GUI::Begin("Edit Container");
CLayer* pLayer = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::MAP), TEXT("Layer_Building"));
if (nullptr == pLayer)
{
GUI::End();
return;
}
const list<CGameObject*>* pList = pLayer->Get_Objects();
_uint iIndex = {};
if (false == (*pList).empty())
{
CGameObject* pSelectObject = { nullptr };
for (auto& pObject : (*pList))
{
if (GUI::Button((dynamic_cast<CMapContainer*>(pObject)->Get_Name().c_str())))
{
m_iContainerObjectIndex = iIndex;
}
if (iIndex == m_iContainerObjectIndex)
pSelectObject = pObject;
++iIndex;
}
if (nullptr != pSelectObject)
pSelectObject->Describe_Entity();
}
GUI::End();
}
_bool CMapObject_Manager::Find_Lod_Prototype(_wstring strPrototypeTag, _uint* iCount)
{
for (auto& Tag : m_LODModelPrototypeTags)
{
if (_wstring::npos != Tag.find(strPrototypeTag))
(*iCount)++;
}
if (0 < *iCount)
return true;
return false;
}
CMapObject_Manager* CMapObject_Manager::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, vector<_wstring>& ModelPrototypeTags)
{
@@ -386,6 +853,11 @@ void CMapObject_Manager::Free()
{
__super::Free();
for (auto& pObject : m_MapObjects)
{
SAFE_RELEASE(pObject);
}
SAFE_RELEASE(m_pContainer);
}
@@ -40,8 +40,10 @@ void CMapObject_Static::Late_Update(_float fTimeDelta)
}
#endif
XMStoreFloat4x4(&m_CombinedWorldMatrix, m_pTransformCom->Get_XMWorldMatrix() * m_pParentTransformCom->Get_XMWorldMatrix());
_float4 vPos;
XMStoreFloat4(&vPos, Get_WorldPostion());
XMStoreFloat4(&vPos, m_pTransformCom->Get_State(STATE::POSITION));
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this, vPos, 20.f);
}
@@ -62,8 +64,17 @@ HRESULT CMapObject_Static::Render()
return E_FAIL;
}
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::DEFAULT)))) {
return E_FAIL;
if (m_bSelected)
{
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::MAPTOOL)))) {
return E_FAIL;
}
}
else
{
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::DEFAULT)))) {
return E_FAIL;
}
}
if (FAILED(m_pModelCom->Render(i))) {
@@ -81,9 +92,11 @@ HRESULT CMapObject_Static::Initialize_Prototype()
HRESULT CMapObject_Static::Initialize(void* pArg)
{
m_iMaxLodLevel = 0;
MAPOBJECT_STATIC_DESC* pDesc = static_cast<MAPOBJECT_STATIC_DESC*>(pArg);
m_strModelPrototypeTag = pDesc->pModelPrototypeTag;
m_strModelPrototypeTag = pDesc->strModelPrototypeTag;
if (FAILED(__super::Initialize(pArg)))
return E_FAIL;
@@ -94,9 +107,13 @@ HRESULT CMapObject_Static::Initialize(void* pArg)
#ifdef _DEBUG
m_bSelected = false;
m_vPosition = _float3(0.f, 0.f, 0.f);
m_vRotation = _float3(0.f, 0.f, 0.f);
m_vScale = _float3(1.f, 1.f, 1.f);
m_vPosition = pDesc->vPosition;
m_vScale = pDesc->vScale;
m_vRotation = pDesc->vRotation;
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&m_vPosition), 1.f));
m_pTransformCom->Set_Scale(m_vScale);
m_pTransformCom->Rotation(XMConvertToRadians(m_vRotation.x), XMConvertToRadians(m_vRotation.y), XMConvertToRadians(m_vRotation.z));
#endif // _DEBUG
return S_OK;
@@ -126,7 +143,7 @@ HRESULT CMapObject_Static::Ready_Components()
HRESULT CMapObject_Static::Bind_ShaderResources()
{
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", &m_CombinedWorldMatrix))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
@@ -139,21 +156,7 @@ HRESULT CMapObject_Static::Bind_ShaderResources()
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
return E_FAIL;
}
//if (FAILED(m_pShaderCom->Bind_RawValue("g_vCamPosition", m_pGameInstance->Get_CamPosition(), sizeof(_float4)))) {
// return E_FAIL;
//}
//if (FAILED(m_pShaderCom->Bind_RawValue("g_bRimLight", &m_bRimLight, sizeof(_bool)))) {
// return E_FAIL;
//}
//if (FAILED(m_pShaderCom->Bind_RawValue("g_fRimStrength", &m_fRimLightStrength, sizeof(_float)))) {
// return E_FAIL;
//}
//if (FAILED(m_pShaderCom->Bind_RawValue("g_fRimPower", &m_fRimLightPower, sizeof(_float)))) {
// return E_FAIL;
//}
//if (FAILED(m_pShaderCom->Bind_RawValue("g_vRimColor", &m_vRimLightColor, sizeof(_float3)))) {
// return E_FAIL;
//}
return S_OK;
}
@@ -7,6 +7,8 @@ NS_BEGIN(Editor)
class CBuildingContainer final : public CMapContainer
{
public:
CBuildingContainer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
CBuildingContainer(const CBuildingContainer& rhs);
@@ -16,7 +16,7 @@ namespace Editor
enum class SHADER_PASS_ANIM { DEFAULT, SHADOW, CAPTURE, BLUR, END };
enum class SHADER_PASS_CUBE { DEFAULT, SHADOW, BLUR, END };
enum class SHADER_PASS_MESH { DEFAULT, SHADOW, SKYBOX, ALPHABLEND, EFFECT_ALPHABLEND, EFFECT_BLEND, EFFECT_ALPHABLEND_CULL, EFFECT_BLEND_CULL, CAPTURE, BLUR, EFFECT_ALPHABLEND_UVMOVE, END };
enum class SHADER_PASS_MESH { DEFAULT, SHADOW, SKYBOX, ALPHABLEND, EFFECT_ALPHABLEND, EFFECT_BLEND, EFFECT_ALPHABLEND_CULL, EFFECT_BLEND_CULL, CAPTURE, BLUR, EFFECT_ALPHABLEND_UVMOVE, MAPTOOL ,END };
enum class SHADER_PASS_NORTEX { DEFAULT, TERRAIN, END };
enum class SHADER_PASS_PARTICLE { EXPLOSION, END };
enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, END };
@@ -7,6 +7,14 @@ NS_BEGIN(Editor)
class CMapContainer abstract : public CContainerObject
{
public:
typedef struct tagMapContainerDesc
{
_string strName;
_float3 vPosition;
_float3 vScale;
_float3 vRotation;
}MAP_CONTAINER_DESC;
public:
CMapContainer(ID3D11Device * pDevice, ID3D11DeviceContext * pContext);
CMapContainer(const CMapContainer& rhs);
@@ -17,11 +25,24 @@ class CMapContainer abstract : public CContainerObject
virtual void Late_Update(_float fTimeDelta) override;
virtual HRESULT Render() override;
virtual _string& Get_Name() { return m_strName; }
virtual HRESULT Save_PartObjects(tinyxml2::XMLDocument& Doc, tinyxml2::XMLElement* Container);
protected:
virtual HRESULT Initialize_Prototype() override;
virtual HRESULT Initialize(void* pArg) override;
virtual HRESULT Ready_Components(void* pArg) override;
protected:
_string m_strName = {};
_bool m_bSelected = {};
_uint m_iMaxLodLevel = {};
_float3 m_vPosition = {};
_float3 m_vRotation = {};
_float3 m_vScale = {};
public:
virtual void Free() override;
};
@@ -25,6 +25,7 @@ class CMapObject abstract : public CPartObject
public:
virtual _wstring Get_PrototypeTag(_uint iLodIndex = 0);
virtual _uint Get_LodLevel() { return m_iMaxLodLevel; }
protected:
@@ -35,7 +36,11 @@ class CMapObject abstract : public CPartObject
HRESULT Ready_Components();
#ifdef _DEBUG
protected:
_bool m_bSelected = {};
_uint m_iMaxLodLevel = {};
_float3 m_vPosition = {};
_float3 m_vRotation = {};
_float3 m_vScale = {};
@@ -11,7 +11,10 @@ class CMapObject_LOD final : public CMapObject
typedef struct tagMapObjectLodDesc : public PARTOBJECT_DESC
{
_uint iMaxLodLevel{};
vector<const _tchar*> ModelPrototypeTags;
vector<_wstring> ModelPrototypeTags;
_float3 vPosition;
_float3 vScale;
_float3 vRotation;
}MAPOBJECT_LOD_DESC;
private:
@@ -38,8 +41,13 @@ class CMapObject_LOD final : public CMapObject
_uint m_iMaxLodLevel = {};
_uint m_iLodIndex = {};
CShader* m_pShaderCom = { nullptr };
vector<CModel*> m_pModelComs;
vector<_wstring> m_ModelPrototypeTags;
private:
HRESULT Ready_Components();
HRESULT Bind_ShaderResources();
@@ -27,22 +27,31 @@ class CMapObject_Manager final : public CGameObject
private:
class CMapObject* m_pSelectObject = { nullptr };
list<class CMapObject*> m_MapObjects = { nullptr };
list<class CMapObject*> m_MapObjects = {};
vector<_wstring> m_ModelPrototypeTags;
vector<_wstring> m_LODModelPrototypeTags;
_bool m_bLOD = { false };
class CBuildingContainer* m_pContainer = { nullptr };
_uint m_iContainerObjectIndex = {};
class CBuildingContainer* m_pContainer = { nullptr };
_char m_szSaveContainerName[MAX_PATH] = {};
private:
HRESULT Ready_Components();
HRESULT Bind_ShaderResources();
#pragma region SAVE_LOAD
HRESULT Save_MapData(const _char* pFileName);
HRESULT Save_ContainerData(const _char* pFileName, const _char* pContainerName);
HRESULT Load_MapData(const _char* pFileName);
HRESULT Load_ContainerData(const _char* pFileName, const _char* pContainerName);
#pragma endregion
void Update_PrototypeList();
void Update_ObjectList();
void Update_Edit();
void Update_ContainerObject();
_bool Find_Lod_Prototype(_wstring strPrototypeTag, _uint* iCount);
public:
static CMapObject_Manager* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, vector<_wstring>& ModelPrototypeTags);
@@ -11,7 +11,10 @@ class CMapObject_Static final : public CMapObject
typedef struct tagMapObjectStaticDesc : public PARTOBJECT_DESC
{
_uint iMaxLodLevel{};
const _tchar* pModelPrototypeTag;
_wstring strModelPrototypeTag;
_float3 vPosition;
_float3 vScale;
_float3 vRotation;
}MAPOBJECT_STATIC_DESC;
private:
@@ -104,7 +104,7 @@ void CGameInstance::Update_Engine(_float fTimeDelta)
m_pMouse_Manager->Update();
//m_pSound_Manager->Update();
m_pPicking->Update();
//m_pPicking->Update();
m_pObject_Manager->Priority_Update(fTimeDelta);
+2 -2
View File
@@ -464,8 +464,8 @@ HRESULT CMaterial::Initialize(const _char* pModelFilePath, const SaveMaterial& _
_splitpath_s(pModelFilePath, szDrive, MAX_PATH, szDir, MAX_PATH, nullptr, 0, nullptr, 0);
char szFullPath[MAX_PATH] = {};
strcpy_s(szFullPath, szDrive);
strcat_s(szFullPath, path.c_str());
//(szFullPath, szDrive);
strcpy_s(szFullPath, path.c_str());
_tchar szPerfectPath[MAX_PATH] = {};
MultiByteToWideChar(CP_ACP, 0, szFullPath, -1, szPerfectPath, MAX_PATH);