X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;ds=inline;f=src%2Fvoxscape.c;h=5cd9e0d77c39b5373dae99e98e219dbb5fadc254;hb=695487a7a2c44e73c758c50cdbf84b9ef370651b;hp=8276a6e66e428bb757f70322f83a4ff5c6eeddf1;hpb=9cec32e4cf5833bcfe1e6d617d35634c4ab0881a;p=gbajam22 diff --git a/src/voxscape.c b/src/voxscape.c index 8276a6e..5cd9e0d 100644 --- a/src/voxscape.c +++ b/src/voxscape.c @@ -51,7 +51,6 @@ static unsigned int vox_valid; static struct vox_object *vox_obj; static int vox_num_obj, vox_obj_stride; -int vox_quality = 1; int *projlut; int vox_init(int xsz, int ysz, uint8_t *himg, uint8_t *cimg) @@ -61,6 +60,17 @@ int vox_init(int xsz, int ysz, uint8_t *himg, uint8_t *cimg) vox_height = himg; vox_color = cimg; + vox_fb = 0; + vox_coltop = 0; + vox_horizon = 0; + vox_x = vox_y = vox_angle = 0; + vox_fov = 0; + vox_znear = vox_zfar = 0; + vox_nslices = 0; + vox_slicelen = 0; + vox_valid = 0; + projlut = 0; + vox_vheight = 80; return 0; @@ -68,10 +78,7 @@ int vox_init(int xsz, int ysz, uint8_t *himg, uint8_t *cimg) void vox_destroy(void) { - free(vox_color); - free(vox_height); - free(vox_coltop); - free(vox_slicelen); + /* XXX we rely on the screen to clear up any allocated IWRAM */ } #define H(x, y) \ @@ -135,17 +142,8 @@ void vox_render(void) vox_begin(); - if(vox_quality) { - for(i=0; i= 10 && (i & 1) == 0) { - continue; - } - vox_render_slice(i); - } + for(i=0; i