author | Jens Alfke <jens@mooseyard.com> |
Wed May 28 12:47:10 2008 -0700 (2008-05-28) | |
changeset 8 | 45c82a071aca |
parent 7 | 428a194e3e59 |
child 9 | a59acc683080 |
1.1 --- a/English.lproj/MainMenu.nib/designable.nib Sun Mar 16 15:06:47 2008 -0700 1.2 +++ b/English.lproj/MainMenu.nib/designable.nib Wed May 28 12:47:10 2008 -0700 1.3 @@ -41,7 +41,7 @@ 1.4 <string key="NSClassName">NSImage</string> 1.5 <string key="NSResourceName">NSMenuCheckmark</string> 1.6 </object> 1.7 - <object class="NSCustomResource" key="NSMixedImage" id="237504539"> 1.8 + <object class="NSCustomResource" key="NSMixedImage" id="580230904"> 1.9 <string key="NSClassName">NSImage</string> 1.10 <string key="NSResourceName">NSMenuMixedState</string> 1.11 </object> 1.12 @@ -56,7 +56,7 @@ 1.13 <string key="NSKeyEquiv"/> 1.14 <int key="NSMnemonicLoc">2147483647</int> 1.15 <reference key="NSOnImage" ref="484312224"/> 1.16 - <reference key="NSMixedImage" ref="237504539"/> 1.17 + <reference key="NSMixedImage" ref="580230904"/> 1.18 </object> 1.19 <object class="NSMenuItem" id="304266470"> 1.20 <reference key="NSMenu" ref="110575045"/> 1.21 @@ -67,7 +67,7 @@ 1.22 <int key="NSKeyEquivModMask">1048576</int> 1.23 <int key="NSMnemonicLoc">2147483647</int> 1.24 <reference key="NSOnImage" ref="484312224"/> 1.25 - <reference key="NSMixedImage" ref="237504539"/> 1.26 + <reference key="NSMixedImage" ref="580230904"/> 1.27 </object> 1.28 <object class="NSMenuItem" id="609285721"> 1.29 <reference key="NSMenu" ref="110575045"/> 1.30 @@ -76,7 +76,7 @@ 1.31 <int key="NSKeyEquivModMask">1048576</int> 1.32 <int key="NSMnemonicLoc">2147483647</int> 1.33 <reference key="NSOnImage" ref="484312224"/> 1.34 - <reference key="NSMixedImage" ref="237504539"/> 1.35 + <reference key="NSMixedImage" ref="580230904"/> 1.36 </object> 1.37 <object class="NSMenuItem" id="481834944"> 1.38 <reference key="NSMenu" ref="110575045"/> 1.39 @@ -87,7 +87,7 @@ 1.40 <int key="NSKeyEquivModMask">1048576</int> 1.41 <int key="NSMnemonicLoc">2147483647</int> 1.42 <reference key="NSOnImage" ref="484312224"/> 1.43 - <reference key="NSMixedImage" ref="237504539"/> 1.44 + <reference key="NSMixedImage" ref="580230904"/> 1.45 </object> 1.46 <object class="NSMenuItem" id="1046388886"> 1.47 <reference key="NSMenu" ref="110575045"/> 1.48 @@ -96,7 +96,7 @@ 1.49 <int key="NSKeyEquivModMask">1048576</int> 1.50 <int key="NSMnemonicLoc">2147483647</int> 1.51 <reference key="NSOnImage" ref="484312224"/> 1.52 - <reference key="NSMixedImage" ref="237504539"/> 1.53 + <reference key="NSMixedImage" ref="580230904"/> 1.54 <string key="NSAction">submenuAction:</string> 1.55 <object class="NSMenu" key="NSSubmenu" id="752062318"> 1.56 <string key="NSTitle">Services</string> 1.57 @@ -115,7 +115,7 @@ 1.58 <int key="NSKeyEquivModMask">1048576</int> 1.59 <int key="NSMnemonicLoc">2147483647</int> 1.60 <reference key="NSOnImage" ref="484312224"/> 1.61 - <reference key="NSMixedImage" ref="237504539"/> 1.62 + <reference key="NSMixedImage" ref="580230904"/> 1.63 </object> 1.64 <object class="NSMenuItem" id="755159360"> 1.65 <reference key="NSMenu" ref="110575045"/> 1.66 @@ -124,7 +124,7 @@ 1.67 <int key="NSKeyEquivModMask">1048576</int> 1.68 <int key="NSMnemonicLoc">2147483647</int> 1.69 <reference key="NSOnImage" ref="484312224"/> 1.70 - <reference key="NSMixedImage" ref="237504539"/> 1.71 + <reference key="NSMixedImage" ref="580230904"/> 1.72 </object> 1.73 <object class="NSMenuItem" id="342932134"> 1.74 <reference key="NSMenu" ref="110575045"/> 1.75 @@ -133,7 +133,7 @@ 1.76 <int key="NSKeyEquivModMask">1572864</int> 1.77 <int key="NSMnemonicLoc">2147483647</int> 1.78 <reference key="NSOnImage" ref="484312224"/> 1.79 - <reference key="NSMixedImage" ref="237504539"/> 1.80 + <reference key="NSMixedImage" ref="580230904"/> 1.81 </object> 1.82 <object class="NSMenuItem" id="908899353"> 1.83 <reference key="NSMenu" ref="110575045"/> 1.84 @@ -142,7 +142,7 @@ 1.85 <int key="NSKeyEquivModMask">1048576</int> 1.86 <int key="NSMnemonicLoc">2147483647</int> 1.87 <reference key="NSOnImage" ref="484312224"/> 1.88 - <reference key="NSMixedImage" ref="237504539"/> 1.89 + <reference key="NSMixedImage" ref="580230904"/> 1.90 </object> 1.91 <object class="NSMenuItem" id="1056857174"> 1.92 <reference key="NSMenu" ref="110575045"/> 1.93 @@ -153,7 +153,7 @@ 1.94 <int key="NSKeyEquivModMask">1048576</int> 1.95 <int key="NSMnemonicLoc">2147483647</int> 1.96 <reference key="NSOnImage" ref="484312224"/> 1.97 - <reference key="NSMixedImage" ref="237504539"/> 1.98 + <reference key="NSMixedImage" ref="580230904"/> 1.99 </object> 1.100 <object class="NSMenuItem" id="632727374"> 1.101 <reference key="NSMenu" ref="110575045"/> 1.102 @@ -162,7 +162,7 @@ 1.103 <int key="NSKeyEquivModMask">1048576</int> 1.104 <int key="NSMnemonicLoc">2147483647</int> 1.105 <reference key="NSOnImage" ref="484312224"/> 1.106 - <reference key="NSMixedImage" ref="237504539"/> 1.107 + <reference key="NSMixedImage" ref="580230904"/> 1.108 </object> 1.109 </object> 1.110 <string key="NSName">_NSAppleMenu</string> 1.111 @@ -175,7 +175,7 @@ 1.112 <int key="NSKeyEquivModMask">1048576</int> 1.113 <int key="NSMnemonicLoc">2147483647</int> 1.114 <reference key="NSOnImage" ref="484312224"/> 1.115 - <reference key="NSMixedImage" ref="237504539"/> 1.116 + <reference key="NSMixedImage" ref="580230904"/> 1.117 <string key="NSAction">submenuAction:</string> 1.118 <object class="NSMenu" key="NSSubmenu" id="720053764"> 1.119 <string key="NSTitle">File</string> 1.120 @@ -188,7 +188,7 @@ 1.121 <int key="NSKeyEquivModMask">1048576</int> 1.122 <int key="NSMnemonicLoc">2147483647</int> 1.123 <reference key="NSOnImage" ref="484312224"/> 1.124 - <reference key="NSMixedImage" ref="237504539"/> 1.125 + <reference key="NSMixedImage" ref="580230904"/> 1.126 </object> 1.127 <object class="NSMenuItem" id="722745758"> 1.128 <reference key="NSMenu" ref="720053764"/> 1.129 @@ -197,7 +197,7 @@ 1.130 <int key="NSKeyEquivModMask">1048576</int> 1.131 <int key="NSMnemonicLoc">2147483647</int> 1.132 <reference key="NSOnImage" ref="484312224"/> 1.133 - <reference key="NSMixedImage" ref="237504539"/> 1.134 + <reference key="NSMixedImage" ref="580230904"/> 1.135 </object> 1.136 <object class="NSMenuItem" id="1025936716"> 1.137 <reference key="NSMenu" ref="720053764"/> 1.138 @@ -206,7 +206,7 @@ 1.139 <int key="NSKeyEquivModMask">1048576</int> 1.140 <int key="NSMnemonicLoc">2147483647</int> 1.141 <reference key="NSOnImage" ref="484312224"/> 1.142 - <reference key="NSMixedImage" ref="237504539"/> 1.143 + <reference key="NSMixedImage" ref="580230904"/> 1.144 <string key="NSAction">submenuAction:</string> 1.145 <object class="NSMenu" key="NSSubmenu" id="1065607017"> 1.146 <string key="NSTitle">Open Recent</string> 1.147 @@ -219,7 +219,7 @@ 1.148 <int key="NSKeyEquivModMask">1048576</int> 1.149 <int key="NSMnemonicLoc">2147483647</int> 1.150 <reference key="NSOnImage" ref="484312224"/> 1.151 - <reference key="NSMixedImage" ref="237504539"/> 1.152 + <reference key="NSMixedImage" ref="580230904"/> 1.153 </object> 1.154 </object> 1.155 <string key="NSName">_NSRecentDocumentsMenu</string> 1.156 @@ -234,7 +234,7 @@ 1.157 <int key="NSKeyEquivModMask">1048576</int> 1.158 <int key="NSMnemonicLoc">2147483647</int> 1.159 <reference key="NSOnImage" ref="484312224"/> 1.160 - <reference key="NSMixedImage" ref="237504539"/> 1.161 + <reference key="NSMixedImage" ref="580230904"/> 1.162 </object> 1.163 <object class="NSMenuItem" id="776162233"> 1.164 <reference key="NSMenu" ref="720053764"/> 1.165 @@ -243,7 +243,7 @@ 1.166 <int key="NSKeyEquivModMask">1048576</int> 1.167 <int key="NSMnemonicLoc">2147483647</int> 1.168 <reference key="NSOnImage" ref="484312224"/> 1.169 - <reference key="NSMixedImage" ref="237504539"/> 1.170 + <reference key="NSMixedImage" ref="580230904"/> 1.171 </object> 1.172 <object class="NSMenuItem" id="1023925487"> 1.173 <reference key="NSMenu" ref="720053764"/> 1.174 @@ -252,7 +252,7 @@ 1.175 <int key="NSKeyEquivModMask">1048576</int> 1.176 <int key="NSMnemonicLoc">2147483647</int> 1.177 <reference key="NSOnImage" ref="484312224"/> 1.178 - <reference key="NSMixedImage" ref="237504539"/> 1.179 + <reference key="NSMixedImage" ref="580230904"/> 1.180 </object> 1.181 <object class="NSMenuItem" id="117038363"> 1.182 <reference key="NSMenu" ref="720053764"/> 1.183 @@ -261,7 +261,7 @@ 1.184 <int key="NSKeyEquivModMask">1179648</int> 1.185 <int key="NSMnemonicLoc">2147483647</int> 1.186 <reference key="NSOnImage" ref="484312224"/> 1.187 - <reference key="NSMixedImage" ref="237504539"/> 1.188 + <reference key="NSMixedImage" ref="580230904"/> 1.189 </object> 1.190 <object class="NSMenuItem" id="579971712"> 1.191 <reference key="NSMenu" ref="720053764"/> 1.192 @@ -269,7 +269,7 @@ 1.193 <string key="NSKeyEquiv"/> 1.194 <int key="NSMnemonicLoc">2147483647</int> 1.195 <reference key="NSOnImage" ref="484312224"/> 1.196 - <reference key="NSMixedImage" ref="237504539"/> 1.197 + <reference key="NSMixedImage" ref="580230904"/> 1.198 </object> 1.199 <object class="NSMenuItem" id="1010469920"> 1.200 <reference key="NSMenu" ref="720053764"/> 1.201 @@ -280,7 +280,7 @@ 1.202 <int key="NSKeyEquivModMask">1048576</int> 1.203 <int key="NSMnemonicLoc">2147483647</int> 1.204 <reference key="NSOnImage" ref="484312224"/> 1.205 - <reference key="NSMixedImage" ref="237504539"/> 1.206 + <reference key="NSMixedImage" ref="580230904"/> 1.207 </object> 1.208 <object class="NSMenuItem" id="294629803"> 1.209 <reference key="NSMenu" ref="720053764"/> 1.210 @@ -289,7 +289,7 @@ 1.211 <int key="NSKeyEquivModMask">1179648</int> 1.212 <int key="NSMnemonicLoc">2147483647</int> 1.213 <reference key="NSOnImage" ref="484312224"/> 1.214 - <reference key="NSMixedImage" ref="237504539"/> 1.215 + <reference key="NSMixedImage" ref="580230904"/> 1.216 <string key="NSToolTip"/> 1.217 </object> 1.218 <object class="NSMenuItem" id="49223823"> 1.219 @@ -299,7 +299,7 @@ 1.220 <int key="NSKeyEquivModMask">1048576</int> 1.221 <int key="NSMnemonicLoc">2147483647</int> 1.222 <reference key="NSOnImage" ref="484312224"/> 1.223 - <reference key="NSMixedImage" ref="237504539"/> 1.224 + <reference key="NSMixedImage" ref="580230904"/> 1.225 </object> 1.226 </object> 1.227 </object> 1.228 @@ -311,7 +311,7 @@ 1.229 <int key="NSKeyEquivModMask">1048576</int> 1.230 <int key="NSMnemonicLoc">2147483647</int> 1.231 <reference key="NSOnImage" ref="484312224"/> 1.232 - <reference key="NSMixedImage" ref="237504539"/> 1.233 + <reference key="NSMixedImage" ref="580230904"/> 1.234 <string key="NSAction">submenuAction:</string> 1.235 <object class="NSMenu" key="NSSubmenu" id="789758025"> 1.236 <string key="NSTitle">Edit</string> 1.237 @@ -324,7 +324,7 @@ 1.238 <int key="NSKeyEquivModMask">1048576</int> 1.239 <int key="NSMnemonicLoc">2147483647</int> 1.240 <reference key="NSOnImage" ref="484312224"/> 1.241 - <reference key="NSMixedImage" ref="237504539"/> 1.242 + <reference key="NSMixedImage" ref="580230904"/> 1.243 </object> 1.244 <object class="NSMenuItem" id="790794224"> 1.245 <reference key="NSMenu" ref="789758025"/> 1.246 @@ -333,7 +333,7 @@ 1.247 <int key="NSKeyEquivModMask">1179648</int> 1.248 <int key="NSMnemonicLoc">2147483647</int> 1.249 <reference key="NSOnImage" ref="484312224"/> 1.250 - <reference key="NSMixedImage" ref="237504539"/> 1.251 + <reference key="NSMixedImage" ref="580230904"/> 1.252 </object> 1.253 <object class="NSMenuItem" id="1040322652"> 1.254 <reference key="NSMenu" ref="789758025"/> 1.255 @@ -344,7 +344,7 @@ 1.256 <int key="NSKeyEquivModMask">1048576</int> 1.257 <int key="NSMnemonicLoc">2147483647</int> 1.258 <reference key="NSOnImage" ref="484312224"/> 1.259 - <reference key="NSMixedImage" ref="237504539"/> 1.260 + <reference key="NSMixedImage" ref="580230904"/> 1.261 </object> 1.262 <object class="NSMenuItem" id="296257095"> 1.263 <reference key="NSMenu" ref="789758025"/> 1.264 @@ -353,7 +353,7 @@ 1.265 <int key="NSKeyEquivModMask">1048576</int> 1.266 <int key="NSMnemonicLoc">2147483647</int> 1.267 <reference key="NSOnImage" ref="484312224"/> 1.268 - <reference key="NSMixedImage" ref="237504539"/> 1.269 + <reference key="NSMixedImage" ref="580230904"/> 1.270 </object> 1.271 <object class="NSMenuItem" id="860595796"> 1.272 <reference key="NSMenu" ref="789758025"/> 1.273 @@ -362,7 +362,7 @@ 1.274 <int key="NSKeyEquivModMask">1048576</int> 1.275 <int key="NSMnemonicLoc">2147483647</int> 1.276 <reference key="NSOnImage" ref="484312224"/> 1.277 - <reference key="NSMixedImage" ref="237504539"/> 1.278 + <reference key="NSMixedImage" ref="580230904"/> 1.279 </object> 1.280 <object class="NSMenuItem" id="29853731"> 1.281 <reference key="NSMenu" ref="789758025"/> 1.282 @@ -371,7 +371,7 @@ 1.283 <int key="NSKeyEquivModMask">1048576</int> 1.284 <int key="NSMnemonicLoc">2147483647</int> 1.285 <reference key="NSOnImage" ref="484312224"/> 1.286 - <reference key="NSMixedImage" ref="237504539"/> 1.287 + <reference key="NSMixedImage" ref="580230904"/> 1.288 </object> 1.289 <object class="NSMenuItem" id="437104165"> 1.290 <reference key="NSMenu" ref="789758025"/> 1.291 @@ -380,7 +380,7 @@ 1.292 <int key="NSKeyEquivModMask">1048576</int> 1.293 <int key="NSMnemonicLoc">2147483647</int> 1.294 <reference key="NSOnImage" ref="484312224"/> 1.295 - <reference key="NSMixedImage" ref="237504539"/> 1.296 + <reference key="NSMixedImage" ref="580230904"/> 1.297 </object> 1.298 <object class="NSMenuItem" id="583158037"> 1.299 <reference key="NSMenu" ref="789758025"/> 1.300 @@ -389,7 +389,7 @@ 1.301 <int key="NSKeyEquivModMask">1048576</int> 1.302 <int key="NSMnemonicLoc">2147483647</int> 1.303 <reference key="NSOnImage" ref="484312224"/> 1.304 - <reference key="NSMixedImage" ref="237504539"/> 1.305 + <reference key="NSMixedImage" ref="580230904"/> 1.306 </object> 1.307 <object class="NSMenuItem" id="212016141"> 1.308 <reference key="NSMenu" ref="789758025"/> 1.309 @@ -400,7 +400,7 @@ 1.310 <int key="NSKeyEquivModMask">1048576</int> 1.311 <int key="NSMnemonicLoc">2147483647</int> 1.312 <reference key="NSOnImage" ref="484312224"/> 1.313 - <reference key="NSMixedImage" ref="237504539"/> 1.314 + <reference key="NSMixedImage" ref="580230904"/> 1.315 </object> 1.316 <object class="NSMenuItem" id="676164635"> 1.317 <reference key="NSMenu" ref="789758025"/> 1.318 @@ -409,7 +409,7 @@ 1.319 <int key="NSKeyEquivModMask">1048576</int> 1.320 <int key="NSMnemonicLoc">2147483647</int> 1.321 <reference key="NSOnImage" ref="484312224"/> 1.322 - <reference key="NSMixedImage" ref="237504539"/> 1.323 + <reference key="NSMixedImage" ref="580230904"/> 1.324 <string key="NSAction">submenuAction:</string> 1.325 <object class="NSMenu" key="NSSubmenu" id="785027613"> 1.326 <string key="NSTitle">Speech</string> 1.327 @@ -422,7 +422,7 @@ 1.328 <int key="NSKeyEquivModMask">1048576</int> 1.329 <int key="NSMnemonicLoc">2147483647</int> 1.330 <reference key="NSOnImage" ref="484312224"/> 1.331 - <reference key="NSMixedImage" ref="237504539"/> 1.332 + <reference key="NSMixedImage" ref="580230904"/> 1.333 </object> 1.334 <object class="NSMenuItem" id="680220178"> 1.335 <reference key="NSMenu" ref="785027613"/> 1.336 @@ -431,7 +431,7 @@ 1.337 <int key="NSKeyEquivModMask">1048576</int> 1.338 <int key="NSMnemonicLoc">2147483647</int> 1.339 <reference key="NSOnImage" ref="484312224"/> 1.340 - <reference key="NSMixedImage" ref="237504539"/> 1.341 + <reference key="NSMixedImage" ref="580230904"/> 1.342 </object> 1.343 </object> 1.344 </object> 1.345 @@ -446,7 +446,7 @@ 1.346 <int key="NSKeyEquivModMask">1048576</int> 1.347 <int key="NSMnemonicLoc">2147483647</int> 1.348 <reference key="NSOnImage" ref="484312224"/> 1.349 - <reference key="NSMixedImage" ref="237504539"/> 1.350 + <reference key="NSMixedImage" ref="580230904"/> 1.351 <string key="NSAction">submenuAction:</string> 1.352 <object class="NSMenu" key="NSSubmenu" id="330268596"> 1.353 <string key="NSTitle">Game</string> 1.354 @@ -459,7 +459,7 @@ 1.355 <int key="NSKeyEquivModMask">1048840</int> 1.356 <int key="NSMnemonicLoc">2147483647</int> 1.357 <reference key="NSOnImage" ref="484312224"/> 1.358 - <reference key="NSMixedImage" ref="237504539"/> 1.359 + <reference key="NSMixedImage" ref="580230904"/> 1.360 </object> 1.361 <object class="NSMenuItem" id="154289436"> 1.362 <reference key="NSMenu" ref="330268596"/> 1.363 @@ -470,7 +470,7 @@ 1.364 <int key="NSKeyEquivModMask">1048576</int> 1.365 <int key="NSMnemonicLoc">2147483647</int> 1.366 <reference key="NSOnImage" ref="484312224"/> 1.367 - <reference key="NSMixedImage" ref="237504539"/> 1.368 + <reference key="NSMixedImage" ref="580230904"/> 1.369 </object> 1.370 <object class="NSMenuItem" id="630661937"> 1.371 <reference key="NSMenu" ref="330268596"/> 1.372 @@ -479,7 +479,7 @@ 1.373 <int key="NSKeyEquivModMask">1048840</int> 1.374 <int key="NSMnemonicLoc">2147483647</int> 1.375 <reference key="NSOnImage" ref="484312224"/> 1.376 - <reference key="NSMixedImage" ref="237504539"/> 1.377 + <reference key="NSMixedImage" ref="580230904"/> 1.378 <int key="NSTag">1</int> 1.379 </object> 1.380 <object class="NSMenuItem" id="778498721"> 1.381 @@ -489,7 +489,7 @@ 1.382 <int key="NSKeyEquivModMask">1048840</int> 1.383 <int key="NSMnemonicLoc">2147483647</int> 1.384 <reference key="NSOnImage" ref="484312224"/> 1.385 - <reference key="NSMixedImage" ref="237504539"/> 1.386 + <reference key="NSMixedImage" ref="580230904"/> 1.387 <int key="NSTag">4</int> 1.388 </object> 1.389 <object class="NSMenuItem" id="538211827"> 1.390 @@ -499,7 +499,7 @@ 1.391 <int key="NSKeyEquivModMask">1048840</int> 1.392 <int key="NSMnemonicLoc">2147483647</int> 1.393 <reference key="NSOnImage" ref="484312224"/> 1.394 - <reference key="NSMixedImage" ref="237504539"/> 1.395 + <reference key="NSMixedImage" ref="580230904"/> 1.396 <int key="NSTag">2</int> 1.397 </object> 1.398 <object class="NSMenuItem" id="739065818"> 1.399 @@ -509,7 +509,7 @@ 1.400 <int key="NSKeyEquivModMask">1048840</int> 1.401 <int key="NSMnemonicLoc">2147483647</int> 1.402 <reference key="NSOnImage" ref="484312224"/> 1.403 - <reference key="NSMixedImage" ref="237504539"/> 1.404 + <reference key="NSMixedImage" ref="580230904"/> 1.405 <int key="NSTag">3</int> 1.406 </object> 1.407 </object> 1.408 @@ -522,7 +522,7 @@ 1.409 <int key="NSKeyEquivModMask">1048576</int> 1.410 <int key="NSMnemonicLoc">2147483647</int> 1.411 <reference key="NSOnImage" ref="484312224"/> 1.412 - <reference key="NSMixedImage" ref="237504539"/> 1.413 + <reference key="NSMixedImage" ref="580230904"/> 1.414 <string key="NSAction">submenuAction:</string> 1.415 <object class="NSMenu" key="NSSubmenu" id="466310130"> 1.416 <string key="NSTitle">View</string> 1.417 @@ -535,7 +535,7 @@ 1.418 <int key="NSKeyEquivModMask">1048576</int> 1.419 <int key="NSMnemonicLoc">2147483647</int> 1.420 <reference key="NSOnImage" ref="484312224"/> 1.421 - <reference key="NSMixedImage" ref="237504539"/> 1.422 + <reference key="NSMixedImage" ref="580230904"/> 1.423 </object> 1.424 <object class="NSMenuItem" id="30531644"> 1.425 <reference key="NSMenu" ref="466310130"/> 1.426 @@ -546,7 +546,7 @@ 1.427 <int key="NSKeyEquivModMask">1048576</int> 1.428 <int key="NSMnemonicLoc">2147483647</int> 1.429 <reference key="NSOnImage" ref="484312224"/> 1.430 - <reference key="NSMixedImage" ref="237504539"/> 1.431 + <reference key="NSMixedImage" ref="580230904"/> 1.432 </object> 1.433 <object class="NSMenuItem" id="102151532"> 1.434 <reference key="NSMenu" ref="466310130"/> 1.435 @@ -555,7 +555,7 @@ 1.436 <int key="NSKeyEquivModMask">1572864</int> 1.437 <int key="NSMnemonicLoc">2147483647</int> 1.438 <reference key="NSOnImage" ref="484312224"/> 1.439 - <reference key="NSMixedImage" ref="237504539"/> 1.440 + <reference key="NSMixedImage" ref="580230904"/> 1.441 </object> 1.442 <object class="NSMenuItem" id="237841660"> 1.443 <reference key="NSMenu" ref="466310130"/> 1.444 @@ -564,7 +564,7 @@ 1.445 <int key="NSKeyEquivModMask">1048576</int> 1.446 <int key="NSMnemonicLoc">2147483647</int> 1.447 <reference key="NSOnImage" ref="484312224"/> 1.448 - <reference key="NSMixedImage" ref="237504539"/> 1.449 + <reference key="NSMixedImage" ref="580230904"/> 1.450 </object> 1.451 </object> 1.452 </object> 1.453 @@ -576,7 +576,7 @@ 1.454 <int key="NSKeyEquivModMask">1048576</int> 1.455 <int key="NSMnemonicLoc">2147483647</int> 1.456 <reference key="NSOnImage" ref="484312224"/> 1.457 - <reference key="NSMixedImage" ref="237504539"/> 1.458 + <reference key="NSMixedImage" ref="580230904"/> 1.459 <string key="NSAction">submenuAction:</string> 1.460 <object class="NSMenu" key="NSSubmenu" id="835318025"> 1.461 <string key="NSTitle">Window</string> 1.462 @@ -589,7 +589,7 @@ 1.463 <int key="NSKeyEquivModMask">1048576</int> 1.464 <int key="NSMnemonicLoc">2147483647</int> 1.465 <reference key="NSOnImage" ref="484312224"/> 1.466 - <reference key="NSMixedImage" ref="237504539"/> 1.467 + <reference key="NSMixedImage" ref="580230904"/> 1.468 </object> 1.469 <object class="NSMenuItem" id="575023229"> 1.470 <reference key="NSMenu" ref="835318025"/> 1.471 @@ -598,7 +598,7 @@ 1.472 <int key="NSKeyEquivModMask">1048576</int> 1.473 <int key="NSMnemonicLoc">2147483647</int> 1.474 <reference key="NSOnImage" ref="484312224"/> 1.475 - <reference key="NSMixedImage" ref="237504539"/> 1.476 + <reference key="NSMixedImage" ref="580230904"/> 1.477 </object> 1.478 <object class="NSMenuItem" id="299356726"> 1.479 <reference key="NSMenu" ref="835318025"/> 1.480 @@ -609,7 +609,7 @@ 1.481 <int key="NSKeyEquivModMask">1048576</int> 1.482 <int key="NSMnemonicLoc">2147483647</int> 1.483 <reference key="NSOnImage" ref="484312224"/> 1.484 - <reference key="NSMixedImage" ref="237504539"/> 1.485 + <reference key="NSMixedImage" ref="580230904"/> 1.486 </object> 1.487 <object class="NSMenuItem" id="625202149"> 1.488 <reference key="NSMenu" ref="835318025"/> 1.489 @@ -618,7 +618,7 @@ 1.490 <int key="NSKeyEquivModMask">1048576</int> 1.491 <int key="NSMnemonicLoc">2147483647</int> 1.492 <reference key="NSOnImage" ref="484312224"/> 1.493 - <reference key="NSMixedImage" ref="237504539"/> 1.494 + <reference key="NSMixedImage" ref="580230904"/> 1.495 </object> 1.496 </object> 1.497 <string key="NSName">_NSWindowsMenu</string> 1.498 @@ -631,7 +631,7 @@ 1.499 <int key="NSKeyEquivModMask">1048576</int> 1.500 <int key="NSMnemonicLoc">2147483647</int> 1.501 <reference key="NSOnImage" ref="484312224"/> 1.502 - <reference key="NSMixedImage" ref="237504539"/> 1.503 + <reference key="NSMixedImage" ref="580230904"/> 1.504 <string key="NSAction">submenuAction:</string> 1.505 <object class="NSMenu" key="NSSubmenu" id="374024848"> 1.506 <string key="NSTitle">Help</string> 1.507 @@ -664,13 +664,13 @@ 1.508 <bool key="NSViewIsLayerTreeHost">YES</bool> 1.509 <string key="NSClassName">DemoBoardView</string> 1.510 </object> 1.511 - <object class="NSSlider" id="817996208"> 1.512 + <object class="NSSlider" id="210596633"> 1.513 <reference key="NSNextResponder" ref="439893737"/> 1.514 <int key="NSvFlags">290</int> 1.515 <string key="NSFrame">{{162, 1}, {754, 25}}</string> 1.516 <reference key="NSSuperview" ref="439893737"/> 1.517 <bool key="NSEnabled">YES</bool> 1.518 - <object class="NSSliderCell" key="NSCell" id="42512652"> 1.519 + <object class="NSSliderCell" key="NSCell" id="359916377"> 1.520 <int key="NSCellFlags">-2080244224</int> 1.521 <int key="NSCellFlags2">0</int> 1.522 <string key="NSContents"/> 1.523 @@ -679,7 +679,7 @@ 1.524 <double key="NSSize">1.200000e+01</double> 1.525 <int key="NSfFlags">16</int> 1.526 </object> 1.527 - <reference key="NSControlView" ref="817996208"/> 1.528 + <reference key="NSControlView" ref="210596633"/> 1.529 <double key="NSMaxValue">1.000000e+00</double> 1.530 <double key="NSMinValue">0.000000e+00</double> 1.531 <double key="NSValue">0.000000e+00</double> 1.532 @@ -975,14 +975,6 @@ 1.533 </object> 1.534 <object class="IBConnectionRecord"> 1.535 <object class="IBOutletConnection" key="connection"> 1.536 - <string key="label">initialFirstResponder</string> 1.537 - <reference key="source" ref="972006081"/> 1.538 - <reference key="destination" ref="1060834180"/> 1.539 - </object> 1.540 - <int key="connectionID">399</int> 1.541 - </object> 1.542 - <object class="IBConnectionRecord"> 1.543 - <object class="IBOutletConnection" key="connection"> 1.544 <string key="label">delegate</string> 1.545 <reference key="source" ref="1021"/> 1.546 <reference key="destination" ref="1060834180"/> 1.547 @@ -993,10 +985,18 @@ 1.548 <object class="IBOutletConnection" key="connection"> 1.549 <string key="label">_turnSlider</string> 1.550 <reference key="source" ref="1060834180"/> 1.551 - <reference key="destination" ref="817996208"/> 1.552 + <reference key="destination" ref="210596633"/> 1.553 </object> 1.554 <int key="connectionID">403</int> 1.555 </object> 1.556 + <object class="IBConnectionRecord"> 1.557 + <object class="IBOutletConnection" key="connection"> 1.558 + <string key="label">initialFirstResponder</string> 1.559 + <reference key="source" ref="972006081"/> 1.560 + <reference key="destination" ref="1060834180"/> 1.561 + </object> 1.562 + <int key="connectionID">404</int> 1.563 + </object> 1.564 </object> 1.565 <object class="IBMutableOrderedSet" key="objectRecords"> 1.566 <object class="NSArray" key="orderedObjects"> 1.567 @@ -1454,7 +1454,7 @@ 1.568 <object class="NSMutableArray" key="children"> 1.569 <bool key="EncodedWithXMLCoder">YES</bool> 1.570 <reference ref="1060834180"/> 1.571 - <reference ref="817996208"/> 1.572 + <reference ref="210596633"/> 1.573 </object> 1.574 <reference key="parent" ref="972006081"/> 1.575 </object> 1.576 @@ -1528,17 +1528,17 @@ 1.577 </object> 1.578 <object class="IBObjectRecord"> 1.579 <int key="objectID">401</int> 1.580 - <reference key="object" ref="817996208"/> 1.581 + <reference key="object" ref="210596633"/> 1.582 <object class="NSMutableArray" key="children"> 1.583 <bool key="EncodedWithXMLCoder">YES</bool> 1.584 - <reference ref="42512652"/> 1.585 + <reference ref="359916377"/> 1.586 </object> 1.587 <reference key="parent" ref="439893737"/> 1.588 </object> 1.589 <object class="IBObjectRecord"> 1.590 <int key="objectID">402</int> 1.591 - <reference key="object" ref="42512652"/> 1.592 - <reference key="parent" ref="817996208"/> 1.593 + <reference key="object" ref="359916377"/> 1.594 + <reference key="parent" ref="210596633"/> 1.595 </object> 1.596 </object> 1.597 </object> 1.598 @@ -1877,7 +1877,7 @@ 1.599 </object> 1.600 </object> 1.601 <nil key="sourceID"/> 1.602 - <int key="maxID">403</int> 1.603 + <int key="maxID">404</int> 1.604 </object> 1.605 <object class="IBClassDescriber" key="IBDocument.Classes"> 1.606 <object class="NSMutableArray" key="referencedPartialClassDescriptions"> 1.607 @@ -1898,8 +1898,21 @@ 1.608 <string key="className">DemoBoardView</string> 1.609 <string key="superclassName">BoardView</string> 1.610 <object class="NSMutableDictionary" key="actions"> 1.611 - <string key="NS.key.0">startGameFromMenu:</string> 1.612 - <string key="NS.object.0">id</string> 1.613 + <bool key="EncodedWithXMLCoder">YES</bool> 1.614 + <object class="NSMutableArray" key="dict.sortedKeys"> 1.615 + <bool key="EncodedWithXMLCoder">YES</bool> 1.616 + <string>enterFullScreen:</string> 1.617 + <string>redo:</string> 1.618 + <string>startGameFromMenu:</string> 1.619 + <string>undo:</string> 1.620 + </object> 1.621 + <object class="NSMutableArray" key="dict.values"> 1.622 + <bool key="EncodedWithXMLCoder">YES</bool> 1.623 + <string>id</string> 1.624 + <string>id</string> 1.625 + <string>id</string> 1.626 + <string>id</string> 1.627 + </object> 1.628 </object> 1.629 <object class="NSMutableDictionary" key="outlets"> 1.630 <string key="NS.key.0">_turnSlider</string>
2.1 Binary file English.lproj/MainMenu.nib/keyedobjects.nib has changed
3.1 --- a/GeekGameBoard-iPhone.xcodeproj/project.pbxproj Sun Mar 16 15:06:47 2008 -0700 3.2 +++ b/GeekGameBoard-iPhone.xcodeproj/project.pbxproj Wed May 28 12:47:10 2008 -0700 3.3 @@ -408,14 +408,15 @@ 3.4 buildSettings = { 3.5 ALWAYS_SEARCH_USER_PATHS = NO; 3.6 ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 3.7 - "CODE_SIGN_IDENTITY[sdk=aspen*]" = "iPhone Developer"; 3.8 - GCC_C_LANGUAGE_STANDARD = c99; 3.9 + CODE_SIGN_IDENTITY = "Laurence ANDERSEN"; 3.10 + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Laurence ANDERSEN"; 3.11 + GCC_C_LANGUAGE_STANDARD = gnu99; 3.12 GCC_TREAT_WARNINGS_AS_ERRORS = YES; 3.13 GCC_WARN_ABOUT_RETURN_TYPE = YES; 3.14 GCC_WARN_UNUSED_VARIABLE = YES; 3.15 ONLY_ACTIVE_ARCH = YES; 3.16 PREBINDING = NO; 3.17 - SDKROOT = aspen1.2; 3.18 + SDKROOT = iphoneos2.0; 3.19 WARNING_CFLAGS = "-Wall"; 3.20 }; 3.21 name = Debug; 3.22 @@ -424,9 +425,12 @@ 3.23 isa = XCBuildConfiguration; 3.24 buildSettings = { 3.25 ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 3.26 + CODE_SIGN_IDENTITY = "Laurence ANDERSEN"; 3.27 + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Laurence ANDERSEN"; 3.28 + GCC_C_LANGUAGE_STANDARD = gnu99; 3.29 GCC_TREAT_WARNINGS_AS_ERRORS = YES; 3.30 PREBINDING = NO; 3.31 - SDKROOT = aspen1.2; 3.32 + SDKROOT = iphoneos2.0; 3.33 WARNING_CFLAGS = "-Wall"; 3.34 }; 3.35 name = Release;
4.1 --- a/GeekGameBoard.xcodeproj/project.pbxproj Sun Mar 16 15:06:47 2008 -0700 4.2 +++ b/GeekGameBoard.xcodeproj/project.pbxproj Wed May 28 12:47:10 2008 -0700 4.3 @@ -36,6 +36,7 @@ 4.4 27CCAABD0CB92A9F001CFE24 /* Card.m in Sources */ = {isa = PBXBuildFile; fileRef = 27CCAABC0CB92A9F001CFE24 /* Card.m */; }; 4.5 27CCABBF0CB9496B001CFE24 /* Bit.m in Sources */ = {isa = PBXBuildFile; fileRef = 27CCABBE0CB9496B001CFE24 /* Bit.m */; }; 4.6 27CCAC750CB95C2B001CFE24 /* PlayingCard.m in Sources */ = {isa = PBXBuildFile; fileRef = 27CCAC740CB95C2B001CFE24 /* PlayingCard.m */; }; 4.7 + 27D014C00D8DFB4500615ADD /* Game-Persistence.m in Sources */ = {isa = PBXBuildFile; fileRef = 27D014BF0D8DFB4500615ADD /* Game-Persistence.m */; }; 4.8 27D4F1260CCF011200923605 /* Stack.m in Sources */ = {isa = PBXBuildFile; fileRef = 27D4F1250CCF011200923605 /* Stack.m */; }; 4.9 27DFC4410CCD01B7005E34CE /* GoGame.m in Sources */ = {isa = PBXBuildFile; fileRef = 27DFC4400CCD01B7005E34CE /* GoGame.m */; }; 4.10 27F230B90CD1A61B006939C1 /* KlondikeGame.m in Sources */ = {isa = PBXBuildFile; fileRef = 27F230B80CD1A61B006939C1 /* KlondikeGame.m */; }; 4.11 @@ -99,6 +100,8 @@ 4.12 27CCABBE0CB9496B001CFE24 /* Bit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Bit.m; sourceTree = "<group>"; }; 4.13 27CCAC730CB95C2B001CFE24 /* PlayingCard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlayingCard.h; sourceTree = "<group>"; }; 4.14 27CCAC740CB95C2B001CFE24 /* PlayingCard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PlayingCard.m; sourceTree = "<group>"; }; 4.15 + 27D014BE0D8DFB4500615ADD /* Game-Persistence.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Game-Persistence.h"; sourceTree = "<group>"; }; 4.16 + 27D014BF0D8DFB4500615ADD /* Game-Persistence.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Game-Persistence.m"; sourceTree = "<group>"; }; 4.17 27D4F1240CCF011200923605 /* Stack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Stack.h; sourceTree = "<group>"; }; 4.18 27D4F1250CCF011200923605 /* Stack.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Stack.m; sourceTree = "<group>"; }; 4.19 27DFC43F0CCD01B7005E34CE /* GoGame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GoGame.h; sourceTree = "<group>"; }; 4.20 @@ -216,6 +219,8 @@ 4.21 children = ( 4.22 27275C490CC700F2009C4C6C /* Game.h */, 4.23 27275C4A0CC700F2009C4C6C /* Game.m */, 4.24 + 27D014BE0D8DFB4500615ADD /* Game-Persistence.h */, 4.25 + 27D014BF0D8DFB4500615ADD /* Game-Persistence.m */, 4.26 27275C900CC7C578009C4C6C /* TicTacToeGame.h */, 4.27 27275C910CC7C578009C4C6C /* TicTacToeGame.m */, 4.28 2734B4EE0CCA5BDB0070C008 /* CheckersGame.h */, 4.29 @@ -368,6 +373,7 @@ 4.30 27C999C30D81185E005AFD4F /* GGBUtils.m in Sources */, 4.31 279F4D870D8606C200B32DBF /* GGBLayer.m in Sources */, 4.32 279F4D880D8606C200B32DBF /* GGBTextLayer.m in Sources */, 4.33 + 27D014C00D8DFB4500615ADD /* Game-Persistence.m in Sources */, 4.34 ); 4.35 runOnlyForDeploymentPostprocessing = 0; 4.36 };
5.1 --- a/Source/Bit.m Sun Mar 16 15:06:47 2008 -0700 5.2 +++ b/Source/Bit.m Wed May 28 12:47:10 2008 -0700 5.3 @@ -107,7 +107,7 @@ 5.4 } 5.5 5.6 self.zPosition = z; 5.7 -#if !TARGET_OS_ASPEN 5.8 +#if !TARGET_OS_IPHONE 5.9 self.shadowOpacity = shadow; 5.10 self.shadowOffset = CGSizeMake(offset,-offset); 5.11 self.shadowRadius = radius;
6.1 --- a/Source/BoardUIView.m Sun Mar 16 15:06:47 2008 -0700 6.2 +++ b/Source/BoardUIView.m Wed May 28 12:47:10 2008 -0700 6.3 @@ -122,7 +122,7 @@ 6.4 UITouch *touch = touches.anyObject; 6.5 6.6 BOOL placing = NO; 6.7 - _dragStartPos = touch.locationInView; 6.8 + _dragStartPos = [touch locationInView: self]; 6.9 _dragBit = (Bit*) [self hitTestPoint: _dragStartPos 6.10 forLayerMatching: layerIsBit 6.11 offset: &_dragOffset]; 6.12 @@ -188,7 +188,7 @@ 6.13 6.14 if( _dragBit ) { 6.15 // Get the mouse position, and see if we've moved 3 pixels since the mouseDown: 6.16 - CGPoint pos = touch.locationInView; 6.17 + CGPoint pos = [touch locationInView: self]; 6.18 if( fabs(pos.x-_dragStartPos.x)>=3 || fabs(pos.y-_dragStartPos.y)>=3 ) 6.19 _dragMoved = YES; 6.20
7.1 --- a/Source/Card.m Sun Mar 16 15:06:47 2008 -0700 7.2 +++ b/Source/Card.m Wed May 28 12:47:10 2008 -0700 7.3 @@ -135,7 +135,7 @@ 7.4 GGBLayer *back = [[GGBLayer alloc] init]; 7.5 back.bounds = CGRectMake(0,0,size.width,size.height); 7.6 back.position = CGPointMake(sCardSize.width/2,sCardSize.height/2); 7.7 -#if TARGET_OS_ASPEN 7.8 +#if TARGET_OS_IPHONE 7.9 back.backgroundColor = CreateRGB(0.0,0.5,0.5, 1.0); 7.10 #else 7.11 back.contents = (id) GetCGImageNamed(@"/Library/Desktop Pictures/Classic Aqua Blue.jpg"); 7.12 @@ -148,7 +148,7 @@ 7.13 back.edgeAntialiasingMask = 0; 7.14 back.doubleSided = NO; // this makes the layer invisible when it's flipped 7.15 7.16 -#if TARGET_OS_ASPEN 7.17 +#if TARGET_OS_IPHONE 7.18 // On iPhone, only Hiragana Kaku includes the coveted snowman glyph... who knows why? 7.19 UIFont *font = [UIFont fontWithName: @"HiraKakuProN-W3" size: 1*size.width]; 7.20 #else 7.21 @@ -167,7 +167,7 @@ 7.22 #pragma mark DRAG-AND-DROP: 7.23 7.24 7.25 -#if ! TARGET_OS_ASPEN 7.26 +#if ! TARGET_OS_IPHONE 7.27 7.28 // An image from another app can be dragged onto a Card to change its background. */ 7.29
8.1 --- a/Source/DemoBoardView.h Sun Mar 16 15:06:47 2008 -0700 8.2 +++ b/Source/DemoBoardView.h Wed May 28 12:47:10 2008 -0700 8.3 @@ -31,6 +31,9 @@ 8.4 IBOutlet NSSlider *_turnSlider; 8.5 } 8.6 8.7 +- (IBAction) undo: (id)sender; 8.8 +- (IBAction) redo: (id)sender; 8.9 - (IBAction) startGameFromMenu: (id)sender; 8.10 +- (IBAction) enterFullScreen: (id)sender; 8.11 8.12 @end
9.1 --- a/Source/DemoBoardView.m Sun Mar 16 15:06:47 2008 -0700 9.2 +++ b/Source/DemoBoardView.m Wed May 28 12:47:10 2008 -0700 9.3 @@ -72,6 +72,10 @@ 9.4 } 9.5 9.6 9.7 +- (BOOL)canBecomeKeyView {return YES;} 9.8 +- (BOOL)acceptsFirstResponder {return YES;} 9.9 + 9.10 + 9.11 - (void) awakeFromNib 9.12 { 9.13 srandomdev(); 9.14 @@ -94,7 +98,7 @@ 9.15 } 9.16 9.17 9.18 -- (void) startGameFromMenu: (id)sender 9.19 +- (IBAction) startGameFromMenu: (id)sender 9.20 { 9.21 sCurrentGameName = kMenuGameNames[ [sender tag] ]; 9.22 [self startGameNamed: sCurrentGameName]; 9.23 @@ -127,6 +131,24 @@ 9.24 } 9.25 9.26 9.27 +- (IBAction) undo: (id)sender 9.28 +{ 9.29 + if( self.game.currentTurn > 0 ) 9.30 + self.game.currentTurn--; 9.31 + else 9.32 + NSBeep(); 9.33 +} 9.34 + 9.35 + 9.36 +- (IBAction) redo: (id)sender 9.37 +{ 9.38 + if( self.game.currentTurn < self.game.maxTurn ) 9.39 + self.game.currentTurn++; 9.40 + else 9.41 + NSBeep(); 9.42 +} 9.43 + 9.44 + 9.45 - (IBAction) enterFullScreen: (id)sender 9.46 { 9.47 [super enterFullScreen: sender];
10.1 --- a/Source/Dispenser.m Sun Mar 16 15:06:47 2008 -0700 10.2 +++ b/Source/Dispenser.m Wed May 28 12:47:10 2008 -0700 10.3 @@ -163,7 +163,7 @@ 10.4 #pragma mark DRAG-AND-DROP: 10.5 10.6 10.7 -#if ! TARGET_OS_ASPEN 10.8 +#if ! TARGET_OS_IPHONE 10.9 10.10 // An image from another app can be dragged onto a Dispenser to change the Piece's appearance. 10.11
11.1 --- a/Source/GGBLayer.h Sun Mar 16 15:06:47 2008 -0700 11.2 +++ b/Source/GGBLayer.h Wed May 28 12:47:10 2008 -0700 11.3 @@ -6,7 +6,8 @@ 11.4 // Copyright 2008 __MyCompanyName__. All rights reserved. 11.5 // 11.6 11.7 -#if TARGET_OS_ASPEN 11.8 + 11.9 +#if TARGET_OS_IPHONE 11.10 #import <QuartzCore/QuartzCore.h> 11.11 #else 11.12 #import <Quartz/Quartz.h> 11.13 @@ -17,7 +18,7 @@ 11.14 { 11.15 CABasicAnimation *_curAnimation; 11.16 11.17 -#if ! TARGET_OS_ASPEN 11.18 +#if ! TARGET_OS_IPHONE 11.19 } 11.20 #else 11.21 // For some reason, the CALayer class on iPhone OS doesn't have these!
12.1 --- a/Source/GGBLayer.m Sun Mar 16 15:06:47 2008 -0700 12.2 +++ b/Source/GGBLayer.m Wed May 28 12:47:10 2008 -0700 12.3 @@ -67,7 +67,7 @@ 12.4 } 12.5 12.6 12.7 -#if TARGET_OS_ASPEN 12.8 +#if TARGET_OS_IPHONE 12.9 12.10 #pragma mark - 12.11 #pragma mark IPHONE VERSION:
13.1 --- a/Source/GGBTextLayer.h Sun Mar 16 15:06:47 2008 -0700 13.2 +++ b/Source/GGBTextLayer.h Wed May 28 12:47:10 2008 -0700 13.3 @@ -9,7 +9,7 @@ 13.4 #import "GGBLayer.h" 13.5 13.6 13.7 -#if TARGET_OS_ASPEN 13.8 +#if TARGET_OS_IPHONE 13.9 @interface GGBTextLayer : GGBLayer 13.10 { 13.11 NSString *_string; 13.12 @@ -39,7 +39,7 @@ 13.13 @end 13.14 13.15 13.16 -#if TARGET_OS_ASPEN 13.17 +#if TARGET_OS_IPHONE 13.18 /* Bit definitions for `autoresizingMask' property. */ 13.19 13.20 enum CAAutoresizingMask
14.1 --- a/Source/GGBTextLayer.m Sun Mar 16 15:06:47 2008 -0700 14.2 +++ b/Source/GGBTextLayer.m Wed May 28 12:47:10 2008 -0700 14.3 @@ -18,7 +18,7 @@ 14.4 fontSize: (float) fontSize 14.5 alignment: (enum CAAutoresizingMask) align 14.6 { 14.7 -#if TARGET_OS_ASPEN 14.8 +#if TARGET_OS_IPHONE 14.9 UIFont *font = [UIFont systemFontOfSize: fontSize]; 14.10 #else 14.11 NSFont *font = [NSFont systemFontOfSize: fontSize]; 14.12 @@ -38,7 +38,7 @@ 14.13 GGBTextLayer *label = [[self alloc] init]; 14.14 label.string = text; 14.15 14.16 -#if TARGET_OS_ASPEN 14.17 +#if TARGET_OS_IPHONE 14.18 UIFont *font = inputFont; 14.19 [label setNeedsDisplay]; 14.20 label.needsDisplayOnBoundsChange = YES; 14.21 @@ -60,45 +60,53 @@ 14.22 align |= kCALayerWidthSizable; 14.23 label.alignmentMode = mode; 14.24 14.25 - CGFloat inset = 3; 14.26 + // Get the bounds of the interior of the superlayer: 14.27 + CGFloat inset = round(font.pointSize/8); 14.28 if( [superlayer respondsToSelector: @selector(borderWidth)] ) 14.29 inset += ((GGBLayer*)superlayer).borderWidth; 14.30 CGRect bounds = CGRectInset(superlayer.bounds, inset, inset); 14.31 - if( mode==@"center" ) 14.32 + if( mode==@"center" ) { 14.33 + // horizontal centering: ignore x inset: 14.34 bounds = CGRectInset(bounds,-inset,0); 14.35 - CGFloat height = font.ascender; 14.36 - float descender = font.descender; 14.37 -#if TARGET_OS_ASPEN 14.38 - descender = -descender; 14.39 + } 14.40 + 14.41 + // Compute y position of bottom of layer's frame. (Remember, descender is negative!) 14.42 + CGFloat y = bounds.origin.y; 14.43 + CGFloat descender=font.descender, height=font.ascender-descender; 14.44 + if( align & kCALayerHeightSizable ) { 14.45 + // Vertical centering: 14.46 + y += (bounds.size.height-height)/2.0; 14.47 +#if ! TARGET_OS_IPHONE 14.48 + y += descender/2.0; 14.49 #endif 14.50 - CGFloat y = bounds.origin.y; 14.51 - if( align & kCALayerHeightSizable ) { 14.52 - y += (bounds.size.height-height)/2.0; 14.53 -#if TARGET_OS_ASPEN 14.54 - y -= descender/2.0; 14.55 -#endif 14.56 - } else if( align & kCALayerMinYMargin ) 14.57 + align &= ~kCALayerHeightSizable; 14.58 + } else if( align & kCALayerMinYMargin ) { 14.59 + // Top alignment (Mac) or bottom (iPhone): 14.60 y += bounds.size.height - height; 14.61 - align &= ~kCALayerHeightSizable; 14.62 + } 14.63 + 14.64 + // Compute label's geometry: 14.65 label.bounds = CGRectMake(0, descender, 14.66 - bounds.size.width, height - descender); 14.67 - label.position = CGPointMake(bounds.origin.x,y+descender); 14.68 + bounds.size.width, height); 14.69 label.anchorPoint = CGPointMake(0,0); 14.70 + label.position = CGPointMake(bounds.origin.x,y); 14.71 14.72 -#if ! TARGET_OS_ASPEN 14.73 +#if ! TARGET_OS_IPHONE 14.74 label.autoresizingMask = align; 14.75 #endif 14.76 [superlayer addSublayer: label]; 14.77 [label release]; 14.78 14.79 - //label.borderWidth = 1; 14.80 - //label.borderColor = kBlackColor; 14.81 +#if 0 // for debugging layout, border the view 14.82 + label.borderWidth = 1; 14.83 + label.borderColor = kBlackColor; 14.84 +#endif 14.85 14.86 return label; 14.87 } 14.88 14.89 14.90 -#if TARGET_OS_ASPEN 14.91 +#if TARGET_OS_IPHONE 14.92 @synthesize string=_string, font=_font, 14.93 foregroundColor=_foregroundColor, alignmentMode=_alignmentMode; 14.94 14.95 @@ -134,7 +142,9 @@ 14.96 align = UITextAlignmentLeft; 14.97 14.98 CGRect bounds = self.bounds; 14.99 - bounds.origin.y += _font.ascender+_font.descender - _font.leading; 14.100 + //float ascender=_font.ascender, descender=_font.descender, leading=_font.leading; 14.101 + //bounds.size.height -= ascender-descender - leading; 14.102 + 14.103 [_string drawInRect: bounds 14.104 withFont: _font 14.105 lineBreakMode: UILineBreakModeClip
15.1 --- a/Source/GGBUtils.m Sun Mar 16 15:06:47 2008 -0700 15.2 +++ b/Source/GGBUtils.m Wed May 28 12:47:10 2008 -0700 15.3 @@ -20,7 +20,7 @@ 15.4 */ 15.5 #import "GGBUtils.h" 15.6 15.7 -#if TARGET_OS_ASPEN 15.8 +#if TARGET_OS_IPHONE 15.9 #import <AudioToolbox/AudioToolbox.h> 15.10 #endif 15.11 15.12 @@ -44,7 +44,7 @@ 15.13 15.14 void PreloadSound( NSString* name ) 15.15 { 15.16 -#if ! TARGET_OS_ASPEN 15.17 +#if ! TARGET_OS_IPHONE 15.18 NSSound *sound = [[NSSound soundNamed: @"Pop"] copy]; 15.19 sound.volume = 0; 15.20 [sound play]; 15.21 @@ -55,7 +55,7 @@ 15.22 15.23 void PlaySound( NSString* name ) 15.24 { 15.25 -#if TARGET_OS_ASPEN 15.26 +#if TARGET_OS_IPHONE 15.27 NSURL *url = [NSURL fileURLWithPath: [@"/Library/Sounds/" stringByAppendingPathComponent: name]]; 15.28 SystemSoundID soundID; 15.29 if( AudioServicesCreateSystemSoundID((CFURLRef)url,&soundID) != noErr ) { 15.30 @@ -70,8 +70,8 @@ 15.31 15.32 void Beep() 15.33 { 15.34 -#if TARGET_OS_ASPEN 15.35 - AudioServicesPlaySystemSound(kSystemSoundID_UserPreferredAlert); 15.36 +#if TARGET_OS_IPHONE 15.37 + AudioServicesPlayAlertSound(0x00001000/*kSystemSoundID_UserPreferredAlert*/); 15.38 #else 15.39 NSBeep(); 15.40 #endif
16.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 16.2 +++ b/Source/Game-Persistence.h Wed May 28 12:47:10 2008 -0700 16.3 @@ -0,0 +1,20 @@ 16.4 +// 16.5 +// Game-Persistence.h 16.6 +// GeekGameBoard 16.7 +// 16.8 +// Created by Jens Alfke on 3/16/08. 16.9 +// Copyright 2008 __MyCompanyName__. All rights reserved. 16.10 +// 16.11 + 16.12 +#import "Game.h" 16.13 + 16.14 + 16.15 +@interface Game (Persistence) <NSCoding> 16.16 + 16.17 ++ (Game*) gameWithURL: (NSURL*)url; 16.18 + 16.19 +- (NSURL*) asURL; 16.20 + 16.21 +- (BOOL) addMoveFromURL: (NSURL*)url; 16.22 + 16.23 +@end
17.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 17.2 +++ b/Source/Game-Persistence.m Wed May 28 12:47:10 2008 -0700 17.3 @@ -0,0 +1,115 @@ 17.4 +// 17.5 +// Game-Persistence.m 17.6 +// GeekGameBoard 17.7 +// 17.8 +// Created by Jens Alfke on 3/16/08. 17.9 +// Copyright 2008 __MyCompanyName__. All rights reserved. 17.10 +// 17.11 + 17.12 +#import "Game-Persistence.h" 17.13 + 17.14 + 17.15 +static NSDictionary* parseURLFields( NSURL* url ); 17.16 + 17.17 + 17.18 +@implementation Game (Persistence) 17.19 + 17.20 + 17.21 +static NSMutableDictionary *sPersistentGames; 17.22 + 17.23 + 17.24 +- (id) initWithCoder: (NSCoder*)decoder 17.25 +{ 17.26 + self = [self init]; 17.27 + if( self ) { 17.28 + _players = [[decoder decodeObjectForKey: @"players"] mutableCopy]; 17.29 + _states = [[decoder decodeObjectForKey: @"states"] mutableCopy]; 17.30 + _moves = [[decoder decodeObjectForKey: @"moves"] mutableCopy]; 17.31 + self.currentTurn = self.maxTurn; 17.32 + } 17.33 + return self; 17.34 +} 17.35 + 17.36 + 17.37 +- (void) encodeWithCoder: (NSCoder*)coder 17.38 +{ 17.39 + [coder encodeObject: _players forKey: @"players"]; 17.40 + [coder encodeObject: _states forKey: @"states"]; 17.41 + [coder encodeObject: _moves forKey: @"moves"]; 17.42 +} 17.43 + 17.44 + 17.45 +- (NSURL*) asURL 17.46 +{ 17.47 + return [NSURL URLWithString: 17.48 + [NSString stringWithFormat: @"game:type=%@&id=%@&turn=%u&move=%@", 17.49 + [[self class] identifier], _uniqueID, self.currentTurn,_moves.lastObject]]; 17.50 +} 17.51 + 17.52 + 17.53 ++ (Game*) gameWithURL: (NSURL*)url 17.54 +{ 17.55 + if( 0 != [@"game" caseInsensitiveCompare: url.scheme] ) 17.56 + return nil; 17.57 + NSDictionary *fields = parseURLFields(url); 17.58 + NSString *type = [fields objectForKey: @"type"]; 17.59 + NSString *uuid = [fields objectForKey: @"id"]; 17.60 + int turn = [[fields objectForKey: @"turn"] intValue]; 17.61 + if( !type || !uuid || turn<=0 ) 17.62 + return nil; 17.63 + 17.64 + Game *game = [sPersistentGames objectForKey: uuid]; 17.65 + if( game ) { 17.66 + if( ![type isEqualToString: [[game class] identifier]] ) 17.67 + return nil; 17.68 + } else if( turn == 1 ) { 17.69 + Class gameClass = NSClassFromString( [type stringByAppendingString: @"Game"] ); 17.70 + if( ! gameClass || ! [gameClass isSubclassOfClass: [Game class]] ) 17.71 + return nil; 17.72 + game = [[gameClass alloc] initWithUniqueID: uuid]; 17.73 + [game setNumberOfPlayers: 2]; 17.74 + if( ! sPersistentGames ) 17.75 + sPersistentGames = [[NSMutableDictionary alloc] init]; 17.76 + [sPersistentGames setObject: game forKey: uuid]; 17.77 + [game release]; 17.78 + } 17.79 + return game; 17.80 +} 17.81 + 17.82 + 17.83 +- (BOOL) addMoveFromURL: (NSURL*)url 17.84 +{ 17.85 + NSDictionary *fields = parseURLFields(url); 17.86 + NSString *uuid = [fields objectForKey: @"id"]; 17.87 + NSString *move = [fields objectForKey: @"move"]; 17.88 + int turn = [[fields objectForKey: @"turn"] intValue]; 17.89 + return [uuid isEqualToString: self.uniqueID] 17.90 + && turn==self.currentTurn 17.91 + && move.length > 0 17.92 + && [self applyMoveString: move]; 17.93 +} 17.94 + 17.95 + 17.96 + 17.97 +@end 17.98 + 17.99 + 17.100 + 17.101 +static NSDictionary* parseURLFields( NSURL* url ) 17.102 +{ 17.103 + // Parse the URL into key-value pairs: 17.104 + NSMutableDictionary *fields = [NSMutableDictionary dictionary]; 17.105 + for( NSString *field in [url.resourceSpecifier componentsSeparatedByString: @"&"] ) { 17.106 + NSRange e = [field rangeOfString: @"="]; 17.107 + NSString *key, *value; 17.108 + if( e.length>0 ) { 17.109 + key = [field substringToIndex: e.location]; 17.110 + value = [field substringFromIndex: NSMaxRange(e)]; 17.111 + } else { 17.112 + key= field; 17.113 + value = @""; 17.114 + } 17.115 + [fields setObject: value forKey: key]; 17.116 + } 17.117 + return fields; 17.118 +}
18.1 --- a/Source/Game.h Sun Mar 16 15:06:47 2008 -0700 18.2 +++ b/Source/Game.h Wed May 28 12:47:10 2008 -0700 18.3 @@ -27,6 +27,7 @@ 18.4 /** Abstract superclass. Keeps track of the rules and turns of a game. */ 18.5 @interface Game : NSObject 18.6 { 18.7 + NSString *_uniqueID; 18.8 GGBLayer *_board; 18.9 NSArray *_players; 18.10 Player *_currentPlayer, *_winner; 18.11 @@ -35,6 +36,10 @@ 18.12 unsigned _currentTurn; 18.13 } 18.14 18.15 +/** Returns the name used to identify this game in URLs. 18.16 + (By default it just returns the class name with the "Game" suffix removed.) */ 18.17 ++ (NSString*) identifier; 18.18 + 18.19 /** Returns the human-readable name of this game. 18.20 (By default it just returns the class name with the "Game" suffix removed.) */ 18.21 + (NSString*) displayName; 18.22 @@ -49,9 +54,17 @@ 18.23 @property unsigned currentTurn; 18.24 @property (readonly) BOOL isLatestTurn; 18.25 18.26 + 18.27 +/** A globally-unique string assigned to this game instance, to help networked players identify it. */ 18.28 +@property (readonly) NSString* uniqueID; 18.29 + 18.30 - (BOOL) animateMoveFrom: (BitHolder*)src to: (BitHolder*)dst; 18.31 18.32 18.33 +- (id) initWithUniqueID: (NSString*)uniqueID; 18.34 +- (id) init; 18.35 + 18.36 + 18.37 // Methods for subclasses to implement: 18.38 18.39 /** Designated initializer. After calling the superclass implementation, 18.40 @@ -87,8 +100,11 @@ 18.41 Default implementation returns nil. */ 18.42 - (Player*) checkForWinner; 18.43 18.44 +/** A string describing the current state of the game (the positions of all pieces, 18.45 + orderings of cards, player scores, ... */ 18.46 +@property (copy) NSString* stateString; 18.47 18.48 -@property (copy) NSString* stateString; 18.49 +/** Add a move to the game based on the contents of the string. */ 18.50 - (BOOL) applyMoveString: (NSString*)move; 18.51 18.52 18.53 @@ -111,7 +127,7 @@ 18.54 18.55 18.56 /** A mostly-passive object used to represent a player. */ 18.57 -@interface Player : NSObject 18.58 +@interface Player : NSObject <NSCoding> 18.59 { 18.60 Game *_game; 18.61 NSString *_name;
19.1 --- a/Source/Game.m Sun Mar 16 15:06:47 2008 -0700 19.2 +++ b/Source/Game.m Wed May 28 12:47:10 2008 -0700 19.3 @@ -35,7 +35,7 @@ 19.4 @implementation Game 19.5 19.6 19.7 -+ (NSString*) displayName 19.8 ++ (NSString*) identifier 19.9 { 19.10 NSString* name = [self description]; 19.11 if( [name hasSuffix: @"Game"] ) 19.12 @@ -44,17 +44,46 @@ 19.13 } 19.14 19.15 19.16 ++ (NSString*) displayName 19.17 +{ 19.18 + return [self identifier]; 19.19 +} 19.20 + 19.21 + 19.22 +- (id) initWithUniqueID: (NSString*)uuid 19.23 +{ 19.24 + NSParameterAssert(uuid); 19.25 + self = [super init]; 19.26 + if (self != nil) { 19.27 + _uniqueID = [uuid copy]; 19.28 + _board = [[GGBLayer alloc] init]; 19.29 + // Store a pointer to myself as the value of the "Game" property 19.30 + // of my root layer. (CALayers can have arbitrary KV properties stored into them.) 19.31 + // This is used by the -[CALayer game] category method defined below, to find the Game. 19.32 + [_board setValue: self forKey: @"Game"]; 19.33 + 19.34 + _currentMove = [[NSMutableString alloc] init]; 19.35 + } 19.36 + return self; 19.37 +} 19.38 + 19.39 +- (id) init 19.40 +{ 19.41 + CFUUIDRef uuidRef = CFUUIDCreate(NULL); 19.42 + NSString* uuid = (id) CFUUIDCreateString(NULL,uuidRef); 19.43 + self = [self initWithUniqueID: uuid]; 19.44 + CFRelease(uuid); 19.45 + CFRelease(uuidRef); 19.46 + return self; 19.47 +} 19.48 + 19.49 - (id) initWithBoard: (GGBLayer*)board 19.50 { 19.51 - self = [super init]; 19.52 + self = [self init]; 19.53 if (self != nil) { 19.54 _states = [[NSMutableArray alloc] init]; 19.55 _moves = [[NSMutableArray alloc] init]; 19.56 - _currentMove = [[NSMutableString alloc] init]; 19.57 _board = [board retain]; 19.58 - // Store a pointer to myself as the value of the "Game" property 19.59 - // of my root layer. (CALayers can have arbitrary KV properties stored into them.) 19.60 - // This is used by the -[CALayer game] category method defined below, to find the Game. 19.61 [board setValue: self forKey: @"Game"]; 19.62 } 19.63 return self; 19.64 @@ -73,7 +102,7 @@ 19.65 19.66 19.67 @synthesize players=_players, currentPlayer=_currentPlayer, winner=_winner, 19.68 - currentMove=_currentMove, states=_states, moves=_moves; 19.69 + currentMove=_currentMove, states=_states, moves=_moves, uniqueID=_uniqueID; 19.70 19.71 19.72 - (void) setNumberOfPlayers: (unsigned)n 19.73 @@ -129,9 +158,10 @@ 19.74 { 19.75 NSLog(@"--- End of turn (move was '%@')", _currentMove); 19.76 if( self.isLatestTurn ) { 19.77 + NSString *move = [[_currentMove copy] autorelease]; 19.78 + [_currentMove setString: @""]; 19.79 [self willChangeValueForKey: @"maxTurn"]; 19.80 - [_moves addObject: [[_currentMove copy] autorelease]]; 19.81 - [_currentMove setString: @""]; 19.82 + [_moves addObject: move]; 19.83 [self didChangeValueForKey: @"maxTurn"]; 19.84 } 19.85 19.86 @@ -145,6 +175,10 @@ 19.87 } 19.88 19.89 19.90 +#pragma mark - 19.91 +#pragma mark STORED TURNS: 19.92 + 19.93 + 19.94 - (unsigned) maxTurn 19.95 { 19.96 return _moves.count; 19.97 @@ -195,8 +229,13 @@ 19.98 [bit performSelector: @selector(setPickedUp:) withObject:nil afterDelay: 0.15]; 19.99 CGPoint endPosition = [dst convertPoint: GetCGRectCenter(dst.bounds) toLayer: bit.superlayer]; 19.100 [bit animateAndBlock: @"position" 19.101 +#if TARGET_OS_IPHONE 19.102 + from: [NSValue valueWithCGPoint: bit.position] 19.103 + to: [NSValue valueWithCGPoint: endPosition] 19.104 +#else 19.105 from: [NSValue valueWithPoint: NSPointFromCGPoint(bit.position)] 19.106 to: [NSValue valueWithPoint: NSPointFromCGPoint(endPosition)] 19.107 +#endif 19.108 duration: 0.25]; 19.109 dst.bit = bit; 19.110 dst.highlighted = NO; 19.111 @@ -273,6 +312,28 @@ 19.112 return self; 19.113 } 19.114 19.115 +- (id) initWithCoder: (NSCoder*)decoder 19.116 +{ 19.117 + self = [self init]; 19.118 + if( self ) { 19.119 + _game = [decoder decodeObjectForKey: @"game"]; 19.120 + _name = [[decoder decodeObjectForKey: @"name"] copy]; 19.121 + } 19.122 + return self; 19.123 +} 19.124 + 19.125 +- (void) encodeWithCoder: (NSCoder*)coder 19.126 +{ 19.127 + [coder encodeObject: _game forKey: @"game"]; 19.128 + [coder encodeObject: _name forKey: @"name"]; 19.129 +} 19.130 + 19.131 +- (void) dealloc 19.132 +{ 19.133 + [_name release]; 19.134 + [super dealloc]; 19.135 +} 19.136 + 19.137 19.138 @synthesize game=_game, name=_name; 19.139
20.1 --- a/Source/Grid.m Sun Mar 16 15:06:47 2008 -0700 20.2 +++ b/Source/Grid.m Wed May 28 12:47:10 2008 -0700 20.3 @@ -345,7 +345,7 @@ 20.4 #pragma mark DRAG-AND-DROP: 20.5 20.6 20.7 -#if ! TARGET_OS_ASPEN 20.8 +#if ! TARGET_OS_IPHONE 20.9 20.10 // An image from another app can be dragged onto a Dispenser to change the Piece's appearance. 20.11 20.12 @@ -451,7 +451,7 @@ 20.13 - (Square*) l {return self.fwdIsN ?self.w :self.e;} 20.14 20.15 20.16 -#if ! TARGET_OS_ASPEN 20.17 +#if ! TARGET_OS_IPHONE 20.18 20.19 - (BOOL)performDragOperation:(id <NSDraggingInfo>)sender 20.20 {
21.1 --- a/Source/PlayingCard.m Sun Mar 16 15:06:47 2008 -0700 21.2 +++ b/Source/PlayingCard.m Wed May 28 12:47:10 2008 -0700 21.3 @@ -45,7 +45,7 @@ 21.4 float cornerFontSize = MAX(18*scale, 14); 21.5 float centerFontSize = 80*scale; 21.6 21.7 -#if TARGET_OS_ASPEN 21.8 +#if TARGET_OS_IPHONE 21.9 UIFont *cornerFont = [UIFont boldSystemFontOfSize: cornerFontSize]; 21.10 #else 21.11 NSFont *cornerFont = [NSFont boldSystemFontOfSize: cornerFontSize]; 21.12 @@ -69,8 +69,6 @@ 21.13 fontSize: centerFontSize 21.14 alignment: kCALayerWidthSizable | kCALayerHeightSizable]; 21.15 label.foregroundColor = suitColor; 21.16 - //label.borderWidth = 1; 21.17 - //label.borderColor = kBlackColor; 21.18 21.19 return front; 21.20 }
22.1 --- a/Source/QuartzUtils.h Sun Mar 16 15:06:47 2008 -0700 22.2 +++ b/Source/QuartzUtils.h Wed May 28 12:47:10 2008 -0700 22.3 @@ -29,7 +29,7 @@ 22.4 kAlmostInvisibleWhiteColor, 22.5 kHighlightColor; 22.6 22.7 -#if TARGET_OS_ASPEN 22.8 +#if TARGET_OS_IPHONE 22.9 // These don't exist on iPhone, so I implement them: 22.10 CGColorRef CreateGray(CGFloat gray, CGFloat alpha); 22.11 CGColorRef CreateRGB(CGFloat red, CGFloat green, CGFloat blue, CGFloat alpha); 22.12 @@ -56,7 +56,7 @@ 22.13 CGImageRef GetCGImageNamed( NSString *name ); 22.14 CGColorRef GetCGPatternNamed( NSString *name ); 22.15 22.16 -#if ! TARGET_OS_ASPEN 22.17 +#if ! TARGET_OS_IPHONE 22.18 /** Loads image data from the pasteboard into a CGImage. */ 22.19 CGImageRef GetCGImageFromPasteboard( NSPasteboard *pb ); 22.20 #endif
23.1 --- a/Source/QuartzUtils.m Sun Mar 16 15:06:47 2008 -0700 23.2 +++ b/Source/QuartzUtils.m Wed May 28 12:47:10 2008 -0700 23.3 @@ -42,7 +42,7 @@ 23.4 } 23.5 23.6 23.7 -#if TARGET_OS_ASPEN 23.8 +#if TARGET_OS_IPHONE 23.9 CGColorRef CreateGray(CGFloat gray, CGFloat alpha) 23.10 { 23.11 CGColorSpaceRef graySpace = CGColorSpaceCreateDeviceGray(); 23.12 @@ -100,7 +100,7 @@ 23.13 23.14 CGImageRef CreateCGImageFromFile( NSString *path ) 23.15 { 23.16 -#if TARGET_OS_ASPEN 23.17 +#if TARGET_OS_IPHONE 23.18 UIImage *uiImage = [UIImage imageWithContentsOfFile: path]; 23.19 if(!uiImage) NSLog(@"Warning: UIImage imageWithContentsOfFile failed on file %@",path); 23.20 return CGImageRetain(uiImage.CGImage); 23.21 @@ -120,7 +120,7 @@ 23.22 23.23 CGImageRef GetCGImageNamed( NSString *name ) 23.24 { 23.25 -#if TARGET_OS_ASPEN 23.26 +#if TARGET_OS_IPHONE 23.27 name = name.lastPathComponent; 23.28 UIImage *uiImage = [UIImage imageNamed: name]; 23.29 NSCAssert1(uiImage,@"Couldn't find bundle image resource '%@'",name); 23.30 @@ -168,7 +168,7 @@ 23.31 } 23.32 23.33 23.34 -#if ! TARGET_OS_ASPEN 23.35 +#if ! TARGET_OS_IPHONE 23.36 CGImageRef GetCGImageFromPasteboard( NSPasteboard *pb ) 23.37 { 23.38 CGImageSourceRef src = NULL; 23.39 @@ -197,7 +197,7 @@ 23.40 23.41 float GetPixelAlpha( CGImageRef image, CGSize imageSize, CGPoint pt ) 23.42 { 23.43 -#if TARGET_OS_ASPEN 23.44 +#if TARGET_OS_IPHONE 23.45 // iPhone uses "flipped" (i.e. normal) coords, so images are wrong-way-up 23.46 pt.y = imageSize.height - pt.y; 23.47 #endif
24.1 --- a/Source/TicTacToeGame.m Sun Mar 16 15:06:47 2008 -0700 24.2 +++ b/Source/TicTacToeGame.m Wed May 28 12:47:10 2008 -0700 24.3 @@ -57,7 +57,7 @@ 24.4 for( int playerNumber=0; playerNumber<=1; playerNumber++ ) { 24.5 Piece *p = [self pieceForPlayer: playerNumber]; 24.6 CGFloat x = floor(CGRectGetMidX(_board.bounds)); 24.7 -#if TARGET_OS_ASPEN 24.8 +#if TARGET_OS_IPHONE 24.9 x = x - 80 + 160*playerNumber; 24.10 CGFloat y = 360; 24.11 #else
25.1 --- a/Source/iPhoneAppDelegate.h Sun Mar 16 15:06:47 2008 -0700 25.2 +++ b/Source/iPhoneAppDelegate.h Wed May 28 12:47:10 2008 -0700 25.3 @@ -10,7 +10,7 @@ 25.4 25.5 @class BoardUIView; 25.6 25.7 -@interface GGB_iPhoneAppDelegate : NSObject <UIModalViewDelegate> { 25.8 +@interface GGB_iPhoneAppDelegate : NSObject <UIAlertViewDelegate> { 25.9 UIWindow *_window; 25.10 BoardUIView *_contentView; 25.11 UILabel *_headline;
26.1 --- a/Source/iPhoneAppDelegate.m Sun Mar 16 15:06:47 2008 -0700 26.2 +++ b/Source/iPhoneAppDelegate.m Wed May 28 12:47:10 2008 -0700 26.3 @@ -44,7 +44,7 @@ 26.4 _headline.textAlignment = UITextAlignmentCenter; 26.5 _headline.font = [UIFont boldSystemFontOfSize: 20]; 26.6 _headline.minimumFontSize = 14; 26.7 - _headline.adjustsFontSizeToFit = YES; 26.8 + _headline.adjustsFontSizeToFitWidth = YES; 26.9 [_window addSubview: _headline]; 26.10 26.11 // Start game: 26.12 @@ -71,7 +71,7 @@ 26.13 [game removeObserver: self forKeyPath: @"winner"]; 26.14 26.15 if( gameClassName == nil ) 26.16 - gameClassName = [[game class] className]; 26.17 + gameClassName = [[game class] description]; 26.18 26.19 [_contentView startGameNamed: gameClassName]; 26.20 26.21 @@ -110,8 +110,8 @@ 26.22 alert = [[UIAlertView alloc] initWithTitle: msg 26.23 message: @"Congratulations!" 26.24 delegate:self 26.25 - defaultButton:@"OK" 26.26 - cancelButton:nil otherButtons:nil]; 26.27 + cancelButtonTitle:nil 26.28 + otherButtonTitles:nil]; 26.29 [alert show]; 26.30 [alert release]; 26.31 } 26.32 @@ -119,7 +119,7 @@ 26.33 } 26.34 26.35 26.36 -- (void)modalView:(UIModalView *)modalView didDismissWithButtonIndex:(NSInteger)buttonIndex; 26.37 +- (void)alertView:(UIAlertView *)modalView didDismissWithButtonIndex:(NSInteger)buttonIndex; 26.38 { 26.39 // Start new game: 26.40 [self startGameNamed: nil];