Convidado Convidado
| Assunto: Mudando O Tamanho Das Sprites 32x32 para 32x64 Dom 26 Jun 2011, 12:46 | |
| Olá! 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 :-) Té+! Créditos:MMODEV |
|
Convidado Convidado
| Assunto: Re: Mudando O Tamanho Das Sprites 32x32 para 32x64 Seg 27 Jun 2011, 14:31 | |
| tutorial bem legal pra jogos de naruto |
|
Convidado Convidado
| Assunto: Re: Mudando O Tamanho Das Sprites 32x32 para 32x64 Ter 28 Jun 2011, 17:20 | |
| Game Over Obrigado por compartilhar esse tuto com agente ! +1 |
|
Convidado Convidado
| Assunto: Re: Mudando O Tamanho Das Sprites 32x32 para 32x64 Sáb 04 Fev 2012, 17:23 | |
| Seguinte, sou novo nessa parte de game designer, mas tenho noção avançada em Delphi, Baixei o Vb6, e o Eclipse e Elysium, onsegui abrir o Elysium no Vb6, varios dos arquivos destiados ao Projeto no Vb6, ,mas fica a duvida da parte inicial do Topico, a qual mostra a edição dos Codigos: "Public Const SIZE_Y = 32"
"Public Const SIZE_Y = 64"Posso não manipular a ferramenta do Vb6 com exito, mas está bem vago a parte do inicio, sendo que a varios arquivos e abas dentro do Codigo Fonte do Elysium, a qual não soube achar o campo a ser editado, os seguintes codigos vem acompanhado com o Nome da Aba. Ex: " modGameLogic, "... E etceteras... Ficaria grato se me exclarece-se esse problema ^^ , Se funcionar no meu, Re-postarei com um agradecimento. |
|
Conteúdo patrocinado
| Assunto: Re: Mudando O Tamanho Das Sprites 32x32 para 32x64 | |
| |
|