| |
Rudi Account closed
Registered: May 2010 Posts: 125 |
Fast way to rotate a char?
Im not talking about rol or ror, but swap bits so that they are rotated 90 degrees:
Example:
a char (and the bits can be random):
10110010 byte 1..
11010110 byte 2.. etc..
00111001
01010110
11011010
10110101
00110011
10110100 after "rotation" (rows and columns are swapped):
11001101
01011000
10100111
11111111
00101000
01010101
11011010
00100110 is it possible to use lookup tables for this or would that lookup table be too big?
or other lookuptable for getting and setting bits?
-Rudi |
|
... 105 posts hidden. Click here to view all posts.... |
| |
Cruzer
Registered: Dec 2001 Posts: 1048 |
Wow, that's some sick, slick code, Axis. No way I can understand it right now, but I'll look into it if I ever get the need. Did we determine the resolution btw? I'm guessing singlecolor, since you can't do a lossless rotation of a multicolor char, unless it's 2x2. |
| |
Axis/Oxyron Account closed
Registered: Apr 2007 Posts: 91 |
I was assuming hires 8x8 chars. That makes the most sense and is the most interesting challenge. And looks like it´s what Rudi is watching for. |
| |
Rudi Account closed
Registered: May 2010 Posts: 125 |
yes, i was initially looking at hires 8x8 char.
Edit: current techniques just seem too slow for many chars. wished someone could do some magic tricks :) |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Btw, Axis is talking about this (from Mikael Kalms): http://www.lysator.liu.se/~mikaelk/doc/c2ptut/ |
| |
Axis/Oxyron Account closed
Registered: Apr 2007 Posts: 91 |
Thanks for sharing my link jacky.^^ |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: Thanks for sharing my link jacky.^^
Jesus, I'm tired... |
| |
Oswald
Registered: Apr 2002 Posts: 5086 |
Quote: Btw, Axis is talking about this (from Mikael Kalms): http://www.lysator.liu.se/~mikaelk/doc/c2ptut/
huh, that needs a relaxed state and time to have it sink in :) |
| |
chatGPZ
Registered: Dec 2001 Posts: 11360 |
JackAsser is halfway there apparently :=) |
| |
Axis/Oxyron Account closed
Registered: Apr 2007 Posts: 91 |
When he is through, its time to go Amigaaaah!!! |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: When he is through, its time to go Amigaaaah!!!
Haha, I got semi tired of it after setting up that HAM8-mode. :) But it was a fun excercies and fun to figure out the bitpatterns myself, then you told me, and I was actually correct (for once). |
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 - Next |