rayzor

view src/m3drast.c @ 8:fcd06a15dfdd

added missing set_mouse_limits to dosemu.c
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 07 Apr 2014 08:46:06 +0300
parents 9035507275d6
children 70e332156d02
line source
1 #include "m3dimpl.h"
4 void draw_point(struct min3d_vertex *v)
5 {
6 int x = v->pos[0] + 0.5;
7 int y = v->pos[1] + 0.5;
8 int xsz = m3dctx->cbuf->xsz;
9 unsigned char *ptr = m3dctx->cbuf->pixels + (y * xsz + x) * 3;
11 int r = (int)(v->color[0] * 255.0);
12 int g = (int)(v->color[1] * 255.0);
13 int b = (int)(v->color[2] * 255.0);
14 ptr[0] = r > 255 ? 255 : r;
15 ptr[1] = g > 255 ? 255 : g;
16 ptr[2] = b > 255 ? 255 : b;
17 }
19 void draw_line(struct min3d_vertex *v)
20 {
21 }
23 void draw_poly(struct min3d_vertex *v, int numv)
24 {
25 }