split rb/y personal|lvlup binaries

slightly different values between games (fly charizard Yellow only), tm
etc.
Use yellow for pk1/sav1 but it doesn't matter (only TMs different, which
are unused).
This commit is contained in:
Kurt 2017-02-12 22:31:31 -08:00
parent 698c8e6e7c
commit e1b8a07cef
11 changed files with 75 additions and 35 deletions

View File

@ -11,8 +11,8 @@ public static partial class Legal
public static MysteryGift[] MGDB_G6, MGDB_G7 = new MysteryGift[0];
// Gen 1
private static readonly Learnset[] LevelUpRB = Learnset1.getArray(Resources.lvlmove_rby);
private static readonly Learnset[] LevelUpY = Learnset1.getArray(Resources.lvlmove_rby);
private static readonly Learnset[] LevelUpRB = Learnset1.getArray(Resources.lvlmove_rb);
private static readonly Learnset[] LevelUpY = Learnset1.getArray(Resources.lvlmove_y);
private static readonly EvolutionTree Evolves1;
private static readonly EncounterArea[] SlotsRBY;
private static readonly EncounterStatic[] StaticRBY;
@ -138,7 +138,7 @@ private static void MarkG7SMSlots(ref EncounterArea[] Areas)
{
// Gen 1
{
Evolves1 = new EvolutionTree(new[] { Resources.evos_rby }, GameVersion.RBY, PersonalTable.RBY, MaxSpeciesID_1);
Evolves1 = new EvolutionTree(new[] { Resources.evos_rby }, GameVersion.RBY, PersonalTable.Y, MaxSpeciesID_1);
var red = EncounterArea.getArray1_GW(Resources.encounter_red);
var blu = EncounterArea.getArray1_GW(Resources.encounter_blue);
var ylw = EncounterArea.getArray1_GW(Resources.encounter_yellow);
@ -806,7 +806,9 @@ private static IEnumerable<int> getLVLMoves(PKM pkm, int species, int lvl, int f
List<int> moves = new List<int>();
if (pkm.InhabitedGeneration(1))
{
moves.AddRange(((PersonalInfoG1)PersonalTable.RBY[species]).Moves);
moves.AddRange(((PersonalInfoG1)PersonalTable.RB[species]).Moves);
moves.AddRange(((PersonalInfoG1)PersonalTable.Y[species]).Moves);
moves.AddRange(LevelUpRB[species].getMoves(lvl));
moves.AddRange(LevelUpY[species].getMoves(lvl));
}
if (pkm.InhabitedGeneration(6))
@ -1042,13 +1044,20 @@ private static IEnumerable<int> getMoves(PKM pkm, int species, int lvl, int form
{
case 1:
{
PersonalInfo pi = PersonalTable.RBY[species];
var pi_rb = (PersonalInfoG1)PersonalTable.RB[species];
var pi_y = (PersonalInfoG1)PersonalTable.Y[species];
if (LVL)
{
r.AddRange(((PersonalInfoG1)pi).Moves);
r.AddRange(pi_rb.Moves);
r.AddRange(pi_y.Moves);
r.AddRange(LevelUpRB[species].getMoves(lvl));
r.AddRange(LevelUpY[species].getMoves(lvl));
}
if (Machine)
{
r.AddRange(TMHM_RBY.Where((t, m) => pi_rb.TMHM[m]));
r.AddRange(TMHM_RBY.Where((t, m) => pi_y.TMHM[m]));
}
if (Machine) r.AddRange(TMHM_RBY.Where((t, m) => pi.TMHM[m]));
break;
}
case 6:

View File

@ -276,9 +276,13 @@
<None Include="Resources\byte\fashion_f_sm_illegal" />
<None Include="Resources\byte\fashion_m_sm" />
<None Include="Resources\byte\fashion_m_sm_illegal" />
<None Include="Resources\byte\lvlmove_rb.pkl" />
<None Include="Resources\byte\lvlmove_rby.pkl" />
<None Include="Resources\byte\lvlmove_sm.pkl" />
<None Include="Resources\byte\lvlmove_y.pkl" />
<None Include="Resources\byte\personal_rb" />
<None Include="Resources\byte\personal_sm" />
<None Include="Resources\byte\personal_y" />
<None Include="Resources\byte\wc7.pkl" />
<None Include="Resources\byte\wc7full.pkl" />
<None Include="Resources\text\gen3\text_gsc_00000_es.txt" />

View File

@ -8,7 +8,7 @@ public class PK1 : PKM
// Internal use only
protected internal byte[] otname;
protected internal byte[] nick;
public override PersonalInfo PersonalInfo => PersonalTable.RBY[Species];
public override PersonalInfo PersonalInfo => PersonalTable.Y[Species];
public byte[] OT_Name_Raw => (byte[])otname.Clone();
public byte[] Nickname_Raw => (byte[])nick.Clone();

View File

@ -18,7 +18,8 @@ public class PersonalTable
public static readonly PersonalTable RS = new PersonalTable(Properties.Resources.personal_rs, GameVersion.RS);
public static readonly PersonalTable C = new PersonalTable(Properties.Resources.personal_c, GameVersion.C);
public static readonly PersonalTable GS = new PersonalTable(Properties.Resources.personal_c, GameVersion.GS);
public static readonly PersonalTable RBY = new PersonalTable(Properties.Resources.personal_rby, GameVersion.RBY);
public static readonly PersonalTable RB = new PersonalTable(Properties.Resources.personal_rb, GameVersion.RBY);
public static readonly PersonalTable Y = new PersonalTable(Properties.Resources.personal_y, GameVersion.RBY);
private static byte[][] splitBytes(byte[] data, int size)
{

View File

@ -17826,9 +17826,9 @@ public class Resources {
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
public static byte[] lvlmove_rby {
public static byte[] lvlmove_rb {
get {
object obj = ResourceManager.GetObject("lvlmove_rby", resourceCulture);
object obj = ResourceManager.GetObject("lvlmove_rb", resourceCulture);
return ((byte[])(obj));
}
}
@ -17853,6 +17853,16 @@ public class Resources {
}
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
public static byte[] lvlmove_y {
get {
object obj = ResourceManager.GetObject("lvlmove_y", resourceCulture);
return ((byte[])(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
@ -18016,9 +18026,9 @@ public class Resources {
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
public static byte[] personal_rby {
public static byte[] personal_rb {
get {
object obj = ResourceManager.GetObject("personal_rby", resourceCulture);
object obj = ResourceManager.GetObject("personal_rb", resourceCulture);
return ((byte[])(obj));
}
}
@ -18053,6 +18063,16 @@ public class Resources {
}
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
public static byte[] personal_y {
get {
object obj = ResourceManager.GetObject("personal_y", resourceCulture);
return ((byte[])(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
@ -26755,8 +26775,8 @@ public class Resources {
///
///Go
///Rote
///Blaue[INT]/Grüne[JP]
///Blaue
///Grüne
///Gelbe.
/// </summary>
public static string text_games_de {
@ -26802,8 +26822,8 @@ public class Resources {
///
///Go
///Red
///Blue
///Green
///Blue[INT]/Green[JP]
///Blue[JP]
///Yellow.
/// </summary>
public static string text_games_en {
@ -26849,8 +26869,8 @@ public class Resources {
///
///Go
///Roja
///Azul
///Verde
///Azul[INT]/Verde[JP]
///Azul[JP]
///Amarilla.
/// </summary>
public static string text_games_es {
@ -26896,8 +26916,8 @@ public class Resources {
///
///Go
///Rouge
///Bleue
///Vert
///Bleue[INT]/Vert[JP]
///Bleue[JP]
///Jaune.
/// </summary>
public static string text_games_fr {
@ -26943,8 +26963,8 @@ public class Resources {
///
///Go
///Rossa
///Blu
///Verde
///Blu[INT]/Verde[JP]
///Blu[JP]
///Gialla.
/// </summary>
public static string text_games_it {
@ -26990,8 +27010,8 @@ public class Resources {
///
///Go
///赤
///青
///
///青[INT]/緑[JP]
///青[JP]
///黄.
/// </summary>
public static string text_games_ja {
@ -27037,8 +27057,8 @@ public class Resources {
///
///고
///레드
///블루
///그린
///블루[INT]/그린[JP]
///블루[JP]
///옐로.
/// </summary>
public static string text_games_ko {
@ -27084,8 +27104,8 @@ public class Resources {
///
///Go
///紅
///藍色
///綠色
///藍色[INT]/綠色[JP]
///藍色[JP]
///黃色.
/// </summary>
public static string text_games_zh {

View File

@ -6388,9 +6388,6 @@
<data name="ProgramVersion" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\text\version.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
<data name="personal_rby" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\byte\personal_rby;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="text_gsc_00000_en" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\text\gen3\text_gsc_00000_en.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-16</value>
</data>
@ -7387,9 +7384,6 @@
<data name="evos_rby" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\byte\evos_rby.pkl;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="lvlmove_rby" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\byte\lvlmove_rby.pkl;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="encounter_blue" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\byte\encounter_blue.pkl;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
@ -7405,4 +7399,16 @@
<data name="encounter_yellow_f" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\byte\encounter_yellow_f.pkl;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="lvlmove_rb" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\byte\lvlmove_rb.pkl;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="lvlmove_y" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\byte\lvlmove_y.pkl;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="personal_rb" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\byte\personal_rb;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="personal_y" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\byte\personal_y;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>

Binary file not shown.

Binary file not shown.

View File

@ -33,7 +33,7 @@ public SAV1(byte[] data = null, GameVersion versionOverride = GameVersion.Any)
Party = getPartyOffset(0);
Japanese = SaveUtil.getIsG1SAVJ(Data);
Personal = PersonalTable.RBY;
Personal = PersonalTable.Y;
// Stash boxes after the save file's end.
byte[] TempBox = new byte[SIZE_STOREDBOX];