Jump to content
IGNORED

picture display methods


Recommended Posts

Many years ago I remember seeing something that I've always wanted to do but not sure how. Can anyone remember those polish or german demos that 'when putting a picture on the screen', it was displayed in some fashion such-like 'a fan' or other way of drawing up the picture different to the standard methods, or filling (in a circular fashion) from the centre of the screen to the edges. I recall several different methods other than the basic/easy methods. Anyone know?

Link to comment
Share on other sites

1 hour ago, ac.tomo said:

Many years ago I remember seeing something that I've always wanted to do but not sure how. Can anyone remember those polish or german demos that 'when putting a picture on the screen', it was displayed in some fashion such-like 'a fan' or other way of drawing up the picture different to the standard methods, or filling (in a circular fashion) from the centre of the screen to the edges. I recall several different methods other than the basic/easy methods. Anyone know?

do you mean screen wipes / swipes and transition effects ?

Link to comment
Share on other sites

Approaches are going to vary based upon whether you have a bitmap or char based screen layout.

e.g. with char based you can simply erase a cell by poking a zero (assuming that's the 'blank' character) to the screen.

With a bitmap however get get better granularity at a slightly greater price, e.g. erasing a pixel requires reading the byte, masking out the bit or bit pair required, writing it back.

 

Also note that a common way of doing things will be to have a visible and non-visible screen buffer.

So for a 'fade in' you have already prepared things with the target in the non-visible buffer and the visible buffer cleared.

The you copy across in the manner of your choosing, e.g. for a 4 colour picture you could do something along the lines off:

unsigned char mask = 0xC0;
unsigned char *vis_adr, non_vis_adr;
for (pass=0; pass<4; pass++)
{
	for (outer=0; outer<40; outer++)
	{
		vis_adr = visible_screen_base + outer;
		non_vis_adr = non_visible_screen_base + outer;
		for (inner=0; inner<192; inner++)
		{
			*vis_adr |= (*non_vis_adr & m);
			vis_adr += 40;
			non_vis_adr += 40;
		}
	}
	mask >>= 2;
}

 

To go from one picture to another would be a tweak to the copy:

 

*vis_adr = (*vis_adr & !m) | (*non_vis_adr & m);

 

Or to wipe a picture could be:

 

*vis_adr &= !m;

 

Play around. e.g. start with the mask as 0x03 and then left shift instead of right shift.

Or change the mask to 0x80 and the pass limit to 8 for a single pixel, gr.8 version.

 

For what you want to do with a 'fan' effect is effectively use a line drawing algo to say plot from the bottom centre and draw going around from bottom left to top left, then to top right, then to bottom right.

But instead of a plot to colour zero (for a wipe) it would instead copy the equivalent pixel from the non visible screen.

 

You can do a similar thing with fonts too. E.g. take a copy of the font and switch to that.

Then use some loops to slowly eat away pixels from the character data.

E.g. in an 8x8 cell, dissolve from the top left corner.

unsigned char mask= 0x7F, *fnt;
for (pass=0; pass<8; pass++)
{
	for (outer=0; outer<128; outer++)
	{
		fnt = fontbase + (outer * 8);
		for (inner=0; inner<pass; inner++)
		{
			*fnt++ &= mask;
		}
	}
	mask /= 2;
}

(caveat:  these code snippets have only been run in my head ;))

 

Edited by Wrathchild
fixed font example
Link to comment
Share on other sites

Thats a great demo, wish I understood algorythms. But, yes, thats exactly what I mean. Most of the transition effects there are relatively easy, but the one I don't understand how to do is the circular wipe where the line rotates bringing in the 1 picture from the other, exactly how would this be achieved? 

Link to comment
Share on other sites

18 hours ago, ac.tomo said:

but the one I don't understand how to do is the circular wipe where the line rotates bringing in the 1 picture from the other, exactly how would this be achieved? 

It's not easy. Some background info here:

https://atariage.com/forums/topic/173733-jacs-sillyventure-contribution/?do=findComment&comment=2156593

 

(and following posts)

 

 

Edited by Irgendwer
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...