Given a handle, makes a big random shape to let you know you are screwed.
| 976 | } |
| 977 | // Given a handle, makes a big random shape to let you know you are screwed. |
| 978 | void bm_MakeBad(int handle) { |
| 979 | int i, t, limit; |
| 980 | uint16_t *dest; |
| 981 | ASSERT(GameBitmaps[handle].used); |
| 982 | if (handle != BAD_BITMAP_HANDLE) |
| 983 | Int3(); // hmm, you're assigning a random bitmap to something other than |
| 984 | // the default. |
| 985 | if (bm_mipped(handle)) |
| 986 | limit = bm_miplevels(handle); |
| 987 | else |
| 988 | limit = 1; |
| 989 | for (i = 0; i < limit; i++) { |
| 990 | dest = bm_data(handle, i); |
| 991 | |
| 992 | for (t = 0; t < bm_h(handle, i) * bm_w(handle, i); t++) |
| 993 | *dest++ = (OPAQUE_FLAG | ps_rand()); |
| 994 | } |
| 995 | } |
| 996 | |
| 997 | // Saves a bitmap to an open file. Saves the bitmap as an OUTRAGE_COMPRESSED_OGF. |
| 998 | // Returns -1 if something is wrong. |
no test coverage detected