mm/include/z64bombers_notebook.h
Anghelo Carvajal 4fa13e4132
Move libultra function declarations to libultra headers (#1196)
* Delete unused headers

* Move PR and io to ultra64

* move headers to ultra64

* more cleanups

* more reorganizing

* i think that should be all

* format

* ifdef guards cleanup

* Add IO_READ and IO_WRITE macros for future use

* warnings

* review

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>

* warnings again

* warn

* ifdef guards

* fix merge

* fix merge

* fix merge

* bss

* padutils.h

* bss

* bss

* bss

* fix merge

* bss

* bss

* bss

* fix merge

* fixes

* fixes

* bss

* bss

* fix merge

* fix

* fix

* fix includepaths

* fix paths

* bss

* fix

* ultra64/ -> PR/

* header guards

* fix ehader guards

* fix

* fix++

* format

* bss is borken

* prevent 2

* :despair:

* bss

* rename assert to dbg_hungup

* fix

* a

* fix

* bss

* fix

* bss

* bss

---------

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>
2023-09-02 15:34:29 -04:00

60 lines
2.0 KiB
C

#ifndef Z64BOMBERS_NOTEBOOK_H
#define Z64BOMBERS_NOTEBOOK_H
#include "ultra64.h"
#include "z64dma.h"
struct PlayState;
#define DEFINE_PERSON(enum, _photo, _description, _metEnum, _metMessage, _metFlag) enum,
typedef enum BombersNotebookPerson {
#include "tables/bombers_notebook/person_table.h"
/* 0x14 */ BOMBERS_NOTEBOOK_PERSON_MAX
} BombersNotebookPerson;
#undef DEFINE_PERSON
typedef enum BombersNotebookLoadState {
/* 0 */ BOMBERS_NOTEBOOK_LOAD_STATE_NONE,
/* 1 */ BOMBERS_NOTEBOOK_LOAD_STATE_STARTED,
/* 2 */ BOMBERS_NOTEBOOK_LOAD_STATE_DONE
} BombersNotebookLoadState;
#define DEFINE_PERSON(_enum, _photo, _description, metEnum, _metMessage, _metFlag) metEnum,
#define DEFINE_EVENT(enum, _icon, _colorFlag, _description, _completedMessage, _completedFlag) enum,
typedef enum BombersNotebookEvent {
#include "tables/bombers_notebook/person_table.h"
#include "tables/bombers_notebook/event_table.h"
/* 0x37 */ BOMBERS_NOTEBOOK_EVENT_MAX
} BombersNotebookEvent;
#undef DEFINE_PERSON
#undef DEFINE_EVENT
typedef struct {
/* 0x00 */ u8 loadState;
/* 0x01 */ UNK_TYPE1 pad01[0x3F];
/* 0x40 */ void* scheduleDmaSegment;
/* 0x44 */ uintptr_t scheduleDmaSegmentStart;
/* 0x48 */ size_t scheduleDmaSegmentSize;
/* 0x4C */ DmaRequest dmaRequest;
/* 0x6C */ OSMesgQueue loadQueue;
/* 0x84 */ OSMesg loadMsg[1];
/* 0x88 */ void* scheduleSegment;
/* 0x8C */ uintptr_t scheduleSegmentStart;
/* 0x90 */ size_t scheduleSegmentSize;
/* 0x94 */ s32 cursorPageRow;
/* 0x98 */ s32 cursorEntry; // Entries are 3 apart, see BOMBERS_NOTEBOOK_ENTRY_SIZE
/* 0x9C */ s32 cursorPage;
/* 0xA0 */ UNK_TYPE1 padA0[0x4];
/* 0xA4 */ s32 scrollAmount;
/* 0xA8 */ s32 scrollOffset;
} BombersNotebook; // size = 0xAC
void BombersNotebook_Draw(BombersNotebook* this, struct GraphicsContext* gfxCtx);
void BombersNotebook_Update(struct PlayState* play, BombersNotebook* this, Input* input);
void BombersNotebook_Init(BombersNotebook* this);
void BombersNotebook_Destroy(BombersNotebook* this);
#endif