Searches thru all bitmaps for a specific name, returns -1 if not found or index of bitmap with name
| 575 | // Searches thru all bitmaps for a specific name, returns -1 if not found |
| 576 | // or index of bitmap with name |
| 577 | int 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 |
| 590 | void bm_FreeBitmap(int handle) { |
| 591 | if (!Bitmaps_initted) { |
no test coverage detected