diff options
Diffstat (limited to 'crawl-ref/mac')
-rw-r--r-- | crawl-ref/mac/68K_Stub.r | 144 | ||||
-rw-r--r-- | crawl-ref/mac/Crawl.r | 303 | ||||
-rw-r--r-- | crawl-ref/mac/Crawl4.mcp | bin | 0 -> 211299 bytes | |||
-rw-r--r-- | crawl-ref/mac/Precomp (Common).h | 75 | ||||
-rw-r--r-- | crawl-ref/mac/Precomp (Mac-D).pch++ | 16 | ||||
-rw-r--r-- | crawl-ref/mac/Precomp (Mac-R).pch++ | 19 | ||||
-rw-r--r-- | crawl-ref/mac/Precomp (Posix-D).pch++ | 17 | ||||
-rw-r--r-- | crawl-ref/mac/Precomp (Posix-R).pch++ | 18 |
8 files changed, 592 insertions, 0 deletions
diff --git a/crawl-ref/mac/68K_Stub.r b/crawl-ref/mac/68K_Stub.r new file mode 100644 index 0000000000..391dda2ad6 --- /dev/null +++ b/crawl-ref/mac/68K_Stub.r @@ -0,0 +1,144 @@ +/* + * File: 68K_Stub.r + * Summary: Mac resources + * Written by: Jesse Jones + * + * Change History (most recent first): + * + * <1> 3/30/99 JDJ Created + */ + +#include <Types.r> + + +// ============================================================================ +// Resources +// These resources create a tiny 68K app that pops up an +// alert telling the user that the app will not run and +// exits when the user dismisses the alert. This +// file should only be added to PPC builds. +// ============================================================================ +resource 'ALRT' (30000) { + {84, 122, 174, 486}, + 30000, + { + OK, visible, silent, + OK, visible, silent, + OK, visible, silent, + OK, visible, silent + }, + alertPositionMainScreen +}; + +resource 'DITL' (30000) { + { + {60, 280, 80, 338}, + Button { + enabled, + "Quit" + }, + + {10, 60, 46, 360}, + StaticText { + disabled, + "This program requires a PowerPC processor and will" + "not run on your Macintosh." + } + } +}; + +data 'CODE' (1, "Sources", locked, protected, preload) { + $"0000 0001 9DCE 598F 2F3C 434F 4445 4267" /* ....'Y/<CODEBg */ + $"A9A0 2017 6700 011E 2040 2050 2E18 2C10" /* .g... @P..,. */ + $"A9A3 7000 204D 91C6 6002 10C0 B1CD 6DFA" /* p.M`..mT */ + $"41ED 0028 43F5 7800 6002 10C0 B1C9 6DFA" /* A.(Czx.`..SmT */ + $"598F 2F3C 4441 5441 4267 A9A0 2057 2008" /* Y/<DATABg W . */ + $"6700 00E2 2F0D 2050 4868 0004 4EBA 00DC" /* g..'/PHh..N?. */ + $"508F 43FA FF9C 2B49 FF12 224D 4EBA 0244" /* PCT+I."MN?.D */ + $"226D FF12 4EBA 023C A9A3 4EBA 02C2 422D" /* "m.N?.<N?.B- */ + $"FF17 303C A89F A746 2F08 303C A198 A346" /* .0<F/.0<F */ + $"B1DF 670A 1B7C 0001 FF17 7001 A198 303C" /* g..|...p.0< */ + $"A9F0 A746 2B48 FF0E 303C A9F1 A746 2B48" /* .F+H.0<F+H */ + $"FF0A 303C A9F4 A746 2B48 FF06 303C A9F0" /* .0<F+H.0<. */ + $"41FA 0284 A647 303C A9F1 41FA 0338 A647" /* AT.ѶG0<AT.8G */ + $"303C A9F4 41FA 003C A647 4EB9 0000 0492" /* 0<AT.<GN... */ + $"4EB9 0000 04B8 487A 004E 4A2D FFFF 6702" /* N...Hz.NJ-g. */ + $"4267 4267 4EB9 0000 04E4 5C8F 4A2D FFFF" /* BgBgN..."\J- */ + $"6702 548F 202D FF2C 6704 2040 4E90 4EBA" /* g.T -,g.@NN? */ + $"0384 2A78 0904 303C A9F4 206D FF06 A647" /* .*x.0<m.G */ + $"303C A9F0 206D FF0E A647 303C A9F1 206D" /* 0<.m.G0< m */ + $"FF0A A647 A9F4 0000 0000 48E7 1C30 594F" /* .G....H.0YO */ + $"266F 001C 7800 6000 00E4 1E9B 1F5B 0001" /* &o..x.`.."..[.. */ + $"1F5B 0002 1F5B 0003 246F 0020 D5D7 161B" /* .[...[..$o. '.. */ + $"4883 3003 0240 0080 670E 0243 007F 14DB" /* H0..@.g..C... */ + $"5343 4A43 6CF8 60E6 3003 0240 0040 670E" /* SCJCl`0..@.@g. */ + $"3003 0240 003F 5240 48C0 D5C0 60D0 3003" /* 0..@.?R@H'`-0. */ + $"0240 0020 670A 0243 001F 5243 1A1B 600E" /* .@.g..C..RC..`. */ + $"3003 0240 0010 6710 0243 000F 7AFF 14C5" /* 0..@..g..C..z.? */ + $"5343 4A43 6CF8 60A6 3003 0C40 0004 6264" /* SCJCl`0..@..bd */ + $"D040 303B 0006 4EFB 0002 0060 000A 001C" /* -@0;..Ns...`.... */ + $"002C 0042 588A 14FC FFFF 14FC FFFF 14DB" /* .,.BX... */ + $"14DB 6000 FF7A 588A 14FC FFFF 14DB 14DB" /* .`.zX... */ + $"14DB 6000 FF6A 14FC FFA9 14FC FFF0 548A" /* .`.j...T */ + $"14DB 14DB 528A 14DB 6000 FF54 14FC FFA9" /* ..R.`.T. */ + $"14FC FFF0 528A 14DB 14DB 14DB 528A 14DB" /* ..R...R. */ + $"6000 FF3C 3F3C 000F A9C9 5244 0C44 0003" /* `.<?<..SRD.D.. */ + $"6D00 FF18 204B 584F 4CDF 0C38 4E75 2F05" /* m..KXOL.8Nu/. */ + $"594F 226F 000C 1E99 1F59 0001 1F59 0002" /* YO"o....Y...Y.. */ + $"1F59 0003 2A17 7400 604C 1219 1001 0240" /* .Y..*.t.`L.....@ */ + $"0080 670C D201 1001 4880 48C0 D480 6028" /* .g."...HH'`( */ + $"1E81 1F59 0001 1001 0240 0040 670C 3017" /* ..Y.....@.@g.0. */ + $"E548 E240 48C0 D480 600E 1F59 0002 1F59" /* H'@H'`..Y...Y */ + $"0003 2417 E58A E282 206F 0010 202F 0014" /* ..$.'o.. /.. */ + $"D1B0 2800 5385 4A85 6EB0 2049 584F 2A1F" /* -f(.SJnfIXO*. */ + $"4E75 2F0A 2449 2F0D 2F0A 2F08 4EBA FF80" /* Nu/.$I//./.N? */ + $"2F2D FF12 2F0A 2F08 4EBA FF74 2F0A 2F0A" /* /-././.N?t/./. */ + $"2F08 4EBA FF6A 4FEF 0024 245F 4E75 2F0A" /* /.N?jO.$$_Nu/. */ + $"2449 2F0D 4497 2F0A 2F08 4EBA FF52 2F2D" /* $I/D/./.N?R/- */ + $"FF12 4497 2F0A 2F08 4EBA FF44 2F0A 4497" /* .D/./.N?D/.D */ + $"2F0A 2F08 4EBA FF38 4FEF 0024 245F 4E75" /* /./.N?8O.$$_Nu */ + $"BBFA 0028 6602 4E75 48E7 0084 2A7A 001C" /* T.(f.NuH.*z.. */ + $"206D FF0E 4A6F 000C 6604 206D FF0A 2F48" /* m.Jo..f.m./H */ + $"000A 4CDF 2100 544F 4E75 0000 0000 41FA" /* ..L!.TONu....AT */ + $"FFFA 208D 4E75 3F3C 0001 4EBA FFC4 544F" /* TNu?<..N?YTO */ + $"48E7 E0E0 55AF 0018 246F 0018 202D FF18" /* HU..$o.. -. */ + $"670A 2040 3F2A 0006 4E90 548F 50F8 0A5E" /* g.@?*..NTP.^ */ + $"598F 2F3C 434F 4445 3F2A 0006 A9A0 2017" /* Y/<CODE?*.. . */ + $"6616 202D FF24 6604 700F A9C9 2040 3F2A" /* f.-$f.p.S @?* */ + $"0006 4E90 548F 60DA 4A38 0BB2 6704 2040" /* ..NT`ZJ8.g. @ */ + $"A064 2057 A029 205F 2050 2008 A055 2040" /* d W) _ P.U @ */ + $"2F08 2248 D1E8 0008 4EBA FEF8 205F 224D" /* /."H-..N?o _"M */ + $"D3E8 0004 3028 0002 2208 600C 337C 4EF9" /* "..0(..".`.3|N~ */ + $"0000 D3A9 0002 5089 51C8 FFF2 4A2D FF17" /* .."..PQJ-. */ + $"6704 7001 A198 202D FF1C 670A 2040 3F2A" /* g.p.-.g. @?* */ + $"0006 4E90 548F 4CDF 0707 4A38 012D 6702" /* ..NTL..J8.-g. */ + $"A9FF 4E75 3F3C 0000 4EBA FF06 544F 2F0A" /* Nu?<..N?.TO/. */ + $"246F 0008 0C6A 4EF9 0000 6670 0C6A 0002" /* $o...jN~..fp.j.. */ + $"0006 6D68 598F 2F3C 434F 4445 3F2A 0006" /* ..mhY/<CODE?*.. */ + $"A9A0 2017 6604 588F 6052 2040 2050 2248" /* .f.X`R@ P"H */ + $"D1E8 0008 4EBA FE98 2057 2050 224D D3E8" /* -..N?o WP"M" */ + $"0004 3028 0002 2208 600C 337C A9F0 0000" /* ..0(..".`.3|... */ + $"93A9 0002 5089 51C8 FFF2 2057 A02A 205F" /* ..PQW* _ */ + $"A049 4A2D FF17 6704 7001 A198 202D FF20" /* IJ-.g.p. - */ + $"670A 2040 3F2A 0006 4E90 548F 245F 2E9F" /* g.@?*..NT$_. */ + $"4E75 4E75 2F0A 6014 2B52 FF28 3F3C FFFF" /* NuNu/.`.+R(?< */ + $"2F2A 0008 206A 0004 4E90 5C4F 246D FF28" /* /*.. j..N\O$m( */ + $"200A 66E4 245F 4E75 4E75 4E56 0000 486D" /* .f"$_NuNuNV..Hm */ + $"FFFA A86E A8FE A912 A930 A9CC 42A7 A97B" /* Tno.0Bߩ{ */ + $"A850 4E5E 4E75 8B49 6E69 7454 6F6F 6C62" /* PN^NuInitToolb */ + $"6F78 0000 4E56 0000 4EBA FFD0 554F 3F3C" /* ox..NV..N?-UO?< */ + $"7530 42A7 A986 301F 4E5E 4E75 846D 6169" /* u0Bߩ0.N^Numai */ + $"6E00 0000" /* n... */ +}; + +data 'CODE' (0, purgeable, protected) { + $"0000 0030 0000 0100 0000 0008 0000 0020" /* ...0........... */ + $"0000 3F3C 0001 A9F0" /* ..?<... */ +}; + +data 'DATA' (0, purgeable, protected) { + $"0000 0020 FFFF FFFF 4000 0000 0028 0000" /* ... @....(.. */ + $"0000 2800 0000 0000 0000 0000 0000 0000" /* ..(............. */ + $"0000 0000 0000 0003 406E 838A 0000 0000" /* ........@n.... */ +}; + diff --git a/crawl-ref/mac/Crawl.r b/crawl-ref/mac/Crawl.r new file mode 100644 index 0000000000..86fa65c8d6 --- /dev/null +++ b/crawl-ref/mac/Crawl.r @@ -0,0 +1,303 @@ +/* + * File: Crawl.r + * Summary: Mac resources + * Written by: Jesse Jones + * + * Change History (most recent first): + * + * <2> 5/25/02 JDJ Added some Carbon resources + * <1> 3/26/99 JDJ Created + */ + +#include <BalloonTypes.r> +#include <Types.r> + + +// ============================================================================ +// Carbon Resources +// ============================================================================ +data 'carb' (0) { +}; + +// $$$ is this only for bundled apps? +resource 'plst' (0) { + "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + "<!DOCTYPE plist SYSTEM\n\"file://localhost/System/Library/DTDs/PropertyList.dtd\">\n" + "<plist version=\"4.0\">\n" + "<dict>\n" + "<key>CFBundleInfoDictionaryVersion</key>\n" + "<string>4.0</string>\n" + "<key>CFBundleIdentifier</key>\n" + "<string>Crawl4</string>\n" + "<key>CFBundleVersion</key>\n" + "<string>4.0</string>\n" + "<key>CFBundleDevelopmentRegion</key>\n" + "<string>English</string>\n" + "<key>CFBundleName</key>\n" + "<string>Crawl</string>\n" + "<key>CFBundlePackageType</key>\n" + "<string>APPL</string>\n" + "<key>CFBundleSignature</key>\n" + "<string>????</string>\n" + "</dict>\n" + "</plist>" +}; + + +// ============================================================================ +// Finder Icon Help Message +// ============================================================================ +resource 'hfdr' (-5696, "Finder Help") { + HelpMgrVersion, + hmDefaultOptions, + 0, 0, + + { + HMStringItem { + "Crawl is a fun game in the grand tradition of games like Rogue, Hack and Moria." + }, + } +}; + + +// ============================================================================ +// Get Info String +// ============================================================================ +type 'Crwl' {pstring;}; + +data 'Crwl' (0, "Owner resource") { + "Crawl 3.3 1997 -1999 by Linley Henzell (Mac Port by Jesse Jones)" +}; + + +// ============================================================================ +// Derezed Resources +// ============================================================================ + +resource 'BNDL' (128) { + 'Crwl', + 0, + { + /* [1] */ + 'FREF', + { /* array IDArray: 2 elements */ + /* [1] */ + 0, 128, + /* [2] */ + 1, 129 + }, + /* [2] */ + 'ICN#', + { + /* [1] */ + 0, 0, + /* [2] */ + 1, 0 + } + } +}; + +resource 'FREF' (128) { + 'CrlF', + 0, + "" +}; + +resource 'FREF' (129) { + 'APPL', + 1, + "" +}; + +resource 'DITL' (129) { + { + /* [1] */ + {45, 353, 65, 411}, + Button { + enabled, + "OK" + }, + /* [2] */ + {19, 68, 90, 339}, + StaticText { + disabled, + "^0" + }, + /* [3] */ + {38, 21, 70, 53}, + Icon { + disabled, + 128 + } + } +}; + +resource 'DITL' (130) { + { + /* [1] */ + {81, 136, 101, 194}, + Button { + enabled, + "No" + }, + /* [2] */ + {81, 37, 101, 95}, + Button { + enabled, + "Yes" + }, + /* [3] */ + {24, 43, 56, 188}, + StaticText { + disabled, + "Do you really want to quit without savin" + "g?" + } + } +}; + +resource 'DITL' (256, "About", purgeable) { + { + /* [1] */ + {70, 220, 90, 280}, + Button { + enabled, + "OK" + }, + /* [2] */ + {10, 70, 64, 279}, + StaticText { + disabled, + "Crawl 3.3 \n 1997-1999 by Linley Henzell" + "\nMac Port by Jesse Jones" + }, + /* [3] */ + {10, 20, 42, 52}, + Icon { + disabled, + 1 + } + } +}; + +resource 'DITL' (131, purgeable) { + { + /* [1] */ + {71, 288, 91, 348}, + Button { + enabled, + "Save" + }, + /* [2] */ + {71, 215, 91, 275}, + Button { + enabled, + "Cancel" + }, + /* [3] */ + {71, 75, 91, 159}, + Button { + enabled, + "Don't Save" + }, + /* [4] */ + {10, 75, 58, 348}, + StaticText { + disabled, + "Do you want to save your game before qui" + "tting?" + } + } +}; + +data 'ALRT' (129) { +$"0028 0028 0096 01D7 0081 5555" /*.(.(...UU */ +}; + +data 'ALRT' (130) { + $"0090 009A 011B 0180 0082 5555" /* ......UU */ +}; + +resource 'ALRT' (256, "About", purgeable) { + {88, 85, 184, 378}, + 256, + { + /* [1] */ + OK, visible, silent, + /* [2] */ + OK, visible, silent, + /* [3] */ + OK, visible, silent, + /* [4] */ + OK, visible, silent + }, + alertPositionMainScreen +}; + +resource 'ALRT' (131, "Save Changes", purgeable) { + {104, 130, 205, 488}, + 131, + { + /* [1] */ + OK, visible, silent, + /* [2] */ + OK, visible, silent, + /* [3] */ + OK, visible, silent, + /* [4] */ + OK, visible, silent + }, + alertPositionParentWindowScreen +}; + +resource 'clut' (256) { + { + // [0] // DOS colors crayon colors + 0xFFFF, 0xFFFF, 0xFFFF, // white + + // [1] + 0x0000, 0x3333, 0xCCCC, // blue + + // [2] + 0x0000, 0x6666, 0x3333, // green pine + + // [3] + 0x6666, 0xCCCC, 0xCCCC, // cyan fog + + // [4] + 0xFFFF, 0x0000, 0x3333, // red + + // [5] + 0xCCCC, 0x6666, 0xCCCC, // magenta orchid + + // [6] + 0x9999, 0x6666, 0x3333, // brown dirt + + // [7] + 0x9999, 0x9999, 0x9999, // light grey granite + + // [8] + 0x3333, 0x3333, 0x3333, // drag grey gabbro + + // [9] + 0x6666, 0x9999, 0xFFFF, // light blue sky blue + + // [10] + 0x3333, 0x9999, 0x3333, // light green clover + + // [11] + 0x6666, 0xCCCC, 0x9999, // light cyan ocean green + + // [12] + 0xFFFF, 0x6666, 0x0000, // light red fire + + // [13] + 0xFFFF, 0x9999, 0x0000, // light magenta orange + + // [14] + 0xFFFF, 0xFFFF, 0x0000, // yellow lemon + + // [15] + 0x0000, 0x0000, 0x0000 // black + } +}; diff --git a/crawl-ref/mac/Crawl4.mcp b/crawl-ref/mac/Crawl4.mcp Binary files differnew file mode 100644 index 0000000000..d59edd3cd3 --- /dev/null +++ b/crawl-ref/mac/Crawl4.mcp diff --git a/crawl-ref/mac/Precomp (Common).h b/crawl-ref/mac/Precomp (Common).h new file mode 100644 index 0000000000..f4f9450d05 --- /dev/null +++ b/crawl-ref/mac/Precomp (Common).h @@ -0,0 +1,75 @@ +/* + * File: Precomp (Common).h + * Summary: The header included by the CodeWarrior precompiled header files. + * Written by: Jesse Jones + * + * Change History (most recent first): + * + * <1> 5/25/02 JDJ Created + */ + +// In order for precompiled headers to work on MSVC this header must be included +// before *anything* else. +#if _MSC_VER >= 1100 + #pragma message("Compiling Precomp (Common).h (this message should only appear once per project)") +#endif + +#ifndef PRECOMP_COMMON_H +#define PRECOMP_COMMON_H + + +// =================================================================================== +// Debug Macros +// =================================================================================== +#ifdef _DEBUG + #define DEBUG 1 + #define RELEASE 0 + + #if __MWERKS__ + #define MSIPL_DEBUG_MODE + #endif +#else + #define DEBUG 0 + + #if __profile__ + #define RELEASE 0 + #else + #define RELEASE 0 + #endif + + #if !defined(NDEBUG) + #define NDEBUG // used by <assert.h> + #endif +#endif + + +// =================================================================================== +// Misc Macros +// =================================================================================== +#if MAC + #define TARGET_API_MAC_CARBON 1 + #define __CF_USE_FRAMEWORK_INCLUDES__ +#endif + +#if MAC && !defined(macintosh) // macintosh isn't defined for MACH-O + #define macintosh 1 +#endif + +#include <mslconfig> + + +// =================================================================================== +// C++ Includes +// =================================================================================== +#include <algorithm> +#include <cstdio> +#include <iostream> +#include <limits> +#include <list> +#include <map> +#include <set> +#include <string> +#include <vector> + + +#endif // PRECOMP_COMMON_H
\ No newline at end of file diff --git a/crawl-ref/mac/Precomp (Mac-D).pch++ b/crawl-ref/mac/Precomp (Mac-D).pch++ new file mode 100644 index 0000000000..32d0b7a246 --- /dev/null +++ b/crawl-ref/mac/Precomp (Mac-D).pch++ @@ -0,0 +1,16 @@ +/* + * File: Precomp (Mac-D).pch++ + * Summary: Precompiled header for Mac debug builds. + * Written by: Jesse Jones + * + * Change History (most recent first): + * + * <1> 5/25/02 JDJ Created + */ + +#pragma precompile_target "Precomp (Mac-D)" + +#define MAC 1 +#define _DEBUG // this is how we know a build is a debug build on Windows so we'll use the same mechanism on the Mac + +#include "Precomp (Common).h" diff --git a/crawl-ref/mac/Precomp (Mac-R).pch++ b/crawl-ref/mac/Precomp (Mac-R).pch++ new file mode 100644 index 0000000000..e72da8198e --- /dev/null +++ b/crawl-ref/mac/Precomp (Mac-R).pch++ @@ -0,0 +1,19 @@ +/* + * File: Precomp (Mac-R).pch++ + * Summary: Precompiled header for Mac release builds. + * Written by: Jesse Jones + * + * Change History (most recent first): + * + * <1> 5/25/02 JDJ Created + */ + +#if __profile__ + #pragma precompile_target "Precomp (Mac-P)" +#else + #pragma precompile_target "Precomp (Mac-R)" +#endif + +#define MAC 1 + +#include "Precomp (Common).h" diff --git a/crawl-ref/mac/Precomp (Posix-D).pch++ b/crawl-ref/mac/Precomp (Posix-D).pch++ new file mode 100644 index 0000000000..313f4a33bc --- /dev/null +++ b/crawl-ref/mac/Precomp (Posix-D).pch++ @@ -0,0 +1,17 @@ +/* + * File: Precomp (Posix-D).pch++ + * Summary: Precompiled header for Posix debug builds. + * Written by: Jesse Jones + * + * Change History (most recent first): + * + * <1> 5/25/02 JDJ Created + */ + +#pragma precompile_target "Precomp (Posix-D)" + +#define UNIX 1 +#define BSD 1 +#define _DEBUG // this is how we know a build is a debug build on Windows so we'll use the same mechanism on the Mac + +#include "Precomp (Common).h" diff --git a/crawl-ref/mac/Precomp (Posix-R).pch++ b/crawl-ref/mac/Precomp (Posix-R).pch++ new file mode 100644 index 0000000000..f6d249a5f4 --- /dev/null +++ b/crawl-ref/mac/Precomp (Posix-R).pch++ @@ -0,0 +1,18 @@ +/* + * File: Precomp (Posix-R).pch++ + * Summary: Precompiled header for Posix release builds. + * Written by: Jesse Jones + * + * Copyright 2002 Jesse Jones. + * + * Change History (most recent first): + * + * <1> 5/25/02 JDJ Created + */ + +#pragma precompile_target "Precomp (Posix-R)" + +#define UNIX 1 +#define BSD 1 + +#include "Precomp (Common).h" |