Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: code/bmpman/bmpman.cpp
- ===================================================================
- --- code/bmpman/bmpman.cpp (revision 11296)
- +++ code/bmpman/bmpman.cpp (working copy)
- @@ -65,7 +65,7 @@
- // locals
- static unsigned int Bm_next_signature = 0x1234;
- -static int bm_next_handle = 1;
- +static size_t bm_next_handle = 1;
- int Bm_low_mem = 0;
- // Bm_max_ram - How much RAM bmpman can use for textures.
- // Set to <1 to make it use all it wants.
- @@ -462,10 +462,11 @@
- bool animated = ((bm_bitmaps[i].type == BM_TYPE_EFF) || (bm_bitmaps[i].type == BM_TYPE_ANI));
- - if ( animated_type && !animated )
- + if ( animated_type != animated ) {
- + if (bm_bitmaps[i].info.ani.num_frames > 1)
- + i += bm_bitmaps[i].info.ani.num_frames - 1;
- continue;
- - else if ( !animated_type && animated )
- - continue;
- + }
- if ( !strextcmp(real_filename, bm_bitmaps[i].filename) ) {
- nprintf(("BmpFastLoad", "Found bitmap %s -- number %d\n", bm_bitmaps[i].filename, i));
- @@ -472,7 +473,8 @@
- bm_bitmaps[i].load_count++;
- *handle = bm_bitmaps[i].handle;
- return 1;
- - }
- + } else if (bm_bitmaps[i].info.ani.num_frames > 1)
- + i += bm_bitmaps[i].info.ani.num_frames - 1;
- }
- // not found to be loaded already
- @@ -555,6 +557,8 @@
- if (bm_bitmaps[i].type == BM_TYPE_NONE) {
- free_slot = i;
- break;
- + } else if (bm_bitmaps[i].info.ani.num_frames > 1) {
- + i += bm_bitmaps[i].info.ani.num_frames - 1;
- }
- }
- @@ -736,6 +740,8 @@
- cnt++;
- } else {
- cnt = 0;
- + if (bm_bitmaps[i].info.ani.num_frames > 1)
- + i += bm_bitmaps[i].info.ani.num_frames - 1;
- }
- if (cnt == n)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement