From 75e39c574c06f05fb29fae3be894f09a22408520 Mon Sep 17 00:00:00 2001 From: farisawan-2000 Date: Fri, 18 Dec 2020 20:10:22 -0500 Subject: [PATCH] added more cool defines! --- config.h | 11 ++++++++--- s2d_cache.c | 3 +++ 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 s2d_cache.c diff --git a/config.h b/config.h index 1acb6416..6a47ec65 100644 --- a/config.h +++ b/config.h @@ -32,10 +32,15 @@ extern u32 s2d_timer; extern char *proutSprintf(char *dst, const char *src, size_t count); -// texture glyph width and height -#define TEX_WIDTH 16 -#define TEX_HEIGHT 16 +// tab glyph width and height #define TAB_WIDTH_H TEX_WIDTH * 2 #define TAB_WIDTH_V TEX_WIDTH / 2 +// 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))) + #endif \ No newline at end of file diff --git a/s2d_cache.c b/s2d_cache.c new file mode 100644 index 00000000..e45a8f64 --- /dev/null +++ b/s2d_cache.c @@ -0,0 +1,3 @@ +#include "init.h" +#include "config.h" +