Mercurial > hg > Game > Cerium
comparison TaskManager/Test/test_render/task/DrawSpan.cpp @ 126:74d0a70f60e9 draft
fix RGBA mask (bgr -> rgba)
author | gongo@charles.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Tue, 25 Nov 2008 11:37:57 +0900 |
parents | 5be15e10a7f8 |
children | 40978d4b608a |
comparison
equal
deleted
inserted
replaced
125:7c6e30d43c2d | 126:74d0a70f60e9 |
---|---|
72 smanager->dma_wait(TEX_LOAD); | 72 smanager->dma_wait(TEX_LOAD); |
73 | 73 |
74 char *p = get_pixel(tx%8, ty%8, tex); | 74 char *p = get_pixel(tx%8, ty%8, tex); |
75 #endif | 75 #endif |
76 | 76 |
77 blue = (Uint8) p[0]; | 77 alpha = 255; |
78 red = (Uint8) p[0]; | |
78 green = (Uint8) p[1]; | 79 green = (Uint8) p[1]; |
79 red = (Uint8) p[2]; | 80 blue = (Uint8) p[2]; |
80 alpha = 255; | |
81 | 81 |
82 return (red & 0xff) * 0x10000 + (green & 0xff) * 0x100 | 82 return (red & 0xff) * 0x10000 + (green & 0xff) * 0x100 |
83 + (blue & 0xff) + (alpha << 24); | 83 + (blue & 0xff) + (alpha << 24); |
84 } | 84 } |
85 | 85 |
194 } while (sp); | 194 } while (sp); |
195 | 195 |
196 free(free_sp); | 196 free(free_sp); |
197 free(linebuf); | 197 free(linebuf); |
198 free(zRow); | 198 free(zRow); |
199 free(tex); | |
199 | 200 |
200 return 0; | 201 return 0; |
201 } | 202 } |