summaryrefslogtreecommitdiff
path: root/src/items.c
diff options
context:
space:
mode:
authorDennis <dhilhorst2000@gmail.com>2021-07-26 06:11:01 +0200
committerGitHub <noreply@github.com>2021-07-25 21:11:01 -0700
commit645c45431b0e091234699c3706ff90d1654cfb57 (patch)
tree412551a72247c0d9b21049d5addcbe34014419d3 /src/items.c
parentbad7f7f688253c87c2cb2d063ea57c884cb6adff (diff)
Pokemon related decomp (#47)
* decompile last function in pokemon_1.s * some pokemon related decomp * more decomp * decomp another function * decompile function * another one * decompile GetPokemonLevelData * decompile more * more decomp * more structure and decomp * decomp another function (need to do some renaming) * rename some stuff * I cant do anything without committing these 2 files
Diffstat (limited to 'src/items.c')
-rw-r--r--src/items.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/items.c b/src/items.c
index fb0304f..337e622 100644
--- a/src/items.c
+++ b/src/items.c
@@ -879,8 +879,8 @@ void GetGummiItemStatBoost(struct PokemonStruct* pokemon, u8 itemIndex, u8 a3, s
a4->unk2 = boost_flags;
boost_flags = a4->unk2;
if (a4->unk2 & 1) {
- if (pokemon->pokeAtt < 255) {
- pokemon->pokeAtt++;
+ if (pokemon->offense.att[OFFENSE_NRM] < 255) {
+ pokemon->offense.att[OFFENSE_NRM]++;
}
else {
// fix operand order
@@ -890,24 +890,24 @@ void GetGummiItemStatBoost(struct PokemonStruct* pokemon, u8 itemIndex, u8 a3, s
}
}
if (a4->unk2 & 2) {
- if (pokemon->pokeSPAtt < 255) {
- pokemon->pokeSPAtt++;
+ if (pokemon->offense.att[OFFENSE_SP] < 255) {
+ pokemon->offense.att[OFFENSE_SP]++;
}
else {
a4->unk2 &= ~2;
}
}
if (a4->unk2 & 4) {
- if (pokemon->pokeDef < 255) {
- pokemon->pokeDef++;
+ if (pokemon->offense.def[OFFENSE_NRM] < 255) {
+ pokemon->offense.def[OFFENSE_NRM]++;
}
else {
a4->unk2 &= ~4;
}
}
if (a4->unk2 & 8) {
- if (pokemon->pokeSPDef < 255) {
- pokemon->pokeSPDef++;
+ if (pokemon->offense.def[OFFENSE_SP] < 255) {
+ pokemon->offense.def[OFFENSE_SP] ++;
}
else {
a4->unk2 &= ~8;