Article View: net.micro.mac
Article #796Re: SKEL for megamax 2.0
From: Joel West
Date: Thu, 21 Mar 1985 15:39
Date: Thu, 21 Mar 1985 15:39
62 lines
2456 bytes
2456 bytes
> 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@bonnie.UUCP (ihnp4!bonnie!jww)
westjw@nosc.ARPA
"The best is the enemy of the good" - A. Mullarney
Technical Details
Message-ID:
<454@bonnie.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!bonnie!jwwReferences:
<181@osu-eddie.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site bonnie.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!bonnie!jww From: jww@bonnie.UUCP (Joel West) Newsgroups: net.micro.mac,net.lang.c Subject: Re: SKEL for megamax 2.0 Message-ID: <454@bonnie.UUCP> Date: Thu, 21-Mar-85 10:39:23 EST Article-I.D.: bonnie.454 Posted: Thu Mar 21 10:39:23 1985 Date-Received: Fri, 22-Mar-85 02:48:06 EST References: <181@osu-eddie.UUCP> Organization: CACI -- La Jolla, Calif. Lines: 62