X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fvoxscape.h;h=31d619477b9e50862eb29d57a965709d0558853c;hb=09ff9fd9a87d495d8c2d55203af89d0f651b5d3a;hp=7092e7ea775b9132928abe2f7345c66b50f22000;hpb=7aad8db2edab014c0f750de76bc24bdab63aef2a;p=gbajam22 diff --git a/src/voxscape.h b/src/voxscape.h index 7092e7e..31d6194 100644 --- a/src/voxscape.h +++ b/src/voxscape.h @@ -8,33 +8,33 @@ enum { VOX_LINEAR }; -struct voxscape; - -extern int vox_quality; +struct vox_object { + int x, y, px, py; + int offs; + int32_t scale; +}; -struct voxscape *vox_create(int xsz, int ysz, uint8_t *himg, uint8_t *cimg); -void vox_free(struct voxscape *vox); +extern int *projlut; -/* data argument can be null */ -uint8_t *vox_texture(struct voxscape *vox, uint8_t *data); -uint8_t *vox_heightmap(struct voxscape *vox, uint8_t *data); +int vox_init(int xsz, int ysz, uint8_t *himg, uint8_t *cimg); +void vox_destroy(void); -void vox_fog(struct voxscape *vox, int zstart, uint8_t color); -int vox_height(struct voxscape *vox, int32_t x, int32_t y); +void vox_framebuf(int xres, int yres, void *fb, int horizon); +/* negative height for auto at -h above terrain */ +int vox_view(int32_t x, int32_t y, int h, int32_t angle); +void vox_proj(int fov, int znear, int zfar); -void vox_filter(struct voxscape *vox, int hfilt, int cfilt); +void vox_render(void); -void vox_framebuf(struct voxscape *vox, int xres, int yres, void *fb, int horizon); -/* negative height for auto at -h above terrain */ -void vox_view(struct voxscape *vox, int32_t x, int32_t y, int h, int32_t angle); -void vox_proj(struct voxscape *vox, int fov, int znear, int zfar); +void vox_begin(void); +void vox_render_slice(int n); -void vox_render(struct voxscape *vox); +void vox_sky_solid(uint8_t color); +void vox_sky_grad(uint8_t chor, uint8_t ctop); -void vox_begin(struct voxscape *vox); -void vox_render_slice(struct voxscape *vox, int n); +void vox_objects(struct vox_object *ptr, int count, int stride); -void vox_sky_solid(struct voxscape *vox, uint8_t color); -void vox_sky_grad(struct voxscape *vox, uint8_t chor, uint8_t ctop); +int vox_height(int x, int y); +int vox_check_vis(int32_t x0, int32_t y0, int32_t x1, int32_t y1); #endif /* VOXSCAPE_H_ */