annotate Renderer/Engine/task/DrawSpan.h @ 603:57ec231bc8ac draft

long -> memaddr (64 or 32)
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 07 Nov 2009 14:13:29 +0900
parents 3bc98f6d31ff
children 350b9b8c985f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
1 #ifndef INCLUDED_TASK_DRAW_SPAN
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
2 #define INCLUDED_TASK_DRAW_SPAN
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
3
539
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
4 #include "SchedTask.h"
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
5 #include "Tapestry.h"
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
6 #include "SpanPack.h"
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
7
539
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
8 typedef struct {
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
9 int *linebuf;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
10 float *zRow;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
11 TileListPtr tileList;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
12 int doneWrite;
539
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
13 } G, *Gptr;
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
14
539
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
15 static int* linebuf_init(SchedTask *smanager, int width, int height, int rgb);
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
16 static float* zRow_init(SchedTask *smanager, int width, int height);
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
17 // static TilePtr set_rgb(memaddr addr, int wait_tag);
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
18 // static void set_rgbs(memaddr addr, uint32 *max_addr, int wait_tag);
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
19 static uint32 get_rgb(int tx, int ty, TilePtr tile);
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
20 // static TilePtr isAvailableTile(memaddr addr);
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
21 static memaddr getTile(int tx, int ty, int tw, memaddr tex_addr_top);
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
22 static int getTexBlock(int tx, int ty, int twidth);
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
23 static void writebuffer(SchedTask *smanager, Gptr g, unsigned int display,
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
24 int width, int height, int screen_width);
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
25 static void updateBuffer(Gptr g, float zpos, int rangex, int x, int y,
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
26 int tex_x, int tex_y, float normal_x, float nomral_x, float normal_z, TilePtr tile);
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
27
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
28
539
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
29 // static void reboot(SpanPackPtr spack, int cur_span_x);
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
30
539
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
31 static int drawDot1(SchedTask *smanager, Gptr g, SpanPtr span, int startx, int endx, int wait_tag);
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
32 //static void drawDot2(SchedTask *smanager, SpanPtr span, int startx, int endx, int js, int wait_tag);
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
33 static int drawLine1(SchedTask *smanager, Gptr g, SpanPtr span, int startx, int endx, int wait_tag);
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
34 // static void drawLine2(SchedTask *smanager, SpanPtr span, int startx, int endx, int js, int wait_tag);
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
35 static int infinity_light_calc(int color,float normal_x, float normal_y, float normal_z);
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
36
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
37 typedef struct {
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
38 uint32 display;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
39 int screen_width;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
40 int rangex_start;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
41 int rangex_end;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
42 int rangey;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
43 } DrawSpanArg, *DrawSpanArgPtr;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
44
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
45 #endif