• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

Another Mac Classic II app

Crutch

Well-known member
I sort of figured. Cool. So you wrote assembly code to rotate each character by a lot of different angles, saved the rotated characters in an offscreen bitmap, then blit them to the screen as needed?

 

AbelVincze

Active member
I sort of figured. Cool. So you wrote assembly code to rotate each character by a lot of different angles, saved the rotated characters in an offscreen bitmap, then blit them to the screen as needed?
Yes, kind of.

Every drawing on the screen is done by direct accessing the VIdeo RAM, and i use the less possible system calls, especially in case of accessing the screen, as it would be too slow. I will translate the source file comments, so it will be easier to explore it in case of interest.

 

AbelVincze

Active member
Yep makes sense. Would be fun to review your source. Very cool demo!
Thank you!

I sort of figured. Cool. So you wrote assembly code to rotate each character by a lot of different angles, saved the rotated characters in an offscreen bitmap, then blit them to the screen as needed?
It's a bit more complicated because of the timing: i have to clear the previous frame, and redraw the new one.

I have two set of buffered (rotated and shifted graphic) characters, and they are ordered in ascending Y position.

This is how the tasks are done in a single frame:

- waiting for VBL

- Drawing (new buffer's content)/ereasing (old buffer's content) from top to bottom order

- switching buffers

- calculating new coordinates

- rendering NEW buffer content

 
Top