When you are lazy...

Joined
Jan 1, 2025
Messages
6
Reaction score
0
I program in pascal, but it's fairly close to C. I'm working on some clones of old video games in DosBox. I used the 640x480 16 color graphics that is a standard in the graphic library that shipped with Borland Pascal. I wanted to give 320x200 256 colors a shot so I got some code on the net to initialize as well as a putpixel routine. Using this info I started my graphics "library."

After working on it yesterday I realized I had no way to output text. So today using the standard graphic library I have, I generated characters, then read them off the screen and stored each one in an 8x8 array, and then because I am really lazy I used the info to write the arrays as constants in a text file which I then copied and pasted into my code. Beats working, lol.
 
Joined
Sep 21, 2022
Messages
205
Reaction score
28
I'm too lazy for 8 by 8, I do 8 by 1.
Code:
00000000 = &H00
11000011 = &HC3
01100110 = &H66
00111100 = &H3C
00011000 = &H18
00011000 = &H18
00011000 = &H18
00011000 = &H18

Y = [0,195,102,60,24,24,24,24]
 
Joined
Jan 1, 2025
Messages
6
Reaction score
0
I'm too lazy for 8 by 8, I do 8 by 1.
Code:
00000000 = &H00
11000011 = &HC3
01100110 = &H66
00111100 = &H3C
00011000 = &H18
00011000 = &H18
00011000 = &H18
00011000 = &H18

Y = [0,195,102,60,24,24,24,24]
Here's my lower case y that was generated, lol


CharGeny : array[0..7,0..7] of byte =
((0,0,0,0,0,0,0,0),
(0,0,0,0,0,0,0,0),
(1,1,0,0,0,1,1,0),
(1,1,0,0,0,1,1,0),
(1,1,0,0,1,1,1,0),
(0,1,1,1,0,1,1,0),
(0,0,0,0,0,1,1,0),
(0,1,1,1,1,1,0,0));
 
Joined
Sep 21, 2022
Messages
205
Reaction score
28
To be honest, my character cells are 24 by 49, and I have to use a large integer for every pixel because the interpreter I'm using is doing anti-aliasing (a mixture of colours) when it prints, to make the font appear crisp.

I prefer text, I hate graphics, I like my text huge, so there's a little bit of irony happening when I use texture mapping to magnify my text.

There is a font that uses the 7 segment LCD displays on old calculators and electronics.

I kind of like it. It takes a bit of getting used to, but it means that each character can be defined in one byte. (1 by 1)
 
Last edited:

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,125
Messages
2,570,748
Members
47,302
Latest member
MitziWragg

Latest Threads

Top