实体
贴图字典 CTxdStore
查看 Markdown贴图字典槽加载与引用
CTxdStore.h
贴图字典槽。加载自定义 UI 贴图常用:AddTxdSlot → LoadTxd → AddRef → SetCurrentTxd。
static int AddTxdSlot(char const* name);
static int FindTxdSlot(char const* name);
static int FindTxdSlot(unsigned int hash);
static void RemoveTxdSlot(int index);static bool LoadTxd(int index, char const* filename);
static bool LoadTxd(int index, RwStream* stream);
static void Create(int index);引用到 0 会删。
static TxdDef* AddRef(int index);
static void RemoveRef(int index);
static TxdDef* RemoveRefWithoutDelete(int index);
static unsigned int GetNumRefs(int index);SetTexture 前要先设当前。
static void SetCurrentTxd(int index);
static void PushCurrentTxd();
static void PopCurrentTxd();static void RemoveTxd(int index);设备丢失时配合 d3dLost / d3dReset 重载,或用 SpriteLoader / DynamicResource。
评论