Mercurial > hg > Members > kono > Cerium
diff TaskManager/Test/test_render/spe/DrawSpan.cpp @ 168:cf2aa37d2fe7
Delete DrawSpan::get_pixel().
author | gongo@localhost.localdomain |
---|---|
date | Thu, 11 Dec 2008 10:38:28 +0900 |
parents | c8b868871dce |
children | d1f2ce3bdb2f |
line wrap: on
line diff
--- a/TaskManager/Test/test_render/spe/DrawSpan.cpp Tue Dec 09 15:07:31 2008 +0900 +++ b/TaskManager/Test/test_render/spe/DrawSpan.cpp Thu Dec 11 10:38:28 2008 +0900 @@ -97,22 +97,12 @@ return zRow; } - -char* -DrawSpan::get_pixel(int tx, int ty, uint32 *texture_image) -{ - return (char*)(texture_image+((TEXTURE_SPLIT_PIXEL)*ty+tx)); -} - Uint32 DrawSpan::get_rgb(int tx, int ty, uint32 *addr) { Uint8 red, green, blue, alpha; TilePtr tile; - /** - * get,put はオブジェクト(Hashとか?)を作ってアクセスするかな - */ tile = hash->get(addr); if (tile == NULL) { if (tileList->size >= MAX_TILE) { @@ -143,15 +133,7 @@ smanager->dma_wait(TEX_LOAD); } - char *p = get_pixel(tx, ty, tile->pixel); - - alpha = 255; - red = (Uint8) p[0]; - green = (Uint8) p[1]; - blue = (Uint8) p[2]; - - return (red & 0xff) * 0x10000 + (green & 0xff) * 0x100 - + (blue & 0xff) + (alpha << 24); + return tile->pixel[(TEXTURE_SPLIT_PIXEL)*ty+tx]; } @@ -277,7 +259,7 @@ tex_localy = tex_ypos % TEXTURE_SPLIT_PIXEL; rgb = get_rgb(tex_localx, tex_localy, tex_addr); - + zRow[localx + (rangex*localy)] = tex_z; linebuf[localy][localx] = rgb; }