Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dialogue opcode adjustments #72

Merged
merged 1 commit into from
Jan 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ public enum DialogueOpcode : byte
/// </summary>
Unknown09 = 0x09,

/// <summary>
/// Seems to be associated with Textbox Options Opcode,
/// links options to function handling
/// </summary>
Unknown0A = 0x0A,

/// <summary>
/// Seems to deal with camera movement
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public static IMapDialogueOpcode ParseNextOpcode(Stream reader, byte opcode)
DialogueOpcode.Unknown07 => Unknown07Opcode.ReadOpcode(reader),
DialogueOpcode.Unknown08 => Unknown08Opcode.ReadOpcode(reader),
DialogueOpcode.Unknown09 => Unknown09Opcode.ReadOpcode(reader),
DialogueOpcode.Unknown0A => Unknown0AOpcode.ReadOpcode(reader),
DialogueOpcode.CameraMove => CameraMoveOpcode.ReadOpcode(reader),
DialogueOpcode.Unknown0C => Unknown0COpcode.ReadOpcode(reader),
DialogueOpcode.Unknown0D => Unknown0DOpcode.ReadOpcode(reader),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using System.IO;
using G2DataGUI.IO.Streams;

namespace G2DataGUI.Common.Data.Maps.MapDialogueOpcodes;

public class Unknown0AOpcode : IMapDialogueOpcode
{
public DialogueOpcode Opcode { get; set; } = DialogueOpcode.Unknown0A;
public byte Unknown1 { get; set; }
public byte Unknown2 { get; set; }
public byte Unknown3 { get; set; }
public byte Unknown4 { get; set; }
public byte Unknown5 { get; set; }
public byte Unknown6 { get; set; }

public static IMapDialogueOpcode ReadOpcode(Stream reader)
{
return new Unknown0AOpcode()
{
Unknown1 = reader.ReadRawByte(),
Unknown2 = reader.ReadRawByte(),
Unknown3 = reader.ReadRawByte(),
Unknown4 = reader.ReadRawByte(),
Unknown5 = reader.ReadRawByte(),
Unknown6 = reader.ReadRawByte(),
};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ public class Unknown10Unknown2Opcode : IUnknown10Opcode
public DialogueOpcode Opcode { get; set; } = DialogueOpcode.Unknown10;
public Unknown10Option Option { get; set; } = Unknown10Option.Unknown2;

public static IMapDialogueOpcode ReadOpcode(Stream reader) => new Unknown10Unknown1Opcode();
public static IMapDialogueOpcode ReadOpcode(Stream reader) => new Unknown10Unknown2Opcode();
}
3 changes: 0 additions & 3 deletions src/G2DataGUI.Common/Data/Maps/Maps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ private void ReadMaps()
{
reader?.Dispose();
}

using var vorbis = new NVorbis.VorbisReader("F:\\Steam\\steamapps\\common\\Grandia II Anniversary Edition\\content\\data\\sound\\staffrollus.ogg");
var channels = vorbis.Channels;
}

private void WriteMaps()
Expand Down
2 changes: 1 addition & 1 deletion src/G2DataGUI.Common/G2DataGUI.Common.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<BaseOutputPath>..\..\build</BaseOutputPath>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/G2DataGUI.IO/G2DataGUI.IO.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<BaseOutputPath>..\..\build</BaseOutputPath>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/G2DataGUI.Tests.Common/G2DataGUI.Tests.Common.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<BaseOutputPath>..\..\build</BaseOutputPath>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

Expand Down
2 changes: 1 addition & 1 deletion src/G2DataGUI.UI.Common/G2DataGUI.UI.Common.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<BaseOutputPath>..\..\build</BaseOutputPath>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/G2DataGUI/G2DataGUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>disable</Nullable>
<PublishSingleFile>True</PublishSingleFile>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
Expand Down
52 changes: 52 additions & 0 deletions src/G2DataGUI/UI/Views/Content/MapDialogue.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,58 @@
</Border>
</TreeDataTemplate>

<TreeDataTemplate x:Key="Unknown0AOpcode"
DataType="{x:Type opcodes:Unknown0AOpcode}">
<Border Classes="BorderedGrid LightCurve">
<StackPanel>
<Grid Margin="0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0"
Margin="5,0">
<TextBlock Text="Opcode:" />
<TextBox Text="{Binding Opcode}" />
</StackPanel>
</Grid>
<Grid Margin="0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0"
Margin="5,0">
<TextBlock Text="Unknown #1:" />
<TextBox Text="{Binding Unknown1}" />
</StackPanel>
<StackPanel Grid.Column="1"
Margin="5,0">
<TextBlock Text="Unknown #2:" />
<TextBox Text="{Binding Unknown2}" />
</StackPanel>
<StackPanel Grid.Column="2"
Margin="5,0">
<TextBlock Text="Unknown #3:" />
<TextBox Text="{Binding Unknown3}" />
</StackPanel>
<StackPanel Grid.Column="3"
Margin="5,0">
<TextBlock Text="Unknown #4:" />
<TextBox Text="{Binding Unknown4}" />
</StackPanel>
<StackPanel Grid.Column="4"
Margin="5,0">
<TextBlock Text="Unknown #5:" />
<TextBox Text="{Binding Unknown5}" />
</StackPanel>
</Grid>
</StackPanel>
</Border>
</TreeDataTemplate>

<TreeDataTemplate x:Key="Unknown0COpcode"
DataType="{x:Type opcodes:Unknown0COpcode}">
<Border Classes="BorderedGrid LightCurve">
Expand Down
Loading