-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Aug sept 2024 #211
base: master
Are you sure you want to change the base?
Aug sept 2024 #211
Conversation
b68f22e
to
ce53537
Compare
aa6ea42
to
9d99557
Compare
Ready for review |
KECLEON_STORE_BUY_ITEM_MENU = 16, | ||
KECLEON_STORE_BUY_ITEM_RECEIPT, | ||
KECLEON_STORE_BUY_ITEM_INFO = 21, | ||
KECLEON_STORE_BUY_ITEM, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are enough skips with the enum number values that it may be easier to define all of them explicitly.
src/code_806FDF4.c
Outdated
{ | ||
if(pokemon->info->isNotTeamMember) | ||
{ | ||
info->shopkeeper = 2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These values can use the ShopkeeperMode
enum in structs/dungeon_entity.h
.
src/code_806FDF4.c
Outdated
iVar4 = DungeonRandInt(1000); | ||
recruitRate = GetRecruitRate(targetInfo->id); | ||
if (recruitRate != -999) { | ||
if (HasHeldItem(pokemon,0x2e)) { // FRIEND_BOW |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Swap the number out for the ITEM_FRIEND_BOW
macro.
src/code_80718D8.c
Outdated
info->maxHPStat += leveldata.gainHP; | ||
info->HP += leveldata.gainHP; | ||
|
||
if(info->maxHPStat > 0x3E6) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These hex values are equal to 998 and 999 in decimal. Since these numbers are directly visible to the player, using decimal would be easier to read here.
src/thank_you_wonder_mail.c
Outdated
CANCEL_ACTION, | ||
SEND_THANK_YOU_MAIL_ACTION, | ||
GET_THANK_YOU_MAIL_ACTION, | ||
// 3 - GAME_LINK |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If some of these missing enums are known, perhaps they can be added even if they aren't used yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks mostly good, made some minor suggestions
u8 spAtk; | ||
u8 def; | ||
u8 spDef; | ||
// NOTE: cannot re-use offense struct as it pads. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we make it a packed struct then?
targetInfo = target->info; | ||
iVar8 = -1; | ||
size = GetBodySize(targetInfo->apparentID); | ||
if ((1 < ((u16)(gDungeon->bossBattleIndex - 4))) && (gDungeon->bossBattleIndex != 9) && (gDungeon->bossBattleIndex != 0xf)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comparison has broken me. I no longer know what kind of horrendous comparison macros they could have used.
(targetInfo->id != 0x19e) && | ||
(targetInfo->id != 0x195) && | ||
(targetInfo->id != 0x196) && | ||
(targetInfo->id != 0x197)) || (HasRecruitedMon(targetInfo->id) == 0)) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are MONSTER_
constants
{NULL, 0x0}, | ||
{"Confirm", CONFIRM_ACTION}, | ||
{"Info", INFO_ACTION}, | ||
{NULL, CANCEL_ACTION}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it doesn't make more sense to make these last terminator entries use empty {}
initializers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While doing that, the explicit array size could be removed.
Getting better about doing this more in the open so people know what I'm working on..