diff --git a/Clocks.bas b/Clocks.bas new file mode 100755 index 0000000..ee872f1 --- /dev/null +++ b/Clocks.bas @@ -0,0 +1,57 @@ +Attribute VB_Name = "Clocks" +Dim TimerString As String + +Public Sub IncreaseClock() + 'Always tick up the milliseconds by five per frame. + LevelMilliseconds = LevelMilliseconds + 5 + + 'When 100 milliseconds pass, a second passes. + If LevelMilliseconds >= 100 Then + LevelMilliseconds = 0 + LevelSeconds = LevelSeconds + 1 + End If + + 'When 60 seconds pass, a minute passes. + If LevelSeconds >= 60 Then + LevelSeconds = 0 + LevelMinutes = LevelMinutes + 1 + End If + + 'Restrict the timer to prevent an error (even though it would take 45 days to reach 65536 minutes). + If LevelMinutes >= 10000 Then + LevelMinutes = 10000 + LevelSeconds = 0 + LevelMilliseconds = 0 + End If + + 'Construct a string containing the current timer. + 'If any of the unit values are below 10, then add a leading zero to keep them 2 characters long. + TimerString = "Timer: " + If LevelMinutes < 10 Then + TimerString = TimerString & "0" & LevelMinutes & ":" + Else + TimerString = TimerString & LevelMinutes & ":" + End If + + If LevelSeconds < 10 Then + TimerString = TimerString & "0" & LevelSeconds & ":" + Else + TimerString = TimerString & LevelSeconds & ":" + End If + + If LevelMilliseconds < 10 Then + TimerString = TimerString & "0" & LevelMilliseconds + Else + TimerString = TimerString & LevelMilliseconds + End If + + 'Send the constructed string to the timer label. + frmGravity.lblTimer.Caption = TimerString + +End Sub + +Public Sub ResetClock() + LevelMinutes = 0 + LevelSeconds = 0 + LevelMilliseconds = 0 +End Sub diff --git a/Design/Game Specification.doc b/Design/Game Specification.doc new file mode 100755 index 0000000..af745d9 Binary files /dev/null and b/Design/Game Specification.doc differ diff --git a/Design/GameDescription.docx b/Design/GameDescription.docx new file mode 100755 index 0000000..dbf979f Binary files /dev/null and b/Design/GameDescription.docx differ diff --git a/Design/GameDesign.xlsx b/Design/GameDesign.xlsx new file mode 100755 index 0000000..24e700b Binary files /dev/null and b/Design/GameDesign.xlsx differ diff --git a/Design/Pseudocode/Form_frmGravity/Sub_Form_KeyDown.txt b/Design/Pseudocode/Form_frmGravity/Sub_Form_KeyDown.txt new file mode 100755 index 0000000..2333d16 --- /dev/null +++ b/Design/Pseudocode/Form_frmGravity/Sub_Form_KeyDown.txt @@ -0,0 +1 @@ +Set KeyIsDown(KeyCode) to True \ No newline at end of file diff --git a/Design/Pseudocode/Form_frmGravity/Sub_Form_KeyUp.txt b/Design/Pseudocode/Form_frmGravity/Sub_Form_KeyUp.txt new file mode 100755 index 0000000..523abd1 --- /dev/null +++ b/Design/Pseudocode/Form_frmGravity/Sub_Form_KeyUp.txt @@ -0,0 +1 @@ +Set KeyIsDown(KeyCode) to False \ No newline at end of file diff --git a/Design/Pseudocode/Form_frmGravity/Sub_Form_Load.txt b/Design/Pseudocode/Form_frmGravity/Sub_Form_Load.txt new file mode 100755 index 0000000..d6bff35 --- /dev/null +++ b/Design/Pseudocode/Form_frmGravity/Sub_Form_Load.txt @@ -0,0 +1,38 @@ +For GravDir is between 0 and 3 + Set PlayerIdle(GravDir) to "Sprites/Character_Idle_" & GravDir & ".gif" + + For PlayerWalkFrame is between 0 and 5 + Set PlayerWalk(GravDir, PlayerWalkFrame) to "Sprites/Character_Walk_" & GravDir & "_" & PlayerWalkFrame & ".gif" + Next + + For PlayerOtherFrame is between 0 and 1 + Set PlayerShock(GravDir, PlayerWalkFrame) to "Sprites/Character_Shock_" & GravDir & "_" & PlayerOtherFrame & ".gif" + Set PlayerDazed(GravDir, PlayerWalkFrame) to "Sprites/Character_Dazed_" & GravDir & "_" & PlayerOtherFrame & ".gif" + Next + + For RobotFrame is between 0 and 3 + For Robot is between 0 and 1 + Set RobotWalk(Robot, GravDir, RobotFrame) to "Sprites/Character_Shock_" & GravDir & "_" & PlayerOtherFrame & ".gif" + Next + Next +Next + +For Tile is between 0 and 15 + Set TileTable(Tile) to "Tiles/Tile_" & Tile & ".gif" +Next + +Set ShockTile to "Tiles/Tile_Shock.gif" +Set StartTile to "Tiles/Tile_Start.gif" +Set FinishTile to "Tiles/Tile_Finish.gif" + +Set Level to 0 + +Call the procedure LoadLevel with the parameter "Title" + +Set cmdState to visible +Set cmdHelp to visible +Set cmdTopScores to visible +Set txtPlayerNane to visible +Set tmrTimer to disabled + +Set the interval of tmrTimer to the result of 1000 / 20 \ No newline at end of file diff --git a/Design/Pseudocode/Form_frmGravity/Sub_cmdHelp_Click.txt b/Design/Pseudocode/Form_frmGravity/Sub_cmdHelp_Click.txt new file mode 100755 index 0000000..ab1a2d5 --- /dev/null +++ b/Design/Pseudocode/Form_frmGravity/Sub_cmdHelp_Click.txt @@ -0,0 +1,17 @@ +If picHelp is not visible then + Set picScores to not visible + Set picHelp to visible + + Clear picHelp + + Open "Help.txt" for reading, as file 1 + + While not at the end of file + Read a line from file 1 and pass it to HelpLine + print HelpLine to picHelp + Loop + + Close file 1 +Else + Set picHelp to not visible +End If \ No newline at end of file diff --git a/Design/Pseudocode/Form_frmGravity/Sub_cmdStart_Click.txt b/Design/Pseudocode/Form_frmGravity/Sub_cmdStart_Click.txt new file mode 100755 index 0000000..a91dddc --- /dev/null +++ b/Design/Pseudocode/Form_frmGravity/Sub_cmdStart_Click.txt @@ -0,0 +1,18 @@ +Set PlayerName to the uppercase equivalent of the contents of txtPlayerName + +If PlayerName is not blank then + Set tmrTimer to enabled + + Set picHelp to not visible + Set picScores to not visible + Set cmdHelp to not visible + Set cmdTopScores to not visible + Set txtPlayerName to not visible + Set cmdStart to not visible + + Call the procedure ResetClock + Call the procedure LoadLevel with the parameter "Lab" + + Set PlayerRetries to 3 + Set the caption of lblRetries to "Retries: " & PlayerRetries +End if \ No newline at end of file diff --git a/Design/Pseudocode/Form_frmGravity/Sub_cmdTopScores_Click.txt b/Design/Pseudocode/Form_frmGravity/Sub_cmdTopScores_Click.txt new file mode 100755 index 0000000..6429550 --- /dev/null +++ b/Design/Pseudocode/Form_frmGravity/Sub_cmdTopScores_Click.txt @@ -0,0 +1,39 @@ +If picScores is not visible then + Set picHelp to not visible + Set picScores to visible + Clear picScores + + Print "===THE FASTEST TIMES===" to picScores + Print "" to picScores + + Open "Scores.txt" for reading, as file 1 + + While not at the end of file + Read a line from file 1 and pass it to TopName, TopMinute, TopSecond, TopMillisecond + + Set TopTime to a blank string + If TopMinute is less than 10 then + Set TopTime to TopTime & "0" & TopMinute & ":" + Else + Set TopTime to TopTime & TopMinute & ":" + End If + + If TopSecond is less than 10 then + Set TopTime to TopTime & "0" & TopSecond & ":" + Else + Set TopTime to TopTime & TopMinute & ":" + End If + + If TopMillisecond is less than 10 then + Set TopTime to TopTime & "0" & TopMillisecond + Else + Set TopTime to TopTime & TopMillisecond + End If + + Print TopName, TopTime to picScores + Loop + + Close file 1 +Else + set picScores to not visible +End If \ No newline at end of file diff --git a/Design/Pseudocode/Form_frmGravity/Sub_tmrTimer_Timer.txt b/Design/Pseudocode/Form_frmGravity/Sub_tmrTimer_Timer.txt new file mode 100755 index 0000000..f415a51 --- /dev/null +++ b/Design/Pseudocode/Form_frmGravity/Sub_tmrTimer_Timer.txt @@ -0,0 +1,72 @@ +If PlayerState is equal to 0 then + Call the procedure MovePlayer + + Increase TickCount by 1 + Set PlayerFallSpeed to the result of calling the function IncreaseVelocity with the parameters 0, 10, TickCount, 0.4 + + If PlayerFallSpeed is greater than 30 then + Set PlayerFallSpeed to 30 + Decrease TickCount by 1 + End If + + Call the procedure DropPlayer + Call the procedure MoveBot + + Call the procedure CheckRobotContact + + Set imgPlayer.Left to the result of PlayerPos(0) - imgPlayer.Width / 2 + Set imgPlayer.Top to the result of PlayerPos(1) - imgPlayer.Height / 2 + + For a is between 0 and 1 + set imgRobot(a).Left to the result of RobotPos(a, 0) - imgRobot.Width / 2 + set imgRobot(a).Top to the result of RobotPos(a, 1) - imgRobot.Height / 2 + Next + + Call the procedure IncreaseClock +ElseIf PlayerState is equal to 1 then + + Increase ReportTimer by 1 + Set the caption of lblLevelName to "Level Complete!" + + If ReportTimer is greater than or equal to 90 then + Increase Level by 1 + + If Level is greater than or equal to 100 then + Call the procedure Form_Load + ElseIf Level is greater than or equal to 4 then + Set Level to 101 + Call the procedure LoadLevel with the parameter "Win" + Call the procedure PlayerStates.WinLevel + Call the procedure WriteScore + Else + Call the procedure LoadLevel with the parameter "Lab" + End If + End If + +ElseIf PlayerState is greater than or equal to 2 then + + Increase ReportTimer by 1 + + Increase PlayerAnim by 1 + If PlayerAnim is greater than 1 then + Set PlayerAnim to 0 + End If + + If PlayerState is equal to 2 then + Set the caption of lblLevelName to "Oof!" + Load the file in PlayerDazed(PlayerGravityDir, PlayerAnim) into imgPlayer.Picture + Else + Set the caption of lblLevelName to "Don't take me, Robro!" + Load the file in PlayerShock(PlayerGravityDir, PlayerAnim) into imgPlayer.Picture + End If + + If ReportTimer is greater than or equal to 90 then + If PlayerRetries is greater than 0 then + Decrease PlayerRetries by 1 + Set the caption of lvlRetries to "Retries: " & PlayerRetries + Call the procedure LoadLevel with the parameter "Lab" + Else + Call the procedure Form_Load + End If + End If +End If \ No newline at end of file diff --git a/Design/Pseudocode/Module_Clocks/Sub_IncreaseClock.txt b/Design/Pseudocode/Module_Clocks/Sub_IncreaseClock.txt new file mode 100755 index 0000000..2000b21 --- /dev/null +++ b/Design/Pseudocode/Module_Clocks/Sub_IncreaseClock.txt @@ -0,0 +1,38 @@ +Increase LevelMilliseconds by 5 + +If LevelMilliseconds is greater than or equal to 100 then + Set LevelMilliseconds to 0 + Increase LevelSeconds by 1 +End If + +If LevelSeconds is greater than or equal to 60 then + Set LevelSeconds to 0 + Increase LevelMinutes by 1 +End If + +If LevelMinutes is greater than or equal to 10000 then + Set LevelMinutes to 10000 + Set LevelSeconds to 0 + Set LevelMilliseconds to 0 +End If + +Set TimerString to "Timer: " +If LevelMinutes is less than 10 then + Set TimerString to TimerString & "0" & LevelMinutes & ":" +Else + Set TimerString to TimerString & LevelMinutes & ":" +End If + +If LevelSeconds is less than 10 then + Set TimerString to TimerString & "0" & LevelSeconds & ":" +Else + Set TimerString to TimerString & LevelSeconds & ":" +End If + +If LevelMilliseconds is less than 10 then + Set TimerString to TimerString & "0" & LevelMilliseconds +Else + Set TimerString to TimerString & LevelMilliseconds +End If + +Set the caption of frmGravity.lblTimer to TimerString diff --git a/Design/Pseudocode/Module_Clocks/Sub_ResetClock.txt b/Design/Pseudocode/Module_Clocks/Sub_ResetClock.txt new file mode 100755 index 0000000..06d0e10 --- /dev/null +++ b/Design/Pseudocode/Module_Clocks/Sub_ResetClock.txt @@ -0,0 +1,4 @@ +Sub ResetClock: +Set LevelMinutes to 0 +Set LevelSeconds to 0 +Set LevelMilliseconds to 0 diff --git a/Design/Pseudocode/Module_HighScores/Sub_MoveName.txt b/Design/Pseudocode/Module_HighScores/Sub_MoveName.txt new file mode 100755 index 0000000..48dacc8 --- /dev/null +++ b/Design/Pseudocode/Module_HighScores/Sub_MoveName.txt @@ -0,0 +1,14 @@ +Set TempName to TopName(ScoreLine - 1) +Set TempMinute to TopMinute(ScoreLine - 1) +Set TempSecond to TopSecond(ScoreLine - 1) +Set TempMillisecond to TopMillisecond(ScoreLine - 1) + +Set TopName(ScoreLine - 1) to TopName(ScoreLine) +Set TopMinutes(ScoreLine - 1) to TopMinute(ScoreLine) +Set TopSecond(ScoreLine - 1) to TopSecond(ScoreLine) +Set TopMillisecond(ScoreLine - 1) to TopMillisecond(ScoreLine) + +Set TopName(ScoreLine) to TempName +Set TopMinute(ScoreLine) to TempMinute +Set TopSecond(ScoreLine) to TempSecond +Set TopMillisecond(ScoreLine) to TempMillisecond diff --git a/Design/Pseudocode/Module_HighScores/Sub_WriteScore.txt b/Design/Pseudocode/Module_HighScores/Sub_WriteScore.txt new file mode 100755 index 0000000..f9f6bf4 --- /dev/null +++ b/Design/Pseudocode/Module_HighScores/Sub_WriteScore.txt @@ -0,0 +1,30 @@ +Open "Scores.txt" for reading, as file 1 +Set LineCounter to 0 + +While not at end of file + Read a line from file 1 and pass its values to TopName(LineCounter), TopMinute(LineCounter), TopSecond(LineCounter), TopMillisecond(LineCounter) + Increase LineCounter by 1 +Loop + +Close file 1 + +Set TopName(5) to PlayerName +Set TopMinute(5) to LevelMinutes +Set TopSecond(5) to LevelSeconds +Set TopMillisecond(5) to LevelMilliseconds + +For LineCounter is between 5 to 1, stepping back 1 + Set TotalMilliseconds(0) to the result of ((((TopMinute(LineCounter - 1) / 100000000) * 60 + (TopSecond(LineCounter - 1) / 100000000)) * 100) + (TopMillisecond(LineCounter - 1)) / 100000000) + Set TotalMilliseconds(1) to the result of (((TopMinute(LineCounter) / 100000000) * 60 + (TopSecond(LineCounter) / 100000000)) * 100) + (TopMillisecond(LineCounter)) / 100000000) + + If TotalMilliseconds(1) is less than TotalMilliseconds(0) then + Call the procedure MoveName with the parameter LineCounter + End If +Next + +Open "Scores.txt" for writing, as file 2 +For LineCounter is between 0 to 4 + Write TopName(LineCounter), TopMinute(LineCounter), TopSecond(LineCounter), TopMillisecond(LineCounter) to file 2 +Next + +Close file 2 \ No newline at end of file diff --git a/Design/Pseudocode/Module_Levels/LoadLevel.txt b/Design/Pseudocode/Module_Levels/LoadLevel.txt new file mode 100755 index 0000000..fa3edf0 --- /dev/null +++ b/Design/Pseudocode/Module_Levels/LoadLevel.txt @@ -0,0 +1,100 @@ +Open "Maps/" & Pack & "_" & Level & ".lvl" for reading, as file 1 + +Read a line from file 1 and pass its value to LevelName +Read a line from file 1 and pass its values to PlayerPos(0), PlayerPos(1), PlayerGravityDir +Read a line from file 1 and pass its values to RobotPos(0, 0), RobotPos(0, 1), RobotDir(0), RobotFacing(0) +Read a line from file 1 and pass its values to RobotPos(1, 0), RobotPos(1, 1), RobotDir(1), RobotFacing(1) + +For y is between 0 to 17 + For x is between 0 to 24 + Read a line from file 1 and pass its value to Map(x, y) + Next +Next + +Close file 1 + +Set the caption of frmGravity.lblLevelName to LevelName + +Set PlayerPos(0) to the result of PlayerPos(0) * 32 + 16 +Set PlayerPos(1) to the result of PlayerPos(1) * 32 + 16 + +Set PlayerFallOrigin(0) to PlayerPos(0) +Set PlayerFallOrigin(1) to PlayerPos(1) + +Set frmGravity.imgPlayer.Left to the result of PlayerPos(0) - frmGravity.imgPlayer.Width / 2 +Set frmGravity.imgPlayer.Top to the result of PlayerPos(1) - frmGravity.imgPlayer.Height / 2 + +For a is between 0 and 1 + Set RobotPos(a, 0) to the result of RobotPos(a, 0) * 32 + 16 + Set RobotPos(a, 1) to the result of RobotPos(a, 1) * 32 + 16 + + Set frmGravity.imgRobot(a).Left to the result of RobotPos(a, 0) - frmGravity.imgRobot(a).Width / 2 + Set frmGravity.imgRobot(a).Top to the result of RobotPos(a, 1) - frmGravity.imgRobot(a).Height / 2 + + If RobotFacing(a) is equal to 0 then + Set RobotAnim(a) to 0 + Else + Set RobotAnim to 3 + End If + + Load RobotWalk(a, RobotDir(a), RobotAnim(a)) into the picture of frmGravity.imgRobot(a) + Set RobotAnimLoaded to True +Next + +For y is between 0 and 17 + For x is between 0 to 24 + If Map(x, y) is equal to 1 then + + Set Border to 0 + + If y - 1 is greater than or equal to 0 then + If Map(x, y - 1) is not equal to 1 then + Increase Border by 1 + End If + End If + + If x + 1 is less than or equal to 24 then + If Map(x + 1, y) is not equal to 1 then + Increase Border by 2 + End If + End If + + If y + 1 is less than or equal to 17 then + If Map(x, y + 1) is not equal to 1 then + Increase Border by 4 + End If + End If + + If x - 1 is greater than or equal to 0 then + If Map(x - 1, y) is not equal to 1 then + Increase Border by 8 + End If + End If + + Load TileTable(Border) into the picture of frmGravity.imgRegion(x + (25 * y)) + + ElseIf Map(x, y) is equal to 2 then + Load ShockTile into the picture of frmGravity.imgRegion(x + (25 * y)) + + ElseIf Map(x, y) is equal to 3 then + Load StartTile into the picture of frmGravity.imgRegion(x + (25 * y)) + + ElseIf Map(x, y) is equal to 4 then + Load FinishTile into the picture of frmGravity.imgRegion(x + (25 * y)) + + Else + Clear the picture of frmGravity.imgRegion(x + (25 * y)) + + End If + + Set frmGravity.imgRegion(x + (25 * y)).Left to the result of 32 * x + Set frmGravity.imgRegion(x + (25 * y)).Top to the result of 32 * y + Next +Next + +Load PlayerIdle(PlayerGravityDir)) into the picture of frmGravity.imgPlayer + +Call the procedure PlayerStates.ResetPlayerState +Set PlayerAnim to 3 +Set PlayerAnimSequence to 1 +Set ReportTimer to 0 \ No newline at end of file diff --git a/Design/Pseudocode/Module_PlayerMovement/Function_IncreaseVelocity.txt b/Design/Pseudocode/Module_PlayerMovement/Function_IncreaseVelocity.txt new file mode 100755 index 0000000..bbb9212 --- /dev/null +++ b/Design/Pseudocode/Module_PlayerMovement/Function_IncreaseVelocity.txt @@ -0,0 +1 @@ +Set IncreaseVelocity to the result of (u * t + 0.5 * g * t * t) * DimensionScaler \ No newline at end of file diff --git a/Design/Pseudocode/Module_PlayerMovement/Sub_DropPlayer.txt b/Design/Pseudocode/Module_PlayerMovement/Sub_DropPlayer.txt new file mode 100755 index 0000000..d9e236c --- /dev/null +++ b/Design/Pseudocode/Module_PlayerMovement/Sub_DropPlayer.txt @@ -0,0 +1,135 @@ +If PlayerGravityDir is equal to 0 then + Set FutureRegion(0, 0) to the integer result of (PlayerPos(0) - 8) / 32 + Set FutureRegion(0, 1) to the integer result of (PlayerPos(0) + 7) / 32 + Set FutureRegion(1, 0) to the integer result of (PlayerPos(1) - PlayerFallSpeed - 17) / 32 + + If FutureRegion(1, 0) is greater than or equal to 0 then + If Map(FutureRegion(0, 0), FutureRegion(1, 0)) is greater than or equal to 1 + or Map(FutureRegion(0, 1), FutureRegion(1, 0)) is greater than or equal to 1 then + Set PlayerPos(1) to the result of (FutureRegion(1, 0) + 1) * 32 + 16 + Set TickCount to 0 + + If the absolute result of PlayerPos(1) - PlayerFallOrigin(1) is greater than 80 then + Call the procedure PlayerStates.DazePlayer + End If + + If Map(FutureRegion(0, 0), FutureRegion(1, 0)) is equal to 2 + or Map(FutureRegion(0, 1), FutureRegion(1, 0)) is equal to 2 Then + Call the procedure PlayerStates.ShockPlayer + End If + + If Map(FutureRegion(0, 0), FutureRegion(1, 0)) is equal to 4 + or Map(FutureRegion(0, 1), FutureRegion(1, 0)) is equal to 4 Then + Call the procedure PlayerStates.WinLevel + End If + + Set PlayerFallSpeed to 0 + Set PlayerFallOrigin(0) to PlayerPos(0) + Set PlayerFallOrigin(1) to PlayerPos(1) + Else + Set PlayerPos(1) to the integer result of PlayerPos(1) - PlayerFallSpeed + End If + End If +End If + +If PlayerGravityDir is equal to 1 then + Set FutureRegion(0, 0) to the integer result of (PlayerPos(0) + PlayerFallSpeed + 16) / 32 + Set FutureRegion(1, 0) to the integer result of (PlayerPos(1) - 8) / 32 + Set FutureRegion(1, 1) to the integer result of (PlayerPos(1) + 7) / 32 + + If FutureRegion(0, 0) is less than or equal to 24 then + If Map(FutureRegion(0, 0), FutureRegion(1, 0)) is greater than or equal to 1 + or Map(FutureRegion(0, 0), FutureRegion(1, 1)) is greater than or equal to 1 then + Set PlayerPos(0) to the result of FutureRegion(0, 0) * 32 - 16 + Set TickCount to 0 + + If the absolute result of PlayerPos(0) - PlayerFallOrigin(0) is greater than 80 then + Call the procedure PlayerStates.DazePlayer + End If + + If Map(FutureRegion(0, 0), FutureRegion(1, 0)) is equal to 2 + or Map(FutureRegion(0, 0), FutureRegion(1, 1)) is equal to 2 Then + Call the procedure PlayerStates.ShockPlayer + End If + + If Map(FutureRegion(0, 0), FutureRegion(1, 0)) is equal to 4 + or Map(FutureRegion(0, 0), FutureRegion(1, 1)) is equal to 4 Then + Call the procedure PlayerStates.WinLevel + End If + + Set PlayerFallSpeed to 0 + Set PlayerFallOrigin(0) to PlayerPos(0) + Set PlayerFallOrigin(1) to PlayerPos(1) + Else + Set PlayerPos(0) to the integer result of PlayerPos(0) - PlayerFallSpeed + End If + End If +End If + +If PlayerGravityDir is equal to 2 then + Set FutureRegion(0, 0) to the integer result of (PlayerPos(0) - 8) / 32 + Set FutureRegion(0, 1) to the integer result of (PlayerPos(0) + 7) / 32 + Set FutureRegion(1, 0) to the integer result of (PlayerPos(1) + PlayerFallSpeed + 16) / 32 + + If FutureRegion(1, 0) is less than or equal to 18 then + If Map(FutureRegion(0, 0), FutureRegion(1, 0)) is greater than or equal to 1 + or Map(FutureRegion(0, 1), FutureRegion(1, 0)) is greater than or equal to 1 then + Set PlayerPos(1) to the result of FutureRegion(1, 0) * 32 - 16 + Set TickCount to 0 + + If the absolute result of PlayerPos(1) - PlayerFallOrigin(1) is greater than 80 then + Call the procedure PlayerStates.DazePlayer + End If + + If Map(FutureRegion(0, 0), FutureRegion(1, 0)) is equal to 2 + or Map(FutureRegion(0, 1), FutureRegion(1, 0)) is equal to 2 Then + Call the procedure PlayerStates.ShockPlayer + End If + + If Map(FutureRegion(0, 0), FutureRegion(1, 0)) is equal to 4 + or Map(FutureRegion(0, 1), FutureRegion(1, 0)) is equal to 4 Then + Call the procedure PlayerStates.WinLevel + End If + + Set PlayerFallSpeed to 0 + Set PlayerFallOrigin(0) to PlayerPos(0) + Set PlayerFallOrigin(1) to PlayerPos(1) + Else + Set PlayerPos(1) to the integer result of PlayerPos(1) + PlayerFallSpeed + End If + End If +End If + +If PlayerGravityDir is equal to 3 then + Set FutureRegion(0, 0) to the integer result of (PlayerPos(0) - PlayerFallSpeed - 17) / 32 + Set FutureRegion(1, 0) to the integer result of (PlayerPos(1) - 8) / 32 + Set FutureRegion(1, 1) to the integer result of (PlayerPos(1) + 7) / 32 + + If FutureRegion(0, 0) is greater than or equal to 0 then + If Map(FutureRegion(0, 0), FutureRegion(1, 0)) is greater than or equal to 1 + or Map(FutureRegion(0, 0), FutureRegion(1, 1)) is greater than or equal to 1 then + Set PlayerPos(0) to the result of (FutureRegion(0, 0) + 1) * 32 + 16 + Set TickCount to 0 + + If the absolute result of PlayerPos(0) - PlayerFallOrigin(0) is greater than 80 then + Call the procedure PlayerStates.DazePlayer + End If + + If Map(FutureRegion(0, 0), FutureRegion(1, 0)) is equal to 2 + or Map(FutureRegion(0, 0), FutureRegion(1, 1)) is equal to 2 Then + Call the procedure PlayerStates.ShockPlayer + End If + + If Map(FutureRegion(0, 0), FutureRegion(1, 0)) is equal to 4 + or Map(FutureRegion(0, 0), FutureRegion(1, 1)) is equal to 4 Then + Call the procedure PlayerStates.WinLevel + End If + + Set PlayerFallSpeed to 0 + Set PlayerFallOrigin(0) to PlayerPos(0) + Set PlayerFallOrigin(1) to PlayerPos(1) + Else + Set PlayerPos(0) to the integer result of PlayerPos(0) - PlayerFallSpeed + End If + End If +End If \ No newline at end of file diff --git a/Design/Pseudocode/Module_PlayerMovement/Sub_MovePlayer.txt b/Design/Pseudocode/Module_PlayerMovement/Sub_MovePlayer.txt new file mode 100755 index 0000000..10fe203 --- /dev/null +++ b/Design/Pseudocode/Module_PlayerMovement/Sub_MovePlayer.txt @@ -0,0 +1,208 @@ +Load PlayerIdle(PlayerGravityDir) into the picture of frmGravity.imgPlayer + +If PlayerFallSpeed is equal to 0 then + If PlayerGravityDir is equal to 0 or 2 then + If KeyIsDown(vbKeyD) is equal to True then + Set FutureRegion(0) to the integer result of (PlayerPos(0) + 5 + 8) / 32) + Set FutureRegion(1) to the integer result of PlayerPos(1) / 32 + + If Map(FutureRegion(0), FutureRegion(1)) is greater than or equal to 1 then + Set PlayerPos(0) to the result of FutureRegion(0) * 32 - 8 + + If Map(FutureRegion(0), FutureRegion(1)) is equal to 2 then + Call the procedure PlayerStates.ShockPlayer + End If + + If Map(FutureRegion(0), FutureRegion(1)) is equal to 4 then + Call the procedure PlayerStates.WinLevel + End If + + Else + Increase PlayerPos(0) by 5 + End If + + If PlayerAnim is less than 3 then + Set PlayerAnim to 3 + Set PlayerAnimSequence to 1 + Set PlayerAnimLoaded to False + End If + + If PlayerAnimSequence is equal to 0 then + Decrease PlayerAnim by 1 + If PlayerAnim is equal to 3 then + Set PlayerAnimSequence to 0 + End If + Set PlayerAnimLoaded to False + End If + + If PlayerAnimSequence is equal to 1 then + Increase PlayerAnim by 1 + If PlayerAnim is equal to 5 then + Set PlayerAnimSequence to 0 + End If + Set PlayerAnimLoaded to False + End If + End If + + If KeyIsDown(vbKeyA) is equal to True then + Set FutureRegion(0) to the integer result of (PlayerPos(0) - 5 - 8) / 32) + Set FutureRegion(1) to the integer result of PlayerPos(1) / 32 + + If Map(FutureRegion(0), FutureRegion(1)) is greater than or equal to 1 then + Set PlayerPos(0) to the result of FutureRegion(0) * 32 + 8 + + If Map(FutureRegion(0), FutureRegion(1)) is equal to 2 then + Call the procedure PlayerStates.ShockPlayer + End If + + If Map(FutureRegion(0), FutureRegion(1)) is equal to 4 then + Call the procedure PlayerStates.WinLevel + End If + + Else + Decrease PlayerPos(0) by 5 + End If + + If PlayerAnim is greater than 2 then + Set PlayerAnim to 2 + Set PlayerAnimSequence to 1 + Set PlayerAnimLoaded to False + End If + + If PlayerAnimSequence is equal to 0 then + Increase PlayerAnim by 1 + If PlayerAnim is equal to 2 then + Set PlayerAnimSequence to 0 + End If + Set PlayerAnimLoaded to False + End If + + If PlayerAnimSequence is equal to 1 then + Decrease PlayerAnim by 1 + If PlayerAnim is equal to 0 then + Set PlayerAnimSequence to 0 + End If + Set PlayerAnimLoaded to False + End If + End If + End If + + If PlayerGravityDir is equal to 1 or 3 then + If KeyIsDown(vbKeyS) is equal to True then + Set FutureRegion(0) to the integer result of PlayerPos(0) / 32 + Set FutureRegion(1) to the integer result of (PlayerPos(1) + 5 + 8) / 32) + + If Map(FutureRegion(0), FutureRegion(1)) is greater than or equal to 1 then + Set PlayerPos(1) to the result of FutureRegion(1) * 32 - 8 + + If Map(FutureRegion(0), FutureRegion(1)) is equal to 2 then + Call the procedure PlayerStates.ShockPlayer + End If + + If Map(FutureRegion(0), FutureRegion(1)) is equal to 4 then + Call the procedure PlayerStates.WinLevel + End If + + Else + Increase PlayerPos(1) by 5 + End If + + If PlayerAnim is less than 3 then + Set PlayerAnim to 3 + Set PlayerAnimSequence to 1 + Set PlayerAnimLoaded to False + End If + + If PlayerAnimSequence is equal to 0 then + Decrease PlayerAnim by 1 + If PlayerAnim is equal to 3 then + Set PlayerAnimSequence to 0 + End If + Set PlayerAnimLoaded to False + End If + + If PlayerAnimSequence is equal to 1 then + Increase PlayerAnim by 1 + If PlayerAnim is equal to 5 then + Set PlayerAnimSequence to 0 + End If + Set PlayerAnimLoaded to False + End If + End If + + If KeyIsDown(vbKeyW) is equal to True then + Set FutureRegion(0) to the integer result of PlayerPos(0) / 32 + Set FutureRegion(1) to the integer result of (PlayerPos(1) - 5 - 8) / 32) + + If Map(FutureRegion(0), FutureRegion(1)) is greater than or equal to 1 then + Set PlayerPos(1) to the result of FutureRegion(1) * 32 + 8 + + If Map(FutureRegion(0), FutureRegion(1)) is equal to 2 then + Call the procedure PlayerStates.ShockPlayer + End If + + If Map(FutureRegion(0), FutureRegion(1)) is equal to 4 then + Call the procedure PlayerStates.WinLevel + End If + + Else + Decrease PlayerPos(1) by 5 + End If + + If PlayerAnim is greater than 2 then + Set PlayerAnim to 2 + Set PlayerAnimSequence to 1 + Set PlayerAnimLoaded to False + End If + + If PlayerAnimSequence is equal to 0 then + Increase PlayerAnim by 1 + If PlayerAnim is equal to 2 then + Set PlayerAnimSequence to 0 + End If + Set PlayerAnimLoaded to False + End If + + If PlayerAnimSequence is equal to 1 then + Decrease PlayerAnim by 1 + If PlayerAnim is equal to 0 then + Set PlayerAnimSequence to 0 + End If + Set PlayerAnimLoaded to False + End If + End If + End If + + If KeyIsDown(vbKeyUp) is equal to True then + Set PlayerGravityDir to 0 + Set PlayerFallOrigin(0) to PlayerPos(0) + Set PlayerFallOrigin(1) to PlayerPos(1) + Load PlayerIdle(0) into the picture of frmGravity.imgPlayer + End If + + If KeyIsDown(vbKeyRight) is equal to True then + Set PlayerGravityDir to 1 + Set PlayerFallOrigin(0) to PlayerPos(0) + Set PlayerFallOrigin(1) to PlayerPos(1) + Load PlayerIdle(1) into the picture of frmGravity.imgPlayer + End If + + If KeyIsDown(vbKeyDown) is equal to True then + Set PlayerGravityDir to 2 + Set PlayerFallOrigin(0) to PlayerPos(0) + Set PlayerFallOrigin(1) to PlayerPos(1) + Load PlayerIdle(2) into the picture of frmGravity.imgPlayer + End If + + If KeyIsDown(vbKeyLeft) is equal to True then + Set PlayerGravityDir to 3 + Set PlayerFallOrigin(0) to PlayerPos(0) + Set PlayerFallOrigin(1) to PlayerPos(1) + Load PlayerIdle(3) into the picture of frmGravity.imgPlayer + End If +End If + +If PlayerAnimLoaded is equal to False then + Load PlayerWalk(PlayerGravityDir, PlayerAnim) into the picture of frmGravity.imgPlayer + Set PlayerAnimLoaded to True +End If \ No newline at end of file diff --git a/Design/Pseudocode/Module_PlayerState/ResetPlayerState.txt b/Design/Pseudocode/Module_PlayerState/ResetPlayerState.txt new file mode 100755 index 0000000..702bea9 --- /dev/null +++ b/Design/Pseudocode/Module_PlayerState/ResetPlayerState.txt @@ -0,0 +1 @@ +Set PlayerState to 0 \ No newline at end of file diff --git a/Design/Pseudocode/Module_PlayerState/Sub_DazePlayer.txt b/Design/Pseudocode/Module_PlayerState/Sub_DazePlayer.txt new file mode 100755 index 0000000..fbe6331 --- /dev/null +++ b/Design/Pseudocode/Module_PlayerState/Sub_DazePlayer.txt @@ -0,0 +1 @@ +Set PlayerState to 2 \ No newline at end of file diff --git a/Design/Pseudocode/Module_PlayerState/Sub_ShockPlayer.txt b/Design/Pseudocode/Module_PlayerState/Sub_ShockPlayer.txt new file mode 100755 index 0000000..600d297 --- /dev/null +++ b/Design/Pseudocode/Module_PlayerState/Sub_ShockPlayer.txt @@ -0,0 +1 @@ +Set PlayerState to 3 \ No newline at end of file diff --git a/Design/Pseudocode/Module_PlayerState/Sub_WinLevel.txt b/Design/Pseudocode/Module_PlayerState/Sub_WinLevel.txt new file mode 100755 index 0000000..3b31870 --- /dev/null +++ b/Design/Pseudocode/Module_PlayerState/Sub_WinLevel.txt @@ -0,0 +1 @@ +Set PlayerState to 1 \ No newline at end of file diff --git a/Design/Pseudocode/Module_RobotMovement/Sub_CheckRobotContact.txt b/Design/Pseudocode/Module_RobotMovement/Sub_CheckRobotContact.txt new file mode 100755 index 0000000..b2060ea --- /dev/null +++ b/Design/Pseudocode/Module_RobotMovement/Sub_CheckRobotContact.txt @@ -0,0 +1,9 @@ +For a is between 0 to 1 + If the absolute result of PlayerPos(0) - RobotPos(a, 0) is less than or equal to + the result of frmGravity.imgPlayer.Width / 2 + frmGravity.imgRobot(a).Width / 2 then + If the absolute result of PlayerPos(1) - RobotPos(a, 0) is less than or equal to + the result of frmGravity.imgPlayer.Height / 2 + frmGravity.imgRobot(a).Height / 2 then + Call the procedure PlayerStates.ShockPlayer + End If + End If +Next \ No newline at end of file diff --git a/Design/Pseudocode/Module_RobotMovement/Sub_MoveBot.txt b/Design/Pseudocode/Module_RobotMovement/Sub_MoveBot.txt new file mode 100755 index 0000000..20388cd --- /dev/null +++ b/Design/Pseudocode/Module_RobotMovement/Sub_MoveBot.txt @@ -0,0 +1,150 @@ +For a is between 0 and 1 + If RobotDir(a) is equal to 0 then + If RobotFacing(a) is equal to then + If RobotAnim(a) is greater than 0 then + Decrease RobotAnim(a) by 1 + Set RobotAnimLoaded to False + Else + Set FutureRegion(0) to the integer result of (RobotPos(a, 0) + 5 + (8 * (a + 1))) / 32 + Set FutureRegion(1) to the integer result of RobotPos(a, 1) / 32 + + If Map(FutureRegion(0), FutureRegion(1)) is greater than or equal to 1 + or Map(FutureRegion(0), FutureRegion(1) - 1) is not equal to 1 then + Set RobotPos(a, 0) to the result of FutureRegion(0) * 32 - (8 * (a + 1)) + Set RobotFacing(a) to 1 + Else + Increase RobotPos(a, 0) by 2 + End If + End If + Else + If RobotAnim(a) is less than 3 then + Increase RobotAnim(a) by 1 + Set RobotAnimLoaded to False + Else + Set FutureRegion(0) to the integer result of (RobotPos(a, 0) - 5 - (8 * (a + 1))) / 32 + Set FutureRegion(1) to the integer result of RobotPos(a, 1) / 32 + + If Map(FutureRegion(0), FutureRegion(1)) is greater than or equal to 1 + of Map(FutureRegion(0), FutureRegion(1) - 1) is not equal to 1 then + Set RobotPos(a, 0) to the result of (FutureRegion(0) + 1) * 32 + (8 * (a + 1)) + Set RobotFacing(a) to 0 + Else + Decrease RobotPos(a, 0) by 2 + End If + End If + End If + End If + + If RobotDir(a) is equal to 1 then + If RobotFacing(a) is equal to then + If RobotAnim(a) is greater than 0 then + Decrease RobotAnim(a) by 1 + Set RobotAnimLoaded to False + Else + Set FutureRegion(0) to the integer result of RobotPos(a, 0) / 32 + Set FutureRegion(1) to the integer result of (RobotPos(a, 1) + 5 + (8 * (a + 1))) / 32 + + If Map(FutureRegion(0), FutureRegion(1)) is greater than or equal to 1 + or Map(FutureRegion(0) + 1, FutureRegion(1)) is not equal to 1 then + Set RobotPos(a, 1) to the result of FutureRegion(1) * 32 - (8 * (a + 1)) + Set RobotFacing(a) to 1 + Else + Increase RobotPos(a, 1) by 2 + End If + End If + Else + If RobotAnim(a) is less than 3 then + Increase RobotAnim(a) by 1 + Set RobotAnimLoaded to False + Else + Set FutureRegion(0) to the integer result of RobotPos(a, 0) / 32 + Set FutureRegion(1) to the integer result of (RobotPos(a, 1) - 5 - (8 * (a + 1))) / 32 + + If Map(FutureRegion(0), FutureRegion(1)) is greater than or equal to 1 + of Map(FutureRegion(0) + 1, FutureRegion(1)) is not equal to 1 then + Set RobotPos(a, 1) to the result of (FutureRegion(1) + 1) * 32 + (8 * (a + 1)) + Set RobotFacing(a) to 0 + Else + Decrease RobotPos(a, 1) by 2 + End If + End If + End If + End If + + If RobotDir(a) is equal to 2 then + If RobotFacing(a) is equal to then + If RobotAnim(a) is greater than 0 then + Decrease RobotAnim(a) by 1 + Set RobotAnimLoaded to False + Else + Set FutureRegion(0) to the integer result of (RobotPos(a, 0) - 5 - (8 * (a + 1))) / 32 + Set FutureRegion(1) to the integer result of RobotPos(a, 1) / 32 + + If Map(FutureRegion(0), FutureRegion(1)) is greater than or equal to 1 + or Map(FutureRegion(0), FutureRegion(1) + 1) is not equal to 1 then + Set RobotPos(a, 0) to the result of (FutureRegion(0) + 1) * 32 + (8 * (a + 1)) + Set RobotFacing(a) to 1 + Else + Decrease RobotPos(a, 0) by 2 + End If + End If + Else + If RobotAnim(a) is less than 3 then + Increase RobotAnim(a) by 1 + Set RobotAnimLoaded to False + Else + Set FutureRegion(0) to the integer result of (RobotPos(a, 0) + 5 + (8 * (a + 1))) / 32 + Set FutureRegion(1) to the integer result of RobotPos(a, 1) / 32 + + If Map(FutureRegion(0), FutureRegion(1)) is greater than or equal to 1 + of Map(FutureRegion(0), FutureRegion(1) + 1) is not equal to 1 then + Set RobotPos(a, 0) to the result of FutureRegion(0) * 32 - (8 * (a + 1)) + Set RobotFacing(a) to 0 + Else + Increase RobotPos(a, 0) by 2 + End If + End If + End If + End If + + If RobotDir(a) is equal to 3 then + If RobotFacing(a) is equal to then + If RobotAnim(a) is greater than 0 then + Decrease RobotAnim(a) by 1 + Set RobotAnimLoaded to False + Else + Set FutureRegion(0) to the integer result of RobotPos(a, 0) / 32 + Set FutureRegion(1) to the integer result of (RobotPos(a, 1) - 5 - (8 * (a + 1))) / 32 + + If Map(FutureRegion(0), FutureRegion(1)) is greater than or equal to 1 + or Map(FutureRegion(0) - 1, FutureRegion(1)) is not equal to 1 then + Set RobotPos(a, 1) to the result of (FutureRegion(1) + 1) * 32 + (8 * (a + 1)) + Set RobotFacing(a) to 1 + Else + Decrease RobotPos(a, 1) by 2 + End If + End If + Else + If RobotAnim(a) is less than 3 then + Increase RobotAnim(a) by 1 + Set RobotAnimLoaded to False + Else + Set FutureRegion(0) to the integer result of RobotPos(a, 0) / 32 + Set FutureRegion(1) to the integer result of (RobotPos(a, 1) + 5 + (8 * (a + 1))) / 32 + + If Map(FutureRegion(0), FutureRegion(1)) is greater than or equal to 1 + of Map(FutureRegion(0) - 1, FutureRegion(1)) is not equal to 1 then + Set RobotPos(a, 1) to the result of FutureRegion(1) * 32 - (8 * (a + 1)) + Set RobotFacing(a) to 0 + Else + Increase RobotPos(a, 1) by 2 + End If + End If + End If + End If + + If RobotAnimLoaded is equal to False then + Load RobotWalk(a, RobotDir(a), RobotAnim(a)) + Set RobotAnimLoaded to True + End If +Next \ No newline at end of file diff --git a/Design/SpriteOutline.jpg b/Design/SpriteOutline.jpg new file mode 100755 index 0000000..cbe567a Binary files /dev/null and b/Design/SpriteOutline.jpg differ diff --git a/Design/Storyboard/1.png b/Design/Storyboard/1.png new file mode 100755 index 0000000..ca939fb Binary files /dev/null and b/Design/Storyboard/1.png differ diff --git a/Design/Storyboard/10.png b/Design/Storyboard/10.png new file mode 100755 index 0000000..76c487c Binary files /dev/null and b/Design/Storyboard/10.png differ diff --git a/Design/Storyboard/11.png b/Design/Storyboard/11.png new file mode 100755 index 0000000..30f5fb2 Binary files /dev/null and b/Design/Storyboard/11.png differ diff --git a/Design/Storyboard/2.png b/Design/Storyboard/2.png new file mode 100755 index 0000000..6bcfa92 Binary files /dev/null and b/Design/Storyboard/2.png differ diff --git a/Design/Storyboard/3.png b/Design/Storyboard/3.png new file mode 100755 index 0000000..972a297 Binary files /dev/null and b/Design/Storyboard/3.png differ diff --git a/Design/Storyboard/4.png b/Design/Storyboard/4.png new file mode 100755 index 0000000..6da39b4 Binary files /dev/null and b/Design/Storyboard/4.png differ diff --git a/Design/Storyboard/5.png b/Design/Storyboard/5.png new file mode 100755 index 0000000..07983a7 Binary files /dev/null and b/Design/Storyboard/5.png differ diff --git a/Design/Storyboard/6.png b/Design/Storyboard/6.png new file mode 100755 index 0000000..fd7d875 Binary files /dev/null and b/Design/Storyboard/6.png differ diff --git a/Design/Storyboard/7.png b/Design/Storyboard/7.png new file mode 100755 index 0000000..71e48bc Binary files /dev/null and b/Design/Storyboard/7.png differ diff --git a/Design/Storyboard/8.png b/Design/Storyboard/8.png new file mode 100755 index 0000000..03fd9aa Binary files /dev/null and b/Design/Storyboard/8.png differ diff --git a/Design/Storyboard/9.png b/Design/Storyboard/9.png new file mode 100755 index 0000000..54a56c2 Binary files /dev/null and b/Design/Storyboard/9.png differ diff --git a/Design/Storyboard/Storyboard.jpg b/Design/Storyboard/Storyboard.jpg new file mode 100755 index 0000000..bfb42bb Binary files /dev/null and b/Design/Storyboard/Storyboard.jpg differ diff --git a/Design/StructureAndDesign.docx b/Design/StructureAndDesign.docx new file mode 100755 index 0000000..b5e37f3 Binary files /dev/null and b/Design/StructureAndDesign.docx differ diff --git a/Design/Testing/Improvement.docx b/Design/Testing/Improvement.docx new file mode 100755 index 0000000..00bf76c Binary files /dev/null and b/Design/Testing/Improvement.docx differ diff --git a/Design/Testing/Questionnaire.docx b/Design/Testing/Questionnaire.docx new file mode 100755 index 0000000..9f829a6 Binary files /dev/null and b/Design/Testing/Questionnaire.docx differ diff --git a/Design/Testing/QuestionnaireResults.xlsx b/Design/Testing/QuestionnaireResults.xlsx new file mode 100755 index 0000000..1058a45 Binary files /dev/null and b/Design/Testing/QuestionnaireResults.xlsx differ diff --git a/Design/Testing/Test Log.xlsx b/Design/Testing/Test Log.xlsx new file mode 100755 index 0000000..35b3068 Binary files /dev/null and b/Design/Testing/Test Log.xlsx differ diff --git a/Design/TileCollision.xlsx b/Design/TileCollision.xlsx new file mode 100755 index 0000000..fe501ce Binary files /dev/null and b/Design/TileCollision.xlsx differ diff --git a/Design/Tiles/BlockSides.ods b/Design/Tiles/BlockSides.ods new file mode 100755 index 0000000..9486d39 Binary files /dev/null and b/Design/Tiles/BlockSides.ods differ diff --git a/Design/Tiles/BlockSides.xlsx b/Design/Tiles/BlockSides.xlsx new file mode 100755 index 0000000..9cf46e1 Binary files /dev/null and b/Design/Tiles/BlockSides.xlsx differ diff --git a/Design/Tiles/TileSet.png b/Design/Tiles/TileSet.png new file mode 100755 index 0000000..17b123a Binary files /dev/null and b/Design/Tiles/TileSet.png differ diff --git a/Design/Tiles/TileSet.xcf b/Design/Tiles/TileSet.xcf new file mode 100755 index 0000000..d61f84a Binary files /dev/null and b/Design/Tiles/TileSet.xcf differ diff --git a/Design/Tiles/tilemapscreen.png b/Design/Tiles/tilemapscreen.png new file mode 100755 index 0000000..aa2711f Binary files /dev/null and b/Design/Tiles/tilemapscreen.png differ diff --git a/Design/Tiles/tilemapscreenshot.jpg b/Design/Tiles/tilemapscreenshot.jpg new file mode 100755 index 0000000..50b3033 Binary files /dev/null and b/Design/Tiles/tilemapscreenshot.jpg differ diff --git a/Design/Tiles/tilemapscreenshot.png b/Design/Tiles/tilemapscreenshot.png new file mode 100755 index 0000000..9e144bc Binary files /dev/null and b/Design/Tiles/tilemapscreenshot.png differ diff --git a/Design/UserGuide.docx b/Design/UserGuide.docx new file mode 100755 index 0000000..df7f19b Binary files /dev/null and b/Design/UserGuide.docx differ diff --git a/Globals.bas b/Globals.bas new file mode 100755 index 0000000..9ec9268 --- /dev/null +++ b/Globals.bas @@ -0,0 +1,56 @@ +Attribute VB_Name = "Globals" +'Stores the states of each available key on a keyboard (whether it is pressed or not). +Global KeyIsDown(255) As Boolean + +'Timers. +Global ReportTimer As Integer 'Dictates the length of time in which failure and success messages are displayed. +Global TickCount As Integer 'Used in physics calculations. + +'Array into which map data is read from a file. +Global Map(0 To 24, 0 To 17) As Integer + +'Level number and the name loaded from the map file. +Global Level As Integer +Global LevelName As String + +'Stores the file names and locations of the player's animation frames. +Global PlayerIdle(0 To 3) As String +Global PlayerWalk(0 To 3, 0 To 5) As String +Global PlayerDazed(0 To 3, 0 To 1) As String +Global PlayerShock(0 To 3, 0 To 1) As String + +'Player position and gravity, initilally loaded from the map file. +Global PlayerName As String 'Player's name for scoreboard purposes. Will be restricted to 3 characters. +Global PlayerPos(0 To 1) As Integer 'Player's current position. Index 0 is the X coordinate, while 1 is Y. +Global PlayerFallOrigin(0 To 1) As Integer 'Point from which the player starts falling. Used to determine falling distance. +Global PlayerGravityDir As Integer 'Direction of the player's current gravity pull. +Global PlayerFallSpeed As Integer 'Player's fall speed. Gradually increases from zero to 30. +Global PlayerState As Byte 'Determines whether the player has been shocked, dazed or has completed the level. +Global PlayerAnim As Byte 'Player's current animation frame. +Global PlayerAnimSequence As Byte 'Determines the playback sequence of the player's animation frames. +Global PlayerAnimLoaded As Boolean 'Prevents the game from needlessly loading an animation frame that has already been loaded. +Global PlayerRetries As Byte 'The number of lives the player gets. + +'Stores the time taken to complete a level. +Global LevelMinutes As Integer +Global LevelSeconds As Integer +Global LevelMilliseconds As Integer + +'Stores the filenames and locations of each robot's animation frames. +Global RobotWalk(0 To 1, 0 To 3, 0 To 3) As String + +'Robot positions and gravity, initally loaded from the map file. +Global RobotPos(0 To 1, 0 To 1) As Integer 'Robot's current position. +Global RobotDir(0 To 1) As Integer 'Robot's gravitational direction. +Global RobotFacing(0 To 1) As Byte 'Direction in which the robot faces. +Global RobotAnim(0 To 1) As Integer 'Robot's current animation frame. +Global RobotAnimLoaded As Boolean 'Prevents the game from needlessly loading an animation frame that has already been loaded. + +'Used in calculations to determine the necessary border for each tile. +Global Border As Integer + +'Stores the filenames of each sprite and tile. +Global TileTable(0 To 15) As String +Global ShockTile As String +Global StartTile As String +Global FinishTile As String diff --git a/Gravity.vbp b/Gravity.vbp new file mode 100755 index 0000000..5307201 --- /dev/null +++ b/Gravity.vbp @@ -0,0 +1,39 @@ +Type=Exe +Form=frmGravity.frm +Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\Windows\SysWOW64\stdole2.tlb#OLE Automation +Form=frmDebug.frm +Module=PlayerStates; PlayerState.bas +Module=PlayerMovement; PlayerMovement.bas +Module=Levels; Levels.bas +Module=Globals; Globals.bas +Module=RobotMovement; RobotMovement.bas +Module=Clocks; Clocks.bas +Module=HighScores; HighScores.bas +IconForm="frmGravity" +Startup="frmGravity" +HelpFile="" +ExeName32="Turvy_Final.exe" +Command32="" +Name="Gravity" +HelpContextID="0" +CompatibleMode="0" +MajorVer=1 +MinorVer=0 +RevisionVer=0 +AutoIncrementVer=0 +ServerSupportFiles=0 +CompilationType=0 +OptimizationType=0 +FavorPentiumPro(tm)=0 +CodeViewDebugInfo=0 +NoAliasing=0 +BoundsCheck=0 +OverflowCheck=0 +FlPointCheck=0 +FDIVCheck=0 +UnroundedFP=0 +StartMode=0 +Unattended=0 +Retained=0 +ThreadPerObject=0 +MaxNumberOfThreads=1 diff --git a/Gravity.vbw b/Gravity.vbw new file mode 100755 index 0000000..8109d78 --- /dev/null +++ b/Gravity.vbw @@ -0,0 +1,9 @@ +frmGravity = 7, 28, 910, 545, , 25, 25, 928, 542, C +frmDebug = 25, 25, 928, 542, I, 50, 50, 953, 567, C +PlayerStates = 50, 50, 953, 567, +PlayerMovement = 125, 125, 1028, 642, +Levels = 0, 0, 903, 647, +Globals = 50, 50, 953, 567, +RobotMovement = 25, 25, 928, 542, +Clocks = 200, 0, 1103, 767, +HighScores = 175, 175, 1083, 692, Z diff --git a/HighScores.bas b/HighScores.bas new file mode 100755 index 0000000..13a6815 --- /dev/null +++ b/HighScores.bas @@ -0,0 +1,62 @@ +Attribute VB_Name = "HighScores" +Dim TopName(0 To 5) As String +Dim TopMinute(0 To 5) As Integer +Dim TopSecond(0 To 5) As Integer +Dim TopMillisecond(0 To 5) As Integer +Dim TempName As String +Dim TempMinute, TempSecond, TempMillisecond As Integer + +Public Sub WriteScore() + + Dim TotalMilliseconds(0 To 1) As Single + Dim LineCounter As Integer + + Open "Scores.txt" For Input As #1 + LineCounter = 0 + + Do While Not EOF(1) + Input #1, TopName(LineCounter), TopMinute(LineCounter), TopSecond(LineCounter), TopMillisecond(LineCounter) + LineCounter = LineCounter + 1 + Loop + + Close #1 + + TopName(5) = PlayerName + TopMinute(5) = LevelMinutes + TopSecond(5) = LevelSeconds + TopMillisecond(5) = LevelMilliseconds + + For LineCounter = 5 To 1 Step -1 + TotalMilliseconds(0) = ((((TopMinute(LineCounter - 1) / 100000000) * 60 + (TopSecond(LineCounter - 1) / 100000000)) * 100) + (TopMillisecond(LineCounter - 1)) / 100000000) + TotalMilliseconds(1) = ((((TopMinute(LineCounter) / 100000000) * 60 + (TopSecond(LineCounter) / 100000000)) * 100) + (TopMillisecond(LineCounter)) / 100000000) + + If TotalMilliseconds(1) < TotalMilliseconds(0) Then + Call MoveName(LineCounter) + End If + + Next LineCounter + + Open "Scores.txt" For Output As #2 + For LineCounter = 0 To 4 + Write #2, TopName(LineCounter), TopMinute(LineCounter), TopSecond(LineCounter), TopMillisecond(LineCounter) + Next LineCounter + + Close #2 +End Sub + +Public Sub MoveName(ScoreLine As Integer) + TempName = TopName(ScoreLine - 1) + TempMinute = TopMinute(ScoreLine - 1) + TempSecond = TopSecond(ScoreLine - 1) + TempMillisecond = TopMillisecond(ScoreLine - 1) + + TopName(ScoreLine - 1) = TopName(ScoreLine) + TopMinute(ScoreLine - 1) = TopMinute(ScoreLine) + TopSecond(ScoreLine - 1) = TopSecond(ScoreLine) + TopMillisecond(ScoreLine - 1) = TopMillisecond(ScoreLine) + + TopName(ScoreLine) = TempName + TopMinute(ScoreLine) = TempMinute + TopSecond(ScoreLine) = TempSecond + TopMillisecond(ScoreLine) = TempMillisecond +End Sub diff --git a/Levels.bas b/Levels.bas new file mode 100755 index 0000000..d30c9d3 --- /dev/null +++ b/Levels.bas @@ -0,0 +1,136 @@ +Attribute VB_Name = "Levels" +Public Sub LoadLevel(Pack As String) + + 'Open the correct level file based on the variables Pack and Level. + Open "Maps/" & Pack & "_" & Level & ".lvl" For Input As 1 + + 'Read the level name and character positions. + Input #1, LevelName + Input #1, PlayerPos(0), PlayerPos(1), PlayerGravityDir + Input #1, RobotPos(0, 0), RobotPos(0, 1), RobotDir(0), RobotFacing(0) + Input #1, RobotPos(1, 0), RobotPos(1, 1), RobotDir(1), RobotFacing(1) + + 'Read the map layout into the Map array. + For y = 0 To 17 + For x = 0 To 24 + Input #1, Map(x, y) + Next x + Next y + + 'Close the file. + Close #1 + + 'Pass the level name to the level name label at the bottom of the screen. + frmGravity.lblLevelName.Caption = LevelName + + 'The player and robot positions on file only relates to its grid reference rather than actual pixel position. + 'Convert the player position to pixel position, ensuring she stays in the middle of her starting block. + PlayerPos(0) = PlayerPos(0) * 32 + 16 + PlayerPos(1) = PlayerPos(1) * 32 + 16 + + 'Set the player's fall origin to their current position. + PlayerFallOrigin(0) = PlayerPos(0) + PlayerFallOrigin(1) = PlayerPos(1) + + 'Set the player object on screen to match their starting position on file. + frmGravity.imgPlayer.Left = PlayerPos(0) - frmGravity.imgPlayer.Width / 2 + frmGravity.imgPlayer.Top = PlayerPos(1) - frmGravity.imgPlayer.Height / 2 + + For a = 0 To 1 + + 'Convert the robot positions to pixel positions. + RobotPos(a, 0) = RobotPos(a, 0) * 32 + 16 + RobotPos(a, 1) = RobotPos(a, 1) * 32 + 16 + + 'Set the robot objects on screen to match their starting positions on file. + frmGravity.imgRobot(a).Left = RobotPos(a, 0) - frmGravity.imgRobot(a).Width / 2 + frmGravity.imgRobot(a).Top = RobotPos(a, 1) - frmGravity.imgRobot(a).Height / 2 + + 'Select the correct animation frame based on which direction they are facing. + If RobotFacing(a) = 0 Then + RobotAnim(a) = 0 + Else + RobotAnim(a) = 3 + End If + + 'Load that animation frame. + frmGravity.imgRobot(a).Picture = LoadPicture(RobotWalk(a, RobotDir(a), RobotAnim(a))) + RobotAnimLoaded = True + Next a + + For y = 0 To 17 + For x = 0 To 24 + + 'If the current block is 1 then calculate the correct tile to use, otherwise just reset it to a + 'blank space. + If Map(x, y) = 1 Then + + 'Set border to zero. This will be incremented based on the empty space surrounding it, and + 'used to select the correct tile image. + Border = 0 + + 'Determine the border of each tile by checking for adjacent tiles that are set to empty space. + 'Is there empty space above it? + If y - 1 >= 0 Then + If Not Map(x, y - 1) = 1 Then + Border = Border + 1 + End If + End If + + 'To the right? + If x + 1 <= 24 Then + If Not Map(x + 1, y) = 1 Then + Border = Border + 2 + End If + End If + + 'Below? + If y + 1 <= 17 Then + If Not Map(x, y + 1) = 1 Then + Border = Border + 4 + End If + End If + + 'To the left? + If x - 1 >= 0 Then + If Not Map(x - 1, y) = 1 Then + Border = Border + 8 + End If + End If + + 'Load the correct tile image into the current block. + frmGravity.imgRegion((1 * x) + (25 * y)).Picture = LoadPicture(TileTable(Border)) + + 'If the current block number is 2 then load a shock tile in its place. + ElseIf Map(x, y) = 2 Then + frmGravity.imgRegion((1 * x) + (25 * y)).Picture = LoadPicture(ShockTile) + + 'If the current block number is 3 then load a start/entry tile in its place. + ElseIf Map(x, y) = 3 Then + frmGravity.imgRegion((1 * x) + (25 * y)).Picture = LoadPicture(StartTile) + + 'If the current block number is 3 then load a finish/exit tile in its place. + ElseIf Map(x, y) = 4 Then + frmGravity.imgRegion((1 * x) + (25 * y)).Picture = LoadPicture(FinishTile) + + 'If the current block number is 0 then it is empty space and no image shouls be loaded. Reset the block to empty space. + Else + frmGravity.imgRegion((1 * x) + (25 * y)).Picture = LoadPicture("") + + End If + + 'Position the tile at its appropriate coordinates on the form. + frmGravity.imgRegion((1 * x) + (25 * y)).Left = 32 * x + frmGravity.imgRegion((1 * x) + (25 * y)).Top = 32 * y + Next x + Next y + + 'Load the idle image appropriate to their gravitational direction. + frmGravity.imgPlayer.Picture = LoadPicture(PlayerIdle(PlayerGravityDir)) + + 'Reset the player's current state, walk animation frame, playback sequence and the timer for success/fail reports. + PlayerStates.ResetPlayerState + PlayerAnim = 3 + PlayerAnimSequence = 1 + ReportTimer = 0 +End Sub diff --git a/Maps/Editor.xlsx b/Maps/Editor.xlsx new file mode 100755 index 0000000..b902c55 Binary files /dev/null and b/Maps/Editor.xlsx differ diff --git a/Maps/Level.csv b/Maps/Level.csv new file mode 100755 index 0000000..79a5f12 --- /dev/null +++ b/Maps/Level.csv @@ -0,0 +1,454 @@ +Freedom!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +3,14,2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +8,16,2,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +8,4,1,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +1,,,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,,,,,,, +1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, diff --git a/PlayerMovement.bas b/PlayerMovement.bas new file mode 100755 index 0000000..9bfa256 --- /dev/null +++ b/PlayerMovement.bas @@ -0,0 +1,466 @@ +Attribute VB_Name = "PlayerMovement" +'Increases the velocity of the player's fall. +Public Function IncreaseVelocity(u As Integer, g As Integer, t As Integer, DimensionScaler As Single) + IncreaseVelocity = (u * t + 0.5 * g * t * t) * DimensionScaler +End Function + +Public Sub MovePlayer() + + 'Used to determine where the player's position in be next, and whether it will place them in collision with a solid tile. + Dim FutureRegion(0 To 1) As Integer + + 'Sets the current animation frame to their idle stance. + frmGravity.imgPlayer.Picture = LoadPicture(PlayerIdle(PlayerGravityDir)) + + If PlayerFallSpeed = 0 Then + 'If the character's gravity direction is up or down, then she can only move left or right. + If PlayerGravityDir = 0 Or PlayerGravityDir = 2 Then + + 'If D is pressed... + If KeyIsDown(vbKeyD) = True Then + + 'Determine where the player's right edge will be. + FutureRegion(0) = Int((PlayerPos(0) + 5 + 8) / 32) + FutureRegion(1) = Int(PlayerPos(1) / 32) + + 'If the player's right edge will land within a solid tile, place the player exactly adjacent to the block instead. + If Map(FutureRegion(0), FutureRegion(1)) >= 1 Then + PlayerPos(0) = FutureRegion(0) * 32 - 8 + + 'If that tile is a shock tile, shock the player. + If Map(FutureRegion(0), FutureRegion(1)) = 2 Then + Call PlayerStates.ShockPlayer + End If + + 'If that tile is an exit tile, the player has completed the level. + If Map(FutureRegion(0), FutureRegion(1)) = 4 Then + Call PlayerStates.WinLevel + End If + + 'If the player's right edge is not going to collide with a solid tile, simply move them along. + Else + PlayerPos(0) = PlayerPos(0) + 5 + End If + + 'Ensure the player animation only displays the right-walking frames. + If PlayerAnim < 3 Then + PlayerAnim = 3 + PlayerAnimSequence = 1 + PlayerAnimLoaded = False + End If + + 'Alternate between animation sequences when those sequences reach their first or last frames. + If PlayerAnimSequence = 0 Then + PlayerAnim = PlayerAnim - 1 + If PlayerAnim = 3 Then + PlayerAnimSequence = 0 + End If + PlayerAnimLoaded = False + End If + + If PlayerAnimSequence = 1 Then + PlayerAnim = PlayerAnim + 1 + If PlayerAnim = 5 Then + PlayerAnimSequence = 0 + End If + PlayerAnimLoaded = False + End If + + End If + + 'If A is pressed... + If KeyIsDown(vbKeyA) = True Then + + 'Determine where the player's left edge will be. + FutureRegion(0) = Int((PlayerPos(0) - 5 - 8) / 32) + FutureRegion(1) = Int(PlayerPos(1) / 32) + + 'If the player's left edge will land within a solid tile, place the player exactly adjacent to the block instead. + If Map(FutureRegion(0), FutureRegion(1)) >= 1 Then + PlayerPos(0) = (FutureRegion(0) + 1) * 32 + 8 + + 'If that tile is a shock tile, shock the player. + If Map(FutureRegion(0), FutureRegion(1)) = 2 Then + Call PlayerStates.ShockPlayer + End If + + 'If that tile is an exit tile, the player has completed the level. + If Map(FutureRegion(0), FutureRegion(1)) = 4 Then + Call PlayerStates.WinLevel + End If + + 'If the player's left edge is not going to collide with a solid tile, simply move them along. + Else + PlayerPos(0) = PlayerPos(0) - 5 + End If + + 'Ensure the player animation only displays the left-walking frames. + If PlayerAnim > 2 Then + PlayerAnim = 2 + PlayerAnimSequence = 1 + PlayerAnimLoaded = False + End If + + 'Alternate between animation sequences when those sequences reach their first or last frames. + If PlayerAnimSequence = 0 Then + PlayerAnim = PlayerAnim + 1 + If PlayerAnim = 2 Then + PlayerAnimSequence = 0 + End If + PlayerAnimLoaded = False + End If + + If PlayerAnimSequence = 1 Then + PlayerAnim = PlayerAnim - 1 + If PlayerAnim = 0 Then + PlayerAnimSequence = 0 + End If + PlayerAnimLoaded = False + End If + + End If + End If + + 'If the character's gravity direction is left or right, then she can only move up or down. + If PlayerGravityDir = 1 Or PlayerGravityDir = 3 Then + + 'If S is pressed... + If KeyIsDown(vbKeyS) = True Then + + 'Determine where the player's bottom edge will be. + FutureRegion(0) = Int(PlayerPos(0) / 32) + FutureRegion(1) = Int((PlayerPos(1) + 5 + 8) / 32) + + 'If the player's bottom edge will land within a solid tile, place the player exactly adjacent to the block instead. + If Map(FutureRegion(0), FutureRegion(1)) >= 1 Then + PlayerPos(1) = FutureRegion(1) * 32 - 8 + + 'If that tile is a shock tile, shock the player. + If Map(FutureRegion(0), FutureRegion(1)) = 2 Then + Call PlayerStates.ShockPlayer + End If + + 'If that tile is an exit tile, the player has completed the level. + If Map(FutureRegion(0), FutureRegion(1)) = 4 Then + Call PlayerStates.WinLevel + End If + + 'If the player's bottom edge is not going to collide with a solid tile, simply move them along. + Else + PlayerPos(1) = PlayerPos(1) + 5 + End If + + 'Ensure the player animation only displays the downward-walking frames. + If PlayerAnim < 3 Then + PlayerAnim = 3 + PlayerAnimSequence = 1 + PlayerAnimLoaded = False + End If + + 'Alternate between animation sequences when those sequences reach their first or last frames. + If PlayerAnimSequence = 0 Then + PlayerAnim = PlayerAnim - 1 + If PlayerAnim = 3 Then + PlayerAnimSequence = 0 + End If + PlayerAnimLoaded = False + End If + + If PlayerAnimSequence = 1 Then + PlayerAnim = PlayerAnim + 1 + If PlayerAnim = 5 Then + PlayerAnimSequence = 0 + End If + PlayerAnimLoaded = False + End If + End If + + 'If W is pressed... + If KeyIsDown(vbKeyW) = True Then + + 'Determine where the player's top edge will be. + FutureRegion(0) = Int(PlayerPos(0) / 32) + FutureRegion(1) = Int((PlayerPos(1) - 5 - 8) / 32) + + 'If the player's top edge will land within a solid tile, place the player exactly adjacent to the block instead. + If Map(FutureRegion(0), FutureRegion(1)) >= 1 Then + PlayerPos(1) = (FutureRegion(1) + 1) * 32 + 8 + + 'If that tile is a shock tile, shock the player. + If Map(FutureRegion(0), FutureRegion(1)) = 2 Then + Call PlayerStates.ShockPlayer + End If + + 'If that tile is an exit tile, the player has completed the level. + If Map(FutureRegion(0), FutureRegion(1)) = 4 Then + Call PlayerStates.WinLevel + End If + + 'If the player's top edge is not going to collide with a solid tile, simply move them along. + Else + PlayerPos(1) = PlayerPos(1) - 5 + End If + + 'Ensure the player animation only displays the upward-walking frames. + If PlayerAnim > 2 Then + PlayerAnim = 2 + PlayerAnimSequence = 1 + PlayerAnimLoaded = False + End If + + 'Alternate between animation sequences when those sequences reach their first or last frames. + If PlayerAnimSequence = 0 Then + PlayerAnim = PlayerAnim + 1 + If PlayerAnim = 2 Then + PlayerAnimSequence = 0 + End If + PlayerAnimLoaded = False + End If + + If PlayerAnimSequence = 1 Then + PlayerAnim = PlayerAnim - 1 + If PlayerAnim = 0 Then + PlayerAnimSequence = 0 + End If + PlayerAnimLoaded = False + End If + End If + End If + + 'If an arrow key is pressed, the player's gravity direction changes, their fall origin is reset to their + 'position at the time of the change and a sprite image corresponding to that direction is loaded. + If KeyIsDown(vbKeyUp) = True Then + PlayerGravityDir = 0 + PlayerFallOrigin(0) = PlayerPos(0) + PlayerFallOrigin(1) = PlayerPos(1) + frmGravity.imgPlayer.Picture = LoadPicture(PlayerIdle(0)) + End If + + If KeyIsDown(vbKeyRight) = True Then + PlayerGravityDir = 1 + PlayerFallOrigin(0) = PlayerPos(0) + PlayerFallOrigin(1) = PlayerPos(1) + frmGravity.imgPlayer.Picture = LoadPicture(PlayerIdle(1)) + End If + + If KeyIsDown(vbKeyDown) = True Then + PlayerGravityDir = 2 + PlayerFallOrigin(0) = PlayerPos(0) + PlayerFallOrigin(1) = PlayerPos(1) + frmGravity.imgPlayer.Picture = LoadPicture(PlayerIdle(2)) + End If + + If KeyIsDown(vbKeyLeft) = True Then + PlayerGravityDir = 3 + PlayerFallOrigin(0) = PlayerPos(0) + PlayerFallOrigin(1) = PlayerPos(1) + frmGravity.imgPlayer.Picture = LoadPicture(PlayerIdle(3)) + End If + + End If + + 'If the current animation frame has not been loaded, then do so. + If PlayerAnimLoaded = False Then + frmGravity.imgPlayer.Picture = LoadPicture(PlayerWalk(PlayerGravityDir, PlayerAnim)) + PlayerAnimLoaded = True + End If + +End Sub + +Public Sub DropPlayer() + + 'Used to determine where the player's position in be next, and whether it will place them in collision with a solid tile. + Dim FutureRegion(0 To 1, 0 To 1) As Integer + + 'If the player's gravity is up... + If PlayerGravityDir = 0 Then + + 'Determine the future location of the player's top side, and their left and right sides. + FutureRegion(0, 0) = Int((PlayerPos(0) - 8) / 32) + FutureRegion(0, 1) = Int((PlayerPos(0) + 7) / 32) + FutureRegion(1, 0) = Int((PlayerPos(1) - PlayerFallSpeed - 17) / 32) + + 'If the top edge collides with a solid block (by checking both the left and right ends of that side)... + If FutureRegion(1, 0) >= 0 Then + If Map(FutureRegion(0, 0), FutureRegion(1, 0)) >= 1 Or Map(FutureRegion(0, 1), FutureRegion(1, 0)) >= 1 Then + + 'Position the player exactly adjactent to that block and reset TickCount. + PlayerPos(1) = (FutureRegion(1, 0) + 1) * 32 + 16 + TickCount = 0 + + 'If the player has fallen more than two blocks, daze them. + If Abs(PlayerPos(1) - PlayerFallOrigin(1)) > 80 Then + Call PlayerStates.DazePlayer + End If + + 'If the block is a shock tile, shock the player. + If Map(FutureRegion(0, 0), FutureRegion(1, 0)) = 2 Or Map(FutureRegion(0, 1), FutureRegion(1, 0)) = 2 Then + Call PlayerStates.ShockPlayer + End If + + 'If the block is an exit gate, the player has completed the level. + If Map(FutureRegion(0, 0), FutureRegion(1, 0)) = 4 Or Map(FutureRegion(0, 1), FutureRegion(1, 0)) = 4 Then + Call PlayerStates.WinLevel + End If + + 'Reset the player's fall speed and fall origin. + PlayerFallSpeed = 0 + PlayerFallOrigin(0) = PlayerPos(0) + PlayerFallOrigin(1) = PlayerPos(1) + + 'Otherwise just drop the player by the value of their fall speed. + Else + PlayerPos(1) = Int(PlayerPos(1) - PlayerFallSpeed) + End If + + End If + End If + + 'If the player's gravity is right... + If PlayerGravityDir = 1 Then + + 'Determine the future location of the player's right side, and their top and bottom sides. + FutureRegion(0, 0) = Int((PlayerPos(0) + PlayerFallSpeed + 16) / 32) + FutureRegion(1, 0) = Int((PlayerPos(1) - 8) / 32) + FutureRegion(1, 1) = Int((PlayerPos(1) + 7) / 32) + + 'If the right edge collides with a solid block (by checking both the top and bottom ends of that side)... + If FutureRegion(0, 0) <= 24 Then + If Map(FutureRegion(0, 0), FutureRegion(1, 0)) >= 1 Or Map(FutureRegion(0, 0), FutureRegion(1, 1)) >= 1 Then + + 'Position the player exactly adjactent to that block and reset TickCount. + PlayerPos(0) = FutureRegion(0, 0) * 32 - 16 + TickCount = 0 + + 'If the player has fallen more than two blocks, daze them. + If Abs(PlayerPos(0) - PlayerFallOrigin(0)) > 80 Then + Call PlayerStates.DazePlayer + End If + + 'If the block is a shock tile, shock the player. + If Map(FutureRegion(0, 0), FutureRegion(1, 0)) = 2 Or Map(FutureRegion(0, 0), FutureRegion(1, 1)) = 2 Then + Call PlayerStates.ShockPlayer + End If + + 'If the block is an exit gate, the player has completed the level. + If Map(FutureRegion(0, 0), FutureRegion(1, 0)) = 4 Or Map(FutureRegion(0, 0), FutureRegion(1, 1)) = 4 Then + Call PlayerStates.WinLevel + End If + + 'Reset the player's fall speed and fall origin. + PlayerFallSpeed = 0 + PlayerFallOrigin(0) = PlayerPos(0) + PlayerFallOrigin(1) = PlayerPos(1) + + 'Otherwise just drop the player by the value of their fall speed. + Else + PlayerPos(0) = Int(PlayerPos(0) + PlayerFallSpeed) + End If + + End If + End If + + If PlayerGravityDir = 2 Then + + 'Determine the future location of the player's bottom side, and their left and right sides. + FutureRegion(0, 0) = Int((PlayerPos(0) - 8) / 32) + FutureRegion(0, 1) = Int((PlayerPos(0) + 7) / 32) + FutureRegion(1, 0) = Int((PlayerPos(1) + PlayerFallSpeed + 16) / 32) + + 'If the bottom edge collides with a solid block (by checking both the left and right ends of that side)... + If FutureRegion(1, 0) < 18 Then + If Map(FutureRegion(0, 0), FutureRegion(1, 0)) >= 1 Or Map(FutureRegion(0, 1), FutureRegion(1, 0)) >= 1 Then + + 'Position the player exactly adjactent to that block and reset TickCount. + PlayerPos(1) = FutureRegion(1, 0) * 32 - 16 + TickCount = 0 + + 'If the player has fallen more than two blocks, daze them. + If Abs(PlayerPos(1) - PlayerFallOrigin(1)) > 80 Then + Call PlayerStates.DazePlayer + End If + + 'If the block is a shock tile, shock the player. + If Map(FutureRegion(0, 0), FutureRegion(1, 0)) = 2 Or Map(FutureRegion(0, 1), FutureRegion(1, 0)) = 2 Then + Call PlayerStates.ShockPlayer + End If + + 'If the block is an exit gate, the player has completed the level. + If Map(FutureRegion(0, 0), FutureRegion(1, 0)) = 4 Or Map(FutureRegion(0, 1), FutureRegion(1, 0)) = 4 Then + Call PlayerStates.WinLevel + End If + + 'Reset the player's fall speed and fall origin. + PlayerFallSpeed = 0 + PlayerFallOrigin(0) = PlayerPos(0) + PlayerFallOrigin(1) = PlayerPos(1) + + 'Otherwise just drop the player by the value of their fall speed. + Else + PlayerPos(1) = Int(PlayerPos(1) + PlayerFallSpeed) + End If + + End If + End If + + If PlayerGravityDir = 3 Then + + 'Determine the future location of the player's left side, and their top and bottom sides. + FutureRegion(0, 0) = Int((PlayerPos(0) - PlayerFallSpeed - 17) / 32) + FutureRegion(1, 0) = Int((PlayerPos(1) - 8) / 32) + FutureRegion(1, 1) = Int((PlayerPos(1) + 7) / 32) + + 'If the left edge collides with a solid block (by checking both the top and bottom ends of that side)... + If FutureRegion(0, 0) >= 0 Then + If Map(FutureRegion(0, 0), FutureRegion(1, 0)) >= 1 Or Map(FutureRegion(0, 0), FutureRegion(1, 1)) >= 1 Then + + 'Position the player exactly adjactent to that block and reset TickCount. + PlayerPos(0) = (FutureRegion(0, 0) + 1) * 32 + 16 + TickCount = 0 + + 'If the player has fallen more than two blocks, daze them. + If Abs(PlayerPos(0) - PlayerFallOrigin(0)) > 80 Then + Call PlayerStates.DazePlayer + End If + + 'If the block is a shock tile, shock the player. + If Map(FutureRegion(0, 0), FutureRegion(1, 0)) = 2 Or Map(FutureRegion(0, 0), FutureRegion(1, 1)) = 2 Then + Call PlayerStates.ShockPlayer + End If + + 'Reset the player's fall speed and fall origin. + If Map(FutureRegion(0, 0), FutureRegion(1, 0)) = 4 Or Map(FutureRegion(0, 0), FutureRegion(1, 1)) = 4 Then + Call PlayerStates.WinLevel + End If + + 'Reset the player's fall speed and fall origin. + PlayerFallSpeed = 0 + PlayerFallOrigin(0) = PlayerPos(0) + PlayerFallOrigin(1) = PlayerPos(1) + + 'Otherwise just drop the player by the value of their fall speed. + Else + PlayerPos(0) = Int(PlayerPos(0) - PlayerFallSpeed) + End If + + End If + End If + + 'Various variables displayed for debugging purposes. + 'DebugText = "" + 'DebugText = DebugText & "Player X: " & PlayerPos(0) + 'DebugText = DebugText & Chr(13) & "Player Y: " & PlayerPos(1) + 'DebugText = DebugText & Chr(13) & "Gravity: " & PlayerGravityDir + 'DebugText = DebugText & Chr(13) & "Fall Dist X: " & PlayerPos(0) - PlayerFallOrigin(0) + 'DebugText = DebugText & Chr(13) & "Fall Dist X: " & PlayerPos(1) - PlayerFallOrigin(1) + 'DebugText = DebugText & Chr(13) & "Region X: " & Int(PlayerPos(0) / 32) + 'DebugText = DebugText & Chr(13) & "Future X: " & FutureRegion(0, 0) + 'DebugText = DebugText & Chr(13) & "Region Y: " & Int(PlayerPos(1) / 32) + 'DebugText = DebugText & Chr(13) & "Future Y: " & FutureRegion(1, 0) + 'DebugText = DebugText & Chr(13) & "Player State: " & PlayerState + 'DebugText = DebugText & Chr(13) & Len(Str(LevelMinutes)) & " " & LevelMinutes + 'DebugText = DebugText & Chr(13) & Len(Str(LevelSeconds)) + 'DebugText = DebugText & Chr(13) & Len(Str(LevelMilliseconds)) + + 'frmDebug.lblDebug.Caption = DebugText +End Sub diff --git a/PlayerState.bas b/PlayerState.bas new file mode 100755 index 0000000..19f866f --- /dev/null +++ b/PlayerState.bas @@ -0,0 +1,20 @@ +Attribute VB_Name = "PlayerStates" +'Player state for when the player comes into contact with a robot or shock tile. +Public Sub ShockPlayer() + PlayerState = 3 +End Sub + +'Player state for when the player falls too far. +Public Sub DazePlayer() + PlayerState = 2 +End Sub + +'Player state for when the player successfully reaches the exit. +Public Sub WinLevel() + PlayerState = 1 +End Sub + +'Resets the player state to normal. +Public Sub ResetPlayerState() + PlayerState = 0 +End Sub diff --git a/RobotMovement.bas b/RobotMovement.bas new file mode 100755 index 0000000..7451375 --- /dev/null +++ b/RobotMovement.bas @@ -0,0 +1,269 @@ +Attribute VB_Name = "RobotMovement" + +Public Sub MoveBot() + + 'Determine the future location of the robots. + Dim FutureRegion(0 To 1) As Integer + + For a = 0 To 1 + + 'If the robot is set to face its relative left... + If RobotDir(a) = 0 Then + If RobotFacing(a) = 0 Then + + 'If the robot's animation frame is not 0 then decrement that value by 1 (moving it closer to 0). + If RobotAnim(a) > 0 Then + RobotAnim(a) = RobotAnim(a) - 1 + RobotAnimLoaded = False + + 'Otherwise... + Else + + 'Determine where the robot's next position will be. + FutureRegion(0) = Int((RobotPos(a, 0) + 5 + (8 * (a + 1))) / 32) + FutureRegion(1) = Int(RobotPos(a, 1) / 32) + + 'If the robot is going to collide with a solid block or enter a block region with empty space below it, + 'then place the robot directly adjacent to that block and flip the robot's facing direction. + If Map(FutureRegion(0), FutureRegion(1)) >= 1 Or Not Map(FutureRegion(0), FutureRegion(1) - 1) = 1 Then + RobotPos(a, 0) = FutureRegion(0) * 32 - (8 * (a + 1)) + RobotFacing(a) = 1 + + 'Otherwise just move the robot along its path. + Else + RobotPos(a, 0) = RobotPos(a, 0) + 2 + End If + + End If + + 'If it's set to face its relative right... + Else + + 'If the robot's animation frame is not 3 then increment that value by 1 (moving it closer to 3). + If RobotAnim(a) < 3 Then + RobotAnim(a) = RobotAnim(a) + 1 + RobotAnimLoaded = False + + 'Otherwise... + Else + + 'Determine where the robot's next position will be. + FutureRegion(0) = Int((RobotPos(a, 0) - 5 - (8 * (a + 1))) / 32) + FutureRegion(1) = Int(RobotPos(a, 1) / 32) + + 'If the robot is going to collide with a solid block or enter a block region with empty space below it, + 'then place the robot directly adjacent to that block and flip the robot's facing direction. + If Map(FutureRegion(0), FutureRegion(1)) >= 1 Or Not Map(FutureRegion(0), FutureRegion(1) - 1) = 1 Then + RobotPos(a, 0) = (FutureRegion(0) + 1) * 32 + (8 * (a + 1)) + RobotFacing(a) = 0 + + 'Otherwise just move the robot along its path. + Else + RobotPos(a, 0) = RobotPos(a, 0) - 2 + End If + + End If + + End If + + End If + + 'If the robot is set to face its relative left... + If RobotDir(a) = 1 Then + If RobotFacing(a) = 0 Then + + 'If the robot's animation frame is not 0 then decrement that value by 1 (moving it closer to 0). + If RobotAnim(a) > 0 Then + RobotAnim(a) = RobotAnim(a) - 1 + RobotAnimLoaded = False + + 'Otherwise... + Else + + 'Determine where the robot's next position will be. + FutureRegion(0) = Int(RobotPos(a, 0) / 32) + FutureRegion(1) = Int((RobotPos(a, 1) + 5 + (8 * (a + 1))) / 32) + + 'If the robot is going to collide with a solid block or enter a block region with empty space below it, + 'then place the robot directly adjacent to that block and flip the robot's facing direction. + If Map(FutureRegion(0), FutureRegion(1)) >= 1 Or Not Map(FutureRegion(0) + 1, FutureRegion(1)) = 1 Then + RobotPos(a, 1) = FutureRegion(1) * 32 - (8 * (a + 1)) + RobotFacing(a) = 1 + + 'Otherwise just move the robot along its path. + Else + RobotPos(a, 1) = RobotPos(a, 1) + 2 + End If + + End If + + 'If it's set to face its relative right... + Else + + 'If the robot's animation frame is not 3 then increment that value by 1 (moving it closer to 3). + If RobotAnim(a) < 3 Then + RobotAnim(a) = RobotAnim(a) + 1 + RobotAnimLoaded = False + + 'Otherwise... + Else + + 'Determine where the robot's next position will be. + FutureRegion(0) = Int(RobotPos(a, 0) / 32) + FutureRegion(1) = Int((RobotPos(a, 1) - 5 - (8 * (a + 1))) / 32) + + 'If the robot is going to collide with a solid block or enter a block region with empty space below it, + 'then place the robot directly adjacent to that block and flip the robot's facing direction. + If Map(FutureRegion(0), FutureRegion(1)) >= 1 Or Not Map(FutureRegion(0) + 1, FutureRegion(1)) = 1 Then + RobotPos(a, 1) = (FutureRegion(1) + 1) * 32 + (8 * (a + 1)) + RobotFacing(a) = 0 + + 'Otherwise just move the robot along its path. + Else + RobotPos(a, 1) = RobotPos(a, 1) - 2 + End If + + End If + + End If + End If + + 'If the robot is set to face its relative left... + If RobotDir(a) = 2 Then + If RobotFacing(a) = 0 Then + + 'If the robot's animation frame is not 0 then decrement that value by 1 (moving it closer to 0). + If RobotAnim(a) > 0 Then + RobotAnim(a) = RobotAnim(a) - 1 + RobotAnimLoaded = False + + 'Otherwise... + Else + + 'Determine where the robot's next position will be. + FutureRegion(0) = Int((RobotPos(a, 0) - 5 - (8 * (a + 1))) / 32) + FutureRegion(1) = Int(RobotPos(a, 1) / 32) + + 'If the robot is going to collide with a solid block or enter a block region with empty space below it, + 'then place the robot directly adjacent to that block and flip the robot's facing direction. + If Map(FutureRegion(0), FutureRegion(1)) = 1 Or Not Map(FutureRegion(0), FutureRegion(1) + 1) = 1 Then + RobotPos(a, 0) = (FutureRegion(0) + 1) * 32 + (8 * (a + 1)) + RobotFacing(a) = 1 + + 'Otherwise just move the robot along its path. + Else + RobotPos(a, 0) = RobotPos(a, 0) - 2 + End If + + End If + + 'If it's set to face its relative right... + Else + + 'If the robot's animation frame is not 3 then increment that value by 1 (moving it closer to 3). + If RobotAnim(a) < 3 Then + RobotAnim(a) = RobotAnim(a) + 1 + RobotAnimLoaded = False + + 'Otherwise... + Else + + 'Determine where the robot's next position will be. + FutureRegion(0) = Int((RobotPos(a, 0) + 5 + (8 * (a + 1))) / 32) + FutureRegion(1) = Int(RobotPos(a, 1) / 32) + + 'If the robot is going to collide with a solid block or enter a block region with empty space below it, + 'then place the robot directly adjacent to that block and flip the robot's facing direction. + If Map(FutureRegion(0), FutureRegion(1)) = 1 Or Not Map(FutureRegion(0), FutureRegion(1) + 1) = 1 Then + RobotPos(a, 0) = (FutureRegion(0)) * 32 - (8 * (a + 1)) + RobotFacing(a) = 0 + + 'Otherwise just move the robot along its path. + Else + RobotPos(a, 0) = RobotPos(a, 0) + 2 + End If + + End If + + End If + End If + + 'If the robot is set to face its relative left... + If RobotDir(a) = 3 Then + If RobotFacing(a) = 0 Then + + 'If the robot's animation frame is not 0 then decrement that value by 1 (moving it closer to 0). + If RobotAnim(a) > 0 Then + RobotAnim(a) = RobotAnim(a) - 1 + RobotAnimLoaded = False + + 'Otherwise... + Else + + 'Determine where the robot's next position will be. + FutureRegion(0) = Int(RobotPos(a, 0) / 32) + FutureRegion(1) = Int((RobotPos(a, 1) - 5 - (8 * (a + 1))) / 32) + + 'If the robot is going to collide with a solid block or enter a block region with empty space below it, + 'then place the robot directly adjacent to that block and flip the robot's facing direction. + If Map(FutureRegion(0), FutureRegion(1)) = 1 Or Not Map(FutureRegion(0) - 1, FutureRegion(1)) = 1 Then + RobotPos(a, 1) = (FutureRegion(1) + 1) * 32 + (8 * (a + 1)) + RobotFacing(a) = 1 + + 'Otherwise just move the robot along its path. + Else + RobotPos(a, 1) = RobotPos(a, 1) - 2 + End If + + End If + + 'If it's set to face its relative right... + Else + + 'If the robot's animation frame is not 3 then increment that value by 1 (moving it closer to 3). + If RobotAnim(a) < 3 Then + RobotAnim(a) = RobotAnim(a) + 1 + RobotAnimLoaded = False + + 'Otherwise... + Else + + 'Determine where the robot's next position will be. + FutureRegion(0) = Int(RobotPos(a, 0) / 32) + FutureRegion(1) = Int((RobotPos(a, 1) + 5 + (8 * (a + 1))) / 32) + + 'If the robot is going to collide with a solid block or enter a block region with empty space below it, + 'then place the robot directly adjacent to that block and flip the robot's facing direction. + If Map(FutureRegion(0), FutureRegion(1)) = 1 Or Not Map(FutureRegion(0) - 1, FutureRegion(1)) = 1 Then + RobotPos(a, 1) = FutureRegion(1) * 32 - (8 * (a + 1)) + RobotFacing(a) = 0 + + 'Otherwise just move the robot along its path. + Else + RobotPos(a, 1) = RobotPos(a, 1) + 2 + End If + + End If + + End If + End If + + 'If the current animation frame has not been loaded yet, do so. + If RobotAnimLoaded = False Then + frmGravity.imgRobot(a).Picture = LoadPicture(RobotWalk(a, RobotDir(a), RobotAnim(a))) + RobotAnimLoaded = True + End If + Next a +End Sub + +Public Sub CheckRobotContact() + For a = 0 To 1 + 'If the difference between the player's position and that of the robot is equal to their half-widths combined and + 'half-heights combined, then shock the player. + If Abs(PlayerPos(0) - RobotPos(a, 0)) <= frmGravity.imgPlayer.Width / 2 + frmGravity.imgRobot(a).Width / 2 Then + If Abs(PlayerPos(1) - RobotPos(a, 1)) <= frmGravity.imgPlayer.Height / 2 + frmGravity.imgRobot(a).Height / 2 Then + Call PlayerStates.ShockPlayer + End If + End If + Next a +End Sub diff --git a/Scores.txt b/Scores.txt new file mode 100755 index 0000000..f6b4938 --- /dev/null +++ b/Scores.txt @@ -0,0 +1,5 @@ +"DJB",0,54,45 +"JJH",0,58,40 +"JJH",0,59,30 +"DJB",1,4,20 +"JJH",1,5,95 diff --git a/Sprites/BMPs/Bot_1_0_0.bmp b/Sprites/BMPs/Bot_1_0_0.bmp new file mode 100755 index 0000000..39d028b Binary files /dev/null and b/Sprites/BMPs/Bot_1_0_0.bmp differ diff --git a/Sprites/BMPs/Bot_1_0_1.bmp b/Sprites/BMPs/Bot_1_0_1.bmp new file mode 100755 index 0000000..ea0d934 Binary files /dev/null and b/Sprites/BMPs/Bot_1_0_1.bmp differ diff --git a/Sprites/BMPs/Bot_1_0_2.bmp b/Sprites/BMPs/Bot_1_0_2.bmp new file mode 100755 index 0000000..67a7cc5 Binary files /dev/null and b/Sprites/BMPs/Bot_1_0_2.bmp differ diff --git a/Sprites/BMPs/Bot_1_0_3.bmp b/Sprites/BMPs/Bot_1_0_3.bmp new file mode 100755 index 0000000..32aab4c Binary files /dev/null and b/Sprites/BMPs/Bot_1_0_3.bmp differ diff --git a/Sprites/BMPs/Bot_1_1_0.bmp b/Sprites/BMPs/Bot_1_1_0.bmp new file mode 100755 index 0000000..2f1375f Binary files /dev/null and b/Sprites/BMPs/Bot_1_1_0.bmp differ diff --git a/Sprites/BMPs/Bot_1_1_1.bmp b/Sprites/BMPs/Bot_1_1_1.bmp new file mode 100755 index 0000000..1eec940 Binary files /dev/null and b/Sprites/BMPs/Bot_1_1_1.bmp differ diff --git a/Sprites/BMPs/Bot_1_1_2.bmp b/Sprites/BMPs/Bot_1_1_2.bmp new file mode 100755 index 0000000..56933d8 Binary files /dev/null and b/Sprites/BMPs/Bot_1_1_2.bmp differ diff --git a/Sprites/BMPs/Bot_1_1_3.bmp b/Sprites/BMPs/Bot_1_1_3.bmp new file mode 100755 index 0000000..3ad5aa8 Binary files /dev/null and b/Sprites/BMPs/Bot_1_1_3.bmp differ diff --git a/Sprites/BMPs/Bot_1_2_0.bmp b/Sprites/BMPs/Bot_1_2_0.bmp new file mode 100755 index 0000000..ff870a3 Binary files /dev/null and b/Sprites/BMPs/Bot_1_2_0.bmp differ diff --git a/Sprites/BMPs/Bot_1_2_1.bmp b/Sprites/BMPs/Bot_1_2_1.bmp new file mode 100755 index 0000000..0d63470 Binary files /dev/null and b/Sprites/BMPs/Bot_1_2_1.bmp differ diff --git a/Sprites/BMPs/Bot_1_2_2.bmp b/Sprites/BMPs/Bot_1_2_2.bmp new file mode 100755 index 0000000..7e75454 Binary files /dev/null and b/Sprites/BMPs/Bot_1_2_2.bmp differ diff --git a/Sprites/BMPs/Bot_1_2_3.bmp b/Sprites/BMPs/Bot_1_2_3.bmp new file mode 100755 index 0000000..66ba580 Binary files /dev/null and b/Sprites/BMPs/Bot_1_2_3.bmp differ diff --git a/Sprites/BMPs/Bot_1_3_0.bmp b/Sprites/BMPs/Bot_1_3_0.bmp new file mode 100755 index 0000000..85ced93 Binary files /dev/null and b/Sprites/BMPs/Bot_1_3_0.bmp differ diff --git a/Sprites/BMPs/Bot_1_3_1.bmp b/Sprites/BMPs/Bot_1_3_1.bmp new file mode 100755 index 0000000..3ca5aca Binary files /dev/null and b/Sprites/BMPs/Bot_1_3_1.bmp differ diff --git a/Sprites/BMPs/Bot_1_3_2.bmp b/Sprites/BMPs/Bot_1_3_2.bmp new file mode 100755 index 0000000..302dcdc Binary files /dev/null and b/Sprites/BMPs/Bot_1_3_2.bmp differ diff --git a/Sprites/BMPs/Bot_1_3_3.bmp b/Sprites/BMPs/Bot_1_3_3.bmp new file mode 100755 index 0000000..9feb6fd Binary files /dev/null and b/Sprites/BMPs/Bot_1_3_3.bmp differ diff --git a/Sprites/BMPs/Bot_2_0_0.bmp b/Sprites/BMPs/Bot_2_0_0.bmp new file mode 100755 index 0000000..0491b4b Binary files /dev/null and b/Sprites/BMPs/Bot_2_0_0.bmp differ diff --git a/Sprites/BMPs/Bot_2_0_1.bmp b/Sprites/BMPs/Bot_2_0_1.bmp new file mode 100755 index 0000000..a1be3dd Binary files /dev/null and b/Sprites/BMPs/Bot_2_0_1.bmp differ diff --git a/Sprites/BMPs/Bot_2_0_2.bmp b/Sprites/BMPs/Bot_2_0_2.bmp new file mode 100755 index 0000000..7b01517 Binary files /dev/null and b/Sprites/BMPs/Bot_2_0_2.bmp differ diff --git a/Sprites/BMPs/Bot_2_0_3.bmp b/Sprites/BMPs/Bot_2_0_3.bmp new file mode 100755 index 0000000..63aa966 Binary files /dev/null and b/Sprites/BMPs/Bot_2_0_3.bmp differ diff --git a/Sprites/BMPs/Bot_2_1_0.bmp b/Sprites/BMPs/Bot_2_1_0.bmp new file mode 100755 index 0000000..1b04d8e Binary files /dev/null and b/Sprites/BMPs/Bot_2_1_0.bmp differ diff --git a/Sprites/BMPs/Bot_2_1_1.bmp b/Sprites/BMPs/Bot_2_1_1.bmp new file mode 100755 index 0000000..f988d37 Binary files /dev/null and b/Sprites/BMPs/Bot_2_1_1.bmp differ diff --git a/Sprites/BMPs/Bot_2_1_2.bmp b/Sprites/BMPs/Bot_2_1_2.bmp new file mode 100755 index 0000000..f8b504e Binary files /dev/null and b/Sprites/BMPs/Bot_2_1_2.bmp differ diff --git a/Sprites/BMPs/Bot_2_1_3.bmp b/Sprites/BMPs/Bot_2_1_3.bmp new file mode 100755 index 0000000..4b1208f Binary files /dev/null and b/Sprites/BMPs/Bot_2_1_3.bmp differ diff --git a/Sprites/BMPs/Bot_2_2_0.bmp b/Sprites/BMPs/Bot_2_2_0.bmp new file mode 100755 index 0000000..22253c8 Binary files /dev/null and b/Sprites/BMPs/Bot_2_2_0.bmp differ diff --git a/Sprites/BMPs/Bot_2_2_1.bmp b/Sprites/BMPs/Bot_2_2_1.bmp new file mode 100755 index 0000000..5de4ec4 Binary files /dev/null and b/Sprites/BMPs/Bot_2_2_1.bmp differ diff --git a/Sprites/BMPs/Bot_2_2_2.bmp b/Sprites/BMPs/Bot_2_2_2.bmp new file mode 100755 index 0000000..4506a45 Binary files /dev/null and b/Sprites/BMPs/Bot_2_2_2.bmp differ diff --git a/Sprites/BMPs/Bot_2_2_3.bmp b/Sprites/BMPs/Bot_2_2_3.bmp new file mode 100755 index 0000000..62891ff Binary files /dev/null and b/Sprites/BMPs/Bot_2_2_3.bmp differ diff --git a/Sprites/BMPs/Bot_2_3_0.bmp b/Sprites/BMPs/Bot_2_3_0.bmp new file mode 100755 index 0000000..b98360a Binary files /dev/null and b/Sprites/BMPs/Bot_2_3_0.bmp differ diff --git a/Sprites/BMPs/Bot_2_3_1.bmp b/Sprites/BMPs/Bot_2_3_1.bmp new file mode 100755 index 0000000..8b1679e Binary files /dev/null and b/Sprites/BMPs/Bot_2_3_1.bmp differ diff --git a/Sprites/BMPs/Bot_2_3_2.bmp b/Sprites/BMPs/Bot_2_3_2.bmp new file mode 100755 index 0000000..5c4cd1b Binary files /dev/null and b/Sprites/BMPs/Bot_2_3_2.bmp differ diff --git a/Sprites/BMPs/Bot_2_3_3.bmp b/Sprites/BMPs/Bot_2_3_3.bmp new file mode 100755 index 0000000..ddb680a Binary files /dev/null and b/Sprites/BMPs/Bot_2_3_3.bmp differ diff --git a/Sprites/BMPs/Character_Dazed_0_0.bmp b/Sprites/BMPs/Character_Dazed_0_0.bmp new file mode 100755 index 0000000..b1ce642 Binary files /dev/null and b/Sprites/BMPs/Character_Dazed_0_0.bmp differ diff --git a/Sprites/BMPs/Character_Dazed_0_1.bmp b/Sprites/BMPs/Character_Dazed_0_1.bmp new file mode 100755 index 0000000..eec5b1f Binary files /dev/null and b/Sprites/BMPs/Character_Dazed_0_1.bmp differ diff --git a/Sprites/BMPs/Character_Dazed_1_0.bmp b/Sprites/BMPs/Character_Dazed_1_0.bmp new file mode 100755 index 0000000..d1f4c6b Binary files /dev/null and b/Sprites/BMPs/Character_Dazed_1_0.bmp differ diff --git a/Sprites/BMPs/Character_Dazed_1_1.bmp b/Sprites/BMPs/Character_Dazed_1_1.bmp new file mode 100755 index 0000000..dc0a4e8 Binary files /dev/null and b/Sprites/BMPs/Character_Dazed_1_1.bmp differ diff --git a/Sprites/BMPs/Character_Dazed_2_0.bmp b/Sprites/BMPs/Character_Dazed_2_0.bmp new file mode 100755 index 0000000..185be1a Binary files /dev/null and b/Sprites/BMPs/Character_Dazed_2_0.bmp differ diff --git a/Sprites/BMPs/Character_Dazed_2_1.bmp b/Sprites/BMPs/Character_Dazed_2_1.bmp new file mode 100755 index 0000000..4fd5fc4 Binary files /dev/null and b/Sprites/BMPs/Character_Dazed_2_1.bmp differ diff --git a/Sprites/BMPs/Character_Dazed_3_0.bmp b/Sprites/BMPs/Character_Dazed_3_0.bmp new file mode 100755 index 0000000..1e60507 Binary files /dev/null and b/Sprites/BMPs/Character_Dazed_3_0.bmp differ diff --git a/Sprites/BMPs/Character_Dazed_3_1.bmp b/Sprites/BMPs/Character_Dazed_3_1.bmp new file mode 100755 index 0000000..c7d3257 Binary files /dev/null and b/Sprites/BMPs/Character_Dazed_3_1.bmp differ diff --git a/Sprites/BMPs/Character_Idle_0.bmp b/Sprites/BMPs/Character_Idle_0.bmp new file mode 100755 index 0000000..dc27b90 Binary files /dev/null and b/Sprites/BMPs/Character_Idle_0.bmp differ diff --git a/Sprites/BMPs/Character_Idle_1.bmp b/Sprites/BMPs/Character_Idle_1.bmp new file mode 100755 index 0000000..49c05b3 Binary files /dev/null and b/Sprites/BMPs/Character_Idle_1.bmp differ diff --git a/Sprites/BMPs/Character_Idle_2.bmp b/Sprites/BMPs/Character_Idle_2.bmp new file mode 100755 index 0000000..c875195 Binary files /dev/null and b/Sprites/BMPs/Character_Idle_2.bmp differ diff --git a/Sprites/BMPs/Character_Idle_3.bmp b/Sprites/BMPs/Character_Idle_3.bmp new file mode 100755 index 0000000..5f9d87f Binary files /dev/null and b/Sprites/BMPs/Character_Idle_3.bmp differ diff --git a/Sprites/BMPs/Character_Shock_0_0.bmp b/Sprites/BMPs/Character_Shock_0_0.bmp new file mode 100755 index 0000000..dd2f820 Binary files /dev/null and b/Sprites/BMPs/Character_Shock_0_0.bmp differ diff --git a/Sprites/BMPs/Character_Shock_0_1.bmp b/Sprites/BMPs/Character_Shock_0_1.bmp new file mode 100755 index 0000000..3c319f4 Binary files /dev/null and b/Sprites/BMPs/Character_Shock_0_1.bmp differ diff --git a/Sprites/BMPs/Character_Shock_1_0.bmp b/Sprites/BMPs/Character_Shock_1_0.bmp new file mode 100755 index 0000000..8acf2cb Binary files /dev/null and b/Sprites/BMPs/Character_Shock_1_0.bmp differ diff --git a/Sprites/BMPs/Character_Shock_1_1.bmp b/Sprites/BMPs/Character_Shock_1_1.bmp new file mode 100755 index 0000000..ed86ad4 Binary files /dev/null and b/Sprites/BMPs/Character_Shock_1_1.bmp differ diff --git a/Sprites/BMPs/Character_Shock_2_0.bmp b/Sprites/BMPs/Character_Shock_2_0.bmp new file mode 100755 index 0000000..341e951 Binary files /dev/null and b/Sprites/BMPs/Character_Shock_2_0.bmp differ diff --git a/Sprites/BMPs/Character_Shock_2_1.bmp b/Sprites/BMPs/Character_Shock_2_1.bmp new file mode 100755 index 0000000..936f33e Binary files /dev/null and b/Sprites/BMPs/Character_Shock_2_1.bmp differ diff --git a/Sprites/BMPs/Character_Shock_3_0.bmp b/Sprites/BMPs/Character_Shock_3_0.bmp new file mode 100755 index 0000000..8a85deb Binary files /dev/null and b/Sprites/BMPs/Character_Shock_3_0.bmp differ diff --git a/Sprites/BMPs/Character_Shock_3_1.bmp b/Sprites/BMPs/Character_Shock_3_1.bmp new file mode 100755 index 0000000..4914569 Binary files /dev/null and b/Sprites/BMPs/Character_Shock_3_1.bmp differ diff --git a/Sprites/BMPs/Character_Walk_0_0.bmp b/Sprites/BMPs/Character_Walk_0_0.bmp new file mode 100755 index 0000000..435c309 Binary files /dev/null and b/Sprites/BMPs/Character_Walk_0_0.bmp differ diff --git a/Sprites/BMPs/Character_Walk_0_1.bmp b/Sprites/BMPs/Character_Walk_0_1.bmp new file mode 100755 index 0000000..28cf368 Binary files /dev/null and b/Sprites/BMPs/Character_Walk_0_1.bmp differ diff --git a/Sprites/BMPs/Character_Walk_0_2.bmp b/Sprites/BMPs/Character_Walk_0_2.bmp new file mode 100755 index 0000000..cbb02c5 Binary files /dev/null and b/Sprites/BMPs/Character_Walk_0_2.bmp differ diff --git a/Sprites/BMPs/Character_Walk_1_0.bmp b/Sprites/BMPs/Character_Walk_1_0.bmp new file mode 100755 index 0000000..cf027f6 Binary files /dev/null and b/Sprites/BMPs/Character_Walk_1_0.bmp differ diff --git a/Sprites/BMPs/Character_Walk_1_1.bmp b/Sprites/BMPs/Character_Walk_1_1.bmp new file mode 100755 index 0000000..42623f3 Binary files /dev/null and b/Sprites/BMPs/Character_Walk_1_1.bmp differ diff --git a/Sprites/BMPs/Character_Walk_1_2.bmp b/Sprites/BMPs/Character_Walk_1_2.bmp new file mode 100755 index 0000000..57f42dd Binary files /dev/null and b/Sprites/BMPs/Character_Walk_1_2.bmp differ diff --git a/Sprites/BMPs/Character_Walk_2_0.bmp b/Sprites/BMPs/Character_Walk_2_0.bmp new file mode 100755 index 0000000..43ea28a Binary files /dev/null and b/Sprites/BMPs/Character_Walk_2_0.bmp differ diff --git a/Sprites/BMPs/Character_Walk_2_1.bmp b/Sprites/BMPs/Character_Walk_2_1.bmp new file mode 100755 index 0000000..6b615e3 Binary files /dev/null and b/Sprites/BMPs/Character_Walk_2_1.bmp differ diff --git a/Sprites/BMPs/Character_Walk_2_2.bmp b/Sprites/BMPs/Character_Walk_2_2.bmp new file mode 100755 index 0000000..ad01ff2 Binary files /dev/null and b/Sprites/BMPs/Character_Walk_2_2.bmp differ diff --git a/Sprites/BMPs/Character_Walk_3_0.bmp b/Sprites/BMPs/Character_Walk_3_0.bmp new file mode 100755 index 0000000..51afac4 Binary files /dev/null and b/Sprites/BMPs/Character_Walk_3_0.bmp differ diff --git a/Sprites/BMPs/Character_Walk_3_1.bmp b/Sprites/BMPs/Character_Walk_3_1.bmp new file mode 100755 index 0000000..9746c9d Binary files /dev/null and b/Sprites/BMPs/Character_Walk_3_1.bmp differ diff --git a/Sprites/BMPs/Character_Walk_3_2.bmp b/Sprites/BMPs/Character_Walk_3_2.bmp new file mode 100755 index 0000000..fd9b60e Binary files /dev/null and b/Sprites/BMPs/Character_Walk_3_2.bmp differ diff --git a/Sprites/XCFs/Bot1.xcf b/Sprites/XCFs/Bot1.xcf new file mode 100755 index 0000000..7d21897 Binary files /dev/null and b/Sprites/XCFs/Bot1.xcf differ diff --git a/Sprites/XCFs/Bot2.xcf b/Sprites/XCFs/Bot2.xcf new file mode 100755 index 0000000..969b5c0 Binary files /dev/null and b/Sprites/XCFs/Bot2.xcf differ diff --git a/Sprites/XCFs/Character.xcf b/Sprites/XCFs/Character.xcf new file mode 100755 index 0000000..63a68ae Binary files /dev/null and b/Sprites/XCFs/Character.xcf differ diff --git a/Sprites/XCFs/Tile.xcf b/Sprites/XCFs/Tile.xcf new file mode 100755 index 0000000..34da5b3 Binary files /dev/null and b/Sprites/XCFs/Tile.xcf differ diff --git a/Tiles/BMPs/Tile_0.bmp b/Tiles/BMPs/Tile_0.bmp new file mode 100755 index 0000000..bfff47d Binary files /dev/null and b/Tiles/BMPs/Tile_0.bmp differ diff --git a/Tiles/BMPs/Tile_1.bmp b/Tiles/BMPs/Tile_1.bmp new file mode 100755 index 0000000..b339435 Binary files /dev/null and b/Tiles/BMPs/Tile_1.bmp differ diff --git a/Tiles/BMPs/Tile_10.bmp b/Tiles/BMPs/Tile_10.bmp new file mode 100755 index 0000000..0565fdf Binary files /dev/null and b/Tiles/BMPs/Tile_10.bmp differ diff --git a/Tiles/BMPs/Tile_11.bmp b/Tiles/BMPs/Tile_11.bmp new file mode 100755 index 0000000..1bb3923 Binary files /dev/null and b/Tiles/BMPs/Tile_11.bmp differ diff --git a/Tiles/BMPs/Tile_12.bmp b/Tiles/BMPs/Tile_12.bmp new file mode 100755 index 0000000..d943928 Binary files /dev/null and b/Tiles/BMPs/Tile_12.bmp differ diff --git a/Tiles/BMPs/Tile_13.bmp b/Tiles/BMPs/Tile_13.bmp new file mode 100755 index 0000000..97727c3 Binary files /dev/null and b/Tiles/BMPs/Tile_13.bmp differ diff --git a/Tiles/BMPs/Tile_14.bmp b/Tiles/BMPs/Tile_14.bmp new file mode 100755 index 0000000..656b423 Binary files /dev/null and b/Tiles/BMPs/Tile_14.bmp differ diff --git a/Tiles/BMPs/Tile_15.bmp b/Tiles/BMPs/Tile_15.bmp new file mode 100755 index 0000000..de259a5 Binary files /dev/null and b/Tiles/BMPs/Tile_15.bmp differ diff --git a/Tiles/BMPs/Tile_2.bmp b/Tiles/BMPs/Tile_2.bmp new file mode 100755 index 0000000..2862006 Binary files /dev/null and b/Tiles/BMPs/Tile_2.bmp differ diff --git a/Tiles/BMPs/Tile_3.bmp b/Tiles/BMPs/Tile_3.bmp new file mode 100755 index 0000000..074a885 Binary files /dev/null and b/Tiles/BMPs/Tile_3.bmp differ diff --git a/Tiles/BMPs/Tile_4.bmp b/Tiles/BMPs/Tile_4.bmp new file mode 100755 index 0000000..e92cbe4 Binary files /dev/null and b/Tiles/BMPs/Tile_4.bmp differ diff --git a/Tiles/BMPs/Tile_5.bmp b/Tiles/BMPs/Tile_5.bmp new file mode 100755 index 0000000..b700087 Binary files /dev/null and b/Tiles/BMPs/Tile_5.bmp differ diff --git a/Tiles/BMPs/Tile_6.bmp b/Tiles/BMPs/Tile_6.bmp new file mode 100755 index 0000000..1893251 Binary files /dev/null and b/Tiles/BMPs/Tile_6.bmp differ diff --git a/Tiles/BMPs/Tile_7.bmp b/Tiles/BMPs/Tile_7.bmp new file mode 100755 index 0000000..c07b0a2 Binary files /dev/null and b/Tiles/BMPs/Tile_7.bmp differ diff --git a/Tiles/BMPs/Tile_8.bmp b/Tiles/BMPs/Tile_8.bmp new file mode 100755 index 0000000..7a61c89 Binary files /dev/null and b/Tiles/BMPs/Tile_8.bmp differ diff --git a/Tiles/BMPs/Tile_9.bmp b/Tiles/BMPs/Tile_9.bmp new file mode 100755 index 0000000..ff73ac6 Binary files /dev/null and b/Tiles/BMPs/Tile_9.bmp differ diff --git a/Tiles/BMPs/Tile_Finish.bmp b/Tiles/BMPs/Tile_Finish.bmp new file mode 100755 index 0000000..55f9a8c Binary files /dev/null and b/Tiles/BMPs/Tile_Finish.bmp differ diff --git a/Tiles/BMPs/Tile_Shock.bmp b/Tiles/BMPs/Tile_Shock.bmp new file mode 100755 index 0000000..fdd281f Binary files /dev/null and b/Tiles/BMPs/Tile_Shock.bmp differ diff --git a/Tiles/BMPs/Tile_Start.bmp b/Tiles/BMPs/Tile_Start.bmp new file mode 100755 index 0000000..3a968c9 Binary files /dev/null and b/Tiles/BMPs/Tile_Start.bmp differ diff --git a/Turvy.exe b/Turvy.exe new file mode 100755 index 0000000..712ebf9 Binary files /dev/null and b/Turvy.exe differ diff --git a/frmDebug.frm b/frmDebug.frm new file mode 100755 index 0000000..d006d85 --- /dev/null +++ b/frmDebug.frm @@ -0,0 +1,24 @@ +VERSION 5.00 +Begin VB.Form frmDebug + Caption = "Debug" + ClientHeight = 6000 + ClientLeft = 14835 + ClientTop = 1725 + ClientWidth = 4500 + LinkTopic = "Form1" + ScaleHeight = 400 + ScaleMode = 3 'Pixel + ScaleWidth = 300 + Begin VB.Label lblDebug + Height = 5850 + Left = 75 + TabIndex = 0 + Top = 75 + Width = 4350 + End +End +Attribute VB_Name = "frmDebug" +Attribute VB_GlobalNameSpace = False +Attribute VB_Creatable = False +Attribute VB_PredeclaredId = True +Attribute VB_Exposed = False diff --git a/frmGravity.frm b/frmGravity.frm new file mode 100755 index 0000000..3717102 --- /dev/null +++ b/frmGravity.frm @@ -0,0 +1,3562 @@ +VERSION 5.00 +Begin VB.Form frmGravity + BackColor = &H00FFFFFF& + BorderStyle = 1 'Fixed Single + Caption = "Turvy" + ClientHeight = 9000 + ClientLeft = 1350 + ClientTop = 1650 + ClientWidth = 12000 + KeyPreview = -1 'True + LinkTopic = "Form1" + MaxButton = 0 'False + MinButton = 0 'False + ScaleHeight = 600 + ScaleMode = 3 'Pixel + ScaleWidth = 800 + Begin VB.TextBox txtPlayerName + Alignment = 2 'Center + BeginProperty Font + Name = "Courier New" + Size = 8.25 + Charset = 0 + Weight = 400 + Underline = 0 'False + Italic = 0 'False + Strikethrough = 0 'False + EndProperty + Height = 375 + Left = 5700 + MaxLength = 3 + TabIndex = 8 + Top = 6825 + Width = 600 + End + Begin VB.PictureBox picScores + Appearance = 0 'Flat + BackColor = &H80000005& + BeginProperty Font + Name = "Courier New" + Size = 8.25 + Charset = 0 + Weight = 400 + Underline = 0 'False + Italic = 0 'False + Strikethrough = 0 'False + EndProperty + ForeColor = &H80000008& + Height = 1500 + Left = 3000 + ScaleHeight = 1470 + ScaleWidth = 5970 + TabIndex = 7 + Top = 3000 + Visible = 0 'False + Width = 6000 + End + Begin VB.CommandButton cmdTopScores + Caption = "Top Scores" + Height = 450 + Left = 6000 + TabIndex = 6 + Top = 7725 + Width = 1500 + End + Begin VB.PictureBox picHelp + Appearance = 0 'Flat + BackColor = &H80000005& + BeginProperty Font + Name = "Courier New" + Size = 8.25 + Charset = 0 + Weight = 400 + Underline = 0 'False + Italic = 0 'False + Strikethrough = 0 'False + EndProperty + ForeColor = &H80000008& + Height = 6600 + Left = 3000 + ScaleHeight = 6570 + ScaleWidth = 5970 + TabIndex = 5 + Top = 150 + Visible = 0 'False + Width = 6000 + End + Begin VB.CommandButton cmdHelp + Caption = "How to Play" + Height = 450 + Left = 4500 + TabIndex = 4 + Top = 7725 + Width = 1500 + End + Begin VB.CommandButton cmdStart + Caption = "Start" + Height = 450 + Left = 4500 + TabIndex = 3 + Top = 7200 + Width = 3000 + End + Begin VB.Timer tmrTimer + Enabled = 0 'False + Left = 11520 + Top = 8520 + End + Begin VB.Image imgRobot + Height = 480 + Index = 1 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRobot + Height = 480 + Index = 0 + Left = 480 + Top = 8520 + Width = 480 + End + Begin VB.Label lblTimer + Alignment = 2 'Center + Caption = "Timer: 00:00:00" + Height = 360 + Left = 9120 + TabIndex = 2 + Top = 8640 + Width = 2880 + End + Begin VB.Label lblLevelName + Alignment = 2 'Center + Height = 360 + Left = 2880 + TabIndex = 1 + Top = 8640 + Width = 6240 + End + Begin VB.Image imgPlayer + Height = 480 + Left = 0 + Top = 8520 + Width = 480 + End + Begin VB.Label lblRetries + Alignment = 2 'Center + Caption = "Retries: ?" + Height = 360 + Left = 0 + TabIndex = 0 + Top = 8640 + Width = 2880 + End + Begin VB.Image imgRegion + Height = 480 + Index = 449 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 448 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 447 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 446 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 445 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 444 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 443 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 442 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 441 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 440 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 439 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 438 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 437 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 436 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 435 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 434 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 433 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 432 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 431 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 430 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 429 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 428 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 427 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 426 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 425 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 424 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 423 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 422 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 421 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 420 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 419 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 418 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 417 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 416 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 415 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 414 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 413 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 412 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 411 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 410 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 409 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 408 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 407 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 406 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 405 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 404 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 403 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 402 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 401 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 400 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 399 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 398 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 397 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 396 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 395 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 394 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 393 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 392 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 391 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 390 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 389 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 388 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 387 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 386 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 385 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 384 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 383 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 382 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 381 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 380 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 379 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 378 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 377 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 376 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 375 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 374 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 373 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 372 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 371 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 370 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 369 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 368 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 367 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 366 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 365 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 364 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 363 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 362 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 361 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 360 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 359 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 358 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 357 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 356 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 355 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 354 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 353 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 352 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 351 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 350 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 349 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 348 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 347 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 346 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 345 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 344 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 343 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 342 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 341 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 340 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 339 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 338 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 337 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 336 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 335 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 334 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 333 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 332 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 331 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 330 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 329 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 328 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 327 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 326 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 325 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 324 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 323 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 322 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 321 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 320 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 319 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 318 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 317 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 316 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 315 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 314 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 313 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 312 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 311 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 310 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 309 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 308 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 307 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 306 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 305 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 304 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 303 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 302 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 301 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 300 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 299 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 298 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 297 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 296 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 295 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 294 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 293 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 292 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 291 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 290 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 289 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 288 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 287 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 286 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 285 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 284 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 283 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 282 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 281 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 280 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 279 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 278 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 277 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 276 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 275 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 274 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 273 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 272 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 271 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 270 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 269 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 268 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 267 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 266 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 265 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 264 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 263 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 262 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 261 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 260 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 259 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 258 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 257 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 256 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 255 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 254 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 253 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 252 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 251 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 250 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 249 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 248 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 247 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 246 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 245 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 244 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 243 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 242 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 241 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 240 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 239 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 238 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 237 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 236 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 235 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 234 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 233 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 232 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 231 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 230 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 229 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 228 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 227 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 226 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 225 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 224 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 223 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 222 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 221 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 220 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 219 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 218 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 217 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 216 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 215 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 214 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 213 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 212 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 211 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 210 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 209 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 208 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 207 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 206 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 205 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 204 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 203 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 202 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 201 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 200 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 199 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 198 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 197 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 196 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 195 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 194 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 193 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 192 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 191 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 190 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 189 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 188 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 187 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 186 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 185 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 184 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 183 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 182 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 181 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 180 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 179 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 178 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 177 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 176 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 175 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 174 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 173 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 172 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 171 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 170 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 169 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 168 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 167 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 166 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 165 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 164 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 163 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 162 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 161 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 160 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 159 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 158 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 157 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 156 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 155 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 154 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 153 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 152 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 151 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 150 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 149 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 148 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 147 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 146 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 145 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 144 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 143 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 142 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 141 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 140 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 139 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 138 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 137 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 136 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 135 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 134 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 133 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 132 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 131 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 130 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 129 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 128 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 127 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 126 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 125 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 124 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 123 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 122 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 121 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 120 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 119 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 118 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 117 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 116 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 115 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 114 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 113 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 112 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 111 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 110 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 109 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 108 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 107 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 106 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 105 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 104 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 103 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 102 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 101 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 100 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 99 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 98 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 97 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 96 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 95 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 94 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 93 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 92 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 91 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 90 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 89 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 88 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 87 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 86 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 85 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 84 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 83 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 82 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 81 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 80 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 79 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 78 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 77 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 76 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 75 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 74 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 73 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 72 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 71 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 70 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 69 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 68 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 67 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 66 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 65 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 64 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 63 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 62 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 61 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 60 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 59 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 58 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 57 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 56 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 55 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 54 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 53 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 52 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 51 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 50 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 49 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 48 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 47 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 46 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 45 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 44 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 43 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 42 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 41 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 40 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 39 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 38 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 37 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 36 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 35 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 34 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 33 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 32 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 31 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 30 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 29 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 28 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 27 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 26 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 25 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 24 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 23 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 22 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 21 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 20 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 19 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 18 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 17 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 16 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 15 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 14 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 13 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 12 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 11 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 10 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 9 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 8 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 7 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 6 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 5 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 4 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 3 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 2 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 1 + Left = 0 + Top = 0 + Width = 480 + End + Begin VB.Image imgRegion + Height = 480 + Index = 0 + Left = 0 + Top = 0 + Width = 480 + End +End +Attribute VB_Name = "frmGravity" +Attribute VB_GlobalNameSpace = False +Attribute VB_Creatable = False +Attribute VB_PredeclaredId = True +Attribute VB_Exposed = False +Private Sub cmdHelp_Click() + Dim HelpLine As String + If picHelp.Visible = False Then + picScores.Visible = False + picHelp.Visible = True + + picHelp.Cls + + Open "Help.txt" For Input As #1 + Do While Not EOF(1) + Input #1, HelpLine + + picHelp.Print HelpLine + Loop + Close #1 + Else + picHelp.Visible = False + End If +End Sub + +Private Sub cmdStart_Click() + PlayerName = UCase(txtPlayerName.Text) + + If Not PlayerName = "" Then + + 'Sets the timer away and hides all title screen elements. + tmrTimer.Enabled = True + + picHelp.Visible = False + picScores.Visible = False + cmdHelp.Visible = False + cmdTopScores.Visible = False + txtPlayerName.Visible = False + cmdStart.Visible = False + + 'Loads the first level. + Call ResetClock + Call LoadLevel("Lab") + + 'Resets the number of lives and passes it to the retries label. + PlayerRetries = 3 + lblRetries.Caption = "Retries: " & PlayerRetries + + End If +End Sub + +Private Sub cmdTopScores_Click() + Dim TopName As String + Dim TopTime As String + Dim TopMinute, TopSecond, TopMillisecond As Integer + + If picScores.Visible = False Then + picHelp.Visible = False + picScores.Visible = True + picScores.Cls + + picScores.Print "===THE FASTEST TIMES===" + picScores.Print "" + + Open "Scores.txt" For Input As #1 + + Do While Not EOF(1) + Input #1, TopName, TopMinute, TopSecond, TopMillisecond + + TopTime = "" + If TopMinute < 10 Then + TopTime = TopTime & "0" & TopMinute & ":" + Else + TopTime = TopTime & TopMinute & ":" + End If + + If TopSecond < 10 Then + TopTime = TopTime & "0" & TopSecond & ":" + Else + TopTime = TopTime & TopSecond & ":" + End If + + If TopMillisecond < 10 Then + TopTime = TopTime & "0" & TopMillisecond + Else + TopTime = TopTime & TopMillisecond + End If + + picScores.Print TopName, TopTime + Loop + + Close #1 + Else + picScores.Visible = False + End If +End Sub + +Private Sub Form_Load() + 'frmDebug.Show + + 'Stores the necessary file names for each Character's Animation. + For GravDir = 0 To 3 + 'Player's idle stance. + PlayerIdle(GravDir) = "Sprites/Character_Idle_" & GravDir & ".gif" + + 'Player's walking animation. + For PlayerWalkFrame = 0 To 5 + PlayerWalk(GravDir, PlayerWalkFrame) = "Sprites/Character_Walk_" & GravDir & "_" & PlayerWalkFrame & ".gif" + Next PlayerWalkFrame + + 'Player's other animations. + For PlayerOtherFrame = 0 To 1 + PlayerShock(GravDir, PlayerOtherFrame) = "Sprites/Character_Shock_" & GravDir & "_" & PlayerOtherFrame & ".gif" + PlayerDazed(GravDir, PlayerOtherFrame) = "Sprites/Character_Dazed_" & GravDir & "_" & PlayerOtherFrame & ".gif" + Next PlayerOtherFrame + + 'Robot animations. + For RobotFrame = 0 To 3 + For Robot = 0 To 1 + RobotWalk(Robot, GravDir, RobotFrame) = "Sprites/Bot_" & Robot & "_" & GravDir & "_" & RobotFrame & ".gif" + Next Robot + Next RobotFrame + Next GravDir + + 'Store the file names of the level tile images. + For Tile = 0 To 15 + TileTable(Tile) = "Tiles/Tile_" & Tile & ".gif" + Next Tile + ShockTile = "Tiles/Tile_Shock.gif" + StartTile = "Tiles/Tile_Start.gif" + FinishTile = "Tiles/Tile_Finish.gif" + + 'Set the level number to zero and open the map file with its name corresponding to that number. + Level = 0 + + 'Load the title screen. + Call LoadLevel("Title") + + 'Show the start button and make sure the timer is disabled. + cmdStart.Visible = True + cmdHelp.Visible = True + cmdTopScores.Visible = True + txtPlayerName.Visible = True + tmrTimer.Enabled = False + + 'Set the timer's interval to limit the game to 20 frames per second. + tmrTimer.Interval = 1000 / 20 + +End Sub + +Private Sub tmrTimer_Timer() + + 'If the player's state is normal then... + If PlayerState = 0 Then + + 'Move the player first. + Call MovePlayer + + 'Calculates the player's falling speed. + TickCount = TickCount + 1 + PlayerFallSpeed = IncreaseVelocity(0, 10, TickCount, 0.4) + + 'Limit the player's maximum fall speed. + If PlayerFallSpeed > 30 Then + PlayerFallSpeed = 30 + TickCount = TickCount - 1 + End If + + 'Drop the player (assuming there is no solid ground at their feet) and move the robots. + Call DropPlayer + Call MoveBot + + 'Check to see if any of the robots are in contact with the player. + Call CheckRobotContact + + 'Reposition the player's form object according to the player's new position. + imgPlayer.Left = PlayerPos(0) - imgPlayer.Width / 2 + imgPlayer.Top = PlayerPos(1) - imgPlayer.Height / 2 + + 'Repostition the robots' form objects according to their new positions. + For a = 0 To 1 + imgRobot(a).Left = RobotPos(a, 0) - imgRobot(a).Width / 2 + imgRobot(a).Top = RobotPos(a, 1) - imgRobot(a).Height / 2 + Next a + + Call IncreaseClock + + 'If the player has reached the exit... + ElseIf PlayerState = 1 Then + + 'Increase the success/fail report timer and set the level name label to report the player's success. + ReportTimer = ReportTimer + 1 + lblLevelName.Caption = "Level Complete!" + + 'After a few seconds increase the level number. + If ReportTimer >= 90 Then + Level = Level + 1 + 'If the level number is that of the victory screen (itself a level map), return to the title screen. + If Level >= 100 Then + Call Form_Load + 'If the level number exceeds the last level, then load the victory screen. + ElseIf Level >= 4 Then + Level = 101 + Call LoadLevel("Win") + PlayerStates.WinLevel + Call WriteScore + 'Otherwise just load the next level. + Else + Call LoadLevel("Lab") + End If + End If + + 'If the player failed... + ElseIf PlayerState >= 2 Then + + 'Increase the success/fail report timer. + ReportTimer = ReportTimer + 1 + + 'Animate the player's current state. + PlayerAnim = PlayerAnim + 1 + If PlayerAnim > 1 Then + PlayerAnim = 0 + End If + + 'Set the level name caption and player animation according to whether they have been dazed (from falls) or shocked. + If PlayerState = 2 Then + lblLevelName.Caption = "Oof!" + imgPlayer.Picture = LoadPicture(PlayerDazed(PlayerGravityDir, PlayerAnim)) + Else + lblLevelName.Caption = "Don't tase me, Robro!" + imgPlayer.Picture = LoadPicture(PlayerShock(PlayerGravityDir, PlayerAnim)) + End If + + 'After a few seconds, if the player still has lives, deduct one and reload the level. + 'Otherwise, return to the title screen. The game is over. + If ReportTimer >= 90 Then + If PlayerRetries > 0 Then + PlayerRetries = PlayerRetries - 1 + lblRetries.Caption = "Retries: " & PlayerRetries + Call LoadLevel("Lab") + Else + Call Form_Load + End If + End If + End If + +End Sub + +'Sets the index of KeyIsDown corresponding to a key to True if that key is being pressed. +Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) + KeyIsDown(KeyCode) = True +End Sub + +'Sets the index of KeyIsDown corresponding to a key to False if that key has been released. +Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer) + KeyIsDown(KeyCode) = False +End Sub +