283
|
1 #ifndef INCLUDED_TASK_DRAW_SPAN
|
|
2 #define INCLUDED_TASK_DRAW_SPAN
|
|
3
|
|
4 #ifndef INCLUDED_SCHED_TASK
|
|
5 # include "SchedTask.h"
|
|
6 #endif
|
|
7
|
|
8 #ifndef INCLUDED_TAPESTRY
|
|
9 # include "Tapestry.h"
|
|
10 #endif
|
|
11
|
|
12 #ifndef INCLUDED_SPAN_PACK
|
|
13 # include "SpanPack.h"
|
|
14 #endif
|
|
15
|
|
16 #ifndef INCLUDED_TEXTURE_HASH
|
|
17 # include "TileHash.h"
|
|
18 #endif
|
|
19
|
|
20 class DrawSpan : public SchedTask {
|
|
21 public:
|
|
22 SchedConstructor(DrawSpan);
|
|
23
|
|
24 int *linebuf;
|
|
25 float *zRow;
|
|
26 TileHashPtr hash;
|
|
27 TileListPtr tileList;
|
|
28 int doneWrite;
|
|
29
|
|
30 ~DrawSpan(void);
|
|
31
|
|
32 int run(void *rbuf, void *wbuf);
|
|
33
|
|
34 int* linebuf_init(int width, int height, int rgb);
|
|
35 float* zRow_init(int width, int height);
|
|
36 void set_rgb(uint32 *addr, int wait_tag);
|
|
37 void set_rgbs(uint32 *addr, uint32 *max_addr, int wait_tag);
|
|
38 uint32 get_rgb(int tx, int ty, uint32 *addr);
|
|
39 TilePtr isAvailableTile(uint32 *addr);
|
|
40 uint32* getTile(int tx, int ty, int tw, uint32 *tex_addr_top);
|
|
41 int getTexBlock(int tx, int ty, int twidth);
|
|
42 void writebuffer(unsigned int display, int width, int height,
|
|
43 int screen_width);
|
|
44 void updateBuffer(float zpos, int rangex, int x, int y,
|
|
45 int tex_x, int tex_y, uint32 *tex_addr);
|
|
46
|
|
47
|
|
48 void reboot(SpanPackPtr spack, int cur_span_x);
|
|
49
|
|
50 int drawDot1(SpanPtr span, int startx, int endx, int wait_tag);
|
|
51 void drawDot2(SpanPtr span, int startx, int endx, int js, int wait_tag);
|
|
52 int drawLine1(SpanPtr span, int startx, int endx, int wait_tag);
|
|
53 void drawLine2(SpanPtr span, int startx, int endx, int js, int wait_tag);
|
|
54 };
|
|
55
|
|
56 typedef struct {
|
|
57 uint32 display;
|
|
58 int screen_width;
|
|
59 int rangex_start;
|
|
60 int rangex_end;
|
|
61 int rangey;
|
|
62 } DrawSpanArg, *DrawSpanArgPtr;
|
|
63
|
|
64 #endif
|