/*----------------------------------------------------------------------------
 *
 * z_effect_soft_sprite.h
 *
 * Program:Kenji Matsutani
 *
 * $Log: z_effect_soft_sprite.h,v $
 * Revision 2.1  1998-10-22 21:13:45+09  zelda
 * ＲＯＭ出しバージョン(NTSC)
 *
 * Revision 1.10  1998/09/12 14:20:27  matutani
 * *** empty log message ***
 *
 * Revision 1.9  1998-09-09 17:41:42+09  matutani
 * *** empty log message ***
 *
 * Revision 1.8  1998-08-11 17:30:36+09  matutani
 * 掃除
 *
 * Revision 1.7  1998-08-05 19:52:10+09  matutani
 * オーバーレイ化
 *
 * Revision 1.6  1998-05-28 17:27:58+09  matutani
 * EffectSoftSprite_normalDitherSet_xlu()消しました。
 *
 * Revision 1.5  1998-03-18 19:46:37+09  sumiyosi
 * 修正依頼おわりました。
 *
 * Revision 1.4  1997/11/04  05:34:26  matutani
 * Effect_SS_Uty_short_interpolation()追加
 *
 * Revision 1.3  1997/09/10  01:34:16  matutani
 * EffectSoftSprite_clear():追加 初期値設定
 *
 * Revision 1.2  1997/07/24  06:07:43  matutani
 * *** empty log message ***
 *
 * Revision 1.1  1997/03/27  02:13:08  matutani
 * Initial revision
 *
 *
 *---------------------------------------------------------------------------*/

#ifndef INCLUDE_Z_EFFECT_SOFT_SPRITE_H
#define INCLUDE_Z_EFFECT_SOFT_SPRITE_H

#ifdef _LANGUAGE_C_PLUS_PLUS
extern "C" {
#endif    

#include"z_basic.h"
#include"z_effect_soft_sprite_type.h"

/*============================================================================
 *
 * オーバーレイ対応
 *
 *===========================================================================*/

/*---------------------------------------------------------------------------
 *
 * ソフトスプライトエフェクト
 * エレメントクリア
 *
 *--------------------------------------------------------------------------*/
extern void EffectSoftSprite2_ElementClear(
    Effect_SS2_Element *pe_ss);

/*==========================================================================
 *
 * 他のエフェクとが入っているか,
 * １回でもクリアずみの領域をクリアする。
 *
 * メモ：サウンド停止処理
 *
 *=========================================================================*/
extern void EffectSoftSprite2_ElementDestructClear( 
    Effect_SS2_Element *pe_ss);

/*--------------------------------------------------------------------------
 *
 * 効果追加処理
 *
 * 追加対象インデックスが０からMAXまで増えていき,MAXを越えると,０に戻る。
 * statusのEFF_SS_STATUS_OVER_WRITE_LOCK(新規エフェクト上書き禁止）が
 * 立っていると,上書きできないため。総てのエフェクトが,そうであれば追加を
 * やめる。
 *
 * priority は小さい方が優先。大きいと上書きされる。
 *
 * オーバーレイ関係の処理を行わない。基本的に旧バージョンとの互換を取るため
 * のものなので,使用には注意してください。
 *
 *-------------------------------------------------------------------------*/
extern void EffectSoftSprite2_add(
    Game *game,
    Effect_SS2_Element *pe_ss);

/*-----------------------------------------------------------------------------
 *
 * エフェクト追加 NewVersion
 *
 * 引数:
 * Game *game:ゲーム構造体
 * TYPE_EFFECT_SS2_LABEL type:エフェクトラベル
 *
 *--------------------------------------------------------------------------*/
extern void EffectSoftSprite2_makeEffect(
    Game *game,
    TYPE_EFFECT_SS2_LABEL type,
    int priority,
    void *data);

/*============================================================================
 *
 * オーバーレイ非対応
 *
 *==========================================================================*/

/*-----------------------------------------------------------------------------
 *
 * ソフトスプライトエフェクト コンストラクト
 *
 *---------------------------------------------------------------------------*/
extern void EffectSoftSprite_ct(Game *game, int size);

/*-------------------------------------------------------------------------
 *
 * デストラクター
 *
 *------------------------------------------------------------------------*/
extern void EffectSoftSprite_dt(Game *game);
#if 0
/*----------------------------------------------------------------------------
 *
 * ソフトスプライトエフェクト:構造体クリア
 * 基本的にゼロクリア、デフォルトセット
 *
 *--------------------------------------------------------------------------*/
extern void EffectSoftSprite_clear(Effect_SS_Element *pe_ss);
#endif
/*--------------------------------------------------------------------------
 *
 * 動作処理
 *
 *-------------------------------------------------------------------------*/
extern void EffectSoftSprite_proc(Game *game);


/*----------------------------------------------------------------------------
 *
 *  ソフトスプライトエフェクト表示
 *
 *---------------------------------------------------------------------------*/
extern void EffectSoftSprite_disp(Game *game);

/*----------------------------------------------------------------------------
 *
 * 補間処理
 *
 *--------------------------------------------------------------------------*/
extern short Effect_SS_Uty_short_interpolation(short from, short to, int frame);

/*-----------------------------------------------------------------------------
 *
 * 補間処理（t = 0から1.0)
 *
 *---------------------------------------------------------------------------*/
extern short Effect_SS_Uty_short_interpolation_t01(
    short from, short to, float t);

/*-----------------------------------------------------------------------------
 *
 * 補間処理（t = 0から1.0)
 * unsigned char バージョン
 *
 *---------------------------------------------------------------------------*/
extern unsigned char Effect_SS_Uty_uc_interpolation_t01(
    unsigned char from, unsigned char to, float t);

#if 0
/*-----------------------------------------------------------------------------
 *
 * 補間処理 (t = 0.0f, 1.0f)
 * float バージョン
 *
 *---------------------------------------------------------------------------*/
extern float Effect_SS_Uty_float_interpolation_t01(
    float from, float to, float t);
#endif

#ifdef _LANGUAGE_C_PLUS_PLUS
}	/* extern "C"	*/
#endif

#endif

/*** z_effect_soft_sprite.h ***/
