#define ROT 0

// 16-bit rendering functions.
#define BPP 16

#define ISOPAQUE 0
#define XFLIP 0
#define YFLIP 0
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#define XFLIP 1
#define YFLIP 0
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#define XFLIP 0
#define YFLIP 1
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#define XFLIP 1
#define YFLIP 1
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#undef ISOPAQUE

#define ISOPAQUE 1
#define XFLIP 0
#define YFLIP 0
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#define XFLIP 1
#define YFLIP 0
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#define XFLIP 0
#define YFLIP 1
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#define XFLIP 1
#define YFLIP 1
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#undef ISOPAQUE

#undef BPP

// 24-bit rendering functions.
#define BPP 24

#define ISOPAQUE 0
#define XFLIP 0
#define YFLIP 0
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#define XFLIP 1
#define YFLIP 0
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#define XFLIP 0
#define YFLIP 1
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#define XFLIP 1
#define YFLIP 1
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#undef ISOPAQUE

#define ISOPAQUE 1
#define XFLIP 0
#define YFLIP 0
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#define XFLIP 1
#define YFLIP 0
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#define XFLIP 0
#define YFLIP 1
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#define XFLIP 1
#define YFLIP 1
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#undef ISOPAQUE

#undef BPP

// 32-bit rendering functions.
#define BPP 32

#define ISOPAQUE 0
#define XFLIP 0
#define YFLIP 0
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#define XFLIP 1
#define YFLIP 0
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#define XFLIP 0
#define YFLIP 1
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#define XFLIP 1
#define YFLIP 1
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#undef ISOPAQUE

#define ISOPAQUE 1
#define XFLIP 0
#define YFLIP 0
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#define XFLIP 1
#define YFLIP 0
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#define XFLIP 0
#define YFLIP 1
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#define XFLIP 1
#define YFLIP 1
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#undef ISOPAQUE

#undef BPP

#undef ROT

#define ROT 270

// 16-bit rendering functions.
#define BPP 16

#define ISOPAQUE 0
#define XFLIP 0
#define YFLIP 0
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#define XFLIP 1
#define YFLIP 0
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#define XFLIP 0
#define YFLIP 1
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#define XFLIP 1
#define YFLIP 1
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#undef ISOPAQUE

#define ISOPAQUE 1
#define XFLIP 0
#define YFLIP 0
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#define XFLIP 1
#define YFLIP 0
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#define XFLIP 0
#define YFLIP 1
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#define XFLIP 1
#define YFLIP 1
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#undef ISOPAQUE

#undef BPP

// 24-bit rendering functions.
#define BPP 24

#define ISOPAQUE 0
#define XFLIP 0
#define YFLIP 0
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#define XFLIP 1
#define YFLIP 0
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#define XFLIP 0
#define YFLIP 1
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#define XFLIP 1
#define YFLIP 1
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#undef ISOPAQUE

#define ISOPAQUE 1
#define XFLIP 0
#define YFLIP 0
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#define XFLIP 1
#define YFLIP 0
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#define XFLIP 0
#define YFLIP 1
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#define XFLIP 1
#define YFLIP 1
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#undef ISOPAQUE

#undef BPP

// 32-bit rendering functions.
#define BPP 32

#define ISOPAQUE 0
#define XFLIP 0
#define YFLIP 0
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#define XFLIP 1
#define YFLIP 0
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#define XFLIP 0
#define YFLIP 1
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#define XFLIP 1
#define YFLIP 1
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#undef ISOPAQUE

#define ISOPAQUE 1
#define XFLIP 0
#define YFLIP 0
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#define XFLIP 1
#define YFLIP 0
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#define XFLIP 0
#define YFLIP 1
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#define XFLIP 1
#define YFLIP 1
#define DOCLIP 0
#include "toa_gp9001_render.h"
#undef DOCLIP
#define DOCLIP 1
#include "toa_gp9001_render.h"
#undef DOCLIP
#undef YFLIP
#undef XFLIP

#undef ISOPAQUE

#undef BPP

#undef ROT

// Table with all function addresses.
static RenderTileFunction RenderTileFunctionTable[] = {
	&RenderTile16_ROT0_NOFLIP_NOCLIP_TRANS, &RenderTile16_ROT0_FLIPX_NOCLIP_TRANS, &RenderTile16_ROT0_FLIPY_NOCLIP_TRANS, &RenderTile16_ROT0_FLIPXY_NOCLIP_TRANS, 
	&RenderTile16_ROT0_NOFLIP_CLIP_TRANS, &RenderTile16_ROT0_FLIPX_CLIP_TRANS, &RenderTile16_ROT0_FLIPY_CLIP_TRANS, &RenderTile16_ROT0_FLIPXY_CLIP_TRANS, 
	&RenderTile16_ROT0_NOFLIP_NOCLIP_OPAQUE, &RenderTile16_ROT0_FLIPX_NOCLIP_OPAQUE, &RenderTile16_ROT0_FLIPY_NOCLIP_OPAQUE, &RenderTile16_ROT0_FLIPXY_NOCLIP_OPAQUE, 
	&RenderTile16_ROT0_NOFLIP_CLIP_OPAQUE, &RenderTile16_ROT0_FLIPX_CLIP_OPAQUE, &RenderTile16_ROT0_FLIPY_CLIP_OPAQUE, &RenderTile16_ROT0_FLIPXY_CLIP_OPAQUE, 
	&RenderTile24_ROT0_NOFLIP_NOCLIP_TRANS, &RenderTile24_ROT0_FLIPX_NOCLIP_TRANS, &RenderTile24_ROT0_FLIPY_NOCLIP_TRANS, &RenderTile24_ROT0_FLIPXY_NOCLIP_TRANS, 
	&RenderTile24_ROT0_NOFLIP_CLIP_TRANS, &RenderTile24_ROT0_FLIPX_CLIP_TRANS, &RenderTile24_ROT0_FLIPY_CLIP_TRANS, &RenderTile24_ROT0_FLIPXY_CLIP_TRANS, 
	&RenderTile24_ROT0_NOFLIP_NOCLIP_OPAQUE, &RenderTile24_ROT0_FLIPX_NOCLIP_OPAQUE, &RenderTile24_ROT0_FLIPY_NOCLIP_OPAQUE, &RenderTile24_ROT0_FLIPXY_NOCLIP_OPAQUE, 
	&RenderTile24_ROT0_NOFLIP_CLIP_OPAQUE, &RenderTile24_ROT0_FLIPX_CLIP_OPAQUE, &RenderTile24_ROT0_FLIPY_CLIP_OPAQUE, &RenderTile24_ROT0_FLIPXY_CLIP_OPAQUE, 
	&RenderTile32_ROT0_NOFLIP_NOCLIP_TRANS, &RenderTile32_ROT0_FLIPX_NOCLIP_TRANS, &RenderTile32_ROT0_FLIPY_NOCLIP_TRANS, &RenderTile32_ROT0_FLIPXY_NOCLIP_TRANS, 
	&RenderTile32_ROT0_NOFLIP_CLIP_TRANS, &RenderTile32_ROT0_FLIPX_CLIP_TRANS, &RenderTile32_ROT0_FLIPY_CLIP_TRANS, &RenderTile32_ROT0_FLIPXY_CLIP_TRANS, 
	&RenderTile32_ROT0_NOFLIP_NOCLIP_OPAQUE, &RenderTile32_ROT0_FLIPX_NOCLIP_OPAQUE, &RenderTile32_ROT0_FLIPY_NOCLIP_OPAQUE, &RenderTile32_ROT0_FLIPXY_NOCLIP_OPAQUE, 
	&RenderTile32_ROT0_NOFLIP_CLIP_OPAQUE, &RenderTile32_ROT0_FLIPX_CLIP_OPAQUE, &RenderTile32_ROT0_FLIPY_CLIP_OPAQUE, &RenderTile32_ROT0_FLIPXY_CLIP_OPAQUE, 
	&RenderTile16_ROT270_NOFLIP_NOCLIP_TRANS, &RenderTile16_ROT270_FLIPX_NOCLIP_TRANS, &RenderTile16_ROT270_FLIPY_NOCLIP_TRANS, &RenderTile16_ROT270_FLIPXY_NOCLIP_TRANS, 
	&RenderTile16_ROT270_NOFLIP_CLIP_TRANS, &RenderTile16_ROT270_FLIPX_CLIP_TRANS, &RenderTile16_ROT270_FLIPY_CLIP_TRANS, &RenderTile16_ROT270_FLIPXY_CLIP_TRANS, 
	&RenderTile16_ROT270_NOFLIP_NOCLIP_OPAQUE, &RenderTile16_ROT270_FLIPX_NOCLIP_OPAQUE, &RenderTile16_ROT270_FLIPY_NOCLIP_OPAQUE, &RenderTile16_ROT270_FLIPXY_NOCLIP_OPAQUE, 
	&RenderTile16_ROT270_NOFLIP_CLIP_OPAQUE, &RenderTile16_ROT270_FLIPX_CLIP_OPAQUE, &RenderTile16_ROT270_FLIPY_CLIP_OPAQUE, &RenderTile16_ROT270_FLIPXY_CLIP_OPAQUE, 
	&RenderTile24_ROT270_NOFLIP_NOCLIP_TRANS, &RenderTile24_ROT270_FLIPX_NOCLIP_TRANS, &RenderTile24_ROT270_FLIPY_NOCLIP_TRANS, &RenderTile24_ROT270_FLIPXY_NOCLIP_TRANS, 
	&RenderTile24_ROT270_NOFLIP_CLIP_TRANS, &RenderTile24_ROT270_FLIPX_CLIP_TRANS, &RenderTile24_ROT270_FLIPY_CLIP_TRANS, &RenderTile24_ROT270_FLIPXY_CLIP_TRANS, 
	&RenderTile24_ROT270_NOFLIP_NOCLIP_OPAQUE, &RenderTile24_ROT270_FLIPX_NOCLIP_OPAQUE, &RenderTile24_ROT270_FLIPY_NOCLIP_OPAQUE, &RenderTile24_ROT270_FLIPXY_NOCLIP_OPAQUE, 
	&RenderTile24_ROT270_NOFLIP_CLIP_OPAQUE, &RenderTile24_ROT270_FLIPX_CLIP_OPAQUE, &RenderTile24_ROT270_FLIPY_CLIP_OPAQUE, &RenderTile24_ROT270_FLIPXY_CLIP_OPAQUE, 
	&RenderTile32_ROT270_NOFLIP_NOCLIP_TRANS, &RenderTile32_ROT270_FLIPX_NOCLIP_TRANS, &RenderTile32_ROT270_FLIPY_NOCLIP_TRANS, &RenderTile32_ROT270_FLIPXY_NOCLIP_TRANS, 
	&RenderTile32_ROT270_NOFLIP_CLIP_TRANS, &RenderTile32_ROT270_FLIPX_CLIP_TRANS, &RenderTile32_ROT270_FLIPY_CLIP_TRANS, &RenderTile32_ROT270_FLIPXY_CLIP_TRANS, 
	&RenderTile32_ROT270_NOFLIP_NOCLIP_OPAQUE, &RenderTile32_ROT270_FLIPX_NOCLIP_OPAQUE, &RenderTile32_ROT270_FLIPY_NOCLIP_OPAQUE, &RenderTile32_ROT270_FLIPXY_NOCLIP_OPAQUE, 
	&RenderTile32_ROT270_NOFLIP_CLIP_OPAQUE, &RenderTile32_ROT270_FLIPX_CLIP_OPAQUE, &RenderTile32_ROT270_FLIPY_CLIP_OPAQUE, &RenderTile32_ROT270_FLIPXY_CLIP_OPAQUE, 
};

static RenderTileFunction* RenderTile_ROT0[3] = {
	&RenderTileFunctionTable[0],
	&RenderTileFunctionTable[16],
	&RenderTileFunctionTable[32]
};
static RenderTileFunction* RenderTile_ROT270[3] = {
	&RenderTileFunctionTable[48],
	&RenderTileFunctionTable[64],
	&RenderTileFunctionTable[80]
};
