/**
 * \~russian @defgroup ClientReserved    ()
 * \~english @defgroup ClientReserved Reserved script functions for client
 * \~ @ingroup Client
 */
/*@{*/

/** \~russian       ,     client_main.fos.
 *
 * @return   @c false   .
 */
bool start();

/** \~russian ,     .
 *
 *      .
 *
 * @return   ,      .
 *            ,      .
 */
uint loop();

/** \~russian     .
 *
 *  @c Draw*    .
 *
 ** \~english Render interface function.
 *
 * You can use @c Draw* functions only there.
 *
 */
void render_iface();

/** \~russian           .
 *
 *       .
 *  @c DrawMap*    .
 *
 ** \~english Render map function.
 *
 * You can use @c DrawMap* functions only there.
 * This drawing occurs before first interface layer.
 *
 ** \~ @see render_iface
 *
 */
void render_map();

/** \~russian     .
 *
 * @param  [in, out]  message   .
 * @param  [in, out]  sayType    (. @link SayTypes Say types@endlink).
 *
 * @return   @c false   .
 */
bool out_message(string& message, int& sayType);

/** \~russian   .
 *
 * @param   [in, out]  message      .
 * @param   [in, out]  sayType      (. @link SayTypes Say types@endlink).
 * @param   [in, out]  critterId   ,    .
 * @param   [in, out]  delay        .
 *
 * @return
 *
 * @remarks  .
 * @remarks -    <code>TextDelay +   * 100</code> .
 */
bool in_message(string& message, int& sayType, uint& critterId, uint& delay);

/** \~russian      .
 *
 * @param   [in, out]  message      .
 * @param   [in, out]  hexX, hexY    .
 * @param   [in, out]  color        .
 * @param   [in, out]  delay         .
 *
 * @return
 *
 * @remarks  ,    <code>TextDelay +   * 100</code> .
 */
bool map_message(string& message, uint16& hexX, uint16& hexY, uint& color, uint& delay);

/** \~russian  ,      .
 *
 * @param  item      ,    .
 * @param  lookType  . @link ItemLookTypes Item look types@endlink.
 *
 * @return    .
 */
string item_description(ItemCl& item, int lookType);

/** \~russian  ,     .
 *
 * @param  cr        ,    .
 * @param  lookType  . @link CritterLookTypes Critter look types@endlink.
 *
 * @return    .
 */
string critter_description(CritterCl& cr, int lookType);

/** \~russian  ,    -   .
 *
 * @param        descType       
 *                             (. @link GenericDescriptionsTypes Generic descriptions types@endlink).
 * @param  [out] offsX, offsY      .
 *
 * @return .
 */
string generic_description(int descType, int& offsX, int& offsY);

/** \~russian  ,       .
 *
 * @param         type    (. @link Elevators@endlink).
 * @param  [out]  data  ,    .
 *
 * @return @c true   ,    ;
 *         @c false    .
 */
bool get_elevator(uint type, uint[]& data);

/** \~russian    -   .
 *
 * @param  cr   .
 *
 */
void critter_in(CritterCl& cr);

/** \~russian    -   .
 *
 * @param  cr   .
 *
 */
void critter_out(CritterCl& cr);

/** \~russian      .
 *
 * @param  item   .
 *
 */
void item_map_in(ItemCl& item);

/** \~russian      .
 *
 * @param  itemNow      .
 * @param  itemBefore   .
 *
 */
void item_map_changed(ItemCl& itemNow, ItemCl& itemBefore);

/** \~russian      .
 *
 * @param  item   .
 *
 */
void item_map_out(ItemCl& item);

/** \~russian      .
 *
 * @param  item     .
 *
 */
void item_inv_in(ItemCl& item);

/** \~russian      .
 *
 * @param  item     .
 *
 */
void item_inv_out(ItemCl& item);

/** \~russian     .
 *
 * @param  item   .
 *
 */
void item_drop(ItemCl& item);

/** \~russian    2D .
 *
 * @param  animateStay     -  (@a false)    (@a true).
 * @param  cr           ,    .
 * @param  anim1           (. @b ANIM1_*  @b _animation.fos).
 * @param  anim2           (. @b ANIM2_2D_*  @b _animation.fos).
 * @param  item           ,   .
 */
void animation2d_process(bool animateStay, CritterCl& cr, uint anim1, uint anim2, ItemCl@ item);

/** \~russian    3D .
 *
 * @param  animateStay     -  (@a false)    (@a true).
 * @param  cr           ,    .
 * @param  anim1           (. @b ANIM1_*  @b _animation.fos).
 * @param  anim2           (. @b ANIM2_3D_*  @b _animation.fos).
 * @param  item           ,   .
 */
void animation3d_process(bool animateStay, CritterCl& cr, uint anim1, uint anim2, ItemCl@ item);

/** (?) */
uint item_cost(ItemCl& item, CritterCl& chosen, CritterCl& npc, bool sell);

/** (?) */
bool check_perk(CritterCl& cr, uint perk);

/** (?) */
void player_data_generate(int[]& data);

/** (?) */
bool player_data_check(int[]& data);

/** \~russian ,    - .
 *
 *        :  ,
 * ,    ..,     ,
 *      .
 *
 * @param   localCall       (@c true)    (@c false).
 * @param   cr         ,   .
 * @param   action      (. @link CritterActions  @endlink).
 * @param   actionExt       .
 * @param   item         ,     .
 *
 * @remarks         
 *            @a localCall,  @c true,   
 *            ,    .
 *
 ** \~ @see #Critter::Action
 */
void critter_action(bool localCall, CritterCl& cr, int action, int actionExt, ItemCl@ item);

/**
 * @name GUI
 */
//@{

/** \~russian  ,    .
 *
 * @return   . . @link Client screen types ClientScreenTypes@endlink.
 *
 */
int get_active_screen();

/** \~russian      .
 *
 * @param  show            (@c true)   (@c false).
 * @param  screen       .
 * @param  p0, p1, p2   .
 *
 */
void screen_change(bool show, int screen, int p0, int p1, int p2);

/** \~russian     .
 *
 * @param  click  . @link MouseClickStates Mouse click states@endlink.
 *
 * @return  @c true,      ;  @c false,  .
 */
bool mouse_down(int click);

/** \~russian     .
 *
 * @param  click . @link MouseClickStates Mouse click states@endlink.
 *
 * @return  @c true,      ;  @c false,  .
 */
bool mouse_up(int click);

/** \~russian    .
 *
 * @param  x, y    .
 */
void mouse_move(int x, int y);

/** \~russian    .
 *
 * @param  key  . @link DirectInputKeyboardScanCodes DirectInput keyboard scan codes@endlink.
 *
 * @return  @c true,      ;  @c false,  .
 */
bool key_down(uint8 key);

/** \~russian    .
 *
 * @param  key  . @link DirectInputKeyboardScanCodes DirectInput keyboard scan codes@endlink.
 *
 * @return  @c true,      ;  @c false,  .
 */
bool key_up(uint8 key);

/** \~russian    :   .
 *
 *    :
 * -   Alt-Tab,
 * -   ,
 * -  .
 */
void input_lost();

//@}

/**
 * \~russian @name 
 * \~english @name Combat
 */
//@{

/** \~russian  ,   Critter#SendCombatResult. */
void combat_result(uint[]& data);

/** \~russian         .
 *
 * @param  chosen       .
 * @param  target       .
 * @param  weapon         .
 * @param  weaponMode     .
 *      (. @link HitLocations Hit Locations@endlink),
 *       (0  primary, 1  secondary, 2  third).
 *
 */
int to_hit(CritterCl& chosen, CritterCl& target, ProtoItem& weapon, uint8 weaponMode);

/** \~russian       .
 * 
 * @param  animType         ( ,   CritterTypes.cfg);
 * @param  crType         ;
 * @param  anim1, anim2   ;
 * @param  pass            ,  ,          ,     (          );
 * @param  flags         ,     -        (. Anim loading flags  _animation.fos);
 * @param  ox, &oy         ,  .
 *
 * @return     
 *
 */
string@ critter_animation(int animType, uint crType, uint anim1, uint anim2, uint& pass, uint& flags, int& ox, int& oy);

/** \~russian      ( uint& pass  ),         (,        ).
 *
 * animType                               ( ,   CritterTypes.cfg);
 * uint crTypeBase, anim1Base, anim2Base      ,    ;
 * uint& crType, &anim1, &anim2                 .
 *
 * @return  @a true,    (         crType, anim1, anim2), @a false -  ,      .
 *
 */
bool critter_animation_substitute(int animType, uint crTypeBase, uint anim1Base, uint anim2Base, uint& crType, uint& anim1, uint& anim2);

/** \~russian ..       (   ,   ),        , ..  critter_animation      .
 *
 * @return @a true,   , @a false - .
 *
 */
bool critter_animation_fallout(uint crType, uint& anim1, uint& anim2, uint& anim1ex, uint& anim2ex, uint& flags);

//@}

/*@}*/
