亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? spreng.bas

?? 八腳蟹》射擊游戲源碼
?? BAS
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
Function iSprLoadFrames(ByVal vsFName As String) As Integer
'==AutoDoc==
'Purpose    Load frame details from a file
'Entry      vsFName - name of data file to load
'Exit       True if operation successful
'Comments   The data file must reside in the same
'           directory as the executable.
'           Frame Editor completed Sep 7th '97!

Dim iFNum As Integer
Dim i As Integer
Dim iCount As Integer
Dim lY As Long
Dim lW As Long
Dim lH As Long
Dim iOpen As Integer
Dim iTmp As Integer
Dim sFName As String
Dim sBMPName As String
Dim sTmp As String
Dim tFrame As SprFrame

'Trap errros as we are accessing disk files
On Error GoTo LoadFrames_Err

'Clear the array quickly
ReDim gtSprFrm(0)

'Build full filename
sFName = App.Path & "/" & vsFName

'Open specified file
iFNum = FreeFile
Open sFName For Input As #iFNum
iOpen = True

'Read verion details
Input #iFNum, sTmp, iTmp

'Check version details
If sTmp <> "MM Frame File" Or iTmp <> 2 Then
    MsgBox "Sprite Engine Error, invalid frame file version number or file header", , "Sprite Engine"
    Close #iFNum
    Exit Function
End If

'Read name of the gfx file, ignored for time being:(
Input #iFNum, sTmp

'Read number of frames
Input #iFNum, iCount

'Redimension array
ReDim gtSprFrm(iCount)

'Read one frame at a time and add to array
For i = 0 To iCount - 1
    Input #iFNum, tFrame.lX, tFrame.lY, tFrame.lW, tFrame.lH
    tFrame.lW = tFrame.lW - tFrame.lX + 1
    tFrame.lH = tFrame.lH - tFrame.lY + 1
    gtSprFrm(i) = tFrame
Next i

'Close the file
Close #iFNum

'Set success flag and exit
iSprLoadFrames = True
Exit Function

LoadFrames_Err:
MsgBox "The following error occurred in iSprLoadGfx():" & Chr$(10) & Error$(Err)

'If file open then close it
If iOpen Then Close #iFNum

Exit Function
End Function

Function iSprLoadGfx(pic As PictureBox, ByVal vsFName As String) As Integer
'==AutoDoc==
'Purpose    Load sprite graphics from a *.BMP file into a
'           memory DC and create a mask DC for transparent
'           blitting as well
'Entry      pic - a picture box used to load the gfx
'           vsFName - Name of the *.BMP file to load
'Exit       True if file loaded and mask created
'Comments   The *.BMP file must reside in same directory
'           as the executable. All resources are released
'           if any errors occur

Dim i As Integer
Dim lW As Long
Dim lH As Long
Dim lGfxDC As Long
Dim lGfxBmp As Long
Dim lMaskDC As Long
Dim lMaskBmp As Long
Dim lSrcDC As Long
Dim iRetVal As Integer
Dim l As Long
Dim lColour As Long

'Exit if gfx are already loaded.
If mlGfxDC Then Exit Function

'Trap errors as we are accessing disk files
On Error GoTo SprLoadGfx_Err

'Make sure picture box is configured as required
pic.AutoRedraw = True
pic.AutoSize = True
pic.Visible = False

'Load gfx into a temporary Picture Box
pic.Picture = LoadPicture(App.Path & "/" & vsFName)

'Get useful picture box properties into locals
lW = pic.Width \ Screen.TwipsPerPixelX
lH = pic.Height \ Screen.TwipsPerPixelY
lSrcDC = pic.hdc

'Allocate a DC
lGfxDC = CreateCompatibleDC(mlGameDC)

'Allocate a Bitmap
If lGfxDC Then
    lGfxBmp = CreateCompatibleBitmap(lSrcDC, lW, lH)

    'Copy the gfx from the PictureBox into the DC
    If lGfxBmp Then
        lGfxBmp = SelectObject(lGfxDC, lGfxBmp)
        l = BitBlt(lGfxDC, 0, 0, lW, lH, lSrcDC, 0, 0, SRCCOPY)

        'Allocate a DC for masks
        lMaskDC = CreateCompatibleDC(mlGameDC)

        'Allocate a Bitmap for masks
        If lMaskDC Then
            lMaskBmp = CreateBitmap(lW, lH, 1, 1, ByVal 0&)

            'Create masks
            If lMaskBmp Then
                lMaskBmp = SelectObject(lMaskDC, lMaskBmp)
                lColour = SetBkColor(lGfxDC, QBColor(0))
                l = BitBlt(lMaskDC, 0, 0, lW, lH, lGfxDC, 0, 0, SRCCOPY)
                lColour = SetBkColor(lGfxDC, lColour)

                'Flag success and store variables
                iRetVal = True
                mlGfxDC = lGfxDC
                mlGfxBmp = lGfxBmp
                mlMaskDC = lMaskDC
                mlMaskBmp = lMaskBmp
            End If
        End If
    End If
End If

'If we failed for some reason then free all resources
If Not iRetVal Then

    'Free sprite gfx bitmap
    If lGfxBmp Then
        lGfxBmp = SelectObject(lGfxDC, lGfxBmp)
        l = DeleteObject(lGfxBmp)
    End If

    'Free sprite gfx DC
    If lGfxDC Then l = DeleteDC(lGfxDC)

    'Free mask bitmap
    If lMaskBmp Then
        lMaskBmp = SelectObject(lMaskDC, lMaskBmp)
        l = DeleteObject(lMaskBmp)
    End If

    'Free mask DC
    If lMaskDC Then l = DeleteDC(lMaskDC)

End If

'Set return code and exit
iSprLoadGfx = iRetVal
Exit Function

'Simple error handler
SprLoadGfx_Err:

'Inform user of the error
MsgBox "The following error occurred in iSprLoadGfx():" & Chr$(10) & Error$(Err)

'In case this was not a file error free resources
    
'Free sprite gfx bitmap
If lGfxBmp Then
    lGfxBmp = SelectObject(lGfxDC, lGfxBmp)
    l = DeleteObject(lGfxBmp)
End If

'Free sprite gfx DC
If lGfxDC Then l = DeleteDC(lGfxDC)

'Free mask bitmap
If lMaskBmp Then
    lMaskBmp = SelectObject(lMaskDC, lMaskBmp)
    l = DeleteObject(lMaskBmp)
End If

'Free mask DC
If lMaskDC Then l = DeleteDC(lMaskDC)

Exit Function
End Function

Sub SprActivateSprite(ByVal viId As Integer, ByVal vlX As Long, ByVal vlY As Long)
'==AutoDoc==
'Purpose    Activates a sprite and makes initial background
'           save
'Entry      viId - Index of sprite to activate
'           vlX - X pixel coord to display sprite at
'           vlY - Y pixel coord to display sprite at
'Comments

Dim i As Integer
Dim l As Long

'Exit if sprite is not allocated
If Not gtSpr(viId).iInUse Then Exit Sub

'Set the sprites X, Y coordinates
gtSpr(viId).lX = vlX
gtSpr(viId).lY = vlY

'Take a copy of background at (X,Y) where sprite will be displayed
l = BitBlt(gtSpr(viId).lSaveDC, 0, 0, gtSpr(viId).lW, gtSpr(viId).lH, mlGameDC, vlX, vlY, SRCCOPY)

'Mark the sprite as active
gtSpr(viId).iActive = True

End Sub

Sub SprAnimAuto()
'==AutoDoc==
'Purpose    Animate all active sprites that have iAnimAuto
'           set True
'Entry      None
'Comments   All animation sequences are assumed to be
'           cyclic.

Dim i As Integer
Dim iId As Integer
Dim iStart As Integer
Dim iEnd As Integer
Dim iFrame As Integer

'Get dimensions of the sprite array
iStart = LBound(gtSpr)
iEnd = UBound(gtSpr)

'For each active entry in gtSpr() with iAnimAuto set true
For iId = iStart To iEnd
    If gtSpr(iId).iActive And gtSpr(iId).iAnimAuto Then
        
        iFrame = gtSpr(iId).iFrame
        
        'Decrease iAnimCount
        gtSpr(iId).iAnimCount = gtSpr(iId).iAnimCount - 1

        'If iAnimCount is zero then
        If gtSpr(iId).iAnimCount = 0 Then
            
            'reset iAnimCount to value in iAnimRate
            gtSpr(iId).iAnimCount = gtSpr(iId).iAnimRate
            
            'bump iFrame
            iFrame = iFrame + 1

            'If iFrame > iLastFrame then reset iFrame to iFirstFrame
            If iFrame > gtSpr(iId).iLastFrame Then iFrame = gtSpr(iId).iFirstFrame
        End If
        
        'set iFrameX and iFrameY to values in gtSprFrm(iFrame)
        gtSpr(iId).iFrame = iFrame
        gtSpr(iId).lFrameX = gtSprFrm(iFrame).lX
        gtSpr(iId).lFrameY = gtSprFrm(iFrame).lY
    End If
Next iId

End Sub

Sub SprAnimNextFrame(ByVal viId As Integer)
'==AutoDoc==
'Purpose    To move a sprite one frame forward in its
'           animation sequence
'Entry      viId - Index of sprite to animate
'Comments   All animation sequences are assumed to be
'           cyclic

Dim iFrame As Integer

'Sprite must be active
If gtSpr(viId).iActive Then
    iFrame = gtSpr(viId).iFrame
        
    'bump iFrame
    iFrame = iFrame + 1

    'If iFrame > iLastFrame then reset iFrame to iFirstFrame
    If iFrame > gtSpr(viId).iLastFrame Then iFrame = gtSpr(viId).iFirstFrame
        
    'set iFrameX and iFrameY to values in gtSprFrm(iFrame)
    gtSpr(viId).iFrame = iFrame
    gtSpr(viId).lFrameX = gtSprFrm(iFrame).lX
    gtSpr(viId).lFrameY = gtSprFrm(iFrame).lY
End If

End Sub

Sub SprAnimPrevFrame(ByVal viId As Integer)
'==AutoDoc==
'Purpose    To move a sprite one frame forward in its
'           animation sequence
'Entry      viId - Index of sprite to animate
'Comments   All animation sequences are assumed to be
'           cyclic

Dim iFrame As Integer

'Sprite must be active
If gtSpr(viId).iActive Then
    iFrame = gtSpr(viId).iFrame
        
    'bump iFrame
    iFrame = iFrame - 1

    'If iFrame < iFirstFrame then reset iFrame to iLastFrame
    If iFrame < gtSpr(viId).iFirstFrame Then iFrame = gtSpr(viId).iLastFrame
    
    'set iFrameX and iFrameY to values in gtSprFrm(iFrame)
    gtSpr(viId).iFrame = iFrame
    gtSpr(viId).lFrameX = gtSprFrm(iFrame).lX
    gtSpr(viId).lFrameY = gtSprFrm(iFrame).lY
End If

End Sub

Sub SprAnimSetFrame(ByVal viId As Integer, ByVal viFrame As Integer)
'==AutoDoc==
'Purpose    To set the frame used by a sprite
'Entry      viId - Index of sprite to animate
'           viFrame - frame to use
'Comments   The frames specified can be any frame, there
'           is no requirement that it be a member of the
'           animation sequence of the sprite

'Sprite must be active
If gtSpr(viId).iActive Then
    
    'set iFrameX and iFrameY to values in gtSprFrm(iFrame)
    gtSpr(viId).iFrame = viFrame
    gtSpr(viId).lFrameX = gtSprFrm(viFrame).lX
    gtSpr(viId).lFrameY = gtSprFrm(viFrame).lY

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99久久综合狠狠综合久久| 欧美午夜理伦三级在线观看| 久久成人精品无人区| 五月天国产精品| 婷婷六月综合网| 天堂精品中文字幕在线| 日韩中文字幕91| 日本不卡一区二区| 奇米影视一区二区三区| 麻豆精品一区二区| 精品一区二区三区在线播放视频| 蜜臀久久久久久久| 久久精品国产澳门| 国内精品久久久久影院薰衣草| 激情综合五月天| 国产成人av自拍| 99天天综合性| 在线观看亚洲成人| 欧美夫妻性生活| 日韩欧美综合在线| 国产亚洲一二三区| 中文欧美字幕免费| 一区二区三区毛片| 日韩va欧美va亚洲va久久| 蜜臀av性久久久久蜜臀aⅴ | 亚洲激情在线激情| 亚洲国产精品久久久久秋霞影院 | 久久99国产乱子伦精品免费| 精品亚洲aⅴ乱码一区二区三区| 国产麻豆精品theporn| 成人激情动漫在线观看| 色婷婷av一区二区三区gif| 亚洲欧洲av色图| 亚洲综合图片区| 麻豆一区二区三区| 成人免费看片app下载| 色婷婷国产精品综合在线观看| 欧美丰满嫩嫩电影| 久久久久久97三级| 一区二区三区视频在线看| 日本视频在线一区| 成人免费看黄yyy456| 欧美日韩一区不卡| 国产亚洲一区字幕| 亚洲高清久久久| 国产一区二区在线影院| 91丨九色丨蝌蚪丨老版| 欧美一区二区在线免费观看| 国产欧美一区二区精品仙草咪| 一区二区三区欧美激情| 久久国产夜色精品鲁鲁99| jizz一区二区| 日韩三级电影网址| 一区二区三区.www| 国产剧情一区在线| 欧美日韩国产电影| 国产精品美女视频| 麻豆国产一区二区| 日本道精品一区二区三区| 久久先锋资源网| 天堂一区二区在线| www.爱久久.com| 日韩精品一区二区三区视频播放| 亚洲免费观看高清完整版在线观看熊| 青娱乐精品视频在线| 99r精品视频| 久久理论电影网| 午夜亚洲国产au精品一区二区| 成人一区在线观看| 日韩欧美国产成人一区二区| 亚洲摸摸操操av| 国产一区91精品张津瑜| 欧美日本在线播放| 99re这里只有精品首页| 久久亚洲一级片| 久久日韩精品一区二区五区| 国产亚洲精品中文字幕| 椎名由奈av一区二区三区| 久久国产精品区| 欧美日韩国产经典色站一区二区三区| 中文字幕国产一区| 国产麻豆精品视频| 日韩美女天天操| 午夜激情一区二区| 91在线观看成人| 国产精品三级视频| 国产乱码字幕精品高清av| 欧美二区三区91| 亚洲电影在线免费观看| 色婷婷综合久久久中文字幕| 国产精品免费看片| 国产v综合v亚洲欧| 精品国偷自产国产一区| 日韩激情视频网站| 欧美精品九九99久久| 一区二区三区中文字幕电影| 成人精品视频一区二区三区| 国产亚洲一本大道中文在线| 国产做a爰片久久毛片| 日韩欧美中文字幕一区| 蜜臀国产一区二区三区在线播放 | 久久久99精品免费观看不卡| 免费观看在线综合色| 欧美一区二区日韩| 免费观看成人av| 日韩一级二级三级| 久99久精品视频免费观看| 日韩午夜av电影| 精品一区二区三区香蕉蜜桃| 91精品国产综合久久福利| 日韩精品亚洲专区| 欧美va亚洲va| 国产美女娇喘av呻吟久久| 2014亚洲片线观看视频免费| 国产一区二区精品久久| 久久久电影一区二区三区| 国产精品自拍一区| 中日韩av电影| 91福利国产成人精品照片| 亚洲午夜在线视频| 日韩一级大片在线| 国产成人在线免费| ㊣最新国产の精品bt伙计久久| 91丨porny丨国产入口| 一区二区日韩av| 欧美一区二区三区男人的天堂| 美腿丝袜亚洲综合| 欧美激情综合五月色丁香小说| 91免费看`日韩一区二区| 亚洲国产毛片aaaaa无费看 | 亚洲五月六月丁香激情| 538在线一区二区精品国产| 国产一区二区三区最好精华液| 中文字幕国产一区| 欧美又粗又大又爽| 久久99国产精品久久| 国产欧美精品一区二区三区四区| 91视频国产观看| 男女激情视频一区| 中文字幕av免费专区久久| 日本乱码高清不卡字幕| 蜜臀av在线播放一区二区三区| 国产欧美日韩激情| 在线91免费看| 国产91丝袜在线观看| 亚洲一区二区三区精品在线| www欧美成人18+| 91黄色免费版| 国产自产视频一区二区三区| 亚洲精品精品亚洲| 久久综合九色综合久久久精品综合| 99久久婷婷国产综合精品电影| 免费不卡在线观看| 夜夜操天天操亚洲| 久久久久久亚洲综合影院红桃| 在线国产亚洲欧美| 国产**成人网毛片九色 | 成人av免费在线| 偷拍与自拍一区| 国产精品理论在线观看| 欧美一区二区三区小说| av电影在线观看一区| 麻豆精品一区二区综合av| 一区二区三区在线免费视频| 美女视频黄免费的久久| 亚洲视频网在线直播| 精品免费国产一区二区三区四区| 99re亚洲国产精品| 国产一区在线观看麻豆| 亚洲成av人片www| 日韩美女视频19| 久久久久久久综合狠狠综合| 欧美精品免费视频| 在线精品视频小说1| 懂色一区二区三区免费观看| 欧美aaaaaa午夜精品| 一区二区三区四区国产精品| 久久久www成人免费无遮挡大片 | 亚洲第一二三四区| 国产精品久久久久影视| 精品欧美久久久| 欧美日韩国产一级片| 色综合欧美在线视频区| 国产91精品露脸国语对白| 蜜臀av性久久久久av蜜臀妖精| 亚洲国产精品麻豆| 亚洲午夜久久久久久久久电影院| 国产精品九色蝌蚪自拍| 久久久99免费| 久久久久综合网| 欧美成人vr18sexvr| 欧美一区二区精品| 777xxx欧美| 欧美日韩大陆一区二区| 欧美视频一区二| 欧洲激情一区二区| 欧美艳星brazzers| 欧美日韩激情一区二区三区| 欧美日韩精品一区二区三区| 日本韩国欧美国产|