Glider4/Glider_405/Sources/G-IdleUtils.p

1 line
32 KiB
OpenEdge ABL
Raw Normal View History

unit IdleUtils; interface uses Palettes, Globals, GlobalUtils; var ozmaFlags: array[0..3] of Boolean; procedure CloseHiScores; procedure NewMode (randomIt: Boolean); procedure DisplayAHelpScreen; procedure CloseHelpScreens; procedure NextPageHelpScreens; procedure OpenHelpScreens; procedure InitIdle; procedure DoIdle; procedure DropIdle; procedure DoAbout; procedure DoSoundSettings; procedure DoCustomizeKeys; {=================================} implementation var idleR1, idleR2, frameR, loadR: Rect; maskRgn: RgnHandle; colorPoint, loopDelay, screenNum, helpScreenNum: Integer; timeWas, tickStamp: LongInt; demoAnimate: animateRec; {=================================} procedure CloseHiScores; begin if (inColor) then CopyBits(BitMapPtr(virginCPtr^.portPixMap^)^, GrafPtr(mainWndo)^.portBits, wholeArea, wholeArea, srcCopy, wholeRgn) else CopyBits(offVirginMap, mainWndo^.portBits, wholeArea, wholeArea, srcCopy, wholeRgn); NewMode(TRUE); end; {=================================} procedure NewMode; var tempR, smallR: Rect; {----------------} procedure GetTheStrings (starting: Integer); var tempStr: Str255; begin if (inColor) then RGBForeColor(rgbBlue) else TextMode(srcXOr); MoveTo(300, 57); GetIndString(tempStr, rDemoStrIDs, starting); DrawString(tempStr); MoveTo(300, 70); GetIndString(tempStr, rDemoStrIDs, starting + 1); DrawString(tempStr); MoveTo(300, 83); GetIndString(tempStr, rDemoStrIDs, starting + 2); DrawString(tempStr); MoveTo(300, 96); GetIndString(tempStr, rDemoStrIDs, starting + 3); DrawString(tempStr); if (inColor) then RGBForeColor(rgbBlack) else PenNormal; end; {----------------} begin if (randomIt) then demoMode := Randomize(lastDemo) + 1; UseResFile(gliderResNum); if (inColor) then SetPort(GrafPtr(virginCPtr)) else SetPort(offVirginPort); PenNormal; SetRect(tempR, 298, 20, 508, 100); FillRect(tempR, black); TextFont(16); TextSize(12); case demoMode of balloonMode: begin with demoAnimate do begin phase := 0; kind := 2; vertOff := 4; destRect := animateRct[kind, phase]; OffsetRect(destRect, -destRect.left, -destRect.top); OffsetRect(destRect, 460, 45); oldRect := destRect; wholeRect := destRect; end; GetTheStrings(1); end; copterMode: begin with demoAnimate do begin phase := 0; kind := 1; vertOff := 3; destRect := animateRct[kind, phase]; OffsetRect(destRect, -destRect.left, -destRect.top); OffsetRect(destRect, 460, 45); oldRect := destRect; wholeRect := destRect; end; GetTheStrings(5); end; dartMode: begin with demoAnimate do begin phase := 0; kind := 0; vertOff := 4; destRect := animateRct[kind, phase]; OffsetRect(destRect, -destRect.left, -destRect.top); OffsetRect(destRect, 435, 45); oldRect := destRect; wholeRect := destRect; end; GetTheStrings(9); end; controlMode: GetTheStrings(13); tabMode: GetTheStrings(17); adMode: GetTheStrings(21); editorMode: GetTheStrings(25); colorMusicMode: GetTheStrings(29); ventCandleMode: begin GetTheStrings(33); smallR := SrcRect[flrVnt]; OffsetRect(smallR, -smallR.left, -smallR.top); OffsetRect(smallR, 456, 51); if (inColor) then CopyMask(BitMapPtr(objectCPtr^.portPixMap^)^, offMaskMap, BitMapPtr(virginCPtr^.portPixMap^)^, SrcRect[flrVnt], SrcRect[flrVnt], smallR) else CopyMask(offPlayerMap, offMaskMap, offVirginMap, SrcRect[flrVnt], SrcRect[flrVnt], smallR); smallR := SrcRect[candle]; OffsetRect(smallR, -smallR.left, -smallR.top); OffsetRect(smallR, 466, 75); if (inColor) then CopyMask(BitMapPtr(objectCPtr^.portPixMap^)^, offMaskMap, BitMapPtr(virginCPtr^.portPixMap^)^, SrcRect[candle], SrcRect[candle], smallR) else CopyMask(offPlayerMap, offMaskMap, offVirginMap, SrcRect[candle], SrcRect[candl