Skip to content

scr_printf: implement color management via custom escape code - #906

Merged
uyjulian merged 1 commit into
ps2dev:masterfrom
israpps:patch-32
Jul 26, 2026
Merged

scr_printf: implement color management via custom escape code#906
uyjulian merged 1 commit into
ps2dev:masterfrom
israpps:patch-32

Conversation

@israpps

@israpps israpps commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

this PR makes scr_printf coloring simpler, via a custom escape sequence

this is a hybrid between actual ansi escapes, and windows color command from cmd.exe just to keep impl small and the sequence as small as posible

there are 16 default colors (that the program can customize)

the sequence is \x1b followed by two hex chars

to avoid C compiler messing up, its better to use the octal version of the escape

as an example:

scr_printf("hello people \03304 This is red text! \0330F Now back to white!\n");

Comment thread ee/debug/src/scr_printf.c Outdated
Comment thread ee/debug/src/scr_printf.c Outdated
@uyjulian

Copy link
Copy Markdown
Member

Lgtm

@uyjulian
uyjulian merged commit e228ff7 into ps2dev:master Jul 26, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants