project_files/HedgewarsMobile/Classes/CommodityFunctions.m
changeset 5206 db775bddf771
parent 5201 7b9aa7aac336
child 5207 4c9ae0f484da
equal deleted inserted replaced
5205:78138ae93820 5206:db775bddf771
    90     return modelId;
    90     return modelId;
    91 }
    91 }
    92 
    92 
    93 void playSound (NSString *snd) {
    93 void playSound (NSString *snd) {
    94     NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
    94     NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
    95     NSNumber *audio = [prefs objectForKey:@"audio"];
    95     NSNumber *audio = [prefs objectForKey:@"sound"];
    96 
    96 
    97     if (audio == nil || [audio boolValue] == YES) {
    97     if (audio == nil || [audio boolValue] == YES) {
    98         // get the filename of the sound file:
    98         // get the filename of the sound file:
    99         NSString *path = [NSString stringWithFormat:@"%@/%@.wav",[[NSBundle mainBundle] resourcePath],snd];
    99         NSString *path = [NSString stringWithFormat:@"%@/%@.wav",[[NSBundle mainBundle] resourcePath],snd];
   100 
   100