1 /*
2  * nact.h  NACT SYSTEM
3  *
4  * Copyright (C) 1997-1998 Masaki Chikama (Wren) <chikama@kasumi.ipl.mech.nagoya-u.ac.jp>
5  *               1998-                           <masaki-c@is.aist-nara.ac.jp>
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20  *
21 */
22 /* $Id: nact.h,v 1.25 2003/11/09 15:06:13 chikama Exp $ */
23 
24 #ifndef __NACT_H__
25 #define __NACT_H__
26 
27 #include "portab.h"
28 #include "graphics.h"
29 #include "scenario.h"
30 #include "font.h"
31 #include "s39ain.h"
32 #include "selection.h"
33 #include "message.h"
34 #include "ags.h"
35 
36 /* ���ޥ�ɲ��ϻ��˻��Ȥ��� */
37 #define sys_getc            sl_getc
38 #define sys_getw            sl_getw
39 #define sys_getdw           sl_getdw
40 #define sys_getaddress      sl_getadr
41 #define sys_getCaliValue    getCaliValue
42 #define sys_getCaliVariable getCaliVariable
43 extern int getCaliValue();
44 extern int *getCaliVariable();
45 extern int *getVariable();
46 extern char *sys_getString(char term);
47 extern char *sys_getConvString(char term);
48 extern void sys_addMsg(char *str);
49 extern void sys_setHankakuMode(int mode);
50 extern char *sys_getConstString();
51 
52 // extern boolean sys_nact_engine();
53 extern void nact_main();
54 extern void nact_init();
55 
56 typedef struct {
57 	/* general */
58 	boolean   is_quit;             /* quit command */
59 	void     (*callback)(void);    /* main �� callback */
60 	boolean   is_va_animation;     /* VA command working */
61 	boolean   is_cursor_animation; /* animation cursor working */
62 	boolean   is_message_locked;   /* pointer ���� event handler ��ƤӽФ��ʤ� */
63 	boolean   popupmenu_opened;    /* popup menu �� �����Ƥ��뤫 */
64 	boolean   mmx_is_ok;           /* MMX ��ͭ�����ɤ��� */
65 
66 	char      *tmpdir;
67 	char       game_title_name[31];
68 	int        scenario_version;
69 
70 
71 	/* variables */
72 	void *datatbl_addr; /* �ǡ����ơ��֥�Υ��ɥ쥹 */
73 	int fnc_return_value; /* �ؿ�������ͤȤ����֤��� (~0,cali:���Ϥ���) */
74 
75 #if 1
76 	/* ags info */
77 	Pallet256  *sys_pal;
78 	boolean     sys_pal_changed;
79 	MyRectangle sys_view_area;
80 	MyDimension sys_world_size;
81 	int         sys_world_depth;
82 	int         sys_mouse_movesw; /* 0:IZ��̵��, 1: ľ�ܻ������, 2: ���ࡼ���˻������ */
83 	boolean     sys_fullscreen_capable;
84 	boolean     sys_fullscreen_on;
85 
86 #endif
87 
88 	/* for fader/ecopy */
89 	int     effect_rate;
90 	int     effect_step; /* 0 to 255 , 0 �� 255 ��ɬ���̤�*/
91 
92 	/* key wait */
93 	int     waittime;
94 	int     waitcancel_key;
95 	int     waitcancel_key_mask;
96 	boolean waitcancel_enabled;
97 
98 	/* message wait */
99 	boolean messagewait_enable;
100 	boolean messagewait_enable_save;
101 	int     messagewait_time;
102 	boolean messagewait_cancel;
103 
104 
105 	/* ags */
106 	ags_t ags;
107 	boolean noantialias; /* antialias ����Ѥ��ʤ� */
108 	boolean noimagecursor; /* �꥽�����ե�����Υ���������ɤߤ��ޤʤ� */
109 	fontdev_t fontdev; // �����줿 fontdevice
110 
111 	/* ��å�������Ϣ */
112 	msg_t msg;
113  	boolean   is_msg_out;          /* �̾��å�������ɽ�����뤫 */
114 	void (*msgout)(char *msg);     // �̾�ʳ�(DLL��)�Υ�å�����ɽ���ؿ�
115 
116 	/* ������Ϣ */
117 	sel_t sel;
118 
119 	/* patch ��Ϣ */
120 	int patch_ec;   /* see patch_ec command   */
121 	int patch_emen; /* see patch_emen command */
122 	int patch_g0;   /* see patch g0 command */
123 
124 	/* ain ��Ϣ */
125 	S39AIN ain;
126 
127 	/* �ǡ����Υե�����̾ */
128 	struct {
129 		char *scenario[2];
130 		char *graphics[2];
131 		char *wav[2];
132 		char *midi[2];
133 		char *data[2];
134 		char *resource[2];
135 		char *bgm[2];
136 		char *save[27];
137 		char *savedir;
138 		char *init;
139 		char *bgi;
140 		char *wai;
141 		char *sact01;
142 		char *alk[10];
143 	} files;
144 
145 } NACTINFO;
146 
147 extern NACTINFO *nact;
148 
149 #endif /* __NACT_H__ */
150