2020-12-11 21:47:11 -05:00
|
|
|
#ifndef S2D_CONFIG_H
|
|
|
|
|
#define S2D_CONFIG_H
|
|
|
|
|
|
2020-12-15 23:10:28 -05:00
|
|
|
#define const
|
|
|
|
|
|
2020-12-11 21:47:11 -05:00
|
|
|
// include your font header here
|
|
|
|
|
#include "fonts/impact.h"
|
|
|
|
|
|
2020-12-13 18:31:42 -05:00
|
|
|
// get your font symbols defined here
|
2020-12-28 13:27:53 -05:00
|
|
|
#define s2d_font impact_obj
|
|
|
|
|
#define s2d_tex impact_tex
|
|
|
|
|
#define s2d_kerning_table impact_kerning_table
|
|
|
|
|
extern char s2d_kerning_table[];
|
2020-12-11 21:47:11 -05:00
|
|
|
|
|
|
|
|
// Debug: bypass custom matrix setup
|
|
|
|
|
#define s2d_mat impact_mtx
|
|
|
|
|
|
2020-12-13 18:31:42 -05:00
|
|
|
// Homebrew users: use this to rename your gdl head
|
2020-12-11 21:47:11 -05:00
|
|
|
#define gdl_head gDisplayListHead
|
|
|
|
|
extern Gfx *gdl_head;
|
|
|
|
|
|
2020-12-15 23:06:09 -05:00
|
|
|
|
|
|
|
|
// Other games/Homebrew users: change these values
|
|
|
|
|
|
|
|
|
|
// an allocator function of the format void *alloc(size_t bytes)
|
2020-12-13 18:31:42 -05:00
|
|
|
#define alloc alloc_display_list
|
|
|
|
|
|
2020-12-15 17:46:07 -05:00
|
|
|
// The frame timer that is used to time s2d_type_print
|
|
|
|
|
#define s2d_timer gGlobalTimer
|
2020-12-16 18:06:46 -05:00
|
|
|
extern u32 s2d_timer;
|
2020-12-15 17:46:07 -05:00
|
|
|
|
2020-12-15 22:57:04 -05:00
|
|
|
// The equivalent vsprintf in your game (defaults to libultra _Printf)
|
2020-12-16 00:57:28 -05:00
|
|
|
#define vsprintf(dst, str, fmt, args) _Printf(proutSprintf, dst, fmt, args)
|
|
|
|
|
extern char *proutSprintf(char *dst, const char *src, size_t count);
|
2020-12-15 22:57:04 -05:00
|
|
|
|
2020-12-15 23:06:09 -05:00
|
|
|
|
2020-12-18 20:10:22 -05:00
|
|
|
// tab glyph width and height
|
2020-12-15 23:36:40 -05:00
|
|
|
#define TAB_WIDTH_H TEX_WIDTH * 2
|
|
|
|
|
#define TAB_WIDTH_V TEX_WIDTH / 2
|
2020-12-15 23:06:09 -05:00
|
|
|
|
2020-12-18 20:10:22 -05:00
|
|
|
// Set these to optimize s2d texture "cache"
|
|
|
|
|
#define TEX_WIDTH 16
|
|
|
|
|
#define TEX_HEIGHT 16
|
|
|
|
|
#define TEX_BITDEPTH 8
|
|
|
|
|
|
|
|
|
|
#define _NUM_CACHE (4096 / (TEX_WIDTH * TEX_HEIGHT * (TEX_BITDEPTH / 8)))
|
|
|
|
|
|
2020-12-11 21:47:11 -05:00
|
|
|
#endif
|