using Roboto.Memory; namespace Roboto.Memory.Objects; /// /// Reads AreaLoading state (slot 0). Individual field reads — the full struct is 3672B, wasteful to bulk-read. /// public sealed class AreaLoading : RemoteObject { // AreaLoading struct field offsets private const int IsLoadingOffset = 0x660; private const int TotalLoadingScreenTimeMsOffset = 0xDB8; public bool IsLoading { get; private set; } public long TotalLoadingScreenTimeMs { get; private set; } public AreaLoading(MemoryContext ctx) : base(ctx) { } protected override bool ReadData() { var mem = Ctx.Memory; var loadingFlag = mem.Read(Address + IsLoadingOffset); IsLoading = loadingFlag != 0; TotalLoadingScreenTimeMs = mem.Read(Address + TotalLoadingScreenTimeMsOffset); return true; } protected override void Clear() { IsLoading = false; TotalLoadingScreenTimeMs = 0; } }