Plant(3)                                                              Plant(3)



NNAAMMEE
       Plant -

SSYYNNOOPPSSIISS
   PPuubblliicc MMeetthhooddss
       int qquueerryy__bbiittss (int val, int pos, int count)
       int sseett__bbiittss (int val, int pos, int count, int setval)
       string qquueerryy__ppllaanntt__ddeesscc (mapping room_plants)
       void ggrroowwtthh__hhaannddlleerr (mapping plant_info)
       void llooaadd__vvaarrss (string vars)
       string ssaavvee__vvaarrss ()
       void oonn__ppllaanntt__ppaaiinntt (object painter, string *all_vars)
       int qquueerryy__xx ()
       int qquueerryy__yy ()
       int qquueerryy__zz ()
       varargs object ppllaanntt__iidd (mapping plant_info, string param, int count)

DDEETTAAIILLEEDD DDEESSCCRRIIPPTTIIOONN
       This is an inheritable object designed to make developing new plant
       types easier.

       Definition at line 7 of file plant.c.

MMEEMMBBEERR FFUUNNCCTTIIOONN DDOOCCUUMMEENNTTAATTIIOONN
   vvooiidd ggrroowwtthh__hhaannddlleerr ((mmaappppiinngg ppllaanntt__iinnffoo))
       A low-level event handler. This function takes the difficult-to-
       interpret data given by the plantdata object and converts it into
       easier-to-use variables. It then calls the higher level function for
       handling growth.

       It is strongly suggested that you do not override this function. It is
       quite difficult to implement properly. Use on_grow() instead.

       Definition at line 44 of file plants/plant.c.

       References load_vars(), and save_vars().

   vvooiidd llooaadd__vvaarrss ((ssttrriinngg vvaarrss))
       All the variables in _v_a_l are copied into local variables for easy
       reference. Most plant events make a call to this function before
       processing events to make event code more readable.

       Definition at line 69 of file plants/plant.c.

       Referenced by growth_handler(), on_plant_paint(), and plant_id().

   vvooiidd oonn__ppllaanntt__ppaaiinntt ((oobbjjeecctt ppaaiinntteerr,, ssttrriinngg ** aallll__vvaarrss))
       Calls the on_paint event multiple times, once for each plant given. All
       the plant variables are properly initialized for each call. Note that
       any changes you make to the variables are NOT saved, so don't bother
       trying.

       Definition at line 107 of file plants/plant.c.

       References load_vars().

   vvaarraarrggss oobbjjeecctt ppllaanntt__iidd ((mmaappppiinngg ppllaanntt__iinnffoo,, ssttrriinngg ppaarraamm,, iinntt ccoouunntt))
       If this plant's id function matches _p_a_r_a_m using any of the settings
       given in _p_l_a_n_t___i_n_f_o, then returns a pointer to an alias to this plant,
       currently this_object(), though if this causes problems we may make a
       shadow object later.

       The count is optional, and lets you choose the second, third, fourth,
       etc.

       Definition at line 142 of file plants/plant.c.

       References load_vars().

   iinntt qquueerryy__bbiittss ((iinntt vvaall,, iinntt ppooss,, iinntt ccoouunntt))
       A utility function for treating an integer _v_a_l as a bitmask. This
       fetches a range of bits for you. _p_o_s refers to the position of the
       rightmost (i.e. least significant) bit to fetch, and _c_o_u_n_t refers to
       the number of bits to fetch.

       Definition at line 79 of file plant.c.

   ssttrriinngg qquueerryy__ppllaanntt__ddeesscc ((mmaappppiinngg rroooomm__ppllaannttss))
       RReettuurrnnss::
           A default plant description.When you make your own plant objects,
           you should override this function. It is given here so that you
           will get an error message of sorts if you forget. Your overridden
           plant description should return one of a wide variety of
           descriptions for your plant (fifteen is a good minimum), including
           descriptions which describe the health and status of the plants.

       Be warned: This function is only called once per plant /a type, not
       once per plant. If there are multiple plants of the same type in the
       room, your description should reflect that. As work on this file
       progresses, various flags to make it easier to determine plant
       statistics will be written.

       Definition at line 33 of file plants/plant.c.

   iinntt qquueerryy__xx (())
       Convenience function, makes it look as though this object has coords.

       Definition at line 117 of file plants/plant.c.

   iinntt qquueerryy__yy (())
       Convenience function, makes it look as though this object has coords.

       Definition at line 122 of file plants/plant.c.

   iinntt qquueerryy__zz (())
       Convenience function, makes it look as though this object has coords.

       Definition at line 127 of file plants/plant.c.

   ssttrriinngg ssaavvee__vvaarrss (())
       Packs all the current values into a string and returns it. This string
       can then be sent back to the roomdata object to be stored.

       Definition at line 82 of file plants/plant.c.

       Referenced by growth_handler().

   iinntt sseett__bbiittss ((iinntt vvaall,, iinntt ppooss,, iinntt ccoouunntt,, iinntt sseettvvaall))
       The counterpart to qquueerryy__bbiittss(()). Note that it just returns the new
       value, it doesn't actually set anything, so it should be used something
       like mybits = set_bits( mybits, 3, 8, 10); (Set bits 3..10 of mybits to
       10). It is supposed to handle overflow reasonably gracefully, but who
       knows? This kind of code's a pain to write. If setval is too high, it
       will allow overflow (which means incrementing endlessly might have an
       unexpected effect!)

       Definition at line 97 of file plant.c.


AAUUTTHHOORR
       Generated automatically by Doxygen for Walraven from the source code.



Walraven                          9 Mar 2003                          Plant(3)
