-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add currently known dialogue opcodes * add more textbox opcodes, document additional potential opcodes * add unknown opcodes for parsing * get all maps to not throw errors when parsing dialogue section opcodes * start trying to implement ui rendering for opcodes * use observablecollection for lists of opcodes, add basic rendering of opcodes * add styling to opcode tree * add highlight opcodes, add unknown opcode 0x16 * adjust opcode returns * fix opcode 10 mapid, fix some stream read functions * implement handling for base element index searching for listbox items * add in scnr file path parsing
- Loading branch information
Showing
64 changed files
with
2,483 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,4 +37,4 @@ public static MapDialogueOffset ReadMapDialogueOffset(Stream reader) | |
}; | ||
return offset; | ||
} | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/G2DataGUI.Common/Data/Maps/MapDialogueOpcodes/CameraMoveOpcode.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System.IO; | ||
using G2DataGUI.IO.Streams; | ||
|
||
namespace G2DataGUI.Common.Data.Maps.MapDialogueOpcodes; | ||
|
||
public class CameraMoveOpcode : IMapDialogueOpcode, IMapDialogueOpcodeReader | ||
{ | ||
public DialogueOpcode Opcode { get; set; } = DialogueOpcode.CameraMove; | ||
public byte Unknown1 { get; set; } | ||
public byte Unknown2 { get; set; } | ||
|
||
public static IMapDialogueOpcode ReadOpcode(Stream reader) | ||
{ | ||
return new CameraMoveOpcode() | ||
{ | ||
Unknown1 = reader.ReadRawByte(), | ||
Unknown2 = reader.ReadRawByte(), | ||
}; | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/G2DataGUI.Common/Data/Maps/MapDialogueOpcodes/CharacterPortaitOpcode.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System.IO; | ||
using G2DataGUI.IO.Streams; | ||
|
||
namespace G2DataGUI.Common.Data.Maps.MapDialogueOpcodes; | ||
|
||
public class CharacterPortaitOpcode : IMapDialogueOpcode, IMapDialogueOpcodeReader | ||
{ | ||
public DialogueOpcode Opcode { get; set; } = DialogueOpcode.CharacterPortait; | ||
|
||
/// <summary> | ||
/// Appears to always be 0x00 | ||
/// </summary> | ||
public byte Unknown1 { get; set; } = 0x00; | ||
|
||
public byte PortaitOffset { get; set; } | ||
|
||
public static IMapDialogueOpcode ReadOpcode(Stream reader) | ||
{ | ||
return new CharacterPortaitOpcode() | ||
{ | ||
Unknown1 = reader.ReadRawByte(), | ||
PortaitOffset = reader.ReadRawByte(), | ||
}; | ||
} | ||
} |
129 changes: 129 additions & 0 deletions
129
src/G2DataGUI.Common/Data/Maps/MapDialogueOpcodes/DialogueOpcodes.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
namespace G2DataGUI.Common.Data.Maps.MapDialogueOpcodes; | ||
|
||
public enum DialogueOpcode : byte | ||
{ | ||
/// <summary> | ||
/// Not sure how to handle text | ||
/// so considering this a No Op | ||
/// opcode, to house the text itself | ||
/// </summary> | ||
Text = 0x00, | ||
|
||
/// <summary> | ||
/// Completely unsure, likely 3 parameters | ||
/// </summary> | ||
Unknown03 = 0x03, | ||
|
||
/// <summary> | ||
/// Completely unknown, likely 1 parameter | ||
/// </summary> | ||
Unknown04 = 0x04, | ||
|
||
/// <summary> | ||
/// Seems to define a call to a script | ||
/// within the Map's script list | ||
/// </summary> | ||
ScriptCall = 0x05, | ||
|
||
/// <summary> | ||
/// Completely unknown, may be 4 parameters | ||
/// </summary> | ||
Unknown06 = 0x06, | ||
|
||
/// <summary> | ||
/// Completely unknown, may be 1 or 4 parameters | ||
/// </summary> | ||
Unknown07 = 0x07, | ||
|
||
/// <summary> | ||
/// Completely unknown, likely 2 parameters | ||
/// </summary> | ||
Unknown08 = 0x08, | ||
|
||
/// <summary> | ||
/// Completely unknown, may be 4 parameters | ||
/// </summary> | ||
Unknown09 = 0x09, | ||
|
||
/// <summary> | ||
/// Seems to deal with camera movement | ||
/// </summary> | ||
CameraMove = 0x0B, | ||
|
||
/// <summary> | ||
/// Completely unknown, seems to have 1 parameter | ||
/// </summary> | ||
Unknown0C = 0x0C, | ||
|
||
/// <summary> | ||
/// Completely unknown, seems to have 2 parameters | ||
/// </summary> | ||
Unknown0D = 0x0D, | ||
|
||
/// <summary> | ||
/// Completely unknown, no clue on parameters(1 parameter?). | ||
/// See Map 1000, section 8, offset 0x24. | ||
/// Also see Map 1000, section 10, offset 0x1F. | ||
/// </summary> | ||
Unknown10 = 0x10, | ||
|
||
/// <summary> | ||
/// Adds items to inventory | ||
/// </summary> | ||
ItemAquire = 0x11, | ||
|
||
/// <summary> | ||
/// Completely unknown, no clue on parameters | ||
/// </summary> | ||
Unknown14 = 0x14, | ||
|
||
/// <summary> | ||
/// Completely unknown, likely 4 parameters | ||
/// </summary> | ||
Unknown15 = 0x15, | ||
|
||
/// <summary> | ||
/// Completely unknown, exists with tutorial guy dialogue... | ||
/// </summary> | ||
Unknown16 = 0x16, | ||
|
||
/// <summary> | ||
/// Defines a action around textboxes | ||
/// </summary> | ||
TextBox = 0x17, | ||
|
||
/// <summary> | ||
/// Defines which character protrait to display | ||
/// </summary> | ||
CharacterPortait = 0x18, | ||
|
||
/// <summary> | ||
/// Clears/Next pages within the textbox | ||
/// </summary> | ||
NextPage = 0x1A, | ||
|
||
/// <summary> | ||
/// Completely unknown, appears to have no parameters | ||
/// </summary> | ||
Unknown1B = 0x1B, | ||
|
||
/// <summary> | ||
/// Completely unknown, seems to have 1 parameter | ||
/// </summary> | ||
Unknown1C = 0x1C, | ||
|
||
/// <summary> | ||
/// Pauses text rendering for a time(tick based?) | ||
/// </summary> | ||
Pause = 0x1D, | ||
|
||
/// <summary> | ||
/// Creates a highlighted section of text | ||
/// </summary> | ||
Highlight = 0x1E, | ||
|
||
/// <summary> | ||
/// Moves text rendering to next line | ||
/// </summary> | ||
NextLine = 0x1F, | ||
} |
16 changes: 16 additions & 0 deletions
16
src/G2DataGUI.Common/Data/Maps/MapDialogueOpcodes/Highlight/HighlightEndOpcode.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System.Collections.ObjectModel; | ||
using System.IO; | ||
|
||
namespace G2DataGUI.Common.Data.Maps.MapDialogueOpcodes.Highlight; | ||
|
||
public class HighlightEndOpcode : IHighlightOpcode | ||
{ | ||
public DialogueOpcode Opcode { get; set; } = DialogueOpcode.Highlight; | ||
public HighlightOption Option { get; set; } = HighlightOption.End; | ||
public ObservableCollection<IMapDialogueOpcode> NestedOpcodes { get; set; } = new(); | ||
|
||
public static IMapDialogueOpcode ReadOpcode(Stream reader) | ||
{ | ||
return new HighlightEndOpcode(); | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/G2DataGUI.Common/Data/Maps/MapDialogueOpcodes/Highlight/HighlightOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace G2DataGUI.Common.Data.Maps.MapDialogueOpcodes.Highlight; | ||
|
||
public enum HighlightOption : byte | ||
{ | ||
Start = 0x0C, | ||
End = 0x0F, | ||
} |
Oops, something went wrong.