stimpyzu, the simplest solution is to write a bitmap lookup function to change or test bits in a two dimensional array of bits. Then all of your homework consists of scanning one bitmap to generate another bitmap. :)
``````; Flip Horizontally
FOR Y = 0 TO (HEIGHT-1)
FOR X = 0 TO (WIDTH-1)
I = BITMAP(SOURCE,X,Y)
BITMAP(DESTINATION,(WIDTH-X-1),Y) = I
NEXT X
NEXT Y``````
Many types of transformations would be trivial to code, and you would learn more elements of programming by using a more vertical solution.
Posted on 2003-11-20 21:01:53 by bitRAKE
I don't know exactly how to write a bitmap look up function :(

So this is what I got and it doesn't work

``````
CLR.L   D0
MOVE.L  #16,D2        ;Set counter for number of lines (row)
MOVE.L  #16,D4        ;Set counter for shifting (column)
AGAIN3 MOVE.W  (A0)+,D0      ;Load source
ROXL.W  D4,D0         ;Rotate bit D4 number of times
SUBQ    #1,D2         ;Go down one line
BNE     AGAIN3        ;If still lines do again
MOVE.W  D0,D1         ;Move answer to D1
MOVE.W  #\$0C00,A0     ;Re-points to first line of image
MOVE.L  #16,D2        ;Re-set counter for number of lines (row)
SUBQ    #1,D4         ;Decrement counter for shifting (next column)
BNE     AGAIN
``````

I thought I could rotate the bits and make them come back one at a time with ROXL but it's not working........ so I guess I still don't know how to save the bits bit by bit in order to bring them back to give me my rows

So, I'm still working on it!!!!
Posted on 2003-11-21 14:06:37 by stimpyzu
I GOT IT!! It may not be very elegant, but it works!!!

Thank you everyone who helped. You really did help, I would still be scratching my head if it wasn't for you guys. Thanks a million!!! It is truly appreciated. :alright:

``````
MOVE.L  #16,D2        ;Set counter for number of lines
MOVE.L  #16,D4        ;Set counter for shifting
AGAIN3 MOVE.W  (A0)+,D0      ;Load source
LSR.W   D4,D0         ;Shift bit D4 number of times
ROXL    #1,D5         ;Bring back bit, store it in D5
SUBQ    #1,D2         ;Go down one line
BNE     AGAIN3        ;If still lines do again
MOVE.W  D5,-(A1)      ;Store source to destination
MOVE.W  #\$0C00,A0     ;Re-points to first line of image
MOVE.L  #16,D2        ;Re-set counter for number of lines
SUBQ    #1,D4         ;Decrement counter for shifting
BNE     AGAIN3
``````

Have a nice weekend everyone!!!
Posted on 2003-11-21 17:35:56 by stimpyzu