回 帖 发 新 帖 刷新版面

主题:黑客帝国之矩阵

dos下显示和黑客帝国中的绿色矩阵刷屏的效果
难度是不是大了??

回复列表 (共27个回复)

11 楼

佩服

12 楼

怎么才能转VFP啊,好希望啊

谁会转啊
教教我

13 楼

实在太强了,我头晕目眩啊。。。看不懂是什么。。。

14 楼

  CLS
  Randomize Timer
  Dim GamaString(6) As String * 1
  Dim ScreenNow(24, 80) As Integer
  Dim ScreenTip(80) As String * 1
  Dim ScrTipShowYN(80) As Integer
  Dim ScreenColor(24, 80) As Integer
  Dim TimeLater(80) As Integer
  DIM AxisX.Loop AS INTEGER
  DIM AxisY.Loop AS INTEGER
  Dim LoopVar As Integer
  Dim StrShow As String
  Const RandomFre = 0.995
  Const NewColor = 7
  Const OldColor = 2
  Waiter = 0
  RESTORE Gama
  For LoopVar = 1 To 6
      READ StrTempAscii
      GamaString(LoopVar) = Chr$(StrTempAscii)
  Next
  If Command$ = "" Then
     RESTORE RTip
     READ StrShow
  Else
     StrShow = LCase$(Command$)
  End If
  StringLength = Len(StrShow)
  StartAt = Int(40 - StringLength / 2)
  EndAt = Int(40 + StringLength / 2)
  For LoopVar = 1 To 80
      ScreenTip(LoopVar) = " "
  Next LoopVar
  For LoopVar = StartAt To EndAt
      ScreenTip(LoopVar) = Mid$(StrShow, LoopVar + 1 - StartAt, 1)
  Next
  Erase ScrTipShowYN
Do
  For AxisX.LOOP = 23 To 1 Step -1
      For AxisY.LOOP = 80 To 1 Step -1
          Waiter = Waiter + 0.01
          If ScreenNow(AxisX.LOOP, AxisY.LOOP) >= 1 Then
             ScreenNow(AxisX.LOOP + 1, AxisY.LOOP) = ScreenNow(AxisX.LOOP, AxisY.LOOP)
             ScreenNow(AxisX.LOOP, AxisY.LOOP) = ScreenNow(AxisX.LOOP, AxisY.LOOP) + 1
             If ScreenNow(AxisX.LOOP, AxisY.LOOP) = 2 Then
                ScreenColor(AxisX.LOOP, AxisY.LOOP) = NewColor
             Else
                ScreenColor(AxisX.LOOP, AxisY.LOOP) = OldColor
             End If
             If ScreenNow(AxisX.LOOP, AxisY.LOOP) = 7 Then
                ScreenNow(AxisX.LOOP, AxisY.LOOP) = 0
             End If
             If AxisX.LOOP = 12 And ScreenTip(AxisY.LOOP) <> " " And ScrTipShowYN(AxisY.LOOP) = 0 Then ScrTipShowYN(AxisY.LOOP) = 1
             If Not (ScrTipShowYN(AxisY.LOOP) <> 0 And ScreenTip(AxisY.LOOP) <> " " And AxisX.LOOP = 12) Or TimeLater(AxisY.LOOP) < 0 Then
                Color ScreenColor(AxisX.LOOP, AxisY.LOOP)
                LOCATE AxisX.LOOP, AxisY.LOOP
                Print GamaString(ScreenNow(AxisX.LOOP, AxisY.LOOP));
             End If
          ElseIf ScreenNow(AxisX.LOOP, AxisY.LOOP) = 0 And Rnd > RandomFre And AxisX.LOOP < 5 Then
             ScreenNow(AxisX.LOOP, AxisY.LOOP) = 1
          End If
      If AxisX.LOOP = 12 And ScreenTip(AxisY.LOOP) <> " " And ScrTipShowYN(AxisY.LOOP) <> 0 Then
             LOCATE 12, AxisY.LOOP: Color 15
             ScrTipShowYN(AxisY.LOOP) = 1
             If TimeLater(AxisY.LOOP) >= 150 Then
                Color 15
                Print ScreenTip(AxisY.LOOP);
                ScrTipShowYN(AxisY.LOOP) = 2
             ElseIf TimeLater(AxisY.LOOP) > 0 Then
                Color OldColor
                TimeLater(AxisY.LOOP) = TimeLater(AxisY.LOOP) + 1
                Print Chr$(Int(Rnd * 79 + 48));
             Else
                Waiter = 0
                TimeLater(AxisY.LOOP) = TimeLater(AxisY.LOOP) + 1
             End If
          End If
          If Waiter >= 3000 Then
             Waiter = 0
             For LoopVar = 1 To 80
               TimeLater(LoopVar) = -200
             Next LoopVar
             Erase ScrTipShowYN
          End If
          If INKEY$ <> "" Then
CLS:             End
          End If
          For u = 1 To 5: Next u
      Next AxisY.LOOP
  Next AxisX.LOOP
Loop
Rem   --------------------------
Gama: Data 32, 219, 178, 177, 176, 32
Rem   --------------------------
RTip: Data "Program Fan"

15 楼

请问阁下,你是怎么想出来的?

16 楼

呵呵,好久没来了。

17 楼

这么中途会停止啊

18 楼

牛B...能在TC2下试试吗?

19 楼

能不能多点注释~~~[em5]
照顾照顾我这样的对QB一窍不通的人~

20 楼

鼓掌!

应该不是很难,效果好就一切OK

我来回复

您尚未登录,请登录后再回复。点此登录或注册