Skip to content

Commit

Permalink
More actors
Browse files Browse the repository at this point in the history
  • Loading branch information
LagoLunatic committed Apr 26, 2020
1 parent c101b32 commit 36533ef
Show file tree
Hide file tree
Showing 8 changed files with 152 additions and 80 deletions.
22 changes: 15 additions & 7 deletions Editor/Editor/Entities/Actors/obj_flame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Text;
using System.Threading.Tasks;
using WindEditor.ViewModel;
using OpenTK;

namespace WindEditor
{
Expand All @@ -22,16 +23,23 @@ public override void PreSave()

private void UpdateModel()
{
switch (Unknown_5)
VisualScaleMultiplier = new Vector3(1f, 1f, 1f);
switch (Type)
{
case 0:
case 3:
case TypeEnum.Small_Jet:
m_actorMeshes = WResourceManager.LoadActorResource("Medium Magma Jet");
VisualScaleMultiplier = new Vector3(0.5f, 0.5f, 0.5f);
break;
case TypeEnum.Medium_Jet:
default:
m_actorMeshes = WResourceManager.LoadActorResource("Small Pillar of Flames");
m_actorMeshes = WResourceManager.LoadActorResource("Medium Magma Jet");
break;
case TypeEnum.Large_Jet:
m_actorMeshes = WResourceManager.LoadActorResource("Large Magma Jet");
VisualScaleMultiplier = new Vector3(1f, 0.815f, 1f);
break;
case 1:
case 2:
m_actorMeshes = WResourceManager.LoadActorResource("Large Pillar of Flames");
case TypeEnum.Very_Large_Jet:
m_actorMeshes = WResourceManager.LoadActorResource("Large Magma Jet");
break;
}
}
Expand Down
1 change: 1 addition & 0 deletions Editor/Editor/Entities/Actors/obj_vfan.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public partial class obj_vfan
public override void PostLoad()
{
base.PostLoad();
m_actorMeshes = WResourceManager.LoadActorResource("Ganon's Tower Destructible Door");
}

public override void PreSave()
Expand Down
121 changes: 76 additions & 45 deletions Editor/Editor/Templates/ActorTemplates.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12077,8 +12077,36 @@ override public void PopulateDefaultProperties()
public partial class obj_flame : Actor
{
// Auto-Generated Properties from Templates

[WProperty("obj_flame", "Unknown_1", true, "", SourceScene.Room)]
public enum TypeEnum
{
Medium_Jet = 0,
Large_Jet = 1,
Very_Large_Jet = 2,
Small_Jet = 3,
}


[WProperty("Magma Jet", "Type", true, "", SourceScene.Room)]
public TypeEnum Type
{
get
{
int value_as_int = (int)((m_Parameters & 0x30000000) >> 28);
if (!Enum.IsDefined(typeof(TypeEnum), value_as_int))
value_as_int = 0;
return (TypeEnum)value_as_int;
}

set
{
int value_as_int = (int)value;
m_Parameters = (int)(m_Parameters & ~0x30000000 | (value_as_int << 28 & 0x30000000));
OnPropertyChanged("Type");
UpdateModel();
}
}

[WProperty("Magma Jet", "Unknown_1", true, "", SourceScene.Room)]
public int Unknown_1
{
get
Expand All @@ -12095,7 +12123,7 @@ public int Unknown_1
}
}

[WProperty("obj_flame", "Unknown_2", true, "", SourceScene.Room)]
[WProperty("Magma Jet", "Unknown_2", true, "", SourceScene.Room)]
public int Unknown_2
{
get
Expand All @@ -12112,7 +12140,7 @@ public int Unknown_2
}
}

[WProperty("obj_flame", "Unknown_3", true, "", SourceScene.Room)]
[WProperty("Magma Jet", "Unknown_3", true, "", SourceScene.Room)]
public int Unknown_3
{
get
Expand All @@ -12129,7 +12157,7 @@ public int Unknown_3
}
}

[WProperty("obj_flame", "Unknown_4", true, "", SourceScene.Room)]
[WProperty("Magma Jet", "Unknown_4", true, "", SourceScene.Room)]
public int Unknown_4
{
get
Expand All @@ -12146,24 +12174,7 @@ public int Unknown_4
}
}

[WProperty("obj_flame", "Unknown_5", true, "", SourceScene.Room)]
public int Unknown_5
{
get
{
int value_as_int = (int)((m_Parameters & 0x30000000) >> 28);
return value_as_int;
}

set
{
int value_as_int = value;
m_Parameters = (int)(m_Parameters & ~0x30000000 | (value_as_int << 28 & 0x30000000));
OnPropertyChanged("Unknown_5");
}
}

[WProperty("obj_flame", "Unknown_6", true, "", SourceScene.Room)]
[WProperty("Magma Jet", "Unknown_6", true, "", SourceScene.Room)]
public int Unknown_6
{
get
Expand Down Expand Up @@ -12193,7 +12204,6 @@ override public void PopulateDefaultProperties()
Unknown_2 = -1;
Unknown_3 = -1;
Unknown_4 = -1;
Unknown_5 = -1;
Unknown_6 = -1;
}
}
Expand Down Expand Up @@ -14729,26 +14739,40 @@ override public void PopulateDefaultProperties()
public partial class obj_mtest : TriggerRegion
{
// Auto-Generated Properties from Templates

[WProperty("obj_mtest", "Unknown_1", true, "", SourceScene.Room)]
public int Unknown_1
public enum TypeEnum
{
Unknown_0 = 0,
Unknown_1 = 1,
Unknown_2 = 2,
Unknown_3 = 3,
Water_Splashes = 4,
Unknown_5 = 5,
Unknown_6 = 6,
Unknown_7 = 7,
}


[WProperty("obj_mtest", "Type", true, "", SourceScene.Room)]
public TypeEnum Type
{
get
{
int value_as_int = (int)((m_Parameters & 0x00000007) >> 0);
return value_as_int;
if (!Enum.IsDefined(typeof(TypeEnum), value_as_int))
value_as_int = 0;
return (TypeEnum)value_as_int;
}

set
{
int value_as_int = value;
int value_as_int = (int)value;
m_Parameters = (int)(m_Parameters & ~0x00000007 | (value_as_int << 0 & 0x00000007));
OnPropertyChanged("Unknown_1");
OnPropertyChanged("Type");
}
}

[WProperty("obj_mtest", "Unknown_2", true, "", SourceScene.Room)]
public int Unknown_2
[WProperty("obj_mtest", "Switch to Check", true, "", SourceScene.Room)]
public int SwitchtoCheck
{
get
{
Expand All @@ -14760,24 +14784,33 @@ public int Unknown_2
{
int value_as_int = value;
m_Parameters = (int)(m_Parameters & ~0x0000FF00 | (value_as_int << 8 & 0x0000FF00));
OnPropertyChanged("Unknown_2");
OnPropertyChanged("SwitchtoCheck");
}
}
public enum ConditionTypeEnum
{
Appear_if_switch_is_set = 0,
Appear_if_switch_is_not_set = 1,
Always_appear = 2,
}

[WProperty("obj_mtest", "Unknown_3", true, "", SourceScene.Room)]
public int Unknown_3

[WProperty("obj_mtest", "Condition Type", true, "", SourceScene.Room)]
public ConditionTypeEnum ConditionType
{
get
{
int value_as_int = (int)((m_Parameters & 0x000F0000) >> 16);
return value_as_int;
if (!Enum.IsDefined(typeof(ConditionTypeEnum), value_as_int))
value_as_int = 2;
return (ConditionTypeEnum)value_as_int;
}

set
{
int value_as_int = value;
int value_as_int = (int)value;
m_Parameters = (int)(m_Parameters & ~0x000F0000 | (value_as_int << 16 & 0x000F0000));
OnPropertyChanged("Unknown_3");
OnPropertyChanged("ConditionType");
}
}

Expand Down Expand Up @@ -14807,9 +14840,7 @@ public obj_mtest(FourCC fourCC, WWorld world) : base(fourCC, world)
override public void PopulateDefaultProperties()
{
base.PopulateDefaultProperties();
Unknown_1 = -1;
Unknown_2 = -1;
Unknown_3 = -1;
SwitchtoCheck = -1;
Unknown_4 = -1;
}
}
Expand Down Expand Up @@ -16651,8 +16682,8 @@ public partial class obj_vfan : Actor
{
// Auto-Generated Properties from Templates

[WProperty("obj_vfan", "Unknown_1", true, "", SourceScene.Room)]
public int Unknown_1
[WProperty("Ganon's Tower Destructible Door", "Destroyed Switch", true, "", SourceScene.Room)]
public int DestroyedSwitch
{
get
{
Expand All @@ -16664,7 +16695,7 @@ public int Unknown_1
{
int value_as_int = value;
m_Parameters = (int)(m_Parameters & ~0x000000FF | (value_as_int << 0 & 0x000000FF));
OnPropertyChanged("Unknown_1");
OnPropertyChanged("DestroyedSwitch");
}
}

Expand All @@ -16677,7 +16708,7 @@ public obj_vfan(FourCC fourCC, WWorld world) : base(fourCC, world)
override public void PopulateDefaultProperties()
{
base.PopulateDefaultProperties();
Unknown_1 = -1;
DestroyedSwitch = -1;
}
}

Expand Down
2 changes: 1 addition & 1 deletion Editor/resources/ActorDatabase.json
Original file line number Diff line number Diff line change
Expand Up @@ -2931,7 +2931,7 @@
},
{
"Actor Name": "Vfan",
"English Name": "obj_vfan",
"English Name": "Ganon's Tower Destructible Door",
"ActorClassType": "obj_vfan"
},
{
Expand Down
13 changes: 11 additions & 2 deletions Editor/resources/ActorResourceDatabase.json
Original file line number Diff line number Diff line change
Expand Up @@ -4116,7 +4116,7 @@
]
},
{
"Name": "Small Pillar of Flames",
"Name": "Medium Magma Jet",
"Archive": "Yfire_00",
"Models": [
{
Expand All @@ -4139,7 +4139,7 @@
]
},
{
"Name": "Large Pillar of Flames",
"Name": "Large Magma Jet",
"Archive": "Yfire_00",
"Models": [
{
Expand Down Expand Up @@ -4284,4 +4284,13 @@
}
]
},
{
"Name": "Ganon's Tower Destructible Door",
"Archive": "Vfan",
"Models": [
{
"Path": "bdl/v_fan_00.bdl",
}
]
},
]
Loading

0 comments on commit 36533ef

Please sign in to comment.