You are not logged in.

#1 2010-09-30 13:11:36

m3x
Member

DrawPart and scaling issue

Hi,
First let me thank you for this library, it has helped me a great deal to start wii development...

Problem:
When using DrawPart and scaling parameters different than 1.0, the position is changed, and it seems to depend on where the part is in the texture. Using SetHandle does not seem to help (the position is changed differently, though). I managed to partly solve the problem by setting offestx and offsety in the GRRLIB_texImg struct manualy, but I'm not sure what values shoud I use....

Thanks for any help,
Marin

Offline

 

#2 2010-09-30 19:20:44

mdbrim
Member

Re: DrawPart and scaling issue

you could easily mathematically place it.  Post your code and it would be easier to help.

Based on the location you WANTED it, you could do some math to ensure it always got placed in the right spot.  I have not used SetHandle with DrawPart so you may just have to do it old school (math)

Offline

 

#3 2010-09-30 19:41:25

m3x
Member

Re: DrawPart and scaling issue

Hi, thanks for quick reply.
The code isn't that complicated (the relevenat part):

            GRRLIB_DrawPart(sx, sy, t->srcX, t->srcY, t->w, t->h, gfxTex, 0, ct->wt, ct->ht, -1);

the only thing that changes between frames are scaling parameters. I want the image to STAY at (sx, sy). What happens in reality, the image travels diagonally across the screen.

Marin

Offline

 

#4 2010-09-30 19:46:55

m3x
Member

Re: DrawPart and scaling issue

Just to explain:
I do know how to use GX directly to do this manually, but what I really want is to figure out how DrawPart works. The reason is I implemented win32 version of GRRLIB on DirectX (and some other OGC libs I use), that makes developing and debugging much easier for me (the Wii is in the other room, and I don't have Gecko interface).

Regards,
Marin

Offline

 

#5 2010-10-01 04:11:48

Crayon
Bad Mother Fucker

Re: DrawPart and scaling issue

m3x wrote:

I implemented win32 version of GRRLIB on DirectX (and some other OGC libs I use), that makes developing and debugging much easier for me (the Wii is in the other room, and I don't have Gecko interface).

Don't forget you could always use Dolphin Emulator to do some test.

Offline

 

#6 2010-10-01 07:41:45

m3x
Member

Re: DrawPart and scaling issue

Crayon wrote:

m3x wrote:

I implemented win32 version of GRRLIB on DirectX (and some other OGC libs I use), that makes developing and debugging much easier for me (the Wii is in the other room, and I don't have Gecko interface).

Don't forget you could always use Dolphin Emulator to do some test.

I do use it, but it lacks source level debugging.

Offline

 

#7 2010-10-01 17:52:36

NoNameNo
Administrator

Re: DrawPart and scaling issue

do i missed to code a function like "GRRLIB_DrawPartQuad" to make your need easier ?? wink

Offline

 

Board footer

Powered by FluxBB