画图模块.bas
资源名称:vbmcrisrc.rar [点击查看]
上传用户:pcw2004
上传日期:2022-02-02
资源大小:743k
文件大小:87k
源码类别:
DirextX编程
开发平台:
Visual Basic
- Attribute VB_Name = "画图模块"
- Option Explicit
- '///////// 画游戏登陆画面
- Public Sub DrawLoginGamePic()
- Dim i As Integer, PicNum As Integer
- If ChrSelTex(22).Tex Is Nothing Then
- CreateTexture ChrSelTex(22), ResPath & "DataChrSel.wil"
- End If
- mRECT.Left = 0
- mRECT.Right = ChrSelTex(22).Wid
- mRECT.Top = 0
- mRECT.bottom = ChrSelTex(22).Hei
- Draw ChrSelTex(22).Tex, 0, 0, mRECT
- If RegIDFrm = False Then
- If IDLoginOK = True Then
- '//////// 画开始游戏门
- DoorPicSpeed = DoorPicSpeed + 1
- If DoorPicSpeed > 50 Then
- DoorPicSpeed = 0
- DoorPic = DoorPic + 1
- If DoorPic >= 9 Then
- ' Set LoginGameMusic = Nothing
- Running = 1
- Set LoginGameMusic = DS.CreateSoundBufferFromFile(ResPath & "Wavsellect-loop2.wav", DSBDESC)
- LoginGameMusic.SetVolume mVolume
- LoginGameMusic.Play DSBPLAY_LOOPING
- End If
- End If
- PicNum = DoorPic + 23
- If ChrSelTex(PicNum).Tex Is Nothing Then
- CreateTexture ChrSelTex(PicNum), ResPath & "DataChrSel.wil"
- End If
- mRECT.Left = 0
- mRECT.Right = ChrSelTex(PicNum).Wid
- mRECT.Top = 0
- mRECT.bottom = ChrSelTex(PicNum).Hei
- Draw ChrSelTex(PicNum).Tex, 153, 96, mRECT
- ElseIf IDLoginOK = False Then
- If PrguseTex(60).Tex Is Nothing Then
- CreateTexture PrguseTex(60), ResPath & "Dataprguse.wil"
- End If
- mRECT.Left = 0
- mRECT.Right = PrguseTex(60).Wid
- mRECT.Top = 0
- mRECT.bottom = PrguseTex(60).Hei
- Draw PrguseTex(60).Tex, 260, 180, mRECT
- If Mouse.Button1Down = True And FrmMain.IDText.Text <> "" Then
- If Mouse.X > 432 And Mouse.X < 504 And _
- Mouse.Y > 346 And Mouse.Y < 374 Then
- If PrguseTex(62).Tex Is Nothing Then
- CreateTexture PrguseTex(62), ResPath & "Dataprguse.wil"
- End If
- mRECT.Left = 0
- mRECT.Right = PrguseTex(62).Wid
- mRECT.Top = 0
- mRECT.bottom = PrguseTex(62).Hei
- Draw PrguseTex(62).Tex, 429, 344, mRECT
- ElseIf Mouse.X > 286 And Mouse.X < 380 And _
- Mouse.Y > 387 And Mouse.Y < 414 Then
- If PrguseTex(61).Tex Is Nothing Then
- CreateTexture PrguseTex(61), ResPath & "Dataprguse.wil"
- End If
- mRECT.Left = 0
- mRECT.Right = PrguseTex(61).Wid
- mRECT.Top = 0
- mRECT.bottom = PrguseTex(61).Hei
- Draw PrguseTex(61).Tex, 285, 387, mRECT
- End If
- End If
- End If
- ElseIf RegIDFrm = True Then
- If PrguseTex(63).Tex Is Nothing Then
- CreateTexture PrguseTex(63), ResPath & "Dataprguse.wil"
- End If
- mRECT.Left = 0
- mRECT.Right = PrguseTex(63).Wid
- mRECT.Top = 0
- mRECT.bottom = PrguseTex(63).Hei
- Draw PrguseTex(63).Tex, 90, 50, mRECT
- If Mouse.Button1Down = True Then
- If Mouse.X > 252 And Mouse.X < 323 And _
- Mouse.Y > 469 And Mouse.Y < 498 Then
- If PrguseTex(62).Tex Is Nothing Then
- CreateTexture PrguseTex(62), ResPath & "Dataprguse.wil"
- End If
- mRECT.Left = 0
- mRECT.Right = PrguseTex(62).Wid
- mRECT.Top = 0
- mRECT.bottom = PrguseTex(62).Hei
- Draw PrguseTex(62).Tex, 248, 467, mRECT
- ElseIf Mouse.X > 538 And Mouse.X < 628 And _
- Mouse.Y > 471 And Mouse.Y < 498 Then
- If PrguseTex(52).Tex Is Nothing Then
- CreateTexture PrguseTex(52), ResPath & "Dataprguse.wil"
- End If
- mRECT.Left = 0
- mRECT.Right = PrguseTex(52).Wid
- mRECT.Top = 0
- mRECT.bottom = PrguseTex(52).Hei
- Draw PrguseTex(52).Tex, 537, 469, mRECT
- End If
- End If
- End If
- End Sub
- '///////// 画选择角色窗口
- Public Sub DrawSelHeroFrm()
- Dim i As Integer, PicNum As Integer
- If PrguseTex(65).Tex Is Nothing Then
- CreateTexture PrguseTex(65), ResPath & "Dataprguse.wil"
- End If
- mRECT.Left = 0
- mRECT.Right = PrguseTex(65).Wid
- mRECT.Top = 0
- mRECT.bottom = PrguseTex(65).Hei
- Draw PrguseTex(65).Tex, 0, 0, mRECT
- If RegHero = False Then
- DrawSaveHero
- '/////// 画开始按钮
- If Mouse.X > 388 And Mouse.X < 426 And _
- Mouse.Y > 458 And Mouse.Y < 474 Then
- If PrguseTex(68).Tex Is Nothing Then
- CreateTexture PrguseTex(68), ResPath & "Dataprguse.wil"
- End If
- mRECT.Left = 0
- mRECT.Right = PrguseTex(68).Wid
- mRECT.Top = 0
- mRECT.bottom = PrguseTex(68).Hei
- Draw PrguseTex(68).Tex, 385, 456, mRECT
- End If
- '////////// 画创建角色按钮
- If Mouse.X > 350 And Mouse.X < 463 And _
- Mouse.Y > 488 And Mouse.Y < 504 Then
- If PrguseTex(69).Tex Is Nothing Then
- CreateTexture PrguseTex(69), ResPath & "Dataprguse.wil"
- End If
- mRECT.Left = 0
- mRECT.Right = PrguseTex(69).Wid
- mRECT.Top = 0
- mRECT.bottom = PrguseTex(69).Hei
- Draw PrguseTex(69).Tex, 348, 486, mRECT
- End If
- '//////////// 画删除角色按钮
- If Mouse.X > 350 And Mouse.X < 464 And _
- Mouse.Y > 509 And Mouse.Y < 524 Then
- If PrguseTex(70).Tex Is Nothing Then
- CreateTexture PrguseTex(70), ResPath & "Dataprguse.wil"
- End If
- mRECT.Left = 0
- mRECT.Right = PrguseTex(70).Wid
- mRECT.Top = 0
- mRECT.bottom = PrguseTex(70).Hei
- Draw PrguseTex(70).Tex, 347, 506, mRECT
- End If
- '///////// 画退出按钮
- If Mouse.X > 382 And Mouse.X < 431 And _
- Mouse.Y > 548 And Mouse.Y < 564 Then
- If PrguseTex(72).Tex Is Nothing Then
- CreateTexture PrguseTex(72), ResPath & "Dataprguse.wil"
- End If
- mRECT.Left = 0
- mRECT.Right = PrguseTex(72).Wid
- mRECT.Top = 0
- mRECT.bottom = PrguseTex(72).Hei
- Draw PrguseTex(72).Tex, 379, 547, mRECT
- End If
- ElseIf RegHero = True Then
- DrawRegHero
- End If
- End Sub
- '///////// 画保存的两个角色
- Public Sub DrawSaveHero()
- Dim i As Integer, PicNum As Integer
- Dim DrawX As Long, DrawY As Long
- For i = 1 To 2
- If mHero(i).State = True Then
- If mHero(i).mSel = 3 Then '退去石化
- mHero(i).StartPic = 20
- mHero(i).PicSpeed = mHero(i).PicSpeed + 1
- If mHero(i).PicSpeed > 3 Then
- mHero(i).PicSpeed = 0
- mHero(i).Pic = mHero(i).Pic + 1
- If mHero(i).Pic > 11 Then
- mHero(i).mSel = 4
- mHero(i).Pic = 0
- End If
- End If
- ElseIf mHero(i).mSel = 4 Then '彩色
- mHero(i).StartPic = 0
- mHero(i).PicSpeed = mHero(i).PicSpeed + 1
- If mHero(i).PicSpeed > 25 Then
- mHero(i).PicSpeed = 0
- mHero(i).Pic = mHero(i).Pic + 1
- If mHero(i).Pic > 15 Then
- mHero(i).Pic = 0
- End If
- End If
- ElseIf mHero(i).mSel = 2 Then '渐石化
- mHero(i).StartPic = 20
- mHero(i).PicSpeed = mHero(i).PicSpeed + 1
- If mHero(i).PicSpeed > 3 Then
- mHero(i).PicSpeed = 0
- mHero(i).Pic = mHero(i).Pic - 1
- If mHero(i).Pic <= 0 Then
- mHero(i).Pic = 0
- mHero(i).mSel = 0
- End If
- End If
- End If
- PicNum = 40 + mHero(i).Sex * 120 + mHero(i).Job * 40 + mHero(i).Pic + mHero(i).StartPic
- If ChrSelTex(PicNum).Tex Is Nothing Then
- CreateTexture ChrSelTex(PicNum), ResPath & "Datachrsel.wil"
- End If
- mRECT.Left = 0
- mRECT.Right = ChrSelTex(PicNum).Wid
- mRECT.Top = 0
- mRECT.bottom = ChrSelTex(PicNum).Hei
- If mHero(i).Sex = 男 Then
- Select Case mHero(i).Job
- Case JobType.战士
- DrawX = 60
- DrawY = 40
- Case JobType.法师
- DrawX = 70
- DrawY = 35
- Case JobType.道士
- DrawX = 80
- DrawY = 60
- End Select
- ElseIf mHero(i).Sex = 女 Then
- Select Case mHero(i).Job
- Case JobType.战士
- DrawX = 55
- DrawY = 45
- Case JobType.法师
- DrawX = 130
- DrawY = 80
- Case JobType.道士
- DrawX = 135
- DrawY = 80
- End Select
- End If
- Draw ChrSelTex(PicNum).Tex, DrawX + (i - 1) * 330, DrawY, mRECT
- mRECT.Left = 115 + (i - 1) * 555
- mRECT.Right = 210 + (i - 1) * 555
- mRECT.Top = 495
- mRECT.bottom = 507
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 255, 255, 255), mHero(i).mName, mRECT, DT_LEFT
- mRECT.Left = 115 + (i - 1) * 555
- mRECT.Right = 160 + (i - 1) * 555
- mRECT.Top = 520
- mRECT.bottom = 536
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 255, 255, 255), mHero(i).Level, mRECT, DT_LEFT
- mRECT.Left = 115 + (i - 1) * 555
- mRECT.Right = 202 + (i - 1) * 555
- mRECT.Top = 555
- mRECT.bottom = 567
- Select Case mHero(i).Job
- Case JobType.战士
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 255, 255, 255), "战士", mRECT, DT_LEFT
- Case JobType.法师
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 255, 255, 255), "法师", mRECT, DT_LEFT
- Case JobType.道士
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 255, 255, 255), "道士", mRECT, DT_LEFT
- End Select
- '////// 画选择按钮
- If mSelHeroNum = i Then
- If PrguseTex(67).Tex Is Nothing Then
- CreateTexture PrguseTex(67), ResPath & "Dataprguse.wil"
- End If
- mRECT.Left = 0
- mRECT.Right = PrguseTex(67).Wid
- mRECT.Top = 0
- mRECT.bottom = PrguseTex(67).Hei
- Draw PrguseTex(67).Tex, 134 + (i - 1) * 551, 453, mRECT
- Else
- If PrguseTex(66).Tex Is Nothing Then
- CreateTexture PrguseTex(66), ResPath & "Dataprguse.wil"
- End If
- mRECT.Left = 0
- mRECT.Right = PrguseTex(66).Wid
- mRECT.Top = 0
- mRECT.bottom = PrguseTex(66).Hei
- Draw PrguseTex(66).Tex, 134 + (i - 1) * 551, 453, mRECT
- End If
- End If
- Next
- If SelHeroMagic = True Then
- SelHeroMagicPicSpeed = SelHeroMagicPicSpeed + 1
- If SelHeroMagicPicSpeed > 10 Then
- SelHeroMagicPicSpeed = 0
- SelHeroMagicPic = SelHeroMagicPic + 1
- If SelHeroMagicPic > 14 Then
- SelHeroMagicPic = 0
- SelHeroMagic = False
- End If
- End If
- PicNum = 4 + SelHeroMagicPic
- If ChrSelTex(PicNum).Tex Is Nothing Then
- CreateTexture ChrSelTex(PicNum), ResPath & "DataChrSel.wil"
- End If
- mRECT.Left = 0
- mRECT.Right = ChrSelTex(PicNum).Wid
- mRECT.Top = 0
- mRECT.bottom = ChrSelTex(PicNum).Hei
- Draw ChrSelTex(PicNum).Tex, (mSelHeroNum - 1) * 330 + 80 + ChrSelTex(PicNum).PosX, 100 + ChrSelTex(PicNum).PosY, mRECT
- End If
- End Sub
- '/////////// 画建立角色图片
- Public Sub DrawRegHero()
- Dim i As Integer, PicNum As Integer
- Dim DrawX As Long, DrawY As Long
- If PrguseTex(73).Tex Is Nothing Then
- CreateTexture PrguseTex(73), ResPath & "DataPrguse.Wil"
- End If
- mRECT.Left = 0
- mRECT.Right = PrguseTex(73).Wid
- mRECT.Top = 0
- mRECT.bottom = PrguseTex(73).Hei
- Draw PrguseTex(73).Tex, 420, 0, mRECT
- PicNum = 55 + RegHeroJob
- If PrguseTex(PicNum).Tex Is Nothing Then
- CreateTexture PrguseTex(PicNum), ResPath & "DataPrguse.Wil"
- End If
- mRECT.Left = 0
- mRECT.Right = PrguseTex(PicNum).Wid
- mRECT.Top = 0
- mRECT.bottom = PrguseTex(PicNum).Hei
- Draw PrguseTex(PicNum).Tex, 468 + RegHeroJob * 45, 157, mRECT
- PicNum = 58 + RegHeroSex
- If PrguseTex(PicNum).Tex Is Nothing Then
- CreateTexture PrguseTex(PicNum), ResPath & "DataPrguse.Wil"
- End If
- mRECT.Left = 0
- mRECT.Right = PrguseTex(PicNum).Wid
- mRECT.Top = 0
- mRECT.bottom = PrguseTex(PicNum).Hei
- Draw PrguseTex(PicNum).Tex, 513 + RegHeroSex * 45, 231, mRECT
- '///////点击提交按钮
- If Mouse.Button1Down = True Then
- If Mouse.X > 523 And Mouse.X < 595 And _
- Mouse.Y > 361 And Mouse.Y < 389 Then
- If PrguseTex(62).Tex Is Nothing Then
- CreateTexture PrguseTex(62), ResPath & "DataPrguse.Wil"
- End If
- mRECT.Left = 0
- mRECT.Right = PrguseTex(62).Wid
- mRECT.Top = 0
- mRECT.bottom = PrguseTex(62).Hei
- Draw PrguseTex(62).Tex, 522, 360, mRECT
- End If
- End If
- '/////// 画注册玩家角色
- mPicSpeed = mPicSpeed + 1
- If mPicSpeed > 15 Then
- mPicSpeed = 0
- mPic = mPic + 1
- If mPic > 15 Then
- mPic = 0
- End If
- End If
- PicNum = RegHeroJob * 40 + 40 + mPic + RegHeroSex * 120
- If ChrSelTex(PicNum).Tex Is Nothing Then
- CreateTexture ChrSelTex(PicNum), ResPath & "DataChrSel.wil"
- End If
- mRECT.Left = 0
- mRECT.Right = ChrSelTex(PicNum).Wid
- mRECT.Top = 0
- mRECT.bottom = ChrSelTex(PicNum).Hei
- If RegHeroSex = 男 Then
- Select Case RegHeroJob
- Case JobType.战士
- DrawX = 60
- DrawY = 40
- Case JobType.法师
- DrawX = 70
- DrawY = 35
- Case JobType.道士
- DrawX = 80
- DrawY = 60
- End Select
- ElseIf RegHeroSex = 女 Then
- Select Case RegHeroJob
- Case JobType.战士
- DrawX = 55
- DrawY = 45
- Case JobType.法师
- DrawX = 130
- DrawY = 80
- Case JobType.道士
- DrawX = 135
- DrawY = 80
- End Select
- End If
- Draw ChrSelTex(PicNum).Tex, DrawX, DrawY, mRECT
- End Sub
- '////////// 画NPC信息窗口
- Public Sub DrawNpcInfoFrm()
- If NpcFrm.State = True Then
- If PrguseTex(384).Tex Is Nothing Then
- CreateTexture PrguseTex(384), ResPath & "DataPrguse.wil"
- End If
- mRECT.Left = 0
- mRECT.Right = PrguseTex(384).Wid
- mRECT.Top = 0
- mRECT.bottom = PrguseTex(384).Hei
- Draw PrguseTex(384).Tex, 0, 0, mRECT
- DrawScript
- '///////// 画关闭按钮
- ' If Mouse.X > 402 And Mouse.X < 411 And _
- ' Mouse.Y > 4 And Mouse.Y < 19 Then
- ' NpcFrm.State = False
- ' End If
- End If
- End Sub
- '////////// 画交易窗 口
- Public Sub DrawJiaoYiFrm()
- Dim i As Integer, j As Integer
- Dim ItemNum As Integer
- If JiaoYi.State = True Then
- '////////////// 画被交易方窗口
- If PrguseTex(390).Tex Is Nothing Then
- CreateTexture PrguseTex(390), ResPath & "DataPrguse.wil"
- End If
- mRECT.Left = 0
- mRECT.Right = PrguseTex(390).Wid
- mRECT.Top = 0
- mRECT.bottom = PrguseTex(390).Hei
- Draw PrguseTex(390).Tex, 350, 20, mRECT
- '////////// 画被交易方物品
- For i = 0 To 9
- If JiaoYi.BeiJiaoYiItems(i).State = True Then
- If ItemsTex(JiaoYi.BeiJiaoYiItems(i).Item.Looks).Tex Is Nothing Then
- ' CreateTexture ItemsTex(JiaoYi.BeiJiaoYiItems(i).Item.Looks).Tex, respath & "DataItems" & Format(JiaoYi.BeiJiaoYiItems(i).Item.Looks, "000000") & ".bmp"
- CreateTexture ItemsTex(JiaoYi.BeiJiaoYiItems(i).Item.Looks), ResPath & "DataItems.wil"
- End If
- mRECT.Left = 0
- mRECT.Right = ItemsTex(JiaoYi.BeiJiaoYiItems(i).Item.Looks).Wid
- mRECT.Top = 0
- mRECT.bottom = ItemsTex(JiaoYi.BeiJiaoYiItems(i).Item.Looks).Hei
- Draw ItemsTex(JiaoYi.BeiJiaoYiItems(i).Item.Looks).Tex, 372 + (i Mod 5) * 36, 76 + (i 5) * 32, mRECT
- End If
- Next
- '/////////////////////////////
- mRECT.Left = 410
- mRECT.Right = mRECT.Left + 100
- mRECT.Top = 26
- mRECT.bottom = mRECT.Top + 20
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 255, 255, 255), Player(JiaoYi.JiaoYiPlayerNum).Name_名字, mRECT, DT_CENTER
- '//////////// 画交易客口
- If PrguseTex(389).Tex Is Nothing Then
- CreateTexture PrguseTex(389), ResPath & "DataPrguse.wil"
- End If
- mRECT.Left = 0
- mRECT.Right = PrguseTex(389).Wid
- mRECT.Top = 0
- mRECT.bottom = PrguseTex(389).Hei
- Draw PrguseTex(389).Tex, 350, 180, mRECT
- If Mouse.SelFrm = JiaoYiFrom Then
- If Mouse.Button1Down = True Then
- If Mouse.X > 571 And Mouse.X < 583 And _
- Mouse.Y > 223 And Mouse.Y < 240 Then
- If PrguseTex(371).Tex Is Nothing Then
- CreateTexture PrguseTex(371), ResPath & "DataPrguse.wil"
- End If
- mRECT.Left = 0
- mRECT.Right = PrguseTex(371).Wid
- mRECT.Top = 0
- mRECT.bottom = PrguseTex(371).Hei
- Draw PrguseTex(371).Tex, 570, 222, mRECT
- End If
- If Mouse.X > 505 And Mouse.X < 546 And _
- Mouse.Y > 307 And Mouse.Y < 322 Then
- If PrguseTex(391).Tex Is Nothing Then
- CreateTexture PrguseTex(391), ResPath & "DataPrguse.wil"
- End If
- mRECT.Left = 0
- mRECT.Right = PrguseTex(391).Wid
- mRECT.Top = 0
- mRECT.bottom = PrguseTex(391).Hei
- Draw PrguseTex(391).Tex, 506, 308, mRECT
- End If
- End If
- End If
- '////////////// 画交易物品
- For i = 0 To 9
- If JiaoYi.JiaoYiItems(i).State = True Then
- If ItemsTex(JiaoYi.JiaoYiItems(i).Item.Looks).Tex Is Nothing Then
- CreateTexture ItemsTex(JiaoYi.JiaoYiItems(i).Item.Looks), ResPath & "DataItems.Wil"
- End If
- mRECT.Left = 0
- mRECT.Right = ItemsTex(JiaoYi.JiaoYiItems(i).Item.Looks).Wid
- mRECT.Top = 0
- mRECT.bottom = ItemsTex(JiaoYi.JiaoYiItems(i).Item.Looks).Hei
- Draw ItemsTex(JiaoYi.JiaoYiItems(i).Item.Looks).Tex, 372 + (i Mod 5) * 36, 236 + (i 5) * 32, mRECT
- End If
- Next
- '///////////////////////////
- mRECT.Left = 410
- mRECT.Right = mRECT.Left + 100
- mRECT.Top = 186
- mRECT.bottom = mRECT.Top + 20
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 255, 255, 255), Player(MainHeroNum).Name_名字, mRECT, DT_CENTER
- End If
- End Sub
- '/////////// 画警告窗口
- Public Sub DrawErrorFrm()
- Dim i As Integer, nStr As String
- If ErrorFrm.State = True Then
- If PrguseTex(360).Tex Is Nothing Then
- CreateTexture PrguseTex(360), ResPath & "DataPrguse.wil"
- End If
- mRECT.Left = 0
- mRECT.Right = PrguseTex(360).Wid
- mRECT.Top = 0
- mRECT.bottom = PrguseTex(360).Hei
- Draw PrguseTex(360).Tex, ErrorFrm.X, ErrorFrm.Y, mRECT
- If ErrorStr <> "" Then
- mRECT.Left = ErrorFrm.X + 30
- mRECT.Right = mRECT.Left + 350
- mRECT.Top = ErrorFrm.Y + 30
- mRECT.bottom = mRECT.Top + 130
- D3DX.DrawText D3DFont2, D3DColorRGBA(255, 255, 255, 255), ErrorStr, mRECT, DT_LEFT
- End If
- If PrguseTex(361).Tex Is Nothing Then
- CreateTexture PrguseTex(361), ResPath & "DataPrguse.wil"
- End If
- mRECT.Left = 0
- mRECT.Right = PrguseTex(361).Wid
- mRECT.Top = 0
- mRECT.bottom = PrguseTex(361).Hei
- Draw PrguseTex(361).Tex, ErrorFrm.X + 330, ErrorFrm.Y + 130, mRECT
- If Mouse.SelFrm = ErrorFrom Then
- If Mouse.Button1Down = True Then
- If Mouse.X > ErrorFrm.X + 330 And Mouse.X < ErrorFrm.X + 330 + PrguseTex(361).Wid And _
- Mouse.Y > ErrorFrm.Y + 130 And Mouse.Y < ErrorFrm.Y + 130 + PrguseTex(361).Hei Then
- If PrguseTex(362).Tex Is Nothing Then
- CreateTexture PrguseTex(362), ResPath & "DataPrguse.wil"
- End If
- mRECT.Left = 0
- mRECT.Right = PrguseTex(362).Wid
- mRECT.Top = 0
- mRECT.bottom = PrguseTex(362).Hei
- Draw PrguseTex(362).Tex, ErrorFrm.X + 330, ErrorFrm.Y + 130, mRECT
- End If
- End If
- End If
- End If
- End Sub
- '//////////// 画鼠标物品
- Public Sub DrawMouseItem()
- If Mouse.Item.State = True Then
- If Mouse.Item.Item.Looks < UBound(ItemsTex) Then
- If ItemsTex(Mouse.Item.Item.Looks).Tex Is Nothing Then
- CreateTexture ItemsTex(Mouse.Item.Item.Looks), ResPath & "DataItems.Wil"
- End If
- GetRect ItemsTex(Mouse.Item.Item.Looks).Wid, ItemsTex(Mouse.Item.Item.Looks).Hei, Mouse.X - 10, Mouse.Y - 10, mRECT
- Draw ItemsTex(Mouse.Item.Item.Looks).Tex, Mouse.X - 10, Mouse.Y - 10, mRECT
- End If
- End If
- End Sub
- '//////////// 画包裹窗口
- Public Sub DrawBagFrm()
- Dim i As Integer, ItemNum As Integer
- If BagFrm.State = True Then
- If PrguseTex(3).Tex Is Nothing Then
- CreateTexture PrguseTex(3), ResPath & "DataPrguse.wil"
- End If
- mRECT.Left = 0
- mRECT.Right = PrguseTex(3).Wid
- mRECT.Top = 0
- mRECT.bottom = PrguseTex(3).Hei
- Draw PrguseTex(3).Tex, BagFrm.X, BagFrm.Y, mRECT, , , , D3DColorRGBA(255, 255, 255, 200)
- For i = 0 To 39
- If Bag(i).State = True Then
- If Bag(i).Item.Looks < UBound(ItemsTex) Then
- If ItemsTex(Bag(i).Item.Looks).Tex Is Nothing Then
- CreateTexture ItemsTex(Bag(i).Item.Looks), ResPath & "DataItems.wil"
- End If
- GetRect ItemsTex(Bag(i).Item.Looks).Wid, ItemsTex(Bag(i).Item.Looks).Hei, BagFrm.X, BagFrm.Y, mRECT
- Draw ItemsTex(Bag(i).Item.Looks).Tex, BagFrm.X + 20 + (i Mod 8) * 36, BagFrm.Y + 14 + (i 8) * 32, mRECT
- End If
- End If
- Next
- If Mouse.SelFrm = BagFrom Then
- If Mouse.X > BagFrm.X + 20 And Mouse.X < BagFrm.X + 304 And _
- Mouse.Y > BagFrm.Y + 14 And Mouse.Y < BagFrm.Y + 174 Then
- ItemNum = (((Mouse.X - BagFrm.X - 20) 36) Mod 8) + ((Mouse.Y - BagFrm.Y - 14) 32) * 8
- If Bag(ItemNum).State = True Then
- DrawItemInfo BagFrm.X + 70, BagFrm.Y + 216, Bag(ItemNum).Item
- End If
- End If
- End If
- If Mouse.SelFrm = JiaoYiFrom Then
- '///////// 显示交易窗口物品信息
- If Mouse.X > 372 And Mouse.X < 549 And _
- Mouse.Y > 237 And Mouse.Y < 298 Then
- ItemNum = (((Mouse.X - 372) 36) Mod 5) + ((Mouse.Y - 237) 32) * 5
- If JiaoYi.JiaoYiItems(ItemNum).State = True Then
- DrawItemInfo BagFrm.X + 70, BagFrm.Y + 216, JiaoYi.JiaoYiItems(ItemNum).Item
- End If
- ElseIf Mouse.X > 372 And Mouse.X < 549 And _
- Mouse.Y > 77 And Mouse.Y < 138 Then
- ItemNum = (((Mouse.X - 372) 36) Mod 5) + ((Mouse.Y - 77) 32) * 5
- If JiaoYi.BeiJiaoYiItems(ItemNum).State = True Then
- DrawItemInfo BagFrm.X + 70, BagFrm.Y + 216, JiaoYi.BeiJiaoYiItems(ItemNum).Item
- End If
- End If
- End If
- '//////////// 显示金币
- mRECT.Left = BagFrm.X + 60
- mRECT.Right = BagFrm.X + 205
- mRECT.Top = BagFrm.Y + 180
- mRECT.bottom = BagFrm.Y + 199
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 255, 255, 255), Format(Player(MainHeroNum).Gold_金币, "###,###"), mRECT, DT_RIGHT
- End If
- '//////////////// 显示关闭按扭
- If Mouse.SelFrm = BagFrom Then
- If Mouse.Button1Down = True Then
- If Mouse.X > BagFrm.X + 312 And Mouse.X < BagFrm.X + 322 And _
- Mouse.Y > BagFrm.Y + 206 And Mouse.Y < BagFrm.Y + 221 Then
- If PrguseTex(371).Tex Is Nothing Then
- CreateTexture PrguseTex(371), ResPath & "DataPrguse.wil"
- End If
- mRECT.Left = 0
- mRECT.Right = PrguseTex(371).Wid
- mRECT.Top = 0
- mRECT.bottom = PrguseTex(371).Hei
- Draw PrguseTex(371).Tex, BagFrm.X + 310, BagFrm.Y + 203, mRECT
- End If
- End If
- End If
- End Sub
- '/////////// 画主角信息窗口
- Public Sub DrawHeroInfoFrm(PlayerNum As Integer)
- Dim i As Integer
- If HeroInfoFrm.State = True Then
- If Prguse3Tex(207).Tex Is Nothing Then
- CreateTexture Prguse3Tex(207), ResPath & "DataPrguse3.wil"
- End If
- mRECT.Left = 0
- mRECT.Right = Prguse3Tex(207).Wid
- mRECT.Top = 0
- mRECT.bottom = Prguse3Tex(207).Hei
- Draw Prguse3Tex(207).Tex, HeroInfoFrm.X, HeroInfoFrm.Y, mRECT, , , , D3DColorRGBA(255, 255, 255, 200)
- Select Case HeroInfoFrm.Type
- Case 0 '显示主角装备窗口
- If Prguse3Tex(29 + Player(MainHeroNum).Sex_性别).Tex Is Nothing Then
- CreateTexture Prguse3Tex(29 + Player(MainHeroNum).Sex_性别), ResPath & "DataPrguse3.wil"
- End If
- GetRect Prguse3Tex(29 + Player(MainHeroNum).Sex_性别).Wid, Prguse3Tex(29 + Player(MainHeroNum).Sex_性别).Hei, HeroInfoFrm.X, HeroInfoFrm.Y, mRECT
- Draw Prguse3Tex(29 + Player(MainHeroNum).Sex_性别).Tex, HeroInfoFrm.X + 38, HeroInfoFrm.Y + 52, mRECT
- ' ////// 显示衣服
- If Player(PlayerNum).Clothing.State = True Then
- If StateItemTex(Player(PlayerNum).Clothing.Item.Looks).Tex Is Nothing Then
- CreateTexture StateItemTex(Player(PlayerNum).Clothing.Item.Looks), ResPath & "DataStateItem.wil"
- End If
- GetRect StateItemTex(Player(PlayerNum).Clothing.Item.Looks).Wid, StateItemTex(Player(PlayerNum).Clothing.Item.Looks).Hei, HeroInfoFrm.X, HeroInfoFrm.Y, mRECT
- Draw StateItemTex(Player(PlayerNum).Clothing.Item.Looks).Tex, HeroInfoFrm.X + 32 + StateItemTex(Player(PlayerNum).Clothing.Item.Looks).PosX, HeroInfoFrm.Y + 95 + StateItemTex(Player(PlayerNum).Clothing.Item.Looks).PosY, mRECT
- End If
- ' 显示武器
- If Player(PlayerNum).Weapon.State = True Then
- If StateItemTex(Player(PlayerNum).Weapon.Item.Looks).Tex Is Nothing Then
- CreateTexture StateItemTex(Player(PlayerNum).Weapon.Item.Looks), ResPath & "DataStateItem.wil"
- End If
- GetRect StateItemTex(Player(PlayerNum).Weapon.Item.Looks).Wid, StateItemTex(Player(PlayerNum).Weapon.Item.Looks).Hei, HeroInfoFrm.X, HeroInfoFrm.Y, mRECT
- Draw StateItemTex(Player(PlayerNum).Weapon.Item.Looks).Tex, HeroInfoFrm.X + 32 + StateItemTex(Player(PlayerNum).Weapon.Item.Looks).PosX, HeroInfoFrm.Y + 95 + StateItemTex(Player(PlayerNum).Weapon.Item.Looks).PosY, mRECT
- End If
- '//// 显示头盔
- If Player(PlayerNum).HeadPiece.State = True Then
- If StateItemTex(Player(PlayerNum).HeadPiece.Item.Looks).Tex Is Nothing Then
- CreateTexture StateItemTex(Player(PlayerNum).HeadPiece.Item.Looks), ResPath & "DataStateItem.wil"
- End If
- GetRect StateItemTex(Player(PlayerNum).HeadPiece.Item.Looks).Wid, StateItemTex(Player(PlayerNum).HeadPiece.Item.Looks).Hei, HeroInfoFrm.X, HeroInfoFrm.Y, mRECT
- Draw StateItemTex(Player(PlayerNum).HeadPiece.Item.Looks).Tex, HeroInfoFrm.X + 32 + StateItemTex(Player(PlayerNum).HeadPiece.Item.Looks).PosX, HeroInfoFrm.Y + 95 + StateItemTex(Player(PlayerNum).HeadPiece.Item.Looks).PosY, mRECT
- End If
- '////////////// 显示项链
- If Player(PlayerNum).Necklace.State = True Then
- If StateItemTex(Player(PlayerNum).Necklace.Item.Looks).Tex Is Nothing Then
- CreateTexture StateItemTex(Player(PlayerNum).Necklace.Item.Looks), ResPath & "DataStateItem.wil"
- End If
- GetRect StateItemTex(Player(PlayerNum).Necklace.Item.Looks).Wid, StateItemTex(Player(PlayerNum).Necklace.Item.Looks).Hei, HeroInfoFrm.X, HeroInfoFrm.Y, mRECT
- Draw StateItemTex(Player(PlayerNum).Necklace.Item.Looks).Tex, HeroInfoFrm.X + 159 + StateItemTex(Player(PlayerNum).Necklace.Item.Looks).PosX, HeroInfoFrm.Y + 120 + StateItemTex(Player(PlayerNum).Necklace.Item.Looks).PosY, mRECT
- End If
- '///////////////显示左手镯
- If Player(PlayerNum).BraceletLeft.State = True Then
- If StateItemTex(Player(PlayerNum).BraceletLeft.Item.Looks).Tex Is Nothing Then
- CreateTexture StateItemTex(Player(PlayerNum).BraceletLeft.Item.Looks), ResPath & "DataStateItem.wil"
- End If
- GetRect StateItemTex(Player(PlayerNum).BraceletLeft.Item.Looks).Wid, StateItemTex(Player(PlayerNum).BraceletLeft.Item.Looks).Hei, HeroInfoFrm.X, HeroInfoFrm.Y, mRECT
- Draw StateItemTex(Player(PlayerNum).BraceletLeft.Item.Looks).Tex, HeroInfoFrm.X + 39 + StateItemTex(Player(PlayerNum).BraceletLeft.Item.Looks).PosX, HeroInfoFrm.Y + 224 + StateItemTex(Player(PlayerNum).BraceletLeft.Item.Looks).PosY, mRECT
- End If
- '///////////////显示右手镯
- If Player(PlayerNum).BraceletRight.State = True Then
- If StateItemTex(Player(PlayerNum).BraceletRight.Item.Looks).Tex Is Nothing Then
- CreateTexture StateItemTex(Player(PlayerNum).BraceletRight.Item.Looks), ResPath & "DataStateItem.wil"
- End If
- GetRect StateItemTex(Player(PlayerNum).BraceletRight.Item.Looks).Wid, StateItemTex(Player(PlayerNum).BraceletRight.Item.Looks).Hei, HeroInfoFrm.X, HeroInfoFrm.Y, mRECT
- Draw StateItemTex(Player(PlayerNum).BraceletRight.Item.Looks).Tex, HeroInfoFrm.X + 165 + StateItemTex(Player(PlayerNum).BraceletRight.Item.Looks).PosX, HeroInfoFrm.Y + 224 + StateItemTex(Player(PlayerNum).BraceletRight.Item.Looks).PosY, mRECT
- End If
- '////////////// 显示左戒指
- If Player(PlayerNum).FingerringLeft.State = True Then
- If StateItemTex(Player(PlayerNum).FingerringLeft.Item.Looks).Tex Is Nothing Then
- CreateTexture StateItemTex(Player(PlayerNum).FingerringLeft.Item.Looks), ResPath & "DataStateItem.wil"
- End If
- GetRect StateItemTex(Player(PlayerNum).FingerringLeft.Item.Looks).Wid, StateItemTex(Player(PlayerNum).FingerringLeft.Item.Looks).Hei, HeroInfoFrm.X, HeroInfoFrm.Y, mRECT
- Draw StateItemTex(Player(PlayerNum).FingerringLeft.Item.Looks).Tex, HeroInfoFrm.X + 42 + StateItemTex(Player(PlayerNum).FingerringLeft.Item.Looks).PosX, HeroInfoFrm.Y + 265 + StateItemTex(Player(PlayerNum).FingerringLeft.Item.Looks).PosY, mRECT
- End If
- '////////////// 显示右戒指
- If Player(PlayerNum).FingerringRight.State = True Then
- If StateItemTex(Player(PlayerNum).FingerringRight.Item.Looks).Tex Is Nothing Then
- CreateTexture StateItemTex(Player(PlayerNum).FingerringRight.Item.Looks), ResPath & "DataStateItem.wil"
- End If
- GetRect StateItemTex(Player(PlayerNum).FingerringRight.Item.Looks).Wid, StateItemTex(Player(PlayerNum).FingerringRight.Item.Looks).Hei, HeroInfoFrm.X, HeroInfoFrm.Y, mRECT
- Draw StateItemTex(Player(PlayerNum).FingerringRight.Item.Looks).Tex, HeroInfoFrm.X + 168 + StateItemTex(Player(PlayerNum).FingerringRight.Item.Looks).PosX, HeroInfoFrm.Y + 265 + StateItemTex(Player(PlayerNum).FingerringRight.Item.Looks).PosY, mRECT
- End If
- Case 1 '显示主角攻击信息
- '//////////// 显示物防
- mRECT.Left = HeroInfoFrm.X + 110
- mRECT.Right = HeroInfoFrm.X + 178
- mRECT.Top = HeroInfoFrm.Y + 97
- mRECT.bottom = HeroInfoFrm.Y + 110
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 255, 255, 255), Player(MainHeroNum).AC1 & "-" & Player(MainHeroNum).AC2, mRECT, DT_LEFT
- '///////// 显示魔防
- mRECT.Left = HeroInfoFrm.X + 110
- mRECT.Right = HeroInfoFrm.X + 178
- mRECT.Top = HeroInfoFrm.Y + 117
- mRECT.bottom = HeroInfoFrm.Y + 129
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 255, 255, 255), Player(MainHeroNum).MAC1 & "-" & Player(MainHeroNum).MAC2, mRECT, DT_LEFT
- '//////// 显示攻击
- mRECT.Left = HeroInfoFrm.X + 110
- mRECT.Right = HeroInfoFrm.X + 178
- mRECT.Top = HeroInfoFrm.Y + 137
- mRECT.bottom = HeroInfoFrm.Y + 150
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 255, 255, 255), Player(MainHeroNum).DC1 & "-" & Player(MainHeroNum).DC2, mRECT, DT_LEFT
- '///////// 显示魔术
- mRECT.Left = HeroInfoFrm.X + 110
- mRECT.Right = HeroInfoFrm.X + 178
- mRECT.Top = HeroInfoFrm.Y + 157
- mRECT.bottom = HeroInfoFrm.Y + 170
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 255, 255, 255), Player(MainHeroNum).MC1 & "-" & Player(MainHeroNum).MC2, mRECT, DT_LEFT
- '///////// 显示道术
- mRECT.Left = HeroInfoFrm.X + 110
- mRECT.Right = HeroInfoFrm.X + 178
- mRECT.Top = HeroInfoFrm.Y + 177
- mRECT.bottom = HeroInfoFrm.Y + 190
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 255, 255, 255), Player(MainHeroNum).SC1 & "-" & Player(MainHeroNum).SC2, mRECT, DT_LEFT
- '///////// 显示HP
- mRECT.Left = HeroInfoFrm.X + 110
- mRECT.Right = HeroInfoFrm.X + 178
- mRECT.Top = HeroInfoFrm.Y + 198
- mRECT.bottom = HeroInfoFrm.Y + 210
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 255, 255, 255), Player(MainHeroNum).HP & "/" & Player(MainHeroNum).MaxHP, mRECT, DT_LEFT
- '///////// 显示MP
- mRECT.Left = HeroInfoFrm.X + 110
- mRECT.Right = HeroInfoFrm.X + 178
- mRECT.Top = HeroInfoFrm.Y + 218
- mRECT.bottom = HeroInfoFrm.Y + 230
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 255, 255, 255), Player(MainHeroNum).MP & "/" & Player(MainHeroNum).MaxMP, mRECT, DT_LEFT
- Case 2 '显示主角技能信息
- If Prguse3Tex(33).Tex Is Nothing Then
- CreateTexture Prguse3Tex(33), ResPath & "DataPrguse3.wil"
- End If
- GetRect Prguse3Tex(33).Wid, Prguse3Tex(33).Hei, HeroInfoFrm.X, HeroInfoFrm.Y, mRECT
- Draw Prguse3Tex(33).Tex, HeroInfoFrm.X + 38, HeroInfoFrm.Y + 52, mRECT
- Case 3 '显示主角其他信息
- If Prguse3Tex(32).Tex Is Nothing Then
- CreateTexture Prguse3Tex(32), ResPath & "DataPrguse3.wil"
- End If
- GetRect Prguse3Tex(32).Wid, Prguse3Tex(32).Hei, HeroInfoFrm.X, HeroInfoFrm.Y, mRECT
- Draw Prguse3Tex(32).Tex, HeroInfoFrm.X + 38, HeroInfoFrm.Y + 52, mRECT
- End Select
- ' 显示装备属性
- If Mouse.SelFrm = HeroInfoFrom And HeroInfoFrm.Type = 0 Then
- If Mouse.X > HeroInfoFrm.X + 100 And Mouse.Y > HeroInfoFrm.Y + 115 And _
- Mouse.X < HeroInfoFrm.X + 163 And Mouse.Y < HeroInfoFrm.Y + 245 Then
- If Player(PlayerNum).Clothing.State = True Then
- DrawItemInfo HeroInfoFrm.X + 40, HeroInfoFrm.Y + 310, Player(PlayerNum).Clothing.Item
- End If
- End If
- If Mouse.X > HeroInfoFrm.X + 43 And Mouse.Y > HeroInfoFrm.Y + 63 And _
- Mouse.X < HeroInfoFrm.X + 93 And Mouse.Y < HeroInfoFrm.Y + 163 Then
- If Player(PlayerNum).Weapon.State = True Then
- DrawItemInfo HeroInfoFrm.X + 40, HeroInfoFrm.Y + 310, Player(PlayerNum).Weapon.Item
- End If
- End If
- If Mouse.X > HeroInfoFrm.X + 120 And Mouse.Y > HeroInfoFrm.Y + 90 And _
- Mouse.X < HeroInfoFrm.X + 145 And Mouse.Y < HeroInfoFrm.Y + 115 Then
- If Player(PlayerNum).HeadPiece.State = True Then
- DrawItemInfo HeroInfoFrm.X + 40, HeroInfoFrm.Y + 310, Player(PlayerNum).HeadPiece.Item
- End If
- End If
- If Mouse.X > HeroInfoFrm.X + 180 And Mouse.Y > HeroInfoFrm.Y + 85 And _
- Mouse.X < HeroInfoFrm.X + 210 And Mouse.Y < HeroInfoFrm.Y + 115 Then
- If Player(PlayerNum).Necklace.State = True Then
- DrawItemInfo HeroInfoFrm.X + 40, HeroInfoFrm.Y + 310, Player(PlayerNum).Necklace.Item
- End If
- End If
- If Mouse.X > HeroInfoFrm.X + 46 And Mouse.Y > HeroInfoFrm.Y + 175 And _
- Mouse.X < HeroInfoFrm.X + 76 And Mouse.Y < HeroInfoFrm.Y + 205 Then
- If Player(PlayerNum).BraceletLeft.State = True Then
- DrawItemInfo HeroInfoFrm.X + 40, HeroInfoFrm.Y + 310, Player(PlayerNum).BraceletLeft.Item
- End If
- End If
- If Mouse.X > HeroInfoFrm.X + 180 And Mouse.Y > HeroInfoFrm.Y + 175 And _
- Mouse.X < HeroInfoFrm.X + 210 And Mouse.Y < HeroInfoFrm.Y + 205 Then
- If Player(PlayerNum).BraceletRight.State = True Then
- DrawItemInfo HeroInfoFrm.X + 40, HeroInfoFrm.Y + 310, Player(PlayerNum).BraceletRight.Item
- End If
- End If
- If Mouse.X > HeroInfoFrm.X + 46 And Mouse.Y > HeroInfoFrm.Y + 215 And _
- Mouse.X < HeroInfoFrm.X + 76 And Mouse.Y < HeroInfoFrm.Y + 245 Then
- If Player(PlayerNum).FingerringLeft.State = True Then
- DrawItemInfo HeroInfoFrm.X + 40, HeroInfoFrm.Y + 310, Player(PlayerNum).FingerringLeft.Item
- End If
- End If
- If Mouse.X > HeroInfoFrm.X + 170 And Mouse.Y > HeroInfoFrm.Y + 215 And _
- Mouse.X < HeroInfoFrm.X + 210 And Mouse.Y < HeroInfoFrm.Y + 245 Then
- If Player(PlayerNum).FingerringRight.State = True Then
- DrawItemInfo HeroInfoFrm.X + 40, HeroInfoFrm.Y + 310, Player(PlayerNum).FingerringRight.Item
- End If
- End If
- End If
- '////显示主角名
- mRECT.Left = HeroInfoFrm.X + 87
- mRECT.Right = mRECT.Left + 70
- mRECT.Top = HeroInfoFrm.Y + 23
- mRECT.bottom = mRECT.Top + 25
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 255, 255, 255), Player(PlayerNum).Name_名字, mRECT, DT_CENTER
- If Mouse.SelFrm = HeroInfoFrom Then
- If Mouse.Button1Down = True Then
- If Mouse.X > HeroInfoFrm.X + 10 And Mouse.X < HeroInfoFrm.X + 27 And _
- Mouse.Y > HeroInfoFrm.Y + 131 And Mouse.Y < HeroInfoFrm.Y + 146 Then
- If PrguseTex(373).Tex Is Nothing Then
- CreateTexture PrguseTex(373), ResPath & "DataPrguse.wil"
- End If
- mRECT.Left = 0
- mRECT.Right = PrguseTex(373).Wid
- mRECT.Top = 0
- mRECT.bottom = PrguseTex(373).Hei
- Draw PrguseTex(373).Tex, HeroInfoFrm.X + 7, HeroInfoFrm.Y + 128, mRECT
- ElseIf Mouse.X > HeroInfoFrm.X + 10 And Mouse.X < HeroInfoFrm.X + 27 And _
- Mouse.Y > HeroInfoFrm.Y + 190 And Mouse.Y < HeroInfoFrm.Y + 205 Then
- If PrguseTex(372).Tex Is Nothing Then
- CreateTexture PrguseTex(372), ResPath & "DataPrguse.wil"
- End If
- mRECT.Left = 0
- mRECT.Right = PrguseTex(372).Wid
- mRECT.Top = 0
- mRECT.bottom = PrguseTex(372).Hei
- Draw PrguseTex(372).Tex, HeroInfoFrm.X + 7, HeroInfoFrm.Y + 187, mRECT
- ElseIf Mouse.X > HeroInfoFrm.X + 11 And Mouse.X < HeroInfoFrm.X + 20 And _
- Mouse.Y > HeroInfoFrm.Y + 42 And Mouse.Y < HeroInfoFrm.Y + 57 Then
- If PrguseTex(371).Tex Is Nothing Then
- CreateTexture PrguseTex(371), ResPath & "DataPrguse.wil"
- End If
- mRECT.Left = 0
- mRECT.Right = PrguseTex(371).Wid
- mRECT.Top = 0
- mRECT.bottom = PrguseTex(371).Hei
- Draw PrguseTex(371).Tex, HeroInfoFrm.X + 9, HeroInfoFrm.Y + 40, mRECT
- End If
- End If
- End If
- End If
- End Sub
- Public Sub DrawItemInfo(X As Long, Y As Long, Item As ItemType)
- Dim i As Integer
- Dim Str As String
- mRECT.Left = X
- mRECT.Right = mRECT.Left + Len(Item.Name) * 12
- mRECT.Top = Y
- mRECT.bottom = mRECT.Top + 20
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 200, 0, 255), Item.Name, mRECT, DT_LEFT
- mRECT.Left = X + Len(Item.Name) * 12 + 5
- mRECT.Right = mRECT.Left + 50
- mRECT.Top = Y
- mRECT.bottom = mRECT.Top + 20
- D3DX.DrawText D3DFont, D3DColorRGBA(200, 200, 200, 255), "重量 " & Item.Weight, mRECT, DT_LEFT
- Select Case Item.StdMode
- Case 4 '书籍
- mRECT.Left = X
- mRECT.Right = mRECT.Left + 200
- mRECT.Top = Y + 30
- mRECT.bottom = mRECT.Top + 20
- Select Case Item.Shape
- Case 0
- If Player(MainHeroNum).Job_职业 = Item.Shape Then
- D3DX.DrawText D3DFont, D3DColorRGBA(200, 200, 200, 255), "战士秘极", mRECT, DT_LEFT
- Else
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 0, 0, 255), "战士秘极", mRECT, DT_LEFT
- End If
- Case 1
- If Player(MainHeroNum).Job_职业 = Item.Shape Then
- D3DX.DrawText D3DFont, D3DColorRGBA(200, 200, 200, 255), "法师秘极", mRECT, DT_LEFT
- Else
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 0, 0, 255), "法师秘极", mRECT, DT_LEFT
- End If
- Case 2
- If Player(MainHeroNum).Job_职业 = Item.Shape Then
- D3DX.DrawText D3DFont, D3DColorRGBA(200, 200, 200, 255), "道士秘极", mRECT, DT_LEFT
- Else
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 0, 0, 255), "道士秘极", mRECT, DT_LEFT
- End If
- End Select
- Case 5, 6
- If Item.Dc > 0 Or Item.DC2 > 0 Then
- Str = "攻击 " & Item.Dc & "-" & Item.DC2
- End If
- If Item.MC Or Item.MC2 Then
- Str = Str & " 魔法 " & Item.MC & "-" & Item.MC2
- End If
- If Item.sc > 0 Or Item.SC2 > 0 Then
- Str = Str & " 道术 " & Item.sc & "-" & Item.SC2
- End If
- mRECT.Left = X
- mRECT.Right = mRECT.Left + Len(Str) * 20
- mRECT.Top = Y + 15
- mRECT.bottom = mRECT.Top + 20
- D3DX.DrawText D3DFont, D3DColorRGBA(200, 200, 200, 255), Str, mRECT, DT_LEFT
- mRECT.Left = X
- mRECT.Right = mRECT.Left + 200
- mRECT.Top = Y + 30
- mRECT.bottom = mRECT.Top + 20
- Select Case Item.Need
- Case 0
- If Player(MainHeroNum).Level < Item.NeedLevel Then
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 0, 0, 255), "需要等级 " & Item.NeedLevel, mRECT, DT_LEFT
- Else
- D3DX.DrawText D3DFont, D3DColorRGBA(200, 200, 200, 255), "需要等级 " & Item.NeedLevel, mRECT, DT_LEFT
- End If
- Case 1
- If Player(MainHeroNum).DC2 < Item.NeedLevel Then
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 0, 0, 255), "需要攻击 " & Item.NeedLevel, mRECT, DT_LEFT
- Else
- D3DX.DrawText D3DFont, D3DColorRGBA(200, 200, 200, 255), "需要攻击 " & Item.NeedLevel, mRECT, DT_LEFT
- End If
- Case 2
- If Player(MainHeroNum).MC2 < Item.NeedLevel Then
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 0, 0, 255), "需要魔法 " & Item.NeedLevel, mRECT, DT_LEFT
- Else
- D3DX.DrawText D3DFont, D3DColorRGBA(200, 200, 200, 255), "需要魔法 " & Item.NeedLevel, mRECT, DT_LEFT
- End If
- Case 3
- If Player(MainHeroNum).SC2 < Item.NeedLevel Then
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 0, 0, 255), "需要道术 " & Item.NeedLevel, mRECT, DT_LEFT
- Else
- D3DX.DrawText D3DFont, D3DColorRGBA(200, 200, 200, 255), "需要道术 " & Item.NeedLevel, mRECT, DT_LEFT
- End If
- End Select
- Case Is = 10, 11, 15, 22, 23, 24, 26
- If Item.AC > 0 Or Item.AC2 > 0 Then
- Str = "防御 " & Item.AC & "-" & Item.AC2 & " "
- End If
- If Item.MAC > 0 Or Item.MAC2 > 0 Then
- Str = Str & "魔御 " & Item.MAC & "-" & Item.MAC2 & " "
- End If
- If Item.Dc > 0 Or Item.DC2 > 0 Then
- Str = Str & "攻击 " & Item.Dc & "-" & Item.DC2 & " "
- End If
- If Item.MC > 0 Or Item.MC2 > 0 Then
- Str = Str & "魔法 " & Item.MC & "-" & Item.MC2 & " "
- End If
- If Item.sc > 0 Or Item.SC2 > 0 Then
- Str = Str & "道术 " & Item.sc & "-" & Item.SC2
- End If
- mRECT.Left = X
- mRECT.Right = mRECT.Left + Len(Str) * 20
- mRECT.Top = Y + 15
- mRECT.bottom = mRECT.Top + 20
- D3DX.DrawText D3DFont, D3DColorRGBA(200, 200, 200, 255), Str, mRECT, DT_LEFT
- mRECT.Left = X
- mRECT.Right = mRECT.Left + 200
- mRECT.Top = Y + 30
- mRECT.bottom = mRECT.Top + 20
- Select Case Item.Need
- Case 0
- If Player(MainHeroNum).Level < Item.NeedLevel Then
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 0, 0, 255), "需要等级 " & Item.NeedLevel, mRECT, DT_LEFT
- Else
- D3DX.DrawText D3DFont, D3DColorRGBA(200, 200, 200, 255), "需要等级 " & Item.NeedLevel, mRECT, DT_LEFT
- End If
- Case 1
- If Player(MainHeroNum).DC2 < Item.NeedLevel Then
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 0, 0, 255), "需要攻击 " & Item.NeedLevel, mRECT, DT_LEFT
- Else
- D3DX.DrawText D3DFont, D3DColorRGBA(200, 200, 200, 255), "需要攻击 " & Item.NeedLevel, mRECT, DT_LEFT
- End If
- Case 2
- If Player(MainHeroNum).MC2 < Item.NeedLevel Then
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 0, 0, 255), "需要魔法 " & Item.NeedLevel, mRECT, DT_LEFT
- Else
- D3DX.DrawText D3DFont, D3DColorRGBA(200, 200, 200, 255), "需要魔法 " & Item.NeedLevel, mRECT, DT_LEFT
- End If
- Case 3
- If Player(MainHeroNum).SC2 < Item.NeedLevel Then
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 0, 0, 255), "需要道术 " & Item.NeedLevel, mRECT, DT_LEFT
- Else
- D3DX.DrawText D3DFont, D3DColorRGBA(200, 200, 200, 255), "需要道术 " & Item.NeedLevel, mRECT, DT_LEFT
- End If
- End Select
- End Select
- End Sub
- '///////////// 画游戏操作界面
- Public Sub DrawPrguse()
- Dim i As Integer
- If PrguseTex(1).Tex Is Nothing Then
- CreateTexture PrguseTex(1), ResPath & "DataPrguse.wil"
- End If
- mRECT.Left = 0
- mRECT.Top = 0
- mRECT.Right = PrguseTex(1).Wid
- mRECT.bottom = PrguseTex(1).Hei
- Draw PrguseTex(1).Tex, 0, 349, mRECT
- If PrguseTex(4).Tex Is Nothing Then
- CreateTexture PrguseTex(4), ResPath & "DataPrguse.wil"
- End If
- If Player(MainHeroNum).HP > 0 Then
- mRECT.Left = 0
- mRECT.Top = PrguseTex(4).Hei - (Player(MainHeroNum).HP / Player(MainHeroNum).MaxHP) * 90
- mRECT.Right = PrguseTex(4).Wid / 2
- mRECT.bottom = PrguseTex(4).Hei
- Draw PrguseTex(4).Tex, 40, SCREEN_HEIGHT - 69 - (Player(MainHeroNum).HP / Player(MainHeroNum).MaxHP) * 90, mRECT
- End If
- mRECT.Left = PrguseTex(4).Wid / 2
- mRECT.Top = 0
- mRECT.Right = PrguseTex(4).Wid
- mRECT.bottom = PrguseTex(4).Hei
- Draw PrguseTex(4).Tex, 86, SCREEN_HEIGHT - 69 - 90, mRECT
- '//////// 显示攻击模式
- mRECT.Left = 638
- mRECT.Right = mRECT.Left + 65
- mRECT.Top = 461
- mRECT.bottom = mRECT.Top + 13
- Select Case Hero.攻击模式
- Case 攻击模式属性.和平攻击模式
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 255, 255, 255), "和平攻击", mRECT, DT_CENTER
- Case 攻击模式属性.编组攻击模式
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 255, 255, 255), "编组攻击", mRECT, DT_CENTER
- Case 攻击模式属性.全体攻击模式
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 255, 255, 255), "全体攻击", mRECT, DT_CENTER
- Case 攻击模式属性.行会攻击模式
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 255, 255, 255), "行会攻击", mRECT, DT_CENTER
- End Select
- '/////// 显示玩家等级
- mRECT.Left = 665
- mRECT.Right = 690
- mRECT.Top = 496
- mRECT.bottom = 506
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 255, 255, 255), Player(MainHeroNum).Level, mRECT, DT_CENTER
- '////// 显示玩家经验
- If Player(MainHeroNum).MaxExp_所需经验 > 0 Then
- If PrguseTex(7).Tex Is Nothing Then
- CreateTexture PrguseTex(7), ResPath & "DataPrguse.Wil"
- End If
- mRECT.Left = 0
- mRECT.Top = 0
- mRECT.Right = (Player(MainHeroNum).Exp_经验值 / Player(MainHeroNum).MaxExp_所需经验) * PrguseTex(7).Wid
- mRECT.bottom = PrguseTex(7).Hei
- Draw PrguseTex(7).Tex, 664, 529, mRECT
- mRECT.Left = 664
- mRECT.Top = 515
- mRECT.Right = 800
- mRECT.bottom = mRECT.Top + 20
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 255, 255, 255), Player(MainHeroNum).Exp_经验值 & "/" & Player(MainHeroNum).MaxExp_所需经验, mRECT, DT_LEFT
- End If
- '//////////画地图按扭
- If PrguseTex(130).Tex Is Nothing Then
- CreateTexture PrguseTex(130), ResPath & "DataPrguse.Wil"
- End If
- mRECT.Left = 0
- mRECT.Top = 0
- mRECT.Right = PrguseTex(130).Wid
- mRECT.bottom = PrguseTex(130).Hei
- Draw PrguseTex(130).Tex, 208, 453, mRECT
- '//////////画交易按扭
- If PrguseTex(132).Tex Is Nothing Then
- CreateTexture PrguseTex(132), ResPath & "DataPrguse.wil"
- End If
- mRECT.Left = 0
- mRECT.Top = 0
- mRECT.Right = PrguseTex(132).Wid
- mRECT.bottom = PrguseTex(132).Hei
- Draw PrguseTex(132).Tex, 237, 453, mRECT
- '//////////画行会按扭
- If PrguseTex(134).Tex Is Nothing Then
- CreateTexture PrguseTex(134), ResPath & "DataPrguse.wil"
- End If
- mRECT.Left = 0
- mRECT.Top = 0
- mRECT.Right = PrguseTex(134).Wid
- mRECT.bottom = PrguseTex(134).Hei
- Draw PrguseTex(134).Tex, 266, 453, mRECT
- '//////////画组队按扭
- If PrguseTex(128).Tex Is Nothing Then
- CreateTexture PrguseTex(128), ResPath & "DataPrguse.wil"
- End If
- mRECT.Left = 0
- mRECT.Top = 0
- mRECT.Right = PrguseTex(128).Wid
- mRECT.bottom = PrguseTex(128).Hei
- Draw PrguseTex(128).Tex, 295, 453, mRECT
- '//////////画OUT按扭
- If PrguseTex(136).Tex Is Nothing Then
- CreateTexture PrguseTex(136), ResPath & "DataPrguse.wil"
- End If
- mRECT.Left = 0
- mRECT.Top = 0
- mRECT.Right = PrguseTex(136).Wid
- mRECT.bottom = PrguseTex(136).Hei
- Draw PrguseTex(136).Tex, 542, 453, mRECT
- '//////////画X按扭
- If PrguseTex(138).Tex Is Nothing Then
- CreateTexture PrguseTex(138), ResPath & "DataPrguse.wil"
- End If
- mRECT.Left = 0
- mRECT.Top = 0
- mRECT.Right = PrguseTex(138).Wid
- mRECT.bottom = PrguseTex(138).Hei
- Draw PrguseTex(138).Tex, 570, 453, mRECT
- If Mouse.SelFrm = InfoFrom Then
- If Mouse.Button1Down = True Then
- '/////////// 画地图按扭被按下
- If Mouse.Button1DownX > 208 And Mouse.Button1DownX < 236 And _
- Mouse.Button1DownY > 453 And Mouse.Button1DownY < 466 Then
- If PrguseTex(131).Tex Is Nothing Then
- CreateTexture PrguseTex(131), ResPath & "DataPrguse.wil"
- End If
- mRECT.Left = 0
- mRECT.Top = 0
- mRECT.Right = PrguseTex(131).Wid
- mRECT.bottom = PrguseTex(131).Hei
- Draw PrguseTex(131).Tex, 208, 453, mRECT
- '/////////// 画交易按扭被按下
- ElseIf Mouse.Button1DownX > 237 And Mouse.Button1DownX < 265 And _
- Mouse.Button1DownY > 453 And Mouse.Button1DownY < 466 Then
- If PrguseTex(133).Tex Is Nothing Then
- CreateTexture PrguseTex(133), ResPath & "DataPrguse.wil"
- End If
- mRECT.Left = 0
- mRECT.Top = 0
- mRECT.Right = PrguseTex(133).Wid
- mRECT.bottom = PrguseTex(133).Hei
- Draw PrguseTex(133).Tex, 237, 453, mRECT
- End If
- End If
- End If
- '/////////////// 画装备按钮
- If Mouse.X > 642 And Mouse.X < 685 And _
- Mouse.Y > 412 And Mouse.Y < 434 Then
- If PrguseTex(8).Tex Is Nothing Then
- CreateTexture PrguseTex(8), ResPath & "DataPrguse.wil"
- End If
- mRECT.Left = 0
- mRECT.Top = 0
- mRECT.Right = PrguseTex(8).Wid
- mRECT.bottom = PrguseTex(8).Hei
- Draw PrguseTex(8).Tex, 643, 410, mRECT
- End If
- '/////////////// 画包袱按钮
- If Mouse.X > 681 And Mouse.X < 704 And _
- Mouse.Y > 389 And Mouse.Y < 412 Then
- If PrguseTex(9).Tex Is Nothing Then
- CreateTexture PrguseTex(9), ResPath & "DataPrguse.wil"
- End If
- mRECT.Left = 0
- mRECT.Top = 0
- mRECT.Right = PrguseTex(9).Wid
- mRECT.bottom = PrguseTex(9).Hei
- Draw PrguseTex(9).Tex, 682, 390, mRECT
- End If
- '/////////////// 画技能按钮
- If Mouse.X > 722 And Mouse.X < 744 And _
- Mouse.Y > 369 And Mouse.Y < 392 Then
- If PrguseTex(10).Tex Is Nothing Then
- CreateTexture PrguseTex(10), ResPath & "DataPrguse.wil"
- End If
- mRECT.Left = 0
- mRECT.Top = 0
- mRECT.Right = PrguseTex(10).Wid
- mRECT.bottom = PrguseTex(10).Hei
- Draw PrguseTex(10).Tex, 722, 370, mRECT
- End If
- '////////// 显示玩家坐标
- mRECT.Left = 25
- mRECT.Right = 80
- mRECT.Top = 582
- mRECT.bottom = mRECT.Top + 250
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 255, 255, 255), Player(MainHeroNum).X, mRECT, DT_RIGHT
- mRECT.Left = 100
- mRECT.Right = 145
- mRECT.Top = 582
- mRECT.bottom = mRECT.Top + 225
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 255, 255, 255), Player(MainHeroNum).Y, mRECT, DT_LEFT
- '///////// 显示玩家HP MP
- mRECT.Left = 0
- mRECT.Right = 80
- mRECT.Top = 563
- mRECT.bottom = 574
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 255, 255, 255), Player(MainHeroNum).HP & "/" & Player(MainHeroNum).MaxHP, mRECT, DT_RIGHT
- mRECT.Left = 90
- mRECT.Right = 170
- mRECT.Top = 563
- mRECT.bottom = 574
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 255, 255, 255), Player(MainHeroNum).MP & "/" & Player(MainHeroNum).MaxMP, mRECT, DT_LEFT
- '/////////// 显示聊天记录 ////////////////////////
- DrawTalkStr
- End Sub
- '////////////////// 显示聊天记录
- Public Sub DrawTalkStr()
- Dim i As Integer
- If TalkCount <= 0 Then Exit Sub
- If TalkStrStart < TalkCount Then
- For i = TalkStrStart To TalkStrStart + 7 'TalkCount
- If i <= TalkCount And i > TalkStrStart Then
- mRECT.Left = 212
- mRECT.Top = 460 + (i - TalkStrStart) * 12
- mRECT.Right = 594
- mRECT.bottom = mRECT.Top + 12
- D3DX.DrawText D3DFont, TalkStr(i).mColor, TalkStr(i).mStr, mRECT, DT_LEFT
- End If
- Next
- End If
- End Sub
- '//////////// 画玩家
- Public Sub DrawPlayer(PlayerNum As Long, XX As Long, YY As Long, Optional mColor As Long = -1)
- Dim XX1 As Long, YY1 As Long
- Dim PicStart As Long, WeaponPicStart As Long
- XX1 = XX
- YY1 = YY
- If Player(PlayerNum).Clothing.State = False Then Player(PlayerNum).Clothing.Item.Shape = 0
- If Player(PlayerNum).Act = walk_走 Or Player(PlayerNum).Act = Run_跑 Then
- Select Case Player(PlayerNum).Face
- Case FaceInfo.UpFace
- YY1 = YY1 + Player(PlayerNum).YOFFECT
- Case FaceInfo.RightUpFace
- XX1 = XX1 - Player(PlayerNum).XOFFECT
- YY1 = YY1 + Player(PlayerNum).YOFFECT
- Case FaceInfo.RightFace
- XX1 = XX1 - Player(PlayerNum).XOFFECT
- Case FaceInfo.RightDownFace
- XX1 = XX1 - Player(PlayerNum).XOFFECT
- YY1 = YY1 - Player(PlayerNum).YOFFECT
- Case FaceInfo.DownFace
- YY1 = YY1 - Player(PlayerNum).YOFFECT
- Case FaceInfo.LeftDownFace
- XX1 = XX1 + Player(PlayerNum).XOFFECT
- YY1 = YY1 - Player(PlayerNum).YOFFECT
- Case FaceInfo.Leftface
- XX1 = XX1 + Player(PlayerNum).XOFFECT
- Case FaceInfo.LeftUpFace
- XX1 = XX1 + Player(PlayerNum).XOFFECT
- YY1 = YY1 + Player(PlayerNum).YOFFECT
- End Select
- End If
- Select Case Player(PlayerNum).Act
- Case HeroActType.Stand_站立
- PicStart = Player(PlayerNum).Clothing.Item.Shape * 1200 + Player(PlayerNum).Face * 8 + Player(PlayerNum).Pic
- WeaponPicStart = Player(PlayerNum).Weapon.Item.Shape * 600 + Player(PlayerNum).Face * 8 + Player(PlayerNum).Pic
- WeaponPicStart = WeaponPicStart + Player(PlayerNum).Weapon.Item.Shape * 600
- Case HeroActType.walk_走
- PicStart = Player(PlayerNum).Clothing.Item.Shape * 1200 + Player(PlayerNum).Face * 8 + Player(PlayerNum).Pic + 64
- WeaponPicStart = Player(PlayerNum).Weapon.Item.Shape * 600 + Player(PlayerNum).Face * 8 + Player(PlayerNum).Pic + 64
- WeaponPicStart = WeaponPicStart + Player(PlayerNum).Weapon.Item.Shape * 600
- Case HeroActType.Run_跑
- PicStart = Player(PlayerNum).Clothing.Item.Shape * 1200 + Player(PlayerNum).Face * 8 + Player(PlayerNum).Pic + 128
- WeaponPicStart = Player(PlayerNum).Weapon.Item.Shape * 600 + Player(PlayerNum).Face * 8 + Player(PlayerNum).Pic + 128
- WeaponPicStart = WeaponPicStart + Player(PlayerNum).Weapon.Item.Shape * 600
- Case HeroActType.Attack_等待
- PicStart = Player(PlayerNum).Clothing.Item.Shape * 1200 + Player(PlayerNum).Face + Player(PlayerNum).Pic + 192
- WeaponPicStart = Player(PlayerNum).Weapon.Item.Shape * 600 + Player(PlayerNum).Face * 8 + Player(PlayerNum).Pic + 192
- WeaponPicStart = WeaponPicStart + Player(PlayerNum).Weapon.Item.Shape * 600
- Case HeroActType.AttAck_攻击
- PicStart = Player(PlayerNum).Clothing.Item.Shape * 1200 + Player(PlayerNum).Face * 8 + Player(PlayerNum).Pic + 200
- WeaponPicStart = Player(PlayerNum).Weapon.Item.Shape * 600 + Player(PlayerNum).Face * 8 + Player(PlayerNum).Pic + 200
- WeaponPicStart = WeaponPicStart + Player(PlayerNum).Weapon.Item.Shape * 600
- Case HeroActType.Magic_魔法
- PicStart = Player(PlayerNum).Clothing.Item.Shape * 1200 + Player(PlayerNum).Face * 8 + Player(PlayerNum).Pic + 392
- WeaponPicStart = Player(PlayerNum).Weapon.Item.Shape * 600 + Player(PlayerNum).Face * 8 + Player(PlayerNum).Pic + 392
- WeaponPicStart = WeaponPicStart + Player(PlayerNum).Weapon.Item.Shape * 600
- Case HeroActType.Bruise_受伤
- PicStart = Player(PlayerNum).Clothing.Item.Shape * 1200 + Player(PlayerNum).Face * 8 + Player(PlayerNum).Pic + 472
- WeaponPicStart = Player(PlayerNum).Weapon.Item.Shape * 600 + Player(PlayerNum).Face * 8 + Player(PlayerNum).Pic + 472
- WeaponPicStart = WeaponPicStart + Player(PlayerNum).Weapon.Item.Shape * 600
- Case HeroActType.Dead_死亡
- PicStart = Player(PlayerNum).Clothing.Item.Shape * 1200 + Player(PlayerNum).Face * 8 + Player(PlayerNum).Pic + 536
- WeaponPicStart = Player(PlayerNum).Weapon.Item.Shape * 600 + Player(PlayerNum).Face * 8 + Player(PlayerNum).Pic + 536
- WeaponPicStart = WeaponPicStart + Player(PlayerNum).Weapon.Item.Shape * 600
- End Select
- PicStart = PicStart + Player(PlayerNum).Sex_性别 * 600
- Select Case Player(PlayerNum).Face
- Case FaceInfo.RightUpFace, FaceInfo.RightFace, FaceInfo.RightDownFace
- '///////////// 画人物
- If HumTex(PicStart).Tex Is Nothing Then
- ' CreateTexture HumTex(PicStart).Tex, respath & "Datahum1" & Format(PicStart, "000000") & ".bmp"
- CreateTexture HumTex(PicStart), ResPath & "DataHum.wil"
- End If
- GetRect HumTex(PicStart).Wid, HumTex(PicStart).Hei, XX1, YY1, mRECT
- Draw HumTex(PicStart).Tex, XX1 + HumTex(PicStart).PosX, YY1 + HumTex(PicStart).PosY, mRECT, , , , mColor
- '//////////// 画武器
- If Player(PlayerNum).Weapon.State = True Then
- If WeaponTex(WeaponPicStart).Tex Is Nothing Then
- CreateTexture WeaponTex(WeaponPicStart), ResPath & "DataWeapon.wil"
- End If
- GetRect WeaponTex(WeaponPicStart).Wid, WeaponTex(WeaponPicStart).Hei, XX1, YY1, mRECT
- Draw WeaponTex(WeaponPicStart).Tex, XX1 + WeaponTex(WeaponPicStart).PosX, YY1 + WeaponTex(WeaponPicStart).PosY, mRECT, , , , mColor
- End If
- Case FaceInfo.DownFace, FaceInfo.LeftDownFace, FaceInfo.Leftface, FaceInfo.LeftUpFace, FaceInfo.UpFace
- '//////////// 画武器
- If Player(PlayerNum).Weapon.State = True Then
- If WeaponTex(WeaponPicStart).Tex Is Nothing Then
- CreateTexture WeaponTex(WeaponPicStart), ResPath & "DataWeapon.wil"
- End If
- GetRect WeaponTex(WeaponPicStart).Wid, WeaponTex(WeaponPicStart).Hei, XX1, YY1, mRECT
- Draw WeaponTex(WeaponPicStart).Tex, XX1 + WeaponTex(WeaponPicStart).PosX, YY1 + WeaponTex(WeaponPicStart).PosY, mRECT, , , , mColor
- End If
- '///////////// 画人物
- If HumTex(PicStart).Tex Is Nothing Then
- CreateTexture HumTex(PicStart), ResPath & "DataHum.wil"
- End If
- GetRect HumTex(PicStart).Wid, HumTex(PicStart).Hei, XX1, YY1, mRECT
- Draw HumTex(PicStart).Tex, XX1 + HumTex(PicStart).PosX, YY1 + HumTex(PicStart).PosY, mRECT, , , , mColor
- End Select
- If Player(PlayerNum).Magic盾 = True Then
- PicStart = Player(PlayerNum).Magic盾StartPic + Player(PlayerNum).Magic盾Pic
- If Player(PlayerNum).Act = Bruise_受伤 Then
- PicStart = 3900 + Player(PlayerNum).Pic
- End If
- If MagicPic(1).MagicTex(PicStart).Tex Is Nothing Then
- CreateTexture MagicPic(1).MagicTex(PicStart), ResPath & "DataMagic.wil"
- End If
- mRECT.Left = 0
- mRECT.Right = MagicPic(1).MagicTex(PicStart).Wid
- mRECT.Top = 0
- mRECT.bottom = MagicPic(1).MagicTex(PicStart).Hei
- ' Draw MagicPic(1).MagicTex(PicStart).Tex, XX1 + MagicPic(1).MagicTex(PicStart).PosX, YY1 + MagicPic(1).MagicTex(PicStart).PosY, mRECT
- DrawAlphaTex MagicPic(1).MagicTex(PicStart).Tex, XX1 + MagicPic(1).MagicTex(PicStart).PosX, YY1 + MagicPic(1).MagicTex(PicStart).PosY, XX1 + MagicPic(1).MagicTex(PicStart).PosX + MagicPic(1).MagicTex(PicStart).Wid, YY1 + MagicPic(1).MagicTex(PicStart).PosY + MagicPic(1).MagicTex(PicStart).Hei, D3DColorRGBA(255, 255, 255, 255)
- End If
- If Player(PlayerNum).PlayerMagic2Count > 0 Then
- DrawPlayerMagic2 PlayerNum, XX1, YY1
- End If
- If Player(PlayerNum).PlayerMagicCount > 0 Then
- DrawPlayerMagic PlayerNum, XX1, YY1
- End If
- If Player(PlayerNum).HP > 0 Then
- If Prguse3Tex(0).Tex Is Nothing Then
- CreateTexture Prguse3Tex(0), ResPath & "DataPrguse3.wil"
- End If
- mRECT.Left = 0
- mRECT.Right = Prguse3Tex(0).Wid
- mRECT.Top = 0
- mRECT.bottom = Prguse3Tex(0).Hei
- Draw Prguse3Tex(0).Tex, XX1 + 8, YY1 - 60, mRECT
- If Prguse3Tex(1).Tex Is Nothing Then
- CreateTexture Prguse3Tex(1), ResPath & "DataPrguse3.wil"
- End If
- mRECT.Left = 0
- mRECT.Right = (Player(PlayerNum).HP / Player(PlayerNum).MaxHP) * Prguse3Tex(1).Wid
- mRECT.Top = 0
- mRECT.bottom = Prguse3Tex(1).Hei
- Draw Prguse3Tex(1).Tex, XX1 + 8, YY1 - 60, mRECT
- mRECT.Left = XX1 - 10
- mRECT.Right = mRECT.Left + 68
- mRECT.Top = YY1 - 73
- mRECT.bottom = mRECT.Top + 20
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 255, 255, 255), Player(PlayerNum).HP & "/" & Player(PlayerNum).MaxHP, mRECT, DT_CENTER
- mRECT.Left = XX1
- mRECT.Right = mRECT.Left + 48
- mRECT.Top = YY1 - 25
- mRECT.bottom = mRECT.Top + 30
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 255, 255, 255), Player(PlayerNum).Name_名字, mRECT, DT_CENTER
- End If
- If GetTickCount - Player(MainHeroNum).LiaoTianLTime < 5000 Then
- If Len(Player(MainHeroNum).LiaoTianInfo) > 0 Then
- mRECT.Left = XX1 - 36
- mRECT.Right = XX1 + 84
- mRECT.Top = YY1 - 75 - Player(MainHeroNum).LiaoTianInfo.StrHei * 21
- mRECT.bottom = mRECT.Top + Player(MainHeroNum).LiaoTianInfo.StrHei * 21
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 255, 255, 255), Player(MainHeroNum).LiaoTianInfo.LiaoTianStr, mRECT, DT_CENTER
- End If
- End If
- End Sub
- 'Public Sub DrawMon(MonNum As Long, XX As Long, YY As Long)
- ' Dim XX1 As Long, YY1 As Long
- ' Dim PicNum As Long
- ' XX1 = XX: YY1 = YY
- ' If Mon(MonNum).Act = walk_走 Or Mon(MonNum).Act = Run_跑 Then
- ' Select Case Mon(MonNum).Face
- ' Case FaceInfo.UpFace
- ' YY1 = YY1 + Mon(MonNum).YOFFECT
- ' Case FaceInfo.RightUpFace
- ' XX1 = XX1 - Mon(MonNum).XOFFECT
- ' YY1 = YY1 + Mon(MonNum).YOFFECT
- ' Case FaceInfo.RightFace
- ' XX1 = XX1 - Mon(MonNum).XOFFECT
- ' Case FaceInfo.RightDownFace
- ' XX1 = XX1 - Mon(MonNum).XOFFECT
- ' YY1 = YY1 - Mon(MonNum).YOFFECT
- ' Case FaceInfo.DownFace
- ' YY1 = YY1 - Mon(MonNum).YOFFECT
- ' Case FaceInfo.LeftDownFace
- ' XX1 = XX1 + Mon(MonNum).XOFFECT
- ' YY1 = YY1 - Mon(MonNum).YOFFECT
- ' Case FaceInfo.Leftface
- ' XX1 = XX1 + Mon(MonNum).XOFFECT
- ' Case FaceInfo.LeftUpFace
- ' XX1 = XX1 + Mon(MonNum).XOFFECT
- ' YY1 = YY1 + Mon(MonNum).YOFFECT
- ' End Select
- ' End If
- '
- '
- ' Select Case Mon(MonNum).DBInfo.Appr_形象代码
- ' Case 160
- ' Select Case Mon(MonNum).Act
- ' Case MonActType.Stand_怪站立
- ' PicNum = Mon(MonNum).Face * 8 + Mon(MonNum).Pic
- ' Case MonActType.Move_怪移动
- ' PicNum = Mon(MonNum).Face * 8 + Mon(MonNum).Pic + 80
- ' Case MonActType.AttAck_怪攻击
- ' PicNum = Mon(MonNum).Face * 8 + Mon(MonNum).Pic + 160
- ' Case MonActType.Bruise_怪受伤
- ' PicNum = Mon(MonNum).Face * 8 + Mon(MonNum).Pic + 240
- ' Case MonActType.Dead_怪死亡
- ' PicNum = Mon(MonNum).Face * 8 + Mon(MonNum).Pic + 260
- ' End Select
- ' If MonPic(17).MonTex(PicNum).Tex Is Nothing Then
- ' CreateTexture MonPic(17).MonTex(PicNum).Tex, respath & "DataMon17" & Format(PicNum, "000000") & ".bmp"
- ' End If
- ' GetRect MonPic(17).MonTex(PicNum).Wid, MonPic(17).MonTex(PicNum).Hei, XX, YY, mRECT
- ' Draw MonPic(17).MonTex(PicNum).Tex, XX + MonPic(17).MonTex(PicNum).PosX, YY + MonPic(17).MonTex(PicNum).PosY, mRECT
- ' End Select
- '
- '
- ' If Mon(MonNum).HP > 0 Then
- ' If Prguse3Tex(0).Tex Is Nothing Then
- ' CreateTexture Prguse3Tex(0).Tex, respath & "DataPrguse3 00000.bmp"
- ' End If
- ' mRECT.Left = 0
- ' mRECT.Right = Prguse3Tex(0).Wid
- ' mRECT.Top = 0
- ' mRECT.bottom = Prguse3Tex(0).Hei
- ' Draw Prguse3Tex(0).Tex, XX1 + 8, YY1 - 60, mRECT
- '
- '
- ' If Prguse3Tex(1).Tex Is Nothing Then
- ' CreateTexture Prguse3Tex(1), respath & "DataPrguse3.wil"
- ' End If
- ' mRECT.Left = 0
- ' mRECT.Right = (Mon(MonNum).HP / Mon(MonNum).MaxHP) * Prguse3Tex(1).Wid
- ' mRECT.Top = 0
- ' mRECT.bottom = Prguse3Tex(1).Hei
- ' Draw Prguse3Tex(1).Tex, XX1 + 8, YY1 - 60, mRECT
- '
- ' mRECT.Left = XX1 - 10
- ' mRECT.Right = mRECT.Left + 68
- ' mRECT.Top = YY1 - 73
- ' mRECT.bottom = mRECT.Top + 20
- ' D3DX.DrawText D3DFont, D3DColorRGBA(255, 255, 255, 255), Mon(MonNum).HP & "/" & Mon(MonNum).MaxHP, mRECT, DT_CENTER
- ' End If
- 'End Sub
- '////////////// 画地图1
- Public Sub DrawMap1()
- Dim i As Long
- Dim j As Long
- Dim IntX As Long
- Dim IntY As Long
- Dim MapX As Long
- Dim MapY As Long
- Dim RectTile As RECT
- Dim M As Integer
- For i = -5 To SCREEN_WIDTH 96 + 5 Step 1
- For j = -10 To SCREEN_HEIGHT 64 + 10
- IntX = i * 96 - WorldX Mod 96
- IntY = j * 64 - WorldY Mod 64
- MapX = (IntX + 96 2 + WorldX - SCREEN_WIDTH 2) 48
- MapY = (IntY + 64 2 + WorldY - SCREEN_HEIGHT 2) 32
- If MapX >= 0 And MapX <= Map.Width And MapY >= 0 And MapY <= Map.Height Then
- GetRect 96, 64, IntX, IntY, RectTile
- If RectTile.Left >= 0 And RectTile.Right > RectTile.Left And RectTile.Top >= 0 And RectTile.bottom > RectTile.Top Then
- Draw Map3Tex, IntX, IntY, RectTile
- End If
- End If
- Next
- Next
- End Sub
- '////////////////// 画自身魔法贴图
- Public Sub DrawPlayerMagic(PlayerNum As Long, X As Long, Y As Long)
- Dim i As Long
- Dim j As Long
- Dim IntX As Long
- Dim IntY As Long
- Dim MapX As Long
- Dim MapY As Long
- Dim RectTile As RECT
- Dim M As Integer
- Dim TexNum As Long
- IntX = X
- IntY = Y
- For i = 1 To Player(PlayerNum).PlayerMagicCount
- Select Case Player(PlayerNum).PlayerMagic(i).MagicName
- Case Is = "火球术", "治愈术", "大火球", "施毒术", "抗拒火环", "地狱火", "疾光电影", "灵魂火符", "神圣战甲术", "幽灵盾", "困魔咒", "召唤骷髅", "隐身术", "集体隐身术", "火墙", "爆烈火焰", "地狱雷光", "群体治疗术", "冰咆哮", "魔法盾"
- TexNum = Player(PlayerNum).PlayerMagic(i).StartPic + Player(PlayerNum).PlayerMagic(i).Pic
- If MagicPic(1).MagicTex(TexNum).Tex Is Nothing Then
- CreateTexture MagicPic(1).MagicTex(TexNum), ResPath & "DataMagic.wil"
- End If
- GetRect MagicPic(1).MagicTex(TexNum).Wid, MagicPic(1).MagicTex(TexNum).Hei, IntX, IntY, mRECT
- ' Draw MagicPic(1).MagicTex(TexNum).Tex, IntX + MagicPic(1).MagicTex(TexNum).PosX, IntY + MagicPic(1).MagicTex(TexNum).PosY, mRECT
- DrawAlphaTex MagicPic(1).MagicTex(TexNum).Tex, IntX + MagicPic(1).MagicTex(TexNum).PosX, IntY + MagicPic(1).MagicTex(TexNum).PosY, IntX + MagicPic(1).MagicTex(TexNum).PosX + MagicPic(1).MagicTex(TexNum).Wid, IntY + MagicPic(1).MagicTex(TexNum).PosY + MagicPic(1).MagicTex(TexNum).Hei, D3DColorRGBA(255, 255, 255, 255)
- Case Is = "雷电术"
- TexNum = Player(PlayerNum).PlayerMagic(i).StartPic + Player(PlayerNum).PlayerMagic(i).Pic
- If MagicPic(2).MagicTex(TexNum).Tex Is Nothing Then
- CreateTexture MagicPic(2).MagicTex(TexNum), ResPath & "DataMagic2.wil"
- End If
- GetRect MagicPic(2).MagicTex(TexNum).Wid, MagicPic(2).MagicTex(TexNum).Hei, IntX, IntY, mRECT
- ' Draw MagicPic(1).MagicTex(TexNum).Tex, IntX + MagicPic(1).MagicTex(TexNum).PosX, IntY + MagicPic(1).MagicTex(TexNum).PosY, mRECT
- DrawAlphaTex MagicPic(2).MagicTex(TexNum).Tex, IntX + MagicPic(2).MagicTex(TexNum).PosX, IntY + MagicPic(2).MagicTex(TexNum).PosY, IntX + MagicPic(2).MagicTex(TexNum).PosX + MagicPic(2).MagicTex(TexNum).Wid, IntY + MagicPic(2).MagicTex(TexNum).PosY + MagicPic(2).MagicTex(TexNum).Hei, D3DColorRGBA(255, 255, 255, 255)
- End Select
- Next
- End Sub
- '////////////////// 画自身被施魔法贴图
- Public Sub DrawPlayerMagic2(PlayerNum As Long, X As Long, Y As Long)
- Dim i As Long
- Dim j As Long
- Dim IntX As Long
- Dim IntY As Long
- Dim MapX As Long
- Dim MapY As Long
- Dim RectTile As RECT
- Dim M As Integer
- Dim TexNum As Long
- IntX = X
- IntY = Y
- For i = 1 To Player(PlayerNum).PlayerMagic2Count
- Select Case Player(PlayerNum).PlayerMagic2(i).Effect
- Case 1, 2, 3, 10, 9
- TexNum = Player(PlayerNum).PlayerMagic2(i).StartPic + Player(PlayerNum).PlayerMagic2(i).Pic
- If MagicPic(1).MagicTex(TexNum).Tex Is Nothing Then
- CreateTexture MagicPic(1).MagicTex(TexNum), ResPath & "DataMagic.wil"
- End If
- GetRect MagicPic(1).MagicTex(TexNum).Wid, MagicPic(1).MagicTex(TexNum).Hei, IntX, IntY, mRECT
- ' Draw MagicPic(1).MagicTex(TexNum).Tex, IntX + MagicPic(1).MagicTex(TexNum).PosX, IntY + MagicPic(1).MagicTex(TexNum).PosY, mRECT
- DrawAlphaTex MagicPic(1).MagicTex(TexNum).Tex, IntX + MagicPic(1).MagicTex(TexNum).PosX, IntY + MagicPic(1).MagicTex(TexNum).PosY, IntX + MagicPic(1).MagicTex(TexNum).PosX + MagicPic(1).MagicTex(TexNum).Wid, IntY + MagicPic(1).MagicTex(TexNum).PosY + MagicPic(1).MagicTex(TexNum).Hei, D3DColorRGBA(255, 255, 255, 255)
- End Select
- Next
- End Sub
- '////////////// 画地图2
- Public Sub DrawMap2()
- Dim i As Long
- Dim j As Long
- Dim IntX As Long
- Dim IntY As Long
- Dim MapX As Long
- Dim MapY As Long
- Dim RectTile As RECT
- Dim M As Integer
- For i = -2 To SCREEN_WIDTH TILE_WIDTH + 2
- For j = 0 To SCREEN_HEIGHT TILE_HEIGHT
- IntX = i * TILE_WIDTH - WorldX Mod TILE_WIDTH
- IntY = j * TILE_HEIGHT - WorldY Mod TILE_HEIGHT
- MapX = (IntX + TILE_WIDTH 2 + WorldX - SCREEN_WIDTH 2) TILE_WIDTH
- MapY = (IntY + TILE_HEIGHT 2 + WorldY - SCREEN_HEIGHT 2) TILE_HEIGHT
- If MapX >= 0 And MapX <= Map.Width And MapY >= 0 And MapY <= Map.Height Then
- If Map.Map3(MapX, MapY) > 0 Then
- DrawPlayer Map.Map3(MapX, MapY), IntX, IntY
- End If
- ' If Map.Map4(MapX, MapY) > 0 Then
- ' DrawMon Map.Map4(MapX, MapY), IntX, IntY
- ' mRECT.Left = IntX
- ' mRECT.Right = mRECT.Left + 100
- ' mRECT.Top = IntY
- ' mRECT.bottom = mRECT.Top + 30
- ' D3DX.DrawText D3DFont, D3DColorRGBA(255, 0, 255, 255), Map.Map4(MapX, MapY), mRECT, DT_CENTER
- ' End If
- End If
- Next
- Next
- End Sub
- Public Sub DrawMap22()
- Dim i As Integer, j As Integer
- For i = 1 To PlayerCount
- If Player(PaiXuPlayerNum(i)).Conneted = True Then
- If Player(PaiXuPlayerNum(i)).X * 48 > WorldX - 400 And Player(PaiXuPlayerNum(i)).X * 48 < WorldX + SCREEN_WIDTH - 450 And _
- Player(PaiXuPlayerNum(i)).Y * 32 > WorldY - 300 And Player(PaiXuPlayerNum(i)).Y * 32 < WorldY + SCREEN_HEIGHT - 350 Then
- DrawPlayer PaiXuPlayerNum(i), Player(PaiXuPlayerNum(i)).X * 48 - WorldX + 384, Player(PaiXuPlayerNum(i)).Y * 32 - WorldY + 288
- End If
- End If
- Next
- End Sub
- '//////// 画地图物品
- Public Sub DrawMapItem()
- Dim i As Long, j As Integer
- If MapItemCount <= 0 Then Exit Sub
- For i = 1 To MapItemCount
- ' If MsgBox("dkf", vbYesNo) = vbYes Then End
- If MapItem(i).X * 48 > WorldX - 400 And MapItem(i).X * 48 < WorldX + SCREEN_WIDTH - 450 And _
- MapItem(i).Y * 32 > WorldY - 300 And MapItem(i).Y * 32 < WorldY + SCREEN_HEIGHT - 350 Then
- DrawMapItemTex i, MapItem(i).X * 48 - WorldX + 384, MapItem(i).Y * 32 - WorldY + 288
- End If
- Next
- End Sub
- '//////// 画地图上物品贴图
- Public Sub DrawMapItemTex(MapItemNum As Long, XX As Long, YY As Long)
- Dim i As Integer
- If MapItem(MapItemNum).mItem.Looks > UBound(ItemsTex) Then Exit Sub
- If ItemsTex(MapItem(MapItemNum).mItem.Looks).Tex Is Nothing Then
- CreateTexture ItemsTex(MapItem(MapItemNum).mItem.Looks), ResPath & "DataItems.Wil"
- End If
- GetRect ItemsTex(MapItem(MapItemNum).mItem.Looks).Wid, ItemsTex(MapItem(MapItemNum).mItem.Looks).Hei, XX, YY, mRECT
- Draw ItemsTex(MapItem(MapItemNum).mItem.Looks).Tex, XX + 24, YY + 16, mRECT, 0.5, 0.5
- ' If Mouse.SelX = MapItem(MapItemNum).X And Mouse.SelY = MapItem(MapItemNum).Y Then
- ' mRECT.Left = XX - 48
- ' mRECT.Right = XX + 96
- ' mRECT.Top = YY
- ' mRECT.bottom = mRECT.Top + 20
- ' D3DX.DrawText D3DFont, D3DColorRGBA(255, 255, 255, 255), MapItem(MapItemNum).mItem.Name, mRECT, DT_CENTER
- ' End If
- End Sub
- '////////// 显示地图上物品名称
- Public Sub DrawMapItemName()
- Dim i As Integer
- Dim MC As Integer
- For i = 1 To MapItemCount
- If Mouse.SelX = MapItem(i).X And Mouse.SelY = MapItem(i).Y Then
- MC = MC + 1
- ' MapItem(i).X * 48 - WorldX + 384, MapItem(i).Y * 32 - WorldY + 288
- mRECT.Left = MapItem(i).X * 48 - WorldX + 384 - 20
- mRECT.Right = mRECT.Left + 96
- mRECT.Top = MapItem(i).Y * 32 - WorldY + 288 - 15 * (MC - 1)
- mRECT.bottom = mRECT.Top + 20
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 255, 255, 255), MapItem(i).mItem.Name, mRECT, DT_CENTER
- End If
- Next
- End Sub
- Public Sub DrawNpc(NpcNum As Integer, X As Long, Y As Long)
- Dim PicNum As Long
- NPCInfo(NpcNum).PicSpeed = NPCInfo(NpcNum).PicSpeed + 1
- If NPCInfo(NpcNum).PicSpeed > 4 Then
- NPCInfo(NpcNum).PicSpeed = 0
- NPCInfo(NpcNum).Pic = NPCInfo(NpcNum).Pic + 1
- If NPCInfo(NpcNum).Pic > 9 Then NPCInfo(NpcNum).Pic = 0
- End If
- PicNum = NPCInfo(NpcNum).Image * 60 + 30 + NPCInfo(NpcNum).Pic
- If NpcTex(PicNum).Tex Is Nothing Then
- CreateTexture NpcTex(PicNum), ResPath & "DataNpc.wil"
- End If
- GetRect NpcTex(PicNum).Wid, NpcTex(PicNum).Hei, X, Y, mRECT
- Draw NpcTex(PicNum).Tex, X + NpcTex(PicNum).PosX, Y + NpcTex(PicNum).PosY, mRECT
- mRECT.Left = X
- mRECT.Right = mRECT.Left + 48
- mRECT.Top = Y - 25
- mRECT.bottom = mRECT.Top + 30
- D3DX.DrawText D3DFont, D3DColorRGBA(255, 255, 255, 255), NPCInfo(NpcNum).Name_名称, mRECT, DT_CENTER
- mRECT.Left = 0
- mRECT.Right = Prguse3Tex(0).Wid
- mRECT.Top = 0
- mRECT.bottom = Prguse3Tex(0).Hei
- Draw Prguse3Tex(0).Tex, X + 8, Y - 60, mRECT
- If Prguse3Tex(1).Tex Is Nothing Then
- CreateTexture Prguse3Tex(1), ResPath & "DataPrguse3.wil"
- End If
- mRECT.Left = 0
- mRECT.Right = Prguse3Tex(1).Wid
- mRECT.Top = 0
- mRECT.bottom = Prguse3Tex(1).Hei
- Draw Prguse3Tex(1).Tex, X + 8, Y - 60, mRECT
- End Sub
- Public Sub DrawMapNpc()
- Dim i As Integer, j As Integer
- For i = 1 To NpcCount
- If NPCInfo(i).X * 48 > WorldX - 400 And NPCInfo(i).X * 48 < WorldX + SCREEN_WIDTH - 450 And _
- NPCInfo(i).Y * 32 > WorldY - 300 And NPCInfo(i).Y * 32 < WorldY + SCREEN_HEIGHT - 350 Then
- DrawNpc i, NPCInfo(i).X * 48 - WorldX + 384, NPCInfo(i).Y * 32 - WorldY + 288
- End If
- Next
- End Sub
- Public Sub DrawMon22()
- Dim i As Long, j As Integer
- If MonCount = 0 Then Exit Sub
- For i = 1 To MonCount
- If Mon(i).X * 48 > WorldX - 400 And Mon(i).X * 48 < WorldX + SCREEN_WIDTH - 450 And _
- Mon(i).Y * 32 > WorldY - 300 And Mon(i).Y * 32 < WorldY + SCREEN_HEIGHT - 350 Then
- If Mouse.MSelMonNum = i Then
- DrawMon i, Mon(i).X * 48 - WorldX + 384, Mon(i).Y * 32 - WorldY + 288, D3DColorRGBA(255, 255, 255, 200)
- Else
- DrawMon i, Mon(i).X * 48 - WorldX + 384, Mon(i).Y * 32 - WorldY + 288, D3DColorRGBA(200, 200, 200, 255)
- End If
- End If
- Next
- End Sub
- Public Sub DrawMap222()
- Dim i As Integer, j As Integer
- For i = 1 To PlayerCount
- If Player(PaiXuPlayerNum(i)).Conneted = True Then
- If Player(PaiXuPlayerNum(i)).X * 48 > WorldX - 400 And Player(PaiXuPlayerNum(i)).X * 48 < WorldX + SCREEN_WIDTH - 450 And _
- Player(PaiXuPlayerNum(i)).Y * 32 > WorldY - 300 And Player(PaiXuPlayerNum(i)).Y * 32 < WorldY + SCREEN_HEIGHT - 350 Then
- DrawPlayer PaiXuPlayerNum(i), Player(PaiXuPlayerNum(i)).X * 48 - WorldX + 384, Player(PaiXuPlayerNum(i)).Y * 32 - WorldY + 288, D3DColorRGBA(255, 255, 255, 100)
- End If
- End If
- Next
- End Sub
- '////////////// 画地图魔法2
- Public Sub DrawMagic2()
- Dim i As Integer, j As Integer
- If MagicCount = 0 Then Exit Sub
- For i = 1 To MagicCount
- If Magic(i).X * 48 >= WorldX - 400 And Magic(i).X * 48 <= WorldX + SCREEN_WIDTH - 450 And _
- Magic(i).Y * 32 >= WorldY - 300 And Magic(i).Y * 32 <= WorldY + SCREEN_HEIGHT - 350 Then
- DrawMagicTex2 i, Magic(i).X * 48 - WorldX + 388, Magic(i).Y * 32 - WorldY + 300
- End If
- Next
- End Sub
- '//////////// 画地面魔法贴图2
- Public Sub DrawMagicTex2(MagicNum As Integer, IntX As Long, IntY As Long)
- Dim XX As Long, YY As Long, i As Integer
- Dim PicNum As Long
- Select Case Magic(MagicNum).MagicName
- Case Is = "火球术", "治愈术", "大火球", "施毒术", "抗拒火环", "地狱火", "疾光电影", "灵魂火符", "神圣战甲术", "幽灵盾", "困魔咒", "召唤骷髅", "隐身术", "集体隐身术", "火墙", "爆烈火焰", "地狱雷光", "群体治疗术", "冰咆哮", "魔法盾"
- If Magic(MagicNum).MagicName = "火球术" Then
- Magic(MagicNum).EndX = Magic(MagicNum).EndX + Magic(MagicNum).XOFFECT
- Magic(MagicNum).EndY = Magic(MagicNum).EndY + Magic(MagicNum).YOFFECT
- IntX = IntX + Magic(MagicNum).EndX
- IntY = IntY + Magic(MagicNum).EndY
- End If
- PicNum = Magic(MagicNum).StartPic + Magic(MagicNum).Pic
- If PicNum <= UBound(MagicPic(1).MagicTex) Then
- If MagicPic(1).MagicTex(PicNum).Tex Is Nothing Then
- CreateTexture MagicPic(1).MagicTex(PicNum), ResPath & "DataMagic.wil"
- End If
- GetRect MagicPic(1).MagicTex(PicNum).Wid, MagicPic(1).MagicTex(PicNum).Hei, IntX, IntY, mRECT
- ' Draw MagicPic(1).MagicTex(PicNum).Tex, IntX + MagicPic(1).MagicTex(PicNum).PosX, IntY + MagicPic(1).MagicTex(PicNum).PosY, mRECT
- DrawAlphaTex MagicPic(1).MagicTex(PicNum).Tex, IntX + MagicPic(1).MagicTex(PicNum).PosX, IntY + MagicPic(1).MagicTex(PicNum).PosY, IntX + MagicPic(1).MagicTex(PicNum).PosX + MagicPic(1).MagicTex(PicNum).Wid, IntY + MagicPic(1).MagicTex(PicNum).PosY + MagicPic(1).MagicTex(PicNum).Hei, D3DColorRGBA(255, 255, 255, 255)
- End If
- Case Is = "雷电术"
- PicNum = Magic(MagicNum).StartPic + Magic(MagicNum).Pic
- If MagicPic(2).MagicTex(PicNum).Tex Is Nothing Then
- CreateTexture MagicPic(2).MagicTex(PicNum), ResPath & "DataMagic2.wil"
- End If
- GetRect MagicPic(2).MagicTex(PicNum).Wid, MagicPic(2).MagicTex(PicNum).Hei, IntX, IntY, mRECT
- ' Draw MagicPic(2).MagicTex(PicNum).Tex, IntX + MagicPic(2).MagicTex(PicNum).PosX, IntY + MagicPic(2).MagicTex(PicNum).PosY, mRECT, , , , D3DColorRGBA(255, 255, 255, 150)
- DrawAlphaTex MagicPic(2).MagicTex(PicNum).Tex, IntX + MagicPic(2).MagicTex(PicNum).PosX, IntY + MagicPic(2).MagicTex(PicNum).PosY, IntX + MagicPic(2).MagicTex(PicNum).PosX + MagicPic(2).MagicTex(PicNum).Wid, IntY + MagicPic(2).MagicTex(PicNum).PosY + MagicPic(2).MagicTex(PicNum).Hei, D3DColorRGBA(255, 255, 255, 255)
- End Select
- End Sub