Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about interface changes?



> Hello,
> 
>    I'm trying to work on the throw codes and noticed that there are a lots
> of interface changes.

Here is some general comments about those, I think Mark can answer 
better your questions (I haven't really looked source so much).

All flags are now handled through macros 

	QUERY_FLAG(op, FLAG_X)
	SET_FLAG(op, FLAG_X)
	CLEAR_FLAG(op, FLAG_X)

where FLAG_X is some attribute (FLAG_ALIVE, FLAG_UNPAID, etc.).
[ Repeating two times FLAG part was a little mistake (IMHO), but it's
  more style question anyway ]

I want the same time mention an important change for version 0.91.8 
that was hidden in CHANGES file. Function insert_ob_in_ob returns 
now object that was inserted and the return value can be DIFFERENT 
from value that was inserted i.e. all calls should be in format 

	op = insert_ob_in_ob (op, where);

if op is used after insertion. I fixed all calls from version 0.91.7
but some patches used this and those were not fixed and this can cause
problems (not sure if it really does). This change was needed because 
in client/server mode object must have the same tag (op->count) even 
if it's merged (and removed).

[This should not have any visual effect to players. Petri asked about 
inventory sorting, the new client (cfclient) does not yet do any kind 
sorting, but old version should work as usual.]

>2. IS_ALIVE is removed. I take it is equivalent to QUERY_FLAG(item,FLAG_ALIVE)

Yes.

> 3. UNSET_FLY is removed. I take it is equivalent to SET_FLAG(item,FLAG_FLY_OFF)

No. FLY_ON and FLY_OFF are used buttons and traps which are activated by 
flying objects (similar to WALK_ON and WALK_OFF).

>    What does FLAG_FLYING used for?

It is used for for levitating (and arrows, etc) and I think you meant this 
in previously.

 -Tero