rem: SpaceOrg.x = (int)(LOG_SPACE_WIDTH >> 1) - (LOG_SPACE_WIDTH * next_reduction / (MAX_ZOOM_OUT << 2)); SpaceOrg.y = (int)(LOG_SPACE_HEIGHT >> 1) - (LOG_SPACE_HEIGHT * next_reduction / (MAX_ZOOM_OUT << 2)); #endif
context: CalcView (PPOINT pNewScrollPt, SIZE next_reduction,		PSIZE pdx, PSIZE pdy, COUNT ships_alive)#endif{	SIZE dx, dy;	VIEW_STATE view_state;#ifdef KDEBUG	fprintf (stderr, "CalcView:\n");#endif	dx = ((COORD)(LOG_SPACE_WIDTH >> 1) - pNewScrollPt->x);	dy = ((COORD)(LOG_SPACE_HEIGHT >> 1) - pNewScrollPt->y);	dx = WRAP_DELTA_X (dx);	dy = WRAP_DELTA_Y (dy);	if (ships_alive == 1)	{#define ORG_JUMP_X (LOG_SPACE_WIDTH / 75)#define ORG_JUMP_Y (LOG_SPACE_HEIGHT / 75)		if (dx > ORG_JUMP_X)			dx = ORG_JUMP_X;		else if (dx < -ORG_JUMP_X)			dx = -ORG_JUMP_X;		if (dy > ORG_JUMP_Y)			dy = ORG_JUMP_Y;		else if (dy < -ORG_JUMP_Y)			dy = -ORG_JUMP_Y;	}	if ((dx || dy) && LOBYTE (GLOBAL (CurrentActivity)) == IN_HYPERSPACE)		MoveSIS (&dx, &dy);#ifdef OLD_ZOOM	if (GLOBAL (cur_state) == next_reduction)#else	if (zoom_out == next_reduction)#endif		view_state = dx == 0 && dy == 0				&& LOBYTE (GLOBAL (CurrentActivity)) != IN_HYPERSPACE				? VIEW_STABLE : VIEW_SCROLL;	else	{#ifdef OLD_ZOOM		GLOBAL (cur_state) = next_reduction;		SpaceOrg.x = (COORD)(LOG_SPACE_WIDTH >> 1)				- (LOG_SPACE_WIDTH >> ((MAX_REDUCTION + 1) - next_reduction));		SpaceOrg.y = (COORD)(LOG_SPACE_HEIGHT >> 1)				- (LOG_SPACE_HEIGHT >> ((MAX_REDUCTION + 1) - next_reduction));#else#define ZOOM_JUMP ((1 << ZOOM_SHIFT) >> 3)		if (ships_alive == 1				&& zoom_out > next_reduction				&& zoom_out <= MAX_ZOOM_OUT				&& zoom_out - next_reduction > ZOOM_JUMP)			next_reduction = zoom_out - ZOOM_JUMP;					zoom_out = next_reduction;		SpaceOrg.x = (int)(LOG_SPACE_WIDTH >> 1)				- (LOG_SPACE_WIDTH * next_reduction / (MAX_ZOOM_OUT << 2));		SpaceOrg.y = (int)(LOG_SPACE_HEIGHT >> 1)				- (LOG_SPACE_HEIGHT * next_reduction / (MAX_ZOOM_OUT << 2));#endif		view_state = VIEW_CHANGE;	}	if (LOBYTE (GLOBAL (CurrentActivity)) <= IN_HYPERSPACE)		MoveGalaxy (view_state, dx, dy);	*pdx = dx;	*pdy = dy;#ifdef KDEBUG	fprintf (stderr, "CalcView: exit\n");#endif	return (view_state);}