##### Ninja Library - 描画関数

# njDrawScroll

2Dスクロール面の描画

### 書式

> `void njDrawScroll( *scl )
> NJS_SCROLL *scl
> `

### 引数

> *scl | スクロール構造体へのポインタ

### 戻り値

> なし

### 解説

> 2Dスクロール面を描画します。

### 用例

>     Uint32 map[4][5];
>     NJS_SCROLL scl;
>     NJS_TEXLIST texlist;

>     /* Cell definition */
>     /* The scroll function does not require calling
>        njSetTexture() or njSetTextureNum() */
>     /* Set the scroll structure */
>     scl.celps = 128;        /* Cell size 8 - 1024 */
>     scl.mapw = 5;           /* Number of map cells horizontally */
>     scl.maph = 4;           /* Number of map cells vertically */
>     scl.sx = 1.0f;          /* Scale horizontally */
>     scl.sy = 1.0f;          /* Scale vertically */
>     scl.spx = 320.f;        /* Scale center x coordinate */
>     scl.spy = 240.f;        /* Scale center y coordinate */
>     scl.list = &texlist;    /* Texture list */
>     scl.map = (Uint32*)map;     /* Map array */
>     scl.mflag = ON;         /* Matrix flag */
>     scl.sflag = ON;         /* Scale flag */
>     scl.pr = -100.f;        /* Priority -1.f (front) to -65535.f (rear) */
>     scl.px = 0.f;           /* Movement x coordinate */
>     scl.py = 0.f;           /* Movement y coordinate */
>     scl.bx = 0.f;           /* Start of map write x coordinate */
>     scl.by = 0.f;           /* Start of map write y coordinate */
>     scl.cx = 320.f;         /* Rotation center x coordinate */
>     scl.cy = 240.f;         /* Rotation center y coordinate */
>     scl.sclc.argb.a = 255;      /* Globally applied A */
>     scl.sclc.argb.r = 255;      /* Globally applied R */
>     scl.sclc.argb.g = 255;      /* Globally applied G */
>     scl.sclc.argb.b = 255;      /* Globally applied B */
>     scl.colmode = NJD_COLOR_MODE_PACKED_TEXTURE;
>     	/* Set color mode
>     	 NJD_COLOR_MODE_PACKED_TEXTURE
>     	 NJD_COLOR_MODE_PACKED_TEXTURE_TRANS */
>     njDrawScroll( &scl );

njDrawScroll

COPYRIGHT © SEGA ENTERPRISES, LTD., 1998-2000