- Some fixes to the Blades of Exile Base.
- Additional terrain icons from Exile 1-3 - Fairly sweeping changes in the code that draws graphics in dialogs, in order to support an arbitrary number of future graphics of a given type. git-svn-id: http://openexile.googlecode.com/svn/trunk@16 4ebdad44-0ea0-11de-aab3-ff745001d230
This commit is contained in:
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 2.2 MiB After Width: | Height: | Size: 2.5 MiB |
@@ -21,7 +21,7 @@ extern unsigned char m_pic_index_x[200];
|
||||
extern unsigned char m_pic_index_y[200];
|
||||
|
||||
extern GWorldPtr dlg_buttons_gworld[NUM_BUTTONS][2],anim_gworld,talkfaces_gworld,items_gworld,tiny_obj_gworld;
|
||||
extern GWorldPtr pc_gworld,dlogpics_gworld,monst_gworld[10],terrain_gworld[6];
|
||||
extern GWorldPtr pc_gworld,dlogpics_gworld,monst_gworld[10],terrain_gworld[7];
|
||||
extern PixPatHandle bg[14];
|
||||
extern short geneva_font_num;
|
||||
|
||||
@@ -38,6 +38,7 @@ short item_number[NI];
|
||||
char item_type[NI];
|
||||
Rect item_rect[NI];
|
||||
short item_flag[NI];
|
||||
short item_flag2[NI];
|
||||
char item_active[NI];
|
||||
char item_key[NI];
|
||||
short item_label[NI];
|
||||
@@ -561,12 +562,12 @@ void cd_attach_key(short dlog_num,short item_num,char key)
|
||||
item_key[item_index] = key;
|
||||
}
|
||||
|
||||
void csp(short dlog_num, short item_num, short pict_num)
|
||||
void csp(short dlog_num, short item_num, short pict_num, short pict_type)
|
||||
{
|
||||
cd_set_pict( dlog_num, item_num, pict_num);
|
||||
cd_set_pict( dlog_num, item_num, pict_num, pict_type);
|
||||
}
|
||||
|
||||
void cd_set_pict(short dlog_num, short item_num, short pict_num)
|
||||
void cd_set_pict(short dlog_num, short item_num, short pict_num, short pict_type)
|
||||
{
|
||||
short dlg_index,item_index;
|
||||
if (cd_get_indices(dlog_num,item_num,&dlg_index,&item_index) < 0)
|
||||
@@ -574,11 +575,12 @@ void cd_set_pict(short dlog_num, short item_num, short pict_num)
|
||||
if (item_type[item_index] != 5) {
|
||||
beep();
|
||||
return;
|
||||
}
|
||||
}
|
||||
item_flag[item_index] = pict_num;
|
||||
item_flag2[item_index] = pict_type;
|
||||
if (pict_num == -1)
|
||||
cd_erase_item(dlog_num,item_num);
|
||||
else cd_draw_item(dlog_num,item_num);
|
||||
else cd_draw_item(dlog_num,item_num);
|
||||
}
|
||||
|
||||
void cd_activate_item(short dlog_num, short item_num, short status)
|
||||
@@ -983,7 +985,7 @@ void cd_draw_item(short dlog_num,short item_num)
|
||||
if (item_flag[item_index] == -1)
|
||||
cd_erase_item(dlog_num,item_num);
|
||||
else draw_dialog_graphic(GetWindowPort(dlgs[dlg_index]), item_rect[item_index], item_flag[item_index],
|
||||
(item_flag[item_index] >= 2000) ? FALSE : TRUE,0);
|
||||
item_flag2[item_index], (item_flag[item_index] >= 2000) ? FALSE : TRUE,0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1339,24 +1341,24 @@ void frame_dlog_rect(GrafPtr hDlg, Rect rect, short val)
|
||||
SetPort(old_port);
|
||||
}
|
||||
|
||||
void draw_dialog_graphic(GrafPtr hDlg, Rect rect, short which_g, Boolean do_frame,short win_or_gworld)
|
||||
void draw_dialog_graphic(GrafPtr hDlg, Rect rect, short which_g, short type_g, Boolean do_frame,short win_or_gworld)
|
||||
// win_or_gworld: 0 - window 1 - gworld
|
||||
// 0 - 300 number of terrain graphic
|
||||
// 400 + x - monster graphic num (uses index from scenario)
|
||||
// 0 - 300 number of terrain graphic -> DLG_TER_TYPE (1), DLG_TER_ANIM_TYPE (2)
|
||||
// 400 + x - monster graphic num (uses index from scenario) -> DLG_MONST_TYPE
|
||||
// 400 is 1st monster from monster index, 401 is 2nd from m. index, and so on
|
||||
// 700 + x dlog graphic
|
||||
// 800 + x pc graphic
|
||||
// 900 + x B&W graphic
|
||||
// 950 null item
|
||||
// 1000 + x Talking face
|
||||
// 1100 - item info help
|
||||
// 1200 - pc screen help
|
||||
// 1300 - combat ap
|
||||
// 1400-1402 - button help
|
||||
// 1500 - stat symbols help
|
||||
// 1600 + x - scen graphics
|
||||
// 1700 + x - anim graphic
|
||||
// 1800 + x item graphic
|
||||
// 700 + x dlog graphic -> DLG_DLG_TYPE
|
||||
// 800 + x pc graphic -> DLG_PC_TYPE
|
||||
// 900 + x B&W graphic -> DLG_BW_TYPE
|
||||
// 950 null item -> 0, DLG_BLANK_TYPE (0)
|
||||
// 1000 + x Talking face -> DLG_TALK_TYPE
|
||||
// 1100 - item info help -> DLG_INFO_TYPE
|
||||
// 1200 - pc screen help -> DLG_PC_HELP_TYPE
|
||||
// 1300 - combat ap -> DLG_COMBAT_AP_TYPE
|
||||
// 1400-1402 - button help -> DLG_HELP_TYPE
|
||||
// 1500 - stat symbols help -> DLG_STAT_TYPE
|
||||
// 1600 + x - scen graphics -> DLG_SCEN_TYPE
|
||||
// 1700 + x - anim graphic -> DLG_ANIM_TYPE
|
||||
// 1800 + x item graphic -> DLG_ITEM_TYPE
|
||||
{
|
||||
short picnum;
|
||||
Rect from1 = {0,0,36,28},from2 = {0,0,36,36},from3 = {0,0,72,72},tiny_obj_rect = {0,0,18,18};
|
||||
@@ -1389,7 +1391,7 @@ void draw_dialog_graphic(GrafPtr hDlg, Rect rect, short which_g, Boolean do_fram
|
||||
do_frame = FALSE;
|
||||
which_g = which_g % 2000;
|
||||
|
||||
if (which_g == 950) { // Empty. Maybe clear space.
|
||||
if (type_g == DLG_BLANK_TYPE) { // Empty. Maybe clear space.
|
||||
if (win_or_gworld == 0) {
|
||||
rect.top -= 3;
|
||||
rect.left -= 3;
|
||||
@@ -1403,8 +1405,8 @@ void draw_dialog_graphic(GrafPtr hDlg, Rect rect, short which_g, Boolean do_fram
|
||||
|
||||
BackColor(whiteColor);
|
||||
|
||||
switch (which_g / 100) {
|
||||
case 0: case 1: case 2: // terrain
|
||||
switch (type_g) {
|
||||
case DLG_TER_TYPE: // terrain
|
||||
from_gworld = terrain_gworld[which_g / 50];
|
||||
which_g = which_g % 50;
|
||||
from_rect = calc_rect(which_g % 10, which_g / 10);
|
||||
@@ -1414,8 +1416,8 @@ void draw_dialog_graphic(GrafPtr hDlg, Rect rect, short which_g, Boolean do_fram
|
||||
,rect,0,draw_dest);
|
||||
//DisposeGWorld(from_gworld);
|
||||
break;
|
||||
case 3: // animated terrain
|
||||
which_g -= 300;
|
||||
case DLG_TER_ANIM_TYPE: // animated terrain
|
||||
//which_g -= 300;
|
||||
//from_gworld = load_pict(820);
|
||||
from_rect = calc_rect(4 * (which_g / 5), which_g % 5);
|
||||
if (rect.right - rect.left > 28) {
|
||||
@@ -1426,9 +1428,9 @@ void draw_dialog_graphic(GrafPtr hDlg, Rect rect, short which_g, Boolean do_fram
|
||||
,rect,0,draw_dest);
|
||||
//DisposeGWorld(from_gworld);
|
||||
break;
|
||||
case 4: case 5: // monster ... needs use index small_monst_rect
|
||||
case DLG_MONST_TYPE: // monster ... needs use index small_monst_rect
|
||||
// There are 4 different ways to draw, depending on size of monster
|
||||
which_g -= 400;
|
||||
//which_g -= 400;
|
||||
m_start_pic = m_pic_index[which_g];
|
||||
|
||||
if ((m_pic_index_x[which_g] == 1) && (m_pic_index_y[which_g] == 1)) {
|
||||
@@ -1543,8 +1545,8 @@ void draw_dialog_graphic(GrafPtr hDlg, Rect rect, short which_g, Boolean do_fram
|
||||
//DisposeGWorld(from_gworld);
|
||||
break;
|
||||
|
||||
case 18: case 19: // item
|
||||
which_g -= 1800;
|
||||
case DLG_ITEM_TYPE: // item
|
||||
//which_g -= 1800;
|
||||
rect.right = rect.left + 28; rect.bottom = rect.top + 36;
|
||||
to_rect = rect;
|
||||
if (win_or_gworld == 0)
|
||||
@@ -1563,17 +1565,17 @@ void draw_dialog_graphic(GrafPtr hDlg, Rect rect, short which_g, Boolean do_fram
|
||||
rect_draw_some_item(from_gworld,from_rect,(GWorldPtr) ((win_or_gworld == 1) ? (GWorldPtr)hDlg: from_gworld)
|
||||
,to_rect,1,draw_dest);
|
||||
break;
|
||||
case 7: // dialog
|
||||
which_g -= 700;
|
||||
case DLG_DLG_TYPE: // dialog
|
||||
//which_g -= 700;
|
||||
from_gworld = dlogpics_gworld;
|
||||
OffsetRect(&from2,36 * (which_g % 4),36 * (which_g / 4));
|
||||
rect_draw_some_item(from_gworld,from2,(GWorldPtr) ((win_or_gworld == 1) ? (GWorldPtr)hDlg: from_gworld)
|
||||
,rect,0,draw_dest);
|
||||
break;
|
||||
|
||||
case 10: // talk face
|
||||
case DLG_TALK_TYPE: // talk face
|
||||
rect.right = rect.left + 32; rect.bottom = rect.top + 32;
|
||||
which_g -= 1000;
|
||||
//which_g -= 1000;
|
||||
from_gworld = talkfaces_gworld;
|
||||
from_rect = face_from;
|
||||
OffsetRect(&from_rect,32 * ((which_g - 1) % 10),32 * ((which_g - 1) / 10));
|
||||
@@ -1581,8 +1583,8 @@ void draw_dialog_graphic(GrafPtr hDlg, Rect rect, short which_g, Boolean do_fram
|
||||
rect_draw_some_item(from_gworld,from_rect,(GWorldPtr) hDlg,rect,0,0);
|
||||
else rect_draw_some_item(from_gworld,from_rect,from_gworld,rect,0,draw_dest);
|
||||
break;
|
||||
case 16:
|
||||
which_g -= 1600;
|
||||
case DLG_SCEN_TYPE:
|
||||
//which_g -= 1600;
|
||||
from_gworld = load_pict(851);
|
||||
from_rect.right = 32;
|
||||
from_rect.bottom = 32;
|
||||
|
||||
@@ -8,8 +8,8 @@ short cd_process_click(WindowPtr window,Point the_point, short mods,short *item)
|
||||
short cd_process_keystroke(WindowPtr window,char char_hit,short *item);
|
||||
void cd_init_button(short dlog_num,short item_num, short button_num, short status);
|
||||
void cd_attach_key(short dlog_num,short item_num,char key);
|
||||
void csp(short dlog_num, short item_num, short pict_num);
|
||||
void cd_set_pict(short dlog_num, short item_num, short pict_num);
|
||||
void csp(short dlog_num, short item_num, short pict_num, short pict_type);
|
||||
void cd_set_pict(short dlog_num, short item_num, short pict_num, short pict_type);
|
||||
void cd_activate_item(short dlog_num, short item_num, short status);
|
||||
short cd_get_active(short dlog_num, short item_num);
|
||||
void cd_get_item_text(short dlog_num, short item_num, char *str);
|
||||
@@ -41,7 +41,7 @@ short cd_get_item_id(short dlg_num, short item_num);
|
||||
void center_window(WindowPtr window);
|
||||
Rect get_item_rect(WindowPtr hDlg, short item_num);
|
||||
void frame_dlog_rect(GrafPtr hDlg, Rect rect, short val);
|
||||
void draw_dialog_graphic(GrafPtr hDlg, Rect rect, short which_g, Boolean do_frame,short win_or_gworld);
|
||||
void draw_dialog_graphic(GrafPtr hDlg, Rect rect, short which_g, short type_g, Boolean do_frame,short win_or_gworld);
|
||||
Rect calc_rect(short i, short j);
|
||||
void beep() ;
|
||||
void cd_hit_led_range(short dlog_num,short first_led,short last_led,short which_to_set);
|
||||
|
||||
@@ -32,6 +32,23 @@
|
||||
#define CDST cd_set_text_edit_str
|
||||
#define CDSN cd_set_text_edit_num
|
||||
|
||||
#define DLG_BLANK_TYPE 0
|
||||
#define DLG_TER_TYPE 1
|
||||
#define DLG_TER_ANIM_TYPE 2
|
||||
#define DLG_MONST_TYPE 3
|
||||
#define DLG_DLG_TYPE 4
|
||||
#define DLG_TALK_TYPE 5
|
||||
#define DLG_SCEN_TYPE 6
|
||||
#define DLG_ITEM_TYPE 7
|
||||
#define DLG_CUSTOM_TYPE 100 // This is added to various of the above constants
|
||||
#define DLG_N_TER 336
|
||||
#define DLG_N_TER_ANIM 13
|
||||
#define DLG_N_MONST 172
|
||||
#define DLG_N_DLG 31
|
||||
#define DLG_N_TALK 83
|
||||
#define DLG_N_SCEN 29
|
||||
#define DLG_N_ITEM 122
|
||||
|
||||
typedef struct {
|
||||
char x,y;
|
||||
} location;
|
||||
|
||||
@@ -26,6 +26,7 @@ extern short dialog_answer;
|
||||
short store_which_string_dlog;
|
||||
short store_first_g ;
|
||||
short store_last_g ;
|
||||
short store_g_type ;
|
||||
short store_cur_pic ;
|
||||
short which_page ;
|
||||
short store_res_list;
|
||||
@@ -203,7 +204,7 @@ Boolean cre(short val,short min,short max,char *text1, char *text2,short parent_
|
||||
|
||||
void give_error(char *text1, char *text2,short parent_num)
|
||||
{
|
||||
display_strings(text1,text2,"Error!",57,716,parent_num);
|
||||
display_strings(text1,text2,"Error!",57,/*7*/16,DLG_DLG_TYPE,parent_num);
|
||||
}
|
||||
|
||||
void display_strings_event_filter (short item_hit)
|
||||
@@ -220,7 +221,7 @@ void display_strings_event_filter (short item_hit)
|
||||
}
|
||||
|
||||
void display_strings(char *text1, char *text2,
|
||||
char *title,short sound_num,short graphic_num,short parent_num)
|
||||
char *title,short sound_num,short graphic_num,short graphic_type,short parent_num)
|
||||
{
|
||||
|
||||
short item_hit;
|
||||
@@ -239,7 +240,7 @@ void display_strings(char *text1, char *text2,
|
||||
store_which_string_dlog++;
|
||||
cd_create_dialog_parent_num(store_which_string_dlog,parent_num);
|
||||
|
||||
csp(store_which_string_dlog,store_which_string_dlog,graphic_num);
|
||||
csp(store_which_string_dlog,store_which_string_dlog,graphic_num,graphic_type);
|
||||
|
||||
csit(store_which_string_dlog,4,(char *) text1);
|
||||
if (text2 != NULL) {
|
||||
@@ -247,7 +248,7 @@ void display_strings(char *text1, char *text2,
|
||||
}
|
||||
if (strlen(title) > 0)
|
||||
csit(store_which_string_dlog,6,title);
|
||||
csp(store_which_string_dlog,3,graphic_num);
|
||||
csp(store_which_string_dlog,3,graphic_num,graphic_type);
|
||||
//if (sound_num >= 0)
|
||||
// play_sound(sound_num);
|
||||
while (dialog_not_toast)
|
||||
@@ -274,13 +275,13 @@ void choose_graphic_event_filter (short item_hit)
|
||||
if (which_page == 0)
|
||||
which_page = (store_last_g - store_first_g) / 36;
|
||||
else which_page--;
|
||||
put_choice_pics();
|
||||
put_choice_pics(store_g_type);
|
||||
break;
|
||||
case 79:
|
||||
if (which_page == (store_last_g - store_first_g) / 36)
|
||||
which_page = 0;
|
||||
else which_page++;
|
||||
put_choice_pics();
|
||||
put_choice_pics(store_g_type);
|
||||
break;
|
||||
default:
|
||||
if ((item_hit >= 5) && (item_hit <= 40)) {
|
||||
@@ -292,27 +293,27 @@ void choose_graphic_event_filter (short item_hit)
|
||||
}
|
||||
}
|
||||
|
||||
void put_choice_pics()
|
||||
void put_choice_pics(short g_type)
|
||||
{
|
||||
short item_hit,i;
|
||||
|
||||
for (i = 0; i < 36; i++) {
|
||||
if (store_first_g + which_page * 36 + i > store_last_g) {
|
||||
csp(819,41 + i,950);
|
||||
csp(819,41 + i,0,DLG_BLANK_TYPE);
|
||||
cd_activate_item(819,5 + i,0);
|
||||
}
|
||||
else {
|
||||
csp(819,41 + i,store_first_g + 36 * which_page + i);
|
||||
cd_activate_item(819,5 + i,1);
|
||||
}
|
||||
}
|
||||
else {
|
||||
csp(819,41 + i,store_first_g + 36 * which_page + i,g_type);
|
||||
cd_activate_item(819,5 + i,1);
|
||||
}
|
||||
if (which_page * 36 + i == store_cur_pic - store_first_g)
|
||||
cd_set_led(819,5 + i,1);
|
||||
else cd_set_led(819,5 + i,0);
|
||||
}
|
||||
else cd_set_led(819,5 + i,0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
short choose_graphic(short first_g,short last_g,short cur_choice,short parent_num)
|
||||
short choose_graphic(short first_g,short last_g,short cur_choice,short g_type,short parent_num)
|
||||
{
|
||||
|
||||
short item_hit;
|
||||
@@ -326,7 +327,8 @@ short choose_graphic(short first_g,short last_g,short cur_choice,short parent_nu
|
||||
store_last_g = last_g;
|
||||
if ((cur_choice >= first_g) && (cur_choice <= last_g))
|
||||
store_cur_pic = cur_choice;
|
||||
else store_cur_pic = first_g;
|
||||
else store_cur_pic = first_g;
|
||||
store_g_type = g_type;
|
||||
which_page = (store_cur_pic - store_first_g) / 36;
|
||||
|
||||
cd_create_dialog_parent_num(819,parent_num);
|
||||
@@ -335,7 +337,7 @@ short choose_graphic(short first_g,short last_g,short cur_choice,short parent_nu
|
||||
cd_activate_item(819,79,0);
|
||||
cd_activate_item(819,78,0);
|
||||
}
|
||||
put_choice_pics();
|
||||
put_choice_pics(g_type);
|
||||
|
||||
while (dialog_not_toast)
|
||||
ModalDialog((ModalFilterProcPtr) cd_event_filter, &item_hit);
|
||||
@@ -804,9 +806,9 @@ void edit_spec_enc_event_filter (short item_hit)
|
||||
dialog_not_toast = FALSE;
|
||||
i = -1;
|
||||
switch (edit_pict_mess[store_spec_node.type]) {
|
||||
case 1: i = choose_graphic(700,731,store_spec_node.pic,822); break;
|
||||
case 2: i = choose_graphic(0,252,store_spec_node.pic,822); break;
|
||||
case 3: i = choose_graphic(400,572,store_spec_node.pic,822); break;
|
||||
case 1: i = choose_graphic(/*700,731*/0,DLG_N_DLG,store_spec_node.pic,DLG_DLG_TYPE,822); break;
|
||||
case 2: i = choose_graphic(0,DLG_N_TER,store_spec_node.pic,DLG_TER_TYPE,822); break;
|
||||
case 3: i = choose_graphic(/*400,572*/0,DLG_N_MONST,store_spec_node.pic,DLG_MONST_TYPE,822); break;
|
||||
}
|
||||
if (i >= 0) {
|
||||
store_spec_node.pic = i;
|
||||
@@ -1274,10 +1276,10 @@ void edit_scen_intro_event_filter (short item_hit)
|
||||
|
||||
case 16:
|
||||
i = CDGN(804,8);
|
||||
i = choose_graphic(1600,1629,1600 + i,804);
|
||||
i = choose_graphic(/*1600,1629,1600 + i,804*/0,DLG_N_SCEN,i,DLG_SCEN_TYPE,804);
|
||||
if (i >= 0) {
|
||||
CDSN(804,8,i - 1600);
|
||||
csp(804,11,i );
|
||||
CDSN(804,8,i/* - 1600*/);
|
||||
csp(804,11,i,DLG_SCEN_TYPE );
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1295,7 +1297,7 @@ void edit_scen_intro()
|
||||
CDSN(804,8,scenario.intro_pic);
|
||||
for (i = 0; i < 6; i++)
|
||||
CDST(804, 2 + i,data_store->scen_strs[4 + i]);
|
||||
csp(804,11,scenario.intro_pic + 1600);
|
||||
csp(804,11,scenario.intro_pic/* + 1600*/,DLG_SCEN_TYPE);
|
||||
|
||||
while (dialog_not_toast)
|
||||
ModalDialog((ModalFilterProcPtr) cd_event_filter, &item_hit);
|
||||
|
||||
@@ -5,10 +5,10 @@ Boolean cre(short val,short min,short max,char *text1, char *text2,short parent_
|
||||
void give_error(char *text1, char *text2,short parent_num);
|
||||
void display_strings_event_filter (short item_hit);
|
||||
void display_strings(char *text1, char *text2,
|
||||
char *title,short sound_num,short graphic_num,short parent_num);
|
||||
char *title,short sound_num,short graphic_num,short graphic_type,short parent_num);
|
||||
void choose_graphic_event_filter (short item_hit);
|
||||
void put_choice_pics();
|
||||
short choose_graphic(short first_g,short last_g,short cur_choice,short parent_num);
|
||||
void put_choice_pics(short g_type);
|
||||
short choose_graphic(short first_g,short last_g,short cur_choice,short g_type,short parent_num);
|
||||
void put_text_res();
|
||||
short choose_text_res(short res_list,short first_t,short last_t,short cur_choice,short parent_num,char *title);
|
||||
void choose_text_res_event_filter (short item_hit);
|
||||
|
||||
@@ -972,10 +972,10 @@ void put_ter_info_in_dlog()
|
||||
get_str(str,21,80 + store_ter.special);
|
||||
csit(813,68,(char *) str);
|
||||
if (store_ter.picture >= 1000)
|
||||
csp(813,14,950);
|
||||
csp(813,14,0,DLG_BLANK_TYPE);
|
||||
else if (store_ter.picture >= 400)
|
||||
csp(813,14,store_ter.picture - 100);
|
||||
else csp(813,14,store_ter.picture);
|
||||
csp(813,14,store_ter.picture/* - 100*/,DLG_TER_ANIM_TYPE);
|
||||
else csp(813,14,store_ter.picture,DLG_TER_TYPE);
|
||||
}
|
||||
|
||||
Boolean save_ter_info()
|
||||
@@ -1065,8 +1065,8 @@ void edit_ter_type_event_filter (short item_hit)
|
||||
|
||||
case 13: case 70:
|
||||
if (item_hit == 13)
|
||||
i = choose_graphic(0,252,store_ter.picture,813);
|
||||
else i = choose_graphic(300,313,store_ter.picture,813);
|
||||
i = choose_graphic(0,DLG_N_TER,store_ter.picture,DLG_TER_TYPE,813);
|
||||
else i = choose_graphic(/*300,313*/0,DLG_N_TER_ANIM,store_ter.picture,DLG_TER_ANIM_TYPE,813);
|
||||
if (i >= 0) {
|
||||
if (i >= 300) i += 100;
|
||||
store_ter.picture = i;
|
||||
@@ -1074,10 +1074,10 @@ void edit_ter_type_event_filter (short item_hit)
|
||||
else break;
|
||||
CDSN(813,5,store_ter.picture);
|
||||
if (store_ter.picture >= 1000)
|
||||
csp(813,14,950);
|
||||
csp(813,14,0,DLG_BLANK_TYPE);
|
||||
else if (store_ter.picture >= 400)
|
||||
csp(813,14,store_ter.picture - 100);
|
||||
else csp(813,14,store_ter.picture);
|
||||
csp(813,14,store_ter.picture/* - 100*/,DLG_TER_ANIM_TYPE);
|
||||
else csp(813,14,store_ter.picture,DLG_TER_TYPE);
|
||||
break;
|
||||
default:
|
||||
cd_hit_led_range(813,32,55,item_hit);
|
||||
@@ -1135,8 +1135,8 @@ void put_monst_info_in_dlog()
|
||||
Str255 str;
|
||||
|
||||
if (store_monst.picture_num < 1000)
|
||||
csp(814,34,400 + store_monst.picture_num);
|
||||
else csp(814,34,950);
|
||||
csp(814,34,/*400 + */store_monst.picture_num,DLG_MONST_TYPE);
|
||||
else csp(814,34,0,DLG_BLANK_TYPE);
|
||||
cdsin(814,33,store_which_monst);
|
||||
CDST(814,2,data_store->scen_item_list.monst_names[store_which_monst]);
|
||||
CDSN(814,3,store_monst.picture_num);
|
||||
@@ -1279,7 +1279,7 @@ void edit_monst_type_event_filter (short item_hit)
|
||||
break;
|
||||
case 24: // picture
|
||||
if (save_monst_info() == FALSE) break;
|
||||
i = choose_graphic(400,572,store_monst.picture_num + 400,814);
|
||||
i = choose_graphic(/*400,572*/0,DLG_N_MONST,store_monst.picture_num/* + 400*/,DLG_MONST_TYPE,814);
|
||||
if (i >= 0) {
|
||||
store_monst.picture_num = i - 400;
|
||||
}
|
||||
@@ -1314,7 +1314,7 @@ void edit_monst_type_event_filter (short item_hit)
|
||||
break;
|
||||
case 28: // talk pic
|
||||
if (save_monst_info() == FALSE) break;
|
||||
i = choose_graphic(1001,1084,store_monst.default_facial_pic + 1000,814);
|
||||
i = choose_graphic(/*1001,1084*/1,1+DLG_N_TALK,store_monst.default_facial_pic/* + 1000*/,DLG_TALK_TYPE,814);
|
||||
if (i >= 0) {
|
||||
store_monst.default_facial_pic = i - 1000;
|
||||
}
|
||||
@@ -1507,8 +1507,8 @@ void put_item_info_in_dlog()
|
||||
CDST(818,2,store_item.full_name);
|
||||
CDST(818,3,store_item.name);
|
||||
if (store_item.graphic_num >= 150)
|
||||
csp(818,49,950);
|
||||
else csp(818,49,1800 + store_item.graphic_num);
|
||||
csp(818,49,0,DLG_BLANK_TYPE);
|
||||
else csp(818,49,/*1800 + */store_item.graphic_num,DLG_ITEM_TYPE);
|
||||
CDSN(818,4,store_item.graphic_num);
|
||||
cd_set_led_range(818,18,45,store_item.variety);
|
||||
CDSN(818,5,store_item.item_level);
|
||||
@@ -1609,7 +1609,7 @@ void edit_item_type_event_filter (short item_hit)
|
||||
break;
|
||||
case 56:
|
||||
if (save_item_info() == FALSE) break;
|
||||
i = choose_graphic(1800,1922,store_item.graphic_num + 1800,818);
|
||||
i = choose_graphic(/*1800,1922*/0,DLG_N_ITEM,store_item.graphic_num/* + 1800*/,DLG_ITEM_TYPE,818);
|
||||
if (i >= 0) {
|
||||
store_item.graphic_num = i - 1800;
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ extern location cur_out;
|
||||
|
||||
short num_ir[3] = {12,10,4};
|
||||
|
||||
GWorldPtr monst_gworld[10],terrain_gworld[6],small_terrain_gworld,editor_mixed,terrain_buttons_gworld;
|
||||
GWorldPtr monst_gworld[10],terrain_gworld[7],small_terrain_gworld,editor_mixed,terrain_buttons_gworld;
|
||||
GWorldPtr anim_gworld,field_gworld,dialog_gworld,items_gworld,tiny_obj_gworld,small_ter_gworld;
|
||||
GWorldPtr spec_scen_g = NULL,dlg_buttons_gworld[NUM_BUTTONS][2],ter_draw_gworld,dlogpics_gworld,talkfaces_gworld,mixed_gworld;
|
||||
PixPatHandle bg[14];
|
||||
@@ -201,7 +201,7 @@ void load_main_screen()
|
||||
|
||||
for (i = 0; i < 10; i++)
|
||||
monst_gworld[i] = load_pict(1100 + i);
|
||||
for (i = 0; i < 6; i++)
|
||||
for (i = 0; i < 7; i++)
|
||||
terrain_gworld[i] = load_pict(800 + i);
|
||||
small_terrain_gworld = load_pict(904);
|
||||
editor_mixed = load_pict(906);
|
||||
|
||||
@@ -213,8 +213,8 @@ void put_placed_monst_in_dlog()
|
||||
CDSN(837,2,store_placed_monst.personality);
|
||||
CDSN(837,3,store_placed_monst.facial_pic);
|
||||
if ((store_placed_monst.facial_pic < 1) || (store_placed_monst.facial_pic >= 1000))
|
||||
csp(837,11,950);
|
||||
else csp(837,11,store_placed_monst.facial_pic + 1000);
|
||||
csp(837,11,0,DLG_BLANK_TYPE);
|
||||
else csp(837,11,store_placed_monst.facial_pic/* + 1000*/,DLG_TALK_TYPE);
|
||||
}
|
||||
Boolean get_placed_monst_in_dlog()
|
||||
{
|
||||
@@ -257,7 +257,7 @@ void edit_placed_monst_event_filter (short item_hit)
|
||||
case 12: // facial pic
|
||||
if (get_placed_monst_in_dlog() == FALSE)
|
||||
break;
|
||||
i = choose_graphic(1001,1084,store_placed_monst.facial_pic + 1000,837);
|
||||
i = choose_graphic(/*1001,1084*/1,1+DLG_N_TALK,store_placed_monst.facial_pic/* + 1000*/,DLG_TALK_TYPE,837);
|
||||
if (i >= 0) {
|
||||
store_placed_monst.facial_pic = i - 1000;
|
||||
}
|
||||
@@ -426,8 +426,8 @@ void put_placed_item_in_dlog()
|
||||
|
||||
i = data_store->scen_item_list.scen_items[store_placed_item.item_code].graphic_num;
|
||||
if (i >= 1000)
|
||||
csp(836,4,950);
|
||||
else csp(836,4,1800 + i);
|
||||
csp(836,4,0,DLG_BLANK_TYPE);
|
||||
else csp(836,4,/*1800 + */i,DLG_ITEM_TYPE);
|
||||
}
|
||||
Boolean get_placed_item_in_dlog()
|
||||
{
|
||||
@@ -549,10 +549,10 @@ void edit_sign(short which_sign,short picture)
|
||||
cd_create_dialog_parent_num(831,0);
|
||||
|
||||
if (picture >= 1000)
|
||||
csp(831,6,950);
|
||||
csp(831,6,0,DLG_BLANK_TYPE);
|
||||
else if (picture >= 400)
|
||||
csp(831,6,picture - 100);
|
||||
else csp(831,6,picture);
|
||||
csp(831,6,picture/* - 100*/,DLG_TER_ANIM_TYPE);
|
||||
else csp(831,6,picture,DLG_TER_TYPE);
|
||||
|
||||
cdsin(831,5,store_which_sign);
|
||||
if (editing_town == FALSE)
|
||||
|
||||
Reference in New Issue
Block a user