X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=blobdiff_plain;f=moving.c;h=24c9643e6187cc3e054a4b94ece8d303443b1ff3;hp=9eb70960c277f72971d3d356e0fec83af5253cf4;hb=359039abfddd65910747b48f5de6faedd496240e;hpb=e1d80424873d901a732bf81c3a7ecc564636375e diff --git a/moving.c b/moving.c index 9eb7096..24c9643 100644 --- a/moving.c +++ b/moving.c @@ -31,7 +31,7 @@ void move(void) { Time = future[FTBEAM] - state.date + 1e-5; } /* Move within the quadrant */ - quad[sectx][secty] = IHDOT; + frozen.quad[sectx][secty] = IHDOT; x = sectx; y = secty; n = 10.0*dist*bigger+0.5; @@ -101,11 +101,11 @@ void move(void) { proutn("\nEntering"); cramlc(1, quadx, quady); skip(1); - quad[sectx][secty] = ship; + frozen.quad[sectx][secty] = ship; newqad(0); return; } - iquad = quad[ix][iy]; + iquad = frozen.quad[ix][iy]; if (iquad != IHDOT) { /* object encountered in flight path */ stopegy = 50.0*dist/Time; @@ -170,7 +170,7 @@ void move(void) { finaly = secty; label100: /* No quadrant change -- compute new avg enemy distances */ - quad[sectx][secty] = ship; + frozen.quad[sectx][secty] = ship; if (nenhere) { for (l = 1; l <= nenhere; l++) { finald = sqrt((ix-kx[l])*(double)(ix-kx[l]) + @@ -567,7 +567,7 @@ void warp(int i) { y += deltay; iy = y +0.5; if (iy < 1 || iy > 10) break; - if (quad[ix][iy] != IHDOT) { + if (frozen.quad[ix][iy] != IHDOT) { blooey = 0; twarp = 0; } @@ -921,7 +921,7 @@ void help(void) { newqad(1); } /* dematerialize starship */ - quad[sectx][secty]=IHDOT; + frozen.quad[sectx][secty]=IHDOT; proutn("Starbase in"); cramlc(1, quadx, quady); proutn(" responds--"); @@ -949,12 +949,12 @@ void help(void) { for (l = 1; l <= 5; l++) { ix = basex+3.0*Rand()-1; iy = basey+3.0*Rand()-1; - if (ix>=1 && ix<=10 && iy>=1 && iy<=10 && quad[ix][iy]==IHDOT) { + if (ix>=1 && ix<=10 && iy>=1 && iy<=10 && frozen.quad[ix][iy]==IHDOT) { /* found one -- finish up */ prout("succeeds."); sectx=ix; secty=iy; - quad[ix][iy]=ship; + frozen.quad[ix][iy]=ship; dock(); skip(1); prout("Lt. Uhura- \"Captain, we made it!\"");