project_files/HedgewarsMobile/Classes/MapPreviewButtonView.m
changeset 6246 6b2d19ed521a
parent 6219 c193881389c1
child 6700 e04da46ee43c
equal deleted inserted replaced
6245:6df227b5e4c9 6246:6b2d19ed521a
    20 
    20 
    21 
    21 
    22 #import "MapPreviewButtonView.h"
    22 #import "MapPreviewButtonView.h"
    23 #import "MapConfigViewController.h"
    23 #import "MapConfigViewController.h"
    24 #import "UIImageExtra.h"
    24 #import "UIImageExtra.h"
    25 #import "ServerSetup.h"
       
    26 #import <pthread.h>
    25 #import <pthread.h>
    27 #import <QuartzCore/QuartzCore.h>
    26 #import <QuartzCore/QuartzCore.h>
    28 
    27 
    29 
    28 
    30 #define INDICATOR_TAG 7654
    29 #define INDICATOR_TAG 7654
    67 
    66 
    68 -(const uint8_t *)engineProtocol {
    67 -(const uint8_t *)engineProtocol {
    69     IPaddress ip;
    68     IPaddress ip;
    70     BOOL serverQuit = NO;
    69     BOOL serverQuit = NO;
    71     static uint8_t map[128*32];
    70     static uint8_t map[128*32];
    72     int port = [ServerSetup randomPort];
    71     int port = [HWUtils randomPort];
    73 
    72 
    74     if (SDLNet_Init() < 0) {
    73     if (SDLNet_Init() < 0) {
    75         DLog(@"SDLNet_Init: %s", SDLNet_GetError());
    74         DLog(@"SDLNet_Init: %s", SDLNet_GetError());
    76         serverQuit = YES;
    75         serverQuit = YES;
    77     }
    76     }