… | |
… | |
435 | * Be careful to keep the order. If you add readable subtype, add them |
435 | * Be careful to keep the order. If you add readable subtype, add them |
436 | * at the bottom of the list. Never delete a subtype because index is used as |
436 | * at the bottom of the list. Never delete a subtype because index is used as |
437 | * subtype paramater in arch files! |
437 | * subtype paramater in arch files! |
438 | */ |
438 | */ |
439 | static readable_message_type readable_message_types[] = { |
439 | static readable_message_type readable_message_types[] = { |
440 | /*subtype 0 */ {0, 0, ""}, |
440 | /*subtype 0 */ {0, 0, "info"}, |
441 | /* book messages subtypes */ |
441 | /* book messages subtypes */ |
442 | /*subtype 1 */ {MSG_TYPE_BOOK, MSG_TYPE_BOOK_CLASP_1, "readable-book-clasp-1"}, |
442 | /*subtype 1 */ {MSG_TYPE_BOOK, MSG_TYPE_BOOK_CLASP_1, "readable-book-clasp-1"}, |
443 | {MSG_TYPE_BOOK, MSG_TYPE_BOOK_CLASP_2, "readable-book-clasp-2"}, |
443 | {MSG_TYPE_BOOK, MSG_TYPE_BOOK_CLASP_2, "readable-book-clasp-2"}, |
444 | {MSG_TYPE_BOOK, MSG_TYPE_BOOK_ELEGANT_1, "readable-book-elegant-1"}, |
444 | {MSG_TYPE_BOOK, MSG_TYPE_BOOK_ELEGANT_1, "readable-book-elegant-1"}, |
445 | {MSG_TYPE_BOOK, MSG_TYPE_BOOK_ELEGANT_2, "readable-book-elegant-2"}, |
445 | {MSG_TYPE_BOOK, MSG_TYPE_BOOK_ELEGANT_2, "readable-book-elegant-2"}, |
… | |
… | |
1983 | get_readable_message_type (object *readable) |
1983 | get_readable_message_type (object *readable) |
1984 | { |
1984 | { |
1985 | uint8 subtype = readable->subtype; |
1985 | uint8 subtype = readable->subtype; |
1986 | |
1986 | |
1987 | if (subtype > last_readable_subtype) |
1987 | if (subtype > last_readable_subtype) |
1988 | return &(readable_message_types[0]); |
1988 | return &readable_message_types[0]; |
|
|
1989 | |
1989 | return &(readable_message_types[subtype]); |
1990 | return &readable_message_types[subtype]; |
1990 | } |
1991 | } |