diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2011-07-18 22:58:08 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2011-07-18 22:58:08 (GMT) |
| commit | 68404608f69a03546b91b4e1fe800abf48a88e74 (patch) | |
| tree | af8db7f2b4cdf591e231a55a41f1c4c18cb528b4 /includes | |
| parent | 0fbe6e2d3fbe045e0db233c27bacc3b370b08753 (diff) | |
| download | powder-68404608f69a03546b91b4e1fe800abf48a88e74.zip powder-68404608f69a03546b91b4e1fe800abf48a88e74.tar.gz | |
Lensing effect for gravity, adds 3 new gravity maps (full resolution, linear interpolation for faux accuracy), old ones should be removed in time.
Diffstat (limited to 'includes')
| -rw-r--r-- | includes/air.h | 8 | ||||
| -rw-r--r-- | includes/graphics.h | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/includes/air.h b/includes/air.h index b00c6b8..b1dc819 100644 --- a/includes/air.h +++ b/includes/air.h @@ -5,12 +5,20 @@ extern float gravmap[YRES/CELL][XRES/CELL]; //Maps to be used by the main thread extern float gravx[YRES/CELL][XRES/CELL]; extern float gravy[YRES/CELL][XRES/CELL]; +extern float gravp[YRES/CELL][XRES/CELL]; +extern float *gravpf; +extern float *gravxf; +extern float *gravyf; extern unsigned gravmask[YRES/CELL][XRES/CELL]; extern float th_ogravmap[YRES/CELL][XRES/CELL]; // Maps to be processed by the gravity thread extern float th_gravmap[YRES/CELL][XRES/CELL]; extern float th_gravx[YRES/CELL][XRES/CELL]; extern float th_gravy[YRES/CELL][XRES/CELL]; +extern float *th_gravpf; +extern float *th_gravxf; +extern float *th_gravyf; +extern float th_gravp[YRES/CELL][XRES/CELL]; extern float vx[YRES/CELL][XRES/CELL], ovx[YRES/CELL][XRES/CELL]; extern float vy[YRES/CELL][XRES/CELL], ovy[YRES/CELL][XRES/CELL]; diff --git a/includes/graphics.h b/includes/graphics.h index 50d8ab1..ca761be 100644 --- a/includes/graphics.h +++ b/includes/graphics.h @@ -60,6 +60,8 @@ pixel *resample_img(pixel *src, int sw, int sh, int rw, int rh); pixel *rescale_img(pixel *src, int sw, int sh, int *qw, int *qh, int f); +void render_gravlensing(pixel *src, pixel * dst); + void sdl_blit_1(int x, int y, int w, int h, pixel *src, int pitch); void sdl_blit_2(int x, int y, int w, int h, pixel *src, int pitch); |
