SKEL for megamax 2.0

Joel West jww at bonnie.UUCP
Fri Mar 22 01:39:23 AEST 1985


> The qdvars.h file now is structured so there is one global, "qdvars", that
> contains all of the qdvars.
> 
> You will have to fix the references to white, black, dkgray, and screenbits.
> They will now read qdvars.white, qdvars.black, etc...
> 
> -- 
> 		Tom (Flip) Phillips
>     		The Ohio State University
> 		osu-eddie!tepj

NO NO NO NO NO!!!

I have already converted the qdvars.h file for use under 2.0.  For whatever
reason, the changes made by the Megamax folks put the burden back on you.
They force you to learn a non-standard toolbox interface.  (***FLAME WARNING***)
This is wrong.

If you look at your <qdvars.h> you will note that even they know this.
Look at "theport" which is used all the time.  Instead they declare it as

	typedef struct {
		   ...
	  grafptr qdtheport;
	} qdvar;

	#define theport (qdvars.qdtheport)

So instead, when you use the standard QuickDraw terminology "theport" that's 
what you'll get.  DO the same for the standard patterns, screenbits, and 
randseed:

	typdef struct {
		   ...
	   long qdrandseed;
	   bitmap qdscrnbits;
		   ...
	   pattern qddkgray;
	   pattern qdltgray;
	   pattern qdgray;
	   pattern qdblack;
	   pattern qdwhite;

	#define randseed (qdvars.qdrandseed)
	#define screenbits (qdvars.qdscrnbits)
	#define dkgray (qdvars.qddkgray)
		and so on

This way, the skel.c will almost work (except for the previously
noted C-string problem) without any mucking of the source.  More
importantly, standard Pascal and C examples from other systems --
including Apple's own demos -- will port with much less hassle.

And if Megamax knows what they're doing, that's what the <qdvars.h>
will look like in 2.1.
-- 
	Joel West				     (619) 457-9681
	CACI, Inc. - Federal 3344 N. Torrey Pines Ct La Jolla 92037
	jww at bonnie.UUCP (ihnp4!bonnie!jww)
	westjw at nosc.ARPA

   "The best is the enemy of the good" - A. Mullarney



More information about the Comp.lang.c mailing list