diff --git a/gc/ogc/gx.h b/gc/ogc/gx.h index c9701eed..c012c89b 100644 --- a/gc/ogc/gx.h +++ b/gc/ogc/gx.h @@ -4596,6 +4596,8 @@ void GX_PreloadEntireTexture(const GXTexObj *obj,const GXTexRegion *region); */ void GX_InitTlutObj(GXTlutObj *obj,void *lut,u8 fmt,u16 entries); +void GX_InitTlutObjData(GXTlutObj *obj,void *lut); + /*! * \fn void GX_InitTlutRegion(GXTlutRegion *region,u32 tmem_addr,u8 tlut_sz) * \brief Initializes a Texture Look-Up Table (TLUT) region object. diff --git a/libogc/gx.c b/libogc/gx.c index 6722649d..4ee685e5 100644 --- a/libogc/gx.c +++ b/libogc/gx.c @@ -3491,6 +3491,12 @@ void GX_InitTlutObj(GXTlutObj *obj,void *lut,u8 fmt,u16 entries) ptr->tlut_nentries = entries; } +void GX_InitTlutObjData(GXTlutObj *obj,void *lut) +{ + struct __gx_tlutobj *ptr = (struct __gx_tlutobj*)obj; + ptr->tlut_maddr = (ptr->tlut_maddr&~0x00ffffff)|(_SHIFTR(MEM_VIRTUAL_TO_PHYSICAL(lut),5,24)); +} + void GX_GetTlutObjAll(const GXTlutObj *obj,void **lut,u8 *fmt,u16 *entries) { const struct __gx_tlutobj *ptr = (const struct __gx_tlutobj*)obj;