Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!bu.edu!m2c!risky.ecs.umass.edu!umaecs!farmer From: farmer@ecs.umass.edu (THE MAD MUSKRAT) Newsgroups: comp.sys.mac.programmer Subject: Problem with Think C and Polygons! Message-ID: <13974.2857e2a1@ecs.umass.edu> Date: 13 Jun 91 21:24:49 GMT Lines: 44 Hi, I am trying to work with the Toolbox in Think C and having trouble with polygons. I am trying to load a number of polygons from a resource (actually, load the points and doing LineTo's to make polygons). The problem is this: In Quickdraw.h the pascal function OpenPoly is defined, but the rest of the polygon functions aren't. I realize that openpoly is the only function that returns a value, but the other functions won't work. If I use ClosePoly to end the polygon definition I get a compiler error: Invalid use of inline function. What does that mean?? The code looks like: void LoadLevel (level, theWell) int level; PolyHandle theWell[]; { int notDone = 1; Handle res; res = GetResource ('LEVL', level); if (!res) exit(1); for (segments=0; notDone; segments++) { theWell[segments] = OpenPoly(); MoveTo(*(*res+(8*segments)),*(*res+(8*segments+1))); LineTo(*(*res+(8*segments+2)),*(*res+(8*segments+3))); LineTo(*(*res+(8*segments+4)),*(*res+(8*segments+5))); LineTo(*(*res+(8*segments+6)),*(*res+(8*segments+7))); ClosePoly; if (*(*res+(8*segments+4)) == 0 && *(*res+(8*segments+5)) == 0) notDone=0; }; } Anyone who cares to give me a hint is welcome (yes, I know the programming style is slightly crude, but it is a first shot at C). thanks, Matt Farmer ---------------------------------------------------------------------- internet: farmer@ecs.umass.edu farmer@saturn.ucc.umass.edu