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 {
|
283
|
9 int *linebuf;
|
|
10 float *zRow;
|
|
11 TileListPtr tileList;
|
|
12 int doneWrite;
|
539
|
13 } G, *Gptr;
|
283
|
14
|
539
|
15 static int* linebuf_init(SchedTask *smanager, int width, int height, int rgb);
|
|
16 static float* zRow_init(SchedTask *smanager, int width, int height);
|
|
17 // static TilePtr set_rgb(memaddr addr, int wait_tag);
|
|
18 // static void set_rgbs(memaddr addr, uint32 *max_addr, int wait_tag);
|
|
19 static uint32 get_rgb(int tx, int ty, TilePtr tile);
|
|
20 // static TilePtr isAvailableTile(memaddr addr);
|
|
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 *smanager, Gptr g, unsigned int display,
|
|
24 int width, int height, int screen_width);
|
|
25 static void updateBuffer(Gptr g, float zpos, int rangex, int x, int y,
|
|
26 int tex_x, int tex_y, float normal_x, float nomral_x, float normal_z, TilePtr tile);
|
283
|
27
|
|
28
|
539
|
29 // static void reboot(SpanPackPtr spack, int cur_span_x);
|
283
|
30
|
539
|
31 static int drawDot1(SchedTask *smanager, Gptr g, SpanPtr span, int startx, int endx, int wait_tag);
|
|
32 //static void drawDot2(SchedTask *smanager, SpanPtr span, int startx, int endx, int js, int wait_tag);
|
|
33 static int drawLine1(SchedTask *smanager, Gptr g, SpanPtr span, int startx, int endx, int wait_tag);
|
|
34 // static void drawLine2(SchedTask *smanager, SpanPtr span, int startx, int endx, int js, int wait_tag);
|
|
35 static int infinity_light_calc(int color,float normal_x, float normal_y, float normal_z);
|
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
|