aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.ShaderTools/Memory.cs
diff options
context:
space:
mode:
authorLordmau5 <mail@lordmau5.com>2018-06-11 06:03:37 +0200
committerLordmau5 <mail@lordmau5.com>2018-06-11 06:03:37 +0200
commitc636c74dd2a54a9c0ece6cd31b03512f8c41fc43 (patch)
treee7b5089e4d873e51337752b8819c71c9f6257e93 /Ryujinx.ShaderTools/Memory.cs
parent851f2ded9a369633bb18a5fc97c123b3ef94c24e (diff)
parent76f3b1b3a4637ec72abfbb8cbc0679f2e0ca838f (diff)
Merge branch 'master' into ICommonStateGetter
Diffstat (limited to 'Ryujinx.ShaderTools/Memory.cs')
-rw-r--r--Ryujinx.ShaderTools/Memory.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/Ryujinx.ShaderTools/Memory.cs b/Ryujinx.ShaderTools/Memory.cs
new file mode 100644
index 00000000..f801ab39
--- /dev/null
+++ b/Ryujinx.ShaderTools/Memory.cs
@@ -0,0 +1,26 @@
+using Ryujinx.Graphics.Gal;
+using System.IO;
+
+namespace Ryujinx.ShaderTools
+{
+ class Memory : IGalMemory
+ {
+ private Stream BaseStream;
+
+ private BinaryReader Reader;
+
+ public Memory(Stream BaseStream)
+ {
+ this.BaseStream = BaseStream;
+
+ Reader = new BinaryReader(BaseStream);
+ }
+
+ public int ReadInt32(long Position)
+ {
+ BaseStream.Seek(Position, SeekOrigin.Begin);
+
+ return Reader.ReadInt32();
+ }
+ }
+}