Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[DX8] Paperdolls not working


erkro1
 Share

Recommended Posts

I'm having difficulties with the paperdolling, it's not displaying the item or anything.

Code:

```
Public Sub DrawPaperdoll(ByVal x2 As Long, ByVal y2 As Long, ByVal Sprite As Long, ByVal Anim As Long, ByVal spritetop As Long, ByVal Colour As Long)

Dim Rec As RECT

Dim X As Long, y As Long

Dim width As Long, height As Long

' If debug mode, handle error then exit out

If Options.Debug = 1 Then On Error GoTo ErrorHandler

If Sprite < 1 Or Sprite > NumAuras Then Exit Sub

With Rec

.Top = spritetop * (Tex_Aura(Sprite).height / 4)

.Bottom = .Top + (Tex_Aura(Sprite).height / 4)

.Left = Anim * (Tex_Aura(Sprite).width / 3)

.Right = .Left + (Tex_Aura(Sprite).width / 3)

End With

' clipping

X = ConvertMapX(x2)

y = ConvertMapY(y2)

width = (Rec.Right - Rec.Left)

height = (Rec.Bottom - Rec.Top)

' Clip to screen

If y < 0 Then

With Rec

.Top = .Top - y

End With

y = 0

End If

If X < 0 Then

With Rec

.Left = .Left - X

End With

X = 0

End If

RenderTexture Tex_Aura(Sprite), X, y, Rec.Left, Rec.Top, Rec.Right - Rec.Left, Rec.Bottom - Rec.Top, Rec.Right - Rec.Left, Rec.Bottom - Rec.Top, Colour

' Error handler

Exit Sub

ErrorHandler:

HandleError "DrawPaperdoll", "modGraphics", Err.Number, Err.Description, Err.Source, Err.HelpContext

Err.Clear

Exit Sub

End Sub
```

If you need more just ask. ![;)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/wink.png)
Link to comment
Share on other sites

  • 3 weeks later...
Well, what engine are you using for starters? Also, include which version of DirectX you are using to simplify finding an answer to your problem.

Lastly, if you made any changes from the stock code, it would be best to provide a copy of the original code to compare. I'll find your problem and tell you what you need to do to fix it.
Link to comment
Share on other sites

> Well, what engine are you using for starters? Also, include which version of DirectX you are using to simplify finding an answer to your problem.
>
> Lastly, if you made any changes from the stock code, it would be best to provide a copy of the original code to compare. I'll find your problem and tell you what you need to do to fix it.

How much versions of DirectX8 are there?
Link to comment
Share on other sites

> Forgot to tell that I already fixed the problem, it wasn't that piece of code. ![;)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/wink.png)
>
> But thanks anyway.

Oh dear god you're one of THEM… lol

It might not be a bad idea to contribute back to the community by telling us what the problem was and how you fixed it.
Link to comment
Share on other sites

> Oh dear god you're one of THEM… lol
>
> It might not be a bad idea to contribute back to the community by telling us what the problem was and how you fixed it.

The problem was in the ResBak Online engine, paperdolls were already working but called aura's.
Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...