Revision history Update #1 (11 January, 2003) - Use of #ifdef __APPLE__ interfared with Darwin + GCU/Xaw/Gtk/X11. - Removed *huge* graphics and sound resouces from the archive. Update #2 (12 January, 2003) - Moved tiles out of application's resource fork. They are ordinary PNG files, to be stored in application bundle's Resources subdirectory. - Killed all the compiler warnings but those involving redefinitions of uint and bool by h-type.h. Update #3 (16 January, 2003) - TileWidth/Height menus ceased to work, because some APIs started to return Unicode strings instead of ASCII. Update #4 (19 January, 2003) - Transparency effect code no longer requires masks of any sorts, but it assumes black pixels in monster/object tiles should be transparent. - Regression test on CodeWarrior (to see if main-crb.c still can be used to produce functional PEF Carbon code). Update #5 (20 January, 2003) - Rewrote sound effect player, because it unlocked and freed sound data immediated after they are started playing, while Apple documentation clearly states they should remain locked until they finish playing. In fact, I saw the game crashing with sound effects on more than a couple of times. - The game now frees memory allocated by graphics and sound code upon exiting. Update #6 (29 January, 2003) - Compiled Angband 3.0.3. - Reorganised the archive so that it can be untar'ed properly at the angband's root directory. - Fixed a couple of remaining (rare, but possible) memory leaks in main-crb.c. - (patch) Cleaned up file creator/type code and fixed bogus file type assignment bug in util.c. Code bollowed from Hengband. Update #7 (29 January, 2003) - There was a chance of buffer overflows (one byte off) in the my_fgets replacement --- Carbon port of Angband 3.0.3 for OS X gcc + Makefile Please unpack the tarball at Angband's root directory (where you see readme.txt, changes.txt etc.). It contains the following files: README.pelpel - this file patch.diff - source code patch, please type "patch -p1 < patch.diff" src/ Makefile.osx - a quick and dirty Makefile Angband.r - menu and dialogue definitions (like angband.rc for Win) Angband.xml - Info.plist for the Angband application main-crb.c - A Carbonised main-mac.c of mine Angband.icns - traditional Mac Angband icons screen-captured (binary) Data.icns - " Edit.icns - " Save.icns - " Menus and dialogues are still kept in the resource fork, so the resulting application cannot be safely copied by standard Un*x utilities, nor you can make a tarball to distribute it. Please use dual-fork aware utilities like StuffIt. The graphics tiles have been moved out of the resource fork and made plain PNG files, but, it isn't generally safe just to convert GIF or BMP files to PNG, because the Mac OS takes dpi values stored in various images quite seriously. Almost all tilesets for *band requires adjustment, with the sole exception of 8x8.bmp for Vanilla. Make sure setting dpi to 72, *not* preserving the actual size of image (e.g. if a source image is in 96 dpi, the actual size should grow by 96/72 = 1.3333..., both horizontally and vertically after setting its resolution to 72 dpi). When you have them ready, put them in the src directory and "make install-tiles". Their names are: 8x8.png, 16x16.png, and 32x32.png. The mask.bmp is *not* necessary for the transparency effect to work, but it might have problems handling true colour images. To be on the safe side, please set bpp to 8 (256 colour) when you convert the tiles. This also helps to make graphics modes much faster. To use 32x32 tiles, please edit graf-mac.prf to include these lines at the end: ----8<------8<------8<------8<------8<------8<-- # David Gervais tiles ?:[EQU $GRAF david] %:graf-dvg.prf ?:1 ----8<------8<------8<------8<------8<------8<-- If you miss sound effects, download any of my *band compiles for the Mac from clockwork, unstuff it, then run this command against it $ DeRez -only 'snd ' "name of the application" > Sound.r (DeRez is found in /Developer/Tools, as well as Rez) Then, copy Sound.r to your src directory, edit RESSRCS in Makefile.osx so that it looks like: RESSRCS = Angband.r Sound.r Alternatively, you can use .wav files if you #define USE_QT_SOUND (although some of them, especially, "kill", has very bad taste IMHO...). They must be installed into the Resources subdirectory of the bundle, with name part matching angband_sound_name entries exactly. With this option off (default), the game will use resource fork based 'snd ' to play sound effects from. Because I changed the internal code generated by the numpad keys, so that macroes can distinguish them from usual number keys (those above the qwerty/azerty/qwertz or whatever you are familiar with), you have to put these lines in your pref-mac.prf if you intend to compile *band with my main-mac/crb.c: ----8<------8<------8<------8<------8<------8<-- # # Keypad -- (/,*,7,8,9,-,4,5,6,+,1,2,3,0,.) # A:/ P:^_K/\r A:* P:^_K*\r A:7 P:^_K7\r A:8 P:^_K8\r A:9 P:^_K9\r A:- P:^_K-\r A:4 P:^_K4\r A:5 P:^_K5\r A:6 P:^_K6\r A:+ P:^_K+\r A:1 P:^_K1\r A:2 P:^_K2\r A:3 P:^_K3\r A:0 P:^_K0\r A:. P:^_K.\r ----8<------8<------8<------8<------8<------8<-- // pelpel (pelpel@zak.att.ne.jp)