equal
deleted
inserted
replaced
18 * File created on 30/10/2010. |
18 * File created on 30/10/2010. |
19 */ |
19 */ |
20 |
20 |
21 |
21 |
22 #import "ObjcExports.h" |
22 #import "ObjcExports.h" |
|
23 #import "AmmoMenuViewController.h" |
23 |
24 |
24 #pragma mark - |
25 #pragma mark - |
25 #pragma mark internal variables |
26 #pragma mark internal variables |
26 // actual game started (controls should be enabled) |
27 // actual game started (controls should be enabled) |
27 BOOL gameRunning; |
28 BOOL gameRunning; |
28 // black screen present |
29 // black screen present |
29 BOOL savedGame; |
30 BOOL savedGame; |
30 // cache the grenade time |
31 // cache the grenade time |
31 NSInteger grenadeTime; |
32 NSInteger grenadeTime; |
|
33 // the reference to the newMenu instance |
|
34 AmmoMenuViewController *amvc_instance; |
32 |
35 |
33 #pragma mark - |
36 #pragma mark - |
34 #pragma mark functions called like oop |
37 #pragma mark functions called like oop |
35 void objcExportsInit() { |
38 void objcExportsInit() { |
36 gameRunning = NO; |
39 gameRunning = NO; |
50 return grenadeTime; |
53 return grenadeTime; |
51 } |
54 } |
52 |
55 |
53 void inline setGrenadeTime(NSInteger value) { |
56 void inline setGrenadeTime(NSInteger value) { |
54 grenadeTime = value; |
57 grenadeTime = value; |
|
58 } |
|
59 |
|
60 void inline setAmmoMenuInstance(AmmoMenuViewController *instance) { |
|
61 amvc_instance = instance; |
55 } |
62 } |
56 |
63 |
57 #pragma mark - |
64 #pragma mark - |
58 #pragma mark functions called by pascal code |
65 #pragma mark functions called by pascal code |
59 void startSpinning() { |
66 void startSpinning() { |
139 gameRunning = YES; |
146 gameRunning = YES; |
140 savedGame = NO; |
147 savedGame = NO; |
141 } |
148 } |
142 |
149 |
143 void updateVisualsNewTurn(void) { |
150 void updateVisualsNewTurn(void) { |
144 [[NSNotificationCenter defaultCenter] postNotificationName:@"updateAmmoVisuals" object:nil]; |
151 DLog(@"updating visuals"); |
|
152 [amvc_instance updateAmmoVisuals]; |
145 } |
153 } |