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
libretro-handy
Commits
5b8f9815
Unverified
Commit
5b8f9815
authored
Nov 26, 2019
by
tryal-star
Committed by
GitHub
Nov 26, 2019
Browse files
fix palette generation
parent
4b97a356
Changes
1
Hide whitespace changes
Inline
Side-by-side
lynx/mikie.cpp
View file @
5b8f9815
...
...
@@ -868,24 +868,24 @@ void CMikie::DisplaySetAttributes(ULONG Rotate,ULONG Format,ULONG Pitch,UBYTE* (
break
;
case
MIKIE_PIXEL_FORMAT_16BPP_555
:
for
(
Spot
.
Index
=
0
;
Spot
.
Index
<
4096
;
Spot
.
Index
++
)
{
mColourMap
[
Spot
.
Index
]
=
(
Spot
.
Colours
.
Red
<<
11
)
&
0x7
c
00
;
mColourMap
[
Spot
.
Index
]
|=
(
Spot
.
Colours
.
Green
<<
6
)
&
0x03
e0
;
mColourMap
[
Spot
.
Index
]
|=
(
Spot
.
Colours
.
Blue
<<
1
)
&
0x001
f
;
mColourMap
[
Spot
.
Index
]
=
(
(
Spot
.
Colours
.
Red
<<
11
)
&
0x7
800
)
|
(
Spot
.
Colours
.
Red
<<
7
)
&
0x04
00
;
mColourMap
[
Spot
.
Index
]
|=
(
(
Spot
.
Colours
.
Green
<<
6
)
&
0x03
c0
)
|
((
Spot
.
Colours
.
Green
<<
2
)
&
0x0020
)
;
mColourMap
[
Spot
.
Index
]
|=
(
(
Spot
.
Colours
.
Blue
<<
1
)
&
0x001
e
)
|
((
Spot
.
Colours
.
Blue
>>
3
)
&
0x0001
)
;
}
break
;
case
MIKIE_PIXEL_FORMAT_16BPP_565
:
for
(
Spot
.
Index
=
0
;
Spot
.
Index
<
4096
;
Spot
.
Index
++
)
{
mColourMap
[
Spot
.
Index
]
=
(
Spot
.
Colours
.
Red
<<
12
)
&
0xf800
;
mColourMap
[
Spot
.
Index
]
|=
(
Spot
.
Colours
.
Green
<<
7
)
&
0x07
e0
;
mColourMap
[
Spot
.
Index
]
|=
(
Spot
.
Colours
.
Blue
<<
1
)
&
0x001
f
;
mColourMap
[
Spot
.
Index
]
=
(
(
Spot
.
Colours
.
Red
<<
12
)
&
0xf
000
)
|
(
Spot
.
Colours
.
Red
<<
8
)
&
0x0
800
;
mColourMap
[
Spot
.
Index
]
|=
(
(
Spot
.
Colours
.
Green
<<
7
)
&
0x07
80
)
|
((
Spot
.
Colours
.
Green
<<
3
)
&
0x0060
)
;
mColourMap
[
Spot
.
Index
]
|=
(
(
Spot
.
Colours
.
Blue
<<
1
)
&
0x001
e
)
|
((
Spot
.
Colours
.
Blue
>>
3
)
&
0x0001
)
;
}
break
;
case
MIKIE_PIXEL_FORMAT_24BPP
:
case
MIKIE_PIXEL_FORMAT_32BPP
:
for
(
Spot
.
Index
=
0
;
Spot
.
Index
<
4096
;
Spot
.
Index
++
)
{
mColourMap
[
Spot
.
Index
]
=
(
Spot
.
Colours
.
Red
<<
20
)
&
0x00ff0000
;
mColourMap
[
Spot
.
Index
]
|=
(
Spot
.
Colours
.
Green
<<
12
)
&
0x0000ff00
;
mColourMap
[
Spot
.
Index
]
|=
(
Spot
.
Colours
.
Blue
<<
4
)
&
0x000000f
f
;
mColourMap
[
Spot
.
Index
]
=
(
(
Spot
.
Colours
.
Red
<<
20
)
&
0x00f
00000
)
|
((
Spot
.
Colours
.
Red
<<
16
)
&
0x000
f0000
)
;
mColourMap
[
Spot
.
Index
]
|=
(
(
Spot
.
Colours
.
Green
<<
12
)
&
0x0000f
000
)
|
((
Spot
.
Colours
.
Green
<<
8
)
&
0x00000
f00
)
;
mColourMap
[
Spot
.
Index
]
|=
(
(
Spot
.
Colours
.
Blue
<<
4
)
&
0x000000f
0
)
|
((
Spot
.
Colours
.
Blue
<<
0
)
&
0x0000000f
)
;
}
break
;
default:
...
...
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