/*
 ******************************************************************************
 *              
 *	郵便局管理ヘッダファイル
 * 	$Id: m_post_office.h,v 1.1 2003/06/06 00:15:12 tong Exp $
 ******************************************************************************
 */
#ifndef	M_POST_OFFICEh
#define M_POST_OFFICEh

#ifdef _LANGUAGE_C_PLUS_PLUS
extern "C" {
#endif	/* _LANGUAGE_C_PLUS_PLUS */

#include "m_post_office_h.h"
#include "m_common_data.h"


/*
 *	郵便物タイプ
 */
enum {
    mPO_REGIST_MAIL_e,
    mPO_REGIST_LEAFLET_e,
    mPO_REGIST_EV_LEAFLET_e,

    mPO_ALL_REGIST_TYPES
};

/*
 *	配達時間
 */
enum {
    mPO_MORNING_DELIVERY_TIME_e = TIME_09,
    mPO_EVENING_DELIVERY_TIME_e = TIME_17
};

/*
 *	有効メール数（家の郵便受け分＋郵便局の預かり分）のカウント
 */
extern int	mPO_count_mail(
    int	arrange_idx
    );

/*
 *	預かってる手紙の数を取得
 */
extern int	mPO_get_keep_mail_sum(void);

/*
 *	郵便物受付
 */
extern int	mPO_receipt_proc(
    Mail_c	*mail,
    int		type
    );

/* 手紙用 */
#define	mPO_receipt_mail(m)		mPO_receipt_proc(m,mPO_REGIST_MAIL_e)
/* 毎日チラシ用 */
#define	mPO_receipt_leaflet(m)		mPO_receipt_proc(m,mPO_REGIST_LEAFLET_e)
/* イベントチラシ用 */
#define	mPO_receipt_ev_leaflet(m)	mPO_receipt_proc(m,mPO_REGIST_EV_LEAFLET_e)

/*
 *	郵便物配達（個別）
 */
extern void	mPO_delivery_one_address(
    int	delivery_idx
    );

/*
 *	郵便局営業処理
 */
extern void	mPO_business_proc(
    GAME_PLAY	*game_play
    );

/*
 *	ゲームを再開してはじめての処理
 */
extern void	mPO_first_work(
    GAME_PLAY	*game_play
    );

/*
 *	郵便局初期化
 */
extern void	mPO_post_office_init(void);


#ifdef _LANGUAGE_C_PLUS_PLUS
} /* extern "C" */
#endif	/* _LANGUAGE_C_PLUS_PLUS */

#endif	/* M_POST_OFFICE_Hh */
/*** m_post_office.h ***/
