Rashumon – interface.c source code

Saturday, April 2nd, 1994
#include <intuition/intuition.h>
#include <graphics/gfxbase.h>
#include <libraries/dos.h>
#include <exec/memory.h>
#include <graphics/displayinfo.h>

#include "rashumon.h"
WORD pens[]={~0};
struct Screen *pWB=0;
LONG idWB=0;
ULONG lace=0;
OpenMainScreen()
{
	Screen=0;

	while(!Screen)
	{
		Screen = (struct Screen *)OpenScreenTags((struct NewScreen *)0,
	        SA_Width,       -1,
	        SA_Height,      -1,
	        SA_Depth,       SU.Planes,
	        SA_DisplayID,   SU.Lace,
	        SA_Title, 	Title,
	        SA_Pens,        (ULONG)pens,
		SA_Font,	&hfn,
	        TAG_END);
		if(!Screen)
		{
			struct Screen *pWB=(struct Screen *)0;
			if ((pWB = LockPubScreen("Workbench")) == NULL) 
			{
				printf("No WB screen\n");
				break;
			}
			lace = (ULONG) GetVPModeID(&(pWB->ViewPort));
			if(lace!=SU.Lace)
				SU.Lace=lace;
			else
				break;
		}
	}
	if (pWB != NULL)            
		UnlockPubScreen(NULL, pWB);

	return(Screen);
}
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: