intfiction.org

The Interactive Fiction Community Forum
It is currently Tue May 21, 2013 2:49 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Sat Dec 18, 2010 5:37 am 
Offline
User avatar

Joined: Sun Feb 03, 2008 5:55 am
Posts: 298
So I can see this piece of code in the Thing class:

Code:
/* if desired, display the room name */
        if ((verbose & LookRoomName) != 0)
        {
            "<.roomname>";
            lookAroundWithinName(actor, illum);
            "<./roomname>";
        }

Just what I want. But how do I express that it isn't desired?

LookRoomName seems to be a flag in adv3.h:

Code:
/* ------------------------------------------------------------------------ */
/*
 *   Flags for LOOK AROUND styles
 */

/* show the room name as part of the description */
#define LookRoomName       0x0001

How do I use this flag? It seems to be implied in comments that I can set gameMain.VerboseMode.isOn to some combination of flags, such as "(LookRoomDesc | LookListSpecials | LookListPortables)", but doing so in the intro doesn't seem to turn off the room names.

Alternatively I can just short circuit lookAroundWithinName to return nothing, but that's overkill. I don't want to stop rooms having names, I just don't want them printed out as the player moves around or looks.


Top
 Profile Send private message  
 
PostPosted: Sat Dec 18, 2010 1:47 pm 
Online
User avatar

Joined: Tue Apr 20, 2010 2:48 pm
Posts: 687
LookRoomName is a bit-flag that is used when calling Actor.lookAround(), Thing.lookAroundPov(), Thing.lookAroundWithin() and maybe others. gameMain.VerboseMode.isOn doesn't work with bit-flags. It can only be either true or nil.

Try overriding (or modifying, if you're not subclassing) Thing.lookAroundWithin(actor, pov, verbose):

Code:
lookAroundWithin(actor, pov, verbose)
{
   if (verbose) {
      verbose = (LookRoomDesc | LookListSpecials | LookListPortables);
   } else {
      verbose = (LookListSpecials | LookListPortables);
   }
   inherited(actor, pov, verbose);
}


That should work.

For the statusline, you can play around with Thing.statusName(actor). By default, it prints the room name.


Top
 Profile Send private message  
 
PostPosted: Sat Dec 18, 2010 3:14 pm 
Offline
User avatar

Joined: Sun Feb 03, 2008 5:55 am
Posts: 298
Yay! Awesome. Thanks.

I'm not too worried about the status line because I'll be changing that anyway.


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group