237 /** Add a new newsitem to be shown. |
237 /** Add a new newsitem to be shown. |
238 * @param string String to display, can have special values based on parameter 'flags' |
238 * @param string String to display, can have special values based on parameter 'flags' |
239 * @param flags various control bits that will show various news-types. See macro NEWS_FLAGS() |
239 * @param flags various control bits that will show various news-types. See macro NEWS_FLAGS() |
240 * @param data_a news-specific value based on news type |
240 * @param data_a news-specific value based on news type |
241 * @param data_b news-specific value based on news type |
241 * @param data_b news-specific value based on news type |
242 * @note flags exists of 4 byte-sized extra parameters.<br/> |
242 * @note flags exists of 4 byte-sized extra parameters. |
243 * 1. 0 - 7 display_mode, any of the NewsMode enums (NM_)<br/> |
243 * 1. 0 - 7 display_mode, any of the NewsMode enums (NM_) |
244 * 2. 8 - 15 news flags, any of the NewsFlags enums (NF_) NF_INCOLOR are set automatically if needed<br/> |
244 * 2. 8 - 15 news flags, any of the NewsFlags enums (NF_) NF_INCOLOR are set automatically if needed |
245 * 3. 16 - 23 news category, any of the NewsType enums (NT_)<br/> |
245 * 3. 16 - 23 news category, any of the NewsType enums (NT_) |
246 * 4. 24 - 31 news callback function, any of the NewsCallback enums (DNC_)<br/> |
246 * 4. 24 - 31 news callback function, any of the NewsCallback enums (DNC_) |
247 * If the display mode is NM_CALLBACK special news is shown and parameter |
247 * If the display mode is NM_CALLBACK special news is shown and parameter |
248 * stringid has a special meaning.<br/> |
248 * stringid has a special meaning. |
249 * DNC_TRAINAVAIL, DNC_ROADAVAIL, DNC_SHIPAVAIL, DNC_AIRCRAFTAVAIL: StringID is |
249 * DNC_TRAINAVAIL, DNC_ROADAVAIL, DNC_SHIPAVAIL, DNC_AIRCRAFTAVAIL: StringID is |
250 * the index of the engine that is shown<br/> |
250 * the index of the engine that is shown |
251 * DNC_BANKRUPCY: bytes 0-3 of StringID contains the player that is in trouble, |
251 * DNC_BANKRUPCY: bytes 0-3 of StringID contains the player that is in trouble, |
252 * and 4-7 contains what kind of bankrupcy message is shown, NewsBankrupcy enum (NB_)<br/> |
252 * and 4-7 contains what kind of bankrupcy message is shown, NewsBankrupcy enum (NB_) |
253 * @see NewsMode |
253 * @see NewsMode |
254 * @see NewsFlags |
254 * @see NewsFlags |
255 * @see NewsType |
255 * @see NewsType |
256 * @see NewsCallback */ |
256 * @see NewsCallback */ |
257 void AddNewsItem(StringID string, uint32 flags, uint data_a, uint data_b) |
257 void AddNewsItem(StringID string, uint32 flags, uint data_a, uint data_b) |