colored printf text

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
fergie4000
Posts: 25
Joined: Fri Jan 19, 2007 3:03 pm

colored printf text

Post by fergie4000 »

is there anyway to color the text the psp outputs? if so how?
MrMr[iCE]
Posts: 43
Joined: Mon Oct 03, 2005 4:55 pm

Post by MrMr[iCE] »

youll have to be more specific...if you mean the text printed to the pc console via psplink, then yes, if you know how to work with ansi escape codes, like this:

Code: Select all

// output to psplink console, move cursor up one before printing the text
printf("\033[1Alook ma, only one line!\n");
google for 'ansi escape codes' and you should find a few docs that list the different ansi control commands.

if you mean pspDebugScreenPrintf, have a look in pspdebug.h, theres a few functions that control text and background color, cursor position, etc.
Last edited by MrMr[iCE] on Sun Feb 25, 2007 12:44 am, edited 1 time in total.
User avatar
harleyg
Posts: 123
Joined: Wed Oct 05, 2005 6:15 am

Post by harleyg »

pspDebugScreenSetTextColor() will work with pspDebugScreenPrintf().
Last edited by harleyg on Sun Feb 25, 2007 12:42 am, edited 1 time in total.
MrMr[iCE]
Posts: 43
Joined: Mon Oct 03, 2005 4:55 pm

Post by MrMr[iCE] »

oops ya..psp, not sce. good catch =)
fergie4000
Posts: 25
Joined: Fri Jan 19, 2007 3:03 pm

Post by fergie4000 »

thanks harleyg
Post Reply