Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finishing up journal documentation #320

Merged
merged 6 commits into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions include/applications/journal_display/journal_controller.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
#ifndef POKEPLATINUM_JOURNAL_CONTROLLER_H
#define POKEPLATINUM_JOURNAL_CONTROLLER_H

#include "bg_window.h"
#include "journal.h"
#include "message.h"
#include "overlay_manager.h"
#include "savedata.h"
#include "strbuf.h"
#include "string_template.h"
#include "trainer_info.h"

enum JournalState {
JOURNAL_STATE_OPEN = 0,
Expand All @@ -11,6 +18,29 @@ enum JournalState {
JOURNAL_STATE_CLOSE,
};

typedef struct JournalManager {
BgConfig *bgConfig;
Window window[4];
JournalEntry *journalEntry;
TrainerInfo *trainerInfo;
SaveData *saveData;
MessageLoader *loader;
StringTemplate *template;
Strbuf *strbuf;
u16 tilemapBuffer_5C[1024];
u16 tilemapBuffer_85C[1024];
s8 page;
u8 padding_105D;
s8 state;
s8 unk_105F;
s8 unk_1060;
u8 bgLayer1;
u8 bgLayer2;
u8 bgLayer3;
u8 bgLayer4;
u8 unused[3];
} JournalManager;

int JournalController_Init(OverlayManager *ovyManager, int *state);
int JournalController_Main(OverlayManager *ovyManager, int *state);
int JournalController_Exit(OverlayManager *ovyManager, int *state);
Expand Down
8 changes: 4 additions & 4 deletions include/applications/journal_display/journal_printer.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#ifndef POKEPLATINUM_JOURNAL_PRINTER_H
#define POKEPLATINUM_JOURNAL_PRINTER_H

#include "applications/journal_display/struct_ov81_021D1610.h"
#include "applications/journal_display/journal_controller.h"

void ov81_021D1610(UnkStruct_ov81_021D1610 *param0);
void ov81_021D1634(UnkStruct_ov81_021D1610 *param0);
void ov81_021D164C(UnkStruct_ov81_021D1610 *param0, u32 param1);
void JournalPrinter_AddWindows(JournalManager *param0);
void JournalPrinter_RemoveWindows(JournalManager *param0);
void JournalPrinter_PrintEntry(JournalManager *param0, u32 param1);

#endif // POKEPLATINUM_JOURNAL_PRINTER_H
35 changes: 0 additions & 35 deletions include/applications/journal_display/struct_ov81_021D1610.h

This file was deleted.

2 changes: 2 additions & 0 deletions include/journal.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#include "savedata.h"
#include "trainer_info.h"

#define MAX_JOURNAL_ENTRIES 10

#define POKEMON_CAUGHT 1
#define POKEMON_DEFEATED 2

Expand Down
Loading
Loading