View previous topic :: View next topic |
Author |
Message |
Bagne ALL YOUR NUDIBRANCH ARE BELONG TO GASTROPODA

Joined: 19 Feb 2003 Posts: 518 Location: Halifax
|
Posted: Mon Jun 07, 2010 6:48 pm Post subject: Map layers and slices |
|
|
If I wanted a slice to appear in front of layer0 but behind layer 1, all I has to do is say
Code: | MOVE SLICE ABOVE (sl, LOOKUP SLICE(sl:map layer0)) |
right?
I'm on a map that only has layer 0 and 1 visible, but I can't see the slice whatsoever :-(
Does this have to do with the funky map-layers-aren't-quite-slices-yet issue? _________________ Working on rain and cloud formation |
|
Back to top |
|
 |
Newbie_Power

Joined: 04 Sep 2006 Posts: 1762
|
Posted: Mon Jun 07, 2010 8:55 pm Post subject: |
|
|
You have to use set parent to do this. Move slice above only works on a children to children basis, I believe. _________________
TheGiz> Am I the only one who likes to imagine that Elijah Wood's character in Back to the Future 2, the kid at the Wild Gunman machine in the Cafe 80's, is some future descendant of the AVGN? |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Mon Jun 07, 2010 9:19 pm Post subject: |
|
|
Yes you have to use setparent, and the reason is that the parent slice (sl:map root) of the map layers is not currently a full-fledged real slice. It exists in the slice tree, but it's never drawn. The map layer slices are drawn manually.
Newbie_Power wrote: | Move slice above only works on a children to children basis, I believe. |
Not sure what you mean, but movesliceabove can reparent the slice it moves. _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
Bagne ALL YOUR NUDIBRANCH ARE BELONG TO GASTROPODA

Joined: 19 Feb 2003 Posts: 518 Location: Halifax
|
Posted: Tue Jun 08, 2010 3:59 am Post subject: |
|
|
Oh that's weird, because I *am* using
SET PARENT (sl, LOOKUP SLICE(sl:map layer0))
and that works just fine ... insofar as it anchors the sprite in place on the map.
Incidentally, this makes the slice disappear, but it reappears if I use
SLICE TO FRONT (sl)
If the maproot isn't drawn, that's weird that I can set layer0 as a parent and still see the slice at all.
Am I to understand from a long-past post you made that the answers to my above questions lie somewhere within allmodex.bas OR blit.c? _________________ Working on rain and cloud formation |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Tue Jun 08, 2010 6:45 am Post subject: |
|
|
Bagne wrote: | Oh that's weird, because I *am* using
SET PARENT (sl, LOOKUP SLICE(sl:map layer0))
and that works just fine ... insofar as it anchors the sprite in place on the map. |
The map layer slices are drawn but their parent, sl:maproot, isn't (nor it's parent, the root slice).
Bagne wrote: | Incidentally, this makes the slice disappear, but it reappears if I use SLICE TO FRONT (sl) |
Hmm? Child slices are always drawn in front of their parent.
Bagne wrote: | Am I to understand from a long-past post you made that the answers to my above questions lie somewhere within allmodex.bas OR blit.c? |
No, no. allmodex.bas and blit.c do not contain any Game.exe-specific code. See 'Guide to source files' if you want to know more. The code for drawing the map is in "displayall" in game.bas. _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
Bagne ALL YOUR NUDIBRANCH ARE BELONG TO GASTROPODA

Joined: 19 Feb 2003 Posts: 518 Location: Halifax
|
Posted: Sat Oct 30, 2010 8:50 pm Post subject: |
|
|
When map layers are converted to individual slices (to which you can attach and sort other slices), please let me know :-)
There's a visual effect I'm itching to try. _________________ Working on rain and cloud formation |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Sun Oct 31, 2010 5:58 am Post subject: |
|
|
I'm confused, and you're confused. Map layers are individual slices already. so what is it that you want to do, move a slice underneath map layer 0? _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
Bagne ALL YOUR NUDIBRANCH ARE BELONG TO GASTROPODA

Joined: 19 Feb 2003 Posts: 518 Location: Halifax
|
Posted: Sun Oct 31, 2010 9:21 am Post subject: |
|
|
Oh.
Confusing.
So, what I would like to do is place a slice behind layer 1, but in front of layer 0.
Do I:
Code: | SET PARENT (sl, LOOKUP SLICE(sl:maproot))
MOVE SLICE ABOVE (sl, LOOKSUP SLICE(sl:map layer0 )) |
?
I remember that not working, but I'll try again.
[Edit] Yeah, not working.
If I do the above, the slices do not appear anywhere.
If I
Code: | SET PARENT (sl, LOOKUP SLICE(sl:map layer0)) |
The slices are visible, but they're in front of all the map layers.
I remember someone explaining to me that this is because map layers don't totally behave like slices yet (but that will change later). _________________ Working on rain and cloud formation |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Sun Oct 31, 2010 12:09 pm Post subject: |
|
|
Bagne wrote: |
Do I:
Code: | SET PARENT (sl, LOOKUP SLICE(sl:maproot))
MOVE SLICE ABOVE (sl, LOOKSUP SLICE(sl:map layer0 )) |
? |
That's the bit that's not implemented (see up this thread).
Quote: | If I
Code: | SET PARENT (sl, LOOKUP SLICE(sl:map layer0)) |
The slices are visible, but they're in front of all the map layers. |
Oh! That's a bug. That's bad; a lot of games rely on this. I can reproduce this easily. Yet again, nobody noticed! _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
Bagne ALL YOUR NUDIBRANCH ARE BELONG TO GASTROPODA

Joined: 19 Feb 2003 Posts: 518 Location: Halifax
|
Posted: Sun Oct 31, 2010 5:27 pm Post subject: |
|
|
Oh. Now the past few posts actually make sense.
Is that likely to be fixed, or if past games have used and relied on the incorrect effect of that command, is it just going to sit and fester? _________________ Working on rain and cloud formation |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Sun Oct 31, 2010 11:36 pm Post subject: |
|
|
I meant that lots of games rely on it working. Currently it appears to do nothing; no one would use it if that was the case! _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
Bagne ALL YOUR NUDIBRANCH ARE BELONG TO GASTROPODA

Joined: 19 Feb 2003 Posts: 518 Location: Halifax
|
Posted: Mon Nov 01, 2010 5:31 am Post subject: |
|
|
I suspect it was this way in June when I made the OP. Of the many commands I tried, the proper way was one of them– I just thought I was doing it wrong, or that it wasn't fully implemented or something.
Cool. Mystery solved. _________________ Working on rain and cloud formation |
|
Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Mon Nov 01, 2010 7:33 am Post subject: |
|
|
So what is going on here? Is it that a slice parented to map layer 0 is showing up on top of all the map layers instead of between map layer 0 and map layer 1? |
|
Back to top |
|
 |
Bagne ALL YOUR NUDIBRANCH ARE BELONG TO GASTROPODA

Joined: 19 Feb 2003 Posts: 518 Location: Halifax
|
Posted: Mon Nov 01, 2010 7:37 am Post subject: |
|
|
Aye.
I haven't tried it between other layers, but it's definitely the case for layer 0 and layer 1. _________________ Working on rain and cloud formation |
|
Back to top |
|
 |
Bagne ALL YOUR NUDIBRANCH ARE BELONG TO GASTROPODA

Joined: 19 Feb 2003 Posts: 518 Location: Halifax
|
Posted: Fri Nov 26, 2010 6:56 am Post subject: |
|
|
Was this put on bugzilla? I can't find it ... so I just put it up as bug 865. _________________ Working on rain and cloud formation |
|
Back to top |
|
 |
|