sdk-world v2026.11.05
PS2 SDK - world tier (copyleft-allowed, non-essential packages)
Loading...
Searching...
No Matches
ftccache.h File Reference

Go to the source code of this file.

Classes

struct  FTC_NodeRec_
struct  FTC_CacheClassRec_
struct  FTC_CacheRec_

Macros

#define FTC_FACE_ID_HASH(i)
#define FTC_NODE(x)
#define FTC_NODE_P(x)
#define FTC_NODE_NEXT(x)
#define FTC_NODE_PREV(x)
#define FTC_NODE_TOP_FOR_HASH(cache, hash)
#define FTC_CACHE(x)
#define FTC_CACHE_P(x)
#define FTC_CACHE_LOOKUP_CMP(cache, nodecmp, hash, query, node, error)
#define FTC_CACHE_TRYLOOP(cache)
#define FTC_CACHE_TRYLOOP_END(list_changed)

Typedefs

typedef struct FTC_CacheRec_ * FTC_Cache
typedef const struct FTC_CacheClassRec_ * FTC_CacheClass
typedef struct FTC_NodeRec_ FTC_NodeRec
typedef FT_Error(*) FTC_Node_NewFunc(FTC_Node *pnode, FT_Pointer query, FTC_Cache cache)
typedef FT_Offset(*) FTC_Node_WeightFunc(FTC_Node node, FTC_Cache cache)
typedef FT_Bool(*) FTC_Node_CompareFunc(FTC_Node node, FT_Pointer key, FTC_Cache cache, FT_Bool *list_changed)
typedef void(*) FTC_Node_FreeFunc(FTC_Node node, FTC_Cache cache)
typedef FT_Error(*) FTC_Cache_InitFunc(FTC_Cache cache)
typedef void(*) FTC_Cache_DoneFunc(FTC_Cache cache)
typedef struct FTC_CacheClassRec_ FTC_CacheClassRec
typedef struct FTC_CacheRec_ FTC_CacheRec

Functions

 ftc_node_destroy (FTC_Node node, FTC_Manager manager)
 FTC_Cache_Init (FTC_Cache cache)
 FTC_Cache_Done (FTC_Cache cache)
 FTC_Cache_NewNode (FTC_Cache cache, FT_Offset hash, FT_Pointer query, FTC_Node *anode)
 FTC_Cache_RemoveFaceID (FTC_Cache cache, FTC_FaceID face_id)

Macro Definition Documentation

◆ FTC_CACHE

#define FTC_CACHE ( x)
Value:
( (FTC_Cache)(x) )

Definition at line 172 of file ftccache.h.

◆ FTC_CACHE_LOOKUP_CMP

#define FTC_CACHE_LOOKUP_CMP ( cache,
nodecmp,
hash,
query,
node,
error )

Definition at line 221 of file ftccache.h.

◆ FTC_CACHE_P

#define FTC_CACHE_P ( x)
Value:
( (FTC_Cache*)(x) )

Definition at line 173 of file ftccache.h.

◆ FTC_CACHE_TRYLOOP

#define FTC_CACHE_TRYLOOP ( cache)
Value:
{ \
FTC_Manager _try_manager = FTC_CACHE( cache )->manager; \
FT_UInt _try_count = 4; \
\
\
for (;;) \
{ \
FT_UInt _try_done;

Definition at line 323 of file ftccache.h.

◆ FTC_CACHE_TRYLOOP_END

#define FTC_CACHE_TRYLOOP_END ( list_changed)
Value:
if ( !error || FT_ERR_NEQ( error, Out_Of_Memory ) ) \
break; \
\
_try_done = FTC_Manager_FlushN( _try_manager, _try_count ); \
if ( _try_done > 0 && list_changed != NULL ) \
*(FT_Bool*)( list_changed ) = TRUE; \
\
if ( _try_done == 0 ) \
break; \
\
if ( _try_done == _try_count ) \
{ \
_try_count *= 2; \
if ( _try_count < _try_done || \
_try_count > _try_manager->num_nodes ) \
_try_count = _try_manager->num_nodes; \
} \
} \
}

Definition at line 334 of file ftccache.h.

◆ FTC_FACE_ID_HASH

#define FTC_FACE_ID_HASH ( i)
Value:
( ( (FT_Offset)(i) >> 3 ) ^ ( (FT_Offset)(i) << 7 ) )

Definition at line 31 of file ftccache.h.

◆ FTC_NODE

#define FTC_NODE ( x)
Value:
( (FTC_Node)(x) )

Definition at line 73 of file ftccache.h.

◆ FTC_NODE_NEXT

#define FTC_NODE_NEXT ( x)
Value:
FTC_NODE( (x)->mru.next )

Definition at line 76 of file ftccache.h.

◆ FTC_NODE_P

#define FTC_NODE_P ( x)
Value:
( (FTC_Node*)(x) )

Definition at line 74 of file ftccache.h.

◆ FTC_NODE_PREV

#define FTC_NODE_PREV ( x)
Value:
FTC_NODE( (x)->mru.prev )

Definition at line 77 of file ftccache.h.

◆ FTC_NODE_TOP_FOR_HASH

#define FTC_NODE_TOP_FOR_HASH ( cache,
hash )
Value:
( ( cache )->buckets + \
( ( ( ( hash ) & ( cache )->mask ) >= ( cache )->p ) \
? ( ( hash ) & ( ( cache )->mask >> 1 ) ) \
: ( ( hash ) & ( cache )->mask ) ) )

Definition at line 81 of file ftccache.h.

Typedef Documentation

◆ FTC_Cache

typedef struct FTC_CacheRec_* FTC_Cache

Definition at line 35 of file ftccache.h.

◆ FTC_Cache_DoneFunc

typedef void(*) FTC_Cache_DoneFunc(FTC_Cache cache)

Definition at line 132 of file ftccache.h.

◆ FTC_Cache_InitFunc

typedef FT_Error(*) FTC_Cache_InitFunc(FTC_Cache cache)

Definition at line 129 of file ftccache.h.

◆ FTC_CacheClass

typedef const struct FTC_CacheClassRec_* FTC_CacheClass

Definition at line 38 of file ftccache.h.

◆ FTC_Node_CompareFunc

typedef FT_Bool(*) FTC_Node_CompareFunc(FTC_Node node, FT_Pointer key, FTC_Cache cache, FT_Bool *list_changed)

Definition at line 118 of file ftccache.h.

◆ FTC_Node_FreeFunc

typedef void(*) FTC_Node_FreeFunc(FTC_Node node, FTC_Cache cache)

Definition at line 125 of file ftccache.h.

◆ FTC_Node_NewFunc

typedef FT_Error(*) FTC_Node_NewFunc(FTC_Node *pnode, FT_Pointer query, FTC_Cache cache)

Definition at line 108 of file ftccache.h.

◆ FTC_Node_WeightFunc

typedef FT_Offset(*) FTC_Node_WeightFunc(FTC_Node node, FTC_Cache cache)

Definition at line 113 of file ftccache.h.

Function Documentation

◆ FTC_Cache_Done()

FTC_Cache_Done ( FTC_Cache cache)

Definition at line 388 of file ftccache.c.

◆ FTC_Cache_Init()

FTC_Cache_Init ( FTC_Cache cache)

Definition at line 338 of file ftccache.c.

◆ FTC_Cache_NewNode()

FTC_Cache_NewNode ( FTC_Cache cache,
FT_Offset hash,
FT_Pointer query,
FTC_Node * anode )

Definition at line 423 of file ftccache.c.

◆ FTC_Cache_RemoveFaceID()

FTC_Cache_RemoveFaceID ( FTC_Cache cache,
FTC_FaceID face_id )

Definition at line 543 of file ftccache.c.

◆ ftc_node_destroy()

ftc_node_destroy ( FTC_Node node,
FTC_Manager manager )

Definition at line 267 of file ftccache.c.