From 072c36c5580a78d13797cd5096245a7802fa05bb Mon Sep 17 00:00:00 2001 From: MysterD Date: Sun, 2 Apr 2023 14:58:43 -0700 Subject: [PATCH] Fix build, add fonts to dynos packs --- Makefile.split | 1 + bin/custom_font.c | 4 ++-- data/dynos_mgr_builtin_tex.cpp | 7 +++++++ .../custom_font/custom_font_normal.rgba32.png | Bin 12119 -> 12120 bytes 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile.split b/Makefile.split index 77c633a0..09df6cd7 100644 --- a/Makefile.split +++ b/Makefile.split @@ -256,6 +256,7 @@ $(BUILD_DIR)/bin/machine.o: $(MACHINE_TEXTURES:%.png=$(BUILD_DIR)/%.in $(BUILD_DIR)/bin/mountain.o: $(MOUNTAIN_TEXTURES:%.png=$(BUILD_DIR)/%.inc.c) $(BUILD_DIR)/bin/grass.o: $(GRASS_TEXTURES:%.png=$(BUILD_DIR)/%.inc.c) $(BUILD_DIR)/bin/custom_font.o: $(CUSTOM_FONT_TEXTURES:%.png=$(BUILD_DIR)/%.inc.c) +$(BUILD_DIR)/bin/custom_textures.o: $(SEGMENT2_TEXTURES:%.png=$(BUILD_DIR)/%.inc.c) # Others $(BUILD_DIR)/bin/segment2.elf: SEGMENT_ADDRESS := 0x02000000 diff --git a/bin/custom_font.c b/bin/custom_font.c index fde078da..c4e05876 100644 --- a/bin/custom_font.c +++ b/bin/custom_font.c @@ -4,7 +4,7 @@ #include "make_const_nonconst.h" ALIGNED8 const u8 texture_font_normal[] = { -#include "textures/custom_font_title/custom_font_normal.rgba32.inc.c" +#include "textures/custom_font/custom_font_normal.rgba32.inc.c" }; const f32 font_normal_widths[] = { @@ -27,7 +27,7 @@ const f32 font_normal_widths[] = { ////////////////////////////////////////////////////////// ALIGNED8 const u8 texture_font_title[] = { -#include "textures/custom_font_title/custom_font_title.rgba32.inc.c" +#include "textures/custom_font/custom_font_title.rgba32.inc.c" }; const f32 font_title_widths[] = { diff --git a/data/dynos_mgr_builtin_tex.cpp b/data/dynos_mgr_builtin_tex.cpp index 80704e24..8d33dfbe 100644 --- a/data/dynos_mgr_builtin_tex.cpp +++ b/data/dynos_mgr_builtin_tex.cpp @@ -8,6 +8,9 @@ extern "C" { // Textures // ////////////// +extern ALIGNED8 const u8 texture_font_normal[]; +extern ALIGNED8 const u8 texture_font_title[]; + #define define_builtin_tex(_ptr, _path, _width, _height, _bitSize) { (const char*)#_ptr, (const void*)_ptr, (const char*)_path, _width, _height, _bitSize } #define define_builtin_tex_(_ptr, _path, _width, _height, _bitSize) { (const char*)#_ptr "_", (const void*)_ptr, (const char*)_path, _width, _height, _bitSize } @@ -1686,6 +1689,10 @@ static const struct BuiltinTexInfo sDynosBuiltinTexs[] = { define_builtin_tex(waluigi_custom_waluigi_eyes_right_unused_rgba16, "actors/waluigi/custom_waluigi_eyes_right_unused.rgba16.png", 64, 32, 16), define_builtin_tex(waluigi_custom_waluigi_eyes_up_unused_rgba16, "actors/waluigi/custom_waluigi_eyes_up_unused.rgba16.png", 64, 32, 16), define_builtin_tex(waluigi_custom_waluigi_eyes_down_unused_rgba16, "actors/waluigi/custom_waluigi_eyes_down_unused.rgba16.png", 64, 32, 16), + + // Fonts + define_builtin_tex(texture_font_normal, "textures/custom_font/custom_font_normal.rgba32.png", 512, 256, 32), + define_builtin_tex(texture_font_title, "textures/custom_font/custom_font_title.rgba32.png", 1024, 512, 32), }; const Texture* DynOS_Builtin_Tex_GetFromName(const char* aDataName) { diff --git a/textures/custom_font/custom_font_normal.rgba32.png b/textures/custom_font/custom_font_normal.rgba32.png index 56cbc15265cf3981fa9684f2a0564131b752091c..c4552460169513a823d80bc6c4a8778f61ecbf43 100644 GIT binary patch delta 395 zcmV;60d)S?Uf5ocB!6ycLqkw$V`BgSD3NuMJxjw-6o#MHilP+<6+|2|RB>oQ6vR>M z;8H}Yf>oC^ZCarpAxRN&6u)51STL~aP9bXR9j3eX)Uh=@Y6$tux>ckIwgpY*7whSnIt@LDtUleC5{Gr&Mk57SL_0%$T zoUCIbYv+ZBghTmU$*9hwz9g6~EX+ymliiO)oN1zHBq^~<4p(wnr68I8?;HO0%}^AN zA#aOyY;k1BihnmOYDv1LrJACr<;k(Ga{rsBV~&ngx(B1s{Ooz}1JJSy1aSqVLqS&>?hg!ueHAOYXtN7W6(^x~>08O|t!_32$f6k$|pSXj`si pRXykQ0p>U47u~@A0SwCh&Xpf7uV^2BLaEjO000SaNVA{;w=J$}!~_5U delta 395 zcmV;60d)S@Ue{ibB!6vbLqkw$V`BgSD3NuMyGz4R6vlsz7R3i0bWm~VpyJSiD2Suh zp-T~|3RYd3^d+P{%{*bt8) zZ;K+fIMQUq8-EbBAYGGEQ=%v3F)6Ct|K{nWCdRAXyF%c7aovw$XxoEw$#s8DT(^7* zEzfY3tNS-3r>QT|OLcAN2z=Xcab4H+eYo6#z9%bg$175cY%P_7_jBluLC+m@tX8wC popbgGi(B%GZsFh%M&!P4?H7SIXV3ZvNSpuw010qNS+k-6wk_@2#-acK