diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/code_801AFA4.c | 12 | ||||
-rw-r--r-- | src/code_8040094.c | 5 | ||||
-rw-r--r-- | src/code_8041AD0.c | 2 | ||||
-rw-r--r-- | src/code_80521D0_1.c | 3 | ||||
-rw-r--r-- | src/code_8057824.c | 2 | ||||
-rw-r--r-- | src/code_8057824_1.c | 2 | ||||
-rw-r--r-- | src/code_806CD90.c | 2 | ||||
-rw-r--r-- | src/code_80848F0.c | 2 | ||||
-rw-r--r-- | src/code_80869E4.c | 1 | ||||
-rw-r--r-- | src/code_8086A3C.c | 1 | ||||
-rw-r--r-- | src/dungeon_ai_1.c | 74 | ||||
-rw-r--r-- | src/dungeon_ai_items.c | 16 | ||||
-rw-r--r-- | src/dungeon_map_access.c | 15 | ||||
-rw-r--r-- | src/dungeon_movement.c | 8 | ||||
-rw-r--r-- | src/dungeon_range.c | 48 | ||||
-rw-r--r-- | src/dungeon_util.c | 15 | ||||
-rw-r--r-- | src/dungeon_util_1.c | 5 | ||||
-rw-r--r-- | src/dungeon_visibility.c | 34 | ||||
-rw-r--r-- | src/pokemon_mid.c | 4 | ||||
-rw-r--r-- | src/thank_you_wonder_mail.c | 20 | ||||
-rw-r--r-- | src/wonder_mail_2.c | 8 | ||||
-rw-r--r-- | src/wonder_mail_main_menu.c | 6 |
22 files changed, 218 insertions, 67 deletions
diff --git a/src/code_801AFA4.c b/src/code_801AFA4.c index 117b34b..e12bd0d 100644 --- a/src/code_801AFA4.c +++ b/src/code_801AFA4.c @@ -125,8 +125,8 @@ void sub_801B080(void) { case 0: sub_801B178(); - // #+Who will learn the move - // #+{COLOR_1 CYAN}{ARG_POKEMON_7}{END_COLOR_TEXT_1}? + // {CENTER_ALIGN}Who will learn the move + // {CENTER_ALIGN}{COLOR_1 CYAN}{ARG_POKEMON_7}{END_COLOR_TEXT_1}? sub_8014248(&gUnknown_80DB9BC, 0, gUnknown_203B22C->unk60, gUnknown_203B22C->menuItems, 0, 4, 0, 0, 0x20); break; case 1: @@ -140,13 +140,13 @@ void sub_801B080(void) gTeamInventory_203B460->teamItems[gUnknown_203B22C->teamItemIndex].itemIndex = ITEM_ID_USED_TM; } PlaySound(0x9C << 1); - // #+CM{ARG_POKEMON_8}{END_COLOR_TEXT_1} learned - // #+the move {COLOR_1 CYAN}{ARG_POKEMON_7}{END_COLOR_TEXT_1}! + // {CENTER_ALIGN}CM{ARG_POKEMON_8}{END_COLOR_TEXT_1} learned + // {CENTER_ALIGN}the move {COLOR_1 CYAN}{ARG_POKEMON_7}{END_COLOR_TEXT_1}! sub_80141B4(&gUnknown_80DB9E4, 0, 0, 0x121); break; case 3: - // #+No one in the current team - // #+can learn this move. + // {CENTER_ALIGN}No one in the current team + // {CENTER_ALIGN}can learn this move. sub_80141B4(&gUnknown_80DBA0C, 0, 0, 0x121); break; default: diff --git a/src/code_8040094.c b/src/code_8040094.c index cdebf7b..c834602 100644 --- a/src/code_8040094.c +++ b/src/code_8040094.c @@ -3,7 +3,6 @@ #include "file_system.h" #include "dungeon_global_data.h" -extern struct DungeonGlobalData *gDungeonGlobalData; extern s32 gUnknown_80F6568[]; extern u8 gUnknown_202EE01; extern const char gUnknown_80F6604; // "zmappat" @@ -36,9 +35,9 @@ void HandleLuminousOrbAction(u32 param_1) gDungeonGlobalData->unk1820B = 1; - for(YCoord = 0; YCoord <= DUNGEON_MAX_SIZE_Y; YCoord++) + for(YCoord = 0; YCoord < DUNGEON_MAX_SIZE_Y; YCoord++) { - for(XCoord = 0; XCoord <= DUNGEON_MAX_SIZE_X; XCoord++) + for(XCoord = 0; XCoord < DUNGEON_MAX_SIZE_X; XCoord++) { mapTile = GetMapEntity(XCoord, YCoord); mapTile->unk4 = mapTile->unk4 | 1; diff --git a/src/code_8041AD0.c b/src/code_8041AD0.c index 70b063c..0091e9a 100644 --- a/src/code_8041AD0.c +++ b/src/code_8041AD0.c @@ -10,8 +10,6 @@ struct unkStruct_80420E8 u32 unk8; }; -extern struct DungeonGlobalData *gDungeonGlobalData; - extern void sub_803ED30(u8, struct DungeonEntity *r0, u8, u8); extern void sub_804151C(struct DungeonEntity *r0, u32 r1, u8 r2); diff --git a/src/code_80521D0_1.c b/src/code_80521D0_1.c index ab497b8..ac9ebef 100644 --- a/src/code_80521D0_1.c +++ b/src/code_80521D0_1.c @@ -4,6 +4,7 @@ #include "dungeon_global_data.h" #include "dungeon_entity.h" #include "dungeon_random.h" +#include "dungeon_util.h" #include "friend_area.h" #include "map.h" #include "pokemon.h" @@ -11,7 +12,6 @@ extern struct DungeonEntity *xxx_call_GetLeaderEntity(void); extern struct DungeonEntity *sub_8085680(u32); extern char gUnknown_202E038[0x50]; -extern struct DungeonGlobalData *gDungeonGlobalData; extern u32 gUnknown_202EDC8; extern u32 gUnknown_81062A8; @@ -95,7 +95,6 @@ extern void sub_8042B0C(struct DungeonEntity *); extern void SetFacingDirection(struct DungeonEntity *, u32); extern void DisplayDungeonDialogue(u32 *); extern void sub_803E708(u32, u32); -extern u8 EntityExists(struct DungeonEntity *); extern u8 HasRecruitedMon(u32); extern u8 sub_806FD18(struct DungeonEntity *); extern u8 sub_8083E74(u32); diff --git a/src/code_8057824.c b/src/code_8057824.c index 031d063..172f949 100644 --- a/src/code_8057824.c +++ b/src/code_8057824.c @@ -3,8 +3,6 @@ #include "dungeon_entity.h" #include "constants/move.h" -extern struct DungeonGlobalData *gDungeonGlobalData; - extern u32 gUnknown_80FCF74; extern u32 gUnknown_80FCF80; extern u16 gUnknown_80F4F42; diff --git a/src/code_8057824_1.c b/src/code_8057824_1.c index 646feca..f3a7db2 100644 --- a/src/code_8057824_1.c +++ b/src/code_8057824_1.c @@ -6,8 +6,6 @@ #include "item.h" #include "pokemon.h" -extern struct DungeonGlobalData *gDungeonGlobalData; - extern u32 gUnknown_202EDC8; extern u8 gUnknown_202E038[0x50]; extern u8 gAvailablePokemonNames[0x58]; diff --git a/src/code_806CD90.c b/src/code_806CD90.c index e11f253..d3267a9 100644 --- a/src/code_806CD90.c +++ b/src/code_806CD90.c @@ -4,8 +4,6 @@ #include "dungeon_global_data.h" #include "dungeon_util.h" -extern struct DungeonGlobalData *gDungeonGlobalData; - extern u8 sub_806CEBC(struct DungeonEntity *); extern void sub_806CCB4(struct DungeonEntity *, u8); diff --git a/src/code_80848F0.c b/src/code_80848F0.c index ac98809..a5cb17a 100644 --- a/src/code_80848F0.c +++ b/src/code_80848F0.c @@ -1,8 +1,6 @@ #include "global.h" #include "dungeon_global_data.h" -extern struct DungeonGlobalData *gDungeonGlobalData; - extern void SkarmoryPreFightDialogue(); extern void SkarmoryReFightDialogue(); extern void sub_8086E40(); diff --git a/src/code_80869E4.c b/src/code_80869E4.c index 148a88e..bdcfd6d 100644 --- a/src/code_80869E4.c +++ b/src/code_80869E4.c @@ -15,7 +15,6 @@ struct unkStruct_202F3D0 }; EWRAM_DATA struct unkStruct_202F3D0 gUnknown_202F3D0; -extern struct DungeonGlobalData *gDungeonGlobalData; s8 sub_8002984(s8, u8); void sub_803E708(u32, u32); diff --git a/src/code_8086A3C.c b/src/code_8086A3C.c index 43889de..1c15056 100644 --- a/src/code_8086A3C.c +++ b/src/code_8086A3C.c @@ -4,7 +4,6 @@ #include "dungeon_global_data.h" #include "pokemon.h" -extern struct DungeonGlobalData *gDungeonGlobalData; extern void LoadIQSkills(struct DungeonEntity *); extern struct DungeonEntity *GetPartnerEntity(); extern struct DungeonEntity *xxx_call_GetLeaderEntity(void); diff --git a/src/dungeon_ai_1.c b/src/dungeon_ai_1.c new file mode 100644 index 0000000..7d45909 --- /dev/null +++ b/src/dungeon_ai_1.c @@ -0,0 +1,74 @@ +#include "global.h" +#include "dungeon_ai_1.h" + +#include "constants/status.h" +#include "constants/targeting.h" + +extern bool8 CanSeeInvisible(struct DungeonEntity*); +extern bool8 gTargetingData[3][2][2][2]; + +u8 CanTarget(struct DungeonEntity *pokemon, struct DungeonEntity *targetPokemon, bool8 ignoreInvisible, bool8 checkPetrified) +{ + struct DungeonEntityData *pokemonData = pokemon->entityData; + struct DungeonEntityData *targetData = targetPokemon->entityData; + u8 targetingDecoy; + u8 pokemonTargetingDecoy; + bool8 pokemonIsEnemy; + bool8 targetIsEnemy; + bool8 targetIsDecoy; + if (pokemon == targetPokemon) + { + return TARGET_CAPABILITY_CANNOT_ATTACK; + } + if (pokemonData->shopkeeperMode == SHOPKEEPER_FRIENDLY || + targetData->shopkeeperMode == SHOPKEEPER_FRIENDLY || + pokemonData->clientType == CLIENT_TYPE_DONT_MOVE || + targetData->clientType == CLIENT_TYPE_DONT_MOVE || + pokemonData->clientType == CLIENT_TYPE_CLIENT || + targetData->clientType == CLIENT_TYPE_CLIENT || + (checkPetrified && !pokemonData->isEnemy && targetData->immobilizeStatus == IMMOBILIZE_STATUS_PETRIFIED) || + (!ignoreInvisible && targetData->transformStatus == TRANSFORM_STATUS_INVISIBLE && !CanSeeInvisible(pokemon))) + { + return TARGET_CAPABILITY_CAN_ATTACK_NOT_TARGET; + } + pokemonTargetingDecoy = pokemonData->targetingDecoy; + targetingDecoy = TARGETING_DECOY_NONE; + if (pokemonTargetingDecoy != TARGETING_DECOY_NONE) + { + targetingDecoy = TARGETING_DECOY_WILD; + if (pokemonTargetingDecoy == TARGETING_DECOY_TEAM) + { + targetingDecoy = TARGETING_DECOY_TEAM; + } + } + if (pokemonData->shopkeeperMode != SHOPKEEPER_NONE) + { + pokemonIsEnemy = FALSE; + if (pokemonData->shopkeeperMode == SHOPKEEPER_AGGRESSIVE_TO_PLAYER) + { + pokemonIsEnemy = TRUE; + } + } + else + { + pokemonIsEnemy = pokemonData->isEnemy ? TRUE : FALSE; + } + if (targetData->shopkeeperMode != SHOPKEEPER_NONE) + { + targetIsEnemy = FALSE; + if (targetData->shopkeeperMode == SHOPKEEPER_AGGRESSIVE_TO_PLAYER) + { + targetIsEnemy = TRUE; + } + } + else + { + targetIsEnemy = targetData->isEnemy ? TRUE : FALSE; + } + targetIsDecoy = FALSE; + if (targetData->waitingStatus == WAITING_STATUS_DECOY) + { + targetIsDecoy = TRUE; + } + return gTargetingData[targetingDecoy][pokemonIsEnemy][targetIsEnemy][targetIsDecoy]; +} diff --git a/src/dungeon_ai_items.c b/src/dungeon_ai_items.c index ce70182..fc10e85 100644 --- a/src/dungeon_ai_items.c +++ b/src/dungeon_ai_items.c @@ -3,17 +3,22 @@ #include "constants/direction.h" #include "constants/dungeon_action.h" #include "constants/iq_skill.h" +#include "constants/targeting.h" #include "dungeon_action.h" +#include "dungeon_ai_1.h" #include "dungeon_ai_items.h" #include "dungeon_capabilities.h" #include "dungeon_capabilities_1.h" #include "dungeon_entity.h" #include "dungeon_global_data.h" +#include "dungeon_map_access.h" #include "dungeon_pokemon_attributes_1.h" #include "dungeon_random.h" #include "dungeon_random_1.h" #include "dungeon_util.h" +#include "dungeon_visibility.h" #include "item.h" +#include "position.h" #include "team_inventory.h" #define NUM_POTENTIAL_ROCK_TARGETS 20 @@ -26,20 +31,10 @@ enum ItemTargetFlag ITEM_TARGET_ALLY = 1 << 1 }; -enum TargetCapability -{ - TARGET_CAPABILITY_CANNOT_ATTACK, - TARGET_CAPABILITY_CAN_TARGET, - TARGET_CAPABILITY_CAN_ATTACK_NOT_TARGET -}; - extern s32 CalculateFacingDir(struct Position*, struct Position*); -extern struct MapTile* GetMapTileAtPosition(s16, s16); extern u32 EvaluateItem(struct DungeonEntity*, struct ItemSlot*, u8); extern bool8 ToolboxEnabled(struct DungeonEntityData*); extern void sub_8077274(struct DungeonEntity *, struct DungeonEntity *); -extern bool8 CanTarget(struct DungeonEntity*, struct DungeonEntity*, bool8, bool8); -extern bool8 CanSee(struct DungeonEntity*, struct DungeonEntity*); extern void TargetThrownItem(struct DungeonEntity*, struct DungeonEntity*, struct ItemSlot*, u8, bool8); extern s32 gNumPotentialTargets; @@ -47,7 +42,6 @@ extern u32 gPotentialTargetWeights[NUM_DIRECTIONS]; extern u32 gPotentialTargetDirections[NUM_DIRECTIONS]; extern bool8 gTargetAhead[NUM_DIRECTIONS]; extern struct TeamInventory *gTeamInventory_203B460; -extern struct DungeonGlobalData *gDungeonGlobalData; void sub_807360C(struct DungeonEntity *pokemon) { diff --git a/src/dungeon_map_access.c b/src/dungeon_map_access.c new file mode 100644 index 0000000..43e0e4d --- /dev/null +++ b/src/dungeon_map_access.c @@ -0,0 +1,15 @@ +#include "global.h" +#include "dungeon_map_access.h" + +#include "dungeon_global_data.h" + +extern struct MapTile *gUnknown_203B430; + +struct MapTile* GetMapTileAtPosition(s32 x, s32 y) +{ + if (x >= 0 && y >= 0 && x < DUNGEON_MAX_SIZE_X && y < DUNGEON_MAX_SIZE_Y) + { + return gDungeonGlobalData->mapEntityPointers[y][x]; + } + return gUnknown_203B430; +} diff --git a/src/dungeon_movement.c b/src/dungeon_movement.c index 9ea894e..1601cff 100644 --- a/src/dungeon_movement.c +++ b/src/dungeon_movement.c @@ -5,6 +5,7 @@ #include "constants/direction.h" #include "constants/iq_skill.h" #include "constants/status.h" +#include "constants/targeting.h" #include "dungeon_ai_items.h" #include "dungeon_capabilities_1.h" #include "dungeon_global_data.h" @@ -12,19 +13,18 @@ #include "dungeon_random.h" #include "dungeon_util.h" #include "dungeon_util_1.h" +#include "dungeon_visibility.h" #include "map.h" #include "pokemon.h" extern char gAvailablePokemonNames[]; extern char *gPtrCouldntBeUsedMessage; extern char *gPtrItsaMonsterHouseMessage; -extern struct DungeonGlobalData *gDungeonGlobalData; extern void SendImmobilizeEndMessage(struct DungeonEntity*, struct DungeonEntity*); extern void SetMessageArgument(char[], struct DungeonEntity*, u32); extern void SendMessage(struct DungeonEntity*, char*); extern bool8 HasStatusAffectingActions(struct DungeonEntity*); -extern bool8 CanSee(struct DungeonEntity*, struct DungeonEntity*); extern void ResetAction(u16*); extern void SetWalkAction(u16*, s16); extern void DecideAttack(struct DungeonEntity*); @@ -49,7 +49,7 @@ u32 sub_8075818(struct DungeonEntity *entity) entityData = entity->entityData; if(EntityExists(entity)) { - tile = sub_8045128(entity); + tile = GetMapEntityForDungeonEntity(entity); if(HasIQSkill(entity, IQ_SKILL_SUPER_MOBILE)) if(!(tile->tileType & (TILE_TYPE_FLOOR | TILE_TYPE_UNK_1))) return 1; @@ -136,7 +136,7 @@ void sub_8075900(struct DungeonEntity *pokemon, u8 r1) { if(!gDungeonGlobalData->monsterHouseActive) { - if((sub_8045128(pokemon)->tileType & TILE_TYPE_MONSTER_HOUSE)) + if((GetMapEntityForDungeonEntity(pokemon)->tileType & TILE_TYPE_MONSTER_HOUSE)) { // It's a monster house! SendMessage(GetLeaderEntity(), gPtrItsaMonsterHouseMessage); diff --git a/src/dungeon_range.c b/src/dungeon_range.c new file mode 100644 index 0000000..facd71d --- /dev/null +++ b/src/dungeon_range.c @@ -0,0 +1,48 @@ +#include "global.h" +#include "dungeon_range.h" + +#include "dungeon_global_data.h" +#include "dungeon_map_access.h" +#include "map.h" + +bool8 InSameRoom_2(struct Position *pos1, struct Position *pos2) +{ + u8 pos1RoomIndex; + u8 visibility = gDungeonGlobalData->visibility; + struct MapTile *tile1; + if (visibility == 0) + { + visibility = 2; + } + tile1 = GetMapTileAtPosition(pos1->x, pos1->y); + pos1RoomIndex = tile1->roomIndex; + if (pos1RoomIndex == CORRIDOR_ROOM_INDEX) + { + s32 xDiff = pos1->x - pos2->x; + s32 yDiff; + xDiff = xDiff < 0 ? -xDiff : xDiff; + if (xDiff > visibility) + { + return FALSE; + } + + yDiff = pos1->y - pos2->y; + yDiff = yDiff < 0 ? -yDiff : yDiff; + if (yDiff > visibility) + { + return FALSE; + } + returnTrue: + return TRUE; + } + else + { + struct MapRoom *pos1Room = &gDungeonGlobalData->roomData[pos1RoomIndex]; + if (pos1Room->startX - 1 > pos2->x || pos1Room->startY - 1 > pos2->y || + pos1Room->endX + 1 <= pos2->x || pos1Room->endY + 1 <= pos2->y) + { + return FALSE; + } + goto returnTrue; + } +} diff --git a/src/dungeon_util.c b/src/dungeon_util.c index 50b3e08..3594274 100644 --- a/src/dungeon_util.c +++ b/src/dungeon_util.c @@ -1,7 +1,8 @@ #include "global.h" #include "dungeon_util.h" -extern struct MapTile* GetMapTileAtPosition(s16, s16); +#include "dungeon_map_access.h" + extern struct MapTile* GetMapEntity(s16, s16); bool8 EntityExists(struct DungeonEntity *entity) @@ -23,32 +24,32 @@ u8 GetEntityRoomIndex(struct DungeonEntity *entity) return entity->roomIndex; } -struct DungeonEntityData *GetTrapData(struct DungeonEntity *entity) +struct DungeonEntityData* GetTrapData(struct DungeonEntity *entity) { return entity->entityData; } -struct ItemSlot *GetItemData(struct DungeonEntity *entity) +struct ItemSlot* GetItemData(struct DungeonEntity *entity) { return (struct ItemSlot *)entity->entityData; } -struct DungeonEntityData *sub_804510C(struct DungeonEntity *entity) +struct DungeonEntityData* sub_804510C(struct DungeonEntity *entity) { return entity->entityData; } -struct DungeonEntityData *sub_8045110(struct DungeonEntity *entity) +struct DungeonEntityData* sub_8045110(struct DungeonEntity *entity) { return entity->entityData; } -struct MapTile *sub_8045114(struct DungeonEntity *entity) +struct MapTile* GetMapTileForDungeonEntity(struct DungeonEntity *entity) { return GetMapTileAtPosition(entity->posWorld.x, entity->posWorld.y); } -struct MapTile *sub_8045128(struct DungeonEntity *entity) +struct MapTile* GetMapEntityForDungeonEntity(struct DungeonEntity *entity) { return GetMapEntity(entity->posWorld.x, entity->posWorld.y); } diff --git a/src/dungeon_util_1.c b/src/dungeon_util_1.c index 32cc3ff..564cd12 100644 --- a/src/dungeon_util_1.c +++ b/src/dungeon_util_1.c @@ -6,7 +6,6 @@ #include "dungeon_util.h" #include "random.h" -extern struct DungeonGlobalData *gDungeonGlobalData; extern void sub_806CE68(struct DungeonEntity *, s32); extern s32 sub_803F994(void); @@ -128,7 +127,7 @@ bool8 IsMovingClient(struct DungeonEntity *pokemon) switch (pokemonData->clientType) { case CLIENT_TYPE_CLIENT: - case CLIENT_TYPE_DONT_MOVE: + case 0x3: case 0x5: case 0x6: case 0x7: @@ -161,7 +160,7 @@ bool8 IsMovingClient(struct DungeonEntity *pokemon) return TRUE; case CLIENT_TYPE_NONE: case 0x2: - case 0x4: + case CLIENT_TYPE_DONT_MOVE: case 0xA: case 0xB: case 0xC: diff --git a/src/dungeon_visibility.c b/src/dungeon_visibility.c new file mode 100644 index 0000000..862e1a0 --- /dev/null +++ b/src/dungeon_visibility.c @@ -0,0 +1,34 @@ +#include "global.h" +#include "dungeon_visibility.h" + +#include "constants/status.h" +#include "dungeon_pokemon_attributes_1.h" +#include "dungeon_range.h" +#include "dungeon_util.h" + +bool8 CanSee(struct DungeonEntity *entity, struct DungeonEntity *targetEntity) +{ + if (!EntityExists(entity) || !EntityExists(targetEntity) || !targetEntity->visible) + { + return FALSE; + } + if (targetEntity->entityType == ENTITY_POKEMON) + { + if (entity->entityType == ENTITY_POKEMON) + { + if (!CanSeeInvisible(entity) && targetEntity->entityData->transformStatus == TRANSFORM_STATUS_INVISIBLE) + { + return FALSE; + } + if (entity->entityData->eyesightStatus == EYESIGHT_STATUS_BLINKER) + { + return FALSE; + } + } + else if (targetEntity->entityData->transformStatus == TRANSFORM_STATUS_INVISIBLE) + { + return FALSE; + } + } + return InSameRoom_2(&entity->posWorld, &targetEntity->posWorld); +} diff --git a/src/pokemon_mid.c b/src/pokemon_mid.c index 1721e1d..3f47b0a 100644 --- a/src/pokemon_mid.c +++ b/src/pokemon_mid.c @@ -278,7 +278,7 @@ void PrintColoredPokeNameToBuffer(u8 *buffer, struct PokemonStruct *pokemon, s32 if (colorNum == COLOR_WHITE) { colorNum = COLOR_CYAN; } - ExpandPlaceholdersBuffer(buffer,gUnknown_810763C,colorNum,nameBuffer); // #c%c%s{END_COLOR_TEXT_2} + ExpandPlaceholdersBuffer(buffer,gUnknown_810763C,colorNum,nameBuffer); // {COLOR_2}%c%s{END_COLOR_TEXT_2} } void sub_808D9DC(u8 *buffer, u8 *param_2, s32 colorNum) @@ -289,7 +289,7 @@ void sub_808D9DC(u8 *buffer, u8 *param_2, s32 colorNum) if (colorNum == COLOR_WHITE) { colorNum = COLOR_YELLOW; } - ExpandPlaceholdersBuffer(buffer,gUnknown_810763C,colorNum,nameBuffer); // #c%c%s{END_COLOR_TEXT_2} + ExpandPlaceholdersBuffer(buffer,gUnknown_810763C,colorNum,nameBuffer); // {COLOR_2}%c%s{END_COLOR_TEXT_2} } void sub_808DA0C(u8 *buffer, u8 *param_2) diff --git a/src/thank_you_wonder_mail.c b/src/thank_you_wonder_mail.c index cfd83c6..22e1467 100644 --- a/src/thank_you_wonder_mail.c +++ b/src/thank_you_wonder_mail.c @@ -226,10 +226,10 @@ ALIGNED(4) const u8 gUnknown_80DF208[]= _( ALIGNED(4) const u8 gUnknown_80DF250[]= _( ": This is the counter for\n" - "{COLOR_1 LIGHT_BLUE_2}Thank-You Mail{END_COLOR_TEXT_1}.#P" + "{COLOR_1 LIGHT_BLUE_2}Thank-You Mail{END_COLOR_TEXT_1}.{EXTRA_MSG}" ": Oh{COMMA} hi{COMMA} {COLOR_1 YELLOW_5}%s{END_COLOR_TEXT_1}.\n" "I{APOSTROPHE}ve been waiting for you. You wanted me\n" - "to process a {COLOR_1 LIGHT_BLUE_2}Thank-You Mail{END_COLOR_TEXT_1}?#P" + "to process a {COLOR_1 LIGHT_BLUE_2}Thank-You Mail{END_COLOR_TEXT_1}?{EXTRA_MSG}" ": Let me get on it right away."); ALIGNED(4) const u8 gUnknown_80DF304[]= _( @@ -245,11 +245,11 @@ ALIGNED(4) const u8 gUnknown_80DF380[]= _( " OK. Please enter the\n" "{COLOR_1 LIGHT_BLUE_2}Thank-You Mail password{END_COLOR_TEXT_1}."); -ALIGNED(4) const u8 gUnknown_80DF3B4[]= +ALIGNED(4) const u8 gUnknown_80DF3B4[]= _( " Please give this password\n" - "to the friend that rescued your team.#P" + "to the friend that rescued your team.{EXTRA_MSG}" " I also must save your\n" - "adventure."; + "adventure."); ALIGNED(4) const u8 gUnknown_80DF418[]= _( " OK{COMMA} here is your\n" @@ -261,7 +261,7 @@ ALIGNED(4) const u8 gUnknown_80DF44C[]= ALIGNED(4) const u8 gUnknown_80DF46C[]= _( " There we go.\n" - "I{APOSTROPHE}m all done.#P" + "I{APOSTROPHE}m all done.{EXTRA_MSG}" " Doesn{APOSTROPHE}t it feel great to\n" "be appreciated for doing something good?\n" "Please keep up your rescue work!"); @@ -272,9 +272,9 @@ ALIGNED(4) const u8 gUnknown_80DF4F4[]= _( "mission."); ALIGNED(4) const u8 gUnknown_80DF544[]= _( - "#+Communicating...\n" - "#+Please wait with the power on.\n" - "#+To cancel{COMMA} press {B_BUTTON}."); + "{CENTER_ALIGN}Communicating...\n" + "{CENTER_ALIGN}Please wait with the power on.\n" + "{CENTER_ALIGN}To cancel{COMMA} press {B_BUTTON}."); ALIGNED(4) const u8 gUnknown_80DF594[]= _( " There. I{APOSTROPHE}ve sent your\n" @@ -316,7 +316,7 @@ ALIGNED(4) const u8 gUnknown_80DF77C[]= _( ALIGNED(4) const u8 gUnknown_80DF7D4[]= _( " ...Oh?\n" "You{APOSTROPHE}ve already attached a {COLOR_1 LIGHT_BLUE_2}reward item{END_COLOR_TEXT_1}\n" - "to this mail.#P" + "to this mail.{EXTRA_MSG}" " I{APOSTROPHE}m sorry{COMMA} but once an item\n" "has been attached to mail{COMMA} it can{APOSTROPHE}t be\n" "exchanged."); diff --git a/src/wonder_mail_2.c b/src/wonder_mail_2.c index cf1f122..fe4fdbc 100644 --- a/src/wonder_mail_2.c +++ b/src/wonder_mail_2.c @@ -189,7 +189,7 @@ ALIGNED(4) const char gUnknown_80DF9F0[] = "????"; ALIGNED(4) const char gUnknown_80DF9F8[] = _( " Oh{COMMA} hello!\n" "Your rescue mission went well{COMMA} didn{APOSTROPHE}t it?\n" - "I wouldn{APOSTROPHE}t expect any less{COMMA} {COLOR_1 LIGHT_BLUE_2}%s{END_COLOR_TEXT_1}!#P" + "I wouldn{APOSTROPHE}t expect any less{COMMA} {COLOR_1 LIGHT_BLUE_2}%s{END_COLOR_TEXT_1}!{EXTRA_MSG}" " Well{COMMA} well!\n" "Here is your reward from the Pokémon\n" "Rescue Organization!"); @@ -197,14 +197,14 @@ ALIGNED(4) const char gUnknown_80DF9F8[] = _( ALIGNED(4) const char gUnknown_80DFAA8[] = _( " I hope you will keep on\n" "rescuing your friends in\n" - "dire straits.#P" + "dire straits.{EXTRA_MSG}" " And now{COMMA} I must save\n" "your adventure."); ALIGNED(4) const char gUnknown_80DFB14[] = _( " Oh{COMMA} yes{COMMA} that{APOSTROPHE}s right.\n" "Please don{APOSTROPHE}t forget to send an {COLOR_1 LIGHT_BLUE_2}A-OK Mail{END_COLOR_TEXT_1}\n" - "to the friend you just rescued.#P" + "to the friend you just rescued.{EXTRA_MSG}" " Please give me a shout if\n" "you would like to send {COLOR_1 LIGHT_BLUE_2}A-OK Mail{END_COLOR_TEXT_1}."); @@ -779,7 +779,7 @@ void sub_802BCC4(void) u32 sub_802BD14(s32 param_1, struct UnkTextStruct2_sub *param_2, u32 param_3) { - + if (HasNoMailinMailbox()) { return 0; } diff --git a/src/wonder_mail_main_menu.c b/src/wonder_mail_main_menu.c index 9566614..ed6ebbe 100644 --- a/src/wonder_mail_main_menu.c +++ b/src/wonder_mail_main_menu.c @@ -113,9 +113,9 @@ ALIGNED(4) const char gUnknown_80E7BEC[] = _("Connect a {COLOR_1 LIGHT_BLUE_2}Ga "When you and your friend are ready{COMMA}\n" "you may communicate. "); -ALIGNED(4) const char gUnknown_80E7C48[] = _("#+In communication...\n" - "#+Please wait with the power on.\n" - "#+To cancel{COMMA} press {B_BUTTON}."); +ALIGNED(4) const char gUnknown_80E7C48[] = _("{CENTER_ALIGN}In communication...\n" + "{CENTER_ALIGN}Please wait with the power on.\n" + "{CENTER_ALIGN}To cancel{COMMA} press {B_BUTTON}."); ALIGNED(4) const char gUnknown_80E7C98[] = _("Please enter the\n" "{COLOR_1 LIGHT_BLUE_2}Wonder Mail password{END_COLOR_TEXT_1}."); |