Functions | |
void | Begin_Texture_Search (void) |
These routines recall all the defined texture names. More... | |
void | End_Texture_Search (void) |
Terminates the texture search sequence and frees any involved memory. More... | |
HC_BOOLEAN | Find_Texture (char *name) |
Retrieves the texture names, one at a time. The function returns false when all textures have been returned. More... | |
void | Show_Texture_Count (int *count) |
Finds out how many textures will be returned. This is useful for determining the size of a data structure needed to store incoming items. More... | |
Detailed Description
Function Documentation
◆ Begin_Texture_Search()
void Begin_Texture_Search | ( | void | ) |
These routines recall all the defined texture names.
DETAILS
These routines are used to find all of the texture definitions that exist in the database. For example,
Begin_Texture_Search () while (Find_Texture (the_name)) Show_Texture(the_name, definition) End_Texture_Search ()
retrieves all the known names, in the style in which they were originally defined. If you need to know how many texture definitions will be returned (possibly for allocating a data structure to hold them) call Show_Texture_Count() after initiating the search.
Find_Texture() returns the names (one at a time). The function returns false when all texture names have been returned.
End_Texture_Search() terminates the process and frees any involved memory. This last step can be done any time after the initial call to Begin_Texture_Search() .
NOTES
If you want to examine the texture name definitions, call Show_Texture() on the results of Find_Texture() .
After calling Begin_Texture_Search() , if a texture becomes undefined (via UnDefine_Texture() ), subsequent calls to Find_Texture() will not return it. If a texture is redefined, the new definition will be returned. If a new texture is defined, it will not be returned in this search sequence.
Show_Texture_Count() is only valid between Begin_Texture_Search() and End_Texture_Search() . It will always return the total number of textures defined as opposed to the remaining number of texture definitions.
Texture name searches can be nested. A user program can call Begin_Texture_Search() and look at the defined texture names without interfering with a texture name search that might already have been activated by another portion of the program. When End_Texture_Search() is called, the previously active texture name search (if any) becomes current.
RESTRICTIONS
- See also
- Define_Texture, Show_Texture, Parse_String.
◆ End_Texture_Search()
void End_Texture_Search | ( | void | ) |
Terminates the texture search sequence and frees any involved memory.
DETAILS
No additional details. See Begin_Texture_Search()
◆ Find_Texture()
HC_BOOLEAN Find_Texture | ( | char * | name | ) |
Retrieves the texture names, one at a time. The function returns false when all textures have been returned.
- Parameters
-
name - Simple name from the list of definitions. Returned to user. Passed by reference always.
- Returns
- flag
DETAILS
No additional details. See Begin_Texture_Search()
◆ Show_Texture_Count()
void Show_Texture_Count | ( | int * | count | ) |
Finds out how many textures will be returned. This is useful for determining the size of a data structure needed to store incoming items.
- Parameters
-
count - The total number of texture names returned by Find_Texture() . Returned to user. Passed by reference always.
DETAILS
No additional details. See Begin_Texture_Search()