Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!think!bloom-beacon!tut.cis.ohio-state.edu!osu-cis!dsacg1!dsacg2!nor1675 From: nor1675@dsacg2.UUCP (Michael Figg) Newsgroups: comp.sys.amiga Subject: Lattice C routine Message-ID: <197@dsacg2.UUCP> Date: 3 May 88 11:35:29 GMT Organization: Defense Logistics Agency Systems Automation Center, Columbus, OH Lines: 110 Keywords: wont go I am trying to run a simple program from an old copy of Amazing Computing (Vol 2, Num 10 "Quick and Dirty Bobs", by Michael Swinger) on Lattice 4.0 with no luck. The program is to run under intuition and just display a simple bob. All i get is a blank screen with a close gadget. Here are relevant (hopefully) pieces of the program: #define RP1 Window1->RPort VOID Drawit(); . . void Open_Libraries(),Open_Screens(),Init_Bobs(),Cleanup(); /* added to get program to compile under Lattice */ USHORT colormap[32] = { 0x0ccd,0x0585,0x0f79,0x0f30,0x0f9b, . . 0x0fff,0x0000 }; short Image_data1[130] = { /* Width: 18 (pixels) Height: 13 (pixels) Depth: 5 (planes) */ 0x0000,0x0000,0x0000,0x0000,0x0080, 0x0000,0x0080,0x0000,0x0080,0x0000, . . . 0x0000,0x0000,0x0000,0x0000,0x0000}; . . . VOID main() /* VOID added for Lattice */ { Open_Libraries(); Open_Screens(); Init_Bobs(); Drawit(); Cleanup(); } void Open_libraries() { IntuitionBase = etc GfxBase = etc } void Open_Screens() { Screen1 = OpenScreen(&NewScreen1); NewWindow1.Screen = Screen1; Window1=OpenWindow(&NewWindow1); WVP1 = (struct ViewPort *)ViewPortAddress(Window1); LoadRGB4(WVP1,&colormap,32); /* return; */ /* removed for Lattice */ } void Init_Bobs() { gelsinfo.nextLine = NULL; gelsinfo.lastColor = NULL; gelsinfo.collHandler = NULL; RP1->GelsInfo = &gelsinfo; v1.VSBob=&b1; InitGels(&s1, &s2, &gelsinfo); InitMasks(&v1); v1.X = 25; v1.Y = 75; AddBob(&b1,RP1); /* return; */ } void Cleanup() { Wait(1<UserPort->mp_SigBit); CloseWindow(Window1); . . } VOID Drawit() { SortGList(RP1); WaitTOF(); DrawGList(RP1,WVP1); } I am suspect of this last module but am not familiar with the functions and have not found much about them in the Intuition Manual. Do they return something that I am missing and need to be defined and/or declared? Does anybody see anything obvious? The author lives here in Columbus but unfortunately doesn't know anything about Lattice. I am also sending a similar posting to the Lattice BBS and see if they can help but I wanted to cover as many bases as possible. Thanks, -- "Don't quote me on this!" Michael Figg DLA Systems Automation Center Columbus, Oh. (614)-238-9036