1
0
Fork
You've already forked CursedTools
2
A collection of programs to enhance ncurses.
  • C++ 100%
2026年02月13日 09:00:38 -05:00
ColorFile fixed stamp bug where is fails to stamp chars from the middle of files 2026年01月24日 08:01:53 -05:00
learning adding gitignore 2026年01月08日 12:21:06 -05:00
Stamp Linux tutorial works now 2026年02月13日 09:00:38 -05:00
.gitignore adding gitignore 2026年01月08日 12:21:06 -05:00
README.md Update README.md 2026年02月11日 14:48:56 +01:00

Cursed Tools

Enhancing the graphical capabilities of ncurses

This repo contains multiple programs to make complicated ncurses graphics easier to implement.

Stamp

stamp() is a recreation of the pygame blit() function but rewritten for ncurses. The stamp() fuction provides a simple way to display text art from a seperate text file to the ncurses screen. This enables users to make much more complicated TUIs for their ncurses programs while keeping the implementation simple.

Install Ncurses

This should already be installed on most computers. On Debian-based Linux, you may need to run sudo apt install libncurses-dev

How To:

  1. clone repo
  2. copy stamp.cpp to your CPATH
  3. complile and run StampTutorial.cpp (StampTutorialMac.cpp for Mac) and link -lncursesw (-lncurses for Mac) to learn how to use the stamp() function

stamp() allows for easy desplay of text art from separate files to keep the graphics separate from the program.

stamp(y, x, height, length, ypos, xpos, file)
or
stamp(y, x, height, length, ypos, xpos, file, win)

y - the number of the first row in the art file to be stamped x - the number of the first column in the art file to be stamped

height - the number of rows in the art file to be stamped length - the number of columns in the art file to be stamped

ypos - the y postition for the top left corner of the art to be stamped xpos - the x postition for the top left corner of the art to be stamped

win - (OPTIONAL) the window you would like to stamp into

additional info about stamp():

stamp() works on its own for basic ASCII charicters.
UTF-8 chars have to be enabled by #include <locale> and declaring setlocale(LC_ALL, "") at the top of the main function. Additionaly, Capital Letter Thorn Þ is used for transparent space in the art file. This is becuase is the smallest sized chariter in UTF-8 that doent seem that important.

ColorFile - Incomplete

Art program for coloring text art and creating colorfiles for the colorstamp() function to stamp with color.