Search found 189 matches

by mix256
Mon Jan 14, 2019 6:04 pm
Forum: SGDK
Topic: Sprite sorting
Replies: 58
Views: 28842

Re: Sprite sorting

All of the SPR_xxx functions that I use are wrapped with null checks. Both for return values and as parameters.
Since A2 in the last error is 0x05 it either means I have gotten 0x05 back from SPR_addSprite or that it has happened in some other way afterwards. Me thinks. :)
by mix256
Sun Jan 13, 2019 3:35 pm
Forum: SGDK
Topic: Sprite sorting
Replies: 58
Views: 28842

Re: Sprite sorting

Got an address error in allocatesprite now, at 32e66. A1 is 00FF83FF. :) It looks like it "result->prev = NULL" that gives the address error here? 00032e28 <allocateSprite.lto_priv.199>: 32e28: 2f02 movel %d2,%sp@- 32e2a: 322f 000a movew %sp@(10),%d1 32e2e: 2039 00ff 591e movel ff591e <free.lto_priv...
by mix256
Tue Jan 08, 2019 7:49 am
Forum: SGDK
Topic: wine
Replies: 6
Views: 4575

Re: wine

I sometimes compile with wine and that works ok. But on my mac rescomp has some troubles with lz4w (32/64 bit clash or something). In case anyone would like to know, I mean. :)
I'm usually on windows, though.
by mix256
Mon Jan 07, 2019 7:47 pm
Forum: SGDK
Topic: Sprite sorting
Replies: 58
Views: 28842

Re: Sprite sorting

Super thanks! I've just updated let's see if it happens again.
by mix256
Mon Jan 07, 2019 12:01 pm
Forum: SGDK
Topic: Sprite sorting
Replies: 58
Views: 28842

Re: Sprite sorting

Thanks! Will update as soon as possible.
I myself haven't set up anything to run on vint. But I'm not disabling vint anytime either. Could this be a problem?
by mix256
Sat Jan 05, 2019 4:47 pm
Forum: SGDK
Topic: Sprite sorting
Replies: 58
Views: 28842

Re: Sprite sorting

Got an address error in spr_update now, related to this you think? :) 3292a: 4879 00ff 33c4 pea ff33c4 <vdpSpriteCacheQueue> 32930: 42a7 clrl %sp@- 32932: 4eb9 0003 0fba jsr 30fba <DMA_queueDma.part.2> 32938: 4fef 0014 lea %sp@(20),%sp 3293c: 2479 00ff 5914 moveal ff5914 <firstSprite>,%a2 32942: b4f...
by mix256
Sat Jan 05, 2019 11:28 am
Forum: SGDK
Topic: Sprite sorting
Replies: 58
Views: 28842

Re: Sprite sorting

I fell asleep when I got home yesterday. Guess I needed it. :) Seems to work fine, for the most part! Super awesome! Got it to hang when using setDepth like this: SPR_setDepth(beam0, SPR_MIN_DEPTH + 2) SPR_setDepth(beam1, SPR_MIN_DEPTH + 2) SPR_setDepth(beam2, SPR_MIN_DEPTH + 2) SPR_setDepth(beam3, ...
by mix256
Fri Jan 04, 2019 10:07 am
Forum: SGDK
Topic: Sprite sorting
Replies: 58
Views: 28842

Re: Sprite sorting

That's brilliant! Will check as soon as I get back home! :)
by mix256
Thu Jan 03, 2019 4:51 pm
Forum: SGDK
Topic: Sprite sorting
Replies: 58
Views: 28842

Re: Sprite sorting

I think that something is not working as intended.
If I only add sprites with the head flag it seems like only the last added sprite is visible. I will investigate some more.
by mix256
Thu Jan 03, 2019 11:19 am
Forum: SGDK
Topic: Sprite sorting
Replies: 58
Views: 28842

Re: Sprite sorting

Awesome! Super thanks!
Longing home to test it out. :)

Edit:
You have this still there, though. Might clash if one wants to do setDepth, right?

Code: Select all

// sprite is always added at the end of list so we use MAX_DEPTH here
sprite->depth = SPR_MAX_DEPTH
by mix256
Thu Jan 03, 2019 7:22 am
Forum: SGDK
Topic: Sprite sorting
Replies: 58
Views: 28842

Re: Sprite sorting

But inserting sprites in the order they're meant to be sorted is how games normally do it… Sure, if I had the possibility to re-insert all sprites each frame. Are you doing that with SGDK? if so, please tell me how. :) Releasing all sprites and then re-adding them each frame is not something SGDK w...
by mix256
Wed Jan 02, 2019 1:39 pm
Forum: SGDK
Topic: Sprite sorting
Replies: 58
Views: 28842

Re: Sprite sorting

Thanks Stef! ...can't you reverse add ordering so they are added from top to bottom priority order in the meantime... No I can't, since the order of the 16 added sprites aren't important. It is only important that they all appear in front of the already existing sprites (especially the sprite that f...
by mix256
Wed Jan 02, 2019 10:51 am
Forum: SGDK
Topic: Sprite sorting
Replies: 58
Views: 28842

Re: Sprite sorting

But it will be a big hit when I add 16 sprites on the same frame and there already are 16 sprites on screen.
That is why I'm asking for a way to add them first to the linked list. :)
by mix256
Wed Jan 02, 2019 7:39 am
Forum: SGDK
Topic: Sprite sorting
Replies: 58
Views: 28842

Re: Sprite sorting

But I want the next sprite to be in front of the previous sprite. Visually in front of the the previous sprite.
depth++ will make it get behind the previous sprite, right? So I need depth-- and that will make it always sort.
Or what am I missing? :)
by mix256
Mon Dec 31, 2018 9:32 pm
Forum: SGDK
Topic: Sprite sorting
Replies: 58
Views: 28842

Re: Sprite sorting

But for me it would be SPR_setDepth(depth--) which would make it sort always, right?
So instead of inserting it at the beginning of the list it will get inserted last in the list with addSprite and then sorted to the top with setDepth each time?
Or maybe I'm thinking about this the wrong way?