--- a/project_files/HedgewarsMobile/Classes/ObjcExports.m Sun Nov 28 01:58:43 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/ObjcExports.m Sun Nov 28 23:49:09 2010 +0100
@@ -20,6 +20,7 @@
#import "ObjcExports.h"
+#import "AmmoMenuViewController.h"
#pragma mark -
#pragma mark internal variables
@@ -29,6 +30,8 @@
BOOL savedGame;
// cache the grenade time
NSInteger grenadeTime;
+// the reference to the newMenu instance
+AmmoMenuViewController *amvc_instance;
#pragma mark -
#pragma mark functions called like oop
@@ -54,6 +57,10 @@
grenadeTime = value;
}
+void inline setAmmoMenuInstance(AmmoMenuViewController *instance) {
+ amvc_instance = instance;
+}
+
#pragma mark -
#pragma mark functions called by pascal code
void startSpinning() {
@@ -141,5 +148,6 @@
}
void updateVisualsNewTurn(void) {
- [[NSNotificationCenter defaultCenter] postNotificationName:@"updateAmmoVisuals" object:nil];
+ DLog(@"updating visuals");
+ [amvc_instance updateAmmoVisuals];
}