Skip to content

Commit

Permalink
feat: [クラスラッパー]DirectSoundオブジェクトを取得・変更できるように
Browse files Browse the repository at this point in the history
  • Loading branch information
automatic9045 committed Sep 9, 2023
1 parent ee66e5b commit 0124454
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Libs/BveTypes/ClassWrappers/Public/Forms/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
using System.Threading.Tasks;
using System.Windows.Forms;

using SlimDX.DirectSound;

using Mackoy.Bvets;

using FastMember;
Expand All @@ -23,6 +25,8 @@ private static void Initialize(BveTypeSet bveTypes)
{
ClassMemberSet members = bveTypes.GetClassInfoOf<MainForm>();

DirectSoundField = members.GetSourceFieldOf(nameof(DirectSound));

ContextMenuField = members.GetSourceFieldOf(nameof(ContextMenu));

CurrentScenarioInfoField = members.GetSourceFieldOf(nameof(CurrentScenarioInfo));
Expand Down Expand Up @@ -81,6 +85,16 @@ protected MainForm(object src) : base(src)
public ChartForm ChartForm => ClassWrappers.ChartForm.FromSource(ChartFormField.GetValue(Src));


private static FastField DirectSoundField;
/// <summary>
/// BVE が使用する DirectSound デバイスを取得・設定します。
/// </summary>
public DirectSound DirectSound
{
get => DirectSoundField.GetValue(Src);
set => DirectSoundField.SetValue(Src, value);
}

private static FastField ContextMenuField;
/// <summary>
/// 右クリックで表示されるショートカット メニューを取得・設定します。
Expand Down
1 change: 1 addition & 0 deletions Libs/BveTypes/WrapTypes/5.8.7554.391.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<Field WrapperProperty="LoadingProgressForm" Original="k" IsOriginalNonPublic="true"/>
<Field WrapperProperty="TimePosForm" Original="d" IsOriginalNonPublic="true"/>
<Field WrapperProperty="ChartForm" Original="e" IsOriginalNonPublic="true"/>
<Field WrapperProperty="DirectSound" Original="a" IsOriginalNonPublic="true"/>
<Field WrapperProperty="ContextMenu" Original="y" IsOriginalNonPublic="true"/>
<Field WrapperProperty="CurrentScenarioInfo" Original="q" IsOriginalNonPublic="true"/>
<Field WrapperProperty="CurrentScenario" Original="n" IsOriginalNonPublic="true"/>
Expand Down
1 change: 1 addition & 0 deletions Libs/BveTypes/WrapTypes/6.0.7554.619.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<Field WrapperProperty="LoadingProgressForm" Original="k" IsOriginalNonPublic="true"/>
<Field WrapperProperty="TimePosForm" Original="d" IsOriginalNonPublic="true"/>
<Field WrapperProperty="ChartForm" Original="e" IsOriginalNonPublic="true"/>
<Field WrapperProperty="DirectSound" Original="a" IsOriginalNonPublic="true"/>
<Field WrapperProperty="ContextMenu" Original="y" IsOriginalNonPublic="true"/>
<Field WrapperProperty="CurrentScenarioInfo" Original="q" IsOriginalNonPublic="true"/>
<Field WrapperProperty="CurrentScenario" Original="n" IsOriginalNonPublic="true"/>
Expand Down

0 comments on commit 0124454

Please sign in to comment.