Japanese

ListReference

function

slScrPosNbg0



ListReference

function

slScrPosNbg1



ListReference

function

slScrPosNbg2



ListReference

function

slScrPosNbg3


Set the placement coordinates of the normal scroll surface

Format

    #include "sgl.h"

    FIXED pos_x, pos_y;

    void slScrPosNbg0( pos_x, pos_y );
    void slScrPosNbg1( pos_x, pos_y );
    void slScrPosNbg2( pos_x, pos_y );
    void slScrPosNbg3( pos_x, pos_y );

argument

    FIXED pos_x - X component of normal scroll placement coordinates (scroll coordinate system)
    FIXED pos_y - Y component of normal scroll placement coordinates (scroll coordinate system)

Return number

    void - returns nothing.

function

Set the placement coordinates of each normal scroll surface.

example

    slScrPosNbg0 ( toFIXED ( 30.0 ), toFIXED ( -19.4 ) );

reference

 slScrMoveNbg0
 slScrMoveNbg1
 slScrMoveNbg2
 slScrMoveNbg3
 slScrScaleNbg0
 slScrScaleNbg1
 VDP2_SCXN0
 VDP2_SCXIN0
 VDP2_SCXDN0
 VDP2_SCYN0
 VDP2_SCYIN0
 VDP2_SCYDN0
 VDP2_SCXN2
 VDP2_SCYN2
 VDP2_SCXN3
 Nbg1_PosX
 Nbg1_PosY
 Nbg2_PosX
 Nbg2_PosY
 Nbg3_PosX
 Nbg3_PosY 



ListReference

function

slScrMoveNbg0



ListReference

function

slScrMoveNbg1



ListReference

function

slScrMoveNbg2



ListReference

function

slScrMoveNbg3


Specify the scroll display position by the amount of movement from the previous position

Format

    #include "sgl.h"

    FIXED pos_x, pos_y;

    void slScrMoveNbg0( pos_x, pos_y );
    void slScrMoveNbg1( pos_x, pos_y );
    void slScrMoveNbg2( pos_x, pos_y );
    void slScrMoveNbg3( pos_x, pos_y );

argument

    FIXED pos_x - The amount the scroll display position moves in X from its previous position.
FIXED pos_y - The amount the scroll display position moves in Y from its previous position.

Return number

    void - returns nothing.

function

Specify the scroll display position by the amount of movement from the previous position.
(This function is slScrPosNbg0 , slScrPosNbg1 , It will be added to the display position specified by slScrPosNbg2 , slScrPosNbg3 ) The current display position is determined by the system variables Nbg0_PosX , Nbg0_PosY , Nbg1_PosX , Nbg1_PosY , Nbg2_PosX , Nbg2_PosY , Nbg3_PosX , Nbg3_PosY Please refer to.

example

    slScrMoveNbg1 ( toFIXED ( 1.0 ), toFIXED ( -2.0 ) );

reference

 slScrPosNbg0
 slScrPosNbg1
 slScrPosNbg2
 slScrPosNbg2
 slScrScaleNbg0
 slScrScaleNbg1
 slZoomNbg0
 slZoomNbg1
 VDP2_SCXN0
 VDP2_SCXIN0
 VDP2_SCXDN0
 VDP2_SCYN0
 VDP2_SCYIN0
 VDP2_SCYDN0
 VDP2_SCXN1
 VDP2_SCXIN1
 VDP2_SCXDN1
 VDP2_SCYN1
 VDP2_SCYIN1
 VDP2_SCYDN1
 VDP2_SCXN2
 VDP2_SCYN2
 VDP2_SCXN3
 Nbg1_PosX
 Nbg1_PosY
 Nbg2_PosX
 Nbg2_PosY
 Nbg3_PosX
 Nbg3_PosY 



ListReference

function

slLookR


Set the placement coordinates of the rotating scroll surface

Format

    #include "sgl.h"

    FIXED pos_x, pos_y;

    void slLookR( pos_x, pos_y );

argument

    FIXED pos_x - X component of rotating scroll placement coordinates (scroll coordinate system)
    FIXED pos_y - Y component of rotating scroll placement coordinates (scroll coordinate system)

Return number

    void - returns nothing.

function

Set the placement coordinates of the rotating scroll surface.

example

    slLookR ( toFIXED ( 50.0 ), toFIXED ( 100.0 ) );

reference

 slDispCenterR
 slZoomR
 slScrScaleR
 slZrotR
 ScrRotPtr 



ListReference

function

slDispCenterR


Setting the rotation center coordinates of the rotating scroll surface

Format

    #include "sgl.h"

    FIXED pos_x, pos_y;

    void slDispCenterR( pos_x , pos_y );

argument

    FIXED pos_x - X component of rotating scroll rotation center coordinates (scroll coordinate system)
    FIXED pos_y - Y component of rotating scroll rotation center coordinates (scroll coordinate system)

Return number

    void - returns nothing.

function

Set the rotation center coordinates of the rotating scroll surface.

example

    slDispCenterR ( toFIXED ( 100.0 ), toFIXED ( 100.0 ) );

reference

 slLookR
 slZoomR
 slScrScaleR
 slZrotR
 ScrRotPtr 



ListReference

function

slZoomNbg0



ListReference

function

slZoomNbg1


Specifying the scaling ratio

Format

    #include "sgl.h"

    FIXED scl_x, scl_y;

    void slZoomNbg0( scl_x, scl_y );
    void slZoomNbg1( scl_x, scl_y );

argument

    FIXED scl_x - Reciprocal of normal scroll scaling ratio in the X-axis direction (1/2 for 2x)
    FIXED scl_y - Reciprocal of normal scroll scaling ratio in Y-axis direction (1/2 for 2x)

Return number

    void - returns nothing.

function

Specify the scaling ratio of "NBG0,1" that can be scaled among the normal scroll surfaces.

example

    Double the X component and halve the Y component of NBG0.
slZoomNbg0 ( toFIXED ( 1/2 ), toFIXED ( 2 ) );

Note

When applying reduction, it is necessary to set the cycle pattern accordingly. At this time, since slScrAutoDisp does not support reduction settings, it is necessary to directly set the cycle pattern using slScrCycleSet and slScrDisp . For setting the cycle pattern, Please refer to VDP2 User's Manual 3.3 How to access VRAM during display period.

reference

 slScrMoveNbg0
 slScrMoveNbg1
 slScrMoveNbg2
 slScrMoveNbg3
 slScrPosNbg0
 slScrPosNbg1
 slScrPosNbg2
 slScrScaleNbg1
 slZoomMode
 slZoomModeNbg0
 slZoomModeNbg1 



ListReference

function

slZoomMode



ListReference

macro

slZoomModeNbg0



ListReference

macro

slZoomModeNbg1


Specifying shrinkage limits

Format

    #include "sgl.h"

    Uint16 type;
    Uint16 mode;

    void slZoomMode( scrn, mode );
    void slZoomModeNbg0( type );
    void slZoomModeNbg1( type );

argument

    Uint16 mode - plane to specify zoom (described later).
Uint16 type - Zoom limit (described later).

Return number

    void - returns nothing.

function

Specify how far to shrink NBG0/NBG1.
In mode, scnNBG0 , scnNBG1 Either of the For type, ZOOM_1 , ZOOM_HALF , ZOOM_QUARTER Specify one of the following.

example

    void slZoomMode ( scnNBG1 , ZOOM_HALF );

Note

When setting reduction, there is a limit to the number of colors.
If ZOOM_HALF is specified, only 16 color mode or 256 color mode is available.
If ZOOM_QUARTER is specified, only 16 color mode is supported.
Please note that reduction settings cannot be made in other modes.

reference

 slScrMoveNbg0
 slScrMoveNbg1
 slScrMoveNbg2
 slScrMoveNbg3
 slScrPosNbg0
 slScrPosNbg1
 slScrPosNbg2
 slScrScaleNbg1
 slZoomNbg0
 slZoomNbg1
 VDP2_ZMCTL 



ListReference

function

slZoomR


Setting the scaling ratio of the rotating scroll surface

Format

    #include "sgl.h"

    FIXED scl_x, scl_y;

    void slZoomR( scl_x, scl_y );

argument

    FIXED scl_x - Reciprocal of the scaling ratio in the X-axis direction of the rotating scroll (1/2 for 2x)
    FIXED scl_y - Reciprocal of the scaling ratio in the Y-axis direction of the rotating scroll (1/2 if it is 2x)

Return number

    void - returns nothing.

function

Sets the scaling ratio of the rotating scroll surface and saves the current state in the current rotation parameter.

example

    slZoomR ( toFIXED ( 0.5 ), toFIXED ( 2.0 ) );

Note

This function manipulates the current rotation parameters kx and ky.

reference

 slLookR
 slDispCenterR
 slScrScaleR
 slZrotR
 ScrRotPtr 



ListReference

function

slScrScaleNbg0



ListReference

function

slScrScaleNbg1


Specifying the scaling ratio

Format

    #include "sgl.h"

    FIXED scl_x, scl_y;

    void slScrScaleNbg0( scl_x, scl_y );
    void slScrScaleNbg1( scl_x, scl_y );

argument

    FIXED scl_x - Normal scroll scaling ratio in the X-axis direction (2 for 2x)
    FIXED scl_y - Normal scroll scaling ratio in the Y-axis direction (2 for 2x)

Return number

    void - returns nothing.

function

Specify the scaling ratio of "NBG0,1" that can be scaled among the normal scroll surfaces.

example

    slScrScaleNbg1 ( toFIXED ( 2 ), toFIXED ( 1/3 ) );

Note

When applying reduction, it is necessary to set the cycle pattern accordingly. At this time, since slScrAutoDisp does not support reduction settings, it is necessary to directly set the cycle pattern using slScrCycleSet and slScrDisp . For setting the cycle pattern, Please refer to VDP2 User's Manual 3.3 How to access VRAM during display period.

reference

 slScrMoveNbg0
 slScrMoveNbg1
 slScrMoveNbg2
 slScrMoveNbg3
 slScrPosNbg0
 slScrPosNbg1
 slScrPosNbg2
 slZoomModeNbg0
 slZoomModeNbg1
 slZoomNbg0
 slZoomNbg1 



ListReference

function

slScrScaleR


Setting the scaling ratio of the rotating scroll surface

Format

    #include "sgl.h"

    FIXED scl_x, scl_y;

    void slScrScaleR( scl_x, scl_y );

argument

    FIXED scl_x - Scale ratio of rotating scroll in the X-axis direction (2 for 2x)
    FIXED scl_y - Scaling ratio of rotating scroll in Y-axis direction (2 for 2x)

Return number

    void - returns nothing.

function

Sets the scaling ratio of the rotating scroll surface and saves the current state in the current rotation parameter.

example

    slScrScaleR ( toFIXED ( 2.0 ), toFIXED ( 1.0 ) );

reference

 slLookR
 slZoomR
 slDispCenterR
 slZrotR
 ScrRotPtr 



ListReference

function

slScrMatConv


Convert current matrix to scrolling matrix

Format

    #include "sgl.h"

    void slScrMatConv(void)

argument

    void - gives nothing.

Return number

    void - returns nothing.

function

Converts the current matrix to a scrolling matrix.
Using this function will rewrite the current matrix.

example

    slUnitMatrix ( CURRENT );
    slRotX ( DEGtoANG ( 10.0 ) );
    slRotZ ( DEGtoANG ( 10.0 ) );
    slTranslate ( ... );
    slScrMatConv ();
    slScrMatSet ();

Note

After that, it will be reflected in the rotating scroll parameters by executing the slScrMatSet function.

reference

 slScrMatSet
 slZrotR
 slInitMatrix
 slPushMatrix
 slPushUnitMatrix
 slIncMatrixPtr
 slPopMatrix
 slDecMatrixPtr
 slUnitMatrix
 slUnitAngle
 slUnitTranslate
 slLoadMatrix
 slCopyMatrix
 slRegistMatrix
 slGetMatrix
 slGetTranslate
 slLoadTranslate
 slInversMatrix
 slTransposeMatrix
 mtptr 



ListReference

function

slScrTransparent


Specify the handling of transparent color for each scroll surface

Format

    #include "sgl.h"

    Uint16 mode;

    void slScrTransparent( mode );

argument

    Uint16 mode - Surface to set transparent color (multiple specifications can be specified with '|')

Return number

    void - returns nothing.

function

Specifies how to handle the transparent color of each scroll surface.
In mode, NBG0ON , NBG1ON , NBG2ON , NBG3ON , RBG0ON is entered.
If you want to set the drawing settings for multiple scroll planes at the same time, specify the mode for each plane by connecting them with "|".
The scroll surface space specified as ON is displayed in the color of palette 0.

example

    Set NBG2 to transparent color.
slScrTransparent ( NBG2ON );

reference

 VDP2_BGON 



ListReference

function

slZrotR


Z-axis rotation of rotating scroll

Format

    #include "sgl.h"

    ANGLE angz;
    void slZrotR( angz );

argument

    ANGLE angz - rotation angle value of the rotating scroll with respect to the Z axis

Return number

    void - returns nothing.

function

Rotates the rotating scroll on the Z axis. The positive direction of rotation is to the right (clockwise) with respect to the axis. The coordinates specified by the function slDispCenterR are This will be the center of rotation.

example

    Rotate the rotating scroll 30 degrees counterclockwise around the Z axis.
slZrotR ( DEGtoANG ( 30.0 ) );

reference

 slLookR
 slZoomR
 slDispCenterR
 slScrScaleR
 ScrRotPtr 



ListReference

function

slScrMatSet


Set rotation parameters of RBG0

Format

    #include "sgl.h"

    void slScrMatSet();

argument

    void - gives nothing.

Return number

    void - returns nothing.

function

Set the rotation parameters of RBG0 using the current matrix.

example

    Set the rotation parameters of RBG0 using the current matrix.
slPushMatrix (); { slRotY ( ... ); slTranslate ( ... ); slScrMatSet (); } slPopMatrix ();

reference

 slScrMatConv
 slZrotR
 slInitMatrix
 slPushMatrix
 slPushUnitMatrix
 slIncMatrixPtr
 slPopMatrix
 slDecMatrixPtr
 slUnitMatrix
 slUnitAngle
 slUnitTranslate
 slLoadMatrix
 slCopyMatrix
 slRegistMatrix
 slGetMatrix
 slGetTranslate
 slLoadTranslate
 slInversMatrix
 slTransposeMatrix
 mtptr
 MsScreenSizeX
 MsScreenSizeY
 Resolution
 VDP2_KTCTL
 VDP2_KTAOF
 ScrRotPtr
 k_table_adr

return
Copyright SEGA ENTERPRISES, LTD., 1997