/*
 * $Id: bg_object2a.h,v 1.1 2003/02/07 18:15:44 wheeler Exp $
 *
 * obj2a型定義
 * ポリゴン専用型
 *
 * $Log: bg_object2a.h,v $
 * Revision 1.1  2003/02/07 18:15:44  wheeler
 * Fox's version of libultra and friends.
 *
 * Revision 1.6  1997/01/29  12:01:42  hayakawa
 * obj2a_setZposの追加
 *
 * Revision 1.5  1996/11/26  10:30:27  hayakawa
 * 細かい修正
 * メンバ変更
 *
 * Revision 1.4  1996/11/21  05:52:01  hayakawa
 * 新レンダーモードに対応
 * メンバ関数（マクロ）の共通化
 *
 * Revision 1.3  1996/10/20  09:00:29  hayakawa
 * _LANGUAGE_C_PLUS_PLUS を __cplusplus に変更
 *
 */

#ifndef __BG_OBJECT2A_H_
#define __BG_OBJECT2A_H_

#include "ultra64.h"
#include "bg_misc.h"
#include "bg_oam.h"
#include "bg_pobjanm.h"		/* BG_Bitmap1a */

/*
 * ＯＢＪ属性の定義
 */
typedef struct BG_Object2a_s {
    u8		oam_type;
    zpos_t 	zPos;		/* 優先度(Z座標) */
    u8		attr;		/* 1bit目:非表示 */
    u8 		name;		/* アニメ番号 */
    BG_Bitmap1a *bitmap;	/* 部品アニメーションビットマップ */
    Mtx 	*matrix;	/* モデリング行列 */
    Gfx		*gfx;		/* 拡張ディスプレイリスト */
    unsigned int rendmode:8;	/* 0:normal,1xlu_surf,2point */
    rgba8888_u_t primcolor;	/* プリミティブカラー */
    rgba8888_u_t envcolor;	/* 環境カラー */
} BG_Object2a;

#define obj2a_disable 			oam_disable
#define obj2a_enable 			oam_enable
#define obj2a_getBitmap     		oam_getBitmap                 
#define obj2a_getGfx			oam_getGfx
#define obj2a_getName 			oam_getName
#define obj2a_getRenderMode 		oam_getRenderMode
#define obj2a_isenable 			oam_isenable
#define obj2a_setBitmap 		oam_setBitmap
#define obj2a_setEnvColor 		oam_setEnvColor
#define obj2a_setEnvColor_rgba8888 	oam_setEnvColor_rgba8888
#define obj2a_setGfx 			oam_setGfx
#define obj2a_setMatrix 		oam_setMatrix
#define obj2a_setName 			oam_setName
#define obj2a_setPrimColor 		oam_setPrimColor
#define obj2a_setPrimColor_rgba8888 	oam_setPrimColor_rgba8888
#define obj2a_setRenderMode		oam_setRenderMode
#define obj2a_setZpos			oam_setZpos

#ifdef __cplusplus
extern "C" {
#endif

/*
 * オブジェを初期化する。
 */
void
obj2a_init(
    BG_Object2a	*const obj1,
    BG_Bitmap1a	*const bm1,	/* ビットマップ */
    Mtx 	*const matrix,	/* モデリング行列 */
    int zPos			/* 優先度 0 - 1023 */
);

/*
 * オブジェを表示する。
 */
void
obj2a_draw(
    BG_Object2a *obj1,
    Gfx **glistpp
);

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif /* __BG_OBJECT2A_H_ */
