diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2011-10-14 12:18:00 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2011-10-14 12:18:00 (GMT) |
| commit | 37e15bf3ad5a728e0394f40b9f4691de7464c6ea (patch) | |
| tree | 0373de1bc26047e211098277d24df38e77d89799 /src/graphics.c | |
| parent | 1af0a86e0d2f5659f4672a8db0ca67da6e980e51 (diff) | |
| download | powder-37e15bf3ad5a728e0394f40b9f4691de7464c6ea.zip powder-37e15bf3ad5a728e0394f40b9f4691de7464c6ea.tar.gz | |
Replace use of gravy and gravf with gravxf and gravyf
Diffstat (limited to 'src/graphics.c')
| -rw-r--r-- | src/graphics.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/graphics.c b/src/graphics.c index 1751f8a..abe8421 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -1527,15 +1527,15 @@ void draw_grav(pixel *vid) { for (x=0; x<XRES/CELL; x++) { - if(fabsf(gravx[y][x]) <= 0.001f && fabsf(gravy[y][x]) <= 0.001f) + if(fabsf(gravpf[(y*XRES)+x]) <= 0.001f && fabsf(gravyf[((y*CELL)*XRES)+(x*CELL)]) <= 0.001f) continue; nx = x*CELL; ny = y*CELL; - dist = fabsf(gravx[y][x])+fabsf(gravy[y][x]); + dist = fabsf(gravyf[(y*XRES)+x])+fabsf(gravxf[(y*XRES)+x]); for(i = 0; i < 4; i++) { - nx -= gravx[y][x]*0.5f; - ny -= gravy[y][x]*0.5f; + nx -= gravxf[((y*CELL)*XRES)+(x*CELL)]*0.5f; + ny -= gravyf[((y*CELL)*XRES)+(x*CELL)]*0.5f; addpixel(vid, (int)(nx+0.5f), (int)(ny+0.5f), 255, 255, 255, (int)(dist*20.0f)); } } |
