mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-20 22:16:49 +01:00
PSP renderer: use colors from 'draw' union (very likely, but un-tested)
This commit is contained in:
parent
ebd9efb361
commit
9cdd0dd996
@ -741,10 +741,10 @@ PSP_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *verti
|
|||||||
case SDL_RENDERCMD_DRAW_POINTS: {
|
case SDL_RENDERCMD_DRAW_POINTS: {
|
||||||
const size_t count = cmd->data.draw.count;
|
const size_t count = cmd->data.draw.count;
|
||||||
const VertV *verts = (VertV *) (gpumem + cmd->data.draw.first);
|
const VertV *verts = (VertV *) (gpumem + cmd->data.draw.first);
|
||||||
const Uint8 r = cmd->data.color.r;
|
const Uint8 r = cmd->data.draw.r;
|
||||||
const Uint8 g = cmd->data.color.g;
|
const Uint8 g = cmd->data.draw.g;
|
||||||
const Uint8 b = cmd->data.color.b;
|
const Uint8 b = cmd->data.draw.b;
|
||||||
const Uint8 a = cmd->data.color.a;
|
const Uint8 a = cmd->data.draw.a;
|
||||||
const Uint32 color = ((a << 24) | (b << 16) | (g << 8) | r);
|
const Uint32 color = ((a << 24) | (b << 16) | (g << 8) | r);
|
||||||
/* !!! FIXME: we could cache draw state like color, texturing, etc */
|
/* !!! FIXME: we could cache draw state like color, texturing, etc */
|
||||||
sceGuColor(color);
|
sceGuColor(color);
|
||||||
@ -759,10 +759,10 @@ PSP_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *verti
|
|||||||
case SDL_RENDERCMD_DRAW_LINES: {
|
case SDL_RENDERCMD_DRAW_LINES: {
|
||||||
const size_t count = cmd->data.draw.count;
|
const size_t count = cmd->data.draw.count;
|
||||||
const VertV *verts = (VertV *) (gpumem + cmd->data.draw.first);
|
const VertV *verts = (VertV *) (gpumem + cmd->data.draw.first);
|
||||||
const Uint8 r = cmd->data.color.r;
|
const Uint8 r = cmd->data.draw.r;
|
||||||
const Uint8 g = cmd->data.color.g;
|
const Uint8 g = cmd->data.draw.g;
|
||||||
const Uint8 b = cmd->data.color.b;
|
const Uint8 b = cmd->data.draw.b;
|
||||||
const Uint8 a = cmd->data.color.a;
|
const Uint8 a = cmd->data.draw.a;
|
||||||
const Uint32 color = ((a << 24) | (b << 16) | (g << 8) | r);
|
const Uint32 color = ((a << 24) | (b << 16) | (g << 8) | r);
|
||||||
/* !!! FIXME: we could cache draw state like color, texturing, etc */
|
/* !!! FIXME: we could cache draw state like color, texturing, etc */
|
||||||
sceGuColor(color);
|
sceGuColor(color);
|
||||||
@ -777,10 +777,10 @@ PSP_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *verti
|
|||||||
case SDL_RENDERCMD_FILL_RECTS: {
|
case SDL_RENDERCMD_FILL_RECTS: {
|
||||||
const size_t count = cmd->data.draw.count;
|
const size_t count = cmd->data.draw.count;
|
||||||
const VertV *verts = (VertV *) (gpumem + cmd->data.draw.first);
|
const VertV *verts = (VertV *) (gpumem + cmd->data.draw.first);
|
||||||
const Uint8 r = cmd->data.color.r;
|
const Uint8 r = cmd->data.draw.r;
|
||||||
const Uint8 g = cmd->data.color.g;
|
const Uint8 g = cmd->data.draw.g;
|
||||||
const Uint8 b = cmd->data.color.b;
|
const Uint8 b = cmd->data.draw.b;
|
||||||
const Uint8 a = cmd->data.color.a;
|
const Uint8 a = cmd->data.draw.a;
|
||||||
const Uint32 color = ((a << 24) | (b << 16) | (g << 8) | r);
|
const Uint32 color = ((a << 24) | (b << 16) | (g << 8) | r);
|
||||||
/* !!! FIXME: we could cache draw state like color, texturing, etc */
|
/* !!! FIXME: we could cache draw state like color, texturing, etc */
|
||||||
sceGuColor(color);
|
sceGuColor(color);
|
||||||
|
Loading…
Reference in New Issue
Block a user