Clarify ql event data
This commit is contained in:
+1
-1
@@ -444,7 +444,7 @@ struct BattleStruct
|
||||
u16 castformPalette[MAX_BATTLERS_COUNT][16];
|
||||
u8 wishPerishSongState;
|
||||
u8 wishPerishSongBattlerId;
|
||||
u8 field_182;
|
||||
u8 lastAttackerToFaintOpponent;
|
||||
// align 4
|
||||
union {
|
||||
struct LinkBattlerHeader linkBattlerHeader;
|
||||
|
||||
@@ -62,11 +62,11 @@
|
||||
#define QL_EVENT_BOUGHT_ITEM 37
|
||||
#define QL_EVENT_SOLD_ITEM 38
|
||||
#define QL_EVENT_39 39 // Null
|
||||
#define QL_EVENT_OBTAINED_ITEM 40
|
||||
#define QL_EVENT_OBTAINED_STORY_ITEM 40
|
||||
#define QL_EVENT_41 41 // Null
|
||||
#define QL_EVENT_ARRIVED 42
|
||||
|
||||
#define QL_EVENT_USED_POKEMART QL_EVENT_BOUGHT_ITEM - 1 // Used as a start pos for QL_EVENT_BOUGHT_ITEM / QL_EVENT_SOLD_ITEM
|
||||
#define QL_EVENT_USED_POKEMART (QL_EVENT_BOUGHT_ITEM - 1) // Used as a start pos for QL_EVENT_BOUGHT_ITEM / QL_EVENT_SOLD_ITEM
|
||||
|
||||
#define IS_LINK_QL_EVENT(event)((event) >= QL_EVENT_LINK_TRADED && (event) <= QL_EVENT_LINK_BATTLED_UNION)
|
||||
#define IS_VALID_QL_EVENT(event)((event) >= QL_EVENT_SWITCHED_PARTY_ORDER && (event) <= QL_EVENT_ARRIVED)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "pokemon_storage_system.h"
|
||||
#include "mon_markings.h"
|
||||
#include "quest_log.h"
|
||||
|
||||
// The maximum number of Pokémon icons that can appear on-screen.
|
||||
// By default the limit is 40 (though in practice only 37 can be).
|
||||
@@ -273,14 +274,6 @@ struct PokeStorageItemIcon
|
||||
u8 active;
|
||||
};
|
||||
|
||||
struct PokeStorageQuestLogData
|
||||
{
|
||||
u16 species1;
|
||||
u16 species2;
|
||||
u8 box1;
|
||||
u8 box2;
|
||||
};
|
||||
|
||||
struct PokemonStorageSystemData
|
||||
{
|
||||
u8 state;
|
||||
@@ -426,7 +419,7 @@ struct PokemonStorageSystemData
|
||||
struct PokeStorageItemIcon itemIcons[MAX_ITEM_ICONS];
|
||||
u16 movingItemId;
|
||||
u16 itemInfoWindowOffset;
|
||||
struct PokeStorageQuestLogData pokeStorageQuestLogData;
|
||||
struct QuestLogEvent_MovedBoxMon questLogData;
|
||||
u16 unusedField2;
|
||||
u16 displayMonPalOffset;
|
||||
u16 *displayMonTilePtr;
|
||||
|
||||
+129
-2
@@ -3,8 +3,9 @@
|
||||
|
||||
#include "global.h"
|
||||
#include "quest_log_battle.h"
|
||||
#include "constants/quest_log.h"
|
||||
#include "field_control_avatar.h"
|
||||
#include "constants/quest_log.h"
|
||||
#include "constants/battle.h"
|
||||
|
||||
// Parameter to QuestLog_OnEscalatorWarp
|
||||
#define QL_ESCALATOR_OUT 1
|
||||
@@ -48,6 +49,132 @@ struct UnkStruct_203B044
|
||||
u16 unk_2;
|
||||
};
|
||||
|
||||
// Event data structs
|
||||
|
||||
// QL_EVENT_SWITCHED_PARTY_ORDER
|
||||
struct QuestLogEvent_SwitchedPartyOrder
|
||||
{
|
||||
u16 species1;
|
||||
u16 species2;
|
||||
};
|
||||
|
||||
// QL_EVENT_USED_ITEM
|
||||
// QL_EVENT_GAVE_HELD_ITEM
|
||||
// QL_EVENT_GAVE_HELD_ITEM_BAG
|
||||
// QL_EVENT_GAVE_HELD_ITEM_PC
|
||||
// QL_EVENT_TOOK_HELD_ITEM
|
||||
// QL_EVENT_DEPOSITED_ITEM_PC
|
||||
// QL_EVENT_WITHDREW_ITEM_PC
|
||||
struct QuestLogEvent_Item
|
||||
{
|
||||
u16 itemId;
|
||||
u16 unused;
|
||||
u16 species;
|
||||
u16 itemParam;
|
||||
};
|
||||
|
||||
// QL_EVENT_SWAPPED_HELD_ITEM
|
||||
// QL_EVENT_SWAPPED_HELD_ITEM_PC
|
||||
struct QuestLogEvent_SwappedHeldItem
|
||||
{
|
||||
u16 takenItemId;
|
||||
u16 givenItemId;
|
||||
u16 species;
|
||||
};
|
||||
|
||||
// QL_EVENT_LINK_TRADED
|
||||
// QL_EVENT_LINK_TRADED_UNION
|
||||
struct QuestLogEvent_Traded
|
||||
{
|
||||
u16 speciesSent;
|
||||
u16 speciesReceived;
|
||||
u8 partnerName[PLAYER_NAME_LENGTH];
|
||||
};
|
||||
|
||||
// QL_EVENT_LINK_BATTLED_SINGLE
|
||||
// QL_EVENT_LINK_BATTLED_DOUBLE
|
||||
// QL_EVENT_LINK_BATTLED_MULTI
|
||||
// QL_EVENT_LINK_BATTLED_UNION
|
||||
struct QuestLogEvent_LinkBattle
|
||||
{
|
||||
u8 outcome;
|
||||
u8 playerNames[MAX_BATTLERS_COUNT - 1][PLAYER_NAME_LENGTH];
|
||||
};
|
||||
|
||||
// QL_EVENT_SWITCHED_MONS_BETWEEN_BOXES
|
||||
// QL_EVENT_SWITCHED_MONS_WITHIN_BOX
|
||||
// QL_EVENT_SWITCHED_PARTY_MON_FOR_PC_MON
|
||||
// QL_EVENT_MOVED_MON_BETWEEN_BOXES
|
||||
// QL_EVENT_MOVED_MON_WITHIN_BOX
|
||||
// QL_EVENT_WITHDREW_MON_PC
|
||||
// QL_EVENT_DEPOSITED_MON_PC
|
||||
// QL_EVENT_SWITCHED_MULTIPLE_MONS
|
||||
struct QuestLogEvent_MovedBoxMon
|
||||
{
|
||||
u16 species1;
|
||||
u16 species2;
|
||||
u8 box1;
|
||||
u8 box2;
|
||||
};
|
||||
|
||||
// QL_EVENT_DEFEATED_TRAINER
|
||||
// QL_EVENT_DEFEATED_GYM_LEADER
|
||||
// QL_EVENT_DEFEATED_E4_MEMBER
|
||||
// QL_EVENT_DEFEATED_CHAMPION
|
||||
struct QuestLogEvent_TrainerBattle
|
||||
{
|
||||
u16 trainerId;
|
||||
u16 speciesOpponent;
|
||||
u16 speciesPlayer;
|
||||
u8 hpFractionId;
|
||||
u8 mapSec;
|
||||
};
|
||||
|
||||
// QL_EVENT_DEFEATED_WILD_MON
|
||||
struct QuestLogEvent_WildBattle
|
||||
{
|
||||
u16 defeatedSpecies;
|
||||
u16 caughtSpecies;
|
||||
u8 mapSec;
|
||||
};
|
||||
|
||||
// QL_EVENT_DEPARTED
|
||||
struct QuestLogEvent_Departed
|
||||
{
|
||||
u8 mapSec;
|
||||
u8 locationId;
|
||||
};
|
||||
|
||||
// QL_EVENT_USED_FIELD_MOVE
|
||||
struct QuestLogEvent_FieldMove
|
||||
{
|
||||
u16 species;
|
||||
u8 fieldMove;
|
||||
u8 mapSec;
|
||||
};
|
||||
|
||||
// QL_EVENT_BOUGHT_ITEM
|
||||
// QL_EVENT_SOLD_ITEM
|
||||
struct QuestLogEvent_Shop
|
||||
{
|
||||
u32 totalMoney; // Total amount of money spent buying or earned selling
|
||||
u16 lastItemId;
|
||||
u16 itemQuantity; // Total number of items bought or sold
|
||||
u8 mapSec;
|
||||
bool8 hasMultipleTransactions;
|
||||
u8 logEventId; // Either 0 (empty), 1 (bought) or 2 (sold)
|
||||
};
|
||||
|
||||
// QL_EVENT_OBTAINED_STORY_ITEM
|
||||
struct QuestLogEvent_StoryItem
|
||||
{
|
||||
u16 itemId;
|
||||
u8 mapSec;
|
||||
};
|
||||
|
||||
//
|
||||
|
||||
|
||||
extern u8 gQuestLogState;
|
||||
extern u8 gQuestLogPlaybackState;
|
||||
extern struct FieldInput gQuestLogFieldInput;
|
||||
@@ -94,7 +221,7 @@ void sub_8112B3C(void);
|
||||
void RunQuestLogCB(void);
|
||||
void sub_8111C68(void);
|
||||
bool8 QuestLogScenePlaybackIsEnding(void);
|
||||
void sub_8115798(void);
|
||||
void SetQuestLogEvent_Arrived(void);
|
||||
bool8 QuestLog_ShouldEndSceneOnMapChange(void);
|
||||
void QuestLog_AdvancePlayhead_(void);
|
||||
void QuestLog_InitPalettesBackup(void);
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ void CreatePokemartMenu(const u16 *itemsForSale);
|
||||
void CreateDecorationShop1Menu(const u16 *);
|
||||
void CreateDecorationShop2Menu(const u16 *);
|
||||
u8 GetMartFontId(void);
|
||||
void RecordItemPurchase(u16 a0, u16 a1, u8 a2);
|
||||
void RecordItemTransaction(u16 itemId, u16 quantity, u8 logEventId);
|
||||
|
||||
// buy_menu_helper
|
||||
void BuyMenuInitWindows(bool32 isSellingTM);
|
||||
|
||||
Reference in New Issue
Block a user