project_files/HedgewarsMobile/Classes/ObjcExports.m
changeset 6624 e049b5bb0ad1
parent 6615 65602f1ef0f8
child 6700 e04da46ee43c
equal deleted inserted replaced
6623:6bf169f1e97c 6624:e049b5bb0ad1
    19  */
    19  */
    20 
    20 
    21 
    21 
    22 #import "ObjcExports.h"
    22 #import "ObjcExports.h"
    23 #import "OverlayViewController.h"
    23 #import "OverlayViewController.h"
    24 #import "AmmoMenuViewController.h"
       
    25 
    24 
    26 
    25 
    27 // cache the grenade time
    26 // cache the grenade time
    28 static NSInteger grenadeTime;
    27 static NSInteger grenadeTime;
    29 // the reference to the newMenu instance
    28 // the reference to the newMenu instance
    62         overlay_instance.view.backgroundColor = [UIColor blackColor];
    61         overlay_instance.view.backgroundColor = [UIColor blackColor];
    63         overlay_instance.view.alpha = 0.75;
    62         overlay_instance.view.alpha = 0.75;
    64         overlay_instance.view.userInteractionEnabled = NO;
    63         overlay_instance.view.userInteractionEnabled = NO;
    65     }
    64     }
    66     CGPoint center = overlay_instance.view.center;
    65     CGPoint center = overlay_instance.view.center;
    67     CGPoint loaderCenter = ((IS_DUALHEAD() || [HWUtils gameType] == gtSave) ? center : CGPointMake(center.x, center.y * 5/3));
    66     CGPoint loaderCenter = ([HWUtils gameType] == gtSave) ? center : CGPointMake(center.x, center.y * 5/3);
    68 
    67 
    69     overlay_instance.loadingIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
    68     overlay_instance.loadingIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
    70     overlay_instance.loadingIndicator.hidesWhenStopped = YES;
    69     overlay_instance.loadingIndicator.hidesWhenStopped = YES;
    71     overlay_instance.loadingIndicator.center = loaderCenter;
    70     overlay_instance.loadingIndicator.center = loaderCenter;
    72     overlay_instance.loadingIndicator.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin |
    71     overlay_instance.loadingIndicator.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin |
   117         overlay_instance.grenadeTimeSegment.tag = 0;
   116         overlay_instance.grenadeTimeSegment.tag = 0;
   118     }
   117     }
   119     grenadeTime = 2;
   118     grenadeTime = 2;
   120 }
   119 }
   121 
   120 
   122 void updateVisualsNewTurn(void) {
       
   123     [overlay_instance.amvc updateAmmoVisuals];
       
   124 }
       
   125 
       
   126 // dummy function to prevent linkage fail
   121 // dummy function to prevent linkage fail
   127 int SDL_main(int argc, char **argv) {
   122 int SDL_main(int argc, char **argv) {
   128     return 0;
   123     return 0;
   129 }
   124 }