summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/battle.h2
-rw-r--r--include/constants/event_objects.h2
-rw-r--r--include/constants/flags.h2
-rwxr-xr-xinclude/constants/metatile_behaviors.h4
-rw-r--r--include/constants/vars.h2
-rw-r--r--include/decoration.h4
-rw-r--r--include/event_object_movement.h10
-rw-r--r--include/event_scripts.h6
-rw-r--r--include/global.h14
-rw-r--r--include/metatile_behavior.h4
-rw-r--r--include/pokemon.h2
-rw-r--r--include/secret_base.h46
-rw-r--r--include/strings.h2
13 files changed, 44 insertions, 56 deletions
diff --git a/include/battle.h b/include/battle.h
index e3c37aa99..0f4087c90 100644
--- a/include/battle.h
+++ b/include/battle.h
@@ -223,7 +223,7 @@ struct StatsArray
struct BattleResources
{
- struct SecretBaseRecord* secretBase;
+ struct SecretBase* secretBase;
struct ResourceFlags *flags;
struct BattleScriptsStack* battleScriptsStack;
struct BattleCallbacksStack* battleCallbackStack;
diff --git a/include/constants/event_objects.h b/include/constants/event_objects.h
index 9973477da..07ed2d40c 100644
--- a/include/constants/event_objects.h
+++ b/include/constants/event_objects.h
@@ -274,6 +274,8 @@
#define TRACKS_FOOT 1
#define TRACKS_BIKE_TIRE 2
+#define FIRST_DECORATION_SPRITE_GFX EVENT_OBJ_GFX_PICHU_DOLL
+
#define EVENT_OBJ_ID_PLAYER 0xFF
#define EVENT_OBJ_ID_CAMERA 0x7F
diff --git a/include/constants/flags.h b/include/constants/flags.h
index 0450e988d..c56e9013d 100644
--- a/include/constants/flags.h
+++ b/include/constants/flags.h
@@ -287,7 +287,7 @@
#define FLAG_RECEIVED_TM41 0x109
#define FLAG_RECEIVED_LAVARIDGE_EGG 0x10A
#define FLAG_RECEIVED_REVIVED_FOSSIL_MON 0x10B
-#define FLAG_DECORATION_16 0x10C
+#define FLAG_SECRET_BASE_REGISTRY_ENABLED 0x10C
#define FLAG_RECEIVED_TM46 0x10D
#define FLAG_CONTEST_SKETCH_CREATED 0x10E
#define FLAG_EVIL_TEAM_ESCAPED_STERN_SPOKE 0x10F
diff --git a/include/constants/metatile_behaviors.h b/include/constants/metatile_behaviors.h
index d8d75066c..44bbd9729 100755
--- a/include/constants/metatile_behaviors.h
+++ b/include/constants/metatile_behaviors.h
@@ -182,7 +182,7 @@
#define MB_SECRET_BASE_UNUSED 0xB2
#define MB_BLOCK_DECORATION 0xB3
#define MB_SECRET_BASE_DECORATION 0xB4
-#define MB_SECRET_BASE_LARGE_MAT_EDGE 0xB5
+#define MB_HOLDS_SMALL_DECORATION 0xB5
#define MB_UNUSED_B6 0xB6
#define MB_SECRET_BASE_NORTH_WALL 0xB7
#define MB_SECRET_BASE_BALLOON 0xB8
@@ -196,7 +196,7 @@
#define MB_IMPASSABLE_SOUTH_AND_NORTH 0xC0
#define MB_IMPASSABLE_WEST_AND_EAST 0xC1
#define MB_SECRET_BASE_HOLE 0xC2
-#define MB_LARGE_MAT_CENTER 0xC3
+#define MB_HOLDS_LARGE_DECORATION 0xC3
#define MB_SECRET_BASE_TV_SHIELD 0xC4
#define MB_PLAYER_ROOM_PC_ON 0xC5
#define MB_C6 0xC6
diff --git a/include/constants/vars.h b/include/constants/vars.h
index 20524611b..6fd1c16dd 100644
--- a/include/constants/vars.h
+++ b/include/constants/vars.h
@@ -1,8 +1,6 @@
#ifndef GUARD_CONSTANTS_VARS_H
#define GUARD_CONSTANTS_VARS_H
-#define UNKNOWN_VAR_OFFSET_3F20 0x3F20
-
#define VARS_START 0x4000
// temporary vars
diff --git a/include/decoration.h b/include/decoration.h
index f613c25d2..0e6d6cfdd 100644
--- a/include/decoration.h
+++ b/include/decoration.h
@@ -9,7 +9,7 @@ enum DecorPerm {
DECORPERM_PASS_FLOOR,
DECORPERM_BEHIND_FLOOR,
DECORPERM_NA_WALL,
- DECORPERM_SOLID_MAT
+ DECORPERM_SPRITE
};
enum DecorShape {
@@ -68,7 +68,7 @@ extern EWRAM_DATA u8 gCurDecorationIndex;
void sub_8126968(void);
void sub_8126AD8(u8 taskId);
-void sub_8127D38(u16 mapX, u16 mapY, u16 decor);
+void ShowDecorationOnMap(u16 mapX, u16 mapY, u16 decor);
void sub_8126B2C(u8 taskId);
void sub_8127208(u8 taskId);
void sub_8127250(u8 *dest, u8 decorCat);
diff --git a/include/event_object_movement.h b/include/event_object_movement.h
index ab555fda0..4f3f99cd1 100644
--- a/include/event_object_movement.h
+++ b/include/event_object_movement.h
@@ -74,10 +74,10 @@ u8 GetFirstInactiveEventObjectId(void);
void RemoveEventObjectByLocalIdAndMap(u8, u8, u8);
void LoadPlayerObjectReflectionPalette(u16, u8);
void LoadSpecialObjectReflectionPalette(u16, u8);
-void sub_808EBA8(u8, u8, u8, s16, s16);
+void TryMoveEventObjectToMapCoords(u8, u8, u8, s16, s16);
void PatchObjectPalette(u16, u8);
void sub_808E16C(s16, s16);
-void sub_808F28C(u8 localId, u8 mapNum, u8 mapGroup, u8 decorCat);
+void OverrideSecretBaseDecorationSpriteScript(u8 localId, u8 mapNum, u8 mapGroup, u8 decorCat);
void sub_8092FF0(s16, s16, s16 *, s16 *);
u8 GetFaceDirectionAnimNum(u8);
void sub_80930E0(s16 *, s16 *, s16, s16);
@@ -86,7 +86,7 @@ void EventObjectClearHeldMovementIfActive(struct EventObject *);
void TrySpawnEventObjects(s16, s16);
u8 sprite_new(u8 graphicsId, u8 a1, s16 x, s16 y, u8 z, u8 direction);
u8 AddPseudoEventObject(u16, void (*)(struct Sprite *), s16 x, s16 y, u8 subpriority);
-u8 show_sprite(u8, u8, u8);
+u8 TrySpawnEventObject(u8, u8, u8);
u8 SpawnSpecialEventObjectParameterized(u8 graphicsId, u8 movementBehavior, u8 localId, s16 x, s16 y, u8 z);
u8 SpawnSpecialEventObject(struct EventObjectTemplate *);
void SetSpritePosToMapCoords(s16, s16, s16 *, s16 *);
@@ -103,8 +103,8 @@ void sub_808E78C(u8, u8, u8, u8);
void sub_808E75C(s16, s16);
void EventObjectGetLocalIdAndMap(struct EventObject *eventObject, void *localId, void *mapNum, void *mapGroup);
void ShiftEventObjectCoords(struct EventObject *, s16, s16);
-void sub_808EB08(struct EventObject *, s16, s16);
-void sub_808F254(u8, u8, u8);
+void MoveEventObjectToMapCoords(struct EventObject *, s16, s16);
+void TryOverrideEventObjectTemplateCoords(u8, u8, u8);
void InitEventObjectPalettes(u8 palSlot);
void UpdateEventObjectCurrentMovement(struct EventObject *, struct Sprite *, bool8(struct EventObject *, struct Sprite *));
u8 EventObjectFaceOppositeDirection(struct EventObject *, u8);
diff --git a/include/event_scripts.h b/include/event_scripts.h
index bf7084326..d35bf962d 100644
--- a/include/event_scripts.h
+++ b/include/event_scripts.h
@@ -15,8 +15,8 @@ extern const u8 EventScript_TryDoDoubleTrainerBattle[];
extern const u8 EventScript_TryDoNormalTrainerBattle[];
extern const u8 EventScript_TryDoDoubleRematchBattle[];
extern const u8 EventScript_TryDoRematchBattle[];
-extern const u8 EventScript_SecretPower1[];
-extern const u8 EventScript_SecretPower2[];
+extern const u8 SecretBase_EventScript_DollInteract[];
+extern const u8 SecretBase_EventScript_CushionInteract[];
extern const u8 gTVBravoTrainerText00[];
@@ -528,8 +528,6 @@ extern const u8 EventScript_PlayerPCMale[];
extern const u8 EventScript_PlayerPCFemale[];
extern const u8 EventScript_SecretBasePC[];
extern const u8 EventScript_RecordMixingSecretBasePC[];
-extern const u8 EventScript_SecretPower1[];
-extern const u8 EventScript_SecretPower2[];
extern const u8 EventScript_PC[];
extern const u8 EventScript_TestSignpostMsg[];
extern const u8 EventScript_HiddenItemScript[];
diff --git a/include/global.h b/include/global.h
index 7b570d72e..4523ece21 100644
--- a/include/global.h
+++ b/include/global.h
@@ -471,21 +471,21 @@ struct SecretBaseParty
u8 EVs[PARTY_SIZE];
};
-struct SecretBaseRecord
+struct SecretBase
{
/*0x1A9C*/ u8 secretBaseId;
/*0x1A9D*/ u8 sbr_field_1_0:4;
/*0x1A9D*/ u8 gender:1;
- /*0x1A9D*/ u8 sbr_field_1_5:1;
- /*0x1A9D*/ u8 sbr_field_1_6:2;
+ /*0x1A9D*/ u8 battledOwnerToday:1;
+ /*0x1A9D*/ u8 registryStatus:2;
/*0x1A9E*/ u8 trainerName[PLAYER_NAME_LENGTH];
/*0x1AA5*/ u8 trainerId[4]; // byte 0 is used for determining trainer class
/*0x1AA9*/ u8 language;
- /*0x1AAA*/ u16 sbr_field_e;
- /*0x1AAC*/ u8 sbr_field_10;
+ /*0x1AAA*/ u16 numSecretBasesReceived;
+ /*0x1AAC*/ u8 numTimesEntered;
/*0x1AAD*/ u8 sbr_field_11;
/*0x1AAE*/ u8 decorations[16];
- /*0x1ABE*/ u8 decorationPos[16];
+ /*0x1ABE*/ u8 decorationPositions[16];
/*0x1AD0*/ struct SecretBaseParty party;
};
@@ -915,7 +915,7 @@ struct SaveBlock1
/*0x139C*/ u16 vars[VARS_COUNT];
/*0x159C*/ u32 gameStats[NUM_GAME_STATS];
/*0x169C*/ struct BerryTree berryTrees[BERRY_TREES_COUNT];
- /*0x1A9C*/ struct SecretBaseRecord secretBases[SECRET_BASES_COUNT];
+ /*0x1A9C*/ struct SecretBase secretBases[SECRET_BASES_COUNT];
/*0x271C*/ u8 playerRoomDecor[12];
/*0x2728*/ u8 playerRoomDecorPos[12];
/*0x2734*/ u8 decorDesk[10];
diff --git a/include/metatile_behavior.h b/include/metatile_behavior.h
index e18639faf..7fd1d1301 100644
--- a/include/metatile_behavior.h
+++ b/include/metatile_behavior.h
@@ -59,8 +59,8 @@ bool8 MetatileBehavior_IsSecretBasePoster(u8);
bool8 MetatileBehavior_IsNormal(u8);
bool8 MetatileBehavior_IsSecretBaseNorthWall(u8);
bool8 MetatileBehavior_IsMB_B2_Duplicate(u8);
-bool8 MetatileBehavior_IsSecretBaseLargeMatEdge(u8);
-bool8 MetatileBehavior_IsLargeMatCenter(u8);
+bool8 MetatileBehavior_HoldsSmallDecoration(u8);
+bool8 MetatileBehavior_HoldsLargeDecoration(u8);
bool8 MetatileBehavior_IsSecretBaseHole(u8);
bool8 MetatileBehavior_IsSecretBaseBalloon(u8);
bool8 MetatileBehavior_IsSecretBaseBreakableDoor(u8);
diff --git a/include/pokemon.h b/include/pokemon.h
index 150486c0e..26d715d89 100644
--- a/include/pokemon.h
+++ b/include/pokemon.h
@@ -509,7 +509,7 @@ u8 GetMonsStateToDoubles(void);
u8 GetMonsStateToDoubles_2(void);
u8 GetAbilityBySpecies(u16 species, bool8 altAbility);
u8 GetMonAbility(struct Pokemon *mon);
-void CreateSecretBaseEnemyParty(struct SecretBaseRecord *secretBaseRecord);
+void CreateSecretBaseEnemyParty(struct SecretBase *secretBaseRecord);
u8 GetSecretBaseTrainerPicIndex(void);
u8 GetSecretBaseTrainerClass(void);
bool8 IsPlayerPartyAndPokemonStorageFull(void);
diff --git a/include/secret_base.h b/include/secret_base.h
index 17efc314d..4e323b0c6 100644
--- a/include/secret_base.h
+++ b/include/secret_base.h
@@ -1,40 +1,30 @@
#ifndef GUARD_SECRET_BASE_H
#define GUARD_SECRET_BASE_H
-// Exported type declarations
-
-// Exported RAM declarations
-
-// Exported ROM declarations
-void sub_80E9578(void);
-void sub_80E980C(void);
-void sub_80EB18C(struct SecretBaseRecord *dest);
-void sub_80E9914(void);
+void HideSecretBaseDecorationSprites(void);
+void CopyCurSecretBaseOwnerName_StrVar1(void);
+void ClearJapaneseSecretBases(struct SecretBase *dest);
+void SetPlayerSecretBaseParty(void);
u8 *GetSecretBaseMapName(u8 *dest);
const u8 *GetSecretBaseTrainerLoseText(void);
-void sub_80E8EE0(struct MapEvents const *events);
-void sub_80E9238(u8 flagIn);
-bool8 CurrentMapIsSecretBase(void);
+void SetOccupiedSecretBaseEntranceMetatiles(struct MapEvents const *events);
+void InitSecretBaseAppearance(bool8 hidePC);
+bool8 CurMapIsSecretBase(void);
void SecretBasePerStepCallback(u8 taskId);
-bool8 sub_80E9680(void);
-void sub_80EB498(void);
-void sub_80EB56C(void);
-void sub_80EB9E0(void);
-void sub_80EBB28(void);
+bool8 TrySetCurSecretBase(void);
+void SetSecretBaseSecretsTvFlags_Poster(void);
+void SetSecretBaseSecretsTvFlags_MiscFurnature(void);
+void SetSecretBaseSecretsTvFlags_LargeDecorationSpot(void);
+void SetSecretBaseSecretsTvFlags_SmallDecorationSpot(void);
void WarpIntoSecretBase(const struct MapPosition *position, const struct MapEvents *events);
-bool8 sub_80E909C(void);
+bool8 SecretBaseMapPopupEnabled(void);
void sub_80EB218(void);
-void ResetSecretBases(void);
-
-// 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 ClearSecretBases(void);
+void SetCurSecretBaseIdFromPosition(const struct MapPosition *position, const struct MapEvents *events);
+void TrySetCurSecretBaseIndex(void);
+void CheckPlayerHasSecretBase(void);
+void ToggleSecretBaseEntranceMetatile(void);
void EnableBothScriptContexts(void);
void ReceiveSecretBasesData(void *records, size_t recordSize, u8 linkIdx);
-
-
#endif //GUARD_SECRET_BASE_H
diff --git a/include/strings.h b/include/strings.h
index c279cf75c..74e364232 100644
--- a/include/strings.h
+++ b/include/strings.h
@@ -132,7 +132,7 @@ extern const u8 gText_ApostropheSBase[];
extern const u8 gText_NoRegistry[];
extern const u8 gText_OkayToDeleteFromRegistry[];
extern const u8 gText_RegisteredDataDeleted[];
-extern const u8 gUnknown_085EA79D[];
+extern const u8 gText_DelRegist[];
extern const u8 gText_CommErrorEllipsis[];
extern const u8 gText_MoveCloserToLinkPartner[];
extern const u8 gText_CommErrorCheckConnections[];