You are not logged in -
nap
CSDb User Forums
Forums
>
C64 Coding
>
Text (screen) box drawing algorithm
2003-02-13
13:57
Dr. Jay
Account closed
Registered: Jan 2003
Posts: 32
Text (screen) box drawing algorithm
Anyone have a nice, fast box drawing algorithm for the screen? What I'm trying to do is make a sort of kaleidoscope representation of data.
Let's say I have this sequence: XYXZZ
Then on the screen I would want to render (centered):
ZZZZZZZZZZ
ZZZZZZZZZZ
ZZXXXXXXZZ
ZZXYYYYXZZ
ZZXYXXYXZZ
ZZXYYYYXZZ
ZZXXXXXXZZ
ZZZZZZZZZZ
ZZZZZZZZZZ
I'm assuming I can do it with some mirrorored line-drawing, etc, but I feel like I'm overcomplicating the code. I know how to draw a line, what I'm more interested in is the algorithm to map the sequence to the individual boxes.
Thanks,
Jay
2003-02-13
19:33
WVL
Registered: Mar 2002
Posts: 903
why not RLE encode the data?
so put the data like this in your code :
16 01 02 02 -> 16 times y, then 2 times x etc..
also put in a code for enter/return and just output the data with chrout or something...
Werns
2003-02-13
19:44
Dr. Jay
Account closed
Registered: Jan 2003
Posts: 32
I actually figured it out .. pretty stupid. I'm getting used to it. I just defined the upper left corner. I have a 24 x 24 grid which is really a 12 x 12 quad mirrored over each corner. So by definining the upper left corner, I simply increment in steps of 41 until I hit the middle, then draw the top, bottom, left, and right lines simultaneously - the top, bottom can use an index and the left, right use addition.
Jeremy
Refresh
Subscribe to this thread:
You need to be logged in to post in the forum.
Search the forum:
Search
All forums
C64 Coding
C64 Composing
C64 Pixeling
C64 Productions
CSDb Bug Reports
CSDb Development
CSDb Discussions
CSDb Entries
CSDb Feedback
CSDb Info
CSDb moderators
CSDb Questions
Messages to moderators
Requests
for
in
Writer & text
Text
Writer
All times are CET.
Search CSDb
All
Releases
Groups
Sceners
Events
BBS
SIDs
-------
Forum
Comments
Advanced
Users Online
Xiny6581/Pretzel Log..
Guests online: 144
Top Demos
1
Next Level
(9.7)
2
13:37
(9.7)
3
Coma Light 13
(9.6)
4
Edge of Disgrace
(9.6)
5
Mojo
(9.6)
6
Uncensored
(9.6)
7
The Demo Coder
(9.6)
8
Comaland 100%
(9.6)
9
Wonderland XIV
(9.6)
10
What Is The Matrix 2
(9.6)
Top onefile Demos
1
Layers
(9.7)
2
Cubic Dream
(9.6)
3
Party Elk 2
(9.6)
4
Copper Booze
(9.6)
5
Rainbow Connection
(9.5)
6
Morph
(9.5)
7
Dawnfall V1.1
(9.5)
8
Libertongo
(9.5)
9
Katzen-Video.mp4
(9.5)
10
Onscreen 5k
(9.5)
Top Groups
1
Booze Design
(9.3)
2
Oxyron
(9.3)
3
Performers
(9.3)
4
Fairlight
(9.3)
5
Triad
(9.3)
Top Logo Graphicians
1
t0m3000
(10)
2
Sander
(9.8)
3
Mermaid
(9.5)
4
Shine
(9.4)
5
Pal
(9.4)
Home
-
Disclaimer
Copyright © No Name 2001-2025
Page generated in: 0.187 sec.