[go: nahoru, domu]

Skip to content

Commit

Permalink
Merge pull request #224 from DPS2004/hlinetarget
Browse files Browse the repository at this point in the history
Make _private_h_line respect drawing target
  • Loading branch information
jtothebell committed Dec 2, 2023
2 parents 8594cfd + 4144a75 commit d52e9ba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/graphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,7 @@ void Graphics::line (int x1, int y1, int x2, int y2){
void Graphics::_private_h_line(int x1, int x2, int y){
auto &drawState = _memory->drawState;
auto &hwState = _memory->hwState;
uint8_t * screenBuffer = GetP8FrameBuffer();

if (!(y >= drawState.clip_yb && y < drawState.clip_ye)) {
return;
Expand Down Expand Up @@ -723,7 +724,7 @@ void Graphics::_private_h_line(int x1, int x2, int y){

if (canmemset) {
//zepto 8 adapted otimized line draw with memset
uint8_t *p = _memory->screenBuffer + (y*64);
uint8_t *p = screenBuffer + (y*64);
uint8_t color = getDrawPalMappedColor(drawState.color);

if (minx & 1)
Expand Down

0 comments on commit d52e9ba

Please sign in to comment.