fix typo in variable
[exterlulz-kokogems.git] / src / GameView.h
blob335e912b3f3dc8e742597ef9774510ec51cec54b
1 /* ----====----====----====----====----====----====----====----====----====----
2 GameView.h (jeweltoy)
4 JewelToy is a simple game played against the clock.
5 Copyright (C) 2001 Giles Williams
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License
9 as published by the Free Software Foundation; either version 2
10 of the License, or (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 ----====----====----====----====----====----====----====----====----====---- */
22 #import <Cocoa/Cocoa.h>
23 #import <OpenGL/gl.h>
25 @class Game, GameController, OpenGLSprite;
27 @interface GameView : NSOpenGLView
29 IBOutlet GameController *gameController;
31 BOOL m_glContextInitialized;
33 NSColor *backgroundColor;
34 NSMutableArray *gemImageArray;
35 NSImage *backgroundImage;
36 NSImage *crosshairImage;
37 NSImage *movehintImage;
39 //OpenGLSprites!
40 OpenGLSprite *backgroundSprite, *crosshairSprite, *movehintSprite;
41 NSMutableArray *gemSpriteArray;
43 //backgrounds
44 NSMutableArray *backgroundImagePathArray;
46 id legend;
47 NSAttributedString *hiScoreLegend;
49 NSImage *legendImage;
50 OpenGLSprite *legendSprite;
52 NSArray *hiScoreNumbers, *hiScoreNames;
53 int ticksSinceLastMove, scoreScroll;
55 NSPoint dragStartPoint;
57 Game *game;
59 NSDictionary *docTypeDictionary;
61 BOOL _animating, showHighScores, paused, muted, animationStatus, showHint;
64 @property BOOL _animating;
66 - (void) graphicSetUp;
67 - (void) loadImageArray;
69 // ANIMATE
70 - (void) setMuted:(BOOL)value;
71 - (void) setShowHint:(BOOL)value;
72 - (void) setPaused:(BOOL)value;
73 - (void) animate;
75 - (void) setGame:(Game *) agame;
76 - (Game *) game;
77 - (NSArray *) imageArray;
78 - (NSArray *) spriteArray;
79 - (void) newBackground;
80 - (void) setLegend:(id)value;
81 - (void) setHTMLLegend:(NSString *)value;
82 - (void) setHiScoreLegend:(NSAttributedString *)value;
83 - (void) setHTMLHiScoreLegend:(NSString *)value;
84 - (void) setLastMoveDate;
86 - (void) showHighScores:(NSArray *)scores andNames:(NSArray *)names;
88 // Standard view create/free methods
89 - (id)initWithFrame:(NSRect)frame;
90 - (void)dealloc;
92 // Drawing
93 - (void)drawRect:(NSRect)rect;
94 - (void) showScores;
95 - (BOOL)isOpaque;
97 // Event handling
98 - (void)mouseDown:(NSEvent *)event;
99 - (void)mouseDragged:(NSEvent *)event;
100 - (void)mouseUp:(NSEvent *)event;
102 @end