- Fixed some bugs introduced by the last revision.

- Added a dialog graphic and a few animated terrain graphics from Exiles 1-3.
- The four-parts of death dialog graphic may now be used in a scenario as a dialog graphic.
- Added more constants for clarity
- A few more bladbase fixes

git-svn-id: http://openexile.googlecode.com/svn/trunk@17 4ebdad44-0ea0-11de-aab3-ff745001d230
This commit is contained in:
2009-04-15 15:26:50 +00:00
parent 4aca2bc9da
commit b7d9c30a19
7 changed files with 246 additions and 162 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 MiB

After

Width:  |  Height:  |  Size: 3.7 MiB

View File

@@ -136,13 +136,13 @@ void cd_init_dialogs()
dlg_types[i] = 0;
dlgs[i] = NULL;
dlg_highest_item[i] = 0;
}
}
for (i = 0; i < NI; i++) {
item_dlg[i] = -1;
}
}
for (i = 0; i < NL; i++) {
label_taken[i] = FALSE;
}
}
}
@@ -172,13 +172,13 @@ short cd_create_dialog(short dlog_num,WindowPtr parent)
for (i = 0; i < ND; i++) {
if ((dlg_keys[i] >= 0) && (dlg_types[i] == dlog_num))
return -1;
}
}
for (i = 0; i < ND; i++) {
if (dlg_keys[i] < 0) {
free_slot = i;
i = 500;
}
}
}
if (free_slot < 0)
return -2;
current_key++;
@@ -196,7 +196,7 @@ short cd_create_dialog(short dlog_num,WindowPtr parent)
if (dlgs[free_slot] == NULL) {
play_sound(3);
return -3;
}
}
// center_window(dlgs[free_slot]);
dlg_parent[free_slot] = parent;
@@ -331,18 +331,26 @@ void process_new_window (WindowPtr hDlg) {
#ifdef EXILE_BIG_GUNS
sscanf((char *) item_str,"%hd_%hd",&type,&flag);
//type = typel; flag = flagl;
#endif
}
#endif
}
free_item = -1;
// find free item
switch (type) {
case 0: case 1: case 2: case 5: case 6:
case DLG_BUTTON_TYPE: case DLG_DEFAULT_BTN_TYPE: case DLG_LED_BUTTON:
case DLG_OLD_PICTURE: case 6:
case DLG_NEW_PICTURE + PICT_TER_TYPE:
case DLG_NEW_PICTURE + PICT_TER_ANIM_TYPE:
case DLG_NEW_PICTURE + PICT_MONST_TYPE:
case DLG_NEW_PICTURE + PICT_DLG_TYPE:
case DLG_NEW_PICTURE + PICT_TALK_TYPE:
case DLG_NEW_PICTURE + PICT_SCEN_TYPE:
case DLG_NEW_PICTURE + PICT_ITEM_TYPE:
for (j = 150; j < NI; j++)
if (item_dlg[j] < 0) {
free_item = j;
j = NI + 1;
}
}
break;
default:
if ((type == 9) ||
@@ -351,75 +359,98 @@ void process_new_window (WindowPtr hDlg) {
if (item_dlg[j] < 0) {
free_item = j;
j = NI + 1;
}
}
}
else {
for (j = 10; j < 140; j++)
if (item_dlg[j] < 0) {
free_item = j;
j = NI + 1;
}
}
}
break;
}
if (free_item >= 0) {
item_dlg[free_item] = store_dlog_num;
item_type[free_item] = type;
item_number[free_item] = i + 1;
item_dlg[free_item] = store_dlog_num;
item_type[free_item] = type;
item_number[free_item] = i + 1;
item_rect[free_item] = get_item_rect(hDlg,i + 1);
item_rect[free_item] = get_item_rect(hDlg,i + 1);
item_flag[free_item] = flag;
item_active[free_item] = 1;
item_label[free_item] = 0;
item_label_loc[free_item] = -1;
item_key[free_item] = 0;
switch (type) {
case 0: case 1:
GetPortBounds(dlg_buttons_gworld[button_type[flag]][0], &store_rect);
item_flag[free_item] = flag;
item_active[free_item] = 1;
item_label[free_item] = 0;
item_label_loc[free_item] = -1;
item_key[free_item] = 0;
switch (type) {
case DLG_BUTTON_TYPE: case DLG_DEFAULT_BTN_TYPE:
GetPortBounds(dlg_buttons_gworld[button_type[flag]][0], &store_rect);
item_rect[free_item].right = item_rect[free_item].left + store_rect.right;
item_rect[free_item].bottom = item_rect[free_item].top + store_rect.bottom;
item_key[free_item] = button_def_key[flag];
if (type == 1)
item_key[free_item] = 31;
break;
case DLG_LED_BUTTON:
item_rect[free_item].right = item_rect[free_item].left + 14;
item_rect[free_item].bottom = item_rect[free_item].top + 10;
item_key[free_item] = 255;
break;
case DLG_TEXT_BOLD: case DLG_TEXT_PLAIN: case DLG_TEXT_LARGE:
case 8: case 9: case 10: case 11:
sprintf(((free_item < 10) ? text_long_str[free_item] : text_short_str[free_item - 10]),"");
if (str_stored == TRUE) {
if (free_item < 10)
sprintf(text_long_str[free_item],"%s",(char *) (item_str + str_offset));
else
sprintf(text_short_str[free_item - 10],"%-39.39s",
(char *) (item_str + str_offset));
}
item_key[free_item] = 255;
if (type >= 10) {
GetPortBounds(dlg_buttons_gworld[1][0], &store_rect);
item_rect[free_item].right = item_rect[free_item].left + store_rect.right;
item_rect[free_item].bottom = item_rect[free_item].top + store_rect.bottom;
item_key[free_item] = button_def_key[flag];
if (type == 1)
if (type == 11)
item_key[free_item] = 31;
break;
case 2:
item_rect[free_item].right = item_rect[free_item].left + 14;
item_rect[free_item].bottom = item_rect[free_item].top + 10;
item_key[free_item] = 255;
break;
case 3: case 4: case 7: case 8: case 9: case 10: case 11:
sprintf(((free_item < 10) ? text_long_str[free_item] : text_short_str[free_item - 10]),"");
if (str_stored == TRUE) {
if (free_item < 10)
sprintf(text_long_str[free_item],"%s",
(char *) (item_str + str_offset));
else
sprintf(text_short_str[free_item - 10],"%-39.39s",
(char *) (item_str + str_offset));
}
item_key[free_item] = 255;
if (type >= 10) {
GetPortBounds(dlg_buttons_gworld[1][0], &store_rect);
item_rect[free_item].right = item_rect[free_item].left + store_rect.right;
item_rect[free_item].bottom = item_rect[free_item].top + store_rect.bottom;
if (type == 11)
item_key[free_item] = 31;
}
break;
}
win_height = max(win_height, item_rect[free_item].bottom + 5);
win_width = max(win_width, item_rect[free_item].right + 6);
}
break;
case DLG_OLD_PICTURE:
item_flag2[free_item] = PICT_OLD_TYPE;
break;
case DLG_NEW_PICTURE + PICT_TER_TYPE:
item_flag2[free_item] = PICT_TER_TYPE;
break;
case DLG_NEW_PICTURE + PICT_TER_ANIM_TYPE:
item_flag2[free_item] = PICT_TER_ANIM_TYPE;
break;
case DLG_NEW_PICTURE + PICT_MONST_TYPE:
item_flag2[free_item] = PICT_MONST_TYPE;
break;
case DLG_NEW_PICTURE + PICT_DLG_TYPE:
item_flag2[free_item] = PICT_DLG_TYPE;
break;
case DLG_NEW_PICTURE + PICT_TALK_TYPE:
item_flag2[free_item] = PICT_TALK_TYPE;
break;
case DLG_NEW_PICTURE + PICT_SCEN_TYPE:
item_flag2[free_item] = PICT_SCEN_TYPE;
break;
case DLG_NEW_PICTURE + PICT_ITEM_TYPE:
item_flag2[free_item] = PICT_ITEM_TYPE;
break;
}
win_height = max(win_height, item_rect[free_item].bottom + 5);
win_width = max(win_width, item_rect[free_item].right + 6);
}
}
}
ShortenDITL(GetDialogFromWindow(hDlg),dlg_highest_item[free_slot]);
SizeWindow(hDlg,win_width,win_height,FALSE);
dlg_highest_item[free_slot] = num_items;
}
}
short cd_kill_dialog(short dlog_num,short parent_message)
@@ -911,7 +942,7 @@ void cd_draw_item(short dlog_num,short item_num)
}
else {
switch (item_type[item_index]) {
case 0: case 1: case 10: case 11:
case DLG_BUTTON_TYPE: case DLG_DEFAULT_BTN_TYPE: case 10: case 11:
GetPortBounds(dlg_buttons_gworld[button_type[item_flag[item_index]]][0], &from_rect);
rect_draw_some_item(dlg_buttons_gworld[button_type[item_flag[item_index]]][0],from_rect,
dlg_buttons_gworld[button_type[item_flag[item_index]]][0],item_rect[item_index],0,2);
@@ -922,19 +953,19 @@ void cd_draw_item(short dlog_num,short item_num)
if (item_type[item_index] < 2) {
char_win_draw_string(dlgs[dlg_index],item_rect[item_index],
(char *) (button_strs[item_flag[item_index]]),1,8);
}
else {
char_win_draw_string(dlgs[dlg_index],item_rect[item_index],
(char *) ((item_index < 10) ? text_long_str[item_index] :
text_short_str[item_index - 10]),1,8);
}
}
else {
char_win_draw_string(dlgs[dlg_index],item_rect[item_index],
(char *) ((item_index < 10) ? text_long_str[item_index] :
text_short_str[item_index - 10]),1,8);
}
if (item_type[item_index] < 2)
OffsetRect(&item_rect[item_index],button_left_adj[item_flag[item_index]],0);
TextSize(10);
ForeColor(blackColor);
break;
case 2:
case DLG_LED_BUTTON:
GetPortBounds(dlg_buttons_gworld[9][0], &from_rect);
switch (item_flag[item_index]) {
case 0: rect_draw_some_item( dlg_buttons_gworld[10][0],from_rect, dlg_buttons_gworld[10][0],item_rect[item_index],0,2); break;
@@ -943,9 +974,14 @@ void cd_draw_item(short dlog_num,short item_num)
}
break;
case 3: case 4: case 7: case 8: case 9:
case DLG_TEXT_BOLD: case DLG_TEXT_PLAIN: case DLG_TEXT_LARGE: case 8: case 9:
cd_erase_item(dlog_num,item_num);
if (item_type[item_index] == 4)
TextFont(geneva_font_num);
TextFace(0);
TextFace(bold);
TextSize(10);
ForeColor(blackColor);
if (item_type[item_index] == DLG_TEXT_PLAIN)
TextFace(0);
if (item_type[item_index] == 7)
TextSize(12);
@@ -955,37 +991,39 @@ void cd_draw_item(short dlog_num,short item_num)
if (item_flag[item_index] >= 10) {
RGBForeColor(&c[1]);
}
}
if (item_rect[item_index].bottom - item_rect[item_index].top < 20) {
item_rect[item_index].left += 3;
char_win_draw_string(dlgs[dlg_index],item_rect[item_index],
(char *) ((item_index < 10) ? text_long_str[item_index] :
text_short_str[item_index - 10]),3,12);
item_rect[item_index].left -= 3;
}
else {
InsetRect(&item_rect[item_index],4,4);
char_win_draw_string(dlgs[dlg_index],item_rect[item_index],
(char *) ((item_index < 10) ? text_long_str[item_index] :
text_short_str[item_index - 10]),0,(item_type[item_index] == 7) ? 14 : 12);
InsetRect(&item_rect[item_index],-4,-4);
}
}
else {
InsetRect(&item_rect[item_index],4,4);
char_win_draw_string(dlgs[dlg_index],item_rect[item_index],
(char *) ((item_index < 10) ? text_long_str[item_index] :
text_short_str[item_index - 10]),0,(item_type[item_index] == 7) ? 14 : 12);
InsetRect(&item_rect[item_index],-4,-4);
}
if ((item_type[item_index] == 8) && (dlog_num == 989)) {
item_rect[item_index].bottom -= 12;
undo_clip();
}
TextFont(geneva_font_num);
TextFace(0);
TextFace(bold);
TextSize(10);
ForeColor(blackColor);
}
break;
case 5:
case DLG_OLD_PICTURE:
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_flag2[item_index], (item_flag[item_index] >= 2000) ? FALSE : TRUE,0);
else draw_dialog_graphic(GetWindowPort(dlgs[dlg_index]), item_rect[item_index], item_flag[item_index],
item_flag2[item_index], (item_flag[item_index] >= 2000) ? FALSE : TRUE,0);
break;
default: // DLG_NEW_PICTURE
if(item_type[item_index] < 20) break;
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_type[item_index] - DLG_NEW_PICTURE, (item_flag[item_index] >= 2000) ? FALSE : TRUE,0);
break;
}
}
@@ -1281,7 +1319,7 @@ short cd_find_dlog(WindowPtr window, short *dlg_num, short *dlg_key)
*dlg_num = dlg_types[i];
*dlg_key = dlg_keys[i];
return i;
}
}
return -1;
}
@@ -1343,22 +1381,23 @@ void frame_dlog_rect(GrafPtr hDlg, Rect rect, short val)
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 -> DLG_TER_TYPE (1), DLG_TER_ANIM_TYPE (2)
// 400 + x - monster graphic num (uses index from scenario) -> DLG_MONST_TYPE
// 0 - 300 number of terrain graphic -> PICT_TER_TYPE (1), PICT_TER_ANIM_TYPE (2)
// 400 + x - monster graphic num (uses index from scenario) -> PICT_MONST_TYPE
// 400 is 1st monster from monster index, 401 is 2nd from m. index, and so on
// 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
// 700 + x dlog graphic -> PICT_DLG_TYPE
// 800 + x pc graphic -> PICT_PC_TYPE
// 900 + x B&W graphic -> PICT_BW_TYPE
// 950 null item -> 0, PICT_BLANK_TYPE (0)
// 1000 + x Talking face -> PICT_TALK_TYPE
// 1100 - item info help -> PICT_INFO_TYPE
// 1200 - pc screen help -> PICT_PC_HELP_TYPE
// 1300 - combat ap -> PICT_COMBAT_AP_TYPE
// 1400-1402 - button help -> PICT_HELP_TYPE
// 1500 - stat symbols help -> PICT_STAT_TYPE
// 1600 + x - scen graphics -> PICT_SCEN_TYPE
// 1700 + x - anim graphic -> PICT_ANIM_TYPE
// 1800 + x item graphic -> PICT_ITEM_TYPE
// PICT_OLD_TYPE (-1) to revert to the old behaviour
{
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};
@@ -1391,7 +1430,36 @@ void draw_dialog_graphic(GrafPtr hDlg, Rect rect, short which_g, short type_g, B
do_frame = FALSE;
which_g = which_g % 2000;
if (type_g == DLG_BLANK_TYPE) { // Empty. Maybe clear space.
if (type_g == PICT_OLD_TYPE) {
unsigned short r = which_g / 100;
//printf("Parsing old-style graphic %i.",which_g);
if (r < 3){
type_g = PICT_TER_TYPE;
}else if(r == 4){
type_g = PICT_TER_ANIM_TYPE;
which_g -= 400;
}else if(r < 7){
type_g = PICT_MONST_TYPE;
which_g -= 700;
}else if(r == 7){
type_g = PICT_DLG_TYPE;
which_g -= 700;
}else if(r == 10){
type_g = PICT_TALK_TYPE;
which_g -= 1000;
}else if(r == 16){
type_g = PICT_SCEN_TYPE;
which_g -= 1600;
}else if(r == 18 || r == 19){
type_g = PICT_ITEM_TYPE;
which_g -= 1800;
}else if(which_g == 950){
type_g = PICT_BLANK_TYPE;
}
//printf(" Result: type = %i, reduced graphic = %u.\n",type_g,which_g);
}
if (type_g == PICT_BLANK_TYPE) { // Empty. Maybe clear space.
if (win_or_gworld == 0) {
rect.top -= 3;
rect.left -= 3;
@@ -1400,13 +1468,13 @@ void draw_dialog_graphic(GrafPtr hDlg, Rect rect, short which_g, short type_g, B
FillCRect(&rect,bg[5]);
}
return;
}
}
GetBackColor(&store_color);
BackColor(whiteColor);
switch (type_g) {
case DLG_TER_TYPE: // terrain
case PICT_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);
@@ -1416,19 +1484,22 @@ void draw_dialog_graphic(GrafPtr hDlg, Rect rect, short which_g, short type_g, B
,rect,0,draw_dest);
//DisposeGWorld(from_gworld);
break;
case DLG_TER_ANIM_TYPE: // animated terrain
case PICT_TER_ANIM_TYPE: // animated terrain
//which_g -= 300;
//from_gworld = load_pict(820);
from_rect = calc_rect(4 * (which_g / 5), which_g % 5);
Rect from_rect = calc_rect(4 * (which_g / 5), which_g % 5);
//printf("Getting animated terrain graphic %i from sheet 20", which_g);
//printf(" at {%i,%i,%i,%i}",from_rect.top,from_rect.left,from_rect.bottom,from_rect.right);
//printf(" column %i, row %i.\n",from_rect.left/28,from_rect.top/36);
if (rect.right - rect.left > 28) {
InsetRect(&rect,4,0);
rect.right = rect.left + 28;
}
}
rect_draw_some_item(anim_gworld,from_rect,(GWorldPtr) ((win_or_gworld == 1) ? (GWorldPtr)hDlg: anim_gworld)
,rect,0,draw_dest);
//DisposeGWorld(from_gworld);
break;
case DLG_MONST_TYPE: // monster ... needs use index small_monst_rect
case PICT_MONST_TYPE: // monster ... needs use index small_monst_rect
// There are 4 different ways to draw, depending on size of monster
//which_g -= 400;
m_start_pic = m_pic_index[which_g];
@@ -1545,7 +1616,7 @@ void draw_dialog_graphic(GrafPtr hDlg, Rect rect, short which_g, short type_g, B
//DisposeGWorld(from_gworld);
break;
case DLG_ITEM_TYPE: // item
case PICT_ITEM_TYPE: // item
//which_g -= 1800;
rect.right = rect.left + 28; rect.bottom = rect.top + 36;
to_rect = rect;
@@ -1565,7 +1636,7 @@ void draw_dialog_graphic(GrafPtr hDlg, Rect rect, short which_g, short type_g, B
rect_draw_some_item(from_gworld,from_rect,(GWorldPtr) ((win_or_gworld == 1) ? (GWorldPtr)hDlg: from_gworld)
,to_rect,1,draw_dest);
break;
case DLG_DLG_TYPE: // dialog
case PICT_DLG_TYPE: // dialog
//which_g -= 700;
from_gworld = dlogpics_gworld;
OffsetRect(&from2,36 * (which_g % 4),36 * (which_g / 4));
@@ -1573,7 +1644,7 @@ void draw_dialog_graphic(GrafPtr hDlg, Rect rect, short which_g, short type_g, B
,rect,0,draw_dest);
break;
case DLG_TALK_TYPE: // talk face
case PICT_TALK_TYPE: // talk face
rect.right = rect.left + 32; rect.bottom = rect.top + 32;
//which_g -= 1000;
from_gworld = talkfaces_gworld;
@@ -1583,7 +1654,7 @@ void draw_dialog_graphic(GrafPtr hDlg, Rect rect, short which_g, short type_g, B
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 DLG_SCEN_TYPE:
case PICT_SCEN_TYPE:
//which_g -= 1600;
from_gworld = load_pict(851);
from_rect.right = 32;

View File

@@ -32,22 +32,35 @@
#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
#define PICT_OLD_TYPE -1
#define PICT_BLANK_TYPE 0
#define PICT_TER_TYPE 1
#define PICT_TER_ANIM_TYPE 2
#define PICT_MONST_TYPE 3
#define PICT_DLG_TYPE 4
#define PICT_TALK_TYPE 5
#define PICT_SCEN_TYPE 6
#define PICT_ITEM_TYPE 7
#define DLG_NEW_PICTURE 20 // This is added to various of the above constants
#define PICT_CUSTOM_TYPE 100 // This is added to various of the above constants
#define PICT_N_TER 336
#define PICT_N_TER_ANIM 18
#define PICT_N_MONST 172
#define PICT_N_DLG 36
#define PICT_N_TALK 83
#define PICT_N_SCEN 29
#define PICT_N_ITEM 122
#define DLG_BUTTON_TYPE 0
#define DLG_DEFAULT_BTN_TYPE 1
// Not sure what 10 and 11 do, but they're similar to above two
#define DLG_LED_BUTTON 2
// 3, 4, 7, 8, 9 are various text objects; not completely sure which is which
#define DLG_TEXT_BOLD 3
#define DLG_TEXT_PLAIN 4
#define DLG_TEXT_LARGE 7
#define DLG_OLD_PICTURE 5
// And I don't know what 6 is for either
typedef struct {
char x,y;

View File

@@ -204,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,/*7*/16,DLG_DLG_TYPE,parent_num);
display_strings(text1,text2,"Error!",57,/*7*/16,PICT_DLG_TYPE,parent_num);
}
void display_strings_event_filter (short item_hit)
@@ -299,7 +299,7 @@ void put_choice_pics(short g_type)
for (i = 0; i < 36; i++) {
if (store_first_g + which_page * 36 + i > store_last_g) {
csp(819,41 + i,0,DLG_BLANK_TYPE);
csp(819,41 + i,0,PICT_BLANK_TYPE);
cd_activate_item(819,5 + i,0);
}
else {
@@ -806,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*/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;
case 1: i = choose_graphic(/*700,731*/0,PICT_N_DLG,store_spec_node.pic,PICT_DLG_TYPE,822); break;
case 2: i = choose_graphic(0,PICT_N_TER,store_spec_node.pic,PICT_TER_TYPE,822); break;
case 3: i = choose_graphic(/*400,572*/0,PICT_N_MONST,store_spec_node.pic,PICT_MONST_TYPE,822); break;
}
if (i >= 0) {
store_spec_node.pic = i;
@@ -1276,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*/0,DLG_N_SCEN,i,DLG_SCEN_TYPE,804);
i = choose_graphic(/*1600,1629,1600 + i,804*/0,PICT_N_SCEN,i,PICT_SCEN_TYPE,804);
if (i >= 0) {
CDSN(804,8,i/* - 1600*/);
csp(804,11,i,DLG_SCEN_TYPE );
csp(804,11,i,PICT_SCEN_TYPE );
}
break;
}
@@ -1297,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*/,DLG_SCEN_TYPE);
csp(804,11,scenario.intro_pic/* + 1600*/,PICT_SCEN_TYPE);
while (dialog_not_toast)
ModalDialog((ModalFilterProcPtr) cd_event_filter, &item_hit);

View File

@@ -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,0,DLG_BLANK_TYPE);
csp(813,14,0,PICT_BLANK_TYPE);
else if (store_ter.picture >= 400)
csp(813,14,store_ter.picture/* - 100*/,DLG_TER_ANIM_TYPE);
else csp(813,14,store_ter.picture,DLG_TER_TYPE);
csp(813,14,store_ter.picture - 400,PICT_TER_ANIM_TYPE);
else csp(813,14,store_ter.picture,PICT_TER_TYPE);
}
Boolean save_ter_info()
@@ -1065,19 +1065,19 @@ void edit_ter_type_event_filter (short item_hit)
case 13: case 70:
if (item_hit == 13)
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);
i = choose_graphic(0,PICT_N_TER,store_ter.picture,PICT_TER_TYPE,813);
else i = 400 + choose_graphic(/*300,313*/0,PICT_N_TER_ANIM,store_ter.picture,PICT_TER_ANIM_TYPE,813);
if (i >= 0) {
if (i >= 300) i += 100;
//if (i >= 300) i += 100;
store_ter.picture = i;
}
else break;
}
else break;
CDSN(813,5,store_ter.picture);
if (store_ter.picture >= 1000)
csp(813,14,0,DLG_BLANK_TYPE);
csp(813,14,0,PICT_BLANK_TYPE);
else if (store_ter.picture >= 400)
csp(813,14,store_ter.picture/* - 100*/,DLG_TER_ANIM_TYPE);
else csp(813,14,store_ter.picture,DLG_TER_TYPE);
csp(813,14,store_ter.picture - 400,PICT_TER_ANIM_TYPE);
else csp(813,14,store_ter.picture,PICT_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,DLG_MONST_TYPE);
else csp(814,34,0,DLG_BLANK_TYPE);
csp(814,34,/*400 + */store_monst.picture_num,PICT_MONST_TYPE);
else csp(814,34,0,PICT_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*/0,DLG_N_MONST,store_monst.picture_num/* + 400*/,DLG_MONST_TYPE,814);
i = choose_graphic(/*400,572*/0,PICT_N_MONST,store_monst.picture_num/* + 400*/,PICT_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*/1,1+DLG_N_TALK,store_monst.default_facial_pic/* + 1000*/,DLG_TALK_TYPE,814);
i = choose_graphic(/*1001,1084*/1,1+PICT_N_TALK,store_monst.default_facial_pic/* + 1000*/,PICT_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,0,DLG_BLANK_TYPE);
else csp(818,49,/*1800 + */store_item.graphic_num,DLG_ITEM_TYPE);
csp(818,49,0,PICT_BLANK_TYPE);
else csp(818,49,/*1800 + */store_item.graphic_num,PICT_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*/0,DLG_N_ITEM,store_item.graphic_num/* + 1800*/,DLG_ITEM_TYPE,818);
i = choose_graphic(/*1800,1922*/0,PICT_N_ITEM,store_item.graphic_num/* + 1800*/,PICT_ITEM_TYPE,818);
if (i >= 0) {
store_item.graphic_num = i - 1800;
}

View File

@@ -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,0,DLG_BLANK_TYPE);
else csp(837,11,store_placed_monst.facial_pic/* + 1000*/,DLG_TALK_TYPE);
csp(837,11,0,PICT_BLANK_TYPE);
else csp(837,11,store_placed_monst.facial_pic/* + 1000*/,PICT_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*/1,1+DLG_N_TALK,store_placed_monst.facial_pic/* + 1000*/,DLG_TALK_TYPE,837);
i = choose_graphic(/*1001,1084*/1,1+PICT_N_TALK,store_placed_monst.facial_pic/* + 1000*/,PICT_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,0,DLG_BLANK_TYPE);
else csp(836,4,/*1800 + */i,DLG_ITEM_TYPE);
csp(836,4,0,PICT_BLANK_TYPE);
else csp(836,4,/*1800 + */i,PICT_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,0,DLG_BLANK_TYPE);
csp(831,6,0,PICT_BLANK_TYPE);
else if (picture >= 400)
csp(831,6,picture/* - 100*/,DLG_TER_ANIM_TYPE);
else csp(831,6,picture,DLG_TER_TYPE);
csp(831,6,picture - 400,PICT_TER_ANIM_TYPE);
else csp(831,6,picture,PICT_TER_TYPE);
cdsin(831,5,store_which_sign);
if (editing_town == FALSE)