Skip to content

Commit

Permalink
address most of the review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
SethBarberee committed Oct 2, 2024
1 parent 614a8ed commit 639bd7a
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 32 deletions.
26 changes: 17 additions & 9 deletions include/kecleon_bros1.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,33 @@ enum KecleonStoreStates
KECLEON_STORE_INIT = 0,
KECLEON_STORE_MAIN_MENU,
KECLEON_STORE_INFO,
// 3
KECLEON_STORE_EXIT = 4,
KECLEON_STORE_UNK3,
KECLEON_STORE_EXIT,
KECLEON_STORE_NO_STORE_ITEMS,
KECLEON_STORE_NO_MONEY,
KECLEON_STORE_TOO_MUCH_MONEY,
KECLEON_STORE_NO_ITEMS_TO_SELL,
KECLEON_STORE_NO_ITEMS,
KECLEON_STORE_TOO_MANY_ITEMS,
// 11
KECLEON_STORE_NOT_ENOUGH_MONEY = 12,
KECLEON_STORE_UNK11,
KECLEON_STORE_NOT_ENOUGH_MONEY,
KECLEON_STORE_CANT_SELL_ITEM,
KECLEON_STORE_SELL_ITEM_TOO_MUCH_MONEY,
KECLEON_STORE_BUY_ITEM_MENU = 16,
KECLEON_STORE_UNK15,
KECLEON_STORE_BUY_ITEM_MENU,
KECLEON_STORE_BUY_ITEM_RECEIPT,
KECLEON_STORE_BUY_ITEM_INFO = 21,
KECLEON_STORE_UNK18,
KECLEON_STORE_UNK19,
KECLEON_STORE_UNK20,
KECLEON_STORE_BUY_ITEM_INFO,
KECLEON_STORE_BUY_ITEM,
KECLEON_STORE_SELL_ITEM_MENU = 24,
KECLEON_STORE_SELL_ITEM_RECEIPT = 25,
KECLEON_STORE_SELL_ITEM_INFO = 29,
KECLEON_STORE_UNK23,
KECLEON_STORE_SELL_ITEM_MENU,
KECLEON_STORE_SELL_ITEM_RECEIPT,
KECLEON_STORE_UNK26,
KECLEON_STORE_UNK27,
KECLEON_STORE_UNK28,
KECLEON_STORE_SELL_ITEM_INFO,
KECLEON_STORE_SELL_ITEM,
KECLEON_STORE_SELL_ALL_ITEMS,
KECLEON_STORE_SELL_ALL_ITEMS_RECEIPT,
Expand Down
14 changes: 7 additions & 7 deletions src/code_806FDF4.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,17 @@ void SetShopkeeperAggression(Entity *pokemon, Entity *target)

info = GetEntInfo(target);

if(info->shopkeeper != 0)
if(info->shopkeeper != SHOPKEEPER_MODE_NORMAL)
{
if(GetEntityType(pokemon) == ENTITY_MONSTER)
{
if(pokemon->info->isNotTeamMember)
{
info->shopkeeper = 2;
info->shopkeeper = SHOPKEEPER_MODE_ATTACK_ENEMIES;
}
else
{
info->shopkeeper = 3;
info->shopkeeper = SHOPKEEPER_MODE_ATTACK_TEAM;
}
}
}
Expand All @@ -84,15 +84,15 @@ void sub_806F480(Entity *pokemon, u8 r1)

info = GetEntInfo(pokemon);

if(info->shopkeeper != 0)
if(info->shopkeeper != SHOPKEEPER_MODE_NORMAL)
{
if(r1)
{
info->shopkeeper = 2;
info->shopkeeper = SHOPKEEPER_MODE_ATTACK_ENEMIES;
}
else
{
info->shopkeeper = 3;
info->shopkeeper = SHOPKEEPER_MODE_ATTACK_TEAM;
}
}
}
Expand Down Expand Up @@ -254,7 +254,7 @@ bool8 sub_806F660(Entity *pokemon,Entity *target)
iVar4 = DungeonRandInt(1000);
recruitRate = GetRecruitRate(targetInfo->id);
if (recruitRate != -999) {
if (HasHeldItem(pokemon,0x2e)) { // FRIEND_BOW
if (HasHeldItem(pokemon, ITEM_FRIEND_BOW)) { // FRIEND_BOW
recruitRate += gUnknown_80F5008;
}
recruitRate += gUnknown_80F5700[pokemonInfo->level];
Expand Down
24 changes: 12 additions & 12 deletions src/code_80718D8.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ void sub_8071DA4(Entity *entity)
"_08071E44: .4byte gDungeon\n"
"_08071E48: .4byte 0x000135cc\n"
"_08071E4C:\n"
" movs r1, 0xFE\n"
" movs r1, 254\n"
" lsls r1, 1\n"
" adds r0, r6, r1\n"
" ldr r0, [r0]\n"
Expand Down Expand Up @@ -472,7 +472,7 @@ void sub_8071DA4(Entity *entity)
" cmp r4, 0xB\n"
" ble _08071F94\n"
"_08071FCA:\n"
" movs r1, 0xFE\n"
" movs r1, 254\n"
" lsls r1, 1\n"
" adds r0, r6, r1\n"
" movs r1, 0\n"
Expand Down Expand Up @@ -734,8 +734,8 @@ bool8 sub_80723D0(Entity *pokemon, Entity *target, u8 param_3, u8 param_4)
info->maxHPStat += leveldata.gainHP;
info->HP += leveldata.gainHP;

if(info->maxHPStat > 0x3E6)
info->maxHPStat = 0x3E7;
if(info->maxHPStat > 998)
info->maxHPStat = 999;

if(info->HP >= info->maxHPStat)
{
Expand All @@ -752,14 +752,14 @@ bool8 sub_80723D0(Entity *pokemon, Entity *target, u8 param_3, u8 param_4)
gUnknown_202F324[0] += leveldata.gainDef;
gUnknown_202F324[1] += leveldata.gainSPDef;

if(gUnknown_202F31C[0] > 0xFE)
gUnknown_202F31C[0] = 0xFF;
if(gUnknown_202F31C[1] > 0xFE)
gUnknown_202F31C[1] = 0xFF;
if(gUnknown_202F324[0] > 0xFE)
gUnknown_202F324[0] = 0xFF;
if(gUnknown_202F324[1] > 0xFE)
gUnknown_202F324[1] = 0xFF;
if(gUnknown_202F31C[0] > 254)
gUnknown_202F31C[0] = 255;
if(gUnknown_202F31C[1] > 254)
gUnknown_202F31C[1] = 255;
if(gUnknown_202F324[0] > 254)
gUnknown_202F324[0] = 255;
if(gUnknown_202F324[1] > 254)
gUnknown_202F324[1] = 255;


LoadIQSkills(target);
Expand Down
8 changes: 4 additions & 4 deletions src/thank_you_wonder_mail.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ enum menuActions {
CANCEL_ACTION,
SEND_THANK_YOU_MAIL_ACTION,
GET_THANK_YOU_MAIL_ACTION,
// 3 - GAME_LINK
GAME_LINK_ACTION,
// 4 - ???
// 5 - PASSWORD
PASSWORD_ACTION = 5,
YES_ACTION = 0x7,
NO_ACTION,
SEND_ITEM_ACTION,
Expand Down Expand Up @@ -132,8 +132,8 @@ const MenuItem gThankYouMailMainMenuItems[4] =

const MenuItem gUnknown_80DEE08[4] =
{
{"Game Link cable", WONDER_MAIL_GAME_LINK},
{"Password", WONDER_MAIL_PASSWORD},
{"Game Link cable", GAME_LINK_ACTION},
{"Password", PASSWORD_ACTION},
{"Cancel", CANCEL_ACTION},
{NULL, CANCEL_ACTION},
};
Expand Down

0 comments on commit 639bd7a

Please sign in to comment.