2023-11-20 23:25:36 -06:00
# pragma region License
2023-11-14 18:11:32 -06:00
/*
License ( OLC - 3 )
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
2024-01-02 00:46:32 -06:00
Copyright 2024 Joshua Sigona < sigonasr2 @ gmail . com >
2023-11-14 18:11:32 -06:00
Redistribution and use in source and binary forms , with or without modification ,
are permitted provided that the following conditions are met :
1. Redistributions or derivations of source code must retain the above copyright
notice , this list of conditions and the following disclaimer .
2. Redistributions or derivative works in binary form must reproduce the above
copyright notice . This list of conditions and the following disclaimer must be
reproduced in the documentation and / or other materials provided with the distribution .
3. Neither the name of the copyright holder nor the names of its contributors may
be used to endorse or promote products derived from this software without specific
prior written permission .
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND ANY
EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT LIMITED TO , THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT
SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT ,
INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF USE , DATA , OR PROFITS ; OR
BUSINESS INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY , WHETHER IN
CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE , EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE .
2023-11-29 00:50:00 -06:00
Portions of this software are copyright © 2023 The FreeType
Project ( www . freetype . org ) . Please see LICENSE_FT . txt for more information .
All rights reserved .
2023-11-14 18:11:32 -06:00
*/
2023-11-20 23:25:36 -06:00
# pragma endregion
2023-10-06 17:19:02 -05:00
# pragma once
# include <string>
# include <functional>
# include <map>
2023-10-06 18:46:13 -05:00
# include "olcUTIL_DataFile.h"
2023-11-30 22:01:04 -06:00
# include "AttributableStat.h"
2023-11-30 23:33:40 -06:00
# include "BitwiseEnum.h"
2023-12-10 16:18:38 -06:00
# include <optional>
2023-12-17 23:37:37 -06:00
# include "Merchant.h"
2023-12-27 01:12:48 -06:00
# include "CraftingRequirement.h"
2023-12-27 02:30:15 -06:00
# include "FunctionPriming.h"
2023-10-06 17:19:02 -05:00
2024-01-04 05:21:56 -06:00
class AiL ;
2023-10-06 17:19:02 -05:00
class ItemInfo ;
2023-10-07 15:47:26 -05:00
class ItemProps ;
2023-10-06 17:19:02 -05:00
2023-12-05 23:07:49 -06:00
using IT = std : : string ;
using ITCategory = std : : string ;
2024-01-08 05:26:20 -06:00
using EventName = std : : string ;
2023-10-07 13:33:27 -05:00
2024-01-04 05:21:56 -06:00
using ItemScript = std : : function < bool ( AiL * , ItemProps ) > ;
2023-10-07 15:47:26 -05:00
2023-11-30 23:33:40 -06:00
enum class EquipSlot {
HELMET = 0 b0000 ' 0001 ,
WEAPON = 0 b0000 ' 0010 ,
ARMOR = 0 b0000 ' 0100 ,
GLOVES = 0 b0000 ' 1000 ,
PANTS = 0 b0001 ' 0000 ,
SHOES = 0 b0010 ' 0000 ,
RING1 = 0 b0100 ' 0000 ,
RING2 = 0 b1000 ' 0000 ,
NONE = 0 b0000 ' 0000 ,
} ;
2023-12-09 06:08:13 -06:00
enum class CompactText {
COMPACT ,
2023-12-28 02:55:59 -06:00
NON_COMPACT ,
CRAFTING_INFO
2023-12-09 06:08:13 -06:00
} ;
using enum CompactText ;
2023-11-30 22:01:04 -06:00
struct Stats : ItemAttributable {
2023-12-23 21:15:08 -06:00
static safemap < int , float > maxDamageReductionTable ;
static void InitializeDamageReductionTable ( ) ;
2023-11-30 22:01:04 -06:00
public :
2023-12-23 21:15:08 -06:00
inline static const float & GetDamageReductionPct ( int defense ) {
return maxDamageReductionTable . at ( std : : clamp ( defense , 0 , 1000 ) ) ;
}
2023-12-04 19:24:49 -06:00
inline Stats & operator + = ( Stats & rhs ) {
2023-12-23 21:15:08 -06:00
for ( auto & [ key , value ] : ItemAttribute : : attributes ) {
A ( value ) + = rhs . get_readOnly ( value ) ;
2023-11-30 22:01:04 -06:00
}
2023-11-30 23:33:40 -06:00
return * this ;
2023-11-30 22:01:04 -06:00
} ;
2023-12-06 20:52:48 -06:00
inline Stats & operator + = ( ItemAttributable & rhs ) {
2023-12-23 21:15:08 -06:00
for ( auto & [ key , value ] : ItemAttribute : : attributes ) {
A ( value ) + = rhs . get_readOnly ( value ) ;
2023-12-06 20:52:48 -06:00
}
return * this ;
} ;
2023-12-09 04:36:00 -06:00
auto begin ( ) const {
return attributes . begin ( ) ;
}
auto end ( ) const {
return attributes . end ( ) ;
}
2023-12-31 16:32:30 -06:00
const size_t size ( ) const {
return attributes . size ( ) ;
}
2023-12-09 06:08:13 -06:00
const std : : string GetStatsString ( CompactText compact = NON_COMPACT ) const ;
2023-12-31 23:18:32 -06:00
friend const bool operator = = ( const Stats & lhs , const Stats & rhs ) { return lhs . attributes = = rhs . attributes ; }
2023-11-30 22:01:04 -06:00
} ;
2024-01-08 02:05:09 -06:00
struct Stats ;
2023-12-27 01:12:48 -06:00
class CraftingRequirement ;
struct EnhancementLevelInfo {
const Stats & stats ;
const CraftingRequirement & craftingRequirement ;
EnhancementLevelInfo ( const Stats & stats , const CraftingRequirement & craftingRequirement ) ;
} ;
2023-11-30 22:01:04 -06:00
struct EnhancementInfo {
private :
std : : vector < Stats > enhancementStats ;
2023-12-27 01:12:48 -06:00
std : : vector < CraftingRequirement > craftingRequirements ;
2023-12-28 21:48:12 -06:00
uint8_t availableChapter = 1 ;
2023-11-30 22:01:04 -06:00
public :
2023-12-27 00:24:39 -06:00
void SetAttribute ( int enhanceLevel , ItemAttribute attribute , float value ) ;
2023-12-28 21:48:12 -06:00
void SetCraftingRequirements ( const int enhanceLevel , const std : : vector < std : : pair < IT , int > > & requiredItems , const uint32_t goldCost , const uint8_t availableChapter ) ;
2023-12-27 02:30:15 -06:00
const bool CanBeEnhanced ( ) const ;
2023-12-28 21:48:12 -06:00
const uint8_t AvailableChapter ( ) const ;
2023-12-27 01:12:48 -06:00
const EnhancementLevelInfo operator [ ] ( int level ) const ;
2023-12-05 23:07:49 -06:00
const size_t size ( ) const ;
2023-11-30 22:01:04 -06:00
} ;
2023-12-04 19:24:49 -06:00
//You cannot create instances of this class, access sets from ItemSet::sets and add the appropriate set bonuses.
2023-11-30 22:01:04 -06:00
class ItemSet {
2023-12-04 19:24:49 -06:00
friend class ItemInfo ;
2023-11-30 22:01:04 -06:00
static std : : map < std : : string , ItemSet > sets ;
std : : array < Stats , 8 > setBonuses ;
2023-12-08 17:48:40 -06:00
std : : string name ;
2023-12-09 04:36:00 -06:00
std : : vector < std : : pair < int , Stats > > setBonusBreakpoints ;
2023-11-30 22:01:04 -06:00
public :
2023-12-08 17:48:40 -06:00
//NO CONSTRUCTOR REQUIRED!
2023-11-30 22:01:04 -06:00
//Specify the piece count(1-8) for a set bonus to be applied.
2023-12-04 19:24:49 -06:00
static void AddSetBonus ( std : : string setName , int pieceCount , Stats & bonuses ) ;
2023-11-30 23:33:40 -06:00
//Gets a set bonus based on number of pieces (1-8)
2023-11-30 22:01:04 -06:00
const Stats & operator [ ] ( int setPieces ) const ;
2023-12-08 17:48:40 -06:00
const std : : string & GetSetName ( ) const ;
bool operator < ( const ItemSet & rhs ) const {
return name < rhs . name ;
}
2023-12-09 04:36:00 -06:00
const std : : vector < std : : pair < int , Stats > > & GetSetBonusBreakpoints ( ) const ;
2023-11-30 22:01:04 -06:00
} ;
2023-10-06 17:19:02 -05:00
class Item {
2023-10-07 13:33:27 -05:00
friend class Inventory ;
2024-01-04 05:21:56 -06:00
friend class AiL ;
2023-12-06 22:47:09 -06:00
friend class Menu ;
2024-01-01 04:58:06 -06:00
friend class SaveFile ;
2023-12-17 23:37:37 -06:00
friend void Merchant : : PurchaseItem ( IT item , uint32_t amt ) ;
2023-12-29 06:25:54 -06:00
friend void Merchant : : SellItem ( std : : weak_ptr < Item > , uint32_t amt ) ;
2023-10-06 17:19:02 -05:00
private :
2023-11-26 14:45:55 -06:00
//The amount in the current item stack.
2023-10-07 13:33:27 -05:00
uint32_t amt ;
2023-11-30 22:01:04 -06:00
uint8_t enhancementLevel ;
2023-10-06 17:19:02 -05:00
ItemInfo * it ;
2024-01-01 03:49:37 -06:00
Stats randomizedStats ;
2023-12-17 23:37:37 -06:00
void SetAmt ( uint32_t newAmt ) ;
2024-01-01 03:49:37 -06:00
static ItemEnhancementFunctionPrimingData enhanceFunctionPrimed ;
2023-12-22 06:14:37 -06:00
static int IsBlankStaticCallCounter ;
const bool _IsBlank ( ) const ;
2023-10-07 13:33:27 -05:00
public :
2024-01-08 02:05:09 -06:00
static const std : : string BLANK_ITEM_NAME ;
2023-10-07 15:47:26 -05:00
Item ( ) ;
2023-11-30 22:01:04 -06:00
Item ( uint32_t amt , IT item , uint8_t enhancementLevel = 0 ) ;
2023-12-17 23:37:37 -06:00
uint32_t Amt ( ) const ;
//Use this for places where the item name is used for item tracking. NOT for drawing. Hooks directly into item info's base item name.
const std : : string & ActualName ( ) const ;
//Use for places where the item name is actually displayed. Provides modified text that shows additional information like enhancement levels.
const std : : string DisplayName ( ) const ;
const std : : string Description ( CompactText compact = COMPACT ) const ;
2024-01-08 05:26:20 -06:00
const EventName & UseSound ( ) const ;
2023-12-09 04:36:00 -06:00
const ITCategory Category ( ) const ;
2023-12-17 23:37:37 -06:00
const EquipSlot GetEquipSlot ( ) const ;
const : : Decal * const Decal ( ) const ;
2023-12-09 04:36:00 -06:00
const Stats GetStats ( ) const ;
2023-12-17 23:37:37 -06:00
const ItemScript & OnUseAction ( ) const ;
const float CastTime ( ) const ;
2023-12-22 07:39:56 -06:00
const bool UseDuringCast ( ) const ; //When true, the item is activated during the cast instead of after the cast.
2023-12-17 23:37:37 -06:00
const float CooldownTime ( ) const ;
2023-12-22 06:14:37 -06:00
//Use ISBLANK macro instead!! This should not be called directly!!
2023-12-17 23:37:37 -06:00
const bool IsBlank ( ) const ;
const uint8_t EnhancementLevel ( ) const ;
2023-12-28 06:10:46 -06:00
//NOTE: This function must be primed with CanEnhanceItem()! Otherwise it will cause a runtime error.
2023-12-29 02:43:59 -06:00
void EnhanceItem ( uint8_t qty = 1 ) ;
2023-12-28 06:10:46 -06:00
//Whether or not this item can be enhanced/crafted.
const bool EnhancementIsPossible ( ) const ;
//A verification function that confirms if we are allowed to perform an enhancement. MUST BE CALLED to prime EnhanceItem() function!!
2023-12-29 02:43:59 -06:00
const bool CanEnhanceItem ( uint8_t qty = 1 ) const ;
2023-12-22 06:14:37 -06:00
static std : : shared_ptr < Item > BLANK ;
2023-12-18 15:40:36 -06:00
const std : : optional < const : : ItemSet * const > ItemSet ( ) const ;
2023-12-17 23:37:37 -06:00
const bool IsEquippable ( ) const ;
2023-12-28 02:55:59 -06:00
const bool IsCraftable ( ) const ;
2023-12-27 20:40:01 -06:00
const bool IsWeapon ( ) const ;
const bool IsArmor ( ) const ;
const bool IsAccessory ( ) const ;
2023-12-17 23:37:37 -06:00
const uint32_t BuyValue ( ) const ;
const uint32_t SellValue ( ) const ;
const bool CanBeSold ( ) const ;
const bool CanBePurchased ( ) const ;
2023-12-31 15:29:05 -06:00
const Stats & RandomStats ( ) const ;
2023-12-31 15:47:18 -06:00
void RandomizeStats ( ) ;
2023-12-31 16:32:30 -06:00
const bool HasRandomizedStats ( ) const ;
2023-12-27 02:30:15 -06:00
const EnhancementInfo & GetEnhancementInfo ( ) const ;
2023-12-22 06:14:37 -06:00
//Use ISBLANK macro instead!! This should not be called directly!!
static bool IsBlank ( std : : shared_ptr < Item > item ) ;
//Use ISBLANK macro instead!! This should not be called directly!!
static bool IsBlank ( std : : weak_ptr < Item > item ) ;
2023-12-31 23:18:32 -06:00
friend const bool operator = = ( std : : shared_ptr < Item > lhs , std : : shared_ptr < Item > rhs ) { return lhs - > it = = rhs - > it & & lhs - > randomizedStats = = rhs - > randomizedStats ; } ;
2023-12-22 06:14:37 -06:00
friend const bool operator = = ( std : : shared_ptr < Item > lhs , const IT & rhs ) { return lhs - > ActualName ( ) = = rhs ; } ;
2023-12-31 23:18:32 -06:00
friend const bool operator = = ( std : : weak_ptr < Item > lhs , std : : weak_ptr < Item > rhs ) { return ! lhs . expired ( ) & & ! rhs . expired ( ) & & lhs . lock ( ) - > it = = rhs . lock ( ) - > it & & lhs . lock ( ) - > randomizedStats = = rhs . lock ( ) - > randomizedStats ; } ;
2023-12-22 06:14:37 -06:00
friend const bool operator = = ( std : : weak_ptr < Item > lhs , const IT & rhs ) { return ! lhs . expired ( ) & & lhs . lock ( ) - > ActualName ( ) = = rhs ; } ;
friend const bool operator = = ( const IT & lhs , std : : weak_ptr < Item > rhs ) { return operator = = ( rhs , lhs ) ; } ;
friend const bool operator = = ( const IT & lhs , std : : shared_ptr < Item > rhs ) { return operator = = ( rhs , lhs ) ; } ;
2023-10-06 17:19:02 -05:00
} ;
class Inventory {
2023-10-07 16:26:03 -05:00
friend class ItemInfo ;
2023-11-26 14:45:55 -06:00
friend class Item ;
2024-01-01 03:49:37 -06:00
friend class SaveFile ;
2023-10-06 17:19:02 -05:00
public :
2024-01-01 04:58:06 -06:00
static std : : weak_ptr < Item > AddItem ( IT it , uint32_t amt = 1 , bool monsterDrop = false ) ;
2023-11-26 14:45:55 -06:00
//Returns the actual amount available in your main inventory.
2023-12-31 15:29:05 -06:00
[ [ nodiscard ] ] static uint32_t GetItemCount ( IT it ) ;
2023-12-29 06:25:54 -06:00
static std : : vector < std : : shared_ptr < Item > > CopyItem ( IT it ) ;
static std : : vector < std : : weak_ptr < Item > > GetItem ( IT it ) ;
2023-10-07 13:33:27 -05:00
//Auto-executes its use function and removes the amt specified from the inventory. Multiple amounts will cause the item to execute its useFunc multiple times.
2023-11-11 17:31:53 -06:00
static bool UseItem ( IT it , uint32_t amt = 1 ) ;
2023-12-29 06:25:54 -06:00
static bool RemoveItem ( std : : weak_ptr < Item > itemRef , ITCategory inventory , uint32_t amt = 1 ) ;
static bool RemoveItem ( std : : weak_ptr < Item > itemRef , uint32_t amt = 1 ) ;
2023-12-27 17:00:52 -06:00
static const std : : vector < std : : shared_ptr < Item > > & get ( ITCategory itemCategory ) ;
2023-12-22 06:14:37 -06:00
static const std : : weak_ptr < Item > GetInventorySlot ( ITCategory itemCategory , size_t slot ) ;
2023-11-20 22:56:35 -06:00
static void Clear ( ITCategory itemCategory ) ;
2023-12-22 06:14:37 -06:00
static void EquipItem ( const std : : weak_ptr < Item > it , EquipSlot slot ) ;
2023-11-30 23:33:40 -06:00
static void UnequipItem ( EquipSlot slot ) ;
2023-12-22 06:14:37 -06:00
static EquipSlot GetSlotEquippedIn ( const std : : weak_ptr < Item > it ) ;
static std : : weak_ptr < Item > GetEquip ( EquipSlot slot ) ;
2023-12-09 04:36:00 -06:00
static const std : : map < ItemSet , int > GetEquippedItemSets ( ) ;
2024-01-28 19:39:01 -06:00
//Gets all items currently on inventory (Ignores Stage Loot and Monster Loot Inventories)
static const std : : vector < std : : shared_ptr < Item > > GetInventory ( ) ;
2023-10-07 13:49:32 -05:00
2023-10-07 18:28:19 -05:00
static bool SwapItems ( ITCategory itemCategory , uint32_t slot1 , uint32_t slot2 ) ;
2023-11-14 23:20:13 -06:00
//Makes sure this is a valid category. Will error out if it doesn't exist! Use for ERROR HANDLING!
static bool ValidateItemCategory ( ITCategory itemCategory ) {
get ( itemCategory ) ;
return true ;
}
2023-10-06 17:19:02 -05:00
private :
2023-12-29 06:25:54 -06:00
static void InsertIntoSortedInv ( std : : shared_ptr < Item > itemRef ) ;
2024-01-28 19:39:01 -06:00
static void InsertIntoStageInventoryCategory ( std : : shared_ptr < Item > itemRef , const bool monsterDrop ) ;
2023-10-07 13:33:27 -05:00
static bool ExecuteAction ( IT item ) ;
2023-12-29 06:25:54 -06:00
static std : : multimap < IT , std : : shared_ptr < Item > > _inventory ;
2023-12-22 06:14:37 -06:00
static std : : map < EquipSlot , std : : weak_ptr < Item > > equipment ;
2023-11-26 14:45:55 -06:00
//Only contains "1" of every item, as this is a map to index items and not the actual storage of items!
2023-12-22 06:14:37 -06:00
static std : : map < ITCategory , std : : vector < std : : shared_ptr < Item > > > sortedInv ;
2023-10-06 17:19:02 -05:00
} ;
2023-10-06 18:46:13 -05:00
class ItemProps {
friend class ItemInfo ;
utils : : datafile * scriptProps ;
utils : : datafile * customProps ;
public :
ItemProps ( utils : : datafile * scriptProps , utils : : datafile * customProps ) ;
2023-12-22 07:08:53 -06:00
int GetIntProp ( const std : : string & prop , size_t index = 0 ) const ;
float GetFloatProp ( const std : : string & prop , size_t index = 0 ) const ;
std : : string GetStringProp ( const std : : string & prop , size_t index = 0 ) const ;
const uint32_t PropCount ( const std : : string & prop ) const ;
2023-10-06 18:46:13 -05:00
} ;
2023-10-06 17:19:02 -05:00
class ItemInfo {
2023-10-07 13:33:27 -05:00
friend class Inventory ;
2023-12-29 01:00:42 -06:00
friend class Menu ;
2023-10-06 17:19:02 -05:00
std : : string name ;
2023-10-06 18:46:13 -05:00
std : : string description ;
std : : string category ;
2023-11-26 14:45:55 -06:00
float castTime = 0 ;
float cooldownTime = 0 ;
2023-11-30 23:33:40 -06:00
EquipSlot slot ;
2023-11-30 22:01:04 -06:00
EnhancementInfo enhancement ;
2023-12-10 16:18:38 -06:00
: : Decal * img ;
2024-01-08 05:26:20 -06:00
EventName useSound = " " ;
2023-12-08 17:48:40 -06:00
std : : string set = " " ;
2023-10-06 17:19:02 -05:00
//Returns true if the item can be used, false otherwise
2023-10-06 18:46:13 -05:00
std : : string useFunc = " " ;
//Custom properties for this specific item's script.
static utils : : datafile NOPROPS ;
ItemProps customProps ;
2023-12-17 23:37:37 -06:00
uint32_t buyValue = 0 ;
uint32_t sellValue = 0 ;
2023-12-22 07:39:56 -06:00
//If true, this item's action is activated at the beginning of the cast instead of after the cast completes.
bool useDuringCast = false ;
2023-12-31 15:29:05 -06:00
Stats minStats ;
Stats maxStats ;
2023-10-06 18:46:13 -05:00
private :
static void InitializeScripts ( ) ;
2023-12-04 19:24:49 -06:00
static void InitializeSets ( ) ;
2023-11-30 23:33:40 -06:00
static std : : map < std : : string , EquipSlot > nameToEquipSlot ;
2023-12-29 01:00:42 -06:00
static std : : vector < std : : shared_ptr < Item > > craftableConsumables ;
2023-10-06 17:19:02 -05:00
public :
static void InitializeItems ( ) ;
2023-10-06 18:46:13 -05:00
ItemInfo ( ) ;
2023-12-17 23:37:37 -06:00
const std : : string & Name ( ) const ;
const std : : string & Description ( ) const ;
const ITCategory Category ( ) const ;
const : : Decal * const Decal ( ) const ;
2023-10-06 17:19:02 -05:00
/*
2023-11-26 14:45:55 -06:00
For the useFunc , return true if the item can be used , false otherwise .
2023-10-06 17:19:02 -05:00
*/
2024-01-08 05:26:20 -06:00
const EventName & UseSound ( ) const ;
2023-12-17 23:37:37 -06:00
const ItemScript & OnUseAction ( ) const ;
2023-12-31 16:32:30 -06:00
const Stats GetStats ( int enhancementLevel ) const ;
2023-12-17 23:37:37 -06:00
const float CastTime ( ) const ;
const float CooldownTime ( ) const ;
const EquipSlot Slot ( ) const ;
2023-12-18 15:40:36 -06:00
const std : : optional < const : : ItemSet * const > ItemSet ( ) const ;
2023-12-17 20:49:22 -06:00
ItemInfo & operator [ ] ( const IT & item ) ;
2023-12-17 23:37:37 -06:00
const uint32_t GetBuyValue ( ) const ;
const uint32_t GetSellValue ( ) const ;
const bool CanBeSold ( ) const ;
const bool CanBePurchased ( ) const ;
2023-12-22 07:39:56 -06:00
const bool UseDuringCast ( ) const ;
2023-12-27 02:30:15 -06:00
const EnhancementInfo & GetEnhancementInfo ( ) const ;
2023-12-27 20:40:01 -06:00
const bool IsEquippable ( ) const ;
2023-12-28 02:55:59 -06:00
const bool IsCraftable ( ) const ;
2023-12-27 20:40:01 -06:00
const bool IsWeapon ( ) const ;
const bool IsArmor ( ) const ;
const bool IsAccessory ( ) const ;
2023-12-31 15:29:05 -06:00
const Stats GetMinStats ( ) const ;
const Stats GetMaxStats ( ) const ;
Stats RandomizeStats ( ) ;
2023-11-26 12:17:35 -06:00
} ;
class ItemOverlay {
ItemInfo it ;
float timer = 0 ;
float xOffset = 0 ;
float width = 0 ; //How wide the entire label is.
static std : : vector < ItemOverlay > items ;
ItemOverlay ( ItemInfo item ) ;
public :
static void AddToItemOverlay ( const ItemInfo & it ) ;
static void Update ( ) ;
static void Draw ( ) ;
2023-11-26 15:51:13 -06:00
void ResetTimer ( ) ;
2023-12-22 06:14:37 -06:00
} ;
# define ISBLANK(itemRef) Item::IsBlank(itemRef)