Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

Map layers and slices
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
Bagne
ALL YOUR NUDIBRANCH ARE BELONG TO GASTROPODA




Joined: 19 Feb 2003
Posts: 518
Location: Halifax

PostPosted: Mon Jun 07, 2010 6:48 pm    Post subject: Map layers and slices Reply with quote

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
View user's profile Send private message
Newbie_Power




Joined: 04 Sep 2006
Posts: 1762

PostPosted: Mon Jun 07, 2010 8:55 pm    Post subject: Reply with quote

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
View user's profile Send private message
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Mon Jun 07, 2010 9:19 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Bagne
ALL YOUR NUDIBRANCH ARE BELONG TO GASTROPODA




Joined: 19 Feb 2003
Posts: 518
Location: Halifax

PostPosted: Tue Jun 08, 2010 3:59 am    Post subject: Reply with quote

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
View user's profile Send private message
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Tue Jun 08, 2010 6:45 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Bagne
ALL YOUR NUDIBRANCH ARE BELONG TO GASTROPODA




Joined: 19 Feb 2003
Posts: 518
Location: Halifax

PostPosted: Sat Oct 30, 2010 8:50 pm    Post subject: Reply with quote

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
View user's profile Send private message
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Sun Oct 31, 2010 5:58 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Bagne
ALL YOUR NUDIBRANCH ARE BELONG TO GASTROPODA




Joined: 19 Feb 2003
Posts: 518
Location: Halifax

PostPosted: Sun Oct 31, 2010 9:21 am    Post subject: Reply with quote

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
View user's profile Send private message
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Sun Oct 31, 2010 12:09 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Bagne
ALL YOUR NUDIBRANCH ARE BELONG TO GASTROPODA




Joined: 19 Feb 2003
Posts: 518
Location: Halifax

PostPosted: Sun Oct 31, 2010 5:27 pm    Post subject: Reply with quote

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
View user's profile Send private message
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Sun Oct 31, 2010 11:36 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Bagne
ALL YOUR NUDIBRANCH ARE BELONG TO GASTROPODA




Joined: 19 Feb 2003
Posts: 518
Location: Halifax

PostPosted: Mon Nov 01, 2010 5:31 am    Post subject: Reply with quote

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
View user's profile Send private message
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Mon Nov 01, 2010 7:33 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Bagne
ALL YOUR NUDIBRANCH ARE BELONG TO GASTROPODA




Joined: 19 Feb 2003
Posts: 518
Location: Halifax

PostPosted: Mon Nov 01, 2010 7:37 am    Post subject: Reply with quote

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
View user's profile Send private message
Bagne
ALL YOUR NUDIBRANCH ARE BELONG TO GASTROPODA




Joined: 19 Feb 2003
Posts: 518
Location: Halifax

PostPosted: Fri Nov 26, 2010 6:56 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group