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

How to change order that sprite parts are drawn?


Gohan
 Share

Recommended Posts

I need to edit the source code to change the way in which parts of a sprite are drawn. The custom character creation draws the hair, then body then legs. I need body, then legs, than hair. How do I do this?

If you don't understand the problem here is a pic of what the source code is doing.
![](http://i753.photobucket.com/albums/xx171/GohanX_Album/hairwrong.png)
I'm using Stable btw
Link to comment
Share on other sites

@Prince:

> Dude im no GFX designer but I found some flaws:
> 1:unless he's meant to be as skinny as stick man,he is way too thin.
> 2: As far as I'm concerned,every sprite has a neck.
> :rolleyes:

Well first, this thread has nothing to do with how good my sprite looks(well I guess it does have a little bit to do with it, but not in that way), this is a forum for asking for help. Second I didn't draw this it came from an online chara generator.

Really if you're just going to criticize art that isn't even draw by me don't bother posting.
Link to comment
Share on other sites

  • 2 weeks later...
I hope I'm not breaking the limit here, don't wanna necro(the limit is a month on most forums right?)

I have it mostly alligned but the hair is uhh… I don't know how to put it. Just look.

![](http://i753.photobucket.com/albums/xx171/GohanX_Album/hairwrong.png)

Okay so how do I fix that?
Link to comment
Share on other sites

@Admiral:

> I feel your pain Gohan; I deal with this very same problem.
> You need to modify the source code (the part where it draws the head, body, legs) and change some things around.
> The problem is, it's drawing the head (or hair) first, then the body, then the legs.
> So the hair is on the bottom.

Okay so how do I change it? I don't know how to edit the source code.
Link to comment
Share on other sites

@Gohan:

> @Admiral:
>
> > I feel your pain Gohan; I deal with this very same problem.
> > You need to modify the source code (the part where it draws the head, body, legs) and change some things around.
> > The problem is, it's drawing the head (or hair) first, then the body, then the legs.
> > So the hair is on the bottom.
>
> Okay so how do I change it? I don't know how to edit the source code.

I can move this to the source questions, just edit your topic with your recent problem.
Link to comment
Share on other sites

I think I found the bit of code I'm looking for, but not sure. I found this thread:
http://www.touchofdeathforums.com/smf/index.php/topic,46142.0.html

Then after reading it I looked in the file mentioned in that thread. I found this:
```
If CustomPlayers <> 0 Then
                    frmNewChar.HScroll1.Visible = True
                    frmNewChar.HScroll2.Visible = True
                    frmNewChar.HScroll3.Visible = True
                End If
```Is that what I'm looking for? If so how do I change it to do what I need it to do? I'd have followed the directions in the thread I found but the codes are… different. I think he's talking about a different Eclipse version.
Link to comment
Share on other sites

@Gohan:

> I think I found the bit of code I'm looking for, but not sure. I found this thread:
> http://www.touchofdeathforums.com/smf/index.php/topic,46142.0.html
>
> Then after reading it I looked in the file mentioned in that thread. I found this:
> ```
> If CustomPlayers <> 0 Then
>                     frmNewChar.HScroll1.Visible = True
>                     frmNewChar.HScroll2.Visible = True
>                     frmNewChar.HScroll3.Visible = True
>                 End If
> ```Is that what I'm looking for? If so how do I change it to do what I need it to do? I'd have followed the directions in the thread I found but the codes are… different. I think he's talking about a different Eclipse version.

No, I can show you what you need to change exactly, all you have to do is find it and switch it around:

Search your _Project_ for "Sub BltPLayer"
Then search your _Procedure_ lfor "32 x 32 Sprites"

Scroll down till you see THIS:

Your Code:
```
rec.top = Player(index).head * PIC_Y
rec.Bottom = rec.top + PIC_Y
Call DD_BackBuffer.BltFast(X, Y, DD_player_head, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
rec.top = Player(index).body * PIC_Y
rec.Bottom = rec.top + PIC_Y
Call DD_BackBuffer.BltFast(X, Y, DD_player_body, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
rec.top = Player(index).leg * PIC_Y
rec.Bottom = rec.top + PIC_Y
Call DD_BackBuffer.BltFast(X, Y, DD_player_legs, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)

```
ALL you need to do is switch the head one around and put it at bottom (you can even just paste this over if you wanted:

New Code:
```
rec.top = Player(index).body * PIC_Y
rec.Bottom = rec.top + PIC_Y
Call DD_BackBuffer.BltFast(X, Y, DD_player_body, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
rec.top = Player(index).leg * PIC_Y
rec.Bottom = rec.top + PIC_Y
Call DD_BackBuffer.BltFast(X, Y, DD_player_legs, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
rec.top = Player(index).head * PIC_Y
rec.Bottom = rec.top + PIC_Y
Call DD_BackBuffer.BltFast(X, Y, DD_player_head, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)

```
There will be a few of these that look exactly the same, in the proceedure, make sure to change them all. I think there's 3.

@Admiral:

> I feel your pain Gohan; I deal with this very same problem.
> You need to modify the source code (the part where it draws the head, body, legs) and change some things around.
> The problem is, it's drawing the head (or hair) first, then the body, then the legs.
> So the hair is on the bottom.

I've posted in the ES Download thread about 4 times about getting it fixed but it never seems to. T_T but most of those replies have been erased by now.
Link to comment
Share on other sites

@varinyc:

> @Gohan:
>
> > I think I found the bit of code I'm looking for, but not sure. I found this thread:
> > http://www.touchofdeathforums.com/smf/index.php/topic,46142.0.html
> >
> > Then after reading it I looked in the file mentioned in that thread. I found this:
> > ```
> > If CustomPlayers <> 0 Then
> >                     frmNewChar.HScroll1.Visible = True
> >                     frmNewChar.HScroll2.Visible = True
> >                     frmNewChar.HScroll3.Visible = True
> >                 End If
> > ```Is that what I'm looking for? If so how do I change it to do what I need it to do? I'd have followed the directions in the thread I found but the codes are… different. I think he's talking about a different Eclipse version.
>
> No, I can show you what you need to change exactly, all you have to do is find it and switch it around:
>
> Search your _Project_ for "Sub BltPLayer"
> Then search your _Procedure_ lfor "32 x 32 Sprites"
>
> Scroll down till you see THIS:
>
> Your Code:
> ```
> rec.top = Player(index).head * PIC_Y
> rec.Bottom = rec.top + PIC_Y
> Call DD_BackBuffer.BltFast(X, Y, DD_player_head, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
> rec.top = Player(index).body * PIC_Y
> rec.Bottom = rec.top + PIC_Y
> Call DD_BackBuffer.BltFast(X, Y, DD_player_body, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
> rec.top = Player(index).leg * PIC_Y
> rec.Bottom = rec.top + PIC_Y
> Call DD_BackBuffer.BltFast(X, Y, DD_player_legs, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
>
> ```
> ALL you need to do is switch the head one around and put it at bottom (you can even just paste this over if you wanted:
>
> New Code:
> ```
> rec.top = Player(index).body * PIC_Y
> rec.Bottom = rec.top + PIC_Y
> Call DD_BackBuffer.BltFast(X, Y, DD_player_body, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
> rec.top = Player(index).leg * PIC_Y
> rec.Bottom = rec.top + PIC_Y
> Call DD_BackBuffer.BltFast(X, Y, DD_player_legs, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
> rec.top = Player(index).head * PIC_Y
> rec.Bottom = rec.top + PIC_Y
> Call DD_BackBuffer.BltFast(X, Y, DD_player_head, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
>
> ```
> There will be a few of these that look exactly the same, in the proceedure, make sure to change them all. I think there's 3.
>
> @Admiral:
>
> > I feel your pain Gohan; I deal with this very same problem.
> > You need to modify the source code (the part where it draws the head, body, legs) and change some things around.
> > The problem is, it's drawing the head (or hair) first, then the body, then the legs.
> > So the hair is on the bottom.
>
> I've posted in the ES Download thread about 4 times about getting it fixed but it never seems to. T_T but most of those replies have been erased by now.

What directory can I fins that file in?
Link to comment
Share on other sites

@Gohan:

> There are 3 codes exactly like that in the same file X_X Should I rearrange all three?
>
> EDIT: I went ahead and rearranged all three and it's still broken!!! :O :angry:

Well, from your other thread, it seems like you don't have VB6\. X__x I don't know where you'd be finding your 3 codes. You will need VB6 to do what I stated above with.
Link to comment
Share on other sites

Yeah the files can be opened in Notepad actually. I have a understanding of source now(well, basic). It didn't work cuz Notepad can't make exe's. I got vb6 and my cutonm chars are fixed :)
Link to comment
Share on other sites

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...