You're probably aware that the 12 function keys can generate 48 functions (FKey, Shift FKey, Ctrl FKey, Alt Fkey). You might be aware that there are 12 more function keys by using ALT and any of 0-9 , - , and -. You're probably not aware of some functions, like ALT-Pg Down , Shift Pg Down, beyond the usual Pg Down and Ctrl Pg Down. But did you know about ALT-Comma, and Alt-Open Brace (Actually it's available as ALT-[ and as ALT-{.)
I have created a file containing the definition for essentially every key combination recognized by Inkey$ a set of named constants. It's intended to go by most used to least used:
All F-Keys
ALT numbers
ALT punctuation
Regular upper case (Capitals)
Regular lower case
Digits
Punctuation
Control Characters
I was trying to find a file containing definitions for all key combinations that generate a 2-character Inkey$ string, and not finding one, made one myself. The program at the end will display key combinations, which is how I generated the results, as the reference in the Wiki (which I pasted in as comments at the beginning) does not show all of them.
I've attached the program so it may be downloaded.
This is what it looks like:
Code: (Select All)
' ASCII Keyboard Codes
'
' Esc F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Sys ScL Pause
' 27 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +133 +134 - - -
' `~ 1! 2@ 3# 4$ 5% 6^ 7& 8* 9( 0) -_ =+ BkSp Ins Hme PUp NumL / * -
' 126 33 64 35 36 37 94 38 42 40 41 95 43 8 +82 +71 +73 - 47 42 45
' 96 49 50 51 52 53 54 55 56 57 48 45 61
' Tab Q W E R T Y U I O P [{ ]} \| Del End PDn 7Hme 8/? 9PU +
' 9 81 87 69 82 84 89 85 73 79 80 123 125 124 +83 +79 +81 +71 +72 +73 43
' 113 119 101 114 116 121 117 105 111 112 91 93 92 55 56 57
' CapL A S D F G H J K L ;: '" Enter 4/?- 5 6/-?
' - 65 83 68 70 71 72 74 75 76 58 34 13 +75 +76 +77 E
' 97 115 100 102 103 104 106 107 108 59 39 52 53 54 n
' Shift Z X C V B N M ,< .> /? Shift ? 1End 2/? 3PD t
' * 90 88 67 86 66 78 77 60 62 63 * +72 +79 +80 +81 e
' 122 120 99 118 98 110 109 44 46 47 49 50 51 r
' Ctrl Win Alt Spacebar Alt Win Menu Ctrl ?- ? -? 0Ins .Del
' * - * 32 * - - * +75 +80 +77 +82 +83 13
' 48 46
'
' Italics = LCase/NumLock On * = 2 byte combo only, + = 2 Byte: CHR$(0) + CHR$(code)
'
Rosetta code didn't have a QB64 version of a Gnome Sort so I made one.
Code: (Select All)
'GnomeSort.bas
'a sorting algorithm that will sort a one dimensional array of any size from lowest to greatest value
'https://en.wikipedia.org/wiki/Gnome_sort
'initialize two different one dimensional arrays to demonstrate the subroutine
Randomize Timer
Dim A(1 To 6)
Dim B(-5 To 5)
For I = LBound(A) To UBound(A)
A(I) = (Rnd(1) * 100)
Next I
For I = LBound(B) To UBound(B)
B(I) = Int(Rnd(1) * 100) + 1
Next I
'display the arrays before and after the gnomesort
Print "unsorted array: ";: printarray A(): Print
gnomesort A()
Print " sorted array: ";: printarray A(): Print
Sub printarray (array())
'print all the elements in a 1 dimensional array of any range
For I = LBound(array) To UBound(array)
Print array(I);
Next I
End Sub
Sub gnomesort (array())
'sort a one dimensional array of any size using gnomesort
'https://en.wikipedia.org/wiki/Gnome_sort
I = LBound(array) + 1 'find the lowest element in the array and add 1 for the sorting routine
J = I + 1
While I <= UBound(array)
If array(I - 1) <= array(I) Then
I = J
J = J + 1
Else If array(I - 1) > array(I) Then
Swap array(I - 1), array(I)
I = I - 1
If I = LBound(array) Then
I = J
J = J + 1
End If
End If
End If
Wend
End Sub
MakeNumsStrings
t# = Timer(0.001)
o$ = AddStrings'time how long it takes to add those strings together
t1# = Timer(0.001)
o1$ = MidStrings(Len(o$)) 'and time how long it takes to just mid$ those strings, if you know the size
t2# = Timer(0.001)
FunctionMidStrings$ (size)
temp$ = Space$(size)
p = 1'position in full string For i = 1To limit Mid$(temp$, p) = NumStr(i)
p = p + Len(NumStr(i)) Next MidStrings = temp$ End Function
I think the code above helps showcase one of QB64's and QB64PE's greatest flaws -- the time it takes to do anything substantial with strings!
The above simply makes a list of strings, by using the numbers from 1 to whatever LIMIT we set, and then it adds those strings all into one massive string. Basicially "1" + "2" + "3" +... = "123..." -- a simple process, but all that is needed to showcase how slow this process can become.
In the above, I've made use of two different methods for speed comparison, for folks.
The first method is what we see a lot in our programs: temp$ = temp$ + num$. It simply adds the strings together over and over until it's finished.
The second method is much more efficient: mid%(temp$, p) = num$. This has to pre-allocate the proper size of the string, create the string, and then it simply uses mid$ to swap out the proper portion of that string with num$ as it goes along.
I won't post my times on this, as I'd prefer for folks to run this code at least once themselves and see what the difference in speed might be on their own system, with whatever compiler flags/optimizations they might be using. Let's just say that I'm certain folks should be able to see a noticeable difference here.
NOTE: And one important thing to note here -- the larger the strings involved, the greater the difference becomes. The difference here isn't a static, "it takes 0.1 seconds to perform X additions to the string". Change that limit and you can see for yourself. A limit of 100000 takes X seconds. A limit of 110000 takes 2 * x seconds. A limit of 120000 takes 4 * x seconds. Exponential time increases as string length increases!! (Though not quite as bad as the * 2 modifier I just tossed out as an example to the left there. )
Take away from all this??
If you're going to be doing a lot of string addition, you'd probably be better served by running it through two loops, instead of just adding the strings together in one.
Loop 1: Count the total size of the string
FOR i = 1 TO limit
totalSize = totalSize + len(num$(i))
NEXT
Allocate the output string first:
temp$ = SPACE$(totalSize)
Loop 2: Mid$ the string together instead of adding it
p = 1
FOR i = 1 TO limit
mid$(temp$, p) = num(i)
p = p + len(num(i))
NEXT
It's thinking outside the box, and it's not the way that most folks tend to do things, but I'd think the above showcases WHY this might be an important concept to keep under your hat, if you're ever doing any serious string work in your projects.
(And feel free to post your own times below. I'd love to see how large a difference such a simple approach makes for most people on their own systems. I just don't want to spoil the surprise by posting my own times here, and you guys might not want to read below this post until you run the code for yourself once, just for the "pop factor" of the figures. )
I asked Perplexity AI what it thought my pipecom code did by asking it to read that page of the forum.
My prompt was
Quote:Analyze the code in the code block and give a best guess as to what it is used for
The response:
Quote:The code you provided appears to be an implementation of a pipe command in QB64, a BASIC programming language. The purpose of this code is to allow executing external commands and capturing their output and error streams[1].
Here's a breakdown of what the code does:
1. It defines a function called `pipecom` that takes a command string, an output string variable, and an error string variable as parameters.
2. The function creates two pipes using `CreatePipe` - one for standard output and one for standard error. It also sets up the necessary security attributes and startup information for the child process.
3. It then creates a child process using `CreateProcess` or `CreateProcessW` (depending on whether UNICODE is defined) to execute the specified command.
4. The function reads the output from the child process's standard output and error pipes using `ReadFile` and stores them in the provided output and error string variables.
5. Finally, it waits for the child process to exit, retrieves its exit code, and returns it.
There is also a helper function called `pipecom_lite` that simplifies the usage of `pipecom` by returning either the standard output or standard error stream as a string, depending on which one is not empty.
This code allows running external commands and capturing their output and error streams within a QB64 program, which can be useful for tasks such as executing system commands, parsing command output, or handling errors from external processes.
I'm working on a game, see, and I don't want the player to be able to hold down the fire-button indefinitely (that's cheating!). So I tried setting up a timer that kills the left mouse button after a second and a half. All is cool if the mouse is stationary, but the minute you move the mouse the button resets itself - without the user letting the button up - not cool. Is this a Mac mouse issue, a QB64PE mouse issue or a dumb NakedApe issue?
Is there a better way to do this?
I want to alphabetically sort the characters of a single word string. The only way i can think of so far is to get each character individually and make each one a single character variable, check the ASC value and bubble sort them with a SWAP function. Is there a better way?
Say I have a string variable abcd$. The letters in the variable can be arranged 4 factorial or 4x3x2x1 different ways. How can I produce every combination? Find Len(abcd$) then a for/next loop Len factorial times, but what inside the loop? I'm at a loss here.
I need to delete a file from within a programme), and I'm trying to use shell, as in: Shell "rm C:\qb64pe\myfile"
but I can't get it to work. I've read through the Wiki notes but can't find anything that makes it work. Where am I going wrong?
Hello, I'm a Newbie here and just started using QB64 PE. I first posted this under utilities because I did not see the programs listing, ha! So I figured that this really is a program and not a utility I would post it here as well.
This is my first QB64 PE project. It started out with just me learning how to use lines and circles in QB64 PE and it kind of got out of control. I find the aquascape is relaxing, but I'm biased.
I mostly program with the unrelated Batari BASIC language, and I dabble with 6502 ASM on the Atari tip.
I find QB64 PE very enjoyable to program with! and am looking forward to learning more!
Dim Shared time_limit As Integer
time_limit = (Int(Rnd * 600)) + 300
Type fish_type
x As Integer
y As Integer
r As Integer
color As Long
move_right As Integer
move_up As Integer
height As Integer
width As Integer
End Type
Type snail_type
x As Integer
y As Integer
move_right As Integer
move_up As Integer
End Type
Type bubble_type
x As Integer
y As Integer
move_right As Integer
move_up As Long
End Type
Type plant_type
x As Integer
y As Integer
c As Long
End Type
Type hook_type
x As Integer
y As Integer
move_right As Integer
move_up As Integer
End Type
Type window_type
height As Integer
width As Integer
End Type
Dim Shared fish(num_fish) As fish_type 'creates the fish"array" with the size set to "num_fish"
Dim Shared fisha(num_fisha) As fish_type
Dim Shared fishb(num_fishb) As fish_type
Dim Shared fishba(num_fishba) As fish_type
Dim Shared fish2(num_fish2) As fish_type
Dim Shared fish3(num_fish3) As fish_type
Dim Shared fish4(num_fish4) As fish_type
Dim Shared fish5(num_fish5) As fish_type
Dim Shared fish6(num_fish6) As fish_type
Dim Shared plant(num_plants) As plant_type
Dim Shared plant2(num_plants) As plant_type
Dim Shared snail_1(num_snail_1) As snail_type
Dim Shared snail_2(num_snail_2) As snail_type
Dim Shared bub(num_bubbles) As bubble_type
Dim Shared bub2(num_bubbles2) As bubble_type
Dim Shared bub3(num_bubbles3) As bubble_type
Dim Shared hook(num_hooks) As hook_type
Dim Shared hook2(num_hooks) As hook_type
Dim Shared hook3(num_hooks) As hook_type
Dim Shared hook4(num_hooks) As hook_type
Dim Shared hook5(num_hooks) As hook_type
Dim mmx%
Dim mmy%
Dim Shared current_date$
current_date$ = Date$
Dim Shared h% ' hours
Dim Shared m% ' minutes
Dim Shared s% ' seconds
Dim Shared tm$ ' current time% value
Dim Shared x% 'circle x pos
Dim Shared y% 'circle y pos
Dim clock_timer%
Dim Shared clock_right As Integer
Dim Shared clock_up As Integer
Dim Shared current_hr As Integer
current_hr = Val(Left$(tm$, 12))
Dim Shared current_hr
current_hr = Val(Left$(tm$, 2))
Dim Shared my_timer2 As Integer
Dim Shared my_timer3 As Integer
Randomize Timer
Dim Shared dy As Integer
dy = (Rnd * 940) + 940
Dim Shared dx As Integer
dx = (Rnd * 1899)
Dim bnum420&
Dim Shared bgp420$
bnum420& = _Round(Rnd * 50)
bgp420$ = RTrim$(LTrim$(Str$(bnum420&)))
If bgp420$ = "0" Then
bgp420$ = "1"
End If
If bnum420& > 50 Then
bgp420$ = "40"
End If
Dim Shared alert420&
alert420& = _LoadImage("aqua_mat\images\420\420_" + bgp420$ + ".jpg", 32)
Dim Shared day_pic&
Dim Shared night_pic&
Dim bgdp$
Dim bdnum As Long
bdnum = _Round(Rnd * 80)
bgdp$ = RTrim$(LTrim$(Str$(bdnum)))
If bgdp$ = "0" Then
bgdp$ = "59"
End If
If bdnum > 80 Then
bgdp$ = "79"
End If
Dim bgnp$
Dim bnnum As Long
bnnum = _Round(Rnd * 81)
bgnp$ = RTrim$(LTrim$(Str$(bnnum)))
If bgnp$ = "0" Then
bgnp$ = "3"
End If
If bnnum > 81 Then
bgnp$ = "81"
End If
'bgnp$ = "47"
Dim Shared st_pat_pic&
Dim Shared july_4th_pic&
Dim Shared halloween_pic&
Dim Shared de_los_meurtos_pic&
Dim Shared xmas_pic&
Dim Shared new_year_pic&
Dim bgspd$
Dim bgspd&
Dim bgj4$
Dim bgj4&
Dim bghw$
Dim bghw&
Dim bgdlm$
Dim bgdlm&
Dim bgxms$
Dim bgxms&
Dim bgny$
Dim bgny&
Dim Shared p1x As Integer
Dim Shared p2x As Integer
Dim Shared p3x As Integer
Dim Shared p1y As Integer
Dim Shared p2y As Integer
Dim Shared p3y As Integer
'' st pat day ''
bgspd& = _Round(Rnd * 11)
bgspd$ = RTrim$(LTrim$(Str$(bgspd&)))
If bgspd$ = "0" Then
bgspd$ = "3"
End If
If bgspd& > 11 Then
bgspd$ = "11"
End If
'' 4th of July ''
bgj4& = _Round(Rnd * 10)
bgj4$ = RTrim$(LTrim$(Str$(bgj4&)))
If bgj4$ = "0" Then
bgj4$ = "3"
End If
If bgj4& > 10 Then
bgj4$ = "10"
End If
'' halloween ''
bghw& = _Round(Rnd * 13)
bghw$ = RTrim$(LTrim$(Str$(bghw&)))
If bghw$ = "0" Then
bghw$ = "3"
End If
If bghw& > 13 Then
bghw$ = "13"
End If
'' dia de los meuertos ''
bgdlm& = _Round(Rnd * 11)
bgdlm$ = RTrim$(LTrim$(Str$(bgdlm&)))
If bgdlm$ = "0" Then
bgdlm$ = "3"
End If
If bgdlm& > 11 Then
bgdlm$ = "11"
End If
'' xmas ''
bgxms& = _Round(Rnd * 6)
bgxms$ = RTrim$(LTrim$(Str$(bgxms&)))
If bgxms$ = "0" Then
bgxms$ = "1"
End If
If bgxms& > 6 Then
bgxms$ = "4"
End If
'' new year ''
bgny& = _Round(Rnd * 11)
bgny$ = RTrim$(LTrim$(Str$(bgny&)))
If bgny$ = "0" Then
bgny$ = "3"
End If
If bgny& > 11 Then
bgny$ = "11"
End If
Color _RGB32(6, 233, 17)
Dim text$
If f& > 0 Then _Font f&
text$ = "generating aquascape... "
_PrintString (950, 540), text$
'draw_plant
dy = (Rnd * 1050) + 940
background_draw
_Delay 5
Do: _Limit 60
'Cls
current_hr = Val(Left$(tm$, 2))
If current_hr = 16 And m% >= 20 And m% <= 40 Then
_PutImage , alert420&
Else
holiday_check
End If
tm$ = Time$
s% = Val(Right$(tm$, 2))
m% = Val(Mid$(tm$, 4, 2))
h% = Val(Left$(tm$, 2))
clock_timer% = clock_timer% + 1
draw_plant
If clock_timer% < 102 Then convert_to_12hr
If clock_timer% = 204 Then clock_timer% = 0
If current_hr >= 6 And current_hr < 17 Then
clock_color_day
Else
clock_color_night
End If
fish_AI
fish_draw
snail_move
snail_move_2
fish_move
foreground
move_hook
background_draw
move_clock
_Display
_SndVol b&, 0.01
If b& > 0 Then _SndLoop b&
sound_large_bubbles
Do While _MouseInput
mmx% = mmx% + _MouseMovementX
mmy% = mmy% + _MouseMovementY
Loop
Loop Until InKey$ > "" Or mmx% <> 0 Or mmy% <> 0
_MouseShow
_SndClose b&
_SndClose lb&
System
'-sub_routines--
Sub sound_large_bubbles
t~& = t~& + 1
If t~& = 3000 Then
t~& = 1
End If
Select Case t~&
Case 1 To 35
_SndVol lb&, 0.02
_SndLoop lb&
Case 1420 To 1460
_SndVol lb&, 0.01
_SndLoop lb&
Case 2400 To 2440
_SndVol lb&, 0.02
_SndLoop lb&
Case Else
_SndVol lb&, 0
End Select
End Sub
Sub fish_draw
Dim i As Integer
Dim k As Integer
Dim l As Integer
Dim n As Integer
''snail attempt, lets see...
Dim sn As Integer
For sn = 19 To 21
Circle (snail_2(sn).x, snail_2(sn).y), sn * .25, _RGB32(68 - sn, 0, 0), , , .7
Circle (snail_2(sn).x, snail_2(sn).y), sn * .85, _RGB32(172 - sn, 22, 22), , , .7
Paint (snail_2(sn).x, snail_2(sn).y - sn * .1), _RGB32(198, 178, 8), _RGB32(172 - sn, 22, 22)
Circle (snail_2(sn).x, snail_2(sn).y), sn * .5, _RGB32(125 - sn, 0, 0), , , .7
Paint (snail_2(sn).x, snail_2(sn).y - sn * .1), _RGB32(244 + sn, 168 - sn, 0), _RGB32(125 - sn, 0, 0)
Next sn
For sn = 22 To 24
Circle (snail_2(sn).x, snail_2(sn).y), sn * .25, _RGB32(68 - sn, 0, 0), , , .6
Circle (snail_2(sn).x, snail_2(sn).y), sn * .85, _RGB32(172 - sn, 22, 22), , , .6
Paint (snail_2(sn).x, snail_2(sn).y - sn * .1), _RGB32(0, 147, 147), _RGB32(172 - sn, 22, 22)
Circle (snail_2(sn).x, snail_2(sn).y), sn * .5, _RGB32(125 - sn, 0, 0), , , .6
Paint (snail_2(sn).x, snail_2(sn).y - sn * .1), BLACK, _RGB32(125 - sn, 0, 0)
Circle (snail_2(sn).x, snail_2(sn).y), sn * .2, BLACK, , , .6
Next sn
For sn = 25 To 27
Circle (snail_2(sn).x, snail_2(sn).y), sn * .25, _RGB32(68 - sn, 0, 0), , , .8
Circle (snail_2(sn).x, snail_2(sn).y), sn * .85, _RGB32(172 - sn, 22, 22), , , .8
Paint (snail_2(sn).x, snail_2(sn).y - sn * .1), ORANGE, _RGB32(172 - sn, 22, 22)
Circle (snail_2(sn).x, snail_2(sn).y), sn * .5, _RGB32(125 - sn, 0, 0), , , .8
Paint (snail_2(sn).x, snail_2(sn).y - sn * .1), RED, _RGB32(125 - sn, 0, 0)
Circle (snail_2(sn).x, snail_2(sn).y), sn * .2, BLACK, , , .8
Paint (snail_2(sn).x, snail_2(sn).y), PURPLE, BLACK
Next sn
For sn = 60 To 62
Circle (snail_1(sn).x, snail_1(sn).y), sn * .25, _RGB32(68 - sn, 0, 0), , , .9
Circle (snail_1(sn).x, snail_1(sn).y), sn * .85, _RGB32(172 - sn, 22, 22), , , .9
Circle (snail_1(sn).x, snail_1(sn).y), sn * .85, _RGB32(172 - sn, 22, 22), , , .7
Circle (snail_1(sn).x, snail_1(sn).y), sn * .85, _RGB32(172 - sn, 22, 22), , , .87
Circle (snail_1(sn).x, snail_1(sn).y), sn * .85, _RGB32(172 - sn, 22, 22), , , .4
For sn = 63 To 65
Circle (snail_1(sn).x, snail_1(sn).y), sn * .74, _RGB32(68 - sn, 0, 0), , , .9
Circle (snail_1(sn).x, snail_1(sn).y), sn * .98, _RGB32(172 - sn, 22, 22), , , .7
Circle (snail_1(sn).x, snail_1(sn).y), sn * 1.1, ORANGE, , , .9
Circle (snail_1(sn).x, snail_1(sn).y), sn * 1.1, ORANGE, , , .7
Circle (snail_1(sn).x, snail_1(sn).y), sn * 1.1, ORANGE, , , .5
Circle (snail_1(sn).x, snail_1(sn).y), sn * 1.1, ORANGE, , , .3
Next sn
For i = 1 To num_fish Step 1
Circle (fish(i).x, fish(i).y), i + 48, YELLOW, 2, 4
Circle (fish(i).x, fish(i).y), i + 16, BRIGHTPURPLE, 4, 2
Circle (fish(i).x, fish(i).y), i + 16, YELLOW, 4, 2
Circle (fish(i).x, fish(i).y), i + 8, YELLOW, 4, 2
Circle (fish(i).x, fish(i).y), i + 4, YELLOW, 4, 2
Circle (fish(i).x, fish(i).y), i + 2, YELLOW, 4, 2
Circle (fish(i).x, fish(i).y), i + 32, YELLOW, 2, 4
Circle (fish(i).x, fish(i).y), i + 30, DARKYELLOW, 2, 4
Circle (fish(i).x, fish(i).y), i + 28, YELLOW, 2, 4
Circle (fish(i).x, fish(i).y), i + 26, DARKYELLOW, 2, 4
Circle (fish(i).x, fish(i).y), i + 40, CYAN, 2, 4
Circle (fish(i).x, fish(i).y), i + 34, CYAN, 2, 4
Circle (fish(i).x, fish(i).y), i + 28, BRIGHTPURPLE, 2, 4
Circle (fish(i).x, fish(i).y), i + 40, YELLOW, 4, 2
Circle (fish(i).x, fish(i).y), i + 36, DARKYELLOW, 4, 2
Circle (fish(i).x, fish(i).y), i + 32, YELLOW, 4, 2
Circle (fish(i).x, fish(i).y), i + 28, BRIGHTPURPLE, 4, 2
Circle (fish(i).x, fish(i).y), i + 24, CYAN, 4, 2
Circle (fish(i).x, fish(i).y), i + 20, BRIGHTPURPLE, 4, 2
Circle (fish(i).x + 5, fish(i).y - 40), i * .6, YELLOW, 4, 1, .5
Circle (fish(i).x + 5, fish(i).y - 40), i * .4, YELLOW, 4, 1, .5
Circle (fish(i).x + 5, fish(i).y - 40), 4, BLACK
Circle (fish(i).x + 5, fish(i).y - 40), 3, BLACK
Circle (fish(i).x + 5, fish(i).y - 40), 2, BLACK
Dim z As Integer
For z = 1 To num_fishb Step 1
Circle (fishb(z).x, fishb(z).y), z + 24, BRIGHTRED, 2, 4
Circle (fishb(z).x, fishb(z).y), z + 23, BRIGHTPURPLE, 2, 4
Circle (fishb(z).x, fishb(z).y), z + 22, YELLOW, 2, 4
Circle (fishb(z).x, fishb(z).y), z + 21, BRIGHTPURPLE, 2, 4
Circle (fishb(z).x, fishb(z).y), z + 20, YELLOW, 2, 4
Circle (fishb(z).x, fishb(z).y), 8, YELLOW, 4, 2
Circle (fishb(z).x - 10, fishb(z).y - 3), 8, YELLOW, 4, 2
Circle (fishb(z).x, fishb(z).y), z + 16, BRIGHTPURPLE, 2, 4
Circle (fishb(z).x, fishb(z).y), z + 14, BRIGHTRED, 2, 4
Circle (fishb(z).x, fishb(z).y), z + 12, BRIGHTPURPLE, 2, 4
Circle (fishb(z).x, fishb(z).y), z + 10, BRIGHTRED, 2, 4
Circle (fishb(z).x, fishb(z).y), z + 8, BRIGHTPURPLE, 2, 4
Circle (fishb(z).x, fishb(z).y), z + 6, BRIGHTPURPLE, 2, 4
Circle (fishb(z).x, fishb(z).y), z + 4, YELLOW, 2, 4
Circle (fishb(z).x, fishb(z).y), z + 2, YELLOW, 2, 4
Circle (fishb(z).x, fishb(z).y), z + 30, BRIGHTPURPLE, 4, 2
Circle (fishb(z).x, fishb(z).y), z + 29, BRIGHTRED, 4, 2
Circle (fishb(z).x, fishb(z).y), z + 28, BRIGHTPURPLE, 4, 2
Circle (fishb(z).x, fishb(z).y), z + 27, BRIGHTRED, 4, 2
Circle (fishb(z).x, fishb(z).y), z + 26, BRIGHTPURPLE, 4, 2
Circle (fishb(z).x, fishb(z).y), z + 25, BRIGHTRED, 4, 2
Circle (fishb(z).x, fishb(z).y), z + 24, BRIGHTRED, 4, 2
Circle (fishb(z).x, fishb(z).y), z + 23, YELLOW, 4, 2
Circle (fishb(z).x, fishb(z).y), z + 20, BRIGHTPURPLE, 4, 2
Circle (fishb(z).x, fishb(z).y), z + 16, YELLOW, 4, 2
Circle (fishb(z).x, fishb(z).y), z + 12, BRIGHTPURPLE, 4, 2
Circle (fishb(z).x, fishb(z).y), z + 7, YELLOW, 4, 2
Circle (fishb(z).x, fishb(z).y), z + 3, BRIGHTPURPLE, 4, 2
Circle (fishb(z).x, fishb(z).y), z + 1, YELLOW, 4, 2
Circle (fishb(z).x, fishb(z).y), z + 12, BRIGHTPURPLE, 4, 2
Circle (fishb(z).x, fishb(z).y), z + 10, BRIGHTRED, 4, 2
Circle (fishb(z).x, fishb(z).y), z + 8, BRIGHTPURPLE, 4, 2
Circle (fishb(z).x, fishb(z).y), z + 6, BRIGHTRED, 4, 2
Circle (fishb(z).x, fishb(z).y), z + 4, BRIGHTPURPLE, 4, 2
Circle (fishb(z).x - 15, fishb(z).y - 18), 4, BRIGHTPURPLE
Circle (fishb(z).x - 15, fishb(z).y - 18), 3, BRIGHTPURPLE
Circle (fishb(z).x - 15, fishb(z).y - 18), 1, BRIGHTRED
Circle (fishb(z).x - 35, fishb(z).y), z + 3, DARKRED, 2, 4, .1
Circle (fishb(z).x - 35, fishb(z).y), z + 2, DARKRED, 2, 4, .5
Circle (fishb(z).x - 35, fishb(z).y), z + 1, DARKRED, 2, 4, .1
Circle (fishb(z).x - 31, fishb(z).y), z, BRIGHTRED, 4, 2
Circle (fishb(z).x + 65, fishb(z).y), z + 26, BRIGHTPURPLE, -4, -2
Circle (fishb(z).x + 65, fishb(z).y), z + 25, BRIGHTRED, -4, -2
Circle (fishb(z).x + 65, fishb(z).y), z + 24, BRIGHTPURPLE, -4, -2
Circle (fishb(z).x + 65, fishb(z).y), z + 23, YELLOW, -4, -2
Circle (fishb(z).x + 65, fishb(z).y), z + 22, BRIGHTPURPLE, -4, -2
Circle (fishb(z).x + 65, fishb(z).y), z + 21, YELLOW, -4, -2
Circle (fishb(z).x + 65, fishb(z).y), z + 20, BRIGHTPURPLE, -4, -2
Circle (fishb(z).x + 65, fishb(z).y), z + 17, BRIGHTRED, -4, -2 ' ==========================
Circle (fishb(z).x + 65, fishb(z).y), z + 19, BRIGHTPURPLE, -4, -2
Circle (fishb(z).x + 65, fishb(z).y), z + 15, BRIGHTRED, -4, -2
Circle (fishb(z).x + 65, fishb(z).y), z + 13, BRIGHTPURPLE, -4, -2
Circle (fishb(z).x + 65, fishb(z).y), z + 12, BRIGHTPURPLE, -4, -2
Circle (fishb(z).x + 65, fishb(z).y), z + 11, BRIGHTRED, -4, -2 ' =======================
Circle (fishb(z).x + 65, fishb(z).y), z + 10, BRIGHTPURPLE, -4, -2
Circle (fishb(z).x + 65, fishb(z).y), z + 9, YELLOW, -4, -2
Circle (fishb(z).x + 65, fishb(z).y), z + 8, BRIGHTPURPLE, -4, -2
Circle (fishb(z).x + 65, fishb(z).y), z + 7, YELLOW, -4, -2
Circle (fishb(z).x + 65, fishb(z).y), z + 6, BRIGHTPURPLE, -4, -2
Line (fishb(z).x, fishb(z).y)-(fishb(z).x - 10, fishb(z).y), BRIGHTRED
Line (fishb(z).x, fishb(z).y - 20)-(fishb(z).x - 20, fishb(z).y - 20), BRIGHTRED
Line (fishb(z).x - 20, fishb(z).y - 23)-(fishb(z).x + 20, fishb(z).y - (z + 26)), BRIGHTRED
Line (fishb(z).x - 18, fishb(z).y - 23)-(fishb(z).x + 20, fishb(z).y - (z + 31)), BRIGHTRED
Line (fishb(z).x - 16, fishb(z).y - 23)-(fishb(z).x + 20, fishb(z).y - (z + 36)), BRIGHTRED
Line (fishb(z).x - 14, fishb(z).y - 23)-(fishb(z).x + 20, fishb(z).y - (z + 41)), BRIGHTRED
Line (fishb(z).x - 12, fishb(z).y - 23)-(fishb(z).x + 20, fishb(z).y - (z + 46)), BRIGHTRED
Line (fishb(z).x - 10, fishb(z).y - 23)-(fishb(z).x + 20, fishb(z).y - (z + 11)), BRIGHTRED
Circle (fishb(z).x + 5, fishb(z).y - 30), z * .4, WHITE, 4, 1, .5
Circle (fishb(z).x + 5, fishb(z).y - 30), z * .2, WHITE, 4, 1, .5
Circle (fishb(z).x + 5, fishb(z).y - 30), 4, BLACK
Circle (fishb(z).x + 5, fishb(z).y - 30), 3, BLACK
Circle (fishb(z).x + 5, fishb(z).y - 30), 2, BLACK
Next z
Dim z2 As Integer
For z2 = 1 To num_fishba Step 1
Circle (fishba(z2).x, fishba(z2).y), z2 + 24, BLUE, 2, 4
Circle (fishba(z2).x, fishba(z2).y), z2 + 23, PURPLE, 2, 4
Circle (fishba(z2).x, fishba(z2).y), z2 + 22, WHITE, 2, 4
Circle (fishba(z2).x, fishba(z2).y), z2 + 21, PURPLE, 2, 4
Circle (fishba(z2).x, fishba(z2).y), z2 + 20, WHITE, 2, 4
Circle (fishba(z2).x, fishba(z2).y), 8, WHITE, 4, 2
Circle (fishba(z2).x - 10, fishba(z2).y - 3), 8, WHITE, 4, 2
Circle (fishba(z2).x, fishba(z2).y), z2 + 16, PURPLE, 2, 4
Circle (fishba(z2).x, fishba(z2).y), z2 + 14, BLUE, 2, 4
Circle (fishba(z2).x, fishba(z2).y), z2 + 12, PURPLE, 2, 4
Circle (fishba(z2).x, fishba(z2).y), z2 + 10, BLUE, 2, 4
Circle (fishba(z2).x, fishba(z2).y), z2 + 8, PURPLE, 2, 4
Circle (fishba(z2).x, fishba(z2).y), z2 + 6, PURPLE, 2, 4
Circle (fishba(z2).x, fishba(z2).y), z2 + 4, WHITE, 2, 4
Circle (fishba(z2).x, fishba(z2).y), z2 + 2, WHITE, 2, 4
Circle (fishba(z2).x, fishba(z2).y), z2 + 30, PURPLE, 4, 2
Circle (fishba(z2).x, fishba(z2).y), z2 + 29, BLUE, 4, 2
Circle (fishba(z2).x, fishba(z2).y), z2 + 28, PURPLE, 4, 2
Circle (fishba(z2).x, fishba(z2).y), z2 + 27, BLUE, 4, 2
Circle (fishba(z2).x, fishba(z2).y), z2 + 26, PURPLE, 4, 2
Circle (fishba(z2).x, fishba(z2).y), z2 + 25, BLUE, 4, 2
Circle (fishba(z2).x, fishba(z2).y), z2 + 24, BLUE, 4, 2
Circle (fishba(z2).x, fishba(z2).y), z2 + 23, WHITE, 4, 2
Circle (fishba(z2).x, fishba(z2).y), z2 + 20, PURPLE, 4, 2
Circle (fishba(z2).x, fishba(z2).y), z2 + 16, WHITE, 4, 2
Circle (fishba(z2).x, fishba(z2).y), z2 + 12, PURPLE, 4, 2
Circle (fishba(z2).x, fishba(z2).y), z2 + 7, WHITE, 4, 2
Circle (fishba(z2).x, fishba(z2).y), z2 + 3, PURPLE, 4, 2
Circle (fishba(z2).x, fishba(z2).y), z2 + 1, WHITE, 4, 2
Circle (fishba(z2).x, fishba(z2).y), z2 + 12, PURPLE, 4, 2
Circle (fishba(z2).x, fishba(z2).y), z2 + 10, BLUE, 4, 2
Circle (fishba(z2).x, fishba(z2).y), z2 + 8, PURPLE, 4, 2
Circle (fishba(z2).x, fishba(z2).y), z2 + 6, BLUE, 4, 2
Circle (fishba(z2).x, fishba(z2).y), z2 + 4, PURPLE, 4, 2
Line (fishba(z2).x, fishba(z2).y)-(fishba(z2).x - 10, fishba(z2).y), BLUE
Line (fishba(z2).x, fishba(z2).y - 20)-(fishba(z2).x - 20, fishba(z2).y - 20), BLUE
Line (fishba(z2).x - 20, fishba(z2).y - 23)-(fishba(z2).x + 20, fishba(z2).y - (z2 + 26)), BLUE
Line (fishba(z2).x - 18, fishba(z2).y - 23)-(fishba(z2).x + 20, fishba(z2).y - (z2 + 31)), BLUE
Line (fishba(z2).x - 16, fishba(z2).y - 23)-(fishba(z2).x + 20, fishba(z2).y - (z2 + 36)), BLUE
Line (fishba(z2).x - 14, fishba(z2).y - 23)-(fishba(z2).x + 20, fishba(z2).y - (z2 + 41)), BLUE
Line (fishba(z2).x - 12, fishba(z2).y - 23)-(fishba(z2).x + 20, fishba(z2).y - (z2 + 46)), BLUE
Line (fishba(z2).x - 10, fishba(z2).y - 23)-(fishba(z2).x + 20, fishba(z2).y - (z2 + 11)), BLUE
Circle (fishba(z2).x + 5, fishba(z2).y - 30), z2 * .4, WHITE, 4, 1, .5
Circle (fishba(z2).x + 5, fishba(z2).y - 30), z2 * .2, WHITE, 4, 1, .5
Circle (fishba(z2).x + 5, fishba(z2).y - 30), 4, BLACK
Circle (fishba(z2).x + 5, fishba(z2).y - 30), 3, BLACK
Circle (fishba(z2).x + 5, fishba(z2).y - 30), 2, BLACK
Next z2
For k = 1 To num_fish2 Step 1
Circle (fish2(k).x, fish2(k).y), k * 3, DARKRED, , , .3
Circle (fish2(k).x, fish2(k).y), k * 3, BRIGHTGREEN, , , .2
Circle (fish2(k).x, fish2(k).y), k * 3, DARKRED, , , .1
Circle (fish2(k).x, fish2(k).y), k * 1, DARKRED, , , .3
Circle (fish2(k).x, fish2(k).y), k * 1.5, BRIGHTGREEN, , , .2
Circle (fish2(k).x, fish2(k).y), k * 2, DARKRED, , , .1
Line (fish2(k).x - (k * 1), fish2(k).y - k + 1.5)-(fish2(k).x + (k * 1), fish2(k).y - k + 1.5), DARKRED
Line -(fish2(k).x, fish2(k).y - k * 1.5), DARKRED
Line -(fish2(k).x - (k * 1), fish2(k).y - k + 1.5), DARKRED
Paint (fish2(k).x, fish2(k).y - k + .2), DARKRED, DARKRED
Next k
Dim y As Integer
For y = 1 To num_fish6 Step 1
Circle (fish6(y).x, fish6(y).y), y * 3 + 5, DARKYELLOW, , , .3
Circle (fish6(y).x, fish6(y).y), y * 3, CYAN, , , .2
Circle (fish6(y).x, fish6(y).y), y * 3 + 5, DARKYELLOW, , , .1
Next y
For l = 1 To num_fish3 Step 1
Circle (fish3(l).x + 10, fish3(l).y), l + 20, YELLOW, , , .3
Circle (fish3(l).x + 12, fish3(l).y), l + 20, YELLOW, , , .3
Circle (fish3(l).x + 10, fish3(l).y), l + 20, BRIGHTRED, , , .2
Circle (fish3(l).x + 10, fish3(l).y), l + 20, YELLOW, , , .1
Next l
For n = 1 To num_fish5 Step 1
Circle (fish5(n).x, fish5(n).y), n + 10, BRIGHTRED, , , .3
Circle (fish5(n).x, fish5(n).y), n + 8, BRIGHTPURPLE, , , .2
Circle (fish5(n).x, fish5(n).y), n + 5, BRIGHTRED, , , .1
Next n
End Sub
Sub draw_plant
Dim pn As Integer
Line (1700, 1080)-(1717, 824), DARKGREEN
Line -(1719, 1080), DARKGREEN
Line -(1700, 1080), DARKGREEN
Paint (1705, 1078), GREEN, DARKGREEN
Line (1500, 1080)-(1517, 789), DARKGREEN
Line -(1519, 1080), DARKGREEN
Line -(1500, 1080), DARKGREEN
Paint (1505, 1078), GREEN, DARKGREEN
Line (1600, 1080)-(1617, 789), GREEN
Line -(1619, 1080), GREEN
Line -(1600, 1080), GREEN
Paint (1605, 1078), DARKGREEN, GREEN
Paint (1612, 925), DARKGREEN, GREEN
Paint (1612, 910), DARKGREEN, GREEN
'Line (1612, 925)-(1604, 1), BRIGHTRED
Line (1615, 1080)-(1628, 678), GREEN
Line -(1636, 1080), GREEN
Line -(1615, 1080), GREEN
Paint (1620, 1078), DARKGREEN, GREEN
Paint (1625, 910), DARKGREEN, GREEN
Paint (1625, 900), DARKGREEN, GREEN
Paint (1625, 890), DARKGREEN, GREEN
'Line (1625, 910)-(1617, 1), BRIGHTRED
Line (170, 1080)-(187, 824), DARKGREEN
Line -(189, 1080), DARKGREEN
Line -(170, 1080), DARKGREEN
Paint (175, 1078), GREEN, DARKGREEN
Line (150, 1080)-(177, 789), GREEN
Line -(180, 1080), GREEN
Line -(150, 1080), GREEN
Paint (155, 1078), DARKGREEN, GREEN
Line (280, 1080)-(297, 678), DARKGREEN
Line -(303, 1080), DARKGREEN
Line -(280, 1080), DARKGREEN
Paint (285, 1078), GREEN, DARKGREEN
Line (1750, 1080)-(600, 765), GREEN
Line -(1625, 1080), GREEN
Line -(1750, 1080), GREEN
Paint (950, 872), DARKGREEN, GREEN
Paint (1590, 1065), DARKGREEN, GREEN
Paint (1650, 1063), DARKGREEN, GREEN
End Sub
Sub foreground
Line (400, 1080)-(200, 879), GREEN
Line -(420, 1080), GREEN
Line -(400, 1080), GREEN
Paint (410, 1078), _RGB32(111, 145, 5), GREEN
Line (657, 1080)-(456, 678), GREEN
Line -(698, 1080), GREEN
Line -(657, 1080), GREEN
Paint (660, 1078), _RGB32(0, 45, 5), GREEN
Line (1400, 1080)-(1200, 759), GREEN
Line -(1420, 1080), GREEN
Line -(1400, 1080), GREEN
Paint (1410, 1078), BRIGHTGREEN, GREEN
Paint (1300, 910), BRIGHTGREEN, GREEN
Line (1700, 1080)-(1500, 759), GREEN
Line -(1790, 1080), GREEN
Line -(1700, 1080), GREEN
Paint (1710, 1078), _RGB32(150, 150, 0), GREEN
Paint (1600, 875), _RGB32(150, 150, 0), GREEN
Paint (1638, 945), _RGB32(150, 150, 0), GREEN
Paint (1740, 1245), _RGB32(150, 150, 0), GREEN
Paint (1738, 1242), _RGB32(150, 150, 0), GREEN
Paint (1742, 1248), _RGB32(150, 150, 0), GREEN
Paint (1742, 1078), _RGB32(150, 150, 0), GREEN
Paint (1744, 1075), _RGB32(150, 150, 0), GREEN
'Line (1744, 1075)-(1742, 1), BRIGHTRED
End Sub
Sub background_draw
Dim i As Integer
Dim x As Integer
For x = -500 To 500 Step 1
dy = (Rnd * 950) + 950
dx = (Rnd * 1899)
Line Step(1 + x, 1080)-(dx + 50, dy), BRIGHTGREEN
Line Step(940 + x, 1070)-(dx + 250, dy), DARKGREEN
Line Step(120 + x, 1075)-(dx + 500, dy), YELLOW
Line Step(1 + x, 1080)-(dx + 750, dy), BRIGHTGREEN
Line Step(33 + x, 1072)-(dx + 950, dy), GREEN
Line Step(120 + x, 1078)-(dx + 1150, dy), YELLOW
Line Step(1 + x, 1080)-(dx + 50, dy), DARKGREEN
Line Step(940 + x, 1065)-(dx + 250, dy), BRIGHTGREEN
Line Step(120 + x, 1068)-(dx + 500, dy), YELLOW
'Dim x As Integer
'For x = 1 To 1900 Step Rnd * 50 + 25
' Line Step(100, 1080)-(x + 5, 900), BRIGHTGREEN
' Line Step(100, 1080)-(x + 115, 900), GREEN
'Next x
'For x = 1 To 5000 Step 150
' Line Step(100, 1080)-(x + 5, 900), BRIGHTGREEN
' Line Step(100, 1080)-(x + 115, 900), GREEN
'Next x
'For x = 1 To 5000 Step 500
' Line Step(100, 1080)-(x + 5, 900), BRIGHTGREEN
' Line Step(100, 1080)-(x + 115, 900), GREEN
'Next x
'--bubbles--
Randomize Timer
For i = 1 To num_bubbles Step 1
Circle (bub(i).x, bub(i).y), i, CYAN
Circle (bub(i).x, bub(i).y), i, WHITE, 1, -4, .5
Next i
For i = 1 To num_bubbles2 Step 1
Circle (bub2(i).x, bub2(i).y), i, CYAN
Circle (bub2(i).x, bub2(i).y), i, WHITE, 1, -4, .5
Next i
For i = 1 To num_bubbles3 Step 1
Circle (bub3(i).x, bub3(i).y), i, CYAN
Circle (bub3(i).x, bub3(i).y), i, WHITE, 1, -4, .5
Next i
Dim m As Integer
For m = 1 To num_hooks
If hook(1).move_right = 1 Then
Line (hook(m).x, -1)-(hook(m).x, hook(m).y), WHITE
Circle (hook(m).x - 20, hook(m).y), 20, GREEN, , , .3
Circle (hook(m).x - 20, hook(m).y), 19, _RGB32(0, Rnd * 256, Rnd * 256), , , .2
Circle (hook(m).x - 20, hook(m).y), 16, GREEN, , , .1
Circle (hook(m).x - 20, hook(m).y), 14, GREEN, , , .3
Circle (hook(m).x - 20, hook(m).y), 12, _RGB32(0, Rnd * 256, Rnd * 256), , , .2
Circle (hook(m).x - 20, hook(m).y), 10, GREEN, , , .1
Circle (hook(m).x - 20, hook(m).y), 8, GREEN, , , .3
Circle (hook(m).x - 20, hook(m).y), 6, _RGB32(0, Rnd * 256, Rnd * 256), , , .2
Circle (hook(m).x - 20, hook(m).y), 4, GREEN, , , .1
End If
If hook(1).move_right = 0 Then
Line (hook(m).x, -1)-(hook(m).x, hook(m).y), WHITE
Circle (hook(m).x + 20, hook(m).y), 20, GREEN, , , .3
Circle (hook(m).x + 20, hook(m).y), 18, _RGB32(0, Rnd * 256, Rnd * 256), , , .2
Circle (hook(m).x + 20, hook(m).y), 18, GREEN, , , .1
Circle (hook(m).x + 20, hook(m).y), 14, GREEN, , , .3
Circle (hook(m).x + 20, hook(m).y), 12, _RGB32(0, Rnd * 256, Rnd * 256), , , .2
Circle (hook(m).x + 20, hook(m).y), 10, GREEN, , , .1
Circle (hook(m).x + 20, hook(m).y), 8, GREEN, , , .3
Circle (hook(m).x + 20, hook(m).y), 6, _RGB32(0, Rnd * 256, Rnd * 256), , , .2
Circle (hook(m).x + 20, hook(m).y), 4, GREEN, , , .1
End If
Next m
Dim o As Integer
For o = 1 To num_hooks
Line (hook2(o).x, -1)-(hook2(o).x, hook2(o).y), WHITE
Circle (hook2(o).x, hook2(o).y), 5, BRIGHTRED
Circle (hook2(o).x, hook2(o).y), 4, BRIGHTRED
Circle (hook2(o).x, hook2(o).y), 3, BRIGHTRED
Circle (hook2(o).x, hook2(o).y), 2, BRIGHTRED
Circle (hook2(o).x, hook2(o).y), 1, BRIGHTRED
Circle (hook2(o).x, hook2(o).y), 6, BRIGHTRED
Circle (hook2(o).x, hook2(o).y), 7, BRIGHTRED
Circle (hook2(o).x, hook2(o).y), 8, BRIGHTRED
Circle (hook2(o).x, hook2(o).y), 9, BRIGHTRED
Circle (hook2(o).x, hook2(o).y), 10, BRIGHTRED
Circle (hook2(o).x, hook2(o).y), 11, BRIGHTRED
Circle (hook2(o).x, hook2(o).y), 12, BRIGHTRED
Circle (hook2(o).x, hook2(o).y), 13, BRIGHTRED
Circle (hook2(o).x, hook2(o).y), 14, BRIGHTRED
Circle (hook2(o).x, hook2(o).y), 15, BRIGHTRED
Next o
Dim n As Integer
For n = 1 To num_hooks
Line (hook3(n).x + 10, -2)-(hook3(n).x, hook3(n).y), WHITE
Line -(hook3(n).x + 50, hook3(n).y), _RGB32(155, 100, 0)
Line -(hook3(n).x + 16, hook3(n).y - 50), _RGB32(155, 100, 0)
Line -(hook3(n).x, hook3(n).y + 4), _RGB32(155, 100, 0)
Paint (hook3(n).x + 4, hook3(n).y - 4), _RGB32(211, 161, 0), _RGB32(155, 100, 0)
Next n
For o = 1 To num_hooks
Line (hook4(o).x, -1)-(hook4(o).x, hook4(o).y), GRAY, B , 132
Circle (hook4(o).x, hook4(o).y), 3.5, DARKRED
Circle (hook4(o).x, hook4(o).y), 3, DARKRED
Circle (hook4(o).x, hook4(o).y), 2.5, DARKRED
Circle (hook4(o).x, hook4(o).y), 2, DARKRED
Circle (hook4(o).x, hook4(o).y), 1.5, DARKRED
Circle (hook4(o).x, hook4(o).y), 1, DARKRED
Next o
For n = 1 To 1
Line (hook5(n).x + 5, -1)-(hook5(n).x, hook5(n).y), GRAY, , 132
Line -(hook5(n).x + 12, hook5(n).y), YELLOW
Line -(hook5(n).x + 4, hook5(n).y - 8), YELLOW
Line -(hook5(n).x, hook5(n).y - 1), YELLOW
Paint (hook5(n).x + 4, hook5(n).y - 1.5), DARKYELLOW, YELLOW
Next n
End Sub
If snail_2(17).move_right = 1 Then
snail_2(17).y = 1051
End If
If snail_2(17).move_right = 2 Then
snail_2(17).y = 1052
End If
If snail_2(17).move_right > 2 Then
snail_2(17).move_right = 1
snail_2(17).y = 1052
End If
If snail_2(18).move_right = 1 Then
snail_2(18).y = 1051
End If
If snail_2(18).move_right = 2 Then
snail_2(18).y = 1052
End If
If snail_2(18).move_right > 2 Then
snail_2(18).move_right = 2
snail_2(18).y = 1052
End If
snail_2(19).x = (Rnd * 450) + 450
snail_2(19).move_up = 3
snail_2(19).move_right = Int((Rnd * 2) + 1)
If snail_2(19).move_right = 1 Then
snail_2(19).y = 1051
End If
If snail_2(19).move_right = 2 Then
snail_2(19).y = 1052
End If
If snail_2(19).move_right > 2 Then
snail_2(19).move_right = 1
snail_2(19).y = 1052
End If
If snail_2(20).move_right = 1 Then
snail_2(20).y = 1051
End If
If snail_2(20).move_right = 2 Then
snail_2(20).y = 1052
End If
If snail_2(20).move_right > 2 Then
snail_2(20).move_right = 2
snail_2(20).y = 1052
End If
If snail_2(21).move_right = 1 Then
snail_2(21).y = 1051
End If
If snail_2(21).move_right = 2 Then
snail_2(21).y = 1052
End If
If snail_2(21).move_right > 2 Then
snail_2(21).move_right = 1
snail_2(21).y = 1052
End If
If snail_2(22).move_right = 1 Then
snail_2(22).y = 1051
End If
If snail_2(22).move_right = 2 Then
snail_2(22).y = 1052
End If
If snail_2(22).move_right > 2 Then
snail_2(22).move_right = 2
snail_2(22).y = 1052
End If
If snail_2(23).move_right = 1 Then
snail_2(23).y = 1051
End If
If snail_2(23).move_right = 2 Then
snail_2(23).y = 1052
End If
If snail_2(23).move_right > 2 Then
snail_2(23).move_right = 1
snail_2(23).y = 1052
End If
If snail_2(24).move_right = 1 Then
snail_2(24).y = 1051
End If
If snail_2(24).move_right = 2 Then
snail_2(24).y = 1052
End If
If snail_2(24).move_right > 2 Then
snail_2(24).move_right = 2
snail_2(24).y = 1052
End If
If snail_2(25).move_right = 1 Then
snail_2(25).y = 1051
End If
If snail_2(25).move_right = 2 Then
snail_2(25).y = 1052
End If
If snail_2(25).move_right > 2 Then
snail_2(25).move_right = 1
snail_2(25).y = 1052
End If
If snail_2(26).move_right = 1 Then
snail_2(26).y = 1051
End If
If snail_2(26).move_right = 2 Then
snail_2(26).y = 1052
End If
If snail_2(26).move_right > 2 Then
snail_2(26).move_right = 2
snail_2(26).y = 1052
End If
If snail_2(27).move_right = 1 Then
snail_2(27).y = 1051
End If
If snail_2(27).move_right = 2 Then
snail_2(27).y = 1052
End If
If snail_2(27).move_right > 2 Then
snail_2(27).move_right = 1
snail_2(27).y = 1052
End If
For sn = 1 To 16
snail_1(sn).x = 2000
snail_1(sn).y = -100
snail_1(sn).move_right = 3
snail_1(sn).move_up = 3
Next sn
For sn = 18 To 58
snail_1(sn).x = 2000
snail_1(sn).y = -100
snail_1(sn).move_right = 3
snail_1(sn).move_up = 3
Next sn
snail_1(61).x = (Rnd * 690)
snail_1(61).move_up = 3
snail_1(61).move_right = Int((Rnd * 200) + 1)
If snail_1(61).move_right = 1 Then
snail_1(61).y = 1051
End If
If snail_1(61).move_right = 2 Then
snail_1(61).y = 1052
End If
If snail_1(61).move_right > 2 Then
snail_1(61).move_right = 1
snail_1(61).y = 1052
End If
snail_1(64).x = (Rnd * 1890)
snail_1(64).move_up = 3
snail_1(64).move_right = Int((Rnd * 200) + 1)
If snail_1(64).move_right = 1 Then
snail_1(64).y = 1051
End If
If snail_1(64).move_right = 2 Then
snail_1(64).y = 1052
End If
If snail_1(64).move_right > 2 Then
snail_1(64).move_right = 1
snail_1(64).y = 1052
End If
snail_1(67).x = (Rnd * 1650)
snail_1(67).move_up = 3
snail_1(67).move_right = Int((Rnd * 200) + 1)
If snail_1(67).move_right = 1 Then
snail_1(67).y = 1051
End If
If snail_1(67).move_right = 2 Then
snail_1(67).y = 1052
End If
If snail_1(67).move_right > 2 Then
snail_1(67).move_right = 1
snail_1(67).y = 1052
End If
For r = 1 To num_fish
fish(r).x = Rnd * -20000
fish(r).y = Rnd * 1080
fish(r).move_right = 1
fish(r).move_up = Int(Rnd * 3)
Next r
Dim r2 As Integer
For r2 = 1 To num_fisha
fisha(r2).x = Rnd * -20000
fisha(r2).y = Rnd * 1080
fisha(r2).move_right = 1
fisha(r2).move_up = Int(Rnd * 3)
Next r2
For s = 1 To num_fishb
fishb(s).x = Rnd * 15000
fishb(s).y = Rnd * 540
fishb(s).move_right = 0
fishb(s).move_up = Int(Rnd * 3)
Next s
Dim s2 As Integer
For s2 = 1 To num_fishba
fishba(s2).x = Rnd * 15000
fishba(s2).y = Rnd * 540
fishba(s2).move_right = 0
fishba(s2).move_up = Int(Rnd * 3)
Next s2
'------------------------
Dim t As Integer
For t = 1 To num_fish2
fish2(t).x = Rnd * 1900
fish2(t).y = Rnd * 1080
fish2(t).move_right = Int(Rnd * 2)
fish2(t).move_up = Int(Rnd * 2)
Next t
Dim u As Integer
For u = 1 To num_fish6
fish6(u).x = Rnd * 1900
fish6(u).y = Rnd * 1080
fish6(u).move_right = Int(Rnd * 2)
fish6(u).move_up = Int(Rnd * 3)
Next u
'--------------------------------------
Randomize Timer
Dim f3t As Integer
For f3t = 1 To 14
fish3(f3t).x = Rnd * 3000
fish3(f3t).y = Rnd * 1080 + 250
fish3(f3t).move_right = Int(Rnd * 2)
fish3(f3t).move_up = Int(Rnd * 3)
Next f3t
Dim f3tb As Integer
For f3tb = 15 To num_fish3
fish3(f3tb).x = Rnd * -3000
fish3(f3tb).y = Rnd * 1080 + 540
fish3(f3tb).move_right = Int(Rnd * 2)
fish3(f3tb).move_up = Int(Rnd * 3)
Next f3tb
'---------------------------------------
'Dim a As Integer
'For a = 1 To num_fish4
' fish4(a).x = Rnd * 1200
' fish4(a).y = Rnd * 720
' fish4(a).move_up = Int(Rnd * 2)
' fish4(a).move_right = Int(Rnd * 2)
'Next a
Dim d As Integer
For d = 1 To num_fish5
fish5(d).x = Rnd * 1889
fish5(d).y = Rnd * 720
fish5(d).move_up = Int(Rnd * 3)
fish5(d).move_right = Int(Rnd * 2)
Next d
'---------------------------------------
Dim b As Integer
For b = 1 To num_bubbles
bub(b).x = Rnd * 1900
bub(b).y = Rnd * 1080
bub(b).move_right = Int(Rnd * 2)
Next b
'-------------------------------------
'-------------------------
hook(1).x = Rnd * 1899
hook(1).y = Int(Rnd * -1000)
hook(1).move_up = 0
plant(13).x = Rnd * 1899
plant(13).y = 1080
Next pl
End Sub
Sub fish_move
Dim i As Integer
Dim t As Integer
Dim t2%
Dim l As Integer
Dim m As Integer
t = 6
For i = 1 To 3
If fish(i).move_right >= 1 Then
fish(i).x = fish(i).x + t
Else
fish(i).x = fish(i).x + -t
End If
Select Case fish(i).move_up
Case 1
fish(i).y = fish(i).y - t
Case 3
fish(i).y = fish(i).y - 0
Case 0
fish(i).y = fish(i).y + t
End Select
If fish(i).x >= 5000 Then
fish(i).x = -5000
fish(i).y = (Rnd * 1080) + 50
End If
If fish(i).y > 1075 Then fish(i).move_up = 1
If fish(i).y <= 50 Then fish(i).move_up = 0
Next i
For i = 4 To num_fish
t2% = 7.5
If fish(i).move_right >= 1 Then
fish(i).x = fish(i).x + t2%
Else
fish(i).x = fish(i).x + -t2%
End If
Select Case fish(i).move_up
Case 1
fish(i).y = fish(i).y - t2%
Case 3
fish(i).y = fish(i).y - 0
Case 0
fish(i).y = fish(i).y + t2%
End Select
If fish(i).x >= 35000 Then
fish(i).x = (Rnd * -35000)
fish(i).y = (Rnd * 1080)
End If
If fish(i).y > 1040 Then fish(i).move_up = 1
If fish(i).y <= 50 Then fish(i).move_up = 0
Next i
Dim i2 As Integer
For i2 = 1 To 3
If fisha(i2).move_right >= 1 Then
fisha(i2).x = fisha(i2).x + 8.8
Else
fisha(i2).x = fisha(i2).x + -8.8
End If
Select Case fisha(i2).move_up
Case 1
fisha(i2).y = fisha(i2).y - 8.8
Case 3
fisha(i2).y = fisha(i2).y - 0
Case 0
fisha(i2).y = fisha(i2).y + 8.8
End Select
If fisha(i2).x >= 5000 Then
fisha(i2).x = -5000
fisha(i2).y = (Rnd * 1080) + 50
End If
If fisha(i2).y > 1040 Then fisha(i2).move_up = 1
If fisha(i2).y <= 50 Then fisha(i2).move_up = 0
Next i2
Dim t22%
For i2 = 4 To num_fisha
t22% = 8
If fisha(i2).move_right >= 1 Then
fisha(i2).x = fisha(i2).x + t22%
Else
fisha(i2).x = fisha(i2).x + -t22%
End If
Select Case fisha(i2).move_up
Case 1
fisha(i2).y = fisha(i2).y - t22%
Case 3
fisha(i2).y = fisha(i2).y - 0
Case 0
fisha(i2).y = fisha(i2).y + t22%
End Select
If fisha(i2).x >= 35000 Then
fisha(i2).x = (Rnd * -35000)
fisha(i2).y = (Rnd * 1080)
End If
If fisha(i2).y > 1040 Then fisha(i2).move_up = 1
If fisha(i2).y <= 50 Then fisha(i2).move_up = 0
Next i2
Dim z As Integer
For z = 1 To 15
If fishb(z).move_right = 1 Then
fishb(z).x = fishb(z).x + 8.5
Else
fishb(z).x = fishb(z).x + -8.5
End If
Select Case fishb(z).move_up
Case 1
fishb(z).y = fishb(z).y - 8.5
Case 3
fishb(z).y = fishb(z).y - 0
Case 0
fishb(z).y = fishb(z).y + 8.5
End Select
If fishb(z).x <= -5000 Then
fishb(z).x = (Rnd * 5000) + 2000
fishb(z).y = (Rnd * 600) + 50
End If
'If fishb(z).y >= 1020 And fishb(z).y < 1079 Then fishb(z).move_up = 3
If fishb(z).y >= 1079 Then fishb(z).move_up = 1
'If fishb(z).y <= 250 And fishb(z).y > 50 Then fishb(z).move_up = 3
If fishb(z).y <= 50 Then fishb(z).move_up = 0
Next z
For z = 16 To num_fishb
If fishb(z).move_right = 1 Then
fishb(z).x = fishb(z).x + 7.8
Else
fishb(z).x = fishb(z).x + -7.8
End If
Select Case fishb(z).move_up
Case 1
fishb(z).y = fishb(z).y - 1.8
Case 3
fishb(z).y = fishb(z).y - 0
Case 0
fishb(z).y = fishb(z).y + 2.3
End Select
If fishb(z).x <= -5000 Then
fishb(z).x = (Rnd * 5000) + 3000
fishb(z).y = (Rnd * 540) + 50
End If
If fishb(z).y >= 1020 And fishb(z).y < 1079 Then fishb(z).move_up = 3
If fishb(z).y >= 1079 Then fishb(z).move_up = 1
'If fishb(z).y < 250 And fishb(z).y > 50 Then fishb(z).move_up = 3
If fishb(z).y <= 50 Then fishb(z).move_up = 0
Next z
Dim z2 As Integer
For z2 = 1 To 9
If fishba(z2).move_right = 1 Then
fishba(z2).x = fishba(z2).x + 9
Else
fishba(z2).x = fishba(z2).x + -9
End If
Select Case fishba(z2).move_up
Case 1
fishba(z2).y = fishba(z2).y - 1.5
Case 3
fishba(z2).y = fishba(z2).y - 0
Case 0
fishba(z2).y = fishba(z2).y + 1.8
End Select
If fishba(z2).x <= -15000 Then
fishba(z2).x = (Rnd * 15000) + 5000
fishba(z2).y = (Rnd * 1020) + 50
End If
'If fishba(z2).y >= 1020 And fishba(z2).y < 1079 Then fishba(z2).move_up = 3
If fishba(z2).y >= 1079 Then fishba(z2).move_up = 1
'If fishba(z2).y < 250 And fishba(z2).y > 50 Then fishba(z2).move_up = 3
If fishba(z2).y <= 50 Then fishba(z2).move_up = 0
Next z2
For z2 = 10 To num_fishba
If fishba(z2).move_right = 1 Then
fishba(z2).x = fishba(z2).x + 5.8
Else
fishba(z2).x = fishba(z2).x + -5.8
End If
Select Case fishba(z2).move_up
Case 1
fishba(z2).y = fishba(z2).y - 2.8
Case 3
fishba(z2).y = fishba(z2).y - 0
Case 0
fishba(z2).y = fishba(z2).y + 2.3
End Select
If fishba(z2).x <= -25000 Then
fishba(z2).x = (Rnd * 25000) + 10000
fishba(z2).y = (Rnd * 540) + 120
End If
If fishba(z2).y >= 1020 And fishba(z2).y < 1079 Then fishba(z2).move_up = 3
If fishba(z2).y >= 1079 Then fishba(z2).move_up = 1
'If fishba(z2).y < 250 And fishba(z2).y > 50 Then fishba(z2).move_up = 3
If fishba(z2).y <= 50 Then fishba(z2).move_up = 0
Next z2
If fish(5).x >= 10000 Then
fish(5).x = Rnd * -5000
fish(5).y = Rnd * 1080
End If
If fish(5).y > 650 Then fish(5).move_up = 1
If fish(5).y <= 5 Then fish(5).move_up = 0
If fish(5).move_right = 1 Then
fish(5).x = fish(5).x + 2
End If
If fish(5).move_up = 1 Then
fish(5).y = fish(5).y - 2
Else
fish(5).y = fish(5).y + 2
End If
Dim k As Integer
Dim speed%
speed% = 2.8
For k = 1 To num_fish2
Select Case fish2(k).move_up
Case 1
fish2(k).y = fish2(k).y - speed%
Case 3
fish2(k).y = fish2(k).y - 0
Case 0
fish2(k).y = fish2(k).y + speed%
End Select
Select Case fish2(k).move_right
Case 0
fish2(k).x = fish2(k).x - speed%
Case 1
fish2(k).x = fish2(k).x + speed%
End Select
If fish2(k).x <= -40 Then
fish2(k).move_right = 1
End If
If fish2(k).x >= 1980 Then
fish2(k).move_right = 0
End If
If fish2(k).y <= 1 Then
fish2(k).move_up = 0
End If
If fish2(k).y >= 1079 Then
fish2(k).move_up = 1
End If
Next k
Dim fish6_loop As Integer
For fish6_loop = 1 To num_fish6
Select Case fish6(fish6_loop).move_up
Case Is >= 1 And fish6(fish6_loop).move_up < 3
fish6(fish6_loop).y = fish6(fish6_loop).y - 1.5
Case 3
fish6(fish6_loop).y = fish6(fish6_loop).y - 0
Case 0
fish6(fish6_loop).y = fish6(fish6_loop).y + 1.5
End Select
Select Case fish6(fish6_loop).move_right
Case 0
fish6(fish6_loop).x = fish6(fish6_loop).x - 1.5
Case Is >= 1
fish6(fish6_loop).x = fish6(fish6_loop).x + 1.5
End Select
Select Case fish6(fish6_loop).x
Case Is = -10000
fish6(fish6_loop).y = Rnd * 1080
fish6(fish6_loop).x = 10000
Case Is > 2100
fish6(fish6_loop).y = Rnd * 1080
fish6(fish6_loop).x = -400
End Select
Select Case fish6(fish6_loop).y
Case Is <= 0
fish6(fish6_loop).move_up = 0
Case Is >= 1042
fish6(fish6_loop).move_up = 1
End Select
Next fish6_loop
Dim t3 As Integer
t3 = 4.8
For l = 1 To 14
Select Case fish3(l).move_right
Case Is = 1
fish3(l).x = fish3(l).x + t3
Case Is = 0
fish3(l).x = fish3(l).x - t3
End Select
Select Case fish3(l).move_up
Case Is = 1
fish3(l).y = fish3(l).y - t3
Case Is = 0
fish3(l).y = fish3(l).y + t3
End Select
Select Case fish3(l).y
Case Is <= 20
fish3(l).move_up = 0
Case Is >= 900
fish3(l).move_up = 1
End Select
Select Case fish3(l).x
Case Is <= -1600
fish3(l).x = 2500
fish3(l).y = Rnd * 1080
Case Is >= 2100
fish3(l).x = -500
fish3(l).y = Rnd * 1080
End Select
Next l
For l = 15 To 20
Select Case fish3(l).move_right
Case Is = 1
fish3(l).x = fish3(l).x + 3.5
Case Is = 0
fish3(l).x = fish3(l).x - 3.5
End Select
Select Case fish3(l).move_up
Case Is = 1
fish3(l).y = fish3(l).y - 3.5
Case Is = 0
fish3(l).y = fish3(l).y + 3.5
End Select
Select Case fish3(l).y
Case Is <= 50
fish3(l).move_up = 0
Case Is >= 1000
fish3(l).move_up = 1
End Select
Select Case fish3(l).x
Case Is <= -1600
fish3(l).x = 2200
fish3(l).y = Rnd * 1080
Case Is >= 2300
fish3(l).x = -1500
fish3(l).y = Rnd * 1080
End Select
Next l
For l = 21 To num_fish3
Select Case fish3(l).move_right
Case Is = 1
fish3(l).x = fish3(l).x + 2.5
Case Is = 0
fish3(l).x = fish3(l).x - 2.5
End Select
Select Case fish3(l).move_up
Case Is = 1
fish3(l).y = fish3(l).y - 2.5
Case Is = 0
fish3(l).y = fish3(l).y + 2.5
End Select
Select Case fish3(l).y
Case Is <= 540
fish3(l).move_up = 0
Case Is >= 1050
fish3(l).move_up = 1
End Select
Select Case fish3(l).x
Case Is <= -1600
fish3(l).x = 3000
fish3(l).y = Rnd * 1080
Case Is >= 3100
fish3(l).x = -1500
fish3(l).y = Rnd * 1080
End Select
Next l
For m = 1 To 10
Select Case bub(m).move_right
Case Is = 1
bub(m).x = bub(m).x + .65
Case Is = 0
bub(m).x = bub(m).x - .65
End Select
bub(m).y = bub(m).y - 12.7
If bub(m).y <= 0 Then
bub(m).y = 1080 + 10
bub(m).x = Rnd * 1900
bub(m).move_right = (Rnd * 1) + 1
End If
Select Case bub2(m).move_right
Case Is = 1
bub2(m).x = bub2(m).x + .75
Case Is = 0
bub2(m).x = bub2(m).x - .75
End Select
bub2(m).y = bub2(m).y - 23.7
If bub2(m).y <= 0 Then
bub2(m).y = 1080 + 10
bub2(m).x = Rnd * 1900
bub2(m).move_right = (Rnd * 1) + 1
End If
Select Case bub3(m).move_right
Case Is = 1
bub3(m).x = bub3(m).x + .55
Case Is = 0
bub3(m).x = bub3(m).x - .55
End Select
bub3(m).y = bub3(m).y - 12.5
If bub3(m).y <= 0 Then
bub3(m).y = 1080 + 10
bub3(m).x = Rnd * 1900
bub3(m).move_right = (Rnd * 1) + 1
End If
Next m
Dim n As Integer
For n = 11 To 20
Select Case bub(n).move_right
Case Is = 1
bub(n).x = bub(n).x + .87
Case Is = 0
bub(n).x = bub(n).x - .87
End Select
bub(n).y = bub(n).y - 12
If bub(n).y <= 0 Then
bub(n).y = 1080 + 10
bub(n).x = Rnd * 1900
bub(n).move_right = Rnd * 2
End If
Select Case bub2(n).move_right
Case Is = 1
bub2(n).x = bub2(n).x + .65
Case Is = 0
bub2(n).x = bub2(n).x - .65
End Select
bub2(n).y = bub2(n).y - 11.7
If bub2(n).y <= 0 Then
bub2(n).y = 1080 + 10
bub2(n).x = Rnd * 1900
bub2(n).move_right = (Rnd * 1) + 1
End If
Select Case bub3(n).move_right
Case Is = 1
bub3(n).x = bub3(n).x + .65
Case Is = 0
bub3(n).x = bub3(n).x - .65
End Select
bub3(n).y = bub3(n).y - 28.7
If bub3(n).y <= 0 Then
bub3(n).y = 1080 + 10
bub3(n).x = Rnd * 1900
bub3(n).move_right = (Rnd * 1) + 1
End If
Next n
Dim p As Integer
For p = 1 To num_fish4
Select Case fish4(p).move_up
Case Is = 0
fish4(p).y = fish4(p).y + .75
Case Is = 1
fish4(p).y = fish4(p).y - .75
End Select
Select Case fish4(p).move_right
Case Is = 0
fish4(p).x = fish4(p).x - .65
Case Is = 1
fish4(p).x = fish4(p).x + .65
End Select
Select Case fish4(p).x
Case Is = -500
fish4(p).x = 2000
fish4(p).y = (Rnd * 1080)
Case Is = 2100
fish4(p).x = -400
fish4(p).y = (Rnd * 1080)
End Select
Select Case fish4(p).y
Case Is <= 0
fish4(p).move_up = 0
Case Is >= 1080
fish4(p).move_up = 1
End Select
Next p
For p = 1 To num_fish5
Select Case fish5(p).y
Case Is <= 0
fish5(p).move_up = 0
Case Is >= 420 + (p * 8)
fish5(p).move_up = 1
End Select
Select Case fish5(p).x
Case Is <= -500
fish5(p).x = 2000
fish5(p).y = (Rnd * 420) + 1
fish5(p).move_up = Int(Rnd * 3)
Case Is >= 2100
fish5(p).x = -400
fish5(p).y = (Rnd * 420) + 1
fish5(p).move_up = Int(Rnd * 3)
End Select
Select Case fish5(p).move_up
Case Is = 0
fish5(p).y = fish5(p).y + 2.65
Case Is = 1
fish5(p).y = fish5(p).y - 2.65
Case Is = 2
fish5(p).y = fish5(p).y + 0
End Select
Select Case fish5(p).move_right
Case Is = 0
fish5(p).x = fish5(p).x - 2.75
Case Is = 1
fish5(p).x = fish5(p).x + 2.75
End Select
Next p
End Sub
Sub snail_move
Dim sm As Integer
For sn = 1 To 16
snail_1(sn).x = 2000
snail_1(sn).y = -100
snail_1(sn).move_right = 3
snail_1(sn).move_up = 3
Next sn
For sn = 18 To 58
snail_1(sn).x = 2000
snail_1(sn).y = -100
snail_1(sn).move_right = 3
snail_1(sn).move_up = 3
Next sn
For sn = 60 To 62
Select Case snail_1(sn).move_up
Case Is = 0
snail_1(sn).y = snail_1(sn).y + (Rnd * 1.8)
snail_1(sn).move_right = 3
Case Is = 1
snail_1(sn).y = snail_1(sn).y - (Rnd * 1.2)
snail_1(sn).move_right = 3
Case Is = 3
snail_1(sn).y = snail_1(sn).y + 0
End Select
Select Case snail_1(sn).move_right
Case Is = 0
snail_1(sn).x = snail_1(sn).x - (Rnd * 1.8)
snail_1(sn).move_up = 3
Case Is = 1
snail_1(sn).x = snail_1(sn).x + (Rnd * 1.6)
snail_1(sn).move_up = 3
Case Is = 3
snail_1(sn).x = snail_1(sn).x + 0
End Select
Next sn
For sm = 63 To 65
Select Case snail_1(sm).move_up
Case Is = 0
snail_1(sm).y = snail_1(sm).y + Rnd * 1.6
snail_1(sm).move_right = 3
Case Is = 1
snail_1(sm).y = snail_1(sm).y - Rnd * 1.1
snail_1(sm).move_right = 3
Case Is = 3
snail_1(sm).y = snail_1(sm).y + 0
End Select
Select Case snail_1(sm).move_right
Case Is = 0
snail_1(sm).x = snail_1(sm).x - Rnd * 1.6
snail_1(sm).move_up = 3
Case Is = 1
snail_1(sm).x = snail_1(sm).x + Rnd * 1.6
snail_1(sm).move_up = 3
Case Is = 3
snail_1(sm).x = snail_1(sm).x + 0
End Select
Next sm
For sm = 66 To num_snail_1
Select Case snail_1(sm).move_up
Case Is = 0
snail_1(sm).y = snail_1(sm).y + Rnd * 2.8
snail_1(sm).move_right = 3
Case Is = 1
snail_1(sm).y = snail_1(sm).y - Rnd * 2.2
snail_1(sm).move_right = 3
Case Is = 3
snail_1(sm).y = snail_1(sm).y + 0
End Select
Select Case snail_1(sm).move_right
Case Is = 0
snail_1(sm).x = snail_1(sm).x - Rnd * 2.4
snail_1(sm).move_up = 3
Case Is = 1
snail_1(sm).x = snail_1(sm).x + Rnd * 2.4
snail_1(sm).move_up = 3
Case Is = 3
snail_1(sm).x = snail_1(sm).x + 0
End Select
Next sm
For sm = 1 To num_snail_1
If snail_1(sm).x <= 45 And snail_1(sm).y >= 1055 And snail_1(sm).move_up = 3 Then
snail_1(sm).x = 45
snail_1(sm).move_right = 3
snail_1(sm).move_up = 1
Else If snail_1(sm).x <= 45 And snail_1(sm).y >= 1054 And snail_1(sm).move_up = 0 Then
snail_1(sm).y = 1055
snail_1(sm).x = 46
snail_1(sm).move_right = 1
snail_1(sm).move_up = 3
End If
End If
If snail_1(sm).x >= 1860 And snail_1(sm).y >= 1055 And snail_1(sm).move_up = 3 Then
snail_1(sm).move_right = 3
snail_1(sm).move_up = 1
Else If snail_1(sm).x >= 1860 And snail_1(sm).y > 1055 And snail_1(sm).move_up = 0 Then
snail_1(sm).y = 1055
snail_1(sm).x = 1859
snail_1(sm).move_right = 0
snail_1(sm).move_up = 3
End If
End If
If snail_1(sm).x >= 1860 And snail_1(sm).y = 1055 And snail_1(sm).move_right = 1 Then
snail_1(sm).move_right = 3
snail_1(sm).move_up = 1
End If
If snail_1(sm).x <= 45 And snail_1(sm).y <= 10 Then
snail_1(sm).move_up = 0
End If
If snail_1(sm).x >= 1860 And snail_1(sm).y < 10 Then
snail_1(sm).move_up = 0
End If
Next sm
End Sub
Sub snail_move_2
For sv = 17 To 27
Select Case snail_2(sv).move_up
Case Is = 1
snail_2(sv).y = snail_2(sv).y + Rnd * 1.8
Case Is = 2
snail_2(sv).y = snail_2(sv).y - Rnd * 1.4
Case Is = 3
snail_2(sv).y = snail_2(sv).y + 0
End Select
Select Case snail_2(sv).move_right
Case Is = 1
snail_2(sv).x = snail_2(sv).x - Rnd * 2.5
Case Is = 2
snail_2(sv).x = snail_2(sv).x + Rnd * 2.5
Case Is = 3
snail_2(sv).x = snail_2(sv).x + 0
End Select
''...left
If snail_2(sv).x <= 1625 And snail_2(sv).y = 1051 And snail_2(sv).move_right = 1 Then
snail_2(sv).move_up = 2
snail_2(sv).move_right = 3
snail_2(sv).x = 1625
snail_2(sv).y = 1050
End If
''...right
If snail_2(sv).x >= 1625 And snail_2(sv).y = 1052 And snail_2(sv).move_right = 2 Then
snail_2(sv).move_up = 2
snail_2(sv).move_right = 3
snail_2(sv).x = 1625
snail_2(sv).y = 1050
End If
If snail_2(sv).x = 1625 And snail_2(sv).y <= 710 Then
snail_2(sv).move_up = 1
snail_2(sv).move_right = 3
End If
If snail_2(sv).x = 1625 And snail_2(sv).y >= 1049 And snail_2(sv).move_up = 1 Then
snail_2(sv).move_up = 3
snail_2(sv).move_right = Int((Rnd * 2)) + 1
snail_2(sv).x = 1624
snail_2(sv).y = 1050
End If
''...right
If snail_2(sv).x = 275 And snail_2(sv).y = 1052 Then
If snail_2(sv).move_right = 2 Then
snail_2(sv).move_up = 2
snail_2(sv).move_right = 3
'snail_2(sv).x = 275
snail_2(sv).y = 1049
End If
End If
''...left
If snail_2(sv).x <= 275 And snail_2(sv).y = 1050 Then
If snail_2(sv).move_right = 1 Then
snail_2(sv).move_up = 2
snail_2(sv).move_right = 3
snail_2(sv).x = 275
snail_2(sv).y = 1049
End If
End If
If snail_2(sv).x = 275 And snail_2(sv).y <= 730 And snail_2(sv).move_up = 2 Then
snail_2(sv).move_up = 1
snail_2(sv).move_right = 3
End If
If snail_2(sv).x = 275 And snail_2(sv).y >= 1048 And snail_2(sv).move_up = 1 Then
snail_2(sv).move_up = 3
snail_2(sv).move_right = Int((Rnd * 2)) + 1
snail_2(sv).y = 1052
snail_2(sv).x = 276
End If
If snail_2(sv).x <= 190 And snail_2(sv).y >= 1049 And snail_2(sv).move_right = 1 Then
snail_2(sv).move_up = 2
snail_2(sv).move_right = 3
snail_2(sv).x = 190
snail_2(sv).y = 1048
End If
If snail_2(sv).x = 190 And snail_2(sv).y <= 790 And snail_2(sv).move_up = 2 Then
snail_2(sv).move_up = 1
snail_2(sv).move_right = 3
End If
If snail_2(sv).x = 190 And snail_2(sv).y >= 1048 And snail_2(sv).move_up = 1 Then
snail_2(sv).move_up = 3
snail_2(sv).y = 1052
snail_2(sv).x = 189
snail_2(sv).move_right = Int((Rnd * 2)) + 1
End If
If snail_2(sv).x <= 1 Then
snail_2(sv).x = 1900
snail_2(sv).y = 1051
snail_2(sv).move_up = 3
snail_2(sv).move_right = 1
End If
If snail_2(sv).x > 1900 Then
snail_2(sv).x = 2
snail_2(sv).y = 1052
snail_2(sv).move_up = 3
snail_2(sv).move_right = 2
End If
Next sv
End Sub
Sub convert_to_12hr
Shared h%
Shared clock_timer%
Select Case h%
Case Is > 12
h% = h% - 12
Case Is = 0
h% = h% + 12
End Select
End Sub
Sub move_clock
Select Case clock_right
Case Is = 1
x% = x% + .75
Case Is = 0
x% = x% - .75
End Select
Select Case clock_up
Case Is = 1
y% = y% - .75
Case Is = 0
y% = y% + .75
End Select
Select Case x%
Case Is >= 1899 - 90
clock_right = 0
Case Is <= 0 + 90
clock_right = 1
End Select
Select Case y%
Case Is >= 1079 - 90
clock_up = 1
Case Is <= 0 + 90
clock_up = 0
End Select
End Sub
Sub holiday_check
Select Case Left$(current_date$, 5)
'Case "01-04" ' current date
' _PutImage , alert420&
Case "01-01" 'new year
_PutImage , new_year_pic&
Case "03-17" ' st paddy
_PutImage , st_pat_pic&
Case "04-20" ' 420
_PutImage , alert420&
Case "07-04" '4th of july
_PutImage , july_4th_pic&
Case "10-31" 'halloween
_PutImage , halloween_pic&
Case "11-01" ' dia del meurtos
_PutImage , de_los_meurtos_pic&
Case "12-25" 'christmas
_PutImage , xmas_pic&
Case Else
screen_pic
End Select
End Sub
Sub screen_pic
'====420 alert===='
current_hr = Val(Left$(tm$, 2))
If current_hr >= 4 And current_hr <= 16 Then
_PutImage , day_pic&
Else
_PutImage , night_pic&
End If
End Sub
Sub clock_color_day
Shared x%, y%, h%, tm$
Circle (x%, y%), 150, BLUE
Paint (x%, y%), YELLOW, BLUE
Circle (x%, y%), 145, BLUE
Circle (x%, y%), 140, YELLOW
Paint (x%, y%), LIGHTBLUE, BLUE
Color LIGHTYELLOW, LIGHTBLUE
If f& > 0 Then _Font f&
_PrintString (x% - 118, y%), Right$("0" + LTrim$(Str$(h%)), 2) + Right$(tm$, 6)
Color _RGB32(255, 150, 0), LIGHTBLUE
If fkn& > 0 Then _Font fkn&
_PrintString (x% - 100, y% - 50), "kn0ne"
Circle (x%, y%), BLUE
Color LIGHTYELLOW, LIGHTBLUE
If fdt& > 0 Then _Font fdt&
_PrintString (x% - 112, y% + 30), current_date$
'_PrintString (x% - 23, y% - 75), Str$(Int((Rnd * 2)) + 1)
Circle (x%, y%), 125, BLUE
Circle (x%, y%), 160, YELLOW
Circle (x%, y%), 170, BLUE
Circle (x%, y%), 123, BLUE
Circle (x%, y%), 158, YELLOW
Circle (x%, y%), 168, BLUE
End Sub
Sub clock_color_night
Shared x%, y%, h%, tm$
Circle (x%, y%), 150, GRAY
Paint (x%, y%), DARKGRAY, GRAY
Circle (x%, y%), 145, BRIGHTGREEN
Circle (x%, y%), 140, GREEN '
Paint (x%, y%), BLACK, GRAY
Color BRIGHTGREEN, BLACK
If fdt& > 0 Then _Font fdt&
_PrintString (x% - 112, y% + 30), current_date$
If f& > 0 Then _Font f&
_PrintString (x% - 118, y%), Right$("0" + LTrim$(Str$(h%)), 2) + Right$(tm$, 6)
Circle (x%, y%), GREEN
Color GREEN, BLACK
If fkn& > 0 Then _Font fkn&
_PrintString (x% - 100, y% - 50), "kn0ne"
'_PrintString (x% - 100, y% - 50), Str$(Int(Rnd * 3) + 1)
'Color BLACK, WHITE
'_PrintString (540, 540), Str$(Int((Rnd * 2)) + 1)
Circle (x%, y%), 130, BRIGHTGREEN
Circle (x%, y%), 150, GREEN
Circle (x%, y%), 170, BRIGHTGREEN
End Sub
Sub move_hook
Select Case hook(1).y
Case Is <= Int(Rnd * -2400) - 800
hook(1).move_up = 0
hook(1).x = Rnd * 1899
Case Is >= (Rnd * 840) + 350
hook(1).move_up = 1
End Select
Select Case hook(1).x
Case Is <= 0
hook(1).x = 10
Case Is >= 1899
hook(1).x = 1890
End Select
Select Case hook2(1).y
Case Is <= Int(Rnd * -4000) - 900
hook2(1).move_up = 0
hook2(1).x = Rnd * 1890
Case Is >= (Rnd * 900) + 567
hook2(1).move_up = 3
End Select
my_timer2 = my_timer2 + 1
If my_timer2 > 2000 Then my_timer2 = 0
If hook2(1).y >= 567 And my_timer2 > 1800 Then
hook2(1).move_up = 1
End If
Select Case hook2(1).move_up
Case Is = 0
hook2(1).y = hook2(1).y + 1.65
Case Is = 1
hook2(1).y = hook2(1).y - 4
End Select
Select Case hook3(1).y
Case Is <= Int(Rnd * -5000) - 700
hook3(1).move_up = 0
hook3(1).x = Rnd * 1899
Case Is >= (Rnd * 890) + 850
hook3(1).move_up = 3
End Select
If hook3(1).y >= 850 And my_timer2 > 1500 Then
hook3(1).move_up = 1
End If
Select Case hook3(1).move_up
Case Is = 0
hook3(1).y = hook3(1).y + 1.55
Case Is = 1
hook3(1).y = hook3(1).y - 6.5
End Select
Select Case hook4(1).y
Case Is <= Int(Rnd * -850) - 420
hook4(1).move_up = 0
hook4(1).x = Rnd * 1899
Case Is >= (Rnd * 420) + 245
hook4(1).move_up = 3
End Select
my_timer3 = my_timer3 + 1
If my_timer3 > 1500 Then my_timer3 = 0
If hook4(1).y >= 245 And my_timer3 > 654 Then
hook4(1).move_up = 1
End If
Select Case hook4(1).move_up
Case Is = 0
hook4(1).y = hook4(1).y + .85
Case Is = 1
hook4(1).y = hook4(1).y - 1.85
End Select
Select Case hook5(1).y
Case Is <= Int(Rnd * -850) - 420
hook5(1).move_up = 0
hook5(1).x = Rnd * 1899
Case Is >= (Rnd * 420) + 245
hook5(1).move_up = 3
End Select
If hook5(1).y >= 245 And my_timer3 > 850 Then
hook5(1).move_up = 1
End If
Select Case hook5(1).move_up
Case Is = 0
hook5(1).y = hook5(1).y + .85
Case Is = 1
hook5(1).y = hook5(1).y - 1.85
End Select
End Sub
Sub fish_AI
Randomize Timer
'--hook(1)&fish3(11)--
If randf = 1 And hook(1).move_up = 1 Then
fish6(8).y = hook(1).y + Rnd * 5
fish6(8).x = hook(1).x + Rnd * 50
hook(1).move_up = 1
If hook(1).x <= 950 Then
hook(1).x = hook(1).x + 4
Else
hook(1).x = hook(1).x - 4
End If
hook(1).y = hook(1).y - 5
ElseIf randf = 2 And hook(1).move_up = 1 Then
fishb(33).y = hook(1).y + Rnd * 5
fishb(33).x = hook(1).x + Rnd * 25
fishb(33).move_up = 1
hook(1).move_up = 1
If hook(1).x <= 950 Then
hook(1).x = hook(1).x + 4
Else
hook(1).x = hook(1).x - 4
End If
hook(1).y = hook(1).y - 5
fishb(33).y = fishb(33).y - 10
ElseIf randf = 3 And hook(1).move_up = 1 Then
fish(35).y = hook(1).y + Rnd * 5
fish(35).x = hook(1).x - Rnd * 35
fish(35).move_up = 1
hook(1).move_up = 1
hook(1).y = hook(1).y - 5
If hook(1).x <= 950 Then
hook(1).x = hook(1).x + 4
Else
hook(1).x = hook(1).x - 4
End If
fish(35).y = fish(35).y - 10
ElseIf randf = 4 And hook(1).move_up = 1 Then
fish3(15).y = hook(1).y + Rnd * 5
fish3(15).x = hook(1).x - Rnd * 35
fish3(15).move_up = 1
hook(1).move_up = 1
hook(1).y = hook(1).y - 5
If hook(1).x <= 950 Then
hook(1).x = hook(1).x + 4
Else
hook(1).x = hook(1).x - 4
End If
ElseIf randf >= 5 And hook(1).move_up = 1 Then
fish2(15).y = hook(1).y + Rnd * 5
fish2(15).x = hook(1).x - Rnd * 35
fish2(15).move_up = 1
hook(1).move_up = 1
hook(1).y = hook(1).y - 5
If hook(1).x <= 950 Then
hook(1).x = hook(1).x + 4
Else
hook(1).x = hook(1).x - 4
End If
End If
If hook(1).y < -500 Then
randf = (Rnd * 5) + 1
End If
'===================================================='
Dim l As Integer
'--hook2(1)&fish3(9)--
Dim g As Integer
g = 0
If randf2 = 1 And hook2(1).move_up = 1 Then
fish3(11).y = hook2(1).y + Rnd * 5
fish3(11).x = hook2(1).x + Rnd * 20
fish3(11).move_up = 1
hook2(1).move_up = 1
hook2(1).y = hook2(1).y - 5
If hook2(1).x <= 599 Then
hook2(1).x = hook2(1).x + 4
Else
hook2(1).x = hook2(1).x - 4
End If
fish3(11).y = fish3(11).y - 10
ElseIf randf2 = 2 And hook2(1).move_up = 1 Then
fishb(7).y = hook2(1).y + Rnd * 5
fishb(7).x = hook2(1).x + Rnd * 30
fishb(7).move_up = 1
hook2(1).move_up = 1
hook2(1).y = hook2(1).y - 5
If hook2(1).x <= 599 Then
hook2(1).x = hook2(1).x + 4
Else
hook2(1).x = hook2(1).x - 4
End If
fishb(7).y = fishb(7).y - 10
ElseIf randf2 = 3 And hook2(1).move_up = 1 Then
fish(7).y = hook2(1).y + Rnd * 5
fish(7).x = hook2(1).x + Rnd * 25
fish(7).move_up = 1
hook2(1).move_up = 1
hook2(1).y = hook2(1).y - 5
If hook2(1).x <= 599 Then
hook2(1).x = hook2(1).x + 4
Else
hook2(1).x = hook2(1).x - 4
End If
fish(7).y = fish(7).y - 10
ElseIf randf2 = 4 And hook2(1).move_up = 1 And hook2(1).y > 226 Then
fish(10).y = hook2(1).y + Rnd * 5
fish(10).x = hook2(1).x + Rnd * 25
fish(10).move_up = 1
hook2(1).move_up = 1
hook2(1).y = hook2(1).y - 5
If hook2(1).x <= 950 Then
hook2(1).x = hook2(1).x + 4
Else
hook2(1).x = hook2(1).x - 4
End If
Else
fish(10).move_up = 0
fish(10).x = fish(10).x + 9.5
End If
If hook2(1).y < -500 Then
randf2 = Int(Rnd * 4) + 1
End If
'If hook2(1).y < 0 Then
'fish(7).y = 1201
'fishb(7).y = 1201
'fish3(11).y = 1201
'End If
'==== hook3(1)&fish(i)========='
'randf3 = 4
If randf3 = 1 And hook3(1).move_up = 1 Then
fish3(25).y = hook3(1).y + Rnd * 5
fish3(25).x = hook3(1).x + Rnd * 20
fish3(25).move_up = 1
hook3(1).move_up = 1
hook3(1).y = hook3(1).y - 5
If hook3(1).x <= 599 Then
hook3(1).x = hook3(1).x + 4
Else
hook3(1).x = hook3(1).x - 4
End If
fish3(25).y = fish3(25).y - 10
End If
If randf3 = 2 And hook3(1).move_up = 1 Then
fish(1).y = hook3(1).y + Rnd * 5
fish(1).x = hook3(1).x + Rnd * 20
fish(1).move_up = 1
hook3(1).move_up = 1
hook3(1).y = hook3(1).y - 5
If hook3(1).x <= 599 Then
hook3(1).x = hook3(1).x + 4
Else
hook3(1).x = hook3(1).x - 4
End If
fish(1).y = fish(1).y - 8
End If
If randf3 = 3 And hook3(1).move_up = 1 Then
fishb(35).y = hook3(1).y + Rnd * 5
fishb(35).x = hook3(1).x + Rnd * 20
fishb(35).move_up = 1
hook3(1).move_up = 1
hook3(1).y = hook3(1).y - 5
If hook3(1).x <= 599 Then
hook3(1).x = hook3(1).x + 4
Else
hook3(1).x = hook3(1).x - 4
End If
fishb(35).y = fishb(35).y - 10
ElseIf randf3 = 4 And hook3(1).move_up = 1 And hook3(1).y > 400 Then
fishb(35).y = hook3(1).y + Rnd * 5
fishb(35).x = hook3(1).x + Rnd * 20
fishb(35).move_up = 1
hook3(1).move_up = 1
hook3(1).y = hook3(1).y - 5
If hook3(1).x <= 599 Then
hook3(1).x = hook3(1).x + 4
Else
hook3(1).x = hook3(1).x - 4
End If
Else
fishb(35).move_up = 0
fishb(35).x = fishb(35).x - 9.3
End If
If hook3(1).y < -500 Then
randf3 = Int(Rnd * 4) + 1
End If
If randf4 = 1 And hook4(1).move_up = 1 Then
fish4(2).y = hook4(1).y + Rnd * 2
fish4(2).x = hook4(1).x + Rnd * 4
hook4(1).move_up = 1
End If
If hook4(1).x <= 950 And randf4 = 1 And hook4(1).move_up = 1 Then
hook4(1).x = hook4(1).x + 2
Else
If hook4(1).x > 950 And randf4 = 1 And hook4(1).move_up = 1 Then
hook4(1).x = hook4(1).x - 2
End If
End If
If randf4 = 2 And hook4(1).move_up = 1 Then
fish6(2).y = hook4(1).y + Rnd * 2
fish6(2).x = hook4(1).x + Rnd * 5
hook4(1).move_up = 1
End If
If hook4(1).x <= 950 And randf4 = 2 And hook4(1).move_up = 1 Then
hook4(1).x = hook4(1).x + 2
Else
If hook4(1).x > 950 And randf4 = 2 And hook4(1).move_up = 1 Then
hook4(1).x = hook4(1).x - 2
End If
End If
If randf4 = 3 And hook4(1).move_up = 1 Then
fish2(4).y = hook4(1).y + Rnd * 2
fish2(4).x = hook4(1).x + Rnd * 2
hook4(1).move_up = 1
End If
If hook4(1).x <= 950 And randf4 = 3 And hook4(1).move_up = 1 Then
hook4(1).x = hook4(1).x + 2
Else
If hook4(1).x > 950 And randf4 = 3 And hook4(1).move_up = 1 Then
hook4(1).x = hook4(1).x - 2
End If
End If
If randf4 = 4 And hook4(1).move_up = 1 And hook4(1).y > 50 Then
fish2(4).y = hook4(1).y + Rnd * 2
fish2(4).x = hook4(1).x + Rnd * 2
hook4(1).move_up = 1
End If
If hook4(1).x <= 950 And randf4 = 4 And hook4(1).move_up = 1 Then
hook4(1).x = hook4(1).x + 2
'fish2(4).move_up = 0
fish2(4).x = fish2(4).x - 9.3
Else
If hook4(1).x > 950 And randf4 = 4 And hook4(1).move_up = 1 Then
hook4(1).x = hook4(1).x - 2
fish2(4).move_up = 0
fish2(4).x = fish2(4).x + 9.3
End If
End If
If randf5 = 1 And hook5(1).move_up = 1 Then
fish4(2).y = hook5(1).y + Rnd * 2
fish4(2).x = hook5(1).x + Rnd * 4
hook5(1).move_up = 1
End If
If hook5(1).x <= 950 And randf5 = 1 And hook5(1).move_up = 1 Then
hook5(1).x = hook5(1).x + 2
Else
If hook5(1).x > 950 And randf5 = 1 And hook5(1).move_up = 1 Then
hook5(1).x = hook5(1).x - 2
End If
End If
If randf5 = 2 And hook5(1).move_up = 1 Then
fish6(3).y = hook5(1).y + Rnd * 2
fish6(3).x = hook5(1).x + Rnd * 5
hook5(1).move_up = 1
End If
If hook5(1).x <= 950 And randf5 = 2 And hook5(1).move_up = 1 Then
hook5(1).x = hook5(1).x + 2
Else
If hook5(1).x > 950 And randf5 = 2 And hook5(1).move_up = 1 Then
hook5(1).x = hook5(1).x - 2
End If
End If
If randf5 = 3 And hook5(1).move_up = 1 Then
fish5(2).y = hook5(1).y + Rnd * 2
fish5(2).x = hook5(1).x + Rnd * 2
hook5(1).move_up = 1
End If
If hook5(1).x <= 950 And randf5 = 3 And hook5(1).move_up = 1 Then
hook5(1).x = hook5(1).x + 2
Else
If hook5(1).x > 950 And randf5 = 3 And hook5(1).move_up = 1 Then
hook5(1).x = hook5(1).x - 2
End If
End If
If randf5 = 4 And hook5(1).move_up = 1 And hook5(1).y > 50 Then
fish5(5).y = hook5(1).y + Rnd * 4
fish5(5).x = hook5(1).x + Rnd * 4
hook5(1).move_up = 1
End If
If hook5(1).x <= 950 And randf5 = 4 And hook5(1).move_up = 1 Then
hook5(1).x = hook5(1).x + 2
fish5(5).x = fish5(5).x - 7.3
fish5(5).move_up = 0
fish5(5).y = fish5(5).y + 7.3
Else
If hook5(1).x > 950 And randf5 = 4 And hook5(1).move_up = 1 Then
hook(1).x = hook5(1).x - 2
fish5(5).x = fish5(5).x + 7.3
fish5(5).move_up = 0
fish5(5).y = fish5(5).y + 7.3
End If
End If
'===============
Dim i As Integer
For i = 1 To 10
Select Case fish(i).x
Case Is < hook3(1).x
fish(i).x = fish(i).x + 3.8
End Select
Select Case fish(i).y
Case Is > hook3(1).y
fish(i).y = fish(i).y - .5
End Select
Next i
For i = 12 To 25
Select Case fish(i).x
Case Is < hook(1).x
fish(i).x = fish(i).x + 1.8
End Select
Select Case fish(i).y
Case Is > hook(1).y
fish(i).y = fish(i).y - .5
End Select
Next i
For i = 1 To 12
Select Case fishb(i).x
Case Is < hook2(1).x
fishb(i).x = fishb(i).x - 3.8
End Select
Select Case fishb(i).y
Case Is > hook2(1).y
fishb(i).y = fishb(i).y - 1
Case Is < hook2(1).y
fishb(i).y = fishb(i).y + 1
End Select
Next i
For i = 5 To 15
Select Case fish3(i).x
Case Is < hook(1).x
fish3(i).x = fish3(i).x - 3.8
End Select
Select Case fish3(i).y
Case Is > hook(1).y
fish3(i).y = fish3(i).y - 1
Case Is < hook(1).y
fish3(i).y = fish3(i).y + 1
End Select
Next i
For i = 1 To 4
Select Case fish3(i).x
Case Is > hook(1).x
fish3(i).x = fish3(i).x + 5.8
End Select
Select Case fish3(i).y
Case Is > hook(1).y
fish3(i).y = fish3(i).y - 2
Case Is < hook(1).y
fish3(i).y = fish3(i).y + 1
End Select
Next i
'======================================================'
If fish2(1).x < hook(1).x Then
hook(1).x = hook(1).x - .65
hook(1).move_right = 0
ElseIf fish2(1).x > hook(1).x Then
hook(1).x = hook(1).x + .65
hook(1).move_right = 1
End If
If fish2(1).y < hook(1).y And hook(1).y > 360 Then
hook(1).y = hook(1).y - .65
ElseIf fish2(1).y > hook(1).y Then
hook(1).y = hook(1).y + .55
End If
'====fish3(i)&hook2(1)===
For l = 1 To 3
Select Case fish3(l).x
Case Is < hook2(1).x
fish3(l).x = fish3(l).x + 2
End Select
Select Case fish3(l).y
Case Is > hook2(1).y
fish3(l).y = fish3(l).y - 2
Case Is < hook2(1).y
fish3(l).y = fish3(l).y + 2
End Select
Next l
'====fish3(i)&hook3(1)===
For l = 7 To 10
Select Case fish3(l).x
Case Is < hook3(1).x And hook3(1).y > 0
fish3(l).x = fish3(l).x + 2
End Select
Select Case fish3(l).y
Case Is > hook3(1).y And hook3(1).y > 0
fish3(l).y = fish3(l).y - 2
Case Is < hook3(1).y And hook3(1).y > 0
fish3(l).y = fish3(l).y + 2
End Select
Next l
Dim fb As Integer
For fb = 1 To 6
Select Case hook(1).y
Case Is < fishb(fb).y And hook(1).x < fishb(fb).x
fishb(fb).y = fishb(fb).y - .5
Case Is > fishb(fb).y And hook(1).x < fishb(fb).x
fishb(fb).y = fishb(fb).y + 3
End Select
Select Case hook(1).x And hook(1).x < fishb(fb).x
Case Is < fishb(fb).x
fishb(fb).x = fishb(fb).x - 3
End Select
Next fb
Dim bf As Integer
For bf = 7 To 12
Select Case hook(1).y
Case Is < fishb(bf).y And hook(1).x < fishb(bf).x
fishb(bf).y = fishb(bf).y - .5
Case Is > fishb(bf).y And hook(1).x < fishb(bf).x
fishb(bf).y = fishb(bf).y + 2.5
End Select
Select Case hook(1).x And hook(1).x < fishb(bf).x
Case Is < fishb(bf).x
fishb(bf).x = fishb(bf).x - 2.8
End Select
Next bf
Dim z As Integer
For z = 13 To 20
Select Case hook(1).y
Case Is < fishb(z).y And hook(1).x < fishb(z).x
fishb(z).y = fishb(z).y - .5
Case Is > fishb(z).y And hook(1).x < fishb(z).x
fishb(z).y = fishb(z).y + 1.5
End Select
Select Case hook(1).x And hook(1).x < fishb(z).x
Case Is < fishb(z).x
fishb(z).x = fishb(z).x - 1.8
End Select
If fishb(z).y <= 0 Then
fishb(z).move_up = 0
End If
Next z
Dim z2%
For z2% = 1 To 5
If fish3(z2%).x > hook3(1).x And fish3(z2%).y + 2 >= hook3(1).y Then
fish5(z2%).x = fish5(z2%).x - 2.8
Else
If fish3(z2%).x < hook3(1).x And fish3(z2%).y + 2 >= hook3(1).y Then
fish3(z2%).x = fish3(z2%).x + 2.8
End If
End If
Next z2%
Select Case hook2(1).x
Case Is > fish(34).x
fish(34).x = fish(34).x + ((Rnd * 20) + 10)
fish(34).move_up = 3
Case Is < fish(34).x And hook2(1).y > 1
fish(34).x = fish(34).x + ((Rnd * 10) + 5)
End Select
Select Case hook2(1).x
Case Is > fish(32).x And hook2(1).y > 1
fish(32).x = fish(32).x + ((Rnd * 10) + 5)
Case Is < fish(32).x
fish(32).x = fish(32).x + ((Rnd * 20) + 10)
fish(32).move_up = 3
End Select
Dim zx As Integer
Randomize Timer
For zx = 1 To 7
Select Case fish(34).x
Case Is > fishb(zx).x
fishb(zx).x = fishb(zx).x - (Rnd * 5.3) + 1
fishb(zx).move_up = 3
Case Else
fishb(zx).x = fishb(zx).x - (Rnd * 4.4) + 1
fishb(zx).move_up = 3
End Select
Next zx
Select Case fish3(8).x
Case Is > fish(14).x
fish(14).x = fish(14).x + (Rnd * 6) + 1
Case Else
fish(14).x = fish(14).x + (Rnd * 6) + 1
End Select
Dim xz As Integer
For xz = 5 To 10
Select Case fish3(8).x
Case Is < fish2(xz).x
fish2(xz).x = fish2(xz).x - (Rnd * 5) + 2
Case Else
fish2(xz).x = fish2(xz).x + (Rnd * 4) + 2
End Select
Next xz
Dim zf As Integer
For zf = 1 To num_fish2
If fish2(zf).y <= y% + 100 And fish2(zf).y >= y% - 100 And x% > fish2(zf).x Then
fish2(zf).x = fish2(zf).x - ((Rnd * 9.4) + 4)
End If
If fish2(zf).y <= y% + 100 And fish2(zf).y >= y% - 100 And x% < fish2(zf).x Then
fish2(zf).x = fish2(zf).x + ((Rnd * 9.4) + 4)
End If
Next zf
Dim z3 As Integer
For z3 = 1 To num_fish3
If fish3(z3).y <= y% + 100 And fish3(z3).y >= y% - 100 And x% > fish3(z3).x Then
fish3(z3).x = fish3(z3).x - ((Rnd * 9.4) + 4)
End If
If fish3(z3).y <= y% + 100 And fish3(z3).y >= y% - 100 And x% < fish3(z3).x Then
fish3(z3).x = fish3(z3).x + ((Rnd * 9.4) + 4)
End If
Next z3
For z3 = 1 To num_fish
If fish(z3).y <= y% + 50 And fish(z3).y >= y% - 50 And x% > fish(z3).x Then
fish(z3).x = fish(z3).x + ((Rnd * 17.8) + 5)
End If
If fish(z3).y <= y% + 50 And fish(z3).y >= y% - 50 And x% < fish(z3).x Then
fish(z3).x = fish(z3).x + ((Rnd * 11.8) + 5)
End If
Next z3
For z3 = 1 To num_fishb
If fishb(z3).y <= y% + 80 And fishb(z3).y >= y% - 80 And x% > fishb(z3).x Then
fishb(z3).x = fishb(z3).x - ((Rnd * 7.8) + 5)
End If
If fishb(z3).y <= y% + 80 And fishb(z3).y >= y% - 80 And x% < fishb(z3).x Then
fishb(z3).x = fishb(z3).x - ((Rnd * 15.8) + 5)
End If
Next z3
For z3 = 1 To num_fishba
If fishba(z3).y <= y% + 100 And fishba(z3).y >= y% - 100 And x% > fishba(z3).x Then
fishba(z3).x = fishba(z3).x - ((Rnd * 8.8) + 5)
End If
If fishba(z3).y <= y% + 100 And fishba(z3).y >= y% - 100 And x% < fishba(z3).x Then
fishba(z3).x = fishba(z3).x - ((Rnd * 16.8) + 5)
End If
Next z3
For z3 = 1 To num_fish6
If fish6(z3).y <= y% + 150 And fish6(z3).y >= y% - 150 And x% > fish6(z3).x Then
fish3(z3).x = fish3(z3).x - ((Rnd * 10.4) + 4)
End If
If fish6(z3).y <= y% + 150 And fish6(z3).y >= y% - 150 And x% < fish6(z3).x Then
fish6(z3).x = fish6(z3).x + ((Rnd * 11.4) + 4)
End If
Next z3
Dim z4 As Integer
For z4 = 1 To num_fish4
If fish4(z4).y <= y% + 100 And fish4(z4).y >= y% - 100 And x% > fish4(z4).x Then
fish4(z4).x = fish4(z4).x - ((Rnd * 9.4) + 4)
End If
If fish4(z4).y <= y% + 100 And fish4(z4).y >= y% - 100 And x% < fish4(z4).x Then
fish4(z4).x = fish4(z4).x + ((Rnd * 9.4) + 4)
End If
Next z4
Dim z5 As Integer
For z5 = 1 To num_fish5
If fish5(z5).y <= y% + 180 And fish5(z5).y >= y% - 180 And x% > fish5(z5).x Then
fish5(z5).x = fish5(z5).x - ((Rnd * 9.4) + 5)
End If
If fish5(z5).y <= y% + 180 And fish5(z5).y >= y% - 180 And x% < fish5(z5).x Then
fish5(z5).x = fish5(z5).x + ((Rnd * 11.4) + 3)
End If
Next z5
End Sub
I'm an electrical power engineer by profession. Frequently I need to calculate the available short circuit current in a circuit (electrical code requirement). I have very fancy analysis programs to calculate fault currents in a large system (say an entire building), but occasionally I need to quickly calculate a short circuit current for a single circuit or a very small network.
There is a well-documented method to calculate a short circuit current from point A to point B. Doing the calculation by hand is a PITA. So I put together a utility to do the calculation with a form-style data entry to avoid having to refer to all those tables.
The method's conductor constants as published only work on 60 Hz power systems. The conductor constants are invalid on 50 Hz power systems because the overall impedances are different. I haven't located an equivalent set of tables for 50 Hz systems, but I would be surprised to find they don't exist somewhere.
I plan to extend this to allow me to retrieve results from other studies and create a network in one overall project.
Real life QB64PE paying me back for all that money I spent on it.