40
6.1.7
BG Rotation and Scaling Features
Rotation and scaling of the BG as a whole can be performed in a rotation/scaling BG screen.
With rotation, BG data is referenced as shown in the following figure.
Figure 32 - Referencing Rotated Background Data
Origin
(
, 0
) 0
Rotation center
coordinate
(
,
x
y
0
y-axis
AGB-06-0001-002-B13
Released: May 27, 2005
Game Boy Advance Programming Manual
Coordinate
before rotation
(
,
)
x
y
1
1
Coordinate after
rotation
(
,
)
x
y
2
2
q
)
0
dx
q
dy
d
y
µ
q
d
x
µ
BG display screen
Horizontal line before
rotation
*
B G
d a
t a
r e
f e r
e n
c e
a r
e a
H o
(distance moved in direction x, same line) = (1 / a )
dx
dy
(distance moved in direction y, same line) = - (1 / b )
(distance moved in direction x, next line) = ( 1 / a )
d
x
µ
(distance moved in direction y, next line) = ( 1 / b )
d
y
µ
a: Magnification along x-axis
b: Magnification along y-axis
May 25, 2005
x-axis
r i z
o n
t a l
r o t
l i n
a t i
e a
o n
f t e
r
cos q
sin q
sin q
cos q
© 1999-2005 NINTENDO