X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Pico%2FDraw.c;h=051b16d495df20ef073bab0fe42df8300f66958e;hb=bf537655559ba25448315f7b7046b0b5390865bf;hp=2eed289f069538cb62008c26f1a99ec8ed351fb0;hpb=cc68a136aa179a5f32fe40208371eb9c2b0aadae;p=picodrive.git diff --git a/Pico/Draw.c b/Pico/Draw.c index 2eed289..051b16d 100644 --- a/Pico/Draw.c +++ b/Pico/Draw.c @@ -34,7 +34,7 @@ static int SpriteBlocks; struct TileStrip { int nametab; // Position in VRAM of name table (for this tile line) - int line; // Line number in pixels 0x000-0x3ff within the virtual tilemap + int line; // Line number in pixels 0x000-0x3ff within the virtual tilemap int hscroll; // Horizontal scroll value in pixels for the line int xmask; // X-Mask (0x1f - 0x7f) for horizontal wraparound in the tilemap int *hc; // cache for high tile codes and their positions @@ -317,12 +317,8 @@ static void DrawStrip(struct TileStrip *ts, int sh) // terminate the cache list *ts->hc = 0; } -#endif // this is messy -#ifndef _ASM_DRAW_C -static -#endif void DrawStripVSRam(struct TileStrip *ts, int plane) { int tilex=0,dx=0,ty=0,code=0,addr=0,cell=0,nametabadd=0; @@ -386,6 +382,7 @@ void DrawStripVSRam(struct TileStrip *ts, int plane) // terminate the cache list *ts->hc = 0; } +#endif #ifndef _ASM_DRAW_C static @@ -921,13 +918,13 @@ static void PrepareSprites(int full) height = (hv&3)+1; if(sy > 240 || sy + (height<<3) <= 0) skip|=1<<22; - + width = (hv>>2)+1; code2 = sprite[1]; sx = (code2>>16)&0x1ff; sx -= 0x78; // Get X coordinate + 8 sx_min = 8-(width<<3); - + if((sx <= sx_min && sx >= -0x76) || sx >= 328) skip|=1<<23; else if (sx > sx_min && !skip) { int sbl = (2<>16)&0x7f; if(!link) break; // End of sprites @@ -1205,7 +1202,7 @@ static int DrawDisplay(int sh) if (win&0x80) { if (Scanline>=edge) hvwind=1; } else { if (Scanline< edge) hvwind=1; } - if(!hvwind) { // we might have a vertical window here + if(!hvwind) { // we might have a vertical window here win=pvid->reg[0x11]; edge=win&0x1f; if(win&0x80) { @@ -1245,7 +1242,7 @@ static int DrawDisplay(int sh) static int Skip=0; -void PicoFrameStart() +PICO_INTERNAL void PicoFrameStart(void) { // prepare to do this frame rendstatus = (PicoOpt&0x80)>>5; // accurate sprites @@ -1259,7 +1256,7 @@ void PicoFrameStart() Skip=0; } -int PicoLine(int scan) +PICO_INTERNAL int PicoLine(int scan) { int sh; if (Skip>0) { Skip--; return 0; } // Skip rendering lines