#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);
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)
void --Nothing is returned.
Set the placement coordinates of each normal scroll plane.
slScrPosNbg0 ( toFIXED (30.0), toFIXED (-19.4));
#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);
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.
void --Nothing is returned.
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.
slScrMoveNbg1 ( toFIXED (1.0), toFIXED (-2.0));
#include "sgl.h"
FIXED pos_x, pos_y;
void slLookR (pos_x, pos_y);
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)
void --Nothing is returned.
Set the placement coordinates of the rotating scroll plane.
slLookR ( toFIXED (50.0), toFIXED (100.0));
slDispCenterR | slZoomR | slScrScaleR | slZrotR |
ScrRotPtr |
#include "sgl.h"
FIXED pos_x, pos_y;
void slDispCenterR (pos_x, pos_y);
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)
void --Nothing is returned.
Rotation Set the rotation center coordinates of the scroll plane.
slDispCenterR ( toFIXED (100.0), toFIXED (100.0));
slLookR | slZoomR | slScrScaleR | slZrotR |
ScrRotPtr |
#include "sgl.h"
FIXED scl_x, scl_y;
void slZoomNbg0 (scl_x, scl_y);
void slZoomNbg1 (scl_x, scl_y);
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)
void --Nothing is returned.
Specifies the scaling ratio of "NBG0,1" that can be scaled on the normal scroll surface.
Double the X component of NBG0 and halve the Y component.
slZoomNbg0 ( toFIXED (1/2), toFIXED (2));
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.
slScrMoveNbg0 | slScrMoveNbg1 | slScrMoveNbg2 | slScrMoveNbg3 |
slScrPosNbg0 | slScrPosNbg1 | slScrPosNbg2 | slScrScaleNbg1 |
slZoomMode | slZoomModeNbg0 | slZoomModeNbg1 |
#include "sgl.h"
Uint16 type;
Uint16 mode;
void slZoomMode (scrn, mode);
void slZoomModeNbg0 (type);
void slZoomModeNbg1 (type);
Uint16 mode-The face that specifies the zoom (see below).
Uint16 type --Zoom limit (see below).
void --Nothing is returned.
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.
void slZoomMode ( scnNBG1 , ZOOM_HALF );
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.
slScrMoveNbg0 | slScrMoveNbg1 | slScrMoveNbg2 | slScrMoveNbg3 |
slScrPosNbg0 | slScrPosNbg1 | slScrPosNbg2 | slScrScaleNbg1 |
slZoomNbg0 | slZoomNbg1 | VDP2_ZMCTL |
#include "sgl.h"
FIXED scl_x, scl_y;
void slZoomR (scl_x, scl_y);
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)
void --Nothing is returned.
Sets the scaling factor of the rotating scroll plane and saves the current state in the current rotation parameters.
slZoomR ( toFIXED (0.5), toFIXED (2.0));
This function manipulates the current rotation parameters kx and ky.
slLookR | slDispCenterR | slScrScaleR | slZrotR |
ScrRotPtr |
#include "sgl.h"
FIXED scl_x, scl_y;
void slScrScaleNbg0 (scl_x, scl_y);
void slScrScaleNbg1 (scl_x, scl_y);
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)
void --Nothing is returned.
Specifies the scaling ratio of "NBG0,1" that can be scaled on the normal scroll surface.
slScrScaleNbg1 ( toFIXED (2), toFIXED (1/3));
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.
slScrMoveNbg0 | slScrMoveNbg1 | slScrMoveNbg2 | slScrMoveNbg3 |
slScrPosNbg0 | slScrPosNbg1 | slScrPosNbg2 | slZoomModeNbg0 |
slZoomModeNbg1 | slZoomNbg0 | slZoomNbg1 |
#include "sgl.h"
FIXED scl_x, scl_y;
void slScrScaleR (scl_x, scl_y);
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)
void --Nothing is returned.
Sets the scaling factor of the rotating scroll plane and saves the current state in the current rotation parameters.
slScrScaleR ( toFIXED (2.0), toFIXED (1.0));
slLookR | slZoomR | slDispCenterR | slZrotR |
ScrRotPtr |
#include "sgl.h"
void slScrMatConv (void)
void --Do not give anything.
void --Nothing is returned.
Converts the current matrix to a scrollable matrix.
The current matrix can be rewritten by using this function.
slUnitMatrix ( CURRENT );
slRotX ( debugtoANG (10.0));
slRotZ ( debugtoANG (10.0));
slTranslate (...);
slScrMatConv ();
slScrMatSet ();
After that, by executing the slScrMatSet function, it will be reflected in the parameters of the rotation scroll.
#include "sgl.h"
Uint16 mode;
void slScrTransparent (mode);
Uint16 mode --Transparent color setting surface (multiple can be specified with'|')
void --Nothing is returned.
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.
Set NBG2 to transparent color setting.
slScrTransparent ( NBG2ON );
VDP2_BGON |
#include "sgl.h"
ANGLE angz;
void slZrotR (angz);
ANGLE angz --Rotation angle value of rotation scroll with respect to Z axis
void --Nothing is returned.
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.
Rotate the scroll around the Z axis by 30 degrees, counterclockwise.
slZrotR ( debugtoANG (30.0));
slLookR | slZoomR | slDispCenterR | slScrScaleR |
ScrRotPtr |
#include "sgl.h"
void slScrMatSet ();
void --Do not give anything.
void --Nothing is returned.
Set the rotation parameter of RBG0 using the current matrix.
Set the rotation parameters of RBG0 using the current matrix.
slPushMatrix ();
{
slRotY (...);
slTranslate (...);
slScrMatSet ();
}
slPopMatrix ();