diff --git a/src/main.pas b/src/main.pas index fdfc3b5..1bfcfbb 100644 --- a/src/main.pas +++ b/src/main.pas @@ -6,6 +6,7 @@ err: OSErr; totalRead: Longint; pnt: Point; + bmap: BitMap; var { window } windowRect: Rect; @@ -114,6 +115,7 @@ prompt: Str255; sfTypes: SFTypeList; begin + Cleanup; SFGetFile(pnt, prompt, nil, -1, sfTypes, nil, reply); if not reply.good then Exit(SelectInputFile); @@ -157,7 +159,6 @@ {>>} procedure DrawFile; var - bmap: BitMap; headerPtr: ^Longint; header: Longint; width, height: Integer; @@ -185,7 +186,7 @@ ClosePicture; ShowWindow(window); DrawPicture(pic, clip); - Cleanup; + CloseFile; end; { Window ---------------------------------------- } @@ -206,7 +207,7 @@ {>>} procedure Redraw; begin - Writeln('REDRAW'); + CopyBits(bmap, thePort^.portBits, bmap.bounds, bmap.bounds, srcCopy, nil); end; {>>} @@ -286,9 +287,6 @@ {>>} procedure HandleNull; begin - GetDateTime(gCurrentTime); - if gCurrentTime <> gOldTime then - Writeln('something'); end; {>>}