Sort TILE primitives into GsOT?

Graphic based area of development (Graphics Processing Unit), including the Geometry Transform Engine (GTE), TIM, STR (MDEC), etc.
Post Reply
User avatar
ddoodm
Curious PSXDEV User
Curious PSXDEV User
Posts: 15
Joined: Nov 18, 2012
Location: Sydney, Australia
Contact:

Sort TILE primitives into GsOT?

Post by ddoodm » June 22nd, 2013, 5:42 pm

Hi guys. I'm working on a Tetris implementation as a bit of a learning experiment, and I'm developing a 'strafield' intro sequence now (which is mostly finished, but I want to rewrite it).

Rubbish static preview (looks a bit cooler when animated):
Image

Anyway, my question is:
I need to sort an array of TILE_1s into my GsOT, but there are no GsSort* methods for TILE primitives (or even standard primitives). I'm drawing them directly with DrawPrim right now, but that's going to get ambiguous real quick.

Is it possible to place the TILE_1s into my GsOT_TAG array manually? It's probably possible to use AddPrim with a u_long*, but that's not ideal. It'd be great to be able to sort them automagically with some kind of method that acts upon a GsOT.

Thanks for any help!
^____________^

User avatar
inc^lightforce
Verified
Psy-Q Enthusiast
Psy-Q Enthusiast
Posts: 248
Joined: Mar 07, 2013
I am a: Programmer Windows+PS1, GFX Artist
PlayStation Model: Black
Location: Germany

Post by inc^lightforce » June 23rd, 2013, 1:40 pm


User avatar
ddoodm
Curious PSXDEV User
Curious PSXDEV User
Posts: 15
Joined: Nov 18, 2012
Location: Sydney, Australia
Contact:

Post by ddoodm » June 23rd, 2013, 2:35 pm

Thanks a million for that; your code is really elegant, and the stars look amazing too. Makes a lot of sense thanks to your great comments.
^____________^

User avatar
inc^lightforce
Verified
Psy-Q Enthusiast
Psy-Q Enthusiast
Posts: 248
Joined: Mar 07, 2013
I am a: Programmer Windows+PS1, GFX Artist
PlayStation Model: Black
Location: Germany

Post by inc^lightforce » June 23rd, 2013, 3:29 pm

no problem. if you need a "3D starfield scroller" from the back into the front on Z Axis i can make a 2nd Script.
feel free to visit my Workshop for some other goodies here:
WORKSHOP CODING INTROS & DEMOS

User avatar
ddoodm
Curious PSXDEV User
Curious PSXDEV User
Posts: 15
Joined: Nov 18, 2012
Location: Sydney, Australia
Contact:

Post by ddoodm » June 23rd, 2013, 4:28 pm

Really appreciate your offer, but mine already scrolls along the Z. :) Wow, didn't know you had a workshop thing going on; going to have a look now!
^____________^

Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests