Text rendering optimizations + resolution increase on normal font

Increased resolution of normal font 2x
Combined all normal font characters into a sprite sheet
Adjusted kerning on normal font
Removed 'rotatedUV' setting for DJUI fonts
This commit is contained in:
MysterD 2023-04-02 13:16:32 -07:00
parent e578943700
commit 68346eecf1
101 changed files with 159 additions and 724 deletions

View file

@ -3511,535 +3511,25 @@ const s16 seg2_painting_mesh_neighbor_tris[] = {
////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////
ALIGNED8 static const u8 texture_font_normal_char_03[] = {
#include "textures/segment2/custom_font_normal_char_03.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_04[] = {
#include "textures/segment2/custom_font_normal_char_04.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_10[] = {
#include "textures/segment2/custom_font_normal_char_10.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_11[] = {
#include "textures/segment2/custom_font_normal_char_11.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_15[] = {
#include "textures/segment2/custom_font_normal_char_15.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_26[] = {
#include "textures/segment2/custom_font_normal_char_26.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_27[] = {
#include "textures/segment2/custom_font_normal_char_27.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_28[] = {
#include "textures/segment2/custom_font_normal_char_28.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_29[] = {
#include "textures/segment2/custom_font_normal_char_29.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_30[] = {
#include "textures/segment2/custom_font_normal_char_30.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_32[] = {
#include "textures/segment2/custom_font_normal_char_32.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_59[] = {
#include "textures/segment2/custom_font_normal_char_59.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_60[] = {
#include "textures/segment2/custom_font_normal_char_60.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_61[] = {
#include "textures/segment2/custom_font_normal_char_61.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_62[] = {
#include "textures/segment2/custom_font_normal_char_62.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_63[] = {
#include "textures/segment2/custom_font_normal_char_63.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_64[] = {
#include "textures/segment2/custom_font_normal_char_64.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_91[] = {
#include "textures/segment2/custom_font_normal_char_91.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_92[] = {
#include "textures/segment2/custom_font_normal_char_92.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_93[] = {
#include "textures/segment2/custom_font_normal_char_93.ia4.inc.c"
};
// extended
ALIGNED8 static const u8 texture_font_normal_char_ca_a[] = {
#include "textures/segment2/custom_font_normal_char_ca_a.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_ca_ang[] = {
#include "textures/segment2/custom_font_normal_char_ca_ang.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_ca_c[] = {
#include "textures/segment2/custom_font_normal_char_ca_c.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_ca_g[] = {
#include "textures/segment2/custom_font_normal_char_ca_g.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_ca_t[] = {
#include "textures/segment2/custom_font_normal_char_ca_t.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_ca_u[] = {
#include "textures/segment2/custom_font_normal_char_ca_u.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_cc_ced[] = {
#include "textures/segment2/custom_font_normal_char_cc_ced.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_ce_a[] = {
#include "textures/segment2/custom_font_normal_char_ce_a.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_ce_c[] = {
#include "textures/segment2/custom_font_normal_char_ce_c.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_ce_g[] = {
#include "textures/segment2/custom_font_normal_char_ce_g.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_ce_u[] = {
#include "textures/segment2/custom_font_normal_char_ce_u.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_ci_a[] = {
#include "textures/segment2/custom_font_normal_char_ci_a.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_ci_c[] = {
#include "textures/segment2/custom_font_normal_char_ci_c.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_ci_g[] = {
#include "textures/segment2/custom_font_normal_char_ci_g.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_ci_u[] = {
#include "textures/segment2/custom_font_normal_char_ci_u.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_cn_t[] = {
#include "textures/segment2/custom_font_normal_char_cn_t.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_co_a[] = {
#include "textures/segment2/custom_font_normal_char_co_a.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_co_c[] = {
#include "textures/segment2/custom_font_normal_char_co_c.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_co_g[] = {
#include "textures/segment2/custom_font_normal_char_co_g.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_co_u[] = {
#include "textures/segment2/custom_font_normal_char_co_u.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_co_t[] = {
#include "textures/segment2/custom_font_normal_char_co_t.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_cu_a[] = {
#include "textures/segment2/custom_font_normal_char_cu_a.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_cu_c[] = {
#include "textures/segment2/custom_font_normal_char_cu_c.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_cu_g[] = {
#include "textures/segment2/custom_font_normal_char_cu_g.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_cu_u[] = {
#include "textures/segment2/custom_font_normal_char_cu_u.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_cy_a[] = {
#include "textures/segment2/custom_font_normal_char_cy_a.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_cy_u[] = {
#include "textures/segment2/custom_font_normal_char_cy_u.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_la_a[] = {
#include "textures/segment2/custom_font_normal_char_la_a.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_la_ang[] = {
#include "textures/segment2/custom_font_normal_char_la_ang.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_la_c[] = {
#include "textures/segment2/custom_font_normal_char_la_c.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_la_g[] = {
#include "textures/segment2/custom_font_normal_char_la_g.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_la_t[] = {
#include "textures/segment2/custom_font_normal_char_la_t.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_la_u[] = {
#include "textures/segment2/custom_font_normal_char_la_u.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_lc_ced[] = {
#include "textures/segment2/custom_font_normal_char_lc_ced.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_le_a[] = {
#include "textures/segment2/custom_font_normal_char_le_a.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_le_c[] = {
#include "textures/segment2/custom_font_normal_char_le_c.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_le_g[] = {
#include "textures/segment2/custom_font_normal_char_le_g.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_le_u[] = {
#include "textures/segment2/custom_font_normal_char_le_u.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_li_a[] = {
#include "textures/segment2/custom_font_normal_char_li_a.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_li_c[] = {
#include "textures/segment2/custom_font_normal_char_li_c.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_li_g[] = {
#include "textures/segment2/custom_font_normal_char_li_g.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_li_u[] = {
#include "textures/segment2/custom_font_normal_char_li_u.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_ln_t[] = {
#include "textures/segment2/custom_font_normal_char_ln_t.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_lo_a[] = {
#include "textures/segment2/custom_font_normal_char_lo_a.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_lo_c[] = {
#include "textures/segment2/custom_font_normal_char_lo_c.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_lo_g[] = {
#include "textures/segment2/custom_font_normal_char_lo_g.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_lo_u[] = {
#include "textures/segment2/custom_font_normal_char_lo_u.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_lo_t[] = {
#include "textures/segment2/custom_font_normal_char_lo_t.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_lu_a[] = {
#include "textures/segment2/custom_font_normal_char_lu_a.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_lu_c[] = {
#include "textures/segment2/custom_font_normal_char_lu_c.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_lu_g[] = {
#include "textures/segment2/custom_font_normal_char_lu_g.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_lu_u[] = {
#include "textures/segment2/custom_font_normal_char_lu_u.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_ly_a[] = {
#include "textures/segment2/custom_font_normal_char_ly_a.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_ly_u[] = {
#include "textures/segment2/custom_font_normal_char_ly_u.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_lae[] = {
#include "textures/segment2/custom_font_normal_char_lae.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_cae[] = {
#include "textures/segment2/custom_font_normal_char_cae.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_loe[] = {
#include "textures/segment2/custom_font_normal_char_loe.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_coe[] = {
#include "textures/segment2/custom_font_normal_char_coe.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_leth[] = {
#include "textures/segment2/custom_font_normal_char_leth.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_ceth[] = {
#include "textures/segment2/custom_font_normal_char_ceth.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_los[] = {
#include "textures/segment2/custom_font_normal_char_los.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_cos[] = {
#include "textures/segment2/custom_font_normal_char_cos.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_ss[] = {
#include "textures/segment2/custom_font_normal_char_ss.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_punc_sp_ex[] = {
#include "textures/segment2/custom_font_normal_char_punc_sp_ex.ia4.inc.c"
};
ALIGNED8 static const u8 texture_font_normal_char_punc_sp_qu[] = {
#include "textures/segment2/custom_font_normal_char_punc_sp_qu.ia4.inc.c"
};
ALIGNED8 const u8 texture_font_normal[] = { ALIGNED8 const u8 texture_font_normal[] = {
#include "textures/custom_font_title/custom_font_normal.rgba32.inc.c" #include "textures/custom_font_title/custom_font_normal.rgba32.inc.c"
}; };
const u8* const font_normal_chars[] = {
texture_font_char_us_exclamation, // !
texture_font_char_us_double_quote_open, // "
texture_font_normal_char_03, // #
texture_font_normal_char_04, // $
texture_font_char_us_percent, // %
texture_font_char_us_ampersand, // &
texture_font_char_us_apostrophe, // '
texture_font_char_us_open_parentheses, // (
texture_font_char_us_close_parentheses, // )
texture_font_normal_char_10, // *
texture_font_normal_char_11, // +
texture_font_char_us_comma, // ,
texture_font_char_us_slash, // -
texture_font_char_us_period, // .
texture_font_normal_char_15, // /
texture_font_char_us_0, // 0
texture_font_char_us_1, // 1
texture_font_char_us_2, // 2
texture_font_char_us_3, // 3
texture_font_char_us_4, // 4
texture_font_char_us_5, // 5
texture_font_char_us_6, // 6
texture_font_char_us_7, // 7
texture_font_char_us_8, // 8
texture_font_char_us_9, // 9
texture_font_normal_char_26, // :
texture_font_normal_char_27, // ;
texture_font_normal_char_28, // <
texture_font_normal_char_29, // =
texture_font_normal_char_30, // >
texture_font_char_us_question, // ?
texture_font_normal_char_32, // @
texture_font_char_us_A, // A
texture_font_char_us_B, // B
texture_font_char_us_C, // C
texture_font_char_us_D, // D
texture_font_char_us_E, // E
texture_font_char_us_F, // F
texture_font_char_us_G, // G
texture_font_char_us_H, // H
texture_font_char_us_I, // I
texture_font_char_us_J, // J
texture_font_char_us_K, // K
texture_font_char_us_L, // L
texture_font_char_us_M, // M
texture_font_char_us_N, // N
texture_font_char_us_O, // O
texture_font_char_us_P, // P
texture_font_char_us_Q, // Q
texture_font_char_us_R, // R
texture_font_char_us_S, // S
texture_font_char_us_T, // T
texture_font_char_us_U, // U
texture_font_char_us_V, // V
texture_font_char_us_W, // W
texture_font_char_us_X, // X
texture_font_char_us_Y, // Y
texture_font_char_us_Z, // Z
texture_font_normal_char_59, // [
texture_font_normal_char_60, // \ //
texture_font_normal_char_61, // ]
texture_font_normal_char_62, // ^
texture_font_normal_char_63, // _
texture_font_normal_char_64, // `
texture_font_char_us_a, // a
texture_font_char_us_b, // b
texture_font_char_us_c, // c
texture_font_char_us_d, // d
texture_font_char_us_e, // e
texture_font_char_us_f, // f
texture_font_char_us_g, // g
texture_font_char_us_h, // h
texture_font_char_us_i, // i
texture_font_char_us_j, // j
texture_font_char_us_k, // k
texture_font_char_us_l, // l
texture_font_char_us_m, // m
texture_font_char_us_n, // n
texture_font_char_us_o, // o
texture_font_char_us_p, // p
texture_font_char_us_q, // q
texture_font_char_us_r, // r
texture_font_char_us_s, // s
texture_font_char_us_t, // t
texture_font_char_us_u, // u
texture_font_char_us_v, // v
texture_font_char_us_w, // w
texture_font_char_us_x, // x
texture_font_char_us_y, // y
texture_font_char_us_z, // z
texture_font_normal_char_91, // {
texture_font_normal_char_92, // |
texture_font_normal_char_93, // }
texture_font_char_us_tilde, // ~
texture_font_char_us_star_filled, // DEL
texture_font_normal_char_ca_a, // Á
texture_font_normal_char_ca_ang, // Å
texture_font_normal_char_ca_c, // Â
texture_font_normal_char_ca_g, // À
texture_font_normal_char_ca_t, // Ã
texture_font_normal_char_ca_u, // Ä
texture_font_normal_char_cc_ced, // Ç
texture_font_normal_char_ce_a, // É
texture_font_normal_char_ce_c, // Ê
texture_font_normal_char_ce_g, // È
texture_font_normal_char_ce_u, // Ë
texture_font_normal_char_ci_a, // Í
texture_font_normal_char_ci_c, // Î
texture_font_normal_char_ci_g, // Ì
texture_font_normal_char_ci_u, // Ï
texture_font_normal_char_cn_t, // Ñ
texture_font_normal_char_co_a, // Ó
texture_font_normal_char_co_c, // Ô
texture_font_normal_char_co_g, // Ò
texture_font_normal_char_co_t, // Õ
texture_font_normal_char_co_u, // Ö
texture_font_normal_char_cu_a, // Ú
texture_font_normal_char_cu_c, // Û
texture_font_normal_char_cu_g, // Ù
texture_font_normal_char_cu_u, // Ü
texture_font_normal_char_cy_a, // Ý
texture_font_normal_char_cy_u, // Ÿ
texture_font_normal_char_la_a, // á
texture_font_normal_char_la_ang, // å
texture_font_normal_char_la_c, // â
texture_font_normal_char_la_g, // à
texture_font_normal_char_la_t, // ã
texture_font_normal_char_la_u, // ä
texture_font_normal_char_lc_ced, // ç
texture_font_normal_char_le_a, // é
texture_font_normal_char_le_c, // ê
texture_font_normal_char_le_g, // è
texture_font_normal_char_le_u, // ë
texture_font_normal_char_li_a, // í
texture_font_normal_char_li_c, // î
texture_font_normal_char_li_g, // ì
texture_font_normal_char_li_u, // ï
texture_font_normal_char_ln_t, // ñ
texture_font_normal_char_lo_a, // ó
texture_font_normal_char_lo_c, // ô
texture_font_normal_char_lo_g, // ò
texture_font_normal_char_lo_t, // õ
texture_font_normal_char_lo_u, // ö
texture_font_normal_char_lu_a, // ú
texture_font_normal_char_lu_c, // û
texture_font_normal_char_lu_g, // ù
texture_font_normal_char_lu_u, // ü
texture_font_normal_char_ly_a, // ý
texture_font_normal_char_ly_u, // ÿ
texture_font_normal_char_lae, // æ
texture_font_normal_char_cae, // Æ
texture_font_normal_char_loe, // œ
texture_font_normal_char_coe, // Œ
texture_font_normal_char_leth, // ð
texture_font_normal_char_ceth, // Ð
texture_font_normal_char_los, // ø
texture_font_normal_char_cos, // Ø
texture_font_normal_char_ss, // ß
texture_font_normal_char_punc_sp_ex, // ¡
texture_font_normal_char_punc_sp_qu, // ¿
};
const f32 font_normal_widths[] = { const f32 font_normal_widths[] = {
/* ! " # $ % & ' ( ) * + , - . / */ /* ! " # $ % & ' ( ) * + , - . / */
0.3125f, 0.3750f, 0.4375f, 0.3750f, 0.4375f, 0.5000f, 0.2500f, 0.3125f, 0.3125f, 0.3750f, 0.4375f, 0.2500f, 0.3750f, 0.2500f, 0.3125f, 0.2200f, 0.3750f, 0.4375f, 0.3750f, 0.4375f, 0.5000f, 0.2500f, 0.3125f, 0.3125f, 0.3750f, 0.4375f, 0.2500f, 0.3750f, 0.2500f, 0.3125f,
/* 0 1 2 3 4 5 6 7 8 9 */ /* 0 1 2 3 4 5 6 7 8 9 */
0.4375f, 0.4375f, 0.4375f, 0.4375f, 0.4375f, 0.4375f, 0.4375f, 0.4375f, 0.4375f, 0.4375f, 0.4375f, 0.3800f, 0.4200f, 0.4375f, 0.4300f, 0.4375f, 0.4375f, 0.4000f, 0.4375f, 0.4375f,
/* : ; < = > ? @ */ /* : ; < = > ? @ */
0.2500f, 0.2500f, 0.3125f, 0.3750f, 0.3125f, 0.4375f, 0.5750f, 0.2000f, 0.2500f, 0.3125f, 0.3750f, 0.3125f, 0.3125f, 0.5750f,
/* A B C D E F G H I J K L M N O P Q R S T U V W X Y Z */ /* A B C D E F G H I J K L M N O P Q R S T U V W X Y Z */
0.3750f, 0.3750f, 0.3750f, 0.3750f, 0.3750f, 0.3750f, 0.3750f, 0.3750f, 0.3125f, 0.3750f, 0.3750f, 0.3125f, 0.5000f, 0.5000f, 0.3750f, 0.3750f, 0.3750f, 0.3750f, 0.3750f, 0.3125f, 0.3750f, 0.3750f, 0.5000f, 0.4375f, 0.3750f, 0.3750f, 0.3750f, 0.3750f, 0.3750f, 0.3750f, 0.3750f, 0.3125f, 0.3750f, 0.3750f, 0.3125f, 0.3750f, 0.3750f, 0.3125f, 0.5000f, 0.5000f, 0.3750f, 0.3750f, 0.3750f, 0.3750f, 0.3750f, 0.3125f, 0.3750f, 0.3750f, 0.5000f, 0.4375f, 0.3750f, 0.3750f,
/* [ \ ] ^ _ ` */ /* [ \ ] ^ _ ` */
0.3125f, 0.3125f, 0.3125f, 0.3750f, 0.3750f, 0.2500f, 0.3125f, 0.3125f, 0.3125f, 0.3750f, 0.3750f, 0.2500f,
/* a b c d e f g h i j k l m n o p q r s t u v w x y z */ /* a b c d e f g h i j k l m n o p q r s t u v w x y z */
0.3750f, 0.3125f, 0.3125f, 0.3125f, 0.3125f, 0.3125f, 0.3750f, 0.3125f, 0.2500f, 0.3125f, 0.3125f, 0.1875f, 0.4375f, 0.3125f, 0.3125f, 0.3125f, 0.3750f, 0.3125f, 0.3125f, 0.3125f, 0.3125f, 0.3125f, 0.4375f, 0.4375f, 0.3125f, 0.3125f, 0.3000f, 0.3125f, 0.3125f, 0.3125f, 0.3125f, 0.3000f, 0.3750f, 0.3125f, 0.2200f, 0.3125f, 0.3125f, 0.1700f, 0.4350f, 0.3125f, 0.3000f, 0.3000f, 0.3125f, 0.2700f, 0.3125f, 0.3125f, 0.3125f, 0.2750f, 0.4375f, 0.3750f, 0.3125f, 0.3125f,
/* { | } ~ DEL */ /* { | } ~ DEL */
0.3125f, 0.2500f, 0.3125f, 0.5000f, 0.5000f, 0.3125f, 0.2500f, 0.3125f, 0.5000f, 0.2000f,
}; };

View file

@ -64,7 +64,7 @@ struct DjuiBind* djui_bind_create(struct DjuiBase* parent, const char* message,
djui_base_set_size_type(&text->base, DJUI_SVT_RELATIVE, DJUI_SVT_RELATIVE); djui_base_set_size_type(&text->base, DJUI_SVT_RELATIVE, DJUI_SVT_RELATIVE);
djui_base_set_size(&text->base, 0.3f, 1.0f); djui_base_set_size(&text->base, 0.3f, 1.0f);
djui_text_set_alignment(text, DJUI_HALIGN_LEFT, DJUI_VALIGN_BOTTOM); djui_text_set_alignment(text, DJUI_HALIGN_LEFT, DJUI_VALIGN_BOTTOM);
djui_text_set_drop_shadow(text, 120, 120, 120, 64); djui_text_set_drop_shadow(text, 255, 255, 255, 128);
djui_base_set_color(&text->base, 200, 200, 200, 255); djui_base_set_color(&text->base, 200, 200, 200, 255);
bind->text = text; bind->text = text;

View file

@ -11,11 +11,11 @@ static void djui_button_update_style(struct DjuiBase* base) {
} else if (gDjuiCursorDownOn == base) { } else if (gDjuiCursorDownOn == base) {
djui_base_set_border_color(base, 0, 84, 153, 255); djui_base_set_border_color(base, 0, 84, 153, 255);
djui_base_set_color(&button->rect->base, 204, 228, 247, 255); djui_base_set_color(&button->rect->base, 204, 228, 247, 255);
djui_base_set_location(&button->text->base, 0.5f, 0.5f); djui_base_set_location(&button->text->base, 1.0f, 1.0f);
} else if (gDjuiHovered == base) { } else if (gDjuiHovered == base) {
djui_base_set_border_color(base, 0, 120, 215, 255); djui_base_set_border_color(base, 0, 120, 215, 255);
djui_base_set_color(&button->rect->base, 229, 241, 251, 255); djui_base_set_color(&button->rect->base, 229, 241, 251, 255);
djui_base_set_location(&button->text->base, -0.5f, -1.0f); djui_base_set_location(&button->text->base, -1.0f, -1.0f);
} else { } else {
u8 borderBrightness = button->style ? 100 : 150; u8 borderBrightness = button->style ? 100 : 150;
u8 rectBrightness = button->style ? 150 : 222; u8 rectBrightness = button->style ? 150 : 222;

View file

@ -63,7 +63,7 @@ struct DjuiCheckbox* djui_checkbox_create(struct DjuiBase* parent, const char* m
djui_base_set_size_type(&text->base, DJUI_SVT_RELATIVE, DJUI_SVT_RELATIVE); djui_base_set_size_type(&text->base, DJUI_SVT_RELATIVE, DJUI_SVT_RELATIVE);
djui_base_set_size(&text->base, 1.0f, 1.0f); djui_base_set_size(&text->base, 1.0f, 1.0f);
djui_text_set_alignment(text, DJUI_HALIGN_LEFT, DJUI_VALIGN_BOTTOM); djui_text_set_alignment(text, DJUI_HALIGN_LEFT, DJUI_VALIGN_BOTTOM);
djui_text_set_drop_shadow(text, 120, 120, 120, 64); djui_text_set_drop_shadow(text, 255, 255, 255, 128);
checkbox->text = text; checkbox->text = text;
struct DjuiRect* rect = djui_rect_create(&checkbox->base); struct DjuiRect* rect = djui_rect_create(&checkbox->base);

View file

@ -6,52 +6,16 @@
// font 0 (built-in normal font) // // font 0 (built-in normal font) //
/////////////////////////////////// ///////////////////////////////////
static Vtx djui_font_normal_vertices[] = {
{{{ 0, -1, 0}, 0, { 0, 256}, { 0xff, 0xff, 0xff, 0xff }}},
{{{ 0.5f, -1, 0}, 0, { 0, 0}, { 0xff, 0xff, 0xff, 0xff }}},
{{{ 0.5f, 0, 0}, 0, { 512, 0}, { 0xff, 0xff, 0xff, 0xff }}},
{{{ 0, 0, 0}, 0, { 512, 256}, { 0xff, 0xff, 0xff, 0xff }}},
};
const Gfx dl_font_normal_display_list_begin[] = {
gsDPPipeSync(),
gsSPClearGeometryMode(G_LIGHTING),
gsDPSetCombineMode(G_CC_FADEA, G_CC_FADEA),
gsDPSetRenderMode(G_RM_XLU_SURF, G_RM_XLU_SURF2),
gsDPSetTextureFilter(G_TF_POINT),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
gsDPSetTile(G_IM_FMT_IA, G_IM_SIZ_4b, 1, 0, G_TX_RENDERTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, 3, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, 4, G_TX_NOLOD),
gsDPSetTileSize(0, 0, 0, (16 - 1) << G_TEXTURE_IMAGE_FRAC, (8 - 1) << G_TEXTURE_IMAGE_FRAC),
gsSPEndDisplayList(),
};
const Gfx dl_font_normal_display_list[] = {
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, ((16 * 8 + G_IM_SIZ_4b_INCR) >> G_IM_SIZ_4b_SHIFT) - 1, CALC_DXT(16, G_IM_SIZ_4b_BYTES)),
gsSPVertexDjui(djui_font_normal_vertices, 4, 0),
gsSPExecuteDjui(G_TEXCLIP_DJUI),
gsSP2TrianglesDjui(0, 1, 2, 0x0, 0, 2, 3, 0x0),
gsSPEndDisplayList(),
};
static void djui_font_normal_render_char(char* c) { static void djui_font_normal_render_char(char* c) {
// replace undisplayable characters // replace undisplayable characters
if (*c == ' ') { return; } if (*c == ' ') { return; }
u32 index = djui_unicode_get_sprite_index(c); u32 index = djui_unicode_get_sprite_index(c);
//extern const u8* const font_normal_chars[];
//void* fontChar = (void*)font_normal_chars[index];
extern ALIGNED8 const u8 texture_font_normal[];
void* fontChar = texture_font_normal;
//djui_gfx_render_texture(texture_font_normal, 256, 128, 32);
//djui_gfx_render_texture_tile(texture_font_normal, 8, 16, 32, 0, 0, 256, 128);
u32 tx = index % 32; u32 tx = index % 32;
u32 ty = index / 32; u32 ty = index / 32;
djui_gfx_render_texture_tile(texture_font_normal, 256, 128, 32, tx * 8, ty * 16, 8, 16);
//gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_IA, G_IM_SIZ_16b, 1, (void*)fontChar); extern ALIGNED8 const u8 texture_font_normal[];
//gSPDisplayList(gDisplayListHead++, dl_font_normal_display_list); djui_gfx_render_texture_tile(texture_font_normal, 512, 256, 32, tx * 16 + 1, ty * 32, 16, 32);
} }
static f32 djui_font_normal_char_width(char* c) { static f32 djui_font_normal_char_width(char* c) {
@ -65,8 +29,7 @@ static const struct DjuiFont sDjuiFontNormal = {
.charHeight = 1.0f, .charHeight = 1.0f,
.lineHeight = 0.8125f, .lineHeight = 0.8125f,
.defaultFontScale = 32.0f, .defaultFontScale = 32.0f,
.rotatedUV = false, .textBeginDisplayList = NULL,
.textBeginDisplayList = NULL, //dl_font_normal_display_list_begin,
.render_char = djui_font_normal_render_char, .render_char = djui_font_normal_render_char,
.char_width = djui_font_normal_char_width, .char_width = djui_font_normal_char_width,
}; };
@ -97,7 +60,6 @@ static const struct DjuiFont sDjuiFontTitle = {
.charHeight = 0.9f, .charHeight = 0.9f,
.lineHeight = 0.7f, .lineHeight = 0.7f,
.defaultFontScale = 64.0f, .defaultFontScale = 64.0f,
.rotatedUV = false,
.textBeginDisplayList = NULL, .textBeginDisplayList = NULL,
.render_char = djui_font_title_render_char, .render_char = djui_font_title_render_char,
.char_width = djui_font_title_char_width, .char_width = djui_font_title_char_width,
@ -150,7 +112,6 @@ static const struct DjuiFont sDjuiFontHud = {
.charHeight = 0.9f, .charHeight = 0.9f,
.lineHeight = 0.7f, .lineHeight = 0.7f,
.defaultFontScale = 16.0f, .defaultFontScale = 16.0f,
.rotatedUV = false,
.textBeginDisplayList = NULL, .textBeginDisplayList = NULL,
.render_char = djui_font_hud_render_char, .render_char = djui_font_hud_render_char,
.char_width = djui_font_hud_char_width, .char_width = djui_font_hud_char_width,

View file

@ -7,7 +7,6 @@ struct DjuiFont {
f32 lineHeight; f32 lineHeight;
f32 defaultFontScale; f32 defaultFontScale;
u8 textureBitSize; u8 textureBitSize;
bool rotatedUV;
const Gfx* textBeginDisplayList; const Gfx* textBeginDisplayList;
void (*render_char)(char*); void (*render_char)(char*);
f32 (*char_width)(char*); f32 (*char_width)(char*);

View file

@ -6,11 +6,11 @@
#define G_DJUI_SIMPLE_TRI2 0x12 #define G_DJUI_SIMPLE_TRI2 0x12
#define G_EXECUTE_DJUI 0xdd #define G_EXECUTE_DJUI 0xdd
#define gSetClippingDjui(pkt, cmd, rot, x1, y1, x2, y2) \ #define gSetClippingDjui(pkt, cmd, x1, y1, x2, y2) \
{ \ { \
Gfx *_g = (Gfx *)(pkt); \ Gfx *_g = (Gfx *)(pkt); \
_g->words.w0 = _SHIFTL(cmd, 24, 8) | _SHIFTL( x1, 16, 8) | \ _g->words.w0 = _SHIFTL(cmd, 24, 8) | _SHIFTL( x1, 16, 8) | \
_SHIFTL( y1, 8, 8) | _SHIFTL(rot, 0, 8); \ _SHIFTL( y1, 8, 8) | _SHIFTL(0x00, 0, 8); \
_g->words.w1 = _SHIFTL(x2, 16, 8) | _SHIFTL(y2, 8, 8); \ _g->words.w1 = _SHIFTL(x2, 16, 8) | _SHIFTL(y2, 8, 8); \
} }
@ -63,7 +63,7 @@
((height)-1) << G_TEXTURE_IMAGE_FRAC) \ ((height)-1) << G_TEXTURE_IMAGE_FRAC) \
} }
#define gDPSetTextureClippingDjui(pkt, rot, x1, y1, x2, y2) gSetClippingDjui(pkt, G_TEXCLIP_DJUI, rot, x1, y1, x2, y2) #define gDPSetTextureClippingDjui(pkt, x1, y1, x2, y2) gSetClippingDjui(pkt, G_TEXCLIP_DJUI, x1, y1, x2, y2)
#define gDPSetTextureOverrideDjui(pkt, texture, w, h, bitSize) gSetOverrideDjui(pkt, G_TEXOVERRIDE_DJUI, texture, w, h, bitSize) #define gDPSetTextureOverrideDjui(pkt, texture, w, h, bitSize) gSetOverrideDjui(pkt, G_TEXOVERRIDE_DJUI, texture, w, h, bitSize)

View file

@ -94,15 +94,18 @@ void djui_gfx_render_texture_tile(const u8* texture, u32 w, u32 h, u32 bitSize,
gDPSetCombineMode(gDisplayListHead++, G_CC_FADEA, G_CC_FADEA); gDPSetCombineMode(gDisplayListHead++, G_CC_FADEA, G_CC_FADEA);
gDPSetRenderMode(gDisplayListHead++, G_RM_XLU_SURF, G_RM_XLU_SURF2); gDPSetRenderMode(gDisplayListHead++, G_RM_XLU_SURF, G_RM_XLU_SURF2);
gDPSetTextureFilter(gDisplayListHead++, G_TF_POINT); gDPSetTextureFilter(gDisplayListHead++, G_TF_POINT);
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON); gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
gDPSetTextureOverrideDjui(gDisplayListHead++, texture, djui_gfx_power_of_two(w), djui_gfx_power_of_two(h), bitSize); gDPSetTextureOverrideDjui(gDisplayListHead++, texture, djui_gfx_power_of_two(w), djui_gfx_power_of_two(h), bitSize);
gDPLoadTextureBlockWithoutTexture(gDisplayListHead++, NULL, G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 16, 0, G_TX_CLAMP, G_TX_CLAMP, 5, 5, G_TX_NOLOD, G_TX_NOLOD); gDPLoadTextureBlockWithoutTexture(gDisplayListHead++, NULL, G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 16, 0, G_TX_CLAMP, G_TX_CLAMP, 5, 5, G_TX_NOLOD, G_TX_NOLOD);
*(gDisplayListHead++) = (Gfx) gsSPExecuteDjui(G_TEXOVERRIDE_DJUI); *(gDisplayListHead++) = (Gfx) gsSPExecuteDjui(G_TEXOVERRIDE_DJUI);
gSPVertexDjui(gDisplayListHead++, vtx, 4, 0); gSPVertexDjui(gDisplayListHead++, vtx, 4, 0);
*(gDisplayListHead++) = (Gfx) gsSPExecuteDjui(G_TEXCLIP_DJUI); *(gDisplayListHead++) = (Gfx) gsSPExecuteDjui(G_TEXCLIP_DJUI);
gSP2TrianglesDjui(gDisplayListHead++, 0, 1, 2, 0x0, 0, 2, 3, 0x0); gSP2TrianglesDjui(gDisplayListHead++, 0, 1, 2, 0x0, 0, 2, 3, 0x0);
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF); gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF);
gDPSetCombineMode(gDisplayListHead++, G_CC_SHADE, G_CC_SHADE); gDPSetCombineMode(gDisplayListHead++, G_CC_SHADE, G_CC_SHADE);
} }
@ -131,7 +134,7 @@ void djui_gfx_size_translate(f32* size) {
*size = *size * ((f32)SCREEN_HEIGHT / (f32)windowHeight) * djui_gfx_get_scale(); *size = *size * ((f32)SCREEN_HEIGHT / (f32)windowHeight) * djui_gfx_get_scale();
} }
bool djui_gfx_add_clipping_specific(struct DjuiBase* base, bool rotatedUV, f32 dX, f32 dY, f32 dW, f32 dH) { bool djui_gfx_add_clipping_specific(struct DjuiBase* base, f32 dX, f32 dY, f32 dW, f32 dH) {
struct DjuiBaseRect* clip = &base->clip; struct DjuiBaseRect* clip = &base->clip;
f32 clipX2 = clip->x + clip->width; f32 clipX2 = clip->x + clip->width;
@ -152,7 +155,7 @@ bool djui_gfx_add_clipping_specific(struct DjuiBase* base, bool rotatedUV, f32 d
f32 dClipY2 = fmax((dY - (clipY2 - dH)) / dH, 0); f32 dClipY2 = fmax((dY - (clipY2 - dH)) / dH, 0);
if ((dClipX1 != 0) || (dClipY1 != 0) || (dClipX2 != 0) || (dClipY2 != 0)) { if ((dClipX1 != 0) || (dClipY1 != 0) || (dClipX2 != 0) || (dClipY2 != 0)) {
gDPSetTextureClippingDjui(gDisplayListHead++, rotatedUV, (u8)(dClipX1 * 255), (u8)(dClipY1 * 255), (u8)(dClipX2 * 255), (u8)(dClipY2 * 255)); gDPSetTextureClippingDjui(gDisplayListHead++, (u8)(dClipX1 * 255), (u8)(dClipY1 * 255), (u8)(dClipX2 * 255), (u8)(dClipY2 * 255));
} }
return false; return false;
@ -160,5 +163,5 @@ bool djui_gfx_add_clipping_specific(struct DjuiBase* base, bool rotatedUV, f32 d
bool djui_gfx_add_clipping(struct DjuiBase* base) { bool djui_gfx_add_clipping(struct DjuiBase* base) {
struct DjuiBaseRect* comp = &base->comp; struct DjuiBaseRect* comp = &base->comp;
return djui_gfx_add_clipping_specific(base, false, comp->x, comp->y, comp->width, comp->height); return djui_gfx_add_clipping_specific(base, comp->x, comp->y, comp->width, comp->height);
} }

View file

@ -18,5 +18,5 @@ void djui_gfx_position_translate(f32* x, f32* y);
void djui_gfx_scale_translate(f32* width, f32* height); void djui_gfx_scale_translate(f32* width, f32* height);
void djui_gfx_size_translate(f32* size); void djui_gfx_size_translate(f32* size);
bool djui_gfx_add_clipping_specific(struct DjuiBase* base, bool rotatedUV, f32 dX, f32 dY, f32 dW, f32 dH); bool djui_gfx_add_clipping_specific(struct DjuiBase* base, f32 dX, f32 dY, f32 dW, f32 dH);
bool djui_gfx_add_clipping(struct DjuiBase* base); bool djui_gfx_add_clipping(struct DjuiBase* base);

View file

@ -7,7 +7,7 @@
#include "game/segment2.h" #include "game/segment2.h"
#include "pc/controller/controller_keyboard.h" #include "pc/controller/controller_keyboard.h"
#define DJUI_INPUTBOX_YOFF (-2) #define DJUI_INPUTBOX_YOFF (-3)
#define DJUI_INPUTBOX_MAX_BLINK 50 #define DJUI_INPUTBOX_MAX_BLINK 50
#define DJUI_INPUTBOX_MID_BLINK (DJUI_INPUTBOX_MAX_BLINK / 2) #define DJUI_INPUTBOX_MID_BLINK (DJUI_INPUTBOX_MAX_BLINK / 2)
#define DJUI_INPUTBOX_CURSOR_WIDTH (2.0f / 32.0f) #define DJUI_INPUTBOX_CURSOR_WIDTH (2.0f / 32.0f)
@ -376,7 +376,7 @@ static void djui_inputbox_render_char(struct DjuiInputbox* inputbox, char* c, f3
f32 charWidth = font->char_width(c); f32 charWidth = font->char_width(c);
*drawX += charWidth * font->defaultFontScale; *drawX += charWidth * font->defaultFontScale;
if (*c != ' ' && !djui_gfx_add_clipping_specific(&inputbox->base, font->rotatedUV, dX, dY, dW, dH)) { if (*c != ' ' && !djui_gfx_add_clipping_specific(&inputbox->base, dX, dY, dW, dH)) {
if (*additionalShift > 0) { if (*additionalShift > 0) {
create_dl_translation_matrix(DJUI_MTX_NOPUSH, *additionalShift, 0, 0); create_dl_translation_matrix(DJUI_MTX_NOPUSH, *additionalShift, 0, 0);
*additionalShift = 0; *additionalShift = 0;
@ -483,7 +483,7 @@ static bool djui_inputbox_render(struct DjuiBase* base) {
f32 translatedX = comp->x + inputbox->viewX; f32 translatedX = comp->x + inputbox->viewX;
f32 translatedY = comp->y + DJUI_INPUTBOX_YOFF; f32 translatedY = comp->y + DJUI_INPUTBOX_YOFF;
djui_gfx_position_translate(&translatedX, &translatedY); djui_gfx_position_translate(&translatedX, &translatedY);
create_dl_translation_matrix(DJUI_MTX_PUSH, translatedX, translatedY, 0); create_dl_translation_matrix(DJUI_MTX_PUSH, (int)translatedX, (int)translatedY, 0);
// compute font size // compute font size
f32 translatedFontSize = font->defaultFontScale; f32 translatedFontSize = font->defaultFontScale;

View file

@ -94,7 +94,7 @@ struct DjuiSelectionbox* djui_selectionbox_create(struct DjuiBase* parent, const
djui_base_set_size_type(&text->base, DJUI_SVT_RELATIVE, DJUI_SVT_RELATIVE); djui_base_set_size_type(&text->base, DJUI_SVT_RELATIVE, DJUI_SVT_RELATIVE);
djui_base_set_size(&text->base, 0.6f, 1.0f); djui_base_set_size(&text->base, 0.6f, 1.0f);
djui_text_set_alignment(text, DJUI_HALIGN_LEFT, DJUI_VALIGN_BOTTOM); djui_text_set_alignment(text, DJUI_HALIGN_LEFT, DJUI_VALIGN_BOTTOM);
djui_text_set_drop_shadow(text, 120, 120, 120, 64); djui_text_set_drop_shadow(text, 255, 255, 255, 128);
selectionbox->text = text; selectionbox->text = text;
struct DjuiRect* rect = djui_rect_create(&selectionbox->base); struct DjuiRect* rect = djui_rect_create(&selectionbox->base);
@ -111,7 +111,7 @@ struct DjuiSelectionbox* djui_selectionbox_create(struct DjuiBase* parent, const
djui_base_set_size_type(&rectText->base, DJUI_SVT_RELATIVE, DJUI_SVT_RELATIVE); djui_base_set_size_type(&rectText->base, DJUI_SVT_RELATIVE, DJUI_SVT_RELATIVE);
djui_base_set_size(&rectText->base, 1.0f, 1.0f); djui_base_set_size(&rectText->base, 1.0f, 1.0f);
djui_text_set_alignment(rectText, DJUI_HALIGN_LEFT, DJUI_VALIGN_BOTTOM); djui_text_set_alignment(rectText, DJUI_HALIGN_LEFT, DJUI_VALIGN_BOTTOM);
djui_text_set_drop_shadow(rectText, 120, 120, 120, 64); djui_text_set_drop_shadow(rectText, 255, 255, 255, 128);
selectionbox->rectText = rectText; selectionbox->rectText = rectText;
struct DjuiImage* rectImage = djui_image_create(&rect->base, texture_selectionbox_icon, 16, 16, 16); struct DjuiImage* rectImage = djui_image_create(&rect->base, texture_selectionbox_icon, 16, 16, 16);

View file

@ -116,7 +116,7 @@ struct DjuiSlider* djui_slider_create(struct DjuiBase* parent, const char* messa
djui_base_set_size_type(&text->base, DJUI_SVT_RELATIVE, DJUI_SVT_RELATIVE); djui_base_set_size_type(&text->base, DJUI_SVT_RELATIVE, DJUI_SVT_RELATIVE);
djui_base_set_size(&text->base, 0.6f, 1.0f); djui_base_set_size(&text->base, 0.6f, 1.0f);
djui_text_set_alignment(text, DJUI_HALIGN_LEFT, DJUI_VALIGN_BOTTOM); djui_text_set_alignment(text, DJUI_HALIGN_LEFT, DJUI_VALIGN_BOTTOM);
djui_text_set_drop_shadow(text, 120, 120, 120, 64); djui_text_set_drop_shadow(text, 255, 255, 255, 128);
slider->text = text; slider->text = text;
struct DjuiRect* rect = djui_rect_create(&slider->base); struct DjuiRect* rect = djui_rect_create(&slider->base);

View file

@ -71,7 +71,7 @@ static void djui_text_render_single_char(struct DjuiText* text, char* c) {
f32 dW = text->font->charWidth * text->fontScale; f32 dW = text->font->charWidth * text->fontScale;
f32 dH = text->font->charHeight * text->fontScale; f32 dH = text->font->charHeight * text->fontScale;
if (djui_gfx_add_clipping_specific(&text->base, text->font->rotatedUV, dX, dY, dW, dH)) { if (djui_gfx_add_clipping_specific(&text->base, dX, dY, dW, dH)) {
return; return;
} }

View file

@ -81,7 +81,7 @@ struct SmCodeGlyph sSmCodeGlyphs[] = {
{ "ß", 'S', 0, 0 }, { "ß", 'S', 0, 0 },
{ "¡", '!', 0, 0 }, { "¡", '!', 0, 0 },
{ "¿", '?', 0, 0 }, { "¿", '?', 0.3750f, 0 },
}; };
static void* sCharMap = NULL; static void* sCharMap = NULL;

View file

@ -1291,9 +1291,8 @@ static void gfx_dp_load_block(uint8_t tile, uint32_t uls, uint32_t ult, uint32_t
} }
uint32_t size_bytes = (lrs + 1) << word_size_shift; uint32_t size_bytes = (lrs + 1) << word_size_shift;
rdp.loaded_texture[rdp.texture_to_load.tile_number].size_bytes = size_bytes; rdp.loaded_texture[rdp.texture_to_load.tile_number].size_bytes = size_bytes;
rdp.textures_changed[rdp.texture_to_load.tile_number] = rdp.loaded_texture[rdp.texture_to_load.tile_number].addr != rdp.texture_to_load.addr;
rdp.loaded_texture[rdp.texture_to_load.tile_number].addr = rdp.texture_to_load.addr; rdp.loaded_texture[rdp.texture_to_load.tile_number].addr = rdp.texture_to_load.addr;
rdp.textures_changed[rdp.texture_to_load.tile_number] = true;
} }
static void gfx_dp_load_tile(uint8_t tile, uint32_t uls, uint32_t ult, uint32_t lrs, uint32_t lrt) { static void gfx_dp_load_tile(uint8_t tile, uint32_t uls, uint32_t ult, uint32_t lrs, uint32_t lrt) {
@ -1891,7 +1890,6 @@ void gfx_shutdown(void) {
///////////////////////// /////////////////////////
static bool sDjuiClip = 0; static bool sDjuiClip = 0;
static bool sDjuiClipRotatedUV = 0;
static uint8_t sDjuiClipX1 = 0; static uint8_t sDjuiClipX1 = 0;
static uint8_t sDjuiClipY1 = 0; static uint8_t sDjuiClipY1 = 0;
static uint8_t sDjuiClipX2 = 0; static uint8_t sDjuiClipX2 = 0;
@ -1950,20 +1948,6 @@ static void OPTIMIZE_O3 djui_gfx_dp_execute_clipping(void) {
d->y -= (maxY - minY) * (sDjuiClipY1 / 255.0f); d->y -= (maxY - minY) * (sDjuiClipY1 / 255.0f);
} }
if (sDjuiClipRotatedUV) {
if (d->u <= midU) {
d->u += (maxU - minU) * (sDjuiClipY2 / 255.0f);
}
else {
d->u -= (maxU - minU) * (sDjuiClipY1 / 255.0f);
}
if (d->v <= midV) {
d->v += (maxV - minV) * (sDjuiClipX2 / 255.0f);
}
else {
d->v -= (maxV - minV) * (sDjuiClipX1 / 255.0f);
}
} else {
if (d->u <= midU) { if (d->u <= midU) {
d->u += (maxU - minU) * (sDjuiClipX1 / 255.0f); d->u += (maxU - minU) * (sDjuiClipX1 / 255.0f);
} else { } else {
@ -1975,7 +1959,6 @@ static void OPTIMIZE_O3 djui_gfx_dp_execute_clipping(void) {
d->v -= (maxV - minV) * (sDjuiClipY2 / 255.0f); d->v -= (maxV - minV) * (sDjuiClipY2 / 255.0f);
} }
} }
}
} }
static void OPTIMIZE_O3 djui_gfx_dp_execute_override(void) { static void OPTIMIZE_O3 djui_gfx_dp_execute_override(void) {
@ -2017,8 +2000,7 @@ static void OPTIMIZE_O3 djui_gfx_dp_execute_djui(uint32_t opcode) {
} }
} }
static void OPTIMIZE_O3 djui_gfx_dp_set_clipping(bool rotatedUV, uint32_t x1, uint32_t y1, uint32_t x2, uint32_t y2) { static void OPTIMIZE_O3 djui_gfx_dp_set_clipping(uint32_t x1, uint32_t y1, uint32_t x2, uint32_t y2) {
sDjuiClipRotatedUV = rotatedUV;
sDjuiClipX1 = x1; sDjuiClipX1 = x1;
sDjuiClipY1 = y1; sDjuiClipY1 = y1;
sDjuiClipX2 = x2; sDjuiClipX2 = x2;
@ -2131,7 +2113,7 @@ void OPTIMIZE_O3 djui_gfx_run_dl(Gfx* cmd) {
uint32_t opcode = cmd->words.w0 >> 24; uint32_t opcode = cmd->words.w0 >> 24;
switch (opcode) { switch (opcode) {
case G_TEXCLIP_DJUI: case G_TEXCLIP_DJUI:
djui_gfx_dp_set_clipping(C0(0, 8), C0(16, 8), C0(8, 8), C1(16, 8), C1(8, 8)); djui_gfx_dp_set_clipping(C0(16, 8), C0(8, 8), C1(16, 8), C1(8, 8));
break; break;
case G_TEXOVERRIDE_DJUI: case G_TEXOVERRIDE_DJUI:
djui_gfx_dp_set_override(seg_addr(cmd->words.w1), 1 << C0(16, 8), 1 << C0(8, 8), C0(0, 8)); djui_gfx_dp_set_override(seg_addr(cmd->words.w1), 1 << C0(16, 8), 1 << C0(8, 8), C0(0, 8));

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 512 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 518 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 514 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 515 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 521 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 517 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 530 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 511 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 515 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 513 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 513 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 509 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 523 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 514 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 513 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 509 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 511 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 534 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 514 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 520 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 516 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 522 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 518 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 534 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 522 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 513 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 517 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 514 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 519 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 505 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 509 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 504 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 515 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 510 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 509 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 512 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 511 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 513 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 507 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 504 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 510 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 506 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 511 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 512 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 502 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 496 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 492 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 497 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 498 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 503 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 504 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 507 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 496 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 506 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 508 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 505 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 509 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 512 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 508 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 510 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 515 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 508 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 499 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 509 B

Some files were not shown because too many files have changed in this diff Show more