Skip to content

Commit

Permalink
Fix encounter table issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Admiral-Fish committed Apr 10, 2023
1 parent affd23f commit ba2fe3e
Show file tree
Hide file tree
Showing 18 changed files with 35 additions and 42 deletions.
27 changes: 10 additions & 17 deletions Source/Core/Gen4/Encounters4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,15 @@ struct WildEncounterHGSSHeadbutt
{
u8 location;
bool hasSpecial;
DynamicSlot normal1[6];
DynamicSlot normal2[6];
DynamicSlot special[6];
union {
struct
{
DynamicSlot normal1[6];
DynamicSlot normal2[6];
DynamicSlot special[6];
};
DynamicSlot slots[18];
};
};
static_assert(sizeof(WildEncounterHGSSHeadbutt) == 74);

Expand Down Expand Up @@ -514,20 +520,7 @@ static std::vector<EncounterArea4> getHGSS(Game version, Encounter encounter, in
std::vector<Slot> slots;
slots.reserve(6);

const DynamicSlot *treeSlot;
if (tree == 0)
{
treeSlot = entry->normal1;
}
else if (tree == 1)
{
treeSlot = entry->normal2;
}
else
{
treeSlot = entry->special;
}

const DynamicSlot *treeSlot = &entry->slots[6 * tree];
for (size_t i = 0; i < 6; i++)
{
const auto &slot = treeSlot[i];
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Resources/EncounterTables
2 changes: 1 addition & 1 deletion Source/Core/Resources/i18n/de/frlg_de.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
8,Mt Moon 1F
9,Mt Moon B1F
10,Mt Moon B2F
11,Ssanne Exterior
11,S.S Anne Exterior
12,Digletts Cave B1F
13,Victory Road 1F
14,Victory Road 2F
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/Resources/i18n/de/rs_de.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,5 @@
92,Safari Zone Southeast
93,Dewford Town
94,Pacifidlog Town
95,Underwater1
96,Underwater2
95,Underwater Route 124
96,Underwater Route 126
2 changes: 1 addition & 1 deletion Source/Core/Resources/i18n/en/frlg_en.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
8,Mt Moon 1F
9,Mt Moon B1F
10,Mt Moon B2F
11,Ssanne Exterior
11,S.S Anne Exterior
12,Digletts Cave B1F
13,Victory Road 1F
14,Victory Road 2F
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/Resources/i18n/en/rs_en.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,5 @@
92,Safari Zone Southeast
93,Dewford Town
94,Pacifidlog Town
95,Underwater1
96,Underwater2
95,Underwater Route 124
96,Underwater Route 126
2 changes: 1 addition & 1 deletion Source/Core/Resources/i18n/es/frlg_es.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
8,Mt Moon 1F
9,Mt Moon B1F
10,Mt Moon B2F
11,Ssanne Exterior
11,S.S Anne Exterior
12,Digletts Cave B1F
13,Calle Victoria Planta baja
14,Calle Victoria Segunda planta
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/Resources/i18n/es/rs_es.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,5 @@
92,Safari Zone Southeast
93,Pueblo Azuliza
94,Pacifidlog Town
95,Underwater1
96,Underwater2
95,Underwater Route 124
96,Underwater Route 126
2 changes: 1 addition & 1 deletion Source/Core/Resources/i18n/fr/frlg_fr.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
8,Mt Moon 1F
9,Mt Moon B1F
10,Mt Moon B2F
11,Ssanne Exterior
11,S.S Anne Exterior
12,Digletts Cave B1F
13,Victory Road 1F
14,Victory Road 2F
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/Resources/i18n/fr/rs_fr.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,5 @@
92,Safari Zone Southeast
93,Dewford Town
94,Pacifidlog Town
95,Underwater1
96,Underwater2
95,Underwater Route 124
96,Underwater Route 126
2 changes: 1 addition & 1 deletion Source/Core/Resources/i18n/it/frlg_it.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
8,Mt Moon 1F
9,Mt Moon B1F
10,Mt Moon B2F
11,Ssanne Exterior
11,S.S Anne Exterior
12,Digletts Cave B1F
13,Victory Road 1F
14,Victory Road 2F
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/Resources/i18n/it/rs_it.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,5 @@
92,Safari Zone Southeast
93,Bluruvia
94,Pacifidlog Town
95,Underwater1
96,Underwater2
95,Underwater Route 124
96,Underwater Route 126
2 changes: 1 addition & 1 deletion Source/Core/Resources/i18n/ja/frlg_ja.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
8,Mt Moon 1F
9,Mt Moon B1F
10,Mt Moon B2F
11,Ssanne Exterior
11,S.S. Anne Exterior
12,Digletts Cave B1F
13,Victory Road 1F
14,Victory Road 2F
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/Resources/i18n/ja/rs_ja.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,5 @@
92,Safari Zone Southeast
93,Dewford Town
94,Pacifidlog Town
95,Underwater1
96,Underwater2
95,Underwater Route 124
96,Underwater Route 126
2 changes: 1 addition & 1 deletion Source/Core/Resources/i18n/ko/frlg_ko.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
8,Mt Moon 1F
9,Mt Moon B1F
10,Mt Moon B2F
11,Ssanne Exterior
11,S.S Anne Exterior
12,Digletts Cave B1F
13,Victory Road 1F
14,Victory Road 2F
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/Resources/i18n/ko/rs_ko.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,5 @@
92,Safari Zone Southeast
93,Dewford Town
94,Pacifidlog Town
95,Underwater1
96,Underwater2
95,Underwater Route 124
96,Underwater Route 126
2 changes: 1 addition & 1 deletion Source/Core/Resources/i18n/zh/frlg_zh.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
8,Mt Moon 1F
9,Mt Moon B1F
10,Mt Moon B2F
11,Ssanne Exterior
11,S.S Anne Exterior
12,Digletts Cave B1F
13,Victory Road 1F
14,Victory Road 2F
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/Resources/i18n/zh/rs_zh.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,5 @@
92,Safari Zone Southeast
93,Dewford Town
94,Pacifidlog Town
95,Underwater1
96,Underwater2
95,Underwater Route 124
96,Underwater Route 126

0 comments on commit ba2fe3e

Please sign in to comment.