aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.ShaderTools/Memory.cs
blob: c99224b5ed962125fcfd0c956564aa7e4afd8f19 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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();
        }
    }
}