| CODE |
| // FadeEffect MinimumBuild 1230 Gosub Start :Loop SetFunc Input IQPeekMsgID If %Input% != "" Gosub InputHandler Gosub DrawEffect Gosub GetFade Sub Intensity 4 Goto Loop :InputHandler IQWaitMsg Any If %MSG_ID% == UI_BACK Then Quit Else BeginDraw Text 320 250 Center "Fade Effect by flattspott" Red EndDraw IQClear IQWaitMsg Any EndIf Return :Start Set Intensity 255 Gosub GetColors Gosub GetBoxes Return :GetColors For J = 0 To 5 For I = 0 To 2 SetFunc ColorPart%I% CvtToBase 16 2 %($rand%255)% Next Set Color%J% %ColorPart0%%ColorPart1%%ColorPart2% Next Return :GetFade If# %Intensity% <= 0 Then Gosub Start Else SetFunc Fade CvtToBase 16 2 %Intensity% EndIf Return :GetBoxes For X = 0 To 5 Set BoxLeft%X% %($rand%640)% Set BoxTop%X% %($rand%480)% Set BoxHeight%X% %($rand%480)% Set BoxWidth%X% %($rand%640)% Next Return :DrawEffect BeginDraw Box %BoxLeft0% %BoxTop0% %BoxHeight0% %BoxWidth0% 0x%Fade%%Color0% 0x%Fade%%Color0% Box %BoxLeft1% %BoxTop1% %BoxHeight1% %BoxWidth1% 0x%Fade%%Color1% 0x%Fade%%Color1% Box %BoxLeft2% %BoxTop2% %BoxHeight2% %BoxWidth2% 0x%Fade%%Color2% 0x%Fade%%Color2% Box %BoxLeft3% %BoxTop3% %BoxHeight3% %BoxWidth3% 0x%Fade%%Color3% 0x%Fade%%Color3% Box %BoxLeft4% %BoxTop4% %BoxHeight4% %BoxWidth4% 0x%Fade%%Color4% 0x%Fade%%Color4% Box %BoxLeft5% %BoxTop5% %BoxHeight5% %BoxWidth5% 0x%Fade%%Color5% 0x%Fade%%Color5% EndDraw Return |
| CODE |
| // FadeEffect In & Out MinimumBuild 1230 Set SwitchFades 0 Gosub GetColorsOut Gosub GetBoxesOut Gosub Start :Loop SetFunc Input IQPeekMsgID If %Input% != "" Gosub InputHandler Gosub DrawEffect Gosub GetFade Goto Loop :InputHandler IQWaitMsg Any If %MSG_ID% == UI_BACK Then EndDraw Quit Else BeginDraw Text 320 250 Center "Fade Effect by flattspott (w/slight change by SumDumGuy)" Red EndDraw IQClear IQWaitMsg Any EndIf Return :Start If# %SwitchFades% == 1 Then Set IntensityOut 0 Set IntensityIn 255 Gosub GetColorsOut Gosub GetBoxesOut Else Set IntensityOut 255 Set IntensityIn 0 Set SwitchFades 0 Gosub GetColorsIn Gosub GetBoxesIn EndIf Return :GetColorsIn For J = 0 To 2 For I = 0 To 2 SetFunc ColorPart%I% CvtToBase 16 2 %($rand%255)% Next Set Color%J% %ColorPart0%%ColorPart1%%ColorPart2% Next Return :GetColorsOut For J = 3 To 5 For I = 0 To 2 SetFunc ColorPart%I% CvtToBase 16 2 %($rand%255)% Next Set Color%J% %ColorPart0%%ColorPart1%%ColorPart2% Next Return :GetFade If# %IntensityOut% <= 0 Then Set SwitchFades 1 GoSub Start EndIf If# %IntensityOut% >= 255 Then Set SwitchFades 0 GoSub Start EndIf If# %SwitchFades% == 0 Then Sub IntensityOut 4 Add IntensityIn 4 Else Add IntensityOut 4 Sub IntensityIn 4 EndIf SetFunc FadeOut CvtToBase 16 2 %IntensityOut% SetFunc FadeIn CvtToBase 16 2 %IntensityIn% Return :GetBoxesIn For X = 0 To 2 Set BoxLeft%X% %($rand%640)% Set BoxTop%X% %($rand%480)% Set BoxHeight%X% %($rand%480)% Set BoxWidth%X% %($rand%640)% Next Return :GetBoxesOut For X = 3 To 5 Set BoxLeft%X% %($rand%640)% Set BoxTop%X% %($rand%480)% Set BoxHeight%X% %($rand%480)% Set BoxWidth%X% %($rand%640)% Next Return :DrawEffect BeginDraw Box %BoxLeft0% %BoxTop0% %BoxHeight0% %BoxWidth0% 0x%FadeIn%%Color0% 0x%FadeIn%%Color0% Box %BoxLeft1% %BoxTop1% %BoxHeight1% %BoxWidth1% 0x%FadeOut%%Color1% 0x%FadeOut%%Color1% Box %BoxLeft2% %BoxTop2% %BoxHeight2% %BoxWidth2% 0x%FadeIn%%Color2% 0x%FadeIn%%Color2% Box %BoxLeft3% %BoxTop3% %BoxHeight3% %BoxWidth3% 0x%FadeOut%%Color3% 0x%FadeOut%%Color3% Box %BoxLeft4% %BoxTop4% %BoxHeight4% %BoxWidth4% 0x%FadeIn%%Color4% 0x%FadeIn%%Color4% Box %BoxLeft5% %BoxTop5% %BoxHeight5% %BoxWidth5% 0x%FadeOut%%Color5% 0x%FadeOut%%Color5% EndDraw Return |