annotate TaskManager/Test/test_render/task/DrawSpan.h @ 130:40978d4b608a draft

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