This is FlyingWindow.h in view mode; [Download] [Up]
#import <appkit/appkit.h>
#define HORIZ_JUMPS 27 // odd number; this / 2 is how far window could
// move horizontally in one frame's worth of animation.
#define VERT_JUMPS 10 // max initial vertical velocity is this + MIN_VERT
#define MIN_VERT 5 // minimum initial vertical velocity.
#define GRAVITY 1.0 // amount gravity reduces y-velocity
@interface EnhanceFlyingWindow:Window
{
NXPoint velocity;
}
- initAt:(NXPoint *)thePoint;
- reInitAt:(NXPoint *)thePoint;
- move;
- (BOOL)onScreen;
@end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.