about summary refs log tree commit diff stats
path: root/data/maps/the_quiet/rooms/Main Area.txtpb
blob: 180e0bc550e035f1dc7aec6c961d931a4e3c4516 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: "Main Area"
panels {
  name: "SOLID"
  path: "Panels/Main/panel_1"
  clue: "solid"
  answer: "gas"
  symbols: CROSS
  proxies { answer: "liquid" path: "Panels/Q/panel_1" }
}
panels {
  name: "RODENT"
  path: "Panels/Main/panel_2"
  clue: "rodent"
  answer: "rat"
  symbols: EXAMPLE
  proxies { answer: "squirrel" path: "Panels/Q/panel_2" }
}
panels {
  name: "COIN"
  path: "Panels/Main/panel_3"
  clue: "coin"
  answer: "dime"
  symbols: EXAMPLE
  proxies { answer: "quarter" path: "Panels/Q/panel_3" }
}
panels {
  name: "RULE"
  path: "Panels/Main/panel_4"
  clue: "rule"
  answer: "king"
  symbols: JOB
  proxies { answer: "queen" path: "Panels/Q/panel_4" }
}
panels {
  name: "PORCUPINE"
  path: "Panels/Main/panel_5"
  clue: "porcupine"
  answer: "spine"
  symbols: BOXES
  proxies { answer: "quill" path: "Panels/Q/panel_5" }
}
panels {
  name: "DISAGREE"
  path: "Panels/Main/panel_6"
  clue: "disagree"
  answer: "argue"
  symbols: PYRAMID
  proxies { answer: "quarrel" path: "Panels/Q/panel_6" }
}
panels {
  name: "DEMAND"
  path: "Panels/Main/panel_7"
  clue: "demand"
  answer: "ask"
  symbols: PYRAMID
  proxies { answer: "request" path: "Panels/Q/panel_7" }
}
panels {
  name: "FLOWER"
  path: "Panels/Main/panel_8"
  clue: "flower"
  answer: "flowers"
  symbols: PLANET
  proxies { answer: "bouquet" path: "Panels/Q/panel_8" }
}
panels {
  name: "BEE"
  path: "Panels/Main/panel_9"
  clue: "bee"
  answer: "fly"
  symbols: EXAMPLE
  proxies { answer: "mosquito" path: "Panels/Q/panel_9" }
}
panels {
  name: "DUO"
  path: "Panels/Main/panel_10"
  clue: "duo"
  answer: "trio"
  symbols: BOXES
  proxies { answer: "quartet" path: "Panels/Q/panel_10" }
}
panels {
  name: "LINGO 2"
  path: "Panels/Main/panel_11"
  clue: "lingo 2"
  answer: "game"
  symbols: EXAMPLE
  proxies { answer: "sequel" path: "Panels/Q/panel_11" }
}
panels {
  name: "CRUSH"
  path: "Panels/Main/panel_12"
  clue: "crush"
  answer: "mash"
  symbols: SUN
  proxies { answer: "squash" path: "Panels/Q/panel_12" }
}
ports {
  name: "DAEDALUS"
  path: "Components/Warps/worldport"
  orientation: "east"
}
TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * */ #import <Availability.h> #import "CCFileUtils.h" #import "../CCConfiguration.h" #import "../ccMacros.h" #import "../ccConfig.h" static NSFileManager *__localFileManager=nil; // NSInteger ccLoadFileIntoMemory(const char *filename, unsigned char **out) { NSCAssert( out, @"ccLoadFileIntoMemory: invalid 'out' parameter"); NSCAssert( &*out, @"ccLoadFileIntoMemory: invalid 'out' parameter"); size_t size = 0; FILE *f = fopen(filename, "rb"); if( !f ) { *out = NULL; return -1; } fseek(f, 0, SEEK_END); size = ftell(f); fseek(f, 0, SEEK_SET); *out = malloc(size); size_t read = fread(*out, 1, size, f); if( read != size ) { free(*out); *out = NULL; return -1; } fclose(f); return size; } NSString *ccRemoveHDSuffixFromFile( NSString *path ) { #if CC_IS_RETINA_DISPLAY_SUPPORTED if( CC_CONTENT_SCALE_FACTOR() == 2 ) { NSString *name = [path lastPathComponent]; // check if path already has the suffix. if( [name rangeOfString:CC_RETINA_DISPLAY_FILENAME_SUFFIX].location != NSNotFound ) { CCLOG(@"cocos2d: Filename(%@) contains %@ suffix. Removing it. See cocos2d issue #1040", path, CC_RETINA_DISPLAY_FILENAME_SUFFIX); NSString *newLastname = [name stringByReplacingOccurrencesOfString:CC_RETINA_DISPLAY_FILENAME_SUFFIX withString:@""]; NSString *pathWithoutLastname = [path stringByDeletingLastPathComponent]; return [pathWithoutLastname stringByAppendingPathComponent:newLastname]; } } #endif // CC_IS_RETINA_DISPLAY_SUPPORTED return path; } @implementation CCFileUtils +(void) initialize { if( self == [CCFileUtils class] ) __localFileManager = [[NSFileManager alloc] init]; } +(NSString*) getDoubleResolutionImage:(NSString*)path { #if CC_IS_RETINA_DISPLAY_SUPPORTED if( CC_CONTENT_SCALE_FACTOR() == 2 ) { NSString *pathWithoutExtension = [path stringByDeletingPathExtension]; NSString *name = [pathWithoutExtension lastPathComponent]; // check if path already has the suffix. if( [name rangeOfString:CC_RETINA_DISPLAY_FILENAME_SUFFIX].location != NSNotFound ) { CCLOG(@"cocos2d: WARNING Filename(%@) already has the suffix %@. Using it.", name, CC_RETINA_DISPLAY_FILENAME_SUFFIX); return path; } NSString *extension = [path pathExtension]; if( [extension isEqualToString:@"ccz"] || [extension isEqualToString:@"gz"] ) { // All ccz / gz files should be in the format filename.xxx.ccz // so we need to pull off the .xxx part of the extension as well extension = [NSString stringWithFormat:@"%@.%@", [pathWithoutExtension pathExtension], extension]; pathWithoutExtension = [pathWithoutExtension stringByDeletingPathExtension]; } NSString *retinaName = [pathWithoutExtension stringByAppendingString:CC_RETINA_DISPLAY_FILENAME_SUFFIX]; retinaName = [retinaName stringByAppendingPathExtension:extension]; if( [__localFileManager fileExistsAtPath:retinaName] ) return retinaName; CCLOG(@"cocos2d: CCFileUtils: Warning HD file not found: %@", [retinaName lastPathComponent] ); } #endif // CC_IS_RETINA_DISPLAY_SUPPORTED return path; } +(NSString*) fullPathFromRelativePath:(NSString*) relPath { NSAssert(relPath != nil, @"CCFileUtils: Invalid path"); NSString *fullpath = nil; // only if it is not an absolute path if( ! [relPath isAbsolutePath] ) { NSString *file = [relPath lastPathComponent]; NSString *imageDirectory = [relPath stringByDeletingLastPathComponent]; fullpath = [[NSBundle mainBundle] pathForResource:file ofType:nil inDirectory:imageDirectory]; } if (fullpath == nil) fullpath = relPath; fullpath = [self getDoubleResolutionImage:fullpath]; return fullpath; } @end