MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / bm_FindBitmapName

Function bm_FindBitmapName

bitmap/bitmain.cpp:577–588  ·  view source on GitHub ↗

Searches thru all bitmaps for a specific name, returns -1 if not found or index of bitmap with name

Source from the content-addressed store, hash-verified

575// Searches thru all bitmaps for a specific name, returns -1 if not found
576// or index of bitmap with name
577int bm_FindBitmapName(const char *name) {
578 int num_counted = 0;
579
580 bms_bitmap fbmp;
581 strcpy(fbmp.name, name);
582 bm_Node *fnode = bm_findNode(&fbmp);
583 if (fnode) {
584 // mprintf(0,"Hash table found bitmap %d\n",fnode->data - GameBitmaps);
585 return fnode->data - GameBitmaps;
586 } else
587 return -1;
588}
589// Given a handle, frees the bitmap memory and flags this bitmap as unused
590void bm_FreeBitmap(int handle) {
591 if (!Bitmaps_initted) {

Callers 3

ResaveBitmapFunction · 0.85
bm_TestNameFunction · 0.85
bm_ChangeEndNameFunction · 0.85

Calls 1

bm_findNodeFunction · 0.85

Tested by

no test coverage detected