ListReference

function

slScrPosNbg0



ListReference

function

slScrPosNbg1



ListReference

function

slScrPosNbg2



ListReference

function

slScrPosNbg3


Set the placement coordinates of the normal scroll surface

Form

    #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)

Number of returns

    void --Nothing is returned.

function

    Set the placement coordinates of each normal scroll plane.

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

Form

    #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 of movement of X from the position before the scroll display position.
FIXED pos_y --The amount of movement of Y from the position before the scroll display position.

Number of returns

    void --Nothing is returned.

function

    Specify the scroll display position by the amount of movement from the previous position.
(This function is slScrPosNbg0 , slScrPosNbg1 , Adds to the display position specified by slScrPosNbg2 and slScrPosNbg3) The current display position is 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

Form

    #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)

Number of returns

    void --Nothing is returned.

function

    Set the placement coordinates of the rotating scroll plane.

Example

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

reference

 slDispCenterR
 slZoomR
 slScrScaleR
 slZrotR
 ScrRotPtr 



ListReference

function

slDispCenterR


Setting the rotation center coordinates of the rotation scroll surface

Form

    #include "sgl.h"

    FIXED pos_x, pos_y;

    void slDispCenterR (pos_x, pos_y);

argument

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

Number of returns

    void --Nothing is returned.

function

    Rotation Set the rotation center coordinates of the scroll plane.

Example

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

reference

 slLookR
 slZoomR
 slScrScaleR
 slZrotR
 ScrRotPtr 



ListReference

function

slZoomNbg0



ListReference

function

slZoomNbg1


Designation of scaling ratio

Form

    #include "sgl.h"

    FIXED scl_x, scl_y;

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

argument

    FIXED scl_x --The reciprocal of the scaling factor of normal scroll in the X-axis direction (1/2 if doubled)
    FIXED scl_y --The reciprocal of the scaling factor of normal scroll in the Y-axis direction (1/2 if doubled)

Number of returns

    void --Nothing is returned.

function

    Specifies the scaling ratio of "NBG0,1" that can be scaled on the normal scroll surface.

Example

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

caution


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

reference

 slScrMoveNbg0
 slScrMoveNbg1
 slScrMoveNbg2
 slScrMoveNbg3
 slScrPosNbg0
 slScrPosNbg1
 slScrPosNbg2
 slScrScaleNbg1
 slZoomMode
 slZoomModeNbg0
 slZoomModeNbg1 



ListReference

function

slZoomMode



ListReference

macro

slZoomModeNbg0



ListReference

macro

slZoomModeNbg1


Specifying the reduction limit

Form

    #include "sgl.h"

    Uint16 type;
    Uint16 mode;

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

argument

    Uint16 mode-The face that specifies the zoom (see below).
Uint16 type --Zoom limit (see below).

Number of returns

    void --Nothing is returned.

function

    Specifies how much NBG0 / NBG1 should be reduced.
In mode, scnNBG0 , scnNBG1 One of type is ZOOM_1 , ZOOM_HALF , ZOOM_QUARTER Specify one of.

Example

    void slZoomMode ( scnNBG1 , ZOOM_HALF );

caution


    There is a limit on the number of colors when setting the reduction.
When ZOOM_HALF is specified, only 16-color mode or 256-color mode is specified.
When ZOOM_QUARTER is specified, only 16-color mode is supported.
Please note that you cannot set the reduction 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

Form

    #include "sgl.h"

    FIXED scl_x, scl_y;

    void slZoomR (scl_x, scl_y);

argument

    FIXED scl_x --The reciprocal of the scaling factor of the rotary scroll in the X-axis direction (1/2 if doubled)
    FIXED scl_y --The reciprocal of the scaling factor of the rotary scroll in the Y-axis direction (1/2 if doubled)

Number of returns

    void --Nothing is returned.

function

    Sets the scaling factor of the rotating scroll plane and saves the current state in the current rotation parameters.

Example

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

caution


    This function manipulates the current rotation parameters kx and ky.

reference

 slLookR
 slDispCenterR
 slScrScaleR
 slZrotR
 ScrRotPtr 



ListReference

function

slScrScaleNbg0



ListReference

function

slScrScaleNbg1


Designation of scaling ratio

Form

    #include "sgl.h"

    FIXED scl_x, scl_y;

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

argument

    FIXED scl_x --Scale ratio of normal scroll in the X-axis direction (2 if doubled)
    FIXED scl_y --Scale ratio of normal scroll in the Y-axis direction (2 if doubled)

Number of returns

    void --Nothing is returned.

function

    Specifies the scaling ratio of "NBG0,1" that can be scaled on the normal scroll surface.

Example

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

caution


    When applying reduction, it is necessary to set the cycle pattern accordingly. At this time, slScrAutoDisp does not support the reduction setting, so it is necessary to set the cycle pattern directly using slScrCycleSet and slScrDisp. For setting the cycle pattern,
      VDP2 User's Manual 3.3 Please see the VRAM access method during the 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

Form

    #include "sgl.h"

    FIXED scl_x, scl_y;

    void slScrScaleR (scl_x, scl_y);

argument

    FIXED scl_x --Rotating scroll scaling factor in the X-axis direction (2 if doubled)
    FIXED scl_y --Rotating scroll scaling factor in the Y-axis direction (2 if doubled)

Number of returns

    void --Nothing is returned.

function

    Sets the scaling factor of the rotating scroll plane and saves the current state in the current rotation parameters.

Example

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

reference

 slLookR
 slZoomR
 slDispCenterR
 slZrotR
 ScrRotPtr 



ListReference

function

slScrMatConv


Convert current matrix to scrollable matrix

Form

    #include "sgl.h"

    void slScrMatConv (void)

argument

    void --Do not give anything.

Number of returns

    void --Nothing is returned.

function

    Converts the current matrix to a scrollable matrix.
The current matrix can be rewritten by using this function.

Example

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

caution


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

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 how to handle the transparent color of each scroll surface

Form

    #include "sgl.h"

    Uint16 mode;

    void slScrTransparent (mode);

argument

    Uint16 mode --Transparent color setting surface (multiple can be specified with'|')

Number of returns

    void --Nothing is returned.

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 of each plane by connecting them with "|".
The space on the scroll surface specified as ON is displayed in the color of palette 0.

Example

    Set NBG2 to transparent color setting.
slScrTransparent ( NBG2ON );

reference

 VDP2_BGON 



ListReference

function

slZrotR


Z-axis rotation of rotary scroll

Form

    #include "sgl.h"

    ANGLE angz;
    void slZrotR (angz);

argument

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

Number of returns

    void --Nothing is returned.

function

    Rotates the Z-axis of the scroll. The positive direction of rotation is to the right (clockwise) with respect to the axis. The coordinates specified by the function slDispCenterR are
    It becomes the center of rotation.

Example

    Rotate the scroll around the Z axis by 30 degrees, counterclockwise.
slZrotR ( debugtoANG (30.0));

reference

 slLookR
 slZoomR
 slDispCenterR
 slScrScaleR
 ScrRotPtr 



ListReference

function

slScrMatSet


Set the rotation parameter of RBG0

Form

    #include "sgl.h"

    void slScrMatSet ();

argument

    void --Do not give anything.

Number of returns

    void --Nothing is returned.

function

    Set the rotation parameter 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