/*
 * $Id: bg_turbo.h,v 1.1 2003/02/07 18:15:44 wheeler Exp $
 *
 * $Log: bg_turbo.h,v $
 * Revision 1.1  2003/02/07 18:15:44  wheeler
 * Fox's version of libultra and friends.
 *
 * Revision 1.6  1996/11/21  06:16:50  hayakawa
 * 構造体とメンバ関数を移動
 *
 * Revision 1.5  1996/10/20  09:07:23  hayakawa
 * _LANGUAGE_C_PLUS_PLUS を __cplusplus に変更
 *
 */

#ifndef __BG_TURBO_H_
#define __BG_TURBO_H_

#include "ultra64.h"
#include "gt.h"
#include "bg_types.h"

/*
 * T-GFX登録用(BG_Funcxに統合予定)
 * 8bytes
 */
typedef struct tgfxlist_s {
    gtGfx *tglistp;
    unsigned int hidden:1;
    unsigned int wait_rcp:1;	/* RCPの処理が完了するのを待つ */
    zpos_t zPos;		/* 優先度(Z座標) */
} BG_tgfxlist;

#ifdef __cplusplus
extern "C" {
#endif

void
bg_turbo2(
    Gfx **glistpp,		/* ディスプレイリストへのポインタのポインタ */
    int	*ip,
    BG_Zsort **zs1p
);

#define bgtgfx_isenable(p1) 	((p1)->hidden == 0)
#define bgtgfx_enable(p1) 	((p1)->hidden = 0)
#define bgtgfx_disable(p1) 	((p1)->hidden = 1)
#define bgtgfx_setWaitRCP(p1, n1) 	((p1)->wait_rcp = (n1))
#define bgtgfx_getWaitRCP(p1) 	((p1)->wait_rcp)
#define bgtgfx_setZpos(p1, z1) ((p1)->zPos = (z1))
#define bgtgfx_setPtr(p1, p2)  ((p1)->tglistp = (p2))

void
bgtgfx_init(
    BG_tgfxlist *this1,
    gtGfx *tglistp,
    int zPos
);

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif
