PAlib
Functions
Mode 7 commands

Functions

void PA_InitMode7 (u8 bg_select)
 Initialize Mode 7 for a given background. You MUST be in video mode 1 or 2.
 
static void PA_DeInitMode7 ()
 DeInitialize Mode 7.
 
static void PA_Mode7Angle (s16 angle)
 Define the current angle.
 
static void PA_Mode7MoveLeftRight (s16 x_deplac)
 Move lateraly, so left or right...
 
static void PA_Mode7MoveForwardBack (s16 z_deplac)
 Move forward or backwards.
 
static void PA_Mode7X (s16 mode7x)
 Move to a given point on the map.
 
static void PA_Mode7Z (s16 mode7z)
 Move to a given point on the map.
 
static void PA_Mode7SetPointXZ (s16 mode7x, s16 mode7z)
 Move to a given point on the map (of coordinates x, z)
 
static void PA_Mode7Height (s16 mode7y)
 Set the camera height.
 

Detailed Description

Different commands for Mode 7 :p A big thanks to TONC for these...

Function Documentation

◆ PA_InitMode7()

void PA_InitMode7 ( u8  bg_select)

Initialize Mode 7 for a given background. You MUST be in video mode 1 or 2.

Parameters
bg_selectBg number, 2 in mode 1, 2 or 3 in mode 2
Examples
Backgrounds/Effects/Mode7/source/main.c.

◆ PA_Mode7Angle()

static inline void PA_Mode7Angle ( s16  angle)
inlinestatic

Define the current angle.

Parameters
angleThe angle ranges from 0 to 511...
Examples
Backgrounds/Effects/Mode7/source/main.c.

◆ PA_Mode7MoveLeftRight()

static inline void PA_Mode7MoveLeftRight ( s16  x_deplac)
inlinestatic

Move lateraly, so left or right...

Parameters
x_deplacNumber of pixels to move left or right
Examples
Backgrounds/Effects/Mode7/source/main.c.

◆ PA_Mode7MoveForwardBack()

static inline void PA_Mode7MoveForwardBack ( s16  z_deplac)
inlinestatic

Move forward or backwards.

Parameters
z_deplacNumber of pixels to move forward or backwards
Examples
Backgrounds/Effects/Mode7/source/main.c.

◆ PA_Mode7X()

static inline void PA_Mode7X ( s16  mode7x)
inlinestatic

Move to a given point on the map.

Parameters
mode7xX position on the map

◆ PA_Mode7Z()

static inline void PA_Mode7Z ( s16  mode7z)
inlinestatic

Move to a given point on the map.

Parameters
mode7zZ position on the map

◆ PA_Mode7SetPointXZ()

static inline void PA_Mode7SetPointXZ ( s16  mode7x,
s16  mode7z 
)
inlinestatic

Move to a given point on the map (of coordinates x, z)

Parameters
mode7xX position on the map
mode7zZ position on the map

◆ PA_Mode7Height()

static inline void PA_Mode7Height ( s16  mode7y)
inlinestatic

Set the camera height.

Parameters
mode7yCamera Height. By default, 8192. You can set this from 0 to 40 000 (or even more, but then it gets a little small...
Examples
Backgrounds/Effects/Mode7/source/main.c.