the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1/********************************************************
2* *
3* Copyright (C) Microsoft. All rights reserved. *
4* *
5********************************************************/
6
7// Sentient Client News API
8//
9// Include this to get access to all News-related Sentient features.
10
11#pragma once
12
13#include "SenClientTypes.h"
14
15
16namespace Sentient
17{
18
19 // Maximum number of items that will be returned from the service
20 static const size_t MAX_NEWS_ITEM_COUNT = 20;
21
22 // Default news cache expire time
23 // News cache expire time controls the duration between service synchronization.
24 // This duration is measured in seconds. Default value is 6 minutes
25 static const int CACHE_EXPIRE = 5 * 60 * 1000;
26
27 // Extern linkage for News Item Count
28 extern size_t newsItemCount;
29 class NewsItemCountClass
30 {
31 public: NewsItemCountClass() { newsItemCount = MAX_NEWS_ITEM_COUNT; };
32 };
33 static NewsItemCountClass newsItemCountClass;
34
35 // Extern linkage for cache expire
36 extern int cacheExpire;
37 class CacheExpireTimeoutClass
38 {
39 public: CacheExpireTimeoutClass() { cacheExpire = CACHE_EXPIRE; };
40 };
41 static CacheExpireTimeoutClass cacheExpireTimeoutClass;
42
43 // Default characters per second
44 // Used for displaying local news messages through the PostLocalNews API
45 // Used for displaying default news messages through the SetDefaultNewsStrings API
46 static const float DEFAULT_CHARS_PER_SEC = 2.0f;
47
48 // Max size for news ticker messages
49 static const size_t MAX_NEWS_TICKER_MESSAGE_SIZE = 256;
50
51 /**************************
52 ***** News Types *****
53 **************************/
54
55 enum SenTickerMessageType
56 {
57 SenTickerMessageType_Text = 0,
58 SenTickerMessageType_MarketplaceOffer,
59 SenTickerMessageType_Max
60 };
61
62 struct SenTickerData
63 {
64 wchar_t message[MAX_NEWS_TICKER_MESSAGE_SIZE];
65 SenTickerMessageType messageType;
66 INT64 data1;
67 INT64 data2;
68 float charPerSec;
69 };
70
71 /**************************
72 ***** News Functions *****
73 **************************/
74
75 // Ticker messages need to be pulled whenever the ticker is displayed. Call this function to get the next message to display
76
77 /// @brief public
78 ///
79 /// @param[in\out] userIndex
80 /// @param[in\out] out_tickerData
81 ///
82 /// @return HRESULT
83 ///
84 /// @details <Insert detailed method documentation>
85 ///
86 /// @related <Related API>
87 HRESULT SenGetTickerMessage(
88 int userIndex,
89 SenTickerData *out_tickerData );
90
91} // namespace Sentient