Skip to content
Open
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
11 changes: 11 additions & 0 deletions src/boot/libu64/gfxprint.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "libu64/gfxprint.h"
#include "attributes.h"
#include "macros.h"

#define GFXP_FLAG_HIRAGANA (1 << 0)
#define GFXP_FLAG_RAINBOW (1 << 1)
Expand All @@ -8,6 +9,14 @@
#define GFXP_FLAG_ENLARGE (1 << 6)
#define GFXP_FLAG_OPEN (1 << 7)

#if MM_VERSION < N64_US || DEBUG_FEATURES
#define GFXPRINT_PRINTF osSyncPrintf
#elif IDO_PRINTF_WORKAROUND
#define GFXPRINT_PRINTF(args) (void)0
#else
#define GFXPRINT_PRINTF(format, ...) (void)0
#endif
Comment on lines +12 to +18

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be becoming a pattern. Maybe we should move this to a header?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't be opposed, though will admit not quite sure what to call it so as to not conflict with the original PRINTF that keeps the strings, but not the osSyncPrintf call. Would you have any suggestion?


u64 sGfxPrintFontTLUT[] = {
#include "assets/boot/gfxprint/gfx_print_font_tlut.rgba16.inc.c"
};
Expand Down Expand Up @@ -225,6 +234,8 @@ void GfxPrint_Open(GfxPrint* this, Gfx* dList) {
this->flags |= GFXP_FLAG_OPEN;
this->dList = dList;
GfxPrint_Setup(this);
} else {
GFXPRINT_PRINTF(T("gfxprint_open:2重オープンです\n", "gfxprint_open: Double open\n"));
}
}

Expand Down