I'm using a game with 1366x768 (widescreen) backgrounds, and it's 32it colour.

When I use this module, the player and other on-screen objects show no change, and the background begins to sway wildly getting more and more distorted.

What am I doing wrong?

SOLVED: I was using the wrong resolution. Mine are 1366 wide, so lines 34/35/50/51 in module are all using 683.0 (half of 1366), not 160.0 (half of 320, the very small size).

eg:

Underwater.asc:

`float get_gradient_y(int xi, int yi)`

{

float x = IntToFloat(xi)/683.0 - 1.0;

float y = IntToFloat(yi)/683.0 - 1.0;

float dy = 0.0;

int i = 0;

while (i < 5)

{

dy += b[i]*t*Maths.Cos(a[i]*t*x + b[i]*t*y + c[i]);

i++;

}

return dy;

}