the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at master 50 lines 1.7 kB view raw
1/******************************************************** 2* * 3* Copyright (C) Microsoft. All rights reserved. * 4* * 5********************************************************/ 6 7// Sentient Client Utility API 8// 9// Include this to get access to all Utility-related Sentient features. 10 11#pragma once 12 13#include "SenClientTypes.h" 14 15 16namespace Sentient 17{ 18 /************************* 19 ***** Utility Types ***** 20 *************************/ 21 22 // This function should return the width (in pixels) of a single 23 // character, and is used to check how many characters can fit on a 24 // single line of the screen 25 typedef unsigned int (*SenUtilGetCharacterWidthCallback)( wchar_t character ); 26 27 28 /***************************** 29 ***** Utility Functions ***** 30 *****************************/ 31 32 // This function takes a multi-line text string, a width (in pixels) that 33 // a text line can be, and a callback to measure the width of each character. 34 // It will return the end of the current text line, and the beginning of 35 // the next text line. Use the beginning of the next text line as input next 36 // time you call SenUtilWordWrapFindNextLine() 37 void SenUtilWordWrapFindNextLine( 38 const wchar_t *startOfThisLine, 39 unsigned int maxWidth, 40 SenUtilGetCharacterWidthCallback characterWidthCallback, 41 const wchar_t **out_endOfThisLine, 42 const wchar_t **out_beginningOfNextLine ); 43 44 // This returns a SYSTEMTIME set to its earliest possible value. 45 SYSTEMTIME SenUtilDateTimeMin(); 46 47 // This returns a SYSTEMTIME set to its latest possible value. 48 SYSTEMTIME SenUtilDateTimeMax(); 49 50} // namespace Sentient