Mercurial > hg > Game > Cerium
view old/simple_pack/task/spu_span.cpp @ 656:66810c71442b draft
branch merge
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 27 Nov 2009 18:27:32 +0900 |
parents | 3bc98f6d31ff |
children |
line wrap: on
line source
#include <iostream> #include "polygon_pack.h" #include "span_pack.h" #include "spu_span.h" using namespace std; //int spu_span(SPANPACKLIST *spl, SPUSPANLIST *a) int spu_span(SPLSSL *splssl, SPUSPANLIST *a) { SPANPACKLIST *spl = splssl->spl; SPUSPANLIST *ssl = splssl->ssl; ssl->ss[0].length = 0; ssl->ss[1].length = 0; ssl->ss[2].length = 0; ssl->ss[3].length = 0; ssl->ss[4].length = 0; ssl->ss[5].length = 0; for(int i=0; i<spl->size; i++) { int ss_size = ssl->ss[i%6].length; /* if(ss_size > 64) { SPUSPAN new_ss = new SPUSPAN; ssl[i%6]->next = new_ss; */ ssl->ss[i%6].spp[ss_size] = &spl->dline[i]; ssl->ss[i%6].length++; } return 0; }