G2_SetBG0Control

構文

#include <iris/gx/gx_bgcnt.h>
void G2_SetBG0Control(
    GXBGScrSizeText screenSize,
    GXBGColorMode colorMode,
    GXBGScrBase screenBase,
    GXBGCharBase charBase,
    GXBGExtPltt bgExtPltt
);

引数

screenSize スクリーンサイズ
colorMode カラーモード
screenBase スクリーンベースブロック
charBase キャラクタベースブロック
bgExtPltt BG拡張パレットスロット選択

返り値

なし。

説明

BG0(2Dの場合)の設定を行います。

GX_BG_SCRSIZE_TEXT_256x256 画面サイズを256x256ドット(2Kバイト)にします。
GX_BG_SCRSIZE_TEXT_512x256 画面サイズを512x256ドット(4Kバイト)にします。
GX_BG_SCRSIZE_TEXT_256x512 画面サイズを256x512ドット(4Kバイト)にします。
GX_BG_SCRSIZE_TEXT_512x512 画面サイズを512x512ドット(8Kバイト)にします。

GX_BG_COLORMODE_16 16色モード
GX_BG_COLORMODE_256 256色モード

GX_BG_SCRBASE_0xnnnn BG0のスクリーンベースブロックを指定します。GX_SetBGScrOffsetも参照のこと。

GX_BG_CHARBASE_0xnnnnn BG0のキャラクタベースブロックを指定します。GX_SetBGCharOffsetも参照のこと。

GX_BG_EXTPLTT_01 BG拡張パレットを使用する場合、スロット0を使用
GX_BG_EXTPLTT_23 BG拡張パレットを使用する場合、スロット2を使用


以下に引数の列挙型の型定義を記しておきます。

typedef enum
{
    GX_BG_SCRSIZE_TEXT_256x256 = 0,
    GX_BG_SCRSIZE_TEXT_512x256 = 1,
    GX_BG_SCRSIZE_TEXT_256x512 = 2,
    GX_BG_SCRSIZE_TEXT_512x512 = 3
}
GXBGScrSizeText;

typedef enum
{
    GX_BG_COLORMODE_16 = 0,
    GX_BG_COLORMODE_256 = 1
}
GXBGColorMode;

typedef enum
{
    GX_BG_SCRBASE_0x0000 = 0,
    GX_BG_SCRBASE_0x0800 = 1,
    GX_BG_SCRBASE_0x1000 = 2,
    GX_BG_SCRBASE_0x1800 = 3,
    GX_BG_SCRBASE_0x2000 = 4,
    GX_BG_SCRBASE_0x2800 = 5,
    GX_BG_SCRBASE_0x3000 = 6,
    GX_BG_SCRBASE_0x3800 = 7,
    GX_BG_SCRBASE_0x4000 = 8,
    GX_BG_SCRBASE_0x4800 = 9,
    GX_BG_SCRBASE_0x5000 = 10,
    GX_BG_SCRBASE_0x5800 = 11,
    GX_BG_SCRBASE_0x6000 = 12,
    GX_BG_SCRBASE_0x6800 = 13,
    GX_BG_SCRBASE_0x7000 = 14,
    GX_BG_SCRBASE_0x7800 = 15,
    GX_BG_SCRBASE_0x8000 = 16,
    GX_BG_SCRBASE_0x8800 = 17,
    GX_BG_SCRBASE_0x9000 = 18,
    GX_BG_SCRBASE_0x9800 = 19,
    GX_BG_SCRBASE_0xa000 = 20,
    GX_BG_SCRBASE_0xa800 = 21,
    GX_BG_SCRBASE_0xb000 = 22,
    GX_BG_SCRBASE_0xb800 = 23,
    GX_BG_SCRBASE_0xc000 = 24,
    GX_BG_SCRBASE_0xc800 = 25,
    GX_BG_SCRBASE_0xd000 = 26,
    GX_BG_SCRBASE_0xd800 = 27,
    GX_BG_SCRBASE_0xe000 = 28,
    GX_BG_SCRBASE_0xe800 = 29,
    GX_BG_SCRBASE_0xf000 = 30,
    GX_BG_SCRBASE_0xf800 = 31
}
GXBGScrBase;

typedef enum
{
    GX_BG_CHARBASE_0x00000 = 0,
    GX_BG_CHARBASE_0x04000 = 1,
    GX_BG_CHARBASE_0x08000 = 2,
    GX_BG_CHARBASE_0x0c000 = 3,
    GX_BG_CHARBASE_0x10000 = 4,
    GX_BG_CHARBASE_0x14000 = 5,
    GX_BG_CHARBASE_0x18000 = 6,
    GX_BG_CHARBASE_0x1c000 = 7,
    GX_BG_CHARBASE_0x20000 = 8,
    GX_BG_CHARBASE_0x24000 = 9,
    GX_BG_CHARBASE_0x28000 = 10,
    GX_BG_CHARBASE_0x2c000 = 11,
    GX_BG_CHARBASE_0x30000 = 12,
    GX_BG_CHARBASE_0x34000 = 13,
    GX_BG_CHARBASE_0x38000 = 14,
    GX_BG_CHARBASE_0x3c000 = 15
}
GXBGCharBase;

typedef enum
{
    GX_BG_EXTPLTT_01 = 0,
    GX_BG_EXTPLTT_23 = 1
}
GXBGExtPltt;

参照

履歴

Ver. 2004/01/19