src/news_type.h
changeset 8990 0d5bb1c2a4a6
parent 8921 9dfe5ee27bac
child 9010 fa1aa6008a59
equal deleted inserted replaced
8989:42f45270fbca 8990:0d5bb1c2a4a6
     6 #define NEWS_TYPE_H
     6 #define NEWS_TYPE_H
     7 
     7 
     8 #include "window_type.h"
     8 #include "window_type.h"
     9 #include "date_type.h"
     9 #include "date_type.h"
    10 #include "strings_type.h"
    10 #include "strings_type.h"
       
    11 #include "sound_type.h"
    11 
    12 
    12 /**
    13 /**
    13  * Type of news.
    14  * Type of news.
    14  */
    15  */
    15 enum NewsType {
    16 enum NewsType {
    73 	NB_BMERGER     = (2 << 4), ///< Company has been bought by another company
    74 	NB_BMERGER     = (2 << 4), ///< Company has been bought by another company
    74 	NB_BBANKRUPT   = (3 << 4), ///< Company has gone bankrupt
    75 	NB_BBANKRUPT   = (3 << 4), ///< Company has gone bankrupt
    75 	NB_BNEWCOMPANY = (4 << 4), ///< A new company has been started
    76 	NB_BNEWCOMPANY = (4 << 4), ///< A new company has been started
    76 };
    77 };
    77 
    78 
       
    79 /**
       
    80  * Per-NewsType data
       
    81  */
       
    82 struct NewsTypeData {
       
    83 	const char *const name; ///< Name
       
    84 	const byte age;         ///< Maximum age of news items (in days)
       
    85 	const SoundFx sound;    ///< Sound
       
    86 };
       
    87 
    78 struct NewsItem {
    88 struct NewsItem {
    79 	StringID string_id;    ///< Message text (sometimes also used for storing other info)
    89 	StringID string_id;    ///< Message text (sometimes also used for storing other info)
    80 	uint16 duration;       ///< Remaining time for showing this news message
    90 	uint16 duration;       ///< Remaining time for showing this news message
    81 	Date date;             ///< Date of the news
    91 	Date date;             ///< Date of the news
    82 	NewsFlag flags;        ///< NewsFlags bits @see NewsFlag
    92 	NewsFlag flags;        ///< NewsFlags bits @see NewsFlag