diff options
author | Marijn van der Werf <marijn.vanderwerf@gmail.com> | 2017-05-26 16:50:46 +0200 |
---|---|---|
committer | Marijn van der Werf <marijn.vanderwerf@gmail.com> | 2017-05-26 16:50:46 +0200 |
commit | b4aa5dfd4053ed2de5d046f06884376641c6e8b5 (patch) | |
tree | 06e9a9c4be17dbd584de9e85f672835179a6be83 /src | |
parent | 2aae7e99d52fc488e75309909d279b459f5e1d80 (diff) |
Make rom match checksum
Diffstat (limited to 'src')
-rw-r--r-- | src/battle_ai.c | 2 | ||||
-rw-r--r-- | src/credits.c | 2 | ||||
-rw-r--r-- | src/field_map_obj_helpers.c | 16 | ||||
-rw-r--r-- | src/fieldmap.c | 8 | ||||
-rw-r--r-- | src/pokemon_3.c | 12 | ||||
-rw-r--r-- | src/script_pokemon_util_80F99CC.c | 2 | ||||
-rw-r--r-- | src/wild_encounter.c | 24 |
7 files changed, 15 insertions, 51 deletions
diff --git a/src/battle_ai.c b/src/battle_ai.c index c9a3d16ca..d815b959a 100644 --- a/src/battle_ai.c +++ b/src/battle_ai.c @@ -264,7 +264,7 @@ void BattleAI_HandleItemUseBeforeAISetup(void) s32 i; u8 *data = (u8 *)UNK_2016A00_STRUCT; - for (i = 0; (u32)i < sizeof(struct UnknownStruct1); i++) + for (i = 0; (u32)i < sizeof(struct UnknownStruct1B); i++) data[i] = 0; if ((gBattleTypeFlags & BATTLE_TYPE_TRAINER) diff --git a/src/credits.c b/src/credits.c index e66fbe1e7..6355a17e9 100644 --- a/src/credits.c +++ b/src/credits.c @@ -448,7 +448,7 @@ void task_a_8143D04(u8 taskIdA) gReservedSpritePaletteCount = 8; LZ77UnCompVram(&gBirchHelpGfx, (void *)VRAM); LZ77UnCompVram(&gBirchGrassTilemap, (void *)(VRAM + 0x3800)); - LoadPalette(gBirchBagGrassPal + 1, 1, 31 * 2); + LoadPalette(gBirchBagGrassPal[0] + 1, 1, 31 * 2); for (i = 0; i < 0x800; i++) HALL_OF_FAME_SHEET_0[i] = 0x11; diff --git a/src/field_map_obj_helpers.c b/src/field_map_obj_helpers.c index 977183beb..17584c96a 100644 --- a/src/field_map_obj_helpers.c +++ b/src/field_map_obj_helpers.c @@ -76,26 +76,26 @@ void Step1(struct Sprite *sprite, u8 dir) void Step2(struct Sprite *sprite, u8 dir) { - sprite->pos1.x += 2 * gDirectionToVector[dir].x; - sprite->pos1.y += 2 * gDirectionToVector[dir].y; + sprite->pos1.x += 2 * (u16) gDirectionToVector[dir].x; + sprite->pos1.y += 2 * (u16) gDirectionToVector[dir].y; } void Step3(struct Sprite *sprite, u8 dir) { - sprite->pos1.x += 2 * gDirectionToVector[dir].x + gDirectionToVector[dir].x; - sprite->pos1.y += 2 * gDirectionToVector[dir].y + gDirectionToVector[dir].y; + sprite->pos1.x += 2 * (u16) gDirectionToVector[dir].x + (u16) gDirectionToVector[dir].x; + sprite->pos1.y += 2 * (u16) gDirectionToVector[dir].y + (u16) gDirectionToVector[dir].y; } void Step4(struct Sprite *sprite, u8 dir) { - sprite->pos1.x += 4 * gDirectionToVector[dir].x; - sprite->pos1.y += 4 * gDirectionToVector[dir].y; + sprite->pos1.x += 4 * (u16) gDirectionToVector[dir].x; + sprite->pos1.y += 4 * (u16) gDirectionToVector[dir].y; } void Step8(struct Sprite *sprite, u8 dir) { - sprite->pos1.x += 8 * gDirectionToVector[dir].x; - sprite->pos1.y += 8 * gDirectionToVector[dir].y; + sprite->pos1.x += 8 * (u16) gDirectionToVector[dir].x; + sprite->pos1.y += 8 * (u16) gDirectionToVector[dir].y; } void oamt_npc_ministep_reset(struct Sprite *sprite, u8 a2, u8 a3) diff --git a/src/fieldmap.c b/src/fieldmap.c index c4e7dde8b..4cff47c17 100644 --- a/src/fieldmap.c +++ b/src/fieldmap.c @@ -344,7 +344,7 @@ union Block u16 value; }; -u16 MapGridGetZCoordAt(int x, int y) +u8 MapGridGetZCoordAt(int x, int y) { u16 block; int i; @@ -370,7 +370,7 @@ u16 MapGridGetZCoordAt(int x, int y) return block >> 12; } -u16 MapGridIsImpassableAt(int x, int y) +u8 MapGridIsImpassableAt(int x, int y) { u16 block; int i; @@ -396,7 +396,7 @@ u16 MapGridIsImpassableAt(int x, int y) return (block & 0xc00) >> 10; } -u16 MapGridGetMetatileIdAt(int x, int y) +u32 MapGridGetMetatileIdAt(int x, int y) { u16 block; int i; @@ -436,7 +436,7 @@ u32 MapGridGetMetatileBehaviorAt(int x, int y) return GetBehaviorByMetatileId(metatile) & 0xff; } -u16 MapGridGetMetatileLayerTypeAt(int x, int y) +u8 MapGridGetMetatileLayerTypeAt(int x, int y) { u16 metatile; metatile = MapGridGetMetatileIdAt(x, y); diff --git a/src/pokemon_3.c b/src/pokemon_3.c index c942dff03..09cbd2a3e 100644 --- a/src/pokemon_3.c +++ b/src/pokemon_3.c @@ -39,18 +39,6 @@ #define EVO_LEVEL_SHEDINJA 0x000e // Pokémon reaches the specified level (special value for Shedinja) #define EVO_BEAUTY 0x000f // Pokémon levels up with beauty ≥ specified value -struct Evolution -{ - u16 method; - u16 param; - u16 targetSpecies; -}; - -struct EvolutionData -{ - struct Evolution evolutions[5]; -}; - struct SpindaSpot { u8 x, y; diff --git a/src/script_pokemon_util_80F99CC.c b/src/script_pokemon_util_80F99CC.c index 25c467312..2cc9fd7cf 100644 --- a/src/script_pokemon_util_80F99CC.c +++ b/src/script_pokemon_util_80F99CC.c @@ -59,7 +59,7 @@ void sub_80F9A8C(u8 taskId) if(!gPaletteFade.active) { gPaletteFade.bufferTransferDisabled = 1; - OpenPartyMenu(gTasks[taskId].data[0], 0); + OpenPartyMenu((u8) gTasks[taskId].data[0], 0); DestroyTask(taskId); } } diff --git a/src/wild_encounter.c b/src/wild_encounter.c index 143587438..31dbd17a2 100644 --- a/src/wild_encounter.c +++ b/src/wild_encounter.c @@ -15,30 +15,6 @@ #include "species.h" #include "tv.h" -struct WildPokemon -{ - u8 minLevel; - u8 maxLevel; - u16 species; -}; - -struct WildPokemonInfo -{ - u8 encounterRate; - const struct WildPokemon *wildPokemon; -}; - -struct WildPokemonHeader -{ - u8 mapGroup; - u8 mapNum; - struct WildPokemonInfo *landMonsInfo; - struct WildPokemonInfo *waterMonsInfo; - struct WildPokemonInfo *rockSmashMonsInfo; - struct WildPokemonInfo *fishingMonsInfo; -}; - - const struct WildPokemon PetalburgCity_WaterMons [] = { {20, 30, SPECIES_MARILL}, |