uint8_t fogcolor;
unsigned int valid;
+
+ struct vox_object *obj;
+ int num_obj, obj_stride;
};
int vox_quality = 1;
uint8_t color, last_col;
uint16_t *fbptr;
int proj;
+ struct vox_object *obj;
z = vox->znear + n;
fbptr += FBPITCH / 2;
}
vox->coltop[col] = hval;
+
+ /* check to see if there's an object here */
+ obj = vox->obj;
+ for(j=0; j<vox->num_obj; j++) {
+ if(obj->offs == offs) {
+ obj->px = col;
+ obj->py = colstart;
+ obj->scale = projlut[n];
+ }
+ obj = (struct vox_object*)((char*)obj + vox->obj_stride);
+ }
}
x += xstep;
y += ystep;
}
}
}
+
+void vox_objects(struct voxscape *vox, struct vox_object *ptr, int count, int stride)
+{
+ int i;
+ struct vox_object *obj;
+
+ vox->obj = ptr;
+ vox->num_obj = count;
+ vox->obj_stride = stride;
+
+ obj = ptr;
+ for(i=0; i<count; i++) {
+ obj->offs = obj->y * XSZ + obj->x;
+ emuprint("%d,%d -> %d", obj->x, obj->y, obj->offs);
+ obj = (struct vox_object*)((char*)obj + stride);
+ }
+}