init vars for coverity (mame/video/m-z)

This commit is contained in:
Robbbert 2022-03-30 23:42:12 +11:00
parent a5e2622a25
commit 3b98ddda58
30 changed files with 127 additions and 127 deletions

View File

@ -154,8 +154,8 @@ private:
struct namcos22_scenenode *m_scenenode_cur;
std::list<namcos22_scenenode> m_scenenode_alloc;
float m_clipx;
float m_clipy;
float m_clipx = 0.0;
float m_clipy = 0.0;
rectangle m_cliprect;
inline u8 nthbyte(const u32 *src, int n) { return (src[n / 4] << ((n & 3) * 8)) >> 24; }

View File

@ -14,24 +14,24 @@ struct misc_state_t
m_min_level = 0;
}
int32_t m_fb_format; // Framebuffer pixel format index (0 - I, 1 - IA, 2 - CI, 3 - RGBA)
int32_t m_fb_size; // Framebuffer pixel size index (0 - 4bpp, 1 - 8bpp, 2 - 16bpp, 3 - 32bpp)
int32_t m_fb_width; // Framebuffer width, in pixels
int32_t m_fb_height; // Framebuffer height, in pixels
uint32_t m_fb_address; // Framebuffer source address offset (in bytes) from start of RDRAM
int32_t m_fb_format = 0; // Framebuffer pixel format index (0 - I, 1 - IA, 2 - CI, 3 - RGBA)
int32_t m_fb_size = 0; // Framebuffer pixel size index (0 - 4bpp, 1 - 8bpp, 2 - 16bpp, 3 - 32bpp)
int32_t m_fb_width = 0; // Framebuffer width, in pixels
int32_t m_fb_height = 0; // Framebuffer height, in pixels
uint32_t m_fb_address = 0; // Framebuffer source address offset (in bytes) from start of RDRAM
uint32_t m_zb_address; // Z-buffer source address offset (in bytes) from start of RDRAM
uint32_t m_zb_address = 0; // Z-buffer source address offset (in bytes) from start of RDRAM
int32_t m_ti_format; // Format for Texture Interface (TI) transfers
int32_t m_ti_size; // Size (in bytes) of TI transfers
int32_t m_ti_width; // Width (in pixels) of TI transfers
uint32_t m_ti_address; // Destination address for TI transfers
int32_t m_ti_format = 0; // Format for Texture Interface (TI) transfers
int32_t m_ti_size = 0; // Size (in bytes) of TI transfers
int32_t m_ti_width = 0; // Width (in pixels) of TI transfers
uint32_t m_ti_address = 0; // Destination address for TI transfers
uint32_t m_max_level; // Maximum LOD level for texture filtering
uint32_t m_min_level; // Minimum LOD level for texture filtering
uint16_t m_primitive_z; // Forced Z value for current primitive, if applicable
uint16_t m_primitive_dz; // Forced Delta-Z value for current primitive, if applicable
uint16_t m_primitive_z = 0; // Forced Z value for current primitive, if applicable
uint16_t m_primitive_dz = 0; // Forced Delta-Z value for current primitive, if applicable
};
#if 0

View File

@ -53,12 +53,12 @@ private:
TILEMAP_MAPPER_MEMBER( mapper );
static const int ROZ_TILEMAP_COUNT = 2;
tilemap_t *m_tilemap[ROZ_TILEMAP_COUNT];
tilemap_t *m_tilemap[ROZ_TILEMAP_COUNT]{};
uint16_t m_control[0x20/2];
std::vector<uint16_t> m_videoram;
int m_color_base;
DECLARE_GFXDECODE_MEMBER(gfxinfo);
uint32_t m_ramsize;
uint32_t m_ramsize = 0;
// per-game hacks
bool m_is_namcofl;

View File

@ -122,7 +122,7 @@ protected:
};
std::unique_ptr<c355_sprite []> m_spritelist[2];
const c355_sprite *m_sprite_end[2];
const c355_sprite *m_sprite_end[2]{};
int m_palxor;
u16 m_position[4];
std::unique_ptr<u16 []> m_spriteram[2];

View File

@ -60,7 +60,7 @@ private:
required_shared_ptr<uint16_t> m_tileram;
required_shared_ptr<uint16_t> m_lineram;
optional_region_ptr<uint8_t> m_clut;
tilemap_t * m_tilemap;
tilemap_t * m_tilemap = nullptr;
pen_t m_transparent_color;
int m_xoffset;
};

View File

@ -33,7 +33,7 @@ private:
void zdrawgfxzoom(screen_device &screen, bitmap_rgb32 &dest_bmp, const rectangle &clip, gfx_element *gfx, uint32_t code, uint32_t color, int flipx, int flipy, int sx, int sy, int scalex, int scaley, int zpos);
TILE_GET_INFO_MEMBER( roz_tile_info );
tilemap_t *m_tilemap_roz;
tilemap_t *m_tilemap_roz = nullptr;
required_shared_ptr<uint16_t> m_rozram;
required_shared_ptr<uint16_t> m_roz_ctrl;

View File

@ -51,24 +51,24 @@ public:
void set_pens(const pen_t* pens);
std::unique_ptr<uint16_t[]> m_videoram;
uint16_t *m_videoram_drawsource;
uint16_t *m_videoram_drawsource = nullptr;
uint16_t m_vram_offset;
uint16_t m_vram_read_buffer;
uint16_t m_vram_modulo;
uint16_t m_vram_offset = 0;
uint16_t m_vram_read_buffer = 0;
uint16_t m_vram_modulo = 0;
uint32_t m_sprite_gfx_address_mask;
uint32_t m_sprite_gfx_address_mask = 0;
uint8_t m_auto_animation_speed;
uint8_t m_auto_animation_disabled;
uint8_t m_auto_animation_counter;
uint8_t m_auto_animation_frame_counter;
uint8_t m_auto_animation_speed = 0;
uint8_t m_auto_animation_disabled = 0;
uint8_t m_auto_animation_counter = 0;
uint8_t m_auto_animation_frame_counter = 0;
uint8_t m_fixed_layer_source;
uint8_t m_fixed_layer_bank_type;
uint8_t m_fixed_layer_source = 0;
uint8_t m_fixed_layer_bank_type = 0;
emu_timer *m_auto_animation_timer;
emu_timer *m_sprite_line_timer;
emu_timer *m_auto_animation_timer = nullptr;
emu_timer *m_sprite_line_timer = nullptr;
TIMER_CALLBACK_MEMBER(auto_animation_timer_callback);
TIMER_CALLBACK_MEMBER(sprite_line_timer_callback);
@ -86,10 +86,10 @@ protected:
virtual void device_start() override;
virtual void device_reset() override;
uint32_t get_region_mask(uint8_t* rgn, uint32_t rgn_size);
uint8_t* m_region_sprites; uint32_t m_region_sprites_size;
uint8_t* m_region_fixed; uint32_t m_region_fixed_size;
memory_region* m_region_fixedbios;
const pen_t *m_pens;
uint8_t* m_region_sprites = nullptr; uint32_t m_region_sprites_size = 0;
uint8_t* m_region_fixed = nullptr; uint32_t m_region_fixed_size = 0;
memory_region* m_region_fixedbios = nullptr;
const pen_t *m_pens = nullptr;
required_region_ptr<uint8_t> m_region_zoomy;
};

View File

@ -135,16 +135,16 @@ private:
LPT_ENTRY m_LPT;
uint32_t *m_dest;
int m_dest_pos;
int m_dest_max_pos;
uint32_t *m_dest = nullptr;
int m_dest_pos = 0;
int m_dest_max_pos = 0;
uint8_t m_reg[4];
/* first clock visible on left hand side */
int m_first_visible_clock;
int m_first_visible_clock = 0;
/* first clock visible on right hand side */
int m_last_visible_clock;
int m_last_visible_clock = 0;
/* given a bit pattern, this will get the pen index */
uint8_t m_pen_idx_4col[256];
@ -156,7 +156,7 @@ private:
bitmap_rgb32 m_bitmap;
rgb_t m_palette[256];
emu_timer *m_timer_scanline;
emu_timer *m_timer_scanline = nullptr;
};

View File

@ -58,8 +58,8 @@ private:
DECLARE_GFXDECODE_MEMBER(gfxinfo);
// internal state
tilemap_t *m_bg_tilemap;
tilemap_t *m_fg_tilemap;
tilemap_t *m_bg_tilemap = nullptr;
tilemap_t *m_fg_tilemap = nullptr;
bool m_flip_screen;
// helpers

View File

@ -112,7 +112,7 @@ private:
void vga_data_w(int data);
void bank_w(int data);
void mode_control_w(int data);
bool m_disable;
bool m_disable = false;
DECLARE_WRITE_LINE_MEMBER( t1000_vsync_changed );
};

View File

@ -35,8 +35,8 @@ class n64_blender_t
running_machine &machine() const { assert(m_machine != nullptr); return *m_machine; }
private:
running_machine* m_machine;
n64_rdp* m_rdp;
running_machine* m_machine = nullptr;
n64_rdp* m_rdp = nullptr;
int32_t min(const int32_t x, const int32_t min);
bool alpha_reject(rdp_span_aux* userdata, const rdp_poly_state& object);

View File

@ -69,10 +69,10 @@ protected:
// internal state
bool m_flip; // screen flip?
uint8_t m_bank[16]; // banking redirection
int m_xoffs;
int m_yoffs;
int m_xoffs_flipped;
int m_yoffs_flipped;
int m_xoffs = 0;
int m_yoffs = 0;
int m_xoffs_flipped = 0;
int m_yoffs_flipped = 0;
};
@ -218,7 +218,7 @@ protected:
virtual void draw(bitmap_ind16 &bitmap, const rectangle &cliprect) override;
required_region_ptr<uint64_t> m_sprite_region_ptr;
rotate_info* m_segaic16_rotate;
rotate_info* m_segaic16_rotate = nullptr;
};

View File

@ -53,7 +53,7 @@ private:
std::unique_ptr<uint16_t[]> char_ram;
std::unique_ptr<uint16_t[]> tile_ram;
int char_gfx_index;
tilemap_t *tile_layer[4];
tilemap_t *tile_layer[4]{};
uint16_t tile_mask;
static const gfx_layout char_layout;

View File

@ -46,7 +46,7 @@ uint32_t segas24_state::screen_update(screen_device &screen, bitmap_ind16 &bitma
std::sort(order.begin(), order.end(), layer_sort(*m_vmixer));
int spri[4];
int spri[4]{};
int level = 0;
for(int i=0; i<12; i++)
if(order[i] < 8)

View File

@ -79,7 +79,7 @@ private:
int m_transpen;
// live state
uint8_t m_bgflag;
uint8_t m_bgflag = 0;
uint8_t m_spritectrl[4];
std::unique_ptr<uint8_t[]> m_spriteylow;
std::unique_ptr<uint8_t[]> m_spritecodelow; // tnzs.cpp stuff only uses half?

View File

@ -23,7 +23,7 @@ protected:
virtual void rom_bank_updated() override;
private:
static constexpr unsigned SUPRNOVA_DECODE_BUFFER_SIZE = 0x2000;
int m_sprite_kludge_x, m_sprite_kludge_y;
int m_sprite_kludge_x = 0, m_sprite_kludge_y = 0;
std::unique_ptr<u8[]> m_decodebuffer;
int skns_rle_decode ( int romoffset, int size );
};

View File

@ -42,8 +42,8 @@ private:
required_device<screen_device> m_screen;
bool m_flipscreen;
int m_partialupdates; // the original hardware needs this, the cloned hardware does not.
u8 m_xpos_shift;
u16 m_color_entry_mask;
u8 m_xpos_shift = 0;
u16 m_color_entry_mask = 0;
};

View File

@ -30,8 +30,8 @@ private:
template <int Size>
static int adjust_spritecode(int dx, int dy, int code);
const uint8_t *m_scale_table_ptr;
uint8_t m_scale_line_count;
const uint8_t *m_scale_table_ptr = nullptr;
uint8_t m_scale_line_count = 0;
required_region_ptr<uint8_t> m_scale_table;
required_device<buffered_spriteram16_device> m_spriteram;

View File

@ -47,7 +47,7 @@ private:
void regs_st0020_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
void regs_st0032_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
int m_gfxram_bank;
int m_gfxram_bank = 0;
void gfxram_bank_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
// blitter
@ -55,7 +55,7 @@ private:
void do_blit_w(uint16_t data);
// tilemaps
tilemap_t *m_tmap[4];
tilemap_t *m_tmap[4]{};
template<int Layer> TILE_GET_INFO_MEMBER(get_tile_info);
TILEMAP_MAPPER_MEMBER(scan_16x16);

View File

@ -51,9 +51,9 @@ private:
required_shared_ptr<uint8_t> m_txram;
// tilemaps
tilemap_t *m_fg_tilemap;
tilemap_t *m_bg_tilemap;
tilemap_t *m_tx_tilemap;
tilemap_t *m_fg_tilemap = nullptr;
tilemap_t *m_bg_tilemap = nullptr;
tilemap_t *m_tx_tilemap = nullptr;
TILEMAP_MAPPER_MEMBER(fg_scan);
TILEMAP_MAPPER_MEMBER(bg_scan);
@ -63,7 +63,7 @@ private:
TILE_GET_INFO_MEMBER(get_tx_tile_info);
// internal variables
int m_sprite_base;
int m_sprite_base = 0;
// rendering / mixing
bitmap_ind16 m_temp_bitmap;

View File

@ -118,22 +118,22 @@ private:
struct intv_sprite_type
{
int visible;
int xpos;
int ypos;
int coll;
int collision;
int doublex;
int doubley;
int quady;
int xflip;
int yflip;
int behind_foreground;
int grom;
int card;
int color;
int doubleyres;
int dirty;
int visible = 0;
int xpos = 0;
int ypos = 0;
int coll = 0;
int collision = 0;
int doublex = 0;
int doubley = 0;
int quady = 0;
int xflip = 0;
int yflip = 0;
int behind_foreground = 0;
int grom = 0;
int card = 0;
int color = 0;
int doubleyres = 0;
int dirty = 0;
};
@ -161,21 +161,21 @@ private:
intv_sprite_type m_sprite[MOBS];
uint8_t m_sprite_buffers[MOBS][CARD_WIDTH * 2][CARD_HEIGHT * 4 * 2 * 2];
uint16_t m_backtab_buffer[BACKTAB_HEIGHT][BACKTAB_WIDTH];
int m_color_stack_mode;
int m_stic_registers[STIC_REGISTERS];
int m_color_stack_offset;
int m_stic_handshake;
int m_border_color;
int m_col_delay;
int m_row_delay;
int m_left_edge_inhibit;
int m_top_edge_inhibit;
int m_color_stack_mode = 0;
int m_stic_registers[STIC_REGISTERS]{};
int m_color_stack_offset = 0;
int m_stic_handshake = 0;
int m_border_color = 0;
int m_col_delay = 0;
int m_row_delay = 0;
int m_left_edge_inhibit = 0;
int m_top_edge_inhibit = 0;
int m_x_scale;
int m_y_scale;
uint8_t m_gramdirty;
uint8_t m_gram[512];
uint8_t m_gramdirtybytes[512];
uint8_t m_gramdirty = 0;
uint8_t m_gram[512]{};
uint8_t m_gramdirtybytes[512]{};
};
// device type definition

View File

@ -88,7 +88,7 @@ private:
int m_bgscrollx, m_bgscrolly, m_fgscrollx, m_fgscrolly;
/* We keep two tilemaps for each of the 3 actual tilemaps: one at standard width, one double */
tilemap_t *m_tilemap[3][2];
tilemap_t *m_tilemap[3][2]{};
s32 m_bg_colbank[2], m_tx_colbank;
int m_dblwidth;

View File

@ -37,7 +37,7 @@ private:
// internal state
std::unique_ptr<u16[]> m_ram;
tilemap_t *m_tilemap;
tilemap_t *m_tilemap = nullptr;
u16 m_ctrl[8];
int m_base_color;

View File

@ -80,7 +80,7 @@ private:
DECLARE_GFXDECODE_MEMBER(gfxinfo_bootleg);
/* We keep two tilemaps for each of the 5 actual tilemaps: one at standard width, one double */
tilemap_t *m_tilemap[5][2];
tilemap_t *m_tilemap[5][2]{};
s32 m_dblwidth;
int m_gfxlayout;

View File

@ -64,14 +64,14 @@ protected:
private:
std::unique_ptr<uint8_t[]> m_texture;
std::unique_ptr<uint16_t[]> m_poly_fifo;
int m_poly_fifo_ptr;
int m_poly_fifo_ptr = 0;
std::unique_ptr<tc0780fpa_renderer> m_renderer;
uint16_t m_tex_address;
uint16_t m_tex_offset;
int m_texbase_x;
int m_texbase_y;
uint16_t m_tex_address = 0;
uint16_t m_tex_offset = 0;
int m_texbase_x = 0;
int m_texbase_y = 0;
};
DECLARE_DEVICE_TYPE(TC0780FPA, tc0780fpa_device)

View File

@ -102,7 +102,7 @@ private:
u16 m_gfxno;
tmap038_cb_delegate m_038_cb;
tilemap_t* m_tmap;
tilemap_t* m_tmap = nullptr;
int m_xoffs, m_flipped_xoffs;
int m_yoffs, m_flipped_yoffs;

View File

@ -35,8 +35,8 @@ private:
DECLARE_GFXDECODE_MEMBER(gfxinfo);
pri_cb_delegate m_pri_cb;
int m_xoffs;
int m_xoffs_flipped;
int m_xoffs = 0;
int m_xoffs_flipped = 0;
};
DECLARE_DEVICE_TYPE(TOAPLAN_SCU, toaplan_scu_device)

View File

@ -30,7 +30,7 @@ private:
// bit 2 enables gradient and starfield
// bit 3 seems to be used to flip for cocktail
uint8_t m_palette_bank;
uint8_t m_palette_bank = 0;
};
// device type definition

View File

@ -58,34 +58,34 @@ protected:
devcb_write8 m_write_lba3_lba4;
devcb_write_line m_write_lba7;
int m_lba7;
int m_lba7 = 0;
bool MHFU_FLAG;
int MHFU_counter;
bool MHFU_FLAG = false;
int MHFU_counter = 0;
// dc012 attributes
uint8_t m_scroll_latch;
bool m_scroll_latch_valid;
uint8_t m_blink_flip_flop;
uint8_t m_reverse_field;
uint8_t m_basic_attribute;
uint8_t m_scroll_latch = 0;
bool m_scroll_latch_valid = false;
uint8_t m_blink_flip_flop = 0;
uint8_t m_reverse_field = 0;
uint8_t m_basic_attribute = 0;
// dc011 attributes
uint8_t m_columns;
uint8_t m_height;
uint8_t m_height_MAX;
uint8_t m_fill_lines;
bool m_is_50hz;
bool m_interlaced;
emu_timer *m_lba3_change_timer;
emu_timer *m_lba7_change_timer;
uint8_t m_columns = 0;
uint8_t m_height = 0;
uint8_t m_height_MAX = 0;
uint8_t m_fill_lines = 0;
bool m_is_50hz = false;
bool m_interlaced = false;
emu_timer *m_lba3_change_timer = nullptr;
emu_timer *m_lba7_change_timer = nullptr;
required_region_ptr<uint8_t> m_char_rom; /* character rom region */
required_device<palette_device> m_palette;
bool m_notify_vblank;
int m_last_scroll;
bool m_notify_vblank = false;
int m_last_scroll = 0;
bool m_linedoubler;
bool m_linedoubler = false;
};

View File

@ -101,8 +101,8 @@ private:
int m_vsync; // vertical sync
int m_vda; // valid data address
emu_timer *m_vsync_timer; // vertical sync timer
emu_timer *m_flash_timer; // flash timer
emu_timer *m_vsync_timer = nullptr; // vertical sync timer
emu_timer *m_flash_timer = nullptr; // flash timer
};