home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-06-03 | 1.8 KB | 76 lines | [TEXT/PJMM] |
- {Generic Graphics Module}
-
- {A very simple graphics module for After Dark™}
- { This source file can be used as is for both Think Pascal 4.0 and MPW Pascal 3.0 }
- { by Patrick Beard and Bruce Burkhalter }
- { © 1989, 90, 91 Berkeley Systems Inc . }
-
- unit GraphicsDemo;
-
- interface
-
- uses
- Quickdraw, Sound, GraphicsModuleTypes;
-
- function DoInitialize (var storage: Handle; blankRgn: rgnHandle; params: GMParamBlockPtr): OSErr;
-
- function DoBlank (storage: Handle; blankRgn: rgnHandle; params: GMParamBlockPtr): OSErr;
-
- function DoDrawFrame (storage: Handle; blankRgn: rgnHandle; params: GMParamBlockPtr): OSErr;
-
- function DoClose (storage: Handle; blankRgn: RgnHandle; params: GMParamBlockPtr): OSErr;
-
- function DoSetup (blankRgn: rgnHandle; message: integer; params: GMParamBlockPtr): OSErr;
-
- implementation
-
- function DoInitialize (var storage: Handle; blankRgn: rgnHandle; params: GMParamBlockPtr): OSErr;
- begin
-
- {Allocate memory and initialize variables here}
-
- DoInitialize := noErr;
-
- end;
-
- function DoBlank (storage: Handle; blankRgn: rgnHandle; params: GMParamBlockPtr): OSErr;
-
- begin
-
- {Blank the screen. You could also have "credits" appear on the screen here}
-
- FillRgn(blankRgn, params^.qdGlobalsCopy^.qdBlack);
- DoBlank := noErr;
-
- end;
-
-
- function DoDrawFrame (storage: Handle; blankRgn: rgnHandle; params: GMParamBlockPtr): OSErr;
-
- begin
-
- {This function is repeatedly called by After Dark. This is where the main drawing is done.}
-
- DoDrawFrame := noErr;
-
- end;
-
- function DoClose (storage: Handle; blankRgn: RgnHandle; params: GMParamBlockPtr): OSErr;
- begin
-
- {Deallocate your memory here. You can also put something on the screen.}
-
- DoClose := noErr;
-
- end;
-
- function DoSetup (blankRgn: rgnHandle; message: integer; params: GMParamBlockPtr): OSErr;
- begin
-
- {This is called when the used clicks on a button in the Control Panel.}
-
- DoSetup := noErr;
-
- end;
-
- end.