|
|
1.1 ! root 1: #import <appkit/View.h> ! 2: ! 3: #define MAXCOLS 140 ! 4: #define MAXROWS 104 ! 5: #define COLORS 18 ! 6: #define CHANGECOUNT 2000 ! 7: ! 8: @interface LifeView:View ! 9: { ! 10: unsigned char g1[MAXCOLS][MAXROWS]; ! 11: unsigned char g2[MAXCOLS][MAXROWS]; ! 12: ! 13: unsigned char (*grid)[MAXROWS]; ! 14: unsigned char (*oldGrid)[MAXROWS]; ! 15: ! 16: int ncols, nrows; ! 17: int countDown; ! 18: ! 19: float colorTable[COLORS]; ! 20: NXRect changed[CHANGECOUNT]; ! 21: ! 22: int stasis[24]; ! 23: int sindex; ! 24: ! 25: id sharedInspectorPanel; ! 26: } ! 27: ! 28: - oneStep; ! 29: - drawSquares; ! 30: - drawSelf:(const NXRect *)rects :(int)rectCount; ! 31: - (const char *) windowTitle; ! 32: - initFrame:(const NXRect *)frameRect; ! 33: - sizeTo:(NXCoord)width :(NXCoord)height; ! 34: - initLife; ! 35: - checkStasis:(int)checksum; ! 36: - inspector:sender; ! 37: ! 38: @end ! 39: ! 40: @interface StaticLifeView:LifeView ! 41: { ! 42: } ! 43: @end ! 44:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.