Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Libretro
melonDS
Commits
7799b33d
Commit
7799b33d
authored
Mar 07, 2017
by
StapleButter
Browse files
horizontal scrolling for 3D layer
parent
d95d2283
Changes
1
Hide whitespace changes
Inline
Side-by-side
GPU2D.cpp
View file @
7799b33d
...
...
@@ -871,12 +871,30 @@ void GPU2D::DrawPixel(u32* dst, u16 color, u32 flag)
void
GPU2D
::
DrawBG_3D
(
u32
line
,
u32
*
dst
)
{
// TODO: scroll, etc
// TODO: window, as for everything
// also check if window can prevent blending from happening
u32
*
src
=
GPU3D
::
GetLine
(
line
);
for
(
int
i
=
0
;
i
<
256
;
i
++
)
u16
xoff
=
BGXPos
[
0
];
int
i
=
0
;
int
iend
=
256
;
if
(
xoff
&
0x100
)
{
i
=
(
0x100
-
(
xoff
&
0xFF
));
xoff
+=
i
;
}
if
((
xoff
+
iend
-
1
)
&
0x100
)
{
u32
c
=
src
[
i
];
iend
-=
(
xoff
&
0xFF
);
}
for
(;
i
<
iend
;
i
++
)
{
u32
c
=
src
[
xoff
];
xoff
++
;
if
((
c
>>
24
)
==
0
)
continue
;
dst
[
i
+
256
]
=
dst
[
i
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment