283
|
1 #ifndef INCLUDED_TASK_DRAW_SPAN
|
|
2 #define INCLUDED_TASK_DRAW_SPAN
|
|
3
|
539
|
4 #include "SchedTask.h"
|
|
5 #include "Tapestry.h"
|
|
6 #include "SpanPack.h"
|
283
|
7
|
539
|
8 typedef struct g {
|
283
|
9 int *linebuf;
|
|
10 float *zRow;
|
|
11 TileListPtr tileList;
|
|
12 int doneWrite;
|
539
|
13 } G, *Gptr ;
|
283
|
14
|
|
15
|
539
|
16 static int run(SchedTask *smanager, void *rbuf, void *wbuf);
|
283
|
17
|
539
|
18 static int* linebuf_init(SchedTask *s, int width, int height, int rgb);
|
|
19 static float* zRow_init(SchedTask *s, int width, int height);
|
|
20 static uint32 get_rgb(int tx, int ty, TilePtr tile);
|
|
21 static memaddr getTile(int tx, int ty, int tw, memaddr tex_addr_top);
|
|
22 static int getTexBlock(int tx, int ty, int twidth);
|
|
23 static void writebuffer(SchedTask *s, Gptr g, unsigned int display, int width, int height,
|
|
24 int screen_width);
|
|
25 static void updateBuffer(Gptr g, float zpos, int rangex, int x, int y,
|
|
26 int tex_x, int tex_y, TilePtr tile);
|
|
27
|
|
28 #if 0
|
|
29 static void reboot(SpanPackPtr spack, int cur_span_x);
|
|
30 #endif
|
|
31
|
|
32 static int drawDot1(SchedTask *s, Gptr g, SpanPtr span, int startx, int endx, int wait_tag);
|
|
33 //static void drawDot2(SpanPtr span, int startx, int endx, int js, int wait_tag);
|
|
34 static int drawLine1(SchedTask *s, Gptr g, SpanPtr span, int startx, int endx, int wait_tag);
|
|
35 //static void drawLine2(SpanPtr span, int startx, int endx, int js, int wait_tag);
|
283
|
36
|
|
37 typedef struct {
|
|
38 uint32 display;
|
|
39 int screen_width;
|
|
40 int rangex_start;
|
|
41 int rangex_end;
|
|
42 int rangey;
|
|
43 } DrawSpanArg, *DrawSpanArgPtr;
|
|
44
|
|
45 #endif
|