mirror of
https://github.com/pret/pokeheartgold.git
synced 2026-05-23 04:36:22 -05:00
parent
8019b726a4
commit
a86bbefce8
|
|
@ -31388,7 +31388,7 @@ ov14_021F5190: ; 0x021F5190
|
|||
ldr r0, [r0]
|
||||
bl SavArray_IsNatDexEnabled
|
||||
ldrh r1, [r6, #4]
|
||||
bl sub_02074930
|
||||
bl Pokedex_ConvertToCurrentDexNo
|
||||
add r6, r0, #0
|
||||
beq _021F5208
|
||||
ldr r2, [r5, #0x34]
|
||||
|
|
|
|||
|
|
@ -2386,7 +2386,7 @@ _021E6C04:
|
|||
beq _021E6C60
|
||||
ldr r0, _021E6C84 ; =0x00001858
|
||||
ldrb r0, [r7, r0]
|
||||
bl sub_02074930
|
||||
bl Pokedex_ConvertToCurrentDexNo
|
||||
add r1, r0, #0
|
||||
ldr r2, [sp, #4]
|
||||
ldr r0, _021E6C88 ; =0x00001032
|
||||
|
|
@ -16327,7 +16327,7 @@ ov18_021EDDB4: ; 0x021EDDB4
|
|||
add r1, r0, #0
|
||||
ldr r0, _021EDDF8 ; =0x00001858
|
||||
ldrb r0, [r5, r0]
|
||||
bl sub_02074930
|
||||
bl Pokedex_ConvertToCurrentDexNo
|
||||
sub r4, r0, #1
|
||||
add r0, r4, #0
|
||||
mov r1, #0xf
|
||||
|
|
@ -17615,7 +17615,7 @@ ov18_021EE75C: ; 0x021EE75C
|
|||
ldr r0, _021EE7D0 ; =0x00001858
|
||||
add r1, r7, #0
|
||||
ldrb r0, [r5, r0]
|
||||
bl sub_02074930
|
||||
bl Pokedex_ConvertToCurrentDexNo
|
||||
add r2, r0, #0
|
||||
mov r0, #2
|
||||
str r0, [sp]
|
||||
|
|
@ -18210,7 +18210,7 @@ _021EEC5A:
|
|||
ldr r0, _021EECA4 ; =0x00001858
|
||||
ldr r1, [sp, #0x14]
|
||||
ldrb r0, [r5, r0]
|
||||
bl sub_02074930
|
||||
bl Pokedex_ConvertToCurrentDexNo
|
||||
add r2, r0, #0
|
||||
mov r0, #2
|
||||
str r0, [sp]
|
||||
|
|
@ -37851,7 +37851,7 @@ _021F88A8:
|
|||
ldr r1, _021F890C ; =0x00000878
|
||||
ldrb r0, [r5, r0]
|
||||
ldrh r1, [r4, r1]
|
||||
bl sub_02074930
|
||||
bl Pokedex_ConvertToCurrentDexNo
|
||||
ldr r1, _021F890C ; =0x00000878
|
||||
sub r0, r0, #1
|
||||
ldrh r2, [r4, r1]
|
||||
|
|
@ -37922,7 +37922,7 @@ _021F892A:
|
|||
add r2, r2, r1
|
||||
ldr r1, _021F894C ; =0x00000878
|
||||
ldrh r1, [r2, r1]
|
||||
bl sub_02074930
|
||||
bl Pokedex_ConvertToCurrentDexNo
|
||||
pop {r3, pc}
|
||||
nop
|
||||
_021F8944: .word 0x0000102C
|
||||
|
|
@ -38432,7 +38432,7 @@ _021F8CDA:
|
|||
lsl r1, r1, #2
|
||||
ldr r0, [r5, #0x10]
|
||||
ldr r1, [r5, r1]
|
||||
bl sub_02074930
|
||||
bl Pokedex_ConvertToCurrentDexNo
|
||||
add r2, r0, #0
|
||||
mov r0, #2
|
||||
str r0, [sp]
|
||||
|
|
|
|||
|
|
@ -2032,7 +2032,7 @@ _02051696:
|
|||
bl GetMonData
|
||||
add r1, r0, #0
|
||||
mov r0, #0
|
||||
bl sub_02074930
|
||||
bl Pokedex_ConvertToCurrentDexNo
|
||||
cmp r0, #0
|
||||
ldr r0, [r4, #0xc]
|
||||
beq _020516C4
|
||||
|
|
@ -2079,7 +2079,7 @@ _020516FC:
|
|||
bl GetMonData
|
||||
add r1, r0, #0
|
||||
mov r0, #0
|
||||
bl sub_02074930
|
||||
bl Pokedex_ConvertToCurrentDexNo
|
||||
cmp r0, #0
|
||||
ldr r0, [r4, #0xc]
|
||||
beq _0205172A
|
||||
|
|
|
|||
|
|
@ -1236,7 +1236,7 @@ _0208CD34:
|
|||
add r1, #0x10
|
||||
ldrh r1, [r4, r1]
|
||||
ldr r0, [r0, #0x1c]
|
||||
bl sub_02074930
|
||||
bl Pokedex_ConvertToCurrentDexNo
|
||||
add r2, r0, #0
|
||||
beq _0208CDF0
|
||||
mov r0, #2
|
||||
|
|
|
|||
|
|
@ -29367,7 +29367,7 @@ FS_EXTERN_OVERLAY(OV_101)
|
|||
.public Party_SafeCopyMonToSlot_ResetUnkSub
|
||||
.public Party_SwapSlots
|
||||
.public Party_copy
|
||||
.public sub_02074930
|
||||
.public Pokedex_ConvertToCurrentDexNo
|
||||
.public sub_02074944
|
||||
.public sub_0207495C
|
||||
.public sub_0207496C
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef POKEHEARTGOLD_UNK_0203BBB4_H
|
||||
#define POKEHEARTGOLD_UNK_0203BBB4_H
|
||||
#ifndef POKEHEARTGOLD_DIAMOND_DUST_H
|
||||
#define POKEHEARTGOLD_DIAMOND_DUST_H
|
||||
|
||||
#include "save.h"
|
||||
#include "sav_system_info.h"
|
||||
|
|
@ -27,4 +27,4 @@ typedef struct MonthDay {
|
|||
|
||||
u32 sub_0203BBB4(FieldSystem* fsys, u32 mapId);
|
||||
|
||||
#endif //POKEHEARTGOLD_UNK_0203BBB4_H
|
||||
#endif //POKEHEARTGOLD_DIAMOND_DUST_H
|
||||
12
include/pokedex_util.h
Normal file
12
include/pokedex_util.h
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#ifndef POKEHEARTGOLD_POKEDEX_UTIL_H
|
||||
#define POKEHEARTGOLD_POKEDEX_UTIL_H
|
||||
|
||||
#include "pokedex.h"
|
||||
#include "save.h"
|
||||
|
||||
BOOL Pokedex_IsNatDexEnabled(const POKEDEX* pokedex);
|
||||
BOOL SavArray_IsNatDexEnabled(SAVEDATA* savedata);
|
||||
u32 Pokedex_ConvertToCurrentDexNo(BOOL natDexFlag, u32 species);
|
||||
|
||||
#endif //POKEHEARTGOLD_POKEDEX_UTIL_H
|
||||
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
#ifndef POKEHEARTGOLD_UNK_02074910_H
|
||||
#define POKEHEARTGOLD_UNK_02074910_H
|
||||
|
||||
#include "pokedex.h"
|
||||
#include "save.h"
|
||||
|
||||
BOOL Pokedex_IsNatDexEnabled(const POKEDEX* pokedex);
|
||||
BOOL SavArray_IsNatDexEnabled(SAVEDATA* savedata);
|
||||
u32 sub_02074930(BOOL natDexFlag, u32 species);
|
||||
|
||||
#endif //POKEHEARTGOLD_UNK_02074910_H
|
||||
|
||||
4
main.lsf
4
main.lsf
|
|
@ -149,7 +149,7 @@ Static main
|
|||
Object src/map_events.o
|
||||
Object src/save_flypoints.o
|
||||
Object asm/unk_0203BA5C.o
|
||||
Object src/unk_0203BBB4.o
|
||||
Object src/diamond_dust.o
|
||||
Object asm/unk_0203BC10.o
|
||||
Object asm/unk_0203DB6C.o
|
||||
Object asm/unk_0203DE74.o
|
||||
|
|
@ -242,7 +242,7 @@ Static main
|
|||
Object src/pokemon_storage_system.o
|
||||
Object src/pokemon_icon_idx.o
|
||||
Object src/party.o
|
||||
Object src/unk_02074910.o
|
||||
Object src/pokedex_util.o
|
||||
Object asm/unk_02074944.o
|
||||
Object asm/unk_02074E5C.o
|
||||
Object asm/unk_020755E8.o
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
#include "unk_0203BBB4.h"
|
||||
#include "diamond_dust.h"
|
||||
#include "map_header.h"
|
||||
#include "unk_02055418.h"
|
||||
#include "constants/maps.h"
|
||||
|
||||
const struct MonthDay DiamondDustDates[] = {
|
||||
|
|
@ -16,11 +18,11 @@ u32 sub_0203BBB4(FieldSystem* fsys, u32 mapId) {
|
|||
u8 c;
|
||||
|
||||
u32 weatherType = MapHeader_GetWeatherType(mapId);
|
||||
if (MAP_D41R0108 != mapId) {
|
||||
if (mapId != MAP_D41R0108) {
|
||||
return weatherType;
|
||||
}
|
||||
SYSINFO_RTC* sysinfo_rtc = Sav2_SysInfo_RTC_get(fsys->savedata);
|
||||
for (c = 0; c < 8; c++) {
|
||||
for (c = 0; c < NELEMS(DiamondDustDates); c++) {
|
||||
u8 month = DiamondDustDates[c].month;
|
||||
u8 day = DiamondDustDates[c].day;
|
||||
if ((sysinfo_rtc->date.month == month) && (sysinfo_rtc->date.day == day)) {
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
#include "unk_02074910.h"
|
||||
#include "pokedex_util.h"
|
||||
#include "pokemon.h"
|
||||
|
||||
BOOL SavArray_IsNatDexEnabled(SAVEDATA* savedata) {
|
||||
return Pokedex_IsNatDexEnabled(Sav2_Pokedex_get(savedata));
|
||||
|
|
@ -8,7 +9,7 @@ BOOL Pokedex_IsNatDexEnabled(const POKEDEX* pokedex) {
|
|||
return (Pokedex_GetNatDexFlag(pokedex) == TRUE);
|
||||
}
|
||||
|
||||
u32 sub_02074930(BOOL natDexFlag, u32 species) {
|
||||
u32 Pokedex_ConvertToCurrentDexNo(BOOL natDexFlag, u32 species) {
|
||||
if (natDexFlag == FALSE) {
|
||||
return SpeciesToJohtoDexNo((u16) species);
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user