diff --git a/libctru/include/3ds/console.h b/libctru/include/3ds/console.h index fd65284..95b39a1 100644 --- a/libctru/include/3ds/console.h +++ b/libctru/include/3ds/console.h @@ -94,7 +94,13 @@ typedef struct PrintConsole #define CONSOLE_COLOR_BOLD (1<<0) #define CONSOLE_COLOR_FAINT (1<<1) -#define CONSOLE_COLOR_REVERSE (1<<2) +#define CONSOLE_ITALIC (1<<2) +#define CONSOLE_UNDERLINE (1<<3) +#define CONSOLE_BLINK_SLOW (1<<4) +#define CONSOLE_BLINK_FAST (1<<5) +#define CONSOLE_COLOR_REVERSE (1<<6) +#define CONSOLE_CONCEAL (1<<7) +#define CONSOLE_CROSSED_OUT (1<<8) /*! \brief Loads the font into the console \param console pointer to the console to update, if NULL it will update the current console diff --git a/libctru/source/console.c b/libctru/source/console.c index 9dd3dfd..a00e765 100644 --- a/libctru/source/console.c +++ b/libctru/source/console.c @@ -326,8 +326,64 @@ ssize_t con_write(struct _reent *r,int fd,const char *ptr, size_t len) { currentConsole->flags |= CONSOLE_COLOR_FAINT; break; - case 7: // reverse video - currentConsole->flags |= CONSOLE_COLOR_REVERSE; + case 3: // italic + currentConsole->flags |= CONSOLE_ITALIC; + break; + + case 4: // underline + currentConsole->flags |= CONSOLE_UNDERLINE; + break; + + case 5: // blink slow + currentConsole->flags &= ~CONSOLE_BLINK_FAST; + currentConsole->flags |= CONSOLE_BLINK_SLOW; + break; + + case 6: // blink fast + currentConsole->flags &= ~CONSOLE_BLINK_SLOW; + currentConsole->flags |= CONSOLE_BLINK_FAST; + break; + + case 7: // reverse video + currentConsole->flags |= CONSOLE_COLOR_REVERSE; + break; + + case 8: // conceal + currentConsole->flags |= CONSOLE_CONCEAL; + break; + + case 9: // crossed-out + currentConsole->flags |= CONSOLE_CROSSED_OUT; + break; + + case 21: // bold off + currentConsole->flags &= ~CONSOLE_COLOR_BOLD; + break; + + case 22: // normal color + currentConsole->flags &= ~CONSOLE_COLOR_BOLD; + currentConsole->flags &= ~CONSOLE_COLOR_FAINT; + break; + + case 23: // italic off + currentConsole->flags &= ~CONSOLE_ITALIC; + break; + + case 24: // underline off + currentConsole->flags &= ~CONSOLE_UNDERLINE; + break; + + case 25: // blink off + currentConsole->flags &= ~CONSOLE_BLINK_SLOW; + currentConsole->flags &= ~CONSOLE_BLINK_FAST; + break; + + case 27: // reverse off + currentConsole->flags &= ~CONSOLE_COLOR_REVERSE; + break; + + case 29: // crossed-out off + currentConsole->flags &= ~CONSOLE_CROSSED_OUT; break; case 30 ... 37: // writing color