diff --git a/docs/AUTHORS.txt b/docs/AUTHORS.txt
index 0b26ac7a4..12410c994 100644
--- a/docs/AUTHORS.txt
+++ b/docs/AUTHORS.txt
@@ -6,7 +6,7 @@ Copyright (c) 2002-2024
Various contributors (see below, and CHANGES.txt)
https://tuxpaint.org/
-June 17, 2002 - September 26, 2024
+June 17, 2002 - September 27, 2024
* Design and Coding:
@@ -197,10 +197,10 @@ June 17, 2002 - September 26, 2024
Creative Commons 0 by lorefold
- "ASCII Typewriter" & "ASCII Computer" magic tools
+ "ASCII Typewriter" & "ASCII Computer" & "ASCII Color Computer" magic tools
by Bill Kendrick
- "ASCII Computer" font: IBM CGA Adapter
+ "ASCII Computer" & "ASCII Color Computer" font: IBM CGA Adapter
taken from "Typography in 16-bits: System fonts" by Damien Guard
diff --git a/docs/CHANGES.txt b/docs/CHANGES.txt
index d9c518cb5..bd05eed30 100644
--- a/docs/CHANGES.txt
+++ b/docs/CHANGES.txt
@@ -31,11 +31,12 @@ https://tuxpaint.org/
+ Closes https://sourceforge.net/p/tuxpaint/feature-requests/260/
- * WIP "ASCII Typewriter" & "ASCII Computer", turn your drawing into
- ASCII art.
+ * WIP "ASCII Typewriter", "ASCII Computer", & "ASCII Color Computer":
+ turn your drawing into ASCII art.
+ TODO Sound effects
+ TODO Icons
+ TODO Documentation
+ + TODO "Color Computer" color support
+ Code by Bill Kendrick
+ Computer font: IBM CGA Adapter
taken from "Typography in 16-bits: System fonts"
diff --git a/magic/icons/ascii-computer.png b/magic/icons/ascii-computer.png
index 49c2a63d6..a43c18b1d 100644
Binary files a/magic/icons/ascii-computer.png and b/magic/icons/ascii-computer.png differ
diff --git a/magic/icons/ascii-typewriter.png b/magic/icons/ascii-typewriter.png
index e416408fa..de9d99790 100644
Binary files a/magic/icons/ascii-typewriter.png and b/magic/icons/ascii-typewriter.png differ
diff --git a/magic/src/ascii.c b/magic/src/ascii.c
index 093d149c1..d446666aa 100644
--- a/magic/src/ascii.c
+++ b/magic/src/ascii.c
@@ -96,7 +96,7 @@ int ascii_char_maxwidth[NUM_TOOLS];
int ascii_char_brightness[NUM_TOOLS][MAX_CHARS];
SDL_Surface * ascii_snapshot = NULL;
int ascii_size;
-Uint8 ascii_r,ascii_g, ascii_b;
+Uint8 ascii_r, ascii_g, ascii_b;
Uint32 ascii_api_version(void);
@@ -368,15 +368,22 @@ void ascii_click(magic_api * api, int which, int mode,
{
int xx, yy;
+ api->playsound(ascii_snd[which], (x * 255) / canvas->w, 255);
+
for (yy = 0; yy < canvas->h; yy++)
+ {
for (xx = 0; xx < canvas->w; xx++)
+ {
do_ascii_effect(api, which, canvas, last, xx, yy);
+ }
+ if (yy % 10 == 0)
+ api->update_progress_bar();
+ }
update_rect->x = 0;
update_rect->y = 0;
update_rect->w = canvas->w;
update_rect->h = canvas->h;
- api->playsound(ascii_snd[which], (x * 255) / canvas->w, 255);
}
}
@@ -453,15 +460,18 @@ int ascii_modes(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED)
Uint8 ascii_accepted_sizes(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED)
{
- return 6;
+ if (mode == MODE_PAINT)
+ return 6;
+ else
+ return 0;
}
Uint8 ascii_default_size(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode)
{
if (mode == MODE_PAINT)
return 3;
-
- return 1;
+ else
+ return 0;
}
void ascii_set_size(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED,
@@ -547,14 +557,14 @@ void do_ascii_effect(void *ptr, int which, SDL_Surface * canvas, SDL_Surface * l
gg /= (w * h);
bb /= (w * h);
- /* FIXME: Map to computer color */
+ /* FIXME: Map to the best computer color */
}
else
{
/* Use the user-chosen color */
rr = ascii_r;
- gg = ascii_b;
- bb = ascii_g;
+ gg = ascii_g;
+ bb = ascii_b;
}