mirror of
https://github.com/danbulant/Cosmos
synced 2026-06-10 02:02:30 +00:00
Update MemoryBlock.cs
This commit is contained in:
parent
00115ea2d9
commit
a8b46bdb6d
1 changed files with 0 additions and 38 deletions
|
|
@ -102,44 +102,6 @@ namespace Cosmos.Core
|
|||
{
|
||||
throw new Exception("TODO");
|
||||
}
|
||||
|
||||
#region ReadWrite
|
||||
public unsafe void Read8(Byte[] aBuffer)
|
||||
{
|
||||
for (int i = 0; i < aBuffer.Length; i++)
|
||||
aBuffer[i] = (*(Byte*)(Base + i));
|
||||
}
|
||||
|
||||
public unsafe void Write8(Byte[] aBuffer)
|
||||
{
|
||||
for (int i = 0; i < aBuffer.Length; i++)
|
||||
(*(Byte*)(Base + i)) = aBuffer[i];
|
||||
}
|
||||
|
||||
public unsafe void Read16(UInt16[] aBuffer)
|
||||
{
|
||||
for (int i = 0; i < aBuffer.Length; i++)
|
||||
aBuffer[i] = (*(UInt16*)(Base + i));
|
||||
}
|
||||
|
||||
public unsafe void Write16(UInt16[] aBuffer)
|
||||
{
|
||||
for (int i = 0; i < aBuffer.Length; i++)
|
||||
(*(UInt16*)(Base + i)) = aBuffer[i];
|
||||
}
|
||||
|
||||
public unsafe void Read32(UInt32[] aBuffer)
|
||||
{
|
||||
for (int i = 0; i < aBuffer.Length; i++)
|
||||
aBuffer[i] = (*(UInt32*)(Base + i));
|
||||
}
|
||||
|
||||
public unsafe void Write32(UInt32[] aBuffer)
|
||||
{
|
||||
for (int i = 0; i < aBuffer.Length; i++)
|
||||
(*(UInt32*)(Base + i)) = aBuffer[i];
|
||||
}
|
||||
#endregion ReadWrite
|
||||
}
|
||||
|
||||
public class MemoryBlock08
|
||||
|
|
|
|||
Loading…
Reference in a new issue