mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
Merge pull request #1152 from GriffinRichards/doc-blender
Document berry blender
This commit is contained in:
commit
5773bb8643
@ -6,6 +6,8 @@
|
||||
.set LOCALID_EXPERT_M, 16
|
||||
.set LOCALID_GIRL, 17
|
||||
|
||||
.set NUM_OPPONENTS, VAR_0x8009
|
||||
|
||||
BerryBlender_Text_WantToMakePokeblocks: @ 8292DEE
|
||||
.string "Oh? Did you want to make some {POKEBLOCK}S\n"
|
||||
.string "with this old-timer?$"
|
||||
@ -243,7 +245,7 @@ BerryBlender_Text_DontHaveAnyBerriesNoneToSpare: @ 8293BB4
|
||||
BerryBlender_EventScript_BerryBlender1:: @ 8293C3E
|
||||
lockall
|
||||
goto_if_unset FLAG_HIDE_LILYCOVE_CONTEST_HALL_BLEND_MASTER, BerryBlender_EventScript_BlendMasterPresent
|
||||
setvar VAR_0x8009, 1
|
||||
setvar NUM_OPPONENTS, 1
|
||||
applymovement LOCALID_EXPERT_M, BerryBlender_Movement_BlendLeaderWalkInPlace
|
||||
waitmovement 0
|
||||
msgbox BerryBlender_Text_WantToMakePokeblocks, MSGBOX_YESNO
|
||||
@ -307,9 +309,8 @@ BerryBlender_EventScript_TryUseBerryBlender1: @ 8293CEE
|
||||
goto BerryBlender_EventScript_UseBerryBlender1
|
||||
end
|
||||
|
||||
@ VAR_0x8009 here is the Blender number. 1 is top right, 2 is bottom right, 3 is bottom left
|
||||
BerryBlender_EventScript_DoBerryBlending: @ 8293D2C
|
||||
copyvar VAR_0x8004, VAR_0x8009
|
||||
copyvar VAR_0x8004, NUM_OPPONENTS
|
||||
fadescreen FADE_TO_BLACK
|
||||
special DoBerryBlending
|
||||
waitstate
|
||||
@ -328,7 +329,7 @@ BerryBlender_EventScript_Blender1NoCase: @ 8293D43
|
||||
|
||||
BerryBlender_EventScript_BerryBlender2:: @ 8293D4D
|
||||
lockall
|
||||
setvar VAR_0x8009, 2
|
||||
setvar NUM_OPPONENTS, 2
|
||||
applymovement LOCALID_TWIN, Common_Movement_FaceOriginalDirection
|
||||
applymovement LOCALID_MAN, BerryBlender_Movement_BlendLeaderWalkInPlace
|
||||
waitmovement 0
|
||||
@ -393,7 +394,7 @@ BerryBlender_EventScript_Blender2NoCase: @ 8293E14
|
||||
BerryBlender_EventScript_BerryBlender3:: @ 8293E1E
|
||||
lockall
|
||||
setvar VAR_0x8008, LOCALID_POKEFAN_F
|
||||
setvar VAR_0x8009, 3
|
||||
setvar NUM_OPPONENTS, 3
|
||||
applymovement LOCALID_BOY, Common_Movement_FaceOriginalDirection
|
||||
applymovement LOCALID_GIRL, Common_Movement_FaceOriginalDirection
|
||||
applymovement VAR_0x8008, BerryBlender_Movement_BlendLeaderWalkInPlace
|
||||
@ -458,7 +459,7 @@ BerryBlender_EventScript_Blender3NoCase: @ 8293EF1
|
||||
|
||||
BerryBlender_EventScript_BlendMasterPresent: @ 8293EFB
|
||||
lockall
|
||||
setvar VAR_0x8009, 1
|
||||
setvar NUM_OPPONENTS, 1
|
||||
msgbox BerryBlender_Text_SeeMyMasteryInAction, MSGBOX_YESNO
|
||||
compare VAR_RESULT, YES
|
||||
goto_if_eq BerryBlender_EventScript_TryBlendWithBlendMaster
|
||||
@ -636,7 +637,7 @@ BerryBlender_EventScript_FourPlayerLink: @ 8294139
|
||||
end
|
||||
|
||||
BerryBlender_EventScript_DoLinkBerryBlending: @ 8294147
|
||||
setvar VAR_0x8004, 0
|
||||
setvar VAR_0x8004, 0 @ number of opponents, 0 indicates Link
|
||||
fadescreen FADE_TO_BLACK
|
||||
removeobject 240 @ Unclear where these local IDs come from,
|
||||
removeobject 239 @ but presumably they'd be the 4 link players
|
||||
|
Before Width: | Height: | Size: 293 B After Width: | Height: | Size: 293 B |
@ -1,6 +1,16 @@
|
||||
#ifndef GUARD_BERRY_BLENDER_H
|
||||
#define GUARD_BERRY_BLENDER_H
|
||||
|
||||
// Indices into gSendCmd / gRecvCmds
|
||||
#define BLENDER_COMM_INPUT_STATE 0
|
||||
#define BLENDER_COMM_RESP 1
|
||||
#define BLENDER_COMM_SCORE 2
|
||||
#define BLENDER_COMM_STOP_TYPE 2 // re-used
|
||||
#define BLENDER_COMM_PLAYER_ID 3
|
||||
#define BLENDER_COMM_UNUSED 4
|
||||
#define BLENDER_COMM_PROGRESS_BAR 5
|
||||
#define BLENDER_COMM_ARROW_POS 6
|
||||
|
||||
extern u8 gInGameOpponentsNo;
|
||||
|
||||
void DoBerryBlending(void);
|
||||
|
@ -102,6 +102,7 @@
|
||||
#define TEST_BUTTON(field, button) ({(field) & (button);})
|
||||
#define JOY_NEW(button) TEST_BUTTON(gMain.newKeys, button)
|
||||
#define JOY_HELD(button) TEST_BUTTON(gMain.heldKeys, button)
|
||||
#define JOY_HELD_RAW(button) TEST_BUTTON(gMain.heldKeysRaw, button)
|
||||
#define JOY_REPEAT(button) TEST_BUTTON(gMain.newAndRepeatedKeys, button)
|
||||
|
||||
#define S16TOPOSFLOAT(val) \
|
||||
|
@ -32,7 +32,7 @@ typedef union // size = 0x24
|
||||
/*0x01*/ bool8 active;
|
||||
/*0x02*/ u16 species;
|
||||
/*0x04*/ u16 words[6];
|
||||
/*0x10*/ u8 playerName[8];
|
||||
/*0x10*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x18*/ u8 language;
|
||||
} fanclubLetter;
|
||||
|
||||
@ -42,7 +42,7 @@ typedef union // size = 0x24
|
||||
/*0x01*/ bool8 active;
|
||||
/*0x02*/ u16 var02;
|
||||
/*0x04*/ u16 words[6];
|
||||
/*0x10*/ u8 playerName[8];
|
||||
/*0x10*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x18*/ u8 language;
|
||||
} recentHappenings;
|
||||
|
||||
@ -53,11 +53,11 @@ typedef union // size = 0x24
|
||||
/*0x02*/ u16 species;
|
||||
/*0x04*/ u8 friendshipHighNybble:4;
|
||||
/*0x04*/ u8 questionAsked:4;
|
||||
/*0x05*/ u8 playerName[8];
|
||||
/*0x05*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x0D*/ u8 language;
|
||||
/*0x0E*/ u8 pokemonNameLanguage;
|
||||
/*0x0F*/ u8 filler_0F[1];
|
||||
/*0x10*/ u8 nickname[8];
|
||||
/*0x10*/ u8 nickname[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x18*/ u16 words18[2];
|
||||
/*0x1C*/ u16 words[4];
|
||||
} fanclubOpinions;
|
||||
@ -78,7 +78,7 @@ typedef union // size = 0x24
|
||||
/*0x00*/ u8 kind;
|
||||
/*0x01*/ bool8 active;
|
||||
/*0x02*/ u16 species;
|
||||
/*0x04*/ u8 pokemonName[11];
|
||||
/*0x04*/ u8 pokemonName[POKEMON_NAME_LENGTH + 1];
|
||||
/*0x0F*/ u8 trainerName[11];
|
||||
/*0x1A*/ u8 random;
|
||||
/*0x1B*/ u8 random2;
|
||||
@ -93,12 +93,12 @@ typedef union // size = 0x24
|
||||
/*0x01*/ bool8 active;
|
||||
/*0x02*/ u16 species;
|
||||
/*0x04*/ u16 words[2];
|
||||
/*0x08*/ u8 pokemonNickname[11];
|
||||
/*0x08*/ u8 pokemonNickname[POKEMON_NAME_LENGTH + 1];
|
||||
/*0x13*/ u8 contestCategory:3;
|
||||
/*0x13*/ u8 contestRank:2;
|
||||
/*0x13*/ u8 contestResult:2;
|
||||
/*0x14*/ u16 move;
|
||||
/*0x16*/ u8 playerName[8];
|
||||
/*0x16*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x1E*/ u8 language;
|
||||
/*0x1F*/ u8 pokemonNameLanguage;
|
||||
} bravoTrainer;
|
||||
@ -107,7 +107,7 @@ typedef union // size = 0x24
|
||||
struct {
|
||||
/*0x00*/ u8 kind;
|
||||
/*0x01*/ bool8 active;
|
||||
/*0x02*/ u8 trainerName[8];
|
||||
/*0x02*/ u8 trainerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x0A*/ u16 species;
|
||||
/*0x0C*/ u8 pokemonName[8];
|
||||
/*0x14*/ u16 defeatedSpecies;
|
||||
@ -125,14 +125,14 @@ typedef union // size = 0x24
|
||||
/*0x00*/ u8 kind;
|
||||
/*0x01*/ bool8 active;
|
||||
/*0x02*/ u16 losingSpecies;
|
||||
/*0x04*/ u8 losingTrainerName[8];
|
||||
/*0x04*/ u8 losingTrainerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x0C*/ u8 loserAppealFlag;
|
||||
/*0x0D*/ u8 round1Placing;
|
||||
/*0x0e*/ u8 round2Placing;
|
||||
/*0x0f*/ u8 winnerAppealFlag;
|
||||
/*0x10*/ u16 move;
|
||||
/*0x12*/ u16 winningSpecies;
|
||||
/*0x14*/ u8 winningTrainerName[8];
|
||||
/*0x14*/ u8 winningTrainerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x1C*/ u8 category;
|
||||
/*0x1D*/ u8 winningTrainerLanguage;
|
||||
/*0x1E*/ u8 losingTrainerLanguage;
|
||||
@ -144,9 +144,9 @@ typedef union // size = 0x24
|
||||
/*0x01*/ bool8 active;
|
||||
/*0x02*/ u8 sheen;
|
||||
/*0x03*/ u8 flavor:3;
|
||||
/*0x03*/ u8 unk_03_3:2;
|
||||
/*0x04*/ u8 worstBlenderName[8];
|
||||
/*0x0C*/ u8 playerName[8];
|
||||
/*0x03*/ u8 color:2;
|
||||
/*0x04*/ u8 worstBlenderName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x0C*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x14*/ u8 language;
|
||||
/*0x15*/ u8 worstBlenderLanguage;
|
||||
} threeCheers;
|
||||
@ -156,8 +156,8 @@ typedef union // size = 0x24
|
||||
/*0x00*/ u8 kind;
|
||||
/*0x01*/ bool8 active;
|
||||
/*0x02*/ u16 speciesOpponent;
|
||||
/*0x04*/ u8 playerName[8];
|
||||
/*0x0C*/ u8 linkOpponentName[8];
|
||||
/*0x04*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x0C*/ u8 linkOpponentName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x14*/ u16 move;
|
||||
/*0x16*/ u16 speciesPlayer;
|
||||
/*0x18*/ u8 battleType;
|
||||
@ -169,10 +169,10 @@ typedef union // size = 0x24
|
||||
struct {
|
||||
/*0x00*/ u8 kind;
|
||||
/*0x01*/ bool8 active;
|
||||
/*0x02*/ u8 playerName[8];
|
||||
/*0x02*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x0a*/ u8 idLo;
|
||||
/*0x0b*/ u8 idHi;
|
||||
/*0x0c*/ u8 idolName[8];
|
||||
/*0x0c*/ u8 idolName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x14*/ u16 words[1];
|
||||
/*0x16*/ u8 score;
|
||||
/*0x17*/ u8 language;
|
||||
@ -183,9 +183,9 @@ typedef union // size = 0x24
|
||||
struct {
|
||||
/*0x00*/ u8 kind;
|
||||
/*0x01*/ bool8 active;
|
||||
/*0x02*/ u8 playerName[8];
|
||||
/*0x02*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x0a*/ u8 contestCategory;
|
||||
/*0x0b*/ u8 nickname[11];
|
||||
/*0x0b*/ u8 nickname[POKEMON_NAME_LENGTH + 1];
|
||||
/*0x16*/ u8 pokeblockState;
|
||||
/*0x17*/ u8 language;
|
||||
/*0x18*/ u8 pokemonNameLanguage;
|
||||
@ -198,11 +198,11 @@ typedef union // size = 0x24
|
||||
/*0x01*/ bool8 active;
|
||||
/*0x02*/ u8 language;
|
||||
/*0x03*/ u8 language2;
|
||||
/*0x04*/ u8 nickname[11];
|
||||
/*0x04*/ u8 nickname[POKEMON_NAME_LENGTH + 1];
|
||||
/*0x0F*/ u8 ball;
|
||||
/*0x10*/ u16 species;
|
||||
/*0x12*/ u8 nBallsUsed;
|
||||
/*0x13*/ u8 playerName[8];
|
||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
} pokemonToday;
|
||||
|
||||
// TVSHOW_SMART_SHOPPER
|
||||
@ -215,7 +215,7 @@ typedef union // size = 0x24
|
||||
/*0x06*/ u16 itemIds[3];
|
||||
/*0x0C*/ u16 itemAmounts[3];
|
||||
/*0x12*/ u8 shopLocation;
|
||||
/*0x13*/ u8 playerName[8];
|
||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
} smartshopperShow;
|
||||
|
||||
// TVSHOW_POKEMON_TODAY_FAILED
|
||||
@ -229,7 +229,7 @@ typedef union // size = 0x24
|
||||
/*0x10*/ u8 nBallsUsed;
|
||||
/*0x11*/ u8 outcome;
|
||||
/*0x12*/ u8 location;
|
||||
/*0x13*/ u8 playerName[8];
|
||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
} pokemonTodayFailed;
|
||||
|
||||
// TVSHOW_FISHING_ADVICE
|
||||
@ -241,7 +241,7 @@ typedef union // size = 0x24
|
||||
/*0x04*/ u16 species;
|
||||
/*0x06*/ u8 language;
|
||||
/*0x07*/ u8 pad07[12];
|
||||
/*0x13*/ u8 playerName[8];
|
||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
} pokemonAngler;
|
||||
|
||||
// TVSHOW_WORLD_OF_MASTERS
|
||||
@ -255,7 +255,7 @@ typedef union // size = 0x24
|
||||
/*0x0a*/ u8 location;
|
||||
/*0x0b*/ u8 language;
|
||||
/*0x0c*/ u8 pad0c[7];
|
||||
/*0x13*/ u8 playerName[8];
|
||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
} worldOfMasters;
|
||||
|
||||
// TVSHOW_TODAYS_RIVAL_TRAINER
|
||||
@ -271,7 +271,7 @@ typedef union // size = 0x24
|
||||
/*0x0a*/ u16 mapLayoutId;
|
||||
/*0x0c*/ u8 language;
|
||||
/*0x0d*/ u8 filler_0d[6];
|
||||
/*0x13*/ u8 playerName[8];
|
||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
} rivalTrainer;
|
||||
|
||||
// TVSHOW_TREND_WATCHER
|
||||
@ -283,7 +283,7 @@ typedef union // size = 0x24
|
||||
/*0x08*/ u8 gender;
|
||||
/*0x09*/ u8 language;
|
||||
/*0x0a*/ u8 filler_0a[9];
|
||||
/*0x13*/ u8 playerName[8];
|
||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
} trendWatcher;
|
||||
|
||||
// TVSHOW_TREASURE_INVESTIGATORS
|
||||
@ -295,7 +295,7 @@ typedef union // size = 0x24
|
||||
/*0x05*/ u8 language;
|
||||
/*0x06*/ u16 mapLayoutId;
|
||||
/*0x08*/ u8 filler_08[11];
|
||||
/*0x13*/ u8 playerName[8];
|
||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
} treasureInvestigators;
|
||||
|
||||
// TVSHOW_FIND_THAT_GAMER
|
||||
@ -308,7 +308,7 @@ typedef union // size = 0x24
|
||||
/*0x06*/ u8 filler_06[2];
|
||||
/*0x08*/ u8 language;
|
||||
/*0x09*/ u8 filler_09[10];
|
||||
/*0x13*/ u8 playerName[8];
|
||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
} findThatGamer;
|
||||
|
||||
// TVSHOW_BREAKING_NEWS
|
||||
@ -324,7 +324,7 @@ typedef union // size = 0x24
|
||||
/*0x0c*/ u16 lastUsedMove;
|
||||
/*0x0e*/ u8 language;
|
||||
/*0x0f*/ u8 filler_0f[4];
|
||||
/*0x13*/ u8 playerName[8];
|
||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
} breakingNews;
|
||||
|
||||
// TVSHOW_SECRET_BASE_VISIT
|
||||
@ -338,7 +338,7 @@ typedef union // size = 0x24
|
||||
/*0x0a*/ u16 move;
|
||||
/*0x0c*/ u8 language;
|
||||
/*0x0d*/ u8 filler_0d[6];
|
||||
/*0x13*/ u8 playerName[8];
|
||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
} secretBaseVisit;
|
||||
|
||||
// TVSHOW_LOTTO_WINNER
|
||||
@ -349,7 +349,7 @@ typedef union // size = 0x24
|
||||
/*0x04*/ u8 whichPrize;
|
||||
/*0x05*/ u8 language;
|
||||
/*0x06*/ u8 filler_06[13];
|
||||
/*0x13*/ u8 playerName[8];
|
||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
} lottoWinner;
|
||||
|
||||
// TVSHOW_BATTLE_SEMINAR
|
||||
@ -364,7 +364,7 @@ typedef union // size = 0x24
|
||||
/*0x10*/ u8 nOtherMoves;
|
||||
/*0x11*/ u8 language;
|
||||
/*0x12*/ u8 filler_12[1];
|
||||
/*0x13*/ u8 playerName[8];
|
||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
} battleSeminar;
|
||||
|
||||
// TVSHOW_TRAINER_FAN_CLUB
|
||||
@ -375,7 +375,7 @@ typedef union // size = 0x24
|
||||
/*0x04*/ u16 words[2];
|
||||
/*0x08*/ u8 language;
|
||||
/*0x09*/ u8 filler_09[10];
|
||||
/*0x13*/ u8 playerName[8];
|
||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
} trainerFanClub;
|
||||
|
||||
// TVSHOW_CUTIES
|
||||
@ -384,11 +384,11 @@ typedef union // size = 0x24
|
||||
/*0x01*/ bool8 active;
|
||||
/*0x02*/ u8 nRibbons;
|
||||
/*0x03*/ u8 selectedRibbon;
|
||||
/*0x04*/ u8 nickname[11];
|
||||
/*0x04*/ u8 nickname[POKEMON_NAME_LENGTH + 1];
|
||||
/*0x0f*/ u8 language;
|
||||
/*0x10*/ u8 pokemonNameLanguage;
|
||||
/*0x11*/ u8 filler_12[2];
|
||||
/*0x13*/ u8 playerName[8];
|
||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
} cuties;
|
||||
|
||||
// TVSHOW_FRONTIER
|
||||
@ -403,7 +403,7 @@ typedef union // size = 0x24
|
||||
/*0x0c*/ u8 language;
|
||||
/*0x0d*/ u8 facility;
|
||||
/*0x0e*/ u8 filler_0e[5];
|
||||
/*0x13*/ u8 playerName[8];
|
||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
} frontier;
|
||||
|
||||
// TVSHOW_NUMBER_ONE
|
||||
@ -414,7 +414,7 @@ typedef union // size = 0x24
|
||||
/*0x04*/ u8 actionIdx;
|
||||
/*0x05*/ u8 language;
|
||||
/*0x06*/ u8 filler_06[13];
|
||||
/*0x13*/ u8 playerName[8];
|
||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
} numberOne;
|
||||
|
||||
// TVSHOW_SECRET_BASE_SECRETS
|
||||
@ -422,11 +422,11 @@ typedef union // size = 0x24
|
||||
/*0x00*/ u8 kind;
|
||||
/*0x01*/ bool8 active;
|
||||
/*0x02*/ u16 stepsInBase;
|
||||
/*0x04*/ u8 baseOwnersName[8];
|
||||
/*0x04*/ u8 baseOwnersName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x0c*/ u32 flags;
|
||||
/*0x10*/ u16 item;
|
||||
/*0x12*/ u8 savedState;
|
||||
/*0x13*/ u8 playerName[8];
|
||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x1b*/ u8 language;
|
||||
/*0x1c*/ u8 baseOwnersNameLanguage;
|
||||
} secretBaseSecrets;
|
||||
@ -439,7 +439,7 @@ typedef union // size = 0x24
|
||||
/*0x03*/ u8 nPkblkUsed;
|
||||
/*0x04*/ u8 language;
|
||||
/*0x05*/ u8 filler_05[14];
|
||||
/*0x13*/ u8 playerName[8];
|
||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
} safariFanClub;
|
||||
|
||||
// Mass Outbreak
|
||||
|
@ -4812,16 +4812,16 @@ extern const u16 gUsePokeblockGraph_Pal[];
|
||||
extern const u16 gUsePokeblockNatureWin_Pal[];
|
||||
|
||||
// Berry blender
|
||||
extern const u32 gBerryBlenderArrowTiles[];
|
||||
extern const u32 gBerryBlenderStartTiles[];
|
||||
extern const u32 gBerryBlenderMarubatsuTiles[];
|
||||
extern const u32 gBerryBlenderParticlesTiles[];
|
||||
extern const u32 gBerryBlenderCountdownNumbersTiles[];
|
||||
extern const u32 gBerryBlenderPlayerArrow_Gfx[];
|
||||
extern const u32 gBerryBlenderStart_Gfx[];
|
||||
extern const u32 gBerryBlenderScoreSymbols_Gfx[];
|
||||
extern const u32 gBerryBlenderParticles_Gfx[];
|
||||
extern const u32 gBerryBlenderCountdownNumbers_Gfx[];
|
||||
extern const u16 gBerryBlenderMiscPalette[];
|
||||
extern const u16 gBerryBlenderArrowPalette[];
|
||||
extern const u32 sBlenderCenterGfx[];
|
||||
extern const u32 gUnknown_08D91DB8[];
|
||||
extern const u32 gUnknown_08D927EC[];
|
||||
extern const u32 gBerryBlenderCenter_Gfx[];
|
||||
extern const u32 gBerryBlenderOuter_Gfx[];
|
||||
extern const u32 gBerryBlenderOuter_Tilemap[];
|
||||
|
||||
// Slot Machine
|
||||
extern const u32 gSlotMachineDigitalDisplay_Gfx[];
|
||||
|
@ -93,7 +93,7 @@ void CB2_GoToSellMenu(void);
|
||||
void GoToBagMenu(u8 bagMenuType, u8 pocketId, void ( *postExitMenuMainCallback2)());
|
||||
void DoWallyTutorialBagMenu(void);
|
||||
void ResetBagScrollPositions(void);
|
||||
void ChooseBerrySetCallback(void (*callback)(void));
|
||||
void ChooseBerryForMachine(void (*exitCallback)(void));
|
||||
void CB2_ChooseBerry(void);
|
||||
void Task_FadeAndCloseBagMenu(u8 taskId);
|
||||
void BagMenu_YesNo(u8, u8, const struct YesNoFuncTable*);
|
||||
|
@ -19,7 +19,7 @@ void sub_80D4FC8(u8 arg0);
|
||||
void sub_80D4FEC(u8 arg0);
|
||||
u8 CreateBerryTagSprite(u8 id, s16 x, s16 y);
|
||||
void FreeBerryTagSpritePalette(void);
|
||||
u8 LoadSpinningBerryPicGfx(u8 berryId, u8 x, u8 y, bool8 startAffine);
|
||||
u8 CreateSpinningBerrySprite(u8 berryId, u8 x, u8 y, bool8 startAffine);
|
||||
u8 CreateBerryFlavorCircleSprite(s16 x);
|
||||
|
||||
#define TAG_BAG_GFX 100
|
||||
|
@ -48,22 +48,30 @@
|
||||
#define EXTRACT_LINK_ERRORS(status) \
|
||||
(((status) & LINK_STAT_ERRORS) >> LINK_STAT_ERRORS_SHIFT)
|
||||
|
||||
#define LINKCMD_BLENDER_STOP 0x1111
|
||||
#define LINKCMD_SEND_LINK_TYPE 0x2222
|
||||
#define LINKCMD_BLENDER_SCORE_MISS 0x2345
|
||||
#define LINKCMD_READY_EXIT_STANDBY 0x2FFE
|
||||
#define LINKCMD_SEND_HELD_KEYS 0x4444
|
||||
#define LINKCMD_SEND_PACKET 0x2FFF
|
||||
#define LINKCMD_BLENDER_SEND_KEYS 0x4444
|
||||
#define LINKCMD_BLENDER_SCORE_BEST 0x4523
|
||||
#define LINKCMD_BLENDER_SCORE_GOOD 0x5432
|
||||
#define LINKCMD_0x5555 0x5555
|
||||
#define LINKCMD_0x5566 0x5566
|
||||
#define LINKCMD_READY_CLOSE_LINK 0x5FFF
|
||||
#define LINKCMD_0x6666 0x6666
|
||||
#define LINKCMD_0x7777 0x7777
|
||||
#define LINKCMD_BLENDER_PLAY_AGAIN 0x7779
|
||||
#define LINKCMD_0x7FFF 0x7FFF
|
||||
#define LINKCMD_CONT_BLOCK 0x8888
|
||||
#define LINKCMD_0xAAAA 0xAAAA
|
||||
#define LINKCMD_BLENDER_NO_BERRIES 0x9999
|
||||
#define LINKCMD_BLENDER_NO_PBLOCK_SPACE 0xAAAA
|
||||
#define LINKCMD_0xAAAB 0xAAAB
|
||||
#define LINKCMD_READY_TO_TRADE 0xAABB
|
||||
#define LINKCMD_READY_FINISH_TRADE 0xABCD
|
||||
#define LINKCMD_INIT_BLOCK 0xBBBB
|
||||
#define LINKCMD_READY_CANCEL_TRADE 0xBBCC
|
||||
#define LINKCMD_SEND_HELD_KEYS_2 0xCAFE
|
||||
#define LINKCMD_SEND_HELD_KEYS 0xCAFE
|
||||
#define LINKCMD_SEND_BLOCK_REQ 0xCCCC
|
||||
#define LINKCMD_START_TRADE 0xCCDD
|
||||
#define LINKCMD_CONFIRM_FINISH_TRADE 0xDCBA
|
||||
@ -230,7 +238,7 @@ extern u16 gSendCmd[CMD_LENGTH];
|
||||
extern struct LinkPlayer gLinkPlayers[5];
|
||||
extern u16 word_3002910[];
|
||||
extern bool8 gReceivedRemoteLinkPlayers;
|
||||
extern u32 gUnknown_020223C0;
|
||||
extern u32 gBerryBlenderKeySendAttempts;
|
||||
extern bool8 gLinkVSyncDisabled;
|
||||
extern u32 gLinkStatus;
|
||||
|
||||
@ -280,7 +288,7 @@ u8 IsLinkMaster(void);
|
||||
void SetCloseLinkCallback(void);
|
||||
bool8 HandleLinkConnection(void);
|
||||
void SetLinkDebugValues(u32 seed, u32 flags);
|
||||
void sub_800A418(void);
|
||||
void SetBerryBlenderLinkCallback(void);
|
||||
void SetSuppressLinkErrorMessage(bool8 flag);
|
||||
void sub_800B524(struct LinkPlayer *linkPlayer);
|
||||
u8 GetSioMultiSI(void);
|
||||
|
@ -5,18 +5,18 @@
|
||||
#include "link.h"
|
||||
#include "AgbRfu_LinkManager.h"
|
||||
|
||||
#define RFU_COMMAND_0x4400 0x4400
|
||||
#define RFU_COMMAND_0x8800 0x8800
|
||||
#define RFU_COMMAND_0x8900 0x8900
|
||||
#define RFU_COMMAND_SEND_BLOCK_REQ 0xA100
|
||||
#define RFU_COMMAND_0x7700 0x7700
|
||||
#define RFU_COMMAND_0x7800 0x7800
|
||||
#define RFU_COMMAND_READY_EXIT_STANDBY 0x6600
|
||||
#define RFU_COMMAND_READY_CLOSE_LINK 0x5F00
|
||||
#define RFU_COMMAND_0x2F00 0x2F00
|
||||
#define RFU_COMMAND_0xBE00 0xBE00
|
||||
#define RFU_COMMAND_0xEE00 0xEE00
|
||||
#define RFU_COMMAND_0xED00 0xED00
|
||||
#define RFUCMD_SEND_PACKET 0x2F00
|
||||
#define RFUCMD_BLENDER_SEND_KEYS 0x4400
|
||||
#define RFUCMD_READY_CLOSE_LINK 0x5F00
|
||||
#define RFUCMD_READY_EXIT_STANDBY 0x6600
|
||||
#define RFUCMD_0x7700 0x7700
|
||||
#define RFUCMD_0x7800 0x7800
|
||||
#define RFUCMD_0x8800 0x8800
|
||||
#define RFUCMD_0x8900 0x8900
|
||||
#define RFUCMD_SEND_BLOCK_REQ 0xA100
|
||||
#define RFUCMD_SEND_HELD_KEYS 0xBE00
|
||||
#define RFUCMD_0xED00 0xED00
|
||||
#define RFUCMD_0xEE00 0xEE00
|
||||
|
||||
#define RFU_SERIAL_7F7D 0x7F7D
|
||||
|
||||
@ -29,6 +29,8 @@
|
||||
#define BACKUP_QUEUE_NUM_SLOTS 2
|
||||
#define BACKUP_QUEUE_SLOT_LENGTH 14
|
||||
|
||||
#define RFU_PACKET_SIZE 6
|
||||
|
||||
#define RFU_STATUS_OK 0
|
||||
#define RFU_STATUS_FATAL_ERROR 1
|
||||
#define RFU_STATUS_CONNECTION_ERROR 2
|
||||
@ -140,7 +142,7 @@ struct GFRfuManager
|
||||
/* 0x0ef */ bool8 isShuttingDown;
|
||||
/* 0x0f0 */ u8 linkLossRecoveryState;
|
||||
/* 0x0f1 */ u8 status;
|
||||
/* 0x0f2 */ u16 unk_f2[6];
|
||||
/* 0x0f2 */ u16 packet[RFU_PACKET_SIZE];
|
||||
/* 0x0fe */ u16 resendExitStandbyTimer;
|
||||
/* 0x100 */ u16 unk_100;
|
||||
/* 0x102 */ u8 unk_102;
|
||||
@ -197,7 +199,7 @@ void Rfu_SetBlockReceivedFlag(u8 who);
|
||||
void Rfu_ResetBlockReceivedFlag(u8 who);
|
||||
bool32 IsSendingKeysToRfu(void);
|
||||
void StartSendingKeysToRfu(void);
|
||||
void sub_800F850(void);
|
||||
void Rfu_SetBerryBlenderLinkCallback(void);
|
||||
u8 Rfu_GetBlockReceivedStatus(void);
|
||||
bool32 Rfu_InitBlockSend(const u8 *src, size_t size);
|
||||
void ClearLinkRfuCallback(void);
|
||||
@ -250,7 +252,7 @@ void SetTradeBoardRegisteredMonInfo(u32 type, u32 species, u32 level);
|
||||
void InitializeRfuLinkManager_EnterUnionRoom(void);
|
||||
void sub_8012188(const u8 *name, struct GFtgtGname *structPtr, u8 a2);
|
||||
bool32 IsUnionRoomListenTaskActive(void);
|
||||
void sub_800FE50(void *a0);
|
||||
void Rfu_SendPacket(void *data);
|
||||
bool32 PlayerHasMetTrainerBefore(u16 id, u8 *name);
|
||||
void sub_8011DE0(u32 arg0);
|
||||
u8 sub_801100C(s32 a0);
|
||||
|
@ -9,12 +9,21 @@
|
||||
|
||||
enum
|
||||
{
|
||||
PBLOCK_CLR_BLACK,
|
||||
PBLOCK_CLR_NONE,
|
||||
PBLOCK_CLR_RED,
|
||||
PBLOCK_CLR_BLUE,
|
||||
PBLOCK_CLR_PINK,
|
||||
PBLOCK_CLR_GREEN,
|
||||
PBLOCK_CLR_YELLOW
|
||||
PBLOCK_CLR_YELLOW,
|
||||
PBLOCK_CLR_PURPLE,
|
||||
PBLOCK_CLR_INDIGO,
|
||||
PBLOCK_CLR_BROWN,
|
||||
PBLOCK_CLR_LITE_BLUE,
|
||||
PBLOCK_CLR_OLIVE,
|
||||
PBLOCK_CLR_GRAY,
|
||||
PBLOCK_CLR_BLACK,
|
||||
PBLOCK_CLR_WHITE,
|
||||
PBLOCK_CLR_GOLD,
|
||||
};
|
||||
|
||||
enum
|
||||
|
@ -2983,4 +2983,9 @@ extern const u8 gText_Smartness[];
|
||||
extern const u8 gText_Cuteness[];
|
||||
extern const u8 gText_Beauty3[];
|
||||
|
||||
// Berry Blender
|
||||
extern const u8 gText_SavingDontTurnOff2[];
|
||||
extern const u8 gText_BlenderMaxSpeedRecord[];
|
||||
extern const u8 gText_234Players[];
|
||||
|
||||
#endif // GUARD_STRINGS_H
|
||||
|
2987
src/berry_blender.c
2987
src/berry_blender.c
File diff suppressed because it is too large
Load Diff
@ -900,7 +900,7 @@ static void sub_8020D8C(void)
|
||||
void sub_8020E1C(void)
|
||||
{
|
||||
DestroyTask(gUnknown_02022C90->unkA);
|
||||
ChooseBerrySetCallback(sub_8020D8C);
|
||||
ChooseBerryForMachine(sub_8020D8C);
|
||||
}
|
||||
|
||||
static void sub_8020E3C(void)
|
||||
@ -2357,7 +2357,7 @@ void sub_802339C(struct BerryCrushGame *r4)
|
||||
for (r7 = 0; r7 < r4->unk9; ++r7)
|
||||
{
|
||||
r2 = gRecvCmds[r7];
|
||||
if ((r2[0] & 0xFF00) == 0x2F00
|
||||
if ((r2[0] & 0xFF00) == RFUCMD_SEND_PACKET
|
||||
&& r2[1] == 2)
|
||||
{
|
||||
if ((u8)r2[2] & 4)
|
||||
@ -2559,7 +2559,7 @@ void sub_80236B8(struct BerryCrushGame *r5)
|
||||
r5->unk5C.unk02_1 = r5->unk25_4;
|
||||
r5->unk5C.unk0A = r5->unk25_5;
|
||||
memcpy(r5->unk40.unk2, &r5->unk5C, sizeof(r5->unk40.unk2));
|
||||
sub_800FE50(r5->unk40.unk2);
|
||||
Rfu_SendPacket(r5->unk40.unk2);
|
||||
}
|
||||
|
||||
void sub_802385C(struct BerryCrushGame *r5)
|
||||
@ -2580,7 +2580,7 @@ void sub_802385C(struct BerryCrushGame *r5)
|
||||
for (r4 = 0; r4 < r5->unk9; ++r4)
|
||||
r5->unk68.as_four_players.others[r4].unk4.as_2d_bytes[1][5] = 0;
|
||||
#endif
|
||||
if ((gRecvCmds[0][0] & 0xFF00) != 0x2F00
|
||||
if ((gRecvCmds[0][0] & 0xFF00) != RFUCMD_SEND_PACKET
|
||||
|| gRecvCmds[0][1] != 2)
|
||||
{
|
||||
r5->unk25_2 = 0;
|
||||
|
@ -2748,14 +2748,14 @@ static void sub_8027DD0(u32 arg0)
|
||||
struct UnkPacket1 packet;
|
||||
packet.id = 1;
|
||||
packet.unk4 = arg0;
|
||||
sub_800FE50(&packet);
|
||||
Rfu_SendPacket(&packet);
|
||||
}
|
||||
|
||||
static u32 sub_8027DFC(u32 arg0)
|
||||
{
|
||||
struct UnkPacket1 *packet;
|
||||
|
||||
if ((gRecvCmds[0][0] & 0xFF00) != 0x2F00)
|
||||
if ((gRecvCmds[0][0] & 0xFF00) != RFUCMD_SEND_PACKET)
|
||||
return 0;
|
||||
|
||||
packet = (void *)&gRecvCmds[arg0][1];
|
||||
@ -2857,7 +2857,7 @@ static void sub_8027E30(struct DodrioSubstruct_31A0 *arg0, struct DodrioSubstruc
|
||||
packet.unkA_3 = arg6;
|
||||
packet.unkB_1 = arg7;
|
||||
packet.unkB_0 = arg8;
|
||||
sub_800FE50(&packet);
|
||||
Rfu_SendPacket(&packet);
|
||||
}
|
||||
|
||||
static u32 sub_8028164(u32 unused, struct DodrioSubstruct_31A0 *arg0, struct DodrioSubstruct_31A0_2C *arg1, struct DodrioSubstruct_31A0_2C *arg2, struct DodrioSubstruct_31A0_2C *arg3, struct DodrioSubstruct_31A0_2C *arg4, struct DodrioSubstruct_31A0_2C *arg5, u8 *arg6, u32 *arg7, u32 *arg8)
|
||||
@ -2865,7 +2865,7 @@ static u32 sub_8028164(u32 unused, struct DodrioSubstruct_31A0 *arg0, struct Dod
|
||||
struct UnkPacket2 *packet;
|
||||
struct DodrioSubstruct_31A0_14 *ptr = &arg0->unk14;
|
||||
|
||||
if ((gRecvCmds[0][0] & 0xFF00) != 0x2F00)
|
||||
if ((gRecvCmds[0][0] & 0xFF00) != RFUCMD_SEND_PACKET)
|
||||
return 0;
|
||||
|
||||
packet = (void *)&gRecvCmds[0][1];
|
||||
@ -2935,14 +2935,14 @@ static void sub_80282EC(u8 arg0)
|
||||
struct UnkPacket3 packet;
|
||||
packet.id = 3;
|
||||
packet.unk4 = arg0;
|
||||
sub_800FE50(&packet);
|
||||
Rfu_SendPacket(&packet);
|
||||
}
|
||||
|
||||
static u32 sub_8028318(u32 arg0, u8 *arg1)
|
||||
{
|
||||
struct UnkPacket3 *packet;
|
||||
|
||||
if ((gRecvCmds[0][0] & 0xFF00) != 0x2F00)
|
||||
if ((gRecvCmds[0][0] & 0xFF00) != RFUCMD_SEND_PACKET)
|
||||
return 0;
|
||||
|
||||
packet = (void *)&gRecvCmds[arg0][1];
|
||||
@ -2966,14 +2966,14 @@ static void sub_8028350(u32 arg0)
|
||||
struct UnkPacket4 packet;
|
||||
packet.id = 4;
|
||||
packet.unk4 = arg0;
|
||||
sub_800FE50(&packet);
|
||||
Rfu_SendPacket(&packet);
|
||||
}
|
||||
|
||||
static u32 sub_8028374(u32 arg0)
|
||||
{
|
||||
struct UnkPacket4 *packet;
|
||||
|
||||
if ((gRecvCmds[0][0] & 0xFF00) != 0x2F00)
|
||||
if ((gRecvCmds[0][0] & 0xFF00) != RFUCMD_SEND_PACKET)
|
||||
return 0;
|
||||
|
||||
packet = (void *)&gRecvCmds[arg0][1];
|
||||
|
@ -1067,10 +1067,9 @@ const u32 gBattleAnimBgPalette_Solarbeam[] = INCBIN_U32("graphics/battle_anims/b
|
||||
|
||||
const u32 gUnknown_E6BC04[] = INCBIN_U32("graphics/unknown/unknown_E6BC04.bin.lz");
|
||||
|
||||
const u32 sBlenderCenterGfx[] = INCBIN_U32("graphics/berry_blender/center.8bpp.lz");
|
||||
|
||||
const u32 gUnknown_08D91DB8[] = INCBIN_U32("graphics/berry_blender/outer.4bpp.lz");
|
||||
const u32 gUnknown_08D927EC[] = INCBIN_U32("graphics/berry_blender/outer_map.bin.lz");
|
||||
const u32 gBerryBlenderCenter_Gfx[] = INCBIN_U32("graphics/berry_blender/center.8bpp.lz");
|
||||
const u32 gBerryBlenderOuter_Gfx[] = INCBIN_U32("graphics/berry_blender/outer.4bpp.lz");
|
||||
const u32 gBerryBlenderOuter_Tilemap[] = INCBIN_U32("graphics/berry_blender/outer_map.bin.lz");
|
||||
|
||||
const u32 gBattleAnimBgPalette_Cosmic[] = INCBIN_U32("graphics/battle_anims/backgrounds/cosmic.gbapal.lz");
|
||||
const u32 gBattleAnimBgImage_Cosmic[] = INCBIN_U32("graphics/battle_anims/backgrounds/cosmic.4bpp.lz");
|
||||
@ -1352,25 +1351,15 @@ const u16 gPokenavConditionMarker_Pal[] = INCBIN_U16("graphics/pokenav/condition
|
||||
const u8 gPokenavConditionMarker_Gfx[] = INCBIN_U8("graphics/pokenav/condition/marker.4bpp");
|
||||
|
||||
const u16 gBerryBlenderMiscPalette[] = INCBIN_U16("graphics/berry_blender/misc.gbapal");
|
||||
|
||||
const u16 gBerryBlenderArrowPalette[] = INCBIN_U16("graphics/berry_blender/arrow.gbapal");
|
||||
|
||||
const u8 gBerryBlenderBetaArrow_Gfx[] = INCBIN_U8("graphics/berry_blender/arrow_old.4bpp"); //unused
|
||||
|
||||
const u8 gBerryBlenderMarubatsuTiles[] = INCBIN_U8("graphics/berry_blender/marubatsu.4bpp");
|
||||
|
||||
const u8 gBerryBlenderParticlesTiles[] = INCBIN_U8("graphics/berry_blender/particles.4bpp");
|
||||
|
||||
const u8 gBerryBlenderScoreSymbols_Gfx[] = INCBIN_U8("graphics/berry_blender/score_symbols.4bpp");
|
||||
const u8 gBerryBlenderParticles_Gfx[] = INCBIN_U8("graphics/berry_blender/particles.4bpp");
|
||||
static const u8 sEmpty0[0x120] = {0};
|
||||
|
||||
const u8 gBerryBlenderCountdownNumbersTiles[] = INCBIN_U8("graphics/berry_blender/countdown_numbers.4bpp");
|
||||
|
||||
const u8 gBerryBlenderStartTiles[] = INCBIN_U8("graphics/berry_blender/start.4bpp");
|
||||
|
||||
const u8 gBerryBlenderCountdownNumbers_Gfx[] = INCBIN_U8("graphics/berry_blender/countdown_numbers.4bpp");
|
||||
const u8 gBerryBlenderStart_Gfx[] = INCBIN_U8("graphics/berry_blender/start.4bpp");
|
||||
static const u8 sEmpty1[0x200] = {0};
|
||||
|
||||
const u8 gBerryBlenderArrowTiles[] = INCBIN_U8("graphics/berry_blender/arrow.4bpp");
|
||||
|
||||
const u8 gBerryBlenderPlayerArrow_Gfx[] = INCBIN_U8("graphics/berry_blender/arrow.4bpp");
|
||||
static const u8 sEmpty2[0x2C0] = {0};
|
||||
|
||||
const u16 gEasyChatCursor_Pal[] = INCBIN_U16("graphics/easy_chat/cursor.gbapal");
|
||||
|
@ -534,14 +534,16 @@ void CB2_BagMenuFromBattle(void)
|
||||
GoToBattlePyramidBagMenu(1, CB2_SetUpReshowBattleScreenAfterMenu2);
|
||||
}
|
||||
|
||||
// Choosing berry to plant
|
||||
void CB2_ChooseBerry(void)
|
||||
{
|
||||
GoToBagMenu(ITEMMENULOCATION_BERRY_TREE, BERRIES_POCKET, CB2_ReturnToFieldContinueScript);
|
||||
}
|
||||
|
||||
void ChooseBerrySetCallback(void (*callback)(void))
|
||||
// Choosing berry for Berry Blender or Berry Crush
|
||||
void ChooseBerryForMachine(void (*exitCallback)(void))
|
||||
{
|
||||
GoToBagMenu(ITEMMENULOCATION_BERRY_BLENDER_CRUSH, BERRIES_POCKET, callback);
|
||||
GoToBagMenu(ITEMMENULOCATION_BERRY_BLENDER_CRUSH, BERRIES_POCKET, exitCallback);
|
||||
}
|
||||
|
||||
void CB2_GoToSellMenu(void)
|
||||
|
@ -310,51 +310,51 @@ static const struct SpriteTemplate gBerryPicRotatingSpriteTemplate =
|
||||
.callback = SpriteCallbackDummy,
|
||||
};
|
||||
|
||||
static const struct CompressedTilesPal gBerryPicTable[] =
|
||||
static const struct CompressedTilesPal sBerryPicTable[] =
|
||||
{
|
||||
{gBerryPic_Cheri, gBerryPalette_Cheri},
|
||||
{gBerryPic_Chesto, gBerryPalette_Chesto},
|
||||
{gBerryPic_Pecha, gBerryPalette_Pecha},
|
||||
{gBerryPic_Rawst, gBerryPalette_Rawst},
|
||||
{gBerryPic_Aspear, gBerryPalette_Aspear},
|
||||
{gBerryPic_Leppa, gBerryPalette_Leppa},
|
||||
{gBerryPic_Oran, gBerryPalette_Oran},
|
||||
{gBerryPic_Persim, gBerryPalette_Persim},
|
||||
{gBerryPic_Lum, gBerryPalette_Lum},
|
||||
{gBerryPic_Sitrus, gBerryPalette_Sitrus},
|
||||
{gBerryPic_Figy, gBerryPalette_Figy},
|
||||
{gBerryPic_Wiki, gBerryPalette_Wiki},
|
||||
{gBerryPic_Mago, gBerryPalette_Mago},
|
||||
{gBerryPic_Aguav, gBerryPalette_Aguav},
|
||||
{gBerryPic_Iapapa, gBerryPalette_Iapapa},
|
||||
{gBerryPic_Razz, gBerryPalette_Razz},
|
||||
{gBerryPic_Bluk, gBerryPalette_Bluk},
|
||||
{gBerryPic_Nanab, gBerryPalette_Nanab},
|
||||
{gBerryPic_Wepear, gBerryPalette_Wepear},
|
||||
{gBerryPic_Pinap, gBerryPalette_Pinap},
|
||||
{gBerryPic_Pomeg, gBerryPalette_Pomeg},
|
||||
{gBerryPic_Kelpsy, gBerryPalette_Kelpsy},
|
||||
{gBerryPic_Qualot, gBerryPalette_Qualot},
|
||||
{gBerryPic_Hondew, gBerryPalette_Hondew},
|
||||
{gBerryPic_Grepa, gBerryPalette_Grepa},
|
||||
{gBerryPic_Tamato, gBerryPalette_Tamato},
|
||||
{gBerryPic_Cornn, gBerryPalette_Cornn},
|
||||
{gBerryPic_Magost, gBerryPalette_Magost},
|
||||
{gBerryPic_Rabuta, gBerryPalette_Rabuta},
|
||||
{gBerryPic_Nomel, gBerryPalette_Nomel},
|
||||
{gBerryPic_Spelon, gBerryPalette_Spelon},
|
||||
{gBerryPic_Pamtre, gBerryPalette_Pamtre},
|
||||
{gBerryPic_Watmel, gBerryPalette_Watmel},
|
||||
{gBerryPic_Durin, gBerryPalette_Durin},
|
||||
{gBerryPic_Belue, gBerryPalette_Belue},
|
||||
{gBerryPic_Liechi, gBerryPalette_Liechi},
|
||||
{gBerryPic_Ganlon, gBerryPalette_Ganlon},
|
||||
{gBerryPic_Salac, gBerryPalette_Salac},
|
||||
{gBerryPic_Petaya, gBerryPalette_Petaya},
|
||||
{gBerryPic_Apicot, gBerryPalette_Apicot},
|
||||
{gBerryPic_Lansat, gBerryPalette_Lansat},
|
||||
{gBerryPic_Starf, gBerryPalette_Starf},
|
||||
{gBerryPic_Enigma, gBerryPalette_Enigma},
|
||||
[ITEM_TO_BERRY(ITEM_CHERI_BERRY) - 1] = {gBerryPic_Cheri, gBerryPalette_Cheri},
|
||||
[ITEM_TO_BERRY(ITEM_CHESTO_BERRY) - 1] = {gBerryPic_Chesto, gBerryPalette_Chesto},
|
||||
[ITEM_TO_BERRY(ITEM_PECHA_BERRY) - 1] = {gBerryPic_Pecha, gBerryPalette_Pecha},
|
||||
[ITEM_TO_BERRY(ITEM_RAWST_BERRY) - 1] = {gBerryPic_Rawst, gBerryPalette_Rawst},
|
||||
[ITEM_TO_BERRY(ITEM_ASPEAR_BERRY) - 1] = {gBerryPic_Aspear, gBerryPalette_Aspear},
|
||||
[ITEM_TO_BERRY(ITEM_LEPPA_BERRY) - 1] = {gBerryPic_Leppa, gBerryPalette_Leppa},
|
||||
[ITEM_TO_BERRY(ITEM_ORAN_BERRY) - 1] = {gBerryPic_Oran, gBerryPalette_Oran},
|
||||
[ITEM_TO_BERRY(ITEM_PERSIM_BERRY) - 1] = {gBerryPic_Persim, gBerryPalette_Persim},
|
||||
[ITEM_TO_BERRY(ITEM_LUM_BERRY) - 1] = {gBerryPic_Lum, gBerryPalette_Lum},
|
||||
[ITEM_TO_BERRY(ITEM_SITRUS_BERRY) - 1] = {gBerryPic_Sitrus, gBerryPalette_Sitrus},
|
||||
[ITEM_TO_BERRY(ITEM_FIGY_BERRY) - 1] = {gBerryPic_Figy, gBerryPalette_Figy},
|
||||
[ITEM_TO_BERRY(ITEM_WIKI_BERRY) - 1] = {gBerryPic_Wiki, gBerryPalette_Wiki},
|
||||
[ITEM_TO_BERRY(ITEM_MAGO_BERRY) - 1] = {gBerryPic_Mago, gBerryPalette_Mago},
|
||||
[ITEM_TO_BERRY(ITEM_AGUAV_BERRY) - 1] = {gBerryPic_Aguav, gBerryPalette_Aguav},
|
||||
[ITEM_TO_BERRY(ITEM_IAPAPA_BERRY) - 1] = {gBerryPic_Iapapa, gBerryPalette_Iapapa},
|
||||
[ITEM_TO_BERRY(ITEM_RAZZ_BERRY) - 1] = {gBerryPic_Razz, gBerryPalette_Razz},
|
||||
[ITEM_TO_BERRY(ITEM_BLUK_BERRY) - 1] = {gBerryPic_Bluk, gBerryPalette_Bluk},
|
||||
[ITEM_TO_BERRY(ITEM_NANAB_BERRY) - 1] = {gBerryPic_Nanab, gBerryPalette_Nanab},
|
||||
[ITEM_TO_BERRY(ITEM_WEPEAR_BERRY) - 1] = {gBerryPic_Wepear, gBerryPalette_Wepear},
|
||||
[ITEM_TO_BERRY(ITEM_PINAP_BERRY) - 1] = {gBerryPic_Pinap, gBerryPalette_Pinap},
|
||||
[ITEM_TO_BERRY(ITEM_POMEG_BERRY) - 1] = {gBerryPic_Pomeg, gBerryPalette_Pomeg},
|
||||
[ITEM_TO_BERRY(ITEM_KELPSY_BERRY) - 1] = {gBerryPic_Kelpsy, gBerryPalette_Kelpsy},
|
||||
[ITEM_TO_BERRY(ITEM_QUALOT_BERRY) - 1] = {gBerryPic_Qualot, gBerryPalette_Qualot},
|
||||
[ITEM_TO_BERRY(ITEM_HONDEW_BERRY) - 1] = {gBerryPic_Hondew, gBerryPalette_Hondew},
|
||||
[ITEM_TO_BERRY(ITEM_GREPA_BERRY) - 1] = {gBerryPic_Grepa, gBerryPalette_Grepa},
|
||||
[ITEM_TO_BERRY(ITEM_TAMATO_BERRY) - 1] = {gBerryPic_Tamato, gBerryPalette_Tamato},
|
||||
[ITEM_TO_BERRY(ITEM_CORNN_BERRY) - 1] = {gBerryPic_Cornn, gBerryPalette_Cornn},
|
||||
[ITEM_TO_BERRY(ITEM_MAGOST_BERRY) - 1] = {gBerryPic_Magost, gBerryPalette_Magost},
|
||||
[ITEM_TO_BERRY(ITEM_RABUTA_BERRY) - 1] = {gBerryPic_Rabuta, gBerryPalette_Rabuta},
|
||||
[ITEM_TO_BERRY(ITEM_NOMEL_BERRY) - 1] = {gBerryPic_Nomel, gBerryPalette_Nomel},
|
||||
[ITEM_TO_BERRY(ITEM_SPELON_BERRY) - 1] = {gBerryPic_Spelon, gBerryPalette_Spelon},
|
||||
[ITEM_TO_BERRY(ITEM_PAMTRE_BERRY) - 1] = {gBerryPic_Pamtre, gBerryPalette_Pamtre},
|
||||
[ITEM_TO_BERRY(ITEM_WATMEL_BERRY) - 1] = {gBerryPic_Watmel, gBerryPalette_Watmel},
|
||||
[ITEM_TO_BERRY(ITEM_DURIN_BERRY) - 1] = {gBerryPic_Durin, gBerryPalette_Durin},
|
||||
[ITEM_TO_BERRY(ITEM_BELUE_BERRY) - 1] = {gBerryPic_Belue, gBerryPalette_Belue},
|
||||
[ITEM_TO_BERRY(ITEM_LIECHI_BERRY) - 1] = {gBerryPic_Liechi, gBerryPalette_Liechi},
|
||||
[ITEM_TO_BERRY(ITEM_GANLON_BERRY) - 1] = {gBerryPic_Ganlon, gBerryPalette_Ganlon},
|
||||
[ITEM_TO_BERRY(ITEM_SALAC_BERRY) - 1] = {gBerryPic_Salac, gBerryPalette_Salac},
|
||||
[ITEM_TO_BERRY(ITEM_PETAYA_BERRY) - 1] = {gBerryPic_Petaya, gBerryPalette_Petaya},
|
||||
[ITEM_TO_BERRY(ITEM_APICOT_BERRY) - 1] = {gBerryPic_Apicot, gBerryPalette_Apicot},
|
||||
[ITEM_TO_BERRY(ITEM_LANSAT_BERRY) - 1] = {gBerryPic_Lansat, gBerryPalette_Lansat},
|
||||
[ITEM_TO_BERRY(ITEM_STARF_BERRY) - 1] = {gBerryPic_Starf, gBerryPalette_Starf},
|
||||
[ITEM_TO_BERRY(ITEM_ENIGMA_BERRY) - 1] = {gBerryPic_Enigma, gBerryPalette_Enigma},
|
||||
};
|
||||
|
||||
const struct CompressedSpriteSheet gBerryCheckCircleSpriteSheet =
|
||||
@ -581,10 +581,10 @@ static void LoadBerryGfx(u8 berryId)
|
||||
// unknown empty if statement
|
||||
}
|
||||
|
||||
pal.data = gBerryPicTable[berryId].pal;
|
||||
pal.data = sBerryPicTable[berryId].pal;
|
||||
pal.tag = TAG_BERRY_PIC_PAL;
|
||||
LoadCompressedSpritePalette(&pal);
|
||||
LZDecompressWram(gBerryPicTable[berryId].tiles, &gDecompressionBuffer[0x1000]);
|
||||
LZDecompressWram(sBerryPicTable[berryId].tiles, &gDecompressionBuffer[0x1000]);
|
||||
sub_80D5018(&gDecompressionBuffer[0x1000], &gDecompressionBuffer[0]);
|
||||
}
|
||||
|
||||
@ -599,7 +599,8 @@ void FreeBerryTagSpritePalette(void)
|
||||
FreeSpritePaletteByTag(TAG_BERRY_PIC_PAL);
|
||||
}
|
||||
|
||||
u8 LoadSpinningBerryPicGfx(u8 berryId, u8 x, u8 y, bool8 startAffine)
|
||||
// For throwing berries into the Berry Blender
|
||||
u8 CreateSpinningBerrySprite(u8 berryId, u8 x, u8 y, bool8 startAffine)
|
||||
{
|
||||
u8 spriteId;
|
||||
|
||||
|
48
src/link.c
48
src/link.c
@ -99,7 +99,7 @@ u16 gLinkSavedIme;
|
||||
|
||||
EWRAM_DATA u8 gLinkTestDebugValuesEnabled = 0;
|
||||
EWRAM_DATA u8 gUnknown_020223BD = 0;
|
||||
EWRAM_DATA u32 gUnknown_020223C0 = 0;
|
||||
EWRAM_DATA u32 gBerryBlenderKeySendAttempts = 0;
|
||||
EWRAM_DATA u16 gBlockRecvBuffer[MAX_RFU_PLAYERS][BLOCK_BUFFER_SIZE / 2] = {};
|
||||
EWRAM_DATA u8 gBlockSendBuffer[BLOCK_BUFFER_SIZE] = {};
|
||||
EWRAM_DATA bool8 gLinkOpen = FALSE;
|
||||
@ -552,7 +552,7 @@ static void ProcessRecvCmds(u8 unused)
|
||||
InitBlockSend(block, sizeof(*block));
|
||||
break;
|
||||
}
|
||||
case LINKCMD_SEND_HELD_KEYS:
|
||||
case LINKCMD_BLENDER_SEND_KEYS:
|
||||
gLinkPartnersHeldKeys[i] = gRecvCmds[i][1];
|
||||
break;
|
||||
case LINKCMD_0x5555:
|
||||
@ -636,13 +636,13 @@ static void ProcessRecvCmds(u8 unused)
|
||||
case LINKCMD_READY_EXIT_STANDBY:
|
||||
gReadyToExitStandby[i] = TRUE;
|
||||
break;
|
||||
case LINKCMD_0xAAAA:
|
||||
sub_800A418();
|
||||
case LINKCMD_BLENDER_NO_PBLOCK_SPACE:
|
||||
SetBerryBlenderLinkCallback();
|
||||
break;
|
||||
case LINKCMD_SEND_BLOCK_REQ:
|
||||
SendBlock(0, sBlockRequests[gRecvCmds[i][1]].address, sBlockRequests[gRecvCmds[i][1]].size);
|
||||
break;
|
||||
case LINKCMD_SEND_HELD_KEYS_2:
|
||||
case LINKCMD_SEND_HELD_KEYS:
|
||||
gLinkPartnersHeldKeys[i] = gRecvCmds[i][1];
|
||||
break;
|
||||
}
|
||||
@ -660,8 +660,8 @@ static void BuildSendCmd(u16 command)
|
||||
case LINKCMD_READY_EXIT_STANDBY:
|
||||
gSendCmd[0] = LINKCMD_READY_EXIT_STANDBY;
|
||||
break;
|
||||
case LINKCMD_SEND_HELD_KEYS:
|
||||
gSendCmd[0] = LINKCMD_SEND_HELD_KEYS;
|
||||
case LINKCMD_BLENDER_SEND_KEYS:
|
||||
gSendCmd[0] = LINKCMD_BLENDER_SEND_KEYS;
|
||||
gSendCmd[1] = gMain.heldKeys;
|
||||
break;
|
||||
case LINKCMD_0x5555:
|
||||
@ -687,8 +687,8 @@ static void BuildSendCmd(u16 command)
|
||||
gSendCmd[1] = sBlockSend.size;
|
||||
gSendCmd[2] = sBlockSend.multiplayerId + 0x80;
|
||||
break;
|
||||
case LINKCMD_0xAAAA:
|
||||
gSendCmd[0] = LINKCMD_0xAAAA;
|
||||
case LINKCMD_BLENDER_NO_PBLOCK_SPACE:
|
||||
gSendCmd[0] = LINKCMD_BLENDER_NO_PBLOCK_SPACE;
|
||||
break;
|
||||
case LINKCMD_0xAAAB:
|
||||
gSendCmd[0] = LINKCMD_0xAAAB;
|
||||
@ -705,12 +705,12 @@ static void BuildSendCmd(u16 command)
|
||||
case LINKCMD_0x5566:
|
||||
gSendCmd[0] = LINKCMD_0x5566;
|
||||
break;
|
||||
case LINKCMD_SEND_HELD_KEYS_2:
|
||||
case LINKCMD_SEND_HELD_KEYS:
|
||||
if (gHeldKeyCodeToSend == 0 || gLinkTransferringData)
|
||||
{
|
||||
break;
|
||||
}
|
||||
gSendCmd[0] = LINKCMD_SEND_HELD_KEYS_2;
|
||||
gSendCmd[0] = LINKCMD_SEND_HELD_KEYS;
|
||||
gSendCmd[1] = gHeldKeyCodeToSend;
|
||||
break;
|
||||
}
|
||||
@ -738,7 +738,7 @@ bool32 IsSendingKeysToLink(void)
|
||||
static void LinkCB_SendHeldKeys(void)
|
||||
{
|
||||
if (gReceivedRemoteLinkPlayers == TRUE)
|
||||
BuildSendCmd(LINKCMD_SEND_HELD_KEYS_2);
|
||||
BuildSendCmd(LINKCMD_SEND_HELD_KEYS);
|
||||
}
|
||||
|
||||
void ClearLinkCallback(void)
|
||||
@ -1009,34 +1009,36 @@ static void LinkCB_BlockSendEnd(void)
|
||||
gLinkCallback = NULL;
|
||||
}
|
||||
|
||||
static void sub_800A3F8(void)
|
||||
static void LinkCB_BerryBlenderSendHeldKeys(void)
|
||||
{
|
||||
GetMultiplayerId();
|
||||
BuildSendCmd(LINKCMD_SEND_HELD_KEYS);
|
||||
gUnknown_020223C0++;
|
||||
BuildSendCmd(LINKCMD_BLENDER_SEND_KEYS);
|
||||
gBerryBlenderKeySendAttempts++;
|
||||
}
|
||||
|
||||
void sub_800A418(void)
|
||||
void SetBerryBlenderLinkCallback(void)
|
||||
{
|
||||
gUnknown_020223C0 = 0;
|
||||
gBerryBlenderKeySendAttempts = 0;
|
||||
if (gWirelessCommType)
|
||||
{
|
||||
sub_800F850();
|
||||
Rfu_SetBerryBlenderLinkCallback();
|
||||
}
|
||||
else
|
||||
{
|
||||
gLinkCallback = sub_800A3F8;
|
||||
gLinkCallback = LinkCB_BerryBlenderSendHeldKeys;
|
||||
}
|
||||
}
|
||||
|
||||
u32 sub_800A44C(void)
|
||||
// Unused
|
||||
static u32 GetBerryBlenderKeySendAttempts(void)
|
||||
{
|
||||
return gUnknown_020223C0;
|
||||
return gBerryBlenderKeySendAttempts;
|
||||
}
|
||||
|
||||
void sub_800A458(void)
|
||||
// Unused
|
||||
static void SendBerryBlenderNoSpaceForPokeblocks(void)
|
||||
{
|
||||
BuildSendCmd(LINKCMD_0xAAAA);
|
||||
BuildSendCmd(LINKCMD_BLENDER_NO_PBLOCK_SPACE);
|
||||
}
|
||||
|
||||
u8 GetMultiplayerId(void)
|
||||
|
104
src/link_rfu_2.c
104
src/link_rfu_2.c
@ -929,7 +929,7 @@ static void HandleSendFailure(u8 unused, u32 flags)
|
||||
{
|
||||
if (!(flags & 1))
|
||||
{
|
||||
sResendBlock16[0] = RFU_COMMAND_0x8900 | i;
|
||||
sResendBlock16[0] = RFUCMD_0x8900 | i;
|
||||
for (j = 0; j < 7; j++)
|
||||
{
|
||||
temp = j << 1;
|
||||
@ -984,7 +984,7 @@ static void RfuFunc_SendKeysToRfu(void)
|
||||
{
|
||||
sHeldKeyCount++;
|
||||
gHeldKeyCodeToSend |= (sHeldKeyCount << 8);
|
||||
RfuPrepareSendBuffer(RFU_COMMAND_0xBE00);
|
||||
RfuPrepareSendBuffer(RFUCMD_SEND_HELD_KEYS);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1008,18 +1008,18 @@ void ClearLinkRfuCallback(void)
|
||||
Rfu.callback = NULL;
|
||||
}
|
||||
|
||||
void sub_800F820(void)
|
||||
static void Rfu_BerryBlenderSendHeldKeys(void)
|
||||
{
|
||||
RfuPrepareSendBuffer(RFU_COMMAND_0x4400);
|
||||
RfuPrepareSendBuffer(RFUCMD_BLENDER_SEND_KEYS);
|
||||
if (GetMultiplayerId() == 0)
|
||||
gSendCmd[6] = GetBlenderArrowPosition();
|
||||
gUnknown_020223C0++;
|
||||
gSendCmd[BLENDER_COMM_ARROW_POS] = GetBlenderArrowPosition();
|
||||
gBerryBlenderKeySendAttempts++;
|
||||
}
|
||||
|
||||
void sub_800F850(void)
|
||||
void Rfu_SetBerryBlenderLinkCallback(void)
|
||||
{
|
||||
if (Rfu.callback == NULL)
|
||||
Rfu.callback = sub_800F820;
|
||||
Rfu.callback = Rfu_BerryBlenderSendHeldKeys;
|
||||
}
|
||||
|
||||
static void RfuHandleReceiveCommand(u8 unused)
|
||||
@ -1030,18 +1030,18 @@ static void RfuHandleReceiveCommand(u8 unused)
|
||||
{
|
||||
switch (gRecvCmds[i][0] & 0xff00)
|
||||
{
|
||||
case RFU_COMMAND_0x7800:
|
||||
case RFUCMD_0x7800:
|
||||
if (Rfu.parentChild == MODE_CHILD && gReceivedRemoteLinkPlayers)
|
||||
return;
|
||||
// fallthrough
|
||||
case RFU_COMMAND_0x7700:
|
||||
case RFUCMD_0x7700:
|
||||
if (gRfuLinkStatus->parentChild == MODE_CHILD)
|
||||
{
|
||||
Rfu.playerCount = gRecvCmds[i][1];
|
||||
Rfu.multiplayerId = sub_800F74C((u8 *)(&gRecvCmds[i][2]));
|
||||
}
|
||||
break;
|
||||
case RFU_COMMAND_0x8800:
|
||||
case RFUCMD_0x8800:
|
||||
if (Rfu.recvBlock[i].receiving == 0)
|
||||
{
|
||||
Rfu.recvBlock[i].next = 0;
|
||||
@ -1052,7 +1052,7 @@ static void RfuHandleReceiveCommand(u8 unused)
|
||||
Rfu.blockReceived[i] = FALSE;
|
||||
}
|
||||
break;
|
||||
case RFU_COMMAND_0x8900:
|
||||
case RFUCMD_0x8900:
|
||||
if (Rfu.recvBlock[i].receiving == 1)
|
||||
{
|
||||
Rfu.recvBlock[i].next = gRecvCmds[i][0] & 0xff;
|
||||
@ -1068,17 +1068,17 @@ static void RfuHandleReceiveCommand(u8 unused)
|
||||
}
|
||||
}
|
||||
break;
|
||||
case RFU_COMMAND_SEND_BLOCK_REQ:
|
||||
case RFUCMD_SEND_BLOCK_REQ:
|
||||
Rfu_InitBlockSend(sBlockRequests[gRecvCmds[i][1]].address, (u16)sBlockRequests[gRecvCmds[i][1]].size);
|
||||
break;
|
||||
case RFU_COMMAND_READY_CLOSE_LINK:
|
||||
case RFUCMD_READY_CLOSE_LINK:
|
||||
Rfu.readyCloseLink[i] = TRUE;
|
||||
break;
|
||||
case RFU_COMMAND_READY_EXIT_STANDBY:
|
||||
case RFUCMD_READY_EXIT_STANDBY:
|
||||
if (Rfu.unk_100 == gRecvCmds[i][1])
|
||||
Rfu.readyExitStandby[i] = TRUE;
|
||||
break;
|
||||
case RFU_COMMAND_0xED00:
|
||||
case RFUCMD_0xED00:
|
||||
if (Rfu.parentChild == MODE_CHILD)
|
||||
{
|
||||
if (gReceivedRemoteLinkPlayers)
|
||||
@ -1095,13 +1095,13 @@ static void RfuHandleReceiveCommand(u8 unused)
|
||||
}
|
||||
else
|
||||
{
|
||||
RfuPrepareSendBuffer(RFU_COMMAND_0xEE00);
|
||||
RfuPrepareSendBuffer(RFUCMD_0xEE00);
|
||||
gSendCmd[1] = gRecvCmds[i][1];
|
||||
gSendCmd[2] = gRecvCmds[i][2];
|
||||
gSendCmd[3] = gRecvCmds[i][3];
|
||||
}
|
||||
break;
|
||||
case RFU_COMMAND_0xEE00:
|
||||
case RFUCMD_0xEE00:
|
||||
if (Rfu.parentChild == MODE_PARENT)
|
||||
{
|
||||
Rfu.unk_ce3 |= gRecvCmds[i][1];
|
||||
@ -1109,8 +1109,8 @@ static void RfuHandleReceiveCommand(u8 unused)
|
||||
ClearSelectedLinkPlayerIds(gRecvCmds[i][1]);
|
||||
}
|
||||
break;
|
||||
case RFU_COMMAND_0x4400:
|
||||
case RFU_COMMAND_0xBE00:
|
||||
case RFUCMD_BLENDER_SEND_KEYS:
|
||||
case RFUCMD_SEND_HELD_KEYS:
|
||||
gLinkPartnersHeldKeys[i] = gRecvCmds[i][1];
|
||||
break;
|
||||
}
|
||||
@ -1186,16 +1186,16 @@ static void RfuPrepareSendBuffer(u16 command)
|
||||
gSendCmd[0] = command;
|
||||
switch (command)
|
||||
{
|
||||
case RFU_COMMAND_0x8800:
|
||||
case RFUCMD_0x8800:
|
||||
gSendCmd[1] = Rfu.sendBlock.count;
|
||||
gSendCmd[2] = Rfu.sendBlock.owner + 0x80;
|
||||
break;
|
||||
case RFU_COMMAND_SEND_BLOCK_REQ:
|
||||
case RFUCMD_SEND_BLOCK_REQ:
|
||||
if (AreNoPlayersReceiving())
|
||||
gSendCmd[1] = Rfu.blockRequestType;
|
||||
break;
|
||||
case RFU_COMMAND_0x7700:
|
||||
case RFU_COMMAND_0x7800:
|
||||
case RFUCMD_0x7700:
|
||||
case RFUCMD_0x7800:
|
||||
tmp = Rfu.unk_ce2 ^ Rfu.unk_ce3;
|
||||
Rfu.playerCount = sUnknown_082ED695[tmp] + 1;
|
||||
gSendCmd[1] = Rfu.playerCount;
|
||||
@ -1203,34 +1203,34 @@ static void RfuPrepareSendBuffer(u16 command)
|
||||
for (i = 0; i < RFU_CHILD_MAX; i++)
|
||||
buff[i] = Rfu.linkPlayerIdx[i];
|
||||
break;
|
||||
case RFU_COMMAND_READY_EXIT_STANDBY:
|
||||
case RFU_COMMAND_READY_CLOSE_LINK:
|
||||
case RFUCMD_READY_EXIT_STANDBY:
|
||||
case RFUCMD_READY_CLOSE_LINK:
|
||||
gSendCmd[1] = Rfu.unk_100;
|
||||
break;
|
||||
case RFU_COMMAND_0x4400:
|
||||
case RFUCMD_BLENDER_SEND_KEYS:
|
||||
gSendCmd[0] = command;
|
||||
gSendCmd[1] = gMain.heldKeys;
|
||||
break;
|
||||
case RFU_COMMAND_0x2F00:
|
||||
for (i = 0; i < 6; i++)
|
||||
gSendCmd[1 + i] = Rfu.unk_f2[i];
|
||||
case RFUCMD_SEND_PACKET:
|
||||
for (i = 0; i < RFU_PACKET_SIZE; i++)
|
||||
gSendCmd[1 + i] = Rfu.packet[i];
|
||||
break;
|
||||
case RFU_COMMAND_0xBE00:
|
||||
case RFUCMD_SEND_HELD_KEYS:
|
||||
gSendCmd[1] = gHeldKeyCodeToSend;
|
||||
break;
|
||||
case RFU_COMMAND_0xEE00:
|
||||
case RFUCMD_0xEE00:
|
||||
break;
|
||||
case RFU_COMMAND_0xED00:
|
||||
case RFUCMD_0xED00:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_800FE50(void *a0)
|
||||
void Rfu_SendPacket(void *data)
|
||||
{
|
||||
if (gSendCmd[0] == 0 && !RfuHasErrored())
|
||||
{
|
||||
memcpy(Rfu.unk_f2, a0, sizeof(Rfu.unk_f2));
|
||||
RfuPrepareSendBuffer(RFU_COMMAND_0x2F00);
|
||||
memcpy(Rfu.packet, data, sizeof(Rfu.packet));
|
||||
RfuPrepareSendBuffer(RFUCMD_SEND_PACKET);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1258,7 +1258,7 @@ bool32 Rfu_InitBlockSend(const u8 *src, size_t size)
|
||||
memcpy(gBlockSendBuffer, src, size);
|
||||
Rfu.sendBlock.payload = gBlockSendBuffer;
|
||||
}
|
||||
RfuPrepareSendBuffer(RFU_COMMAND_0x8800);
|
||||
RfuPrepareSendBuffer(RFUCMD_0x8800);
|
||||
Rfu.callback = HandleBlockSend;
|
||||
Rfu.unk_5b = 0;
|
||||
return TRUE;
|
||||
@ -1268,7 +1268,7 @@ static void HandleBlockSend(void)
|
||||
{
|
||||
if (gSendCmd[0] == 0)
|
||||
{
|
||||
RfuPrepareSendBuffer(RFU_COMMAND_0x8800);
|
||||
RfuPrepareSendBuffer(RFUCMD_0x8800);
|
||||
if (Rfu.parentChild == MODE_PARENT)
|
||||
{
|
||||
if (++Rfu.unk_5b > 2)
|
||||
@ -1276,7 +1276,7 @@ static void HandleBlockSend(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((gRecvCmds[GetMultiplayerId()][0] & 0xff00) == RFU_COMMAND_0x8800)
|
||||
if ((gRecvCmds[GetMultiplayerId()][0] & 0xff00) == RFUCMD_0x8800)
|
||||
Rfu.callback = SendNextBlock;
|
||||
}
|
||||
}
|
||||
@ -1286,7 +1286,7 @@ static void SendNextBlock(void)
|
||||
{
|
||||
s32 i;
|
||||
const u8 *src = Rfu.sendBlock.payload;
|
||||
gSendCmd[0] = RFU_COMMAND_0x8900 | Rfu.sendBlock.next;
|
||||
gSendCmd[0] = RFUCMD_0x8900 | Rfu.sendBlock.next;
|
||||
for (i = 0; i < CMD_LENGTH - 1; i++)
|
||||
gSendCmd[i + 1] = (src[(i << 1) + Rfu.sendBlock.next * 12 + 1] << 8) | src[(i << 1) + Rfu.sendBlock.next * 12 + 0];
|
||||
Rfu.sendBlock.next++;
|
||||
@ -1304,7 +1304,7 @@ static void SendLastBlock(void)
|
||||
s32 i;
|
||||
if (Rfu.parentChild == MODE_CHILD)
|
||||
{
|
||||
gSendCmd[0] = RFU_COMMAND_0x8900 | (Rfu.sendBlock.count - 1);
|
||||
gSendCmd[0] = RFUCMD_0x8900 | (Rfu.sendBlock.count - 1);
|
||||
for (i = 0; i < CMD_LENGTH - 1; i++)
|
||||
gSendCmd[i + 1] = (src[(i << 1) + (Rfu.sendBlock.count - 1) * 12 + 1] << 8) | src[(i << 1) + (Rfu.sendBlock.count - 1) * 12 + 0];
|
||||
if ((u8)gRecvCmds[mpId][0] == Rfu.sendBlock.count - 1)
|
||||
@ -1325,7 +1325,7 @@ static void SendLastBlock(void)
|
||||
bool8 Rfu_SendBlockRequest(u8 type)
|
||||
{
|
||||
Rfu.blockRequestType = type;
|
||||
RfuPrepareSendBuffer(RFU_COMMAND_SEND_BLOCK_REQ);
|
||||
RfuPrepareSendBuffer(RFUCMD_SEND_BLOCK_REQ);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -1394,7 +1394,7 @@ static void SendReadyCloseLink(void)
|
||||
{
|
||||
if (gSendCmd[0] == 0 && Rfu.unk_ce8 == 0)
|
||||
{
|
||||
RfuPrepareSendBuffer(RFU_COMMAND_READY_CLOSE_LINK);
|
||||
RfuPrepareSendBuffer(RFUCMD_READY_CLOSE_LINK);
|
||||
Rfu.callback = WaitAllReadyToCloseLink;
|
||||
}
|
||||
}
|
||||
@ -1421,7 +1421,7 @@ static void SendReadyExitStandbyUntilAllReady(void)
|
||||
|
||||
if (GetMultiplayerId() != 0 && Rfu.recvQueue.count == 0 && Rfu.resendExitStandbyTimer > 60)
|
||||
{
|
||||
RfuPrepareSendBuffer(RFU_COMMAND_READY_EXIT_STANDBY);
|
||||
RfuPrepareSendBuffer(RFUCMD_READY_EXIT_STANDBY);
|
||||
Rfu.resendExitStandbyTimer = 0;
|
||||
}
|
||||
playerCount = GetLinkPlayerCount();
|
||||
@ -1444,7 +1444,7 @@ static void LinkLeaderReadyToExitStandby(void)
|
||||
{
|
||||
if (Rfu.recvQueue.count == 0 && gSendCmd[0] == 0)
|
||||
{
|
||||
RfuPrepareSendBuffer(RFU_COMMAND_READY_EXIT_STANDBY);
|
||||
RfuPrepareSendBuffer(RFUCMD_READY_EXIT_STANDBY);
|
||||
Rfu.callback = SendReadyExitStandbyUntilAllReady;
|
||||
}
|
||||
}
|
||||
@ -1459,7 +1459,7 @@ static void Rfu_LinkStandby(void)
|
||||
// Not link leader, send exit standby when ready
|
||||
if (Rfu.recvQueue.count == 0 && gSendCmd[0] == 0)
|
||||
{
|
||||
RfuPrepareSendBuffer(RFU_COMMAND_READY_EXIT_STANDBY);
|
||||
RfuPrepareSendBuffer(RFUCMD_READY_EXIT_STANDBY);
|
||||
Rfu.callback = SendReadyExitStandbyUntilAllReady;
|
||||
}
|
||||
}
|
||||
@ -1476,7 +1476,7 @@ static void Rfu_LinkStandby(void)
|
||||
{
|
||||
if (Rfu.recvQueue.count == 0 && gSendCmd[0] == 0)
|
||||
{
|
||||
RfuPrepareSendBuffer(RFU_COMMAND_READY_EXIT_STANDBY);
|
||||
RfuPrepareSendBuffer(RFUCMD_READY_EXIT_STANDBY);
|
||||
Rfu.callback = LinkLeaderReadyToExitStandby;
|
||||
}
|
||||
}
|
||||
@ -1699,9 +1699,9 @@ static void sub_801084C(u8 taskId)
|
||||
if (Rfu.parentChild == MODE_PARENT)
|
||||
{
|
||||
if (gReceivedRemoteLinkPlayers)
|
||||
RfuPrepareSendBuffer(RFU_COMMAND_0x7800);
|
||||
RfuPrepareSendBuffer(RFUCMD_0x7800);
|
||||
else
|
||||
RfuPrepareSendBuffer(RFU_COMMAND_0x7700);
|
||||
RfuPrepareSendBuffer(RFUCMD_0x7700);
|
||||
gTasks[taskId].data[0] = 101;
|
||||
}
|
||||
else
|
||||
@ -1721,7 +1721,7 @@ static void sub_801084C(u8 taskId)
|
||||
if (AreNoPlayersReceiving())
|
||||
{
|
||||
Rfu.blockRequestType = 0;
|
||||
RfuPrepareSendBuffer(RFU_COMMAND_SEND_BLOCK_REQ);
|
||||
RfuPrepareSendBuffer(RFUCMD_SEND_BLOCK_REQ);
|
||||
gTasks[taskId].data[0]++;
|
||||
}
|
||||
}
|
||||
@ -1811,7 +1811,7 @@ static void Task_ExchangeLinkPlayers(u8 taskId)
|
||||
if (gSendCmd[0] == 0)
|
||||
{
|
||||
ResetBlockReceivedFlag(r4);
|
||||
RfuPrepareSendBuffer(RFU_COMMAND_0x7800);
|
||||
RfuPrepareSendBuffer(RFUCMD_0x7800);
|
||||
gTasks[taskId].data[0]++;
|
||||
}
|
||||
break;
|
||||
@ -2624,7 +2624,7 @@ static void sub_8011E2C(u8 taskId)
|
||||
{
|
||||
if (gSendCmd[0] == 0 && Rfu.unk_ce8 == 0)
|
||||
{
|
||||
RfuPrepareSendBuffer(RFU_COMMAND_0xED00);
|
||||
RfuPrepareSendBuffer(RFUCMD_0xED00);
|
||||
gSendCmd[1] = gTasks[taskId].data[0];
|
||||
gSendCmd[2] = gTasks[taskId].data[1];
|
||||
Rfu.playerCount -= sUnknown_082ED695[gTasks[taskId].data[0]];
|
||||
|
@ -262,15 +262,15 @@ static void sub_802EAB0(u8 taskId)
|
||||
|
||||
if (gReceivedRemoteLinkPlayers != 0)
|
||||
{
|
||||
if (gRecvCmds[0][1] == 0x7FFF)
|
||||
if (gRecvCmds[0][1] == LINKCMD_0x7FFF)
|
||||
data[11] = gRecvCmds[0][2];
|
||||
if (GetMultiplayerId() == 0)
|
||||
{
|
||||
data[12]++;
|
||||
memset(packet, 0, sizeof(packet));
|
||||
packet[0] = 0x7FFF;
|
||||
packet[0] = LINKCMD_0x7FFF;
|
||||
packet[1] = data[12];
|
||||
sub_800FE50(packet);
|
||||
Rfu_SendPacket(packet);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -180,21 +180,21 @@ static const struct BgTemplate sBgTemplatesForPokeblockMenu[] =
|
||||
|
||||
const u8 *const gPokeblockNames[] =
|
||||
{
|
||||
NULL,
|
||||
gText_RedPokeblock,
|
||||
gText_BluePokeblock,
|
||||
gText_PinkPokeblock,
|
||||
gText_GreenPokeblock,
|
||||
gText_YellowPokeblock,
|
||||
gText_PurplePokeblock,
|
||||
gText_IndigoPokeblock,
|
||||
gText_BrownPokeblock,
|
||||
gText_LiteBluePokeblock,
|
||||
gText_OlivePokeblock,
|
||||
gText_GrayPokeblock,
|
||||
gText_BlackPokeblock,
|
||||
gText_WhitePokeblock,
|
||||
gText_GoldPokeblock
|
||||
[PBLOCK_CLR_NONE] = NULL,
|
||||
[PBLOCK_CLR_RED] = gText_RedPokeblock,
|
||||
[PBLOCK_CLR_BLUE] = gText_BluePokeblock,
|
||||
[PBLOCK_CLR_PINK] = gText_PinkPokeblock,
|
||||
[PBLOCK_CLR_GREEN] = gText_GreenPokeblock,
|
||||
[PBLOCK_CLR_YELLOW] = gText_YellowPokeblock,
|
||||
[PBLOCK_CLR_PURPLE] = gText_PurplePokeblock,
|
||||
[PBLOCK_CLR_INDIGO] = gText_IndigoPokeblock,
|
||||
[PBLOCK_CLR_BROWN] = gText_BrownPokeblock,
|
||||
[PBLOCK_CLR_LITE_BLUE] = gText_LiteBluePokeblock,
|
||||
[PBLOCK_CLR_OLIVE] = gText_OlivePokeblock,
|
||||
[PBLOCK_CLR_GRAY] = gText_GrayPokeblock,
|
||||
[PBLOCK_CLR_BLACK] = gText_BlackPokeblock,
|
||||
[PBLOCK_CLR_WHITE] = gText_WhitePokeblock,
|
||||
[PBLOCK_CLR_GOLD] = gText_GoldPokeblock
|
||||
};
|
||||
|
||||
static const struct MenuAction sPokeblockMenuActions[] =
|
||||
@ -726,7 +726,7 @@ static void PutPokeblockListMenuString(u8 *dst, u16 pkblId)
|
||||
|
||||
*(txtPtr++) = EXT_CTRL_CODE_BEGIN;
|
||||
*(txtPtr++) = EXT_CTRL_CODE_SKIP;
|
||||
*(txtPtr++) = 87;
|
||||
*(txtPtr++) = CHAR_BLOCK_1;
|
||||
|
||||
ConvertIntToDecimalStringN(gStringVar1, GetHighestPokeblocksFlavorLevel(pkblock), STR_CONV_MODE_LEFT_ALIGN, 3);
|
||||
StringExpandPlaceholders(txtPtr, gText_LvVar1);
|
||||
@ -804,7 +804,7 @@ static void CompactPokeblockSlots(void)
|
||||
{
|
||||
for (j = i + 1; j < POKEBLOCKS_COUNT; j++)
|
||||
{
|
||||
if (gSaveBlock1Ptr->pokeblocks[i].color == 0)
|
||||
if (gSaveBlock1Ptr->pokeblocks[i].color == PBLOCK_CLR_NONE)
|
||||
{
|
||||
struct Pokeblock temp = gSaveBlock1Ptr->pokeblocks[i];
|
||||
gSaveBlock1Ptr->pokeblocks[i] = gSaveBlock1Ptr->pokeblocks[j];
|
||||
@ -856,7 +856,7 @@ static void SetMenuItemsCountAndMaxShowed(void)
|
||||
|
||||
for (sPokeblockMenu->itemsNo = 0, i = 0; i < POKEBLOCKS_COUNT; i++)
|
||||
{
|
||||
if (gSaveBlock1Ptr->pokeblocks[i].color != 0)
|
||||
if (gSaveBlock1Ptr->pokeblocks[i].color != PBLOCK_CLR_NONE)
|
||||
sPokeblockMenu->itemsNo++;
|
||||
}
|
||||
|
||||
@ -1322,7 +1322,7 @@ s8 GetFirstFreePokeblockSlot(void)
|
||||
|
||||
for (i = 0; i < POKEBLOCKS_COUNT; i++)
|
||||
{
|
||||
if (gSaveBlock1Ptr->pokeblocks[i].color == 0)
|
||||
if (gSaveBlock1Ptr->pokeblocks[i].color == PBLOCK_CLR_NONE)
|
||||
return i;
|
||||
}
|
||||
|
||||
@ -1346,7 +1346,7 @@ bool32 AddPokeblock(const struct Pokeblock *pokeblock)
|
||||
|
||||
bool32 TryClearPokeblock(u8 pkblId)
|
||||
{
|
||||
if (gSaveBlock1Ptr->pokeblocks[pkblId].color == 0)
|
||||
if (gSaveBlock1Ptr->pokeblocks[pkblId].color == PBLOCK_CLR_NONE)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -382,22 +382,23 @@ static const struct WindowTemplate sWindowTemplates[] =
|
||||
DUMMY_WIN_TEMPLATE
|
||||
};
|
||||
|
||||
// - 1 excludes PBLOCK_CLR_NONE
|
||||
static const u32* const sPokeblocksPals[] =
|
||||
{
|
||||
gPokeblockRed_Pal,
|
||||
gPokeblockBlue_Pal,
|
||||
gPokeblockPink_Pal,
|
||||
gPokeblockGreen_Pal,
|
||||
gPokeblockYellow_Pal,
|
||||
gPokeblockPurple_Pal,
|
||||
gPokeblockIndigo_Pal,
|
||||
gPokeblockBrown_Pal,
|
||||
gPokeblockLiteBlue_Pal,
|
||||
gPokeblockOlive_Pal,
|
||||
gPokeblockGray_Pal,
|
||||
gPokeblockBlack_Pal,
|
||||
gPokeblockWhite_Pal,
|
||||
gPokeblockGold_Pal
|
||||
[PBLOCK_CLR_RED - 1] = gPokeblockRed_Pal,
|
||||
[PBLOCK_CLR_BLUE - 1] = gPokeblockBlue_Pal,
|
||||
[PBLOCK_CLR_PINK - 1] = gPokeblockPink_Pal,
|
||||
[PBLOCK_CLR_GREEN - 1] = gPokeblockGreen_Pal,
|
||||
[PBLOCK_CLR_YELLOW - 1] = gPokeblockYellow_Pal,
|
||||
[PBLOCK_CLR_PURPLE - 1] = gPokeblockPurple_Pal,
|
||||
[PBLOCK_CLR_INDIGO - 1] = gPokeblockIndigo_Pal,
|
||||
[PBLOCK_CLR_BROWN - 1] = gPokeblockBrown_Pal,
|
||||
[PBLOCK_CLR_LITE_BLUE - 1] = gPokeblockLiteBlue_Pal,
|
||||
[PBLOCK_CLR_OLIVE - 1] = gPokeblockOlive_Pal,
|
||||
[PBLOCK_CLR_GRAY - 1] = gPokeblockGray_Pal,
|
||||
[PBLOCK_CLR_BLACK - 1] = gPokeblockBlack_Pal,
|
||||
[PBLOCK_CLR_WHITE - 1] = gPokeblockWhite_Pal,
|
||||
[PBLOCK_CLR_GOLD - 1] = gPokeblockGold_Pal
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd sSpriteAffineAnim_84120DC[] =
|
||||
|
@ -3684,14 +3684,14 @@ static void sub_802E0AC(struct PokemonJump1_MonInfo *arg0)
|
||||
packet.species = arg0->species,
|
||||
packet.otId = arg0->otId,
|
||||
packet.personality = arg0->personality,
|
||||
sub_800FE50(&packet);
|
||||
Rfu_SendPacket(&packet);
|
||||
}
|
||||
|
||||
static bool32 sub_802E0D0(int multiplayerId, struct PokemonJump1_MonInfo *arg0)
|
||||
{
|
||||
struct MonInfoPacket packet;
|
||||
|
||||
if ((gRecvCmds[multiplayerId][0] & 0xFF00) != 0x2F00)
|
||||
if ((gRecvCmds[multiplayerId][0] & 0xFF00) != RFUCMD_SEND_PACKET)
|
||||
return FALSE;
|
||||
|
||||
memcpy(&packet, &gRecvCmds[multiplayerId][1], sizeof(packet));
|
||||
@ -3718,7 +3718,7 @@ static void sub_802E120(u32 arg0)
|
||||
struct UnkPacket2 packet;
|
||||
packet.id = 2;
|
||||
packet.unk4 = arg0;
|
||||
sub_800FE50(&packet);
|
||||
Rfu_SendPacket(&packet);
|
||||
}
|
||||
|
||||
struct UnkPacket3
|
||||
@ -3746,14 +3746,14 @@ static void sub_802E138(struct PokemonJump1_82E4 *arg0, struct PokemonJump1Sub *
|
||||
packet.unk2 = arg0->unk10;
|
||||
packet.unk3_1 = arg0->unk14;
|
||||
packet.unk4 = arg0->unkE;
|
||||
sub_800FE50(&packet);
|
||||
Rfu_SendPacket(&packet);
|
||||
}
|
||||
|
||||
static bool32 sub_802E1BC(struct PokemonJump1_82E4 *arg0, struct PokemonJump1Sub *arg1)
|
||||
{
|
||||
struct UnkPacket3 packet;
|
||||
|
||||
if ((gRecvCmds[0][0] & 0xFF00) != 0x2F00)
|
||||
if ((gRecvCmds[0][0] & 0xFF00) != RFUCMD_SEND_PACKET)
|
||||
return FALSE;
|
||||
|
||||
memcpy(&packet, &gRecvCmds[0][1], sizeof(packet));
|
||||
@ -3792,14 +3792,14 @@ static void sub_802E234(struct PokemonJump1_82E4 *arg0, u8 arg1, u16 arg2)
|
||||
packet.unk4 = arg0->unkE;
|
||||
packet.unk6 = arg1;
|
||||
packet.unk8 = arg2;
|
||||
sub_800FE50(&packet);
|
||||
Rfu_SendPacket(&packet);
|
||||
}
|
||||
|
||||
static bool32 sub_802E264(struct PokemonJump1_82E4 *arg0, int multiplayerId, u8 *arg2, u16 *arg3)
|
||||
{
|
||||
struct UnkPacket4 packet;
|
||||
|
||||
if ((gRecvCmds[multiplayerId][0] & 0xFF00) != 0x2F00)
|
||||
if ((gRecvCmds[multiplayerId][0] & 0xFF00) != RFUCMD_SEND_PACKET)
|
||||
return FALSE;
|
||||
|
||||
memcpy(&packet, &gRecvCmds[multiplayerId][1], sizeof(packet));
|
||||
@ -3819,7 +3819,7 @@ static bool32 sub_802E2D0(struct PokemonJump1_82E4 *arg0, int multiplayerId)
|
||||
{
|
||||
struct UnkPacket4 packet;
|
||||
|
||||
if ((gRecvCmds[multiplayerId][0] & 0xFF00) != 0x2F00)
|
||||
if ((gRecvCmds[multiplayerId][0] & 0xFF00) != RFUCMD_SEND_PACKET)
|
||||
return FALSE;
|
||||
|
||||
memcpy(&packet, &gRecvCmds[multiplayerId][1], sizeof(packet));
|
||||
|
4
src/tv.c
4
src/tv.c
@ -1332,7 +1332,7 @@ void PutBattleUpdateOnTheAir(u8 opponentLinkPlayerId, u16 move, u16 speciesPlaye
|
||||
}
|
||||
}
|
||||
|
||||
bool8 Put3CheersForPokeblocksOnTheAir(const u8 *partnersName, u8 flavor, u8 unused, u8 sheen, u8 language)
|
||||
bool8 Put3CheersForPokeblocksOnTheAir(const u8 *partnersName, u8 flavor, u8 color, u8 sheen, u8 language)
|
||||
{
|
||||
TVShow *show;
|
||||
u8 name[32];
|
||||
@ -1355,7 +1355,7 @@ bool8 Put3CheersForPokeblocksOnTheAir(const u8 *partnersName, u8 flavor, u8 unus
|
||||
StripExtCtrlCodes(name);
|
||||
StringCopy(show->threeCheers.worstBlenderName, name);
|
||||
show->threeCheers.flavor = flavor;
|
||||
show->threeCheers.unk_03_3 = unused;
|
||||
show->threeCheers.color = color;
|
||||
show->threeCheers.sheen = sheen;
|
||||
tv_store_id_2x(show);
|
||||
show->threeCheers.language = gGameLanguage;
|
||||
|
@ -2677,7 +2677,7 @@ static void Task_RunUnionRoom(u8 taskId)
|
||||
if (input == -2 || input == IN_UNION_ROOM)
|
||||
{
|
||||
uroom->playerSendBuffer[0] = IN_UNION_ROOM;
|
||||
sub_800FE50(uroom->playerSendBuffer);
|
||||
Rfu_SendPacket(uroom->playerSendBuffer);
|
||||
StringCopy(gStringVar4, sIfYouWantToDoSomethingTexts[gLinkPlayers[0].gender]);
|
||||
uroom->state = UR_STATE_REQUEST_DECLINED;
|
||||
}
|
||||
@ -2692,7 +2692,7 @@ static void Task_RunUnionRoom(u8 taskId)
|
||||
else
|
||||
{
|
||||
uroom->playerSendBuffer[0] = gPlayerCurrActivity | IN_UNION_ROOM;
|
||||
sub_800FE50(uroom->playerSendBuffer);
|
||||
Rfu_SendPacket(uroom->playerSendBuffer);
|
||||
uroom->state = UR_STATE_SEND_ACTIVITY_REQUEST;
|
||||
}
|
||||
}
|
||||
@ -2721,7 +2721,7 @@ static void Task_RunUnionRoom(u8 taskId)
|
||||
uroom->playerSendBuffer[0] = ACTIVITY_TRADE | IN_UNION_ROOM;
|
||||
uroom->playerSendBuffer[1] = sUnionRoomTrade.species;
|
||||
uroom->playerSendBuffer[2] = sUnionRoomTrade.level;
|
||||
sub_800FE50(uroom->playerSendBuffer);
|
||||
Rfu_SendPacket(uroom->playerSendBuffer);
|
||||
uroom->state = UR_STATE_WAIT_FOR_RESPONSE_TO_REQUEST;
|
||||
break;
|
||||
case UR_STATE_WAIT_FOR_RESPONSE_TO_REQUEST:
|
||||
@ -2908,32 +2908,32 @@ static void Task_RunUnionRoom(u8 taskId)
|
||||
if (!HasAtLeastTwoMonsOfLevel30OrLower())
|
||||
{
|
||||
uroom->playerSendBuffer[0] = ACTIVITY_DECLINE | IN_UNION_ROOM;
|
||||
sub_800FE50(uroom->playerSendBuffer);
|
||||
Rfu_SendPacket(uroom->playerSendBuffer);
|
||||
uroom->state = UR_STATE_DECLINE_ACTIVITY_REQUEST;
|
||||
StringCopy(gStringVar4, sText_NeedTwoMonsOfLevel30OrLower2);
|
||||
}
|
||||
else
|
||||
{
|
||||
sub_800FE50(uroom->playerSendBuffer);
|
||||
Rfu_SendPacket(uroom->playerSendBuffer);
|
||||
uroom->state = UR_STATE_PRINT_START_ACTIVITY_MSG;
|
||||
}
|
||||
}
|
||||
else if (gPlayerCurrActivity == (ACTIVITY_CARD | IN_UNION_ROOM))
|
||||
{
|
||||
sub_800FE50(uroom->playerSendBuffer);
|
||||
Rfu_SendPacket(uroom->playerSendBuffer);
|
||||
ViewURoomPartnerTrainerCard(gStringVar4, uroom, TRUE);
|
||||
uroom->state = UR_STATE_PRINT_CARD_INFO;
|
||||
}
|
||||
else
|
||||
{
|
||||
sub_800FE50(uroom->playerSendBuffer);
|
||||
Rfu_SendPacket(uroom->playerSendBuffer);
|
||||
uroom->state = UR_STATE_PRINT_START_ACTIVITY_MSG;
|
||||
}
|
||||
break;
|
||||
case 1: // DECLINE
|
||||
case -1:
|
||||
uroom->playerSendBuffer[0] = ACTIVITY_DECLINE | IN_UNION_ROOM;
|
||||
sub_800FE50(uroom->playerSendBuffer);
|
||||
Rfu_SendPacket(uroom->playerSendBuffer);
|
||||
uroom->state = UR_STATE_DECLINE_ACTIVITY_REQUEST;
|
||||
GetYouDeclinedTheOfferMessage(gStringVar4, gPlayerCurrActivity);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user