summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--src/build/png2bdc.c26
-rw-r--r--src/emu/cpu/tms34010/tms34010.c8
-rw-r--r--src/emu/cpu/tms34010/tms34010.h2
-rw-r--r--src/emu/drawgfx.c406
-rw-r--r--src/emu/drawgfx.h72
-rw-r--r--src/emu/drawgfxm.h139
-rw-r--r--src/emu/machine.c1
-rw-r--r--src/emu/machine.h2
-rw-r--r--src/emu/machine/ldcore.c20
-rw-r--r--src/emu/machine/ldcore.h2
-rw-r--r--src/emu/machine/ldpr8210.c28
-rw-r--r--src/emu/machine/s3c24xx.c90
-rw-r--r--src/emu/rendutil.c36
-rw-r--r--src/emu/screen.c13
-rw-r--r--src/emu/screen.h4
-rw-r--r--src/emu/sound/cdp1864.c6
-rw-r--r--src/emu/sound/cdp1864.h2
-rw-r--r--src/emu/sound/cdp1869.c16
-rw-r--r--src/emu/sound/cdp1869.h6
-rw-r--r--src/emu/sound/mos6560.c4
-rw-r--r--src/emu/sound/mos6560.h2
-rw-r--r--src/emu/tilemap.c90
-rw-r--r--src/emu/tilemap.h14
-rw-r--r--src/emu/uigfx.c10
-rw-r--r--src/emu/video.c18
-rw-r--r--src/emu/video.h2
-rw-r--r--src/emu/video/315_5124.c4
-rw-r--r--src/emu/video/315_5124.h2
-rw-r--r--src/emu/video/cdp1861.c6
-rw-r--r--src/emu/video/cdp1861.h2
-rw-r--r--src/emu/video/cdp1862.c4
-rw-r--r--src/emu/video/cdp1862.h2
-rw-r--r--src/emu/video/crt9021.c2
-rw-r--r--src/emu/video/crt9021.h2
-rw-r--r--src/emu/video/generic.c2
-rw-r--r--src/emu/video/h63484.c4
-rw-r--r--src/emu/video/h63484.h8
-rw-r--r--src/emu/video/hd44102.c4
-rw-r--r--src/emu/video/hd44102.h2
-rw-r--r--src/emu/video/hd61830.c16
-rw-r--r--src/emu/video/hd61830.h10
-rw-r--r--src/emu/video/i8275.c4
-rw-r--r--src/emu/video/i8275.h2
-rw-r--r--src/emu/video/k053250.c20
-rw-r--r--src/emu/video/k053250.h6
-rw-r--r--src/emu/video/mc6845.c4
-rw-r--r--src/emu/video/mc6845.h14
-rw-r--r--src/emu/video/msm6255.c12
-rw-r--r--src/emu/video/msm6255.h8
-rw-r--r--src/emu/video/pc_cga.c34
-rw-r--r--src/emu/video/pc_vga.c22
-rw-r--r--src/emu/video/pc_vga.h2
-rw-r--r--src/emu/video/psx.c12
-rw-r--r--src/emu/video/psx.h6
-rw-r--r--src/emu/video/s2636.c18
-rw-r--r--src/emu/video/s2636.h2
-rw-r--r--src/emu/video/saa5050.c2
-rw-r--r--src/emu/video/saa5050.h2
-rw-r--r--src/emu/video/sed1330.c16
-rw-r--r--src/emu/video/sed1330.h10
-rw-r--r--src/emu/video/tms9928a.c4
-rw-r--r--src/emu/video/tms9928a.h2
-rw-r--r--src/emu/video/upd3301.c8
-rw-r--r--src/emu/video/upd3301.h6
-rw-r--r--src/emu/video/v9938.c20
-rw-r--r--src/emu/video/v9938.h2
-rw-r--r--src/emu/video/vector.c6
-rw-r--r--src/emu/video/voodoo.c8
-rw-r--r--src/emu/video/voodoo.h2
-rw-r--r--src/lib/util/aviio.c44
-rw-r--r--src/lib/util/aviio.h6
-rw-r--r--src/lib/util/bitmap.c101
-rw-r--r--src/lib/util/bitmap.h5
-rw-r--r--src/lib/util/png.c42
-rw-r--r--src/lib/util/png.h6
-rw-r--r--src/mame/drivers/1945kiii.c2
-rw-r--r--src/mame/drivers/39in1.c2
-rw-r--r--src/mame/drivers/ace.c2
-rw-r--r--src/mame/drivers/acefruit.c4
-rw-r--r--src/mame/drivers/acommand.c48
-rw-r--r--src/mame/drivers/adp.c20
-rw-r--r--src/mame/drivers/albazc.c4
-rw-r--r--src/mame/drivers/aristmk6.c6
-rw-r--r--src/mame/drivers/astinvad.c18
-rw-r--r--src/mame/drivers/astrocorp.c8
-rw-r--r--src/mame/drivers/astrof.c6
-rw-r--r--src/mame/drivers/atarisy4.c2
-rw-r--r--src/mame/drivers/avalnche.c2
-rw-r--r--src/mame/drivers/backfire.c8
-rw-r--r--src/mame/drivers/beaminv.c2
-rw-r--r--src/mame/drivers/berzerk.c4
-rw-r--r--src/mame/drivers/bestleag.c2
-rw-r--r--src/mame/drivers/bfcobra.c2
-rw-r--r--src/mame/drivers/big10.c2
-rw-r--r--src/mame/drivers/bingor.c10
-rw-r--r--src/mame/drivers/blackt96.c6
-rw-r--r--src/mame/drivers/blitz68k.c10
-rw-r--r--src/mame/drivers/bmcbowl.c18
-rw-r--r--src/mame/drivers/bnstars.c12
-rw-r--r--src/mame/drivers/boxer.c4
-rw-r--r--src/mame/drivers/cabaret.c2
-rw-r--r--src/mame/drivers/cardline.c2
-rw-r--r--src/mame/drivers/cb2001.c2
-rw-r--r--src/mame/drivers/champbwl.c4
-rw-r--r--src/mame/drivers/chanbara.c2
-rw-r--r--src/mame/drivers/chsuper.c2
-rw-r--r--src/mame/drivers/clayshoo.c2
-rw-r--r--src/mame/drivers/cntsteer.c8
-rw-r--r--src/mame/drivers/cobra.c2
-rw-r--r--src/mame/drivers/coolpool.c8
-rw-r--r--src/mame/drivers/coolridr.c4
-rw-r--r--src/mame/drivers/corona.c4
-rw-r--r--src/mame/drivers/cps3.c22
-rw-r--r--src/mame/drivers/crystal.c2
-rw-r--r--src/mame/drivers/cshooter.c2
-rw-r--r--src/mame/drivers/csplayh5.c6
-rw-r--r--src/mame/drivers/cubeqst.c4
-rw-r--r--src/mame/drivers/cybertnk.c26
-rw-r--r--src/mame/drivers/dacholer.c2
-rw-r--r--src/mame/drivers/dai3wksi.c4
-rw-r--r--src/mame/drivers/darkhors.c4
-rw-r--r--src/mame/drivers/dblewing.c4
-rw-r--r--src/mame/drivers/ddealer.c2
-rw-r--r--src/mame/drivers/ddenlovr.c6
-rw-r--r--src/mame/drivers/deco156.c4
-rw-r--r--src/mame/drivers/destroyr.c4
-rw-r--r--src/mame/drivers/dgpix.c2
-rw-r--r--src/mame/drivers/discoboy.c4
-rw-r--r--src/mame/drivers/diverboy.c4
-rw-r--r--src/mame/drivers/dmndrby.c2
-rw-r--r--src/mame/drivers/dominob.c2
-rw-r--r--src/mame/drivers/dorachan.c2
-rw-r--r--src/mame/drivers/dotrikun.c8
-rw-r--r--src/mame/drivers/dreamwld.c2
-rw-r--r--src/mame/drivers/drtomy.c2
-rw-r--r--src/mame/drivers/dunhuang.c2
-rw-r--r--src/mame/drivers/dwarfd.c4
-rw-r--r--src/mame/drivers/egghunt.c2
-rw-r--r--src/mame/drivers/embargo.c2
-rw-r--r--src/mame/drivers/enigma2.c4
-rw-r--r--src/mame/drivers/eolith16.c4
-rw-r--r--src/mame/drivers/esh.c2
-rw-r--r--src/mame/drivers/f-32.c4
-rw-r--r--src/mame/drivers/fcrash.c17
-rw-r--r--src/mame/drivers/feversoc.c2
-rw-r--r--src/mame/drivers/firebeat.c18
-rw-r--r--src/mame/drivers/firefox.c2
-rw-r--r--src/mame/drivers/flyball.c2
-rw-r--r--src/mame/drivers/galaxi.c2
-rw-r--r--src/mame/drivers/galaxia.c22
-rw-r--r--src/mame/drivers/galgame.c4
-rw-r--r--src/mame/drivers/galpani3.c8
-rw-r--r--src/mame/drivers/gamecstl.c6
-rw-r--r--src/mame/drivers/goldngam.c2
-rw-r--r--src/mame/drivers/gpworld.c14
-rw-r--r--src/mame/drivers/guab.c4
-rw-r--r--src/mame/drivers/gunpey.c2
-rw-r--r--src/mame/drivers/halleys.c34
-rw-r--r--src/mame/drivers/highvdeo.c6
-rw-r--r--src/mame/drivers/hitme.c4
-rw-r--r--src/mame/drivers/hitpoker.c2
-rw-r--r--src/mame/drivers/hotblock.c4
-rw-r--r--src/mame/drivers/hotstuff.c8
-rw-r--r--src/mame/drivers/hvyunit.c2
-rw-r--r--src/mame/drivers/igs009.c4
-rw-r--r--src/mame/drivers/igs011.c4
-rw-r--r--src/mame/drivers/igs017.c10
-rw-r--r--src/mame/drivers/igs_m027.c2
-rw-r--r--src/mame/drivers/igspoker.c2
-rw-r--r--src/mame/drivers/imolagp.c2
-rw-r--r--src/mame/drivers/intrscti.c2
-rw-r--r--src/mame/drivers/istellar.c2
-rw-r--r--src/mame/drivers/itgambl2.c4
-rw-r--r--src/mame/drivers/itgambl3.c4
-rw-r--r--src/mame/drivers/jackie.c2
-rw-r--r--src/mame/drivers/jalmah.c12
-rw-r--r--src/mame/drivers/jangou.c2
-rw-r--r--src/mame/drivers/jantotsu.c2
-rw-r--r--src/mame/drivers/jchan.c8
-rw-r--r--src/mame/drivers/jollyjgr.c14
-rw-r--r--src/mame/drivers/jongkyo.c2
-rw-r--r--src/mame/drivers/jpmsys5.c4
-rw-r--r--src/mame/drivers/kas89.c2
-rw-r--r--src/mame/drivers/kingdrby.c2
-rw-r--r--src/mame/drivers/kinst.c2
-rw-r--r--src/mame/drivers/konamim2.c4
-rw-r--r--src/mame/drivers/kongambl.c4
-rw-r--r--src/mame/drivers/kungfur.c48
-rw-r--r--src/mame/drivers/laserbas.c8
-rw-r--r--src/mame/drivers/laserbat.c21
-rw-r--r--src/mame/drivers/lastfght.c6
-rw-r--r--src/mame/drivers/lgp.c2
-rw-r--r--src/mame/drivers/limenko.c24
-rw-r--r--src/mame/drivers/littlerb.c8
-rw-r--r--src/mame/drivers/looping.c2
-rw-r--r--src/mame/drivers/luckgrln.c2
-rw-r--r--src/mame/drivers/m63.c2
-rw-r--r--src/mame/drivers/m79amb.c2
-rw-r--r--src/mame/drivers/magicard.c14
-rw-r--r--src/mame/drivers/majorpkr.c2
-rw-r--r--src/mame/drivers/marinedt.c14
-rw-r--r--src/mame/drivers/maygayv1.c4
-rw-r--r--src/mame/drivers/mazerbla.c12
-rw-r--r--src/mame/drivers/mediagx.c16
-rw-r--r--src/mame/drivers/meijinsn.c2
-rw-r--r--src/mame/drivers/merit.c2
-rw-r--r--src/mame/drivers/meritm.c10
-rw-r--r--src/mame/drivers/metalmx.c2
-rw-r--r--src/mame/drivers/midas.c4
-rw-r--r--src/mame/drivers/minivadr.c2
-rw-r--r--src/mame/drivers/mirage.c2
-rw-r--r--src/mame/drivers/mirax.c2
-rw-r--r--src/mame/drivers/missb2.c2
-rw-r--r--src/mame/drivers/missile.c2
-rw-r--r--src/mame/drivers/mjsister.c8
-rw-r--r--src/mame/drivers/mlanding.c2
-rw-r--r--src/mame/drivers/monzagp.c2
-rw-r--r--src/mame/drivers/mpu4vid.c2
-rw-r--r--src/mame/drivers/multfish.c2
-rw-r--r--src/mame/drivers/murogem.c2
-rw-r--r--src/mame/drivers/mwarr.c4
-rw-r--r--src/mame/drivers/namcoic.c61
-rw-r--r--src/mame/drivers/namcos23.c8
-rw-r--r--src/mame/drivers/neoprint.c6
-rw-r--r--src/mame/drivers/nightgal.c2
-rw-r--r--src/mame/drivers/nmg5.c12
-rw-r--r--src/mame/drivers/norautp.c2
-rw-r--r--src/mame/drivers/nwk-tr.c2
-rw-r--r--src/mame/drivers/nyny.c6
-rw-r--r--src/mame/drivers/olibochu.c2
-rw-r--r--src/mame/drivers/othello.c2
-rw-r--r--src/mame/drivers/panicr.c4
-rw-r--r--src/mame/drivers/pasha2.c8
-rw-r--r--src/mame/drivers/pcxt.c4
-rw-r--r--src/mame/drivers/photon2.c6
-rw-r--r--src/mame/drivers/pinkiri8.c2
-rw-r--r--src/mame/drivers/powerbal.c2
-rw-r--r--src/mame/drivers/progolf.c2
-rw-r--r--src/mame/drivers/pturn.c2
-rw-r--r--src/mame/drivers/pzletime.c4
-rw-r--r--src/mame/drivers/quizo.c8
-rw-r--r--src/mame/drivers/quizpun2.c4
-rw-r--r--src/mame/drivers/r2dtank.c2
-rw-r--r--src/mame/drivers/r2dx_v33.c4
-rw-r--r--src/mame/drivers/rabbit.c14
-rw-r--r--src/mame/drivers/raiden2.c4
-rw-r--r--src/mame/drivers/rotaryf.c2
-rw-r--r--src/mame/drivers/roul.c2
-rw-r--r--src/mame/drivers/royalmah.c2
-rw-r--r--src/mame/drivers/sangho.c2
-rw-r--r--src/mame/drivers/sbowling.c4
-rw-r--r--src/mame/drivers/segac2.c2
-rw-r--r--src/mame/drivers/segae.c2
-rw-r--r--src/mame/drivers/segald.c6
-rw-r--r--src/mame/drivers/sfbonus.c26
-rw-r--r--src/mame/drivers/sfkick.c2
-rw-r--r--src/mame/drivers/shanghai.c8
-rw-r--r--src/mame/drivers/shougi.c2
-rw-r--r--src/mame/drivers/sigmab52.c16
-rw-r--r--src/mame/drivers/sigmab98.c4
-rw-r--r--src/mame/drivers/skeetsht.c4
-rw-r--r--src/mame/drivers/skimaxx.c4
-rw-r--r--src/mame/drivers/skylncr.c2
-rw-r--r--src/mame/drivers/sliver.c4
-rw-r--r--src/mame/drivers/slotcarn.c2
-rw-r--r--src/mame/drivers/sms.c2
-rw-r--r--src/mame/drivers/snowbros.c2
-rw-r--r--src/mame/drivers/sothello.c2
-rw-r--r--src/mame/drivers/spaceg.c2
-rw-r--r--src/mame/drivers/speglsht.c4
-rw-r--r--src/mame/drivers/spiders.c2
-rw-r--r--src/mame/drivers/spoker.c2
-rw-r--r--src/mame/drivers/srmp5.c6
-rw-r--r--src/mame/drivers/srmp6.c2
-rw-r--r--src/mame/drivers/ssfindo.c8
-rw-r--r--src/mame/drivers/ssingles.c4
-rw-r--r--src/mame/drivers/sstrangr.c4
-rw-r--r--src/mame/drivers/statriv2.c2
-rw-r--r--src/mame/drivers/subsino.c6
-rw-r--r--src/mame/drivers/subsino2.c2
-rw-r--r--src/mame/drivers/supertnk.c2
-rw-r--r--src/mame/drivers/suprgolf.c6
-rw-r--r--src/mame/drivers/taitopjc.c2
-rw-r--r--src/mame/drivers/taitotz.c8
-rw-r--r--src/mame/drivers/taitowlf.c4
-rw-r--r--src/mame/drivers/tapatune.c2
-rw-r--r--src/mame/drivers/tgtpanic.c16
-rw-r--r--src/mame/drivers/tickee.c8
-rw-r--r--src/mame/drivers/tmaster.c16
-rw-r--r--src/mame/drivers/tmmjprd.c16
-rw-r--r--src/mame/drivers/tonton.c6
-rw-r--r--src/mame/drivers/toratora.c2
-rw-r--r--src/mame/drivers/trvmadns.c2
-rw-r--r--src/mame/drivers/ttchamp.c4
-rw-r--r--src/mame/drivers/tugboat.c2
-rw-r--r--src/mame/drivers/twins.c8
-rw-r--r--src/mame/drivers/ultrsprt.c2
-rw-r--r--src/mame/drivers/umipoker.c2
-rw-r--r--src/mame/drivers/vamphalf.c8
-rw-r--r--src/mame/drivers/vcombat.c4
-rw-r--r--src/mame/drivers/vegaeo.c8
-rw-r--r--src/mame/drivers/vmetal.c4
-rw-r--r--src/mame/drivers/warpsped.c14
-rw-r--r--src/mame/drivers/wheelfir.c6
-rw-r--r--src/mame/drivers/whitestar.c8
-rw-r--r--src/mame/drivers/witch.c2
-rw-r--r--src/mame/drivers/wldarrow.c2
-rw-r--r--src/mame/drivers/xtheball.c4
-rw-r--r--src/mame/drivers/zr107.c4
-rw-r--r--src/mame/includes/amiga.h4
-rw-r--r--src/mame/includes/artmagic.h2
-rw-r--r--src/mame/includes/btoads.h4
-rw-r--r--src/mame/includes/cidelsa.h2
-rw-r--r--src/mame/includes/exterm.h2
-rw-r--r--src/mame/includes/galaxian.h26
-rw-r--r--src/mame/includes/galaxold.h8
-rw-r--r--src/mame/includes/genesis.h2
-rw-r--r--src/mame/includes/harddriv.h4
-rw-r--r--src/mame/includes/jpmimpct.h2
-rw-r--r--src/mame/includes/kaneko16.h2
-rw-r--r--src/mame/includes/konamigx.h2
-rw-r--r--src/mame/includes/ladybug.h2
-rw-r--r--src/mame/includes/lethalj.h2
-rw-r--r--src/mame/includes/metro.h2
-rw-r--r--src/mame/includes/micro3d.h2
-rw-r--r--src/mame/includes/midtunit.h4
-rw-r--r--src/mame/includes/midyunit.h2
-rw-r--r--src/mame/includes/namcoic.h12
-rw-r--r--src/mame/includes/pk8000.h2
-rw-r--r--src/mame/includes/raiden2.h2
-rw-r--r--src/mame/includes/st0016.h2
-rw-r--r--src/mame/includes/suprnova.h2
-rw-r--r--src/mame/includes/zodiack.h4
-rw-r--r--src/mame/machine/3do.c4
-rw-r--r--src/mame/machine/amiga.c5
-rw-r--r--src/mame/machine/konppc.c18
-rw-r--r--src/mame/machine/konppc.h2
-rw-r--r--src/mame/machine/megadriv.c8
-rw-r--r--src/mame/machine/segamsys.c10
-rw-r--r--src/mame/video/1942.c2
-rw-r--r--src/mame/video/1943.c4
-rw-r--r--src/mame/video/20pacgal.c20
-rw-r--r--src/mame/video/40love.c8
-rw-r--r--src/mame/video/8080bw.c16
-rw-r--r--src/mame/video/aeroboto.c8
-rw-r--r--src/mame/video/aerofgt.c34
-rw-r--r--src/mame/video/ajax.c4
-rw-r--r--src/mame/video/aliens.c4
-rw-r--r--src/mame/video/alpha68k.c22
-rw-r--r--src/mame/video/ambush.c4
-rw-r--r--src/mame/video/amiga.c6
-rw-r--r--src/mame/video/amigaaga.c6
-rw-r--r--src/mame/video/amspdwy.c2
-rw-r--r--src/mame/video/angelkds.c4
-rw-r--r--src/mame/video/appoooh.c4
-rw-r--r--src/mame/video/aquarium.c2
-rw-r--r--src/mame/video/arcadecl.c8
-rw-r--r--src/mame/video/archimds.c14
-rw-r--r--src/mame/video/argus.c20
-rw-r--r--src/mame/video/arkanoid.c2
-rw-r--r--src/mame/video/armedf.c8
-rw-r--r--src/mame/video/artmagic.c4
-rw-r--r--src/mame/video/asterix.c4
-rw-r--r--src/mame/video/astrocde.c4
-rw-r--r--src/mame/video/asuka.c8
-rw-r--r--src/mame/video/atari.c2
-rw-r--r--src/mame/video/atarifb.c4
-rw-r--r--src/mame/video/atarig1.c2
-rw-r--r--src/mame/video/atarig42.c8
-rw-r--r--src/mame/video/atarigt.c6
-rw-r--r--src/mame/video/atarigx2.c8
-rw-r--r--src/mame/video/atarimo.c6
-rw-r--r--src/mame/video/atarimo.h4
-rw-r--r--src/mame/video/atarirle.c26
-rw-r--r--src/mame/video/atarisy1.c2
-rw-r--r--src/mame/video/atarisy2.c8
-rw-r--r--src/mame/video/badlands.c2
-rw-r--r--src/mame/video/bagman.c8
-rw-r--r--src/mame/video/balsente.c10
-rw-r--r--src/mame/video/baraduke.c2
-rw-r--r--src/mame/video/batman.c10
-rw-r--r--src/mame/video/battlane.c8
-rw-r--r--src/mame/video/battlera.c12
-rw-r--r--src/mame/video/battlex.c2
-rw-r--r--src/mame/video/bbusters.c6
-rw-r--r--src/mame/video/beathead.c2
-rw-r--r--src/mame/video/beezer.c4
-rw-r--r--src/mame/video/bigevglf.c4
-rw-r--r--src/mame/video/bigstrkb.c4
-rw-r--r--src/mame/video/bionicc.c4
-rw-r--r--src/mame/video/bishi.c2
-rw-r--r--src/mame/video/bking.c6
-rw-r--r--src/mame/video/blktiger.c4
-rw-r--r--src/mame/video/blmbycar.c6
-rw-r--r--src/mame/video/blockhl.c2
-rw-r--r--src/mame/video/blockout.c18
-rw-r--r--src/mame/video/bloodbro.c10
-rw-r--r--src/mame/video/blstroid.c2
-rw-r--r--src/mame/video/blueprnt.c4
-rw-r--r--src/mame/video/bogeyman.c2
-rw-r--r--src/mame/video/bombjack.c2
-rw-r--r--src/mame/video/boogwing.c6
-rw-r--r--src/mame/video/bosco.c10
-rw-r--r--src/mame/video/bottom9.c2
-rw-r--r--src/mame/video/brkthru.c4
-rw-r--r--src/mame/video/bsktball.c2
-rw-r--r--src/mame/video/btime.c10
-rw-r--r--src/mame/video/btoads.c4
-rw-r--r--src/mame/video/bublbobl.c2
-rw-r--r--src/mame/video/buggychl.c20
-rw-r--r--src/mame/video/bwing.c4
-rw-r--r--src/mame/video/cabal.c2
-rw-r--r--src/mame/video/canyon.c6
-rw-r--r--src/mame/video/capbowl.c4
-rw-r--r--src/mame/video/carpolo.c30
-rw-r--r--src/mame/video/cave.c8
-rw-r--r--src/mame/video/cbasebal.c4
-rw-r--r--src/mame/video/ccastles.c4
-rw-r--r--src/mame/video/cclimber.c28
-rw-r--r--src/mame/video/chaknpop.c8
-rw-r--r--src/mame/video/champbas.c4
-rw-r--r--src/mame/video/changela.c38
-rw-r--r--src/mame/video/cheekyms.c10
-rw-r--r--src/mame/video/chqflag.c2
-rw-r--r--src/mame/video/circus.c28
-rw-r--r--src/mame/video/circusc.c4
-rw-r--r--src/mame/video/cischeat.c20
-rw-r--r--src/mame/video/citycon.c2
-rw-r--r--src/mame/video/cloak.c6
-rw-r--r--src/mame/video/cloud9.c6
-rw-r--r--src/mame/video/clshroad.c2
-rw-r--r--src/mame/video/cninja.c20
-rw-r--r--src/mame/video/combatsc.c10
-rw-r--r--src/mame/video/commando.c2
-rw-r--r--src/mame/video/compgolf.c2
-rw-r--r--src/mame/video/contra.c2
-rw-r--r--src/mame/video/cop01.c2
-rw-r--r--src/mame/video/copsnrob.c2
-rw-r--r--src/mame/video/cosmic.c36
-rw-r--r--src/mame/video/cps1.c23
-rw-r--r--src/mame/video/crbaloon.c6
-rw-r--r--src/mame/video/crgolf.c2
-rw-r--r--src/mame/video/crospang.c2
-rw-r--r--src/mame/video/crshrace.c10
-rw-r--r--src/mame/video/cvs.c35
-rw-r--r--src/mame/video/cyberbal.c4
-rw-r--r--src/mame/video/darius.c4
-rw-r--r--src/mame/video/darkmist.c2
-rw-r--r--src/mame/video/darkseal.c2
-rw-r--r--src/mame/video/dassault.c6
-rw-r--r--src/mame/video/dbz.c2
-rw-r--r--src/mame/video/dc.c48
-rw-r--r--src/mame/video/dcheese.c2
-rw-r--r--src/mame/video/dcon.c10
-rw-r--r--src/mame/video/dday.c16
-rw-r--r--src/mame/video/ddragon.c2
-rw-r--r--src/mame/video/ddragon3.c2
-rw-r--r--src/mame/video/ddribble.c2
-rw-r--r--src/mame/video/deadang.c6
-rw-r--r--src/mame/video/dec0.c2
-rw-r--r--src/mame/video/dec8.c2
-rw-r--r--src/mame/video/decbac06.c27
-rw-r--r--src/mame/video/decbac06.h6
-rw-r--r--src/mame/video/deckarn.c2
-rw-r--r--src/mame/video/deckarn.h2
-rw-r--r--src/mame/video/decmxc06.c2
-rw-r--r--src/mame/video/decmxc06.h2
-rw-r--r--src/mame/video/deco16ic.c28
-rw-r--r--src/mame/video/deco16ic.h8
-rw-r--r--src/mame/video/deco32.c38
-rw-r--r--src/mame/video/deco_mlc.c16
-rw-r--r--src/mame/video/decocass.c16
-rw-r--r--src/mame/video/decocomn.c8
-rw-r--r--src/mame/video/decocomn.h2
-rw-r--r--src/mame/video/decospr.c14
-rw-r--r--src/mame/video/decospr.h4
-rw-r--r--src/mame/video/deniam.c28
-rw-r--r--src/mame/video/dietgo.c2
-rw-r--r--src/mame/video/digdug.c2
-rw-r--r--src/mame/video/djmain.c4
-rw-r--r--src/mame/video/dkong.c6
-rw-r--r--src/mame/video/docastle.c4
-rw-r--r--src/mame/video/dogfgt.c4
-rw-r--r--src/mame/video/dooyong.c34
-rw-r--r--src/mame/video/drgnmst.c2
-rw-r--r--src/mame/video/dribling.c2
-rw-r--r--src/mame/video/dynax.c32
-rw-r--r--src/mame/video/dynduke.c12
-rw-r--r--src/mame/video/eolith.c2
-rw-r--r--src/mame/video/epos.c4
-rw-r--r--src/mame/video/eprom.c12
-rw-r--r--src/mame/video/equites.c24
-rw-r--r--src/mame/video/esd16.c16
-rw-r--r--src/mame/video/espial.c2
-rw-r--r--src/mame/video/esripsys.c2
-rw-r--r--src/mame/video/exedexes.c4
-rw-r--r--src/mame/video/exerion.c2
-rw-r--r--src/mame/video/exidy.c10
-rw-r--r--src/mame/video/exidy440.c8
-rw-r--r--src/mame/video/exprraid.c2
-rw-r--r--src/mame/video/exterm.c4
-rw-r--r--src/mame/video/exzisus.c2
-rw-r--r--src/mame/video/f1gp.c12
-rw-r--r--src/mame/video/fantland.c4
-rw-r--r--src/mame/video/fastfred.c4
-rw-r--r--src/mame/video/fgoal.c10
-rw-r--r--src/mame/video/firetrap.c2
-rw-r--r--src/mame/video/firetrk.c30
-rw-r--r--src/mame/video/fitfight.c4
-rw-r--r--src/mame/video/flower.c2
-rw-r--r--src/mame/video/flstory.c4
-rw-r--r--src/mame/video/foodf.c4
-rw-r--r--src/mame/video/freekick.c6
-rw-r--r--src/mame/video/fromance.c2
-rw-r--r--src/mame/video/funkybee.c4
-rw-r--r--src/mame/video/funkyjet.c2
-rw-r--r--src/mame/video/funybubl.c4
-rw-r--r--src/mame/video/fuukifg2.c10
-rw-r--r--src/mame/video/fuukifg3.c10
-rw-r--r--src/mame/video/gaelco.c10
-rw-r--r--src/mame/video/gaelco2.c10
-rw-r--r--src/mame/video/gaelco3d.c4
-rw-r--r--src/mame/video/gaiden.c50
-rw-r--r--src/mame/video/galaga.c8
-rw-r--r--src/mame/video/galastrm.c50
-rw-r--r--src/mame/video/galaxian.c70
-rw-r--r--src/mame/video/galaxold.c136
-rw-r--r--src/mame/video/galivan.c6
-rw-r--r--src/mame/video/galpani2.c10
-rw-r--r--src/mame/video/galpanic.c10
-rw-r--r--src/mame/video/galspnbl.c6
-rw-r--r--src/mame/video/gameplan.c4
-rw-r--r--src/mame/video/gaplus.c8
-rw-r--r--src/mame/video/gauntlet.c2
-rw-r--r--src/mame/video/gberet.c4
-rw-r--r--src/mame/video/gcpinbal.c6
-rw-r--r--src/mame/video/genesis.c4
-rw-r--r--src/mame/video/gijoe.c4
-rw-r--r--src/mame/video/ginganin.c4
-rw-r--r--src/mame/video/gladiatr.c11
-rw-r--r--src/mame/video/glass.c6
-rw-r--r--src/mame/video/gng.c2
-rw-r--r--src/mame/video/goal92.c4
-rw-r--r--src/mame/video/goindol.c2
-rw-r--r--src/mame/video/goldstar.c12
-rw-r--r--src/mame/video/gomoku.c8
-rw-r--r--src/mame/video/gotcha.c2
-rw-r--r--src/mame/video/gottlieb.c4
-rw-r--r--src/mame/video/gotya.c6
-rw-r--r--src/mame/video/gp9001.c14
-rw-r--r--src/mame/video/gp9001.h6
-rw-r--r--src/mame/video/gradius3.c2
-rw-r--r--src/mame/video/grchamp.c30
-rw-r--r--src/mame/video/gridlee.c4
-rw-r--r--src/mame/video/groundfx.c6
-rw-r--r--src/mame/video/gstriker.c10
-rw-r--r--src/mame/video/gsword.c2
-rw-r--r--src/mame/video/gticlub.c8
-rw-r--r--src/mame/video/gticlub.h2
-rw-r--r--src/mame/video/gunbustr.c4
-rw-r--r--src/mame/video/gunsmoke.c4
-rw-r--r--src/mame/video/gyruss.c2
-rw-r--r--src/mame/video/harddriv.c8
-rw-r--r--src/mame/video/hcastle.c2
-rw-r--r--src/mame/video/higemaru.c2
-rw-r--r--src/mame/video/himesiki.c2
-rw-r--r--src/mame/video/hnayayoi.c6
-rw-r--r--src/mame/video/hng64.c100
-rw-r--r--src/mame/video/holeland.c4
-rw-r--r--src/mame/video/homedata.c8
-rw-r--r--src/mame/video/homerun.c2
-rw-r--r--src/mame/video/hyhoo.c4
-rw-r--r--src/mame/video/hyperspt.c2
-rw-r--r--src/mame/video/hyprduel.c10
-rw-r--r--src/mame/video/ikki.c6
-rw-r--r--src/mame/video/inufuku.c6
-rw-r--r--src/mame/video/ironhors.c4
-rw-r--r--src/mame/video/itech8.c16
-rw-r--r--src/mame/video/jack.c4
-rw-r--r--src/mame/video/jackal.c6
-rw-r--r--src/mame/video/jaguar.c4
-rw-r--r--src/mame/video/jailbrek.c2
-rw-r--r--src/mame/video/jalblend.c8
-rw-r--r--src/mame/video/jalblend.h2
-rw-r--r--src/mame/video/jedi.c16
-rw-r--r--src/mame/video/jpmimpct.c4
-rw-r--r--src/mame/video/kan_panb.c8
-rw-r--r--src/mame/video/kan_pand.c8
-rw-r--r--src/mame/video/kan_pand.h2
-rw-r--r--src/mame/video/kaneko16.c40
-rw-r--r--src/mame/video/kangaroo.c2
-rw-r--r--src/mame/video/karnov.c8
-rw-r--r--src/mame/video/kchamp.c4
-rw-r--r--src/mame/video/kickgoal.c4
-rw-r--r--src/mame/video/kingobox.c4
-rw-r--r--src/mame/video/klax.c2
-rw-r--r--src/mame/video/kncljoe.c2
-rw-r--r--src/mame/video/konamigx.c69
-rw-r--r--src/mame/video/konamiic.c33
-rw-r--r--src/mame/video/konamiic.h8
-rw-r--r--src/mame/video/konicdev.c65
-rw-r--r--src/mame/video/konicdev.h36
-rw-r--r--src/mame/video/ksayakyu.c4
-rw-r--r--src/mame/video/kyugo.c2
-rw-r--r--src/mame/video/labyrunr.c4
-rw-r--r--src/mame/video/ladybug.c8
-rw-r--r--src/mame/video/ladyfrog.c2
-rw-r--r--src/mame/video/lasso.c12
-rw-r--r--src/mame/video/lastduel.c2
-rw-r--r--src/mame/video/lazercmd.c4
-rw-r--r--src/mame/video/legionna.c14
-rw-r--r--src/mame/video/leland.c4
-rw-r--r--src/mame/video/lemmings.c10
-rw-r--r--src/mame/video/lethal.c4
-rw-r--r--src/mame/video/lethalj.c4
-rw-r--r--src/mame/video/liberate.c18
-rw-r--r--src/mame/video/lkage.c4
-rw-r--r--src/mame/video/lockon.c10
-rw-r--r--src/mame/video/lordgun.c16
-rw-r--r--src/mame/video/lsasquad.c12
-rw-r--r--src/mame/video/lwings.c4
-rw-r--r--src/mame/video/m10.c8
-rw-r--r--src/mame/video/m107.c10
-rw-r--r--src/mame/video/m52.c6
-rw-r--r--src/mame/video/m57.c12
-rw-r--r--src/mame/video/m58.c6
-rw-r--r--src/mame/video/m62.c6
-rw-r--r--src/mame/video/m72.c8
-rw-r--r--src/mame/video/m90.c20
-rw-r--r--src/mame/video/m92.c14
-rw-r--r--src/mame/video/macrossp.c6
-rw-r--r--src/mame/video/madalien.c16
-rw-r--r--src/mame/video/magmax.c4
-rw-r--r--src/mame/video/mainevt.c2
-rw-r--r--src/mame/video/mainsnk.c2
-rw-r--r--src/mame/video/malzak.c28
-rw-r--r--src/mame/video/mappy.c10
-rw-r--r--src/mame/video/mario.c2
-rw-r--r--src/mame/video/markham.c2
-rw-r--r--src/mame/video/matmania.c16
-rw-r--r--src/mame/video/mcatadv.c12
-rw-r--r--src/mame/video/mcd212.c12
-rw-r--r--src/mame/video/mcr.c14
-rw-r--r--src/mame/video/mcr3.c4
-rw-r--r--src/mame/video/mcr68.c8
-rw-r--r--src/mame/video/meadows.c2
-rw-r--r--src/mame/video/megasys1.c6
-rw-r--r--src/mame/video/megazone.c4
-rw-r--r--src/mame/video/mermaid.c22
-rw-r--r--src/mame/video/metlclsh.c4
-rw-r--r--src/mame/video/metro.c26
-rw-r--r--src/mame/video/mexico86.c4
-rw-r--r--src/mame/video/micro3d.c4
-rw-r--r--src/mame/video/midtunit.c8
-rw-r--r--src/mame/video/midvunit.c2
-rw-r--r--src/mame/video/midyunit.c4
-rw-r--r--src/mame/video/midzeus.c4
-rw-r--r--src/mame/video/midzeus2.c4
-rw-r--r--src/mame/video/mikie.c2
-rw-r--r--src/mame/video/mitchell.c4
-rw-r--r--src/mame/video/mjkjidai.c4
-rw-r--r--src/mame/video/model1.c32
-rw-r--r--src/mame/video/model2.c36
-rw-r--r--src/mame/video/model3.c22
-rw-r--r--src/mame/video/momoko.c6
-rw-r--r--src/mame/video/moo.c2
-rw-r--r--src/mame/video/mrdo.c4
-rw-r--r--src/mame/video/mrflea.c4
-rw-r--r--src/mame/video/mrjong.c2
-rw-r--r--src/mame/video/ms32.c38
-rw-r--r--src/mame/video/msisaac.c2
-rw-r--r--src/mame/video/mugsmash.c2
-rw-r--r--src/mame/video/munchmo.c10
-rw-r--r--src/mame/video/mustache.c2
-rw-r--r--src/mame/video/mw8080bw.c20
-rw-r--r--src/mame/video/mystston.c2
-rw-r--r--src/mame/video/n64.c12
-rw-r--r--src/mame/video/n64.h6
-rw-r--r--src/mame/video/n8080.c6
-rw-r--r--src/mame/video/namcofl.c2
-rw-r--r--src/mame/video/namcona1.c18
-rw-r--r--src/mame/video/namconb1.c6
-rw-r--r--src/mame/video/namcos1.c6
-rw-r--r--src/mame/video/namcos2.c32
-rw-r--r--src/mame/video/namcos21.c8
-rw-r--r--src/mame/video/namcos22.c74
-rw-r--r--src/mame/video/namcos86.c6
-rw-r--r--src/mame/video/naughtyb.c6
-rw-r--r--src/mame/video/nbmj8688.c10
-rw-r--r--src/mame/video/nbmj8891.c8
-rw-r--r--src/mame/video/nbmj8900.c8
-rw-r--r--src/mame/video/nbmj8991.c8
-rw-r--r--src/mame/video/nbmj9195.c8
-rw-r--r--src/mame/video/nemesis.c6
-rw-r--r--src/mame/video/neogeo.c12
-rw-r--r--src/mame/video/ninjakd2.c22
-rw-r--r--src/mame/video/ninjaw.c6
-rw-r--r--src/mame/video/nitedrvr.c6
-rw-r--r--src/mame/video/niyanpai.c8
-rw-r--r--src/mame/video/nmk16.c14
-rw-r--r--src/mame/video/nova2001.c4
-rw-r--r--src/mame/video/nycaptor.c2
-rw-r--r--src/mame/video/offtwall.c2
-rw-r--r--src/mame/video/ohmygod.c2
-rw-r--r--src/mame/video/ojankohs.c2
-rw-r--r--src/mame/video/oneshot.c8
-rw-r--r--src/mame/video/opwolf.c2
-rw-r--r--src/mame/video/orbit.c2
-rw-r--r--src/mame/video/othldrby.c6
-rw-r--r--src/mame/video/othunder.c6
-rw-r--r--src/mame/video/overdriv.c2
-rw-r--r--src/mame/video/pacland.c12
-rw-r--r--src/mame/video/pacman.c2
-rw-r--r--src/mame/video/pandoras.c2
-rw-r--r--src/mame/video/paradise.c10
-rw-r--r--src/mame/video/parodius.c4
-rw-r--r--src/mame/video/pastelg.c4
-rw-r--r--src/mame/video/pbaction.c2
-rw-r--r--src/mame/video/pcktgal.c2
-rw-r--r--src/mame/video/pgm.c18
-rw-r--r--src/mame/video/pingpong.c2
-rw-r--r--src/mame/video/pirates.c2
-rw-r--r--src/mame/video/pitnrun.c6
-rw-r--r--src/mame/video/pk8000.c12
-rw-r--r--src/mame/video/pktgaldx.c6
-rw-r--r--src/mame/video/playch10.c4
-rw-r--r--src/mame/video/playmark.c26
-rw-r--r--src/mame/video/plygonet.c4
-rw-r--r--src/mame/video/pokechmp.c2
-rw-r--r--src/mame/video/polepos.c8
-rw-r--r--src/mame/video/poolshrk.c2
-rw-r--r--src/mame/video/pooyan.c2
-rw-r--r--src/mame/video/popeye.c8
-rw-r--r--src/mame/video/popper.c2
-rw-r--r--src/mame/video/portrait.c2
-rw-r--r--src/mame/video/powerins.c4
-rw-r--r--src/mame/video/ppu2c0x.c32
-rw-r--r--src/mame/video/ppu2c0x.h2
-rw-r--r--src/mame/video/prehisle.c2
-rw-r--r--src/mame/video/psikyo.c12
-rw-r--r--src/mame/video/psikyo4.c6
-rw-r--r--src/mame/video/psikyosh.c107
-rw-r--r--src/mame/video/psychic5.c8
-rw-r--r--src/mame/video/punchout.c6
-rw-r--r--src/mame/video/pushman.c2
-rw-r--r--src/mame/video/qdrmfgp.c2
-rw-r--r--src/mame/video/qix.c2
-rw-r--r--src/mame/video/quasar.c25
-rw-r--r--src/mame/video/quizdna.c4
-rw-r--r--src/mame/video/raiden.c2
-rw-r--r--src/mame/video/rainbow.c4
-rw-r--r--src/mame/video/rallyx.c24
-rw-r--r--src/mame/video/rampart.c8
-rw-r--r--src/mame/video/rastan.c2
-rw-r--r--src/mame/video/realbrk.c28
-rw-r--r--src/mame/video/redalert.c12
-rw-r--r--src/mame/video/redclash.c12
-rw-r--r--src/mame/video/relief.c8
-rw-r--r--src/mame/video/renegade.c2
-rw-r--r--src/mame/video/retofinv.c2
-rw-r--r--src/mame/video/rltennis.c8
-rw-r--r--src/mame/video/rocnrope.c2
-rw-r--r--src/mame/video/rohga.c18
-rw-r--r--src/mame/video/rollerg.c4
-rw-r--r--src/mame/video/rollrace.c2
-rw-r--r--src/mame/video/route16.c10
-rw-r--r--src/mame/video/rpunch.c12
-rw-r--r--src/mame/video/rungun.c4
-rw-r--r--src/mame/video/sauro.c4
-rw-r--r--src/mame/video/sbasketb.c2
-rw-r--r--src/mame/video/scotrsht.c2
-rw-r--r--src/mame/video/sderby.c2
-rw-r--r--src/mame/video/sega16sp.c58
-rw-r--r--src/mame/video/segag80r.c42
-rw-r--r--src/mame/video/segahang.c4
-rw-r--r--src/mame/video/segaic16.c24
-rw-r--r--src/mame/video/segaic16.h38
-rw-r--r--src/mame/video/segaic24.c55
-rw-r--r--src/mame/video/segaic24.h8
-rw-r--r--src/mame/video/segaorun.c6
-rw-r--r--src/mame/video/segas16a.c9
-rw-r--r--src/mame/video/segas16b.c9
-rw-r--r--src/mame/video/segas18.c16
-rw-r--r--src/mame/video/segas24.c6
-rw-r--r--src/mame/video/segas32.c66
-rw-r--r--src/mame/video/segaxbd.c4
-rw-r--r--src/mame/video/segaybd.c4
-rw-r--r--src/mame/video/sei_crtc.c4
-rw-r--r--src/mame/video/seibuspi.c28
-rw-r--r--src/mame/video/seicross.c2
-rw-r--r--src/mame/video/senjyo.c14
-rw-r--r--src/mame/video/seta.c22
-rw-r--r--src/mame/video/seta001.c6
-rw-r--r--src/mame/video/seta001.h6
-rw-r--r--src/mame/video/seta2.c8
-rw-r--r--src/mame/video/sf.c4
-rw-r--r--src/mame/video/shadfrce.c6
-rw-r--r--src/mame/video/shangha3.c6
-rw-r--r--src/mame/video/shangkid.c8
-rw-r--r--src/mame/video/shaolins.c2
-rw-r--r--src/mame/video/shootout.c6
-rw-r--r--src/mame/video/shuuz.c2
-rw-r--r--src/mame/video/sidearms.c18
-rw-r--r--src/mame/video/sidepckt.c2
-rw-r--r--src/mame/video/silkroad.c6
-rw-r--r--src/mame/video/simpl156.c4
-rw-r--r--src/mame/video/simpsons.c4
-rw-r--r--src/mame/video/sknsspr.c22
-rw-r--r--src/mame/video/sknsspr.h2
-rw-r--r--src/mame/video/skullxbo.c2
-rw-r--r--src/mame/video/skydiver.c2
-rw-r--r--src/mame/video/skyfox.c8
-rw-r--r--src/mame/video/skykid.c2
-rw-r--r--src/mame/video/skyraid.c34
-rw-r--r--src/mame/video/slapfght.c2
-rw-r--r--src/mame/video/slapshot.c6
-rw-r--r--src/mame/video/snes.c12
-rw-r--r--src/mame/video/snk.c8
-rw-r--r--src/mame/video/snk68.c4
-rw-r--r--src/mame/video/solomon.c2
-rw-r--r--src/mame/video/sonson.c2
-rw-r--r--src/mame/video/spacefb.c32
-rw-r--r--src/mame/video/spbactn.c26
-rw-r--r--src/mame/video/spcforce.c2
-rw-r--r--src/mame/video/spdodgeb.c2
-rw-r--r--src/mame/video/speedatk.c2
-rw-r--r--src/mame/video/speedbal.c2
-rw-r--r--src/mame/video/speedspn.c4
-rw-r--r--src/mame/video/splash.c8
-rw-r--r--src/mame/video/sprcros2.c2
-rw-r--r--src/mame/video/sprint2.c8
-rw-r--r--src/mame/video/sprint4.c4
-rw-r--r--src/mame/video/sprint8.c6
-rw-r--r--src/mame/video/spy.c4
-rw-r--r--src/mame/video/srmp2.c6
-rw-r--r--src/mame/video/srumbler.c2
-rw-r--r--src/mame/video/sshangha.c2
-rw-r--r--src/mame/video/sslam.c6
-rw-r--r--src/mame/video/ssozumo.c2
-rw-r--r--src/mame/video/sspeedr.c16
-rw-r--r--src/mame/video/ssrj.c2
-rw-r--r--src/mame/video/ssv.c14
-rw-r--r--src/mame/video/st0016.c12
-rw-r--r--src/mame/video/stactics.c6
-rw-r--r--src/mame/video/starcrus.c22
-rw-r--r--src/mame/video/starfire.c2
-rw-r--r--src/mame/video/starshp1.c44
-rw-r--r--src/mame/video/stfight.c6
-rw-r--r--src/mame/video/stlforce.c2
-rw-r--r--src/mame/video/strnskil.c2
-rw-r--r--src/mame/video/stvvdp2.c128
-rw-r--r--src/mame/video/suna16.c6
-rw-r--r--src/mame/video/suna8.c6
-rw-r--r--src/mame/video/supbtime.c2
-rw-r--r--src/mame/video/superchs.c4
-rw-r--r--src/mame/video/superqix.c6
-rw-r--r--src/mame/video/suprloco.c12
-rw-r--r--src/mame/video/suprnova.c38
-rw-r--r--src/mame/video/suprslam.c4
-rw-r--r--src/mame/video/surpratk.c4
-rw-r--r--src/mame/video/system1.c42
-rw-r--r--src/mame/video/system16.c14
-rw-r--r--src/mame/video/tagteam.c2
-rw-r--r--src/mame/video/tail2nos.c4
-rw-r--r--src/mame/video/taito_b.c40
-rw-r--r--src/mame/video/taito_f2.c44
-rw-r--r--src/mame/video/taito_f3.c60
-rw-r--r--src/mame/video/taito_h.c12
-rw-r--r--src/mame/video/taito_l.c6
-rw-r--r--src/mame/video/taito_o.c4
-rw-r--r--src/mame/video/taito_z.c40
-rw-r--r--src/mame/video/taitoair.c20
-rw-r--r--src/mame/video/taitoic.c104
-rw-r--r--src/mame/video/taitoic.h22
-rw-r--r--src/mame/video/taitojc.c16
-rw-r--r--src/mame/video/taitosj.c36
-rw-r--r--src/mame/video/tank8.c12
-rw-r--r--src/mame/video/tankbatt.c2
-rw-r--r--src/mame/video/tankbust.c2
-rw-r--r--src/mame/video/taotaido.c4
-rw-r--r--src/mame/video/targeth.c2
-rw-r--r--src/mame/video/tatsumi.c80
-rw-r--r--src/mame/video/taxidriv.c10
-rw-r--r--src/mame/video/tbowl.c6
-rw-r--r--src/mame/video/tceptor.c8
-rw-r--r--src/mame/video/tecmo.c6
-rw-r--r--src/mame/video/tecmo16.c42
-rw-r--r--src/mame/video/tecmosys.c16
-rw-r--r--src/mame/video/tehkanwc.c4
-rw-r--r--src/mame/video/terracre.c4
-rw-r--r--src/mame/video/tetrisp2.c18
-rw-r--r--src/mame/video/thedeep.c4
-rw-r--r--src/mame/video/thepit.c2
-rw-r--r--src/mame/video/thief.c6
-rw-r--r--src/mame/video/thoop2.c4
-rw-r--r--src/mame/video/thunderj.c10
-rw-r--r--src/mame/video/thunderx.c4
-rw-r--r--src/mame/video/tia.c2
-rw-r--r--src/mame/video/tiamc1.c2
-rw-r--r--src/mame/video/tigeroad.c2
-rw-r--r--src/mame/video/timelimt.c2
-rw-r--r--src/mame/video/timeplt.c2
-rw-r--r--src/mame/video/tmnt.c20
-rw-r--r--src/mame/video/tnzs.c2
-rw-r--r--src/mame/video/toaplan1.c18
-rw-r--r--src/mame/video/toaplan2.c14
-rw-r--r--src/mame/video/toki.c4
-rw-r--r--src/mame/video/toobin.c16
-rw-r--r--src/mame/video/topspeed.c6
-rw-r--r--src/mame/video/toypop.c8
-rw-r--r--src/mame/video/tp84.c2
-rw-r--r--src/mame/video/trackfld.c2
-rw-r--r--src/mame/video/travrusa.c2
-rw-r--r--src/mame/video/triplhnt.c8
-rw-r--r--src/mame/video/truco.c2
-rw-r--r--src/mame/video/tryout.c4
-rw-r--r--src/mame/video/tsamurai.c4
-rw-r--r--src/mame/video/tubep.c10
-rw-r--r--src/mame/video/tumbleb.c8
-rw-r--r--src/mame/video/tumblep.c2
-rw-r--r--src/mame/video/tunhunt.c14
-rw-r--r--src/mame/video/turbo.c18
-rw-r--r--src/mame/video/tutankhm.c2
-rw-r--r--src/mame/video/twin16.c22
-rw-r--r--src/mame/video/twincobr.c4
-rw-r--r--src/mame/video/tx1.c8
-rw-r--r--src/mame/video/ultratnk.c4
-rw-r--r--src/mame/video/undrfire.c12
-rw-r--r--src/mame/video/unico.c12
-rw-r--r--src/mame/video/vastar.c2
-rw-r--r--src/mame/video/vball.c2
-rw-r--r--src/mame/video/vdc.c2
-rw-r--r--src/mame/video/vendetta.c2
-rw-r--r--src/mame/video/vicdual.c4
-rw-r--r--src/mame/video/victory.c2
-rw-r--r--src/mame/video/vigilant.c10
-rw-r--r--src/mame/video/vindictr.c4
-rw-r--r--src/mame/video/volfied.c6
-rw-r--r--src/mame/video/vulgus.c2
-rw-r--r--src/mame/video/warpwarp.c6
-rw-r--r--src/mame/video/warriorb.c8
-rw-r--r--src/mame/video/wc90.c24
-rw-r--r--src/mame/video/wc90b.c2
-rw-r--r--src/mame/video/wecleman.c36
-rw-r--r--src/mame/video/welltris.c8
-rw-r--r--src/mame/video/wgp.c22
-rw-r--r--src/mame/video/williams.c6
-rw-r--r--src/mame/video/wiz.c12
-rw-r--r--src/mame/video/wolfpack.c16
-rw-r--r--src/mame/video/wrally.c4
-rw-r--r--src/mame/video/wwfsstar.c2
-rw-r--r--src/mame/video/wwfwfest.c2
-rw-r--r--src/mame/video/xain.c2
-rw-r--r--src/mame/video/xevious.c2
-rw-r--r--src/mame/video/xexex.c2
-rw-r--r--src/mame/video/xmen.c18
-rw-r--r--src/mame/video/xorworld.c2
-rw-r--r--src/mame/video/xxmissio.c2
-rw-r--r--src/mame/video/xybots.c2
-rw-r--r--src/mame/video/ygv608.c12
-rw-r--r--src/mame/video/yiear.c2
-rw-r--r--src/mame/video/yunsun16.c4
-rw-r--r--src/mame/video/yunsung8.c2
-rw-r--r--src/mame/video/zac2650.c12
-rw-r--r--src/mame/video/zaccaria.c2
-rw-r--r--src/mame/video/zaxxon.c16
-rw-r--r--src/mame/video/zerozone.c2
-rw-r--r--src/mame/video/zodiack.c12
-rw-r--r--src/osd/sdl/drawogl.c2
-rw-r--r--src/osd/sdl/sdlmain.c6
-rw-r--r--src/osd/windows/d3dhlsl.c4
-rw-r--r--src/tools/ldverify.c22
972 files changed, 4747 insertions, 4758 deletions
diff --git a/src/build/png2bdc.c b/src/build/png2bdc.c
index 2bb9227e6b2..f0085587881 100644
--- a/src/build/png2bdc.c
+++ b/src/build/png2bdc.c
@@ -93,9 +93,9 @@ struct _render_font
INLINE FUNCTIONS
***************************************************************************/
-INLINE int pixel_is_set(bitmap_t *bitmap, int y, int x)
+INLINE int pixel_is_set(bitmap_t &bitmap, int y, int x)
{
- return (bitmap->pix32(y, x) & 0xffffff) == 0;
+ return (bitmap.pix32(y, x) & 0xffffff) == 0;
}
@@ -258,26 +258,26 @@ error:
characters in the given font
-------------------------------------------------*/
-static int bitmap_to_chars(bitmap_t *bitmap, render_font *font)
+static int bitmap_to_chars(bitmap_t &bitmap, render_font *font)
{
int rowstart = 0;
int x, y;
/* loop over rows */
- while (rowstart < bitmap->height())
+ while (rowstart < bitmap.height())
{
int rowend, baseline, colstart;
int chstart;
/* find the top of the row */
- for ( ; rowstart < bitmap->height(); rowstart++)
+ for ( ; rowstart < bitmap.height(); rowstart++)
if (pixel_is_set(bitmap, rowstart, 0))
break;
- if (rowstart >= bitmap->height())
+ if (rowstart >= bitmap.height())
break;
/* find the bottom of the row */
- for (rowend = rowstart + 1; rowend < bitmap->height(); rowend++)
+ for (rowend = rowstart + 1; rowend < bitmap.height(); rowend++)
if (!pixel_is_set(bitmap, rowend, 0))
{
rowend--;
@@ -325,20 +325,20 @@ static int bitmap_to_chars(bitmap_t *bitmap, render_font *font)
/* scan the column to find characters */
colstart = 0;
- while (colstart < bitmap->width())
+ while (colstart < bitmap.width())
{
render_font_char *ch = &font->chars[chstart];
int colend;
/* find the start of the character */
- for ( ; colstart < bitmap->width(); colstart++)
+ for ( ; colstart < bitmap.width(); colstart++)
if (pixel_is_set(bitmap, rowend + 2, colstart))
break;
- if (colstart >= bitmap->width())
+ if (colstart >= bitmap.width())
break;
/* find the end of the character */
- for (colend = colstart + 1; colend < bitmap->width(); colend++)
+ for (colend = colstart + 1; colend < bitmap.width(); colend++)
if (!pixel_is_set(bitmap, rowend + 2, colend))
{
colend--;
@@ -382,7 +382,7 @@ static int bitmap_to_chars(bitmap_t *bitmap, render_font *font)
}
/* return non-zero (TRUE) if we errored */
- return (rowstart < bitmap->height());
+ return (rowstart < bitmap.height());
}
@@ -438,7 +438,7 @@ int main(int argc, char *argv[])
}
/* parse the PNG into characters */
- error = bitmap_to_chars(bitmap, font);
+ error = bitmap_to_chars(*bitmap, font);
delete bitmap;
if (error)
break;
diff --git a/src/emu/cpu/tms34010/tms34010.c b/src/emu/cpu/tms34010/tms34010.c
index 36466e1ceeb..a4e25fd006a 100644
--- a/src/emu/cpu/tms34010/tms34010.c
+++ b/src/emu/cpu/tms34010/tms34010.c
@@ -1117,17 +1117,17 @@ SCREEN_UPDATE( tms340x0 )
params.heblnk = params.hsblnk = cliprect.max_x + 1;
/* blank out the blank regions */
- if (bitmap->bpp() == 16)
+ if (bitmap.bpp() == 16)
{
- UINT16 *dest = &bitmap->pix16(cliprect.min_y);
+ UINT16 *dest = &bitmap.pix16(cliprect.min_y);
for (x = cliprect.min_x; x < params.heblnk; x++)
dest[x] = blackpen;
for (x = params.hsblnk; x <= cliprect.max_y; x++)
dest[x] = blackpen;
}
- else if (bitmap->bpp() == 32)
+ else if (bitmap.bpp() == 32)
{
- UINT32 *dest = &bitmap->pix32(cliprect.min_y);
+ UINT32 *dest = &bitmap.pix32(cliprect.min_y);
for (x = cliprect.min_x; x < params.heblnk; x++)
dest[x] = blackpen;
for (x = params.hsblnk; x <= cliprect.max_y; x++)
diff --git a/src/emu/cpu/tms34010/tms34010.h b/src/emu/cpu/tms34010/tms34010.h
index 44c6d512d4e..46c838c56a2 100644
--- a/src/emu/cpu/tms34010/tms34010.h
+++ b/src/emu/cpu/tms34010/tms34010.h
@@ -196,7 +196,7 @@ struct _tms34010_config
const char *screen_tag; /* the screen operated on */
UINT32 pixclock; /* the pixel clock (0 means don't adjust screen size) */
int pixperclock; /* pixels per clock */
- void (*scanline_callback)(screen_device &screen, bitmap_t *bitmap, int scanline, const tms34010_display_params *params);
+ void (*scanline_callback)(screen_device &screen, bitmap_t &bitmap, int scanline, const tms34010_display_params *params);
void (*output_int)(device_t *device, int state); /* output interrupt callback */
void (*to_shiftreg)(address_space *space, offs_t, UINT16 *); /* shift register write */
void (*from_shiftreg)(address_space *space, offs_t, UINT16 *); /* shift register read */
diff --git a/src/emu/drawgfx.c b/src/emu/drawgfx.c
index fd9b78d0c09..8eb13d53a24 100644
--- a/src/emu/drawgfx.c
+++ b/src/emu/drawgfx.c
@@ -20,6 +20,8 @@
/* if this line errors during compile, the size of NO_PRIORITY is wrong and I need to use something else */
UINT8 no_priority_size_is_wrong[2 * (sizeof(NO_PRIORITY) == 3) - 1];
+bitmap_t drawgfx_dummy_priority_bitmap;
+
/***************************************************************************
@@ -51,9 +53,9 @@ INLINE int readbit(const UINT8 *src, unsigned int bitnum)
than the width
-------------------------------------------------*/
-INLINE INT32 normalize_xscroll(bitmap_t *bitmap, INT32 xscroll)
+INLINE INT32 normalize_xscroll(bitmap_t &bitmap, INT32 xscroll)
{
- return (xscroll >= 0) ? xscroll % bitmap->width() : (bitmap->width() - (-xscroll) % bitmap->width());
+ return (xscroll >= 0) ? xscroll % bitmap.width() : (bitmap.width() - (-xscroll) % bitmap.width());
}
@@ -63,9 +65,9 @@ INLINE INT32 normalize_xscroll(bitmap_t *bitmap, INT32 xscroll)
than the height
-------------------------------------------------*/
-INLINE INT32 normalize_yscroll(bitmap_t *bitmap, INT32 yscroll)
+INLINE INT32 normalize_yscroll(bitmap_t &bitmap, INT32 yscroll)
{
- return (yscroll >= 0) ? yscroll % bitmap->height() : (bitmap->height() - (-yscroll) % bitmap->height());
+ return (yscroll >= 0) ? yscroll % bitmap.height() : (bitmap.height() - (-yscroll) % bitmap.height());
}
@@ -501,14 +503,14 @@ static void decodechar(const gfx_element *gfx, UINT32 code, const UINT8 *src)
no transparency
-------------------------------------------------*/
-void drawgfx_opaque(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx,
+void drawgfx_opaque(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx,
UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty)
{
- bitmap_t *priority = NULL; /* dummy, no priority in this case */
+ DECLARE_NO_PRIORITY;
const pen_t *paldata;
- assert(dest != NULL);
- assert(dest->bpp() == 16 || dest->bpp() == 32);
+ assert(dest.valid());
+ assert(dest.bpp() == 16 || dest.bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -517,7 +519,7 @@ void drawgfx_opaque(bitmap_t *dest, const rectangle &cliprect, const gfx_element
paldata = &gfx->machine().pens[gfx->color_base + gfx->color_granularity * color];
/* render based on dest bitmap depth */
- if (dest->bpp() == 16)
+ if (dest.bpp() == 16)
DRAWGFX_CORE(UINT16, PIXEL_OP_REMAP_OPAQUE, NO_PRIORITY);
else
DRAWGFX_CORE(UINT32, PIXEL_OP_REMAP_OPAQUE, NO_PRIORITY);
@@ -529,11 +531,11 @@ void drawgfx_opaque(bitmap_t *dest, const rectangle &cliprect, const gfx_element
a single transparent pen
-------------------------------------------------*/
-void drawgfx_transpen(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx,
+void drawgfx_transpen(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx,
UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,
UINT32 transpen)
{
- bitmap_t *priority = NULL; /* dummy, no priority in this case */
+ DECLARE_NO_PRIORITY;
const pen_t *paldata;
/* special case invalid pens to opaque */
@@ -543,8 +545,8 @@ void drawgfx_transpen(bitmap_t *dest, const rectangle &cliprect, const gfx_eleme
return;
}
- assert(dest != NULL);
- assert(dest->bpp() == 16 || dest->bpp() == 32);
+ assert(dest.valid());
+ assert(dest.bpp() == 16 || dest.bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -570,7 +572,7 @@ void drawgfx_transpen(bitmap_t *dest, const rectangle &cliprect, const gfx_eleme
}
/* render based on dest bitmap depth */
- if (dest->bpp() == 16)
+ if (dest.bpp() == 16)
DRAWGFX_CORE(UINT16, PIXEL_OP_REMAP_TRANSPEN, NO_PRIORITY);
else
DRAWGFX_CORE(UINT32, PIXEL_OP_REMAP_TRANSPEN, NO_PRIORITY);
@@ -583,14 +585,14 @@ void drawgfx_transpen(bitmap_t *dest, const rectangle &cliprect, const gfx_eleme
lookups
-------------------------------------------------*/
-void drawgfx_transpen_raw(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx,
+void drawgfx_transpen_raw(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx,
UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,
UINT32 transpen)
{
- bitmap_t *priority = NULL; /* dummy, no priority in this case */
+ DECLARE_NO_PRIORITY;
- assert(dest != NULL);
- assert(dest->bpp() == 16 || dest->bpp() == 32);
+ assert(dest.valid());
+ assert(dest.bpp() == 16 || dest.bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -601,7 +603,7 @@ void drawgfx_transpen_raw(bitmap_t *dest, const rectangle &cliprect, const gfx_e
return;
/* render based on dest bitmap depth */
- if (dest->bpp() == 16)
+ if (dest.bpp() == 16)
DRAWGFX_CORE(UINT16, PIXEL_OP_REBASE_TRANSPEN, NO_PRIORITY);
else
DRAWGFX_CORE(UINT32, PIXEL_OP_REBASE_TRANSPEN, NO_PRIORITY);
@@ -614,11 +616,11 @@ void drawgfx_transpen_raw(bitmap_t *dest, const rectangle &cliprect, const gfx_e
a mask
-------------------------------------------------*/
-void drawgfx_transmask(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx,
+void drawgfx_transmask(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx,
UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,
UINT32 transmask)
{
- bitmap_t *priority = NULL; /* dummy, no priority in this case */
+ DECLARE_NO_PRIORITY;
const pen_t *paldata;
/* special case 0 mask to opaque */
@@ -628,8 +630,8 @@ void drawgfx_transmask(bitmap_t *dest, const rectangle &cliprect, const gfx_elem
return;
}
- assert(dest != NULL);
- assert(dest->bpp() == 16 || dest->bpp() == 32);
+ assert(dest.valid());
+ assert(dest.bpp() == 16 || dest.bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -655,7 +657,7 @@ void drawgfx_transmask(bitmap_t *dest, const rectangle &cliprect, const gfx_elem
}
/* render based on dest bitmap depth */
- if (dest->bpp() == 16)
+ if (dest.bpp() == 16)
DRAWGFX_CORE(UINT16, PIXEL_OP_REMAP_TRANSMASK, NO_PRIORITY);
else
DRAWGFX_CORE(UINT32, PIXEL_OP_REMAP_TRANSMASK, NO_PRIORITY);
@@ -668,15 +670,15 @@ void drawgfx_transmask(bitmap_t *dest, const rectangle &cliprect, const gfx_elem
transparent, opaque, or shadowing
-------------------------------------------------*/
-void drawgfx_transtable(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx,
+void drawgfx_transtable(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx,
UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,
const UINT8 *pentable, const pen_t *shadowtable)
{
- bitmap_t *priority = NULL; /* dummy, no priority in this case */
+ DECLARE_NO_PRIORITY;
const pen_t *paldata;
- assert(dest != NULL);
- assert(dest->bpp() == 16 || dest->bpp() == 32);
+ assert(dest.valid());
+ assert(dest.bpp() == 16 || dest.bpp() == 32);
assert(gfx != NULL);
assert(pentable != NULL);
@@ -686,7 +688,7 @@ void drawgfx_transtable(bitmap_t *dest, const rectangle &cliprect, const gfx_ele
paldata = &gfx->machine().pens[gfx->color_base + gfx->color_granularity * color];
/* render based on dest bitmap depth */
- if (dest->bpp() == 16)
+ if (dest.bpp() == 16)
DRAWGFX_CORE(UINT16, PIXEL_OP_REMAP_TRANSTABLE16, NO_PRIORITY);
else
DRAWGFX_CORE(UINT32, PIXEL_OP_REMAP_TRANSTABLE32, NO_PRIORITY);
@@ -699,11 +701,11 @@ void drawgfx_transtable(bitmap_t *dest, const rectangle &cliprect, const gfx_ele
remaining pixels with a fixed alpha value
-------------------------------------------------*/
-void drawgfx_alpha(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx,
+void drawgfx_alpha(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx,
UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,
UINT32 transpen, UINT8 alpha)
{
- bitmap_t *priority = NULL; /* dummy, no priority in this case */
+ DECLARE_NO_PRIORITY;
const pen_t *paldata;
/* special case alpha = 0xff */
@@ -713,8 +715,8 @@ void drawgfx_alpha(bitmap_t *dest, const rectangle &cliprect, const gfx_element
return;
}
- assert(dest != NULL);
- assert(dest->bpp() == 16 || dest->bpp() == 32);
+ assert(dest.valid());
+ assert(dest.bpp() == 16 || dest.bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -727,7 +729,7 @@ void drawgfx_alpha(bitmap_t *dest, const rectangle &cliprect, const gfx_element
return;
/* render based on dest bitmap depth */
- if (dest->bpp() == 16)
+ if (dest.bpp() == 16)
DRAWGFX_CORE(UINT16, PIXEL_OP_REMAP_TRANSPEN_ALPHA16, NO_PRIORITY);
else
DRAWGFX_CORE(UINT32, PIXEL_OP_REMAP_TRANSPEN_ALPHA32, NO_PRIORITY);
@@ -744,11 +746,11 @@ void drawgfx_alpha(bitmap_t *dest, const rectangle &cliprect, const gfx_element
element with no transparency
-------------------------------------------------*/
-void drawgfxzoom_opaque(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx,
+void drawgfxzoom_opaque(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx,
UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,
UINT32 scalex, UINT32 scaley)
{
- bitmap_t *priority = NULL; /* dummy, no priority in this case */
+ DECLARE_NO_PRIORITY;
const pen_t *paldata;
/* non-zoom case */
@@ -758,8 +760,8 @@ void drawgfxzoom_opaque(bitmap_t *dest, const rectangle &cliprect, const gfx_ele
return;
}
- assert(dest != NULL);
- assert(dest->bpp() == 16 || dest->bpp() == 32);
+ assert(dest.valid());
+ assert(dest.bpp() == 16 || dest.bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -768,7 +770,7 @@ void drawgfxzoom_opaque(bitmap_t *dest, const rectangle &cliprect, const gfx_ele
paldata = &gfx->machine().pens[gfx->color_base + gfx->color_granularity * color];
/* render based on dest bitmap depth */
- if (dest->bpp() == 16)
+ if (dest.bpp() == 16)
DRAWGFXZOOM_CORE(UINT16, PIXEL_OP_REMAP_OPAQUE, NO_PRIORITY);
else
DRAWGFXZOOM_CORE(UINT32, PIXEL_OP_REMAP_OPAQUE, NO_PRIORITY);
@@ -780,11 +782,11 @@ void drawgfxzoom_opaque(bitmap_t *dest, const rectangle &cliprect, const gfx_ele
element with a single transparent pen
-------------------------------------------------*/
-void drawgfxzoom_transpen(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx,
+void drawgfxzoom_transpen(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx,
UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,
UINT32 scalex, UINT32 scaley, UINT32 transpen)
{
- bitmap_t *priority = NULL; /* dummy, no priority in this case */
+ DECLARE_NO_PRIORITY;
const pen_t *paldata;
/* non-zoom case */
@@ -801,8 +803,8 @@ void drawgfxzoom_transpen(bitmap_t *dest, const rectangle &cliprect, const gfx_e
return;
}
- assert(dest != NULL);
- assert(dest->bpp() == 16 || dest->bpp() == 32);
+ assert(dest.valid());
+ assert(dest.bpp() == 16 || dest.bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -828,7 +830,7 @@ void drawgfxzoom_transpen(bitmap_t *dest, const rectangle &cliprect, const gfx_e
}
/* render based on dest bitmap depth */
- if (dest->bpp() == 16)
+ if (dest.bpp() == 16)
DRAWGFXZOOM_CORE(UINT16, PIXEL_OP_REMAP_TRANSPEN, NO_PRIORITY);
else
DRAWGFXZOOM_CORE(UINT32, PIXEL_OP_REMAP_TRANSPEN, NO_PRIORITY);
@@ -841,11 +843,11 @@ void drawgfxzoom_transpen(bitmap_t *dest, const rectangle &cliprect, const gfx_e
color lookups
-------------------------------------------------*/
-void drawgfxzoom_transpen_raw(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx,
+void drawgfxzoom_transpen_raw(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx,
UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,
UINT32 scalex, UINT32 scaley, UINT32 transpen)
{
- bitmap_t *priority = NULL; /* dummy, no priority in this case */
+ DECLARE_NO_PRIORITY;
/* non-zoom case */
if (scalex == 0x10000 && scaley == 0x10000)
@@ -854,8 +856,8 @@ void drawgfxzoom_transpen_raw(bitmap_t *dest, const rectangle &cliprect, const g
return;
}
- assert(dest != NULL);
- assert(dest->bpp() == 16 || dest->bpp() == 32);
+ assert(dest.valid());
+ assert(dest.bpp() == 16 || dest.bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -866,7 +868,7 @@ void drawgfxzoom_transpen_raw(bitmap_t *dest, const rectangle &cliprect, const g
return;
/* render based on dest bitmap depth */
- if (dest->bpp() == 16)
+ if (dest.bpp() == 16)
DRAWGFXZOOM_CORE(UINT16, PIXEL_OP_REBASE_TRANSPEN, NO_PRIORITY);
else
DRAWGFXZOOM_CORE(UINT32, PIXEL_OP_REBASE_TRANSPEN, NO_PRIORITY);
@@ -879,11 +881,11 @@ void drawgfxzoom_transpen_raw(bitmap_t *dest, const rectangle &cliprect, const g
provided as a mask
-------------------------------------------------*/
-void drawgfxzoom_transmask(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx,
+void drawgfxzoom_transmask(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx,
UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,
UINT32 scalex, UINT32 scaley, UINT32 transmask)
{
- bitmap_t *priority = NULL; /* dummy, no priority in this case */
+ DECLARE_NO_PRIORITY;
const pen_t *paldata;
/* non-zoom case */
@@ -900,8 +902,8 @@ void drawgfxzoom_transmask(bitmap_t *dest, const rectangle &cliprect, const gfx_
return;
}
- assert(dest != NULL);
- assert(dest->bpp() == 16 || dest->bpp() == 32);
+ assert(dest.valid());
+ assert(dest.bpp() == 16 || dest.bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -927,7 +929,7 @@ void drawgfxzoom_transmask(bitmap_t *dest, const rectangle &cliprect, const gfx_
}
/* render based on dest bitmap depth */
- if (dest->bpp() == 16)
+ if (dest.bpp() == 16)
DRAWGFXZOOM_CORE(UINT16, PIXEL_OP_REMAP_TRANSMASK, NO_PRIORITY);
else
DRAWGFXZOOM_CORE(UINT32, PIXEL_OP_REMAP_TRANSMASK, NO_PRIORITY);
@@ -940,11 +942,11 @@ void drawgfxzoom_transmask(bitmap_t *dest, const rectangle &cliprect, const gfx_
are transparent, opaque, or shadowing
-------------------------------------------------*/
-void drawgfxzoom_transtable(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx,
+void drawgfxzoom_transtable(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx,
UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,
UINT32 scalex, UINT32 scaley, const UINT8 *pentable, const pen_t *shadowtable)
{
- bitmap_t *priority = NULL; /* dummy, no priority in this case */
+ DECLARE_NO_PRIORITY;
const pen_t *paldata;
/* non-zoom case */
@@ -954,8 +956,8 @@ void drawgfxzoom_transtable(bitmap_t *dest, const rectangle &cliprect, const gfx
return;
}
- assert(dest != NULL);
- assert(dest->bpp() == 16 || dest->bpp() == 32);
+ assert(dest.valid());
+ assert(dest.bpp() == 16 || dest.bpp() == 32);
assert(gfx != NULL);
assert(pentable != NULL);
@@ -965,7 +967,7 @@ void drawgfxzoom_transtable(bitmap_t *dest, const rectangle &cliprect, const gfx
paldata = &gfx->machine().pens[gfx->color_base + gfx->color_granularity * color];
/* render based on dest bitmap depth */
- if (dest->bpp() == 16)
+ if (dest.bpp() == 16)
DRAWGFXZOOM_CORE(UINT16, PIXEL_OP_REMAP_TRANSTABLE16, NO_PRIORITY);
else
DRAWGFXZOOM_CORE(UINT32, PIXEL_OP_REMAP_TRANSTABLE32, NO_PRIORITY);
@@ -978,11 +980,11 @@ void drawgfxzoom_transtable(bitmap_t *dest, const rectangle &cliprect, const gfx
the remaining pixels with a fixed alpha value
-------------------------------------------------*/
-void drawgfxzoom_alpha(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx,
+void drawgfxzoom_alpha(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx,
UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,
UINT32 scalex, UINT32 scaley, UINT32 transpen, UINT8 alpha)
{
- bitmap_t *priority = NULL; /* dummy, no priority in this case */
+ DECLARE_NO_PRIORITY;
const pen_t *paldata;
/* non-zoom case */
@@ -999,8 +1001,8 @@ void drawgfxzoom_alpha(bitmap_t *dest, const rectangle &cliprect, const gfx_elem
return;
}
- assert(dest != NULL);
- assert(dest->bpp() == 16 || dest->bpp() == 32);
+ assert(dest.valid());
+ assert(dest.bpp() == 16 || dest.bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -1013,7 +1015,7 @@ void drawgfxzoom_alpha(bitmap_t *dest, const rectangle &cliprect, const gfx_elem
return;
/* render based on dest bitmap depth */
- if (dest->bpp() == 16)
+ if (dest.bpp() == 16)
DRAWGFXZOOM_CORE(UINT16, PIXEL_OP_REMAP_TRANSPEN_ALPHA16, NO_PRIORITY);
else
DRAWGFXZOOM_CORE(UINT32, PIXEL_OP_REMAP_TRANSPEN_ALPHA32, NO_PRIORITY);
@@ -1031,14 +1033,14 @@ void drawgfxzoom_alpha(bitmap_t *dest, const rectangle &cliprect, const gfx_elem
bitmap
-------------------------------------------------*/
-void pdrawgfx_opaque(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx,
+void pdrawgfx_opaque(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx,
UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,
- bitmap_t *priority, UINT32 pmask)
+ bitmap_t &priority, UINT32 pmask)
{
const pen_t *paldata;
- assert(dest != NULL);
- assert(dest->bpp() == 16 || dest->bpp() == 32);
+ assert(dest.valid());
+ assert(dest.bpp() == 16 || dest.bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -1050,7 +1052,7 @@ void pdrawgfx_opaque(bitmap_t *dest, const rectangle &cliprect, const gfx_elemen
pmask |= 1 << 31;
/* render based on dest bitmap depth */
- if (dest->bpp() == 16)
+ if (dest.bpp() == 16)
DRAWGFX_CORE(UINT16, PIXEL_OP_REMAP_OPAQUE_PRIORITY, UINT8);
else
DRAWGFX_CORE(UINT32, PIXEL_OP_REMAP_OPAQUE_PRIORITY, UINT8);
@@ -1063,9 +1065,9 @@ void pdrawgfx_opaque(bitmap_t *dest, const rectangle &cliprect, const gfx_elemen
priority bitmap
-------------------------------------------------*/
-void pdrawgfx_transpen(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx,
+void pdrawgfx_transpen(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx,
UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,
- bitmap_t *priority, UINT32 pmask, UINT32 transpen)
+ bitmap_t &priority, UINT32 pmask, UINT32 transpen)
{
const pen_t *paldata;
@@ -1076,8 +1078,8 @@ void pdrawgfx_transpen(bitmap_t *dest, const rectangle &cliprect, const gfx_elem
return;
}
- assert(dest != NULL);
- assert(dest->bpp() == 16 || dest->bpp() == 32);
+ assert(dest.valid());
+ assert(dest.bpp() == 16 || dest.bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -1106,7 +1108,7 @@ void pdrawgfx_transpen(bitmap_t *dest, const rectangle &cliprect, const gfx_elem
pmask |= 1 << 31;
/* render based on dest bitmap depth */
- if (dest->bpp() == 16)
+ if (dest.bpp() == 16)
DRAWGFX_CORE(UINT16, PIXEL_OP_REMAP_TRANSPEN_PRIORITY, UINT8);
else
DRAWGFX_CORE(UINT32, PIXEL_OP_REMAP_TRANSPEN_PRIORITY, UINT8);
@@ -1119,12 +1121,12 @@ void pdrawgfx_transpen(bitmap_t *dest, const rectangle &cliprect, const gfx_elem
lookups, checking against the priority bitmap
-------------------------------------------------*/
-void pdrawgfx_transpen_raw(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx,
+void pdrawgfx_transpen_raw(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx,
UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,
- bitmap_t *priority, UINT32 pmask, UINT32 transpen)
+ bitmap_t &priority, UINT32 pmask, UINT32 transpen)
{
- assert(dest != NULL);
- assert(dest->bpp() == 16 || dest->bpp() == 32);
+ assert(dest.valid());
+ assert(dest.bpp() == 16 || dest.bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -1138,7 +1140,7 @@ void pdrawgfx_transpen_raw(bitmap_t *dest, const rectangle &cliprect, const gfx_
pmask |= 1 << 31;
/* render based on dest bitmap depth */
- if (dest->bpp() == 16)
+ if (dest.bpp() == 16)
DRAWGFX_CORE(UINT16, PIXEL_OP_REBASE_TRANSPEN_PRIORITY, UINT8);
else
DRAWGFX_CORE(UINT32, PIXEL_OP_REBASE_TRANSPEN_PRIORITY, UINT8);
@@ -1151,9 +1153,9 @@ void pdrawgfx_transpen_raw(bitmap_t *dest, const rectangle &cliprect, const gfx_
a mask, checking against the priority bitmap
-------------------------------------------------*/
-void pdrawgfx_transmask(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx,
+void pdrawgfx_transmask(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx,
UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,
- bitmap_t *priority, UINT32 pmask, UINT32 transmask)
+ bitmap_t &priority, UINT32 pmask, UINT32 transmask)
{
const pen_t *paldata;
@@ -1164,8 +1166,8 @@ void pdrawgfx_transmask(bitmap_t *dest, const rectangle &cliprect, const gfx_ele
return;
}
- assert(dest != NULL);
- assert(dest->bpp() == 16 || dest->bpp() == 32);
+ assert(dest.valid());
+ assert(dest.bpp() == 16 || dest.bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -1194,7 +1196,7 @@ void pdrawgfx_transmask(bitmap_t *dest, const rectangle &cliprect, const gfx_ele
pmask |= 1 << 31;
/* render based on dest bitmap depth */
- if (dest->bpp() == 16)
+ if (dest.bpp() == 16)
DRAWGFX_CORE(UINT16, PIXEL_OP_REMAP_TRANSMASK_PRIORITY, UINT8);
else
DRAWGFX_CORE(UINT32, PIXEL_OP_REMAP_TRANSMASK_PRIORITY, UINT8);
@@ -1208,14 +1210,14 @@ void pdrawgfx_transmask(bitmap_t *dest, const rectangle &cliprect, const gfx_ele
against the priority bitmap
-------------------------------------------------*/
-void pdrawgfx_transtable(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx,
+void pdrawgfx_transtable(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx,
UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,
- bitmap_t *priority, UINT32 pmask, const UINT8 *pentable, const pen_t *shadowtable)
+ bitmap_t &priority, UINT32 pmask, const UINT8 *pentable, const pen_t *shadowtable)
{
const pen_t *paldata;
- assert(dest != NULL);
- assert(dest->bpp() == 16 || dest->bpp() == 32);
+ assert(dest.valid());
+ assert(dest.bpp() == 16 || dest.bpp() == 32);
assert(gfx != NULL);
assert(pentable != NULL);
@@ -1228,7 +1230,7 @@ void pdrawgfx_transtable(bitmap_t *dest, const rectangle &cliprect, const gfx_el
pmask |= 1 << 31;
/* render based on dest bitmap depth */
- if (dest->bpp() == 16)
+ if (dest.bpp() == 16)
DRAWGFX_CORE(UINT16, PIXEL_OP_REMAP_TRANSTABLE16_PRIORITY, UINT8);
else
DRAWGFX_CORE(UINT32, PIXEL_OP_REMAP_TRANSTABLE32_PRIORITY, UINT8);
@@ -1242,14 +1244,14 @@ void pdrawgfx_transtable(bitmap_t *dest, const rectangle &cliprect, const gfx_el
checking against the priority bitmap
-------------------------------------------------*/
-void pdrawgfx_alpha(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx,
+void pdrawgfx_alpha(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx,
UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,
- bitmap_t *priority, UINT32 pmask, UINT32 transpen, UINT8 alpha)
+ bitmap_t &priority, UINT32 pmask, UINT32 transpen, UINT8 alpha)
{
const pen_t *paldata;
- assert(dest != NULL);
- assert(dest->bpp() == 16 || dest->bpp() == 32);
+ assert(dest.valid());
+ assert(dest.bpp() == 16 || dest.bpp() == 32);
assert(gfx != NULL);
/* special case alpha = 0xff */
@@ -1272,7 +1274,7 @@ void pdrawgfx_alpha(bitmap_t *dest, const rectangle &cliprect, const gfx_element
pmask |= 1 << 31;
/* render based on dest bitmap depth */
- if (dest->bpp() == 16)
+ if (dest.bpp() == 16)
DRAWGFX_CORE(UINT16, PIXEL_OP_REMAP_TRANSPEN_ALPHA16_PRIORITY, UINT8);
else
DRAWGFX_CORE(UINT32, PIXEL_OP_REMAP_TRANSPEN_ALPHA32_PRIORITY, UINT8);
@@ -1290,9 +1292,9 @@ void pdrawgfx_alpha(bitmap_t *dest, const rectangle &cliprect, const gfx_element
the priority bitmap
-------------------------------------------------*/
-void pdrawgfxzoom_opaque(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx,
+void pdrawgfxzoom_opaque(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx,
UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,
- UINT32 scalex, UINT32 scaley, bitmap_t *priority, UINT32 pmask)
+ UINT32 scalex, UINT32 scaley, bitmap_t &priority, UINT32 pmask)
{
const pen_t *paldata;
@@ -1303,8 +1305,8 @@ void pdrawgfxzoom_opaque(bitmap_t *dest, const rectangle &cliprect, const gfx_el
return;
}
- assert(dest != NULL);
- assert(dest->bpp() == 16 || dest->bpp() == 32);
+ assert(dest.valid());
+ assert(dest.bpp() == 16 || dest.bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -1316,7 +1318,7 @@ void pdrawgfxzoom_opaque(bitmap_t *dest, const rectangle &cliprect, const gfx_el
pmask |= 1 << 31;
/* render based on dest bitmap depth */
- if (dest->bpp() == 16)
+ if (dest.bpp() == 16)
DRAWGFXZOOM_CORE(UINT16, PIXEL_OP_REMAP_OPAQUE_PRIORITY, UINT8);
else
DRAWGFXZOOM_CORE(UINT32, PIXEL_OP_REMAP_OPAQUE_PRIORITY, UINT8);
@@ -1329,9 +1331,9 @@ void pdrawgfxzoom_opaque(bitmap_t *dest, const rectangle &cliprect, const gfx_el
checking against the priority bitmap
-------------------------------------------------*/
-void pdrawgfxzoom_transpen(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx,
+void pdrawgfxzoom_transpen(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx,
UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,
- UINT32 scalex, UINT32 scaley, bitmap_t *priority, UINT32 pmask,
+ UINT32 scalex, UINT32 scaley, bitmap_t &priority, UINT32 pmask,
UINT32 transpen)
{
const pen_t *paldata;
@@ -1350,8 +1352,8 @@ void pdrawgfxzoom_transpen(bitmap_t *dest, const rectangle &cliprect, const gfx_
return;
}
- assert(dest != NULL);
- assert(dest->bpp() == 16 || dest->bpp() == 32);
+ assert(dest.valid());
+ assert(dest.bpp() == 16 || dest.bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -1380,7 +1382,7 @@ void pdrawgfxzoom_transpen(bitmap_t *dest, const rectangle &cliprect, const gfx_
pmask |= 1 << 31;
/* render based on dest bitmap depth */
- if (dest->bpp() == 16)
+ if (dest.bpp() == 16)
DRAWGFXZOOM_CORE(UINT16, PIXEL_OP_REMAP_TRANSPEN_PRIORITY, UINT8);
else
DRAWGFXZOOM_CORE(UINT32, PIXEL_OP_REMAP_TRANSPEN_PRIORITY, UINT8);
@@ -1394,9 +1396,9 @@ void pdrawgfxzoom_transpen(bitmap_t *dest, const rectangle &cliprect, const gfx_
bitmap
-------------------------------------------------*/
-void pdrawgfxzoom_transpen_raw(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx,
+void pdrawgfxzoom_transpen_raw(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx,
UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,
- UINT32 scalex, UINT32 scaley, bitmap_t *priority, UINT32 pmask,
+ UINT32 scalex, UINT32 scaley, bitmap_t &priority, UINT32 pmask,
UINT32 transpen)
{
/* non-zoom case */
@@ -1406,8 +1408,8 @@ void pdrawgfxzoom_transpen_raw(bitmap_t *dest, const rectangle &cliprect, const
return;
}
- assert(dest != NULL);
- assert(dest->bpp() == 16 || dest->bpp() == 32);
+ assert(dest.valid());
+ assert(dest.bpp() == 16 || dest.bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -1421,7 +1423,7 @@ void pdrawgfxzoom_transpen_raw(bitmap_t *dest, const rectangle &cliprect, const
pmask |= 1 << 31;
/* render based on dest bitmap depth */
- if (dest->bpp() == 16)
+ if (dest.bpp() == 16)
DRAWGFXZOOM_CORE(UINT16, PIXEL_OP_REBASE_TRANSPEN_PRIORITY, UINT8);
else
DRAWGFXZOOM_CORE(UINT32, PIXEL_OP_REBASE_TRANSPEN_PRIORITY, UINT8);
@@ -1435,9 +1437,9 @@ void pdrawgfxzoom_transpen_raw(bitmap_t *dest, const rectangle &cliprect, const
priority bitmap
-------------------------------------------------*/
-void pdrawgfxzoom_transmask(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx,
+void pdrawgfxzoom_transmask(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx,
UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,
- UINT32 scalex, UINT32 scaley, bitmap_t *priority, UINT32 pmask,
+ UINT32 scalex, UINT32 scaley, bitmap_t &priority, UINT32 pmask,
UINT32 transmask)
{
const pen_t *paldata;
@@ -1456,8 +1458,8 @@ void pdrawgfxzoom_transmask(bitmap_t *dest, const rectangle &cliprect, const gfx
return;
}
- assert(dest != NULL);
- assert(dest->bpp() == 16 || dest->bpp() == 32);
+ assert(dest.valid());
+ assert(dest.bpp() == 16 || dest.bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -1486,7 +1488,7 @@ void pdrawgfxzoom_transmask(bitmap_t *dest, const rectangle &cliprect, const gfx
pmask |= 1 << 31;
/* render based on dest bitmap depth */
- if (dest->bpp() == 16)
+ if (dest.bpp() == 16)
DRAWGFXZOOM_CORE(UINT16, PIXEL_OP_REMAP_TRANSMASK_PRIORITY, UINT8);
else
DRAWGFXZOOM_CORE(UINT32, PIXEL_OP_REMAP_TRANSMASK_PRIORITY, UINT8);
@@ -1500,9 +1502,9 @@ void pdrawgfxzoom_transmask(bitmap_t *dest, const rectangle &cliprect, const gfx
checking against the priority bitmap
-------------------------------------------------*/
-void pdrawgfxzoom_transtable(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx,
+void pdrawgfxzoom_transtable(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx,
UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,
- UINT32 scalex, UINT32 scaley, bitmap_t *priority, UINT32 pmask,
+ UINT32 scalex, UINT32 scaley, bitmap_t &priority, UINT32 pmask,
const UINT8 *pentable, const pen_t *shadowtable)
{
const pen_t *paldata;
@@ -1514,8 +1516,8 @@ void pdrawgfxzoom_transtable(bitmap_t *dest, const rectangle &cliprect, const gf
return;
}
- assert(dest != NULL);
- assert(dest->bpp() == 16 || dest->bpp() == 32);
+ assert(dest.valid());
+ assert(dest.bpp() == 16 || dest.bpp() == 32);
assert(gfx != NULL);
assert(pentable != NULL);
@@ -1528,7 +1530,7 @@ void pdrawgfxzoom_transtable(bitmap_t *dest, const rectangle &cliprect, const gf
pmask |= 1 << 31;
/* render based on dest bitmap depth */
- if (dest->bpp() == 16)
+ if (dest.bpp() == 16)
DRAWGFXZOOM_CORE(UINT16, PIXEL_OP_REMAP_TRANSTABLE16_PRIORITY, UINT8);
else
DRAWGFXZOOM_CORE(UINT32, PIXEL_OP_REMAP_TRANSTABLE32_PRIORITY, UINT8);
@@ -1543,9 +1545,9 @@ void pdrawgfxzoom_transtable(bitmap_t *dest, const rectangle &cliprect, const gf
bitmap
-------------------------------------------------*/
-void pdrawgfxzoom_alpha(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx,
+void pdrawgfxzoom_alpha(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx,
UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,
- UINT32 scalex, UINT32 scaley, bitmap_t *priority, UINT32 pmask,
+ UINT32 scalex, UINT32 scaley, bitmap_t &priority, UINT32 pmask,
UINT32 transpen, UINT8 alpha)
{
const pen_t *paldata;
@@ -1564,8 +1566,8 @@ void pdrawgfxzoom_alpha(bitmap_t *dest, const rectangle &cliprect, const gfx_ele
return;
}
- assert(dest != NULL);
- assert(dest->bpp() == 16 || dest->bpp() == 32);
+ assert(dest.valid());
+ assert(dest.bpp() == 16 || dest.bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -1581,7 +1583,7 @@ void pdrawgfxzoom_alpha(bitmap_t *dest, const rectangle &cliprect, const gfx_ele
pmask |= 1 << 31;
/* render based on dest bitmap depth */
- if (dest->bpp() == 16)
+ if (dest.bpp() == 16)
DRAWGFXZOOM_CORE(UINT16, PIXEL_OP_REMAP_TRANSPEN_ALPHA16_PRIORITY, UINT8);
else
DRAWGFXZOOM_CORE(UINT32, PIXEL_OP_REMAP_TRANSPEN_ALPHA32_PRIORITY, UINT8);
@@ -1598,18 +1600,18 @@ void pdrawgfxzoom_alpha(bitmap_t *dest, const rectangle &cliprect, const gfx_ele
buffer to a single scanline of a bitmap
-------------------------------------------------*/
-void draw_scanline8(bitmap_t *bitmap, INT32 destx, INT32 desty, INT32 length, const UINT8 *srcptr, const pen_t *paldata)
+void draw_scanline8(bitmap_t &bitmap, INT32 destx, INT32 desty, INT32 length, const UINT8 *srcptr, const pen_t *paldata)
{
- bitmap_t *priority = NULL; /* dummy, no priority in this case */
+ DECLARE_NO_PRIORITY;
- assert(bitmap != NULL);
- assert(bitmap->bpp() == 16 || bitmap->bpp() == 32);
+ assert(bitmap.valid());
+ assert(bitmap.bpp() == 16 || bitmap.bpp() == 32);
/* palette lookup case */
if (paldata != NULL)
{
/* 16bpp case */
- if (bitmap->bpp() == 16)
+ if (bitmap.bpp() == 16)
DRAWSCANLINE_CORE(UINT16, PIXEL_OP_REMAP_OPAQUE, NO_PRIORITY);
else
DRAWSCANLINE_CORE(UINT32, PIXEL_OP_REMAP_OPAQUE, NO_PRIORITY);
@@ -1619,7 +1621,7 @@ void draw_scanline8(bitmap_t *bitmap, INT32 destx, INT32 desty, INT32 length, co
else
{
/* 16bpp case */
- if (bitmap->bpp() == 16)
+ if (bitmap.bpp() == 16)
DRAWSCANLINE_CORE(UINT16, PIXEL_OP_COPY_OPAQUE, NO_PRIORITY);
else
DRAWSCANLINE_CORE(UINT32, PIXEL_OP_COPY_OPAQUE, NO_PRIORITY);
@@ -1632,18 +1634,18 @@ void draw_scanline8(bitmap_t *bitmap, INT32 destx, INT32 desty, INT32 length, co
buffer to a single scanline of a bitmap
-------------------------------------------------*/
-void draw_scanline16(bitmap_t *bitmap, INT32 destx, INT32 desty, INT32 length, const UINT16 *srcptr, const pen_t *paldata)
+void draw_scanline16(bitmap_t &bitmap, INT32 destx, INT32 desty, INT32 length, const UINT16 *srcptr, const pen_t *paldata)
{
- bitmap_t *priority = NULL; /* dummy, no priority in this case */
+ DECLARE_NO_PRIORITY;
- assert(bitmap != NULL);
- assert(bitmap->bpp() == 16 || bitmap->bpp() == 32);
+ assert(bitmap.valid());
+ assert(bitmap.bpp() == 16 || bitmap.bpp() == 32);
/* palette lookup case */
if (paldata != NULL)
{
/* 16bpp case */
- if (bitmap->bpp() == 16)
+ if (bitmap.bpp() == 16)
DRAWSCANLINE_CORE(UINT16, PIXEL_OP_REMAP_OPAQUE, NO_PRIORITY);
else
DRAWSCANLINE_CORE(UINT32, PIXEL_OP_REMAP_OPAQUE, NO_PRIORITY);
@@ -1653,7 +1655,7 @@ void draw_scanline16(bitmap_t *bitmap, INT32 destx, INT32 desty, INT32 length, c
else
{
/* 16bpp case */
- if (bitmap->bpp() == 16)
+ if (bitmap.bpp() == 16)
DRAWSCANLINE_CORE(UINT16, PIXEL_OP_COPY_OPAQUE, NO_PRIORITY);
else
DRAWSCANLINE_CORE(UINT32, PIXEL_OP_COPY_OPAQUE, NO_PRIORITY);
@@ -1666,18 +1668,18 @@ void draw_scanline16(bitmap_t *bitmap, INT32 destx, INT32 desty, INT32 length, c
buffer to a single scanline of a bitmap
-------------------------------------------------*/
-void draw_scanline32(bitmap_t *bitmap, INT32 destx, INT32 desty, INT32 length, const UINT32 *srcptr, const pen_t *paldata)
+void draw_scanline32(bitmap_t &bitmap, INT32 destx, INT32 desty, INT32 length, const UINT32 *srcptr, const pen_t *paldata)
{
- bitmap_t *priority = NULL; /* dummy, no priority in this case */
+ DECLARE_NO_PRIORITY;
- assert(bitmap != NULL);
- assert(bitmap->bpp() == 16 || bitmap->bpp() == 32);
+ assert(bitmap.valid());
+ assert(bitmap.bpp() == 16 || bitmap.bpp() == 32);
/* palette lookup case */
if (paldata != NULL)
{
/* 16bpp case */
- if (bitmap->bpp() == 16)
+ if (bitmap.bpp() == 16)
DRAWSCANLINE_CORE(UINT16, PIXEL_OP_REMAP_OPAQUE, NO_PRIORITY);
else
DRAWSCANLINE_CORE(UINT32, PIXEL_OP_REMAP_OPAQUE, NO_PRIORITY);
@@ -1687,7 +1689,7 @@ void draw_scanline32(bitmap_t *bitmap, INT32 destx, INT32 desty, INT32 length, c
else
{
/* 16bpp case */
- if (bitmap->bpp() == 16)
+ if (bitmap.bpp() == 16)
DRAWSCANLINE_CORE(UINT16, PIXEL_OP_COPY_OPAQUE, NO_PRIORITY);
else
DRAWSCANLINE_CORE(UINT32, PIXEL_OP_COPY_OPAQUE, NO_PRIORITY);
@@ -1705,13 +1707,13 @@ void draw_scanline32(bitmap_t *bitmap, INT32 destx, INT32 desty, INT32 length, c
scanline of a bitmap to an 8bpp buffer
-------------------------------------------------*/
-void extract_scanline8(bitmap_t *bitmap, INT32 srcx, INT32 srcy, INT32 length, UINT8 *destptr)
+void extract_scanline8(bitmap_t &bitmap, INT32 srcx, INT32 srcy, INT32 length, UINT8 *destptr)
{
- assert(bitmap != NULL);
- assert(bitmap->bpp() == 16 || bitmap->bpp() == 32);
+ assert(bitmap.valid());
+ assert(bitmap.bpp() == 16 || bitmap.bpp() == 32);
/* 16bpp case */
- if (bitmap->bpp() == 16)
+ if (bitmap.bpp() == 16)
EXTRACTSCANLINE_CORE(UINT16);
else
EXTRACTSCANLINE_CORE(UINT32);
@@ -1723,13 +1725,13 @@ void extract_scanline8(bitmap_t *bitmap, INT32 srcx, INT32 srcy, INT32 length, U
scanline of a bitmap to a 16bpp buffer
-------------------------------------------------*/
-void extract_scanline16(bitmap_t *bitmap, INT32 srcx, INT32 srcy, INT32 length, UINT16 *destptr)
+void extract_scanline16(bitmap_t &bitmap, INT32 srcx, INT32 srcy, INT32 length, UINT16 *destptr)
{
- assert(bitmap != NULL);
- assert(bitmap->bpp() == 16 || bitmap->bpp() == 32);
+ assert(bitmap.valid());
+ assert(bitmap.bpp() == 16 || bitmap.bpp() == 32);
/* 16bpp case */
- if (bitmap->bpp() == 16)
+ if (bitmap.bpp() == 16)
EXTRACTSCANLINE_CORE(UINT16);
else
EXTRACTSCANLINE_CORE(UINT32);
@@ -1741,13 +1743,13 @@ void extract_scanline16(bitmap_t *bitmap, INT32 srcx, INT32 srcy, INT32 length,
scanline of a bitmap to a 32bpp buffer
-------------------------------------------------*/
-void extract_scanline32(bitmap_t *bitmap, INT32 srcx, INT32 srcy, INT32 length, UINT32 *destptr)
+void extract_scanline32(bitmap_t &bitmap, INT32 srcx, INT32 srcy, INT32 length, UINT32 *destptr)
{
- assert(bitmap != NULL);
- assert(bitmap->bpp() == 16 || bitmap->bpp() == 32);
+ assert(bitmap.valid());
+ assert(bitmap.bpp() == 16 || bitmap.bpp() == 32);
/* 16bpp case */
- if (bitmap->bpp() == 16)
+ if (bitmap.bpp() == 16)
EXTRACTSCANLINE_CORE(UINT16);
else
EXTRACTSCANLINE_CORE(UINT32);
@@ -1764,18 +1766,18 @@ void extract_scanline32(bitmap_t *bitmap, INT32 srcx, INT32 srcy, INT32 length,
copying all unclipped pixels
-------------------------------------------------*/
-void copybitmap(bitmap_t *dest, bitmap_t *src, int flipx, int flipy, INT32 destx, INT32 desty, const rectangle &cliprect)
+void copybitmap(bitmap_t &dest, bitmap_t &src, int flipx, int flipy, INT32 destx, INT32 desty, const rectangle &cliprect)
{
- bitmap_t *priority = NULL; /* dummy, no priority in this case */
+ DECLARE_NO_PRIORITY;
- assert(dest != NULL);
- assert(src != NULL);
- assert(dest->bpp() == 8 || dest->bpp() == 16 || dest->bpp() == 32);
- assert(src->bpp() == dest->bpp());
+ assert(dest.valid());
+ assert(src.valid());
+ assert(dest.bpp() == 8 || dest.bpp() == 16 || dest.bpp() == 32);
+ assert(src.bpp() == dest.bpp());
- if (dest->bpp() == 8)
+ if (dest.bpp() == 8)
COPYBITMAP_CORE(UINT8, PIXEL_OP_COPY_OPAQUE, NO_PRIORITY);
- else if (dest->bpp() == 16)
+ else if (dest.bpp() == 16)
COPYBITMAP_CORE(UINT16, PIXEL_OP_COPY_OPAQUE, NO_PRIORITY);
else
COPYBITMAP_CORE(UINT32, PIXEL_OP_COPY_OPAQUE, NO_PRIORITY);
@@ -1788,23 +1790,23 @@ void copybitmap(bitmap_t *dest, bitmap_t *src, int flipx, int flipy, INT32 destx
those that match transpen
-------------------------------------------------*/
-void copybitmap_trans(bitmap_t *dest, bitmap_t *src, int flipx, int flipy, INT32 destx, INT32 desty, const rectangle &cliprect, UINT32 transpen)
+void copybitmap_trans(bitmap_t &dest, bitmap_t &src, int flipx, int flipy, INT32 destx, INT32 desty, const rectangle &cliprect, UINT32 transpen)
{
- bitmap_t *priority = NULL; /* dummy, no priority in this case */
+ DECLARE_NO_PRIORITY;
- assert(dest != NULL);
- assert(src != NULL);
- assert(dest->bpp() == 8 || dest->bpp() == 16 || dest->bpp() == 32);
- assert(src->bpp() == dest->bpp());
+ assert(dest.valid());
+ assert(src.valid());
+ assert(dest.bpp() == 8 || dest.bpp() == 16 || dest.bpp() == 32);
+ assert(src.bpp() == dest.bpp());
- if (dest->bpp() == 8)
+ if (dest.bpp() == 8)
{
if (transpen > 0xff)
copybitmap(dest, src, flipx, flipy, destx, desty, cliprect);
else
COPYBITMAP_CORE(UINT8, PIXEL_OP_COPY_TRANSPEN, NO_PRIORITY);
}
- else if (dest->bpp() == 16)
+ else if (dest.bpp() == 16)
{
if (transpen > 0xffff)
copybitmap(dest, src, flipx, flipy, destx, desty, cliprect);
@@ -1832,7 +1834,7 @@ void copybitmap_trans(bitmap_t *dest, bitmap_t *src, int flipx, int flipy, INT32
applying scrolling to one or more rows/colums
-------------------------------------------------*/
-void copyscrollbitmap(bitmap_t *dest, bitmap_t *src, UINT32 numrows, const INT32 *rowscroll, UINT32 numcols, const INT32 *colscroll, const rectangle &cliprect)
+void copyscrollbitmap(bitmap_t &dest, bitmap_t &src, UINT32 numrows, const INT32 *rowscroll, UINT32 numcols, const INT32 *colscroll, const rectangle &cliprect)
{
/* just call through to the transparent case as the underlying copybitmap will
optimize for pen == 0xffffffff */
@@ -1847,7 +1849,7 @@ void copyscrollbitmap(bitmap_t *dest, bitmap_t *src, UINT32 numrows, const INT32
scrolling to one or more rows/colums
-------------------------------------------------*/
-void copyscrollbitmap_trans(bitmap_t *dest, bitmap_t *src, UINT32 numrows, const INT32 *rowscroll, UINT32 numcols, const INT32 *colscroll, const rectangle &cliprect, UINT32 transpen)
+void copyscrollbitmap_trans(bitmap_t &dest, bitmap_t &src, UINT32 numrows, const INT32 *rowscroll, UINT32 numcols, const INT32 *colscroll, const rectangle &cliprect, UINT32 transpen)
{
/* no rowscroll and no colscroll means no scroll */
if (numrows == 0 && numcols == 0)
@@ -1856,10 +1858,10 @@ void copyscrollbitmap_trans(bitmap_t *dest, bitmap_t *src, UINT32 numrows, const
return;
}
- assert(dest != NULL);
- assert(src != NULL);
- assert(dest->bpp() == 8 || dest->bpp() == 16 || dest->bpp() == 32);
- assert(dest->bpp() == src->bpp());
+ assert(dest.valid());
+ assert(src.valid());
+ assert(dest.bpp() == 8 || dest.bpp() == 16 || dest.bpp() == 32);
+ assert(dest.bpp() == src.bpp());
assert(numrows != 0 || rowscroll == NULL);
assert(numrows == 0 || rowscroll != NULL);
assert(numcols != 0 || colscroll == NULL);
@@ -1873,8 +1875,8 @@ void copyscrollbitmap_trans(bitmap_t *dest, bitmap_t *src, UINT32 numrows, const
INT32 sx, sy;
/* iterate over all portions of the scroll that overlap the destination */
- for (sx = xscroll - src->width(); sx < dest->width(); sx += src->width())
- for (sy = yscroll - src->height(); sy < dest->height(); sy += src->height())
+ for (sx = xscroll - src.width(); sx < dest.width(); sx += src.width())
+ for (sy = yscroll - src.height(); sy < dest.height(); sy += src.height())
copybitmap_trans(dest, src, 0, 0, sx, sy, cliprect, transpen);
}
@@ -1886,8 +1888,8 @@ void copyscrollbitmap_trans(bitmap_t *dest, bitmap_t *src, UINT32 numrows, const
int col, colwidth, groupcols;
/* determine width of each column */
- colwidth = src->width() / numcols;
- assert(src->width() % colwidth == 0);
+ colwidth = src.width() / numcols;
+ assert(src.width() % colwidth == 0);
/* iterate over each column */
for (col = 0; col < numcols; col += groupcols)
@@ -1902,7 +1904,7 @@ void copyscrollbitmap_trans(bitmap_t *dest, bitmap_t *src, UINT32 numrows, const
/* iterate over reps of the columns in question */
yscroll = normalize_yscroll(src, yscroll);
- for (sx = xscroll - src->width(); sx < dest->width(); sx += src->width())
+ for (sx = xscroll - src.width(); sx < dest.width(); sx += src.width())
{
/* compute the cliprect for this group */
subclip.min_x = col * colwidth + sx;
@@ -1910,7 +1912,7 @@ void copyscrollbitmap_trans(bitmap_t *dest, bitmap_t *src, UINT32 numrows, const
subclip &= cliprect;
/* iterate over all portions of the scroll that overlap the destination */
- for (sy = yscroll - src->height(); sy < dest->height(); sy += src->height())
+ for (sy = yscroll - src.height(); sy < dest.height(); sy += src.height())
copybitmap_trans(dest, src, 0, 0, sx, sy, subclip, transpen);
}
}
@@ -1924,8 +1926,8 @@ void copyscrollbitmap_trans(bitmap_t *dest, bitmap_t *src, UINT32 numrows, const
int row, rowheight, grouprows;
/* determine width of each rows */
- rowheight = src->height() / numrows;
- assert(src->height() % rowheight == 0);
+ rowheight = src.height() / numrows;
+ assert(src.height() % rowheight == 0);
/* iterate over each row */
for (row = 0; row < numrows; row += grouprows)
@@ -1940,7 +1942,7 @@ void copyscrollbitmap_trans(bitmap_t *dest, bitmap_t *src, UINT32 numrows, const
/* iterate over reps of the rows in question */
xscroll = normalize_xscroll(src, xscroll);
- for (sy = yscroll - src->height(); sy < dest->height(); sy += src->height())
+ for (sy = yscroll - src.height(); sy < dest.height(); sy += src.height())
{
/* compute the cliprect for this group */
subclip.min_y = row * rowheight + sy;
@@ -1948,7 +1950,7 @@ void copyscrollbitmap_trans(bitmap_t *dest, bitmap_t *src, UINT32 numrows, const
subclip &= cliprect;
/* iterate over all portions of the scroll that overlap the destination */
- for (sx = xscroll - src->width(); sx < dest->width(); sx += src->width())
+ for (sx = xscroll - src.width(); sx < dest.width(); sx += src.width())
copybitmap_trans(dest, src, 0, 0, sx, sy, subclip, transpen);
}
}
@@ -1967,18 +1969,18 @@ void copyscrollbitmap_trans(bitmap_t *dest, bitmap_t *src, UINT32 numrows, const
pixels
-------------------------------------------------*/
-void copyrozbitmap(bitmap_t *dest, const rectangle &cliprect, bitmap_t *src, INT32 startx, INT32 starty, INT32 incxx, INT32 incxy, INT32 incyx, INT32 incyy, int wraparound)
+void copyrozbitmap(bitmap_t &dest, const rectangle &cliprect, bitmap_t &src, INT32 startx, INT32 starty, INT32 incxx, INT32 incxy, INT32 incyx, INT32 incyy, int wraparound)
{
- bitmap_t *priority = NULL; /* dummy, no priority in this case */
+ DECLARE_NO_PRIORITY;
- assert(dest != NULL);
- assert(src != NULL);
- assert(dest->bpp() == 8 || dest->bpp() == 16 || dest->bpp() == 32);
- assert(src->bpp() == dest->bpp());
+ assert(dest.valid());
+ assert(src.valid());
+ assert(dest.bpp() == 8 || dest.bpp() == 16 || dest.bpp() == 32);
+ assert(src.bpp() == dest.bpp());
- if (dest->bpp() == 8)
+ if (dest.bpp() == 8)
COPYROZBITMAP_CORE(UINT8, PIXEL_OP_COPY_OPAQUE, NO_PRIORITY);
- else if (dest->bpp() == 16)
+ else if (dest.bpp() == 16)
COPYROZBITMAP_CORE(UINT16, PIXEL_OP_COPY_OPAQUE, NO_PRIORITY);
else
COPYROZBITMAP_CORE(UINT32, PIXEL_OP_COPY_OPAQUE, NO_PRIORITY);
@@ -1992,18 +1994,18 @@ void copyrozbitmap(bitmap_t *dest, const rectangle &cliprect, bitmap_t *src, INT
transpen
-------------------------------------------------*/
-void copyrozbitmap_trans(bitmap_t *dest, const rectangle &cliprect, bitmap_t *src, INT32 startx, INT32 starty, INT32 incxx, INT32 incxy, INT32 incyx, INT32 incyy, int wraparound, UINT32 transpen)
+void copyrozbitmap_trans(bitmap_t &dest, const rectangle &cliprect, bitmap_t &src, INT32 startx, INT32 starty, INT32 incxx, INT32 incxy, INT32 incyx, INT32 incyy, int wraparound, UINT32 transpen)
{
- bitmap_t *priority = NULL; /* dummy, no priority in this case */
+ DECLARE_NO_PRIORITY;
- assert(dest != NULL);
- assert(src != NULL);
- assert(dest->bpp() == 8 || dest->bpp() == 16 || dest->bpp() == 32);
- assert(src->bpp() == dest->bpp());
+ assert(dest.valid());
+ assert(src.valid());
+ assert(dest.bpp() == 8 || dest.bpp() == 16 || dest.bpp() == 32);
+ assert(src.bpp() == dest.bpp());
- if (dest->bpp() == 8)
+ if (dest.bpp() == 8)
COPYROZBITMAP_CORE(UINT8, PIXEL_OP_COPY_TRANSPEN, NO_PRIORITY);
- else if (dest->bpp() == 16)
+ else if (dest.bpp() == 16)
COPYROZBITMAP_CORE(UINT16, PIXEL_OP_COPY_TRANSPEN, NO_PRIORITY);
else
COPYROZBITMAP_CORE(UINT32, PIXEL_OP_COPY_TRANSPEN, NO_PRIORITY);
diff --git a/src/emu/drawgfx.h b/src/emu/drawgfx.h
index ca805e0ae97..58b02f98306 100644
--- a/src/emu/drawgfx.h
+++ b/src/emu/drawgfx.h
@@ -196,84 +196,84 @@ void gfx_element_build_temporary(gfx_element *gfx, running_machine &machine, UIN
/* ----- core graphics drawing ----- */
/* specific drawgfx implementations for each transparency type */
-void drawgfx_opaque(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty);
-void drawgfx_transpen(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 transpen);
-void drawgfx_transpen_raw(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 transpen);
-void drawgfx_transmask(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 transmask);
-void drawgfx_transtable(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, const UINT8 *pentable, const pen_t *shadowtable);
-void drawgfx_alpha(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 transpen, UINT8 alpha);
+void drawgfx_opaque(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty);
+void drawgfx_transpen(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 transpen);
+void drawgfx_transpen_raw(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 transpen);
+void drawgfx_transmask(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 transmask);
+void drawgfx_transtable(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, const UINT8 *pentable, const pen_t *shadowtable);
+void drawgfx_alpha(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 transpen, UINT8 alpha);
/* ----- zoomed graphics drawing ----- */
/* specific drawgfxzoom implementations for each transparency type */
-void drawgfxzoom_opaque(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley);
-void drawgfxzoom_transpen(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, UINT32 transpen);
-void drawgfxzoom_transpen_raw(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, UINT32 transpen);
-void drawgfxzoom_transmask(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, UINT32 transmask);
-void drawgfxzoom_transtable(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, const UINT8 *pentable, const pen_t *shadowtable);
-void drawgfxzoom_alpha(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, UINT32 transpen, UINT8 alpha);
+void drawgfxzoom_opaque(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley);
+void drawgfxzoom_transpen(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, UINT32 transpen);
+void drawgfxzoom_transpen_raw(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, UINT32 transpen);
+void drawgfxzoom_transmask(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, UINT32 transmask);
+void drawgfxzoom_transtable(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, const UINT8 *pentable, const pen_t *shadowtable);
+void drawgfxzoom_alpha(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, UINT32 transpen, UINT8 alpha);
/* ----- priority masked graphics drawing ----- */
/* specific pdrawgfx implementations for each transparency type */
-void pdrawgfx_opaque(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, bitmap_t *priority, UINT32 pmask);
-void pdrawgfx_transpen(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, bitmap_t *priority, UINT32 pmask, UINT32 transpen);
-void pdrawgfx_transpen_raw(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, bitmap_t *priority, UINT32 pmask, UINT32 transpen);
-void pdrawgfx_transmask(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, bitmap_t *priority, UINT32 pmask, UINT32 transmask);
-void pdrawgfx_transtable(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, bitmap_t *priority, UINT32 pmask, const UINT8 *pentable, const pen_t *shadowtable);
-void pdrawgfx_alpha(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, bitmap_t *priority, UINT32 pmask, UINT32 transpen, UINT8 alpha);
+void pdrawgfx_opaque(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, bitmap_t &priority, UINT32 pmask);
+void pdrawgfx_transpen(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, bitmap_t &priority, UINT32 pmask, UINT32 transpen);
+void pdrawgfx_transpen_raw(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, bitmap_t &priority, UINT32 pmask, UINT32 transpen);
+void pdrawgfx_transmask(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, bitmap_t &priority, UINT32 pmask, UINT32 transmask);
+void pdrawgfx_transtable(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, bitmap_t &priority, UINT32 pmask, const UINT8 *pentable, const pen_t *shadowtable);
+void pdrawgfx_alpha(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, bitmap_t &priority, UINT32 pmask, UINT32 transpen, UINT8 alpha);
/* ----- priority masked zoomed graphics drawing ----- */
/* specific pdrawgfxzoom implementations for each transparency type */
-void pdrawgfxzoom_opaque(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, bitmap_t *priority, UINT32 pmask);
-void pdrawgfxzoom_transpen(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, bitmap_t *priority, UINT32 pmask, UINT32 transpen);
-void pdrawgfxzoom_transpen_raw(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, bitmap_t *priority, UINT32 pmask, UINT32 transpen);
-void pdrawgfxzoom_transmask(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, bitmap_t *priority, UINT32 pmask, UINT32 transmask);
-void pdrawgfxzoom_transtable(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, bitmap_t *priority, UINT32 pmask, const UINT8 *pentable, const pen_t *shadowtable);
-void pdrawgfxzoom_alpha(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, bitmap_t *priority, UINT32 pmask, UINT32 transpen, UINT8 alpha);
+void pdrawgfxzoom_opaque(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, bitmap_t &priority, UINT32 pmask);
+void pdrawgfxzoom_transpen(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, bitmap_t &priority, UINT32 pmask, UINT32 transpen);
+void pdrawgfxzoom_transpen_raw(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, bitmap_t &priority, UINT32 pmask, UINT32 transpen);
+void pdrawgfxzoom_transmask(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, bitmap_t &priority, UINT32 pmask, UINT32 transmask);
+void pdrawgfxzoom_transtable(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, bitmap_t &priority, UINT32 pmask, const UINT8 *pentable, const pen_t *shadowtable);
+void pdrawgfxzoom_alpha(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, bitmap_t &priority, UINT32 pmask, UINT32 transpen, UINT8 alpha);
/* ----- scanline copying ----- */
/* copy pixels from an 8bpp buffer to a single scanline of a bitmap */
-void draw_scanline8(bitmap_t *bitmap, INT32 destx, INT32 desty, INT32 length, const UINT8 *srcptr, const pen_t *paldata);
+void draw_scanline8(bitmap_t &bitmap, INT32 destx, INT32 desty, INT32 length, const UINT8 *srcptr, const pen_t *paldata);
/* copy pixels from a 16bpp buffer to a single scanline of a bitmap */
-void draw_scanline16(bitmap_t *bitmap, INT32 destx, INT32 desty, INT32 length, const UINT16 *srcptr, const pen_t *paldata);
+void draw_scanline16(bitmap_t &bitmap, INT32 destx, INT32 desty, INT32 length, const UINT16 *srcptr, const pen_t *paldata);
/* copy pixels from a 32bpp buffer to a single scanline of a bitmap */
-void draw_scanline32(bitmap_t *bitmap, INT32 destx, INT32 desty, INT32 length, const UINT32 *srcptr, const pen_t *paldata);
+void draw_scanline32(bitmap_t &bitmap, INT32 destx, INT32 desty, INT32 length, const UINT32 *srcptr, const pen_t *paldata);
/* ----- scanline extraction ----- */
/* copy pixels from a single scanline of a bitmap to an 8bpp buffer */
-void extract_scanline8(bitmap_t *bitmap, INT32 srcx, INT32 srcy, INT32 length, UINT8 *destptr);
+void extract_scanline8(bitmap_t &bitmap, INT32 srcx, INT32 srcy, INT32 length, UINT8 *destptr);
/* copy pixels from a single scanline of a bitmap to a 16bpp buffer */
-void extract_scanline16(bitmap_t *bitmap, INT32 srcx, INT32 srcy, INT32 length, UINT16 *destptr);
+void extract_scanline16(bitmap_t &bitmap, INT32 srcx, INT32 srcy, INT32 length, UINT16 *destptr);
/* copy pixels from a single scanline of a bitmap to a 32bpp buffer */
-void extract_scanline32(bitmap_t *bitmap, INT32 srcx, INT32 srcy, INT32 length, UINT32 *destptr);
+void extract_scanline32(bitmap_t &bitmap, INT32 srcx, INT32 srcy, INT32 length, UINT32 *destptr);
/* ----- bitmap copying ----- */
/* copy from one bitmap to another, copying all unclipped pixels */
-void copybitmap(bitmap_t *dest, bitmap_t *src, int flipx, int flipy, INT32 destx, INT32 desty, const rectangle &cliprect);
+void copybitmap(bitmap_t &dest, bitmap_t &src, int flipx, int flipy, INT32 destx, INT32 desty, const rectangle &cliprect);
/* copy from one bitmap to another, copying all unclipped pixels except those that match transpen */
-void copybitmap_trans(bitmap_t *dest, bitmap_t *src, int flipx, int flipy, INT32 destx, INT32 desty, const rectangle &cliprect, UINT32 transpen);
+void copybitmap_trans(bitmap_t &dest, bitmap_t &src, int flipx, int flipy, INT32 destx, INT32 desty, const rectangle &cliprect, UINT32 transpen);
/*
Copy a bitmap onto another with scroll and wraparound.
@@ -288,10 +288,10 @@ void copybitmap_trans(bitmap_t *dest, bitmap_t *src, int flipx, int flipy, INT32
*/
/* copy from one bitmap to another, copying all unclipped pixels, and applying scrolling to one or more rows/colums */
-void copyscrollbitmap(bitmap_t *dest, bitmap_t *src, UINT32 numrows, const INT32 *rowscroll, UINT32 numcols, const INT32 *colscroll, const rectangle &cliprect);
+void copyscrollbitmap(bitmap_t &dest, bitmap_t &src, UINT32 numrows, const INT32 *rowscroll, UINT32 numcols, const INT32 *colscroll, const rectangle &cliprect);
/* copy from one bitmap to another, copying all unclipped pixels except those that match transpen, and applying scrolling to one or more rows/colums */
-void copyscrollbitmap_trans(bitmap_t *dest, bitmap_t *src, UINT32 numrows, const INT32 *rowscroll, UINT32 numcols, const INT32 *colscroll, const rectangle &cliprect, UINT32 transpen);
+void copyscrollbitmap_trans(bitmap_t &dest, bitmap_t &src, UINT32 numrows, const INT32 *rowscroll, UINT32 numcols, const INT32 *colscroll, const rectangle &cliprect, UINT32 transpen);
/*
Copy a bitmap applying rotation, zooming, and arbitrary distortion.
@@ -323,10 +323,10 @@ void copyscrollbitmap_trans(bitmap_t *dest, bitmap_t *src, UINT32 numrows, const
*/
/* copy from one bitmap to another, with zoom and rotation, copying all unclipped pixels */
-void copyrozbitmap(bitmap_t *dest, const rectangle &cliprect, bitmap_t *src, INT32 startx, INT32 starty, INT32 incxx, INT32 incxy, INT32 incyx, INT32 incyy, int wraparound);
+void copyrozbitmap(bitmap_t &dest, const rectangle &cliprect, bitmap_t &src, INT32 startx, INT32 starty, INT32 incxx, INT32 incxy, INT32 incyx, INT32 incyy, int wraparound);
/* copy from one bitmap to another, with zoom and rotation, copying all unclipped pixels whose values do not match transpen */
-void copyrozbitmap_trans(bitmap_t *dest, const rectangle &cliprect, bitmap_t *src, INT32 startx, INT32 starty, INT32 incxx, INT32 incxy, INT32 incyx, INT32 incyy, int wraparound, UINT32 transparent_color);
+void copyrozbitmap_trans(bitmap_t &dest, const rectangle &cliprect, bitmap_t &src, INT32 startx, INT32 starty, INT32 incxx, INT32 incxy, INT32 incyx, INT32 incyy, int wraparound, UINT32 transparent_color);
diff --git a/src/emu/drawgfxm.h b/src/emu/drawgfxm.h
index 8a668112543..a1e5bb570ee 100644
--- a/src/emu/drawgfxm.h
+++ b/src/emu/drawgfxm.h
@@ -58,10 +58,13 @@
/* special priority type meaning "none" */
typedef struct { char dummy[3]; } NO_PRIORITY;
+extern bitmap_t drawgfx_dummy_priority_bitmap;
+#define DECLARE_NO_PRIORITY bitmap_t &priority = drawgfx_dummy_priority_bitmap;
+
/* macros for using the optional priority */
#define PRIORITY_VALID(x) (sizeof(x) != sizeof(NO_PRIORITY))
-#define PRIORITY_ADDR(p,t,y,x) (PRIORITY_VALID(t) ? (&(p)->pix<t>(y, x)) : NULL)
+#define PRIORITY_ADDR(p,t,y,x) (PRIORITY_VALID(t) ? (&(p).pix<t>(y, x)) : NULL)
#define PRIORITY_ADVANCE(t,p,i) do { if (PRIORITY_VALID(t)) (p) += (i); } while (0)
@@ -355,7 +358,7 @@ while (0) \
/*
Assumed input parameters or local variables:
- bitmap_t *dest - the bitmap to render to
+ bitmap_t &dest - the bitmap to render to
const rectangle &cliprect - a clipping rectangle (assumed to be clipped to the size of 'dest')
const gfx_element *gfx - pointer to the gfx_element to render
UINT32 code - index of the entry within gfx_element
@@ -364,7 +367,7 @@ while (0) \
int flipy - non-zero means render bottom-to-top instead of top-to-bottom
INT32 destx - the top-left X coordinate to render to
INT32 desty - the top-left Y coordinate to render to
- bitmap_t *priority - the priority bitmap (even if PRIORITY_TYPE is NO_PRIORITY, at least needs a dummy)
+ bitmap_t &priority - the priority bitmap (even if PRIORITY_TYPE is NO_PRIORITY, at least needs a dummy)
*/
@@ -378,13 +381,13 @@ do { \
INT32 curx, cury; \
INT32 dy; \
\
- assert(dest != NULL); \
+ assert(dest.valid()); \
assert(gfx != NULL); \
- assert(!PRIORITY_VALID(PRIORITY_TYPE) || priority != NULL); \
+ assert(!PRIORITY_VALID(PRIORITY_TYPE) || priority.valid()); \
assert(cliprect.min_x >= 0); \
- assert(cliprect.max_x < dest->width()); \
+ assert(cliprect.max_x < dest.width()); \
assert(cliprect.min_y >= 0); \
- assert(cliprect.max_y < dest->height()); \
+ assert(cliprect.max_y < dest.height()); \
\
/* ignore empty/invalid cliprects */ \
if (cliprect.empty()) \
@@ -456,7 +459,7 @@ do { \
for (cury = desty; cury <= destendy; cury++) \
{ \
PRIORITY_TYPE *priptr = PRIORITY_ADDR(priority, PRIORITY_TYPE, cury, destx); \
- PIXEL_TYPE *destptr = &dest->pix<PIXEL_TYPE>(cury, destx); \
+ PIXEL_TYPE *destptr = &dest.pix<PIXEL_TYPE>(cury, destx); \
const UINT8 *srcptr = srcdata; \
srcdata += dy; \
\
@@ -491,7 +494,7 @@ do { \
for (cury = desty; cury <= destendy; cury++) \
{ \
PRIORITY_TYPE *priptr = PRIORITY_ADDR(priority, PRIORITY_TYPE, cury, destx); \
- PIXEL_TYPE *destptr = &dest->pix<PIXEL_TYPE>(cury, destx); \
+ PIXEL_TYPE *destptr = &dest.pix<PIXEL_TYPE>(cury, destx); \
const UINT8 *srcptr = srcdata; \
srcdata += dy; \
\
@@ -538,7 +541,7 @@ do { \
for (cury = desty; cury <= destendy; cury++) \
{ \
PRIORITY_TYPE *priptr = PRIORITY_ADDR(priority, PRIORITY_TYPE, cury, destx); \
- PIXEL_TYPE *destptr = &dest->pix<PIXEL_TYPE>(cury, destx); \
+ PIXEL_TYPE *destptr = &dest.pix<PIXEL_TYPE>(cury, destx); \
const UINT8 *srcptr = srcdata; \
srcdata += dy; \
\
@@ -579,7 +582,7 @@ do { \
for (cury = desty; cury <= destendy; cury++) \
{ \
PRIORITY_TYPE *priptr = PRIORITY_ADDR(priority, PRIORITY_TYPE, cury, destx); \
- PIXEL_TYPE *destptr = &dest->pix<PIXEL_TYPE>(cury, destx); \
+ PIXEL_TYPE *destptr = &dest.pix<PIXEL_TYPE>(cury, destx); \
const UINT8 *srcptr = srcdata; \
srcdata += dy; \
\
@@ -621,7 +624,7 @@ do { \
/*
Assumed input parameters or local variables:
- bitmap_t *dest - the bitmap to render to
+ bitmap_t &dest - the bitmap to render to
const rectangle &cliprect - a clipping rectangle (assumed to be clipped to the size of 'dest')
const gfx_element *gfx - pointer to the gfx_element to render
UINT32 code - index of the entry within gfx_element
@@ -632,7 +635,7 @@ do { \
INT32 desty - the top-left Y coordinate to render to
UINT32 scalex - the 16.16 scale factor in the X dimension
UINT32 scaley - the 16.16 scale factor in the Y dimension
- bitmap_t *priority - the priority bitmap (even if PRIORITY_TYPE is NO_PRIORITY, at least needs a dummy)
+ bitmap_t &priority - the priority bitmap (even if PRIORITY_TYPE is NO_PRIORITY, at least needs a dummy)
*/
@@ -647,13 +650,13 @@ do { \
INT32 curx, cury; \
INT32 dx, dy; \
\
- assert(dest != NULL); \
+ assert(dest.valid()); \
assert(gfx != NULL); \
- assert(!PRIORITY_VALID(PRIORITY_TYPE) || priority != NULL); \
+ assert(!PRIORITY_VALID(PRIORITY_TYPE) || priority.valid()); \
assert(cliprect.min_x >= 0); \
- assert(cliprect.max_x < dest->width()); \
+ assert(cliprect.max_x < dest.width()); \
assert(cliprect.min_y >= 0); \
- assert(cliprect.max_y < dest->height()); \
+ assert(cliprect.max_y < dest.height()); \
\
/* ignore empty/invalid cliprects */ \
if (cliprect.empty()) \
@@ -734,7 +737,7 @@ do { \
for (cury = desty; cury <= destendy; cury++) \
{ \
PRIORITY_TYPE *priptr = PRIORITY_ADDR(priority, PRIORITY_TYPE, cury, destx); \
- PIXEL_TYPE *destptr = &dest->pix<PIXEL_TYPE>(cury, destx); \
+ PIXEL_TYPE *destptr = &dest.pix<PIXEL_TYPE>(cury, destx); \
const UINT8 *srcptr = srcdata + (srcy >> 16) * gfx->line_modulo; \
INT32 cursrcx = srcx; \
srcy += dy; \
@@ -773,7 +776,7 @@ do { \
for (cury = desty; cury <= destendy; cury++) \
{ \
PRIORITY_TYPE *priptr = PRIORITY_ADDR(priority, PRIORITY_TYPE, cury, destx); \
- PIXEL_TYPE *destptr = &dest->pix<PIXEL_TYPE>(cury, destx); \
+ PIXEL_TYPE *destptr = &dest.pix<PIXEL_TYPE>(cury, destx); \
const UINT8 *srcptr = srcdata + (srcy >> 16) * gfx->line_modulo; \
INT32 cursrcx = srcx; \
srcy += dy; \
@@ -822,13 +825,13 @@ do { \
INT32 curx, cury; \
INT32 dx, dy; \
\
- assert(dest != NULL); \
- assert(src != NULL); \
- assert(!PRIORITY_VALID(PRIORITY_TYPE) || priority != NULL); \
+ assert(dest.valid()); \
+ assert(src.valid()); \
+ assert(!PRIORITY_VALID(PRIORITY_TYPE) || priority.valid()); \
assert(cliprect.min_x >= 0); \
- assert(cliprect.max_x < dest->width()); \
+ assert(cliprect.max_x < dest.width()); \
assert(cliprect.min_y >= 0); \
- assert(cliprect.max_y < dest->height()); \
+ assert(cliprect.max_y < dest.height()); \
\
/* ignore empty/invalid cliprects */ \
if (cliprect.empty()) \
@@ -836,10 +839,10 @@ do { \
\
/* standard setup; dx counts bytes in X, dy counts pixels in Y */ \
dx = 1; \
- dy = src->rowpixels(); \
+ dy = src.rowpixels(); \
\
/* compute final pixel in X and exit if we are entirely clipped */ \
- destendx = destx + src->width() - 1; \
+ destendx = destx + src.width() - 1; \
if (destx > cliprect.max_x || destendx < cliprect.min_x) \
break; \
\
@@ -856,7 +859,7 @@ do { \
destendx = cliprect.max_x; \
\
/* compute final pixel in Y and exit if we are entirely clipped */ \
- destendy = desty + src->height() - 1; \
+ destendy = desty + src.height() - 1; \
if (desty > cliprect.max_y || destendy < cliprect.min_y) \
break; \
\
@@ -875,14 +878,14 @@ do { \
/* apply X flipping */ \
if (flipx) \
{ \
- srcx = src->width() - 1 - srcx; \
+ srcx = src.width() - 1 - srcx; \
dx = -dx; \
} \
\
/* apply Y flipping */ \
if (flipy) \
{ \
- srcy = src->height() - 1 - srcy; \
+ srcy = src.height() - 1 - srcy; \
dy = -dy; \
} \
\
@@ -891,7 +894,7 @@ do { \
leftovers = (destendx + 1 - destx) - 4 * numblocks; \
\
/* compute the address of the first source pixel of the first row */ \
- srcdata = &src->pix<PIXEL_TYPE>(srcy, srcx); \
+ srcdata = &src.pix<PIXEL_TYPE>(srcy, srcx); \
\
/* non-flipped case */ \
if (!flipx) \
@@ -900,7 +903,7 @@ do { \
for (cury = desty; cury <= destendy; cury++) \
{ \
PRIORITY_TYPE *priptr = PRIORITY_ADDR(priority, PRIORITY_TYPE, cury, destx); \
- PIXEL_TYPE *destptr = &dest->pix<PIXEL_TYPE>(cury, destx); \
+ PIXEL_TYPE *destptr = &dest.pix<PIXEL_TYPE>(cury, destx); \
const PIXEL_TYPE *srcptr = srcdata; \
srcdata += dy; \
\
@@ -935,7 +938,7 @@ do { \
for (cury = desty; cury <= destendy; cury++) \
{ \
PRIORITY_TYPE *priptr = PRIORITY_ADDR(priority, PRIORITY_TYPE, cury, destx); \
- PIXEL_TYPE *destptr = &dest->pix<PIXEL_TYPE>(cury, destx); \
+ PIXEL_TYPE *destptr = &dest.pix<PIXEL_TYPE>(cury, destx); \
const PIXEL_TYPE *srcptr = srcdata; \
srcdata += dy; \
\
@@ -996,23 +999,23 @@ do { \
\
g_profiler.start(PROFILER_COPYBITMAP); \
\
- assert(dest != NULL); \
- assert(src != NULL); \
- assert(!PRIORITY_VALID(PRIORITY_TYPE) || priority != NULL); \
+ assert(dest.valid()); \
+ assert(dest.valid()); \
+ assert(!PRIORITY_VALID(PRIORITY_TYPE) || priority.valid()); \
assert(cliprect.min_x >= 0); \
- assert(cliprect.max_x < dest->width()); \
+ assert(cliprect.max_x < dest.width()); \
assert(cliprect.min_y >= 0); \
- assert(cliprect.max_y < dest->height()); \
- assert(!wraparound || (src->width() & (src->width() - 1)) == 0); \
- assert(!wraparound || (src->height() & (src->height() - 1)) == 0); \
+ assert(cliprect.max_y < dest.height()); \
+ assert(!wraparound || (src.width() & (src.width() - 1)) == 0); \
+ assert(!wraparound || (src.height() & (src.height() - 1)) == 0); \
\
/* ignore empty/invalid cliprects */ \
if (cliprect.empty()) \
break; \
\
/* compute fixed-point 16.16 size of the source bitmap */ \
- srcfixwidth = src->width() << 16; \
- srcfixheight = src->height() << 16; \
+ srcfixwidth = src.width() << 16; \
+ srcfixheight = src.height() << 16; \
\
/* advance the starting coordinates to the top-left of the cliprect */ \
startx += cliprect.min_x * incxx + cliprect.min_y * incyx; \
@@ -1032,7 +1035,7 @@ do { \
for (cury = cliprect.min_y; cury <= cliprect.max_y; cury++) \
{ \
PRIORITY_TYPE *priptr = PRIORITY_ADDR(priority, PRIORITY_TYPE, cury, cliprect.min_x); \
- PIXEL_TYPE *destptr = &dest->pix<PIXEL_TYPE>(cury, cliprect.min_x); \
+ PIXEL_TYPE *destptr = &dest.pix<PIXEL_TYPE>(cury, cliprect.min_x); \
const PIXEL_TYPE *srcptr; \
INT32 srcx = startx; \
INT32 srcy = starty; \
@@ -1042,7 +1045,7 @@ do { \
/* check srcy for the whole row at once */ \
if ((UINT32)srcy < srcfixheight) \
{ \
- srcptr = &src->pix<PIXEL_TYPE>(srcy >> 16); \
+ srcptr = &src.pix<PIXEL_TYPE>(srcy >> 16); \
\
/* iterate over unrolled blocks of 4 */ \
for (curx = 0; curx < numblocks; curx++) \
@@ -1093,8 +1096,8 @@ do { \
for (cury = cliprect.min_y; cury <= cliprect.max_y; cury++) \
{ \
PRIORITY_TYPE *priptr = PRIORITY_ADDR(priority, PRIORITY_TYPE, cury, cliprect.min_x); \
- PIXEL_TYPE *destptr = &dest->pix<PIXEL_TYPE>(cury, cliprect.min_x); \
- const PIXEL_TYPE *srcptr = &src->pix<PIXEL_TYPE>(starty >> 16); \
+ PIXEL_TYPE *destptr = &dest.pix<PIXEL_TYPE>(cury, cliprect.min_x); \
+ const PIXEL_TYPE *srcptr = &src.pix<PIXEL_TYPE>(starty >> 16); \
INT32 srcx = startx; \
\
starty = (starty + incyy) & srcfixheight; \
@@ -1140,7 +1143,7 @@ do { \
for (cury = cliprect.min_y; cury <= cliprect.max_y; cury++) \
{ \
PRIORITY_TYPE *priptr = PRIORITY_ADDR(priority, PRIORITY_TYPE, cury, cliprect.min_x); \
- PIXEL_TYPE *destptr = &dest->pix<PIXEL_TYPE>(cury, cliprect.min_x); \
+ PIXEL_TYPE *destptr = &dest.pix<PIXEL_TYPE>(cury, cliprect.min_x); \
const PIXEL_TYPE *srcptr; \
INT32 srcx = startx; \
INT32 srcy = starty; \
@@ -1153,7 +1156,7 @@ do { \
{ \
if ((UINT32)srcx < srcfixwidth && (UINT32)srcy < srcfixheight) \
{ \
- srcptr = &src->pix<PIXEL_TYPE>(srcy >> 16, srcx >> 16); \
+ srcptr = &src.pix<PIXEL_TYPE>(srcy >> 16, srcx >> 16); \
PIXEL_OP(destptr[0], priptr[0], srcptr[0]); \
} \
srcx += incxx; \
@@ -1161,7 +1164,7 @@ do { \
\
if ((UINT32)srcx < srcfixwidth && (UINT32)srcy < srcfixheight) \
{ \
- srcptr = &src->pix<PIXEL_TYPE>(srcy >> 16, srcx >> 16); \
+ srcptr = &src.pix<PIXEL_TYPE>(srcy >> 16, srcx >> 16); \
PIXEL_OP(destptr[1], priptr[1], srcptr[0]); \
} \
srcx += incxx; \
@@ -1169,7 +1172,7 @@ do { \
\
if ((UINT32)srcx < srcfixwidth && (UINT32)srcy < srcfixheight) \
{ \
- srcptr = &src->pix<PIXEL_TYPE>(srcy >> 16, srcx >> 16); \
+ srcptr = &src.pix<PIXEL_TYPE>(srcy >> 16, srcx >> 16); \
PIXEL_OP(destptr[2], priptr[2], srcptr[0]); \
} \
srcx += incxx; \
@@ -1177,7 +1180,7 @@ do { \
\
if ((UINT32)srcx < srcfixwidth && (UINT32)srcy < srcfixheight) \
{ \
- srcptr = &src->pix<PIXEL_TYPE>(srcy >> 16, srcx >> 16); \
+ srcptr = &src.pix<PIXEL_TYPE>(srcy >> 16, srcx >> 16); \
PIXEL_OP(destptr[3], priptr[3], srcptr[0]); \
} \
srcx += incxx; \
@@ -1192,7 +1195,7 @@ do { \
{ \
if ((UINT32)srcx < srcfixwidth && (UINT32)srcy < srcfixheight) \
{ \
- srcptr = &src->pix<PIXEL_TYPE>(srcy >> 16, srcx >> 16); \
+ srcptr = &src.pix<PIXEL_TYPE>(srcy >> 16, srcx >> 16); \
PIXEL_OP(destptr[0], priptr[0], srcptr[0]); \
} \
srcx += incxx; \
@@ -1216,7 +1219,7 @@ do { \
for (cury = cliprect.min_y; cury <= cliprect.max_y; cury++) \
{ \
PRIORITY_TYPE *priptr = PRIORITY_ADDR(priority, PRIORITY_TYPE, cury, cliprect.min_x); \
- PIXEL_TYPE *destptr = &dest->pix<PIXEL_TYPE>(cury, cliprect.min_x); \
+ PIXEL_TYPE *destptr = &dest.pix<PIXEL_TYPE>(cury, cliprect.min_x); \
const PIXEL_TYPE *srcptr; \
INT32 srcx = startx; \
INT32 srcy = starty; \
@@ -1227,22 +1230,22 @@ do { \
/* iterate over unrolled blocks of 4 */ \
for (curx = 0; curx < numblocks; curx++) \
{ \
- srcptr = &src->pix<PIXEL_TYPE>(srcy >> 16, srcx >> 16); \
+ srcptr = &src.pix<PIXEL_TYPE>(srcy >> 16, srcx >> 16); \
PIXEL_OP(destptr[0], priptr[0], srcptr[0]); \
srcx = (srcx + incxx) & srcfixwidth; \
srcy = (srcy + incxy) & srcfixheight; \
\
- srcptr = &src->pix<PIXEL_TYPE>(srcy >> 16, srcx >> 16); \
+ srcptr = &src.pix<PIXEL_TYPE>(srcy >> 16, srcx >> 16); \
PIXEL_OP(destptr[1], priptr[1], srcptr[0]); \
srcx = (srcx + incxx) & srcfixwidth; \
srcy = (srcy + incxy) & srcfixheight; \
\
- srcptr = &src->pix<PIXEL_TYPE>(srcy >> 16, srcx >> 16); \
+ srcptr = &src.pix<PIXEL_TYPE>(srcy >> 16, srcx >> 16); \
PIXEL_OP(destptr[2], priptr[2], srcptr[0]); \
srcx = (srcx + incxx) & srcfixwidth; \
srcy = (srcy + incxy) & srcfixheight; \
\
- srcptr = &src->pix<PIXEL_TYPE>(srcy >> 16, srcx >> 16); \
+ srcptr = &src.pix<PIXEL_TYPE>(srcy >> 16, srcx >> 16); \
PIXEL_OP(destptr[3], priptr[3], srcptr[0]); \
srcx = (srcx + incxx) & srcfixwidth; \
srcy = (srcy + incxy) & srcfixheight; \
@@ -1254,7 +1257,7 @@ do { \
/* iterate over leftover pixels */ \
for (curx = 0; curx < leftovers; curx++) \
{ \
- srcptr = &src->pix<PIXEL_TYPE>(srcy >> 16, srcx >> 16); \
+ srcptr = &src.pix<PIXEL_TYPE>(srcy >> 16, srcx >> 16); \
PIXEL_OP(destptr[0], priptr[0], srcptr[0]); \
srcx = (srcx + incxx) & srcfixwidth; \
srcy = (srcy + incxy) & srcfixheight; \
@@ -1276,7 +1279,7 @@ do { \
/*
Assumed input parameters or local variables:
- bitmap_t *bitmap - the bitmap to copy to
+ bitmap_t &bitmap - the bitmap to copy to
INT32 destx - the X coordinate to copy to
INT32 desty - the Y coordinate to copy to
INT32 length - the total number of pixels to copy
@@ -1286,17 +1289,17 @@ do { \
#define DRAWSCANLINE_CORE(PIXEL_TYPE, PIXEL_OP, PRIORITY_TYPE) \
do { \
- assert(bitmap != NULL); \
+ assert(bitmap.valid()); \
assert(destx >= 0); \
- assert(destx + length <= bitmap->width()); \
+ assert(destx + length <= bitmap.width()); \
assert(desty >= 0); \
- assert(desty < bitmap->height()); \
+ assert(desty < bitmap.height()); \
assert(srcptr != NULL); \
- assert(!PRIORITY_VALID(PRIORITY_TYPE) || priority != NULL); \
+ assert(!PRIORITY_VALID(PRIORITY_TYPE) || priority.valid()); \
\
{ \
PRIORITY_TYPE *priptr = PRIORITY_ADDR(priority, PRIORITY_TYPE, desty, destx); \
- PIXEL_TYPE *destptr = &bitmap->pix<PIXEL_TYPE>(desty, destx); \
+ PIXEL_TYPE *destptr = &bitmap.pix<PIXEL_TYPE>(desty, destx); \
\
/* iterate over unrolled blocks of 4 */ \
while (length >= 4) \
@@ -1332,7 +1335,7 @@ do { \
/*
Assumed input parameters:
- bitmap_t *bitmap - the bitmap to extract from
+ bitmap_t &bitmap - the bitmap to extract from
INT32 srcx - the X coordinate to begin extraction
INT32 srcy - the Y coordinate to begin extraction
INT32 length - the total number of pixels to extract
@@ -1341,15 +1344,15 @@ do { \
#define EXTRACTSCANLINE_CORE(PIXEL_TYPE) \
do { \
- assert(bitmap != NULL); \
+ assert(bitmap.valid()); \
assert(srcx >= 0); \
- assert(srcx + length <= bitmap->width()); \
+ assert(srcx + length <= bitmap.width()); \
assert(srcy >= 0); \
- assert(srcy < bitmap->height()); \
+ assert(srcy < bitmap.height()); \
assert(destptr != NULL); \
\
{ \
- const PIXEL_TYPE *srcptr = &bitmap->pix<PIXEL_TYPE>(srcy, srcx); \
+ const PIXEL_TYPE *srcptr = &bitmap.pix<PIXEL_TYPE>(srcy, srcx); \
\
/* iterate over unrolled blocks of 4 */ \
while (length >= 4) \
diff --git a/src/emu/machine.c b/src/emu/machine.c
index 35664d805e0..36942683d50 100644
--- a/src/emu/machine.c
+++ b/src/emu/machine.c
@@ -146,7 +146,6 @@ running_machine::running_machine(const machine_config &_config, osd_interface &o
pens(NULL),
colortable(NULL),
shadow_table(NULL),
- priority_bitmap(NULL),
debug_flags(0),
memory_data(NULL),
palette_data(NULL),
diff --git a/src/emu/machine.h b/src/emu/machine.h
index d981ca0a291..cf58658ad15 100644
--- a/src/emu/machine.h
+++ b/src/emu/machine.h
@@ -415,7 +415,7 @@ public:
const pen_t * pens; // remapped palette pen numbers
colortable_t * colortable; // global colortable for remapping
pen_t * shadow_table; // table for looking up a shadowed pen
- bitmap_t * priority_bitmap; // priority bitmap
+ bitmap_t priority_bitmap; // priority bitmap
// debugger-related information
UINT32 debug_flags; // the current debug flags
diff --git a/src/emu/machine/ldcore.c b/src/emu/machine/ldcore.c
index b388022d4ec..8e738853dde 100644
--- a/src/emu/machine/ldcore.c
+++ b/src/emu/machine/ldcore.c
@@ -210,17 +210,17 @@ INLINE void add_and_clamp_track(ldcore_data *ldcore, INT32 delta)
given color pattern
-------------------------------------------------*/
-INLINE void fillbitmap_yuy16(bitmap_t *bitmap, UINT8 yval, UINT8 cr, UINT8 cb)
+INLINE void fillbitmap_yuy16(bitmap_t &bitmap, UINT8 yval, UINT8 cr, UINT8 cb)
{
UINT16 color0 = (yval << 8) | cb;
UINT16 color1 = (yval << 8) | cr;
int x, y;
/* write 32 bits of color (2 pixels at a time) */
- for (y = 0; y < bitmap->height(); y++)
+ for (y = 0; y < bitmap.height(); y++)
{
- UINT16 *dest = &bitmap->pix16(y);
- for (x = 0; x < bitmap->width() / 2; x++)
+ UINT16 *dest = &bitmap.pix16(y);
+ for (x = 0; x < bitmap.width() / 2; x++)
{
*dest++ = color0;
*dest++ = color1;
@@ -903,7 +903,7 @@ static void process_track_data(device_t *device)
/* render the display if present */
if (ldcore->avconfig.video != NULL && ldcore->intf.overlay != NULL)
- (*ldcore->intf.overlay)(ld, ldcore->avconfig.video);
+ (*ldcore->intf.overlay)(ld, *ldcore->avconfig.video);
/* pass the audio to the callback */
if (ldcore->config.audio != NULL)
@@ -1201,11 +1201,11 @@ SCREEN_UPDATE( laserdisc )
/* scale the cliprect to the overlay size and then call the update callback */
clip.min_x = ldcore->config.overclip_min_x;
clip.max_x = ldcore->config.overclip_max_x;
- clip.min_y = cliprect.min_y * overbitmap->height() / bitmap->height();
+ clip.min_y = cliprect.min_y * overbitmap->height() / bitmap.height();
if (cliprect.min_y == visarea.min_y)
clip.min_y = MIN(clip.min_y, ldcore->config.overclip_min_y);
- clip.max_y = (cliprect.max_y + 1) * overbitmap->height() / bitmap->height() - 1;
- (*ldcore->config.overupdate)(screen, overbitmap, clip);
+ clip.max_y = (cliprect.max_y + 1) * overbitmap->height() / bitmap.height() - 1;
+ (*ldcore->config.overupdate)(screen, *overbitmap, clip);
}
/* if this is the last update, do the rendering */
@@ -1373,7 +1373,7 @@ static void init_video(device_t *device)
/* first allocate a YUY16 bitmap at 2x the height */
frame->bitmap = auto_alloc(device->machine(), bitmap_t(ldcore->width, ldcore->height * 2, BITMAP_FORMAT_YUY16));
- fillbitmap_yuy16(frame->bitmap, 40, 109, 240);
+ fillbitmap_yuy16(*frame->bitmap, 40, 109, 240);
/* make a copy of the bitmap that clips out the VBI and horizontal blanking areas */
frame->visbitmap = auto_alloc(device->machine(), bitmap_t(&frame->bitmap->pix16(44, frame->bitmap->width() * 8 / 720),
@@ -1384,7 +1384,7 @@ static void init_video(device_t *device)
/* allocate an empty frame of the same size */
ldcore->emptyframe = auto_bitmap_alloc(device->machine(), ldcore->width, ldcore->height * 2, BITMAP_FORMAT_YUY16);
- fillbitmap_yuy16(ldcore->emptyframe, 0, 128, 128);
+ fillbitmap_yuy16(*ldcore->emptyframe, 0, 128, 128);
/* allocate texture for rendering */
ldcore->videoenable = TRUE;
diff --git a/src/emu/machine/ldcore.h b/src/emu/machine/ldcore.h
index 24f6361930a..7ea180f1e64 100644
--- a/src/emu/machine/ldcore.h
+++ b/src/emu/machine/ldcore.h
@@ -135,7 +135,7 @@ struct _laserdisc_state
typedef void (*laserdisc_init_func)(laserdisc_state *ld);
typedef void (*laserdisc_vsync_func)(laserdisc_state *ld, const vbi_metadata *vbi, int fieldnum, attotime curtime);
typedef INT32 (*laserdisc_update_func)(laserdisc_state *ld, const vbi_metadata *vbi, int fieldnum, attotime curtime);
-typedef void (*laserdisc_overlay_func)(laserdisc_state *ld, bitmap_t *bitmap);
+typedef void (*laserdisc_overlay_func)(laserdisc_state *ld, bitmap_t &bitmap);
typedef void (*laserdisc_w_func)(laserdisc_state *ld, UINT8 prev, UINT8 newval);
typedef UINT8 (*laserdisc_r_func)(laserdisc_state *ld);
diff --git a/src/emu/machine/ldpr8210.c b/src/emu/machine/ldpr8210.c
index 83a93f04d57..39d0e715ca3 100644
--- a/src/emu/machine/ldpr8210.c
+++ b/src/emu/machine/ldpr8210.c
@@ -129,7 +129,7 @@ struct _ldplayer_data
static void pr8210_init(laserdisc_state *ld);
static void pr8210_vsync(laserdisc_state *ld, const vbi_metadata *vbi, int fieldnum, attotime curtime);
static INT32 pr8210_update(laserdisc_state *ld, const vbi_metadata *vbi, int fieldnum, attotime curtime);
-static void pr8210_overlay(laserdisc_state *ld, bitmap_t *bitmap);
+static void pr8210_overlay(laserdisc_state *ld, bitmap_t &bitmap);
static void pr8210_control_w(laserdisc_state *ld, UINT8 prev, UINT8 data);
static TIMER_CALLBACK( vsync_off );
@@ -143,9 +143,9 @@ static WRITE8_HANDLER( pr8210_port2_w );
static READ8_HANDLER( pr8210_t0_r );
static READ8_HANDLER( pr8210_t1_r );
-static void overlay_draw_group(bitmap_t *bitmap, const UINT8 *text, int count, float xstart);
-static void overlay_erase(bitmap_t *bitmap, float xstart, float xend);
-static void overlay_draw_char(bitmap_t *bitmap, UINT8 ch, float xstart);
+static void overlay_draw_group(bitmap_t &bitmap, const UINT8 *text, int count, float xstart);
+static void overlay_erase(bitmap_t &bitmap, float xstart, float xend);
+static void overlay_draw_char(bitmap_t &bitmap, UINT8 ch, float xstart);
static void simutrek_init(laserdisc_state *ld);
static void simutrek_vsync(laserdisc_state *ld, const vbi_metadata *vbi, int fieldnum, attotime curtime);
@@ -413,7 +413,7 @@ static INT32 pr8210_update(laserdisc_state *ld, const vbi_metadata *vbi, int fie
player data
-------------------------------------------------*/
-static void pr8210_overlay(laserdisc_state *ld, bitmap_t *bitmap)
+static void pr8210_overlay(laserdisc_state *ld, bitmap_t &bitmap)
{
ldplayer_data *player = ld->player;
@@ -881,7 +881,7 @@ static READ8_HANDLER( pr8210_t1_r )
characters
-------------------------------------------------*/
-static void overlay_draw_group(bitmap_t *bitmap, const UINT8 *text, int count, float xstart)
+static void overlay_draw_group(bitmap_t &bitmap, const UINT8 *text, int count, float xstart)
{
int skip = TRUE;
int x;
@@ -904,15 +904,15 @@ static void overlay_draw_group(bitmap_t *bitmap, const UINT8 *text, int count, f
where the text overlay will be displayed
-------------------------------------------------*/
-static void overlay_erase(bitmap_t *bitmap, float xstart, float xend)
+static void overlay_erase(bitmap_t &bitmap, float xstart, float xend)
{
- UINT32 xmin = (UINT32)(xstart * 256.0f * (float)bitmap->width());
- UINT32 xmax = (UINT32)(xend * 256.0f * (float)bitmap->width());
+ UINT32 xmin = (UINT32)(xstart * 256.0f * (float)bitmap.width());
+ UINT32 xmax = (UINT32)(xend * 256.0f * (float)bitmap.width());
UINT32 x, y;
for (y = OVERLAY_Y; y < (OVERLAY_Y + (OVERLAY_Y_PIXELS + 2) * OVERLAY_PIXEL_HEIGHT); y++)
{
- UINT16 *dest = &bitmap->pix16(y, xmin >> 8);
+ UINT16 *dest = &bitmap.pix16(y, xmin >> 8);
UINT16 ymin, ymax, yres;
ymax = *dest >> 8;
@@ -942,10 +942,10 @@ static void overlay_erase(bitmap_t *bitmap, float xstart, float xend)
of the text overlay
-------------------------------------------------*/
-static void overlay_draw_char(bitmap_t *bitmap, UINT8 ch, float xstart)
+static void overlay_draw_char(bitmap_t &bitmap, UINT8 ch, float xstart)
{
- UINT32 xminbase = (UINT32)(xstart * 256.0f * (float)bitmap->width());
- UINT32 xsize = (UINT32)(OVERLAY_PIXEL_WIDTH * 256.0f * (float)bitmap->width());
+ UINT32 xminbase = (UINT32)(xstart * 256.0f * (float)bitmap.width());
+ UINT32 xsize = (UINT32)(OVERLAY_PIXEL_WIDTH * 256.0f * (float)bitmap.width());
const UINT8 *chdataptr = &text_bitmap[ch & 0x3f][0];
UINT32 x, y, xx, yy;
@@ -961,7 +961,7 @@ static void overlay_draw_char(bitmap_t *bitmap, UINT8 ch, float xstart)
UINT32 xmax = xmin + xsize;
for (yy = 0; yy < OVERLAY_PIXEL_HEIGHT; yy++)
{
- UINT16 *dest = &bitmap->pix16(OVERLAY_Y + (y + 1) * OVERLAY_PIXEL_HEIGHT + yy, xmin >> 8);
+ UINT16 *dest = &bitmap.pix16(OVERLAY_Y + (y + 1) * OVERLAY_PIXEL_HEIGHT + yy, xmin >> 8);
UINT16 ymin, ymax, yres;
ymax = 0xff;
diff --git a/src/emu/machine/s3c24xx.c b/src/emu/machine/s3c24xx.c
index e549eca81fa..180b31bacd6 100644
--- a/src/emu/machine/s3c24xx.c
+++ b/src/emu/machine/s3c24xx.c
@@ -449,11 +449,11 @@ static UINT32 s3c24xx_lcd_dma_read_bits( device_t *device, int count)
static void s3c24xx_lcd_render_tpal( device_t *device)
{
s3c24xx_t *s3c24xx = get_token( device);
- bitmap_t *bitmap = s3c24xx->lcd.bitmap[0];
+ bitmap_t &bitmap = *s3c24xx->lcd.bitmap[0];
UINT32 color = s3c24xx_get_color_tpal( device);
for (int y = s3c24xx->lcd.vpos_min; y <= s3c24xx->lcd.vpos_max; y++)
{
- UINT32 *scanline = &bitmap->pix32(y, s3c24xx->lcd.hpos_min);
+ UINT32 *scanline = &bitmap.pix32(y, s3c24xx->lcd.hpos_min);
for (int x = s3c24xx->lcd.hpos_min; x <= s3c24xx->lcd.hpos_max; x++)
{
*scanline++ = color;
@@ -464,8 +464,8 @@ static void s3c24xx_lcd_render_tpal( device_t *device)
static void s3c24xx_lcd_render_stn_01( device_t *device)
{
s3c24xx_t *s3c24xx = get_token( device);
- bitmap_t *bitmap = s3c24xx->lcd.bitmap[0];
- UINT32 *scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ bitmap_t &bitmap = *s3c24xx->lcd.bitmap[0];
+ UINT32 *scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
for (int i = 0; i < 4; i++)
{
UINT32 data = s3c24xx_lcd_dma_read( device);
@@ -487,7 +487,7 @@ static void s3c24xx_lcd_render_stn_01( device_t *device)
s3c24xx->lcd.vpos++;
if (s3c24xx->lcd.vpos > s3c24xx->lcd.vpos_max) s3c24xx->lcd.vpos = s3c24xx->lcd.vpos_min;
s3c24xx->lcd.hpos = s3c24xx->lcd.hpos_min;
- scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
}
}
}
@@ -496,8 +496,8 @@ static void s3c24xx_lcd_render_stn_01( device_t *device)
static void s3c24xx_lcd_render_stn_02( device_t *device)
{
s3c24xx_t *s3c24xx = get_token( device);
- bitmap_t *bitmap = s3c24xx->lcd.bitmap[0];
- UINT32 *scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ bitmap_t &bitmap = *s3c24xx->lcd.bitmap[0];
+ UINT32 *scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
for (int i = 0; i < 4; i++)
{
UINT32 data = s3c24xx_lcd_dma_read( device);
@@ -511,7 +511,7 @@ static void s3c24xx_lcd_render_stn_02( device_t *device)
s3c24xx->lcd.vpos++;
if (s3c24xx->lcd.vpos > s3c24xx->lcd.vpos_max) s3c24xx->lcd.vpos = s3c24xx->lcd.vpos_min;
s3c24xx->lcd.hpos = s3c24xx->lcd.hpos_min;
- scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
}
}
}
@@ -520,8 +520,8 @@ static void s3c24xx_lcd_render_stn_02( device_t *device)
static void s3c24xx_lcd_render_stn_04( device_t *device)
{
s3c24xx_t *s3c24xx = get_token( device);
- bitmap_t *bitmap = s3c24xx->lcd.bitmap[0];
- UINT32 *scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ bitmap_t &bitmap = *s3c24xx->lcd.bitmap[0];
+ UINT32 *scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
for (int i = 0; i < 4; i++)
{
UINT32 data = s3c24xx_lcd_dma_read( device);
@@ -535,7 +535,7 @@ static void s3c24xx_lcd_render_stn_04( device_t *device)
s3c24xx->lcd.vpos++;
if (s3c24xx->lcd.vpos > s3c24xx->lcd.vpos_max) s3c24xx->lcd.vpos = s3c24xx->lcd.vpos_min;
s3c24xx->lcd.hpos = s3c24xx->lcd.hpos_min;
- scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
}
}
}
@@ -544,8 +544,8 @@ static void s3c24xx_lcd_render_stn_04( device_t *device)
static void s3c24xx_lcd_render_stn_08( device_t *device)
{
s3c24xx_t *s3c24xx = get_token( device);
- bitmap_t *bitmap = s3c24xx->lcd.bitmap[0];
- UINT32 *scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ bitmap_t &bitmap = *s3c24xx->lcd.bitmap[0];
+ UINT32 *scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
for (int i = 0; i < 4; i++)
{
UINT32 data = s3c24xx_lcd_dma_read( device);
@@ -559,7 +559,7 @@ static void s3c24xx_lcd_render_stn_08( device_t *device)
s3c24xx->lcd.vpos++;
if (s3c24xx->lcd.vpos > s3c24xx->lcd.vpos_max) s3c24xx->lcd.vpos = s3c24xx->lcd.vpos_min;
s3c24xx->lcd.hpos = s3c24xx->lcd.hpos_min;
- scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
}
}
}
@@ -568,8 +568,8 @@ static void s3c24xx_lcd_render_stn_08( device_t *device)
static void s3c24xx_lcd_render_stn_12_p( device_t *device)
{
s3c24xx_t *s3c24xx = get_token( device);
- bitmap_t *bitmap = s3c24xx->lcd.bitmap[0];
- UINT32 *scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ bitmap_t &bitmap = *s3c24xx->lcd.bitmap[0];
+ UINT32 *scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
for (int i = 0; i < 16; i++)
{
*scanline++ = s3c24xx_get_color_stn_12( device, s3c24xx_lcd_dma_read_bits( device, 12));
@@ -579,7 +579,7 @@ static void s3c24xx_lcd_render_stn_12_p( device_t *device)
s3c24xx->lcd.vpos++;
if (s3c24xx->lcd.vpos > s3c24xx->lcd.vpos_max) s3c24xx->lcd.vpos = s3c24xx->lcd.vpos_min;
s3c24xx->lcd.hpos = s3c24xx->lcd.hpos_min;
- scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
}
}
}
@@ -587,8 +587,8 @@ static void s3c24xx_lcd_render_stn_12_p( device_t *device)
static void s3c24xx_lcd_render_stn_12_u( device_t *device) // not tested
{
s3c24xx_t *s3c24xx = get_token( device);
- bitmap_t *bitmap = s3c24xx->lcd.bitmap[0];
- UINT32 *scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ bitmap_t &bitmap = *s3c24xx->lcd.bitmap[0];
+ UINT32 *scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
for (int i = 0; i < 4; i++)
{
UINT32 data = s3c24xx_lcd_dma_read( device);
@@ -602,7 +602,7 @@ static void s3c24xx_lcd_render_stn_12_u( device_t *device) // not tested
s3c24xx->lcd.vpos++;
if (s3c24xx->lcd.vpos > s3c24xx->lcd.vpos_max) s3c24xx->lcd.vpos = s3c24xx->lcd.vpos_min;
s3c24xx->lcd.hpos = s3c24xx->lcd.hpos_min;
- scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
}
}
}
@@ -611,8 +611,8 @@ static void s3c24xx_lcd_render_stn_12_u( device_t *device) // not tested
static void s3c24xx_lcd_render_tft_01( device_t *device)
{
s3c24xx_t *s3c24xx = get_token( device);
- bitmap_t *bitmap = s3c24xx->lcd.bitmap[0];
- UINT32 *scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ bitmap_t &bitmap = *s3c24xx->lcd.bitmap[0];
+ UINT32 *scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
for (int i = 0; i < 4; i++)
{
UINT32 data = s3c24xx_lcd_dma_read( device);
@@ -626,7 +626,7 @@ static void s3c24xx_lcd_render_tft_01( device_t *device)
s3c24xx->lcd.vpos++;
if (s3c24xx->lcd.vpos > s3c24xx->lcd.vpos_max) s3c24xx->lcd.vpos = s3c24xx->lcd.vpos_min;
s3c24xx->lcd.hpos = s3c24xx->lcd.hpos_min;
- scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
}
}
}
@@ -635,8 +635,8 @@ static void s3c24xx_lcd_render_tft_01( device_t *device)
static void s3c24xx_lcd_render_tft_02( device_t *device)
{
s3c24xx_t *s3c24xx = get_token( device);
- bitmap_t *bitmap = s3c24xx->lcd.bitmap[0];
- UINT32 *scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ bitmap_t &bitmap = *s3c24xx->lcd.bitmap[0];
+ UINT32 *scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
for (int i = 0; i < 4; i++)
{
UINT32 data = s3c24xx_lcd_dma_read( device);
@@ -650,7 +650,7 @@ static void s3c24xx_lcd_render_tft_02( device_t *device)
s3c24xx->lcd.vpos++;
if (s3c24xx->lcd.vpos > s3c24xx->lcd.vpos_max) s3c24xx->lcd.vpos = s3c24xx->lcd.vpos_min;
s3c24xx->lcd.hpos = s3c24xx->lcd.hpos_min;
- scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
}
}
}
@@ -659,8 +659,8 @@ static void s3c24xx_lcd_render_tft_02( device_t *device)
static void s3c24xx_lcd_render_tft_04( device_t *device)
{
s3c24xx_t *s3c24xx = get_token( device);
- bitmap_t *bitmap = s3c24xx->lcd.bitmap[0];
- UINT32 *scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ bitmap_t &bitmap = *s3c24xx->lcd.bitmap[0];
+ UINT32 *scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
for (int i = 0; i < 4; i++)
{
UINT32 data = s3c24xx_lcd_dma_read( device);
@@ -674,7 +674,7 @@ static void s3c24xx_lcd_render_tft_04( device_t *device)
s3c24xx->lcd.vpos++;
if (s3c24xx->lcd.vpos > s3c24xx->lcd.vpos_max) s3c24xx->lcd.vpos = s3c24xx->lcd.vpos_min;
s3c24xx->lcd.hpos = s3c24xx->lcd.hpos_min;
- scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
}
}
}
@@ -683,8 +683,8 @@ static void s3c24xx_lcd_render_tft_04( device_t *device)
static void s3c24xx_lcd_render_tft_08( device_t *device)
{
s3c24xx_t *s3c24xx = get_token( device);
- bitmap_t *bitmap = s3c24xx->lcd.bitmap[0];
- UINT32 *scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ bitmap_t &bitmap = *s3c24xx->lcd.bitmap[0];
+ UINT32 *scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
for (int i = 0; i < 4; i++)
{
UINT32 data = s3c24xx_lcd_dma_read( device);
@@ -698,7 +698,7 @@ static void s3c24xx_lcd_render_tft_08( device_t *device)
s3c24xx->lcd.vpos++;
if (s3c24xx->lcd.vpos > s3c24xx->lcd.vpos_max) s3c24xx->lcd.vpos = s3c24xx->lcd.vpos_min;
s3c24xx->lcd.hpos = s3c24xx->lcd.hpos_min;
- scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
}
}
}
@@ -707,8 +707,8 @@ static void s3c24xx_lcd_render_tft_08( device_t *device)
static void s3c24xx_lcd_render_tft_16( device_t *device)
{
s3c24xx_t *s3c24xx = get_token( device);
- bitmap_t *bitmap = s3c24xx->lcd.bitmap[0];
- UINT32 *scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ bitmap_t &bitmap = *s3c24xx->lcd.bitmap[0];
+ UINT32 *scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
for (int i = 0; i < 4; i++)
{
UINT32 data = s3c24xx_lcd_dma_read( device);
@@ -722,7 +722,7 @@ static void s3c24xx_lcd_render_tft_16( device_t *device)
s3c24xx->lcd.vpos++;
if (s3c24xx->lcd.vpos > s3c24xx->lcd.vpos_max) s3c24xx->lcd.vpos = s3c24xx->lcd.vpos_min;
s3c24xx->lcd.hpos = s3c24xx->lcd.hpos_min;
- scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
}
}
}
@@ -781,14 +781,14 @@ static void s3c24xx_video_start( device_t *device, running_machine &machine)
s3c24xx->lcd.bitmap[1] = screen->alloc_compatible_bitmap();
}
-static void bitmap_blend( bitmap_t *bitmap_dst, bitmap_t *bitmap_src_1, bitmap_t *bitmap_src_2)
+static void bitmap_blend( bitmap_t &bitmap_dst, bitmap_t &bitmap_src_1, bitmap_t &bitmap_src_2)
{
- for (int y = 0; y < bitmap_dst->height(); y++)
+ for (int y = 0; y < bitmap_dst.height(); y++)
{
- UINT32 *line0 = &bitmap_src_1->pix32(y);
- UINT32 *line1 = &bitmap_src_2->pix32(y);
- UINT32 *line2 = &bitmap_dst->pix32(y);
- for (int x = 0; x < bitmap_dst->width(); x++)
+ UINT32 *line0 = &bitmap_src_1.pix32(y);
+ UINT32 *line1 = &bitmap_src_2.pix32(y);
+ UINT32 *line2 = &bitmap_dst.pix32(y);
+ for (int x = 0; x < bitmap_dst.width(); x++)
{
UINT32 color0 = line0[x];
UINT32 color1 = line1[x];
@@ -806,19 +806,19 @@ static void bitmap_blend( bitmap_t *bitmap_dst, bitmap_t *bitmap_src_1, bitmap_t
}
}
-static UINT32 s3c24xx_video_update( device_t *device, screen_device &screen, bitmap_t *bitmap, const rectangle &cliprect)
+static UINT32 s3c24xx_video_update( device_t *device, screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect)
{
s3c24xx_t *s3c24xx = get_token( device);
if (s3c24xx->lcd.regs.lcdcon1 & (1 << 0))
{
if (s3c24xx->lcd.framerate >= 1195)
{
- bitmap_blend( bitmap, s3c24xx->lcd.bitmap[0], s3c24xx->lcd.bitmap[1]);
- copybitmap( s3c24xx->lcd.bitmap[1], s3c24xx->lcd.bitmap[0], 0, 0, 0, 0, cliprect);
+ bitmap_blend( bitmap, *s3c24xx->lcd.bitmap[0], *s3c24xx->lcd.bitmap[1]);
+ copybitmap( *s3c24xx->lcd.bitmap[1], *s3c24xx->lcd.bitmap[0], 0, 0, 0, 0, cliprect);
}
else
{
- copybitmap( bitmap, s3c24xx->lcd.bitmap[0], 0, 0, 0, 0, cliprect);
+ copybitmap( bitmap, *s3c24xx->lcd.bitmap[0], 0, 0, 0, 0, cliprect);
}
s3c24xx_lcd_dma_init( device);
}
diff --git a/src/emu/rendutil.c b/src/emu/rendutil.c
index bc96b119281..5af4f57a2fa 100644
--- a/src/emu/rendutil.c
+++ b/src/emu/rendutil.c
@@ -23,8 +23,8 @@
/* utilities */
static void resample_argb_bitmap_average(UINT32 *dest, UINT32 drowpixels, UINT32 dwidth, UINT32 dheight, const UINT32 *source, UINT32 srowpixels, UINT32 swidth, UINT32 sheight, const render_color *color, UINT32 dx, UINT32 dy);
static void resample_argb_bitmap_bilinear(UINT32 *dest, UINT32 drowpixels, UINT32 dwidth, UINT32 dheight, const UINT32 *source, UINT32 srowpixels, UINT32 swidth, UINT32 sheight, const render_color *color, UINT32 dx, UINT32 dy);
-static void copy_png_to_bitmap(bitmap_t *bitmap, const png_info *png, bool *hasalpha);
-static void copy_png_alpha_to_bitmap(bitmap_t *bitmap, const png_info *png, bool *hasalpha);
+static void copy_png_to_bitmap(bitmap_t &bitmap, const png_info *png, bool *hasalpha);
+static void copy_png_alpha_to_bitmap(bitmap_t &bitmap, const png_info *png, bool *hasalpha);
@@ -610,7 +610,7 @@ bitmap_t *render_load_png(emu_file &file, const char *dirname, const char *filen
{
bitmap = global_alloc(bitmap_t(png.width, png.height, BITMAP_FORMAT_ARGB32));
if (bitmap != NULL)
- copy_png_to_bitmap(bitmap, &png, hasalpha);
+ copy_png_to_bitmap(*bitmap, &png, hasalpha);
}
/* alpha case */
@@ -619,7 +619,7 @@ bitmap_t *render_load_png(emu_file &file, const char *dirname, const char *filen
if (png.width == alphadest->width() && png.height == alphadest->height())
{
bitmap = alphadest;
- copy_png_alpha_to_bitmap(bitmap, &png, hasalpha);
+ copy_png_alpha_to_bitmap(*bitmap, &png, hasalpha);
}
}
@@ -634,7 +634,7 @@ bitmap_t *render_load_png(emu_file &file, const char *dirname, const char *filen
bitmap
-------------------------------------------------*/
-static void copy_png_to_bitmap(bitmap_t *bitmap, const png_info *png, bool *hasalpha)
+static void copy_png_to_bitmap(bitmap_t &bitmap, const png_info *png, bool *hasalpha)
{
UINT8 accumalpha = 0xff;
UINT8 *src;
@@ -651,7 +651,7 @@ static void copy_png_to_bitmap(bitmap_t *bitmap, const png_info *png, bool *hasa
/* determine alpha and expand to 32bpp */
UINT8 alpha = (*src < png->num_trans) ? png->trans[*src] : 0xff;
accumalpha &= alpha;
- bitmap->pix32(y, x) = MAKE_ARGB(alpha, png->palette[*src * 3], png->palette[*src * 3 + 1], png->palette[*src * 3 + 2]);
+ bitmap.pix32(y, x) = MAKE_ARGB(alpha, png->palette[*src * 3], png->palette[*src * 3 + 1], png->palette[*src * 3 + 2]);
}
}
@@ -662,7 +662,7 @@ static void copy_png_to_bitmap(bitmap_t *bitmap, const png_info *png, bool *hasa
src = png->image;
for (y = 0; y < png->height; y++)
for (x = 0; x < png->width; x++, src++)
- bitmap->pix32(y, x) = MAKE_ARGB(0xff, *src, *src, *src);
+ bitmap.pix32(y, x) = MAKE_ARGB(0xff, *src, *src, *src);
}
/* handle 32bpp non-alpha case */
@@ -672,7 +672,7 @@ static void copy_png_to_bitmap(bitmap_t *bitmap, const png_info *png, bool *hasa
src = png->image;
for (y = 0; y < png->height; y++)
for (x = 0; x < png->width; x++, src += 3)
- bitmap->pix32(y, x) = MAKE_ARGB(0xff, src[0], src[1], src[2]);
+ bitmap.pix32(y, x) = MAKE_ARGB(0xff, src[0], src[1], src[2]);
}
/* handle 32bpp alpha case */
@@ -684,7 +684,7 @@ static void copy_png_to_bitmap(bitmap_t *bitmap, const png_info *png, bool *hasa
for (x = 0; x < png->width; x++, src += 4)
{
accumalpha &= src[3];
- bitmap->pix32(y, x) = MAKE_ARGB(src[3], src[0], src[1], src[2]);
+ bitmap.pix32(y, x) = MAKE_ARGB(src[3], src[0], src[1], src[2]);
}
}
@@ -699,7 +699,7 @@ static void copy_png_to_bitmap(bitmap_t *bitmap, const png_info *png, bool *hasa
to the alpha channel of a bitmap
-------------------------------------------------*/
-static void copy_png_alpha_to_bitmap(bitmap_t *bitmap, const png_info *png, bool *hasalpha)
+static void copy_png_alpha_to_bitmap(bitmap_t &bitmap, const png_info *png, bool *hasalpha)
{
UINT8 accumalpha = 0xff;
UINT8 *src;
@@ -713,10 +713,10 @@ static void copy_png_alpha_to_bitmap(bitmap_t *bitmap, const png_info *png, bool
for (y = 0; y < png->height; y++)
for (x = 0; x < png->width; x++, src++)
{
- rgb_t pixel = bitmap->pix32(y, x);
+ rgb_t pixel = bitmap.pix32(y, x);
UINT8 alpha = compute_brightness(MAKE_RGB(png->palette[*src * 3], png->palette[*src * 3 + 1], png->palette[*src * 3 + 2]));
accumalpha &= alpha;
- bitmap->pix32(y, x) = MAKE_ARGB(alpha, RGB_RED(pixel), RGB_GREEN(pixel), RGB_BLUE(pixel));
+ bitmap.pix32(y, x) = MAKE_ARGB(alpha, RGB_RED(pixel), RGB_GREEN(pixel), RGB_BLUE(pixel));
}
}
@@ -728,9 +728,9 @@ static void copy_png_alpha_to_bitmap(bitmap_t *bitmap, const png_info *png, bool
for (y = 0; y < png->height; y++)
for (x = 0; x < png->width; x++, src++)
{
- rgb_t pixel = bitmap->pix32(y, x);
+ rgb_t pixel = bitmap.pix32(y, x);
accumalpha &= *src;
- bitmap->pix32(y, x) = MAKE_ARGB(*src, RGB_RED(pixel), RGB_GREEN(pixel), RGB_BLUE(pixel));
+ bitmap.pix32(y, x) = MAKE_ARGB(*src, RGB_RED(pixel), RGB_GREEN(pixel), RGB_BLUE(pixel));
}
}
@@ -742,10 +742,10 @@ static void copy_png_alpha_to_bitmap(bitmap_t *bitmap, const png_info *png, bool
for (y = 0; y < png->height; y++)
for (x = 0; x < png->width; x++, src += 3)
{
- rgb_t pixel = bitmap->pix32(y, x);
+ rgb_t pixel = bitmap.pix32(y, x);
UINT8 alpha = compute_brightness(MAKE_RGB(src[0], src[1], src[2]));
accumalpha &= alpha;
- bitmap->pix32(y, x) = MAKE_ARGB(alpha, RGB_RED(pixel), RGB_GREEN(pixel), RGB_BLUE(pixel));
+ bitmap.pix32(y, x) = MAKE_ARGB(alpha, RGB_RED(pixel), RGB_GREEN(pixel), RGB_BLUE(pixel));
}
}
@@ -757,10 +757,10 @@ static void copy_png_alpha_to_bitmap(bitmap_t *bitmap, const png_info *png, bool
for (y = 0; y < png->height; y++)
for (x = 0; x < png->width; x++, src += 4)
{
- rgb_t pixel = bitmap->pix32(y, x);
+ rgb_t pixel = bitmap.pix32(y, x);
UINT8 alpha = compute_brightness(MAKE_RGB(src[0], src[1], src[2]));
accumalpha &= alpha;
- bitmap->pix32(y, x) = MAKE_ARGB(alpha, RGB_RED(pixel), RGB_GREEN(pixel), RGB_BLUE(pixel));
+ bitmap.pix32(y, x) = MAKE_ARGB(alpha, RGB_RED(pixel), RGB_GREEN(pixel), RGB_BLUE(pixel));
}
}
diff --git a/src/emu/screen.c b/src/emu/screen.c
index cacaee71fcb..03141c1e1da 100644
--- a/src/emu/screen.c
+++ b/src/emu/screen.c
@@ -979,14 +979,11 @@ void screen_device::finalize_burnin()
scaledvis.max_y = m_visarea.max_y * m_burnin->height() / m_height;
// wrap a bitmap around the subregion we care about
- bitmap_t *finalmap = auto_alloc(machine(), bitmap_t(scaledvis.max_x + 1 - scaledvis.min_x,
- scaledvis.max_y + 1 - scaledvis.min_y,
- BITMAP_FORMAT_ARGB32));
-
+ bitmap_t finalmap(scaledvis.max_x + 1 - scaledvis.min_x, scaledvis.max_y + 1 - scaledvis.min_y, BITMAP_FORMAT_ARGB32);
int srcwidth = m_burnin->width();
int srcheight = m_burnin->height();
- int dstwidth = finalmap->width();
- int dstheight = finalmap->height();
+ int dstwidth = finalmap.width();
+ int dstheight = finalmap.height();
int xstep = (srcwidth << 16) / dstwidth;
int ystep = (srcheight << 16) / dstheight;
@@ -1010,7 +1007,7 @@ void screen_device::finalize_burnin()
for (int y = 0, srcy = 0; y < dstheight; y++, srcy += ystep)
{
UINT64 *src = &m_burnin->pix64(srcy >> 16);
- UINT32 *dst = &finalmap->pix32(y);
+ UINT32 *dst = &finalmap.pix32(y);
for (int x = 0, srcx = 0; x < dstwidth; x++, srcx += xstep)
{
int brightness = (UINT64)(maxval - src[srcx >> 16]) * 255 / (maxval - minval);
@@ -1074,7 +1071,7 @@ void screen_device::load_effect_overlay(const char *filename)
bool screen_device::screen_update(bitmap_t &bitmap, const rectangle &cliprect)
{
if (m_screen_update != NULL) {
- return (*m_screen_update)(*this, &bitmap, cliprect);
+ return (*m_screen_update)(*this, bitmap, cliprect);
} else {
return machine().driver_data<driver_device>()->screen_update(*this, bitmap, cliprect);
}
diff --git a/src/emu/screen.h b/src/emu/screen.h
index 5bd6770822c..48109eb0062 100644
--- a/src/emu/screen.h
+++ b/src/emu/screen.h
@@ -74,7 +74,7 @@ class screen_device;
// callback that is called to notify of a change in the VBLANK state
typedef delegate<void (screen_device &, bool)> vblank_state_delegate;
-typedef UINT32 (*screen_update_func)(screen_device &screen, bitmap_t *bitmap, const rectangle &cliprect);
+typedef UINT32 (*screen_update_func)(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect);
typedef void (*screen_eof_func)(screen_device &screen);
@@ -255,7 +255,7 @@ extern const device_type SCREEN;
//**************************************************************************
#define SCREEN_UPDATE_NAME(name) screen_update_##name
-#define SCREEN_UPDATE(name) UINT32 SCREEN_UPDATE_NAME(name)(screen_device &screen, bitmap_t *bitmap, const rectangle &cliprect)
+#define SCREEN_UPDATE(name) UINT32 SCREEN_UPDATE_NAME(name)(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect)
#define SCREEN_UPDATE_CALL(name) SCREEN_UPDATE_NAME(name)(screen, bitmap, cliprect)
#define SCREEN_EOF_NAME(name) screen_eof_##name
diff --git a/src/emu/sound/cdp1864.c b/src/emu/sound/cdp1864.c
index 78215695962..3dff797f8d5 100644
--- a/src/emu/sound/cdp1864.c
+++ b/src/emu/sound/cdp1864.c
@@ -470,15 +470,15 @@ WRITE_LINE_MEMBER( cdp1864_device::evs_w )
// update_screen -
//-------------------------------------------------
-void cdp1864_device::update_screen(bitmap_t *bitmap, const rectangle &cliprect)
+void cdp1864_device::update_screen(bitmap_t &bitmap, const rectangle &cliprect)
{
if (m_disp)
{
- copybitmap(bitmap, m_bitmap, 0, 0, 0, 0, cliprect);
+ copybitmap(bitmap, *m_bitmap, 0, 0, 0, 0, cliprect);
m_bitmap->fill(CDP1864_BACKGROUND_COLOR_SEQUENCE[m_bgcolor] + 8, cliprect);
}
else
{
- bitmap->fill(get_black_pen(machine()), cliprect);
+ bitmap.fill(get_black_pen(machine()), cliprect);
}
}
diff --git a/src/emu/sound/cdp1864.h b/src/emu/sound/cdp1864.h
index a75c4ae1b9f..4cdc3efc47b 100644
--- a/src/emu/sound/cdp1864.h
+++ b/src/emu/sound/cdp1864.h
@@ -156,7 +156,7 @@ public:
DECLARE_WRITE_LINE_MEMBER( aoe_w );
DECLARE_WRITE_LINE_MEMBER( evs_w );
- void update_screen(bitmap_t *bitmap, const rectangle &cliprect);
+ void update_screen(bitmap_t &bitmap, const rectangle &cliprect);
protected:
// device-level overrides
diff --git a/src/emu/sound/cdp1869.c b/src/emu/sound/cdp1869.c
index fd90c123173..165a4898486 100644
--- a/src/emu/sound/cdp1869.c
+++ b/src/emu/sound/cdp1869.c
@@ -539,7 +539,7 @@ void cdp1869_device::sound_stream_update(sound_stream &stream, stream_sample_t *
// draw_line - draw character line
//-------------------------------------------------
-void cdp1869_device::draw_line(bitmap_t *bitmap, const rectangle &rect, int x, int y, UINT8 data, int color)
+void cdp1869_device::draw_line(bitmap_t &bitmap, const rectangle &rect, int x, int y, UINT8 data, int color)
{
int i;
@@ -549,20 +549,20 @@ void cdp1869_device::draw_line(bitmap_t *bitmap, const rectangle &rect, int x, i
{
if (data & 0x80)
{
- bitmap->pix16(y, x) = color;
+ bitmap.pix16(y, x) = color;
if (!m_fresvert)
{
- bitmap->pix16(y + 1, x) = color;
+ bitmap.pix16(y + 1, x) = color;
}
if (!m_freshorz)
{
- bitmap->pix16(y, x + 1) = color;
+ bitmap.pix16(y, x + 1) = color;
if (!m_fresvert)
{
- bitmap->pix16(y + 1, x + 1) = color;
+ bitmap.pix16(y + 1, x + 1) = color;
}
}
}
@@ -583,7 +583,7 @@ void cdp1869_device::draw_line(bitmap_t *bitmap, const rectangle &rect, int x, i
// draw_char - draw character
//-------------------------------------------------
-void cdp1869_device::draw_char(bitmap_t *bitmap, const rectangle &rect, int x, int y, UINT16 pma)
+void cdp1869_device::draw_char(bitmap_t &bitmap, const rectangle &rect, int x, int y, UINT16 pma)
{
UINT8 pmd = read_page_ram_byte(pma);
@@ -907,7 +907,7 @@ READ_LINE_MEMBER( cdp1869_device::pal_ntsc_r )
// update_screen - update screen
//-------------------------------------------------
-void cdp1869_device::update_screen(bitmap_t *bitmap, const rectangle &cliprect)
+void cdp1869_device::update_screen(bitmap_t &bitmap, const rectangle &cliprect)
{
rectangle screen_rect, outer;
@@ -935,7 +935,7 @@ void cdp1869_device::update_screen(bitmap_t *bitmap, const rectangle &cliprect)
}
outer &= cliprect;
- bitmap->fill(m_bkg, outer);
+ bitmap.fill(m_bkg, outer);
if (!m_dispoff)
{
diff --git a/src/emu/sound/cdp1869.h b/src/emu/sound/cdp1869.h
index 307c6c352cb..b717dbe720c 100644
--- a/src/emu/sound/cdp1869.h
+++ b/src/emu/sound/cdp1869.h
@@ -231,7 +231,7 @@ public:
DECLARE_READ_LINE_MEMBER( predisplay_r );
DECLARE_READ_LINE_MEMBER( pal_ntsc_r );
- void update_screen(bitmap_t *bitmap, const rectangle &cliprect);
+ void update_screen(bitmap_t &bitmap, const rectangle &cliprect);
protected:
// device-level overrides
@@ -260,8 +260,8 @@ protected:
inline int get_pen(int ccb0, int ccb1, int pcb);
void initialize_palette();
- void draw_line(bitmap_t *bitmap, const rectangle &rect, int x, int y, UINT8 data, int color);
- void draw_char(bitmap_t *bitmap, const rectangle &rect, int x, int y, UINT16 pma);
+ void draw_line(bitmap_t &bitmap, const rectangle &rect, int x, int y, UINT8 data, int color);
+ void draw_char(bitmap_t &bitmap, const rectangle &rect, int x, int y, UINT16 pma);
private:
devcb_resolved_read_line m_in_pal_ntsc_func;
diff --git a/src/emu/sound/mos6560.c b/src/emu/sound/mos6560.c
index 92331066b0c..8e8e0ef5625 100644
--- a/src/emu/sound/mos6560.c
+++ b/src/emu/sound/mos6560.c
@@ -509,11 +509,11 @@ void mos6560_raster_interrupt_gen( device_t *device )
main screen bitmap
-------------------------------------------------*/
-UINT32 mos6560_video_update( device_t *device, bitmap_t *bitmap, const rectangle &cliprect )
+UINT32 mos6560_video_update( device_t *device, bitmap_t &bitmap, const rectangle &cliprect )
{
mos6560_state *mos6560 = get_safe_token(device);
- copybitmap(bitmap, mos6560->bitmap, 0, 0, 0, 0, cliprect);
+ copybitmap(bitmap, *mos6560->bitmap, 0, 0, 0, 0, cliprect);
return 0;
}
diff --git a/src/emu/sound/mos6560.h b/src/emu/sound/mos6560.h
index d76f6fc30c0..a80ef62c215 100644
--- a/src/emu/sound/mos6560.h
+++ b/src/emu/sound/mos6560.h
@@ -107,7 +107,7 @@ WRITE8_DEVICE_HANDLER( mos6560_port_w );
READ8_DEVICE_HANDLER( mos6560_port_r );
void mos6560_raster_interrupt_gen( device_t *device );
-UINT32 mos6560_video_update( device_t *device, bitmap_t *bitmap, const rectangle &cliprect );
+UINT32 mos6560_video_update( device_t *device, bitmap_t &bitmap, const rectangle &cliprect );
#endif /* __MOS6560_H__ */
diff --git a/src/emu/tilemap.c b/src/emu/tilemap.c
index 7ad2dd9b13e..aefe85758cf 100644
--- a/src/emu/tilemap.c
+++ b/src/emu/tilemap.c
@@ -159,7 +159,7 @@ static UINT8 tile_draw(tilemap_t *tmap, const UINT8 *pendata, UINT32 x0, UINT32
static UINT8 tile_apply_bitmask(tilemap_t *tmap, const UINT8 *maskdata, UINT32 x0, UINT32 y0, UINT8 category, UINT8 flags);
/* drawing helpers */
-static void configure_blit_parameters(blit_parameters *blit, tilemap_t *tmap, bitmap_t *dest, const rectangle &cliprect, UINT32 flags, UINT8 priority, UINT8 priority_mask);
+static void configure_blit_parameters(blit_parameters *blit, tilemap_t *tmap, bitmap_t &dest, const rectangle &cliprect, UINT32 flags, UINT8 priority, UINT8 priority_mask);
static void tilemap_draw_instance(tilemap_t *tmap, const blit_parameters *blit, int xpos, int ypos);
static void tilemap_draw_roz_core(tilemap_t *tmap, const blit_parameters *blit,
UINT32 startx, UINT32 starty, int incxx, int incxy, int incyx, int incyy, int wraparound);
@@ -304,7 +304,7 @@ void tilemap_init(running_machine &machine)
if (screen_width != 0 && screen_height != 0)
{
- machine.priority_bitmap = auto_bitmap_alloc(machine, screen_width, screen_height, BITMAP_FORMAT_INDEXED8);
+ machine.priority_bitmap.allocate(screen_width, screen_height, BITMAP_FORMAT_INDEXED8);
machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(tilemap_exit), &machine));
}
}
@@ -776,11 +776,11 @@ int tilemap_get_scrolly(tilemap_t *tmap, int which)
(updated) internal pixmap for a tilemap
-------------------------------------------------*/
-bitmap_t *tilemap_get_pixmap(tilemap_t *tmap)
+bitmap_t &tilemap_get_pixmap(tilemap_t *tmap)
{
/* ensure all the tiles are up-to-date and then return the pixmap */
pixmap_update(tmap);
- return tmap->pixmap;
+ return *tmap->pixmap;
}
@@ -789,11 +789,11 @@ bitmap_t *tilemap_get_pixmap(tilemap_t *tmap)
(updated) internal flagsmap for a tilemap
-------------------------------------------------*/
-bitmap_t *tilemap_get_flagsmap(tilemap_t *tmap)
+bitmap_t &tilemap_get_flagsmap(tilemap_t *tmap)
{
/* ensure all the tiles are up-to-date and then return the flagsmap */
pixmap_update(tmap);
- return tmap->flagsmap;
+ return *tmap->flagsmap;
}
@@ -821,7 +821,7 @@ UINT8 *tilemap_get_tile_flags(tilemap_t *tmap)
priority/priority_mask to the priority bitmap
-------------------------------------------------*/
-void tilemap_draw_primask(bitmap_t *dest, const rectangle &cliprect, tilemap_t *tmap, UINT32 flags, UINT8 priority, UINT8 priority_mask)
+void tilemap_draw_primask(bitmap_t &dest, const rectangle &cliprect, tilemap_t *tmap, UINT32 flags, UINT8 priority, UINT8 priority_mask)
{
UINT32 width, height;
blit_parameters blit;
@@ -945,7 +945,7 @@ g_profiler.stop();
priority_mask to the priority bitmap
-------------------------------------------------*/
-void tilemap_draw_roz_primask(bitmap_t *dest, const rectangle &cliprect, tilemap_t *tmap,
+void tilemap_draw_roz_primask(bitmap_t &dest, const rectangle &cliprect, tilemap_t *tmap,
UINT32 startx, UINT32 starty, int incxx, int incxy, int incyx, int incyy,
int wraparound, UINT32 flags, UINT8 priority, UINT8 priority_mask)
{
@@ -1025,14 +1025,14 @@ void tilemap_size_by_index(running_machine &machine, int number, UINT32 *width,
priority)
-------------------------------------------------*/
-void tilemap_draw_by_index(running_machine &machine, bitmap_t *dest, int number, UINT32 scrollx, UINT32 scrolly)
+void tilemap_draw_by_index(running_machine &machine, bitmap_t &dest, int number, UINT32 scrollx, UINT32 scrolly)
{
tilemap_t *tmap = indexed_tilemap(machine, number);
blit_parameters blit;
int xpos,ypos;
/* set up for the blit, using hard-coded parameters (no priority, etc) */
- configure_blit_parameters(&blit, tmap, dest, dest->cliprect(), TILEMAP_DRAW_OPAQUE | TILEMAP_DRAW_ALL_CATEGORIES, 0, 0xff);
+ configure_blit_parameters(&blit, tmap, dest, dest.cliprect(), TILEMAP_DRAW_OPAQUE | TILEMAP_DRAW_ALL_CATEGORIES, 0, 0xff);
/* compute the effective scroll positions */
scrollx = tmap->width - scrollx % tmap->width;
@@ -1516,13 +1516,13 @@ static UINT8 tile_apply_bitmask(tilemap_t *tmap, const UINT8 *maskdata, UINT32 x
and indexed drawing code
-------------------------------------------------*/
-static void configure_blit_parameters(blit_parameters *blit, tilemap_t *tmap, bitmap_t *dest, const rectangle &cliprect, UINT32 flags, UINT8 priority, UINT8 priority_mask)
+static void configure_blit_parameters(blit_parameters *blit, tilemap_t *tmap, bitmap_t &dest, const rectangle &cliprect, UINT32 flags, UINT8 priority, UINT8 priority_mask)
{
/* start with nothing */
memset(blit, 0, sizeof(*blit));
/* set the target bitmap */
- blit->bitmap = dest;
+ blit->bitmap = &dest;
blit->cliprect = cliprect;
/* set the priority code and alpha */
@@ -1530,7 +1530,7 @@ static void configure_blit_parameters(blit_parameters *blit, tilemap_t *tmap, bi
blit->alpha = (flags & TILEMAP_DRAW_ALPHA_FLAG) ? (flags >> 24) : 0xff;
/* if no destination, just render priority */
- if (dest == NULL)
+ if (!dest.valid())
{
blit->draw_masked = scanline_draw_masked_null;
blit->draw_opaque = scanline_draw_opaque_null;
@@ -1539,7 +1539,7 @@ static void configure_blit_parameters(blit_parameters *blit, tilemap_t *tmap, bi
/* otherwise get the appropriate callbacks for the format and flags */
else
{
- switch (dest->format())
+ switch (dest.format())
{
case BITMAP_FORMAT_RGB32:
blit->draw_masked = (blit->alpha < 0xff) ? scanline_draw_masked_rgb32_alpha : scanline_draw_masked_rgb32;
@@ -1598,8 +1598,8 @@ static void configure_blit_parameters(blit_parameters *blit, tilemap_t *tmap, bi
static void tilemap_draw_instance(tilemap_t *tmap, const blit_parameters *blit, int xpos, int ypos)
{
- bitmap_t *priority_bitmap = tmap->machine().priority_bitmap;
- bitmap_t *dest = blit->bitmap;
+ bitmap_t &priority_bitmap = tmap->machine().priority_bitmap;
+ bitmap_t &dest = *blit->bitmap;
const UINT16 *source_baseaddr;
const UINT8 *mask_baseaddr;
void *dest_baseaddr = NULL;
@@ -1622,12 +1622,12 @@ static void tilemap_draw_instance(tilemap_t *tmap, const blit_parameters *blit,
return;
/* look up priority and destination base addresses for y1 */
- priority_baseaddr = &priority_bitmap->pix8(y1, xpos);
- if (dest != NULL)
+ priority_baseaddr = &priority_bitmap.pix8(y1, xpos);
+ if (dest.valid())
{
- dest_bytespp = dest->bpp() / 8;
- dest_line_pitch_bytes = dest->rowbytes();
- dest_baseaddr = dest->raw_pixptr(y1, xpos);
+ dest_bytespp = dest.bpp() / 8;
+ dest_line_pitch_bytes = dest.rowbytes();
+ dest_baseaddr = dest.raw_pixptr(y1, xpos);
}
/* convert screen coordinates to source tilemap coordinates */
@@ -1711,7 +1711,7 @@ static void tilemap_draw_instance(tilemap_t *tmap, const blit_parameters *blit,
dest0 = (UINT8 *)dest0 + dest_line_pitch_bytes;
source0 += tmap->pixmap->rowpixels();
- pmap0 += priority_bitmap->rowpixels();
+ pmap0 += priority_bitmap.rowpixels();
}
}
@@ -1726,7 +1726,7 @@ static void tilemap_draw_instance(tilemap_t *tmap, const blit_parameters *blit,
dest0 = (UINT8 *)dest0 + dest_line_pitch_bytes;
source0 += tmap->pixmap->rowpixels();
mask0 += tmap->flagsmap->rowpixels();
- pmap0 += priority_bitmap->rowpixels();
+ pmap0 += priority_bitmap.rowpixels();
}
}
}
@@ -1741,7 +1741,7 @@ static void tilemap_draw_instance(tilemap_t *tmap, const blit_parameters *blit,
break;
/* advance to the next row on all our bitmaps */
- priority_baseaddr += priority_bitmap->rowpixels() * (nexty - y);
+ priority_baseaddr += priority_bitmap.rowpixels() * (nexty - y);
source_baseaddr += tmap->pixmap->rowpixels() * (nexty - y);
mask_baseaddr += tmap->flagsmap->rowpixels() * (nexty - y);
dest_baseaddr = (UINT8 *)dest_baseaddr + dest_line_pitch_bytes * (nexty - y);
@@ -1778,14 +1778,14 @@ static void tilemap_draw_roz_core(tilemap_t *tmap, const blit_parameters *blit,
UINT32 startx, UINT32 starty, int incxx, int incxy, int incyx, int incyy, int wraparound)
{
const pen_t *clut = &tmap->machine().pens[blit->tilemap_priority_code >> 16];
- bitmap_t *priority_bitmap = tmap->machine().priority_bitmap;
- bitmap_t *destbitmap = blit->bitmap;
- bitmap_t *srcbitmap = tmap->pixmap;
- bitmap_t *flagsmap = tmap->flagsmap;
- const int xmask = srcbitmap->width()-1;
- const int ymask = srcbitmap->height()-1;
- const int widthshifted = srcbitmap->width() << 16;
- const int heightshifted = srcbitmap->height() << 16;
+ bitmap_t &priority_bitmap = tmap->machine().priority_bitmap;
+ bitmap_t &destbitmap = *blit->bitmap;
+ bitmap_t &srcbitmap = *tmap->pixmap;
+ bitmap_t &flagsmap = *tmap->flagsmap;
+ const int xmask = srcbitmap.width()-1;
+ const int ymask = srcbitmap.height()-1;
+ const int widthshifted = srcbitmap.width() << 16;
+ const int heightshifted = srcbitmap.height() << 16;
UINT32 priority = blit->tilemap_priority_code;
UINT8 mask = blit->mask;
UINT8 value = blit->value;
@@ -1801,7 +1801,7 @@ static void tilemap_draw_roz_core(tilemap_t *tmap, const blit_parameters *blit,
UINT8 *pri;
const UINT16 *src;
const UINT8 *maskptr;
- int destadvance = destbitmap->bpp() / 8;
+ int destadvance = destbitmap.bpp() / 8;
/* pre-advance based on the cliprect */
startx += blit->cliprect.min_x * incxx + blit->cliprect.min_y * incyx;
@@ -1839,10 +1839,10 @@ static void tilemap_draw_roz_core(tilemap_t *tmap, const blit_parameters *blit,
cy = starty >> 16;
/* get source and priority pointers */
- pri = &priority_bitmap->pix8(sy, sx);
- src = &srcbitmap->pix16(cy);
- maskptr = &flagsmap->pix8(cy);
- dest = destbitmap->raw_pixptr(sy, sx);
+ pri = &priority_bitmap.pix8(sy, sx);
+ src = &srcbitmap.pix16(cy);
+ maskptr = &flagsmap.pix8(cy);
+ dest = destbitmap.raw_pixptr(sy, sx);
/* loop over columns */
while (x <= ex && cx < widthshifted)
@@ -1880,16 +1880,16 @@ static void tilemap_draw_roz_core(tilemap_t *tmap, const blit_parameters *blit,
cy = starty;
/* get dest and priority pointers */
- dest = destbitmap->raw_pixptr(sy, sx);
- pri = &priority_bitmap->pix8(sy, sx);
+ dest = destbitmap.raw_pixptr(sy, sx);
+ pri = &priority_bitmap.pix8(sy, sx);
/* loop over columns */
while (x <= ex)
{
/* plot if we match the mask */
- if ((flagsmap->pix8((cy >> 16) & ymask, (cx >> 16) & xmask) & mask) == value)
+ if ((flagsmap.pix8((cy >> 16) & ymask, (cx >> 16) & xmask) & mask) == value)
{
- ROZ_PLOT_PIXEL(srcbitmap->pix16((cy >> 16) & ymask, (cx >> 16) & xmask));
+ ROZ_PLOT_PIXEL(srcbitmap.pix16((cy >> 16) & ymask, (cx >> 16) & xmask));
*pri = (*pri & (priority >> 8)) | priority;
}
@@ -1920,17 +1920,17 @@ static void tilemap_draw_roz_core(tilemap_t *tmap, const blit_parameters *blit,
cy = starty;
/* get dest and priority pointers */
- dest = destbitmap->raw_pixptr(sy, sx);
- pri = &priority_bitmap->pix8(sy, sx);
+ dest = destbitmap.raw_pixptr(sy, sx);
+ pri = &priority_bitmap.pix8(sy, sx);
/* loop over columns */
while (x <= ex)
{
/* plot if we're within the bitmap and we match the mask */
if (cx < widthshifted && cy < heightshifted)
- if ((flagsmap->pix8(cy >> 16, cx >> 16) & mask) == value)
+ if ((flagsmap.pix8(cy >> 16, cx >> 16) & mask) == value)
{
- ROZ_PLOT_PIXEL(srcbitmap->pix16(cy >> 16, cx >> 16));
+ ROZ_PLOT_PIXEL(srcbitmap.pix16(cy >> 16, cx >> 16));
*pri = (*pri & (priority >> 8)) | priority;
}
diff --git a/src/emu/tilemap.h b/src/emu/tilemap.h
index f1f535007e8..1d06ffc9e99 100644
--- a/src/emu/tilemap.h
+++ b/src/emu/tilemap.h
@@ -505,10 +505,10 @@ int tilemap_get_scrolly(tilemap_t *tmap, int col);
/* ----- internal map access ----- */
/* return a pointer to the (updated) internal pixmap for a tilemap */
-bitmap_t *tilemap_get_pixmap(tilemap_t *tmap);
+bitmap_t &tilemap_get_pixmap(tilemap_t *tmap);
/* return a pointer to the (updated) internal flagsmap for a tilemap */
-bitmap_t *tilemap_get_flagsmap(tilemap_t *tmap);
+bitmap_t &tilemap_get_flagsmap(tilemap_t *tmap);
/* return a pointer to the (updated) internal per-tile flags for a tilemap */
UINT8 *tilemap_get_tile_flags(tilemap_t *tmap);
@@ -518,11 +518,11 @@ UINT8 *tilemap_get_tile_flags(tilemap_t *tmap);
/* ----- tilemap rendering ----- */
/* draw a tilemap to the destination with clipping; pixels apply priority/priority_mask to the priority bitmap */
-void tilemap_draw_primask(bitmap_t *dest, const rectangle &cliprect, tilemap_t *tmap, UINT32 flags, UINT8 priority, UINT8 priority_mask);
+void tilemap_draw_primask(bitmap_t &dest, const rectangle &cliprect, tilemap_t *tmap, UINT32 flags, UINT8 priority, UINT8 priority_mask);
/* draw a tilemap to the destination with clipping and arbitrary rotate/zoom; */
/* pixels apply priority/priority_mask to the priority bitmap */
-void tilemap_draw_roz_primask(bitmap_t *dest, const rectangle &cliprect, tilemap_t *tmap,
+void tilemap_draw_roz_primask(bitmap_t &dest, const rectangle &cliprect, tilemap_t *tmap,
UINT32 startx, UINT32 starty, int incxx, int incxy, int incyx, int incyy,
int wraparound, UINT32 flags, UINT8 priority, UINT8 priority_mask);
@@ -537,7 +537,7 @@ int tilemap_count(running_machine &machine);
void tilemap_size_by_index(running_machine &machine, int number, UINT32 *width, UINT32 *height);
/* render an indexed tilemap with fixed characteristics (no priority) */
-void tilemap_draw_by_index(running_machine &machine, bitmap_t *dest, int number, UINT32 scrollx, UINT32 scrolly);
+void tilemap_draw_by_index(running_machine &machine, bitmap_t &dest, int number, UINT32 scrollx, UINT32 scrolly);
@@ -595,7 +595,7 @@ INLINE void tilemap_map_pen_to_layer(tilemap_t *tmap, int group, pen_t pen, UINT
tilemap_draw_primask
-------------------------------------------------*/
-INLINE void tilemap_draw(bitmap_t *dest, const rectangle &cliprect, tilemap_t *tmap, UINT32 flags, UINT8 priority)
+INLINE void tilemap_draw(bitmap_t &dest, const rectangle &cliprect, tilemap_t *tmap, UINT32 flags, UINT8 priority)
{
tilemap_draw_primask(dest, cliprect, tmap, flags, priority, 0xff);
}
@@ -606,7 +606,7 @@ INLINE void tilemap_draw(bitmap_t *dest, const rectangle &cliprect, tilemap_t *t
tilemap_draw_roz_primask
-------------------------------------------------*/
-INLINE void tilemap_draw_roz(bitmap_t *dest, const rectangle &cliprect, tilemap_t *tmap,
+INLINE void tilemap_draw_roz(bitmap_t &dest, const rectangle &cliprect, tilemap_t *tmap,
UINT32 startx, UINT32 starty, int incxx, int incxy, int incyx, int incyy,
int wraparound, UINT32 flags, UINT8 priority)
{
diff --git a/src/emu/uigfx.c b/src/emu/uigfx.c
index b4796bd4cea..e69e8193a1c 100644
--- a/src/emu/uigfx.c
+++ b/src/emu/uigfx.c
@@ -84,7 +84,7 @@ static void palette_handler(running_machine &machine, render_container *containe
/* graphics set handling */
static void gfxset_handle_keys(running_machine &machine, ui_gfx_state *state, int xcells, int ycells);
-static void gfxset_draw_item(running_machine &machine, const gfx_element *gfx, int index, bitmap_t *bitmap, int dstx, int dsty, int color, int rotate);
+static void gfxset_draw_item(running_machine &machine, const gfx_element *gfx, int index, bitmap_t &bitmap, int dstx, int dsty, int color, int rotate);
static void gfxset_update_bitmap(running_machine &machine, ui_gfx_state *state, int xcells, int ycells, gfx_element *gfx);
static void gfxset_handler(running_machine &machine, render_container *container, ui_gfx_state *state);
@@ -736,7 +736,7 @@ static void gfxset_update_bitmap(running_machine &machine, ui_gfx_state *state,
/* only render if there is data */
if (index < gfx->total_elements)
- gfxset_draw_item(machine, gfx, index, state->bitmap, cellbounds.min_x, cellbounds.min_y, state->gfxset.color[set], state->gfxset.rotate[set]);
+ gfxset_draw_item(machine, gfx, index, *state->bitmap, cellbounds.min_x, cellbounds.min_y, state->gfxset.color[set], state->gfxset.rotate[set]);
/* otherwise, fill with transparency */
else
@@ -761,7 +761,7 @@ static void gfxset_update_bitmap(running_machine &machine, ui_gfx_state *state,
the view
-------------------------------------------------*/
-static void gfxset_draw_item(running_machine &machine, const gfx_element *gfx, int index, bitmap_t *bitmap, int dstx, int dsty, int color, int rotate)
+static void gfxset_draw_item(running_machine &machine, const gfx_element *gfx, int index, bitmap_t &bitmap, int dstx, int dsty, int color, int rotate)
{
static const pen_t default_palette[] =
{
@@ -785,7 +785,7 @@ static void gfxset_draw_item(running_machine &machine, const gfx_element *gfx, i
/* loop over rows in the cell */
for (y = 0; y < height; y++)
{
- UINT32 *dest = &bitmap->pix32(dsty + y, dstx);
+ UINT32 *dest = &bitmap.pix32(dsty + y, dstx);
const UINT8 *src = gfx_element_get_data(gfx, index);
/* loop over columns in the cell */
@@ -1066,7 +1066,7 @@ static void tilemap_update_bitmap(running_machine &machine, ui_gfx_state *state,
/* handle the redraw */
if (state->bitmap_dirty)
{
- tilemap_draw_by_index(machine, state->bitmap, state->tilemap.which, state->tilemap.xoffs, state->tilemap.yoffs);
+ tilemap_draw_by_index(machine, *state->bitmap, state->tilemap.which, state->tilemap.xoffs, state->tilemap.yoffs);
/* reset the texture to force an update */
state->texture->set_bitmap(state->bitmap, NULL, screen_texformat, palette);
diff --git a/src/emu/video.c b/src/emu/video.c
index 91b94d31143..94156a71c7f 100644
--- a/src/emu/video.c
+++ b/src/emu/video.c
@@ -345,7 +345,7 @@ void video_manager::save_snapshot(screen_device *screen, emu_file &file)
// now do the actual work
const rgb_t *palette = (machine().palette != NULL) ? palette_entry_list_adjusted(machine().palette) : NULL;
- png_error error = png_write_bitmap(file, &pnginfo, m_snap_bitmap, machine().total_colors(), palette);
+ png_error error = png_write_bitmap(file, &pnginfo, *m_snap_bitmap, machine().total_colors(), palette);
if (error != PNGERR_NONE)
mame_printf_error("Error generating PNG for snapshot: png_error = %d\n", error);
@@ -465,7 +465,7 @@ void video_manager::begin_recording(const char *name, movie_format format)
{
// start the capture
int rate = (machine().primary_screen != NULL) ? ATTOSECONDS_TO_HZ(machine().primary_screen->frame_period().attoseconds) : screen_device::DEFAULT_FRAME_RATE;
- png_error pngerr = mng_capture_start(*m_mngfile, m_snap_bitmap, rate);
+ png_error pngerr = mng_capture_start(*m_mngfile, *m_snap_bitmap, rate);
if (pngerr != PNGERR_NONE)
return end_recording();
@@ -1244,7 +1244,7 @@ void video_manager::record_frame()
if (m_avifile != NULL)
{
// write the next frame
- avi_error avierr = avi_append_video_frame_rgb32(m_avifile, m_snap_bitmap);
+ avi_error avierr = avi_append_video_frame_rgb32(m_avifile, *m_snap_bitmap);
if (avierr != AVIERR_NONE)
{
g_profiler.stop();
@@ -1267,7 +1267,7 @@ void video_manager::record_frame()
// write the next frame
const rgb_t *palette = (machine().palette != NULL) ? palette_entry_list_adjusted(machine().palette) : NULL;
- png_error error = mng_capture_frame(*m_mngfile, &pnginfo, m_snap_bitmap, machine().total_colors(), palette);
+ png_error error = mng_capture_frame(*m_mngfile, &pnginfo, *m_snap_bitmap, machine().total_colors(), palette);
png_free(&pnginfo);
if (error != PNGERR_NONE)
{
@@ -1291,21 +1291,21 @@ void video_manager::record_frame()
invalid palette index
-------------------------------------------------*/
-void video_assert_out_of_range_pixels(running_machine &machine, bitmap_t *bitmap)
+void video_assert_out_of_range_pixels(running_machine &machine, bitmap_t &bitmap)
{
#ifdef MAME_DEBUG
int maxindex = palette_get_max_index(machine.palette);
int x, y;
// this only applies to indexed16 bitmaps
- if (bitmap->format() != BITMAP_FORMAT_INDEXED16)
+ if (bitmap.format() != BITMAP_FORMAT_INDEXED16)
return;
// iterate over rows
- for (y = 0; y < bitmap->height(); y++)
+ for (y = 0; y < bitmap.height(); y++)
{
- UINT16 *rowbase = &bitmap->pix16(y);
- for (x = 0; x < bitmap->width(); x++)
+ UINT16 *rowbase = &bitmap.pix16(y);
+ for (x = 0; x < bitmap.width(); x++)
assert(rowbase[x] < maxindex);
}
#endif
diff --git a/src/emu/video.h b/src/emu/video.h
index 5a4858f5251..c61cf286e88 100644
--- a/src/emu/video.h
+++ b/src/emu/video.h
@@ -204,7 +204,7 @@ private:
// ----- debugging helpers -----
// assert if any pixels in the given bitmap contain an invalid palette index
-void video_assert_out_of_range_pixels(running_machine &machine, bitmap_t *bitmap);
+void video_assert_out_of_range_pixels(running_machine &machine, bitmap_t &bitmap);
#endif /* __VIDEO_H__ */
diff --git a/src/emu/video/315_5124.c b/src/emu/video/315_5124.c
index ece99efa4a3..75a0001472a 100644
--- a/src/emu/video/315_5124.c
+++ b/src/emu/video/315_5124.c
@@ -1580,9 +1580,9 @@ void sega315_5378_device::update_palette()
}
-void sega315_5124_device::update_video( bitmap_t *bitmap, const rectangle &cliprect )
+void sega315_5124_device::update_video( bitmap_t &bitmap, const rectangle &cliprect )
{
- copybitmap(bitmap, m_tmpbitmap, 0, 0, 0, 0, cliprect);
+ copybitmap(bitmap, *m_tmpbitmap, 0, 0, 0, 0, cliprect);
}
diff --git a/src/emu/video/315_5124.h b/src/emu/video/315_5124.h
index 168c667dfa7..16e2ed93c15 100644
--- a/src/emu/video/315_5124.h
+++ b/src/emu/video/315_5124.h
@@ -82,7 +82,7 @@ public:
bitmap_t *get_y1_bitmap() { return m_y1_bitmap; };
/* update the screen */
- void update_video( bitmap_t *bitmap, const rectangle &cliprect );
+ void update_video( bitmap_t &bitmap, const rectangle &cliprect );
virtual void set_sega315_5124_compatibility_mode( bool sega315_5124_compatibility_mode ) { };
diff --git a/src/emu/video/cdp1861.c b/src/emu/video/cdp1861.c
index a2561dd3735..2afae40232c 100644
--- a/src/emu/video/cdp1861.c
+++ b/src/emu/video/cdp1861.c
@@ -251,14 +251,14 @@ WRITE_LINE_MEMBER( cdp1861_device::disp_off_w )
// update_screen -
//-------------------------------------------------
-void cdp1861_device::update_screen(bitmap_t *bitmap, const rectangle &cliprect)
+void cdp1861_device::update_screen(bitmap_t &bitmap, const rectangle &cliprect)
{
if (m_disp)
{
- copybitmap(bitmap, m_bitmap, 0, 0, 0, 0, cliprect);
+ copybitmap(bitmap, *m_bitmap, 0, 0, 0, 0, cliprect);
}
else
{
- bitmap->fill(get_black_pen(machine()), cliprect);
+ bitmap.fill(get_black_pen(machine()), cliprect);
}
}
diff --git a/src/emu/video/cdp1861.h b/src/emu/video/cdp1861.h
index 6e61ae61d2d..11fd81a5da6 100644
--- a/src/emu/video/cdp1861.h
+++ b/src/emu/video/cdp1861.h
@@ -113,7 +113,7 @@ public:
DECLARE_WRITE_LINE_MEMBER( disp_on_w );
DECLARE_WRITE_LINE_MEMBER( disp_off_w );
- void update_screen(bitmap_t *bitmap, const rectangle &cliprect);
+ void update_screen(bitmap_t &bitmap, const rectangle &cliprect);
protected:
// device-level overrides
diff --git a/src/emu/video/cdp1862.c b/src/emu/video/cdp1862.c
index 7259316b905..0751264977d 100644
--- a/src/emu/video/cdp1862.c
+++ b/src/emu/video/cdp1862.c
@@ -213,8 +213,8 @@ WRITE_LINE_MEMBER( cdp1862_device::con_w )
// update_screen -
//-------------------------------------------------
-void cdp1862_device::update_screen(bitmap_t *bitmap, const rectangle &cliprect)
+void cdp1862_device::update_screen(bitmap_t &bitmap, const rectangle &cliprect)
{
- copybitmap(bitmap, m_bitmap, 0, 0, 0, 0, cliprect);
+ copybitmap(bitmap, *m_bitmap, 0, 0, 0, 0, cliprect);
m_bitmap->fill(CDP1862_BACKGROUND_COLOR_SEQUENCE[m_bgcolor] + 8, cliprect);
}
diff --git a/src/emu/video/cdp1862.h b/src/emu/video/cdp1862.h
index ecae2ddb23f..56ba3c5f74c 100644
--- a/src/emu/video/cdp1862.h
+++ b/src/emu/video/cdp1862.h
@@ -94,7 +94,7 @@ public:
DECLARE_WRITE_LINE_MEMBER( bkg_w );
DECLARE_WRITE_LINE_MEMBER( con_w );
- void update_screen(bitmap_t *bitmap, const rectangle &cliprect);
+ void update_screen(bitmap_t &bitmap, const rectangle &cliprect);
protected:
// device-level overrides
diff --git a/src/emu/video/crt9021.c b/src/emu/video/crt9021.c
index 3ef2a843084..520b90f12eb 100644
--- a/src/emu/video/crt9021.c
+++ b/src/emu/video/crt9021.c
@@ -222,6 +222,6 @@ WRITE_LINE_MEMBER( crt9021_device::vsync_w )
// update_screen - update screen
//-------------------------------------------------
-void crt9021_device::update_screen(bitmap_t *bitmap, const rectangle &cliprect)
+void crt9021_device::update_screen(bitmap_t &bitmap, const rectangle &cliprect)
{
}
diff --git a/src/emu/video/crt9021.h b/src/emu/video/crt9021.h
index c7345d6573f..83c05f7d00b 100644
--- a/src/emu/video/crt9021.h
+++ b/src/emu/video/crt9021.h
@@ -88,7 +88,7 @@ public:
DECLARE_WRITE_LINE_MEMBER( retbl_w );
DECLARE_WRITE_LINE_MEMBER( vsync_w );
- void update_screen(bitmap_t *bitmap, const rectangle &cliprect);
+ void update_screen(bitmap_t &bitmap, const rectangle &cliprect);
protected:
// device-level overrides
diff --git a/src/emu/video/generic.c b/src/emu/video/generic.c
index 983dc034e11..3c8315fca19 100644
--- a/src/emu/video/generic.c
+++ b/src/emu/video/generic.c
@@ -287,7 +287,7 @@ VIDEO_START( generic_bitmapped )
SCREEN_UPDATE( generic_bitmapped )
{
- copybitmap(bitmap, screen.machine().generic.tmpbitmap, 0, 0, 0, 0, cliprect);
+ copybitmap(bitmap, *screen.machine().generic.tmpbitmap, 0, 0, 0, 0, cliprect);
return 0;
}
diff --git a/src/emu/video/h63484.c b/src/emu/video/h63484.c
index ebbf0be4a79..500fca65c33 100644
--- a/src/emu/video/h63484.c
+++ b/src/emu/video/h63484.c
@@ -1159,7 +1159,7 @@ void h63484_device::device_reset()
// draw_graphics_line -
//-------------------------------------------------
-void h63484_device::draw_graphics_line(bitmap_t *bitmap, const rectangle &cliprect, int y, int layer_n)
+void h63484_device::draw_graphics_line(bitmap_t &bitmap, const rectangle &cliprect, int y, int layer_n)
{
int x;
int pitch;
@@ -1188,7 +1188,7 @@ void h63484_device::draw_graphics_line(bitmap_t *bitmap, const rectangle &clipre
// update_screen -
//-------------------------------------------------
-void h63484_device::update_screen(bitmap_t *bitmap, const rectangle &cliprect)
+void h63484_device::update_screen(bitmap_t &bitmap, const rectangle &cliprect)
{
if(m_dcr & 0x8000) // correct?
{
diff --git a/src/emu/video/h63484.h b/src/emu/video/h63484.h
index b1e7507e819..61ca08b5529 100644
--- a/src/emu/video/h63484.h
+++ b/src/emu/video/h63484.h
@@ -26,8 +26,8 @@
#define H63484_INTERFACE(name) \
const h63484_interface (name) =
-typedef void (*h63484_display_pixels_func)(device_t *device, bitmap_t *bitmap, int y, int x, UINT16 data);
-#define H63484_DISPLAY_PIXELS(name) void name(device_t *device, bitmap_t *bitmap, int y, int x, UINT16 data)
+typedef void (*h63484_display_pixels_func)(device_t *device, bitmap_t &bitmap, int y, int x, UINT16 data);
+#define H63484_DISPLAY_PIXELS(name) void name(device_t *device, bitmap_t &bitmap, int y, int x, UINT16 data)
// ======================> h63484_interface
@@ -56,7 +56,7 @@ public:
DECLARE_READ8_MEMBER( vram_r );
DECLARE_WRITE8_MEMBER( vram_w );
- void update_screen(bitmap_t *bitmap, const rectangle &cliprect);
+ void update_screen(bitmap_t &bitmap, const rectangle &cliprect);
virtual const rom_entry *device_rom_region() const;
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const;
@@ -89,7 +89,7 @@ private:
UINT16 video_registers_r(int offset);
void video_registers_w(int offset);
int translate_command(UINT16 data);
- void draw_graphics_line(bitmap_t *bitmap, const rectangle &cliprect, int y, int layer_n);
+ void draw_graphics_line(bitmap_t &bitmap, const rectangle &cliprect, int y, int layer_n);
screen_device *m_screen;
diff --git a/src/emu/video/hd44102.c b/src/emu/video/hd44102.c
index ccf9588b11e..34570730980 100644
--- a/src/emu/video/hd44102.c
+++ b/src/emu/video/hd44102.c
@@ -271,7 +271,7 @@ WRITE_LINE_MEMBER( hd44102_device::cs2_w )
// update_screen - update screen
//-------------------------------------------------
-void hd44102_device::update_screen(bitmap_t *bitmap, const rectangle &cliprect)
+void hd44102_device::update_screen(bitmap_t &bitmap, const rectangle &cliprect)
{
for (int y = 0; y < 50; y++)
{
@@ -288,7 +288,7 @@ void hd44102_device::update_screen(bitmap_t *bitmap, const rectangle &cliprect)
{
int color = (m_status & STATUS_DISPLAY_OFF) ? 0 : BIT(data, z % 8);
- bitmap->pix16(sy, sx) = color;
+ bitmap.pix16(sy, sx) = color;
}
z++;
diff --git a/src/emu/video/hd44102.h b/src/emu/video/hd44102.h
index 5b9b45767bc..275f4176482 100644
--- a/src/emu/video/hd44102.h
+++ b/src/emu/video/hd44102.h
@@ -46,7 +46,7 @@ public:
DECLARE_WRITE_LINE_MEMBER( cs2_w );
- void update_screen(bitmap_t *bitmap, const rectangle &cliprect);
+ void update_screen(bitmap_t &bitmap, const rectangle &cliprect);
protected:
// device-level overrides
diff --git a/src/emu/video/hd61830.c b/src/emu/video/hd61830.c
index b02f848d508..a03ac52c33a 100644
--- a/src/emu/video/hd61830.c
+++ b/src/emu/video/hd61830.c
@@ -406,7 +406,7 @@ WRITE8_MEMBER( hd61830_device::data_w )
// draw_scanline - draw one graphics scanline
//-------------------------------------------------
-void hd61830_device::draw_scanline(bitmap_t *bitmap, const rectangle &cliprect, int y, UINT16 ra)
+void hd61830_device::draw_scanline(bitmap_t &bitmap, const rectangle &cliprect, int y, UINT16 ra)
{
for (int sx = 0; sx < m_hn; sx++)
{
@@ -414,7 +414,7 @@ void hd61830_device::draw_scanline(bitmap_t *bitmap, const rectangle &cliprect,
for (int x = 0; x < m_hp; x++)
{
- bitmap->pix16(y, (sx * m_hp) + x) = BIT(data, x);
+ bitmap.pix16(y, (sx * m_hp) + x) = BIT(data, x);
}
}
}
@@ -424,7 +424,7 @@ void hd61830_device::draw_scanline(bitmap_t *bitmap, const rectangle &cliprect,
// update_graphics - draw graphics mode screen
//-------------------------------------------------
-void hd61830_device::update_graphics(bitmap_t *bitmap, const rectangle &cliprect)
+void hd61830_device::update_graphics(bitmap_t &bitmap, const rectangle &cliprect)
{
for (int y = 0; y < m_nx; y++)
{
@@ -444,7 +444,7 @@ void hd61830_device::update_graphics(bitmap_t *bitmap, const rectangle &cliprect
// draw_char - draw a char
//-------------------------------------------------
-void hd61830_device::draw_char(bitmap_t *bitmap, const rectangle &cliprect, UINT16 ma, int x, int y, UINT8 md)
+void hd61830_device::draw_char(bitmap_t &bitmap, const rectangle &cliprect, UINT16 ma, int x, int y, UINT8 md)
{
for (int cl = 0; cl < m_vp; cl++)
{
@@ -505,7 +505,7 @@ void hd61830_device::draw_char(bitmap_t *bitmap, const rectangle &cliprect, UINT
}
if (sy < m_screen->height() && sx < m_screen->width())
- bitmap->pix16(sy, sx) = pixel;
+ bitmap.pix16(sy, sx) = pixel;
}
}
}
@@ -515,7 +515,7 @@ void hd61830_device::draw_char(bitmap_t *bitmap, const rectangle &cliprect, UINT
// update_text - draw text mode screen
//-------------------------------------------------
-void hd61830_device::update_text(bitmap_t *bitmap, const rectangle &cliprect)
+void hd61830_device::update_text(bitmap_t &bitmap, const rectangle &cliprect)
{
for (int y = 0; y < (m_nx / m_vp); y++)
{
@@ -534,7 +534,7 @@ void hd61830_device::update_text(bitmap_t *bitmap, const rectangle &cliprect)
// update_screen - update screen
//-------------------------------------------------
-void hd61830_device::update_screen(bitmap_t *bitmap, const rectangle &cliprect)
+void hd61830_device::update_screen(bitmap_t &bitmap, const rectangle &cliprect)
{
if (m_mcr & MODE_DISPLAY_ON)
{
@@ -549,7 +549,7 @@ void hd61830_device::update_screen(bitmap_t *bitmap, const rectangle &cliprect)
}
else
{
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
}
m_blink++;
diff --git a/src/emu/video/hd61830.h b/src/emu/video/hd61830.h
index 1b6f487d16c..80a3fa21606 100644
--- a/src/emu/video/hd61830.h
+++ b/src/emu/video/hd61830.h
@@ -68,7 +68,7 @@ public:
DECLARE_READ8_MEMBER( data_r );
DECLARE_WRITE8_MEMBER( data_w );
- void update_screen(bitmap_t *bitmap, const rectangle &cliprect);
+ void update_screen(bitmap_t &bitmap, const rectangle &cliprect);
protected:
// device-level overrides
@@ -87,10 +87,10 @@ protected:
private:
void set_busy_flag();
- void draw_scanline(bitmap_t *bitmap, const rectangle &cliprect, int y, UINT16 ra);
- void update_graphics(bitmap_t *bitmap, const rectangle &cliprect);
- void draw_char(bitmap_t *bitmap, const rectangle &cliprect, UINT16 ma, int x, int y, UINT8 md);
- void update_text(bitmap_t *bitmap, const rectangle &cliprect);
+ void draw_scanline(bitmap_t &bitmap, const rectangle &cliprect, int y, UINT16 ra);
+ void update_graphics(bitmap_t &bitmap, const rectangle &cliprect);
+ void draw_char(bitmap_t &bitmap, const rectangle &cliprect, UINT16 ma, int x, int y, UINT8 md);
+ void update_text(bitmap_t &bitmap, const rectangle &cliprect);
devcb_resolved_read8 m_in_rd_func;
diff --git a/src/emu/video/i8275.c b/src/emu/video/i8275.c
index e36884c1ffe..22a7fcb64de 100644
--- a/src/emu/video/i8275.c
+++ b/src/emu/video/i8275.c
@@ -460,7 +460,7 @@ WRITE8_DEVICE_HANDLER( i8275_dack_w )
}
/* Screen Update */
-void i8275_update(device_t *device, bitmap_t *bitmap, const rectangle &cliprect)
+void i8275_update(device_t *device, bitmap_t &bitmap, const rectangle &cliprect)
{
i8275_t *i8275 = get_safe_token(device);
i8275->ypos = 0;
@@ -474,7 +474,7 @@ void i8275_update(device_t *device, bitmap_t *bitmap, const rectangle &cliprect)
i8275->fifo_write = 0;
if ((i8275->status_reg & I8275_STATUS_VIDEO_ENABLE)==0) {
- bitmap->fill(get_black_pen(device->machine()), cliprect);
+ bitmap.fill(get_black_pen(device->machine()), cliprect);
} else {
// if value < 16 it is visible otherwise not
i8275->cursor_blink_cnt++;
diff --git a/src/emu/video/i8275.h b/src/emu/video/i8275.h
index 5afa70aaa59..848ea898d49 100644
--- a/src/emu/video/i8275.h
+++ b/src/emu/video/i8275.h
@@ -51,7 +51,7 @@ READ8_DEVICE_HANDLER ( i8275_r );
WRITE8_DEVICE_HANDLER ( i8275_w );
/* updates the screen */
-void i8275_update(device_t *device, bitmap_t *bitmap, const rectangle &cliprect);
+void i8275_update(device_t *device, bitmap_t &bitmap, const rectangle &cliprect);
WRITE8_DEVICE_HANDLER( i8275_dack_w );
diff --git a/src/emu/video/k053250.c b/src/emu/video/k053250.c
index 723704f6096..dc39793b9d4 100644
--- a/src/emu/video/k053250.c
+++ b/src/emu/video/k053250.c
@@ -58,9 +58,9 @@ void k053250_t::device_reset()
}
// utility function to render a clipped scanline vertically or horizontally
-inline void k053250_t::pdraw_scanline32(bitmap_t *bitmap, const pen_t *palette, UINT8 *source,
+inline void k053250_t::pdraw_scanline32(bitmap_t &bitmap, const pen_t *palette, UINT8 *source,
const rectangle &cliprect, int linepos, int scroll, int zoom,
- UINT32 clipmask, UINT32 wrapmask, UINT32 orientation, bitmap_t *priority, UINT8 pri)
+ UINT32 clipmask, UINT32 wrapmask, UINT32 orientation, bitmap_t &priority, UINT8 pri)
{
// a sixteen-bit fixed point resolution should be adequate to our application
#define FIXPOINT_PRECISION 16
@@ -162,16 +162,16 @@ inline void k053250_t::pdraw_scanline32(bitmap_t *bitmap, const pen_t *palette,
// calculate target increment for horizontal scanlines which is exactly one
dst_adv = 1;
dst_offset = dst_length;
- pri_base = &priority->pix8(linepos, dst_start + dst_offset);
- dst_base = &bitmap->pix32(linepos, dst_start + dst_length);
+ pri_base = &priority.pix8(linepos, dst_start + dst_offset);
+ dst_base = &bitmap.pix32(linepos, dst_start + dst_length);
}
else
{
// calculate target increment for vertical scanlines which is the bitmap's pitch value
- dst_adv = bitmap->rowpixels();
+ dst_adv = bitmap.rowpixels();
dst_offset= dst_length * dst_adv;
- pri_base = &priority->pix8(dst_start, linepos + dst_offset);
- dst_base = &bitmap->pix32(dst_start, linepos + dst_offset);
+ pri_base = &priority.pix8(dst_start, linepos + dst_offset);
+ dst_base = &bitmap.pix32(dst_start, linepos + dst_offset);
}
// generalized
@@ -221,7 +221,7 @@ inline void k053250_t::pdraw_scanline32(bitmap_t *bitmap, const pen_t *palette,
#undef FIXPOINT_PRECISION_HALF
}
-void k053250_t::draw( bitmap_t *bitmap, const rectangle &cliprect, int colorbase, int flags, int priority )
+void k053250_t::draw( bitmap_t &bitmap, const rectangle &cliprect, int colorbase, int flags, int priority )
{
UINT8 *pix_ptr;
const pen_t *pal_base, *pal_ptr;
@@ -307,7 +307,7 @@ void k053250_t::draw( bitmap_t *bitmap, const rectangle &cliprect, int colorbase
if (orientation & ORIENTATION_FLIP_Y)
{
linedata_adv = -linedata_adv; // traverse line RAM backward in Y flipped scenarioes
- linedata_offs += bitmap->height() - 1; // and get info for the first line from the bottom
+ linedata_offs += bitmap.height() - 1; // and get info for the first line from the bottom
}
dst_wrapmask = ~0; // scanlines don't seem to wrap horizontally in normal orientation
@@ -334,7 +334,7 @@ void k053250_t::draw( bitmap_t *bitmap, const rectangle &cliprect, int colorbase
if (orientation & ORIENTATION_FLIP_X)
{
linedata_adv = -linedata_adv; // traverse line RAM backward in X flipped scenarioes
- linedata_offs += bitmap->width() - 1; // and get info for the first line from the bottom
+ linedata_offs += bitmap.width() - 1; // and get info for the first line from the bottom
}
if (src_clipmask)
diff --git a/src/emu/video/k053250.h b/src/emu/video/k053250.h
index b9f85f5eb38..3070d769508 100644
--- a/src/emu/video/k053250.h
+++ b/src/emu/video/k053250.h
@@ -26,7 +26,7 @@ public:
DECLARE_WRITE16_MEMBER(ram_w);
DECLARE_READ16_MEMBER(rom_r);
- void draw( bitmap_t *bitmap, const rectangle &cliprect, int colorbase, int flags, int priority );
+ void draw( bitmap_t &bitmap, const rectangle &cliprect, int colorbase, int flags, int priority );
protected:
void device_start();
@@ -46,9 +46,9 @@ private:
void unpack_nibbles();
void dma(int limiter);
- static void pdraw_scanline32(bitmap_t *bitmap, const pen_t *palette, UINT8 *source,
+ static void pdraw_scanline32(bitmap_t &bitmap, const pen_t *palette, UINT8 *source,
const rectangle &cliprect, int linepos, int scroll, int zoom,
- UINT32 clipmask, UINT32 wrapmask, UINT32 orientation, bitmap_t *priority, UINT8 pri);
+ UINT32 clipmask, UINT32 wrapmask, UINT32 orientation, bitmap_t &priority, UINT8 pri);
};
extern const device_type K053250;
diff --git a/src/emu/video/mc6845.c b/src/emu/video/mc6845.c
index 6fb744ce6a9..1857c768820 100644
--- a/src/emu/video/mc6845.c
+++ b/src/emu/video/mc6845.c
@@ -688,9 +688,9 @@ void mc6845_device::update_cursor_state()
}
-void mc6845_device::update(bitmap_t *bitmap, const rectangle &cliprect)
+void mc6845_device::update(bitmap_t &bitmap, const rectangle &cliprect)
{
- assert(bitmap != NULL);
+ assert(bitmap.valid());
if (m_has_valid_parameters)
{
diff --git a/src/emu/video/mc6845.h b/src/emu/video/mc6845.h
index abfd7054d3e..ff6afa1b00e 100644
--- a/src/emu/video/mc6845.h
+++ b/src/emu/video/mc6845.h
@@ -25,22 +25,22 @@
class mc6845_device;
/* callback definitions */
-typedef void * (*mc6845_begin_update_func)(mc6845_device *device, bitmap_t *bitmap, const rectangle &cliprect);
-#define MC6845_BEGIN_UPDATE(name) void *name(mc6845_device *device, bitmap_t *bitmap, const rectangle &cliprect)
+typedef void * (*mc6845_begin_update_func)(mc6845_device *device, bitmap_t &bitmap, const rectangle &cliprect);
+#define MC6845_BEGIN_UPDATE(name) void *name(mc6845_device *device, bitmap_t &bitmap, const rectangle &cliprect)
-typedef void (*mc6845_update_row_func)(mc6845_device *device, bitmap_t *bitmap,
+typedef void (*mc6845_update_row_func)(mc6845_device *device, bitmap_t &bitmap,
const rectangle &cliprect, UINT16 ma, UINT8 ra,
UINT16 y, UINT8 x_count, INT8 cursor_x, void *param);
-#define MC6845_UPDATE_ROW(name) void name(mc6845_device *device, bitmap_t *bitmap, \
+#define MC6845_UPDATE_ROW(name) void name(mc6845_device *device, bitmap_t &bitmap, \
const rectangle &cliprect, UINT16 ma, UINT8 ra, \
UINT16 y, UINT8 x_count, INT8 cursor_x, void *param)
-typedef void (*mc6845_end_update_func)(mc6845_device *device, bitmap_t *bitmap, const rectangle &cliprect, void *param);
-#define MC6845_END_UPDATE(name) void name(mc6845_device *device, bitmap_t *bitmap, const rectangle &cliprect, void *param)
+typedef void (*mc6845_end_update_func)(mc6845_device *device, bitmap_t &bitmap, const rectangle &cliprect, void *param);
+#define MC6845_END_UPDATE(name) void name(mc6845_device *device, bitmap_t &bitmap, const rectangle &cliprect, void *param)
typedef void (*mc6845_on_update_addr_changed_func)(mc6845_device *device, int address, int strobe);
@@ -148,7 +148,7 @@ public:
/* updates the screen -- this will call begin_update(),
followed by update_row() reapeatedly and after all row
updating is complete, end_update() */
- void update(bitmap_t *bitmap, const rectangle &cliprect);
+ void update(bitmap_t &bitmap, const rectangle &cliprect);
protected:
// device-level overrides
diff --git a/src/emu/video/msm6255.c b/src/emu/video/msm6255.c
index d0897c85d8d..d0f60c80b0c 100644
--- a/src/emu/video/msm6255.c
+++ b/src/emu/video/msm6255.c
@@ -317,7 +317,7 @@ void msm6255_device::update_cursor()
// draw_scanline -
//-------------------------------------------------
-void msm6255_device::draw_scanline(bitmap_t *bitmap, const rectangle &cliprect, int y, UINT16 ma, UINT8 ra)
+void msm6255_device::draw_scanline(bitmap_t &bitmap, const rectangle &cliprect, int y, UINT16 ma, UINT8 ra)
{
UINT8 hp = (m_pr & PR_HP_MASK) + 1;
UINT8 hn = (m_hnr & HNR_HN_MASK) + 1;
@@ -344,7 +344,7 @@ void msm6255_device::draw_scanline(bitmap_t *bitmap, const rectangle &cliprect,
for (x = 0; x < hp; x++)
{
- bitmap->pix16(y, (sx * hp) + x) = BIT(data, 7);
+ bitmap.pix16(y, (sx * hp) + x) = BIT(data, 7);
data <<= 1;
}
@@ -358,7 +358,7 @@ void msm6255_device::draw_scanline(bitmap_t *bitmap, const rectangle &cliprect,
// update_graphics -
//-------------------------------------------------
-void msm6255_device::update_graphics(bitmap_t *bitmap, const rectangle &cliprect)
+void msm6255_device::update_graphics(bitmap_t &bitmap, const rectangle &cliprect)
{
UINT8 hn = (m_hnr & HNR_HN_MASK) + 1;
UINT8 nx = (m_dvr & DVR_DN_MASK) + 1;
@@ -386,7 +386,7 @@ void msm6255_device::update_graphics(bitmap_t *bitmap, const rectangle &cliprect
// update_text -
//-------------------------------------------------
-void msm6255_device::update_text(bitmap_t *bitmap, const rectangle &cliprect)
+void msm6255_device::update_text(bitmap_t &bitmap, const rectangle &cliprect)
{
UINT8 hn = (m_hnr & HNR_HN_MASK) + 1;
UINT8 vp = (m_pr & PR_VP_MASK) + 1;
@@ -417,7 +417,7 @@ void msm6255_device::update_text(bitmap_t *bitmap, const rectangle &cliprect)
// update_screen - update screen
//-------------------------------------------------
-void msm6255_device::update_screen(bitmap_t *bitmap, const rectangle &cliprect)
+void msm6255_device::update_screen(bitmap_t &bitmap, const rectangle &cliprect)
{
if (m_mor & MOR_DISPLAY_ON)
{
@@ -432,6 +432,6 @@ void msm6255_device::update_screen(bitmap_t *bitmap, const rectangle &cliprect)
}
else
{
- bitmap->fill(get_black_pen(machine()), cliprect);
+ bitmap.fill(get_black_pen(machine()), cliprect);
}
}
diff --git a/src/emu/video/msm6255.h b/src/emu/video/msm6255.h
index f5fbd77e3fb..af8b595f512 100644
--- a/src/emu/video/msm6255.h
+++ b/src/emu/video/msm6255.h
@@ -68,7 +68,7 @@ public:
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );
- void update_screen(bitmap_t *bitmap, const rectangle &cliprect);
+ void update_screen(bitmap_t &bitmap, const rectangle &cliprect);
protected:
// device-level overrides
@@ -79,9 +79,9 @@ protected:
private:
inline UINT8 read_video_data(UINT16 ma, UINT8 ra);
void update_cursor();
- void draw_scanline(bitmap_t *bitmap, const rectangle &cliprect, int y, UINT16 ma, UINT8 ra);
- void update_graphics(bitmap_t *bitmap, const rectangle &cliprect);
- void update_text(bitmap_t *bitmap, const rectangle &cliprect);
+ void draw_scanline(bitmap_t &bitmap, const rectangle &cliprect, int y, UINT16 ma, UINT8 ra);
+ void update_graphics(bitmap_t &bitmap, const rectangle &cliprect);
+ void update_text(bitmap_t &bitmap, const rectangle &cliprect);
screen_device *m_screen;
diff --git a/src/emu/video/pc_cga.c b/src/emu/video/pc_cga.c
index 9bf144fdcf3..e0b98d3bfec 100644
--- a/src/emu/video/pc_cga.c
+++ b/src/emu/video/pc_cga.c
@@ -445,7 +445,7 @@ VIDEO_START( pc_cga_superimpose )
static MC6845_UPDATE_ROW( cga_text_inten_update_row )
{
UINT8 *videoram = cga.videoram;
- UINT16 *p = &bitmap->pix16(y);
+ UINT16 *p = &bitmap.pix16(y);
int i;
running_machine &machine = device->machine();
@@ -484,7 +484,7 @@ static MC6845_UPDATE_ROW( cga_text_inten_update_row )
static MC6845_UPDATE_ROW( cga_text_inten_comp_grey_update_row )
{
UINT8 *videoram = cga.videoram;
- UINT16 *p = &bitmap->pix16(y);
+ UINT16 *p = &bitmap.pix16(y);
int i;
running_machine &machine = device->machine();
@@ -522,7 +522,7 @@ static MC6845_UPDATE_ROW( cga_text_inten_comp_grey_update_row )
static MC6845_UPDATE_ROW( cga_text_inten_alt_update_row )
{
UINT8 *videoram = cga.videoram;
- UINT16 *p = &bitmap->pix16(y);
+ UINT16 *p = &bitmap.pix16(y);
int i;
running_machine &machine = device->machine();
@@ -560,7 +560,7 @@ static MC6845_UPDATE_ROW( cga_text_inten_alt_update_row )
static MC6845_UPDATE_ROW( cga_text_blink_update_row )
{
UINT8 *videoram = cga.videoram;
- UINT16 *p = &bitmap->pix16(y);
+ UINT16 *p = &bitmap.pix16(y);
int i;
running_machine &machine = device->machine();
@@ -603,7 +603,7 @@ static MC6845_UPDATE_ROW( cga_text_blink_update_row )
static MC6845_UPDATE_ROW( cga_text_blink_update_row_si )
{
UINT8 *videoram = cga.videoram;
- UINT16 *p = &bitmap->pix16(y);
+ UINT16 *p = &bitmap.pix16(y);
int i;
running_machine &machine = device->machine();
@@ -654,7 +654,7 @@ static MC6845_UPDATE_ROW( cga_text_blink_update_row_si )
static MC6845_UPDATE_ROW( cga_text_blink_alt_update_row )
{
UINT8 *videoram = cga.videoram;
- UINT16 *p = &bitmap->pix16(y);
+ UINT16 *p = &bitmap.pix16(y);
int i;
running_machine &machine = device->machine();
@@ -701,7 +701,7 @@ static MC6845_UPDATE_ROW( cga_text_blink_alt_update_row )
static MC6845_UPDATE_ROW( cga_gfx_4bppl_update_row )
{
UINT8 *videoram = cga.videoram;
- UINT16 *p = &bitmap->pix16(y);
+ UINT16 *p = &bitmap.pix16(y);
int i;
running_machine &machine = device->machine();
@@ -758,7 +758,7 @@ static const UINT8 yc_lut[16][8] =
static MC6845_UPDATE_ROW( cga_gfx_4bpph_update_row )
{
UINT8 *videoram = cga.videoram;
- UINT16 *p = &bitmap->pix16(y);
+ UINT16 *p = &bitmap.pix16(y);
int i;
running_machine &machine = device->machine();
@@ -801,7 +801,7 @@ static MC6845_UPDATE_ROW( cga_gfx_4bpph_update_row )
static MC6845_UPDATE_ROW( cga_gfx_2bpp_update_row )
{
UINT8 *videoram = cga.videoram;
- UINT16 *p = &bitmap->pix16(y);
+ UINT16 *p = &bitmap.pix16(y);
int i;
running_machine &machine = device->machine();
@@ -836,7 +836,7 @@ static MC6845_UPDATE_ROW( cga_gfx_2bpp_update_row )
static MC6845_UPDATE_ROW( cga_gfx_1bpp_update_row )
{
UINT8 *videoram = cga.videoram;
- UINT16 *p = &bitmap->pix16(y);
+ UINT16 *p = &bitmap.pix16(y);
UINT8 fg = cga.color_select & 0x0F;
int i;
running_machine &machine = device->machine();
@@ -1218,7 +1218,7 @@ static WRITE32_HANDLER( pc_cga32le_w ) { write32le_with_write8_handler(pc_cga8_w
// proc = cga_pgfx_4bpp;
//
-//INLINE void pgfx_plot_unit_4bpp(bitmap_t *bitmap,
+//INLINE void pgfx_plot_unit_4bpp(bitmap_t &bitmap,
// int x, int y, int offs)
//{
// int color, values[2];
@@ -1239,7 +1239,7 @@ static WRITE32_HANDLER( pc_cga32le_w ) { write32le_with_write8_handler(pc_cga8_w
// color = ((values[0] & 0x3) << 1) |
// ((values[1] & 2) >> 1) |
// ((values[1] & 1) << 3);
-// bitmap->pix16(y, x+i) = Machine->pens[color];
+// bitmap.pix16(y, x+i) = Machine->pens[color];
// values[0]>>=2;
// values[1]>>=2;
// }
@@ -1253,7 +1253,7 @@ static WRITE32_HANDLER( pc_cga32le_w ) { write32le_with_write8_handler(pc_cga8_w
// Second plane at CGA_base + 0x4000 / 0x6000
//***************************************************************************/
//
-//static void cga_pgfx_4bpp(bitmap_t *bitmap, struct mscrtc6845 *crtc)
+//static void cga_pgfx_4bpp(bitmap_t &bitmap, struct mscrtc6845 *crtc)
//{
// int i, sx, sy, sh;
// int offs = mscrtc6845_get_start(crtc)*2;
@@ -1286,7 +1286,7 @@ static WRITE32_HANDLER( pc_cga32le_w ) { write32le_with_write8_handler(pc_cga8_w
//
//
//
-//INLINE void pgfx_plot_unit_2bpp(bitmap_t *bitmap,
+//INLINE void pgfx_plot_unit_2bpp(bitmap_t &bitmap,
// int x, int y, const UINT16 *palette, int offs)
//{
// int i;
@@ -1314,7 +1314,7 @@ static WRITE32_HANDLER( pc_cga32le_w ) { write32le_with_write8_handler(pc_cga8_w
// values[1] = values[1] << 1;
// }
//
-// dest = &bitmap->pix16(y, x);
+// dest = &bitmap.pix16(y, x);
// *(dest++) = palette[(bmap[0] >> 6) & 0x03];
// *(dest++) = palette[(bmap[0] >> 4) & 0x03];
// *(dest++) = palette[(bmap[0] >> 2) & 0x03];
@@ -1333,7 +1333,7 @@ static WRITE32_HANDLER( pc_cga32le_w ) { write32le_with_write8_handler(pc_cga8_w
// cga fetches 2 byte per mscrtc6845 access (not modeled here)!
//***************************************************************************/
//
-//static void cga_pgfx_2bpp(bitmap_t *bitmap, struct mscrtc6845 *crtc)
+//static void cga_pgfx_2bpp(bitmap_t &bitmap, struct mscrtc6845 *crtc)
//{
// int i, sx, sy, sh;
// int offs = mscrtc6845_get_start(crtc)*2;
@@ -1417,7 +1417,7 @@ static struct
static MC6845_UPDATE_ROW( pc1512_gfx_4bpp_update_row )
{
UINT8 *videoram = cga.videoram;
- UINT16 *p = &bitmap->pix16(y);
+ UINT16 *p = &bitmap.pix16(y);
UINT16 offset_base = ra << 13;
int j;
running_machine &machine = device->machine();
diff --git a/src/emu/video/pc_vga.c b/src/emu/video/pc_vga.c
index f8b028e7736..de80f7c97a6 100644
--- a/src/emu/video/pc_vga.c
+++ b/src/emu/video/pc_vga.c
@@ -103,7 +103,7 @@ SCREEN_UPDATE( pc_video )
if ((pc_current_width > 100) && (pc_current_height > 100))
screen.set_visible_area(0, pc_current_width-1, 0, pc_current_height-1);
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
}
video_update(bitmap);
@@ -991,7 +991,7 @@ static VIDEO_RESET( vga )
pc_vga_reset(machine);
}
-static void vga_vh_text(bitmap_t *bitmap)
+static void vga_vh_text(bitmap_t &bitmap)
{
UINT8 ch, attr;
UINT8 bits;
@@ -1019,9 +1019,9 @@ static void vga_vh_text(bitmap_t *bitmap)
attr = vga.memory[(pos<<2) + 1];
font = vga.memory+2+(ch<<(5+2))+FONT1;
- for (h = MAX(-line, 0); (h < height) && (line+h < MIN(TEXT_LINES, bitmap->height())); h++)
+ for (h = MAX(-line, 0); (h < height) && (line+h < MIN(TEXT_LINES, bitmap.height())); h++)
{
- bitmapline = &bitmap->pix16(line+h);
+ bitmapline = &bitmap.pix16(line+h);
bits = font[h<<2];
assert(bitmapline);
@@ -1051,14 +1051,14 @@ static void vga_vh_text(bitmap_t *bitmap)
(h<=CRTC_CURSOR_BOTTOM)&&(h<height)&&(line+h<TEXT_LINES);
h++)
{
- bitmap->plot_box(column*width, line+h, width, 1, vga.pens[attr&0xf]);
+ bitmap.plot_box(column*width, line+h, width, 1, vga.pens[attr&0xf]);
}
}
}
}
}
-static void vga_vh_ega(bitmap_t *bitmap)
+static void vga_vh_ega(bitmap_t &bitmap)
{
int pos, line, column, c, addr, i;
int height = CRTC_CHAR_HEIGHT;
@@ -1069,7 +1069,7 @@ static void vga_vh_ega(bitmap_t *bitmap)
for (addr=EGA_START_ADDRESS, pos=0, line=0; line<LINES;
line += height, addr=(addr+EGA_LINE_LENGTH)&0x3ffff)
{
- bitmapline = &bitmap->pix16(line);
+ bitmapline = &bitmap.pix16(line);
for (pos=addr, c=0, column=0; column<EGA_COLUMNS; column++, c+=8, pos=(pos+4)&0x3ffff)
{
@@ -1097,13 +1097,13 @@ static void vga_vh_ega(bitmap_t *bitmap)
if (line + i >= LINES)
break;
- newbitmapline = &bitmap->pix16(line+i);
+ newbitmapline = &bitmap.pix16(line+i);
memcpy(newbitmapline, bitmapline, EGA_COLUMNS * 8 * sizeof(UINT16));
}
}
}
-static void vga_vh_vga(bitmap_t *bitmap)
+static void vga_vh_vga(bitmap_t &bitmap)
{
int pos, line, column, c, addr, curr_addr;
UINT16 *bitmapline;
@@ -1117,7 +1117,7 @@ static void vga_vh_vga(bitmap_t *bitmap)
curr_addr = addr;
if(line == (vga.line_compare & 0x3ff))
curr_addr = 0;
- bitmapline = &bitmap->pix16(line);
+ bitmapline = &bitmap.pix16(line);
addr %= vga.svga_intf.vram_size;
for (pos=curr_addr, c=0, column=0; column<VGA_COLUMNS; column++, c+=8, pos+=0x20)
{
@@ -1142,7 +1142,7 @@ static void vga_vh_vga(bitmap_t *bitmap)
curr_addr = addr;
if(line == (vga.line_compare & 0x3ff))
curr_addr = 0;
- bitmapline = &bitmap->pix16(line);
+ bitmapline = &bitmap.pix16(line);
addr %= vga.svga_intf.vram_size;
for (pos=curr_addr, c=0, column=0; column<VGA_COLUMNS; column++, c+=8, pos+=0x08)
{
diff --git a/src/emu/video/pc_vga.h b/src/emu/video/pc_vga.h
index 0d1c13875b2..54b50a3bb67 100644
--- a/src/emu/video/pc_vga.h
+++ b/src/emu/video/pc_vga.h
@@ -9,7 +9,7 @@
#ifndef PC_VGA_H
#define PC_VGA_H
-typedef void (*pc_video_update_proc)(bitmap_t *bitmap);
+typedef void (*pc_video_update_proc)(bitmap_t &bitmap);
MACHINE_CONFIG_EXTERN( pcvideo_vga );
diff --git a/src/emu/video/psx.c b/src/emu/video/psx.c
index 30488d98364..32eae98d596 100644
--- a/src/emu/video/psx.c
+++ b/src/emu/video/psx.c
@@ -317,17 +317,17 @@ void psxgpu_device::DebugCheckKeys( void )
#endif
}
-int psxgpu_device::DebugMeshDisplay( bitmap_t *bitmap, const rectangle &cliprect )
+int psxgpu_device::DebugMeshDisplay( bitmap_t &bitmap, const rectangle &cliprect )
{
if( m_debug.mesh )
{
- copybitmap( bitmap, m_debug.mesh, 0, 0, 0, 0, cliprect );
+ copybitmap( bitmap, *m_debug.mesh, 0, 0, 0, 0, cliprect );
}
m_debug.b_clear = 1;
return m_debug.b_mesh;
}
-int psxgpu_device::DebugTextureDisplay( bitmap_t *bitmap )
+int psxgpu_device::DebugTextureDisplay( bitmap_t &bitmap )
{
UINT32 n_y;
@@ -600,7 +600,7 @@ void psxgpu_device::psx_gpu_init( int n_gputype )
machine().save().register_postload( save_prepost_delegate( FUNC( psxgpu_device::updatevisiblearea ), this ) );
}
-void psxgpu_device::update_screen(bitmap_t *bitmap, const rectangle &cliprect)
+void psxgpu_device::update_screen(bitmap_t &bitmap, const rectangle &cliprect)
{
UINT32 n_x;
UINT32 n_y;
@@ -628,7 +628,7 @@ void psxgpu_device::update_screen(bitmap_t *bitmap, const rectangle &cliprect)
if( ( n_gpustatus & ( 1 << 0x17 ) ) != 0 )
{
/* todo: only draw to necessary area */
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
}
else
{
@@ -710,7 +710,7 @@ void psxgpu_device::update_screen(bitmap_t *bitmap, const rectangle &cliprect)
while( n_line > 0 )
{
UINT16 *p_n_src = p_p_vram[ n_y + n_displaystarty ] + ((n_x + n_displaystartx) * 3);
- UINT16 *p_n_dest = &bitmap->pix16(n_y + n_top, n_x + n_left);
+ UINT16 *p_n_dest = &bitmap.pix16(n_y + n_top, n_x + n_left);
n_column = n_columns;
while( n_column > 0 )
diff --git a/src/emu/video/psx.h b/src/emu/video/psx.h
index 760f0cc1691..000cbb45f91 100644
--- a/src/emu/video/psx.h
+++ b/src/emu/video/psx.h
@@ -181,7 +181,7 @@ public:
psxgpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock);
virtual machine_config_constructor device_mconfig_additions() const;
- void update_screen(bitmap_t *bitmap, const rectangle &cliprect);
+ void update_screen(bitmap_t &bitmap, const rectangle &cliprect);
WRITE32_MEMBER( write );
READ32_MEMBER( read );
void dma_read( UINT32 n_address, INT32 n_size );
@@ -221,8 +221,8 @@ protected:
void DebugMesh( int n_coordx, int n_coordy );
void DebugMeshEnd( void );
void DebugCheckKeys( void );
- int DebugMeshDisplay( bitmap_t *bitmap, const rectangle &cliprect );
- int DebugTextureDisplay( bitmap_t *bitmap );
+ int DebugMeshDisplay( bitmap_t &bitmap, const rectangle &cliprect );
+ int DebugTextureDisplay( bitmap_t &bitmap );
#endif
INT32 m_n_tx;
diff --git a/src/emu/video/s2636.c b/src/emu/video/s2636.c
index e49d637dd97..51664fcc6ee 100644
--- a/src/emu/video/s2636.c
+++ b/src/emu/video/s2636.c
@@ -136,7 +136,7 @@ INLINE const s2636_interface *get_interface( device_t *device )
*
*************************************/
-static void draw_sprite( UINT8 *gfx, int color, int y, int x, int expand, int or_mode, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprite( UINT8 *gfx, int color, int y, int x, int expand, int or_mode, bitmap_t &bitmap, const rectangle &cliprect )
{
int sy;
@@ -173,9 +173,9 @@ static void draw_sprite( UINT8 *gfx, int color, int y, int x, int expand, int or
continue;
if (or_mode)
- bitmap->pix16(ty, tx) = 0x08 | bitmap->pix16(ty, tx) | color;
+ bitmap.pix16(ty, tx) = 0x08 | bitmap.pix16(ty, tx) | color;
else
- bitmap->pix16(ty, tx) = 0x08 | color;
+ bitmap.pix16(ty, tx) = 0x08 | color;
}
}
}
@@ -215,7 +215,7 @@ static int check_collision( device_t *device, int spriteno1, int spriteno2, cons
int expand2 = (s2636->work_ram[0xc0] >> (spriteno2 << 1)) & 0x03;
/* draw first sprite */
- draw_sprite(attr1, 1, y1, x1, expand1, FALSE, s2636->collision_bitmap, cliprect);
+ draw_sprite(attr1, 1, y1, x1, expand1, FALSE, *s2636->collision_bitmap, cliprect);
/* get fingerprint */
for (x = x1; x < x1 + SPRITE_WIDTH; x++)
@@ -229,7 +229,7 @@ static int check_collision( device_t *device, int spriteno1, int spriteno2, cons
}
/* black out second sprite */
- draw_sprite(attr2, 0, y2, x2, expand2, FALSE, s2636->collision_bitmap, cliprect);
+ draw_sprite(attr2, 0, y2, x2, expand2, FALSE, *s2636->collision_bitmap, cliprect);
/* remove fingerprint */
for (x = x1; x < x1 + SPRITE_WIDTH; x++)
@@ -254,7 +254,7 @@ static int check_collision( device_t *device, int spriteno1, int spriteno2, cons
*
*************************************/
-bitmap_t *s2636_update( device_t *device, const rectangle &cliprect )
+bitmap_t &s2636_update( device_t *device, const rectangle &cliprect )
{
s2636_state *s2636 = get_safe_token(device);
UINT8 collision = 0;
@@ -277,7 +277,7 @@ bitmap_t *s2636_update( device_t *device, const rectangle &cliprect )
color = (s2636->work_ram[0xc1 + (spriteno >> 1)] >> ((spriteno & 1) ? 0 : 3)) & 0x07;
expand = (s2636->work_ram[0xc0] >> (spriteno << 1)) & 0x03;
- draw_sprite(attr, color, y, x, expand, TRUE, s2636->bitmap, cliprect);
+ draw_sprite(attr, color, y, x, expand, TRUE, *s2636->bitmap, cliprect);
/* bail if no shadow sprites */
if ((attr[0x0b] == 0xff) || (attr[0x0d] == 0xfe))
@@ -289,7 +289,7 @@ bitmap_t *s2636_update( device_t *device, const rectangle &cliprect )
{
y = y + SPRITE_HEIGHT + attr[0x0d];
- draw_sprite(attr, color, y, x, expand, TRUE, s2636->bitmap, cliprect);
+ draw_sprite(attr, color, y, x, expand, TRUE, *s2636->bitmap, cliprect);
}
}
@@ -303,7 +303,7 @@ bitmap_t *s2636_update( device_t *device, const rectangle &cliprect )
s2636->work_ram[0xcb] = collision;
- return s2636->bitmap;
+ return *s2636->bitmap;
}
diff --git a/src/emu/video/s2636.h b/src/emu/video/s2636.h
index 6a053403eea..c50d1caa14e 100644
--- a/src/emu/video/s2636.h
+++ b/src/emu/video/s2636.h
@@ -53,7 +53,7 @@ DECLARE_LEGACY_DEVICE(S2636, s2636);
D0-D2 of each pixel is the pixel color
D3 indicates whether the S2636 drew this pixel - 0 = not drawn, 1 = drawn */
-bitmap_t *s2636_update( device_t *device, const rectangle &cliprect );
+bitmap_t &s2636_update( device_t *device, const rectangle &cliprect );
WRITE8_DEVICE_HANDLER( s2636_work_ram_w );
READ8_DEVICE_HANDLER( s2636_work_ram_r );
diff --git a/src/emu/video/saa5050.c b/src/emu/video/saa5050.c
index 019ba696baa..bcdd19b2ff7 100644
--- a/src/emu/video/saa5050.c
+++ b/src/emu/video/saa5050.c
@@ -206,7 +206,7 @@ void saa5050_frame_advance( device_t *device )
saa5050->frame_count = 0;
}
-void saa5050_update( device_t *device, bitmap_t *bitmap, const rectangle &cliprect )
+void saa5050_update( device_t *device, bitmap_t &bitmap, const rectangle &cliprect )
{
saa5050_state *saa5050 = get_safe_token(device);
int code, colour;
diff --git a/src/emu/video/saa5050.h b/src/emu/video/saa5050.h
index e61ce035773..95672103b57 100644
--- a/src/emu/video/saa5050.h
+++ b/src/emu/video/saa5050.h
@@ -41,7 +41,7 @@ DECLARE_LEGACY_DEVICE(SAA5050, saa5050);
DEVICE I/O FUNCTIONS
***************************************************************************/
-void saa5050_update(device_t *device, bitmap_t *bitmap, const rectangle &cliprect);
+void saa5050_update(device_t *device, bitmap_t &bitmap, const rectangle &cliprect);
void saa5050_frame_advance(device_t *device);
GFXDECODE_EXTERN( saa5050 );
diff --git a/src/emu/video/sed1330.c b/src/emu/video/sed1330.c
index 7209287bc3e..33c3852ac09 100644
--- a/src/emu/video/sed1330.c
+++ b/src/emu/video/sed1330.c
@@ -582,7 +582,7 @@ WRITE8_MEMBER( sed1330_device::data_w )
// draw_text_scanline -
//-------------------------------------------------
-void sed1330_device::draw_text_scanline(bitmap_t *bitmap, const rectangle &cliprect, int y, UINT16 va)
+void sed1330_device::draw_text_scanline(bitmap_t &bitmap, const rectangle &cliprect, int y, UINT16 va)
{
int sx, x;
@@ -599,7 +599,7 @@ void sed1330_device::draw_text_scanline(bitmap_t *bitmap, const rectangle &clipr
{
for (x = 0; x < m_crx; x++)
{
- bitmap->pix16(y, (sx * m_fx) + x) = 1;
+ bitmap.pix16(y, (sx * m_fx) + x) = 1;
}
}
}
@@ -610,7 +610,7 @@ void sed1330_device::draw_text_scanline(bitmap_t *bitmap, const rectangle &clipr
{
for (x = 0; x < m_crx; x++)
{
- bitmap->pix16(y, (sx * m_fx) + x) = 1;
+ bitmap.pix16(y, (sx * m_fx) + x) = 1;
}
}
}
@@ -623,7 +623,7 @@ void sed1330_device::draw_text_scanline(bitmap_t *bitmap, const rectangle &clipr
// draw_graphics_scanline -
//-------------------------------------------------
-void sed1330_device::draw_graphics_scanline(bitmap_t *bitmap, const rectangle &cliprect, int y, UINT16 va)
+void sed1330_device::draw_graphics_scanline(bitmap_t &bitmap, const rectangle &cliprect, int y, UINT16 va)
{
int sx, x;
@@ -633,7 +633,7 @@ void sed1330_device::draw_graphics_scanline(bitmap_t *bitmap, const rectangle &c
for (x = 0; x < m_fx; x++)
{
- bitmap->pix16(y, (sx * m_fx) + x) = BIT(data, 7);
+ bitmap.pix16(y, (sx * m_fx) + x) = BIT(data, 7);
data <<= 1;
}
}
@@ -644,7 +644,7 @@ void sed1330_device::draw_graphics_scanline(bitmap_t *bitmap, const rectangle &c
// update_graphics -
//-------------------------------------------------
-void sed1330_device::update_graphics(bitmap_t *bitmap, const rectangle &cliprect)
+void sed1330_device::update_graphics(bitmap_t &bitmap, const rectangle &cliprect)
{
}
@@ -653,7 +653,7 @@ void sed1330_device::update_graphics(bitmap_t *bitmap, const rectangle &cliprect
// update_text -
//-------------------------------------------------
-void sed1330_device::update_text(bitmap_t *bitmap, const rectangle &cliprect)
+void sed1330_device::update_text(bitmap_t &bitmap, const rectangle &cliprect)
{
int y;
@@ -686,7 +686,7 @@ void sed1330_device::update_text(bitmap_t *bitmap, const rectangle &cliprect)
// update_screen -
//-------------------------------------------------
-void sed1330_device::update_screen(bitmap_t *bitmap, const rectangle &cliprect)
+void sed1330_device::update_screen(bitmap_t &bitmap, const rectangle &cliprect)
{
if (m_d)
{
diff --git a/src/emu/video/sed1330.h b/src/emu/video/sed1330.h
index f30605abf1f..638227aba45 100644
--- a/src/emu/video/sed1330.h
+++ b/src/emu/video/sed1330.h
@@ -49,7 +49,7 @@ public:
DECLARE_READ8_MEMBER( data_r );
DECLARE_WRITE8_MEMBER( data_w );
- void update_screen(bitmap_t *bitmap, const rectangle &cliprect);
+ void update_screen(bitmap_t &bitmap, const rectangle &cliprect);
protected:
// device-level overrides
@@ -64,10 +64,10 @@ protected:
inline void writebyte(offs_t address, UINT8 m_data);
inline void increment_csr();
- void draw_text_scanline(bitmap_t *bitmap, const rectangle &cliprect, int y, UINT16 va);
- void draw_graphics_scanline(bitmap_t *bitmap, const rectangle &cliprect, int y, UINT16 va);
- void update_graphics(bitmap_t *bitmap, const rectangle &cliprect);
- void update_text(bitmap_t *bitmap, const rectangle &cliprect);
+ void draw_text_scanline(bitmap_t &bitmap, const rectangle &cliprect, int y, UINT16 va);
+ void draw_graphics_scanline(bitmap_t &bitmap, const rectangle &cliprect, int y, UINT16 va);
+ void update_graphics(bitmap_t &bitmap, const rectangle &cliprect);
+ void update_text(bitmap_t &bitmap, const rectangle &cliprect);
private:
int m_bf; // busy flag
diff --git a/src/emu/video/tms9928a.c b/src/emu/video/tms9928a.c
index 74cd47ff62b..5edf0776159 100644
--- a/src/emu/video/tms9928a.c
+++ b/src/emu/video/tms9928a.c
@@ -571,9 +571,9 @@ void tms9928a_device::device_timer(emu_timer &timer, device_timer_id id, int par
}
-void tms9928a_device::update( bitmap_t *bitmap, const rectangle &cliprect )
+void tms9928a_device::update( bitmap_t &bitmap, const rectangle &cliprect )
{
- copybitmap( bitmap, m_tmpbmp, 0, 0, 0, 0, cliprect );
+ copybitmap( bitmap, *m_tmpbmp, 0, 0, 0, 0, cliprect );
}
diff --git a/src/emu/video/tms9928a.h b/src/emu/video/tms9928a.h
index 9f605394378..91f888413e9 100644
--- a/src/emu/video/tms9928a.h
+++ b/src/emu/video/tms9928a.h
@@ -104,7 +104,7 @@ public:
DECLARE_WRITE8_MEMBER( register_write );
/* update the screen */
- void update( bitmap_t *bitmap, const rectangle &cliprect );
+ void update( bitmap_t &bitmap, const rectangle &cliprect );
protected:
// device-level overrides
diff --git a/src/emu/video/upd3301.c b/src/emu/video/upd3301.c
index c6ee8c7dc33..ca8f037078b 100644
--- a/src/emu/video/upd3301.c
+++ b/src/emu/video/upd3301.c
@@ -606,7 +606,7 @@ void upd3301_device::draw_scanline()
int csr = m_cm && m_cursor_blink && ((y / m_r) == m_cy) && (sx == m_cx);
int gpa = 0; // TODO
- m_display_cb(this, m_bitmap, y, sx, cc, lc, hlgt, rvv, vsp, sl0, sl12, csr, gpa);
+ m_display_cb(this, *m_bitmap, y, sx, cc, lc, hlgt, rvv, vsp, sl0, sl12, csr, gpa);
}
}
@@ -618,12 +618,12 @@ void upd3301_device::draw_scanline()
// update_screen -
//-------------------------------------------------
-void upd3301_device::update_screen(bitmap_t *bitmap, const rectangle &cliprect)
+void upd3301_device::update_screen(bitmap_t &bitmap, const rectangle &cliprect)
{
if (m_status & STATUS_VE)
{
m_y = 0;
- m_bitmap = bitmap;
+ m_bitmap = &bitmap;
m_data_fifo_pos = 0;
m_attr_fifo_pos = 0;
@@ -648,6 +648,6 @@ void upd3301_device::update_screen(bitmap_t *bitmap, const rectangle &cliprect)
}
else
{
- bitmap->fill(get_black_pen(machine()), cliprect);
+ bitmap.fill(get_black_pen(machine()), cliprect);
}
}
diff --git a/src/emu/video/upd3301.h b/src/emu/video/upd3301.h
index ecb99f26363..45c3fd6f9d1 100644
--- a/src/emu/video/upd3301.h
+++ b/src/emu/video/upd3301.h
@@ -66,8 +66,8 @@
// ======================> upd3301_display_pixels_func
-typedef void (*upd3301_display_pixels_func)(device_t *device, bitmap_t *bitmap, int y, int sx, UINT8 cc, UINT8 lc, int hlgt, int rvv, int vsp, int sl0, int sl12, int csr, int gpa);
-#define UPD3301_DISPLAY_PIXELS(name) void name(device_t *device, bitmap_t *bitmap, int y, int sx, UINT8 cc, UINT8 lc, int hlgt, int rvv, int vsp, int sl0, int sl12, int csr, int gpa)
+typedef void (*upd3301_display_pixels_func)(device_t *device, bitmap_t &bitmap, int y, int sx, UINT8 cc, UINT8 lc, int hlgt, int rvv, int vsp, int sl0, int sl12, int csr, int gpa);
+#define UPD3301_DISPLAY_PIXELS(name) void name(device_t *device, bitmap_t &bitmap, int y, int sx, UINT8 cc, UINT8 lc, int hlgt, int rvv, int vsp, int sl0, int sl12, int csr, int gpa)
// ======================> upd3301_interface
@@ -103,7 +103,7 @@ public:
DECLARE_READ_LINE_MEMBER( hrtc_r );
DECLARE_READ_LINE_MEMBER( vrtc_r );
- void update_screen(bitmap_t *bitmap, const rectangle &cliprect);
+ void update_screen(bitmap_t &bitmap, const rectangle &cliprect);
protected:
// device-level overrides
diff --git a/src/emu/video/v9938.c b/src/emu/video/v9938.c
index 6ad2272030c..1485c01f317 100644
--- a/src/emu/video/v9938.c
+++ b/src/emu/video/v9938.c
@@ -100,7 +100,7 @@ static void v9938_cpu_to_vdp (UINT8 V);
static UINT8 v9938_command_unit_w (UINT8 Op);
static UINT8 v9938_vdp_to_cpu (void);
static void v9938_set_mode (void);
-static void v9938_refresh_line (running_machine &machine, bitmap_t *bmp, int line);
+static void v9938_refresh_line (running_machine &machine, bitmap_t &bmp, int line);
/***************************************************************************
@@ -478,7 +478,7 @@ WRITE8_HANDLER (v9938_1_command_w)
***************************************************************************/
-void v9938_init (running_machine &machine, int which, screen_device &screen, bitmap_t *bitmap, int model, int vram_size, void (*callback)(running_machine &, int) )
+void v9938_init (running_machine &machine, int which, screen_device &screen, bitmap_t &bitmap, int model, int vram_size, void (*callback)(running_machine &, int) )
{
vdp = &vdps[which];
@@ -488,7 +488,7 @@ void v9938_init (running_machine &machine, int which, screen_device &screen, bit
vdp->VdpEngine = NULL;
vdp->screen = &screen;
- vdp->bitmap = bitmap;
+ vdp->bitmap = &bitmap;
vdp->model = model;
vdp->vram_size = vram_size;
vdp->INTCallback = callback;
@@ -1222,7 +1222,7 @@ static void v9938_set_mode (void)
vdp->mode = i;
}
-static void v9938_refresh_16 (running_machine &machine, bitmap_t *bmp, int line)
+static void v9938_refresh_16 (running_machine &machine, bitmap_t &bmp, int line)
{
const pen_t *pens = machine.pens;
int i, double_lines;
@@ -1236,17 +1236,17 @@ static void v9938_refresh_16 (running_machine &machine, bitmap_t *bmp, int line)
if (vdp->contReg[9] & 0x08)
{
vdp->size_now = RENDER_HIGH;
- ln = &bmp->pix16(line*2+((vdp->statReg[2]>>1)&1));
+ ln = &bmp.pix16(line*2+((vdp->statReg[2]>>1)&1));
}
else
{
- ln = &bmp->pix16(line*2);
- ln2 = &bmp->pix16(line*2+1);
+ ln = &bmp.pix16(line*2);
+ ln2 = &bmp.pix16(line*2+1);
double_lines = 1;
}
}
else
- ln = &bmp->pix16(line);
+ ln = &bmp.pix16(line);
if ( !(vdp->contReg[1] & 0x40) || (vdp->statReg[2] & 0x40) )
{
@@ -1282,7 +1282,7 @@ static void v9938_refresh_16 (running_machine &machine, bitmap_t *bmp, int line)
memcpy (ln2, ln, (512 + 32) * 2);
}
-static void v9938_refresh_line (running_machine &machine, bitmap_t *bmp, int line)
+static void v9938_refresh_line (running_machine &machine, bitmap_t &bmp, int line)
{
int ind16, ind256;
@@ -1514,7 +1514,7 @@ int v9938_interrupt (running_machine &machine, int which)
{
scanline = (vdp->scanline - scanline_start) & 255;
- v9938_refresh_line (machine, vdp->bitmap, scanline);
+ v9938_refresh_line (machine, *vdp->bitmap, scanline);
}
max = (vdp->contReg[9] & 2) ? 313 : 262;
diff --git a/src/emu/video/v9938.h b/src/emu/video/v9938.h
index f14072c85e0..660d12c7a5a 100644
--- a/src/emu/video/v9938.h
+++ b/src/emu/video/v9938.h
@@ -14,7 +14,7 @@
#define RENDER_LOW (1)
#define RENDER_AUTO (2)
-void v9938_init (running_machine &machine, int which, screen_device &screen, bitmap_t *bitmap, int model, int vram_size, void (*callback)(running_machine &, int) );
+void v9938_init (running_machine &machine, int which, screen_device &screen, bitmap_t &bitmap, int model, int vram_size, void (*callback)(running_machine &, int) );
void v9938_reset (int which);
int v9938_interrupt (running_machine &machine, int which);
void v9938_set_sprite_limit (int which, int);
diff --git a/src/emu/video/vector.c b/src/emu/video/vector.c
index eb74e196c07..7b5759af3eb 100644
--- a/src/emu/video/vector.c
+++ b/src/emu/video/vector.c
@@ -96,7 +96,7 @@ static render_texture *get_vector_texture(float dx, float dy, float intensity)
height = lbucket * VECTOR_WIDTH_DENOM / TEXTURE_LENGTH_BUCKETS;
tex->bitmap = global_alloc(bitmap_t(TEXTURE_WIDTH, height, BITMAP_FORMAT_ARGB32));
- tex->bitmap->fill(MAKE_ARGB(0xff,0xff,0xff,0xff));
+ tex->bitmap.fill(MAKE_ARGB(0xff,0xff,0xff,0xff));
totalint = 1.0f;
for (x = TEXTURE_WIDTH / 2 - 1; x >= 0; x--)
@@ -109,10 +109,10 @@ static render_texture *get_vector_texture(float dx, float dy, float intensity)
{
UINT32 *pix;
- pix = (UINT32 *)bitmap->base + y * bitmap->rowpixels + x;
+ pix = (UINT32 *)bitmap.base + y * bitmap.rowpixels + x;
*pix = MAKE_ARGB((RGB_ALPHA(*pix) * intensity) >> 8,0xff,0xff,0xff);
- pix = (UINT32 *)bitmap->base + y * bitmap->rowpixels + (TEXTURE_WIDTH - 1 - x);
+ pix = (UINT32 *)bitmap.base + y * bitmap.rowpixels + (TEXTURE_WIDTH - 1 - x);
*pix = MAKE_ARGB((RGB_ALPHA(*pix) * intensity) >> 8,0xff,0xff,0xff);
}
}
diff --git a/src/emu/video/voodoo.c b/src/emu/video/voodoo.c
index de33ad27b11..958df96c8ad 100644
--- a/src/emu/video/voodoo.c
+++ b/src/emu/video/voodoo.c
@@ -329,7 +329,7 @@ INLINE voodoo_state *get_safe_token(device_t *device)
*
*************************************/
-int voodoo_update(device_t *device, bitmap_t *bitmap, const rectangle &cliprect)
+int voodoo_update(device_t *device, bitmap_t &bitmap, const rectangle &cliprect)
{
voodoo_state *v = get_safe_token(device);
int changed = v->fbi.video_changed;
@@ -343,7 +343,7 @@ int voodoo_update(device_t *device, bitmap_t *bitmap, const rectangle &cliprect)
/* if we are blank, just fill with black */
if (v->type <= VOODOO_2 && FBIINIT1_SOFTWARE_BLANK(v->reg[fbiInit1].u))
{
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
return changed;
}
@@ -428,7 +428,7 @@ int voodoo_update(device_t *device, bitmap_t *bitmap, const rectangle &cliprect)
if (y >= v->fbi.yoffs)
{
UINT16 *src = (UINT16 *)(v->fbi.ram + v->fbi.rgboffs[drawbuf]) + (y - v->fbi.yoffs) * v->fbi.rowpixels - v->fbi.xoffs;
- UINT32 *dst = &bitmap->pix32(y);
+ UINT32 *dst = &bitmap.pix32(y);
for (x = cliprect.min_x; x <= cliprect.max_x; x++)
dst[x] = v->fbi.pen[src[x]];
}
@@ -450,7 +450,7 @@ int voodoo_update(device_t *device, bitmap_t *bitmap, const rectangle &cliprect)
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
UINT16 *src = (UINT16 *)(v->fbi.ram + v->fbi.auxoffs) + (y - v->fbi.yoffs) * v->fbi.rowpixels - v->fbi.xoffs;
- UINT32 *dst = &bitmap->pix32(y);
+ UINT32 *dst = &bitmap.pix32(y);
for (x = cliprect.min_x; x <= cliprect.max_x; x++)
dst[x] = ((src[x] << 8) & 0xff0000) | ((src[x] >> 0) & 0xff00) | ((src[x] >> 8) & 0xff);
}
diff --git a/src/emu/video/voodoo.h b/src/emu/video/voodoo.h
index 4d8329118be..59cf11ec76a 100644
--- a/src/emu/video/voodoo.h
+++ b/src/emu/video/voodoo.h
@@ -132,7 +132,7 @@ struct _voodoo_config
FUNCTION PROTOTYPES
***************************************************************************/
-int voodoo_update(device_t *device, bitmap_t *bitmap, const rectangle &cliprect);
+int voodoo_update(device_t *device, bitmap_t &bitmap, const rectangle &cliprect);
int voodoo_get_type(device_t *device);
int voodoo_is_stalled(device_t *device);
void voodoo_set_init_enable(device_t *device, UINT32 newval);
diff --git a/src/lib/util/aviio.c b/src/lib/util/aviio.c
index 09dfa527036..0fd2997c1bc 100644
--- a/src/lib/util/aviio.c
+++ b/src/lib/util/aviio.c
@@ -250,15 +250,15 @@ static avi_error soundbuf_write_chunk(avi_file *file, UINT32 framenum);
static avi_error soundbuf_flush(avi_file *file, int only_flush_full);
/* RGB helpers */
-static avi_error rgb32_compress_to_rgb(avi_stream *stream, const bitmap_t *bitmap, UINT8 *data, UINT32 numbytes);
+static avi_error rgb32_compress_to_rgb(avi_stream *stream, const bitmap_t &bitmap, UINT8 *data, UINT32 numbytes);
/* YUY helpers */
-static avi_error yuv_decompress_to_yuy16(avi_stream *stream, const UINT8 *data, UINT32 numbytes, bitmap_t *bitmap);
-static avi_error yuy16_compress_to_yuy(avi_stream *stream, const bitmap_t *bitmap, UINT8 *data, UINT32 numbytes);
+static avi_error yuv_decompress_to_yuy16(avi_stream *stream, const UINT8 *data, UINT32 numbytes, bitmap_t &bitmap);
+static avi_error yuy16_compress_to_yuy(avi_stream *stream, const bitmap_t &bitmap, UINT8 *data, UINT32 numbytes);
/* HuffYUV helpers */
static avi_error huffyuv_extract_tables(avi_stream *stream, const UINT8 *chunkdata, UINT32 size);
-static avi_error huffyuv_decompress_to_yuy16(avi_stream *stream, const UINT8 *data, UINT32 numbytes, bitmap_t *bitmap);
+static avi_error huffyuv_decompress_to_yuy16(avi_stream *stream, const UINT8 *data, UINT32 numbytes, bitmap_t &bitmap);
/* debugging */
static void printf_chunk_recursive(avi_file *file, avi_chunk *chunk, int indent);
@@ -793,7 +793,7 @@ UINT32 avi_first_sample_in_frame(avi_file *file, UINT32 framenum)
converting to YUY16 format
-------------------------------------------------*/
-avi_error avi_read_video_frame_yuy16(avi_file *file, UINT32 framenum, bitmap_t *bitmap)
+avi_error avi_read_video_frame_yuy16(avi_file *file, UINT32 framenum, bitmap_t &bitmap)
{
avi_error avierr = AVIERR_NONE;
UINT32 bytes_read, chunkid;
@@ -814,7 +814,7 @@ avi_error avi_read_video_frame_yuy16(avi_file *file, UINT32 framenum, bitmap_t *
return AVIERR_INVALID_FRAME;
/* we only support YUY-style bitmaps (16bpp) */
- if (bitmap->format() != BITMAP_FORMAT_YUY16 || bitmap->width() < stream->width || bitmap->height() < stream->height)
+ if (bitmap.format() != BITMAP_FORMAT_YUY16 || bitmap.width() < stream->width || bitmap.height() < stream->height)
return AVIERR_INVALID_BITMAP;
/* expand the tempbuffer to hold the data if necessary */
@@ -957,7 +957,7 @@ avi_error avi_read_sound_samples(avi_file *file, int channel, UINT32 firstsample
of video in YUY16 format
-------------------------------------------------*/
-avi_error avi_append_video_frame_yuy16(avi_file *file, const bitmap_t *bitmap)
+avi_error avi_append_video_frame_yuy16(avi_file *file, const bitmap_t &bitmap)
{
avi_stream *stream = get_video_stream(file);
avi_error avierr;
@@ -968,7 +968,7 @@ avi_error avi_append_video_frame_yuy16(avi_file *file, const bitmap_t *bitmap)
return AVIERR_UNSUPPORTED_VIDEO_FORMAT;
/* double check bitmap format */
- if (bitmap->format() != BITMAP_FORMAT_YUY16)
+ if (bitmap.format() != BITMAP_FORMAT_YUY16)
return AVIERR_INVALID_BITMAP;
/* write out any sound data first */
@@ -1003,7 +1003,7 @@ avi_error avi_append_video_frame_yuy16(avi_file *file, const bitmap_t *bitmap)
of video in RGB32 format
-------------------------------------------------*/
-avi_error avi_append_video_frame_rgb32(avi_file *file, const bitmap_t *bitmap)
+avi_error avi_append_video_frame_rgb32(avi_file *file, const bitmap_t &bitmap)
{
avi_stream *stream = get_video_stream(file);
avi_error avierr;
@@ -1018,7 +1018,7 @@ avi_error avi_append_video_frame_rgb32(avi_file *file, const bitmap_t *bitmap)
return AVIERR_UNSUPPORTED_VIDEO_FORMAT;
/* double check bitmap format */
- if (bitmap->format() != BITMAP_FORMAT_RGB32)
+ if (bitmap.format() != BITMAP_FORMAT_RGB32)
return AVIERR_INVALID_BITMAP;
/* write out any sound data first */
@@ -2343,17 +2343,17 @@ static avi_error soundbuf_flush(avi_file *file, int only_flush_full)
bitmap to an RGB encoded frame
-------------------------------------------------*/
-static avi_error rgb32_compress_to_rgb(avi_stream *stream, const bitmap_t *bitmap, UINT8 *data, UINT32 numbytes)
+static avi_error rgb32_compress_to_rgb(avi_stream *stream, const bitmap_t &bitmap, UINT8 *data, UINT32 numbytes)
{
- int height = MIN(stream->height, bitmap->height());
- int width = MIN(stream->width, bitmap->width());
+ int height = MIN(stream->height, bitmap.height());
+ int width = MIN(stream->width, bitmap.width());
UINT8 *dataend = data + numbytes;
int x, y;
/* compressed video */
for (y = 0; y < height; y++)
{
- const UINT32 *source = &bitmap->pix32(y);
+ const UINT32 *source = &bitmap.pix32(y);
UINT8 *dest = data + (stream->height - 1 - y) * stream->width * 3;
for (x = 0; x < width && dest < dataend; x++)
@@ -2394,7 +2394,7 @@ static avi_error rgb32_compress_to_rgb(avi_stream *stream, const bitmap_t *bitma
encoded frame to a YUY16 bitmap
-------------------------------------------------*/
-static avi_error yuv_decompress_to_yuy16(avi_stream *stream, const UINT8 *data, UINT32 numbytes, bitmap_t *bitmap)
+static avi_error yuv_decompress_to_yuy16(avi_stream *stream, const UINT8 *data, UINT32 numbytes, bitmap_t &bitmap)
{
const UINT16 *dataend = (const UINT16 *)(data + numbytes);
int x, y;
@@ -2403,7 +2403,7 @@ static avi_error yuv_decompress_to_yuy16(avi_stream *stream, const UINT8 *data,
for (y = 0; y < stream->height; y++)
{
const UINT16 *source = (const UINT16 *)data + y * stream->width;
- UINT16 *dest = &bitmap->pix16(y);
+ UINT16 *dest = &bitmap.pix16(y);
/* switch off the compression */
switch (stream->format)
@@ -2433,7 +2433,7 @@ static avi_error yuv_decompress_to_yuy16(avi_stream *stream, const UINT8 *data,
bitmap to a YUV encoded frame
-------------------------------------------------*/
-static avi_error yuy16_compress_to_yuy(avi_stream *stream, const bitmap_t *bitmap, UINT8 *data, UINT32 numbytes)
+static avi_error yuy16_compress_to_yuy(avi_stream *stream, const bitmap_t &bitmap, UINT8 *data, UINT32 numbytes)
{
const UINT16 *dataend = (const UINT16 *)(data + numbytes);
int x, y;
@@ -2441,7 +2441,7 @@ static avi_error yuy16_compress_to_yuy(avi_stream *stream, const bitmap_t *bitma
/* compressed video */
for (y = 0; y < stream->height; y++)
{
- const UINT16 *source = &bitmap->pix16(y);
+ const UINT16 *source = &bitmap.pix16(y);
UINT16 *dest = (UINT16 *)data + y * stream->width;
/* switch off the compression */
@@ -2611,7 +2611,7 @@ error:
HuffYUV-encoded frame to a YUY16 bitmap
-------------------------------------------------*/
-static avi_error huffyuv_decompress_to_yuy16(avi_stream *stream, const UINT8 *data, UINT32 numbytes, bitmap_t *bitmap)
+static avi_error huffyuv_decompress_to_yuy16(avi_stream *stream, const UINT8 *data, UINT32 numbytes, bitmap_t &bitmap)
{
huffyuv_data *huffyuv = stream->huffyuv;
int prevlines = (stream->height > 288) ? 2 : 1;
@@ -2625,7 +2625,7 @@ static avi_error huffyuv_decompress_to_yuy16(avi_stream *stream, const UINT8 *da
/* compressed video */
for (y = 0; y < stream->height; y++)
{
- UINT16 *dest = &bitmap->pix16(y);
+ UINT16 *dest = &bitmap.pix16(y);
/* handle the first four bytes independently */
x = 0;
@@ -2713,8 +2713,8 @@ static avi_error huffyuv_decompress_to_yuy16(avi_stream *stream, const UINT8 *da
lastprevy = lastprevcb = lastprevcr = 0;
for (y = 0; y < stream->height; y++)
{
- UINT16 *prevrow = &bitmap->pix16(y - prevlines);
- UINT16 *dest = &bitmap->pix16(y);
+ UINT16 *prevrow = &bitmap.pix16(y - prevlines);
+ UINT16 *dest = &bitmap.pix16(y);
/* handle the first four bytes independently */
x = 0;
diff --git a/src/lib/util/aviio.h b/src/lib/util/aviio.h
index dc512633dcf..c7bfe38afe9 100644
--- a/src/lib/util/aviio.h
+++ b/src/lib/util/aviio.h
@@ -143,11 +143,11 @@ const char *avi_error_string(avi_error err);
const avi_movie_info *avi_get_movie_info(avi_file *file);
UINT32 avi_first_sample_in_frame(avi_file *file, UINT32 framenum);
-avi_error avi_read_video_frame_yuy16(avi_file *file, UINT32 framenum, bitmap_t *bitmap);
+avi_error avi_read_video_frame_yuy16(avi_file *file, UINT32 framenum, bitmap_t &bitmap);
avi_error avi_read_sound_samples(avi_file *file, int channel, UINT32 firstsample, UINT32 numsamples, INT16 *output);
-avi_error avi_append_video_frame_yuy16(avi_file *file, const bitmap_t *bitmap);
-avi_error avi_append_video_frame_rgb32(avi_file *file, const bitmap_t *bitmap);
+avi_error avi_append_video_frame_yuy16(avi_file *file, const bitmap_t &bitmap);
+avi_error avi_append_video_frame_rgb32(avi_file *file, const bitmap_t &bitmap);
avi_error avi_append_sound_samples(avi_file *file, int channel, const INT16 *samples, UINT32 numsamples, UINT32 sampleskip);
#endif
diff --git a/src/lib/util/bitmap.c b/src/lib/util/bitmap.c
index cf870dc632c..f64302e9567 100644
--- a/src/lib/util/bitmap.c
+++ b/src/lib/util/bitmap.c
@@ -56,26 +56,26 @@
bitmap_t::bitmap_t()
: m_alloc(NULL),
- m_base(NULL),
- m_rowpixels(0),
- m_width(0),
- m_height(0),
- m_format(BITMAP_FORMAT_INVALID),
- m_bpp(0),
- m_palette(NULL),
- m_cliprect(0, 0, 0, 0)
+ m_palette(NULL)
{
+ // deallocate intializes all other fields
+ deallocate();
}
-//-------------------------------------------------
-// bitmap_t - basic constructor
-//-------------------------------------------------
-
bitmap_t::bitmap_t(int width, int height, bitmap_format format, int xslop, int yslop)
: m_alloc(NULL),
- m_base(NULL),
- m_rowpixels((width + 2 * xslop + 7) & ~7),
+ m_palette(NULL)
+{
+ // allocate intializes all other fields
+ allocate(width, height, format, xslop, yslop);
+}
+
+
+bitmap_t::bitmap_t(void *base, int width, int height, int rowpixels, bitmap_format format)
+ : m_alloc(NULL),
+ m_base(base),
+ m_rowpixels(rowpixels),
m_width(width),
m_height(height),
m_format(format),
@@ -86,52 +86,73 @@ bitmap_t::bitmap_t(int width, int height, bitmap_format format, int xslop, int y
// fail if invalid format
if (m_bpp == 0)
throw std::bad_alloc();
+}
- // allocate memory for the bitmap itself
- size_t allocbytes = m_rowpixels * (m_height + 2 * yslop) * m_bpp / 8;
- m_alloc = new UINT8[allocbytes];
- // clear to 0 by default
- memset(m_alloc, 0, allocbytes);
+//-------------------------------------------------
+// ~bitmap_t - basic destructor
+//-------------------------------------------------
- // compute the base
- m_base = m_alloc + (m_rowpixels * yslop + xslop) * (m_bpp / 8);
+bitmap_t::~bitmap_t()
+{
+ // delete any existing stuff
+ deallocate();
}
//-------------------------------------------------
-// bitmap_t - basic constructor
+// allocate -- (re)allocate memory for the bitmap
+// at the given size, destroying anything that
+// already exists
//-------------------------------------------------
-bitmap_t::bitmap_t(void *base, int width, int height, int rowpixels, bitmap_format format)
- : m_alloc(NULL),
- m_base(base),
- m_rowpixels(rowpixels),
- m_width(width),
- m_height(height),
- m_format(format),
- m_bpp(format_to_bpp(format)),
- m_palette(NULL),
- m_cliprect(0, width - 1, 0, height - 1)
+void bitmap_t::allocate(int width, int height, bitmap_format format, int xslop, int yslop)
{
- // fail if invalid format
+ // delete any existing stuff
+ deallocate();
+
+ // initialize fields
+ m_rowpixels = (width + 2 * xslop + 7) & ~7;
+ m_width = width;
+ m_height = height;
+ m_format = format;
+ m_bpp = format_to_bpp(format);
if (m_bpp == 0)
throw std::bad_alloc();
+ m_cliprect.set(0, width - 1, 0, height - 1);
+
+ // allocate memory for the bitmap itself
+ size_t allocbytes = m_rowpixels * (m_height + 2 * yslop) * m_bpp / 8;
+ m_alloc = new UINT8[allocbytes];
+
+ // clear to 0 by default
+ memset(m_alloc, 0, allocbytes);
+
+ // compute the base
+ m_base = m_alloc + (m_rowpixels * yslop + xslop) * (m_bpp / 8);
}
//-------------------------------------------------
-// ~bitmap_t - basic destructor
+// deallocate -- reset to an invalid bitmap,
+// deleting all allocated stuff
//-------------------------------------------------
-bitmap_t::~bitmap_t()
+void bitmap_t::deallocate()
{
- // dereference the palette
- if (m_palette != NULL)
- palette_deref(m_palette);
-
- // free any allocated memory
+ // delete any existing stuff
+ set_palette(NULL);
delete[] m_alloc;
+ m_alloc = NULL;
+ m_base = NULL;
+
+ // reset all fields
+ m_rowpixels = 0;
+ m_width = 0;
+ m_height = 0;
+ m_format = BITMAP_FORMAT_INVALID;
+ m_bpp = 0;
+ m_cliprect.set(0, -1, 0, -1);
}
diff --git a/src/lib/util/bitmap.h b/src/lib/util/bitmap.h
index e1e4abe5398..969e34f8e40 100644
--- a/src/lib/util/bitmap.h
+++ b/src/lib/util/bitmap.h
@@ -137,10 +137,13 @@ public:
INT32 rowbytes() const { return m_rowpixels * m_bpp / 8; }
UINT8 bpp() const { return m_bpp; }
bitmap_format format() const { return m_format; }
+ bool valid() const { return (m_format != BITMAP_FORMAT_INVALID); }
palette_t *palette() const { return m_palette; }
const rectangle &cliprect() const { return m_cliprect; }
- // helpers
+ // operations
+ void allocate(int width, int height, bitmap_format format, int xslop = 0, int yslop = 0);
+ void deallocate();
void clone_existing(const bitmap_t &srcbitmap);
void set_palette(palette_t *palette);
void fill(rgb_t color) { fill(color, m_cliprect); }
diff --git a/src/lib/util/png.c b/src/lib/util/png.c
index 9bfbf770d33..7b0f7021642 100644
--- a/src/lib/util/png.c
+++ b/src/lib/util/png.c
@@ -904,14 +904,14 @@ static png_error write_deflated_chunk(core_file *fp, UINT8 *data, UINT32 type, U
bitmap to a palettized image
-------------------------------------------------*/
-static png_error convert_bitmap_to_image_palette(png_info *pnginfo, const bitmap_t *bitmap, int palette_length, const rgb_t *palette)
+static png_error convert_bitmap_to_image_palette(png_info *pnginfo, const bitmap_t &bitmap, int palette_length, const rgb_t *palette)
{
int rowbytes;
int x, y;
/* set the common info */
- pnginfo->width = bitmap->width();
- pnginfo->height = bitmap->height();
+ pnginfo->width = bitmap.width();
+ pnginfo->height = bitmap.height();
pnginfo->bit_depth = 8;
pnginfo->color_type = 3;
pnginfo->num_palette = 256;
@@ -943,7 +943,7 @@ static png_error convert_bitmap_to_image_palette(png_info *pnginfo, const bitmap
/* copy in the pixels, specifying a NULL filter */
for (y = 0; y < pnginfo->height; y++)
{
- UINT16 *src = &bitmap->pix16(y);
+ UINT16 *src = &bitmap.pix16(y);
UINT8 *dst = pnginfo->image + y * (rowbytes + 1);
/* store the filter byte, then copy the data */
@@ -961,15 +961,15 @@ static png_error convert_bitmap_to_image_palette(png_info *pnginfo, const bitmap
bitmap to an RGB image
-------------------------------------------------*/
-static png_error convert_bitmap_to_image_rgb(png_info *pnginfo, const bitmap_t *bitmap, int palette_length, const rgb_t *palette)
+static png_error convert_bitmap_to_image_rgb(png_info *pnginfo, const bitmap_t &bitmap, int palette_length, const rgb_t *palette)
{
- int alpha = (bitmap->format() == BITMAP_FORMAT_ARGB32);
+ int alpha = (bitmap.format() == BITMAP_FORMAT_ARGB32);
int rowbytes;
int x, y;
/* set the common info */
- pnginfo->width = bitmap->width();
- pnginfo->height = bitmap->height();
+ pnginfo->width = bitmap.width();
+ pnginfo->height = bitmap.height();
pnginfo->bit_depth = 8;
pnginfo->color_type = alpha ? 6 : 2;
rowbytes = pnginfo->width * (alpha ? 4 : 3);
@@ -982,15 +982,15 @@ static png_error convert_bitmap_to_image_rgb(png_info *pnginfo, const bitmap_t *
/* copy in the pixels, specifying a NULL filter */
for (y = 0; y < pnginfo->height; y++)
{
- UINT32 *src32 = &bitmap->pix32(y);
- UINT16 *src16 = &bitmap->pix16(y);
+ UINT32 *src32 = &bitmap.pix32(y);
+ UINT16 *src16 = &bitmap.pix16(y);
UINT8 *dst = pnginfo->image + y * (rowbytes + 1);
/* store the filter byte, then copy the data */
*dst++ = 0;
/* 16bpp palettized format */
- if (bitmap->format() == BITMAP_FORMAT_INDEXED16)
+ if (bitmap.format() == BITMAP_FORMAT_INDEXED16)
{
for (x = 0; x < pnginfo->width; x++)
{
@@ -1002,7 +1002,7 @@ static png_error convert_bitmap_to_image_rgb(png_info *pnginfo, const bitmap_t *
}
/* RGB formats */
- else if (bitmap->format() == BITMAP_FORMAT_RGB15)
+ else if (bitmap.format() == BITMAP_FORMAT_RGB15)
{
for (x = 0; x < pnginfo->width; x++)
{
@@ -1014,7 +1014,7 @@ static png_error convert_bitmap_to_image_rgb(png_info *pnginfo, const bitmap_t *
}
/* 32-bit RGB direct */
- else if (bitmap->format() == BITMAP_FORMAT_RGB32)
+ else if (bitmap.format() == BITMAP_FORMAT_RGB32)
{
for (x = 0; x < pnginfo->width; x++)
{
@@ -1026,7 +1026,7 @@ static png_error convert_bitmap_to_image_rgb(png_info *pnginfo, const bitmap_t *
}
/* 32-bit ARGB direct */
- else if (bitmap->format() == BITMAP_FORMAT_ARGB32)
+ else if (bitmap.format() == BITMAP_FORMAT_ARGB32)
{
for (x = 0; x < pnginfo->width; x++)
{
@@ -1052,14 +1052,14 @@ static png_error convert_bitmap_to_image_rgb(png_info *pnginfo, const bitmap_t *
chunks to the given file
-------------------------------------------------*/
-static png_error write_png_stream(core_file *fp, png_info *pnginfo, const bitmap_t *bitmap, int palette_length, const rgb_t *palette)
+static png_error write_png_stream(core_file *fp, png_info *pnginfo, const bitmap_t &bitmap, int palette_length, const rgb_t *palette)
{
UINT8 tempbuff[16];
png_text *text;
png_error error;
/* create an unfiltered image in either palette or RGB form */
- if (bitmap->format() == BITMAP_FORMAT_INDEXED16 && palette_length <= 256)
+ if (bitmap.format() == BITMAP_FORMAT_INDEXED16 && palette_length <= 256)
error = convert_bitmap_to_image_palette(pnginfo, bitmap, palette_length, palette);
else
error = convert_bitmap_to_image_rgb(pnginfo, bitmap, palette_length, palette);
@@ -1108,7 +1108,7 @@ handle_error:
-png_error png_write_bitmap(core_file *fp, png_info *info, bitmap_t *bitmap, int palette_length, const UINT32 *palette)
+png_error png_write_bitmap(core_file *fp, png_info *info, bitmap_t &bitmap, int palette_length, const UINT32 *palette)
{
png_info pnginfo;
png_error error;
@@ -1143,7 +1143,7 @@ png_error png_write_bitmap(core_file *fp, png_info *info, bitmap_t *bitmap, int
********************************************************************************/
-png_error mng_capture_start(core_file *fp, bitmap_t *bitmap, double rate)
+png_error mng_capture_start(core_file *fp, bitmap_t &bitmap, double rate)
{
UINT8 mhdr[28];
png_error error;
@@ -1152,8 +1152,8 @@ png_error mng_capture_start(core_file *fp, bitmap_t *bitmap, double rate)
return PNGERR_FILE_ERROR;
memset(mhdr, 0, 28);
- put_32bit(mhdr + 0, bitmap->width());
- put_32bit(mhdr + 4, bitmap->height());
+ put_32bit(mhdr + 0, bitmap.width());
+ put_32bit(mhdr + 4, bitmap.height());
put_32bit(mhdr + 8, rate);
put_32bit(mhdr + 24, 0x0041); /* Simplicity profile */
/* frame count and play time unspecified because
@@ -1165,7 +1165,7 @@ png_error mng_capture_start(core_file *fp, bitmap_t *bitmap, double rate)
return PNGERR_NONE;
}
-png_error mng_capture_frame(core_file *fp, png_info *info, bitmap_t *bitmap, int palette_length, const UINT32 *palette)
+png_error mng_capture_frame(core_file *fp, png_info *info, bitmap_t &bitmap, int palette_length, const UINT32 *palette)
{
return write_png_stream(fp, info, bitmap, palette_length, palette);
}
diff --git a/src/lib/util/png.h b/src/lib/util/png.h
index d9b8a370abc..0b85d5f68aa 100644
--- a/src/lib/util/png.h
+++ b/src/lib/util/png.h
@@ -156,10 +156,10 @@ png_error png_read_bitmap(core_file *fp, bitmap_t **bitmap);
png_error png_expand_buffer_8bit(png_info *p);
png_error png_add_text(png_info *pnginfo, const char *keyword, const char *text);
-png_error png_write_bitmap(core_file *fp, png_info *info, bitmap_t *bitmap, int palette_length, const UINT32 *palette);
+png_error png_write_bitmap(core_file *fp, png_info *info, bitmap_t &bitmap, int palette_length, const UINT32 *palette);
-png_error mng_capture_start(core_file *fp, bitmap_t *bitmap, double rate);
-png_error mng_capture_frame(core_file *fp, png_info *info, bitmap_t *bitmap, int palette_length, const UINT32 *palette);
+png_error mng_capture_start(core_file *fp, bitmap_t &bitmap, double rate);
+png_error mng_capture_frame(core_file *fp, png_info *info, bitmap_t &bitmap, int palette_length, const UINT32 *palette);
png_error mng_capture_stop(core_file *fp);
#endif /* __PNG_H__ */
diff --git a/src/mame/drivers/1945kiii.c b/src/mame/drivers/1945kiii.c
index 26ba817179b..7f7968e3c8a 100644
--- a/src/mame/drivers/1945kiii.c
+++ b/src/mame/drivers/1945kiii.c
@@ -90,7 +90,7 @@ static VIDEO_START(k3)
state->m_bg_tilemap = tilemap_create(machine, get_k3_bg_tile_info, tilemap_scan_rows, 16, 16, 32, 64);
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
k3_state *state = machine.driver_data<k3_state>();
const gfx_element *gfx = machine.gfx[0];
diff --git a/src/mame/drivers/39in1.c b/src/mame/drivers/39in1.c
index d588a2b9b5a..4ee9f0e3a9c 100644
--- a/src/mame/drivers/39in1.c
+++ b/src/mame/drivers/39in1.c
@@ -1520,7 +1520,7 @@ static SCREEN_UPDATE( 39in1 )
for(y = 0; y <= (state->m_lcd_regs.lccr2 & PXA255_LCCR2_LPP); y++)
{
- UINT32 *d = &bitmap->pix32(y);
+ UINT32 *d = &bitmap.pix32(y);
for(x = 0; x <= (state->m_lcd_regs.lccr1 & PXA255_LCCR1_PPL); x++)
{
d[x] = state->m_pxa255_lcd_palette[state->m_pxa255_lcd_framebuffer[y*((state->m_lcd_regs.lccr1 & PXA255_LCCR1_PPL) + 1) + x]];
diff --git a/src/mame/drivers/ace.c b/src/mame/drivers/ace.c
index e9f2b8b4e56..8cfcf1b5776 100644
--- a/src/mame/drivers/ace.c
+++ b/src/mame/drivers/ace.c
@@ -88,7 +88,7 @@ static SCREEN_UPDATE( ace )
int offs;
/* first of all, fill the screen with the background color */
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
drawgfx_opaque(bitmap, cliprect, screen.machine().gfx[1],
0,
diff --git a/src/mame/drivers/acefruit.c b/src/mame/drivers/acefruit.c
index 484b978376c..2609a4dc120 100644
--- a/src/mame/drivers/acefruit.c
+++ b/src/mame/drivers/acefruit.c
@@ -115,7 +115,7 @@ static SCREEN_UPDATE( acefruit )
for( y = 0; y < 8; y++ )
{
- UINT16 *dst = &bitmap->pix16(y + ( row * 8 ), x + ( col * 16 ) );
+ UINT16 *dst = &bitmap.pix16(y + ( row * 8 ), x + ( col * 16 ) );
*( dst ) = *( gfxdata + ( ( spriterow + y ) * gfx->line_modulo ) + ( ( spriteindex % 64 ) >> 1 ) );
}
@@ -131,7 +131,7 @@ static SCREEN_UPDATE( acefruit )
{
for( y = 0; y < 8; y++ )
{
- UINT16 *dst = &bitmap->pix16(y + ( row * 8 ), x + ( col * 16 ) );
+ UINT16 *dst = &bitmap.pix16(y + ( row * 8 ), x + ( col * 16 ) );
*( dst ) = 0;
}
}
diff --git a/src/mame/drivers/acommand.c b/src/mame/drivers/acommand.c
index 8292e01829d..92e74ca98f8 100644
--- a/src/mame/drivers/acommand.c
+++ b/src/mame/drivers/acommand.c
@@ -110,7 +110,7 @@ static TILE_GET_INFO( ac_get_tx_tile_info )
0);
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int priority, int pri_mask)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int priority, int pri_mask)
{
acommand_state *state = machine.driver_data<acommand_state>();
UINT16 *spriteram16 = state->m_spriteram;
@@ -203,38 +203,38 @@ g & 40
/* 0 1 2 3 4 5 6 7 8 9 a b c d e f*/
static const UINT8 led_fill[0x10] = { 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x00,0x00,0x00,0x00,0x00,0x00};
-static void draw_led(bitmap_t *bitmap, int x, int y,UINT8 value)
+static void draw_led(bitmap_t &bitmap, int x, int y,UINT8 value)
{
- bitmap->plot_box(x, y, 6, 10, 0x00000000);
+ bitmap.plot_box(x, y, 6, 10, 0x00000000);
/*a*/
- bitmap->pix16(y+0, x+1) = ((led_fill[value] & 0x0001) ? LED_ON : LED_OFF);
- bitmap->pix16(y+0, x+2) = ((led_fill[value] & 0x0001) ? LED_ON : LED_OFF);
- bitmap->pix16(y+0, x+3) = ((led_fill[value] & 0x0001) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+0, x+1) = ((led_fill[value] & 0x0001) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+0, x+2) = ((led_fill[value] & 0x0001) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+0, x+3) = ((led_fill[value] & 0x0001) ? LED_ON : LED_OFF);
/*b*/
- bitmap->pix16(y+1, x+4) = ((led_fill[value] & 0x0002) ? LED_ON : LED_OFF);
- bitmap->pix16(y+2, x+4) = ((led_fill[value] & 0x0002) ? LED_ON : LED_OFF);
- bitmap->pix16(y+3, x+4) = ((led_fill[value] & 0x0002) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+1, x+4) = ((led_fill[value] & 0x0002) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+2, x+4) = ((led_fill[value] & 0x0002) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+3, x+4) = ((led_fill[value] & 0x0002) ? LED_ON : LED_OFF);
/*c*/
- bitmap->pix16(y+5, x+4) = ((led_fill[value] & 0x0004) ? LED_ON : LED_OFF);
- bitmap->pix16(y+6, x+4) = ((led_fill[value] & 0x0004) ? LED_ON : LED_OFF);
- bitmap->pix16(y+7, x+4) = ((led_fill[value] & 0x0004) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+5, x+4) = ((led_fill[value] & 0x0004) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+6, x+4) = ((led_fill[value] & 0x0004) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+7, x+4) = ((led_fill[value] & 0x0004) ? LED_ON : LED_OFF);
/*d*/
- bitmap->pix16(y+8, x+1) = ((led_fill[value] & 0x0008) ? LED_ON : LED_OFF);
- bitmap->pix16(y+8, x+2) = ((led_fill[value] & 0x0008) ? LED_ON : LED_OFF);
- bitmap->pix16(y+8, x+3) = ((led_fill[value] & 0x0008) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+8, x+1) = ((led_fill[value] & 0x0008) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+8, x+2) = ((led_fill[value] & 0x0008) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+8, x+3) = ((led_fill[value] & 0x0008) ? LED_ON : LED_OFF);
/*e*/
- bitmap->pix16(y+5, x+0) = ((led_fill[value] & 0x0010) ? LED_ON : LED_OFF);
- bitmap->pix16(y+6, x+0) = ((led_fill[value] & 0x0010) ? LED_ON : LED_OFF);
- bitmap->pix16(y+7, x+0) = ((led_fill[value] & 0x0010) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+5, x+0) = ((led_fill[value] & 0x0010) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+6, x+0) = ((led_fill[value] & 0x0010) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+7, x+0) = ((led_fill[value] & 0x0010) ? LED_ON : LED_OFF);
/*f*/
- bitmap->pix16(y+1, x+0) = ((led_fill[value] & 0x0020) ? LED_ON : LED_OFF);
- bitmap->pix16(y+2, x+0) = ((led_fill[value] & 0x0020) ? LED_ON : LED_OFF);
- bitmap->pix16(y+3, x+0) = ((led_fill[value] & 0x0020) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+1, x+0) = ((led_fill[value] & 0x0020) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+2, x+0) = ((led_fill[value] & 0x0020) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+3, x+0) = ((led_fill[value] & 0x0020) ? LED_ON : LED_OFF);
/*g*/
- bitmap->pix16(y+4, x+1) = ((led_fill[value] & 0x0040) ? LED_ON : LED_OFF);
- bitmap->pix16(y+4, x+2) = ((led_fill[value] & 0x0040) ? LED_ON : LED_OFF);
- bitmap->pix16(y+4, x+3) = ((led_fill[value] & 0x0040) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+4, x+1) = ((led_fill[value] & 0x0040) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+4, x+2) = ((led_fill[value] & 0x0040) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+4, x+3) = ((led_fill[value] & 0x0040) ? LED_ON : LED_OFF);
}
diff --git a/src/mame/drivers/adp.c b/src/mame/drivers/adp.c
index 85f6a655587..02c5ba00555 100644
--- a/src/mame/drivers/adp.c
+++ b/src/mame/drivers/adp.c
@@ -183,7 +183,7 @@ void adp_state::video_start()
static H63484_DISPLAY_PIXELS( acrtc_display_pixels )
{
- bitmap->pix16(y, x) = data & 0xf;
+ bitmap.pix16(y, x) = data & 0xf;
}
bool adp_state::screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect)
@@ -191,7 +191,7 @@ bool adp_state::screen_update(screen_device &screen, bitmap_t &bitmap, const rec
bitmap.fill(0, cliprect);
/* graphics */
- m_h63484->update_screen(&bitmap, cliprect);
+ m_h63484->update_screen(bitmap, cliprect);
return 0;
}
@@ -216,10 +216,10 @@ static SCREEN_UPDATE( adp )
{
b &= (HD63484_RAM_SIZE - 1);
src = hd63484_ram_r(state->m_hd63484, b, 0xffff);
- bitmap->pix16(y, x ) = ((src & 0x000f) >> 0) << 0;
- bitmap->pix16(y, x + 1) = ((src & 0x00f0) >> 4) << 0;
- bitmap->pix16(y, x + 2) = ((src & 0x0f00) >> 8) << 0;
- bitmap->pix16(y, x + 3) = ((src & 0xf000) >> 12) << 0;
+ bitmap.pix16(y, x ) = ((src & 0x000f) >> 0) << 0;
+ bitmap.pix16(y, x + 1) = ((src & 0x00f0) >> 4) << 0;
+ bitmap.pix16(y, x + 2) = ((src & 0x0f00) >> 8) << 0;
+ bitmap.pix16(y, x + 3) = ((src & 0xf000) >> 12) << 0;
b++;
}
}
@@ -243,10 +243,10 @@ if (!screen.machine().input().code_pressed(KEYCODE_O)) // debug: toggle window
if (x <= w && x + sx >= 0 && x + sx < (hd63484_regs_r(state->m_hd63484, 0xca/2, 0xffff) & 0x0fff) * 4)
{
- bitmap->pix16(y, x + sx ) = ((src & 0x000f) >> 0) << 0;
- bitmap->pix16(y, x + sx + 1) = ((src & 0x00f0) >> 4) << 0;
- bitmap->pix16(y, x + sx + 2) = ((src & 0x0f00) >> 8) << 0;
- bitmap->pix16(y, x + sx + 3) = ((src & 0xf000) >> 12) << 0;
+ bitmap.pix16(y, x + sx ) = ((src & 0x000f) >> 0) << 0;
+ bitmap.pix16(y, x + sx + 1) = ((src & 0x00f0) >> 4) << 0;
+ bitmap.pix16(y, x + sx + 2) = ((src & 0x0f00) >> 8) << 0;
+ bitmap.pix16(y, x + sx + 3) = ((src & 0xf000) >> 12) << 0;
}
b++;
}
diff --git a/src/mame/drivers/albazc.c b/src/mame/drivers/albazc.c
index fc3293f3df6..353fe342974 100644
--- a/src/mame/drivers/albazc.c
+++ b/src/mame/drivers/albazc.c
@@ -51,7 +51,7 @@ static VIDEO_START( hanaroku )
{
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
albazc_state *state = machine.driver_data<albazc_state>();
int i;
@@ -79,7 +79,7 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
static SCREEN_UPDATE(hanaroku)
{
- bitmap->fill(0x1f0, cliprect); // ???
+ bitmap.fill(0x1f0, cliprect); // ???
draw_sprites(screen.machine(), bitmap, cliprect);
return 0;
}
diff --git a/src/mame/drivers/aristmk6.c b/src/mame/drivers/aristmk6.c
index 995698843ef..8e3eeca2f92 100644
--- a/src/mame/drivers/aristmk6.c
+++ b/src/mame/drivers/aristmk6.c
@@ -63,7 +63,7 @@ SCREEN_UPDATE(aristmk6)
popmessage("%d %d %04x %d",state->m_test_x,state->m_test_y,state->m_start_offs,state->m_type);
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
count = (state->m_start_offs);
@@ -87,7 +87,7 @@ SCREEN_UPDATE(aristmk6)
b = (b << 3) | (b & 0x7);
if((x)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y)
- bitmap->pix32(y, x) = r | g<<8 | b<<16;
+ bitmap.pix32(y, x) = r | g<<8 | b<<16;
count+=2;
}
@@ -98,7 +98,7 @@ SCREEN_UPDATE(aristmk6)
color = blit_ram[count];
if((x)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y)
- bitmap->pix32(y, x) = screen.machine().pens[color];
+ bitmap.pix32(y, x) = screen.machine().pens[color];
count++;
}
diff --git a/src/mame/drivers/astinvad.c b/src/mame/drivers/astinvad.c
index 8fcc22fe8bb..9604c4b9556 100644
--- a/src/mame/drivers/astinvad.c
+++ b/src/mame/drivers/astinvad.c
@@ -134,20 +134,20 @@ static WRITE8_HANDLER( spaceint_videoram_w )
*
*************************************/
-static void plot_byte( running_machine &machine, bitmap_t *bitmap, UINT8 y, UINT8 x, UINT8 data, UINT8 color )
+static void plot_byte( running_machine &machine, bitmap_t &bitmap, UINT8 y, UINT8 x, UINT8 data, UINT8 color )
{
astinvad_state *state = machine.driver_data<astinvad_state>();
pen_t fore_pen = MAKE_RGB(pal1bit(color >> 0), pal1bit(color >> 2), pal1bit(color >> 1));
UINT8 flip_xor = state->m_screen_flip & 7;
- bitmap->pix32(y, x + (0 ^ flip_xor)) = (data & 0x01) ? fore_pen : RGB_BLACK;
- bitmap->pix32(y, x + (1 ^ flip_xor)) = (data & 0x02) ? fore_pen : RGB_BLACK;
- bitmap->pix32(y, x + (2 ^ flip_xor)) = (data & 0x04) ? fore_pen : RGB_BLACK;
- bitmap->pix32(y, x + (3 ^ flip_xor)) = (data & 0x08) ? fore_pen : RGB_BLACK;
- bitmap->pix32(y, x + (4 ^ flip_xor)) = (data & 0x10) ? fore_pen : RGB_BLACK;
- bitmap->pix32(y, x + (5 ^ flip_xor)) = (data & 0x20) ? fore_pen : RGB_BLACK;
- bitmap->pix32(y, x + (6 ^ flip_xor)) = (data & 0x40) ? fore_pen : RGB_BLACK;
- bitmap->pix32(y, x + (7 ^ flip_xor)) = (data & 0x80) ? fore_pen : RGB_BLACK;
+ bitmap.pix32(y, x + (0 ^ flip_xor)) = (data & 0x01) ? fore_pen : RGB_BLACK;
+ bitmap.pix32(y, x + (1 ^ flip_xor)) = (data & 0x02) ? fore_pen : RGB_BLACK;
+ bitmap.pix32(y, x + (2 ^ flip_xor)) = (data & 0x04) ? fore_pen : RGB_BLACK;
+ bitmap.pix32(y, x + (3 ^ flip_xor)) = (data & 0x08) ? fore_pen : RGB_BLACK;
+ bitmap.pix32(y, x + (4 ^ flip_xor)) = (data & 0x10) ? fore_pen : RGB_BLACK;
+ bitmap.pix32(y, x + (5 ^ flip_xor)) = (data & 0x20) ? fore_pen : RGB_BLACK;
+ bitmap.pix32(y, x + (6 ^ flip_xor)) = (data & 0x40) ? fore_pen : RGB_BLACK;
+ bitmap.pix32(y, x + (7 ^ flip_xor)) = (data & 0x80) ? fore_pen : RGB_BLACK;
}
diff --git a/src/mame/drivers/astrocorp.c b/src/mame/drivers/astrocorp.c
index 6f4440eaaf0..c627a519481 100644
--- a/src/mame/drivers/astrocorp.c
+++ b/src/mame/drivers/astrocorp.c
@@ -90,7 +90,7 @@ static VIDEO_START( astrocorp )
***************************************************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
astrocorp_state *state = machine.driver_data<astrocorp_state>();
UINT16 *source = state->m_spriteram;
@@ -143,9 +143,9 @@ static SCREEN_UPDATE(astrocorp)
astrocorp_state *state = screen.machine().driver_data<astrocorp_state>();
if (state->m_screen_enable & 1)
- copybitmap(bitmap, state->m_bitmap, 0,0,0,0, cliprect);
+ copybitmap(bitmap, *state->m_bitmap, 0,0,0,0, cliprect);
else
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
return 0;
}
@@ -163,7 +163,7 @@ static WRITE16_HANDLER( astrocorp_draw_sprites_w )
UINT16 now = COMBINE_DATA(&state->m_draw_sprites);
if (!old && now)
- draw_sprites(space->machine(), state->m_bitmap, space->machine().primary_screen->visible_area());
+ draw_sprites(space->machine(), *state->m_bitmap, space->machine().primary_screen->visible_area());
}
static WRITE16_HANDLER( astrocorp_eeprom_w )
diff --git a/src/mame/drivers/astrof.c b/src/mame/drivers/astrof.c
index 86753925bb2..d7d8b68d183 100644
--- a/src/mame/drivers/astrof.c
+++ b/src/mame/drivers/astrof.c
@@ -376,7 +376,7 @@ static WRITE8_HANDLER( tomahawk_video_control_2_w )
}
-static void video_update_common( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, pen_t *pens )
+static void video_update_common( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, pen_t *pens )
{
astrof_state *state = machine.driver_data<astrof_state>();
offs_t offs;
@@ -410,9 +410,9 @@ static void video_update_common( running_machine &machine, bitmap_t *bitmap, con
pen_t pen = (data & 0x01) ? fore_pen : back_pen;
if (state->m_flipscreen)
- bitmap->pix32(y, 255 - x) = pen;
+ bitmap.pix32(y, 255 - x) = pen;
else
- bitmap->pix32(y, x) = pen;
+ bitmap.pix32(y, x) = pen;
x = x + 1;
data = data >> 1;
diff --git a/src/mame/drivers/atarisy4.c b/src/mame/drivers/atarisy4.c
index 8785be581d1..e0fc73a59f4 100644
--- a/src/mame/drivers/atarisy4.c
+++ b/src/mame/drivers/atarisy4.c
@@ -154,7 +154,7 @@ static SCREEN_UPDATE( atarisy4 )
for (y = cliprect.min_y; y <= cliprect.max_y; ++y)
{
UINT16 *src = &state->m_screen_ram[(offset + (4096 * y)) / 2];
- UINT32 *dest = &bitmap->pix32(y, cliprect.min_x);
+ UINT32 *dest = &bitmap.pix32(y, cliprect.min_x);
int x;
for (x = cliprect.min_x; x < cliprect.max_x; x += 2)
diff --git a/src/mame/drivers/avalnche.c b/src/mame/drivers/avalnche.c
index f28414ecd1d..a82638e253d 100644
--- a/src/mame/drivers/avalnche.c
+++ b/src/mame/drivers/avalnche.c
@@ -66,7 +66,7 @@ static SCREEN_UPDATE( avalnche )
else
pen = (data & 0x80) ? RGB_BLACK : RGB_WHITE;
- bitmap->pix32(y, x) = pen;
+ bitmap.pix32(y, x) = pen;
data = data << 1;
x = x + 1;
diff --git a/src/mame/drivers/backfire.c b/src/mame/drivers/backfire.c
index 019ac60387b..073a8285898 100644
--- a/src/mame/drivers/backfire.c
+++ b/src/mame/drivers/backfire.c
@@ -94,8 +94,8 @@ static SCREEN_UPDATE( backfire_left )
deco16ic_pf_update(state->m_deco_tilegen1, state->m_pf1_rowscroll, state->m_pf2_rowscroll);
deco16ic_pf_update(state->m_deco_tilegen2, state->m_pf3_rowscroll, state->m_pf4_rowscroll);
- screen.machine().priority_bitmap->fill(0);
- bitmap->fill(0x100, cliprect);
+ screen.machine().priority_bitmap.fill(0);
+ bitmap.fill(0x100, cliprect);
if (state->m_left_priority[0] == 0)
{
@@ -127,8 +127,8 @@ static SCREEN_UPDATE( backfire_right )
deco16ic_pf_update(state->m_deco_tilegen1, state->m_pf1_rowscroll, state->m_pf2_rowscroll);
deco16ic_pf_update(state->m_deco_tilegen2, state->m_pf3_rowscroll, state->m_pf4_rowscroll);
- screen.machine().priority_bitmap->fill(0);
- bitmap->fill(0x500, cliprect);
+ screen.machine().priority_bitmap.fill(0);
+ bitmap.fill(0x500, cliprect);
if (state->m_right_priority[0] == 0)
{
diff --git a/src/mame/drivers/beaminv.c b/src/mame/drivers/beaminv.c
index 2d0e04e8d47..330ce7dc3bd 100644
--- a/src/mame/drivers/beaminv.c
+++ b/src/mame/drivers/beaminv.c
@@ -180,7 +180,7 @@ static SCREEN_UPDATE( beaminv )
for (i = 0; i < 8; i++)
{
pen_t pen = (data & 0x01) ? RGB_WHITE : RGB_BLACK;
- bitmap->pix32(y, x) = pen;
+ bitmap.pix32(y, x) = pen;
data = data >> 1;
x = x + 1;
diff --git a/src/mame/drivers/berzerk.c b/src/mame/drivers/berzerk.c
index 119dd8553d1..3e86ef55455 100644
--- a/src/mame/drivers/berzerk.c
+++ b/src/mame/drivers/berzerk.c
@@ -465,7 +465,7 @@ static SCREEN_UPDATE( berzerk )
for (i = 0; i < 4; i++)
{
pen_t pen = (data & 0x80) ? pens[color >> 4] : RGB_BLACK;
- bitmap->pix32(y, x) = pen;
+ bitmap.pix32(y, x) = pen;
x = x + 1;
data = data << 1;
@@ -474,7 +474,7 @@ static SCREEN_UPDATE( berzerk )
for (; i < 8; i++)
{
pen_t pen = (data & 0x80) ? pens[color & 0x0f] : RGB_BLACK;
- bitmap->pix32(y, x) = pen;
+ bitmap.pix32(y, x) = pen;
x = x + 1;
data = data << 1;
diff --git a/src/mame/drivers/bestleag.c b/src/mame/drivers/bestleag.c
index 140234cd0a8..1bacb0c6922 100644
--- a/src/mame/drivers/bestleag.c
+++ b/src/mame/drivers/bestleag.c
@@ -107,7 +107,7 @@ Note: sprite chip is different than the other Big Striker sets and they
include several similiarities with other Playmark games (including
the sprite end code and the data being offset (i.e. spriteram starting from 0x16/2))
*/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
bestleag_state *state = machine.driver_data<bestleag_state>();
UINT16 *spriteram16 = state->m_spriteram;
diff --git a/src/mame/drivers/bfcobra.c b/src/mame/drivers/bfcobra.c
index 28b73bc11e5..f406fdc283d 100644
--- a/src/mame/drivers/bfcobra.c
+++ b/src/mame/drivers/bfcobra.c
@@ -376,7 +376,7 @@ static SCREEN_UPDATE( bfcobra )
{
UINT16 y_offset = (y + state->m_v_scroll) * 256;
src = &state->m_video_ram[offset + y_offset];
- dest = &bitmap->pix32(y);
+ dest = &bitmap.pix32(y);
for (x = cliprect.min_x; x <= cliprect.max_x / 2; ++x)
{
diff --git a/src/mame/drivers/big10.c b/src/mame/drivers/big10.c
index 8f61f9f641d..cf33cb407f0 100644
--- a/src/mame/drivers/big10.c
+++ b/src/mame/drivers/big10.c
@@ -94,7 +94,7 @@ static TIMER_DEVICE_CALLBACK( big10_interrupt )
static VIDEO_START( big10 )
{
VIDEO_START_CALL(generic_bitmapped);
- v9938_init (machine, 0, *machine.primary_screen, machine.generic.tmpbitmap, MODEL_V9938, VDP_MEM, big10_vdp_interrupt);
+ v9938_init (machine, 0, *machine.primary_screen, *machine.generic.tmpbitmap, MODEL_V9938, VDP_MEM, big10_vdp_interrupt);
v9938_reset(0);
}
diff --git a/src/mame/drivers/bingor.c b/src/mame/drivers/bingor.c
index 8ee82dfca13..8f07b20ddb6 100644
--- a/src/mame/drivers/bingor.c
+++ b/src/mame/drivers/bingor.c
@@ -462,7 +462,7 @@ static SCREEN_UPDATE(bingor)
bingor_state *state = screen.machine().driver_data<bingor_state>();
int x,y,count;
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
count = (0x2000/2);
@@ -475,22 +475,22 @@ static SCREEN_UPDATE(bingor)
color = (state->m_blit_ram[count] & 0xf000)>>12;
if((x+3)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y)
- bitmap->pix32(y, x+3) = screen.machine().pens[color];
+ bitmap.pix32(y, x+3) = screen.machine().pens[color];
color = (state->m_blit_ram[count] & 0x0f00)>>8;
if((x+2)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y)
- bitmap->pix32(y, x+2) = screen.machine().pens[color];
+ bitmap.pix32(y, x+2) = screen.machine().pens[color];
color = (state->m_blit_ram[count] & 0x00f0)>>4;
if((x+1)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y)
- bitmap->pix32(y, x+1) = screen.machine().pens[color];
+ bitmap.pix32(y, x+1) = screen.machine().pens[color];
color = (state->m_blit_ram[count] & 0x000f)>>0;
if((x+0)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y)
- bitmap->pix32(y, x+0) = screen.machine().pens[color];
+ bitmap.pix32(y, x+0) = screen.machine().pens[color];
count++;
}
diff --git a/src/mame/drivers/blackt96.c b/src/mame/drivers/blackt96.c
index 8b21e357658..4ac568eab54 100644
--- a/src/mame/drivers/blackt96.c
+++ b/src/mame/drivers/blackt96.c
@@ -68,7 +68,7 @@ static VIDEO_START( blackt96 )
{
}
-static void draw_strip(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int stripnum, int xbase, int ybase, int bg)
+static void draw_strip(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int stripnum, int xbase, int ybase, int bg)
{
blackt96_state *state = machine.driver_data<blackt96_state>();
const gfx_element *gfxspr = machine.gfx[1];
@@ -98,7 +98,7 @@ static void draw_strip(running_machine &machine, bitmap_t *bitmap, const rectang
}
-static void draw_main(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int bg)
+static void draw_main(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int bg)
{
blackt96_state *state = machine.driver_data<blackt96_state>();
@@ -135,7 +135,7 @@ static SCREEN_UPDATE( blackt96 )
int x,y;
const gfx_element *gfx = screen.machine().gfx[2];
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
draw_main(screen.machine(),bitmap,cliprect,1);
draw_main(screen.machine(),bitmap,cliprect,0);
diff --git a/src/mame/drivers/blitz68k.c b/src/mame/drivers/blitz68k.c
index d43a9f52fc1..ec88865289b 100644
--- a/src/mame/drivers/blitz68k.c
+++ b/src/mame/drivers/blitz68k.c
@@ -101,7 +101,7 @@ static SCREEN_UPDATE(blitz68k)
{
for(x = 0; x < 512; x++)
{
- bitmap->pix32(y, x) = screen.machine().pens[*src++];
+ bitmap.pix32(y, x) = screen.machine().pens[*src++];
}
}
@@ -123,10 +123,10 @@ static SCREEN_UPDATE(blitz68k_noblit)
for(x = 0; x < 512; )
{
UINT16 pen = *src++;
- bitmap->pix32(y, x++) = screen.machine().pens[(pen >> 8) & 0xf];
- bitmap->pix32(y, x++) = screen.machine().pens[(pen >> 12) & 0xf];
- bitmap->pix32(y, x++) = screen.machine().pens[(pen >> 0) & 0xf];
- bitmap->pix32(y, x++) = screen.machine().pens[(pen >> 4) & 0xf];
+ bitmap.pix32(y, x++) = screen.machine().pens[(pen >> 8) & 0xf];
+ bitmap.pix32(y, x++) = screen.machine().pens[(pen >> 12) & 0xf];
+ bitmap.pix32(y, x++) = screen.machine().pens[(pen >> 0) & 0xf];
+ bitmap.pix32(y, x++) = screen.machine().pens[(pen >> 4) & 0xf];
}
}
diff --git a/src/mame/drivers/bmcbowl.c b/src/mame/drivers/bmcbowl.c
index 41f0e4f09fd..34cd8bd94cb 100644
--- a/src/mame/drivers/bmcbowl.c
+++ b/src/mame/drivers/bmcbowl.c
@@ -140,7 +140,7 @@ static SCREEN_UPDATE( bmcbowl )
*/
int x,y,z,pixdat;
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
z=0;
for (y=0;y<230;y++)
@@ -150,30 +150,30 @@ static SCREEN_UPDATE( bmcbowl )
pixdat = state->m_vid2[0x8000+z];
if(pixdat&0xff)
- bitmap->pix16(y, x+1) = (pixdat&0xff);
+ bitmap.pix16(y, x+1) = (pixdat&0xff);
if(pixdat>>8)
- bitmap->pix16(y, x) = (pixdat>>8);
+ bitmap.pix16(y, x) = (pixdat>>8);
pixdat = state->m_vid2[z];
if(pixdat&0xff)
- bitmap->pix16(y, x+1) = (pixdat&0xff);
+ bitmap.pix16(y, x+1) = (pixdat&0xff);
if(pixdat>>8)
- bitmap->pix16(y, x) = (pixdat>>8);
+ bitmap.pix16(y, x) = (pixdat>>8);
pixdat = state->m_vid1[0x8000+z];
if(pixdat&0xff)
- bitmap->pix16(y, x+1) = (pixdat&0xff);
+ bitmap.pix16(y, x+1) = (pixdat&0xff);
if(pixdat>>8)
- bitmap->pix16(y, x) = (pixdat>>8);
+ bitmap.pix16(y, x) = (pixdat>>8);
pixdat = state->m_vid1[z];
if(pixdat&0xff)
- bitmap->pix16(y, x+1) = (pixdat&0xff);
+ bitmap.pix16(y, x+1) = (pixdat&0xff);
if(pixdat>>8)
- bitmap->pix16(y, x) = (pixdat>>8);
+ bitmap.pix16(y, x) = (pixdat>>8);
z++;
}
diff --git a/src/mame/drivers/bnstars.c b/src/mame/drivers/bnstars.c
index 7ff9fea7ead..b270eed2fe1 100644
--- a/src/mame/drivers/bnstars.c
+++ b/src/mame/drivers/bnstars.c
@@ -200,7 +200,7 @@ static WRITE32_HANDLER( ms32_bg1_ram_w )
/* ROZ Layers */
-static void draw_roz(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int priority, int chip)
+static void draw_roz(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int priority, int chip)
{
bnstars_state *state = machine.driver_data<bnstars_state>();
/* TODO: registers 0x40/4 / 0x44/4 and 0x50/4 / 0x54/4 are used, meaning unknown */
@@ -351,7 +351,7 @@ static WRITE32_HANDLER( ms32_pal1_ram_w )
/* SPRITES based on tetrisp2 for now, readd priority bits later */
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, UINT32 *sprram_top, size_t sprram_size, int region)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, UINT32 *sprram_top, size_t sprram_size, int region)
{
bnstars_state *state = machine.driver_data<bnstars_state>();
/***************************************************************************
@@ -515,9 +515,9 @@ static SCREEN_UPDATE(bnstars_left)
{
bnstars_state *state = screen.machine().driver_data<bnstars_state>();
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
- bitmap->fill(0, cliprect); /* bg color */
+ bitmap.fill(0, cliprect); /* bg color */
tilemap_set_scrollx(state->m_ms32_bg_tilemap[0], 0, state->m_ms32_bg0_scroll[0x00/4] + state->m_ms32_bg0_scroll[0x08/4] + 0x10 );
@@ -540,9 +540,9 @@ static SCREEN_UPDATE(bnstars_right)
{
bnstars_state *state = screen.machine().driver_data<bnstars_state>();
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
- bitmap->fill(0x8000+0, cliprect); /* bg color */
+ bitmap.fill(0x8000+0, cliprect); /* bg color */
tilemap_set_scrollx(state->m_ms32_bg_tilemap[1], 0, state->m_ms32_bg1_scroll[0x00/4] + state->m_ms32_bg1_scroll[0x08/4] + 0x10 );
diff --git a/src/mame/drivers/boxer.c b/src/mame/drivers/boxer.c
index df0bc1c099f..01339bc1983 100644
--- a/src/mame/drivers/boxer.c
+++ b/src/mame/drivers/boxer.c
@@ -109,7 +109,7 @@ static PALETTE_INIT( boxer )
palette_set_color(machine,3, MAKE_RGB(0x00,0x00,0x00));
}
-static void draw_boxer( running_machine &machine, bitmap_t* bitmap, const rectangle &cliprect )
+static void draw_boxer( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
boxer_state *state = machine.driver_data<boxer_state>();
int n;
@@ -162,7 +162,7 @@ static SCREEN_UPDATE( boxer )
boxer_state *state = screen.machine().driver_data<boxer_state>();
int i, j;
- bitmap->fill(1, cliprect);
+ bitmap.fill(1, cliprect);
for (i = 0; i < 16; i++)
{
diff --git a/src/mame/drivers/cabaret.c b/src/mame/drivers/cabaret.c
index 0013cd32d61..b3f29f48b18 100644
--- a/src/mame/drivers/cabaret.c
+++ b/src/mame/drivers/cabaret.c
@@ -107,7 +107,7 @@ static VIDEO_START(cabaret)
static SCREEN_UPDATE(cabaret)
{
cabaret_state *state = screen.machine().driver_data<cabaret_state>();
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
diff --git a/src/mame/drivers/cardline.c b/src/mame/drivers/cardline.c
index 82f3ea1255d..5fe85c60866 100644
--- a/src/mame/drivers/cardline.c
+++ b/src/mame/drivers/cardline.c
@@ -48,7 +48,7 @@ static SCREEN_UPDATE( cardline )
{
cardline_state *state = screen.machine().driver_data<cardline_state>();
int x,y;
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
for(y=0;y<32;y++)
{
for(x=0;x<64;x++)
diff --git a/src/mame/drivers/cb2001.c b/src/mame/drivers/cb2001.c
index 1dd16d71de2..ee0669a8eac 100644
--- a/src/mame/drivers/cb2001.c
+++ b/src/mame/drivers/cb2001.c
@@ -325,7 +325,7 @@ static SCREEN_UPDATE(cb2001)
{
cb2001_state *state = screen.machine().driver_data<cb2001_state>();
int count,x,y;
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
count = 0x0000;
diff --git a/src/mame/drivers/champbwl.c b/src/mame/drivers/champbwl.c
index 055723c5b48..9e0105a1ab5 100644
--- a/src/mame/drivers/champbwl.c
+++ b/src/mame/drivers/champbwl.c
@@ -451,7 +451,7 @@ static MACHINE_RESET( champbwl )
SCREEN_UPDATE( champbwl )
{
- bitmap->fill(0x1f0, cliprect);
+ bitmap.fill(0x1f0, cliprect);
screen.machine().device<seta001_device>("spritegen")->set_fg_yoffsets( -0x12, 0x0e );
screen.machine().device<seta001_device>("spritegen")->set_bg_yoffsets( 0x1, -0x1 );
@@ -509,7 +509,7 @@ MACHINE_CONFIG_END
static SCREEN_UPDATE( doraemon )
{
- bitmap->fill(0x1f0, cliprect);
+ bitmap.fill(0x1f0, cliprect);
screen.machine().device<seta001_device>("spritegen")->set_bg_yoffsets( 0x00, 0x01 );
screen.machine().device<seta001_device>("spritegen")->set_fg_yoffsets( 0x00, 0x10 );
diff --git a/src/mame/drivers/chanbara.c b/src/mame/drivers/chanbara.c
index 998d0ef5964..75de1293e83 100644
--- a/src/mame/drivers/chanbara.c
+++ b/src/mame/drivers/chanbara.c
@@ -148,7 +148,7 @@ static VIDEO_START(chanbara )
tilemap_set_transparent_pen(state->m_bg_tilemap, 0);
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
chanbara_state *state = machine.driver_data<chanbara_state>();
int offs;
diff --git a/src/mame/drivers/chsuper.c b/src/mame/drivers/chsuper.c
index 1fd0186dae9..4a6b199f16f 100644
--- a/src/mame/drivers/chsuper.c
+++ b/src/mame/drivers/chsuper.c
@@ -65,7 +65,7 @@ bool chsuper_state::screen_update( screen_device &screen, bitmap_t &bitmap, cons
{
int tile = ((m_vram[count+1]<<8) | m_vram[count]) & 0xffff;
- drawgfx_opaque(&bitmap,cliprect,gfx,tile,0,0,0,x*4,y*8);
+ drawgfx_opaque(bitmap,cliprect,gfx,tile,0,0,0,x*4,y*8);
count+=2;
}
}
diff --git a/src/mame/drivers/clayshoo.c b/src/mame/drivers/clayshoo.c
index 79a46e90169..a75eb8b1ef1 100644
--- a/src/mame/drivers/clayshoo.c
+++ b/src/mame/drivers/clayshoo.c
@@ -198,7 +198,7 @@ static SCREEN_UPDATE( clayshoo )
for (i = 0; i < 8; i++)
{
pen_t pen = (data & 0x80) ? RGB_WHITE : RGB_BLACK;
- bitmap->pix32(y, x) = pen;
+ bitmap.pix32(y, x) = pen;
data = data << 1;
x = x + 1;
diff --git a/src/mame/drivers/cntsteer.c b/src/mame/drivers/cntsteer.c
index 24259c0f25e..e80be3789bf 100644
--- a/src/mame/drivers/cntsteer.c
+++ b/src/mame/drivers/cntsteer.c
@@ -146,7 +146,7 @@ Sprite list:
[2] xxxx xxxx X attribute
[3] xxxx xxxx sprite number
*/
-static void zerotrgt_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void zerotrgt_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
cntsteer_state *state = machine.driver_data<cntsteer_state>();
int offs;
@@ -204,7 +204,7 @@ static void zerotrgt_draw_sprites( running_machine &machine, bitmap_t *bitmap, c
---- --xx tile bank
*/
-static void cntsteer_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void cntsteer_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
cntsteer_state *state = machine.driver_data<cntsteer_state>();
int offs;
@@ -258,7 +258,7 @@ static SCREEN_UPDATE( zerotrgt )
cntsteer_state *state = screen.machine().driver_data<cntsteer_state>();
if (state->m_disable_roz)
- bitmap->fill(screen.machine().pens[8 * state->m_bg_color_bank], cliprect);
+ bitmap.fill(screen.machine().pens[8 * state->m_bg_color_bank], cliprect);
else
{
int p1, p2, p3, p4;
@@ -309,7 +309,7 @@ static SCREEN_UPDATE( cntsteer )
cntsteer_state *state = screen.machine().driver_data<cntsteer_state>();
if (state->m_disable_roz)
- bitmap->fill(screen.machine().pens[8 * state->m_bg_color_bank], cliprect);
+ bitmap.fill(screen.machine().pens[8 * state->m_bg_color_bank], cliprect);
else
{
int p1, p2, p3, p4;
diff --git a/src/mame/drivers/cobra.c b/src/mame/drivers/cobra.c
index 83d0b82dadc..a6abc08497b 100644
--- a/src/mame/drivers/cobra.c
+++ b/src/mame/drivers/cobra.c
@@ -156,7 +156,7 @@ SCREEN_UPDATE( cobra )
cobra->polybuffer_ptr = 0;
}
- copybitmap_trans(bitmap, cobra->framebuffer, 0, 0, 0, 0, cliprect, 0);
+ copybitmap_trans(bitmap, *cobra->framebuffer, 0, 0, 0, 0, cliprect, 0);
return 0;
}
diff --git a/src/mame/drivers/coolpool.c b/src/mame/drivers/coolpool.c
index 7acfb852664..a497a8f8c32 100644
--- a/src/mame/drivers/coolpool.c
+++ b/src/mame/drivers/coolpool.c
@@ -54,12 +54,12 @@ static const UINT16 nvram_unlock_seq[] =
*
*************************************/
-static void amerdart_scanline(screen_device &screen, bitmap_t *bitmap, int scanline, const tms34010_display_params *params)
+static void amerdart_scanline(screen_device &screen, bitmap_t &bitmap, int scanline, const tms34010_display_params *params)
{
coolpool_state *state = screen.machine().driver_data<coolpool_state>();
UINT16 *vram = &state->m_vram_base[(params->rowaddr << 8) & 0xff00];
- UINT32 *dest = &bitmap->pix32(scanline);
+ UINT32 *dest = &bitmap.pix32(scanline);
rgb_t pens[16];
int coladdr = params->coladdr;
int x;
@@ -83,12 +83,12 @@ static void amerdart_scanline(screen_device &screen, bitmap_t *bitmap, int scanl
}
-static void coolpool_scanline(screen_device &screen, bitmap_t *bitmap, int scanline, const tms34010_display_params *params)
+static void coolpool_scanline(screen_device &screen, bitmap_t &bitmap, int scanline, const tms34010_display_params *params)
{
coolpool_state *state = screen.machine().driver_data<coolpool_state>();
UINT16 *vram = &state->m_vram_base[(params->rowaddr << 8) & 0x1ff00];
- UINT32 *dest = &bitmap->pix32(scanline);
+ UINT32 *dest = &bitmap.pix32(scanline);
const rgb_t *pens = tlc34076_get_pens(screen.machine().device("tlc34076"));
int coladdr = params->coladdr;
int x;
diff --git a/src/mame/drivers/coolridr.c b/src/mame/drivers/coolridr.c
index 1bfc7f5dd2a..00d0109f8d2 100644
--- a/src/mame/drivers/coolridr.c
+++ b/src/mame/drivers/coolridr.c
@@ -356,7 +356,7 @@ static SCREEN_UPDATE(coolridr)
}
}
- copybitmap_trans(bitmap, state->m_temp_bitmap_sprites, 0, 0, 0, 0, cliprect, 0);
+ copybitmap_trans(bitmap, *state->m_temp_bitmap_sprites, 0, 0, 0, 0, cliprect, 0);
state->m_temp_bitmap_sprites->fill(0, cliprect);
@@ -479,7 +479,7 @@ static WRITE32_HANDLER( sysh1_txt_blit_w )
x2 = (state->m_attr_buff[9] & 0x000001ff);
clip = state->m_temp_bitmap_sprites->cliprect();
- drawgfx_opaque(state->m_temp_bitmap_sprites,clip,gfx,1,1,0,0,x2,y2);
+ drawgfx_opaque(*state->m_temp_bitmap_sprites,clip,gfx,1,1,0,0,x2,y2);
}
}
if(state->m_attr_index == 0xc)
diff --git a/src/mame/drivers/corona.c b/src/mame/drivers/corona.c
index 1591b46b9a2..1485ead4d78 100644
--- a/src/mame/drivers/corona.c
+++ b/src/mame/drivers/corona.c
@@ -454,7 +454,7 @@ static SCREEN_UPDATE(winner)
for (y = 0; y < 256; y++)
for (x = 0; x < 256; x++)
- bitmap->pix16(y, x) = state->m_videobuf[y * 512 + x];
+ bitmap.pix16(y, x) = state->m_videobuf[y * 512 + x];
return 0;
}
@@ -466,7 +466,7 @@ static SCREEN_UPDATE(luckyrlt)
for (y = 0; y < 256; y++)
for (x = 0; x < 256; x++)
- bitmap->pix16(255 - y, x) = state->m_videobuf[y * 512 + x];
+ bitmap.pix16(255 - y, x) = state->m_videobuf[y * 512 + x];
return 0;
}
diff --git a/src/mame/drivers/cps3.c b/src/mame/drivers/cps3.c
index c297a81f746..5b6ac63df4a 100644
--- a/src/mame/drivers/cps3.c
+++ b/src/mame/drivers/cps3.c
@@ -410,7 +410,7 @@ Notes:
static void copy_from_nvram(running_machine &machine);
-INLINE void cps3_drawgfxzoom(bitmap_t *dest_bmp,const rectangle &clip,const gfx_element *gfx,
+INLINE void cps3_drawgfxzoom(bitmap_t &dest_bmp,const rectangle &clip,const gfx_element *gfx,
unsigned int code,unsigned int color,int flipx,int flipy,int sx,int sy,
int transparency,int transparent_color,
int scalex, int scaley,bitmap_t *pri_buffer,UINT32 pri_mask)
@@ -441,7 +441,7 @@ INLINE void cps3_drawgfxzoom(bitmap_t *dest_bmp,const rectangle &clip,const gfx_
/* force clip to bitmap boundary */
myclip = clip;
- myclip &= dest_bmp->cliprect();
+ myclip &= dest_bmp.cliprect();
/* 32-bit ONLY */
{
@@ -521,7 +521,7 @@ INLINE void cps3_drawgfxzoom(bitmap_t *dest_bmp,const rectangle &clip,const gfx_
for( y=sy; y<ey; y++ )
{
const UINT8 *source = source_base + (y_index>>16) * gfx->line_modulo;
- UINT32 *dest = &dest_bmp->pix32(y);
+ UINT32 *dest = &dest_bmp.pix32(y);
int x, x_index = x_index_base;
for( x=sx; x<ex; x++ )
@@ -540,7 +540,7 @@ INLINE void cps3_drawgfxzoom(bitmap_t *dest_bmp,const rectangle &clip,const gfx_
for( y=sy; y<ey; y++ )
{
const UINT8 *source = source_base + (y_index>>16) * gfx->line_modulo;
- UINT32 *dest = &dest_bmp->pix32(y);
+ UINT32 *dest = &dest_bmp.pix32(y);
int x, x_index = x_index_base;
for( x=sx; x<ex; x++ )
@@ -560,7 +560,7 @@ INLINE void cps3_drawgfxzoom(bitmap_t *dest_bmp,const rectangle &clip,const gfx_
for( y=sy; y<ey; y++ )
{
const UINT8 *source = source_base + (y_index>>16) * gfx->line_modulo;
- UINT32 *dest = &dest_bmp->pix32(y);
+ UINT32 *dest = &dest_bmp.pix32(y);
int x, x_index = x_index_base;
for( x=sx; x<ex; x++ )
@@ -580,7 +580,7 @@ INLINE void cps3_drawgfxzoom(bitmap_t *dest_bmp,const rectangle &clip,const gfx_
for( y=sy; y<ey; y++ )
{
const UINT8 *source = source_base + (y_index>>16) * gfx->line_modulo;
- UINT32 *dest = &dest_bmp->pix32(y);
+ UINT32 *dest = &dest_bmp.pix32(y);
int x, x_index = x_index_base;
for( x=sx; x<ex; x++ )
@@ -858,7 +858,7 @@ static VIDEO_START(cps3)
// the 0x400 bit in the tilemap regs is "draw it upside-down" (bios tilemap during flashing, otherwise capcom logo is flipped)
-static void cps3_draw_tilemapsprite_line(running_machine &machine, int tmnum, int drawline, bitmap_t *bitmap, const rectangle &cliprect )
+static void cps3_draw_tilemapsprite_line(running_machine &machine, int tmnum, int drawline, bitmap_t &bitmap, const rectangle &cliprect )
{
cps3_state *state = machine.driver_data<cps3_state>();
UINT32* tmapregs[4] = { state->m_tilemap20_regs_base, state->m_tilemap30_regs_base, state->m_tilemap40_regs_base, state->m_tilemap50_regs_base };
@@ -1093,7 +1093,7 @@ static SCREEN_UPDATE(cps3)
{
for (uu=0;uu<1023;uu++)
{
- cps3_draw_tilemapsprite_line(screen.machine(), tilemapnum, uu, state->m_renderbuffer_bitmap, state->m_renderbuffer_clip );
+ cps3_draw_tilemapsprite_line(screen.machine(), tilemapnum, uu, *state->m_renderbuffer_bitmap, state->m_renderbuffer_clip );
}
}
bg_drawn[tilemapnum] = 1;
@@ -1180,11 +1180,11 @@ static SCREEN_UPDATE(cps3)
if (global_alpha || alpha)
{
- cps3_drawgfxzoom(state->m_renderbuffer_bitmap,state->m_renderbuffer_clip,screen.machine().gfx[1],realtileno,actualpal,0^flipx,0^flipy,current_xpos,current_ypos,CPS3_TRANSPARENCY_PEN_INDEX_BLEND,0,xinc,yinc, NULL, 0);
+ cps3_drawgfxzoom(*state->m_renderbuffer_bitmap,state->m_renderbuffer_clip,screen.machine().gfx[1],realtileno,actualpal,0^flipx,0^flipy,current_xpos,current_ypos,CPS3_TRANSPARENCY_PEN_INDEX_BLEND,0,xinc,yinc, NULL, 0);
}
else
{
- cps3_drawgfxzoom(state->m_renderbuffer_bitmap,state->m_renderbuffer_clip,screen.machine().gfx[1],realtileno,actualpal,0^flipx,0^flipy,current_xpos,current_ypos,CPS3_TRANSPARENCY_PEN_INDEX,0,xinc,yinc, NULL, 0);
+ cps3_drawgfxzoom(*state->m_renderbuffer_bitmap,state->m_renderbuffer_clip,screen.machine().gfx[1],realtileno,actualpal,0^flipx,0^flipy,current_xpos,current_ypos,CPS3_TRANSPARENCY_PEN_INDEX,0,xinc,yinc, NULL, 0);
}
count++;
}
@@ -1210,7 +1210,7 @@ static SCREEN_UPDATE(cps3)
srcy=0;
for (rendery=0;rendery<224;rendery++)
{
- dstbitmap = &bitmap->pix32(rendery);
+ dstbitmap = &bitmap.pix32(rendery);
srcbitmap = &state->m_renderbuffer_bitmap->pix32(srcy>>16);
srcx=0;
diff --git a/src/mame/drivers/crystal.c b/src/mame/drivers/crystal.c
index 5a0fe106a93..cc171062830 100644
--- a/src/mame/drivers/crystal.c
+++ b/src/mame/drivers/crystal.c
@@ -689,7 +689,7 @@ static SCREEN_UPDATE( crystal )
srcline = (UINT16 *) Visible;
for (y = 0; y < 240; y++)
- memcpy(&bitmap->pix16(y), &srcline[y * 512], width * 2);
+ memcpy(&bitmap.pix16(y), &srcline[y * 512], width * 2);
return 0;
}
diff --git a/src/mame/drivers/cshooter.c b/src/mame/drivers/cshooter.c
index ab373cf40de..3ef96b4f59d 100644
--- a/src/mame/drivers/cshooter.c
+++ b/src/mame/drivers/cshooter.c
@@ -138,7 +138,7 @@ static VIDEO_START(cshooter)
static SCREEN_UPDATE(cshooter)
{
cshooter_state *state = screen.machine().driver_data<cshooter_state>();
- bitmap->fill(0/*get_black_pen(screen.screen.machine(, cliprect))*/);
+ bitmap.fill(0/*get_black_pen(screen.screen.machine(, cliprect))*/);
tilemap_mark_all_tiles_dirty(state->m_txtilemap);
//sprites
diff --git a/src/mame/drivers/csplayh5.c b/src/mame/drivers/csplayh5.c
index ee865b144ab..4709799f643 100644
--- a/src/mame/drivers/csplayh5.c
+++ b/src/mame/drivers/csplayh5.c
@@ -63,16 +63,16 @@ static VIDEO_START( csplayh5 )
{
csplayh5_state *state = machine.driver_data<csplayh5_state>();
state->m_vdp0_bitmap = machine.primary_screen->alloc_compatible_bitmap();
- v9938_init (machine, 0, *machine.primary_screen, state->m_vdp0_bitmap, MODEL_V9958, 0x20000, csplayh5_vdp0_interrupt);
+ v9938_init (machine, 0, *machine.primary_screen, *state->m_vdp0_bitmap, MODEL_V9958, 0x20000, csplayh5_vdp0_interrupt);
v9938_reset(0);
}
static SCREEN_UPDATE( csplayh5 )
{
csplayh5_state *state = screen.machine().driver_data<csplayh5_state>();
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
- copybitmap(bitmap, state->m_vdp0_bitmap, 0, 0, 0, 0, cliprect);
+ copybitmap(bitmap, *state->m_vdp0_bitmap, 0, 0, 0, 0, cliprect);
return 0;
}
diff --git a/src/mame/drivers/cubeqst.c b/src/mame/drivers/cubeqst.c
index cb11c040174..d07ad757e8e 100644
--- a/src/mame/drivers/cubeqst.c
+++ b/src/mame/drivers/cubeqst.c
@@ -104,7 +104,7 @@ static SCREEN_UPDATE( cubeqst )
*/
/* Bit 3 selects LD/#GRAPHICS */
- bitmap->fill(state->m_colormap[255], cliprect);
+ bitmap.fill(state->m_colormap[255], cliprect);
/* TODO: Add 1 for linebuffering? */
for (y = cliprect.min_y; y <= cliprect.max_y; ++y)
@@ -112,7 +112,7 @@ static SCREEN_UPDATE( cubeqst )
int i;
int num_entries = cubeqcpu_get_ptr_ram_val(screen.machine().device("line_cpu"), y);
UINT32 *stk_ram = cubeqcpu_get_stack_ram(screen.machine().device("line_cpu"));
- UINT32 *dest = &bitmap->pix32(y);
+ UINT32 *dest = &bitmap.pix32(y);
UINT32 pen;
/* Zap the depth buffer */
diff --git a/src/mame/drivers/cybertnk.c b/src/mame/drivers/cybertnk.c
index 4e722552897..9c21989576a 100644
--- a/src/mame/drivers/cybertnk.c
+++ b/src/mame/drivers/cybertnk.c
@@ -206,24 +206,24 @@ static VIDEO_START( cybertnk )
tilemap_set_transparent_pen(state->m_tx_tilemap,0);
}
-static void draw_pixel( bitmap_t* bitmap, const rectangle &cliprect, int y, int x, int pen)
+static void draw_pixel( bitmap_t &bitmap, const rectangle &cliprect, int y, int x, int pen)
{
if (x>cliprect.max_x) return;
if (x<cliprect.min_x) return;
if (y>cliprect.max_y) return;
if (y<cliprect.min_y) return;
- bitmap->pix16(y, x) = pen;
+ bitmap.pix16(y, x) = pen;
}
-static UINT32 update_screen(screen_device &screen, bitmap_t *bitmap, const rectangle &cliprect, int screen_shift)
+static UINT32 update_screen(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect, int screen_shift)
{
cybertnk_state *state = screen.machine().driver_data<cybertnk_state>();
tilemap_set_scrolldx(state->m_tx_tilemap, screen_shift, screen_shift);
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
{
int i;
@@ -460,7 +460,7 @@ static UINT32 update_screen(screen_device &screen, bitmap_t *bitmap, const recta
popmessage("%02x %02x %04x %02x",state->m_test_x,state->m_test_y,state->m_start_offs,state->m_color_pen);
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
count = (state->m_start_offs);
@@ -477,28 +477,28 @@ static UINT32 update_screen(screen_device &screen, bitmap_t *bitmap, const recta
color|= ((blit_ram[count+3] & 0xff) << 0);
dot = (color & 0xf0000000) >> 28;
- bitmap->pix16(y, x+0) = screen.machine().pens[dot+(state->m_color_pen<<4)];
+ bitmap.pix16(y, x+0) = screen.machine().pens[dot+(state->m_color_pen<<4)];
dot = (color & 0x0f000000) >> 24;
- bitmap->pix16(y, x+4) = screen.machine().pens[dot+(state->m_color_pen<<4)];
+ bitmap.pix16(y, x+4) = screen.machine().pens[dot+(state->m_color_pen<<4)];
dot = (color & 0x00f00000) >> 20;
- bitmap->pix16(y, x+1) = screen.machine().pens[dot+(state->m_color_pen<<4)];
+ bitmap.pix16(y, x+1) = screen.machine().pens[dot+(state->m_color_pen<<4)];
dot = (color & 0x000f0000) >> 16;
- bitmap->pix16(y, x+5) = screen.machine().pens[dot+(state->m_color_pen<<4)];
+ bitmap.pix16(y, x+5) = screen.machine().pens[dot+(state->m_color_pen<<4)];
dot = (color & 0x0000f000) >> 12;
- bitmap->pix16(y, x+2) = screen.machine().pens[dot+(state->m_color_pen<<4)];
+ bitmap.pix16(y, x+2) = screen.machine().pens[dot+(state->m_color_pen<<4)];
dot = (color & 0x00000f00) >> 8;
- bitmap->pix16(y, x+6) = screen.machine().pens[dot+(state->m_color_pen<<4)];
+ bitmap.pix16(y, x+6) = screen.machine().pens[dot+(state->m_color_pen<<4)];
dot = (color & 0x000000f0) >> 4;
- bitmap->pix16(y, x+3) = screen.machine().pens[dot+(state->m_color_pen<<4)];
+ bitmap.pix16(y, x+3) = screen.machine().pens[dot+(state->m_color_pen<<4)];
dot = (color & 0x0000000f) >> 0;
- bitmap->pix16(y, x+7) = screen.machine().pens[dot+(state->m_color_pen<<4)];
+ bitmap.pix16(y, x+7) = screen.machine().pens[dot+(state->m_color_pen<<4)];
count+=4;
}
diff --git a/src/mame/drivers/dacholer.c b/src/mame/drivers/dacholer.c
index adb95d28454..0d0fd0fc743 100644
--- a/src/mame/drivers/dacholer.c
+++ b/src/mame/drivers/dacholer.c
@@ -104,7 +104,7 @@ static WRITE8_HANDLER( bg_scroll_y_w )
state->m_scroll_y = data;
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
dacholer_state *state = machine.driver_data<dacholer_state>();
int offs, code, attr, sx, sy, flipx, flipy;
diff --git a/src/mame/drivers/dai3wksi.c b/src/mame/drivers/dai3wksi.c
index 8b988d089c0..d7a9ef3f7f3 100644
--- a/src/mame/drivers/dai3wksi.c
+++ b/src/mame/drivers/dai3wksi.c
@@ -158,9 +158,9 @@ static SCREEN_UPDATE( dai3wksi )
pen_t pen = (data & (1 << i)) ? pens[color] : pens[0];
if (state->m_dai3wksi_flipscreen)
- bitmap->pix32(255-y, 255-x) = pen;
+ bitmap.pix32(255-y, 255-x) = pen;
else
- bitmap->pix32(y, x) = pen;
+ bitmap.pix32(y, x) = pen;
x++;
}
diff --git a/src/mame/drivers/darkhors.c b/src/mame/drivers/darkhors.c
index 9e6b1a4b003..c2e0176f7d4 100644
--- a/src/mame/drivers/darkhors.c
+++ b/src/mame/drivers/darkhors.c
@@ -129,7 +129,7 @@ static WRITE32_HANDLER( darkhors_tmapram2_w )
tilemap_mark_tile_dirty(state->m_tmap2, offset);
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
darkhors_state *state = machine.driver_data<darkhors_state>();
UINT32 *s = state->m_spriteram;
@@ -195,7 +195,7 @@ static SCREEN_UPDATE( darkhors )
}
#endif
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
tilemap_set_scrollx(state->m_tmap,0, (state->m_tmapscroll[0] >> 16) - 5);
tilemap_set_scrolly(state->m_tmap,0, (state->m_tmapscroll[0] & 0xffff) - 0xff );
diff --git a/src/mame/drivers/dblewing.c b/src/mame/drivers/dblewing.c
index 629eec8f187..0f57d6f4025 100644
--- a/src/mame/drivers/dblewing.c
+++ b/src/mame/drivers/dblewing.c
@@ -101,8 +101,8 @@ static SCREEN_UPDATE(dblewing)
flip_screen_set(screen.machine(), BIT(flip, 7));
deco16ic_pf_update(state->m_deco_tilegen1, state->m_pf1_rowscroll, state->m_pf2_rowscroll);
- bitmap->fill(0, cliprect); /* not Confirmed */
- screen.machine().priority_bitmap->fill(0);
+ bitmap.fill(0, cliprect); /* not Confirmed */
+ screen.machine().priority_bitmap.fill(0);
deco16ic_tilemap_2_draw(state->m_deco_tilegen1, bitmap, cliprect, 0, 2);
deco16ic_tilemap_1_draw(state->m_deco_tilegen1, bitmap, cliprect, 0, 4);
diff --git a/src/mame/drivers/ddealer.c b/src/mame/drivers/ddealer.c
index 93c6bcbe368..7a44e206d1b 100644
--- a/src/mame/drivers/ddealer.c
+++ b/src/mame/drivers/ddealer.c
@@ -166,7 +166,7 @@ static VIDEO_START( ddealer )
state->m_back_tilemap = tilemap_create(machine, get_back_tile_info, tilemap_scan_cols, 8, 8, 64, 32);
}
-static void ddealer_draw_video_layer( running_machine &machine, UINT16* vreg_base, UINT16* top, UINT16* bottom, bitmap_t* bitmap, const rectangle &cliprect, int flipy)
+static void ddealer_draw_video_layer( running_machine &machine, UINT16* vreg_base, UINT16* top, UINT16* bottom, bitmap_t &bitmap, const rectangle &cliprect, int flipy)
{
const gfx_element *gfx = machine.gfx[1];
diff --git a/src/mame/drivers/ddenlovr.c b/src/mame/drivers/ddenlovr.c
index 1d60e7f30e6..61b322e26a7 100644
--- a/src/mame/drivers/ddenlovr.c
+++ b/src/mame/drivers/ddenlovr.c
@@ -1267,7 +1267,7 @@ static READ16_HANDLER( ddenlovr_gfxrom_r )
}
-static void copylayer(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int layer )
+static void copylayer(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int layer )
{
dynax_state *state = machine.driver_data<dynax_state>();
int x,y;
@@ -1294,7 +1294,7 @@ static void copylayer(running_machine &machine, bitmap_t *bitmap, const rectangl
{
pen &= penmask;
pen |= palbase;
- bitmap->pix16(y, x) = pen;
+ bitmap.pix16(y, x) = pen;
}
}
}
@@ -1341,7 +1341,7 @@ SCREEN_UPDATE(ddenlovr)
if (screen.machine().input().code_pressed_once(KEYCODE_F)) { base++; while ((gfx[base] & 0xf0) != 0x30) base++; }
#endif
- bitmap->fill(state->m_ddenlovr_bgcolor, cliprect);
+ bitmap.fill(state->m_ddenlovr_bgcolor, cliprect);
#ifdef MAME_DEBUG
if (screen.machine().input().code_pressed(KEYCODE_Z))
diff --git a/src/mame/drivers/deco156.c b/src/mame/drivers/deco156.c
index 60c1fd8bc03..d154ddd450d 100644
--- a/src/mame/drivers/deco156.c
+++ b/src/mame/drivers/deco156.c
@@ -63,8 +63,8 @@ static SCREEN_UPDATE( wcvol95 )
deco156_state *state = screen.machine().driver_data<deco156_state>();
- screen.machine().priority_bitmap->fill(0);
- bitmap->fill(0);
+ screen.machine().priority_bitmap.fill(0);
+ bitmap.fill(0);
deco16ic_pf_update(state->m_deco_tilegen1, state->m_pf1_rowscroll, state->m_pf2_rowscroll);
diff --git a/src/mame/drivers/destroyr.c b/src/mame/drivers/destroyr.c
index 444595cc970..8f115abe848 100644
--- a/src/mame/drivers/destroyr.c
+++ b/src/mame/drivers/destroyr.c
@@ -47,7 +47,7 @@ static SCREEN_UPDATE( destroyr )
destroyr_state *state = screen.machine().driver_data<destroyr_state>();
int i, j;
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
/* draw major objects */
for (i = 0; i < 16; i++)
@@ -104,7 +104,7 @@ static SCREEN_UPDATE( destroyr )
for (i = 0; i < 256; i++)
{
if (i & 4)
- bitmap->pix16(state->m_cursor ^ 0xff, i) = 7;
+ bitmap.pix16(state->m_cursor ^ 0xff, i) = 7;
}
return 0;
}
diff --git a/src/mame/drivers/dgpix.c b/src/mame/drivers/dgpix.c
index 478cd253c81..537f4aaf63c 100644
--- a/src/mame/drivers/dgpix.c
+++ b/src/mame/drivers/dgpix.c
@@ -294,7 +294,7 @@ static SCREEN_UPDATE( dgpix )
{
int x;
UINT32 *src = &state->m_vram[(state->m_vbuffer ? 0 : 0x10000) | (y << 8)];
- UINT16 *dest = &bitmap->pix16(y);
+ UINT16 *dest = &bitmap.pix16(y);
for (x = 0; x < 320; x += 2)
{
diff --git a/src/mame/drivers/discoboy.c b/src/mame/drivers/discoboy.c
index 9536147e281..72d57aaf747 100644
--- a/src/mame/drivers/discoboy.c
+++ b/src/mame/drivers/discoboy.c
@@ -76,7 +76,7 @@ static VIDEO_START( discoboy )
{
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
discoboy_state *state = machine.driver_data<discoboy_state>();
int flipscreen = 0;
@@ -157,7 +157,7 @@ static SCREEN_UPDATE( discoboy )
palette_set_color(screen.machine(), (i / 2) + 0x400, MAKE_RGB(r, g, b));
}
- bitmap->fill(0x3ff, cliprect);
+ bitmap.fill(0x3ff, cliprect);
for (y = 0; y < 32; y++)
{
diff --git a/src/mame/drivers/diverboy.c b/src/mame/drivers/diverboy.c
index 295230bc175..e2f97cb64ca 100644
--- a/src/mame/drivers/diverboy.c
+++ b/src/mame/drivers/diverboy.c
@@ -73,7 +73,7 @@ static VIDEO_START(diverboy)
{
}
-static void draw_sprites( running_machine& machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine& machine, bitmap_t &bitmap, const rectangle &cliprect )
{
diverboy_state *state = machine.driver_data<diverboy_state>();
UINT16 *source = state->m_spriteram;
@@ -111,7 +111,7 @@ static void draw_sprites( running_machine& machine, bitmap_t *bitmap, const rect
static SCREEN_UPDATE(diverboy)
{
-// bitmap->fill(get_black_pen(screen.machine()), cliprect);
+// bitmap.fill(get_black_pen(screen.machine()), cliprect);
draw_sprites(screen.machine(), bitmap, cliprect);
return 0;
}
diff --git a/src/mame/drivers/dmndrby.c b/src/mame/drivers/dmndrby.c
index 350a0381568..616f958dd04 100644
--- a/src/mame/drivers/dmndrby.c
+++ b/src/mame/drivers/dmndrby.c
@@ -347,7 +347,7 @@ static SCREEN_UPDATE(dderby)
const gfx_element *sprites = screen.machine().gfx[1];
const gfx_element *track = screen.machine().gfx[2];
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
/* Draw racetrack
diff --git a/src/mame/drivers/dominob.c b/src/mame/drivers/dominob.c
index 9c8d4e4e0aa..fa26ae86e5b 100644
--- a/src/mame/drivers/dominob.c
+++ b/src/mame/drivers/dominob.c
@@ -87,7 +87,7 @@ static VIDEO_START( dominob )
machine.gfx[0]->color_granularity = 8;
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
dominob_state *state = machine.driver_data<dominob_state>();
int offs;
diff --git a/src/mame/drivers/dorachan.c b/src/mame/drivers/dorachan.c
index b1d5282c2db..173d4ce9537 100644
--- a/src/mame/drivers/dorachan.c
+++ b/src/mame/drivers/dorachan.c
@@ -109,7 +109,7 @@ static SCREEN_UPDATE( dorachan )
for (i = 0; i < 8; i++)
{
UINT8 color = (data & 0x01) ? fore_color : RGB_BLACK;
- bitmap->pix32(y, x) = pens[color];
+ bitmap.pix32(y, x) = pens[color];
data = data >> 1;
x = x + 1;
diff --git a/src/mame/drivers/dotrikun.c b/src/mame/drivers/dotrikun.c
index eea17b95a37..66840d730f6 100644
--- a/src/mame/drivers/dotrikun.c
+++ b/src/mame/drivers/dotrikun.c
@@ -78,10 +78,10 @@ static SCREEN_UPDATE( dotrikun )
pen_t pen = ((data >> (7 - i)) & 1) ? fore_pen : back_pen;
/* I think the video hardware doubles pixels, screen would be too small otherwise */
- bitmap->pix32(y + 0, (x + 0) + i*2) = pen;
- bitmap->pix32(y + 0, (x + 1) + i*2) = pen;
- bitmap->pix32(y + 1, (x + 0) + i*2) = pen;
- bitmap->pix32(y + 1, (x + 1) + i*2) = pen;
+ bitmap.pix32(y + 0, (x + 0) + i*2) = pen;
+ bitmap.pix32(y + 0, (x + 1) + i*2) = pen;
+ bitmap.pix32(y + 1, (x + 0) + i*2) = pen;
+ bitmap.pix32(y + 1, (x + 1) + i*2) = pen;
}
}
}
diff --git a/src/mame/drivers/dreamwld.c b/src/mame/drivers/dreamwld.c
index 457a0501666..e8285a21503 100644
--- a/src/mame/drivers/dreamwld.c
+++ b/src/mame/drivers/dreamwld.c
@@ -150,7 +150,7 @@ public:
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
dreamwld_state *state = machine.driver_data<dreamwld_state>();
const gfx_element *gfx = machine.gfx[0];
diff --git a/src/mame/drivers/drtomy.c b/src/mame/drivers/drtomy.c
index 9696388ecf4..2db3e041c59 100644
--- a/src/mame/drivers/drtomy.c
+++ b/src/mame/drivers/drtomy.c
@@ -68,7 +68,7 @@ static TILE_GET_INFO( get_tile_info_bg )
3 | xxxxxxxx xxxxxx-- | sprite code
*/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
drtomy_state *state = machine.driver_data<drtomy_state>();
int i, x, y, ex, ey;
diff --git a/src/mame/drivers/dunhuang.c b/src/mame/drivers/dunhuang.c
index ff98e3f0825..ce75b46c566 100644
--- a/src/mame/drivers/dunhuang.c
+++ b/src/mame/drivers/dunhuang.c
@@ -147,7 +147,7 @@ if (screen.machine().input().code_pressed(KEYCODE_Z))
}
#endif
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
switch (state->m_layers)
{
diff --git a/src/mame/drivers/dwarfd.c b/src/mame/drivers/dwarfd.c
index 849d3a7cbf5..21d78245805 100644
--- a/src/mame/drivers/dwarfd.c
+++ b/src/mame/drivers/dwarfd.c
@@ -774,7 +774,7 @@ static VIDEO_START(dwarfd)
{
}
-static void drawCrt( running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect )
+static void drawCrt( running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect )
{
dwarfd_state *state = machine.driver_data<dwarfd_state>();
int x, y;
@@ -837,7 +837,7 @@ static void drawCrt( running_machine &machine, bitmap_t *bitmap,const rectangle
static SCREEN_UPDATE( dwarfd )
{
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
drawCrt(screen.machine(), bitmap, cliprect);
return 0;
}
diff --git a/src/mame/drivers/egghunt.c b/src/mame/drivers/egghunt.c
index 0c73fb64431..ae45be4c807 100644
--- a/src/mame/drivers/egghunt.c
+++ b/src/mame/drivers/egghunt.c
@@ -69,7 +69,7 @@ public:
};
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect )
{
egghunt_state *state = machine.driver_data<egghunt_state>();
int flipscreen = 0;
diff --git a/src/mame/drivers/embargo.c b/src/mame/drivers/embargo.c
index 4b0f931ca95..317ba435920 100644
--- a/src/mame/drivers/embargo.c
+++ b/src/mame/drivers/embargo.c
@@ -47,7 +47,7 @@ static SCREEN_UPDATE( embargo )
for (i = 0; i < 8; i++)
{
pen_t pen = (data & 0x01) ? RGB_WHITE : RGB_BLACK;
- bitmap->pix32(y, x) = pen;
+ bitmap.pix32(y, x) = pen;
data = data >> 1;
x = x + 1;
diff --git a/src/mame/drivers/enigma2.c b/src/mame/drivers/enigma2.c
index e160eefd45d..ca02dbe90c9 100644
--- a/src/mame/drivers/enigma2.c
+++ b/src/mame/drivers/enigma2.c
@@ -260,7 +260,7 @@ static SCREEN_UPDATE( enigma2 )
/* stars only appear at certain positions */
color = ((x & y & 0x0f) == 0x0f) ? star_color : 0;
- bitmap->pix32(bitmap_y, x) = pens[color];
+ bitmap.pix32(bitmap_y, x) = pens[color];
/* next pixel */
x = x + 1;
@@ -323,7 +323,7 @@ static SCREEN_UPDATE( enigma2a )
}
pen = bit ? RGB_WHITE : RGB_BLACK;
- bitmap->pix32(bitmap_y, x) = pen;
+ bitmap.pix32(bitmap_y, x) = pen;
/* next pixel */
x = x + 1;
diff --git a/src/mame/drivers/eolith16.c b/src/mame/drivers/eolith16.c
index 669dd8eb454..cb02885b1f4 100644
--- a/src/mame/drivers/eolith16.c
+++ b/src/mame/drivers/eolith16.c
@@ -133,10 +133,10 @@ static SCREEN_UPDATE( eolith16 )
for (x=0;x < 320/2;x++)
{
color = state->m_vram[count + (0x10000/2) * (state->m_vbuffer ^ 1)] & 0xff;
- bitmap->pix16(y, x*2 + 0) = color;
+ bitmap.pix16(y, x*2 + 0) = color;
color = (state->m_vram[count + (0x10000/2) * (state->m_vbuffer ^ 1)] & 0xff00) >> 8;
- bitmap->pix16(y, x*2 + 1) = color;
+ bitmap.pix16(y, x*2 + 1) = color;
count++;
}
diff --git a/src/mame/drivers/esh.c b/src/mame/drivers/esh.c
index 85411f08436..add583e9a1c 100644
--- a/src/mame/drivers/esh.c
+++ b/src/mame/drivers/esh.c
@@ -52,7 +52,7 @@ static SCREEN_UPDATE( esh )
int charx, chary;
/* clear */
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
/* Draw tiles */
for (charx = 0; charx < 32; charx++)
diff --git a/src/mame/drivers/f-32.c b/src/mame/drivers/f-32.c
index 2a3b39a6ec7..7b3756334e3 100644
--- a/src/mame/drivers/f-32.c
+++ b/src/mame/drivers/f-32.c
@@ -42,8 +42,8 @@ static SCREEN_UPDATE( mosaicf2 )
if ((x < 0xa0) && (y < 0xe0))
{
- bitmap->pix16(y, (x * 2) + 0) = (state->m_videoram[offs] >> 16) & 0x7fff;
- bitmap->pix16(y, (x * 2) + 1) = (state->m_videoram[offs] >> 0) & 0x7fff;
+ bitmap.pix16(y, (x * 2) + 0) = (state->m_videoram[offs] >> 16) & 0x7fff;
+ bitmap.pix16(y, (x * 2) + 1) = (state->m_videoram[offs] >> 0) & 0x7fff;
}
}
diff --git a/src/mame/drivers/fcrash.c b/src/mame/drivers/fcrash.c
index ad8d5571783..1f43bc70b45 100644
--- a/src/mame/drivers/fcrash.c
+++ b/src/mame/drivers/fcrash.c
@@ -126,7 +126,7 @@ static void fcrash_update_transmasks( running_machine &machine )
}
}
-static void fcrash_render_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void fcrash_render_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
cps_state *state = machine.driver_data<cps_state>();
int pos;
@@ -159,7 +159,7 @@ static void fcrash_render_sprites( running_machine &machine, bitmap_t *bitmap, c
}
-static void fcrash_render_layer( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int layer, int primask )
+static void fcrash_render_layer( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int layer, int primask )
{
cps_state *state = machine.driver_data<cps_state>();
@@ -176,9 +176,10 @@ static void fcrash_render_layer( running_machine &machine, bitmap_t *bitmap, con
}
}
-static void fcrash_render_high_layer( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int layer )
+static void fcrash_render_high_layer( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int layer )
{
cps_state *state = machine.driver_data<cps_state>();
+ bitmap_t dummy_bitmap;
switch (layer)
{
@@ -188,7 +189,7 @@ static void fcrash_render_high_layer( running_machine &machine, bitmap_t *bitmap
case 1:
case 2:
case 3:
- tilemap_draw(NULL, cliprect, state->m_bg_tilemap[layer - 1], TILEMAP_DRAW_LAYER0, 1);
+ tilemap_draw(dummy_bitmap, cliprect, state->m_bg_tilemap[layer - 1], TILEMAP_DRAW_LAYER0, 1);
break;
}
}
@@ -268,9 +269,9 @@ static SCREEN_UPDATE( fcrash )
tilemap_set_enable(state->m_bg_tilemap[2], 1);
/* Blank screen */
- bitmap->fill(0xbff, cliprect);
+ bitmap.fill(0xbff, cliprect);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
l0 = (layercontrol >> 0x06) & 03;
l1 = (layercontrol >> 0x08) & 03;
l2 = (layercontrol >> 0x0a) & 03;
@@ -349,9 +350,9 @@ static SCREEN_UPDATE( kodb )
tilemap_set_enable(state->m_bg_tilemap[2], 1);
/* Blank screen */
- bitmap->fill(0xbff, cliprect);
+ bitmap.fill(0xbff, cliprect);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
l0 = (layercontrol >> 0x06) & 03;
l1 = (layercontrol >> 0x08) & 03;
l2 = (layercontrol >> 0x0a) & 03;
diff --git a/src/mame/drivers/feversoc.c b/src/mame/drivers/feversoc.c
index 16f3a349ed5..77588b2e7d3 100644
--- a/src/mame/drivers/feversoc.c
+++ b/src/mame/drivers/feversoc.c
@@ -88,7 +88,7 @@ static SCREEN_UPDATE( feversoc )
UINT32 *spriteram32 = state->m_spriteram;
int offs,spr_offs,colour,sx,sy,h,w,dx,dy;
- bitmap->fill(screen.machine().pens[0], cliprect); //black pen
+ bitmap.fill(screen.machine().pens[0], cliprect); //black pen
for(offs=(0x2000/4)-2;offs>-1;offs-=2)
{
diff --git a/src/mame/drivers/firebeat.c b/src/mame/drivers/firebeat.c
index 4d74ba56fb7..78dacf3c185 100644
--- a/src/mame/drivers/firebeat.c
+++ b/src/mame/drivers/firebeat.c
@@ -192,7 +192,7 @@ static VIDEO_START(firebeat)
}
-static void gcu_draw_object(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int chip, UINT32 *cmd)
+static void gcu_draw_object(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int chip, UINT32 *cmd)
{
firebeat_state *state = machine.driver_data<firebeat_state>();
// 0x00: xxx----- -------- -------- -------- command type
@@ -254,7 +254,7 @@ static void gcu_draw_object(running_machine &machine, bitmap_t *bitmap, const re
{
int xi;
int index;
- UINT16 *d = &bitmap->pix16(j+y, x);
+ UINT16 *d = &bitmap.pix16(j+y, x);
//int index = address + ((v >> 6) * 1024);
if (yflip)
@@ -346,7 +346,7 @@ static void gcu_draw_object(running_machine &machine, bitmap_t *bitmap, const re
}
}
-static void gcu_fill_rect(bitmap_t *bitmap, const rectangle &cliprect, UINT32 *cmd)
+static void gcu_fill_rect(bitmap_t &bitmap, const rectangle &cliprect, UINT32 *cmd)
{
int i, j;
int x1, y1, x2, y2;
@@ -382,7 +382,7 @@ static void gcu_fill_rect(bitmap_t *bitmap, const rectangle &cliprect, UINT32 *c
for (j=y1; j < y2; j++)
{
- UINT16 *d = &bitmap->pix16(j);
+ UINT16 *d = &bitmap.pix16(j);
for (i=x1; i < x2; i++)
{
if (color[i&3] & 0x8000)
@@ -393,7 +393,7 @@ static void gcu_fill_rect(bitmap_t *bitmap, const rectangle &cliprect, UINT32 *c
}
}
-static void gcu_draw_character(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int chip, UINT32 *cmd)
+static void gcu_draw_character(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int chip, UINT32 *cmd)
{
firebeat_state *state = machine.driver_data<firebeat_state>();
// 0x00: xxx----- -------- -------- -------- command type
@@ -429,7 +429,7 @@ static void gcu_draw_character(running_machine &machine, bitmap_t *bitmap, const
for (j=0; j < 8; j++)
{
- UINT16 *d = &bitmap->pix16(y+j, x);
+ UINT16 *d = &bitmap.pix16(y+j, x);
UINT16 line = vr[address^1];
address += 4;
@@ -442,7 +442,7 @@ static void gcu_draw_character(running_machine &machine, bitmap_t *bitmap, const
}
}
-static void gcu_exec_display_list(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int chip, UINT32 address)
+static void gcu_exec_display_list(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int chip, UINT32 address)
{
firebeat_state *state = machine.driver_data<firebeat_state>();
int counter = 0;
@@ -513,11 +513,11 @@ static void gcu_exec_display_list(running_machine &machine, bitmap_t *bitmap, co
};
}
-static UINT32 update_screen(screen_device &screen, bitmap_t *bitmap, const rectangle &cliprect, int chip)
+static UINT32 update_screen(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect, int chip)
{
firebeat_state *state = screen.machine().driver_data<firebeat_state>();
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
if (mame_stricmp(screen.machine().system().name, "popn7") == 0)
{
diff --git a/src/mame/drivers/firefox.c b/src/mame/drivers/firefox.c
index bb2d52cd019..a92aeb1b65d 100644
--- a/src/mame/drivers/firefox.c
+++ b/src/mame/drivers/firefox.c
@@ -188,7 +188,7 @@ static SCREEN_UPDATE( firefox )
int sprite;
int gfxtop = screen.visible_area().min_y;
- bitmap->fill(palette_get_color(screen.machine(), 256), cliprect);
+ bitmap.fill(palette_get_color(screen.machine(), 256), cliprect);
for( sprite = 0; sprite < 32; sprite++ )
{
diff --git a/src/mame/drivers/flyball.c b/src/mame/drivers/flyball.c
index 77072bd033b..d428b6dc5a0 100644
--- a/src/mame/drivers/flyball.c
+++ b/src/mame/drivers/flyball.c
@@ -111,7 +111,7 @@ static SCREEN_UPDATE( flyball )
x <= cliprect.max_x &&
y >= cliprect.min_y &&
y <= cliprect.max_y)
- bitmap->pix16(y, x) = 1;
+ bitmap.pix16(y, x) = 1;
return 0;
}
diff --git a/src/mame/drivers/galaxi.c b/src/mame/drivers/galaxi.c
index b4c8f8b8223..2e77e7b0383 100644
--- a/src/mame/drivers/galaxi.c
+++ b/src/mame/drivers/galaxi.c
@@ -188,7 +188,7 @@ static SCREEN_UPDATE(galaxi)
#endif
if (layers_ctrl & 1) tilemap_draw(bitmap, cliprect, state->m_bg1_tmap, TILEMAP_DRAW_OPAQUE, 0);
- else bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ else bitmap.fill(get_black_pen(screen.machine()), cliprect);
if (layers_ctrl & 2) tilemap_draw(bitmap, cliprect, state->m_bg2_tmap, 0, 0);
if (layers_ctrl & 4) tilemap_draw(bitmap, cliprect, state->m_bg3_tmap, 0, 0);
if (layers_ctrl & 8) tilemap_draw(bitmap, cliprect, state->m_bg4_tmap, 0, 0);
diff --git a/src/mame/drivers/galaxia.c b/src/mame/drivers/galaxia.c
index 2ae84d3175d..d9d251e1d87 100644
--- a/src/mame/drivers/galaxia.c
+++ b/src/mame/drivers/galaxia.c
@@ -46,10 +46,6 @@ static SCREEN_UPDATE( galaxia )
galaxia_state *state = screen.machine().driver_data<galaxia_state>();
int x,y, count;
- bitmap_t *s2636_0_bitmap;
- bitmap_t *s2636_1_bitmap;
- bitmap_t *s2636_2_bitmap;
-
device_t *s2636_0 = screen.machine().device("s2636_0");
device_t *s2636_1 = screen.machine().device("s2636_1");
device_t *s2636_2 = screen.machine().device("s2636_2");
@@ -66,9 +62,9 @@ static SCREEN_UPDATE( galaxia )
}
}
- s2636_0_bitmap = s2636_update(s2636_0, cliprect);
- s2636_1_bitmap = s2636_update(s2636_1, cliprect);
- s2636_2_bitmap = s2636_update(s2636_2, cliprect);
+ bitmap_t &s2636_0_bitmap = s2636_update(s2636_0, cliprect);
+ bitmap_t &s2636_1_bitmap = s2636_update(s2636_1, cliprect);
+ bitmap_t &s2636_2_bitmap = s2636_update(s2636_2, cliprect);
/* copy the S2636 images into the main bitmap */
{
@@ -80,18 +76,18 @@ static SCREEN_UPDATE( galaxia )
for (x = cliprect.min_x; x <= cliprect.max_x; x++)
{
- int pixel0 = s2636_0_bitmap->pix16(y, x);
- int pixel1 = s2636_1_bitmap->pix16(y, x);
- int pixel2 = s2636_2_bitmap->pix16(y, x);
+ int pixel0 = s2636_0_bitmap.pix16(y, x);
+ int pixel1 = s2636_1_bitmap.pix16(y, x);
+ int pixel2 = s2636_2_bitmap.pix16(y, x);
if (S2636_IS_PIXEL_DRAWN(pixel0))
- bitmap->pix16(y, x) = S2636_PIXEL_COLOR(pixel0);
+ bitmap.pix16(y, x) = S2636_PIXEL_COLOR(pixel0);
if (S2636_IS_PIXEL_DRAWN(pixel1))
- bitmap->pix16(y, x) = S2636_PIXEL_COLOR(pixel1);
+ bitmap.pix16(y, x) = S2636_PIXEL_COLOR(pixel1);
if (S2636_IS_PIXEL_DRAWN(pixel2))
- bitmap->pix16(y, x) = S2636_PIXEL_COLOR(pixel2);
+ bitmap.pix16(y, x) = S2636_PIXEL_COLOR(pixel2);
}
}
}
diff --git a/src/mame/drivers/galgame.c b/src/mame/drivers/galgame.c
index 004b932943d..63c24851c83 100644
--- a/src/mame/drivers/galgame.c
+++ b/src/mame/drivers/galgame.c
@@ -163,10 +163,10 @@ static WRITE16_HANDLER(ke_w)
static SCREEN_UPDATE( galaxygame )
{
galaxygame_state *state = screen.machine().driver_data<galaxygame_state>();
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
for (int i = 0; i < state->m_point_display_list_index; i++ )
{
- bitmap->pix16(state->m_point_display_list[i].x >> 7, state->m_point_display_list[i].y >> 7) = 1;
+ bitmap.pix16(state->m_point_display_list[i].x >> 7, state->m_point_display_list[i].y >> 7) = 1;
}
return 0;
}
diff --git a/src/mame/drivers/galpani3.c b/src/mame/drivers/galpani3.c
index 80f691048a1..cc7d1409fb3 100644
--- a/src/mame/drivers/galpani3.c
+++ b/src/mame/drivers/galpani3.c
@@ -210,7 +210,7 @@ static SCREEN_UPDATE(galpani3)
UINT16 pixdata1;
const pen_t *paldata = screen.machine().pens;
- bitmap->fill(0x0000, cliprect);
+ bitmap.fill(0x0000, cliprect);
{
int drawy, drawx;
@@ -236,7 +236,7 @@ static SCREEN_UPDATE(galpani3)
UINT8 pridat = state->m_priority_buffer[(priline*0x200)+prioffs];
- UINT32* dst = &bitmap->pix32(drawy, drawx);
+ UINT32* dst = &bitmap.pix32(drawy, drawx);
@@ -354,13 +354,13 @@ static SCREEN_UPDATE(galpani3)
state->m_sprite_bitmap_1->fill(0x0000, cliprect);
- state->m_spritegen->skns_draw_sprites(screen.machine(), state->m_sprite_bitmap_1, cliprect, state->m_spriteram32, screen.machine().generic.spriteram_size, screen.machine().region("gfx1")->base(), screen.machine().region ("gfx1")->bytes(), state->m_spc_regs );
+ state->m_spritegen->skns_draw_sprites(screen.machine(), *state->m_sprite_bitmap_1, cliprect, state->m_spriteram32, screen.machine().generic.spriteram_size, screen.machine().region("gfx1")->base(), screen.machine().region ("gfx1")->bytes(), state->m_spc_regs );
// ignoring priority bits for now..
for (y=0;y<240;y++)
{
src1 = &state->m_sprite_bitmap_1->pix16(y);
- dst = &bitmap->pix32(y);
+ dst = &bitmap.pix32(y);
for (x=0;x<320;x++)
{
diff --git a/src/mame/drivers/gamecstl.c b/src/mame/drivers/gamecstl.c
index d466ef7fa13..d5cd4b97b1a 100644
--- a/src/mame/drivers/gamecstl.c
+++ b/src/mame/drivers/gamecstl.c
@@ -117,7 +117,7 @@ static VIDEO_START(gamecstl)
palette_set_color(machine, i, cga_palette[i]);
}
-static void draw_char(bitmap_t *bitmap, const rectangle &cliprect, const gfx_element *gfx, int ch, int att, int x, int y)
+static void draw_char(bitmap_t &bitmap, const rectangle &cliprect, const gfx_element *gfx, int ch, int att, int x, int y)
{
int i,j;
const UINT8 *dp;
@@ -126,7 +126,7 @@ static void draw_char(bitmap_t *bitmap, const rectangle &cliprect, const gfx_ele
for (j=y; j < y+8; j++)
{
- UINT16 *p = &bitmap->pix16(j);
+ UINT16 *p = &bitmap.pix16(j);
for (i=x; i < x+8; i++)
{
@@ -147,7 +147,7 @@ static SCREEN_UPDATE(gamecstl)
UINT32 *cga = state->m_cga_ram;
int index = 0;
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
for (j=0; j < 25; j++)
{
diff --git a/src/mame/drivers/goldngam.c b/src/mame/drivers/goldngam.c
index 2c9f238f9c1..08b586ef3c4 100644
--- a/src/mame/drivers/goldngam.c
+++ b/src/mame/drivers/goldngam.c
@@ -269,7 +269,7 @@ static SCREEN_UPDATE( goldngam )
{
for(x = 0; x < 384; ++x)
{
- bitmap->pix16(y, x) = tmp[index ^ 1]; /* swapped bytes in 16 bit word */
+ bitmap.pix16(y, x) = tmp[index ^ 1]; /* swapped bytes in 16 bit word */
++index;
}
}
diff --git a/src/mame/drivers/gpworld.c b/src/mame/drivers/gpworld.c
index 9bf70450956..2d5bebd7790 100644
--- a/src/mame/drivers/gpworld.c
+++ b/src/mame/drivers/gpworld.c
@@ -70,7 +70,7 @@ public:
/* VIDEO GOODS */
-static void gpworld_draw_tiles(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void gpworld_draw_tiles(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect)
{
gpworld_state *state = machine.driver_data<gpworld_state>();
UINT8 characterX, characterY;
@@ -88,12 +88,12 @@ static void gpworld_draw_tiles(running_machine &machine, bitmap_t *bitmap,const
}
}
-INLINE void draw_pixel(bitmap_t *bitmap,const rectangle &cliprect,int x,int y,int color,int flip)
+INLINE void draw_pixel(bitmap_t &bitmap,const rectangle &cliprect,int x,int y,int color,int flip)
{
if (flip)
{
- x = bitmap->width() - x - 1;
- y = bitmap->height() - y - 1;
+ x = bitmap.width() - x - 1;
+ y = bitmap.height() - y - 1;
}
if (x < cliprect.min_x ||
@@ -102,10 +102,10 @@ INLINE void draw_pixel(bitmap_t *bitmap,const rectangle &cliprect,int x,int y,in
y > cliprect.max_y)
return;
- bitmap->pix32(y, x) = color;
+ bitmap.pix32(y, x) = color;
}
-static void gpworld_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void gpworld_draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
gpworld_state *state = machine.driver_data<gpworld_state>();
const int SPR_Y_TOP = 0;
@@ -218,7 +218,7 @@ static void gpworld_draw_sprites(running_machine &machine, bitmap_t *bitmap, con
static SCREEN_UPDATE( gpworld )
{
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
gpworld_draw_tiles(screen.machine(), bitmap, cliprect);
gpworld_draw_sprites(screen.machine(), bitmap, cliprect);
diff --git a/src/mame/drivers/guab.c b/src/mame/drivers/guab.c
index 031530f553f..34fca70f1a0 100644
--- a/src/mame/drivers/guab.c
+++ b/src/mame/drivers/guab.c
@@ -253,14 +253,14 @@ static SCREEN_UPDATE( guab )
/* If blanked, fill with black */
if (state.blanked)
{
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
return 0;
}
for (y = cliprect.min_y; y <= cliprect.max_y; ++y)
{
UINT8 *src = &state.vram[256 * y];
- UINT16 *dest = &bitmap->pix16(y);
+ UINT16 *dest = &bitmap.pix16(y);
for (x = cliprect.min_x; x <= cliprect.max_x; x += 2)
{
diff --git a/src/mame/drivers/gunpey.c b/src/mame/drivers/gunpey.c
index bfcac3491a0..91e108ae7d8 100644
--- a/src/mame/drivers/gunpey.c
+++ b/src/mame/drivers/gunpey.c
@@ -90,7 +90,7 @@ static SCREEN_UPDATE( gunpey )
r = (color & 0x7c00) >> 7;
if(x<screen.visible_area().max_x && y<screen.visible_area().max_y)
- bitmap->pix32(y, x) = b | (g<<8) | (r<<16);
+ bitmap.pix32(y, x) = b | (g<<8) | (r<<16);
count++;
diff --git a/src/mame/drivers/halleys.c b/src/mame/drivers/halleys.c
index 67c417083de..02fe9c8d266 100644
--- a/src/mame/drivers/halleys.c
+++ b/src/mame/drivers/halleys.c
@@ -1245,7 +1245,7 @@ static VIDEO_START( halleys )
}
-static void copy_scroll_op(bitmap_t *bitmap, UINT16 *source, int sx, int sy)
+static void copy_scroll_op(bitmap_t &bitmap, UINT16 *source, int sx, int sy)
{
//--------------------------------------------------------------------------
@@ -1268,8 +1268,8 @@ static void copy_scroll_op(bitmap_t *bitmap, UINT16 *source, int sx, int sy)
if ((bch = CLIP_H - sy) < 0) bch = 0;
esi = source + CLIP_SKIP + (sy << SCREEN_WIDTH_L2);
- edi = &bitmap->pix16(VIS_MINY, VIS_MINX);
- edx = bitmap->rowpixels();
+ edi = &bitmap.pix16(VIS_MINY, VIS_MINX);
+ edx = bitmap.rowpixels();
// draw top split
for (ecx=bch; ecx; ecx--) OPCOPY_COMMON
@@ -1283,7 +1283,7 @@ static void copy_scroll_op(bitmap_t *bitmap, UINT16 *source, int sx, int sy)
}
-static void copy_scroll_xp(bitmap_t *bitmap, UINT16 *source, int sx, int sy)
+static void copy_scroll_xp(bitmap_t &bitmap, UINT16 *source, int sx, int sy)
{
//--------------------------------------------------------------------------
@@ -1325,8 +1325,8 @@ static void copy_scroll_xp(bitmap_t *bitmap, UINT16 *source, int sx, int sy)
if ((bch = CLIP_H - sy) < 0) bch = 0;
src_base = source + CLIP_SKIP + (sy << SCREEN_WIDTH_L2);
- edi = &bitmap->pix16(VIS_MINY, VIS_MINX);
- dst_adv = bitmap->rowpixels() - CLIP_W;
+ edi = &bitmap.pix16(VIS_MINY, VIS_MINX);
+ dst_adv = bitmap.rowpixels() - CLIP_W;
// draw top split
for (edx=bch; edx; edx--) YCOPY_COMMON
@@ -1342,15 +1342,15 @@ static void copy_scroll_xp(bitmap_t *bitmap, UINT16 *source, int sx, int sy)
-static void copy_fixed_xp(bitmap_t *bitmap, UINT16 *source)
+static void copy_fixed_xp(bitmap_t &bitmap, UINT16 *source)
{
UINT16 *esi, *edi;
int dst_pitch, ecx, edx;
UINT16 ax, bx;
esi = source + CLIP_SKIP + CLIP_W;
- edi = &bitmap->pix16(VIS_MINY, VIS_MINX + CLIP_W);
- dst_pitch = bitmap->rowpixels();
+ edi = &bitmap.pix16(VIS_MINY, VIS_MINX + CLIP_W);
+ dst_pitch = bitmap.rowpixels();
ecx = -CLIP_W;
edx = CLIP_H;
@@ -1377,15 +1377,15 @@ static void copy_fixed_xp(bitmap_t *bitmap, UINT16 *source)
}
-static void copy_fixed_2b(bitmap_t *bitmap, UINT16 *source)
+static void copy_fixed_2b(bitmap_t &bitmap, UINT16 *source)
{
UINT16 *esi, *edi;
int dst_pitch, ecx, edx;
UINT16 ax, bx;
esi = source + CLIP_SKIP + CLIP_W;
- edi = &bitmap->pix16(VIS_MINY, VIS_MINX + CLIP_W);
- dst_pitch = bitmap->rowpixels();
+ edi = &bitmap.pix16(VIS_MINY, VIS_MINX + CLIP_W);
+ dst_pitch = bitmap.rowpixels();
ecx = -CLIP_W;
edx = CLIP_H;
@@ -1424,7 +1424,7 @@ static void copy_fixed_2b(bitmap_t *bitmap, UINT16 *source)
}
-static void filter_bitmap(running_machine &machine, bitmap_t *bitmap, int mask)
+static void filter_bitmap(running_machine &machine, bitmap_t &bitmap, int mask)
{
halleys_state *state = machine.driver_data<halleys_state>();
int dst_pitch;
@@ -1434,8 +1434,8 @@ static void filter_bitmap(running_machine &machine, bitmap_t *bitmap, int mask)
pal_ptr = state->m_internal_palette;
esi = mask | 0xffffff00;
- edi = (UINT32*)&bitmap->pix16(VIS_MINY, VIS_MINX + CLIP_W);
- dst_pitch = bitmap->rowpixels() >> 1;
+ edi = (UINT32*)&bitmap.pix16(VIS_MINY, VIS_MINX + CLIP_W);
+ dst_pitch = bitmap.rowpixels() >> 1;
ecx = -(CLIP_W>>1);
edx = CLIP_H;
@@ -1476,7 +1476,7 @@ static SCREEN_UPDATE( halleys )
copy_scroll_xp(bitmap, state->m_render_layer[4], *state->m_scrollx1, *state->m_scrolly1);
}
else
- bitmap->fill(state->m_bgcolor, cliprect);
+ bitmap.fill(state->m_bgcolor, cliprect);
#ifdef MAME_DEBUG
if (input_port_read(screen.machine(), "DEBUG")) copy_scroll_xp(bitmap, state->m_render_layer[3], *state->m_scrollx0, *state->m_scrolly0); // not used???
@@ -1500,7 +1500,7 @@ static SCREEN_UPDATE( benberob )
if (state->m_io_ram[0xa0] & 0x80)
copy_scroll_op(bitmap, state->m_render_layer[2], *state->m_scrollx1, *state->m_scrolly1);
else
- bitmap->fill(state->m_bgcolor, cliprect);
+ bitmap.fill(state->m_bgcolor, cliprect);
copy_fixed_xp (bitmap, state->m_render_layer[1]);
copy_fixed_xp (bitmap, state->m_render_layer[0]);
diff --git a/src/mame/drivers/highvdeo.c b/src/mame/drivers/highvdeo.c
index 8f34f80ee70..0e26153e5bd 100644
--- a/src/mame/drivers/highvdeo.c
+++ b/src/mame/drivers/highvdeo.c
@@ -126,12 +126,12 @@ static SCREEN_UPDATE(tourvisn)
color = ((state->m_blit_ram[count]) & 0x00ff)>>0;
if((x*2)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y)
- bitmap->pix32(y, (x*2)+0) = screen.machine().pens[color];
+ bitmap.pix32(y, (x*2)+0) = screen.machine().pens[color];
color = ((state->m_blit_ram[count]) & 0xff00)>>8;
if(((x*2)+1)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y)
- bitmap->pix32(y, (x*2)+1) = screen.machine().pens[color];
+ bitmap.pix32(y, (x*2)+1) = screen.machine().pens[color];
count++;
}
@@ -163,7 +163,7 @@ static SCREEN_UPDATE(brasil)
g = (color & 0x07e0) >> 3;
r = (color & 0xf800) >> 8;
if(x<screen.visible_area().max_x && y<screen.visible_area().max_y)
- bitmap->pix32(y, x) = b | (g<<8) | (r<<16);
+ bitmap.pix32(y, x) = b | (g<<8) | (r<<16);
count++;
}
diff --git a/src/mame/drivers/hitme.c b/src/mame/drivers/hitme.c
index 32d249a2ec6..499c75882e6 100644
--- a/src/mame/drivers/hitme.c
+++ b/src/mame/drivers/hitme.c
@@ -89,7 +89,7 @@ static SCREEN_UPDATE( hitme )
/* now loop over and invert anything */
for (y = 0; y < 19; y++)
{
- int dy = bitmap->rowpixels();
+ int dy = bitmap.rowpixels();
for (inv = x = 0; x < 40; x++, offs++)
{
/* if the high bit is set, reset the oneshot */
@@ -99,7 +99,7 @@ static SCREEN_UPDATE( hitme )
/* invert pixels until we run out */
for (xx = 0; xx < 8 && inv; xx++, inv--)
{
- UINT16 *dest = &bitmap->pix16(y * 10, x * 8 + xx);
+ UINT16 *dest = &bitmap.pix16(y * 10, x * 8 + xx);
dest[0 * dy] ^= 1;
dest[1 * dy] ^= 1;
dest[2 * dy] ^= 1;
diff --git a/src/mame/drivers/hitpoker.c b/src/mame/drivers/hitpoker.c
index 2d9dbe6626a..9edd3311e04 100644
--- a/src/mame/drivers/hitpoker.c
+++ b/src/mame/drivers/hitpoker.c
@@ -81,7 +81,7 @@ static SCREEN_UPDATE(hitpoker)
int count = 0;
int y,x;
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
for (y=0;y<31;y++)
{
diff --git a/src/mame/drivers/hotblock.c b/src/mame/drivers/hotblock.c
index 238d1fea96a..504cfb851f9 100644
--- a/src/mame/drivers/hotblock.c
+++ b/src/mame/drivers/hotblock.c
@@ -145,7 +145,7 @@ static SCREEN_UPDATE(hotblock)
int i;
static const int xxx = 320, yyy = 204;
- bitmap->fill(get_black_pen(screen.machine()));
+ bitmap.fill(get_black_pen(screen.machine()));
for (i = 0; i < 256; i++)
{
@@ -159,7 +159,7 @@ static SCREEN_UPDATE(hotblock)
for(x = 0; x < xxx; x++)
{
if (state->m_port0 & 0x40)
- bitmap->pix16(y, x) = state->m_vram[count];
+ bitmap.pix16(y, x) = state->m_vram[count];
count++;
}
}
diff --git a/src/mame/drivers/hotstuff.c b/src/mame/drivers/hotstuff.c
index 8a1dd5b96e7..5121eb61258 100644
--- a/src/mame/drivers/hotstuff.c
+++ b/src/mame/drivers/hotstuff.c
@@ -46,13 +46,13 @@ SCREEN_UPDATE( hotstuff )
for(x = 0; x < xxx; x++)
{
{
- bitmap->pix32(y, x) = row_palette_data_as_rgb32_pen_data[(state->m_bitmapram[count] &0xf000)>>12];
+ bitmap.pix32(y, x) = row_palette_data_as_rgb32_pen_data[(state->m_bitmapram[count] &0xf000)>>12];
x++;
- bitmap->pix32(y, x) = row_palette_data_as_rgb32_pen_data[(state->m_bitmapram[count] &0x0f00)>>8];
+ bitmap.pix32(y, x) = row_palette_data_as_rgb32_pen_data[(state->m_bitmapram[count] &0x0f00)>>8];
x++;
- bitmap->pix32(y, x) = row_palette_data_as_rgb32_pen_data[(state->m_bitmapram[count] &0x00f0)>>4];
+ bitmap.pix32(y, x) = row_palette_data_as_rgb32_pen_data[(state->m_bitmapram[count] &0x00f0)>>4];
x++;
- bitmap->pix32(y, x) = row_palette_data_as_rgb32_pen_data[(state->m_bitmapram[count] &0x000f)>>0];
+ bitmap.pix32(y, x) = row_palette_data_as_rgb32_pen_data[(state->m_bitmapram[count] &0x000f)>>0];
}
count++;
diff --git a/src/mame/drivers/hvyunit.c b/src/mame/drivers/hvyunit.c
index 988f562e810..c6da83af289 100644
--- a/src/mame/drivers/hvyunit.c
+++ b/src/mame/drivers/hvyunit.c
@@ -162,7 +162,7 @@ static SCREEN_UPDATE( hvyunit )
tilemap_set_scrollx(state->m_bg_tilemap, 0, ((state->m_port0_data & 0x40) << 2) + state->m_scrollx + SX_POS); // TODO
tilemap_set_scrolly(state->m_bg_tilemap, 0, ((state->m_port0_data & 0x80) << 1) + state->m_scrolly + SY_POS); // TODO
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
pandora_update(state->m_pandora, bitmap, cliprect);
diff --git a/src/mame/drivers/igs009.c b/src/mame/drivers/igs009.c
index a6d9a1a9b11..b5a94dc3eee 100644
--- a/src/mame/drivers/igs009.c
+++ b/src/mame/drivers/igs009.c
@@ -303,7 +303,7 @@ static SCREEN_UPDATE(jingbell)
clip.min_y = startclipmin;
clip.max_y = startclipmin+2;
- bitmap->fill(screen.machine().pens[rowenable], clip);
+ bitmap.fill(screen.machine().pens[rowenable], clip);
if (rowenable==0)
{ // 0 and 1 are the same? or is there a global switchoff?
@@ -327,7 +327,7 @@ static SCREEN_UPDATE(jingbell)
}
}
- else bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ else bitmap.fill(get_black_pen(screen.machine()), cliprect);
if (layers_ctrl & 2) tilemap_draw(bitmap, cliprect, state->m_fg_tilemap, 0, 0);
diff --git a/src/mame/drivers/igs011.c b/src/mame/drivers/igs011.c
index ab6890ffced..dec10b8b3b7 100644
--- a/src/mame/drivers/igs011.c
+++ b/src/mame/drivers/igs011.c
@@ -207,10 +207,10 @@ static SCREEN_UPDATE( igs011 )
#ifdef MAME_DEBUG
if ((layer_enable != -1) && (pri_addr == 0xff))
- bitmap->pix16(y, x) = get_black_pen(screen.machine());
+ bitmap.pix16(y, x) = get_black_pen(screen.machine());
else
#endif
- bitmap->pix16(y, x) = state->m_layer[l][scr_addr] | (l << 8);
+ bitmap.pix16(y, x) = state->m_layer[l][scr_addr] | (l << 8);
}
}
return 0;
diff --git a/src/mame/drivers/igs017.c b/src/mame/drivers/igs017.c
index 4d31fbef561..2bdce583a0f 100644
--- a/src/mame/drivers/igs017.c
+++ b/src/mame/drivers/igs017.c
@@ -247,7 +247,7 @@ static VIDEO_START( igs017 )
***************************************************************************/
-static void draw_sprite(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect, int sx, int sy, int dimx, int dimy, int flipx, int flipy, int color, int addr)
+static void draw_sprite(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect, int sx, int sy, int dimx, int dimy, int flipx, int flipy, int color, int addr)
{
igs017_state *state = machine.driver_data<igs017_state>();
// prepare GfxElement on the fly
@@ -265,7 +265,7 @@ static void draw_sprite(running_machine &machine, bitmap_t *bitmap,const rectang
sx, sy, 0x1f );
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect)
{
igs017_state *state = machine.driver_data<igs017_state>();
UINT8 *s = state->m_spriteram;
@@ -301,7 +301,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectan
}
// A simple gfx viewer (toggle with T)
-static int debug_viewer(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect)
+static int debug_viewer(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect)
{
#ifdef MAME_DEBUG
igs017_state *state = machine.driver_data<igs017_state>();
@@ -330,7 +330,7 @@ static int debug_viewer(running_machine &machine, bitmap_t *bitmap,const rectang
if (w <= 0) w = 0;
if (w > 1024) w = 1024;
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
draw_sprite(machine, bitmap, cliprect, 0,0, w,h, 0,0, 0, a);
@@ -363,7 +363,7 @@ static SCREEN_UPDATE( igs017 )
if (debug_viewer(screen.machine(), bitmap,cliprect))
return 0;
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
if (state->m_video_disable)
return 0;
diff --git a/src/mame/drivers/igs_m027.c b/src/mame/drivers/igs_m027.c
index 3d546367687..b118707733c 100644
--- a/src/mame/drivers/igs_m027.c
+++ b/src/mame/drivers/igs_m027.c
@@ -167,7 +167,7 @@ static SCREEN_UPDATE(igs_majhong)
{
igs_m027_state *state = screen.machine().driver_data<igs_m027_state>();
//??????????
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
//??????
tilemap_draw(bitmap,cliprect,state->m_igs_bg_tilemap,0,0);
diff --git a/src/mame/drivers/igspoker.c b/src/mame/drivers/igspoker.c
index 86712a01c3f..042aa43861d 100644
--- a/src/mame/drivers/igspoker.c
+++ b/src/mame/drivers/igspoker.c
@@ -180,7 +180,7 @@ static VIDEO_START(igs_video)
static SCREEN_UPDATE(igs_video)
{
igspoker_state *state = screen.machine().driver_data<igspoker_state>();
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
// FIX: CSK227IT must have some way to disable background, or wrong gfx?
if (state->m_bg_enable) tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
diff --git a/src/mame/drivers/imolagp.c b/src/mame/drivers/imolagp.c
index c3c2d667364..589540b3bce 100644
--- a/src/mame/drivers/imolagp.c
+++ b/src/mame/drivers/imolagp.c
@@ -213,7 +213,7 @@ static SCREEN_UPDATE( imolagp )
int pen;
int y = (i / 0x40);
int x = (i & 0x3f) * 4 - scroll2;
- UINT16 *dest = &bitmap->pix16(y & 0xff);
+ UINT16 *dest = &bitmap.pix16(y & 0xff);
int data = source[i];
if (data || pass == 0)
{
diff --git a/src/mame/drivers/intrscti.c b/src/mame/drivers/intrscti.c
index 3979e10ef77..1798feb8d4d 100644
--- a/src/mame/drivers/intrscti.c
+++ b/src/mame/drivers/intrscti.c
@@ -72,7 +72,7 @@ static SCREEN_UPDATE(intrscti)
int y,x;
int count;
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
count = 0;
for (y=0;y<64;y++)
diff --git a/src/mame/drivers/istellar.c b/src/mame/drivers/istellar.c
index 546a989809f..d60302820ab 100644
--- a/src/mame/drivers/istellar.c
+++ b/src/mame/drivers/istellar.c
@@ -52,7 +52,7 @@ static SCREEN_UPDATE( istellar )
int charx, chary;
/* clear */
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
/* DEBUG */
/*
diff --git a/src/mame/drivers/itgambl2.c b/src/mame/drivers/itgambl2.c
index db50d3eb5f4..50654adabaa 100644
--- a/src/mame/drivers/itgambl2.c
+++ b/src/mame/drivers/itgambl2.c
@@ -114,7 +114,7 @@ static SCREEN_UPDATE( itgambl2 )
popmessage("%d %d %04x",state->m_test_x,state->m_test_y,state->m_start_offs);
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
count = (state->m_start_offs);
@@ -127,7 +127,7 @@ static SCREEN_UPDATE( itgambl2 )
color = (blit_ram[count] & 0xff)>>0;
if((x)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y)
- bitmap->pix32(y, x) = screen.machine().pens[color];
+ bitmap.pix32(y, x) = screen.machine().pens[color];
count++;
}
diff --git a/src/mame/drivers/itgambl3.c b/src/mame/drivers/itgambl3.c
index d30fd2535bb..db2203eb717 100644
--- a/src/mame/drivers/itgambl3.c
+++ b/src/mame/drivers/itgambl3.c
@@ -102,7 +102,7 @@ static SCREEN_UPDATE( itgambl3 )
popmessage("%d %d %04x",state->m_test_x,state->m_test_y,state->m_start_offs);
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
count = (state->m_start_offs);
@@ -115,7 +115,7 @@ static SCREEN_UPDATE( itgambl3 )
color = (blit_ram[count] & 0xff)>>0;
if((x)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y)
- bitmap->pix32(y, x) = screen.machine().pens[color];
+ bitmap.pix32(y, x) = screen.machine().pens[color];
count++;
}
diff --git a/src/mame/drivers/jackie.c b/src/mame/drivers/jackie.c
index aacda3f40e9..5d3095453a4 100644
--- a/src/mame/drivers/jackie.c
+++ b/src/mame/drivers/jackie.c
@@ -181,7 +181,7 @@ static SCREEN_UPDATE(jackie)
int startclipmin = 0;
const rectangle &visarea = screen.visible_area();
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
for (i=0;i < 0x40;i++)
{
diff --git a/src/mame/drivers/jalmah.c b/src/mame/drivers/jalmah.c
index 8385f52fb90..fbabf1e7367 100644
--- a/src/mame/drivers/jalmah.c
+++ b/src/mame/drivers/jalmah.c
@@ -347,7 +347,7 @@ static void jalmah_priority_system(running_machine &machine)
//popmessage("%02x %02x %02x %02x",state->m_sc0_prin,state->m_sc1_prin,state->m_sc2_prin,state->m_sc3_prin);
}
-static void draw_sc0_layer(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sc0_layer(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
jalmah_state *state = machine.driver_data<jalmah_state>();
switch(state->m_jm_vregs[0] & 3)
@@ -359,7 +359,7 @@ static void draw_sc0_layer(running_machine &machine, bitmap_t *bitmap, const rec
}
}
-static void draw_sc1_layer(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sc1_layer(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
jalmah_state *state = machine.driver_data<jalmah_state>();
switch(state->m_jm_vregs[1] & 3)
@@ -371,7 +371,7 @@ static void draw_sc1_layer(running_machine &machine, bitmap_t *bitmap, const rec
}
}
-static void draw_sc2_layer(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sc2_layer(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
jalmah_state *state = machine.driver_data<jalmah_state>();
switch(state->m_jm_vregs[2] & 3)
@@ -383,7 +383,7 @@ static void draw_sc2_layer(running_machine &machine, bitmap_t *bitmap, const rec
}
}
-static void draw_sc3_layer(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sc3_layer(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
jalmah_state *state = machine.driver_data<jalmah_state>();
switch(state->m_jm_vregs[3] & 3)
@@ -443,7 +443,7 @@ static SCREEN_UPDATE( jalmah )
tilemap_set_scrolly(state->m_sc3_tilemap_2, 0, jm_scrollram[7] & 0x1ff);
tilemap_set_scrolly(state->m_sc3_tilemap_3, 0, jm_scrollram[7] & 0x3ff);
- bitmap->fill(screen.machine().pens[0xff], cliprect); //selectable by a ram address?
+ bitmap.fill(screen.machine().pens[0xff], cliprect); //selectable by a ram address?
for(cur_prin=1;cur_prin<=0x8;cur_prin<<=1)
{
@@ -466,7 +466,7 @@ static SCREEN_UPDATE( urashima )
tilemap_set_scrolly(state->m_sc0_tilemap_0, 0, jm_scrollram[4]);
tilemap_set_scrolly(state->m_sc3_tilemap_0, 0, jm_scrollram[7]);
- bitmap->fill(screen.machine().pens[0x1ff], cliprect);//selectable by a ram address?
+ bitmap.fill(screen.machine().pens[0x1ff], cliprect);//selectable by a ram address?
if(state->m_jm_vregs[0] & 1) { tilemap_draw(bitmap,cliprect,state->m_sc0_tilemap_0,0,0); }
if(state->m_jm_vregs[3] & 1) { tilemap_draw(bitmap,cliprect,state->m_sc3_tilemap_0,0,0); }
return 0;
diff --git a/src/mame/drivers/jangou.c b/src/mame/drivers/jangou.c
index c8be977d0fe..c68e041d836 100644
--- a/src/mame/drivers/jangou.c
+++ b/src/mame/drivers/jangou.c
@@ -128,7 +128,7 @@ static SCREEN_UPDATE( jangou )
for (y = cliprect.min_y; y <= cliprect.max_y; ++y)
{
UINT8 *src = &state->m_blit_buffer[y * 512 / 2 + cliprect.min_x];
- UINT16 *dst = &bitmap->pix16(y, cliprect.min_x);
+ UINT16 *dst = &bitmap.pix16(y, cliprect.min_x);
for (x = cliprect.min_x; x <= cliprect.max_x; x += 2)
{
diff --git a/src/mame/drivers/jantotsu.c b/src/mame/drivers/jantotsu.c
index 6e7d0b86a22..b81d2149b8d 100644
--- a/src/mame/drivers/jantotsu.c
+++ b/src/mame/drivers/jantotsu.c
@@ -159,7 +159,7 @@ static SCREEN_UPDATE(jantotsu)
color |= (((state->m_bitmap[count + pen_i*0x2000]) >> (7 - i)) & 1) << pen_i;
if ((x + i) <= screen.visible_area().max_x && (y + 0) < screen.visible_area().max_y)
- bitmap->pix32(y, x + i) = screen.machine().pens[color];
+ bitmap.pix32(y, x + i) = screen.machine().pens[color];
}
count++;
diff --git a/src/mame/drivers/jchan.c b/src/mame/drivers/jchan.c
index 1eb6a8eb136..c4bb45b492f 100644
--- a/src/mame/drivers/jchan.c
+++ b/src/mame/drivers/jchan.c
@@ -368,22 +368,22 @@ static SCREEN_UPDATE(jchan)
UINT16 pixdata1;
UINT16 pixdata2;
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
SCREEN_UPDATE_CALL(jchan_view2);
state->m_sprite_bitmap_1->fill(0x0000, cliprect);
state->m_sprite_bitmap_2->fill(0x0000, cliprect);
- state->m_spritegen1->skns_draw_sprites(screen.machine(), state->m_sprite_bitmap_1, cliprect, state->m_sprite_ram32_1, 0x4000, screen.machine().region("gfx1")->base(), screen.machine().region ("gfx1")->bytes(), state->m_sprite_regs32_1 );
- state->m_spritegen2->skns_draw_sprites(screen.machine(), state->m_sprite_bitmap_2, cliprect, state->m_sprite_ram32_2, 0x4000, screen.machine().region("gfx2")->base(), screen.machine().region ("gfx2")->bytes(), state->m_sprite_regs32_2 );
+ state->m_spritegen1->skns_draw_sprites(screen.machine(), *state->m_sprite_bitmap_1, cliprect, state->m_sprite_ram32_1, 0x4000, screen.machine().region("gfx1")->base(), screen.machine().region ("gfx1")->bytes(), state->m_sprite_regs32_1 );
+ state->m_spritegen2->skns_draw_sprites(screen.machine(), *state->m_sprite_bitmap_2, cliprect, state->m_sprite_ram32_2, 0x4000, screen.machine().region("gfx2")->base(), screen.machine().region ("gfx2")->bytes(), state->m_sprite_regs32_2 );
// ignoring priority bits for now - might use alpha too, check 0x8000 of palette writes
for (y=0;y<240;y++)
{
src1 = &state->m_sprite_bitmap_1->pix16(y);
src2 = &state->m_sprite_bitmap_2->pix16(y);
- dst = &bitmap->pix16(y);
+ dst = &bitmap.pix16(y);
for (x=0;x<320;x++)
{
diff --git a/src/mame/drivers/jollyjgr.c b/src/mame/drivers/jollyjgr.c
index 806bca249dd..c815c360e25 100644
--- a/src/mame/drivers/jollyjgr.c
+++ b/src/mame/drivers/jollyjgr.c
@@ -445,7 +445,7 @@ static VIDEO_START( jollyjgr )
tilemap_set_scroll_cols(state->m_bg_tilemap, 32);
}
-static void draw_bitmap( running_machine &machine, bitmap_t *bitmap )
+static void draw_bitmap( running_machine &machine, bitmap_t &bitmap )
{
jollyjgr_state *state = machine.driver_data<jollyjgr_state>();
int x, y, count;
@@ -467,13 +467,13 @@ static void draw_bitmap( running_machine &machine, bitmap_t *bitmap )
if(color)
{
if(state->m_flip_x && state->m_flip_y)
- bitmap->pix16(y, x * 8 + i) = color + 32;
+ bitmap.pix16(y, x * 8 + i) = color + 32;
else if(state->m_flip_x && !state->m_flip_y)
- bitmap->pix16(255 - y, x * 8 + i) = color + 32;
+ bitmap.pix16(255 - y, x * 8 + i) = color + 32;
else if(!state->m_flip_x && state->m_flip_y)
- bitmap->pix16(y, 255 - x * 8 - i) = color + 32;
+ bitmap.pix16(y, 255 - x * 8 - i) = color + 32;
else
- bitmap->pix16(255 - y, 255 - x * 8 - i) = color + 32;
+ bitmap.pix16(255 - y, 255 - x * 8 - i) = color + 32;
}
}
@@ -488,7 +488,7 @@ static SCREEN_UPDATE( jollyjgr )
UINT8 *spriteram = state->m_spriteram;
int offs;
- bitmap->fill(32, cliprect);
+ bitmap.fill(32, cliprect);
if(state->m_pri) //used in Frog & Spiders level 3
{
@@ -562,7 +562,7 @@ static SCREEN_UPDATE( fspider )
if (sy>=cliprect.min_y && sy<=cliprect.max_y)
for (int x=sx-4;x<sx;x++)
if (x>=cliprect.min_x && x<=cliprect.max_x)
- bitmap->pix16(sy, x)=bc;
+ bitmap.pix16(sy, x)=bc;
}
return 0;
diff --git a/src/mame/drivers/jongkyo.c b/src/mame/drivers/jongkyo.c
index e53ba8c050b..6c4b243887d 100644
--- a/src/mame/drivers/jongkyo.c
+++ b/src/mame/drivers/jongkyo.c
@@ -89,7 +89,7 @@ static SCREEN_UPDATE( jongkyo )
for (b = 0; b < 4; ++b)
{
- bitmap->pix16(255 - y, 255 - (x + b)) = ((data2 & 0x01)) + ((data2 & 0x10) >> 3) +
+ bitmap.pix16(255 - y, 255 - (x + b)) = ((data2 & 0x01)) + ((data2 & 0x10) >> 3) +
((data1 & 0x01) << 2) + ((data1 & 0x10) >> 1) +
((data3 & 0x01) << 4) + ((data3 & 0x10) << 1);
data1 >>= 1;
diff --git a/src/mame/drivers/jpmsys5.c b/src/mame/drivers/jpmsys5.c
index 564e74438c7..8f348db5a59 100644
--- a/src/mame/drivers/jpmsys5.c
+++ b/src/mame/drivers/jpmsys5.c
@@ -199,14 +199,14 @@ static SCREEN_UPDATE( jpmsys5v )
if (state.blanked)
{
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
return 0;
}
for (y = cliprect.min_y; y <= cliprect.max_y; ++y)
{
UINT8 *src = &state.vram[(state.dispstart & 0xffff)*2 + 256 * y];
- UINT32 *dest = &bitmap->pix32(y, cliprect.min_x);
+ UINT32 *dest = &bitmap.pix32(y, cliprect.min_x);
for (x = cliprect.min_x; x <= cliprect.max_x; x +=2)
{
diff --git a/src/mame/drivers/kas89.c b/src/mame/drivers/kas89.c
index 583e114a033..4f3b05a7a9d 100644
--- a/src/mame/drivers/kas89.c
+++ b/src/mame/drivers/kas89.c
@@ -242,7 +242,7 @@ static TIMER_DEVICE_CALLBACK( kas89_interrupt )
static VIDEO_START( kas89 )
{
VIDEO_START_CALL(generic_bitmapped);
- v9938_init (machine, 0, *machine.primary_screen, machine.generic.tmpbitmap, MODEL_V9938, VDP_MEM, kas89_vdp_interrupt);
+ v9938_init (machine, 0, *machine.primary_screen, *machine.generic.tmpbitmap, MODEL_V9938, VDP_MEM, kas89_vdp_interrupt);
v9938_reset(0);
}
diff --git a/src/mame/drivers/kingdrby.c b/src/mame/drivers/kingdrby.c
index 05c4c618cd5..2beeae7d665 100644
--- a/src/mame/drivers/kingdrby.c
+++ b/src/mame/drivers/kingdrby.c
@@ -165,7 +165,7 @@ static const UINT8 hw_sprite[16] =
0x22, 0x22, 0x22, 0x22, 0x22, 0x11, 0x22, 0x22
};
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
kingdrby_state *state = machine.driver_data<kingdrby_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/drivers/kinst.c b/src/mame/drivers/kinst.c
index 9cc141d0c73..5dadd32db0e 100644
--- a/src/mame/drivers/kinst.c
+++ b/src/mame/drivers/kinst.c
@@ -239,7 +239,7 @@ static SCREEN_UPDATE( kinst )
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
UINT32 *src = &state->m_video_base[640/4 * y];
- UINT16 *dest = &bitmap->pix16(y, cliprect.min_x);
+ UINT16 *dest = &bitmap.pix16(y, cliprect.min_x);
int x;
/* loop over columns */
diff --git a/src/mame/drivers/konamim2.c b/src/mame/drivers/konamim2.c
index 76cf8b6bdf3..f9a89ec099d 100644
--- a/src/mame/drivers/konamim2.c
+++ b/src/mame/drivers/konamim2.c
@@ -250,7 +250,7 @@ static SCREEN_UPDATE( m2 )
for (j=0; j < 384; j++)
{
UINT16 *fb = &frame[(j*512)];
- UINT16 *d = &bitmap->pix16(j);
+ UINT16 *d = &bitmap.pix16(j);
for (i=0; i < 512; i++)
{
d[i^3] = *fb++ & 0x7fff;
@@ -259,7 +259,7 @@ static SCREEN_UPDATE( m2 )
}
else
{
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
}
return 0;
}
diff --git a/src/mame/drivers/kongambl.c b/src/mame/drivers/kongambl.c
index 58924fc263d..bfed2773160 100644
--- a/src/mame/drivers/kongambl.c
+++ b/src/mame/drivers/kongambl.c
@@ -43,8 +43,8 @@ static SCREEN_UPDATE(kongambl)
{
device_t *k056832 = screen.machine().device("k056832");
- bitmap->fill(0, cliprect);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
// k056832_tilemap_draw(k056832, bitmap, cliprect, 3, 0, 0);
// k056832_tilemap_draw(k056832, bitmap, cliprect, 2, 0, 0);
diff --git a/src/mame/drivers/kungfur.c b/src/mame/drivers/kungfur.c
index 311da97aba2..1a34f67426d 100644
--- a/src/mame/drivers/kungfur.c
+++ b/src/mame/drivers/kungfur.c
@@ -81,40 +81,40 @@ g & 40
#define LED_ON 0x0001
#define LED_OFF 0x0000
-static void draw_led(bitmap_t *bitmap, int x, int y,UINT8 value)
+static void draw_led(bitmap_t &bitmap, int x, int y,UINT8 value)
{
- bitmap->plot_box(x, y, 6, 10, 0x00000000);
+ bitmap.plot_box(x, y, 6, 10, 0x00000000);
/*a*/
- bitmap->pix16(y+0, x+1) = ((value & 0x01) ? LED_ON : LED_OFF);
- bitmap->pix16(y+0, x+2) = ((value & 0x01) ? LED_ON : LED_OFF);
- bitmap->pix16(y+0, x+3) = ((value & 0x01) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+0, x+1) = ((value & 0x01) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+0, x+2) = ((value & 0x01) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+0, x+3) = ((value & 0x01) ? LED_ON : LED_OFF);
/*b*/
- bitmap->pix16(y+1, x+4) = ((value & 0x02) ? LED_ON : LED_OFF);
- bitmap->pix16(y+2, x+4) = ((value & 0x02) ? LED_ON : LED_OFF);
- bitmap->pix16(y+3, x+4) = ((value & 0x02) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+1, x+4) = ((value & 0x02) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+2, x+4) = ((value & 0x02) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+3, x+4) = ((value & 0x02) ? LED_ON : LED_OFF);
/*c*/
- bitmap->pix16(y+5, x+4) = ((value & 0x04) ? LED_ON : LED_OFF);
- bitmap->pix16(y+6, x+4) = ((value & 0x04) ? LED_ON : LED_OFF);
- bitmap->pix16(y+7, x+4) = ((value & 0x04) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+5, x+4) = ((value & 0x04) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+6, x+4) = ((value & 0x04) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+7, x+4) = ((value & 0x04) ? LED_ON : LED_OFF);
/*d*/
- bitmap->pix16(y+8, x+1) = ((value & 0x08) ? LED_ON : LED_OFF);
- bitmap->pix16(y+8, x+2) = ((value & 0x08) ? LED_ON : LED_OFF);
- bitmap->pix16(y+8, x+3) = ((value & 0x08) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+8, x+1) = ((value & 0x08) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+8, x+2) = ((value & 0x08) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+8, x+3) = ((value & 0x08) ? LED_ON : LED_OFF);
/*e*/
- bitmap->pix16(y+5, x+0) = ((value & 0x10) ? LED_ON : LED_OFF);
- bitmap->pix16(y+6, x+0) = ((value & 0x10) ? LED_ON : LED_OFF);
- bitmap->pix16(y+7, x+0) = ((value & 0x10) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+5, x+0) = ((value & 0x10) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+6, x+0) = ((value & 0x10) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+7, x+0) = ((value & 0x10) ? LED_ON : LED_OFF);
/*f*/
- bitmap->pix16(y+1, x+0) = ((value & 0x20) ? LED_ON : LED_OFF);
- bitmap->pix16(y+2, x+0) = ((value & 0x20) ? LED_ON : LED_OFF);
- bitmap->pix16(y+3, x+0) = ((value & 0x20) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+1, x+0) = ((value & 0x20) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+2, x+0) = ((value & 0x20) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+3, x+0) = ((value & 0x20) ? LED_ON : LED_OFF);
/*g*/
- bitmap->pix16(y+4, x+1) = ((value & 0x40) ? LED_ON : LED_OFF);
- bitmap->pix16(y+4, x+2) = ((value & 0x40) ? LED_ON : LED_OFF);
- bitmap->pix16(y+4, x+3) = ((value & 0x40) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+4, x+1) = ((value & 0x40) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+4, x+2) = ((value & 0x40) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+4, x+3) = ((value & 0x40) ? LED_ON : LED_OFF);
/*"point" (just for debugging)*/
- bitmap->pix16(y+9, x+4) = ((value & 0x80) ? LED_ON : LED_OFF);
+ bitmap.pix16(y+9, x+4) = ((value & 0x80) ? LED_ON : LED_OFF);
}
/* actually debugging purpose, it will be converted to the artwork system at some point. */
diff --git a/src/mame/drivers/laserbas.c b/src/mame/drivers/laserbas.c
index 2d330c35c38..550a780677a 100644
--- a/src/mame/drivers/laserbas.c
+++ b/src/mame/drivers/laserbas.c
@@ -69,14 +69,14 @@ static SCREEN_UPDATE(laserbas)
for(x = 0; x < 128; x++)
{
if (state->m_vram2[y * 128 + x] & 0xf)
- bitmap->pix16(y, x * 2) = (state->m_vram2[y * 128 + x] & 0xf);
+ bitmap.pix16(y, x * 2) = (state->m_vram2[y * 128 + x] & 0xf);
else
- bitmap->pix16(y, x * 2) = (state->m_vram1[y * 128 + x] & 0xf) + 16;
+ bitmap.pix16(y, x * 2) = (state->m_vram1[y * 128 + x] & 0xf) + 16;
if (state->m_vram2[y * 128 + x] >> 4)
- bitmap->pix16(y, x * 2 + 1) = (state->m_vram2[y * 128 + x] >> 4);
+ bitmap.pix16(y, x * 2 + 1) = (state->m_vram2[y * 128 + x] >> 4);
else
- bitmap->pix16(y, x * 2 + 1) = (state->m_vram1[y * 128 + x] >> 4) + 16;
+ bitmap.pix16(y, x * 2 + 1) = (state->m_vram1[y * 128 + x] >> 4) + 16;
}
return 0;
}
diff --git a/src/mame/drivers/laserbat.c b/src/mame/drivers/laserbat.c
index 8bdb7db9e89..a3b1f436571 100644
--- a/src/mame/drivers/laserbat.c
+++ b/src/mame/drivers/laserbat.c
@@ -507,16 +507,13 @@ static SCREEN_UPDATE( laserbat )
{
laserbat_state *state = screen.machine().driver_data<laserbat_state>();
int y;
- bitmap_t *s2636_1_bitmap;
- bitmap_t *s2636_2_bitmap;
- bitmap_t *s2636_3_bitmap;
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
/* update the S2636 chips */
- s2636_1_bitmap = s2636_update(state->m_s2636_1, cliprect);
- s2636_2_bitmap = s2636_update(state->m_s2636_2, cliprect);
- s2636_3_bitmap = s2636_update(state->m_s2636_3, cliprect);
+ bitmap_t &s2636_1_bitmap = s2636_update(state->m_s2636_1, cliprect);
+ bitmap_t &s2636_2_bitmap = s2636_update(state->m_s2636_2, cliprect);
+ bitmap_t &s2636_3_bitmap = s2636_update(state->m_s2636_3, cliprect);
/* copy the S2636 images into the main bitmap */
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
@@ -525,18 +522,18 @@ static SCREEN_UPDATE( laserbat )
for (x = cliprect.min_x; x <= cliprect.max_x; x++)
{
- int pixel1 = s2636_1_bitmap->pix16(y, x);
- int pixel2 = s2636_2_bitmap->pix16(y, x);
- int pixel3 = s2636_3_bitmap->pix16(y, x);
+ int pixel1 = s2636_1_bitmap.pix16(y, x);
+ int pixel2 = s2636_2_bitmap.pix16(y, x);
+ int pixel3 = s2636_3_bitmap.pix16(y, x);
if (S2636_IS_PIXEL_DRAWN(pixel1))
- bitmap->pix16(y, x) = S2636_PIXEL_COLOR(pixel1);
+ bitmap.pix16(y, x) = S2636_PIXEL_COLOR(pixel1);
if (S2636_IS_PIXEL_DRAWN(pixel2))
- bitmap->pix16(y, x) = S2636_PIXEL_COLOR(pixel2);
+ bitmap.pix16(y, x) = S2636_PIXEL_COLOR(pixel2);
if (S2636_IS_PIXEL_DRAWN(pixel3))
- bitmap->pix16(y, x) = S2636_PIXEL_COLOR(pixel3);
+ bitmap.pix16(y, x) = S2636_PIXEL_COLOR(pixel3);
}
}
diff --git a/src/mame/drivers/lastfght.c b/src/mame/drivers/lastfght.c
index cba2060a1c5..07fe2106604 100644
--- a/src/mame/drivers/lastfght.c
+++ b/src/mame/drivers/lastfght.c
@@ -142,13 +142,13 @@ static SCREEN_UPDATE( lastfght )
count = state->m_base;
- bitmap->fill(get_black_pen(screen.machine()), cliprect );
+ bitmap.fill(get_black_pen(screen.machine()), cliprect );
for (y = 0 ; y < 256; y++)
{
for (x = 0; x < 512; x++)
{
data = (((count & 0xf) == 0) && ((count & 0x1e00) == 0)) ? get_white_pen(screen.machine()) : gfxdata[count]; // white grid or data
- bitmap->pix16(y, x) = data;
+ bitmap.pix16(y, x) = data;
count++;
}
}
@@ -158,7 +158,7 @@ static SCREEN_UPDATE( lastfght )
#endif
#endif
- copybitmap(bitmap, state->m_bitmap[state->m_dest ^ 1], 0, 0, 0, 0, cliprect);
+ copybitmap(bitmap, *state->m_bitmap[state->m_dest ^ 1], 0, 0, 0, 0, cliprect);
return 0;
}
diff --git a/src/mame/drivers/lgp.c b/src/mame/drivers/lgp.c
index 0beb0583061..d64fd7c161d 100644
--- a/src/mame/drivers/lgp.c
+++ b/src/mame/drivers/lgp.c
@@ -97,7 +97,7 @@ static SCREEN_UPDATE( lgp )
palette_set_color(screen.machine(), 0, MAKE_ARGB(0,0,0,0));
/* clear */
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
/* Draw tiles */
for (charx = 0; charx < 32; charx++)
diff --git a/src/mame/drivers/limenko.c b/src/mame/drivers/limenko.c
index 28e5e0b2e13..b1e781c4c62 100644
--- a/src/mame/drivers/limenko.c
+++ b/src/mame/drivers/limenko.c
@@ -256,7 +256,7 @@ static TILE_GET_INFO( get_fg_tile_info )
SET_TILE_INFO(0,tile,color,0);
}
-static void draw_single_sprite(bitmap_t *dest_bmp,const rectangle &clip,const gfx_element *gfx,
+static void draw_single_sprite(bitmap_t &dest_bmp,const rectangle &clip,const gfx_element *gfx,
UINT32 code,UINT32 color,int flipx,int flipy,int sx,int sy,
int priority)
{
@@ -330,7 +330,7 @@ static void draw_single_sprite(bitmap_t *dest_bmp,const rectangle &clip,const gf
for( y=sy; y<ey; y++ )
{
const UINT8 *source = source_base + (y_index>>16) * gfx->line_modulo;
- UINT16 *dest = &dest_bmp->pix16(y);
+ UINT16 *dest = &dest_bmp.pix16(y);
UINT8 *pri = &state->m_sprites_bitmap_pri->pix8(y);
int x, x_index = x_index_base;
@@ -402,28 +402,28 @@ static void draw_sprites(running_machine &machine, UINT32 *sprites, const rectan
/* prepare GfxElement on the fly */
gfx_element_build_temporary(&gfx, machine, gfxdata, width, height, width, 0, 256, 0);
- draw_single_sprite(state->m_sprites_bitmap,cliprect,&gfx,0,color,flipx,flipy,x,y,pri);
+ draw_single_sprite(*state->m_sprites_bitmap,cliprect,&gfx,0,color,flipx,flipy,x,y,pri);
// wrap around x
- draw_single_sprite(state->m_sprites_bitmap,cliprect,&gfx,0,color,flipx,flipy,x-512,y,pri);
+ draw_single_sprite(*state->m_sprites_bitmap,cliprect,&gfx,0,color,flipx,flipy,x-512,y,pri);
// wrap around y
- draw_single_sprite(state->m_sprites_bitmap,cliprect,&gfx,0,color,flipx,flipy,x,y-512,pri);
+ draw_single_sprite(*state->m_sprites_bitmap,cliprect,&gfx,0,color,flipx,flipy,x,y-512,pri);
// wrap around x and y
- draw_single_sprite(state->m_sprites_bitmap,cliprect,&gfx,0,color,flipx,flipy,x-512,y-512,pri);
+ draw_single_sprite(*state->m_sprites_bitmap,cliprect,&gfx,0,color,flipx,flipy,x-512,y-512,pri);
}
}
-static void copy_sprites(running_machine &machine, bitmap_t *bitmap, bitmap_t *sprites_bitmap, bitmap_t *priority_bitmap, const rectangle &cliprect)
+static void copy_sprites(running_machine &machine, bitmap_t &bitmap, bitmap_t &sprites_bitmap, bitmap_t &priority_bitmap, const rectangle &cliprect)
{
limenko_state *state = machine.driver_data<limenko_state>();
int y;
for( y=cliprect.min_y; y<=cliprect.max_y; y++ )
{
- UINT16 *source = &sprites_bitmap->pix16(y);
- UINT16 *dest = &bitmap->pix16(y);
- UINT8 *dest_pri = &priority_bitmap->pix8(y);
+ UINT16 *source = &sprites_bitmap.pix16(y);
+ UINT16 *dest = &bitmap.pix16(y);
+ UINT8 *dest_pri = &priority_bitmap.pix8(y);
UINT8 *source_pri = &state->m_sprites_bitmap_pri->pix8(y);
int x;
@@ -457,7 +457,7 @@ static SCREEN_UPDATE( limenko )
limenko_state *state = screen.machine().driver_data<limenko_state>();
// state->m_videoreg[4] ???? It always has this value: 0xffeffff8 (2 signed bytes? values: -17 and -8 ?)
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
tilemap_set_enable(state->m_bg_tilemap, state->m_videoreg[0] & 4);
tilemap_set_enable(state->m_md_tilemap, state->m_videoreg[0] & 2);
@@ -476,7 +476,7 @@ static SCREEN_UPDATE( limenko )
tilemap_draw(bitmap,cliprect,state->m_fg_tilemap,0,1);
if(state->m_videoreg[0] & 8)
- copy_sprites(screen.machine(), bitmap, state->m_sprites_bitmap, screen.machine().priority_bitmap, cliprect);
+ copy_sprites(screen.machine(), bitmap, *state->m_sprites_bitmap, screen.machine().priority_bitmap, cliprect);
return 0;
}
diff --git a/src/mame/drivers/littlerb.c b/src/mame/drivers/littlerb.c
index 08f7d3241b9..9a5c92f9f40 100644
--- a/src/mame/drivers/littlerb.c
+++ b/src/mame/drivers/littlerb.c
@@ -403,7 +403,7 @@ static INPUT_PORTS_START( littlerb )
INPUT_PORTS_END
-static void draw_sprite(running_machine &machine, bitmap_t *bitmap, int xsize,int ysize, int offset, int xpos, int ypos, int pal )
+static void draw_sprite(running_machine &machine, bitmap_t &bitmap, int xsize,int ysize, int offset, int xpos, int ypos, int pal )
{
littlerb_state *state = machine.driver_data<littlerb_state>();
UINT16* spritegfx = state->m_region4;
@@ -426,12 +426,12 @@ static void draw_sprite(running_machine &machine, bitmap_t *bitmap, int xsize,in
if ((drawxpos < 320) && (drawypos < 256) && (drawxpos >= 0) && (drawypos >=0))
{
- if(pix1&0xf) bitmap->pix16(drawypos, drawxpos) = pix1;
+ if(pix1&0xf) bitmap.pix16(drawypos, drawxpos) = pix1;
}
drawxpos++;
if ((drawxpos < 320) && (drawypos < 256) && (drawxpos >= 0) && (drawypos >=0))
{
- if(pix2&0xf) bitmap->pix16(drawypos, drawxpos) = pix2;
+ if(pix2&0xf) bitmap.pix16(drawypos, drawxpos) = pix2;
}
offset++;
@@ -449,7 +449,7 @@ static SCREEN_UPDATE(littlerb)
int xsize,ysize;
int pal;
UINT16* spriteregion = &state->m_region4[0x400];
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
//printf("frame\n");
/* the spriteram format is something like this .. */
for (offs=0x26/2;offs<0xc00;offs+=6) // start at 00x26?
diff --git a/src/mame/drivers/looping.c b/src/mame/drivers/looping.c
index 2d552390dfc..1b48948f41b 100644
--- a/src/mame/drivers/looping.c
+++ b/src/mame/drivers/looping.c
@@ -248,7 +248,7 @@ static WRITE8_HANDLER( looping_colorram_w )
*
*************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
const UINT8 *source;
looping_state *state = machine.driver_data<looping_state>();
diff --git a/src/mame/drivers/luckgrln.c b/src/mame/drivers/luckgrln.c
index 2e94512af54..33469b9a553 100644
--- a/src/mame/drivers/luckgrln.c
+++ b/src/mame/drivers/luckgrln.c
@@ -276,7 +276,7 @@ static SCREEN_UPDATE(luckgrln)
clip.min_y = visarea.min_y;
clip.max_y = visarea.max_y;
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
for (i= 0;i < 64;i++)
{
diff --git a/src/mame/drivers/m63.c b/src/mame/drivers/m63.c
index fbcf1849aee..bf4c6319379 100644
--- a/src/mame/drivers/m63.c
+++ b/src/mame/drivers/m63.c
@@ -297,7 +297,7 @@ static VIDEO_START( m63 )
tilemap_set_transparent_pen(state->m_fg_tilemap, 0);
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
m63_state *state = machine.driver_data<m63_state>();
int offs;
diff --git a/src/mame/drivers/m79amb.c b/src/mame/drivers/m79amb.c
index dda9dc2be28..8aef6c3aeb6 100644
--- a/src/mame/drivers/m79amb.c
+++ b/src/mame/drivers/m79amb.c
@@ -96,7 +96,7 @@ static SCREEN_UPDATE( ramtek )
for (i = 0; i < 8; i++)
{
pen_t pen = (data & 0x80) ? RGB_WHITE : RGB_BLACK;
- bitmap->pix32(y, x) = pen;
+ bitmap.pix32(y, x) = pen;
x++;
data <<= 1;
diff --git a/src/mame/drivers/magicard.c b/src/mame/drivers/magicard.c
index e79d2e6f42e..06fb9f42f20 100644
--- a/src/mame/drivers/magicard.c
+++ b/src/mame/drivers/magicard.c
@@ -385,7 +385,7 @@ static SCREEN_UPDATE(magicard)
int x,y;
UINT32 count;
- bitmap->fill(get_black_pen(screen.machine()), cliprect); //TODO
+ bitmap.fill(get_black_pen(screen.machine()), cliprect); //TODO
if(!(SCC_DE_VREG)) //display enable
return 0;
@@ -403,22 +403,22 @@ static SCREEN_UPDATE(magicard)
color = ((state->m_magicram[count]) & 0x000f)>>0;
if(((x*4)+3)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y)
- bitmap->pix32(y, (x*4)+3) = screen.machine().pens[color];
+ bitmap.pix32(y, (x*4)+3) = screen.machine().pens[color];
color = ((state->m_magicram[count]) & 0x00f0)>>4;
if(((x*4)+2)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y)
- bitmap->pix32(y, (x*4)+2) = screen.machine().pens[color];
+ bitmap.pix32(y, (x*4)+2) = screen.machine().pens[color];
color = ((state->m_magicram[count]) & 0x0f00)>>8;
if(((x*4)+1)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y)
- bitmap->pix32(y, (x*4)+1) = screen.machine().pens[color];
+ bitmap.pix32(y, (x*4)+1) = screen.machine().pens[color];
color = ((state->m_magicram[count]) & 0xf000)>>12;
if(((x*4)+0)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y)
- bitmap->pix32(y, (x*4)+0) = screen.machine().pens[color];
+ bitmap.pix32(y, (x*4)+0) = screen.machine().pens[color];
count++;
}
@@ -435,12 +435,12 @@ static SCREEN_UPDATE(magicard)
color = ((state->m_magicram[count]) & 0x00ff)>>0;
if(((x*2)+1)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y)
- bitmap->pix32(y, (x*2)+1) = screen.machine().pens[color];
+ bitmap.pix32(y, (x*2)+1) = screen.machine().pens[color];
color = ((state->m_magicram[count]) & 0xff00)>>8;
if(((x*2)+0)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y)
- bitmap->pix32(y, (x*2)+0) = screen.machine().pens[color];
+ bitmap.pix32(y, (x*2)+0) = screen.machine().pens[color];
count++;
}
diff --git a/src/mame/drivers/majorpkr.c b/src/mame/drivers/majorpkr.c
index 1230b212a58..e301c8467e1 100644
--- a/src/mame/drivers/majorpkr.c
+++ b/src/mame/drivers/majorpkr.c
@@ -525,7 +525,7 @@ static SCREEN_UPDATE(majorpkr)
{
majorpkr_state *state = screen.machine().driver_data<majorpkr_state>();
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
rectangle custom_clip;
diff --git a/src/mame/drivers/marinedt.c b/src/mame/drivers/marinedt.c
index ee3d9c11bca..dade9a3747b 100644
--- a/src/mame/drivers/marinedt.c
+++ b/src/mame/drivers/marinedt.c
@@ -512,31 +512,31 @@ static SCREEN_UPDATE( marinedt )
int sx, sy;
state->m_tile->fill(0);
- tilemap_draw(state->m_tile, cliprect, state->m_tx_tilemap, 0, 0);
+ tilemap_draw(*state->m_tile, cliprect, state->m_tx_tilemap, 0, 0);
state->m_obj1->fill(0);
- drawgfx_transpen(state->m_obj1, state->m_obj1->cliprect(), screen.machine().gfx[1],
+ drawgfx_transpen(*state->m_obj1, state->m_obj1->cliprect(), screen.machine().gfx[1],
OBJ_CODE(state->m_obj1_a),
OBJ_COLOR(state->m_obj1_a),
OBJ_FLIPX(state->m_obj1_a), OBJ_FLIPY(state->m_obj1_a),
0, 0, 0);
state->m_obj2->fill(0);
- drawgfx_transpen(state->m_obj2, state->m_obj2->cliprect(), screen.machine().gfx[2],
+ drawgfx_transpen(*state->m_obj2, state->m_obj2->cliprect(), screen.machine().gfx[2],
OBJ_CODE(state->m_obj2_a),
OBJ_COLOR(state->m_obj2_a),
OBJ_FLIPX(state->m_obj2_a), OBJ_FLIPY(state->m_obj2_a),
0, 0, 0);
- bitmap->fill(0);
+ bitmap.fill(0);
if (state->m_pd & 0x02)
- copybitmap_trans(bitmap, state->m_obj2, 0, 0, OBJ_X(state->m_obj2_x), OBJ_Y(state->m_obj2_y), cliprect, 0);
+ copybitmap_trans(bitmap, *state->m_obj2, 0, 0, OBJ_X(state->m_obj2_x), OBJ_Y(state->m_obj2_y), cliprect, 0);
if (state->m_pd & 0x01)
- copybitmap_trans(bitmap, state->m_obj1, 0, 0, OBJ_X(state->m_obj1_x), OBJ_Y(state->m_obj1_y), cliprect, 0);
+ copybitmap_trans(bitmap, *state->m_obj1, 0, 0, OBJ_X(state->m_obj1_x), OBJ_Y(state->m_obj1_y), cliprect, 0);
- copybitmap_trans(bitmap, state->m_tile, 0, 0, 0, 0, cliprect, 0);
+ copybitmap_trans(bitmap, *state->m_tile, 0, 0, 0, 0, cliprect, 0);
state->m_coll = state->m_cx = state->m_cyr = state->m_cyq = 0;
if (state->m_pd & 0x01)
diff --git a/src/mame/drivers/maygayv1.c b/src/mame/drivers/maygayv1.c
index dac0a963f6d..efbeb98de33 100644
--- a/src/mame/drivers/maygayv1.c
+++ b/src/mame/drivers/maygayv1.c
@@ -297,7 +297,7 @@ static SCREEN_UPDATE( maygayv1 )
/* If screen output is disabled, fill with black */
if (!(VREG(VCR0) & VCR0_DEN))
{
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
return 0;
}
@@ -308,7 +308,7 @@ static SCREEN_UPDATE( maygayv1 )
UINT16 aflags = atable[sl];
UINT16 slmask_old = slmask;
- UINT16 *bmp_ptr = &bitmap->pix16(sl);
+ UINT16 *bmp_ptr = &bitmap.pix16(sl);
slmask = 0xffff ^ (slmask ^ aflags);
diff --git a/src/mame/drivers/mazerbla.c b/src/mame/drivers/mazerbla.c
index 7db60f8edd6..3a11b44be14 100644
--- a/src/mame/drivers/mazerbla.c
+++ b/src/mame/drivers/mazerbla.c
@@ -185,7 +185,7 @@ SCREEN_UPDATE( test_vcu )
if (state->m_game_id == GREATGUN)
color_base = 0x00;
- bitmap->fill(0);
+ bitmap.fill(0);
// logerror("-->frame\n");
if (planes_enabled[3])
@@ -281,12 +281,12 @@ static SCREEN_UPDATE( mazerbla )
// if (state->m_game_id == GREATGUN)
// color_base = 0x00;
- // bitmap->fill(0);
+ // bitmap.fill(0);
- copybitmap(bitmap, state->m_tmpbitmaps[3], 0, 0, 0, 0, cliprect);
- copybitmap_trans(bitmap, state->m_tmpbitmaps[2], 0, 0, 0, 0, cliprect, 0);
- copybitmap_trans(bitmap, state->m_tmpbitmaps[1], 0, 0, 0, 0, cliprect, 0);
- copybitmap_trans(bitmap, state->m_tmpbitmaps[0], 0, 0, 0, 0, cliprect, 0);
+ copybitmap(bitmap, *state->m_tmpbitmaps[3], 0, 0, 0, 0, cliprect);
+ copybitmap_trans(bitmap, *state->m_tmpbitmaps[2], 0, 0, 0, 0, cliprect, 0);
+ copybitmap_trans(bitmap, *state->m_tmpbitmaps[1], 0, 0, 0, 0, cliprect, 0);
+ copybitmap_trans(bitmap, *state->m_tmpbitmaps[0], 0, 0, 0, 0, cliprect, 0);
return 0;
}
diff --git a/src/mame/drivers/mediagx.c b/src/mame/drivers/mediagx.c
index 6d33fc98ad4..9252905b692 100644
--- a/src/mame/drivers/mediagx.c
+++ b/src/mame/drivers/mediagx.c
@@ -201,7 +201,7 @@ static VIDEO_START(mediagx)
}
}
-static void draw_char(bitmap_t *bitmap, const rectangle &cliprect, const gfx_element *gfx, int ch, int att, int x, int y)
+static void draw_char(bitmap_t &bitmap, const rectangle &cliprect, const gfx_element *gfx, int ch, int att, int x, int y)
{
int i,j;
const UINT8 *dp;
@@ -212,7 +212,7 @@ static void draw_char(bitmap_t *bitmap, const rectangle &cliprect, const gfx_ele
for (j=y; j < y+8; j++)
{
- UINT32 *p = &bitmap->pix32(j);
+ UINT32 *p = &bitmap.pix32(j);
for (i=x; i < x+8; i++)
{
UINT8 pen = dp[index++];
@@ -227,7 +227,7 @@ static void draw_char(bitmap_t *bitmap, const rectangle &cliprect, const gfx_ele
}
}
-static void draw_framebuffer(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_framebuffer(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
mediagx_state *state = machine.driver_data<mediagx_state>();
int i, j;
@@ -264,7 +264,7 @@ static void draw_framebuffer(running_machine &machine, bitmap_t *bitmap, const r
for (j=0; j < state->m_frame_height; j++)
{
- UINT32 *p = &bitmap->pix32(j);
+ UINT32 *p = &bitmap.pix32(j);
UINT8 *si = &framebuf[j * line_delta];
for (i=0; i < state->m_frame_width; i++)
{
@@ -286,7 +286,7 @@ static void draw_framebuffer(running_machine &machine, bitmap_t *bitmap, const r
{
for (j=0; j < state->m_frame_height; j++)
{
- UINT32 *p = &bitmap->pix32(j);
+ UINT32 *p = &bitmap.pix32(j);
UINT16 *si = &framebuf[j * (line_delta/2)];
for (i=0; i < state->m_frame_width; i++)
{
@@ -304,7 +304,7 @@ static void draw_framebuffer(running_machine &machine, bitmap_t *bitmap, const r
{
for (j=0; j < state->m_frame_height; j++)
{
- UINT32 *p = &bitmap->pix32(j);
+ UINT32 *p = &bitmap.pix32(j);
UINT16 *si = &framebuf[j * (line_delta/2)];
for (i=0; i < state->m_frame_width; i++)
{
@@ -320,7 +320,7 @@ static void draw_framebuffer(running_machine &machine, bitmap_t *bitmap, const r
}
}
-static void draw_cga(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_cga(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
mediagx_state *state = machine.driver_data<mediagx_state>();
int i, j;
@@ -347,7 +347,7 @@ static void draw_cga(running_machine &machine, bitmap_t *bitmap, const rectangle
static SCREEN_UPDATE(mediagx)
{
mediagx_state *state = screen.machine().driver_data<mediagx_state>();
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
draw_framebuffer(screen.machine(), bitmap, cliprect);
diff --git a/src/mame/drivers/meijinsn.c b/src/mame/drivers/meijinsn.c
index ff5020d0471..5b7b4b3fd22 100644
--- a/src/mame/drivers/meijinsn.c
+++ b/src/mame/drivers/meijinsn.c
@@ -302,7 +302,7 @@ static SCREEN_UPDATE(meijinsn)
{
color= BIT(data1, x) | (BIT(data1, x + 4) << 1);
data = BIT(data2, x) | (BIT(data2, x + 4) << 1);
- bitmap->pix16(sy, (sx * 4 + (3 - x))) = color * 4 + data;
+ bitmap.pix16(sy, (sx * 4 + (3 - x))) = color * 4 + data;
}
}
return 0;
diff --git a/src/mame/drivers/merit.c b/src/mame/drivers/merit.c
index bd3b11ae0ed..4132428807c 100644
--- a/src/mame/drivers/merit.c
+++ b/src/mame/drivers/merit.c
@@ -246,7 +246,7 @@ static MC6845_UPDATE_ROW( update_row )
col |= 0x03;
col = state->m_ram_palette[col & 0x3ff];
- bitmap->pix32(y, x) = pens[col ? col : (state->m_lscnblk ? 8 : 0)];
+ bitmap.pix32(y, x) = pens[col ? col : (state->m_lscnblk ? 8 : 0)];
x++;
}
diff --git a/src/mame/drivers/meritm.c b/src/mame/drivers/meritm.c
index 2aa3b7a16e9..367fec46741 100644
--- a/src/mame/drivers/meritm.c
+++ b/src/mame/drivers/meritm.c
@@ -352,11 +352,11 @@ static VIDEO_START( meritm )
state->m_layer0_enabled = state->m_layer1_enabled = 1;
state->m_vdp0_bitmap = machine.primary_screen->alloc_compatible_bitmap();
- v9938_init (machine, 0, *machine.primary_screen, state->m_vdp0_bitmap, MODEL_V9938, 0x20000, meritm_vdp0_interrupt);
+ v9938_init (machine, 0, *machine.primary_screen, *state->m_vdp0_bitmap, MODEL_V9938, 0x20000, meritm_vdp0_interrupt);
v9938_reset(0);
state->m_vdp1_bitmap = machine.primary_screen->alloc_compatible_bitmap();
- v9938_init (machine, 1, *machine.primary_screen, state->m_vdp1_bitmap, MODEL_V9938, 0x20000, meritm_vdp1_interrupt);
+ v9938_init (machine, 1, *machine.primary_screen, *state->m_vdp1_bitmap, MODEL_V9938, 0x20000, meritm_vdp1_interrupt);
v9938_reset(1);
state->m_vint = 0x18;
@@ -382,16 +382,16 @@ static SCREEN_UPDATE( meritm )
popmessage("Layer 1 %sabled",state->m_layer1_enabled ? "en" : "dis");
}
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
if ( state->m_layer0_enabled )
{
- copybitmap(bitmap, state->m_vdp0_bitmap, 0, 0, 0, 0, cliprect);
+ copybitmap(bitmap, *state->m_vdp0_bitmap, 0, 0, 0, 0, cliprect);
}
if ( state->m_layer1_enabled )
{
- copybitmap_trans(bitmap, state->m_vdp1_bitmap, 0, 0, -6, -12, cliprect, v9938_get_transpen(1));
+ copybitmap_trans(bitmap, *state->m_vdp1_bitmap, 0, 0, -6, -12, cliprect, v9938_get_transpen(1));
}
return 0;
}
diff --git a/src/mame/drivers/metalmx.c b/src/mame/drivers/metalmx.c
index 9b169a7c1e1..c6027409317 100644
--- a/src/mame/drivers/metalmx.c
+++ b/src/mame/drivers/metalmx.c
@@ -291,7 +291,7 @@ static SCREEN_UPDATE( metalmx )
{
int x;
UINT16 *src = &src_base[512 * y];
- UINT16 *dst = &bitmap->pix16(y);
+ UINT16 *dst = &bitmap.pix16(y);
for(x = 0; x < 512; x++)
*dst++ = *src++;
diff --git a/src/mame/drivers/midas.c b/src/mame/drivers/midas.c
index 10703b2cb91..96dda7384ff 100644
--- a/src/mame/drivers/midas.c
+++ b/src/mame/drivers/midas.c
@@ -91,7 +91,7 @@ static VIDEO_START( midas )
tilemap_set_transparent_pen(state->m_tmap, 0);
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
midas_state *state = machine.driver_data<midas_state>();
UINT16 *s = state->m_gfxram + 0x8000;
@@ -190,7 +190,7 @@ static SCREEN_UPDATE( midas )
}
#endif
- bitmap->fill(4095, cliprect);
+ bitmap.fill(4095, cliprect);
if (layers_ctrl & 2) draw_sprites(screen.machine(), bitmap,cliprect);
if (layers_ctrl & 1) tilemap_draw(bitmap,cliprect, state->m_tmap, 0, 0);
diff --git a/src/mame/drivers/minivadr.c b/src/mame/drivers/minivadr.c
index 04a6a788afe..caebb839a88 100644
--- a/src/mame/drivers/minivadr.c
+++ b/src/mame/drivers/minivadr.c
@@ -47,7 +47,7 @@ static SCREEN_UPDATE( minivadr )
for (i = 0; i < 8; i++)
{
pen_t pen = (data & 0x80) ? RGB_WHITE : RGB_BLACK;
- bitmap->pix32(y, x) = pen;
+ bitmap.pix32(y, x) = pen;
data = data << 1;
x = x + 1;
diff --git a/src/mame/drivers/mirage.c b/src/mame/drivers/mirage.c
index 6555486419c..f4a1314271b 100644
--- a/src/mame/drivers/mirage.c
+++ b/src/mame/drivers/mirage.c
@@ -83,7 +83,7 @@ static SCREEN_UPDATE( mirage )
deco16ic_pf_update(state->m_deco_tilegen1, state->m_pf1_rowscroll, state->m_pf2_rowscroll);
- bitmap->fill(256, cliprect); /* not verified */
+ bitmap.fill(256, cliprect); /* not verified */
deco16ic_tilemap_2_draw(state->m_deco_tilegen1, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
screen.machine().device<decospr_device>("spritegen")->inefficient_copy_sprite_bitmap(screen.machine(), bitmap, cliprect, 0x0800, 0x0800, 0x200, 0x1ff);
diff --git a/src/mame/drivers/mirax.c b/src/mame/drivers/mirax.c
index c36701abdb7..1e14b871009 100644
--- a/src/mame/drivers/mirax.c
+++ b/src/mame/drivers/mirax.c
@@ -90,7 +90,7 @@ static VIDEO_START(mirax)
{
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
mirax_state *state = machine.driver_data<mirax_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/drivers/missb2.c b/src/mame/drivers/missb2.c
index 3c45415e23b..e08a2a7b5d8 100644
--- a/src/mame/drivers/missb2.c
+++ b/src/mame/drivers/missb2.c
@@ -49,7 +49,7 @@ static SCREEN_UPDATE( missb2 )
/* and sprites) are stored in the same memory region, and information on */
/* the background character columns is stored in the area dd00-dd3f */
- bitmap->fill(255, cliprect);
+ bitmap.fill(255, cliprect);
if (!state->m_video_enable)
return 0;
diff --git a/src/mame/drivers/missile.c b/src/mame/drivers/missile.c
index c8fb9fb84ec..0c9964dce98 100644
--- a/src/mame/drivers/missile.c
+++ b/src/mame/drivers/missile.c
@@ -673,7 +673,7 @@ static SCREEN_UPDATE( missile )
/* draw the bitmap to the screen, looping over Y */
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
- UINT16 *dst = &bitmap->pix16(y);
+ UINT16 *dst = &bitmap.pix16(y);
int effy = state->m_flipscreen ? ((256+24 - y) & 0xff) : y;
UINT8 *src = &videoram[effy * 64];
diff --git a/src/mame/drivers/mjsister.c b/src/mame/drivers/mjsister.c
index 2b40dbc183a..1a03b1dff9d 100644
--- a/src/mame/drivers/mjsister.c
+++ b/src/mame/drivers/mjsister.c
@@ -140,13 +140,13 @@ static SCREEN_UPDATE( mjsister )
{
for (i = 0; i < 256; i++)
for (j = 0; j < 4; j++)
- bitmap->pix16(i, 256 + j) = state->m_colorbank * 0x20;
+ bitmap.pix16(i, 256 + j) = state->m_colorbank * 0x20;
- copybitmap(bitmap, state->m_tmpbitmap0, flip, flip, 0, 0, cliprect);
- copybitmap_trans(bitmap, state->m_tmpbitmap1, flip, flip, 2, 0, cliprect, 0);
+ copybitmap(bitmap, *state->m_tmpbitmap0, flip, flip, 0, 0, cliprect);
+ copybitmap_trans(bitmap, *state->m_tmpbitmap1, flip, flip, 2, 0, cliprect, 0);
}
else
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
return 0;
}
diff --git a/src/mame/drivers/mlanding.c b/src/mame/drivers/mlanding.c
index d9ed53c3f20..aed12e3d30f 100644
--- a/src/mame/drivers/mlanding.c
+++ b/src/mame/drivers/mlanding.c
@@ -66,7 +66,7 @@ static SCREEN_UPDATE(mlanding)
for (y = cliprect.min_y; y <= cliprect.max_y; ++y)
{
UINT16 *src = &state->m_g_ram[y * 512/2 + cliprect.min_x];
- UINT16 *dst = &bitmap->pix16(y, cliprect.min_x);
+ UINT16 *dst = &bitmap.pix16(y, cliprect.min_x);
for (x = cliprect.min_x; x <= cliprect.max_x; x += 2)
{
diff --git a/src/mame/drivers/monzagp.c b/src/mame/drivers/monzagp.c
index 0c78ba36d9a..8beeaa3bc94 100644
--- a/src/mame/drivers/monzagp.c
+++ b/src/mame/drivers/monzagp.c
@@ -92,7 +92,7 @@ static SCREEN_UPDATE(monzagp)
fclose(p);
}
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
for(y=0;y<256;y++)
{
for(x=0;x<256;x++)
diff --git a/src/mame/drivers/mpu4vid.c b/src/mame/drivers/mpu4vid.c
index 7801b0854c4..08d570204fa 100644
--- a/src/mame/drivers/mpu4vid.c
+++ b/src/mame/drivers/mpu4vid.c
@@ -452,7 +452,7 @@ static SCREEN_UPDATE(mpu4_vid)
mpu4_state *state = screen.machine().driver_data<mpu4_state>();
int x, y/*, count = 0*/;
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
/* this is in main ram.. i think it must transfer it out of here??? */
/* count = 0x0018b6/2; - crmaze count = 0x004950/2; - turnover */
diff --git a/src/mame/drivers/multfish.c b/src/mame/drivers/multfish.c
index f0bc0c7e295..11ac7eab71c 100644
--- a/src/mame/drivers/multfish.c
+++ b/src/mame/drivers/multfish.c
@@ -246,7 +246,7 @@ static SCREEN_UPDATE(multfish)
multfish_state *state = screen.machine().driver_data<multfish_state>();
int i;
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
if (!state->m_disp_enable) return 0;
diff --git a/src/mame/drivers/murogem.c b/src/mame/drivers/murogem.c
index b80891b7f4f..15c27949d49 100644
--- a/src/mame/drivers/murogem.c
+++ b/src/mame/drivers/murogem.c
@@ -205,7 +205,7 @@ static SCREEN_UPDATE(murogem)
int xx,yy,count;
count = 0x000;
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
for (yy=0;yy<32;yy++)
{
diff --git a/src/mame/drivers/mwarr.c b/src/mame/drivers/mwarr.c
index f326a4c2c13..502c0cbd717 100644
--- a/src/mame/drivers/mwarr.c
+++ b/src/mame/drivers/mwarr.c
@@ -395,7 +395,7 @@ static VIDEO_START( mwarr )
state->save_item(NAME(state->m_sprites_buffer));
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
mwarr_state *state = machine.driver_data<mwarr_state>();
const UINT16 *source = state->m_sprites_buffer + 0x800 - 4;
@@ -471,7 +471,7 @@ static SCREEN_UPDATE( mwarr )
mwarr_state *state = screen.machine().driver_data<mwarr_state>();
int i;
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
if (BIT(state->m_vidattrram[6], 0))
{
diff --git a/src/mame/drivers/namcoic.c b/src/mame/drivers/namcoic.c
index fbb416f5c19..bafe174ede4 100644
--- a/src/mame/drivers/namcoic.c
+++ b/src/mame/drivers/namcoic.c
@@ -89,7 +89,7 @@ namco_tilemap_init( running_machine &machine, int gfxbank, void *maskBaseAddr,
} /* namco_tilemap_init */
void
-namco_tilemap_draw( bitmap_t *bitmap, const rectangle &cliprect, int pri )
+namco_tilemap_draw( bitmap_t &bitmap, const rectangle &cliprect, int pri )
{
int i;
for( i=0; i<6; i++ )
@@ -266,12 +266,12 @@ WRITE32_HANDLER( namco_tilemapvideoram32_le_w )
/**************************************************************************************/
static void zdrawgfxzoom(
- bitmap_t *dest_bmp,const rectangle &clip,const gfx_element *gfx,
+ bitmap_t &dest_bmp,const rectangle &clip,const gfx_element *gfx,
UINT32 code,UINT32 color,int flipx,int flipy,int sx,int sy,
int scalex, int scaley, int zpos )
{
if (!scalex || !scaley) return;
- if (dest_bmp->bpp() == 16)
+ if (dest_bmp.bpp() == 16)
{
if( gfx )
{
@@ -338,14 +338,14 @@ static void zdrawgfxzoom(
if( ex>sx )
{ /* skip if inner loop doesn't draw anything */
int y;
- bitmap_t *priority_bitmap = gfx->machine().priority_bitmap;
- if( priority_bitmap )
+ bitmap_t &priority_bitmap = gfx->machine().priority_bitmap;
+ if( priority_bitmap.valid() )
{
for( y=sy; y<ey; y++ )
{
const UINT8 *source = source_base + (y_index>>16) * gfx->line_modulo;
- UINT16 *dest = &dest_bmp->pix16(y);
- UINT8 *pri = &priority_bitmap->pix8(y);
+ UINT16 *dest = &dest_bmp.pix16(y);
+ UINT8 *pri = &priority_bitmap.pix8(y);
int x, x_index = x_index_base;
if( mPalXOR )
{
@@ -408,13 +408,13 @@ static void zdrawgfxzoom(
} /* zdrawgfxzoom */
void
-namcos2_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int pri, int control )
+namcos2_draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int pri, int control )
{
int offset = (control & 0x000f) * (128*4);
int loop;
if( pri==0 )
{
- machine.priority_bitmap->fill(0, cliprect );
+ machine.priority_bitmap.fill(0, cliprect );
}
for( loop=0; loop < 128; loop++ )
{
@@ -488,7 +488,7 @@ namcos2_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle
} /* namcos2_draw_sprites */
void
-namcos2_draw_sprites_metalhawk(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int pri )
+namcos2_draw_sprites_metalhawk(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int pri )
{
/**
* word#0
@@ -525,7 +525,7 @@ namcos2_draw_sprites_metalhawk(running_machine &machine, bitmap_t *bitmap, const
int loop;
if( pri==0 )
{
- machine.priority_bitmap->fill(0, cliprect );
+ machine.priority_bitmap.fill(0, cliprect );
}
for( loop=0; loop < 128; loop++ )
{
@@ -714,7 +714,7 @@ static int mGfxC355; /* gfx bank for sprites */
* 0x14000 sprite list (page1)
*/
static void
-draw_spriteC355(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, const UINT16 *pSource, int pri, int zpos )
+draw_spriteC355(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, const UINT16 *pSource, int pri, int zpos )
{
UINT16 *spriteram16 = machine.generic.spriteram.u16;
unsigned screen_height_remaining, screen_width_remaining;
@@ -770,7 +770,7 @@ draw_spriteC355(running_machine &machine, bitmap_t *bitmap, const rectangle &cli
xscroll &= 0x1ff; if( xscroll & 0x100 ) xscroll |= ~0x1ff;
yscroll &= 0x1ff; if( yscroll & 0x100 ) yscroll |= ~0x1ff;
- if( bitmap->width() > 384 )
+ if( bitmap.width() > 384 )
{ /* Medium Resolution: System21 adjust */
xscroll = (INT16)mSpritePos[1];
xscroll &= 0x3ff; if( xscroll & 0x200 ) xscroll |= ~0x3ff;
@@ -922,7 +922,7 @@ namco_obj_init( running_machine &machine, int gfxbank, int palXOR, int (*codeToT
static void
DrawObjectList(running_machine &machine,
- bitmap_t *bitmap,
+ bitmap_t &bitmap,
const rectangle &cliprect,
int pri,
const UINT16 *pSpriteList16,
@@ -939,12 +939,12 @@ DrawObjectList(running_machine &machine,
} /* DrawObjectList */
void
-namco_obj_draw(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int pri )
+namco_obj_draw(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int pri )
{
// int offs = spriteram16[0x18000/2]; /* end-of-sprite-list */
if( pri==0 )
{
- machine.priority_bitmap->fill(0, cliprect );
+ machine.priority_bitmap.fill(0, cliprect );
}
// if( offs==0 )
{ /* boot */
@@ -1210,19 +1210,19 @@ UnpackRozParam( const UINT16 *pSource, struct RozParam *pRozParam )
static void
DrawRozHelper(
- bitmap_t *bitmap,
+ bitmap_t &bitmap,
tilemap_t *tmap,
const rectangle &clip,
const struct RozParam *rozInfo )
{
- if( (bitmap->bpp() == 16) &&
+ if( (bitmap.bpp() == 16) &&
(namcos2_gametype != NAMCOFL_SPEED_RACER) &&
(namcos2_gametype != NAMCOFL_FINAL_LAP_R))
{
UINT32 size_mask = rozInfo->size-1;
- bitmap_t *srcbitmap = tilemap_get_pixmap( tmap );
- bitmap_t *flagsbitmap = tilemap_get_flagsmap( tmap );
+ bitmap_t &srcbitmap = tilemap_get_pixmap( tmap );
+ bitmap_t &flagsbitmap = tilemap_get_flagsmap( tmap );
UINT32 startx = rozInfo->startx + clip.min_x * rozInfo->incxx + clip.min_y * rozInfo->incyx;
UINT32 starty = rozInfo->starty + clip.min_x * rozInfo->incxy + clip.min_y * rozInfo->incyy;
int sx = clip.min_x;
@@ -1232,14 +1232,14 @@ DrawRozHelper(
int x = sx;
UINT32 cx = startx;
UINT32 cy = starty;
- UINT16 *dest = &bitmap->pix16(sy, sx);
+ UINT16 *dest = &bitmap.pix16(sy, sx);
while( x <= clip.max_x )
{
UINT32 xpos = (((cx>>16)&size_mask) + rozInfo->left)&0xfff;
UINT32 ypos = (((cy>>16)&size_mask) + rozInfo->top)&0xfff;
- if( flagsbitmap->pix8(ypos, xpos)&TILEMAP_PIXEL_LAYER0 )
+ if( flagsbitmap.pix8(ypos, xpos)&TILEMAP_PIXEL_LAYER0 )
{
- *dest = srcbitmap->pix16(ypos, xpos)+rozInfo->color;
+ *dest = srcbitmap.pix16(ypos, xpos)+rozInfo->color;
}
cx += rozInfo->incxx;
cy += rozInfo->incxy;
@@ -1268,7 +1268,7 @@ DrawRozHelper(
} /* DrawRozHelper */
static void
-DrawRozScanline( bitmap_t *bitmap, int line, int which, int pri, const rectangle &cliprect )
+DrawRozScanline( bitmap_t &bitmap, int line, int which, int pri, const rectangle &cliprect )
{
if( line>=cliprect.min_y && line<=cliprect.max_y )
{
@@ -1283,7 +1283,7 @@ DrawRozScanline( bitmap_t *bitmap, int line, int which, int pri, const rectangle
if( pri == rozInfo.priority )
{
clip.min_x = 0;
- clip.max_x = bitmap->width()-1;
+ clip.max_x = bitmap.width()-1;
clip.min_y = clip.max_y = line;
if( clip.min_x < cliprect.min_x ){ clip.min_x = cliprect.min_x; }
@@ -1298,7 +1298,7 @@ DrawRozScanline( bitmap_t *bitmap, int line, int which, int pri, const rectangle
} /* DrawRozScanline */
void
-namco_roz_draw( bitmap_t *bitmap, const rectangle &cliprect, int pri )
+namco_roz_draw( bitmap_t &bitmap, const rectangle &cliprect, int pri )
{
int mode = rozcontrol16[0]; /* 0x8000 or 0x1000 */
int which, special = 1;
@@ -1596,14 +1596,13 @@ namco_road_set_transparent_color(pen_t pen)
}
void
-namco_road_draw(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int pri )
+namco_road_draw(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int pri )
{
const UINT8 *clut = (const UINT8 *)machine.region("user3")->base();
- bitmap_t *pSourceBitmap;
unsigned yscroll;
int i;
- pSourceBitmap = tilemap_get_pixmap(mpRoadTilemap);
+ bitmap_t &SourceBitmap = tilemap_get_pixmap(mpRoadTilemap);
yscroll = mpRoadRAM[0x1fdfe/2];
for( i=cliprect.min_y; i<=cliprect.max_y; i++ )
@@ -1615,11 +1614,11 @@ namco_road_draw(running_machine &machine, bitmap_t *bitmap, const rectangle &cli
if( zoomx )
{
unsigned sourcey = mpRoadRAM[0x1fc00/2+i+15]+yscroll;
- const UINT16 *pSourceGfx = &pSourceBitmap->pix16(sourcey&(ROAD_TILEMAP_HEIGHT-1));
+ const UINT16 *pSourceGfx = &SourceBitmap.pix16(sourcey&(ROAD_TILEMAP_HEIGHT-1));
unsigned dsourcex = (ROAD_TILEMAP_WIDTH<<16)/zoomx;
if( dsourcex )
{
- UINT16 *pDest = &bitmap->pix16(i);
+ UINT16 *pDest = &bitmap.pix16(i);
unsigned sourcex = 0;
int numpixels = (44*ROAD_TILE_SIZE<<16)/dsourcex;
int clipPixels;
diff --git a/src/mame/drivers/namcos23.c b/src/mame/drivers/namcos23.c
index 112ebbbc77f..e565198f8c6 100644
--- a/src/mame/drivers/namcos23.c
+++ b/src/mame/drivers/namcos23.c
@@ -2064,7 +2064,7 @@ static int render_poly_compare(const void *i1, const void *i2)
return p1->zkey < p2->zkey ? 1 : p1->zkey > p2->zkey ? -1 : 0;
}
-static void render_flush(running_machine &machine, bitmap_t *bitmap)
+static void render_flush(running_machine &machine, bitmap_t &bitmap)
{
namcos23_state *state = machine.driver_data<namcos23_state>();
render_t &render = state->m_render;
@@ -2083,12 +2083,12 @@ static void render_flush(running_machine &machine, bitmap_t *bitmap)
const namcos23_poly_entry *p = render.poly_order[i];
namcos23_render_data *rd = (namcos23_render_data *)poly_get_extra_data(render.polymgr);
*rd = p->rd;
- poly_render_triangle_fan(render.polymgr, bitmap, scissor, render_scanline, 4, p->vertex_count, p->pv);
+ poly_render_triangle_fan(render.polymgr, &bitmap, scissor, render_scanline, 4, p->vertex_count, p->pv);
}
render.poly_count = 0;
}
-static void render_run(running_machine &machine, bitmap_t *bitmap)
+static void render_run(running_machine &machine, bitmap_t &bitmap)
{
namcos23_state *state = machine.driver_data<namcos23_state>();
render_t &render = state->m_render;
@@ -2136,7 +2136,7 @@ static VIDEO_START( ss23 )
static SCREEN_UPDATE( ss23 )
{
namcos23_state *state = screen.machine().driver_data<namcos23_state>();
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
render_run( screen.machine(), bitmap );
diff --git a/src/mame/drivers/neoprint.c b/src/mame/drivers/neoprint.c
index 7b9bf6ad53e..0db4964a6d3 100644
--- a/src/mame/drivers/neoprint.c
+++ b/src/mame/drivers/neoprint.c
@@ -53,7 +53,7 @@ xxxx xxxx xxxx xxxx [2] scroll Y, signed
---- ---- --?? ??xx [6] map register
*/
-static void draw_layer(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect,int layer,int data_shift)
+static void draw_layer(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect,int layer,int data_shift)
{
neoprint_state *state = machine.driver_data<neoprint_state>();
int i, y, x;
@@ -93,7 +93,7 @@ static void draw_layer(running_machine &machine, bitmap_t *bitmap,const rectangl
SCREEN_UPDATE(neoprint)
{
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
draw_layer(screen.machine(),bitmap,cliprect,1,2);
draw_layer(screen.machine(),bitmap,cliprect,0,2);
@@ -103,7 +103,7 @@ SCREEN_UPDATE(neoprint)
SCREEN_UPDATE(nprsp)
{
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
draw_layer(screen.machine(),bitmap,cliprect,1,0);
draw_layer(screen.machine(),bitmap,cliprect,2,0);
diff --git a/src/mame/drivers/nightgal.c b/src/mame/drivers/nightgal.c
index 1f025398c63..a3e3c790890 100644
--- a/src/mame/drivers/nightgal.c
+++ b/src/mame/drivers/nightgal.c
@@ -76,7 +76,7 @@ static SCREEN_UPDATE( nightgal )
for (y = cliprect.min_y; y <= cliprect.max_y; ++y)
{
UINT8 *src = &state->m_blit_buffer[y * 512 / 2 + cliprect.min_x];
- UINT16 *dst = &bitmap->pix16(y, cliprect.min_x);
+ UINT16 *dst = &bitmap.pix16(y, cliprect.min_x);
for (x = cliprect.min_x; x <= cliprect.max_x; x += 2)
{
diff --git a/src/mame/drivers/nmg5.c b/src/mame/drivers/nmg5.c
index c3276408c1b..ed1009a829d 100644
--- a/src/mame/drivers/nmg5.c
+++ b/src/mame/drivers/nmg5.c
@@ -845,7 +845,7 @@ static VIDEO_START( nmg5 )
tilemap_set_transparent_pen(state->m_fg_tilemap, 0);
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
nmg5_state *state = machine.driver_data<nmg5_state>();
UINT16 *spriteram = state->m_spriteram;
@@ -881,7 +881,7 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
}
}
-static void draw_bitmap( running_machine &machine, bitmap_t *bitmap )
+static void draw_bitmap( running_machine &machine, bitmap_t &bitmap )
{
nmg5_state *state = machine.driver_data<nmg5_state>();
int yyy = 256;
@@ -897,13 +897,13 @@ static void draw_bitmap( running_machine &machine, bitmap_t *bitmap )
for (x = 0; x < xxx; x++)
{
pix = (state->m_bitmap[count] & 0xf000) >> 12;
- if (pix) bitmap->pix16(y + yoff, x * 4 + 0 + xoff) = pix + 0x300;
+ if (pix) bitmap.pix16(y + yoff, x * 4 + 0 + xoff) = pix + 0x300;
pix = (state->m_bitmap[count] & 0x0f00) >> 8;
- if (pix) bitmap->pix16(y + yoff, x * 4 + 1 + xoff) = pix + 0x300;
+ if (pix) bitmap.pix16(y + yoff, x * 4 + 1 + xoff) = pix + 0x300;
pix = (state->m_bitmap[count] & 0x00f0) >> 4;
- if (pix) bitmap->pix16(y + yoff, x * 4 + 2 + xoff) = pix + 0x300;
+ if (pix) bitmap.pix16(y + yoff, x * 4 + 2 + xoff) = pix + 0x300;
pix = (state->m_bitmap[count] & 0x000f) >> 0;
- if (pix) bitmap->pix16(y + yoff, x * 4 + 3 + xoff) = pix + 0x300;
+ if (pix) bitmap.pix16(y + yoff, x * 4 + 3 + xoff) = pix + 0x300;
count++;
}
diff --git a/src/mame/drivers/norautp.c b/src/mame/drivers/norautp.c
index 8b94dd34a2f..c26093ecb16 100644
--- a/src/mame/drivers/norautp.c
+++ b/src/mame/drivers/norautp.c
@@ -571,7 +571,7 @@ static SCREEN_UPDATE( norautp )
count = 0;
- bitmap->fill(screen.machine().pens[0], cliprect); //black pen
+ bitmap.fill(screen.machine().pens[0], cliprect); //black pen
for(y = 0; y < 8; y++)
{
diff --git a/src/mame/drivers/nwk-tr.c b/src/mame/drivers/nwk-tr.c
index a5c4cce7e2e..e1f896b9c6e 100644
--- a/src/mame/drivers/nwk-tr.c
+++ b/src/mame/drivers/nwk-tr.c
@@ -265,7 +265,7 @@ static SCREEN_UPDATE( nwktr )
device_t *voodoo = screen.machine().device("voodoo");
device_t *k001604 = screen.machine().device("k001604");
- bitmap->fill(screen.machine().pens[0], cliprect);
+ bitmap.fill(screen.machine().pens[0], cliprect);
voodoo_update(voodoo, bitmap, cliprect);
diff --git a/src/mame/drivers/nyny.c b/src/mame/drivers/nyny.c
index 49ee63f8064..84418e89153 100644
--- a/src/mame/drivers/nyny.c
+++ b/src/mame/drivers/nyny.c
@@ -350,7 +350,7 @@ static MC6845_UPDATE_ROW( update_row )
else
color = bit2 ? color2 : 0;
- bitmap->pix32(y, x) = pens[color];
+ bitmap.pix32(y, x) = pens[color];
x += 1;
}
@@ -385,7 +385,7 @@ static MC6845_END_UPDATE( end_update )
{
/* check if the star status */
if (state->m_star_enable &&
- (bitmap->pix32(y, x) == pens[0]) &&
+ (bitmap.pix32(y, x) == pens[0]) &&
((state->m_star_shift_reg & 0x80ff) == 0x00ff) &&
(((y & 0x01) ^ state->m_flipscreen) ^ (((x & 0x08) >> 3) ^ state->m_flipscreen)))
{
@@ -393,7 +393,7 @@ static MC6845_END_UPDATE( end_update )
((state->m_star_shift_reg & 0x0400) >> 9) | /* G */
((state->m_star_shift_reg & 0x1000) >> 10); /* B */
- bitmap->pix32(y, x) = pens[color];
+ bitmap.pix32(y, x) = pens[color];
}
if (delay_counter == 0)
diff --git a/src/mame/drivers/olibochu.c b/src/mame/drivers/olibochu.c
index 8a79543a36b..fc4ecde1de5 100644
--- a/src/mame/drivers/olibochu.c
+++ b/src/mame/drivers/olibochu.c
@@ -158,7 +158,7 @@ static VIDEO_START( olibochu )
state->m_bg_tilemap = tilemap_create(machine, get_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
olibochu_state *state = machine.driver_data<olibochu_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/drivers/othello.c b/src/mame/drivers/othello.c
index 69571c31416..23f9e4e8a18 100644
--- a/src/mame/drivers/othello.c
+++ b/src/mame/drivers/othello.c
@@ -92,7 +92,7 @@ static MC6845_UPDATE_ROW( update_row )
for(x = 0; x < TILE_WIDTH; ++x)
{
- bitmap->pix16(y, (cx * TILE_WIDTH + x) ^ 1) = tmp & 0x0f;
+ bitmap.pix16(y, (cx * TILE_WIDTH + x) ^ 1) = tmp & 0x0f;
tmp >>= 4;
}
}
diff --git a/src/mame/drivers/panicr.c b/src/mame/drivers/panicr.c
index 8b65a45ed10..20978b1e191 100644
--- a/src/mame/drivers/panicr.c
+++ b/src/mame/drivers/panicr.c
@@ -215,7 +215,7 @@ static VIDEO_START( panicr )
colortable_configure_tilemap_groups(machine.colortable, state->m_txttilemap, machine.gfx[0], 0);
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect )
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect )
{
panicr_state *state = machine.driver_data<panicr_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -242,7 +242,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectan
static SCREEN_UPDATE( panicr)
{
panicr_state *state = screen.machine().driver_data<panicr_state>();
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
tilemap_mark_all_tiles_dirty( state->m_txttilemap );
tilemap_set_scrollx( state->m_bgtilemap,0, ((state->m_scrollram[0x02]&0x0f)<<12)+((state->m_scrollram[0x02]&0xf0)<<4)+((state->m_scrollram[0x04]&0x7f)<<1)+((state->m_scrollram[0x04]&0x80)>>7) );
tilemap_draw(bitmap,cliprect,state->m_bgtilemap,0,0);
diff --git a/src/mame/drivers/pasha2.c b/src/mame/drivers/pasha2.c
index b706d7227f5..54c4e7bbc6b 100644
--- a/src/mame/drivers/pasha2.c
+++ b/src/mame/drivers/pasha2.c
@@ -348,10 +348,10 @@ static SCREEN_UPDATE( pasha2 )
if (x * 2 < cliprect.max_x)
{
color = (state->m_bitmap0[count + (state->m_vbuffer ^ 1) * 0x20000 / 2] & 0xff00) >> 8;
- bitmap->pix16(y, x * 2 + 0) = color + 0x100;
+ bitmap.pix16(y, x * 2 + 0) = color + 0x100;
color = state->m_bitmap0[count + (state->m_vbuffer ^ 1) * 0x20000 / 2] & 0xff;
- bitmap->pix16(y, x * 2 + 1) = color + 0x100;
+ bitmap.pix16(y, x * 2 + 1) = color + 0x100;
}
count++;
@@ -367,11 +367,11 @@ static SCREEN_UPDATE( pasha2 )
{
color = state->m_bitmap1[count + (state->m_vbuffer ^ 1) * 0x20000 / 2] & 0xff;
if (color != 0)
- bitmap->pix16(y, x * 2 + 1) = color;
+ bitmap.pix16(y, x * 2 + 1) = color;
color = (state->m_bitmap1[count + (state->m_vbuffer ^ 1) * 0x20000 / 2] & 0xff00) >> 8;
if (color != 0)
- bitmap->pix16(y, x * 2 + 0) = color;
+ bitmap.pix16(y, x * 2 + 0) = color;
}
count++;
diff --git a/src/mame/drivers/pcxt.c b/src/mame/drivers/pcxt.c
index d622fe1e9ad..8be5629b84d 100644
--- a/src/mame/drivers/pcxt.c
+++ b/src/mame/drivers/pcxt.c
@@ -102,7 +102,7 @@ static SCREEN_UPDATE( tetriskr )
//popmessage("%04x",m_start_offs);
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
for(y=0;y<200/8;y++)
{
@@ -121,7 +121,7 @@ static SCREEN_UPDATE( tetriskr )
color |= ((bg_rom[y*320/8+x+(pen_i*0x20000)+yi*0x400+state->m_bg_bank*0x2000+1] >> (7-xi)) & 1) << pen_i;
if((x+xi)<screen.visible_area().max_x && ((y)+yi)<screen.visible_area().max_y)
- bitmap->pix16(y*8+yi, x*8+xi) = screen.machine().pens[color];
+ bitmap.pix16(y*8+yi, x*8+xi) = screen.machine().pens[color];
}
}
}
diff --git a/src/mame/drivers/photon2.c b/src/mame/drivers/photon2.c
index 9f2dd992236..3c1df7c7d73 100644
--- a/src/mame/drivers/photon2.c
+++ b/src/mame/drivers/photon2.c
@@ -111,9 +111,9 @@ static SCREEN_EOF( spectrum )
}
}
-INLINE void spectrum_plot_pixel(bitmap_t *bitmap, int x, int y, UINT32 color)
+INLINE void spectrum_plot_pixel(bitmap_t &bitmap, int x, int y, UINT32 color)
{
- bitmap->pix16(y, x) = (UINT16)color;
+ bitmap.pix16(y, x) = (UINT16)color;
}
static SCREEN_UPDATE( spectrum )
@@ -127,7 +127,7 @@ static SCREEN_UPDATE( spectrum )
scr=state->m_spectrum_video_ram;
- bitmap->fill(state->m_spectrum_port_fe & 0x07, cliprect);
+ bitmap.fill(state->m_spectrum_port_fe & 0x07, cliprect);
for (y=0; y<192; y++)
{
diff --git a/src/mame/drivers/pinkiri8.c b/src/mame/drivers/pinkiri8.c
index a84b1c6fd13..9f4babacb96 100644
--- a/src/mame/drivers/pinkiri8.c
+++ b/src/mame/drivers/pinkiri8.c
@@ -213,7 +213,7 @@ static SCREEN_UPDATE( pinkiri8 )
//popmessage("%02x",state->m_janshi_crtc_regs[0x0a]);
col_bank = (state->m_janshi_crtc_regs[0x0a] & 0x40) >> 6;
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
/* FIXME: color is a bit of a mystery */
{
diff --git a/src/mame/drivers/powerbal.c b/src/mame/drivers/powerbal.c
index 86c8a34e200..1ce9b99d8ad 100644
--- a/src/mame/drivers/powerbal.c
+++ b/src/mame/drivers/powerbal.c
@@ -388,7 +388,7 @@ static TILE_GET_INFO( powerbal_get_bg_tile_info )
SET_TILE_INFO(1, code, colr >> 12, 0);
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
playmark_state *state = machine.driver_data<playmark_state>();
UINT16 *spriteram = state->m_spriteram;
diff --git a/src/mame/drivers/progolf.c b/src/mame/drivers/progolf.c
index fe2e4388865..5ffaa0fd31a 100644
--- a/src/mame/drivers/progolf.c
+++ b/src/mame/drivers/progolf.c
@@ -128,7 +128,7 @@ static SCREEN_UPDATE( progolf )
color = state->m_fg_fb[(xi+yi*8)+count*0x40];
if((x+yi) <= cliprect.max_x && (256-y+xi) <= cliprect.max_y && color != 0)
- bitmap->pix16(x+yi, 256-y+xi) = screen.machine().pens[(color & 0x7)];
+ bitmap.pix16(x+yi, 256-y+xi) = screen.machine().pens[(color & 0x7)];
}
}
diff --git a/src/mame/drivers/pturn.c b/src/mame/drivers/pturn.c
index 7c3506c5a75..d931d5bfaf1 100644
--- a/src/mame/drivers/pturn.c
+++ b/src/mame/drivers/pturn.c
@@ -154,7 +154,7 @@ static SCREEN_UPDATE(pturn)
int sx, sy;
int flipx, flipy;
- bitmap->fill(state->m_bgcolor, cliprect);
+ bitmap.fill(state->m_bgcolor, cliprect);
tilemap_draw(bitmap,cliprect,state->m_bgmap,0,0);
for ( offs = 0x80-4 ; offs >=0 ; offs -= 4)
{
diff --git a/src/mame/drivers/pzletime.c b/src/mame/drivers/pzletime.c
index 4ef17a7ac11..223f81f67a9 100644
--- a/src/mame/drivers/pzletime.c
+++ b/src/mame/drivers/pzletime.c
@@ -81,7 +81,7 @@ static SCREEN_UPDATE( pzletime )
int count;
int y, x;
- bitmap->fill(screen.machine().pens[0], cliprect); //bg pen
+ bitmap.fill(screen.machine().pens[0], cliprect); //bg pen
tilemap_set_scrolly(state->m_txt_tilemap, 0, state->m_tilemap_regs[0] - 3);
tilemap_set_scrollx(state->m_txt_tilemap, 0, state->m_tilemap_regs[1]);
@@ -98,7 +98,7 @@ static SCREEN_UPDATE( pzletime )
for (x = 0; x < 512; x++)
{
if (state->m_bg_videoram[count] & 0x8000)
- bitmap->pix16((y - 18) & 0xff, (x - 32) & 0x1ff) = 0x300 + (state->m_bg_videoram[count] & 0x7fff);
+ bitmap.pix16((y - 18) & 0xff, (x - 32) & 0x1ff) = 0x300 + (state->m_bg_videoram[count] & 0x7fff);
count++;
}
diff --git a/src/mame/drivers/quizo.c b/src/mame/drivers/quizo.c
index f8a33154c25..f665c1e8452 100644
--- a/src/mame/drivers/quizo.c
+++ b/src/mame/drivers/quizo.c
@@ -87,19 +87,19 @@ static SCREEN_UPDATE( quizo )
int pix;
pix=(data&1)|(((data>>4)&1)<<1)|((data1&1)<<2)|(((data1>>4)&1)<<3);
- bitmap->pix16(y, x*4+3) = pix;
+ bitmap.pix16(y, x*4+3) = pix;
data>>=1;
data1>>=1;
pix=(data&1)|(((data>>4)&1)<<1)|((data1&1)<<2)|(((data1>>4)&1)<<3);
- bitmap->pix16(y, x*4+2) = pix;
+ bitmap.pix16(y, x*4+2) = pix;
data>>=1;
data1>>=1;
pix=(data&1)|(((data>>4)&1)<<1)|((data1&1)<<2)|(((data1>>4)&1)<<3);
- bitmap->pix16(y, x*4+1) = pix;
+ bitmap.pix16(y, x*4+1) = pix;
data>>=1;
data1>>=1;
pix=(data&1)|(((data>>4)&1)<<1)|((data1&1)<<2)|(((data1>>4)&1)<<3);
- bitmap->pix16(y, x*4+0) = pix;
+ bitmap.pix16(y, x*4+0) = pix;
}
}
return 0;
diff --git a/src/mame/drivers/quizpun2.c b/src/mame/drivers/quizpun2.c
index 7e2b829d5d4..c0cb9a8c19c 100644
--- a/src/mame/drivers/quizpun2.c
+++ b/src/mame/drivers/quizpun2.c
@@ -163,9 +163,9 @@ static SCREEN_UPDATE(quizpun2)
#endif
if (layers_ctrl & 1) tilemap_draw(bitmap,cliprect, state->m_bg_tmap, TILEMAP_DRAW_OPAQUE, 0);
- else bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ else bitmap.fill(get_black_pen(screen.machine()), cliprect);
-bitmap->fill(get_black_pen(screen.machine()), cliprect);
+bitmap.fill(get_black_pen(screen.machine()), cliprect);
if (layers_ctrl & 2) tilemap_draw(bitmap,cliprect, state->m_fg_tmap, 0, 0);
return 0;
diff --git a/src/mame/drivers/r2dtank.c b/src/mame/drivers/r2dtank.c
index 84d056d7c50..2fc0c4e3922 100644
--- a/src/mame/drivers/r2dtank.c
+++ b/src/mame/drivers/r2dtank.c
@@ -366,7 +366,7 @@ static MC6845_UPDATE_ROW( update_row )
}
color = bit ? fore_color : RGB_BLACK;
- bitmap->pix32(y, x) = pens[color];
+ bitmap.pix32(y, x) = pens[color];
x = x + 1;
}
diff --git a/src/mame/drivers/r2dx_v33.c b/src/mame/drivers/r2dx_v33.c
index b546073d586..4797bbab438 100644
--- a/src/mame/drivers/r2dx_v33.c
+++ b/src/mame/drivers/r2dx_v33.c
@@ -80,7 +80,7 @@ static TILE_GET_INFO( get_tx_tile_info )
}
/* copied from Legionnaire */
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect,int pri)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect,int pri)
{
r2dx_v33_state *state = machine.driver_data<r2dx_v33_state>();
UINT16 *spriteram16 = state->m_spriteram;
@@ -181,7 +181,7 @@ static VIDEO_START( rdx_v33 )
static SCREEN_UPDATE( rdx_v33 )
{
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0);
tilemap_draw(bitmap, cliprect, md_tilemap, 0, 0);
diff --git a/src/mame/drivers/rabbit.c b/src/mame/drivers/rabbit.c
index ce17a32cdf2..4d98473ea5e 100644
--- a/src/mame/drivers/rabbit.c
+++ b/src/mame/drivers/rabbit.c
@@ -230,7 +230,7 @@ sprites invisible at the end of a round in rabbit, why?
*/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
rabbit_state *state = machine.driver_data<rabbit_state>();
int xpos,ypos,tileno,xflip,yflip, colr;
@@ -258,7 +258,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const recta
if(xpos&0x800)xpos-=0x1000;
- drawgfx_transpen(state->m_sprite_bitmap,state->m_sprite_clip,gfx,tileno,colr,!xflip/*wrongdecode?*/,yflip,xpos+0x20-8/*-(state->m_spriteregs[0]&0x00000fff)*/,ypos-24/*-((state->m_spriteregs[1]&0x0fff0000)>>16)*/,15);
+ drawgfx_transpen(*state->m_sprite_bitmap,state->m_sprite_clip,gfx,tileno,colr,!xflip/*wrongdecode?*/,yflip,xpos+0x20-8/*-(state->m_spriteregs[0]&0x00000fff)*/,ypos-24/*-((state->m_spriteregs[1]&0x0fff0000)>>16)*/,15);
// drawgfx_transpen(bitmap,cliprect,gfx,tileno,colr,!xflip/*wrongdecode?*/,yflip,xpos+0xa0-8/*-(state->m_spriteregs[0]&0x00000fff)*/,ypos-24+0x80/*-((state->m_spriteregs[1]&0x0fff0000)>>16)*/,0);
@@ -269,7 +269,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const recta
}
/* the sprite bitmap can probably be handled better than this ... */
-static void rabbit_clearspritebitmap( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void rabbit_clearspritebitmap( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
rabbit_state *state = machine.driver_data<rabbit_state>();
int startx, starty;
@@ -297,7 +297,7 @@ static void rabbit_clearspritebitmap( running_machine &machine, bitmap_t *bitmap
}
/* todo: fix zoom, its inaccurate and this code is ugly */
-static void draw_sprite_bitmap( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprite_bitmap( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
rabbit_state *state = machine.driver_data<rabbit_state>();
@@ -333,7 +333,7 @@ static void draw_sprite_bitmap( running_machine &machine, bitmap_t *bitmap, cons
if ((ydrawpos >= cliprect.min_y) && (ydrawpos <= cliprect.max_y))
{
srcline = &state->m_sprite_bitmap->pix16((starty+(y>>7))&0xfff);
- dstline = &bitmap->pix16(ydrawpos);
+ dstline = &bitmap.pix16(ydrawpos);
for (x=0;x<xsize;x+=0x80)
{
@@ -405,7 +405,7 @@ each line represents the differences on each tilemap for unknown variables
*/
-static void rabbit_drawtilemap( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int whichtilemap )
+static void rabbit_drawtilemap( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int whichtilemap )
{
rabbit_state *state = machine.driver_data<rabbit_state>();
INT32 startx, starty, incxx, incxy, incyx, incyy, tran;
@@ -434,7 +434,7 @@ static SCREEN_UPDATE(rabbit)
rabbit_state *state = screen.machine().driver_data<rabbit_state>();
int prilevel;
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
// popmessage("%08x %08x", state->m_viewregs0[0], state->m_viewregs0[1]);
// popmessage("%08x %08x %08x %08x %08x %08x", state->m_tilemap_regs[0][0],state->m_tilemap_regs[0][1],state->m_tilemap_regs[0][2],state->m_tilemap_regs[0][3],state->m_tilemap_regs[0][4],state->m_tilemap_regs[0][5]);
diff --git a/src/mame/drivers/raiden2.c b/src/mame/drivers/raiden2.c
index ac9c7e2ca56..a2990ee520c 100644
--- a/src/mame/drivers/raiden2.c
+++ b/src/mame/drivers/raiden2.c
@@ -629,7 +629,7 @@ static void combine32(UINT32 *val, int offset, UINT16 data, UINT16 mem_mask)
/* SPRITE DRAWING (move to video file) */
-void raiden2_state::draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect ,int pri_mask )
+void raiden2_state::draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect ,int pri_mask )
{
UINT16 *source = sprites + sprites_cur_start/2 - 4;
@@ -889,7 +889,7 @@ static VIDEO_START( raiden2 )
static SCREEN_UPDATE( raiden2 )
{
raiden2_state *state = screen.machine().driver_data<raiden2_state>();
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
//if (!screen.machine().input().code_pressed(KEYCODE_Q))
{
diff --git a/src/mame/drivers/rotaryf.c b/src/mame/drivers/rotaryf.c
index 1d3e10cb2e4..fab9a539f3a 100644
--- a/src/mame/drivers/rotaryf.c
+++ b/src/mame/drivers/rotaryf.c
@@ -79,7 +79,7 @@ static SCREEN_UPDATE( rotaryf )
for (i = 0; i < 8; i++)
{
pen_t pen = (data & 0x01) ? RGB_WHITE : RGB_BLACK;
- bitmap->pix32(y, x) = pen;
+ bitmap.pix32(y, x) = pen;
data = data >> 1;
x = x + 1;
diff --git a/src/mame/drivers/roul.c b/src/mame/drivers/roul.c
index 87a99736628..60af6b180ff 100644
--- a/src/mame/drivers/roul.c
+++ b/src/mame/drivers/roul.c
@@ -216,7 +216,7 @@ static SCREEN_UPDATE(roul)
int i,j;
for (i = 0; i < 256; i++)
for (j = 0; j < 256; j++)
- bitmap->pix16(j, i) = state->m_videobuf[j * 256 + 255 - i];
+ bitmap.pix16(j, i) = state->m_videobuf[j * 256 + 255 - i];
return 0;
}
diff --git a/src/mame/drivers/royalmah.c b/src/mame/drivers/royalmah.c
index 328964483e4..ead93b8a1eb 100644
--- a/src/mame/drivers/royalmah.c
+++ b/src/mame/drivers/royalmah.c
@@ -233,7 +233,7 @@ static SCREEN_UPDATE( royalmah )
{
UINT8 pen = ((data2 >> 1) & 0x08) | ((data2 << 2) & 0x04) | ((data1 >> 3) & 0x02) | ((data1 >> 0) & 0x01);
- bitmap->pix16(y, x) = (state->m_palette_base << 4) | pen;
+ bitmap.pix16(y, x) = (state->m_palette_base << 4) | pen;
x = x - 1;
data1 = data1 >> 1;
diff --git a/src/mame/drivers/sangho.c b/src/mame/drivers/sangho.c
index cb1e0a2fa95..97941ac4106 100644
--- a/src/mame/drivers/sangho.c
+++ b/src/mame/drivers/sangho.c
@@ -369,7 +369,7 @@ static TIMER_DEVICE_CALLBACK( sangho_interrupt )
static VIDEO_START( sangho )
{
VIDEO_START_CALL(generic_bitmapped);
- v9938_init (machine, 0, *machine.primary_screen, machine.generic.tmpbitmap, MODEL_V9938, 0x20000, msx_vdp_interrupt);
+ v9938_init (machine, 0, *machine.primary_screen, *machine.generic.tmpbitmap, MODEL_V9938, 0x20000, msx_vdp_interrupt);
}
static MACHINE_CONFIG_START( pzlestar, sangho_state )
diff --git a/src/mame/drivers/sbowling.c b/src/mame/drivers/sbowling.c
index d989b458a9b..a3a94f5d46e 100644
--- a/src/mame/drivers/sbowling.c
+++ b/src/mame/drivers/sbowling.c
@@ -112,9 +112,9 @@ static SCREEN_UPDATE(sbowling)
{
sbowling_state *state = screen.machine().driver_data<sbowling_state>();
- bitmap->fill(0x18, cliprect);
+ bitmap.fill(0x18, cliprect);
tilemap_draw(bitmap, cliprect,state->m_sb_tilemap, 0, 0);
- copybitmap_trans(bitmap, state->m_tmpbitmap, 0, 0, 0, 0, cliprect, state->m_color_prom_address);
+ copybitmap_trans(bitmap, *state->m_tmpbitmap, 0, 0, 0, 0, cliprect, state->m_color_prom_address);
return 0;
}
diff --git a/src/mame/drivers/segac2.c b/src/mame/drivers/segac2.c
index fdfd9213dff..3e262abddb7 100644
--- a/src/mame/drivers/segac2.c
+++ b/src/mame/drivers/segac2.c
@@ -1267,7 +1267,7 @@ static SCREEN_UPDATE(segac2_new)
segac2_state *state = screen.machine().driver_data<segac2_state>();
if (!state->m_segac2_enable_display)
{
- bitmap->fill(get_black_pen(screen.machine()));
+ bitmap.fill(get_black_pen(screen.machine()));
return 0;
}
diff --git a/src/mame/drivers/segae.c b/src/mame/drivers/segae.c
index e216c9b5332..c2d6f1b2d2e 100644
--- a/src/mame/drivers/segae.c
+++ b/src/mame/drivers/segae.c
@@ -1010,7 +1010,7 @@ static SCREEN_UPDATE( systeme )
for( int y = cliprect.min_y; y <= cliprect.max_y; y++ )
{
- UINT32 *dest_ptr = &bitmap->pix32(y);
+ UINT32 *dest_ptr = &bitmap.pix32(y);
UINT32 *vdp1_ptr = &vdp1_bitmap->pix32(y);
UINT32 *vdp2_ptr = &vdp2_bitmap->pix32(y);
UINT8 *y1_ptr = &vdp2_y1->pix8(y);
diff --git a/src/mame/drivers/segald.c b/src/mame/drivers/segald.c
index c5c492dbf56..7e3889444d1 100644
--- a/src/mame/drivers/segald.c
+++ b/src/mame/drivers/segald.c
@@ -44,7 +44,7 @@ public:
};
/* VIDEO GOODS */
-static void astron_draw_characters(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void astron_draw_characters(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect)
{
segald_state *state = machine.driver_data<segald_state>();
UINT8 characterX, characterY;
@@ -60,7 +60,7 @@ static void astron_draw_characters(running_machine &machine, bitmap_t *bitmap,co
}
}
-static void astron_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void astron_draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
/* Heisted from Daphne */
const UINT8 SPR_Y_TOP = 0;
@@ -91,7 +91,7 @@ static void astron_draw_sprites(running_machine &machine, bitmap_t *bitmap, cons
static SCREEN_UPDATE( astron )
{
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
astron_draw_characters(screen.machine(), bitmap, cliprect);
astron_draw_sprites(screen.machine(), bitmap, cliprect);
diff --git a/src/mame/drivers/sfbonus.c b/src/mame/drivers/sfbonus.c
index f1f921663d0..4a64179f625 100644
--- a/src/mame/drivers/sfbonus.c
+++ b/src/mame/drivers/sfbonus.c
@@ -781,7 +781,7 @@ static VIDEO_START(sfbonus)
}
-static void sfbonus_draw_reel_layer(screen_device &screen, bitmap_t *bitmap, const rectangle &cliprect, int catagory)
+static void sfbonus_draw_reel_layer(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect, int catagory)
{
sfbonus_state *state = screen.machine().driver_data<sfbonus_state>();
int zz;
@@ -877,38 +877,38 @@ static void sfbonus_draw_reel_layer(screen_device &screen, bitmap_t *bitmap, con
if (rowenable2==0)
{
- tilemap_draw(state->m_temp_reel_bitmap,clip,state->m_reel_tilemap,TILEMAP_DRAW_CATEGORY(catagory),3);
+ tilemap_draw(*state->m_temp_reel_bitmap,clip,state->m_reel_tilemap,TILEMAP_DRAW_CATEGORY(catagory),3);
}
if (rowenable==0)
{
- tilemap_draw(state->m_temp_reel_bitmap,clip,state->m_reel_tilemap,TILEMAP_DRAW_CATEGORY(catagory),3);
+ tilemap_draw(*state->m_temp_reel_bitmap,clip,state->m_reel_tilemap,TILEMAP_DRAW_CATEGORY(catagory),3);
}
if (rowenable2==0x1)
{
- tilemap_draw(state->m_temp_reel_bitmap,clip,state->m_reel2_tilemap,TILEMAP_DRAW_CATEGORY(catagory),2);
+ tilemap_draw(*state->m_temp_reel_bitmap,clip,state->m_reel2_tilemap,TILEMAP_DRAW_CATEGORY(catagory),2);
}
if (rowenable==0x1)
{
- tilemap_draw(state->m_temp_reel_bitmap,clip,state->m_reel2_tilemap,TILEMAP_DRAW_CATEGORY(catagory),2);
+ tilemap_draw(*state->m_temp_reel_bitmap,clip,state->m_reel2_tilemap,TILEMAP_DRAW_CATEGORY(catagory),2);
}
if (rowenable2==0x2)
{
- tilemap_draw(state->m_temp_reel_bitmap,clip,state->m_reel3_tilemap,TILEMAP_DRAW_CATEGORY(catagory),1);
+ tilemap_draw(*state->m_temp_reel_bitmap,clip,state->m_reel3_tilemap,TILEMAP_DRAW_CATEGORY(catagory),1);
}
if (rowenable==0x2)
{
- tilemap_draw(state->m_temp_reel_bitmap,clip,state->m_reel3_tilemap,TILEMAP_DRAW_CATEGORY(catagory),1);
+ tilemap_draw(*state->m_temp_reel_bitmap,clip,state->m_reel3_tilemap,TILEMAP_DRAW_CATEGORY(catagory),1);
}
if (rowenable2==0x3)
{
- tilemap_draw(state->m_temp_reel_bitmap,clip,state->m_reel4_tilemap,TILEMAP_DRAW_CATEGORY(catagory),4);
+ tilemap_draw(*state->m_temp_reel_bitmap,clip,state->m_reel4_tilemap,TILEMAP_DRAW_CATEGORY(catagory),4);
}
if (rowenable==0x3)
{
- tilemap_draw(state->m_temp_reel_bitmap,clip,state->m_reel4_tilemap,TILEMAP_DRAW_CATEGORY(catagory),4);
+ tilemap_draw(*state->m_temp_reel_bitmap,clip,state->m_reel4_tilemap,TILEMAP_DRAW_CATEGORY(catagory),4);
}
@@ -934,11 +934,11 @@ static SCREEN_UPDATE(sfbonus)
globalyscroll += 8;
globalxscroll += 8;
- bitmap->fill(screen.machine().pens[0], cliprect);
+ bitmap.fill(screen.machine().pens[0], cliprect);
state->m_temp_reel_bitmap->fill(screen.machine().pens[0], cliprect);
/* render reels to bitmap */
- sfbonus_draw_reel_layer(screen,state->m_temp_reel_bitmap,cliprect,0);
+ sfbonus_draw_reel_layer(screen,*state->m_temp_reel_bitmap,cliprect,0);
{
int y,x;
@@ -948,7 +948,7 @@ static SCREEN_UPDATE(sfbonus)
for (x=0;x<512;x++)
{
UINT16* src = &state->m_temp_reel_bitmap->pix16(y, x);
- UINT16* dst = &bitmap->pix16(y, x);
+ UINT16* dst = &bitmap.pix16(y, x);
if ((src[0]&0x100)==0x000)
dst[0] = src[0];
@@ -974,7 +974,7 @@ static SCREEN_UPDATE(sfbonus)
for (x=0;x<512;x++)
{
UINT16* src = &state->m_temp_reel_bitmap->pix16(y, x);
- UINT16* dst = &bitmap->pix16(y, x);
+ UINT16* dst = &bitmap.pix16(y, x);
if ((src[0]&0x100)==0x100)
dst[0] = src[0]-0x100;
diff --git a/src/mame/drivers/sfkick.c b/src/mame/drivers/sfkick.c
index bea212ebef1..0109d5de765 100644
--- a/src/mame/drivers/sfkick.c
+++ b/src/mame/drivers/sfkick.c
@@ -437,7 +437,7 @@ static void sfkick_vdp_interrupt(running_machine &machine, int i)
static VIDEO_START( sfkick )
{
VIDEO_START_CALL(generic_bitmapped);
- v9938_init (machine, 0, *machine.primary_screen, machine.generic.tmpbitmap, MODEL_V9938, 0x80000, sfkick_vdp_interrupt);
+ v9938_init (machine, 0, *machine.primary_screen, *machine.generic.tmpbitmap, MODEL_V9938, 0x80000, sfkick_vdp_interrupt);
v9938_reset(0);
}
diff --git a/src/mame/drivers/shanghai.c b/src/mame/drivers/shanghai.c
index 6e5e4013326..8f3f7df339a 100644
--- a/src/mame/drivers/shanghai.c
+++ b/src/mame/drivers/shanghai.c
@@ -83,8 +83,8 @@ static SCREEN_UPDATE( shanghai )
{
b &= (HD63484_RAM_SIZE - 1);
src = hd63484_ram_r(hd63484, b, 0xffff);
- bitmap->pix16(y, x) = src & 0x00ff;
- bitmap->pix16(y, x + 1) = (src & 0xff00) >> 8;
+ bitmap.pix16(y, x) = src & 0x00ff;
+ bitmap.pix16(y, x + 1) = (src & 0xff00) >> 8;
b++;
}
}
@@ -107,8 +107,8 @@ static SCREEN_UPDATE( shanghai )
src = hd63484_ram_r(hd63484, b, 0xffff);
if (x <= w && x + sx >= 0 && x + sx < (hd63484_regs_r(hd63484, 0xca/2, 0xffff) & 0x0fff) * 2)
{
- bitmap->pix16(y, x + sx) = src & 0x00ff;
- bitmap->pix16(y, x + sx + 1) = (src & 0xff00) >> 8;
+ bitmap.pix16(y, x + sx) = src & 0x00ff;
+ bitmap.pix16(y, x + sx + 1) = (src & 0xff00) >> 8;
}
b++;
}
diff --git a/src/mame/drivers/shougi.c b/src/mame/drivers/shougi.c
index 71ac1b402d1..98af9f6af50 100644
--- a/src/mame/drivers/shougi.c
+++ b/src/mame/drivers/shougi.c
@@ -182,7 +182,7 @@ static SCREEN_UPDATE( shougi )
color= ((data1>>x) & 1) | (((data1>>(4+x)) & 1)<<1);
data = ((data2>>x) & 1) | (((data2>>(4+x)) & 1)<<1);
- bitmap->pix16(255-sy, 255-(sx*4 + x)) = color*4 + data;
+ bitmap.pix16(255-sy, 255-(sx*4 + x)) = color*4 + data;
}
}
diff --git a/src/mame/drivers/sigmab52.c b/src/mame/drivers/sigmab52.c
index 0019fa0deb8..e4e01390f8e 100644
--- a/src/mame/drivers/sigmab52.c
+++ b/src/mame/drivers/sigmab52.c
@@ -182,10 +182,10 @@ static SCREEN_UPDATE( jwildb52 )
src = hd63484_ram_r(hd63484, b & (HD63484_RAM_SIZE - 1), 0xffff);
- bitmap->pix16(y, x ) = ((src & 0x000f) >> 0) << 0;
- bitmap->pix16(y, x + 1) = ((src & 0x00f0) >> 4) << 0;
- bitmap->pix16(y, x + 2) = ((src & 0x0f00) >> 8) << 0;
- bitmap->pix16(y, x + 3) = ((src & 0xf000) >> 12) << 0;
+ bitmap.pix16(y, x ) = ((src & 0x000f) >> 0) << 0;
+ bitmap.pix16(y, x + 1) = ((src & 0x00f0) >> 4) << 0;
+ bitmap.pix16(y, x + 2) = ((src & 0x0f00) >> 8) << 0;
+ bitmap.pix16(y, x + 3) = ((src & 0xf000) >> 12) << 0;
b++;
}
}
@@ -210,10 +210,10 @@ if (!screen.machine().input().code_pressed(KEYCODE_O))
if (x <= w && x + sx >= 0 && x + sx < (hd63484_regs_r(hd63484, 0xca/2, 0xffff) & 0x0fff) * 4)
{
- bitmap->pix16(y, x + sx ) = ((src & 0x000f) >> 0) << 0;
- bitmap->pix16(y, x + sx + 1) = ((src & 0x00f0) >> 4) << 0;
- bitmap->pix16(y, x + sx + 2) = ((src & 0x0f00) >> 8) << 0;
- bitmap->pix16(y, x + sx + 3) = ((src & 0xf000) >> 12) << 0;
+ bitmap.pix16(y, x + sx ) = ((src & 0x000f) >> 0) << 0;
+ bitmap.pix16(y, x + sx + 1) = ((src & 0x00f0) >> 4) << 0;
+ bitmap.pix16(y, x + sx + 2) = ((src & 0x0f00) >> 8) << 0;
+ bitmap.pix16(y, x + sx + 3) = ((src & 0xf000) >> 12) << 0;
}
b++;
}
diff --git a/src/mame/drivers/sigmab98.c b/src/mame/drivers/sigmab98.c
index efa500ad31b..681bef40a64 100644
--- a/src/mame/drivers/sigmab98.c
+++ b/src/mame/drivers/sigmab98.c
@@ -167,7 +167,7 @@ public:
***************************************************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int pri_mask)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int pri_mask)
{
sigmab98_state *state = machine.driver_data<sigmab98_state>();
UINT8 *end = state->m_spriteram - 0x10;
@@ -265,7 +265,7 @@ static SCREEN_UPDATE(sigmab98)
}
#endif
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
// Draw from priority 3 (bottom, converted to a bitmask) to priority 0 (top)
draw_sprites(screen.machine(), bitmap, cliprect, layers_ctrl & 8);
diff --git a/src/mame/drivers/skeetsht.c b/src/mame/drivers/skeetsht.c
index c372637220f..88cc856af17 100644
--- a/src/mame/drivers/skeetsht.c
+++ b/src/mame/drivers/skeetsht.c
@@ -58,12 +58,12 @@ static VIDEO_START ( skeetsht )
{
}
-static void skeetsht_scanline_update(screen_device &screen, bitmap_t *bitmap, int scanline, const tms34010_display_params *params)
+static void skeetsht_scanline_update(screen_device &screen, bitmap_t &bitmap, int scanline, const tms34010_display_params *params)
{
skeetsht_state *state = screen.machine().driver_data<skeetsht_state>();
const rgb_t *const pens = tlc34076_get_pens(screen.machine().device("tlc34076"));
UINT16 *vram = &state->m_tms_vram[(params->rowaddr << 8) & 0x3ff00];
- UINT32 *dest = &bitmap->pix32(scanline);
+ UINT32 *dest = &bitmap.pix32(scanline);
int coladdr = params->coladdr;
int x;
diff --git a/src/mame/drivers/skimaxx.c b/src/mame/drivers/skimaxx.c
index 163c7151a32..b6dc3274fa6 100644
--- a/src/mame/drivers/skimaxx.c
+++ b/src/mame/drivers/skimaxx.c
@@ -172,7 +172,7 @@ static void skimaxx_from_shiftreg(address_space *space, UINT32 address, UINT16 *
*
*************************************/
-static void skimaxx_scanline_update(screen_device &screen, bitmap_t *bitmap, int scanline, const tms34010_display_params *params)
+static void skimaxx_scanline_update(screen_device &screen, bitmap_t &bitmap, int scanline, const tms34010_display_params *params)
{
skimaxx_state *state = screen.machine().driver_data<skimaxx_state>();
// TODO: This isn't correct. I just hacked it together quickly so I could see something!
@@ -182,7 +182,7 @@ static void skimaxx_scanline_update(screen_device &screen, bitmap_t *bitmap, int
UINT32 rowaddr = (params->rowaddr - 0x220);
UINT16 *fg = &state->m_fg_buffer[rowaddr << 8];
UINT32 *bg = &state->m_bg_buffer_front[rowaddr/2 * 1024/2];
- UINT16 *dest = &bitmap->pix16(scanline);
+ UINT16 *dest = &bitmap.pix16(scanline);
//int coladdr = params->coladdr;
int x;
//coladdr = 0;
diff --git a/src/mame/drivers/skylncr.c b/src/mame/drivers/skylncr.c
index beb6e1ed468..4f7eff05bd8 100644
--- a/src/mame/drivers/skylncr.c
+++ b/src/mame/drivers/skylncr.c
@@ -154,7 +154,7 @@ static SCREEN_UPDATE( skylncr )
skylncr_state *state = screen.machine().driver_data<skylncr_state>();
int i;
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
tilemap_draw(bitmap,cliprect, state->m_reel_1_tilemap, 0, 0);
// are these hardcoded, or registers?
diff --git a/src/mame/drivers/sliver.c b/src/mame/drivers/sliver.c
index 5a2c769ae27..ca9e93903a5 100644
--- a/src/mame/drivers/sliver.c
+++ b/src/mame/drivers/sliver.c
@@ -474,8 +474,8 @@ static SCREEN_UPDATE(sliver)
{
sliver_state *state = screen.machine().driver_data<sliver_state>();
- copybitmap (bitmap, state->m_bitmap_bg, 0, 0, 0, 0, cliprect);
- copybitmap_trans(bitmap, state->m_bitmap_fg, 0, 0, 0, 0, cliprect, 0);
+ copybitmap (bitmap, *state->m_bitmap_bg, 0, 0, 0, 0, cliprect);
+ copybitmap_trans(bitmap, *state->m_bitmap_fg, 0, 0, 0, 0, cliprect, 0);
return 0;
}
diff --git a/src/mame/drivers/slotcarn.c b/src/mame/drivers/slotcarn.c
index 9db907b7ab8..aed30d873ed 100644
--- a/src/mame/drivers/slotcarn.c
+++ b/src/mame/drivers/slotcarn.c
@@ -140,7 +140,7 @@ static MC6845_UPDATE_ROW( update_row )
col |= 0x03;
col = state->m_ram_palette[col & 0x3ff];
- bitmap->pix32(y, x) = pens[col ? col : (lscnblk ? 8 : 0)];
+ bitmap.pix32(y, x) = pens[col ? col : (lscnblk ? 8 : 0)];
x++;
}
diff --git a/src/mame/drivers/sms.c b/src/mame/drivers/sms.c
index 312c872b340..c08f03407de 100644
--- a/src/mame/drivers/sms.c
+++ b/src/mame/drivers/sms.c
@@ -474,7 +474,7 @@ static VIDEO_START( sms )
static SCREEN_UPDATE( sms )
{
sms_state *state = screen.machine().driver_data<sms_state>();
- copybitmap(bitmap, state->m_bitmap, 0, 0, 0, 0, cliprect);
+ copybitmap(bitmap, *state->m_bitmap, 0, 0, 0, 0, cliprect);
return 0;
}
diff --git a/src/mame/drivers/snowbros.c b/src/mame/drivers/snowbros.c
index 3b548084058..c9f30e37302 100644
--- a/src/mame/drivers/snowbros.c
+++ b/src/mame/drivers/snowbros.c
@@ -86,7 +86,7 @@ static SCREEN_UPDATE( snowbros )
device_t *pandora = screen.machine().device("pandora");
/* This clears & redraws the entire screen each pass */
- bitmap->fill(0xf0, cliprect);
+ bitmap.fill(0xf0, cliprect);
pandora_update(pandora, bitmap, cliprect);
return 0;
}
diff --git a/src/mame/drivers/sothello.c b/src/mame/drivers/sothello.c
index e77769de97c..56b10f9677a 100644
--- a/src/mame/drivers/sothello.c
+++ b/src/mame/drivers/sothello.c
@@ -339,7 +339,7 @@ static const msm5205_interface msm_interface =
static VIDEO_START( sothello )
{
VIDEO_START_CALL(generic_bitmapped);
- v9938_init (machine, 0, *machine.primary_screen, machine.generic.tmpbitmap, MODEL_V9938, VDP_MEM, sothello_vdp_interrupt);
+ v9938_init (machine, 0, *machine.primary_screen, *machine.generic.tmpbitmap, MODEL_V9938, VDP_MEM, sothello_vdp_interrupt);
v9938_reset(0);
}
diff --git a/src/mame/drivers/spaceg.c b/src/mame/drivers/spaceg.c
index 89ba84995c1..c2dc089215b 100644
--- a/src/mame/drivers/spaceg.c
+++ b/src/mame/drivers/spaceg.c
@@ -306,7 +306,7 @@ static SCREEN_UPDATE( spaceg )
for (i = 0; i < 8; i++)
{
- bitmap->pix16(y, x) = (data & 0x80) ? state->m_colorram[offs] : 0;
+ bitmap.pix16(y, x) = (data & 0x80) ? state->m_colorram[offs] : 0;
x++;
data <<= 1;
diff --git a/src/mame/drivers/speglsht.c b/src/mame/drivers/speglsht.c
index 4fcf39e2f87..5ccc1a46537 100644
--- a/src/mame/drivers/speglsht.c
+++ b/src/mame/drivers/speglsht.c
@@ -340,7 +340,7 @@ static VIDEO_START(speglsht)
#define PLOT_PIXEL_RGB(x,y,r,g,b) if(y>=0 && x>=0 && x<512 && y<512) \
{ \
- bitmap->pix32(y, x) = (b) | ((g)<<8) | ((r)<<16); \
+ bitmap.pix32(y, x) = (b) | ((g)<<8) | ((r)<<16); \
}
static SCREEN_UPDATE(speglsht)
@@ -361,7 +361,7 @@ static SCREEN_UPDATE(speglsht)
//draw st0016 gfx to temporary bitmap (indexed 16)
state->m_bitmap->fill(0);
- st0016_draw_screen(screen, state->m_bitmap, cliprect);
+ st0016_draw_screen(screen, *state->m_bitmap, cliprect);
//copy temporary bitmap to rgb 32 bit bitmap
for(y=cliprect.min_y; y<cliprect.max_y;y++)
diff --git a/src/mame/drivers/spiders.c b/src/mame/drivers/spiders.c
index 10431f44aeb..5cdb01d85c2 100644
--- a/src/mame/drivers/spiders.c
+++ b/src/mame/drivers/spiders.c
@@ -490,7 +490,7 @@ static MC6845_UPDATE_ROW( update_row )
data3 = data3 >> 1;
}
- bitmap->pix32(y, x) = pens[color];
+ bitmap.pix32(y, x) = pens[color];
x = x + 1;
}
diff --git a/src/mame/drivers/spoker.c b/src/mame/drivers/spoker.c
index a4548706f81..a2eab50eb45 100644
--- a/src/mame/drivers/spoker.c
+++ b/src/mame/drivers/spoker.c
@@ -93,7 +93,7 @@ static SCREEN_UPDATE(spoker)
{
spoker_state *state = screen.machine().driver_data<spoker_state>();
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
tilemap_draw(bitmap, cliprect, state->m_fg_tilemap, 0, 0);
return 0;
diff --git a/src/mame/drivers/srmp5.c b/src/mame/drivers/srmp5.c
index e571e943959..43b10f4b29e 100644
--- a/src/mame/drivers/srmp5.c
+++ b/src/mame/drivers/srmp5.c
@@ -119,7 +119,7 @@ static SCREEN_UPDATE( srmp5 )
if(pen)
{
UINT16 pixdata=state->m_palram[pen];
- bitmap->pix32(yw * 16 + y, xw * 16 + x) = ((pixdata&0x7c00)>>7) | ((pixdata&0x3e0)<<6) | ((pixdata&0x1f)<<19);
+ bitmap.pix32(yw * 16 + y, xw * 16 + x) = ((pixdata&0x7c00)>>7) | ((pixdata&0x3e0)<<6) | ((pixdata&0x1f)<<19);
}
address++;
}
@@ -129,7 +129,7 @@ static SCREEN_UPDATE( srmp5 )
}
else
#endif
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
while((sprite_list[SUBLIST_OFFSET]&SPRITE_LIST_END_MARKER)==0 && sprite_list<sprite_list_end)
{
@@ -171,7 +171,7 @@ static SCREEN_UPDATE( srmp5 )
if(xb+xs2<=visarea.max_x && xb+xs2>=visarea.min_x && yb+ys2<=visarea.max_y && yb+ys2>=visarea.min_y )
{
UINT16 pixdata=state->m_palram[pen+((sprite_sublist[SPRITE_PALETTE]&0xff)<<8)];
- bitmap->pix32(yb+ys2, xb+xs2) = ((pixdata&0x7c00)>>7) | ((pixdata&0x3e0)<<6) | ((pixdata&0x1f)<<19);
+ bitmap.pix32(yb+ys2, xb+xs2) = ((pixdata&0x7c00)>>7) | ((pixdata&0x3e0)<<6) | ((pixdata&0x1f)<<19);
}
}
++address;
diff --git a/src/mame/drivers/srmp6.c b/src/mame/drivers/srmp6.c
index 9f2e470f475..510c46fb154 100644
--- a/src/mame/drivers/srmp6.c
+++ b/src/mame/drivers/srmp6.c
@@ -172,7 +172,7 @@ static SCREEN_UPDATE(srmp6)
UINT16 b;
} temp;
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
#if 0
/* debug */
diff --git a/src/mame/drivers/ssfindo.c b/src/mame/drivers/ssfindo.c
index a976ab21e01..c54455e8798 100644
--- a/src/mame/drivers/ssfindo.c
+++ b/src/mame/drivers/ssfindo.c
@@ -250,10 +250,10 @@ static SCREEN_UPDATE(ssfindo)
for(y=0;y<256;y++)
for(x=0;x<320;x+=4)
{
- bitmap->pix16(y, x+0) = state->m_vram[s]&0xff;
- bitmap->pix16(y, x+1) = (state->m_vram[s]>>8)&0xff;
- bitmap->pix16(y, x+2) = (state->m_vram[s]>>16)&0xff;
- bitmap->pix16(y, x+3) = (state->m_vram[s]>>24)&0xff;
+ bitmap.pix16(y, x+0) = state->m_vram[s]&0xff;
+ bitmap.pix16(y, x+1) = (state->m_vram[s]>>8)&0xff;
+ bitmap.pix16(y, x+2) = (state->m_vram[s]>>16)&0xff;
+ bitmap.pix16(y, x+3) = (state->m_vram[s]>>24)&0xff;
s++;
}
}
diff --git a/src/mame/drivers/ssingles.c b/src/mame/drivers/ssingles.c
index d7bbfd3d1c6..bc5777b49ba 100644
--- a/src/mame/drivers/ssingles.c
+++ b/src/mame/drivers/ssingles.c
@@ -209,7 +209,7 @@ static MC6845_UPDATE_ROW( ssingles_update_row )
for(x=7;x>=0;--x)
{
- bitmap->pix32(y, (cx<<3)|(x)) = state->m_pens[palette+((b1&1)|((b0&1)<<1))];
+ bitmap.pix32(y, (cx<<3)|(x)) = state->m_pens[palette+((b1&1)|((b0&1)<<1))];
b0>>=1;
b1>>=1;
}
@@ -247,7 +247,7 @@ static MC6845_UPDATE_ROW( atamanot_update_row )
for(x=7;x>=0;--x)
{
- bitmap->pix32(y, (cx<<3)|(x)) = state->m_pens[palette+((b1&1)|((b0&1)<<1))];
+ bitmap.pix32(y, (cx<<3)|(x)) = state->m_pens[palette+((b1&1)|((b0&1)<<1))];
b0>>=1;
b1>>=1;
}
diff --git a/src/mame/drivers/sstrangr.c b/src/mame/drivers/sstrangr.c
index e48594d8c95..a4254b976e3 100644
--- a/src/mame/drivers/sstrangr.c
+++ b/src/mame/drivers/sstrangr.c
@@ -60,7 +60,7 @@ static SCREEN_UPDATE( sstrangr )
data = data >> 1;
}
- bitmap->pix32(y, x) = pen;
+ bitmap.pix32(y, x) = pen;
x = x + 1;
}
@@ -119,7 +119,7 @@ static SCREEN_UPDATE( sstrngr2 )
data = data >> 1;
}
- bitmap->pix32(y, x) = pens[color];
+ bitmap.pix32(y, x) = pens[color];
x = x + 1;
}
diff --git a/src/mame/drivers/statriv2.c b/src/mame/drivers/statriv2.c
index 48b67301e6e..e76e78797af 100644
--- a/src/mame/drivers/statriv2.c
+++ b/src/mame/drivers/statriv2.c
@@ -181,7 +181,7 @@ static SCREEN_UPDATE( statriv2 )
{
statriv2_state *state = screen.machine().driver_data<statriv2_state>();
if (tms9927_screen_reset(screen.machine().device("tms")))
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
else
tilemap_draw(bitmap, cliprect, state->m_tilemap, 0, 0);
return 0;
diff --git a/src/mame/drivers/subsino.c b/src/mame/drivers/subsino.c
index 63f22ba974d..3c7e1a13ed3 100644
--- a/src/mame/drivers/subsino.c
+++ b/src/mame/drivers/subsino.c
@@ -454,7 +454,7 @@ static VIDEO_START( stisub )
static SCREEN_UPDATE( subsino )
{
subsino_state *state = screen.machine().driver_data<subsino_state>();
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
tilemap_draw(bitmap,cliprect, state->m_tmap, 0, 0);
return 0;
}
@@ -463,7 +463,7 @@ static SCREEN_UPDATE( subsino_reels )
{
subsino_state *state = screen.machine().driver_data<subsino_state>();
int i;
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
for (i= 0;i < 64;i++)
{
@@ -493,7 +493,7 @@ static SCREEN_UPDATE( stisub_reels )
{
subsino_state *state = screen.machine().driver_data<subsino_state>();
int i;
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
if (state->m_reel1_attr)
{
diff --git a/src/mame/drivers/subsino2.c b/src/mame/drivers/subsino2.c
index a060a9a5625..7ecc8588f69 100644
--- a/src/mame/drivers/subsino2.c
+++ b/src/mame/drivers/subsino2.c
@@ -653,7 +653,7 @@ static SCREEN_UPDATE( subsino2 )
}
}
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
if (layers_ctrl & 1)
{
diff --git a/src/mame/drivers/supertnk.c b/src/mame/drivers/supertnk.c
index f9cb869d3aa..5ae87cee647 100644
--- a/src/mame/drivers/supertnk.c
+++ b/src/mame/drivers/supertnk.c
@@ -261,7 +261,7 @@ static SCREEN_UPDATE( supertnk )
for (i = 0; i < 8; i++)
{
UINT8 color = ((data0 & 0x80) >> 5) | ((data1 & 0x80) >> 6) | ((data2 & 0x80) >> 7);
- bitmap->pix32(y, x) = state->m_pens[color];
+ bitmap.pix32(y, x) = state->m_pens[color];
data0 = data0 << 1;
data1 = data1 << 1;
diff --git a/src/mame/drivers/suprgolf.c b/src/mame/drivers/suprgolf.c
index cb2483a5047..cfc334cebb9 100644
--- a/src/mame/drivers/suprgolf.c
+++ b/src/mame/drivers/suprgolf.c
@@ -79,7 +79,7 @@ static SCREEN_UPDATE( suprgolf )
{
suprgolf_state *state = screen.machine().driver_data<suprgolf_state>();
int x,y,count,color;
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
{
count = 0;
@@ -91,7 +91,7 @@ static SCREEN_UPDATE( suprgolf )
color = state->m_bg_fb[count];
if(x <= cliprect.max_x && y <= cliprect.max_y)
- bitmap->pix16(y, x) = screen.machine().pens[(color & 0x7ff)];
+ bitmap.pix16(y, x) = screen.machine().pens[(color & 0x7ff)];
count++;
}
@@ -108,7 +108,7 @@ static SCREEN_UPDATE( suprgolf )
color = state->m_fg_fb[count];
if(((state->m_fg_fb[count] & 0x0f) != 0x0f) && (x <= cliprect.max_x && y <= cliprect.max_y))
- bitmap->pix16(y, x) = screen.machine().pens[(color & 0x7ff)];
+ bitmap.pix16(y, x) = screen.machine().pens[(color & 0x7ff)];
count++;
}
diff --git a/src/mame/drivers/taitopjc.c b/src/mame/drivers/taitopjc.c
index 06543aa564d..65fc904568d 100644
--- a/src/mame/drivers/taitopjc.c
+++ b/src/mame/drivers/taitopjc.c
@@ -95,7 +95,7 @@ static SCREEN_UPDATE( taitopjc )
for (y=0; y < 16; y++)
{
- UINT32 *fb = &bitmap->pix32(y+(u*16));
+ UINT32 *fb = &bitmap.pix32(y+(u*16));
for (x=0; x < 16; x++)
{
UINT8 p = s[((tile*256) + ((y*16)+x)) ^3];
diff --git a/src/mame/drivers/taitotz.c b/src/mame/drivers/taitotz.c
index d9fd4b1ec0e..0d7274eb9fb 100644
--- a/src/mame/drivers/taitotz.c
+++ b/src/mame/drivers/taitotz.c
@@ -126,7 +126,7 @@ static SCREEN_UPDATE( taitotz )
for (y=0; y < FONT_HEIGHT; y++)
{
- UINT32 *fb = &bitmap->pix32(y+(u*FONT_WIDTH));
+ UINT32 *fb = &bitmap.pix32(y+(u*FONT_WIDTH));
for (x=0; x < FONT_WIDTH; x++)
{
UINT32 p = s[((tile*(FONT_WIDTH*FONT_HEIGHT*2)) + ((y*FONT_WIDTH)+x)) ^ 1];
@@ -145,7 +145,7 @@ static SCREEN_UPDATE( taitotz )
int t,u;
for (u=0; u < 256; u++)
{
- UINT32 *fb = &bitmap->pix32(u);
+ UINT32 *fb = &bitmap.pix32(u);
for (t=0; t < 512; t++)
{
UINT32 p = s[((u*512)+t) ^ 1];
@@ -158,8 +158,8 @@ static SCREEN_UPDATE( taitotz )
taitotz_state *state = screen.machine().driver_data<taitotz_state>();
- bitmap->fill(0, cliprect);
- copybitmap_trans(bitmap, state->framebuffer, 0, 0, 0, 0, cliprect, 0);
+ bitmap.fill(0, cliprect);
+ copybitmap_trans(bitmap, *state->framebuffer, 0, 0, 0, 0, cliprect, 0);
return 0;
}
diff --git a/src/mame/drivers/taitowlf.c b/src/mame/drivers/taitowlf.c
index 64b7f913975..1f444efcdfe 100644
--- a/src/mame/drivers/taitowlf.c
+++ b/src/mame/drivers/taitowlf.c
@@ -68,7 +68,7 @@ static SCREEN_UPDATE( taitowlf )
int x,y,count;
const UINT8 *blit_ram = screen.machine().region("user5")->base();
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
count = (0);
@@ -81,7 +81,7 @@ static SCREEN_UPDATE( taitowlf )
color = (blit_ram[count] & 0xff);
if((x)+0<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y)
- bitmap->pix32(y, x+0) = screen.machine().pens[color];
+ bitmap.pix32(y, x+0) = screen.machine().pens[color];
count++;
}
diff --git a/src/mame/drivers/tapatune.c b/src/mame/drivers/tapatune.c
index f5081a1b7ff..4eef8ca844a 100644
--- a/src/mame/drivers/tapatune.c
+++ b/src/mame/drivers/tapatune.c
@@ -330,7 +330,7 @@ static MC6845_BEGIN_UPDATE( begin_update )
static MC6845_UPDATE_ROW( update_row )
{
tapatune_state *state = device->machine().driver_data<tapatune_state>();
- UINT32 *dest = &bitmap->pix32(y);
+ UINT32 *dest = &bitmap.pix32(y);
UINT16 x;
pen_t *pens = (pen_t *)param;
diff --git a/src/mame/drivers/tgtpanic.c b/src/mame/drivers/tgtpanic.c
index cc72a109b0f..6f40f04f8e9 100644
--- a/src/mame/drivers/tgtpanic.c
+++ b/src/mame/drivers/tgtpanic.c
@@ -50,17 +50,17 @@ static SCREEN_UPDATE( tgtpanic )
x = (offs >> 7) << 2;
/* I'm guessing the hardware doubles lines */
- bitmap->pix32(y + 0, x + 0) = colors[val & 3];
- bitmap->pix32(y + 1, x + 0) = colors[val & 3];
+ bitmap.pix32(y + 0, x + 0) = colors[val & 3];
+ bitmap.pix32(y + 1, x + 0) = colors[val & 3];
val >>= 2;
- bitmap->pix32(y + 0, x + 1) = colors[val & 3];
- bitmap->pix32(y + 1, x + 1) = colors[val & 3];
+ bitmap.pix32(y + 0, x + 1) = colors[val & 3];
+ bitmap.pix32(y + 1, x + 1) = colors[val & 3];
val >>= 2;
- bitmap->pix32(y + 0, x + 2) = colors[val & 3];
- bitmap->pix32(y + 1, x + 2) = colors[val & 3];
+ bitmap.pix32(y + 0, x + 2) = colors[val & 3];
+ bitmap.pix32(y + 1, x + 2) = colors[val & 3];
val >>= 2;
- bitmap->pix32(y + 0, x + 3) = colors[val & 3];
- bitmap->pix32(y + 1, x + 3) = colors[val & 3];
+ bitmap.pix32(y + 0, x + 3) = colors[val & 3];
+ bitmap.pix32(y + 1, x + 3) = colors[val & 3];
}
return 0;
diff --git a/src/mame/drivers/tickee.c b/src/mame/drivers/tickee.c
index 7ec78f507aa..d9396b5415a 100644
--- a/src/mame/drivers/tickee.c
+++ b/src/mame/drivers/tickee.c
@@ -141,11 +141,11 @@ static VIDEO_START( tickee )
*
*************************************/
-static void scanline_update(screen_device &screen, bitmap_t *bitmap, int scanline, const tms34010_display_params *params)
+static void scanline_update(screen_device &screen, bitmap_t &bitmap, int scanline, const tms34010_display_params *params)
{
tickee_state *state = screen.machine().driver_data<tickee_state>();
UINT16 *src = &state->m_vram[(params->rowaddr << 8) & 0x3ff00];
- UINT32 *dest = &bitmap->pix32(scanline);
+ UINT32 *dest = &bitmap.pix32(scanline);
const rgb_t *pens = tlc34076_get_pens(screen.machine().device("tlc34076"));
int coladdr = params->coladdr << 1;
int x;
@@ -167,11 +167,11 @@ static void scanline_update(screen_device &screen, bitmap_t *bitmap, int scanlin
}
-static void rapidfir_scanline_update(screen_device &screen, bitmap_t *bitmap, int scanline, const tms34010_display_params *params)
+static void rapidfir_scanline_update(screen_device &screen, bitmap_t &bitmap, int scanline, const tms34010_display_params *params)
{
tickee_state *state = screen.machine().driver_data<tickee_state>();
UINT16 *src = &state->m_vram[(params->rowaddr << 8) & 0x3ff00];
- UINT32 *dest = &bitmap->pix32(scanline);
+ UINT32 *dest = &bitmap.pix32(scanline);
const rgb_t *pens = tlc34076_get_pens(screen.machine().device("tlc34076"));
int coladdr = params->coladdr << 1;
int x;
diff --git a/src/mame/drivers/tmaster.c b/src/mame/drivers/tmaster.c
index 883d148a89a..7b6eb35fb2d 100644
--- a/src/mame/drivers/tmaster.c
+++ b/src/mame/drivers/tmaster.c
@@ -330,10 +330,10 @@ static SCREEN_UPDATE( tmaster )
#endif
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
- if (layers_ctrl & 1) copybitmap_trans(bitmap, state->m_bitmap[0][(state->m_regs[0x02/2]>>8)&1], 0,0,0,0, cliprect, 0xff);
- if (layers_ctrl & 2) copybitmap_trans(bitmap, state->m_bitmap[1][(state->m_regs[0x02/2]>>9)&1], 0,0,0,0, cliprect, 0xff);
+ if (layers_ctrl & 1) copybitmap_trans(bitmap, *state->m_bitmap[0][(state->m_regs[0x02/2]>>8)&1], 0,0,0,0, cliprect, 0xff);
+ if (layers_ctrl & 2) copybitmap_trans(bitmap, *state->m_bitmap[1][(state->m_regs[0x02/2]>>9)&1], 0,0,0,0, cliprect, 0xff);
return 0;
}
@@ -359,8 +359,6 @@ static void tmaster_draw(running_machine &machine)
UINT16 pen;
- bitmap_t *bitmap;
-
buffer = (state->m_regs[0x02/2] >> 8) & 3; // 1 bit per layer, selects the currently displayed buffer
sw = state->m_regs[0x04/2];
sx = state->m_regs[0x06/2];
@@ -373,7 +371,7 @@ static void tmaster_draw(running_machine &machine)
layer = (mode >> 7) & 1; // layer to draw to
buffer = ((mode >> 6) & 1) ^ ((buffer >> layer) & 1); // bit 6 selects whether to use the opposite buffer to that displayed
- bitmap = state->m_bitmap[layer][buffer];
+ bitmap_t &bitmap = *state->m_bitmap[layer][buffer];
addr <<= 1;
@@ -425,7 +423,7 @@ static void tmaster_draw(running_machine &machine)
pen = dst_pen;
if ((pen != 0xff) && (sx + x >= 0) && (sx + x < 400) && (sy + y >= 0) && (sy + y < 256))
- bitmap->pix16(sy + y, sx + x) = pen + color;
+ bitmap.pix16(sy + y, sx + x) = pen + color;
}
}
}
@@ -440,7 +438,7 @@ static void tmaster_draw(running_machine &machine)
pen = gfxdata[addr++];
if ((pen != 0xff) && (sx + x >= 0) && (sx + x < 400) && (sy + y >= 0) && (sy + y < 256))
- bitmap->pix16(sy + y, sx + x) = pen + color;
+ bitmap.pix16(sy + y, sx + x) = pen + color;
}
}
}
@@ -457,7 +455,7 @@ static void tmaster_draw(running_machine &machine)
for (x = x0; x != x1; x += dx)
{
if ((sx + x >= 0) && (sx + x < 400) && (sy + y >= 0) && (sy + y < 256))
- bitmap->pix16(sy + y, sx + x) = pen;
+ bitmap.pix16(sy + y, sx + x) = pen;
}
}
break;
diff --git a/src/mame/drivers/tmmjprd.c b/src/mame/drivers/tmmjprd.c
index 7ffb0e08cae..356c52ec407 100644
--- a/src/mame/drivers/tmmjprd.c
+++ b/src/mame/drivers/tmmjprd.c
@@ -78,7 +78,7 @@ static WRITE32_HANDLER( tmmjprd_tilemap3_w )
COMBINE_DATA(&state->m_tilemap_ram[3][offset]);
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int screen)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int screen)
{
tmmjprd_state *state = machine.driver_data<tmmjprd_state>();
int xpos,ypos,tileno,xflip,yflip, colr;
@@ -155,7 +155,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const recta
}
}
-static void ttmjprd_draw_tile(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int x,int y,int sizex,int sizey, UINT32 tiledata, UINT8* rom)
+static void ttmjprd_draw_tile(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int x,int y,int sizex,int sizey, UINT32 tiledata, UINT8* rom)
{
/* note, it's tile address _NOT_ tile number, 'sub-tile' access is possible, hence using the custom rendering */
int tileaddr = (tiledata&0x000fffff)>>0;
@@ -198,7 +198,7 @@ static void ttmjprd_draw_tile(running_machine &machine, bitmap_t *bitmap, const
if (dat!=15)
{
//dat += (colour<<8);
- dst = &bitmap->pix16(drawy, drawx);
+ dst = &bitmap.pix16(drawy, drawx);
dst[0] = dat;
}
}
@@ -209,7 +209,7 @@ static void ttmjprd_draw_tile(running_machine &machine, bitmap_t *bitmap, const
if (dat!=15)
{
//dat += (colour<<8);
- dst = &bitmap->pix16(drawy, drawx);
+ dst = &bitmap.pix16(drawy, drawx);
dst[0] = dat;
}
}
@@ -224,7 +224,7 @@ static void ttmjprd_draw_tile(running_machine &machine, bitmap_t *bitmap, const
if (dat!=255)
{
dat += (colour<<8) & 0xf00;
- dst = &bitmap->pix16(drawy, drawx);
+ dst = &bitmap.pix16(drawy, drawx);
dst[0] = dat;
}
}
@@ -234,7 +234,7 @@ static void ttmjprd_draw_tile(running_machine &machine, bitmap_t *bitmap, const
}
}
-static void ttmjprd_draw_tilemap(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, UINT32*tileram, UINT32*tileregs, UINT8*rom )
+static void ttmjprd_draw_tilemap(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, UINT32*tileram, UINT32*tileregs, UINT8*rom )
{
int y,x;
int count;
@@ -280,7 +280,7 @@ static SCREEN_UPDATE( tmmjprd_left )
tmmjprd_state *state = screen.machine().driver_data<tmmjprd_state>();
UINT8* gfxroms = screen.machine().region("gfx2")->base();
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
ttmjprd_draw_tilemap( screen.machine(), bitmap, cliprect, state->m_tilemap_ram[3], state->m_tilemap_regs[3], gfxroms );
draw_sprites(screen.machine(),bitmap,cliprect, 1);
@@ -315,7 +315,7 @@ static SCREEN_UPDATE( tmmjprd_right )
tmmjprd_state *state = screen.machine().driver_data<tmmjprd_state>();
UINT8* gfxroms = screen.machine().region("gfx2")->base();
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
ttmjprd_draw_tilemap( screen.machine(), bitmap, cliprect, state->m_tilemap_ram[1], state->m_tilemap_regs[1], gfxroms );
draw_sprites(screen.machine(),bitmap,cliprect, 0);
diff --git a/src/mame/drivers/tonton.c b/src/mame/drivers/tonton.c
index ad1a918198b..c0ffc7f2d69 100644
--- a/src/mame/drivers/tonton.c
+++ b/src/mame/drivers/tonton.c
@@ -64,16 +64,16 @@ static VIDEO_START( tonton )
{
tonton_state *state = machine.driver_data<tonton_state>();
state->m_vdp0_bitmap = machine.primary_screen->alloc_compatible_bitmap();
- v9938_init (machine, 0, *machine.primary_screen, state->m_vdp0_bitmap, MODEL_V9938, 0x40000, tonton_vdp0_interrupt);
+ v9938_init (machine, 0, *machine.primary_screen, *state->m_vdp0_bitmap, MODEL_V9938, 0x40000, tonton_vdp0_interrupt);
v9938_reset(0);
}
static SCREEN_UPDATE( tonton )
{
tonton_state *state = screen.machine().driver_data<tonton_state>();
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
- copybitmap(bitmap, state->m_vdp0_bitmap, 0, 0, 0, 0, cliprect);
+ copybitmap(bitmap, *state->m_vdp0_bitmap, 0, 0, 0, 0, cliprect);
return 0;
}
diff --git a/src/mame/drivers/toratora.c b/src/mame/drivers/toratora.c
index 3e60a6110a2..509d9755781 100644
--- a/src/mame/drivers/toratora.c
+++ b/src/mame/drivers/toratora.c
@@ -81,7 +81,7 @@ static SCREEN_UPDATE( toratora )
for (i = 0; i < 8; i++)
{
pen_t pen = (data & 0x80) ? RGB_WHITE : RGB_BLACK;
- bitmap->pix32(y, x) = pen;
+ bitmap.pix32(y, x) = pen;
data = data << 1;
x = x + 1;
diff --git a/src/mame/drivers/trvmadns.c b/src/mame/drivers/trvmadns.c
index de1a31a96c0..c401fcbf5cf 100644
--- a/src/mame/drivers/trvmadns.c
+++ b/src/mame/drivers/trvmadns.c
@@ -291,7 +291,7 @@ static SCREEN_UPDATE( trvmadns )
int x,y,count;
const gfx_element *gfx = screen.machine().gfx[0];
- bitmap->fill(0xd, cliprect);
+ bitmap.fill(0xd, cliprect);
count = 0;
diff --git a/src/mame/drivers/ttchamp.c b/src/mame/drivers/ttchamp.c
index 978e5857857..f910bedaf83 100644
--- a/src/mame/drivers/ttchamp.c
+++ b/src/mame/drivers/ttchamp.c
@@ -67,7 +67,7 @@ static SCREEN_UPDATE(ttchamp)
// int i;
static const int xxx=320,yyy=204;
- bitmap->fill(get_black_pen(screen.machine()));
+ bitmap.fill(get_black_pen(screen.machine()));
// for (i=0;i<256;i++)
// {
@@ -85,7 +85,7 @@ static SCREEN_UPDATE(ttchamp)
{
for(x=0;x<xxx;x++)
{
- /*if(hotblock_port0&0x40)*/bitmap->pix16(y, x) = ((UINT8 *)state->m_peno_vram)[BYTE_XOR_LE(count)]+0x300;
+ /*if(hotblock_port0&0x40)*/bitmap.pix16(y, x) = ((UINT8 *)state->m_peno_vram)[BYTE_XOR_LE(count)]+0x300;
count++;
}
}
diff --git a/src/mame/drivers/tugboat.c b/src/mame/drivers/tugboat.c
index f94dfc86809..da6bb6f1d63 100644
--- a/src/mame/drivers/tugboat.c
+++ b/src/mame/drivers/tugboat.c
@@ -90,7 +90,7 @@ static WRITE8_HANDLER( tugboat_score_w )
if (offset<0x8 ) state->m_ram[0x291d + 32*offset + 32*9] = data ^ 0x0f;
}
-static void draw_tilemap(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect,
+static void draw_tilemap(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect,
int addr,int gfx0,int gfx1,int transparency)
{
tugboat_state *state = machine.driver_data<tugboat_state>();
diff --git a/src/mame/drivers/twins.c b/src/mame/drivers/twins.c
index a79fc2226e2..8de6aa16ca4 100644
--- a/src/mame/drivers/twins.c
+++ b/src/mame/drivers/twins.c
@@ -117,7 +117,7 @@ static SCREEN_UPDATE(twins)
int i;
static const int xxx=320,yyy=204;
- bitmap->fill(get_black_pen(screen.machine()));
+ bitmap.fill(get_black_pen(screen.machine()));
for (i=0;i<0x100;i++)
{
@@ -141,7 +141,7 @@ static SCREEN_UPDATE(twins)
{
for(x=0;x<xxx;x++)
{
- bitmap->pix16(y, x) = ((UINT8 *)state->m_videoram)[BYTE_XOR_LE(count)];
+ bitmap.pix16(y, x) = ((UINT8 *)state->m_videoram)[BYTE_XOR_LE(count)];
count++;
}
}
@@ -224,7 +224,7 @@ static SCREEN_UPDATE(twinsa)
int i;
static const int xxx=320,yyy=204;
- bitmap->fill(get_black_pen(screen.machine()));
+ bitmap.fill(get_black_pen(screen.machine()));
for (i=0;i<0x1000-3;i+=3)
{
@@ -241,7 +241,7 @@ static SCREEN_UPDATE(twinsa)
{
for(x=0;x<xxx;x++)
{
- bitmap->pix16(y, x) = ((UINT8 *)state->m_videoram)[BYTE_XOR_LE(count)];
+ bitmap.pix16(y, x) = ((UINT8 *)state->m_videoram)[BYTE_XOR_LE(count)];
count++;
}
}
diff --git a/src/mame/drivers/ultrsprt.c b/src/mame/drivers/ultrsprt.c
index 400eb9216f1..8cb86c5efdc 100644
--- a/src/mame/drivers/ultrsprt.c
+++ b/src/mame/drivers/ultrsprt.c
@@ -39,7 +39,7 @@ static SCREEN_UPDATE( ultrsprt )
for (j=0; j < 400; j++)
{
- UINT16 *dest = &bitmap->pix16(j);
+ UINT16 *dest = &bitmap.pix16(j);
int fb_index = j * 1024;
for (i=0; i < 512; i++)
diff --git a/src/mame/drivers/umipoker.c b/src/mame/drivers/umipoker.c
index ce7d354b264..aaeb4d23339 100644
--- a/src/mame/drivers/umipoker.c
+++ b/src/mame/drivers/umipoker.c
@@ -117,7 +117,7 @@ static SCREEN_UPDATE( umipoker )
tilemap_set_scrolly(state->m_tilemap_2, 0, state->m_umipoker_scrolly[2]);
tilemap_set_scrolly(state->m_tilemap_3, 0, state->m_umipoker_scrolly[3]);
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
tilemap_draw(bitmap,cliprect,state->m_tilemap_0,0,0);
tilemap_draw(bitmap,cliprect,state->m_tilemap_1,0,0);
diff --git a/src/mame/drivers/vamphalf.c b/src/mame/drivers/vamphalf.c
index f51a67acbdf..8409d1b1906 100644
--- a/src/mame/drivers/vamphalf.c
+++ b/src/mame/drivers/vamphalf.c
@@ -400,7 +400,7 @@ or
Offset+3
-------x xxxxxxxx X offs
*/
-static void draw_sprites(screen_device &screen, bitmap_t *bitmap)
+static void draw_sprites(screen_device &screen, bitmap_t &bitmap)
{
vamphalf_state *state = screen.machine().driver_data<vamphalf_state>();
const gfx_element *gfx = screen.machine().gfx[0];
@@ -474,7 +474,7 @@ static void draw_sprites(screen_device &screen, bitmap_t *bitmap)
}
}
-static void draw_sprites_aoh(screen_device &screen, bitmap_t *bitmap)
+static void draw_sprites_aoh(screen_device &screen, bitmap_t &bitmap)
{
vamphalf_state *state = screen.machine().driver_data<vamphalf_state>();
const gfx_element *gfx = screen.machine().gfx[0];
@@ -531,14 +531,14 @@ static void draw_sprites_aoh(screen_device &screen, bitmap_t *bitmap)
static SCREEN_UPDATE( common )
{
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
draw_sprites(screen, bitmap);
return 0;
}
static SCREEN_UPDATE( aoh )
{
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
draw_sprites_aoh(screen, bitmap);
return 0;
}
diff --git a/src/mame/drivers/vcombat.c b/src/mame/drivers/vcombat.c
index cc29c1d5d56..1299844f66e 100644
--- a/src/mame/drivers/vcombat.c
+++ b/src/mame/drivers/vcombat.c
@@ -104,7 +104,7 @@ public:
int m_crtc_select;
};
-static UINT32 update_screen(screen_device &screen, bitmap_t *bitmap, const rectangle &cliprect, int index)
+static UINT32 update_screen(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect, int index)
{
vcombat_state *state = screen.machine().driver_data<vcombat_state>();
int y;
@@ -124,7 +124,7 @@ static UINT32 update_screen(screen_device &screen, bitmap_t *bitmap, const recta
int src_addr = 256/2 * y;
const UINT16 *m68k_src = &m68k_buf[src_addr];
const UINT16 *i860_src = &i860_buf[src_addr];
- UINT32 *dst = &bitmap->pix32(y, cliprect.min_x);
+ UINT32 *dst = &bitmap.pix32(y, cliprect.min_x);
for (x = cliprect.min_x; x <= cliprect.max_x; x += 2)
{
diff --git a/src/mame/drivers/vegaeo.c b/src/mame/drivers/vegaeo.c
index 09beaac590a..fe7767ce750 100644
--- a/src/mame/drivers/vegaeo.c
+++ b/src/mame/drivers/vegaeo.c
@@ -158,16 +158,16 @@ static SCREEN_UPDATE( vega )
for (x=0;x < 320/4;x++)
{
color = state->m_vega_vram[count + (0x14000/4) * (state->m_vega_vbuffer ^ 1)] & 0xff;
- bitmap->pix16(y, x*4 + 3) = color;
+ bitmap.pix16(y, x*4 + 3) = color;
color = (state->m_vega_vram[count + (0x14000/4) * (state->m_vega_vbuffer ^ 1)] & 0xff00) >> 8;
- bitmap->pix16(y, x*4 + 2) = color;
+ bitmap.pix16(y, x*4 + 2) = color;
color = (state->m_vega_vram[count + (0x14000/4) * (state->m_vega_vbuffer ^ 1)] & 0xff0000) >> 16;
- bitmap->pix16(y, x*4 + 1) = color;
+ bitmap.pix16(y, x*4 + 1) = color;
color = (state->m_vega_vram[count + (0x14000/4) * (state->m_vega_vbuffer ^ 1)] & 0xff000000) >> 24;
- bitmap->pix16(y, x*4 + 0) = color;
+ bitmap.pix16(y, x*4 + 0) = color;
count++;
}
diff --git a/src/mame/drivers/vmetal.c b/src/mame/drivers/vmetal.c
index 02991665a6a..e28abf4d011 100644
--- a/src/mame/drivers/vmetal.c
+++ b/src/mame/drivers/vmetal.c
@@ -420,8 +420,8 @@ static SCREEN_UPDATE(varia)
{
vmetal_state *state = screen.machine().driver_data<vmetal_state>();
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
tilemap_set_scrollx(state->m_mid2tilemap, 0, state->m_vmetal_videoregs[0x06a/2]-64 /*+ state->m_vmetal_videoregs[0x066/2]*/);
tilemap_set_scrollx(state->m_mid1tilemap, 0, state->m_vmetal_videoregs[0x07a/2]-64 /*+ state->m_vmetal_videoregs[0x076/2]*/);
diff --git a/src/mame/drivers/warpsped.c b/src/mame/drivers/warpsped.c
index ef59d01732d..44f902b448e 100644
--- a/src/mame/drivers/warpsped.c
+++ b/src/mame/drivers/warpsped.c
@@ -140,26 +140,26 @@ static VIDEO_START( warpspeed )
tilemap_mark_all_tiles_dirty(state->m_starfield_tilemap);
}
-static void draw_circle_line(bitmap_t *bitmap, int x, int y, int l, int color)
+static void draw_circle_line(bitmap_t &bitmap, int x, int y, int l, int color)
{
- if (y >= 0 && y <= bitmap->height() - 1)
+ if (y >= 0 && y <= bitmap.height() - 1)
{
- UINT16* pLine = &bitmap->pix16(y);
+ UINT16* pLine = &bitmap.pix16(y);
int h1 = x - l;
int h2 = x + l;
if (h1 < 0)
h1 = 0;
- if (h2 > bitmap->width() - 1)
- h2 = bitmap->width() - 1;
+ if (h2 > bitmap.width() - 1)
+ h2 = bitmap.width() - 1;
for (x = h1; x <= h2; x++)
pLine[x] = color;
}
}
-static void warpspeed_draw_circle(bitmap_t *bitmap, INT16 cx, INT16 cy, UINT16 radius, UINT8 color )
+static void warpspeed_draw_circle(bitmap_t &bitmap, INT16 cx, INT16 cy, UINT16 radius, UINT8 color )
{
/* Bresenham's circle algorithm */
@@ -184,7 +184,7 @@ static void warpspeed_draw_circle(bitmap_t *bitmap, INT16 cx, INT16 cy, UINT16 r
}
}
-static void warpspeed_draw_circles(bitmap_t *bitmap, warpspeed_state *state)
+static void warpspeed_draw_circles(bitmap_t &bitmap, warpspeed_state *state)
{
for (int i = 0; i < 4; i++)
{
diff --git a/src/mame/drivers/wheelfir.c b/src/mame/drivers/wheelfir.c
index 2596909c199..97a7f5e47de 100644
--- a/src/mame/drivers/wheelfir.c
+++ b/src/mame/drivers/wheelfir.c
@@ -568,12 +568,12 @@ static SCREEN_UPDATE(wheelfir)
{
wheelfir_state *state = screen.machine().driver_data<wheelfir_state>();
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
for(int y=0;y<NUM_SCANLINES;++y)
{
UINT16 *source = &state->m_tmp_bitmap[LAYER_BG]->pix16(( (state->m_scanlines[y].y)&511));
- UINT16 *dest = &bitmap->pix16(y);
+ UINT16 *dest = &bitmap.pix16(y);
for (int x=0;x<336;x++)
{
@@ -583,7 +583,7 @@ static SCREEN_UPDATE(wheelfir)
}
}
- copybitmap_trans(bitmap, state->m_tmp_bitmap[LAYER_FG], 0, 0, 0, 0, cliprect, 0);
+ copybitmap_trans(bitmap, *state->m_tmp_bitmap[LAYER_FG], 0, 0, 0, 0, cliprect, 0);
/*
{
diff --git a/src/mame/drivers/whitestar.c b/src/mame/drivers/whitestar.c
index 58a0df11911..775b7617fa2 100644
--- a/src/mame/drivers/whitestar.c
+++ b/src/mame/drivers/whitestar.c
@@ -198,7 +198,7 @@ static INTERRUPT_GEN( whitestar_firq_interrupt )
MCFG_DEFAULT_LAYOUT( layout_lcd )
-void dmd_put_pixel(bitmap_t *bitmap, int x, int y, int color)
+void dmd_put_pixel(bitmap_t &bitmap, int x, int y, int color)
{
int midx = x * DMD_CHUNK_SIZE + DMD_CHUNK_SIZE/2;
int midy = y * DMD_CHUNK_SIZE + DMD_CHUNK_SIZE/2;
@@ -210,8 +210,8 @@ void dmd_put_pixel(bitmap_t *bitmap, int x, int y, int color)
// iterate over y
for (UINT32 y = 0; y <= width; y++)
{
- UINT16 *d0 = &bitmap->pix16(midy - y);
- UINT16 *d1 = &bitmap->pix16(midy + y);
+ UINT16 *d0 = &bitmap.pix16(midy - y);
+ UINT16 *d1 = &bitmap.pix16(midy + y);
float xval = width * sqrt(1.0f - (float)(y * y) * ooradius2);
INT32 left, right;
@@ -267,7 +267,7 @@ static PALETTE_INIT( whitestar )
bool whitestar_state::screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect)
{
- m_mc6845->update(&bitmap, cliprect);
+ m_mc6845->update(bitmap, cliprect);
return 0;
}
diff --git a/src/mame/drivers/witch.c b/src/mame/drivers/witch.c
index 0670e02aa2d..27a8f8611c2 100644
--- a/src/mame/drivers/witch.c
+++ b/src/mame/drivers/witch.c
@@ -708,7 +708,7 @@ static VIDEO_START(witch)
tilemap_set_palette_offset(state->m_gfx1_tilemap,0x200);
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
witch_state *state = machine.driver_data<witch_state>();
int i,sx,sy,tileno,flags,color;
diff --git a/src/mame/drivers/wldarrow.c b/src/mame/drivers/wldarrow.c
index ffc7fbadfb5..e0652ea4134 100644
--- a/src/mame/drivers/wldarrow.c
+++ b/src/mame/drivers/wldarrow.c
@@ -89,7 +89,7 @@ static SCREEN_UPDATE( wldarrow )
((data_g >> 6) & 0x02) |
((data_b >> 7) & 0x01);
- bitmap->pix32(y, x) = pens[color];
+ bitmap.pix32(y, x) = pens[color];
data_r = data_r << 1;
data_g = data_g << 1;
diff --git a/src/mame/drivers/xtheball.c b/src/mame/drivers/xtheball.c
index 2f662d58459..5aad349d18c 100644
--- a/src/mame/drivers/xtheball.c
+++ b/src/mame/drivers/xtheball.c
@@ -34,11 +34,11 @@ public:
*
*************************************/
-static void xtheball_scanline_update(screen_device &screen, bitmap_t *bitmap, int scanline, const tms34010_display_params *params)
+static void xtheball_scanline_update(screen_device &screen, bitmap_t &bitmap, int scanline, const tms34010_display_params *params)
{
xtheball_state *state = screen.machine().driver_data<xtheball_state>();
UINT16 *srcbg = &state->m_vram_bg[(params->rowaddr << 8) & 0xff00];
- UINT32 *dest = &bitmap->pix32(scanline);
+ UINT32 *dest = &bitmap.pix32(scanline);
const rgb_t *pens = tlc34076_get_pens(screen.machine().device("tlc34076"));
int coladdr = params->coladdr;
int x;
diff --git a/src/mame/drivers/zr107.c b/src/mame/drivers/zr107.c
index 6494fdb3ed1..574f89513bf 100644
--- a/src/mame/drivers/zr107.c
+++ b/src/mame/drivers/zr107.c
@@ -207,7 +207,7 @@ static SCREEN_UPDATE( jetwave )
zr107_state *state = screen.machine().driver_data<zr107_state>();
device_t *k001604 = screen.machine().device("k001604");
- bitmap->fill(screen.machine().pens[0], cliprect);
+ bitmap.fill(screen.machine().pens[0], cliprect);
K001005_draw(bitmap, cliprect);
@@ -259,7 +259,7 @@ static SCREEN_UPDATE( zr107 )
{
zr107_state *state = screen.machine().driver_data<zr107_state>();
device_t *k056832 = screen.machine().device("k056832");
- bitmap->fill(screen.machine().pens[0], cliprect);
+ bitmap.fill(screen.machine().pens[0], cliprect);
k056832_tilemap_draw(k056832, bitmap, cliprect, 1, 0, 0);
K001005_draw(bitmap, cliprect);
diff --git a/src/mame/includes/amiga.h b/src/mame/includes/amiga.h
index f837f94bdfc..393d4f4f394 100644
--- a/src/mame/includes/amiga.h
+++ b/src/mame/includes/amiga.h
@@ -481,7 +481,7 @@ int amiga_copper_execute_next(running_machine &machine, int xpos);
UINT32 amiga_gethvpos(screen_device &screen);
void amiga_set_genlock_color(running_machine &machine, UINT16 color);
-void amiga_render_scanline(running_machine &machine, bitmap_t *bitmap, int scanline);
+void amiga_render_scanline(running_machine &machine, bitmap_t &bitmap, int scanline);
void amiga_sprite_dma_reset(running_machine &machine, int which);
void amiga_sprite_enable_comparitor(running_machine &machine, int which, int enable);
@@ -490,7 +490,7 @@ void amiga_sprite_enable_comparitor(running_machine &machine, int which, int ena
VIDEO_START( amiga_aga );
SCREEN_UPDATE( amiga_aga );
-void amiga_aga_render_scanline(running_machine &machine, bitmap_t *bitmap, int scanline);
+void amiga_aga_render_scanline(running_machine &machine, bitmap_t &bitmap, int scanline);
void amiga_aga_palette_write(running_machine &machine, int color_reg, UINT16 data);
void amiga_aga_diwhigh_written(running_machine &machine, int written);
diff --git a/src/mame/includes/artmagic.h b/src/mame/includes/artmagic.h
index 0b2ab227b81..946909ef8ac 100644
--- a/src/mame/includes/artmagic.h
+++ b/src/mame/includes/artmagic.h
@@ -43,4 +43,4 @@ void artmagic_from_shiftreg(address_space *space, offs_t address, UINT16 *data);
READ16_HANDLER( artmagic_blitter_r );
WRITE16_HANDLER( artmagic_blitter_w );
-void artmagic_scanline(screen_device &screen, bitmap_t *bitmap, int scanline, const tms34010_display_params *params);
+void artmagic_scanline(screen_device &screen, bitmap_t &bitmap, int scanline, const tms34010_display_params *params);
diff --git a/src/mame/includes/btoads.h b/src/mame/includes/btoads.h
index 5871f2af3d3..f482b21d1d3 100644
--- a/src/mame/includes/btoads.h
+++ b/src/mame/includes/btoads.h
@@ -61,8 +61,8 @@ public:
static void static_to_shiftreg(address_space *space, UINT32 address, UINT16 *shiftreg) { space->machine().driver_data<btoads_state>()->to_shiftreg(space, address, shiftreg); }
void from_shiftreg(address_space *space, UINT32 address, UINT16 *shiftreg);
static void static_from_shiftreg(address_space *space, UINT32 address, UINT16 *shiftreg) { space->machine().driver_data<btoads_state>()->from_shiftreg(space, address, shiftreg); }
- void scanline_update(screen_device &screen, bitmap_t *bitmap, int scanline, const tms34010_display_params *params);
- static void static_scanline_update(screen_device &screen, bitmap_t *bitmap, int scanline, const tms34010_display_params *params) { screen.machine().driver_data<btoads_state>()->scanline_update(screen, bitmap, scanline, params); }
+ void scanline_update(screen_device &screen, bitmap_t &bitmap, int scanline, const tms34010_display_params *params);
+ static void static_scanline_update(screen_device &screen, bitmap_t &bitmap, int scanline, const tms34010_display_params *params) { screen.machine().driver_data<btoads_state>()->scanline_update(screen, bitmap, scanline, params); }
protected:
// device overrides
diff --git a/src/mame/includes/cidelsa.h b/src/mame/includes/cidelsa.h
index a8c8f57a4d5..5a067a7509f 100644
--- a/src/mame/includes/cidelsa.h
+++ b/src/mame/includes/cidelsa.h
@@ -51,7 +51,7 @@ public:
virtual void machine_reset();
virtual void video_start();
- virtual bool screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect) { m_vis->update_screen(&bitmap, cliprect); return false; }
+ virtual bool screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect) { m_vis->update_screen(bitmap, cliprect); return false; }
DECLARE_WRITE8_MEMBER( cdp1869_w );
DECLARE_WRITE8_MEMBER( destryer_out1_w );
diff --git a/src/mame/includes/exterm.h b/src/mame/includes/exterm.h
index b5ea7154ce0..ef3c133c69f 100644
--- a/src/mame/includes/exterm.h
+++ b/src/mame/includes/exterm.h
@@ -25,7 +25,7 @@ public:
/*----------- defined in video/exterm.c -----------*/
PALETTE_INIT( exterm );
-void exterm_scanline_update(screen_device &screen, bitmap_t *bitmap, int scanline, const tms34010_display_params *params);
+void exterm_scanline_update(screen_device &screen, bitmap_t &bitmap, int scanline, const tms34010_display_params *params);
void exterm_to_shiftreg_master(address_space *space, UINT32 address, UINT16* shiftreg);
void exterm_from_shiftreg_master(address_space *space, UINT32 address, UINT16* shiftreg);
diff --git a/src/mame/includes/galaxian.h b/src/mame/includes/galaxian.h
index 72461691484..f1b3d893a81 100644
--- a/src/mame/includes/galaxian.h
+++ b/src/mame/includes/galaxian.h
@@ -28,8 +28,8 @@
/* video extension callbacks */
typedef void (*galaxian_extend_tile_info_func)(running_machine &machine, UINT16 *code, UINT8 *color, UINT8 attrib, UINT8 x);
typedef void (*galaxian_extend_sprite_info_func)(running_machine &machine, const UINT8 *base, UINT8 *sx, UINT8 *sy, UINT8 *flipx, UINT8 *flipy, UINT16 *code, UINT8 *color);
-typedef void (*galaxian_draw_bullet_func)(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int offs, int x, int y);
-typedef void (*galaxian_draw_background_func)(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect);
+typedef void (*galaxian_draw_bullet_func)(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int offs, int x, int y);
+typedef void (*galaxian_draw_background_func)(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect);
class galaxian_state : public driver_device
@@ -105,19 +105,19 @@ WRITE8_HANDLER( galaxian_gfxbank_w );
TIMER_DEVICE_CALLBACK( galaxian_stars_blink_timer );
/* special purpose background rendering */
-void galaxian_draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect);
-void frogger_draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect);
-//void amidar_draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect);
-void turtles_draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect);
-void scramble_draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect);
-void anteater_draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect);
-void jumpbug_draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect);
+void galaxian_draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect);
+void frogger_draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect);
+//void amidar_draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect);
+void turtles_draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect);
+void scramble_draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect);
+void anteater_draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect);
+void jumpbug_draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect);
/* special purpose bullet rendering */
-void galaxian_draw_bullet(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int offs, int x, int y);
-void mshuttle_draw_bullet(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int offs, int x, int y);
-void scramble_draw_bullet(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int offs, int x, int y);
-void theend_draw_bullet(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int offs, int x, int y);
+void galaxian_draw_bullet(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int offs, int x, int y);
+void mshuttle_draw_bullet(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int offs, int x, int y);
+void scramble_draw_bullet(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int offs, int x, int y);
+void theend_draw_bullet(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int offs, int x, int y);
/* generic extensions */
void upper_extend_tile_info(running_machine &machine, UINT16 *code, UINT8 *color, UINT8 attrib, UINT8 x);
diff --git a/src/mame/includes/galaxold.h b/src/mame/includes/galaxold.h
index 9579675aeb1..c8547538d34 100644
--- a/src/mame/includes/galaxold.h
+++ b/src/mame/includes/galaxold.h
@@ -56,13 +56,13 @@ public:
UINT8 m_timer_adjusted;
UINT8 m_darkplnt_bullet_color;
- void (*m_draw_bullets)(running_machine &,bitmap_t *,const rectangle &, int, int, int); /* function to call to draw a bullet */
+ void (*m_draw_bullets)(running_machine &,bitmap_t &,const rectangle &, int, int, int); /* function to call to draw a bullet */
UINT8 m_background_enable;
UINT8 m_background_red;
UINT8 m_background_green;
UINT8 m_background_blue;
- void (*m_draw_background)(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect); /* function to call to draw the background */
+ void (*m_draw_background)(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect); /* function to call to draw the background */
UINT16 m_rockclim_v;
UINT16 m_rockclim_h;
int m_dambustr_bg_split_line;
@@ -72,7 +72,7 @@ public:
int m_dambustr_char_bank;
bitmap_t *m_dambustr_tmpbitmap;
- void (*m_draw_stars)(running_machine &machine, bitmap_t *, const rectangle &); /* function to call to draw the star layer */
+ void (*m_draw_stars)(running_machine &machine, bitmap_t &, const rectangle &); /* function to call to draw the star layer */
int m_stars_colors_start;
INT32 m_stars_scrollpos;
UINT8 m_stars_on;
@@ -142,7 +142,7 @@ VIDEO_START( racknrol );
VIDEO_START( ad2083 );
void galaxold_init_stars(running_machine &machine, int colors_offset);
-void galaxold_draw_stars(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect);
+void galaxold_draw_stars(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect);
SCREEN_UPDATE( galaxold );
SCREEN_UPDATE( dambustr );
diff --git a/src/mame/includes/genesis.h b/src/mame/includes/genesis.h
index 1df11f1cfd3..95541bf5404 100644
--- a/src/mame/includes/genesis.h
+++ b/src/mame/includes/genesis.h
@@ -7,7 +7,7 @@ extern UINT16 genesis_sp_pal_lookup[4];
extern UINT8 genesis_vdp_regs[32];
void system18_vdp_start(running_machine &machine);
-void system18_vdp_update(bitmap_t *bitmap, const rectangle &cliprect);
+void system18_vdp_update(bitmap_t &bitmap, const rectangle &cliprect);
READ16_HANDLER ( genesis_vdp_r );
WRITE16_HANDLER( genesis_vdp_w );
diff --git a/src/mame/includes/harddriv.h b/src/mame/includes/harddriv.h
index 3e9754ac3ad..ee493fe6ad2 100644
--- a/src/mame/includes/harddriv.h
+++ b/src/mame/includes/harddriv.h
@@ -357,5 +357,5 @@ WRITE16_HANDLER( hdgsp_paletteram_lo_w );
READ16_HANDLER( hdgsp_paletteram_hi_r );
WRITE16_HANDLER( hdgsp_paletteram_hi_w );
-void harddriv_scanline_driver(screen_device &screen, bitmap_t *bitmap, int scanline, const tms34010_display_params *params);
-void harddriv_scanline_multisync(screen_device &screen, bitmap_t *bitmap, int scanline, const tms34010_display_params *params);
+void harddriv_scanline_driver(screen_device &screen, bitmap_t &bitmap, int scanline, const tms34010_display_params *params);
+void harddriv_scanline_multisync(screen_device &screen, bitmap_t &bitmap, int scanline, const tms34010_display_params *params);
diff --git a/src/mame/includes/jpmimpct.h b/src/mame/includes/jpmimpct.h
index b0fe229345a..d7bfec6b4c2 100644
--- a/src/mame/includes/jpmimpct.h
+++ b/src/mame/includes/jpmimpct.h
@@ -82,6 +82,6 @@ WRITE16_HANDLER( jpmimpct_bt477_w );
void jpmimpct_to_shiftreg(address_space *space, UINT32 address, UINT16 *shiftreg);
void jpmimpct_from_shiftreg(address_space *space, UINT32 address, UINT16 *shiftreg);
-void jpmimpct_scanline_update(screen_device &screen, bitmap_t *bitmap, int scanline, const tms34010_display_params *params);
+void jpmimpct_scanline_update(screen_device &screen, bitmap_t &bitmap, int scanline, const tms34010_display_params *params);
VIDEO_START( jpmimpct );
diff --git a/src/mame/includes/kaneko16.h b/src/mame/includes/kaneko16.h
index 2a32ee37919..3fca080aedd 100644
--- a/src/mame/includes/kaneko16.h
+++ b/src/mame/includes/kaneko16.h
@@ -165,7 +165,7 @@ WRITE16_HANDLER( kaneko16_layers_1_regs_w );
READ16_HANDLER ( kaneko16_sprites_regs_r );
WRITE16_HANDLER( kaneko16_sprites_regs_w );
-void kaneko16_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect);
+void kaneko16_draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect);
READ16_HANDLER ( kaneko16_bg15_select_r );
WRITE16_HANDLER( kaneko16_bg15_select_w );
diff --git a/src/mame/includes/konamigx.h b/src/mame/includes/konamigx.h
index ede8270155e..d00e965bce5 100644
--- a/src/mame/includes/konamigx.h
+++ b/src/mame/includes/konamigx.h
@@ -73,7 +73,7 @@ extern UINT16 konamigx_wrport2;
#define GXSUB_5BPP 0x05 // 32 colors
#define GXSUB_8BPP 0x08 // 256 colors
-void konamigx_mixer(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect,
+void konamigx_mixer(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect,
tilemap_t *sub1, int sub1flags,
tilemap_t *sub2, int sub2flags,
int mixerflags, bitmap_t* extra_bitmap, int rushingheroes_hack);
diff --git a/src/mame/includes/ladybug.h b/src/mame/includes/ladybug.h
index 9b829a8e2bc..cec8470dfb0 100644
--- a/src/mame/includes/ladybug.h
+++ b/src/mame/includes/ladybug.h
@@ -80,4 +80,4 @@ SCREEN_EOF( redclash );
void redclash_set_stars_enable(running_machine &machine, UINT8 on);
void redclash_update_stars_state(running_machine &machine);
void redclash_set_stars_speed(running_machine &machine, UINT8 speed);
-void redclash_draw_stars(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, UINT8 palette_offset, UINT8 sraider, UINT8 firstx, UINT8 lastx);
+void redclash_draw_stars(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, UINT8 palette_offset, UINT8 sraider, UINT8 firstx, UINT8 lastx);
diff --git a/src/mame/includes/lethalj.h b/src/mame/includes/lethalj.h
index 0265bc33b3b..b7c8f3369a9 100644
--- a/src/mame/includes/lethalj.h
+++ b/src/mame/includes/lethalj.h
@@ -29,4 +29,4 @@ VIDEO_START( lethalj );
WRITE16_HANDLER( lethalj_blitter_w );
-void lethalj_scanline_update(screen_device &screen, bitmap_t *bitmap, int scanline, const tms34010_display_params *params);
+void lethalj_scanline_update(screen_device &screen, bitmap_t &bitmap, int scanline, const tms34010_display_params *params);
diff --git a/src/mame/includes/metro.h b/src/mame/includes/metro.h
index a2ec452422c..b50634d15f6 100644
--- a/src/mame/includes/metro.h
+++ b/src/mame/includes/metro.h
@@ -98,4 +98,4 @@ VIDEO_START( gstrik2 );
SCREEN_UPDATE( metro );
-void metro_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect);
+void metro_draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect);
diff --git a/src/mame/includes/micro3d.h b/src/mame/includes/micro3d.h
index 2ad4399162e..db2005bb8ea 100644
--- a/src/mame/includes/micro3d.h
+++ b/src/mame/includes/micro3d.h
@@ -143,7 +143,7 @@ VIDEO_START( micro3d );
VIDEO_RESET( micro3d );
void micro3d_tms_interrupt(device_t *device, int state);
-void micro3d_scanline_update(screen_device &screen, bitmap_t *bitmap, int scanline, const tms34010_display_params *params);
+void micro3d_scanline_update(screen_device &screen, bitmap_t &bitmap, int scanline, const tms34010_display_params *params);
WRITE16_HANDLER( micro3d_clut_w );
WRITE16_HANDLER( micro3d_creg_w );
diff --git a/src/mame/includes/midtunit.h b/src/mame/includes/midtunit.h
index 6bc7b16f914..00ec5d8a6d9 100644
--- a/src/mame/includes/midtunit.h
+++ b/src/mame/includes/midtunit.h
@@ -71,5 +71,5 @@ READ16_HANDLER( midxunit_paletteram_r );
READ16_HANDLER( midtunit_dma_r );
WRITE16_HANDLER( midtunit_dma_w );
-void midtunit_scanline_update(screen_device &screen, bitmap_t *bitmap, int scanline, const tms34010_display_params *params);
-void midxunit_scanline_update(screen_device &screen, bitmap_t *bitmap, int scanline, const tms34010_display_params *params);
+void midtunit_scanline_update(screen_device &screen, bitmap_t &bitmap, int scanline, const tms34010_display_params *params);
+void midxunit_scanline_update(screen_device &screen, bitmap_t &bitmap, int scanline, const tms34010_display_params *params);
diff --git a/src/mame/includes/midyunit.h b/src/mame/includes/midyunit.h
index e984bc6c7bb..e50a269b372 100644
--- a/src/mame/includes/midyunit.h
+++ b/src/mame/includes/midyunit.h
@@ -108,4 +108,4 @@ WRITE16_HANDLER( midyunit_paletteram_w );
READ16_HANDLER( midyunit_dma_r );
WRITE16_HANDLER( midyunit_dma_w );
-void midyunit_scanline_update(screen_device &screen, bitmap_t *bitmap, int scanline, const tms34010_display_params *params);
+void midyunit_scanline_update(screen_device &screen, bitmap_t &bitmap, int scanline, const tms34010_display_params *params);
diff --git a/src/mame/includes/namcoic.h b/src/mame/includes/namcoic.h
index d1afb6ae8fc..c8bf72361f8 100644
--- a/src/mame/includes/namcoic.h
+++ b/src/mame/includes/namcoic.h
@@ -93,7 +93,7 @@ C102 - Controls CPU access to ROZ Memory Area.
void namco_tilemap_init(
running_machine &machine, int gfxbank, void *pMaskROM,
void (*cb)( running_machine &machine, UINT16 code, int *gfx, int *mask) );
-void namco_tilemap_draw( bitmap_t *bitmap, const rectangle &cliprect, int pri );
+void namco_tilemap_draw( bitmap_t &bitmap, const rectangle &cliprect, int pri );
void namco_tilemap_invalidate( void );
WRITE16_HANDLER( namco_tilemapvideoram16_w );
READ16_HANDLER( namco_tilemapvideoram16_r );
@@ -113,16 +113,16 @@ WRITE32_HANDLER( namco_tilemapcontrol32_le_w );
/***********************************************************************************/
/* Namco System II Sprite Rendering */
-void namcos2_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int pri, int control );
+void namcos2_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int pri, int control );
-void namcos2_draw_sprites_metalhawk( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int pri );
+void namcos2_draw_sprites_metalhawk( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int pri );
/***********************************************************************************/
/* C355 Motion Object Emulation */
/* for palXOR, supply either 0x0 (normal) or 0xf (palette mapping reversed) */
void namco_obj_init( running_machine &machine, int gfxbank, int palXOR, int (*code2tile)( running_machine &machine, int code ) );
-void namco_obj_draw( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int pri );
+void namco_obj_draw( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int pri );
WRITE16_HANDLER( namco_obj16_w );
READ16_HANDLER( namco_obj16_r );
@@ -142,7 +142,7 @@ READ32_HANDLER( namco_spritepos32_r );
/* C169 ROZ Layer Emulation */
void namco_roz_init( running_machine &machine, int gfxbank, const char *maskregion );
-void namco_roz_draw( bitmap_t *bitmap, const rectangle &cliprect, int pri );
+void namco_roz_draw( bitmap_t &bitmap, const rectangle &cliprect, int pri );
READ16_HANDLER( namco_rozcontrol16_r );
WRITE16_HANDLER( namco_rozcontrol16_w );
@@ -165,7 +165,7 @@ WRITE32_HANDLER( namco_rozvideoram32_le_w );
void namco_road_init( running_machine &machine, int gfxbank );
void namco_road_set_transparent_color(pen_t pen);
-void namco_road_draw( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int pri );
+void namco_road_draw( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int pri );
READ16_HANDLER( namco_road16_r );
WRITE16_HANDLER( namco_road16_w );
diff --git a/src/mame/includes/pk8000.h b/src/mame/includes/pk8000.h
index a46aec9a94c..bc2d34fa62e 100644
--- a/src/mame/includes/pk8000.h
+++ b/src/mame/includes/pk8000.h
@@ -18,4 +18,4 @@ extern UINT8 pk8000_video_enable;
PALETTE_INIT( pk8000 );
-UINT32 pk8000_video_update(screen_device &screen, bitmap_t *bitmap, const rectangle &cliprect, UINT8 *videomem);
+UINT32 pk8000_video_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect, UINT8 *videomem);
diff --git a/src/mame/includes/raiden2.h b/src/mame/includes/raiden2.h
index 7a399d27eef..c5ffaab2daf 100644
--- a/src/mame/includes/raiden2.h
+++ b/src/mame/includes/raiden2.h
@@ -109,7 +109,7 @@ public:
UINT16 cop_hit_status;
- void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect ,int pri_mask );
+ void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect ,int pri_mask );
UINT8 cop_calculate_collsion_detection(running_machine &machine);
};
diff --git a/src/mame/includes/st0016.h b/src/mame/includes/st0016.h
index c932ad4669e..5c02b1ef5df 100644
--- a/src/mame/includes/st0016.h
+++ b/src/mame/includes/st0016.h
@@ -57,6 +57,6 @@ WRITE8_HANDLER (st0016_character_ram_w);
READ8_HANDLER (st0016_vregs_r);
WRITE8_HANDLER (st0016_vregs_w);
-void st0016_draw_screen(screen_device &screen, bitmap_t *bitmap, const rectangle &cliprect);
+void st0016_draw_screen(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect);
VIDEO_START(st0016);
SCREEN_UPDATE(st0016);
diff --git a/src/mame/includes/suprnova.h b/src/mame/includes/suprnova.h
index d613f1f7025..1547aa0bc53 100644
--- a/src/mame/includes/suprnova.h
+++ b/src/mame/includes/suprnova.h
@@ -74,7 +74,7 @@ public:
void skns_sprite_kludge(int x, int y);
void skns_draw_sprites(
- running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect,
+ running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect,
UINT32* spriteram_source, size_t spriteram_size,
UINT8* gfx_source, size_t gfx_length,
UINT32* sprite_regs );
diff --git a/src/mame/includes/zodiack.h b/src/mame/includes/zodiack.h
index 0b546509c49..1cf0f26632e 100644
--- a/src/mame/includes/zodiack.h
+++ b/src/mame/includes/zodiack.h
@@ -31,8 +31,8 @@ public:
DECLARE_WRITE8_MEMBER(attributes_w);
DECLARE_WRITE8_MEMBER(flipscreen_w);
- void draw_bullets(bitmap_t *bitmap, const rectangle &cliprect);
- void draw_sprites(bitmap_t *bitmap, const rectangle &cliprect);
+ void draw_bullets(bitmap_t &bitmap, const rectangle &cliprect);
+ void draw_sprites(bitmap_t &bitmap, const rectangle &cliprect);
// devices
required_device<z80_device> m_maincpu;
diff --git a/src/mame/machine/3do.c b/src/mame/machine/3do.c
index 6b3fb722882..1a03abbb76b 100644
--- a/src/mame/machine/3do.c
+++ b/src/mame/machine/3do.c
@@ -992,8 +992,8 @@ SCREEN_UPDATE( _3do )
for ( int i = 0; i < 120; i++ )
{
- UINT32 *dest_p0 = &bitmap->pix32(22 + i * 2, 254 );
- UINT32 *dest_p1 = &bitmap->pix32(22 + i * 2 + 1, 254 );
+ UINT32 *dest_p0 = &bitmap.pix32(22 + i * 2, 254 );
+ UINT32 *dest_p1 = &bitmap.pix32(22 + i * 2 + 1, 254 );
for ( int j = 0; j < 320; j++ )
{
diff --git a/src/mame/machine/amiga.c b/src/mame/machine/amiga.c
index b8b5b061f6a..3fadb1a8051 100644
--- a/src/mame/machine/amiga.c
+++ b/src/mame/machine/amiga.c
@@ -335,10 +335,11 @@ static TIMER_CALLBACK( scanline_callback )
/* render up to this scanline */
if (!machine.primary_screen->update_partial(scanline))
{
+ bitmap_t dummy_bitmap;
if (IS_AGA(state->m_intf))
- amiga_aga_render_scanline(machine, NULL, scanline);
+ amiga_aga_render_scanline(machine, dummy_bitmap, scanline);
else
- amiga_render_scanline(machine, NULL, scanline);
+ amiga_render_scanline(machine, dummy_bitmap, scanline);
}
/* force a sound update */
diff --git a/src/mame/machine/konppc.c b/src/mame/machine/konppc.c
index afe3075e5a5..8b6852f65f3 100644
--- a/src/mame/machine/konppc.c
+++ b/src/mame/machine/konppc.c
@@ -535,41 +535,41 @@ WRITE32_DEVICE_HANDLER(nwk_voodoo_1_w)
#define LED_ON 0xff00ff00
-void draw_7segment_led(bitmap_t *bitmap, int x, int y, UINT8 value)
+void draw_7segment_led(bitmap_t &bitmap, int x, int y, UINT8 value)
{
if ((value & 0x7f) == 0x7f)
{
return;
}
- bitmap->plot_box(x-1, y-1, 7, 11, 0x00000000);
+ bitmap.plot_box(x-1, y-1, 7, 11, 0x00000000);
/* Top */
if( (value & 0x40) == 0 ) {
- bitmap->plot_box(x+1, y+0, 3, 1, LED_ON);
+ bitmap.plot_box(x+1, y+0, 3, 1, LED_ON);
}
/* Middle */
if( (value & 0x01) == 0 ) {
- bitmap->plot_box(x+1, y+4, 3, 1, LED_ON);
+ bitmap.plot_box(x+1, y+4, 3, 1, LED_ON);
}
/* Bottom */
if( (value & 0x08) == 0 ) {
- bitmap->plot_box(x+1, y+8, 3, 1, LED_ON);
+ bitmap.plot_box(x+1, y+8, 3, 1, LED_ON);
}
/* Top Left */
if( (value & 0x02) == 0 ) {
- bitmap->plot_box(x+0, y+1, 1, 3, LED_ON);
+ bitmap.plot_box(x+0, y+1, 1, 3, LED_ON);
}
/* Top Right */
if( (value & 0x20) == 0 ) {
- bitmap->plot_box(x+4, y+1, 1, 3, LED_ON);
+ bitmap.plot_box(x+4, y+1, 1, 3, LED_ON);
}
/* Bottom Left */
if( (value & 0x04) == 0 ) {
- bitmap->plot_box(x+0, y+5, 1, 3, LED_ON);
+ bitmap.plot_box(x+0, y+5, 1, 3, LED_ON);
}
/* Bottom Right */
if( (value & 0x10) == 0 ) {
- bitmap->plot_box(x+4, y+5, 1, 3, LED_ON);
+ bitmap.plot_box(x+4, y+5, 1, 3, LED_ON);
}
}
diff --git a/src/mame/machine/konppc.h b/src/mame/machine/konppc.h
index ea33e08aeea..16651a82532 100644
--- a/src/mame/machine/konppc.h
+++ b/src/mame/machine/konppc.h
@@ -38,6 +38,6 @@ READ32_DEVICE_HANDLER(nwk_voodoo_1_r);
WRITE32_DEVICE_HANDLER(nwk_voodoo_0_w);
WRITE32_DEVICE_HANDLER(nwk_voodoo_1_w);
-void draw_7segment_led(bitmap_t *bitmap, int x, int y, UINT8 value);
+void draw_7segment_led(bitmap_t &bitmap, int x, int y, UINT8 value);
#endif
diff --git a/src/mame/machine/megadriv.c b/src/mame/machine/megadriv.c
index 8dc21be6a24..7228faf4a0d 100644
--- a/src/mame/machine/megadriv.c
+++ b/src/mame/machine/megadriv.c
@@ -5380,11 +5380,11 @@ static READ16_HANDLER( segacd_main_dataram_part1_r )
// converts data stored in bitmap format (in dataram) to be read out as tiles (for dma->vram purposes)
// used by Heart of the Alien
- if(offset<0x30000/2) /* 0x20000 - 0x2ffff */ // 512x256 bitmap -> tiles
+ if(offset<0x30000/2) /* 0x20000 - 0x2ffff */ // 512x256 bitmap. tiles
offset = BITSWAP24(offset,23,22,21,20,19,18,17,16,15,8,7,6,5,4,3,2,1,14,13,12,11,10,9,0);
- else if(offset<0x38000/2) /* 0x30000 - 0x37fff */ // 512x128 bitmap -> tiles
+ else if(offset<0x38000/2) /* 0x30000 - 0x37fff */ // 512x128 bitmap. tiles
offset = BITSWAP24(offset,23,22,21,20,19,18,17,16,15,14,7,6,5,4,3,2,1,13,12,11,10,9,8,0);
- else if(offset<0x3c000/2) /* 0x38000 - 0x3bfff */ // 512x64 bitmap -> tiles
+ else if(offset<0x3c000/2) /* 0x38000 - 0x3bfff */ // 512x64 bitmap. tiles
offset = BITSWAP24(offset,23,22,21,20,19,18,17,16,15,14,13,6,5,4,3,2,1,12,11,10,9,8,7,0);
else /* 0x3c000 - 0x3dfff and 0x3e000 - 0x3ffff */ // 512x32 bitmap (x2) -> tiles
offset = BITSWAP24(offset,23,22,21,20,19,18,17,16,15,14,13,12,5,4,3,2,1,11,10,9,8,7,6,0);
@@ -7275,7 +7275,7 @@ VIDEO_START(megadriv)
SCREEN_UPDATE(megadriv)
{
/* Copy our screen buffer here */
- copybitmap(bitmap, render_bitmap, 0, 0, 0, 0, cliprect);
+ copybitmap(bitmap, *render_bitmap, 0, 0, 0, 0, cliprect);
// int xxx;
/* reference */
diff --git a/src/mame/machine/segamsys.c b/src/mame/machine/segamsys.c
index 60ebe6ab047..c08ae9b53f1 100644
--- a/src/mame/machine/segamsys.c
+++ b/src/mame/machine/segamsys.c
@@ -1271,7 +1271,7 @@ SCREEN_UPDATE(megatech_md_sms)
for (y=0;y<224;y++)
{
- UINT16* lineptr = &bitmap->pix16(y);
+ UINT16* lineptr = &bitmap.pix16(y);
UINT16* srcptr = &md_sms_vdp->r_bitmap->pix16(y);
for (x=0;x<256;x++)
@@ -1290,7 +1290,7 @@ SCREEN_UPDATE(megatech_bios)
for (y=0;y<224;y++)
{
- UINT16* lineptr = &bitmap->pix16(y);
+ UINT16* lineptr = &bitmap.pix16(y);
UINT16* srcptr = &vdp1->r_bitmap->pix16(y);
for (x=0;x<256;x++)
@@ -1308,7 +1308,7 @@ SCREEN_UPDATE(megaplay_bios)
for (y=0;y<224;y++)
{
- UINT16* lineptr = &bitmap->pix16(y+16, 32);
+ UINT16* lineptr = &bitmap.pix16(y+16, 32);
UINT16* srcptr = &vdp1->r_bitmap->pix16(y);
for (x=0;x<256;x++)
@@ -1330,7 +1330,7 @@ SCREEN_UPDATE(systeme)
for (y=0;y<192;y++)
{
- UINT16* lineptr = &bitmap->pix16(y);
+ UINT16* lineptr = &bitmap.pix16(y);
UINT16* srcptr = &vdp1->r_bitmap->pix16(y);
for (x=0;x<256;x++)
@@ -1342,7 +1342,7 @@ SCREEN_UPDATE(systeme)
for (y=0;y<192;y++)
{
- UINT16* lineptr = &bitmap->pix16(y);
+ UINT16* lineptr = &bitmap.pix16(y);
UINT16* srcptr = &vdp2->r_bitmap->pix16(y);
for (x=0;x<256;x++)
diff --git a/src/mame/video/1942.c b/src/mame/video/1942.c
index 80498534978..3f8e68def4e 100644
--- a/src/mame/video/1942.c
+++ b/src/mame/video/1942.c
@@ -198,7 +198,7 @@ WRITE8_HANDLER( c1942_c804_w )
***************************************************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
_1942_state *state = machine.driver_data<_1942_state>();
int offs;
diff --git a/src/mame/video/1943.c b/src/mame/video/1943.c
index 4f550aa1134..55bc2c4a45e 100644
--- a/src/mame/video/1943.c
+++ b/src/mame/video/1943.c
@@ -221,7 +221,7 @@ VIDEO_START( 1943 )
state->save_item(NAME(state->m_bg2_on));
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int priority )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int priority )
{
_1943_state *state = machine.driver_data<_1943_state>();
int offs;
@@ -264,7 +264,7 @@ SCREEN_UPDATE( 1943 )
if (state->m_bg2_on)
tilemap_draw(bitmap, cliprect, state->m_bg2_tilemap, 0, 0);
else
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
if (state->m_obj_on)
draw_sprites(screen.machine(), bitmap, cliprect, 0);
diff --git a/src/mame/video/20pacgal.c b/src/mame/video/20pacgal.c
index 44447295fa8..65e6179b77c 100644
--- a/src/mame/video/20pacgal.c
+++ b/src/mame/video/20pacgal.c
@@ -73,7 +73,7 @@ static void get_pens(running_machine &machine, const _20pacgal_state *state, pen
}
-static void do_pen_lookup(running_machine &machine, const _20pacgal_state *state, bitmap_t *bitmap, const rectangle &cliprect)
+static void do_pen_lookup(running_machine &machine, const _20pacgal_state *state, bitmap_t &bitmap, const rectangle &cliprect)
{
int y, x;
pen_t pens[NUM_PENS + NUM_STAR_PENS];
@@ -82,7 +82,7 @@ static void do_pen_lookup(running_machine &machine, const _20pacgal_state *state
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
for(x = cliprect.min_x; x <= cliprect.max_x; x++)
- bitmap->pix32(y, x) = pens[bitmap->pix32(y, x)];
+ bitmap.pix32(y, x) = pens[bitmap.pix32(y, x)];
}
@@ -93,7 +93,7 @@ static void do_pen_lookup(running_machine &machine, const _20pacgal_state *state
*
*************************************/
-static void draw_sprite(running_machine& machine, const _20pacgal_state *state, bitmap_t *bitmap, int y, int x,
+static void draw_sprite(running_machine& machine, const _20pacgal_state *state, bitmap_t &bitmap, int y, int x,
UINT8 code, UINT8 color, int flip_y, int flip_x)
{
int sy;
@@ -139,7 +139,7 @@ static void draw_sprite(running_machine& machine, const _20pacgal_state *state,
/* pen bits A0-A3 */
if (col)
- bitmap->pix32(y, x) = (bitmap->pix32(y, x) & 0xff0) | col;
+ bitmap.pix32(y, x) = (bitmap.pix32(y, x) & 0xff0) | col;
}
/* next pixel */
@@ -163,7 +163,7 @@ static void draw_sprite(running_machine& machine, const _20pacgal_state *state,
}
-static void draw_sprites(running_machine& machine,const _20pacgal_state *state, bitmap_t *bitmap)
+static void draw_sprites(running_machine& machine,const _20pacgal_state *state, bitmap_t &bitmap)
{
int offs;
@@ -215,7 +215,7 @@ static void draw_sprites(running_machine& machine,const _20pacgal_state *state,
*
*************************************/
-static void draw_chars(const _20pacgal_state *state, bitmap_t *bitmap)
+static void draw_chars(const _20pacgal_state *state, bitmap_t &bitmap)
{
offs_t offs;
@@ -274,7 +274,7 @@ static void draw_chars(const _20pacgal_state *state, bitmap_t *bitmap)
/* pen bits A4-A11 */
if ( col != 0 )
- bitmap->pix32(y, x) = (color_base | col) << 4;
+ bitmap.pix32(y, x) = (color_base | col) << 4;
/* next pixel */
if (flip)
@@ -349,7 +349,7 @@ static void draw_chars(const _20pacgal_state *state, bitmap_t *bitmap)
*
*/
-static void draw_stars(_20pacgal_state *state, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_stars(_20pacgal_state *state, bitmap_t &bitmap, const rectangle &cliprect )
{
if ( (state->m_stars_ctrl[0] >> 5) & 1 )
{
@@ -392,7 +392,7 @@ static void draw_stars(_20pacgal_state *state, bitmap_t *bitmap, const rectangle
if (((lfsr & 0xffc0) == star_seta) || ((lfsr & 0xffc0) == star_setb))
{
if (y >= cliprect.min_y && y <= cliprect.max_y)
- bitmap->pix32(y, x) = NUM_PENS + (lfsr & 0x3f);
+ bitmap.pix32(y, x) = NUM_PENS + (lfsr & 0x3f);
cnt++;
}
}
@@ -410,7 +410,7 @@ static SCREEN_UPDATE( 20pacgal )
{
_20pacgal_state *state = screen.machine().driver_data<_20pacgal_state>();
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
draw_stars(state, bitmap,cliprect);
draw_chars(state, bitmap);
draw_sprites(screen.machine(),state, bitmap);
diff --git a/src/mame/video/40love.c b/src/mame/video/40love.c
index 9c786413669..9885b8c3438 100644
--- a/src/mame/video/40love.c
+++ b/src/mame/video/40love.c
@@ -274,7 +274,7 @@ spriteram format (4 bytes per sprite):
offset 3 xxxxxxxx x position
*/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
fortyl_state *state = machine.driver_data<fortyl_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -338,7 +338,7 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
}
}
-static void draw_pixram( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_pixram( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
fortyl_state *state = machine.driver_data<fortyl_state>();
int offs;
@@ -353,9 +353,9 @@ static void draw_pixram( running_machine &machine, bitmap_t *bitmap, const recta
}
if (state->m_pixram_sel)
- copybitmap(bitmap, state->m_tmp_bitmap1, f, f, state->m_xoffset, 0, cliprect);
+ copybitmap(bitmap, *state->m_tmp_bitmap1, f, f, state->m_xoffset, 0, cliprect);
else
- copybitmap(bitmap, state->m_tmp_bitmap2, f, f, state->m_xoffset, 0, cliprect);
+ copybitmap(bitmap, *state->m_tmp_bitmap2, f, f, state->m_xoffset, 0, cliprect);
}
SCREEN_UPDATE( fortyl )
diff --git a/src/mame/video/8080bw.c b/src/mame/video/8080bw.c
index cd3184cec62..f01ecec2a31 100644
--- a/src/mame/video/8080bw.c
+++ b/src/mame/video/8080bw.c
@@ -63,21 +63,21 @@ static void cosmo_get_pens( pen_t *pens )
}
-INLINE void set_pixel( running_machine &machine, bitmap_t *bitmap, UINT8 y, UINT8 x, pen_t *pens, UINT8 color )
+INLINE void set_pixel( running_machine &machine, bitmap_t &bitmap, UINT8 y, UINT8 x, pen_t *pens, UINT8 color )
{
_8080bw_state *state = machine.driver_data<_8080bw_state>();
if (y >= MW8080BW_VCOUNTER_START_NO_VBLANK)
{
if (state->m_c8080bw_flip_screen)
- bitmap->pix32(MW8080BW_VBSTART - 1 - (y - MW8080BW_VCOUNTER_START_NO_VBLANK), MW8080BW_HPIXCOUNT - 1 - x) = pens[color];
+ bitmap.pix32(MW8080BW_VBSTART - 1 - (y - MW8080BW_VCOUNTER_START_NO_VBLANK), MW8080BW_HPIXCOUNT - 1 - x) = pens[color];
else
- bitmap->pix32(y - MW8080BW_VCOUNTER_START_NO_VBLANK, x) = pens[color];
+ bitmap.pix32(y - MW8080BW_VCOUNTER_START_NO_VBLANK, x) = pens[color];
}
}
-INLINE void set_8_pixels( running_machine &machine, bitmap_t *bitmap, UINT8 y, UINT8 x, UINT8 data, pen_t *pens, UINT8 fore_color, UINT8 back_color )
+INLINE void set_8_pixels( running_machine &machine, bitmap_t &bitmap, UINT8 y, UINT8 x, UINT8 data, pen_t *pens, UINT8 fore_color, UINT8 back_color )
{
int i;
@@ -92,7 +92,7 @@ INLINE void set_8_pixels( running_machine &machine, bitmap_t *bitmap, UINT8 y, U
/* this is needed as this driver doesn't emulate the shift register like mw8080bw does */
-static void clear_extra_columns( running_machine &machine, bitmap_t *bitmap, pen_t *pens, UINT8 color )
+static void clear_extra_columns( running_machine &machine, bitmap_t &bitmap, pen_t *pens, UINT8 color )
{
_8080bw_state *state = machine.driver_data<_8080bw_state>();
UINT8 x;
@@ -104,9 +104,9 @@ static void clear_extra_columns( running_machine &machine, bitmap_t *bitmap, pen
for (y = MW8080BW_VCOUNTER_START_NO_VBLANK; y != 0; y++)
{
if (state->m_c8080bw_flip_screen)
- bitmap->pix32(MW8080BW_VBSTART - 1 - (y - MW8080BW_VCOUNTER_START_NO_VBLANK), MW8080BW_HPIXCOUNT - 1 - (256 + x)) = pens[color];
+ bitmap.pix32(MW8080BW_VBSTART - 1 - (y - MW8080BW_VCOUNTER_START_NO_VBLANK), MW8080BW_HPIXCOUNT - 1 - (256 + x)) = pens[color];
else
- bitmap->pix32(y - MW8080BW_VCOUNTER_START_NO_VBLANK, 256 + x) = pens[color];
+ bitmap.pix32(y - MW8080BW_VCOUNTER_START_NO_VBLANK, 256 + x) = pens[color];
}
}
}
@@ -443,7 +443,7 @@ SCREEN_UPDATE( shuttlei )
for (i = 0; i < 8; i++)
{
pen_t pen = (data & 0x80) ? RGB_WHITE : RGB_BLACK;
- bitmap->pix32(y, x) = pen;
+ bitmap.pix32(y, x) = pen;
x = x + 1;
data = data << 1;
diff --git a/src/mame/video/aeroboto.c b/src/mame/video/aeroboto.c
index 5df358ce05b..2ebe6c0c222 100644
--- a/src/mame/video/aeroboto.c
+++ b/src/mame/video/aeroboto.c
@@ -129,7 +129,7 @@ WRITE8_HANDLER( aeroboto_tilecolor_w )
***************************************************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
aeroboto_state *state = machine.driver_data<aeroboto_state>();
int offs;
@@ -176,7 +176,7 @@ SCREEN_UPDATE( aeroboto )
star_color += 2;
- bitmap->fill(sky_color, cliprect);
+ bitmap.fill(sky_color, cliprect);
// actual scroll speed is unknown but it can be adjusted by changing the SCROLL_SPEED constant
state->m_sx += (char)(*state->m_starx - state->m_ox);
@@ -202,7 +202,7 @@ SCREEN_UPDATE( aeroboto )
{
src_rowptr = src_colptr + (((y + j) & 0xff) << 5 );
if (!((unsigned)*src_rowptr & src_colmask))
- bitmap->pix16(j, i) = pen;
+ bitmap.pix16(j, i) = pen;
}
}
}
@@ -210,7 +210,7 @@ SCREEN_UPDATE( aeroboto )
{
state->m_sx = state->m_ox = *state->m_starx;
state->m_sy = state->m_oy = *state->m_stary;
- bitmap->fill(sky_color, cliprect);
+ bitmap.fill(sky_color, cliprect);
}
for (y = 0; y < 64; y++)
diff --git a/src/mame/video/aerofgt.c b/src/mame/video/aerofgt.c
index f79d579158d..5b31530a47a 100644
--- a/src/mame/video/aerofgt.c
+++ b/src/mame/video/aerofgt.c
@@ -333,7 +333,7 @@ WRITE16_HANDLER( wbbc97_bitmap_enable_w )
***************************************************************************/
-static void aerofgt_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int priority )
+static void aerofgt_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int priority )
{
aerofgt_state *state = machine.driver_data<aerofgt_state>();
int offs;
@@ -404,7 +404,7 @@ static void aerofgt_draw_sprites( running_machine &machine, bitmap_t *bitmap, co
}
}
-static void turbofrc_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int chip, int chip_disabled_pri )
+static void turbofrc_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int chip, int chip_disabled_pri )
{
aerofgt_state *state = machine.driver_data<aerofgt_state>();
int attr_start, base, first;
@@ -489,7 +489,7 @@ static void turbofrc_draw_sprites( running_machine &machine, bitmap_t *bitmap, c
}
}
-static void spinlbrk_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int chip, int chip_disabled_pri )
+static void spinlbrk_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int chip, int chip_disabled_pri )
{
aerofgt_state *state = machine.driver_data<aerofgt_state>();
int attr_start, base, first;
@@ -573,7 +573,7 @@ static void spinlbrk_draw_sprites( running_machine &machine, bitmap_t *bitmap, c
}
}
-static void aerfboo2_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int chip, int chip_disabled_pri )
+static void aerfboo2_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int chip, int chip_disabled_pri )
{
aerofgt_state *state = machine.driver_data<aerofgt_state>();
int attr_start, base, first;
@@ -658,7 +658,7 @@ static void aerfboo2_draw_sprites( running_machine &machine, bitmap_t *bitmap, c
}
}
-static void pspikesb_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void pspikesb_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
aerofgt_state *state = machine.driver_data<aerofgt_state>();
int i;
@@ -693,7 +693,7 @@ static void pspikesb_draw_sprites( running_machine &machine, bitmap_t *bitmap, c
}
}
-static void spikes91_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void spikes91_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
aerofgt_state *state = machine.driver_data<aerofgt_state>();
int i;
@@ -735,7 +735,7 @@ static void spikes91_draw_sprites( running_machine &machine, bitmap_t *bitmap, c
}
}
-static void aerfboot_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void aerfboot_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
aerofgt_state *state = machine.driver_data<aerofgt_state>();
int attr_start, last;
@@ -817,7 +817,7 @@ static void aerfboot_draw_sprites( running_machine &machine, bitmap_t *bitmap, c
}
}
-static void wbbc97_draw_bitmap( running_machine &machine, bitmap_t *bitmap )
+static void wbbc97_draw_bitmap( running_machine &machine, bitmap_t &bitmap )
{
aerofgt_state *state = machine.driver_data<aerofgt_state>();
int x, y, count;
@@ -830,7 +830,7 @@ static void wbbc97_draw_bitmap( running_machine &machine, bitmap_t *bitmap )
/* data is GRB; convert to RGB */
rgb_t pen = MAKE_RGB(pal5bit((color & 0x3e0) >> 5), pal5bit((color & 0x7c00) >> 10), pal5bit(color & 0x1f));
- bitmap->pix32(y, (10 + x - state->m_rasterram[(y & 0x7f)]) & 0x1ff) = pen;
+ bitmap.pix32(y, (10 + x - state->m_rasterram[(y & 0x7f)]) & 0x1ff) = pen;
count++;
count &= 0x1ffff;
@@ -849,7 +849,7 @@ SCREEN_UPDATE( pspikes )
tilemap_set_scrollx(state->m_bg1_tilemap, (i + scrolly) & 0xff, state->m_rasterram[i]);
tilemap_set_scrolly(state->m_bg1_tilemap, 0, scrolly);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
tilemap_draw(bitmap, cliprect, state->m_bg1_tilemap, 0, 0);
turbofrc_draw_sprites(screen.machine(), bitmap, cliprect, 0, -1);
@@ -922,7 +922,7 @@ SCREEN_UPDATE( karatblz )
tilemap_set_scrollx(state->m_bg2_tilemap, 0, state->m_bg2scrollx - 4);
tilemap_set_scrolly(state->m_bg2_tilemap, 0, state->m_bg2scrolly);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
tilemap_draw(bitmap, cliprect, state->m_bg1_tilemap, 0, 0);
tilemap_draw(bitmap, cliprect, state->m_bg2_tilemap, 0, 0);
@@ -948,7 +948,7 @@ SCREEN_UPDATE( spinlbrk )
tilemap_set_scrollx(state->m_bg2_tilemap, 0, state->m_bg2scrollx - 4);
// tilemap_set_scrolly(state->m_bg2_tilemap, 0, state->m_bg2scrolly);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
tilemap_draw(bitmap, cliprect, state->m_bg1_tilemap, 0, 0);
tilemap_draw(bitmap, cliprect, state->m_bg2_tilemap, 0, 1);
@@ -975,7 +975,7 @@ SCREEN_UPDATE( turbofrc )
tilemap_set_scrollx(state->m_bg2_tilemap, 0, state->m_bg2scrollx - 7);
tilemap_set_scrolly(state->m_bg2_tilemap, 0, state->m_bg2scrolly + 2);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
tilemap_draw(bitmap, cliprect, state->m_bg1_tilemap, 0, 0);
tilemap_draw(bitmap, cliprect, state->m_bg2_tilemap, 0, 1);
@@ -996,7 +996,7 @@ SCREEN_UPDATE( aerofgt )
tilemap_set_scrollx(state->m_bg2_tilemap, 0, state->m_rasterram[0x0200] - 20);
tilemap_set_scrolly(state->m_bg2_tilemap, 0, state->m_bg2scrolly);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
tilemap_draw(bitmap, cliprect, state->m_bg1_tilemap, 0, 0);
@@ -1024,7 +1024,7 @@ SCREEN_UPDATE( aerfboot )
tilemap_set_scrollx(state->m_bg2_tilemap, 0, state->m_bg2scrollx + 172);
tilemap_set_scrolly(state->m_bg2_tilemap, 0, state->m_bg2scrolly + 2);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
tilemap_draw(bitmap, cliprect, state->m_bg1_tilemap, 0, 0);
tilemap_draw(bitmap, cliprect, state->m_bg2_tilemap, 0, 1);
@@ -1048,7 +1048,7 @@ SCREEN_UPDATE( aerfboo2 )
tilemap_set_scrollx(state->m_bg2_tilemap, 0, state->m_bg2scrollx - 7);
tilemap_set_scrolly(state->m_bg2_tilemap, 0, state->m_bg2scrolly + 2);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
tilemap_draw(bitmap, cliprect, state->m_bg1_tilemap, 0, 0);
tilemap_draw(bitmap, cliprect, state->m_bg2_tilemap, 0, 1);
@@ -1072,7 +1072,7 @@ SCREEN_UPDATE( wbbc97 )
tilemap_set_scrollx(state->m_bg1_tilemap, (i + scrolly) & 0xff, state->m_rasterram[i]);
tilemap_set_scrolly(state->m_bg1_tilemap, 0, scrolly);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
if (state->m_wbbc97_bitmap_enable)
{
diff --git a/src/mame/video/ajax.c b/src/mame/video/ajax.c
index fdf34bc18d7..2a0aad3a1b4 100644
--- a/src/mame/video/ajax.c
+++ b/src/mame/video/ajax.c
@@ -93,9 +93,9 @@ SCREEN_UPDATE( ajax )
k052109_tilemap_update(state->m_k052109);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
k052109_tilemap_draw(state->m_k052109, bitmap, cliprect, 2, 0, 1);
if (state->m_priority)
{
diff --git a/src/mame/video/aliens.c b/src/mame/video/aliens.c
index f77dbda2038..0b63e625d2b 100644
--- a/src/mame/video/aliens.c
+++ b/src/mame/video/aliens.c
@@ -81,8 +81,8 @@ SCREEN_UPDATE( aliens )
k052109_tilemap_update(state->m_k052109);
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(state->m_layer_colorbase[1] * 16, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(state->m_layer_colorbase[1] * 16, cliprect);
k052109_tilemap_draw(state->m_k052109, bitmap, cliprect, 1, 0, 1);
k052109_tilemap_draw(state->m_k052109, bitmap, cliprect, 2, 0, 2);
diff --git a/src/mame/video/alpha68k.c b/src/mame/video/alpha68k.c
index fa8ed2dd2f2..50cc9e0dc0d 100644
--- a/src/mame/video/alpha68k.c
+++ b/src/mame/video/alpha68k.c
@@ -75,7 +75,7 @@ VIDEO_START( alpha68k )
/******************************************************************************/
//AT
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int j, int s, int e )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int j, int s, int e )
{
alpha68k_state *state = machine.driver_data<alpha68k_state>();
UINT16 *spriteram = state->m_spriteram;
@@ -138,7 +138,7 @@ SCREEN_UPDATE( alpha68k_II )
state->m_last_bank = state->m_bank_base;
tilemap_set_flip_all(screen.machine(), state->m_flipscreen ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0);
- bitmap->fill(2047, cliprect);
+ bitmap.fill(2047, cliprect);
//AT
draw_sprites(screen.machine(), bitmap, cliprect, 0, 0x07c0, 0x0800);
draw_sprites(screen.machine(), bitmap, cliprect, 1, 0x0000, 0x0800);
@@ -221,7 +221,7 @@ WRITE16_HANDLER( alpha68k_V_video_control_w )
}
}
-static void draw_sprites_V( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int j, int s, int e, int fx_mask, int fy_mask, int sprite_mask )
+static void draw_sprites_V( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int j, int s, int e, int fx_mask, int fy_mask, int sprite_mask )
{
alpha68k_state *state = machine.driver_data<alpha68k_state>();
UINT16 *spriteram = state->m_spriteram;
@@ -286,7 +286,7 @@ SCREEN_UPDATE( alpha68k_V )
state->m_last_bank = state->m_bank_base;
tilemap_set_flip_all(screen.machine(), state->m_flipscreen ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0);
- bitmap->fill(4095, cliprect);
+ bitmap.fill(4095, cliprect);
/* This appears to be correct priority */
if (state->m_microcontroller_id == 0x8814) /* Sky Adventure */
@@ -326,7 +326,7 @@ SCREEN_UPDATE( alpha68k_V_sb )
state->m_last_bank = state->m_bank_base;
tilemap_set_flip_all(screen.machine(), state->m_flipscreen ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0);
- bitmap->fill(4095, cliprect);
+ bitmap.fill(4095, cliprect);
/* This appears to be correct priority */
draw_sprites_V(screen.machine(), bitmap, cliprect, 0, 0x07c0, 0x0800, 0x4000, 0x8000, 0x3fff);
@@ -340,7 +340,7 @@ SCREEN_UPDATE( alpha68k_V_sb )
/******************************************************************************/
//AT
-static void draw_sprites_I( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int c, int d, int yshift )
+static void draw_sprites_I( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int c, int d, int yshift )
{
alpha68k_state *state = machine.driver_data<alpha68k_state>();
UINT16 *spriteram = state->m_spriteram;
@@ -373,7 +373,7 @@ SCREEN_UPDATE( alpha68k_I )
alpha68k_state *state = screen.machine().driver_data<alpha68k_state>();
int yshift = (state->m_microcontroller_id == 0x890a) ? 1 : 0; // The Next Space is 1 pixel off
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
/* This appears to be correct priority */
draw_sprites_I(screen.machine(), bitmap, cliprect, 2, 0x0800, yshift);
@@ -448,7 +448,7 @@ static void jongbou_video_banking(int *bank, int data)
*bank = (data >> 11 & 4) | (data >> 10 & 3);
}
-static void kyros_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int c, int d )
+static void kyros_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int c, int d )
{
alpha68k_state *state = machine.driver_data<alpha68k_state>();
UINT16 *spriteram = state->m_spriteram;
@@ -505,7 +505,7 @@ SCREEN_UPDATE( kyros )
{
alpha68k_state *state = screen.machine().driver_data<alpha68k_state>();
colortable_entry_set_value(screen.machine().colortable, 0x100, *state->m_videoram & 0xff);
- bitmap->fill(0x100, cliprect); //AT
+ bitmap.fill(0x100, cliprect); //AT
kyros_draw_sprites(screen.machine(), bitmap, cliprect, 2, 0x0800);
kyros_draw_sprites(screen.machine(), bitmap, cliprect, 3, 0x0c00);
@@ -515,7 +515,7 @@ SCREEN_UPDATE( kyros )
/******************************************************************************/
-static void sstingry_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int c, int d )
+static void sstingry_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int c, int d )
{
//AT
alpha68k_state *state = machine.driver_data<alpha68k_state>();
@@ -565,7 +565,7 @@ SCREEN_UPDATE( sstingry )
{
alpha68k_state *state = screen.machine().driver_data<alpha68k_state>();
colortable_entry_set_value(screen.machine().colortable, 0x100, *state->m_videoram & 0xff);
- bitmap->fill(0x100, cliprect); //AT
+ bitmap.fill(0x100, cliprect); //AT
sstingry_draw_sprites(screen.machine(), bitmap, cliprect, 2, 0x0800);
sstingry_draw_sprites(screen.machine(), bitmap, cliprect, 3, 0x0c00);
diff --git a/src/mame/video/ambush.c b/src/mame/video/ambush.c
index 315c0234bae..79644b6e680 100644
--- a/src/mame/video/ambush.c
+++ b/src/mame/video/ambush.c
@@ -47,7 +47,7 @@ PALETTE_INIT( ambush )
}
-static void draw_chars( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int priority )
+static void draw_chars( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int priority )
{
ambush_state *state = machine.driver_data<ambush_state>();
int offs, transpen;
@@ -92,7 +92,7 @@ SCREEN_UPDATE( ambush )
ambush_state *state = screen.machine().driver_data<ambush_state>();
int offs;
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
/* Draw the characters */
draw_chars(screen.machine(), bitmap, cliprect, 0x00);
diff --git a/src/mame/video/amiga.c b/src/mame/video/amiga.c
index 57bbb5a31b0..0e99466ab25 100644
--- a/src/mame/video/amiga.c
+++ b/src/mame/video/amiga.c
@@ -619,7 +619,7 @@ INLINE int update_ham(amiga_state *state, int newpix)
*
*************************************/
-void amiga_render_scanline(running_machine &machine, bitmap_t *bitmap, int scanline)
+void amiga_render_scanline(running_machine &machine, bitmap_t &bitmap, int scanline)
{
amiga_state *state = machine.driver_data<amiga_state>();
UINT16 save_color0 = CUSTOM_REG(REG_COLOR00);
@@ -652,8 +652,8 @@ void amiga_render_scanline(running_machine &machine, bitmap_t *bitmap, int scanl
update_sprite_dma(state, scanline);
/* start of a new line, signal we're not done with it and fill up vars */
- if (bitmap != NULL)
- dst = &bitmap->pix16(scanline);
+ if (bitmap.valid())
+ dst = &bitmap.pix16(scanline);
/* all sprites off at the start of the line */
memset(state->m_sprite_remain, 0, sizeof(state->m_sprite_remain));
diff --git a/src/mame/video/amigaaga.c b/src/mame/video/amigaaga.c
index 85d7252ae19..ab7052ff0f9 100644
--- a/src/mame/video/amigaaga.c
+++ b/src/mame/video/amigaaga.c
@@ -444,7 +444,7 @@ INLINE int update_ham(amiga_state *state, int newpix)
*
*************************************/
-void amiga_aga_render_scanline(running_machine &machine, bitmap_t *bitmap, int scanline)
+void amiga_aga_render_scanline(running_machine &machine, bitmap_t &bitmap, int scanline)
{
amiga_state *state = machine.driver_data<amiga_state>();
UINT16 save_color0 = CUSTOM_REG(REG_COLOR00);
@@ -478,8 +478,8 @@ void amiga_aga_render_scanline(running_machine &machine, bitmap_t *bitmap, int s
update_sprite_dma(state, scanline);
/* start of a new line, signal we're not done with it and fill up vars */
- if (bitmap != NULL)
- dst = &bitmap->pix32(scanline);
+ if (bitmap.valid())
+ dst = &bitmap.pix32(scanline);
/* all sprites off at the start of the line */
memset(state->m_sprite_remain, 0, sizeof(state->m_sprite_remain));
diff --git a/src/mame/video/amspdwy.c b/src/mame/video/amspdwy.c
index c46d063a9b6..47e5db217fb 100644
--- a/src/mame/video/amspdwy.c
+++ b/src/mame/video/amspdwy.c
@@ -103,7 +103,7 @@ Offset: Format: Value:
***************************************************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
amspdwy_state *state = machine.driver_data<amspdwy_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/angelkds.c b/src/mame/video/angelkds.c
index c646b4ee389..1d6aeb606ee 100644
--- a/src/mame/video/angelkds.c
+++ b/src/mame/video/angelkds.c
@@ -140,7 +140,7 @@ a split down the middle of the screen
*/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int enable_n)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int enable_n)
{
angelkds_state *state = machine.driver_data<angelkds_state>();
const UINT8 *source = state->m_spriteram + 0x100 - 4;
@@ -278,7 +278,7 @@ SCREEN_UPDATE( angelkds )
const rectangle &visarea = screen.visible_area();
rectangle clip;
- bitmap->fill(0x3f, cliprect); /* is there a register controling the colour?, we currently use the last colour of the tx palette */
+ bitmap.fill(0x3f, cliprect); /* is there a register controling the colour?, we currently use the last colour of the tx palette */
/* draw top of screen */
clip.min_x = 8*0;
diff --git a/src/mame/video/appoooh.c b/src/mame/video/appoooh.c
index f950e2ef1c2..49c24fd2f32 100644
--- a/src/mame/video/appoooh.c
+++ b/src/mame/video/appoooh.c
@@ -207,7 +207,7 @@ WRITE8_HANDLER( appoooh_out_w )
/* bit 7 unknown (used) */
}
-static void appoooh_draw_sprites( bitmap_t *dest_bmp, const rectangle &cliprect, const gfx_element *gfx, UINT8 *sprite )
+static void appoooh_draw_sprites( bitmap_t &dest_bmp, const rectangle &cliprect, const gfx_element *gfx, UINT8 *sprite )
{
int offs;
int flipy = flip_screen_get(gfx->machine());
@@ -238,7 +238,7 @@ static void appoooh_draw_sprites( bitmap_t *dest_bmp, const rectangle &cliprect,
}
}
-static void robowres_draw_sprites( bitmap_t *dest_bmp, const rectangle &cliprect, const gfx_element *gfx, UINT8 *sprite )
+static void robowres_draw_sprites( bitmap_t &dest_bmp, const rectangle &cliprect, const gfx_element *gfx, UINT8 *sprite )
{
int offs;
int flipy = flip_screen_get(gfx->machine());
diff --git a/src/mame/video/aquarium.c b/src/mame/video/aquarium.c
index 27ae8875cbc..7d8ce558c2b 100644
--- a/src/mame/video/aquarium.c
+++ b/src/mame/video/aquarium.c
@@ -4,7 +4,7 @@
#include "includes/aquarium.h"
/* gcpinbal.c modified */
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int y_offs )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int y_offs )
{
aquarium_state *state = machine.driver_data<aquarium_state>();
int offs, chain_pos;
diff --git a/src/mame/video/arcadecl.c b/src/mame/video/arcadecl.c
index b64bbfab7e4..32ca2da2bbe 100644
--- a/src/mame/video/arcadecl.c
+++ b/src/mame/video/arcadecl.c
@@ -13,7 +13,7 @@
#include "includes/arcadecl.h"
-static void arcadecl_bitmap_render(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect);
+static void arcadecl_bitmap_render(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect);
/*************************************
*
@@ -97,7 +97,7 @@ SCREEN_UPDATE( arcadecl )
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
UINT16 *mo = &mobitmap->pix16(y);
- UINT16 *pf = &bitmap->pix16(y);
+ UINT16 *pf = &bitmap.pix16(y);
for (x = rectlist.rect->min_x; x <= rectlist.rect->max_x; x++)
if (mo[x])
{
@@ -121,7 +121,7 @@ SCREEN_UPDATE( arcadecl )
*
*************************************/
-static void arcadecl_bitmap_render(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void arcadecl_bitmap_render(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
arcadecl_state *state = machine.driver_data<arcadecl_state>();
int x, y;
@@ -130,7 +130,7 @@ static void arcadecl_bitmap_render(running_machine &machine, bitmap_t *bitmap, c
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
const UINT16 *src = &state->m_bitmap[256 * y];
- UINT16 *dst = &bitmap->pix16(y);
+ UINT16 *dst = &bitmap.pix16(y);
/* regenerate the line */
for (x = cliprect.min_x & ~1; x <= cliprect.max_x; x += 2)
diff --git a/src/mame/video/archimds.c b/src/mame/video/archimds.c
index d3dd1bdd025..0a80b23a5e7 100644
--- a/src/mame/video/archimds.c
+++ b/src/mame/video/archimds.c
@@ -20,7 +20,7 @@ SCREEN_UPDATE( archimds_vidc )
const UINT8 x_step[4] = { 5, 7, 11, 19 };
/* border color */
- bitmap->fill(screen.machine().pens[0x10], cliprect);
+ bitmap.fill(screen.machine().pens[0x10], cliprect);
/* define X display area through BPP mode register */
calc_dxs = (vidc_regs[VIDC_HDSR]*2)+x_step[vidc_bpp_mode & 3];
@@ -67,18 +67,18 @@ SCREEN_UPDATE( archimds_vidc )
if ((res_x) >= 0 &&
(res_y) >= 0 &&
(res_x) <= screen.visible_area().max_x && (res_y) <= screen.visible_area().max_y && (res_x) <= xend && (res_y) <= yend)
- bitmap->pix32(res_y, res_x) = screen.machine().pens[(pen>>(xi))&0x1];
+ bitmap.pix32(res_y, res_x) = screen.machine().pens[(pen>>(xi))&0x1];
if ((res_x) >= 0 &&
(res_y) >= 0 &&
(res_x) <= screen.visible_area().max_x && (res_y+1) <= screen.visible_area().max_y && (res_x) <= xend && (res_y+1) <= yend)
- bitmap->pix32(res_y+1, res_x) = screen.machine().pens[(pen>>(xi))&0x1];
+ bitmap.pix32(res_y+1, res_x) = screen.machine().pens[(pen>>(xi))&0x1];
}
else
{
if ((res_x) >= 0 &&
(res_y) >= 0 &&
(res_x) <= screen.visible_area().max_x && (res_y) <= screen.visible_area().max_y && (res_x) <= xend && (res_y) <= yend)
- bitmap->pix32(res_y, res_x) = screen.machine().pens[(pen>>(xi))&0x1];
+ bitmap.pix32(res_y, res_x) = screen.machine().pens[(pen>>(xi))&0x1];
}
}
@@ -103,18 +103,18 @@ SCREEN_UPDATE( archimds_vidc )
if ((res_x) >= 0 &&
(res_y) >= 0 &&
(res_x) <= screen.visible_area().max_x && (res_y) <= screen.visible_area().max_y && (res_x) <= xend && (res_y) <= yend)
- bitmap->pix32(res_y, res_x) = screen.machine().pens[(pen&0xff)+0x100];
+ bitmap.pix32(res_y, res_x) = screen.machine().pens[(pen&0xff)+0x100];
if ((res_x) >= 0 &&
(res_y) >= 0 &&
(res_x) <= screen.visible_area().max_x && (res_y+1) <= screen.visible_area().max_y && (res_x) <= xend && (res_y+1) <= yend)
- bitmap->pix32(res_y+1, res_x) = screen.machine().pens[(pen&0xff)+0x100];
+ bitmap.pix32(res_y+1, res_x) = screen.machine().pens[(pen&0xff)+0x100];
}
else
{
if ((res_x) >= 0 &&
(res_y) >= 0 &&
(res_x) <= screen.visible_area().max_x && (res_y) <= screen.visible_area().max_y && (res_x) <= xend && (res_y) <= yend)
- bitmap->pix32(res_y, res_x) = screen.machine().pens[(pen&0xff)+0x100];
+ bitmap.pix32(res_y, res_x) = screen.machine().pens[(pen&0xff)+0x100];
}
count++;
diff --git a/src/mame/video/argus.c b/src/mame/video/argus.c
index 9e029063d5e..6966a91619c 100644
--- a/src/mame/video/argus.c
+++ b/src/mame/video/argus.c
@@ -851,7 +851,7 @@ static void argus_bg0_scroll_handle(running_machine &machine)
}
}
-static void argus_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int priority)
+static void argus_draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int priority)
{
argus_state *state = machine.driver_data<argus_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -894,7 +894,7 @@ static void argus_draw_sprites(running_machine &machine, bitmap_t *bitmap, const
}
#if 1
-static void valtric_draw_mosaic(screen_device &screen, bitmap_t *bitmap, const rectangle &cliprect)
+static void valtric_draw_mosaic(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect)
{
argus_state *state = screen.machine().driver_data<argus_state>();
@@ -909,7 +909,7 @@ static void valtric_draw_mosaic(screen_device &screen, bitmap_t *bitmap, const r
tilemap_draw(bitmap, cliprect, state->m_bg1_tilemap, 0, 0);
else
{
- tilemap_draw(state->m_mosaicbitmap, cliprect, state->m_bg1_tilemap, 0, 0);
+ tilemap_draw(*state->m_mosaicbitmap, cliprect, state->m_bg1_tilemap, 0, 0);
{
int step=state->m_mosaic;
UINT32 *dest;
@@ -934,7 +934,7 @@ static void valtric_draw_mosaic(screen_device &screen, bitmap_t *bitmap, const r
{
if (xx+x < width && yy+y<height)
{
- dest=&bitmap->pix32(y+yy, x+xx);
+ dest=&bitmap.pix32(y+yy, x+xx);
*dest=c;
}
}
@@ -943,7 +943,7 @@ static void valtric_draw_mosaic(screen_device &screen, bitmap_t *bitmap, const r
}
}
#else
-static void valtric_draw_mosaic(screen_device &screen, bitmap_t *bitmap, const rectangle &cliprect)
+static void valtric_draw_mosaic(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect)
{
argus_state *state = screen.machine().driver_data<argus_state>();
int step = 0x10 - (state->m_valtric_mosaic & 0x0f);
@@ -974,7 +974,7 @@ static void valtric_draw_mosaic(screen_device &screen, bitmap_t *bitmap, const r
{
if (xx+x < width && yy+y < height)
{
- dest = &bitmap->pix32(y+yy, x+xx);
+ dest = &bitmap.pix32(y+yy, x+xx);
*dest = c;
}
}
@@ -984,7 +984,7 @@ static void valtric_draw_mosaic(screen_device &screen, bitmap_t *bitmap, const r
}
#endif
-static void valtric_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void valtric_draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
argus_state *state = machine.driver_data<argus_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -1024,7 +1024,7 @@ static void valtric_draw_sprites(running_machine &machine, bitmap_t *bitmap, con
}
}
-static void butasan_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void butasan_draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
argus_state *state = machine.driver_data<argus_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -1214,7 +1214,7 @@ SCREEN_UPDATE( valtric )
if (state->m_bg_status & 1) /* Backgound enable */
valtric_draw_mosaic(screen, bitmap, cliprect);
else
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
valtric_draw_sprites(screen.machine(), bitmap, cliprect);
tilemap_draw(bitmap, cliprect, state->m_tx_tilemap, 0, 0);
return 0;
@@ -1228,7 +1228,7 @@ SCREEN_UPDATE( butasan )
if (state->m_bg_status & 1) /* Backgound enable */
tilemap_draw(bitmap, cliprect, state->m_bg0_tilemap, 0, 0);
else
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
if (state->m_butasan_bg1_status & 1) tilemap_draw(bitmap, cliprect, state->m_bg1_tilemap, 0, 0);
butasan_draw_sprites(screen.machine(), bitmap, cliprect);
tilemap_draw(bitmap, cliprect, state->m_tx_tilemap, 0, 0);
diff --git a/src/mame/video/arkanoid.c b/src/mame/video/arkanoid.c
index dbdbcc427ce..0fc45b27397 100644
--- a/src/mame/video/arkanoid.c
+++ b/src/mame/video/arkanoid.c
@@ -170,7 +170,7 @@ VIDEO_START( arkanoid )
state->m_bg_tilemap = tilemap_create(machine, get_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
arkanoid_state *state = machine.driver_data<arkanoid_state>();
int offs;
diff --git a/src/mame/video/armedf.c b/src/mame/video/armedf.c
index 0d18ccdd2c1..a1146ca7d4f 100644
--- a/src/mame/video/armedf.c
+++ b/src/mame/video/armedf.c
@@ -277,7 +277,7 @@ WRITE16_HANDLER( armedf_bg_scrolly_w )
***************************************************************************/
/* custom code to handle color cycling effect, handled by m_spr_pal_clut */
-void armedf_drawgfx(running_machine &machine, bitmap_t *dest_bmp,const rectangle &clip,const gfx_element *gfx,
+void armedf_drawgfx(running_machine &machine, bitmap_t &dest_bmp,const rectangle &clip,const gfx_element *gfx,
UINT32 code,UINT32 color, UINT32 clut,int flipx,int flipy,int offsx,int offsy,
int transparent_color)
{
@@ -331,7 +331,7 @@ void armedf_drawgfx(running_machine &machine, bitmap_t *dest_bmp,const rectangle
for (y = sy; y < ey; y++)
{
const UINT8 *source = source_base + y_index*gfx->line_modulo;
- UINT16 *dest = &dest_bmp->pix16(y);
+ UINT16 *dest = &dest_bmp.pix16(y);
int x_index = x_index_base;
for (x = sx; x < ex; x++)
{
@@ -348,7 +348,7 @@ void armedf_drawgfx(running_machine &machine, bitmap_t *dest_bmp,const rectangle
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int priority )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int priority )
{
UINT16 *buffered_spriteram = machine.generic.buffered_spriteram.u16;
armedf_state *state = machine.driver_data<armedf_state>();
@@ -408,7 +408,7 @@ SCREEN_UPDATE( armedf )
}
- bitmap->fill(0xff, cliprect );
+ bitmap.fill(0xff, cliprect );
tilemap_draw(bitmap, cliprect, state->m_tx_tilemap, TILEMAP_DRAW_CATEGORY(1), 0);
diff --git a/src/mame/video/artmagic.c b/src/mame/video/artmagic.c
index b19114368df..28fe7a322ed 100644
--- a/src/mame/video/artmagic.c
+++ b/src/mame/video/artmagic.c
@@ -339,12 +339,12 @@ WRITE16_HANDLER( artmagic_blitter_w )
*
*************************************/
-void artmagic_scanline(screen_device &screen, bitmap_t *bitmap, int scanline, const tms34010_display_params *params)
+void artmagic_scanline(screen_device &screen, bitmap_t &bitmap, int scanline, const tms34010_display_params *params)
{
artmagic_state *state = screen.machine().driver_data<artmagic_state>();
offs_t offset = (params->rowaddr << 12) & 0x7ff000;
UINT16 *vram = address_to_vram(state, &offset);
- UINT32 *dest = &bitmap->pix32(scanline);
+ UINT32 *dest = &bitmap.pix32(scanline);
const rgb_t *pens = tlc34076_get_pens(screen.machine().device("tlc34076"));
int coladdr = params->coladdr << 1;
int x;
diff --git a/src/mame/video/asterix.c b/src/mame/video/asterix.c
index 260abf5aa3f..74b5467bc3c 100644
--- a/src/mame/video/asterix.c
+++ b/src/mame/video/asterix.c
@@ -96,8 +96,8 @@ SCREEN_UPDATE( asterix )
konami_sortlayers3(layer, state->m_layerpri);
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(0, cliprect);
k056832_tilemap_draw(state->m_k056832, bitmap, cliprect, layer[0], K056832_DRAW_FLAG_MIRROR, 1);
k056832_tilemap_draw(state->m_k056832, bitmap, cliprect, layer[1], K056832_DRAW_FLAG_MIRROR, 2);
diff --git a/src/mame/video/astrocde.c b/src/mame/video/astrocde.c
index c9fdd722c7f..4e74f1b54ac 100644
--- a/src/mame/video/astrocde.c
+++ b/src/mame/video/astrocde.c
@@ -263,7 +263,7 @@ SCREEN_UPDATE( astrocde )
/* iterate over scanlines */
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
- UINT16 *dest = &bitmap->pix16(y);
+ UINT16 *dest = &bitmap.pix16(y);
int effy = mame_vpos_to_astrocade_vpos(y);
UINT16 offset = (effy / xystep) * (80 / xystep);
UINT32 sparkleoffs = 0, staroffs = 0;
@@ -339,7 +339,7 @@ SCREEN_UPDATE( profpac )
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
int effy = mame_vpos_to_astrocade_vpos(y);
- UINT16 *dest = &bitmap->pix16(y);
+ UINT16 *dest = &bitmap.pix16(y);
UINT16 offset = state->m_profpac_vispage * 0x4000 + effy * 80;
int x;
diff --git a/src/mame/video/asuka.c b/src/mame/video/asuka.c
index 608291cb439..9bc81c8683b 100644
--- a/src/mame/video/asuka.c
+++ b/src/mame/video/asuka.c
@@ -30,10 +30,10 @@ SCREEN_UPDATE( asuka )
layer[1] = layer[0] ^ 1;
layer[2] = 2;
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
/* Ensure screen blanked even when bottom layer not drawn due to disable bit */
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
tc0100scn_tilemap_draw(state->m_tc0100scn, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 1);
tc0100scn_tilemap_draw(state->m_tc0100scn, bitmap, cliprect, layer[1], 0, 2);
@@ -56,10 +56,10 @@ SCREEN_UPDATE( bonzeadv )
layer[1] = layer[0] ^ 1;
layer[2] = 2;
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
/* Ensure screen blanked even when bottom layer not drawn due to disable bit */
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
tc0100scn_tilemap_draw(state->m_tc0100scn, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 1);
tc0100scn_tilemap_draw(state->m_tc0100scn, bitmap, cliprect, layer[1], 0, 2);
diff --git a/src/mame/video/atari.c b/src/mame/video/atari.c
index 96a5789f565..17a07ea18f8 100644
--- a/src/mame/video/atari.c
+++ b/src/mame/video/atari.c
@@ -1043,7 +1043,7 @@ static void antic_linerefresh(running_machine &machine)
dst[2] = antic.color_lookup[PBK] | antic.color_lookup[PBK] << 16;
dst[3] = antic.color_lookup[PBK] | antic.color_lookup[PBK] << 16;
- draw_scanline8(machine.generic.tmpbitmap, 12, y, MIN(machine.generic.tmpbitmap->width() - 12, sizeof(scanline)), (const UINT8 *) scanline, NULL);
+ draw_scanline8(*machine.generic.tmpbitmap, 12, y, MIN(machine.generic.tmpbitmap->width() - 12, sizeof(scanline)), (const UINT8 *) scanline, NULL);
}
static int cycle(running_machine &machine)
diff --git a/src/mame/video/atarifb.c b/src/mame/video/atarifb.c
index ab343eb6090..660d0886942 100644
--- a/src/mame/video/atarifb.c
+++ b/src/mame/video/atarifb.c
@@ -104,7 +104,7 @@ VIDEO_START( atarifb )
-static void draw_playfield_and_alpha( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int playfield_x_offset, int playfield_y_offset )
+static void draw_playfield_and_alpha( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int playfield_x_offset, int playfield_y_offset )
{
atarifb_state *state = machine.driver_data<atarifb_state>();
const rectangle bigfield_area(4 * 8, 34 * 8 - 1, 0 * 8, 32 * 8 - 1);
@@ -121,7 +121,7 @@ static void draw_playfield_and_alpha( running_machine &machine, bitmap_t *bitmap
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int gfx, int is_soccer )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int gfx, int is_soccer )
{
atarifb_state *state = machine.driver_data<atarifb_state>();
const rectangle bigfield_area(4 * 8, 34 * 8 - 1, 0 * 8, 32 * 8 - 1);
diff --git a/src/mame/video/atarig1.c b/src/mame/video/atarig1.c
index 05a74e53d92..d7d34335ad1 100644
--- a/src/mame/video/atarig1.c
+++ b/src/mame/video/atarig1.c
@@ -159,7 +159,7 @@ SCREEN_UPDATE( atarig1 )
tilemap_draw(bitmap, cliprect, state->m_playfield_tilemap, 0, 0);
/* copy the motion objects on top */
- copybitmap_trans(bitmap, atarirle_get_vram(state->m_rle, 0), 0, 0, 0, 0, cliprect, 0);
+ copybitmap_trans(bitmap, *atarirle_get_vram(state->m_rle, 0), 0, 0, 0, 0, cliprect, 0);
/* add the alpha on top */
tilemap_draw(bitmap, cliprect, state->m_alpha_tilemap, 0, 0);
diff --git a/src/mame/video/atarig42.c b/src/mame/video/atarig42.c
index 516f6512a12..997ad1169ea 100644
--- a/src/mame/video/atarig42.c
+++ b/src/mame/video/atarig42.c
@@ -183,10 +183,10 @@ void atarig42_scanline_update(screen_device &screen, int scanline)
SCREEN_UPDATE( atarig42 )
{
atarig42_state *state = screen.machine().driver_data<atarig42_state>();
- bitmap_t *priority_bitmap = screen.machine().priority_bitmap;
+ bitmap_t &priority_bitmap = screen.machine().priority_bitmap;
/* draw the playfield */
- priority_bitmap->fill(0, cliprect);
+ priority_bitmap.fill(0, cliprect);
tilemap_draw(bitmap, cliprect, state->m_playfield_tilemap, 0, 0);
tilemap_draw(bitmap, cliprect, state->m_playfield_tilemap, 1, 1);
tilemap_draw(bitmap, cliprect, state->m_playfield_tilemap, 2, 2);
@@ -208,9 +208,9 @@ SCREEN_UPDATE( atarig42 )
/* now blend with the playfield */
for (y = top; y < bottom; y++)
{
- UINT16 *pf = &bitmap->pix16(y);
+ UINT16 *pf = &bitmap.pix16(y);
UINT16 *mo = &mo_bitmap->pix16(y);
- UINT8 *pri = &priority_bitmap->pix8(y);
+ UINT8 *pri = &priority_bitmap.pix8(y);
for (x = left; x < right; x++)
if (mo[x])
{
diff --git a/src/mame/video/atarigt.c b/src/mame/video/atarigt.c
index 9ed647a5aba..56110bb9b23 100644
--- a/src/mame/video/atarigt.c
+++ b/src/mame/video/atarigt.c
@@ -517,10 +517,10 @@ SCREEN_UPDATE( atarigt )
int x, y;
/* draw the playfield */
- tilemap_draw(state->m_pf_bitmap, cliprect, state->m_playfield_tilemap, 0, 0);
+ tilemap_draw(*state->m_pf_bitmap, cliprect, state->m_playfield_tilemap, 0, 0);
/* draw the alpha layer */
- tilemap_draw(state->m_an_bitmap, cliprect, state->m_alpha_tilemap, 0, 0);
+ tilemap_draw(*state->m_an_bitmap, cliprect, state->m_alpha_tilemap, 0, 0);
/* cache pointers */
color_latch = state->m_colorram[0x30000/2];
@@ -535,7 +535,7 @@ SCREEN_UPDATE( atarigt )
UINT16 *pf = &state->m_pf_bitmap->pix16(y);
UINT16 *mo = &mo_bitmap->pix16(y);
UINT16 *tm = &tm_bitmap->pix16(y);
- UINT32 *dst = &bitmap->pix32(y);
+ UINT32 *dst = &bitmap.pix32(y);
/* Primal Rage: no TRAM, slightly different priorities */
if (state->m_is_primrage)
diff --git a/src/mame/video/atarigx2.c b/src/mame/video/atarigx2.c
index 63a4d84e39d..7fa38cb31c1 100644
--- a/src/mame/video/atarigx2.c
+++ b/src/mame/video/atarigx2.c
@@ -181,10 +181,10 @@ void atarigx2_scanline_update(screen_device &screen, int scanline)
SCREEN_UPDATE( atarigx2 )
{
atarigx2_state *state = screen.machine().driver_data<atarigx2_state>();
- bitmap_t *priority_bitmap = screen.machine().priority_bitmap;
+ bitmap_t &priority_bitmap = screen.machine().priority_bitmap;
/* draw the playfield */
- priority_bitmap->fill(0, cliprect);
+ priority_bitmap.fill(0, cliprect);
tilemap_draw(bitmap, cliprect, state->m_playfield_tilemap, 0, 0);
tilemap_draw(bitmap, cliprect, state->m_playfield_tilemap, 1, 1);
tilemap_draw(bitmap, cliprect, state->m_playfield_tilemap, 2, 2);
@@ -206,9 +206,9 @@ SCREEN_UPDATE( atarigx2 )
/* now blend with the playfield */
for (y = top; y < bottom; y++)
{
- UINT16 *pf = &bitmap->pix16(y);
+ UINT16 *pf = &bitmap.pix16(y);
UINT16 *mo = &mo_bitmap->pix16(y);
- UINT8 *pri = &priority_bitmap->pix8(y);
+ UINT8 *pri = &priority_bitmap.pix8(y);
for (x = left; x < right; x++)
if (mo[x] && (mo[x] >> ATARIRLE_PRIORITY_SHIFT) >= pri[x])
pf[x] = mo[x] & ATARIRLE_DATA_MASK;
diff --git a/src/mame/video/atarimo.c b/src/mame/video/atarimo.c
index 2128555ceec..3da77ae79ca 100644
--- a/src/mame/video/atarimo.c
+++ b/src/mame/video/atarimo.c
@@ -743,7 +743,7 @@ static int mo_render_object(atarimo_data *mo, const atarimo_entry *entry, const
{
int gfxindex = mo->gfxlookup[EXTRACT_DATA(entry, mo->gfxmask)];
const gfx_element *gfx = mo->gfxelement[gfxindex];
- bitmap_t *bitmap = mo->bitmap;
+ bitmap_t &bitmap = *mo->bitmap;
int x, y, sx, sy;
/* extract data from the various words */
@@ -1142,13 +1142,13 @@ WRITE16_HANDLER( atarimo_1_slipram_w )
or the end of line.
---------------------------------------------------------------*/
-void atarimo_mark_high_palette(bitmap_t *bitmap, UINT16 *pf, UINT16 *mo, int x, int y)
+void atarimo_mark_high_palette(bitmap_t &bitmap, UINT16 *pf, UINT16 *mo, int x, int y)
{
#define START_MARKER ((4 << ATARIMO_PRIORITY_SHIFT) | 2)
#define END_MARKER ((4 << ATARIMO_PRIORITY_SHIFT) | 4)
int offnext = 0;
- for ( ; x < bitmap->width(); x++)
+ for ( ; x < bitmap.width(); x++)
{
pf[x] |= 0x400;
if (offnext && (mo[x] & START_MARKER) != START_MARKER)
diff --git a/src/mame/video/atarimo.h b/src/mame/video/atarimo.h
index e4f81e73593..6a1b9cf4dc6 100644
--- a/src/mame/video/atarimo.h
+++ b/src/mame/video/atarimo.h
@@ -32,7 +32,7 @@
***************************************************************************/
/* callback for special processing */
-typedef int (*atarimo_special_func)(bitmap_t *bitmap, const rectangle &clip, int code, int color, int xpos, int ypos, rectangle *mobounds);
+typedef int (*atarimo_special_func)(bitmap_t &bitmap, const rectangle &clip, int code, int color, int xpos, int ypos, rectangle *mobounds);
/* description for a four-word mask */
typedef struct _atarimo_entry atarimo_entry;
@@ -127,7 +127,7 @@ WRITE16_HANDLER( atarimo_0_slipram_w );
WRITE16_HANDLER( atarimo_1_spriteram_w );
WRITE16_HANDLER( atarimo_1_slipram_w );
-void atarimo_mark_high_palette(bitmap_t *bitmap, UINT16 *pf, UINT16 *mo, int x, int y);
+void atarimo_mark_high_palette(bitmap_t &bitmap, UINT16 *pf, UINT16 *mo, int x, int y);
#endif
diff --git a/src/mame/video/atarirle.c b/src/mame/video/atarirle.c
index d181735b84e..820297390a5 100644
--- a/src/mame/video/atarirle.c
+++ b/src/mame/video/atarirle.c
@@ -131,12 +131,12 @@ static int count_objects(const UINT16 *base, int length);
static void prescan_rle(const atarirle_data *mo, int which);
static void sort_and_render(running_machine &machine, atarirle_data *mo);
static void compute_checksum(atarirle_data *mo);
-static void draw_rle(atarirle_data *mo, bitmap_t *bitmap, int code, int color, int hflip, int vflip,
+static void draw_rle(atarirle_data *mo, bitmap_t &bitmap, int code, int color, int hflip, int vflip,
int x, int y, int xscale, int yscale, const rectangle &clip);
-static void draw_rle_zoom(bitmap_t *bitmap, const atarirle_info *gfx,
+static void draw_rle_zoom(bitmap_t &bitmap, const atarirle_info *gfx,
UINT32 palette, int sx, int sy, int scalex, int scaley,
const rectangle &clip);
-static void draw_rle_zoom_hflip(bitmap_t *bitmap, const atarirle_info *gfx,
+static void draw_rle_zoom_hflip(bitmap_t &bitmap, const atarirle_info *gfx,
UINT32 palette, int sx, int sy, int scalex, int scaley,
const rectangle &clip);
@@ -832,9 +832,9 @@ if (count++ == atarirle_hilite_index)
/* render to one or both bitmaps */
if (which == 0)
- draw_rle(mo, bitmap1, code, color, hflip, 0, x, y, scale, scale, mo->cliprect);
+ draw_rle(mo, *bitmap1, code, color, hflip, 0, x, y, scale, scale, mo->cliprect);
if (bitmap2 && which != 0)
- draw_rle(mo, bitmap2, code, color, hflip, 0, x, y, scale, scale, mo->cliprect);
+ draw_rle(mo, *bitmap2, code, color, hflip, 0, x, y, scale, scale, mo->cliprect);
}
}
@@ -946,7 +946,7 @@ fprintf(stderr, " Sprite: c=%04X l=%04X h=%d X=%4d (o=%4d w=%3d) Y=%4d (o=%4d
object.
---------------------------------------------------------------*/
-void draw_rle(atarirle_data *mo, bitmap_t *bitmap, int code, int color, int hflip, int vflip,
+void draw_rle(atarirle_data *mo, bitmap_t &bitmap, int code, int color, int hflip, int vflip,
int x, int y, int xscale, int yscale, const rectangle &clip)
{
UINT32 palettebase = mo->palettebase + color;
@@ -973,7 +973,7 @@ void draw_rle(atarirle_data *mo, bitmap_t *bitmap, int code, int color, int hfli
return;
/* 16-bit case */
- assert(bitmap->bpp() == 16);
+ assert(bitmap.bpp() == 16);
if (!hflip)
draw_rle_zoom(bitmap, info, palettebase, x, y, xscale << 4, yscale << 4, clip);
else
@@ -987,7 +987,7 @@ void draw_rle(atarirle_data *mo, bitmap_t *bitmap, int code, int color, int hfli
bitmap.
---------------------------------------------------------------*/
-void draw_rle_zoom(bitmap_t *bitmap, const atarirle_info *gfx,
+void draw_rle_zoom(bitmap_t &bitmap, const atarirle_info *gfx,
UINT32 palette, int sx, int sy, int scalex, int scaley,
const rectangle &clip)
{
@@ -1043,7 +1043,7 @@ void draw_rle_zoom(bitmap_t *bitmap, const atarirle_info *gfx,
/* loop top to bottom */
for (y = sy; y <= ey; y++, sourcey += dy)
{
- UINT16 *dest = &bitmap->pix16(y, sx);
+ UINT16 *dest = &bitmap.pix16(y, sx);
int j, sourcex = dx / 2, rle_end = 0;
const UINT16 *base;
int entry_count;
@@ -1106,7 +1106,7 @@ void draw_rle_zoom(bitmap_t *bitmap, const atarirle_info *gfx,
/* clipped case */
else
{
- const UINT16 *end = &bitmap->pix16(y, ex);
+ const UINT16 *end = &bitmap.pix16(y, ex);
int to_be_skipped = pixels_to_skip;
/* decode the pixels */
@@ -1177,7 +1177,7 @@ void draw_rle_zoom(bitmap_t *bitmap, const atarirle_info *gfx,
16-bit bitmap with horizontal flip.
---------------------------------------------------------------*/
-void draw_rle_zoom_hflip(bitmap_t *bitmap, const atarirle_info *gfx,
+void draw_rle_zoom_hflip(bitmap_t &bitmap, const atarirle_info *gfx,
UINT32 palette, int sx, int sy, int scalex, int scaley,
const rectangle &clip)
{
@@ -1232,7 +1232,7 @@ void draw_rle_zoom_hflip(bitmap_t *bitmap, const atarirle_info *gfx,
/* loop top to bottom */
for (y = sy; y <= ey; y++, sourcey += dy)
{
- UINT16 *dest = &bitmap->pix16(y, ex);
+ UINT16 *dest = &bitmap.pix16(y, ex);
int j, sourcex = dx / 2, rle_end = 0;
const UINT16 *base;
int entry_count;
@@ -1295,7 +1295,7 @@ void draw_rle_zoom_hflip(bitmap_t *bitmap, const atarirle_info *gfx,
/* clipped case */
else
{
- const UINT16 *start = &bitmap->pix16(y, sx);
+ const UINT16 *start = &bitmap.pix16(y, sx);
int to_be_skipped = pixels_to_skip;
/* decode the pixels */
diff --git a/src/mame/video/atarisy1.c b/src/mame/video/atarisy1.c
index 125f991fd51..8a2b71fea2a 100644
--- a/src/mame/video/atarisy1.c
+++ b/src/mame/video/atarisy1.c
@@ -516,7 +516,7 @@ SCREEN_UPDATE( atarisy1 )
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
UINT16 *mo = &mobitmap->pix16(y);
- UINT16 *pf = &bitmap->pix16(y);
+ UINT16 *pf = &bitmap.pix16(y);
for (x = rectlist.rect->min_x; x <= rectlist.rect->max_x; x++)
if (mo[x])
{
diff --git a/src/mame/video/atarisy2.c b/src/mame/video/atarisy2.c
index 28aec51f652..d6d29e93e29 100644
--- a/src/mame/video/atarisy2.c
+++ b/src/mame/video/atarisy2.c
@@ -321,13 +321,13 @@ WRITE16_HANDLER( atarisy2_videoram_w )
SCREEN_UPDATE( atarisy2 )
{
atarisy2_state *state = screen.machine().driver_data<atarisy2_state>();
- bitmap_t *priority_bitmap = screen.machine().priority_bitmap;
+ bitmap_t &priority_bitmap = screen.machine().priority_bitmap;
atarimo_rect_list rectlist;
bitmap_t *mobitmap;
int x, y, r;
/* draw the playfield */
- priority_bitmap->fill(0, cliprect);
+ priority_bitmap.fill(0, cliprect);
tilemap_draw(bitmap, cliprect, state->m_playfield_tilemap, 0, 0);
tilemap_draw(bitmap, cliprect, state->m_playfield_tilemap, 1, 1);
tilemap_draw(bitmap, cliprect, state->m_playfield_tilemap, 2, 2);
@@ -339,8 +339,8 @@ SCREEN_UPDATE( atarisy2 )
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
UINT16 *mo = &mobitmap->pix16(y);
- UINT16 *pf = &bitmap->pix16(y);
- UINT8 *pri = &priority_bitmap->pix8(y);
+ UINT16 *pf = &bitmap.pix16(y);
+ UINT8 *pri = &priority_bitmap.pix8(y);
for (x = rectlist.rect->min_x; x <= rectlist.rect->max_x; x++)
if (mo[x] != 0x0f)
{
diff --git a/src/mame/video/badlands.c b/src/mame/video/badlands.c
index 0b5a9d860a8..2a74bf530eb 100644
--- a/src/mame/video/badlands.c
+++ b/src/mame/video/badlands.c
@@ -127,7 +127,7 @@ SCREEN_UPDATE( badlands )
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
UINT16 *mo = &mobitmap->pix16(y);
- UINT16 *pf = &bitmap->pix16(y);
+ UINT16 *pf = &bitmap.pix16(y);
for (x = rectlist.rect->min_x; x <= rectlist.rect->max_x; x++)
if (mo[x])
{
diff --git a/src/mame/video/bagman.c b/src/mame/video/bagman.c
index dffddb18dc3..329b3ff202f 100644
--- a/src/mame/video/bagman.c
+++ b/src/mame/video/bagman.c
@@ -111,7 +111,7 @@ VIDEO_START( bagman )
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
bagman_state *state = machine.driver_data<bagman_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -127,12 +127,12 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const recta
flipy = spriteram[offs] & 0x80;
if (flip_screen_x_get(machine))
{
- sx = bitmap->width() - sx - 15;
+ sx = bitmap.width() - sx - 15;
flipx = !flipx;
}
if (flip_screen_y_get(machine))
{
- sy = bitmap->height() - sy - 15;
+ sy = bitmap.height() - sy - 15;
flipy = !flipy;
}
@@ -149,7 +149,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const recta
SCREEN_UPDATE( bagman )
{
bagman_state *state = screen.machine().driver_data<bagman_state>();
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
if (*state->m_video_enable == 0)
return 0;
diff --git a/src/mame/video/balsente.c b/src/mame/video/balsente.c
index 8f20e45f046..b05a1e864ad 100644
--- a/src/mame/video/balsente.c
+++ b/src/mame/video/balsente.c
@@ -126,7 +126,7 @@ WRITE8_HANDLER( shrike_sprite_select_w )
*
*************************************/
-static void draw_one_sprite(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, UINT8 *sprite)
+static void draw_one_sprite(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, UINT8 *sprite)
{
balsente_state *state = machine.driver_data<balsente_state>();
int flags = sprite[0];
@@ -161,12 +161,12 @@ static void draw_one_sprite(running_machine &machine, bitmap_t *bitmap, const re
/* left pixel, combine with the background */
if (left && currx >= 0 && currx < 256)
- bitmap->pix16(ypos, currx) = pens[left | old[0]];
+ bitmap.pix16(ypos, currx) = pens[left | old[0]];
currx++;
/* right pixel, combine with the background */
if (right && currx >= 0 && currx < 256)
- bitmap->pix16(ypos, currx) = pens[right | old[1]];
+ bitmap.pix16(ypos, currx) = pens[right | old[1]];
currx++;
}
}
@@ -185,12 +185,12 @@ static void draw_one_sprite(running_machine &machine, bitmap_t *bitmap, const re
/* left pixel, combine with the background */
if (left && currx >= 0 && currx < 256)
- bitmap->pix16(ypos, currx) = pens[left | old[0]];
+ bitmap.pix16(ypos, currx) = pens[left | old[0]];
currx++;
/* right pixel, combine with the background */
if (right && currx >= 0 && currx < 256)
- bitmap->pix16(ypos, currx) = pens[right | old[1]];
+ bitmap.pix16(ypos, currx) = pens[right | old[1]];
currx++;
}
src += 4;
diff --git a/src/mame/video/baraduke.c b/src/mame/video/baraduke.c
index 15fffce4ecb..b22b26e0603 100644
--- a/src/mame/video/baraduke.c
+++ b/src/mame/video/baraduke.c
@@ -217,7 +217,7 @@ WRITE8_HANDLER( baraduke_spriteram_w )
***************************************************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int sprite_priority)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int sprite_priority)
{
baraduke_state *state = machine.driver_data<baraduke_state>();
UINT8 *spriteram = state->m_spriteram + 0x1800;
diff --git a/src/mame/video/batman.c b/src/mame/video/batman.c
index 945effafec0..543312c2666 100644
--- a/src/mame/video/batman.c
+++ b/src/mame/video/batman.c
@@ -197,13 +197,13 @@ void batman_scanline_update(screen_device &screen, int scanline)
SCREEN_UPDATE( batman )
{
batman_state *state = screen.machine().driver_data<batman_state>();
- bitmap_t *priority_bitmap = screen.machine().priority_bitmap;
+ bitmap_t &priority_bitmap = screen.machine().priority_bitmap;
atarimo_rect_list rectlist;
bitmap_t *mobitmap;
int x, y, r;
/* draw the playfield */
- priority_bitmap->fill(0, cliprect);
+ priority_bitmap.fill(0, cliprect);
tilemap_draw(bitmap, cliprect, state->m_playfield_tilemap, 0, 0x00);
tilemap_draw(bitmap, cliprect, state->m_playfield_tilemap, 1, 0x01);
tilemap_draw(bitmap, cliprect, state->m_playfield_tilemap, 2, 0x02);
@@ -219,8 +219,8 @@ SCREEN_UPDATE( batman )
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
UINT16 *mo = &mobitmap->pix16(y);
- UINT16 *pf = &bitmap->pix16(y);
- UINT8 *pri = &priority_bitmap->pix8(y);
+ UINT16 *pf = &bitmap.pix16(y);
+ UINT8 *pri = &priority_bitmap.pix8(y);
for (x = rectlist.rect->min_x; x <= rectlist.rect->max_x; x++)
if (mo[x])
{
@@ -292,7 +292,7 @@ SCREEN_UPDATE( batman )
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
UINT16 *mo = &mobitmap->pix16(y);
- UINT16 *pf = &bitmap->pix16(y);
+ UINT16 *pf = &bitmap.pix16(y);
for (x = rectlist.rect->min_x; x <= rectlist.rect->max_x; x++)
if (mo[x])
{
diff --git a/src/mame/video/battlane.c b/src/mame/video/battlane.c
index e70e579ff43..34597a14531 100644
--- a/src/mame/video/battlane.c
+++ b/src/mame/video/battlane.c
@@ -148,7 +148,7 @@ VIDEO_START( battlane )
state->m_screen_bitmap = auto_bitmap_alloc(machine, 32 * 8, 32 * 8, BITMAP_FORMAT_INDEXED8);
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
battlane_state *state = machine.driver_data<battlane_state>();
int offs, attr, code, color, sx, sy, flipx, flipy, dy;
@@ -212,7 +212,7 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
}
}
-static void draw_fg_bitmap( running_machine &machine, bitmap_t *bitmap )
+static void draw_fg_bitmap( running_machine &machine, bitmap_t &bitmap )
{
battlane_state *state = machine.driver_data<battlane_state>();
int x, y, data;
@@ -226,9 +226,9 @@ static void draw_fg_bitmap( running_machine &machine, bitmap_t *bitmap )
if (data)
{
if (flip_screen_get(machine))
- bitmap->pix16(255 - y, 255 - x) = data;
+ bitmap.pix16(255 - y, 255 - x) = data;
else
- bitmap->pix16(y, x) = data;
+ bitmap.pix16(y, x) = data;
}
}
}
diff --git a/src/mame/video/battlera.c b/src/mame/video/battlera.c
index 02d688a1a5c..864919a1820 100644
--- a/src/mame/video/battlera.c
+++ b/src/mame/video/battlera.c
@@ -241,7 +241,7 @@ WRITE8_HANDLER( HuC6270_data_w )
/******************************************************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &clip,int pri)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &clip,int pri)
{
battlera_state *state = machine.driver_data<battlera_state>();
int offs,my,mx,code,code2,fx,fy,cgy=0,cgx,colour,i,yinc;
@@ -329,17 +329,17 @@ SCREEN_UPDATE( battlera )
/* If this tile was changed OR tilemap was changed, redraw */
if (state->m_vram_dirty[offs/2]) {
state->m_vram_dirty[offs/2]=0;
- drawgfx_opaque(state->m_tile_bitmap,state->m_tile_bitmap->cliprect(),screen.machine().gfx[0],
+ drawgfx_opaque(*state->m_tile_bitmap,state->m_tile_bitmap->cliprect(),screen.machine().gfx[0],
code,
state->m_HuC6270_vram[offs] >> 4,
0,0,
8*mx,8*my);
- drawgfx_opaque(state->m_front_bitmap,state->m_tile_bitmap->cliprect(),screen.machine().gfx[2],
+ drawgfx_opaque(*state->m_front_bitmap,state->m_tile_bitmap->cliprect(),screen.machine().gfx[2],
0,
0, /* fill the spot with pen 256 */
0,0,
8*mx,8*my);
- drawgfx_transmask(state->m_front_bitmap,state->m_tile_bitmap->cliprect(),screen.machine().gfx[0],
+ drawgfx_transmask(*state->m_front_bitmap,state->m_tile_bitmap->cliprect(),screen.machine().gfx[0],
code,
state->m_HuC6270_vram[offs] >> 4,
0,0,
@@ -351,7 +351,7 @@ SCREEN_UPDATE( battlera )
scrollx=-state->m_HuC6270_registers[7];
scrolly=-state->m_HuC6270_registers[8]+cliprect.min_y-1;
- copyscrollbitmap(bitmap,state->m_tile_bitmap,1,&scrollx,1,&scrolly,cliprect);
+ copyscrollbitmap(bitmap,*state->m_tile_bitmap,1,&scrollx,1,&scrolly,cliprect);
/* Todo: Background enable (not used anyway) */
@@ -359,7 +359,7 @@ SCREEN_UPDATE( battlera )
if (state->m_sb_enable) draw_sprites(screen.machine(),bitmap,cliprect,0);
/* Render background over sprites */
- copyscrollbitmap_trans(bitmap,state->m_front_bitmap,1,&scrollx,1,&scrolly,cliprect,256);
+ copyscrollbitmap_trans(bitmap,*state->m_front_bitmap,1,&scrollx,1,&scrolly,cliprect,256);
/* Render high priority sprites, if enabled */
if (state->m_sb_enable) draw_sprites(screen.machine(),bitmap,cliprect,1);
diff --git a/src/mame/video/battlex.c b/src/mame/video/battlex.c
index b1286d542a1..b7cb7cf7720 100644
--- a/src/mame/video/battlex.c
+++ b/src/mame/video/battlex.c
@@ -64,7 +64,7 @@ VIDEO_START( battlex )
state->m_bg_tilemap = tilemap_create(machine, get_bg_tile_info, tilemap_scan_rows, 8, 8, 64, 32);
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
battlex_state *state = machine.driver_data<battlex_state>();
const gfx_element *gfx = machine.gfx[1];
diff --git a/src/mame/video/bbusters.c b/src/mame/video/bbusters.c
index 9671ad6d90a..d16a9a1a714 100644
--- a/src/mame/video/bbusters.c
+++ b/src/mame/video/bbusters.c
@@ -156,7 +156,7 @@ INLINE const UINT8 *get_source_ptr(gfx_element *gfx, UINT32 sprite, int dx, int
return gfx_element_get_data(gfx, (sprite+code) % gfx->total_elements) + ((dy%16) * gfx->line_modulo);
}
-static void bbusters_draw_block(running_machine &machine, bitmap_t *dest,int x,int y,int size,int flipx,int flipy,UINT32 sprite,int color,int bank,int block)
+static void bbusters_draw_block(running_machine &machine, bitmap_t &dest,int x,int y,int size,int flipx,int flipy,UINT32 sprite,int color,int bank,int block)
{
bbusters_state *state = machine.driver_data<bbusters_state>();
gfx_element *gfx = machine.gfx[bank];
@@ -170,7 +170,7 @@ static void bbusters_draw_block(running_machine &machine, bitmap_t *dest,int x,i
while (state->m_scale_line_count) {
if (dy>=16 && dy<240) {
- UINT16 *destline = &dest->pix16(dy);
+ UINT16 *destline = &dest.pix16(dy);
UINT8 srcline=*state->m_scale_table_ptr;
const UINT8 *srcptr=0;
@@ -203,7 +203,7 @@ static void bbusters_draw_block(running_machine &machine, bitmap_t *dest,int x,i
}
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const UINT16 *source, int bank, int colval, int colmask)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const UINT16 *source, int bank, int colval, int colmask)
{
bbusters_state *state = machine.driver_data<bbusters_state>();
const UINT8 *scale_table=machine.region("user1")->base();
diff --git a/src/mame/video/beathead.c b/src/mame/video/beathead.c
index 50e52b2a3bb..515618ac07a 100644
--- a/src/mame/video/beathead.c
+++ b/src/mame/video/beathead.c
@@ -182,7 +182,7 @@ bool beathead_state::screen_update(screen_device &screen, bitmap_t &bitmap, cons
}
/* then draw it */
- draw_scanline16(&bitmap, cliprect.min_x, y, cliprect.max_x - cliprect.min_x + 1, &scanline[cliprect.min_x], NULL);
+ draw_scanline16(bitmap, cliprect.min_x, y, cliprect.max_x - cliprect.min_x + 1, &scanline[cliprect.min_x], NULL);
}
return 0;
}
diff --git a/src/mame/video/beezer.c b/src/mame/video/beezer.c
index acc35f7e29c..00c8e06732a 100644
--- a/src/mame/video/beezer.c
+++ b/src/mame/video/beezer.c
@@ -28,8 +28,8 @@ SCREEN_UPDATE( beezer )
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
for (x = cliprect.min_x; x <= cliprect.max_x; x+=2)
{
- bitmap->pix16(y, x+1) = videoram[0x80*x+y] & 0x0f;
- bitmap->pix16(y, x+0) = videoram[0x80*x+y] >> 4;
+ bitmap.pix16(y, x+1) = videoram[0x80*x+y] & 0x0f;
+ bitmap.pix16(y, x+0) = videoram[0x80*x+y] >> 4;
}
return 0;
diff --git a/src/mame/video/bigevglf.c b/src/mame/video/bigevglf.c
index f19cc4c47aa..54dcf750618 100644
--- a/src/mame/video/bigevglf.c
+++ b/src/mame/video/bigevglf.c
@@ -72,7 +72,7 @@ VIDEO_START( bigevglf )
state->save_pointer(NAME(state->m_vidram), 0x100 * 0x100 * 4);
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
bigevglf_state *state = machine.driver_data<bigevglf_state>();
int i, j;
@@ -95,7 +95,7 @@ SCREEN_UPDATE( bigevglf )
{
bigevglf_state *state = screen.machine().driver_data<bigevglf_state>();
- copybitmap(bitmap, state->m_tmp_bitmap[state->m_plane_visible], 0, 0, 0, 0, cliprect);
+ copybitmap(bitmap, *state->m_tmp_bitmap[state->m_plane_visible], 0, 0, 0, 0, cliprect);
draw_sprites(screen.machine(), bitmap, cliprect);
return 0;
}
diff --git a/src/mame/video/bigstrkb.c b/src/mame/video/bigstrkb.c
index 800716e0597..c6dfb6a1e06 100644
--- a/src/mame/video/bigstrkb.c
+++ b/src/mame/video/bigstrkb.c
@@ -6,7 +6,7 @@
/* Sprites */
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
/*- SPR RAM Format -**
@@ -132,7 +132,7 @@ SCREEN_UPDATE(bigstrkb)
{
bigstrkb_state *state = screen.machine().driver_data<bigstrkb_state>();
-// bitmap->fill(get_black_pen(screen.machine()), cliprect);
+// bitmap.fill(get_black_pen(screen.machine()), cliprect);
tilemap_set_scrollx(state->m_tilemap2,0, state->m_vidreg1[0]+(256-14));
tilemap_set_scrolly(state->m_tilemap2,0, state->m_vidreg2[0]);
diff --git a/src/mame/video/bionicc.c b/src/mame/video/bionicc.c
index c9fb36391ea..62f524bc597 100644
--- a/src/mame/video/bionicc.c
+++ b/src/mame/video/bionicc.c
@@ -207,7 +207,7 @@ WRITE16_HANDLER( bionicc_gfxctrl_w )
***************************************************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
UINT16 *buffered_spriteram = machine.generic.buffered_spriteram.u16;
// bionicc_state *state = machine.driver_data<bionicc_state>();
@@ -250,7 +250,7 @@ SCREEN_UPDATE( bionicc )
{
bionicc_state *state = screen.machine().driver_data<bionicc_state>();
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
tilemap_draw(bitmap, cliprect, state->m_fg_tilemap, 1 | TILEMAP_DRAW_LAYER1, 0); /* nothing in FRONT */
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
tilemap_draw(bitmap, cliprect, state->m_fg_tilemap, 0 | TILEMAP_DRAW_LAYER1, 0);
diff --git a/src/mame/video/bishi.c b/src/mame/video/bishi.c
index 0163d095c3b..b3467ae78f2 100644
--- a/src/mame/video/bishi.c
+++ b/src/mame/video/bishi.c
@@ -63,7 +63,7 @@ SCREEN_UPDATE(bishi)
konami_sortlayers4(layers, layerpri);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
for (i = 0; i < 4; i++)
{
diff --git a/src/mame/video/bking.c b/src/mame/video/bking.c
index 0760acdf6d7..63246383409 100644
--- a/src/mame/video/bking.c
+++ b/src/mame/video/bking.c
@@ -293,7 +293,7 @@ SCREEN_EOF( bking )
xld = state->m_xld1;
yld = state->m_yld1;
- drawgfx_opaque(state->m_tmp_bitmap2, rect, screen.machine().gfx[2],
+ drawgfx_opaque(*state->m_tmp_bitmap2, rect, screen.machine().gfx[2],
state->m_ball1_pic,
0,
0, 0,
@@ -307,7 +307,7 @@ SCREEN_EOF( bking )
xld = state->m_xld2;
yld = state->m_yld2;
- drawgfx_opaque(state->m_tmp_bitmap2, rect, screen.machine().gfx[3],
+ drawgfx_opaque(*state->m_tmp_bitmap2, rect, screen.machine().gfx[3],
state->m_ball2_pic,
0,
0, 0,
@@ -319,7 +319,7 @@ SCREEN_EOF( bking )
tilemap_set_scrollx(state->m_bg_tilemap, 0, flip_screen_get(screen.machine()) ? -xld : xld);
tilemap_set_scrolly(state->m_bg_tilemap, 0, flip_screen_get(screen.machine()) ? -yld : yld);
- tilemap_draw(state->m_tmp_bitmap1, rect, state->m_bg_tilemap, 0, 0);
+ tilemap_draw(*state->m_tmp_bitmap1, rect, state->m_bg_tilemap, 0, 0);
tilemap_set_scrollx(state->m_bg_tilemap, 0, 0);
tilemap_set_scrolly(state->m_bg_tilemap, 0, 0);
diff --git a/src/mame/video/blktiger.c b/src/mame/video/blktiger.c
index bc754852888..78fadf1c60b 100644
--- a/src/mame/video/blktiger.c
+++ b/src/mame/video/blktiger.c
@@ -199,7 +199,7 @@ WRITE8_HANDLER( blktiger_screen_layout_w )
***************************************************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
// blktiger_state *state = machine.driver_data<blktiger_state>();
UINT8 *buffered_spriteram = machine.generic.buffered_spriteram.u8;
@@ -234,7 +234,7 @@ SCREEN_UPDATE( blktiger )
{
blktiger_state *state = screen.machine().driver_data<blktiger_state>();
- bitmap->fill(1023, cliprect);
+ bitmap.fill(1023, cliprect);
if (state->m_bgon)
tilemap_draw(bitmap, cliprect, state->m_screen_layout ? state->m_bg_tilemap8x4 : state->m_bg_tilemap4x8, TILEMAP_DRAW_LAYER1, 0);
diff --git a/src/mame/video/blmbycar.c b/src/mame/video/blmbycar.c
index 6a16a9d6a10..9ded3af0cfd 100644
--- a/src/mame/video/blmbycar.c
+++ b/src/mame/video/blmbycar.c
@@ -165,7 +165,7 @@ VIDEO_START( blmbycar )
***************************************************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
blmbycar_state *state = machine.driver_data<blmbycar_state>();
UINT16 *source, *finish;
@@ -243,13 +243,13 @@ if (screen.machine().input().code_pressed(KEYCODE_Z))
}
#endif
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
if (layers_ctrl & 1)
for (i = 0; i <= 1; i++)
tilemap_draw(bitmap, cliprect, state->m_tilemap_0, i, i);
else
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
if (layers_ctrl & 2)
for (i = 0; i <= 1; i++)
diff --git a/src/mame/video/blockhl.c b/src/mame/video/blockhl.c
index f5530354837..986ad74a62f 100644
--- a/src/mame/video/blockhl.c
+++ b/src/mame/video/blockhl.c
@@ -59,7 +59,7 @@ SCREEN_UPDATE( blockhl )
{
blockhl_state *state = screen.machine().driver_data<blockhl_state>();
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
k052109_tilemap_update(state->m_k052109);
diff --git a/src/mame/video/blockout.c b/src/mame/video/blockout.c
index 1c2d4d5a7e5..dd0d41f9cfa 100644
--- a/src/mame/video/blockout.c
+++ b/src/mame/video/blockout.c
@@ -116,7 +116,7 @@ SCREEN_UPDATE( blockout )
int x, y;
pen_t color = 512;
- copybitmap(bitmap, state->m_tmpbitmap, 0, 0, 0, 0, cliprect);
+ copybitmap(bitmap, *state->m_tmpbitmap, 0, 0, 0, 0, cliprect);
for (y = 0; y < 256; y++)
{
@@ -126,14 +126,14 @@ SCREEN_UPDATE( blockout )
if (d)
{
- if (d & 0x80) bitmap->pix16(y, x + 0) = color;
- if (d & 0x40) bitmap->pix16(y, x + 1) = color;
- if (d & 0x20) bitmap->pix16(y, x + 2) = color;
- if (d & 0x10) bitmap->pix16(y, x + 3) = color;
- if (d & 0x08) bitmap->pix16(y, x + 4) = color;
- if (d & 0x04) bitmap->pix16(y, x + 5) = color;
- if (d & 0x02) bitmap->pix16(y, x + 6) = color;
- if (d & 0x01) bitmap->pix16(y, x + 7) = color;
+ if (d & 0x80) bitmap.pix16(y, x + 0) = color;
+ if (d & 0x40) bitmap.pix16(y, x + 1) = color;
+ if (d & 0x20) bitmap.pix16(y, x + 2) = color;
+ if (d & 0x10) bitmap.pix16(y, x + 3) = color;
+ if (d & 0x08) bitmap.pix16(y, x + 4) = color;
+ if (d & 0x04) bitmap.pix16(y, x + 5) = color;
+ if (d & 0x02) bitmap.pix16(y, x + 6) = color;
+ if (d & 0x01) bitmap.pix16(y, x + 7) = color;
}
}
}
diff --git a/src/mame/video/bloodbro.c b/src/mame/video/bloodbro.c
index 5ebcddb25fd..695f26c0d9a 100644
--- a/src/mame/video/bloodbro.c
+++ b/src/mame/video/bloodbro.c
@@ -145,7 +145,7 @@ WRITE16_HANDLER( bloodbro_txvideoram_w )
-------X XXXXXXXX
-------- YYYYYYYY */
-static void bloodbro_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void bloodbro_draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
bloodbro_state *state = machine.driver_data<bloodbro_state>();
UINT16 *spriteram16 = state->m_spriteram;
@@ -194,7 +194,7 @@ static void bloodbro_draw_sprites(running_machine &machine, bitmap_t *bitmap, co
-------X XXXXXXXX
*/
-static void weststry_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void weststry_draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
bloodbro_state *state = machine.driver_data<bloodbro_state>();
UINT16 *spriteram16 = state->m_spriteram;
@@ -240,7 +240,7 @@ SCREEN_UPDATE( bloodbro )
tilemap_set_scrollx(state->m_fg_tilemap,0,state->m_scroll[0x12]);
tilemap_set_scrolly(state->m_fg_tilemap,0,state->m_scroll[0x13]);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
tilemap_draw(bitmap,cliprect,state->m_bg_tilemap,0,0);
tilemap_draw(bitmap,cliprect,state->m_fg_tilemap,0,1);
@@ -257,7 +257,7 @@ SCREEN_UPDATE( weststry )
// tilemap_set_scrollx(state->m_fg_tilemap,0,state->m_scroll[0x12]);
// tilemap_set_scrolly(state->m_fg_tilemap,0,state->m_scroll[0x13]);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
tilemap_draw(bitmap,cliprect,state->m_bg_tilemap,0,0);
tilemap_draw(bitmap,cliprect,state->m_fg_tilemap,0,1);
@@ -275,7 +275,7 @@ SCREEN_UPDATE( skysmash )
tilemap_set_scrollx(state->m_fg_tilemap,0,state->m_scroll[0x0a]);
tilemap_set_scrolly(state->m_fg_tilemap,0,state->m_scroll[0x0b]); /* ? */
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
tilemap_draw(bitmap,cliprect,state->m_bg_tilemap,0,0);
tilemap_draw(bitmap,cliprect,state->m_fg_tilemap,0,1);
diff --git a/src/mame/video/blstroid.c b/src/mame/video/blstroid.c
index 1916245db05..1e052ef23e2 100644
--- a/src/mame/video/blstroid.c
+++ b/src/mame/video/blstroid.c
@@ -160,7 +160,7 @@ SCREEN_UPDATE( blstroid )
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
UINT16 *mo = &mobitmap->pix16(y);
- UINT16 *pf = &bitmap->pix16(y);
+ UINT16 *pf = &bitmap.pix16(y);
for (x = rectlist.rect->min_x; x <= rectlist.rect->max_x; x++)
if (mo[x])
{
diff --git a/src/mame/video/blueprnt.c b/src/mame/video/blueprnt.c
index 3d0c417d6d3..e11ab89354c 100644
--- a/src/mame/video/blueprnt.c
+++ b/src/mame/video/blueprnt.c
@@ -98,7 +98,7 @@ VIDEO_START( blueprnt )
state->save_item(NAME(state->m_gfx_bank));
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
blueprnt_state *state = machine.driver_data<blueprnt_state>();
int offs;
@@ -136,7 +136,7 @@ SCREEN_UPDATE( blueprnt )
for (i = 0; i < 32; i++)
tilemap_set_scrolly(state->m_bg_tilemap, i, state->m_scrollram[30 - i]);
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
draw_sprites(screen.machine(), bitmap, cliprect);
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 1, 0);
diff --git a/src/mame/video/bogeyman.c b/src/mame/video/bogeyman.c
index 563803d11d4..2600e31d6be 100644
--- a/src/mame/video/bogeyman.c
+++ b/src/mame/video/bogeyman.c
@@ -104,7 +104,7 @@ VIDEO_START( bogeyman )
tilemap_set_transparent_pen(state->m_fg_tilemap, 0);
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
bogeyman_state *state = machine.driver_data<bogeyman_state>();
int offs;
diff --git a/src/mame/video/bombjack.c b/src/mame/video/bombjack.c
index 292d83207f8..c481f7b444d 100644
--- a/src/mame/video/bombjack.c
+++ b/src/mame/video/bombjack.c
@@ -75,7 +75,7 @@ VIDEO_START( bombjack )
tilemap_set_transparent_pen(state->m_fg_tilemap, 0);
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
bombjack_state *state = machine.driver_data<bombjack_state>();
int offs;
diff --git a/src/mame/video/boogwing.c b/src/mame/video/boogwing.c
index 39abb5728b8..e27a82de9b6 100644
--- a/src/mame/video/boogwing.c
+++ b/src/mame/video/boogwing.c
@@ -3,7 +3,7 @@
#include "video/deco16ic.h"
#include "video/decocomn.h"
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, UINT16* spriteram_base, int gfx_region )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, UINT16* spriteram_base, int gfx_region )
{
boogwing_state *state = machine.driver_data<boogwing_state>();
int offs;
@@ -150,8 +150,8 @@ SCREEN_UPDATE( boogwing )
/* Draw playfields */
decocomn_clear_sprite_priority_bitmap(state->m_decocomn);
- bitmap->fill(screen.machine().pens[0x400], cliprect); /* pen not confirmed */
- screen.machine().priority_bitmap->fill(0);
+ bitmap.fill(screen.machine().pens[0x400], cliprect); /* pen not confirmed */
+ screen.machine().priority_bitmap.fill(0);
// bit&0x8 is definitely some kind of palette effect
// bit&0x4 combines playfields
diff --git a/src/mame/video/bosco.c b/src/mame/video/bosco.c
index f87c61518ad..2913a8993c9 100644
--- a/src/mame/video/bosco.c
+++ b/src/mame/video/bosco.c
@@ -189,7 +189,7 @@ WRITE8_HANDLER( bosco_starclr_w )
***************************************************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
UINT8 *spriteram = machine.generic.spriteram.u8;
UINT8 *spriteram_2 = machine.generic.spriteram2.u8;
@@ -219,7 +219,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const recta
}
-static void draw_bullets(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_bullets(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
bosco_state *state = machine.driver_data<bosco_state>();
int offs;
@@ -244,7 +244,7 @@ static void draw_bullets(running_machine &machine, bitmap_t *bitmap, const recta
}
-static void draw_stars(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int flip)
+static void draw_stars(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int flip)
{
bosco_state *state = machine.driver_data<bosco_state>();
@@ -272,7 +272,7 @@ static void draw_stars(running_machine &machine, bitmap_t *bitmap, const rectang
if (flip) x += 20*8;
if (x >= cliprect.min_x && x <= cliprect.max_x && y >= cliprect.min_y && y <= cliprect.max_y)
- bitmap->pix16(y, x) = STARS_COLOR_BASE + star_seed_tab[star_cntr].col;
+ bitmap.pix16(y, x) = STARS_COLOR_BASE + star_seed_tab[star_cntr].col;
}
}
}
@@ -299,7 +299,7 @@ SCREEN_UPDATE( bosco )
fg_clip.min_x = 28*8;
}
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
draw_stars(screen.machine(),bitmap,cliprect,flip_screen_get(screen.machine()));
tilemap_draw(bitmap,bg_clip,state->m_bg_tilemap,0,0);
diff --git a/src/mame/video/bottom9.c b/src/mame/video/bottom9.c
index a62847a1231..7c7a5b85848 100644
--- a/src/mame/video/bottom9.c
+++ b/src/mame/video/bottom9.c
@@ -80,7 +80,7 @@ SCREEN_UPDATE( bottom9 )
k052109_tilemap_update(state->m_k052109);
/* note: FIX layer is not used */
- bitmap->fill(state->m_layer_colorbase[1], cliprect);
+ bitmap.fill(state->m_layer_colorbase[1], cliprect);
// if (state->m_video_enable)
{
k051960_sprites_draw(state->m_k051960, bitmap, cliprect, 1, 1);
diff --git a/src/mame/video/brkthru.c b/src/mame/video/brkthru.c
index debd7950dd9..6c2ad0ac6c8 100644
--- a/src/mame/video/brkthru.c
+++ b/src/mame/video/brkthru.c
@@ -156,7 +156,7 @@ WRITE8_HANDLER( brkthru_1800_w )
#if 0
-static void show_register( bitmap_t *bitmap, int x, int y, UINT32 data )
+static void show_register( bitmap_t &bitmap, int x, int y, UINT32 data )
{
char buf[5];
@@ -166,7 +166,7 @@ static void show_register( bitmap_t *bitmap, int x, int y, UINT32 data )
#endif
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int prio )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int prio )
{
brkthru_state *state = machine.driver_data<brkthru_state>();
int offs;
diff --git a/src/mame/video/bsktball.c b/src/mame/video/bsktball.c
index 5ff55093f78..9e8e76d6143 100644
--- a/src/mame/video/bsktball.c
+++ b/src/mame/video/bsktball.c
@@ -33,7 +33,7 @@ VIDEO_START( bsktball )
state->m_bg_tilemap = tilemap_create(machine, get_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
bsktball_state *state = machine.driver_data<bsktball_state>();
int mot;
diff --git a/src/mame/video/btime.c b/src/mame/video/btime.c
index 9e9e021a72e..29ddf0dbb72 100644
--- a/src/mame/video/btime.c
+++ b/src/mame/video/btime.c
@@ -301,7 +301,7 @@ WRITE8_HANDLER( disco_video_control_w )
}
-static void draw_chars( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, UINT8 transparency, UINT8 color, int priority )
+static void draw_chars( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, UINT8 transparency, UINT8 color, int priority )
{
btime_state *state = machine.driver_data<btime_state>();
offs_t offs;
@@ -332,7 +332,7 @@ static void draw_chars( running_machine &machine, bitmap_t *bitmap, const rectan
}
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, UINT8 color,
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, UINT8 color,
UINT8 sprite_y_adjust, UINT8 sprite_y_adjust_flip_screen,
UINT8 *sprite_ram, offs_t interleave )
{
@@ -382,7 +382,7 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
}
-static void draw_background( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, UINT8* tmap, UINT8 color )
+static void draw_background( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, UINT8* tmap, UINT8 color )
{
btime_state *state = machine.driver_data<btime_state>();
int i;
@@ -513,7 +513,7 @@ SCREEN_UPDATE( bnj )
sy = 256 - sy;
}
- drawgfx_opaque(state->m_background_bitmap, state->m_background_bitmap->cliprect(), screen.machine().gfx[2],
+ drawgfx_opaque(*state->m_background_bitmap, state->m_background_bitmap->cliprect(), screen.machine().gfx[2],
(state->m_bnj_backgroundram[offs] >> 4) + ((offs & 0x80) >> 3) + 32,
0,
flip_screen_get(screen.machine()), flip_screen_get(screen.machine()),
@@ -524,7 +524,7 @@ SCREEN_UPDATE( bnj )
scroll = (state->m_bnj_scroll1 & 0x02) * 128 + 511 - state->m_bnj_scroll2;
if (!flip_screen_get(screen.machine()))
scroll = 767 - scroll;
- copyscrollbitmap(bitmap, state->m_background_bitmap, 1, &scroll, 0, 0, cliprect);
+ copyscrollbitmap(bitmap, *state->m_background_bitmap, 1, &scroll, 0, 0, cliprect);
/* copy the low priority characters followed by the sprites
then the high priority characters */
diff --git a/src/mame/video/btoads.c b/src/mame/video/btoads.c
index 974c3377e04..0b7694ea613 100644
--- a/src/mame/video/btoads.c
+++ b/src/mame/video/btoads.c
@@ -316,13 +316,13 @@ void btoads_state::from_shiftreg(address_space *space, UINT32 address, UINT16 *s
*
*************************************/
-void btoads_state::scanline_update(screen_device &screen, bitmap_t *bitmap, int scanline, const tms34010_display_params *params)
+void btoads_state::scanline_update(screen_device &screen, bitmap_t &bitmap, int scanline, const tms34010_display_params *params)
{
UINT32 fulladdr = ((params->rowaddr << 16) | params->coladdr) >> 4;
UINT16 *bg0_base = &m_vram_bg0[(fulladdr + (m_yscroll0 << 10)) & 0x3fc00];
UINT16 *bg1_base = &m_vram_bg1[(fulladdr + (m_yscroll1 << 10)) & 0x3fc00];
UINT8 *spr_base = &m_vram_fg_display[fulladdr & 0x3fc00];
- UINT32 *dst = &bitmap->pix32(scanline);
+ UINT32 *dst = &bitmap.pix32(scanline);
const rgb_t *pens = tlc34076_get_pens(m_tlc34076);
int coladdr = fulladdr & 0x3ff;
int x;
diff --git a/src/mame/video/bublbobl.c b/src/mame/video/bublbobl.c
index 67d15205652..35a8bccb7af 100644
--- a/src/mame/video/bublbobl.c
+++ b/src/mame/video/bublbobl.c
@@ -25,7 +25,7 @@ SCREEN_UPDATE( bublbobl )
/* the background character columns is stored in the area dd00-dd3f */
/* This clears & redraws the entire screen each pass */
- bitmap->fill(255, cliprect);
+ bitmap.fill(255, cliprect);
if (!state->m_video_enable)
return 0;
diff --git a/src/mame/video/buggychl.c b/src/mame/video/buggychl.c
index e4832b35f39..43f5f1becf4 100644
--- a/src/mame/video/buggychl.c
+++ b/src/mame/video/buggychl.c
@@ -80,17 +80,17 @@ WRITE8_HANDLER( buggychl_bg_scrollx_w )
}
-static void draw_sky( bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sky( bitmap_t &bitmap, const rectangle &cliprect )
{
int x, y;
for (y = 0; y < 256; y++)
for (x = 0; x < 256; x++)
- bitmap->pix16(y, x) = 128 + x / 2;
+ bitmap.pix16(y, x) = 128 + x / 2;
}
-static void draw_bg( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_bg( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
buggychl_state *state = machine.driver_data<buggychl_state>();
int offs;
@@ -113,7 +113,7 @@ static void draw_bg( running_machine &machine, bitmap_t *bitmap, const rectangle
if (flip_screen_y_get(machine))
sy = 31 - sy;
- drawgfx_opaque(state->m_tmp_bitmap1, state->m_tmp_bitmap1->cliprect(), machine.gfx[0],
+ drawgfx_opaque(*state->m_tmp_bitmap1, state->m_tmp_bitmap1->cliprect(), machine.gfx[0],
code,
2,
flip_screen_x_get(machine),flip_screen_y_get(machine),
@@ -124,17 +124,17 @@ static void draw_bg( running_machine &machine, bitmap_t *bitmap, const rectangle
for (offs = 0; offs < 256; offs++)
scroll[offs] = -state->m_scrollv[offs / 8];
- copyscrollbitmap(state->m_tmp_bitmap2, state->m_tmp_bitmap1, 1, &state->m_bg_scrollx, 256, scroll, state->m_tmp_bitmap2->cliprect());
+ copyscrollbitmap(*state->m_tmp_bitmap2, *state->m_tmp_bitmap1, 1, &state->m_bg_scrollx, 256, scroll, state->m_tmp_bitmap2->cliprect());
/* then copy to the screen doing row scroll */
for (offs = 0; offs < 256; offs++)
scroll[offs] = -state->m_scrollh[offs];
- copyscrollbitmap_trans(bitmap, state->m_tmp_bitmap2, 256, scroll, 0, 0, clip, 32);
+ copyscrollbitmap_trans(bitmap, *state->m_tmp_bitmap2, 256, scroll, 0, 0, clip, 32);
}
-static void draw_fg( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_fg( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
buggychl_state *state = machine.driver_data<buggychl_state>();
int offs;
@@ -163,7 +163,7 @@ static void draw_fg( running_machine &machine, bitmap_t *bitmap, const rectangle
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
buggychl_state *state = machine.driver_data<buggychl_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -220,7 +220,7 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
{
int dx = flip_screen_x_get(machine) ? (255 - sx - px) : (sx + px);
if ((dx & ~0xff) == 0)
- bitmap->pix16(dy, dx) = state->m_sprite_color_base + col;
+ bitmap.pix16(dy, dx) = state->m_sprite_color_base + col;
}
/* the following line is almost certainly wrong */
@@ -243,7 +243,7 @@ SCREEN_UPDATE( buggychl )
if (state->m_sky_on)
draw_sky(bitmap, cliprect);
else
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
if (state->m_bg_on)
draw_bg(screen.machine(), bitmap, cliprect);
diff --git a/src/mame/video/bwing.c b/src/mame/video/bwing.c
index ca68398f263..d91e478520e 100644
--- a/src/mame/video/bwing.c
+++ b/src/mame/video/bwing.c
@@ -247,7 +247,7 @@ VIDEO_START( bwing )
//****************************************************************************
// Realtime
-static void draw_sprites( running_machine &machine, bitmap_t *bmp, const rectangle &clip, UINT8 *ram, int pri )
+static void draw_sprites( running_machine &machine, bitmap_t &bmp, const rectangle &clip, UINT8 *ram, int pri )
{
bwing_state *state = machine.driver_data<bwing_state>();
int attrib, fx, fy, code, x, y, color, i;
@@ -316,7 +316,7 @@ SCREEN_UPDATE( bwing )
tilemap_draw(bitmap, cliprect, state->m_bgmap, 0, 0);
}
else
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
// draw low priority sprites
draw_sprites(screen.machine(), bitmap, cliprect, state->m_spriteram, 0);
diff --git a/src/mame/video/cabal.c b/src/mame/video/cabal.c
index f8944fa5d96..f3050ae0dab 100644
--- a/src/mame/video/cabal.c
+++ b/src/mame/video/cabal.c
@@ -105,7 +105,7 @@ WRITE16_HANDLER( cabal_text_videoram16_w )
********************************************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
cabal_state *state = machine.driver_data<cabal_state>();
int offs,data0,data1,data2;
diff --git a/src/mame/video/canyon.c b/src/mame/video/canyon.c
index a63bbc55144..d333a968a57 100644
--- a/src/mame/video/canyon.c
+++ b/src/mame/video/canyon.c
@@ -33,7 +33,7 @@ VIDEO_START( canyon )
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
canyon_state *state = machine.driver_data<canyon_state>();
int i;
@@ -55,7 +55,7 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
}
-static void draw_bombs( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_bombs( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
canyon_state *state = machine.driver_data<canyon_state>();
int i;
@@ -77,7 +77,7 @@ static void draw_bombs( running_machine &machine, bitmap_t *bitmap, const rectan
if (rect.max_x > cliprect.max_x) rect.max_x = cliprect.max_x;
if (rect.max_y > cliprect.max_y) rect.max_y = cliprect.max_y;
- bitmap->fill(1 + 2 * i, rect);
+ bitmap.fill(1 + 2 * i, rect);
}
}
diff --git a/src/mame/video/capbowl.c b/src/mame/video/capbowl.c
index a5fbd0d6ece..fd08e8de65f 100644
--- a/src/mame/video/capbowl.c
+++ b/src/mame/video/capbowl.c
@@ -176,7 +176,7 @@ SCREEN_UPDATE( capbowl )
/* if we're blanked, just fill with black */
if (state.blanked)
{
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
return 0;
}
@@ -184,7 +184,7 @@ SCREEN_UPDATE( capbowl )
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
UINT8 *src = &state.vram[256 * y];
- UINT32 *dest = &bitmap->pix32(y);
+ UINT32 *dest = &bitmap.pix32(y);
for (x = cliprect.min_x & ~1; x <= cliprect.max_x; x += 2)
{
diff --git a/src/mame/video/carpolo.c b/src/mame/video/carpolo.c
index 7d1f0dc308d..3cde1cefa73 100644
--- a/src/mame/video/carpolo.c
+++ b/src/mame/video/carpolo.c
@@ -167,7 +167,7 @@ VIDEO_START( carpolo )
*
*************************************/
-static void draw_alpha_line(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect,
+static void draw_alpha_line(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect,
int alpha_line, int video_line)
{
carpolo_state *state = machine.driver_data<carpolo_state>();
@@ -198,7 +198,7 @@ static void remap_sprite_code(running_machine &machine, int bank, int code, int
}
-static void draw_sprite(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect,
+static void draw_sprite(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect,
UINT8 x, UINT8 y, int bank, int code, int col)
{
int remapped_code, flipy;
@@ -227,10 +227,10 @@ SCREEN_UPDATE( carpolo )
/* draw the playfield elements in the correct priority order */
/* score area - position determined by bit 4 of the vertical timing PROM */
- bitmap->plot_box(0,0,RIGHT_BORDER+1,TOP_BORDER,BACKGROUND_PEN);
+ bitmap.plot_box(0,0,RIGHT_BORDER+1,TOP_BORDER,BACKGROUND_PEN);
/* field */
- bitmap->plot_box(0,TOP_BORDER,RIGHT_BORDER+1,BOTTOM_BORDER-TOP_BORDER+1,FIELD_PEN);
+ bitmap.plot_box(0,TOP_BORDER,RIGHT_BORDER+1,BOTTOM_BORDER-TOP_BORDER+1,FIELD_PEN);
/* car 1 */
draw_sprite(screen.machine(), bitmap, cliprect,
@@ -238,10 +238,10 @@ SCREEN_UPDATE( carpolo )
0, state->m_spriteram[0x0c] & 0x0f, CAR1_COLOR);
/* border - position determined by bit 4 and 7 of the vertical timing PROM */
- bitmap->plot_box(0,TOP_BORDER, RIGHT_BORDER+1,1,LINE_PEN);
- bitmap->plot_box(0,BOTTOM_BORDER,RIGHT_BORDER+1,1,LINE_PEN);
- bitmap->plot_box(LEFT_BORDER,TOP_BORDER, 1,BOTTOM_BORDER-TOP_BORDER+1,LINE_PEN);
- bitmap->plot_box(RIGHT_BORDER,TOP_BORDER,1,BOTTOM_BORDER-TOP_BORDER+1,LINE_PEN);
+ bitmap.plot_box(0,TOP_BORDER, RIGHT_BORDER+1,1,LINE_PEN);
+ bitmap.plot_box(0,BOTTOM_BORDER,RIGHT_BORDER+1,1,LINE_PEN);
+ bitmap.plot_box(LEFT_BORDER,TOP_BORDER, 1,BOTTOM_BORDER-TOP_BORDER+1,LINE_PEN);
+ bitmap.plot_box(RIGHT_BORDER,TOP_BORDER,1,BOTTOM_BORDER-TOP_BORDER+1,LINE_PEN);
/* car 4 */
draw_sprite(screen.machine(), bitmap, cliprect,
@@ -363,12 +363,12 @@ static int check_sprite_sprite_collision(running_machine &machine,
state->m_sprite_sprite_collision_bitmap1->fill(0);
state->m_sprite_sprite_collision_bitmap2->fill(0);
- drawgfx_opaque(state->m_sprite_sprite_collision_bitmap1,state->m_sprite_sprite_collision_bitmap1->cliprect(),machine.gfx[0],
+ drawgfx_opaque(*state->m_sprite_sprite_collision_bitmap1,state->m_sprite_sprite_collision_bitmap1->cliprect(),machine.gfx[0],
code1,0,
0,flipy1,
x1,y1);
- drawgfx_opaque(state->m_sprite_sprite_collision_bitmap2,state->m_sprite_sprite_collision_bitmap2->cliprect(),machine.gfx[0],
+ drawgfx_opaque(*state->m_sprite_sprite_collision_bitmap2,state->m_sprite_sprite_collision_bitmap2->cliprect(),machine.gfx[0],
code2,0,
0,flipy2,
x2,y2);
@@ -417,12 +417,12 @@ static int check_sprite_left_goal_collision(running_machine &machine, int x1, in
state->m_sprite_goal_collision_bitmap1->fill(0);
state->m_sprite_goal_collision_bitmap2->fill(0);
- drawgfx_opaque(state->m_sprite_goal_collision_bitmap1,state->m_sprite_goal_collision_bitmap1->cliprect(),machine.gfx[0],
+ drawgfx_opaque(*state->m_sprite_goal_collision_bitmap1,state->m_sprite_goal_collision_bitmap1->cliprect(),machine.gfx[0],
code1,0,
0,flipy1,
x1,y1);
- drawgfxzoom_transpen(state->m_sprite_goal_collision_bitmap2,state->m_sprite_goal_collision_bitmap2->cliprect(),machine.gfx[1],
+ drawgfxzoom_transpen(*state->m_sprite_goal_collision_bitmap2,state->m_sprite_goal_collision_bitmap2->cliprect(),machine.gfx[1],
0,0,
0,0,
x2,y2,
@@ -475,12 +475,12 @@ static int check_sprite_right_goal_collision(running_machine &machine, int x1, i
state->m_sprite_goal_collision_bitmap1->fill(0);
state->m_sprite_goal_collision_bitmap2->fill(0);
- drawgfx_opaque(state->m_sprite_goal_collision_bitmap1,state->m_sprite_goal_collision_bitmap1->cliprect(),machine.gfx[0],
+ drawgfx_opaque(*state->m_sprite_goal_collision_bitmap1,state->m_sprite_goal_collision_bitmap1->cliprect(),machine.gfx[0],
code1,0,
0,flipy1,
x1,y1);
- drawgfxzoom_transpen(state->m_sprite_goal_collision_bitmap2,state->m_sprite_goal_collision_bitmap2->cliprect(),machine.gfx[1],
+ drawgfxzoom_transpen(*state->m_sprite_goal_collision_bitmap2,state->m_sprite_goal_collision_bitmap2->cliprect(),machine.gfx[1],
0,1,
1,0,
x2,y2,
@@ -521,7 +521,7 @@ static int check_sprite_border_collision(running_machine &machine, UINT8 x1, UIN
x1 = 240 - x1;
y1 = 240 - y1;
- drawgfx_opaque(state->m_sprite_border_collision_bitmap,state->m_sprite_border_collision_bitmap->cliprect(),machine.gfx[0],
+ drawgfx_opaque(*state->m_sprite_border_collision_bitmap,state->m_sprite_border_collision_bitmap->cliprect(),machine.gfx[0],
code1,0,
0,flipy1,
0,0);
diff --git a/src/mame/video/cave.c b/src/mame/video/cave.c
index 10fe67e55bd..8de70f06357 100644
--- a/src/mame/video/cave.c
+++ b/src/mame/video/cave.c
@@ -1418,7 +1418,7 @@ static void sprite_draw_donpachi_zbuf( running_machine &machine, int priority )
***************************************************************************/
INLINE void cave_tilemap_draw(
- running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect,
+ running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect,
UINT32 flags, UINT32 priority, UINT32 priority2, int GFX )
{
cave_state *state = machine.driver_data<cave_state>();
@@ -1548,8 +1548,8 @@ SCREEN_UPDATE( cave )
set_pens(screen.machine());
- state->m_blit.baseaddr = &bitmap->pix8(0);
- state->m_blit.line_offset = bitmap->rowpixels() * bitmap->bpp() / 8;
+ state->m_blit.baseaddr = &bitmap.pix8(0);
+ state->m_blit.line_offset = bitmap.rowpixels() * bitmap.bpp() / 8;
/* Choose the tilemap to display (8x8 tiles or 16x16 tiles) */
for (GFX = 0; GFX < 4; GFX++)
@@ -1621,7 +1621,7 @@ SCREEN_UPDATE( cave )
cave_sprite_check(screen, cliprect);
- bitmap->fill(state->m_background_color, cliprect);
+ bitmap.fill(state->m_background_color, cliprect);
/*
Tiles and sprites are ordered by priority (0 back, 3 front) with
diff --git a/src/mame/video/cbasebal.c b/src/mame/video/cbasebal.c
index 816dd1743b4..6e85097af3e 100644
--- a/src/mame/video/cbasebal.c
+++ b/src/mame/video/cbasebal.c
@@ -144,7 +144,7 @@ WRITE8_HANDLER( cbasebal_scrolly_w )
***************************************************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
cbasebal_state *state = machine.driver_data<cbasebal_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -185,7 +185,7 @@ SCREEN_UPDATE( cbasebal )
if (state->m_bg_on)
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
else
- bitmap->fill(768, cliprect);
+ bitmap.fill(768, cliprect);
if (state->m_obj_on)
draw_sprites(screen.machine(), bitmap, cliprect);
diff --git a/src/mame/video/ccastles.c b/src/mame/video/ccastles.c
index 960f65b9ab5..5c47eec88d5 100644
--- a/src/mame/video/ccastles.c
+++ b/src/mame/video/ccastles.c
@@ -282,13 +282,13 @@ SCREEN_UPDATE( ccastles )
int which = spriteaddr[offs];
int color = spriteaddr[offs + 2] >> 7;
- drawgfx_transpen(state->m_spritebitmap, cliprect, screen.machine().gfx[0], which, color, flip, flip, x, y, 7);
+ drawgfx_transpen(*state->m_spritebitmap, cliprect, screen.machine().gfx[0], which, color, flip, flip, x, y, 7);
}
/* draw the bitmap to the screen, looping over Y */
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
- UINT16 *dst = &bitmap->pix16(y);
+ UINT16 *dst = &bitmap.pix16(y);
/* if we're in the VBLANK region, just fill with black */
if (state->m_syncprom[y] & 1)
diff --git a/src/mame/video/cclimber.c b/src/mame/video/cclimber.c
index 3ef519497a0..f84ac7eeef6 100644
--- a/src/mame/video/cclimber.c
+++ b/src/mame/video/cclimber.c
@@ -487,7 +487,7 @@ VIDEO_START( toprollr )
}
-static void draw_playfield(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_playfield(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
cclimber_state *state = machine.driver_data<cclimber_state>();
int i;
@@ -502,7 +502,7 @@ static void draw_playfield(running_machine &machine, bitmap_t *bitmap, const rec
}
-static void cclimber_draw_bigsprite(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void cclimber_draw_bigsprite(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
cclimber_state *state = machine.driver_data<cclimber_state>();
UINT8 x = state->m_bigsprite_control[3] - 8;
@@ -528,7 +528,7 @@ static void cclimber_draw_bigsprite(running_machine &machine, bitmap_t *bitmap,
}
-static void toprollr_draw_bigsprite(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void toprollr_draw_bigsprite(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
cclimber_state *state = machine.driver_data<cclimber_state>();
UINT8 x = state->m_bigsprite_control[3] - 8;
@@ -545,7 +545,7 @@ static void toprollr_draw_bigsprite(running_machine &machine, bitmap_t *bitmap,
}
-static void cclimber_draw_sprites(bitmap_t *bitmap, const rectangle &cliprect, const gfx_element *gfx)
+static void cclimber_draw_sprites(bitmap_t &bitmap, const rectangle &cliprect, const gfx_element *gfx)
{
cclimber_state *state = gfx->machine().driver_data<cclimber_state>();
int offs;
@@ -586,7 +586,7 @@ static void cclimber_draw_sprites(bitmap_t *bitmap, const rectangle &cliprect, c
}
-static void toprollr_draw_sprites(bitmap_t *bitmap, const rectangle &cliprect, const gfx_element *gfx)
+static void toprollr_draw_sprites(bitmap_t &bitmap, const rectangle &cliprect, const gfx_element *gfx)
{
cclimber_state *state = gfx->machine().driver_data<cclimber_state>();
int offs;
@@ -624,7 +624,7 @@ static void toprollr_draw_sprites(bitmap_t *bitmap, const rectangle &cliprect, c
}
-static void swimmer_draw_sprites(bitmap_t *bitmap, const rectangle &cliprect, const gfx_element *gfx)
+static void swimmer_draw_sprites(bitmap_t &bitmap, const rectangle &cliprect, const gfx_element *gfx)
{
cclimber_state *state = gfx->machine().driver_data<cclimber_state>();
int offs;
@@ -665,7 +665,7 @@ static void swimmer_draw_sprites(bitmap_t *bitmap, const rectangle &cliprect, co
SCREEN_UPDATE( cclimber )
{
cclimber_state *state = screen.machine().driver_data<cclimber_state>();
- bitmap->fill(CCLIMBER_BG_PEN, cliprect);
+ bitmap.fill(CCLIMBER_BG_PEN, cliprect);
draw_playfield(screen.machine(), bitmap, cliprect);
/* draw the "big sprite" under the regular sprites */
@@ -698,7 +698,7 @@ SCREEN_UPDATE( yamato )
pen_t pen = YAMATO_SKY_PEN_BASE + sky_rom[(CCLIMBER_FLIP_X ? 0x80 : 0) + (i >> 1)];
for (j = 0; j < 0x100; j++)
- bitmap->pix16(j, (i - 8) & 0xff) = pen;
+ bitmap.pix16(j, (i - 8) & 0xff) = pen;
}
draw_playfield(screen.machine(), bitmap, cliprect);
@@ -734,10 +734,10 @@ SCREEN_UPDATE( swimmer )
rectangle split_rect_right(0x100 - SWIMMER_BG_SPLIT, 0xff, 0, 0xff);
split_rect_left &= cliprect;
- bitmap->fill(SWIMMER_SIDE_BG_PEN, split_rect_left);
+ bitmap.fill(SWIMMER_SIDE_BG_PEN, split_rect_left);
split_rect_right &= cliprect;
- bitmap->fill(CCLIMBER_BG_PEN, split_rect_right);
+ bitmap.fill(CCLIMBER_BG_PEN, split_rect_right);
}
else
{
@@ -745,14 +745,14 @@ SCREEN_UPDATE( swimmer )
rectangle split_rect_right(SWIMMER_BG_SPLIT, 0xff, 0, 0xff);
split_rect_left &= cliprect;
- bitmap->fill(CCLIMBER_BG_PEN, split_rect_left);
+ bitmap.fill(CCLIMBER_BG_PEN, split_rect_left);
split_rect_right &= cliprect;
- bitmap->fill(SWIMMER_SIDE_BG_PEN, split_rect_right);
+ bitmap.fill(SWIMMER_SIDE_BG_PEN, split_rect_right);
}
}
else
- bitmap->fill(CCLIMBER_BG_PEN, cliprect);
+ bitmap.fill(CCLIMBER_BG_PEN, cliprect);
draw_playfield(screen.machine(), bitmap, cliprect);
@@ -781,7 +781,7 @@ SCREEN_UPDATE( toprollr )
scroll_area_clip.min_x = 4*8;
scroll_area_clip.max_x = 29*8-1;
- bitmap->fill(CCLIMBER_BG_PEN, cliprect);
+ bitmap.fill(CCLIMBER_BG_PEN, cliprect);
tilemap_set_scrollx(state->m_toproller_bg_tilemap, 0, state->m_toprollr_bg_videoram[0]);
tilemap_set_flip(state->m_toproller_bg_tilemap, (CCLIMBER_FLIP_X ? TILEMAP_FLIPX : 0) |
diff --git a/src/mame/video/chaknpop.c b/src/mame/video/chaknpop.c
index d293bccb886..304f74139ab 100644
--- a/src/mame/video/chaknpop.c
+++ b/src/mame/video/chaknpop.c
@@ -183,7 +183,7 @@ VIDEO_START( chaknpop )
Screen refresh
***************************************************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
chaknpop_state *state = machine.driver_data<chaknpop_state>();
int offs;
@@ -218,7 +218,7 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
}
}
-static void draw_bitmap( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_bitmap( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
chaknpop_state *state = machine.driver_data<chaknpop_state>();
int dx = state->m_flip_x ? -1 : 1;
@@ -250,9 +250,9 @@ static void draw_bitmap( running_machine &machine, bitmap_t *bitmap, const recta
if (color)
{
- pen_t pen = bitmap->pix16(y, x);
+ pen_t pen = bitmap.pix16(y, x);
pen |= color;
- bitmap->pix16(y, x) = pen;
+ bitmap.pix16(y, x) = pen;
}
}
}
diff --git a/src/mame/video/champbas.c b/src/mame/video/champbas.c
index eb0b329362f..576d9ace6fb 100644
--- a/src/mame/video/champbas.c
+++ b/src/mame/video/champbas.c
@@ -193,7 +193,7 @@ WRITE8_HANDLER( champbas_flipscreen_w )
-static void champbas_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void champbas_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
champbas_state *state = machine.driver_data<champbas_state>();
int offs;
@@ -225,7 +225,7 @@ static void champbas_draw_sprites( running_machine &machine, bitmap_t *bitmap, c
}
}
-static void exctsccr_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void exctsccr_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
champbas_state *state = machine.driver_data<champbas_state>();
int offs;
diff --git a/src/mame/video/changela.c b/src/mame/video/changela.c
index fff166aaa0b..bad6e6de1ad 100644
--- a/src/mame/video/changela.c
+++ b/src/mame/video/changela.c
@@ -42,7 +42,7 @@ VIDEO_START( changela )
***************************************************************************/
-static void draw_obj0( running_machine &machine, bitmap_t *bitmap, int sy )
+static void draw_obj0( running_machine &machine, bitmap_t &bitmap, int sy )
{
changela_state *state = machine.driver_data<changela_state>();
int sx, i;
@@ -82,7 +82,7 @@ static void draw_obj0( running_machine &machine, bitmap_t *bitmap, int sy )
data = (ROM[rom_addr] & 0xf0) >> 4;
if ((data != 0x0f) && (data != 0))
- bitmap->pix16(sy, xpos + i) = data | 0x10;
+ bitmap.pix16(sy, xpos + i) = data | 0x10;
if (hs)
{
@@ -92,7 +92,7 @@ static void draw_obj0( running_machine &machine, bitmap_t *bitmap, int sy )
data = (ROM[rom_addr ^ 0x100] & 0xf0) >> 4;
if ((data != 0x0f) && (data != 0))
- bitmap->pix16(sy, xpos + i + 16) = data | 0x10;
+ bitmap.pix16(sy, xpos + i + 16) = data | 0x10;
}
}
}
@@ -105,7 +105,7 @@ static void draw_obj0( running_machine &machine, bitmap_t *bitmap, int sy )
***************************************************************************/
-static void draw_obj1( running_machine &machine, bitmap_t *bitmap )
+static void draw_obj1( running_machine &machine, bitmap_t &bitmap )
{
changela_state *state = machine.driver_data<changela_state>();
int sx, sy;
@@ -159,7 +159,7 @@ static void draw_obj1( running_machine &machine, bitmap_t *bitmap )
col = c0 | (c1 << 1) | ((attrib & 0xc0) >> 4);
if ((col & 0x07) != 0x07)
- bitmap->pix16(sy, sx) = col | 0x20;
+ bitmap.pix16(sy, sx) = col | 0x20;
}
}
}
@@ -170,7 +170,7 @@ static void draw_obj1( running_machine &machine, bitmap_t *bitmap )
***************************************************************************/
-static void draw_river( running_machine &machine, bitmap_t *bitmap, int sy )
+static void draw_river( running_machine &machine, bitmap_t &bitmap, int sy )
{
changela_state *state = machine.driver_data<changela_state>();
int sx, i, j;
@@ -307,7 +307,7 @@ static void draw_river( running_machine &machine, bitmap_t *bitmap, int sy )
else
col = (TILE_ROM[rom_addr] & 0xf0) >> 4;
- bitmap->pix16(sy, sx) = col;
+ bitmap.pix16(sy, sx) = col;
}
for (sx = 16; sx < 256; sx++)
@@ -338,7 +338,7 @@ static void draw_river( running_machine &machine, bitmap_t *bitmap, int sy )
else
col = (TILE_ROM[rom_addr] & 0xf0) >> 4;
- bitmap->pix16(sy, sx) = col;
+ bitmap.pix16(sy, sx) = col;
}
}
}
@@ -349,7 +349,7 @@ static void draw_river( running_machine &machine, bitmap_t *bitmap, int sy )
***************************************************************************/
-static void draw_tree( running_machine &machine, bitmap_t *bitmap, int sy, int tree_num )
+static void draw_tree( running_machine &machine, bitmap_t &bitmap, int sy, int tree_num )
{
changela_state *state = machine.driver_data<changela_state>();
int sx, i, j;
@@ -547,7 +547,7 @@ static void draw_tree( running_machine &machine, bitmap_t *bitmap, int sy, int t
all_ff = 0;
if (col != 0x0f && col != 0x00)
- bitmap->pix16(sy, sx) = col | 0x30;
+ bitmap.pix16(sy, sx) = col | 0x30;
}
}
@@ -587,7 +587,7 @@ static void draw_tree( running_machine &machine, bitmap_t *bitmap, int sy, int t
all_ff = 0;
if (col != 0x0f && col != 0x00)
- bitmap->pix16(sy, sx) = col | 0x30;
+ bitmap.pix16(sy, sx) = col | 0x30;
}
}
@@ -658,10 +658,10 @@ static TIMER_CALLBACK( changela_scanline_callback )
state->m_tree0_bitmap->fill(0x00, rect);
state->m_tree1_bitmap->fill(0x00, rect);
- draw_river(machine, state->m_river_bitmap, sy);
- draw_obj0(machine, state->m_obj0_bitmap, sy);
- draw_tree(machine, state->m_tree0_bitmap, sy, 0);
- draw_tree(machine, state->m_tree1_bitmap, sy, 1);
+ draw_river(machine, *state->m_river_bitmap, sy);
+ draw_obj0(machine, *state->m_obj0_bitmap, sy);
+ draw_tree(machine, *state->m_tree0_bitmap, sy, 0);
+ draw_tree(machine, *state->m_tree1_bitmap, sy, 1);
/* Collision Detection */
for (sx = 1; sx < 256; sx++)
@@ -725,10 +725,10 @@ static TIMER_CALLBACK( changela_scanline_callback )
SCREEN_UPDATE( changela )
{
changela_state *state = screen.machine().driver_data<changela_state>();
- copybitmap(bitmap, state->m_river_bitmap, 0, 0, 0, 0, cliprect);
- copybitmap_trans(bitmap, state->m_obj0_bitmap, 0, 0, 0, 0, cliprect, 0);
- copybitmap_trans(bitmap, state->m_tree0_bitmap, 0, 0, 0, 0, cliprect, 0);
- copybitmap_trans(bitmap, state->m_tree1_bitmap, 0, 0, 0, 0, cliprect, 0);
+ copybitmap(bitmap, *state->m_river_bitmap, 0, 0, 0, 0, cliprect);
+ copybitmap_trans(bitmap, *state->m_obj0_bitmap, 0, 0, 0, 0, cliprect, 0);
+ copybitmap_trans(bitmap, *state->m_tree0_bitmap, 0, 0, 0, 0, cliprect, 0);
+ copybitmap_trans(bitmap, *state->m_tree1_bitmap, 0, 0, 0, 0, cliprect, 0);
draw_obj1(screen.machine(), bitmap);
return 0;
diff --git a/src/mame/video/cheekyms.c b/src/mame/video/cheekyms.c
index bd490c9efe4..18335abad33 100644
--- a/src/mame/video/cheekyms.c
+++ b/src/mame/video/cheekyms.c
@@ -108,7 +108,7 @@ VIDEO_START( cheekyms )
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, const gfx_element *gfx, int flip )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, const gfx_element *gfx, int flip )
{
cheekyms_state *state = machine.driver_data<cheekyms_state>();
offs_t offs;
@@ -158,14 +158,14 @@ SCREEN_UPDATE( cheekyms )
tilemap_mark_all_tiles_dirty_all(screen.machine());
tilemap_set_flip_all(screen.machine(), flip ? TILEMAP_FLIPX | TILEMAP_FLIPY : 0);
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
state->m_bitmap_buffer->fill(0, cliprect);
/* sprites go under the playfield */
draw_sprites(screen.machine(), bitmap, cliprect, screen.machine().gfx[1], flip);
/* draw the tilemap to a temp bitmap */
- tilemap_draw(state->m_bitmap_buffer, cliprect, state->m_cm_tilemap, 0, 0);
+ tilemap_draw(*state->m_bitmap_buffer, cliprect, state->m_cm_tilemap, 0, 0);
/* draw the tilemap to the final bitmap applying the scroll to the man character */
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
@@ -186,12 +186,12 @@ SCREEN_UPDATE( cheekyms )
if (in_man_area)
{
if ((y + scrolly) < 27 * 8 && state->m_bitmap_buffer->pix16(y + scrolly, x) != 0)
- bitmap->pix16(y, x) = state->m_bitmap_buffer->pix16(y + scrolly, x);
+ bitmap.pix16(y, x) = state->m_bitmap_buffer->pix16(y + scrolly, x);
}
else
{
if(state->m_bitmap_buffer->pix16(y, x) != 0)
- bitmap->pix16(y, x) = state->m_bitmap_buffer->pix16(y, x);
+ bitmap.pix16(y, x) = state->m_bitmap_buffer->pix16(y, x);
}
}
}
diff --git a/src/mame/video/chqflag.c b/src/mame/video/chqflag.c
index c16fd16e1ef..5b560290ce2 100644
--- a/src/mame/video/chqflag.c
+++ b/src/mame/video/chqflag.c
@@ -75,7 +75,7 @@ SCREEN_UPDATE( chqflag )
{
chqflag_state *state = screen.machine().driver_data<chqflag_state>();
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
k051316_zoom_draw(state->m_k051316_2, bitmap, cliprect, TILEMAP_DRAW_LAYER1, 0);
k051960_sprites_draw(state->m_k051960, bitmap, cliprect, 0, 0);
diff --git a/src/mame/video/circus.c b/src/mame/video/circus.c
index b11efc4410a..145e3182d89 100644
--- a/src/mame/video/circus.c
+++ b/src/mame/video/circus.c
@@ -44,7 +44,7 @@ VIDEO_START( circus )
state->m_bg_tilemap = tilemap_create(machine, get_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
}
-static void draw_line( bitmap_t *bitmap, const rectangle &cliprect, int x1, int y1, int x2, int y2, int dotted )
+static void draw_line( bitmap_t &bitmap, const rectangle &cliprect, int x1, int y1, int x2, int y2, int dotted )
{
/* Draws horizontal and Vertical lines only! */
int count, skip;
@@ -57,13 +57,13 @@ static void draw_line( bitmap_t *bitmap, const rectangle &cliprect, int x1, int
if (x1 == x2)
for (count = y2; count >= y1; count -= skip)
- bitmap->pix16(count, x1) = 1;
+ bitmap.pix16(count, x1) = 1;
else
for (count = x2; count >= x1; count -= skip)
- bitmap->pix16(y1, count) = 1;
+ bitmap.pix16(y1, count) = 1;
}
-static void draw_sprite_collision( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprite_collision( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
circus_state *state = machine.driver_data<circus_state>();
const gfx_element *sprite_gfx = machine.gfx[1];
@@ -75,18 +75,18 @@ static void draw_sprite_collision( running_machine &machine, bitmap_t *bitmap, c
for (sy = 0; sy < 16; sy++)
{
dy = state->m_clown_x + sy-1;
- if (dy>=0 && dy<bitmap->height())
+ if (dy>=0 && dy<bitmap.height())
{
for (sx = 0; sx < 16; sx++)
{
dx = state->m_clown_y + sx;
- if (dx>=0 && dx<bitmap->width())
+ if (dx>=0 && dx<bitmap.width())
{
pixel = sprite_data[sy * sprite_gfx->line_modulo + sx];
if (pixel)
{
- collision |= bitmap->pix16(dy, dx);
- bitmap->pix16(dy, dx) = machine.pens[pixel];
+ collision |= bitmap.pix16(dy, dx);
+ bitmap.pix16(dy, dx) = machine.pens[pixel];
}
}
}
@@ -97,7 +97,7 @@ static void draw_sprite_collision( running_machine &machine, bitmap_t *bitmap, c
device_set_input_line(state->m_maincpu, 0, ASSERT_LINE);
}
-static void circus_draw_fg( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void circus_draw_fg( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
/* The sync generator hardware is used to */
/* draw the border and diving boards */
@@ -122,7 +122,7 @@ SCREEN_UPDATE( circus )
return 0;
}
-static void robotbwl_draw_box( bitmap_t *bitmap, const rectangle &cliprect, int x, int y )
+static void robotbwl_draw_box( bitmap_t &bitmap, const rectangle &cliprect, int x, int y )
{
/* Box */
int ex = x + 24;
@@ -140,7 +140,7 @@ static void robotbwl_draw_box( bitmap_t *bitmap, const rectangle &cliprect, int
draw_line(bitmap, cliprect, x + 16, y, x + 16, ey, 0);
}
-static void robotbwl_draw_scoreboard( bitmap_t *bitmap, const rectangle &cliprect )
+static void robotbwl_draw_scoreboard( bitmap_t &bitmap, const rectangle &cliprect )
{
int offs;
@@ -165,7 +165,7 @@ static void robotbwl_draw_scoreboard( bitmap_t *bitmap, const rectangle &cliprec
draw_line(bitmap, cliprect, 39 + 152, 137, 47 + 152, 137, 0);
}
-static void robotbwl_draw_bowling_alley( bitmap_t *bitmap, const rectangle &cliprect )
+static void robotbwl_draw_bowling_alley( bitmap_t &bitmap, const rectangle &cliprect )
{
draw_line(bitmap, cliprect, 103, 17, 103, 205, 0);
draw_line(bitmap, cliprect, 111, 17, 111, 203, 1);
@@ -173,7 +173,7 @@ static void robotbwl_draw_bowling_alley( bitmap_t *bitmap, const rectangle &clip
draw_line(bitmap, cliprect, 144, 17, 144, 203, 1);
}
-static void robotbwl_draw_ball( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void robotbwl_draw_ball( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
circus_state *state = machine.driver_data<circus_state>();
drawgfx_transpen(bitmap,/* Y is horizontal position */
@@ -194,7 +194,7 @@ SCREEN_UPDATE( robotbwl )
return 0;
}
-static void crash_draw_car( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void crash_draw_car( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
circus_state *state = machine.driver_data<circus_state>();
drawgfx_transpen(bitmap,/* Y is horizontal position */
diff --git a/src/mame/video/circusc.c b/src/mame/video/circusc.c
index 4a5452cb90b..45e3b6356de 100644
--- a/src/mame/video/circusc.c
+++ b/src/mame/video/circusc.c
@@ -161,7 +161,7 @@ WRITE8_HANDLER( circusc_flipscreen_w )
***************************************************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
circusc_state *state = machine.driver_data<circusc_state>();
int offs;
@@ -208,7 +208,7 @@ SCREEN_UPDATE( circusc )
for (i = 10; i < 32; i++)
tilemap_set_scrolly(state->m_bg_tilemap, i, *state->m_scroll);
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 1, 0);
draw_sprites(screen.machine(), bitmap, cliprect);
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
diff --git a/src/mame/video/cischeat.c b/src/mame/video/cischeat.c
index 1952029bcae..4061cb1a2c7 100644
--- a/src/mame/video/cischeat.c
+++ b/src/mame/video/cischeat.c
@@ -715,7 +715,7 @@ WRITE16_HANDLER( scudhamm_vregs_w )
/* Draw the road in the given bitmap. The priority1 and priority2 parameters
specify the range of lines to draw */
-static void cischeat_draw_road(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int road_num, int priority1, int priority2, int transparency)
+static void cischeat_draw_road(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int road_num, int priority1, int priority2, int transparency)
{
cischeat_state *state = machine.driver_data<cischeat_state>();
int curr_code,sx,sy;
@@ -805,7 +805,7 @@ static void cischeat_draw_road(running_machine &machine, bitmap_t *bitmap, const
/* Draw the road in the given bitmap. The priority1 and priority2 parameters
specify the range of lines to draw */
-static void f1gpstar_draw_road(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int road_num, int priority1, int priority2, int transparency)
+static void f1gpstar_draw_road(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int road_num, int priority1, int priority2, int transparency)
{
cischeat_state *state = machine.driver_data<cischeat_state>();
int sx,sy;
@@ -921,7 +921,7 @@ static void f1gpstar_draw_road(running_machine &machine, bitmap_t *bitmap, const
sprites whose priority nibble is between 0 and 15 and whose
colour code's high bit is set. */
-static void cischeat_draw_sprites(running_machine &machine, bitmap_t *bitmap , const rectangle &cliprect, int priority1, int priority2)
+static void cischeat_draw_sprites(running_machine &machine, bitmap_t &bitmap , const rectangle &cliprect, int priority1, int priority2)
{
cischeat_state *state = machine.driver_data<cischeat_state>();
int x, sx, flipx, xzoom, xscale, xdim, xnum, xstart, xend, xinc;
@@ -1077,7 +1077,7 @@ if (machine.input().code_pressed(KEYCODE_X))
***************************************************************************/
-static void bigrun_draw_sprites(running_machine &machine, bitmap_t *bitmap , const rectangle &cliprect, int priority1, int priority2)
+static void bigrun_draw_sprites(running_machine &machine, bitmap_t &bitmap , const rectangle &cliprect, int priority1, int priority2)
{
cischeat_state *state = machine.driver_data<cischeat_state>();
int x, sx, flipx, xzoom, xscale, xdim, xnum, xstart, xend, xinc;
@@ -1265,7 +1265,7 @@ SCREEN_UPDATE( bigrun )
cischeat_tmap_SET_SCROLL(1)
cischeat_tmap_SET_SCROLL(2)
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
for (i = 7; i >= 4; i--)
{ /* bitmap, road, min_priority, max_priority, transparency */
@@ -1319,7 +1319,7 @@ SCREEN_UPDATE( cischeat )
cischeat_tmap_SET_SCROLL(1)
cischeat_tmap_SET_SCROLL(2)
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
/* bitmap, road, priority, transparency */
if (state->m_active_layers & 0x10) cischeat_draw_road(screen.machine(),bitmap,cliprect,0,7,5,FALSE);
@@ -1327,7 +1327,7 @@ SCREEN_UPDATE( cischeat )
flag = 0;
cischeat_tmap_DRAW(0)
-// else bitmap->fill(0, cliprect);
+// else bitmap.fill(0, cliprect);
cischeat_tmap_DRAW(1)
if (state->m_active_layers & 0x08) cischeat_draw_sprites(screen.machine(),bitmap,cliprect,15,3);
@@ -1376,7 +1376,7 @@ SCREEN_UPDATE( f1gpstar )
cischeat_tmap_SET_SCROLL(1);
cischeat_tmap_SET_SCROLL(2);
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
/* 1: clouds 5, grad 7, road 0 2: clouds 5, grad 7, road 0, tunnel roof 0 */
@@ -1386,7 +1386,7 @@ SCREEN_UPDATE( f1gpstar )
flag = 0;
cischeat_tmap_DRAW(0)
-// else bitmap->fill(0, cliprect);
+// else bitmap.fill(0, cliprect);
cischeat_tmap_DRAW(1)
/* road 1!! 0!! */ /* bitmap, road, min_priority, max_priority, transparency */
@@ -1453,7 +1453,7 @@ if ( screen.machine().input().code_pressed(KEYCODE_Z) || screen.machine().input(
cischeat_tmap_SET_SCROLL(0)
cischeat_tmap_SET_SCROLL(2)
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
flag = 0;
cischeat_tmap_DRAW(0)
diff --git a/src/mame/video/citycon.c b/src/mame/video/citycon.c
index bbaaf9ddcc2..6ac57c630f0 100644
--- a/src/mame/video/citycon.c
+++ b/src/mame/video/citycon.c
@@ -106,7 +106,7 @@ WRITE8_HANDLER( citycon_background_w )
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
citycon_state *state = machine.driver_data<citycon_state>();
int offs;
diff --git a/src/mame/video/cloak.c b/src/mame/video/cloak.c
index 60f09193977..6c9e60f7903 100644
--- a/src/mame/video/cloak.c
+++ b/src/mame/video/cloak.c
@@ -188,7 +188,7 @@ VIDEO_START( cloak )
machine.save().register_postload(save_prepost_delegate(FUNC(set_current_bitmap_videoram_pointer), state));
}
-static void draw_bitmap(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_bitmap(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
cloak_state *state = machine.driver_data<cloak_state>();
int x, y;
@@ -199,11 +199,11 @@ static void draw_bitmap(running_machine &machine, bitmap_t *bitmap, const rectan
pen_t pen = state->m_current_bitmap_videoram_displayed[(y << 8) | x] & 0x07;
if (pen)
- bitmap->pix16(y, (x - 6) & 0xff) = 0x10 | ((x & 0x80) >> 4) | pen;
+ bitmap.pix16(y, (x - 6) & 0xff) = 0x10 | ((x & 0x80) >> 4) | pen;
}
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
cloak_state *state = machine.driver_data<cloak_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/cloud9.c b/src/mame/video/cloud9.c
index a63742a9e2f..07ba6e0567e 100644
--- a/src/mame/video/cloud9.c
+++ b/src/mame/video/cloud9.c
@@ -267,15 +267,15 @@ SCREEN_UPDATE( cloud9 )
int which = spriteaddr[offs + 0x20];
int color = 0;
- drawgfx_transpen(state->m_spritebitmap, cliprect, screen.machine().gfx[0], which, color, xflip, yflip, x, y, 0);
+ drawgfx_transpen(*state->m_spritebitmap, cliprect, screen.machine().gfx[0], which, color, xflip, yflip, x, y, 0);
if (x >= 256 - 16)
- drawgfx_transpen(state->m_spritebitmap, cliprect, screen.machine().gfx[0], which, color, xflip, yflip, x - 256, y, 0);
+ drawgfx_transpen(*state->m_spritebitmap, cliprect, screen.machine().gfx[0], which, color, xflip, yflip, x - 256, y, 0);
}
/* draw the bitmap to the screen, looping over Y */
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
- UINT16 *dst = &bitmap->pix16(y);
+ UINT16 *dst = &bitmap.pix16(y);
/* if we're in the VBLANK region, just fill with black */
if (~state->m_syncprom[y] & 2)
diff --git a/src/mame/video/clshroad.c b/src/mame/video/clshroad.c
index cc663b1cf31..f609eb68364 100644
--- a/src/mame/video/clshroad.c
+++ b/src/mame/video/clshroad.c
@@ -286,7 +286,7 @@ Offset: Format: Value:
***************************************************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
clshroad_state *state = machine.driver_data<clshroad_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/cninja.c b/src/mame/video/cninja.c
index 8d479b1afb6..1c33f1d7855 100644
--- a/src/mame/video/cninja.c
+++ b/src/mame/video/cninja.c
@@ -26,7 +26,7 @@ VIDEO_START( stoneage )
/* The bootleg sprites are in a different format! */
-static void cninjabl_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void cninjabl_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
UINT16 *buffered_spriteram = machine.generic.buffered_spriteram.u16;
int offs;
@@ -134,8 +134,8 @@ SCREEN_UPDATE( cninja )
deco16ic_pf_update(state->m_deco_tilegen2, state->m_pf3_rowscroll, state->m_pf4_rowscroll);
/* Draw playfields */
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(512, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(512, cliprect);
deco16ic_tilemap_2_draw(state->m_deco_tilegen2, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 1);
deco16ic_tilemap_1_draw(state->m_deco_tilegen2, bitmap, cliprect, 0, 2);
deco16ic_tilemap_2_draw(state->m_deco_tilegen1, bitmap, cliprect, TILEMAP_DRAW_LAYER1, 2);
@@ -159,8 +159,8 @@ SCREEN_UPDATE( cninjabl )
deco16ic_pf_update(state->m_deco_tilegen2, state->m_pf3_rowscroll, state->m_pf4_rowscroll);
/* Draw playfields */
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(512, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(512, cliprect);
deco16ic_tilemap_2_draw(state->m_deco_tilegen2, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 1);
deco16ic_tilemap_1_draw(state->m_deco_tilegen2, bitmap, cliprect, 0, 2);
deco16ic_tilemap_2_draw(state->m_deco_tilegen1, bitmap, cliprect, TILEMAP_DRAW_LAYER1, 2);
@@ -179,8 +179,8 @@ SCREEN_UPDATE( edrandy )
deco16ic_pf_update(state->m_deco_tilegen1, state->m_pf1_rowscroll, state->m_pf2_rowscroll);
deco16ic_pf_update(state->m_deco_tilegen2, state->m_pf3_rowscroll, state->m_pf4_rowscroll);
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(0, cliprect);
deco16ic_tilemap_2_draw(state->m_deco_tilegen2, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 1);
deco16ic_tilemap_1_draw(state->m_deco_tilegen2, bitmap, cliprect, 0, 2);
deco16ic_tilemap_2_draw(state->m_deco_tilegen1, bitmap, cliprect, 0, 4);
@@ -215,8 +215,8 @@ SCREEN_UPDATE( robocop2 )
deco16ic_pf_update(state->m_deco_tilegen2, state->m_pf3_rowscroll, state->m_pf4_rowscroll);
/* Draw playfields */
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(0x200, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(0x200, cliprect);
if ((priority & 4) == 0)
deco16ic_tilemap_2_draw(state->m_deco_tilegen2, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 1);
@@ -258,7 +258,7 @@ SCREEN_UPDATE( mutantf )
deco16ic_pf_update(state->m_deco_tilegen2, state->m_pf3_rowscroll, state->m_pf4_rowscroll);
/* Draw playfields */
- bitmap->fill(0x400, cliprect); /* Confirmed */
+ bitmap.fill(0x400, cliprect); /* Confirmed */
screen.machine().device<decospr_device>("spritegen1")->set_alt_format(true);
screen.machine().device<decospr_device>("spritegen2")->set_alt_format(true);
diff --git a/src/mame/video/combatsc.c b/src/mame/video/combatsc.c
index 0e92113e0f8..2b90bd8194c 100644
--- a/src/mame/video/combatsc.c
+++ b/src/mame/video/combatsc.c
@@ -393,7 +393,7 @@ WRITE8_HANDLER( combatsc_scrollram_w )
***************************************************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, const UINT8 *source, int circuit, UINT32 pri_mask )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, const UINT8 *source, int circuit, UINT32 pri_mask )
{
combatsc_state *state = machine.driver_data<combatsc_state>();
device_t *k007121 = circuit ? state->m_k007121_2 : state->m_k007121_1;
@@ -437,7 +437,7 @@ SCREEN_UPDATE( combatsc )
tilemap_set_scrolly(state->m_bg_tilemap[0], 0, k007121_ctrlram_r(state->m_k007121_1, 2));
tilemap_set_scrolly(state->m_bg_tilemap[1], 0, k007121_ctrlram_r(state->m_k007121_2, 2));
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
if (state->m_priority == 0)
{
@@ -478,11 +478,11 @@ SCREEN_UPDATE( combatsc )
clip = cliprect;
clip.max_x = clip.min_x + 7;
- bitmap->fill(0, clip);
+ bitmap.fill(0, clip);
clip = cliprect;
clip.min_x = clip.max_x - 7;
- bitmap->fill(0, clip);
+ bitmap.fill(0, clip);
}
return 0;
}
@@ -515,7 +515,7 @@ byte #4:
***************************************************************************/
-static void bootleg_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, const UINT8 *source, int circuit )
+static void bootleg_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, const UINT8 *source, int circuit )
{
address_space *space = machine.device("maincpu")->memory().space(AS_PROGRAM);
const gfx_element *gfx = machine.gfx[circuit + 2];
diff --git a/src/mame/video/commando.c b/src/mame/video/commando.c
index 54e893826ba..c645f04d5cf 100644
--- a/src/mame/video/commando.c
+++ b/src/mame/video/commando.c
@@ -105,7 +105,7 @@ VIDEO_START( commando )
tilemap_set_transparent_pen(state->m_fg_tilemap, 3);
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
UINT8 *buffered_spriteram = machine.generic.buffered_spriteram.u8;
int offs;
diff --git a/src/mame/video/compgolf.c b/src/mame/video/compgolf.c
index d13012ccb26..9f8d20c60ae 100644
--- a/src/mame/video/compgolf.c
+++ b/src/mame/video/compgolf.c
@@ -90,7 +90,7 @@ xx------ xxxxxxxx -------- -------- sprite code
-----x-- -------- -------- -------- Flip X
-------- -------- -------- -------- Flip Y(used?)
*/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
compgolf_state *state = machine.driver_data<compgolf_state>();
int offs, fx, fy, x, y, color, sprite;
diff --git a/src/mame/video/contra.c b/src/mame/video/contra.c
index 36883197e2b..671485b7a30 100644
--- a/src/mame/video/contra.c
+++ b/src/mame/video/contra.c
@@ -301,7 +301,7 @@ WRITE8_HANDLER( contra_K007121_ctrl_1_w )
***************************************************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int bank )
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int bank )
{
contra_state *state = machine.driver_data<contra_state>();
device_t *k007121 = bank ? state->m_k007121_2 : state->m_k007121_1;
diff --git a/src/mame/video/cop01.c b/src/mame/video/cop01.c
index 4b80e35974e..6598c1399c0 100644
--- a/src/mame/video/cop01.c
+++ b/src/mame/video/cop01.c
@@ -166,7 +166,7 @@ WRITE8_HANDLER( cop01_vreg_w )
***************************************************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
cop01_state *state = machine.driver_data<cop01_state>();
int offs, code, attr, sx, sy, flipx, flipy, color;
diff --git a/src/mame/video/copsnrob.c b/src/mame/video/copsnrob.c
index 844f9529193..35c36b2fb91 100644
--- a/src/mame/video/copsnrob.c
+++ b/src/mame/video/copsnrob.c
@@ -123,7 +123,7 @@ SCREEN_UPDATE( copsnrob )
{
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
if (state->m_bulletsram[y] & mask2)
- bitmap->pix16(y, 256 - x) = 1;
+ bitmap.pix16(y, 256 - x) = 1;
}
mask1 <<= 1;
diff --git a/src/mame/video/cosmic.c b/src/mame/video/cosmic.c
index 0ddb12440f1..9e92490498d 100644
--- a/src/mame/video/cosmic.c
+++ b/src/mame/video/cosmic.c
@@ -251,7 +251,7 @@ WRITE8_HANDLER( cosmic_background_enable_w )
}
-static void draw_bitmap( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_bitmap( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
cosmic_state *state = machine.driver_data<cosmic_state>();
offs_t offs;
@@ -271,9 +271,9 @@ static void draw_bitmap( running_machine &machine, bitmap_t *bitmap, const recta
if (data & 0x80)
{
if (flip_screen_get(machine))
- bitmap->pix16(255-y, 255-x) = pen;
+ bitmap.pix16(255-y, 255-x) = pen;
else
- bitmap->pix16(y, x) = pen;
+ bitmap.pix16(y, x) = pen;
}
x++;
@@ -283,7 +283,7 @@ static void draw_bitmap( running_machine &machine, bitmap_t *bitmap, const recta
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int color_mask, int extra_sprites )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int color_mask, int extra_sprites )
{
cosmic_state *state = machine.driver_data<cosmic_state>();
int offs;
@@ -317,7 +317,7 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
}
-static void cosmica_draw_starfield( screen_device &screen, bitmap_t *bitmap, const rectangle &cliprect )
+static void cosmica_draw_starfield( screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect )
{
UINT8 y = 0;
UINT8 map = 0;
@@ -353,7 +353,7 @@ static void cosmica_draw_starfield( screen_device &screen, bitmap_t *bitmap, con
/* RGB order is reversed -- bit 7=R, 6=G, 5=B */
int col = (map >> 7) | ((map >> 5) & 0x02) | ((map >> 3) & 0x04);
- bitmap->pix16(y, x) = col;
+ bitmap.pix16(y, x) = col;
}
x++;
@@ -366,7 +366,7 @@ static void cosmica_draw_starfield( screen_device &screen, bitmap_t *bitmap, con
}
-static void devzone_draw_grid( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void devzone_draw_grid( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
UINT8 y;
UINT8 *horz_PROM = machine.region("user2")->base();
@@ -407,9 +407,9 @@ static void devzone_draw_grid( running_machine &machine, bitmap_t *bitmap, const
{
/* blue */
if (flip_screen_get(machine))
- bitmap->pix16(255-y, 255-x) = 4;
+ bitmap.pix16(255-y, 255-x) = 4;
else
- bitmap->pix16(y, x) = 4;
+ bitmap.pix16(y, x) = 4;
}
horz_data = (horz_data << 1) | 0x01;
@@ -424,7 +424,7 @@ static void devzone_draw_grid( running_machine &machine, bitmap_t *bitmap, const
}
-static void nomnlnd_draw_background( screen_device &screen, bitmap_t *bitmap, const rectangle &cliprect )
+static void nomnlnd_draw_background( screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect )
{
UINT8 y = 0;
UINT8 water = screen.frame_number();
@@ -526,9 +526,9 @@ static void nomnlnd_draw_background( screen_device &screen, bitmap_t *bitmap, co
if (color != 0)
{
if (flip_screen_get(screen.machine()))
- bitmap->pix16(255-y, 255-x) = color;
+ bitmap.pix16(255-y, 255-x) = color;
else
- bitmap->pix16(y, x) = color;
+ bitmap.pix16(y, x) = color;
}
x++;
@@ -548,7 +548,7 @@ static void nomnlnd_draw_background( screen_device &screen, bitmap_t *bitmap, co
SCREEN_UPDATE( cosmicg )
{
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
draw_bitmap(screen.machine(), bitmap, cliprect);
return 0;
}
@@ -556,7 +556,7 @@ SCREEN_UPDATE( cosmicg )
SCREEN_UPDATE( panic )
{
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
draw_bitmap(screen.machine(), bitmap, cliprect);
draw_sprites(screen.machine(), bitmap, cliprect, 0x07, 1);
return 0;
@@ -565,7 +565,7 @@ SCREEN_UPDATE( panic )
SCREEN_UPDATE( cosmica )
{
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
cosmica_draw_starfield(screen, bitmap, cliprect);
draw_bitmap(screen.machine(), bitmap, cliprect);
draw_sprites(screen.machine(), bitmap, cliprect, 0x0f, 0);
@@ -575,7 +575,7 @@ SCREEN_UPDATE( cosmica )
SCREEN_UPDATE( magspot )
{
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
draw_bitmap(screen.machine(), bitmap, cliprect);
draw_sprites(screen.machine(), bitmap, cliprect, 0x07, 0);
return 0;
@@ -586,7 +586,7 @@ SCREEN_UPDATE( devzone )
{
cosmic_state *state = screen.machine().driver_data<cosmic_state>();
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
if (state->m_background_enable)
devzone_draw_grid(screen.machine(), bitmap, cliprect);
@@ -604,7 +604,7 @@ SCREEN_UPDATE( nomnlnd )
/* according to the video summation logic on pg4, the trees and river
have the highest priority */
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
draw_bitmap(screen.machine(), bitmap, cliprect);
draw_sprites(screen.machine(), bitmap, cliprect, 0x07, 0);
diff --git a/src/mame/video/cps1.c b/src/mame/video/cps1.c
index 557c0d8ccbf..eed9ff2de0a 100644
--- a/src/mame/video/cps1.c
+++ b/src/mame/video/cps1.c
@@ -2298,7 +2298,7 @@ static void cps1_find_last_sprite( running_machine &machine ) /* Find the off
}
-static void cps1_render_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void cps1_render_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
cps_state *state = machine.driver_data<cps_state>();
@@ -2541,7 +2541,7 @@ static void cps2_find_last_sprite( running_machine &machine ) /* Find the off
state->m_cps2_last_sprite_offset = state->m_cps2_obj_size / 2 - 4;
}
-static void cps2_render_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int *primasks )
+static void cps2_render_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int *primasks )
{
cps_state *state = machine.driver_data<cps_state>();
@@ -2690,7 +2690,7 @@ static void cps2_render_sprites( running_machine &machine, bitmap_t *bitmap, con
-static void cps1_render_stars( screen_device &screen, bitmap_t *bitmap, const rectangle &cliprect )
+static void cps1_render_stars( screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect )
{
cps_state *state = screen.machine().driver_data<cps_state>();
int offs;
@@ -2725,7 +2725,7 @@ static void cps1_render_stars( screen_device &screen, bitmap_t *bitmap, const re
if (sx >= cliprect.min_x && sx <= cliprect.max_x &&
sy >= cliprect.min_y && sy <= cliprect.max_y)
- bitmap->pix16(sy, sx) = 0xa00 + col;
+ bitmap.pix16(sy, sx) = 0xa00 + col;
}
}
}
@@ -2751,14 +2751,14 @@ static void cps1_render_stars( screen_device &screen, bitmap_t *bitmap, const re
if (sx >= cliprect.min_x && sx <= cliprect.max_x &&
sy >= cliprect.min_y && sy <= cliprect.max_y)
- bitmap->pix16(sy, sx) = 0x800 + col;
+ bitmap.pix16(sy, sx) = 0x800 + col;
}
}
}
}
-static void cps1_render_layer( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int layer, int primask )
+static void cps1_render_layer( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int layer, int primask )
{
cps_state *state = machine.driver_data<cps_state>();
switch (layer)
@@ -2774,9 +2774,10 @@ static void cps1_render_layer( running_machine &machine, bitmap_t *bitmap, const
}
}
-static void cps1_render_high_layer( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int layer )
+static void cps1_render_high_layer( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int layer )
{
cps_state *state = machine.driver_data<cps_state>();
+ bitmap_t dummy_bitmap;
switch (layer)
{
case 0:
@@ -2785,7 +2786,7 @@ static void cps1_render_high_layer( running_machine &machine, bitmap_t *bitmap,
case 1:
case 2:
case 3:
- tilemap_draw(NULL, cliprect, state->m_bg_tilemap[layer - 1], TILEMAP_DRAW_LAYER0, 1);
+ tilemap_draw(dummy_bitmap, cliprect, state->m_bg_tilemap[layer - 1], TILEMAP_DRAW_LAYER0, 1);
break;
}
}
@@ -2851,7 +2852,7 @@ SCREEN_UPDATE( cps1 )
{
// CPS1 games use pen 0xbff as background color; this is used in 3wonders,
// mtwins (explosion during attract), mercs (intermission).
- bitmap->fill(0xbff, cliprect);
+ bitmap.fill(0xbff, cliprect);
}
else
{
@@ -2860,7 +2861,7 @@ SCREEN_UPDATE( cps1 )
// Maybe Capcom changed the background handling due to the problems that
// it caused on several monitors (because the background extended into the
// blanking area instead of going black, causing the monitor to clip).
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
}
cps1_render_stars(screen, bitmap, cliprect);
@@ -2870,7 +2871,7 @@ SCREEN_UPDATE( cps1 )
l1 = (layercontrol >> 0x08) & 03;
l2 = (layercontrol >> 0x0a) & 03;
l3 = (layercontrol >> 0x0c) & 03;
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
if (state->m_cps_version == 1)
{
diff --git a/src/mame/video/crbaloon.c b/src/mame/video/crbaloon.c
index 53181f213f7..1b27d9db381 100644
--- a/src/mame/video/crbaloon.c
+++ b/src/mame/video/crbaloon.c
@@ -95,7 +95,7 @@ void crbaloon_set_clear_collision_address(running_machine &machine, int _crbaloo
-static void draw_sprite_and_check_collision(running_machine &machine, bitmap_t *bitmap)
+static void draw_sprite_and_check_collision(running_machine &machine, bitmap_t &bitmap)
{
crbaloon_state *state = machine.driver_data<crbaloon_state>();
int y;
@@ -131,12 +131,12 @@ static void draw_sprite_and_check_collision(running_machine &machine, bitmap_t *
/* draw the current pixel, but check collision first */
if (bit)
{
- if (bitmap->pix16(sy, sx) & 0x01)
+ if (bitmap.pix16(sy, sx) & 0x01)
/* compute the collision address -- the +1 is via observation
of the game code, probably wrong for cocktail mode */
state->m_collision_address = ((((sy ^ 0xff) >> 3) << 5) | ((sx ^ 0xff) >> 3)) + 1;
- bitmap->pix16(sy, sx) = (color << 1) | 1;
+ bitmap.pix16(sy, sx) = (color << 1) | 1;
}
sx = sx + 1;
diff --git a/src/mame/video/crgolf.c b/src/mame/video/crgolf.c
index afccd126f92..5a22108ceeb 100644
--- a/src/mame/video/crgolf.c
+++ b/src/mame/video/crgolf.c
@@ -165,7 +165,7 @@ static SCREEN_UPDATE( crgolf )
if (*state->m_color_select)
color = color | 0x10;
- bitmap->pix32(y, x) = pens[color];
+ bitmap.pix32(y, x) = pens[color];
/* next pixel */
data_a0 = data_a0 << 1;
diff --git a/src/mame/video/crospang.c b/src/mame/video/crospang.c
index 10a84b76757..c18b252f9fb 100644
--- a/src/mame/video/crospang.c
+++ b/src/mame/video/crospang.c
@@ -140,7 +140,7 @@ static TILE_GET_INFO( get_fg_tile_info )
*/
/* jumpkids / tumbleb.c! */
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
crospang_state *state = machine.driver_data<crospang_state>();
int offs;
diff --git a/src/mame/video/crshrace.c b/src/mame/video/crshrace.c
index 78eacc1ca30..25c35de3ad5 100644
--- a/src/mame/video/crshrace.c
+++ b/src/mame/video/crshrace.c
@@ -99,7 +99,7 @@ WRITE16_HANDLER( crshrace_gfxctrl_w )
***************************************************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect)
{
crshrace_state *state = machine.driver_data<crshrace_state>();
UINT16 *buffered_spriteram = machine.generic.buffered_spriteram.u16;
@@ -171,14 +171,14 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectan
}
-static void draw_bg( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_bg( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
crshrace_state *state = machine.driver_data<crshrace_state>();
tilemap_draw(bitmap, cliprect, state->m_tilemap2, 0, 0);
}
-static void draw_fg(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_fg(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
crshrace_state *state = machine.driver_data<crshrace_state>();
k053936_zoom_draw(state->m_k053936, bitmap, cliprect, state->m_tilemap1, 0, 0, 1);
@@ -191,11 +191,11 @@ SCREEN_UPDATE( crshrace )
if (state->m_gfxctrl & 0x04) /* display disable? */
{
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
return 0;
}
- bitmap->fill(0x1ff, cliprect);
+ bitmap.fill(0x1ff, cliprect);
switch (state->m_gfxctrl & 0xfb)
{
diff --git a/src/mame/video/cvs.c b/src/mame/video/cvs.c
index c6c59e8f88d..9f32c7746a5 100644
--- a/src/mame/video/cvs.c
+++ b/src/mame/video/cvs.c
@@ -193,7 +193,6 @@ SCREEN_UPDATE( cvs )
static const int ram_based_char_start_indices[] = { 0xe0, 0xc0, 0x100, 0x80 };
offs_t offs;
int scroll[8];
- bitmap_t *s2636_0_bitmap, *s2636_1_bitmap, *s2636_2_bitmap;
set_pens(screen.machine());
@@ -209,7 +208,7 @@ SCREEN_UPDATE( cvs )
int gfxnum = (code < ram_based_char_start_indices[state->m_character_banking_mode]) ? 0 : 1;
- drawgfx_opaque(state->m_background_bitmap, state->m_background_bitmap->cliprect(), screen.machine().gfx[gfxnum],
+ drawgfx_opaque(*state->m_background_bitmap, state->m_background_bitmap->cliprect(), screen.machine().gfx[gfxnum],
code, color,
0, 0,
x, y);
@@ -225,7 +224,7 @@ SCREEN_UPDATE( cvs )
collision_color = 0x102;
}
- drawgfx_opaque(state->m_collision_background, state->m_collision_background->cliprect(), screen.machine().gfx[gfxnum],
+ drawgfx_opaque(*state->m_collision_background, state->m_collision_background->cliprect(), screen.machine().gfx[gfxnum],
code, collision_color,
0, 0,
x, y);
@@ -242,13 +241,13 @@ SCREEN_UPDATE( cvs )
scroll[6] = 0;
scroll[7] = 0;
- copyscrollbitmap(bitmap, state->m_background_bitmap, 0, 0, 8, scroll, cliprect);
- copyscrollbitmap(state->m_scrolled_collision_background, state->m_collision_background, 0, 0, 8, scroll, cliprect);
+ copyscrollbitmap(bitmap, *state->m_background_bitmap, 0, 0, 8, scroll, cliprect);
+ copyscrollbitmap(*state->m_scrolled_collision_background, *state->m_collision_background, 0, 0, 8, scroll, cliprect);
/* update the S2636 chips */
- s2636_0_bitmap = s2636_update(state->m_s2636_0, cliprect);
- s2636_1_bitmap = s2636_update(state->m_s2636_1, cliprect);
- s2636_2_bitmap = s2636_update(state->m_s2636_2, cliprect);
+ bitmap_t &s2636_0_bitmap = s2636_update(state->m_s2636_0, cliprect);
+ bitmap_t &s2636_1_bitmap = s2636_update(state->m_s2636_1, cliprect);
+ bitmap_t &s2636_2_bitmap = s2636_update(state->m_s2636_2, cliprect);
/* Bullet Hardware */
for (offs = 8; offs < 256; offs++ )
@@ -261,16 +260,16 @@ SCREEN_UPDATE( cvs )
int bx = 255 - 7 - state->m_bullet_ram[offs] - ct;
/* Bullet/Object Collision */
- if ((s2636_0_bitmap->pix16(offs, bx) != 0) ||
- (s2636_1_bitmap->pix16(offs, bx) != 0) ||
- (s2636_2_bitmap->pix16(offs, bx) != 0))
+ if ((s2636_0_bitmap.pix16(offs, bx) != 0) ||
+ (s2636_1_bitmap.pix16(offs, bx) != 0) ||
+ (s2636_2_bitmap.pix16(offs, bx) != 0))
state->m_collision_register |= 0x08;
/* Bullet/Background Collision */
if (colortable_entry_get_value(screen.machine().colortable, state->m_scrolled_collision_background->pix16(offs, bx)))
state->m_collision_register |= 0x80;
- bitmap->pix16(offs, bx) = BULLET_STAR_PEN;
+ bitmap.pix16(offs, bx) = BULLET_STAR_PEN;
}
}
}
@@ -286,15 +285,15 @@ SCREEN_UPDATE( cvs )
for (x = cliprect.min_x; x <= cliprect.max_x; x++)
{
- int pixel0 = s2636_0_bitmap->pix16(y, x);
- int pixel1 = s2636_1_bitmap->pix16(y, x);
- int pixel2 = s2636_2_bitmap->pix16(y, x);
+ int pixel0 = s2636_0_bitmap.pix16(y, x);
+ int pixel1 = s2636_1_bitmap.pix16(y, x);
+ int pixel2 = s2636_2_bitmap.pix16(y, x);
int pixel = pixel0 | pixel1 | pixel2;
if (S2636_IS_PIXEL_DRAWN(pixel))
{
- bitmap->pix16(y, x) = SPRITE_PEN_BASE + S2636_PIXEL_COLOR(pixel);
+ bitmap.pix16(y, x) = SPRITE_PEN_BASE + S2636_PIXEL_COLOR(pixel);
/* S2636 vs. S2636 collision detection */
if (S2636_IS_PIXEL_DRAWN(pixel0) && S2636_IS_PIXEL_DRAWN(pixel1)) state->m_collision_register |= 0x01;
@@ -330,8 +329,8 @@ SCREEN_UPDATE( cvs )
y = ~y;
if ((y >= cliprect.min_y) && (y <= cliprect.max_y) &&
- (colortable_entry_get_value(screen.machine().colortable, bitmap->pix16(y, x)) == 0))
- bitmap->pix16(y, x) = BULLET_STAR_PEN;
+ (colortable_entry_get_value(screen.machine().colortable, bitmap.pix16(y, x)) == 0))
+ bitmap.pix16(y, x) = BULLET_STAR_PEN;
}
}
}
diff --git a/src/mame/video/cyberbal.c b/src/mame/video/cyberbal.c
index ae301ca294f..96e7092dca8 100644
--- a/src/mame/video/cyberbal.c
+++ b/src/mame/video/cyberbal.c
@@ -332,7 +332,7 @@ void cyberbal_scanline_update(screen_device &screen, int scanline)
*
*************************************/
-static UINT32 update_one_screen(screen_device &screen, bitmap_t *bitmap, const rectangle &cliprect, int index)
+static UINT32 update_one_screen(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect, int index)
{
cyberbal_state *state = screen.machine().driver_data<cyberbal_state>();
atarimo_rect_list rectlist;
@@ -361,7 +361,7 @@ static UINT32 update_one_screen(screen_device &screen, bitmap_t *bitmap, const r
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
UINT16 *mo = &mobitmap->pix16(y);
- UINT16 *pf = &bitmap->pix16(y) + mooffset;
+ UINT16 *pf = &bitmap.pix16(y) + mooffset;
for (x = rectlist.rect->min_x; x <= rectlist.rect->max_x; x++)
if (mo[x])
{
diff --git a/src/mame/video/darius.c b/src/mame/video/darius.c
index 5594d2027d0..0002677dc6e 100644
--- a/src/mame/video/darius.c
+++ b/src/mame/video/darius.c
@@ -46,7 +46,7 @@ WRITE16_HANDLER( darius_fg_layer_w )
/***************************************************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int primask, int x_offs, int y_offs )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int primask, int x_offs, int y_offs )
{
darius_state *state = machine.driver_data<darius_state>();
UINT16 *spriteram = state->m_spriteram;
@@ -92,7 +92,7 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
-static UINT32 update_screen(screen_device &screen, bitmap_t *bitmap, const rectangle &cliprect, int xoffs)
+static UINT32 update_screen(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect, int xoffs)
{
darius_state *state = screen.machine().driver_data<darius_state>();
diff --git a/src/mame/video/darkmist.c b/src/mame/video/darkmist.c
index 03031995564..3a2a450f794 100644
--- a/src/mame/video/darkmist.c
+++ b/src/mame/video/darkmist.c
@@ -141,7 +141,7 @@ SCREEN_UPDATE( darkmist)
tilemap_set_scrollx(state->m_fgtilemap, 0, DM_GETSCROLL(0xa));
tilemap_set_scrolly(state->m_fgtilemap, 0, DM_GETSCROLL(0xe));
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
if(state->m_hw & DISPLAY_BG)
tilemap_draw(bitmap,cliprect,state->m_bgtilemap, 0,0);
diff --git a/src/mame/video/darkseal.c b/src/mame/video/darkseal.c
index 78132900944..c72b25e1f39 100644
--- a/src/mame/video/darkseal.c
+++ b/src/mame/video/darkseal.c
@@ -64,7 +64,7 @@ SCREEN_UPDATE( darkseal )
darkseal_state *state = screen.machine().driver_data<darkseal_state>();
tilemap_set_flip_all(screen.machine(),state->m_flipscreen ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0);
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
deco16ic_pf_update(state->m_deco_tilegen1, state->m_pf1_rowscroll, state->m_pf1_rowscroll);
deco16ic_pf_update(state->m_deco_tilegen2, state->m_pf3_rowscroll, state->m_pf3_rowscroll);
diff --git a/src/mame/video/dassault.c b/src/mame/video/dassault.c
index 319845ab94d..a1896e7c1b7 100644
--- a/src/mame/video/dassault.c
+++ b/src/mame/video/dassault.c
@@ -11,7 +11,7 @@
/******************************************************************************/
-static void draw_sprites( running_machine& machine, bitmap_t *bitmap, const rectangle &cliprect, int pf_priority )
+static void draw_sprites( running_machine& machine, bitmap_t &bitmap, const rectangle &cliprect, int pf_priority )
{
dassault_state *state = machine.driver_data<dassault_state>();
UINT16 *buffered_spriteram = machine.generic.buffered_spriteram.u16;
@@ -186,8 +186,8 @@ SCREEN_UPDATE( dassault )
/* Draw playfields/update priority bitmap */
decocomn_clear_sprite_priority_bitmap(state->m_decocomn);
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(screen.machine().pens[3072], cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(screen.machine().pens[3072], cliprect);
deco16ic_tilemap_2_draw(state->m_deco_tilegen2, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
/* The middle playfields can be swapped priority-wise */
diff --git a/src/mame/video/dbz.c b/src/mame/video/dbz.c
index a74a9216185..2ef48137e9b 100644
--- a/src/mame/video/dbz.c
+++ b/src/mame/video/dbz.c
@@ -135,7 +135,7 @@ SCREEN_UPDATE( dbz )
konami_sortlayers5(layer, state->m_layerpri);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
for (plane = 0; plane < 5; plane++)
{
diff --git a/src/mame/video/dc.c b/src/mame/video/dc.c
index 415a6d80f1a..1b28fb23232 100644
--- a/src/mame/video/dc.c
+++ b/src/mame/video/dc.c
@@ -132,7 +132,7 @@ static void pvr_accumulationbuffer_to_framebuffer(address_space *space, int x,in
// the real accumulation buffer is a 32x32x8bpp buffer into which tiles get rendered before they get copied to the framebuffer
// our implementation is not currently tile based, and thus the accumulation buffer is screen sized
static bitmap_t *fake_accumulationbuffer_bitmap;
-static void render_to_accumulation_buffer(running_machine &machine,bitmap_t *bitmap,const rectangle &cliprect);
+static void render_to_accumulation_buffer(running_machine &machine,bitmap_t &bitmap,const rectangle &cliprect);
typedef struct texinfo {
UINT32 address, vqbase;
@@ -1102,7 +1102,7 @@ WRITE64_HANDLER( pvr_ta_w )
// we've got a request to draw, so, draw to the accumulation buffer!
// this should really be done for each tile!
- render_to_accumulation_buffer(space->machine(),fake_accumulationbuffer_bitmap,clip);
+ render_to_accumulation_buffer(space->machine(),*fake_accumulationbuffer_bitmap,clip);
state->endofrender_timer_isp->adjust(attotime::from_usec(4000) ); // hack, make sure render takes some amount of time
@@ -1716,7 +1716,7 @@ static void computedilated(void)
dilatechose[(b << 3) + a]=3+(a < b ? a : b);
}
-static void render_hline(running_machine &machine,bitmap_t *bitmap, texinfo *ti, int y, float xl, float xr, float ul, float ur, float vl, float vr, float wl, float wr)
+static void render_hline(running_machine &machine,bitmap_t &bitmap, texinfo *ti, int y, float xl, float xr, float ul, float ur, float vl, float vr, float wl, float wr)
{
dc_state *state = machine.driver_data<dc_state>();
int xxl, xxr;
@@ -1753,7 +1753,7 @@ static void render_hline(running_machine &machine,bitmap_t *bitmap, texinfo *ti,
wl += ddx*dwdx;
- tdata = &bitmap->pix32(y, xxl);
+ tdata = &bitmap.pix32(y, xxl);
wbufline = &wbuffer[y][xxl];
while(xxl < xxr) {
@@ -1802,7 +1802,7 @@ static void render_hline(running_machine &machine,bitmap_t *bitmap, texinfo *ti,
}
}
-static void render_span(running_machine &machine, bitmap_t *bitmap, texinfo *ti,
+static void render_span(running_machine &machine, bitmap_t &bitmap, texinfo *ti,
float y0, float y1,
float xl, float xr,
float ul, float ur,
@@ -1901,7 +1901,7 @@ static void sort_vertices(const vert *v, int *i0, int *i1, int *i2)
}
-static void render_tri_sorted(running_machine &machine, bitmap_t *bitmap, texinfo *ti, const vert *v0, const vert *v1, const vert *v2)
+static void render_tri_sorted(running_machine &machine, bitmap_t &bitmap, texinfo *ti, const vert *v0, const vert *v1, const vert *v2)
{
float dy01, dy02, dy12;
// float dy; // unused, compiler complains about this
@@ -1967,7 +1967,7 @@ static void render_tri_sorted(running_machine &machine, bitmap_t *bitmap, texinf
}
}
-static void render_tri(running_machine &machine, bitmap_t *bitmap, texinfo *ti, const vert *v)
+static void render_tri(running_machine &machine, bitmap_t &bitmap, texinfo *ti, const vert *v)
{
int i0, i1, i2;
@@ -1975,7 +1975,7 @@ static void render_tri(running_machine &machine, bitmap_t *bitmap, texinfo *ti,
render_tri_sorted(machine, bitmap, ti, v+i0, v+i1, v+i2);
}
-static void render_to_accumulation_buffer(running_machine &machine,bitmap_t *bitmap,const rectangle &cliprect)
+static void render_to_accumulation_buffer(running_machine &machine,bitmap_t &bitmap,const rectangle &cliprect)
{
dc_state *state = machine.driver_data<dc_state>();
address_space *space = machine.device("maincpu")->memory().space(AS_PROGRAM);
@@ -1996,7 +1996,7 @@ static void render_to_accumulation_buffer(running_machine &machine,bitmap_t *bit
rs=state_ta.renderselect;
c=state->pvrta_regs[ISP_BACKGND_T];
c=space->read_dword(0x05000000+((c&0xfffff8)>>1)+(3+3)*4);
- bitmap->fill(c, cliprect);
+ bitmap.fill(c, cliprect);
ns=state_ta.grab[rs].strips_size;
@@ -2204,7 +2204,7 @@ static void pvr_accumulationbuffer_to_framebuffer(address_space *space, int x,in
}
-static void pvr_drawframebuffer(running_machine &machine,bitmap_t *bitmap,const rectangle &cliprect)
+static void pvr_drawframebuffer(running_machine &machine,bitmap_t &bitmap,const rectangle &cliprect)
{
dc_state *state = machine.driver_data<dc_state>();
@@ -2239,7 +2239,7 @@ static void pvr_drawframebuffer(running_machine &machine,bitmap_t *bitmap,const
{
for (x=0;x < xi;x++)
{
- fbaddr=&bitmap->pix32(y, x*2+0);
+ fbaddr=&bitmap.pix32(y, x*2+0);
c=*(((UINT16 *)state->dc_framebuffer_ram) + (WORD2_XOR_LE(addrp) >> 1));
b = (c & 0x001f) << 3;
@@ -2249,7 +2249,7 @@ static void pvr_drawframebuffer(running_machine &machine,bitmap_t *bitmap,const
if (y<=cliprect.max_y)
*fbaddr = b | (g<<8) | (r<<16);
- fbaddr=&bitmap->pix32(y, x*2+1);
+ fbaddr=&bitmap.pix32(y, x*2+1);
if (y<=cliprect.max_y)
*fbaddr = b | (g<<8) | (r<<16);
addrp+=2;
@@ -2259,7 +2259,7 @@ static void pvr_drawframebuffer(running_machine &machine,bitmap_t *bitmap,const
{
for (x=0;x < xi;x++)
{
- fbaddr=&bitmap->pix32(y, x);
+ fbaddr=&bitmap.pix32(y, x);
c=*(((UINT16 *)state->dc_framebuffer_ram) + (WORD2_XOR_LE(addrp) >> 1));
b = (c & 0x001f) << 3;
@@ -2283,7 +2283,7 @@ static void pvr_drawframebuffer(running_machine &machine,bitmap_t *bitmap,const
{
for (x=0;x < xi;x++)
{
- fbaddr=&bitmap->pix32(y, x*2+0);
+ fbaddr=&bitmap.pix32(y, x*2+0);
c=*(((UINT16 *)state->dc_framebuffer_ram) + (WORD2_XOR_LE(addrp) >> 1));
b = (c & 0x001f) << 3;
@@ -2293,7 +2293,7 @@ static void pvr_drawframebuffer(running_machine &machine,bitmap_t *bitmap,const
if (y<=cliprect.max_y)
*fbaddr = b | (g<<8) | (r<<16);
- fbaddr=&bitmap->pix32(y, x*2+1);
+ fbaddr=&bitmap.pix32(y, x*2+1);
if (y<=cliprect.max_y)
*fbaddr = b | (g<<8) | (r<<16);
@@ -2305,7 +2305,7 @@ static void pvr_drawframebuffer(running_machine &machine,bitmap_t *bitmap,const
{
for (x=0;x < xi;x++)
{
- fbaddr=&bitmap->pix32(y, x);
+ fbaddr=&bitmap.pix32(y, x);
c=*(((UINT16 *)state->dc_framebuffer_ram) + (WORD2_XOR_LE(addrp) >> 1));
b = (c & 0x001f) << 3;
@@ -2328,7 +2328,7 @@ static void pvr_drawframebuffer(running_machine &machine,bitmap_t *bitmap,const
{
for (x=0;x < xi;x++)
{
- fbaddr=&bitmap->pix32(y, x*2+0);
+ fbaddr=&bitmap.pix32(y, x*2+0);
c=*(((UINT16 *)state->dc_framebuffer_ram) + (WORD2_XOR_LE(addrp) >> 1));
b = (c & 0x001f) << 3;
@@ -2338,7 +2338,7 @@ static void pvr_drawframebuffer(running_machine &machine,bitmap_t *bitmap,const
if (y<=cliprect.max_y)
*fbaddr = b | (g<<8) | (r<<16);
- fbaddr=&bitmap->pix32(y, x*2+1);
+ fbaddr=&bitmap.pix32(y, x*2+1);
if (y<=cliprect.max_y)
*fbaddr = b | (g<<8) | (r<<16);
@@ -2349,7 +2349,7 @@ static void pvr_drawframebuffer(running_machine &machine,bitmap_t *bitmap,const
{
for (x=0;x < xi;x++)
{
- fbaddr=&bitmap->pix32(y, x);
+ fbaddr=&bitmap.pix32(y, x);
c=*(((UINT16 *)state->dc_framebuffer_ram) + (WORD2_XOR_LE(addrp) >> 1));
b = (c & 0x001f) << 3;
@@ -2372,7 +2372,7 @@ static void pvr_drawframebuffer(running_machine &machine,bitmap_t *bitmap,const
{
for (x=0;x < xi;x++)
{
- fbaddr=&bitmap->pix32(y, x*2+0);
+ fbaddr=&bitmap.pix32(y, x*2+0);
c=*(((UINT16 *)state->dc_framebuffer_ram) + (WORD2_XOR_LE(addrp) >> 1));
b = (c & 0x001f) << 3;
@@ -2382,7 +2382,7 @@ static void pvr_drawframebuffer(running_machine &machine,bitmap_t *bitmap,const
if (y<=cliprect.max_y)
*fbaddr = b | (g<<8) | (r<<16);
- fbaddr=&bitmap->pix32(y, x*2+1);
+ fbaddr=&bitmap.pix32(y, x*2+1);
if (y<=cliprect.max_y)
*fbaddr = b | (g<<8) | (r<<16);
@@ -2393,7 +2393,7 @@ static void pvr_drawframebuffer(running_machine &machine,bitmap_t *bitmap,const
{
for (x=0;x < xi;x++)
{
- fbaddr=&bitmap->pix32(y, x);
+ fbaddr=&bitmap.pix32(y, x);
c=*(((UINT16 *)state->dc_framebuffer_ram) + (WORD2_XOR_LE(addrp) >> 1));
b = (c & 0x001f) << 3;
@@ -2673,13 +2673,13 @@ SCREEN_UPDATE(dc)
for (x = visarea->min_x ; x <= visarea->max_x ; x++)
{
UINT32* src = &fake_accumulationbuffer_bitmap->pix32(y, x);
- UINT32* dst = &bitmap->pix32(y, x);
+ UINT32* dst = &bitmap.pix32(y, x);
dst[0] = src[0];
}
}
#endif
- bitmap->fill(MAKE_ARGB(0xff,vo_border_R,vo_border_G,vo_border_B), cliprect); //FIXME: Chroma bit?
+ bitmap.fill(MAKE_ARGB(0xff,vo_border_R,vo_border_G,vo_border_B), cliprect); //FIXME: Chroma bit?
if(!spg_blank_video)
pvr_drawframebuffer(screen.machine(),bitmap,cliprect);
diff --git a/src/mame/video/dcheese.c b/src/mame/video/dcheese.c
index 2aa6a6c5573..db110a0b262 100644
--- a/src/mame/video/dcheese.c
+++ b/src/mame/video/dcheese.c
@@ -124,7 +124,7 @@ SCREEN_UPDATE( dcheese )
/* update the pixels */
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
- UINT16 *dest = &bitmap->pix16(y);
+ UINT16 *dest = &bitmap.pix16(y);
UINT16 *src = &state->m_dstbitmap->pix16((y + state->m_blitter_vidparam[0x28/2]) % DSTBITMAP_HEIGHT);
for (x = cliprect.min_x; x <= cliprect.max_x; x++)
diff --git a/src/mame/video/dcon.c b/src/mame/video/dcon.c
index 662778af2ec..f3deb21529c 100644
--- a/src/mame/video/dcon.c
+++ b/src/mame/video/dcon.c
@@ -151,7 +151,7 @@ VIDEO_START( dcon )
state->m_gfx_bank_select = 0;
}
-static void draw_sprites(running_machine& machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void draw_sprites(running_machine& machine, bitmap_t &bitmap,const rectangle &cliprect)
{
dcon_state *state = machine.driver_data<dcon_state>();
UINT16 *spriteram16 = state->m_spriteram;
@@ -280,7 +280,7 @@ static void draw_sprites(running_machine& machine, bitmap_t *bitmap,const rectan
SCREEN_UPDATE( dcon )
{
dcon_state *state = screen.machine().driver_data<dcon_state>();
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
/* Setup the tilemaps */
tilemap_set_scrollx( state->m_background_layer,0, state->m_scroll_ram[0] );
@@ -293,7 +293,7 @@ SCREEN_UPDATE( dcon )
if ((state->m_enable&1)!=1)
tilemap_draw(bitmap,cliprect,state->m_background_layer,0,0);
else
- bitmap->fill(15, cliprect); /* Should always be black, not pen 15 */
+ bitmap.fill(15, cliprect); /* Should always be black, not pen 15 */
tilemap_draw(bitmap,cliprect,state->m_midground_layer,0,1);
tilemap_draw(bitmap,cliprect,state->m_foreground_layer,0,2);
@@ -307,7 +307,7 @@ SCREEN_UPDATE( sdgndmps )
{
dcon_state *state = screen.machine().driver_data<dcon_state>();
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
/* Gfx banking */
if (state->m_last_gfx_bank!=state->m_gfx_bank_select)
@@ -329,7 +329,7 @@ SCREEN_UPDATE( sdgndmps )
if ((state->m_enable&1)!=1)
tilemap_draw(bitmap,cliprect,state->m_background_layer,0,0);
else
- bitmap->fill(15, cliprect); /* Should always be black, not pen 15 */
+ bitmap.fill(15, cliprect); /* Should always be black, not pen 15 */
tilemap_draw(bitmap,cliprect,state->m_midground_layer,0,1);
tilemap_draw(bitmap,cliprect,state->m_foreground_layer,0,2);
diff --git a/src/mame/video/dday.c b/src/mame/video/dday.c
index 2647dbd21f6..6692264d9df 100644
--- a/src/mame/video/dday.c
+++ b/src/mame/video/dday.c
@@ -319,31 +319,31 @@ SCREEN_UPDATE( dday )
{
dday_state *state = screen.machine().driver_data<dday_state>();
- tilemap_draw(state->m_main_bitmap, cliprect, state->m_bg_tilemap, TILEMAP_DRAW_LAYER1, 0);
- tilemap_draw(state->m_main_bitmap, cliprect, state->m_fg_tilemap, 0, 0);
- tilemap_draw(state->m_main_bitmap, cliprect, state->m_bg_tilemap, TILEMAP_DRAW_LAYER0, 0);
- tilemap_draw(state->m_main_bitmap, cliprect, state->m_text_tilemap, 0, 0);
+ tilemap_draw(*state->m_main_bitmap, cliprect, state->m_bg_tilemap, TILEMAP_DRAW_LAYER1, 0);
+ tilemap_draw(*state->m_main_bitmap, cliprect, state->m_fg_tilemap, 0, 0);
+ tilemap_draw(*state->m_main_bitmap, cliprect, state->m_bg_tilemap, TILEMAP_DRAW_LAYER0, 0);
+ tilemap_draw(*state->m_main_bitmap, cliprect, state->m_text_tilemap, 0, 0);
if (state->m_sl_enable)
{
/* apply shadow */
int x, y;
- bitmap_t *sl_bitmap = tilemap_get_pixmap(state->m_sl_tilemap);
+ bitmap_t &sl_bitmap = tilemap_get_pixmap(state->m_sl_tilemap);
for (x = cliprect.min_x; x <= cliprect.max_x; x++)
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
UINT16 src_pixel = state->m_main_bitmap->pix16(y, x);
- if (sl_bitmap->pix16(y, x) == 0xff)
+ if (sl_bitmap.pix16(y, x) == 0xff)
src_pixel += screen.machine().total_colors();
- bitmap->pix16(y, x) = src_pixel;
+ bitmap.pix16(y, x) = src_pixel;
}
}
else
- copybitmap(bitmap, state->m_main_bitmap, 0, 0, 0, 0, cliprect);
+ copybitmap(bitmap, *state->m_main_bitmap, 0, 0, 0, 0, cliprect);
return 0;
}
diff --git a/src/mame/video/ddragon.c b/src/mame/video/ddragon.c
index 3517132f0d1..c1f5696b9d3 100644
--- a/src/mame/video/ddragon.c
+++ b/src/mame/video/ddragon.c
@@ -154,7 +154,7 @@ WRITE8_HANDLER( ddragon_fgvideoram_w )
cliprect,gfx, \
(which + order),color,flipx,flipy,sx,sy,0);
-static void draw_sprites( running_machine& machine, bitmap_t *bitmap,const rectangle &cliprect )
+static void draw_sprites( running_machine& machine, bitmap_t &bitmap,const rectangle &cliprect )
{
ddragon_state *state = machine.driver_data<ddragon_state>();
const gfx_element *gfx = machine.gfx[1];
diff --git a/src/mame/video/ddragon3.c b/src/mame/video/ddragon3.c
index 24e16f97f59..d0277a6dd4f 100644
--- a/src/mame/video/ddragon3.c
+++ b/src/mame/video/ddragon3.c
@@ -116,7 +116,7 @@ VIDEO_START( ddragon3 )
* 6,7| unused
*/
-static void draw_sprites( running_machine& machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine& machine, bitmap_t &bitmap, const rectangle &cliprect )
{
ddragon3_state *state = machine.driver_data<ddragon3_state>();
UINT16 *source = state->m_spriteram;
diff --git a/src/mame/video/ddribble.c b/src/mame/video/ddribble.c
index d613ecf8a4c..a18a6af8bd8 100644
--- a/src/mame/video/ddribble.c
+++ b/src/mame/video/ddribble.c
@@ -176,7 +176,7 @@ byte #4: attributes
***************************************************************************/
-static void draw_sprites( running_machine& machine, bitmap_t *bitmap, const rectangle &cliprect, UINT8* source, int lenght, int gfxset, int flipscreen )
+static void draw_sprites( running_machine& machine, bitmap_t &bitmap, const rectangle &cliprect, UINT8* source, int lenght, int gfxset, int flipscreen )
{
gfx_element *gfx = machine.gfx[gfxset];
const UINT8 *finish = source + lenght;
diff --git a/src/mame/video/deadang.c b/src/mame/video/deadang.c
index 4a9e4eb1c8a..dfdfb2ae16d 100644
--- a/src/mame/video/deadang.c
+++ b/src/mame/video/deadang.c
@@ -87,7 +87,7 @@ VIDEO_START( deadang )
tilemap_set_transparent_pen(state->m_text_layer, 15);
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
deadang_state *state = machine.driver_data<deadang_state>();
UINT16 *spriteram16 = state->m_spriteram;
@@ -156,8 +156,8 @@ SCREEN_UPDATE( deadang )
tilemap_set_enable(state->m_pf2_layer,!(state->m_scroll_ram[0x34]&4));
flip_screen_set(screen.machine(), state->m_scroll_ram[0x34]&0x40 );
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
tilemap_draw(bitmap,cliprect,state->m_pf3_layer,0,1);
tilemap_draw(bitmap,cliprect,state->m_pf1_layer,0,2);
tilemap_draw(bitmap,cliprect,state->m_pf2_layer,0,4);
diff --git a/src/mame/video/dec0.c b/src/mame/video/dec0.c
index 1b41d617d42..c8f48bee4d5 100644
--- a/src/mame/video/dec0.c
+++ b/src/mame/video/dec0.c
@@ -157,7 +157,7 @@ SCREEN_UPDATE( birdtry )
/* This game doesn't have the extra playfield chip on the game board, but
the palette does show through. */
- bitmap->fill(screen.machine().pens[768], cliprect);
+ bitmap.fill(screen.machine().pens[768], cliprect);
screen.machine().device<deco_bac06_device>("tilegen2")->deco_bac06_pf_draw(screen.machine(),bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
screen.machine().device<deco_mxc06_device>("spritegen")->draw_sprites(screen.machine(), bitmap, cliprect, state->m_buffered_spriteram, 0x00, 0x00, 0x0f);
screen.machine().device<deco_bac06_device>("tilegen1")->deco_bac06_pf_draw(screen.machine(),bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
diff --git a/src/mame/video/dec8.c b/src/mame/video/dec8.c
index 415feda1ec2..fe19c3b1121 100644
--- a/src/mame/video/dec8.c
+++ b/src/mame/video/dec8.c
@@ -222,7 +222,7 @@ WRITE8_HANDLER( gondo_scroll_w )
/******************************************************************************/
-static void srdarwin_draw_sprites( running_machine& machine, bitmap_t *bitmap, const rectangle &cliprect, int pri )
+static void srdarwin_draw_sprites( running_machine& machine, bitmap_t &bitmap, const rectangle &cliprect, int pri )
{
UINT8 *buffered_spriteram = machine.generic.buffered_spriteram.u8;
int offs;
diff --git a/src/mame/video/decbac06.c b/src/mame/video/decbac06.c
index 56e687a116a..39a6497de08 100644
--- a/src/mame/video/decbac06.c
+++ b/src/mame/video/decbac06.c
@@ -191,7 +191,7 @@ void deco_bac06_device::device_reset()
void deco_bac06_device::custom_tilemap_draw(running_machine &machine,
- bitmap_t *bitmap,
+ bitmap_t &bitmap,
const rectangle &cliprect,
tilemap_t *tilemap_ptr,
const UINT16 *rowscroll_ptr,
@@ -205,8 +205,8 @@ void deco_bac06_device::custom_tilemap_draw(running_machine &machine,
UINT16 colpricondition
)
{
- const bitmap_t *src_bitmap = tilemap_get_pixmap(tilemap_ptr);
- const bitmap_t *flags_bitmap = tilemap_get_flagsmap(tilemap_ptr);
+ const bitmap_t &src_bitmap = tilemap_get_pixmap(tilemap_ptr);
+ const bitmap_t &flags_bitmap = tilemap_get_flagsmap(tilemap_ptr);
int x, y, p, colpri;
int column_offset=0, src_x=0, src_y=0;
UINT32 scrollx = 0;
@@ -229,11 +229,8 @@ void deco_bac06_device::custom_tilemap_draw(running_machine &machine,
col_scroll_enabled = (colscroll_ptr && (control0[0]&0x8));
}
- if (!src_bitmap)
- return;
-
- width_mask = src_bitmap->width() - 1;
- height_mask = src_bitmap->height() - 1;
+ width_mask = src_bitmap.width() - 1;
+ height_mask = src_bitmap.height() - 1;
/* Column scroll & row scroll may per applied per pixel, there are
shift registers for each which control the granularity of the row/col
@@ -254,7 +251,7 @@ void deco_bac06_device::custom_tilemap_draw(running_machine &machine,
*/
if (flip_screen_get(machine))
- src_y = (src_bitmap->height() - 256) - scrolly;
+ src_y = (src_bitmap.height() - 256) - scrolly;
else
src_y = scrolly;
@@ -265,14 +262,14 @@ void deco_bac06_device::custom_tilemap_draw(running_machine &machine,
src_x=scrollx;
if (flip_screen_get(machine))
- src_x=(src_bitmap->width() - 256) - src_x;
+ src_x=(src_bitmap.width() - 256) - src_x;
for (x=0; x<=cliprect.max_x; x++) {
if (col_scroll_enabled)
column_offset=colscroll_ptr[((src_x >> 3) >> (control1[2]&0xf))&(0x3f>>(control1[2]&0xf))];
- p = src_bitmap->pix16((src_y + column_offset)&height_mask, src_x&width_mask);
- colpri = flags_bitmap->pix8((src_y + column_offset)&height_mask, src_x&width_mask)&0xf;
+ p = src_bitmap.pix16((src_y + column_offset)&height_mask, src_x&width_mask);
+ colpri = flags_bitmap.pix8((src_y + column_offset)&height_mask, src_x&width_mask)&0xf;
src_x++;
if ((flags&TILEMAP_DRAW_OPAQUE) || (p&m_bppmask))
@@ -281,14 +278,14 @@ void deco_bac06_device::custom_tilemap_draw(running_machine &machine,
if ((p&penmask)==pencondition)
if((colpri&colprimask)==colpricondition)
- bitmap->pix16(y, x) = p+(colpri&m_gfxcolmask)*m_bppmult;
+ bitmap.pix16(y, x) = p+(colpri&m_gfxcolmask)*m_bppmult;
}
}
src_y++;
}
}
-void deco_bac06_device::deco_bac06_pf_draw(running_machine &machine,bitmap_t *bitmap,const rectangle &cliprect,int flags,UINT16 penmask, UINT16 pencondition,UINT16 colprimask, UINT16 colpricondition)
+void deco_bac06_device::deco_bac06_pf_draw(running_machine &machine,bitmap_t &bitmap,const rectangle &cliprect,int flags,UINT16 penmask, UINT16 pencondition,UINT16 colprimask, UINT16 colpricondition)
{
tilemap_t* tm = 0;
@@ -322,7 +319,7 @@ void deco_bac06_device::deco_bac06_pf_draw(running_machine &machine,bitmap_t *bi
}
// used for pocket gal bootleg, which doesn't set registers properly and simply expects a fixed size tilemap.
-void deco_bac06_device::deco_bac06_pf_draw_bootleg(running_machine &machine,bitmap_t *bitmap,const rectangle &cliprect,int flags, int mode, int type)
+void deco_bac06_device::deco_bac06_pf_draw_bootleg(running_machine &machine,bitmap_t &bitmap,const rectangle &cliprect,int flags, int mode, int type)
{
tilemap_t* tm = 0;
if (!mode) tm = pf8x8_tilemap[type];
diff --git a/src/mame/video/decbac06.h b/src/mame/video/decbac06.h
index eb53c99462e..13ec1075f1c 100644
--- a/src/mame/video/decbac06.h
+++ b/src/mame/video/decbac06.h
@@ -21,8 +21,8 @@ public:
UINT16 pf_control_0[8];
UINT16 pf_control_1[8];
- void deco_bac06_pf_draw(running_machine &machine,bitmap_t *bitmap,const rectangle &cliprect,int flags,UINT16 penmask, UINT16 pencondition,UINT16 colprimask, UINT16 colpricondition);
- void deco_bac06_pf_draw_bootleg(running_machine &machine,bitmap_t *bitmap,const rectangle &cliprect,int flags, int mode, int type);
+ void deco_bac06_pf_draw(running_machine &machine,bitmap_t &bitmap,const rectangle &cliprect,int flags,UINT16 penmask, UINT16 pencondition,UINT16 colprimask, UINT16 colpricondition);
+ void deco_bac06_pf_draw_bootleg(running_machine &machine,bitmap_t &bitmap,const rectangle &cliprect,int flags, int mode, int type);
UINT8 get_flip_state(void) { return pf_control_0[0]&0x80; };
void set_colmask(int data) { m_gfxcolmask = data; }
@@ -42,7 +42,7 @@ protected:
UINT8 m_bppmask;
void custom_tilemap_draw(running_machine &machine,
- bitmap_t *bitmap,
+ bitmap_t &bitmap,
const rectangle &cliprect,
tilemap_t *tilemap_ptr,
const UINT16 *rowscroll_ptr,
diff --git a/src/mame/video/deckarn.c b/src/mame/video/deckarn.c
index 317f81f5ef4..cb3b5aac4aa 100644
--- a/src/mame/video/deckarn.c
+++ b/src/mame/video/deckarn.c
@@ -28,7 +28,7 @@ void deco_karnovsprites_device::device_reset()
}
-void deco_karnovsprites_device::draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, UINT16* spriteram, int size, int priority )
+void deco_karnovsprites_device::draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, UINT16* spriteram, int size, int priority )
{
int offs;
diff --git a/src/mame/video/deckarn.h b/src/mame/video/deckarn.h
index 2bd8306c0ad..60bc9b38a70 100644
--- a/src/mame/video/deckarn.h
+++ b/src/mame/video/deckarn.h
@@ -5,7 +5,7 @@ class deco_karnovsprites_device : public device_t
public:
deco_karnovsprites_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
void set_gfxregion(int region) { m_gfxregion = region; };
- void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, UINT16* spriteram, int size, int priority );
+ void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, UINT16* spriteram, int size, int priority );
static void set_gfx_region(device_t &device, int region);
protected:
diff --git a/src/mame/video/decmxc06.c b/src/mame/video/decmxc06.c
index 997d6fdcd49..7d3c2b7026f 100644
--- a/src/mame/video/decmxc06.c
+++ b/src/mame/video/decmxc06.c
@@ -55,7 +55,7 @@ deco_mxc06_device::deco_mxc06_device(const machine_config &mconfig, const char *
/* this implementation was originally from Mad Motor */
-void deco_mxc06_device::draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, UINT16* spriteram, int pri_mask, int pri_val, int col_mask )
+void deco_mxc06_device::draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, UINT16* spriteram, int pri_mask, int pri_val, int col_mask )
{
int offs;
diff --git a/src/mame/video/decmxc06.h b/src/mame/video/decmxc06.h
index a5cdcadb7d8..6bb82ce558d 100644
--- a/src/mame/video/decmxc06.h
+++ b/src/mame/video/decmxc06.h
@@ -7,7 +7,7 @@ public:
deco_mxc06_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
static void set_gfx_region(device_t &device, int region);
void set_gfxregion(int region) { m_gfxregion = region; };
- void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, UINT16* spriteram16, int pri_mask, int pri_val, int col_mask );
+ void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, UINT16* spriteram16, int pri_mask, int pri_val, int col_mask );
void set_pri_type( int type ) { m_priority_type = type; }
protected:
virtual void device_start();
diff --git a/src/mame/video/deco16ic.c b/src/mame/video/deco16ic.c
index 03ecba6d804..25f197a0f44 100644
--- a/src/mame/video/deco16ic.c
+++ b/src/mame/video/deco16ic.c
@@ -357,7 +357,7 @@ static TILE_GET_INFO_DEVICE( get_pf1_tile_info_b )
static void custom_tilemap_draw(
device_t *device,
- bitmap_t *bitmap,
+ bitmap_t &bitmap,
const rectangle &cliprect,
tilemap_t *tilemap0_8x8,
tilemap_t *tilemap0_16x16,
@@ -379,8 +379,8 @@ static void custom_tilemap_draw(
running_machine &machine = device->machine();
tilemap_t *tilemap0 = BIT(control1, 7) ? tilemap0_8x8 : tilemap0_16x16;
tilemap_t *tilemap1 = BIT(control1, 7) ? tilemap1_8x8 : tilemap1_16x16;
- const bitmap_t *src_bitmap0 = tilemap0 ? tilemap_get_pixmap(tilemap0) : NULL;
- const bitmap_t *src_bitmap1 = tilemap1 ? tilemap_get_pixmap(tilemap1) : NULL;
+ const bitmap_t *src_bitmap0 = tilemap0 ? &tilemap_get_pixmap(tilemap0) : NULL;
+ const bitmap_t *src_bitmap1 = tilemap1 ? &tilemap_get_pixmap(tilemap1) : NULL;
int width_mask, height_mask, x, y, p;
int column_offset, src_x = 0, src_y = 0;
int row_type = 1 << ((control0 >> 3) & 0xf);
@@ -410,7 +410,7 @@ static void custom_tilemap_draw(
src_x &= width_mask;
- if (bitmap->bpp() == 16)
+ if (bitmap.bpp() == 16)
{
for (x = 0; x < 320; x++)
{
@@ -430,10 +430,10 @@ static void custom_tilemap_draw(
if ((flags & TILEMAP_DRAW_OPAQUE) || (p & trans_mask))
{
- bitmap->pix16(y, x) = machine.pens[p];
- if (machine.priority_bitmap)
+ bitmap.pix16(y, x) = machine.pens[p];
+ if (machine.priority_bitmap.valid())
{
- UINT8 *pri = &machine.priority_bitmap->pix8(y);
+ UINT8 *pri = &machine.priority_bitmap.pix8(y);
pri[x] |= priority;
}
}
@@ -468,10 +468,10 @@ static void custom_tilemap_draw(
if ((flags & TILEMAP_DRAW_OPAQUE) || (p & trans_mask))
{
- bitmap->pix32(y, x) = machine.pens[p];
- if (machine.priority_bitmap)
+ bitmap.pix32(y, x) = machine.pens[p];
+ if (machine.priority_bitmap.valid())
{
- UINT8 *pri = &machine.priority_bitmap->pix8(y);
+ UINT8 *pri = &machine.priority_bitmap.pix8(y);
pri[x] |= priority;
}
}
@@ -841,7 +841,7 @@ void deco16ic_pf_update( device_t *device, const UINT16 *rowscroll_1_ptr, const
/*****************************************************************************************/
-void deco16ic_print_debug_info(device_t *device, bitmap_t *bitmap)
+void deco16ic_print_debug_info(device_t *device, bitmap_t &bitmap)
{
deco16ic_state *deco16ic = get_safe_token(device);
char buf[64*5];
@@ -862,7 +862,7 @@ void deco16ic_print_debug_info(device_t *device, bitmap_t *bitmap)
/*****************************************************************************************/
-void deco16ic_tilemap_1_draw( device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int flags, UINT32 priority )
+void deco16ic_tilemap_1_draw( device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int flags, UINT32 priority )
{
deco16ic_state *deco16ic = get_safe_token(device);
@@ -879,7 +879,7 @@ void deco16ic_tilemap_1_draw( device_t *device, bitmap_t *bitmap, const rectangl
}
}
-void deco16ic_tilemap_2_draw(device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int flags, UINT32 priority)
+void deco16ic_tilemap_2_draw(device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int flags, UINT32 priority)
{
deco16ic_state *deco16ic = get_safe_token(device);
@@ -900,7 +900,7 @@ void deco16ic_tilemap_2_draw(device_t *device, bitmap_t *bitmap, const rectangle
/*****************************************************************************************/
// Combines the output of two 4BPP tilemaps into an 8BPP tilemap
-void deco16ic_tilemap_12_combine_draw(device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int flags, UINT32 priority, int is_tattoo)
+void deco16ic_tilemap_12_combine_draw(device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int flags, UINT32 priority, int is_tattoo)
{
deco16ic_state *deco16ic = get_safe_token(device);
custom_tilemap_draw(device, bitmap, cliprect, 0, deco16ic->pf1_tilemap_16x16, 0, deco16ic->pf2_tilemap_16x16, deco16ic->pf1_rowscroll_ptr, deco16ic->pf12_control[1], deco16ic->pf12_control[2], deco16ic->pf12_control[5] & 0xff, deco16ic->pf12_control[6] & 0xff, 0xf, 4, 0xff, flags, priority, is_tattoo);
diff --git a/src/mame/video/deco16ic.h b/src/mame/video/deco16ic.h
index 42697a84f70..259d6a790ec 100644
--- a/src/mame/video/deco16ic.h
+++ b/src/mame/video/deco16ic.h
@@ -70,15 +70,15 @@ WRITE32_DEVICE_HANDLER( deco16ic_pf_control_dword_w );
READ32_DEVICE_HANDLER( deco16ic_pf_control_dword_r );
-void deco16ic_print_debug_info(device_t *device, bitmap_t *bitmap);
+void deco16ic_print_debug_info(device_t *device, bitmap_t &bitmap);
void deco16ic_pf_update(device_t *device, const UINT16 *rowscroll_1_ptr, const UINT16 *rowscroll_2_ptr);
-void deco16ic_tilemap_1_draw(device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int flags, UINT32 priority);
-void deco16ic_tilemap_2_draw(device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int flags, UINT32 priority);
+void deco16ic_tilemap_1_draw(device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int flags, UINT32 priority);
+void deco16ic_tilemap_2_draw(device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int flags, UINT32 priority);
/* used by boogwing, nitrobal */
-void deco16ic_tilemap_12_combine_draw(device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int flags, UINT32 priority, int is_tattoo = false);
+void deco16ic_tilemap_12_combine_draw(device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int flags, UINT32 priority, int is_tattoo = false);
/* used by robocop2 */
void deco16ic_set_tilemap_colour_mask(device_t *device, int tmap, int mask);
diff --git a/src/mame/video/deco32.c b/src/mame/video/deco32.c
index b91690bd7a0..64aaf270913 100644
--- a/src/mame/video/deco32.c
+++ b/src/mame/video/deco32.c
@@ -152,7 +152,7 @@ WRITE32_HANDLER( deco32_palette_dma_w )
INLINE void dragngun_drawgfxzoom(
- bitmap_t *dest_bmp,const rectangle &clip,const gfx_element *gfx,
+ bitmap_t &dest_bmp,const rectangle &clip,const gfx_element *gfx,
UINT32 code,UINT32 color,int flipx,int flipy,int sx,int sy,
int transparent_color,
int scalex, int scaley,bitmap_t *pri_buffer,UINT32 pri_mask, int sprite_screen_width, int sprite_screen_height, UINT8 alpha )
@@ -170,7 +170,7 @@ INLINE void dragngun_drawgfxzoom(
/* KW 991012 -- Added code to force clip to bitmap boundary */
myclip = clip;
- myclip &= dest_bmp->cliprect();
+ myclip &= dest_bmp.cliprect();
{
if( gfx )
@@ -246,7 +246,7 @@ INLINE void dragngun_drawgfxzoom(
for( y=sy; y<ey; y++ )
{
const UINT8 *source = code_base + (y_index>>16) * gfx->line_modulo;
- UINT32 *dest = &dest_bmp->pix32(y);
+ UINT32 *dest = &dest_bmp.pix32(y);
UINT8 *pri = &pri_buffer->pix8(y);
int x, x_index = x_index_base;
@@ -270,7 +270,7 @@ INLINE void dragngun_drawgfxzoom(
for( y=sy; y<ey; y++ )
{
const UINT8 *source = code_base + (y_index>>16) * gfx->line_modulo;
- UINT32 *dest = &dest_bmp->pix32(y);
+ UINT32 *dest = &dest_bmp.pix32(y);
int x, x_index = x_index_base;
for( x=sx; x<ex; x++ )
@@ -293,7 +293,7 @@ INLINE void dragngun_drawgfxzoom(
for( y=sy; y<ey; y++ )
{
const UINT8 *source = code_base + (y_index>>16) * gfx->line_modulo;
- UINT32 *dest = &dest_bmp->pix32(y);
+ UINT32 *dest = &dest_bmp.pix32(y);
UINT8 *pri = &pri_buffer->pix8(y);
int x, x_index = x_index_base;
@@ -317,7 +317,7 @@ INLINE void dragngun_drawgfxzoom(
for( y=sy; y<ey; y++ )
{
const UINT8 *source = code_base + (y_index>>16) * gfx->line_modulo;
- UINT32 *dest = &dest_bmp->pix32(y);
+ UINT32 *dest = &dest_bmp.pix32(y);
int x, x_index = x_index_base;
for( x=sx; x<ex; x++ )
@@ -337,7 +337,7 @@ INLINE void dragngun_drawgfxzoom(
}
}
-static void dragngun_draw_sprites(running_machine& machine, bitmap_t *bitmap, const rectangle &cliprect, const UINT32 *spritedata)
+static void dragngun_draw_sprites(running_machine& machine, bitmap_t &bitmap, const rectangle &cliprect, const UINT32 *spritedata)
{
dragngun_state *state = machine.driver_data<dragngun_state>();
const UINT32 *layout_ram;
@@ -589,8 +589,8 @@ SCREEN_UPDATE( captaven )
tilemap_set_flip_all(screen.machine(),flip_screen_get(screen.machine()) ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0);
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(screen.machine().pens[0x000], cliprect); // Palette index not confirmed
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(screen.machine().pens[0x000], cliprect); // Palette index not confirmed
deco16ic_set_pf1_8bpp_mode(state->m_deco_tilegen2, 1);
@@ -624,7 +624,7 @@ SCREEN_UPDATE( dragngun )
state->m_deco_tilegen1 = screen.machine().device("tilegen1");
state->m_deco_tilegen2 = screen.machine().device("tilegen2");
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
deco16ic_pf_update(state->m_deco_tilegen1, state->m_pf1_rowscroll, state->m_pf2_rowscroll);
deco16ic_pf_update(state->m_deco_tilegen2, state->m_pf3_rowscroll, state->m_pf4_rowscroll);
@@ -668,8 +668,8 @@ SCREEN_UPDATE( fghthist )
state->m_deco_tilegen1 = screen.machine().device("tilegen1");
state->m_deco_tilegen2 = screen.machine().device("tilegen2");
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(screen.machine().pens[0x000], cliprect); // Palette index not confirmed
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(screen.machine().pens[0x000], cliprect); // Palette index not confirmed
deco16ic_pf_update(state->m_deco_tilegen1, state->m_pf1_rowscroll, state->m_pf2_rowscroll);
deco16ic_pf_update(state->m_deco_tilegen2, state->m_pf3_rowscroll, state->m_pf4_rowscroll);
@@ -706,7 +706,7 @@ SCREEN_UPDATE( fghthist )
blending support - it can't be done in-place on the final framebuffer
without a lot of support bitmaps.
*/
-static void mixDualAlphaSprites(bitmap_t *bitmap, const rectangle &cliprect, const gfx_element *gfx0, const gfx_element *gfx1, int mixAlphaTilemap)
+static void mixDualAlphaSprites(bitmap_t &bitmap, const rectangle &cliprect, const gfx_element *gfx0, const gfx_element *gfx1, int mixAlphaTilemap)
{
deco32_state *state = gfx0->machine().driver_data<deco32_state>();
running_machine &machine = gfx0->machine();
@@ -721,10 +721,10 @@ static void mixDualAlphaSprites(bitmap_t *bitmap, const rectangle &cliprect, con
/* Mix sprites into main bitmap, based on priority & alpha */
for (y=8; y<248; y++) {
- UINT8* tilemapPri=&machine.priority_bitmap->pix8(y);
+ UINT8* tilemapPri=&machine.priority_bitmap.pix8(y);
UINT16* sprite0=&sprite0_mix_bitmap->pix16(y);
UINT16* sprite1=&sprite1_mix_bitmap->pix16(y);
- UINT32* destLine=&bitmap->pix32(y);
+ UINT32* destLine=&bitmap.pix32(y);
UINT16* alphaTilemap=&state->m_tilemap_alpha_bitmap->pix16(y);
for (x=0; x<320; x++) {
@@ -856,9 +856,9 @@ SCREEN_UPDATE( nslasher )
if (state->m_ace_ram_dirty)
updateAceRam(screen.machine());
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
- bitmap->fill(screen.machine().pens[0x200], cliprect);
+ bitmap.fill(screen.machine().pens[0x200], cliprect);
/* Draw sprites to temporary bitmaps, saving alpha & priority info for later mixing */
screen.machine().device<decospr_device>("spritegen1")->set_pix_raw_shift(8);
@@ -884,7 +884,7 @@ SCREEN_UPDATE( nslasher )
{
deco16ic_tilemap_2_draw(state->m_deco_tilegen1, bitmap, cliprect, 0, 2);
if (alphaTilemap)
- deco16ic_tilemap_1_draw(state->m_deco_tilegen2, state->m_tilemap_alpha_bitmap, cliprect, 0, 4);
+ deco16ic_tilemap_1_draw(state->m_deco_tilegen2, *state->m_tilemap_alpha_bitmap, cliprect, 0, 4);
else
deco16ic_tilemap_1_draw(state->m_deco_tilegen2, bitmap, cliprect, 0, 4);
}
@@ -892,7 +892,7 @@ SCREEN_UPDATE( nslasher )
{
deco16ic_tilemap_1_draw(state->m_deco_tilegen2, bitmap, cliprect, 0, 2);
if (alphaTilemap)
- deco16ic_tilemap_2_draw(state->m_deco_tilegen1, state->m_tilemap_alpha_bitmap, cliprect, 0, 4);
+ deco16ic_tilemap_2_draw(state->m_deco_tilegen1, *state->m_tilemap_alpha_bitmap, cliprect, 0, 4);
else
deco16ic_tilemap_2_draw(state->m_deco_tilegen1, bitmap, cliprect, 0, 4);
}
diff --git a/src/mame/video/deco_mlc.c b/src/mame/video/deco_mlc.c
index 789783ee681..8b3c38aaf51 100644
--- a/src/mame/video/deco_mlc.c
+++ b/src/mame/video/deco_mlc.c
@@ -32,14 +32,14 @@ VIDEO_START( mlc )
}
#ifdef UNUSED_FUNCTION
-static void blitRaster(running_machine &machine, bitmap_t *bitmap, int rasterMode)
+static void blitRaster(running_machine &machine, bitmap_t &bitmap, int rasterMode)
{
deco_mlc_state *state = machine.driver_data<deco_mlc_state>();
int x,y;
for (y=0; y<256; y++) //todo
{
UINT32* src=&temp_bitmap->pix32(y&0x1ff);
- UINT32* dst=&bitmap->pix32(y);
+ UINT32* dst=&bitmap.pix32(y);
UINT32 xptr=(state->m_mlc_raster_table[0][y]<<13);
if (machine.input().code_pressed(KEYCODE_X))
@@ -62,7 +62,7 @@ static void blitRaster(running_machine &machine, bitmap_t *bitmap, int rasterMod
#endif
static void mlc_drawgfxzoom(
- bitmap_t *dest_bmp,const rectangle &clip,const gfx_element *gfx,
+ bitmap_t &dest_bmp,const rectangle &clip,const gfx_element *gfx,
UINT32 code1,UINT32 code2, UINT32 color,int flipx,int flipy,int sx,int sy,
int transparent_color,int use8bpp,
int scalex, int scaley,int alpha)
@@ -80,7 +80,7 @@ static void mlc_drawgfxzoom(
/* KW 991012 -- Added code to force clip to bitmap boundary */
myclip = clip;
- myclip &= dest_bmp->cliprect();
+ myclip &= dest_bmp.cliprect();
{
if( gfx )
@@ -163,7 +163,7 @@ static void mlc_drawgfxzoom(
{
const UINT8 *source1 = code_base1 + (y_index>>16) * gfx->line_modulo;
const UINT8 *source2 = code_base2 + (y_index>>16) * gfx->line_modulo;
- UINT32 *dest = &dest_bmp->pix32(y);
+ UINT32 *dest = &dest_bmp.pix32(y);
int x, x_index = x_index_base;
@@ -190,7 +190,7 @@ static void mlc_drawgfxzoom(
for( y=sy; y<ey; y++ )
{
const UINT8 *source = code_base1 + (y_index>>16) * gfx->line_modulo;
- UINT32 *dest = &dest_bmp->pix32(y);
+ UINT32 *dest = &dest_bmp.pix32(y);
int x, x_index = x_index_base;
for( x=sx; x<ex; x++ )
@@ -210,7 +210,7 @@ static void mlc_drawgfxzoom(
}
}
-static void draw_sprites(running_machine& machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void draw_sprites(running_machine& machine, bitmap_t &bitmap,const rectangle &cliprect)
{
deco_mlc_state *state = machine.driver_data<deco_mlc_state>();
UINT32 *index_ptr=0;
@@ -508,7 +508,7 @@ SCREEN_EOF( mlc )
SCREEN_UPDATE( mlc )
{
// temp_bitmap->fill(0, cliprect);
- bitmap->fill(screen.machine().pens[0], cliprect); /* Pen 0 fill colour confirmed from Skull Fang level 2 */
+ bitmap.fill(screen.machine().pens[0], cliprect); /* Pen 0 fill colour confirmed from Skull Fang level 2 */
draw_sprites(screen.machine(),bitmap,cliprect);
return 0;
}
diff --git a/src/mame/video/decocass.c b/src/mame/video/decocass.c
index 02ff73bacc0..587278e151c 100644
--- a/src/mame/video/decocass.c
+++ b/src/mame/video/decocass.c
@@ -118,7 +118,7 @@ static TILE_GET_INFO( get_fg_tile_info )
big object
********************************************/
-static void draw_object( running_machine& machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_object( running_machine& machine, bitmap_t &bitmap, const rectangle &cliprect )
{
decocass_state *state = machine.driver_data<decocass_state>();
int sx, sy, color;
@@ -141,7 +141,7 @@ static void draw_object( running_machine& machine, bitmap_t *bitmap, const recta
drawgfx_transpen(bitmap, cliprect, machine.gfx[3], 1, color, 0, 1, sx, sy - 64, 0);
}
-static void draw_center( running_machine& machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_center( running_machine& machine, bitmap_t &bitmap, const rectangle &cliprect )
{
decocass_state *state = machine.driver_data<decocass_state>();
int sx, sy, x, y, color;
@@ -165,7 +165,7 @@ static void draw_center( running_machine& machine, bitmap_t *bitmap, const recta
if (((sy + y) & state->m_color_center_bot & 3) == (sy & state->m_color_center_bot & 3))
for (x = 0; x < 256; x++)
if (0 != (x & 16) || 0 != (state->m_center_h_shift_space & 1))
- bitmap->pix16(sy + y, (sx + x) & 255) = color;
+ bitmap.pix16(sy + y, (sx + x) & 255) = color;
}
}
@@ -391,7 +391,7 @@ WRITE8_HANDLER( decocass_center_v_shift_w )
memory handlers
********************************************/
-static void draw_sprites(running_machine& machine, bitmap_t *bitmap, const rectangle &cliprect, int color,
+static void draw_sprites(running_machine& machine, bitmap_t &bitmap, const rectangle &cliprect, int color,
int sprite_y_adjust, int sprite_y_adjust_flip_screen,
UINT8 *sprite_ram, int interleave)
{
@@ -440,7 +440,7 @@ static void draw_sprites(running_machine& machine, bitmap_t *bitmap, const recta
}
-static void draw_missiles(running_machine &machine,bitmap_t *bitmap, const rectangle &cliprect,
+static void draw_missiles(running_machine &machine,bitmap_t &bitmap, const rectangle &cliprect,
int missile_y_adjust, int missile_y_adjust_flip_screen,
UINT8 *missile_ram, int interleave)
{
@@ -465,7 +465,7 @@ static void draw_missiles(running_machine &machine,bitmap_t *bitmap, const recta
for (x = 0; x < 4; x++)
{
if (sx >= cliprect.min_x && sx <= cliprect.max_x)
- bitmap->pix16(sy, sx) = (state->m_color_missiles >> 4) & 7;
+ bitmap.pix16(sy, sx) = (state->m_color_missiles >> 4) & 7;
sx++;
}
@@ -481,7 +481,7 @@ static void draw_missiles(running_machine &machine,bitmap_t *bitmap, const recta
for (x = 0; x < 4; x++)
{
if (sx >= cliprect.min_x && sx <= cliprect.max_x)
- bitmap->pix16(sy, sx) = state->m_color_missiles & 7;
+ bitmap.pix16(sy, sx) = state->m_color_missiles & 7;
sx++;
}
}
@@ -552,7 +552,7 @@ SCREEN_UPDATE( decocass )
}
#endif
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
scrolly_l = state->m_back_vl_shift;
scrolly_r = 256 - state->m_back_vr_shift;
diff --git a/src/mame/video/decocomn.c b/src/mame/video/decocomn.c
index 16c34926719..9db855646ba 100644
--- a/src/mame/video/decocomn.c
+++ b/src/mame/video/decocomn.c
@@ -126,14 +126,14 @@ void decocomn_clear_sprite_priority_bitmap( device_t *device )
/* A special pdrawgfx z-buffered sprite renderer that is needed to properly draw multiple sprite sources with alpha */
void decocomn_pdrawgfx(
device_t *device,
- bitmap_t *dest, const rectangle &clip, const gfx_element *gfx,
+ bitmap_t &dest, const rectangle &clip, const gfx_element *gfx,
UINT32 code, UINT32 color, int flipx, int flipy, int sx, int sy,
int transparent_color, UINT32 pri_mask, UINT32 sprite_mask, UINT8 write_pri, UINT8 alpha)
{
decocomn_state *decocomn = get_safe_token(device);
int ox, oy, cx, cy;
int x_index, y_index, x, y;
- bitmap_t *priority_bitmap = gfx->machine().priority_bitmap;
+ bitmap_t &priority_bitmap = gfx->machine().priority_bitmap;
const pen_t *pal = &gfx->machine().pens[gfx->color_base + gfx->color_granularity * (color % gfx->total_colors)];
const UINT8 *code_base = gfx_element_get_data(gfx, code % gfx->total_elements);
@@ -157,8 +157,8 @@ void decocomn_pdrawgfx(
for (y = 0; y < 16 - cy; y++)
{
const UINT8 *source = code_base + (y_index * gfx->line_modulo);
- UINT32 *destb = &dest->pix32(sy);
- UINT8 *pri = &priority_bitmap->pix8(sy);
+ UINT32 *destb = &dest.pix32(sy);
+ UINT8 *pri = &priority_bitmap.pix8(sy);
UINT8 *spri = &decocomn->sprite_priority_bitmap->pix8(sy);
if (sy >= 0 && sy < 248)
diff --git a/src/mame/video/decocomn.h b/src/mame/video/decocomn.h
index b363eaf8d7a..cea3914eeb4 100644
--- a/src/mame/video/decocomn.h
+++ b/src/mame/video/decocomn.h
@@ -50,7 +50,7 @@ READ16_DEVICE_HANDLER( decocomn_71_r );
void decocomn_clear_sprite_priority_bitmap(device_t *device);
void decocomn_pdrawgfx(
device_t *device,
- bitmap_t *dest,const rectangle &clip,const gfx_element *gfx,
+ bitmap_t &dest,const rectangle &clip,const gfx_element *gfx,
UINT32 code,UINT32 color,int flipx,int flipy,int sx,int sy,
int transparent_color,UINT32 pri_mask,UINT32 sprite_mask,UINT8 write_pri,UINT8 alpha);
diff --git a/src/mame/video/decospr.c b/src/mame/video/decospr.c
index eb32a7e344b..69a82d6d8ee 100644
--- a/src/mame/video/decospr.c
+++ b/src/mame/video/decospr.c
@@ -177,7 +177,7 @@ void decospr_device::set_pri_callback(decospr_priority_callback_func callback)
-void decospr_device::draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, UINT16* spriteram, int sizewords, bool invert_flip )
+void decospr_device::draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, UINT16* spriteram, int sizewords, bool invert_flip )
{
//printf("cliprect %04x, %04x\n", cliprect.min_y, cliprect.max_y);
@@ -343,7 +343,7 @@ void decospr_device::draw_sprites( running_machine &machine, bitmap_t *bitmap, c
else
{
// if we have a sprite bitmap draw raw data to it for manual mixing
- drawgfx_transpen_raw(m_sprite_bitmap,cliprect,machine.gfx[m_gfxregion],
+ drawgfx_transpen_raw(*m_sprite_bitmap,cliprect,machine.gfx[m_gfxregion],
sprite - multi * inc,
colour<<m_raw_shift,
fx,fy,
@@ -351,7 +351,7 @@ void decospr_device::draw_sprites( running_machine &machine, bitmap_t *bitmap, c
0);
if (w)
{
- drawgfx_transpen_raw(m_sprite_bitmap,cliprect,machine.gfx[m_gfxregion],
+ drawgfx_transpen_raw(*m_sprite_bitmap,cliprect,machine.gfx[m_gfxregion],
(sprite - multi * inc)-mult2,
colour<<m_raw_shift,
fx,fy,
@@ -485,7 +485,7 @@ void decospr_device::draw_sprites( running_machine &machine, bitmap_t *bitmap, c
if ((ypos<=cliprect.max_y) && (ypos>=(cliprect.min_y)-16))
{
- drawgfx_transpen_raw(m_sprite_bitmap,cliprect,machine.gfx[m_gfxregion],
+ drawgfx_transpen_raw(*m_sprite_bitmap,cliprect,machine.gfx[m_gfxregion],
sprite + yy + h * xx,
colour<<m_raw_shift,
fx,fy,
@@ -497,7 +497,7 @@ void decospr_device::draw_sprites( running_machine &machine, bitmap_t *bitmap, c
if ((ypos<=cliprect.max_y) && (ypos>=(cliprect.min_y-16)))
{
- drawgfx_transpen_raw(m_sprite_bitmap,cliprect,machine.gfx[m_gfxregion],
+ drawgfx_transpen_raw(*m_sprite_bitmap,cliprect,machine.gfx[m_gfxregion],
sprite + yy + h * xx,
colour<<m_raw_shift,
fx,fy,
@@ -516,7 +516,7 @@ void decospr_device::draw_sprites( running_machine &machine, bitmap_t *bitmap, c
// inefficient, we should be able to mix in a single pass by comparing the existing priority bitmap from the tilemaps
-void decospr_device::inefficient_copy_sprite_bitmap(running_machine& machine, bitmap_t *bitmap, const rectangle &cliprect, UINT16 pri, UINT16 priority_mask, UINT16 colbase, UINT16 palmask, UINT8 alpha)
+void decospr_device::inefficient_copy_sprite_bitmap(running_machine& machine, bitmap_t &bitmap, const rectangle &cliprect, UINT16 pri, UINT16 priority_mask, UINT16 colbase, UINT16 palmask, UINT8 alpha)
{
if (!m_sprite_bitmap)
fatalerror("decospr_device::inefficient_copy_sprite_bitmap with no m_sprite_bitmap");
@@ -530,7 +530,7 @@ void decospr_device::inefficient_copy_sprite_bitmap(running_machine& machine, bi
for (y=cliprect.min_y;y<=cliprect.max_y;y++)
{
srcline= &m_sprite_bitmap->pix16(y);
- dstline= &bitmap->pix32(y);
+ dstline= &bitmap.pix32(y);
if (alpha==0xff)
{
diff --git a/src/mame/video/decospr.h b/src/mame/video/decospr.h
index ff654642002..a495c88c5bd 100644
--- a/src/mame/video/decospr.h
+++ b/src/mame/video/decospr.h
@@ -8,14 +8,14 @@ public:
static void set_gfx_region(device_t &device, int gfxregion);
static void set_pri_callback(device_t &device, decospr_priority_callback_func callback);
//void decospr_sprite_kludge(int x, int y);
- void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, UINT16* spriteram, int sizewords, bool invert_flip = false );
+ void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, UINT16* spriteram, int sizewords, bool invert_flip = false );
void set_pri_callback(decospr_priority_callback_func callback);
void set_gfxregion(int region) { m_gfxregion = region; };
void set_alt_format(bool alt) { m_alt_format = alt; };
void set_pix_mix_mask(UINT16 mask) { m_pixmask = mask; };
void set_pix_raw_shift(UINT16 shift) { m_raw_shift = shift; };
void alloc_sprite_bitmap(running_machine& machine);
- void inefficient_copy_sprite_bitmap(running_machine& machine, bitmap_t *bitmap, const rectangle &cliprect, UINT16 pri, UINT16 priority_mask, UINT16 colbase, UINT16 palmask, UINT8 alpha = 0xff);
+ void inefficient_copy_sprite_bitmap(running_machine& machine, bitmap_t &bitmap, const rectangle &cliprect, UINT16 pri, UINT16 priority_mask, UINT16 colbase, UINT16 palmask, UINT8 alpha = 0xff);
bitmap_t* get_sprite_temp_bitmap(void) { return m_sprite_bitmap; };
protected:
diff --git a/src/mame/video/deniam.c b/src/mame/video/deniam.c
index 72df002ffae..99f34882d19 100644
--- a/src/mame/video/deniam.c
+++ b/src/mame/video/deniam.c
@@ -214,7 +214,7 @@ WRITE16_HANDLER( deniam_coinctrl_w )
* c | ---------------- | zoomy like in System 16?
* e | ---------------- |
*/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
deniam_state *state = machine.driver_data<deniam_state>();
int offs;
@@ -272,9 +272,9 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
if (sx + x >= cliprect.min_x && sx + x <= cliprect.max_x &&
y >= cliprect.min_y && y <= cliprect.max_y)
{
- if ((machine.priority_bitmap->pix8(y, sx + x) & primask) == 0)
- bitmap->pix16(y, sx + x) = color * 16 + (rom[i] & 0x0f);
- machine.priority_bitmap->pix8(y, sx + x) = 8;
+ if ((machine.priority_bitmap.pix8(y, sx + x) & primask) == 0)
+ bitmap.pix16(y, sx + x) = color * 16 + (rom[i] & 0x0f);
+ machine.priority_bitmap.pix8(y, sx + x) = 8;
}
}
x++;
@@ -292,9 +292,9 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
if (sx + x >= cliprect.min_x && sx + x <= cliprect.max_x &&
y >= cliprect.min_y && y <= cliprect.max_y)
{
- if ((machine.priority_bitmap->pix8(y, sx + x) & primask) == 0)
- bitmap->pix16(y, sx + x) = color * 16+(rom[i] >> 4);
- machine.priority_bitmap->pix8(y, sx + x) = 8;
+ if ((machine.priority_bitmap.pix8(y, sx + x) & primask) == 0)
+ bitmap.pix16(y, sx + x) = color * 16+(rom[i] >> 4);
+ machine.priority_bitmap.pix8(y, sx + x) = 8;
}
}
x++;
@@ -316,9 +316,9 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
if (sx + x >= cliprect.min_x && sx + x <= cliprect.max_x &&
y >= cliprect.min_y && y <= cliprect.max_y)
{
- if ((machine.priority_bitmap->pix8(y, sx + x) & primask) == 0)
- bitmap->pix16(y, sx + x) = color * 16 + (rom[i] >> 4);
- machine.priority_bitmap->pix8(y, sx + x) = 8;
+ if ((machine.priority_bitmap.pix8(y, sx + x) & primask) == 0)
+ bitmap.pix16(y, sx + x) = color * 16 + (rom[i] >> 4);
+ machine.priority_bitmap.pix8(y, sx + x) = 8;
}
}
x++;
@@ -336,9 +336,9 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
if (sx + x >= cliprect.min_x && sx + x <= cliprect.max_x &&
y >= cliprect.min_y && y <= cliprect.max_y)
{
- if ((machine.priority_bitmap->pix8(y, sx + x) & primask) == 0)
- bitmap->pix16(y, sx + x) = color * 16 + (rom[i] & 0x0f);
- machine.priority_bitmap->pix8(y, sx + x) = 8;
+ if ((machine.priority_bitmap.pix8(y, sx + x) & primask) == 0)
+ bitmap.pix16(y, sx + x) = color * 16 + (rom[i] & 0x0f);
+ machine.priority_bitmap.pix8(y, sx + x) = 8;
}
}
x++;
@@ -407,7 +407,7 @@ SCREEN_UPDATE( deniam )
tilemap_set_scrollx(state->m_fg_tilemap, 0, fg_scrollx & 0x1ff);
tilemap_set_scrolly(state->m_fg_tilemap, 0, fg_scrolly & 0x0ff);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 1);
tilemap_draw(bitmap, cliprect, state->m_fg_tilemap, 0, 2);
diff --git a/src/mame/video/dietgo.c b/src/mame/video/dietgo.c
index 98154a4fc5e..004f3289544 100644
--- a/src/mame/video/dietgo.c
+++ b/src/mame/video/dietgo.c
@@ -11,7 +11,7 @@ SCREEN_UPDATE( dietgo )
flip_screen_set(screen.machine(), BIT(flip, 7));
deco16ic_pf_update(state->m_deco_tilegen1, state->m_pf1_rowscroll, state->m_pf2_rowscroll);
- bitmap->fill(256, cliprect); /* not verified */
+ bitmap.fill(256, cliprect); /* not verified */
deco16ic_tilemap_2_draw(state->m_deco_tilegen1, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
deco16ic_tilemap_1_draw(state->m_deco_tilegen1, bitmap, cliprect, 0, 0);
diff --git a/src/mame/video/digdug.c b/src/mame/video/digdug.c
index 896742a1dc1..acd90b37166 100644
--- a/src/mame/video/digdug.c
+++ b/src/mame/video/digdug.c
@@ -240,7 +240,7 @@ WRITE8_HANDLER( digdug_PORT_w )
***************************************************************************/
-static void draw_sprites(running_machine& machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites(running_machine& machine, bitmap_t &bitmap, const rectangle &cliprect )
{
digdug_state *state = machine.driver_data<digdug_state>();
UINT8 *spriteram = state->m_digdug_objram + 0x380;
diff --git a/src/mame/video/djmain.c b/src/mame/video/djmain.c
index eb5ae167b16..4b8a026caca 100644
--- a/src/mame/video/djmain.c
+++ b/src/mame/video/djmain.c
@@ -12,7 +12,7 @@
-static void draw_sprites(running_machine& machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine& machine, bitmap_t &bitmap, const rectangle &cliprect)
{
djmain_state *state = machine.driver_data<djmain_state>();
device_t *k055555 = machine.device("k055555");
@@ -169,7 +169,7 @@ SCREEN_UPDATE( djmain )
order[j] = temp;
}
- bitmap->fill(screen.machine().pens[0], cliprect);
+ bitmap.fill(screen.machine().pens[0], cliprect);
for (i = 0; i < NUM_LAYERS + 1; i++)
{
diff --git a/src/mame/video/dkong.c b/src/mame/video/dkong.c
index 08554d15917..417c97f4794 100644
--- a/src/mame/video/dkong.c
+++ b/src/mame/video/dkong.c
@@ -559,7 +559,7 @@ WRITE8_HANDLER( dkong_spritebank_w )
***************************************************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, UINT32 mask_bank, UINT32 shift_bits)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, UINT32 mask_bank, UINT32 shift_bits)
{
dkong_state *state = machine.driver_data<dkong_state>();
int offs;
@@ -805,7 +805,7 @@ static void radarscp_step(running_machine &machine, int line_cnt)
}
-static void radarscp_draw_background(running_machine &machine, dkong_state *state, bitmap_t *bitmap, const rectangle &cliprect)
+static void radarscp_draw_background(running_machine &machine, dkong_state *state, bitmap_t &bitmap, const rectangle &cliprect)
{
const UINT8 *htable = NULL;
int x,y;
@@ -821,7 +821,7 @@ static void radarscp_draw_background(running_machine &machine, dkong_state *stat
x = cliprect.min_x;
while (x <= cliprect.max_x)
{
- pixel = &bitmap->pix16(y, x);
+ pixel = &bitmap.pix16(y, x);
draw_ok = !(*pixel & 0x01) && !(*pixel & 0x02);
if (state->m_hardware_type == HARDWARE_TRS01) /* Check again from schematics */
draw_ok = draw_ok && !((htable[ (!state->m_rflip_sig<<7) | (x>>2)] >>2) & 0x01);
diff --git a/src/mame/video/docastle.c b/src/mame/video/docastle.c
index c335488a0e2..5d26aca61a5 100644
--- a/src/mame/video/docastle.c
+++ b/src/mame/video/docastle.c
@@ -132,12 +132,12 @@ VIDEO_START( dorunrun )
video_start_common(machine, 0xff00);
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
docastle_state *state = machine.driver_data<docastle_state>();
int offs;
- machine.priority_bitmap->fill(1);
+ machine.priority_bitmap.fill(1);
for (offs = state->m_spriteram_size - 4; offs >= 0; offs -= 4)
{
diff --git a/src/mame/video/dogfgt.c b/src/mame/video/dogfgt.c
index a26c46d4789..c7f03d547ec 100644
--- a/src/mame/video/dogfgt.c
+++ b/src/mame/video/dogfgt.c
@@ -184,7 +184,7 @@ WRITE8_HANDLER( dogfgt_1800_w )
***************************************************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect )
{
dogfgt_state *state = machine.driver_data<dogfgt_state>();
int offs;
@@ -238,6 +238,6 @@ SCREEN_UPDATE( dogfgt )
draw_sprites(screen.machine(), bitmap, cliprect);
- copybitmap_trans(bitmap, state->m_pixbitmap, 0, 0, 0, 0, cliprect, PIXMAP_COLOR_BASE + 8 * state->m_pixcolor);
+ copybitmap_trans(bitmap, *state->m_pixbitmap, 0, 0, 0, 0, cliprect, PIXMAP_COLOR_BASE + 8 * state->m_pixcolor);
return 0;
}
diff --git a/src/mame/video/dooyong.c b/src/mame/video/dooyong.c
index c5ee82dfa88..59e7532f288 100644
--- a/src/mame/video/dooyong.c
+++ b/src/mame/video/dooyong.c
@@ -350,7 +350,7 @@ static TILE_GET_INFO( get_tx_tile_info )
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int pollux_extensions)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int pollux_extensions)
{
/* Sprites take 32 bytes each in memory:
MSB LSB
@@ -440,7 +440,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const recta
}
}
-static void rshark_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void rshark_draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
UINT16 *buffered_spriteram16 = machine.generic.buffered_spriteram.u16;
@@ -515,8 +515,8 @@ static void rshark_draw_sprites(running_machine &machine, bitmap_t *bitmap, cons
SCREEN_UPDATE( lastday )
{
dooyong_state *state = screen.machine().driver_data<dooyong_state>();
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 1);
tilemap_draw(bitmap, cliprect, state->m_fg_tilemap, 0, 2);
@@ -530,8 +530,8 @@ SCREEN_UPDATE( lastday )
SCREEN_UPDATE( gulfstrm )
{
dooyong_state *state = screen.machine().driver_data<dooyong_state>();
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 1);
tilemap_draw(bitmap, cliprect, state->m_fg_tilemap, 0, 2);
@@ -544,8 +544,8 @@ SCREEN_UPDATE( gulfstrm )
SCREEN_UPDATE( pollux )
{
dooyong_state *state = screen.machine().driver_data<dooyong_state>();
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 1);
tilemap_draw(bitmap, cliprect, state->m_fg_tilemap, 0, 2);
@@ -558,8 +558,8 @@ SCREEN_UPDATE( pollux )
SCREEN_UPDATE( flytiger )
{
dooyong_state *state = screen.machine().driver_data<dooyong_state>();
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
if (state->m_flytiger_pri)
{
@@ -581,8 +581,8 @@ SCREEN_UPDATE( flytiger )
SCREEN_UPDATE( bluehawk )
{
dooyong_state *state = screen.machine().driver_data<dooyong_state>();
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 1);
tilemap_draw(bitmap, cliprect, state->m_fg_tilemap, 0, 2);
@@ -596,7 +596,7 @@ SCREEN_UPDATE( bluehawk )
SCREEN_UPDATE( primella )
{
dooyong_state *state = screen.machine().driver_data<dooyong_state>();
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
if (state->m_tx_pri) tilemap_draw(bitmap, cliprect, state->m_tx_tilemap, 0, 0);
@@ -608,8 +608,8 @@ SCREEN_UPDATE( primella )
SCREEN_UPDATE( rshark )
{
dooyong_state *state = screen.machine().driver_data<dooyong_state>();
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 1);
tilemap_draw(bitmap, cliprect, state->m_bg2_tilemap, 0, (state->m_rshark_pri ? 2 : 1));
@@ -623,8 +623,8 @@ SCREEN_UPDATE( rshark )
SCREEN_UPDATE( popbingo )
{
dooyong_state *state = screen.machine().driver_data<dooyong_state>();
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 1);
diff --git a/src/mame/video/drgnmst.c b/src/mame/video/drgnmst.c
index f8f633980e0..1e39e52d12a 100644
--- a/src/mame/video/drgnmst.c
+++ b/src/mame/video/drgnmst.c
@@ -60,7 +60,7 @@ WRITE16_HANDLER( drgnmst_md_videoram_w )
tilemap_mark_tile_dirty(state->m_md_tilemap, offset / 2);
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect )
{
drgnmst_state *state = machine.driver_data<drgnmst_state>();
const gfx_element *gfx = machine.gfx[0];
diff --git a/src/mame/video/dribling.c b/src/mame/video/dribling.c
index 653bf256121..f2a775639ba 100644
--- a/src/mame/video/dribling.c
+++ b/src/mame/video/dribling.c
@@ -68,7 +68,7 @@ SCREEN_UPDATE( dribling )
/* loop over rows */
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
- UINT16 *dst = &bitmap->pix16(y);
+ UINT16 *dst = &bitmap.pix16(y);
/* loop over columns */
for (x = cliprect.min_x; x <= cliprect.max_x; x++)
diff --git a/src/mame/video/dynax.c b/src/mame/video/dynax.c
index 5190b95d73a..b47d6dff34f 100644
--- a/src/mame/video/dynax.c
+++ b/src/mame/video/dynax.c
@@ -1000,7 +1000,7 @@ VIDEO_START( neruton )
***************************************************************************/
-static void hanamai_copylayer( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int i )
+static void hanamai_copylayer( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int i )
{
dynax_state *state = machine.driver_data<dynax_state>();
int color;
@@ -1036,7 +1036,7 @@ static void hanamai_copylayer( running_machine &machine, bitmap_t *bitmap, const
for (dy = 0; dy < 256; dy++)
{
UINT16 *dst;
- UINT16 *dstbase = &bitmap->pix16((dy - scrolly) & 0xff);
+ UINT16 *dstbase = &bitmap.pix16((dy - scrolly) & 0xff);
length = scrollx;
dst = dstbase + 2 * (256 - length);
@@ -1064,7 +1064,7 @@ static void hanamai_copylayer( running_machine &machine, bitmap_t *bitmap, const
}
-static void jantouki_copylayer( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int i, int y )
+static void jantouki_copylayer( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int i, int y )
{
dynax_state *state = machine.driver_data<dynax_state>();
int color, scrollx, scrolly, palettes, palbank;
@@ -1104,7 +1104,7 @@ static void jantouki_copylayer( running_machine &machine, bitmap_t *bitmap, cons
{
int sy = ((dy - scrolly) & 0xff) + y;
UINT16 *dst;
- UINT16 *dstbase = &bitmap->pix16(sy);
+ UINT16 *dstbase = &bitmap.pix16(sy);
if ((sy < cliprect.min_y) || (sy > cliprect.max_y))
{
@@ -1139,7 +1139,7 @@ static void jantouki_copylayer( running_machine &machine, bitmap_t *bitmap, cons
}
-static void mjdialq2_copylayer( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int i )
+static void mjdialq2_copylayer( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int i )
{
dynax_state *state = machine.driver_data<dynax_state>();
int color;
@@ -1166,7 +1166,7 @@ static void mjdialq2_copylayer( running_machine &machine, bitmap_t *bitmap, cons
for (dy = 0; dy < 256; dy++)
{
UINT16 *dst;
- UINT16 *dstbase = &bitmap->pix16((dy - scrolly) & 0xff);
+ UINT16 *dstbase = &bitmap.pix16((dy - scrolly) & 0xff);
length = scrollx;
dst = dstbase + 256 - length;
@@ -1227,7 +1227,7 @@ static int debug_mask( running_machine &machine )
I,O - Change palette (-,+)
J,K & N,M - Change "tile" (-,+, slow & fast)
R - move "tile" to the next 1/8th of the gfx */
-static int debug_viewer( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static int debug_viewer( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
#ifdef MAME_DEBUG
@@ -1255,7 +1255,7 @@ static int debug_viewer( running_machine &machine, bitmap_t *bitmap, const recta
state->m_blit_palettes = (c & 0xf) * 0x111;
state->m_blit_palbank = (c >> 4) & 1;
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
memset(state->m_pixmap[0][0], 0, sizeof(UINT8) * 0x100 * 0x100);
if (state->m_layer_layout != LAYOUT_MJDIALQ2)
@@ -1289,7 +1289,7 @@ SCREEN_UPDATE( hanamai )
layers_ctrl &= debug_mask(screen.machine());
- bitmap->fill((state->m_blit_backpen & 0xff) + (state->m_blit_palbank & 1) * 256, cliprect);
+ bitmap.fill((state->m_blit_backpen & 0xff) + (state->m_blit_palbank & 1) * 256, cliprect);
/* bit 4 = display enable? */
if (!(state->m_hanamai_priority & 0x10))
@@ -1326,7 +1326,7 @@ SCREEN_UPDATE( hnoridur )
layers_ctrl &= debug_mask(screen.machine());
- bitmap->fill((state->m_blit_backpen & 0xff) + (state->m_blit_palbank & 0x0f) * 256, cliprect);
+ bitmap.fill((state->m_blit_backpen & 0xff) + (state->m_blit_palbank & 0x0f) * 256, cliprect);
pri = state->m_hanamai_priority >> 4;
@@ -1361,7 +1361,7 @@ SCREEN_UPDATE( sprtmtch )
layers_ctrl &= debug_mask(screen.machine());
- bitmap->fill((state->m_blit_backpen & 0xff) + (state->m_blit_palbank & 1) * 256, cliprect);
+ bitmap.fill((state->m_blit_backpen & 0xff) + (state->m_blit_palbank & 1) * 256, cliprect);
if (BIT(layers_ctrl, 0)) hanamai_copylayer(screen.machine(), bitmap, cliprect, 0);
if (BIT(layers_ctrl, 1)) hanamai_copylayer(screen.machine(), bitmap, cliprect, 1);
@@ -1379,7 +1379,7 @@ SCREEN_UPDATE( jantouki_top )
layers_ctrl &= debug_mask(screen.machine());
- bitmap->fill((state->m_blit_backpen & 0xff) + (state->m_blit_palbank & 1) * 256, cliprect);
+ bitmap.fill((state->m_blit_backpen & 0xff) + (state->m_blit_palbank & 1) * 256, cliprect);
// if (BIT(layers_ctrl, 0)) jantouki_copylayer(screen.machine(), bitmap, cliprect, 3, 0);
if (BIT(layers_ctrl, 1)) jantouki_copylayer(screen.machine(), bitmap, cliprect, 2, 0);
@@ -1398,7 +1398,7 @@ SCREEN_UPDATE( jantouki_bottom )
layers_ctrl &= debug_mask(screen.machine());
- bitmap->fill((state->m_blit_backpen & 0xff) + (state->m_blit_palbank & 1) * 256, cliprect);
+ bitmap.fill((state->m_blit_backpen & 0xff) + (state->m_blit_palbank & 1) * 256, cliprect);
if (BIT(layers_ctrl, 0)) jantouki_copylayer(screen.machine(), bitmap, cliprect, 3, 0);
if (BIT(layers_ctrl, 4)) jantouki_copylayer(screen.machine(), bitmap, cliprect, 7, 0);
@@ -1419,7 +1419,7 @@ SCREEN_UPDATE( mjdialq2 )
layers_ctrl &= debug_mask(screen.machine());
- bitmap->fill((state->m_blit_backpen & 0xff) + (state->m_blit_palbank & 1) * 256, cliprect);
+ bitmap.fill((state->m_blit_backpen & 0xff) + (state->m_blit_palbank & 1) * 256, cliprect);
if (BIT(layers_ctrl, 0)) mjdialq2_copylayer(screen.machine(), bitmap, cliprect, 0);
if (BIT(layers_ctrl, 1)) mjdialq2_copylayer(screen.machine(), bitmap, cliprect, 1);
@@ -1443,12 +1443,12 @@ SCREEN_UPDATE(htengoku)
// format and let SCREEN_UPDATE(ddenlovr) do the final compositing (priorities + palettes)
for (layer = 0; layer < 4; layer++)
{
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
hanamai_copylayer(screen.machine(), bitmap, cliprect, layer);
for (y = 0; y < 256; y++)
for (x = 0; x < 512; x++)
- state->m_ddenlovr_pixmap[3 - layer][y * 512 + x] = (UINT8)(bitmap->pix16(y, x));
+ state->m_ddenlovr_pixmap[3 - layer][y * 512 + x] = (UINT8)(bitmap.pix16(y, x));
}
return SCREEN_UPDATE_CALL(ddenlovr);
diff --git a/src/mame/video/dynduke.c b/src/mame/video/dynduke.c
index daf3f761400..6c1373aa353 100644
--- a/src/mame/video/dynduke.c
+++ b/src/mame/video/dynduke.c
@@ -137,7 +137,7 @@ WRITE16_HANDLER( dynduke_control_w )
}
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect,int pri)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect,int pri)
{
dynduke_state *state = machine.driver_data<dynduke_state>();
UINT16 *buffered_spriteram16 = machine.generic.buffered_spriteram.u16;
@@ -175,18 +175,18 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectan
}
}
-static void draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int pri )
+static void draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int pri )
{
dynduke_state *state = machine.driver_data<dynduke_state>();
/* The transparency / palette handling on the background layer is very strange */
- bitmap_t *bm = tilemap_get_pixmap(state->m_bg_layer);
+ bitmap_t &bm = tilemap_get_pixmap(state->m_bg_layer);
int scrolly, scrollx;
int x,y;
/* if we're disabled, don't draw */
if (!state->m_back_enable)
{
- bitmap->fill(get_black_pen(machine), cliprect);
+ bitmap.fill(get_black_pen(machine), cliprect);
return;
}
@@ -196,8 +196,8 @@ static void draw_background(running_machine &machine, bitmap_t *bitmap, const re
for (y=0;y<256;y++)
{
int realy = (y + scrolly) & 0x1ff;
- UINT16 *src = &bm->pix16(realy);
- UINT16 *dst = &bitmap->pix16(y);
+ UINT16 *src = &bm.pix16(realy);
+ UINT16 *dst = &bitmap.pix16(y);
for (x=0;x<256;x++)
diff --git a/src/mame/video/eolith.c b/src/mame/video/eolith.c
index b4612dce49d..9cb4062a5be 100644
--- a/src/mame/video/eolith.c
+++ b/src/mame/video/eolith.c
@@ -47,7 +47,7 @@ SCREEN_UPDATE( eolith )
{
int x;
UINT32 *src = &state->m_vram[(state->m_buffer ? 0 : 0x10000) | (y * (336 / 2))];
- UINT16 *dest = &bitmap->pix16(y);
+ UINT16 *dest = &bitmap.pix16(y);
for (x = 0; x < 320; x += 2)
{
diff --git a/src/mame/video/epos.c b/src/mame/video/epos.c
index 387f70d55e8..55998b6ea49 100644
--- a/src/mame/video/epos.c
+++ b/src/mame/video/epos.c
@@ -87,8 +87,8 @@ SCREEN_UPDATE( epos )
int x = (offs % 136) * 2;
int y = (offs / 136);
- bitmap->pix32(y, x + 0) = pens[(state->m_palette << 4) | (data & 0x0f)];
- bitmap->pix32(y, x + 1) = pens[(state->m_palette << 4) | (data >> 4)];
+ bitmap.pix32(y, x + 0) = pens[(state->m_palette << 4) | (data & 0x0f)];
+ bitmap.pix32(y, x + 1) = pens[(state->m_palette << 4) | (data >> 4)];
}
return 0;
diff --git a/src/mame/video/eprom.c b/src/mame/video/eprom.c
index 2b127910b7a..77aeefa93e5 100644
--- a/src/mame/video/eprom.c
+++ b/src/mame/video/eprom.c
@@ -243,7 +243,7 @@ SCREEN_UPDATE( eprom )
if (state->m_video_disable)
{
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
return 0;
}
@@ -258,7 +258,7 @@ SCREEN_UPDATE( eprom )
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
UINT16 *mo = &mobitmap->pix16(y);
- UINT16 *pf = &bitmap->pix16(y);
+ UINT16 *pf = &bitmap.pix16(y);
for (x = rectlist.rect->min_x; x <= rectlist.rect->max_x; x++)
if (mo[x])
{
@@ -367,7 +367,7 @@ SCREEN_UPDATE( eprom )
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
UINT16 *mo = &mobitmap->pix16(y);
- UINT16 *pf = &bitmap->pix16(y);
+ UINT16 *pf = &bitmap.pix16(y);
for (x = rectlist.rect->min_x; x <= rectlist.rect->max_x; x++)
if (mo[x])
{
@@ -398,7 +398,7 @@ SCREEN_UPDATE( guts )
if (state->m_video_disable)
{
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
return 0;
}
@@ -413,7 +413,7 @@ SCREEN_UPDATE( guts )
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
UINT16 *mo = &mobitmap->pix16(y);
- UINT16 *pf = &bitmap->pix16(y);
+ UINT16 *pf = &bitmap.pix16(y);
for (x = rectlist.rect->min_x; x <= rectlist.rect->max_x; x++)
if (mo[x])
{
@@ -441,7 +441,7 @@ SCREEN_UPDATE( guts )
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
UINT16 *mo = &mobitmap->pix16(y);
- UINT16 *pf = &bitmap->pix16(y);
+ UINT16 *pf = &bitmap.pix16(y);
for (x = rectlist.rect->min_x; x <= rectlist.rect->max_x; x++)
if (mo[x])
{
diff --git a/src/mame/video/equites.c b/src/mame/video/equites.c
index e3bf259e528..4aadbd20dfe 100644
--- a/src/mame/video/equites.c
+++ b/src/mame/video/equites.c
@@ -258,7 +258,7 @@ WRITE16_HANDLER(splndrbt_bg_scrolly_w)
*
*************************************/
-static void equites_draw_sprites_block( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int start, int end )
+static void equites_draw_sprites_block( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int start, int end )
{
equites_state *state = machine.driver_data<equites_state>();
int offs;
@@ -299,7 +299,7 @@ static void equites_draw_sprites_block( running_machine &machine, bitmap_t *bitm
}
}
-static void equites_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void equites_draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
// note that we draw the sprites in three blocks; in each blocks, sprites at
// a lower address have priority. This gives good priorities in gekisou.
@@ -332,7 +332,7 @@ Also, note that sprites are 30x30, not 32x32.
03020303 03030303 03030303 03030303
*/
-static void splndrbt_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void splndrbt_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
equites_state *state = machine.driver_data<equites_state>();
const UINT8 * const xrom = machine.region("user2")->base();
@@ -398,7 +398,7 @@ static void splndrbt_draw_sprites( running_machine &machine, bitmap_t *bitmap, c
int pen = srcgfx[offset];
if ((transmask & (1 << pen)) == 0)
- bitmap->pix16(y, bx) = paldata[pen];
+ bitmap.pix16(y, bx) = paldata[pen];
}
}
}
@@ -408,11 +408,11 @@ static void splndrbt_draw_sprites( running_machine &machine, bitmap_t *bitmap, c
}
-static void splndrbt_copy_bg( running_machine &machine, bitmap_t *dst_bitmap, const rectangle &cliprect )
+static void splndrbt_copy_bg( running_machine &machine, bitmap_t &dst_bitmap, const rectangle &cliprect )
{
equites_state *state = machine.driver_data<equites_state>();
- bitmap_t * const src_bitmap = tilemap_get_pixmap(state->m_bg_tilemap);
- bitmap_t * const flags_bitmap = tilemap_get_flagsmap(state->m_bg_tilemap);
+ bitmap_t &src_bitmap = tilemap_get_pixmap(state->m_bg_tilemap);
+ bitmap_t &flags_bitmap = tilemap_get_flagsmap(state->m_bg_tilemap);
const UINT8 * const xrom = machine.region("user1")->base();
const UINT8 * const yrom = xrom + 0x2000;
int scroll_x = state->m_splndrbt_bg_scrollx;
@@ -432,9 +432,9 @@ static void splndrbt_copy_bg( running_machine &machine, bitmap_t *dst_bitmap, co
if (dst_y >= cliprect.min_y && dst_y <= cliprect.max_y)
{
const UINT8 * const romline = &xrom[(dst_y ^ dinvert) << 5];
- const UINT16 * const src_line = &src_bitmap->pix16((src_y + scroll_y) & 0x1ff);
- const UINT8 * const flags_line = &flags_bitmap->pix8((src_y + scroll_y) & 0x1ff);
- UINT16 * const dst_line = &dst_bitmap->pix16(dst_y);
+ const UINT16 * const src_line = &src_bitmap.pix16((src_y + scroll_y) & 0x1ff);
+ const UINT8 * const flags_line = &flags_bitmap.pix8((src_y + scroll_y) & 0x1ff);
+ UINT16 * const dst_line = &dst_bitmap.pix16(dst_y);
int dst_x = 0;
int src_x;
@@ -466,7 +466,7 @@ static void splndrbt_copy_bg( running_machine &machine, bitmap_t *dst_bitmap, co
SCREEN_UPDATE( equites )
{
equites_state *state = screen.machine().driver_data<equites_state>();
- bitmap->fill(state->m_bgcolor, cliprect);
+ bitmap.fill(state->m_bgcolor, cliprect);
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
@@ -480,7 +480,7 @@ SCREEN_UPDATE( equites )
SCREEN_UPDATE( splndrbt )
{
equites_state *state = screen.machine().driver_data<equites_state>();
- bitmap->fill(state->m_bgcolor, cliprect);
+ bitmap.fill(state->m_bgcolor, cliprect);
splndrbt_copy_bg(screen.machine(), bitmap, cliprect);
diff --git a/src/mame/video/esd16.c b/src/mame/video/esd16.c
index c164e9c7c5a..cc6a0c5b43e 100644
--- a/src/mame/video/esd16.c
+++ b/src/mame/video/esd16.c
@@ -183,7 +183,7 @@ VIDEO_START( esd16 )
***************************************************************************/
-static void esd16_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void esd16_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
esd16_state *state = machine.driver_data<esd16_state>();
int offs;
@@ -247,7 +247,7 @@ static void esd16_draw_sprites( running_machine &machine, bitmap_t *bitmap, cons
}
/* note, check if i can re-merge this with the other or if its really different */
-static void hedpanic_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void hedpanic_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
esd16_state *state = machine.driver_data<esd16_state>();
int offs;
@@ -328,7 +328,7 @@ SCREEN_UPDATE( esd16 )
esd16_state *state = screen.machine().driver_data<esd16_state>();
int layers_ctrl = -1;
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
tilemap_set_scrollx(state->m_tilemap_0, 0, state->m_scroll_0[0]);
tilemap_set_scrolly(state->m_tilemap_0, 0, state->m_scroll_0[1]);
@@ -348,7 +348,7 @@ if (screen.machine().input().code_pressed(KEYCODE_Z))
#endif
if (layers_ctrl & 1) tilemap_draw(bitmap, cliprect, state->m_tilemap_0, 0, 0);
- else bitmap->fill(0, cliprect);
+ else bitmap.fill(0, cliprect);
if (layers_ctrl & 2) tilemap_draw(bitmap, cliprect, state->m_tilemap_1, 0, 1);
@@ -362,7 +362,7 @@ SCREEN_UPDATE( hedpanic )
esd16_state *state = screen.machine().driver_data<esd16_state>();
int layers_ctrl = -1;
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
#ifdef MAME_DEBUG
if (screen.machine().input().code_pressed(KEYCODE_Z))
@@ -392,7 +392,7 @@ if (screen.machine().input().code_pressed(KEYCODE_Z))
}
else
{
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
}
@@ -425,7 +425,7 @@ SCREEN_UPDATE( hedpanio )
esd16_state *state = screen.machine().driver_data<esd16_state>();
int layers_ctrl = -1;
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
#ifdef MAME_DEBUG
if ( screen.machine().input().code_pressed(KEYCODE_Z) )
@@ -455,7 +455,7 @@ if ( screen.machine().input().code_pressed(KEYCODE_Z) )
}
else
{
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
}
diff --git a/src/mame/video/espial.c b/src/mame/video/espial.c
index 2a14ed8ac19..415fa93d9a4 100644
--- a/src/mame/video/espial.c
+++ b/src/mame/video/espial.c
@@ -166,7 +166,7 @@ WRITE8_HANDLER( espial_flipscreen_w )
*
*************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
espial_state *state = machine.driver_data<espial_state>();
int offs;
diff --git a/src/mame/video/esripsys.c b/src/mame/video/esripsys.c
index 0a8acc46d36..6de8be4e565 100644
--- a/src/mame/video/esripsys.c
+++ b/src/mame/video/esripsys.c
@@ -163,7 +163,7 @@ SCREEN_UPDATE( esripsys )
for (y = cliprect.min_y; y <= cliprect.max_y; ++y)
{
- UINT32 *dest = &bitmap->pix32(y, cliprect.min_x);
+ UINT32 *dest = &bitmap.pix32(y, cliprect.min_x);
for (x = 0; x < 512; ++x)
{
diff --git a/src/mame/video/exedexes.c b/src/mame/video/exedexes.c
index 801cdb36731..78f1deda98e 100644
--- a/src/mame/video/exedexes.c
+++ b/src/mame/video/exedexes.c
@@ -184,7 +184,7 @@ VIDEO_START( exedexes )
colortable_configure_tilemap_groups(machine.colortable, state->m_tx_tilemap, machine.gfx[0], 0xcf);
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int priority )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int priority )
{
exedexes_state *state = machine.driver_data<exedexes_state>();
UINT8 *buffered_spriteram = machine.generic.buffered_spriteram.u8;
@@ -226,7 +226,7 @@ SCREEN_UPDATE( exedexes )
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
}
else
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
draw_sprites(screen.machine(), bitmap, cliprect, 1);
diff --git a/src/mame/video/exerion.c b/src/mame/video/exerion.c
index 26aa0483924..c90ee1bca62 100644
--- a/src/mame/video/exerion.c
+++ b/src/mame/video/exerion.c
@@ -234,7 +234,7 @@ READ8_HANDLER( exerion_video_timing_r )
*
*************************************/
-static void draw_background( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_background( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
exerion_state *state = machine.driver_data<exerion_state>();
int x, y;
diff --git a/src/mame/video/exidy.c b/src/mame/video/exidy.c
index 57314c81202..dbb76d6f336 100644
--- a/src/mame/video/exidy.c
+++ b/src/mame/video/exidy.c
@@ -215,7 +215,7 @@ INLINE int sprite_1_enabled(exidy_state *state)
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
exidy_state *state = machine.driver_data<exidy_state>();
/* draw sprite 2 first */
@@ -296,7 +296,7 @@ static void check_collision(running_machine &machine)
{
org_1_x = 236 - *state->m_sprite1_xpos - 4;
org_1_y = 244 - *state->m_sprite1_ypos - 4;
- drawgfx_transpen(state->m_motion_object_1_vid, clip, machine.gfx[0],
+ drawgfx_transpen(*state->m_motion_object_1_vid, clip, machine.gfx[0],
(*state->m_spriteno & 0x0f) + 16 * sprite_set_1, 0,
0, 0, 0, 0, 0);
}
@@ -305,7 +305,7 @@ static void check_collision(running_machine &machine)
state->m_motion_object_2_vid->fill(0xff, clip);
org_2_x = 236 - *state->m_sprite2_xpos - 4;
org_2_y = 244 - *state->m_sprite2_ypos - 4;
- drawgfx_transpen(state->m_motion_object_2_vid, clip, machine.gfx[0],
+ drawgfx_transpen(*state->m_motion_object_2_vid, clip, machine.gfx[0],
((*state->m_spriteno >> 4) & 0x0f) + 32 + 16 * sprite_set_2, 0,
0, 0, 0, 0, 0);
@@ -315,7 +315,7 @@ static void check_collision(running_machine &machine)
{
sx = org_2_x - org_1_x;
sy = org_2_y - org_1_y;
- drawgfx_transpen(state->m_motion_object_2_clip, clip, machine.gfx[0],
+ drawgfx_transpen(*state->m_motion_object_2_clip, clip, machine.gfx[0],
((*state->m_spriteno >> 4) & 0x0f) + 32 + 16 * sprite_set_2, 0,
0, 0, sx, sy, 0);
}
@@ -367,7 +367,7 @@ SCREEN_UPDATE( exidy )
/* update the background and draw it */
draw_background(screen.machine());
- copybitmap(bitmap, state->m_background_bitmap, 0, 0, 0, 0, cliprect);
+ copybitmap(bitmap, *state->m_background_bitmap, 0, 0, 0, 0, cliprect);
/* draw the sprites */
draw_sprites(screen.machine(), bitmap, cliprect);
diff --git a/src/mame/video/exidy440.c b/src/mame/video/exidy440.c
index 910044e9898..3d550875c98 100644
--- a/src/mame/video/exidy440.c
+++ b/src/mame/video/exidy440.c
@@ -302,7 +302,7 @@ static TIMER_CALLBACK( collide_firq_callback )
*
*************************************/
-static void draw_sprites(screen_device &screen, bitmap_t *bitmap, const rectangle &cliprect,
+static void draw_sprites(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect,
int scroll_offset, int check_collision)
{
exidy440_state *state = screen.machine().driver_data<exidy440_state>();
@@ -367,7 +367,7 @@ static void draw_sprites(screen_device &screen, bitmap_t *bitmap, const rectangl
{
/* combine with the background */
pen = left | old[0];
- bitmap->pix16(yoffs, currx) = pen;
+ bitmap.pix16(yoffs, currx) = pen;
/* check the collisions bit */
if (check_collision && (palette[2 * pen] & 0x80) && (count++ < 128))
@@ -380,7 +380,7 @@ static void draw_sprites(screen_device &screen, bitmap_t *bitmap, const rectangl
{
/* combine with the background */
pen = right | old[1];
- bitmap->pix16(yoffs, currx) = pen;
+ bitmap.pix16(yoffs, currx) = pen;
/* check the collisions bit */
if (check_collision && (palette[2 * pen] & 0x80) && (count++ < 128))
@@ -403,7 +403,7 @@ static void draw_sprites(screen_device &screen, bitmap_t *bitmap, const rectangl
*
*************************************/
-static void update_screen(screen_device &screen, bitmap_t *bitmap, const rectangle &cliprect,
+static void update_screen(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect,
int scroll_offset, int check_collision)
{
exidy440_state *state = screen.machine().driver_data<exidy440_state>();
diff --git a/src/mame/video/exprraid.c b/src/mame/video/exprraid.c
index 300563afa25..69541259a11 100644
--- a/src/mame/video/exprraid.c
+++ b/src/mame/video/exprraid.c
@@ -96,7 +96,7 @@ VIDEO_START( exprraid )
tilemap_set_transparent_pen(state->m_fg_tilemap, 0);
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
exprraid_state *state = machine.driver_data<exprraid_state>();
int offs;
diff --git a/src/mame/video/exterm.c b/src/mame/video/exterm.c
index 8feedc1cb5c..ffaaf21fbfe 100644
--- a/src/mame/video/exterm.c
+++ b/src/mame/video/exterm.c
@@ -67,12 +67,12 @@ void exterm_from_shiftreg_slave(address_space *space, UINT32 address, UINT16 *sh
*
*************************************/
-void exterm_scanline_update(screen_device &screen, bitmap_t *bitmap, int scanline, const tms34010_display_params *params)
+void exterm_scanline_update(screen_device &screen, bitmap_t &bitmap, int scanline, const tms34010_display_params *params)
{
exterm_state *state = screen.machine().driver_data<exterm_state>();
UINT16 *bgsrc = &state->m_master_videoram[(params->rowaddr << 8) & 0xff00];
UINT16 *fgsrc = NULL;
- UINT16 *dest = &bitmap->pix16(scanline);
+ UINT16 *dest = &bitmap.pix16(scanline);
tms34010_display_params fgparams;
int coladdr = params->coladdr;
int fgcoladdr = 0;
diff --git a/src/mame/video/exzisus.c b/src/mame/video/exzisus.c
index 81c9060cd4c..f5cd20159c8 100644
--- a/src/mame/video/exzisus.c
+++ b/src/mame/video/exzisus.c
@@ -84,7 +84,7 @@ SCREEN_UPDATE( exzisus )
int gfx_num, gfx_attr, gfx_offs;
/* Is this correct ? */
- bitmap->fill(1023, cliprect);
+ bitmap.fill(1023, cliprect);
/* ---------- 1st TC0010VCU ---------- */
sx = 0;
diff --git a/src/mame/video/f1gp.c b/src/mame/video/f1gp.c
index aa5dbaf9f9e..44754c974a9 100644
--- a/src/mame/video/f1gp.c
+++ b/src/mame/video/f1gp.c
@@ -177,7 +177,7 @@ WRITE16_HANDLER( f1gp2_gfxctrl_w )
***************************************************************************/
-static void f1gp_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int chip, int primask )
+static void f1gp_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int chip, int primask )
{
f1gp_state *state = machine.driver_data<f1gp_state>();
int attr_start, first;
@@ -254,7 +254,7 @@ SCREEN_UPDATE( f1gp )
{
f1gp_state *state = screen.machine().driver_data<f1gp_state>();
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
k053936_zoom_draw(state->m_k053936, bitmap, cliprect, state->m_roz_tilemap, 0, 0, 1);
@@ -275,7 +275,7 @@ SCREEN_UPDATE( f1gp )
}
-static void f1gpb_draw_sprites( running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect )
+static void f1gpb_draw_sprites( running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect )
{
f1gp_state *state = machine.driver_data<f1gp_state>();
UINT16 *spriteram = state->m_spriteram;
@@ -357,7 +357,7 @@ SCREEN_UPDATE( f1gpb )
tilemap_set_scrolly(state->m_fg_tilemap, 0, state->m_fgregs[0] + 8);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
tilemap_draw_roz(bitmap, cliprect, state->m_roz_tilemap,
startx << 13, starty << 13,
@@ -372,7 +372,7 @@ SCREEN_UPDATE( f1gpb )
}
-static void f1gp2_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void f1gp2_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
f1gp_state *state = machine.driver_data<f1gp_state>();
int offs;
@@ -449,7 +449,7 @@ SCREEN_UPDATE( f1gp2 )
f1gp_state *state = screen.machine().driver_data<f1gp_state>();
if (state->m_gfxctrl & 4) /* blank screen */
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
else
{
switch (state->m_gfxctrl & 3)
diff --git a/src/mame/video/fantland.c b/src/mame/video/fantland.c
index bccbe837fc8..14b31adace6 100644
--- a/src/mame/video/fantland.c
+++ b/src/mame/video/fantland.c
@@ -61,7 +61,7 @@
#include "emu.h"
#include "includes/fantland.h"
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect)
{
fantland_state *state = machine.driver_data<fantland_state>();
UINT8 *spriteram_2 = state->m_spriteram2;
@@ -141,7 +141,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectan
SCREEN_UPDATE( fantland )
{
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
draw_sprites(screen.machine(),bitmap,cliprect);
return 0;
diff --git a/src/mame/video/fastfred.c b/src/mame/video/fastfred.c
index c4756ec10ff..b9dde73f7b9 100644
--- a/src/mame/video/fastfred.c
+++ b/src/mame/video/fastfred.c
@@ -231,7 +231,7 @@ WRITE8_HANDLER( fastfred_flip_screen_y_w )
*
*************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
const rectangle spritevisiblearea(2*8, 32*8-1, 2*8, 30*8-1);
const rectangle spritevisibleareaflipx(0*8, 30*8-1, 2*8, 30*8-1);
@@ -299,7 +299,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const recta
SCREEN_UPDATE( fastfred )
{
fastfred_state *state = screen.machine().driver_data<fastfred_state>();
- bitmap->fill(*state->m_background_color, cliprect);
+ bitmap.fill(*state->m_background_color, cliprect);
tilemap_draw(bitmap,cliprect,state->m_bg_tilemap,0,0);
draw_sprites(screen.machine(), bitmap, cliprect);
diff --git a/src/mame/video/fgoal.c b/src/mame/video/fgoal.c
index e653817a7bc..bbd980c6668 100644
--- a/src/mame/video/fgoal.c
+++ b/src/mame/video/fgoal.c
@@ -53,14 +53,14 @@ SCREEN_UPDATE( fgoal )
if (state->m_fgoal_player == 1 && (input_port_read(screen.machine(), "IN1") & 0x40))
{
- drawgfxzoom_opaque(state->m_fgbitmap, cliprect, screen.machine().gfx[0],
+ drawgfxzoom_opaque(*state->m_fgbitmap, cliprect, screen.machine().gfx[0],
0, (state->m_fgoal_player << 2) | state->m_current_color,
1, 1,
0, 16,
0x40000,
0x40000);
- drawgfxzoom_opaque(state->m_bgbitmap, cliprect, screen.machine().gfx[1],
+ drawgfxzoom_opaque(*state->m_bgbitmap, cliprect, screen.machine().gfx[1],
0, 0,
1, 1,
0, 16,
@@ -69,14 +69,14 @@ SCREEN_UPDATE( fgoal )
}
else
{
- drawgfxzoom_opaque(state->m_fgbitmap, cliprect, screen.machine().gfx[0],
+ drawgfxzoom_opaque(*state->m_fgbitmap, cliprect, screen.machine().gfx[0],
0, (state->m_fgoal_player << 2) | state->m_current_color,
0, 0,
0, 0,
0x40000,
0x40000);
- drawgfxzoom_opaque(state->m_bgbitmap, cliprect, screen.machine().gfx[1],
+ drawgfxzoom_opaque(*state->m_bgbitmap, cliprect, screen.machine().gfx[1],
0, 0,
0, 0,
0, 0,
@@ -101,7 +101,7 @@ SCREEN_UPDATE( fgoal )
for (y = 0; y < 256; y++)
{
- UINT16* p = &bitmap->pix16(y);
+ UINT16* p = &bitmap.pix16(y);
const UINT16* FG = &state->m_fgbitmap->pix16(y);
const UINT16* BG = &state->m_bgbitmap->pix16(y);
diff --git a/src/mame/video/firetrap.c b/src/mame/video/firetrap.c
index c50e2a639c9..2aff85f615b 100644
--- a/src/mame/video/firetrap.c
+++ b/src/mame/video/firetrap.c
@@ -200,7 +200,7 @@ WRITE8_HANDLER( firetrap_bg2_scrolly_w )
***************************************************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
firetrap_state *state = machine.driver_data<firetrap_state>();
int offs;
diff --git a/src/mame/video/firetrk.c b/src/mame/video/firetrk.c
index 82d112fdcb6..9ac47741441 100644
--- a/src/mame/video/firetrk.c
+++ b/src/mame/video/firetrk.c
@@ -255,7 +255,7 @@ VIDEO_START( montecar )
}
-static void firetrk_draw_car(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, gfx_element **gfx, int which, int flash)
+static void firetrk_draw_car(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, gfx_element **gfx, int which, int flash)
{
firetrk_state *state = machine.driver_data<firetrk_state>();
int gfx_bank, code, color, flip_x, flip_y, x, y;
@@ -285,7 +285,7 @@ static void firetrk_draw_car(running_machine &machine, bitmap_t *bitmap, const r
}
-static void superbug_draw_car(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, gfx_element **gfx, int flash)
+static void superbug_draw_car(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, gfx_element **gfx, int flash)
{
firetrk_state *state = machine.driver_data<firetrk_state>();
int gfx_bank = (*state->m_car_rot & 0x10) ? 4 : 3;
@@ -298,7 +298,7 @@ static void superbug_draw_car(running_machine &machine, bitmap_t *bitmap, const
}
-static void montecar_draw_car(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, gfx_element **gfx, int which, int is_collision_detection)
+static void montecar_draw_car(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, gfx_element **gfx, int which, int is_collision_detection)
{
firetrk_state *state = machine.driver_data<firetrk_state>();
int gfx_bank, code, color, flip_x, flip_y, x, y;
@@ -328,7 +328,7 @@ static void montecar_draw_car(running_machine &machine, bitmap_t *bitmap, const
}
-static void draw_text(bitmap_t *bitmap, const rectangle &cliprect, gfx_element **gfx, UINT8 *alpha_ram,
+static void draw_text(bitmap_t &bitmap, const rectangle &cliprect, gfx_element **gfx, UINT8 *alpha_ram,
int x, int count, int height)
{
int i;
@@ -366,7 +366,7 @@ SCREEN_UPDATE( firetrk )
tilemap_set_scrolly(state->m_tilemap1, 0, *state->m_scroll_y);
tilemap_set_scrolly(state->m_tilemap2, 0, *state->m_scroll_y);
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
tilemap_draw(bitmap, playfield_window, state->m_tilemap1, 0, 0);
firetrk_draw_car(screen.machine(), bitmap, playfield_window, screen.machine().gfx, 0, state->m_flash);
firetrk_draw_car(screen.machine(), bitmap, playfield_window, screen.machine().gfx, 1, state->m_flash);
@@ -375,14 +375,14 @@ SCREEN_UPDATE( firetrk )
if (cliprect.max_y == screen.visible_area().max_y)
{
- tilemap_draw(state->m_helper1, playfield_window, state->m_tilemap2, 0, 0);
+ tilemap_draw(*state->m_helper1, playfield_window, state->m_tilemap2, 0, 0);
state->m_helper2->fill(0xff, playfield_window);
- firetrk_draw_car(screen.machine(), state->m_helper2, playfield_window, screen.machine().gfx, 0, FALSE);
+ firetrk_draw_car(screen.machine(), *state->m_helper2, playfield_window, screen.machine().gfx, 0, FALSE);
check_collision(state, 0);
state->m_helper2->fill(0xff, playfield_window);
- firetrk_draw_car(screen.machine(), state->m_helper2, playfield_window, screen.machine().gfx, 1, FALSE);
+ firetrk_draw_car(screen.machine(), *state->m_helper2, playfield_window, screen.machine().gfx, 1, FALSE);
check_collision(state, 1);
*state->m_blink = FALSE;
@@ -401,7 +401,7 @@ SCREEN_UPDATE( superbug )
tilemap_set_scrolly(state->m_tilemap1, 0, *state->m_scroll_y);
tilemap_set_scrolly(state->m_tilemap2, 0, *state->m_scroll_y);
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
tilemap_draw(bitmap, playfield_window, state->m_tilemap1, 0, 0);
superbug_draw_car(screen.machine(), bitmap, playfield_window, screen.machine().gfx, state->m_flash);
draw_text(bitmap, cliprect, screen.machine().gfx, state->m_alpha_num_ram + 0x00, 296, 0x10, 0x10);
@@ -409,10 +409,10 @@ SCREEN_UPDATE( superbug )
if (cliprect.max_y == screen.visible_area().max_y)
{
- tilemap_draw(state->m_helper1, playfield_window, state->m_tilemap2, 0, 0);
+ tilemap_draw(*state->m_helper1, playfield_window, state->m_tilemap2, 0, 0);
state->m_helper2->fill(0xff, playfield_window);
- superbug_draw_car(screen.machine(), state->m_helper2, playfield_window, screen.machine().gfx, FALSE);
+ superbug_draw_car(screen.machine(), *state->m_helper2, playfield_window, screen.machine().gfx, FALSE);
check_collision(state, 0);
*state->m_blink = FALSE;
@@ -431,7 +431,7 @@ SCREEN_UPDATE( montecar )
tilemap_set_scrolly(state->m_tilemap1, 0, *state->m_scroll_y);
tilemap_set_scrolly(state->m_tilemap2, 0, *state->m_scroll_y);
- bitmap->fill(0x2c, cliprect);
+ bitmap.fill(0x2c, cliprect);
tilemap_draw(bitmap, playfield_window, state->m_tilemap1, 0, 0);
montecar_draw_car(screen.machine(), bitmap, playfield_window, screen.machine().gfx, 0, FALSE);
montecar_draw_car(screen.machine(), bitmap, playfield_window, screen.machine().gfx, 1, FALSE);
@@ -440,14 +440,14 @@ SCREEN_UPDATE( montecar )
if (cliprect.max_y == screen.visible_area().max_y)
{
- tilemap_draw(state->m_helper1, playfield_window, state->m_tilemap2, 0, 0);
+ tilemap_draw(*state->m_helper1, playfield_window, state->m_tilemap2, 0, 0);
state->m_helper2->fill(0xff, playfield_window);
- montecar_draw_car(screen.machine(), state->m_helper2, playfield_window, screen.machine().gfx, 0, TRUE);
+ montecar_draw_car(screen.machine(), *state->m_helper2, playfield_window, screen.machine().gfx, 0, TRUE);
check_collision(state, 0);
state->m_helper2->fill(0xff, playfield_window);
- montecar_draw_car(screen.machine(), state->m_helper2, playfield_window, screen.machine().gfx, 1, TRUE);
+ montecar_draw_car(screen.machine(), *state->m_helper2, playfield_window, screen.machine().gfx, 1, TRUE);
check_collision(state, 1);
}
diff --git a/src/mame/video/fitfight.c b/src/mame/video/fitfight.c
index 625f33d52e2..031ed1d7c9b 100644
--- a/src/mame/video/fitfight.c
+++ b/src/mame/video/fitfight.c
@@ -4,7 +4,7 @@
#include "includes/fitfight.h"
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int layer )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int layer )
{
fitfight_state *state = machine.driver_data<fitfight_state>();
const gfx_element *gfx = machine.gfx[3];
@@ -126,7 +126,7 @@ SCREEN_UPDATE(fitfight)
vblank = (state->m_fof_700000[0] & 0x8000);
if (vblank > 0)
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
else {
// if (screen.machine().input().code_pressed(KEYCODE_Q))
// scrollbak = ((state->m_fof_a00000[0] & 0xff00) >> 5) - ((state->m_fof_700000[0] & 0x0038) >> 3);
diff --git a/src/mame/video/flower.c b/src/mame/video/flower.c
index 3ce41539ec5..35d318a4c6e 100644
--- a/src/mame/video/flower.c
+++ b/src/mame/video/flower.c
@@ -25,7 +25,7 @@ PALETTE_INIT( flower )
colortable_entry_set_value(machine.colortable, i, i);
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
flower_state *state = machine.driver_data<flower_state>();
const gfx_element *gfx = machine.gfx[1];
diff --git a/src/mame/video/flstory.c b/src/mame/video/flstory.c
index f63ba188dee..71ab6f94c28 100644
--- a/src/mame/video/flstory.c
+++ b/src/mame/video/flstory.c
@@ -178,7 +178,7 @@ WRITE8_HANDLER( flstory_scrlram_w )
}
-static void flstory_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int pri )
+static void flstory_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int pri )
{
flstory_state *state = machine.driver_data<flstory_state>();
int i;
@@ -235,7 +235,7 @@ SCREEN_UPDATE( flstory )
return 0;
}
-static void victnine_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void victnine_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
flstory_state *state = machine.driver_data<flstory_state>();
int i;
diff --git a/src/mame/video/foodf.c b/src/mame/video/foodf.c
index 36599879926..8ba0c8b2522 100644
--- a/src/mame/video/foodf.c
+++ b/src/mame/video/foodf.c
@@ -119,14 +119,14 @@ SCREEN_UPDATE( foodf )
foodf_state *state = screen.machine().driver_data<foodf_state>();
int offs;
const gfx_element *gfx = screen.machine().gfx[1];
- bitmap_t *priority_bitmap = screen.machine().priority_bitmap;
+ bitmap_t &priority_bitmap = screen.machine().priority_bitmap;
UINT16 *spriteram16 = state->m_spriteram;
/* first draw the playfield opaquely */
tilemap_draw(bitmap, cliprect, state->m_playfield_tilemap, TILEMAP_DRAW_OPAQUE, 0);
/* then draw the non-transparent parts with a priority of 1 */
- priority_bitmap->fill(0);
+ priority_bitmap.fill(0);
tilemap_draw(bitmap, cliprect, state->m_playfield_tilemap, 0, 1);
/* draw the motion objects front-to-back */
diff --git a/src/mame/video/freekick.c b/src/mame/video/freekick.c
index ced0850c9e3..5c7e6a8d03c 100644
--- a/src/mame/video/freekick.c
+++ b/src/mame/video/freekick.c
@@ -29,7 +29,7 @@ WRITE8_HANDLER( freek_videoram_w )
tilemap_mark_tile_dirty(state->m_freek_tilemap, offset & 0x3ff);
}
-static void gigas_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void gigas_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
freekick_state *state = machine.driver_data<freekick_state>();
int offs;
@@ -64,7 +64,7 @@ static void gigas_draw_sprites( running_machine &machine, bitmap_t *bitmap, cons
}
-static void pbillrd_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void pbillrd_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
freekick_state *state = machine.driver_data<freekick_state>();
int offs;
@@ -100,7 +100,7 @@ static void pbillrd_draw_sprites( running_machine &machine, bitmap_t *bitmap, co
-static void freekick_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void freekick_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
freekick_state *state = machine.driver_data<freekick_state>();
int offs;
diff --git a/src/mame/video/fromance.c b/src/mame/video/fromance.c
index f47b3728a3b..008b1413913 100644
--- a/src/mame/video/fromance.c
+++ b/src/mame/video/fromance.c
@@ -303,7 +303,7 @@ WRITE8_HANDLER( fromance_crtc_register_w )
*
*************************************/
-static void draw_sprites( screen_device &screen, bitmap_t *bitmap, const rectangle &cliprect, int draw_priority )
+static void draw_sprites( screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect, int draw_priority )
{
fromance_state *state = screen.machine().driver_data<fromance_state>();
static const UINT8 zoomtable[16] = { 0,7,14,20,25,30,34,38,42,46,49,52,54,57,59,61 };
diff --git a/src/mame/video/funkybee.c b/src/mame/video/funkybee.c
index b30ee8b8a95..21ecaf55cd4 100644
--- a/src/mame/video/funkybee.c
+++ b/src/mame/video/funkybee.c
@@ -95,7 +95,7 @@ VIDEO_START( funkybee )
state->m_bg_tilemap = tilemap_create(machine, get_bg_tile_info, funkybee_tilemap_scan, 8, 8, 32, 32);
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
funkybee_state *state = machine.driver_data<funkybee_state>();
int offs;
@@ -124,7 +124,7 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
}
}
-static void draw_columns( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_columns( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
funkybee_state *state = machine.driver_data<funkybee_state>();
int offs;
diff --git a/src/mame/video/funkyjet.c b/src/mame/video/funkyjet.c
index 4326c15db7f..88bc9cb460a 100644
--- a/src/mame/video/funkyjet.c
+++ b/src/mame/video/funkyjet.c
@@ -19,7 +19,7 @@ SCREEN_UPDATE( funkyjet )
flip_screen_set(screen.machine(), BIT(flip, 7));
deco16ic_pf_update(state->m_deco_tilegen1, state->m_pf1_rowscroll, state->m_pf2_rowscroll);
- bitmap->fill(768, cliprect);
+ bitmap.fill(768, cliprect);
deco16ic_tilemap_2_draw(state->m_deco_tilegen1, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
deco16ic_tilemap_1_draw(state->m_deco_tilegen1, bitmap, cliprect, 0, 0);
screen.machine().device<decospr_device>("spritegen")->draw_sprites(screen.machine(), bitmap, cliprect, state->m_spriteram, 0x400);
diff --git a/src/mame/video/funybubl.c b/src/mame/video/funybubl.c
index d2227924988..b68e0a32d6d 100644
--- a/src/mame/video/funybubl.c
+++ b/src/mame/video/funybubl.c
@@ -28,7 +28,7 @@ VIDEO_START(funybubl)
{
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
funybubl_state *state = machine.driver_data<funybubl_state>();
UINT8 *source = &state->m_banked_vram[0x2000 - 0x20];
@@ -79,7 +79,7 @@ SCREEN_UPDATE(funybubl)
int x, y, offs;
offs = 0;
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
/* tilemap .. convert it .. banking makes it slightly more annoying but still easy */
for (y = 0; y < 32; y++)
diff --git a/src/mame/video/fuukifg2.c b/src/mame/video/fuukifg2.c
index aa362c06846..4b3d0d22e59 100644
--- a/src/mame/video/fuukifg2.c
+++ b/src/mame/video/fuukifg2.c
@@ -135,12 +135,12 @@ VIDEO_START( fuuki16 )
***************************************************************************/
-static void draw_sprites( screen_device &screen, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect )
{
fuuki16_state *state = screen.machine().driver_data<fuuki16_state>();
int offs;
const gfx_element *gfx = screen.machine().gfx[0];
- bitmap_t *priority_bitmap = screen.machine().priority_bitmap;
+ bitmap_t &priority_bitmap = screen.machine().priority_bitmap;
const rectangle &visarea = screen.visible_area();
UINT16 *spriteram16 = state->m_spriteram;
int max_x = visarea.max_x + 1;
@@ -265,7 +265,7 @@ if (screen.machine().input().code_pressed(KEYCODE_X))
***************************************************************************/
/* Wrapper to handle bg and bg2 ttogether */
-static void fuuki16_draw_layer( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int i, int flag, int pri )
+static void fuuki16_draw_layer( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int i, int flag, int pri )
{
fuuki16_state *state = machine.driver_data<fuuki16_state>();
int buffer = (state->m_vregs[0x1e / 2] & 0x40);
@@ -337,8 +337,8 @@ SCREEN_UPDATE( fuuki16 )
// fuuki16_draw_layer(screen.machine(), bitmap, cliprect, tm_back, TILEMAP_DRAW_OPAQUE, 0);
/* Actually, bg colour is simply the last pen i.e. 0x1fff -pjp */
- bitmap->fill((0x800 * 4) - 1, cliprect);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ bitmap.fill((0x800 * 4) - 1, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
fuuki16_draw_layer(screen.machine(), bitmap, cliprect, tm_back, 0, 1);
fuuki16_draw_layer(screen.machine(), bitmap, cliprect, tm_middle, 0, 2);
diff --git a/src/mame/video/fuukifg3.c b/src/mame/video/fuukifg3.c
index bd1280b7b25..06d8821ba5e 100644
--- a/src/mame/video/fuukifg3.c
+++ b/src/mame/video/fuukifg3.c
@@ -143,12 +143,12 @@ VIDEO_START( fuuki32 )
***************************************************************************/
-static void draw_sprites( screen_device &screen, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect )
{
fuuki32_state *state = screen.machine().driver_data<fuuki32_state>();
int offs;
const gfx_element *gfx = screen.machine().gfx[0];
- bitmap_t *priority_bitmap = screen.machine().priority_bitmap;
+ bitmap_t &priority_bitmap = screen.machine().priority_bitmap;
const rectangle &visarea = screen.visible_area();
int max_x = visarea.max_x + 1;
int max_y = visarea.max_y + 1;
@@ -289,7 +289,7 @@ if (screen.machine().input().code_pressed(KEYCODE_X))
***************************************************************************/
/* Wrapper to handle bg and bg2 ttogether */
-static void fuuki32_draw_layer( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int i, int flag, int pri )
+static void fuuki32_draw_layer( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int i, int flag, int pri )
{
fuuki32_state *state = machine.driver_data<fuuki32_state>();
int buffer = ((state->m_vregs[0x1e / 4] & 0x0000ffff) & 0x40);
@@ -356,8 +356,8 @@ SCREEN_UPDATE( fuuki32 )
tilemap_set_scrolly(state->m_tilemap[3], 0, layer2_scrolly);
/* The bg colour is the last pen i.e. 0x1fff */
- bitmap->fill((0x800 * 4) - 1, cliprect);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ bitmap.fill((0x800 * 4) - 1, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
fuuki32_draw_layer(screen.machine(), bitmap, cliprect, tm_back, 0, 1);
fuuki32_draw_layer(screen.machine(), bitmap, cliprect, tm_middle, 0, 2);
diff --git a/src/mame/video/gaelco.c b/src/mame/video/gaelco.c
index b332ee4afe1..810e52f179b 100644
--- a/src/mame/video/gaelco.c
+++ b/src/mame/video/gaelco.c
@@ -121,7 +121,7 @@ VIDEO_START( maniacsq )
3 | xxxxxxxx xxxxxx-- | sprite code
*/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
gaelco_state *state = machine.driver_data<gaelco_state>();
int i, x, y, ex, ey;
@@ -197,8 +197,8 @@ SCREEN_UPDATE( maniacsq )
tilemap_set_scrolly(state->m_tilemap[1], 0, state->m_vregs[2]);
tilemap_set_scrollx(state->m_tilemap[1], 0, state->m_vregs[3]);
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(0, cliprect);
tilemap_draw(bitmap, cliprect, state->m_tilemap[1], 3, 0);
tilemap_draw(bitmap, cliprect, state->m_tilemap[0], 3, 0);
@@ -226,8 +226,8 @@ SCREEN_UPDATE( bigkarnk )
tilemap_set_scrolly(state->m_tilemap[1], 0, state->m_vregs[2]);
tilemap_set_scrollx(state->m_tilemap[1], 0, state->m_vregs[3]);
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(0, cliprect);
tilemap_draw(bitmap, cliprect, state->m_tilemap[1], TILEMAP_DRAW_LAYER1 | 3, 0);
tilemap_draw(bitmap, cliprect, state->m_tilemap[0], TILEMAP_DRAW_LAYER1 | 3, 0);
diff --git a/src/mame/video/gaelco2.c b/src/mame/video/gaelco2.c
index acf8b6db8fb..15a7acb1151 100644
--- a/src/mame/video/gaelco2.c
+++ b/src/mame/video/gaelco2.c
@@ -339,7 +339,7 @@ VIDEO_START( gaelco2_dual )
***************************************************************************/
-static void draw_sprites(screen_device &screen, bitmap_t *bitmap, const rectangle &cliprect, int mask, int xoffs)
+static void draw_sprites(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect, int mask, int xoffs)
{
gaelco2_state *state = screen.machine().driver_data<gaelco2_state>();
UINT16 *buffered_spriteram16 = screen.machine().generic.buffered_spriteram.u16;
@@ -398,7 +398,7 @@ static void draw_sprites(screen_device &screen, bitmap_t *bitmap, const rectangl
for (py = 0; py < gfx->height; py++){
/* get a pointer to the current line in the screen bitmap */
int ypos = ((sy + ey*16 + py) & 0x1ff);
- UINT16 *srcy = &bitmap->pix16(ypos);
+ UINT16 *srcy = &bitmap.pix16(ypos);
int gfx_py = yflip ? (gfx->height - 1 - py) : py;
@@ -458,7 +458,7 @@ SCREEN_UPDATE( gaelco2 )
}
/* draw screen */
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
tilemap_draw(bitmap, cliprect, state->m_pant[1], 0, 0);
tilemap_draw(bitmap, cliprect, state->m_pant[0], 0, 0);
@@ -466,7 +466,7 @@ SCREEN_UPDATE( gaelco2 )
return 0;
}
-static UINT32 dual_update(screen_device &screen, bitmap_t *bitmap, const rectangle &cliprect, int index)
+static UINT32 dual_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect, int index)
{
gaelco2_state *state = screen.machine().driver_data<gaelco2_state>();
int i;
@@ -488,7 +488,7 @@ static UINT32 dual_update(screen_device &screen, bitmap_t *bitmap, const rectang
}
/* draw screen */
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
tilemap_draw(bitmap,cliprect,state->m_pant[index], 0, 0);
draw_sprites(screen,bitmap,cliprect, 0x8000 * index, 0);
diff --git a/src/mame/video/gaelco3d.c b/src/mame/video/gaelco3d.c
index 6ec21d1a9ff..0d945585a37 100644
--- a/src/mame/video/gaelco3d.c
+++ b/src/mame/video/gaelco3d.c
@@ -461,7 +461,7 @@ SCREEN_UPDATE( gaelco3d )
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
- UINT16 *dest = &bitmap->pix16(y);
+ UINT16 *dest = &bitmap.pix16(y);
for (x = cliprect.min_x; x <= cliprect.max_x; x++)
{
int offs = (yv + y - cliprect.min_y) * 4096 + xv + x - cliprect.min_x;
@@ -476,7 +476,7 @@ SCREEN_UPDATE( gaelco3d )
else*/
{
if (state->m_video_changed)
- copybitmap(bitmap, state->m_poly->screenbits(), 0,1, 0,0, cliprect);
+ copybitmap(bitmap, *state->m_poly->screenbits(), 0,1, 0,0, cliprect);
ret = state->m_video_changed;
state->m_video_changed = FALSE;
}
diff --git a/src/mame/video/gaiden.c b/src/mame/video/gaiden.c
index 040ea1bff2b..b9d8c4ded0f 100644
--- a/src/mame/video/gaiden.c
+++ b/src/mame/video/gaiden.c
@@ -310,7 +310,7 @@ WRITE16_HANDLER( gaiden_videoram_w )
changes?) it appears that the sprite drawing is no longer putting the correct raw data
in the bitmaps? */
static void blendbitmaps(running_machine &machine,
- bitmap_t *dest,bitmap_t *src1,bitmap_t *src2,bitmap_t *src3,
+ bitmap_t &dest,bitmap_t &src1,bitmap_t &src2,bitmap_t &src3,
int sx,int sy,const rectangle &cliprect)
{
int y,x;
@@ -318,10 +318,10 @@ static void blendbitmaps(running_machine &machine,
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
- UINT32 *dd = &dest->pix32(y);
- UINT16 *sd1 = &src1->pix16(y);
- UINT16 *sd2 = &src2->pix16(y);
- UINT16 *sd3 = &src3->pix16(y);
+ UINT32 *dd = &dest.pix32(y);
+ UINT16 *sd1 = &src1.pix16(y);
+ UINT16 *sd2 = &src2.pix16(y);
+ UINT16 *sd3 = &src3.pix16(y);
for (x = cliprect.min_x; x <= cliprect.max_x; x++)
{
@@ -367,7 +367,7 @@ static void blendbitmaps(running_machine &machine,
#define NUM_SPRITES 256
-static void gaiden_draw_sprites( running_machine &machine, bitmap_t *bitmap_bg, bitmap_t *bitmap_fg, bitmap_t *bitmap_sp, const rectangle &cliprect )
+static void gaiden_draw_sprites( running_machine &machine, bitmap_t &bitmap_bg, bitmap_t &bitmap_fg, bitmap_t &bitmap_sp, const rectangle &cliprect )
{
static const UINT8 layout[8][8] =
{
@@ -465,7 +465,7 @@ static void gaiden_draw_sprites( running_machine &machine, bitmap_t *bitmap_bg,
}
else
{
- bitmap_t *bitmap = (priority >= 2) ? bitmap_bg : bitmap_fg;
+ bitmap_t &bitmap = (priority >= 2) ? bitmap_bg : bitmap_fg;
for (row = 0; row < sizey; row++)
{
@@ -489,7 +489,7 @@ static void gaiden_draw_sprites( running_machine &machine, bitmap_t *bitmap_bg,
}
-static void raiga_draw_sprites( running_machine &machine, bitmap_t *bitmap_bg, bitmap_t *bitmap_fg, bitmap_t *bitmap_sp, const rectangle &cliprect )
+static void raiga_draw_sprites( running_machine &machine, bitmap_t &bitmap_bg, bitmap_t &bitmap_fg, bitmap_t &bitmap_sp, const rectangle &cliprect )
{
static const UINT8 layout[8][8] =
{
@@ -586,7 +586,7 @@ static void raiga_draw_sprites( running_machine &machine, bitmap_t *bitmap_bg, b
}
else
{
- bitmap_t *bitmap = (priority >= 2) ? bitmap_bg : bitmap_fg;
+ bitmap_t &bitmap = (priority >= 2) ? bitmap_bg : bitmap_fg;
for (row = 0; row < sizey; row++)
{
@@ -629,7 +629,7 @@ static void raiga_draw_sprites( running_machine &machine, bitmap_t *bitmap_bg, b
* |---------x------- | x position (high bit)
*/
-static void drgnbowl_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void drgnbowl_draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
gaiden_state *state = machine.driver_data<gaiden_state>();
UINT16 *spriteram = state->m_spriteram;
@@ -673,25 +673,25 @@ static void drgnbowl_draw_sprites(running_machine &machine, bitmap_t *bitmap, co
SCREEN_UPDATE( gaiden )
{
gaiden_state *state = screen.machine().driver_data<gaiden_state>();
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
state->m_tile_bitmap_bg->fill(0x200, cliprect);
state->m_tile_bitmap_fg->fill(0, cliprect);
state->m_sprite_bitmap->fill(0, cliprect);
/* draw tilemaps into a 16-bit bitmap */
- tilemap_draw(state->m_tile_bitmap_bg, cliprect, state->m_background, 0, 1);
- tilemap_draw(state->m_tile_bitmap_fg, cliprect, state->m_foreground, 0, 2);
+ tilemap_draw(*state->m_tile_bitmap_bg, cliprect, state->m_background, 0, 1);
+ tilemap_draw(*state->m_tile_bitmap_fg, cliprect, state->m_foreground, 0, 2);
/* draw the blended tiles at a lower priority
so sprites covered by them will still be drawn */
- tilemap_draw(state->m_tile_bitmap_fg, cliprect, state->m_foreground, 1, 0);
- tilemap_draw(state->m_tile_bitmap_fg, cliprect, state->m_text_layer, 0, 4);
+ tilemap_draw(*state->m_tile_bitmap_fg, cliprect, state->m_foreground, 1, 0);
+ tilemap_draw(*state->m_tile_bitmap_fg, cliprect, state->m_text_layer, 0, 4);
/* draw sprites into a 16-bit bitmap */
- gaiden_draw_sprites(screen.machine(), state->m_tile_bitmap_bg, state->m_tile_bitmap_fg, state->m_sprite_bitmap, cliprect);
+ gaiden_draw_sprites(screen.machine(), *state->m_tile_bitmap_bg, *state->m_tile_bitmap_fg, *state->m_sprite_bitmap, cliprect);
/* mix & blend the tilemaps and sprites into a 32-bit bitmap */
- blendbitmaps(screen.machine(), bitmap, state->m_tile_bitmap_bg, state->m_tile_bitmap_fg, state->m_sprite_bitmap, 0, 0, cliprect);
+ blendbitmaps(screen.machine(), bitmap, *state->m_tile_bitmap_bg, *state->m_tile_bitmap_fg, *state->m_sprite_bitmap, 0, 0, cliprect);
return 0;
}
@@ -699,32 +699,32 @@ SCREEN_UPDATE( gaiden )
SCREEN_UPDATE( raiga )
{
gaiden_state *state = screen.machine().driver_data<gaiden_state>();
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
state->m_tile_bitmap_bg->fill(0x200, cliprect);
state->m_tile_bitmap_fg->fill(0, cliprect);
state->m_sprite_bitmap->fill(0, cliprect);
/* draw tilemaps into a 16-bit bitmap */
- tilemap_draw(state->m_tile_bitmap_bg, cliprect, state->m_background, 0, 1);
- tilemap_draw(state->m_tile_bitmap_fg, cliprect, state->m_foreground, 0, 2);
+ tilemap_draw(*state->m_tile_bitmap_bg, cliprect, state->m_background, 0, 1);
+ tilemap_draw(*state->m_tile_bitmap_fg, cliprect, state->m_foreground, 0, 2);
/* draw the blended tiles at a lower priority
so sprites covered by them will still be drawn */
- tilemap_draw(state->m_tile_bitmap_fg, cliprect, state->m_foreground, 1, 0);
- tilemap_draw(state->m_tile_bitmap_fg, cliprect, state->m_text_layer, 0, 4);
+ tilemap_draw(*state->m_tile_bitmap_fg, cliprect, state->m_foreground, 1, 0);
+ tilemap_draw(*state->m_tile_bitmap_fg, cliprect, state->m_text_layer, 0, 4);
/* draw sprites into a 16-bit bitmap */
- raiga_draw_sprites(screen.machine(), state->m_tile_bitmap_bg, state->m_tile_bitmap_fg, state->m_sprite_bitmap, cliprect);
+ raiga_draw_sprites(screen.machine(), *state->m_tile_bitmap_bg, *state->m_tile_bitmap_fg, *state->m_sprite_bitmap, cliprect);
/* mix & blend the tilemaps and sprites into a 32-bit bitmap */
- blendbitmaps(screen.machine(), bitmap, state->m_tile_bitmap_bg, state->m_tile_bitmap_fg, state->m_sprite_bitmap, 0, 0, cliprect);
+ blendbitmaps(screen.machine(), bitmap, *state->m_tile_bitmap_bg, *state->m_tile_bitmap_fg, *state->m_sprite_bitmap, 0, 0, cliprect);
return 0;
}
SCREEN_UPDATE( drgnbowl )
{
gaiden_state *state = screen.machine().driver_data<gaiden_state>();
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
tilemap_draw(bitmap, cliprect, state->m_background, 0, 1);
tilemap_draw(bitmap, cliprect, state->m_foreground, 0, 2);
diff --git a/src/mame/video/galaga.c b/src/mame/video/galaga.c
index 0ec8c09849b..62dc8ef7270 100644
--- a/src/mame/video/galaga.c
+++ b/src/mame/video/galaga.c
@@ -476,7 +476,7 @@ WRITE8_HANDLER ( gatsbee_bank_w )
***************************************************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
galaga_state *state = machine.driver_data<galaga_state>();
@@ -530,7 +530,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const recta
}
-static void draw_stars(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_stars(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
galaga_state *state = machine.driver_data<galaga_state>();
/* draw the stars */
@@ -558,7 +558,7 @@ static void draw_stars(running_machine &machine, bitmap_t *bitmap, const rectang
y = (y_align + star_seed_tab[star_cntr].y + state->m_stars_scrolly) % 256;
if (x >= cliprect.min_x && x <= cliprect.max_x && y >= cliprect.min_y && y <= cliprect.max_y)
- bitmap->pix16(y, x) = STARS_COLOR_BASE + star_seed_tab[ star_cntr ].col;
+ bitmap.pix16(y, x) = STARS_COLOR_BASE + star_seed_tab[ star_cntr ].col;
}
}
@@ -569,7 +569,7 @@ SCREEN_UPDATE( galaga )
{
galaga_state *state = screen.machine().driver_data<galaga_state>();
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
draw_stars(screen.machine(),bitmap,cliprect);
draw_sprites(screen.machine(),bitmap,cliprect);
tilemap_draw(bitmap,cliprect,state->m_fg_tilemap,0,0);
diff --git a/src/mame/video/galastrm.c b/src/mame/video/galastrm.c
index d795094e97b..b6d46e97b90 100644
--- a/src/mame/video/galastrm.c
+++ b/src/mame/video/galastrm.c
@@ -193,7 +193,7 @@ logerror("Sprite number %04x had %02x invalid chunks\n",tilenum,bad_chunks);
}
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, const int *primasks, int priority)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, const int *primasks, int priority)
{
galastrm_state *state = machine.driver_data<galastrm_state>();
struct tempsprite *sprite_ptr = state->m_sprite_ptr_pre;
@@ -242,7 +242,7 @@ static void tc0610_draw_scanline(void *dest, INT32 scanline, const poly_extent *
}
}
-static void tc0610_rotate_draw(running_machine &machine, bitmap_t *bitmap, bitmap_t *srcbitmap, const rectangle &clip)
+static void tc0610_rotate_draw(running_machine &machine, bitmap_t &bitmap, bitmap_t *srcbitmap, const rectangle &clip)
{
galastrm_state *state = machine.driver_data<galastrm_state>();
poly_extra_data *extra = (poly_extra_data *)poly_get_extra_data(state->m_poly);
@@ -428,7 +428,7 @@ static void tc0610_rotate_draw(running_machine &machine, bitmap_t *bitmap, bitma
extra->texbase = srcbitmap;
callback = tc0610_draw_scanline;
- poly_render_quad(state->m_poly, bitmap, clip, callback, 2, &vert[0], &vert[1], &vert[2], &vert[3]);
+ poly_render_quad(state->m_poly, &bitmap, clip, callback, 2, &vert[0], &vert[1], &vert[2], &vert[3]);
}
/**************************************************************
@@ -445,7 +445,7 @@ SCREEN_UPDATE( galastrm )
UINT16 priority;
static const int primasks[4] = {0xfffc, 0xfff0, 0xff00, 0x0};
rectangle clip;
- bitmap_t *priority_bitmap = screen.machine().priority_bitmap;
+ bitmap_t &priority_bitmap = screen.machine().priority_bitmap;
clip.min_x = 0;
clip.min_y = 0;
@@ -466,8 +466,8 @@ SCREEN_UPDATE( galastrm )
pivlayer[1] = pivlayer[0] ^ 1;
pivlayer[2] = 2;
- bitmap->fill(0, cliprect);
- priority_bitmap->fill(0, clip);
+ bitmap.fill(0, cliprect);
+ priority_bitmap.fill(0, clip);
state->m_tmpbitmaps->fill(0, clip);
tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, pivlayer[0], 0, 0);
@@ -494,11 +494,11 @@ SCREEN_UPDATE( galastrm )
int x,y;
UINT8 *pri;
- for (y=0; y < priority_bitmap->height; y++)
+ for (y=0; y < priority_bitmap.height; y++)
{
- for (x=0; x < priority_bitmap->width; x++)
+ for (x=0; x < priority_bitmap.width; x++)
{
- pri = &priority_bitmap->pix8(y, x);
+ pri = &priority_bitmap.pix8(y, x);
if (!(*pri & 0x02) && state->m_tmpbitmaps->pix16(y, x))
*pri |= 0x04;
}
@@ -512,7 +512,7 @@ SCREEN_UPDATE( galastrm )
state->m_polybitmap->fill(0, clip);
tc0610_rotate_draw(screen.machine(),state->m_polybitmap,state->m_tmpbitmaps,cliprect);
- priority_bitmap->fill(0, cliprect);
+ priority_bitmap.fill(0, cliprect);
draw_sprites(screen.machine(),bitmap,cliprect,primasks,0);
if (!screen.machine().input().code_pressed(KEYCODE_B)) tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[4], 0, 0);
@@ -523,17 +523,17 @@ SCREEN_UPDATE( galastrm )
#else
if (layer[0]==0 && layer[1]==3 && layer[2]==2 && layer[3]==1)
{
- tc0480scp_tilemap_draw(tc0480scp, state->m_tmpbitmaps, clip, layer[0], 0, 1);
- tc0480scp_tilemap_draw(tc0480scp, state->m_tmpbitmaps, clip, layer[1], 0, 4);
- tc0480scp_tilemap_draw(tc0480scp, state->m_tmpbitmaps, clip, layer[2], 0, 4);
- tc0480scp_tilemap_draw(tc0480scp, state->m_tmpbitmaps, clip, layer[3], 0, 4);
+ tc0480scp_tilemap_draw(tc0480scp, *state->m_tmpbitmaps, clip, layer[0], 0, 1);
+ tc0480scp_tilemap_draw(tc0480scp, *state->m_tmpbitmaps, clip, layer[1], 0, 4);
+ tc0480scp_tilemap_draw(tc0480scp, *state->m_tmpbitmaps, clip, layer[2], 0, 4);
+ tc0480scp_tilemap_draw(tc0480scp, *state->m_tmpbitmaps, clip, layer[3], 0, 4);
}
else
{
- tc0480scp_tilemap_draw(tc0480scp, state->m_tmpbitmaps, clip, layer[0], 0, 1);
- tc0480scp_tilemap_draw(tc0480scp, state->m_tmpbitmaps, clip, layer[1], 0, 2);
- tc0480scp_tilemap_draw(tc0480scp, state->m_tmpbitmaps, clip, layer[2], 0, 4);
- tc0480scp_tilemap_draw(tc0480scp, state->m_tmpbitmaps, clip, layer[3], 0, 8);
+ tc0480scp_tilemap_draw(tc0480scp, *state->m_tmpbitmaps, clip, layer[0], 0, 1);
+ tc0480scp_tilemap_draw(tc0480scp, *state->m_tmpbitmaps, clip, layer[1], 0, 2);
+ tc0480scp_tilemap_draw(tc0480scp, *state->m_tmpbitmaps, clip, layer[2], 0, 4);
+ tc0480scp_tilemap_draw(tc0480scp, *state->m_tmpbitmaps, clip, layer[3], 0, 8);
}
if (layer[0]==3 && layer[1]==0 && layer[2]==1 && layer[3]==2)
@@ -541,11 +541,11 @@ SCREEN_UPDATE( galastrm )
int x,y;
UINT8 *pri;
- for (y=0; y < priority_bitmap->height(); y++)
+ for (y=0; y < priority_bitmap.height(); y++)
{
- for (x=0; x < priority_bitmap->width(); x++)
+ for (x=0; x < priority_bitmap.width(); x++)
{
- pri = &priority_bitmap->pix8(y, x);
+ pri = &priority_bitmap.pix8(y, x);
if (!(*pri & 0x02) && state->m_tmpbitmaps->pix16(y, x))
*pri |= 0x04;
}
@@ -553,13 +553,13 @@ SCREEN_UPDATE( galastrm )
}
draw_sprites_pre(screen.machine(), 42-X_OFFSET, -571+Y_OFFSET);
- draw_sprites(screen.machine(),state->m_tmpbitmaps,clip,primasks,1);
+ draw_sprites(screen.machine(),*state->m_tmpbitmaps,clip,primasks,1);
- copybitmap_trans(bitmap,state->m_polybitmap,0,0, 0,0,cliprect,0);
+ copybitmap_trans(bitmap,*state->m_polybitmap,0,0, 0,0,cliprect,0);
state->m_polybitmap->fill(0, clip);
- tc0610_rotate_draw(screen.machine(),state->m_polybitmap,state->m_tmpbitmaps,cliprect);
+ tc0610_rotate_draw(screen.machine(),*state->m_polybitmap,state->m_tmpbitmaps,cliprect);
- priority_bitmap->fill(0, cliprect);
+ priority_bitmap.fill(0, cliprect);
draw_sprites(screen.machine(),bitmap,cliprect,primasks,0);
tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[4], 0, 0);
diff --git a/src/mame/video/galaxian.c b/src/mame/video/galaxian.c
index 36e5840dd04..dbd04f23a51 100644
--- a/src/mame/video/galaxian.c
+++ b/src/mame/video/galaxian.c
@@ -237,13 +237,13 @@ H=B0: 0C,0C,0D,0D,0E,0E,0F,0F 0C,0C,2D,2D,0E,0E,2F,2F
static void state_save_register(running_machine &machine);
static TILE_GET_INFO( bg_get_tile_info );
-static void sprites_draw(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, const UINT8 *spritebase);
+static void sprites_draw(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, const UINT8 *spritebase);
static void stars_init(running_machine &machine);
static void stars_update_origin(running_machine &machine);
-static void stars_draw_row(galaxian_state *state, bitmap_t *bitmap, int maxx, int y, UINT32 star_offs, UINT8 starmask);
+static void stars_draw_row(galaxian_state *state, bitmap_t &bitmap, int maxx, int y, UINT32 star_offs, UINT8 starmask);
-static void bullets_draw(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, const UINT8 *base);
+static void bullets_draw(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, const UINT8 *base);
@@ -561,7 +561,7 @@ WRITE8_HANDLER( galaxian_objram_w )
*
*************************************/
-static void sprites_draw(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, const UINT8 *spritebase)
+static void sprites_draw(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, const UINT8 *spritebase)
{
galaxian_state *state = machine.driver_data<galaxian_state>();
rectangle clip = cliprect;
@@ -624,7 +624,7 @@ static void sprites_draw(running_machine &machine, bitmap_t *bitmap, const recta
*
*************************************/
-static void bullets_draw(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, const UINT8 *base)
+static void bullets_draw(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, const UINT8 *base)
{
galaxian_state *state = machine.driver_data<galaxian_state>();
int y;
@@ -881,7 +881,7 @@ TIMER_DEVICE_CALLBACK( galaxian_stars_blink_timer )
*
*************************************/
-static void stars_draw_row(galaxian_state *state, bitmap_t *bitmap, int maxx, int y, UINT32 star_offs, UINT8 starmask)
+static void stars_draw_row(galaxian_state *state, bitmap_t &bitmap, int maxx, int y, UINT32 star_offs, UINT8 starmask)
{
int x;
@@ -917,7 +917,7 @@ static void stars_draw_row(galaxian_state *state, bitmap_t *bitmap, int maxx, in
if (star_offs >= STAR_RNG_PERIOD)
star_offs = 0;
if (enable_star && (star & 0x80) != 0 && (star & starmask) != 0)
- bitmap->pix32(y, GALAXIAN_XSCALE*x + 0) = state->m_star_color[star & 0x3f];
+ bitmap.pix32(y, GALAXIAN_XSCALE*x + 0) = state->m_star_color[star & 0x3f];
/* second RNG clock: two pixels */
star = state->m_stars[star_offs++];
@@ -925,8 +925,8 @@ static void stars_draw_row(galaxian_state *state, bitmap_t *bitmap, int maxx, in
star_offs = 0;
if (enable_star && (star & 0x80) != 0 && (star & starmask) != 0)
{
- bitmap->pix32(y, GALAXIAN_XSCALE*x + 1) = state->m_star_color[star & 0x3f];
- bitmap->pix32(y, GALAXIAN_XSCALE*x + 2) = state->m_star_color[star & 0x3f];
+ bitmap.pix32(y, GALAXIAN_XSCALE*x + 1) = state->m_star_color[star & 0x3f];
+ bitmap.pix32(y, GALAXIAN_XSCALE*x + 2) = state->m_star_color[star & 0x3f];
}
}
}
@@ -939,11 +939,11 @@ static void stars_draw_row(galaxian_state *state, bitmap_t *bitmap, int maxx, in
*
*************************************/
-void galaxian_draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+void galaxian_draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
galaxian_state *state = machine.driver_data<galaxian_state>();
/* erase the background to black first */
- bitmap->fill(RGB_BLACK, cliprect);
+ bitmap.fill(RGB_BLACK, cliprect);
/* update the star origin to the current frame */
stars_update_origin(machine);
@@ -963,7 +963,7 @@ void galaxian_draw_background(running_machine &machine, bitmap_t *bitmap, const
}
-static void background_draw_colorsplit(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, rgb_t color, int split, int split_flipped)
+static void background_draw_colorsplit(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, rgb_t color, int split, int split_flipped)
{
galaxian_state *state = machine.driver_data<galaxian_state>();
/* horizontal bgcolor split */
@@ -972,29 +972,29 @@ static void background_draw_colorsplit(running_machine &machine, bitmap_t *bitma
rectangle draw = cliprect;
draw.max_x = MIN(draw.max_x, split_flipped * GALAXIAN_XSCALE - 1);
if (draw.min_x <= draw.max_x)
- bitmap->fill(RGB_BLACK, draw);
+ bitmap.fill(RGB_BLACK, draw);
draw = cliprect;
draw.min_x = MAX(draw.min_x, split_flipped * GALAXIAN_XSCALE);
if (draw.min_x <= draw.max_x)
- bitmap->fill(color, draw);
+ bitmap.fill(color, draw);
}
else
{
rectangle draw = cliprect;
draw.max_x = MIN(draw.max_x, split * GALAXIAN_XSCALE - 1);
if (draw.min_x <= draw.max_x)
- bitmap->fill(color, draw);
+ bitmap.fill(color, draw);
draw = cliprect;
draw.min_x = MAX(draw.min_x, split * GALAXIAN_XSCALE);
if (draw.min_x <= draw.max_x)
- bitmap->fill(RGB_BLACK, draw);
+ bitmap.fill(RGB_BLACK, draw);
}
}
-static void scramble_draw_stars(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int maxx)
+static void scramble_draw_stars(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int maxx)
{
galaxian_state *state = machine.driver_data<galaxian_state>();
/* update the star origin to the current frame */
@@ -1021,17 +1021,17 @@ static void scramble_draw_stars(running_machine &machine, bitmap_t *bitmap, cons
}
-void scramble_draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+void scramble_draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
galaxian_state *state = machine.driver_data<galaxian_state>();
/* blue background - 390 ohm resistor */
- bitmap->fill(state->m_background_enable ? MAKE_RGB(0,0,0x56) : RGB_BLACK, cliprect);
+ bitmap.fill(state->m_background_enable ? MAKE_RGB(0,0,0x56) : RGB_BLACK, cliprect);
scramble_draw_stars(machine, bitmap, cliprect, 256);
}
-void anteater_draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+void anteater_draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
galaxian_state *state = machine.driver_data<galaxian_state>();
/* blue background, horizontal split as seen on flyer and real cabinet */
@@ -1041,18 +1041,18 @@ void anteater_draw_background(running_machine &machine, bitmap_t *bitmap, const
}
-void jumpbug_draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+void jumpbug_draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
galaxian_state *state = machine.driver_data<galaxian_state>();
/* blue background - 390 ohm resistor */
- bitmap->fill(state->m_background_enable ? MAKE_RGB(0,0,0x56) : RGB_BLACK, cliprect);
+ bitmap.fill(state->m_background_enable ? MAKE_RGB(0,0,0x56) : RGB_BLACK, cliprect);
/* render stars same as scramble but nothing in the status area */
scramble_draw_stars(machine, bitmap, cliprect, 240);
}
-void turtles_draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+void turtles_draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
galaxian_state *state = machine.driver_data<galaxian_state>();
/*
@@ -1062,11 +1062,11 @@ void turtles_draw_background(running_machine &machine, bitmap_t *bitmap, const r
GREEN - 470 ohm resistor
BLUE - 390 ohm resistor
*/
- bitmap->fill(MAKE_RGB(state->m_background_red * 0x55, state->m_background_green * 0x47, state->m_background_blue * 0x55), cliprect);
+ bitmap.fill(MAKE_RGB(state->m_background_red * 0x55, state->m_background_green * 0x47, state->m_background_blue * 0x55), cliprect);
}
-void frogger_draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+void frogger_draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
/* color split point verified on real machine */
/* hmmm, according to schematics it is at 128+8; which is right? */
@@ -1093,7 +1093,7 @@ static int flip_and_clip(rectangle &draw, int xstart, int xend, const rectangle
return (draw.min_x <= draw.max_x);
}
-void amidar_draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+void amidar_draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
galaxian_state *state = machine.driver_data<galaxian_state>();
const UINT8 *prom = machine.region("user1")->base();
@@ -1120,7 +1120,7 @@ void amidar_draw_background(running_machine &machine, bitmap_t *bitmap, const re
UINT8 red = ((~prom[x] & 0x02) && state->m_background_red) ? 0x7c : 0x00;
UINT8 green = ((~prom[x] & 0x02) && state->m_background_green) ? 0x3c : 0x00;
UINT8 blue = ((~prom[x] & 0x01) && state->m_background_blue) ? 0x47 : 0x00;
- bitmap->fill(MAKE_RGB(red, green, blue, draw));
+ bitmap.fill(MAKE_RGB(red, green, blue, draw));
}
}
#endif
@@ -1133,27 +1133,27 @@ void amidar_draw_background(running_machine &machine, bitmap_t *bitmap, const re
*
*************************************/
-INLINE void galaxian_draw_pixel(bitmap_t *bitmap, const rectangle &cliprect, int y, int x, rgb_t color)
+INLINE void galaxian_draw_pixel(bitmap_t &bitmap, const rectangle &cliprect, int y, int x, rgb_t color)
{
if (y >= cliprect.min_y && y <= cliprect.max_y)
{
x *= GALAXIAN_XSCALE;
x += GALAXIAN_H0START;
if (x >= cliprect.min_x && x <= cliprect.max_x)
- bitmap->pix32(y, x) = color;
+ bitmap.pix32(y, x) = color;
x++;
if (x >= cliprect.min_x && x <= cliprect.max_x)
- bitmap->pix32(y, x) = color;
+ bitmap.pix32(y, x) = color;
x++;
if (x >= cliprect.min_x && x <= cliprect.max_x)
- bitmap->pix32(y, x) = color;
+ bitmap.pix32(y, x) = color;
}
}
-void galaxian_draw_bullet(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int offs, int x, int y)
+void galaxian_draw_bullet(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int offs, int x, int y)
{
galaxian_state *state = machine.driver_data<galaxian_state>();
/*
@@ -1170,7 +1170,7 @@ void galaxian_draw_bullet(running_machine &machine, bitmap_t *bitmap, const rect
}
-void mshuttle_draw_bullet(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int offs, int x, int y)
+void mshuttle_draw_bullet(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int offs, int x, int y)
{
/* verified by schematics:
* both "W" and "Y" bullets are 4 pixels long
@@ -1199,7 +1199,7 @@ void mshuttle_draw_bullet(running_machine &machine, bitmap_t *bitmap, const rect
}
-void scramble_draw_bullet(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int offs, int x, int y)
+void scramble_draw_bullet(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int offs, int x, int y)
{
/*
Scramble only has "shells", which begin displaying when the counter
@@ -1211,7 +1211,7 @@ void scramble_draw_bullet(running_machine &machine, bitmap_t *bitmap, const rect
}
-void theend_draw_bullet(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int offs, int x, int y)
+void theend_draw_bullet(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int offs, int x, int y)
{
galaxian_state *state = machine.driver_data<galaxian_state>();
/* Same as galaxian except blue/green are swapped */
diff --git a/src/mame/video/galaxold.c b/src/mame/video/galaxold.c
index b78f1149742..70cef362468 100644
--- a/src/mame/video/galaxold.c
+++ b/src/mame/video/galaxold.c
@@ -33,29 +33,29 @@ static TIMER_CALLBACK( stars_blink_callback );
static TIMER_CALLBACK( stars_scroll_callback );
void galaxold_init_stars(running_machine &machine, int colors_offset);
-static void noop_draw_stars(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect);
- void galaxold_draw_stars(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect);
-static void scrambold_draw_stars(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect);
-static void rescue_draw_stars(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect);
-static void mariner_draw_stars(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect);
+static void noop_draw_stars(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect);
+ void galaxold_draw_stars(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect);
+static void scrambold_draw_stars(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect);
+static void rescue_draw_stars(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect);
+static void mariner_draw_stars(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect);
static void start_stars_blink_timer(running_machine &machine, double ra, double rb, double c);
static void start_stars_scroll_timer(running_machine &machine);
/* bullets circuit */
-static void galaxold_draw_bullets(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int offs, int x, int y);
-static void scrambold_draw_bullets(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int offs, int x, int y);
-static void darkplnt_draw_bullets(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int offs, int x, int y);
-static void dambustr_draw_bullets(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int offs, int x, int y);
+static void galaxold_draw_bullets(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int offs, int x, int y);
+static void scrambold_draw_bullets(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int offs, int x, int y);
+static void darkplnt_draw_bullets(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int offs, int x, int y);
+static void dambustr_draw_bullets(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int offs, int x, int y);
/* background circuit */
-static void galaxold_draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect);
-static void scrambold_draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect);
-static void ad2083_draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect);
-static void mariner_draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect);
-static void stratgyx_draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect);
-static void minefld_draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect);
-static void rescue_draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect);
-static void dambustr_draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect);
+static void galaxold_draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect);
+static void scrambold_draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect);
+static void ad2083_draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect);
+static void mariner_draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect);
+static void stratgyx_draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect);
+static void minefld_draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect);
+static void rescue_draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect);
+static void dambustr_draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect);
@@ -613,7 +613,7 @@ VIDEO_START( pisces )
}
#ifdef UNUSED_FUNCTION
-static void theend_draw_bullets(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int offs, int x, int y)
+static void theend_draw_bullets(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int offs, int x, int y)
{
int i;
@@ -624,7 +624,7 @@ static void theend_draw_bullets(running_machine &machine, bitmap_t *bitmap, cons
x--;
if ((x >= cliprect.min_x) && (x <= cliprect.max_x) && (y >= cliprect.min_y) && (y <= cliprect.max_y))
- bitmap->pix16(y, x) = BULLETS_COLOR_BASE;
+ bitmap.pix16(y, x) = BULLETS_COLOR_BASE;
}
}
@@ -675,7 +675,7 @@ VIDEO_START( batman2 )
-static void rockclim_draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void rockclim_draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
galaxold_state *state = machine.driver_data<galaxold_state>();
tilemap_draw(bitmap,cliprect,state->m_rockclim_tilemap, 0,0);
@@ -1134,7 +1134,7 @@ static void drivfrcg_modify_color(UINT8 *color)
/* bullet drawing functions */
-static void galaxold_draw_bullets(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int offs, int x, int y)
+static void galaxold_draw_bullets(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int offs, int x, int y)
{
int i;
@@ -1151,12 +1151,12 @@ static void galaxold_draw_bullets(running_machine &machine, bitmap_t *bitmap, co
/* yellow missile, white shells (this is the terminology on the schematics) */
color = ((offs == 7*4) ? BULLETS_COLOR_BASE : BULLETS_COLOR_BASE + 1);
- bitmap->pix16(y, x) = color;
+ bitmap.pix16(y, x) = color;
}
}
}
-static void scrambold_draw_bullets(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int offs, int x, int y)
+static void scrambold_draw_bullets(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int offs, int x, int y)
{
galaxold_state *state = machine.driver_data<galaxold_state>();
if (state->m_flipscreen_x) x++;
@@ -1165,10 +1165,10 @@ static void scrambold_draw_bullets(running_machine &machine, bitmap_t *bitmap, c
if ((x >= cliprect.min_x) && (x <= cliprect.max_x) && (y >= cliprect.min_y) && (y <= cliprect.max_y))
/* yellow bullets */
- bitmap->pix16(y, x) = BULLETS_COLOR_BASE;
+ bitmap.pix16(y, x) = BULLETS_COLOR_BASE;
}
-static void darkplnt_draw_bullets(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int offs, int x, int y)
+static void darkplnt_draw_bullets(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int offs, int x, int y)
{
galaxold_state *state = machine.driver_data<galaxold_state>();
if (state->m_flipscreen_x) x++;
@@ -1176,10 +1176,10 @@ static void darkplnt_draw_bullets(running_machine &machine, bitmap_t *bitmap, co
x = x - 6;
if ((x >= cliprect.min_x) && (x <= cliprect.max_x) && (y >= cliprect.min_y) && (y <= cliprect.max_y))
- bitmap->pix16(y, x) = 32 + state->m_darkplnt_bullet_color;
+ bitmap.pix16(y, x) = 32 + state->m_darkplnt_bullet_color;
}
-static void dambustr_draw_bullets(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int offs, int x, int y)
+static void dambustr_draw_bullets(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int offs, int x, int y)
{
int i, color;
@@ -1201,7 +1201,7 @@ static void dambustr_draw_bullets(running_machine &machine, bitmap_t *bitmap, co
}
if ((x >= cliprect.min_x) && (x <= cliprect.max_x) && (y >= cliprect.min_y) && (y <= cliprect.max_y))
- bitmap->pix16(y, x) = color;
+ bitmap.pix16(y, x) = color;
}
}
@@ -1209,30 +1209,30 @@ static void dambustr_draw_bullets(running_machine &machine, bitmap_t *bitmap, co
/* background drawing functions */
-static void galaxold_draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void galaxold_draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
/* plain black background */
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
}
-static void scrambold_draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void scrambold_draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
galaxold_state *state = machine.driver_data<galaxold_state>();
if (state->m_background_enable)
- bitmap->fill(BACKGROUND_COLOR_BASE, cliprect);
+ bitmap.fill(BACKGROUND_COLOR_BASE, cliprect);
else
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
}
-static void ad2083_draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void ad2083_draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
galaxold_state *state = machine.driver_data<galaxold_state>();
int color = (state->m_background_blue << 2) | (state->m_background_green << 1) | state->m_background_red;
- bitmap->fill(BACKGROUND_COLOR_BASE + color, cliprect);
+ bitmap.fill(BACKGROUND_COLOR_BASE + color, cliprect);
}
-static void stratgyx_draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void stratgyx_draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
galaxold_state *state = machine.driver_data<galaxold_state>();
UINT8 x;
@@ -1265,11 +1265,11 @@ static void stratgyx_draw_background(running_machine &machine, bitmap_t *bitmap,
else
sx = 8 * x;
- bitmap->plot_box(sx, 0, 8, 256, base + color);
+ bitmap.plot_box(sx, 0, 8, 256, base + color);
}
}
-static void minefld_draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void minefld_draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
galaxold_state *state = machine.driver_data<galaxold_state>();
if (state->m_background_enable)
@@ -1279,18 +1279,18 @@ static void minefld_draw_background(running_machine &machine, bitmap_t *bitmap,
for (x = 0; x < 128; x++)
- bitmap->plot_box(x, 0, 1, 256, base + x);
+ bitmap.plot_box(x, 0, 1, 256, base + x);
for (x = 0; x < 120; x++)
- bitmap->plot_box(x + 128, 0, 1, 256, base + x + 128);
+ bitmap.plot_box(x + 128, 0, 1, 256, base + x + 128);
- bitmap->plot_box(248, 0, 16, 256, base);
+ bitmap.plot_box(248, 0, 16, 256, base);
}
else
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
}
-static void rescue_draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void rescue_draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
galaxold_state *state = machine.driver_data<galaxold_state>();
if (state->m_background_enable)
@@ -1299,18 +1299,18 @@ static void rescue_draw_background(running_machine &machine, bitmap_t *bitmap, c
int x;
for (x = 0; x < 128; x++)
- bitmap->plot_box(x, 0, 1, 256, base + x);
+ bitmap.plot_box(x, 0, 1, 256, base + x);
for (x = 0; x < 120; x++)
- bitmap->plot_box(x + 128, 0, 1, 256, base + x + 8);
+ bitmap.plot_box(x + 128, 0, 1, 256, base + x + 8);
- bitmap->plot_box(248, 0, 16, 256, base);
+ bitmap.plot_box(248, 0, 16, 256, base);
}
else
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
}
-static void mariner_draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void mariner_draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
galaxold_state *state = machine.driver_data<galaxold_state>();
int base = BACKGROUND_COLOR_BASE;
@@ -1335,7 +1335,7 @@ static void mariner_draw_background(running_machine &machine, bitmap_t *bitmap,
else
color = prom[0x20 + x - 1];
- bitmap->plot_box(8 * (31 - x), 0, 8, 256, base + color);
+ bitmap.plot_box(8 * (31 - x), 0, 8, 256, base + color);
}
}
else
@@ -1349,12 +1349,12 @@ static void mariner_draw_background(running_machine &machine, bitmap_t *bitmap,
else
color = prom[x + 1];
- bitmap->plot_box(8 * x, 0, 8, 256, base + color);
+ bitmap.plot_box(8 * x, 0, 8, 256, base + color);
}
}
}
-static void dambustr_draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void dambustr_draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
galaxold_state *state = machine.driver_data<galaxold_state>();
int base = BACKGROUND_COLOR_BASE;
@@ -1363,18 +1363,18 @@ static void dambustr_draw_background(running_machine &machine, bitmap_t *bitmap,
if (flip_screen_x_get(machine))
{
- bitmap->plot_box( 0, 0, 256-state->m_dambustr_bg_split_line, 256, col2);
- bitmap->plot_box(256-state->m_dambustr_bg_split_line, 0, state->m_dambustr_bg_split_line, 256, col1);
+ bitmap.plot_box( 0, 0, 256-state->m_dambustr_bg_split_line, 256, col2);
+ bitmap.plot_box(256-state->m_dambustr_bg_split_line, 0, state->m_dambustr_bg_split_line, 256, col1);
}
else
{
- bitmap->plot_box( 0, 0, 256-state->m_dambustr_bg_split_line, 256, col1);
- bitmap->plot_box(256-state->m_dambustr_bg_split_line, 0, state->m_dambustr_bg_split_line, 256, col2);
+ bitmap.plot_box( 0, 0, 256-state->m_dambustr_bg_split_line, 256, col1);
+ bitmap.plot_box(256-state->m_dambustr_bg_split_line, 0, state->m_dambustr_bg_split_line, 256, col2);
}
}
-static void dambustr_draw_upper_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void dambustr_draw_upper_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
galaxold_state *state = machine.driver_data<galaxold_state>();
rectangle clip;
@@ -1385,7 +1385,7 @@ static void dambustr_draw_upper_background(running_machine &machine, bitmap_t *b
clip.max_x = state->m_dambustr_bg_split_line;
clip.min_y = 0;
clip.max_y = 255;
- copybitmap(bitmap, state->m_dambustr_tmpbitmap, 0, 0, 0, 0, clip);
+ copybitmap(bitmap, *state->m_dambustr_tmpbitmap, 0, 0, 0, 0, clip);
}
else
{
@@ -1393,7 +1393,7 @@ static void dambustr_draw_upper_background(running_machine &machine, bitmap_t *b
clip.max_x = 254 - state->m_dambustr_bg_split_line;
clip.min_y = 0;
clip.max_y = 255;
- copybitmap(bitmap, state->m_dambustr_tmpbitmap, 0, 0, 0, 0, clip);
+ copybitmap(bitmap, *state->m_dambustr_tmpbitmap, 0, 0, 0, 0, clip);
}
}
@@ -1474,7 +1474,7 @@ void galaxold_init_stars(running_machine &machine, int colors_offset)
}
}
-static void plot_star(galaxold_state *state, bitmap_t *bitmap, int x, int y, int color, const rectangle &cliprect)
+static void plot_star(galaxold_state *state, bitmap_t &bitmap, int x, int y, int color, const rectangle &cliprect)
{
if (state->m_flipscreen_x)
x = 255 - x;
@@ -1483,14 +1483,14 @@ static void plot_star(galaxold_state *state, bitmap_t *bitmap, int x, int y, int
y = 255 - y;
if ((x >= cliprect.min_x) && (x <= cliprect.max_x) && (y >= cliprect.min_y) && (y <= cliprect.max_y))
- bitmap->pix16(y, x) = state->m_stars_colors_start + color;
+ bitmap.pix16(y, x) = state->m_stars_colors_start + color;
}
-static void noop_draw_stars(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void noop_draw_stars(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
}
-void galaxold_draw_stars(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+void galaxold_draw_stars(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
galaxold_state *state = machine.driver_data<galaxold_state>();
struct star *stars = state->m_stars;
@@ -1519,7 +1519,7 @@ void galaxold_draw_stars(running_machine &machine, bitmap_t *bitmap, const recta
}
}
-static void scrambold_draw_stars(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void scrambold_draw_stars(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
galaxold_state *state = machine.driver_data<galaxold_state>();
struct star *stars = state->m_stars;
@@ -1565,7 +1565,7 @@ static void scrambold_draw_stars(running_machine &machine, bitmap_t *bitmap, con
}
}
-static void rescue_draw_stars(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void rescue_draw_stars(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
galaxold_state *state = machine.driver_data<galaxold_state>();
struct star *stars = state->m_stars;
@@ -1613,7 +1613,7 @@ static void rescue_draw_stars(running_machine &machine, bitmap_t *bitmap, const
}
}
-static void mariner_draw_stars(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void mariner_draw_stars(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
galaxold_state *state = machine.driver_data<galaxold_state>();
struct star *stars = state->m_stars;
@@ -1712,7 +1712,7 @@ static TILE_GET_INFO( rockclim_get_tile_info )
SET_TILE_INFO(2, code, 0, 0);
}
-static void draw_bullets_common(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_bullets_common(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
galaxold_state *state = machine.driver_data<galaxold_state>();
int offs;
@@ -1732,7 +1732,7 @@ static void draw_bullets_common(running_machine &machine, bitmap_t *bitmap, cons
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, UINT8 *spriteram, size_t spriteram_size)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, UINT8 *spriteram, size_t spriteram_size)
{
const rectangle spritevisiblearea(2*8+1, 32*8-1, 2*8, 30*8-1);
const rectangle spritevisibleareaflipx(0*8, 30*8-2, 2*8, 30*8-1);
@@ -1845,7 +1845,7 @@ SCREEN_UPDATE( dambustr )
}
/* save the background for drawing it again later, if background has priority over characters */
- copybitmap(state->m_dambustr_tmpbitmap, bitmap, 0, 0, 0, 0, state->m_dambustr_tmpbitmap->cliprect());
+ copybitmap(*state->m_dambustr_tmpbitmap, bitmap, 0, 0, 0, 0, state->m_dambustr_tmpbitmap->cliprect());
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
diff --git a/src/mame/video/galivan.c b/src/mame/video/galivan.c
index 852cfe7f802..29340f0d860 100644
--- a/src/mame/video/galivan.c
+++ b/src/mame/video/galivan.c
@@ -306,7 +306,7 @@ WRITE8_HANDLER( galivan_scrolly_w )
***************************************************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
galivan_state *state = machine.driver_data<galivan_state>();
const UINT8 *spritepalettebank = machine.region("user1")->base();
@@ -352,7 +352,7 @@ SCREEN_UPDATE( galivan )
tilemap_set_scrolly(state->m_bg_tilemap, 0, state->m_galivan_scrolly[0] + 256 * (state->m_galivan_scrolly[1] & 0x07));
if (state->m_layers & 0x40)
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
else
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
@@ -381,7 +381,7 @@ SCREEN_UPDATE( ninjemak )
tilemap_set_scrolly(state->m_bg_tilemap, 0, state->m_scrolly);
if (state->m_ninjemak_dispdisable)
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
else
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
diff --git a/src/mame/video/galpani2.c b/src/mame/video/galpani2.c
index e51f71294f2..5ba246b24c7 100644
--- a/src/mame/video/galpani2.c
+++ b/src/mame/video/galpani2.c
@@ -158,14 +158,14 @@ if (screen.machine().input().code_pressed(KEYCODE_Z))
}
#endif
- bitmap->fill(0, cliprect);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
if (layers_ctrl & 0x1)
{
int x = 0;
int y = 0;
- copyscrollbitmap_trans(bitmap, state->m_bg15_bitmap,
+ copyscrollbitmap_trans(bitmap, *state->m_bg15_bitmap,
1, &x, 1, &y,
cliprect,0x4200 + 0);
}
@@ -180,7 +180,7 @@ if (screen.machine().input().code_pressed(KEYCODE_Z))
{
int x = - ( *state->m_bg8_scrollx[0] + 0x200 - 0x0f5 );
int y = - ( *state->m_bg8_scrolly[0] + 0x200 - 0x1be );
- copyscrollbitmap_trans(bitmap, state->m_bg8_bitmap[0],
+ copyscrollbitmap_trans(bitmap, *state->m_bg8_bitmap[0],
1, &x, 1, &y,
cliprect,0x4000 + 0);
}
@@ -189,7 +189,7 @@ if (screen.machine().input().code_pressed(KEYCODE_Z))
{
int x = - ( *state->m_bg8_scrollx[1] + 0x200 - 0x0f5 );
int y = - ( *state->m_bg8_scrolly[1] + 0x200 - 0x1be );
- copyscrollbitmap_trans(bitmap, state->m_bg8_bitmap[1],
+ copyscrollbitmap_trans(bitmap, *state->m_bg8_bitmap[1],
1, &x, 1, &y,
cliprect,0x4000 + 0);
}
diff --git a/src/mame/video/galpanic.c b/src/mame/video/galpanic.c
index facbba11dda..06f923e96f9 100644
--- a/src/mame/video/galpanic.c
+++ b/src/mame/video/galpanic.c
@@ -45,7 +45,7 @@ WRITE16_HANDLER( galpanic_paletteram_w )
}
-static void comad_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void comad_draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
galpanic_state *state = machine.driver_data<galpanic_state>();
UINT16 *spriteram16 = state->m_spriteram;
@@ -83,7 +83,7 @@ static void comad_draw_sprites(running_machine &machine, bitmap_t *bitmap, const
}
}
-static void draw_fgbitmap(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_fgbitmap(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
galpanic_state *state = machine.driver_data<galpanic_state>();
int offs;
@@ -96,7 +96,7 @@ static void draw_fgbitmap(running_machine &machine, bitmap_t *bitmap, const rect
sy = offs / 256;
color = state->m_fgvideoram[offs];
if (color)
- bitmap->pix16(sy, sx) = color;
+ bitmap.pix16(sy, sx) = color;
}
}
@@ -105,7 +105,7 @@ SCREEN_UPDATE( galpanic )
device_t *pandora = screen.machine().device("pandora");
/* copy the temporary bitmap to the screen */
- copybitmap(bitmap,screen.machine().generic.tmpbitmap,0,0,0,0,cliprect);
+ copybitmap(bitmap,*screen.machine().generic.tmpbitmap,0,0,0,0,cliprect);
draw_fgbitmap(screen.machine(), bitmap, cliprect);
@@ -118,7 +118,7 @@ SCREEN_UPDATE( comad )
{
galpanic_state *state = screen.machine().driver_data<galpanic_state>();
/* copy the temporary bitmap to the screen */
- copybitmap(bitmap,screen.machine().generic.tmpbitmap,0,0,0,0,cliprect);
+ copybitmap(bitmap,*screen.machine().generic.tmpbitmap,0,0,0,0,cliprect);
draw_fgbitmap(screen.machine(), bitmap, cliprect);
diff --git a/src/mame/video/galspnbl.c b/src/mame/video/galspnbl.c
index aaa6f6a7c04..7e47b22a9c4 100644
--- a/src/mame/video/galspnbl.c
+++ b/src/mame/video/galspnbl.c
@@ -29,7 +29,7 @@ PALETTE_INIT( galspnbl )
* 4 | xxxxxxxxxxxxxxxx | x position
* 5,6,7| | unused
*/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int priority )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int priority )
{
galspnbl_state *state = machine.driver_data<galspnbl_state>();
UINT16 *spriteram = state->m_spriteram;
@@ -84,7 +84,7 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
}
-static void draw_background( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_background( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
galspnbl_state *state = machine.driver_data<galspnbl_state>();
offs_t offs;
@@ -96,7 +96,7 @@ static void draw_background( running_machine &machine, bitmap_t *bitmap, const r
int y = offs >> 9;
int x = offs & 0x1ff;
- bitmap->pix16(y, x) = 1024 + (state->m_bgvideoram[offs] >> 1);
+ bitmap.pix16(y, x) = 1024 + (state->m_bgvideoram[offs] >> 1);
}
}
diff --git a/src/mame/video/gameplan.c b/src/mame/video/gameplan.c
index ceb80e6a8d3..398202e7cf9 100644
--- a/src/mame/video/gameplan.c
+++ b/src/mame/video/gameplan.c
@@ -82,7 +82,7 @@ static SCREEN_UPDATE( gameplan )
UINT8 y = offs >> 8;
UINT8 x = offs & 0xff;
- bitmap->pix32(y, x) = pens[state->m_videoram[offs] & 0x07];
+ bitmap.pix32(y, x) = pens[state->m_videoram[offs] & 0x07];
}
return 0;
@@ -102,7 +102,7 @@ static SCREEN_UPDATE( leprechn )
UINT8 y = offs >> 8;
UINT8 x = offs & 0xff;
- bitmap->pix32(y, x) = pens[state->m_videoram[offs]];
+ bitmap.pix32(y, x) = pens[state->m_videoram[offs]];
}
return 0;
diff --git a/src/mame/video/gaplus.c b/src/mame/video/gaplus.c
index 7e3440d7395..2beed2f46c7 100644
--- a/src/mame/video/gaplus.c
+++ b/src/mame/video/gaplus.c
@@ -225,7 +225,7 @@ WRITE8_HANDLER( gaplus_starfield_control_w )
***************************************************************************/
-static void starfield_render(running_machine &machine, bitmap_t *bitmap)
+static void starfield_render(running_machine &machine, bitmap_t &bitmap)
{
gaplus_state *state = machine.driver_data<gaplus_state>();
struct star *stars = state->m_stars;
@@ -248,12 +248,12 @@ static void starfield_render(running_machine &machine, bitmap_t *bitmap)
if ( x >=0 && x < width && y >= 0 && y < height )
{
- bitmap->pix16(y, x) = stars[i].col;
+ bitmap.pix16(y, x) = stars[i].col;
}
}
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
gaplus_state *state = machine.driver_data<gaplus_state>();
UINT8 *spriteram = state->m_spriteram + 0x780;
@@ -313,7 +313,7 @@ SCREEN_UPDATE( gaplus )
/* flip screen control is embedded in RAM */
flip_screen_set(screen.machine(), state->m_spriteram[0x1f7f-0x800] & 1);
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
starfield_render(screen.machine(), bitmap);
diff --git a/src/mame/video/gauntlet.c b/src/mame/video/gauntlet.c
index e5f9420ebfc..e2182e7a836 100644
--- a/src/mame/video/gauntlet.c
+++ b/src/mame/video/gauntlet.c
@@ -192,7 +192,7 @@ SCREEN_UPDATE( gauntlet )
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
UINT16 *mo = &mobitmap->pix16(y);
- UINT16 *pf = &bitmap->pix16(y);
+ UINT16 *pf = &bitmap.pix16(y);
for (x = rectlist.rect->min_x; x <= rectlist.rect->max_x; x++)
if (mo[x])
{
diff --git a/src/mame/video/gberet.c b/src/mame/video/gberet.c
index b7518d5f62d..63cfaeba864 100644
--- a/src/mame/video/gberet.c
+++ b/src/mame/video/gberet.c
@@ -131,7 +131,7 @@ VIDEO_START( gberet )
tilemap_set_scroll_rows(state->m_bg_tilemap, 32);
}
-static void gberet_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void gberet_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
gberet_state *state = machine.driver_data<gberet_state>();
int offs;
@@ -192,7 +192,7 @@ WRITE8_HANDLER( gberetb_scroll_w )
tilemap_set_scrollx(state->m_bg_tilemap, offset, scroll + 64 - 8);
}
-static void gberetb_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void gberetb_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
gberet_state *state = machine.driver_data<gberet_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/gcpinbal.c b/src/mame/video/gcpinbal.c
index b464060aee2..a151c68adcf 100644
--- a/src/mame/video/gcpinbal.c
+++ b/src/mame/video/gcpinbal.c
@@ -169,7 +169,7 @@ WRITE16_HANDLER( gcpinbal_ctrl_word_w )
****************************************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int y_offs )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int y_offs )
{
gcpinbal_state *state = machine.driver_data<gcpinbal_state>();
UINT16 *spriteram = state->m_spriteram;
@@ -292,8 +292,8 @@ SCREEN_UPDATE( gcpinbal )
tilemap_set_scrolly(state->m_tilemap[i], 0, state->m_scrolly[i]);
}
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(0, cliprect);
layer[0] = 0;
layer[1] = 1;
diff --git a/src/mame/video/genesis.c b/src/mame/video/genesis.c
index 9bf93fdaab8..e89d6b4c6cb 100644
--- a/src/mame/video/genesis.c
+++ b/src/mame/video/genesis.c
@@ -221,13 +221,13 @@ void system18_vdp_start(running_machine &machine)
******************************************************************************/
-void system18_vdp_update( bitmap_t *bitmap, const rectangle &cliprect )
+void system18_vdp_update( bitmap_t &bitmap, const rectangle &cliprect )
{
int y;
/* generate the final screen */
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
- drawline(&bitmap->pix16(y), y, 0xffff);
+ drawline(&bitmap.pix16(y), y, 0xffff);
}
/******************************************************************************
diff --git a/src/mame/video/gijoe.c b/src/mame/video/gijoe.c
index 685082fa2c5..4690ef10e2f 100644
--- a/src/mame/video/gijoe.c
+++ b/src/mame/video/gijoe.c
@@ -158,8 +158,8 @@ SCREEN_UPDATE( gijoe )
konami_sortlayers4(layer, state->m_layer_pri);
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
k056832_tilemap_draw(state->m_k056832, bitmap, cliprect, layer[0], 0, 1);
k056832_tilemap_draw(state->m_k056832, bitmap, cliprect, layer[1], 0, 2);
diff --git a/src/mame/video/ginganin.c b/src/mame/video/ginganin.c
index ef83c2e4452..94586bc31f6 100644
--- a/src/mame/video/ginganin.c
+++ b/src/mame/video/ginganin.c
@@ -209,7 +209,7 @@ Offset: Values: Format:
------------------------------------------------------------------------ */
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect )
{
ginganin_state *state = machine.driver_data<ginganin_state>();
UINT16 *spriteram = state->m_spriteram;
@@ -281,7 +281,7 @@ if (screen.machine().input().code_pressed(KEYCODE_Z))
if (layers_ctrl1 & 1)
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
else
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
if (layers_ctrl1 & 2)
tilemap_draw(bitmap, cliprect, state->m_fg_tilemap, 0, 0);
diff --git a/src/mame/video/gladiatr.c b/src/mame/video/gladiatr.c
index 6195b0f6c7b..4a81f681881 100644
--- a/src/mame/video/gladiatr.c
+++ b/src/mame/video/gladiatr.c
@@ -200,7 +200,7 @@ WRITE8_HANDLER( gladiatr_video_registers_w )
***************************************************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
gladiatr_state *state = machine.driver_data<gladiatr_state>();
int offs;
@@ -259,22 +259,21 @@ SCREEN_UPDATE( ppking )
/* the fg layer just selects the upper palette bank on underlying pixels */
{
- bitmap_t *flagsbitmap;
int sx = cliprect.min_x;
int sy = cliprect.min_y;
tilemap_get_pixmap( state->m_fg_tilemap );
- flagsbitmap = tilemap_get_flagsmap( state->m_fg_tilemap );
+ bitmap_t &flagsbitmap = tilemap_get_flagsmap( state->m_fg_tilemap );
while( sy <= cliprect.max_y )
{
int x = sx;
int y = (sy + state->m_fg_scrolly) & 0x1ff;
- UINT16 *dest = &bitmap->pix16(sy, sx);
+ UINT16 *dest = &bitmap.pix16(sy, sx);
while( x <= cliprect.max_x )
{
- if( flagsbitmap->pix8(y, x)&TILEMAP_PIXEL_LAYER0 )
+ if( flagsbitmap.pix8(y, x)&TILEMAP_PIXEL_LAYER0 )
{
*dest += 512;
}
@@ -308,6 +307,6 @@ SCREEN_UPDATE( gladiatr )
tilemap_draw(bitmap,cliprect,state->m_fg_tilemap,0,0);
}
else
- bitmap->fill(get_black_pen(screen.machine()), cliprect );
+ bitmap.fill(get_black_pen(screen.machine()), cliprect );
return 0;
}
diff --git a/src/mame/video/glass.c b/src/mame/video/glass.c
index d27df06d42b..d3587a45f12 100644
--- a/src/mame/video/glass.c
+++ b/src/mame/video/glass.c
@@ -164,7 +164,7 @@ VIDEO_START( glass )
3 | xxxxxxxx xxxxxxxx | sprite code
*/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
glass_state *state = machine.driver_data<glass_state>();
int i;
@@ -205,8 +205,8 @@ SCREEN_UPDATE( glass )
tilemap_set_scrollx(state->m_pant[1], 0, state->m_vregs[3]);
/* draw layers + sprites */
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
- copybitmap(bitmap, state->m_screen_bitmap, 0, 0, 0x18, 0x24, cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
+ copybitmap(bitmap, *state->m_screen_bitmap, 0, 0, 0x18, 0x24, cliprect);
tilemap_draw(bitmap, cliprect, state->m_pant[1], 0, 0);
tilemap_draw(bitmap, cliprect, state->m_pant[0], 0, 0);
draw_sprites(screen.machine(), bitmap, cliprect);
diff --git a/src/mame/video/gng.c b/src/mame/video/gng.c
index 15463aedfa8..6c3e9f6c036 100644
--- a/src/mame/video/gng.c
+++ b/src/mame/video/gng.c
@@ -108,7 +108,7 @@ WRITE8_HANDLER( gng_flipscreen_w )
***************************************************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
UINT8 *buffered_spriteram = machine.generic.buffered_spriteram.u8;
const gfx_element *gfx = machine.gfx[2];
diff --git a/src/mame/video/goal92.c b/src/mame/video/goal92.c
index 61bec2f4cb4..00edeeb0864 100644
--- a/src/mame/video/goal92.c
+++ b/src/mame/video/goal92.c
@@ -92,7 +92,7 @@ static TILE_GET_INFO( get_fore_tile_info )
SET_TILE_INFO(region, tile, color, 0);
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int pri )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int pri )
{
goal92_state *state = machine.driver_data<goal92_state>();
UINT16 *buffered_spriteram16 = state->m_buffered_spriteram;
@@ -169,7 +169,7 @@ SCREEN_UPDATE( goal92 )
tilemap_set_scrolly(state->m_fg_layer, 0, state->m_scrollram[3] + 8);
}
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
tilemap_draw(bitmap, cliprect, state->m_bg_layer, 0, 0);
draw_sprites(screen.machine(), bitmap, cliprect, 2);
diff --git a/src/mame/video/goindol.c b/src/mame/video/goindol.c
index 3d89a9fdc46..a8ea7daf587 100644
--- a/src/mame/video/goindol.c
+++ b/src/mame/video/goindol.c
@@ -85,7 +85,7 @@ WRITE8_HANDLER( goindol_bg_videoram_w )
***************************************************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int gfxbank, UINT8 *sprite_ram )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int gfxbank, UINT8 *sprite_ram )
{
goindol_state *state = machine.driver_data<goindol_state>();
int offs, sx, sy, tile, palette;
diff --git a/src/mame/video/goldstar.c b/src/mame/video/goldstar.c
index fcf8986c1fe..dcf937baca4 100644
--- a/src/mame/video/goldstar.c
+++ b/src/mame/video/goldstar.c
@@ -393,7 +393,7 @@ SCREEN_UPDATE( goldstar )
goldstar_state *state = screen.machine().driver_data<goldstar_state>();
int i;
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
if (!state->m_cm_enable_reg &0x01)
return 0;
@@ -444,7 +444,7 @@ SCREEN_UPDATE( bingowng )
goldstar_state *state = screen.machine().driver_data<goldstar_state>();
int i;
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
if (!state->m_cm_enable_reg &0x01)
return 0;
@@ -487,7 +487,7 @@ SCREEN_UPDATE( magical )
goldstar_state *state = screen.machine().driver_data<goldstar_state>();
int i;
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
if (!state->m_cm_enable_reg &0x01)
return 0;
@@ -546,7 +546,7 @@ SCREEN_UPDATE( unkch )
goldstar_state *state = screen.machine().driver_data<goldstar_state>();
int i;
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
if (!state->m_cm_enable_reg &0x01)
return 0;
@@ -600,7 +600,7 @@ SCREEN_UPDATE( cmast91 )
goldstar_state *state = screen.machine().driver_data<goldstar_state>();
int i;
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
if (!state->m_cm_enable_reg &0x01)
return 0;
@@ -636,7 +636,7 @@ SCREEN_UPDATE( amcoe1a )
goldstar_state *state = screen.machine().driver_data<goldstar_state>();
int i;
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
if (!state->m_cm_enable_reg &0x01)
return 0;
diff --git a/src/mame/video/gomoku.c b/src/mame/video/gomoku.c
index 7e6cf832f35..0b457f5c05a 100644
--- a/src/mame/video/gomoku.c
+++ b/src/mame/video/gomoku.c
@@ -166,7 +166,7 @@ SCREEN_UPDATE( gomoku )
if (state->m_bg_dispsw)
{
/* copy bg bitmap */
- copybitmap(bitmap, state->m_bg_bitmap, 0, 0, 0, 0, cliprect);
+ copybitmap(bitmap, *state->m_bg_bitmap, 0, 0, 0, 0, cliprect);
// stone
for (y = 0; y < 256; y++)
@@ -192,7 +192,7 @@ SCREEN_UPDATE( gomoku )
}
else continue;
- bitmap->pix16((255 - y - 1) & 0xff, (255 - x + 7) & 0xff) = color;
+ bitmap.pix16((255 - y - 1) & 0xff, (255 - x + 7) & 0xff) = color;
}
}
@@ -220,13 +220,13 @@ SCREEN_UPDATE( gomoku )
}
else continue;
- bitmap->pix16((255 - y - 1) & 0xff, (255 - x + 7) & 0xff) = color;
+ bitmap.pix16((255 - y - 1) & 0xff, (255 - x + 7) & 0xff) = color;
}
}
}
else
{
- bitmap->fill(0x20);
+ bitmap.fill(0x20);
}
tilemap_draw(bitmap, cliprect, state->m_fg_tilemap, 0, 0);
diff --git a/src/mame/video/gotcha.c b/src/mame/video/gotcha.c
index 07636bcfb46..1e49c9cd8bf 100644
--- a/src/mame/video/gotcha.c
+++ b/src/mame/video/gotcha.c
@@ -105,7 +105,7 @@ WRITE16_HANDLER( gotcha_scroll_w )
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
gotcha_state *state = machine.driver_data<gotcha_state>();
UINT16 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/gottlieb.c b/src/mame/video/gottlieb.c
index 8f7eb924427..3d70fe1af57 100644
--- a/src/mame/video/gottlieb.c
+++ b/src/mame/video/gottlieb.c
@@ -213,7 +213,7 @@ VIDEO_START( screwloo )
*
*************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
gottlieb_state *state = machine.driver_data<gottlieb_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -258,7 +258,7 @@ SCREEN_UPDATE( gottlieb )
if (!state->m_background_priority)
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, TILEMAP_DRAW_OPAQUE, 0);
else
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
/* draw the sprites */
draw_sprites(screen.machine(), bitmap, cliprect);
diff --git a/src/mame/video/gotya.c b/src/mame/video/gotya.c
index 76b79fd594c..d9b98aeb3d3 100644
--- a/src/mame/video/gotya.c
+++ b/src/mame/video/gotya.c
@@ -115,7 +115,7 @@ VIDEO_START( gotya )
state->m_bg_tilemap = tilemap_create(machine, get_bg_tile_info, tilemap_scan_rows_thehand, 8, 8, 64, 32);
}
-static void draw_status_row( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int sx, int col )
+static void draw_status_row( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int sx, int col )
{
gotya_state *state = machine.driver_data<gotya_state>();
int row;
@@ -143,7 +143,7 @@ static void draw_status_row( running_machine &machine, bitmap_t *bitmap, const r
}
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
gotya_state *state = machine.driver_data<gotya_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -167,7 +167,7 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
}
}
-static void draw_status( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_status( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
draw_status_row(machine, bitmap, cliprect, 0, 1);
draw_status_row(machine, bitmap, cliprect, 1, 0);
diff --git a/src/mame/video/gp9001.c b/src/mame/video/gp9001.c
index 987eb9e5390..1c3d2028cd1 100644
--- a/src/mame/video/gp9001.c
+++ b/src/mame/video/gp9001.c
@@ -758,7 +758,7 @@ WRITE16_DEVICE_HANDLER( pipibibi_bootleg_spriteram16_w )
Sprite Handlers
***************************************************************************/
-void gp9001vdp_device::draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, const UINT8* primap )
+void gp9001vdp_device::draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, const UINT8* primap )
{
const gfx_element *gfx = machine.gfx[tile_region+1];
@@ -917,7 +917,7 @@ void gp9001vdp_device::draw_sprites( running_machine &machine, bitmap_t *bitmap,
if (drawxx>=cliprect.min_x && drawxx<=cliprect.max_x && drawyy>=cliprect.min_y && drawyy<=cliprect.max_y)
{
UINT8 pix = srcdata[count];
- UINT16* dstptr = &bitmap->pix16(drawyy, drawxx);
+ UINT16* dstptr = &bitmap.pix16(drawyy, drawxx);
UINT8* dstpri = &this->custom_priority_bitmap->pix8(drawyy, drawxx);
if (priority >= dstpri[0])
@@ -951,12 +951,12 @@ void gp9001vdp_device::draw_sprites( running_machine &machine, bitmap_t *bitmap,
Draw the game screen in the given bitmap_t.
***************************************************************************/
-void gp9001vdp_device::gp9001_draw_custom_tilemap(running_machine& machine, bitmap_t* bitmap, tilemap_t* tilemap, const UINT8* priremap, const UINT8* pri_enable )
+void gp9001vdp_device::gp9001_draw_custom_tilemap(running_machine& machine, bitmap_t &bitmap, tilemap_t* tilemap, const UINT8* priremap, const UINT8* pri_enable )
{
int width = machine.primary_screen->width();
int height = machine.primary_screen->height();
int y,x;
- bitmap_t *tmb = tilemap_get_pixmap(tilemap);
+ bitmap_t &tmb = tilemap_get_pixmap(tilemap);
UINT16* srcptr;
UINT16* dstptr;
UINT8* dstpriptr;
@@ -968,8 +968,8 @@ void gp9001vdp_device::gp9001_draw_custom_tilemap(running_machine& machine, bitm
{
int realy = (y+scrolly)&0x1ff;
- srcptr = &tmb->pix16(realy);
- dstptr = &bitmap->pix16(y);
+ srcptr = &tmb.pix16(realy);
+ dstptr = &bitmap.pix16(y);
dstpriptr = &this->custom_priority_bitmap->pix8(y);
for (x=0;x<width;x++)
@@ -1004,7 +1004,7 @@ static const UINT8 gp9001_sprprimap1[16] = { 0x00, 0x04, 0x08, 0x0c, 0x10, 0x14
static const UINT8 batsugun_prienable0[16]={ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
-void gp9001vdp_device::gp9001_render_vdp(running_machine& machine, bitmap_t* bitmap, const rectangle &cliprect)
+void gp9001vdp_device::gp9001_render_vdp(running_machine& machine, bitmap_t &bitmap, const rectangle &cliprect)
{
if (gp9001_gfxrom_is_banked && gp9001_gfxrom_bank_dirty)
{
diff --git a/src/mame/video/gp9001.h b/src/mame/video/gp9001.h
index 9435a245149..13218e48f3a 100644
--- a/src/mame/video/gp9001.h
+++ b/src/mame/video/gp9001.h
@@ -54,9 +54,9 @@ public:
UINT16 gp9001_gfxrom_bank[8]; /* Batrider object bank */
- void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, const UINT8* primap );
- void gp9001_draw_custom_tilemap(running_machine& machine, bitmap_t* bitmap, tilemap_t* tilemap, const UINT8* priremap, const UINT8* pri_enable );
- void gp9001_render_vdp(running_machine& machine, bitmap_t* bitmap, const rectangle &cliprect);
+ void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, const UINT8* primap );
+ void gp9001_draw_custom_tilemap(running_machine& machine, bitmap_t &bitmap, tilemap_t* tilemap, const UINT8* priremap, const UINT8* pri_enable );
+ void gp9001_render_vdp(running_machine& machine, bitmap_t &bitmap, const rectangle &cliprect);
void gp9001_screen_eof(void);
void create_tilemaps(int region);
void init_scroll_regs(void);
diff --git a/src/mame/video/gradius3.c b/src/mame/video/gradius3.c
index fcb30808032..617fb139906 100644
--- a/src/mame/video/gradius3.c
+++ b/src/mame/video/gradius3.c
@@ -133,7 +133,7 @@ SCREEN_UPDATE( gradius3 )
k052109_tilemap_update(state->m_k052109);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
if (state->m_priority == 0)
{
k052109_tilemap_draw(state->m_k052109, bitmap, cliprect, 1, TILEMAP_DRAW_OPAQUE, 2);
diff --git a/src/mame/video/grchamp.c b/src/mame/video/grchamp.c
index e025d841e1d..9a32d6ca2e6 100644
--- a/src/mame/video/grchamp.c
+++ b/src/mame/video/grchamp.c
@@ -117,7 +117,7 @@ VIDEO_START( grchamp )
}
#if 0
-static int collision_check(running_machine &machine, grchamp_state *state, bitmap_t *bitmap, int which )
+static int collision_check(running_machine &machine, grchamp_state *state, bitmap_t &bitmap, int which )
{
int bgcolor = machine.pens[0];
int sprite_transp = machine.pens[0x24];
@@ -152,13 +152,13 @@ static int collision_check(running_machine &machine, grchamp_state *state, bitma
(sy >= visarea->min_y) && (sy <= visarea->max_y) )
{
// Collision check uses only 16 pens!
- pixel = bitmap->pix16(sy, sx) % 16;
+ pixel = bitmap.pix16(sy, sx) % 16;
if( pixel != bgcolor )
{
result = 1; /* flag collision */
/* wipe this pixel, so collision checks with the
** next layer work */
- bitmap->pix16(sy, sx) = bgcolor;
+ bitmap.pix16(sy, sx) = bgcolor;
}
}
}
@@ -168,7 +168,7 @@ static int collision_check(running_machine &machine, grchamp_state *state, bitma
return result?(1<<which):0;
}
-static void draw_fog(grchamp_state *state, bitmap_t *bitmap, const rectangle &cliprect, int fog)
+static void draw_fog(grchamp_state *state, bitmap_t &bitmap, const rectangle &cliprect, int fog)
{
int x,y,offs;
@@ -180,12 +180,12 @@ static void draw_fog(grchamp_state *state, bitmap_t *bitmap, const rectangle &cl
offs = 0x40*(x-(100-FOG_SIZE-1));
for(y=16;y<240;y++)
{
- bitmap->pix16(y, x) = bitmap->pix16(y, x) + offs;
+ bitmap.pix16(y, x) = bitmap.pix16(y, x) + offs;
}
}
}
-static void draw_sprites(running_machine &machine, grchamp_state *state, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, grchamp_state *state, bitmap_t &bitmap, const rectangle &cliprect)
{
const gfx_element *gfx = machine.gfx[5];
int bank = (state->m_cpu0_out[0] & 0x20) ? 0x40 : 0x00;
@@ -370,9 +370,9 @@ SCREEN_UPDATE( grchamp )
const UINT8 *amedata = screen.machine().region("gfx5")->base();
const UINT8 *headdata = screen.machine().region("gfx6")->base();
const UINT8 *pldata = screen.machine().region("gfx7")->base();
- bitmap_t *lpixmap = tilemap_get_pixmap(state->m_left_tilemap);
- bitmap_t *rpixmap = tilemap_get_pixmap(state->m_right_tilemap);
- bitmap_t *cpixmap = tilemap_get_pixmap(state->m_center_tilemap);
+ bitmap_t &lpixmap = tilemap_get_pixmap(state->m_left_tilemap);
+ bitmap_t &rpixmap = tilemap_get_pixmap(state->m_right_tilemap);
+ bitmap_t &cpixmap = tilemap_get_pixmap(state->m_center_tilemap);
int lrxscroll, cxscroll, lyscroll, ryscroll, cyscroll;
int bgcolor = state->m_cpu1_out[3] & 0x10;
int amebase = state->m_cpu0_out[4] >> 4;
@@ -381,8 +381,8 @@ SCREEN_UPDATE( grchamp )
int x, y;
/* ensure that the tilemaps are the same size */
- assert(lpixmap->width() == rpixmap->width() && lpixmap->width() == cpixmap->width());
- assert(lpixmap->height() == rpixmap->height() && lpixmap->height() == cpixmap->height());
+ assert(lpixmap.width() == rpixmap.width() && lpixmap.width() == cpixmap.width());
+ assert(lpixmap.height() == rpixmap.height() && lpixmap.height() == cpixmap.height());
/* extract background scroll values; left and right share the same X scroll */
lrxscroll = state->m_cpu1_out[0] + (state->m_cpu1_out[1] & 1) * 256;
@@ -398,14 +398,14 @@ SCREEN_UPDATE( grchamp )
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
/* select either left or right tilemaps based on Y */
- bitmap_t *lrpixmap = (y < 128) ? lpixmap : rpixmap;
+ bitmap_t &lrpixmap = (y < 128) ? lpixmap : rpixmap;
int lryscroll = (y < 128) ? lyscroll : ryscroll;
/* get source/dest pointers */
/* the Y counter starts counting when VBLANK goes to 0, which is at Y=16 */
- UINT16 *lrsrc = &lrpixmap->pix16((lryscroll + y - 16) & 0xff);
- UINT16 *csrc = &cpixmap->pix16((cyscroll + y - 16) & 0xff);
- UINT32 *dest = &bitmap->pix32(y);
+ UINT16 *lrsrc = &lrpixmap.pix16((lryscroll + y - 16) & 0xff);
+ UINT16 *csrc = &cpixmap.pix16((cyscroll + y - 16) & 0xff);
+ UINT32 *dest = &bitmap.pix32(y);
UINT8 objdata[256];
/* draw the objects for this scanline */
diff --git a/src/mame/video/gridlee.c b/src/mame/video/gridlee.c
index 8745f7cee4e..308f39dacc1 100644
--- a/src/mame/video/gridlee.c
+++ b/src/mame/video/gridlee.c
@@ -197,12 +197,12 @@ SCREEN_UPDATE( gridlee )
/* left pixel */
if (left && currx >= 0 && currx < 256)
- bitmap->pix16(ypos, currx ^ currxor) = pens[left];
+ bitmap.pix16(ypos, currx ^ currxor) = pens[left];
currx++;
/* right pixel */
if (right && currx >= 0 && currx < 256)
- bitmap->pix16(ypos, currx ^ currxor) = pens[right];
+ bitmap.pix16(ypos, currx ^ currxor) = pens[right];
currx++;
}
}
diff --git a/src/mame/video/groundfx.c b/src/mame/video/groundfx.c
index 2e0bfde9780..2e8cf2bd53e 100644
--- a/src/mame/video/groundfx.c
+++ b/src/mame/video/groundfx.c
@@ -63,7 +63,7 @@ Heavy use is made of sprite zooming.
***************************************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect,int do_hack,int x_offs,int y_offs)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect,int do_hack,int x_offs,int y_offs)
{
groundfx_state *state = machine.driver_data<groundfx_state>();
UINT32 *spriteram32 = state->m_spriteram;
@@ -223,8 +223,8 @@ SCREEN_UPDATE( groundfx )
pivlayer[1] = pivlayer[0]^1;
pivlayer[2] = 2;
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(0, cliprect); /* wrong color? */
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(0, cliprect); /* wrong color? */
tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, pivlayer[0], TILEMAP_DRAW_OPAQUE, 0);
tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, pivlayer[1], 0, 0);
diff --git a/src/mame/video/gstriker.c b/src/mame/video/gstriker.c
index 79db53c6980..e31a9155ed0 100644
--- a/src/mame/video/gstriker.c
+++ b/src/mame/video/gstriker.c
@@ -84,7 +84,7 @@ static void VS920A_set_gfx_region(gstriker_state *state, int numchip, int gfx_re
state->m_VS920A[numchip].gfx_region = gfx_region;
}
-static void VS920A_draw(gstriker_state *state, int numchip, bitmap_t* screen, const rectangle &cliprect, int priority)
+static void VS920A_draw(gstriker_state *state, int numchip, bitmap_t& screen, const rectangle &cliprect, int priority)
{
state->m_VS920A_cur_chip = &state->m_VS920A[numchip];
@@ -238,7 +238,7 @@ static void MB60553_set_gfx_region(gstriker_state *state, int numchip, int gfx_r
}
/* THIS IS STILL WRONG! */
-static void MB60553_draw(running_machine &machine, int numchip, bitmap_t* screen, const rectangle &cliprect, int priority)
+static void MB60553_draw(running_machine &machine, int numchip, bitmap_t& screen, const rectangle &cliprect, int priority)
{
gstriker_state *state = machine.driver_data<gstriker_state>();
int line;
@@ -383,7 +383,7 @@ Abstracts the VS9210
*/
-static void CG10103_draw_sprite(running_machine &machine, bitmap_t* screen, const rectangle &cliprect, UINT16* spr, int drawpri)
+static void CG10103_draw_sprite(running_machine &machine, bitmap_t& screen, const rectangle &cliprect, UINT16* spr, int drawpri)
{
gstriker_state *state = machine.driver_data<gstriker_state>();
int ypos = spr[0] & 0x1FF;
@@ -460,7 +460,7 @@ static void CG10103_draw_sprite(running_machine &machine, bitmap_t* screen, cons
}
-static void CG10103_draw(running_machine &machine, int numchip, bitmap_t* screen, const rectangle &cliprect, int priority)
+static void CG10103_draw(running_machine &machine, int numchip, bitmap_t& screen, const rectangle &cliprect, int priority)
{
gstriker_state *state = machine.driver_data<gstriker_state>();
UINT16* splist;
@@ -536,7 +536,7 @@ WRITE16_HANDLER( gsx_videoram3_w )
SCREEN_UPDATE(gstriker)
{
gstriker_state *state = screen.machine().driver_data<gstriker_state>();
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
// Sandwitched screen/sprite0/score/sprite1. Surely wrong, probably
// needs sprite orthogonality
diff --git a/src/mame/video/gsword.c b/src/mame/video/gsword.c
index 030b88a8d28..3763fa3be52 100644
--- a/src/mame/video/gsword.c
+++ b/src/mame/video/gsword.c
@@ -161,7 +161,7 @@ VIDEO_START( gsword )
8, 8, 32, 64);
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
gsword_state *state = machine.driver_data<gsword_state>();
int offs;
diff --git a/src/mame/video/gticlub.c b/src/mame/video/gticlub.c
index 96e847f40e4..538663d532d 100644
--- a/src/mame/video/gticlub.c
+++ b/src/mame/video/gticlub.c
@@ -934,7 +934,7 @@ static void render_polygons(running_machine &machine)
}
}
-void K001005_draw(bitmap_t *bitmap, const rectangle &cliprect)
+void K001005_draw(bitmap_t &bitmap, const rectangle &cliprect)
{
int i, j;
@@ -942,7 +942,7 @@ void K001005_draw(bitmap_t *bitmap, const rectangle &cliprect)
for (j=cliprect.min_y; j <= cliprect.max_y; j++)
{
- UINT32 *bmp = &bitmap->pix32(j);
+ UINT32 *bmp = &bitmap.pix32(j);
UINT32 *src = &K001005_bitmap[K001005_bitmap_page^1]->pix32(j);
for (i=cliprect.min_x; i <= cliprect.max_x; i++)
@@ -1032,7 +1032,7 @@ SCREEN_UPDATE( gticlub )
for (x=0; x < 512; x++)
{
UINT8 pixel = rom[index + (y*512) + x];
- bitmap->pix32(y, x) = K001006_palette[tp][(pal * 256) + pixel];
+ bitmap.pix32(y, x) = K001006_palette[tp][(pal * 256) + pixel];
}
}
@@ -1051,7 +1051,7 @@ SCREEN_UPDATE( gticlub )
SCREEN_UPDATE( hangplt )
{
- bitmap->fill(screen.machine().pens[0], cliprect);
+ bitmap.fill(screen.machine().pens[0], cliprect);
if (strcmp(screen.tag(), "lscreen") == 0)
{
diff --git a/src/mame/video/gticlub.h b/src/mame/video/gticlub.h
index e6c7ec1bf42..2da4f0973e0 100644
--- a/src/mame/video/gticlub.h
+++ b/src/mame/video/gticlub.h
@@ -1,6 +1,6 @@
void gticlub_led_setreg(int offset, UINT8 data);
-void K001005_draw(bitmap_t *bitmap, const rectangle &cliprect);
+void K001005_draw(bitmap_t &bitmap, const rectangle &cliprect);
void K001005_swap_buffers(running_machine &machine);
void K001005_init(running_machine &machine);
void K001005_preprocess_texture_data(UINT8 *rom, int length, int gticlub);
diff --git a/src/mame/video/gunbustr.c b/src/mame/video/gunbustr.c
index fa362a83b96..54829e38e34 100644
--- a/src/mame/video/gunbustr.c
+++ b/src/mame/video/gunbustr.c
@@ -56,7 +56,7 @@ Heavy use is made of sprite zooming.
********************************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect,const int *primasks,int x_offs,int y_offs)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect,const int *primasks,int x_offs,int y_offs)
{
gunbustr_state *state = machine.driver_data<gunbustr_state>();
UINT32 *spriteram32 = state->m_spriteram;
@@ -218,7 +218,7 @@ SCREEN_UPDATE( gunbustr )
layer[3] = (priority & 0x000f) >> 0; /* tells us which is top */
layer[4] = 4; /* text layer always over bg layers */
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
/* We have to assume 2nd to bottom layer is always underneath
sprites as pdrawgfx cannot yet cope with more than 4 layers */
diff --git a/src/mame/video/gunsmoke.c b/src/mame/video/gunsmoke.c
index 336ed9c2ee2..2676df1be65 100644
--- a/src/mame/video/gunsmoke.c
+++ b/src/mame/video/gunsmoke.c
@@ -140,7 +140,7 @@ VIDEO_START( gunsmoke )
colortable_configure_tilemap_groups(machine.colortable, state->m_fg_tilemap, machine.gfx[0], 0x4f);
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
gunsmoke_state *state = machine.driver_data<gunsmoke_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -183,7 +183,7 @@ SCREEN_UPDATE( gunsmoke )
if (state->m_bgon)
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
else
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
if (state->m_objon)
draw_sprites(screen.machine(), bitmap, cliprect);
diff --git a/src/mame/video/gyruss.c b/src/mame/video/gyruss.c
index ef605964996..901b2e8cd5d 100644
--- a/src/mame/video/gyruss.c
+++ b/src/mame/video/gyruss.c
@@ -129,7 +129,7 @@ READ8_HANDLER( gyruss_scanline_r )
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, gfx_element **gfx )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, gfx_element **gfx )
{
gyruss_state *state = machine.driver_data<gyruss_state>();
int offs;
diff --git a/src/mame/video/harddriv.c b/src/mame/video/harddriv.c
index e905e49f715..70cbf415a89 100644
--- a/src/mame/video/harddriv.c
+++ b/src/mame/video/harddriv.c
@@ -423,11 +423,11 @@ static void display_speedups(void)
}
-void harddriv_scanline_driver(screen_device &screen, bitmap_t *bitmap, int scanline, const tms34010_display_params *params)
+void harddriv_scanline_driver(screen_device &screen, bitmap_t &bitmap, int scanline, const tms34010_display_params *params)
{
harddriv_state *state = screen.machine().driver_data<harddriv_state>();
UINT8 *vram_base = &state->m_gsp_vram[(params->rowaddr << 12) & state->m_vram_mask];
- UINT16 *dest = &bitmap->pix16(scanline);
+ UINT16 *dest = &bitmap.pix16(scanline);
int coladdr = (params->yoffset << 9) + ((params->coladdr & 0xff) << 4) - 15 + (state->m_gfx_finescroll & 0x0f);
int x;
@@ -439,11 +439,11 @@ void harddriv_scanline_driver(screen_device &screen, bitmap_t *bitmap, int scanl
}
-void harddriv_scanline_multisync(screen_device &screen, bitmap_t *bitmap, int scanline, const tms34010_display_params *params)
+void harddriv_scanline_multisync(screen_device &screen, bitmap_t &bitmap, int scanline, const tms34010_display_params *params)
{
harddriv_state *state = screen.machine().driver_data<harddriv_state>();
UINT8 *vram_base = &state->m_gsp_vram[(params->rowaddr << 11) & state->m_vram_mask];
- UINT16 *dest = &bitmap->pix16(scanline);
+ UINT16 *dest = &bitmap.pix16(scanline);
int coladdr = (params->yoffset << 9) + ((params->coladdr & 0xff) << 3) - 7 + (state->m_gfx_finescroll & 0x07);
int x;
diff --git a/src/mame/video/hcastle.c b/src/mame/video/hcastle.c
index 88ea43aad34..d09816d989d 100644
--- a/src/mame/video/hcastle.c
+++ b/src/mame/video/hcastle.c
@@ -210,7 +210,7 @@ WRITE8_HANDLER( hcastle_pf2_control_w )
/*****************************************************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, UINT8 *sbank, int bank )
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, UINT8 *sbank, int bank )
{
hcastle_state *state = machine.driver_data<hcastle_state>();
device_t *k007121 = bank ? state->m_k007121_2 : state->m_k007121_1;
diff --git a/src/mame/video/higemaru.c b/src/mame/video/higemaru.c
index 399301c0c3b..101dfaf5f22 100644
--- a/src/mame/video/higemaru.c
+++ b/src/mame/video/higemaru.c
@@ -106,7 +106,7 @@ VIDEO_START( higemaru )
state->m_bg_tilemap = tilemap_create(machine, get_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
higemaru_state *state = machine.driver_data<higemaru_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/himesiki.c b/src/mame/video/himesiki.c
index 9cdae0d073f..27d0c4d6c48 100644
--- a/src/mame/video/himesiki.c
+++ b/src/mame/video/himesiki.c
@@ -50,7 +50,7 @@ WRITE8_HANDLER( himesiki_flip_w )
logerror("p08_w %02x\n",data);
}
-static void himesiki_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void himesiki_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
himesiki_state *state = machine.driver_data<himesiki_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/hnayayoi.c b/src/mame/video/hnayayoi.c
index 6fe4465e892..abc8e491af2 100644
--- a/src/mame/video/hnayayoi.c
+++ b/src/mame/video/hnayayoi.c
@@ -227,17 +227,17 @@ WRITE8_HANDLER( hnayayoi_palbank_w )
}
-static void draw_layer_interleaved( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int left_pixmap, int right_pixmap, int palbase, int transp )
+static void draw_layer_interleaved( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int left_pixmap, int right_pixmap, int palbase, int transp )
{
hnayayoi_state *state = machine.driver_data<hnayayoi_state>();
int county, countx, pen;
UINT8 *src1 = state->m_pixmap[left_pixmap];
UINT8 *src2 = state->m_pixmap[right_pixmap];
- UINT16 *dstbase = &bitmap->pix16(0);
+ UINT16 *dstbase = &bitmap.pix16(0);
palbase *= 16;
- for (county = 255; county >= 0; county--, dstbase += bitmap->rowpixels())
+ for (county = 255; county >= 0; county--, dstbase += bitmap.rowpixels())
{
UINT16 *dst = dstbase;
diff --git a/src/mame/video/hng64.c b/src/mame/video/hng64.c
index 97dda407856..656c902efa7 100644
--- a/src/mame/video/hng64.c
+++ b/src/mame/video/hng64.c
@@ -92,14 +92,14 @@ do \
while (0) \
-static void pdrawgfx_transpen_additive(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx,
+static void pdrawgfx_transpen_additive(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx,
UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,
- bitmap_t *priority, UINT32 pmask, UINT32 transpen)
+ bitmap_t &priority, UINT32 pmask, UINT32 transpen)
{
const pen_t *paldata;
- assert(dest != NULL);
- assert(dest->bpp() == 32);
+ assert(dest.valid());
+ assert(dest.bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -125,9 +125,9 @@ static void pdrawgfx_transpen_additive(bitmap_t *dest, const rectangle &cliprect
}
-static void pdrawgfxzoom_transpen_additive(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx,
+static void pdrawgfxzoom_transpen_additive(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx,
UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,
- UINT32 scalex, UINT32 scaley, bitmap_t *priority, UINT32 pmask,
+ UINT32 scalex, UINT32 scaley, bitmap_t &priority, UINT32 pmask,
UINT32 transpen)
{
const pen_t *paldata;
@@ -140,8 +140,8 @@ static void pdrawgfxzoom_transpen_additive(bitmap_t *dest, const rectangle &clip
return;
}
- assert(dest != NULL);
- assert(dest->bpp() == 32);
+ assert(dest.valid());
+ assert(dest.bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -207,7 +207,7 @@ static void pdrawgfxzoom_transpen_additive(bitmap_t *dest, const rectangle &clip
* 0x0e0 in Samurai Shodown/Xrally games, 0x1c0 in all the others, zooming factor?
*/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
hng64_state *state = machine.driver_data<hng64_state>();
const gfx_element *gfx;
@@ -431,7 +431,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const recta
*/
/* this is broken for the 'How to Play' screen in Buriki after attract, disabled for now */
-static void transition_control(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void transition_control(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
hng64_state *state = machine.driver_data<hng64_state>();
UINT32 *hng64_tcram = state->m_tcram;
@@ -459,7 +459,7 @@ static void transition_control(running_machine &machine, bitmap_t *bitmap, const
{
for (j = cliprect.min_y; j < cliprect.max_y; j++)
{
- UINT32* thePixel = &bitmap->pix32(j, i);
+ UINT32* thePixel = &bitmap.pix32(j, i);
finR = (INT32)RGB_RED(*thePixel);
finG = (INT32)RGB_GREEN(*thePixel);
@@ -705,13 +705,13 @@ struct _blit_parameters
-static void hng64_configure_blit_parameters(blit_parameters *blit, tilemap_t *tmap, bitmap_t *dest, const rectangle &cliprect, UINT32 flags, UINT8 priority, UINT8 priority_mask, hng64trans_t drawformat)
+static void hng64_configure_blit_parameters(blit_parameters *blit, tilemap_t *tmap, bitmap_t &dest, const rectangle &cliprect, UINT32 flags, UINT8 priority, UINT8 priority_mask, hng64trans_t drawformat)
{
/* start with nothing */
memset(blit, 0, sizeof(*blit));
/* set the target bitmap */
- blit->bitmap = dest;
+ blit->bitmap = &dest;
/* if we have a cliprect, copy */
blit->cliprect = cliprect;
@@ -785,14 +785,14 @@ static void hng64_tilemap_draw_roz_core(running_machine& machine, tilemap_t *tma
UINT32 startx, UINT32 starty, int incxx, int incxy, int incyx, int incyy, int wraparound)
{
const pen_t *clut = &machine.pens[blit->tilemap_priority_code >> 16];
- bitmap_t *priority_bitmap = machine.priority_bitmap;
- bitmap_t *destbitmap = blit->bitmap;
- bitmap_t *srcbitmap = tilemap_get_pixmap(tmap);
- bitmap_t *flagsmap = tilemap_get_flagsmap(tmap);
- const int xmask = srcbitmap->width()-1;
- const int ymask = srcbitmap->height()-1;
- const int widthshifted = srcbitmap->width() << 16;
- const int heightshifted = srcbitmap->height() << 16;
+ bitmap_t &priority_bitmap = machine.priority_bitmap;
+ bitmap_t &destbitmap = *blit->bitmap;
+ bitmap_t &srcbitmap = tilemap_get_pixmap(tmap);
+ bitmap_t &flagsmap = tilemap_get_flagsmap(tmap);
+ const int xmask = srcbitmap.width()-1;
+ const int ymask = srcbitmap.height()-1;
+ const int widthshifted = srcbitmap.width() << 16;
+ const int heightshifted = srcbitmap.height() << 16;
UINT32 priority = blit->tilemap_priority_code;
UINT8 mask = blit->mask;
UINT8 value = blit->value;
@@ -808,7 +808,7 @@ static void hng64_tilemap_draw_roz_core(running_machine& machine, tilemap_t *tma
UINT8 *pri;
const UINT16 *src;
const UINT8 *maskptr;
- int destadvance = destbitmap->bpp() / 8;
+ int destadvance = destbitmap.bpp() / 8;
/* pre-advance based on the cliprect */
startx += blit->cliprect.min_x * incxx + blit->cliprect.min_y * incyx;
@@ -846,10 +846,10 @@ static void hng64_tilemap_draw_roz_core(running_machine& machine, tilemap_t *tma
cy = starty >> 16;
/* get source and priority pointers */
- pri = &priority_bitmap->pix8(sy, sx);
- src = &srcbitmap->pix16(cy);
- maskptr = &flagsmap->pix8(cy);
- dest = &destbitmap->pix8(sy * destadvance, sx * destadvance);
+ pri = &priority_bitmap.pix8(sy, sx);
+ src = &srcbitmap.pix16(cy);
+ maskptr = &flagsmap.pix8(cy);
+ dest = &destbitmap.pix8(sy * destadvance, sx * destadvance);
/* loop over columns */
while (x <= ex && cx < widthshifted)
@@ -887,16 +887,16 @@ static void hng64_tilemap_draw_roz_core(running_machine& machine, tilemap_t *tma
cy = starty;
/* get dest and priority pointers */
- dest = &destbitmap->pix8(sy * destadvance, sx * destadvance);
- pri = &priority_bitmap->pix8(sy, sx);
+ dest = &destbitmap.pix8(sy * destadvance, sx * destadvance);
+ pri = &priority_bitmap.pix8(sy, sx);
/* loop over columns */
while (x <= ex)
{
/* plot if we match the mask */
- if ((flagsmap->pix8((cy >> 16) & ymask, (cx >> 16) & xmask) & mask) == value)
+ if ((flagsmap.pix8((cy >> 16) & ymask, (cx >> 16) & xmask) & mask) == value)
{
- HNG64_ROZ_PLOT_PIXEL(srcbitmap->pix16((cy >> 16) & ymask, (cx >> 16) & xmask));
+ HNG64_ROZ_PLOT_PIXEL(srcbitmap.pix16((cy >> 16) & ymask, (cx >> 16) & xmask));
*pri = (*pri & (priority >> 8)) | priority;
}
@@ -927,17 +927,17 @@ static void hng64_tilemap_draw_roz_core(running_machine& machine, tilemap_t *tma
cy = starty;
/* get dest and priority pointers */
- dest = &destbitmap->pix8(sy * destadvance, sx * destadvance);
- pri = &priority_bitmap->pix8(sy, sx);
+ dest = &destbitmap.pix8(sy * destadvance, sx * destadvance);
+ pri = &priority_bitmap.pix8(sy, sx);
/* loop over columns */
while (x <= ex)
{
/* plot if we're within the bitmap and we match the mask */
if (cx < widthshifted && cy < heightshifted)
- if ((flagsmap->pix8(cy >> 16, cx >> 16) & mask) == value)
+ if ((flagsmap.pix8(cy >> 16, cx >> 16) & mask) == value)
{
- HNG64_ROZ_PLOT_PIXEL(srcbitmap->pix16(cy >> 16, cx >> 16));
+ HNG64_ROZ_PLOT_PIXEL(srcbitmap.pix16(cy >> 16, cx >> 16));
*pri = (*pri & (priority >> 8)) | priority;
}
@@ -959,7 +959,7 @@ static void hng64_tilemap_draw_roz_core(running_machine& machine, tilemap_t *tma
-static void hng64_tilemap_draw_roz_primask(running_machine& machine, bitmap_t *dest, const rectangle &cliprect, tilemap_t *tmap,
+static void hng64_tilemap_draw_roz_primask(running_machine& machine, bitmap_t &dest, const rectangle &cliprect, tilemap_t *tmap,
UINT32 startx, UINT32 starty, int incxx, int incxy, int incyx, int incyy,
int wraparound, UINT32 flags, UINT8 priority, UINT8 priority_mask, hng64trans_t drawformat)
{
@@ -987,7 +987,7 @@ g_profiler.stop();
}
-INLINE void hng64_tilemap_draw_roz(running_machine& machine, bitmap_t *dest, const rectangle &cliprect, tilemap_t *tmap,
+INLINE void hng64_tilemap_draw_roz(running_machine& machine, bitmap_t &dest, const rectangle &cliprect, tilemap_t *tmap,
UINT32 startx, UINT32 starty, int incxx, int incxy, int incyx, int incyy,
int wraparound, UINT32 flags, UINT8 priority, hng64trans_t drawformat)
{
@@ -996,7 +996,7 @@ INLINE void hng64_tilemap_draw_roz(running_machine& machine, bitmap_t *dest, con
-static void hng64_drawtilemap(running_machine& machine, bitmap_t *bitmap, const rectangle &cliprect, int tm )
+static void hng64_drawtilemap(running_machine& machine, bitmap_t &bitmap, const rectangle &cliprect, int tm )
{
hng64_state *state = machine.driver_data<hng64_state>();
UINT32 *hng64_videoregs = state->m_videoregs;
@@ -1231,9 +1231,9 @@ static void hng64_drawtilemap(running_machine& machine, bitmap_t *bitmap, const
/* manual copy = slooow */
if (MAKE_MAME_REEEEAAALLLL_SLOW)
{
- bitmap_t *bm = tilemap_get_pixmap(tilemap);
- int bmheight = bm->height();
- int bmwidth = bm->width();
+ bitmap_t &bm = tilemap_get_pixmap(tilemap);
+ int bmheight = bm.height();
+ int bmwidth = bm.width();
const pen_t *paldata = machine.pens;
UINT32* dstptr;
UINT16* srcptr;
@@ -1247,7 +1247,7 @@ static void hng64_drawtilemap(running_machine& machine, bitmap_t *bitmap, const
for (yy=0;yy<448;yy++)
{
- dstptr = &bitmap->pix32(yy);
+ dstptr = &bitmap.pix32(yy);
tmp = xtopleft;
tmp2 = ytopleft;
@@ -1258,7 +1258,7 @@ static void hng64_drawtilemap(running_machine& machine, bitmap_t *bitmap, const
int realsrcy = (ytopleft>>16)&(bmheight-1);
UINT16 pen;
- srcptr = &bm->pix16(realsrcy);
+ srcptr = &bm.pix16(realsrcy);
pen = srcptr[realsrcx];
@@ -1329,9 +1329,9 @@ static void hng64_drawtilemap(running_machine& machine, bitmap_t *bitmap, const
/* manual copy = slooow */
if (MAKE_MAME_REEEEAAALLLL_SLOW)
{
- bitmap_t *bm = tilemap_get_pixmap(tilemap);
- int bmheight = bm->height();
- int bmwidth = bm->width();
+ bitmap_t &bm = tilemap_get_pixmap(tilemap);
+ int bmheight = bm.height();
+ int bmwidth = bm.width();
const pen_t *paldata = machine.pens;
UINT32* dstptr;
UINT16* srcptr;
@@ -1345,8 +1345,8 @@ static void hng64_drawtilemap(running_machine& machine, bitmap_t *bitmap, const
{
int realsrcy = (ytopleft>>16)&(bmheight-1);
- dstptr = &bitmap->pix32(yy);
- srcptr = &bm->pix16(realsrcy);
+ dstptr = &bitmap.pix32(yy);
+ srcptr = &bm.pix16(realsrcy);
xtopleft = tmp;
@@ -1459,8 +1459,8 @@ SCREEN_UPDATE( hng64 )
}
#endif
- bitmap->fill(hng64_tcram[0x50/4] & 0x10000 ? get_black_pen(screen.machine()) : screen.machine().pens[0], cliprect); //FIXME: Is the register correct? check with HW tests
- screen.machine().priority_bitmap->fill(0x00, cliprect);
+ bitmap.fill(hng64_tcram[0x50/4] & 0x10000 ? get_black_pen(screen.machine()) : screen.machine().pens[0], cliprect); //FIXME: Is the register correct? check with HW tests
+ screen.machine().priority_bitmap.fill(0x00, cliprect);
if (state->m_screen_dis)
return 0;
@@ -1543,7 +1543,7 @@ SCREEN_UPDATE( hng64 )
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
UINT32 *src = &state->m_colorBuffer3d[y * (cliprect.max_x-cliprect.min_x)];
- UINT32 *dst = &bitmap->pix32(y, cliprect.min_x);
+ UINT32 *dst = &bitmap.pix32(y, cliprect.min_x);
for (x = cliprect.min_x; x <= cliprect.max_x; x++)
{
diff --git a/src/mame/video/holeland.c b/src/mame/video/holeland.c
index 95e0b556a7d..8afb4010755 100644
--- a/src/mame/video/holeland.c
+++ b/src/mame/video/holeland.c
@@ -109,7 +109,7 @@ WRITE8_HANDLER( holeland_flipscreen_w )
}
-static void holeland_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void holeland_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
holeland_state *state = machine.driver_data<holeland_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -149,7 +149,7 @@ static void holeland_draw_sprites( running_machine &machine, bitmap_t *bitmap, c
}
}
-static void crzrally_draw_sprites( running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect )
+static void crzrally_draw_sprites( running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect )
{
holeland_state *state = machine.driver_data<holeland_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/homedata.c b/src/mame/video/homedata.c
index e2dc467091d..e589a4ed005 100644
--- a/src/mame/video/homedata.c
+++ b/src/mame/video/homedata.c
@@ -845,7 +845,7 @@ SCREEN_UPDATE( mrokumei )
/* blank screen */
if (state->m_vreg[0x3] == 0xc1 && state->m_vreg[0x4] == 0xc0 && state->m_vreg[0x5] == 0xff)
{
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
return 0;
}
@@ -908,7 +908,7 @@ SCREEN_UPDATE( reikaids )
}
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
pri = (state->m_bank & 0x70) >> 4;
for (i = 0; i < 4; i++)
@@ -955,7 +955,7 @@ SCREEN_UPDATE( reikaids )
}
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
pri = (state->m_blitter_bank & 0x70) >> 4;
for (i = 0; i < 4; i++)
@@ -973,7 +973,7 @@ SCREEN_UPDATE( pteacher )
/* blank screen */
if (state->m_vreg[0x3] == 0xc1 && state->m_vreg[0x4] == 0xc0 && state->m_vreg[0x5] == 0xff)
{
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
return 0;
}
diff --git a/src/mame/video/homerun.c b/src/mame/video/homerun.c
index 61c2dfb8280..f6dc54a1603 100644
--- a/src/mame/video/homerun.c
+++ b/src/mame/video/homerun.c
@@ -59,7 +59,7 @@ VIDEO_START( homerun )
state->m_tilemap = tilemap_create(machine, get_homerun_tile_info, tilemap_scan_rows, 8, 8, 64, 64);
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
homerun_state *state = machine.driver_data<homerun_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/hyhoo.c b/src/mame/video/hyhoo.c
index 1b45e39f05b..5d73daf3357 100644
--- a/src/mame/video/hyhoo.c
+++ b/src/mame/video/hyhoo.c
@@ -235,9 +235,9 @@ SCREEN_UPDATE( hyhoo )
{
hyhoo_state *state = screen.machine().driver_data<hyhoo_state>();
if (state->m_dispflag)
- copybitmap(bitmap, state->m_tmpbitmap, state->m_flipscreen, state->m_flipscreen, 0, 0, cliprect);
+ copybitmap(bitmap, *state->m_tmpbitmap, state->m_flipscreen, state->m_flipscreen, 0, 0, cliprect);
else
- bitmap->fill(RGB_BLACK, cliprect);
+ bitmap.fill(RGB_BLACK, cliprect);
return 0;
}
diff --git a/src/mame/video/hyperspt.c b/src/mame/video/hyperspt.c
index 151657599f3..af1cadf0437 100644
--- a/src/mame/video/hyperspt.c
+++ b/src/mame/video/hyperspt.c
@@ -130,7 +130,7 @@ VIDEO_START( hyperspt )
tilemap_set_scroll_rows(state->m_bg_tilemap, 32);
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
hyperspt_state *state = machine.driver_data<hyperspt_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/hyprduel.c b/src/mame/video/hyprduel.c
index c22d4e8cf49..597c3727a2e 100644
--- a/src/mame/video/hyprduel.c
+++ b/src/mame/video/hyprduel.c
@@ -459,7 +459,7 @@ VIDEO_START( magerror_14220 )
/* Draw sprites */
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
hyprduel_state *state = machine.driver_data<hyprduel_state>();
UINT8 *base_gfx = machine.region("gfx1")->base();
@@ -634,7 +634,7 @@ WRITE16_HANDLER( hyprduel_scrollreg_init_w )
}
-static void draw_layers( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int pri, int layers_ctrl )
+static void draw_layers( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int pri, int layers_ctrl )
{
hyprduel_state *state = machine.driver_data<hyprduel_state>();
UINT16 layers_pri = state->m_videoregs[0x10/2];
@@ -706,8 +706,8 @@ SCREEN_UPDATE( hyprduel )
state->m_sprite_yoffs = state->m_videoregs[0x04 / 2] - screen.height() / 2 - state->m_sprite_yoffs_sub;
/* The background color is selected by a register */
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill((state->m_videoregs[0x12 / 2] & 0x0fff) + 0x1000, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill((state->m_videoregs[0x12 / 2] & 0x0fff) + 0x1000, cliprect);
/* Screen Control Register:
@@ -733,7 +733,7 @@ if (screen.machine().input().code_pressed(KEYCODE_Z))
if (screen.machine().input().code_pressed(KEYCODE_A)) msk |= 0x08;
if (msk != 0)
{
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
layers_ctrl &= msk;
}
diff --git a/src/mame/video/ikki.c b/src/mame/video/ikki.c
index 3a562c73bdc..f513d4959c6 100644
--- a/src/mame/video/ikki.c
+++ b/src/mame/video/ikki.c
@@ -62,7 +62,7 @@ WRITE8_HANDLER( ikki_scrn_ctrl_w )
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
ikki_state *state = machine.driver_data<ikki_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -93,7 +93,7 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
if (y > 240)
y = y - 256;
- drawgfx_transmask(state->m_sprite_bitmap,cliprect, machine.gfx[1],
+ drawgfx_transmask(*state->m_sprite_bitmap,cliprect, machine.gfx[1],
code, color,
state->m_flipscreen,state->m_flipscreen,
x,y,
@@ -110,7 +110,7 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
UINT16 pen = state->m_sprite_bitmap->pix16(y, x);
if (colortable_entry_get_value(machine.colortable, pen) != 0x100)
- bitmap->pix16(y, x) = pen;
+ bitmap.pix16(y, x) = pen;
}
}
}
diff --git a/src/mame/video/inufuku.c b/src/mame/video/inufuku.c
index 259c74b0fab..850c3302c8d 100644
--- a/src/mame/video/inufuku.c
+++ b/src/mame/video/inufuku.c
@@ -55,7 +55,7 @@ WRITE16_HANDLER( inufuku_scrollreg_w )
******************************************************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
inufuku_state *state = machine.driver_data<inufuku_state>();
int offs;
@@ -239,8 +239,8 @@ SCREEN_UPDATE( inufuku )
inufuku_state *state = screen.machine().driver_data<inufuku_state>();
int i;
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
- screen.machine().priority_bitmap->fill(0);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
+ screen.machine().priority_bitmap.fill(0);
if (state->m_bg_raster)
{
diff --git a/src/mame/video/ironhors.c b/src/mame/video/ironhors.c
index a80cb0ad725..670bf5baac0 100644
--- a/src/mame/video/ironhors.c
+++ b/src/mame/video/ironhors.c
@@ -155,7 +155,7 @@ VIDEO_START( ironhors )
tilemap_set_scroll_rows(state->m_bg_tilemap, 32);
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
ironhors_state *state = machine.driver_data<ironhors_state>();
int offs;
@@ -271,7 +271,7 @@ VIDEO_START( farwest )
tilemap_set_scroll_rows(state->m_bg_tilemap, 32);
}
-static void farwest_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void farwest_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
ironhors_state *state = machine.driver_data<ironhors_state>();
int offs;
diff --git a/src/mame/video/itech8.c b/src/mame/video/itech8.c
index 46c934b4162..83f0467e215 100644
--- a/src/mame/video/itech8.c
+++ b/src/mame/video/itech8.c
@@ -622,7 +622,7 @@ SCREEN_UPDATE( itech8_2layer )
/* if we're blanked, just fill with black */
if (tms_state.blanked)
{
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
return 0;
}
@@ -634,7 +634,7 @@ SCREEN_UPDATE( itech8_2layer )
{
UINT8 *base0 = &tms_state.vram[(0x00000 + page_offset + y * 256) & 0x3ffff];
UINT8 *base2 = &tms_state.vram[(0x20000 + page_offset + y * 256) & 0x3ffff];
- UINT32 *dest = &bitmap->pix32(y);
+ UINT32 *dest = &bitmap.pix32(y);
for (x = cliprect.min_x; x <= cliprect.max_x; x++)
{
@@ -659,7 +659,7 @@ SCREEN_UPDATE( itech8_grmatch )
/* if we're blanked, just fill with black */
if (tms_state.blanked)
{
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
return 0;
}
@@ -673,7 +673,7 @@ SCREEN_UPDATE( itech8_grmatch )
{
UINT8 *base0 = &tms_state.vram[0x00000 + ((page_offset + y * 256) & 0xffff)];
UINT8 *base2 = &tms_state.vram[0x20000 + ((page_offset + y * 256) & 0xffff)];
- UINT32 *dest = &bitmap->pix32(y);
+ UINT32 *dest = &bitmap.pix32(y);
for (x = cliprect.min_x & ~1; x <= cliprect.max_x; x += 2)
{
@@ -709,7 +709,7 @@ SCREEN_UPDATE( itech8_2page )
/* if we're blanked, just fill with black */
if (tms_state.blanked)
{
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
return 0;
}
@@ -719,7 +719,7 @@ SCREEN_UPDATE( itech8_2page )
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
UINT8 *base = &tms_state.vram[(page_offset + y * 256) & 0x3ffff];
- UINT32 *dest = &bitmap->pix32(y);
+ UINT32 *dest = &bitmap.pix32(y);
for (x = cliprect.min_x; x <= cliprect.max_x; x++)
dest[x] = pens[base[x]];
@@ -742,7 +742,7 @@ SCREEN_UPDATE( itech8_2page_large )
/* if we're blanked, just fill with black */
if (tms_state.blanked)
{
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
return 0;
}
@@ -755,7 +755,7 @@ SCREEN_UPDATE( itech8_2page_large )
{
UINT8 *base = &tms_state.vram[(page_offset + y * 256) & 0x3ffff];
UINT8 *latch = &tms_state.latchram[(page_offset + y * 256) & 0x3ffff];
- UINT32 *dest = &bitmap->pix32(y);
+ UINT32 *dest = &bitmap.pix32(y);
for (x = cliprect.min_x & ~1; x <= cliprect.max_x; x += 2)
{
diff --git a/src/mame/video/jack.c b/src/mame/video/jack.c
index 570a0062d37..88ca80622db 100644
--- a/src/mame/video/jack.c
+++ b/src/mame/video/jack.c
@@ -64,7 +64,7 @@ VIDEO_START( jack )
state->m_bg_tilemap = tilemap_create(machine, get_bg_tile_info, tilemap_scan_cols_flipy, 8, 8, 32, 32);
}
-static void jack_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void jack_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
jack_state *state = machine.driver_data<jack_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -149,7 +149,7 @@ VIDEO_START( joinem )
state->m_bg_tilemap = tilemap_create(machine, joinem_get_bg_tile_info, tilemap_scan_cols_flipy, 8, 8, 32, 32);
}
-static void joinem_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void joinem_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
jack_state *state = machine.driver_data<jack_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/jackal.c b/src/mame/video/jackal.c
index 1e210be9a40..e77559403fe 100644
--- a/src/mame/video/jackal.c
+++ b/src/mame/video/jackal.c
@@ -79,7 +79,7 @@ VIDEO_START( jackal )
state->m_bg_tilemap = tilemap_create(machine, get_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
}
-static void draw_background( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_background( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
jackal_state *state = machine.driver_data<jackal_state>();
UINT8 *RAM = machine.region("master")->base();
@@ -117,7 +117,7 @@ static void draw_background( running_machine &machine, bitmap_t *bitmap, const r
#define DRAW_SPRITE(bank, code, sx, sy) drawgfx_transpen(bitmap, cliprect, machine.gfx[bank], code, color, flipx, flipy, sx, sy, 0);
-static void draw_sprites_region( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, const UINT8 *sram, int length, int bank )
+static void draw_sprites_region( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, const UINT8 *sram, int length, int bank )
{
int offs;
@@ -201,7 +201,7 @@ static void draw_sprites_region( running_machine &machine, bitmap_t *bitmap, con
}
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
jackal_state *state = machine.driver_data<jackal_state>();
UINT8 *RAM = machine.region("master")->base();
diff --git a/src/mame/video/jaguar.c b/src/mame/video/jaguar.c
index 6cb46551c5d..753259bf3a8 100644
--- a/src/mame/video/jaguar.c
+++ b/src/mame/video/jaguar.c
@@ -927,12 +927,12 @@ SCREEN_UPDATE( cojag )
/* if not enabled, just blank */
if (!(gpu_regs[VMODE] & 1))
{
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
return 0;
}
/* render the object list */
- copybitmap(bitmap, screen_bitmap, 0, 0, 0, 0, cliprect);
+ copybitmap(bitmap, *screen_bitmap, 0, 0, 0, 0, cliprect);
return 0;
}
diff --git a/src/mame/video/jailbrek.c b/src/mame/video/jailbrek.c
index d4e01465f61..77a86e2cf0f 100644
--- a/src/mame/video/jailbrek.c
+++ b/src/mame/video/jailbrek.c
@@ -65,7 +65,7 @@ VIDEO_START( jailbrek )
tilemap_set_scrolldx(state->m_bg_tilemap, 0, 396 - 256);
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
jailbrek_state *state = machine.driver_data<jailbrek_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/jalblend.c b/src/mame/video/jalblend.c
index bcef1794610..e0c06c7fddf 100644
--- a/src/mame/video/jalblend.c
+++ b/src/mame/video/jalblend.c
@@ -84,7 +84,7 @@ rgb_t jal_blend_func(rgb_t dest, rgb_t addMe, UINT8 alpha)
return MAKE_RGB(r,g,b);
}
-void jal_blend_drawgfx(bitmap_t *dest_bmp,const rectangle &clip,const gfx_element *gfx,
+void jal_blend_drawgfx(bitmap_t &dest_bmp,const rectangle &clip,const gfx_element *gfx,
UINT32 code,UINT32 color,int flipx,int flipy,int offsx,int offsy,
int transparent_color)
{
@@ -144,13 +144,13 @@ void jal_blend_drawgfx(bitmap_t *dest_bmp,const rectangle &clip,const gfx_elemen
int x, y;
/* 32-bit destination bitmap */
- if (dest_bmp->bpp() == 32)
+ if (dest_bmp.bpp() == 32)
{
/* taken from case 7: TRANSPARENCY_ALPHARANGE */
for (y = sy; y < ey; y++)
{
const UINT8 *source = source_base + y_index*gfx->line_modulo;
- UINT32 *dest = &dest_bmp->pix32(y);
+ UINT32 *dest = &dest_bmp.pix32(y);
int x_index = x_index_base;
for (x = sx; x < ex; x++)
{
@@ -181,7 +181,7 @@ void jal_blend_drawgfx(bitmap_t *dest_bmp,const rectangle &clip,const gfx_elemen
for (y = sy; y < ey; y++)
{
const UINT8 *source = source_base + y_index*gfx->line_modulo;
- UINT16 *dest = &dest_bmp->pix16(y);
+ UINT16 *dest = &dest_bmp.pix16(y);
int x_index = x_index_base;
for (x = sx; x < ex; x++)
{
diff --git a/src/mame/video/jalblend.h b/src/mame/video/jalblend.h
index 7e7f6981bf8..13fe929f8a2 100644
--- a/src/mame/video/jalblend.h
+++ b/src/mame/video/jalblend.h
@@ -2,6 +2,6 @@ void jal_blend_init(running_machine &machine, int enable);
void jal_blend_set(int color, UINT8 val);
rgb_t jal_blend_func(rgb_t dest, rgb_t addMe, UINT8 alpha);
-void jal_blend_drawgfx(bitmap_t *dest_bmp,const rectangle &clip,const gfx_element *gfx,
+void jal_blend_drawgfx(bitmap_t &dest_bmp,const rectangle &clip,const gfx_element *gfx,
UINT32 code,UINT32 color,int flipx,int flipy,int offsx,int offsy,
int transparent_color);
diff --git a/src/mame/video/jedi.c b/src/mame/video/jedi.c
index da42878529e..5242257e86a 100644
--- a/src/mame/video/jedi.c
+++ b/src/mame/video/jedi.c
@@ -88,7 +88,7 @@ static void get_pens(jedi_state *state, pen_t *pens)
}
-static void do_pen_lookup(jedi_state *state, bitmap_t *bitmap, const rectangle &cliprect)
+static void do_pen_lookup(jedi_state *state, bitmap_t &bitmap, const rectangle &cliprect)
{
int y, x;
pen_t pens[NUM_PENS];
@@ -97,7 +97,7 @@ static void do_pen_lookup(jedi_state *state, bitmap_t *bitmap, const rectangle &
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
for(x = cliprect.min_x; x <= cliprect.max_x; x++)
- bitmap->pix32(y, x) = pens[bitmap->pix32(y, x)];
+ bitmap.pix32(y, x) = pens[bitmap.pix32(y, x)];
}
@@ -132,7 +132,7 @@ WRITE8_HANDLER( jedi_hscroll_w )
*
*************************************/
-static void draw_background_and_text(running_machine &machine, jedi_state *state, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_background_and_text(running_machine &machine, jedi_state *state, bitmap_t &bitmap, const rectangle &cliprect)
{
int y;
int background_line_buffer[0x200]; /* RAM chip at 2A */
@@ -214,8 +214,8 @@ static void draw_background_and_text(running_machine &machine, jedi_state *state
the next pixel just uses the current value directly. After we done with a pixel
save it for later in the line buffer RAM */
bg_tempcol = prom1[(bg_last_col << 4) | bg_col];
- bitmap->pix32(y, x + 0) = tx_col1 | prom2[(background_line_buffer[x + 0] << 4) | bg_tempcol];
- bitmap->pix32(y, x + 1) = tx_col2 | prom2[(background_line_buffer[x + 1] << 4) | bg_col];
+ bitmap.pix32(y, x + 0) = tx_col1 | prom2[(background_line_buffer[x + 0] << 4) | bg_tempcol];
+ bitmap.pix32(y, x + 1) = tx_col2 | prom2[(background_line_buffer[x + 1] << 4) | bg_col];
background_line_buffer[x + 0] = bg_tempcol;
background_line_buffer[x + 1] = bg_col;
@@ -232,7 +232,7 @@ static void draw_background_and_text(running_machine &machine, jedi_state *state
*
*************************************/
-static void draw_sprites(running_machine &machine, jedi_state *state, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, jedi_state *state, bitmap_t &bitmap, const rectangle &cliprect)
{
offs_t offs;
UINT8 *spriteram = state->m_spriteram;
@@ -296,7 +296,7 @@ static void draw_sprites(running_machine &machine, jedi_state *state, bitmap_t *
x = x & 0x1ff;
if (col)
- bitmap->pix32(y, x) = (bitmap->pix32(y, x) & 0x30f) | col;
+ bitmap.pix32(y, x) = (bitmap.pix32(y, x) & 0x30f) | col;
/* next pixel */
if (flip_x)
@@ -333,7 +333,7 @@ static SCREEN_UPDATE( jedi )
/* if no video, clear it all to black */
if (*state->m_video_off & 0x01)
- bitmap->fill(RGB_BLACK, cliprect);
+ bitmap.fill(RGB_BLACK, cliprect);
else
{
/* draw the background/text layers, followed by the sprites
diff --git a/src/mame/video/jpmimpct.c b/src/mame/video/jpmimpct.c
index 6631906f0be..83ce47cff06 100644
--- a/src/mame/video/jpmimpct.c
+++ b/src/mame/video/jpmimpct.c
@@ -106,11 +106,11 @@ void jpmimpct_from_shiftreg(address_space *space, UINT32 address, UINT16 *shiftr
*
*************************************/
-void jpmimpct_scanline_update(screen_device &screen, bitmap_t *bitmap, int scanline, const tms34010_display_params *params)
+void jpmimpct_scanline_update(screen_device &screen, bitmap_t &bitmap, int scanline, const tms34010_display_params *params)
{
jpmimpct_state *state = screen.machine().driver_data<jpmimpct_state>();
UINT16 *vram = &state->m_vram[(params->rowaddr << 8) & 0x3ff00];
- UINT32 *dest = &bitmap->pix32(scanline);
+ UINT32 *dest = &bitmap.pix32(scanline);
int coladdr = params->coladdr;
int x;
diff --git a/src/mame/video/kan_panb.c b/src/mame/video/kan_panb.c
index 1760281e03c..ede7eef93e7 100644
--- a/src/mame/video/kan_panb.c
+++ b/src/mame/video/kan_panb.c
@@ -15,7 +15,7 @@ SCREEN_UPDATE( honeydol )
/* not standard snowbros video */
- bitmap->fill(0xf0, cliprect);
+ bitmap.fill(0xf0, cliprect);
for (offs = 0x0000/2;offs < 0x2000/2;offs += 8)
{
@@ -101,7 +101,7 @@ SCREEN_UPDATE( twinadv )
/* not standard snowbros video */
- bitmap->fill(0xf0, cliprect);
+ bitmap.fill(0xf0, cliprect);
for (offs = 0x0000/2;offs < 0x2000/2;offs += 8)
{
@@ -152,7 +152,7 @@ SCREEN_UPDATE( wintbob )
UINT16 *spriteram16 = state->m_bootleg_spriteram16;
int offs;
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
for (offs = 0;offs < state->m_spriteram_size/2;offs += 8)
{
@@ -220,7 +220,7 @@ SCREEN_UPDATE( snowbro3 )
/* This clears & redraws the entire screen each pass */
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
for (offs = 0;offs < state->m_spriteram_size/2;offs += 8)
{
diff --git a/src/mame/video/kan_pand.c b/src/mame/video/kan_pand.c
index 6cc0076e12c..0d4f505c5aa 100644
--- a/src/mame/video/kan_pand.c
+++ b/src/mame/video/kan_pand.c
@@ -97,7 +97,7 @@ void pandora_set_clear_bitmap( device_t *device, int clear )
pandora->clear_bitmap = clear;
}
-void pandora_update( device_t *device, bitmap_t *bitmap, const rectangle &cliprect )
+void pandora_update( device_t *device, bitmap_t &bitmap, const rectangle &cliprect )
{
kaneko_pandora_state *pandora = get_safe_token(device);
@@ -107,11 +107,11 @@ void pandora_update( device_t *device, bitmap_t *bitmap, const rectangle &clipre
return;
}
- copybitmap_trans(bitmap, pandora->sprites_bitmap, 0, 0, 0, 0, cliprect, 0);
+ copybitmap_trans(bitmap, *pandora->sprites_bitmap, 0, 0, 0, 0, cliprect, 0);
}
-static void pandora_draw( device_t *device, bitmap_t *bitmap, const rectangle &cliprect )
+static void pandora_draw( device_t *device, bitmap_t &bitmap, const rectangle &cliprect )
{
kaneko_pandora_state *pandora = get_safe_token(device);
int sx = 0, sy = 0, x = 0, y = 0, offs;
@@ -204,7 +204,7 @@ void pandora_eof( device_t *device )
if (pandora->clear_bitmap)
pandora->sprites_bitmap->fill(pandora->bg_pen, pandora->screen->visible_area());
- pandora_draw(device, pandora->sprites_bitmap, pandora->screen->visible_area());
+ pandora_draw(device, *pandora->sprites_bitmap, pandora->screen->visible_area());
}
/*****************************************************************************
diff --git a/src/mame/video/kan_pand.h b/src/mame/video/kan_pand.h
index eef28a88411..35518836161 100644
--- a/src/mame/video/kan_pand.h
+++ b/src/mame/video/kan_pand.h
@@ -39,7 +39,7 @@ DECLARE_LEGACY_DEVICE(KANEKO_PANDORA, kaneko_pandora);
DEVICE I/O FUNCTIONS
***************************************************************************/
-void pandora_update(device_t *device, bitmap_t *bitmap, const rectangle &cliprect);
+void pandora_update(device_t *device, bitmap_t &bitmap, const rectangle &cliprect);
void pandora_eof(device_t *device);
void pandora_set_clear_bitmap(device_t *device, int clear);
void pandora_set_bg_pen( device_t *device, int pen );
diff --git a/src/mame/video/kaneko16.c b/src/mame/video/kaneko16.c
index 1e1bdff52c2..c69aa7ff934 100644
--- a/src/mame/video/kaneko16.c
+++ b/src/mame/video/kaneko16.c
@@ -420,13 +420,13 @@ else
}
// custom function to draw a single sprite. needed to keep correct sprites - sprites and sprites - tilemaps priorities
-static void kaneko16_draw_sprites_custom(bitmap_t *dest_bmp,const rectangle &clip,const gfx_element *gfx,
+static void kaneko16_draw_sprites_custom(bitmap_t &dest_bmp,const rectangle &clip,const gfx_element *gfx,
UINT32 code,UINT32 color,int flipx,int flipy,int sx,int sy,
int priority)
{
pen_t pen_base = gfx->color_base + gfx->color_granularity * (color % gfx->total_colors);
const UINT8 *source_base = gfx_element_get_data(gfx, code % gfx->total_elements);
- bitmap_t *priority_bitmap = gfx->machine().priority_bitmap;
+ bitmap_t &priority_bitmap = gfx->machine().priority_bitmap;
int sprite_screen_height = ((1<<16)*gfx->height+0x8000)>>16;
int sprite_screen_width = ((1<<16)*gfx->width+0x8000)>>16;
@@ -493,8 +493,8 @@ static void kaneko16_draw_sprites_custom(bitmap_t *dest_bmp,const rectangle &cli
for( y=sy; y<ey; y++ )
{
const UINT8 *source = source_base + (y_index>>16) * gfx->line_modulo;
- UINT16 *dest = &dest_bmp->pix16(y);
- UINT8 *pri = &priority_bitmap->pix8(y);
+ UINT16 *dest = &dest_bmp.pix16(y);
+ UINT8 *pri = &priority_bitmap.pix8(y);
int x, x_index = x_index_base;
for( x=sx; x<ex; x++ )
@@ -517,7 +517,7 @@ static void kaneko16_draw_sprites_custom(bitmap_t *dest_bmp,const rectangle &cli
/* Build a list of sprites to display & draw them */
-void kaneko16_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+void kaneko16_draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
kaneko16_state *state = machine.driver_data<kaneko16_state>();
/* Sprites *must* be parsed from the first in RAM to the last,
@@ -852,7 +852,7 @@ WRITE16_HANDLER( kaneko16_bg15_reg_w )
***************************************************************************/
-static void kaneko16_prepare_first_tilemap_chip(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void kaneko16_prepare_first_tilemap_chip(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
kaneko16_state *state = machine.driver_data<kaneko16_state>();
/* Set Up FIRST Tilemap chip */
@@ -893,7 +893,7 @@ static void kaneko16_prepare_first_tilemap_chip(running_machine &machine, bitmap
}
-static void kaneko16_prepare_second_tilemap_chip(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void kaneko16_prepare_second_tilemap_chip(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
kaneko16_state *state = machine.driver_data<kaneko16_state>();
/* Set Up SECOND Tilemap chip */
@@ -933,14 +933,14 @@ static void kaneko16_prepare_second_tilemap_chip(running_machine &machine, bitma
}
}
-static void kaneko16_render_first_tilemap_chip(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int pri)
+static void kaneko16_render_first_tilemap_chip(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int pri)
{
kaneko16_state *state = machine.driver_data<kaneko16_state>();
tilemap_draw_primask(bitmap,cliprect, state->m_tmap[0], pri, pri, 0);
tilemap_draw_primask(bitmap,cliprect, state->m_tmap[1], pri, pri, 0);
}
-static void kaneko16_render_second_tilemap_chip(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int pri)
+static void kaneko16_render_second_tilemap_chip(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int pri)
{
kaneko16_state *state = machine.driver_data<kaneko16_state>();
if (state->m_tmap[2])
@@ -950,7 +950,7 @@ static void kaneko16_render_second_tilemap_chip(running_machine &machine, bitmap
}
}
-static void kaneko16_render_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void kaneko16_render_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
kaneko16_state *state = machine.driver_data<kaneko16_state>();
/* Sprites last (rendered with pdrawgfx, so they can slip
@@ -959,8 +959,8 @@ static void kaneko16_render_sprites(running_machine &machine, bitmap_t *bitmap,
if(state->m_keep_sprites)
{
/* keep sprites on screen */
- kaneko16_draw_sprites(machine,state->m_sprites_bitmap,cliprect);
- copybitmap_trans(bitmap,state->m_sprites_bitmap,0,0,0,0,cliprect,0);
+ kaneko16_draw_sprites(machine,*state->m_sprites_bitmap,cliprect);
+ copybitmap_trans(bitmap,*state->m_sprites_bitmap,0,0,0,0,cliprect,0);
}
else
{
@@ -969,7 +969,7 @@ static void kaneko16_render_sprites(running_machine &machine, bitmap_t *bitmap,
}
}
-static void kaneko16_render_15bpp_bitmap(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void kaneko16_render_15bpp_bitmap(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
kaneko16_state *state = machine.driver_data<kaneko16_state>();
if (state->m_bg15_bitmap)
@@ -984,29 +984,29 @@ static void kaneko16_render_15bpp_bitmap(running_machine &machine, bitmap_t *bit
sx = (select & 0x1f) * 256;
sy = 0;
- copybitmap(bitmap, state->m_bg15_bitmap, flip, flip, -sx, -sy, cliprect);
+ copybitmap(bitmap, *state->m_bg15_bitmap, flip, flip, -sx, -sy, cliprect);
// flag = 0;
}
}
-static void kaneko16_fill_bitmap(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void kaneko16_fill_bitmap(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
kaneko16_state *state = machine.driver_data<kaneko16_state>();
if(state->m_sprite_type == 1)
- bitmap->fill(0x7f00, cliprect);
+ bitmap.fill(0x7f00, cliprect);
else
/* Fill the bitmap with pen 0. This is wrong, but will work most of
the times. To do it right, each pixel should be drawn with pen 0
of the bottomost tile that covers it (which is pretty tricky to do) */
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
}
static SCREEN_UPDATE( common )
{
int i;
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
kaneko16_prepare_first_tilemap_chip(screen.machine(), bitmap, cliprect);
kaneko16_prepare_second_tilemap_chip(screen.machine(), bitmap, cliprect);
@@ -1079,7 +1079,7 @@ SCREEN_UPDATE( galsnew )
count = 0;
for (y=0;y<256;y++)
{
- UINT16 *dest = &bitmap->pix16(y);
+ UINT16 *dest = &bitmap.pix16(y);
for (x=0;x<256;x++)
{
@@ -1093,7 +1093,7 @@ SCREEN_UPDATE( galsnew )
count = 0;
for (y=0;y<256;y++)
{
- UINT16 *dest = &bitmap->pix16(y);
+ UINT16 *dest = &bitmap.pix16(y);
for (x=0;x<256;x++)
{
diff --git a/src/mame/video/kangaroo.c b/src/mame/video/kangaroo.c
index e9ccefb1e8d..ccf9adf1ce2 100644
--- a/src/mame/video/kangaroo.c
+++ b/src/mame/video/kangaroo.c
@@ -159,7 +159,7 @@ SCREEN_UPDATE( kangaroo )
/* iterate over pixels */
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
- UINT32 *dest = &bitmap->pix32(y);
+ UINT32 *dest = &bitmap.pix32(y);
for (x = cliprect.min_x; x <= cliprect.max_x; x += 2)
{
diff --git a/src/mame/video/karnov.c b/src/mame/video/karnov.c
index 8738e795d1e..2e6d2c43426 100644
--- a/src/mame/video/karnov.c
+++ b/src/mame/video/karnov.c
@@ -72,7 +72,7 @@ void karnov_flipscreen_w( running_machine &machine, int data )
tilemap_set_flip_all(machine, state->m_flipscreen ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0);
}
-static void draw_background( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_background( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
karnov_state *state = machine.driver_data<karnov_state>();
int my, mx, offs, color, tile, fx, fy;
@@ -100,10 +100,10 @@ static void draw_background( running_machine &machine, bitmap_t *bitmap, const r
color = tile >> 12;
tile = tile & 0x7ff;
if (state->m_flipscreen)
- drawgfx_opaque(state->m_bitmap_f, state->m_bitmap_f->cliprect(), machine.gfx[1],tile,
+ drawgfx_opaque(*state->m_bitmap_f, state->m_bitmap_f->cliprect(), machine.gfx[1],tile,
color, fx, fy, 496-16*mx,496-16*my);
else
- drawgfx_opaque(state->m_bitmap_f, state->m_bitmap_f->cliprect(), machine.gfx[1],tile,
+ drawgfx_opaque(*state->m_bitmap_f, state->m_bitmap_f->cliprect(), machine.gfx[1],tile,
color, fx, fy, 16*mx,16*my);
}
@@ -118,7 +118,7 @@ static void draw_background( running_machine &machine, bitmap_t *bitmap, const r
scrollx = scrollx + 256;
}
- copyscrollbitmap(bitmap, state->m_bitmap_f, 1, &scrollx, 1, &scrolly, cliprect);
+ copyscrollbitmap(bitmap, *state->m_bitmap_f, 1, &scrollx, 1, &scrolly, cliprect);
}
/******************************************************************************/
diff --git a/src/mame/video/kchamp.c b/src/mame/video/kchamp.c
index 7893cb47a1d..248ea7da5ba 100644
--- a/src/mame/video/kchamp.c
+++ b/src/mame/video/kchamp.c
@@ -68,7 +68,7 @@ VIDEO_START( kchamp )
3 XXXXXXXX
*/
-static void kchamp_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void kchamp_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
kchamp_state *state = machine.driver_data<kchamp_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -97,7 +97,7 @@ static void kchamp_draw_sprites( running_machine &machine, bitmap_t *bitmap, con
}
}
-static void kchampvs_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void kchampvs_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
kchamp_state *state = machine.driver_data<kchamp_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/kickgoal.c b/src/mame/video/kickgoal.c
index d05ea6d8cde..b45e1fc361b 100644
--- a/src/mame/video/kickgoal.c
+++ b/src/mame/video/kickgoal.c
@@ -92,7 +92,7 @@ VIDEO_START( kickgoal )
-static void kickgoal_draw_sprites( running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect )
+static void kickgoal_draw_sprites( running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect )
{
kickgoal_state *state = machine.driver_data<kickgoal_state>();
UINT16 *spriteram = state->m_spriteram;
@@ -225,7 +225,7 @@ VIDEO_START( actionhw )
}
-static void actionhw_draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void actionhw_draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect)
{
kickgoal_state *state = machine.driver_data<kickgoal_state>();
UINT16 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/kingobox.c b/src/mame/video/kingobox.c
index 25c7d6fe795..c3b7e9ef881 100644
--- a/src/mame/video/kingobox.c
+++ b/src/mame/video/kingobox.c
@@ -208,7 +208,7 @@ VIDEO_START( kingofb )
tilemap_set_transparent_pen(state->m_fg_tilemap, 0);
}
-static void kingofb_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void kingofb_draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
kingofb_state *state = machine.driver_data<kingofb_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -277,7 +277,7 @@ VIDEO_START( ringking )
tilemap_set_transparent_pen(state->m_fg_tilemap, 0);
}
-static void ringking_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void ringking_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
kingofb_state *state = machine.driver_data<kingofb_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/klax.c b/src/mame/video/klax.c
index e47b2e4d793..57128205175 100644
--- a/src/mame/video/klax.c
+++ b/src/mame/video/klax.c
@@ -117,7 +117,7 @@ SCREEN_UPDATE( klax )
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
UINT16 *mo = &mobitmap->pix16(y);
- UINT16 *pf = &bitmap->pix16(y);
+ UINT16 *pf = &bitmap.pix16(y);
for (x = rectlist.rect->min_x; x <= rectlist.rect->max_x; x++)
if (mo[x])
{
diff --git a/src/mame/video/kncljoe.c b/src/mame/video/kncljoe.c
index 5e75300523f..6df631a97ba 100644
--- a/src/mame/video/kncljoe.c
+++ b/src/mame/video/kncljoe.c
@@ -180,7 +180,7 @@ WRITE8_HANDLER( kncljoe_scroll_w )
***************************************************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
kncljoe_state *state = machine.driver_data<kncljoe_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/konamigx.c b/src/mame/video/konamigx.c
index c7cb6275ee4..a11fabb2167 100644
--- a/src/mame/video/konamigx.c
+++ b/src/mame/video/konamigx.c
@@ -97,7 +97,7 @@ void K053936GP_set_cliprect(int chip, int minx, int maxx, int miny, int maxy)
}
INLINE void K053936GP_copyroz32clip( running_machine &machine,
- bitmap_t *dst_bitmap, bitmap_t *src_bitmap,
+ bitmap_t &dst_bitmap, bitmap_t &src_bitmap,
const rectangle &dst_cliprect, const rectangle &src_cliprect,
UINT32 _startx,UINT32 _starty,int _incxx,int _incxy,int _incyx,int _incyy,
int tilebpp, int blend, int alpha, int clip, int pixeldouble_output )
@@ -143,8 +143,8 @@ INLINE void K053936GP_copyroz32clip( running_machine &machine,
starty += sx * incxy + sy * incyy;
// adjust entry points and other loop constants
- dst_pitch = dst_bitmap->rowpixels();
- dst_base = &dst_bitmap->pix32(0);
+ dst_pitch = dst_bitmap.rowpixels();
+ dst_base = &dst_bitmap.pix32(0);
dst_base2 = sy * dst_pitch + sx + tx;
ecx = tx = -tx;
@@ -152,10 +152,10 @@ INLINE void K053936GP_copyroz32clip( running_machine &machine,
pal_base = machine.pens;
cmask = colormask[tilebpp];
- src_pitch = src_bitmap->rowpixels();
- src_base = &src_bitmap->pix16(0);
- src_size = src_bitmap->width() * src_bitmap->height();
- dst_size = dst_bitmap->width() * dst_bitmap->height();
+ src_pitch = src_bitmap.rowpixels();
+ src_base = &src_bitmap.pix16(0);
+ src_size = src_bitmap.width() * src_bitmap.height();
+ dst_size = dst_bitmap.width() * dst_bitmap.height();
dst_ptr = 0;//dst_base;
cy = starty;
cx = startx;
@@ -280,17 +280,16 @@ INLINE void K053936GP_copyroz32clip( running_machine &machine,
// adapted from generic K053936_zoom_draw()
static void K053936GP_zoom_draw(running_machine &machine,
int chip, UINT16 *ctrl, UINT16 *linectrl,
- bitmap_t *bitmap, const rectangle &cliprect, tilemap_t *tmap,
+ bitmap_t &bitmap, const rectangle &cliprect, tilemap_t *tmap,
int tilebpp, int blend, int alpha, int pixeldouble_output)
{
- bitmap_t *src_bitmap;
UINT16 *lineaddr;
rectangle my_clip;
UINT32 startx, starty;
int incxx, incxy, incyx, incyy, y, maxy, clip;
- src_bitmap = tilemap_get_pixmap(tmap);
+ bitmap_t &src_bitmap = tilemap_get_pixmap(tmap);
rectangle &src_cliprect = K053936_cliprect[chip];
clip = K053936_clip_enabled[chip];
@@ -349,13 +348,13 @@ static void K053936GP_zoom_draw(running_machine &machine,
}
}
-static void K053936GP_0_zoom_draw(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect,
+static void K053936GP_0_zoom_draw(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect,
tilemap_t *tmap, int tilebpp, int blend, int alpha, int pixeldouble_output)
{
K053936GP_zoom_draw(machine, 0,K053936_0_ctrl,K053936_0_linectrl,bitmap,cliprect,tmap,tilebpp,blend,alpha, pixeldouble_output);
}
-static void K053936GP_1_zoom_draw(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect,
+static void K053936GP_1_zoom_draw(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect,
tilemap_t *tmap, int tilebpp, int blend, int alpha, int pixeldouble_output)
{
K053936GP_zoom_draw(machine, 1,K053936_1_ctrl,K053936_1_linectrl,bitmap,cliprect,tmap,tilebpp,blend,alpha, pixeldouble_output);
@@ -381,7 +380,7 @@ static void K053936GP_1_zoom_draw(running_machine &machine, bitmap_t *bitmap, co
INLINE void zdrawgfxzoom32GP(
- bitmap_t *bitmap, const rectangle &cliprect, const gfx_element *gfx,
+ bitmap_t &bitmap, const rectangle &cliprect, const gfx_element *gfx,
UINT32 code, UINT32 color, int flipx, int flipy, int sx, int sy,
int scalex, int scaley, int alpha, int drawmode, int zcode, int pri)
{
@@ -449,8 +448,8 @@ INLINE void zdrawgfxzoom32GP(
pal_base = gfx->machine().pens + gfx->color_base + (color % gfx->total_colors) * granularity;
shd_base = gfx->machine().shadow_table;
- dst_ptr = &bitmap->pix32(0);
- dst_pitch = bitmap->rowpixels();
+ dst_ptr = &bitmap.pix32(0);
+ dst_pitch = bitmap.rowpixels();
dst_minx = cliprect.min_x;
dst_maxx = cliprect.max_x;
dst_miny = cliprect.min_y;
@@ -1130,7 +1129,7 @@ void konamigx_mixer_init(running_machine &machine, int objdma)
gx_objdma = 0;
gx_primode = 0;
- gx_objzbuf = &machine.priority_bitmap->pix8(0);
+ gx_objzbuf = &machine.priority_bitmap.pix8(0);
gx_shdzbuf = auto_alloc_array(machine, UINT8, GX_ZBUFSIZE);
gx_objpool = auto_alloc_array(machine, struct GX_OBJ, GX_MAX_OBJECTS);
@@ -1159,7 +1158,7 @@ void konamigx_objdma(void)
if (gx_objdma && gx_spriteram && K053247_ram) memcpy(gx_spriteram, K053247_ram, 0x1000);
}
-void konamigx_mixer(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect,
+void konamigx_mixer(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect,
tilemap_t *sub1, int sub1flags,
tilemap_t *sub2, int sub2flags,
int mixerflags, bitmap_t *extra_bitmap, int rushingheroes_hack)
@@ -1630,7 +1629,7 @@ void konamigx_mixer(running_machine &machine, bitmap_t *bitmap, const rectangle
for (yy=0;yy<height;yy++)
{
UINT16* src = &extra_bitmap->pix16(yy);
- UINT32* dst = &bitmap->pix32(yy);
+ UINT32* dst = &bitmap.pix32(yy);
int shiftpos = 0;
for (xx=0;xx<width;xx+=2)
{
@@ -2331,7 +2330,7 @@ VIDEO_START(opengolf)
// urgh.. the priority bitmap is global, and because our temp bitmaps are bigger than the screen, this causes issues.. so just allocate something huge
// until there is a better solution, or priority bitmap can be specified manually.
- machine.priority_bitmap = auto_bitmap_alloc(machine,2048,2048,BITMAP_FORMAT_INDEXED16);
+ machine.priority_bitmap.allocate(2048,2048,BITMAP_FORMAT_INDEXED16);
}
@@ -2372,7 +2371,7 @@ VIDEO_START(racinfrc)
// urgh.. the priority bitmap is global, and because our temp bitmaps are bigger than the screen, this causes issues.. so just allocate something huge
// until there is a better solution, or priority bitmap can be specified manually.
- machine.priority_bitmap = auto_bitmap_alloc(machine,2048,2048,BITMAP_FORMAT_INDEXED16);
+ machine.priority_bitmap.allocate(2048,2048,BITMAP_FORMAT_INDEXED16);
}
@@ -2432,8 +2431,8 @@ SCREEN_UPDATE(konamigx)
// Type-1
if (gx_specialrozenable == 1)
{
- K053936_0_zoom_draw(gxtype1_roz_dstbitmap, gxtype1_roz_dstbitmapclip,gx_psac_tilemap, 0,0,0); // height data
- K053936_0_zoom_draw(gxtype1_roz_dstbitmap2,gxtype1_roz_dstbitmapclip,gx_psac_tilemap2,0,0,0); // colour data (+ some voxel height data?)
+ K053936_0_zoom_draw(*gxtype1_roz_dstbitmap, gxtype1_roz_dstbitmapclip,gx_psac_tilemap, 0,0,0); // height data
+ K053936_0_zoom_draw(*gxtype1_roz_dstbitmap2,gxtype1_roz_dstbitmapclip,gx_psac_tilemap2,0,0,0); // colour data (+ some voxel height data?)
}
@@ -2453,8 +2452,8 @@ SCREEN_UPDATE(konamigx)
temprect.min_y = cliprect.min_y;
temprect.max_y = cliprect.max_y;
- if (konamigx_type3_psac2_actual_bank == 1) K053936_0_zoom_draw(type3_roz_temp_bitmap, temprect,gx_psac_tilemap_alt, 0,0,0); // soccerss playfield
- else K053936_0_zoom_draw(type3_roz_temp_bitmap, temprect,gx_psac_tilemap, 0,0,0); // soccerss playfield
+ if (konamigx_type3_psac2_actual_bank == 1) K053936_0_zoom_draw(*type3_roz_temp_bitmap, temprect,gx_psac_tilemap_alt, 0,0,0); // soccerss playfield
+ else K053936_0_zoom_draw(*type3_roz_temp_bitmap, temprect,gx_psac_tilemap, 0,0,0); // soccerss playfield
konamigx_mixer(screen.machine(), bitmap, cliprect, 0, 0, 0, 0, 0, type3_roz_temp_bitmap, gx_rushingheroes_hack);
@@ -2483,11 +2482,11 @@ SCREEN_UPDATE(konamigx)
{
//UINT16* src = &gxtype1_roz_dstbitmap->pix16(y);
- //UINT32* dst = &bitmap->pix32(y);
+ //UINT32* dst = &bitmap.pix32(y);
// ths K053936 rendering should probably just be flipped
// this is just kludged to align the racing force 2d logo
UINT16* src = &gxtype1_roz_dstbitmap2->pix16(y+30);
- UINT32* dst = &bitmap->pix32(256-y);
+ UINT32* dst = &bitmap.pix32(256-y);
for (x=0;x<512;x++)
{
@@ -2537,15 +2536,12 @@ SCREEN_UPDATE(konamigx_left)
}
}
- bitmap_t* realbitmap = bitmap;
- bitmap = dualscreen_left_tempbitmap;
- SCREEN_UPDATE_CALL(konamigx);
-
- copybitmap(realbitmap, dualscreen_left_tempbitmap, 0, 0, 0, 0, cliprect);
+ SCREEN_UPDATE_NAME(konamigx)(screen, *dualscreen_left_tempbitmap, cliprect);
+ copybitmap(bitmap, *dualscreen_left_tempbitmap, 0, 0, 0, 0, cliprect);
}
else
{
- copybitmap(bitmap, dualscreen_left_tempbitmap, 0, 0, 0, 0, cliprect);
+ copybitmap(bitmap, *dualscreen_left_tempbitmap, 0, 0, 0, 0, cliprect);
}
return 0;
@@ -2555,7 +2551,7 @@ SCREEN_UPDATE(konamigx_right)
{
if (konamigx_current_frame==1)
{
- copybitmap(bitmap, dualscreen_right_tempbitmap, 0, 0, 0, 0, cliprect);
+ copybitmap(bitmap, *dualscreen_right_tempbitmap, 0, 0, 0, 0, cliprect);
}
else
{
@@ -2586,11 +2582,8 @@ SCREEN_UPDATE(konamigx_right)
}
}
- bitmap_t* realbitmap = bitmap;
- bitmap = dualscreen_right_tempbitmap;
- SCREEN_UPDATE_CALL(konamigx);
-
- copybitmap(realbitmap, dualscreen_right_tempbitmap, 0, 0, 0, 0, cliprect);
+ SCREEN_UPDATE_NAME(konamigx)(screen, *dualscreen_right_tempbitmap, cliprect);
+ copybitmap(bitmap, *dualscreen_right_tempbitmap, 0, 0, 0, 0, cliprect);
}
return 0;
diff --git a/src/mame/video/konamiic.c b/src/mame/video/konamiic.c
index 9f514065ffc..9d845fbca1e 100644
--- a/src/mame/video/konamiic.c
+++ b/src/mame/video/konamiic.c
@@ -1518,7 +1518,7 @@ static int K053936_wraparound[K053936_MAX_CHIPS];
// there is another implementation of this in machine/konamigx.c (!)
// why?
-static void K053936_zoom_draw(int chip,UINT16 *ctrl,UINT16 *linectrl, bitmap_t *bitmap,const rectangle &cliprect,tilemap_t *tmap,int flags,UINT32 priority, int glfgreat_hack)
+static void K053936_zoom_draw(int chip,UINT16 *ctrl,UINT16 *linectrl, bitmap_t &bitmap,const rectangle &cliprect,tilemap_t *tmap,int flags,UINT32 priority, int glfgreat_hack)
{
if (!tmap)
return;
@@ -1639,7 +1639,7 @@ if (machine.input().code_pressed(KEYCODE_D))
}
-void K053936_0_zoom_draw(bitmap_t *bitmap,const rectangle &cliprect,tilemap_t *tmap,int flags,UINT32 priority, int glfgreat_hack)
+void K053936_0_zoom_draw(bitmap_t &bitmap,const rectangle &cliprect,tilemap_t *tmap,int flags,UINT32 priority, int glfgreat_hack)
{
K053936_zoom_draw(0,K053936_0_ctrl,K053936_0_linectrl,bitmap,cliprect,tmap,flags,priority, glfgreat_hack);
}
@@ -2179,7 +2179,7 @@ void K056832_vh_start(running_machine &machine, const char *gfx_memory_region, i
{
tmap = K056832_tilemap[i];
- K056832_pixmap[i] = tilemap_get_pixmap(tmap);
+ K056832_pixmap[i] = &tilemap_get_pixmap(tmap);
tilemap_set_transparent_pen(tmap, 0);
}
@@ -2563,7 +2563,7 @@ WRITE16_HANDLER( K056832_b_word_w )
}
-static int K056832_update_linemap(running_machine &machine, bitmap_t *bitmap, int page, int flags)
+static int K056832_update_linemap(running_machine &machine, bitmap_t &bitmap, int page, int flags)
{
if (K056832_PageTileMode[page]) return(0);
@@ -2576,11 +2576,10 @@ static int K056832_update_linemap(running_machine &machine, bitmap_t *bitmap, in
tilemap_t *tmap;
UINT32 *dirty;
int all_dirty;
- bitmap_t* xprmap;
UINT8 *xprdata;
tmap = K056832_tilemap[page];
- xprmap = tilemap_get_flagsmap(tmap);
+ bitmap_t &xprmap = tilemap_get_flagsmap(tmap);
xprdata = tilemap_get_tile_flags(tmap);
dirty = K056832_LineDirty[page];
@@ -2595,7 +2594,7 @@ static int K056832_update_linemap(running_machine &machine, bitmap_t *bitmap, in
// *really ugly but it minimizes alteration to tilemap.c
memset (&zerorect, 0, sizeof(rectangle)); // zero dimension
tilemap_draw(bitmap, zerorect, tmap, 0, 0); // dummy call to reset tile_dirty_map
- xprmap->fill(0); // reset pixel transparency_bitmap;
+ xprmap.fill(0); // reset pixel transparency_bitmap;
memset(xprdata, TILEMAP_PIXEL_LAYER0, 0x800); // reset tile transparency_data;
}
else
@@ -2647,7 +2646,7 @@ static int K056832_update_linemap(running_machine &machine, bitmap_t *bitmap, in
tile_data tileinfo = {0};
dst_ptr = &pixmap->pix16(line);
- xpr_ptr = &xprmap->pix8(line);
+ xpr_ptr = &xprmap.pix8(line);
if (!all_dirty)
{
@@ -2687,7 +2686,7 @@ static int K056832_update_linemap(running_machine &machine, bitmap_t *bitmap, in
return(0);
}
-void K056832_tilemap_draw(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int layer, UINT32 flags, UINT32 priority)
+void K056832_tilemap_draw(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int layer, UINT32 flags, UINT32 priority)
{
static int last_colorbase[K056832_PAGE_COUNT];
@@ -3154,7 +3153,7 @@ void K054338_update_all_shadows(running_machine &machine, int rushingheroes_hack
#ifdef UNUSED_FUNCTION
// K054338 BG color fill
-void K054338_fill_solid_bg(bitmap_t *bitmap)
+void K054338_fill_solid_bg(bitmap_t &bitmap)
{
UINT32 bgcolor;
UINT32 *pLine;
@@ -3164,18 +3163,18 @@ void K054338_fill_solid_bg(bitmap_t *bitmap)
bgcolor |= K054338_read_register(K338_REG_BGC_GB);
/* and fill the screen with it */
- for (y = 0; y < bitmap->height; y++)
+ for (y = 0; y < bitmap.height; y++)
{
- pLine = (UINT32 *)bitmap->base;
- pLine += (bitmap->rowpixels*y);
- for (x = 0; x < bitmap->width; x++)
+ pLine = (UINT32 *)bitmap.base;
+ pLine += (bitmap.rowpixels*y);
+ for (x = 0; x < bitmap.width; x++)
*pLine++ = bgcolor;
}
}
#endif
// Unified K054338/K055555 BG color fill
-void K054338_fill_backcolor(running_machine &machine, bitmap_t *bitmap, int mode) // (see p.67)
+void K054338_fill_backcolor(running_machine &machine, bitmap_t &bitmap, int mode) // (see p.67)
{
int clipx, clipy, clipw, cliph, i, dst_pitch;
int BGC_CBLK, BGC_SET;
@@ -3188,8 +3187,8 @@ void K054338_fill_backcolor(running_machine &machine, bitmap_t *bitmap, int mode
clipw = (visarea.max_x - clipx + 4) & ~3;
cliph = visarea.max_y - clipy + 1;
- dst_ptr = &bitmap->pix32(clipy);
- dst_pitch = bitmap->rowpixels();
+ dst_ptr = &bitmap.pix32(clipy);
+ dst_pitch = bitmap.rowpixels();
dst_ptr += clipx;
BGC_SET = 0;
diff --git a/src/mame/video/konamiic.h b/src/mame/video/konamiic.h
index 0021c21de8d..c0da27c0e52 100644
--- a/src/mame/video/konamiic.h
+++ b/src/mame/video/konamiic.h
@@ -37,7 +37,7 @@ int K053246_read_register(int regnum);
extern UINT16 *K053936_0_ctrl,*K053936_0_linectrl;
extern UINT16 *K053936_1_ctrl,*K053936_1_linectrl;
-void K053936_0_zoom_draw(bitmap_t *bitmap,const rectangle &cliprect,tilemap_t *tmap,int flags,UINT32 priority, int glfgreat_hack);
+void K053936_0_zoom_draw(bitmap_t &bitmap,const rectangle &cliprect,tilemap_t *tmap,int flags,UINT32 priority, int glfgreat_hack);
void K053936_wraparound_enable(int chip, int status);
void K053936_set_offset(int chip, int xoffs, int yoffs);
@@ -76,7 +76,7 @@ WRITE16_HANDLER( K056832_word_w ); // "VRAM" registers
WRITE16_HANDLER( K056832_b_word_w );
void K056832_mark_plane_dirty(int num);
void K056832_MarkAllTilemapsDirty(void);
-void K056832_tilemap_draw(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int num, UINT32 flags, UINT32 priority);
+void K056832_tilemap_draw(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int num, UINT32 flags, UINT32 priority);
int K056832_get_LayerAssociation(void);
void K056832_set_LayerOffset(int layer, int offsx, int offsy);
void K056832_set_UpdateMode(int mode);
@@ -173,8 +173,8 @@ WRITE16_HANDLER( K054338_word_w ); // "CLCT" registers
WRITE32_HANDLER( K054338_long_w );
int K054338_read_register(int reg);
void K054338_update_all_shadows(running_machine &machine, int rushingheroes_hack); // called at the beginning of SCREEN_UPDATE()
-void K054338_fill_solid_bg(bitmap_t *bitmap); // solid backcolor fill
-void K054338_fill_backcolor(running_machine &machine, bitmap_t *bitmap, int mode); // unified fill, 0=solid, 1=gradient
+void K054338_fill_solid_bg(bitmap_t &bitmap); // solid backcolor fill
+void K054338_fill_backcolor(running_machine &machine, bitmap_t &bitmap, int mode); // unified fill, 0=solid, 1=gradient
int K054338_set_alpha_level(int pblend); // blend style 0-2
void K054338_invert_alpha(int invert); // 0=0x00(invis)-0x1f(solid), 1=0x1f(invis)-0x00(solod)
void K054338_export_config(int **shdRGB);
diff --git a/src/mame/video/konicdev.c b/src/mame/video/konicdev.c
index d5e62c647d8..bd519fb7a6e 100644
--- a/src/mame/video/konicdev.c
+++ b/src/mame/video/konicdev.c
@@ -1422,12 +1422,12 @@ WRITE8_DEVICE_HANDLER( k007121_ctrl_w )
*
*/
-void k007121_sprites_draw( device_t *device, bitmap_t *bitmap, const rectangle &cliprect, gfx_element *gfx, colortable_t *ctable,
+void k007121_sprites_draw( device_t *device, bitmap_t &bitmap, const rectangle &cliprect, gfx_element *gfx, colortable_t *ctable,
const UINT8 *source, int base_color, int global_x_offset, int bank_base, UINT32 pri_mask )
{
k007121_state *k007121 = k007121_get_safe_token(device);
// const gfx_element *gfx = gfxs[chip];
- bitmap_t *priority_bitmap = gfx->machine().priority_bitmap;
+ bitmap_t &priority_bitmap = gfx->machine().priority_bitmap;
int flipscreen = k007121->flipscreen;
int i, num, inc, offs[5];
int is_flakatck = (ctable == NULL);
@@ -1749,7 +1749,7 @@ void k007342_tilemap_update( device_t *device )
#endif
}
-void k007342_tilemap_draw( device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int num, int flags, UINT32 priority )
+void k007342_tilemap_draw( device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int num, int flags, UINT32 priority )
{
k007342_state *k007342 = k007342_get_safe_token(device);
tilemap_draw(bitmap, cliprect, k007342->tilemap[num], flags, priority);
@@ -1942,7 +1942,7 @@ WRITE8_DEVICE_HANDLER( k007420_w )
* 7 | xxxxxxxx | unused
*/
-void k007420_sprites_draw( device_t *device, bitmap_t *bitmap, const rectangle &cliprect, gfx_element *gfx )
+void k007420_sprites_draw( device_t *device, bitmap_t &bitmap, const rectangle &cliprect, gfx_element *gfx )
{
k007420_state *k007420 = k007420_get_safe_token(device);
int offs;
@@ -2561,7 +2561,7 @@ if (machine.input().code_pressed(KEYCODE_F))
#endif
}
-void k052109_tilemap_draw( device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int tmap_num, UINT32 flags, UINT8 priority )
+void k052109_tilemap_draw( device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int tmap_num, UINT32 flags, UINT8 priority )
{
k052109_state *k052109 = k052109_get_safe_token(device);
tilemap_draw(bitmap, cliprect, k052109->tilemap[tmap_num], flags, priority);
@@ -3003,7 +3003,7 @@ WRITE16_DEVICE_HANDLER( k051937_word_w )
* Note that Aliens also uses the shadow bit to select the second sprite bank.
*/
-void k051960_sprites_draw( device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int min_priority, int max_priority )
+void k051960_sprites_draw( device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int min_priority, int max_priority )
{
#define NUM_SPRITES 128
k051960_state *k051960 = k051960_get_safe_token(device);
@@ -3529,7 +3529,7 @@ void k053244_bankselect( device_t *device, int bank )
* The rest of the sprite remains normal.
*/
-void k053245_sprites_draw( device_t *device, bitmap_t *bitmap, const rectangle &cliprect )
+void k053245_sprites_draw( device_t *device, bitmap_t &bitmap, const rectangle &cliprect )
{
#define NUM_SPRITES 128
k05324x_state *k053245 = k05324x_get_safe_token(device);
@@ -3783,7 +3783,7 @@ if (machine.input().code_pressed(KEYCODE_D))
/* Lethal Enforcers has 2 of these chips hooked up in parallel to give 6bpp gfx.. lets cheat a
bit and make emulating it a little less messy by using a custom function instead */
-void k053245_sprites_draw_lethal( device_t *device, bitmap_t *bitmap, const rectangle &cliprect )
+void k053245_sprites_draw_lethal( device_t *device, bitmap_t &bitmap, const rectangle &cliprect )
{
#define NUM_SPRITES 128
k05324x_state *k053245 = k05324x_get_safe_token(device);
@@ -4450,7 +4450,7 @@ int k053246_is_irq_enabled( device_t *device )
* The rest of the sprite remains normal.
*/
-void k053247_sprites_draw( device_t *device, bitmap_t *bitmap, const rectangle &cliprect )
+void k053247_sprites_draw( device_t *device, bitmap_t &bitmap, const rectangle &cliprect )
{
#define NUM_SPRITES 256
k053247_state *k053246 = k053247_get_safe_token(device);
@@ -4496,7 +4496,7 @@ void k053247_sprites_draw( device_t *device, bitmap_t *bitmap, const rectangle &
*/
if (machine.config().m_video_attributes & VIDEO_HAS_SHADOWS)
{
- if (bitmap->bpp() == 32 && (machine.config().m_video_attributes & VIDEO_HAS_HIGHLIGHTS))
+ if (bitmap.bpp() == 32 && (machine.config().m_video_attributes & VIDEO_HAS_HIGHLIGHTS))
shdmask = 3; // enable all shadows and highlights
else
shdmask = 0; // enable default shadows
@@ -5221,7 +5221,7 @@ INLINE void k051316_get_tile_info( device_t *device, tile_data *tileinfo, int ti
static TILE_GET_INFO_DEVICE( k051316_get_tile_info0 ) { k051316_get_tile_info(device, tileinfo, tile_index); }
-void k051316_zoom_draw( device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int flags, UINT32 priority )
+void k051316_zoom_draw( device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int flags, UINT32 priority )
{
k051316_state *k051316= k051316_get_safe_token(device);
UINT32 startx, starty;
@@ -5459,7 +5459,7 @@ READ16_DEVICE_HANDLER( k053936_linectrl_r )
// there is another implementation of this in video/konamigx.c (!)
// why? shall they be merged?
-void k053936_zoom_draw( device_t *device, bitmap_t *bitmap, const rectangle &cliprect, tilemap_t *tmap, int flags, UINT32 priority, int glfgreat_hack )
+void k053936_zoom_draw( device_t *device, bitmap_t &bitmap, const rectangle &cliprect, tilemap_t *tmap, int flags, UINT32 priority, int glfgreat_hack )
{
k053936_state *k053936= k053936_get_safe_token(device);
if (!tmap)
@@ -6966,7 +6966,7 @@ WRITE32_DEVICE_HANDLER( k056832_b_long_w )
}
}
-static int k056832_update_linemap( device_t *device, bitmap_t *bitmap, int page, int flags )
+static int k056832_update_linemap( device_t *device, bitmap_t &bitmap, int page, int flags )
{
k056832_state *k056832 = k056832_get_safe_token(device);
@@ -6980,11 +6980,10 @@ static int k056832_update_linemap( device_t *device, bitmap_t *bitmap, int page,
tilemap_t *tmap;
UINT32 *dirty;
int all_dirty;
- bitmap_t* xprmap;
UINT8 *xprdata;
tmap = k056832->tilemap[page];
- xprmap = tilemap_get_flagsmap(tmap);
+ bitmap_t &xprmap = tilemap_get_flagsmap(tmap);
xprdata = tilemap_get_tile_flags(tmap);
dirty = k056832->line_dirty[page];
@@ -6999,7 +6998,7 @@ static int k056832_update_linemap( device_t *device, bitmap_t *bitmap, int page,
// *really ugly but it minimizes alteration to tilemap.c
memset(&zerorect, 0, sizeof(rectangle)); // zero dimension
tilemap_draw(bitmap, zerorect, tmap, 0, 0); // dummy call to reset tile_dirty_map
- xprmap->fill(0); // reset pixel transparency_bitmap;
+ xprmap.fill(0); // reset pixel transparency_bitmap;
memset(xprdata, TILEMAP_PIXEL_LAYER0, 0x800); // reset tile transparency_data;
}
else
@@ -7050,7 +7049,7 @@ static int k056832_update_linemap( device_t *device, bitmap_t *bitmap, int page,
tile_data tileinfo = {0};
dst_ptr = &pixmap->pix16(line);
- xpr_ptr = &xprmap->pix8(line);
+ xpr_ptr = &xprmap.pix8(line);
if (!all_dirty)
{
@@ -7090,7 +7089,7 @@ static int k056832_update_linemap( device_t *device, bitmap_t *bitmap, int page,
return(0);
}
-void k056832_tilemap_draw( device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int layer, UINT32 flags, UINT32 priority )
+void k056832_tilemap_draw( device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int layer, UINT32 flags, UINT32 priority )
{
k056832_state *k056832 = k056832_get_safe_token(device);
UINT32 last_dx, last_visible, new_colorbase, last_active;
@@ -7413,7 +7412,7 @@ printf("\nend\n");
} // end of function
-void k056832_tilemap_draw_dj( device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int layer, UINT32 flags, UINT32 priority )
+void k056832_tilemap_draw_dj( device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int layer, UINT32 flags, UINT32 priority )
{
k056832_state *k056832 = k056832_get_safe_token(device);
UINT32 last_dx, last_visible, new_colorbase, last_active;
@@ -7942,7 +7941,7 @@ static DEVICE_START( k056832 )
{
tmap = k056832->tilemap[i];
- k056832->pixmap[i] = tilemap_get_pixmap(tmap);
+ k056832->pixmap[i] = &tilemap_get_pixmap(tmap);
tilemap_set_transparent_pen(tmap, 0);
}
@@ -8209,7 +8208,7 @@ void k054338_update_all_shadows( device_t *device, int rushingheroes_hack )
}
// k054338 BG color fill
-void k054338_fill_solid_bg( device_t *device, bitmap_t *bitmap )
+void k054338_fill_solid_bg( device_t *device, bitmap_t &bitmap )
{
UINT32 bgcolor;
UINT32 *pLine;
@@ -8219,16 +8218,16 @@ void k054338_fill_solid_bg( device_t *device, bitmap_t *bitmap )
bgcolor |= k054338_register_r(device, K338_REG_BGC_GB);
/* and fill the screen with it */
- for (y = 0; y < bitmap->height(); y++)
+ for (y = 0; y < bitmap.height(); y++)
{
- pLine = &bitmap->pix32(y);
- for (x = 0; x < bitmap->width(); x++)
+ pLine = &bitmap.pix32(y);
+ for (x = 0; x < bitmap.width(); x++)
*pLine++ = bgcolor;
}
}
// Unified k054338/K055555 BG color fill
-void k054338_fill_backcolor( device_t *device, bitmap_t *bitmap, int mode ) // (see p.67)
+void k054338_fill_backcolor( device_t *device, bitmap_t &bitmap, int mode ) // (see p.67)
{
k054338_state *k054338 = k054338_get_safe_token(device);
int clipx, clipy, clipw, cliph, i, dst_pitch;
@@ -8242,8 +8241,8 @@ void k054338_fill_backcolor( device_t *device, bitmap_t *bitmap, int mode ) // (
clipw = (visarea.max_x - clipx + 4) & ~3;
cliph = visarea.max_y - clipy + 1;
- dst_ptr = &bitmap->pix32(clipy);
- dst_pitch = bitmap->rowpixels();
+ dst_ptr = &bitmap.pix32(clipy);
+ dst_pitch = bitmap.rowpixels();
dst_ptr += clipx;
BGC_SET = 0;
@@ -9416,7 +9415,7 @@ static void k001005_render_polygons( device_t *device )
}
}
-void k001005_draw( device_t *device, bitmap_t *bitmap, const rectangle &cliprect )
+void k001005_draw( device_t *device, bitmap_t &bitmap, const rectangle &cliprect )
{
k001005_state *k001005 = k001005_get_safe_token(device);
int i, j;
@@ -9425,7 +9424,7 @@ void k001005_draw( device_t *device, bitmap_t *bitmap, const rectangle &cliprect
for (j = cliprect.min_y; j <= cliprect.max_y; j++)
{
- UINT32 *bmp = &bitmap->pix32(j);
+ UINT32 *bmp = &bitmap.pix32(j);
UINT32 *src = &k001005->bitmap[k001005->bitmap_page ^ 1]->pix32(j);
for (i = cliprect.min_x; i <= cliprect.max_x; i++)
@@ -9695,12 +9694,12 @@ static TILE_GET_INFO_DEVICE( k001604_tile_info_layer_roz )
}
-void k001604_draw_back_layer( device_t *device, bitmap_t *bitmap, const rectangle &cliprect )
+void k001604_draw_back_layer( device_t *device, bitmap_t &bitmap, const rectangle &cliprect )
{
k001604_state *k001604 = k001604_get_safe_token(device);
int layer;
int num_layers;
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
num_layers = k001604->layer_size ? 2 : 1;
@@ -9730,7 +9729,7 @@ void k001604_draw_back_layer( device_t *device, bitmap_t *bitmap, const rectangl
}
}
-void k001604_draw_front_layer( device_t *device, bitmap_t *bitmap, const rectangle &cliprect )
+void k001604_draw_front_layer( device_t *device, bitmap_t &bitmap, const rectangle &cliprect )
{
k001604_state *k001604 = k001604_get_safe_token(device);
@@ -10031,7 +10030,7 @@ static TILE_GET_INFO_DEVICE( k037122_tile_info_layer1 )
}
-void k037122_tile_draw( device_t *device, bitmap_t *bitmap, const rectangle &cliprect )
+void k037122_tile_draw( device_t *device, bitmap_t &bitmap, const rectangle &cliprect )
{
k037122_state *k037122 = k037122_get_safe_token(device);
const rectangle &visarea = k037122->screen->visible_area();
diff --git a/src/mame/video/konicdev.h b/src/mame/video/konicdev.h
index 1dcf9ed3618..7adb3a6b095 100644
--- a/src/mame/video/konicdev.h
+++ b/src/mame/video/konicdev.h
@@ -309,7 +309,7 @@ WRITE8_DEVICE_HANDLER( k007121_ctrl_w );
/* shall we move source in the interface? */
/* also notice that now we directly pass *gfx[chip] instead of **gfx !! */
-void k007121_sprites_draw( device_t *device, bitmap_t *bitmap, const rectangle &cliprect, gfx_element *gfx, colortable_t *ctable,
+void k007121_sprites_draw( device_t *device, bitmap_t &bitmap, const rectangle &cliprect, gfx_element *gfx, colortable_t *ctable,
const UINT8 *source, int base_color, int global_x_offset, int bank_base, UINT32 pri_mask );
@@ -321,7 +321,7 @@ WRITE8_DEVICE_HANDLER( k007342_scroll_w );
WRITE8_DEVICE_HANDLER( k007342_vreg_w );
void k007342_tilemap_update(device_t *device);
-void k007342_tilemap_draw(device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int num, int flags, UINT32 priority);
+void k007342_tilemap_draw(device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int num, int flags, UINT32 priority);
int k007342_is_int_enabled(device_t *device);
@@ -330,7 +330,7 @@ int k007342_is_int_enabled(device_t *device);
READ8_DEVICE_HANDLER( k007420_r );
WRITE8_DEVICE_HANDLER( k007420_w );
-void k007420_sprites_draw(device_t *device, bitmap_t *bitmap, const rectangle &cliprect, gfx_element *gfx);
+void k007420_sprites_draw(device_t *device, bitmap_t &bitmap, const rectangle &cliprect, gfx_element *gfx);
/** Konami 052109 **/
@@ -376,7 +376,7 @@ void k052109_tilemap_update(device_t *device);
int k052109_is_irq_enabled(device_t *device);
void k052109_set_layer_offsets(device_t *device, int layer, int dx, int dy);
void k052109_tilemap_mark_dirty(device_t *device, int tmap_num);
-void k052109_tilemap_draw(device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int tmap_num, UINT32 flags, UINT8 priority);
+void k052109_tilemap_draw(device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int tmap_num, UINT32 flags, UINT8 priority);
/** Konami 051960 / 051937 **/
@@ -404,7 +404,7 @@ WRITE8_DEVICE_HANDLER( k051937_w );
READ16_DEVICE_HANDLER( k051937_word_r );
WRITE16_DEVICE_HANDLER( k051937_word_w );
-void k051960_sprites_draw(device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int min_priority, int max_priority);
+void k051960_sprites_draw(device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int min_priority, int max_priority);
int k051960_is_irq_enabled(device_t *device);
int k051960_is_nmi_enabled(device_t *device);
void k051960_set_sprite_offsets(device_t *device, int dx, int dy);
@@ -428,8 +428,8 @@ WRITE16_DEVICE_HANDLER( k053244_lsb_w );
READ16_DEVICE_HANDLER( k053244_word_r );
WRITE16_DEVICE_HANDLER( k053244_word_w );
void k053244_bankselect(device_t *device, int bank); /* used by TMNT2, Asterix and Premier Soccer for ROM testing */
-void k053245_sprites_draw(device_t *device, bitmap_t *bitmap, const rectangle &cliprect);
-void k053245_sprites_draw_lethal(device_t *device, bitmap_t *bitmap, const rectangle &cliprect); /* for lethal enforcers */
+void k053245_sprites_draw(device_t *device, bitmap_t &bitmap, const rectangle &cliprect);
+void k053245_sprites_draw_lethal(device_t *device, bitmap_t &bitmap, const rectangle &cliprect); /* for lethal enforcers */
void k053245_clear_buffer(device_t *device);
void k053245_set_sprite_offs(device_t *device, int offsx, int offsy);
@@ -463,7 +463,7 @@ WRITE32_DEVICE_HANDLER( k053247_long_w );
WRITE16_DEVICE_HANDLER( k053247_reg_word_w ); // "OBJSET2" registers
WRITE32_DEVICE_HANDLER( k053247_reg_long_w );
-void k053247_sprites_draw(device_t *device, bitmap_t *bitmap,const rectangle &cliprect);
+void k053247_sprites_draw(device_t *device, bitmap_t &bitmap,const rectangle &cliprect);
int k053247_read_register(device_t *device, int regnum);
void k053247_set_sprite_offs(device_t *device, int offsx, int offsy);
void k053247_wraparound_enable(device_t *device, int status);
@@ -501,7 +501,7 @@ READ8_DEVICE_HANDLER( k051316_r );
WRITE8_DEVICE_HANDLER( k051316_w );
READ8_DEVICE_HANDLER( k051316_rom_r );
WRITE8_DEVICE_HANDLER( k051316_ctrl_w );
-void k051316_zoom_draw(device_t *device, bitmap_t *bitmap,const rectangle &cliprect,int flags,UINT32 priority);
+void k051316_zoom_draw(device_t *device, bitmap_t &bitmap,const rectangle &cliprect,int flags,UINT32 priority);
void k051316_wraparound_enable(device_t *device, int status);
@@ -510,7 +510,7 @@ WRITE16_DEVICE_HANDLER( k053936_ctrl_w );
READ16_DEVICE_HANDLER( k053936_ctrl_r ); // FIXME: this is probably unused... to be checked!
WRITE16_DEVICE_HANDLER( k053936_linectrl_w );
READ16_DEVICE_HANDLER( k053936_linectrl_r );
-void k053936_zoom_draw(device_t *device, bitmap_t *bitmap, const rectangle &cliprect, tilemap_t *tmap, int flags, UINT32 priority, int glfgreat_hack);
+void k053936_zoom_draw(device_t *device, bitmap_t &bitmap, const rectangle &cliprect, tilemap_t *tmap, int flags, UINT32 priority, int glfgreat_hack);
void k053936_wraparound_enable(device_t *device, int status); // shall we merge this into the configuration intf?
void k053936_set_offset(device_t *device, int xoffs, int yoffs); // shall we merge this into the configuration intf?
@@ -579,8 +579,8 @@ WRITE8_DEVICE_HANDLER( k056832_w );
WRITE8_DEVICE_HANDLER( k056832_b_w );
void k056832_mark_plane_dirty(device_t *device, int num);
void k056832_mark_all_tmaps_dirty(device_t *device);
-void k056832_tilemap_draw(device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int num, UINT32 flags, UINT32 priority);
-void k056832_tilemap_draw_dj(device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int layer, UINT32 flags, UINT32 priority);
+void k056832_tilemap_draw(device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int num, UINT32 flags, UINT32 priority);
+void k056832_tilemap_draw_dj(device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int layer, UINT32 flags, UINT32 priority);
void k056832_set_layer_association(device_t *device, int status);
int k056832_get_layer_association(device_t *device);
void k056832_set_layer_offs(device_t *device, int layer, int offsx, int offsy);
@@ -691,8 +691,8 @@ WRITE16_DEVICE_HANDLER( k054338_word_w ); // "CLCT" registers
WRITE32_DEVICE_HANDLER( k054338_long_w );
int k054338_register_r(device_t *device, int reg);
void k054338_update_all_shadows(device_t *device, int rushingheroes_hack); // called at the beginning of SCREEN_UPDATE()
-void k054338_fill_solid_bg(device_t *device, bitmap_t *bitmap); // solid backcolor fill
-void k054338_fill_backcolor(device_t *device, bitmap_t *bitmap, int mode); // unified fill, 0=solid, 1=gradient (by using a k055555)
+void k054338_fill_solid_bg(device_t *device, bitmap_t &bitmap); // solid backcolor fill
+void k054338_fill_backcolor(device_t *device, bitmap_t &bitmap, int mode); // unified fill, 0=solid, 1=gradient (by using a k055555)
int k054338_set_alpha_level(device_t *device, int pblend); // blend style 0-2
void k054338_invert_alpha(device_t *device, int invert); // 0=0x00(invis)-0x1f(solid), 1=0x1f(invis)-0x00(solod)
//void K054338_export_config(device_t *device, int **shdRGB);
@@ -720,7 +720,7 @@ WRITE32_DEVICE_HANDLER( k001006_w );
/** Konami 001005 **/
-void k001005_draw(device_t *device, bitmap_t *bitmap, const rectangle &cliprect);
+void k001005_draw(device_t *device, bitmap_t &bitmap, const rectangle &cliprect);
void k001005_swap_buffers(device_t *device);
void k001005_preprocess_texture_data(UINT8 *rom, int length, int gticlub);
@@ -729,8 +729,8 @@ WRITE32_DEVICE_HANDLER( k001005_w );
/** Konami 001604 **/
-void k001604_draw_back_layer( device_t *device, bitmap_t *bitmap, const rectangle &cliprect );
-void k001604_draw_front_layer( device_t *device, bitmap_t *bitmap, const rectangle &cliprect );
+void k001604_draw_back_layer( device_t *device, bitmap_t &bitmap, const rectangle &cliprect );
+void k001604_draw_front_layer( device_t *device, bitmap_t &bitmap, const rectangle &cliprect );
WRITE32_DEVICE_HANDLER( k001604_tile_w );
READ32_DEVICE_HANDLER( k001604_tile_r );
WRITE32_DEVICE_HANDLER( k001604_char_w );
@@ -740,7 +740,7 @@ READ32_DEVICE_HANDLER( k001604_reg_r );
/** Konami 037122 **/
-void k037122_tile_draw( device_t *device, bitmap_t *bitmap, const rectangle &cliprect );
+void k037122_tile_draw( device_t *device, bitmap_t &bitmap, const rectangle &cliprect );
READ32_DEVICE_HANDLER( k037122_sram_r );
WRITE32_DEVICE_HANDLER( k037122_sram_w );
READ32_DEVICE_HANDLER( k037122_char_r );
diff --git a/src/mame/video/ksayakyu.c b/src/mame/video/ksayakyu.c
index e2956dc6d1e..2221cf4644a 100644
--- a/src/mame/video/ksayakyu.c
+++ b/src/mame/video/ksayakyu.c
@@ -81,7 +81,7 @@ static TILE_GET_INFO( get_text_tile_info )
[3]
*/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
ksayakyu_state *state = machine.driver_data<ksayakyu_state>();
const UINT8 *source = state->m_spriteram + state->m_spriteram_size - 4;
@@ -128,7 +128,7 @@ SCREEN_UPDATE(ksayakyu)
{
ksayakyu_state *state = screen.machine().driver_data<ksayakyu_state>();
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
if (state->m_video_ctrl & 1)
tilemap_draw(bitmap, cliprect,state->m_tilemap, 0, 0);
diff --git a/src/mame/video/kyugo.c b/src/mame/video/kyugo.c
index a9c0c11ad60..60894f91d94 100644
--- a/src/mame/video/kyugo.c
+++ b/src/mame/video/kyugo.c
@@ -160,7 +160,7 @@ WRITE8_HANDLER( kyugo_flipscreen_w )
*
*************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
kyugo_state *state = machine.driver_data<kyugo_state>();
diff --git a/src/mame/video/labyrunr.c b/src/mame/video/labyrunr.c
index dbcd6ff6e67..df257ccb0d0 100644
--- a/src/mame/video/labyrunr.c
+++ b/src/mame/video/labyrunr.c
@@ -188,8 +188,8 @@ SCREEN_UPDATE( labyrunr )
set_pens(screen.machine());
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
if (~k007121_ctrlram_r(state->m_k007121, 3) & 0x20)
{
diff --git a/src/mame/video/ladybug.c b/src/mame/video/ladybug.c
index 4570dd15c04..afd37d2adb8 100644
--- a/src/mame/video/ladybug.c
+++ b/src/mame/video/ladybug.c
@@ -231,7 +231,7 @@ VIDEO_START( sraider )
tilemap_set_transparent_pen(state->m_bg_tilemap, 0);
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
ladybug_state *state = machine.driver_data<ladybug_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -288,7 +288,7 @@ SCREEN_UPDATE( ladybug )
int offs;
// clear the bg bitmap
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
for (offs = 0; offs < 32; offs++)
{
@@ -333,7 +333,7 @@ SCREEN_UPDATE( sraider )
}
// clear the bg bitmap
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
// draw the stars
if (flip_screen_get(screen.machine()))
@@ -357,7 +357,7 @@ SCREEN_UPDATE( sraider )
if (flip_screen_get(screen.machine()))
x = ~x;
- bitmap->plot_box(x, cliprect.min_y, 1, height, 0x81);
+ bitmap.plot_box(x, cliprect.min_y, 1, height, 0x81);
}
}
diff --git a/src/mame/video/ladyfrog.c b/src/mame/video/ladyfrog.c
index 5f906ed1221..8a81e31629d 100644
--- a/src/mame/video/ladyfrog.c
+++ b/src/mame/video/ladyfrog.c
@@ -103,7 +103,7 @@ WRITE8_HANDLER( ladyfrog_scrlram_w )
tilemap_set_scrolly(state->m_bg_tilemap, offset, data);
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
ladyfrog_state *state = machine.driver_data<ladyfrog_state>();
int i;
diff --git a/src/mame/video/lasso.c b/src/mame/video/lasso.c
index c07f3abcd29..30f77db4d34 100644
--- a/src/mame/video/lasso.c
+++ b/src/mame/video/lasso.c
@@ -272,7 +272,7 @@ WRITE8_HANDLER( pinbo_video_control_w )
*
*************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int reverse )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int reverse )
{
lasso_state *state = machine.driver_data<lasso_state>();
const UINT8 *finish, *source;
@@ -326,7 +326,7 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
}
-static void draw_lasso( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_lasso( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
lasso_state *state = machine.driver_data<lasso_state>();
offs_t offs;
@@ -354,7 +354,7 @@ static void draw_lasso( running_machine &machine, bitmap_t *bitmap, const rectan
for (bit = 0; bit < 8; bit++)
{
if ((data & 0x80) && (x >= cliprect.min_x) && (x <= cliprect.max_x))
- bitmap->pix16(y, x) = pen;
+ bitmap.pix16(y, x) = pen;
if (flip_screen_x_get(machine))
x = x - 1;
@@ -371,7 +371,7 @@ SCREEN_UPDATE( lasso )
{
lasso_state *state = screen.machine().driver_data<lasso_state>();
palette_set_color(screen.machine(), 0, get_color(*state->m_back_color));
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
draw_lasso(screen.machine(), bitmap, cliprect);
@@ -384,7 +384,7 @@ SCREEN_UPDATE( chameleo )
{
lasso_state *state = screen.machine().driver_data<lasso_state>();
palette_set_color(screen.machine(), 0, get_color(*state->m_back_color));
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
draw_sprites(screen.machine(), bitmap, cliprect, 0);
@@ -405,7 +405,7 @@ SCREEN_UPDATE( wwjgtin )
if (state->m_track_enable)
tilemap_draw(bitmap, cliprect, state->m_track_tilemap, 0, 0);
else
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
draw_sprites(screen.machine(), bitmap, cliprect, 1); // reverse order
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
diff --git a/src/mame/video/lastduel.c b/src/mame/video/lastduel.c
index ffb7faa71be..0ad5ebc1501 100644
--- a/src/mame/video/lastduel.c
+++ b/src/mame/video/lastduel.c
@@ -218,7 +218,7 @@ WRITE16_HANDLER( lastduel_palette_word_w )
***************************************************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int pri )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int pri )
{
lastduel_state *state = machine.driver_data<lastduel_state>();
diff --git a/src/mame/video/lazercmd.c b/src/mame/video/lazercmd.c
index 59091fc4b8f..b1d36c79311 100644
--- a/src/mame/video/lazercmd.c
+++ b/src/mame/video/lazercmd.c
@@ -24,7 +24,7 @@ static int vert_scale(int data)
/* plot a bitmap marker */
/* hardware has 2 marker sizes 2x2 and 4x2 selected by jumper */
/* meadows lanes normaly use 2x2 pixels and lazer command uses either */
-static void plot_pattern( running_machine &machine, bitmap_t *bitmap, int x, int y )
+static void plot_pattern( running_machine &machine, bitmap_t &bitmap, int x, int y )
{
int xbit, ybit, size;
@@ -44,7 +44,7 @@ static void plot_pattern( running_machine &machine, bitmap_t *bitmap, int x, int
if (x + xbit < 0 || x + xbit >= HORZ_RES * HORZ_CHR)
continue;
- bitmap->pix16(y + ybit, x + xbit) = 4;
+ bitmap.pix16(y + ybit, x + xbit) = 4;
}
}
}
diff --git a/src/mame/video/legionna.c b/src/mame/video/legionna.c
index 8af297e73f4..ee6b9dc1f4c 100644
--- a/src/mame/video/legionna.c
+++ b/src/mame/video/legionna.c
@@ -251,7 +251,7 @@ VIDEO_START(godzilla)
*************************************************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect)
{
legionna_state *state = machine.driver_data<legionna_state>();
UINT16 *spriteram16 = machine.generic.spriteram.u16;
@@ -428,8 +428,8 @@ SCREEN_UPDATE( legionna )
tilemap_set_scrollx( state->m_text_layer, 0, 0/*state->m_scrollram16[6]*/ );
tilemap_set_scrolly( state->m_text_layer, 0, 0/*state->m_scrollram16[7]*/ );
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(get_black_pen(screen.machine()), cliprect); /* wrong color? */
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect); /* wrong color? */
/* state->m_layer_disable is a guess based on 'stage 1' screen in heatbrl */
@@ -461,8 +461,8 @@ SCREEN_UPDATE( godzilla )
tilemap_set_scrolly( state->m_text_layer, 0, 0/*state->m_scrollram16[7]*/ );
- bitmap->fill(0x0200, cliprect);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ bitmap.fill(0x0200, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
if (!(state->m_layer_disable&0x0001)) tilemap_draw(bitmap,cliprect,state->m_background_layer,0,0);
if (!(state->m_layer_disable&0x0002)) tilemap_draw(bitmap,cliprect,state->m_midground_layer,0,0);
@@ -487,8 +487,8 @@ SCREEN_UPDATE( grainbow )
tilemap_set_scrollx( state->m_text_layer, 0, 0/*state->m_scrollram16[6]*/ );
tilemap_set_scrolly( state->m_text_layer, 0, 0/*state->m_scrollram16[7]*/ );
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
if(!(state->m_layer_disable & 1))
tilemap_draw(bitmap,cliprect,state->m_background_layer,0,1);
diff --git a/src/mame/video/leland.c b/src/mame/video/leland.c
index faa06f18a48..80edd9646d5 100644
--- a/src/mame/video/leland.c
+++ b/src/mame/video/leland.c
@@ -405,7 +405,7 @@ static SCREEN_UPDATE( leland )
int x;
UINT8 fg_data = 0;
- UINT16 *dst = &bitmap->pix16(y);
+ UINT16 *dst = &bitmap.pix16(y);
UINT8 *fg_src = &state->m_video_ram[y << 8];
/* for each pixel on the scanline */
@@ -472,7 +472,7 @@ static SCREEN_UPDATE( ataxx )
int x;
UINT8 fg_data = 0;
- UINT16 *dst = &bitmap->pix16(y);
+ UINT16 *dst = &bitmap.pix16(y);
UINT8 *fg_src = &state->m_video_ram[y << 8];
/* for each pixel on the scanline */
diff --git a/src/mame/video/lemmings.c b/src/mame/video/lemmings.c
index cb75572eba6..2d37685f806 100644
--- a/src/mame/video/lemmings.c
+++ b/src/mame/video/lemmings.c
@@ -15,7 +15,7 @@
#include "emu.h"
#include "includes/lemmings.h"
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, UINT16 *spritedata, int gfxbank, UINT16 pri )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, UINT16 *spritedata, int gfxbank, UINT16 pri )
{
int offs;
@@ -176,20 +176,20 @@ SCREEN_UPDATE( lemmings )
rect.max_y = cliprect.max_y;
rect.min_y = cliprect.min_y;
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
draw_sprites(screen.machine(), bitmap, cliprect, state->m_sprite_triple_buffer_1, 1, 0x0000);
/* Pixel layer can be windowed in hardware (two player mode) */
if ((state->m_control_data[6] & 2) == 0)
- copyscrollbitmap_trans(bitmap, state->m_bitmap0, 1, &x1, 1, &y, cliprect, 0x100);
+ copyscrollbitmap_trans(bitmap, *state->m_bitmap0, 1, &x1, 1, &y, cliprect, 0x100);
else
{
rect.max_x = 159;
rect.min_x = 0;
- copyscrollbitmap_trans(bitmap, state->m_bitmap0, 1, &x0, 1, &y, rect, 0x100);
+ copyscrollbitmap_trans(bitmap, *state->m_bitmap0, 1, &x0, 1, &y, rect, 0x100);
rect.max_x = 319;
rect.min_x = 160;
- copyscrollbitmap_trans(bitmap, state->m_bitmap0, 1, &x1, 1, &y, rect, 0x100);
+ copyscrollbitmap_trans(bitmap, *state->m_bitmap0, 1, &x1, 1, &y, rect, 0x100);
}
draw_sprites(screen.machine(), bitmap, cliprect, state->m_sprite_triple_buffer_0, 0, 0x0000);
draw_sprites(screen.machine(), bitmap, cliprect, state->m_sprite_triple_buffer_1, 1, 0x2000);
diff --git a/src/mame/video/lethal.c b/src/mame/video/lethal.c
index 3d287ecc141..aae186f8c33 100644
--- a/src/mame/video/lethal.c
+++ b/src/mame/video/lethal.c
@@ -106,8 +106,8 @@ SCREEN_UPDATE(lethalen)
{
lethal_state *state = screen.machine().driver_data<lethal_state>();
- bitmap->fill(7168, cliprect);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ bitmap.fill(7168, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
k056832_tilemap_draw(state->m_k056832, bitmap, cliprect, 3, K056832_DRAW_FLAG_MIRROR, 1);
k056832_tilemap_draw(state->m_k056832, bitmap, cliprect, 2, K056832_DRAW_FLAG_MIRROR, 2);
diff --git a/src/mame/video/lethalj.c b/src/mame/video/lethalj.c
index 6c0ae9ea1ad..75a44750767 100644
--- a/src/mame/video/lethalj.c
+++ b/src/mame/video/lethalj.c
@@ -171,11 +171,11 @@ WRITE16_HANDLER( lethalj_blitter_w )
*
*************************************/
-void lethalj_scanline_update(screen_device &screen, bitmap_t *bitmap, int scanline, const tms34010_display_params *params)
+void lethalj_scanline_update(screen_device &screen, bitmap_t &bitmap, int scanline, const tms34010_display_params *params)
{
lethalj_state *state = screen.machine().driver_data<lethalj_state>();
UINT16 *src = &state->m_screenram[(state->m_vispage << 17) | ((params->rowaddr << 9) & 0x3fe00)];
- UINT16 *dest = &bitmap->pix16(scanline);
+ UINT16 *dest = &bitmap.pix16(scanline);
int coladdr = params->coladdr << 1;
int x;
diff --git a/src/mame/video/liberate.c b/src/mame/video/liberate.c
index bb9dc9d7ccf..87e6d808847 100644
--- a/src/mame/video/liberate.c
+++ b/src/mame/video/liberate.c
@@ -14,7 +14,7 @@
#include "includes/liberate.h"
#if 0
-void debug_print(bitmap_t *bitmap)
+void debug_print(bitmap_t &bitmap)
{
int i, j;
char buf[20 * 16];
@@ -290,7 +290,7 @@ PALETTE_INIT( liberate )
/***************************************************************************/
-static void liberate_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void liberate_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
liberate_state *state = machine.driver_data<liberate_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -359,7 +359,7 @@ static void liberate_draw_sprites( running_machine &machine, bitmap_t *bitmap, c
}
}
-static void prosport_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void prosport_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
liberate_state *state = machine.driver_data<liberate_state>();
int offs, multi, fx, fy, sx, sy, sy2, code, code2, color, gfx_region;
@@ -424,7 +424,7 @@ static void prosport_draw_sprites( running_machine &machine, bitmap_t *bitmap, c
}
}
-static void boomrang_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int pri )
+static void boomrang_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int pri )
{
liberate_state *state = machine.driver_data<liberate_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -485,7 +485,7 @@ static void boomrang_draw_sprites( running_machine &machine, bitmap_t *bitmap, c
}
}
-static void prosoccr_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void prosoccr_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
liberate_state *state = machine.driver_data<liberate_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -519,7 +519,7 @@ SCREEN_UPDATE( prosoccr )
tilemap_set_scrollx(state->m_back_tilemap, 0, -state->m_io_ram[0]);
if (state->m_background_disable)
- bitmap->fill(32, cliprect);
+ bitmap.fill(32, cliprect);
else
tilemap_draw(bitmap, cliprect, state->m_back_tilemap, 0, 0);
@@ -537,7 +537,7 @@ SCREEN_UPDATE( prosport )
int mx, my, tile, offs, gfx_region;
int scrollx, scrolly;
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
offs = 0;
/* TODO: what's bits 0 and 2 for? Internal scrolling state? */
@@ -580,7 +580,7 @@ SCREEN_UPDATE( boomrang )
tilemap_set_scrollx(state->m_back_tilemap, 0, -state->m_io_ram[0]);
if (state->m_background_disable)
- bitmap->fill(32, cliprect);
+ bitmap.fill(32, cliprect);
else
tilemap_draw(bitmap, cliprect, state->m_back_tilemap, TILEMAP_DRAW_LAYER1, 0);
@@ -600,7 +600,7 @@ SCREEN_UPDATE( liberate )
tilemap_set_scrollx(state->m_back_tilemap, 0, -state->m_io_ram[0]);
if (state->m_background_disable)
- bitmap->fill(32, cliprect);
+ bitmap.fill(32, cliprect);
else
tilemap_draw(bitmap, cliprect, state->m_back_tilemap, 0, 0);
diff --git a/src/mame/video/lkage.c b/src/mame/video/lkage.c
index 746a7f7c12c..46a87c15b69 100644
--- a/src/mame/video/lkage.c
+++ b/src/mame/video/lkage.c
@@ -104,7 +104,7 @@ VIDEO_START( lkage )
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
lkage_state *state = machine.driver_data<lkage_state>();
const UINT8 *source = state->m_spriteram;
@@ -215,7 +215,7 @@ SCREEN_UPDATE( lkage )
tilemap_set_scrollx(state->m_bg_tilemap, 0, state->m_scroll[4]);
tilemap_set_scrolly(state->m_bg_tilemap, 0, state->m_scroll[5]);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
if ((state->m_vreg[2] & 0xf0) == 0xf0)
{
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 1);
diff --git a/src/mame/video/lockon.c b/src/mame/video/lockon.c
index 5da5de3f8ad..7a81d12ff50 100644
--- a/src/mame/video/lockon.c
+++ b/src/mame/video/lockon.c
@@ -698,7 +698,7 @@ do { \
if (carry) --CNT; \
} while(0)
-static void rotate_draw( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void rotate_draw( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
lockon_state *state = machine.driver_data<lockon_state>();
UINT32 y;
@@ -725,7 +725,7 @@ static void rotate_draw( running_machine &machine, bitmap_t *bitmap, const recta
for (y = 0; y <= cliprect.max_y; ++y)
{
UINT32 carry;
- UINT16 *dst = &bitmap->pix16(y);
+ UINT16 *dst = &bitmap.pix16(y);
UINT32 x;
UINT32 cx = cxy;
@@ -803,7 +803,7 @@ static void rotate_draw( running_machine &machine, bitmap_t *bitmap, const recta
*******************************************************************************************/
-static void hud_draw( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void hud_draw( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
lockon_state *state = machine.driver_data<lockon_state>();
UINT8 *tile_rom = machine.region("gfx3")->base();
@@ -885,7 +885,7 @@ static void hud_draw( running_machine &machine, bitmap_t *bitmap, const rectangl
if (x <= cliprect.max_x)
{
- UINT16 *dst = &bitmap->pix16(y, x);
+ UINT16 *dst = &bitmap.pix16(y, x);
if (BIT(gfx_strip, px ^ 7) && *dst > 255)
*dst = colour;
@@ -936,7 +936,7 @@ SCREEN_UPDATE( lockon )
/* If screen output is disabled, fill with black */
if (!BIT(state->m_ctrl_reg, 7))
{
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
return 0;
}
diff --git a/src/mame/video/lordgun.c b/src/mame/video/lordgun.c
index 2dfac1eed19..8edf37097df 100644
--- a/src/mame/video/lordgun.c
+++ b/src/mame/video/lordgun.c
@@ -243,7 +243,7 @@ void lordgun_update_gun(running_machine &machine, int i)
***************************************************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
lordgun_state *state = machine.driver_data<lordgun_state>();
UINT16 *s = state->m_spriteram;
@@ -346,7 +346,7 @@ SCREEN_UPDATE( lordgun )
if (state->m_whitescreen)
{
- bitmap->fill(get_white_pen(screen.machine()), cliprect);
+ bitmap.fill(get_white_pen(screen.machine()), cliprect);
return 0;
}
@@ -378,11 +378,11 @@ SCREEN_UPDATE( lordgun )
for (l = 0; l < 5; l++)
state->m_bitmaps[l]->fill(trans_pen, cliprect);
- if (layers_ctrl & 1) tilemap_draw(state->m_bitmaps[0], cliprect, state->m_tilemap[0], 0, 0);
- if (layers_ctrl & 2) tilemap_draw(state->m_bitmaps[1], cliprect, state->m_tilemap[1], 0, 0);
- if (layers_ctrl & 4) tilemap_draw(state->m_bitmaps[2], cliprect, state->m_tilemap[2], 0, 0);
- if (layers_ctrl & 8) tilemap_draw(state->m_bitmaps[3], cliprect, state->m_tilemap[3], 0, 0);
- if (layers_ctrl & 16) draw_sprites(screen.machine(), state->m_bitmaps[4], cliprect);
+ if (layers_ctrl & 1) tilemap_draw(*state->m_bitmaps[0], cliprect, state->m_tilemap[0], 0, 0);
+ if (layers_ctrl & 2) tilemap_draw(*state->m_bitmaps[1], cliprect, state->m_tilemap[1], 0, 0);
+ if (layers_ctrl & 4) tilemap_draw(*state->m_bitmaps[2], cliprect, state->m_tilemap[2], 0, 0);
+ if (layers_ctrl & 8) tilemap_draw(*state->m_bitmaps[3], cliprect, state->m_tilemap[3], 0, 0);
+ if (layers_ctrl & 16) draw_sprites(screen.machine(), *state->m_bitmaps[4], cliprect);
// copy to screen bitmap
@@ -420,7 +420,7 @@ SCREEN_UPDATE( lordgun )
l = pri2layer[state->m_priority_ram[pri_addr] & 7];
- bitmap->pix16(y, x) = pens[l];
+ bitmap.pix16(y, x) = pens[l];
}
}
diff --git a/src/mame/video/lsasquad.c b/src/mame/video/lsasquad.c
index d4f7b29b046..edd6a8f9b40 100644
--- a/src/mame/video/lsasquad.c
+++ b/src/mame/video/lsasquad.c
@@ -1,7 +1,7 @@
#include "emu.h"
#include "includes/lsasquad.h"
-static void draw_layer( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, UINT8 *scrollram )
+static void draw_layer( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, UINT8 *scrollram )
{
lsasquad_state *state = machine.driver_data<lsasquad_state>();
int offs, scrollx, scrolly;
@@ -48,7 +48,7 @@ static void draw_layer( running_machine &machine, bitmap_t *bitmap, const rectan
}
}
-static int draw_layer_daikaiju( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int offs, int * previd, int type )
+static int draw_layer_daikaiju( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int offs, int * previd, int type )
{
lsasquad_state *state = machine.driver_data<lsasquad_state>();
int id, scrollx, scrolly, initoffs, globalscrollx;
@@ -138,7 +138,7 @@ static int draw_layer_daikaiju( running_machine &machine, bitmap_t *bitmap, cons
return offs;
}
-static void drawbg( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int type )
+static void drawbg( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int type )
{
lsasquad_state *state = machine.driver_data<lsasquad_state>();
int i = 0;
@@ -158,7 +158,7 @@ static void drawbg( running_machine &machine, bitmap_t *bitmap, const rectangle
}
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
lsasquad_state *state = machine.driver_data<lsasquad_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -201,7 +201,7 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
SCREEN_UPDATE( lsasquad )
{
lsasquad_state *state = screen.machine().driver_data<lsasquad_state>();
- bitmap->fill(511, cliprect);
+ bitmap.fill(511, cliprect);
draw_layer(screen.machine(), bitmap, cliprect, state->m_scrollram + 0x000);
draw_layer(screen.machine(), bitmap, cliprect, state->m_scrollram + 0x080);
@@ -213,7 +213,7 @@ SCREEN_UPDATE( lsasquad )
SCREEN_UPDATE( daikaiju )
{
- bitmap->fill(511, cliprect);
+ bitmap.fill(511, cliprect);
drawbg(screen.machine(), bitmap, cliprect, 0); // bottom
draw_sprites(screen.machine(), bitmap, cliprect);
drawbg(screen.machine(), bitmap, cliprect, 1); // top = pallete $d ?
diff --git a/src/mame/video/lwings.c b/src/mame/video/lwings.c
index 959a96c6d0e..01a2cc45fdd 100644
--- a/src/mame/video/lwings.c
+++ b/src/mame/video/lwings.c
@@ -184,7 +184,7 @@ INLINE int is_sprite_on( UINT8 *buffered_spriteram, int offs )
return sx || sy;
}
-static void lwings_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void lwings_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
UINT8 *buffered_spriteram = machine.generic.buffered_spriteram.u8;
int offs;
@@ -220,7 +220,7 @@ static void lwings_draw_sprites( running_machine &machine, bitmap_t *bitmap, con
}
}
-static void trojan_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void trojan_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
lwings_state *state = machine.driver_data<lwings_state>();
UINT8 *buffered_spriteram = machine.generic.buffered_spriteram.u8;
diff --git a/src/mame/video/m10.c b/src/mame/video/m10.c
index f2ec9e6492a..34d4fde0e8e 100644
--- a/src/mame/video/m10.c
+++ b/src/mame/video/m10.c
@@ -92,14 +92,14 @@ WRITE8_HANDLER( m15_chargen_w )
}
-INLINE void plot_pixel_m10( running_machine &machine, bitmap_t *bm, int x, int y, int col )
+INLINE void plot_pixel_m10( running_machine &machine, bitmap_t &bm, int x, int y, int col )
{
m10_state *state = machine.driver_data<m10_state>();
if (!state->m_flip)
- bm->pix16(y, x) = col;
+ bm.pix16(y, x) = col;
else
- bm->pix16((IREMM10_VBSTART - 1) - (y - IREMM10_VBEND) + 6,
+ bm.pix16((IREMM10_VBSTART - 1) - (y - IREMM10_VBEND) + 6,
(IREMM10_HBSTART - 1) - (x - IREMM10_HBEND)) = col; // only when flip_screen(?)
}
@@ -145,7 +145,7 @@ SCREEN_UPDATE( m10 )
static const int xpos[4] = { 4*8, 26*8, 7*8, 6*8};
int i;
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
for (i = 0; i < 4; i++)
if (state->m_flip)
diff --git a/src/mame/video/m107.c b/src/mame/video/m107.c
index f66dadcb1ea..dea733b64e2 100644
--- a/src/mame/video/m107.c
+++ b/src/mame/video/m107.c
@@ -150,7 +150,7 @@ VIDEO_START( m107 )
/*****************************************************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
m107_state *state = machine.driver_data<m107_state>();
UINT16 *spriteram = state->m_buffered_spriteram;
@@ -313,7 +313,7 @@ static void m107_update_scroll_positions(running_machine &machine)
/*****************************************************************************/
-static void m107_tilemap_draw(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int laynum, int category,int opaque)
+static void m107_tilemap_draw(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int laynum, int category,int opaque)
{
m107_state *state = machine.driver_data<m107_state>();
int line;
@@ -342,10 +342,10 @@ static void m107_tilemap_draw(running_machine &machine, bitmap_t *bitmap, const
}
-static void m107_screenrefresh(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void m107_screenrefresh(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
m107_state *state = machine.driver_data<m107_state>();
- machine.priority_bitmap->fill(0, cliprect);
+ machine.priority_bitmap.fill(0, cliprect);
if ((~state->m_control[0x0b] >> 7) & 1)
{
@@ -353,7 +353,7 @@ static void m107_screenrefresh(running_machine &machine, bitmap_t *bitmap, const
m107_tilemap_draw(machine, bitmap, cliprect, 3, 1,0);
}
else
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
/* note: the opaque flag is used if layer 3 is disabled, noticeable in World PK Soccer title and gameplay screens */
m107_tilemap_draw(machine, bitmap, cliprect, 2, 0,(((state->m_control[0x0b] >> 7) & 1) ? TILEMAP_DRAW_OPAQUE : 0));
diff --git a/src/mame/video/m52.c b/src/mame/video/m52.c
index 3a5aee4866b..ef8e26e3489 100644
--- a/src/mame/video/m52.c
+++ b/src/mame/video/m52.c
@@ -303,7 +303,7 @@ WRITE8_HANDLER( alpha1v_flipscreen_w )
*
*************************************/
-static void draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int xpos, int ypos, int image)
+static void draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int xpos, int ypos, int image)
{
rectangle rect;
const rectangle &visarea = machine.primary_screen->visible_area();
@@ -349,7 +349,7 @@ static void draw_background(running_machine &machine, bitmap_t *bitmap, const re
rect.max_y = ypos + 2 * BGHEIGHT - 1;
}
- bitmap->fill(machine.gfx[image]->color_base + 3, rect);
+ bitmap.fill(machine.gfx[image]->color_base + 3, rect);
}
@@ -365,7 +365,7 @@ SCREEN_UPDATE( m52 )
m52_state *state = screen.machine().driver_data<m52_state>();
int offs;
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
if (!(state->m_bgcontrol & 0x20))
{
diff --git a/src/mame/video/m57.c b/src/mame/video/m57.c
index b44c541f342..ebb05d89952 100644
--- a/src/mame/video/m57.c
+++ b/src/mame/video/m57.c
@@ -177,7 +177,7 @@ WRITE8_HANDLER( m57_flipscreen_w )
*
*************************************/
-static void draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
m57_state *state = machine.driver_data<m57_state>();
int y,x;
@@ -199,17 +199,17 @@ static void draw_background(running_machine &machine, bitmap_t *bitmap, const re
for (x = cliprect.min_x; x <= cliprect.max_x; x++)
{
if ((x + scrolly) <= cliprect.max_x)
- bitmap->pix16(y, x) = bitmap->pix16(y, x + scrolly);
+ bitmap.pix16(y, x) = bitmap.pix16(y, x + scrolly);
else
- bitmap->pix16(y, x) = bitmap->pix16(y, cliprect.max_x);
+ bitmap.pix16(y, x) = bitmap.pix16(y, cliprect.max_x);
}
} else {
for (x = cliprect.max_x; x >= cliprect.min_x; x--)
{
if ((x + scrolly) >= cliprect.min_x)
- bitmap->pix16(y, x) = bitmap->pix16(y, x + scrolly);
+ bitmap.pix16(y, x) = bitmap.pix16(y, x + scrolly);
else
- bitmap->pix16(y, x) = bitmap->pix16(y, cliprect.min_x);
+ bitmap.pix16(y, x) = bitmap.pix16(y, cliprect.min_x);
}
}
}
@@ -221,7 +221,7 @@ static void draw_background(running_machine &machine, bitmap_t *bitmap, const re
*
*************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
m57_state *state = machine.driver_data<m57_state>();
int offs;
diff --git a/src/mame/video/m58.c b/src/mame/video/m58.c
index 8876e0748dc..f8db6468d8a 100644
--- a/src/mame/video/m58.c
+++ b/src/mame/video/m58.c
@@ -219,7 +219,7 @@ WRITE8_HANDLER( yard_flipscreen_w )
#define DRAW_SPRITE(code, sy) drawgfx_transmask(bitmap, cliprect, machine.gfx[1], code, color, flipx, flipy, sx, sy, colortable_get_transpen_mask(machine.colortable, machine.gfx[1], color, 512));
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
m58_state *state = machine.driver_data<m58_state>();
int offs;
@@ -274,7 +274,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const recta
*
*************************************/
-static void draw_panel( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_panel( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
m58_state *state = machine.driver_data<m58_state>();
@@ -291,7 +291,7 @@ static void draw_panel( running_machine &machine, bitmap_t *bitmap, const rectan
clip.max_y += visarea.max_y + yoffs;
clip &= cliprect;
- copybitmap(bitmap, state->m_scroll_panel_bitmap, flip_screen_get(machine), flip_screen_get(machine),
+ copybitmap(bitmap, *state->m_scroll_panel_bitmap, flip_screen_get(machine), flip_screen_get(machine),
sx, visarea.min_y + yoffs, clip);
}
}
diff --git a/src/mame/video/m62.c b/src/mame/video/m62.c
index 1444f237501..1d0e5a06cc7 100644
--- a/src/mame/video/m62.c
+++ b/src/mame/video/m62.c
@@ -353,7 +353,7 @@ WRITE8_HANDLER( m62_textram_w )
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int colormask, int prioritymask, int priority )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int colormask, int prioritymask, int priority )
{
m62_state *state = machine.driver_data<m62_state>();
int offs;
@@ -580,11 +580,11 @@ SCREEN_UPDATE( ldrun3 )
my_cliprect.min_y = 0 * 8;
my_cliprect.max_y = 1 * 8 - 1;
- bitmap->fill(get_black_pen(screen.machine()), my_cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), my_cliprect);
my_cliprect.min_y = 31 * 8;
my_cliprect.max_y = 32 * 8 - 1;
- bitmap->fill(get_black_pen(screen.machine()), my_cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), my_cliprect);
}
return 0;
diff --git a/src/mame/video/m72.c b/src/mame/video/m72.c
index b1ec2a4f0ba..93a7fb2b9df 100644
--- a/src/mame/video/m72.c
+++ b/src/mame/video/m72.c
@@ -430,7 +430,7 @@ WRITE16_HANDLER( majtitle_gfx_ctrl_w )
***************************************************************************/
-static void m72_draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void m72_draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect)
{
m72_state *state = machine.driver_data<m72_state>();
UINT16 *spriteram = state->m_buffered_spriteram;
@@ -484,7 +484,7 @@ static void m72_draw_sprites(running_machine &machine, bitmap_t *bitmap,const re
}
}
-static void majtitle_draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void majtitle_draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect)
{
m72_state *state = machine.driver_data<m72_state>();
UINT16 *spriteram16_2 = state->m_spriteram2;
@@ -540,7 +540,7 @@ SCREEN_UPDATE( m72 )
m72_state *state = screen.machine().driver_data<m72_state>();
if (state->m_video_off)
{
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
return 0;
}
@@ -566,7 +566,7 @@ SCREEN_UPDATE( majtitle )
if (state->m_video_off)
{
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
return 0;
}
diff --git a/src/mame/video/m90.c b/src/mame/video/m90.c
index 8c4633017a2..6dfa4ae5f24 100644
--- a/src/mame/video/m90.c
+++ b/src/mame/video/m90.c
@@ -139,7 +139,7 @@ VIDEO_START( dynablsb )
state_save_register_global_array(machine, state->m_video_control_data);
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect)
{
m90_state *state = machine.driver_data<m90_state>();
UINT16 *spriteram = state->m_video_data + 0xee00/2;;
@@ -193,7 +193,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectan
}
}
-static void bomblord_draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void bomblord_draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect)
{
m90_state *state = machine.driver_data<m90_state>();
UINT16 *spriteram16 = state->m_spriteram;
@@ -233,7 +233,7 @@ static void bomblord_draw_sprites(running_machine &machine, bitmap_t *bitmap,con
}
}
-static void dynablsb_draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void dynablsb_draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect)
{
m90_state *state = machine.driver_data<m90_state>();
UINT16 *spriteram16 = state->m_spriteram;
@@ -363,7 +363,7 @@ SCREEN_UPDATE( m90 )
tilemap_set_scrollx( state->m_pf2_wide_layer,0, state->m_video_control_data[3]+256-2 );
}
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
if (video_enable)
{
@@ -410,7 +410,7 @@ SCREEN_UPDATE( m90 )
}
else
{
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
}
if (pf1_enable)
@@ -457,7 +457,7 @@ SCREEN_UPDATE( m90 )
draw_sprites(screen.machine(),bitmap,cliprect);
} else {
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
}
return 0;
@@ -467,8 +467,8 @@ SCREEN_UPDATE( bomblord )
{
m90_state *state = screen.machine().driver_data<m90_state>();
int i;
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
/* Setup scrolling */
if (state->m_video_control_data[6]&0x20) {
@@ -519,8 +519,8 @@ SCREEN_UPDATE( bomblord )
SCREEN_UPDATE( dynablsb )
{
m90_state *state = screen.machine().driver_data<m90_state>();
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
if (!(state->m_video_data[0xf008/2] & 0x4000)) {
tilemap_mark_all_tiles_dirty(state->m_pf1_wide_layer);
diff --git a/src/mame/video/m92.c b/src/mame/video/m92.c
index 7904ad2a610..08c714f4832 100644
--- a/src/mame/video/m92.c
+++ b/src/mame/video/m92.c
@@ -323,7 +323,7 @@ VIDEO_START( ppan )
/*****************************************************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
m92_state *state = machine.driver_data<m92_state>();
UINT16 *source = machine.generic.buffered_spriteram.u16;
@@ -397,7 +397,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const recta
}
// This needs a lot of work...
-static void ppan_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void ppan_draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
m92_state *state = machine.driver_data<m92_state>();
UINT16 *source = machine.generic.spriteram.u16; // sprite buffer control is never triggered
@@ -521,7 +521,7 @@ static void m92_update_scroll_positions(running_machine &machine)
/*****************************************************************************/
-static void m92_draw_tiles(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void m92_draw_tiles(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect)
{
m92_state *state = machine.driver_data<m92_state>();
@@ -547,8 +547,8 @@ static void m92_draw_tiles(running_machine &machine, bitmap_t *bitmap,const rect
SCREEN_UPDATE( m92 )
{
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(0, cliprect);
m92_update_scroll_positions(screen.machine());
m92_draw_tiles(screen.machine(), bitmap, cliprect);
@@ -564,8 +564,8 @@ SCREEN_UPDATE( m92 )
SCREEN_UPDATE( ppan )
{
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(0, cliprect);
m92_update_scroll_positions(screen.machine());
m92_draw_tiles(screen.machine(), bitmap, cliprect);
diff --git a/src/mame/video/macrossp.c b/src/mame/video/macrossp.c
index 50b0e291294..7773dacfc21 100644
--- a/src/mame/video/macrossp.c
+++ b/src/mame/video/macrossp.c
@@ -173,7 +173,7 @@ VIDEO_START( macrossp )
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int priority )
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int priority )
{
macrossp_state *state = machine.driver_data<macrossp_state>();
const gfx_element *gfx = machine.gfx[0];
@@ -320,7 +320,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const recta
}
-static void draw_layer( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int layer )
+static void draw_layer( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int layer )
{
macrossp_state *state = machine.driver_data<macrossp_state>();
tilemap_t *tm;
@@ -392,7 +392,7 @@ SCREEN_UPDATE( macrossp )
macrossp_state *state = screen.machine().driver_data<macrossp_state>();
int layers[3],layerpri[3];
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
layers[0] = 0;
layerpri[0] = (state->m_scra_videoregs[0] & 0x0000c000) >> 14;
diff --git a/src/mame/video/madalien.c b/src/mame/video/madalien.c
index 2422be22362..f9ef99928b4 100644
--- a/src/mame/video/madalien.c
+++ b/src/mame/video/madalien.c
@@ -155,12 +155,12 @@ static VIDEO_START( madalien )
gfx_element_set_source(machine.gfx[0], state->m_charram);
- drawgfx_opaque(state->m_headlight_bitmap, state->m_headlight_bitmap->cliprect(), machine.gfx[2], 0, 0, 0, 0, 0x00, 0x00);
- drawgfx_opaque(state->m_headlight_bitmap, state->m_headlight_bitmap->cliprect(), machine.gfx[2], 0, 0, 0, 1, 0x00, 0x40);
+ drawgfx_opaque(*state->m_headlight_bitmap, state->m_headlight_bitmap->cliprect(), machine.gfx[2], 0, 0, 0, 0, 0x00, 0x00);
+ drawgfx_opaque(*state->m_headlight_bitmap, state->m_headlight_bitmap->cliprect(), machine.gfx[2], 0, 0, 0, 1, 0x00, 0x40);
}
-static void draw_edges(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int flip, int scroll_mode)
+static void draw_edges(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int flip, int scroll_mode)
{
madalien_state *state = machine.driver_data<madalien_state>();
rectangle clip_edge1;
@@ -199,7 +199,7 @@ static void draw_edges(running_machine &machine, bitmap_t *bitmap, const rectang
}
-static void draw_headlight(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int flip)
+static void draw_headlight(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int flip)
{
madalien_state *state = machine.driver_data<madalien_state>();
if (BIT(*state->m_video_flags, 0))
@@ -228,14 +228,14 @@ static void draw_headlight(running_machine &machine, bitmap_t *bitmap, const rec
continue;
if (state->m_headlight_bitmap->pix16(y, x) != 0)
- bitmap->pix16(hy, hx) |= 8;
+ bitmap.pix16(hy, hx) |= 8;
}
}
}
}
-static void draw_foreground(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int flip)
+static void draw_foreground(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int flip)
{
madalien_state *state = machine.driver_data<madalien_state>();
tilemap_set_flip(state->m_tilemap_fg, flip ? TILEMAP_FLIPX | TILEMAP_FLIPY : 0);
@@ -265,7 +265,7 @@ static SCREEN_UPDATE( madalien )
// mode 3 - transition from A to B
int scroll_mode = *state->m_scroll & 3;
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
draw_edges(screen.machine(), bitmap, cliprect, flip, scroll_mode);
draw_foreground(screen.machine(), bitmap, cliprect, flip);
@@ -298,7 +298,7 @@ static SCREEN_UPDATE( madalien )
for (y = cliprect.min_y; y <= cliprect.max_y ; y++)
for (x = min_x; x <= max_x; x++)
if ((x >= cliprect.min_x) && (x <= cliprect.max_x))
- bitmap->pix16(y, x) |= 8;
+ bitmap.pix16(y, x) |= 8;
}
draw_headlight(screen.machine(), bitmap, cliprect, flip);
diff --git a/src/mame/video/magmax.c b/src/mame/video/magmax.c
index 3590cfddd03..2e25232b47a 100644
--- a/src/mame/video/magmax.c
+++ b/src/mame/video/magmax.c
@@ -96,7 +96,7 @@ SCREEN_UPDATE( magmax )
/* copy the background graphics */
if (*state->m_vreg & 0x40) /* background disable */
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
else
{
int v;
@@ -211,7 +211,7 @@ SCREEN_UPDATE( magmax )
}
if (!(*state->m_vreg & 0x40)) /* background disable */
- copybitmap_trans(bitmap, screen.machine().generic.tmpbitmap, state->m_flipscreen,state->m_flipscreen,0,0, cliprect, 0);
+ copybitmap_trans(bitmap, *screen.machine().generic.tmpbitmap, state->m_flipscreen,state->m_flipscreen,0,0, cliprect, 0);
/* draw the foreground characters */
for (offs = 32*32-1; offs >= 0; offs -= 1)
diff --git a/src/mame/video/mainevt.c b/src/mame/video/mainevt.c
index 1b5857f9486..f726be0fd63 100644
--- a/src/mame/video/mainevt.c
+++ b/src/mame/video/mainevt.c
@@ -99,7 +99,7 @@ SCREEN_UPDATE( mainevt )
k052109_tilemap_update(state->m_k052109);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
k052109_tilemap_draw(state->m_k052109, bitmap, cliprect, 1, TILEMAP_DRAW_OPAQUE, 1);
k052109_tilemap_draw(state->m_k052109, bitmap, cliprect, 2, 1, 2); /* low priority part of layer */
k052109_tilemap_draw(state->m_k052109, bitmap, cliprect, 2, 0, 4); /* high priority part of layer */
diff --git a/src/mame/video/mainsnk.c b/src/mame/video/mainsnk.c
index 776c4d2e0d7..0a99dc9b40b 100644
--- a/src/mame/video/mainsnk.c
+++ b/src/mame/video/mainsnk.c
@@ -125,7 +125,7 @@ WRITE8_HANDLER( mainsnk_bgram_w )
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int scrollx, int scrolly )
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int scrollx, int scrolly )
{
mainsnk_state *state = machine.driver_data<mainsnk_state>();
const gfx_element *gfx = machine.gfx[1];
diff --git a/src/mame/video/malzak.c b/src/mame/video/malzak.c
index 139b5da7b45..29216eb7771 100644
--- a/src/mame/video/malzak.c
+++ b/src/mame/video/malzak.c
@@ -23,10 +23,8 @@ SCREEN_UPDATE( malzak )
malzak_state *state = screen.machine().driver_data<malzak_state>();
int sx, sy;
int x,y;
- bitmap_t *s2636_0_bitmap;
- bitmap_t *s2636_1_bitmap;
- bitmap->fill(0);
+ bitmap.fill(0);
saa5050_update(state->m_saa5050, bitmap, cliprect);
saa5050_frame_advance(state->m_saa5050);
@@ -47,8 +45,8 @@ SCREEN_UPDATE( malzak )
}
/* update the S2636 chips */
- s2636_0_bitmap = s2636_update(state->m_s2636_0, cliprect);
- s2636_1_bitmap = s2636_update(state->m_s2636_1, cliprect);
+ bitmap_t &s2636_0_bitmap = s2636_update(state->m_s2636_0, cliprect);
+ bitmap_t &s2636_1_bitmap = s2636_update(state->m_s2636_1, cliprect);
/* copy the S2636 images into the main bitmap */
{
@@ -60,21 +58,21 @@ SCREEN_UPDATE( malzak )
for (x = cliprect.min_x; x <= cliprect.max_x / 2; x++)
{
- int pixel0 = s2636_0_bitmap->pix16(y, x);
- int pixel1 = s2636_1_bitmap->pix16(y, x);
+ int pixel0 = s2636_0_bitmap.pix16(y, x);
+ int pixel1 = s2636_1_bitmap.pix16(y, x);
if (S2636_IS_PIXEL_DRAWN(pixel0)) {
- bitmap->pix16(y*2, x*2) = S2636_PIXEL_COLOR(pixel0);
- bitmap->pix16(y*2+1, x*2) = S2636_PIXEL_COLOR(pixel0);
- bitmap->pix16(y*2, x*2+1) = S2636_PIXEL_COLOR(pixel0);
- bitmap->pix16(y*2+1, x*2+1) = S2636_PIXEL_COLOR(pixel0);
+ bitmap.pix16(y*2, x*2) = S2636_PIXEL_COLOR(pixel0);
+ bitmap.pix16(y*2+1, x*2) = S2636_PIXEL_COLOR(pixel0);
+ bitmap.pix16(y*2, x*2+1) = S2636_PIXEL_COLOR(pixel0);
+ bitmap.pix16(y*2+1, x*2+1) = S2636_PIXEL_COLOR(pixel0);
}
if (S2636_IS_PIXEL_DRAWN(pixel1)) {
- bitmap->pix16(y*2, x*2) = S2636_PIXEL_COLOR(pixel1);
- bitmap->pix16(y*2+1, x*2) = S2636_PIXEL_COLOR(pixel1);
- bitmap->pix16(y*2, x*2+1) = S2636_PIXEL_COLOR(pixel1);
- bitmap->pix16(y*2+1, x*2+1) = S2636_PIXEL_COLOR(pixel1);
+ bitmap.pix16(y*2, x*2) = S2636_PIXEL_COLOR(pixel1);
+ bitmap.pix16(y*2+1, x*2) = S2636_PIXEL_COLOR(pixel1);
+ bitmap.pix16(y*2, x*2+1) = S2636_PIXEL_COLOR(pixel1);
+ bitmap.pix16(y*2+1, x*2+1) = S2636_PIXEL_COLOR(pixel1);
}
}
}
diff --git a/src/mame/video/mappy.c b/src/mame/video/mappy.c
index fcc930049cb..53f17b44d84 100644
--- a/src/mame/video/mappy.c
+++ b/src/mame/video/mappy.c
@@ -399,7 +399,7 @@ WRITE8_HANDLER( mappy_scroll_w )
***************************************************************************/
-static void mappy_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, UINT8 *spriteram_base)
+static void mappy_draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, UINT8 *spriteram_base)
{
UINT8 *spriteram = spriteram_base + 0x780;
UINT8 *spriteram_2 = spriteram + 0x800;
@@ -479,7 +479,7 @@ spriteram_3
1 -------x X position MSB
*/
-static void phozon_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, UINT8 *spriteram_base)
+static void phozon_draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, UINT8 *spriteram_base)
{
UINT8 *spriteram = spriteram_base + 0x780;
UINT8 *spriteram_2 = spriteram + 0x800;
@@ -546,8 +546,8 @@ SCREEN_UPDATE( superpac )
tilemap_draw(bitmap,cliprect,state->m_bg_tilemap,TILEMAP_DRAW_OPAQUE | TILEMAP_DRAW_ALL_CATEGORIES,0);
sprite_bitmap->fill(15, cliprect);
- mappy_draw_sprites(screen.machine(),sprite_bitmap,cliprect,state->m_spriteram);
- copybitmap_trans(bitmap,sprite_bitmap,0,0,0,0,cliprect,15);
+ mappy_draw_sprites(screen.machine(),*sprite_bitmap,cliprect,state->m_spriteram);
+ copybitmap_trans(bitmap,*sprite_bitmap,0,0,0,0,cliprect,15);
/* Redraw the high priority characters */
tilemap_draw(bitmap,cliprect,state->m_bg_tilemap,1,0);
@@ -560,7 +560,7 @@ SCREEN_UPDATE( superpac )
int spr_entry = sprite_bitmap->pix16(y, x);
int spr_pen = colortable_entry_get_value(screen.machine().colortable, spr_entry);
if (spr_pen == 0 || spr_pen == 1)
- bitmap->pix16(y, x) = spr_entry;
+ bitmap.pix16(y, x) = spr_entry;
}
}
return 0;
diff --git a/src/mame/video/mario.c b/src/mame/video/mario.c
index 6d08f819322..77d771fada2 100644
--- a/src/mame/video/mario.c
+++ b/src/mame/video/mario.c
@@ -161,7 +161,7 @@ VIDEO_START( mario )
* confirmed on mametests.org as being present on real PCB as well.
*/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
/* TODO: draw_sprites should adopt the scanline logic from dkong.c
* The schematics have the same logic for sprite buffering.
diff --git a/src/mame/video/markham.c b/src/mame/video/markham.c
index 09a5111d38d..16104d5102c 100644
--- a/src/mame/video/markham.c
+++ b/src/mame/video/markham.c
@@ -73,7 +73,7 @@ VIDEO_START( markham )
tilemap_set_scroll_rows(state->m_bg_tilemap, 32);
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
markham_state *state = machine.driver_data<markham_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/matmania.c b/src/mame/video/matmania.c
index 5921fe32677..8f8410b6dba 100644
--- a/src/mame/video/matmania.c
+++ b/src/mame/video/matmania.c
@@ -140,7 +140,7 @@ SCREEN_UPDATE( matmania )
int sx = 15 - offs / 32;
int sy = offs % 32;
- drawgfx_opaque(state->m_tmpbitmap, state->m_tmpbitmap->cliprect(), screen.machine().gfx[1],
+ drawgfx_opaque(*state->m_tmpbitmap, state->m_tmpbitmap->cliprect(), screen.machine().gfx[1],
state->m_videoram[offs] + ((state->m_colorram[offs] & 0x08) << 5),
(state->m_colorram[offs] & 0x30) >> 4,
0,sy >= 16, /* flip horizontally tiles on the right half of the bitmap */
@@ -153,7 +153,7 @@ SCREEN_UPDATE( matmania )
int sx = 15 - offs / 32;
int sy = offs % 32;
- drawgfx_opaque(state->m_tmpbitmap2, state->m_tmpbitmap2->cliprect(), screen.machine().gfx[1],
+ drawgfx_opaque(*state->m_tmpbitmap2, state->m_tmpbitmap2->cliprect(), screen.machine().gfx[1],
state->m_videoram3[offs] + ((state->m_colorram3[offs] & 0x08) << 5),
(state->m_colorram3[offs] & 0x30) >> 4,
0,sy >= 16, /* flip horizontally tiles on the right half of the bitmap */
@@ -164,9 +164,9 @@ SCREEN_UPDATE( matmania )
{
int scrolly = -*state->m_scroll;
if (state->m_pageselect[0] & 0x01) // maniach sets 0x20 sometimes, which must have a different meaning
- copyscrollbitmap(bitmap, state->m_tmpbitmap2, 0, 0, 1, &scrolly, cliprect);
+ copyscrollbitmap(bitmap, *state->m_tmpbitmap2, 0, 0, 1, &scrolly, cliprect);
else
- copyscrollbitmap(bitmap, state->m_tmpbitmap, 0, 0, 1, &scrolly, cliprect);
+ copyscrollbitmap(bitmap, *state->m_tmpbitmap, 0, 0, 1, &scrolly, cliprect);
}
@@ -212,7 +212,7 @@ SCREEN_UPDATE( maniach )
int sx = 15 - offs / 32;
int sy = offs % 32;
- drawgfx_opaque(state->m_tmpbitmap, state->m_tmpbitmap->cliprect(), screen.machine().gfx[1],
+ drawgfx_opaque(*state->m_tmpbitmap, state->m_tmpbitmap->cliprect(), screen.machine().gfx[1],
state->m_videoram[offs] + ((state->m_colorram[offs] & 0x03) << 8),
(state->m_colorram[offs] & 0x30) >> 4,
0,sy >= 16, /* flip horizontally tiles on the right half of the bitmap */
@@ -225,7 +225,7 @@ SCREEN_UPDATE( maniach )
int sx = 15 - offs / 32;
int sy = offs % 32;
- drawgfx_opaque(state->m_tmpbitmap2, state->m_tmpbitmap2->cliprect(), screen.machine().gfx[1],
+ drawgfx_opaque(*state->m_tmpbitmap2, state->m_tmpbitmap2->cliprect(), screen.machine().gfx[1],
state->m_videoram3[offs] + ((state->m_colorram3[offs] & 0x03) << 8),
(state->m_colorram3[offs] & 0x30) >> 4,
0,sy >= 16, /* flip horizontally tiles on the right half of the bitmap */
@@ -238,9 +238,9 @@ SCREEN_UPDATE( maniach )
int scrolly = -*state->m_scroll;
if (state->m_pageselect[0] & 0x01) // this sets 0x20 sometimes, which must have a different meaning
- copyscrollbitmap(bitmap, state->m_tmpbitmap2, 0, 0, 1, &scrolly, cliprect);
+ copyscrollbitmap(bitmap, *state->m_tmpbitmap2, 0, 0, 1, &scrolly, cliprect);
else
- copyscrollbitmap(bitmap, state->m_tmpbitmap, 0, 0, 1, &scrolly, cliprect);
+ copyscrollbitmap(bitmap, *state->m_tmpbitmap, 0, 0, 1, &scrolly, cliprect);
}
diff --git a/src/mame/video/mcatadv.c b/src/mame/video/mcatadv.c
index ba3ce30804b..5e4c7b53820 100644
--- a/src/mame/video/mcatadv.c
+++ b/src/mame/video/mcatadv.c
@@ -53,7 +53,7 @@ WRITE16_HANDLER( mcatadv_videoram2_w )
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
mcatadv_state *state = machine.driver_data<mcatadv_state>();
UINT16 *source = state->m_spriteram_old;
@@ -123,8 +123,8 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
if ((drawypos >= cliprect.min_y) && (drawypos <= cliprect.max_y))
{
- destline = &bitmap->pix16(drawypos);
- priline = &machine.priority_bitmap->pix8(drawypos);
+ destline = &bitmap.pix16(drawypos);
+ priline = &machine.priority_bitmap.pix8(drawypos);
for (xcnt = xstart; xcnt != xend; xcnt += xinc)
{
@@ -156,7 +156,7 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
}
}
-static void mcatadv_draw_tilemap_part( UINT16* current_scroll, UINT16* current_videoram1, int i, tilemap_t* current_tilemap, bitmap_t *bitmap, const rectangle &cliprect )
+static void mcatadv_draw_tilemap_part( UINT16* current_scroll, UINT16* current_videoram1, int i, tilemap_t* current_tilemap, bitmap_t &bitmap, const rectangle &cliprect )
{
int flip;
UINT32 drawline;
@@ -205,8 +205,8 @@ SCREEN_UPDATE( mcatadv )
mcatadv_state *state = screen.machine().driver_data<mcatadv_state>();
int i;
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
if (state->m_scroll1[2] != state->m_palette_bank1)
{
diff --git a/src/mame/video/mcd212.c b/src/mame/video/mcd212.c
index df3df75d99f..a4bd1b747cf 100644
--- a/src/mame/video/mcd212.c
+++ b/src/mame/video/mcd212.c
@@ -87,8 +87,8 @@ static const UINT16 cdi220_lcd_char[20*22] =
static void cdi220_draw_lcd(running_machine &machine, int y)
{
cdi_state *state = machine.driver_data<cdi_state>();
- bitmap_t *bitmap = state->m_lcdbitmap;
- UINT32 *scanline = &bitmap->pix32(y);
+ bitmap_t &bitmap = *state->m_lcdbitmap;
+ UINT32 *scanline = &bitmap.pix32(y);
int x = 0;
int lcd = 0;
@@ -1332,11 +1332,11 @@ static void mcd212_draw_cursor(mcd212_regs_t *mcd212, UINT32 *scanline, int y)
static void mcd212_draw_scanline(mcd212_regs_t *mcd212, int y)
{
running_machine &machine = mcd212->machine();
- bitmap_t *bitmap = machine.generic.tmpbitmap;
+ bitmap_t &bitmap = *machine.generic.tmpbitmap;
UINT8 plane_a_r[768], plane_a_g[768], plane_a_b[768];
UINT8 plane_b_r[768], plane_b_g[768], plane_b_b[768];
UINT32 out[768];
- UINT32 *scanline = &bitmap->pix32(y);
+ UINT32 *scanline = &bitmap.pix32(y);
int x;
mcd212_process_vsr(mcd212, 0, plane_a_r, plane_a_g, plane_a_b);
@@ -1663,13 +1663,13 @@ VIDEO_START( cdimono1 )
SCREEN_UPDATE( cdimono1 )
{
- copybitmap(bitmap, screen.machine().generic.tmpbitmap, 0, 0, 0, 0, cliprect);
+ copybitmap(bitmap, *screen.machine().generic.tmpbitmap, 0, 0, 0, 0, cliprect);
return 0;
}
SCREEN_UPDATE( cdimono1_lcd )
{
cdi_state *state = screen.machine().driver_data<cdi_state>();
- copybitmap(bitmap, state->m_lcdbitmap, 0, 0, 0, 0, cliprect);
+ copybitmap(bitmap, *state->m_lcdbitmap, 0, 0, 0, 0, cliprect);
return 0;
}
diff --git a/src/mame/video/mcr.c b/src/mame/video/mcr.c
index e5c88bb5139..edf77cfd056 100644
--- a/src/mame/video/mcr.c
+++ b/src/mame/video/mcr.c
@@ -255,7 +255,7 @@ WRITE8_HANDLER( mcr_91490_videoram_w )
*
*************************************/
-static void render_sprites_91399(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void render_sprites_91399(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
UINT8 *spriteram = machine.generic.spriteram.u8;
const gfx_element *gfx = machine.gfx[1];
@@ -293,8 +293,8 @@ static void render_sprites_91399(running_machine &machine, bitmap_t *bitmap, con
if (sy >= cliprect.min_y && sy <= cliprect.max_y)
{
const UINT8 *src = gfx_element_get_data(gfx, code) + gfx->line_modulo * (y ^ vflip);
- UINT16 *dst = &bitmap->pix16(sy);
- UINT8 *pri = &machine.priority_bitmap->pix8(sy);
+ UINT16 *dst = &bitmap.pix16(sy);
+ UINT8 *pri = &machine.priority_bitmap.pix8(sy);
/* loop over columns */
for (x = 0; x < 32; x++)
@@ -327,7 +327,7 @@ static void render_sprites_91399(running_machine &machine, bitmap_t *bitmap, con
*
*************************************/
-static void render_sprites_91464(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int primask, int sprmask, int colormask)
+static void render_sprites_91464(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int primask, int sprmask, int colormask)
{
UINT8 *spriteram = machine.generic.spriteram.u8;
const gfx_element *gfx = machine.gfx[1];
@@ -364,8 +364,8 @@ static void render_sprites_91464(running_machine &machine, bitmap_t *bitmap, con
if (sy >= 2 && sy >= cliprect.min_y && sy <= cliprect.max_y)
{
const UINT8 *src = gfx_element_get_data(gfx, code) + gfx->line_modulo * (y ^ vflip);
- UINT16 *dst = &bitmap->pix16(sy);
- UINT8 *pri = &machine.priority_bitmap->pix8(sy);
+ UINT16 *dst = &bitmap.pix16(sy);
+ UINT8 *pri = &machine.priority_bitmap.pix8(sy);
/* loop over columns */
for (x = 0; x < 32; x++)
@@ -407,7 +407,7 @@ SCREEN_UPDATE( mcr )
tilemap_set_flip(bg_tilemap, mcr_cocktail_flip ? (TILEMAP_FLIPX | TILEMAP_FLIPY) : 0);
/* draw the background */
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0x00);
tilemap_draw(bitmap, cliprect, bg_tilemap, 1, 0x10);
tilemap_draw(bitmap, cliprect, bg_tilemap, 2, 0x20);
diff --git a/src/mame/video/mcr3.c b/src/mame/video/mcr3.c
index 3eca1fd74be..62570bc7876 100644
--- a/src/mame/video/mcr3.c
+++ b/src/mame/video/mcr3.c
@@ -205,13 +205,13 @@ WRITE8_HANDLER( spyhunt_scroll_value_w )
*
*************************************/
-static void mcr3_update_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int color_mask, int code_xor, int dx, int dy)
+static void mcr3_update_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int color_mask, int code_xor, int dx, int dy)
{
mcr3_state *state = machine.driver_data<mcr3_state>();
UINT8 *spriteram = state->m_spriteram;
int offs;
- machine.priority_bitmap->fill(1, cliprect);
+ machine.priority_bitmap.fill(1, cliprect);
/* loop over sprite RAM */
for (offs = state->m_spriteram_size - 4; offs >= 0; offs -= 4)
diff --git a/src/mame/video/mcr68.c b/src/mame/video/mcr68.c
index 0c222842314..2399cbef31d 100644
--- a/src/mame/video/mcr68.c
+++ b/src/mame/video/mcr68.c
@@ -212,7 +212,7 @@ WRITE16_HANDLER( zwackery_spriteram_w )
*
*************************************/
-static void mcr68_update_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int priority)
+static void mcr68_update_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int priority)
{
mcr68_state *state = machine.driver_data<mcr68_state>();
rectangle sprite_clip = machine.primary_screen->visible_area();
@@ -224,7 +224,7 @@ static void mcr68_update_sprites(running_machine &machine, bitmap_t *bitmap, con
sprite_clip.max_x -= state->m_sprite_clip;
sprite_clip &= cliprect;
- machine.priority_bitmap->fill(1, sprite_clip);
+ machine.priority_bitmap.fill(1, sprite_clip);
/* loop over sprite RAM */
for (offs = state->m_spriteram_size / 2 - 4;offs >= 0;offs -= 4)
@@ -266,13 +266,13 @@ static void mcr68_update_sprites(running_machine &machine, bitmap_t *bitmap, con
}
-static void zwackery_update_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int priority)
+static void zwackery_update_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int priority)
{
mcr68_state *state = machine.driver_data<mcr68_state>();
UINT16 *spriteram16 = state->m_spriteram;
int offs;
- machine.priority_bitmap->fill(1, cliprect);
+ machine.priority_bitmap.fill(1, cliprect);
/* loop over sprite RAM */
for (offs = state->m_spriteram_size / 2 - 4;offs >= 0;offs -= 4)
diff --git a/src/mame/video/meadows.c b/src/mame/video/meadows.c
index cad99f9225e..2ccc00e66e2 100644
--- a/src/mame/video/meadows.c
+++ b/src/mame/video/meadows.c
@@ -78,7 +78,7 @@ WRITE8_HANDLER( meadows_spriteram_w )
*
*************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &clip)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &clip)
{
meadows_state *state = machine.driver_data<meadows_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/megasys1.c b/src/mame/video/megasys1.c
index 3fe206117cc..eca41d86311 100644
--- a/src/mame/video/megasys1.c
+++ b/src/mame/video/megasys1.c
@@ -567,7 +567,7 @@ WRITE16_HANDLER( megasys1_vregs_D_w )
0C Y position
0E Code */
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect)
{
megasys1_state *state = machine.driver_data<megasys1_state>();
int color,code,sx,sy,flipx,flipy,attr,sprite,offs,color_mask;
@@ -973,7 +973,7 @@ SCREEN_UPDATE( megasys1 )
}
}
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
flag = TILEMAP_DRAW_OPAQUE;
primask = 0;
@@ -999,7 +999,7 @@ SCREEN_UPDATE( megasys1 )
if (flag != 0)
{
flag = 0;
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
}
if (state->m_sprite_flag & 0x100) /* sprites are split */
diff --git a/src/mame/video/megazone.c b/src/mame/video/megazone.c
index d47bc6a17ca..3871153fec5 100644
--- a/src/mame/video/megazone.c
+++ b/src/mame/video/megazone.c
@@ -135,7 +135,7 @@ SCREEN_UPDATE( megazone )
flipy = !flipy;
}
- drawgfx_opaque(state->m_tmpbitmap, state->m_tmpbitmap->cliprect(), screen.machine().gfx[1],
+ drawgfx_opaque(*state->m_tmpbitmap, state->m_tmpbitmap->cliprect(), screen.machine().gfx[1],
((int)state->m_videoram[offs]) + ((state->m_colorram[offs] & (1 << 7) ? 256 : 0) ),
(state->m_colorram[offs] & 0x0f) + 0x10,
flipx,flipy,
@@ -159,7 +159,7 @@ SCREEN_UPDATE( megazone )
}
- copyscrollbitmap(bitmap, state->m_tmpbitmap, 1, &scrollx, 1, &scrolly, cliprect);
+ copyscrollbitmap(bitmap, *state->m_tmpbitmap, 1, &scrollx, 1, &scrolly, cliprect);
}
diff --git a/src/mame/video/mermaid.c b/src/mame/video/mermaid.c
index a2105fb6a46..b9782ef5eae 100644
--- a/src/mame/video/mermaid.c
+++ b/src/mame/video/mermaid.c
@@ -188,7 +188,7 @@ VIDEO_START( mermaid )
state->m_helper2 = machine.primary_screen->alloc_compatible_bitmap();
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
const rectangle spritevisiblearea(0 * 8, 26 * 8 - 1, 2 * 8, 30 * 8 - 1);
const rectangle flip_spritevisiblearea(6 * 8, 31 * 8 - 1, 2 * 8, 30 * 8 - 1);
@@ -327,9 +327,9 @@ SCREEN_EOF( mermaid )
state->m_helper->fill(0, rect);
state->m_helper2->fill(0, rect);
- tilemap_draw(state->m_helper, rect, state->m_bg_tilemap, 0, 0);
+ tilemap_draw(*state->m_helper, rect, state->m_bg_tilemap, 0, 0);
- drawgfx_transpen(state->m_helper2, rect, screen.machine().gfx[1], code, 0, flipx, flipy, sx, sy, 0);
+ drawgfx_transpen(*state->m_helper2, rect, screen.machine().gfx[1], code, 0, flipx, flipy, sx, sy, 0);
state->m_coll_bit2 |= collision_check(screen.machine(), rect);
@@ -338,9 +338,9 @@ SCREEN_EOF( mermaid )
state->m_helper->fill(0, rect);
state->m_helper2->fill(0, rect);
- tilemap_draw(state->m_helper, rect, state->m_fg_tilemap, 0, 0);
+ tilemap_draw(*state->m_helper, rect, state->m_fg_tilemap, 0, 0);
- drawgfx_transpen(state->m_helper2, rect, screen.machine().gfx[1], code, 0, flipx, flipy, sx, sy, 0);
+ drawgfx_transpen(*state->m_helper2, rect, screen.machine().gfx[1], code, 0, flipx, flipy, sx, sy, 0);
state->m_coll_bit1 |= collision_check(screen.machine(), rect);
@@ -378,10 +378,10 @@ SCREEN_EOF( mermaid )
sy2 = 240 - sy2;
}
- drawgfx_transpen(state->m_helper, rect, screen.machine().gfx[1], code2, 0, flipx2, flipy2, sx2, sy2, 0);
+ drawgfx_transpen(*state->m_helper, rect, screen.machine().gfx[1], code2, 0, flipx2, flipy2, sx2, sy2, 0);
}
- drawgfx_transpen(state->m_helper2, rect, screen.machine().gfx[1], code, 0, flipx, flipy, sx, sy, 0);
+ drawgfx_transpen(*state->m_helper2, rect, screen.machine().gfx[1], code, 0, flipx, flipy, sx, sy, 0);
state->m_coll_bit0 |= collision_check(screen.machine(), rect);
}
@@ -466,10 +466,10 @@ SCREEN_EOF( mermaid )
sy2 = 240 - sy2;
}
- drawgfx_transpen(state->m_helper, rect, screen.machine().gfx[1], code2, 0, flipx2, flipy2, sx2, sy2, 0);
+ drawgfx_transpen(*state->m_helper, rect, screen.machine().gfx[1], code2, 0, flipx2, flipy2, sx2, sy2, 0);
}
- drawgfx_transpen(state->m_helper2, rect, screen.machine().gfx[1], code, 0, flipx, flipy, sx, sy, 0);
+ drawgfx_transpen(*state->m_helper2, rect, screen.machine().gfx[1], code, 0, flipx, flipy, sx, sy, 0);
state->m_coll_bit3 |= collision_check(screen.machine(), rect);
}
@@ -554,10 +554,10 @@ SCREEN_EOF( mermaid )
sy2 = 240 - sy2;
}
- drawgfx_transpen(state->m_helper, rect, screen.machine().gfx[1], code2, 0, flipx2, flipy2, sx2, sy2, 0);
+ drawgfx_transpen(*state->m_helper, rect, screen.machine().gfx[1], code2, 0, flipx2, flipy2, sx2, sy2, 0);
}
- drawgfx_transpen(state->m_helper2, rect, screen.machine().gfx[1], code, 0, flipx, flipy, sx, sy, 0);
+ drawgfx_transpen(*state->m_helper2, rect, screen.machine().gfx[1], code, 0, flipx, flipy, sx, sy, 0);
state->m_coll_bit6 |= collision_check(screen.machine(), rect);
}
diff --git a/src/mame/video/metlclsh.c b/src/mame/video/metlclsh.c
index 0bf82feb333..ead7f1238ce 100644
--- a/src/mame/video/metlclsh.c
+++ b/src/mame/video/metlclsh.c
@@ -174,7 +174,7 @@ VIDEO_START( metlclsh )
***************************************************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
metlclsh_state *state = machine.driver_data<metlclsh_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -246,7 +246,7 @@ SCREEN_UPDATE( metlclsh )
{
metlclsh_state *state = screen.machine().driver_data<metlclsh_state>();
- bitmap->fill(0x10, cliprect);
+ bitmap.fill(0x10, cliprect);
tilemap_draw(bitmap, cliprect, state->m_fg_tilemap, 1, 0); // low priority tiles of foreground
diff --git a/src/mame/video/metro.c b/src/mame/video/metro.c
index 3dc074d90ef..fae93ea7926 100644
--- a/src/mame/video/metro.c
+++ b/src/mame/video/metro.c
@@ -439,7 +439,7 @@ VIDEO_START( gstrik2 )
/* Draw sprites */
-void metro_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+void metro_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
metro_state *state = machine.driver_data<metro_state>();
UINT8 *base_gfx = machine.region("gfx1")->base();
@@ -590,19 +590,19 @@ void metro_draw_sprites( running_machine &machine, bitmap_t *bitmap, const recta
/* copy a 'window' from the large 2048x2048 (or 4096x4096 for 16x16 tiles) tilemap */
-static void draw_tilemap( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, UINT32 flags, UINT32 pcode,
+static void draw_tilemap( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, UINT32 flags, UINT32 pcode,
int sx, int sy, int wx, int wy, int big, UINT16* tilemapram, int layer )
{
metro_state *state = machine.driver_data<metro_state>();
int y;
- bitmap_t *priority_bitmap = machine.priority_bitmap;
+ bitmap_t &priority_bitmap = machine.priority_bitmap;
int width = big ? 4096 : 2048;//pixdata->width;
int height = big ? 4096 : 2048;//pixdata->height;
- int scrwidth = bitmap->width();
- int scrheight = bitmap->height();
+ int scrwidth = bitmap.width();
+ int scrheight = bitmap.height();
int windowwidth = width >> 2;
int windowheight = height >> 3;
@@ -637,8 +637,8 @@ static void draw_tilemap( running_machine &machine, bitmap_t *bitmap, const rect
if (!state->m_flip_screen)
{
- dst = &bitmap->pix16(y);
- priority_baseaddr = &priority_bitmap->pix8(y);
+ dst = &bitmap.pix16(y);
+ priority_baseaddr = &priority_bitmap.pix8(y);
for (x=0;x<scrwidth;x++)
{
@@ -661,8 +661,8 @@ static void draw_tilemap( running_machine &machine, bitmap_t *bitmap, const rect
}
else // flipped case
{
- dst = &bitmap->pix16(scrheight-y-1);
- priority_baseaddr = &priority_bitmap->pix8(scrheight-y-1);
+ dst = &bitmap.pix16(scrheight-y-1);
+ priority_baseaddr = &priority_bitmap.pix8(scrheight-y-1);
for (x=0;x<scrwidth;x++)
{
@@ -687,7 +687,7 @@ static void draw_tilemap( running_machine &machine, bitmap_t *bitmap, const rect
}
/* Draw all the layers that match the given priority */
-static void draw_layers( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int pri, int layers_ctrl )
+static void draw_layers( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int pri, int layers_ctrl )
{
metro_state *state = machine.driver_data<metro_state>();
UINT16 layers_pri = state->m_videoregs[0x10 / 2];
@@ -732,8 +732,8 @@ SCREEN_UPDATE( metro )
state->m_sprite_yoffs = state->m_videoregs[0x04 / 2] - (visarea.max_y + 1) / 2;
/* The background color is selected by a register */
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill((state->m_videoregs[0x12/2] & 0x0fff) + 0x1000, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill((state->m_videoregs[0x12/2] & 0x0fff) + 0x1000, cliprect);
/* Screen Control Register:
@@ -779,7 +779,7 @@ if (screen.machine().input().code_pressed(KEYCODE_Z))
if (screen.machine().input().code_pressed(KEYCODE_A)) msk |= 8;
if (msk != 0)
{
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
layers_ctrl &= msk;
}
diff --git a/src/mame/video/mexico86.c b/src/mame/video/mexico86.c
index b6f22fbdabe..95e5f9607b8 100644
--- a/src/mame/video/mexico86.c
+++ b/src/mame/video/mexico86.c
@@ -27,7 +27,7 @@ SCREEN_UPDATE( mexico86 )
/* Bubble Bobble doesn't have a real video RAM. All graphics (characters */
/* and sprites) are stored in the same memory region, and information on */
/* the background character columns is stored inthe area dd00-dd3f */
- bitmap->fill(255, cliprect);
+ bitmap.fill(255, cliprect);
sx = 0;
@@ -109,7 +109,7 @@ SCREEN_UPDATE( kikikai )
int goffs, code, color, y;
int tx, ty;
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
sx = 0;
for (offs = 0; offs < state->m_objectram_size; offs += 4)
{
diff --git a/src/mame/video/micro3d.c b/src/mame/video/micro3d.c
index 182ef7d92a8..561a0c91b9f 100644
--- a/src/mame/video/micro3d.c
+++ b/src/mame/video/micro3d.c
@@ -64,12 +64,12 @@ VIDEO_RESET( micro3d )
*
*************************************/
-void micro3d_scanline_update(screen_device &screen, bitmap_t *bitmap, int scanline, const tms34010_display_params *params)
+void micro3d_scanline_update(screen_device &screen, bitmap_t &bitmap, int scanline, const tms34010_display_params *params)
{
micro3d_state *state = screen.machine().driver_data<micro3d_state>();
UINT16 *src = &state->m_micro3d_sprite_vram[(params->rowaddr << 8) & 0x7fe00];
- UINT16 *dest = &bitmap->pix16(scanline);
+ UINT16 *dest = &bitmap.pix16(scanline);
int coladdr = params->coladdr;
int sd_11_7 = (state->m_creg & 0x1f) << 7;
int x;
diff --git a/src/mame/video/midtunit.c b/src/mame/video/midtunit.c
index 937c18e96cb..4ff1f2a1163 100644
--- a/src/mame/video/midtunit.c
+++ b/src/mame/video/midtunit.c
@@ -802,10 +802,10 @@ skipdma:
*
*************************************/
-void midtunit_scanline_update(screen_device &screen, bitmap_t *bitmap, int scanline, const tms34010_display_params *params)
+void midtunit_scanline_update(screen_device &screen, bitmap_t &bitmap, int scanline, const tms34010_display_params *params)
{
UINT16 *src = &local_videoram[(params->rowaddr << 9) & 0x3fe00];
- UINT16 *dest = &bitmap->pix16(scanline);
+ UINT16 *dest = &bitmap.pix16(scanline);
int coladdr = params->coladdr << 1;
int x;
@@ -814,11 +814,11 @@ void midtunit_scanline_update(screen_device &screen, bitmap_t *bitmap, int scanl
dest[x] = src[coladdr++ & 0x1ff] & 0x7fff;
}
-void midxunit_scanline_update(screen_device &screen, bitmap_t *bitmap, int scanline, const tms34010_display_params *params)
+void midxunit_scanline_update(screen_device &screen, bitmap_t &bitmap, int scanline, const tms34010_display_params *params)
{
UINT32 fulladdr = ((params->rowaddr << 16) | params->coladdr) >> 3;
UINT16 *src = &local_videoram[fulladdr & 0x3fe00];
- UINT16 *dest = &bitmap->pix16(scanline);
+ UINT16 *dest = &bitmap.pix16(scanline);
int x;
/* copy the non-blanked portions of this scanline */
diff --git a/src/mame/video/midvunit.c b/src/mame/video/midvunit.c
index 1290fbad54d..7e35ad51b7e 100644
--- a/src/mame/video/midvunit.c
+++ b/src/mame/video/midvunit.c
@@ -556,7 +556,7 @@ SCREEN_UPDATE( midvunit )
/* loop over rows */
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
- UINT16 *dest = &bitmap->pix16(y, cliprect.min_x);
+ UINT16 *dest = &bitmap.pix16(y, cliprect.min_x);
for (x = 0; x < width; x++)
*dest++ = state->m_videoram[offset + x] & 0x7fff;
offset += 512;
diff --git a/src/mame/video/midyunit.c b/src/mame/video/midyunit.c
index 8739c8a9c78..d269afa4404 100644
--- a/src/mame/video/midyunit.c
+++ b/src/mame/video/midyunit.c
@@ -552,11 +552,11 @@ static TIMER_CALLBACK( autoerase_line )
}
-void midyunit_scanline_update(screen_device &screen, bitmap_t *bitmap, int scanline, const tms34010_display_params *params)
+void midyunit_scanline_update(screen_device &screen, bitmap_t &bitmap, int scanline, const tms34010_display_params *params)
{
midyunit_state *state = screen.machine().driver_data<midyunit_state>();
UINT16 *src = &state->m_local_videoram[(params->rowaddr << 9) & 0x3fe00];
- UINT16 *dest = &bitmap->pix16(scanline);
+ UINT16 *dest = &bitmap.pix16(scanline);
int coladdr = params->coladdr << 1;
int x;
diff --git a/src/mame/video/midzeus.c b/src/mame/video/midzeus.c
index 9871626c489..9517acd8a73 100644
--- a/src/mame/video/midzeus.c
+++ b/src/mame/video/midzeus.c
@@ -345,7 +345,7 @@ SCREEN_UPDATE( midzeus )
int xoffs = screen.visible_area().min_x;
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
- UINT16 *dest = &bitmap->pix16(y);
+ UINT16 *dest = &bitmap.pix16(y);
for (x = cliprect.min_x; x <= cliprect.max_x; x++)
dest[x] = WAVERAM_READPIX(base, y, x - xoffs) & 0x7fff;
}
@@ -366,7 +366,7 @@ SCREEN_UPDATE( midzeus )
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
- UINT16 *dest = &bitmap->pix16(y);
+ UINT16 *dest = &bitmap.pix16(y);
for (x = cliprect.min_x; x <= cliprect.max_x; x++)
{
UINT8 tex = get_texel_8bit(base, y, x, texel_width);
diff --git a/src/mame/video/midzeus2.c b/src/mame/video/midzeus2.c
index 55bf86cc7dc..b966d603401 100644
--- a/src/mame/video/midzeus2.c
+++ b/src/mame/video/midzeus2.c
@@ -374,7 +374,7 @@ if (screen.machine().input().code_pressed(KEYCODE_DOWN)) { zbase -= 1.0f; popmes
int xoffs = screen.visible_area().min_x;
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
- UINT32 *dest = &bitmap->pix32(y);
+ UINT32 *dest = &bitmap.pix32(y);
for (x = cliprect.min_x; x <= cliprect.max_x; x++)
dest[x] = WAVERAM_READPIX(base, y, x - xoffs);
}
@@ -395,7 +395,7 @@ if (screen.machine().input().code_pressed(KEYCODE_DOWN)) { zbase -= 1.0f; popmes
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
- UINT32 *dest = &bitmap->pix32(y);
+ UINT32 *dest = &bitmap.pix32(y);
for (x = cliprect.min_x; x <= cliprect.max_x; x++)
{
UINT8 tex = get_texel_8bit(base, y, x, texel_width);
diff --git a/src/mame/video/mikie.c b/src/mame/video/mikie.c
index 3cf7733aaa2..a74a68c1a25 100644
--- a/src/mame/video/mikie.c
+++ b/src/mame/video/mikie.c
@@ -145,7 +145,7 @@ VIDEO_START( mikie )
state->m_bg_tilemap = tilemap_create(machine, get_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
mikie_state *state = machine.driver_data<mikie_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/mitchell.c b/src/mame/video/mitchell.c
index 452d406d120..7db6d825f3e 100644
--- a/src/mame/video/mitchell.c
+++ b/src/mame/video/mitchell.c
@@ -300,7 +300,7 @@ READ8_HANDLER( mgakuen_paletteram_r )
***************************************************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
mitchell_state *state = machine.driver_data<mitchell_state>();
int offs, sx, sy;
@@ -332,7 +332,7 @@ SCREEN_UPDATE( pang )
{
mitchell_state *state = screen.machine().driver_data<mitchell_state>();
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
draw_sprites(screen.machine(), bitmap, cliprect);
return 0;
diff --git a/src/mame/video/mjkjidai.c b/src/mame/video/mjkjidai.c
index 6588eeef3fb..3f5cf36b717 100644
--- a/src/mame/video/mjkjidai.c
+++ b/src/mame/video/mjkjidai.c
@@ -87,7 +87,7 @@ WRITE8_HANDLER( mjkjidai_ctrl_w )
***************************************************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect)
{
mjkjidai_state *state = machine.driver_data<mjkjidai_state>();
UINT8 *spriteram = state->m_spriteram1;
@@ -133,7 +133,7 @@ SCREEN_UPDATE( mjkjidai )
{
mjkjidai_state *state = screen.machine().driver_data<mjkjidai_state>();
if (!state->m_display_enable)
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
else
{
tilemap_draw(bitmap,cliprect,state->m_bg_tilemap,0,0);
diff --git a/src/mame/video/model1.c b/src/mame/video/model1.c
index 3179d6dde5b..0e328533632 100644
--- a/src/mame/video/model1.c
+++ b/src/mame/video/model1.c
@@ -135,18 +135,18 @@ static void project_point_direct(struct view *view, struct point *p)
}
-static void draw_hline(bitmap_t *bitmap, int x1, int x2, int y, int color)
+static void draw_hline(bitmap_t &bitmap, int x1, int x2, int y, int color)
{
- UINT16 *base = &bitmap->pix16(y);
+ UINT16 *base = &bitmap.pix16(y);
while(x1 <= x2) {
base[x1] = color;
x1++;
}
}
-static void draw_hline_moired(bitmap_t *bitmap, int x1, int x2, int y, int color)
+static void draw_hline_moired(bitmap_t &bitmap, int x1, int x2, int y, int color)
{
- UINT16 *base = &bitmap->pix16(y);
+ UINT16 *base = &bitmap.pix16(y);
while(x1 <= x2) {
if((x1^y)&1)
base[x1] = color;
@@ -154,7 +154,7 @@ static void draw_hline_moired(bitmap_t *bitmap, int x1, int x2, int y, int color
}
}
-static void fill_slope(bitmap_t *bitmap, struct view *view, int color, INT32 x1, INT32 x2, INT32 sl1, INT32 sl2, INT32 y1, INT32 y2, INT32 *nx1, INT32 *nx2)
+static void fill_slope(bitmap_t &bitmap, struct view *view, int color, INT32 x1, INT32 x2, INT32 sl1, INT32 sl2, INT32 y1, INT32 y2, INT32 *nx1, INT32 *nx2)
{
if(y1 > view->y2)
return;
@@ -214,7 +214,7 @@ static void fill_slope(bitmap_t *bitmap, struct view *view, int color, INT32 x1,
*nx2 = x2;
}
-static void fill_line(bitmap_t *bitmap, struct view *view, int color, INT32 y, INT32 x1, INT32 x2)
+static void fill_line(bitmap_t &bitmap, struct view *view, int color, INT32 y, INT32 x1, INT32 x2)
{
int xx1 = x1>>FRAC_SHIFT;
int xx2 = x2>>FRAC_SHIFT;
@@ -235,7 +235,7 @@ static void fill_line(bitmap_t *bitmap, struct view *view, int color, INT32 y, I
}
}
-static void fill_quad(bitmap_t *bitmap, struct view *view, const struct quad_m1 *q)
+static void fill_quad(bitmap_t &bitmap, struct view *view, const struct quad_m1 *q)
{
INT32 sl1, sl2, cury, limy, x1, x2;
int pmin, pmax, i, ps1, ps2;
@@ -336,7 +336,7 @@ static void fill_quad(bitmap_t *bitmap, struct view *view, const struct quad_m1
fill_line(bitmap, view, color, cury, x1, x2);
}
#if 0
-static void draw_line(bitmap_t *bitmap, struct view *view, int color, int x1, int y1, int x2, int y2)
+static void draw_line(bitmap_t &bitmap, struct view *view, int color, int x1, int y1, int x2, int y2)
{
int s1x, s1y, s2x, s2y;
int d1, d2;
@@ -385,7 +385,7 @@ static void draw_line(bitmap_t *bitmap, struct view *view, int color, int x1, in
cur = 0;
while(x != x2 || y != y2) {
if(x>=view->x1 && x<=view->x2 && y>=view->y1 && y<=view->y2)
- bitmap->pix16(y, x) = color;
+ bitmap.pix16(y, x) = color;
x += s1x;
y += s1y;
cur += d2;
@@ -396,7 +396,7 @@ static void draw_line(bitmap_t *bitmap, struct view *view, int color, int x1, in
}
}
if(x>=view->x1 && x<=view->x2 && y>=view->y1 && y<=view->y2)
- bitmap->pix16(y, x) = color;
+ bitmap.pix16(y, x) = color;
}
#endif
static int comp_quads(const void *q1, const void *q2)
@@ -433,7 +433,7 @@ static void unsort_quads(model1_state *state)
}
-static void draw_quads(model1_state *state, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_quads(model1_state *state, bitmap_t &bitmap, const rectangle &cliprect)
{
struct view *view = state->m_view;
int count = state->m_quadpt - state->m_quaddb;
@@ -1119,7 +1119,7 @@ static UINT16 *skip_direct(UINT16 *list)
return list+2;
}
-static void draw_objects(model1_state *state, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_objects(model1_state *state, bitmap_t &bitmap, const rectangle &cliprect)
{
if(state->m_quadpt != state->m_quaddb) {
LOG_TGP(("VIDEO: sort&draw\n"));
@@ -1131,7 +1131,7 @@ static void draw_objects(model1_state *state, bitmap_t *bitmap, const rectangle
state->m_pointpt = state->m_pointdb;
}
-static UINT16 *draw_direct(model1_state *state, bitmap_t *bitmap, const rectangle &cliprect, UINT16 *list)
+static UINT16 *draw_direct(model1_state *state, bitmap_t &bitmap, const rectangle &cliprect, UINT16 *list)
{
UINT16 *res;
@@ -1184,7 +1184,7 @@ WRITE16_HANDLER( model1_listctl_w )
LOG_TGP(("VIDEO: control=%08x\n", (state->m_listctl[1]<<16)|state->m_listctl[0]));
}
-static void tgp_render(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void tgp_render(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
model1_state *state = machine.driver_data<model1_state>();
struct view *view = state->m_view;
@@ -1518,8 +1518,8 @@ SCREEN_UPDATE(model1)
view->ayyc = cos(view->ayy);
view->ayys = sin(view->ayy);
- screen.machine().priority_bitmap->fill(0);
- bitmap->fill(screen.machine().pens[0], cliprect);
+ screen.machine().priority_bitmap.fill(0);
+ bitmap.fill(screen.machine().pens[0], cliprect);
segas24_tile *tile = screen.machine().device<segas24_tile>("tile");
tile->draw(bitmap, cliprect, 6, 0, 0);
diff --git a/src/mame/video/model2.c b/src/mame/video/model2.c
index 88d9aaa0569..d7773939ce8 100644
--- a/src/mame/video/model2.c
+++ b/src/mame/video/model2.c
@@ -923,7 +923,7 @@ static const poly_draw_scanline_func render_funcs[8] =
model2_3d_render_7 /* checker = 1, textured = 1, translucent = 1 */
};
-static void model2_3d_render( model2_state *state, bitmap_t *bitmap, triangle *tri, const rectangle &cliprect )
+static void model2_3d_render( model2_state *state, bitmap_t &bitmap, triangle *tri, const rectangle &cliprect )
{
poly_manager *poly = state->m_poly;
poly_extra_data *extra = (poly_extra_data *)poly_get_extra_data(poly);
@@ -968,10 +968,10 @@ static void model2_3d_render( model2_state *state, bitmap_t *bitmap, triangle *t
tri->v[2].pu = tri->v[2].pu * tri->v[2].pz * (1.0f / 8.0f);
tri->v[2].pv = tri->v[2].pv * tri->v[2].pz * (1.0f / 8.0f);
- poly_render_triangle(poly, bitmap, vp, render_funcs[renderer], 3, &tri->v[0], &tri->v[1], &tri->v[2]);
+ poly_render_triangle(poly, &bitmap, vp, render_funcs[renderer], 3, &tri->v[0], &tri->v[1], &tri->v[2]);
}
else
- poly_render_triangle(poly, bitmap, vp, render_funcs[renderer], 0, &tri->v[0], &tri->v[1], &tri->v[2]);
+ poly_render_triangle(poly, &bitmap, vp, render_funcs[renderer], 0, &tri->v[0], &tri->v[1], &tri->v[2]);
}
/*
@@ -1022,7 +1022,7 @@ static void model2_3d_frame_start( model2_state *state )
raster->max_z = 0;
}
-static void model2_3d_frame_end( model2_state *state, bitmap_t *bitmap, const rectangle &cliprect )
+static void model2_3d_frame_end( model2_state *state, bitmap_t &bitmap, const rectangle &cliprect )
{
raster_state *raster = state->m_raster;
INT32 z;
@@ -2727,14 +2727,14 @@ VIDEO_START(model2)
geo_init( machine, (UINT32*)machine.region("user2")->base() );
}
-static void convert_bitmap( running_machine &machine, bitmap_t *dst, bitmap_t *src, const rectangle &rect )
+static void convert_bitmap( running_machine &machine, bitmap_t &dst, bitmap_t &src, const rectangle &rect )
{
int x, y;
for( y = rect.min_y; y < rect.max_y; y++ )
{
- UINT32 *d = &dst->pix32(y);
- UINT16 *s = &src->pix16(y);
+ UINT32 *d = &dst.pix32(y);
+ UINT16 *s = &src.pix16(y);
for( x = rect.min_x; x < rect.max_x; x++ )
{
@@ -2749,16 +2749,16 @@ SCREEN_UPDATE(model2)
model2_state *state = screen.machine().driver_data<model2_state>();
logerror("--- frame ---\n");
- bitmap->fill(screen.machine().pens[0], cliprect);
+ bitmap.fill(screen.machine().pens[0], cliprect);
state->m_sys24_bitmap->fill(0, cliprect);
segas24_tile *tile = screen.machine().device<segas24_tile>("tile");
- tile->draw(state->m_sys24_bitmap, cliprect, 7, 0, 0);
- tile->draw(state->m_sys24_bitmap, cliprect, 6, 0, 0);
- tile->draw(state->m_sys24_bitmap, cliprect, 5, 0, 0);
- tile->draw(state->m_sys24_bitmap, cliprect, 4, 0, 0);
+ tile->draw(*state->m_sys24_bitmap, cliprect, 7, 0, 0);
+ tile->draw(*state->m_sys24_bitmap, cliprect, 6, 0, 0);
+ tile->draw(*state->m_sys24_bitmap, cliprect, 5, 0, 0);
+ tile->draw(*state->m_sys24_bitmap, cliprect, 4, 0, 0);
- convert_bitmap(screen.machine(), bitmap, state->m_sys24_bitmap, cliprect);
+ convert_bitmap(screen.machine(), bitmap, *state->m_sys24_bitmap, cliprect);
/* tell the rasterizer we're starting a frame */
model2_3d_frame_start(state);
@@ -2770,12 +2770,12 @@ SCREEN_UPDATE(model2)
model2_3d_frame_end( state, bitmap, cliprect );
state->m_sys24_bitmap->fill(0, cliprect);
- tile->draw(state->m_sys24_bitmap, cliprect, 3, 0, 0);
- tile->draw(state->m_sys24_bitmap, cliprect, 2, 0, 0);
- tile->draw(state->m_sys24_bitmap, cliprect, 1, 0, 0);
- tile->draw(state->m_sys24_bitmap, cliprect, 0, 0, 0);
+ tile->draw(*state->m_sys24_bitmap, cliprect, 3, 0, 0);
+ tile->draw(*state->m_sys24_bitmap, cliprect, 2, 0, 0);
+ tile->draw(*state->m_sys24_bitmap, cliprect, 1, 0, 0);
+ tile->draw(*state->m_sys24_bitmap, cliprect, 0, 0, 0);
- convert_bitmap(screen.machine(), bitmap, state->m_sys24_bitmap, cliprect);
+ convert_bitmap(screen.machine(), bitmap, *state->m_sys24_bitmap, cliprect);
return 0;
}
diff --git a/src/mame/video/model3.c b/src/mame/video/model3.c
index 9add483c792..ebcfd60e3b2 100644
--- a/src/mame/video/model3.c
+++ b/src/mame/video/model3.c
@@ -158,7 +158,7 @@ VIDEO_START( model3 )
init_matrix_stack(machine);
}
-static void draw_tile_4bit(running_machine &machine, bitmap_t *bitmap, int tx, int ty, int tilenum)
+static void draw_tile_4bit(running_machine &machine, bitmap_t &bitmap, int tx, int ty, int tilenum)
{
model3_state *state = machine.driver_data<model3_state>();
int x, y;
@@ -173,7 +173,7 @@ static void draw_tile_4bit(running_machine &machine, bitmap_t *bitmap, int tx, i
tile = &tile_base[tile_index];
for(y = ty; y < ty+8; y++) {
- UINT16 *d = &bitmap->pix16(y^1);
+ UINT16 *d = &bitmap.pix16(y^1);
for(x = tx; x < tx+8; x+=2) {
UINT8 tile0, tile1;
UINT16 pix0, pix1;
@@ -194,7 +194,7 @@ static void draw_tile_4bit(running_machine &machine, bitmap_t *bitmap, int tx, i
}
}
-static void draw_tile_8bit(running_machine &machine, bitmap_t *bitmap, int tx, int ty, int tilenum)
+static void draw_tile_8bit(running_machine &machine, bitmap_t &bitmap, int tx, int ty, int tilenum)
{
model3_state *state = machine.driver_data<model3_state>();
int x, y;
@@ -209,7 +209,7 @@ static void draw_tile_8bit(running_machine &machine, bitmap_t *bitmap, int tx, i
tile = &tile_base[tile_index];
for(y = ty; y < ty+8; y++) {
- UINT16 *d = &bitmap->pix16(y);
+ UINT16 *d = &bitmap.pix16(y);
int xx = 0;
for(x = tx; x < tx+8; x++) {
UINT8 tile0;
@@ -226,13 +226,13 @@ static void draw_tile_8bit(running_machine &machine, bitmap_t *bitmap, int tx, i
}
}
#ifdef UNUSED_FUNCTION
-static void draw_texture_sheet(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_texture_sheet(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
model3_state *state = machine.driver_data<model3_state>();
int x,y;
for(y = cliprect.min_y; y <= cliprect.max_y; y++)
{
- UINT16 *d = &bitmap->pix16(y);
+ UINT16 *d = &bitmap.pix16(y);
int index = (y*2)*2048;
for(x = cliprect.min_x; x <= cliprect.max_x; x++) {
UINT16 pix = state->m_texture_ram[0][index];
@@ -245,7 +245,7 @@ static void draw_texture_sheet(running_machine &machine, bitmap_t *bitmap, const
}
#endif
-static void draw_layer(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int layer, int bitdepth)
+static void draw_layer(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int layer, int bitdepth)
{
model3_state *state = machine.driver_data<model3_state>();
int x, y;
@@ -321,12 +321,12 @@ static void draw_layer(running_machine &machine, bitmap_t *bitmap, const rectang
}
#ifdef UNUSED_FUNCTION
-static void copy_screen(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void copy_screen(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
model3_state *state = machine.driver_data<model3_state>();
int x,y;
for(y=cliprect.min_y; y <= cliprect.max_y; y++) {
- UINT16 *d = &bitmap->pix16(y);
+ UINT16 *d = &bitmap.pix16(y);
UINT16 *s = &state->m_bitmap3d->pix16(y);
for(x=cliprect.min_x; x <= cliprect.max_x; x++) {
UINT16 pix = s[x];
@@ -382,7 +382,7 @@ SCREEN_UPDATE( model3 )
state->m_debug_layer_disable ^= 0x10;
}
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
if (!(state->m_debug_layer_disable & 0x8))
draw_layer(screen.machine(), bitmap, cliprect, 3, (state->m_layer_enable >> 3) & 0x1);
@@ -399,7 +399,7 @@ SCREEN_UPDATE( model3 )
real3d_traverse_display_list(screen.machine());
}
#endif
- copybitmap_trans(bitmap, state->m_bitmap3d, 0, 0, 0, 0, cliprect, 0x8000);
+ copybitmap_trans(bitmap, *state->m_bitmap3d, 0, 0, 0, 0, cliprect, 0x8000);
}
if (!(state->m_debug_layer_disable & 0x2))
diff --git a/src/mame/video/momoko.c b/src/mame/video/momoko.c
index 2eb8e5fdb91..5ca0dbbc712 100644
--- a/src/mame/video/momoko.c
+++ b/src/mame/video/momoko.c
@@ -76,7 +76,7 @@ WRITE8_HANDLER( momoko_flipscreen_w )
/****************************************************************************/
-static void momoko_draw_bg_pri( running_machine &machine, bitmap_t *bitmap, int chr, int col, int flipx, int flipy, int x, int y, int pri )
+static void momoko_draw_bg_pri( running_machine &machine, bitmap_t &bitmap, int chr, int col, int flipx, int flipy, int x, int y, int pri )
{
int xx, sx, sy, px, py, dot;
UINT32 gfxadr;
@@ -100,7 +100,7 @@ static void momoko_draw_bg_pri( running_machine &machine, bitmap_t *bitmap, int
else py = 7 - sy + y;
if (dot >= pri)
- bitmap->pix16(py, px) = col * 16 + dot + 256;
+ bitmap.pix16(py, px) = col * 16 + dot + 256;
d0 = d0 << 1;
d1 = d1 << 1;
@@ -162,7 +162,7 @@ SCREEN_UPDATE( momoko )
}
}
else
- bitmap->fill(256, cliprect);
+ bitmap.fill(256, cliprect);
/* draw sprites (momoko) */
diff --git a/src/mame/video/moo.c b/src/mame/video/moo.c
index abb476867d5..d79ccb30650 100644
--- a/src/mame/video/moo.c
+++ b/src/mame/video/moo.c
@@ -112,7 +112,7 @@ SCREEN_UPDATE(moo)
k054338_update_all_shadows(state->m_k054338, 0);
k054338_fill_backcolor(state->m_k054338, bitmap, 0);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
if (state->m_layerpri[0] < k053251_get_priority(state->m_k053251, K053251_CI1)) /* bucky hides back layer behind background */
k056832_tilemap_draw(state->m_k056832, bitmap, cliprect, layers[0], 0, 1);
diff --git a/src/mame/video/mrdo.c b/src/mame/video/mrdo.c
index fa950e7304e..cad67bebe11 100644
--- a/src/mame/video/mrdo.c
+++ b/src/mame/video/mrdo.c
@@ -243,7 +243,7 @@ WRITE8_HANDLER( mrdo_flipscreen_w )
***************************************************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect )
{
mrdo_state *state = machine.driver_data<mrdo_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -265,7 +265,7 @@ SCREEN_UPDATE( mrdo )
{
mrdo_state *state = screen.machine().driver_data<mrdo_state>();
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
tilemap_draw(bitmap, cliprect, state->m_fg_tilemap, 0, 0);
draw_sprites(screen.machine(), bitmap, cliprect);
diff --git a/src/mame/video/mrflea.c b/src/mame/video/mrflea.c
index 27309d99b21..3895c96b1e8 100644
--- a/src/mame/video/mrflea.c
+++ b/src/mame/video/mrflea.c
@@ -43,7 +43,7 @@ WRITE8_HANDLER( mrflea_spriteram_w )
state->m_spriteram[offset] = data;
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
mrflea_state *state = machine.driver_data<mrflea_state>();
const gfx_element *gfx = machine.gfx[0];
@@ -74,7 +74,7 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
}
}
-static void draw_background( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_background( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
mrflea_state *state = machine.driver_data<mrflea_state>();
const UINT8 *source = state->m_videoram;
diff --git a/src/mame/video/mrjong.c b/src/mame/video/mrjong.c
index 7c0d393ac1e..d17d55f3436 100644
--- a/src/mame/video/mrjong.c
+++ b/src/mame/video/mrjong.c
@@ -110,7 +110,7 @@ VIDEO_START( mrjong )
/*
Note: First 0x40 entries in the videoram are actually spriteram
*/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
mrjong_state *state = machine.driver_data<mrjong_state>();
int offs;
diff --git a/src/mame/video/ms32.c b/src/mame/video/ms32.c
index e67dd756d62..65f41224d16 100644
--- a/src/mame/video/ms32.c
+++ b/src/mame/video/ms32.c
@@ -205,7 +205,7 @@ WRITE32_HANDLER( ms32_gfxctrl_w )
/* SPRITES based on tetrisp2 for now, readd priority bits later */
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, bitmap_t *bitmap_pri, const rectangle &cliprect, UINT16 *sprram_top, size_t sprram_size, int gfxnum, int reverseorder)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, bitmap_t &bitmap_pri, const rectangle &cliprect, UINT16 *sprram_top, size_t sprram_size, int gfxnum, int reverseorder)
{
int tx, ty, sx, sy, flipx, flipy;
int xsize, ysize;
@@ -275,7 +275,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap, bitmap_t *b
}
-static void draw_roz(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect,int priority)
+static void draw_roz(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect,int priority)
{
ms32_state *state = machine.driver_data<ms32_state>();
/* TODO: registers 0x40/4 / 0x44/4 and 0x50/4 / 0x54/4 are used, meaning unknown */
@@ -392,7 +392,7 @@ SCREEN_UPDATE( ms32 )
tilemap_set_scrolly(state->m_bg_tilemap_alt, 0, scrolly);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
@@ -404,7 +404,7 @@ SCREEN_UPDATE( ms32 )
state->m_temp_bitmap_sprites->fill(0, cliprect);
state->m_temp_bitmap_sprites_pri->fill(0, cliprect);
- draw_sprites(screen.machine(), state->m_temp_bitmap_sprites, state->m_temp_bitmap_sprites_pri, cliprect, state->m_sprram_16, 0x20000, 0, state->m_reverse_sprite_order);
+ draw_sprites(screen.machine(), *state->m_temp_bitmap_sprites, *state->m_temp_bitmap_sprites_pri, cliprect, state->m_sprram_16, 0x20000, 0, state->m_reverse_sprite_order);
@@ -427,46 +427,46 @@ SCREEN_UPDATE( ms32 )
rot_pri++;
if (rot_pri == 0)
- draw_roz(screen.machine(), state->m_temp_bitmap_tilemaps, cliprect, 1 << 1);
+ draw_roz(screen.machine(), *state->m_temp_bitmap_tilemaps, cliprect, 1 << 1);
else if (scr_pri == 0)
if (state->m_tilemaplayoutcontrol&1)
{
- tilemap_draw(state->m_temp_bitmap_tilemaps,cliprect, state->m_bg_tilemap_alt, 0, 1 << 0);
+ tilemap_draw(*state->m_temp_bitmap_tilemaps,cliprect, state->m_bg_tilemap_alt, 0, 1 << 0);
}
else
{
- tilemap_draw(state->m_temp_bitmap_tilemaps,cliprect, state->m_bg_tilemap, 0, 1 << 0);
+ tilemap_draw(*state->m_temp_bitmap_tilemaps,cliprect, state->m_bg_tilemap, 0, 1 << 0);
}
else if (asc_pri == 0)
- tilemap_draw(state->m_temp_bitmap_tilemaps,cliprect, state->m_tx_tilemap, 0, 1 << 2);
+ tilemap_draw(*state->m_temp_bitmap_tilemaps,cliprect, state->m_tx_tilemap, 0, 1 << 2);
if (rot_pri == 1)
- draw_roz(screen.machine(), state->m_temp_bitmap_tilemaps, cliprect, 1 << 1);
+ draw_roz(screen.machine(), *state->m_temp_bitmap_tilemaps, cliprect, 1 << 1);
else if (scr_pri == 1)
if (state->m_tilemaplayoutcontrol&1)
{
- tilemap_draw(state->m_temp_bitmap_tilemaps,cliprect, state->m_bg_tilemap_alt, 0, 1 << 0);
+ tilemap_draw(*state->m_temp_bitmap_tilemaps,cliprect, state->m_bg_tilemap_alt, 0, 1 << 0);
}
else
{
- tilemap_draw(state->m_temp_bitmap_tilemaps,cliprect, state->m_bg_tilemap, 0, 1 << 0);
+ tilemap_draw(*state->m_temp_bitmap_tilemaps,cliprect, state->m_bg_tilemap, 0, 1 << 0);
}
else if (asc_pri == 1)
- tilemap_draw(state->m_temp_bitmap_tilemaps,cliprect, state->m_tx_tilemap, 0, 1 << 2);
+ tilemap_draw(*state->m_temp_bitmap_tilemaps,cliprect, state->m_tx_tilemap, 0, 1 << 2);
if (rot_pri == 2)
- draw_roz(screen.machine(), state->m_temp_bitmap_tilemaps, cliprect, 1 << 1);
+ draw_roz(screen.machine(), *state->m_temp_bitmap_tilemaps, cliprect, 1 << 1);
else if (scr_pri == 2)
if (state->m_tilemaplayoutcontrol&1)
{
- tilemap_draw(state->m_temp_bitmap_tilemaps,cliprect, state->m_bg_tilemap_alt, 0, 1 << 0);
+ tilemap_draw(*state->m_temp_bitmap_tilemaps,cliprect, state->m_bg_tilemap_alt, 0, 1 << 0);
}
else
{
- tilemap_draw(state->m_temp_bitmap_tilemaps,cliprect, state->m_bg_tilemap, 0, 1 << 0);
+ tilemap_draw(*state->m_temp_bitmap_tilemaps,cliprect, state->m_bg_tilemap, 0, 1 << 0);
}
else if (asc_pri == 2)
- tilemap_draw(state->m_temp_bitmap_tilemaps,cliprect, state->m_tx_tilemap, 0, 1 << 2);
+ tilemap_draw(*state->m_temp_bitmap_tilemaps,cliprect, state->m_tx_tilemap, 0, 1 << 2);
/* MIX it! */
/* this mixing isn't 100% accurate, it should be using ALL the data in
@@ -485,15 +485,15 @@ SCREEN_UPDATE( ms32 )
UINT32* dstptr_bitmap;
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
for (yy=0;yy<height;yy++)
{
srcptr_tile = &state->m_temp_bitmap_tilemaps->pix16(yy);
- srcptr_tilepri = &screen.machine().priority_bitmap->pix8(yy);
+ srcptr_tilepri = &screen.machine().priority_bitmap.pix8(yy);
srcptr_spri = &state->m_temp_bitmap_sprites->pix16(yy);
//srcptr_spripri = &state->m_temp_bitmap_sprites_pri->pix8(yy);
- dstptr_bitmap = &bitmap->pix32(yy);
+ dstptr_bitmap = &bitmap.pix32(yy);
for (xx=0;xx<width;xx++)
{
UINT16 src_tile = srcptr_tile[xx];
diff --git a/src/mame/video/msisaac.c b/src/mame/video/msisaac.c
index b4615816a83..403e2928d41 100644
--- a/src/mame/video/msisaac.c
+++ b/src/mame/video/msisaac.c
@@ -161,7 +161,7 @@ WRITE8_HANDLER( msisaac_fg_videoram_w )
Display refresh
***************************************************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
msisaac_state *state = machine.driver_data<msisaac_state>();
const UINT8 *source = state->m_spriteram + 32 * 4 - 4;
diff --git a/src/mame/video/mugsmash.c b/src/mame/video/mugsmash.c
index 7bfefd3c4e4..e131e9249e1 100644
--- a/src/mame/video/mugsmash.c
+++ b/src/mame/video/mugsmash.c
@@ -3,7 +3,7 @@
#include "emu.h"
#include "includes/mugsmash.h"
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
/* Each Sprite takes 16 bytes, 5 used? */
diff --git a/src/mame/video/munchmo.c b/src/mame/video/munchmo.c
index 542bde356ae..b133ca1d1d0 100644
--- a/src/mame/video/munchmo.c
+++ b/src/mame/video/munchmo.c
@@ -48,7 +48,7 @@ VIDEO_START( mnchmobl )
state->m_tmpbitmap = auto_bitmap_alloc(machine, 512, 512, machine.primary_screen->format());
}
-static void draw_status( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_status( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
munchmo_state *state = machine.driver_data<munchmo_state>();
const gfx_element *gfx = machine.gfx[0];
@@ -76,7 +76,7 @@ static void draw_status( running_machine &machine, bitmap_t *bitmap, const recta
}
}
-static void draw_background( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_background( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
/*
ROM B1.2C contains 256 tilemaps defining 4x4 configurations of
@@ -98,7 +98,7 @@ static void draw_background( running_machine &machine, bitmap_t *bitmap, const r
{
for (col = 0; col < 4; col++)
{
- drawgfx_opaque(state->m_tmpbitmap, state->m_tmpbitmap->cliprect(), gfx,
+ drawgfx_opaque(*state->m_tmpbitmap, state->m_tmpbitmap->cliprect(), gfx,
rom[col + tile_number * 4 + row * 0x400],
state->m_palette_bank,
0,0, /* flip */
@@ -111,11 +111,11 @@ static void draw_background( running_machine &machine, bitmap_t *bitmap, const r
int scrollx = -(state->m_vreg[6] *2 + (state->m_vreg[7] >> 7)) - 64 - 128 - 16;
int scrolly = 0;
- copyscrollbitmap(bitmap, state->m_tmpbitmap, 1, &scrollx, 1, &scrolly, cliprect);
+ copyscrollbitmap(bitmap, *state->m_tmpbitmap, 1, &scrollx, 1, &scrolly, cliprect);
}
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
munchmo_state *state = machine.driver_data<munchmo_state>();
int scroll = state->m_vreg[6];
diff --git a/src/mame/video/mustache.c b/src/mame/video/mustache.c
index b6f9960b7bc..ad5ef69f44e 100644
--- a/src/mame/video/mustache.c
+++ b/src/mame/video/mustache.c
@@ -100,7 +100,7 @@ VIDEO_START( mustache )
tilemap_set_scroll_rows(state->m_bg_tilemap, 4);
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
mustache_state *state = machine.driver_data<mustache_state>();
rectangle clip = cliprect;
diff --git a/src/mame/video/mw8080bw.c b/src/mame/video/mw8080bw.c
index 4582966506e..fc6c39c6a55 100644
--- a/src/mame/video/mw8080bw.c
+++ b/src/mame/video/mw8080bw.c
@@ -19,7 +19,7 @@ SCREEN_UPDATE( mw8080bw )
{
/* plot the current pixel */
pen_t pen = (video_data & 0x01) ? RGB_WHITE : RGB_BLACK;
- bitmap->pix32(y - MW8080BW_VCOUNTER_START_NO_VBLANK, x) = pen;
+ bitmap.pix32(y - MW8080BW_VCOUNTER_START_NO_VBLANK, x) = pen;
/* next pixel */
video_data = video_data >> 1;
@@ -34,7 +34,7 @@ SCREEN_UPDATE( mw8080bw )
for (i = 0; i < 4; i++)
{
pen = (video_data & 0x01) ? RGB_WHITE : RGB_BLACK;
- bitmap->pix32(y - MW8080BW_VCOUNTER_START_NO_VBLANK, 256 + i) = pen;
+ bitmap.pix32(y - MW8080BW_VCOUNTER_START_NO_VBLANK, 256 + i) = pen;
video_data = video_data >> 1;
}
@@ -121,7 +121,7 @@ SCREEN_UPDATE( spcenctr )
pen = line_buf[x] ? PHANTOM2_BOTTOM_TRENCH_LIGHT_RGB32_PEN : PHANTOM2_BOTTOM_TRENCH_DARK_RGB32_PEN;
}
- bitmap->pix32(y - MW8080BW_VCOUNTER_START_NO_VBLANK, x) = pen;
+ bitmap.pix32(y - MW8080BW_VCOUNTER_START_NO_VBLANK, x) = pen;
center = center + 1;
width = width + ((center & 0x80) ? -1 : 1);
@@ -143,7 +143,7 @@ SCREEN_UPDATE( spcenctr )
for (i = 0; i < 4; i++)
{
pen = (video_data & 0x01) ? RGB_WHITE : RGB_BLACK;
- bitmap->pix32(y - MW8080BW_VCOUNTER_START_NO_VBLANK, 256 + i) = pen;
+ bitmap.pix32(y - MW8080BW_VCOUNTER_START_NO_VBLANK, 256 + i) = pen;
video_data = video_data >> 1;
}
@@ -246,7 +246,7 @@ SCREEN_UPDATE( phantom2 )
else
pen = bit ? RGB_WHITE : RGB_BLACK;
- bitmap->pix32(y - MW8080BW_VCOUNTER_START_NO_VBLANK, x) = pen;
+ bitmap.pix32(y - MW8080BW_VCOUNTER_START_NO_VBLANK, x) = pen;
/* move to next pixel -- if ripple carry is currently set,
prepare for loading the shift register */
@@ -280,7 +280,7 @@ SCREEN_UPDATE( phantom2 )
for (i = 0; i < 4; i++)
{
pen = (video_data & 0x01) ? RGB_WHITE : RGB_BLACK;
- bitmap->pix32(y - MW8080BW_VCOUNTER_START_NO_VBLANK, 256 + i) = pen;
+ bitmap.pix32(y - MW8080BW_VCOUNTER_START_NO_VBLANK, 256 + i) = pen;
video_data = video_data >> 1;
}
@@ -345,9 +345,9 @@ SCREEN_UPDATE( invaders )
pen_t pen = (video_data & 0x01) ? RGB_WHITE : RGB_BLACK;
if (flip)
- bitmap->pix32(MW8080BW_VBSTART - 1 - (y - MW8080BW_VCOUNTER_START_NO_VBLANK), MW8080BW_HPIXCOUNT - 1 - x) = pen;
+ bitmap.pix32(MW8080BW_VBSTART - 1 - (y - MW8080BW_VCOUNTER_START_NO_VBLANK), MW8080BW_HPIXCOUNT - 1 - x) = pen;
else
- bitmap->pix32(y - MW8080BW_VCOUNTER_START_NO_VBLANK, x) = pen;
+ bitmap.pix32(y - MW8080BW_VCOUNTER_START_NO_VBLANK, x) = pen;
/* next pixel */
video_data = video_data >> 1;
@@ -364,9 +364,9 @@ SCREEN_UPDATE( invaders )
pen = (video_data & 0x01) ? RGB_WHITE : RGB_BLACK;
if (flip)
- bitmap->pix32(MW8080BW_VBSTART - 1 - (y - MW8080BW_VCOUNTER_START_NO_VBLANK), MW8080BW_HPIXCOUNT - 1 - (256 + i)) = pen;
+ bitmap.pix32(MW8080BW_VBSTART - 1 - (y - MW8080BW_VCOUNTER_START_NO_VBLANK), MW8080BW_HPIXCOUNT - 1 - (256 + i)) = pen;
else
- bitmap->pix32(y - MW8080BW_VCOUNTER_START_NO_VBLANK, 256 + i) = pen;
+ bitmap.pix32(y - MW8080BW_VCOUNTER_START_NO_VBLANK, 256 + i) = pen;
video_data = video_data >> 1;
}
diff --git a/src/mame/video/mystston.c b/src/mame/video/mystston.c
index f8e1bbd6ac1..e54300a6cf9 100644
--- a/src/mame/video/mystston.c
+++ b/src/mame/video/mystston.c
@@ -179,7 +179,7 @@ static TILE_GET_INFO( get_fg_tile_info )
*
*************************************/
-static void draw_sprites(bitmap_t *bitmap, const rectangle &cliprect, const gfx_element *gfx, int flip)
+static void draw_sprites(bitmap_t &bitmap, const rectangle &cliprect, const gfx_element *gfx, int flip)
{
mystston_state *state = gfx->machine().driver_data<mystston_state>();
int offs;
diff --git a/src/mame/video/n64.c b/src/mame/video/n64.c
index 4a24b0889cb..b6137c9552a 100644
--- a/src/mame/video/n64.c
+++ b/src/mame/video/n64.c
@@ -66,7 +66,7 @@ void Processor::GetAlphaCvg(UINT8 *comb_alpha)
/*****************************************************************************/
-void Processor::VideoUpdate(bitmap_t *bitmap)
+void Processor::VideoUpdate(bitmap_t &bitmap)
{
switch(n64_vi_control & 0x3)
{
@@ -84,7 +84,7 @@ void Processor::VideoUpdate(bitmap_t *bitmap)
}
}
-void Processor::VideoUpdate16(bitmap_t *bitmap)
+void Processor::VideoUpdate16(bitmap_t &bitmap)
{
int fsaa = (((n64_vi_control >> 8) & 3) < 2);
int divot = (n64_vi_control >> 4) & 1;
@@ -124,7 +124,7 @@ void Processor::VideoUpdate16(bitmap_t *bitmap)
{
for(int j = 0; j < vres; j++)
{
- UINT32 *d = &bitmap->pix32(j);
+ UINT32 *d = &bitmap.pix32(j);
for(int i = 0; i < hres; i++)
{
@@ -218,7 +218,7 @@ void Processor::VideoUpdate16(bitmap_t *bitmap)
}
}
-void Processor::VideoUpdate32(bitmap_t *bitmap)
+void Processor::VideoUpdate32(bitmap_t &bitmap)
{
int gamma = (n64_vi_control >> 3) & 1;
int gamma_dither = (n64_vi_control >> 2) & 1;
@@ -250,7 +250,7 @@ void Processor::VideoUpdate32(bitmap_t *bitmap)
{
for (int j = 0; j < vres; j++)
{
- UINT32 *d = &bitmap->pix32(j);
+ UINT32 *d = &bitmap.pix32(j);
for (int i = 0; i < hres; i++)
{
UINT32 pix = *frame_buffer32++;
@@ -3314,7 +3314,7 @@ SCREEN_UPDATE(n64)
{
for (int j = 0; j <height; j++)
{
- UINT32 *d = &bitmap->pix32(j);
+ UINT32 *d = &bitmap.pix32(j);
for (int i = 0; i < state->m_rdp.GetMiscState()->m_fb_width; i++)
{
d[BYTE_XOR_BE(i)] = 0;
diff --git a/src/mame/video/n64.h b/src/mame/video/n64.h
index 582d395a60a..5742de96754 100644
--- a/src/mame/video/n64.h
+++ b/src/mame/video/n64.h
@@ -574,7 +574,7 @@ class Processor
bool ZCompare(UINT32 zcurpixel, UINT32 dzcurpixel, UINT32 sz, UINT16 dzpix);
// Fullscreen update-related
- void VideoUpdate(bitmap_t *bitmap);
+ void VideoUpdate(bitmap_t &bitmap);
// Commands
void CmdInvalid(UINT32 w1, UINT32 w2);
@@ -754,8 +754,8 @@ class Processor
static const ZDecompressEntry z_dec_table[8];
// Internal screen-update functions
- void VideoUpdate16(bitmap_t *bitmap);
- void VideoUpdate32(bitmap_t *bitmap);
+ void VideoUpdate16(bitmap_t &bitmap);
+ void VideoUpdate32(bitmap_t &bitmap);
typedef void (*Command)(UINT32 w1, UINT32 w2);
diff --git a/src/mame/video/n8080.c b/src/mame/video/n8080.c
index f048c60eb24..f2b406d2912 100644
--- a/src/mame/video/n8080.c
+++ b/src/mame/video/n8080.c
@@ -152,7 +152,7 @@ SCREEN_UPDATE( spacefev )
for (y = 0; y < 256; y++)
{
- UINT16* pLine = &bitmap->pix16(y ^ mask);
+ UINT16* pLine = &bitmap.pix16(y ^ mask);
for (x = 0; x < 256; x += 8)
{
@@ -223,7 +223,7 @@ SCREEN_UPDATE( sheriff )
for (y = 0; y < 256; y++)
{
- UINT16* pLine = &bitmap->pix16(y ^ mask);
+ UINT16* pLine = &bitmap.pix16(y ^ mask);
for (x = 0; x < 256; x += 8)
{
@@ -268,7 +268,7 @@ SCREEN_UPDATE( helifire )
for (y = 0; y < 256; y++)
{
- UINT16* pLine = &bitmap->pix16(y);
+ UINT16* pLine = &bitmap.pix16(y);
int level = 120 + wave[state->m_helifire_mv & 7];
diff --git a/src/mame/video/namcofl.c b/src/mame/video/namcofl.c
index a678fb19775..4378b98c048 100644
--- a/src/mame/video/namcofl.c
+++ b/src/mame/video/namcofl.c
@@ -86,7 +86,7 @@ SCREEN_UPDATE( namcofl )
namcofl_install_palette(screen.machine());
- bitmap->fill(get_black_pen(screen.machine()), cliprect );
+ bitmap.fill(get_black_pen(screen.machine()), cliprect );
for( pri=0; pri<16; pri++ )
{
diff --git a/src/mame/video/namcona1.c b/src/mame/video/namcona1.c
index 398b6e8f5a8..e3d29dc2295 100644
--- a/src/mame/video/namcona1.c
+++ b/src/mame/video/namcona1.c
@@ -311,7 +311,7 @@ VIDEO_START( namcona1 )
/*************************************************************************/
static void pdraw_tile(running_machine &machine,
- bitmap_t *dest_bmp,
+ bitmap_t &dest_bmp,
const rectangle &clip,
UINT32 code,
int color,
@@ -396,8 +396,8 @@ static void pdraw_tile(running_machine &machine,
{
const UINT8 *source = source_base + (y_index>>16) * gfx->line_modulo;
const UINT8 *mask_addr = mask_base + (y_index>>16) * mask->line_modulo;
- UINT16 *dest = &dest_bmp->pix16(y);
- UINT8 *pri = &machine.priority_bitmap->pix8(y);
+ UINT16 *dest = &dest_bmp.pix16(y);
+ UINT8 *pri = &machine.priority_bitmap.pix8(y);
int x, x_index = x_index_base;
for( x=sx; x<ex; x++ )
@@ -453,7 +453,7 @@ static void pdraw_tile(running_machine &machine,
}
} /* pdraw_tile */
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
namcona1_state *state = machine.driver_data<namcona1_state>();
int which;
@@ -550,7 +550,7 @@ static void draw_pixel_line( UINT16 *pDest, UINT8 *pPri, UINT16 *pSource, const
} /* next x */
} /* draw_pixel_line */
-static void draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int which, int primask )
+static void draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int which, int primask )
{
namcona1_state *state = machine.driver_data<namcona1_state>();
UINT16 *videoram = state->m_videoram;
@@ -602,8 +602,8 @@ static void draw_background(running_machine &machine, bitmap_t *bitmap, const re
* feature, Numan Athletics.
*/
draw_pixel_line(
- &bitmap->pix16(line),
- &machine.priority_bitmap->pix8(line),
+ &bitmap.pix16(line),
+ &machine.priority_bitmap.pix8(line),
videoram + ydata + 25,
paldata );
}
@@ -674,9 +674,9 @@ SCREEN_UPDATE( namcona1 )
}
}
- screen.machine().priority_bitmap->fill(0, cliprect );
+ screen.machine().priority_bitmap.fill(0, cliprect );
- bitmap->fill(0xff, cliprect ); /* background color? */
+ bitmap.fill(0xff, cliprect ); /* background color? */
for( priority = 0; priority<8; priority++ )
{
diff --git a/src/mame/video/namconb1.c b/src/mame/video/namconb1.c
index 78894ba1bcc..aebf38d7849 100644
--- a/src/mame/video/namconb1.c
+++ b/src/mame/video/namconb1.c
@@ -102,7 +102,7 @@ static void namconb1_install_palette(running_machine &machine)
} /* namconb1_install_palette */
static void
-video_update_common(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int bROZ )
+video_update_common(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int bROZ )
{
int pri;
namconb1_install_palette(machine);
@@ -148,7 +148,7 @@ SCREEN_UPDATE( namconb1 )
if( clip.max_x > cliprect.max_x ){ clip.max_x = cliprect.max_x; }
if( clip.max_y > cliprect.max_y ){ clip.max_y = cliprect.max_y; }
- bitmap->fill(get_black_pen(screen.machine()), cliprect );
+ bitmap.fill(get_black_pen(screen.machine()), cliprect );
video_update_common( screen.machine(), bitmap, clip, 0 );
@@ -189,7 +189,7 @@ SCREEN_UPDATE( namconb2 )
if( clip.max_x > cliprect.max_x ){ clip.max_x = cliprect.max_x; }
if( clip.max_y > cliprect.max_y ){ clip.max_y = cliprect.max_y; }
- bitmap->fill(get_black_pen(screen.machine()), cliprect );
+ bitmap.fill(get_black_pen(screen.machine()), cliprect );
if( memcmp(state->m_tilemap_tile_bank,state->m_tilebank32,sizeof(state->m_tilemap_tile_bank))!=0 )
{
diff --git a/src/mame/video/namcos1.c b/src/mame/video/namcos1.c
index 2a48eca5e2d..9b60e3bdb00 100644
--- a/src/mame/video/namcos1.c
+++ b/src/mame/video/namcos1.c
@@ -298,7 +298,7 @@ sprite format:
15 xxxxxxxx Y position
*/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
namcos1_state *state = machine.driver_data<namcos1_state>();
UINT8 *spriteram = state->m_spriteram + 0x800;
@@ -383,7 +383,7 @@ SCREEN_UPDATE( namcos1 )
/* background color */
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
/* berabohm uses asymmetrical visibility windows to iris on the character */
i = ((state->m_cus116[0] << 8) | state->m_cus116[1]) - 1; // min x
@@ -422,7 +422,7 @@ SCREEN_UPDATE( namcos1 )
}
- screen.machine().priority_bitmap->fill(0, new_clip);
+ screen.machine().priority_bitmap.fill(0, new_clip);
/* bit 0-2 priority */
/* bit 3 disable */
diff --git a/src/mame/video/namcos2.c b/src/mame/video/namcos2.c
index 562cd2ca979..4879386a2a6 100644
--- a/src/mame/video/namcos2.c
+++ b/src/mame/video/namcos2.c
@@ -74,16 +74,16 @@ struct RozParam
INLINE void
DrawRozHelperBlock(const struct RozParam *rozInfo, int destx, int desty,
int srcx, int srcy, int width, int height,
- bitmap_t *destbitmap, bitmap_t *flagsbitmap,
- bitmap_t *srcbitmap, UINT32 size_mask)
+ bitmap_t &destbitmap, bitmap_t &flagsbitmap,
+ bitmap_t &srcbitmap, UINT32 size_mask)
{
int desty_end = desty + height;
int end_incrx = rozInfo->incyx - (width * rozInfo->incxx);
int end_incry = rozInfo->incyy - (width * rozInfo->incxy);
- UINT16 *dest = &destbitmap->pix16(desty, destx);
- int dest_rowinc = destbitmap->rowpixels() - width;
+ UINT16 *dest = &destbitmap.pix16(desty, destx);
+ int dest_rowinc = destbitmap.rowpixels() - width;
while (desty < desty_end)
{
@@ -103,9 +103,9 @@ DrawRozHelperBlock(const struct RozParam *rozInfo, int destx, int desty,
goto L_SkipPixel;
}
- if (flagsbitmap->pix8(ypos, xpos) & TILEMAP_PIXEL_LAYER0)
+ if (flagsbitmap.pix8(ypos, xpos) & TILEMAP_PIXEL_LAYER0)
{
- *dest = srcbitmap->pix16(ypos, xpos) + rozInfo->color;
+ *dest = srcbitmap.pix16(ypos, xpos) + rozInfo->color;
}
L_SkipPixel:
@@ -123,14 +123,14 @@ DrawRozHelperBlock(const struct RozParam *rozInfo, int destx, int desty,
static void
DrawRozHelper(
- bitmap_t *bitmap,
+ bitmap_t &bitmap,
tilemap_t *tmap,
const rectangle &clip,
const struct RozParam *rozInfo )
{
tilemap_set_palette_offset( tmap, rozInfo->color );
- if( bitmap->bpp() == 16 )
+ if( bitmap.bpp() == 16 )
{
/* On many processors, the simple approach of an outer loop over the
rows of the destination bitmap with an inner loop over the columns
@@ -162,8 +162,8 @@ DrawRozHelper(
#define ROZ_BLOCK_SIZE 8
UINT32 size_mask = rozInfo->size - 1;
- bitmap_t *srcbitmap = tilemap_get_pixmap(tmap);
- bitmap_t *flagsbitmap = tilemap_get_flagsmap(tmap);
+ bitmap_t &srcbitmap = tilemap_get_pixmap(tmap);
+ bitmap_t &flagsbitmap = tilemap_get_flagsmap(tmap);
UINT32 srcx = (rozInfo->startx + (clip.min_x * rozInfo->incxx) +
(clip.min_y * rozInfo->incyx));
UINT32 srcy = (rozInfo->starty + (clip.min_x * rozInfo->incxy) +
@@ -245,7 +245,7 @@ DrawRozHelper(
} /* DrawRozHelper */
static void
-DrawROZ(bitmap_t *bitmap,const rectangle &cliprect)
+DrawROZ(bitmap_t &bitmap,const rectangle &cliprect)
{
const int xoffset = 38,yoffset = 0;
struct RozParam rozParam;
@@ -466,7 +466,7 @@ SCREEN_UPDATE( namcos2_default )
int pri;
UpdatePalette(screen.machine());
- bitmap->fill(get_black_pen(screen.machine()), cliprect );
+ bitmap.fill(get_black_pen(screen.machine()), cliprect );
ApplyClip( clip, cliprect );
/* HACK: enable ROZ layer only if it has priority > 0 */
@@ -503,7 +503,7 @@ SCREEN_UPDATE( finallap )
int pri;
UpdatePalette(screen.machine());
- bitmap->fill(get_black_pen(screen.machine()), cliprect );
+ bitmap.fill(get_black_pen(screen.machine()), cliprect );
ApplyClip( clip, cliprect );
for( pri=0; pri<16; pri++ )
@@ -540,7 +540,7 @@ SCREEN_UPDATE( luckywld )
int pri;
UpdatePalette(screen.machine());
- bitmap->fill(get_black_pen(screen.machine()), cliprect );
+ bitmap.fill(get_black_pen(screen.machine()), cliprect );
ApplyClip( clip, cliprect );
for( pri=0; pri<16; pri++ )
@@ -573,7 +573,7 @@ SCREEN_UPDATE( sgunner )
int pri;
UpdatePalette(screen.machine());
- bitmap->fill(get_black_pen(screen.machine()), cliprect );
+ bitmap.fill(get_black_pen(screen.machine()), cliprect );
ApplyClip( clip, cliprect );
for( pri=0; pri<8; pri++ )
@@ -599,7 +599,7 @@ SCREEN_UPDATE( metlhawk )
int pri;
UpdatePalette(screen.machine());
- bitmap->fill(get_black_pen(screen.machine()), cliprect );
+ bitmap.fill(get_black_pen(screen.machine()), cliprect );
ApplyClip( clip, cliprect );
for( pri=0; pri<16; pri++ )
diff --git a/src/mame/video/namcos21.c b/src/mame/video/namcos21.c
index 0d8218a132b..369b4b3f312 100644
--- a/src/mame/video/namcos21.c
+++ b/src/mame/video/namcos21.c
@@ -98,13 +98,13 @@ namcos21_ClearPolyFrameBuffer( running_machine &machine )
} /* namcos21_ClearPolyFrameBuffer */
static void
-CopyVisiblePolyFrameBuffer( running_machine &machine, bitmap_t *bitmap, const rectangle &clip, int zlo, int zhi )
+CopyVisiblePolyFrameBuffer( running_machine &machine, bitmap_t &bitmap, const rectangle &clip, int zlo, int zhi )
{
namcos21_state *state = machine.driver_data<namcos21_state>(); /* blit the visible framebuffer */
int sy;
for( sy=clip.min_y; sy<=clip.max_y; sy++ )
{
- UINT16 *dest = &bitmap->pix16(sy);
+ UINT16 *dest = &bitmap.pix16(sy);
const UINT16 *pPen = state->m_mpPolyFrameBufferPens2+NAMCOS21_POLY_FRAME_WIDTH*sy;
const UINT16 *pZ = state->m_mpPolyFrameBufferZ2+NAMCOS21_POLY_FRAME_WIDTH*sy;
int sx;
@@ -179,7 +179,7 @@ SCREEN_UPDATE( namcos21 )
int pivot = 3;
int pri;
update_palette(screen.machine());
- bitmap->fill(0xff, cliprect );
+ bitmap.fill(0xff, cliprect );
if( namcos2_gametype != NAMCOS21_WINRUN91 )
{ /* draw low priority 2d sprites */
@@ -214,7 +214,7 @@ SCREEN_UPDATE( namcos21 )
for( sy=cliprect.min_y; sy<=cliprect.max_y; sy++ )
{
const UINT8 *pSource = &videoram[((yscroll+sy)&0x3ff)*0x200];
- UINT16 *pDest = &bitmap->pix16(sy);
+ UINT16 *pDest = &bitmap.pix16(sy);
for( sx=cliprect.min_x; sx<=cliprect.max_x; sx++ )
{
int pen = pSource[sx];
diff --git a/src/mame/video/namcos22.c b/src/mame/video/namcos22.c
index 222137e1ce6..21882fdf2ac 100644
--- a/src/mame/video/namcos22.c
+++ b/src/mame/video/namcos22.c
@@ -522,7 +522,7 @@ static void renderscanline_uvi_full(void *destbase, INT32 scanline, const poly_e
}
} /* renderscanline_uvi_full */
-static void poly3d_DrawQuad(running_machine &machine, bitmap_t *bitmap, int textureBank, int color, Poly3dVertex pv[4], int flags, int cz_adjust, int direct, int cmode )
+static void poly3d_DrawQuad(running_machine &machine, bitmap_t &bitmap, int textureBank, int color, Poly3dVertex pv[4], int flags, int cz_adjust, int direct, int cmode )
{
namcos22_state *state = machine.driver_data<namcos22_state>();
poly_extra_data *extra = (poly_extra_data *)poly_get_extra_data(state->m_poly);
@@ -537,7 +537,7 @@ static void poly3d_DrawQuad(running_machine &machine, bitmap_t *bitmap, int text
extra->fogFactor = 0;
extra->pens = &machine.pens[(color&0x7f)<<8];
- extra->priority_bitmap = machine.priority_bitmap;
+ extra->priority_bitmap = &machine.priority_bitmap;
extra->bn = textureBank;
extra->flags = flags;
extra->cz_adjust = cz_adjust;
@@ -726,7 +726,7 @@ static void poly3d_DrawQuad(running_machine &machine, bitmap_t *bitmap, int text
}
}
- poly_render_triangle_fan(state->m_poly, bitmap, mClip.scissor, renderscanline_uvi_full, 4, clipverts, clipv);
+ poly_render_triangle_fan(state->m_poly, &bitmap, mClip.scissor, renderscanline_uvi_full, 4, clipverts, clipv);
}
static void renderscanline_sprite(void *destbase, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid)
@@ -779,7 +779,7 @@ static void renderscanline_sprite(void *destbase, INT32 scanline, const poly_ext
static void
poly3d_DrawSprite(
- bitmap_t *dest_bmp, const gfx_element *gfx, UINT32 code,
+ bitmap_t &dest_bmp, const gfx_element *gfx, UINT32 code,
UINT32 color, int flipx, int flipy, int sx, int sy,
int scalex, int scaley, int cz_factor, int prioverchar, int alpha )
{
@@ -808,7 +808,7 @@ poly3d_DrawSprite(
extra->flipx = flipx;
extra->flipy = flipy;
extra->pens = &gfx->machine().pens[gfx->color_base + gfx->color_granularity * (color&0x7f)];
- extra->priority_bitmap = gfx->machine().priority_bitmap;
+ extra->priority_bitmap = &gfx->machine().priority_bitmap;
extra->source = gfx_element_get_data(gfx, code % gfx->total_elements);
vert[0].x = fsx;
@@ -843,12 +843,12 @@ poly3d_DrawSprite(
rgb_comp_to_rgbint(&extra->fogColor, mixer.rFogColor, mixer.gFogColor, mixer.bFogColor);
}
- poly_render_triangle_fan(state->m_poly, dest_bmp, mClip.scissor, renderscanline_sprite, 2, 4, vert);
+ poly_render_triangle_fan(state->m_poly, &dest_bmp, mClip.scissor, renderscanline_sprite, 2, 4, vert);
}
} /* poly3d_DrawSprite */
static void
-ApplyGamma( running_machine &machine, bitmap_t *bitmap )
+ApplyGamma( running_machine &machine, bitmap_t &bitmap )
{
namcos22_state *state = machine.driver_data<namcos22_state>();
int x,y;
@@ -857,10 +857,10 @@ ApplyGamma( running_machine &machine, bitmap_t *bitmap )
const UINT8 *rlut = (const UINT8 *)&state->m_gamma[0x100/4];
const UINT8 *glut = (const UINT8 *)&state->m_gamma[0x200/4];
const UINT8 *blut = (const UINT8 *)&state->m_gamma[0x300/4];
- for( y=0; y<bitmap->height(); y++ )
+ for( y=0; y<bitmap.height(); y++ )
{
- UINT32 *dest = &bitmap->pix32(y);
- for( x=0; x<bitmap->width(); x++ )
+ UINT32 *dest = &bitmap.pix32(y);
+ for( x=0; x<bitmap.width(); x++ )
{
int rgb = dest[x];
int r = rlut[NATIVE_ENDIAN_VALUE_LE_BE(3,0)^((rgb>>16)&0xff)];
@@ -875,10 +875,10 @@ ApplyGamma( running_machine &machine, bitmap_t *bitmap )
const UINT8 *rlut = 0x000+(const UINT8 *)machine.region("user1")->base();
const UINT8 *glut = 0x100+rlut;
const UINT8 *blut = 0x200+rlut;
- for( y=0; y<bitmap->height(); y++ )
+ for( y=0; y<bitmap.height(); y++ )
{
- UINT32 *dest = &bitmap->pix32(y);
- for( x=0; x<bitmap->width(); x++ )
+ UINT32 *dest = &bitmap.pix32(y);
+ for( x=0; x<bitmap.width(); x++ )
{
int rgb = dest[x];
int r = rlut[(rgb>>16)&0xff];
@@ -1077,7 +1077,7 @@ NewSceneNode( running_machine &machine, UINT32 zsortvalue24, SceneNodeType type
} /* NewSceneNode */
-static void RenderSprite(running_machine &machine, bitmap_t *bitmap, struct SceneNode *node )
+static void RenderSprite(running_machine &machine, bitmap_t &bitmap, struct SceneNode *node )
{
namcos22_state *state = machine.driver_data<namcos22_state>();
int tile = node->data.sprite.tile;
@@ -1113,7 +1113,7 @@ static void RenderSprite(running_machine &machine, bitmap_t *bitmap, struct Scen
} /* next row */
} /* RenderSprite */
-static void RenderSceneHelper(running_machine &machine, bitmap_t *bitmap, struct SceneNode *node )
+static void RenderSceneHelper(running_machine &machine, bitmap_t &bitmap, struct SceneNode *node )
{
if( node )
{
@@ -1174,7 +1174,7 @@ static void RenderSceneHelper(running_machine &machine, bitmap_t *bitmap, struct
}
} /* RenderSceneHelper */
-static void RenderScene(running_machine &machine, bitmap_t *bitmap )
+static void RenderScene(running_machine &machine, bitmap_t &bitmap )
{
namcos22_state *state = machine.driver_data<namcos22_state>();
struct SceneNode *node = &mSceneRoot;
@@ -1506,7 +1506,7 @@ Prepare3dTexture( running_machine &machine, void *pTilemapROM, void *pTextureROM
static void
DrawSpritesHelper(
running_machine &machine,
- bitmap_t *bitmap,
+ bitmap_t &bitmap,
const rectangle &cliprect,
UINT32 *pBase,
const UINT32 *pSource,
@@ -1641,7 +1641,7 @@ DrawSpritesHelper(
} /* DrawSpritesHelper */
static void
-DrawSprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+DrawSprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
namcos22_state *state = machine.driver_data<namcos22_state>();
UINT32 *spriteram32 = state->m_spriteram;
@@ -1957,7 +1957,7 @@ WRITE32_HANDLER( namcos22s_spotram_w )
}
}
-static void namcos22s_mix_textlayer( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int prival )
+static void namcos22s_mix_textlayer( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int prival )
{
namcos22_state *state = machine.driver_data<namcos22_state>();
const pen_t *pens = machine.pens;
@@ -1987,8 +1987,8 @@ static void namcos22s_mix_textlayer( running_machine &machine, bitmap_t *bitmap,
for (y=0;y<480;y++)
{
src = &state->m_mix_bitmap->pix16(y);
- dest = &bitmap->pix32(y);
- pri = &machine.priority_bitmap->pix8(y);
+ dest = &bitmap.pix32(y);
+ pri = &machine.priority_bitmap.pix8(y);
for (x=0;x<640;x++)
{
// skip if transparent or under poly/sprite
@@ -2041,7 +2041,7 @@ static void namcos22s_mix_textlayer( running_machine &machine, bitmap_t *bitmap,
}
}
-static void namcos22_mix_textlayer( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void namcos22_mix_textlayer( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
namcos22_state *state = machine.driver_data<namcos22_state>();
const pen_t *pens = machine.pens;
@@ -2064,8 +2064,8 @@ static void namcos22_mix_textlayer( running_machine &machine, bitmap_t *bitmap,
for (y=0;y<480;y++)
{
src = &state->m_mix_bitmap->pix16(y);
- dest = &bitmap->pix32(y);
- pri = &machine.priority_bitmap->pix8(y);
+ dest = &bitmap.pix32(y);
+ pri = &machine.priority_bitmap.pix8(y);
for (x=0;x<640;x++)
{
// skip if transparent or under poly
@@ -2099,7 +2099,7 @@ static void namcos22_mix_textlayer( running_machine &machine, bitmap_t *bitmap,
}
}
-static void DrawCharacterLayer(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void DrawCharacterLayer(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
namcos22_state *state = machine.driver_data<namcos22_state>();
int scroll_x = (state->m_tilemapattr[0]>>16) - 0x35c;
@@ -2111,12 +2111,12 @@ static void DrawCharacterLayer(running_machine &machine, bitmap_t *bitmap, const
if (state->m_mbSuperSystem22)
{
- tilemap_draw_primask(state->m_mix_bitmap, cliprect, state->m_bgtilemap, 0, 4, 4);
+ tilemap_draw_primask(*state->m_mix_bitmap, cliprect, state->m_bgtilemap, 0, 4, 4);
namcos22s_mix_textlayer(machine, bitmap, cliprect, 4);
}
else
{
- tilemap_draw_primask(state->m_mix_bitmap, cliprect, state->m_bgtilemap, 0, 2, 3);
+ tilemap_draw_primask(*state->m_mix_bitmap, cliprect, state->m_bgtilemap, 0, 2, 3);
namcos22_mix_textlayer(machine, bitmap, cliprect);
}
}
@@ -2171,7 +2171,7 @@ Signed18( UINT32 value )
static void
BlitQuadHelper(
running_machine &machine,
- bitmap_t *bitmap,
+ bitmap_t &bitmap,
unsigned color,
unsigned addr,
float m[4][4],
@@ -2339,7 +2339,7 @@ RegisterNormals( namcos22_state *state, INT32 addr, float m[4][4] )
} /* RegisterNormals */
static void
-BlitQuads( running_machine &machine, bitmap_t *bitmap, INT32 addr, float m[4][4], INT32 base )
+BlitQuads( running_machine &machine, bitmap_t &bitmap, INT32 addr, float m[4][4], INT32 base )
{
namcos22_state *state = machine.driver_data<namcos22_state>();
// int numAdditionalNormals = 0;
@@ -2430,7 +2430,7 @@ BlitQuads( running_machine &machine, bitmap_t *bitmap, INT32 addr, float m[4][4]
} /* BlitQuads */
static void
-BlitPolyObject( running_machine &machine, bitmap_t *bitmap, int code, float M[4][4] )
+BlitPolyObject( running_machine &machine, bitmap_t &bitmap, int code, float M[4][4] )
{
namcos22_state *state = machine.driver_data<namcos22_state>();
unsigned addr1 = GetPolyData(state, code);
@@ -2561,7 +2561,7 @@ HandleBB0003( namcos22_state *state, const INT32 *pSource )
} /* HandleBB0003 */
static void
-Handle200002( running_machine &machine, bitmap_t *bitmap, const INT32 *pSource )
+Handle200002( running_machine &machine, bitmap_t &bitmap, const INT32 *pSource )
{
namcos22_state *state = machine.driver_data<namcos22_state>();
if( state->m_mPrimitiveID>=0x45 )
@@ -2630,7 +2630,7 @@ Handle233002( namcos22_state *state, const INT32 *pSource )
} /* Handle233002 */
static void
-SimulateSlaveDSP( running_machine &machine, bitmap_t *bitmap )
+SimulateSlaveDSP( running_machine &machine, bitmap_t &bitmap )
{
namcos22_state *state = machine.driver_data<namcos22_state>();
const INT32 *pSource = 0x300 + (INT32 *)state->m_polygonram;
@@ -2696,7 +2696,7 @@ SimulateSlaveDSP( running_machine &machine, bitmap_t *bitmap )
} /* SimulateSlaveDSP */
static void
-DrawPolygons( running_machine &machine, bitmap_t *bitmap )
+DrawPolygons( running_machine &machine, bitmap_t &bitmap )
{
namcos22_state *state = machine.driver_data<namcos22_state>();
if( state->m_mbDSPisActive )
@@ -2817,7 +2817,7 @@ SCREEN_UPDATE( namcos22s )
UpdateVideoMixer(screen.machine());
UpdatePalette(screen.machine());
namcos22s_recalc_czram(screen.machine());
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
// background color
rgbint bg_color;
@@ -2828,7 +2828,7 @@ SCREEN_UPDATE( namcos22s )
rgb_comp_to_rgbint(&fade_color, mixer.rFadeColor, mixer.gFadeColor, mixer.bFadeColor);
rgbint_blend(&bg_color, &fade_color, 0xff - mixer.fadeFactor);
}
- bitmap->fill(rgbint_to_rgb(&bg_color), cliprect);
+ bitmap.fill(rgbint_to_rgb(&bg_color), cliprect);
// layers
UINT8 layer = nthbyte(state->m_gamma,0x1f);
@@ -2898,8 +2898,8 @@ SCREEN_UPDATE( namcos22 )
{
UpdateVideoMixer(screen.machine());
UpdatePalette(screen.machine());
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
DrawPolygons(screen.machine(), bitmap);
RenderScene(screen.machine(), bitmap);
DrawCharacterLayer(screen.machine(), bitmap, cliprect);
diff --git a/src/mame/video/namcos86.c b/src/mame/video/namcos86.c
index 198013c3064..a68c3c5cf4a 100644
--- a/src/mame/video/namcos86.c
+++ b/src/mame/video/namcos86.c
@@ -282,7 +282,7 @@ sprite format:
15 xxxxxxxx Y position
*/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
namcos86_state *state = machine.driver_data<namcos86_state>();
const UINT8 *source = &state->m_spriteram[0x0800-0x20]; /* the last is NOT a sprite */
@@ -376,9 +376,9 @@ SCREEN_UPDATE( namcos86 )
set_scroll(screen.machine(), 2);
set_scroll(screen.machine(), 3);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
- bitmap->fill(screen.machine().gfx[0]->color_base + 8*state->m_backcolor+7, cliprect);
+ bitmap.fill(screen.machine().gfx[0]->color_base + 8*state->m_backcolor+7, cliprect);
for (layer = 0;layer < 8;layer++)
{
diff --git a/src/mame/video/naughtyb.c b/src/mame/video/naughtyb.c
index e7bc6fc2a27..1e065f58b6e 100644
--- a/src/mame/video/naughtyb.c
+++ b/src/mame/video/naughtyb.c
@@ -190,7 +190,7 @@ SCREEN_UPDATE( naughtyb )
naughtyb_state *state = screen.machine().driver_data<naughtyb_state>();
UINT8 *videoram = state->m_videoram;
- bitmap_t *tmpbitmap = screen.machine().generic.tmpbitmap;
+ bitmap_t &tmpbitmap = *screen.machine().generic.tmpbitmap;
int offs;
// for every character in the Video RAM
@@ -226,13 +226,13 @@ SCREEN_UPDATE( naughtyb )
}
}
- drawgfx_opaque(tmpbitmap,tmpbitmap->cliprect(),screen.machine().gfx[0],
+ drawgfx_opaque(tmpbitmap,tmpbitmap.cliprect(),screen.machine().gfx[0],
state->m_videoram2[offs] + 256 * state->m_bankreg,
(state->m_videoram2[offs] >> 5) + 8 * state->m_palreg,
state->m_cocktail,state->m_cocktail,
8*sx,8*sy);
- drawgfx_transpen(tmpbitmap,tmpbitmap->cliprect(),screen.machine().gfx[1],
+ drawgfx_transpen(tmpbitmap,tmpbitmap.cliprect(),screen.machine().gfx[1],
videoram[offs] + 256*state->m_bankreg,
(videoram[offs] >> 5) + 8 * state->m_palreg,
state->m_cocktail,state->m_cocktail,
diff --git a/src/mame/video/nbmj8688.c b/src/mame/video/nbmj8688.c
index 492cc9f0806..ba40e3a339a 100644
--- a/src/mame/video/nbmj8688.c
+++ b/src/mame/video/nbmj8688.c
@@ -699,11 +699,11 @@ SCREEN_UPDATE( mbmj8688 )
if (state->m_mjsikaku_flipscreen) scrolly = state->m_mjsikaku_scrolly;
else scrolly = (-state->m_mjsikaku_scrolly) & 0xff;
- copybitmap(bitmap, state->m_mjsikaku_tmpbitmap, 0, 0, 0, scrolly, cliprect);
- copybitmap(bitmap, state->m_mjsikaku_tmpbitmap, 0, 0, 0, scrolly - 256, cliprect);
+ copybitmap(bitmap, *state->m_mjsikaku_tmpbitmap, 0, 0, 0, scrolly, cliprect);
+ copybitmap(bitmap, *state->m_mjsikaku_tmpbitmap, 0, 0, 0, scrolly - 256, cliprect);
}
else
- bitmap->fill(0);
+ bitmap.fill(0);
return 0;
}
@@ -721,7 +721,7 @@ SCREEN_UPDATE( mbmj8688_lcd0 )
int data = state->m_HD61830B_ram[0][y * 60 + x];
for (b = 0;b < 8;b++)
- bitmap->pix16(y, (8*x+b)) = (data & (1<<b)) ? 0x0000 : 0x18ff;
+ bitmap.pix16(y, (8*x+b)) = (data & (1<<b)) ? 0x0000 : 0x18ff;
}
return 0;
}
@@ -737,7 +737,7 @@ SCREEN_UPDATE( mbmj8688_lcd1 )
int data = state->m_HD61830B_ram[1][y * 60 + x];
for (b = 0;b < 8;b++)
- bitmap->pix16(y, (8*x+b)) = (data & (1<<b)) ? 0x0000 : 0x18ff;
+ bitmap.pix16(y, (8*x+b)) = (data & (1<<b)) ? 0x0000 : 0x18ff;
}
return 0;
}
diff --git a/src/mame/video/nbmj8891.c b/src/mame/video/nbmj8891.c
index 1c757cb0007..8304006e9dd 100644
--- a/src/mame/video/nbmj8891.c
+++ b/src/mame/video/nbmj8891.c
@@ -560,14 +560,14 @@ SCREEN_UPDATE( nbmj8891 )
if (state->m_gfxdraw_mode)
{
- copyscrollbitmap (bitmap, state->m_tmpbitmap0, 0, 0, 0, 0, cliprect);
- copyscrollbitmap_trans(bitmap, state->m_tmpbitmap1, 0, 0, 1, &scrolly, cliprect, 0xff);
+ copyscrollbitmap (bitmap, *state->m_tmpbitmap0, 0, 0, 0, 0, cliprect);
+ copyscrollbitmap_trans(bitmap, *state->m_tmpbitmap1, 0, 0, 1, &scrolly, cliprect, 0xff);
}
else
- copyscrollbitmap(bitmap, state->m_tmpbitmap0, 0, 0, 1, &scrolly, cliprect);
+ copyscrollbitmap(bitmap, *state->m_tmpbitmap0, 0, 0, 1, &scrolly, cliprect);
}
else
- bitmap->fill(0xff);
+ bitmap.fill(0xff);
return 0;
}
diff --git a/src/mame/video/nbmj8900.c b/src/mame/video/nbmj8900.c
index b42473d9cdb..1cc0bb9e7e9 100644
--- a/src/mame/video/nbmj8900.c
+++ b/src/mame/video/nbmj8900.c
@@ -434,17 +434,17 @@ SCREEN_UPDATE( nbmj8900 )
if (state->m_gfxdraw_mode)
{
- copyscrollbitmap(bitmap, state->m_tmpbitmap0, 0, 0, 0, 0, cliprect);
- copyscrollbitmap_trans(bitmap, state->m_tmpbitmap1, 0, 0, 1, &scrolly, cliprect, 0xff);
+ copyscrollbitmap(bitmap, *state->m_tmpbitmap0, 0, 0, 0, 0, cliprect);
+ copyscrollbitmap_trans(bitmap, *state->m_tmpbitmap1, 0, 0, 1, &scrolly, cliprect, 0xff);
}
else
{
- copyscrollbitmap(bitmap, state->m_tmpbitmap0, 0, 0, 1, &scrolly, cliprect);
+ copyscrollbitmap(bitmap, *state->m_tmpbitmap0, 0, 0, 1, &scrolly, cliprect);
}
}
else
{
- bitmap->fill(0);
+ bitmap.fill(0);
}
return 0;
}
diff --git a/src/mame/video/nbmj8991.c b/src/mame/video/nbmj8991.c
index 7b2cbbe0d59..61b3d1efcdc 100644
--- a/src/mame/video/nbmj8991.c
+++ b/src/mame/video/nbmj8991.c
@@ -334,10 +334,10 @@ SCREEN_UPDATE( nbmj8991_type1 )
scrolly = (( state->m_scrolly) + 0x0f1) & 0x1ff;
}
- copyscrollbitmap(bitmap, state->m_tmpbitmap, 1, &scrollx, 1, &scrolly, cliprect);
+ copyscrollbitmap(bitmap, *state->m_tmpbitmap, 1, &scrollx, 1, &scrolly, cliprect);
}
else
- bitmap->fill(0);
+ bitmap.fill(0);
return 0;
}
@@ -374,10 +374,10 @@ SCREEN_UPDATE( nbmj8991_type2 )
scrolly = (( state->m_scrolly) + 0x0f1) & 0x1ff;
}
- copyscrollbitmap(bitmap, state->m_tmpbitmap, 1, &scrollx, 1, &scrolly, cliprect);
+ copyscrollbitmap(bitmap, *state->m_tmpbitmap, 1, &scrollx, 1, &scrolly, cliprect);
}
else
- bitmap->fill(0);
+ bitmap.fill(0);
return 0;
}
diff --git a/src/mame/video/nbmj9195.c b/src/mame/video/nbmj9195.c
index f7300a928a1..fa6c9cb17d8 100644
--- a/src/mame/video/nbmj9195.c
+++ b/src/mame/video/nbmj9195.c
@@ -492,19 +492,19 @@ SCREEN_UPDATE( nbmj9195 )
if (state->m_dispflag[0])
// nbmj9195 1layer
- copyscrollbitmap(bitmap, state->m_tmpbitmap[0], SCANLINE_MAX, state->m_scrollx_raster[0], 1, &scrolly[0], cliprect);
+ copyscrollbitmap(bitmap, *state->m_tmpbitmap[0], SCANLINE_MAX, state->m_scrollx_raster[0], 1, &scrolly[0], cliprect);
else
- bitmap->fill(0x0ff);
+ bitmap.fill(0x0ff);
if (state->m_dispflag[1])
{
if (state->m_gfxdraw_mode == 1)
// nbmj9195 2layer
- copyscrollbitmap_trans(bitmap, state->m_tmpbitmap[1], SCANLINE_MAX, state->m_scrollx_raster[1], 1, &scrolly[1], cliprect, 0x0ff);
+ copyscrollbitmap_trans(bitmap, *state->m_tmpbitmap[1], SCANLINE_MAX, state->m_scrollx_raster[1], 1, &scrolly[1], cliprect, 0x0ff);
if (state->m_gfxdraw_mode == 2)
// nbmj9195 nb22090 2layer
- copyscrollbitmap_trans(bitmap, state->m_tmpbitmap[1], SCANLINE_MAX, state->m_scrollx_raster[1], 1, &scrolly[1], cliprect, 0x1ff);
+ copyscrollbitmap_trans(bitmap, *state->m_tmpbitmap[1], SCANLINE_MAX, state->m_scrollx_raster[1], 1, &scrolly[1], cliprect, 0x1ff);
}
return 0;
}
diff --git a/src/mame/video/nemesis.c b/src/mame/video/nemesis.c
index e1fddd1a9b3..c562028f237 100644
--- a/src/mame/video/nemesis.c
+++ b/src/mame/video/nemesis.c
@@ -334,7 +334,7 @@ VIDEO_START( nemesis )
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
/*
* 16 bytes per sprite, in memory from 56000-56fff
@@ -431,8 +431,8 @@ SCREEN_UPDATE( nemesis )
int offs;
rectangle clip;
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(0, cliprect);
clip.min_x = 0;
clip.max_x = 255;
diff --git a/src/mame/video/neogeo.c b/src/mame/video/neogeo.c
index da820da5556..55c6c61b9c3 100644
--- a/src/mame/video/neogeo.c
+++ b/src/mame/video/neogeo.c
@@ -268,7 +268,7 @@ void neogeo_set_fixed_layer_source( running_machine &machine, UINT8 data )
}
-static void draw_fixed_layer( running_machine &machine, bitmap_t *bitmap, int scanline )
+static void draw_fixed_layer( running_machine &machine, bitmap_t &bitmap, int scanline )
{
neogeo_state *state = machine.driver_data<neogeo_state>();
int x;
@@ -276,7 +276,7 @@ static void draw_fixed_layer( running_machine &machine, bitmap_t *bitmap, int sc
UINT8* gfx_base = machine.region(state->m_fixed_layer_source ? "fixed" : "fixedbios")->base();
UINT32 addr_mask = machine.region(state->m_fixed_layer_source ? "fixed" : "fixedbios")->bytes() - 1;
UINT16 *video_data = &state->m_videoram[0x7000 | (scanline >> 3)];
- UINT32 *pixel_addr = &bitmap->pix32(scanline, NEOGEO_HBEND);
+ UINT32 *pixel_addr = &bitmap.pix32(scanline, NEOGEO_HBEND);
int garouoffsets[32];
int banked = state->m_fixed_layer_source && (addr_mask > 0x1ffff);
@@ -401,7 +401,7 @@ INLINE int sprite_on_scanline(int scanline, int y, int rows)
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, int scanline )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, int scanline )
{
neogeo_state *state = machine.driver_data<neogeo_state>();
int sprite_index;
@@ -540,7 +540,7 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, int scanli
{
int i;
- UINT32 *pixel_addr = &bitmap->pix32(scanline, x + NEOGEO_HBEND);
+ UINT32 *pixel_addr = &bitmap.pix32(scanline, x + NEOGEO_HBEND);
for (i = 0; i < 0x10; i++)
{
@@ -562,7 +562,7 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, int scanli
int i;
int x_save = x;
- UINT32 *pixel_addr = &bitmap->pix32(scanline, NEOGEO_HBEND);
+ UINT32 *pixel_addr = &bitmap.pix32(scanline, NEOGEO_HBEND);
for (i = 0; i < 0x10; i++)
{
@@ -925,7 +925,7 @@ SCREEN_UPDATE( neogeo )
neogeo_state *state = screen.machine().driver_data<neogeo_state>();
/* fill with background color first */
- bitmap->fill(state->m_pens[0x0fff], cliprect);
+ bitmap.fill(state->m_pens[0x0fff], cliprect);
draw_sprites(screen.machine(), bitmap, cliprect.min_y);
diff --git a/src/mame/video/ninjakd2.c b/src/mame/video/ninjakd2.c
index 0dabe1113ca..da8e1f77479 100644
--- a/src/mame/video/ninjakd2.c
+++ b/src/mame/video/ninjakd2.c
@@ -360,7 +360,7 @@ WRITE8_HANDLER( ninjakd2_sprite_overdraw_w )
*
*************************************/
-static void draw_sprites(running_machine& machine, bitmap_t* bitmap)
+static void draw_sprites(running_machine& machine, bitmap_t &bitmap)
{
ninjakd2_state *state = machine.driver_data<ninjakd2_state>();
const gfx_element* const gfx = machine.gfx[1];
@@ -413,7 +413,7 @@ static void draw_sprites(running_machine& machine, bitmap_t* bitmap)
{
int const tile = code ^ (x << big_xshift) ^ (y << big_yshift);
- drawgfx_transpen(bitmap, bitmap->cliprect(), gfx,
+ drawgfx_transpen(bitmap, bitmap.cliprect(), gfx,
tile,
color,
flipx,flipy,
@@ -452,7 +452,7 @@ static int stencil_omegaf( UINT16 pal ) { return( TRUE ); }
// This is very hackish.
// (Is there a possibility that software can't select it but hardware can?)
-static void erase_sprites(running_machine& machine, bitmap_t* bitmap)
+static void erase_sprites(running_machine& machine, bitmap_t &bitmap)
{
ninjakd2_state *state = machine.driver_data<ninjakd2_state>();
// if sprite overdraw is disabled, clear the sprite framebuffer
@@ -474,8 +474,8 @@ static void erase_sprites(running_machine& machine, bitmap_t* bitmap)
static void update_sprites(running_machine& machine)
{
ninjakd2_state *state = machine.driver_data<ninjakd2_state>();
- erase_sprites(machine, state->m_sp_bitmap);
- draw_sprites(machine, state->m_sp_bitmap);
+ erase_sprites(machine, *state->m_sp_bitmap);
+ draw_sprites(machine, *state->m_sp_bitmap);
}
////// Before modified, this was written.
// we want to erase the sprites with the old setting and draw them with the
@@ -492,11 +492,11 @@ SCREEN_UPDATE( ninjakd2 )
update_sprites(screen.machine());
state->m_sprites_updated = 1;
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
- copybitmap_trans(bitmap, state->m_sp_bitmap, 0, 0, 0, 0, cliprect, TRANSPARENTCODE);
+ copybitmap_trans(bitmap, *state->m_sp_bitmap, 0, 0, 0, 0, cliprect, TRANSPARENTCODE);
tilemap_draw(bitmap, cliprect, state->m_fg_tilemap, 0, 0);
@@ -509,13 +509,13 @@ SCREEN_UPDATE( robokid )
update_sprites(screen.machine());
state->m_sprites_updated = 1;
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
tilemap_draw(bitmap, cliprect, state->m_bg0_tilemap, 0, 0);
tilemap_draw(bitmap, cliprect, state->m_bg1_tilemap, 0, 0);
- copybitmap_trans(bitmap, state->m_sp_bitmap, 0, 0, 0, 0, cliprect, TRANSPARENTCODE);
+ copybitmap_trans(bitmap, *state->m_sp_bitmap, 0, 0, 0, 0, cliprect, TRANSPARENTCODE);
tilemap_draw(bitmap, cliprect, state->m_bg2_tilemap, 0, 0);
@@ -530,7 +530,7 @@ SCREEN_UPDATE( omegaf )
update_sprites(screen.machine());
state->m_sprites_updated = 1;
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
tilemap_draw(bitmap, cliprect, state->m_bg0_tilemap, 0, 0);
@@ -538,7 +538,7 @@ SCREEN_UPDATE( omegaf )
tilemap_draw(bitmap, cliprect, state->m_bg2_tilemap, 0, 0);
- copybitmap_trans(bitmap, state->m_sp_bitmap, 0, 0, 0, 0, cliprect, TRANSPARENTCODE);
+ copybitmap_trans(bitmap, *state->m_sp_bitmap, 0, 0, 0, 0, cliprect, TRANSPARENTCODE);
tilemap_draw(bitmap, cliprect, state->m_fg_tilemap, 0, 0);
diff --git a/src/mame/video/ninjaw.c b/src/mame/video/ninjaw.c
index 5926a1bf240..084017b8d8d 100644
--- a/src/mame/video/ninjaw.c
+++ b/src/mame/video/ninjaw.c
@@ -16,7 +16,7 @@ VIDEO_START( ninjaw )
SPRITE DRAW ROUTINE
************************************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int primask, int x_offs, int y_offs )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int primask, int x_offs, int y_offs )
{
ninjaw_state *state = machine.driver_data<ninjaw_state>();
UINT16 *spriteram = state->m_spriteram;
@@ -97,7 +97,7 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
SCREEN REFRESH
**************************************************************/
-static UINT32 update_screen(screen_device &screen, bitmap_t *bitmap, const rectangle &cliprect, int xoffs, device_t *tc0100scn)
+static UINT32 update_screen(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect, int xoffs, device_t *tc0100scn)
{
UINT8 layer[3], nodraw;
@@ -113,7 +113,7 @@ static UINT32 update_screen(screen_device &screen, bitmap_t *bitmap, const recta
/* Ensure screen blanked even when bottom layers not drawn due to disable bit */
if (nodraw)
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
/* Sprites can be under/over the layer below text layer */
draw_sprites(screen.machine(), bitmap, cliprect, 1, xoffs, 8); // draw sprites with priority 1 which are under the mid layer
diff --git a/src/mame/video/nitedrvr.c b/src/mame/video/nitedrvr.c
index 1869614b0b3..54b4c00b63f 100644
--- a/src/mame/video/nitedrvr.c
+++ b/src/mame/video/nitedrvr.c
@@ -41,7 +41,7 @@ VIDEO_START( nitedrvr )
state->m_bg_tilemap = tilemap_create(machine, get_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
}
-static void draw_box( bitmap_t *bitmap, int bx, int by, int ex, int ey )
+static void draw_box( bitmap_t &bitmap, int bx, int by, int ex, int ey )
{
int x, y;
@@ -49,13 +49,13 @@ static void draw_box( bitmap_t *bitmap, int bx, int by, int ex, int ey )
{
for (x = bx; x < ex; x++)
if ((y < 256) && (x < 256))
- bitmap->pix16(y, x) = 1;
+ bitmap.pix16(y, x) = 1;
}
return;
}
-static void draw_roadway( running_machine &machine, bitmap_t *bitmap )
+static void draw_roadway( running_machine &machine, bitmap_t &bitmap )
{
nitedrvr_state *state = machine.driver_data<nitedrvr_state>();
int roadway;
diff --git a/src/mame/video/niyanpai.c b/src/mame/video/niyanpai.c
index ba038f67a23..c633beebfd1 100644
--- a/src/mame/video/niyanpai.c
+++ b/src/mame/video/niyanpai.c
@@ -423,15 +423,15 @@ SCREEN_UPDATE( niyanpai )
}
if (state->m_dispflag[0])
- copyscrollbitmap(bitmap, state->m_tmpbitmap[0], 1, &scrollx[0], 1, &scrolly[0], cliprect);
+ copyscrollbitmap(bitmap, *state->m_tmpbitmap[0], 1, &scrollx[0], 1, &scrolly[0], cliprect);
else
- bitmap->fill(0x00ff);
+ bitmap.fill(0x00ff);
if (state->m_dispflag[1])
- copyscrollbitmap_trans(bitmap, state->m_tmpbitmap[1], 1, &scrollx[1], 1, &scrolly[1], cliprect, 0x01ff);
+ copyscrollbitmap_trans(bitmap, *state->m_tmpbitmap[1], 1, &scrollx[1], 1, &scrolly[1], cliprect, 0x01ff);
if (state->m_dispflag[2])
- copyscrollbitmap_trans(bitmap, state->m_tmpbitmap[2], 1, &scrollx[2], 1, &scrolly[2], cliprect, 0x02ff);
+ copyscrollbitmap_trans(bitmap, *state->m_tmpbitmap[2], 1, &scrollx[2], 1, &scrolly[2], cliprect, 0x02ff);
return 0;
}
diff --git a/src/mame/video/nmk16.c b/src/mame/video/nmk16.c
index fdf00449adf..f681673dcf5 100644
--- a/src/mame/video/nmk16.c
+++ b/src/mame/video/nmk16.c
@@ -425,7 +425,7 @@ WRITE16_HANDLER( bioship_bank_w )
// manybloc uses extra flip bits on the sprites, but these break other games
-static void nmk16_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int priority)
+static void nmk16_draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int priority)
{
nmk16_state *state = machine.driver_data<nmk16_state>();
int offs;
@@ -476,7 +476,7 @@ static void nmk16_draw_sprites(running_machine &machine, bitmap_t *bitmap, const
}
}
-static void nmk16_draw_sprites_flipsupported(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int priority)
+static void nmk16_draw_sprites_flipsupported(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int priority)
{
nmk16_state *state = machine.driver_data<nmk16_state>();
int offs;
@@ -727,7 +727,7 @@ SCREEN_UPDATE( bioship )
int numtile = data&0xfff;
int color = (data&0xf000)>>12;
- drawgfx_opaque(state->m_background_bitmap,state->m_background_bitmap->cliprect(),screen.machine().gfx[3],
+ drawgfx_opaque(*state->m_background_bitmap,state->m_background_bitmap->cliprect(),screen.machine().gfx[3],
numtile,
color,
0,0, /* no flip */
@@ -736,7 +736,7 @@ SCREEN_UPDATE( bioship )
data = tilerom[offs+0x1000+bank];
numtile = data&0xfff;
color = (data&0xf000)>>12;
- drawgfx_opaque(state->m_background_bitmap,state->m_background_bitmap->cliprect(),screen.machine().gfx[3],
+ drawgfx_opaque(*state->m_background_bitmap,state->m_background_bitmap->cliprect(),screen.machine().gfx[3],
numtile,
color,
0,0, /* no flip */
@@ -747,7 +747,7 @@ SCREEN_UPDATE( bioship )
}
}
- copyscrollbitmap(bitmap,state->m_background_bitmap,1,&scrollx,1,&scrolly,cliprect);
+ copyscrollbitmap(bitmap,*state->m_background_bitmap,1,&scrollx,1,&scrolly,cliprect);
tilemap_draw(bitmap,cliprect,state->m_bg_tilemap0,0,0);
nmk16_draw_sprites(screen.machine(), bitmap,cliprect,3);
@@ -898,7 +898,7 @@ VIDEO_START( firehawk )
***************************************************************************/
-static void video_update(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect,
+static void video_update(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect,
int dsw_flipscreen, // 1 = Horizontal and vertical screen flip are hardwired to 2 dip switches
int xoffset, int yoffset, // bg_tilemap0 offsets
int attr_mask // "sprite active" mask
@@ -933,7 +933,7 @@ static void video_update(running_machine &machine, bitmap_t *bitmap, const recta
tilemap_draw(bitmap,cliprect,state->m_tx_tilemap,0,0);
}
-static void redhawki_video_update(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void redhawki_video_update(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
nmk16_state *state = machine.driver_data<nmk16_state>();
diff --git a/src/mame/video/nova2001.c b/src/mame/video/nova2001.c
index 0ac4dc22dfe..1b555a7c1ce 100644
--- a/src/mame/video/nova2001.c
+++ b/src/mame/video/nova2001.c
@@ -270,7 +270,7 @@ WRITE8_HANDLER( pkunwar_flipscreen_w )
*
*************************************/
-static void nova2001_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void nova2001_draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
nova2001_state *state = machine.driver_data<nova2001_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -308,7 +308,7 @@ static void nova2001_draw_sprites(running_machine &machine, bitmap_t *bitmap, co
}
}
-static void pkunwar_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void pkunwar_draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
nova2001_state *state = machine.driver_data<nova2001_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/nycaptor.c b/src/mame/video/nycaptor.c
index 0dd81daf0a6..6d272ffb042 100644
--- a/src/mame/video/nycaptor.c
+++ b/src/mame/video/nycaptor.c
@@ -167,7 +167,7 @@ WRITE8_HANDLER( nycaptor_scrlram_w )
tilemap_set_scrolly(state->m_bg_tilemap, offset, data);
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int pri )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int pri )
{
nycaptor_state *state = machine.driver_data<nycaptor_state>();
int i;
diff --git a/src/mame/video/offtwall.c b/src/mame/video/offtwall.c
index a7a667e3464..5aa806ebfe6 100644
--- a/src/mame/video/offtwall.c
+++ b/src/mame/video/offtwall.c
@@ -105,7 +105,7 @@ SCREEN_UPDATE( offtwall )
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
UINT16 *mo = &mobitmap->pix16(y);
- UINT16 *pf = &bitmap->pix16(y);
+ UINT16 *pf = &bitmap.pix16(y);
for (x = rectlist.rect->min_x; x <= rectlist.rect->max_x; x++)
if (mo[x])
{
diff --git a/src/mame/video/ohmygod.c b/src/mame/video/ohmygod.c
index a0cd1b5e560..1f289078743 100644
--- a/src/mame/video/ohmygod.c
+++ b/src/mame/video/ohmygod.c
@@ -76,7 +76,7 @@ WRITE16_HANDLER( ohmygod_scrolly_w )
***************************************************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
ohmygod_state *state = machine.driver_data<ohmygod_state>();
UINT16 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/ojankohs.c b/src/mame/video/ojankohs.c
index 4a57bfe00d3..5003168223d 100644
--- a/src/mame/video/ojankohs.c
+++ b/src/mame/video/ojankohs.c
@@ -340,6 +340,6 @@ SCREEN_UPDATE( ojankoc )
state->m_screen_refresh = 0;
}
- copybitmap(bitmap, state->m_tmpbitmap, 0, 0, 0, 0, cliprect);
+ copybitmap(bitmap, *state->m_tmpbitmap, 0, 0, 0, 0, cliprect);
return 0;
}
diff --git a/src/mame/video/oneshot.c b/src/mame/video/oneshot.c
index db97f69061b..601adec9275 100644
--- a/src/mame/video/oneshot.c
+++ b/src/mame/video/oneshot.c
@@ -66,7 +66,7 @@ VIDEO_START( oneshot )
tilemap_set_transparent_pen(state->m_fg_tilemap, 0);
}
-static void draw_crosshairs( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_crosshairs( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
oneshot_state *state = machine.driver_data<oneshot_state>();
//int xpos,ypos;
@@ -99,7 +99,7 @@ static void draw_crosshairs( running_machine &machine, bitmap_t *bitmap, const r
state->m_gun_x_p2 = 0;
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
oneshot_state *state = machine.driver_data<oneshot_state>();
const UINT16 *source = state->m_sprites;
@@ -160,7 +160,7 @@ SCREEN_UPDATE( oneshot )
{
oneshot_state *state = screen.machine().driver_data<oneshot_state>();
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
tilemap_set_scrollx(state->m_mid_tilemap, 0, state->m_scroll[0] - 0x1f5);
tilemap_set_scrolly(state->m_mid_tilemap, 0, state->m_scroll[1]);
@@ -177,7 +177,7 @@ SCREEN_UPDATE( maddonna )
{
oneshot_state *state = screen.machine().driver_data<oneshot_state>();
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
tilemap_set_scrolly(state->m_mid_tilemap, 0, state->m_scroll[1]); // other registers aren't used so we don't know which layers they relate to
diff --git a/src/mame/video/opwolf.c b/src/mame/video/opwolf.c
index b216a2e5a05..24fadf128f2 100644
--- a/src/mame/video/opwolf.c
+++ b/src/mame/video/opwolf.c
@@ -46,7 +46,7 @@ SCREEN_UPDATE( opwolf )
layer[0] = 0;
layer[1] = 1;
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
pc080sn_tilemap_draw(state->m_pc080sn, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 1);
pc080sn_tilemap_draw(state->m_pc080sn, bitmap, cliprect, layer[1], 0, 2);
diff --git a/src/mame/video/orbit.c b/src/mame/video/orbit.c
index 23a51a8b5f0..f9a2f0c69d3 100644
--- a/src/mame/video/orbit.c
+++ b/src/mame/video/orbit.c
@@ -37,7 +37,7 @@ VIDEO_START( orbit )
}
-static void draw_sprites( running_machine &machine, bitmap_t* bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
orbit_state *state = machine.driver_data<orbit_state>();
const UINT8* p = state->m_sprite_ram;
diff --git a/src/mame/video/othldrby.c b/src/mame/video/othldrby.c
index 79dede888ff..a73047dfdf6 100644
--- a/src/mame/video/othldrby.c
+++ b/src/mame/video/othldrby.c
@@ -136,7 +136,7 @@ WRITE16_HANDLER( othldrby_vreg_w )
***************************************************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int priority )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int priority )
{
othldrby_state *state = machine.driver_data<othldrby_state>();
int offs;
@@ -201,9 +201,9 @@ SCREEN_UPDATE( othldrby )
}
}
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
for (layer = 0; layer < 3; layer++)
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap[layer], 0, 0);
diff --git a/src/mame/video/othunder.c b/src/mame/video/othunder.c
index 3605818e2a8..873c181ef75 100644
--- a/src/mame/video/othunder.c
+++ b/src/mame/video/othunder.c
@@ -63,7 +63,7 @@ spriteram is being tested, take no notice of that.]
********************************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, const int *primasks, int y_offs )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, const int *primasks, int y_offs )
{
othunder_state *state = machine.driver_data<othunder_state>();
UINT16 *spritemap = (UINT16 *)machine.region("user1")->base();
@@ -211,10 +211,10 @@ SCREEN_UPDATE( othunder )
layer[1] = layer[0] ^ 1;
layer[2] = 2;
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
/* Ensure screen blanked even when bottom layer not drawn due to disable bit */
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
tc0100scn_tilemap_draw(state->m_tc0100scn, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 1);
tc0100scn_tilemap_draw(state->m_tc0100scn, bitmap, cliprect, layer[1], 0, 2);
diff --git a/src/mame/video/overdriv.c b/src/mame/video/overdriv.c
index e3aadd13747..c953f515d1b 100644
--- a/src/mame/video/overdriv.c
+++ b/src/mame/video/overdriv.c
@@ -60,7 +60,7 @@ SCREEN_UPDATE( overdriv )
state->m_zoom_colorbase[1] = k053251_get_palette_index(state->m_k053251, K053251_CI3);
state->m_zoom_colorbase[0] = k053251_get_palette_index(state->m_k053251, K053251_CI4);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
k051316_zoom_draw(state->m_k051316_1, bitmap, cliprect, 0, 0);
k051316_zoom_draw(state->m_k051316_2, bitmap, cliprect, 0, 1);
diff --git a/src/mame/video/pacland.c b/src/mame/video/pacland.c
index e1d69f98b5c..d5a5e0af190 100644
--- a/src/mame/video/pacland.c
+++ b/src/mame/video/pacland.c
@@ -280,7 +280,7 @@ WRITE8_HANDLER( pacland_bankswitch_w )
***************************************************************************/
/* the sprite generator IC is the same as Mappy */
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int whichmask)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int whichmask)
{
pacland_state *state = machine.driver_data<pacland_state>();
UINT8 *spriteram = state->m_spriteram + 0x780;
@@ -340,7 +340,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const recta
}
-static void draw_fg(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int priority )
+static void draw_fg(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int priority )
{
pacland_state *state = machine.driver_data<pacland_state>();
int y, x;
@@ -348,14 +348,14 @@ static void draw_fg(running_machine &machine, bitmap_t *bitmap, const rectangle
/* draw tilemap transparently over it; this will leave invalid pens (0xffff)
anywhere where the fg_tilemap should be transparent; note that we assume
the fg_bitmap has been pre-erased to 0xffff */
- tilemap_draw(state->m_fg_bitmap, cliprect, state->m_fg_tilemap, priority, 0);
+ tilemap_draw(*state->m_fg_bitmap, cliprect, state->m_fg_tilemap, priority, 0);
/* now copy the fg_bitmap to the destination wherever the sprite pixel allows */
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
- const UINT8 *pri = &machine.priority_bitmap->pix8(y);
+ const UINT8 *pri = &machine.priority_bitmap.pix8(y);
UINT16 *src = &state->m_fg_bitmap->pix16(y);
- UINT16 *dst = &bitmap->pix16(y);
+ UINT16 *dst = &bitmap.pix16(y);
/* only copy if the priority bitmap is 0 (no high priority sprite) and the
source pixel is not the invalid pen; also clear to 0xffff when finished */
@@ -385,7 +385,7 @@ SCREEN_UPDATE( pacland )
/* draw high priority sprite pixels, setting priority bitmap to non-zero
wherever there is a high-priority pixel; note that we draw to the bitmap
which is safe because the bg_tilemap draw will overwrite everything */
- screen.machine().priority_bitmap->fill(0x00, cliprect);
+ screen.machine().priority_bitmap.fill(0x00, cliprect);
draw_sprites(screen.machine(), bitmap, cliprect, 0);
/* draw background */
diff --git a/src/mame/video/pacman.c b/src/mame/video/pacman.c
index ba0fd6a9e21..49e6de9a9ef 100644
--- a/src/mame/video/pacman.c
+++ b/src/mame/video/pacman.c
@@ -217,7 +217,7 @@ SCREEN_UPDATE( pacman )
{
pacman_state *state = screen.machine().driver_data<pacman_state>();
if (state->m_bgpriority != 0)
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
else
tilemap_draw(bitmap,cliprect,state->m_bg_tilemap,TILEMAP_DRAW_OPAQUE,0);
diff --git a/src/mame/video/pandoras.c b/src/mame/video/pandoras.c
index 55ba5245517..23d887074d1 100644
--- a/src/mame/video/pandoras.c
+++ b/src/mame/video/pandoras.c
@@ -156,7 +156,7 @@ WRITE8_HANDLER( pandoras_flipscreen_w )
***************************************************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, UINT8* sr )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, UINT8* sr )
{
int offs;
diff --git a/src/mame/video/paradise.c b/src/mame/video/paradise.c
index b2e0fd81008..96f0da72043 100644
--- a/src/mame/video/paradise.c
+++ b/src/mame/video/paradise.c
@@ -192,7 +192,7 @@ WRITE8_HANDLER( paradise_priority_w )
state->m_priority = data;
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
paradise_state *state = machine.driver_data<paradise_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -259,7 +259,7 @@ if (screen.machine().input().code_pressed(KEYCODE_Z))
}
#endif
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
if (!(state->m_priority & 4)) /* Screen blanking */
return 0;
@@ -270,7 +270,7 @@ if (screen.machine().input().code_pressed(KEYCODE_Z))
if (layers_ctrl & 1) tilemap_draw(bitmap, cliprect, state->m_tilemap_0, 0, 0);
if (layers_ctrl & 2) tilemap_draw(bitmap, cliprect, state->m_tilemap_1, 0, 0);
- if (layers_ctrl & 4) copybitmap_trans(bitmap, state->m_tmpbitmap, flip_screen_get(screen.machine()), flip_screen_get(screen.machine()), 0, 0, cliprect, 0x80f);
+ if (layers_ctrl & 4) copybitmap_trans(bitmap, *state->m_tmpbitmap, flip_screen_get(screen.machine()), flip_screen_get(screen.machine()), 0, 0, cliprect, 0x80f);
if (state->m_priority & 2)
{
@@ -296,7 +296,7 @@ SCREEN_UPDATE( torus )
{
paradise_state *state = screen.machine().driver_data<paradise_state>();
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
if (!(state->m_priority & 2)) /* Screen blanking */
return 0;
@@ -328,7 +328,7 @@ SCREEN_UPDATE( madball )
{
paradise_state *state = screen.machine().driver_data<paradise_state>();
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
tilemap_draw(bitmap, cliprect, state->m_tilemap_0, 0, 0);
tilemap_draw(bitmap, cliprect, state->m_tilemap_1, 0, 0);
tilemap_draw(bitmap, cliprect, state->m_tilemap_2, 0, 0);
diff --git a/src/mame/video/parodius.c b/src/mame/video/parodius.c
index bcb6d4788d3..3374cc59012 100644
--- a/src/mame/video/parodius.c
+++ b/src/mame/video/parodius.c
@@ -67,8 +67,8 @@ SCREEN_UPDATE( parodius )
konami_sortlayers3(layer, state->m_layerpri);
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(16 * bg_colorbase, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(16 * bg_colorbase, cliprect);
k052109_tilemap_draw(state->m_k052109, bitmap, cliprect, layer[0], 0,1);
k052109_tilemap_draw(state->m_k052109, bitmap, cliprect, layer[1], 0,2);
k052109_tilemap_draw(state->m_k052109, bitmap, cliprect, layer[2], 0,4);
diff --git a/src/mame/video/pastelg.c b/src/mame/video/pastelg.c
index 4ca03e6ea12..4491a5db82e 100644
--- a/src/mame/video/pastelg.c
+++ b/src/mame/video/pastelg.c
@@ -313,10 +313,10 @@ SCREEN_UPDATE( pastelg )
for (y = 0; y < height; y++)
for (x = 0; x < width; x++)
- bitmap->pix16(y, x) = state->m_videoram[(y * width) + x];
+ bitmap.pix16(y, x) = state->m_videoram[(y * width) + x];
}
else
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
return 0;
}
diff --git a/src/mame/video/pbaction.c b/src/mame/video/pbaction.c
index 60a2fec8771..11c685062e2 100644
--- a/src/mame/video/pbaction.c
+++ b/src/mame/video/pbaction.c
@@ -84,7 +84,7 @@ VIDEO_START( pbaction )
tilemap_set_transparent_pen(state->m_fg_tilemap, 0);
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
pbaction_state *state = machine.driver_data<pbaction_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/pcktgal.c b/src/mame/video/pcktgal.c
index 5797a557099..b265759114b 100644
--- a/src/mame/video/pcktgal.c
+++ b/src/mame/video/pcktgal.c
@@ -30,7 +30,7 @@ PALETTE_INIT( pcktgal )
}
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
pcktgal_state *state = machine.driver_data<pcktgal_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/pgm.c b/src/mame/video/pgm.c
index 70a460ee848..ac3cb0fe302 100644
--- a/src/mame/video/pgm.c
+++ b/src/mame/video/pgm.c
@@ -130,7 +130,7 @@ static void draw_sprite_line( running_machine &machine, int wide, UINT32* dest,
}
}
/* this just loops over our decoded bitmap and puts it on the screen */
-static void draw_sprite_new_zoomed( running_machine &machine, int wide, int high, int xpos, int ypos, int palt, int boffset, int flip, bitmap_t* bitmap, UINT32 xzoom, int xgrow, UINT32 yzoom, int ygrow, int pri )
+static void draw_sprite_new_zoomed( running_machine &machine, int wide, int high, int xpos, int ypos, int palt, int boffset, int flip, bitmap_t &bitmap, UINT32 xzoom, int xgrow, UINT32 yzoom, int ygrow, int pri )
{
int ycnt;
int ydrawpos;
@@ -159,7 +159,7 @@ static void draw_sprite_new_zoomed( running_machine &machine, int wide, int high
if ((ydrawpos >= 0) && (ydrawpos < 224))
{
- dest = &bitmap->pix32(ydrawpos);
+ dest = &bitmap.pix32(ydrawpos);
draw_sprite_line(machine, wide, dest, xzoom, xgrow, yoffset, flip, xpos, pri);
}
ycntdraw++;
@@ -172,7 +172,7 @@ static void draw_sprite_new_zoomed( running_machine &machine, int wide, int high
if ((ydrawpos >= 0) && (ydrawpos < 224))
{
- dest = &bitmap->pix32(ydrawpos);
+ dest = &bitmap.pix32(ydrawpos);
draw_sprite_line(machine, wide, dest, xzoom, xgrow, yoffset, flip, xpos, pri);
}
ycntdraw++;
@@ -196,7 +196,7 @@ static void draw_sprite_new_zoomed( running_machine &machine, int wide, int high
if ((ydrawpos >= 0) && (ydrawpos < 224))
{
- dest = &bitmap->pix32(ydrawpos);
+ dest = &bitmap.pix32(ydrawpos);
draw_sprite_line(machine, wide, dest, xzoom, xgrow, yoffset, flip, xpos, pri);
}
ycntdraw++;
@@ -210,7 +210,7 @@ static void draw_sprite_new_zoomed( running_machine &machine, int wide, int high
}
-static void draw_sprites( running_machine &machine, bitmap_t* spritebitmap, UINT16 *sprite_source )
+static void draw_sprites( running_machine &machine, bitmap_t& spritebitmap, UINT16 *sprite_source )
{
/* ZZZZ Zxxx xxxx xxxx
zzzz z-yy yyyy yyyy
@@ -367,10 +367,10 @@ SCREEN_UPDATE( pgm )
pgm_state *state = screen.machine().driver_data<pgm_state>();
int y;
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
state->m_tmppgmbitmap->fill(0x00000000, cliprect);
- draw_sprites(screen.machine(), state->m_tmppgmbitmap, state->m_spritebufferram);
+ draw_sprites(screen.machine(), *state->m_tmppgmbitmap, state->m_spritebufferram);
tilemap_set_scrolly(state->m_bg_tilemap,0, state->m_videoregs[0x2000/2]);
@@ -383,7 +383,7 @@ SCREEN_UPDATE( pgm )
for (y = 0; y < 224; y++)
{
UINT32* src = &state->m_tmppgmbitmap->pix32(y);
- UINT16* dst = &bitmap->pix16(y);
+ UINT16* dst = &bitmap.pix16(y);
for (x = 0; x < 448; x++)
{
@@ -401,7 +401,7 @@ SCREEN_UPDATE( pgm )
for (y = 0; y < 224; y++)
{
UINT32* src = &state->m_tmppgmbitmap->pix32(y);
- UINT16* dst = &bitmap->pix16(y);
+ UINT16* dst = &bitmap.pix16(y);
for (x = 0; x < 448; x++)
{
diff --git a/src/mame/video/pingpong.c b/src/mame/video/pingpong.c
index 79c34a5fe26..eb963211e31 100644
--- a/src/mame/video/pingpong.c
+++ b/src/mame/video/pingpong.c
@@ -113,7 +113,7 @@ VIDEO_START( pingpong )
state->m_bg_tilemap = tilemap_create(machine, get_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
/* This is strange; it's unlikely that the sprites actually have a hardware */
/* clipping region, but I haven't found another way to have them masked by */
diff --git a/src/mame/video/pirates.c b/src/mame/video/pirates.c
index c02314f0b63..9e503abe309 100644
--- a/src/mame/video/pirates.c
+++ b/src/mame/video/pirates.c
@@ -74,7 +74,7 @@ WRITE16_HANDLER( pirates_bg_tileram_w )
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
pirates_state *state = machine.driver_data<pirates_state>();
const gfx_element *gfx = machine.gfx[1];
diff --git a/src/mame/video/pitnrun.c b/src/mame/video/pitnrun.c
index 311515d260f..674dacde664 100644
--- a/src/mame/video/pitnrun.c
+++ b/src/mame/video/pitnrun.c
@@ -182,7 +182,7 @@ VIDEO_START(pitnrun)
pitnrun_spotlights(machine);
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
pitnrun_state *state = machine.driver_data<pitnrun_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -244,7 +244,7 @@ SCREEN_UPDATE( pitnrun )
}
#endif
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
if(!(state->m_ha&4))
tilemap_draw(bitmap,cliprect,state->m_bg, 0,0);
@@ -277,7 +277,7 @@ SCREEN_UPDATE( pitnrun )
draw_sprites(screen.machine(),bitmap,myclip);
if(state->m_ha&4)
- copybitmap_trans(bitmap,state->m_tmp_bitmap[state->m_ha&3],flip_screen_x_get(screen.machine()),flip_screen_y_get(screen.machine()),dx,dy,myclip, 1);
+ copybitmap_trans(bitmap,*state->m_tmp_bitmap[state->m_ha&3],flip_screen_x_get(screen.machine()),flip_screen_y_get(screen.machine()),dx,dy,myclip, 1);
tilemap_draw(bitmap,cliprect,state->m_fg, 0,0);
return 0;
}
diff --git a/src/mame/video/pk8000.c b/src/mame/video/pk8000.c
index 3bfbb9e9e45..7e9b861cfe8 100644
--- a/src/mame/video/pk8000.c
+++ b/src/mame/video/pk8000.c
@@ -95,7 +95,7 @@ PALETTE_INIT( pk8000 )
palette_set_colors(machine, 0, pk8000_palette, ARRAY_LENGTH(pk8000_palette));
}
-UINT32 pk8000_video_update(screen_device &screen, bitmap_t *bitmap, const rectangle &cliprect, UINT8 *videomem)
+UINT32 pk8000_video_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect, UINT8 *videomem)
{
int x,y,j,b;
UINT16 offset = (pk8000_video_mode & 0xc0) << 8;
@@ -106,7 +106,7 @@ UINT32 pk8000_video_update(screen_device &screen, bitmap_t *bitmap, const rectan
my_rect.max_y = 192+32-1;
if (pk8000_video_enable) {
- bitmap->fill((pk8000_video_color >> 4) & 0x0f, my_rect);
+ bitmap.fill((pk8000_video_color >> 4) & 0x0f, my_rect);
if (BIT(pk8000_video_mode,4)==0){
// Text mode
@@ -124,7 +124,7 @@ UINT32 pk8000_video_update(screen_device &screen, bitmap_t *bitmap, const rectan
for (b = 0; b < 8; b++)
{
UINT8 col = (code >> b) & 0x01 ? (color & 0x0f) : ((color>>4) & 0x0f);
- bitmap->pix16((y*8)+j+16, x*8+(7-b)+16) = col;
+ bitmap.pix16((y*8)+j+16, x*8+(7-b)+16) = col;
}
}
}
@@ -141,7 +141,7 @@ UINT32 pk8000_video_update(screen_device &screen, bitmap_t *bitmap, const rectan
for (b = 2; b < 8; b++)
{
UINT8 col = ((code >> b) & 0x01) ? (pk8000_video_color) & 0x0f : (pk8000_video_color>>4) & 0x0f;
- bitmap->pix16((y*8)+j+16, x*6+(7-b)+16+8) = col;
+ bitmap.pix16((y*8)+j+16, x*6+(7-b)+16+8) = col;
}
}
}
@@ -163,7 +163,7 @@ UINT32 pk8000_video_update(screen_device &screen, bitmap_t *bitmap, const rectan
for (b = 0; b < 8; b++)
{
UINT8 col = (code >> b) & 0x01 ? (color & 0x0f) : ((color>>4) & 0x0f);
- bitmap->pix16((y*8)+j+16, x*8+(7-b)+16) = col;
+ bitmap.pix16((y*8)+j+16, x*8+(7-b)+16) = col;
}
}
}
@@ -171,7 +171,7 @@ UINT32 pk8000_video_update(screen_device &screen, bitmap_t *bitmap, const rectan
}
} else {
// Disabled video
- bitmap->fill(0, my_rect);
+ bitmap.fill(0, my_rect);
}
return 0;
}
diff --git a/src/mame/video/pktgaldx.c b/src/mame/video/pktgaldx.c
index 6338a01aac2..7ff44e6083a 100644
--- a/src/mame/video/pktgaldx.c
+++ b/src/mame/video/pktgaldx.c
@@ -13,8 +13,8 @@ SCREEN_UPDATE( pktgaldx )
flip_screen_set(screen.machine(), BIT(flip, 7));
deco16ic_pf_update(state->m_deco_tilegen1, state->m_pf1_rowscroll, state->m_pf2_rowscroll);
- bitmap->fill(0, cliprect); /* not Confirmed */
- screen.machine().priority_bitmap->fill(0);
+ bitmap.fill(0, cliprect); /* not Confirmed */
+ screen.machine().priority_bitmap.fill(0);
deco16ic_tilemap_2_draw(state->m_deco_tilegen1, bitmap, cliprect, 0, 0);
screen.machine().device<decospr_device>("spritegen")->draw_sprites(screen.machine(), bitmap, cliprect, state->m_spriteram, 0x400, true);
@@ -32,7 +32,7 @@ SCREEN_UPDATE( pktgaldb )
int tileno;
int colour;
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
/* the bootleg seems to treat the tilemaps as sprites */
for (offset = 0; offset < 0x1600 / 2; offset += 8)
diff --git a/src/mame/video/playch10.c b/src/mame/video/playch10.c
index 24bb7174593..3ff8b937cdf 100644
--- a/src/mame/video/playch10.c
+++ b/src/mame/video/playch10.c
@@ -163,7 +163,7 @@ SCREEN_UPDATE( playch10_top )
/* render the ppu */
ppu2c0x_render( ppu, bitmap, 0, 0, 0, 0 );
else
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
return 0;
}
@@ -181,7 +181,7 @@ SCREEN_UPDATE( playch10_bottom )
if ( !state->m_pc10_sdcs )
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
else
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
return 0;
}
diff --git a/src/mame/video/playmark.c b/src/mame/video/playmark.c
index dede898acf8..b1f6318d02c 100644
--- a/src/mame/video/playmark.c
+++ b/src/mame/video/playmark.c
@@ -396,7 +396,7 @@ WRITE16_HANDLER( hrdtimes_scroll_w )
***************************************************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int codeshift )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int codeshift )
{
playmark_state *state = machine.driver_data<playmark_state>();
int offs, start_offset = state->m_spriteram_size / 2 - 4;
@@ -440,7 +440,7 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
}
-static void bigtwinb_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int codeshift )
+static void bigtwinb_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int codeshift )
{
playmark_state *state = machine.driver_data<playmark_state>();
int offs, start_offset = state->m_spriteram_size / 2 - 4;
@@ -477,7 +477,7 @@ static void bigtwinb_draw_sprites( running_machine &machine, bitmap_t *bitmap, c
}
}
-static void draw_bitmap( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_bitmap( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
playmark_state *state = machine.driver_data<playmark_state>();
int x, y, count;
@@ -495,9 +495,9 @@ static void draw_bitmap( running_machine &machine, bitmap_t *bitmap, const recta
{
if (state->m_bg_full_size)
{
- bitmap->pix16((y + state->m_bgscrolly) & 0x1ff, (x + state->m_bgscrollx) & 0x1ff) = 0x100 + color;
+ bitmap.pix16((y + state->m_bgscrolly) & 0x1ff, (x + state->m_bgscrollx) & 0x1ff) = 0x100 + color;
- pri = &machine.priority_bitmap->pix8((y + state->m_bgscrolly) & 0x1ff);
+ pri = &machine.priority_bitmap.pix8((y + state->m_bgscrolly) & 0x1ff);
pri[(x + state->m_bgscrollx) & 0x1ff] |= 2;
}
else
@@ -505,9 +505,9 @@ static void draw_bitmap( running_machine &machine, bitmap_t *bitmap, const recta
/* 50% size */
if(!(x % 2) && !(y % 2))
{
- bitmap->pix16((y / 2 + state->m_bgscrolly) & 0x1ff, (x / 2 + state->m_bgscrollx) & 0x1ff) = 0x100 + color;
+ bitmap.pix16((y / 2 + state->m_bgscrolly) & 0x1ff, (x / 2 + state->m_bgscrollx) & 0x1ff) = 0x100 + color;
- pri = &machine.priority_bitmap->pix8((y / 2 + state->m_bgscrolly) & 0x1ff);
+ pri = &machine.priority_bitmap.pix8((y / 2 + state->m_bgscrolly) & 0x1ff);
pri[(x / 2 + state->m_bgscrollx) & 0x1ff] |= 2;
}
}
@@ -522,7 +522,7 @@ SCREEN_UPDATE( bigtwin )
{
playmark_state *state = screen.machine().driver_data<playmark_state>();
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
tilemap_draw(bitmap, cliprect, state->m_fg_tilemap, 0, 0);
if (state->m_bg_enable)
@@ -546,7 +546,7 @@ SCREEN_UPDATE( bigtwinb )
tilemap_draw(bitmap, cliprect, state->m_tx_tilemap, 0, 0);
}
else
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
return 0;
}
@@ -554,7 +554,7 @@ SCREEN_UPDATE( excelsr )
{
playmark_state *state = screen.machine().driver_data<playmark_state>();
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
tilemap_draw(bitmap, cliprect, state->m_fg_tilemap, 0, 1);
if (state->m_bg_enable)
@@ -582,7 +582,7 @@ SCREEN_UPDATE( wbeachvl )
tilemap_set_scrollx(state->m_fg_tilemap, 0, state->m_fgscrollx);
}
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 1);
tilemap_draw(bitmap, cliprect, state->m_fg_tilemap, 0, 2);
@@ -595,7 +595,7 @@ SCREEN_UPDATE( hrdtimes )
{
playmark_state *state = screen.machine().driver_data<playmark_state>();
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
// video enabled
if (state->m_scroll[6] & 1)
@@ -606,6 +606,6 @@ SCREEN_UPDATE( hrdtimes )
tilemap_draw(bitmap, cliprect, state->m_tx_tilemap, 0, 0);
}
else
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
return 0;
}
diff --git a/src/mame/video/plygonet.c b/src/mame/video/plygonet.c
index 447d030fa55..78db58950a3 100644
--- a/src/mame/video/plygonet.c
+++ b/src/mame/video/plygonet.c
@@ -127,8 +127,8 @@ SCREEN_UPDATE( polygonet )
{
polygonet_state *state = screen.machine().driver_data<polygonet_state>();
device_t *k053936 = screen.machine().device("k053936");
- screen.machine().priority_bitmap->fill(0);
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ screen.machine().priority_bitmap.fill(0);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
k053936_zoom_draw(k053936, bitmap, cliprect, state->m_roz_tilemap, 0, 0, 0);
diff --git a/src/mame/video/pokechmp.c b/src/mame/video/pokechmp.c
index 08158853a89..a643a48f899 100644
--- a/src/mame/video/pokechmp.c
+++ b/src/mame/video/pokechmp.c
@@ -38,7 +38,7 @@ VIDEO_START( pokechmp )
8, 8, 32, 32);
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
pokechmp_state *state = machine.driver_data<pokechmp_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/polepos.c b/src/mame/video/polepos.c
index 108068e6c98..092c0cc8e77 100644
--- a/src/mame/video/polepos.c
+++ b/src/mame/video/polepos.c
@@ -363,7 +363,7 @@ WRITE8_HANDLER( polepos_alpha_w )
***************************************************************************/
-static void draw_road(running_machine &machine, bitmap_t *bitmap)
+static void draw_road(running_machine &machine, bitmap_t &bitmap)
{
polepos_state *state = machine.driver_data<polepos_state>();
const UINT8 *road_control = machine.region("gfx5")->base();
@@ -439,7 +439,7 @@ static void draw_road(running_machine &machine, bitmap_t *bitmap)
}
}
-static void zoom_sprite(running_machine &machine, bitmap_t *bitmap,int big,
+static void zoom_sprite(running_machine &machine, bitmap_t &bitmap,int big,
UINT32 code,UINT32 color,int flipx,int sx,int sy,
int sizex,int sizey)
{
@@ -475,7 +475,7 @@ static void zoom_sprite(running_machine &machine, bitmap_t *bitmap,int big,
int pen = src[offs/2 ^ flipx];
if (!((transmask >> pen) & 1))
- bitmap->pix16(yy, xx) = pen + coloroffs;
+ bitmap.pix16(yy, xx) = pen + coloroffs;
}
offs++;
@@ -490,7 +490,7 @@ static void zoom_sprite(running_machine &machine, bitmap_t *bitmap,int big,
}
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
polepos_state *state = machine.driver_data<polepos_state>();
UINT16 *posmem = &state->m_sprite16_memory[0x380];
diff --git a/src/mame/video/poolshrk.c b/src/mame/video/poolshrk.c
index 6e944364dc6..ea0ab5acfd6 100644
--- a/src/mame/video/poolshrk.c
+++ b/src/mame/video/poolshrk.c
@@ -34,7 +34,7 @@ SCREEN_UPDATE( poolshrk )
tilemap_mark_all_tiles_dirty(state->m_bg_tilemap);
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
/* draw sprites */
diff --git a/src/mame/video/pooyan.c b/src/mame/video/pooyan.c
index f8b3bd0b9eb..5fe5ae86076 100644
--- a/src/mame/video/pooyan.c
+++ b/src/mame/video/pooyan.c
@@ -157,7 +157,7 @@ WRITE8_HANDLER( pooyan_flipscreen_w )
*
*************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
pooyan_state *state = machine.driver_data<pooyan_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/popeye.c b/src/mame/video/popeye.c
index f3ce882f47a..d9223ce8146 100644
--- a/src/mame/video/popeye.c
+++ b/src/mame/video/popeye.c
@@ -279,7 +279,7 @@ VIDEO_START( popeye )
state_save_register_global_pointer(machine, state->m_bitmapram, popeye_bitmapram_size);
}
-static void draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
popeye_state *state = machine.driver_data<popeye_state>();
int offs;
@@ -296,7 +296,7 @@ static void draw_background(running_machine &machine, bitmap_t *bitmap, const re
set_background_palette(machine, (*state->m_palettebank & 0x08) >> 3);
if (state->m_background_pos[1] == 0) /* no background */
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
else
{
/* copy the background graphics */
@@ -313,11 +313,11 @@ static void draw_background(running_machine &machine, bitmap_t *bitmap, const re
scrolly = -scrolly;
}
- copyscrollbitmap(bitmap,state->m_tmpbitmap2,1,&scrollx,1,&scrolly,cliprect);
+ copyscrollbitmap(bitmap,*state->m_tmpbitmap2,1,&scrollx,1,&scrolly,cliprect);
}
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
popeye_state *state = machine.driver_data<popeye_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/popper.c b/src/mame/video/popper.c
index d28516f8970..ca1b010ff08 100644
--- a/src/mame/video/popper.c
+++ b/src/mame/video/popper.c
@@ -204,7 +204,7 @@ VIDEO_START( popper )
state->m_tilemap_clip = machine.primary_screen->visible_area();
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect )
{
popper_state *state = machine.driver_data<popper_state>();
int offs, sx, sy, flipx, flipy;
diff --git a/src/mame/video/portrait.c b/src/mame/video/portrait.c
index b9e716e8d77..39dc21a5f5f 100644
--- a/src/mame/video/portrait.c
+++ b/src/mame/video/portrait.c
@@ -129,7 +129,7 @@ PALETTE_INIT( portrait )
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
portrait_state *state = machine.driver_data<portrait_state>();
UINT8 *source = state->m_spriteram;
diff --git a/src/mame/video/powerins.c b/src/mame/video/powerins.c
index 93f53944f9a..f9e145ea399 100644
--- a/src/mame/video/powerins.c
+++ b/src/mame/video/powerins.c
@@ -263,7 +263,7 @@ Offset: Format: Value:
#define SIGN_EXTEND_POS(_var_) {_var_ &= 0x3ff; if (_var_ > 0x1ff) _var_ -= 0x400;}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect)
{
powerins_state *state = machine.driver_data<powerins_state>();
UINT16 *source = state->m_spriteram + 0x8000/2;
@@ -368,7 +368,7 @@ if (screen.machine().input().code_pressed(KEYCODE_Z))
#endif
if (layers_ctrl&1) tilemap_draw(bitmap,cliprect, state->m_tilemap_0, 0, 0);
- else bitmap->fill(0, cliprect);
+ else bitmap.fill(0, cliprect);
if (layers_ctrl&8) draw_sprites(screen.machine(),bitmap,cliprect);
if (layers_ctrl&2) tilemap_draw(bitmap,cliprect, state->m_tilemap_1, 0, 0);
return 0;
diff --git a/src/mame/video/ppu2c0x.c b/src/mame/video/ppu2c0x.c
index 11388fe806a..59ac6807753 100644
--- a/src/mame/video/ppu2c0x.c
+++ b/src/mame/video/ppu2c0x.c
@@ -76,8 +76,8 @@ static const pen_t default_colortable[] =
typedef struct _ppu2c0x_state ppu2c0x_state;
struct _ppu2c0x_state
{
- address_space *space; /* memory space */
- bitmap_t *bitmap; /* target bitmap */
+ address_space *space; /* memory space */
+ bitmap_t *bitmap; /* target bitmap */
UINT8 *spriteram; /* sprite ram */
pen_t *colortable; /* color table modified at run time */
pen_t *colortable_mono; /* monochromatic color table modified at run time */
@@ -368,7 +368,7 @@ static void draw_background( device_t *device, UINT8 *line_priority )
ppu2c0x_state *ppu2c0x = get_token(device);
/* cache some values locally */
- bitmap_t *bitmap = ppu2c0x->bitmap;
+ bitmap_t &bitmap = *ppu2c0x->bitmap;
const int *ppu_regs = &ppu2c0x->regs[0];
const int scanline = ppu2c0x->scanline;
const int refresh_data = ppu2c0x->refresh_data;
@@ -413,7 +413,7 @@ static void draw_background( device_t *device, UINT8 *line_priority )
tile_index = ((refresh_data & 0xc00) | 0x2000) + scroll_y_coarse * 32;
/* set up dest */
- dest = &bitmap->pix16(scanline, start_x);
+ dest = &bitmap.pix16(scanline, start_x);
/* draw the 32 or 33 tiles that make up a line */
while (tilecount < 34)
@@ -500,7 +500,7 @@ static void draw_background( device_t *device, UINT8 *line_priority )
/* if the left 8 pixels for the background are off, blank 'em */
if (!(ppu_regs[PPU_CONTROL1] & PPU_CONTROL1_BACKGROUND_L8))
{
- dest = &bitmap->pix16(scanline);
+ dest = &bitmap.pix16(scanline);
for (i = 0; i < 8; i++)
{
*(dest++) = back_pen;
@@ -514,7 +514,7 @@ static void draw_sprites( device_t *device, UINT8 *line_priority )
ppu2c0x_state *ppu2c0x = get_token(device);
/* cache some values locally */
- bitmap_t *bitmap = ppu2c0x->bitmap;
+ bitmap_t &bitmap = *ppu2c0x->bitmap;
const int scanline = ppu2c0x->scanline;
const int sprite_page = ppu2c0x->sprite_page;
const UINT8 *sprite_ram = ppu2c0x->spriteram;
@@ -652,7 +652,7 @@ static void draw_sprites( device_t *device, UINT8 *line_priority )
{
/* no, draw */
if ((sprite_xpos + pixel) < VISIBLE_SCREEN_WIDTH)
- bitmap->pix16(scanline, sprite_xpos + pixel) = paldata[pixel_data];
+ bitmap.pix16(scanline, sprite_xpos + pixel) = paldata[pixel_data];
}
/* indicate that a sprite was drawn at this location, even if it's not seen */
if ((sprite_xpos + pixel) < VISIBLE_SCREEN_WIDTH)
@@ -695,7 +695,7 @@ static void draw_sprites( device_t *device, UINT8 *line_priority )
/* no, draw */
if ((sprite_xpos + pixel) < VISIBLE_SCREEN_WIDTH)
{
- bitmap->pix16(scanline, sprite_xpos + pixel) = paldata[pixel_data];
+ bitmap.pix16(scanline, sprite_xpos + pixel) = paldata[pixel_data];
line_priority[sprite_xpos + pixel] |= 0x01;
}
}
@@ -733,7 +733,7 @@ static void render_scanline( device_t *device )
draw_background(device, line_priority);
else
{
- bitmap_t *bitmap = ppu2c0x->bitmap;
+ bitmap_t &bitmap = *ppu2c0x->bitmap;
const int scanline = ppu2c0x->scanline;
UINT8 color_mask;
UINT16 back_pen;
@@ -749,8 +749,8 @@ static void render_scanline( device_t *device )
back_pen = (ppu2c0x->back_color & color_mask) + ppu2c0x->color_base;
// Fill this scanline with the background pen.
- for (i = 0; i < bitmap->width(); i++)
- bitmap->pix16(scanline, i) = back_pen;
+ for (i = 0; i < bitmap.width(); i++)
+ bitmap.pix16(scanline, i) = back_pen;
}
/* if sprites are on, draw them, but we call always to process them */
@@ -781,7 +781,7 @@ static void update_scanline( device_t *device )
}
else
{
- bitmap_t *bitmap = ppu2c0x->bitmap;
+ bitmap_t &bitmap = *ppu2c0x->bitmap;
UINT8 color_mask;
UINT16 back_pen;
int i;
@@ -812,8 +812,8 @@ static void update_scanline( device_t *device )
back_pen = (ppu2c0x->back_color & color_mask) + ppu2c0x->color_base;
// Fill this scanline with the background pen.
- for (i = 0; i < bitmap->width(); i++)
- bitmap->pix16(scanline, i) = back_pen;
+ for (i = 0; i < bitmap.width(); i++)
+ bitmap.pix16(scanline, i) = back_pen;
}
/* increment the fine y-scroll */
@@ -1206,10 +1206,10 @@ void ppu2c0x_spriteram_dma( address_space *space, device_t *device, const UINT8
*
*************************************/
-void ppu2c0x_render( device_t *device, bitmap_t *bitmap, int flipx, int flipy, int sx, int sy )
+void ppu2c0x_render( device_t *device, bitmap_t &bitmap, int flipx, int flipy, int sx, int sy )
{
ppu2c0x_state *ppu2c0x = get_token(device);
- copybitmap(bitmap, ppu2c0x->bitmap, flipx, flipy, sx, sy, bitmap->cliprect());
+ copybitmap(bitmap, *ppu2c0x->bitmap, flipx, flipy, sx, sy, bitmap.cliprect());
}
/*************************************
diff --git a/src/mame/video/ppu2c0x.h b/src/mame/video/ppu2c0x.h
index 3fcc46feb80..5aa9b033b15 100644
--- a/src/mame/video/ppu2c0x.h
+++ b/src/mame/video/ppu2c0x.h
@@ -109,7 +109,7 @@ void ppu2c0x_init_palette(running_machine &machine, int first_entry );
void ppu2c0x_init_palette_rgb(running_machine &machine, int first_entry );
void ppu2c0x_spriteram_dma(address_space *space, device_t *device, const UINT8 page ) ATTR_NONNULL(1);
-void ppu2c0x_render( device_t *device, bitmap_t *bitmap, int flipx, int flipy, int sx, int sy ) ATTR_NONNULL(1);
+void ppu2c0x_render( device_t *device, bitmap_t &bitmap, int flipx, int flipy, int sx, int sy ) ATTR_NONNULL(1);
int ppu2c0x_get_pixel( device_t *device, int x, int y ) ATTR_NONNULL(1);
int ppu2c0x_get_colorbase( device_t *device ) ATTR_NONNULL(1);
int ppu2c0x_get_current_scanline( device_t *device ) ATTR_NONNULL(1);
diff --git a/src/mame/video/prehisle.c b/src/mame/video/prehisle.c
index dfc7598d7fe..c144a668a87 100644
--- a/src/mame/video/prehisle.c
+++ b/src/mame/video/prehisle.c
@@ -128,7 +128,7 @@ o fedcba9876543210
3 xxxx............ color+priority, other bits unknown
*/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int foreground )
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int foreground )
{
prehisle_state *state = machine.driver_data<prehisle_state>();
UINT16 *spriteram16 = state->m_spriteram;
diff --git a/src/mame/video/psikyo.c b/src/mame/video/psikyo.c
index 8990ced2ea0..46878dcbf91 100644
--- a/src/mame/video/psikyo.c
+++ b/src/mame/video/psikyo.c
@@ -263,7 +263,7 @@ Note: Not all sprites are displayed: in the top part of spriteram
***************************************************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int trans_pen )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int trans_pen )
{
psikyo_state *state = machine.driver_data<psikyo_state>();
@@ -382,7 +382,7 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
// until I work out why it makes a partial copy of the sprite list, and how best to apply it
// sprite placement of the explosion graphic seems incorrect compared to the original sets? (no / different zoom support?)
// it might be a problem with the actual bootleg
-static void draw_sprites_bootleg( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int trans_pen )
+static void draw_sprites_bootleg( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int trans_pen )
{
psikyo_state *state = machine.driver_data<psikyo_state>();
@@ -674,9 +674,9 @@ SCREEN_UPDATE( psikyo )
tilemap_set_transparent_pen(state->m_tilemap_1_size2, (layer1_ctrl & 8 ? 0 : 15));
tilemap_set_transparent_pen(state->m_tilemap_1_size3, (layer1_ctrl & 8 ? 0 : 15));
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
if (layers_ctrl & 1)
tilemap_draw(bitmap, cliprect, tmptilemap0, layer0_ctrl & 2 ? TILEMAP_DRAW_OPAQUE : 0, 1);
@@ -848,9 +848,9 @@ SCREEN_UPDATE( psikyo_bootleg )
tilemap_set_transparent_pen(state->m_tilemap_1_size2, (layer1_ctrl & 8 ? 0 : 15));
tilemap_set_transparent_pen(state->m_tilemap_1_size3, (layer1_ctrl & 8 ? 0 : 15));
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
if (layers_ctrl & 1)
tilemap_draw(bitmap, cliprect, tmptilemap0, layer0_ctrl & 2 ? TILEMAP_DRAW_OPAQUE : 0, 1);
diff --git a/src/mame/video/psikyo4.c b/src/mame/video/psikyo4.c
index 099b12c3d5a..2ffde63fb5e 100644
--- a/src/mame/video/psikyo4.c
+++ b/src/mame/video/psikyo4.c
@@ -31,7 +31,7 @@ HgKairak: 86010000 1f201918 a0000000 Large Screen
/* --- SPRITES --- */
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, UINT32 scr )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, UINT32 scr )
{
/*- Sprite Format 0x0000 - 0x2bff -**
@@ -129,14 +129,14 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
SCREEN_UPDATE( psikyo4_left )
{
- bitmap->fill(0x1000, cliprect);
+ bitmap.fill(0x1000, cliprect);
draw_sprites(screen.machine(), bitmap, cliprect, 0x0000);
return 0;
}
SCREEN_UPDATE( psikyo4_right )
{
- bitmap->fill(0x1001, cliprect);
+ bitmap.fill(0x1001, cliprect);
draw_sprites(screen.machine(), bitmap, cliprect, 0x2000);
return 0;
}
diff --git a/src/mame/video/psikyosh.c b/src/mame/video/psikyosh.c
index 61f37ae9a3d..52f7b622a0b 100644
--- a/src/mame/video/psikyosh.c
+++ b/src/mame/video/psikyosh.c
@@ -147,13 +147,12 @@ while (0) \
draw_scanline32_alpha - take an RGB-encoded UINT32
scanline and alpha-blend it into the destination bitmap
-------------------------------------------------*/
-static void draw_scanline32_alpha(bitmap_t *bitmap, INT32 destx, INT32 desty, INT32 length, const UINT32 *srcptr, int alpha)
+static void draw_scanline32_alpha(bitmap_t &bitmap, INT32 destx, INT32 desty, INT32 length, const UINT32 *srcptr, int alpha)
{
- bitmap_t *priority = NULL; /* dummy, no priority in this case */
+ DECLARE_NO_PRIORITY;
UINT32 transpen = BG_TRANSPEN;
- assert(bitmap != NULL);
- assert(bitmap->bpp() == 32);
+ assert(bitmap.bpp() == 32);
DRAWSCANLINE_CORE(UINT32, PIXEL_OP_COPY_TRANSPEN_ALPHARENDER32, NO_PRIORITY);
}
@@ -162,14 +161,13 @@ static void draw_scanline32_alpha(bitmap_t *bitmap, INT32 destx, INT32 desty, IN
draw_scanline32_argb - take an ARGB-encoded UINT32
scanline and alpha-blend it into the destination bitmap
-------------------------------------------------*/
-static void draw_scanline32_argb(bitmap_t *bitmap, INT32 destx, INT32 desty, INT32 length, const UINT32 *srcptr)
+static void draw_scanline32_argb(bitmap_t &bitmap, INT32 destx, INT32 desty, INT32 length, const UINT32 *srcptr)
{
- bitmap_t *priority = NULL; /* dummy, no priority in this case */
+ DECLARE_NO_PRIORITY;
UINT32 transpen = BG_TRANSPEN;
- assert(bitmap != NULL);
- assert(bitmap->bpp() == 32);
- assert(bitmap->format() == BITMAP_FORMAT_ARGB32);
+ assert(bitmap.bpp() == 32);
+ assert(bitmap.format() == BITMAP_FORMAT_ARGB32);
DRAWSCANLINE_CORE(UINT32, PIXEL_OP_COPY_TRANSPEN_ARGBRENDER32, NO_PRIORITY);
}
@@ -178,14 +176,13 @@ static void draw_scanline32_argb(bitmap_t *bitmap, INT32 destx, INT32 desty, INT
draw_scanline32_tranpens - take an RGB-encoded UINT32
scanline and copy it into the destination bitmap, testing for the special ARGB transpen
-------------------------------------------------*/
-static void draw_scanline32_transpen(bitmap_t *bitmap, INT32 destx, INT32 desty, INT32 length, const UINT32 *srcptr)
+static void draw_scanline32_transpen(bitmap_t &bitmap, INT32 destx, INT32 desty, INT32 length, const UINT32 *srcptr)
{
- bitmap_t *priority = NULL; /* dummy, no priority in this case */
+ DECLARE_NO_PRIORITY;
UINT32 transpen = BG_TRANSPEN;
- assert(bitmap != NULL);
- assert(bitmap->bpp() == 32);
- assert(bitmap->format() == BITMAP_FORMAT_ARGB32);
+ assert(bitmap.bpp() == 32);
+ assert(bitmap.format() == BITMAP_FORMAT_ARGB32);
DRAWSCANLINE_CORE(UINT32, PIXEL_OP_COPY_TRANSPEN_RENDER32, NO_PRIORITY);
}
@@ -195,18 +192,17 @@ static void draw_scanline32_transpen(bitmap_t *bitmap, INT32 destx, INT32 desty,
a single transparent pen, storing the alpha value
in alpha field of ARGB32, negative alpha implies alphatable
-------------------------------------------------*/
-static void drawgfx_alphastore(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx,
+static void drawgfx_alphastore(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx,
UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,
int fixedalpha)
{
psikyosh_state *state = gfx->machine().driver_data<psikyosh_state>();
UINT8 *alphatable = state->m_alphatable;
- bitmap_t *priority = NULL; /* dummy, no priority in this case */
+ DECLARE_NO_PRIORITY;
const pen_t *paldata;
- assert(dest != NULL);
- assert(dest->bpp() == 32);
- assert(dest->format() == BITMAP_FORMAT_ARGB32);
+ assert(dest.bpp() == 32);
+ assert(dest.format() == BITMAP_FORMAT_ARGB32);
assert(gfx != NULL);
assert(alphatable != NULL);
@@ -242,13 +238,13 @@ static void drawgfx_alphastore(bitmap_t *dest, const rectangle &cliprect, const
a fixed alpha value, or if alpha==-1 then uses
the per-pen alphatable[] array
-------------------------------------------------*/
-static void drawgfx_alphatable(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx,
+static void drawgfx_alphatable(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx,
UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,
int fixedalpha)
{
psikyosh_state *state = gfx->machine().driver_data<psikyosh_state>();
UINT8 *alphatable = state->m_alphatable;
- bitmap_t *priority = NULL; /* dummy, no priority in this case */
+ DECLARE_NO_PRIORITY;
const pen_t *paldata;
@@ -259,8 +255,7 @@ static void drawgfx_alphatable(bitmap_t *dest, const rectangle &cliprect, const
return;
}
- assert(dest != NULL);
- assert(dest->bpp() == 32);
+ assert(dest.bpp() == 32);
assert(gfx != NULL);
assert(alphatable != NULL);
@@ -281,7 +276,7 @@ static void drawgfx_alphatable(bitmap_t *dest, const rectangle &cliprect, const
/* 'Normal' layers, no line/columnscroll. No per-line effects.
Zooming isn't supported just because it's not used and it would be slow */
-static void draw_bglayer( running_machine &machine, int layer, bitmap_t *bitmap, const rectangle &cliprect, UINT8 req_pri )
+static void draw_bglayer( running_machine &machine, int layer, bitmap_t &bitmap, const rectangle &cliprect, UINT8 req_pri )
{
psikyosh_state *state = machine.driver_data<psikyosh_state>();
gfx_element *gfx;
@@ -375,7 +370,7 @@ static void cache_bitmap(int scanline, psikyosh_state *state, gfx_element *gfx,
int need_alpha = alpha < 0 ? -1 : 0xff; // store per-pen alpha in bitmap, otherwise don't since we'll need it per-line
if(tileno) { // valid tile, but blank in all games?
- drawgfx_alphastore(state->m_bg_bitmap, state->m_bg_bitmap->cliprect(), gfx, tileno, colour, 0, 0, (16 * sx) & 0x1ff, ((16 * sy) & (width - 1)), need_alpha);
+ drawgfx_alphastore(*state->m_bg_bitmap, state->m_bg_bitmap->cliprect(), gfx, tileno, colour, 0, 0, (16 * sx) & 0x1ff, ((16 * sy) & (width - 1)), need_alpha);
}
offs++;
@@ -389,7 +384,7 @@ static void cache_bitmap(int scanline, psikyosh_state *state, gfx_element *gfx,
Bitmap is first rendered to an ARGB image, taking into account the per-pen alpha (if used).
From there we extract data as we compose the image, one scanline at a time, blending the ARGB pixels
into the RGB32 bitmap (with either the alpha information from the ARGB, or per-line alpha */
-static void draw_bglayerscroll( running_machine &machine, int layer, bitmap_t *bitmap, const rectangle &cliprect, UINT8 req_pri )
+static void draw_bglayerscroll( running_machine &machine, int layer, bitmap_t &bitmap, const rectangle &cliprect, UINT8 req_pri )
{
psikyosh_state *state = machine.driver_data<psikyosh_state>();
assert(BG_LINE(layer));
@@ -443,7 +438,7 @@ static void draw_bglayerscroll( running_machine &machine, int layer, bitmap_t *b
g_profiler.start(PROFILER_USER2);
UINT32 tilemap_line[32 * 16];
UINT32 scr_line[64 * 8];
- extract_scanline32(state->m_bg_bitmap, 0, tilemap_scanline, width, tilemap_line);
+ extract_scanline32(*state->m_bg_bitmap, 0, tilemap_scanline, width, tilemap_line);
g_profiler.stop();
/* slow bit, needs optimising. apply scrollx and zoomx by assembling scanline from row */
@@ -484,7 +479,7 @@ static void draw_bglayerscroll( running_machine &machine, int layer, bitmap_t *b
}
/* 3 BG layers, with priority */
-static void draw_background( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, UINT8 req_pri )
+static void draw_background( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, UINT8 req_pri )
{
psikyosh_state *state = machine.driver_data<psikyosh_state>();
int i;
@@ -532,7 +527,7 @@ static void draw_background( running_machine &machine, bitmap_t *bitmap, const r
/* Note that Level 5-4 of sbomberb boss is perfect! (Alpha blended zoomed) as well as S1945II logo */
/* pixel is only plotted if z is >= priority_buffer[y][x] */
static void psikyosh_drawgfxzoom( running_machine &machine,
- bitmap_t *dest_bmp,const rectangle &clip,const gfx_element *gfx,
+ bitmap_t &dest_bmp,const rectangle &clip,const gfx_element *gfx,
UINT32 code,UINT32 color,int flipx,int flipy,int offsx,int offsy,
int alpha, int zoomx, int zoomy, int wide, int high, UINT32 z)
{
@@ -547,11 +542,11 @@ static void psikyosh_drawgfxzoom( running_machine &machine,
g_profiler.start(PROFILER_DRAWGFX);
- assert(dest_bmp->bpp() == 32);
+ assert(dest_bmp.bpp() == 32);
/* KW 991012 -- Added code to force clip to bitmap boundary */
myclip = clip;
- myclip &= dest_bmp->cliprect();
+ myclip &= dest_bmp.cliprect();
/* Temporary fallback for non-zoomed, needs z-buffer. Note that this is probably a lot slower than drawgfx.c, especially if there was separate code for flipped cases */
if (zoomx == 0x400 && zoomy == 0x400)
@@ -624,10 +619,10 @@ static void psikyosh_drawgfxzoom( running_machine &machine,
if (z > 0)
{
const UINT8 *source = code_base + (y_index) * gfx->line_modulo + x_index_base;
- UINT32 *dest = &dest_bmp->pix32(sy, sx);
+ UINT32 *dest = &dest_bmp.pix32(sy, sx);
UINT16 *pri = &state->m_z_bitmap->pix16(sy, sx);
int src_modulo = yinc * gfx->line_modulo - xinc * (ex - sx);
- int dst_modulo = dest_bmp->rowpixels() - (ex - sx);
+ int dst_modulo = dest_bmp.rowpixels() - (ex - sx);
for (y = sy; y < ey; y++)
{
@@ -655,9 +650,9 @@ static void psikyosh_drawgfxzoom( running_machine &machine,
else
{
const UINT8 *source = code_base + y_index * gfx->line_modulo + x_index_base;
- UINT32 *dest = &dest_bmp->pix32(sy, sx);
+ UINT32 *dest = &dest_bmp.pix32(sy, sx);
int src_modulo = yinc * gfx->line_modulo - xinc * (ex - sx);
- int dst_modulo = dest_bmp->rowpixels() - (ex - sx);
+ int dst_modulo = dest_bmp.rowpixels() - (ex - sx);
for (y = sy; y < ey; y++)
{
@@ -683,10 +678,10 @@ static void psikyosh_drawgfxzoom( running_machine &machine,
if (z > 0)
{
const UINT8 *source = code_base + y_index * gfx->line_modulo + x_index_base;
- UINT32 *dest = &dest_bmp->pix32(sy, sx);
+ UINT32 *dest = &dest_bmp.pix32(sy, sx);
UINT16 *pri = &state->m_z_bitmap->pix16(sy, sx);
int src_modulo = yinc * gfx->line_modulo - xinc * (ex - sx);
- int dst_modulo = dest_bmp->rowpixels() - (ex - sx);
+ int dst_modulo = dest_bmp.rowpixels() - (ex - sx);
for (y = sy; y < ey; y++)
{
@@ -714,9 +709,9 @@ static void psikyosh_drawgfxzoom( running_machine &machine,
else
{
const UINT8 *source = code_base + y_index * gfx->line_modulo + x_index_base;
- UINT32 *dest = &dest_bmp->pix32(sy, sx);
+ UINT32 *dest = &dest_bmp.pix32(sy, sx);
int src_modulo = yinc * gfx->line_modulo - xinc * (ex - sx);
- int dst_modulo = dest_bmp->rowpixels() - (ex - sx);
+ int dst_modulo = dest_bmp.rowpixels() - (ex - sx);
for (y = sy; y < ey; y++)
{
@@ -743,10 +738,10 @@ static void psikyosh_drawgfxzoom( running_machine &machine,
if (z > 0)
{
const UINT8 *source = code_base + y_index * gfx->line_modulo + x_index_base;
- UINT32 *dest = &dest_bmp->pix32(sy, sx);
+ UINT32 *dest = &dest_bmp.pix32(sy, sx);
UINT16 *pri = &state->m_z_bitmap->pix16(sy, sx);
int src_modulo = yinc * gfx->line_modulo - xinc * (ex - sx);
- int dst_modulo = dest_bmp->rowpixels() - (ex - sx);
+ int dst_modulo = dest_bmp.rowpixels() - (ex - sx);
for (y = sy; y < ey; y++)
{
@@ -778,9 +773,9 @@ static void psikyosh_drawgfxzoom( running_machine &machine,
else
{
const UINT8 *source = code_base + y_index * gfx->line_modulo + x_index_base;
- UINT32 *dest = &dest_bmp->pix32(sy, sx);
+ UINT32 *dest = &dest_bmp.pix32(sy, sx);
int src_modulo = yinc * gfx->line_modulo - xinc * (ex - sx);
- int dst_modulo = dest_bmp->rowpixels() - (ex - sx);
+ int dst_modulo = dest_bmp.rowpixels() - (ex - sx);
for (y = sy; y < ey; y++)
{
@@ -897,7 +892,7 @@ static void psikyosh_drawgfxzoom( running_machine &machine,
for (y = sy; y < ey; y++)
{
UINT8 *source = &state->m_zoom_bitmap->pix8(y_index >> 10);
- UINT32 *dest = &dest_bmp->pix32(y);
+ UINT32 *dest = &dest_bmp.pix32(y);
UINT16 *pri = &state->m_z_bitmap->pix16(y);
int x, x_index = x_index_base;
@@ -923,7 +918,7 @@ static void psikyosh_drawgfxzoom( running_machine &machine,
for (y = sy; y < ey; y++)
{
UINT8 *source = &state->m_zoom_bitmap->pix8(y_index >> 10);
- UINT32 *dest = &dest_bmp->pix32(y);
+ UINT32 *dest = &dest_bmp.pix32(y);
int x, x_index = x_index_base;
for (x = sx; x < ex; x++)
@@ -947,7 +942,7 @@ static void psikyosh_drawgfxzoom( running_machine &machine,
for (y = sy; y < ey; y++)
{
UINT8 *source = &state->m_zoom_bitmap->pix8(y_index >> 10);
- UINT32 *dest = &dest_bmp->pix32(y);
+ UINT32 *dest = &dest_bmp.pix32(y);
UINT16 *pri = &state->m_z_bitmap->pix16(y);
int x, x_index = x_index_base;
@@ -973,7 +968,7 @@ static void psikyosh_drawgfxzoom( running_machine &machine,
for (y = sy; y < ey; y++)
{
UINT8 *source = &state->m_zoom_bitmap->pix8(y_index >> 10);
- UINT32 *dest = &dest_bmp->pix32(y);
+ UINT32 *dest = &dest_bmp.pix32(y);
int x, x_index = x_index_base;
for (x = sx; x < ex; x++)
@@ -996,7 +991,7 @@ static void psikyosh_drawgfxzoom( running_machine &machine,
for (y = sy; y < ey; y++)
{
UINT8 *source = &state->m_zoom_bitmap->pix8(y_index >> 10);
- UINT32 *dest = &dest_bmp->pix32(y);
+ UINT32 *dest = &dest_bmp.pix32(y);
UINT16 *pri = &state->m_z_bitmap->pix16(y);
int x, x_index = x_index_base;
@@ -1026,7 +1021,7 @@ static void psikyosh_drawgfxzoom( running_machine &machine,
for (y = sy; y < ey; y++)
{
UINT8 *source = &state->m_zoom_bitmap->pix8(y_index >> 10);
- UINT32 *dest = &dest_bmp->pix32(y);
+ UINT32 *dest = &dest_bmp.pix32(y);
int x, x_index = x_index_base;
for (x = sx; x < ex; x++)
@@ -1054,7 +1049,7 @@ static void psikyosh_drawgfxzoom( running_machine &machine,
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, UINT8 req_pri)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, UINT8 req_pri)
{
/*- Sprite Format 0x0000 - 0x37ff -**
@@ -1174,7 +1169,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const recta
}
-static void psikyosh_prelineblend( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void psikyosh_prelineblend( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
/* There are 224 values for pre-lineblending. Using one for every row currently */
/* I suspect that it should be blended against black by the amount specified as
@@ -1186,12 +1181,12 @@ static void psikyosh_prelineblend( running_machine &machine, bitmap_t *bitmap, c
UINT32 *linefill = &state->m_bgram[(bank * 0x800) / 4 - 0x4000 / 4]; /* Per row */
int x, y;
- assert(bitmap->bpp() == 32);
+ assert(bitmap.bpp() == 32);
g_profiler.start(PROFILER_USER8);
for (y = cliprect.min_y; y <= cliprect.max_y; y += 1) {
- dstline = &bitmap->pix32(y);
+ dstline = &bitmap.pix32(y);
/* linefill[y] & 0xff does what? */
for (x = cliprect.min_x; x <= cliprect.max_x; x += 1)
@@ -1201,7 +1196,7 @@ static void psikyosh_prelineblend( running_machine &machine, bitmap_t *bitmap, c
}
-static void psikyosh_postlineblend( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, UINT8 req_pri )
+static void psikyosh_postlineblend( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, UINT8 req_pri )
{
/* There are 224 values for post-lineblending. Using one for every row currently */
psikyosh_state *state = machine.driver_data<psikyosh_state>();
@@ -1210,7 +1205,7 @@ static void psikyosh_postlineblend( running_machine &machine, bitmap_t *bitmap,
UINT32 *lineblend = &state->m_bgram[(bank * 0x800) / 4 - 0x4000 / 4 + 0x400 / 4]; /* Per row */
int x, y;
- assert(bitmap->bpp() == 32);
+ assert(bitmap.bpp() == 32);
if ((state->m_vidregs[2] & 0xf) != req_pri) {
return;
@@ -1219,7 +1214,7 @@ static void psikyosh_postlineblend( running_machine &machine, bitmap_t *bitmap,
g_profiler.start(PROFILER_USER8);
for (y = cliprect.min_y; y <= cliprect.max_y; y += 1) {
- dstline = &bitmap->pix32(y);
+ dstline = &bitmap.pix32(y);
if (lineblend[y] & 0x80) /* solid */
{
diff --git a/src/mame/video/psychic5.c b/src/mame/video/psychic5.c
index 7557b6cfb46..0fb0e066565 100644
--- a/src/mame/video/psychic5.c
+++ b/src/mame/video/psychic5.c
@@ -311,7 +311,7 @@ VIDEO_RESET( bombsa )
#define DRAW_SPRITE(code, sx, sy) jal_blend_drawgfx(bitmap, cliprect, machine.gfx[0], code, color, flipx, flipy, sx, sy, 15);
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
psychic5_state *state = machine.driver_data<psychic5_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -365,7 +365,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const recta
}
}
-static void draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
psychic5_state *state = machine.driver_data<psychic5_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -435,7 +435,7 @@ static void draw_background(running_machine &machine, bitmap_t *bitmap, const re
SCREEN_UPDATE( psychic5 )
{
psychic5_state *state = screen.machine().driver_data<psychic5_state>();
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
if (state->m_bg_status & 1) /* Backgound enable */
draw_background(screen.machine(), bitmap, cliprect);
if (!(state->m_title_screen & 1))
@@ -450,7 +450,7 @@ SCREEN_UPDATE( bombsa )
if (state->m_bg_status & 1) /* Backgound enable */
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
else
- bitmap->fill(screen.machine().pens[0x0ff], cliprect);
+ bitmap.fill(screen.machine().pens[0x0ff], cliprect);
draw_sprites(screen.machine(), bitmap, cliprect);
tilemap_draw(bitmap, cliprect, state->m_fg_tilemap, 0, 0);
return 0;
diff --git a/src/mame/video/punchout.c b/src/mame/video/punchout.c
index d90d57750d1..4c53257f2ac 100644
--- a/src/mame/video/punchout.c
+++ b/src/mame/video/punchout.c
@@ -205,7 +205,7 @@ WRITE8_HANDLER( punchout_spr2_videoram_w )
-static void draw_big_sprite(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int palette)
+static void draw_big_sprite(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int palette)
{
punchout_state *state = machine.driver_data<punchout_state>();
int zoom;
@@ -249,7 +249,7 @@ static void draw_big_sprite(running_machine &machine, bitmap_t *bitmap, const re
}
-static void armwrest_draw_big_sprite(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int palette)
+static void armwrest_draw_big_sprite(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int palette)
{
punchout_state *state = machine.driver_data<punchout_state>();
int zoom;
@@ -296,7 +296,7 @@ static void armwrest_draw_big_sprite(running_machine &machine, bitmap_t *bitmap,
}
}
-static void drawbs2(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void drawbs2(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
punchout_state *state = machine.driver_data<punchout_state>();
int sx,sy;
diff --git a/src/mame/video/pushman.c b/src/mame/video/pushman.c
index ef0f2457b2a..5c0b781f9ab 100644
--- a/src/mame/video/pushman.c
+++ b/src/mame/video/pushman.c
@@ -85,7 +85,7 @@ WRITE16_HANDLER( pushman_videoram_w )
***************************************************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
pushman_state *state = machine.driver_data<pushman_state>();
UINT16 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/qdrmfgp.c b/src/mame/video/qdrmfgp.c
index 53edde4634d..36acf59ee4a 100644
--- a/src/mame/video/qdrmfgp.c
+++ b/src/mame/video/qdrmfgp.c
@@ -60,7 +60,7 @@ VIDEO_START( qdrmfgp2 )
SCREEN_UPDATE( qdrmfgp )
{
device_t *k056832 = screen.machine().device("k056832");
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
k056832_tilemap_draw(k056832, bitmap, cliprect, 3, 0, 1);
k056832_tilemap_draw(k056832, bitmap, cliprect, 2, 0, 2);
diff --git a/src/mame/video/qix.c b/src/mame/video/qix.c
index 116195554fa..1c91aaf5114 100644
--- a/src/mame/video/qix.c
+++ b/src/mame/video/qix.c
@@ -323,7 +323,7 @@ static MC6845_BEGIN_UPDATE( begin_update )
static MC6845_UPDATE_ROW( update_row )
{
qix_state *state = device->machine().driver_data<qix_state>();
- UINT32 *dest = &bitmap->pix32(y);
+ UINT32 *dest = &bitmap.pix32(y);
UINT16 x;
pen_t *pens = (pen_t *)param;
diff --git a/src/mame/video/quasar.c b/src/mame/video/quasar.c
index e8b1dc326b0..28a64f3204b 100644
--- a/src/mame/video/quasar.c
+++ b/src/mame/video/quasar.c
@@ -107,7 +107,6 @@ SCREEN_UPDATE( quasar )
{
quasar_state *state = screen.machine().driver_data<quasar_state>();
int offs;
- bitmap_t *s2636_0_bitmap, *s2636_1_bitmap, *s2636_2_bitmap;
/* for every character in the video RAM */
for (offs = 0; offs < 0x0400; offs++)
@@ -124,7 +123,7 @@ SCREEN_UPDATE( quasar )
for (ox = 0; ox < 8; ox++)
for (oy = 0; oy < 8; oy++)
- bitmap->pix16(y + oy, x + ox) = forecolor;
+ bitmap.pix16(y + oy, x + ox) = forecolor;
/* Main Screen */
drawgfx_transpen(bitmap,cliprect,screen.machine().gfx[0],
@@ -137,7 +136,7 @@ SCREEN_UPDATE( quasar )
/* background for Collision Detection (it can only hit certain items) */
if((state->m_color_ram[offs] & 7) == 0)
{
- drawgfx_opaque(state->m_collision_background,cliprect,screen.machine().gfx[0],
+ drawgfx_opaque(*state->m_collision_background,cliprect,screen.machine().gfx[0],
code,
64,
0,0,
@@ -146,9 +145,9 @@ SCREEN_UPDATE( quasar )
}
/* update the S2636 chips */
- s2636_0_bitmap = s2636_update(state->m_s2636_0, cliprect);
- s2636_1_bitmap = s2636_update(state->m_s2636_1, cliprect);
- s2636_2_bitmap = s2636_update(state->m_s2636_2, cliprect);
+ bitmap_t &s2636_0_bitmap = s2636_update(state->m_s2636_0, cliprect);
+ bitmap_t &s2636_1_bitmap = s2636_update(state->m_s2636_1, cliprect);
+ bitmap_t &s2636_2_bitmap = s2636_update(state->m_s2636_2, cliprect);
/* Bullet Hardware */
for (offs = 8; offs < 256; offs++ )
@@ -161,10 +160,10 @@ SCREEN_UPDATE( quasar )
int bx = 255 - 9 - state->m_bullet_ram[offs] - ct;
/* bullet/object Collision */
- if (s2636_0_bitmap->pix16(offs, bx) != 0) state->m_collision_register |= 0x04;
- if (s2636_2_bitmap->pix16(offs, bx) != 0) state->m_collision_register |= 0x08;
+ if (s2636_0_bitmap.pix16(offs, bx) != 0) state->m_collision_register |= 0x04;
+ if (s2636_2_bitmap.pix16(offs, bx) != 0) state->m_collision_register |= 0x08;
- bitmap->pix16(offs, bx) = 7;
+ bitmap.pix16(offs, bx) = 7;
}
}
}
@@ -180,15 +179,15 @@ SCREEN_UPDATE( quasar )
for (x = cliprect.min_x; x <= cliprect.max_x; x++)
{
- int pixel0 = s2636_0_bitmap->pix16(y, x);
- int pixel1 = s2636_1_bitmap->pix16(y, x);
- int pixel2 = s2636_2_bitmap->pix16(y, x);
+ int pixel0 = s2636_0_bitmap.pix16(y, x);
+ int pixel1 = s2636_1_bitmap.pix16(y, x);
+ int pixel2 = s2636_2_bitmap.pix16(y, x);
int pixel = pixel0 | pixel1 | pixel2;
if (S2636_IS_PIXEL_DRAWN(pixel))
{
- bitmap->pix16(y, x) = S2636_PIXEL_COLOR(pixel);
+ bitmap.pix16(y, x) = S2636_PIXEL_COLOR(pixel);
/* S2636 vs. background collision detection */
if (colortable_entry_get_value(screen.machine().colortable, state->m_collision_background->pix16(y, x)))
diff --git a/src/mame/video/quizdna.c b/src/mame/video/quizdna.c
index 95cedf85750..918175ac40d 100644
--- a/src/mame/video/quizdna.c
+++ b/src/mame/video/quizdna.c
@@ -138,7 +138,7 @@ WRITE8_HANDLER( paletteram_xBGR_RRRR_GGGG_BBBB_w )
palette_set_color_rgb(space->machine(),offs/2,pal5bit(r),pal5bit(g),pal5bit(b));
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
quizdna_state *state = machine.driver_data<quizdna_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -202,6 +202,6 @@ SCREEN_UPDATE( quizdna )
tilemap_draw(bitmap, cliprect, state->m_fg_tilemap, 0, 0);
}
else
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
return 0;
}
diff --git a/src/mame/video/raiden.c b/src/mame/video/raiden.c
index 9a931dbdfda..2ebeadab147 100644
--- a/src/mame/video/raiden.c
+++ b/src/mame/video/raiden.c
@@ -119,7 +119,7 @@ WRITE16_HANDLER( raidena_control_w )
}
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect,int pri_mask)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect,int pri_mask)
{
raiden_state *state = machine.driver_data<raiden_state>();
UINT16 *buffered_spriteram16 = machine.generic.buffered_spriteram.u16;
diff --git a/src/mame/video/rainbow.c b/src/mame/video/rainbow.c
index f479c2742eb..a21943d4d2c 100644
--- a/src/mame/video/rainbow.c
+++ b/src/mame/video/rainbow.c
@@ -52,7 +52,7 @@ SCREEN_UPDATE( rainbow )
layer[0] = 0;
layer[1] = 1;
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
pc080sn_tilemap_draw(state->m_pc080sn, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 1);
pc080sn_tilemap_draw(state->m_pc080sn, bitmap, cliprect, layer[1], 0, 2);
@@ -102,7 +102,7 @@ SCREEN_UPDATE( jumping )
layer[0] = 0;
layer[1] = 1;
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
pc080sn_tilemap_draw(state->m_pc080sn, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 0);
diff --git a/src/mame/video/rallyx.c b/src/mame/video/rallyx.c
index 749ddf7a3cc..aa7d8b54337 100644
--- a/src/mame/video/rallyx.c
+++ b/src/mame/video/rallyx.c
@@ -446,7 +446,7 @@ WRITE8_HANDLER( tactcian_starson_w )
}
-static void plot_star( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int x, int y, int color )
+static void plot_star( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int x, int y, int color )
{
if (y < cliprect.min_y || y > cliprect.max_y ||
x < cliprect.min_x || x > cliprect.max_x)
@@ -458,11 +458,11 @@ static void plot_star( running_machine &machine, bitmap_t *bitmap, const rectang
if (flip_screen_y_get(machine))
y = 255 - y;
- if (colortable_entry_get_value(machine.colortable, bitmap->pix16(y, x) % 0x144) == 0)
- bitmap->pix16(y, x) = STARS_COLOR_BASE + color;
+ if (colortable_entry_get_value(machine.colortable, bitmap.pix16(y, x) % 0x144) == 0)
+ bitmap.pix16(y, x) = STARS_COLOR_BASE + color;
}
-static void draw_stars( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_stars( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
rallyx_state *state = machine.driver_data<rallyx_state>();
int offs;
@@ -478,7 +478,7 @@ static void draw_stars( running_machine &machine, bitmap_t *bitmap, const rectan
}
-static void rallyx_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int displacement )
+static void rallyx_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int displacement )
{
rallyx_state *state = machine.driver_data<rallyx_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -505,7 +505,7 @@ static void rallyx_draw_sprites( running_machine &machine, bitmap_t *bitmap, con
}
}
-static void locomotn_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int displacement )
+static void locomotn_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int displacement )
{
rallyx_state *state = machine.driver_data<rallyx_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -529,7 +529,7 @@ static void locomotn_draw_sprites( running_machine &machine, bitmap_t *bitmap, c
}
}
-static void rallyx_draw_bullets( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int transpen )
+static void rallyx_draw_bullets( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int transpen )
{
rallyx_state *state = machine.driver_data<rallyx_state>();
int offs;
@@ -560,7 +560,7 @@ static void rallyx_draw_bullets( running_machine &machine, bitmap_t *bitmap, con
}
}
-static void jungler_draw_bullets( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int transpen )
+static void jungler_draw_bullets( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int transpen )
{
rallyx_state *state = machine.driver_data<rallyx_state>();
int offs;
@@ -589,7 +589,7 @@ static void jungler_draw_bullets( running_machine &machine, bitmap_t *bitmap, co
}
}
-static void locomotn_draw_bullets( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int transpen )
+static void locomotn_draw_bullets( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int transpen )
{
rallyx_state *state = machine.driver_data<rallyx_state>();
int offs;
@@ -646,7 +646,7 @@ SCREEN_UPDATE( rallyx )
fg_clip.min_x = 28 * 8;
}
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
tilemap_draw(bitmap, bg_clip, state->m_bg_tilemap, 0, 0);
tilemap_draw(bitmap, fg_clip, state->m_fg_tilemap, 0, 0);
@@ -680,7 +680,7 @@ SCREEN_UPDATE( jungler )
fg_clip.min_x = 28 * 8;
}
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
/* tile priority doesn't seem to be supported in Jungler */
tilemap_draw(bitmap,bg_clip, state->m_bg_tilemap, 0, 0);
@@ -727,7 +727,7 @@ SCREEN_UPDATE( locomotn )
fg_clip.min_x = 28 * 8;
}
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
tilemap_draw(bitmap, bg_clip, state->m_bg_tilemap, 0, 0);
tilemap_draw(bitmap, fg_clip, state->m_fg_tilemap, 0, 0);
diff --git a/src/mame/video/rampart.c b/src/mame/video/rampart.c
index 04b82c931b0..a22811554dc 100644
--- a/src/mame/video/rampart.c
+++ b/src/mame/video/rampart.c
@@ -10,7 +10,7 @@
#include "includes/rampart.h"
-static void rampart_bitmap_render(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect);
+static void rampart_bitmap_render(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect);
/*************************************
*
@@ -87,7 +87,7 @@ SCREEN_UPDATE( rampart )
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
UINT16 *mo = &mobitmap->pix16(y);
- UINT16 *pf = &bitmap->pix16(y);
+ UINT16 *pf = &bitmap.pix16(y);
for (x = rectlist.rect->min_x; x <= rectlist.rect->max_x; x++)
if (mo[x])
{
@@ -109,7 +109,7 @@ SCREEN_UPDATE( rampart )
*
*************************************/
-static void rampart_bitmap_render(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void rampart_bitmap_render(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
rampart_state *state = machine.driver_data<rampart_state>();
int x, y;
@@ -118,7 +118,7 @@ static void rampart_bitmap_render(running_machine &machine, bitmap_t *bitmap, co
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
const UINT16 *src = &state->m_bitmap[256 * y];
- UINT16 *dst = &bitmap->pix16(y);
+ UINT16 *dst = &bitmap.pix16(y);
/* regenerate the line */
for (x = cliprect.min_x & ~1; x <= cliprect.max_x; x += 2)
diff --git a/src/mame/video/rastan.c b/src/mame/video/rastan.c
index 00080bb56b8..b53eb70ff70 100644
--- a/src/mame/video/rastan.c
+++ b/src/mame/video/rastan.c
@@ -41,7 +41,7 @@ SCREEN_UPDATE( rastan )
layer[0] = 0;
layer[1] = 1;
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
pc080sn_tilemap_draw(state->m_pc080sn, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 1);
pc080sn_tilemap_draw(state->m_pc080sn, bitmap, cliprect, layer[1], 0, 2);
diff --git a/src/mame/video/realbrk.c b/src/mame/video/realbrk.c
index c70526dce4b..9be1953e377 100644
--- a/src/mame/video/realbrk.c
+++ b/src/mame/video/realbrk.c
@@ -213,7 +213,7 @@ VIDEO_START(realbrk)
***************************************************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect)
{
realbrk_state *state = machine.driver_data<realbrk_state>();
UINT16 *spriteram16 = state->m_spriteram;
@@ -302,7 +302,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectan
{
state->m_tmpbitmap0->fill(0, spritetile_clip );
state->m_tmpbitmap1->fill(0, spritetile_clip );
- drawgfxzoom_transpen( state->m_tmpbitmap0,spritetile_clip,machine.gfx[gfx],
+ drawgfxzoom_transpen( *state->m_tmpbitmap0,spritetile_clip,machine.gfx[gfx],
code++,
color,
flipx, flipy,
@@ -310,13 +310,13 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectan
(rot & 1 ? scaley : scalex) << 12, (rot & 1 ? scalex : scaley) << 12,0);
// peek at the unrotated sprite
- // copybitmap_trans( bitmap,state->m_tmpbitmap0, 0,0, 50+(x * xdim/0x10000),50+(y * ydim/0x10000), cliprect, 0 );
+ // copybitmap_trans( bitmap,*state->m_tmpbitmap0, 0,0, 50+(x * xdim/0x10000),50+(y * ydim/0x10000), cliprect, 0 );
}
switch( rot )
{
case 0x10: // rot 90
- copyrozbitmap_trans( state->m_tmpbitmap1, state->m_tmpbitmap1->cliprect(), state->m_tmpbitmap0,
+ copyrozbitmap_trans( *state->m_tmpbitmap1, state->m_tmpbitmap1->cliprect(), *state->m_tmpbitmap0,
(UINT32)0<<16,
(UINT32)16<<16,
0 << 16,
@@ -328,11 +328,11 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectan
currx = (sx - (y+1) * ydim) / 0x10000;
curry = (sy + x * xdim) / 0x10000;
- copybitmap_trans( bitmap,state->m_tmpbitmap1, 0,0, currx,curry, cliprect, 0 );
+ copybitmap_trans( bitmap,*state->m_tmpbitmap1, 0,0, currx,curry, cliprect, 0 );
break;
case 0x20: // rot 180
- copyrozbitmap_trans( state->m_tmpbitmap1, state->m_tmpbitmap1->cliprect(), state->m_tmpbitmap0,
+ copyrozbitmap_trans( *state->m_tmpbitmap1, state->m_tmpbitmap1->cliprect(), *state->m_tmpbitmap0,
(UINT32)16<<16,
(UINT32)16<<16,
-1 << 16,
@@ -344,11 +344,11 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectan
currx = (sx - (x+1) * xdim) / 0x10000;
curry = (sy - (y+1) * ydim) / 0x10000;
- copybitmap_trans( bitmap,state->m_tmpbitmap1, 0,0, currx,curry, cliprect, 0 );
+ copybitmap_trans( bitmap,*state->m_tmpbitmap1, 0,0, currx,curry, cliprect, 0 );
break;
case 0x30: // rot 270
- copyrozbitmap_trans( state->m_tmpbitmap1, state->m_tmpbitmap1->cliprect(), state->m_tmpbitmap0,
+ copyrozbitmap_trans( *state->m_tmpbitmap1, state->m_tmpbitmap1->cliprect(), *state->m_tmpbitmap0,
(UINT32)16<<16,
(UINT32)0<<16,
0 << 16,
@@ -360,7 +360,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectan
currx = (sx + y * ydim) / 0x10000;
curry = (sy - (x+1) * xdim) / 0x10000;
- copybitmap_trans( bitmap,state->m_tmpbitmap1, 0,0, currx,curry, cliprect, 0 );
+ copybitmap_trans( bitmap,*state->m_tmpbitmap1, 0,0, currx,curry, cliprect, 0 );
break;
default:
@@ -380,7 +380,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectan
/* DaiDaiKakumei */
/* layer : 0== bghigh<spr 1== bglow<spr<bghigh 2==spr<bglow 3==boarder */
-static void dai2kaku_draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect, int layer)
+static void dai2kaku_draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect, int layer)
{
realbrk_state *state = machine.driver_data<realbrk_state>();
UINT16 *spriteram16 = state->m_spriteram;
@@ -522,11 +522,11 @@ if ( screen.machine().input().code_pressed(KEYCODE_Z) )
if (state->m_disable_video)
{
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
return 0;
}
else
- bitmap->fill(state->m_vregs[0xc/2] & 0x7fff, cliprect);
+ bitmap.fill(state->m_vregs[0xc/2] & 0x7fff, cliprect);
if (layers_ctrl & 2) tilemap_draw(bitmap,cliprect,state->m_tilemap_1,0,0);
if (layers_ctrl & 1) tilemap_draw(bitmap,cliprect,state->m_tilemap_0,0,0);
@@ -593,11 +593,11 @@ if ( screen.machine().input().code_pressed(KEYCODE_Z) )
if (state->m_disable_video)
{
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
return 0;
}
else
- bitmap->fill(state->m_vregs[0xc/2] & 0x7fff, cliprect);
+ bitmap.fill(state->m_vregs[0xc/2] & 0x7fff, cliprect);
diff --git a/src/mame/video/redalert.c b/src/mame/video/redalert.c
index 907f1350aa3..b43bb41c0c9 100644
--- a/src/mame/video/redalert.c
+++ b/src/mame/video/redalert.c
@@ -235,9 +235,9 @@ static SCREEN_UPDATE( redalert )
pen = pens[((charmap_code & 0xfe) << 1) | color_prom_a0_a1];
if ((*state->m_video_control ^ state->m_control_xor) & 0x04)
- bitmap->pix32(y, x) = pen;
+ bitmap.pix32(y, x) = pen;
else
- bitmap->pix32(y ^ 0xff, x ^ 0xff) = pen;
+ bitmap.pix32(y ^ 0xff, x ^ 0xff) = pen;
/* next pixel */
x = x + 1;
@@ -312,9 +312,9 @@ static SCREEN_UPDATE( demoneye )
pen = pens[((charmap_code & 0xfe) << 1) | color_prom_a0_a1];
if (*state->m_video_control & 0x04)
- bitmap->pix32(y ^ 0xff, x ^ 0xff) = pen;
+ bitmap.pix32(y ^ 0xff, x ^ 0xff) = pen;
else
- bitmap->pix32(y, x) = pen;
+ bitmap.pix32(y, x) = pen;
/* next pixel */
x = x + 1;
@@ -383,9 +383,9 @@ static SCREEN_UPDATE( panther )
pen = pens[((charmap_code & 0xfe) << 1) | color_prom_a0_a1];
if ((*state->m_video_control ^ state->m_control_xor) & 0x04)
- bitmap->pix32(y, x) = pen;
+ bitmap.pix32(y, x) = pen;
else
- bitmap->pix32(y ^ 0xff, x ^ 0xff) = pen;
+ bitmap.pix32(y ^ 0xff, x ^ 0xff) = pen;
/* next pixel */
x = x + 1;
diff --git a/src/mame/video/redclash.c b/src/mame/video/redclash.c
index 14932366352..ad07b4aade6 100644
--- a/src/mame/video/redclash.c
+++ b/src/mame/video/redclash.c
@@ -183,7 +183,7 @@ VIDEO_START( redclash )
tilemap_set_transparent_pen(state->m_fg_tilemap, 0);
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
ladybug_state *state = machine.driver_data<ladybug_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -267,7 +267,7 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
}
}
-static void draw_bullets( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_bullets( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
ladybug_state *state = machine.driver_data<ladybug_state>();
int offs;
@@ -285,7 +285,7 @@ static void draw_bullets( running_machine &machine, bitmap_t *bitmap, const rect
if (sx >= cliprect.min_x && sx <= cliprect.max_x &&
sy >= cliprect.min_y && sy <= cliprect.max_y)
- bitmap->pix16(sy, sx) = 0x19;
+ bitmap.pix16(sy, sx) = 0x19;
}
}
@@ -360,7 +360,7 @@ void redclash_set_stars_speed( running_machine &machine, UINT8 speed )
/* Space Raider doesn't use the Va bit, and it is also set up to */
/* window the stars to a certain x range */
-void redclash_draw_stars( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, UINT8 palette_offset, UINT8 sraider, UINT8 firstx, UINT8 lastx )
+void redclash_draw_stars( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, UINT8 palette_offset, UINT8 sraider, UINT8 firstx, UINT8 lastx )
{
ladybug_state *redclash = machine.driver_data<ladybug_state>();
int i;
@@ -407,7 +407,7 @@ void redclash_draw_stars( running_machine &machine, bitmap_t *bitmap, const rect
if ((xloc >= firstx) && (xloc <= lastx))
{
star_color = (state >> 9) & 0x1f;
- bitmap->pix16(yloc, xloc) = palette_offset + star_color;
+ bitmap.pix16(yloc, xloc) = palette_offset + star_color;
}
}
}
@@ -427,7 +427,7 @@ SCREEN_UPDATE( redclash )
{
ladybug_state *state = screen.machine().driver_data<ladybug_state>();
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
redclash_draw_stars(screen.machine(), bitmap, cliprect, 0x60, 0, 0x00, 0xff);
draw_sprites(screen.machine(), bitmap, cliprect);
draw_bullets(screen.machine(), bitmap, cliprect);
diff --git a/src/mame/video/relief.c b/src/mame/video/relief.c
index 16b5573038d..ef658b95d99 100644
--- a/src/mame/video/relief.c
+++ b/src/mame/video/relief.c
@@ -111,13 +111,13 @@ VIDEO_START( relief )
SCREEN_UPDATE( relief )
{
relief_state *state = screen.machine().driver_data<relief_state>();
- bitmap_t *priority_bitmap = screen.machine().priority_bitmap;
+ bitmap_t &priority_bitmap = screen.machine().priority_bitmap;
atarimo_rect_list rectlist;
bitmap_t *mobitmap;
int x, y, r;
/* draw the playfield */
- priority_bitmap->fill(0, cliprect);
+ priority_bitmap.fill(0, cliprect);
tilemap_draw(bitmap, cliprect, state->m_playfield_tilemap, 0, 0);
tilemap_draw(bitmap, cliprect, state->m_playfield2_tilemap, 0, 1);
@@ -127,8 +127,8 @@ SCREEN_UPDATE( relief )
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
UINT16 *mo = &mobitmap->pix16(y);
- UINT16 *pf = &bitmap->pix16(y);
- UINT8 *pri = &priority_bitmap->pix8(y);
+ UINT16 *pf = &bitmap.pix16(y);
+ UINT8 *pri = &priority_bitmap.pix8(y);
for (x = rectlist.rect->min_x; x <= rectlist.rect->max_x; x++)
if (mo[x])
{
diff --git a/src/mame/video/renegade.c b/src/mame/video/renegade.c
index b012196e553..1913a3a76ef 100644
--- a/src/mame/video/renegade.c
+++ b/src/mame/video/renegade.c
@@ -79,7 +79,7 @@ VIDEO_START( renegade )
state_save_register_global(machine, state->m_scrollx);
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
renegade_state *state = machine.driver_data<renegade_state>();
UINT8 *source = state->m_spriteram;
diff --git a/src/mame/video/retofinv.c b/src/mame/video/retofinv.c
index 48d001f5131..a55f3d71981 100644
--- a/src/mame/video/retofinv.c
+++ b/src/mame/video/retofinv.c
@@ -169,7 +169,7 @@ WRITE8_HANDLER( retofinv_gfx_ctrl_w )
***************************************************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap)
{
retofinv_state *state = machine.driver_data<retofinv_state>();
UINT8 *spriteram = state->m_sharedram + 0x0780;
diff --git a/src/mame/video/rltennis.c b/src/mame/video/rltennis.c
index 8fe7f0c79fc..2b499b6634f 100644
--- a/src/mame/video/rltennis.c
+++ b/src/mame/video/rltennis.c
@@ -122,12 +122,12 @@ WRITE16_HANDLER(rlt_blitter_w)
{
if(new_data & BLTFLAG_DISPLAY_UD)
{
- copybitmap(state->m_tmp_bitmap[BITMAP_FG_DISPLAY], state->m_tmp_bitmap[BITMAP_FG_1], 0, 0, 0, 0, state->m_tmp_bitmap[BITMAP_FG_DISPLAY]->cliprect());
+ copybitmap(*state->m_tmp_bitmap[BITMAP_FG_DISPLAY], *state->m_tmp_bitmap[BITMAP_FG_1], 0, 0, 0, 0, state->m_tmp_bitmap[BITMAP_FG_DISPLAY]->cliprect());
state->m_tmp_bitmap[BITMAP_FG_1]->fill(0);
}
else
{
- copybitmap(state->m_tmp_bitmap[BITMAP_FG_DISPLAY], state->m_tmp_bitmap[BITMAP_FG_2], 0, 0, 0, 0, state->m_tmp_bitmap[BITMAP_FG_DISPLAY]->cliprect());
+ copybitmap(*state->m_tmp_bitmap[BITMAP_FG_DISPLAY], *state->m_tmp_bitmap[BITMAP_FG_2], 0, 0, 0, 0, state->m_tmp_bitmap[BITMAP_FG_DISPLAY]->cliprect());
state->m_tmp_bitmap[BITMAP_FG_2]->fill(0);
}
}
@@ -233,7 +233,7 @@ VIDEO_START( rltennis )
SCREEN_UPDATE( rltennis )
{
rltennis_state *state = screen.machine().driver_data<rltennis_state>();
- copybitmap(bitmap, state->m_tmp_bitmap[BITMAP_BG], 0, 0, 0, 0, cliprect);
- copybitmap_trans(bitmap, state->m_tmp_bitmap[BITMAP_FG_DISPLAY], 0, 0, 0, 0, cliprect, 0);
+ copybitmap(bitmap, *state->m_tmp_bitmap[BITMAP_BG], 0, 0, 0, 0, cliprect);
+ copybitmap_trans(bitmap, *state->m_tmp_bitmap[BITMAP_FG_DISPLAY], 0, 0, 0, 0, cliprect, 0);
return 0;
}
diff --git a/src/mame/video/rocnrope.c b/src/mame/video/rocnrope.c
index 00cd05c90f9..34db915c7fb 100644
--- a/src/mame/video/rocnrope.c
+++ b/src/mame/video/rocnrope.c
@@ -122,7 +122,7 @@ VIDEO_START( rocnrope )
state->m_bg_tilemap = tilemap_create(machine, get_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
rocnrope_state *state = machine.driver_data<rocnrope_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/rohga.c b/src/mame/video/rohga.c
index c343378d740..154133f4aa0 100644
--- a/src/mame/video/rohga.c
+++ b/src/mame/video/rohga.c
@@ -27,7 +27,7 @@ VIDEO_START( rohga )
/******************************************************************************/
-static void rohga_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, const UINT16 *spriteptr, int is_schmeisr )
+static void rohga_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, const UINT16 *spriteptr, int is_schmeisr )
{
int offs;
@@ -109,7 +109,7 @@ static void rohga_draw_sprites( running_machine &machine, bitmap_t *bitmap, cons
}
}
-static void wizdfire_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, UINT16 *spriteptr, int mode, int bank )
+static void wizdfire_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, UINT16 *spriteptr, int mode, int bank )
{
int offs;
@@ -211,7 +211,7 @@ static void wizdfire_draw_sprites( running_machine &machine, bitmap_t *bitmap, c
}
}
-static void nitrobal_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, const UINT16 *spriteptr, int gfxbank )
+static void nitrobal_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, const UINT16 *spriteptr, int gfxbank )
{
rohga_state *state = machine.driver_data<rohga_state>();
int offs, end, inc;
@@ -419,7 +419,7 @@ sprite 2:
/******************************************************************************/
-static void update_rohga( screen_device &screen, bitmap_t *bitmap, const rectangle &cliprect, int is_schmeisr )
+static void update_rohga( screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect, int is_schmeisr )
{
rohga_state *state = screen.machine().driver_data<rohga_state>();
UINT16 flip = deco16ic_pf_control_r(state->m_deco_tilegen1, 0, 0xffff);
@@ -431,8 +431,8 @@ static void update_rohga( screen_device &screen, bitmap_t *bitmap, const rectang
deco16ic_pf_update(state->m_deco_tilegen2, state->m_pf3_rowscroll, state->m_pf4_rowscroll);
/* Draw playfields */
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(screen.machine().pens[768], cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(screen.machine().pens[768], cliprect);
switch (priority & 3)
{
@@ -492,7 +492,7 @@ SCREEN_UPDATE( wizdfire )
deco16ic_pf_update(state->m_deco_tilegen2, state->m_pf3_rowscroll, state->m_pf4_rowscroll);
/* Draw playfields - Palette of 2nd playfield chip visible if playfields turned off */
- bitmap->fill(screen.machine().pens[512], cliprect);
+ bitmap.fill(screen.machine().pens[512], cliprect);
deco16ic_tilemap_2_draw(state->m_deco_tilegen2, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
wizdfire_draw_sprites(screen.machine(), bitmap, cliprect, screen.machine().generic.buffered_spriteram.u16, 4, 3);
@@ -524,8 +524,8 @@ SCREEN_UPDATE( nitrobal )
deco16ic_pf_update(state->m_deco_tilegen2, state->m_pf3_rowscroll, state->m_pf4_rowscroll);
/* Draw playfields - Palette of 2nd playfield chip visible if playfields turned off */
- bitmap->fill(screen.machine().pens[512], cliprect);
- screen.machine().priority_bitmap->fill(0);
+ bitmap.fill(screen.machine().pens[512], cliprect);
+ screen.machine().priority_bitmap.fill(0);
decocomn_clear_sprite_priority_bitmap(state->m_decocomn);
/* pf3 and pf4 are combined into a single 8bpp bitmap */
diff --git a/src/mame/video/rollerg.c b/src/mame/video/rollerg.c
index 396f0a276cc..7f350a11328 100644
--- a/src/mame/video/rollerg.c
+++ b/src/mame/video/rollerg.c
@@ -64,8 +64,8 @@ SCREEN_UPDATE( rollerg )
rollerg_state *state = screen.machine().driver_data<rollerg_state>();
int bg_colorbase = 16;
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(16 * bg_colorbase, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(16 * bg_colorbase, cliprect);
k051316_zoom_draw(state->m_k051316, bitmap, cliprect, 0, 1);
k053245_sprites_draw(state->m_k053244, bitmap, cliprect);
return 0;
diff --git a/src/mame/video/rollrace.c b/src/mame/video/rollrace.c
index adc9184d72e..99ae958c876 100644
--- a/src/mame/video/rollrace.c
+++ b/src/mame/video/rollrace.c
@@ -112,7 +112,7 @@ SCREEN_UPDATE( rollrace )
const UINT8 *mem = screen.machine().region("user1")->base();
/* fill in background colour*/
- bitmap->fill(state->m_ra_bkgpen, cliprect);
+ bitmap.fill(state->m_ra_bkgpen, cliprect);
/* draw road */
for (offs = 0x3ff; offs >= 0; offs--)
diff --git a/src/mame/video/route16.c b/src/mame/video/route16.c
index 7c07655f76e..2b7c193e688 100644
--- a/src/mame/video/route16.c
+++ b/src/mame/video/route16.c
@@ -107,9 +107,9 @@ SCREEN_UPDATE( route16 )
pen_t pen = route16_make_pen(final_color);
if (state->m_flipscreen)
- bitmap->pix32(255 - y, 255 - x) = pen;
+ bitmap.pix32(255 - y, 255 - x) = pen;
else
- bitmap->pix32(y, x) = pen;
+ bitmap.pix32(y, x) = pen;
x = x + 1;
data1 = data1 >> 1;
@@ -125,7 +125,7 @@ SCREEN_UPDATE( route16 )
* The Stratovox video connections have been verified from the schematics
*/
-static int video_update_stratvox_ttmahjng(running_machine &machine, bitmap_t *bitmap,
+static int video_update_stratvox_ttmahjng(running_machine &machine, bitmap_t &bitmap,
const rectangle &cliprect,
pen_t (*make_pen)(UINT8))
{
@@ -163,9 +163,9 @@ static int video_update_stratvox_ttmahjng(running_machine &machine, bitmap_t *bi
pen_t pen = make_pen(final_color);
if (state->m_flipscreen)
- bitmap->pix32(255 - y, 255 - x) = pen;
+ bitmap.pix32(255 - y, 255 - x) = pen;
else
- bitmap->pix32(y, x) = pen;
+ bitmap.pix32(y, x) = pen;
x = x + 1;
data1 = data1 >> 1;
diff --git a/src/mame/video/rpunch.c b/src/mame/video/rpunch.c
index e1d6eca7ee8..c356178e93d 100644
--- a/src/mame/video/rpunch.c
+++ b/src/mame/video/rpunch.c
@@ -201,7 +201,7 @@ WRITE16_HANDLER( rpunch_ins_w )
*
*************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int start, int stop)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int start, int stop)
{
rpunch_state *state = machine.driver_data<rpunch_state>();
UINT16 *spriteram16 = state->m_spriteram;
@@ -239,7 +239,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const recta
*
*************************************/
-static void draw_bitmap(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_bitmap(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
rpunch_state *state = machine.driver_data<rpunch_state>();
int colourbase;
@@ -256,10 +256,10 @@ static void draw_bitmap(running_machine &machine, bitmap_t *bitmap, const rectan
for(x=0;x<xxx;x++)
{
int coldat;
- coldat = (state->m_bitmapram[count]>>12)&0xf; if (coldat!=15) bitmap->pix16(y, ((x*4+0)-4)&0x1ff) = coldat+colourbase;
- coldat = (state->m_bitmapram[count]>>8 )&0xf; if (coldat!=15) bitmap->pix16(y, ((x*4+1)-4)&0x1ff) = coldat+colourbase;
- coldat = (state->m_bitmapram[count]>>4 )&0xf; if (coldat!=15) bitmap->pix16(y, ((x*4+2)-4)&0x1ff) = coldat+colourbase;
- coldat = (state->m_bitmapram[count]>>0 )&0xf; if (coldat!=15) bitmap->pix16(y, ((x*4+3)-4)&0x1ff) = coldat+colourbase;
+ coldat = (state->m_bitmapram[count]>>12)&0xf; if (coldat!=15) bitmap.pix16(y, ((x*4+0)-4)&0x1ff) = coldat+colourbase;
+ coldat = (state->m_bitmapram[count]>>8 )&0xf; if (coldat!=15) bitmap.pix16(y, ((x*4+1)-4)&0x1ff) = coldat+colourbase;
+ coldat = (state->m_bitmapram[count]>>4 )&0xf; if (coldat!=15) bitmap.pix16(y, ((x*4+2)-4)&0x1ff) = coldat+colourbase;
+ coldat = (state->m_bitmapram[count]>>0 )&0xf; if (coldat!=15) bitmap.pix16(y, ((x*4+3)-4)&0x1ff) = coldat+colourbase;
count++;
}
}
diff --git a/src/mame/video/rungun.c b/src/mame/video/rungun.c
index 26dd3062302..ababb538b52 100644
--- a/src/mame/video/rungun.c
+++ b/src/mame/video/rungun.c
@@ -107,8 +107,8 @@ SCREEN_UPDATE(rng)
{
rungun_state *state = screen.machine().driver_data<rungun_state>();
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
k053936_zoom_draw(state->m_k053936, bitmap, cliprect, state->m_936_tilemap, 0, 0, 1);
diff --git a/src/mame/video/sauro.c b/src/mame/video/sauro.c
index 61e5ae3dc6e..d3e1482d5de 100644
--- a/src/mame/video/sauro.c
+++ b/src/mame/video/sauro.c
@@ -106,7 +106,7 @@ VIDEO_START( sauro )
state->m_palette_bank = 0;
}
-static void sauro_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void sauro_draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
sauro_state *state = machine.driver_data<sauro_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -174,7 +174,7 @@ VIDEO_START( trckydoc )
8, 8, 32, 32);
}
-static void trckydoc_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void trckydoc_draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
sauro_state *state = machine.driver_data<sauro_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/sbasketb.c b/src/mame/video/sbasketb.c
index 084de774771..a87258daa24 100644
--- a/src/mame/video/sbasketb.c
+++ b/src/mame/video/sbasketb.c
@@ -135,7 +135,7 @@ VIDEO_START( sbasketb )
tilemap_set_scroll_cols(state->m_bg_tilemap, 32);
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
sbasketb_state *state = machine.driver_data<sbasketb_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/scotrsht.c b/src/mame/video/scotrsht.c
index 07175ea026f..040ff7f3b38 100644
--- a/src/mame/video/scotrsht.c
+++ b/src/mame/video/scotrsht.c
@@ -99,7 +99,7 @@ static TILE_GET_INFO( scotrsht_get_bg_tile_info )
}
/* Same as Jailbreak + palette bank */
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
scotrsht_state *state = machine.driver_data<scotrsht_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/sderby.c b/src/mame/video/sderby.c
index 64ccc11cf9a..667107dadec 100644
--- a/src/mame/video/sderby.c
+++ b/src/mame/video/sderby.c
@@ -65,7 +65,7 @@ WRITE16_HANDLER( sderby_fg_videoram_w )
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect,int codeshift)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect,int codeshift)
{
sderby_state *state = machine.driver_data<sderby_state>();
UINT16 *spriteram16 = state->m_spriteram;
diff --git a/src/mame/video/sega16sp.c b/src/mame/video/sega16sp.c
index d23f3f903ec..80cff8ba5c3 100644
--- a/src/mame/video/sega16sp.c
+++ b/src/mame/video/sega16sp.c
@@ -76,7 +76,7 @@ INLINE const sega16sp_interface *get_interface( device_t *device )
pri[x] = 0xff; \
} \
-void segaic16_sprites_hangon_draw(running_machine &machine, device_t *device, bitmap_t *bitmap, const rectangle &cliprect)
+void segaic16_sprites_hangon_draw(running_machine &machine, device_t *device, bitmap_t &bitmap, const rectangle &cliprect)
{
UINT8 numbanks = machine.region("gfx2")->bytes() / 0x10000;
const UINT16 *spritebase = (const UINT16 *)machine.region("gfx2")->base();
@@ -134,8 +134,8 @@ void segaic16_sprites_hangon_draw(running_machine &machine, device_t *device, bi
/* skip drawing if not within the cliprect */
if (y >= cliprect.min_y && y <= cliprect.max_y)
{
- UINT16 *dest = &bitmap->pix16(y);
- UINT8 *pri = &machine.priority_bitmap->pix8(y);
+ UINT16 *dest = &bitmap.pix16(y);
+ UINT8 *pri = &machine.priority_bitmap.pix8(y);
int xacc = 0x00;
/* note that the System 16A sprites have a design flaw that allows the address */
@@ -241,7 +241,7 @@ void segaic16_sprites_hangon_draw(running_machine &machine, device_t *device, bi
pri[x] = 0xff; \
} \
-void segaic16_sprites_sharrier_draw(running_machine &machine, device_t *device, bitmap_t *bitmap, const rectangle &cliprect)
+void segaic16_sprites_sharrier_draw(running_machine &machine, device_t *device, bitmap_t &bitmap, const rectangle &cliprect)
{
UINT8 numbanks = machine.region("gfx2")->bytes() / 0x20000;
const UINT32 *spritebase = (const UINT32 *)machine.region("gfx2")->base();
@@ -300,8 +300,8 @@ void segaic16_sprites_sharrier_draw(running_machine &machine, device_t *device,
/* skip drawing if not within the cliprect */
if (y >= cliprect.min_y && y <= cliprect.max_y)
{
- UINT16 *dest = &bitmap->pix16(y);
- UINT8 *pri = &machine.priority_bitmap->pix8(y);
+ UINT16 *dest = &bitmap.pix16(y);
+ UINT8 *pri = &machine.priority_bitmap.pix8(y);
int xacc = 0x00;
/* note that the System 16A sprites have a design flaw that allows the address */
@@ -412,7 +412,7 @@ void segaic16_sprites_sharrier_draw(running_machine &machine, device_t *device,
pri[x] = 0xff; \
} \
-void segaic16_sprites_16a_draw(running_machine &machine, device_t *device, bitmap_t *bitmap, const rectangle &cliprect)
+void segaic16_sprites_16a_draw(running_machine &machine, device_t *device, bitmap_t &bitmap, const rectangle &cliprect)
{
UINT8 numbanks = machine.region("gfx2")->bytes() / 0x10000;
const UINT16 *spritebase = (const UINT16 *)machine.region("gfx2")->base();
@@ -469,8 +469,8 @@ void segaic16_sprites_16a_draw(running_machine &machine, device_t *device, bitma
/* skip drawing if not within the cliprect */
if (y >= cliprect.min_y && y <= cliprect.max_y)
{
- UINT16 *dest = &bitmap->pix16(y);
- UINT8 *pri = &machine.priority_bitmap->pix8(y);
+ UINT16 *dest = &bitmap.pix16(y);
+ UINT8 *pri = &machine.priority_bitmap.pix8(y);
/* note that the System 16A sprites have a design flaw that allows the address */
/* to carry into the flip flag, which is the topmost bit -- it is very important */
@@ -573,7 +573,7 @@ void segaic16_sprites_16a_draw(running_machine &machine, device_t *device, bitma
pri[x] = 0xff; \
} \
-void segaic16_sprites_16b_draw(running_machine &machine, device_t *device, bitmap_t *bitmap, const rectangle &cliprect)
+void segaic16_sprites_16b_draw(running_machine &machine, device_t *device, bitmap_t &bitmap, const rectangle &cliprect)
{
UINT8 numbanks;
const UINT16 *spritebase;
@@ -658,8 +658,8 @@ void segaic16_sprites_16b_draw(running_machine &machine, device_t *device, bitma
/* skip drawing if not within the cliprect */
if (y >= cliprect.min_y && y <= cliprect.max_y)
{
- UINT16 *dest = &bitmap->pix16(y);
- UINT8 *pri = &machine.priority_bitmap->pix8(y);
+ UINT16 *dest = &bitmap.pix16(y);
+ UINT8 *pri = &machine.priority_bitmap.pix8(y);
int xacc;
/* compute the initial X zoom accumulator; this is verified on the real PCB */
@@ -739,7 +739,7 @@ void segaic16_sprites_16b_draw(running_machine &machine, device_t *device, bitma
pri[x] = 0; \
} \
-void segaic16_sprites_yboard_16b_draw(running_machine &machine, device_t *device, bitmap_t *bitmap, const rectangle &cliprect)
+void segaic16_sprites_yboard_16b_draw(running_machine &machine, device_t *device, bitmap_t &bitmap, const rectangle &cliprect)
{
UINT8 numbanks = machine.region("gfx2")->bytes() / 0x20000;
const UINT16 *spritebase = (const UINT16 *)machine.region("gfx2")->base();
@@ -811,8 +811,8 @@ void segaic16_sprites_yboard_16b_draw(running_machine &machine, device_t *device
/* skip drawing if not within the cliprect */
if (y >= cliprect.min_y && y <= cliprect.max_y)
{
- UINT16 *dest = &bitmap->pix16(y);
- UINT8 *pri = &machine.priority_bitmap->pix8(y);
+ UINT16 *dest = &bitmap.pix16(y);
+ UINT8 *pri = &machine.priority_bitmap.pix8(y);
int xacc;
/* compute the initial X zoom accumulator; this is verified on the real PCB */
@@ -917,7 +917,7 @@ void segaic16_sprites_yboard_16b_draw(running_machine &machine, device_t *device
pri[x] = 0xff; \
} \
-static void segaic16_sprites_xboard_outrun_draw(running_machine &machine, device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int type)
+static void segaic16_sprites_xboard_outrun_draw(running_machine &machine, device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int type)
{
UINT8 numbanks = machine.region("gfx2")->bytes() / 0x40000;
const UINT32 *spritebase = (const UINT32 *)machine.region("gfx2")->base();
@@ -980,8 +980,8 @@ static void segaic16_sprites_xboard_outrun_draw(running_machine &machine, device
/* skip drawing if not within the cliprect */
if (y >= cliprect.min_y && y <= cliprect.max_y)
{
- UINT16 *dest = &bitmap->pix16(y);
- UINT8 *pri = &machine.priority_bitmap->pix8(y);
+ UINT16 *dest = &bitmap.pix16(y);
+ UINT8 *pri = &machine.priority_bitmap.pix8(y);
int xacc = 0;
/* non-flipped case */
@@ -1043,12 +1043,12 @@ static void segaic16_sprites_xboard_outrun_draw(running_machine &machine, device
}
}
-void segaic16_sprites_outrun_draw(running_machine &machine, device_t *device, bitmap_t *bitmap, const rectangle &cliprect)
+void segaic16_sprites_outrun_draw(running_machine &machine, device_t *device, bitmap_t &bitmap, const rectangle &cliprect)
{
segaic16_sprites_xboard_outrun_draw(machine, device, bitmap, cliprect, SEGAIC16_SPRITES_OUTRUN);
}
-void segaic16_sprites_xboard_draw(running_machine &machine, device_t *device, bitmap_t *bitmap, const rectangle &cliprect)
+void segaic16_sprites_xboard_draw(running_machine &machine, device_t *device, bitmap_t &bitmap, const rectangle &cliprect)
{
segaic16_sprites_xboard_outrun_draw(machine, device, bitmap, cliprect, SEGAIC16_SPRITES_XBOARD);
}
@@ -1088,7 +1088,7 @@ void segaic16_sprites_xboard_draw(running_machine &machine, device_t *device, bi
if (x >= minx && x <= maxx && ind < 0x1fe) \
dest[x] = ind | colorpri; \
-void segaic16_sprites_yboard_draw(running_machine &machine, device_t *device, bitmap_t *bitmap, const rectangle &cliprect)
+void segaic16_sprites_yboard_draw(running_machine &machine, device_t *device, bitmap_t &bitmap, const rectangle &cliprect)
{
UINT8 numbanks = machine.region("gfx1")->bytes() / 0x80000;
const UINT64 *spritebase = (const UINT64 *)machine.region("gfx1")->base();
@@ -1105,7 +1105,7 @@ void segaic16_sprites_yboard_draw(running_machine &machine, device_t *device, bi
/* clear out any scanlines we might be using */
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
if (!(rotatebase[y & ~1] & 0xc000))
- memset(&bitmap->pix16(y, cliprect.min_x), 0xff, (cliprect.max_x - cliprect.min_x + 1) * sizeof(UINT16));
+ memset(&bitmap.pix16(y, cliprect.min_x), 0xff, (cliprect.max_x - cliprect.min_x + 1) * sizeof(UINT16));
/* now scan backwards and render the sprites in order */
for (data = sega16sp->spriteram; !(data[0] & 0x8000) && !visited[next]; data = sega16sp->spriteram + next * 8)
@@ -1150,7 +1150,7 @@ void segaic16_sprites_yboard_draw(running_machine &machine, device_t *device, bi
/* skip drawing if not within the cliprect */
if (y >= cliprect.min_y && y <= cliprect.max_y)
{
- UINT16 *dest = &bitmap->pix16(y);
+ UINT16 *dest = &bitmap.pix16(y);
int minx = rotatebase[y & ~1];
int maxx = rotatebase[y | 1];
int xacc = 0;
@@ -1325,8 +1325,8 @@ void segaic16_sprites_yboard_draw(running_machine &machine, device_t *device, bi
/* skip drawing if not within the cliprect */ \
if (y >= cliprect.min_y && y <= cliprect.max_y) \
{ \
- UINT16 *dest = &bitmap->pix16(y); \
- UINT8 *pri = &machine.priority_bitmap->pix8(y); \
+ UINT16 *dest = &bitmap.pix16(y); \
+ UINT8 *pri = &machine.priority_bitmap.pix8(y); \
\
/* note that the System 16A sprites have a design flaw that allows the address */ \
/* to carry into the flip flag, which is the topmost bit -- it is very important */ \
@@ -1382,7 +1382,7 @@ void segaic16_sprites_yboard_draw(running_machine &machine, device_t *device, bi
-void segaic16_sprites_16a_bootleg_wb3bl_draw(running_machine &machine, device_t *device, bitmap_t *bitmap, const rectangle &cliprect)
+void segaic16_sprites_16a_bootleg_wb3bl_draw(running_machine &machine, device_t *device, bitmap_t &bitmap, const rectangle &cliprect)
{
UINT8 numbanks = machine.region("gfx2")->bytes() / 0x10000;
const UINT16 *spritebase = (const UINT16 *)machine.region("gfx2")->base();
@@ -1405,7 +1405,7 @@ void segaic16_sprites_16a_bootleg_wb3bl_draw(running_machine &machine, device_t
}
/* 4 player passing shot is different to this.. */
-void segaic16_sprites_16a_bootleg_passhtb_draw(running_machine &machine, device_t *device, bitmap_t *bitmap, const rectangle &cliprect)
+void segaic16_sprites_16a_bootleg_passhtb_draw(running_machine &machine, device_t *device, bitmap_t &bitmap, const rectangle &cliprect)
{
UINT8 numbanks = machine.region("gfx2")->bytes() / 0x10000;
const UINT16 *spritebase = (const UINT16 *)machine.region("gfx2")->base();
@@ -1427,7 +1427,7 @@ void segaic16_sprites_16a_bootleg_passhtb_draw(running_machine &machine, device_
}
}
-void segaic16_sprites_16a_bootleg_shinobld_draw(running_machine &machine, device_t *device, bitmap_t *bitmap, const rectangle &cliprect)
+void segaic16_sprites_16a_bootleg_shinobld_draw(running_machine &machine, device_t *device, bitmap_t &bitmap, const rectangle &cliprect)
{
UINT8 numbanks = machine.region("gfx2")->bytes() / 0x10000;
const UINT16 *spritebase = (const UINT16 *)machine.region("gfx2")->base();
@@ -1455,7 +1455,7 @@ void segaic16_sprites_16a_bootleg_shinobld_draw(running_machine &machine, device
*
*************************************/
-void segaic16_sprites_draw(screen_device &screen, bitmap_t *bitmap, const rectangle &cliprect, int which)
+void segaic16_sprites_draw(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect, int which)
{
device_t* device = 0;
sega16sp_state *sega16sp;
diff --git a/src/mame/video/segag80r.c b/src/mame/video/segag80r.c
index 9254e4f366b..116bbc9233d 100644
--- a/src/mame/video/segag80r.c
+++ b/src/mame/video/segag80r.c
@@ -640,7 +640,7 @@ WRITE8_HANDLER( sindbadm_back_port_w )
*
*************************************/
-static void draw_videoram(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, const UINT8 *transparent_pens)
+static void draw_videoram(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, const UINT8 *transparent_pens)
{
segag80r_state *state = machine.driver_data<segag80r_state>();
UINT8 *videoram = state->m_videoram;
@@ -670,14 +670,14 @@ static void draw_videoram(running_machine &machine, bitmap_t *bitmap, const rect
*
*************************************/
-static void draw_background_spaceod(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_background_spaceod(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
segag80r_state *state = machine.driver_data<segag80r_state>();
- bitmap_t *pixmap = tilemap_get_pixmap(!(state->m_spaceod_bg_control & 0x02) ? state->m_spaceod_bg_htilemap : state->m_spaceod_bg_vtilemap);
+ bitmap_t &pixmap = tilemap_get_pixmap(!(state->m_spaceod_bg_control & 0x02) ? state->m_spaceod_bg_htilemap : state->m_spaceod_bg_vtilemap);
int flipmask = (state->m_spaceod_bg_control & 0x01) ? 0xff : 0x00;
int xoffset = (state->m_spaceod_bg_control & 0x02) ? 0x10 : 0x00;
- int xmask = pixmap->width() - 1;
- int ymask = pixmap->height() - 1;
+ int xmask = pixmap.width() - 1;
+ int ymask = pixmap.height() - 1;
int x, y;
/* The H and V counters on this board are independent of the ones on */
@@ -690,8 +690,8 @@ static void draw_background_spaceod(running_machine &machine, bitmap_t *bitmap,
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
int effy = (y + state->m_spaceod_vcounter + 22) ^ flipmask;
- UINT16 *src = &pixmap->pix16(effy & ymask);
- UINT16 *dst = &bitmap->pix16(y);
+ UINT16 *src = &pixmap.pix16(effy & ymask);
+ UINT16 *dst = &bitmap.pix16(y);
/* loop over horizontal pixels */
for (x = cliprect.min_x; x <= cliprect.max_x; x++)
@@ -728,19 +728,19 @@ static void draw_background_spaceod(running_machine &machine, bitmap_t *bitmap,
*
*************************************/
-static void draw_background_page_scroll(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_background_page_scroll(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
segag80r_state *state = machine.driver_data<segag80r_state>();
- bitmap_t *pixmap = tilemap_get_pixmap(state->m_bg_tilemap);
+ bitmap_t &pixmap = tilemap_get_pixmap(state->m_bg_tilemap);
int flipmask = (state->m_video_control & 0x08) ? 0xff : 0x00;
- int xmask = pixmap->width() - 1;
- int ymask = pixmap->height() - 1;
+ int xmask = pixmap.width() - 1;
+ int ymask = pixmap.height() - 1;
int x, y;
/* if disabled, draw nothing */
if (!state->m_bg_enable)
{
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
return;
}
@@ -748,8 +748,8 @@ static void draw_background_page_scroll(running_machine &machine, bitmap_t *bitm
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
int effy = state->m_bg_scrolly + (((y ^ flipmask) + (flipmask & 0xe0)) & 0xff);
- UINT16 *src = &pixmap->pix16(effy & ymask);
- UINT16 *dst = &bitmap->pix16(y);
+ UINT16 *src = &pixmap.pix16(effy & ymask);
+ UINT16 *dst = &bitmap.pix16(y);
/* loop over horizontal pixels */
for (x = cliprect.min_x; x <= cliprect.max_x; x++)
@@ -769,19 +769,19 @@ static void draw_background_page_scroll(running_machine &machine, bitmap_t *bitm
*
*************************************/
-static void draw_background_full_scroll(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_background_full_scroll(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
segag80r_state *state = machine.driver_data<segag80r_state>();
- bitmap_t *pixmap = tilemap_get_pixmap(state->m_bg_tilemap);
+ bitmap_t &pixmap = tilemap_get_pixmap(state->m_bg_tilemap);
int flipmask = (state->m_video_control & 0x08) ? 0x3ff : 0x000;
- int xmask = pixmap->width() - 1;
- int ymask = pixmap->height() - 1;
+ int xmask = pixmap.width() - 1;
+ int ymask = pixmap.height() - 1;
int x, y;
/* if disabled, draw nothing */
if (!state->m_bg_enable)
{
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
return;
}
@@ -789,8 +789,8 @@ static void draw_background_full_scroll(running_machine &machine, bitmap_t *bitm
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
int effy = (y + state->m_bg_scrolly) ^ flipmask;
- UINT16 *src = &pixmap->pix16(effy & ymask);
- UINT16 *dst = &bitmap->pix16(y);
+ UINT16 *src = &pixmap.pix16(effy & ymask);
+ UINT16 *dst = &bitmap.pix16(y);
/* loop over horizontal pixels */
for (x = cliprect.min_x; x <= cliprect.max_x; x++)
diff --git a/src/mame/video/segahang.c b/src/mame/video/segahang.c
index 90b207dc9ee..4a0febb9177 100644
--- a/src/mame/video/segahang.c
+++ b/src/mame/video/segahang.c
@@ -54,12 +54,12 @@ SCREEN_UPDATE( hangon )
/* if no drawing is happening, fill with black and get out */
if (!segaic16_display_enable)
{
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
return 0;
}
/* reset priorities */
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
/* draw the low priority road layer */
segaic16_road_draw(0, bitmap, cliprect, SEGAIC16_ROAD_BACKGROUND);
diff --git a/src/mame/video/segaic16.c b/src/mame/video/segaic16.c
index 58cd2e99839..b20455b2f07 100644
--- a/src/mame/video/segaic16.c
+++ b/src/mame/video/segaic16.c
@@ -518,7 +518,7 @@ WRITE16_HANDLER( segaic16_paletteram_w )
*
*************************************/
-static void segaic16_draw_virtual_tilemap(running_machine &machine, struct tilemap_info *info, bitmap_t *bitmap, const rectangle &cliprect, UINT16 pages, UINT16 xscroll, UINT16 yscroll, UINT32 flags, UINT32 priority)
+static void segaic16_draw_virtual_tilemap(running_machine &machine, struct tilemap_info *info, bitmap_t &bitmap, const rectangle &cliprect, UINT16 pages, UINT16 xscroll, UINT16 yscroll, UINT32 flags, UINT32 priority)
{
int leftmin = -1, leftmax = -1, rightmin = -1, rightmax = -1;
int topmin = -1, topmax = -1, bottommin = -1, bottommax = -1;
@@ -744,7 +744,7 @@ static TILE_GET_INFO( segaic16_tilemap_16a_text_info )
}
-static void segaic16_tilemap_16a_draw_layer(running_machine &machine, struct tilemap_info *info, bitmap_t *bitmap, const rectangle &cliprect, int which, int flags, int priority)
+static void segaic16_tilemap_16a_draw_layer(running_machine &machine, struct tilemap_info *info, bitmap_t &bitmap, const rectangle &cliprect, int which, int flags, int priority)
{
UINT16 *textram = info->textram;
@@ -986,7 +986,7 @@ static TILE_GET_INFO( segaic16_tilemap_16b_alt_text_info )
}
-static void segaic16_tilemap_16b_draw_layer(running_machine &machine, struct tilemap_info *info, bitmap_t *bitmap, const rectangle &cliprect, int which, int flags, int priority)
+static void segaic16_tilemap_16b_draw_layer(running_machine &machine, struct tilemap_info *info, bitmap_t &bitmap, const rectangle &cliprect, int which, int flags, int priority)
{
UINT16 *textram = info->textram;
UINT16 xscroll, yscroll, pages;
@@ -1224,7 +1224,7 @@ void segaic16_tilemap_init(running_machine &machine, int which, int type, int co
*
*************************************/
-void segaic16_tilemap_draw(screen_device &screen, bitmap_t *bitmap, const rectangle &cliprect, int which, int map, int priority, int priority_mark)
+void segaic16_tilemap_draw(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect, int which, int map, int priority, int priority_mark)
{
running_machine &machine = screen.machine();
struct tilemap_info *info = &bg_tilemap[which];
@@ -1431,7 +1431,7 @@ static void segaic16_road_hangon_decode(running_machine &machine, struct road_in
}
-static void segaic16_road_hangon_draw(struct road_info *info, bitmap_t *bitmap, const rectangle &cliprect, int priority)
+static void segaic16_road_hangon_draw(struct road_info *info, bitmap_t &bitmap, const rectangle &cliprect, int priority)
{
UINT16 *roadram = info->roadram;
int x, y;
@@ -1439,7 +1439,7 @@ static void segaic16_road_hangon_draw(struct road_info *info, bitmap_t *bitmap,
/* loop over scanlines */
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
- UINT16 *dest = &bitmap->pix16(y);
+ UINT16 *dest = &bitmap.pix16(y);
int control = roadram[0x000 + y];
int hpos = roadram[0x100 + (control & 0xff)];
int color0 = roadram[0x200 + (control & 0xff)];
@@ -1701,7 +1701,7 @@ static void segaic16_road_outrun_decode(running_machine &machine, struct road_in
}
-static void segaic16_road_outrun_draw(struct road_info *info, bitmap_t *bitmap, const rectangle &cliprect, int priority)
+static void segaic16_road_outrun_draw(struct road_info *info, bitmap_t &bitmap, const rectangle &cliprect, int priority)
{
UINT16 *roadram = info->buffer;
int x, y;
@@ -1718,7 +1718,7 @@ static void segaic16_road_outrun_draw(struct road_info *info, bitmap_t *bitmap,
// { 0x80,0x81,0x81,0x83,0,0,0,0x00 },
// { 0x81,0x87,0x87,0x8f,0,0,0,0x00 }
};
- UINT16 *dest = &bitmap->pix16(y);
+ UINT16 *dest = &bitmap.pix16(y);
int data0 = roadram[0x000 + y];
int data1 = roadram[0x100 + y];
@@ -1927,7 +1927,7 @@ void segaic16_road_init(running_machine &machine, int which, int type, int color
*
*************************************/
-void segaic16_road_draw(int which, bitmap_t *bitmap, const rectangle &cliprect, int priority)
+void segaic16_road_draw(int which, bitmap_t &bitmap, const rectangle &cliprect, int priority)
{
struct road_info *info = &segaic16_road[which];
(*info->draw)(info, bitmap, cliprect, priority);
@@ -2029,7 +2029,7 @@ void segaic16_rotate_init(running_machine &machine, int which, int type, int col
*
*************************************/
-void segaic16_rotate_draw(running_machine &machine, int which, bitmap_t *bitmap, const rectangle &cliprect, bitmap_t *srcbitmap)
+void segaic16_rotate_draw(running_machine &machine, int which, bitmap_t &bitmap, const rectangle &cliprect, bitmap_t *srcbitmap)
{
struct rotate_info *info = &segaic16_rotate[which];
INT32 currx = (info->buffer[0x3f0] << 16) | info->buffer[0x3f1];
@@ -2047,9 +2047,9 @@ void segaic16_rotate_draw(running_machine &machine, int which, bitmap_t *bitmap,
/* loop over screen Y coordinates */
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
- UINT16 *dest = &bitmap->pix16(y);
+ UINT16 *dest = &bitmap.pix16(y);
UINT16 *src = &srcbitmap->pix16(0);
- UINT8 *pri = &machine.priority_bitmap->pix8(y);
+ UINT8 *pri = &machine.priority_bitmap.pix8(y);
INT32 tx = currx;
INT32 ty = curry;
diff --git a/src/mame/video/segaic16.h b/src/mame/video/segaic16.h
index f0717839018..2cd0d7d3f7f 100644
--- a/src/mame/video/segaic16.h
+++ b/src/mame/video/segaic16.h
@@ -37,7 +37,7 @@ WRITE16_HANDLER( segaic16_paletteram_w );
void segaic16_tilemap_init(running_machine &machine, int which, int type, int colorbase, int xoffs, int numbanks);
void segaic16_tilemap_reset(running_machine &machine, int which);
-void segaic16_tilemap_draw(screen_device &screen, bitmap_t *bitmap, const rectangle &cliprect, int which, int map, int priority, int priority_mark);
+void segaic16_tilemap_draw(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect, int which, int map, int priority, int priority_mark);
void segaic16_tilemap_set_bank(running_machine &machine, int which, int banknum, int offset);
void segaic16_tilemap_set_flip(running_machine &machine, int which, int flip);
void segaic16_tilemap_set_rowscroll(running_machine &machine, int which, int enable);
@@ -52,7 +52,7 @@ WRITE16_HANDLER( segaic16_textram_0_w );
#define SEGAIC16_SPRITES_OUTRUN 4
#define SEGAIC16_SPRITES_XBOARD 5
-void segaic16_sprites_draw(screen_device &screen, bitmap_t *bitmap, const rectangle &cliprect, int which);
+void segaic16_sprites_draw(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect, int which);
void segaic16_sprites_set_bank(running_machine &machine, int which, int banknum, int offset);
void segaic16_sprites_set_flip(running_machine &machine, int which, int flip);
void segaic16_sprites_set_shadow(running_machine &machine, int which, int shadow);
@@ -71,7 +71,7 @@ WRITE16_HANDLER( segaic16_sprites_draw_1_w );
#define SEGAIC16_ROAD_FOREGROUND 1
void segaic16_road_init(running_machine &machine, int which, int type, int colorbase1, int colorbase2, int colorbase3, int xoffs);
-void segaic16_road_draw(int which, bitmap_t *bitmap, const rectangle &cliprect, int priority);
+void segaic16_road_draw(int which, bitmap_t &bitmap, const rectangle &cliprect, int priority);
READ16_HANDLER( segaic16_road_control_0_r );
WRITE16_HANDLER( segaic16_road_control_0_w );
@@ -81,7 +81,7 @@ WRITE16_HANDLER( segaic16_road_control_0_w );
#define SEGAIC16_ROTATE_YBOARD 0
void segaic16_rotate_init(running_machine &machine, int which, int type, int colorbase);
-void segaic16_rotate_draw(running_machine &machine, int which, bitmap_t *bitmap, const rectangle &cliprect, bitmap_t *srcbitmap);
+void segaic16_rotate_draw(running_machine &machine, int which, bitmap_t &bitmap, const rectangle &cliprect, bitmap_t *srcbitmap);
READ16_HANDLER( segaic16_rotate_control_0_r );
/*************************************
@@ -118,7 +118,7 @@ struct tilemap_info
struct tilemap_callback_info tmap_info[16]; /* callback info for 16 tilemap pages */
struct tilemap_callback_info textmap_info; /* callback info for a single textmap page */
void (*reset)(running_machine &machine, struct tilemap_info *info);/* reset callback */
- void (*draw_layer)(running_machine &machine, struct tilemap_info *info, bitmap_t *bitmap, const rectangle &cliprect, int which, int flags, int priority);
+ void (*draw_layer)(running_machine &machine, struct tilemap_info *info, bitmap_t &bitmap, const rectangle &cliprect, int which, int flags, int priority);
UINT16 * textram; /* pointer to textram pointer */
UINT16 * tileram; /* pointer to tileram pointer */
emu_timer * latch_timer; /* timer for latching 16b tilemap scroll values */
@@ -133,7 +133,7 @@ struct road_info
UINT16 colorbase2; /* color base for road background data */
UINT16 colorbase3; /* color base for sky data */
INT32 xoffs; /* X scroll offset */
- void (*draw)(struct road_info *info, bitmap_t *bitmap, const rectangle &cliprect, int priority);
+ void (*draw)(struct road_info *info, bitmap_t &bitmap, const rectangle &cliprect, int priority);
UINT16 * roadram; /* pointer to roadram pointer */
UINT16 * buffer; /* buffered roadram pointer */
UINT8 * gfx; /* expanded road graphics */
@@ -165,7 +165,7 @@ struct _sega16sp_interface
UINT16 colorbase; /* base color index */
INT32 ramsize; /* size of sprite RAM */
INT32 xoffs; /* X scroll offset */
- void (*draw)(running_machine &machine, device_t* device, bitmap_t *bitmap, const rectangle &cliprect);
+ void (*draw)(running_machine &machine, device_t* device, bitmap_t &bitmap, const rectangle &cliprect);
int buffer; /* should ram be buffered? */
};
@@ -183,7 +183,7 @@ struct _sega16sp_state
UINT16 colorbase; /* base color index */
INT32 ramsize; /* size of sprite RAM */
INT32 xoffs; /* X scroll offset */
- void (*draw)(running_machine &machine, device_t* device, bitmap_t *bitmap, const rectangle &cliprect);
+ void (*draw)(running_machine &machine, device_t* device, bitmap_t &bitmap, const rectangle &cliprect);
UINT16 * spriteram; /* pointer to spriteram pointer */
UINT16 * buffer; /* buffered spriteram for those that use it */
@@ -195,17 +195,17 @@ struct _sega16sp_state
DECLARE_LEGACY_DEVICE(SEGA16SP, sega16sp);
-void segaic16_sprites_hangon_draw(running_machine &machine, device_t *device, bitmap_t *bitmap, const rectangle &cliprect);
-void segaic16_sprites_sharrier_draw(running_machine &machine, device_t *device, bitmap_t *bitmap, const rectangle &cliprect);
-void segaic16_sprites_16a_draw(running_machine &machine, device_t *device, bitmap_t *bitmap, const rectangle &cliprect);
-void segaic16_sprites_16b_draw(running_machine &machine, device_t *device, bitmap_t *bitmap, const rectangle &cliprect);
-void segaic16_sprites_yboard_16b_draw(running_machine &machine, device_t *device, bitmap_t *bitmap, const rectangle &cliprect);
-void segaic16_sprites_yboard_draw(running_machine &machine, device_t *device, bitmap_t *bitmap, const rectangle &cliprect);
-void segaic16_sprites_outrun_draw(running_machine &machine, device_t *device, bitmap_t *bitmap, const rectangle &cliprect);
-void segaic16_sprites_xboard_draw(running_machine &machine, device_t *device, bitmap_t *bitmap, const rectangle &cliprect);
-void segaic16_sprites_16a_bootleg_wb3bl_draw(running_machine &machine, device_t *device, bitmap_t *bitmap, const rectangle &cliprect);
-void segaic16_sprites_16a_bootleg_passhtb_draw(running_machine &machine, device_t *device, bitmap_t *bitmap, const rectangle &cliprect);
-void segaic16_sprites_16a_bootleg_shinobld_draw(running_machine &machine, device_t *device, bitmap_t *bitmap, const rectangle &cliprect);
+void segaic16_sprites_hangon_draw(running_machine &machine, device_t *device, bitmap_t &bitmap, const rectangle &cliprect);
+void segaic16_sprites_sharrier_draw(running_machine &machine, device_t *device, bitmap_t &bitmap, const rectangle &cliprect);
+void segaic16_sprites_16a_draw(running_machine &machine, device_t *device, bitmap_t &bitmap, const rectangle &cliprect);
+void segaic16_sprites_16b_draw(running_machine &machine, device_t *device, bitmap_t &bitmap, const rectangle &cliprect);
+void segaic16_sprites_yboard_16b_draw(running_machine &machine, device_t *device, bitmap_t &bitmap, const rectangle &cliprect);
+void segaic16_sprites_yboard_draw(running_machine &machine, device_t *device, bitmap_t &bitmap, const rectangle &cliprect);
+void segaic16_sprites_outrun_draw(running_machine &machine, device_t *device, bitmap_t &bitmap, const rectangle &cliprect);
+void segaic16_sprites_xboard_draw(running_machine &machine, device_t *device, bitmap_t &bitmap, const rectangle &cliprect);
+void segaic16_sprites_16a_bootleg_wb3bl_draw(running_machine &machine, device_t *device, bitmap_t &bitmap, const rectangle &cliprect);
+void segaic16_sprites_16a_bootleg_passhtb_draw(running_machine &machine, device_t *device, bitmap_t &bitmap, const rectangle &cliprect);
+void segaic16_sprites_16a_bootleg_shinobld_draw(running_machine &machine, device_t *device, bitmap_t &bitmap, const rectangle &cliprect);
/* the various sprite configs */
static const sega16sp_interface hangon_sega16sp_intf =
diff --git a/src/mame/video/segaic24.c b/src/mame/video/segaic24.c
index f4f3376ac20..009d55a3718 100644
--- a/src/mame/video/segaic24.c
+++ b/src/mame/video/segaic24.c
@@ -100,19 +100,19 @@ void segas24_tile::device_start()
save_pointer(NAME(char_ram), 0x80000/2);
}
-void segas24_tile::draw_rect(bitmap_t *bm, bitmap_t *tm, bitmap_t *dm, const UINT16 *mask,
+void segas24_tile::draw_rect(bitmap_t &bm, bitmap_t &tm, bitmap_t &dm, const UINT16 *mask,
UINT16 tpri, UINT8 lpri, int win, int sx, int sy, int xx1, int yy1, int xx2, int yy2)
{
int y;
- const UINT16 *source = &bm->pix16(sy, sx);
- const UINT8 *trans = &tm->pix8(sy, sx);
- UINT8 *prib = &machine().priority_bitmap->pix8(0);
- UINT16 *dest = &dm->pix16(0);
+ const UINT16 *source = &bm.pix16(sy, sx);
+ const UINT8 *trans = &tm.pix8(sy, sx);
+ UINT8 *prib = &machine().priority_bitmap.pix8(0);
+ UINT16 *dest = &dm.pix16(0);
tpri |= TILEMAP_PIXEL_LAYER0;
- dest += yy1*dm->rowpixels() + xx1;
- prib += yy1*machine().priority_bitmap->rowpixels() + xx1;
+ dest += yy1*dm.rowpixels() + xx1;
+ prib += yy1*machine().priority_bitmap.rowpixels() + xx1;
mask += yy1*4;
yy2 -= yy1;
@@ -221,10 +221,10 @@ void segas24_tile::draw_rect(bitmap_t *bm, bitmap_t *tm, bitmap_t *dm, const UIN
llx -= 128;
cur_x = 0;
}
- source += bm->rowpixels();
- trans += tm->rowpixels();
- dest += dm->rowpixels();
- prib += machine().priority_bitmap->rowpixels();
+ source += bm.rowpixels();
+ trans += tm.rowpixels();
+ dest += dm.rowpixels();
+ prib += machine().priority_bitmap.rowpixels();
mask += 4;
}
}
@@ -234,18 +234,18 @@ void segas24_tile::draw_rect(bitmap_t *bm, bitmap_t *tm, bitmap_t *dm, const UIN
// about sprite priority hence the lack of support for the
// priority_bitmap
-void segas24_tile::draw_rect_rgb(bitmap_t *bm, bitmap_t *tm, bitmap_t *dm, const UINT16 *mask,
+void segas24_tile::draw_rect_rgb(bitmap_t &bm, bitmap_t &tm, bitmap_t &dm, const UINT16 *mask,
UINT16 tpri, UINT8 lpri, int win, int sx, int sy, int xx1, int yy1, int xx2, int yy2)
{
int y;
- const UINT16 *source = &bm->pix16(sy, sx);
- const UINT8 *trans = &tm->pix8(sy, sx);
- UINT16 *dest = &dm->pix16(0);
+ const UINT16 *source = &bm.pix16(sy, sx);
+ const UINT8 *trans = &tm.pix8(sy, sx);
+ UINT16 *dest = &dm.pix16(0);
const pen_t *pens = machine().pens;
tpri |= TILEMAP_PIXEL_LAYER0;
- dest += yy1*dm->rowpixels() + xx1;
+ dest += yy1*dm.rowpixels() + xx1;
mask += yy1*4;
yy2 -= yy1;
@@ -339,14 +339,14 @@ void segas24_tile::draw_rect_rgb(bitmap_t *bm, bitmap_t *tm, bitmap_t *dm, const
llx -= 128;
cur_x = 0;
}
- source += bm->rowpixels();
- trans += tm->rowpixels();
- dest += dm->rowpixels();
+ source += bm.rowpixels();
+ trans += tm.rowpixels();
+ dest += dm.rowpixels();
mask += 4;
}
}
-void segas24_tile::draw(bitmap_t *bitmap, const rectangle &cliprect, int layer, int lpri, int flags)
+void segas24_tile::draw(bitmap_t &bitmap, const rectangle &cliprect, int layer, int lpri, int flags)
{
UINT16 hscr = tile_ram[0x5000+(layer >> 1)];
UINT16 vscr = tile_ram[0x5004+(layer >> 1)];
@@ -466,18 +466,17 @@ void segas24_tile::draw(bitmap_t *bitmap, const rectangle &cliprect, int layer,
}
} else {
- bitmap_t *bm, *tm;
- void (segas24_tile::*draw)(bitmap_t *, bitmap_t *, bitmap_t *, const UINT16 *,
+ void (segas24_tile::*draw)(bitmap_t &, bitmap_t &, bitmap_t &, const UINT16 *,
UINT16, UINT8, int, int, int, int, int, int, int);
int win = layer & 1;
- if(bitmap->format() != BITMAP_FORMAT_INDEXED16)
+ if(bitmap.format() != BITMAP_FORMAT_INDEXED16)
draw = &segas24_tile::draw_rect_rgb;
else
draw = &segas24_tile::draw_rect;
- bm = tilemap_get_pixmap(tile_layer[layer]);
- tm = tilemap_get_flagsmap(tile_layer[layer]);
+ bitmap_t &bm = tilemap_get_pixmap(tile_layer[layer]);
+ bitmap_t &tm = tilemap_get_flagsmap(tile_layer[layer]);
if(hscr & 0x8000) {
int y;
@@ -613,7 +612,7 @@ void segas24_sprite::device_start()
0 11------ --------
*/
-void segas24_sprite::draw(bitmap_t *bitmap, const rectangle &cliprect, const int *spri)
+void segas24_sprite::draw(bitmap_t &bitmap, const rectangle &cliprect, const int *spri)
{
UINT16 curspr = 0;
int countspr = 0;
@@ -775,11 +774,11 @@ void segas24_sprite::draw(bitmap_t *bitmap, const rectangle &cliprect, const int
int zx1 = flipx ? 7-zx : zx;
UINT32 neweroffset = (newoffset+(zx1>>2))&0x1ffff; // crackdown sometimes attempts to use data past the end of spriteram
int c = (sprite_ram[neweroffset] >> (((~zx1) & 3) << 2)) & 0xf;
- UINT8 *pri = &machine().priority_bitmap->pix8(ypos1, xpos2);
+ UINT8 *pri = &machine().priority_bitmap.pix8(ypos1, xpos2);
if(!(*pri & pm[c])) {
c = colors[c];
if(c) {
- UINT16 *dst = &bitmap->pix16(ypos1, xpos2);
+ UINT16 *dst = &bitmap.pix16(ypos1, xpos2);
if(c==1)
*dst = (*dst) | 0x2000;
else
diff --git a/src/mame/video/segaic24.h b/src/mame/video/segaic24.h
index e23166ff276..01c1f6cba03 100644
--- a/src/mame/video/segaic24.h
+++ b/src/mame/video/segaic24.h
@@ -30,7 +30,7 @@ public:
DECLARE_READ32_MEMBER(char32_r);
DECLARE_WRITE32_MEMBER(char32_w);
- void draw(bitmap_t *bitmap, const rectangle &cliprect, int layer, int pri, int flags);
+ void draw(bitmap_t &bitmap, const rectangle &cliprect, int layer, int pri, int flags);
protected:
virtual void device_start();
@@ -53,9 +53,9 @@ private:
static TILE_GET_INFO_DEVICE(tile_info_1s);
static TILE_GET_INFO_DEVICE(tile_info_1w);
- void draw_rect(bitmap_t *bm, bitmap_t *tm, bitmap_t *dm, const UINT16 *mask,
+ void draw_rect(bitmap_t &bm, bitmap_t &tm, bitmap_t &dm, const UINT16 *mask,
UINT16 tpri, UINT8 lpri, int win, int sx, int sy, int xx1, int yy1, int xx2, int yy2);
- void draw_rect_rgb(bitmap_t *bm, bitmap_t *tm, bitmap_t *dm, const UINT16 *mask,
+ void draw_rect_rgb(bitmap_t &bm, bitmap_t &tm, bitmap_t &dm, const UINT16 *mask,
UINT16 tpri, UINT8 lpri, int win, int sx, int sy, int xx1, int yy1, int xx2, int yy2);
};
@@ -70,7 +70,7 @@ public:
DECLARE_READ16_MEMBER(read);
DECLARE_WRITE16_MEMBER(write);
- void draw(bitmap_t *bitmap, const rectangle &cliprect, const int *spri);
+ void draw(bitmap_t &bitmap, const rectangle &cliprect, const int *spri);
protected:
virtual void device_start();
diff --git a/src/mame/video/segaorun.c b/src/mame/video/segaorun.c
index 64a629828cf..5f9c8d85115 100644
--- a/src/mame/video/segaorun.c
+++ b/src/mame/video/segaorun.c
@@ -52,7 +52,7 @@ VIDEO_START( outrun )
SCREEN_UPDATE( shangon )
{
/* reset priorities */
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
/* draw the low priority road layer */
segaic16_road_draw(0, bitmap, cliprect, SEGAIC16_ROAD_BACKGROUND);
@@ -85,12 +85,12 @@ SCREEN_UPDATE( outrun )
/* if no drawing is happening, fill with black and get out */
if (!segaic16_display_enable)
{
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
return 0;
}
/* reset priorities */
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
/* draw the low priority road layer */
segaic16_road_draw(0, bitmap, cliprect, SEGAIC16_ROAD_BACKGROUND);
diff --git a/src/mame/video/segas16a.c b/src/mame/video/segas16a.c
index 5e97192bd33..f531b476d8d 100644
--- a/src/mame/video/segas16a.c
+++ b/src/mame/video/segas16a.c
@@ -38,20 +38,21 @@ SCREEN_UPDATE( system16a )
/* if no drawing is happening, fill with black and get out */
if (!segaic16_display_enable)
{
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
return 0;
}
/* reset priorities */
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
/* draw background opaquely first, not setting any priorities */
segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 0 | TILEMAP_DRAW_OPAQUE, 0x00);
segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 1 | TILEMAP_DRAW_OPAQUE, 0x00);
/* draw background again, just to set the priorities on non-transparent pixels */
- segaic16_tilemap_draw(screen, NULL, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 0, 0x01);
- segaic16_tilemap_draw(screen, NULL, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 1, 0x02);
+ bitmap_t dummy_bitmap;
+ segaic16_tilemap_draw(screen, dummy_bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 0, 0x01);
+ segaic16_tilemap_draw(screen, dummy_bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 1, 0x02);
/* draw foreground */
segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_FOREGROUND, 0, 0x02);
diff --git a/src/mame/video/segas16b.c b/src/mame/video/segas16b.c
index 97a79155108..24d2dcea42a 100644
--- a/src/mame/video/segas16b.c
+++ b/src/mame/video/segas16b.c
@@ -50,20 +50,21 @@ SCREEN_UPDATE( system16b )
/* if no drawing is happening, fill with black and get out */
if (!segaic16_display_enable)
{
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
return 0;
}
/* reset priorities */
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
/* draw background opaquely first, not setting any priorities */
segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 0 | TILEMAP_DRAW_OPAQUE, 0x00);
segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 1 | TILEMAP_DRAW_OPAQUE, 0x00);
/* draw background again, just to set the priorities on non-transparent pixels */
- segaic16_tilemap_draw(screen, NULL, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 0, 0x01);
- segaic16_tilemap_draw(screen, NULL, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 1, 0x02);
+ bitmap_t dummy_bitmap;
+ segaic16_tilemap_draw(screen, dummy_bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 0, 0x01);
+ segaic16_tilemap_draw(screen, dummy_bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 1, 0x02);
/* draw foreground */
segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_FOREGROUND, 0, 0x02);
diff --git a/src/mame/video/segas18.c b/src/mame/video/segas18.c
index 615344fba1b..47eb65a6876 100644
--- a/src/mame/video/segas18.c
+++ b/src/mame/video/segas18.c
@@ -116,17 +116,17 @@ void system18_set_vdp_mixing(running_machine &machine, int mixing)
*
*************************************/
-static void draw_vdp(screen_device &screen, bitmap_t *bitmap, const rectangle &cliprect, int priority)
+static void draw_vdp(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect, int priority)
{
segas1x_state *state = screen.machine().driver_data<segas1x_state>();
int x, y;
- bitmap_t *priority_bitmap = screen.machine().priority_bitmap;
+ bitmap_t &priority_bitmap = screen.machine().priority_bitmap;
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
UINT16 *src = &state->m_tmp_bitmap->pix16(y);
- UINT16 *dst = &bitmap->pix16(y);
- UINT8 *pri = &priority_bitmap->pix8(y);
+ UINT16 *dst = &bitmap.pix16(y);
+ UINT8 *pri = &priority_bitmap.pix8(y);
for (x = cliprect.min_x; x <= cliprect.max_x; x++)
{
@@ -202,16 +202,16 @@ SCREEN_UPDATE( system18 )
/* if no drawing is happening, fill with black and get out */
if (!segaic16_display_enable)
{
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
return 0;
}
/* if the VDP is enabled, update our tmp_bitmap */
if (state->m_vdp_enable)
- system18_vdp_update(state->m_tmp_bitmap, cliprect);
+ system18_vdp_update(*state->m_tmp_bitmap, cliprect);
/* reset priorities */
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
/* draw background opaquely first, not setting any priorities */
segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 0 | TILEMAP_DRAW_OPAQUE, 0x00);
@@ -239,7 +239,7 @@ SCREEN_UPDATE( system18 )
#if DEBUG_VDP
if (state->m_vdp_enable && screen.machine().input().code_pressed(KEYCODE_V))
{
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
update_system18_vdp(bitmap, cliprect);
}
if (vdp_enable && screen.machine().input().code_pressed(KEYCODE_B))
diff --git a/src/mame/video/segas24.c b/src/mame/video/segas24.c
index ecd2892485b..85da6f77930 100644
--- a/src/mame/video/segas24.c
+++ b/src/mame/video/segas24.c
@@ -28,12 +28,12 @@ SCREEN_UPDATE(system24)
segas24_state *state = screen.machine().driver_data<segas24_state>();
if(state->vmixer->get_reg(13) & 1) {
- bitmap->fill(get_black_pen(screen.machine()));
+ bitmap.fill(get_black_pen(screen.machine()));
return 0;
}
- screen.machine().priority_bitmap->fill(0);
- bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0);
+ bitmap.fill(0, cliprect);
std::vector<int> order;
order.resize(12);
diff --git a/src/mame/video/segas32.c b/src/mame/video/segas32.c
index 9a98b7627f7..f335b4548d7 100644
--- a/src/mame/video/segas32.c
+++ b/src/mame/video/segas32.c
@@ -913,7 +913,7 @@ static void update_tilemap_zoom(screen_device &screen, struct layer_info *layer,
{
segas32_state *state = screen.machine().driver_data<segas32_state>();
int clipenable, clipout, clips, clipdraw_start;
- bitmap_t *bitmap = layer->bitmap;
+ bitmap_t &bitmap = *layer->bitmap;
struct extents_list clip_extents;
tilemap_t *tilemaps[4];
UINT32 srcx, srcx_start, srcy;
@@ -986,21 +986,20 @@ static void update_tilemap_zoom(screen_device &screen, struct layer_info *layer,
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
UINT16 *extents = &clip_extents.extent[clip_extents.scan_extent[y]][0];
- UINT16 *dst = &bitmap->pix16(y);
+ UINT16 *dst = &bitmap.pix16(y);
int clipdraw = clipdraw_start;
/* optimize for the case where we are clipped out */
if (clipdraw || extents[1] <= cliprect.max_x)
{
- bitmap_t *tm0, *tm1;
int transparent = 0;
UINT16 *src[2];
/* look up the pages and get their source pixmaps */
- tm0 = tilemap_get_pixmap(tilemaps[((srcy >> 27) & 2) + 0]);
- tm1 = tilemap_get_pixmap(tilemaps[((srcy >> 27) & 2) + 1]);
- src[0] = &tm0->pix16((srcy >> 20) & 0xff);
- src[1] = &tm1->pix16((srcy >> 20) & 0xff);
+ bitmap_t &tm0 = tilemap_get_pixmap(tilemaps[((srcy >> 27) & 2) + 0]);
+ bitmap_t &tm1 = tilemap_get_pixmap(tilemaps[((srcy >> 27) & 2) + 1]);
+ src[0] = &tm0.pix16((srcy >> 20) & 0xff);
+ src[1] = &tm1.pix16((srcy >> 20) & 0xff);
/* loop over extents */
srcx = srcx_start;
@@ -1067,7 +1066,7 @@ static void update_tilemap_rowscroll(screen_device &screen, struct layer_info *l
{
segas32_state *state = screen.machine().driver_data<segas32_state>();
int clipenable, clipout, clips, clipdraw_start;
- bitmap_t *bitmap = layer->bitmap;
+ bitmap_t &bitmap = *layer->bitmap;
struct extents_list clip_extents;
tilemap_t *tilemaps[4];
int rowscroll, rowselect;
@@ -1112,13 +1111,12 @@ static void update_tilemap_rowscroll(screen_device &screen, struct layer_info *l
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
UINT16 *extents = &clip_extents.extent[clip_extents.scan_extent[y]][0];
- UINT16 *dst = &bitmap->pix16(y);
+ UINT16 *dst = &bitmap.pix16(y);
int clipdraw = clipdraw_start;
/* optimize for the case where we are clipped out */
if (clipdraw || extents[1] <= cliprect.max_x)
{
- bitmap_t *tm0, *tm1;
int transparent = 0;
UINT16 *src[2];
int srcxstep;
@@ -1156,10 +1154,10 @@ static void update_tilemap_rowscroll(screen_device &screen, struct layer_info *l
}
/* look up the pages and get their source pixmaps */
- tm0 = tilemap_get_pixmap(tilemaps[((srcy >> 7) & 2) + 0]);
- tm1 = tilemap_get_pixmap(tilemaps[((srcy >> 7) & 2) + 1]);
- src[0] = &tm0->pix16(srcy & 0xff);
- src[1] = &tm1->pix16(srcy & 0xff);
+ bitmap_t &tm0 = tilemap_get_pixmap(tilemaps[((srcy >> 7) & 2) + 0]);
+ bitmap_t &tm1 = tilemap_get_pixmap(tilemaps[((srcy >> 7) & 2) + 1]);
+ src[0] = &tm0.pix16(srcy & 0xff);
+ src[1] = &tm1.pix16(srcy & 0xff);
/* loop over extents */
while (1)
@@ -1219,7 +1217,7 @@ static void update_tilemap_rowscroll(screen_device &screen, struct layer_info *l
static void update_tilemap_text(screen_device &screen, struct layer_info *layer, const rectangle &cliprect)
{
segas32_state *state = screen.machine().driver_data<segas32_state>();
- bitmap_t *bitmap = layer->bitmap;
+ bitmap_t &bitmap = *layer->bitmap;
UINT16 *tilebase;
UINT16 *gfxbase;
int startx, starty;
@@ -1251,7 +1249,7 @@ static void update_tilemap_text(screen_device &screen, struct layer_info *layer,
/* non-flipped case */
if (!flip)
{
- UINT16 *dst = &bitmap->pix16(y * 8, x * 8);
+ UINT16 *dst = &bitmap.pix16(y * 8, x * 8);
/* loop over rows */
for (iy = 0; iy < 8; iy++)
@@ -1301,7 +1299,7 @@ static void update_tilemap_text(screen_device &screen, struct layer_info *layer,
pix += color;
dst[7] = pix;
- dst += bitmap->rowpixels();
+ dst += bitmap.rowpixels();
}
}
@@ -1312,7 +1310,7 @@ static void update_tilemap_text(screen_device &screen, struct layer_info *layer,
int effdstx = visarea.max_x - x * 8;
int effdsty = visarea.max_y - y * 8;
- UINT16 *dst = &bitmap->pix16(effdsty, effdstx);
+ UINT16 *dst = &bitmap.pix16(effdsty, effdstx);
/* loop over rows */
for (iy = 0; iy < 8; iy++)
@@ -1362,7 +1360,7 @@ static void update_tilemap_text(screen_device &screen, struct layer_info *layer,
pix += color;
dst[-7] = pix;
- dst -= bitmap->rowpixels();
+ dst -= bitmap.rowpixels();
}
}
}
@@ -1380,7 +1378,7 @@ static void update_bitmap(screen_device &screen, struct layer_info *layer, const
{
segas32_state *state = screen.machine().driver_data<segas32_state>();
int clipenable, clipout, clips, clipdraw_start;
- bitmap_t *bitmap = layer->bitmap;
+ bitmap_t &bitmap = *layer->bitmap;
struct extents_list clip_extents;
int xscroll, yscroll;
int color;
@@ -1405,7 +1403,7 @@ static void update_bitmap(screen_device &screen, struct layer_info *layer, const
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
UINT16 *extents = &clip_extents.extent[clip_extents.scan_extent[y]][0];
- UINT16 *dst = &bitmap->pix16(y);
+ UINT16 *dst = &bitmap.pix16(y);
int clipdraw = clipdraw_start;
/* optimize for the case where we are clipped out */
@@ -1482,12 +1480,12 @@ static void update_bitmap(screen_device &screen, struct layer_info *layer, const
static void update_background(segas32_state *state, struct layer_info *layer, const rectangle &cliprect)
{
- bitmap_t *bitmap = layer->bitmap;
+ bitmap_t &bitmap = *layer->bitmap;
int x, y;
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
- UINT16 *dst = &bitmap->pix16(y);
+ UINT16 *dst = &bitmap.pix16(y);
int color;
/* determine the color */
@@ -1680,7 +1678,7 @@ static int draw_one_sprite(running_machine &machine, UINT16 *data, int xoffs, in
{ 0x1fff, 0x0fff, 0x07ff, 0x03ff }
};
- bitmap_t *bitmap = state->m_layer_data[(!state->m_is_multi32 || !(data[3] & 0x0800)) ? MIXER_LAYER_SPRITES_2 : MIXER_LAYER_MULTISPR_2].bitmap;
+ bitmap_t &bitmap = *state->m_layer_data[(!state->m_is_multi32 || !(data[3] & 0x0800)) ? MIXER_LAYER_SPRITES_2 : MIXER_LAYER_MULTISPR_2].bitmap;
UINT8 numbanks = machine.region("gfx2")->bytes() / 0x400000;
const UINT32 *spritebase = (const UINT32 *)machine.region("gfx2")->base();
@@ -1808,7 +1806,7 @@ static int draw_one_sprite(running_machine &machine, UINT16 *data, int xoffs, in
if (y >= clipin.min_y && y <= clipin.max_y)
{
int do_clipout = (y >= clipout.min_y && y <= clipout.max_y);
- UINT16 *dest = &bitmap->pix16(y);
+ UINT16 *dest = &bitmap.pix16(y);
int xacc = 0;
/* 4bpp case */
@@ -2010,7 +2008,7 @@ INLINE UINT16 *get_layer_scanline(segas32_state *state, int layer, int scanline)
return &state->m_layer_data[layer].bitmap->pix16(scanline);
}
-static void mix_all_layers(segas32_state *state, int which, int xoffs, bitmap_t *bitmap, const rectangle &cliprect, UINT8 enablemask)
+static void mix_all_layers(segas32_state *state, int which, int xoffs, bitmap_t &bitmap, const rectangle &cliprect, UINT8 enablemask)
{
int blendenable = state->m_mixer_control[which][0x4e/2] & 0x0800;
int blendfactor = (state->m_mixer_control[which][0x4e/2] >> 8) & 7;
@@ -2186,7 +2184,7 @@ static void mix_all_layers(segas32_state *state, int which, int xoffs, bitmap_t
/* loop over rows */
for (y = cliprect.min_y; y <= cliprect.max_y; y++, spry += sprdy)
{
- UINT32 *dest = &bitmap->pix32(y, xoffs);
+ UINT32 *dest = &bitmap.pix32(y, xoffs);
UINT16 *layerbase[8];
/* get the starting address for each layer */
@@ -2435,7 +2433,7 @@ SCREEN_UPDATE( system32 )
/* if the display is off, punt */
if (!state->m_system32_displayenable[0])
{
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
return 0;
}
@@ -2580,13 +2578,13 @@ for (showclip = 0; showclip < 4; showclip++)
{
for (y = rect.min_y; y <= rect.max_y; y++)
{
- bitmap->plot(bitmap, rect.min_x, y, white);
- bitmap->plot(bitmap, rect.max_x, y, white);
+ bitmap.plot(bitmap, rect.min_x, y, white);
+ bitmap.plot(bitmap, rect.max_x, y, white);
}
for (x = rect.min_x; x <= rect.max_x; x++)
{
- bitmap->plot(bitmap, x, rect.min_y, white);
- bitmap->plot(bitmap, x, rect.max_y, white);
+ bitmap.plot(bitmap, x, rect.min_y, white);
+ bitmap.plot(bitmap, x, rect.max_y, white);
}
}
}
@@ -2600,7 +2598,7 @@ for (showclip = 0; showclip < 4; showclip++)
}
-static UINT32 multi32_update(screen_device &screen, bitmap_t *bitmap, const rectangle &cliprect, int index)
+static UINT32 multi32_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect, int index)
{
segas32_state *state = screen.machine().driver_data<segas32_state>();
UINT8 enablemask;
@@ -2614,7 +2612,7 @@ static UINT32 multi32_update(screen_device &screen, bitmap_t *bitmap, const rect
/* if the display is off, punt */
if (!state->m_system32_displayenable[index])
{
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
return 0;
}
diff --git a/src/mame/video/segaxbd.c b/src/mame/video/segaxbd.c
index 400eada5ee3..be8d153651e 100644
--- a/src/mame/video/segaxbd.c
+++ b/src/mame/video/segaxbd.c
@@ -41,12 +41,12 @@ SCREEN_UPDATE( xboard )
/* if no drawing is happening, fill with black and get out */
if (!segaic16_display_enable)
{
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
return 0;
}
/* reset priorities */
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
/* draw the low priority road layer */
segaic16_road_draw(0, bitmap, cliprect, SEGAIC16_ROAD_BACKGROUND);
diff --git a/src/mame/video/segaybd.c b/src/mame/video/segaybd.c
index dae1ec5efa7..5470f5f5e71 100644
--- a/src/mame/video/segaybd.c
+++ b/src/mame/video/segaybd.c
@@ -47,14 +47,14 @@ SCREEN_UPDATE( yboard )
/* if no drawing is happening, fill with black and get out */
if (!segaic16_display_enable)
{
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
return 0;
}
/* draw the yboard sprites */
yboard_clip.min_x = yboard_clip.min_y = 0;
yboard_clip.max_x = yboard_clip.max_y = 511;
- segaic16_sprites_draw(screen, state->m_tmp_bitmap, yboard_clip, 1);
+ segaic16_sprites_draw(screen, *state->m_tmp_bitmap, yboard_clip, 1);
/* apply rotation */
segaic16_rotate_draw(screen.machine(), 0, bitmap, cliprect, state->m_tmp_bitmap);
diff --git a/src/mame/video/sei_crtc.c b/src/mame/video/sei_crtc.c
index fdb43a670f5..6cac9ad70f4 100644
--- a/src/mame/video/sei_crtc.c
+++ b/src/mame/video/sei_crtc.c
@@ -206,7 +206,7 @@ static TILE_GET_INFO( seibucrtc_sc3_tile_info )
SET_TILE_INFO(4, tile, color, 0);
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect,int pri)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect,int pri)
{
UINT16 *spriteram16 = reinterpret_cast<UINT16 *>(memory_get_shared(machine, "spriteram"));
int offs,fx,fy,x,y,color,sprite;
@@ -271,7 +271,7 @@ VIDEO_START( seibu_crtc )
SCREEN_UPDATE( seibu_crtc )
{
- bitmap->fill(screen.machine().pens[0x7ff], cliprect); //black pen
+ bitmap.fill(screen.machine().pens[0x7ff], cliprect); //black pen
tilemap_set_scrollx( sc0_tilemap,0, (SEIBU_CRTC_SC0_SX + SEIBU_CRTC_FIX_SX+64) & 0x1ff );
tilemap_set_scrolly( sc0_tilemap,0, (SEIBU_CRTC_SC0_SY + SEIBU_CRTC_FIX_SY+1) & 0x1ff );
diff --git a/src/mame/video/seibuspi.c b/src/mame/video/seibuspi.c
index d1c916c582a..925d7337477 100644
--- a/src/mame/video/seibuspi.c
+++ b/src/mame/video/seibuspi.c
@@ -218,7 +218,7 @@ WRITE32_HANDLER( video_dma_address_w )
COMBINE_DATA( &state->m_video_dma_address );
}
-static void drawgfx_blend(bitmap_t *bitmap, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, int sx, int sy)
+static void drawgfx_blend(bitmap_t &bitmap, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, int sx, int sy)
{
seibuspi_state *state = gfx->machine().driver_data<seibuspi_state>();
const pen_t *pens = &gfx->machine().pens[gfx->color_base];
@@ -306,7 +306,7 @@ static void drawgfx_blend(bitmap_t *bitmap, const rectangle &cliprect, const gfx
// draw
for (j=y1; j <= y2; j++)
{
- UINT32 *p = &bitmap->pix32(j);
+ UINT32 *p = &bitmap.pix32(j);
UINT8 trans_pen = (1 << state->m_sprite_bpp) - 1;
int dp_i = (py * width) + px;
py += yd;
@@ -343,7 +343,7 @@ static const int sprite_ytable[2][8] =
{ 7*16, 6*16, 5*16, 4*16, 3*16, 2*16, 1*16, 0*16 }
};
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int pri_mask)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int pri_mask)
{
seibuspi_state *state = machine.driver_data<seibuspi_state>();
INT16 xpos, ypos;
@@ -558,7 +558,7 @@ static void set_scroll(tilemap_t *layer, int scroll)
#endif
-static void combine_tilemap(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, tilemap_t *tile, int x, int y, int opaque, INT16 *rowscroll)
+static void combine_tilemap(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, tilemap_t *tile, int x, int y, int opaque, INT16 *rowscroll)
{
seibuspi_state *state = machine.driver_data<seibuspi_state>();
int i,j;
@@ -566,13 +566,11 @@ static void combine_tilemap(running_machine &machine, bitmap_t *bitmap, const re
UINT32 *d;
UINT8 *t;
UINT32 xscroll_mask, yscroll_mask;
- bitmap_t *pen_bitmap;
- bitmap_t *flags_bitmap;
- pen_bitmap = tilemap_get_pixmap(tile);
- flags_bitmap = tilemap_get_flagsmap(tile);
- xscroll_mask = pen_bitmap->width() - 1;
- yscroll_mask = pen_bitmap->height() - 1;
+ bitmap_t &pen_bitmap = tilemap_get_pixmap(tile);
+ bitmap_t &flags_bitmap = tilemap_get_flagsmap(tile);
+ xscroll_mask = pen_bitmap.width() - 1;
+ yscroll_mask = pen_bitmap.height() - 1;
for (j=cliprect.min_y; j <= cliprect.max_y; j++)
{
@@ -582,9 +580,9 @@ static void combine_tilemap(running_machine &machine, bitmap_t *bitmap, const re
rx += rowscroll[(j+y) & yscroll_mask];
}
- d = &bitmap->pix32(j);
- s = &pen_bitmap->pix16((j+y) & yscroll_mask);
- t = &flags_bitmap->pix8((j+y) & yscroll_mask);
+ d = &bitmap.pix32(j);
+ s = &pen_bitmap.pix16((j+y) & yscroll_mask);
+ t = &flags_bitmap.pix8((j+y) & yscroll_mask);
for (i=cliprect.min_x+rx; i <= cliprect.max_x+rx; i++)
{
if (opaque || (t[i & xscroll_mask] & (TILEMAP_PIXEL_LAYER0 | TILEMAP_PIXEL_LAYER1)))
@@ -622,7 +620,7 @@ SCREEN_UPDATE( spi )
}
if( state->m_layer_enable & 0x1 )
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
if (!(state->m_layer_enable & 0x1))
combine_tilemap(screen.machine(), bitmap, cliprect, state->m_back_layer, state->m_spi_scrollram[0] & 0xffff, (state->m_spi_scrollram[0] >> 16) & 0xffff, 1, back_rowscroll);
@@ -672,7 +670,7 @@ VIDEO_START( sys386f2 )
SCREEN_UPDATE( sys386f2 )
{
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
draw_sprites(screen.machine(), bitmap, cliprect, 0);
draw_sprites(screen.machine(), bitmap, cliprect, 1);
draw_sprites(screen.machine(), bitmap, cliprect, 2);
diff --git a/src/mame/video/seicross.c b/src/mame/video/seicross.c
index 61212e7aa02..f673a35d397 100644
--- a/src/mame/video/seicross.c
+++ b/src/mame/video/seicross.c
@@ -97,7 +97,7 @@ VIDEO_START( seicross )
tilemap_set_scroll_cols(state->m_bg_tilemap, 32);
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
seicross_state *state = machine.driver_data<seicross_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/senjyo.c b/src/mame/video/senjyo.c
index 1f0ca3716ac..20a46e9abd6 100644
--- a/src/mame/video/senjyo.c
+++ b/src/mame/video/senjyo.c
@@ -175,14 +175,14 @@ WRITE8_HANDLER( senjyo_bgstripes_w )
***************************************************************************/
-static void draw_bgbitmap(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void draw_bgbitmap(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect)
{
senjyo_state *state = machine.driver_data<senjyo_state>();
int x,y,pen,strwid,count;
if (state->m_bgstripes == 0xff) /* off */
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
else
{
int flip = flip_screen_get(machine);
@@ -197,10 +197,10 @@ static void draw_bgbitmap(running_machine &machine, bitmap_t *bitmap,const recta
{
if (flip)
for (y = 0;y < 256;y++)
- bitmap->pix16(y, 255 - x) = 384 + pen;
+ bitmap.pix16(y, 255 - x) = 384 + pen;
else
for (y = 0;y < 256;y++)
- bitmap->pix16(y, x) = 384 + pen;
+ bitmap.pix16(y, x) = 384 + pen;
count += 0x10;
if (count >= strwid)
@@ -212,7 +212,7 @@ static void draw_bgbitmap(running_machine &machine, bitmap_t *bitmap,const recta
}
}
-static void draw_radar(running_machine &machine,bitmap_t *bitmap,const rectangle &cliprect)
+static void draw_radar(running_machine &machine,bitmap_t &bitmap,const rectangle &cliprect)
{
senjyo_state *state = machine.driver_data<senjyo_state>();
int offs,x;
@@ -234,11 +234,11 @@ static void draw_radar(running_machine &machine,bitmap_t *bitmap,const rectangle
if (sy >= cliprect.min_y && sy <= cliprect.max_y &&
sx >= cliprect.min_x && sx <= cliprect.max_x)
- bitmap->pix16(sy, sx) = offs < 0x200 ? 512 : 513;
+ bitmap.pix16(sy, sx) = offs < 0x200 ? 512 : 513;
}
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect,int priority)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect,int priority)
{
senjyo_state *state = machine.driver_data<senjyo_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/seta.c b/src/mame/video/seta.c
index d2caf830578..a209281e86d 100644
--- a/src/mame/video/seta.c
+++ b/src/mame/video/seta.c
@@ -770,33 +770,33 @@ static void usclssic_set_pens(running_machine &machine)
-static void draw_tilemap_palette_effect(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, tilemap_t *tilemap, int scrollx, int scrolly, int gfxnum, int flipscreen)
+static void draw_tilemap_palette_effect(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, tilemap_t *tilemap, int scrollx, int scrolly, int gfxnum, int flipscreen)
{
int y;
const gfx_element *gfx_tilemap = machine.gfx[gfxnum];
- const bitmap_t *src_bitmap = tilemap_get_pixmap(tilemap);
+ const bitmap_t &src_bitmap = tilemap_get_pixmap(tilemap);
int width_mask, height_mask;
int opaque_mask = gfx_tilemap->color_granularity - 1;
int pixel_effect_mask = gfx_tilemap->color_base + (gfx_tilemap->total_colors - 1) * gfx_tilemap->color_granularity;
int p;
- width_mask = src_bitmap->width() - 1;
- height_mask = src_bitmap->height() - 1;
+ width_mask = src_bitmap.width() - 1;
+ height_mask = src_bitmap.height() - 1;
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
- UINT16 *dest = &bitmap->pix16(y);
+ UINT16 *dest = &bitmap.pix16(y);
int x;
for (x = cliprect.min_x; x <= cliprect.max_x; x++)
{
if(!flipscreen)
{
- p = src_bitmap->pix16((y + scrolly) & height_mask, (x + scrollx) & width_mask);
+ p = src_bitmap.pix16((y + scrolly) & height_mask, (x + scrollx) & width_mask);
}
else
{
- p = src_bitmap->pix16((y - scrolly - 256) & height_mask, (x - scrollx - 512) & width_mask);
+ p = src_bitmap.pix16((y - scrolly - 256) & height_mask, (x - scrollx - 512) & width_mask);
}
// draw not transparent pixels
@@ -831,7 +831,7 @@ static void draw_tilemap_palette_effect(running_machine &machine, bitmap_t *bitm
SCREEN_UPDATE( seta_no_layers )
{
set_pens(screen.machine());
- bitmap->fill(0x1f0, cliprect);
+ bitmap.fill(0x1f0, cliprect);
screen.machine().device<seta001_device>("spritegen")->seta001_draw_sprites(screen.machine(),bitmap,cliprect,0x1000, 1);
return 0;
@@ -839,7 +839,7 @@ SCREEN_UPDATE( seta_no_layers )
/* For games with 1 or 2 tilemaps */
-void seta_layers_update(screen_device &screen, bitmap_t *bitmap, const rectangle &cliprect, int sprite_bank_size, int sprite_setac )
+void seta_layers_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect, int sprite_bank_size, int sprite_setac )
{
seta_state *state = screen.machine().driver_data<seta_state>();
int layers_ctrl = -1;
@@ -944,7 +944,7 @@ if (screen.machine().input().code_pressed(KEYCODE_Z))
}
#endif
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
if (order & 1) // swap the layers?
{
@@ -1055,7 +1055,7 @@ static SCREEN_UPDATE( seta_layers )
SCREEN_UPDATE( setaroul )
{
- bitmap->fill(0x0, cliprect);
+ bitmap.fill(0x0, cliprect);
screen.machine().device<seta001_device>("spritegen")->set_fg_yoffsets( -0x12, 0x0e );
screen.machine().device<seta001_device>("spritegen")->set_bg_yoffsets( 0x1, -0x1 );
diff --git a/src/mame/video/seta001.c b/src/mame/video/seta001.c
index 97cf53870e7..63f90394fc4 100644
--- a/src/mame/video/seta001.c
+++ b/src/mame/video/seta001.c
@@ -198,7 +198,7 @@ doraemon: 19 2a 00 03 (always)
-void seta001_device::seta001_draw_background( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int bank_size, int setac_type)
+void seta001_device::seta001_draw_background( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int bank_size, int setac_type)
{
int transpen;
@@ -319,7 +319,7 @@ void seta001_device::seta001_draw_background( running_machine &machine, bitmap_t
}
-void seta001_device::seta001_draw_foreground( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int bank_size)
+void seta001_device::seta001_draw_foreground( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int bank_size)
{
int screenflip = (m_spritectrl[0] & 0x40) >> 6;
int i;
@@ -457,7 +457,7 @@ void seta001_device::tnzs_eof( void )
}
-void seta001_device::seta001_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int bank_size, int setac)
+void seta001_device::seta001_draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int bank_size, int setac)
{
seta001_draw_background(machine, bitmap, cliprect, bank_size, setac);
seta001_draw_foreground(machine, bitmap, cliprect, bank_size);
diff --git a/src/mame/video/seta001.h b/src/mame/video/seta001.h
index 600f2c1f686..61abe2205b2 100644
--- a/src/mame/video/seta001.h
+++ b/src/mame/video/seta001.h
@@ -7,7 +7,7 @@ public:
seta001_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- void seta001_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int bank_size, int setac);
+ void seta001_draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int bank_size, int setac);
void setac_eof( void );
void tnzs_eof( void );
@@ -52,8 +52,8 @@ protected:
private:
- void seta001_draw_background( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int bank_size, int setac_type);
- void seta001_draw_foreground( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int bank_size);
+ void seta001_draw_background( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int bank_size, int setac_type);
+ void seta001_draw_foreground( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int bank_size);
};
diff --git a/src/mame/video/seta2.c b/src/mame/video/seta2.c
index 31e4580a8b9..b8db90566bd 100644
--- a/src/mame/video/seta2.c
+++ b/src/mame/video/seta2.c
@@ -161,7 +161,7 @@ WRITE16_HANDLER( seta2_vregs_w )
***************************************************************************/
-static void seta_drawgfx( bitmap_t *bitmap, const rectangle &cliprect, const gfx_element *gfx,
+static void seta_drawgfx( bitmap_t &bitmap, const rectangle &cliprect, const gfx_element *gfx,
UINT32 code,UINT32 color,int flipx,int flipy,int x0,int y0,
int shadow_depth )
{
@@ -186,7 +186,7 @@ static void seta_drawgfx( bitmap_t *bitmap, const rectangle &cliprect, const gfx
if ( sy >= cliprect.min_y && sy <= cliprect.max_y ) \
{ \
source = addr; \
- dest = &bitmap->pix16(sy); \
+ dest = &bitmap.pix16(sy); \
\
for ( sx = x0; sx != x1; sx += dx ) \
{ \
@@ -212,7 +212,7 @@ static void seta_drawgfx( bitmap_t *bitmap, const rectangle &cliprect, const gfx
}
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect)
{
// Sprites list
@@ -483,7 +483,7 @@ SCREEN_UPDATE( seta2 )
seta2_state *state = screen.machine().driver_data<seta2_state>();
// Black or pen 0?
- bitmap->fill(screen.machine().pens[0], cliprect);
+ bitmap.fill(screen.machine().pens[0], cliprect);
if ( (state->m_vregs[0x30/2] & 1) == 0 ) // 1 = BLANK SCREEN
draw_sprites(screen.machine(), bitmap, cliprect);
diff --git a/src/mame/video/sf.c b/src/mame/video/sf.c
index e5dc5f791e7..78ea75c3bc9 100644
--- a/src/mame/video/sf.c
+++ b/src/mame/video/sf.c
@@ -129,7 +129,7 @@ INLINE int sf_invert( int nb )
return nb ^ delta[(nb >> 3) & 3];
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect )
{
sf_state *state = machine.driver_data<sf_state>();
int offs;
@@ -225,7 +225,7 @@ SCREEN_UPDATE( sf )
if (state->m_sf_active & 0x20)
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
else
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
tilemap_draw(bitmap, cliprect, state->m_fg_tilemap, 0, 0);
diff --git a/src/mame/video/shadfrce.c b/src/mame/video/shadfrce.c
index 1636b3da843..ed99d639e6f 100644
--- a/src/mame/video/shadfrce.c
+++ b/src/mame/video/shadfrce.c
@@ -113,7 +113,7 @@ WRITE16_HANDLER ( shadfrce_bg1scrolly_w )
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
/* | ---- ---- hhhf Fe-Y | ---- ---- yyyy yyyy | ---- ---- TTTT TTTT | ---- ---- tttt tttt |
@@ -165,7 +165,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const recta
SCREEN_UPDATE( shadfrce )
{
shadfrce_state *state = screen.machine().driver_data<shadfrce_state>();
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
if (state->m_video_enable)
{
@@ -176,7 +176,7 @@ SCREEN_UPDATE( shadfrce )
}
else
{
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
}
return 0;
diff --git a/src/mame/video/shangha3.c b/src/mame/video/shangha3.c
index d69c95ab736..1db911ff28a 100644
--- a/src/mame/video/shangha3.c
+++ b/src/mame/video/shangha3.c
@@ -109,7 +109,7 @@ WRITE16_HANDLER( shangha3_blitter_go_w )
{
shangha3_state *state = space->machine().driver_data<shangha3_state>();
UINT16 *shangha3_ram = state->m_ram;
- bitmap_t *rawbitmap = state->m_rawbitmap;
+ bitmap_t &rawbitmap = *state->m_rawbitmap;
UINT8 *drawmode_table = state->m_drawmode_table;
int offs;
@@ -155,7 +155,7 @@ WRITE16_HANDLER( shangha3_blitter_go_w )
myclip.max_x = sx + sizex;
myclip.min_y = sy;
myclip.max_y = sy + sizey;
- myclip &= rawbitmap->cliprect();
+ myclip &= rawbitmap.cliprect();
if (shangha3_ram[offs+4] & 0x08) /* tilemap */
{
@@ -265,6 +265,6 @@ SCREEN_UPDATE( shangha3 )
{
shangha3_state *state = screen.machine().driver_data<shangha3_state>();
- copybitmap(bitmap, state->m_rawbitmap, 0, 0, 0, 0, cliprect);
+ copybitmap(bitmap, *state->m_rawbitmap, 0, 0, 0, 0, cliprect);
return 0;
}
diff --git a/src/mame/video/shangkid.c b/src/mame/video/shangkid.c
index ab0067b5b47..eba9d3200d4 100644
--- a/src/mame/video/shangkid.c
+++ b/src/mame/video/shangkid.c
@@ -60,7 +60,7 @@ WRITE8_HANDLER( shangkid_videoram_w )
tilemap_mark_tile_dirty( state->m_background, offset&0x7ff );
}
-static void draw_sprite(running_machine &machine, const UINT8 *source, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprite(running_machine &machine, const UINT8 *source, bitmap_t &bitmap, const rectangle &cliprect)
{
shangkid_state *state = machine.driver_data<shangkid_state>();
const gfx_element *gfx;
@@ -172,7 +172,7 @@ static void draw_sprite(running_machine &machine, const UINT8 *source, bitmap_t
}
}
-static void shangkid_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void shangkid_draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
shangkid_state *state = machine.driver_data<shangkid_state>();
const UINT8 *source, *finish;
@@ -235,7 +235,7 @@ PALETTE_INIT( dynamski )
}
-static void dynamski_draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int pri )
+static void dynamski_draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int pri )
{
shangkid_state *state = machine.driver_data<shangkid_state>();
UINT8 *videoram = state->m_videoram;
@@ -289,7 +289,7 @@ static void dynamski_draw_background(running_machine &machine, bitmap_t *bitmap,
}
}
-static void dynamski_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void dynamski_draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
shangkid_state *state = machine.driver_data<shangkid_state>();
UINT8 *videoram = state->m_videoram;
diff --git a/src/mame/video/shaolins.c b/src/mame/video/shaolins.c
index 51b4d25dc3b..57b668dfffa 100644
--- a/src/mame/video/shaolins.c
+++ b/src/mame/video/shaolins.c
@@ -158,7 +158,7 @@ VIDEO_START( shaolins )
tilemap_set_scroll_cols(state->m_bg_tilemap, 32);
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
shaolins_state *state = machine.driver_data<shaolins_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/shootout.c b/src/mame/video/shootout.c
index 4d6d5e5bc85..3df9580521f 100644
--- a/src/mame/video/shootout.c
+++ b/src/mame/video/shootout.c
@@ -91,7 +91,7 @@ VIDEO_START( shootout )
tilemap_set_transparent_pen( state->m_foreground, 0 );
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int bank_bits )
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int bank_bits )
{
shootout_state *state = machine.driver_data<shootout_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -175,7 +175,7 @@ SCREEN_UPDATE( shootout )
{
shootout_state *state = screen.machine().driver_data<shootout_state>();
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
tilemap_draw(bitmap,cliprect,state->m_background,0,0);
tilemap_draw(bitmap,cliprect,state->m_foreground,0,1);
@@ -187,7 +187,7 @@ SCREEN_UPDATE( shootouj )
{
shootout_state *state = screen.machine().driver_data<shootout_state>();
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
tilemap_draw(bitmap,cliprect,state->m_background,0,0);
tilemap_draw(bitmap,cliprect,state->m_foreground,0,1);
diff --git a/src/mame/video/shuuz.c b/src/mame/video/shuuz.c
index 487c7d0d2cf..3ccf52d60ba 100644
--- a/src/mame/video/shuuz.c
+++ b/src/mame/video/shuuz.c
@@ -105,7 +105,7 @@ SCREEN_UPDATE( shuuz )
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
UINT16 *mo = &mobitmap->pix16(y);
- UINT16 *pf = &bitmap->pix16(y);
+ UINT16 *pf = &bitmap.pix16(y);
for (x = rectlist.rect->min_x; x <= rectlist.rect->max_x; x++)
if (mo[x])
{
diff --git a/src/mame/video/sidearms.c b/src/mame/video/sidearms.c
index fa31cb197f2..afe914c2c49 100644
--- a/src/mame/video/sidearms.c
+++ b/src/mame/video/sidearms.c
@@ -174,7 +174,7 @@ VIDEO_START( sidearms )
state->m_flipon = state->m_charon = state->m_staron = state->m_objon = state->m_bgon = 0;
}
-static void draw_sprites_region(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int start_offset, int end_offset )
+static void draw_sprites_region(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int start_offset, int end_offset )
{
UINT8 *buffered_spriteram = machine.generic.buffered_spriteram.u8;
const gfx_element *gfx = machine.gfx[2];
@@ -207,7 +207,7 @@ static void draw_sprites_region(running_machine &machine, bitmap_t *bitmap, cons
}
}
-static void sidearms_draw_starfield( running_machine &machine, bitmap_t *bitmap )
+static void sidearms_draw_starfield( running_machine &machine, bitmap_t &bitmap )
{
int x, y, i;
UINT32 hadd_283, vadd_283, _hflop_74a_n, _hcount_191, _vcount_191;
@@ -217,8 +217,8 @@ static void sidearms_draw_starfield( running_machine &machine, bitmap_t *bitmap
sidearms_state *state = machine.driver_data<sidearms_state>();
// clear starfield background
- lineptr = &bitmap->pix16(16, 64);
- lineadv = bitmap->rowpixels();
+ lineptr = &bitmap.pix16(16, 64);
+ lineadv = bitmap.rowpixels();
for (i=224; i; i--) { memset(lineptr, 0, 768); lineptr += lineadv; }
@@ -237,13 +237,13 @@ static void sidearms_draw_starfield( running_machine &machine, bitmap_t *bitmap
#if 0 // old loop (for reference; easier to read)
if (!flipon)
{
- lineptr = bitmap->base;
+ lineptr = bitmap.base;
pixadv = 1;
lineadv = lineadv - 512;
}
else
{
- lineptr = &bitmap->pix16(255, 512 - 1);
+ lineptr = &bitmap.pix16(255, 512 - 1);
pixadv = -1;
lineadv = -lineadv + 512;
}
@@ -280,13 +280,13 @@ static void sidearms_draw_starfield( running_machine &machine, bitmap_t *bitmap
#else // optimized loop
if (!state->m_flipon)
{
- lineptr = &bitmap->pix16(16, 64);
+ lineptr = &bitmap.pix16(16, 64);
pixadv = 1;
lineadv = lineadv - 384;
}
else
{
- lineptr = &bitmap->pix16(239, 512 - 64 - 1);
+ lineptr = &bitmap.pix16(239, 512 - 64 - 1);
pixadv = -1;
lineadv = -lineadv + 384;
}
@@ -331,7 +331,7 @@ static void sidearms_draw_starfield( running_machine &machine, bitmap_t *bitmap
#endif
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
sidearms_state *state = machine.driver_data<sidearms_state>();
diff --git a/src/mame/video/sidepckt.c b/src/mame/video/sidepckt.c
index 93cfc13774f..737a1c865c1 100644
--- a/src/mame/video/sidepckt.c
+++ b/src/mame/video/sidepckt.c
@@ -107,7 +107,7 @@ WRITE8_HANDLER( sidepckt_flipscreen_w )
***************************************************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect)
{
sidepckt_state *state = machine.driver_data<sidepckt_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/silkroad.c b/src/mame/video/silkroad.c
index d30e2b5db45..d35da269e8e 100644
--- a/src/mame/video/silkroad.c
+++ b/src/mame/video/silkroad.c
@@ -7,7 +7,7 @@
/* Clean Up */
/* is theres a bg colour register? */
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
silkroad_state *state = machine.driver_data<silkroad_state>();
const gfx_element *gfx = machine.gfx[0];
@@ -144,8 +144,8 @@ VIDEO_START(silkroad)
SCREEN_UPDATE(silkroad)
{
silkroad_state *state = screen.machine().driver_data<silkroad_state>();
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(0x7c0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(0x7c0, cliprect);
tilemap_set_scrollx( state->m_fg_tilemap, 0, ((state->m_regs[0] & 0xffff0000) >> 16) );
tilemap_set_scrolly( state->m_fg_tilemap, 0, (state->m_regs[0] & 0x0000ffff) >> 0 );
diff --git a/src/mame/video/simpl156.c b/src/mame/video/simpl156.c
index 02430188e89..a1657b3951f 100644
--- a/src/mame/video/simpl156.c
+++ b/src/mame/video/simpl156.c
@@ -29,11 +29,11 @@ SCREEN_UPDATE( simpl156 )
{
simpl156_state *state = screen.machine().driver_data<simpl156_state>();
- screen.machine().priority_bitmap->fill(0);
+ screen.machine().priority_bitmap.fill(0);
deco16ic_pf_update(state->m_deco_tilegen1, state->m_pf1_rowscroll, state->m_pf2_rowscroll);
- bitmap->fill(256, cliprect);
+ bitmap.fill(256, cliprect);
deco16ic_tilemap_2_draw(state->m_deco_tilegen1, bitmap, cliprect, 0, 2);
deco16ic_tilemap_1_draw(state->m_deco_tilegen1, bitmap, cliprect, 0, 4);
diff --git a/src/mame/video/simpsons.c b/src/mame/video/simpsons.c
index 5052868b6f1..d7985571509 100644
--- a/src/mame/video/simpsons.c
+++ b/src/mame/video/simpsons.c
@@ -144,8 +144,8 @@ SCREEN_UPDATE( simpsons )
konami_sortlayers3(layer, state->m_layerpri);
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(16 * bg_colorbase, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(16 * bg_colorbase, cliprect);
k052109_tilemap_draw(state->m_k052109, bitmap, cliprect, layer[0], 0, 1);
k052109_tilemap_draw(state->m_k052109, bitmap, cliprect, layer[1], 0, 2);
k052109_tilemap_draw(state->m_k052109, bitmap, cliprect, layer[2], 0, 4);
diff --git a/src/mame/video/sknsspr.c b/src/mame/video/sknsspr.c
index 81caa24c991..207f7563070 100644
--- a/src/mame/video/sknsspr.c
+++ b/src/mame/video/sknsspr.c
@@ -144,7 +144,7 @@ void sknsspr_device::skns_sprite_kludge(int x, int y)
#define z_draw_pixel() \
UINT8 val = src[xs >> 6]; \
if(val) \
- bitmap->pix16(yd>>6, xd>>6) = val + colour;
+ bitmap.pix16(yd>>6, xd>>6) = val + colour;
#define z_x_dst(op) \
old = xd; \
@@ -165,7 +165,7 @@ void sknsspr_device::skns_sprite_kludge(int x, int y)
old2 += 0x40; \
}
-static void blit_nf_z(bitmap_t *bitmap, const rectangle &cliprect, const UINT8 *src, int x, int y, int sx, int sy, UINT16 zx_m, UINT16 zx_s, UINT16 zy_m, UINT16 zy_s, int colour)
+static void blit_nf_z(bitmap_t &bitmap, const rectangle &cliprect, const UINT8 *src, int x, int y, int sx, int sy, UINT16 zx_m, UINT16 zx_s, UINT16 zy_m, UINT16 zy_s, int colour)
{
z_decls(sx);
z_clamp_x_min();
@@ -179,7 +179,7 @@ static void blit_nf_z(bitmap_t *bitmap, const rectangle &cliprect, const UINT8 *
}
}
-static void blit_fy_z(bitmap_t *bitmap, const rectangle &cliprect, const UINT8 *src, int x, int y, int sx, int sy, UINT16 zx_m, UINT16 zx_s, UINT16 zy_m, UINT16 zy_s, int colour)
+static void blit_fy_z(bitmap_t &bitmap, const rectangle &cliprect, const UINT8 *src, int x, int y, int sx, int sy, UINT16 zx_m, UINT16 zx_s, UINT16 zy_m, UINT16 zy_s, int colour)
{
z_decls(sx);
z_clamp_x_min();
@@ -193,7 +193,7 @@ static void blit_fy_z(bitmap_t *bitmap, const rectangle &cliprect, const UINT8 *
}
}
-static void blit_fx_z(bitmap_t *bitmap, const rectangle &cliprect, const UINT8 *src, int x, int y, int sx, int sy, UINT16 zx_m, UINT16 zx_s, UINT16 zy_m, UINT16 zy_s, int colour)
+static void blit_fx_z(bitmap_t &bitmap, const rectangle &cliprect, const UINT8 *src, int x, int y, int sx, int sy, UINT16 zx_m, UINT16 zx_s, UINT16 zy_m, UINT16 zy_s, int colour)
{
z_decls(sx);
z_clamp_x_max();
@@ -207,7 +207,7 @@ static void blit_fx_z(bitmap_t *bitmap, const rectangle &cliprect, const UINT8 *
}
}
-static void blit_fxy_z(bitmap_t *bitmap, const rectangle &cliprect, const UINT8 *src, int x, int y, int sx, int sy, UINT16 zx_m, UINT16 zx_s, UINT16 zy_m, UINT16 zy_s, int colour)
+static void blit_fxy_z(bitmap_t &bitmap, const rectangle &cliprect, const UINT8 *src, int x, int y, int sx, int sy, UINT16 zx_m, UINT16 zx_s, UINT16 zy_m, UINT16 zy_s, int colour)
{
z_decls(sx);
z_clamp_x_max();
@@ -221,14 +221,14 @@ static void blit_fxy_z(bitmap_t *bitmap, const rectangle &cliprect, const UINT8
}
}
-static void (*const blit_z[4])(bitmap_t *bitmap, const rectangle &cliprect, const UINT8 *src, int x, int y, int sx, int sy, UINT16 zx_m, UINT16 zx_s, UINT16 zy_m, UINT16 zy_s, int colour) = {
+static void (*const blit_z[4])(bitmap_t &bitmap, const rectangle &cliprect, const UINT8 *src, int x, int y, int sx, int sy, UINT16 zx_m, UINT16 zx_s, UINT16 zy_m, UINT16 zy_s, int colour) = {
blit_nf_z,
blit_fy_z,
blit_fx_z,
blit_fxy_z,
};
-void sknsspr_device::skns_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, UINT32* spriteram_source, size_t spriteram_size, UINT8* gfx_source, size_t gfx_length, UINT32* sprite_regs)
+void sknsspr_device::skns_draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, UINT32* spriteram_source, size_t spriteram_size, UINT8* gfx_source, size_t gfx_length, UINT32* sprite_regs)
{
/*- SPR RAM Format -**
@@ -484,7 +484,7 @@ void sknsspr_device::skns_draw_sprites(running_machine &machine, bitmap_t *bitma
int pix;
pix = decodebuffer[xsize*yy+xx];
if (pix)
- bitmap->pix16(sy+yy, sx+xx) = pix+ NewColour; // change later
+ bitmap.pix16(sy+yy, sx+xx) = pix+ NewColour; // change later
}
}
}
@@ -504,7 +504,7 @@ void sknsspr_device::skns_draw_sprites(running_machine &machine, bitmap_t *bitma
int pix;
pix = decodebuffer[xsize*yy+xx];
if (pix)
- bitmap->pix16(sy+(ysize-1-yy), sx+xx) = pix+ NewColour; // change later
+ bitmap.pix16(sy+(ysize-1-yy), sx+xx) = pix+ NewColour; // change later
}
}
}
@@ -524,7 +524,7 @@ void sknsspr_device::skns_draw_sprites(running_machine &machine, bitmap_t *bitma
int pix;
pix = decodebuffer[xsize*yy+xx];
if (pix)
- bitmap->pix16(sy+yy, sx+(xsize-1-xx)) = pix+ NewColour; // change later
+ bitmap.pix16(sy+yy, sx+(xsize-1-xx)) = pix+ NewColour; // change later
}
}
}
@@ -545,7 +545,7 @@ void sknsspr_device::skns_draw_sprites(running_machine &machine, bitmap_t *bitma
int pix;
pix = decodebuffer[xsize*yy+xx];
if (pix)
- bitmap->pix16(sy+(ysize-1-yy), sx+(xsize-1-xx)) = pix+ NewColour; // change later
+ bitmap.pix16(sy+(ysize-1-yy), sx+(xsize-1-xx)) = pix+ NewColour; // change later
}
}
}
diff --git a/src/mame/video/sknsspr.h b/src/mame/video/sknsspr.h
index 847dbd6e2ba..2b2841dbb0c 100644
--- a/src/mame/video/sknsspr.h
+++ b/src/mame/video/sknsspr.h
@@ -3,7 +3,7 @@ class sknsspr_device : public device_t
{
public:
sknsspr_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- void skns_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, UINT32* spriteram_source, size_t spriteram_size, UINT8* gfx_source, size_t gfx_length, UINT32* sprite_regs);
+ void skns_draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, UINT32* spriteram_source, size_t spriteram_size, UINT8* gfx_source, size_t gfx_length, UINT32* sprite_regs);
void skns_sprite_kludge(int x, int y);
protected:
diff --git a/src/mame/video/skullxbo.c b/src/mame/video/skullxbo.c
index e06af8a293d..6b57dda21d0 100644
--- a/src/mame/video/skullxbo.c
+++ b/src/mame/video/skullxbo.c
@@ -259,7 +259,7 @@ SCREEN_UPDATE( skullxbo )
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
UINT16 *mo = &mobitmap->pix16(y);
- UINT16 *pf = &bitmap->pix16(y);
+ UINT16 *pf = &bitmap.pix16(y);
for (x = rectlist.rect->min_x; x <= rectlist.rect->max_x; x++)
if (mo[x])
{
diff --git a/src/mame/video/skydiver.c b/src/mame/video/skydiver.c
index 31a0231a351..037828f0661 100644
--- a/src/mame/video/skydiver.c
+++ b/src/mame/video/skydiver.c
@@ -168,7 +168,7 @@ WRITE8_HANDLER( skydiver_2000_201F_w )
*
*************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
skydiver_state *state = machine.driver_data<skydiver_state>();
int pic;
diff --git a/src/mame/video/skyfox.c b/src/mame/video/skyfox.c
index ae7dde53b57..9205799d460 100644
--- a/src/mame/video/skyfox.c
+++ b/src/mame/video/skyfox.c
@@ -159,7 +159,7 @@ Offset: Value:
***************************************************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
skyfox_state *state = machine.driver_data<skyfox_state>();
int offs;
@@ -238,7 +238,7 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
***************************************************************************/
-static void draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
skyfox_state *state = machine.driver_data<skyfox_state>();
UINT8 *RAM = machine.region("gfx2")->base();
@@ -265,7 +265,7 @@ static void draw_background(running_machine &machine, bitmap_t *bitmap, const re
}
for (j = 0 ; j <= ((pen & 0x80) ? 0 : 3); j++)
- bitmap->pix16(
+ bitmap.pix16(
(((j / 2) & 1) + y) % 256,
((j & 1) + x) % 512) = 256 + (pen & 0x7f);
}
@@ -283,7 +283,7 @@ static void draw_background(running_machine &machine, bitmap_t *bitmap, const re
SCREEN_UPDATE( skyfox )
{
- bitmap->fill(255, cliprect); // the bg is black
+ bitmap.fill(255, cliprect); // the bg is black
draw_background(screen.machine(), bitmap, cliprect);
draw_sprites(screen.machine(), bitmap, cliprect);
return 0;
diff --git a/src/mame/video/skykid.c b/src/mame/video/skykid.c
index 8a399a42ee9..58b4496aba7 100644
--- a/src/mame/video/skykid.c
+++ b/src/mame/video/skykid.c
@@ -185,7 +185,7 @@ WRITE8_HANDLER( skykid_flipscreen_priority_w )
***************************************************************************/
/* the sprite generator IC is the same as Mappy */
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect)
{
skykid_state *state = machine.driver_data<skykid_state>();
UINT8 *spriteram = state->m_spriteram + 0x780;
diff --git a/src/mame/video/skyraid.c b/src/mame/video/skyraid.c
index d4ddce9c3b2..60dc7f226db 100644
--- a/src/mame/video/skyraid.c
+++ b/src/mame/video/skyraid.c
@@ -16,7 +16,7 @@ VIDEO_START( skyraid )
}
-static void draw_text(running_machine &machine, bitmap_t* bitmap, const rectangle &cliprect)
+static void draw_text(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
skyraid_state *state = machine.driver_data<skyraid_state>();
const UINT8* p = state->m_alpha_num_ram;
@@ -30,13 +30,13 @@ static void draw_text(running_machine &machine, bitmap_t* bitmap, const rectangl
y = 136 + 16 * (i ^ 1);
- for (x = 0; x < bitmap->width(); x += 16)
+ for (x = 0; x < bitmap.width(); x += 16)
drawgfx_transpen(bitmap, cliprect, machine.gfx[0], *p++, 0, 0, 0, x, y, 0);
}
}
-static void draw_terrain(running_machine &machine, bitmap_t* bitmap, const rectangle &cliprect)
+static void draw_terrain(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
skyraid_state *state = machine.driver_data<skyraid_state>();
const UINT8* p = machine.region("user1")->base();
@@ -44,13 +44,13 @@ static void draw_terrain(running_machine &machine, bitmap_t* bitmap, const recta
int x;
int y;
- for (y = 0; y < bitmap->height(); y++)
+ for (y = 0; y < bitmap.height(); y++)
{
int offset = (16 * state->m_scroll + 16 * ((y + 1) / 2)) & 0x7FF;
x = 0;
- while (x < bitmap->width())
+ while (x < bitmap.width())
{
UINT8 val = p[offset++];
@@ -64,7 +64,7 @@ static void draw_terrain(running_machine &machine, bitmap_t* bitmap, const recta
r.max_y = y + 1;
r.max_x = x + 31 - count;
- bitmap->fill(color, r);
+ bitmap.fill(color, r);
x += 32 - count;
}
@@ -72,7 +72,7 @@ static void draw_terrain(running_machine &machine, bitmap_t* bitmap, const recta
}
-static void draw_sprites(running_machine &machine, bitmap_t* bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
skyraid_state *state = machine.driver_data<skyraid_state>();
int i;
@@ -94,7 +94,7 @@ static void draw_sprites(running_machine &machine, bitmap_t* bitmap, const recta
}
-static void draw_missiles(running_machine &machine, bitmap_t* bitmap, const rectangle &cliprect)
+static void draw_missiles(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
skyraid_state *state = machine.driver_data<skyraid_state>();
int i;
@@ -117,17 +117,17 @@ static void draw_missiles(running_machine &machine, bitmap_t* bitmap, const rect
}
-static void draw_trapezoid(running_machine &machine, bitmap_t* dst, bitmap_t* src)
+static void draw_trapezoid(running_machine &machine, bitmap_t& dst, bitmap_t& src)
{
const UINT8* p = machine.region("user2")->base();
int x;
int y;
- for (y = 0; y < dst->height(); y++)
+ for (y = 0; y < dst.height(); y++)
{
- UINT16* pSrc = &src->pix16(y);
- UINT16* pDst = &dst->pix16(y);
+ UINT16* pSrc = &src.pix16(y);
+ UINT16* pDst = &dst.pix16(y);
int x1 = 0x000 + p[(y & ~1) + 0];
int x2 = 0x100 + p[(y & ~1) + 1];
@@ -142,12 +142,12 @@ SCREEN_UPDATE( skyraid )
{
skyraid_state *state = screen.machine().driver_data<skyraid_state>();
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
- draw_terrain(screen.machine(), state->m_helper, cliprect);
- draw_sprites(screen.machine(), state->m_helper, cliprect);
- draw_missiles(screen.machine(), state->m_helper, cliprect);
- draw_trapezoid(screen.machine(), bitmap, state->m_helper);
+ draw_terrain(screen.machine(), *state->m_helper, cliprect);
+ draw_sprites(screen.machine(), *state->m_helper, cliprect);
+ draw_missiles(screen.machine(), *state->m_helper, cliprect);
+ draw_trapezoid(screen.machine(), bitmap, *state->m_helper);
draw_text(screen.machine(), bitmap, cliprect);
return 0;
}
diff --git a/src/mame/video/slapfght.c b/src/mame/video/slapfght.c
index c0340ff794c..df814e5cdd0 100644
--- a/src/mame/video/slapfght.c
+++ b/src/mame/video/slapfght.c
@@ -153,7 +153,7 @@ static void slapfght_log_vram(running_machine &machine)
Render the Sprites
***************************************************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int priority_to_display )
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int priority_to_display )
{
slapfght_state *state = machine.driver_data<slapfght_state>();
UINT8 *buffered_spriteram = machine.generic.buffered_spriteram.u8;
diff --git a/src/mame/video/slapshot.c b/src/mame/video/slapshot.c
index e6c547ff1dd..7b94c8a2994 100644
--- a/src/mame/video/slapshot.c
+++ b/src/mame/video/slapshot.c
@@ -34,7 +34,7 @@ VIDEO_START( slapshot )
SPRITE DRAW ROUTINES
************************************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int *primasks, int y_offset )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int *primasks, int y_offset )
{
/*
Sprite format:
@@ -519,8 +519,8 @@ SCREEN_UPDATE( slapshot )
spritepri[2] = tc0360pri_r(state->m_tc0360pri, 7) & 0x0f;
spritepri[3] = tc0360pri_r(state->m_tc0360pri, 7) >> 4;
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(0, cliprect);
#ifdef MAME_DEBUG
if (state->m_dislayer[layer[0]] == 0)
diff --git a/src/mame/video/snes.c b/src/mame/video/snes.c
index 7a27c8872b0..96e5d2e9d25 100644
--- a/src/mame/video/snes.c
+++ b/src/mame/video/snes.c
@@ -1498,7 +1498,7 @@ INLINE void snes_draw_blend( UINT16 offset, UINT16 *colour, UINT8 prevent_color_
* the optimized averaging algorithm.
*********************************************/
-static void snes_refresh_scanline( running_machine &machine, bitmap_t *bitmap, UINT16 curline )
+static void snes_refresh_scanline( running_machine &machine, bitmap_t &bitmap, UINT16 curline )
{
UINT16 ii;
int x;
@@ -1512,7 +1512,7 @@ static void snes_refresh_scanline( running_machine &machine, bitmap_t *bitmap, U
if (snes_ppu.screen_disabled) /* screen is forced blank */
for (x = 0; x < SNES_SCR_WIDTH * 2; x++)
- bitmap->pix32(curline, x) = RGB_BLACK;
+ bitmap.pix32(curline, x) = RGB_BLACK;
else
{
/* Update clip window masks if necessary */
@@ -1596,8 +1596,8 @@ static void snes_refresh_scanline( running_machine &machine, bitmap_t *bitmap, U
g = (((c & 0x3e0) >> 5) * fade) >> 4;
b = (((c & 0x7c00) >> 10) * fade) >> 4;
- bitmap->pix32(curline, x * 2 + 0) = MAKE_RGB(pal5bit(r), pal5bit(g), pal5bit(b));
- bitmap->pix32(curline, x * 2 + 1) = MAKE_RGB(pal5bit(r), pal5bit(g), pal5bit(b));
+ bitmap.pix32(curline, x * 2 + 0) = MAKE_RGB(pal5bit(r), pal5bit(g), pal5bit(b));
+ bitmap.pix32(curline, x * 2 + 1) = MAKE_RGB(pal5bit(r), pal5bit(g), pal5bit(b));
}
else
{
@@ -1635,7 +1635,7 @@ static void snes_refresh_scanline( running_machine &machine, bitmap_t *bitmap, U
g = (((c & 0x3e0) >> 5) * fade) >> 4;
b = (((c & 0x7c00) >> 10) * fade) >> 4;
- bitmap->pix32(curline, x * 2 + 0) = MAKE_RGB(pal5bit(r), pal5bit(g), pal5bit(b));
+ bitmap.pix32(curline, x * 2 + 0) = MAKE_RGB(pal5bit(r), pal5bit(g), pal5bit(b));
prev_colour = tmp_col[0];
/* average the second pixel if required, or draw it directly*/
@@ -1648,7 +1648,7 @@ static void snes_refresh_scanline( running_machine &machine, bitmap_t *bitmap, U
g = (((c & 0x3e0) >> 5) * fade) >> 4;
b = (((c & 0x7c00) >> 10) * fade) >> 4;
- bitmap->pix32(curline, x * 2 + 1) = MAKE_RGB(pal5bit(r), pal5bit(g), pal5bit(b));
+ bitmap.pix32(curline, x * 2 + 1) = MAKE_RGB(pal5bit(r), pal5bit(g), pal5bit(b));
prev_colour = tmp_col[1];
}
}
diff --git a/src/mame/video/snk.c b/src/mame/video/snk.c
index e46c565aedc..c09522ea640 100644
--- a/src/mame/video/snk.c
+++ b/src/mame/video/snk.c
@@ -744,7 +744,7 @@ WRITE8_HANDLER( tdfever_spriteram_w )
/**************************************************************************************/
-static void marvins_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect,
+static void marvins_draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect,
const int scrollx, const int scrolly, const int from, const int to)
{
snk_state *state = machine.driver_data<snk_state>();
@@ -789,7 +789,7 @@ static void marvins_draw_sprites(running_machine &machine, bitmap_t *bitmap, con
}
-static void tnk3_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, const int xscroll, const int yscroll)
+static void tnk3_draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, const int xscroll, const int yscroll)
{
snk_state *state = machine.driver_data<snk_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -854,7 +854,7 @@ static void tnk3_draw_sprites(running_machine &machine, bitmap_t *bitmap, const
}
-static void ikari_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect,
+static void ikari_draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect,
const int start, const int xscroll, const int yscroll, const UINT8 *source, const int gfxnum )
{
snk_state *state = machine.driver_data<snk_state>();
@@ -926,7 +926,7 @@ byte3: attributes
-xx-x--- (bank number)
x------- (x offset bit8)
*/
-static void tdfever_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect,
+static void tdfever_draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect,
const int xscroll, const int yscroll, const UINT8 *source, const int gfxnum, const int hw_xflip, const int from, const int to )
{
snk_state *state = machine.driver_data<snk_state>();
diff --git a/src/mame/video/snk68.c b/src/mame/video/snk68.c
index 1e800f7ba96..eccd610c5c9 100644
--- a/src/mame/video/snk68.c
+++ b/src/mame/video/snk68.c
@@ -199,7 +199,7 @@ WRITE16_HANDLER( pow_paletteram16_word_w )
***************************************************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int group)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int group)
{
snk68_state *state = machine.driver_data<snk68_state>();
UINT16 *spriteram16 = state->m_spriteram;
@@ -292,7 +292,7 @@ SCREEN_UPDATE( pow )
{
snk68_state *state = screen.machine().driver_data<snk68_state>();
- bitmap->fill(0x7ff, cliprect);
+ bitmap.fill(0x7ff, cliprect);
/* This appears to be the correct priority order */
draw_sprites(screen.machine(), bitmap, cliprect, 2);
diff --git a/src/mame/video/solomon.c b/src/mame/video/solomon.c
index 40246b0c364..a74d1e3a0e1 100644
--- a/src/mame/video/solomon.c
+++ b/src/mame/video/solomon.c
@@ -76,7 +76,7 @@ VIDEO_START( solomon )
tilemap_set_transparent_pen(state->m_fg_tilemap, 0);
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
solomon_state *state = machine.driver_data<solomon_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/sonson.c b/src/mame/video/sonson.c
index 80672ff0c68..58bd89a0d89 100644
--- a/src/mame/video/sonson.c
+++ b/src/mame/video/sonson.c
@@ -140,7 +140,7 @@ VIDEO_START( sonson )
tilemap_set_scroll_rows(state->m_bg_tilemap, 32);
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
sonson_state *state = machine.driver_data<sonson_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/spacefb.c b/src/mame/video/spacefb.c
index 8f4935c7668..d2bbf67d2f7 100644
--- a/src/mame/video/spacefb.c
+++ b/src/mame/video/spacefb.c
@@ -138,7 +138,7 @@ static void get_starfield_pens(spacefb_state *state, pen_t *pens)
}
-static void draw_starfield(screen_device &screen, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_starfield(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect)
{
spacefb_state *state = screen.machine().driver_data<spacefb_state>();
int y;
@@ -165,16 +165,16 @@ static void draw_starfield(screen_device &screen, bitmap_t *bitmap, const rectan
for (x = SPACEFB_HBEND; x < SPACEFB_HBSTART; x++)
{
- if (state->m_object_present_map[(y * bitmap->width()) + x] == 0)
+ if (state->m_object_present_map[(y * bitmap.width()) + x] == 0)
{
/* draw the star - the 4 possible values come from the effect of the two XOR gates */
if (((state->m_star_shift_reg & 0x1c0ff) == 0x0c0b7) ||
((state->m_star_shift_reg & 0x1c0ff) == 0x0c0d7) ||
((state->m_star_shift_reg & 0x1c0ff) == 0x0c0bb) ||
((state->m_star_shift_reg & 0x1c0ff) == 0x0c0db))
- bitmap->pix32(y, x) = pens[(state->m_star_shift_reg >> 8) & 0x3f];
+ bitmap.pix32(y, x) = pens[(state->m_star_shift_reg >> 8) & 0x3f];
else
- bitmap->pix32(y, x) = pens[0];
+ bitmap.pix32(y, x) = pens[0];
}
shift_star_generator(state);
@@ -248,7 +248,7 @@ static void get_sprite_pens(running_machine &machine, pen_t *pens)
}
-static void draw_bullet(running_machine &machine, offs_t offs, pen_t pen, bitmap_t *bitmap, const rectangle &cliprect, int flip)
+static void draw_bullet(running_machine &machine, offs_t offs, pen_t pen, bitmap_t &bitmap, const rectangle &cliprect, int flip)
{
spacefb_state *state = machine.driver_data<spacefb_state>();
UINT8 sy;
@@ -283,11 +283,11 @@ static void draw_bullet(running_machine &machine, offs_t offs, pen_t pen, bitmap
else
dx = x * 2;
- bitmap->pix32(dy, dx + 0) = pen;
- bitmap->pix32(dy, dx + 1) = pen;
+ bitmap.pix32(dy, dx + 0) = pen;
+ bitmap.pix32(dy, dx + 1) = pen;
- state->m_object_present_map[(dy * bitmap->width()) + dx + 0] = 1;
- state->m_object_present_map[(dy * bitmap->width()) + dx + 1] = 1;
+ state->m_object_present_map[(dy * bitmap.width()) + dx + 0] = 1;
+ state->m_object_present_map[(dy * bitmap.width()) + dx + 1] = 1;
}
x = x + 1;
@@ -300,7 +300,7 @@ static void draw_bullet(running_machine &machine, offs_t offs, pen_t pen, bitmap
}
-static void draw_sprite(running_machine &machine, offs_t offs, pen_t *pens, bitmap_t *bitmap, const rectangle &cliprect, int flip)
+static void draw_sprite(running_machine &machine, offs_t offs, pen_t *pens, bitmap_t &bitmap, const rectangle &cliprect, int flip)
{
spacefb_state *state = machine.driver_data<spacefb_state>();
UINT8 sy;
@@ -341,11 +341,11 @@ static void draw_sprite(running_machine &machine, offs_t offs, pen_t *pens, bitm
data = ((data1 << 1) & 0x02) | (data2 & 0x01);
pen = pens[color_base | data];
- bitmap->pix32(dy, dx + 0) = pen;
- bitmap->pix32(dy, dx + 1) = pen;
+ bitmap.pix32(dy, dx + 0) = pen;
+ bitmap.pix32(dy, dx + 1) = pen;
- state->m_object_present_map[(dy * bitmap->width()) + dx + 0] = (data != 0);
- state->m_object_present_map[(dy * bitmap->width()) + dx + 1] = (data != 0);
+ state->m_object_present_map[(dy * bitmap.width()) + dx + 0] = (data != 0);
+ state->m_object_present_map[(dy * bitmap.width()) + dx + 1] = (data != 0);
x = x + 1;
data1 = data1 >> 1;
@@ -358,7 +358,7 @@ static void draw_sprite(running_machine &machine, offs_t offs, pen_t *pens, bitm
}
-static void draw_objects(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_objects(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
spacefb_state *state = machine.driver_data<spacefb_state>();
pen_t sprite_pens[NUM_SPRITE_PENS];
@@ -372,7 +372,7 @@ static void draw_objects(running_machine &machine, bitmap_t *bitmap, const recta
get_sprite_pens(machine, sprite_pens);
- memset(state->m_object_present_map, 0, bitmap->width() * bitmap->height());
+ memset(state->m_object_present_map, 0, bitmap.width() * bitmap.height());
while (1)
{
diff --git a/src/mame/video/spbactn.c b/src/mame/video/spbactn.c
index c935cf1f889..d21951e3e24 100644
--- a/src/mame/video/spbactn.c
+++ b/src/mame/video/spbactn.c
@@ -6,7 +6,7 @@
static void blendbitmaps(running_machine &machine,
- bitmap_t *dest,bitmap_t *src1,bitmap_t *src2,
+ bitmap_t &dest,bitmap_t &src1,bitmap_t &src2,
const rectangle &cliprect)
{
int y,x;
@@ -14,9 +14,9 @@ static void blendbitmaps(running_machine &machine,
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
- UINT32 *dd = &dest->pix32(y);
- UINT16 *sd1 = &src1->pix16(y);
- UINT16 *sd2 = &src2->pix16(y);
+ UINT32 *dd = &dest.pix32(y);
+ UINT16 *sd1 = &src1.pix16(y);
+ UINT16 *sd2 = &src2.pix16(y);
for (x = cliprect.min_x; x <= cliprect.max_x; x++)
{
@@ -35,7 +35,7 @@ static void blendbitmaps(running_machine &machine,
/* from gals pinball (which was in turn from ninja gaiden) */
-static int draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int priority)
+static int draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int priority)
{
static const UINT8 layout[8][8] =
{
@@ -135,7 +135,7 @@ SCREEN_UPDATE( spbactn )
color = ((attr & 0x00f0) >> 4) | 0x80;
- drawgfx_transpen_raw(state->m_tile_bitmap_bg, cliprect, screen.machine().gfx[1],
+ drawgfx_transpen_raw(*state->m_tile_bitmap_bg, cliprect, screen.machine().gfx[1],
code,
screen.machine().gfx[1]->color_base + color * screen.machine().gfx[1]->color_granularity,
0, 0,
@@ -150,7 +150,7 @@ SCREEN_UPDATE( spbactn )
}
}
- if (draw_sprites(screen.machine(), state->m_tile_bitmap_bg, cliprect, 0))
+ if (draw_sprites(screen.machine(), *state->m_tile_bitmap_bg, cliprect, 0))
{
/* kludge: draw table bg gfx again if priority 0 sprites are enabled */
for (sx = sy = offs = 0; offs < 0x4000 / 2; offs++)
@@ -162,7 +162,7 @@ SCREEN_UPDATE( spbactn )
color = ((attr & 0x00f0) >> 4) | 0x80;
- drawgfx_transpen_raw(state->m_tile_bitmap_bg, cliprect, screen.machine().gfx[1],
+ drawgfx_transpen_raw(*state->m_tile_bitmap_bg, cliprect, screen.machine().gfx[1],
code,
screen.machine().gfx[1]->color_base + color * screen.machine().gfx[1]->color_granularity,
0, 0,
@@ -178,7 +178,7 @@ SCREEN_UPDATE( spbactn )
}
}
- draw_sprites(screen.machine(), state->m_tile_bitmap_bg, cliprect, 1);
+ draw_sprites(screen.machine(), *state->m_tile_bitmap_bg, cliprect, 1);
/* draw table fg gfx */
for (sx = sy = offs = 0; offs < 0x4000 / 2; offs++)
@@ -196,7 +196,7 @@ SCREEN_UPDATE( spbactn )
else
color |= 0x0080;
- drawgfx_transpen_raw(state->m_tile_bitmap_fg, cliprect, screen.machine().gfx[0],
+ drawgfx_transpen_raw(*state->m_tile_bitmap_fg, cliprect, screen.machine().gfx[0],
code,
screen.machine().gfx[0]->color_base + color * screen.machine().gfx[0]->color_granularity,
0, 0,
@@ -211,10 +211,10 @@ SCREEN_UPDATE( spbactn )
}
}
- draw_sprites(screen.machine(), state->m_tile_bitmap_fg, cliprect, 2);
- draw_sprites(screen.machine(), state->m_tile_bitmap_fg, cliprect, 3);
+ draw_sprites(screen.machine(), *state->m_tile_bitmap_fg, cliprect, 2);
+ draw_sprites(screen.machine(), *state->m_tile_bitmap_fg, cliprect, 3);
/* mix & blend the tilemaps and sprites into a 32-bit bitmap */
- blendbitmaps(screen.machine(), bitmap, state->m_tile_bitmap_bg, state->m_tile_bitmap_fg, cliprect);
+ blendbitmaps(screen.machine(), bitmap, *state->m_tile_bitmap_bg, *state->m_tile_bitmap_fg, cliprect);
return 0;
}
diff --git a/src/mame/video/spcforce.c b/src/mame/video/spcforce.c
index adcbf0b7187..63c4183641f 100644
--- a/src/mame/video/spcforce.c
+++ b/src/mame/video/spcforce.c
@@ -23,7 +23,7 @@ SCREEN_UPDATE( spcforce )
int flip = flip_screen_get(screen.machine());
/* draw the characters as sprites because they could be overlapping */
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
for (offs = 0; offs < 0x400; offs++)
{
int code,sx,sy,col;
diff --git a/src/mame/video/spdodgeb.c b/src/mame/video/spdodgeb.c
index cbfbefb53f1..9127a5f5d1c 100644
--- a/src/mame/video/spdodgeb.c
+++ b/src/mame/video/spdodgeb.c
@@ -150,7 +150,7 @@ WRITE8_HANDLER( spdodgeb_videoram_w )
cliprect,gfx, \
(which+order),color+ 8 * state->m_sprite_palbank,flipx,flipy,sx,sy,0);
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
spdodgeb_state *state = machine.driver_data<spdodgeb_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/speedatk.c b/src/mame/video/speedatk.c
index 4f99e0b3c37..198224b2c4b 100644
--- a/src/mame/video/speedatk.c
+++ b/src/mame/video/speedatk.c
@@ -95,7 +95,7 @@ SCREEN_UPDATE( speedatk )
UINT16 tile;
UINT8 color, region;
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
count = (state->m_crtc_vreg[0x0c]<<8)|(state->m_crtc_vreg[0x0d] & 0xff);
diff --git a/src/mame/video/speedbal.c b/src/mame/video/speedbal.c
index ea1ad7c9ee3..846717eaeae 100644
--- a/src/mame/video/speedbal.c
+++ b/src/mame/video/speedbal.c
@@ -84,7 +84,7 @@ WRITE8_HANDLER( speedbal_background_videoram_w )
* *
*************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
speedbal_state *state = machine.driver_data<speedbal_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/speedspn.c b/src/mame/video/speedspn.c
index 564b60ff9b8..1d90b7500ce 100644
--- a/src/mame/video/speedspn.c
+++ b/src/mame/video/speedspn.c
@@ -59,7 +59,7 @@ WRITE8_HANDLER(speedspn_global_display_w)
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
speedspn_state *state = machine.driver_data<speedspn_state>();
const gfx_element *gfx = machine.gfx[1];
@@ -98,7 +98,7 @@ SCREEN_UPDATE(speedspn)
speedspn_state *state = screen.machine().driver_data<speedspn_state>();
if (state->m_display_disable)
{
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
return 0;
}
diff --git a/src/mame/video/splash.c b/src/mame/video/splash.c
index 3fd476a420b..4922985d5e4 100644
--- a/src/mame/video/splash.c
+++ b/src/mame/video/splash.c
@@ -80,7 +80,7 @@ WRITE16_HANDLER( splash_vram_w )
tilemap_mark_tile_dirty(state->m_bg_tilemap[offset >> 11],((offset << 1) & 0x0fff) >> 1);
}
-static void draw_bitmap(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_bitmap(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
splash_state *state = machine.driver_data<splash_state>();
int sx,sy,color,count,colxor,bitswap;
@@ -157,7 +157,7 @@ static void draw_bitmap(running_machine &machine, bitmap_t *bitmap, const rectan
}
if (sy >= cliprect.min_y && sy <= cliprect.max_y && sx-9 >= cliprect.min_x && sx-9 <= cliprect.max_x)
- bitmap->pix16(sy, sx-9) = 0x300+(color^colxor);
+ bitmap.pix16(sy, sx-9) = 0x300+(color^colxor);
}
}
@@ -210,7 +210,7 @@ VIDEO_START( splash )
400| xxxxxxxx -------- | unused
*/
-static void splash_draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void splash_draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect)
{
splash_state *state = machine.driver_data<splash_state>();
int i;
@@ -231,7 +231,7 @@ static void splash_draw_sprites(running_machine &machine, bitmap_t *bitmap,const
}
}
-static void funystrp_draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void funystrp_draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect)
{
splash_state *state = machine.driver_data<splash_state>();
int i;
diff --git a/src/mame/video/sprcros2.c b/src/mame/video/sprcros2.c
index d21f554d67e..3718f36aa3d 100644
--- a/src/mame/video/sprcros2.c
+++ b/src/mame/video/sprcros2.c
@@ -146,7 +146,7 @@ VIDEO_START( sprcros2 )
colortable_configure_tilemap_groups(machine.colortable, state->m_fgtilemap, machine.gfx[2], 0);
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect)
{
sprcros2_state *state = machine.driver_data<sprcros2_state>();
int offs,sx,sy,color,flipx,flipy;
diff --git a/src/mame/video/sprint2.c b/src/mame/video/sprint2.c
index b9e4c1532b2..5840220e12b 100644
--- a/src/mame/video/sprint2.c
+++ b/src/mame/video/sprint2.c
@@ -180,9 +180,9 @@ SCREEN_EOF( sprint2 )
/* check for sprite-tilemap collisions */
- tilemap_draw(state->m_helper, rect, state->m_bg_tilemap, 0, 0);
+ tilemap_draw(*state->m_helper, rect, state->m_bg_tilemap, 0, 0);
- drawgfx_transpen(state->m_helper, rect, screen.machine().gfx[1],
+ drawgfx_transpen(*state->m_helper, rect, screen.machine().gfx[1],
get_sprite_code(video_ram, i),
0,
0, 0,
@@ -196,7 +196,7 @@ SCREEN_EOF( sprint2 )
for (j = 0; j < 4; j++)
if (j != i)
{
- drawgfx_transpen(state->m_helper, rect, screen.machine().gfx[1],
+ drawgfx_transpen(*state->m_helper, rect, screen.machine().gfx[1],
get_sprite_code(video_ram, j),
1,
0, 0,
@@ -204,7 +204,7 @@ SCREEN_EOF( sprint2 )
get_sprite_y(video_ram, j), 0);
}
- drawgfx_transpen(state->m_helper, rect, screen.machine().gfx[1],
+ drawgfx_transpen(*state->m_helper, rect, screen.machine().gfx[1],
get_sprite_code(video_ram, i),
0,
0, 0,
diff --git a/src/mame/video/sprint4.c b/src/mame/video/sprint4.c
index 3c5aff704cd..27d5df1b393 100644
--- a/src/mame/video/sprint4.c
+++ b/src/mame/video/sprint4.c
@@ -118,12 +118,12 @@ SCREEN_EOF( sprint4 )
rect &= screen.machine().primary_screen->visible_area();
- tilemap_draw(state->m_helper, rect, state->m_playfield, 0, 0);
+ tilemap_draw(*state->m_helper, rect, state->m_playfield, 0, 0);
if (i & 1)
bank = 32;
- drawgfx_transpen(state->m_helper, rect, screen.machine().gfx[1],
+ drawgfx_transpen(*state->m_helper, rect, screen.machine().gfx[1],
(code >> 3) | bank,
4,
0, 0,
diff --git a/src/mame/video/sprint8.c b/src/mame/video/sprint8.c
index ad0f4b95b6c..22f4555f0b3 100644
--- a/src/mame/video/sprint8.c
+++ b/src/mame/video/sprint8.c
@@ -128,7 +128,7 @@ VIDEO_START( sprint8 )
}
-static void draw_sprites(running_machine &machine, bitmap_t* bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
sprint8_state *state = machine.driver_data<sprint8_state>();
int i;
@@ -175,11 +175,11 @@ SCREEN_EOF( sprint8 )
int y;
const rectangle &visarea = screen.machine().primary_screen->visible_area();
- tilemap_draw(state->m_helper2, visarea, state->m_tilemap2, 0, 0);
+ tilemap_draw(*state->m_helper2, visarea, state->m_tilemap2, 0, 0);
state->m_helper1->fill(0x20, visarea);
- draw_sprites(screen.machine(), state->m_helper1, visarea);
+ draw_sprites(screen.machine(), *state->m_helper1, visarea);
for (y = visarea.min_y; y <= visarea.max_y; y++)
{
diff --git a/src/mame/video/spy.c b/src/mame/video/spy.c
index d31533429ee..c8de687cdd1 100644
--- a/src/mame/video/spy.c
+++ b/src/mame/video/spy.c
@@ -68,10 +68,10 @@ SCREEN_UPDATE( spy )
k052109_tilemap_update(state->m_k052109);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
if (!state->m_video_enable)
- bitmap->fill(16 * state->m_layer_colorbase[0], cliprect);
+ bitmap.fill(16 * state->m_layer_colorbase[0], cliprect);
else
{
k052109_tilemap_draw(state->m_k052109, bitmap, cliprect, 1, TILEMAP_DRAW_OPAQUE, 1);
diff --git a/src/mame/video/srmp2.c b/src/mame/video/srmp2.c
index 628808bdb12..25ee5326b7f 100644
--- a/src/mame/video/srmp2.c
+++ b/src/mame/video/srmp2.c
@@ -53,7 +53,7 @@ int srmp3_gfxbank_callback( running_machine &machine, UINT16 code, UINT8 color )
SCREEN_UPDATE( srmp2 )
{
srmp2_state *state = screen.machine().driver_data<srmp2_state>();
- bitmap->fill(0x1ff, cliprect);
+ bitmap.fill(0x1ff, cliprect);
screen.machine().device<seta001_device>("spritegen")->set_transpen(15);
@@ -71,7 +71,7 @@ SCREEN_UPDATE( srmp2 )
SCREEN_UPDATE( srmp3 )
{
//srmp2_state *state = screen.machine().driver_data<srmp2_state>();
- bitmap->fill(0x1f0, cliprect);
+ bitmap.fill(0x1f0, cliprect);
screen.machine().device<seta001_device>("spritegen")->set_fg_xoffsets( 0x10, 0x10 );
screen.machine().device<seta001_device>("spritegen")->set_fg_yoffsets( 0x06, 0x06 );
@@ -87,7 +87,7 @@ SCREEN_UPDATE( srmp3 )
SCREEN_UPDATE( mjyuugi )
{
//srmp2_state *state = screen.machine().driver_data<srmp2_state>();
- bitmap->fill(0x1f0, cliprect);
+ bitmap.fill(0x1f0, cliprect);
screen.machine().device<seta001_device>("spritegen")->set_fg_xoffsets( 0x10, 0x10 );
screen.machine().device<seta001_device>("spritegen")->set_fg_yoffsets( 0x06, 0x06 );
diff --git a/src/mame/video/srumbler.c b/src/mame/video/srumbler.c
index 2fb94161661..547a9be1a8a 100644
--- a/src/mame/video/srumbler.c
+++ b/src/mame/video/srumbler.c
@@ -113,7 +113,7 @@ WRITE8_HANDLER( srumbler_scroll_w )
***************************************************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
UINT8 *buffered_spriteram = machine.generic.buffered_spriteram.u8;
int offs;
diff --git a/src/mame/video/sshangha.c b/src/mame/video/sshangha.c
index 1954211566a..0a5c251da4e 100644
--- a/src/mame/video/sshangha.c
+++ b/src/mame/video/sshangha.c
@@ -41,7 +41,7 @@ SCREEN_UPDATE( sshangha )
tilemap_set_flip_all(screen.machine(),flip_screen_x_get(screen.machine()) ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0);
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
deco16ic_pf_update(state->m_deco_tilegen1, state->m_pf1_rowscroll, state->m_pf2_rowscroll);
diff --git a/src/mame/video/sslam.c b/src/mame/video/sslam.c
index dd5936713ef..20b05ecbe6e 100644
--- a/src/mame/video/sslam.c
+++ b/src/mame/video/sslam.c
@@ -22,7 +22,7 @@ WRITE16_HANDLER( sslam_paletteram_w )
palette_set_color_rgb(space->machine(), offset, pal5bit(r), pal5bit(g), pal5bit(b));
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
sslam_state *state = machine.driver_data<sslam_state>();
const gfx_element *gfx = machine.gfx[0];
@@ -197,7 +197,7 @@ SCREEN_UPDATE(sslam)
if (!(state->m_regs[6] & 1))
{
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
return 0;
}
@@ -237,7 +237,7 @@ SCREEN_UPDATE(powerbls)
if (!(state->m_regs[6] & 1))
{
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
return 0;
}
diff --git a/src/mame/video/ssozumo.c b/src/mame/video/ssozumo.c
index e814430a3ad..5975b864152 100644
--- a/src/mame/video/ssozumo.c
+++ b/src/mame/video/ssozumo.c
@@ -150,7 +150,7 @@ VIDEO_START( ssozumo )
tilemap_set_transparent_pen(state->m_fg_tilemap, 0);
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
ssozumo_state *state = machine.driver_data<ssozumo_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/sspeedr.c b/src/mame/video/sspeedr.c
index 15884a7b06e..43b241fe390 100644
--- a/src/mame/video/sspeedr.c
+++ b/src/mame/video/sspeedr.c
@@ -92,7 +92,7 @@ WRITE8_HANDLER( sspeedr_track_ice_w )
}
-static void draw_track(running_machine &machine, bitmap_t* bitmap)
+static void draw_track(running_machine &machine, bitmap_t &bitmap)
{
sspeedr_state *state = machine.driver_data<sspeedr_state>();
const UINT8* p = machine.region("gfx3")->base();
@@ -142,11 +142,11 @@ static void draw_track(running_machine &machine, bitmap_t* bitmap)
if (counter_x & 2)
{
- bitmap->pix16(y, x) = p[offset] / 16;
+ bitmap.pix16(y, x) = p[offset] / 16;
}
else
{
- bitmap->pix16(y, x) = p[offset] % 16;
+ bitmap.pix16(y, x) = p[offset] % 16;
}
}
@@ -154,7 +154,7 @@ static void draw_track(running_machine &machine, bitmap_t* bitmap)
for (; y < 128 + state->m_track_vert[1]; y++)
{
- bitmap->pix16(y, x) = flag ? 15 : 0;
+ bitmap.pix16(y, x) = flag ? 15 : 0;
}
/* lower landscape */
@@ -170,18 +170,18 @@ static void draw_track(running_machine &machine, bitmap_t* bitmap)
if (counter_x & 2)
{
- bitmap->pix16(y, x) = p[offset] / 16;
+ bitmap.pix16(y, x) = p[offset] / 16;
}
else
{
- bitmap->pix16(y, x) = p[offset] % 16;
+ bitmap.pix16(y, x) = p[offset] % 16;
}
}
}
}
-static void draw_drones(running_machine &machine, bitmap_t* bitmap, const rectangle &cliprect)
+static void draw_drones(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
sspeedr_state *state = machine.driver_data<sspeedr_state>();
static const UINT8 code[6] =
@@ -221,7 +221,7 @@ static void draw_drones(running_machine &machine, bitmap_t* bitmap, const rectan
}
-static void draw_driver(running_machine &machine, bitmap_t* bitmap, const rectangle &cliprect)
+static void draw_driver(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
sspeedr_state *state = machine.driver_data<sspeedr_state>();
int x;
diff --git a/src/mame/video/ssrj.c b/src/mame/video/ssrj.c
index 45cc356f948..509eb103372 100644
--- a/src/mame/video/ssrj.c
+++ b/src/mame/video/ssrj.c
@@ -236,7 +236,7 @@ VIDEO_START( ssrj )
}
-static void draw_objects(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_objects(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
ssrj_state *state = machine.driver_data<ssrj_state>();
int i,j,k,x,y;
diff --git a/src/mame/video/ssv.c b/src/mame/video/ssv.c
index 82ceb1e6bab..2fc13c795d4 100644
--- a/src/mame/video/ssv.c
+++ b/src/mame/video/ssv.c
@@ -141,7 +141,7 @@ Note: press Z to show some info on each sprite (debug builds only)
#endif
-static void ssv_drawgfx( bitmap_t *bitmap, const rectangle &cliprect, const gfx_element *gfx,
+static void ssv_drawgfx( bitmap_t &bitmap, const rectangle &cliprect, const gfx_element *gfx,
UINT32 code,UINT32 color,int flipx,int flipy,int x0,int y0,
int shadow )
{
@@ -167,7 +167,7 @@ static void ssv_drawgfx( bitmap_t *bitmap, const rectangle &cliprect, const gfx_
if ( sy >= cliprect.min_y && sy <= cliprect.max_y ) \
{ \
source = addr; \
- dest = &bitmap->pix16(sy); \
+ dest = &bitmap.pix16(sy); \
\
for ( sx = x0; sx != x1; sx += dx ) \
{ \
@@ -606,7 +606,7 @@ From the above some noteworthy cases are:
/* Draw a tilemap sprite */
-static void draw_row(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int sx, int sy, int scroll)
+static void draw_row(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int sx, int sy, int scroll)
{
ssv_state *state = machine.driver_data<ssv_state>();
UINT16 *spriteram16 = state->m_spriteram;
@@ -741,7 +741,7 @@ static void draw_row(running_machine &machine, bitmap_t *bitmap, const rectangle
/* Draw the "background layer" using multiple tilemap sprites */
-static void draw_layer(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int nr)
+static void draw_layer(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int nr)
{
int sy;
for ( sy = 0; sy <= machine.primary_screen->visible_area().max_y; sy += 0x40 )
@@ -750,7 +750,7 @@ static void draw_layer(running_machine &machine, bitmap_t *bitmap, const rectang
/* Draw sprites in the sprites list */
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
/* Sprites list */
ssv_state *state = machine.driver_data<ssv_state>();
@@ -1042,7 +1042,7 @@ SCREEN_UPDATE( eaglshot )
E.h Unused
*/
-static void gdfs_draw_zooming_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int priority)
+static void gdfs_draw_zooming_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int priority)
{
/* Sprites list */
@@ -1209,7 +1209,7 @@ SCREEN_UPDATE( ssv )
state->m_shadow_pen_mask = (1 << state->m_shadow_pen_shift) - 1;
/* The background color is the first one in the palette */
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
// used by twineag2 and ultrax
clip.min_x = (cliprect.max_x / 2 + state->m_scroll[0x62/2]) * 2 - state->m_scroll[0x64/2] * 2 + 2;
diff --git a/src/mame/video/st0016.c b/src/mame/video/st0016.c
index e2ec5dced66..c6dcb6f705e 100644
--- a/src/mame/video/st0016.c
+++ b/src/mame/video/st0016.c
@@ -212,7 +212,7 @@ WRITE8_HANDLER(st0016_vregs_w)
}
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
/*
object ram :
@@ -367,7 +367,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const recta
UINT16 drawypos;
if (!flipy) {drawypos = ypos+yloop;} else {drawypos = (ypos+8-1)-yloop;}
- destline = &bitmap->pix16(drawypos);
+ destline = &bitmap.pix16(drawypos);
for (xloop=0; xloop<8; xloop++)
{
@@ -488,7 +488,7 @@ VIDEO_START( st0016 )
}
-static void draw_bgmap(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect, int priority)
+static void draw_bgmap(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect, int priority)
{
gfx_element *gfx = machine.gfx[st0016_ramgfx];
int j;
@@ -533,7 +533,7 @@ static void draw_bgmap(running_machine &machine, bitmap_t *bitmap,const rectangl
UINT16 drawypos;
if (!flipy) {drawypos = ypos+yloop;} else {drawypos = (ypos+8-1)-yloop;}
- destline = &bitmap->pix16(drawypos);
+ destline = &bitmap.pix16(drawypos);
for (xloop=0; xloop<8; xloop++)
{
@@ -584,7 +584,7 @@ static void draw_bgmap(running_machine &machine, bitmap_t *bitmap,const rectangl
}
-void st0016_draw_screen(screen_device &screen, bitmap_t *bitmap, const rectangle &cliprect)
+void st0016_draw_screen(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect)
{
draw_bgmap(screen.machine(), bitmap,cliprect,0);
draw_sprites(screen.machine(), bitmap,cliprect);
@@ -616,7 +616,7 @@ SCREEN_UPDATE( st0016 )
}
#endif
- bitmap->fill(UNUSED_PEN, cliprect);
+ bitmap.fill(UNUSED_PEN, cliprect);
st0016_draw_screen(screen, bitmap, cliprect);
return 0;
}
diff --git a/src/mame/video/stactics.c b/src/mame/video/stactics.c
index 218a6b2314e..ad0f134bb29 100644
--- a/src/mame/video/stactics.c
+++ b/src/mame/video/stactics.c
@@ -236,11 +236,11 @@ INLINE int get_pixel_on_plane(UINT8 *videoram, UINT8 y, UINT8 x, UINT8 y_scroll)
}
-static void draw_background(stactics_state *state, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_background(stactics_state *state, bitmap_t &bitmap, const rectangle &cliprect)
{
int y;
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
/* for every row */
for (y = 0; y < 0x100; y++)
@@ -275,7 +275,7 @@ static void draw_background(stactics_state *state, bitmap_t *bitmap, const recta
/* plot if visible */
if ((sy >= 0) && (sy < 0x100) && (sx >= 0) && (sx < 0x100))
- bitmap->pix16(sy, sx) = pen;
+ bitmap.pix16(sy, sx) = pen;
}
}
}
diff --git a/src/mame/video/starcrus.c b/src/mame/video/starcrus.c
index a2060e74136..3732b048a51 100644
--- a/src/mame/video/starcrus.c
+++ b/src/mame/video/starcrus.c
@@ -183,7 +183,7 @@ static int collision_check_s1s2(running_machine &machine)
org_y = state->m_s1_y;
/* Draw ship 1 */
- drawgfx_opaque(state->m_ship1_vid,
+ drawgfx_opaque(*state->m_ship1_vid,
clip,
machine.gfx[8+((state->m_s1_sprite&0x04)>>2)],
(state->m_s1_sprite&0x03)^0x03,
@@ -192,7 +192,7 @@ static int collision_check_s1s2(running_machine &machine)
state->m_s1_x-org_x, state->m_s1_y-org_y);
/* Draw ship 2 */
- drawgfx_opaque(state->m_ship2_vid,
+ drawgfx_opaque(*state->m_ship2_vid,
clip,
machine.gfx[10+((state->m_s2_sprite&0x04)>>2)],
(state->m_s2_sprite&0x03)^0x03,
@@ -240,7 +240,7 @@ static int collision_check_p1p2(running_machine &machine)
if (state->m_p1_sprite & 0x08) /* if p1 is a projectile */
{
/* Draw score/projectile 1 */
- drawgfx_opaque(state->m_proj1_vid,
+ drawgfx_opaque(*state->m_proj1_vid,
clip,
machine.gfx[(state->m_p1_sprite&0x0c)>>2],
(state->m_p1_sprite&0x03)^0x03,
@@ -252,7 +252,7 @@ static int collision_check_p1p2(running_machine &machine)
if (state->m_p2_sprite & 0x08) /* if p2 is a projectile */
{
/* Draw score/projectile 2 */
- drawgfx_opaque(state->m_proj2_vid,
+ drawgfx_opaque(*state->m_proj2_vid,
clip,
machine.gfx[4+((state->m_p2_sprite&0x0c)>>2)],
(state->m_p2_sprite&0x03)^0x03,
@@ -300,7 +300,7 @@ static int collision_check_s1p1p2(running_machine &machine)
org_y = state->m_s1_y;
/* Draw ship 1 */
- drawgfx_opaque(state->m_ship1_vid,
+ drawgfx_opaque(*state->m_ship1_vid,
clip,
machine.gfx[8+((state->m_s1_sprite&0x04)>>2)],
(state->m_s1_sprite&0x03)^0x03,
@@ -311,7 +311,7 @@ static int collision_check_s1p1p2(running_machine &machine)
if (state->m_p1_sprite & 0x08) /* if p1 is a projectile */
{
/* Draw projectile 1 */
- drawgfx_opaque(state->m_proj1_vid,
+ drawgfx_opaque(*state->m_proj1_vid,
clip,
machine.gfx[(state->m_p1_sprite&0x0c)>>2],
(state->m_p1_sprite&0x03)^0x03,
@@ -323,7 +323,7 @@ static int collision_check_s1p1p2(running_machine &machine)
if (state->m_p2_sprite & 0x08) /* if p2 is a projectile */
{
/* Draw projectile 2 */
- drawgfx_opaque(state->m_proj2_vid,
+ drawgfx_opaque(*state->m_proj2_vid,
clip,
machine.gfx[4+((state->m_p2_sprite&0x0c)>>2)],
(state->m_p2_sprite&0x03)^0x03,
@@ -377,7 +377,7 @@ static int collision_check_s2p1p2(running_machine &machine)
org_y = state->m_s2_y;
/* Draw ship 2 */
- drawgfx_opaque(state->m_ship2_vid,
+ drawgfx_opaque(*state->m_ship2_vid,
clip,
machine.gfx[10+((state->m_s2_sprite&0x04)>>2)],
(state->m_s2_sprite&0x03)^0x03,
@@ -388,7 +388,7 @@ static int collision_check_s2p1p2(running_machine &machine)
if (state->m_p1_sprite & 0x08) /* if p1 is a projectile */
{
/* Draw projectile 1 */
- drawgfx_opaque(state->m_proj1_vid,
+ drawgfx_opaque(*state->m_proj1_vid,
clip,
machine.gfx[(state->m_p1_sprite&0x0c)>>2],
(state->m_p1_sprite&0x03)^0x03,
@@ -400,7 +400,7 @@ static int collision_check_s2p1p2(running_machine &machine)
if (state->m_p2_sprite & 0x08) /* if p2 is a projectile */
{
/* Draw projectile 2 */
- drawgfx_opaque(state->m_proj2_vid,
+ drawgfx_opaque(*state->m_proj2_vid,
clip,
machine.gfx[4+((state->m_p2_sprite&0x0c)>>2)],
(state->m_p2_sprite&0x03)^0x03,
@@ -429,7 +429,7 @@ SCREEN_UPDATE( starcrus )
{
starcrus_state *state = screen.machine().driver_data<starcrus_state>();
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
/* Draw ship 1 */
drawgfx_transpen(bitmap,
diff --git a/src/mame/video/starfire.c b/src/mame/video/starfire.c
index 7179c467a9f..a67a78eee4a 100644
--- a/src/mame/video/starfire.c
+++ b/src/mame/video/starfire.c
@@ -271,7 +271,7 @@ static TIMER_CALLBACK( starfire_scanline_callback )
SCREEN_UPDATE( starfire )
{
starfire_state *state = screen.machine().driver_data<starfire_state>();
- copybitmap(bitmap, state->m_starfire_screen, 0, 0, 0, 0, cliprect);
+ copybitmap(bitmap, *state->m_starfire_screen, 0, 0, 0, 0, cliprect);
return 0;
}
diff --git a/src/mame/video/starshp1.c b/src/mame/video/starshp1.c
index c1746909fe2..d6f6f11f8a6 100644
--- a/src/mame/video/starshp1.c
+++ b/src/mame/video/starshp1.c
@@ -147,7 +147,7 @@ WRITE8_HANDLER( starshp1_playfield_w )
}
-static void draw_starfield(starshp1_state *state, bitmap_t* bitmap)
+static void draw_starfield(starshp1_state *state, bitmap_t &bitmap)
{
/*
* The LSFR is reset once per frame at the position of
@@ -158,13 +158,13 @@ static void draw_starfield(starshp1_state *state, bitmap_t* bitmap)
int x;
int y;
- for (y = 0; y < bitmap->height(); y++)
+ for (y = 0; y < bitmap.height(); y++)
{
const UINT16* p = state->m_LSFR + (UINT16) (512 * y);
- UINT16* pLine = &bitmap->pix16(y);
+ UINT16* pLine = &bitmap.pix16(y);
- for (x = 0; x < bitmap->width(); x++)
+ for (x = 0; x < bitmap.width(); x++)
if ((p[x] & 0x5b56) == 0x5b44)
pLine[x] = (p[x] & 0x0400) ? 0x0e : 0x0f;
}
@@ -181,7 +181,7 @@ static int get_sprite_vpos(starshp1_state *state, int i)
}
-static void draw_sprites(running_machine &machine, bitmap_t* bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
starshp1_state *state = machine.driver_data<starshp1_state>();
int i;
@@ -200,7 +200,7 @@ static void draw_sprites(running_machine &machine, bitmap_t* bitmap, const recta
}
-static void draw_spaceship(running_machine &machine, bitmap_t* bitmap, const rectangle &cliprect)
+static void draw_spaceship(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
starshp1_state *state = machine.driver_data<starshp1_state>();
double scaler = -5 * log(1 - state->m_ship_size / 256.0); /* ? */
@@ -226,17 +226,17 @@ static void draw_spaceship(running_machine &machine, bitmap_t* bitmap, const rec
}
-static void draw_phasor(starshp1_state *state, bitmap_t* bitmap)
+static void draw_phasor(starshp1_state *state, bitmap_t &bitmap)
{
int i;
for (i = 128; i < 240; i++)
if (i >= get_sprite_vpos(state, 13))
{
- bitmap->pix16(i, 2 * i + 0) = 0x10;
- bitmap->pix16(i, 2 * i + 1) = 0x10;
- bitmap->pix16(i, 2 * (255 - i) + 0) = 0x10;
- bitmap->pix16(i, 2 * (255 - i) + 1) = 0x10;
+ bitmap.pix16(i, 2 * i + 0) = 0x10;
+ bitmap.pix16(i, 2 * i + 1) = 0x10;
+ bitmap.pix16(i, 2 * (255 - i) + 0) = 0x10;
+ bitmap.pix16(i, 2 * (255 - i) + 1) = 0x10;
}
}
@@ -255,22 +255,22 @@ static int get_circle_vpos(starshp1_state *state)
}
-static void draw_circle_line(running_machine &machine, bitmap_t *bitmap, int x, int y, int l)
+static void draw_circle_line(running_machine &machine, bitmap_t &bitmap, int x, int y, int l)
{
starshp1_state *state = machine.driver_data<starshp1_state>();
- if (y >= 0 && y <= bitmap->height() - 1)
+ if (y >= 0 && y <= bitmap.height() - 1)
{
const UINT16* p = state->m_LSFR + (UINT16) (512 * y);
- UINT16* pLine = &bitmap->pix16(y);
+ UINT16* pLine = &bitmap.pix16(y);
int h1 = x - 2 * l;
int h2 = x + 2 * l;
if (h1 < 0)
h1 = 0;
- if (h2 > bitmap->width() - 1)
- h2 = bitmap->width() - 1;
+ if (h2 > bitmap.width() - 1)
+ h2 = bitmap.width() - 1;
for (x = h1; x <= h2; x++)
if (state->m_circle_mod)
@@ -284,7 +284,7 @@ static void draw_circle_line(running_machine &machine, bitmap_t *bitmap, int x,
}
-static void draw_circle(running_machine &machine, bitmap_t* bitmap)
+static void draw_circle(running_machine &machine, bitmap_t &bitmap)
{
starshp1_state *state = machine.driver_data<starshp1_state>();
int cx = get_circle_hpos(state);
@@ -314,7 +314,7 @@ static void draw_circle(running_machine &machine, bitmap_t* bitmap)
}
-static int spaceship_collision(running_machine &machine, bitmap_t *bitmap, const rectangle &rect)
+static int spaceship_collision(running_machine &machine, bitmap_t &bitmap, const rectangle &rect)
{
starshp1_state *state = machine.driver_data<starshp1_state>();
int x;
@@ -361,7 +361,7 @@ SCREEN_UPDATE( starshp1 )
starshp1_state *state = screen.machine().driver_data<starshp1_state>();
set_pens(state, screen.machine().colortable);
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
if (state->m_starfield_kill == 0)
draw_starfield(state, bitmap);
@@ -409,7 +409,7 @@ SCREEN_EOF( starshp1 )
state->m_helper->fill(0, visarea);
if (state->m_attract == 0)
- draw_spaceship(screen.machine(), state->m_helper, visarea);
+ draw_spaceship(screen.machine(), *state->m_helper, visarea);
if (circle_collision(state, visarea))
state->m_collision_latch |= 1;
@@ -417,9 +417,9 @@ SCREEN_EOF( starshp1 )
if (circle_collision(state, rect))
state->m_collision_latch |= 2;
- if (spaceship_collision(screen.machine(), state->m_helper, rect))
+ if (spaceship_collision(screen.machine(), *state->m_helper, rect))
state->m_collision_latch |= 4;
- if (spaceship_collision(screen.machine(), state->m_helper, visarea))
+ if (spaceship_collision(screen.machine(), *state->m_helper, visarea))
state->m_collision_latch |= 8;
}
diff --git a/src/mame/video/stfight.c b/src/mame/video/stfight.c
index 0655a516ecf..eaa33f8e2bf 100644
--- a/src/mame/video/stfight.c
+++ b/src/mame/video/stfight.c
@@ -244,7 +244,7 @@ WRITE8_HANDLER( stfight_vh_latch_w )
***************************************************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
stfight_state *state = machine.driver_data<stfight_state>();
int offs,sx,sy;
@@ -297,9 +297,9 @@ SCREEN_UPDATE( stfight )
stfight_state *state = screen.machine().driver_data<stfight_state>();
set_pens(screen.machine());
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
- bitmap->fill(0, cliprect); /* in case state->m_bg_tilemap is disabled */
+ bitmap.fill(0, cliprect); /* in case state->m_bg_tilemap is disabled */
tilemap_draw(bitmap,cliprect,state->m_bg_tilemap,0,0);
tilemap_draw(bitmap,cliprect,state->m_fg_tilemap,0,1);
diff --git a/src/mame/video/stlforce.c b/src/mame/video/stlforce.c
index eea08049e4c..23895a44a99 100644
--- a/src/mame/video/stlforce.c
+++ b/src/mame/video/stlforce.c
@@ -99,7 +99,7 @@ WRITE16_HANDLER( stlforce_tx_videoram_w )
/* sprites - quite a bit still needs doing .. */
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
stlforce_state *state = machine.driver_data<stlforce_state>();
const UINT16 *source = state->m_spriteram+0x0;
diff --git a/src/mame/video/strnskil.c b/src/mame/video/strnskil.c
index ca781ad809a..705f89449ef 100644
--- a/src/mame/video/strnskil.c
+++ b/src/mame/video/strnskil.c
@@ -81,7 +81,7 @@ VIDEO_START( strnskil )
tilemap_set_scroll_rows(state->m_bg_tilemap, 32);
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
strnskil_state *state = machine.driver_data<strnskil_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/stvvdp2.c b/src/mame/video/stvvdp2.c
index 41907a780d4..283f2413352 100644
--- a/src/mame/video/stvvdp2.c
+++ b/src/mame/video/stvvdp2.c
@@ -116,7 +116,7 @@ static void refresh_palette_data(running_machine &machine);
static int stv_vdp2_window_process(running_machine &machine,int x,int y);
static int stv_vdp2_apply_window_on_layer(running_machine &machine,rectangle &cliprect);
static void stv_vdp2_get_window0_coordinates(running_machine &machine,UINT16 *s_x, UINT16 *e_x, UINT16 *s_y, UINT16 *e_y);
-static void stv_vdp2_check_tilemap(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect);
+static void stv_vdp2_check_tilemap(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect);
enum
{
@@ -2447,7 +2447,7 @@ INLINE UINT16 stv_add_blend(UINT16 a, UINT16 b)
}
static void stv_vdp2_drawgfxzoom(
- bitmap_t *dest_bmp,const rectangle &clip,const gfx_element *gfx,
+ bitmap_t &dest_bmp,const rectangle &clip,const gfx_element *gfx,
UINT32 code,UINT32 color,int flipx,int flipy,int sx,int sy,
int transparency,int transparent_color,int scalex, int scaley,
int sprite_screen_width, int sprite_screen_height, int alpha)
@@ -2480,7 +2480,7 @@ static void stv_vdp2_drawgfxzoom(
/* KW 991012 -- Added code to force clip to bitmap boundary */
myclip = clip;
- myclip &= dest_bmp->cliprect();
+ myclip &= dest_bmp.cliprect();
if( gfx )
{
@@ -2560,7 +2560,7 @@ static void stv_vdp2_drawgfxzoom(
for( y=sy; y<ey; y++ )
{
const UINT8 *source = source_base + (y_index>>16) * gfx->line_modulo;
- UINT16 *dest = &dest_bmp->pix16(y);
+ UINT16 *dest = &dest_bmp.pix16(y);
int x, x_index = x_index_base;
for( x=sx; x<ex; x++ )
@@ -2577,7 +2577,7 @@ static void stv_vdp2_drawgfxzoom(
for( y=sy; y<ey; y++ )
{
const UINT8 *source = source_base + (y_index>>16) * gfx->line_modulo;
- UINT16 *dest = &dest_bmp->pix16(y);
+ UINT16 *dest = &dest_bmp.pix16(y);
int x, x_index = x_index_base;
for( x=sx; x<ex; x++ )
@@ -2599,7 +2599,7 @@ static void stv_vdp2_drawgfxzoom(
for( y=sy; y<ey; y++ )
{
const UINT8 *source = source_base + (y_index>>16) * gfx->line_modulo;
- UINT16 *dest = &dest_bmp->pix16(y);
+ UINT16 *dest = &dest_bmp.pix16(y);
int x, x_index = x_index_base;
for( x=sx; x<ex; x++ )
@@ -2617,7 +2617,7 @@ static void stv_vdp2_drawgfxzoom(
for( y=sy; y<ey; y++ )
{
const UINT8 *source = source_base + (y_index>>16) * gfx->line_modulo;
- UINT16 *dest = &dest_bmp->pix16(y);
+ UINT16 *dest = &dest_bmp.pix16(y);
int x, x_index = x_index_base;
for( x=sx; x<ex; x++ )
@@ -2638,7 +2638,7 @@ static void stv_vdp2_drawgfxzoom(
for( y=sy; y<ey; y++ )
{
const UINT8 *source = source_base + (y_index>>16) * gfx->line_modulo;
- UINT16 *dest = &dest_bmp->pix16(y);
+ UINT16 *dest = &dest_bmp.pix16(y);
int x, x_index = x_index_base;
for( x=sx; x<ex; x++ )
@@ -2660,7 +2660,7 @@ static void stv_vdp2_drawgfxzoom(
for( y=sy; y<ey; y++ )
{
const UINT8 *source = source_base + (y_index>>16) * gfx->line_modulo;
- UINT16 *dest = &dest_bmp->pix16(y);
+ UINT16 *dest = &dest_bmp.pix16(y);
int x, x_index = x_index_base;
for( x=sx; x<ex; x++ )
@@ -2678,7 +2678,7 @@ static void stv_vdp2_drawgfxzoom(
for( y=sy; y<ey; y++ )
{
const UINT8 *source = source_base + (y_index>>16) * gfx->line_modulo;
- UINT16 *dest = &dest_bmp->pix16(y);
+ UINT16 *dest = &dest_bmp.pix16(y);
int x, x_index = x_index_base;
for( x=sx; x<ex; x++ )
@@ -2760,7 +2760,7 @@ static void stv_vdp2_compute_color_offset_RGB555_UINT16(running_machine &machine
*rgb = (_r << 10) | (_g << 5) | _b;
}
-static void stv_vdp2_drawgfx_rgb555( bitmap_t *dest_bmp, const rectangle &clip, running_machine &machine, UINT32 code, int flipx, int flipy,
+static void stv_vdp2_drawgfx_rgb555( bitmap_t &dest_bmp, const rectangle &clip, running_machine &machine, UINT32 code, int flipx, int flipy,
int sx, int sy, int transparency, int alpha)
{
saturn_state *state = machine.driver_data<saturn_state>();
@@ -2774,7 +2774,7 @@ static void stv_vdp2_drawgfx_rgb555( bitmap_t *dest_bmp, const rectangle &clip,
/* KW 991012 -- Added code to force clip to bitmap boundary */
myclip = clip;
- myclip &= dest_bmp->cliprect();
+ myclip &= dest_bmp.cliprect();
{
int dx = stv2_current_tilemap.incx;
@@ -2837,7 +2837,7 @@ static void stv_vdp2_drawgfx_rgb555( bitmap_t *dest_bmp, const rectangle &clip,
for( y=sy; y<ey; y++ )
{
const UINT8 *source = gfxdata + (y_index>>16)*16;
- UINT16 *dest = &dest_bmp->pix16(y);
+ UINT16 *dest = &dest_bmp.pix16(y);
UINT16 data;
int x, x_index = x_index_base;
@@ -2873,7 +2873,7 @@ static void stv_vdp2_drawgfx_rgb555( bitmap_t *dest_bmp, const rectangle &clip,
}
-static void stv_vdp2_drawgfx_rgb888( bitmap_t *dest_bmp, const rectangle &clip, running_machine &machine, UINT32 code, int flipx, int flipy,
+static void stv_vdp2_drawgfx_rgb888( bitmap_t &dest_bmp, const rectangle &clip, running_machine &machine, UINT32 code, int flipx, int flipy,
int sx, int sy, int transparency, int alpha)
{
saturn_state *state = machine.driver_data<saturn_state>();
@@ -2887,7 +2887,7 @@ static void stv_vdp2_drawgfx_rgb888( bitmap_t *dest_bmp, const rectangle &clip,
/* KW 991012 -- Added code to force clip to bitmap boundary */
myclip = clip;
- myclip &= dest_bmp->cliprect();
+ myclip &= dest_bmp.cliprect();
{
int dx = stv2_current_tilemap.incx;
int dy = stv2_current_tilemap.incy;
@@ -2949,7 +2949,7 @@ static void stv_vdp2_drawgfx_rgb888( bitmap_t *dest_bmp, const rectangle &clip,
for( y=sy; y<ey; y++ )
{
const UINT8 *source = gfxdata + (y_index>>16)*32;
- UINT16 *dest = &dest_bmp->pix16(y);
+ UINT16 *dest = &dest_bmp.pix16(y);
UINT32 data;
int x, x_index = x_index_base;
@@ -2990,7 +2990,7 @@ static void stv_vdp2_drawgfx_rgb888( bitmap_t *dest_bmp, const rectangle &clip,
}
-static void stv_vdp2_draw_basic_bitmap(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void stv_vdp2_draw_basic_bitmap(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
saturn_state *state = machine.driver_data<saturn_state>();
@@ -3081,9 +3081,9 @@ static void stv_vdp2_draw_basic_bitmap(running_machine &machine, bitmap_t *bitma
if (((xcnt + 1) <= screen_x) && (ycnt <= screen_y))
{
if ( stv2_current_tilemap.colour_calculation_enabled == 0 )
- bitmap->pix16(ycnt, xcnt+1) = machine.pens[((gfxdata[0] & 0x0f) >> 0) | (stv2_current_tilemap.bitmap_palette_number * 0x100) | pal_color_offset];
+ bitmap.pix16(ycnt, xcnt+1) = machine.pens[((gfxdata[0] & 0x0f) >> 0) | (stv2_current_tilemap.bitmap_palette_number * 0x100) | pal_color_offset];
else
- bitmap->pix16(ycnt, xcnt+1) = alpha_blend_r16(bitmap->pix16(ycnt, xcnt+1), machine.pens[((gfxdata[0] & 0x0f) >> 0) | (stv2_current_tilemap.bitmap_palette_number * 0x100) | pal_color_offset], stv2_current_tilemap.alpha);
+ bitmap.pix16(ycnt, xcnt+1) = alpha_blend_r16(bitmap.pix16(ycnt, xcnt+1), machine.pens[((gfxdata[0] & 0x0f) >> 0) | (stv2_current_tilemap.bitmap_palette_number * 0x100) | pal_color_offset], stv2_current_tilemap.alpha);
}
}
}
@@ -3097,9 +3097,9 @@ static void stv_vdp2_draw_basic_bitmap(running_machine &machine, bitmap_t *bitma
if (((xcnt + 0) <= screen_x) && (ycnt <= screen_y))
{
if ( stv2_current_tilemap.colour_calculation_enabled == 0 )
- bitmap->pix16(ycnt, xcnt) = machine.pens[((gfxdata[0] & 0xf0) >> 4) | (stv2_current_tilemap.bitmap_palette_number * 0x100) | pal_color_offset];
+ bitmap.pix16(ycnt, xcnt) = machine.pens[((gfxdata[0] & 0xf0) >> 4) | (stv2_current_tilemap.bitmap_palette_number * 0x100) | pal_color_offset];
else
- bitmap->pix16(ycnt, xcnt) = alpha_blend_r16(bitmap->pix16(ycnt, xcnt), machine.pens[((gfxdata[0] & 0xf0) >> 4) | (stv2_current_tilemap.bitmap_palette_number * 0x100) | pal_color_offset], stv2_current_tilemap.alpha);
+ bitmap.pix16(ycnt, xcnt) = alpha_blend_r16(bitmap.pix16(ycnt, xcnt), machine.pens[((gfxdata[0] & 0xf0) >> 4) | (stv2_current_tilemap.bitmap_palette_number * 0x100) | pal_color_offset], stv2_current_tilemap.alpha);
}
}
}
@@ -3132,9 +3132,9 @@ static void stv_vdp2_draw_basic_bitmap(running_machine &machine, bitmap_t *bitma
if (((xcnt + 0) <= screen_x) && (ycnt <= screen_y))
{
if ( stv2_current_tilemap.colour_calculation_enabled == 0 )
- bitmap->pix16(ycnt, xcnt) = machine.pens[(gfxdata[xs] & 0xff) | (stv2_current_tilemap.bitmap_palette_number * 0x100) | pal_color_offset];
+ bitmap.pix16(ycnt, xcnt) = machine.pens[(gfxdata[xs] & 0xff) | (stv2_current_tilemap.bitmap_palette_number * 0x100) | pal_color_offset];
else
- bitmap->pix16(ycnt, xcnt) = alpha_blend_r16(bitmap->pix16(ycnt, xcnt), machine.pens[(gfxdata[xs] & 0xff) | (stv2_current_tilemap.bitmap_palette_number * 0x100) | pal_color_offset], stv2_current_tilemap.alpha);
+ bitmap.pix16(ycnt, xcnt) = alpha_blend_r16(bitmap.pix16(ycnt, xcnt), machine.pens[(gfxdata[xs] & 0xff) | (stv2_current_tilemap.bitmap_palette_number * 0x100) | pal_color_offset], stv2_current_tilemap.alpha);
}
}
}
@@ -3163,7 +3163,7 @@ static void stv_vdp2_draw_basic_bitmap(running_machine &machine, bitmap_t *bitma
gfxdata += xlinesize*(yy>>16);
yy &= 0xffff;
- destline = &bitmap->pix16(ycnt);
+ destline = &bitmap.pix16(ycnt);
xx = 0;
for (xcnt = cliprect.min_x; xcnt <= cliprect.max_x; xx+=stv2_current_tilemap.incx, xcnt++)
{
@@ -3178,9 +3178,9 @@ static void stv_vdp2_draw_basic_bitmap(running_machine &machine, bitmap_t *bitma
if (((xcnt + 0) <= screen_x) && (ycnt <= screen_y))
{
if ( stv2_current_tilemap.colour_calculation_enabled == 0 )
- bitmap->pix16(ycnt, xcnt) = machine.pens[(gfxdata[xs] & 0xff) | (stv2_current_tilemap.bitmap_palette_number * 0x100) | pal_color_offset];
+ bitmap.pix16(ycnt, xcnt) = machine.pens[(gfxdata[xs] & 0xff) | (stv2_current_tilemap.bitmap_palette_number * 0x100) | pal_color_offset];
else
- bitmap->pix16(ycnt, xcnt) = alpha_blend_r16(bitmap->pix16(ycnt, xcnt), machine.pens[(gfxdata[xs] & 0xff) | (stv2_current_tilemap.bitmap_palette_number * 0x100) | pal_color_offset], stv2_current_tilemap.alpha);
+ bitmap.pix16(ycnt, xcnt) = alpha_blend_r16(bitmap.pix16(ycnt, xcnt), machine.pens[(gfxdata[xs] & 0xff) | (stv2_current_tilemap.bitmap_palette_number * 0x100) | pal_color_offset], stv2_current_tilemap.alpha);
}
}
}
@@ -3206,9 +3206,9 @@ static void stv_vdp2_draw_basic_bitmap(running_machine &machine, bitmap_t *bitma
if (((xcnt + 0) <= screen_x) && (ycnt <= screen_y))
{
if ( stv2_current_tilemap.colour_calculation_enabled == 0 )
- bitmap->pix16(ycnt, xcnt) = machine.pens[((gfxdata[0] & 0x07) * 0x100) | (gfxdata[1] & 0xff) | pal_color_offset];
+ bitmap.pix16(ycnt, xcnt) = machine.pens[((gfxdata[0] & 0x07) * 0x100) | (gfxdata[1] & 0xff) | pal_color_offset];
else
- bitmap->pix16(ycnt, xcnt) = alpha_blend_r16(bitmap->pix16(ycnt, xcnt), machine.pens[((gfxdata[0] & 0x07) * 0x100) | (gfxdata[1] & 0xff) | pal_color_offset], stv2_current_tilemap.alpha);
+ bitmap.pix16(ycnt, xcnt) = alpha_blend_r16(bitmap.pix16(ycnt, xcnt), machine.pens[((gfxdata[0] & 0x07) * 0x100) | (gfxdata[1] & 0xff) | pal_color_offset], stv2_current_tilemap.alpha);
}
}
}
@@ -3233,7 +3233,7 @@ static void stv_vdp2_draw_basic_bitmap(running_machine &machine, bitmap_t *bitma
for (ycnt = cliprect.min_y; ycnt <= cliprect.max_y; ycnt++)
{
- destline = &bitmap->pix16(ycnt);
+ destline = &bitmap.pix16(ycnt);
for (xcnt = cliprect.min_x; xcnt <= cliprect.max_x; xcnt++)
{
@@ -3279,7 +3279,7 @@ static void stv_vdp2_draw_basic_bitmap(running_machine &machine, bitmap_t *bitma
gfxdata += xlinesize*(yy>>16);
yy &= 0xffff;
- destline = &bitmap->pix16(ycnt);
+ destline = &bitmap.pix16(ycnt);
xx = 0;
for (xcnt = cliprect.min_x; xcnt <= cliprect.max_x; xx+=stv2_current_tilemap.incx, xcnt++)
{
@@ -3329,7 +3329,7 @@ static void stv_vdp2_draw_basic_bitmap(running_machine &machine, bitmap_t *bitma
for (ycnt = cliprect.min_y; ycnt <= cliprect.max_y; ycnt++)
{
- destline = &bitmap->pix16(ycnt);
+ destline = &bitmap.pix16(ycnt);
for (xcnt = cliprect.min_x; xcnt <= cliprect.max_x; xcnt++)
{
@@ -3545,7 +3545,7 @@ static void stv_vdp2_get_map_page( int x, int y, int *_map, int *_page )
*_map = map;
}
-static void stv_vdp2_draw_basic_tilemap(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void stv_vdp2_draw_basic_tilemap(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
saturn_state *state = machine.driver_data<saturn_state>();
/* hopefully this is easier to follow than it is efficient .. */
@@ -4037,7 +4037,7 @@ static void stv_vdp2_draw_basic_tilemap(running_machine &machine, bitmap_t *bitm
}
-static void stv_vdp2_check_tilemap_with_linescroll(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void stv_vdp2_check_tilemap_with_linescroll(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
saturn_state *state = machine.driver_data<saturn_state>();
rectangle mycliprect;
@@ -4169,7 +4169,7 @@ static void stv_vdp2_check_tilemap_with_linescroll(running_machine &machine, bit
}
}
-static void stv_vdp2_draw_line(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void stv_vdp2_draw_line(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
saturn_state *state = machine.driver_data<saturn_state>();
int x,y;
@@ -4195,15 +4195,15 @@ static void stv_vdp2_draw_line(running_machine &machine, bitmap_t *bitmap, const
UINT16 pen;
pen = (gfxdata[base_offs+0]<<8)|gfxdata[base_offs+1];
- pix = bitmap->pix16(y, x);
+ pix = bitmap.pix16(y, x);
- bitmap->pix16(y, x) = stv_add_blend(machine.pens[pen & 0x7ff],pix);
+ bitmap.pix16(y, x) = stv_add_blend(machine.pens[pen & 0x7ff],pix);
}
}
}
}
-static void stv_vdp2_draw_mosaic(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, UINT8 is_roz)
+static void stv_vdp2_draw_mosaic(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, UINT8 is_roz)
{
saturn_state *state = machine.driver_data<saturn_state>();
int x,y,xi,yi;
@@ -4226,16 +4226,16 @@ static void stv_vdp2_draw_mosaic(running_machine &machine, bitmap_t *bitmap, con
{
for(x=cliprect.min_x;x<=cliprect.max_x;x+=h_size)
{
- pix = bitmap->pix16(y, x);
+ pix = bitmap.pix16(y, x);
for(yi=0;yi<v_size;yi++)
for(xi=0;xi<h_size;xi++)
- bitmap->pix16(y+yi, x+xi) = pix;
+ bitmap.pix16(y+yi, x+xi) = pix;
}
}
}
-static void stv_vdp2_check_tilemap(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void stv_vdp2_check_tilemap(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
/* the idea is here we check the tilemap capabilities / whats enabled and call an appropriate tilemap drawing routine, or
at the very list throw up a few errors if the tilemaps want to do something we don't support yet */
@@ -4349,10 +4349,10 @@ static void stv_vdp2_check_tilemap(running_machine &machine, bitmap_t *bitmap, c
}
}
-static void stv_vdp2_draw_rotation_screen(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int iRP);
+static void stv_vdp2_draw_rotation_screen(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int iRP);
-static void stv_vdp2_copy_roz_bitmap(bitmap_t *bitmap,
+static void stv_vdp2_copy_roz_bitmap(bitmap_t &bitmap,
running_machine &machine,
bitmap_t *roz_bitmap,
const rectangle &cliprect,
@@ -4509,7 +4509,7 @@ static void stv_vdp2_copy_roz_bitmap(bitmap_t *bitmap,
//dx = (RP.A * RP.dx) + (RP.B * RP.dy);
//dy = (RP.D * RP.dx) + (RP.E * RP.dy);
- line = &bitmap->pix16(vcnt);
+ line = &bitmap.pix16(vcnt);
if ( !use_coeff_table || RP.dkax == 0 )
{
@@ -4740,7 +4740,7 @@ static void stv_vdp2_copy_roz_bitmap(bitmap_t *bitmap,
}
}
-static void stv_vdp2_draw_NBG0(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void stv_vdp2_draw_NBG0(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
saturn_state *state = machine.driver_data<saturn_state>();
UINT32 base_mask;
@@ -4842,7 +4842,7 @@ static void stv_vdp2_draw_NBG0(running_machine &machine, bitmap_t *bitmap, const
stv_vdp2_check_tilemap(machine, bitmap, cliprect);
}
-static void stv_vdp2_draw_NBG1(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void stv_vdp2_draw_NBG1(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
saturn_state *state = machine.driver_data<saturn_state>();
UINT32 base_mask;
@@ -4940,7 +4940,7 @@ static void stv_vdp2_draw_NBG1(running_machine &machine, bitmap_t *bitmap, const
stv_vdp2_check_tilemap(machine, bitmap, cliprect);
}
-static void stv_vdp2_draw_NBG2(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void stv_vdp2_draw_NBG2(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
saturn_state *state = machine.driver_data<saturn_state>();
@@ -5045,7 +5045,7 @@ static void stv_vdp2_draw_NBG2(running_machine &machine, bitmap_t *bitmap, const
stv_vdp2_check_tilemap(machine, bitmap, cliprect);
}
-static void stv_vdp2_draw_NBG3(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void stv_vdp2_draw_NBG3(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
saturn_state *state = machine.driver_data<saturn_state>();
/*
@@ -5150,7 +5150,7 @@ static void stv_vdp2_draw_NBG3(running_machine &machine, bitmap_t *bitmap, const
}
-static void stv_vdp2_draw_rotation_screen(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int iRP)
+static void stv_vdp2_draw_rotation_screen(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int iRP)
{
saturn_state *state = machine.driver_data<saturn_state>();
rectangle roz_clip_rect, mycliprect;
@@ -5293,7 +5293,7 @@ static void stv_vdp2_draw_rotation_screen(running_machine &machine, bitmap_t *bi
memcmp(&stv_rbg_cache_data.layer_data[iRP-1],&stv2_current_tilemap,sizeof(stv2_current_tilemap)) != 0 )
{
state->m_vdp2.roz_bitmap[iRP-1]->fill(get_black_pen(machine), roz_clip_rect );
- stv_vdp2_check_tilemap(machine, state->m_vdp2.roz_bitmap[iRP-1], roz_clip_rect);
+ stv_vdp2_check_tilemap(machine, *state->m_vdp2.roz_bitmap[iRP-1], roz_clip_rect);
// prepare cache data
stv_rbg_cache_data.watch_vdp2_vram_writes |= iRP;
stv_rbg_cache_data.is_cache_dirty &= ~iRP;
@@ -5334,7 +5334,7 @@ static void stv_vdp2_draw_rotation_screen(running_machine &machine, bitmap_t *bi
}
-static void stv_vdp2_draw_RBG0(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void stv_vdp2_draw_RBG0(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
saturn_state *state = machine.driver_data<saturn_state>();
/*
@@ -5437,7 +5437,7 @@ static void stv_vdp2_draw_RBG0(running_machine &machine, bitmap_t *bitmap, const
}
-static void stv_vdp2_draw_back(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void stv_vdp2_draw_back(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
saturn_state *state = machine.driver_data<saturn_state>();
int x,y;
@@ -5451,7 +5451,7 @@ static void stv_vdp2_draw_back(running_machine &machine, bitmap_t *bitmap, const
/* draw black if BDCLMD and DISP are cleared */
if(!(STV_VDP2_BDCLMD) && !(STV_VDP2_DISP))
- bitmap->fill(get_black_pen(machine), cliprect);
+ bitmap.fill(get_black_pen(machine), cliprect);
else
{
base_mask = STV_VDP2_VRAMSZ ? 0x7ffff : 0x3ffff;
@@ -5474,7 +5474,7 @@ static void stv_vdp2_draw_back(running_machine &machine, bitmap_t *bitmap, const
if(STV_VDP2_BKCOEN)
stv_vdp2_compute_color_offset_RGB555( machine, &r, &g, &b, STV_VDP2_BKCOSL );
- bitmap->pix16(y, x) = b | g << 5 | r << 10;
+ bitmap.pix16(y, x) = b | g << 5 | r << 10;
}
}
}
@@ -6267,7 +6267,7 @@ static int stv_sprite_priorities_used[8];
static int stv_sprite_priorities_usage_valid;
static UINT8 stv_sprite_priorities_in_fb_line[512][8];
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, UINT8 pri)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, UINT8 pri)
{
saturn_state *state = machine.driver_data<saturn_state>();
int x,y,r,g,b;
@@ -6398,7 +6398,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const recta
continue;
framebuffer_line = state->m_vdp1.framebuffer_display_lines[y];
- bitmap_line = &bitmap->pix16(y);
+ bitmap_line = &bitmap.pix16(y);
for ( x = mycliprect.min_x; x <= mycliprect.max_x; x++ )
{
@@ -6476,7 +6476,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const recta
continue;
framebuffer_line = state->m_vdp1.framebuffer_display_lines[y];
- bitmap_line = &bitmap->pix16(y);
+ bitmap_line = &bitmap.pix16(y);
for ( x = mycliprect.min_x; x <= mycliprect.max_x; x++ )
{
@@ -6580,12 +6580,12 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const recta
framebuffer_line = state->m_vdp1.framebuffer_display_lines[y];
if ( interlace_framebuffer == 0 )
{
- bitmap_line = &bitmap->pix16(y);
+ bitmap_line = &bitmap.pix16(y);
}
else
{
- bitmap_line = &bitmap->pix16(2*y);
- bitmap_line2 = &bitmap->pix16(2*y + 1);
+ bitmap_line = &bitmap.pix16(2*y);
+ bitmap_line2 = &bitmap.pix16(2*y + 1);
}
for ( x = mycliprect.min_x; x <= mycliprect.max_x /(double_x+1) ; x++ )
@@ -7040,7 +7040,7 @@ static void saturn_vdp2_assign_variables(running_machine &machine,UINT32 offset,
}
}
-static void vdp2_draw_back(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void vdp2_draw_back(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
saturn_state *state = machine.driver_data<saturn_state>();
int x,y;
@@ -7052,7 +7052,7 @@ static void vdp2_draw_back(running_machine &machine, bitmap_t *bitmap, const rec
/* draw black if BDCLMD and DISP are cleared */
if(!(STV_VDP2_BDCLMD) && !(STV_VDP2_DISP))
- bitmap->fill(get_black_pen(machine), cliprect);
+ bitmap.fill(get_black_pen(machine), cliprect);
else
{
base_mask = STV_VDP2_VRAMSZ ? 0x7ffff : 0x3ffff;
@@ -7080,7 +7080,7 @@ static void vdp2_draw_back(running_machine &machine, bitmap_t *bitmap, const rec
// stv_vdp2_compute_color_offset_RGB555( machine, &r, &g, &b, STV_VDP2_BKCOSL );
/* TODO: this needs post-processing too! */
- bitmap->pix32(y, x) = b | g << 8 | r << 16;
+ bitmap.pix32(y, x) = b | g << 8 | r << 16;
}
}
}
@@ -7250,7 +7250,7 @@ static void vdp2_calc_color_offset(running_machine &machine, UINT8 layer_name, i
}
/* now copy the vram buffer to the screen buffer, apply post-processing at this stage */
-static void draw_normal_screen(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect, UINT8 layer_name)
+static void draw_normal_screen(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect, UINT8 layer_name)
{
int x,y;
int r,g,b;
@@ -7270,7 +7270,7 @@ static void draw_normal_screen(running_machine &machine, bitmap_t *bitmap,const
if(m_vdp2_state[layer_name].color_offset_en)
vdp2_calc_color_offset(machine,layer_name,&r,&g,&b);
- bitmap->pix32(y, x) = b | g << 8 | r << 16;
+ bitmap.pix32(y, x) = b | g << 8 | r << 16;
}
}
}
diff --git a/src/mame/video/suna16.c b/src/mame/video/suna16.c
index 27dd9f41397..3be3236bbca 100644
--- a/src/mame/video/suna16.c
+++ b/src/mame/video/suna16.c
@@ -122,7 +122,7 @@ WRITE16_HANDLER( suna16_paletteram16_w )
***************************************************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, UINT16 *sprites, int gfx)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, UINT16 *sprites, int gfx)
{
suna16_state *state = machine.driver_data<suna16_state>();
int offs;
@@ -226,7 +226,7 @@ SCREEN_UPDATE( suna16 )
suna16_state *state = screen.machine().driver_data<suna16_state>();
/* Suna Quiz indicates the background is the last pen */
- bitmap->fill(0xff, cliprect);
+ bitmap.fill(0xff, cliprect);
draw_sprites(screen.machine(), bitmap, cliprect, state->m_spriteram, 0);
return 0;
}
@@ -246,7 +246,7 @@ if (screen.machine().input().code_pressed(KEYCODE_Z))
#endif
/* Suna Quiz indicates the background is the last pen */
- bitmap->fill(0xff, cliprect);
+ bitmap.fill(0xff, cliprect);
if (layers_ctrl & 1) draw_sprites(screen.machine(), bitmap, cliprect, state->m_spriteram, 0);
if (layers_ctrl & 2) draw_sprites(screen.machine(), bitmap, cliprect, state->m_spriteram2, 1);
return 0;
diff --git a/src/mame/video/suna8.c b/src/mame/video/suna8.c
index 503c71d25c7..72556e618f0 100644
--- a/src/mame/video/suna8.c
+++ b/src/mame/video/suna8.c
@@ -202,7 +202,7 @@ VIDEO_START( suna8_textdim12 ) { suna8_vh_start_common(machine, 12); }
***************************************************************************/
-static void draw_normal_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void draw_normal_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect)
{
suna8_state *state = machine.driver_data<suna8_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -336,7 +336,7 @@ static void draw_normal_sprites(running_machine &machine, bitmap_t *bitmap,const
}
}
-static void draw_text_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void draw_text_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect)
{
suna8_state *state = machine.driver_data<suna8_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -415,7 +415,7 @@ static void draw_text_sprites(running_machine &machine, bitmap_t *bitmap,const r
SCREEN_UPDATE( suna8 )
{
/* see hardhead, hardhea2 test mode (press button 2 for both players) */
- bitmap->fill(0xff, cliprect);
+ bitmap.fill(0xff, cliprect);
#ifdef MAME_DEBUG
#if TILEMAPS
diff --git a/src/mame/video/supbtime.c b/src/mame/video/supbtime.c
index a6cc3f6b9fe..6b39dceb8c9 100644
--- a/src/mame/video/supbtime.c
+++ b/src/mame/video/supbtime.c
@@ -29,7 +29,7 @@ SCREEN_UPDATE(supbtime)
flip_screen_set(screen.machine(), BIT(flip, 7));
deco16ic_pf_update(state->m_deco_tilegen1, state->m_pf1_rowscroll, state->m_pf2_rowscroll);
- bitmap->fill(768, cliprect);
+ bitmap.fill(768, cliprect);
deco16ic_tilemap_2_draw(state->m_deco_tilegen1, bitmap, cliprect, 0, 0);
screen.machine().device<decospr_device>("spritegen")->draw_sprites(screen.machine(), bitmap, cliprect, state->m_spriteram, 0x400);
diff --git a/src/mame/video/superchs.c b/src/mame/video/superchs.c
index 90235c55950..8bf3d7ac3d7 100644
--- a/src/mame/video/superchs.c
+++ b/src/mame/video/superchs.c
@@ -54,7 +54,7 @@ Heavy use is made of sprite zooming.
********************************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect,const int *primasks,int x_offs,int y_offs)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect,const int *primasks,int x_offs,int y_offs)
{
superchs_state *state = machine.driver_data<superchs_state>();
UINT32 *spriteram32 = state->m_spriteram;
@@ -215,7 +215,7 @@ SCREEN_UPDATE( superchs )
layer[3] = (priority & 0x000f) >> 0; /* tells us which is top */
layer[4] = 4; /* text layer always over bg layers */
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
/* We have to assume 2nd to bottom layer is always underneath
sprites as pdrawgfx cannot yet cope with more than 4 layers */
diff --git a/src/mame/video/superqix.c b/src/mame/video/superqix.c
index 819de75a7f8..dbda210f0f2 100644
--- a/src/mame/video/superqix.c
+++ b/src/mame/video/superqix.c
@@ -165,7 +165,7 @@ WRITE8_HANDLER( superqix_0410_w )
***************************************************************************/
-static void pbillian_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void pbillian_draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
superqix_state *state = machine.driver_data<superqix_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -193,7 +193,7 @@ static void pbillian_draw_sprites(running_machine &machine, bitmap_t *bitmap, co
}
}
-static void superqix_draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void superqix_draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect)
{
superqix_state *state = machine.driver_data<superqix_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -238,7 +238,7 @@ SCREEN_UPDATE( superqix )
{
superqix_state *state = screen.machine().driver_data<superqix_state>();
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, TILEMAP_DRAW_LAYER1, 0);
- copybitmap_trans(bitmap,state->m_fg_bitmap[state->m_show_bitmap],flip_screen_get(screen.machine()),flip_screen_get(screen.machine()),0,0,cliprect,0);
+ copybitmap_trans(bitmap,*state->m_fg_bitmap[state->m_show_bitmap],flip_screen_get(screen.machine()),flip_screen_get(screen.machine()),0,0,cliprect,0);
superqix_draw_sprites(screen.machine(), bitmap,cliprect);
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, TILEMAP_DRAW_LAYER0, 0);
return 0;
diff --git a/src/mame/video/suprloco.c b/src/mame/video/suprloco.c
index 11dbf1df97c..ff64cca777c 100644
--- a/src/mame/video/suprloco.c
+++ b/src/mame/video/suprloco.c
@@ -161,12 +161,12 @@ READ8_HANDLER( suprloco_control_r )
-INLINE void draw_pixel(bitmap_t *bitmap,const rectangle &cliprect,int x,int y,int color,int flip)
+INLINE void draw_pixel(bitmap_t &bitmap,const rectangle &cliprect,int x,int y,int color,int flip)
{
if (flip)
{
- x = bitmap->width() - x - 1;
- y = bitmap->height() - y - 1;
+ x = bitmap.width() - x - 1;
+ y = bitmap.height() - y - 1;
}
if (x < cliprect.min_x ||
@@ -175,11 +175,11 @@ INLINE void draw_pixel(bitmap_t *bitmap,const rectangle &cliprect,int x,int y,in
y > cliprect.max_y)
return;
- bitmap->pix16(y, x) = color;
+ bitmap.pix16(y, x) = color;
}
-static void draw_sprite(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect,int spr_number)
+static void draw_sprite(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect,int spr_number)
{
suprloco_state *state = machine.driver_data<suprloco_state>();
int flip = flip_screen_get(machine);
@@ -254,7 +254,7 @@ static void draw_sprite(running_machine &machine, bitmap_t *bitmap,const rectang
}
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
suprloco_state *state = machine.driver_data<suprloco_state>();
int spr_number;
diff --git a/src/mame/video/suprnova.c b/src/mame/video/suprnova.c
index 28c50b9baba..7d245dec71f 100644
--- a/src/mame/video/suprnova.c
+++ b/src/mame/video/suprnova.c
@@ -6,15 +6,15 @@
/* draws ROZ with linescroll OR columnscroll to 16-bit indexed bitmap */
-static void suprnova_draw_roz(bitmap_t* bitmap, bitmap_t* bitmapflags, const rectangle &cliprect, tilemap_t *tmap, UINT32 startx, UINT32 starty, int incxx, int incxy, int incyx, int incyy, int wraparound, int columnscroll, UINT32* scrollram)
+static void suprnova_draw_roz(bitmap_t &bitmap, bitmap_t* bitmapflags, const rectangle &cliprect, tilemap_t *tmap, UINT32 startx, UINT32 starty, int incxx, int incxy, int incyx, int incyy, int wraparound, int columnscroll, UINT32* scrollram)
{
//bitmap_t *destbitmap = bitmap;
- bitmap_t *srcbitmap = tilemap_get_pixmap(tmap);
- bitmap_t *srcbitmapflags = tilemap_get_flagsmap(tmap);
- const int xmask = srcbitmap->width()-1;
- const int ymask = srcbitmap->height()-1;
- const int widthshifted = srcbitmap->width() << 16;
- const int heightshifted = srcbitmap->height() << 16;
+ bitmap_t &srcbitmap = tilemap_get_pixmap(tmap);
+ bitmap_t &srcbitmapflags = tilemap_get_flagsmap(tmap);
+ const int xmask = srcbitmap.width()-1;
+ const int ymask = srcbitmap.height()-1;
+ const int widthshifted = srcbitmap.width() << 16;
+ const int heightshifted = srcbitmap.height() << 16;
UINT32 cx;
UINT32 cy;
int x;
@@ -50,7 +50,7 @@ static void suprnova_draw_roz(bitmap_t* bitmap, bitmap_t* bitmapflags, const rec
cy = starty;
/* get dest and priority pointers */
- dest = &bitmap->pix16(sy, sx);
+ dest = &bitmap.pix16(sy, sx);
destflags = &bitmapflags->pix8(sy, sx);
/* loop over columns */
@@ -60,13 +60,13 @@ static void suprnova_draw_roz(bitmap_t* bitmap, bitmap_t* bitmapflags, const rec
{
if (columnscroll)
{
- dest[0] = srcbitmap->pix16(((cy >> 16) - scrollram[(cx>>16)&0x3ff]) & ymask, (cx >> 16) & xmask);
- destflags[0] = srcbitmapflags->pix8(((cy >> 16) - scrollram[(cx>>16)&0x3ff]) & ymask, (cx >> 16) & xmask);
+ dest[0] = srcbitmap.pix16(((cy >> 16) - scrollram[(cx>>16)&0x3ff]) & ymask, (cx >> 16) & xmask);
+ destflags[0] = srcbitmapflags.pix8(((cy >> 16) - scrollram[(cx>>16)&0x3ff]) & ymask, (cx >> 16) & xmask);
}
else
{
- dest[0] = srcbitmap->pix16((cy >> 16) & ymask, ((cx >> 16) - scrollram[(cy>>16)&0x3ff]) & xmask);
- destflags[0] = srcbitmapflags->pix8((cy >> 16) & ymask, ((cx >> 16) - scrollram[(cy>>16)&0x3ff]) & xmask);
+ dest[0] = srcbitmap.pix16((cy >> 16) & ymask, ((cx >> 16) - scrollram[(cy>>16)&0x3ff]) & xmask);
+ destflags[0] = srcbitmapflags.pix8((cy >> 16) & ymask, ((cx >> 16) - scrollram[(cy>>16)&0x3ff]) & xmask);
}
}
@@ -391,7 +391,7 @@ VIDEO_RESET( skns )
state->m_alt_enable_background = state->m_alt_enable_sprites = 1;
}
-static void supernova_draw_a( running_machine &machine, bitmap_t *bitmap, bitmap_t* bitmap_flags, const rectangle &cliprect, int tran )
+static void supernova_draw_a( running_machine &machine, bitmap_t &bitmap, bitmap_t* bitmap_flags, const rectangle &cliprect, int tran )
{
skns_state *state = machine.driver_data<skns_state>();
int enable_a = (state->m_v3_regs[0x10/4] >> 0) & 0x0001;
@@ -422,7 +422,7 @@ static void supernova_draw_a( running_machine &machine, bitmap_t *bitmap, bitmap
}
}
-static void supernova_draw_b( running_machine &machine, bitmap_t *bitmap, bitmap_t* bitmap_flags, const rectangle &cliprect, int tran )
+static void supernova_draw_b( running_machine &machine, bitmap_t &bitmap, bitmap_t* bitmap_flags, const rectangle &cliprect, int tran )
{
skns_state *state = machine.driver_data<skns_state>();
int enable_b = (state->m_v3_regs[0x34/4] >> 0) & 0x0001;
@@ -459,7 +459,7 @@ SCREEN_UPDATE(skns)
palette_update(screen.machine());
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
state->m_tilemap_bitmap_lower->fill(0);
state->m_tilemap_bitmapflags_lower->fill(0);
state->m_tilemap_bitmap_higher->fill(0);
@@ -476,8 +476,8 @@ SCREEN_UPDATE(skns)
//popmessage("pri %d %d\n", supernova_pri_a, supernova_pri_b);
/*if (!supernova_pri_b) { */
- supernova_draw_b(screen.machine(), state->m_tilemap_bitmap_lower, state->m_tilemap_bitmapflags_lower, cliprect,tran);// tran = 1;
- supernova_draw_a(screen.machine(), state->m_tilemap_bitmap_higher,state->m_tilemap_bitmapflags_higher,cliprect,tran);// tran = 1;
+ supernova_draw_b(screen.machine(), *state->m_tilemap_bitmap_lower, state->m_tilemap_bitmapflags_lower, cliprect,tran);// tran = 1;
+ supernova_draw_a(screen.machine(), *state->m_tilemap_bitmap_higher,state->m_tilemap_bitmapflags_higher,cliprect,tran);// tran = 1;
{
int x,y;
@@ -500,7 +500,7 @@ SCREEN_UPDATE(skns)
src3 = &state->m_sprite_bitmap->pix16(y);
- dst = &bitmap->pix32(y);
+ dst = &bitmap.pix32(y);
for (x=0;x<320;x++)
@@ -631,7 +631,7 @@ SCREEN_UPDATE(skns)
state->m_sprite_bitmap->fill(0x0000, cliprect);
if (state->m_alt_enable_sprites)
- state->m_spritegen->skns_draw_sprites(screen.machine(), state->m_sprite_bitmap, cliprect, screen.machine().generic.spriteram.u32, screen.machine().generic.spriteram_size, screen.machine().region("gfx1")->base(), screen.machine().region ("gfx1")->bytes(), state->m_spc_regs );
+ state->m_spritegen->skns_draw_sprites(screen.machine(), *state->m_sprite_bitmap, cliprect, screen.machine().generic.spriteram.u32, screen.machine().generic.spriteram_size, screen.machine().region("gfx1")->base(), screen.machine().region ("gfx1")->bytes(), state->m_spc_regs );
return 0;
diff --git a/src/mame/video/suprslam.c b/src/mame/video/suprslam.c
index 5a965319994..a649070483c 100644
--- a/src/mame/video/suprslam.c
+++ b/src/mame/video/suprslam.c
@@ -6,7 +6,7 @@
/* todo, fix zooming correctly, it's _not_ like aerofgt */
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
/* SPRITE INFO
@@ -157,7 +157,7 @@ SCREEN_UPDATE( suprslam )
suprslam_state *state = screen.machine().driver_data<suprslam_state>();
tilemap_set_scrollx( state->m_screen_tilemap,0, state->m_screen_vregs[0x04/2] );
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
k053936_zoom_draw(state->m_k053936, bitmap, cliprect, state->m_bg_tilemap, 0, 0, 1);
if(!(state->m_spr_ctrl[0] & 8))
draw_sprites(screen.machine(), bitmap, cliprect);
diff --git a/src/mame/video/surpratk.c b/src/mame/video/surpratk.c
index 1078ede72cb..bbb045e60d3 100644
--- a/src/mame/video/surpratk.c
+++ b/src/mame/video/surpratk.c
@@ -68,8 +68,8 @@ SCREEN_UPDATE( surpratk )
konami_sortlayers3(layer, state->m_layerpri);
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(16 * bg_colorbase, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(16 * bg_colorbase, cliprect);
k052109_tilemap_draw(state->m_k052109, bitmap, cliprect, layer[0], 0, 1);
k052109_tilemap_draw(state->m_k052109, bitmap, cliprect, layer[1], 0, 2);
k052109_tilemap_draw(state->m_k052109, bitmap, cliprect, layer[2], 0, 4);
diff --git a/src/mame/video/system1.c b/src/mame/video/system1.c
index 8990730fbf1..25edcffd1e9 100644
--- a/src/mame/video/system1.c
+++ b/src/mame/video/system1.c
@@ -369,7 +369,7 @@ WRITE8_HANDLER( system1_paletteram_w )
*
*************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int xoffset)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int xoffset)
{
system1_state *state = machine.driver_data<system1_state>();
UINT32 gfxbanks = machine.region("sprites")->bytes() / 0x8000;
@@ -413,7 +413,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const recta
/* iterate over all rows of the sprite */
for (y = top; y < bottom; y++)
{
- UINT16 *destbase = &bitmap->pix16(y);
+ UINT16 *destbase = &bitmap.pix16(y);
UINT16 curaddr;
int addrdelta;
@@ -499,7 +499,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const recta
*
*************************************/
-static void video_update_common(screen_device &screen, bitmap_t *bitmap, const rectangle &cliprect, bitmap_t *fgpixmap, bitmap_t **bgpixmaps, const int *bgrowscroll, int bgyscroll, int spritexoffs)
+static void video_update_common(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect, bitmap_t &fgpixmap, bitmap_t **bgpixmaps, const int *bgrowscroll, int bgyscroll, int spritexoffs)
{
system1_state *state = screen.machine().driver_data<system1_state>();
const UINT8 *lookup = screen.machine().region("proms")->base();
@@ -507,14 +507,14 @@ static void video_update_common(screen_device &screen, bitmap_t *bitmap, const r
/* first clear the sprite bitmap and draw sprites within this area */
state->m_sprite_bitmap->fill(0, cliprect);
- draw_sprites(screen.machine(), state->m_sprite_bitmap, cliprect, spritexoffs);
+ draw_sprites(screen.machine(), *state->m_sprite_bitmap, cliprect, spritexoffs);
/* iterate over rows */
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
- UINT16 *fgbase = &fgpixmap->pix16(y & 0xff);
+ UINT16 *fgbase = &fgpixmap.pix16(y & 0xff);
UINT16 *sprbase = &state->m_sprite_bitmap->pix16(y & 0xff);
- UINT16 *dstbase = &bitmap->pix16(y);
+ UINT16 *dstbase = &bitmap.pix16(y);
int bgy = (y + bgyscroll) & 0x1ff;
int bgxscroll = bgrowscroll[y / 8];
UINT16 *bgbase[2];
@@ -571,16 +571,16 @@ SCREEN_UPDATE( system1 )
{
system1_state *state = screen.machine().driver_data<system1_state>();
UINT8 *videoram = state->m_videoram;
- bitmap_t *bgpixmaps[4], *fgpixmap;
+ bitmap_t *bgpixmaps[4];
int bgrowscroll[32];
int xscroll, yscroll;
int y;
/* all 4 background pages are the same, fixed to page 0 */
- bgpixmaps[0] = bgpixmaps[1] = bgpixmaps[2] = bgpixmaps[3] = tilemap_get_pixmap(state->m_tilemap_page[0]);
+ bgpixmaps[0] = bgpixmaps[1] = bgpixmaps[2] = bgpixmaps[3] = &tilemap_get_pixmap(state->m_tilemap_page[0]);
/* foreground is fixed to page 1 */
- fgpixmap = tilemap_get_pixmap(state->m_tilemap_page[1]);
+ bitmap_t &fgpixmap = tilemap_get_pixmap(state->m_tilemap_page[1]);
/* get fixed scroll offsets */
xscroll = (INT16)((videoram[0xffc] | (videoram[0xffd] << 8)) + 28);
@@ -607,20 +607,20 @@ SCREEN_UPDATE( system2 )
{
system1_state *state = screen.machine().driver_data<system1_state>();
UINT8 *videoram = state->m_videoram;
- bitmap_t *bgpixmaps[4], *fgpixmap;
+ bitmap_t *bgpixmaps[4];
int rowscroll[32];
int xscroll, yscroll;
int sprxoffset;
int y;
/* 4 independent background pages */
- bgpixmaps[0] = tilemap_get_pixmap(state->m_tilemap_page[videoram[0x740] & 7]);
- bgpixmaps[1] = tilemap_get_pixmap(state->m_tilemap_page[videoram[0x742] & 7]);
- bgpixmaps[2] = tilemap_get_pixmap(state->m_tilemap_page[videoram[0x744] & 7]);
- bgpixmaps[3] = tilemap_get_pixmap(state->m_tilemap_page[videoram[0x746] & 7]);
+ bgpixmaps[0] = &tilemap_get_pixmap(state->m_tilemap_page[videoram[0x740] & 7]);
+ bgpixmaps[1] = &tilemap_get_pixmap(state->m_tilemap_page[videoram[0x742] & 7]);
+ bgpixmaps[2] = &tilemap_get_pixmap(state->m_tilemap_page[videoram[0x744] & 7]);
+ bgpixmaps[3] = &tilemap_get_pixmap(state->m_tilemap_page[videoram[0x746] & 7]);
/* foreground is fixed to page 0 */
- fgpixmap = tilemap_get_pixmap(state->m_tilemap_page[0]);
+ bitmap_t &fgpixmap = tilemap_get_pixmap(state->m_tilemap_page[0]);
/* get scroll offsets */
if (!flip_screen_get(screen.machine()))
@@ -650,20 +650,20 @@ SCREEN_UPDATE( system2_rowscroll )
{
system1_state *state = screen.machine().driver_data<system1_state>();
UINT8 *videoram = state->m_videoram;
- bitmap_t *bgpixmaps[4], *fgpixmap;
+ bitmap_t *bgpixmaps[4];
int rowscroll[32];
int yscroll;
int sprxoffset;
int y;
/* 4 independent background pages */
- bgpixmaps[0] = tilemap_get_pixmap(state->m_tilemap_page[videoram[0x740] & 7]);
- bgpixmaps[1] = tilemap_get_pixmap(state->m_tilemap_page[videoram[0x742] & 7]);
- bgpixmaps[2] = tilemap_get_pixmap(state->m_tilemap_page[videoram[0x744] & 7]);
- bgpixmaps[3] = tilemap_get_pixmap(state->m_tilemap_page[videoram[0x746] & 7]);
+ bgpixmaps[0] = &tilemap_get_pixmap(state->m_tilemap_page[videoram[0x740] & 7]);
+ bgpixmaps[1] = &tilemap_get_pixmap(state->m_tilemap_page[videoram[0x742] & 7]);
+ bgpixmaps[2] = &tilemap_get_pixmap(state->m_tilemap_page[videoram[0x744] & 7]);
+ bgpixmaps[3] = &tilemap_get_pixmap(state->m_tilemap_page[videoram[0x746] & 7]);
/* foreground is fixed to page 0 */
- fgpixmap = tilemap_get_pixmap(state->m_tilemap_page[0]);
+ bitmap_t &fgpixmap = tilemap_get_pixmap(state->m_tilemap_page[0]);
/* get scroll offsets */
if (!flip_screen_get(screen.machine()))
diff --git a/src/mame/video/system16.c b/src/mame/video/system16.c
index 06fbe590646..9225a47293d 100644
--- a/src/mame/video/system16.c
+++ b/src/mame/video/system16.c
@@ -641,7 +641,7 @@ SCREEN_UPDATE( s16a_bootleg )
int offset_bg0x = 187;
int offset_bg0y = 0;
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
// I can't bring myself to care about dirty tile marking on something which runs at a bazillion % speed anyway, clean code is better
tilemap_mark_all_tiles_dirty(state->m_bg_tilemaps[0]);
@@ -699,7 +699,7 @@ SCREEN_UPDATE( s16a_bootleg_passht4b )
int offset_bg0x = 5;
int offset_bg0y = 32;
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
// I can't bring myself to care about dirty tile marking on something which runs at a bazillion % speed anyway, clean code is better
tilemap_mark_all_tiles_dirty(state->m_bg_tilemaps[0]);
@@ -736,13 +736,13 @@ SCREEN_UPDATE( system16 )
if (!state->m_refreshenable)
{
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
return 0;
}
update_page(screen.machine());
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
tilemap_set_scrollx(state->m_background, 0, -320 - state->m_bg_scrollx);
tilemap_set_scrolly(state->m_background, 0, -256 + state->m_bg_scrolly + state->m_back_yscroll);
@@ -782,15 +782,15 @@ SCREEN_UPDATE( system18old )
if (!state->m_refreshenable)
{
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
return 0;
}
update_page(screen.machine());
- screen.machine().priority_bitmap->fill(0);
+ screen.machine().priority_bitmap.fill(0);
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
tilemap_draw(bitmap, cliprect, state->m_background, TILEMAP_DRAW_OPAQUE, 0);
tilemap_draw(bitmap, cliprect, state->m_background, TILEMAP_DRAW_OPAQUE | 1, 0); //??
diff --git a/src/mame/video/tagteam.c b/src/mame/video/tagteam.c
index 765db271a89..40221c2d15f 100644
--- a/src/mame/video/tagteam.c
+++ b/src/mame/video/tagteam.c
@@ -147,7 +147,7 @@ VIDEO_START( tagteam )
8, 8, 32, 32);
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
tagteam_state *state = machine.driver_data<tagteam_state>();
int offs;
diff --git a/src/mame/video/tail2nos.c b/src/mame/video/tail2nos.c
index b2fe51ee04f..d86fb007117 100644
--- a/src/mame/video/tail2nos.c
+++ b/src/mame/video/tail2nos.c
@@ -146,7 +146,7 @@ WRITE16_HANDLER( tail2nos_gfxbank_w )
***************************************************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
tail2nos_state *state = machine.driver_data<tail2nos_state>();
UINT16 *spriteram = state->m_spriteram;
@@ -188,7 +188,7 @@ SCREEN_UPDATE( tail2nos )
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
}
else
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
return 0;
}
diff --git a/src/mame/video/taito_b.c b/src/mame/video/taito_b.c
index 81380033604..daac35181c6 100644
--- a/src/mame/video/taito_b.c
+++ b/src/mame/video/taito_b.c
@@ -141,7 +141,7 @@ WRITE16_HANDLER( tc0180vcu_framebuffer_word_w )
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
/* Sprite format: (16 bytes per sprite)
offs: bits:
@@ -270,7 +270,7 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
}
-static void draw_framebuffer( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int priority )
+static void draw_framebuffer( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int priority )
{
taitob_state *state = machine.driver_data<taitob_state>();
rectangle myclip = cliprect;
@@ -298,7 +298,7 @@ g_profiler.start(PROFILER_USER1);
UINT16 *src = &state->m_framebuffer[framebuffer_page]->pix16(y, myclip.min_x);
UINT16 *dst;
- dst = &bitmap->pix16(bitmap->height()-1-y, myclip.max_x);
+ dst = &bitmap.pix16(bitmap.height()-1-y, myclip.max_x);
for (x = myclip.min_x; x <= myclip.max_x; x++)
{
@@ -316,7 +316,7 @@ g_profiler.start(PROFILER_USER1);
for (y = myclip.min_y; y <= myclip.max_y; y++)
{
UINT16 *src = &state->m_framebuffer[framebuffer_page]->pix16(y, myclip.min_x);
- UINT16 *dst = &bitmap->pix16(y, myclip.min_x);
+ UINT16 *dst = &bitmap.pix16(y, myclip.min_x);
for (x = myclip.min_x; x <= myclip.max_x; x++)
{
@@ -340,7 +340,7 @@ g_profiler.start(PROFILER_USER1);
UINT16 *src = &state->m_framebuffer[framebuffer_page]->pix16(y, myclip.min_x);
UINT16 *dst;
- dst = &bitmap->pix16(bitmap->height()-1-y, myclip.max_x);
+ dst = &bitmap.pix16(bitmap.height()-1-y, myclip.max_x);
for (x = myclip.min_x; x <= myclip.max_x; x++)
{
@@ -358,7 +358,7 @@ g_profiler.start(PROFILER_USER1);
for (y = myclip.min_y; y <= myclip.max_y; y++)
{
UINT16 *src = &state->m_framebuffer[framebuffer_page]->pix16(y, myclip.min_x);
- UINT16 *dst = &bitmap->pix16(y, myclip.min_x);
+ UINT16 *dst = &bitmap.pix16(y, myclip.min_x);
for (x = myclip.min_x; x <= myclip.max_x; x++)
{
@@ -382,7 +382,7 @@ SCREEN_UPDATE( taitob )
if ((video_control & 0x20) == 0)
{
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
return 0;
}
@@ -399,7 +399,7 @@ SCREEN_UPDATE( taitob )
int scrolly = - state->m_pixel_scroll[1]; //+240;
/* bit 15 of pixel_scroll[0] is probably flip screen */
- copyscrollbitmap_trans(bitmap, state->m_pixel_bitmap, 1, &scrollx, 1, &scrolly, cliprect, state->m_b_fg_color_base * 16);
+ copyscrollbitmap_trans(bitmap, *state->m_pixel_bitmap, 1, &scrollx, 1, &scrolly, cliprect, state->m_b_fg_color_base * 16);
}
draw_framebuffer(screen.machine(), bitmap, cliprect, 0);
@@ -421,24 +421,24 @@ SCREEN_UPDATE( realpunc )
/* Video blanked? */
if (!(video_control & 0x20))
{
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
return 0;
}
/* Draw the palettized playfields to an indexed bitmap */
- tc0180vcu_tilemap_draw(state->m_tc0180vcu, state->m_realpunc_bitmap, cliprect, 0, 1);
+ tc0180vcu_tilemap_draw(state->m_tc0180vcu, *state->m_realpunc_bitmap, cliprect, 0, 1);
- draw_framebuffer(screen.machine(), state->m_realpunc_bitmap, cliprect, 1);
+ draw_framebuffer(screen.machine(), *state->m_realpunc_bitmap, cliprect, 1);
- tc0180vcu_tilemap_draw(state->m_tc0180vcu, state->m_realpunc_bitmap, cliprect, 1, 0);
+ tc0180vcu_tilemap_draw(state->m_tc0180vcu, *state->m_realpunc_bitmap, cliprect, 1, 0);
if (state->m_realpunc_video_ctrl & 0x0001)
- draw_framebuffer(screen.machine(), state->m_realpunc_bitmap, cliprect, 0);
+ draw_framebuffer(screen.machine(), *state->m_realpunc_bitmap, cliprect, 0);
/* Copy the intermediate bitmap to the output bitmap, applying the palette */
for (y = 0; y <= cliprect.max_y; y++)
for (x = 0; x <= cliprect.max_x; x++)
- bitmap->pix32(y, x) = palette[state->m_realpunc_bitmap->pix16(y, x)];
+ bitmap.pix32(y, x) = palette[state->m_realpunc_bitmap->pix16(y, x)];
/* Draw the 15bpp raw CRTC frame buffer directly to the output bitmap */
if (state->m_realpunc_video_ctrl & 0x0002)
@@ -464,7 +464,7 @@ SCREEN_UPDATE( realpunc )
b = (BIT(srcpix, 3)) | ((srcpix >> 3) & 0x1e);
if (srcpix)
- bitmap->pix32(y, x) = MAKE_RGB(pal5bit(r), pal5bit(g), pal5bit(b));
+ bitmap.pix32(y, x) = MAKE_RGB(pal5bit(r), pal5bit(g), pal5bit(b));
}
addr += stride;
@@ -476,7 +476,7 @@ SCREEN_UPDATE( realpunc )
for (y = 0; y <= cliprect.max_y; y++)
{
for (x = 0; x <= cliprect.max_x; x++)
- bitmap->pix32(y, x) = MAKE_RGB(0x00, 0x00, 0x00);
+ bitmap.pix32(y, x) = MAKE_RGB(0x00, 0x00, 0x00);
}
}
@@ -484,9 +484,9 @@ SCREEN_UPDATE( realpunc )
state->m_realpunc_bitmap->fill(0, cliprect);
if (!(state->m_realpunc_video_ctrl & 0x0001))
- draw_framebuffer(screen.machine(), state->m_realpunc_bitmap, cliprect, 0);
+ draw_framebuffer(screen.machine(), *state->m_realpunc_bitmap, cliprect, 0);
- tc0180vcu_tilemap_draw(state->m_tc0180vcu, state->m_realpunc_bitmap, cliprect, 2, 0);
+ tc0180vcu_tilemap_draw(state->m_tc0180vcu, *state->m_realpunc_bitmap, cliprect, 2, 0);
/* Merge the indexed layers with the output bitmap */
for (y = 0; y <= cliprect.max_y; y++)
@@ -494,7 +494,7 @@ SCREEN_UPDATE( realpunc )
for (x = 0; x <= cliprect.max_x; x++)
{
if (state->m_realpunc_bitmap->pix16(y, x))
- bitmap->pix32(y, x) = palette[state->m_realpunc_bitmap->pix16(y, x)];
+ bitmap.pix32(y, x) = palette[state->m_realpunc_bitmap->pix16(y, x)];
}
}
@@ -518,5 +518,5 @@ SCREEN_EOF( taitob )
tc0180vcu_set_fb_page(state->m_tc0180vcu, 0, framebuffer_page);
}
- draw_sprites(screen.machine(), state->m_framebuffer[framebuffer_page], screen.machine().primary_screen->visible_area());
+ draw_sprites(screen.machine(), *state->m_framebuffer[framebuffer_page], screen.machine().primary_screen->visible_area());
}
diff --git a/src/mame/video/taito_f2.c b/src/mame/video/taito_f2.c
index a3c77c925bf..7b2d5a61ef2 100644
--- a/src/mame/video/taito_f2.c
+++ b/src/mame/video/taito_f2.c
@@ -286,13 +286,13 @@ WRITE16_HANDLER( koshien_spritebank_w )
state->m_spritebank_buffered[7] = state->m_spritebank_buffered[6] + 0x400;
}
-static void taito_f2_tc360_spritemixdraw( running_machine &machine, bitmap_t *dest_bmp, const rectangle &clip, const gfx_element *gfx,
+static void taito_f2_tc360_spritemixdraw( running_machine &machine, bitmap_t &dest_bmp, const rectangle &clip, const gfx_element *gfx,
UINT32 code, UINT32 color, int flipx, int flipy, int sx, int sy, int scalex, int scaley )
{
taitof2_state *state = machine.driver_data<taitof2_state>();
int pal_base = gfx->color_base + gfx->color_granularity * (color % gfx->total_colors);
const UINT8 *source_base = gfx_element_get_data(gfx, code % gfx->total_elements);
- bitmap_t *priority_bitmap = gfx->machine().priority_bitmap;
+ bitmap_t &priority_bitmap = gfx->machine().priority_bitmap;
int sprite_screen_height = (scaley * gfx->height + 0x8000) >> 16;
int sprite_screen_width = (scalex * gfx->width + 0x8000) >> 16;
@@ -363,8 +363,8 @@ static void taito_f2_tc360_spritemixdraw( running_machine &machine, bitmap_t *de
for (y = sy; y < ey; y++)
{
const UINT8 *source = source_base + (y_index >> 16) * gfx->line_modulo;
- UINT16 *dest = &dest_bmp->pix16(y);
- UINT8 *pri = &priority_bitmap->pix8(y);
+ UINT16 *dest = &dest_bmp.pix16(y);
+ UINT8 *pri = &priority_bitmap.pix8(y);
int x, x_index = x_index_base;
for (x = sx; x < ex; x++)
@@ -432,7 +432,7 @@ static void taito_f2_tc360_spritemixdraw( running_machine &machine, bitmap_t *de
}
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int *primasks, int uses_tc360_mixer )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int *primasks, int uses_tc360_mixer )
{
/*
Sprite format:
@@ -982,8 +982,8 @@ SCREEN_UPDATE( taitof2_ssi )
/* SSI only uses sprites, the tilemap registers are not even initialized.
(they are in Majestic 12, but the tilemaps are not used anyway) */
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(0, cliprect);
draw_sprites(screen.machine(), bitmap, cliprect, NULL, 0);
return 0;
}
@@ -997,8 +997,8 @@ SCREEN_UPDATE( taitof2_yesnoj )
tc0100scn_tilemap_update(state->m_tc0100scn);
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(0, cliprect); /* wrong color? */
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(0, cliprect); /* wrong color? */
draw_sprites(screen.machine(), bitmap, cliprect, NULL, 0);
tc0100scn_tilemap_draw(state->m_tc0100scn, bitmap, cliprect, tc0100scn_bottomlayer(state->m_tc0100scn), 0, 0);
tc0100scn_tilemap_draw(state->m_tc0100scn, bitmap, cliprect, tc0100scn_bottomlayer(state->m_tc0100scn) ^ 1, 0, 0);
@@ -1015,8 +1015,8 @@ SCREEN_UPDATE( taitof2 )
tc0100scn_tilemap_update(state->m_tc0100scn);
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(0, cliprect); /* wrong color? */
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(0, cliprect); /* wrong color? */
tc0100scn_tilemap_draw(state->m_tc0100scn, bitmap, cliprect, tc0100scn_bottomlayer(state->m_tc0100scn), 0, 0);
tc0100scn_tilemap_draw(state->m_tc0100scn, bitmap, cliprect, tc0100scn_bottomlayer(state->m_tc0100scn) ^ 1, 0, 0);
draw_sprites(screen.machine(), bitmap, cliprect, NULL, 0);
@@ -1048,8 +1048,8 @@ SCREEN_UPDATE( taitof2_pri )
state->m_spriteblendmode = tc0360pri_r(state->m_tc0360pri, 0) & 0xc0;
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(0, cliprect); /* wrong color? */
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(0, cliprect); /* wrong color? */
tc0100scn_tilemap_draw(state->m_tc0100scn, bitmap, cliprect, layer[0], 0, 1);
tc0100scn_tilemap_draw(state->m_tc0100scn, bitmap, cliprect, layer[1], 0, 2);
@@ -1061,7 +1061,7 @@ SCREEN_UPDATE( taitof2_pri )
-static void draw_roz_layer( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, UINT32 priority)
+static void draw_roz_layer( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, UINT32 priority)
{
taitof2_state *state = machine.driver_data<taitof2_state>();
@@ -1110,8 +1110,8 @@ SCREEN_UPDATE( taitof2_pri_roz )
state->m_spriteblendmode = tc0360pri_r(state->m_tc0360pri, 0) & 0xc0;
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(0, cliprect); /* wrong color? */
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(0, cliprect); /* wrong color? */
drawn = 0;
for (i = 0; i < 16; i++)
@@ -1173,8 +1173,8 @@ SCREEN_UPDATE( taitof2_thundfox )
spritepri[2] = tc0360pri_r(state->m_tc0360pri, 7) & 0x0f;
spritepri[3] = tc0360pri_r(state->m_tc0360pri, 7) >> 4;
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(0, cliprect); /* wrong color? */
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(0, cliprect); /* wrong color? */
/*
TODO: This isn't the correct way to handle the priority. At the moment of
@@ -1314,8 +1314,8 @@ SCREEN_UPDATE( taitof2_metalb )
state->m_spriteblendmode = tc0360pri_r(state->m_tc0360pri, 0) & 0xc0;
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(0, cliprect);
tc0480scp_tilemap_draw(state->m_tc0480scp, bitmap, cliprect, layer[0], 0 ,1);
tc0480scp_tilemap_draw(state->m_tc0480scp, bitmap, cliprect, layer[1], 0, 2);
@@ -1362,8 +1362,8 @@ SCREEN_UPDATE( taitof2_deadconx )
spritepri[2] = tc0360pri_r(state->m_tc0360pri, 7) & 0x0f;
spritepri[3] = tc0360pri_r(state->m_tc0360pri, 7) >> 4;
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(0, cliprect);
tc0480scp_tilemap_draw(state->m_tc0480scp, bitmap, cliprect, layer[0], 0 ,1);
tc0480scp_tilemap_draw(state->m_tc0480scp, bitmap, cliprect, layer[1], 0, 2);
diff --git a/src/mame/video/taito_f3.c b/src/mame/video/taito_f3.c
index 8d97611e8c1..27581713157 100644
--- a/src/mame/video/taito_f3.c
+++ b/src/mame/video/taito_f3.c
@@ -326,7 +326,7 @@ static void init_alpha_blend_func(running_machine &machine);
/******************************************************************************/
-static void print_debug_info(running_machine &machine, bitmap_t *bitmap)
+static void print_debug_info(running_machine &machine, bitmap_t &bitmap)
{
taito_f3_state *state = machine.driver_data<taito_f3_state>();
UINT16 *f3_line_ram = state->m_f3_line_ram;
@@ -1437,7 +1437,7 @@ static void init_alpha_blend_func(running_machine &machine)
/*============================================================================*/
INLINE void draw_scanlines(running_machine &machine,
- bitmap_t *bitmap,int xsize,INT16 *draw_line_num,
+ bitmap_t &bitmap,int xsize,INT16 *draw_line_num,
const struct f3_playfield_line_inf **line_t,
const int *sprite,
UINT32 orient,
@@ -1459,13 +1459,13 @@ INLINE void draw_scanlines(running_machine &machine,
UINT8 *dstp0,*dstp;
- int yadv = bitmap->rowpixels();
+ int yadv = bitmap.rowpixels();
int i=0,y=draw_line_num[0];
int ty = y;
if (orient & ORIENTATION_FLIP_Y)
{
- ty = bitmap->height() - 1 - ty;
+ ty = bitmap.height() - 1 - ty;
yadv = -yadv;
}
@@ -1482,7 +1482,7 @@ INLINE void draw_scanlines(running_machine &machine,
{
UINT32 *dsti0,*dsti;
- dsti0 = &bitmap->pix32(ty, x);
+ dsti0 = &bitmap.pix32(ty, x);
while(1)
{
int cx=0;
@@ -1846,8 +1846,6 @@ static void get_line_ram_info(running_machine &machine, tilemap_t *tmap, int sx,
{
taito_f3_state *state = machine.driver_data<taito_f3_state>();
struct f3_playfield_line_inf *line_t=&state->m_pf_line_inf[pos];
- const bitmap_t *srcbitmap;
- const bitmap_t *flagsbitmap;
int y,y_start,y_end,y_inc;
int line_base,zoom_base,col_base,pri_base,inc;
@@ -2011,8 +2009,8 @@ static void get_line_ram_info(running_machine &machine, tilemap_t *tmap, int sx,
}
/* set pixmap pointer */
- srcbitmap = tilemap_get_pixmap(tmap);
- flagsbitmap = tilemap_get_flagsmap(tmap);
+ bitmap_t &srcbitmap = tilemap_get_pixmap(tmap);
+ bitmap_t &flagsbitmap = tilemap_get_flagsmap(tmap);
if(line_t->alpha_mode[y]!=0)
{
@@ -2031,11 +2029,11 @@ static void get_line_ram_info(running_machine &machine, tilemap_t *tmap, int sx,
/* set pixmap index */
line_t->x_count[y]=x_index_fx & 0xffff; // Fractional part
- line_t->src_s[y]=src_s=&srcbitmap->pix16(y_index);
+ line_t->src_s[y]=src_s=&srcbitmap.pix16(y_index);
line_t->src_e[y]=&src_s[state->m_width_mask+1];
line_t->src[y]=&src_s[x_index_fx>>16];
- line_t->tsrc_s[y]=tsrc_s=&flagsbitmap->pix8(y_index);
+ line_t->tsrc_s[y]=tsrc_s=&flagsbitmap.pix8(y_index);
line_t->tsrc[y]=&tsrc_s[x_index_fx>>16];
}
@@ -2049,8 +2047,6 @@ static void get_vram_info(running_machine &machine, tilemap_t *vram_tilemap, til
taito_f3_state *state = machine.driver_data<taito_f3_state>();
const struct f3_spritealpha_line_inf *sprite_alpha_line_t=&state->m_sa_line_inf[0];
struct f3_playfield_line_inf *line_t=&state->m_pf_line_inf[4];
- const bitmap_t *srcbitmap_pixel, *srcbitmap_vram;
- const bitmap_t *flagsbitmap_pixel, *flagsbitmap_vram;
int y,y_start,y_end,y_inc;
int pri_base,inc;
@@ -2128,10 +2124,10 @@ static void get_vram_info(running_machine &machine, tilemap_t *vram_tilemap, til
sx&=0x1ff;
/* set pixmap pointer */
- srcbitmap_pixel = tilemap_get_pixmap(pixel_tilemap);
- flagsbitmap_pixel = tilemap_get_flagsmap(pixel_tilemap);
- srcbitmap_vram = tilemap_get_pixmap(vram_tilemap);
- flagsbitmap_vram = tilemap_get_flagsmap(vram_tilemap);
+ bitmap_t &srcbitmap_pixel = tilemap_get_pixmap(pixel_tilemap);
+ bitmap_t &flagsbitmap_pixel = tilemap_get_flagsmap(pixel_tilemap);
+ bitmap_t &srcbitmap_vram = tilemap_get_pixmap(vram_tilemap);
+ bitmap_t &flagsbitmap_vram = tilemap_get_flagsmap(vram_tilemap);
y=y_start;
while(y!=y_end)
@@ -2148,16 +2144,16 @@ static void get_vram_info(running_machine &machine, tilemap_t *vram_tilemap, til
/* set pixmap index */
line_t->x_count[y]=0xffff;
if (usePixelLayer)
- line_t->src_s[y]=src_s=&srcbitmap_pixel->pix16(sy&0xff);
+ line_t->src_s[y]=src_s=&srcbitmap_pixel.pix16(sy&0xff);
else
- line_t->src_s[y]=src_s=&srcbitmap_vram->pix16(sy&0x1ff);
+ line_t->src_s[y]=src_s=&srcbitmap_vram.pix16(sy&0x1ff);
line_t->src_e[y]=&src_s[vram_width_mask+1];
line_t->src[y]=&src_s[sx];
if (usePixelLayer)
- line_t->tsrc_s[y]=tsrc_s=&flagsbitmap_pixel->pix8(sy&0xff);
+ line_t->tsrc_s[y]=tsrc_s=&flagsbitmap_pixel.pix8(sy&0xff);
else
- line_t->tsrc_s[y]=tsrc_s=&flagsbitmap_vram->pix8(sy&0x1ff);
+ line_t->tsrc_s[y]=tsrc_s=&flagsbitmap_vram.pix8(sy&0x1ff);
line_t->tsrc[y]=&tsrc_s[sx];
}
@@ -2168,7 +2164,7 @@ static void get_vram_info(running_machine &machine, tilemap_t *vram_tilemap, til
/******************************************************************************/
-static void scanline_draw(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void scanline_draw(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
taito_f3_state *state = machine.driver_data<taito_f3_state>();
int i,j,y,ys,ye;
@@ -2597,7 +2593,7 @@ static void scanline_draw(running_machine &machine, bitmap_t *bitmap, const rect
pri++;
INLINE void f3_drawgfx(
- bitmap_t *dest_bmp,const rectangle &clip,const gfx_element *gfx,
+ bitmap_t &dest_bmp,const rectangle &clip,const gfx_element *gfx,
int code,
int color,
int flipx,int flipy,
@@ -2611,7 +2607,7 @@ INLINE void f3_drawgfx(
/* KW 991012 -- Added code to force clip to bitmap boundary */
myclip = clip;
- myclip &= dest_bmp->cliprect();
+ myclip &= dest_bmp.cliprect();
if( gfx )
@@ -2676,14 +2672,14 @@ INLINE void f3_drawgfx(
if( ex>sx && ey>sy)
{ /* skip if inner loop doesn't draw anything */
-// if (dest_bmp->bpp == 32)
+// if (dest_bmp.bpp == 32)
{
int y=ey-sy;
int x=(ex-sx-1)|(state->m_tile_opaque_sp[code % gfx->total_elements]<<4);
const UINT8 *source0 = code_base + y_index * 16 + x_index_base;
- UINT32 *dest0 = &dest_bmp->pix32(sy, sx);
+ UINT32 *dest0 = &dest_bmp.pix32(sy, sx);
UINT8 *pri0 = &state->m_pri_alp_bitmap->pix8(sy, sx);
- int yadv = dest_bmp->rowpixels();
+ int yadv = dest_bmp.rowpixels();
dy=dy*16;
while(1)
{
@@ -2746,7 +2742,7 @@ INLINE void f3_drawgfx(
INLINE void f3_drawgfxzoom(
- bitmap_t *dest_bmp,const rectangle &clip,const gfx_element *gfx,
+ bitmap_t &dest_bmp,const rectangle &clip,const gfx_element *gfx,
int code,
int color,
int flipx,int flipy,
@@ -2761,7 +2757,7 @@ INLINE void f3_drawgfxzoom(
/* KW 991012 -- Added code to force clip to bitmap boundary */
myclip = clip;
- myclip &= dest_bmp->cliprect();
+ myclip &= dest_bmp.cliprect();
if( gfx )
@@ -2826,13 +2822,13 @@ INLINE void f3_drawgfxzoom(
if( ex>sx )
{ /* skip if inner loop doesn't draw anything */
-// if (dest_bmp->bpp == 32)
+// if (dest_bmp.bpp == 32)
{
int y;
for( y=sy; y<ey; y++ )
{
const UINT8 *source = code_base + (y_index>>16) * 16;
- UINT32 *dest = &dest_bmp->pix32(y);
+ UINT32 *dest = &dest_bmp.pix32(y);
UINT8 *pri = &state->m_pri_alp_bitmap->pix8(y);
int x, x_index = x_index_base;
@@ -3134,7 +3130,7 @@ static void get_sprite_info(running_machine &machine, const UINT16 *spriteram16_
#undef CALC_ZOOM
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
taito_f3_state *state = machine.driver_data<taito_f3_state>();
const struct tempsprite *sprite_ptr;
diff --git a/src/mame/video/taito_h.c b/src/mame/video/taito_h.c
index 21d76f39f9a..d91f4ece257 100644
--- a/src/mame/video/taito_h.c
+++ b/src/mame/video/taito_h.c
@@ -70,7 +70,7 @@ static const int zoomy_conv_table[] =
Screen refresh
***************************************************************************/
-static void syvalion_draw_sprites( running_machine &machine,bitmap_t *bitmap, const rectangle &cliprect )
+static void syvalion_draw_sprites( running_machine &machine,bitmap_t &bitmap, const rectangle &cliprect )
{
/* Y chain size is 16/32?/64/64? pixels. X chain size
is always 64 pixels. */
@@ -163,7 +163,7 @@ static void syvalion_draw_sprites( running_machine &machine,bitmap_t *bitmap, co
}
}
-static void recordbr_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int priority )
+static void recordbr_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int priority )
{
/* Y chain size is 16/32?/64/64? pixels. X chain size
is always 64 pixels. */
@@ -275,7 +275,7 @@ static void recordbr_draw_sprites( running_machine &machine, bitmap_t *bitmap, c
}
}
-static void dleague_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int priority )
+static void dleague_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int priority )
{
/* Y chain size is 16/32?/64/64? pixels. X chain size
is always 64 pixels. */
@@ -399,7 +399,7 @@ SCREEN_UPDATE( syvalion )
taitoh_log_vram(screen.machine());
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
tc0080vco_tilemap_draw(state->m_tc0080vco, bitmap, cliprect, 0, TILEMAP_DRAW_OPAQUE, 0);
tc0080vco_tilemap_draw(state->m_tc0080vco, bitmap, cliprect, 1, 0, 0);
@@ -418,7 +418,7 @@ SCREEN_UPDATE( recordbr )
taitoh_log_vram(screen.machine());
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
#ifdef MAME_DEBUG
if (!screen.machine().input().code_pressed(KEYCODE_A))
@@ -449,7 +449,7 @@ SCREEN_UPDATE( dleague )
taitoh_log_vram(screen.machine());
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
#ifdef MAME_DEBUG
if (!screen.machine().input().code_pressed(KEYCODE_A))
diff --git a/src/mame/video/taito_l.c b/src/mame/video/taito_l.c
index 4efed30235f..9fbe7d9ce1d 100644
--- a/src/mame/video/taito_l.c
+++ b/src/mame/video/taito_l.c
@@ -243,7 +243,7 @@ void taitol_obj1b_m( running_machine &machine, int offset )
plgirs2 bullets and raimais big bosses.
*/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
taitol_state *state = machine.driver_data<taitol_state>();
int offs;
@@ -307,7 +307,7 @@ SCREEN_UPDATE( taitol )
if (state->m_cur_ctrl & 0x20) /* display enable */
{
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
tilemap_draw(bitmap, cliprect, state->m_bg19_tilemap, 0, 0);
@@ -321,7 +321,7 @@ SCREEN_UPDATE( taitol )
tilemap_draw(bitmap, cliprect, state->m_ch1a_tilemap, 0, 0);
}
else
- bitmap->fill(screen.machine().pens[0], cliprect);
+ bitmap.fill(screen.machine().pens[0], cliprect);
return 0;
}
diff --git a/src/mame/video/taito_o.c b/src/mame/video/taito_o.c
index 6c236628acc..c6b897a0c63 100644
--- a/src/mame/video/taito_o.c
+++ b/src/mame/video/taito_o.c
@@ -25,7 +25,7 @@ static const int zoomy_conv_table[] =
};
-static void parentj_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int priority )
+static void parentj_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int priority )
{
/* Y chain size is 16/32?/64/64? pixels. X chain size
is always 64 pixels. */
@@ -144,7 +144,7 @@ SCREEN_UPDATE( parentj )
tc0080vco_tilemap_update(state->m_tc0080vco);
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
tc0080vco_tilemap_draw(state->m_tc0080vco, bitmap, cliprect, 0, TILEMAP_DRAW_OPAQUE, 0);
diff --git a/src/mame/video/taito_z.c b/src/mame/video/taito_z.c
index afa1c67caeb..5434c8aeab6 100644
--- a/src/mame/video/taito_z.c
+++ b/src/mame/video/taito_z.c
@@ -146,7 +146,7 @@ confirmed
********************************************************/
-static void contcirc_draw_sprites_16x8( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int y_offs )
+static void contcirc_draw_sprites_16x8( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int y_offs )
{
taitoz_state *state = machine.driver_data<taitoz_state>();
UINT16 *spritemap = (UINT16 *)machine.region("user1")->base();
@@ -241,7 +241,7 @@ static void contcirc_draw_sprites_16x8( running_machine &machine, bitmap_t *bitm
-static void chasehq_draw_sprites_16x16( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int y_offs )
+static void chasehq_draw_sprites_16x16( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int y_offs )
{
taitoz_state *state = machine.driver_data<taitoz_state>();
UINT16 *spritemap = (UINT16 *)machine.region("user1")->base();
@@ -427,7 +427,7 @@ static void chasehq_draw_sprites_16x16( running_machine &machine, bitmap_t *bitm
-static void bshark_draw_sprites_16x8( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int y_offs )
+static void bshark_draw_sprites_16x8( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int y_offs )
{
taitoz_state *state = machine.driver_data<taitoz_state>();
UINT16 *spritemap = (UINT16 *)machine.region("user1")->base();
@@ -523,7 +523,7 @@ static void bshark_draw_sprites_16x8( running_machine &machine, bitmap_t *bitmap
-static void sci_draw_sprites_16x8( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int y_offs )
+static void sci_draw_sprites_16x8( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int y_offs )
{
taitoz_state *state = machine.driver_data<taitoz_state>();
UINT16 *spritemap = (UINT16 *)machine.region("user1")->base();
@@ -628,7 +628,7 @@ static void sci_draw_sprites_16x8( running_machine &machine, bitmap_t *bitmap, c
-static void aquajack_draw_sprites_16x8(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect,int y_offs)
+static void aquajack_draw_sprites_16x8(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect,int y_offs)
{
taitoz_state *state = machine.driver_data<taitoz_state>();
UINT16 *spritemap = (UINT16 *)machine.region("user1")->base();
@@ -723,7 +723,7 @@ static void aquajack_draw_sprites_16x8(running_machine &machine, bitmap_t *bitma
-static void spacegun_draw_sprites_16x8(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect,int y_offs)
+static void spacegun_draw_sprites_16x8(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect,int y_offs)
{
taitoz_state *state = machine.driver_data<taitoz_state>();
UINT16 *spritemap = (UINT16 *)machine.region("user1")->base();
@@ -853,9 +853,9 @@ SCREEN_UPDATE( contcirc )
layer[1] = layer[0] ^ 1;
layer[2] = 2;
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
tc0100scn_tilemap_draw(state->m_tc0100scn, bitmap, cliprect, layer[0], 0, 0);
tc0100scn_tilemap_draw(state->m_tc0100scn, bitmap, cliprect, layer[1], 0, 1);
@@ -880,10 +880,10 @@ SCREEN_UPDATE( chasehq )
layer[1] = layer[0] ^ 1;
layer[2] = 2;
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
/* Ensure screen blanked even when bottom layer not drawn due to disable bit */
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
tc0100scn_tilemap_draw(state->m_tc0100scn, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 0);
tc0100scn_tilemap_draw(state->m_tc0100scn, bitmap, cliprect, layer[1], 0, 1);
@@ -906,10 +906,10 @@ SCREEN_UPDATE( bshark )
layer[1] = layer[0] ^ 1;
layer[2] = 2;
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
/* Ensure screen blanked even when bottom layer not drawn due to disable bit */
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
tc0100scn_tilemap_draw(state->m_tc0100scn, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 0);
tc0100scn_tilemap_draw(state->m_tc0100scn, bitmap, cliprect, layer[1], 0, 1);
@@ -932,10 +932,10 @@ SCREEN_UPDATE( sci )
layer[1] = layer[0] ^ 1;
layer[2] = 2;
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
/* Ensure screen blanked even when bottom layer not drawn due to disable bit */
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
tc0100scn_tilemap_draw(state->m_tc0100scn, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 0);
tc0100scn_tilemap_draw(state->m_tc0100scn, bitmap, cliprect, layer[1], 0, 1);
@@ -958,10 +958,10 @@ SCREEN_UPDATE( aquajack )
layer[1] = layer[0] ^ 1;
layer[2] = 2;
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
/* Ensure screen blanked even when bottom layer not drawn due to disable bit */
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
tc0100scn_tilemap_draw(state->m_tc0100scn, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 0);
tc0100scn_tilemap_draw(state->m_tc0100scn, bitmap, cliprect, layer[1], 0, 1);
@@ -984,10 +984,10 @@ SCREEN_UPDATE( spacegun )
layer[1] = layer[0] ^ 1;
layer[2] = 2;
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
/* Ensure screen blanked even when bottom layer not drawn due to disable bit */
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
tc0100scn_tilemap_draw(state->m_tc0100scn, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 1);
tc0100scn_tilemap_draw(state->m_tc0100scn, bitmap, cliprect, layer[1], 0, 2);
@@ -1015,10 +1015,10 @@ SCREEN_UPDATE( dblaxle )
layer[3] = (priority & 0x000f) >> 0; /* tells us which is top */
layer[4] = 4; /* text layer always over bg layers */
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
/* Ensure screen blanked - this shouldn't be necessary! */
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
tc0480scp_tilemap_draw(state->m_tc0480scp, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 0);
tc0480scp_tilemap_draw(state->m_tc0480scp, bitmap, cliprect, layer[1], 0, 0);
diff --git a/src/mame/video/taitoair.c b/src/mame/video/taitoair.c
index 277634179b0..2ce4030bb37 100644
--- a/src/mame/video/taitoair.c
+++ b/src/mame/video/taitoair.c
@@ -69,7 +69,7 @@ static const int zoomy_conv_table[] =
Screen refresh
***************************************************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int priority )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int priority )
{
/* Y chain size is 16/32?/64/64? pixels. X chain size
is always 64 pixels. */
@@ -182,7 +182,7 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
}
}
-static void fill_slope( bitmap_t *bitmap, const rectangle &cliprect, int color, INT32 x1, INT32 x2, INT32 sl1, INT32 sl2, INT32 y1, INT32 y2, INT32 *nx1, INT32 *nx2 )
+static void fill_slope( bitmap_t &bitmap, const rectangle &cliprect, int color, INT32 x1, INT32 x2, INT32 sl1, INT32 sl2, INT32 y1, INT32 y2, INT32 *nx1, INT32 *nx2 )
{
if (y1 > cliprect.max_y)
return;
@@ -243,7 +243,7 @@ static void fill_slope( bitmap_t *bitmap, const rectangle &cliprect, int color,
while (xx1 <= xx2)
{
- bitmap->pix16(y1, xx1) = color + grad_col;
+ bitmap.pix16(y1, xx1) = color + grad_col;
xx1++;
}
}
@@ -257,7 +257,7 @@ static void fill_slope( bitmap_t *bitmap, const rectangle &cliprect, int color,
*nx2 = x2;
}
-static void fill_poly( bitmap_t *bitmap, const rectangle &cliprect, const struct taitoair_poly *q )
+static void fill_poly( bitmap_t &bitmap, const rectangle &cliprect, const struct taitoair_poly *q )
{
INT32 sl1, sl2, cury, limy, x1, x2;
int pmin, pmax, i, ps1, ps2;
@@ -374,7 +374,7 @@ WRITE16_HANDLER( dsp_flags_w )
/* clear screen fb */
state->m_framebuffer[1]->fill(0, cliprect);
/* copy buffer fb into screen fb (at this stage we are ready to draw) */
- copybitmap_trans(state->m_framebuffer[1], state->m_framebuffer[0], 0, 0, 0, 0, cliprect, 0);
+ copybitmap_trans(*state->m_framebuffer[1], *state->m_framebuffer[0], 0, 0, 0, 0, cliprect, 0);
/* now clear buffer fb */
state->m_framebuffer[0]->fill(0, cliprect);
}
@@ -407,7 +407,7 @@ WRITE16_HANDLER( dsp_flags_w )
}
adr--;
state->m_q.pcount = pcount;
- fill_poly(state->m_framebuffer[0], cliprect, &state->m_q);
+ fill_poly(*state->m_framebuffer[0], cliprect, &state->m_q);
}
}
}
@@ -577,7 +577,7 @@ SCREEN_UPDATE( taitoair )
tc0080vco_tilemap_update(state->m_tc0080vco);
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
{
int x,y;
@@ -593,7 +593,7 @@ SCREEN_UPDATE( taitoair )
{
for(x=cliprect.min_x;x<cliprect.max_x;x++)
{
- bitmap->pix16(y, x) = 0x2000 + (0x3f - ((y >> 2) & 0x3f));
+ bitmap.pix16(y, x) = 0x2000 + (0x3f - ((y >> 2) & 0x3f));
}
}
@@ -602,7 +602,7 @@ SCREEN_UPDATE( taitoair )
{
for(x=cliprect.min_x;x<cliprect.max_x;x++)
{
- bitmap->pix16(y, x) = 0x2040 + (0x3f - ((y >> 2) & 0x3f));
+ bitmap.pix16(y, x) = 0x2040 + (0x3f - ((y >> 2) & 0x3f));
}
}
#endif
@@ -612,7 +612,7 @@ SCREEN_UPDATE( taitoair )
draw_sprites(screen.machine(), bitmap, cliprect, 0);
- copybitmap_trans(bitmap, state->m_framebuffer[1], 0, 0, 0, 0, cliprect, 0);
+ copybitmap_trans(bitmap, *state->m_framebuffer[1], 0, 0, 0, 0, cliprect, 0);
tc0080vco_tilemap_draw(state->m_tc0080vco, bitmap, cliprect, 1, 0, 0);
diff --git a/src/mame/video/taitoic.c b/src/mame/video/taitoic.c
index 913cee2e0c4..f1328c6c510 100644
--- a/src/mame/video/taitoic.c
+++ b/src/mame/video/taitoic.c
@@ -501,11 +501,11 @@ The data bus is 16 bits wide.
/* These scanline drawing routines lifted from Taito F3: optimise / merge ? */
-INLINE void taitoic_drawscanline( bitmap_t *bitmap, const rectangle &cliprect, int x, int y,
- const UINT16 *src, int transparent, UINT32 orient, bitmap_t *priority, int pri)
+INLINE void taitoic_drawscanline( bitmap_t &bitmap, const rectangle &cliprect, int x, int y,
+ const UINT16 *src, int transparent, UINT32 orient, bitmap_t &priority, int pri)
{
- UINT16 *dsti = &bitmap->pix16(y, x);
- UINT8 *dstp = &priority->pix8(y, x);
+ UINT16 *dsti = &bitmap.pix16(y, x);
+ UINT8 *dstp = &priority.pix8(y, x);
int length = cliprect.max_x - cliprect.min_x + 1;
src += cliprect.min_x;
@@ -834,7 +834,7 @@ static UINT16 topspeed_get_road_pixel_color( UINT16 pixel, UINT16 color )
}
-static void topspeed_custom_draw( device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int layer, int flags,
+static void topspeed_custom_draw( device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int layer, int flags,
UINT32 priority, UINT16 *color_ctrl_ram )
{
pc080sn_state *pc080sn = pc080sn_get_safe_token(device);
@@ -842,8 +842,8 @@ static void topspeed_custom_draw( device_t *device, bitmap_t *bitmap, const rect
UINT8 *tsrc;
UINT16 scanline[1024]; /* won't be called by a wide-screen game, but just in case... */
- bitmap_t *srcbitmap = tilemap_get_pixmap(pc080sn->tilemap[layer]);
- bitmap_t *flagsbitmap = tilemap_get_flagsmap(pc080sn->tilemap[layer]);
+ bitmap_t &srcbitmap = tilemap_get_pixmap(pc080sn->tilemap[layer]);
+ bitmap_t &flagsbitmap = tilemap_get_flagsmap(pc080sn->tilemap[layer]);
UINT16 a, color;
int sx, x_index;
@@ -883,8 +883,8 @@ static void topspeed_custom_draw( device_t *device, bitmap_t *bitmap, const rect
x_index = sx - (pc080sn->bgscroll_ram[layer][row_index]);
- src16 = &srcbitmap->pix16(src_y_index);
- tsrc = &flagsbitmap->pix8(src_y_index);
+ src16 = &srcbitmap.pix16(src_y_index);
+ tsrc = &flagsbitmap.pix8(src_y_index);
dst16 = scanline;
if (flags & TILEMAP_DRAW_OPAQUE)
@@ -928,13 +928,13 @@ static void topspeed_custom_draw( device_t *device, bitmap_t *bitmap, const rect
while ((!machine_flip && y <= max_y) || (machine_flip && y >= min_y));
}
-void pc080sn_tilemap_draw( device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int layer, int flags, UINT32 priority )
+void pc080sn_tilemap_draw( device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int layer, int flags, UINT32 priority )
{
pc080sn_state *pc080sn = pc080sn_get_safe_token(device);
tilemap_draw(bitmap, cliprect, pc080sn->tilemap[layer], flags, priority);
}
-void pc080sn_tilemap_draw_offset( device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int layer, int flags, UINT32 priority, int xoffs, int yoffs )
+void pc080sn_tilemap_draw_offset( device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int layer, int flags, UINT32 priority, int xoffs, int yoffs )
{
pc080sn_state *pc080sn = pc080sn_get_safe_token(device);
int basedx = -16 - pc080sn->xoffs;
@@ -949,7 +949,7 @@ void pc080sn_tilemap_draw_offset( device_t *device, bitmap_t *bitmap, const rect
tilemap_set_scrolldy(pc080sn->tilemap[layer], basedy, basedyflip);
}
-void pc080sn_tilemap_draw_special( device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int layer, int flags, UINT32 priority, UINT16 *ram )
+void pc080sn_tilemap_draw_special( device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int layer, int flags, UINT32 priority, UINT16 *ram )
{
topspeed_custom_draw(device, bitmap, cliprect, layer, flags, priority, ram);
}
@@ -1122,7 +1122,7 @@ void pc090oj_eof_callback( device_t *device )
}
-void pc090oj_draw_sprites( device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int pri_type )
+void pc090oj_draw_sprites( device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int pri_type )
{
pc090oj_state *pc090oj = pc090oj_get_safe_token(device);
int offs, priority = 0;
@@ -1528,7 +1528,7 @@ void tc0080vco_tilemap_update( device_t *device )
/* NB: orientation_flipx code in following routine has not been tested */
-static void tc0080vco_bg0_tilemap_draw( device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int flags, UINT32 priority )
+static void tc0080vco_bg0_tilemap_draw( device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int flags, UINT32 priority )
{
tc0080vco_state *tc0080vco = tc0080vco_get_safe_token(device);
UINT16 zoom = tc0080vco->scroll_ram[6];
@@ -1546,8 +1546,8 @@ static void tc0080vco_bg0_tilemap_draw( device_t *device, bitmap_t *bitmap, cons
UINT16 *dst16, *src16;
UINT8 *tsrc;
UINT16 scanline[512];
- bitmap_t *srcbitmap = tilemap_get_pixmap(tc0080vco->tilemap[0]);
- bitmap_t *flagsbitmap = tilemap_get_flagsmap(tc0080vco->tilemap[0]);
+ bitmap_t &srcbitmap = tilemap_get_pixmap(tc0080vco->tilemap[0]);
+ bitmap_t &flagsbitmap = tilemap_get_flagsmap(tc0080vco->tilemap[0]);
int sx, zoomx, zoomy;
int dx, ex, dy, ey;
@@ -1629,8 +1629,8 @@ static void tc0080vco_bg0_tilemap_draw( device_t *device, bitmap_t *bitmap, cons
x_index = sx - ((tc0080vco->bgscroll_ram[row_index] << 16));
- src16 = &srcbitmap->pix16(src_y_index);
- tsrc = &flagsbitmap->pix8(src_y_index);
+ src16 = &srcbitmap.pix16(src_y_index);
+ tsrc = &flagsbitmap.pix8(src_y_index);
dst16 = scanline;
x_step = zoomx;
@@ -1681,7 +1681,7 @@ do \
} \
while (0) \
-static void tc0080vco_bg1_tilemap_draw( device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int flags, UINT32 priority )
+static void tc0080vco_bg1_tilemap_draw( device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int flags, UINT32 priority )
{
tc0080vco_state *tc0080vco = tc0080vco_get_safe_token(device);
UINT8 layer = 1;
@@ -1705,7 +1705,7 @@ static void tc0080vco_bg1_tilemap_draw( device_t *device, bitmap_t *bitmap, cons
int sx,sy;
/* shouldn't we set no_clip before doing this (see TC0480SCP) ? */
- bitmap_t *srcbitmap = tilemap_get_pixmap(tc0080vco->tilemap[layer]);
+ bitmap_t &srcbitmap = tilemap_get_pixmap(tc0080vco->tilemap[layer]);
if (zoomx < 63)
{
@@ -1746,8 +1746,8 @@ static void tc0080vco_bg1_tilemap_draw( device_t *device, bitmap_t *bitmap, cons
}
{
- bitmap_t *dest = bitmap;
- bitmap_t *src = srcbitmap;
+ bitmap_t &dest = bitmap;
+ bitmap_t &src = srcbitmap;
INT32 startx = sx;
INT32 starty = sy;
INT32 incxx = zx;
@@ -1756,9 +1756,9 @@ static void tc0080vco_bg1_tilemap_draw( device_t *device, bitmap_t *bitmap, cons
INT32 incyy = zy;
int wraparound = 0;
UINT32 privalue = priority;
- bitmap_t *priority = device->machine().priority_bitmap;
+ bitmap_t &priority = device->machine().priority_bitmap;
- if (dest->bpp() == 16)
+ if (dest.bpp() == 16)
COPYROZBITMAP_CORE(UINT16, PIXEL_OP_COPY_TRANS0_SET_PRIORITY, UINT8);
else
COPYROZBITMAP_CORE(UINT32, PIXEL_OP_COPY_TRANS0_SET_PRIORITY, UINT8);
@@ -1767,7 +1767,7 @@ static void tc0080vco_bg1_tilemap_draw( device_t *device, bitmap_t *bitmap, cons
}
-void tc0080vco_tilemap_draw( device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int layer, int flags, UINT32 priority )
+void tc0080vco_tilemap_draw( device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int layer, int flags, UINT32 priority )
{
tc0080vco_state *tc0080vco = tc0080vco_get_safe_token(device);
int disable = 0x00; /* possibly layer disable bits do exist ?? */
@@ -2326,17 +2326,17 @@ void tc0100scn_tilemap_update( device_t *device )
tilemap_set_scrollx(tc0100scn->tilemap[1][tc0100scn->dblwidth], (j + tc0100scn->fgscrolly) & 0x1ff, tc0100scn->fgscrollx - tc0100scn->fgscroll_ram[j]);
}
-static void tc0100scn_tilemap_draw_fg( device_t *device, bitmap_t *bitmap, const rectangle &cliprect, tilemap_t* tmap, int flags, UINT32 priority )
+static void tc0100scn_tilemap_draw_fg( device_t *device, bitmap_t &bitmap, const rectangle &cliprect, tilemap_t* tmap, int flags, UINT32 priority )
{
tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(device);
- const bitmap_t *src_bitmap = tilemap_get_pixmap(tmap);
+ const bitmap_t &src_bitmap = tilemap_get_pixmap(tmap);
int width_mask, height_mask, x, y, p;
int column_offset, src_x = 0, src_y = 0;
int scrollx_delta = - tilemap_get_scrolldx(tmap);
int scrolly_delta = - tilemap_get_scrolldy(tmap);
- width_mask = src_bitmap->width() - 1;
- height_mask = src_bitmap->height() - 1;
+ width_mask = src_bitmap.width() - 1;
+ height_mask = src_bitmap.height() - 1;
src_y = (tc0100scn->fgscrolly + scrolly_delta) & height_mask;
if (tc0100scn->ctrl[0x7] & 1) // Flipscreen
@@ -2355,14 +2355,14 @@ static void tc0100scn_tilemap_draw_fg( device_t *device, bitmap_t *bitmap, const
for (x = 0; x <= (cliprect.max_x - cliprect.min_x); x++)
{
column_offset = tc0100scn->colscroll_ram[(src_x & 0x3ff) / 8];
- p = src_bitmap->pix16((src_y - column_offset) & height_mask, src_x);
+ p = src_bitmap.pix16((src_y - column_offset) & height_mask, src_x);
if ((p & 0xf)!= 0 || (flags & TILEMAP_DRAW_OPAQUE))
{
- bitmap->pix16(y, x + cliprect.min_x) = p;
- if (device->machine().priority_bitmap)
+ bitmap.pix16(y, x + cliprect.min_x) = p;
+ if (device->machine().priority_bitmap.valid())
{
- UINT8 *pri = &device->machine().priority_bitmap->pix8(y);
+ UINT8 *pri = &device->machine().priority_bitmap.pix8(y);
pri[x + cliprect.min_x] |= priority;
}
}
@@ -2372,7 +2372,7 @@ static void tc0100scn_tilemap_draw_fg( device_t *device, bitmap_t *bitmap, const
}
}
-int tc0100scn_tilemap_draw( device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int layer, int flags, UINT32 priority )
+int tc0100scn_tilemap_draw( device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int layer, int flags, UINT32 priority )
{
tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(device);
int disable = tc0100scn->ctrl[6] & 0xf7;
@@ -2633,7 +2633,7 @@ void tc0430grw_tilemap_update( device_t *device, int base_color )
tc0280grd_tilemap_update(device, base_color);
}
-static void zoom_draw( device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int xoffset, int yoffset, UINT32 priority, int xmultiply )
+static void zoom_draw( device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int xoffset, int yoffset, UINT32 priority, int xmultiply )
{
tc0280grd_state *tc0280grd = tc0280grd_get_safe_token(device);
UINT32 startx, starty;
@@ -2668,12 +2668,12 @@ static void zoom_draw( device_t *device, bitmap_t *bitmap, const rectangle &clip
0, priority);
}
-void tc0280grd_zoom_draw( device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int xoffset, int yoffset, UINT32 priority )
+void tc0280grd_zoom_draw( device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int xoffset, int yoffset, UINT32 priority )
{
zoom_draw(device, bitmap, cliprect, xoffset, yoffset, priority, 2);
}
-void tc0430grw_zoom_draw( device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int xoffset, int yoffset, UINT32 priority )
+void tc0430grw_zoom_draw( device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int xoffset, int yoffset, UINT32 priority )
{
zoom_draw(device, bitmap, cliprect, xoffset, yoffset, priority, 1);
}
@@ -3236,7 +3236,7 @@ Historical Issues
**********************************************************************/
-static void tc0480scp_bg01_draw( device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int layer, int flags, UINT32 priority )
+static void tc0480scp_bg01_draw( device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int layer, int flags, UINT32 priority )
{
/* X-axis zoom offers expansion only: 0 = no zoom, 0xff = max
Y-axis zoom offers expansion/compression: 0x7f = no zoom, 0xff = max
@@ -3257,8 +3257,8 @@ static void tc0480scp_bg01_draw( device_t *device, bitmap_t *bitmap, const recta
UINT8 *tsrc;
UINT16 scanline[512];
UINT32 sx;
- bitmap_t *srcbitmap = tilemap_get_pixmap(tc0480scp->tilemap[layer][tc0480scp->dblwidth]);
- bitmap_t *flagsbitmap = tilemap_get_flagsmap(tc0480scp->tilemap[layer][tc0480scp->dblwidth]);
+ bitmap_t &srcbitmap = tilemap_get_pixmap(tc0480scp->tilemap[layer][tc0480scp->dblwidth]);
+ bitmap_t &flagsbitmap = tilemap_get_flagsmap(tc0480scp->tilemap[layer][tc0480scp->dblwidth]);
int flip = tc0480scp->pri_reg & 0x40;
int i, y, y_index, src_y_index, row_index;
int x_index, x_step;
@@ -3305,8 +3305,8 @@ static void tc0480scp_bg01_draw( device_t *device, bitmap_t *bitmap, const recta
x_index = sx - ((tc0480scp->bgscroll_ram[layer][row_index] << 16)) - ((tc0480scp->bgscroll_ram[layer][row_index + 0x800] << 8) & 0xffff);
- src16 = &srcbitmap->pix16(src_y_index);
- tsrc = &flagsbitmap->pix8(src_y_index);
+ src16 = &srcbitmap.pix16(src_y_index);
+ tsrc = &flagsbitmap.pix8(src_y_index);
dst16 = scanline;
x_step = zoomx;
@@ -3385,11 +3385,11 @@ flipscreen.
****************************************************************/
-static void tc0480scp_bg23_draw( device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int layer, int flags, UINT32 priority )
+static void tc0480scp_bg23_draw( device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int layer, int flags, UINT32 priority )
{
tc0480scp_state *tc0480scp = tc0480scp_get_safe_token(device);
- bitmap_t *srcbitmap = tilemap_get_pixmap(tc0480scp->tilemap[layer][tc0480scp->dblwidth]);
- bitmap_t *flagsbitmap = tilemap_get_flagsmap(tc0480scp->tilemap[layer][tc0480scp->dblwidth]);
+ bitmap_t &srcbitmap = tilemap_get_pixmap(tc0480scp->tilemap[layer][tc0480scp->dblwidth]);
+ bitmap_t &flagsbitmap = tilemap_get_flagsmap(tc0480scp->tilemap[layer][tc0480scp->dblwidth]);
UINT16 *dst16, *src16;
UINT8 *tsrc;
@@ -3471,8 +3471,8 @@ static void tc0480scp_bg23_draw( device_t *device, bitmap_t *bitmap, const recta
x_step -= (((row_zoom & 0xff) * 256) & 0xffff);
}
- src16 = &srcbitmap->pix16(src_y_index);
- tsrc = &flagsbitmap->pix8(src_y_index);
+ src16 = &srcbitmap.pix16(src_y_index);
+ tsrc = &flagsbitmap.pix8(src_y_index);
dst16 = scanline;
if (flags & TILEMAP_DRAW_OPAQUE)
@@ -3507,7 +3507,7 @@ static void tc0480scp_bg23_draw( device_t *device, bitmap_t *bitmap, const recta
}
-void tc0480scp_tilemap_draw( device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int layer, int flags, UINT32 priority )
+void tc0480scp_tilemap_draw( device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int layer, int flags, UINT32 priority )
{
tc0480scp_state *tc0480scp = tc0480scp_get_safe_token(device);
@@ -3951,7 +3951,7 @@ lookup table from rom for the TaitoZ sprites.
******************************************************************************/
-void tc0150rod_draw( device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int y_offs, int palette_offs, int type, int road_trans, UINT32 low_priority, UINT32 high_priority )
+void tc0150rod_draw( device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int y_offs, int palette_offs, int type, int road_trans, UINT32 low_priority, UINT32 high_priority )
{
tc0150rod_state *tc0150rod = tc0150rod_get_safe_token(device);
@@ -5014,7 +5014,7 @@ WRITE16_DEVICE_HANDLER( tc0180vcu_word_w )
tilemap_mark_tile_dirty(tc0180vcu->tilemap[2], offset & 0x7ff);
}
-void tc0180vcu_tilemap_draw( device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int tmap_num, int plane )
+void tc0180vcu_tilemap_draw( device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int tmap_num, int plane )
{
tc0180vcu_state *tc0180vcu = tc0180vcu_get_safe_token(device);
@@ -5048,8 +5048,8 @@ void tc0180vcu_tilemap_draw( device_t *device, bitmap_t *bitmap, const rectangle
if (tc0180vcu->video_control & 0x10) /*flip screen*/
{
- my_clip.min_y = bitmap->height() - 1 - (i + 1) * lines_per_block - 1;
- my_clip.max_y = bitmap->height() - 1 - i * lines_per_block;
+ my_clip.min_y = bitmap.height() - 1 - (i + 1) * lines_per_block - 1;
+ my_clip.max_y = bitmap.height() - 1 - i * lines_per_block;
}
my_clip &= cliprect;
diff --git a/src/mame/video/taitoic.h b/src/mame/video/taitoic.h
index 03b8fb7ab08..46a77a45c2f 100644
--- a/src/mame/video/taitoic.h
+++ b/src/mame/video/taitoic.h
@@ -180,11 +180,11 @@ WRITE16_DEVICE_HANDLER( pc080sn_ctrl_word_w );
void pc080sn_set_scroll(device_t *device, int tilemap_num, int scrollx, int scrolly);
void pc080sn_set_trans_pen(device_t *device, int tilemap_num, int pen);
void pc080sn_tilemap_update(device_t *device);
-void pc080sn_tilemap_draw(device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int layer, int flags, UINT32 priority);
-void pc080sn_tilemap_draw_offset(device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int layer, int flags, UINT32 priority, int xoffs, int yoffs);
+void pc080sn_tilemap_draw(device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int layer, int flags, UINT32 priority);
+void pc080sn_tilemap_draw_offset(device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int layer, int flags, UINT32 priority, int xoffs, int yoffs);
/* For Topspeed */
-void pc080sn_tilemap_draw_special(device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int layer, int flags, UINT32 priority, UINT16 *ram);
+void pc080sn_tilemap_draw_special(device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int layer, int flags, UINT32 priority, UINT16 *ram);
/** PC090OJ **/
@@ -193,7 +193,7 @@ WRITE16_DEVICE_HANDLER( pc090oj_word_w );
void pc090oj_set_sprite_ctrl(device_t *device, UINT16 sprctrl);
void pc090oj_eof_callback(device_t *device);
-void pc090oj_draw_sprites(device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int pri_type);
+void pc090oj_draw_sprites(device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int pri_type);
/** TC0080VCO **/
@@ -201,7 +201,7 @@ READ16_DEVICE_HANDLER( tc0080vco_word_r );
WRITE16_DEVICE_HANDLER( tc0080vco_word_w );
void tc0080vco_tilemap_update(device_t *device);
-void tc0080vco_tilemap_draw(device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int layer, int flags, UINT32 priority);
+void tc0080vco_tilemap_draw(device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int layer, int flags, UINT32 priority);
READ16_DEVICE_HANDLER( tc0080vco_cram_0_r );
READ16_DEVICE_HANDLER( tc0080vco_cram_1_r );
@@ -239,7 +239,7 @@ READ32_DEVICE_HANDLER( tc0100scn_ctrl_long_r );
WRITE32_DEVICE_HANDLER( tc0100scn_ctrl_long_w );
void tc0100scn_tilemap_update(device_t *device);
-int tc0100scn_tilemap_draw(device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int layer, int flags, UINT32 priority);
+int tc0100scn_tilemap_draw(device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int layer, int flags, UINT32 priority);
/* returns 0 or 1 depending on the lowest priority tilemap set in the internal
register. Use this function to draw tilemaps in the correct order. */
@@ -251,13 +251,13 @@ READ16_DEVICE_HANDLER( tc0280grd_word_r );
WRITE16_DEVICE_HANDLER( tc0280grd_word_w );
WRITE16_DEVICE_HANDLER( tc0280grd_ctrl_word_w );
void tc0280grd_tilemap_update(device_t *device, int base_color);
-void tc0280grd_zoom_draw(device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int xoffset, int yoffset, UINT32 priority);
+void tc0280grd_zoom_draw(device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int xoffset, int yoffset, UINT32 priority);
READ16_DEVICE_HANDLER( tc0430grw_word_r );
WRITE16_DEVICE_HANDLER( tc0430grw_word_w );
WRITE16_DEVICE_HANDLER( tc0430grw_ctrl_word_w );
void tc0430grw_tilemap_update(device_t *device, int base_color);
-void tc0430grw_zoom_draw(device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int xoffset, int yoffset, UINT32 priority);
+void tc0430grw_zoom_draw(device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int xoffset, int yoffset, UINT32 priority);
/** TC0360PRI **/
@@ -282,7 +282,7 @@ READ32_DEVICE_HANDLER( tc0480scp_ctrl_long_r );
WRITE32_DEVICE_HANDLER( tc0480scp_ctrl_long_w );
void tc0480scp_tilemap_update(device_t *device);
-void tc0480scp_tilemap_draw(device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int layer, int flags, UINT32 priority);
+void tc0480scp_tilemap_draw(device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int layer, int flags, UINT32 priority);
/* Returns the priority order of the bg tilemaps set in the internal
register. The order in which the four layers should be drawn is
@@ -296,7 +296,7 @@ READ8_DEVICE_HANDLER( tc0480scp_pri_reg_r );
/** TC0150ROD **/
READ16_DEVICE_HANDLER( tc0150rod_word_r );
WRITE16_DEVICE_HANDLER( tc0150rod_word_w );
-void tc0150rod_draw(device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int y_offs, int palette_offs, int type, int road_trans, UINT32 low_priority, UINT32 high_priority);
+void tc0150rod_draw(device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int y_offs, int palette_offs, int type, int road_trans, UINT32 low_priority, UINT32 high_priority);
/** TC0110PCR **/
@@ -317,4 +317,4 @@ READ16_DEVICE_HANDLER( tc0180vcu_scroll_r );
WRITE16_DEVICE_HANDLER( tc0180vcu_scroll_w );
READ16_DEVICE_HANDLER( tc0180vcu_word_r );
WRITE16_DEVICE_HANDLER( tc0180vcu_word_w );
-void tc0180vcu_tilemap_draw(device_t *device, bitmap_t *bitmap, const rectangle &cliprect, int tmap_num, int plane);
+void tc0180vcu_tilemap_draw(device_t *device, bitmap_t &bitmap, const rectangle &cliprect, int tmap_num, int plane);
diff --git a/src/mame/video/taitojc.c b/src/mame/video/taitojc.c
index 9f990e9260f..1e6bb1c36c2 100644
--- a/src/mame/video/taitojc.c
+++ b/src/mame/video/taitojc.c
@@ -97,7 +97,7 @@ WRITE32_HANDLER(taitojc_char_w)
*/
-static void draw_object(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, UINT32 w1, UINT32 w2, UINT8 bank_type)
+static void draw_object(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, UINT32 w1, UINT32 w2, UINT8 bank_type)
{
taitojc_state *state = machine.driver_data<taitojc_state>();
int x, y, width, height, palette;
@@ -192,7 +192,7 @@ static void draw_object(running_machine &machine, bitmap_t *bitmap, const rectan
for (j=y1; j < y2; j++)
{
- UINT16 *d = &bitmap->pix16(j);
+ UINT16 *d = &bitmap.pix16(j);
for (i=x1; i < x2; i++)
{
@@ -208,7 +208,7 @@ static void draw_object(running_machine &machine, bitmap_t *bitmap, const rectan
{
for (j=y1; j < y2; j++)
{
- UINT16 *d = &bitmap->pix16(j);
+ UINT16 *d = &bitmap.pix16(j);
int index = (iy * (width / 2)) + ix;
for (i=x1; i < x2; i+=2)
@@ -232,7 +232,7 @@ static void draw_object(running_machine &machine, bitmap_t *bitmap, const rectan
{
for (j=y1; j < y2; j++)
{
- UINT16 *d = &bitmap->pix16(j);
+ UINT16 *d = &bitmap.pix16(j);
int index = (iy * width) + ix;
for (i=x1; i < x2; i++)
@@ -292,7 +292,7 @@ VIDEO_START( taitojc )
state->m_zbuffer = auto_bitmap_alloc(machine, width, height, BITMAP_FORMAT_INDEXED16);
}
-static void draw_object_bank(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, UINT8 bank_type, UINT8 pri)
+static void draw_object_bank(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, UINT8 bank_type, UINT8 pri)
{
taitojc_state *state = machine.driver_data<taitojc_state>();
UINT16 start_offs;
@@ -338,7 +338,7 @@ SCREEN_UPDATE( taitojc )
}
#endif
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
/* 0xf000 used on Densha de Go disclaimer screen(s) (disable object RAM?) */
if((state->m_objlist[0xfc4/4] & 0x0000ffff) != 0x0000 && (state->m_objlist[0xfc4/4] & 0x0000ffff) != 0x2000 && (state->m_objlist[0xfc4/4] & 0x0000ffff) != 0xf000 )
@@ -350,7 +350,7 @@ SCREEN_UPDATE( taitojc )
draw_object_bank(screen.machine(), bitmap, cliprect, 1, 0);
draw_object_bank(screen.machine(), bitmap, cliprect, 2, 0);
- copybitmap_trans(bitmap, state->m_framebuffer, 0, 0, 0, 0, cliprect, 0);
+ copybitmap_trans(bitmap, *state->m_framebuffer, 0, 0, 0, 0, cliprect, 0);
draw_object_bank(screen.machine(), bitmap, cliprect, 0, 1);
draw_object_bank(screen.machine(), bitmap, cliprect, 1, 1);
@@ -364,7 +364,7 @@ SCREEN_UPDATE( taitojc )
int j;
for (j=cliprect.min_y; j <= cliprect.max_y; j++)
{
- UINT16 *d = &bitmap->pix16(j);
+ UINT16 *d = &bitmap.pix16(j);
int index = 2048 * j;
for (i=cliprect.min_x; i <= cliprect.max_x; i++)
diff --git a/src/mame/video/taitosj.c b/src/mame/video/taitosj.c
index 5b94154fefb..1fce1144a70 100644
--- a/src/mame/video/taitosj.c
+++ b/src/mame/video/taitosj.c
@@ -21,7 +21,7 @@
static const int layer_enable_mask[3] = { 0x10, 0x20, 0x40 };
-typedef void (*copy_layer_func_t)(running_machine &, bitmap_t *,
+typedef void (*copy_layer_func_t)(running_machine &, bitmap_t &,
const rectangle &, int, int *, rectangle *);
@@ -314,7 +314,7 @@ static int check_sprite_sprite_bitpattern(running_machine &machine,
/* draw the sprites into separate bitmaps and check overlapping region */
state->m_sprite_layer_collbitmap1->fill(TRANSPARENT_PEN);
- drawgfx_transpen(state->m_sprite_sprite_collbitmap1, state->m_sprite_sprite_collbitmap1->cliprect(), get_sprite_gfx_element(machine, which1),
+ drawgfx_transpen(*state->m_sprite_sprite_collbitmap1, state->m_sprite_sprite_collbitmap1->cliprect(), get_sprite_gfx_element(machine, which1),
state->m_spriteram[SPRITE_RAM_PAGE_OFFSET + offs1 + 3] & 0x3f,
0,
state->m_spriteram[SPRITE_RAM_PAGE_OFFSET + offs1 + 2] & 0x01,
@@ -322,7 +322,7 @@ static int check_sprite_sprite_bitpattern(running_machine &machine,
sx1, sy1, 0);
state->m_sprite_sprite_collbitmap2->fill(TRANSPARENT_PEN);
- drawgfx_transpen(state->m_sprite_sprite_collbitmap2, state->m_sprite_sprite_collbitmap2->cliprect(), get_sprite_gfx_element(machine, which2),
+ drawgfx_transpen(*state->m_sprite_sprite_collbitmap2, state->m_sprite_sprite_collbitmap2->cliprect(), get_sprite_gfx_element(machine, which2),
state->m_spriteram[SPRITE_RAM_PAGE_OFFSET + offs2 + 3] & 0x3f,
0,
state->m_spriteram[SPRITE_RAM_PAGE_OFFSET + offs2 + 2] & 0x01,
@@ -471,7 +471,7 @@ static int check_sprite_layer_bitpattern(running_machine &machine, int which, re
/* draw sprite into a bitmap and check if layers collide */
state->m_sprite_layer_collbitmap1->fill(TRANSPARENT_PEN);
- drawgfx_transpen(state->m_sprite_layer_collbitmap1, state->m_sprite_layer_collbitmap1->cliprect(),get_sprite_gfx_element(machine, which),
+ drawgfx_transpen(*state->m_sprite_layer_collbitmap1, state->m_sprite_layer_collbitmap1->cliprect(),get_sprite_gfx_element(machine, which),
state->m_spriteram[SPRITE_RAM_PAGE_OFFSET + offs + 3] & 0x3f,
0,
flip_x, flip_y,
@@ -531,19 +531,19 @@ static void draw_layers(running_machine &machine)
if (GLOBAL_FLIP_X) sx = 31 - sx;
if (GLOBAL_FLIP_Y) sy = 31 - sy;
- drawgfx_transpen(state->m_layer_bitmap[0],state->m_layer_bitmap[0]->cliprect(),machine.gfx[state->m_colorbank[0] & 0x08 ? 2 : 0],
+ drawgfx_transpen(*state->m_layer_bitmap[0],state->m_layer_bitmap[0]->cliprect(),machine.gfx[state->m_colorbank[0] & 0x08 ? 2 : 0],
state->m_videoram_1[offs],
state->m_colorbank[0] & 0x07,
GLOBAL_FLIP_X,GLOBAL_FLIP_Y,
8*sx,8*sy,0);
- drawgfx_transpen(state->m_layer_bitmap[1],state->m_layer_bitmap[1]->cliprect(),machine.gfx[state->m_colorbank[0] & 0x80 ? 2 : 0],
+ drawgfx_transpen(*state->m_layer_bitmap[1],state->m_layer_bitmap[1]->cliprect(),machine.gfx[state->m_colorbank[0] & 0x80 ? 2 : 0],
state->m_videoram_2[offs],
(state->m_colorbank[0] >> 4) & 0x07,
GLOBAL_FLIP_X,GLOBAL_FLIP_Y,
8*sx,8*sy,0);
- drawgfx_transpen(state->m_layer_bitmap[2],state->m_layer_bitmap[2]->cliprect(),machine.gfx[state->m_colorbank[1] & 0x08 ? 2 : 0],
+ drawgfx_transpen(*state->m_layer_bitmap[2],state->m_layer_bitmap[2]->cliprect(),machine.gfx[state->m_colorbank[1] & 0x08 ? 2 : 0],
state->m_videoram_3[offs],
state->m_colorbank[1] & 0x07,
GLOBAL_FLIP_X,GLOBAL_FLIP_Y,
@@ -552,7 +552,7 @@ static void draw_layers(running_machine &machine)
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap)
{
taitosj_state *state = machine.driver_data<taitosj_state>();
/*
@@ -609,7 +609,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap)
}
-static void taitosj_copy_layer(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect,
+static void taitosj_copy_layer(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect,
int which, int *sprites_on, rectangle *sprite_areas)
{
taitosj_state *state = machine.driver_data<taitosj_state>();
@@ -634,7 +634,7 @@ static void taitosj_copy_layer(running_machine &machine, bitmap_t *bitmap, const
for (i = 0;i < 32;i++)
scrolly[i] = -state->m_colscrolly[32 * which + i] - state->m_scroll[2 * which + 1];
- copyscrollbitmap_trans(bitmap, state->m_layer_bitmap[which], 1, &scrollx, 32, scrolly, cliprect, TRANSPARENT_PEN);
+ copyscrollbitmap_trans(bitmap, *state->m_layer_bitmap[which], 1, &scrollx, 32, scrolly, cliprect, TRANSPARENT_PEN);
/* store parts covered with sprites for sprites/layers collision detection */
for (i = 0; i < 0x20; i++)
@@ -642,13 +642,13 @@ static void taitosj_copy_layer(running_machine &machine, bitmap_t *bitmap, const
if ((i >= 0x10) && (i <= 0x17)) continue; /* no sprites here */
if (sprites_on[i])
- copyscrollbitmap(state->m_sprite_layer_collbitmap2[which], state->m_layer_bitmap[which], 1, &scrollx, 32, scrolly, sprite_areas[i]);
+ copyscrollbitmap(*state->m_sprite_layer_collbitmap2[which], *state->m_layer_bitmap[which], 1, &scrollx, 32, scrolly, sprite_areas[i]);
}
}
}
-static void kikstart_copy_layer(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect,
+static void kikstart_copy_layer(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect,
int which, int *sprites_on, rectangle *sprite_areas)
{
taitosj_state *state = machine.driver_data<taitosj_state>();
@@ -673,7 +673,7 @@ static void kikstart_copy_layer(running_machine &machine, bitmap_t *bitmap, cons
}
scrolly = state->m_scroll[2 * which + 1]; /* always 0 */
- copyscrollbitmap_trans(bitmap, state->m_layer_bitmap[which], 32 * 8, scrollx, 1, &scrolly, cliprect, TRANSPARENT_PEN);
+ copyscrollbitmap_trans(bitmap, *state->m_layer_bitmap[which], 32 * 8, scrollx, 1, &scrolly, cliprect, TRANSPARENT_PEN);
/* store parts covered with sprites for sprites/layers collision detection */
for (i = 0; i < 0x20; i++)
@@ -681,13 +681,13 @@ static void kikstart_copy_layer(running_machine &machine, bitmap_t *bitmap, cons
if ((i >= 0x10) && (i <= 0x17)) continue; /* no sprites here */
if (sprites_on[i])
- copyscrollbitmap(state->m_sprite_layer_collbitmap2[which], state->m_layer_bitmap[which], 32 * 8, scrollx, 1, &scrolly, sprite_areas[i]);
+ copyscrollbitmap(*state->m_sprite_layer_collbitmap2[which], *state->m_layer_bitmap[which], 32 * 8, scrollx, 1, &scrolly, sprite_areas[i]);
}
}
}
-static void copy_layer(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect,
+static void copy_layer(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect,
copy_layer_func_t copy_layer_func, int which, int *sprites_on, rectangle *sprite_areas)
{
if (which == 0)
@@ -697,14 +697,14 @@ static void copy_layer(running_machine &machine, bitmap_t *bitmap, const rectang
}
-static void copy_layers(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect,
+static void copy_layers(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect,
copy_layer_func_t copy_layer_func, int *sprites_on, rectangle *sprite_areas)
{
taitosj_state *state = machine.driver_data<taitosj_state>();
int i = 0;
/* fill the screen with the background color */
- bitmap->fill(8 * (state->m_colorbank[1] & 0x07), cliprect);
+ bitmap.fill(8 * (state->m_colorbank[1] & 0x07), cliprect);
for (i = 0; i < 4; i++)
{
@@ -725,7 +725,7 @@ static void check_collision(running_machine &machine, int *sprites_on, rectangle
}
-static int video_update_common(running_machine &machine, bitmap_t *bitmap,
+static int video_update_common(running_machine &machine, bitmap_t &bitmap,
const rectangle &cliprect, copy_layer_func_t copy_layer_func)
{
int sprites_on[0x20]; /* 1 if sprite is active */
diff --git a/src/mame/video/tank8.c b/src/mame/video/tank8.c
index 608856cca4a..a247a247e49 100644
--- a/src/mame/video/tank8.c
+++ b/src/mame/video/tank8.c
@@ -128,7 +128,7 @@ static int get_y_pos(tank8_state *state, int n)
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
tank8_state *state = machine.driver_data<tank8_state>();
int i;
@@ -151,7 +151,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const recta
}
-static void draw_bullets(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_bullets(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
tank8_state *state = machine.driver_data<tank8_state>();
int i;
@@ -179,7 +179,7 @@ static void draw_bullets(running_machine &machine, bitmap_t *bitmap, const recta
if (rect.max_y > cliprect.max_y)
rect.max_y = cliprect.max_y;
- bitmap->fill((i << 1) | 0x01, rect);
+ bitmap.fill((i << 1) | 0x01, rect);
}
}
@@ -209,13 +209,13 @@ SCREEN_EOF( tank8 )
int y;
const rectangle &visarea = screen.machine().primary_screen->visible_area();
- tilemap_draw(state->m_helper1, visarea, state->m_tilemap, 0, 0);
+ tilemap_draw(*state->m_helper1, visarea, state->m_tilemap, 0, 0);
state->m_helper2->fill(8, visarea);
state->m_helper3->fill(8, visarea);
- draw_sprites(screen.machine(), state->m_helper2, visarea);
- draw_bullets(screen.machine(), state->m_helper3, visarea);
+ draw_sprites(screen.machine(), *state->m_helper2, visarea);
+ draw_bullets(screen.machine(), *state->m_helper3, visarea);
for (y = visarea.min_y; y <= visarea.max_y; y++)
{
diff --git a/src/mame/video/tankbatt.c b/src/mame/video/tankbatt.c
index 65025e6b7ed..038961c8d99 100644
--- a/src/mame/video/tankbatt.c
+++ b/src/mame/video/tankbatt.c
@@ -82,7 +82,7 @@ VIDEO_START( tankbatt )
state->m_bg_tilemap = tilemap_create(machine, get_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
}
-static void draw_bullets(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_bullets(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
tankbatt_state *state = machine.driver_data<tankbatt_state>();
int offs;
diff --git a/src/mame/video/tankbust.c b/src/mame/video/tankbust.c
index 0297d1b90b9..af6c721873a 100644
--- a/src/mame/video/tankbust.c
+++ b/src/mame/video/tankbust.c
@@ -187,7 +187,7 @@ spriteram format (4 bytes per sprite):
offset 3 xxxxxxxx x position (8 LSB bits)
*/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
tankbust_state *state = machine.driver_data<tankbust_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/taotaido.c b/src/mame/video/taotaido.c
index 811e9cb928a..657ac5c6a56 100644
--- a/src/mame/video/taotaido.c
+++ b/src/mame/video/taotaido.c
@@ -25,7 +25,7 @@ WRITE16_HANDLER( taotaido_sprite_character_bank_select_w )
/* sprites are like the other video system / psikyo games, we can merge this with aerofgt and plenty of other
things eventually */
-static void draw_sprite(running_machine &machine, UINT16 spriteno, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprite(running_machine &machine, UINT16 spriteno, bitmap_t &bitmap, const rectangle &cliprect )
{
taotaido_state *state = machine.driver_data<taotaido_state>();
/*- SPR RAM Format -**
@@ -109,7 +109,7 @@ static void draw_sprite(running_machine &machine, UINT16 spriteno, bitmap_t *bit
}
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
taotaido_state *state = machine.driver_data<taotaido_state>();
/* first part of sprite ram is the list of sprites to draw, terminated with 0x4000 */
diff --git a/src/mame/video/targeth.c b/src/mame/video/targeth.c
index 3ef135009ae..4d1466c1c3e 100644
--- a/src/mame/video/targeth.c
+++ b/src/mame/video/targeth.c
@@ -105,7 +105,7 @@ VIDEO_START( targeth )
3 | xx------ -------- | not used?
*/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
targeth_state *state = machine.driver_data<targeth_state>();
int i;
diff --git a/src/mame/video/tatsumi.c b/src/mame/video/tatsumi.c
index 9610663bdc8..c8c763c7a10 100644
--- a/src/mame/video/tatsumi.c
+++ b/src/mame/video/tatsumi.c
@@ -249,7 +249,7 @@ VIDEO_START( bigfight )
/********************************************************************/
INLINE void roundupt_drawgfxzoomrotate(
- bitmap_t *dest_bmp, const rectangle &clip, const gfx_element *gfx,
+ bitmap_t &dest_bmp, const rectangle &clip, const gfx_element *gfx,
UINT32 code,UINT32 color,int flipx,int flipy,UINT32 ssx,UINT32 ssy,
int scalex, int scaley, int rotate, int write_priority_only )
{
@@ -267,7 +267,7 @@ INLINE void roundupt_drawgfxzoomrotate(
/* KW 991012 -- Added code to force clip to bitmap boundary */
myclip = clip;
- myclip &= dest_bmp->cliprect();
+ myclip &= dest_bmp.cliprect();
{
if( gfx )
@@ -388,7 +388,7 @@ INLINE void roundupt_drawgfxzoomrotate(
for( y=sy; y<ey; y++ )
{
- UINT32 *dest = &dest_bmp->pix32(y);
+ UINT32 *dest = &dest_bmp.pix32(y);
int cx = startx;
int cy = starty;
@@ -419,8 +419,8 @@ INLINE void roundupt_drawgfxzoomrotate(
for( y=sy; y<ey; y++ )
{
const UINT8 *source = code_base + (y_index>>16) * gfx->line_modulo;
- UINT32 *dest = &dest_bmp->pix32(y);
- UINT8 *priority_dest = &dest_bmp->pix8(y);
+ UINT32 *dest = &dest_bmp.pix32(y);
+ UINT8 *priority_dest = &dest_bmp.pix8(y);
int x, x_index = x_index_base;
for( x=sx; x<ex; x++ )
@@ -448,7 +448,7 @@ INLINE void roundupt_drawgfxzoomrotate(
}
}
-static void mycopyrozbitmap_core(bitmap_t *bitmap,bitmap_t *srcbitmap,
+static void mycopyrozbitmap_core(bitmap_t &bitmap,bitmap_t &srcbitmap,
int dstx,int dsty, int srcwidth, int srcheight,int incxx,int incxy,int incyx,int incyy,
const rectangle &clip,int transparent_color)
{
@@ -459,8 +459,8 @@ static void mycopyrozbitmap_core(bitmap_t *bitmap,bitmap_t *srcbitmap,
int sy;
int ex;
int ey;
-// const int xmask = srcbitmap->width-1;
-// const int ymask = srcbitmap->height-1;
+// const int xmask = srcbitmap.width()-1;
+// const int ymask = srcbitmap.height()-1;
const int widthshifted = srcwidth << 16;
const int heightshifted = srcheight << 16;
UINT32 *dest;
@@ -486,13 +486,13 @@ static void mycopyrozbitmap_core(bitmap_t *bitmap,bitmap_t *srcbitmap,
x = sx;
cx = startx;
cy = starty;
- dest = &bitmap->pix32(sy, sx);
+ dest = &bitmap.pix32(sy, sx);
while (x <= ex)
{
if (cx < widthshifted && cy < heightshifted)
{
- int c = srcbitmap->pix32(cy >> 16, cx >> 16);
+ int c = srcbitmap.pix32(cy >> 16, cx >> 16);
if (c != transparent_color)
*dest = c;
@@ -510,7 +510,7 @@ static void mycopyrozbitmap_core(bitmap_t *bitmap,bitmap_t *srcbitmap,
}
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int write_priority_only, int rambank)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int write_priority_only, int rambank)
{
tatsumi_state *state = machine.driver_data<tatsumi_state>();
UINT16 *spriteram16 = state->m_spriteram;
@@ -637,7 +637,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const recta
for (w = 0; w < x_width; w++) {
if (rotate)
roundupt_drawgfxzoomrotate(
- state->m_temp_bitmap,cliprect,machine.gfx[0],
+ *state->m_temp_bitmap,cliprect,machine.gfx[0],
base,
color,flip_x,flip_y,x_pos,render_y,
scale,scale,0,write_priority_only);
@@ -692,12 +692,12 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const recta
extent_x = extent_x >> 16;
extent_y = extent_y >> 16;
if (extent_x > 2 && extent_y > 2)
- mycopyrozbitmap_core(bitmap, state->m_temp_bitmap, x/* + (extent_x/2)*/, y /*+ (extent_y/2)*/, extent_x, extent_y, incxx, incxy, incyx, incyy, cliprect, 0);
+ mycopyrozbitmap_core(bitmap, *state->m_temp_bitmap, x/* + (extent_x/2)*/, y /*+ (extent_y/2)*/, extent_x, extent_y, incxx, incxy, incyx, incyy, cliprect, 0);
}
}
}
-static void draw_sky(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect, int palette_base, int start_offset)
+static void draw_sky(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect, int palette_base, int start_offset)
{
// all todo
int x,y;
@@ -714,12 +714,12 @@ start_offset-=48;
if (col<palette_base) col=palette_base;
if (col>palette_base+127) col=palette_base+127;
- bitmap->pix32(y, x) = machine.pens[col];
+ bitmap.pix32(y, x) = machine.pens[col];
}
}
}
-static void draw_road(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect,bitmap_t *shadow_bitmap)
+static void draw_road(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect,bitmap_t &shadow_bitmap)
{
tatsumi_state *state = machine.driver_data<tatsumi_state>();
/*
@@ -845,11 +845,11 @@ offset is from last pixel of first road segment?
/* Fill in left of road segment */
for (x=0; x<startPos && x<320; x++) {
int col = linedata[0]&0xf;
- UINT8 shadow=shadow_bitmap->pix8(y, x);
+ UINT8 shadow=shadow_bitmap.pix8(y, x);
if (shadow)
- bitmap->pix32(y, x) = machine.pens[768 + pal*16 + col];
+ bitmap.pix32(y, x) = machine.pens[768 + pal*16 + col];
else
- bitmap->pix32(y, x) = machine.pens[256 + pal*16 + col];
+ bitmap.pix32(y, x) = machine.pens[256 + pal*16 + col];
}
/* If startpos is negative, clip it and adjust the sampling position accordingly */
@@ -864,16 +864,16 @@ offset is from last pixel of first road segment?
for (x=startPos; x<320 && (samplePos>>11)<0x80; x++) {
// look up colour
int col = linedata[(samplePos>>11)&0x7f]&0xf;
- UINT8 shadow=shadow_bitmap->pix8(y, x);
+ UINT8 shadow=shadow_bitmap.pix8(y, x);
/* Clamp if we have reached the end of the pixel data */
//if ((samplePos>>11) > 0x7f)
// col=linedata[0x7f]&0xf;
if (shadow)
- bitmap->pix32(y, x) = machine.pens[768 + pal*16 + col];
+ bitmap.pix32(y, x) = machine.pens[768 + pal*16 + col];
else
- bitmap->pix32(y, x) = machine.pens[256 + pal*16 + col];
+ bitmap.pix32(y, x) = machine.pens[256 + pal*16 + col];
samplePos+=step;
}
@@ -895,16 +895,16 @@ offset is from last pixel of first road segment?
/* Fill pixels */
for (x=startPos; x<320 && x<endPos; x++) {
int col = linedata[0x80]&0xf;
- UINT8 shadow=shadow_bitmap->pix8(y, x);
+ UINT8 shadow=shadow_bitmap.pix8(y, x);
/* Clamp if we have reached the end of the pixel data */
//if ((samplePos>>11) > 0x7f)
// col=linedata[0x7f]&0xf;
if (shadow)
- bitmap->pix32(y, x) = machine.pens[768 + pal*16 + col + 32];
+ bitmap.pix32(y, x) = machine.pens[768 + pal*16 + col + 32];
else
- bitmap->pix32(y, x) = machine.pens[256 + pal*16 + col + 32];
+ bitmap.pix32(y, x) = machine.pens[256 + pal*16 + col + 32];
}
if (endPos<0) {
@@ -919,16 +919,16 @@ offset is from last pixel of first road segment?
for (/*x=endPos*/; x<320; x++) {
// look up colour
int col = linedata[((samplePos>>11)&0x7f) + 0x200]&0xf;
- UINT8 shadow=shadow_bitmap->pix8(y, x);
+ UINT8 shadow=shadow_bitmap.pix8(y, x);
/* Clamp if we have reached the end of the pixel data */
if ((samplePos>>11) > 0x7f)
col=linedata[0x7f + 0x200]&0xf;
if (shadow)
- bitmap->pix32(y, x) = machine.pens[768 + pal*16 + col + 32];
+ bitmap.pix32(y, x) = machine.pens[768 + pal*16 + col + 32];
else
- bitmap->pix32(y, x) = machine.pens[256 + pal*16 + col + 32];
+ bitmap.pix32(y, x) = machine.pens[256 + pal*16 + col + 32];
samplePos+=step;
}
@@ -973,14 +973,14 @@ static void update_cluts(running_machine &machine, int fake_palette_offset, int
/**********************************************************************/
-static void draw_bg(running_machine &machine, bitmap_t *dst, tilemap_t *src, const UINT16* scrollx, const UINT16* scrolly, const UINT16* tilemap_ram, int tile_bank, int xscroll_offset, int yscroll_offset, int xsize, int ysize)
+static void draw_bg(running_machine &machine, bitmap_t &dst, tilemap_t *src, const UINT16* scrollx, const UINT16* scrolly, const UINT16* tilemap_ram, int tile_bank, int xscroll_offset, int yscroll_offset, int xsize, int ysize)
{
/*
Each tile (0x4000 of them) has a lookup table in ROM to build an individual 3-bit palette
from sets of 8 bit palettes!
*/
const UINT8* tile_cluts = machine.region("gfx4")->base();
- const bitmap_t *src_bitmap = tilemap_get_pixmap(src);
+ const bitmap_t &src_bitmap = tilemap_get_pixmap(src);
int src_y_mask=ysize-1;
int src_x_mask=xsize-1;
int tile_y_mask=(ysize/8)-1;
@@ -998,19 +998,19 @@ static void draw_bg(running_machine &machine, bitmap_t *dst, tilemap_t *src, con
int bank = (tile_bank >> (((tilemap_ram[(tile_index+0x400)&0x7fff]&0xc00)>>10)*4))&0xf;
int tile = (tilemap_ram[(tile_index+0x400)&0x7fff]&0x3ff) | (bank<<10);
- p=src_bitmap->pix16(src_y&src_y_mask, src_x&src_x_mask);
+ p=src_bitmap.pix16(src_y&src_y_mask, src_x&src_x_mask);
pp=tile_cluts[tile*8 + (p&0x7)];
ppp=pp + ((p&0x78)<<5);
if ((p&0x7)!=0 || ((p&0x7)==0 && (pp&0x7)!=0)) // Transparent pixels are set by both the tile pixel data==0 AND colour palette==0
- dst->pix32(y, x) = machine.pens[ppp];
+ dst.pix32(y, x) = machine.pens[ppp];
}
}
}
/* Draw the sky and ground, applying rotation (eventually). Experimental! */
#if 0
-static void draw_ground(running_machine &machine, bitmap_t *dst, const rectangle &cliprect)
+static void draw_ground(running_machine &machine, bitmap_t &dst, const rectangle &cliprect)
{
tatsumi_state *state = machine.driver_data<tatsumi_state>();
int x, y;
@@ -1030,7 +1030,7 @@ static void draw_ground(running_machine &machine, bitmap_t *dst, const rectangle
/* Sky */
for (x = cliprect.min_x; x <= cliprect.max_x; ++x)
{
- dst->pix32(y, x) = machine.pens[0x100 + (sky_val & 0x7f)];
+ dst.pix32(y, x) = machine.pens[0x100 + (sky_val & 0x7f)];
/* Update horizontal counter? */
gha = (gha + 1) & 0xfff;
@@ -1060,7 +1060,7 @@ static void draw_ground(running_machine &machine, bitmap_t *dst, const rectangle
colour = (BIT(hval, 11) << 4) | (colour << 2) | ln;
/* Draw the pixel */
- dst->pix32(y, x) = machine.pens[0x200 + colour];
+ dst.pix32(y, x) = machine.pens[0x200 + colour];
/* Update horizontal counter */
gha = (gha + 1) & 0xfff;
@@ -1082,7 +1082,7 @@ SCREEN_UPDATE( apache3 )
tilemap_set_scrollx(state->m_tx_layer,0,24);
- bitmap->fill(screen.machine().pens[0], cliprect);
+ bitmap.fill(screen.machine().pens[0], cliprect);
draw_sky(screen.machine(), bitmap, cliprect, 256, state->m_apache3_rotate_ctrl[1]);
// draw_ground(screen.machine(), bitmap, cliprect);
draw_sprites(screen.machine(), bitmap,cliprect,0, (state->m_sprite_control_ram[0x20]&0x1000) ? 0x1000 : 0);
@@ -1101,8 +1101,8 @@ SCREEN_UPDATE( roundup5 )
tilemap_set_scrollx(state->m_tx_layer,0,24);
tilemap_set_scrolly(state->m_tx_layer,0,0); //(((state->m_roundupt_crt_reg[0xe]<<8)|state->m_roundupt_crt_reg[0xf])>>5) + 96);
- bitmap->fill(screen.machine().pens[384], cliprect); // todo
- screen.machine().priority_bitmap->fill(0, cliprect);
+ bitmap.fill(screen.machine().pens[384], cliprect); // todo
+ screen.machine().priority_bitmap.fill(0, cliprect);
draw_sprites(screen.machine(), screen.machine().priority_bitmap,cliprect,1,(state->m_sprite_control_ram[0xe0]&0x1000) ? 0x1000 : 0); // Alpha pass only
draw_road(screen.machine(), bitmap,cliprect,screen.machine().priority_bitmap);
@@ -1124,7 +1124,7 @@ SCREEN_UPDATE( cyclwarr )
state->m_bigfight_last_bank=state->m_bigfight_bank;
}
- bitmap->fill(screen.machine().pens[0], cliprect);
+ bitmap.fill(screen.machine().pens[0], cliprect);
draw_bg(screen.machine(), bitmap, state->m_layer3, &state->m_cyclwarr_videoram1[0x000], &state->m_cyclwarr_videoram1[0x100], state->m_cyclwarr_videoram1, state->m_bigfight_a40000[0], 8, -0x80, 512, 4096);
draw_bg(screen.machine(), bitmap, state->m_layer2, &state->m_cyclwarr_videoram1[0x200], &state->m_cyclwarr_videoram1[0x300], state->m_cyclwarr_videoram1, state->m_bigfight_a40000[0], 8, -0x80, 512, 4096);
@@ -1149,7 +1149,7 @@ SCREEN_UPDATE( bigfight )
state->m_bigfight_last_bank=state->m_bigfight_bank;
}
- bitmap->fill(screen.machine().pens[0], cliprect);
+ bitmap.fill(screen.machine().pens[0], cliprect);
draw_bg(screen.machine(), bitmap, state->m_layer3, &state->m_cyclwarr_videoram1[0x000], &state->m_cyclwarr_videoram1[0x100], state->m_cyclwarr_videoram1, state->m_bigfight_a40000[0], 8, -0x40, 1024, 2048);
draw_bg(screen.machine(), bitmap, state->m_layer2, &state->m_cyclwarr_videoram1[0x200], &state->m_cyclwarr_videoram1[0x300], state->m_cyclwarr_videoram1, state->m_bigfight_a40000[0], 8, -0x40, 1024, 2048);
draw_bg(screen.machine(), bitmap, state->m_layer1, &state->m_cyclwarr_videoram0[0x000], &state->m_cyclwarr_videoram0[0x100], state->m_cyclwarr_videoram0, state->m_bigfight_a40000[0], 8, -0x40, 1024, 2048);
diff --git a/src/mame/video/taxidriv.c b/src/mame/video/taxidriv.c
index b6860d0c1f1..ab63bca9da5 100644
--- a/src/mame/video/taxidriv.c
+++ b/src/mame/video/taxidriv.c
@@ -19,7 +19,7 @@ SCREEN_UPDATE( taxidriv )
if (state->m_bghide)
{
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
/* kludge to fix scroll after death */
@@ -65,7 +65,7 @@ SCREEN_UPDATE( taxidriv )
if (color)
{
if (sx > 0 && sx < 256 && sy > 0 && sy < 256)
- bitmap->pix16(sy, sx) = color;
+ bitmap.pix16(sy, sx) = color;
}
}
}
@@ -83,7 +83,7 @@ SCREEN_UPDATE( taxidriv )
if (color)
{
if (sx > 0 && sx < 256 && sy > 0 && sy < 256)
- bitmap->pix16(sy, sx) = color;
+ bitmap.pix16(sy, sx) = color;
}
}
}
@@ -101,7 +101,7 @@ SCREEN_UPDATE( taxidriv )
if (color)
{
if (sx > 0 && sx < 256 && sy > 0 && sy < 256)
- bitmap->pix16(sy, sx) = color;
+ bitmap.pix16(sy, sx) = color;
}
}
}
@@ -128,7 +128,7 @@ SCREEN_UPDATE( taxidriv )
color = (state->m_vram4[offs/4]>>(2*(offs&3)))&0x03;
if (color)
{
- bitmap->pix16(sy, sx) = 2 * color;
+ bitmap.pix16(sy, sx) = 2 * color;
}
}
}
diff --git a/src/mame/video/tbowl.c b/src/mame/video/tbowl.c
index f492305d84c..275d2e3e271 100644
--- a/src/mame/video/tbowl.c
+++ b/src/mame/video/tbowl.c
@@ -118,7 +118,7 @@ WRITE8_HANDLER (tbowl_bg2yscroll_hi)
state->m_bg2yscroll = (state->m_bg2yscroll & 0x00ff) | (data << 8);
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect, int xscroll)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect, int xscroll)
{
tbowl_state *state = machine.driver_data<tbowl_state>();
int offs;
@@ -225,7 +225,7 @@ SCREEN_UPDATE( tbowl_left )
tilemap_set_scrollx(state->m_tx_tilemap, 0, 0 );
tilemap_set_scrolly(state->m_tx_tilemap, 0, 0 );
- bitmap->fill(0x100, cliprect); /* is there a register controling the colour? looks odd when screen is blank */
+ bitmap.fill(0x100, cliprect); /* is there a register controling the colour? looks odd when screen is blank */
tilemap_draw(bitmap,cliprect,state->m_bg_tilemap,0,0);
draw_sprites(screen.machine(), bitmap,cliprect, 0);
tilemap_draw(bitmap,cliprect,state->m_bg2_tilemap,0,0);
@@ -245,7 +245,7 @@ SCREEN_UPDATE( tbowl_right )
tilemap_set_scrollx(state->m_tx_tilemap, 0, 32*8 );
tilemap_set_scrolly(state->m_tx_tilemap, 0, 0 );
- bitmap->fill(0x100, cliprect); /* is there a register controling the colour? looks odd when screen is blank */
+ bitmap.fill(0x100, cliprect); /* is there a register controling the colour? looks odd when screen is blank */
tilemap_draw(bitmap,cliprect,state->m_bg_tilemap,0,0);
draw_sprites(screen.machine(), bitmap,cliprect, 32*8);
tilemap_draw(bitmap,cliprect,state->m_bg2_tilemap,0,0);
diff --git a/src/mame/video/tceptor.c b/src/mame/video/tceptor.c
index bcbe8ddf11a..50785e69195 100644
--- a/src/mame/video/tceptor.c
+++ b/src/mame/video/tceptor.c
@@ -440,7 +440,7 @@ VIDEO_START( tceptor )
z: zoom y
*/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int sprite_priority)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int sprite_priority)
{
tceptor_state *state = machine.driver_data<tceptor_state>();
UINT16 *mem1 = &state->m_sprite_ram_buffered[0x000/2];
@@ -481,7 +481,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const recta
{
if (!need_mask)
// backup previous bitmap
- copybitmap(state->m_temp_bitmap, bitmap, 0, 0, 0, 0, cliprect);
+ copybitmap(*state->m_temp_bitmap, bitmap, 0, 0, 0, 0, cliprect);
need_mask = 1;
}
@@ -513,9 +513,9 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const recta
for (x = cliprect.min_x; x <= cliprect.max_x; x++)
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
- if (colortable_entry_get_value(machine.colortable, bitmap->pix16(y, x)) == SPR_MASK_COLOR)
+ if (colortable_entry_get_value(machine.colortable, bitmap.pix16(y, x)) == SPR_MASK_COLOR)
// restore pixel
- bitmap->pix16(y, x) = state->m_temp_bitmap->pix16(y, x);
+ bitmap.pix16(y, x) = state->m_temp_bitmap->pix16(y, x);
}
}
diff --git a/src/mame/video/tecmo.c b/src/mame/video/tecmo.c
index 9938e0edb53..01a81536aeb 100644
--- a/src/mame/video/tecmo.c
+++ b/src/mame/video/tecmo.c
@@ -169,7 +169,7 @@ WRITE8_HANDLER( tecmo_flipscreen_w )
***************************************************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect)
{
tecmo_state *state = machine.driver_data<tecmo_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -251,8 +251,8 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectan
SCREEN_UPDATE( tecmo )
{
tecmo_state *state = screen.machine().driver_data<tecmo_state>();
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(0x100, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(0x100, cliprect);
tilemap_draw(bitmap,cliprect,state->m_bg_tilemap,0,1);
tilemap_draw(bitmap,cliprect,state->m_fg_tilemap,0,2);
tilemap_draw(bitmap,cliprect,state->m_tx_tilemap,0,4);
diff --git a/src/mame/video/tecmo16.c b/src/mame/video/tecmo16.c
index 09d570d25d8..8843c1be9ed 100644
--- a/src/mame/video/tecmo16.c
+++ b/src/mame/video/tecmo16.c
@@ -224,7 +224,7 @@ WRITE16_HANDLER( tecmo16_scroll_char_y_w )
/* mix & blend the paletted 16-bit tile and sprite bitmaps into an RGB 32-bit bitmap */
static void blendbitmaps(running_machine &machine,
- bitmap_t *dest,bitmap_t *src1,bitmap_t *src2,bitmap_t *src3,
+ bitmap_t &dest,bitmap_t &src1,bitmap_t &src2,bitmap_t &src3,
int sx,int sy,const rectangle &clip)
{
int ox;
@@ -236,17 +236,17 @@ static void blendbitmaps(running_machine &machine,
ox = sx;
oy = sy;
- ex = sx + src1->width() - 1;
+ ex = sx + src1.width() - 1;
if (sx < 0) sx = 0;
if (sx < clip.min_x) sx = clip.min_x;
- if (ex >= dest->width()) ex = dest->width() - 1;
+ if (ex >= dest.width()) ex = dest.width() - 1;
if (ex > clip.max_x) ex = clip.max_x;
if (sx > ex) return;
- ey = sy + src1->height() - 1;
+ ey = sy + src1.height() - 1;
if (sy < 0) sy = 0;
if (sy < clip.min_y) sy = clip.min_y;
- if (ey >= dest->height()) ey = dest->height() - 1;
+ if (ey >= dest.height()) ey = dest.height() - 1;
if (ey > clip.max_y) ey = clip.max_y;
if (sy > ey) return;
@@ -254,16 +254,16 @@ static void blendbitmaps(running_machine &machine,
const pen_t *paldata = machine.pens;
UINT32 *end;
- UINT16 *sd1 = &src1->pix16(0);
- UINT16 *sd2 = &src2->pix16(0);
- UINT16 *sd3 = &src3->pix16(0);
+ UINT16 *sd1 = &src1.pix16(0);
+ UINT16 *sd2 = &src2.pix16(0);
+ UINT16 *sd3 = &src3.pix16(0);
int sw = ex-sx+1; /* source width */
int sh = ey-sy+1; /* source height */
- int sm = src1->rowpixels(); /* source modulo */
+ int sm = src1.rowpixels(); /* source modulo */
- UINT32 *dd = &dest->pix32(sy, sx); /* dest data */
- int dm = dest->rowpixels(); /* dest modulo */
+ UINT32 *dd = &dest.pix32(sy, sx); /* dest data */
+ int dm = dest.rowpixels(); /* dest modulo */
sd1 += (sx-ox);
sd1 += sm * (sy-oy);
@@ -332,7 +332,7 @@ static void blendbitmaps(running_machine &machine,
}
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap_bg, bitmap_t *bitmap_fg, bitmap_t *bitmap_sp, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap_bg, bitmap_t &bitmap_fg, bitmap_t &bitmap_sp, const rectangle &cliprect)
{
tecmo16_state *state = machine.driver_data<tecmo16_state>();
UINT16 *spriteram16 = state->m_spriteram;
@@ -349,7 +349,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap_bg, bitmap_t
{42,43,46,47,58,59,62,63}
};
- bitmap_t *bitmap = bitmap_bg;
+ bitmap_t &bitmap = bitmap_bg;
for (offs = state->m_spriteram_size/2 - 8;offs >= 0;offs -= 8)
{
@@ -443,7 +443,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap_bg, bitmap_t
}
else
{
- bitmap = (priority >= 2) ? bitmap_bg : bitmap_fg;
+ bitmap_t &bitmap = (priority >= 2) ? bitmap_bg : bitmap_fg;
for (y = 0;y < sizey;y++)
{
@@ -493,24 +493,24 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap_bg, bitmap_t
SCREEN_UPDATE( tecmo16 )
{
tecmo16_state *state = screen.machine().driver_data<tecmo16_state>();
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
state->m_tile_bitmap_bg->fill(0x300, cliprect);
state->m_tile_bitmap_fg->fill(0, cliprect);
state->m_sprite_bitmap->fill(0, cliprect);
/* draw tilemaps into a 16-bit bitmap */
- tilemap_draw(state->m_tile_bitmap_bg, cliprect,state->m_bg_tilemap, 0, 1);
- tilemap_draw(state->m_tile_bitmap_fg, cliprect,state->m_fg_tilemap, 0, 2);
+ tilemap_draw(*state->m_tile_bitmap_bg, cliprect,state->m_bg_tilemap, 0, 1);
+ tilemap_draw(*state->m_tile_bitmap_fg, cliprect,state->m_fg_tilemap, 0, 2);
/* draw the blended tiles at a lower priority
so sprites covered by them will still be drawn */
- tilemap_draw(state->m_tile_bitmap_fg, cliprect,state->m_fg_tilemap, 1, 0);
- tilemap_draw(state->m_tile_bitmap_fg, cliprect,state->m_tx_tilemap, 0, 4);
+ tilemap_draw(*state->m_tile_bitmap_fg, cliprect,state->m_fg_tilemap, 1, 0);
+ tilemap_draw(*state->m_tile_bitmap_fg, cliprect,state->m_tx_tilemap, 0, 4);
/* draw sprites into a 16-bit bitmap */
- draw_sprites(screen.machine(), state->m_tile_bitmap_bg, state->m_tile_bitmap_fg, state->m_sprite_bitmap, cliprect);
+ draw_sprites(screen.machine(), *state->m_tile_bitmap_bg, *state->m_tile_bitmap_fg, *state->m_sprite_bitmap, cliprect);
/* mix & blend the tilemaps and sprites into a 32-bit bitmap */
- blendbitmaps(screen.machine(), bitmap, state->m_tile_bitmap_bg, state->m_tile_bitmap_fg, state->m_sprite_bitmap, 0, 0, cliprect);
+ blendbitmaps(screen.machine(), bitmap, *state->m_tile_bitmap_bg, *state->m_tile_bitmap_fg, *state->m_sprite_bitmap, 0, 0, cliprect);
return 0;
}
diff --git a/src/mame/video/tecmosys.c b/src/mame/video/tecmosys.c
index 65a3839d8ba..8434dec82f5 100644
--- a/src/mame/video/tecmosys.c
+++ b/src/mame/video/tecmosys.c
@@ -117,7 +117,7 @@ WRITE16_HANDLER( bg2_tilemap_lineram_w )
-static void tecmosys_render_sprites_to_bitmap(running_machine &machine, bitmap_t *bitmap, UINT16 extrax, UINT16 extray )
+static void tecmosys_render_sprites_to_bitmap(running_machine &machine, bitmap_t &bitmap, UINT16 extrax, UINT16 extray )
{
tecmosys_state *state = machine.driver_data<tecmosys_state>();
UINT8 *gfxsrc = machine.region ( "gfx1" )->base();
@@ -226,7 +226,7 @@ static void tecmosys_tilemap_copy_to_compose(tecmosys_state *state, UINT16 pri)
}
}
-static void tecmosys_do_final_mix(running_machine &machine, bitmap_t* bitmap)
+static void tecmosys_do_final_mix(running_machine &machine, bitmap_t &bitmap)
{
tecmosys_state *state = machine.driver_data<tecmosys_state>();
const pen_t *paldata = machine.pens;
@@ -240,7 +240,7 @@ static void tecmosys_do_final_mix(running_machine &machine, bitmap_t* bitmap)
srcptr = &state->m_tmp_tilemap_composebitmap->pix16(y);
srcptr2 = &state->m_sprite_bitmap->pix16(y);
- dstptr = &bitmap->pix32(y);
+ dstptr = &bitmap.pix32(y);
for (x=0;x<320;x++)
{
UINT16 pri, pri2;
@@ -301,7 +301,7 @@ SCREEN_UPDATE(tecmosys)
{
tecmosys_state *state = screen.machine().driver_data<tecmosys_state>();
- bitmap->fill(screen.machine().pens[0x4000], cliprect);
+ bitmap.fill(screen.machine().pens[0x4000], cliprect);
tilemap_set_scrolly( state->m_bg0tilemap, 0, state->m_c80000regs[1]+16);
@@ -316,19 +316,19 @@ SCREEN_UPDATE(tecmosys)
state->m_tmp_tilemap_composebitmap->fill(0, cliprect);
state->m_tmp_tilemap_renderbitmap->fill(0, cliprect);
- tilemap_draw(state->m_tmp_tilemap_renderbitmap,cliprect,state->m_bg0tilemap,0,0);
+ tilemap_draw(*state->m_tmp_tilemap_renderbitmap,cliprect,state->m_bg0tilemap,0,0);
tecmosys_tilemap_copy_to_compose(state, 0x0000);
state->m_tmp_tilemap_renderbitmap->fill(0, cliprect);
- tilemap_draw(state->m_tmp_tilemap_renderbitmap,cliprect,state->m_bg1tilemap,0,0);
+ tilemap_draw(*state->m_tmp_tilemap_renderbitmap,cliprect,state->m_bg1tilemap,0,0);
tecmosys_tilemap_copy_to_compose(state, 0x4000);
state->m_tmp_tilemap_renderbitmap->fill(0, cliprect);
- tilemap_draw(state->m_tmp_tilemap_renderbitmap,cliprect,state->m_bg2tilemap,0,0);
+ tilemap_draw(*state->m_tmp_tilemap_renderbitmap,cliprect,state->m_bg2tilemap,0,0);
tecmosys_tilemap_copy_to_compose(state, 0x8000);
state->m_tmp_tilemap_renderbitmap->fill(0, cliprect);
- tilemap_draw(state->m_tmp_tilemap_renderbitmap,cliprect,state->m_txt_tilemap,0,0);
+ tilemap_draw(*state->m_tmp_tilemap_renderbitmap,cliprect,state->m_txt_tilemap,0,0);
tecmosys_tilemap_copy_to_compose(state, 0xc000);
diff --git a/src/mame/video/tehkanwc.c b/src/mame/video/tehkanwc.c
index 4a42ab7160b..ac160bd2807 100644
--- a/src/mame/video/tehkanwc.c
+++ b/src/mame/video/tehkanwc.c
@@ -123,7 +123,7 @@ VIDEO_START( tehkanwc )
bit 7 = enable (0 = display off)
*/
-static void gridiron_draw_led(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, UINT8 led,int player)
+static void gridiron_draw_led(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, UINT8 led,int player)
{
if (led&0x80)
output_set_digit_value(player, led&0x7f);
@@ -131,7 +131,7 @@ static void gridiron_draw_led(running_machine &machine, bitmap_t *bitmap, const
output_set_digit_value(player, 0x00);
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
tehkanwc_state *state = machine.driver_data<tehkanwc_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/terracre.c b/src/mame/video/terracre.c
index a8b408b2fb1..ef86ef9f77f 100644
--- a/src/mame/video/terracre.c
+++ b/src/mame/video/terracre.c
@@ -31,7 +31,7 @@ TILE_GET_INFO( get_fg_tile_info )
SET_TILE_INFO( 0,data&0xff,0,0 );
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
terracre_state *state = machine.driver_data<terracre_state>();
const UINT8 *spritepalettebank = machine.region("user1")->base();
@@ -206,7 +206,7 @@ SCREEN_UPDATE( amazon )
{
terracre_state *state = screen.machine().driver_data<terracre_state>();
if( state->m_xscroll&0x2000 )
- bitmap->fill(get_black_pen(screen.machine()), cliprect );
+ bitmap.fill(get_black_pen(screen.machine()), cliprect );
else
tilemap_draw( bitmap,cliprect, state->m_background, 0, 0 );
diff --git a/src/mame/video/tetrisp2.c b/src/mame/video/tetrisp2.c
index e9756c92102..46fca40db7c 100644
--- a/src/mame/video/tetrisp2.c
+++ b/src/mame/video/tetrisp2.c
@@ -380,7 +380,7 @@ VIDEO_START( rocknms )
/* sprites should be able to create shadows too, how?
-- it appears that sprites which should be shadows are often rendered *UNDER* the tilemaps, maybe related?
*/
-static void tetrisp2_draw_sprites(running_machine &machine, bitmap_t *bitmap, bitmap_t *bitmap_pri, const rectangle &cliprect, UINT8* priority_ram, UINT16 *sprram_top, size_t sprram_size, int gfxnum, int flip)
+static void tetrisp2_draw_sprites(running_machine &machine, bitmap_t &bitmap, bitmap_t &bitmap_pri, const rectangle &cliprect, UINT8* priority_ram, UINT16 *sprram_top, size_t sprram_size, int gfxnum, int flip)
{
int tx, ty, sx, sy, flipx, flipy;
int xsize, ysize;
@@ -471,8 +471,8 @@ SCREEN_UPDATE( tetrisp2 )
flipscreen = (state->m_systemregs[0x00] & 0x02);
/* Black background color */
- bitmap->fill(0, cliprect);
- screen.machine().priority_bitmap->fill(0);
+ bitmap.fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0);
/* Flip Screen */
if (flipscreen != state->m_flipscreen_old)
@@ -556,8 +556,8 @@ SCREEN_UPDATE( rockntread )
flipscreen = (state->m_systemregs[0x00] & 0x02);
/* Black background color */
- bitmap->fill(0, cliprect);
- screen.machine().priority_bitmap->fill(0);
+ bitmap.fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0);
/* Flip Screen */
if (flipscreen != state->m_flipscreen_old)
@@ -646,8 +646,8 @@ SCREEN_UPDATE( rocknms_left )
tilemap_set_scrollx(state->m_tilemap_sub_rot, 0, state->m_rocknms_sub_rotregs[ 0 ] + 0x400);
tilemap_set_scrolly(state->m_tilemap_sub_rot, 0, state->m_rocknms_sub_rotregs[ 2 ] + 0x400);
- bitmap->fill(screen.machine().pens[0x0000], cliprect);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ bitmap.fill(screen.machine().pens[0x0000], cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
asc_pri = scr_pri = rot_pri = 0;
@@ -707,8 +707,8 @@ SCREEN_UPDATE( rocknms_right )
tilemap_set_scrolly(state->m_tilemap_rot, 0, state->m_rotregs[ 2 ] + 0x400);
/* Black background color */
- bitmap->fill(screen.machine().pens[0x0000], cliprect);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ bitmap.fill(screen.machine().pens[0x0000], cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
asc_pri = scr_pri = rot_pri = 0;
diff --git a/src/mame/video/thedeep.c b/src/mame/video/thedeep.c
index 8909e7e33ee..87764e80d66 100644
--- a/src/mame/video/thedeep.c
+++ b/src/mame/video/thedeep.c
@@ -147,7 +147,7 @@ Offset: Bits: Value:
***************************************************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
thedeep_state *state = machine.driver_data<thedeep_state>();
UINT8 *s = state->m_spriteram, *end = s + state->m_spriteram_size;
@@ -224,7 +224,7 @@ SCREEN_UPDATE( thedeep )
tilemap_set_scrolly(state->m_tilemap_0, x, y + scrolly);
}
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
tilemap_draw(bitmap,cliprect,state->m_tilemap_0,0,0);
draw_sprites(screen.machine(), bitmap,cliprect);
diff --git a/src/mame/video/thepit.c b/src/mame/video/thepit.c
index 212c6b06fdd..d875dd93f4e 100644
--- a/src/mame/video/thepit.c
+++ b/src/mame/video/thepit.c
@@ -231,7 +231,7 @@ READ8_HANDLER( thepit_input_port_0_r )
*************************************/
static void draw_sprites(running_machine &machine,
- bitmap_t *bitmap,
+ bitmap_t &bitmap,
const rectangle &cliprect,
int priority_to_draw)
{
diff --git a/src/mame/video/thief.c b/src/mame/video/thief.c
index ef9e8e9f5b7..cfde8a7ca99 100644
--- a/src/mame/video/thief.c
+++ b/src/mame/video/thief.c
@@ -116,7 +116,7 @@ SCREEN_UPDATE( thief ){
if (tms9927_screen_reset(screen.machine().device("tms")))
{
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
return 0;
}
@@ -133,7 +133,7 @@ SCREEN_UPDATE( thief ){
int bit;
if( flipscreen ){
for( bit=0; bit<8; bit++ ){
- bitmap->pix16(0xff - ypos, 0xff - (xpos+bit)) =
+ bitmap.pix16(0xff - ypos, 0xff - (xpos+bit)) =
(((plane0<<bit)&0x80)>>7) |
(((plane1<<bit)&0x80)>>6) |
(((plane2<<bit)&0x80)>>5) |
@@ -142,7 +142,7 @@ SCREEN_UPDATE( thief ){
}
else {
for( bit=0; bit<8; bit++ ){
- bitmap->pix16(ypos, xpos+bit) =
+ bitmap.pix16(ypos, xpos+bit) =
(((plane0<<bit)&0x80)>>7) |
(((plane1<<bit)&0x80)>>6) |
(((plane2<<bit)&0x80)>>5) |
diff --git a/src/mame/video/thoop2.c b/src/mame/video/thoop2.c
index 791bab58c05..18dffc82550 100644
--- a/src/mame/video/thoop2.c
+++ b/src/mame/video/thoop2.c
@@ -148,7 +148,7 @@ static void thoop2_sort_sprites(running_machine &machine)
3 | xxxxxxxx xxxxxx-- | sprite code (low bits)
*/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int pri)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int pri)
{
thoop2_state *state = machine.driver_data<thoop2_state>();
int j, x, y, ex, ey;
@@ -210,7 +210,7 @@ SCREEN_UPDATE( thoop2 )
thoop2_sort_sprites(screen.machine());
- bitmap->fill(0, cliprect );
+ bitmap.fill(0, cliprect );
tilemap_draw(bitmap,cliprect,state->m_pant[1],TILEMAP_DRAW_LAYER1 | 3,0);
tilemap_draw(bitmap,cliprect,state->m_pant[0],TILEMAP_DRAW_LAYER1 | 3,0);
diff --git a/src/mame/video/thunderj.c b/src/mame/video/thunderj.c
index 867678f00b0..2c4858c2c34 100644
--- a/src/mame/video/thunderj.c
+++ b/src/mame/video/thunderj.c
@@ -125,13 +125,13 @@ VIDEO_START( thunderj )
SCREEN_UPDATE( thunderj )
{
thunderj_state *state = screen.machine().driver_data<thunderj_state>();
- bitmap_t *priority_bitmap = screen.machine().priority_bitmap;
+ bitmap_t &priority_bitmap = screen.machine().priority_bitmap;
atarimo_rect_list rectlist;
bitmap_t *mobitmap;
int x, y, r;
/* draw the playfield */
- priority_bitmap->fill(0, cliprect);
+ priority_bitmap.fill(0, cliprect);
tilemap_draw(bitmap, cliprect, state->m_playfield_tilemap, 0, 0x00);
tilemap_draw(bitmap, cliprect, state->m_playfield_tilemap, 1, 0x01);
tilemap_draw(bitmap, cliprect, state->m_playfield_tilemap, 2, 0x02);
@@ -147,8 +147,8 @@ SCREEN_UPDATE( thunderj )
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
UINT16 *mo = &mobitmap->pix16(y);
- UINT16 *pf = &bitmap->pix16(y);
- UINT8 *pri = &priority_bitmap->pix8(y);
+ UINT16 *pf = &bitmap.pix16(y);
+ UINT8 *pri = &priority_bitmap.pix8(y);
for (x = rectlist.rect->min_x; x <= rectlist.rect->max_x; x++)
if (mo[x])
{
@@ -246,7 +246,7 @@ SCREEN_UPDATE( thunderj )
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
UINT16 *mo = &mobitmap->pix16(y);
- UINT16 *pf = &bitmap->pix16(y);
+ UINT16 *pf = &bitmap.pix16(y);
for (x = rectlist.rect->min_x; x <= rectlist.rect->max_x; x++)
if (mo[x])
{
diff --git a/src/mame/video/thunderx.c b/src/mame/video/thunderx.c
index 5a82387d511..4d6efd32b28 100644
--- a/src/mame/video/thunderx.c
+++ b/src/mame/video/thunderx.c
@@ -72,10 +72,10 @@ SCREEN_UPDATE( scontra )
k052109_tilemap_update(state->m_k052109);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
/* The background color is always from layer 1 - but it's always black anyway */
-// bitmap->fill(16 * state->m_layer_colorbase[1], cliprect);
+// bitmap.fill(16 * state->m_layer_colorbase[1], cliprect);
if (state->m_priority)
{
k052109_tilemap_draw(state->m_k052109, bitmap, cliprect, 2, TILEMAP_DRAW_OPAQUE, 1);
diff --git a/src/mame/video/tia.c b/src/mame/video/tia.c
index 62f190e729a..374f150f547 100644
--- a/src/mame/video/tia.c
+++ b/src/mame/video/tia.c
@@ -283,7 +283,7 @@ VIDEO_START( tia )
SCREEN_UPDATE( tia )
{
screen_height = screen.height();
- copybitmap(bitmap, helper[2], 0, 0, 0, 0, cliprect);
+ copybitmap(bitmap, *helper[2], 0, 0, 0, 0, cliprect);
return 0;
}
diff --git a/src/mame/video/tiamc1.c b/src/mame/video/tiamc1.c
index 95929eb477e..aa9b3212ac6 100644
--- a/src/mame/video/tiamc1.c
+++ b/src/mame/video/tiamc1.c
@@ -165,7 +165,7 @@ VIDEO_START( tiamc1 )
gfx_element_set_source(machine.gfx[0], state->m_charram);
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
tiamc1_state *state = machine.driver_data<tiamc1_state>();
int offs;
diff --git a/src/mame/video/tigeroad.c b/src/mame/video/tigeroad.c
index bd83879e4fc..6ab015a793f 100644
--- a/src/mame/video/tigeroad.c
+++ b/src/mame/video/tigeroad.c
@@ -67,7 +67,7 @@ WRITE16_HANDLER( tigeroad_scroll_w )
}
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int priority )
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int priority )
{
UINT16 *source = &machine.generic.buffered_spriteram.u16[machine.generic.spriteram_size/2] - 4;
UINT16 *finish = machine.generic.buffered_spriteram.u16;
diff --git a/src/mame/video/timelimt.c b/src/mame/video/timelimt.c
index 51b392adc15..4a920934508 100644
--- a/src/mame/video/timelimt.c
+++ b/src/mame/video/timelimt.c
@@ -116,7 +116,7 @@ WRITE8_HANDLER( timelimt_scroll_y_w )
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
timelimt_state *state = machine.driver_data<timelimt_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/timeplt.c b/src/mame/video/timeplt.c
index 06727ccac13..fd150832626 100644
--- a/src/mame/video/timeplt.c
+++ b/src/mame/video/timeplt.c
@@ -176,7 +176,7 @@ READ8_HANDLER( timeplt_scanline_r )
*
*************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
timeplt_state *state = machine.driver_data<timeplt_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/tmnt.c b/src/mame/video/tmnt.c
index 29203567e3c..16b5626c53d 100644
--- a/src/mame/video/tmnt.c
+++ b/src/mame/video/tmnt.c
@@ -627,7 +627,7 @@ SCREEN_UPDATE( punkshot )
konami_sortlayers3(state->m_sorted_layer, state->m_layerpri);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
k052109_tilemap_draw(state->m_k052109, bitmap, cliprect, state->m_sorted_layer[0], TILEMAP_DRAW_OPAQUE, 1);
k052109_tilemap_draw(state->m_k052109, bitmap, cliprect, state->m_sorted_layer[1], 0, 2);
k052109_tilemap_draw(state->m_k052109, bitmap, cliprect, state->m_sorted_layer[2], 0, 4);
@@ -659,8 +659,8 @@ SCREEN_UPDATE( lgtnfght )
konami_sortlayers3(state->m_sorted_layer, state->m_layerpri);
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(16 * bg_colorbase, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(16 * bg_colorbase, cliprect);
k052109_tilemap_draw(state->m_k052109, bitmap, cliprect, state->m_sorted_layer[0], 0, 1);
k052109_tilemap_draw(state->m_k052109, bitmap, cliprect, state->m_sorted_layer[1], 0, 2);
k052109_tilemap_draw(state->m_k052109, bitmap, cliprect, state->m_sorted_layer[2], 0, 4);
@@ -708,14 +708,14 @@ SCREEN_UPDATE( glfgreat )
/* not sure about the 053936 priority, but it seems to work */
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(16 * bg_colorbase, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(16 * bg_colorbase, cliprect);
k052109_tilemap_draw(state->m_k052109, bitmap, cliprect, state->m_sorted_layer[0], 0, 1);
if (state->m_layerpri[0] >= 0x30 && state->m_layerpri[1] < 0x30)
{
k053936_zoom_draw(state->m_k053936, bitmap, cliprect, state->m_roz_tilemap, 0, 1, 1);
- state->m_glfgreat_pixel = bitmap->pix16(0x80, 0x105);
+ state->m_glfgreat_pixel = bitmap.pix16(0x80, 0x105);
}
k052109_tilemap_draw(state->m_k052109, bitmap, cliprect, state->m_sorted_layer[1], 0, 2);
@@ -723,7 +723,7 @@ SCREEN_UPDATE( glfgreat )
if (state->m_layerpri[1] >= 0x30 && state->m_layerpri[2] < 0x30)
{
k053936_zoom_draw(state->m_k053936, bitmap, cliprect, state->m_roz_tilemap, 0, 1, 1);
- state->m_glfgreat_pixel = bitmap->pix16(0x80, 0x105);
+ state->m_glfgreat_pixel = bitmap.pix16(0x80, 0x105);
}
k052109_tilemap_draw(state->m_k052109, bitmap, cliprect, state->m_sorted_layer[2], 0, 4);
@@ -731,7 +731,7 @@ SCREEN_UPDATE( glfgreat )
if (state->m_layerpri[2] >= 0x30)
{
k053936_zoom_draw(state->m_k053936, bitmap, cliprect, state->m_roz_tilemap, 0, 1, 1);
- state->m_glfgreat_pixel = bitmap->pix16(0x80, 0x105);
+ state->m_glfgreat_pixel = bitmap.pix16(0x80, 0x105);
}
k053245_sprites_draw(state->m_k053245, bitmap, cliprect);
@@ -813,8 +813,8 @@ SCREEN_UPDATE( thndrx2 )
konami_sortlayers3(state->m_sorted_layer, state->m_layerpri);
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(16 * bg_colorbase, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(16 * bg_colorbase, cliprect);
k052109_tilemap_draw(state->m_k052109, bitmap, cliprect, state->m_sorted_layer[0], 0, 1);
k052109_tilemap_draw(state->m_k052109, bitmap, cliprect, state->m_sorted_layer[1], 0, 2);
k052109_tilemap_draw(state->m_k052109, bitmap, cliprect, state->m_sorted_layer[2], 0, 4);
diff --git a/src/mame/video/tnzs.c b/src/mame/video/tnzs.c
index c46b82a68f8..0239bbada01 100644
--- a/src/mame/video/tnzs.c
+++ b/src/mame/video/tnzs.c
@@ -44,7 +44,7 @@ PALETTE_INIT( arknoid2 )
SCREEN_UPDATE( tnzs )
{
- bitmap->fill(0x1f0, cliprect);
+ bitmap.fill(0x1f0, cliprect);
screen.machine().device<seta001_device>("spritegen")->set_fg_yoffsets( -0x12, 0x0e );
screen.machine().device<seta001_device>("spritegen")->set_bg_yoffsets( 0x1, -0x1 );
diff --git a/src/mame/video/toaplan1.c b/src/mame/video/toaplan1.c
index 60aa97a71ec..83e32e55c84 100644
--- a/src/mame/video/toaplan1.c
+++ b/src/mame/video/toaplan1.c
@@ -959,13 +959,13 @@ static void toaplan1_log_vram(running_machine &machine)
***************************************************************************/
// custom function to draw a single sprite. needed to keep correct sprites - sprites and sprites - tilemaps priorities
-static void toaplan1_draw_sprite_custom(bitmap_t *dest_bmp,const rectangle &clip,const gfx_element *gfx,
+static void toaplan1_draw_sprite_custom(bitmap_t &dest_bmp,const rectangle &clip,const gfx_element *gfx,
UINT32 code,UINT32 color,int flipx,int flipy,int sx,int sy,
int priority)
{
int pal_base = gfx->color_base + gfx->color_granularity * (color % gfx->total_colors);
const UINT8 *source_base = gfx_element_get_data(gfx, code % gfx->total_elements);
- bitmap_t *priority_bitmap = gfx->machine().priority_bitmap;
+ bitmap_t &priority_bitmap = gfx->machine().priority_bitmap;
int sprite_screen_height = ((1<<16)*gfx->height+0x8000)>>16;
int sprite_screen_width = ((1<<16)*gfx->width+0x8000)>>16;
@@ -1032,8 +1032,8 @@ static void toaplan1_draw_sprite_custom(bitmap_t *dest_bmp,const rectangle &clip
for( y=sy; y<ey; y++ )
{
const UINT8 *source = source_base + (y_index>>16) * gfx->line_modulo;
- UINT16 *dest = &dest_bmp->pix16(y);
- UINT8 *pri = &priority_bitmap->pix8(y);
+ UINT16 *dest = &dest_bmp.pix16(y);
+ UINT8 *pri = &priority_bitmap.pix8(y);
int x, x_index = x_index_base;
for( x=sx; x<ex; x++ )
@@ -1055,7 +1055,7 @@ static void toaplan1_draw_sprite_custom(bitmap_t *dest_bmp,const rectangle &clip
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
toaplan1_state *state = machine.driver_data<toaplan1_state>();
UINT16 *source = (UINT16 *)state->m_buffered_spriteram;
@@ -1123,7 +1123,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const recta
}
-static void rallybik_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int priority )
+static void rallybik_draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int priority )
{
toaplan1_state *state = machine.driver_data<toaplan1_state>();
UINT16 *buffered_spriteram16 = state->m_buffered_spriteram;
@@ -1168,7 +1168,7 @@ SCREEN_UPDATE( rallybik )
toaplan1_log_vram(screen.machine());
- bitmap->fill(0x120, cliprect);
+ bitmap.fill(0x120, cliprect);
tilemap_draw(bitmap, cliprect, state->m_pf1_tilemap, TILEMAP_DRAW_OPAQUE | 0, 0);
tilemap_draw(bitmap, cliprect, state->m_pf1_tilemap, TILEMAP_DRAW_OPAQUE | 1, 0);
@@ -1192,8 +1192,8 @@ SCREEN_UPDATE( toaplan1 )
toaplan1_log_vram(screen.machine());
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(0x120, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(0x120, cliprect);
// it's really correct?
tilemap_draw(bitmap, cliprect, state->m_pf1_tilemap, TILEMAP_DRAW_OPAQUE | 0, 0);
diff --git a/src/mame/video/toaplan2.c b/src/mame/video/toaplan2.c
index 905872a70da..b4d3c2b8e1f 100644
--- a/src/mame/video/toaplan2.c
+++ b/src/mame/video/toaplan2.c
@@ -297,13 +297,13 @@ SCREEN_UPDATE( toaplan2_dual )
if (state->m_vdp1)
{
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
state->m_custom_priority_bitmap->fill(0, cliprect);
state->m_vdp1->gp9001_render_vdp(screen.machine(), bitmap, cliprect);
}
if (state->m_vdp0)
{
- // bitmap->fill(0, cliprect);
+ // bitmap.fill(0, cliprect);
state->m_custom_priority_bitmap->fill(0, cliprect);
state->m_vdp0->gp9001_render_vdp(screen.machine(), bitmap, cliprect);
}
@@ -318,12 +318,12 @@ SCREEN_UPDATE( toaplan2_mixed )
{
toaplan2_state *state = screen.machine().driver_data<toaplan2_state>();
-// bitmap->fill(0, cliprect);
+// bitmap.fill(0, cliprect);
// gp9001_custom_priority_bitmap->fill(0, cliprect);
if (state->m_vdp0)
{
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
state->m_custom_priority_bitmap->fill(0, cliprect);
state->m_vdp0->gp9001_render_vdp(screen.machine(), bitmap, cliprect);
}
@@ -331,7 +331,7 @@ SCREEN_UPDATE( toaplan2_mixed )
{
state->m_secondary_render_bitmap->fill(0, cliprect);
state->m_custom_priority_bitmap->fill(0, cliprect);
- state->m_vdp1->gp9001_render_vdp(screen.machine(), state->m_secondary_render_bitmap, cliprect);
+ state->m_vdp1->gp9001_render_vdp(screen.machine(), *state->m_secondary_render_bitmap, cliprect);
}
@@ -356,7 +356,7 @@ SCREEN_UPDATE( toaplan2_mixed )
for (y=0;y<height;y++)
{
- src_vdp0 = &bitmap->pix16(y);
+ src_vdp0 = &bitmap.pix16(y);
src_vdp1 = &state->m_secondary_render_bitmap->pix16(y);
for (x=0;x<width;x++)
@@ -420,7 +420,7 @@ SCREEN_UPDATE( toaplan2 )
if (state->m_vdp0)
{
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
state->m_custom_priority_bitmap->fill(0, cliprect);
state->m_vdp0->gp9001_render_vdp(screen.machine(), bitmap, cliprect);
}
diff --git a/src/mame/video/toki.c b/src/mame/video/toki.c
index 80b352731f1..c5d13d4a858 100644
--- a/src/mame/video/toki.c
+++ b/src/mame/video/toki.c
@@ -181,7 +181,7 @@ WRITE16_HANDLER( toki_background2_videoram16_w )
***************************************************************************/
-static void toki_draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void toki_draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect)
{
int x,y,xoffs,yoffs,tile,flipx,flipy,color,offs;
UINT16 *sprite_word;
@@ -224,7 +224,7 @@ static void toki_draw_sprites(running_machine &machine, bitmap_t *bitmap,const r
}
-static void tokib_draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void tokib_draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect)
{
int x,y,tile,flipx,color,offs;
UINT16 *sprite_word;
diff --git a/src/mame/video/toobin.c b/src/mame/video/toobin.c
index a51c6c75241..bae9d42ab4c 100644
--- a/src/mame/video/toobin.c
+++ b/src/mame/video/toobin.c
@@ -231,27 +231,27 @@ WRITE16_HANDLER( toobin_slip_w )
SCREEN_UPDATE( toobin )
{
toobin_state *state = screen.machine().driver_data<toobin_state>();
- bitmap_t *priority_bitmap = screen.machine().priority_bitmap;
+ bitmap_t &priority_bitmap = screen.machine().priority_bitmap;
const rgb_t *palette = palette_entry_list_adjusted(screen.machine().palette);
atarimo_rect_list rectlist;
bitmap_t *mobitmap;
int x, y;
/* draw the playfield */
- priority_bitmap->fill(0, cliprect);
- tilemap_draw(state->m_pfbitmap, cliprect, state->m_playfield_tilemap, 0, 0);
- tilemap_draw(state->m_pfbitmap, cliprect, state->m_playfield_tilemap, 1, 1);
- tilemap_draw(state->m_pfbitmap, cliprect, state->m_playfield_tilemap, 2, 2);
- tilemap_draw(state->m_pfbitmap, cliprect, state->m_playfield_tilemap, 3, 3);
+ priority_bitmap.fill(0, cliprect);
+ tilemap_draw(*state->m_pfbitmap, cliprect, state->m_playfield_tilemap, 0, 0);
+ tilemap_draw(*state->m_pfbitmap, cliprect, state->m_playfield_tilemap, 1, 1);
+ tilemap_draw(*state->m_pfbitmap, cliprect, state->m_playfield_tilemap, 2, 2);
+ tilemap_draw(*state->m_pfbitmap, cliprect, state->m_playfield_tilemap, 3, 3);
/* draw and merge the MO */
mobitmap = atarimo_render(0, cliprect, &rectlist);
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
- UINT32 *dest = &bitmap->pix32(y);
+ UINT32 *dest = &bitmap.pix32(y);
UINT16 *mo = &mobitmap->pix16(y);
UINT16 *pf = &state->m_pfbitmap->pix16(y);
- UINT8 *pri = &priority_bitmap->pix8(y);
+ UINT8 *pri = &priority_bitmap.pix8(y);
for (x = cliprect.min_x; x <= cliprect.max_x; x++)
{
UINT16 pix = pf[x];
diff --git a/src/mame/video/topspeed.c b/src/mame/video/topspeed.c
index 8af94bcdf51..29fa1338723 100644
--- a/src/mame/video/topspeed.c
+++ b/src/mame/video/topspeed.c
@@ -26,7 +26,7 @@
********************************************************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
topspeed_state *state = machine.driver_data<topspeed_state>();
UINT16 *spriteram = state->m_spriteram;
@@ -155,8 +155,8 @@ SCREEN_UPDATE( topspeed )
layer[2] = 1;
layer[3] = 0;
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(0, cliprect);
#ifdef MAME_DEBUG
if (state->m_dislayer[3] == 0)
diff --git a/src/mame/video/toypop.c b/src/mame/video/toypop.c
index c5327c0025c..cae4d2b6ab5 100644
--- a/src/mame/video/toypop.c
+++ b/src/mame/video/toypop.c
@@ -172,7 +172,7 @@ WRITE16_HANDLER( toypop_merged_background_w )
state->m_bg_image[2*offset+1] = (data & 0xf) | ((data & 0xf0) << 4);
}
-static void draw_background(running_machine &machine, bitmap_t *bitmap)
+static void draw_background(running_machine &machine, bitmap_t &bitmap)
{
toypop_state *state = machine.driver_data<toypop_state>();
pen_t pen_base = 0x300 + 0x10*state->m_palettebank;
@@ -183,7 +183,7 @@ static void draw_background(running_machine &machine, bitmap_t *bitmap)
int offs = 0xFDFE/2;
for (int y = 0; y < 224; y++)
{
- UINT16 *scanline = &bitmap->pix16(y);
+ UINT16 *scanline = &bitmap.pix16(y);
for (int x = 0; x < 288; x+=2)
{
UINT16 data = state->m_bg_image[offs];
@@ -198,7 +198,7 @@ static void draw_background(running_machine &machine, bitmap_t *bitmap)
int offs = 0x200/2;
for (int y = 0; y < 224; y++)
{
- UINT16 *scanline = &bitmap->pix16(y);
+ UINT16 *scanline = &bitmap.pix16(y);
for (int x = 0; x < 288; x+=2)
{
UINT16 data = state->m_bg_image[offs];
@@ -219,7 +219,7 @@ static void draw_background(running_machine &machine, bitmap_t *bitmap)
***************************************************************************/
-void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, UINT8 *spriteram_base)
+void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, UINT8 *spriteram_base)
{
UINT8 *spriteram = spriteram_base + 0x780;
UINT8 *spriteram_2 = spriteram + 0x800;
diff --git a/src/mame/video/tp84.c b/src/mame/video/tp84.c
index 07a354acaf7..1655da627a8 100644
--- a/src/mame/video/tp84.c
+++ b/src/mame/video/tp84.c
@@ -152,7 +152,7 @@ VIDEO_START( tp84 )
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
tp84_state *state = machine.driver_data<tp84_state>();
int offs;
diff --git a/src/mame/video/trackfld.c b/src/mame/video/trackfld.c
index 4a53600cbd8..f34f067e6a1 100644
--- a/src/mame/video/trackfld.c
+++ b/src/mame/video/trackfld.c
@@ -192,7 +192,7 @@ VIDEO_START( atlantol )
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
trackfld_state *state = machine.driver_data<trackfld_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/travrusa.c b/src/mame/video/travrusa.c
index bfcde950e6e..34f9ed0ce10 100644
--- a/src/mame/video/travrusa.c
+++ b/src/mame/video/travrusa.c
@@ -293,7 +293,7 @@ WRITE8_HANDLER( travrusa_flipscreen_w )
***************************************************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect)
{
travrusa_state *state = machine.driver_data<travrusa_state>();
int offs;
diff --git a/src/mame/video/triplhnt.c b/src/mame/video/triplhnt.c
index c1ebaab5bcf..085b62512c4 100644
--- a/src/mame/video/triplhnt.c
+++ b/src/mame/video/triplhnt.c
@@ -32,7 +32,7 @@ static TIMER_CALLBACK( triplhnt_hit_callback )
}
-static void draw_sprites(running_machine &machine, bitmap_t* bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
triplhnt_state *state = machine.driver_data<triplhnt_state>();
int i;
@@ -74,7 +74,7 @@ static void draw_sprites(running_machine &machine, bitmap_t* bitmap, const recta
/* render sprite to auxiliary bitmap */
- drawgfx_opaque(state->m_helper, cliprect, machine.gfx[state->m_sprite_zoom],
+ drawgfx_opaque(*state->m_helper, cliprect, machine.gfx[state->m_sprite_zoom],
2 * code + state->m_sprite_bank, 0, code & 8, 0,
rect.min_x, rect.min_y);
@@ -98,7 +98,7 @@ static void draw_sprites(running_machine &machine, bitmap_t* bitmap, const recta
for (y = rect.min_y; y <= rect.max_y; y++)
{
pen_t a = state->m_helper->pix16(y, x);
- pen_t b = bitmap->pix16(y, x);
+ pen_t b = bitmap.pix16(y, x);
if (a == 2 && b == 7)
{
@@ -107,7 +107,7 @@ static void draw_sprites(running_machine &machine, bitmap_t* bitmap, const recta
}
if (a != 1)
- bitmap->pix16(y, x) = a;
+ bitmap.pix16(y, x) = a;
}
}
}
diff --git a/src/mame/video/truco.c b/src/mame/video/truco.c
index 8d9194092c6..d75873f2b8f 100644
--- a/src/mame/video/truco.c
+++ b/src/mame/video/truco.c
@@ -49,7 +49,7 @@ SCREEN_UPDATE( truco )
else
pixel = ( vid[x>>1] >> 4 ) & 0x0f;
- bitmap->pix16(y, x) = pixel;
+ bitmap.pix16(y, x) = pixel;
}
vid += 0x80;
diff --git a/src/mame/video/tryout.c b/src/mame/video/tryout.c
index ebb1ee9b176..a6a775f716b 100644
--- a/src/mame/video/tryout.c
+++ b/src/mame/video/tryout.c
@@ -182,7 +182,7 @@ VIDEO_START( tryout )
tilemap_set_transparent_pen(state->m_fg_tilemap,0);
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect)
{
tryout_state *state = machine.driver_data<tryout_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -254,7 +254,7 @@ SCREEN_UPDATE( tryout )
if(!(state->m_gfx_control[0] & 0x8)) // screen disable
{
/* TODO: Color might be different, needs a video from an original pcb. */
- bitmap->fill(screen.machine().pens[0x10], cliprect);
+ bitmap.fill(screen.machine().pens[0x10], cliprect);
}
else
{
diff --git a/src/mame/video/tsamurai.c b/src/mame/video/tsamurai.c
index e5829b7b6f3..2250aef42a9 100644
--- a/src/mame/video/tsamurai.c
+++ b/src/mame/video/tsamurai.c
@@ -137,7 +137,7 @@ WRITE8_HANDLER( tsamurai_fg_colorram_w )
***************************************************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
tsamurai_state *state = machine.driver_data<tsamurai_state>();
UINT8 *spriteram = state->m_spriteram;
@@ -218,7 +218,7 @@ SCREEN_UPDATE( tsamurai )
Note that the background color register isn't well understood
(screenshots would be helpful)
*/
- bitmap->fill(state->m_bgcolor, cliprect);
+ bitmap.fill(state->m_bgcolor, cliprect);
tilemap_draw(bitmap,cliprect,state->m_background,0,0);
draw_sprites(screen.machine(), bitmap,cliprect);
tilemap_draw(bitmap,cliprect,state->m_foreground,0,0);
diff --git a/src/mame/video/tubep.c b/src/mame/video/tubep.c
index 5b729b75f45..3dae591f2d5 100644
--- a/src/mame/video/tubep.c
+++ b/src/mame/video/tubep.c
@@ -617,7 +617,7 @@ SCREEN_UPDATE( tubep )
text_gfx_data = text_gfx_base[(text_code << 3) | (v & 0x07)];
if (text_gfx_data & (0x80 >> (h & 0x07)))
- bitmap->pix16(v, h) = (state->m_textram[text_offs + 1] & 0x0f) | state->m_color_A4;
+ bitmap.pix16(v, h) = (state->m_textram[text_offs + 1] & 0x0f) | state->m_color_A4;
else
{
UINT32 bg_data;
@@ -658,7 +658,7 @@ SCREEN_UPDATE( tubep )
if (sp_data != 0x0f)
bg_data = state->m_prom2[sp_data | state->m_color_A4];
- bitmap->pix16(v, h) = pen_base + bg_data*64 + romB_data_h;
+ bitmap.pix16(v, h) = pen_base + bg_data*64 + romB_data_h;
}
}
}
@@ -788,7 +788,7 @@ SCREEN_UPDATE( rjammer )
text_gfx_data = text_gfx_base[(text_code << 3) | (v & 0x07)];
if (text_gfx_data & (0x80 >> (h & 0x07)))
- bitmap->pix16(v, h) = 0x10 | (state->m_textram[text_offs + 1] & 0x0f);
+ bitmap.pix16(v, h) = 0x10 | (state->m_textram[text_offs + 1] & 0x0f);
else
{
UINT32 sp_data;
@@ -799,7 +799,7 @@ SCREEN_UPDATE( rjammer )
sp_data = sp_data1;
if (sp_data != 0x0f)
- bitmap->pix16(v, h) = 0x00 + sp_data;
+ bitmap.pix16(v, h) = 0x00 + sp_data;
else
{
UINT32 bg_data;
@@ -852,7 +852,7 @@ SCREEN_UPDATE( rjammer )
color_bank = (pal14h4_pin13 & ((bg_data&0x08)>>3) & ((bg_data&0x04)>>2) & (((bg_data&0x02)>>1)^1) & (bg_data&0x01) )
| (pal14h4_pin18 & ((bg_data&0x08)>>3) & ((bg_data&0x04)>>2) & ((bg_data&0x02)>>1) & ((bg_data&0x01)^1) )
| (pal14h4_pin19);
- bitmap->pix16(v, h) = 0x20 + color_bank*0x10 + bg_data;
+ bitmap.pix16(v, h) = 0x20 + color_bank*0x10 + bg_data;
}
}
}
diff --git a/src/mame/video/tumbleb.c b/src/mame/video/tumbleb.c
index fdfa6245d7b..7a1ffa80f81 100644
--- a/src/mame/video/tumbleb.c
+++ b/src/mame/video/tumbleb.c
@@ -19,7 +19,7 @@ to switch between 8*8 tiles and 16*16 tiles.
/******************************************************************************/
-static void tumblepb_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void tumblepb_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
tumbleb_state *state = machine.driver_data<tumbleb_state>();
UINT16 *spriteram = state->m_spriteram;
@@ -85,7 +85,7 @@ static void tumblepb_draw_sprites( running_machine &machine, bitmap_t *bitmap, c
}
}
-static void jumpkids_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void jumpkids_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
tumbleb_state *state = machine.driver_data<tumbleb_state>();
UINT16 *spriteram = state->m_spriteram;
@@ -152,7 +152,7 @@ static void jumpkids_draw_sprites( running_machine &machine, bitmap_t *bitmap, c
}
}
-static void fncywld_draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void fncywld_draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
tumbleb_state *state = machine.driver_data<tumbleb_state>();
UINT16 *spriteram = state->m_spriteram;
@@ -878,7 +878,7 @@ SCREEN_UPDATE( jumppop )
{
tumbleb_state *state = screen.machine().driver_data<tumbleb_state>();
- // bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ // bitmap.fill(get_black_pen(screen.machine()), cliprect);
tilemap_set_scrollx(state->m_pf1_tilemap, 0, state->m_control[2] - 0x3a0);
tilemap_set_scrolly(state->m_pf1_tilemap, 0, state->m_control[3]);
diff --git a/src/mame/video/tumblep.c b/src/mame/video/tumblep.c
index f933b35509c..ee1d209228f 100644
--- a/src/mame/video/tumblep.c
+++ b/src/mame/video/tumblep.c
@@ -27,7 +27,7 @@ SCREEN_UPDATE( tumblep )
flip_screen_set(screen.machine(), BIT(flip, 7));
deco16ic_pf_update(state->m_deco_tilegen1, state->m_pf1_rowscroll, state->m_pf2_rowscroll);
- bitmap->fill(256, cliprect); /* not verified */
+ bitmap.fill(256, cliprect); /* not verified */
deco16ic_tilemap_2_draw(state->m_deco_tilegen1, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
deco16ic_tilemap_1_draw(state->m_deco_tilegen1, bitmap, cliprect, 0, 0);
diff --git a/src/mame/video/tunhunt.c b/src/mame/video/tunhunt.c
index 59bec52882f..d9ff0ff5622 100644
--- a/src/mame/video/tunhunt.c
+++ b/src/mame/video/tunhunt.c
@@ -200,7 +200,7 @@ static void set_pens(running_machine &machine)
}
}
-static void draw_motion_object(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_motion_object(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
/*
* VSTRLO 0x1202
@@ -214,7 +214,7 @@ static void draw_motion_object(running_machine &machine, bitmap_t *bitmap, const
*/
tunhunt_state *state = machine.driver_data<tunhunt_state>();
- bitmap_t *tmpbitmap = machine.generic.tmpbitmap;
+ bitmap_t &tmpbitmap = *machine.generic.tmpbitmap;
UINT8 *spriteram = state->m_spriteram;
UINT8 *tunhunt_ram = state->m_workram;
//int skip = tunhunt_ram[MOBST];
@@ -238,10 +238,10 @@ static void draw_motion_object(running_machine &machine, bitmap_t *bitmap, const
color = ((span_data>>6)&0x3)^0x3;
count = (span_data&0x1f)+1;
while( count-- && x < 256 )
- tmpbitmap->pix16(line, x++) = color;
+ tmpbitmap.pix16(line, x++) = color;
}
while( x<256 )
- tmpbitmap->pix16(line, x++) = 0;
+ tmpbitmap.pix16(line, x++) = 0;
} /* next line */
switch( tunhunt_ram[VSTRLO] )
@@ -272,7 +272,7 @@ static void draw_motion_object(running_machine &machine, bitmap_t *bitmap, const
);
}
-static void draw_box(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_box(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
/*
This is unnecessarily slow, but the box priorities aren't completely understood,
@@ -320,14 +320,14 @@ static void draw_box(running_machine &machine, bitmap_t *bitmap, const rectangle
}
}
if (x >= cliprect.min_x && x <= cliprect.max_x)
- bitmap->pix16(0xff-y, x) = color;
+ bitmap.pix16(0xff-y, x) = color;
}
}
}
/* "shell" graphics are 16x16 pixel tiles used for player shots and targeting cursor */
static void draw_shell(running_machine &machine,
- bitmap_t *bitmap,
+ bitmap_t &bitmap,
const rectangle &cliprect,
int picture_code,
int hposition,
diff --git a/src/mame/video/turbo.c b/src/mame/video/turbo.c
index f2e9f9394df..0699a3aeb04 100644
--- a/src/mame/video/turbo.c
+++ b/src/mame/video/turbo.c
@@ -407,7 +407,7 @@ static UINT32 turbo_get_sprite_bits(running_machine &machine, UINT8 road, sprite
SCREEN_UPDATE( turbo )
{
turbo_state *state = screen.machine().driver_data<turbo_state>();
- bitmap_t *fgpixmap = tilemap_get_pixmap(state->m_fg_tilemap);
+ bitmap_t &fgpixmap = tilemap_get_pixmap(state->m_fg_tilemap);
const UINT8 *road_gfxdata = screen.machine().region("gfx3")->base();
const UINT8 *prom_base = screen.machine().region("proms")->base();
const UINT8 *pr1114 = prom_base + 0x000;
@@ -423,8 +423,8 @@ SCREEN_UPDATE( turbo )
/* loop over rows */
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
- const UINT16 *fore = &fgpixmap->pix16(y);
- UINT16 *dest = &bitmap->pix16(y);
+ const UINT16 *fore = &fgpixmap.pix16(y);
+ UINT16 *dest = &bitmap.pix16(y);
int sel, coch, babit, slipar_acciar, area, offs, areatmp, road = 0;
sprite_info sprinfo;
@@ -762,7 +762,7 @@ static UINT32 subroc3d_get_sprite_bits(running_machine &machine, sprite_info *sp
SCREEN_UPDATE( subroc3d )
{
turbo_state *state = screen.machine().driver_data<turbo_state>();
- bitmap_t *fgpixmap = tilemap_get_pixmap(state->m_fg_tilemap);
+ bitmap_t &fgpixmap = tilemap_get_pixmap(state->m_fg_tilemap);
const UINT8 *prom_base = screen.machine().region("proms")->base();
const UINT8 *pr1419 = prom_base + 0x000;
const UINT8 *pr1620 = prom_base + 0x200;
@@ -773,8 +773,8 @@ SCREEN_UPDATE( subroc3d )
/* loop over rows */
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
- const UINT16 *fore = &fgpixmap->pix16(y);
- UINT16 *dest = &bitmap->pix16(y);
+ const UINT16 *fore = &fgpixmap.pix16(y);
+ UINT16 *dest = &bitmap.pix16(y);
sprite_info sprinfo;
/* compute the sprite information; we use y-1 since this info was computed during HBLANK */
@@ -982,7 +982,7 @@ static UINT32 buckrog_get_sprite_bits(running_machine &machine, sprite_info *spr
SCREEN_UPDATE( buckrog )
{
turbo_state *state = screen.machine().driver_data<turbo_state>();
- bitmap_t *fgpixmap = tilemap_get_pixmap(state->m_fg_tilemap);
+ bitmap_t &fgpixmap = tilemap_get_pixmap(state->m_fg_tilemap);
const UINT8 *bgcolor = screen.machine().region("gfx3")->base();
const UINT8 *prom_base = screen.machine().region("proms")->base();
const UINT8 *pr5194 = prom_base + 0x000;
@@ -993,8 +993,8 @@ SCREEN_UPDATE( buckrog )
/* loop over rows */
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
- const UINT16 *fore = &fgpixmap->pix16(y);
- UINT16 *dest = &bitmap->pix16(y);
+ const UINT16 *fore = &fgpixmap.pix16(y);
+ UINT16 *dest = &bitmap.pix16(y);
sprite_info sprinfo;
/* compute the sprite information; we use y-1 since this info was computed during HBLANK */
diff --git a/src/mame/video/tutankhm.c b/src/mame/video/tutankhm.c
index b881f74ad3c..7e5d24ee608 100644
--- a/src/mame/video/tutankhm.c
+++ b/src/mame/video/tutankhm.c
@@ -71,7 +71,7 @@ SCREEN_UPDATE( tutankhm )
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
- UINT32 *dst = &bitmap->pix32(y);
+ UINT32 *dst = &bitmap.pix32(y);
for (x = cliprect.min_x; x <= cliprect.max_x; x++)
{
diff --git a/src/mame/video/twin16.c b/src/mame/video/twin16.c
index d83b4cd2cc8..84f5398500e 100644
--- a/src/mame/video/twin16.c
+++ b/src/mame/video/twin16.c
@@ -221,7 +221,7 @@ void twin16_spriteram_process( running_machine &machine )
state->m_need_process_spriteram = 0;
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap )
{
twin16_state *state = machine.driver_data<twin16_state>();
const UINT16 *source = 0x1800+machine.generic.buffered_spriteram.u16 + 0x800 - 4;
@@ -303,8 +303,8 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap )
int sy = (flipy)?(ypos+height-1-y):(ypos+y);
if( sy>=16 && sy<256-16 )
{
- UINT16 *dest = &bitmap->pix16(sy);
- UINT8 *pdest = &machine.priority_bitmap->pix8(sy);
+ UINT16 *dest = &bitmap.pix16(sy);
+ UINT8 *pdest = &machine.priority_bitmap.pix8(sy);
for( x=0; x<width; x++ )
{
@@ -344,7 +344,7 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap )
-static void draw_layer( running_machine &machine, bitmap_t *bitmap, int opaque )
+static void draw_layer( running_machine &machine, bitmap_t &bitmap, int opaque )
{
twin16_state *state = machine.driver_data<twin16_state>();
UINT16 *videoram = state->m_videoram;
@@ -416,9 +416,9 @@ static void draw_layer( running_machine &machine, bitmap_t *bitmap, int opaque )
if( ypos>=256 ) ypos -= 512;
x1 = MAX(xpos, 0);
- x2 = MIN(xpos+7, bitmap->width()-1);
+ x2 = MIN(xpos+7, bitmap.width()-1);
y1 = MAX(ypos, 0);
- y2 = MIN(ypos+7, bitmap->height()-1);
+ y2 = MIN(ypos+7, bitmap.height()-1);
if (x1 <= x2 && y1 <= y2)
{
@@ -438,8 +438,8 @@ static void draw_layer( running_machine &machine, bitmap_t *bitmap, int opaque )
for (y = y1; y <= y2; y++)
{
const UINT16 *gfxptr = gfx_data + ((y - ypos) ^ yxor) * 2;
- UINT16 *dest = &bitmap->pix16(y);
- UINT8 *pdest = &machine.priority_bitmap->pix8(y);
+ UINT16 *dest = &bitmap.pix16(y);
+ UINT8 *pdest = &machine.priority_bitmap.pix8(y);
for (x = x1; x <= x2; x++)
{
@@ -455,8 +455,8 @@ static void draw_layer( running_machine &machine, bitmap_t *bitmap, int opaque )
for (y = y1; y <= y2; y++)
{
const UINT16 *gfxptr = gfx_data + ((y - ypos) ^ yxor) * 2;
- UINT16 *dest = &bitmap->pix16(y);
- UINT8 *pdest = &machine.priority_bitmap->pix8(y);
+ UINT16 *dest = &bitmap.pix16(y);
+ UINT8 *pdest = &machine.priority_bitmap.pix8(y);
for (x = x1; x <= x2; x++)
{
@@ -527,7 +527,7 @@ SCREEN_UPDATE( twin16 )
if (state->m_video_register&TWIN16_SCREEN_FLIPX) text_flip|=TILEMAP_FLIPX;
if (state->m_video_register&TWIN16_SCREEN_FLIPY) text_flip|=TILEMAP_FLIPY;
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
draw_layer( screen.machine(), bitmap, 1 );
draw_layer( screen.machine(), bitmap, 0 );
draw_sprites( screen.machine(), bitmap );
diff --git a/src/mame/video/twincobr.c b/src/mame/video/twincobr.c
index 6367d920ea7..c287deaf090 100644
--- a/src/mame/video/twincobr.c
+++ b/src/mame/video/twincobr.c
@@ -458,7 +458,7 @@ static void twincobr_log_vram(running_machine &machine)
Sprite Handlers
***************************************************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int priority )
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int priority )
{
twincobr_state *state = machine.driver_data<twincobr_state>();
int offs;
@@ -504,7 +504,7 @@ SCREEN_UPDATE( toaplan0 )
if (state->m_wardner_sprite_hack) wardner_sprite_priority_hack(screen.machine());
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
tilemap_draw(bitmap,cliprect,state->m_bg_tilemap,TILEMAP_DRAW_OPAQUE,0);
draw_sprites(screen.machine(), bitmap,cliprect,0x0400);
diff --git a/src/mame/video/tx1.c b/src/mame/video/tx1.c
index 079ffde66f2..ce8703d1e20 100644
--- a/src/mame/video/tx1.c
+++ b/src/mame/video/tx1.c
@@ -1131,7 +1131,7 @@ SCREEN_EOF( tx1 )
state->m_vregs.slin_val += state->m_vregs.slin_inc;
}
-static void tx1_combine_layers(running_machine &machine, bitmap_t *bitmap, int screen)
+static void tx1_combine_layers(running_machine &machine, bitmap_t &bitmap, int screen)
{
tx1_state *state = machine.driver_data<tx1_state>();
int x, y;
@@ -1141,7 +1141,7 @@ static void tx1_combine_layers(running_machine &machine, bitmap_t *bitmap, int s
for (y = 0; y < 240; ++y)
{
- UINT16 *bmp_addr = &bitmap->pix16(y);
+ UINT16 *bmp_addr = &bitmap.pix16(y);
UINT32 bmp_offset = y * 768 + x_offset;
@@ -2929,7 +2929,7 @@ WRITE16_HANDLER( buggyboy_scolst_w )
*
*************************************/
-static void bb_combine_layers(running_machine &machine, bitmap_t *bitmap, int screen)
+static void bb_combine_layers(running_machine &machine, bitmap_t &bitmap, int screen)
{
tx1_state *state = machine.driver_data<tx1_state>();
UINT8 *chr_pal = machine.region("proms")->base() + 0x400;
@@ -2961,7 +2961,7 @@ static void bb_combine_layers(running_machine &machine, bitmap_t *bitmap, int sc
UINT32 sky_en = BIT(state->m_vregs.sky, 7);
UINT32 sky_val = (((state->m_vregs.sky & 0x7f) + y) >> 2) & 0x3f;
- UINT16 *bmp_addr = &bitmap->pix16(y);
+ UINT16 *bmp_addr = &bitmap.pix16(y);
for (x = 0; x < 256; ++x)
{
diff --git a/src/mame/video/ultratnk.c b/src/mame/video/ultratnk.c
index 613ccc79078..30eddcdd9ca 100644
--- a/src/mame/video/ultratnk.c
+++ b/src/mame/video/ultratnk.c
@@ -120,12 +120,12 @@ SCREEN_EOF( ultratnk )
rect &= screen.machine().primary_screen->visible_area();
- tilemap_draw(state->m_helper, rect, state->m_playfield, 0, 0);
+ tilemap_draw(*state->m_helper, rect, state->m_playfield, 0, 0);
if (code & 4)
bank = 32;
- drawgfx_transpen(state->m_helper, rect, screen.machine().gfx[1],
+ drawgfx_transpen(*state->m_helper, rect, screen.machine().gfx[1],
(code >> 3) | bank,
4,
0, 0,
diff --git a/src/mame/video/undrfire.c b/src/mame/video/undrfire.c
index 773d11c459e..55e9362ea95 100644
--- a/src/mame/video/undrfire.c
+++ b/src/mame/video/undrfire.c
@@ -64,7 +64,7 @@ Heavy use is made of sprite zooming.
***************************************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect,const int *primasks,int x_offs,int y_offs)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect,const int *primasks,int x_offs,int y_offs)
{
undrfire_state *state = machine.driver_data<undrfire_state>();
UINT32 *spriteram32 = state->m_spriteram;
@@ -208,7 +208,7 @@ logerror("Sprite number %04x had %02x invalid chunks\n",tilenum,bad_chunks);
}
-static void draw_sprites_cbombers(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect,const int *primasks,int x_offs,int y_offs)
+static void draw_sprites_cbombers(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect,const int *primasks,int x_offs,int y_offs)
{
undrfire_state *state = machine.driver_data<undrfire_state>();
UINT32 *spriteram32 = state->m_spriteram;
@@ -408,8 +408,8 @@ SCREEN_UPDATE( undrfire )
pivlayer[1] = pivlayer[0] ^ 1;
pivlayer[2] = 2;
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(0, cliprect); /* wrong color? */
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(0, cliprect); /* wrong color? */
/* The "PIV" chip seems to be a renamed TC0100SCN. It has a
@@ -551,8 +551,8 @@ SCREEN_UPDATE( cbombers )
pivlayer[1] = pivlayer[0] ^ 1;
pivlayer[2] = 2;
- screen.machine().priority_bitmap->fill(0, cliprect);
- bitmap->fill(0, cliprect); /* wrong color? */
+ screen.machine().priority_bitmap.fill(0, cliprect);
+ bitmap.fill(0, cliprect); /* wrong color? */
/* The "PIV" chip seems to be a renamed TC0100SCN. It has a
diff --git a/src/mame/video/unico.c b/src/mame/video/unico.c
index 73e4513f00a..b0e83fc07b0 100644
--- a/src/mame/video/unico.c
+++ b/src/mame/video/unico.c
@@ -221,7 +221,7 @@ VIDEO_START( zeropnt2 )
***************************************************************************/
-static void unico_draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void unico_draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect)
{
unico_state *state = machine.driver_data<unico_state>();
UINT16 *spriteram16 = state->m_spriteram;
@@ -276,7 +276,7 @@ static void unico_draw_sprites(running_machine &machine, bitmap_t *bitmap,const
}
}
-static void zeropnt2_draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void zeropnt2_draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect)
{
unico_state *state = machine.driver_data<unico_state>();
UINT32 *spriteram32 = (UINT32 *)state->m_spriteram;
@@ -368,8 +368,8 @@ if ( screen.machine().input().code_pressed(KEYCODE_Z) || screen.machine().input(
#endif
/* The background color is the first of the last palette */
- bitmap->fill(0x1f00, cliprect);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ bitmap.fill(0x1f00, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
if (layers_ctrl & 1) tilemap_draw(bitmap,cliprect,state->m_tilemap[0],0,1);
if (layers_ctrl & 2) tilemap_draw(bitmap,cliprect,state->m_tilemap[1],0,2);
@@ -408,8 +408,8 @@ if ( screen.machine().input().code_pressed(KEYCODE_Z) || screen.machine().input(
#endif
/* The background color is the first of the last palette */
- bitmap->fill(0x1f00, cliprect);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ bitmap.fill(0x1f00, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
if (layers_ctrl & 1) tilemap_draw(bitmap,cliprect,state->m_tilemap[0],0,1);
if (layers_ctrl & 2) tilemap_draw(bitmap,cliprect,state->m_tilemap[1],0,2);
diff --git a/src/mame/video/vastar.c b/src/mame/video/vastar.c
index 21cec708aac..0bc292b45dd 100644
--- a/src/mame/video/vastar.c
+++ b/src/mame/video/vastar.c
@@ -137,7 +137,7 @@ READ8_HANDLER( vastar_bg2videoram_r )
***************************************************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect)
{
vastar_state *state = machine.driver_data<vastar_state>();
UINT8 *spriteram = state->m_spriteram1;
diff --git a/src/mame/video/vball.c b/src/mame/video/vball.c
index c89be21d547..125f38bafcb 100644
--- a/src/mame/video/vball.c
+++ b/src/mame/video/vball.c
@@ -114,7 +114,7 @@ void vb_mark_all_dirty( running_machine &machine )
cliprect,gfx, \
(which+order),color,flipx,flipy,sx,sy,0);
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
vball_state *state = machine.driver_data<vball_state>();
const gfx_element *gfx = machine.gfx[1];
diff --git a/src/mame/video/vdc.c b/src/mame/video/vdc.c
index 18ed40357f3..ff5a5bb2cde 100644
--- a/src/mame/video/vdc.c
+++ b/src/mame/video/vdc.c
@@ -435,7 +435,7 @@ VIDEO_START( pce )
SCREEN_UPDATE( pce )
{
/* copy our rendering buffer to the display */
- copybitmap (bitmap,vce.bmp,0,0,0,0,cliprect);
+ copybitmap (bitmap,*vce.bmp,0,0,0,0,cliprect);
return 0;
}
diff --git a/src/mame/video/vendetta.c b/src/mame/video/vendetta.c
index fd6fb88f0f8..072b5ed18ac 100644
--- a/src/mame/video/vendetta.c
+++ b/src/mame/video/vendetta.c
@@ -73,7 +73,7 @@ SCREEN_UPDATE( vendetta )
konami_sortlayers3(layer, state->m_layerpri);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
k052109_tilemap_draw(state->m_k052109, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 1);
k052109_tilemap_draw(state->m_k052109, bitmap, cliprect, layer[1], 0, 2);
k052109_tilemap_draw(state->m_k052109, bitmap, cliprect, layer[2], 0, 4);
diff --git a/src/mame/video/vicdual.c b/src/mame/video/vicdual.c
index a5ab5532650..3f93b6bcac5 100644
--- a/src/mame/video/vicdual.c
+++ b/src/mame/video/vicdual.c
@@ -56,7 +56,7 @@ SCREEN_UPDATE( vicdual_bw )
/* plot the current pixel */
pen = (video_data & 0x80) ? RGB_WHITE : RGB_BLACK;
- bitmap->pix32(y, x) = pen;
+ bitmap.pix32(y, x) = pen;
/* next pixel */
video_data = video_data << 1;
@@ -115,7 +115,7 @@ SCREEN_UPDATE( vicdual_color )
/* plot the current pixel */
pen = (video_data & 0x80) ? fore_pen : back_pen;
- bitmap->pix32(y, x) = pen;
+ bitmap.pix32(y, x) = pen;
/* next pixel */
video_data = video_data << 1;
diff --git a/src/mame/video/victory.c b/src/mame/video/victory.c
index d4b4c90ccfa..1158cee3a11 100644
--- a/src/mame/video/victory.c
+++ b/src/mame/video/victory.c
@@ -1107,7 +1107,7 @@ SCREEN_UPDATE( victory )
/* blend the bitmaps and do collision detection */
for (y = 0; y < 256; y++)
{
- UINT16 *scanline = &bitmap->pix16(y);
+ UINT16 *scanline = &bitmap.pix16(y);
UINT8 sy = state->m_scrolly + y;
UINT8 *fg = &state->m_fgbitmap[y * 256];
UINT8 *bg = &state->m_bgbitmap[sy * 256];
diff --git a/src/mame/video/vigilant.c b/src/mame/video/vigilant.c
index 791c51c5bc6..f6fe94a0e5d 100644
--- a/src/mame/video/vigilant.c
+++ b/src/mame/video/vigilant.c
@@ -63,7 +63,7 @@ static void update_background(running_machine &machine)
{
for( col=0; col<512; col+=32 )
{
- drawgfx_opaque(state->m_bg_bitmap,
+ drawgfx_opaque(*state->m_bg_bitmap,
state->m_bg_bitmap->cliprect(),machine.gfx[2],
charcode,
row < 128 ? 0 : 1,
@@ -168,7 +168,7 @@ WRITE8_HANDLER( vigilant_rear_color_w )
???
**************************************************************************/
-static void draw_foreground(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int priority, int opaque )
+static void draw_foreground(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int priority, int opaque )
{
vigilant_state *state = machine.driver_data<vigilant_state>();
UINT8 *videoram = state->m_videoram;
@@ -217,7 +217,7 @@ static void draw_foreground(running_machine &machine, bitmap_t *bitmap, const re
-static void draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
vigilant_state *state = machine.driver_data<vigilant_state>();
int scrollx = 0x17a + 16*8 - (state->m_rear_horiz_scroll_low + state->m_rear_horiz_scroll_high);
@@ -229,11 +229,11 @@ static void draw_background(running_machine &machine, bitmap_t *bitmap, const re
state->m_rear_refresh=0;
}
- copyscrollbitmap(bitmap,state->m_bg_bitmap,1,&scrollx,0,0,bottomvisiblearea);
+ copyscrollbitmap(bitmap,*state->m_bg_bitmap,1,&scrollx,0,0,bottomvisiblearea);
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect)
{
vigilant_state *state = machine.driver_data<vigilant_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/vindictr.c b/src/mame/video/vindictr.c
index f2aface87b9..cb27dbb26c7 100644
--- a/src/mame/video/vindictr.c
+++ b/src/mame/video/vindictr.c
@@ -234,7 +234,7 @@ SCREEN_UPDATE( vindictr )
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
UINT16 *mo = &mobitmap->pix16(y);
- UINT16 *pf = &bitmap->pix16(y);
+ UINT16 *pf = &bitmap.pix16(y);
for (x = rectlist.rect->min_x; x <= rectlist.rect->max_x; x++)
if (mo[x])
{
@@ -275,7 +275,7 @@ SCREEN_UPDATE( vindictr )
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
UINT16 *mo = &mobitmap->pix16(y);
- UINT16 *pf = &bitmap->pix16(y);
+ UINT16 *pf = &bitmap.pix16(y);
for (x = rectlist.rect->min_x; x <= rectlist.rect->max_x; x++)
if (mo[x])
{
diff --git a/src/mame/video/volfied.c b/src/mame/video/volfied.c
index eebbc1acc8a..330b9e550ad 100644
--- a/src/mame/video/volfied.c
+++ b/src/mame/video/volfied.c
@@ -73,7 +73,7 @@ WRITE16_HANDLER( volfied_sprite_ctrl_w )
SCREEN REFRESH
*******************************************************/
-static void refresh_pixel_layer( running_machine &machine, bitmap_t *bitmap )
+static void refresh_pixel_layer( running_machine &machine, bitmap_t &bitmap )
{
int x, y;
@@ -121,7 +121,7 @@ static void refresh_pixel_layer( running_machine &machine, bitmap_t *bitmap )
else
color |= p[x] & 0xf;
- bitmap->pix16(y, x - 1) = color;
+ bitmap.pix16(y, x - 1) = color;
}
p += 512;
@@ -132,7 +132,7 @@ SCREEN_UPDATE( volfied )
{
volfied_state *state = screen.machine().driver_data<volfied_state>();
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
refresh_pixel_layer(screen.machine(), bitmap);
pc090oj_draw_sprites(state->m_pc090oj, bitmap, cliprect, 0);
return 0;
diff --git a/src/mame/video/vulgus.c b/src/mame/video/vulgus.c
index c467399cbc0..a60cf478dcc 100644
--- a/src/mame/video/vulgus.c
+++ b/src/mame/video/vulgus.c
@@ -171,7 +171,7 @@ WRITE8_HANDLER( vulgus_palette_bank_w )
***************************************************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect)
{
vulgus_state *state = machine.driver_data<vulgus_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/warpwarp.c b/src/mame/video/warpwarp.c
index ba1ec5bc1f2..e3a4c5aed0f 100644
--- a/src/mame/video/warpwarp.c
+++ b/src/mame/video/warpwarp.c
@@ -215,13 +215,13 @@ WRITE8_HANDLER( warpwarp_videoram_w )
***************************************************************************/
-INLINE void geebee_plot(bitmap_t *bitmap, const rectangle &cliprect, int x, int y, pen_t pen)
+INLINE void geebee_plot(bitmap_t &bitmap, const rectangle &cliprect, int x, int y, pen_t pen)
{
if (x >= cliprect.min_x && x <= cliprect.max_x && y >= cliprect.min_y && y <= cliprect.max_y)
- bitmap->pix16(y, x) = pen;
+ bitmap.pix16(y, x) = pen;
}
-static void draw_ball(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect,pen_t pen)
+static void draw_ball(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect,pen_t pen)
{
warpwarp_state *state = machine.driver_data<warpwarp_state>();
if (state->m_ball_on)
diff --git a/src/mame/video/warriorb.c b/src/mame/video/warriorb.c
index b5630b51ec3..010925a14b1 100644
--- a/src/mame/video/warriorb.c
+++ b/src/mame/video/warriorb.c
@@ -17,7 +17,7 @@ VIDEO_START( warriorb )
SPRITE DRAW ROUTINE
************************************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int x_offs, int y_offs )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int x_offs, int y_offs )
{
warriorb_state *state = machine.driver_data<warriorb_state>();
UINT16 *spriteram = state->m_spriteram;
@@ -84,7 +84,7 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
SCREEN REFRESH
**************************************************************/
-static UINT32 update_screen(screen_device &screen, bitmap_t *bitmap, const rectangle &cliprect, int xoffs, device_t *tc0100scn)
+static UINT32 update_screen(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect, int xoffs, device_t *tc0100scn)
{
UINT8 layer[3], nodraw;
@@ -95,7 +95,7 @@ static UINT32 update_screen(screen_device &screen, bitmap_t *bitmap, const recta
layer[2] = 2;
/* Clear priority bitmap */
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
/* chip 0 does tilemaps on the left, chip 1 does the ones on the right */
// draw bottom layer
@@ -103,7 +103,7 @@ static UINT32 update_screen(screen_device &screen, bitmap_t *bitmap, const recta
/* Ensure screen blanked even when bottom layers not drawn due to disable bit */
if (nodraw)
- bitmap->fill(get_black_pen(screen.machine()), cliprect);
+ bitmap.fill(get_black_pen(screen.machine()), cliprect);
// draw middle layer
tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, layer[1], 0, 1);
diff --git a/src/mame/video/wc90.c b/src/mame/video/wc90.c
index f500abe8f22..5a6ca91bf56 100644
--- a/src/mame/video/wc90.c
+++ b/src/mame/video/wc90.c
@@ -167,12 +167,12 @@ static const char p64x64[4][16] = {
{ 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }
};
-static void draw_sprite_16x16(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int code,
+static void draw_sprite_16x16(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int code,
int sx, int sy, int bank, int flags ) {
WC90_DRAW_SPRITE( code, sx, sy );
}
-static void draw_sprite_16x32(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int code,
+static void draw_sprite_16x32(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int code,
int sx, int sy, int bank, int flags ) {
if ( bank & 2 ) {
WC90_DRAW_SPRITE( code+1, sx, sy+16 );
@@ -183,7 +183,7 @@ static void draw_sprite_16x32(running_machine &machine, bitmap_t *bitmap, const
}
}
-static void draw_sprite_16x64(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int code,
+static void draw_sprite_16x64(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int code,
int sx, int sy, int bank, int flags ) {
if ( bank & 2 ) {
WC90_DRAW_SPRITE( code+3, sx, sy+48 );
@@ -198,7 +198,7 @@ static void draw_sprite_16x64(running_machine &machine, bitmap_t *bitmap, const
}
}
-static void draw_sprite_32x16(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int code,
+static void draw_sprite_32x16(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int code,
int sx, int sy, int bank, int flags ) {
if ( bank & 1 ) {
WC90_DRAW_SPRITE( code+1, sx+16, sy );
@@ -209,7 +209,7 @@ static void draw_sprite_32x16(running_machine &machine, bitmap_t *bitmap, const
}
}
-static void draw_sprite_32x32(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int code,
+static void draw_sprite_32x32(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int code,
int sx, int sy, int bank, int flags ) {
const char *p = p32x32[ bank&3 ];
@@ -220,7 +220,7 @@ static void draw_sprite_32x32(running_machine &machine, bitmap_t *bitmap, const
WC90_DRAW_SPRITE( code+p[3], sx+16, sy+16 );
}
-static void draw_sprite_32x64(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int code,
+static void draw_sprite_32x64(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int code,
int sx, int sy, int bank, int flags ) {
const char *p = p32x64[ bank&3 ];
@@ -235,7 +235,7 @@ static void draw_sprite_32x64(running_machine &machine, bitmap_t *bitmap, const
WC90_DRAW_SPRITE( code+p[7], sx+16, sy+48 );
}
-static void draw_sprite_64x16(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int code,
+static void draw_sprite_64x16(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int code,
int sx, int sy, int bank, int flags ) {
if ( bank & 1 ) {
WC90_DRAW_SPRITE( code+3, sx+48, sy );
@@ -250,7 +250,7 @@ static void draw_sprite_64x16(running_machine &machine, bitmap_t *bitmap, const
}
}
-static void draw_sprite_64x32(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int code,
+static void draw_sprite_64x32(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int code,
int sx, int sy, int bank, int flags ) {
const char *p = p64x32[ bank&3 ];
@@ -265,7 +265,7 @@ static void draw_sprite_64x32(running_machine &machine, bitmap_t *bitmap, const
WC90_DRAW_SPRITE( code+p[7], sx+48, sy+16 );
}
-static void draw_sprite_64x64(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int code,
+static void draw_sprite_64x64(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int code,
int sx, int sy, int bank, int flags ) {
const char *p = p64x64[ bank&3 ];
@@ -289,12 +289,12 @@ static void draw_sprite_64x64(running_machine &machine, bitmap_t *bitmap, const
WC90_DRAW_SPRITE( code+p[15], sx+48, sy+48 );
}
-static void draw_sprite_invalid(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int code,
+static void draw_sprite_invalid(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int code,
int sx, int sy, int bank, int flags ) {
logerror("8 pixel sprite size not supported\n" );
}
-typedef void (*draw_sprites_func)(running_machine &, bitmap_t *, const rectangle &, int, int, int, int, int );
+typedef void (*draw_sprites_func)(running_machine &, bitmap_t &, const rectangle &, int, int, int, int, int );
static const draw_sprites_func draw_sprites_proc[16] = {
draw_sprite_invalid, /* 0000 = 08x08 */
@@ -315,7 +315,7 @@ static const draw_sprites_func draw_sprites_proc[16] = {
draw_sprite_64x64 /* 1111 = 64x64 */
};
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int priority )
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int priority )
{
wc90_state *state = machine.driver_data<wc90_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/wc90b.c b/src/mame/video/wc90b.c
index 72ba78e7e66..ffcf40ad75e 100644
--- a/src/mame/video/wc90b.c
+++ b/src/mame/video/wc90b.c
@@ -98,7 +98,7 @@ WRITE8_HANDLER( wc90b_txvideoram_w )
***************************************************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int priority )
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int priority )
{
wc90b_state *state = machine.driver_data<wc90b_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/wecleman.c b/src/mame/video/wecleman.c
index 507a85ba190..31709655fc1 100644
--- a/src/mame/video/wecleman.c
+++ b/src/mame/video/wecleman.c
@@ -169,7 +169,7 @@ static void sortsprite(int *idx_array, int *key_array, int size)
}
// draws a 8bpp palette sprites on a 16bpp direct RGB target (sub-par implementation)
-static void do_blit_zoom32(wecleman_state *state, bitmap_t *bitmap, const rectangle &cliprect, struct sprite *sprite)
+static void do_blit_zoom32(wecleman_state *state, bitmap_t &bitmap, const rectangle &cliprect, struct sprite *sprite)
{
#define PRECISION_X 20
#define PRECISION_Y 20
@@ -257,9 +257,9 @@ static void do_blit_zoom32(wecleman_state *state, bitmap_t *bitmap, const rectan
UINT8 *row_base = sprite->pen_data + (src_f0y>>PRECISION_Y) * sprite->line_offset;
src_fpx = src_f0x;
- if (bitmap->format() == BITMAP_FORMAT_RGB32) // Wec Le Mans
+ if (bitmap.format() == BITMAP_FORMAT_RGB32) // Wec Le Mans
{
- UINT32 *dst_ptr = &bitmap->pix32(sy);
+ UINT32 *dst_ptr = &bitmap.pix32(sy);
if (!sprite->shadow_mode)
{
@@ -291,7 +291,7 @@ static void do_blit_zoom32(wecleman_state *state, bitmap_t *bitmap, const rectan
}
else // Hot Chase
{
- UINT16 *dst_ptr = &bitmap->pix16(sy);
+ UINT16 *dst_ptr = &bitmap.pix16(sy);
pen_t base = sprite->pal_base;
if (!sprite->shadow_mode)
@@ -330,7 +330,7 @@ static void do_blit_zoom32(wecleman_state *state, bitmap_t *bitmap, const rectan
}
}
-static void sprite_draw(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void sprite_draw(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
wecleman_state *state = machine.driver_data<wecleman_state>();
int i;
@@ -539,7 +539,7 @@ WRITE16_HANDLER( wecleman_pageram_w )
------------------------------------------------------------------------*/
-static void wecleman_draw_road(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int priority)
+static void wecleman_draw_road(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int priority)
{
wecleman_state *state = machine.driver_data<wecleman_state>();
// must be powers of 2
@@ -578,7 +578,7 @@ static void wecleman_draw_road(running_machine &machine, bitmap_t *bitmap, const
// draw sky; each scanline is assumed to be dword aligned
for (sy=cliprect.min_y-BMP_PAD; sy<DST_HEIGHT; sy++)
{
- UINT32 *dst = &bitmap->pix32(sy+BMP_PAD, BMP_PAD);
+ UINT32 *dst = &bitmap.pix32(sy+BMP_PAD, BMP_PAD);
UINT32 pix;
UINT16 road;
@@ -604,7 +604,7 @@ static void wecleman_draw_road(running_machine &machine, bitmap_t *bitmap, const
for (sy=cliprect.min_y-BMP_PAD; sy<DST_HEIGHT; sy++)
{
- UINT32 *dst = &bitmap->pix32(sy+BMP_PAD, BMP_PAD);
+ UINT32 *dst = &bitmap.pix32(sy+BMP_PAD, BMP_PAD);
UINT32 pix;
UINT16 road;
@@ -620,8 +620,8 @@ static void wecleman_draw_road(running_machine &machine, bitmap_t *bitmap, const
gfx_element_get_data(machine.gfx[1], (road << 3) + 5);
gfx_element_get_data(machine.gfx[1], (road << 3) + 6);
gfx_element_get_data(machine.gfx[1], (road << 3) + 7);
- mdy = ((road * MIDCURB_DY) >> 8) * bitmap->rowpixels();
- tdy = ((road * TOPCURB_DY) >> 8) * bitmap->rowpixels();
+ mdy = ((road * MIDCURB_DY) >> 8) * bitmap.rowpixels();
+ tdy = ((road * TOPCURB_DY) >> 8) * bitmap.rowpixels();
scrollx = state->m_roadram[sy+YSIZE] + (0x18 - 0xe00);
@@ -657,7 +657,7 @@ static void wecleman_draw_road(running_machine &machine, bitmap_t *bitmap, const
------------------------------------------------------------------------*/
// blends two 8x8x16bpp direct RGB tilemaps
-static void draw_cloud(bitmap_t *bitmap,
+static void draw_cloud(bitmap_t &bitmap,
const gfx_element *gfx,
UINT16 *tm_base,
int x0, int y0, // target coordinate
@@ -693,7 +693,7 @@ static void draw_cloud(bitmap_t *bitmap,
tmskipy = scrolly / tileh;
dy = -(scrolly & (tileh-1));
- dst_base = &bitmap->pix32(y0+dy, x0+dx);
+ dst_base = &bitmap.pix32(y0+dy, x0+dx);
pal_base = gfx->machine().pens + pal_offset * gfx->color_granularity;
@@ -745,7 +745,7 @@ static void draw_cloud(bitmap_t *bitmap,
dst_ptr[tx] = MAKE_RGB(pal5bit(db), pal5bit(dg), pal5bit(dr));
}
- dst_ptr += bitmap->rowpixels();
+ dst_ptr += bitmap.rowpixels();
}
}
@@ -756,12 +756,12 @@ static void draw_cloud(bitmap_t *bitmap,
{
for (tx = 0; tx < tilew; tx++)
dst_ptr[tx] = pal_ptr[*src_ptr++];
- dst_ptr += bitmap->rowpixels();
+ dst_ptr += bitmap.rowpixels();
}
}
}
- dst_base += bitmap->rowpixels() * tileh;
+ dst_base += bitmap.rowpixels() * tileh;
}
}
@@ -792,7 +792,7 @@ static void draw_cloud(bitmap_t *bitmap,
------------------------------------------------------------------------*/
-static void hotchase_draw_road(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void hotchase_draw_road(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
wecleman_state *state = machine.driver_data<wecleman_state>();
/* Referred to what's in the ROMs */
@@ -1065,7 +1065,7 @@ SCREEN_UPDATE( wecleman )
get_sprite_info(screen.machine());
- bitmap->fill(state->m_black_pen, cliprect);
+ bitmap.fill(state->m_black_pen, cliprect);
/* Draw the road (lines which have priority 0x02) */
if (video_on) wecleman_draw_road(screen.machine(), bitmap, cliprect, 0x02);
@@ -1129,7 +1129,7 @@ SCREEN_UPDATE( hotchase )
get_sprite_info(screen.machine());
- bitmap->fill(state->m_black_pen, cliprect);
+ bitmap.fill(state->m_black_pen, cliprect);
/* Draw the background */
if (video_on)
diff --git a/src/mame/video/welltris.c b/src/mame/video/welltris.c
index b6569513695..ea786f1b5c8 100644
--- a/src/mame/video/welltris.c
+++ b/src/mame/video/welltris.c
@@ -29,7 +29,7 @@ WRITE16_HANDLER( welltris_spriteram_w )
/* Sprite Drawing is pretty much the same as fromance.c */
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect)
{
static const UINT8 zoomtable[16] = { 0,7,14,20,25,30,34,38,42,46,49,52,54,57,59,61 };
welltris_state *state = machine.driver_data<welltris_state>();
@@ -224,7 +224,7 @@ VIDEO_START( welltris )
tilemap_set_transparent_pen(state->m_char_tilemap, 15);
}
-static void draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
welltris_state *state = machine.driver_data<welltris_state>();
int x, y;
@@ -234,8 +234,8 @@ static void draw_background(running_machine &machine, bitmap_t *bitmap, const re
for (x = 0; x < 512 / 2; x++) {
pixdata = state->m_pixelram[(x & 0xff) + (y & 0xff) * 256];
- bitmap->pix16(y, (x * 2) + 0) = (pixdata >> 8) + (0x100 * state->m_pixelpalettebank) + 0x400;
- bitmap->pix16(y, (x * 2) + 1) = (pixdata & 0xff) + (0x100 * state->m_pixelpalettebank) + 0x400;
+ bitmap.pix16(y, (x * 2) + 0) = (pixdata >> 8) + (0x100 * state->m_pixelpalettebank) + 0x400;
+ bitmap.pix16(y, (x * 2) + 1) = (pixdata & 0xff) + (0x100 * state->m_pixelpalettebank) + 0x400;
}
}
}
diff --git a/src/mame/video/wgp.c b/src/mame/video/wgp.c
index d6e5a0b3a92..558fdb1b5bd 100644
--- a/src/mame/video/wgp.c
+++ b/src/mame/video/wgp.c
@@ -346,7 +346,7 @@ static const UINT8 ylookup[16] =
2, 2, 3, 3,
2, 2, 3, 3 };
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int y_offs )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int y_offs )
{
wgp_state *state = machine.driver_data<wgp_state>();
UINT16 *spriteram = state->m_spriteram;
@@ -486,11 +486,11 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
CUSTOM DRAW
*********************************************************/
-INLINE void bryan2_drawscanline( bitmap_t *bitmap, int x, int y, int length,
- const UINT16 *src, int transparent, UINT32 orient, bitmap_t *priority, int pri )
+INLINE void bryan2_drawscanline( bitmap_t &bitmap, int x, int y, int length,
+ const UINT16 *src, int transparent, UINT32 orient, bitmap_t &priority, int pri )
{
- UINT16 *dsti = &bitmap->pix16(y, x);
- UINT8 *dstp = &priority->pix8(y, x);
+ UINT16 *dsti = &bitmap.pix16(y, x);
+ UINT8 *dstp = &priority.pix8(y, x);
if (transparent)
{
@@ -518,11 +518,11 @@ INLINE void bryan2_drawscanline( bitmap_t *bitmap, int x, int y, int length,
-static void wgp_piv_layer_draw( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int layer, int flags, UINT32 priority )
+static void wgp_piv_layer_draw( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int layer, int flags, UINT32 priority )
{
wgp_state *state = machine.driver_data<wgp_state>();
- bitmap_t *srcbitmap = tilemap_get_pixmap(state->m_piv_tilemap[layer]);
- bitmap_t *flagsbitmap = tilemap_get_flagsmap(state->m_piv_tilemap[layer]);
+ bitmap_t &srcbitmap = tilemap_get_pixmap(state->m_piv_tilemap[layer]);
+ bitmap_t &flagsbitmap = tilemap_get_flagsmap(state->m_piv_tilemap[layer]);
UINT16 *dst16,*src16;
UINT8 *tsrc;
@@ -604,8 +604,8 @@ static void wgp_piv_layer_draw( running_machine &machine, bitmap_t *bitmap, cons
x_step += (((0x7f - row_zoom) << 8) & 0xffff);
}
- src16 = &srcbitmap->pix16(src_y_index);
- tsrc = &flagsbitmap->pix8(src_y_index);
+ src16 = &srcbitmap.pix16(src_y_index);
+ tsrc = &flagsbitmap.pix8(src_y_index);
dst16 = scanline;
if (flags & TILEMAP_DRAW_OPAQUE)
@@ -683,7 +683,7 @@ SCREEN_UPDATE( wgp )
tc0100scn_tilemap_update(state->m_tc0100scn);
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
layer[0] = 0;
layer[1] = 1;
diff --git a/src/mame/video/williams.c b/src/mame/video/williams.c
index e88a241bc93..c2dbd4ecb5b 100644
--- a/src/mame/video/williams.c
+++ b/src/mame/video/williams.c
@@ -186,7 +186,7 @@ SCREEN_UPDATE( williams )
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
UINT8 *source = &state->m_videoram[y];
- UINT32 *dest = &bitmap->pix32(y);
+ UINT32 *dest = &bitmap.pix32(y);
/* loop over columns */
for (x = cliprect.min_x & ~1; x <= cliprect.max_x; x += 2)
@@ -219,7 +219,7 @@ SCREEN_UPDATE( blaster )
{
int erase_behind = state->m_blaster_video_control & state->m_blaster_scanline_control[y] & 2;
UINT8 *source = &state->m_videoram[y];
- UINT32 *dest = &bitmap->pix32(y);
+ UINT32 *dest = &bitmap.pix32(y);
/* latch a new color0 pen? */
if (state->m_blaster_video_control & state->m_blaster_scanline_control[y] & 1)
@@ -260,7 +260,7 @@ SCREEN_UPDATE( williams2 )
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
UINT8 *source = &state->m_videoram[y];
- UINT32 *dest = &bitmap->pix32(y);
+ UINT32 *dest = &bitmap.pix32(y);
/* loop over columns */
for (x = cliprect.min_x & ~1; x <= cliprect.max_x; x += 2)
diff --git a/src/mame/video/wiz.c b/src/mame/video/wiz.c
index 2cb92f7d9b0..f471bea5748 100644
--- a/src/mame/video/wiz.c
+++ b/src/mame/video/wiz.c
@@ -97,7 +97,7 @@ WRITE8_HANDLER( wiz_flipy_w )
state->m_flipy = data;
}
-static void draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int bank, int colortype)
+static void draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int bank, int colortype)
{
wiz_state *state = machine.driver_data<wiz_state>();
UINT8 *videoram = state->m_videoram;
@@ -138,7 +138,7 @@ static void draw_background(running_machine &machine, bitmap_t *bitmap, const re
}
}
-static void draw_foreground(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int colortype)
+static void draw_foreground(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int colortype)
{
wiz_state *state = machine.driver_data<wiz_state>();
int offs;
@@ -177,7 +177,7 @@ static void draw_foreground(running_machine &machine, bitmap_t *bitmap, const re
}
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap,
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap,
const rectangle &cliprect, UINT8* sprite_ram,
int bank)
{
@@ -209,7 +209,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap,
SCREEN_UPDATE( kungfut )
{
wiz_state *state = screen.machine().driver_data<wiz_state>();
- bitmap->fill(state->m_bgpen, cliprect);
+ bitmap.fill(state->m_bgpen, cliprect);
draw_background(screen.machine(), bitmap, cliprect, 2 + state->m_char_bank[0] , 0);
draw_foreground(screen.machine(), bitmap, cliprect, 0);
draw_sprites(screen.machine(), bitmap, cliprect, state->m_spriteram2, 4);
@@ -222,7 +222,7 @@ SCREEN_UPDATE( wiz )
wiz_state *state = screen.machine().driver_data<wiz_state>();
int bank;
- bitmap->fill(state->m_bgpen, cliprect);
+ bitmap.fill(state->m_bgpen, cliprect);
draw_background(screen.machine(), bitmap, cliprect, 2 + ((state->m_char_bank[0] << 1) | state->m_char_bank[1]), 0);
draw_foreground(screen.machine(), bitmap, cliprect, 0);
@@ -241,7 +241,7 @@ SCREEN_UPDATE( wiz )
SCREEN_UPDATE( stinger )
{
wiz_state *state = screen.machine().driver_data<wiz_state>();
- bitmap->fill(state->m_bgpen, cliprect);
+ bitmap.fill(state->m_bgpen, cliprect);
draw_background(screen.machine(), bitmap, cliprect, 2 + state->m_char_bank[0], 1);
draw_foreground(screen.machine(), bitmap, cliprect, 1);
draw_sprites(screen.machine(), bitmap, cliprect, state->m_spriteram2, 4);
diff --git a/src/mame/video/wolfpack.c b/src/mame/video/wolfpack.c
index 3e8311836ec..6f84d06a00f 100644
--- a/src/mame/video/wolfpack.c
+++ b/src/mame/video/wolfpack.c
@@ -131,7 +131,7 @@ VIDEO_START( wolfpack )
}
-static void draw_ship(running_machine &machine, bitmap_t* bitmap, const rectangle &cliprect)
+static void draw_ship(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
wolfpack_state *state = machine.driver_data<wolfpack_state>();
static const UINT32 scaler[] =
@@ -167,7 +167,7 @@ static void draw_ship(running_machine &machine, bitmap_t* bitmap, const rectangl
}
-static void draw_torpedo(running_machine &machine, bitmap_t* bitmap, const rectangle &cliprect)
+static void draw_torpedo(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
wolfpack_state *state = machine.driver_data<wolfpack_state>();
int count = 0;
@@ -196,12 +196,12 @@ static void draw_torpedo(running_machine &machine, bitmap_t* bitmap, const recta
for (x = 2 * x1; x < 2 * x2; x++)
if (state->m_LFSR[(state->m_current_index + 0x300 * y + x) % 0x8000])
- bitmap->pix16(y, x) = 1;
+ bitmap.pix16(y, x) = 1;
}
}
-static void draw_pt(running_machine &machine, bitmap_t* bitmap, const rectangle &cliprect)
+static void draw_pt(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
wolfpack_state *state = machine.driver_data<wolfpack_state>();
rectangle rect = cliprect;
@@ -230,7 +230,7 @@ static void draw_pt(running_machine &machine, bitmap_t* bitmap, const rectangle
}
-static void draw_water(colortable_t *colortable, bitmap_t* bitmap, const rectangle &cliprect)
+static void draw_water(colortable_t *colortable, bitmap_t &bitmap, const rectangle &cliprect)
{
rectangle rect = cliprect;
@@ -242,7 +242,7 @@ static void draw_water(colortable_t *colortable, bitmap_t* bitmap, const rectang
for (y = rect.min_y; y <= rect.max_y; y++)
{
- UINT16* p = &bitmap->pix16(y);
+ UINT16* p = &bitmap.pix16(y);
for (x = rect.min_x; x <= rect.max_x; x++)
p[x] = colortable_entry_get_value(colortable, p[x]) | 0x08;
@@ -267,7 +267,7 @@ SCREEN_UPDATE( wolfpack )
color < 0xb8 ? color + 0x48 : 0xff,
color < 0xb8 ? color + 0x48 : 0xff));
- bitmap->fill(state->m_video_invert, cliprect);
+ bitmap.fill(state->m_video_invert, cliprect);
for (i = 0; i < 8; i++)
for (j = 0; j < 32; j++)
@@ -300,7 +300,7 @@ SCREEN_EOF( wolfpack )
state->m_helper->fill(0);
- draw_ship(screen.machine(), state->m_helper, state->m_helper->cliprect());
+ draw_ship(screen.machine(), *state->m_helper, state->m_helper->cliprect());
for (y = 128; y < 224 - state->m_torpedo_v; y++)
{
diff --git a/src/mame/video/wrally.c b/src/mame/video/wrally.c
index 496257e2e66..df0094859a4 100644
--- a/src/mame/video/wrally.c
+++ b/src/mame/video/wrally.c
@@ -104,7 +104,7 @@ VIDEO_START( wrally )
in the range 0x8-0xf are used.
*/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int priority)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int priority)
{
wrally_state *state = machine.driver_data<wrally_state>();
int i, px, py;
@@ -140,7 +140,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const recta
for (py = 0; py < gfx->height; py++){
/* get a pointer to the current line in the screen bitmap */
int ypos = ((sy + py) & 0x1ff);
- UINT16 *srcy = &bitmap->pix16(ypos);
+ UINT16 *srcy = &bitmap.pix16(ypos);
int gfx_py = yflip ? (gfx->height - 1 - py) : py;
diff --git a/src/mame/video/wwfsstar.c b/src/mame/video/wwfsstar.c
index cbc6b7b8c16..67b7b5d74b4 100644
--- a/src/mame/video/wwfsstar.c
+++ b/src/mame/video/wwfsstar.c
@@ -111,7 +111,7 @@ static TILE_GET_INFO( get_bg0_tile_info )
sprite colour marking could probably be improved..
*******************************************************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
/*- SPR RAM Format -**
diff --git a/src/mame/video/wwfwfest.c b/src/mame/video/wwfwfest.c
index d90d3036235..39b01f4538a 100644
--- a/src/mame/video/wwfwfest.c
+++ b/src/mame/video/wwfwfest.c
@@ -144,7 +144,7 @@ static TILE_GET_INFO( get_bg1_tile_info )
sprite drawing could probably be improved a bit
*******************************************************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
wwfwfest_state *state = machine.driver_data<wwfwfest_state>();
/*- SPR RAM Format -**
diff --git a/src/mame/video/xain.c b/src/mame/video/xain.c
index 15ae182dd2f..e705eb86443 100644
--- a/src/mame/video/xain.c
+++ b/src/mame/video/xain.c
@@ -172,7 +172,7 @@ WRITE8_HANDLER( xain_flipscreen_w )
***************************************************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect)
{
xain_state *state = machine.driver_data<xain_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/xevious.c b/src/mame/video/xevious.c
index 3e81ec4abe9..f94800b2054 100644
--- a/src/mame/video/xevious.c
+++ b/src/mame/video/xevious.c
@@ -414,7 +414,7 @@ ROM 3M,3L color replace table for sprite
***************************************************************************/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect)
{
xevious_state *state = machine.driver_data<xevious_state>();
diff --git a/src/mame/video/xexex.c b/src/mame/video/xexex.c
index b42bdcf6a3c..0a5043f9f90 100644
--- a/src/mame/video/xexex.c
+++ b/src/mame/video/xexex.c
@@ -81,7 +81,7 @@ SCREEN_UPDATE( xexex )
k054338_update_all_shadows(state->m_k054338, 0);
k054338_fill_backcolor(state->m_k054338, bitmap, 0);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
for (plane = 0; plane < 4; plane++)
{
diff --git a/src/mame/video/xmen.c b/src/mame/video/xmen.c
index 34ec56ddbd6..19d7051cc2b 100644
--- a/src/mame/video/xmen.c
+++ b/src/mame/video/xmen.c
@@ -93,9 +93,9 @@ SCREEN_UPDATE( xmen )
konami_sortlayers3(layer, state->m_layerpri);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
/* note the '+1' in the background color!!! */
- bitmap->fill(16 * bg_colorbase + 1, cliprect);
+ bitmap.fill(16 * bg_colorbase + 1, cliprect);
k052109_tilemap_draw(state->m_k052109, bitmap, cliprect, layer[0], 0, 1);
k052109_tilemap_draw(state->m_k052109, bitmap, cliprect, layer[1], 0, 2);
k052109_tilemap_draw(state->m_k052109, bitmap, cliprect, layer[2], 0, 4);
@@ -114,7 +114,7 @@ SCREEN_UPDATE( xmen6p_left )
for(y = 0; y < 32 * 8; y++)
{
- UINT16* line_dest = &bitmap->pix16(y);
+ UINT16* line_dest = &bitmap.pix16(y);
UINT16* line_src = &state->m_screen_left->pix16(y);
for (x = 12 * 8; x < 52 * 8; x++)
@@ -131,7 +131,7 @@ SCREEN_UPDATE( xmen6p_right )
for(y = 0; y < 32 * 8; y++)
{
- UINT16* line_dest = &bitmap->pix16(y);
+ UINT16* line_dest = &bitmap.pix16(y);
UINT16* line_src = &state->m_screen_right->pix16(y);
for (x = 12 * 8; x < 52 * 8; x++)
@@ -219,14 +219,14 @@ SCREEN_EOF( xmen6p )
konami_sortlayers3(layer, state->m_layerpri);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
/* note the '+1' in the background color!!! */
renderbitmap->fill(16 * bg_colorbase + 1, cliprect);
- k052109_tilemap_draw(state->m_k052109, renderbitmap, cliprect, layer[0], 0, 1);
- k052109_tilemap_draw(state->m_k052109, renderbitmap, cliprect, layer[1], 0, 2);
- k052109_tilemap_draw(state->m_k052109, renderbitmap, cliprect, layer[2], 0, 4);
+ k052109_tilemap_draw(state->m_k052109, *renderbitmap, cliprect, layer[0], 0, 1);
+ k052109_tilemap_draw(state->m_k052109, *renderbitmap, cliprect, layer[1], 0, 2);
+ k052109_tilemap_draw(state->m_k052109, *renderbitmap, cliprect, layer[2], 0, 4);
/* this isn't supported anymore and it is unsure if still needed; keeping here for reference
pdrawgfx_shadow_lowpri = 1; fix shadows of boulders in front of feet */
- k053247_sprites_draw(state->m_k053246, renderbitmap, cliprect);
+ k053247_sprites_draw(state->m_k053246, *renderbitmap, cliprect);
}
diff --git a/src/mame/video/xorworld.c b/src/mame/video/xorworld.c
index d630fa79804..a3dfdfe304c 100644
--- a/src/mame/video/xorworld.c
+++ b/src/mame/video/xorworld.c
@@ -96,7 +96,7 @@ VIDEO_START( xorworld )
1 | xxxx---- -------- | sprite color
*/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
xorworld_state *state = machine.driver_data<xorworld_state>();
UINT16 *spriteram16 = state->m_spriteram;
diff --git a/src/mame/video/xxmissio.c b/src/mame/video/xxmissio.c
index e4a245eeb39..ff4aa232b2c 100644
--- a/src/mame/video/xxmissio.c
+++ b/src/mame/video/xxmissio.c
@@ -85,7 +85,7 @@ VIDEO_START( xxmissio )
}
-static void draw_sprites(bitmap_t *bitmap, const rectangle &cliprect, const gfx_element *gfx)
+static void draw_sprites(bitmap_t &bitmap, const rectangle &cliprect, const gfx_element *gfx)
{
xxmissio_state *state = gfx->machine().driver_data<xxmissio_state>();
int offs;
diff --git a/src/mame/video/xybots.c b/src/mame/video/xybots.c
index b5e8cc9e3eb..49c9edfaa19 100644
--- a/src/mame/video/xybots.c
+++ b/src/mame/video/xybots.c
@@ -120,7 +120,7 @@ SCREEN_UPDATE( xybots )
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
UINT16 *mo = &mobitmap->pix16(y);
- UINT16 *pf = &bitmap->pix16(y);
+ UINT16 *pf = &bitmap.pix16(y);
for (x = rectlist.rect->min_x; x <= rectlist.rect->max_x; x++)
if (mo[x])
{
diff --git a/src/mame/video/ygv608.c b/src/mame/video/ygv608.c
index cd65ae9efdf..018dca0cced 100644
--- a/src/mame/video/ygv608.c
+++ b/src/mame/video/ygv608.c
@@ -547,7 +547,7 @@ VIDEO_START( ygv608 )
machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(ygv608_exit), &machine));
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
#ifdef _ENABLE_SPRITES
@@ -755,7 +755,7 @@ SCREEN_UPDATE( ygv608 )
// punt if not initialized
if (ygv608.page_x == 0 || ygv608.page_y == 0)
{
- bitmap->fill(0, finalclip);
+ bitmap.fill(0, finalclip);
return 0;
}
@@ -865,7 +865,7 @@ SCREEN_UPDATE( ygv608 )
}
else
#endif
- tilemap_draw( work_bitmap,finalclip, tilemap_B, 0, 0 );
+ tilemap_draw( *work_bitmap,finalclip, tilemap_B, 0, 0 );
#ifdef _ENABLE_ROTATE_ZOOM
@@ -891,7 +891,7 @@ SCREEN_UPDATE( ygv608 )
ygv608.dx, ygv608.dxy, ygv608.dyx, ygv608.dy, 0);
else
#endif
- copybitmap( bitmap, work_bitmap, 0, 0, 0, 0, finalclip);
+ copybitmap( bitmap, *work_bitmap, 0, 0, 0, 0, finalclip);
// for some reason we can't use an opaque tilemap_A
// so use a transparent but clear the work bitmap first
@@ -902,7 +902,7 @@ SCREEN_UPDATE( ygv608 )
(ygv608.regs.s.r11 & r11_prm) == PRM_ASEBDX )
draw_sprites(screen.machine(), bitmap,finalclip );
- tilemap_draw( work_bitmap,finalclip, tilemap_A, 0, 0 );
+ tilemap_draw( *work_bitmap,finalclip, tilemap_A, 0, 0 );
#ifdef _ENABLE_ROTATE_ZOOM
if( ygv608.regs.s.zron )
@@ -913,7 +913,7 @@ SCREEN_UPDATE( ygv608 )
0 );
else
#endif
- copybitmap_trans( bitmap, work_bitmap, 0, 0, 0, 0, finalclip, 0 );
+ copybitmap_trans( bitmap, *work_bitmap, 0, 0, 0, 0, finalclip, 0 );
if ((ygv608.regs.s.r11 & r11_prm) == PRM_SABDEX ||
(ygv608.regs.s.r11 & r11_prm) == PRM_SEABDX)
diff --git a/src/mame/video/yiear.c b/src/mame/video/yiear.c
index 7e6ed459439..28640fe8662 100644
--- a/src/mame/video/yiear.c
+++ b/src/mame/video/yiear.c
@@ -105,7 +105,7 @@ VIDEO_START( yiear )
state->m_bg_tilemap = tilemap_create(machine, get_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
}
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
yiear_state *state = machine.driver_data<yiear_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/yunsun16.c b/src/mame/video/yunsun16.c
index aa4b5a31a0f..64a85349bb6 100644
--- a/src/mame/video/yunsun16.c
+++ b/src/mame/video/yunsun16.c
@@ -136,7 +136,7 @@ VIDEO_START( yunsun16 )
***************************************************************************/
-static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
{
yunsun16_state *state = machine.driver_data<yunsun16_state>();
int offs;
@@ -212,7 +212,7 @@ SCREEN_UPDATE( yunsun16 )
//popmessage("%04X", *state->m_priorityram);
- screen.machine().priority_bitmap->fill(0, cliprect);
+ screen.machine().priority_bitmap.fill(0, cliprect);
if ((*state->m_priorityram & 0x0c) == 4)
{
diff --git a/src/mame/video/yunsung8.c b/src/mame/video/yunsung8.c
index d931830217a..4059969ac06 100644
--- a/src/mame/video/yunsung8.c
+++ b/src/mame/video/yunsung8.c
@@ -212,7 +212,7 @@ if (screen.machine().input().code_pressed(KEYCODE_Z))
if (layers_ctrl & 1)
tilemap_draw(bitmap, cliprect, state->m_tilemap_0, 0, 0);
else
- bitmap->fill(0, cliprect);
+ bitmap.fill(0, cliprect);
if (layers_ctrl & 2)
tilemap_draw(bitmap, cliprect, state->m_tilemap_1, 0, 0);
diff --git a/src/mame/video/zac2650.c b/src/mame/video/zac2650.c
index 574e7b780d4..0f0eed5d28e 100644
--- a/src/mame/video/zac2650.c
+++ b/src/mame/video/zac2650.c
@@ -67,7 +67,7 @@ static int SpriteCollision(running_machine &machine, int first,int second)
/* Draw first sprite */
- drawgfx_opaque(state->m_spritebitmap,state->m_spritebitmap->cliprect(), machine.gfx[expand],
+ drawgfx_opaque(*state->m_spritebitmap,state->m_spritebitmap->cliprect(), machine.gfx[expand],
first * 2,
0,
0,0,
@@ -93,7 +93,7 @@ static int SpriteCollision(running_machine &machine, int first,int second)
/* Blackout second sprite */
- drawgfx_transpen(state->m_spritebitmap,state->m_spritebitmap->cliprect(), machine.gfx[1],
+ drawgfx_transpen(*state->m_spritebitmap,state->m_spritebitmap->cliprect(), machine.gfx[1],
second * 2,
1,
0,0,
@@ -119,7 +119,7 @@ static int SpriteCollision(running_machine &machine, int first,int second)
/* Zero bitmap */
- drawgfx_opaque(state->m_spritebitmap,state->m_spritebitmap->cliprect(), machine.gfx[expand],
+ drawgfx_opaque(*state->m_spritebitmap,state->m_spritebitmap->cliprect(), machine.gfx[expand],
first * 2,
1,
0,0,
@@ -151,7 +151,7 @@ VIDEO_START( tinvader )
gfx_element_set_source(machine.gfx[2], state->m_s2636_0_ram);
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
{
zac2650_state *state = machine.driver_data<zac2650_state>();
int offs;
@@ -171,7 +171,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const recta
state->m_CollisionBackground = 0; /* Read from 0x1e80 bit 7 */
// for collision detection checking
- copybitmap(machine.generic.tmpbitmap,bitmap,0,0,0,0,visarea);
+ copybitmap(*machine.generic.tmpbitmap,bitmap,0,0,0,0,visarea);
for(offs=0;offs<0x50;offs+=0x10)
{
@@ -202,7 +202,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const recta
continue;
}
- if (bitmap->pix16(y, x) != machine.generic.tmpbitmap->pix16(y, x))
+ if (bitmap.pix16(y, x) != machine.generic.tmpbitmap->pix16(y, x))
{
state->m_CollisionBackground = 0x80;
break;
diff --git a/src/mame/video/zaccaria.c b/src/mame/video/zaccaria.c
index f69f728fd04..31e4d8de9ee 100644
--- a/src/mame/video/zaccaria.c
+++ b/src/mame/video/zaccaria.c
@@ -206,7 +206,7 @@ WRITE8_HANDLER( zaccaria_flip_screen_y_w )
offsets 1 and 2 are swapped if accessed from spriteram2
*/
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle &cliprect,UINT8 *spriteram,int color,int section)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap,const rectangle &cliprect,UINT8 *spriteram,int color,int section)
{
int offs,o1 = 1,o2 = 2;
diff --git a/src/mame/video/zaxxon.c b/src/mame/video/zaxxon.c
index 0bda7650fdc..1a28abf0c92 100644
--- a/src/mame/video/zaxxon.c
+++ b/src/mame/video/zaxxon.c
@@ -322,17 +322,17 @@ WRITE8_HANDLER( congo_sprite_custom_w )
*
*************************************/
-static void draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int skew)
+static void draw_background(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int skew)
{
zaxxon_state *state = machine.driver_data<zaxxon_state>();
/* only draw if enabled */
if (state->m_bg_enable)
{
- bitmap_t *pixmap = tilemap_get_pixmap(state->m_bg_tilemap);
+ bitmap_t &pixmap = tilemap_get_pixmap(state->m_bg_tilemap);
int colorbase = state->m_bg_color + (state->m_congo_color_bank << 8);
- int xmask = pixmap->width() - 1;
- int ymask = pixmap->height() - 1;
+ int xmask = pixmap.width() - 1;
+ int ymask = pixmap.height() - 1;
int flipmask = flip_screen_get(machine) ? 0xff : 0x00;
int flipoffs = flip_screen_get(machine) ? 0x38 : 0x40;
int x, y;
@@ -347,7 +347,7 @@ static void draw_background(running_machine &machine, bitmap_t *bitmap, const re
/* loop over visible rows */
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
- UINT16 *dst = &bitmap->pix16(y);
+ UINT16 *dst = &bitmap.pix16(y);
int srcx, srcy, vf;
UINT16 *src;
@@ -357,7 +357,7 @@ static void draw_background(running_machine &machine, bitmap_t *bitmap, const re
/* base of the source row comes from VF plus the scroll value */
/* this is done by the 3 4-bit adders at U56, U74, U75 */
srcy = vf + ((state->m_bg_position << 1) ^ 0xfff) + 1;
- src = &pixmap->pix16(srcy & ymask);
+ src = &pixmap.pix16(srcy & ymask);
/* loop over visible colums */
for (x = cliprect.min_x; x <= cliprect.max_x; x++)
@@ -384,7 +384,7 @@ static void draw_background(running_machine &machine, bitmap_t *bitmap, const re
/* if not enabled, fill the background with black */
else
- bitmap->fill(get_black_pen(machine), cliprect);
+ bitmap.fill(get_black_pen(machine), cliprect);
}
@@ -440,7 +440,7 @@ INLINE int find_minimum_x(UINT8 value, int flip)
}
-static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, UINT16 flipxmask, UINT16 flipymask)
+static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, UINT16 flipxmask, UINT16 flipymask)
{
zaxxon_state *state = machine.driver_data<zaxxon_state>();
UINT8 *spriteram = state->m_spriteram;
diff --git a/src/mame/video/zerozone.c b/src/mame/video/zerozone.c
index ee53a2874eb..c900ad6e673 100644
--- a/src/mame/video/zerozone.c
+++ b/src/mame/video/zerozone.c
@@ -42,6 +42,6 @@ void zerozone_state::video_start()
bool zerozone_state::screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect)
{
- tilemap_draw(&bitmap, cliprect, m_zz_tilemap, 0, 0);
+ tilemap_draw(bitmap, cliprect, m_zz_tilemap, 0, 0);
return 0;
}
diff --git a/src/mame/video/zodiack.c b/src/mame/video/zodiack.c
index 0f3d601d44f..d77004fce4e 100644
--- a/src/mame/video/zodiack.c
+++ b/src/mame/video/zodiack.c
@@ -130,7 +130,7 @@ void zodiack_state::video_start()
flip_screen_set_no_update(machine(), 0);
}
-void zodiack_state::draw_bullets( bitmap_t *bitmap, const rectangle &cliprect )
+void zodiack_state::draw_bullets( bitmap_t &bitmap, const rectangle &cliprect )
{
for (int offs = 0; offs < m_bulletsram_size; offs += 4)
{
@@ -154,7 +154,7 @@ void zodiack_state::draw_bullets( bitmap_t *bitmap, const rectangle &cliprect )
}
}
-void zodiack_state::draw_sprites( bitmap_t *bitmap, const rectangle &cliprect )
+void zodiack_state::draw_sprites( bitmap_t &bitmap, const rectangle &cliprect )
{
for (int offs = m_spriteram_size - 4; offs >= 0; offs -= 4)
{
@@ -186,9 +186,9 @@ bool zodiack_state::screen_update( screen_device &screen, bitmap_t &bitmap, cons
for (int i = 0; i < 32; i++)
tilemap_set_scrolly(m_fg_tilemap, i, m_attributeram[i * 2]);
- tilemap_draw(&bitmap, cliprect, m_bg_tilemap, 0, 0);
- tilemap_draw(&bitmap, cliprect, m_fg_tilemap, 0, 0);
- draw_bullets(&bitmap, cliprect);
- draw_sprites(&bitmap, cliprect);
+ tilemap_draw(bitmap, cliprect, m_bg_tilemap, 0, 0);
+ tilemap_draw(bitmap, cliprect, m_fg_tilemap, 0, 0);
+ draw_bullets(bitmap, cliprect);
+ draw_sprites(bitmap, cliprect);
return 0;
}
diff --git a/src/osd/sdl/drawogl.c b/src/osd/sdl/drawogl.c
index cf169ac1471..e8890631a74 100644
--- a/src/osd/sdl/drawogl.c
+++ b/src/osd/sdl/drawogl.c
@@ -247,7 +247,7 @@ struct _sdl_info
GLhandleARB glsl_program[2*GLSL_SHADER_MAX]; // GLSL programs, or 0
int glsl_program_num; // number of GLSL programs
int glsl_program_mb2sc; // GLSL program idx, which transforms
- // the mame-bitmap -> screen-bitmap (size/rotation/..)
+ // the mame-bitmap. screen-bitmap (size/rotation/..)
// All progs <= glsl_program_mb2sc using the mame bitmap
// as input, otherwise the screen bitmap.
// All progs >= glsl_program_mb2sc using the screen bitmap
diff --git a/src/osd/sdl/sdlmain.c b/src/osd/sdl/sdlmain.c
index 89b751b8d45..6694a6f8770 100644
--- a/src/osd/sdl/sdlmain.c
+++ b/src/osd/sdl/sdlmain.c
@@ -773,7 +773,7 @@ bitmap_t *sdl_osd_interface::font_get_bitmap(osd_font font, unicode_char chnum,
{
UniChar uni_char;
CGGlyph glyph;
- bitmap_t *bitmap = (bitmap_t *)NULL;
+ bitmap_t &bitmap = (bitmap_t *)NULL;
CTFontRef ct_font = (CTFontRef)font;
const CFIndex count = 1;
CGRect bounding_rect, success_rect;
@@ -816,7 +816,7 @@ bitmap_t *sdl_osd_interface::font_get_bitmap(osd_font font, unicode_char chnum,
bitmap = auto_alloc(machine(), bitmap_t(bitmap_width, bitmap_height, BITMAP_FORMAT_ARGB32));
- context_ref = CGBitmapContextCreate( bitmap->raw_pixptr(0), bitmap_width, bitmap_height, bits_per_component, bitmap->rowpixels()*4, color_space, bitmap_info );
+ context_ref = CGBitmapContextCreate( bitmap.raw_pixptr(0), bitmap_width, bitmap_height, bits_per_component, bitmap.rowpixels()*4, color_space, bitmap_info );
if( context_ref != NULL )
{
@@ -1080,7 +1080,7 @@ bitmap_t *sdl_osd_interface::font_get_bitmap(osd_font font, unicode_char chnum,
// copy the rendered character image into it
for (int y = 0; y < bitmap->height(); y++)
{
- UINT32 *dstrow = &bitmap->pix32(y);
+ UINT32 *dstrow = &bitmap.pix32(y);
UINT8 *srcrow = (UINT8 *)drawsurf->pixels;
srcrow += (y * drawsurf->pitch);
diff --git a/src/osd/windows/d3dhlsl.c b/src/osd/windows/d3dhlsl.c
index 5960f7a3db6..83a6ea36463 100644
--- a/src/osd/windows/d3dhlsl.c
+++ b/src/osd/windows/d3dhlsl.c
@@ -414,7 +414,7 @@ void hlsl_info::render_snapshot(d3d_surface *surface)
png_add_text(&pnginfo, "System", text2);
// now do the actual work
- png_error error = png_write_bitmap(file, &pnginfo, avi_snap, 1 << 24, NULL);
+ png_error error = png_write_bitmap(file, &pnginfo, *avi_snap, 1 << 24, NULL);
if (error != PNGERR_NONE)
mame_printf_error("Error generating PNG for HLSL snapshot: png_error = %d\n", error);
@@ -478,7 +478,7 @@ void hlsl_info::record_texture()
{
// handle an AVI recording
// write the next frame
- avi_error avierr = avi_append_video_frame_rgb32(avi_output_file, avi_snap);
+ avi_error avierr = avi_append_video_frame_rgb32(avi_output_file, *avi_snap);
if (avierr != AVIERR_NONE)
{
end_avi_recording();
diff --git a/src/tools/ldverify.c b/src/tools/ldverify.c
index b8161384bf9..63f7adc7b6a 100644
--- a/src/tools/ldverify.c
+++ b/src/tools/ldverify.c
@@ -159,7 +159,7 @@ static void *open_avi(const char *filename, movie_info *info)
read_avi - read a frame from an AVI file
-------------------------------------------------*/
-static int read_avi(void *file, int frame, bitmap_t *bitmap, INT16 *lsound, INT16 *rsound, int *samples)
+static int read_avi(void *file, int frame, bitmap_t &bitmap, INT16 *lsound, INT16 *rsound, int *samples)
{
const avi_movie_info *aviinfo = avi_get_movie_info((avi_file *)file);
UINT32 firstsample = ((UINT64)aviinfo->audio_samplerate * (UINT64)frame * (UINT64)aviinfo->video_sampletime + aviinfo->video_timescale - 1) / (UINT64)aviinfo->video_timescale;
@@ -258,7 +258,7 @@ static void *open_chd(const char *filename, movie_info *info)
read_chd - read a frame from a CHD file
-------------------------------------------------*/
-static int read_chd(void *file, int frame, bitmap_t *bitmap, INT16 *lsound, INT16 *rsound, int *samples)
+static int read_chd(void *file, int frame, bitmap_t &bitmap, INT16 *lsound, INT16 *rsound, int *samples)
{
av_codec_decompress_config avconfig = { 0 };
int interlace_factor = chdinterlaced ? 2 : 1;
@@ -272,7 +272,7 @@ static int read_chd(void *file, int frame, bitmap_t *bitmap, INT16 *lsound, INT1
for (fieldnum = 0; fieldnum < interlace_factor; fieldnum++)
{
/* make a fake bitmap for this field */
- avconfig.video = new(&fakebitmap) bitmap_t(&bitmap->pix16(fieldnum), bitmap->width(), bitmap->height() / interlace_factor, bitmap->rowpixels() * interlace_factor, bitmap->format());
+ avconfig.video = new(&fakebitmap) bitmap_t(&bitmap.pix16(fieldnum), bitmap.width(), bitmap.height() / interlace_factor, bitmap.rowpixels() * interlace_factor, bitmap.format());
/* configure the codec */
avconfig.maxsamples = 48000;
@@ -342,7 +342,7 @@ static void init_video(video_info *video)
verify_video - verify video frame
-------------------------------------------------*/
-static void verify_video(video_info *video, int frame, bitmap_t *bitmap)
+static void verify_video(video_info *video, int frame, bitmap_t &bitmap)
{
const int fields_per_frame = 2;
int fieldnum;
@@ -363,7 +363,7 @@ static void verify_video(video_info *video, int frame, bitmap_t *bitmap)
fprintf(stderr, "%6d.%d...\r", frame, fieldnum);
/* parse the VBI data */
- vbi_parse_all(&bitmap->pix16(fieldnum), bitmap->rowpixels() * 2, bitmap->width(), 8, &metadata);
+ vbi_parse_all(&bitmap.pix16(fieldnum), bitmap.rowpixels() * 2, bitmap.width(), 8, &metadata);
/* if we have data in both 17 and 18, it should match */
if (metadata.line17 != 0 && metadata.line18 != 0 && metadata.line17 != metadata.line18)
@@ -519,15 +519,15 @@ static void verify_video(video_info *video, int frame, bitmap_t *bitmap)
/* now examine the active video signal */
pixels = 0;
- for (y = 22*2 + fieldnum; y < bitmap->height(); y += 2)
+ for (y = 22*2 + fieldnum; y < bitmap.height(); y += 2)
{
for (x = 16; x < 720 - 16; x++)
{
- yhisto[bitmap->pix16(y, x) >> 8]++;
+ yhisto[bitmap.pix16(y, x) >> 8]++;
if (x % 2 == 0)
- cbhisto[bitmap->pix16(y, x) & 0xff]++;
+ cbhisto[bitmap.pix16(y, x) & 0xff]++;
else
- crhisto[bitmap->pix16(y, x) & 0xff]++;
+ crhisto[bitmap.pix16(y, x) & 0xff]++;
}
pixels += 720 - 16 - 16;
}
@@ -613,9 +613,9 @@ static void verify_video(video_info *video, int frame, bitmap_t *bitmap)
verify_video_final - final verification
-------------------------------------------------*/
-static void verify_video_final(video_info *video, int frame, bitmap_t *bitmap)
+static void verify_video_final(video_info *video, int frame, bitmap_t &bitmap)
{
- int fields_per_frame = (bitmap->height() >= 288) ? 2 : 1;
+ int fields_per_frame = (bitmap.height() >= 288) ? 2 : 1;
int field = frame * fields_per_frame;
/* did we ever see any white flags? */