mirror of
https://github.com/PredatH0r/ChanSort.git
synced 2026-01-28 18:19:04 +01:00
- cleanup (renamed directories to match project structure)
- tested and fixed Samsung favorites and locks for C,D,AstraHD
This commit is contained in:
25
ChanSort.Loader.ScmFile/SatelliteMapping.cs
Normal file
25
ChanSort.Loader.ScmFile/SatelliteMapping.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
|
||||
namespace ChanSort.Loader.ScmFile
|
||||
{
|
||||
internal class SatelliteMapping
|
||||
{
|
||||
private static readonly Encoding utf16Encoding = new UnicodeEncoding(false, false);
|
||||
|
||||
private readonly byte[] data;
|
||||
public int BaseOffset;
|
||||
|
||||
public SatelliteMapping(byte[] data, int offset)
|
||||
{
|
||||
this.data = data;
|
||||
this.BaseOffset = offset;
|
||||
}
|
||||
|
||||
public byte MagicMarker { get { return data[BaseOffset]; } }
|
||||
public int SatelliteNr { get { return BitConverter.ToInt32(data, BaseOffset + 1); } }
|
||||
public string Name { get { return utf16Encoding.GetString(data, BaseOffset + 9, 128).TrimEnd('\0'); } }
|
||||
public bool IsEast { get { return BitConverter.ToInt32(data, BaseOffset + 137) != 0; } }
|
||||
public int Longitude { get { return BitConverter.ToInt32(data, BaseOffset + 141); } }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user