project_files/HedgewarsMobile/Classes/CommodityFunctions.m
changeset 4341 46b8791e577f
parent 4290 82f1f1d819c0
child 4356 d1d26f8963a3
equal deleted inserted replaced
4339:58d4733c9cad 4341:46b8791e577f
    31 BOOL inline rotationManager (UIInterfaceOrientation interfaceOrientation) {
    31 BOOL inline rotationManager (UIInterfaceOrientation interfaceOrientation) {
    32     if (IS_IPAD())
    32     if (IS_IPAD())
    33         return (interfaceOrientation == UIInterfaceOrientationLandscapeRight) ||
    33         return (interfaceOrientation == UIInterfaceOrientationLandscapeRight) ||
    34                (interfaceOrientation == UIInterfaceOrientationLandscapeLeft);
    34                (interfaceOrientation == UIInterfaceOrientationLandscapeLeft);
    35     else
    35     else
    36         return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
    36         return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft);
    37 }
    37 }
    38 
    38 
    39 NSInteger inline randomPort () {
    39 NSInteger inline randomPort () {
    40     srandom(time(NULL));
    40     srandom(time(NULL));
    41     NSInteger res = (random() % 64511) + 1024;
    41     NSInteger res = (random() % 64511) + 1024;