Merge pull request #440 from garakmon/fldeff

Decompile / port fldeff_80F9BCC
This commit is contained in:
Diegoisawesome 2018-12-19 22:16:59 -06:00 committed by GitHub
commit 6ef9671718
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
27 changed files with 1651 additions and 2855 deletions

File diff suppressed because it is too large Load Diff

View File

@ -537,7 +537,7 @@ EventScript_23B5F0:: @ 823B5F0
goto_eq EventScript_23B5A1 goto_eq EventScript_23B5A1
msgbox Text_2767D1, MSGBOX_SIGN msgbox Text_2767D1, MSGBOX_SIGN
special sub_80E9C2C special sub_80E9C2C
special sub_80FA57C special DoSecretBasePCTurnOffEffect
releaseall releaseall
end end
@ -547,13 +547,13 @@ EventScript_23B62F:: @ 823B62F
goto_eq EventScript_23B5A1 goto_eq EventScript_23B5A1
msgbox Text_2767E9, MSGBOX_SIGN msgbox Text_2767E9, MSGBOX_SIGN
special sub_80E9C2C special sub_80E9C2C
special sub_80FA57C special DoSecretBasePCTurnOffEffect
releaseall releaseall
end end
EventScript_23B652:: @ 823B652 EventScript_23B652:: @ 823B652
msgbox Text_27676F, MSGBOX_SIGN msgbox Text_27676F, MSGBOX_SIGN
special sub_80FA57C special DoSecretBasePCTurnOffEffect
closemessage closemessage
releaseall releaseall
end end
@ -564,7 +564,7 @@ EventScript_23B660:: @ 823B660
end end
EventScript_23B66E:: @ 823B66E EventScript_23B66E:: @ 823B66E
special sub_80FA57C special DoSecretBasePCTurnOffEffect
closemessage closemessage
releaseall releaseall
end end
@ -592,7 +592,7 @@ EventScript_SecretBaseSandOrnament:: @ 823B684
end end
EventScript_SecretBaseShieldOrToyTV:: @ 823B68C EventScript_SecretBaseShieldOrToyTV:: @ 823B68C
special sub_80FAC78 special GetShieldToyTVDecorationInfo
compare VAR_RESULT, 0 compare VAR_RESULT, 0
goto_eq EventScript_23B6BC goto_eq EventScript_23B6BC
compare VAR_RESULT, 1 compare VAR_RESULT, 1

View File

@ -1,244 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
.align 2
gSpriteImage_858D978:: @ 858D978
.incbin "graphics/unknown/858E588/0.4bpp"
.align 2
gSpriteImage_858D9F8:: @ 858D9F8
.incbin "graphics/unknown/858E588/1.4bpp"
.align 2
gSpriteImage_858DA78:: @ 858DA78
.incbin "graphics/unknown/858E588/2.4bpp"
.align 2
gSpriteImage_858DAF8:: @ 858DAF8
.incbin "graphics/unknown/858E588/3.4bpp"
.align 2
gSpriteImage_858DB78:: @ 858DB78
.incbin "graphics/unknown/858E588/4.4bpp"
.space 32
.align 2
gFieldEffectObjectPalette7:: @ 858DC18
.incbin "graphics/event_objects/palettes/field_effect_object_palette_07.gbapal"
.align 2
gSpriteImage_858DC38:: @ 858DC38
.incbin "graphics/unknown/858E5D8/0.4bpp"
.align 2
gSpriteImage_858DCB8:: @ 858DCB8
.incbin "graphics/unknown/858E5D8/1.4bpp"
.align 2
gSpriteImage_858DD38:: @ 858DD38
.incbin "graphics/unknown/858E5D8/2.4bpp"
.align 2
gSpriteImage_858DDB8:: @ 858DDB8
.incbin "graphics/unknown/858E5D8/3.4bpp"
.align 2
gSpriteImage_858DE38:: @ 858DE38
.incbin "graphics/unknown/858E5D8/4.4bpp"
.align 2
gSpriteImage_858DEB8:: @ 858DEB8
.incbin "graphics/unknown/858E5B0/0.4bpp"
.align 2
gSpriteImage_858DF38:: @ 858DF38
.incbin "graphics/unknown/858E5B0/1.4bpp"
.align 2
gSpriteImage_858DFB8:: @ 858DFB8
.incbin "graphics/unknown/858E5B0/2.4bpp"
.align 2
gSpriteImage_858E038:: @ 858E038
.incbin "graphics/unknown/858E5B0/3.4bpp"
.align 2
gSpriteImage_858E0B8:: @ 858E0B8
.incbin "graphics/unknown/858E5B0/4.4bpp"
.align 2
gSpriteImage_858E138:: @ 858E138
.incbin "graphics/unknown/858E5B0/5.4bpp"
.align 2
gFieldEffectObjectPalette8:: @ 858E1B8
.incbin "graphics/event_objects/palettes/field_effect_object_palette_08.gbapal"
.align 2
gSpriteImage_858E1D8:: @ 858E1D8
.incbin "graphics/unknown/858E674/0.4bpp"
.align 2
gSpriteImage_858E2D8:: @ 858E2D8
.incbin "graphics/unknown/858E674/1.4bpp"
.align 2
gSpriteImage_858E3D8:: @ 858E3D8
.incbin "graphics/unknown/858E674/2.4bpp"
.align 2
gOamData_858E4D8:: @ 858E4D8
.2byte 0x0000, 0x4000, 0x0800, 0x0000
.align 2
gSpriteAnim_858E4E0:: @ 858E4E0
.2byte 0x0000, 0x0008, 0x0001, 0x0008, 0x0002, 0x0008, 0x0003, 0x0008, 0x0004, 0x0008, 0xffff, 0x0000
.align 2
gSpriteAnim_858E4F8:: @ 858E4F8
.2byte 0x0000, 0x0008, 0x0001, 0x0008, 0x0002, 0x0008, 0x0003, 0x0008, 0x0004, 0x0008, 0xffff, 0x0000
.align 2
gSpriteAnim_858E510:: @ 858E510
.2byte 0x0004, 0x0008, 0x0003, 0x0008, 0x0002, 0x0008, 0x0001, 0x0008, 0x0000, 0x0008, 0xffff, 0x0000
.align 2
gSpriteAnim_858E528:: @ 858E528
.2byte 0x0000, 0x0048, 0x0001, 0x0048, 0x0002, 0x0048, 0x0003, 0x0048, 0x0004, 0x0048, 0xffff, 0x0000
.align 2
gSpriteAnim_858E540:: @ 858E540
.2byte 0x0004, 0x0048, 0x0003, 0x0048, 0x0002, 0x0048, 0x0001, 0x0048, 0x0000, 0x0048, 0xffff, 0x0000
.align 2
gSpriteAnim_858E558:: @ 858E558
.2byte 0x0000, 0x0008, 0x0001, 0x0008, 0x0002, 0x0008, 0x0003, 0x0008, 0x0004, 0x0008, 0xffff, 0x0000
.align 2
gSpriteAnimTable_858E570:: @ 858E570
.4byte gSpriteAnim_858E4E0
.align 2
gSpriteAnimTable_858E574:: @ 858E574
.4byte gSpriteAnim_858E4F8
.4byte gSpriteAnim_858E510
.4byte gSpriteAnim_858E528
.4byte gSpriteAnim_858E540
.align 2
gSpriteAnimTable_858E584:: @ 858E584
.4byte gSpriteAnim_858E558
.align 2
gUnknown_858E588:: @ 858E588
obj_frame_tiles gSpriteImage_858D978, 0x0080
obj_frame_tiles gSpriteImage_858D9F8, 0x0080
obj_frame_tiles gSpriteImage_858DA78, 0x0080
obj_frame_tiles gSpriteImage_858DAF8, 0x0080
obj_frame_tiles gSpriteImage_858DB78, 0x0080
.align 2
gUnknown_858E5B0:: @ 858E5B0
obj_frame_tiles gSpriteImage_858DEB8, 0x0080
obj_frame_tiles gSpriteImage_858DF38, 0x0080
obj_frame_tiles gSpriteImage_858DFB8, 0x0080
obj_frame_tiles gSpriteImage_858E038, 0x0080
obj_frame_tiles gSpriteImage_858E0B8, 0x0080
.align 2
gUnknown_858E5D8:: @ 858E5D8
obj_frame_tiles gSpriteImage_858DC38, 0x0080
obj_frame_tiles gSpriteImage_858DCB8, 0x0080
obj_frame_tiles gSpriteImage_858DD38, 0x0080
obj_frame_tiles gSpriteImage_858DDB8, 0x0080
obj_frame_tiles gSpriteImage_858DE38, 0x0080
.align 2
gUnknown_0858E600:: @ 858E600
spr_template 0xffff, 0x1003, gOamData_858E4D8, gSpriteAnimTable_858E570, gUnknown_858E588, gDummySpriteAffineAnimTable, sub_80FA18C
.align 2
gUnknown_0858E618:: @ 858E618
spr_template 0xffff, 0x1008, gOamData_858E4D8, gSpriteAnimTable_858E574, gUnknown_858E5B0, gDummySpriteAffineAnimTable, sub_80FA2D8
.align 2
gUnknown_0858E630:: @ 858E630
spr_template 0xffff, 0x1008, gOamData_858E4D8, gSpriteAnimTable_858E584, gUnknown_858E5D8, gDummySpriteAffineAnimTable, sub_80FA3FC
.align 2
gFieldEffectObjectPaletteInfo7:: @ 858E648
obj_pal gFieldEffectObjectPalette7, 0x1003
.align 2
gFieldEffectObjectPaletteInfo8:: @ 858E650
obj_pal gFieldEffectObjectPalette8, 0x1008
.align 2
gOamData_858E658:: @ 858E658
.2byte 0x8000, 0x8000, 0x0800, 0x0000
.align 2
gSpriteAnim_858E660:: @ 858E660
.2byte 0x0000, 0x0006, 0x0001, 0x0006, 0x0002, 0x0006, 0xffff, 0x0000
.align 2
gSpriteAnimTable_858E670:: @ 858E670
.4byte gSpriteAnim_858E660
.align 2
gUnknown_0858E674:: @ 858E674
obj_frame_tiles gSpriteImage_858E1D8, 0x0100
obj_frame_tiles gSpriteImage_858E2D8, 0x0100
obj_frame_tiles gSpriteImage_858E3D8, 0x0100
.align 2
gUnknown_0858E68C:: @ 858E68C
spr_template 0xffff, 0x100e, gOamData_858E658, gSpriteAnimTable_858E670, gUnknown_0858E674, gDummySpriteAffineAnimTable, door_restore_tilemap
.align 2
@ This uses one of the secret base palettes, so there is no
@ "field_effect_object_palette_09.pal" file.
gFieldEffectObjectPaletteInfo9:: @ 858E6A4
obj_pal gTilesetPalettes_SecretBase + 5 * 0x20, 0x100E
.align 2
gSpriteImage_858E6AC:: @ 858E6AC
.incbin "graphics/unknown/858E84C/0.4bpp"
.align 2
gSpriteImage_858E72C:: @ 858E72C
.incbin "graphics/unknown/858E84C/1.4bpp"
.align 2
gSpriteImage_858E7AC:: @ 858E7AC
.incbin "graphics/unknown/858E84C/2.4bpp"
.align 2
gUnknown_0858E82C:: @ 858E82C
.incbin "graphics/unknown/unknown_58E82C.gbapal"
.align 2
gUnknown_0858E84C:: @ 858E84C
obj_frame_tiles gSpriteImage_858E6AC, 0x0080
obj_frame_tiles gSpriteImage_858E72C, 0x0080
obj_frame_tiles gSpriteImage_858E7AC, 0x0080
.align 2
gUnknown_0858E864:: @ 858E864
obj_pal gUnknown_0858E82C, 0x1000
.align 2
gSpriteAnim_858E86C:: @ 858E86C
.2byte 0x0000, 0x001e, 0x0001, 0x001e, 0x0002, 0x001e, 0xfffe, 0x0000
.align 2
gSpriteAnimTable_858E87C:: @ 858E87C
.4byte gSpriteAnim_858E86C
.align 2
gUnknown_0858E880:: @ 858E880
spr_template 0xffff, 0x1000, gEventObjectBaseOam_32x8, gSpriteAnimTable_858E87C, gUnknown_0858E84C, gDummySpriteAffineAnimTable, SpriteCallbackDummy

View File

@ -118,7 +118,7 @@ gFieldEffectScript_GroundImpactDust:: @ 82DBB28
field_eff_end field_eff_end
gFieldEffectScript_Unknown11:: @ 82DBB32 gFieldEffectScript_Unknown11:: @ 82DBB32
field_eff_callnative oei_sweet_scent field_eff_callnative FldEff_UseSecretPowerCave
field_eff_end field_eff_end
gFieldEffectScript_BikeHopTallGrass:: @ 82DBB38 gFieldEffectScript_BikeHopTallGrass:: @ 82DBB38
@ -179,11 +179,11 @@ gFieldEffectScript_Unknown25:: @ 82DBBB6
field_eff_end field_eff_end
gFieldEffectScript_Unknown26:: @ 82DBBC5 gFieldEffectScript_Unknown26:: @ 82DBBC5
field_eff_callnative sub_80FA208 field_eff_callnative FldEff_UseSecretPowerTree
field_eff_end field_eff_end
gFieldEffectScript_Unknown27:: @ 82DBBCB gFieldEffectScript_Unknown27:: @ 82DBBCB
field_eff_callnative sub_80FA36C field_eff_callnative FldEff_UseSecretPowerShrub
field_eff_end field_eff_end
gFieldEffectScript_TreeDisguise:: @ 82DBBD1 gFieldEffectScript_TreeDisguise:: @ 82DBBD1
@ -264,11 +264,11 @@ gFieldEffectScript_HeartIcon:: @ 82DBC56
field_eff_end field_eff_end
gFieldEffectScript_Unknown47:: @ 82DBC60 gFieldEffectScript_Unknown47:: @ 82DBC60
field_eff_callnative sub_80FA6FC field_eff_callnative FldEff_NopA6FC
field_eff_end field_eff_end
gFieldEffectScript_Unknown48:: @ 82DBC66 gFieldEffectScript_Unknown48:: @ 82DBC66
field_eff_callnative sub_80FA700 field_eff_callnative FldEff_NopA700
field_eff_end field_eff_end
gFieldEffectScript_JumpOutOfAsh:: @ 82DBC6C gFieldEffectScript_JumpOutOfAsh:: @ 82DBC6C
@ -284,7 +284,7 @@ gFieldEffectScript_Unknown51:: @ 82DBC80
field_eff_end field_eff_end
gFieldEffectScript_Unknown52:: @ 82DBC86 gFieldEffectScript_Unknown52:: @ 82DBC86
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo9, sub_80FAA7C field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo9, FldEff_SandPillar
field_eff_end field_eff_end
gFieldEffectScript_Bubbles:: @ 82DBC90 gFieldEffectScript_Bubbles:: @ 82DBC90
@ -296,15 +296,15 @@ gFieldEffectScript_Unknown54:: @ 82DBC9A
field_eff_end field_eff_end
gFieldEffectScript_Unknown55:: @ 82DBCA4 gFieldEffectScript_Unknown55:: @ 82DBCA4
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo7, sub_80FA13C field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo7, FldEff_SecretPowerCave
field_eff_end field_eff_end
gFieldEffectScript_Unknown56:: @ 82DBCAE gFieldEffectScript_Unknown56:: @ 82DBCAE
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo8, sub_80FA248 field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo8, FldEff_SecretPowerTree
field_eff_end field_eff_end
gFieldEffectScript_Unknown57:: @ 82DBCB8 gFieldEffectScript_Unknown57:: @ 82DBCB8
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo8, sub_80FA3AC field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo8, FldEff_SecretPowerShrub
field_eff_end field_eff_end
gFieldEffectScript_Unknown58:: @ 82DBCC2 gFieldEffectScript_Unknown58:: @ 82DBCC2
@ -320,7 +320,7 @@ gFieldEffectScript_Unknown60:: @ 82DBCD2
field_eff_end field_eff_end
gFieldEffectScript_Unknown61:: @ 82DBCD8 gFieldEffectScript_Unknown61:: @ 82DBCD8
field_eff_callnative sub_80FA458 field_eff_callnative FldEff_SecretBasePCTurnOn
field_eff_end field_eff_end
gFieldEffectScript_Unknown62:: @ 82DBCDE gFieldEffectScript_Unknown62:: @ 82DBCDE

View File

@ -117,7 +117,7 @@ BattleFrontier_OutsideEast_EventScript_242CEA:: @ 8242CEA
BattleFrontier_OutsideEast_EventScript_242CFC:: @ 8242CFC BattleFrontier_OutsideEast_EventScript_242CFC:: @ 8242CFC
lock lock
faceplayer faceplayer
special sub_80FAFF8 special DoWateringBerryTreeAnim
waitstate waitstate
waitse waitse
playse 269 playse 269

View File

@ -441,7 +441,7 @@ gUnknown_08615D9C:: @ 8615D9C
.4byte hm_prepare_waterfall, 0x0000000d .4byte hm_prepare_waterfall, 0x0000000d
.4byte SetUpFieldMove_Teleport, 0x0000000d .4byte SetUpFieldMove_Teleport, 0x0000000d
.4byte SetUpFieldMove_Dig, 0x0000000d .4byte SetUpFieldMove_Dig, 0x0000000d
.4byte sub_80FA004, 0x0000000d .4byte SetUpFieldMove_SecretPower, 0x0000000d
.4byte SetUpFieldMove_SoftBoiled, 0x00000010 .4byte SetUpFieldMove_SoftBoiled, 0x00000010
.4byte SetUpFieldMove_SoftBoiled, 0x00000010 .4byte SetUpFieldMove_SoftBoiled, 0x00000010
.4byte SetUpFieldMove_SweetScent, 0x0000000d .4byte SetUpFieldMove_SweetScent, 0x0000000d

View File

@ -174,7 +174,7 @@ Route102_EventScript_2744C4:: @ 82744C4
message Route102_Text_274710 message Route102_Text_274710
waitmessage waitmessage
special EventObjectInteractionWaterBerryTree special EventObjectInteractionWaterBerryTree
special sub_80FAFF8 special DoWateringBerryTreeAnim
waitstate waitstate
message Route102_Text_274723 message Route102_Text_274723
waitmessage waitmessage

View File

@ -34,7 +34,7 @@ gSpecials:: @ 81DBA64
def_special sub_8129708 def_special sub_8129708
def_special sub_80E91F8 def_special sub_80E91F8
def_special sub_80EA30C def_special sub_80EA30C
def_special sub_80FA57C def_special DoSecretBasePCTurnOffEffect
def_special sub_80E6BE8 def_special sub_80E6BE8
def_special sub_80B2DA4 def_special sub_80B2DA4
def_special sub_80B2E4C def_special sub_80B2E4C
@ -105,7 +105,7 @@ gSpecials:: @ 81DBA64
def_special GiveMonArtistRibbon def_special GiveMonArtistRibbon
def_special sub_80B3000 def_special sub_80B3000
def_special SaveGame def_special SaveGame
def_special sub_80FAFF8 def_special DoWateringBerryTreeAnim
def_special easy_chat_input_maybe def_special easy_chat_input_maybe
def_special sub_811EECC def_special sub_811EECC
def_special ScrSpecial_GetCurrentMauvilleMan def_special ScrSpecial_GetCurrentMauvilleMan
@ -317,7 +317,7 @@ gSpecials:: @ 81DBA64
def_special ScriptCheckFreePokemonStorageSpace def_special ScriptCheckFreePokemonStorageSpace
def_special DoSealedChamberShakingEffect1 def_special DoSealedChamberShakingEffect1
def_special sub_8139B60 def_special sub_8139B60
def_special sub_80FAC78 def_special GetShieldToyTVDecorationInfo
def_special IsPokerusInParty def_special IsPokerusInParty
def_special SetSootopolisGymCrackedIceMetatiles def_special SetSootopolisGymCrackedIceMetatiles
def_special sub_8139560 def_special sub_8139560

View File

@ -100,7 +100,7 @@
#define VAR_0x4051 0x4051 #define VAR_0x4051 0x4051
#define VAR_0x4052 0x4052 #define VAR_0x4052 0x4052
#define VAR_0x4053 0x4053 #define VAR_0x4053 0x4053
#define VAR_0x4054 0x4054 #define VAR_CURRENT_SECRET_BASE 0x4054
#define VAR_0x4055 0x4055 #define VAR_0x4055 0x4055
#define VAR_0x4056 0x4056 #define VAR_0x4056 0x4056
#define VAR_0x4057 0x4057 #define VAR_0x4057 0x4057

View File

@ -58,5 +58,7 @@ u8 GetJumpSpecialMovementAction(u32);
bool8 PartyHasMonWithSurf(void); bool8 PartyHasMonWithSurf(void);
bool8 IsPlayerFacingSurfableFishableWater(void); bool8 IsPlayerFacingSurfableFishableWater(void);
bool8 IsPlayerSurfingNorth(void); bool8 IsPlayerSurfingNorth(void);
void sub_808C228(u8 direction);
u8 sub_808BCD0(void);
#endif // GUARD_FIELD_PLAYER_AVATAR_H #endif // GUARD_FIELD_PLAYER_AVATAR_H

View File

@ -1,19 +0,0 @@
#ifndef GUARD_FLDEFF_80F9BCC_H
#define GUARD_FLDEFF_80F9BCC_H
// Exported type declarations
// Exported RAM declarations
// Exported ROM declarations
void sub_80FA5E4(s16 id, s16 x, s16 y);
void sub_80FA794(s16 x, s16 y);
void CreateRecordMixingSprite(void);
void DestroyRecordMixingSprite(void);
void FldeffPoison_Start(void);
void sub_80FA970(s16);
void sub_80FA9D0(void);
bool8 sub_80FADE4(u16, u8);
#endif //GUARD_FLDEFF_80F9BCC_H

24
include/fldeff_misc.h Normal file
View File

@ -0,0 +1,24 @@
#ifndef GUARD_FLDEFF_MISC_H
#define GUARD_FLDEFF_MISC_H
void PopSecretBaseBalloon(s16 id, s16 x, s16 y);
void ShatterSecretBaseBreakableDoor(s16 x, s16 y);
u8 CreateRecordMixingSprite(void);
void DestroyRecordMixingSprite(void);
void FldEffPoison_Start(void);
void PlaySecretBaseMusicNoteMatSound(s16 metatileId);
void DoSecretBaseGlitterMatSparkle(void);
bool8 sub_80FADE4(u16, u8);
extern struct MapPosition gPlayerFacingPosition;
extern const struct SpriteTemplate *const gFieldEffectObjectTemplatePointers[];
extern u8 EventScript_275A86[];
extern u8 EventScript_275ADF[];
extern u8 EventScript_275B38[];
extern const struct OamData gEventObjectBaseOam_32x8;
extern const u16 gTilesetPalettes_SecretBase[][16];
#endif //GUARD_FLDEFF_MISC_H

View File

@ -23,4 +23,12 @@ void sub_80EB9E0(void);
void sub_80EBB28(void); void sub_80EBB28(void);
void sub_80E9668(const struct MapPosition *position, const struct MapEvents *events); void sub_80E9668(const struct MapPosition *position, const struct MapEvents *events);
// SetCurrentSecretBaseFromPosition
void sub_80E9608(const struct MapPosition *position, const struct MapEvents *events);
// SetCurrentSecretBaseVar
void sub_80E8B6C(void);
void sub_80E8BC8(void);
void sub_80E8D4C(void);
void EnableBothScriptContexts(void);
#endif //GUARD_SECRET_BASE_H #endif //GUARD_SECRET_BASE_H

View File

@ -140,6 +140,8 @@ extern const u8 gText_Cancel4[];
extern const u8 gText_IsThisTheCorrectTime[]; extern const u8 gText_IsThisTheCorrectTime[];
extern const u8 gText_PkmnFainted3[]; extern const u8 gText_PkmnFainted3[];
extern const u8 gText_Coins[]; extern const u8 gText_Coins[];
extern const u8 gText_Silver[];
extern const u8 gText_Gold[];
extern const u8 gText_Var1AteTheVar2[]; extern const u8 gText_Var1AteTheVar2[];
extern const u8 gText_Var1HappilyAteVar2[]; extern const u8 gText_Var1HappilyAteVar2[];

View File

@ -151,7 +151,7 @@ SECTIONS {
src/script_pokemon_util_80F87D8.o(.text); src/script_pokemon_util_80F87D8.o(.text);
src/field_poison.o(.text); src/field_poison.o(.text);
src/pokemon_size_record.o(.text); src/pokemon_size_record.o(.text);
asm/fldeff_80F9BCC.o(.text); src/fldeff_misc.o(.text);
src/field_special_scene.o(.text); src/field_special_scene.o(.text);
src/rotating_gate.o(.text); src/rotating_gate.o(.text);
src/safari_zone.o(.text); src/safari_zone.o(.text);
@ -480,7 +480,7 @@ SECTIONS {
data/contest_link_80F57C4.o(.rodata); data/contest_link_80F57C4.o(.rodata);
src/script_pokemon_util_80F87D8.o(.rodata); src/script_pokemon_util_80F87D8.o(.rodata);
src/pokemon_size_record.o(.rodata) src/pokemon_size_record.o(.rodata)
data/field_effect_misc.o(.rodata); src/fldeff_misc.o(.rodata);
src/field_special_scene.o(.rodata); src/field_special_scene.o(.rodata);
src/rotating_gate.o(.rodata); src/rotating_gate.o(.rodata);
src/item_use.o(.rodata); src/item_use.o(.rodata);

View File

@ -57,7 +57,7 @@ struct TrainerBattleParameter
}; };
extern bool32 InTrainerHill(void); extern bool32 InTrainerHill(void);
extern bool32 FieldPoisonEffectIsRunning(void); extern bool32 FldEffPoison_IsActive(void);
extern void RestartWildEncounterImmunitySteps(void); extern void RestartWildEncounterImmunitySteps(void);
extern void ClearPoisonStepCounter(void); extern void ClearPoisonStepCounter(void);
extern void sub_81BE72C(void); extern void sub_81BE72C(void);
@ -338,7 +338,7 @@ static void Task_BattleStart(u8 taskId)
switch (tState) switch (tState)
{ {
case 0: case 0:
if (!FieldPoisonEffectIsRunning()) // is poison not active? if (!FldEffPoison_IsActive()) // is poison not active?
{ {
BattleTransition_StartOnField(tTransition); BattleTransition_StartOnField(tTransition);
sub_81BE72C(); sub_81BE72C();

View File

@ -42,7 +42,7 @@ void AllocateBattleResources(void)
if (gBattleTypeFlags & BATTLE_TYPE_SECRET_BASE) if (gBattleTypeFlags & BATTLE_TYPE_SECRET_BASE)
{ {
u16 currSecretBaseId = VarGet(VAR_0x4054); u16 currSecretBaseId = VarGet(VAR_CURRENT_SECRET_BASE);
CreateSecretBaseEnemyParty(&gSaveBlock1Ptr->secretBases[currSecretBaseId]); CreateSecretBaseEnemyParty(&gSaveBlock1Ptr->secretBases[currSecretBaseId]);
} }
} }

View File

@ -20,4 +20,4 @@ const u32 gBerryFixGbaTransferError_Tilemap[] = INCBIN_U32("graphics/berry_fix/g
const u16 gBerryFixWindow_Pal[] = INCBIN_U16("graphics/berry_fix/window.gbapal"); const u16 gBerryFixWindow_Pal[] = INCBIN_U16("graphics/berry_fix/window.gbapal");
const u32 gBerryFixWindow_Gfx[] = INCBIN_U32("graphics/berry_fix/window.4bpp.lz"); const u32 gBerryFixWindow_Gfx[] = INCBIN_U32("graphics/berry_fix/window.4bpp.lz");
const u32 gBerryFixWindow_Tilemap[] = INCBIN_U32("graphics/berry_fix/window.bin.lz"); const u32 gBerryFixWindow_Tilemap[] = INCBIN_U32("graphics/berry_fix/window.bin.lz");

View File

@ -12,7 +12,7 @@
#include "field_poison.h" #include "field_poison.h"
#include "field_screen_effect.h" #include "field_screen_effect.h"
#include "field_specials.h" #include "field_specials.h"
#include "fldeff_80F9BCC.h" #include "fldeff_misc.h"
#include "item_menu.h" #include "item_menu.h"
#include "link.h" #include "link.h"
#include "metatile_behavior.h" #include "metatile_behavior.h"
@ -521,13 +521,13 @@ static bool8 TryStartMiscWalkingScripts(u16 metatileBehavior)
} }
else if (MetatileBehavior_IsSecretBaseGlitterMat(metatileBehavior) == TRUE) else if (MetatileBehavior_IsSecretBaseGlitterMat(metatileBehavior) == TRUE)
{ {
sub_80FA9D0(); DoSecretBaseGlitterMatSparkle();
return FALSE; return FALSE;
} }
else if (MetatileBehavior_IsSecretBaseSoundMat(metatileBehavior) == TRUE) else if (MetatileBehavior_IsSecretBaseSoundMat(metatileBehavior) == TRUE)
{ {
PlayerGetDestCoords(&x, &y); PlayerGetDestCoords(&x, &y);
sub_80FA970(MapGridGetMetatileIdAt(x, y)); PlaySecretBaseMusicNoteMatSound(MapGridGetMetatileIdAt(x, y));
return FALSE; return FALSE;
} }
return FALSE; return FALSE;

View File

@ -4,7 +4,7 @@
#include "event_data.h" #include "event_data.h"
#include "field_message_box.h" #include "field_message_box.h"
#include "field_poison.h" #include "field_poison.h"
#include "fldeff_80F9BCC.h" #include "fldeff_misc.h"
#include "frontier_util.h" #include "frontier_util.h"
#include "party_menu.h" #include "party_menu.h"
#include "pokenav.h" #include "pokenav.h"
@ -136,7 +136,7 @@ s32 DoPoisonFieldEffect(void)
} }
if (numFainted != 0 || numPoisoned != 0) if (numFainted != 0 || numPoisoned != 0)
{ {
FldeffPoison_Start(); FldEffPoison_Start();
} }
if (numFainted != 0) if (numFainted != 0)
{ {

View File

@ -1,7 +1,7 @@
#include "global.h" #include "global.h"
#include "bg.h" #include "bg.h"
#include "fieldmap.h" #include "fieldmap.h"
#include "fldeff_80F9BCC.h" #include "fldeff_misc.h"
#include "fldeff_cut.h" #include "fldeff_cut.h"
#include "fldeff_groundshake.h" #include "fldeff_groundshake.h"
#include "frontier_util.h" #include "frontier_util.h"

View File

@ -1318,4 +1318,4 @@ void sub_810A094(u8 taskId)
gSprites[spriteId].pos2.y = 0; gSprites[spriteId].pos2.y = 0;
DestroyAnimVisualTask(taskId); DestroyAnimVisualTask(taskId);
} }
} }

View File

@ -73,7 +73,13 @@ static const struct OamData gUnknown_08617E2C =
}; };
static const struct SpriteTemplate gUnknown_08617E34 = { static const struct SpriteTemplate gUnknown_08617E34 = {
0x0FA0, 0xFFFF, &gUnknown_08617E2C, gSpriteAnimTable_8617E28, NULL, gDummySpriteAffineAnimTable, sub_81BEAD8 .tileTag = 0x0FA0,
.paletteTag = 0xFFFF,
.oam = &gUnknown_08617E2C,
.anims = gSpriteAnimTable_8617E28,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_81BEAD8
}; };
static const union AnimCmd gSpriteAnim_8617E4C[] = static const union AnimCmd gSpriteAnim_8617E4C[] =
@ -105,7 +111,13 @@ static const struct OamData gSpriteAnim_8617E58 =
}; };
static const struct SpriteTemplate gUnknown_08617E60 = { static const struct SpriteTemplate gUnknown_08617E60 = {
0x0FA0, 0xFFFF, &gSpriteAnim_8617E58, gSpriteAnim_8617E54, NULL, gDummySpriteAffineAnimTable, sub_81BEAD8 .tileTag = 0x0FA0,
.paletteTag = 0xFFFF,
.oam = &gSpriteAnim_8617E58,
.anims = gSpriteAnim_8617E54,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_81BEAD8
}; };
// ewram // ewram

1525
src/fldeff_misc.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -23,7 +23,7 @@
#include "menu.h" #include "menu.h"
#include "overworld.h" #include "overworld.h"
#include "field_screen_effect.h" #include "field_screen_effect.h"
#include "fldeff_80F9BCC.h" #include "fldeff_misc.h"
#include "script.h" #include "script.h"
#include "event_data.h" #include "event_data.h"
#include "lilycove_lady.h" #include "lilycove_lady.h"

View File

@ -21,7 +21,7 @@
#include "field_weather.h" #include "field_weather.h"
#include "event_object_movement.h" #include "event_object_movement.h"
#include "field_effect.h" #include "field_effect.h"
#include "fldeff_80F9BCC.h" #include "fldeff_misc.h"
#include "metatile_behavior.h" #include "metatile_behavior.h"
#include "map_name_popup.h" #include "map_name_popup.h"
#include "string_util.h" #include "string_util.h"
@ -188,7 +188,7 @@ void sub_80E8B6C(void)
continue; continue;
} }
gSpecialVar_Result = TRUE; gSpecialVar_Result = TRUE;
VarSet(VAR_0x4054, i); VarSet(VAR_CURRENT_SECRET_BASE, i);
break; break;
} }
} }
@ -318,7 +318,7 @@ void sub_80E8E18(void)
{ {
gSaveBlock1Ptr->secretBases[0].trainerId[i] = gSaveBlock2Ptr->playerTrainerId[i]; gSaveBlock1Ptr->secretBases[0].trainerId[i] = gSaveBlock2Ptr->playerTrainerId[i];
} }
VarSet(VAR_0x4054, 0); VarSet(VAR_CURRENT_SECRET_BASE, 0);
StringCopyN(gSaveBlock1Ptr->secretBases[0].trainerName, gSaveBlock2Ptr->playerName, sub_80E8DF4(gSaveBlock2Ptr->playerName)); StringCopyN(gSaveBlock1Ptr->secretBases[0].trainerName, gSaveBlock2Ptr->playerName, sub_80E8DF4(gSaveBlock2Ptr->playerName));
gSaveBlock1Ptr->secretBases[0].gender = gSaveBlock2Ptr->playerGender; gSaveBlock1Ptr->secretBases[0].gender = gSaveBlock2Ptr->playerGender;
gSaveBlock1Ptr->secretBases[0].language = GAME_LANGUAGE; gSaveBlock1Ptr->secretBases[0].language = GAME_LANGUAGE;
@ -381,7 +381,7 @@ void sub_80E8FD0(u8 taskId)
} }
break; break;
case 1: case 1:
secretBaseRecordId = VarGet(VAR_0x4054); secretBaseRecordId = VarGet(VAR_CURRENT_SECRET_BASE);
if (gSaveBlock1Ptr->secretBases[secretBaseRecordId].sbr_field_10 < 255) if (gSaveBlock1Ptr->secretBases[secretBaseRecordId].sbr_field_10 < 255)
{ {
gSaveBlock1Ptr->secretBases[secretBaseRecordId].sbr_field_10 ++; gSaveBlock1Ptr->secretBases[secretBaseRecordId].sbr_field_10 ++;
@ -477,7 +477,7 @@ void sub_80E9238(u8 flagIn)
if (CurrentMapIsSecretBase()) if (CurrentMapIsSecretBase())
{ {
curBaseId = VarGet(VAR_0x4054); curBaseId = VarGet(VAR_CURRENT_SECRET_BASE);
decorations = gSaveBlock1Ptr->secretBases[curBaseId].decorations; decorations = gSaveBlock1Ptr->secretBases[curBaseId].decorations;
decorPos = gSaveBlock1Ptr->secretBases[curBaseId].decorationPos; decorPos = gSaveBlock1Ptr->secretBases[curBaseId].decorationPos;
for (x = 0; x < 16; x ++) for (x = 0; x < 16; x ++)
@ -520,7 +520,7 @@ void sub_80E933C(void)
} }
else else
{ {
curBase = VarGet(VAR_0x4054); curBase = VarGet(VAR_CURRENT_SECRET_BASE);
roomDecor = gSaveBlock1Ptr->secretBases[curBase].decorations; roomDecor = gSaveBlock1Ptr->secretBases[curBase].decorations;
roomDecorPos = gSaveBlock1Ptr->secretBases[curBase].decorationPos; roomDecorPos = gSaveBlock1Ptr->secretBases[curBase].decorationPos;
nDecor = 16; nDecor = 16;
@ -556,7 +556,7 @@ void sub_80E933C(void)
show_sprite(gSpecialVar_Result, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup); show_sprite(gSpecialVar_Result, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup);
sub_808EBA8(gSpecialVar_Result, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, gSpecialVar_0x8006, gSpecialVar_0x8007); sub_808EBA8(gSpecialVar_Result, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, gSpecialVar_0x8006, gSpecialVar_0x8007);
sub_808F254(gSpecialVar_Result, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup); sub_808F254(gSpecialVar_Result, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup);
if (CurrentMapIsSecretBase() == TRUE && VarGet(VAR_0x4054) != 0) if (CurrentMapIsSecretBase() == TRUE && VarGet(VAR_CURRENT_SECRET_BASE) != 0)
{ {
if (category == DECORCAT_DOLL) if (category == DECORCAT_DOLL)
{ {
@ -592,7 +592,7 @@ void sub_80E9578(void)
void sub_80E95D4(void) void sub_80E95D4(void)
{ {
VarSet(VAR_OBJ_GFX_ID_F, gUnknown_0858D060[sub_80EA20C(VarGet(VAR_0x4054))]); VarSet(VAR_OBJ_GFX_ID_F, gUnknown_0858D060[sub_80EA20C(VarGet(VAR_CURRENT_SECRET_BASE))]);
} }
void sub_80E9608(const struct MapPosition *position, const struct MapEvents *events) void sub_80E9608(const struct MapPosition *position, const struct MapEvents *events)
@ -679,7 +679,7 @@ u8 *sub_80E9780(u8 *dest, u8 secretBaseRecordId)
u8 *GetSecretBaseMapName(u8 *dest) u8 *GetSecretBaseMapName(u8 *dest)
{ {
return sub_80E9780(dest, VarGet(VAR_0x4054)); return sub_80E9780(dest, VarGet(VAR_CURRENT_SECRET_BASE));
} }
void sub_80E980C(void) void sub_80E980C(void)
@ -687,7 +687,7 @@ void sub_80E980C(void)
u8 secretBaseRecordId; u8 secretBaseRecordId;
const u8 *src; const u8 *src;
secretBaseRecordId = VarGet(VAR_0x4054); secretBaseRecordId = VarGet(VAR_CURRENT_SECRET_BASE);
src = gSaveBlock1Ptr->secretBases[secretBaseRecordId].trainerName; src = gSaveBlock1Ptr->secretBases[secretBaseRecordId].trainerName;
*StringCopyN(gStringVar1, src, sub_80E8DF4(src)) = EOS; *StringCopyN(gStringVar1, src, sub_80E8DF4(src)) = EOS;
ConvertInternationalString(gStringVar1, gSaveBlock1Ptr->secretBases[secretBaseRecordId].language); ConvertInternationalString(gStringVar1, gSaveBlock1Ptr->secretBases[secretBaseRecordId].language);
@ -827,7 +827,7 @@ u8 sub_80E9BA8(void)
void sub_80E9BDC(void) void sub_80E9BDC(void)
{ {
if (sub_80E9878(VarGet(VAR_0x4054)) == TRUE) if (sub_80E9878(VarGet(VAR_CURRENT_SECRET_BASE)) == TRUE)
{ {
gSpecialVar_Result = 1; gSpecialVar_Result = 1;
} }
@ -843,7 +843,7 @@ void sub_80E9BDC(void)
void sub_80E9C2C(void) void sub_80E9C2C(void)
{ {
gSaveBlock1Ptr->secretBases[VarGet(VAR_0x4054)].sbr_field_1_6 ^= 1; gSaveBlock1Ptr->secretBases[VarGet(VAR_CURRENT_SECRET_BASE)].sbr_field_1_6 ^= 1;
FlagSet(0x10C); FlagSet(0x10C);
} }
@ -1079,7 +1079,7 @@ void sub_80EA18C(u8 taskId)
void task_pc_turn_off(u8 taskId) void task_pc_turn_off(u8 taskId)
{ {
if (VarGet(VAR_0x4054) == 0) if (VarGet(VAR_CURRENT_SECRET_BASE) == 0)
{ {
ScriptContext1_SetupScript(gUnknown_0823B4E8); ScriptContext1_SetupScript(gUnknown_0823B4E8);
} }
@ -1099,7 +1099,7 @@ const u8 *GetSecretBaseTrainerLoseText(void)
{ {
u8 param; u8 param;
param = sub_80EA20C(VarGet(VAR_0x4054)); param = sub_80EA20C(VarGet(VAR_CURRENT_SECRET_BASE));
if (param == 0) if (param == 0)
{ {
return SecretBase_RedCave1_Text_274966; return SecretBase_RedCave1_Text_274966;
@ -1148,7 +1148,7 @@ void sub_80EA2E4(void)
void sub_80EA30C(void) void sub_80EA30C(void)
{ {
gSaveBlock1Ptr->secretBases[VarGet(VAR_0x4054)].sbr_field_1_5 = gSpecialVar_Result; gSaveBlock1Ptr->secretBases[VarGet(VAR_CURRENT_SECRET_BASE)].sbr_field_1_5 = gSpecialVar_Result;
} }
void sub_80EA354(void) void sub_80EA354(void)
@ -1156,7 +1156,7 @@ void sub_80EA354(void)
u16 secretBaseRecordId; u16 secretBaseRecordId;
u8 i; u8 i;
secretBaseRecordId = VarGet(VAR_0x4054); secretBaseRecordId = VarGet(VAR_CURRENT_SECRET_BASE);
if (!FlagGet(0x922)) if (!FlagGet(0x922))
{ {
for (i = 0; i < 20; i ++) for (i = 0; i < 20; i ++)
@ -1181,7 +1181,7 @@ void sub_80EA3E4(u8 taskId)
switch (data[1]) switch (data[1])
{ {
case 0: case 0:
if (VarGet(VAR_0x4054) != 0) if (VarGet(VAR_CURRENT_SECRET_BASE) != 0)
{ {
gUnknown_0203A01D = TRUE; gUnknown_0203A01D = TRUE;
} }
@ -1254,7 +1254,7 @@ void sub_80EA3E4(u8 taskId)
} }
else if (MetatileBehavior_IsSecretBaseBalloon(behavior) == TRUE) else if (MetatileBehavior_IsSecretBaseBalloon(behavior) == TRUE)
{ {
sub_80FA5E4(MapGridGetMetatileIdAt(x, y), x, y); PopSecretBaseBalloon(MapGridGetMetatileIdAt(x, y), x, y);
if (gUnknown_0203A01D == TRUE) if (gUnknown_0203A01D == TRUE)
{ {
switch ((int)MapGridGetMetatileIdAt(x, y)) switch ((int)MapGridGetMetatileIdAt(x, y))
@ -1276,7 +1276,7 @@ void sub_80EA3E4(u8 taskId)
{ {
VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) | 0x400); VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) | 0x400);
} }
sub_80FA794(x, y); ShatterSecretBaseBreakableDoor(x, y);
} }
else if (MetatileBehavior_IsSecretBaseSoundMat(behavior) == TRUE){ else if (MetatileBehavior_IsSecretBaseSoundMat(behavior) == TRUE){
if (gUnknown_0203A01D == TRUE) { if (gUnknown_0203A01D == TRUE) {
@ -1781,7 +1781,7 @@ void sub_80EB1AC(void)
VarSet(VAR_0x40ED, 0); VarSet(VAR_0x40ED, 0);
VarSet(VAR_0x40EE, 0); VarSet(VAR_0x40EE, 0);
VarSet(VAR_0x40EF, 0); VarSet(VAR_0x40EF, 0);
if (VarGet(VAR_0x4054) != 0) if (VarGet(VAR_CURRENT_SECRET_BASE) != 0)
{ {
VarSet(VAR_0x40F0, TRUE); VarSet(VAR_0x40F0, TRUE);
} }
@ -1809,7 +1809,7 @@ void sub_80EB218(void)
void sub_80EB290(void) void sub_80EB290(void)
{ {
if (VarGet(VAR_0x4054) != 0) if (VarGet(VAR_CURRENT_SECRET_BASE) != 0)
{ {
VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) | 0x800); VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) | 0x800);
} }
@ -1817,7 +1817,7 @@ void sub_80EB290(void)
void sub_80EB2C8(void) void sub_80EB2C8(void)
{ {
if (VarGet(VAR_0x4054) != 0) if (VarGet(VAR_CURRENT_SECRET_BASE) != 0)
{ {
VarSet(VAR_0x40EE, VarGet(VAR_0x40EE) | 0x400); VarSet(VAR_0x40EE, VarGet(VAR_0x40EE) | 0x400);
} }
@ -1825,7 +1825,7 @@ void sub_80EB2C8(void)
void sub_80EB300(void) void sub_80EB300(void)
{ {
if (VarGet(VAR_0x4054) != 0) if (VarGet(VAR_CURRENT_SECRET_BASE) != 0)
{ {
VarSet(VAR_0x40EE, VarGet(VAR_0x40EE) & ~0x3800); VarSet(VAR_0x40EE, VarGet(VAR_0x40EE) & ~0x3800);
VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) & ~0x001); VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) & ~0x001);
@ -1835,7 +1835,7 @@ void sub_80EB300(void)
void sub_80EB368(void) void sub_80EB368(void)
{ {
if (VarGet(VAR_0x4054) != 0) if (VarGet(VAR_CURRENT_SECRET_BASE) != 0)
{ {
VarSet(VAR_0x40EE, VarGet(VAR_0x40EE) & ~0x3800); VarSet(VAR_0x40EE, VarGet(VAR_0x40EE) & ~0x3800);
VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) & ~0x001); VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) & ~0x001);
@ -1845,7 +1845,7 @@ void sub_80EB368(void)
void sub_80EB3D0(void) void sub_80EB3D0(void)
{ {
if (VarGet(VAR_0x4054) != 0) if (VarGet(VAR_CURRENT_SECRET_BASE) != 0)
{ {
VarSet(VAR_0x40EE, VarGet(VAR_0x40EE) & ~0x3800); VarSet(VAR_0x40EE, VarGet(VAR_0x40EE) & ~0x3800);
VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) & ~0x001); VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) & ~0x001);
@ -1855,7 +1855,7 @@ void sub_80EB3D0(void)
void sub_80EB438(void) void sub_80EB438(void)
{ {
if (VarGet(VAR_0x4054) != 0) if (VarGet(VAR_CURRENT_SECRET_BASE) != 0)
{ {
VarSet(VAR_0x40EE, VarGet(VAR_0x40EE) & ~0x3800); VarSet(VAR_0x40EE, VarGet(VAR_0x40EE) & ~0x3800);
VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) & ~0x001); VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) & ~0x001);
@ -1886,7 +1886,7 @@ void sub_80EB498(void)
case 0x332: case 0x332:
case 0x333: case 0x333:
case 0x334: case 0x334:
if (VarGet(VAR_0x4054) != 0) if (VarGet(VAR_CURRENT_SECRET_BASE) != 0)
{ {
VarSet(VAR_0x40EE, VarGet(VAR_0x40EE) | 0x4000); VarSet(VAR_0x40EE, VarGet(VAR_0x40EE) | 0x4000);
} }
@ -1904,7 +1904,7 @@ void sub_80EB56C(void)
{ {
case 0x28a: case 0x28a:
case 0x28b: case 0x28b:
if (VarGet(VAR_0x4054) != 0) if (VarGet(VAR_CURRENT_SECRET_BASE) != 0)
{ {
VarSet(VAR_0x40EE, VarGet(VAR_0x40EE) | 0x40); VarSet(VAR_0x40EE, VarGet(VAR_0x40EE) | 0x40);
} }
@ -1927,21 +1927,21 @@ void sub_80EB56C(void)
case 0x2f9: case 0x2f9:
case 0x2fa: case 0x2fa:
case 0x2fb: case 0x2fb:
if (VarGet(VAR_0x4054) != 0) if (VarGet(VAR_CURRENT_SECRET_BASE) != 0)
{ {
VarSet(VAR_0x40EE, VarGet(VAR_0x40EE) | 0x8); VarSet(VAR_0x40EE, VarGet(VAR_0x40EE) | 0x8);
} }
break; break;
case 0x22c: case 0x22c:
case 0x233: case 0x233:
if (VarGet(VAR_0x4054) != 0) if (VarGet(VAR_CURRENT_SECRET_BASE) != 0)
{ {
VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) | 0x40); VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) | 0x40);
} }
break; break;
case 0x288: case 0x288:
case 0x289: case 0x289:
if (VarGet(VAR_0x4054) != 0) if (VarGet(VAR_CURRENT_SECRET_BASE) != 0)
{ {
VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) | 0x100); VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) | 0x100);
} }
@ -1949,7 +1949,7 @@ void sub_80EB56C(void)
case 0x22d: case 0x22d:
case 0x22e: case 0x22e:
case 0x22f: case 0x22f:
if (VarGet(VAR_0x4054) != 0) if (VarGet(VAR_CURRENT_SECRET_BASE) != 0)
{ {
VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) | 0x10); VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) | 0x10);
} }
@ -1977,7 +1977,7 @@ void sub_80EB56C(void)
case 0x2cd: case 0x2cd:
case 0x2ce: case 0x2ce:
case 0x2cf: case 0x2cf:
if (VarGet(VAR_0x4054) != 0) if (VarGet(VAR_CURRENT_SECRET_BASE) != 0)
{ {
VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) | 0x8); VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) | 0x8);
} }
@ -2004,7 +2004,7 @@ void sub_80EB9E0(void)
case 0x2be: case 0x2be:
case 0x2c3: case 0x2c3:
case 0x2c6: case 0x2c6:
if (VarGet(VAR_0x4054) != 0) if (VarGet(VAR_CURRENT_SECRET_BASE) != 0)
{ {
VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) | 0x8); VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) | 0x8);
} }
@ -2042,14 +2042,14 @@ void sub_80EBB28(void)
case 0x2c4: case 0x2c4:
case 0x2c5: case 0x2c5:
case 0x2c7: case 0x2c7:
if (VarGet(VAR_0x4054) != 0) if (VarGet(VAR_CURRENT_SECRET_BASE) != 0)
{ {
VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) | 0x8); VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) | 0x8);
} }
break; break;
case 0x280: case 0x280:
case 0x281: case 0x281:
if (VarGet(VAR_0x4054) != 0) if (VarGet(VAR_CURRENT_SECRET_BASE) != 0)
{ {
VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) | 0x100); VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) | 0x100);
} }
@ -2057,7 +2057,7 @@ void sub_80EBB28(void)
case 0x225: case 0x225:
case 0x226: case 0x226:
case 0x227: case 0x227:
if (VarGet(VAR_0x4054) != 0) if (VarGet(VAR_CURRENT_SECRET_BASE) != 0)
{ {
VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) | 0x10); VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) | 0x10);
} }
@ -2075,7 +2075,7 @@ void sub_80EBE7C(void)
{ {
case 0x28d: case 0x28d:
case 0x28e: case 0x28e:
if (VarGet(VAR_0x4054) != 0) if (VarGet(VAR_CURRENT_SECRET_BASE) != 0)
{ {
VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) | 0x4); VarSet(VAR_0x40EF, VarGet(VAR_0x40EF) | 0x4);
} }

View File

@ -2572,13 +2572,13 @@ void sub_80EEA70(void)
show->secretBaseSecrets.flags = VarGet(0x40ee) + (VarGet(0x40ef) << 16); show->secretBaseSecrets.flags = VarGet(0x40ee) + (VarGet(0x40ef) << 16);
tv_store_id_3x(show); tv_store_id_3x(show);
show->secretBaseSecrets.language = gGameLanguage; show->secretBaseSecrets.language = gGameLanguage;
if (show->secretBaseSecrets.language == LANGUAGE_JAPANESE || gSaveBlock1Ptr->secretBases[VarGet(VAR_0x4054)].language == LANGUAGE_JAPANESE) if (show->secretBaseSecrets.language == LANGUAGE_JAPANESE || gSaveBlock1Ptr->secretBases[VarGet(VAR_CURRENT_SECRET_BASE)].language == LANGUAGE_JAPANESE)
{ {
show->secretBaseSecrets.baseOwnersNameLanguage = LANGUAGE_JAPANESE; show->secretBaseSecrets.baseOwnersNameLanguage = LANGUAGE_JAPANESE;
} }
else else
{ {
show->secretBaseSecrets.baseOwnersNameLanguage = gSaveBlock1Ptr->secretBases[VarGet(VAR_0x4054)].language; show->secretBaseSecrets.baseOwnersNameLanguage = gSaveBlock1Ptr->secretBases[VarGet(VAR_CURRENT_SECRET_BASE)].language;
} }
} }
} }