This is Body.h in view mode; [Download] [Up]
#import <appkit/appkit.h>
#import "Thinker.h"
#import "CelestialCommon.h"
#import "StarShipProtocol.h"
@interface Body:Object
{
id starsObject;
List *imageList;
List *maskList;
Storage *avoidStorage;
NXImage *currentImage;
NXImage *buffer;
NXSize currentImageSize;
NXSize currentMaskSize;
int currentBodyListIndex;
int bodyIndex;
int numberOfFrames; //0 - (number of images - 1)
NXPoint maskPosition;
NXPoint bodyPosition;
NXPoint centerOfScreen;
NXRect bodyFrameRect;
NXRect maskFrameRect;
NXRect avoid;
NXRect bounds;
BOOL firstState;
float theta; // angle
int bodyDist,maskDist;
float delta,distDelta,frameDelta;
unsigned int bodyDelta,maskDelta;
unsigned int bodyFrameIndexCounter,maskFrameIndexCounter;
}
- setImageListIndex;
- (NXPoint)adjustPositionForBody:(NXPoint)position;
- (NXPoint)adjustPositionForMask:(NXPoint)position;
- init;
- free;
- setCenter;
- setImageList:(List *)list;
- setBoundsRect:(NXRect *)r;
- (BOOL)doUntilDone; // does next frame in animation of space body
- setFrameRectForBody;
- setFrameRectForMask;
- setStarsOutlet: (id)starsOutlet;
- setVoidRect:(int)index;
- (NXImage *)setBodyImage;
- setNumberOfFrames;
- setStartPosition:(NXPoint)point;
- setObjectSpeed:(float)objectSpeed;
- drawBody;
- (BOOL)eraseBody;
- setAngle:(float)angle;
- setAvoidStorage:(Storage *)storageObject;
- setBodyIndex:(int)index;
@endThese are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.