diff options
author | Bardur Arantsson <bardur@scientician.net> | 2012-06-26 09:14:06 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2012-06-26 09:17:57 +0200 |
commit | 30ba18d4fd9901f7d7fdbde83b41de5e0ef7e8c1 (patch) | |
tree | 8087c872864a2344deb1c1f44df673693db88bdc /src/messages.c | |
parent | ae6bee5100bb9ec4e7a3d5fa8538ca3eae38dc58 (diff) |
messages: Remove message__type; it's not really used.
Diffstat (limited to 'src/messages.c')
-rw-r--r-- | src/messages.c | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/src/messages.c b/src/messages.c index d39ad84b..e88cf58e 100644 --- a/src/messages.c +++ b/src/messages.c @@ -49,11 +49,6 @@ static u16b *message__ptr; static byte *message__color; /* - * The array of type, by index [MESSAGE_MAX] - */ -static byte *message__type; - -/* * The array of message counts, by index [MESSAGE_MAX] */ static u16b *message__count; @@ -90,7 +85,6 @@ void message_init() /* Message variables */ C_MAKE(message__ptr, MESSAGE_MAX, u16b); C_MAKE(message__color, MESSAGE_MAX, byte); - C_MAKE(message__type, MESSAGE_MAX, byte); C_MAKE(message__count, MESSAGE_MAX, u16b); C_MAKE(message__buf, MESSAGE_BUF, char); @@ -175,33 +169,11 @@ byte message_color(int age) return (color); } -/* - * Recall the type of a saved message - */ -byte message_type(int age) -{ - s16b x; - byte type; - - /* Forgotten messages have no text */ - if ((age < 0) || (age >= message_num())) return (MESSAGE_NONE); - - /* Acquire the "logical" index */ - x = (message__next + MESSAGE_MAX - (age + 1)) % MESSAGE_MAX; - - /* Get the "offset" for the message */ - type = message__type[x]; - - /* Return the message text */ - return (type); -} - - /* * Add a new message, with great efficiency */ -void message_add(byte type, cptr str, byte color) +void message_add(cptr str, byte color) { int i, k, x, n; cptr s; @@ -286,7 +258,6 @@ void message_add(byte type, cptr str, byte color) /* Assign the starting address */ message__ptr[x] = message__ptr[i]; message__color[x] = color; - message__type[x] = type; message__count[x] = 1; /* Success */ @@ -376,7 +347,6 @@ void message_add(byte type, cptr str, byte color) /* Assign the starting address */ message__ptr[x] = message__head; message__color[x] = color; - message__type[x] = type; message__count[x] = 1; /* Append the new part of the message */ |