-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
42 changed files
with
345 additions
and
166 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// --------------------------------------------------------------------------------------------- | ||
// Copyright (c) 2021-2023, Jiaqi Liu. All rights reserved. | ||
// See LICENSE file in the project root for license information. | ||
// --------------------------------------------------------------------------------------------- | ||
|
||
namespace Pal3.Core.Command | ||
{ | ||
using DataReader; | ||
|
||
/// <summary> | ||
/// Defines the interface for parsing SCE commands from a binary reader. | ||
/// </summary> | ||
public interface ISceCommandParser | ||
{ | ||
/// <summary> | ||
/// Parse the next SceCommand from the given reader | ||
/// in the SCE script data block. | ||
/// </summary> | ||
/// <param name="reader">The binary reader to read from.</param> | ||
/// <param name="codepage">The codepage to use for decoding strings.</param> | ||
/// <param name="commandId">The ID of the parsed command.</param> | ||
/// <returns>The parsed command.</returns> | ||
public ICommand ParseNextCommand(IBinaryReader reader, | ||
int codepage, | ||
out ushort commandId); | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
Assets/Scripts/Pal3.Core/Command/ISceCommandPreprocessor.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 @@ | ||
// --------------------------------------------------------------------------------------------- | ||
// Copyright (c) 2021-2023, Jiaqi Liu. All rights reserved. | ||
// See LICENSE file in the project root for license information. | ||
// --------------------------------------------------------------------------------------------- | ||
|
||
namespace Pal3.Core.Command | ||
{ | ||
/// <summary> | ||
/// Interface for a command preprocessor that can modify a command before it is executed. | ||
/// </summary> | ||
public interface ISceCommandPreprocessor | ||
{ | ||
/// <summary> | ||
/// Processes the given command before it is executed. | ||
/// </summary> | ||
/// <param name="command">The command to process.</param> | ||
/// <param name="currentPlayerActorId">The ID of the current player actor.</param> | ||
public void Process(ICommand command, int currentPlayerActorId); | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
Assets/Scripts/Pal3.Core/Command/ISceCommandPreprocessor.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
Assets/Scripts/Pal3.Core/Command/ISceCommandTypeResolver.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,23 @@ | ||
// --------------------------------------------------------------------------------------------- | ||
// Copyright (c) 2021-2023, Jiaqi Liu. All rights reserved. | ||
// See LICENSE file in the project root for license information. | ||
// --------------------------------------------------------------------------------------------- | ||
|
||
namespace Pal3.Core.Command | ||
{ | ||
using System; | ||
|
||
/// <summary> | ||
/// Interface for resolving the type of a SceCommand based on its ID and user variable mask. | ||
/// </summary> | ||
public interface ISceCommandTypeResolver | ||
{ | ||
/// <summary> | ||
/// Get SceCommand Type for the given command id. | ||
/// </summary> | ||
/// <param name="commandId">SceCommand Id</param> | ||
/// <param name="userVariableMask">User variable mask</param> | ||
/// <returns>Type of the command, null if not found</returns> | ||
public Type GetType(ushort commandId, ushort userVariableMask); | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
Assets/Scripts/Pal3.Core/Command/ISceCommandTypeResolver.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
3 changes: 3 additions & 0 deletions
3
Assets/Scripts/Pal3.Core/Command/SceCommandPreprocessor.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
43 changes: 0 additions & 43 deletions
43
Assets/Scripts/Pal3.Core/Utilities/BinaryReaderMethodResolver.cs
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
Assets/Scripts/Pal3.Core/Utilities/BinaryReaderMethodResolver.cs.meta
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.