diff options
Diffstat (limited to 'Ryujinx.Core/OsHle/Utilities/MemWriter.cs')
| -rw-r--r-- | Ryujinx.Core/OsHle/Utilities/MemWriter.cs | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/Ryujinx.Core/OsHle/Utilities/MemWriter.cs b/Ryujinx.Core/OsHle/Utilities/MemWriter.cs new file mode 100644 index 00000000..21b6a3b6 --- /dev/null +++ b/Ryujinx.Core/OsHle/Utilities/MemWriter.cs @@ -0,0 +1,38 @@ +using ChocolArm64.Memory; + +namespace Ryujinx.Core.OsHle.Utilities +{ + class MemWriter + { + private AMemory Memory; + + public long Position { get; private set; } + + public MemWriter(AMemory Memory, long Position) + { + this.Memory = Memory; + this.Position = Position; + } + + public void WriteByte(byte Value) + { + Memory.WriteByte(Position, Value); + + Position++; + } + + public void WriteInt32(int Value) + { + Memory.WriteInt32(Position, Value); + + Position += 4; + } + + public void WriteInt64(long Value) + { + Memory.WriteInt64(Position, Value); + + Position += 8; + } + } +}
\ No newline at end of file |
