Mercurial > hg > Game > Cerium
comparison TaskManager/Test/simple_render/spe/SpuDraw.h @ 102:62679f4cae18
tag:first_render_with_spe fix
author | gongo |
---|---|
date | Mon, 03 Mar 2008 17:15:28 +0900 |
parents | 57bac9e07662 |
children | 3e331f7576a1 |
comparison
equal
deleted
inserted
replaced
101:c31499d11926 | 102:62679f4cae18 |
---|---|
18 typedef uint16_t Uint16; | 18 typedef uint16_t Uint16; |
19 typedef int32_t Sint32; | 19 typedef int32_t Sint32; |
20 typedef uint32_t Uint32; | 20 typedef uint32_t Uint32; |
21 typedef unsigned short GLushort; | 21 typedef unsigned short GLushort; |
22 | 22 |
23 #if 0 | |
23 typedef struct{ | 24 typedef struct{ |
24 Uint8 r; | 25 Uint8 r; |
25 Uint8 g; | 26 Uint8 g; |
26 Uint8 b; | 27 Uint8 b; |
27 Uint8 unused; | 28 Uint8 unused; |
40 Uint8 Rshift, Gshift, Bshift, Ashift; | 41 Uint8 Rshift, Gshift, Bshift, Ashift; |
41 Uint8 Rloss, Gloss, Bloss, Aloss; | 42 Uint8 Rloss, Gloss, Bloss, Aloss; |
42 Uint32 colorkey; | 43 Uint32 colorkey; |
43 Uint8 alpha; | 44 Uint8 alpha; |
44 } SDL_PixelFormat; | 45 } SDL_PixelFormat; |
45 | 46 #endif |
46 | 47 |
47 class SpuDraw : public SchedTask { | 48 class SpuDraw : public SchedTask { |
48 public: | 49 public: |
49 SpuDraw(TaskListPtr _tlist, TaskPtr _task, | 50 SpuDraw(TaskListPtr _tlist, TaskPtr _task, |
50 void* _rbuf, void* _wbuf, DmaManager* _con) | 51 void* _rbuf, void* _wbuf, DmaManager* _con) |
51 :SchedTask(_tlist, _task, _rbuf, _wbuf, _con) {} | 52 :SchedTask(_tlist, _task, _rbuf, _wbuf, _con) {} |
52 | 53 |
53 ~SpuDraw(void); | 54 ~SpuDraw(void); |
54 | 55 |
55 //int linebuf[8][IMG_MAX_X]; | |
56 //float zRow[8][IMG_MAX_X]; | |
57 int *linebuf; | 56 int *linebuf; |
58 //int *linebuf; | |
59 float *zRow; | 57 float *zRow; |
58 unsigned int dma_tags; | |
59 | |
60 int run(void *readbuf, void *writebuf); | 60 int run(void *readbuf, void *writebuf); |
61 //void write(void); | |
61 | 62 |
62 private: | 63 private: |
63 void zRow_init(void); | 64 void zRow_init(void); |
64 void linebuf_init(void); | 65 void linebuf_init(void); |
65 void writebuffer(int i, unsigned int fbdev_addr, int y); | 66 void writebuffer(unsigned int fbdev_addr, int y); |
66 | 67 |
67 char* get_pixel(int tx, int ty, void *texture_image); | 68 char* get_pixel(int tx, int ty, void *texture_image); |
68 Uint32 get_rgb(int tx, int ty, void *texture); | 69 Uint32 get_rgb(int tx, int ty, void *texture); |
69 Uint32 SDL_MapRGB(SDL_PixelFormat *fmt, Uint8 r, Uint8 g, Uint8 b); | 70 //Uint32 SDL_MapRGB(SDL_PixelFormat *fmt, Uint8 r, Uint8 g, Uint8 b); |
70 Uint8 SDL_FindColor(SDL_Palette *pal, Uint8 r, Uint8 g, Uint8 b); | 71 //Uint8 SDL_FindColor(SDL_Palette *pal, Uint8 r, Uint8 g, Uint8 b); |
71 }; | 72 }; |
72 | 73 |
73 #endif | 74 #endif |