Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/pret/pokeemerald into pre…
Browse files Browse the repository at this point in the history
…tmerge5july
  • Loading branch information
Bassoonian committed Jul 5, 2024
2 parents 8168dd7 + a0a02f9 commit a7f7860
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 22 deletions.
7 changes: 7 additions & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,13 @@ nix-shell -p pkgsCross.arm-embedded.stdenv.cc git pkg-config libpng
```
Then proceed to [Choosing where to store pokeemerald Expansion (Linux)](#choosing-where-to-store-pokeemerald-expansion-linux).
### NixOS
Run the following command to start an interactive shell with the necessary packages:
```bash
nix-shell -p pkgsCross.arm-embedded.stdenv.cc git pkg-config libpng
```
Then proceed to [Choosing where to store pokeemerald (Linux)](#choosing-where-to-store-pokeemerald-linux).
### Other distributions
_(Specific instructions for other distributions would be greatly appreciated!)_
Expand Down
35 changes: 13 additions & 22 deletions src/berry_blender.c
Original file line number Diff line number Diff line change
Expand Up @@ -916,14 +916,14 @@ static const u8 sBlackPokeblockFlavorFlags[] = {
(1 << FLAVOR_SOUR) | (1 << FLAVOR_SWEET) | (1 << FLAVOR_SPICY),
};

static const u8 sUnused[] =
{
0xfe, 0x02, 0x02, 0xce, 0xd0, 0x37, 0x44, 0x07, 0x1f, 0x0c, 0x10,
0x00, 0xff, 0xfe, 0x91, 0x72, 0xce, 0xd0, 0x37, 0x44, 0x07, 0x1f,
0x0c, 0x10, 0x00, 0xff, 0x06, 0x27, 0x02, 0xff, 0x00, 0x0c, 0x48,
0x02, 0xff, 0x00, 0x01, 0x1f, 0x02, 0xff, 0x00, 0x16, 0x37, 0x02,
0xff, 0x00, 0x0d, 0x50, 0x4b, 0x02, 0xff, 0x06, 0x06, 0x06, 0x06,
0x05, 0x03, 0x03, 0x03, 0x02, 0x02, 0x03, 0x03, 0x03, 0x03, 0x02
static const u8 sJPText_GoodTvReady[] = _("\nいいTVができました "); // Unused
static const u8 sJPText_BadTvReady[] = _("\nダメTVができました "); // Unused
static const u8 sJPText_Flavors[][5] = {_("からい"), _("しぶい"), _("あまい"), _("にがい"), _("すっぱい")}; // Unused

static const u8 sUnused[] = {
6, 6, 6, 6, 5,
3, 3, 3, 2, 2,
3, 3, 3, 3, 2
};

static const struct WindowTemplate sBlenderRecordWindowTemplate =
Expand Down Expand Up @@ -1908,7 +1908,7 @@ static void Task_HandleOpponent1(u8 taskId)
static void Task_HandleOpponent2(u8 taskId)
{
u32 var1 = (sBerryBlender->arrowPos + 0x1800) & 0xFFFF;
u32 arrowId = sBerryBlender->playerIdToArrowId[2] & 0xFF;
u8 arrowId = sBerryBlender->playerIdToArrowId[2];
if ((var1 >> 8) > sArrowHitRangeStart[arrowId] + 20 && (var1 >> 8) < sArrowHitRangeStart[arrowId] + 40)
{
if (!gTasks[taskId].tDidInput)
Expand All @@ -1925,11 +1925,9 @@ static void Task_HandleOpponent2(u8 taskId)
}
else
{
u8 value;
if (rand > 65)
gRecvCmds[2][BLENDER_COMM_SCORE] = LINKCMD_BLENDER_SCORE_BEST;
value = rand - 41;
if (value < 25)
if (rand > 40 && rand <= 65)
gRecvCmds[2][BLENDER_COMM_SCORE] = LINKCMD_BLENDER_SCORE_GOOD;
if (rand < 10)
CreateOpponentMissTask(2, 5);
Expand All @@ -1953,7 +1951,7 @@ static void Task_HandleOpponent2(u8 taskId)
static void Task_HandleOpponent3(u8 taskId)
{
u32 var1 = (sBerryBlender->arrowPos + 0x1800) & 0xFFFF;
u32 arrowId = sBerryBlender->playerIdToArrowId[3] & 0xFF;
u8 arrowId = sBerryBlender->playerIdToArrowId[3];
if ((var1 >> 8) > sArrowHitRangeStart[arrowId] + 20 && (var1 >> 8) < sArrowHitRangeStart[arrowId] + 40)
{
if (gTasks[taskId].data[0] == 0)
Expand All @@ -1971,16 +1969,9 @@ static void Task_HandleOpponent3(u8 taskId)
else
{
if (rand > 60)
{
gRecvCmds[3][BLENDER_COMM_SCORE] = LINKCMD_BLENDER_SCORE_BEST;
}
else
{
s8 value = rand - 56; // makes me wonder what the original code was
u8 value2 = value;
if (value2 < 5)
gRecvCmds[3][BLENDER_COMM_SCORE] = LINKCMD_BLENDER_SCORE_GOOD;
}
else if (rand > 55 && rand <= 60)
gRecvCmds[3][BLENDER_COMM_SCORE] = LINKCMD_BLENDER_SCORE_GOOD;
if (rand < 5)
CreateOpponentMissTask(3, 5);
}
Expand Down

0 comments on commit a7f7860

Please sign in to comment.