Bom para Akeles que Querem Colokar Sprites 64x32 Aki esta o Tutorial Vamos Lah'
Procure por:
Mude Para:
Agora Na FrmNewChar Mude O Codigo da Sub Timer1_Time Por
Mude A Sub Inteira Por:
Agora Procure Por:
Mude a Sub BltPlayerTop(Byval Index as Long) Por:
Agora, vá no modGameLogic, procure por Sub BltPlayerGuildName(ByVal Index As Long) e mude a Sub toda por:
Lendario e.e'Procure por:
- Código:
Public Const SIZE_Y = 32
Mude Para:
- Código:
Public Const SIZE_Y = 64
Agora Na FrmNewChar Mude O Codigo da Sub Timer1_Time Por
- Código:
If cmbClass.ListIndex < 0 Then Exit Sub
Picpic.Width = SIZE_X
Picpic.Height = SIZE_Y
Picture4.Width = SIZE_X + 4
Picture4.Height = SIZE_Y + 4
If optMale.Value = True Then
Call BitBlt(Picpic.hDC, 0, 0, SIZE_X, SIZE_Y, picSprites.hDC, animi * SIZE_X, Int(Class(cmbClass.ListIndex + 1).MaleSprite) * SIZE_Y, SRCCOPY)
Else
Call BitBlt(Picpic.hDC, 0, 0, SIZE_X, SIZE_Y, picSprites.hDC, animi * SIZE_X, Int(Class(cmbClass.ListIndex + 1).FemaleSprite) * SIZE_Y, SRCCOPY)
End If
- Código:
Public Sub NpcEditorBltSprite()
Mude A Sub Inteira Por:
- Código:
Public Sub NpcEditorBltSprite()
If frmNpcEditor.BigNpc.Value = Checked Then
Call BitBlt(frmNpcEditor.picSprite.hDC, 0, 0, 64, 64, frmNpcEditor.picSprites.hDC, 3 * 64, frmNpcEditor.scrlSprite.Value * 64, SRCCOPY)
Else
Call BitBlt(frmNpcEditor.picSprite.hDC, 0, 0, SIZE_X, SIZE_Y, frmNpcEditor.picSprites.hDC, 3 * SIZE_X, frmNpcEditor.scrlSprite.Value * SIZE_Y, SRCCOPY)
End If
End Sub
Agora Procure Por:
- Código:
Sub BltPlayerTop(ByVal Index As Long)
Mude a Sub BltPlayerTop(Byval Index as Long) Por:
- Código:
Sub BltPlayerTop(ByVal Index As Long)
Dim Anim As Byte
Dim x As Long, y As Long
Dim AttackSpeed As Long
If IsPlaying(Index) Then
If GetPlayerMap(Index) = GetPlayerMap(MyIndex) Then
If GetPlayerWeaponSlot(Index) > 0 Then
AttackSpeed = Item(GetPlayerInvItemNum(Index, GetPlayerWeaponSlot(Index))).AttackSpeed
Else
AttackSpeed = 1000
End If
' Checar a animação
Anim = 0
If Player(Index).Attacking = 0 Then
Select Case GetPlayerDir(Index)
Case DIR_UP
If (Player(Index).YOffset < PIC_Y / 2) Then Anim = 1
Case DIR_DOWN
If (Player(Index).YOffset > PIC_Y / 2 * -1) Then Anim = 1
Case DIR_LEFT
If (Player(Index).XOffset < PIC_Y / 2) Then Anim = 1
Case DIR_RIGHT
If (Player(Index).XOffset > PIC_Y / 2 * -1) Then Anim = 1
End Select
Else
If Player(Index).AttackTimer + Int(AttackSpeed / 2) > GetTickCount Then
Anim = 2
End If
End If
' Checar para ver se ele vai parar de atacar
If Player(Index).AttackTimer + AttackSpeed < GetTickCount Then
Player(Index).Attacking = 0
Player(Index).AttackTimer = 0
End If
rec.Top = GetPlayerSprite(Index) * SIZE_Y
rec.Bottom = rec.Top + (SIZE_Y - PIC_Y)
rec.Left = (GetPlayerDir(Index) * (3 * (SIZE_X / PIC_X)) + (Anim * (SIZE_X / PIC_X))) * PIC_X
rec.Right = rec.Left + SIZE_X
x = GetPlayerX(Index) * PIC_X - (SIZE_X - PIC_X) / 2 + sx + Player(Index).XOffset
y = GetPlayerY(Index) * PIC_Y - (SIZE_Y - PIC_Y) + sx + Player(Index).YOffset
If SIZE_X > PIC_X Then
If x < 0 Then
x = Player(Index).XOffset + sx + ((SIZE_X - PIC_X) / 2)
If GetPlayerDir(Index) = DIR_RIGHT And Player(Index).Moving > 0 Then
rec.Left = rec.Left - Player(Index).XOffset
Else
rec.Left = rec.Left - Player(Index).XOffset + ((SIZE_X - PIC_X) / 2)
End If
End If
If x > MAX_MAPX * 32 Then
x = MAX_MAPX * 32 + sx - ((SIZE_X - PIC_X) / 2) + Player(Index).XOffset
If GetPlayerDir(Index) = DIR_LEFT And Player(Index).Moving > 0 Then
rec.Right = rec.Right + Player(Index).XOffset
Else
rec.Right = rec.Right + Player(Index).XOffset - ((SIZE_X - PIC_X) / 2)
End If
End If
End If
Call DD_BackBuffer.BltFast(x - (NewPlayerX * PIC_X) - NewXOffset, y - (NewPlayerY * PIC_Y) - NewYOffset, DD_SpriteSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
End If
End If
End Sub
Agora, vá no modGameLogic, procure por Sub BltPlayerGuildName(ByVal Index As Long) e mude a Sub toda por:
- Código:
Sub BltPlayerGuildName(ByVal Index As Long)
Dim TextX As Long
Dim TextY As Long
Dim Color As Long
If GetPlayerGuild(Index) = vbNullString Then Exit Sub
' Check access level
If GetPlayerPK(Index) = NO Then
Select Case GetPlayerGuildAccess(Index)
Case 0
If GetPlayerSTR(Index) > 0 Then
Color = QBColor(Red)
Else
Color = QBColor(Red)
End If
Case 1
Color = QBColor(BrightCyan)
Case 2
Color = QBColor(Yellow)
Case 3
Color = QBColor(BrightGreen)
Case 4
Color = QBColor(Yellow)
End Select
Else
Color = QBColor(BrightRed)
End If
TextX = GetPlayerX(Index) * PIC_X + sx + Player(Index).XOffset + Int(PIC_X * 0.5) - ((Len(GetPlayerGuild(Index)) * 0.5) * 8)
TextY = GetPlayerY(Index) * PIC_Y + sx + Player(Index).YOffset - Int(PIC_Y * 0.5) - 45
Call DrawText(TexthDC, TextX - (NewPlayerX * PIC_X) - NewXOffset, TextY - (NewPlayerY * PIC_Y) - NewYOffset, GetPlayerGuild(Index), Color)
End Sub