comparison TaskManager/Test/test_render/task/DrawSpan.cpp @ 173:56be4a6e5513

add scale
author gongo@localhost.localdomain
date Thu, 11 Dec 2008 20:17:01 +0900 (2008-12-11)
parents d1f2ce3bdb2f
children 559b48b69b76
comparison
equal deleted inserted replaced
171:dc68bc5c9e41 173:56be4a6e5513
103 Uint8 red, green, blue, alpha; 103 Uint8 red, green, blue, alpha;
104 TilePtr tile; 104 TilePtr tile;
105 105
106 tile = hash->get(addr); 106 tile = hash->get(addr);
107 if (tile == NULL) { 107 if (tile == NULL) {
108 if (tileList->size >= MAX_TILE) { 108 tile = tileList->nextTile();
109 tileList->init(); 109
110 hash->clear(); 110 /**
111 } 111 * FIFO �ʤΤǡ��⤷���Τ��ĤäƤ���к��
112 112 */
113 tile = &tileList->tile[tileList->size]; 113 hash->remove(tile->texture_addr);
114
114 tile->texture_addr = addr; 115 tile->texture_addr = addr;
115 116
116 smanager->dma_load(tile->pixel, (uint32)addr, 117 smanager->dma_load(tile->pixel, (uint32)addr,
117 sizeof(uint32)*TEXTURE_BLOCK_SIZE, TEX_LOAD); 118 sizeof(uint32)*TEXTURE_BLOCK_SIZE, TEX_LOAD);
118 119
125 */ 126 */
126 if (index < 0) { 127 if (index < 0) {
127 printf("[%p] Can't entry\n", tile); 128 printf("[%p] Can't entry\n", tile);
128 return 0xff0000; 129 return 0xff0000;
129 } 130 }
130
131 tileList->size++;
132 131
133 smanager->dma_wait(TEX_LOAD); 132 smanager->dma_wait(TEX_LOAD);
134 } 133 }
135 134
136 return tile->pixel[(TEXTURE_SPLIT_PIXEL)*ty+tx]; 135 return tile->pixel[(TEXTURE_SPLIT_PIXEL)*ty+tx];