Skip to content

A simple C++ program to assist in adding color to Nintendo 3DS homebrew console projects.

Notifications You must be signed in to change notification settings

nfoert/3dscolor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

3dscolor

A simple C++ program to assist in adding color and moving lines to specific places for Nintendo 3DS homebrew console projects. If you find an issue or have an idea on how to make this better, feel free to contribute or open an issue.

Usage

Download color.h from the releases page and drop it into your source directory. Continue reading for instructions for how to use.

Rows and colums

My very classy MS Paint image

The top screen has 30 rows and 50 columns. The bottom screen has 30 rows and 40 columns.

Foreground and Background

There are eight different colors avaliable.

  • black
  • red
  • green
  • yellow
  • blue
  • magenta
  • cyan
  • white

There are also two different modes

  • Foreground
  • Background

Setting the color is easy.

#include "color.h" // include the header file

// Setup components of the script.
Foreground FORE;
Background BACK;

std::cout << BACK.red << "The background is red." << std::endl;

std::cout << FORE.yellow << "The text color is yellow." << std::endl;

Reset

You may want to reset to no colors in the foreground and background.

Reset RESET;

std::cout << "This text is " << FORE.yellow << "yellow. " << RESET.reset << "Goodbye!" << std::endl;
//            ^ No style                        ^ Yellow                     ^ Style has been reset

Move

You might want to move the text to a specific line

Move MOVE;

std::cout << FORE.blue << MOVE.goTo(30, 0) << "This line is on row 30 and column 0";
//           ^ Blue       ^ Move to row 30 and column 0

Demo

There is a demo included. Run the make command to build it, then open the homebrew launcher, press y and then run the command $DEVKITPRO/tools/bin/3dslink color.3dsx -a ip.address.on.3ds.screen Alternatively, download the color.3dsx file and put it into the 3ds folder on your 3DS' SD Card, then run it via the homebrew launcher.

Credit to this overpriced restored 3DS on walmart for the image. And thanks to this article for showing me that this was all possible.

About

A simple C++ program to assist in adding color to Nintendo 3DS homebrew console projects.

Resources

Stars

Watchers

Forks