mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-27 06:20:25 +00:00
Fix sav7 init
guess I never launched this format the entire week
This commit is contained in:
parent
2367fbd69a
commit
cf955e9fc7
6 changed files with 18 additions and 12 deletions
|
@ -24,7 +24,10 @@ namespace PKHeX.Core
|
|||
EventConst = Blocks.BlockInfo[05].Offset;
|
||||
EventFlag = EventConst + (EventConstMax * 2); // After Event Const (u16)*n
|
||||
HoF = EventFlag + (EventFlagMax / 8); // After Event Flags (1b)*(1u8/8b)*n
|
||||
|
||||
Blocks.BoxLayout.LoadBattleTeams();
|
||||
TeamSlots = Blocks.BoxLayout.TeamSlots;
|
||||
Box = Blocks.BlockInfo[14].Offset;
|
||||
}
|
||||
|
||||
public override PersonalTable Personal => PersonalTable.SM;
|
||||
|
|
|
@ -21,7 +21,10 @@ namespace PKHeX.Core
|
|||
EventConst = Blocks.BlockInfo[05].Offset;
|
||||
EventFlag = EventConst + (EventConstMax * 2); // After Event Const (u16)*n
|
||||
HoF = EventFlag + (EventFlagMax / 8); // After Event Flags (1b)*(1u8/8b)*n
|
||||
|
||||
Blocks.BoxLayout.LoadBattleTeams();
|
||||
TeamSlots = Blocks.BoxLayout.TeamSlots;
|
||||
Box = Blocks.BlockInfo[14].Offset;
|
||||
}
|
||||
|
||||
public override PersonalTable Personal => PersonalTable.USUM;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
// byte UnlockedCount;
|
||||
// byte CurrentBox;
|
||||
|
||||
private const int strbytecount = SAV6XY.LongStringLength; // same for both games
|
||||
private const int strbytecount = SAV6.LongStringLength; // same for both games
|
||||
private const int strlen = strbytecount / 2;
|
||||
private const int BoxCount = 31;
|
||||
private const int PCBackgrounds = BoxCount * strbytecount; // 0x41E;
|
||||
|
|
|
@ -99,9 +99,9 @@ namespace PKHeX.Core
|
|||
set => SAV.SetData(SAV.SetString(value, SAV.OTLength), Offset + 0x48);
|
||||
}
|
||||
|
||||
private int GetSayingOffset(int say) => Offset + 0x7C + (SAV6XY.LongStringLength * say);
|
||||
private string GetSaying(int say) => SAV.GetString(GetSayingOffset(say), SAV6XY.LongStringLength);
|
||||
private void SetSaying(int say, string value) => SAV.SetData(SAV.SetString(value, SAV6XY.LongStringLength / 2), GetSayingOffset(say));
|
||||
private int GetSayingOffset(int say) => Offset + 0x7C + (SAV6.LongStringLength * say);
|
||||
private string GetSaying(int say) => SAV.GetString(GetSayingOffset(say), SAV6.LongStringLength);
|
||||
private void SetSaying(int say, string value) => SAV.SetData(SAV.SetString(value, SAV6.LongStringLength / 2), GetSayingOffset(say));
|
||||
|
||||
public string Saying1 { get => GetSaying(0); set => SetSaying(0, value); }
|
||||
public string Saying2 { get => GetSaying(1); set => SetSaying(1, value); }
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace PKHeX.Core
|
|||
private const int Unlocked = 0x5E1;
|
||||
private const int LastViewedBoxOffset = 0x5E3;
|
||||
|
||||
private const int strlen = SAV6XY.LongStringLength / 2;
|
||||
private const int strlen = SAV6.LongStringLength / 2;
|
||||
|
||||
private const int TeamCount = 6;
|
||||
private const int NONE_SELECTED = -1;
|
||||
|
@ -37,17 +37,17 @@ namespace PKHeX.Core
|
|||
Data[GetBoxWallpaperOffset(box)] = (byte)value;
|
||||
}
|
||||
|
||||
private int GetBoxNameOffset(int box) => Offset + (SAV6XY.LongStringLength * box);
|
||||
private int GetBoxNameOffset(int box) => Offset + (SAV6.LongStringLength * box);
|
||||
|
||||
public string GetBoxName(int box)
|
||||
{
|
||||
return SAV.GetString(Data, GetBoxNameOffset(box), SAV6XY.LongStringLength);
|
||||
return SAV.GetString(Data, GetBoxNameOffset(box), SAV6.LongStringLength);
|
||||
}
|
||||
|
||||
public void SetBoxName(int box, string value)
|
||||
{
|
||||
var data = SAV.SetString(value, strlen, strlen, 0);
|
||||
var offset = GetBoxNameOffset(box) + (SAV6XY.LongStringLength * box);
|
||||
var offset = GetBoxNameOffset(box) + (SAV6.LongStringLength * box);
|
||||
SAV.SetData(data, offset);
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
private const int Unlocked = 0x5E1;
|
||||
private const int LastViewedBoxOffset = 0x5E3;
|
||||
|
||||
private const int strlen = SAV6XY.LongStringLength / 2;
|
||||
private const int strlen = SAV6.LongStringLength / 2;
|
||||
|
||||
public BoxLayout8(SAV8SWSH sav, int offset) : base(sav) => Offset = offset;
|
||||
|
||||
|
@ -30,17 +30,17 @@
|
|||
Data[GetBoxWallpaperOffset(box)] = (byte)value;
|
||||
}
|
||||
|
||||
private int GetBoxNameOffset(int box) => Offset + (SAV6XY.LongStringLength * box);
|
||||
private int GetBoxNameOffset(int box) => Offset + (SAV6.LongStringLength * box);
|
||||
|
||||
public string GetBoxName(int box)
|
||||
{
|
||||
return SAV.GetString(Data, GetBoxNameOffset(box), SAV6XY.LongStringLength);
|
||||
return SAV.GetString(Data, GetBoxNameOffset(box), SAV6.LongStringLength);
|
||||
}
|
||||
|
||||
public void SetBoxName(int box, string value)
|
||||
{
|
||||
var data = SAV.SetString(value, strlen, strlen, 0);
|
||||
var offset = GetBoxNameOffset(box) + (SAV6XY.LongStringLength * box);
|
||||
var offset = GetBoxNameOffset(box) + (SAV6.LongStringLength * box);
|
||||
SAV.SetData(data, offset);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue