summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/global.fieldmap.h2
-rw-r--r--src/data/pokemon/base_stats.h60
-rw-r--r--src/egg_hatch.c4
-rw-r--r--src/event_object_movement.c2
-rw-r--r--tools/preproc/asm_file.cpp1
-rw-r--r--tools/preproc/c_file.cpp1
6 files changed, 36 insertions, 34 deletions
diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h
index 837d5da00..59610f9ad 100644
--- a/include/global.fieldmap.h
+++ b/include/global.fieldmap.h
@@ -54,7 +54,7 @@ struct ObjectEventTemplate
{
/*0x00*/ u8 localId;
/*0x01*/ u8 graphicsId;
- /*0x02*/ u8 unk2;
+ /*0x02*/ u8 inConnection; // Leftover from FRLG
/*0x04*/ s16 x;
/*0x06*/ s16 y;
/*0x08*/ u8 elevation;
diff --git a/src/data/pokemon/base_stats.h b/src/data/pokemon/base_stats.h
index 4dedcfdc0..d851dfbe1 100644
--- a/src/data/pokemon/base_stats.h
+++ b/src/data/pokemon/base_stats.h
@@ -2,36 +2,36 @@
// 255 (MON_GENDERLESS) is reserved for genderless Pokémon.
#define PERCENT_FEMALE(percent) min(254, ((percent * 255) / 100))
-#define OLD_UNOWN_BASE_STATS \
- { \
- .baseHP = 50, \
- .baseAttack = 150, \
- .baseDefense = 50, \
- .baseSpeed = 150, \
- .baseSpAttack = 150, \
- .baseSpDefense = 50, \
- .type1 = TYPE_NORMAL, \
- .type2 = TYPE_NORMAL, \
- .catchRate = 3, \
- .expYield = 1, \
- .evYield_HP = 2, \
- .evYield_Attack = 2, \
- .evYield_Defense = 2, \
- .evYield_Speed = 2, \
- .evYield_SpAttack = 2, \
- .evYield_SpDefense = 2, \
- .item1 = ITEM_NONE, \
- .item2 = ITEM_NONE, \
- .genderRatio = MON_GENDERLESS, \
- .eggCycles = 120, \
- .friendship = 0, \
- .growthRate = GROWTH_MEDIUM_FAST, \
- .eggGroup1 = EGG_GROUP_UNDISCOVERED,\
- .eggGroup2 = EGG_GROUP_UNDISCOVERED,\
- .abilities = {0, 0}, \
- .safariZoneFleeRate = 0, \
- .bodyColor = BODY_COLOR_BLACK, \
- .noFlip = FALSE, \
+#define OLD_UNOWN_BASE_STATS \
+ { \
+ .baseHP = 50, \
+ .baseAttack = 150, \
+ .baseDefense = 50, \
+ .baseSpeed = 150, \
+ .baseSpAttack = 150, \
+ .baseSpDefense = 50, \
+ .type1 = TYPE_NORMAL, \
+ .type2 = TYPE_NORMAL, \
+ .catchRate = 3, \
+ .expYield = 1, \
+ .evYield_HP = 2, \
+ .evYield_Attack = 2, \
+ .evYield_Defense = 2, \
+ .evYield_Speed = 2, \
+ .evYield_SpAttack = 2, \
+ .evYield_SpDefense = 2, \
+ .item1 = ITEM_NONE, \
+ .item2 = ITEM_NONE, \
+ .genderRatio = MON_GENDERLESS, \
+ .eggCycles = 120, \
+ .friendship = 0, \
+ .growthRate = GROWTH_MEDIUM_FAST, \
+ .eggGroup1 = EGG_GROUP_UNDISCOVERED, \
+ .eggGroup2 = EGG_GROUP_UNDISCOVERED, \
+ .abilities = {ABILITY_NONE, ABILITY_NONE}, \
+ .safariZoneFleeRate = 0, \
+ .bodyColor = BODY_COLOR_BLACK, \
+ .noFlip = FALSE, \
}
const struct BaseStats gBaseStats[] =
diff --git a/src/egg_hatch.c b/src/egg_hatch.c
index 032ae6733..3bc35bc4a 100644
--- a/src/egg_hatch.c
+++ b/src/egg_hatch.c
@@ -293,7 +293,7 @@ static const s16 sEggShardVelocities[][2] =
// code
-static void CreatedHatchedMon(struct Pokemon *egg, struct Pokemon *temp)
+static void CreateHatchedMon(struct Pokemon *egg, struct Pokemon *temp)
{
u16 species;
u32 personality, pokerus;
@@ -357,7 +357,7 @@ static void AddHatchedMonToParty(u8 id)
u8 mapNameID;
struct Pokemon* mon = &gPlayerParty[id];
- CreatedHatchedMon(mon, &gEnemyParty[0]);
+ CreateHatchedMon(mon, &gEnemyParty[0]);
SetMonData(mon, MON_DATA_IS_EGG, &isEgg);
pokeNum = GetMonData(mon, MON_DATA_SPECIES);
diff --git a/src/event_object_movement.c b/src/event_object_movement.c
index e166f8b95..d6a2fe2ec 100644
--- a/src/event_object_movement.c
+++ b/src/event_object_movement.c
@@ -1448,7 +1448,7 @@ u8 SpawnSpecialObjectEventParameterized(u8 graphicsId, u8 movementBehavior, u8 l
y -= 7;
objectEventTemplate.localId = localId;
objectEventTemplate.graphicsId = graphicsId;
- objectEventTemplate.unk2 = 0;
+ objectEventTemplate.inConnection = 0;
objectEventTemplate.x = x;
objectEventTemplate.y = y;
objectEventTemplate.elevation = z;
diff --git a/tools/preproc/asm_file.cpp b/tools/preproc/asm_file.cpp
index 98805c952..7756cadc5 100644
--- a/tools/preproc/asm_file.cpp
+++ b/tools/preproc/asm_file.cpp
@@ -20,6 +20,7 @@
#include <cstdio>
#include <cstdarg>
+#include <stdexcept>
#include "preproc.h"
#include "asm_file.h"
#include "char_util.h"
diff --git a/tools/preproc/c_file.cpp b/tools/preproc/c_file.cpp
index 229f568fa..b996a048c 100644
--- a/tools/preproc/c_file.cpp
+++ b/tools/preproc/c_file.cpp
@@ -20,6 +20,7 @@
#include <cstdio>
#include <cstdarg>
+#include <stdexcept>
#include <string>
#include <memory>
#include "preproc.h"