(svn r12785) -Codechange: put all news-type related constants in the same array. Patch by cirdan.

This commit is contained in:
rubidium
2008-04-19 12:50:02 +00:00
parent 0670ec6ee1
commit bfd2cac6e2
4 changed files with 32 additions and 56 deletions

View File

@@ -8,6 +8,7 @@
#include "window_type.h"
#include "date_type.h"
#include "strings_type.h"
#include "sound_type.h"
/**
* Type of news.
@@ -75,6 +76,15 @@ enum NewsBankrupcy {
NB_BNEWCOMPANY = (4 << 4), ///< A new company has been started
};
/**
* Per-NewsType data
*/
struct NewsTypeData {
const char *const name; ///< Name
const byte age; ///< Maximum age of news items (in days)
const SoundFx sound; ///< Sound
};
struct NewsItem {
StringID string_id; ///< Message text (sometimes also used for storing other info)
uint16 duration; ///< Remaining time for showing this news message