# news_type.h

Go to the documentation of this file.

    00001 /* $Id: news_type.h 15428 2009-02-09 02:57:15Z rubidium $ */
    00002
    00005 #ifndef NEWS_TYPE_H
    00006 #define NEWS_TYPE_H
    00007
    00008 #include "date_type.h"
    00009 #include "strings_type.h"
    00010 #include "sound_type.h"
    00011
    00015 enum NewsType {
    00016   NT_ARRIVAL_COMPANY,
    00017   NT_ARRIVAL_OTHER,
    00018   NT_ACCIDENT,
    00019   NT_COMPANY_INFO,
    00020   NT_INDUSTRY_OPEN,
    00021   NT_INDUSTRY_CLOSE,
    00022   NT_ECONOMY,
    00023   NT_INDUSTRY_COMPANY,
    00024   NT_INDUSTRY_OTHER,
    00025   NT_INDUSTRY_NOBODY,
    00026   NT_ADVICE,
    00027   NT_NEW_VEHICLES,
    00028   NT_ACCEPTANCE,
    00029   NT_SUBSIDIES,
    00030   NT_GENERAL,
    00031   NT_END,
    00032 };
    00033
    00037 enum NewsSubtype {
    00038   NS_ARRIVAL_COMPANY,
    00039   NS_ARRIVAL_OTHER,
    00040   NS_ACCIDENT_TILE,
    00041   NS_ACCIDENT_VEHICLE,
    00042   NS_COMPANY_TROUBLE,
    00043   NS_COMPANY_MERGER,
    00044   NS_COMPANY_BANKRUPT,
    00045   NS_COMPANY_NEW,
    00046   NS_INDUSTRY_OPEN,
    00047   NS_INDUSTRY_CLOSE,
    00048   NS_ECONOMY,
    00049   NS_INDUSTRY_COMPANY,
    00050   NS_INDUSTRY_OTHER,
    00051   NS_INDUSTRY_NOBODY,
    00052   NS_ADVICE,
    00053   NS_NEW_VEHICLES,
    00054   NS_ACCEPTANCE,
    00055   NS_SUBSIDIES,
    00056   NS_GENERAL,
    00057   NS_END,
    00058 };
    00059
    00063 enum NewsMode {
    00064   NM_SMALL    = 0,
    00065   NM_NORMAL   = 1,
    00066   NM_THIN     = 2,
    00067 };
    00068
    00073 enum NewsFlag {
    00074   NF_NONE      = 0,
    00075   NF_VIEWPORT  = (1 << 1),
    00076   NF_TILE      = (1 << 2),
    00077   NF_VEHICLE   = (1 << 3),
    00078   NF_INCOLOUR  = (1 << 5),
    00079   NF_TILE2     = (1 << 6),
    00080 };
    00081 DECLARE_ENUM_AS_BIT_SET(NewsFlag);
    00082
    00083
    00087 enum NewsDisplay {
    00088   ND_OFF,
    00089   ND_SUMMARY,
    00090   ND_FULL,
    00091 };
    00092
    00096 struct NewsTypeData {
    00097   const char *const name;
    00098   const byte age;
    00099   const SoundFx sound;
    00100   NewsDisplay display;
    00101 };
    00102
    00103 struct NewsItem {
    00104   NewsItem *prev;
    00105   NewsItem *next;
    00106   StringID string_id;
    00107   Date date;
    00108   NewsSubtype subtype;
    00109   NewsFlag flags;
    00110
    00111   uint data_a;
    00112   uint data_b;
    00113
    00114   void *free_data;
    00115
    00116   uint64 params[10];
    00117 };
    00118
    00125 struct CompanyNewsInformation {
    00126   char company_name[64];
    00127   char president_name[64];
    00128   char other_company_name[64];
    00129
    00130   uint32 face;
    00131   byte colour;
    00132
    00133   void FillData(const struct Company *c, const struct Company *other = NULL);
    00134 };
    00135
    00136 #endif /* NEWS_TYPE_H */