annotate TaskManager/Test/test_render/task/DrawSpan.h @ 166:e297ecaf2b4d

fix
author gongo@localhost.localdomain
date Tue, 09 Dec 2008 11:53:51 +0900
parents cd5ad7adc5e1
children c8b868871dce
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
1 #ifndef INCLUDED_TASK_DRAW_SPAN
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
2 #define INCLUDED_TASK_DRAW_SPAN
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
3
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
4 #ifndef INCLUDED_SCHED_TASK
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
5 # include "SchedTask.h"
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
6 #endif
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
7
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
8 typedef int8_t Sint8;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
9 typedef uint8_t Uint8;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
10 typedef int16_t Sint16;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
11 typedef uint16_t Uint16;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
12 typedef int32_t Sint32;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
13 typedef uint32_t Uint32;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
14 typedef unsigned short GLushort;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
15
130
8a33f4859ed8 テクスチャの大きさを128x128以外にも使えるように。(若干バグ有り)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
16 typedef struct {
8a33f4859ed8 テクスチャの大きさを128x128以外にも使えるように。(若干バグ有り)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
17 uint32 pixel[64]; // 8*8
8a33f4859ed8 テクスチャの大きさを128x128以外にも使えるように。(若干バグ有り)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
18 void *texture_addr;
8a33f4859ed8 テクスチャの大きさを128x128以外にも使えるように。(若干バグ有り)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
19 int pad[3];
8a33f4859ed8 テクスチャの大きさを128x128以外にも使えるように。(若干バグ有り)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
20 } Tile, *TilePtr;
8a33f4859ed8 テクスチャの大きさを128x128以外にも使えるように。(若干バグ有り)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
21
8a33f4859ed8 テクスチャの大きさを128x128以外にも使えるように。(若干バグ有り)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
22 #define MAX_TILE 100
8a33f4859ed8 テクスチャの大きさを128x128以外にも使えるように。(若干バグ有り)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
23
8a33f4859ed8 テクスチャの大きさを128x128以外にも使えるように。(若干バグ有り)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
24 typedef struct {
8a33f4859ed8 テクスチャの大きさを128x128以外にも使えるように。(若干バグ有り)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
25 int size;
8a33f4859ed8 テクスチャの大きさを128x128以外にも使えるように。(若干バグ有り)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
26 int pad[3];
8a33f4859ed8 テクスチャの大きさを128x128以外にも使えるように。(若干バグ有り)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
27 Tile tile[MAX_TILE];
8a33f4859ed8 テクスチャの大きさを128x128以外にも使えるように。(若干バグ有り)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
28
8a33f4859ed8 テクスチャの大きさを128x128以外にも使えるように。(若干バグ有り)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
29 void init(void) {
8a33f4859ed8 テクスチャの大きさを128x128以外にも使えるように。(若干バグ有り)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
30 size = 0;
8a33f4859ed8 テクスチャの大きさを128x128以外にも使えるように。(若干バグ有り)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
31 }
8a33f4859ed8 テクスチャの大きさを128x128以外にも使えるように。(若干バグ有り)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
32 } TileList, *TileListPtr;
8a33f4859ed8 テクスチャの大きさを128x128以外にも使えるように。(若干バグ有り)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
33
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
34 class DrawSpan : public SchedTask {
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
35 public:
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
36 SchedConstructor(DrawSpan);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
37
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
38 int run(void *rbuf, void *wbuf);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
39
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
40 float* zRow_init(int w, int h);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
41 void linebuf_init(int *buf, int width, int rgb);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
42
166
gongo@localhost.localdomain
parents: 156
diff changeset
43 char* get_pixel(int tx, int ty, uint32 *texture_image);
gongo@localhost.localdomain
parents: 156
diff changeset
44 Uint32 get_rgb(int tx, int ty, uint32 *addr);
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
45 };
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
46
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
47 #endif