From 479ed2e18b58762101e256279802e564c5cd598f Mon Sep 17 00:00:00 2001 From: Joshua Moon Date: Wed, 10 Oct 2018 15:33:41 +0100 Subject: [PATCH] Updated check for in-battle row data. Fixes #4 --- Tseng/Program.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Tseng/Program.cs b/Tseng/Program.cs index 82d2a56..cfa0ffb 100644 --- a/Tseng/Program.cs +++ b/Tseng/Program.cs @@ -99,6 +99,7 @@ public static Status ExtractStatusFromMap(FF7SaveMap map, FF7BattleMap battleMap chr.MaxMp = party[i].MaxMp; chr.Level = party[i].Level; effect = party[i].Status; + chr.BackRow = party[i].IsBackRow; } @@ -359,7 +360,8 @@ public struct Actor public short CurrentMp { get; set; } // 0x28 public short MaxMp { get; set; } // 0x2A public byte Level { get; set; } // 0x09 - public StatusEffect Status { get; set; } // 0x?? + public StatusEffect Status { get; set; } // 0x00 + public bool IsBackRow { get; set; } //0x03 } @@ -380,7 +382,8 @@ private Actor[] GetActors(int start, int count) CurrentMp = BitConverter.ToInt16(_map, offset + 0x28), MaxMp = BitConverter.ToInt16(_map, offset + 0x2A), Level = _map[offset+0x09], - Status = (StatusEffect)BitConverter.ToUInt32(_map, offset + 0x00) + Status = (StatusEffect)BitConverter.ToUInt32(_map, offset + 0x00), + IsBackRow = (_map[offset + 0x04] & 0x40) == 0x40 }; acts[i] = a; }