#include "angband.h"
#include <Types.h>
#include <Gestalt.h>
#include <QuickDraw.h>
#include <Files.h>
#include <Fonts.h>
#include <Menus.h>
#include <Dialogs.h>
#include <Windows.h>
#include <Palettes.h>
#include <StandardFile.h>
#include <DiskInit.h>
#include <ToolUtils.h>
#include <Devices.h>
#include <Events.h>
#include <Resources.h>
#include <Controls.h>
#include <SegLoad.h>
#include <Memory.h>
#include <QDOffscreen.h>
#include <Sound.h>
#include <AppleEvents.h>
#include <EPPC.h>
#include <Folders.h>
データ構造 | |
struct | term_data |
struct | FrameRec |
マクロ定義 | |
#define | PREF_FILE_NAME _("Hengband Preferences", "Hengband-E Preferences") |
#define | ANGBAND_CREATOR 'Heng' |
#define | MAX_TERM_DATA 8 |
#define | USE_SFL_CODE |
#define | USE_ASYNC_SOUND |
#define | GRAF_MODE_NONE 0 |
#define | GRAF_MODE_8X8 1 |
#define | GRAF_MODE_16X16 2 |
#define | GRAF_MODE_32X32 3 |
#define | MAX_CHANNELS 4 |
#define | SOUND_VOLUME_MIN 0 /* Default minimum sound volume */ |
#define | SOUND_VOLUME_MAX 255 /* Default maximum sound volume */ |
#define | VOLUME_MIN 0 /* Minimum sound volume in % */ |
#define | VOLUME_MAX 100 /* Maximum sound volume in % */ |
#define | VOLUME_INC 5 /* Increment sound volume in % */ |
#define | SND_NON 0 |
#define | SND_ATTACK 1 |
#define | SND_MOVE 2 |
#define | SND_TRAP 3 |
#define | SND_SHOP 4 |
#define | SND_ME 5 |
#define | SND_CMD_ERROR 6 |
#define | MENU_APPLE 128 |
#define | ITEM_ABOUT 1 |
#define | MENU_FILE 129 |
#define | ITEM_NEW 1 |
#define | ITEM_OPEN 2 |
#define | ITEM_IMPORT 3 |
#define | ITEM_CLOSE 4 |
#define | ITEM_SAVE 5 |
#define | ITEM_QUIT 7 |
#define | MENU_EDIT 130 |
#define | ITEM_UNDO 1 |
#define | ITEM_CUT 3 |
#define | ITEM_COPY 4 |
#define | ITEM_PASTE 5 |
#define | ITEM_CLEAR 6 |
#define | MENU_FONT 131 |
#define | ITEM_BOLD 1 |
#define | ITEM_WIDE 2 |
#define | MENU_SIZE 132 |
#define | MENU_WINDOWS 133 |
#define | MENU_SPECIAL 134 |
#define | ITEM_SOUND 1 |
#define | ITEM_GRAPH 2 |
#define | ITEM_TILEWIDTH 3 |
#define | ITEM_TILEHEIGHT 4 |
#define | ITEM_FIDDLE 6 |
#define | ITEM_WIZARD 7 |
#define | SUBMENU_SOUND 143 |
#define | ITEM_USE_SOUND 1 |
#define | ITEM_SOUND_SETTING 2 |
#define | SUBMENU_GRAPH 144 |
#define | ITEM_NONE 1 |
#define | ITEM_8X8 2 |
#define | ITEM_16X16 3 |
#define | ITEM_BIGTILE 5 |
#define | SUBMENU_TILEWIDTH 145 |
#define | SUBMENU_TILEHEIGHT 146 |
#define | EVENT_TICKS 6 |
型定義 | |
typedef struct term_data | term_data |
typedef struct FrameRec | FrameRec |
関数 | |
static bool | CheckEvents (bool wait) |
static void | refnum_to_name (char *buf, long refnum, short vrefnum, char *fname) |
static void | local_to_global (Rect *r) |
static void | global_to_local (Rect *r) |
static void | center_rect (Rect *r, Rect *s) |
static void | ptocstr (StringPtr src) |
static void | pstrcat (StringPtr dst, StringPtr src) |
static void | pstrinsert (StringPtr dst, StringPtr src) |
static void | PathNameFromDirID (long dirID, short vRefNum, StringPtr fullPathName) |
static void | activate (WindowPtr w) |
static void | mac_warning (cptr warning) |
static void | term_data_color (term_data *td, int a) |
static void | term_data_check_font (term_data *td) |
static void | term_data_check_size (term_data *td) |
static void | term_data_resize (term_data *td) |
static void | term_data_redraw (term_data *td) |
static void | BenSWLockFrame (FrameRec *srcFrameP) |
static void | BenSWUnlockFrame (FrameRec *srcFrameP) |
static OSErr | BenSWCreateGWorldFromPict (GWorldPtr *pictGWorld, PicHandle pictH) |
static errr | globe_init (void) |
static errr | globe_nuke (void) |
static SndListHandle | find_sound (int num) |
static void | cleanup_sound (void) |
static void | play_sound (int num, SInt16 vol) |
static void | Term_init_mac (term *t) |
static void | Term_nuke_mac (term *t) |
static errr | Term_user_mac (int n) |
static errr | Term_xtra_mac_react (void) |
static errr | Term_xtra_mac (int n, int v) |
static errr | Term_curs_mac (int x, int y) |
static errr | Term_bigcurs_mac (int x, int y) |
static errr | Term_wipe_mac (int x, int y, int n) |
static errr | Term_text_mac (int x, int y, int n, byte a, const char *cp) |
static errr | Term_pict_mac (int x, int y, int n, const byte *ap, const char *cp, const byte *tap, const char *tcp) |
static void | term_data_link (int i) |
static void | SetupAppDir (void) |
static int | getshort (void) |
static void | putshort (int x) |
static void | save_prefs (void) |
static void | load_prefs (void) |
static void | term_data_hack (term_data *td) |
static void | init_windows (void) |
static void | init_sound (void) |
static void | init_graf (void) |
short | InevrtCheck (DialogPtr targetDlg, short check) |
short | SetCheck (DialogPtr targetDlg, short check, long result) |
short | GetCheck (DialogPtr targetDlg, short check) |
void | SoundConfigDLog (void) |
static void | save_pref_file (void) |
static void | do_menu_file_new (void) |
static void | do_menu_file_open (bool all) |
static void | handle_open_when_ready (void) |
static void | init_menubar (void) |
static void | setup_menus (void) |
static void | menu (long mc) |
static OSErr | CheckRequiredAEParams (const AppleEvent *theAppleEvent) |
static pascal OSErr | AEH_Start (const AppleEvent *theAppleEvent, AppleEvent *reply, long handlerRefCon) |
static pascal OSErr | AEH_Quit (const AppleEvent *theAppleEvent, AppleEvent *reply, long handlerRefCon) |
static pascal OSErr | AEH_Print (const AppleEvent *theAppleEvent, AppleEvent *reply, long handlerRefCon) |
static pascal OSErr | AEH_Open (const AppleEvent *theAppleEvent, AppleEvent *reply, long handlerRefCon) |
static vptr | hook_rnfree (vptr v, huge size) |
static vptr | hook_ralloc (huge size) |
static vptr | hook_rpanic (huge size) |
static void | hook_plog (cptr str) |
static void | hook_quit (cptr str) |
static void | hook_core (cptr str) |
static void | init_stuff (void) |
int | main (void) |
変数 | |
static short | app_vol |
static long | app_dir |
Boolean | open_when_ready = FALSE |
Boolean | quit_when_ready = FALSE |
static int | game_in_progress = 0 |
static WindowPtr | active = NULL |
static term_data | data [MAX_TERM_DATA] |
static bool | initialized = FALSE |
static long | mac_os_version |
AEEventHandlerUPP | AEH_Start_UPP |
AEEventHandlerUPP | AEH_Quit_UPP |
AEEventHandlerUPP | AEH_Print_UPP |
AEEventHandlerUPP | AEH_Open_UPP |
static int | pictID = 0 |
static int | grafWidth = 0 |
static int | grafHeight = 0 |
static int | pictCols = 0 |
static int | pictRows = 0 |
static int | graf_mode = GRAF_MODE_NONE |
static int | graf_mode_req = GRAF_MODE_NONE |
static FrameRec * | frameP = NULL |
static SndChannelPtr | channels [MAX_CHANNELS] |
static Boolean | channel_initialised = FALSE |
static SndListHandle | samples [SOUND_MAX] |
static SInt16 | sample_refs [SOUND_MAX] |
static SInt16 | sound_volume = SOUND_VOLUME_MAX |
static short | soundmode [8] |
static int | soundchoice [] |
static int | ext_sound = 0 |
static int | ext_graf = 0 |
static FILE * | fff |
static vptr | lifeboat = NULL |
#define ANGBAND_CREATOR 'Heng' |
#define EVENT_TICKS 6 |
#define GRAF_MODE_16X16 2 |
#define GRAF_MODE_32X32 3 |
#define GRAF_MODE_8X8 1 |
#define GRAF_MODE_NONE 0 |
#define ITEM_16X16 3 |
#define ITEM_8X8 2 |
#define ITEM_ABOUT 1 |
#define ITEM_BIGTILE 5 |
#define ITEM_BOLD 1 |
#define ITEM_CLEAR 6 |
#define ITEM_CLOSE 4 |
#define ITEM_COPY 4 |
#define ITEM_CUT 3 |
#define ITEM_FIDDLE 6 |
#define ITEM_GRAPH 2 |
#define ITEM_IMPORT 3 |
#define ITEM_NEW 1 |
#define ITEM_NONE 1 |
#define ITEM_OPEN 2 |
#define ITEM_PASTE 5 |
#define ITEM_QUIT 7 |
#define ITEM_SAVE 5 |
#define ITEM_SOUND 1 |
#define ITEM_SOUND_SETTING 2 |
#define ITEM_TILEHEIGHT 4 |
#define ITEM_TILEWIDTH 3 |
#define ITEM_UNDO 1 |
#define ITEM_USE_SOUND 1 |
#define ITEM_WIDE 2 |
#define ITEM_WIZARD 7 |
#define MAX_CHANNELS 4 |
#define MAX_TERM_DATA 8 |
#define MENU_APPLE 128 |
#define MENU_EDIT 130 |
#define MENU_FILE 129 |
#define MENU_FONT 131 |
#define MENU_SIZE 132 |
#define MENU_SPECIAL 134 |
#define MENU_WINDOWS 133 |
#define PREF_FILE_NAME _("Hengband Preferences", "Hengband-E Preferences") |
#define SND_ATTACK 1 |
#define SND_CMD_ERROR 6 |
#define SND_ME 5 |
#define SND_MOVE 2 |
#define SND_NON 0 |
#define SND_SHOP 4 |
#define SND_TRAP 3 |
#define SOUND_VOLUME_MAX 255 /* Default maximum sound volume */ |
#define SOUND_VOLUME_MIN 0 /* Default minimum sound volume */ |
#define SUBMENU_GRAPH 144 |
#define SUBMENU_SOUND 143 |
#define SUBMENU_TILEHEIGHT 146 |
#define SUBMENU_TILEWIDTH 145 |
#define USE_ASYNC_SOUND |
#define USE_SFL_CODE |
#define VOLUME_INC 5 /* Increment sound volume in % */ |
#define VOLUME_MAX 100 /* Maximum sound volume in % */ |
#define VOLUME_MIN 0 /* Minimum sound volume in % */ |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
short GetCheck | ( | DialogPtr | targetDlg, |
short | check | ||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
short InevrtCheck | ( | DialogPtr | targetDlg, |
short | check | ||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
int main | ( | void | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
short SetCheck | ( | DialogPtr | targetDlg, |
short | check, | ||
long | result | ||
) |
|
static |
|
static |
void SoundConfigDLog | ( | void | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
AEEventHandlerUPP AEH_Open_UPP |
AEEventHandlerUPP AEH_Print_UPP |
AEEventHandlerUPP AEH_Quit_UPP |
AEEventHandlerUPP AEH_Start_UPP |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Boolean open_when_ready = FALSE |
|
static |
|
static |
|
static |
Boolean quit_when_ready = FALSE |
|
static |
|
static |
|
static |
|
static |
|
static |