Aldeia RPG

Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

Suporte ao desenvolvimento de jogos


    Sprites 32x32 poe 64x32

    FilipeJF
    FilipeJF
    Aldeia Friend
    Aldeia Friend


    Medalhas : Sprites 32x32 poe 64x32 Trophy11Sprites 32x32 poe 64x32 94Jxv
    Mensagens : 1859
    Créditos : 134

    Sprites 32x32 poe 64x32 Empty Sprites 32x32 poe 64x32

    Mensagem por FilipeJF Ter Out 11, 2011 7:50 pm

    Este tutorial vai mudar os sprites padrões de seu jogo no Elysium de 32X32 para 32X64...


    Procure por:


    Código:
    Public Const SIZE_Y = 32






    Troque por:


    Código:
    Public Const SIZE_Y = 64






    Agora, no frmNewChar, troque todo o código da Sub Timer1_Timer 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


    Procure por:


    Código:
    Public Sub NpcEditorBltSprite()


    Substitua 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




    Procure por:


    Código:
    Sub BltPlayerTop(ByVal Index As Long)




    E substitua o Sub inteiro 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






    Agora, voltando ao frmNewChar, ajuste o tamanho do espaço para exibir o sprite para ficar em 32X64, idem no frmNpcEditor.


    É isso!
    Espero que gostem :Glad
    Té+!


    Créditos:Lendario


    _________________

    Sprites 32x32 poe 64x32 Atpqp
    O Equívoco do Sábio - conto na Amazon

      Data/hora atual: Qui Mar 28, 2024 10:17 pm