Use array<> for bogus_data

This commit is contained in:
Kp 2015-02-28 19:36:01 +00:00
parent 8ad180c0a2
commit b940ca0510
3 changed files with 9 additions and 9 deletions

View file

@ -82,7 +82,7 @@ extern int PCSharePig;
extern grs_bitmap bogus_bitmap;
#endif
extern ubyte bogus_data[64 * 64];
extern array<uint8_t, 64 * 64> bogus_data;
int properties_init();
void piggy_close();

View file

@ -918,7 +918,7 @@ static void say_unused_tmaps(PHYSFS_file *my_file, int *tb)
#endif
for (i=0; i < bound; i++)
if (!tb[i]) {
if (GameBitmaps[Textures[i].index].bm_data == bogus_data)
if (GameBitmaps[Textures[i].index].bm_data == bogus_data.data())
PHYSFSX_printf(my_file, "U");
else
PHYSFSX_printf(my_file, " ");

View file

@ -146,8 +146,8 @@ int piggy_page_flushed = 0;
static RAIIPHYSFS_File Piggy_fp;
ubyte bogus_data[64*64];
ubyte bogus_bitmap_initialized=0;
array<uint8_t, 64 * 64> bogus_data;
digi_sound bogus_sound;
#if defined(DXX_BUILD_DESCENT_I)
@ -442,21 +442,21 @@ int properties_init()
ubyte c;
bogus_bitmap_initialized = 1;
c = gr_find_closest_color( 0, 0, 63 );
for (i=0; i<4096; i++ ) bogus_data[i] = c;
bogus_data.fill(c);
c = gr_find_closest_color( 63, 0, 0 );
// Make a big red X !
for (i=0; i<64; i++ ) {
bogus_data[i*64+i] = c;
bogus_data[i*64+(63-i)] = c;
}
gr_init_bitmap(bogus_bitmap, 0, 0, 0, 64, 64, 64, bogus_data);
gr_init_bitmap(bogus_bitmap, 0, 0, 0, 64, 64, 64, bogus_data.data());
piggy_register_bitmap( &bogus_bitmap, "bogus", 1 );
#ifdef ALLEGRO
bogus_sound.len = 64*64;
#else
bogus_sound.length = 64*64;
#endif
bogus_sound.data = bogus_data;
bogus_sound.data = bogus_data.data();
//added on 11/13/99 by Victor Rachels to ready for changing freq
bogus_sound.freq = 11025;
bogus_sound.bits = 8;
@ -1124,17 +1124,17 @@ int properties_init(void)
bogus_bitmap_initialized = 1;
c = gr_find_closest_color( 0, 0, 63 );
for (i=0; i<4096; i++ ) bogus_data[i] = c;
bogus_data.fill(c);
c = gr_find_closest_color( 63, 0, 0 );
// Make a big red X !
for (i=0; i<64; i++ ) {
bogus_data[i*64+i] = c;
bogus_data[i*64+(63-i)] = c;
}
gr_init_bitmap(GameBitmaps[Num_bitmap_files], 0, 0, 0, 64, 64, 64, bogus_data);
gr_init_bitmap(GameBitmaps[Num_bitmap_files], 0, 0, 0, 64, 64, 64, bogus_data.data());
piggy_register_bitmap(&GameBitmaps[Num_bitmap_files], "bogus", 1);
bogus_sound.length = 64*64;
bogus_sound.data = bogus_data;
bogus_sound.data = bogus_data.data();
GameBitmapOffset[0] = 0;
}