Skip to content

Commit

Permalink
Merge pull request #320 from Viperio19/journal-documentation
Browse files Browse the repository at this point in the history
Finishing up journal documentation
  • Loading branch information
lhearachel authored Jan 2, 2025
2 parents 2f374fa + fb4265e commit 8693817
Show file tree
Hide file tree
Showing 7 changed files with 768 additions and 763 deletions.
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

0 comments on commit 8693817

Please sign in to comment.