aboutsummaryrefslogtreecommitdiff
path: root/tests/raytrace.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/raytrace.cpp')
-rw-r--r--tests/raytrace.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/raytrace.cpp b/tests/raytrace.cpp
index 0b9bf823..27db4b72 100644
--- a/tests/raytrace.cpp
+++ b/tests/raytrace.cpp
@@ -167,17 +167,16 @@ static node_t *create(node_t*n,const int lvl,int dist,v_t c,v_t d,double r) {
return n;
}
-#define SIZE 8
int main(int argc,char*argv[]){
- enum{ w = SIZE, h = w }; /* resolution */
- const int lvl=(argc==2?std::max(atoi(argv[1]),2):6);
+ const int lvl=atoi(argv[1]);
+ const int size=atoi(argv[2]);
int count=childs, dec=lvl;
while(--dec > 1) count=(count*childs)+childs;
++count;
pool=new node_t[count]; /* raw */
end=pool+count;
create(pool,lvl,count,v_t(0,0,0),v_t(+.25,+1,-.5).norm(),1.); /* cooked */
- std::cout << "P2\n" << w << " " << h << "\n" << SIZE << "\n";
- trace_rgss(w,h); /* served */
+ std::cout << "P2\n" << size << " " << size << "\n" << size << "\n";
+ trace_rgss(size, size); /* served */
return 0;
}