Start documenting quest log

This commit is contained in:
GriffinR
2022-11-08 14:59:00 -05:00
parent 6a613b67b9
commit 78b07aace5
13 changed files with 247 additions and 239 deletions
+16 -10
View File
@@ -5,6 +5,12 @@
#define QL_STATE_PLAYBACK 2
#define QL_STATE_PLAYBACK_LAST 3
#define QL_PLAYBACK_STATE_0 0
#define QL_PLAYBACK_STATE_1 1
#define QL_PLAYBACK_STATE_2 2
#define QL_PLAYBACK_STATE_3 3
#define QL_PLAYBACK_STATE_4 4
#define QL_START_NORMAL 1
#define QL_START_WARP 2
@@ -128,17 +134,17 @@
#define QL_DEPARTED_MISC_BUILDING_1 8
#define QL_DEPARTED_MISC_BUILDING_2 9
#define QL_INPUT_OFF 0
#define QL_INPUT_UP 1
#define QL_INPUT_DOWN 2
#define QL_INPUT_LEFT 3
#define QL_INPUT_RIGHT 4
#define QL_INPUT_L 5
#define QL_INPUT_R 6
#define QL_INPUT_START 7
#define QL_INPUT_OFF 0
#define QL_INPUT_UP 1
#define QL_INPUT_DOWN 2
#define QL_INPUT_LEFT 3
#define QL_INPUT_RIGHT 4
#define QL_INPUT_L 5
#define QL_INPUT_R 6
#define QL_INPUT_START 7
#define QL_INPUT_SELECT 8
#define QL_INPUT_A 9
#define QL_INPUT_B 10
#define QL_INPUT_A 9
#define QL_INPUT_B 10
#define FANCLUB_MEMBER1 0
+13 -14
View File
@@ -550,7 +550,7 @@ struct RecordMixingDayCareMail
bool16 holdsItem[DAYCARE_MON_COUNT];
};
struct QuestLogNPCData
struct QuestLogObjectEventTemplate
{
u32 x:8;
u32 negx:1;
@@ -579,12 +579,12 @@ struct QuestLogObjectEvent
/*0x01*/ u8 spriteAffineAnimPausedBackup:1;
/*0x01*/ u8 disableJumpLandingGroundEffect:1;
/*0x02*/ u8 fixedPriority:1;
/*0x02*/ u8 mapobj_unk_18:4;
/*0x02*/ u8 unused_02_5:3;
/*0x03*/ u8 mapobj_unk_0B_0:4;
/*0x03*/ u8 elevation:4;
/*0x02*/ u8 facingDirection:4;
/*0x02*/ u8 unused:3;
/*0x03*/ u8 currentElevation:4;
/*0x03*/ u8 previousElevation:4;
/*0x04*/ u8 graphicsId;
/*0x05*/ u8 animPattern;
/*0x05*/ u8 movementType;
/*0x06*/ u8 trainerType;
/*0x07*/ u8 localId;
/*0x08*/ u8 mapNum;
@@ -597,21 +597,20 @@ struct QuestLogObjectEvent
/*0x11*/ u8 animId;
};
struct QuestLog
// This represents all the data needed to display a single scene for the "Quest Log" when the player resumes playing.
//
struct QuestLogScene
{
/*0x0000*/ u8 startType;
/*0x0000*/ u8 startType; // QL_START_NORMAL / QL_START_WARP
/*0x0001*/ u8 mapGroup;
/*0x0002*/ u8 mapNum;
/*0x0003*/ u8 warpId;
/*0x0004*/ s16 x;
/*0x0006*/ s16 y;
/*0x0008*/ struct QuestLogObjectEvent unk_008[OBJECT_EVENTS_COUNT];
// These arrays hold the game state for
// playing back the quest log
/*0x0008*/ struct QuestLogObjectEvent objectEvents[OBJECT_EVENTS_COUNT];
/*0x0148*/ u8 flags[NUM_FLAG_BYTES];
/*0x02c8*/ u16 vars[VARS_COUNT];
/*0x0468*/ struct QuestLogNPCData npcData[64];
/*0x0468*/ struct QuestLogObjectEventTemplate objectEventTemplates[OBJECT_EVENT_TEMPLATES_COUNT];
/*0x0568*/ u16 script[128];
/*0x0668*/ u16 end[0];
};
@@ -780,7 +779,7 @@ struct SaveBlock1
/*0x0EE0*/ u8 flags[NUM_FLAG_BYTES];
/*0x1000*/ u16 vars[VARS_COUNT];
/*0x1200*/ u32 gameStats[NUM_GAME_STATS];
/*0x1300*/ struct QuestLog questLog[QUEST_LOG_SCENE_COUNT];
/*0x1300*/ struct QuestLogScene questLog[QUEST_LOG_SCENE_COUNT];
/*0x2CA0*/ u16 easyChatProfile[EASY_CHAT_BATTLE_WORDS_COUNT];
/*0x2CAC*/ u16 easyChatBattleStart[EASY_CHAT_BATTLE_WORDS_COUNT];
/*0x2CB8*/ u16 easyChatBattleWon[EASY_CHAT_BATTLE_WORDS_COUNT];
+2 -2
View File
@@ -3,8 +3,8 @@
#include "global.h"
void SetQuestLogObjectEventsData(struct QuestLog *);
void SetSav1ObjectEventsFromQuestLog(struct QuestLog *, struct ObjectEventTemplate *);
void QL_RecordObjects(struct QuestLogScene *);
void QL_LoadObjects(struct QuestLogScene *, struct ObjectEventTemplate *);
void sub_815A540(void);
#endif //GUARD_QUEST_LOG_OBJECTS_H
+13 -9
View File
@@ -3,15 +3,19 @@
#include "global.h"
#define QL_PLAYER_GFX_NORMAL 0
#define QL_PLAYER_GFX_BIKE 1
#define QL_PLAYER_GFX_FISH 2
#define QL_PLAYER_GFX_SURF 3
#define QL_PLAYER_GFX_STOP_SURF_S 4
#define QL_PLAYER_GFX_STOP_SURF_N 5
#define QL_PLAYER_GFX_STOP_SURF_W 6
#define QL_PLAYER_GFX_STOP_SURF_E 7
#define QL_PLAYER_GFX_VSSEEKER 8
enum {
QL_PLAYER_GFX_NORMAL,
QL_PLAYER_GFX_BIKE,
QL_PLAYER_GFX_FISH,
QL_PLAYER_GFX_SURF,
QL_PLAYER_GFX_STOP_SURF_S,
QL_PLAYER_GFX_STOP_SURF_N,
QL_PLAYER_GFX_STOP_SURF_W,
QL_PLAYER_GFX_STOP_SURF_E,
QL_PLAYER_GFX_VSSEEKER,
QL_PLAYER_GFX_NONE = 0xFF
};
void QuestLogUpdatePlayerSprite(u8 state);
bool32 QuestLogTryRecordPlayerAvatarGfxTransition(u8 state);