X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fvoxscape.h;fp=src%2Fvoxscape.h;h=9bd5164ee26465dbf84720462f4463f2b1699d55;hb=f18556d9f7174dfb6822a7a543732389e8d48bcd;hp=1bbb03acdf6cffd22f61a66a51f275a289d8b6e0;hpb=34a5a35c6ba9aff4ae92475bfa8d3b398633d835;p=voxscape diff --git a/src/voxscape.h b/src/voxscape.h index 1bbb03a..9bd5164 100644 --- a/src/voxscape.h +++ b/src/voxscape.h @@ -5,13 +5,17 @@ struct voxscape; +#define VOX_RGB(r, g, b) \ + ((uint32_t)(r) | ((uint32_t)(g) << 8) | ((uint32_t)(b) << 16)) + struct voxscape *vox_create(int xsz, int ysz); struct voxscape *vox_open(const char *hfile, const char *cfile); void vox_free(struct voxscape *vox); +void vox_fog(struct voxscape *vox, int zstart, uint32_t color); int vox_height(struct voxscape *vox, int32_t x, int32_t y); -void vox_framebuf(struct voxscape *vox, int xres, int yres, uint32_t *fb); +void vox_framebuf(struct voxscape *vox, int xres, int yres, uint32_t *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); @@ -21,6 +25,7 @@ void vox_render(struct voxscape *vox); void vox_begin(struct voxscape *vox); void vox_render_slice(struct voxscape *vox, int n); +void vox_sky_solid(struct voxscape *vox, uint32_t color); void vox_sky_grad(struct voxscape *vox, uint32_t chor, uint32_t ctop); #endif /* VOXSCAPE_H_ */