home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 3_2004-2005.ISO / Data / Zips / Stick_Warz1719133112004.psc / frmGame.frm < prev    next >
Text File  |  2004-03-11  |  14KB  |  442 lines

  1. VERSION 5.00
  2. Begin VB.Form frmGame 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "StickWarz 3000"
  5.    ClientHeight    =   4710
  6.    ClientLeft      =   45
  7.    ClientTop       =   330
  8.    ClientWidth     =   5385
  9.    LinkTopic       =   "Form1"
  10.    MaxButton       =   0   'False
  11.    MinButton       =   0   'False
  12.    ScaleHeight     =   314
  13.    ScaleMode       =   3  'Pixel
  14.    ScaleWidth      =   359
  15.    StartUpPosition =   2  'CenterScreen
  16.    Begin VB.PictureBox SM 
  17.       AutoRedraw      =   -1  'True
  18.       AutoSize        =   -1  'True
  19.       BorderStyle     =   0  'None
  20.       Height          =   3840
  21.       Index           =   1
  22.       Left            =   6960
  23.       Picture         =   "frmGame.frx":0000
  24.       ScaleHeight     =   256
  25.       ScaleMode       =   3  'Pixel
  26.       ScaleWidth      =   64
  27.       TabIndex        =   22
  28.       Top             =   4800
  29.       Visible         =   0   'False
  30.       Width           =   960
  31.    End
  32.    Begin VB.PictureBox SS 
  33.       AutoRedraw      =   -1  'True
  34.       AutoSize        =   -1  'True
  35.       BorderStyle     =   0  'None
  36.       Height          =   3840
  37.       Index           =   1
  38.       Left            =   8040
  39.       Picture         =   "frmGame.frx":C042
  40.       ScaleHeight     =   256
  41.       ScaleMode       =   3  'Pixel
  42.       ScaleWidth      =   64
  43.       TabIndex        =   21
  44.       Top             =   4800
  45.       Visible         =   0   'False
  46.       Width           =   960
  47.    End
  48.    Begin VB.PictureBox Frame 
  49.       Appearance      =   0  'Flat
  50.       BackColor       =   &H00E0E0E0&
  51.       ForeColor       =   &H80000008&
  52.       Height          =   4125
  53.       Left            =   120
  54.       ScaleHeight     =   273
  55.       ScaleMode       =   0  'User
  56.       ScaleWidth      =   343.045
  57.       TabIndex        =   9
  58.       Top             =   480
  59.       Width           =   5100
  60.       Begin VB.PictureBox pEN 
  61.          Appearance      =   0  'Flat
  62.          AutoRedraw      =   -1  'True
  63.          BackColor       =   &H0080C0FF&
  64.          ForeColor       =   &H80000008&
  65.          Height          =   135
  66.          Index           =   1
  67.          Left            =   2760
  68.          ScaleHeight     =   7
  69.          ScaleMode       =   3  'Pixel
  70.          ScaleWidth      =   55
  71.          TabIndex        =   19
  72.          Top             =   3915
  73.          Width           =   855
  74.       End
  75.       Begin VB.PictureBox pEN 
  76.          Appearance      =   0  'Flat
  77.          AutoRedraw      =   -1  'True
  78.          BackColor       =   &H0080C0FF&
  79.          ForeColor       =   &H80000008&
  80.          Height          =   135
  81.          Index           =   0
  82.          Left            =   2760
  83.          ScaleHeight     =   7
  84.          ScaleMode       =   3  'Pixel
  85.          ScaleWidth      =   55
  86.          TabIndex        =   18
  87.          Top             =   45
  88.          Width           =   855
  89.       End
  90.       Begin VB.PictureBox pHP 
  91.          Appearance      =   0  'Flat
  92.          AutoRedraw      =   -1  'True
  93.          BackColor       =   &H008080FF&
  94.          ForeColor       =   &H80000008&
  95.          Height          =   135
  96.          Index           =   1
  97.          Left            =   1320
  98.          ScaleHeight     =   7
  99.          ScaleMode       =   3  'Pixel
  100.          ScaleWidth      =   55
  101.          TabIndex        =   16
  102.          Top             =   3915
  103.          Width           =   855
  104.       End
  105.       Begin VB.PictureBox pHP 
  106.          Appearance      =   0  'Flat
  107.          AutoRedraw      =   -1  'True
  108.          BackColor       =   &H008080FF&
  109.          ForeColor       =   &H80000008&
  110.          Height          =   135
  111.          Index           =   0
  112.          Left            =   1320
  113.          ScaleHeight     =   7
  114.          ScaleMode       =   3  'Pixel
  115.          ScaleWidth      =   55
  116.          TabIndex        =   15
  117.          Top             =   45
  118.          Width           =   855
  119.       End
  120.       Begin VB.PictureBox Board 
  121.          Appearance      =   0  'Flat
  122.          AutoRedraw      =   -1  'True
  123.          AutoSize        =   -1  'True
  124.          BackColor       =   &H80000005&
  125.          DrawWidth       =   5
  126.          ForeColor       =   &H80000008&
  127.          Height          =   3630
  128.          Left            =   120
  129.          Picture         =   "frmGame.frx":18084
  130.          ScaleHeight     =   240
  131.          ScaleMode       =   3  'Pixel
  132.          ScaleWidth      =   320
  133.          TabIndex        =   10
  134.          Top             =   240
  135.          Width           =   4830
  136.       End
  137.       Begin VB.Label lblLabel 
  138.          BackStyle       =   0  'Transparent
  139.          Caption         =   "EN:"
  140.          BeginProperty Font 
  141.             Name            =   "Arial"
  142.             Size            =   8.25
  143.             Charset         =   0
  144.             Weight          =   700
  145.             Underline       =   0   'False
  146.             Italic          =   0   'False
  147.             Strikethrough   =   0   'False
  148.          EndProperty
  149.          Height          =   255
  150.          Index           =   5
  151.          Left            =   2400
  152.          TabIndex        =   20
  153.          Top             =   3870
  154.          Width           =   375
  155.       End
  156.       Begin VB.Label lblLabel 
  157.          BackStyle       =   0  'Transparent
  158.          Caption         =   "EN:"
  159.          BeginProperty Font 
  160.             Name            =   "Arial"
  161.             Size            =   8.25
  162.             Charset         =   0
  163.             Weight          =   700
  164.             Underline       =   0   'False
  165.             Italic          =   0   'False
  166.             Strikethrough   =   0   'False
  167.          EndProperty
  168.          Height          =   255
  169.          Index           =   4
  170.          Left            =   2400
  171.          TabIndex        =   17
  172.          Top             =   0
  173.          Width           =   375
  174.       End
  175.       Begin VB.Label lblLabel 
  176.          BackStyle       =   0  'Transparent
  177.          Caption         =   "HP:"
  178.          BeginProperty Font 
  179.             Name            =   "Arial"
  180.             Size            =   8.25
  181.             Charset         =   0
  182.             Weight          =   700
  183.             Underline       =   0   'False
  184.             Italic          =   0   'False
  185.             Strikethrough   =   0   'False
  186.          EndProperty
  187.          Height          =   255
  188.          Index           =   3
  189.          Left            =   960
  190.          TabIndex        =   14
  191.          Top             =   3870
  192.          Width           =   375
  193.       End
  194.       Begin VB.Label lblLabel 
  195.          BackStyle       =   0  'Transparent
  196.          Caption         =   "HP:"
  197.          BeginProperty Font 
  198.             Name            =   "Arial"
  199.             Size            =   8.25
  200.             Charset         =   0
  201.             Weight          =   700
  202.             Underline       =   0   'False
  203.             Italic          =   0   'False
  204.             Strikethrough   =   0   'False
  205.          EndProperty
  206.          Height          =   255
  207.          Index           =   2
  208.          Left            =   960
  209.          TabIndex        =   13
  210.          Top             =   0
  211.          Width           =   375
  212.       End
  213.       Begin VB.Label lblLabel 
  214.          BackStyle       =   0  'Transparent
  215.          Caption         =   "Player 2"
  216.          BeginProperty Font 
  217.             Name            =   "Arial"
  218.             Size            =   8.25
  219.             Charset         =   0
  220.             Weight          =   700
  221.             Underline       =   0   'False
  222.             Italic          =   0   'False
  223.             Strikethrough   =   0   'False
  224.          EndProperty
  225.          Height          =   255
  226.          Index           =   1
  227.          Left            =   120
  228.          TabIndex        =   12
  229.          Top             =   3870
  230.          Width           =   735
  231.       End
  232.       Begin VB.Label lblLabel 
  233.          BackStyle       =   0  'Transparent
  234.          Caption         =   "Player 1"
  235.          BeginProperty Font 
  236.             Name            =   "Arial"
  237.             Size            =   8.25
  238.             Charset         =   0
  239.             Weight          =   700
  240.             Underline       =   0   'False
  241.             Italic          =   0   'False
  242.             Strikethrough   =   0   'False
  243.          EndProperty
  244.          Height          =   255
  245.          Index           =   0
  246.          Left            =   120
  247.          TabIndex        =   11
  248.          Top             =   0
  249.          Width           =   735
  250.       End
  251.    End
  252.    Begin VB.PictureBox FM 
  253.       Appearance      =   0  'Flat
  254.       AutoRedraw      =   -1  'True
  255.       AutoSize        =   -1  'True
  256.       BackColor       =   &H80000005&
  257.       BorderStyle     =   0  'None
  258.       ForeColor       =   &H80000008&
  259.       Height          =   240
  260.       Left            =   6120
  261.       Picture         =   "frmGame.frx":504C6
  262.       ScaleHeight     =   16
  263.       ScaleMode       =   3  'Pixel
  264.       ScaleWidth      =   16
  265.       TabIndex        =   8
  266.       Top             =   4800
  267.       Visible         =   0   'False
  268.       Width           =   240
  269.    End
  270.    Begin VB.PictureBox FS 
  271.       Appearance      =   0  'Flat
  272.       AutoRedraw      =   -1  'True
  273.       AutoSize        =   -1  'True
  274.       BackColor       =   &H80000005&
  275.       BorderStyle     =   0  'None
  276.       ForeColor       =   &H80000008&
  277.       Height          =   240
  278.       Left            =   6120
  279.       Picture         =   "frmGame.frx":50808
  280.       ScaleHeight     =   16
  281.       ScaleMode       =   3  'Pixel
  282.       ScaleWidth      =   16
  283.       TabIndex        =   7
  284.       Top             =   5040
  285.       Visible         =   0   'False
  286.       Width           =   240
  287.    End
  288.    Begin VB.PictureBox GS 
  289.       Appearance      =   0  'Flat
  290.       AutoRedraw      =   -1  'True
  291.       AutoSize        =   -1  'True
  292.       BackColor       =   &H80000005&
  293.       BorderStyle     =   0  'None
  294.       ForeColor       =   &H80000008&
  295.       Height          =   120
  296.       Left            =   6240
  297.       Picture         =   "frmGame.frx":50B4A
  298.       ScaleHeight     =   8
  299.       ScaleMode       =   3  'Pixel
  300.       ScaleWidth      =   32
  301.       TabIndex        =   6
  302.       Top             =   4200
  303.       Visible         =   0   'False
  304.       Width           =   480
  305.    End
  306.    Begin VB.PictureBox GM 
  307.       Appearance      =   0  'Flat
  308.       AutoRedraw      =   -1  'True
  309.       AutoSize        =   -1  'True
  310.       BackColor       =   &H80000005&
  311.       BorderStyle     =   0  'None
  312.       ForeColor       =   &H80000008&
  313.       Height          =   120
  314.       Left            =   6240
  315.       Picture         =   "frmGame.frx":50E8C
  316.       ScaleHeight     =   8
  317.       ScaleMode       =   3  'Pixel
  318.       ScaleWidth      =   32
  319.       TabIndex        =   5
  320.       Top             =   4320
  321.       Visible         =   0   'False
  322.       Width           =   480
  323.    End
  324.    Begin VB.PictureBox bSprite 
  325.       Appearance      =   0  'Flat
  326.       AutoRedraw      =   -1  'True
  327.       AutoSize        =   -1  'True
  328.       BackColor       =   &H80000005&
  329.       BorderStyle     =   0  'None
  330.       ForeColor       =   &H80000008&
  331.       Height          =   3600
  332.       Left            =   -120
  333.       Picture         =   "frmGame.frx":511CE
  334.       ScaleHeight     =   240
  335.       ScaleMode       =   3  'Pixel
  336.       ScaleWidth      =   320
  337.       TabIndex        =   4
  338.       Top             =   3000
  339.       Visible         =   0   'False
  340.       Width           =   4800
  341.    End
  342.    Begin VB.PictureBox bMask 
  343.       Appearance      =   0  'Flat
  344.       AutoRedraw      =   -1  'True
  345.       AutoSize        =   -1  'True
  346.       BackColor       =   &H80000005&
  347.       BorderStyle     =   0  'None
  348.       ForeColor       =   &H80000008&
  349.       Height          =   3600
  350.       Left            =   1080
  351.       Picture         =   "frmGame.frx":89610
  352.       ScaleHeight     =   240
  353.       ScaleMode       =   3  'Pixel
  354.       ScaleWidth      =   320
  355.       TabIndex        =   3
  356.       Top             =   5640
  357.       Visible         =   0   'False
  358.       Width           =   4800
  359.    End
  360.    Begin VB.CommandButton cmdNew 
  361.       Caption         =   "New Game"
  362.       Height          =   255
  363.       Left            =   1920
  364.       TabIndex        =   2
  365.       Top             =   120
  366.       Width           =   1335
  367.    End
  368.    Begin VB.PictureBox SM 
  369.       AutoRedraw      =   -1  'True
  370.       AutoSize        =   -1  'True
  371.       BorderStyle     =   0  'None
  372.       Height          =   3840
  373.       Index           =   0
  374.       Left            =   6960
  375.       Picture         =   "frmGame.frx":C1A52
  376.       ScaleHeight     =   256
  377.       ScaleMode       =   3  'Pixel
  378.       ScaleWidth      =   64
  379.       TabIndex        =   1
  380.       Top             =   840
  381.       Visible         =   0   'False
  382.       Width           =   960
  383.    End
  384.    Begin VB.PictureBox SS 
  385.       AutoRedraw      =   -1  'True
  386.       AutoSize        =   -1  'True
  387.       BorderStyle     =   0  'None
  388.       Height          =   3840
  389.       Index           =   0
  390.       Left            =   8040
  391.       Picture         =   "frmGame.frx":CDA94
  392.       ScaleHeight     =   256
  393.       ScaleMode       =   3  'Pixel
  394.       ScaleWidth      =   64
  395.       TabIndex        =   0
  396.       Top             =   840
  397.       Visible         =   0   'False
  398.       Width           =   960
  399.    End
  400. End
  401. Attribute VB_Name = "frmGame"
  402. Attribute VB_GlobalNameSpace = False
  403. Attribute VB_Creatable = False
  404. Attribute VB_PredeclaredId = True
  405. Attribute VB_Exposed = False
  406. Option Explicit
  407.  
  408. Dim FPS As Long
  409. Dim sFPS As Long
  410. Dim tSpeed As Long
  411.  
  412. Function MainLoop()
  413. Dim C As Long
  414. tSpeed = 5000
  415. Running = True
  416. Do Until Running = False
  417.     If C >= tSpeed Then
  418.         Board.Cls
  419.         BitBlt Board.hDC, 0, 0, 320, 240, bMask.hDC, 0, 0, vbSrcAnd
  420.         BitBlt Board.hDC, 0, 0, 320, 240, bSprite.hDC, 0, 0, vbSrcInvert
  421.         GetKeys P(1), vbKeyW, vbKeyA, vbKeyD, vbKeyZ, vbKeyX, vbKeyC, vbKeyS, vbKeyQ
  422.         GetKeys P(2), vbKeyI, vbKeyJ, vbKeyL, vbKeyM, 188, 190, vbKeyK, vbKeyU
  423.         MovePlayers
  424.         MoveShots
  425.         C = 0
  426.     Else
  427.         C = C + 1
  428.     End If
  429.     DoEvents
  430. Loop
  431. End Function
  432.  
  433. Private Sub cmdNew_Click()
  434. NewPlayer P(1), 2, 2, 1, 1
  435. NewPlayer P(2), 320 - 34, 2, 2, 1
  436. MainLoop
  437. End Sub
  438.  
  439. Private Sub Form_Unload(Cancel As Integer)
  440. Running = False
  441. End Sub
  442.