-
Notifications
You must be signed in to change notification settings - Fork 2
/
DrawState.h
50 lines (36 loc) · 970 Bytes
/
DrawState.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//
// DrawState.h
// Evo1
//
// Created by Tim Hinderliter on 4/30/10.
// Copyright 2010 __MyCompanyName__. All rights reserved.
//
#import <OpenGLES/ES1/gl.h>
@interface DrawState : NSObject {
CGPoint translate;
CGPoint scale;
GLfloat rotate;
GLfloat color[4];
}
- (DrawState*) init;
- (CGPoint) transformedPoint:(CGPoint)point;
- (CGPoint) translate:(CGPoint)offset;
- (CGPoint) scale:(CGPoint)toScale;
- (GLfloat) rotate:(GLfloat)toRotate;
@property(readonly, nonatomic) CGPoint translate;
@property(readwrite, nonatomic) GLfloat* color;
@end
@interface MachineState : NSObject {
NSMutableArray * stack;
int numRegisters;
GLfloat * registers;
}
@property(nonatomic, readonly) NSArray* stack;
- (MachineState*) init:(int)numRegisters;
- (GLfloat) getReg:(int)regIdx;
- (GLfloat) setReg:(int)regIdx withValue:(GLfloat)value;
- (GLfloat) push:(GLfloat)number;
- (GLfloat) pop;
- (GLfloat) peek:(int)index;
- (void) clone:(int)num;
@end