Stppwii/dev

From WiiBrew
Jump to navigation Jump to search

Net animation issue

from the log:

Line: 158,119 - 173,119 Colour 3
Line: 160,119 - 175,119 Colour 3
Line: 159,118 - 174,118 Colour 3
Line: 159,120 - 174,120 Colour 3
Line: 159,119 - 174,119 Colour 3
Line: 158,119 - 158,104 Colour 3
Line: 160,119 - 160,104 Colour 3
Line: 159,118 - 159,103 Colour 3
Line: 159,120 - 159,105 Colour 3
Line: 159,119 - 159,104 Colour 3
Line: 158,119 - 143,119 Colour 3
Line: 160,119 - 145,119 Colour 3
Line: 159,118 - 144,118 Colour 3
Line: 159,120 - 144,120 Colour 3
Line: 159,119 - 144,119 Colour 3
Line: 159,119 - 174,119 Colour 5
Line: 159,119 - 159,104 Colour 5
Line: 159,119 - 144,119 Colour 5

from sdl.c:

void sdl_draw_line(void *handle, int x1, int y1, int x2, int y2, int colour)
{
 #ifdef DEBUG_FUNCTIONS
  debug_printf("sdl_draw_line()\n");
 #endif
 frontend *fe = (frontend *)handle;
 sdl_actual_draw_line(handle, x1 + fe->ox, y1 + fe->oy, x2 + fe->ox, y2 + fe->oy, colour);
}
void sdl_actual_draw_line(void *handle, int x1, int y1, int x2, int y2, int colour)
{
#ifdef DEBUG_FUNCTIONS
 debug_printf("sdl_actual_draw_line()\n");
#endif
#ifdef DEBUG_DRAWING
 debug_printf("Line: %u,%u - %u,%u Colour %u\n", x1, y1, x2, y2, colour);
#endif
frontend *fe = (frontend *)handle;
// Draw an anti-aliased line.
if( !(x1 < 0) && !(y1 < 0) && !(x1 > (int) screen_width) && !(y1 > (int) screen_height))
 if( !(x2 < 0) && !(y2 < 0) && !(x2 > (int) screen_width) && !(y2 > (int) screen_height))
  aalineRGBA(fe->screen, (Sint16) x1, (Sint16) y1, (Sint16) x2, (Sint16) y2, fe->sdlcolours[colour].r, fe->sdlcolours[colour].g, fe->sdlcolours[colour].b, 255);
}

from SDL/SDL_gfxPrimitives.c:

int aalineRGBA(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
{
 return (aalineColorInt(dst, x1, y1, x2, y2, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a, 1));
}
int aalineColorInt(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color, int draw_endpoint)
{
 Sint32 xx0, yy0, xx1, yy1;
 int result;
 Uint32 intshift, erracc, erradj;
 Uint32 erracctmp, wgt, wgtcompmask;
 int dx, dy, tmp, xdir, y0p1, x0pxdir;
// large function... truncated  
}

will try subbing aalineRGBA for lineRGBA and see what happens...