{ \
delta_y *= -1; \
\
- if(delta_y >= 512) \
- return; \
- \
if(delta_x > delta_y) \
{ \
draw_line_span_horizontal(decrement, shading, blending, dithering, \
} \
else \
{ \
- if(delta_y >= 512) \
- return; \
- \
if(delta_x > delta_y) \
{ \
draw_line_span_horizontal(increment, shading, blending, dithering, \
void render_line(psx_gpu_struct *psx_gpu, vertex_struct *vertexes, u32 flags,
- u32 color)
+ u32 color, int double_resolution)
{
s32 color_r, color_g, color_b;
u32 triangle_winding = 0;
delta_x = x_b - x_a;
delta_y = y_b - y_a;
- if(delta_x >= 1024)
+ if(delta_x >= 1024 || delta_y >= 512 || delta_y <= -512)
return;
+ if(double_resolution)
+ {
+ x_a *= 2;
+ x_b *= 2;
+ y_a *= 2;
+ y_b *= 2;
+ delta_x *= 2;
+ delta_y *= 2;
+ }
+
flags &= ~RENDER_FLAGS_TEXTURE_MAP;
vram_ptr = psx_gpu->vram_out_ptr + (y_a * 1024) + x_a;
vertexes[1].x = list_s16[4] + psx_gpu->offset_x;
vertexes[1].y = list_s16[5] + psx_gpu->offset_y;
- render_line(psx_gpu, vertexes, current_command, list[0]);
+ render_line(psx_gpu, vertexes, current_command, list[0], 0);
break;
}
vertexes[1].x = (xy & 0xFFFF) + psx_gpu->offset_x;
vertexes[1].y = (xy >> 16) + psx_gpu->offset_y;
- render_line(psx_gpu, vertexes, current_command, list[0]);
+ render_line(psx_gpu, vertexes, current_command, list[0], 0);
list_position++;
num_vertexes++;
vertexes[1].x = list_s16[6] + psx_gpu->offset_x;
vertexes[1].y = list_s16[7] + psx_gpu->offset_y;
- render_line(psx_gpu, vertexes, current_command, 0);
+ render_line(psx_gpu, vertexes, current_command, 0, 0);
break;
}
vertexes[1].x = (xy & 0xFFFF) + psx_gpu->offset_x;
vertexes[1].y = (xy >> 16) + psx_gpu->offset_y;
- render_line(psx_gpu, vertexes, current_command, 0);
+ render_line(psx_gpu, vertexes, current_command, 0, 0);
list_position += 2;
num_vertexes++;
vertexes[1].x = list_s16[4] + psx_gpu->offset_x;
vertexes[1].y = list_s16[5] + psx_gpu->offset_y;
- render_line(psx_gpu, vertexes, current_command, list[0]);
+ render_line(psx_gpu, vertexes, current_command, list[0], 0);
+ enhancement_enable();
+ render_line(psx_gpu, vertexes, current_command, list[0], 1);
break;
}
vertexes[1].x = (xy & 0xFFFF) + psx_gpu->offset_x;
vertexes[1].y = (xy >> 16) + psx_gpu->offset_y;
- render_line(psx_gpu, vertexes, current_command, list[0]);
+ enhancement_disable();
+ render_line(psx_gpu, vertexes, current_command, list[0], 0);
+ enhancement_enable();
+ render_line(psx_gpu, vertexes, current_command, list[0], 1);
list_position++;
num_vertexes++;
vertexes[1].x = list_s16[6] + psx_gpu->offset_x;
vertexes[1].y = list_s16[7] + psx_gpu->offset_y;
- render_line(psx_gpu, vertexes, current_command, 0);
+ render_line(psx_gpu, vertexes, current_command, 0, 0);
+ enhancement_enable();
+ render_line(psx_gpu, vertexes, current_command, 0, 1);
break;
}
vertexes[1].x = (xy & 0xFFFF) + psx_gpu->offset_x;
vertexes[1].y = (xy >> 16) + psx_gpu->offset_y;
- render_line(psx_gpu, vertexes, current_command, 0);
+ enhancement_disable();
+ render_line(psx_gpu, vertexes, current_command, 0, 0);
+ enhancement_enable();
+ render_line(psx_gpu, vertexes, current_command, 0, 1);
list_position += 2;
num_vertexes++;