From 37e15bf3ad5a728e0394f40b9f4691de7464c6ea Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Fri, 14 Oct 2011 13:18:00 +0100 Subject: [PATCH] Replace use of gravy and gravf with gravxf and gravyf --- src/graphics.c | 8 ++++---- src/main.c | 8 ++++---- src/powder.c | 18 +++++++++--------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/graphics.c b/src/graphics.c index 1751f8aea..abe842190 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -1527,15 +1527,15 @@ void draw_grav(pixel *vid) { for (x=0; xptransitions[t].phv&&ptransitions[t].pht>-1) { // particle type change due to high pressure if (ptransitions[t].pht!=PT_NUM) @@ -2354,8 +2354,8 @@ killed: pGravX = ptGrav * ((float)(nx - XCNTR) / pGravD); pGravY = ptGrav * ((float)(ny - YCNTR) / pGravD); } - pGravX += gravx[ny/CELL][nx/CELL]; - pGravY += gravy[ny/CELL][nx/CELL]; + pGravX += gravxf[(ny*XRES)+nx]; + pGravY += gravyf[(ny*XRES)+nx]; if (fabsf(pGravY)>fabsf(pGravX)) mv = fabsf(pGravY); else @@ -2413,8 +2413,8 @@ killed: pGravX = ptGrav * ((float)(nx - XCNTR) / pGravD); pGravY = ptGrav * ((float)(ny - YCNTR) / pGravD); } - pGravX += gravx[ny/CELL][nx/CELL]; - pGravY += gravy[ny/CELL][nx/CELL]; + pGravX += gravxf[(ny*XRES)+nx]; + pGravY += gravyf[(ny*XRES)+nx]; if (fabsf(pGravY)>fabsf(pGravX)) mv = fabsf(pGravY); else