diff options
author | Josh <32826900+ShinyDragonHunter@users.noreply.github.com> | 2022-03-04 14:32:05 +0000 |
---|---|---|
committer | Josh <32826900+ShinyDragonHunter@users.noreply.github.com> | 2022-03-04 14:32:05 +0000 |
commit | 6208aa95b2a5951a44d36eed367beb0b14101288 (patch) | |
tree | 116ee0dd34dd46b4d5ffac41439f7d0503b681db | |
parent | 906ce748b70fc410ffc91ae8ad59f57670b1ce93 (diff) |
Typos
-rw-r--r-- | Improve-the-Loading-of-Battle-Terrain.md | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Improve-the-Loading-of-Battle-Terrain.md b/Improve-the-Loading-of-Battle-Terrain.md index db12388..839f00e 100644 --- a/Improve-the-Loading-of-Battle-Terrain.md +++ b/Improve-the-Loading-of-Battle-Terrain.md @@ -1,7 +1,7 @@ WARNING: a bit of a long tutorial. When making a ROM hack, it's natural to want to add new battle terrain for battles. Emerald unfortunately handles loading these through big switch statements in functions. -FRLG on the other hand, has a few a extra functions that handle the loading of these terrain by giving them the required battle terrain ID for example `BATTLE_TERRAIN_PLAIN` +FRLG on the other hand, has a few extra functions that handle the loading of these terrain by giving them the required battle terrain ID for example `BATTLE_TERRAIN_PLAIN` at the cost of needing every single battle terrain in `sBattleTerrainTable`. These changes are done in [battle_bg.c](../blob/master/src/battle_bg.c). This will walk you through porting this behaviour over to Emerald. Firstly, we're going to look at some things from pokefirered. @@ -70,7 +70,7 @@ static void LoadBattleTerrainEntryGfx(u16 terrain) // Gets the battle terrain value if conditions are met. // This could be a specific trainer class, battle type or wild Pokémon. // If no conditions are met or if the map scene isn't MAP_BATTLE_SCENE_NORMAL, -// gets the battle terrain mapped to map scenes. +// use the battle terrain mapped to map scenes. static u8 GetBattleTerrainOverride(void) { u8 battleScene; @@ -103,7 +103,7 @@ static u8 GetBattleTerrainOverride(void) } ``` -We will basically taking advantage of these functions to get the battle terrain we are wanted to use. We will need to add some more BATTLE_TERRAIN_* values. In `include/constants/battle.h`, +We will basically be taking advantage of these functions to get the battle terrain we are wanting to use. We will need to add some more BATTLE_TERRAIN_* values. In `include/constants/battle.h`, We should see these: ```c // Battle terrain defines for gBattleTerrain. @@ -312,8 +312,7 @@ static const struct { }; ``` -`GetBattleTerrainByMapScene`,`LoadBattleTerrainGfx` and `LoadBattleTerrainEntryGfx` mentioned above can be used as is. I recommend putting these below `sMapBattleSceneMapping`, but again, -up to preference. +`GetBattleTerrainByMapScene`,`LoadBattleTerrainGfx` and `LoadBattleTerrainEntryGfx` mentioned above can be used as is. I recommend putting these below `sMapBattleSceneMapping`, but again, up to preference. Now we need to add `GetBattleTerrainOverride` with our changes, this should look like this: ```c |