summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2011-12-31 07:52:26 +0000
committer Aaron Giles <aaron@aarongiles.com>2011-12-31 07:52:26 +0000
commit9cae38e0d82a71a20619c5ba49dce4eaa0bb0cc2 (patch)
tree56135caff0d5610acb3b1fc34b640853fe27b104 /src
parent384b14a64b7e2a732b9b3429fc6d7aa443486c6c (diff)
Converted bitmap_t and rectangle into proper classes. Replaced BITMAP_ADDR*
macros with bitmap->pix* functions, and moved bitmap_fill() to bitmap->fill() among other similar changes. Bitmap fields now only available via accessors. Replaced sect_rect with &= and union_rect with |= operators for rectangle classes. Some general cleanup as a result of these changes. [Aaron Giles]
Diffstat (limited to 'src')
-rw-r--r--src/build/png2bdc.c35
-rw-r--r--src/emu/cpu/tms34010/tms34010.c8
-rw-r--r--src/emu/crsshair.c6
-rw-r--r--src/emu/drawgfx.c192
-rw-r--r--src/emu/drawgfxm.h118
-rw-r--r--src/emu/emu.h3
-rw-r--r--src/emu/machine/laserdsc.h13
-rw-r--r--src/emu/machine/ldcore.c55
-rw-r--r--src/emu/machine/ldpr8210.c12
-rw-r--r--src/emu/machine/s3c24xx.c56
-rw-r--r--src/emu/render.c28
-rw-r--r--src/emu/rendfont.c27
-rw-r--r--src/emu/rendlay.c96
-rw-r--r--src/emu/rendutil.c36
-rw-r--r--src/emu/save.h2
-rw-r--r--src/emu/screen.c54
-rw-r--r--src/emu/sound/cdp1864.c6
-rw-r--r--src/emu/sound/cdp1869.c12
-rw-r--r--src/emu/sound/mos6560.c40
-rw-r--r--src/emu/tilemap.c80
-rw-r--r--src/emu/uigfx.c13
-rw-r--r--src/emu/uimenu.c12
-rw-r--r--src/emu/video.c16
-rw-r--r--src/emu/video/cdp1861.c4
-rw-r--r--src/emu/video/cdp1862.c4
-rw-r--r--src/emu/video/hd44102.c2
-rw-r--r--src/emu/video/hd61830.c6
-rw-r--r--src/emu/video/i8275.c2
-rw-r--r--src/emu/video/k053250.c14
-rw-r--r--src/emu/video/msm6255.c4
-rw-r--r--src/emu/video/pc_cga.c26
-rw-r--r--src/emu/video/pc_vga.c16
-rw-r--r--src/emu/video/psx.c10
-rw-r--r--src/emu/video/s2636.c12
-rw-r--r--src/emu/video/sed1330.c6
-rw-r--r--src/emu/video/tms9928a.c2
-rw-r--r--src/emu/video/upd3301.c2
-rw-r--r--src/emu/video/v9938.c8
-rw-r--r--src/emu/video/vector.c2
-rw-r--r--src/emu/video/voodoo.c6
-rw-r--r--src/lib/util/avcomp.c14
-rw-r--r--src/lib/util/aviio.c22
-rw-r--r--src/lib/util/bitmap.c476
-rw-r--r--src/lib/util/bitmap.h264
-rw-r--r--src/lib/util/png.c42
-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.c44
-rw-r--r--src/mame/drivers/adp.c20
-rw-r--r--src/mame/drivers/albazc.c2
-rw-r--r--src/mame/drivers/aristmk6.c6
-rw-r--r--src/mame/drivers/astinvad.c16
-rw-r--r--src/mame/drivers/astrocorp.c2
-rw-r--r--src/mame/drivers/astrof.c4
-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/bfcobra.c2
-rw-r--r--src/mame/drivers/bingor.c10
-rw-r--r--src/mame/drivers/blackt96.c2
-rw-r--r--src/mame/drivers/blitz68k.c10
-rw-r--r--src/mame/drivers/bmcbowl.c18
-rw-r--r--src/mame/drivers/bnstars.c8
-rw-r--r--src/mame/drivers/boxer.c2
-rw-r--r--src/mame/drivers/cabaret.c2
-rw-r--r--src/mame/drivers/cardline.c2
-rw-r--r--src/mame/drivers/cb2001.c12
-rw-r--r--src/mame/drivers/cesclass.c4
-rw-r--r--src/mame/drivers/champbwl.c4
-rw-r--r--src/mame/drivers/clayshoo.c2
-rw-r--r--src/mame/drivers/cntsteer.c4
-rw-r--r--src/mame/drivers/cobra.c4
-rw-r--r--src/mame/drivers/coolpool.c4
-rw-r--r--src/mame/drivers/coolridr.c7
-rw-r--r--src/mame/drivers/corona.c4
-rw-r--r--src/mame/drivers/cps3.c28
-rw-r--r--src/mame/drivers/crystal.c2
-rw-r--r--src/mame/drivers/cshooter.c2
-rw-r--r--src/mame/drivers/csplayh5.c2
-rw-r--r--src/mame/drivers/cubeqst.c6
-rw-r--r--src/mame/drivers/cybertnk.c22
-rw-r--r--src/mame/drivers/dai3wksi.c4
-rw-r--r--src/mame/drivers/darkhors.c2
-rw-r--r--src/mame/drivers/dblewing.c4
-rw-r--r--src/mame/drivers/ddenlovr.c4
-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.c2
-rw-r--r--src/mame/drivers/diverboy.c2
-rw-r--r--src/mame/drivers/dmndrby.c2
-rw-r--r--src/mame/drivers/dorachan.c2
-rw-r--r--src/mame/drivers/dotrikun.c8
-rw-r--r--src/mame/drivers/dunhuang.c2
-rw-r--r--src/mame/drivers/dwarfd.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.c8
-rw-r--r--src/mame/drivers/feversoc.c2
-rw-r--r--src/mame/drivers/firebeat.c8
-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.c12
-rw-r--r--src/mame/drivers/galgame.c4
-rw-r--r--src/mame/drivers/galpani3.c10
-rw-r--r--src/mame/drivers/gamecstl.c4
-rw-r--r--src/mame/drivers/gei.c2
-rw-r--r--src/mame/drivers/goldngam.c2
-rw-r--r--src/mame/drivers/gpworld.c8
-rw-r--r--src/mame/drivers/guab.c4
-rw-r--r--src/mame/drivers/gunpey.c2
-rw-r--r--src/mame/drivers/halleys.c24
-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.c4
-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/itech8.c18
-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.c4
-rw-r--r--src/mame/drivers/jangou.c2
-rw-r--r--src/mame/drivers/jantotsu.c2
-rw-r--r--src/mame/drivers/jchan.c12
-rw-r--r--src/mame/drivers/jollyjgr.c12
-rw-r--r--src/mame/drivers/jongkyo.c2
-rw-r--r--src/mame/drivers/jpmsys5.c4
-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.c46
-rw-r--r--src/mame/drivers/laserbas.c8
-rw-r--r--src/mame/drivers/laserbat.c12
-rw-r--r--src/mame/drivers/lastfght.c6
-rw-r--r--src/mame/drivers/lgp.c2
-rw-r--r--src/mame/drivers/limenko.c18
-rw-r--r--src/mame/drivers/littlerb.c6
-rw-r--r--src/mame/drivers/luckgrln.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.c16
-rw-r--r--src/mame/drivers/maygayv1.c4
-rw-r--r--src/mame/drivers/mazerbla.c18
-rw-r--r--src/mame/drivers/mediagx.c10
-rw-r--r--src/mame/drivers/meijinsn.c2
-rw-r--r--src/mame/drivers/merit.c2
-rw-r--r--src/mame/drivers/meritm.c2
-rw-r--r--src/mame/drivers/metalmx.c2
-rw-r--r--src/mame/drivers/midas.c2
-rw-r--r--src/mame/drivers/minivadr.c2
-rw-r--r--src/mame/drivers/mirage.c2
-rw-r--r--src/mame/drivers/missb2.c2
-rw-r--r--src/mame/drivers/missile.c2
-rw-r--r--src/mame/drivers/mjsister.c12
-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.c2
-rw-r--r--src/mame/drivers/namcoic.c28
-rw-r--r--src/mame/drivers/namcos23.c6
-rw-r--r--src/mame/drivers/neoprint.c4
-rw-r--r--src/mame/drivers/nightgal.c2
-rw-r--r--src/mame/drivers/nmg5.c8
-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/othello.c2
-rw-r--r--src/mame/drivers/panicr.c2
-rw-r--r--src/mame/drivers/pasha2.c8
-rw-r--r--src/mame/drivers/pcxt.c4
-rw-r--r--src/mame/drivers/photon2.c4
-rw-r--r--src/mame/drivers/pinkiri8.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.c2
-rw-r--r--src/mame/drivers/rabbit.c10
-rw-r--r--src/mame/drivers/raiden2.c2
-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/sbowling.c4
-rw-r--r--src/mame/drivers/segac2.c2
-rw-r--r--src/mame/drivers/segald.c2
-rw-r--r--src/mame/drivers/sfbonus.c12
-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.c2
-rw-r--r--src/mame/drivers/skeetsht.c2
-rw-r--r--src/mame/drivers/skimaxx.c2
-rw-r--r--src/mame/drivers/skylncr.c12
-rw-r--r--src/mame/drivers/sliver.c16
-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/spaceg.c2
-rw-r--r--src/mame/drivers/speglsht.c6
-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.c32
-rw-r--r--src/mame/drivers/subsino2.c22
-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.c4
-rw-r--r--src/mame/drivers/tmaster.c10
-rw-r--r--src/mame/drivers/tmmjprd.c10
-rw-r--r--src/mame/drivers/tonton.c2
-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/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.c4
-rw-r--r--src/mame/drivers/vcombat.c2
-rw-r--r--src/mame/drivers/vegaeo.c8
-rw-r--r--src/mame/drivers/vmetal.c4
-rw-r--r--src/mame/drivers/warpsped.c8
-rw-r--r--src/mame/drivers/wheelfir.c16
-rw-r--r--src/mame/drivers/whitestar.c4
-rw-r--r--src/mame/drivers/wldarrow.c2
-rw-r--r--src/mame/drivers/xtheball.c2
-rw-r--r--src/mame/drivers/zr107.c4
-rw-r--r--src/mame/includes/itech8.h5
-rw-r--r--src/mame/machine/3do.c4
-rw-r--r--src/mame/machine/konppc.c16
-rw-r--r--src/mame/machine/megadriv.c4
-rw-r--r--src/mame/machine/segamsys.c24
-rw-r--r--src/mame/video/1943.c2
-rw-r--r--src/mame/video/20pacgal.c10
-rw-r--r--src/mame/video/40love.c4
-rw-r--r--src/mame/video/8080bw.c10
-rw-r--r--src/mame/video/aeroboto.c10
-rw-r--r--src/mame/video/aerofgt.c18
-rw-r--r--src/mame/video/ajax.c4
-rw-r--r--src/mame/video/aliens.c4
-rw-r--r--src/mame/video/alpha68k.c12
-rw-r--r--src/mame/video/ambush.c2
-rw-r--r--src/mame/video/amiga.c2
-rw-r--r--src/mame/video/amigaaga.c2
-rw-r--r--src/mame/video/angelkds.c2
-rw-r--r--src/mame/video/arcadecl.c6
-rw-r--r--src/mame/video/archimds.c14
-rw-r--r--src/mame/video/argus.c16
-rw-r--r--src/mame/video/armedf.c4
-rw-r--r--src/mame/video/artmagic.c2
-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/atarig42.c8
-rw-r--r--src/mame/video/atarigt.c10
-rw-r--r--src/mame/video/atarigx2.c8
-rw-r--r--src/mame/video/atarimo.c8
-rw-r--r--src/mame/video/atarirle.c34
-rw-r--r--src/mame/video/atarisy1.c4
-rw-r--r--src/mame/video/atarisy2.c8
-rw-r--r--src/mame/video/badlands.c4
-rw-r--r--src/mame/video/bagman.c6
-rw-r--r--src/mame/video/balsente.c8
-rw-r--r--src/mame/video/batman.c12
-rw-r--r--src/mame/video/battlane.c10
-rw-r--r--src/mame/video/bbusters.c2
-rw-r--r--src/mame/video/beezer.c4
-rw-r--r--src/mame/video/bfm_adr2.c4
-rw-r--r--src/mame/video/bigevglf.c2
-rw-r--r--src/mame/video/bigstrkb.c2
-rw-r--r--src/mame/video/bionicc.c2
-rw-r--r--src/mame/video/bishi.c2
-rw-r--r--src/mame/video/bking.c6
-rw-r--r--src/mame/video/blktiger.c2
-rw-r--r--src/mame/video/blmbycar.c4
-rw-r--r--src/mame/video/blockhl.c2
-rw-r--r--src/mame/video/blockout.c20
-rw-r--r--src/mame/video/bloodbro.c6
-rw-r--r--src/mame/video/blstroid.c4
-rw-r--r--src/mame/video/blueprnt.c2
-rw-r--r--src/mame/video/boogwing.c4
-rw-r--r--src/mame/video/bosco.c4
-rw-r--r--src/mame/video/bottom9.c2
-rw-r--r--src/mame/video/btoads.c2
-rw-r--r--src/mame/video/bublbobl.c2
-rw-r--r--src/mame/video/buggychl.c6
-rw-r--r--src/mame/video/bwing.c2
-rw-r--r--src/mame/video/canyon.c2
-rw-r--r--src/mame/video/capbowl.c4
-rw-r--r--src/mame/video/carpolo.c38
-rw-r--r--src/mame/video/cave.c14
-rw-r--r--src/mame/video/cbasebal.c2
-rw-r--r--src/mame/video/ccastles.c6
-rw-r--r--src/mame/video/cclimber.c32
-rw-r--r--src/mame/video/chaknpop.c4
-rw-r--r--src/mame/video/changela.c42
-rw-r--r--src/mame/video/cheekyms.c12
-rw-r--r--src/mame/video/chqflag.c2
-rw-r--r--src/mame/video/circus.c12
-rw-r--r--src/mame/video/circusc.c2
-rw-r--r--src/mame/video/cischeat.c12
-rw-r--r--src/mame/video/cloak.c2
-rw-r--r--src/mame/video/cloud9.c6
-rw-r--r--src/mame/video/cninja.c18
-rw-r--r--src/mame/video/combatsc.c6
-rw-r--r--src/mame/video/contra.c6
-rw-r--r--src/mame/video/copsnrob.c2
-rw-r--r--src/mame/video/cosmic.c26
-rw-r--r--src/mame/video/cps1.c10
-rw-r--r--src/mame/video/crbaloon.c4
-rw-r--r--src/mame/video/crgolf.c2
-rw-r--r--src/mame/video/crshrace.c4
-rw-r--r--src/mame/video/cvs.c24
-rw-r--r--src/mame/video/cyberbal.c4
-rw-r--r--src/mame/video/darkmist.c2
-rw-r--r--src/mame/video/darkseal.c2
-rw-r--r--src/mame/video/dassault.c4
-rw-r--r--src/mame/video/dbz.c2
-rw-r--r--src/mame/video/dc.c44
-rw-r--r--src/mame/video/dcheese.c8
-rw-r--r--src/mame/video/dcon.c8
-rw-r--r--src/mame/video/dday.c6
-rw-r--r--src/mame/video/deadang.c4
-rw-r--r--src/mame/video/dec0.c2
-rw-r--r--src/mame/video/decbac06.c14
-rw-r--r--src/mame/video/deco16ic.c24
-rw-r--r--src/mame/video/deco32.c50
-rw-r--r--src/mame/video/deco_mlc.c28
-rw-r--r--src/mame/video/decocass.c16
-rw-r--r--src/mame/video/decocomn.c8
-rw-r--r--src/mame/video/decospr.c6
-rw-r--r--src/mame/video/deniam.c26
-rw-r--r--src/mame/video/dietgo.c2
-rw-r--r--src/mame/video/djmain.c2
-rw-r--r--src/mame/video/dkong.c6
-rw-r--r--src/mame/video/docastle.c2
-rw-r--r--src/mame/video/dogfgt.c4
-rw-r--r--src/mame/video/dooyong.c30
-rw-r--r--src/mame/video/dribling.c2
-rw-r--r--src/mame/video/dynax.c24
-rw-r--r--src/mame/video/dynduke.c6
-rw-r--r--src/mame/video/eolith.c2
-rw-r--r--src/mame/video/epos.c4
-rw-r--r--src/mame/video/eprom.c20
-rw-r--r--src/mame/video/equites.c12
-rw-r--r--src/mame/video/esd16.c12
-rw-r--r--src/mame/video/esripsys.c2
-rw-r--r--src/mame/video/exedexes.c2
-rw-r--r--src/mame/video/exidy.c24
-rw-r--r--src/mame/video/exidy440.c4
-rw-r--r--src/mame/video/exterm.c2
-rw-r--r--src/mame/video/exzisus.c2
-rw-r--r--src/mame/video/f1gp.c6
-rw-r--r--src/mame/video/fantland.c2
-rw-r--r--src/mame/video/fastfred.c17
-rw-r--r--src/mame/video/fastlane.c4
-rw-r--r--src/mame/video/fgoal.c8
-rw-r--r--src/mame/video/firetrk.c22
-rw-r--r--src/mame/video/fitfight.c2
-rw-r--r--src/mame/video/flkatck.c4
-rw-r--r--src/mame/video/foodf.c2
-rw-r--r--src/mame/video/funkyjet.c2
-rw-r--r--src/mame/video/funybubl.c2
-rw-r--r--src/mame/video/fuukifg2.c4
-rw-r--r--src/mame/video/fuukifg3.c4
-rw-r--r--src/mame/video/gaelco.c8
-rw-r--r--src/mame/video/gaelco2.c6
-rw-r--r--src/mame/video/gaelco3d.c14
-rw-r--r--src/mame/video/gaiden.c26
-rw-r--r--src/mame/video/galaga.c4
-rw-r--r--src/mame/video/galastrm.c34
-rw-r--r--src/mame/video/galaxian.c30
-rw-r--r--src/mame/video/galaxold.c65
-rw-r--r--src/mame/video/galivan.c4
-rw-r--r--src/mame/video/galpani2.c8
-rw-r--r--src/mame/video/galpanic.c6
-rw-r--r--src/mame/video/galspnbl.c2
-rw-r--r--src/mame/video/gameplan.c4
-rw-r--r--src/mame/video/gaplus.c4
-rw-r--r--src/mame/video/gauntlet.c4
-rw-r--r--src/mame/video/gcpinbal.c4
-rw-r--r--src/mame/video/genesis.c2
-rw-r--r--src/mame/video/gijoe.c4
-rw-r--r--src/mame/video/ginganin.c2
-rw-r--r--src/mame/video/gladiatr.c6
-rw-r--r--src/mame/video/glass.c6
-rw-r--r--src/mame/video/goal92.c2
-rw-r--r--src/mame/video/goldstar.c92
-rw-r--r--src/mame/video/gomoku.c10
-rw-r--r--src/mame/video/gottlieb.c2
-rw-r--r--src/mame/video/gp9001.c10
-rw-r--r--src/mame/video/gradius3.c2
-rw-r--r--src/mame/video/grchamp.c18
-rw-r--r--src/mame/video/gridlee.c4
-rw-r--r--src/mame/video/groundfx.c4
-rw-r--r--src/mame/video/gstriker.c2
-rw-r--r--src/mame/video/gticlub.c20
-rw-r--r--src/mame/video/gunbustr.c2
-rw-r--r--src/mame/video/gunsmoke.c2
-rw-r--r--src/mame/video/harddriv.c4
-rw-r--r--src/mame/video/hnayayoi.c4
-rw-r--r--src/mame/video/hng64.c68
-rw-r--r--src/mame/video/homedata.c8
-rw-r--r--src/mame/video/hyhoo.c14
-rw-r--r--src/mame/video/hyprduel.c6
-rw-r--r--src/mame/video/ikki.c6
-rw-r--r--src/mame/video/inufuku.c4
-rw-r--r--src/mame/video/itech8.c16
-rw-r--r--src/mame/video/jaguar.c4
-rw-r--r--src/mame/video/jalblend.c6
-rw-r--r--src/mame/video/jedi.c10
-rw-r--r--src/mame/video/jpmimpct.c2
-rw-r--r--src/mame/video/kan_panb.c8
-rw-r--r--src/mame/video/kan_pand.c2
-rw-r--r--src/mame/video/kaneko16.c18
-rw-r--r--src/mame/video/kangaroo.c2
-rw-r--r--src/mame/video/klax.c4
-rw-r--r--src/mame/video/konamigx.c34
-rw-r--r--src/mame/video/konamiic.c10
-rw-r--r--src/mame/video/konicdev.c37
-rw-r--r--src/mame/video/ksayakyu.c2
-rw-r--r--src/mame/video/labyrunr.c8
-rw-r--r--src/mame/video/ladybug.c6
-rw-r--r--src/mame/video/lasso.c8
-rw-r--r--src/mame/video/lazercmd.c2
-rw-r--r--src/mame/video/legionna.c12
-rw-r--r--src/mame/video/leland.c4
-rw-r--r--src/mame/video/lemmings.c8
-rw-r--r--src/mame/video/lethal.c4
-rw-r--r--src/mame/video/lethalj.c2
-rw-r--r--src/mame/video/liberate.c8
-rw-r--r--src/mame/video/liberatr.c6
-rw-r--r--src/mame/video/lkage.c2
-rw-r--r--src/mame/video/lockon.c14
-rw-r--r--src/mame/video/lordgun.c8
-rw-r--r--src/mame/video/lsasquad.c4
-rw-r--r--src/mame/video/m10.c6
-rw-r--r--src/mame/video/m107.c4
-rw-r--r--src/mame/video/m3raster.c20
-rw-r--r--src/mame/video/m52.c4
-rw-r--r--src/mame/video/m57.c8
-rw-r--r--src/mame/video/m58.c16
-rw-r--r--src/mame/video/m62.c4
-rw-r--r--src/mame/video/m72.c4
-rw-r--r--src/mame/video/m90.c14
-rw-r--r--src/mame/video/m92.c8
-rw-r--r--src/mame/video/macrossp.c2
-rw-r--r--src/mame/video/madalien.c12
-rw-r--r--src/mame/video/magmax.c6
-rw-r--r--src/mame/video/mainevt.c2
-rw-r--r--src/mame/video/malzak.c22
-rw-r--r--src/mame/video/mappy.c10
-rw-r--r--src/mame/video/mcatadv.c8
-rw-r--r--src/mame/video/mcd212.c4
-rw-r--r--src/mame/video/mcr.c10
-rw-r--r--src/mame/video/mcr3.c2
-rw-r--r--src/mame/video/mcr68.c6
-rw-r--r--src/mame/video/megasys1.c4
-rw-r--r--src/mame/video/mermaid.c39
-rw-r--r--src/mame/video/metlclsh.c2
-rw-r--r--src/mame/video/metro.c18
-rw-r--r--src/mame/video/mexico86.c4
-rw-r--r--src/mame/video/micro3d.c2
-rw-r--r--src/mame/video/midtunit.c4
-rw-r--r--src/mame/video/midvunit.c2
-rw-r--r--src/mame/video/midyunit.c2
-rw-r--r--src/mame/video/midzeus.c4
-rw-r--r--src/mame/video/midzeus2.c4
-rw-r--r--src/mame/video/mitchell.c2
-rw-r--r--src/mame/video/mjkjidai.c2
-rw-r--r--src/mame/video/model1.c12
-rw-r--r--src/mame/video/model2.c10
-rw-r--r--src/mame/video/model2rd.c4
-rw-r--r--src/mame/video/model3.c20
-rw-r--r--src/mame/video/momoko.c4
-rw-r--r--src/mame/video/moo.c2
-rw-r--r--src/mame/video/mrdo.c2
-rw-r--r--src/mame/video/ms32.c26
-rw-r--r--src/mame/video/mw8080bw.c20
-rw-r--r--src/mame/video/n64.c6
-rw-r--r--src/mame/video/n8080.c6
-rw-r--r--src/mame/video/namcofl.c2
-rw-r--r--src/mame/video/namcona1.c12
-rw-r--r--src/mame/video/namconb1.c4
-rw-r--r--src/mame/video/namcos1.c4
-rw-r--r--src/mame/video/namcos2.c22
-rw-r--r--src/mame/video/namcos21.c6
-rw-r--r--src/mame/video/namcos22.c40
-rw-r--r--src/mame/video/namcos86.c4
-rw-r--r--src/mame/video/naughtyb.c22
-rw-r--r--src/mame/video/nbmj8688.c8
-rw-r--r--src/mame/video/nbmj8891.c6
-rw-r--r--src/mame/video/nbmj8900.c6
-rw-r--r--src/mame/video/nbmj8991.c6
-rw-r--r--src/mame/video/nbmj9195.c4
-rw-r--r--src/mame/video/nemesis.c4
-rw-r--r--src/mame/video/neogeo.c8
-rw-r--r--src/mame/video/ninjakd2.c14
-rw-r--r--src/mame/video/ninjaw.c2
-rw-r--r--src/mame/video/nitedrvr.c2
-rw-r--r--src/mame/video/niyanpai.c4
-rw-r--r--src/mame/video/offtwall.c4
-rw-r--r--src/mame/video/ojankohs.c2
-rw-r--r--src/mame/video/oneshot.c4
-rw-r--r--src/mame/video/opwolf.c2
-rw-r--r--src/mame/video/othldrby.c4
-rw-r--r--src/mame/video/othunder.c4
-rw-r--r--src/mame/video/overdriv.c2
-rw-r--r--src/mame/video/pacland.c10
-rw-r--r--src/mame/video/pacman.c13
-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/pgm.c18
-rw-r--r--src/mame/video/pingpong.c16
-rw-r--r--src/mame/video/pitnrun.c4
-rw-r--r--src/mame/video/pk8000.c10
-rw-r--r--src/mame/video/pktgaldx.c6
-rw-r--r--src/mame/video/playch10.c4
-rw-r--r--src/mame/video/playmark.c20
-rw-r--r--src/mame/video/plygonet.c4
-rw-r--r--src/mame/video/polepos.c2
-rw-r--r--src/mame/video/poolshrk.c2
-rw-r--r--src/mame/video/popeye.c6
-rw-r--r--src/mame/video/popper.c2
-rw-r--r--src/mame/video/powerins.c2
-rw-r--r--src/mame/video/ppu2c0x.c18
-rw-r--r--src/mame/video/psikyo.c8
-rw-r--r--src/mame/video/psikyo4.c4
-rw-r--r--src/mame/video/psikyosh.c102
-rw-r--r--src/mame/video/psychic5.c4
-rw-r--r--src/mame/video/qdrmfgp.c2
-rw-r--r--src/mame/video/qix.c2
-rw-r--r--src/mame/video/quasar.c18
-rw-r--r--src/mame/video/quizdna.c2
-rw-r--r--src/mame/video/rainbow.c4
-rw-r--r--src/mame/video/rallyx.c10
-rw-r--r--src/mame/video/rampart.c6
-rw-r--r--src/mame/video/rastan.c2
-rw-r--r--src/mame/video/realbrk.c12
-rw-r--r--src/mame/video/redalert.c12
-rw-r--r--src/mame/video/redclash.c6
-rw-r--r--src/mame/video/relief.c8
-rw-r--r--src/mame/video/retofinv.c6
-rw-r--r--src/mame/video/rltennis.c6
-rw-r--r--src/mame/video/rohga.c10
-rw-r--r--src/mame/video/rollerg.c4
-rw-r--r--src/mame/video/rollrace.c2
-rw-r--r--src/mame/video/route16.c8
-rw-r--r--src/mame/video/rpunch.c8
-rw-r--r--src/mame/video/rungun.c4
-rw-r--r--src/mame/video/sega16sp.c32
-rw-r--r--src/mame/video/segag80r.c28
-rw-r--r--src/mame/video/segahang.c4
-rw-r--r--src/mame/video/segaic16.c12
-rw-r--r--src/mame/video/segaic24.c40
-rw-r--r--src/mame/video/segaorun.c6
-rw-r--r--src/mame/video/segas16a.c4
-rw-r--r--src/mame/video/segas16b.c4
-rw-r--r--src/mame/video/segas18.c12
-rw-r--r--src/mame/video/segas24.c6
-rw-r--r--src/mame/video/segas32.c42
-rw-r--r--src/mame/video/segaxbd.c4
-rw-r--r--src/mame/video/segaybd.c2
-rw-r--r--src/mame/video/sei_crtc.c2
-rw-r--r--src/mame/video/seibuspi.c16
-rw-r--r--src/mame/video/senjyo.c8
-rw-r--r--src/mame/video/seta.c16
-rw-r--r--src/mame/video/seta2.c4
-rw-r--r--src/mame/video/sf.c2
-rw-r--r--src/mame/video/shadfrce.c4
-rw-r--r--src/mame/video/shangha3.c2
-rw-r--r--src/mame/video/shootout.c4
-rw-r--r--src/mame/video/shuuz.c4
-rw-r--r--src/mame/video/sidearms.c10
-rw-r--r--src/mame/video/silkroad.c4
-rw-r--r--src/mame/video/simpl156.c4
-rw-r--r--src/mame/video/simpsons.c4
-rw-r--r--src/mame/video/sknsspr.c10
-rw-r--r--src/mame/video/skullxbo.c4
-rw-r--r--src/mame/video/skyfox.c6
-rw-r--r--src/mame/video/skyraid.c16
-rw-r--r--src/mame/video/slapshot.c4
-rw-r--r--src/mame/video/snes.c10
-rw-r--r--src/mame/video/snk68.c2
-rw-r--r--src/mame/video/spacefb.c24
-rw-r--r--src/mame/video/spbactn.c8
-rw-r--r--src/mame/video/spcforce.c2
-rw-r--r--src/mame/video/speedatk.c2
-rw-r--r--src/mame/video/speedspn.c2
-rw-r--r--src/mame/video/splash.c2
-rw-r--r--src/mame/video/sprint2.c2
-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/sshangha.c2
-rw-r--r--src/mame/video/sslam.c4
-rw-r--r--src/mame/video/sspeedr.c10
-rw-r--r--src/mame/video/ssv.c6
-rw-r--r--src/mame/video/st0016.c6
-rw-r--r--src/mame/video/stactics.c4
-rw-r--r--src/mame/video/starcrus.c38
-rw-r--r--src/mame/video/starfire.c16
-rw-r--r--src/mame/video/starshp1.c36
-rw-r--r--src/mame/video/stfight.c4
-rw-r--r--src/mame/video/stvvdp2.c118
-rw-r--r--src/mame/video/suna16.c4
-rw-r--r--src/mame/video/suna8.c2
-rw-r--r--src/mame/video/supbtime.c2
-rw-r--r--src/mame/video/superchs.c2
-rw-r--r--src/mame/video/superqix.c8
-rw-r--r--src/mame/video/suprloco.c6
-rw-r--r--src/mame/video/suprnova.c44
-rw-r--r--src/mame/video/suprridr.c6
-rw-r--r--src/mame/video/suprslam.c2
-rw-r--r--src/mame/video/surpratk.c4
-rw-r--r--src/mame/video/system1.c14
-rw-r--r--src/mame/video/system16.c14
-rw-r--r--src/mame/video/tail2nos.c2
-rw-r--r--src/mame/video/taito_b.c44
-rw-r--r--src/mame/video/taito_f2.c36
-rw-r--r--src/mame/video/taito_f3.c56
-rw-r--r--src/mame/video/taito_h.c6
-rw-r--r--src/mame/video/taito_l.c4
-rw-r--r--src/mame/video/taito_o.c2
-rw-r--r--src/mame/video/taito_z.c28
-rw-r--r--src/mame/video/taitoair.c14
-rw-r--r--src/mame/video/taitoic.c40
-rw-r--r--src/mame/video/taitojc.c28
-rw-r--r--src/mame/video/taitosj.c38
-rw-r--r--src/mame/video/tank8.c12
-rw-r--r--src/mame/video/tatsumi.c68
-rw-r--r--src/mame/video/taxidriv.c10
-rw-r--r--src/mame/video/tbowl.c4
-rw-r--r--src/mame/video/tceptor.c4
-rw-r--r--src/mame/video/tecmo.c4
-rw-r--r--src/mame/video/tecmo16.c28
-rw-r--r--src/mame/video/tecmosys.c32
-rw-r--r--src/mame/video/terracre.c2
-rw-r--r--src/mame/video/tetrisp2.c16
-rw-r--r--src/mame/video/thedeep.c2
-rw-r--r--src/mame/video/thepit.c17
-rw-r--r--src/mame/video/thief.c6
-rw-r--r--src/mame/video/thoop2.c2
-rw-r--r--src/mame/video/thunderj.c12
-rw-r--r--src/mame/video/thunderx.c4
-rw-r--r--src/mame/video/tia.c14
-rw-r--r--src/mame/video/tmnt.c20
-rw-r--r--src/mame/video/tnzs.c2
-rw-r--r--src/mame/video/toaplan1.c10
-rw-r--r--src/mame/video/toaplan2.c28
-rw-r--r--src/mame/video/toobin.c10
-rw-r--r--src/mame/video/topspeed.c4
-rw-r--r--src/mame/video/toypop.c4
-rw-r--r--src/mame/video/travrusa.c16
-rw-r--r--src/mame/video/triplhnt.c6
-rw-r--r--src/mame/video/truco.c2
-rw-r--r--src/mame/video/tryout.c2
-rw-r--r--src/mame/video/tsamurai.c2
-rw-r--r--src/mame/video/tubep.c10
-rw-r--r--src/mame/video/tumbleb.c2
-rw-r--r--src/mame/video/tumblep.c2
-rw-r--r--src/mame/video/tunhunt.c6
-rw-r--r--src/mame/video/turbo.c12
-rw-r--r--src/mame/video/tutankhm.c2
-rw-r--r--src/mame/video/twin16.c18
-rw-r--r--src/mame/video/twincobr.c2
-rw-r--r--src/mame/video/tx1.c4
-rw-r--r--src/mame/video/ultratnk.c4
-rw-r--r--src/mame/video/undrfire.c8
-rw-r--r--src/mame/video/unico.c8
-rw-r--r--src/mame/video/vdc.c10
-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.c6
-rw-r--r--src/mame/video/vindictr.c8
-rw-r--r--src/mame/video/volfied.c4
-rw-r--r--src/mame/video/warpwarp.c2
-rw-r--r--src/mame/video/warriorb.c4
-rw-r--r--src/mame/video/wecleman.c26
-rw-r--r--src/mame/video/welltris.c4
-rw-r--r--src/mame/video/wgp.c10
-rw-r--r--src/mame/video/williams.c6
-rw-r--r--src/mame/video/wiz.c21
-rw-r--r--src/mame/video/wolfpack.c22
-rw-r--r--src/mame/video/wrally.c2
-rw-r--r--src/mame/video/xexex.c2
-rw-r--r--src/mame/video/xmen.c16
-rw-r--r--src/mame/video/xybots.c4
-rw-r--r--src/mame/video/ygv608.c19
-rw-r--r--src/mame/video/yunsun16.c2
-rw-r--r--src/mame/video/yunsung8.c2
-rw-r--r--src/mame/video/zac2650.c6
-rw-r--r--src/mame/video/zaxxon.c10
-rw-r--r--src/osd/windows/d3dhlsl.c16
-rw-r--r--src/osd/windows/drawd3d.c20
-rw-r--r--src/osd/windows/winmain.c6
-rw-r--r--src/tools/ldverify.c6
733 files changed, 3634 insertions, 4106 deletions
diff --git a/src/build/png2bdc.c b/src/build/png2bdc.c
index dce72a642ee..2bb9227e6b2 100644
--- a/src/build/png2bdc.c
+++ b/src/build/png2bdc.c
@@ -50,6 +50,7 @@
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
+#include <new>
#include "png.h"
@@ -94,7 +95,7 @@ struct _render_font
INLINE int pixel_is_set(bitmap_t *bitmap, int y, int x)
{
- return (*BITMAP_ADDR32(bitmap, y, x) & 0xffffff) == 0;
+ return (bitmap->pix32(y, x) & 0xffffff) == 0;
}
@@ -186,7 +187,7 @@ static int render_font_save_cached(render_font *font, const char *filename, UINT
for (y = 0; y < ch->bmheight; y++)
{
int desty = y + font->height + font->yoffs - ch->yoffs - ch->bmheight;
- const UINT32 *src = (desty >= 0 && desty < font->height) ? BITMAP_ADDR32(ch->bitmap, desty, 0) : NULL;
+ const UINT32 *src = (desty >= 0 && desty < font->height) ? &ch->bitmap->pix32(desty) : NULL;
for (x = 0; x < ch->bmwidth; x++)
{
if (src != NULL && src[x] != 0)
@@ -210,7 +211,7 @@ static int render_font_save_cached(render_font *font, const char *filename, UINT
goto error;
/* free the bitmap and texture */
- bitmap_free(ch->bitmap);
+ delete ch->bitmap;
ch->bitmap = NULL;
}
@@ -263,20 +264,20 @@ static int bitmap_to_chars(bitmap_t *bitmap, render_font *font)
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--;
@@ -324,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--;
@@ -351,7 +352,7 @@ static int bitmap_to_chars(bitmap_t *bitmap, render_font *font)
// printf(" Character %X - width = %d\n", chstart, colend - colstart + 1);
/* allocate a bitmap */
- ch->bitmap = bitmap_alloc(colend - colstart + 1, font->height, BITMAP_FORMAT_ARGB32);
+ ch->bitmap = new(std::nothrow) bitmap_t(colend - colstart + 1, font->height, BITMAP_FORMAT_ARGB32);
if (ch->bitmap == NULL)
{
fprintf(stderr, "Error allocating character bitmap (%dx%d)\n", colend - colstart + 1, font->height);
@@ -361,14 +362,14 @@ static int bitmap_to_chars(bitmap_t *bitmap, render_font *font)
/* plot the character */
for (y = rowstart; y <= rowend; y++)
for (x = colstart; x <= colend; x++)
- *BITMAP_ADDR32(ch->bitmap, y - rowstart, x - colstart) = pixel_is_set(bitmap, y, x) ? 0xffffffff : 0x00000000;
+ ch->bitmap->pix32(y - rowstart, x - colstart) = pixel_is_set(bitmap, y, x) ? 0xffffffff : 0x00000000;
/* set the character parameters */
ch->width = colend - colstart + 1;
ch->xoffs = 0;
ch->yoffs = font->yoffs;
- ch->bmwidth = ch->bitmap->width;
- ch->bmheight = ch->bitmap->height;
+ ch->bmwidth = ch->bitmap->width();
+ ch->bmheight = ch->bitmap->height();
}
/* next character */
@@ -381,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 +439,7 @@ int main(int argc, char *argv[])
/* parse the PNG into characters */
error = bitmap_to_chars(bitmap, font);
- bitmap_free(bitmap);
+ delete bitmap;
if (error)
break;
}
diff --git a/src/emu/cpu/tms34010/tms34010.c b/src/emu/cpu/tms34010/tms34010.c
index b7fde156a1f..c1f3faef4ed 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_ADDR16(bitmap, cliprect->min_y, 0);
+ 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_ADDR32(bitmap, cliprect->min_y, 0);
+ 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/crsshair.c b/src/emu/crsshair.c
index 40bd09a6445..b0b84f175f6 100644
--- a/src/emu/crsshair.c
+++ b/src/emu/crsshair.c
@@ -181,14 +181,14 @@ static void create_bitmap(running_machine &machine, int player)
{
/* allocate a blank bitmap to start with */
global.bitmap[player] = global_alloc(bitmap_t(CROSSHAIR_RAW_SIZE, CROSSHAIR_RAW_SIZE, BITMAP_FORMAT_ARGB32));
- bitmap_fill(global.bitmap[player], NULL, MAKE_ARGB(0x00,0xff,0xff,0xff));
+ global.bitmap[player]->fill(MAKE_ARGB(0x00,0xff,0xff,0xff));
/* extract the raw source data to it */
for (y = 0; y < CROSSHAIR_RAW_SIZE / 2; y++)
{
/* assume it is mirrored vertically */
- UINT32 *dest0 = BITMAP_ADDR32(global.bitmap[player], y, 0);
- UINT32 *dest1 = BITMAP_ADDR32(global.bitmap[player], CROSSHAIR_RAW_SIZE - 1 - y, 0);
+ UINT32 *dest0 = &global.bitmap[player]->pix32(y);
+ UINT32 *dest1 = &global.bitmap[player]->pix32(CROSSHAIR_RAW_SIZE - 1 - y);
/* extract to two rows simultaneously */
for (x = 0; x < CROSSHAIR_RAW_SIZE; x++)
diff --git a/src/emu/drawgfx.c b/src/emu/drawgfx.c
index aafb041581c..f968858df6e 100644
--- a/src/emu/drawgfx.c
+++ b/src/emu/drawgfx.c
@@ -53,7 +53,7 @@ INLINE int readbit(const UINT8 *src, unsigned int bitnum)
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());
}
@@ -65,7 +65,7 @@ INLINE INT32 normalize_xscroll(bitmap_t *bitmap, INT32 xscroll)
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());
}
@@ -508,7 +508,7 @@ void drawgfx_opaque(bitmap_t *dest, const rectangle *cliprect, const gfx_element
const pen_t *paldata;
assert(dest != NULL);
- assert(dest->bpp == 16 || dest->bpp == 32);
+ assert(dest->bpp() == 16 || dest->bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -517,7 +517,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);
@@ -544,7 +544,7 @@ void drawgfx_transpen(bitmap_t *dest, const rectangle *cliprect, const gfx_eleme
}
assert(dest != NULL);
- assert(dest->bpp == 16 || dest->bpp == 32);
+ assert(dest->bpp() == 16 || dest->bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -570,7 +570,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);
@@ -590,7 +590,7 @@ void drawgfx_transpen_raw(bitmap_t *dest, const rectangle *cliprect, const gfx_e
bitmap_t *priority = NULL; /* dummy, no priority in this case */
assert(dest != NULL);
- assert(dest->bpp == 16 || dest->bpp == 32);
+ assert(dest->bpp() == 16 || dest->bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -601,7 +601,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);
@@ -629,7 +629,7 @@ void drawgfx_transmask(bitmap_t *dest, const rectangle *cliprect, const gfx_elem
}
assert(dest != NULL);
- assert(dest->bpp == 16 || dest->bpp == 32);
+ assert(dest->bpp() == 16 || dest->bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -655,7 +655,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);
@@ -676,7 +676,7 @@ void drawgfx_transtable(bitmap_t *dest, const rectangle *cliprect, const gfx_ele
const pen_t *paldata;
assert(dest != NULL);
- assert(dest->bpp == 16 || dest->bpp == 32);
+ assert(dest->bpp() == 16 || dest->bpp() == 32);
assert(gfx != NULL);
assert(pentable != NULL);
@@ -686,7 +686,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);
@@ -714,7 +714,7 @@ void drawgfx_alpha(bitmap_t *dest, const rectangle *cliprect, const gfx_element
}
assert(dest != NULL);
- assert(dest->bpp == 16 || dest->bpp == 32);
+ assert(dest->bpp() == 16 || dest->bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -727,7 +727,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);
@@ -759,7 +759,7 @@ void drawgfxzoom_opaque(bitmap_t *dest, const rectangle *cliprect, const gfx_ele
}
assert(dest != NULL);
- assert(dest->bpp == 16 || dest->bpp == 32);
+ assert(dest->bpp() == 16 || dest->bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -768,7 +768,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);
@@ -802,7 +802,7 @@ void drawgfxzoom_transpen(bitmap_t *dest, const rectangle *cliprect, const gfx_e
}
assert(dest != NULL);
- assert(dest->bpp == 16 || dest->bpp == 32);
+ assert(dest->bpp() == 16 || dest->bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -828,7 +828,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);
@@ -855,7 +855,7 @@ void drawgfxzoom_transpen_raw(bitmap_t *dest, const rectangle *cliprect, const g
}
assert(dest != NULL);
- assert(dest->bpp == 16 || dest->bpp == 32);
+ assert(dest->bpp() == 16 || dest->bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -866,7 +866,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);
@@ -901,7 +901,7 @@ void drawgfxzoom_transmask(bitmap_t *dest, const rectangle *cliprect, const gfx_
}
assert(dest != NULL);
- assert(dest->bpp == 16 || dest->bpp == 32);
+ assert(dest->bpp() == 16 || dest->bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -927,7 +927,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);
@@ -955,7 +955,7 @@ void drawgfxzoom_transtable(bitmap_t *dest, const rectangle *cliprect, const gfx
}
assert(dest != NULL);
- assert(dest->bpp == 16 || dest->bpp == 32);
+ assert(dest->bpp() == 16 || dest->bpp() == 32);
assert(gfx != NULL);
assert(pentable != NULL);
@@ -965,7 +965,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);
@@ -1000,7 +1000,7 @@ void drawgfxzoom_alpha(bitmap_t *dest, const rectangle *cliprect, const gfx_elem
}
assert(dest != NULL);
- assert(dest->bpp == 16 || dest->bpp == 32);
+ assert(dest->bpp() == 16 || dest->bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -1013,7 +1013,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);
@@ -1038,7 +1038,7 @@ void pdrawgfx_opaque(bitmap_t *dest, const rectangle *cliprect, const gfx_elemen
const pen_t *paldata;
assert(dest != NULL);
- assert(dest->bpp == 16 || dest->bpp == 32);
+ assert(dest->bpp() == 16 || dest->bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -1050,7 +1050,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);
@@ -1077,7 +1077,7 @@ void pdrawgfx_transpen(bitmap_t *dest, const rectangle *cliprect, const gfx_elem
}
assert(dest != NULL);
- assert(dest->bpp == 16 || dest->bpp == 32);
+ assert(dest->bpp() == 16 || dest->bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -1106,7 +1106,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);
@@ -1124,7 +1124,7 @@ void pdrawgfx_transpen_raw(bitmap_t *dest, const rectangle *cliprect, const gfx_
bitmap_t *priority, UINT32 pmask, UINT32 transpen)
{
assert(dest != NULL);
- assert(dest->bpp == 16 || dest->bpp == 32);
+ assert(dest->bpp() == 16 || dest->bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -1138,7 +1138,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);
@@ -1165,7 +1165,7 @@ void pdrawgfx_transmask(bitmap_t *dest, const rectangle *cliprect, const gfx_ele
}
assert(dest != NULL);
- assert(dest->bpp == 16 || dest->bpp == 32);
+ assert(dest->bpp() == 16 || dest->bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -1194,7 +1194,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);
@@ -1215,7 +1215,7 @@ void pdrawgfx_transtable(bitmap_t *dest, const rectangle *cliprect, const gfx_el
const pen_t *paldata;
assert(dest != NULL);
- assert(dest->bpp == 16 || dest->bpp == 32);
+ assert(dest->bpp() == 16 || dest->bpp() == 32);
assert(gfx != NULL);
assert(pentable != NULL);
@@ -1228,7 +1228,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);
@@ -1249,7 +1249,7 @@ void pdrawgfx_alpha(bitmap_t *dest, const rectangle *cliprect, const gfx_element
const pen_t *paldata;
assert(dest != NULL);
- assert(dest->bpp == 16 || dest->bpp == 32);
+ assert(dest->bpp() == 16 || dest->bpp() == 32);
assert(gfx != NULL);
/* special case alpha = 0xff */
@@ -1272,7 +1272,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);
@@ -1304,7 +1304,7 @@ void pdrawgfxzoom_opaque(bitmap_t *dest, const rectangle *cliprect, const gfx_el
}
assert(dest != NULL);
- assert(dest->bpp == 16 || dest->bpp == 32);
+ assert(dest->bpp() == 16 || dest->bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -1316,7 +1316,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);
@@ -1351,7 +1351,7 @@ void pdrawgfxzoom_transpen(bitmap_t *dest, const rectangle *cliprect, const gfx_
}
assert(dest != NULL);
- assert(dest->bpp == 16 || dest->bpp == 32);
+ assert(dest->bpp() == 16 || dest->bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -1380,7 +1380,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);
@@ -1407,7 +1407,7 @@ void pdrawgfxzoom_transpen_raw(bitmap_t *dest, const rectangle *cliprect, const
}
assert(dest != NULL);
- assert(dest->bpp == 16 || dest->bpp == 32);
+ assert(dest->bpp() == 16 || dest->bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -1421,7 +1421,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);
@@ -1457,7 +1457,7 @@ void pdrawgfxzoom_transmask(bitmap_t *dest, const rectangle *cliprect, const gfx
}
assert(dest != NULL);
- assert(dest->bpp == 16 || dest->bpp == 32);
+ assert(dest->bpp() == 16 || dest->bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -1486,7 +1486,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);
@@ -1515,7 +1515,7 @@ void pdrawgfxzoom_transtable(bitmap_t *dest, const rectangle *cliprect, const gf
}
assert(dest != NULL);
- assert(dest->bpp == 16 || dest->bpp == 32);
+ assert(dest->bpp() == 16 || dest->bpp() == 32);
assert(gfx != NULL);
assert(pentable != NULL);
@@ -1528,7 +1528,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);
@@ -1565,7 +1565,7 @@ void pdrawgfxzoom_alpha(bitmap_t *dest, const rectangle *cliprect, const gfx_ele
}
assert(dest != NULL);
- assert(dest->bpp == 16 || dest->bpp == 32);
+ assert(dest->bpp() == 16 || dest->bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -1581,7 +1581,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);
@@ -1603,13 +1603,13 @@ void draw_scanline8(bitmap_t *bitmap, INT32 destx, INT32 desty, INT32 length, co
bitmap_t *priority = NULL; /* dummy, no priority in this case */
assert(bitmap != NULL);
- assert(bitmap->bpp == 16 || bitmap->bpp == 32);
+ 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 +1619,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);
@@ -1637,13 +1637,13 @@ void draw_scanline16(bitmap_t *bitmap, INT32 destx, INT32 desty, INT32 length, c
bitmap_t *priority = NULL; /* dummy, no priority in this case */
assert(bitmap != NULL);
- assert(bitmap->bpp == 16 || bitmap->bpp == 32);
+ 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 +1653,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);
@@ -1671,13 +1671,13 @@ void draw_scanline32(bitmap_t *bitmap, INT32 destx, INT32 desty, INT32 length, c
bitmap_t *priority = NULL; /* dummy, no priority in this case */
assert(bitmap != NULL);
- assert(bitmap->bpp == 16 || bitmap->bpp == 32);
+ 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 +1687,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);
@@ -1708,10 +1708,10 @@ void draw_scanline32(bitmap_t *bitmap, INT32 destx, INT32 desty, INT32 length, c
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->bpp() == 16 || bitmap->bpp() == 32);
/* 16bpp case */
- if (bitmap->bpp == 16)
+ if (bitmap->bpp() == 16)
EXTRACTSCANLINE_CORE(UINT16);
else
EXTRACTSCANLINE_CORE(UINT32);
@@ -1726,10 +1726,10 @@ void extract_scanline8(bitmap_t *bitmap, INT32 srcx, INT32 srcy, INT32 length, U
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->bpp() == 16 || bitmap->bpp() == 32);
/* 16bpp case */
- if (bitmap->bpp == 16)
+ if (bitmap->bpp() == 16)
EXTRACTSCANLINE_CORE(UINT16);
else
EXTRACTSCANLINE_CORE(UINT32);
@@ -1744,10 +1744,10 @@ void extract_scanline16(bitmap_t *bitmap, INT32 srcx, INT32 srcy, INT32 length,
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->bpp() == 16 || bitmap->bpp() == 32);
/* 16bpp case */
- if (bitmap->bpp == 16)
+ if (bitmap->bpp() == 16)
EXTRACTSCANLINE_CORE(UINT16);
else
EXTRACTSCANLINE_CORE(UINT32);
@@ -1770,12 +1770,12 @@ void copybitmap(bitmap_t *dest, bitmap_t *src, int flipx, int flipy, INT32 destx
assert(dest != NULL);
assert(src != NULL);
- assert(dest->bpp == 8 || dest->bpp == 16 || dest->bpp == 32);
- assert(src->bpp == dest->bpp);
+ 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);
@@ -1794,17 +1794,17 @@ void copybitmap_trans(bitmap_t *dest, bitmap_t *src, int flipx, int flipy, INT32
assert(dest != NULL);
assert(src != NULL);
- assert(dest->bpp == 8 || dest->bpp == 16 || dest->bpp == 32);
- assert(src->bpp == dest->bpp);
+ 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);
@@ -1858,8 +1858,8 @@ void copyscrollbitmap_trans(bitmap_t *dest, bitmap_t *src, UINT32 numrows, const
assert(dest != NULL);
assert(src != NULL);
- assert(dest->bpp == 8 || dest->bpp == 16 || dest->bpp == 32);
- assert(dest->bpp == src->bpp);
+ 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);
@@ -1867,7 +1867,7 @@ void copyscrollbitmap_trans(bitmap_t *dest, bitmap_t *src, UINT32 numrows, const
/* NULL clip means use the full bitmap */
if (cliprect == NULL)
- cliprect = &dest->cliprect;
+ cliprect = &dest->cliprect();
/* fully scrolling X,Y playfield */
if (numrows <= 1 && numcols <= 1)
@@ -1877,8 +1877,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);
}
@@ -1890,8 +1890,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)
@@ -1906,15 +1906,15 @@ 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;
subclip.max_x = (col + groupcols) * colwidth - 1 + sx;
- sect_rect(&subclip, cliprect);
+ 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);
}
}
@@ -1928,8 +1928,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)
@@ -1944,15 +1944,15 @@ 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;
subclip.max_y = (row + grouprows) * rowheight - 1 + sy;
- sect_rect(&subclip, cliprect);
+ 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);
}
}
@@ -1977,12 +1977,12 @@ void copyrozbitmap(bitmap_t *dest, const rectangle *cliprect, bitmap_t *src, INT
assert(dest != NULL);
assert(src != NULL);
- assert(dest->bpp == 8 || dest->bpp == 16 || dest->bpp == 32);
- assert(src->bpp == dest->bpp);
+ 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);
@@ -2002,12 +2002,12 @@ void copyrozbitmap_trans(bitmap_t *dest, const rectangle *cliprect, bitmap_t *sr
assert(dest != NULL);
assert(src != NULL);
- assert(dest->bpp == 8 || dest->bpp == 16 || dest->bpp == 32);
- assert(src->bpp == dest->bpp);
+ 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/drawgfxm.h b/src/emu/drawgfxm.h
index 19e2a4fc98f..f4b5f3f58ca 100644
--- a/src/emu/drawgfxm.h
+++ b/src/emu/drawgfxm.h
@@ -61,7 +61,7 @@ typedef struct { char dummy[3]; } NO_PRIORITY;
/* 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) ? BITMAP_ADDR(p, 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)
@@ -370,7 +370,7 @@ while (0) \
#define DRAWGFX_CORE(PIXEL_TYPE, PIXEL_OP, PRIORITY_TYPE) \
do { \
- g_profiler.start(PROFILER_DRAWGFX); \
+ g_profiler.start(PROFILER_DRAWGFX); \
do { \
const UINT8 *srcdata; \
INT32 destendx, destendy; \
@@ -382,16 +382,16 @@ do { \
assert(gfx != NULL); \
assert(!PRIORITY_VALID(PRIORITY_TYPE) || priority != NULL); \
assert(cliprect == NULL || cliprect->min_x >= 0); \
- assert(cliprect == NULL || cliprect->max_x < dest->width); \
+ assert(cliprect == NULL || cliprect->max_x < dest->width()); \
assert(cliprect == NULL || cliprect->min_y >= 0); \
- assert(cliprect == NULL || cliprect->max_y < dest->height); \
+ assert(cliprect == NULL || cliprect->max_y < dest->height()); \
\
/* NULL clip means use the full bitmap */ \
if (cliprect == NULL) \
- cliprect = &dest->cliprect; \
+ cliprect = &dest->cliprect(); \
\
/* ignore empty/invalid cliprects */ \
- if (cliprect->min_x > cliprect->max_x || cliprect->min_y > cliprect->max_y) \
+ if (cliprect->empty()) \
break; \
\
/* compute final pixel in X and exit if we are entirely clipped */ \
@@ -460,7 +460,7 @@ do { \
for (cury = desty; cury <= destendy; cury++) \
{ \
PRIORITY_TYPE *priptr = PRIORITY_ADDR(priority, PRIORITY_TYPE, cury, destx); \
- PIXEL_TYPE *destptr = BITMAP_ADDR(dest, PIXEL_TYPE, cury, destx); \
+ PIXEL_TYPE *destptr = &dest->pix<PIXEL_TYPE>(cury, destx); \
const UINT8 *srcptr = srcdata; \
srcdata += dy; \
\
@@ -495,7 +495,7 @@ do { \
for (cury = desty; cury <= destendy; cury++) \
{ \
PRIORITY_TYPE *priptr = PRIORITY_ADDR(priority, PRIORITY_TYPE, cury, destx); \
- PIXEL_TYPE *destptr = BITMAP_ADDR(dest, PIXEL_TYPE, cury, destx); \
+ PIXEL_TYPE *destptr = &dest->pix<PIXEL_TYPE>(cury, destx); \
const UINT8 *srcptr = srcdata; \
srcdata += dy; \
\
@@ -542,7 +542,7 @@ do { \
for (cury = desty; cury <= destendy; cury++) \
{ \
PRIORITY_TYPE *priptr = PRIORITY_ADDR(priority, PRIORITY_TYPE, cury, destx); \
- PIXEL_TYPE *destptr = BITMAP_ADDR(dest, PIXEL_TYPE, cury, destx); \
+ PIXEL_TYPE *destptr = &dest->pix<PIXEL_TYPE>(cury, destx); \
const UINT8 *srcptr = srcdata; \
srcdata += dy; \
\
@@ -583,7 +583,7 @@ do { \
for (cury = desty; cury <= destendy; cury++) \
{ \
PRIORITY_TYPE *priptr = PRIORITY_ADDR(priority, PRIORITY_TYPE, cury, destx); \
- PIXEL_TYPE *destptr = BITMAP_ADDR(dest, PIXEL_TYPE, cury, destx); \
+ PIXEL_TYPE *destptr = &dest->pix<PIXEL_TYPE>(cury, destx); \
const UINT8 *srcptr = srcdata; \
srcdata += dy; \
\
@@ -655,16 +655,16 @@ do { \
assert(gfx != NULL); \
assert(!PRIORITY_VALID(PRIORITY_TYPE) || priority != NULL); \
assert(cliprect == NULL || cliprect->min_x >= 0); \
- assert(cliprect == NULL || cliprect->max_x < dest->width); \
+ assert(cliprect == NULL || cliprect->max_x < dest->width()); \
assert(cliprect == NULL || cliprect->min_y >= 0); \
- assert(cliprect == NULL || cliprect->max_y < dest->height); \
+ assert(cliprect == NULL || cliprect->max_y < dest->height()); \
\
/* NULL clip means use the full bitmap */ \
if (cliprect == NULL) \
- cliprect = &dest->cliprect; \
+ cliprect = &dest->cliprect(); \
\
/* ignore empty/invalid cliprects */ \
- if (cliprect->min_x > cliprect->max_x || cliprect->min_y > cliprect->max_y) \
+ if (cliprect->empty()) \
break; \
\
/* compute scaled size */ \
@@ -742,7 +742,7 @@ do { \
for (cury = desty; cury <= destendy; cury++) \
{ \
PRIORITY_TYPE *priptr = PRIORITY_ADDR(priority, PRIORITY_TYPE, cury, destx); \
- PIXEL_TYPE *destptr = BITMAP_ADDR(dest, 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; \
@@ -781,7 +781,7 @@ do { \
for (cury = desty; cury <= destendy; cury++) \
{ \
PRIORITY_TYPE *priptr = PRIORITY_ADDR(priority, PRIORITY_TYPE, cury, destx); \
- PIXEL_TYPE *destptr = BITMAP_ADDR(dest, 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; \
@@ -834,24 +834,24 @@ do { \
assert(src != NULL); \
assert(!PRIORITY_VALID(PRIORITY_TYPE) || priority != NULL); \
assert(cliprect == NULL || cliprect->min_x >= 0); \
- assert(cliprect == NULL || cliprect->max_x < dest->width); \
+ assert(cliprect == NULL || cliprect->max_x < dest->width()); \
assert(cliprect == NULL || cliprect->min_y >= 0); \
- assert(cliprect == NULL || cliprect->max_y < dest->height); \
+ assert(cliprect == NULL || cliprect->max_y < dest->height()); \
\
/* NULL clip means use the full bitmap */ \
if (cliprect == NULL) \
- cliprect = &dest->cliprect; \
+ cliprect = &dest->cliprect(); \
\
/* ignore empty/invalid cliprects */ \
- if (cliprect->min_x > cliprect->max_x || cliprect->min_y > cliprect->max_y) \
+ if (cliprect->empty()) \
break; \
\
/* 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; \
\
@@ -868,7 +868,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; \
\
@@ -887,14 +887,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; \
} \
\
@@ -903,7 +903,7 @@ do { \
leftovers = (destendx + 1 - destx) - 4 * numblocks; \
\
/* compute the address of the first source pixel of the first row */ \
- srcdata = BITMAP_ADDR(src, PIXEL_TYPE, srcy, srcx); \
+ srcdata = &src->pix<PIXEL_TYPE>(srcy, srcx); \
\
/* non-flipped case */ \
if (!flipx) \
@@ -912,7 +912,7 @@ do { \
for (cury = desty; cury <= destendy; cury++) \
{ \
PRIORITY_TYPE *priptr = PRIORITY_ADDR(priority, PRIORITY_TYPE, cury, destx); \
- PIXEL_TYPE *destptr = BITMAP_ADDR(dest, PIXEL_TYPE, cury, destx); \
+ PIXEL_TYPE *destptr = &dest->pix<PIXEL_TYPE>(cury, destx); \
const PIXEL_TYPE *srcptr = srcdata; \
srcdata += dy; \
\
@@ -947,7 +947,7 @@ do { \
for (cury = desty; cury <= destendy; cury++) \
{ \
PRIORITY_TYPE *priptr = PRIORITY_ADDR(priority, PRIORITY_TYPE, cury, destx); \
- PIXEL_TYPE *destptr = BITMAP_ADDR(dest, PIXEL_TYPE, cury, destx); \
+ PIXEL_TYPE *destptr = &dest->pix<PIXEL_TYPE>(cury, destx); \
const PIXEL_TYPE *srcptr = srcdata; \
srcdata += dy; \
\
@@ -1006,29 +1006,29 @@ do { \
UINT32 numblocks, leftovers; \
INT32 curx, cury; \
\
- g_profiler.start(PROFILER_COPYBITMAP); \
+ g_profiler.start(PROFILER_COPYBITMAP); \
\
assert(dest != NULL); \
assert(src != NULL); \
assert(!PRIORITY_VALID(PRIORITY_TYPE) || priority != NULL); \
assert(cliprect == NULL || cliprect->min_x >= 0); \
- assert(cliprect == NULL || cliprect->max_x < dest->width); \
+ assert(cliprect == NULL || cliprect->max_x < dest->width()); \
assert(cliprect == NULL || cliprect->min_y >= 0); \
- assert(cliprect == NULL || cliprect->max_y < dest->height); \
- assert(!wraparound || (src->width & (src->width - 1)) == 0); \
- assert(!wraparound || (src->height & (src->height - 1)) == 0); \
+ assert(cliprect == NULL || cliprect->max_y < dest->height()); \
+ assert(!wraparound || (src->width() & (src->width() - 1)) == 0); \
+ assert(!wraparound || (src->height() & (src->height() - 1)) == 0); \
\
/* NULL clip means use the full bitmap */ \
if (cliprect == NULL) \
- cliprect = &dest->cliprect; \
+ cliprect = &dest->cliprect(); \
\
/* ignore empty/invalid cliprects */ \
- if (cliprect->min_x > cliprect->max_x || cliprect->min_y > cliprect->max_y) \
+ 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; \
@@ -1048,7 +1048,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 = BITMAP_ADDR(dest, 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; \
@@ -1058,7 +1058,7 @@ do { \
/* check srcy for the whole row at once */ \
if ((UINT32)srcy < srcfixheight) \
{ \
- srcptr = BITMAP_ADDR(src, PIXEL_TYPE, srcy >> 16, 0); \
+ srcptr = &src->pix<PIXEL_TYPE>(srcy >> 16); \
\
/* iterate over unrolled blocks of 4 */ \
for (curx = 0; curx < numblocks; curx++) \
@@ -1109,8 +1109,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 = BITMAP_ADDR(dest, PIXEL_TYPE, cury, cliprect->min_x); \
- const PIXEL_TYPE *srcptr = BITMAP_ADDR(src, PIXEL_TYPE, starty >> 16, 0); \
+ 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; \
@@ -1156,7 +1156,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 = BITMAP_ADDR(dest, 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; \
@@ -1169,7 +1169,7 @@ do { \
{ \
if ((UINT32)srcx < srcfixwidth && (UINT32)srcy < srcfixheight) \
{ \
- srcptr = BITMAP_ADDR(src, 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; \
@@ -1177,7 +1177,7 @@ do { \
\
if ((UINT32)srcx < srcfixwidth && (UINT32)srcy < srcfixheight) \
{ \
- srcptr = BITMAP_ADDR(src, 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; \
@@ -1185,7 +1185,7 @@ do { \
\
if ((UINT32)srcx < srcfixwidth && (UINT32)srcy < srcfixheight) \
{ \
- srcptr = BITMAP_ADDR(src, 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; \
@@ -1193,7 +1193,7 @@ do { \
\
if ((UINT32)srcx < srcfixwidth && (UINT32)srcy < srcfixheight) \
{ \
- srcptr = BITMAP_ADDR(src, 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; \
@@ -1208,7 +1208,7 @@ do { \
{ \
if ((UINT32)srcx < srcfixwidth && (UINT32)srcy < srcfixheight) \
{ \
- srcptr = BITMAP_ADDR(src, 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; \
@@ -1232,7 +1232,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 = BITMAP_ADDR(dest, 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; \
@@ -1243,22 +1243,22 @@ do { \
/* iterate over unrolled blocks of 4 */ \
for (curx = 0; curx < numblocks; curx++) \
{ \
- srcptr = BITMAP_ADDR(src, 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 = BITMAP_ADDR(src, 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 = BITMAP_ADDR(src, 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 = BITMAP_ADDR(src, 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; \
@@ -1270,7 +1270,7 @@ do { \
/* iterate over leftover pixels */ \
for (curx = 0; curx < leftovers; curx++) \
{ \
- srcptr = BITMAP_ADDR(src, 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; \
@@ -1304,15 +1304,15 @@ do { \
do { \
assert(bitmap != NULL); \
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); \
\
{ \
PRIORITY_TYPE *priptr = PRIORITY_ADDR(priority, PRIORITY_TYPE, desty, destx); \
- PIXEL_TYPE *destptr = BITMAP_ADDR(bitmap, PIXEL_TYPE, desty, destx); \
+ PIXEL_TYPE *destptr = &bitmap->pix<PIXEL_TYPE>(desty, destx); \
\
/* iterate over unrolled blocks of 4 */ \
while (length >= 4) \
@@ -1359,13 +1359,13 @@ do { \
do { \
assert(bitmap != NULL); \
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_ADDR(bitmap, 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/emu.h b/src/emu/emu.h
index 5135b990f7b..2086a03952a 100644
--- a/src/emu/emu.h
+++ b/src/emu/emu.h
@@ -49,6 +49,9 @@
#ifndef __EMU_H__
#define __EMU_H__
+// turn off legacy bitmap addressing macros
+#define BITMAP_DISABLE_LEGACY_MACROS
+
// core emulator headers -- must be first
#include "emucore.h"
#include "emutempl.h"
diff --git a/src/emu/machine/laserdsc.h b/src/emu/machine/laserdsc.h
index 09a3549d1b7..62f3ffcb7e6 100644
--- a/src/emu/machine/laserdsc.h
+++ b/src/emu/machine/laserdsc.h
@@ -78,7 +78,10 @@ struct _laserdisc_config
/* overlay information */
screen_update_func overupdate;
UINT32 overwidth, overheight, overformat;
- rectangle overclip;
+ INT32 overclip_min_x;
+ INT32 overclip_max_x;
+ INT32 overclip_min_y;
+ INT32 overclip_max_y;
float overposx, overposy;
float overscalex, overscaley;
};
@@ -107,10 +110,10 @@ struct _laserdisc_config
MCFG_DEVICE_CONFIG_DATA32(laserdisc_config, overformat, _format)
#define MCFG_LASERDISC_OVERLAY_CLIP(_minx, _maxx, _miny, _maxy) \
- MCFG_DEVICE_CONFIG_DATA32(laserdisc_config, overclip.min_x, _minx) \
- MCFG_DEVICE_CONFIG_DATA32(laserdisc_config, overclip.max_x, _maxx) \
- MCFG_DEVICE_CONFIG_DATA32(laserdisc_config, overclip.min_y, _miny) \
- MCFG_DEVICE_CONFIG_DATA32(laserdisc_config, overclip.max_y, _maxy)
+ MCFG_DEVICE_CONFIG_DATA32(laserdisc_config, overclip_min_x, _minx) \
+ MCFG_DEVICE_CONFIG_DATA32(laserdisc_config, overclip_max_x, _maxx) \
+ MCFG_DEVICE_CONFIG_DATA32(laserdisc_config, overclip_min_y, _miny) \
+ MCFG_DEVICE_CONFIG_DATA32(laserdisc_config, overclip_max_y, _maxy)
#define MCFG_LASERDISC_OVERLAY_POSITION(_posx, _posy) \
MCFG_DEVICE_CONFIG_DATAFP32(laserdisc_config, overposx, _posx, 24) \
diff --git a/src/emu/machine/ldcore.c b/src/emu/machine/ldcore.c
index 399b87022d7..b317417f1f6 100644
--- a/src/emu/machine/ldcore.c
+++ b/src/emu/machine/ldcore.c
@@ -94,7 +94,7 @@ struct _ldcore_data
/* video data */
frame_data frame[3]; /* circular list of frames */
UINT8 videoindex; /* index of the current video buffer */
- bitmap_t videotarget; /* fake target bitmap for decompression */
+ bitmap_t * videotarget; /* fake target bitmap for decompression */
bitmap_t * emptyframe; /* blank frame */
/* audio data */
@@ -217,10 +217,10 @@ INLINE void fillbitmap_yuy16(bitmap_t *bitmap, UINT8 yval, UINT8 cr, UINT8 cb)
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 = (UINT16 *)bitmap->base + y * bitmap->rowpixels;
- 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;
@@ -835,16 +835,8 @@ static void read_track_data(laserdisc_state *ld)
frame->lastfield = tracknum * 2 + fieldnum;
/* set the video target information */
- ldcore->videotarget.alloc = NULL;
- ldcore->videotarget.base = BITMAP_ADDR16(frame->bitmap, fieldnum, 0);
- ldcore->videotarget.rowpixels = frame->bitmap->rowpixels * 2;
- ldcore->videotarget.width = frame->bitmap->width;
- ldcore->videotarget.height = frame->bitmap->height / 2;
- ldcore->videotarget.format = frame->bitmap->format;
- ldcore->videotarget.bpp = frame->bitmap->bpp;
- ldcore->videotarget.palette = frame->bitmap->palette;
- ldcore->videotarget.cliprect = frame->bitmap->cliprect;
- ldcore->avconfig.video = &ldcore->videotarget;
+ ldcore->videotarget = auto_alloc(ld->device->machine(), bitmap_t(&frame->bitmap->pix16(fieldnum), frame->bitmap->width(), frame->bitmap->height() / 2, frame->bitmap->rowpixels() * 2, frame->bitmap->format()));
+ ldcore->avconfig.video = ldcore->videotarget;
/* set the audio target information */
if (ldcore->audiobufin + ldcore->audiomaxsamples <= ldcore->audiobufsize)
@@ -1207,12 +1199,12 @@ SCREEN_UPDATE( laserdisc )
rectangle clip = *cliprect;
/* 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_x = ldcore->config.overclip_min_x;
+ clip.max_x = ldcore->config.overclip_max_x;
+ 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;
+ 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);
}
@@ -1222,10 +1214,11 @@ SCREEN_UPDATE( laserdisc )
/* update the texture with the overlay contents */
if (overbitmap != NULL)
{
- if (overbitmap->format == BITMAP_FORMAT_INDEXED16)
- ldcore->overtex->set_bitmap(overbitmap, &ldcore->config.overclip, TEXFORMAT_PALETTEA16, laserdisc->machine().palette);
- else if (overbitmap->format == BITMAP_FORMAT_RGB32)
- ldcore->overtex->set_bitmap(overbitmap, &ldcore->config.overclip, TEXFORMAT_ARGB32);
+ rectangle overclip(ldcore->config.overclip_min_x, ldcore->config.overclip_max_x, ldcore->config.overclip_min_y, ldcore->config.overclip_max_y);
+ if (overbitmap->format() == BITMAP_FORMAT_INDEXED16)
+ ldcore->overtex->set_bitmap(overbitmap, &overclip, TEXFORMAT_PALETTEA16, laserdisc->machine().palette);
+ else if (overbitmap->format() == BITMAP_FORMAT_RGB32)
+ ldcore->overtex->set_bitmap(overbitmap, &overclip, TEXFORMAT_ARGB32);
}
/* get the laserdisc video */
@@ -1383,10 +1376,10 @@ static void init_video(device_t *device)
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(BITMAP_ADDR16(frame->bitmap, 44, frame->bitmap->width * 8 / 720),
- frame->bitmap->width - 2 * frame->bitmap->width * 8 / 720,
- frame->bitmap->height - 44,
- frame->bitmap->rowpixels, frame->bitmap->format));
+ frame->visbitmap = auto_alloc(device->machine(), bitmap_t(&frame->bitmap->pix16(44, frame->bitmap->width() * 8 / 720),
+ frame->bitmap->width() - 2 * frame->bitmap->width() * 8 / 720,
+ frame->bitmap->height() - 44,
+ frame->bitmap->rowpixels(), frame->bitmap->format()));
}
/* allocate an empty frame of the same size */
@@ -1481,11 +1474,11 @@ static DEVICE_START( laserdisc )
/* copy config data to the live state */
ldcore->config = *config;
- if (ldcore->config.overclip.max_x == ldcore->config.overclip.min_x || ldcore->config.overclip.max_y == ldcore->config.overclip.min_y)
+ if (ldcore->config.overclip_max_x == ldcore->config.overclip_min_x || ldcore->config.overclip_max_y == ldcore->config.overclip_min_y)
{
- ldcore->config.overclip.min_x = ldcore->config.overclip.min_y = 0;
- ldcore->config.overclip.max_x = ldcore->config.overwidth - 1;
- ldcore->config.overclip.max_y = ldcore->config.overheight - 1;
+ ldcore->config.overclip_min_x = ldcore->config.overclip_min_y = 0;
+ ldcore->config.overclip_max_x = ldcore->config.overwidth - 1;
+ ldcore->config.overclip_max_y = ldcore->config.overheight - 1;
}
if (ldcore->config.overscalex == 0)
ldcore->config.overscalex = 1.0f;
diff --git a/src/emu/machine/ldpr8210.c b/src/emu/machine/ldpr8210.c
index 00f05bbef9d..83a93f04d57 100644
--- a/src/emu/machine/ldpr8210.c
+++ b/src/emu/machine/ldpr8210.c
@@ -906,13 +906,13 @@ static void overlay_draw_group(bitmap_t *bitmap, const UINT8 *text, int count, f
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_ADDR16(bitmap, y, xmin >> 8);
+ UINT16 *dest = &bitmap->pix16(y, xmin >> 8);
UINT16 ymin, ymax, yres;
ymax = *dest >> 8;
@@ -944,8 +944,8 @@ static void overlay_erase(bitmap_t *bitmap, float xstart, float xend)
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_ADDR16(bitmap, 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 6c4786cedf7..678504adab9 100644
--- a/src/emu/machine/s3c24xx.c
+++ b/src/emu/machine/s3c24xx.c
@@ -453,7 +453,7 @@ static void s3c24xx_lcd_render_tpal( device_t *device)
UINT32 color = s3c24xx_get_color_tpal( device);
for (int y = s3c24xx->lcd.vpos_min; y <= s3c24xx->lcd.vpos_max; y++)
{
- UINT32 *scanline = BITMAP_ADDR32( bitmap, 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;
@@ -465,7 +465,7 @@ 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_ADDR32( bitmap, s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ 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_ADDR32( bitmap, s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
}
}
}
@@ -497,7 +497,7 @@ 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_ADDR32( bitmap, s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ 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_ADDR32( bitmap, s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
}
}
}
@@ -521,7 +521,7 @@ 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_ADDR32( bitmap, s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ 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_ADDR32( bitmap, s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
}
}
}
@@ -545,7 +545,7 @@ 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_ADDR32( bitmap, s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ 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_ADDR32( bitmap, s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
}
}
}
@@ -569,7 +569,7 @@ 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_ADDR32( bitmap, s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ 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_ADDR32( bitmap, s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
}
}
}
@@ -588,7 +588,7 @@ 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_ADDR32( bitmap, s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ 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_ADDR32( bitmap, s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
}
}
}
@@ -612,7 +612,7 @@ 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_ADDR32( bitmap, s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ 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_ADDR32( bitmap, s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
}
}
}
@@ -636,7 +636,7 @@ 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_ADDR32( bitmap, s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ 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_ADDR32( bitmap, s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
}
}
}
@@ -660,7 +660,7 @@ 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_ADDR32( bitmap, s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ 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_ADDR32( bitmap, s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
}
}
}
@@ -684,7 +684,7 @@ 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_ADDR32( bitmap, s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ 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_ADDR32( bitmap, s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
}
}
}
@@ -708,7 +708,7 @@ 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_ADDR32( bitmap, s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ 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_ADDR32( bitmap, s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
+ scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
}
}
}
@@ -783,12 +783,12 @@ static void s3c24xx_video_start( device_t *device, running_machine &machine)
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_ADDR32( bitmap_src_1, y, 0);
- UINT32 *line1 = BITMAP_ADDR32( bitmap_src_2, y, 0);
- UINT32 *line2 = BITMAP_ADDR32( bitmap_dst, y, 0);
- 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];
diff --git a/src/emu/render.c b/src/emu/render.c
index 98ba35065b5..1ced90dd550 100644
--- a/src/emu/render.c
+++ b/src/emu/render.c
@@ -456,8 +456,8 @@ void render_texture::set_bitmap(bitmap_t *bitmap, const rectangle *sbounds, int
m_bitmap = bitmap;
m_sbounds.min_x = (sbounds != NULL) ? sbounds->min_x : 0;
m_sbounds.min_y = (sbounds != NULL) ? sbounds->min_y : 0;
- m_sbounds.max_x = (sbounds != NULL) ? sbounds->max_x : (bitmap != NULL) ? bitmap->width : 1000;
- m_sbounds.max_y = (sbounds != NULL) ? sbounds->max_y : (bitmap != NULL) ? bitmap->height : 1000;
+ m_sbounds.max_x = (sbounds != NULL) ? sbounds->max_x : (bitmap != NULL) ? bitmap->width() : 1000;
+ m_sbounds.max_y = (sbounds != NULL) ? sbounds->max_y : (bitmap != NULL) ? bitmap->height() : 1000;
m_palette = palette;
m_format = format;
@@ -483,7 +483,7 @@ void render_texture::set_bitmap(bitmap_t *bitmap, const rectangle *sbounds, int
void render_texture::hq_scale(bitmap_t &dest, const bitmap_t &source, const rectangle &sbounds, void *param)
{
render_color color = { 1.0f, 1.0f, 1.0f, 1.0f };
- render_resample_argb_bitmap_hq(dest.base, dest.rowpixels, dest.width, dest.height, &source, &sbounds, &color);
+ render_resample_argb_bitmap_hq(&dest.pix32(0), dest.rowpixels(), dest.width(), dest.height(), &source, &sbounds, &color);
}
@@ -508,8 +508,8 @@ bool render_texture::get_scaled(UINT32 dwidth, UINT32 dheight, render_texinfo &t
// add a reference and set up the source bitmap
primlist.add_reference(m_bitmap);
UINT8 bpp = (m_format == TEXFORMAT_PALETTE16 || m_format == TEXFORMAT_PALETTEA16 || m_format == TEXFORMAT_RGB15 || m_format == TEXFORMAT_YUY16) ? 16 : 32;
- texinfo.base = (UINT8 *)m_bitmap->base + (m_sbounds.min_y * m_bitmap->rowpixels + m_sbounds.min_x) * (bpp / 8);
- texinfo.rowpixels = m_bitmap->rowpixels;
+ texinfo.base = &m_bitmap->pix8(m_sbounds.min_y * bpp / 8, m_sbounds.min_x * bpp / 8);
+ texinfo.rowpixels = m_bitmap->rowpixels();
texinfo.width = swidth;
texinfo.height = sheight;
texinfo.palette = palbase;
@@ -525,7 +525,7 @@ bool render_texture::get_scaled(UINT32 dwidth, UINT32 dheight, render_texinfo &t
scaled = &m_scaled[scalenum];
// we need a non-NULL bitmap with matching dest size
- if (scaled->bitmap != NULL && dwidth == scaled->bitmap->width && dheight == scaled->bitmap->height)
+ if (scaled->bitmap != NULL && dwidth == scaled->bitmap->width() && dheight == scaled->bitmap->height())
break;
}
@@ -558,8 +558,8 @@ bool render_texture::get_scaled(UINT32 dwidth, UINT32 dheight, render_texinfo &t
// finally fill out the new info
primlist.add_reference(scaled->bitmap);
- texinfo.base = scaled->bitmap->base;
- texinfo.rowpixels = scaled->bitmap->rowpixels;
+ texinfo.base = &scaled->bitmap->pix32(0);
+ texinfo.rowpixels = scaled->bitmap->rowpixels();
texinfo.width = dwidth;
texinfo.height = dheight;
texinfo.palette = palbase;
@@ -886,17 +886,17 @@ const rgb_t *render_container::bcg_lookup_table(int texformat, palette_t *palett
void render_container::overlay_scale(bitmap_t &dest, const bitmap_t &source, const rectangle &sbounds, void *param)
{
// simply replicate the source bitmap over the target
- for (int y = 0; y < dest.height; y++)
+ for (int y = 0; y < dest.height(); y++)
{
- UINT32 *src = (UINT32 *)source.base + (y % source.height) * source.rowpixels;
- UINT32 *dst = (UINT32 *)dest.base + y * dest.rowpixels;
+ UINT32 *src = &source.pix32(y % source.height());
+ UINT32 *dst = &dest.pix32(y);
int sx = 0;
// loop over columns
- for (int x = 0; x < dest.width; x++)
+ for (int x = 0; x < dest.width(); x++)
{
*dst++ = src[sx++];
- if (sx >= source.width)
+ if (sx >= source.width())
sx = 0;
}
}
@@ -1355,7 +1355,7 @@ void render_target::compute_minimum_size(INT32 &minwidth, INT32 &minheight)
{
// use a hard-coded default visible area for vector screens
screen_device *screen = curitem->screen();
- const rectangle vectorvis = { 0, 639, 0, 479 };
+ const rectangle vectorvis(0, 639, 0, 479);
const rectangle &visarea = (screen->screen_type() == SCREEN_TYPE_VECTOR) ? vectorvis : screen->visible_area();
// apply target orientation to the bounds
diff --git a/src/emu/rendfont.c b/src/emu/rendfont.c
index c96b155d8a5..d4f3f0b93b1 100644
--- a/src/emu/rendfont.c
+++ b/src/emu/rendfont.c
@@ -200,8 +200,8 @@ void render_font::char_expand(unicode_char chnum, glyph &gl)
}
// populate the bmwidth/bmheight fields
- gl.bmwidth = gl.bitmap->width;
- gl.bmheight = gl.bitmap->height;
+ gl.bmwidth = gl.bitmap->width();
+ gl.bmheight = gl.bitmap->height();
}
// other formats need to parse their data
@@ -213,7 +213,7 @@ void render_font::char_expand(unicode_char chnum, glyph &gl)
// allocate a new bitmap of the size we need
gl.bitmap = auto_alloc(m_manager.machine(), bitmap_t(gl.bmwidth, m_height, BITMAP_FORMAT_ARGB32));
- bitmap_fill(gl.bitmap, NULL, 0);
+ gl.bitmap->fill(0);
// extract the data
const char *ptr = gl.rawdata;
@@ -221,7 +221,7 @@ void render_font::char_expand(unicode_char chnum, glyph &gl)
for (int y = 0; y < gl.bmheight; y++)
{
int desty = y + m_height + m_yoffs - gl.yoffs - gl.bmheight;
- UINT32 *dest = (desty >= 0 && desty < m_height) ? BITMAP_ADDR32(gl.bitmap, desty, 0) : NULL;
+ UINT32 *dest = (desty >= 0 && desty < m_height) ? &gl.bitmap->pix32(desty) : NULL;
// text format
if (m_format == FF_TEXT)
@@ -322,28 +322,19 @@ void render_font::get_scaled_bitmap_and_bounds(bitmap_t &dest, float height, flo
bounds.max_y = bounds.min_y + (float)m_height * scale;
// if the bitmap isn't big enough, bail
- if (dest.width < bounds.max_x - bounds.min_x || dest.height < bounds.max_y - bounds.min_y)
+ if (dest.width() < bounds.max_x - bounds.min_x || dest.height() < bounds.max_y - bounds.min_y)
return;
// if no texture, fill the target
if (gl.texture == NULL)
{
- bitmap_fill(&dest, NULL, 0);
+ dest.fill(0);
return;
}
// scale the font
- INT32 origwidth = dest.width;
- INT32 origheight = dest.height;
- dest.width = bounds.max_x - bounds.min_x;
- dest.height = bounds.max_y - bounds.min_y;
- rectangle clip;
- clip.min_x = clip.min_y = 0;
- clip.max_x = gl.bitmap->width - 1;
- clip.max_y = gl.bitmap->height - 1;
- render_texture::hq_scale(dest, *gl.bitmap, clip, NULL);
- dest.width = origwidth;
- dest.height = origheight;
+ bitmap_t tempbitmap(&dest.pix8(0), bounds.max_x - bounds.min_x, bounds.max_y - bounds.min_y, dest.rowpixels(), dest.format());
+ render_texture::hq_scale(tempbitmap, *gl.bitmap, gl.bitmap->cliprect(), NULL);
}
@@ -748,7 +739,7 @@ bool render_font::save_cached(const char *filename, UINT32 hash)
for (int y = 0; y < gl.bmheight; y++)
{
int desty = y + m_height + m_yoffs - gl.yoffs - gl.bmheight;
- const UINT32 *src = (desty >= 0 && desty < m_height) ? BITMAP_ADDR32(gl.bitmap, desty, 0) : NULL;
+ const UINT32 *src = (desty >= 0 && desty < m_height) ? &gl.bitmap->pix32(desty) : NULL;
for (int x = 0; x < gl.bmwidth; x++)
{
if (src != NULL && RGB_ALPHA(src[x]) != 0)
diff --git a/src/emu/rendlay.c b/src/emu/rendlay.c
index 773589969c0..4367a0a98e8 100644
--- a/src/emu/rendlay.c
+++ b/src/emu/rendlay.c
@@ -551,10 +551,10 @@ void layout_element::element_scale(bitmap_t &dest, const bitmap_t &source, const
{
// get the local scaled bounds
rectangle bounds;
- bounds.min_x = render_round_nearest(curcomp->bounds().x0 * dest.width);
- bounds.min_y = render_round_nearest(curcomp->bounds().y0 * dest.height);
- bounds.max_x = render_round_nearest(curcomp->bounds().x1 * dest.width);
- bounds.max_y = render_round_nearest(curcomp->bounds().y1 * dest.height);
+ bounds.min_x = render_round_nearest(curcomp->bounds().x0 * dest.width());
+ bounds.min_y = render_round_nearest(curcomp->bounds().y0 * dest.height());
+ bounds.max_x = render_round_nearest(curcomp->bounds().x1 * dest.width());
+ bounds.max_y = render_round_nearest(curcomp->bounds().y1 * dest.height());
// based on the component type, add to the texture
curcomp->draw(elemtex->m_element->machine(), dest, bounds, elemtex->m_state);
@@ -689,8 +689,8 @@ void layout_element::component::draw(running_machine &machine, bitmap_t &dest, c
if (m_bitmap == NULL)
m_bitmap = load_bitmap();
render_resample_argb_bitmap_hq(
- BITMAP_ADDR32(&dest, bounds.min_y, bounds.min_x),
- dest.rowpixels,
+ &dest.pix32(bounds.min_y, bounds.min_x),
+ dest.rowpixels(),
bounds.max_x - bounds.min_x,
bounds.max_y - bounds.min_y,
m_bitmap, NULL, &m_color);
@@ -762,14 +762,14 @@ void layout_element::component::draw_rect(bitmap_t &dest, const rectangle &bound
// if we're translucent, add in the destination pixel contribution
if (inva > 0)
{
- UINT32 dpix = *BITMAP_ADDR32(&dest, y, x);
+ UINT32 dpix = dest.pix32(y, x);
finalr += (RGB_RED(dpix) * inva) >> 8;
finalg += (RGB_GREEN(dpix) * inva) >> 8;
finalb += (RGB_BLUE(dpix) * inva) >> 8;
}
// store the target pixel, dividing the RGBA values by the overall scale factor
- *BITMAP_ADDR32(&dest, y, x) = MAKE_ARGB(0xff, finalr, finalg, finalb);
+ dest.pix32(y, x) = MAKE_ARGB(0xff, finalr, finalg, finalb);
}
}
@@ -814,14 +814,14 @@ void layout_element::component::draw_disk(bitmap_t &dest, const rectangle &bound
// if we're translucent, add in the destination pixel contribution
if (inva > 0)
{
- UINT32 dpix = *BITMAP_ADDR32(&dest, y, x);
+ UINT32 dpix = dest.pix32(y, x);
finalr += (RGB_RED(dpix) * inva) >> 8;
finalg += (RGB_GREEN(dpix) * inva) >> 8;
finalb += (RGB_BLUE(dpix) * inva) >> 8;
}
// store the target pixel, dividing the RGBA values by the overall scale factor
- *BITMAP_ADDR32(&dest, y, x) = MAKE_ARGB(0xff, finalr, finalg, finalb);
+ dest.pix32(y, x) = MAKE_ARGB(0xff, finalr, finalg, finalb);
}
}
}
@@ -853,7 +853,7 @@ void layout_element::component::draw_text(running_machine &machine, bitmap_t &de
INT32 curx = bounds.min_x + (bounds.max_x - bounds.min_x - width) / 2;
// allocate a temporary bitmap
- bitmap_t *tempbitmap = global_alloc(bitmap_t(dest.width, dest.height, BITMAP_FORMAT_ARGB32));
+ bitmap_t *tempbitmap = global_alloc(bitmap_t(dest.width(), dest.height(), BITMAP_FORMAT_ARGB32));
// loop over characters
for (const char *s = m_string; *s != 0; s++)
@@ -868,8 +868,8 @@ void layout_element::component::draw_text(running_machine &machine, bitmap_t &de
int effy = bounds.min_y + y;
if (effy >= bounds.min_y && effy <= bounds.max_y)
{
- UINT32 *src = BITMAP_ADDR32(tempbitmap, y, 0);
- UINT32 *d = BITMAP_ADDR32(&dest, effy, 0);
+ UINT32 *src = &tempbitmap->pix32(y);
+ UINT32 *d = &dest.pix32(effy);
for (int x = 0; x < chbounds.max_x - chbounds.min_x; x++)
{
int effx = curx + x + chbounds.min_x;
@@ -924,10 +924,10 @@ bitmap_t *layout_element::component::load_bitmap()
{
// draw some stripes in the bitmap
bitmap = global_alloc(bitmap_t(100, 100, BITMAP_FORMAT_ARGB32));
- bitmap_fill(bitmap, NULL, 0);
+ bitmap->fill(0);
for (int step = 0; step < 100; step += 25)
for (int line = 0; line < 100; line++)
- *BITMAP_ADDR32(bitmap, (step + line) % 100, line % 100) = MAKE_ARGB(0xff,0xff,0xff,0xff);
+ bitmap->pix32((step + line) % 100, line % 100) = MAKE_ARGB(0xff,0xff,0xff,0xff);
// log an error
if (!m_alphafile)
@@ -957,7 +957,7 @@ void layout_element::component::draw_led7seg(bitmap_t &dest, const rectangle &bo
// allocate a temporary bitmap for drawing
bitmap_t *tempbitmap = global_alloc(bitmap_t(bmwidth + skewwidth, bmheight, BITMAP_FORMAT_ARGB32));
- bitmap_fill(tempbitmap, NULL, MAKE_ARGB(0xff,0x00,0x00,0x00));
+ tempbitmap->fill(MAKE_ARGB(0xff,0x00,0x00,0x00));
// top bar
draw_segment_horizontal(*tempbitmap, 0 + 2*segwidth/3, bmwidth - 2*segwidth/3, 0 + segwidth/2, segwidth, (pattern & (1 << 0)) ? onpen : offpen);
@@ -987,7 +987,7 @@ void layout_element::component::draw_led7seg(bitmap_t &dest, const rectangle &bo
draw_segment_decimal(*tempbitmap, bmwidth + segwidth/2, bmheight - segwidth/2, segwidth, (pattern & (1 << 7)) ? onpen : offpen);
// resample to the target size
- render_resample_argb_bitmap_hq(dest.base, dest.rowpixels, dest.width, dest.height, tempbitmap, NULL, &m_color);
+ render_resample_argb_bitmap_hq(&dest.pix32(0), dest.rowpixels(), dest.width(), dest.height(), tempbitmap, NULL, &m_color);
global_free(tempbitmap);
}
@@ -1010,7 +1010,7 @@ void layout_element::component::draw_led14seg(bitmap_t &dest, const rectangle &b
// allocate a temporary bitmap for drawing
bitmap_t *tempbitmap = global_alloc(bitmap_t(bmwidth + skewwidth, bmheight, BITMAP_FORMAT_ARGB32));
- bitmap_fill(tempbitmap, NULL, MAKE_ARGB(0xff, 0x00, 0x00, 0x00));
+ tempbitmap->fill(MAKE_ARGB(0xff, 0x00, 0x00, 0x00));
// top bar
draw_segment_horizontal(*tempbitmap,
@@ -1090,7 +1090,7 @@ void layout_element::component::draw_led14seg(bitmap_t &dest, const rectangle &b
apply_skew(*tempbitmap, 40);
// resample to the target size
- render_resample_argb_bitmap_hq(dest.base, dest.rowpixels, dest.width, dest.height, tempbitmap, NULL, &m_color);
+ render_resample_argb_bitmap_hq(&dest.pix32(0), dest.rowpixels(), dest.width(), dest.height(), tempbitmap, NULL, &m_color);
global_free(tempbitmap);
}
@@ -1114,7 +1114,7 @@ void layout_element::component::draw_led14segsc(bitmap_t &dest, const rectangle
// allocate a temporary bitmap for drawing, adding some extra space for the tail
bitmap_t *tempbitmap = global_alloc(bitmap_t(bmwidth + skewwidth, bmheight + segwidth, BITMAP_FORMAT_ARGB32));
- bitmap_fill(tempbitmap, NULL, MAKE_ARGB(0xff, 0x00, 0x00, 0x00));
+ tempbitmap->fill(MAKE_ARGB(0xff, 0x00, 0x00, 0x00));
// top bar
draw_segment_horizontal(*tempbitmap,
@@ -1203,7 +1203,7 @@ void layout_element::component::draw_led14segsc(bitmap_t &dest, const rectangle
draw_segment_decimal(*tempbitmap, bmwidth + segwidth/2, bmheight - segwidth/2, segwidth, (pattern & (1 << 14)) ? onpen : offpen);
// resample to the target size
- render_resample_argb_bitmap_hq(dest.base, dest.rowpixels, dest.width, dest.height, tempbitmap, NULL, &m_color);
+ render_resample_argb_bitmap_hq(&dest.pix32(0), dest.rowpixels(), dest.width(), dest.height(), tempbitmap, NULL, &m_color);
global_free(tempbitmap);
}
@@ -1226,7 +1226,7 @@ void layout_element::component::draw_led16seg(bitmap_t &dest, const rectangle &b
// allocate a temporary bitmap for drawing
bitmap_t *tempbitmap = global_alloc(bitmap_t(bmwidth + skewwidth, bmheight, BITMAP_FORMAT_ARGB32));
- bitmap_fill(tempbitmap, NULL, MAKE_ARGB(0xff, 0x00, 0x00, 0x00));
+ tempbitmap->fill(MAKE_ARGB(0xff, 0x00, 0x00, 0x00));
// top-left bar
draw_segment_horizontal_caps(*tempbitmap,
@@ -1316,7 +1316,7 @@ void layout_element::component::draw_led16seg(bitmap_t &dest, const rectangle &b
apply_skew(*tempbitmap, 40);
// resample to the target size
- render_resample_argb_bitmap_hq(dest.base, dest.rowpixels, dest.width, dest.height, tempbitmap, NULL, &m_color);
+ render_resample_argb_bitmap_hq(&dest.pix32(0), dest.rowpixels(), dest.width(), dest.height(), tempbitmap, NULL, &m_color);
global_free(tempbitmap);
}
@@ -1340,7 +1340,7 @@ void layout_element::component::draw_led16segsc(bitmap_t &dest, const rectangle
// allocate a temporary bitmap for drawing
bitmap_t *tempbitmap = global_alloc(bitmap_t(bmwidth + skewwidth, bmheight + segwidth, BITMAP_FORMAT_ARGB32));
- bitmap_fill(tempbitmap, NULL, MAKE_ARGB(0xff, 0x00, 0x00, 0x00));
+ tempbitmap->fill(MAKE_ARGB(0xff, 0x00, 0x00, 0x00));
// top-left bar
draw_segment_horizontal_caps(*tempbitmap,
@@ -1439,7 +1439,7 @@ void layout_element::component::draw_led16segsc(bitmap_t &dest, const rectangle
apply_skew(*tempbitmap, 40);
// resample to the target size
- render_resample_argb_bitmap_hq(dest.base, dest.rowpixels, dest.width, dest.height, tempbitmap, NULL, &m_color);
+ render_resample_argb_bitmap_hq(&dest.pix32(0), dest.rowpixels(), dest.width(), dest.height(), tempbitmap, NULL, &m_color);
global_free(tempbitmap);
}
@@ -1462,13 +1462,13 @@ void layout_element::component::draw_dotmatrix(bitmap_t &dest, const rectangle &
// allocate a temporary bitmap for drawing
bitmap_t *tempbitmap = global_alloc(bitmap_t(bmwidth, bmheight, BITMAP_FORMAT_ARGB32));
- bitmap_fill(tempbitmap, NULL, MAKE_ARGB(0xff, 0x00, 0x00, 0x00));
+ tempbitmap->fill(MAKE_ARGB(0xff, 0x00, 0x00, 0x00));
for (int i = 0; i < 8; i++)
draw_segment_decimal(*tempbitmap, ((dotwidth/2 )+ (i * dotwidth)), bmheight/2, dotwidth, (pattern & (1 << i))?onpen:offpen);
// resample to the target size
- render_resample_argb_bitmap_hq(dest.base, dest.rowpixels, dest.width, dest.height, tempbitmap, NULL, &m_color);
+ render_resample_argb_bitmap_hq(&dest.pix32(0), dest.rowpixels(), dest.width(), dest.height(), tempbitmap, NULL, &m_color);
global_free(tempbitmap);
}
@@ -1485,8 +1485,8 @@ void layout_element::component::draw_segment_horizontal_caps(bitmap_t &dest, int
// loop over the width of the segment
for (int y = 0; y < width / 2; y++)
{
- UINT32 *d0 = BITMAP_ADDR32(&dest, midy - y, 0);
- UINT32 *d1 = BITMAP_ADDR32(&dest, midy + y, 0);
+ UINT32 *d0 = &dest.pix32(midy - y);
+ UINT32 *d1 = &dest.pix32(midy + y);
int ty = (y < width / 8) ? width / 8 : y;
// loop over the length of the segment
@@ -1518,13 +1518,13 @@ void layout_element::component::draw_segment_vertical_caps(bitmap_t &dest, int m
// loop over the width of the segment
for (int x = 0; x < width / 2; x++)
{
- UINT32 *d0 = BITMAP_ADDR32(&dest, 0, midx - x);
- UINT32 *d1 = BITMAP_ADDR32(&dest, 0, midx + x);
+ UINT32 *d0 = &dest.pix32(0, midx - x);
+ UINT32 *d1 = &dest.pix32(0, midx + x);
int tx = (x < width / 8) ? width / 8 : x;
// loop over the length of the segment
for (int y = miny + ((caps & LINE_CAP_START) ? tx : 0); y < maxy - ((caps & LINE_CAP_END) ? tx : 0); y++)
- d0[y * dest.rowpixels] = d1[y * dest.rowpixels] = color;
+ d0[y * dest.rowpixels()] = d1[y * dest.rowpixels()] = color;
}
}
@@ -1553,14 +1553,14 @@ void layout_element::component::draw_segment_diagonal_1(bitmap_t &dest, int minx
// draw line
for (int x = minx; x < maxx; x++)
- if (x >= 0 && x < dest.width)
+ if (x >= 0 && x < dest.width())
{
- UINT32 *d = BITMAP_ADDR32(&dest, 0, x);
+ UINT32 *d = &dest.pix32(0, x);
int step = (x - minx) * ratio;
for (int y = maxy - width - step; y < maxy - step; y++)
- if (y >= 0 && y < dest.height)
- d[y * dest.rowpixels] = color;
+ if (y >= 0 && y < dest.height())
+ d[y * dest.rowpixels()] = color;
}
}
@@ -1578,14 +1578,14 @@ void layout_element::component::draw_segment_diagonal_2(bitmap_t &dest, int minx
// draw line
for (int x = minx; x < maxx; x++)
- if (x >= 0 && x < dest.width)
+ if (x >= 0 && x < dest.width())
{
- UINT32 *d = BITMAP_ADDR32(&dest, 0, x);
+ UINT32 *d = &dest.pix32(0, x);
int step = (x - minx) * ratio;
for (int y = miny + step; y < miny + step + width; y++)
- if (y >= 0 && y < dest.height)
- d[y * dest.rowpixels] = color;
+ if (y >= 0 && y < dest.height())
+ d[y * dest.rowpixels()] = color;
}
}
@@ -1603,8 +1603,8 @@ void layout_element::component::draw_segment_decimal(bitmap_t &dest, int midx, i
// iterate over y
for (UINT32 y = 0; y <= width; y++)
{
- UINT32 *d0 = BITMAP_ADDR32(&dest, midy - y, 0);
- UINT32 *d1 = BITMAP_ADDR32(&dest, midy + y, 0);
+ UINT32 *d0 = &dest.pix32(midy - y);
+ UINT32 *d1 = &dest.pix32(midy + y);
float xval = width * sqrt(1.0f - (float)(y * y) * ooradius2);
INT32 left, right;
@@ -1632,11 +1632,11 @@ void layout_element::component::draw_segment_comma(bitmap_t &dest, int minx, int
// draw line
for (int x = minx; x < maxx; x++)
{
- UINT32 *d = BITMAP_ADDR32(&dest, 0, x);
+ UINT32 *d = &dest.pix32(0, x);
int step = (x - minx) * ratio;
for (int y = maxy; y < maxy - width - step; y--)
- d[y * dest.rowpixels] = color;
+ d[y * dest.rowpixels()] = color;
}
}
@@ -1647,11 +1647,11 @@ void layout_element::component::draw_segment_comma(bitmap_t &dest, int minx, int
void layout_element::component::apply_skew(bitmap_t &dest, int skewwidth)
{
- for (int y = 0; y < dest.height; y++)
+ for (int y = 0; y < dest.height(); y++)
{
- UINT32 *destrow = BITMAP_ADDR32(&dest, y, 0);
- int offs = skewwidth * (dest.height - y) / dest.height;
- for (int x = dest.width - skewwidth - 1; x >= 0; x--)
+ UINT32 *destrow = &dest.pix32(y);
+ int offs = skewwidth * (dest.height() - y) / dest.height();
+ for (int x = dest.width() - skewwidth - 1; x >= 0; x--)
destrow[x + offs] = destrow[x];
for (int x = 0; x < offs; x++)
destrow[x] = 0;
diff --git a/src/emu/rendutil.c b/src/emu/rendutil.c
index bb8b414907d..bc96b119281 100644
--- a/src/emu/rendutil.c
+++ b/src/emu/rendutil.c
@@ -69,12 +69,12 @@ void render_resample_argb_bitmap_hq(void *dest, UINT32 drowpixels, UINT32 dwidth
else
{
sbounds.min_x = sbounds.min_y = 0;
- sbounds.max_x = source->width;
- sbounds.max_y = source->height;
+ sbounds.max_x = source->width();
+ sbounds.max_y = source->height();
}
/* adjust the source base */
- sbase = (const UINT32 *)source->base + sbounds.min_y * source->rowpixels + sbounds.min_x;
+ sbase = &source->pix32(sbounds.min_y, sbounds.min_x);
/* determine the steppings */
swidth = sbounds.max_x - sbounds.min_x;
@@ -84,9 +84,9 @@ void render_resample_argb_bitmap_hq(void *dest, UINT32 drowpixels, UINT32 dwidth
/* if the source is higher res than the target, use full averaging */
if (dx > 0x1000 || dy > 0x1000)
- resample_argb_bitmap_average((UINT32 *)dest, drowpixels, dwidth, dheight, sbase, source->rowpixels, swidth, sheight, color, dx, dy);
+ resample_argb_bitmap_average((UINT32 *)dest, drowpixels, dwidth, dheight, sbase, source->rowpixels(), swidth, sheight, color, dx, dy);
else
- resample_argb_bitmap_bilinear((UINT32 *)dest, drowpixels, dwidth, dheight, sbase, source->rowpixels, swidth, sheight, color, dx, dy);
+ resample_argb_bitmap_bilinear((UINT32 *)dest, drowpixels, dwidth, dheight, sbase, source->rowpixels(), swidth, sheight, color, dx, dy);
}
@@ -616,7 +616,7 @@ bitmap_t *render_load_png(emu_file &file, const char *dirname, const char *filen
/* alpha case */
else
{
- if (png.width == alphadest->width && png.height == alphadest->height)
+ if (png.width == alphadest->width() && png.height == alphadest->height())
{
bitmap = alphadest;
copy_png_alpha_to_bitmap(bitmap, &png, hasalpha);
@@ -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_ADDR32(bitmap, 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_ADDR32(bitmap, 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_ADDR32(bitmap, 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_ADDR32(bitmap, 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]);
}
}
@@ -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_ADDR32(bitmap, 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_ADDR32(bitmap, 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_ADDR32(bitmap, y, x);
+ rgb_t pixel = bitmap->pix32(y, x);
accumalpha &= *src;
- *BITMAP_ADDR32(bitmap, 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_ADDR32(bitmap, y, x);
+ rgb_t pixel = bitmap->pix32(y, x);
UINT8 alpha = compute_brightness(MAKE_RGB(src[0], src[1], src[2]));
accumalpha &= alpha;
- *BITMAP_ADDR32(bitmap, 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_ADDR32(bitmap, y, x);
+ rgb_t pixel = bitmap->pix32(y, x);
UINT8 alpha = compute_brightness(MAKE_RGB(src[0], src[1], src[2]));
accumalpha &= alpha;
- *BITMAP_ADDR32(bitmap, 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/save.h b/src/emu/save.h
index 49d80d2e31c..b0585f0fb24 100644
--- a/src/emu/save.h
+++ b/src/emu/save.h
@@ -270,7 +270,7 @@ ALLOW_SAVE_TYPE(endianness_t);
template<>
inline void save_manager::save_item(const char *module, const char *tag, int index, bitmap_t &value, const char *name)
{
- save_memory(module, tag, index, name, value.base, value.bpp / 8, value.rowpixels * value.height);
+ save_memory(module, tag, index, name, &value.pix8(0), value.bpp() / 8, value.rowpixels() * value.height());
}
diff --git a/src/emu/screen.c b/src/emu/screen.c
index f974b4d9ab6..ac10a76e043 100644
--- a/src/emu/screen.c
+++ b/src/emu/screen.c
@@ -355,7 +355,7 @@ void screen_device::device_start()
m_burnin = auto_alloc(machine(), bitmap_t(width, height, BITMAP_FORMAT_INDEXED64));
if (m_burnin == NULL)
fatalerror("Error allocating burn-in bitmap for screen at (%dx%d)\n", width, height);
- bitmap_fill(m_burnin, NULL, 0);
+ m_burnin->fill(0);
}
// load the effect overlay
@@ -500,8 +500,8 @@ void screen_device::realloc_screen_bitmaps()
// extract the current width/height from the bitmap
if (m_bitmap[0] != NULL)
{
- curwidth = m_bitmap[0]->width;
- curheight = m_bitmap[0]->height;
+ curwidth = m_bitmap[0]->width();
+ curheight = m_bitmap[0]->height();
}
// if we're too small to contain this width/height, reallocate our bitmaps and textures
@@ -529,9 +529,9 @@ void screen_device::realloc_screen_bitmaps()
// allocate bitmaps
m_bitmap[0] = auto_alloc(machine(), bitmap_t(curwidth, curheight, m_format));
- bitmap_set_palette(m_bitmap[0], machine().palette);
+ m_bitmap[0]->set_palette(machine().palette);
m_bitmap[1] = auto_alloc(machine(), bitmap_t(curwidth, curheight, m_format));
- bitmap_set_palette(m_bitmap[1], machine().palette);
+ m_bitmap[1]->set_palette(machine().palette);
// allocate textures
m_texture[0] = machine().render().texture_alloc();
@@ -909,10 +909,10 @@ void screen_device::update_burnin()
if (srcbitmap == NULL)
return;
- int srcwidth = srcbitmap->width;
- int srcheight = srcbitmap->height;
- int dstwidth = m_burnin->width;
- int dstheight = m_burnin->height;
+ int srcwidth = srcbitmap->width();
+ int srcheight = srcbitmap->height();
+ int dstwidth = m_burnin->width();
+ int dstheight = m_burnin->height();
int xstep = (srcwidth << 16) / dstwidth;
int ystep = (srcheight << 16) / dstheight;
int xstart = ((UINT32)rand() % 32767) * xstep / 32767;
@@ -923,12 +923,12 @@ void screen_device::update_burnin()
// iterate over rows in the destination
for (y = 0, srcy = ystart; y < dstheight; y++, srcy += ystep)
{
- UINT64 *dst = BITMAP_ADDR64(m_burnin, y, 0);
+ UINT64 *dst = &m_burnin->pix64(y);
// handle the 16-bit palettized case
- if (srcbitmap->format == BITMAP_FORMAT_INDEXED16)
+ if (srcbitmap->format() == BITMAP_FORMAT_INDEXED16)
{
- const UINT16 *src = BITMAP_ADDR16(srcbitmap, srcy >> 16, 0);
+ const UINT16 *src = &srcbitmap->pix16(srcy >> 16);
const rgb_t *palette = palette_entry_list_adjusted(machine().palette);
for (x = 0, srcx = xstart; x < dstwidth; x++, srcx += xstep)
{
@@ -938,9 +938,9 @@ void screen_device::update_burnin()
}
// handle the 15-bit RGB case
- else if (srcbitmap->format == BITMAP_FORMAT_RGB15)
+ else if (srcbitmap->format() == BITMAP_FORMAT_RGB15)
{
- const UINT16 *src = BITMAP_ADDR16(srcbitmap, srcy >> 16, 0);
+ const UINT16 *src = &srcbitmap->pix16(srcy >> 16);
for (x = 0, srcx = xstart; x < dstwidth; x++, srcx += xstep)
{
rgb15_t pixel = src[srcx >> 16];
@@ -949,9 +949,9 @@ void screen_device::update_burnin()
}
// handle the 32-bit RGB case
- else if (srcbitmap->format == BITMAP_FORMAT_RGB32)
+ else if (srcbitmap->format() == BITMAP_FORMAT_RGB32)
{
- const UINT32 *src = BITMAP_ADDR32(srcbitmap, srcy >> 16, 0);
+ const UINT32 *src = &srcbitmap->pix32(srcy >> 16);
for (x = 0, srcx = xstart; x < dstwidth; x++, srcx += xstep)
{
rgb_t pixel = src[srcx >> 16];
@@ -973,20 +973,20 @@ void screen_device::finalize_burnin()
// compute the scaled visible region
rectangle scaledvis;
- scaledvis.min_x = m_visarea.min_x * m_burnin->width / m_width;
- scaledvis.max_x = m_visarea.max_x * m_burnin->width / m_width;
- scaledvis.min_y = m_visarea.min_y * m_burnin->height / m_height;
- scaledvis.max_y = m_visarea.max_y * m_burnin->height / m_height;
+ scaledvis.min_x = m_visarea.min_x * m_burnin->width() / m_width;
+ scaledvis.max_x = m_visarea.max_x * m_burnin->width() / m_width;
+ scaledvis.min_y = m_visarea.min_y * m_burnin->height() / m_height;
+ 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));
- int srcwidth = m_burnin->width;
- int srcheight = m_burnin->height;
- int dstwidth = finalmap->width;
- int dstheight = finalmap->height;
+ int srcwidth = m_burnin->width();
+ int srcheight = m_burnin->height();
+ int dstwidth = finalmap->width();
+ int dstheight = finalmap->height();
int xstep = (srcwidth << 16) / dstwidth;
int ystep = (srcheight << 16) / dstheight;
@@ -995,7 +995,7 @@ void screen_device::finalize_burnin()
UINT64 maxval = 0;
for (int y = 0; y < srcheight; y++)
{
- UINT64 *src = BITMAP_ADDR64(m_burnin, y, 0);
+ UINT64 *src = &m_burnin->pix64(y);
for (int x = 0; x < srcwidth; x++)
{
minval = MIN(minval, src[x]);
@@ -1009,8 +1009,8 @@ void screen_device::finalize_burnin()
// now normalize and convert to RGB
for (int y = 0, srcy = 0; y < dstheight; y++, srcy += ystep)
{
- UINT64 *src = BITMAP_ADDR64(m_burnin, srcy >> 16, 0);
- UINT32 *dst = BITMAP_ADDR32(finalmap, y, 0);
+ UINT64 *src = &m_burnin->pix64(srcy >> 16);
+ 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);
diff --git a/src/emu/sound/cdp1864.c b/src/emu/sound/cdp1864.c
index 7fdd811c02d..e19946e8cd7 100644
--- a/src/emu/sound/cdp1864.c
+++ b/src/emu/sound/cdp1864.c
@@ -422,7 +422,7 @@ WRITE8_MEMBER( cdp1864_device::dma_w )
color = (gdata << 2) | (bdata << 1) | rdata;
}
- *BITMAP_ADDR16(m_bitmap, y, sx + x) = color;
+ m_bitmap->pix16(y, sx + x) = color;
data <<= 1;
}
@@ -475,10 +475,10 @@ void cdp1864_device::update_screen(bitmap_t *bitmap, const rectangle *cliprect)
if (m_disp)
{
copybitmap(bitmap, m_bitmap, 0, 0, 0, 0, cliprect);
- bitmap_fill(m_bitmap, cliprect, CDP1864_BACKGROUND_COLOR_SEQUENCE[m_bgcolor] + 8);
+ m_bitmap->fill(CDP1864_BACKGROUND_COLOR_SEQUENCE[m_bgcolor] + 8, *cliprect);
}
else
{
- bitmap_fill(bitmap, cliprect, get_black_pen(machine()));
+ bitmap->fill(get_black_pen(machine()), *cliprect);
}
}
diff --git a/src/emu/sound/cdp1869.c b/src/emu/sound/cdp1869.c
index 5387abdf30a..c158e81a9e5 100644
--- a/src/emu/sound/cdp1869.c
+++ b/src/emu/sound/cdp1869.c
@@ -549,20 +549,20 @@ void cdp1869_device::draw_line(bitmap_t *bitmap, const rectangle *rect, int x, i
{
if (data & 0x80)
{
- *BITMAP_ADDR16(bitmap, y, x) = color;
+ bitmap->pix16(y, x) = color;
if (!m_fresvert)
{
- *BITMAP_ADDR16(bitmap, y + 1, x) = color;
+ bitmap->pix16(y + 1, x) = color;
}
if (!m_freshorz)
{
- *BITMAP_ADDR16(bitmap, y, x + 1) = color;
+ bitmap->pix16(y, x + 1) = color;
if (!m_fresvert)
{
- *BITMAP_ADDR16(bitmap, y + 1, x + 1) = color;
+ bitmap->pix16(y + 1, x + 1) = color;
}
}
}
@@ -934,8 +934,8 @@ void cdp1869_device::update_screen(bitmap_t *bitmap, const rectangle *cliprect)
screen_rect.max_y = CDP1869_SCANLINE_DISPLAY_END_PAL - 1;
}
- sect_rect(&outer, cliprect);
- bitmap_fill(bitmap, &outer, m_bkg);
+ outer &= *cliprect;
+ bitmap->fill(m_bkg, outer);
if (!m_dispoff)
{
diff --git a/src/emu/sound/mos6560.c b/src/emu/sound/mos6560.c
index 52044732397..43615e53e7d 100644
--- a/src/emu/sound/mos6560.c
+++ b/src/emu/sound/mos6560.c
@@ -215,14 +215,14 @@ static void mos6560_draw_character( device_t *device, int ybegin, int yend, int
for (y = ybegin; y <= yend; y++)
{
code = mos6560->dma_read(device->machine(), (mos6560->chargenaddr + ch * mos6560->charheight + y) & 0x3fff);
- *BITMAP_ADDR16(mos6560->bitmap, y + yoff, xoff + 0) = color[code >> 7];
- *BITMAP_ADDR16(mos6560->bitmap, y + yoff, xoff + 1) = color[(code >> 6) & 1];
- *BITMAP_ADDR16(mos6560->bitmap, y + yoff, xoff + 2) = color[(code >> 5) & 1];
- *BITMAP_ADDR16(mos6560->bitmap, y + yoff, xoff + 3) = color[(code >> 4) & 1];
- *BITMAP_ADDR16(mos6560->bitmap, y + yoff, xoff + 4) = color[(code >> 3) & 1];
- *BITMAP_ADDR16(mos6560->bitmap, y + yoff, xoff + 5) = color[(code >> 2) & 1];
- *BITMAP_ADDR16(mos6560->bitmap, y + yoff, xoff + 6) = color[(code >> 1) & 1];
- *BITMAP_ADDR16(mos6560->bitmap, y + yoff, xoff + 7) = color[code & 1];
+ mos6560->bitmap->pix16(y + yoff, xoff + 0) = color[code >> 7];
+ mos6560->bitmap->pix16(y + yoff, xoff + 1) = color[(code >> 6) & 1];
+ mos6560->bitmap->pix16(y + yoff, xoff + 2) = color[(code >> 5) & 1];
+ mos6560->bitmap->pix16(y + yoff, xoff + 3) = color[(code >> 4) & 1];
+ mos6560->bitmap->pix16(y + yoff, xoff + 4) = color[(code >> 3) & 1];
+ mos6560->bitmap->pix16(y + yoff, xoff + 5) = color[(code >> 2) & 1];
+ mos6560->bitmap->pix16(y + yoff, xoff + 6) = color[(code >> 1) & 1];
+ mos6560->bitmap->pix16(y + yoff, xoff + 7) = color[code & 1];
}
}
@@ -239,14 +239,14 @@ static void mos6560_draw_character_multi( device_t *device, int ybegin, int yend
for (y = ybegin; y <= yend; y++)
{
code = mos6560->dma_read(device->machine(), (mos6560->chargenaddr + ch * mos6560->charheight + y) & 0x3fff);
- *BITMAP_ADDR16(mos6560->bitmap, y + yoff, xoff + 0) =
- *BITMAP_ADDR16(mos6560->bitmap, y + yoff, xoff + 1) = color[code >> 6];
- *BITMAP_ADDR16(mos6560->bitmap, y + yoff, xoff + 2) =
- *BITMAP_ADDR16(mos6560->bitmap, y + yoff, xoff + 3) = color[(code >> 4) & 3];
- *BITMAP_ADDR16(mos6560->bitmap, y + yoff, xoff + 4) =
- *BITMAP_ADDR16(mos6560->bitmap, y + yoff, xoff + 5) = color[(code >> 2) & 3];
- *BITMAP_ADDR16(mos6560->bitmap, y + yoff, xoff + 6) =
- *BITMAP_ADDR16(mos6560->bitmap, y + yoff, xoff + 7) = color[code & 3];
+ mos6560->bitmap->pix16(y + yoff, xoff + 0) =
+ mos6560->bitmap->pix16(y + yoff, xoff + 1) = color[code >> 6];
+ mos6560->bitmap->pix16(y + yoff, xoff + 2) =
+ mos6560->bitmap->pix16(y + yoff, xoff + 3) = color[(code >> 4) & 3];
+ mos6560->bitmap->pix16(y + yoff, xoff + 4) =
+ mos6560->bitmap->pix16(y + yoff, xoff + 5) = color[(code >> 2) & 3];
+ mos6560->bitmap->pix16(y + yoff, xoff + 6) =
+ mos6560->bitmap->pix16(y + yoff, xoff + 7) = color[code & 3];
}
}
@@ -269,7 +269,7 @@ static void mos6560_drawlines( device_t *device, int first, int last )
for (line = first; (line < mos6560->ypos) && (line < last); line++)
{
for (j = 0; j < mos6560->total_xsize; j++)
- *BITMAP_ADDR16(mos6560->bitmap, line, j) = mos6560->framecolor;
+ mos6560->bitmap->pix16(line, j) = mos6560->framecolor;
}
for (vline = line - mos6560->ypos; (line < last) && (line < mos6560->ypos + mos6560->ysize);)
@@ -293,7 +293,7 @@ static void mos6560_drawlines( device_t *device, int first, int last )
{
for (i = ybegin; i <= yend; i++)
for (j = 0; j < mos6560->xpos; j++)
- *BITMAP_ADDR16(mos6560->bitmap, yoff + i, j) = mos6560->framecolor;
+ mos6560->bitmap->pix16(yoff + i, j) = mos6560->framecolor;
}
for (xoff = mos6560->xpos; (xoff < mos6560->xpos + mos6560->xsize) && (xoff < mos6560->total_xsize); xoff += 8, offs++)
@@ -339,7 +339,7 @@ static void mos6560_drawlines( device_t *device, int first, int last )
{
for (i = ybegin; i <= yend; i++)
for (j = xoff; j < mos6560->total_xsize; j++)
- *BITMAP_ADDR16(mos6560->bitmap, yoff + i, j) = mos6560->framecolor;
+ mos6560->bitmap->pix16(yoff + i, j) = mos6560->framecolor;
}
if (mos6560->matrix8x16)
@@ -356,7 +356,7 @@ static void mos6560_drawlines( device_t *device, int first, int last )
for (; line < last; line++)
for (j = 0; j < mos6560->total_xsize; j++)
- *BITMAP_ADDR16(mos6560->bitmap, line, j) = mos6560->framecolor;
+ mos6560->bitmap->pix16(line, j) = mos6560->framecolor;
}
diff --git a/src/emu/tilemap.c b/src/emu/tilemap.c
index 889c2aafd0c..5551d9b8157 100644
--- a/src/emu/tilemap.c
+++ b/src/emu/tilemap.c
@@ -889,7 +889,7 @@ g_profiler.start(PROFILER_TILEMAP_DRAW);
/* update the cliprect just for this set of rows */
blit.cliprect.min_y = currow * rowheight + ypos;
blit.cliprect.max_y = nextrow * rowheight - 1 + ypos;
- sect_rect(&blit.cliprect, &original_cliprect);
+ blit.cliprect &= original_cliprect;
/* iterate over X to handle wraparound */
for (xpos = scrollx - tmap->width; xpos <= original_cliprect.max_x; xpos += tmap->width)
@@ -926,7 +926,7 @@ g_profiler.start(PROFILER_TILEMAP_DRAW);
/* update the cliprect just for this set of columns */
blit.cliprect.min_x = curcol * colwidth + xpos;
blit.cliprect.max_x = nextcol * colwidth - 1 + xpos;
- sect_rect(&blit.cliprect, &original_cliprect);
+ blit.cliprect &= original_cliprect;
/* iterate over Y to handle wraparound */
for (ypos = scrolly - tmap->height; ypos <= original_cliprect.max_y; ypos += tmap->height)
@@ -1407,8 +1407,8 @@ static UINT8 tile_draw(tilemap_t *tmap, const UINT8 *pendata, UINT32 x0, UINT32
/* iterate over rows */
for (ty = 0; ty < height; ty++)
{
- UINT16 *pixptr = BITMAP_ADDR16(pixmap, y0, x0);
- UINT8 *flagsptr = BITMAP_ADDR8(flagsmap, y0, x0);
+ UINT16 *pixptr = &pixmap->pix16(y0, x0);
+ UINT8 *flagsptr = &flagsmap->pix8(y0, x0);
int xoffs = 0;
/* pre-advance to the next row */
@@ -1492,7 +1492,7 @@ static UINT8 tile_apply_bitmask(tilemap_t *tmap, const UINT8 *maskdata, UINT32 x
/* iterate over rows */
for (ty = 0; ty < height; ty++)
{
- UINT8 *flagsptr = BITMAP_ADDR8(flagsmap, y0, x0);
+ UINT8 *flagsptr = &flagsmap->pix8(y0, x0);
int xoffs = 0;
/* pre-advance to the next row */
@@ -1541,11 +1541,7 @@ static void configure_blit_parameters(blit_parameters *blit, tilemap_t *tmap, bi
/* otherwise, make one up */
else
- {
- blit->cliprect.min_x = blit->cliprect.min_y = 0;
- blit->cliprect.max_x = dest->width - 1;
- blit->cliprect.max_y = dest->height - 1;
- }
+ blit->cliprect = dest->cliprect();
/* set the priority code and alpha */
blit->tilemap_priority_code = priority | (priority_mask << 8) | (tmap->palette_offset << 16);
@@ -1561,7 +1557,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;
@@ -1644,12 +1640,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 = BITMAP_ADDR8(priority_bitmap, y1, xpos);
+ priority_baseaddr = &priority_bitmap->pix8(y1, xpos);
if (dest != NULL)
{
- dest_bytespp = dest->bpp / 8;
- dest_line_pitch_bytes = dest->rowpixels * dest_bytespp;
- dest_baseaddr = (UINT8 *)dest->base + (y1 * dest->rowpixels + xpos) * dest_bytespp;
+ 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 */
@@ -1659,8 +1655,8 @@ static void tilemap_draw_instance(tilemap_t *tmap, const blit_parameters *blit,
y2 -= ypos;
/* get tilemap pixels */
- source_baseaddr = BITMAP_ADDR16(tmap->pixmap, y1, 0);
- mask_baseaddr = BITMAP_ADDR8(tmap->flagsmap, y1, 0);
+ source_baseaddr = &tmap->pixmap->pix16(y1);
+ mask_baseaddr = &tmap->flagsmap->pix8(y1);
/* get start/stop columns, rounding outward */
mincol = x1 / tmap->tilewidth;
@@ -1732,8 +1728,8 @@ static void tilemap_draw_instance(tilemap_t *tmap, const blit_parameters *blit,
(*blit->draw_opaque)(dest0, source0, x_end - x_start, tmap->machine().pens, pmap0, blit->tilemap_priority_code, blit->alpha);
dest0 = (UINT8 *)dest0 + dest_line_pitch_bytes;
- source0 += tmap->pixmap->rowpixels;
- pmap0 += priority_bitmap->rowpixels;
+ source0 += tmap->pixmap->rowpixels();
+ pmap0 += priority_bitmap->rowpixels();
}
}
@@ -1746,9 +1742,9 @@ static void tilemap_draw_instance(tilemap_t *tmap, const blit_parameters *blit,
(*blit->draw_masked)(dest0, source0, mask0, blit->mask, blit->value, x_end - x_start, tmap->machine().pens, pmap0, blit->tilemap_priority_code, blit->alpha);
dest0 = (UINT8 *)dest0 + dest_line_pitch_bytes;
- source0 += tmap->pixmap->rowpixels;
- mask0 += tmap->flagsmap->rowpixels;
- pmap0 += priority_bitmap->rowpixels;
+ source0 += tmap->pixmap->rowpixels();
+ mask0 += tmap->flagsmap->rowpixels();
+ pmap0 += priority_bitmap->rowpixels();
}
}
}
@@ -1763,9 +1759,9 @@ 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);
- source_baseaddr += tmap->pixmap->rowpixels * (nexty - y);
- mask_baseaddr += tmap->flagsmap->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);
/* increment the Y counter */
@@ -1804,10 +1800,10 @@ static void tilemap_draw_roz_core(tilemap_t *tmap, const blit_parameters *blit,
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;
+ 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;
@@ -1823,7 +1819,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;
@@ -1861,10 +1857,10 @@ static void tilemap_draw_roz_core(tilemap_t *tmap, const blit_parameters *blit,
cy = starty >> 16;
/* get source and priority pointers */
- pri = BITMAP_ADDR8(priority_bitmap, sy, sx);
- src = BITMAP_ADDR16(srcbitmap, cy, 0);
- maskptr = BITMAP_ADDR8(flagsmap, cy, 0);
- dest = (UINT8 *)destbitmap->base + (destbitmap->rowpixels * sy + sx) * destadvance;
+ 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)
@@ -1902,16 +1898,16 @@ static void tilemap_draw_roz_core(tilemap_t *tmap, const blit_parameters *blit,
cy = starty;
/* get dest and priority pointers */
- dest = (UINT8 *)destbitmap->base + (destbitmap->rowpixels * sy + sx) * destadvance;
- pri = BITMAP_ADDR8(priority_bitmap, 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 ((*BITMAP_ADDR8(flagsmap, (cy >> 16) & ymask, (cx >> 16) & xmask) & mask) == value)
+ if ((flagsmap->pix8((cy >> 16) & ymask, (cx >> 16) & xmask) & mask) == value)
{
- ROZ_PLOT_PIXEL(*BITMAP_ADDR16(srcbitmap, (cy >> 16) & ymask, (cx >> 16) & xmask));
+ ROZ_PLOT_PIXEL(srcbitmap->pix16((cy >> 16) & ymask, (cx >> 16) & xmask));
*pri = (*pri & (priority >> 8)) | priority;
}
@@ -1942,17 +1938,17 @@ static void tilemap_draw_roz_core(tilemap_t *tmap, const blit_parameters *blit,
cy = starty;
/* get dest and priority pointers */
- dest = (UINT8 *)destbitmap->base + (destbitmap->rowpixels * sy + sx) * destadvance;
- pri = BITMAP_ADDR8(priority_bitmap, 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 ((*BITMAP_ADDR8(flagsmap, cy >> 16, cx >> 16) & mask) == value)
+ if ((flagsmap->pix8(cy >> 16, cx >> 16) & mask) == value)
{
- ROZ_PLOT_PIXEL(*BITMAP_ADDR16(srcbitmap, cy >> 16, cx >> 16));
+ ROZ_PLOT_PIXEL(srcbitmap->pix16(cy >> 16, cx >> 16));
*pri = (*pri & (priority >> 8)) | priority;
}
diff --git a/src/emu/uigfx.c b/src/emu/uigfx.c
index baeaecdd814..b4796bd4cea 100644
--- a/src/emu/uigfx.c
+++ b/src/emu/uigfx.c
@@ -693,7 +693,7 @@ static void gfxset_update_bitmap(running_machine &machine, ui_gfx_state *state,
cellypix = 1 + ((state->gfxset.rotate[set] & ORIENTATION_SWAP_XY) ? gfx->width : gfx->height);
/* realloc the bitmap if it is too small */
- if (state->bitmap == NULL || state->texture == NULL || state->bitmap->bpp != 32 || state->bitmap->width != cellxpix * xcells || state->bitmap->height != cellypix * ycells)
+ if (state->bitmap == NULL || state->texture == NULL || state->bitmap->bpp() != 32 || state->bitmap->width() != cellxpix * xcells || state->bitmap->height() != cellypix * ycells)
{
/* free the old stuff */
machine.render().texture_free(state->texture);
@@ -718,7 +718,7 @@ static void gfxset_update_bitmap(running_machine &machine, ui_gfx_state *state,
/* make a rect that covers this row */
cellbounds.min_x = 0;
- cellbounds.max_x = state->bitmap->width - 1;
+ cellbounds.max_x = state->bitmap->width() - 1;
cellbounds.min_y = y * cellypix;
cellbounds.max_y = (y + 1) * cellypix - 1;
@@ -740,13 +740,13 @@ static void gfxset_update_bitmap(running_machine &machine, ui_gfx_state *state,
/* otherwise, fill with transparency */
else
- bitmap_fill(state->bitmap, &cellbounds, 0);
+ state->bitmap->fill(0, cellbounds);
}
}
/* otherwise, fill with transparency */
else
- bitmap_fill(state->bitmap, &cellbounds, 0);
+ state->bitmap->fill(0, cellbounds);
}
/* reset the texture to force an update */
@@ -771,7 +771,6 @@ static void gfxset_draw_item(running_machine &machine, const gfx_element *gfx, i
int width = (rotate & ORIENTATION_SWAP_XY) ? gfx->height : gfx->width;
int height = (rotate & ORIENTATION_SWAP_XY) ? gfx->width : gfx->height;
const rgb_t *palette = (machine.total_colors() != 0) ? palette_entry_list_raw(machine.palette) : NULL;
- UINT32 rowpixels = bitmap->rowpixels;
UINT32 palette_mask = ~0;
int x, y;
@@ -786,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 = (UINT32 *)bitmap->base + (dsty + y) * rowpixels + dstx;
+ UINT32 *dest = &bitmap->pix32(dsty + y, dstx);
const UINT8 *src = gfx_element_get_data(gfx, index);
/* loop over columns in the cell */
@@ -1049,7 +1048,7 @@ static void tilemap_update_bitmap(running_machine &machine, ui_gfx_state *state,
{ UINT32 temp = width; width = height; height = temp; }
/* realloc the bitmap if it is too small */
- if (state->bitmap == NULL || state->texture == NULL || state->bitmap->format != screen_format || state->bitmap->width != width || state->bitmap->height != height)
+ if (state->bitmap == NULL || state->texture == NULL || state->bitmap->format() != screen_format || state->bitmap->width() != width || state->bitmap->height() != height)
{
/* free the old stuff */
machine.render().texture_free(state->texture);
diff --git a/src/emu/uimenu.c b/src/emu/uimenu.c
index e47b44d8960..4d20ee6ebc0 100644
--- a/src/emu/uimenu.c
+++ b/src/emu/uimenu.c
@@ -92,7 +92,7 @@ void ui_menu::init(running_machine &machine)
int alpha = 0xff;
if (x < 25) alpha = 0xff * x / 25;
if (x > 256 - 25) alpha = 0xff * (255 - x) / 25;
- *BITMAP_ADDR32(hilight_bitmap, 0, x) = MAKE_ARGB(alpha,0xff,0xff,0xff);
+ hilight_bitmap->pix32(0, x) = MAKE_ARGB(alpha,0xff,0xff,0xff);
}
hilight_texture = machine.render().texture_alloc();
hilight_texture->set_bitmap(hilight_bitmap, NULL, TEXFORMAT_ARGB32);
@@ -1065,21 +1065,21 @@ UINT32 ui_menu::ui_handler(running_machine &machine, render_container *container
void ui_menu::render_triangle(bitmap_t &dest, const bitmap_t &source, const rectangle &sbounds, void *param)
{
- int halfwidth = dest.width / 2;
- int height = dest.height;
+ int halfwidth = dest.width() / 2;
+ int height = dest.height();
int x, y;
/* start with all-transparent */
- bitmap_fill(&dest, NULL, MAKE_ARGB(0x00,0x00,0x00,0x00));
+ dest.fill(MAKE_ARGB(0x00,0x00,0x00,0x00));
/* render from the tip to the bottom */
for (y = 0; y < height; y++)
{
int linewidth = (y * (halfwidth - 1) + (height / 2)) * 255 * 2 / height;
- UINT32 *target = BITMAP_ADDR32(&dest, y, halfwidth);
+ UINT32 *target = &dest.pix32(y, halfwidth);
/* don't antialias if height < 12 */
- if (dest.height < 12)
+ if (dest.height() < 12)
{
int pixels = (linewidth + 254) / 255;
if (pixels % 2 == 0) pixels++;
diff --git a/src/emu/video.c b/src/emu/video.c
index 2b6794c701a..91b94d31143 100644
--- a/src/emu/video.c
+++ b/src/emu/video.c
@@ -411,8 +411,8 @@ void video_manager::begin_recording(const char *name, movie_format format)
info.video_timescale = 1000 * ((machine().primary_screen != NULL) ? ATTOSECONDS_TO_HZ(machine().primary_screen->frame_period().attoseconds) : screen_device::DEFAULT_FRAME_RATE);
info.video_sampletime = 1000;
info.video_numsamples = 0;
- info.video_width = m_snap_bitmap->width;
- info.video_height = m_snap_bitmap->height;
+ info.video_width = m_snap_bitmap->width();
+ info.video_height = m_snap_bitmap->height();
info.video_depth = 24;
info.audio_format = 0;
@@ -1076,7 +1076,7 @@ void video_manager::create_snapshot_bitmap(device_t *screen)
m_snap_target->set_bounds(width, height);
// if we don't have a bitmap, or if it's not the right size, allocate a new one
- if (m_snap_bitmap == NULL || width != m_snap_bitmap->width || height != m_snap_bitmap->height)
+ if (m_snap_bitmap == NULL || width != m_snap_bitmap->width() || height != m_snap_bitmap->height())
{
if (m_snap_bitmap != NULL)
auto_free(machine(), m_snap_bitmap);
@@ -1086,7 +1086,7 @@ void video_manager::create_snapshot_bitmap(device_t *screen)
// render the screen there
render_primitive_list &primlist = m_snap_target->get_primitives();
primlist.acquire_lock();
- rgb888_draw_primitives(primlist, m_snap_bitmap->base, width, height, m_snap_bitmap->rowpixels);
+ rgb888_draw_primitives(primlist, &m_snap_bitmap->pix32(0), width, height, m_snap_bitmap->rowpixels());
primlist.release_lock();
}
@@ -1298,14 +1298,14 @@ void video_assert_out_of_range_pixels(running_machine &machine, bitmap_t *bitmap
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_ADDR16(bitmap, y, 0);
- 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/cdp1861.c b/src/emu/video/cdp1861.c
index 796f9567cce..21fa355b164 100644
--- a/src/emu/video/cdp1861.c
+++ b/src/emu/video/cdp1861.c
@@ -214,7 +214,7 @@ WRITE8_MEMBER( cdp1861_device::dma_w )
for (x = 0; x < 8; x++)
{
int color = BIT(data, 7);
- *BITMAP_ADDR16(m_bitmap, y, sx + x) = color;
+ m_bitmap->pix16(y, sx + x) = color;
data <<= 1;
}
}
@@ -259,6 +259,6 @@ void cdp1861_device::update_screen(bitmap_t *bitmap, const rectangle *cliprect)
}
else
{
- bitmap_fill(bitmap, cliprect, get_black_pen(machine()));
+ bitmap->fill(get_black_pen(machine()), *cliprect);
}
}
diff --git a/src/emu/video/cdp1862.c b/src/emu/video/cdp1862.c
index f1a6b276d39..e2fec905f8c 100644
--- a/src/emu/video/cdp1862.c
+++ b/src/emu/video/cdp1862.c
@@ -171,7 +171,7 @@ WRITE8_MEMBER( cdp1862_device::dma_w )
color = (gd << 2) | (bd << 1) | rd;
}
- *BITMAP_ADDR16(m_bitmap, y, sx + x) = color;
+ m_bitmap->pix16(y, sx + x) = color;
data <<= 1;
}
@@ -216,5 +216,5 @@ WRITE_LINE_MEMBER( cdp1862_device::con_w )
void cdp1862_device::update_screen(bitmap_t *bitmap, const rectangle *cliprect)
{
copybitmap(bitmap, m_bitmap, 0, 0, 0, 0, cliprect);
- bitmap_fill(m_bitmap, cliprect, CDP1862_BACKGROUND_COLOR_SEQUENCE[m_bgcolor] + 8);
+ m_bitmap->fill(CDP1862_BACKGROUND_COLOR_SEQUENCE[m_bgcolor] + 8, *cliprect);
}
diff --git a/src/emu/video/hd44102.c b/src/emu/video/hd44102.c
index 0caccd1bd5b..e38665f4da9 100644
--- a/src/emu/video/hd44102.c
+++ b/src/emu/video/hd44102.c
@@ -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_ADDR16(bitmap, sy, sx) = color;
+ bitmap->pix16(sy, sx) = color;
}
z++;
diff --git a/src/emu/video/hd61830.c b/src/emu/video/hd61830.c
index 4caf1688014..ac2e95a4f90 100644
--- a/src/emu/video/hd61830.c
+++ b/src/emu/video/hd61830.c
@@ -414,7 +414,7 @@ void hd61830_device::draw_scanline(bitmap_t *bitmap, const rectangle *cliprect,
for (int x = 0; x < m_hp; x++)
{
- *BITMAP_ADDR16(bitmap, y, (sx * m_hp) + x) = BIT(data, x);
+ bitmap->pix16(y, (sx * m_hp) + x) = BIT(data, x);
}
}
}
@@ -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_ADDR16(bitmap, sy, sx) = pixel;
+ bitmap->pix16(sy, sx) = pixel;
}
}
}
@@ -549,7 +549,7 @@ void hd61830_device::update_screen(bitmap_t *bitmap, const rectangle *cliprect)
}
else
{
- bitmap_fill(bitmap, cliprect, 0);
+ bitmap->fill(0, *cliprect);
}
m_blink++;
diff --git a/src/emu/video/i8275.c b/src/emu/video/i8275.c
index 135ce4f71c7..8fb18854230 100644
--- a/src/emu/video/i8275.c
+++ b/src/emu/video/i8275.c
@@ -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(bitmap, cliprect, get_black_pen(device->machine()));
+ 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/k053250.c b/src/emu/video/k053250.c
index c7a15ed6c10..9c376cbd09a 100644
--- a/src/emu/video/k053250.c
+++ b/src/emu/video/k053250.c
@@ -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 = BITMAP_ADDR8(priority, linepos, dst_start + dst_offset);
- dst_base = BITMAP_ADDR32(bitmap, 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 = BITMAP_ADDR8(priority, dst_start, linepos + dst_offset);
- dst_base = BITMAP_ADDR32(bitmap, dst_start, linepos + dst_offset);
+ pri_base = &priority->pix8(dst_start, linepos + dst_offset);
+ dst_base = &bitmap->pix32(dst_start, linepos + dst_offset);
}
// generalized
@@ -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/msm6255.c b/src/emu/video/msm6255.c
index 2c67e7c2a52..a5d27fca606 100644
--- a/src/emu/video/msm6255.c
+++ b/src/emu/video/msm6255.c
@@ -344,7 +344,7 @@ void msm6255_device::draw_scanline(bitmap_t *bitmap, const rectangle *cliprect,
for (x = 0; x < hp; x++)
{
- *BITMAP_ADDR16(bitmap, y, (sx * hp) + x) = BIT(data, 7);
+ bitmap->pix16(y, (sx * hp) + x) = BIT(data, 7);
data <<= 1;
}
@@ -432,6 +432,6 @@ void msm6255_device::update_screen(bitmap_t *bitmap, const rectangle *cliprect)
}
else
{
- bitmap_fill(bitmap, cliprect, get_black_pen(machine()));
+ bitmap->fill(get_black_pen(machine()), *cliprect);
}
}
diff --git a/src/emu/video/pc_cga.c b/src/emu/video/pc_cga.c
index 54d42431446..9bf144fdcf3 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_ADDR16(bitmap, y, 0);
+ 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_ADDR16(bitmap, y, 0);
+ 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_ADDR16(bitmap, y, 0);
+ 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_ADDR16(bitmap, y, 0);
+ 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_ADDR16(bitmap, y, 0);
+ 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_ADDR16(bitmap, y, 0);
+ 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_ADDR16(bitmap, y, 0);
+ 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_ADDR16(bitmap, y, 0);
+ 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_ADDR16(bitmap, y, 0);
+ 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_ADDR16(bitmap, y, 0);
+ UINT16 *p = &bitmap->pix16(y);
UINT8 fg = cga.color_select & 0x0F;
int i;
running_machine &machine = device->machine();
@@ -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_ADDR16(bitmap, y, x+i) = Machine->pens[color];
+// bitmap->pix16(y, x+i) = Machine->pens[color];
// values[0]>>=2;
// values[1]>>=2;
// }
@@ -1314,7 +1314,7 @@ static WRITE32_HANDLER( pc_cga32le_w ) { write32le_with_write8_handler(pc_cga8_w
// values[1] = values[1] << 1;
// }
//
-// dest = BITMAP_ADDR16(bitmap, 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];
@@ -1417,7 +1417,7 @@ static struct
static MC6845_UPDATE_ROW( pc1512_gfx_4bpp_update_row )
{
UINT8 *videoram = cga.videoram;
- UINT16 *p = BITMAP_ADDR16(bitmap, y, 0);
+ 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 ed6e55c7fb1..76a6d48ac74 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(bitmap, cliprect, 0);
+ bitmap->fill(0, *cliprect);
}
video_update(bitmap);
@@ -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_ADDR16(bitmap, line+h, 0);
+ bitmapline = &bitmap->pix16(line+h);
bits = font[h<<2];
assert(bitmapline);
@@ -1051,7 +1051,7 @@ static void vga_vh_text(bitmap_t *bitmap)
(h<=CRTC_CURSOR_BOTTOM)&&(h<height)&&(line+h<TEXT_LINES);
h++)
{
- plot_box(bitmap, column*width, line+h, width, 1, vga.pens[attr&0xf]);
+ bitmap->plot_box(column*width, line+h, width, 1, vga.pens[attr&0xf]);
}
}
}
@@ -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_ADDR16(bitmap, line, 0);
+ bitmapline = &bitmap->pix16(line);
for (pos=addr, c=0, column=0; column<EGA_COLUMNS; column++, c+=8, pos=(pos+4)&0x3ffff)
{
@@ -1097,7 +1097,7 @@ static void vga_vh_ega(bitmap_t *bitmap)
if (line + i >= LINES)
break;
- newbitmapline = BITMAP_ADDR16(bitmap, line+i, 0);
+ newbitmapline = &bitmap->pix16(line+i);
memcpy(newbitmapline, bitmapline, EGA_COLUMNS * 8 * sizeof(UINT16));
}
}
@@ -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_ADDR16(bitmap, line, 0);
+ 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_ADDR16(bitmap, line, 0);
+ 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/psx.c b/src/emu/video/psx.c
index 59e591db4ee..037e3b4604e 100644
--- a/src/emu/video/psx.c
+++ b/src/emu/video/psx.c
@@ -129,7 +129,7 @@ void psxgpu_device::DebugMesh( int n_coordx, int n_coordy )
if( m_debug.b_clear )
{
- bitmap_fill( m_debug.mesh, NULL , 0x0000);
+ m_debug.mesh->fill(0x0000);
m_debug.b_clear = 0;
}
@@ -225,8 +225,8 @@ void psxgpu_device::DebugMesh( int n_coordx, int n_coordy )
(INT16)n_x.w.h <= width - 1 &&
(INT16)n_y.w.h <= height - 1 )
{
- if( *BITMAP_ADDR16(m_debug.mesh, n_y.w.h, n_x.w.h) != 0xffff )
- *BITMAP_ADDR16(m_debug.mesh, n_y.w.h, n_x.w.h) = n_colour;
+ if( m_debug.mesh->pix16(n_y.w.h, n_x.w.h) != 0xffff )
+ m_debug.mesh->pix16(n_y.w.h, n_x.w.h) = n_colour;
}
n_x.d += n_dx;
n_y.d += n_dy;
@@ -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( bitmap, cliprect , 0);
+ 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_ADDR16(bitmap, 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/s2636.c b/src/emu/video/s2636.c
index fa20ac6c4a2..4135e88d44a 100644
--- a/src/emu/video/s2636.c
+++ b/src/emu/video/s2636.c
@@ -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_ADDR16(bitmap, ty, tx) = 0x08 | *BITMAP_ADDR16(bitmap, ty, tx) | color;
+ bitmap->pix16(ty, tx) = 0x08 | bitmap->pix16(ty, tx) | color;
else
- *BITMAP_ADDR16(bitmap, ty, tx) = 0x08 | color;
+ bitmap->pix16(ty, tx) = 0x08 | color;
}
}
}
@@ -200,7 +200,7 @@ static int check_collision( device_t *device, int spriteno1, int spriteno2, cons
/* TODO: does not check shadow sprites yet */
- bitmap_fill(s2636->collision_bitmap, cliprect, 0);
+ s2636->collision_bitmap->fill(0, *cliprect);
if ((attr1[0x0a] != 0xff) && (attr2[0x0a] != 0xff))
{
@@ -225,7 +225,7 @@ static int check_collision( device_t *device, int spriteno1, int spriteno2, cons
(y < cliprect->min_y) || (y > cliprect->max_y))
continue;
- checksum = checksum + *BITMAP_ADDR16(s2636->collision_bitmap, y, x);
+ checksum = checksum + s2636->collision_bitmap->pix16(y, x);
}
/* black out second sprite */
@@ -239,7 +239,7 @@ static int check_collision( device_t *device, int spriteno1, int spriteno2, cons
(y < cliprect->min_y) || (y > cliprect->max_y))
continue;
- checksum = checksum - *BITMAP_ADDR16(s2636->collision_bitmap, y, x);
+ checksum = checksum - s2636->collision_bitmap->pix16(y, x);
}
}
@@ -260,7 +260,7 @@ bitmap_t *s2636_update( device_t *device, const rectangle *cliprect )
UINT8 collision = 0;
int spriteno;
- bitmap_fill(s2636->bitmap, cliprect, 0);
+ s2636->bitmap->fill(0, *cliprect);
for (spriteno = 0; spriteno < 4; spriteno++)
{
diff --git a/src/emu/video/sed1330.c b/src/emu/video/sed1330.c
index efc85354f7f..47e20ee3f57 100644
--- a/src/emu/video/sed1330.c
+++ b/src/emu/video/sed1330.c
@@ -599,7 +599,7 @@ void sed1330_device::draw_text_scanline(bitmap_t *bitmap, const rectangle *clipr
{
for (x = 0; x < m_crx; x++)
{
- *BITMAP_ADDR16(bitmap, 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_ADDR16(bitmap, y, (sx * m_fx) + x) = 1;
+ bitmap->pix16(y, (sx * m_fx) + x) = 1;
}
}
}
@@ -633,7 +633,7 @@ void sed1330_device::draw_graphics_scanline(bitmap_t *bitmap, const rectangle *c
for (x = 0; x < m_fx; x++)
{
- *BITMAP_ADDR16(bitmap, y, (sx * m_fx) + x) = BIT(data, 7);
+ bitmap->pix16(y, (sx * m_fx) + x) = BIT(data, 7);
data <<= 1;
}
}
diff --git a/src/emu/video/tms9928a.c b/src/emu/video/tms9928a.c
index ede933b2d97..d78bbaeb96c 100644
--- a/src/emu/video/tms9928a.c
+++ b/src/emu/video/tms9928a.c
@@ -276,7 +276,7 @@ void tms9928a_device::device_timer(emu_timer &timer, device_timer_id id, int par
{
int vpos = m_screen->vpos();
UINT16 BackColour = m_Regs[7] & 15;
- UINT16 *p = BITMAP_ADDR16( m_tmpbmp, vpos, 0 );
+ UINT16 *p = &m_tmpbmp->pix16(vpos);
int y = vpos - m_top_border;
diff --git a/src/emu/video/upd3301.c b/src/emu/video/upd3301.c
index 6eb1d770c73..227bd8e8f4b 100644
--- a/src/emu/video/upd3301.c
+++ b/src/emu/video/upd3301.c
@@ -648,6 +648,6 @@ void upd3301_device::update_screen(bitmap_t *bitmap, const rectangle *cliprect)
}
else
{
- bitmap_fill(bitmap, cliprect, get_black_pen(machine()));
+ bitmap->fill(get_black_pen(machine()), *cliprect);
}
}
diff --git a/src/emu/video/v9938.c b/src/emu/video/v9938.c
index f192cd846a7..6ad2272030c 100644
--- a/src/emu/video/v9938.c
+++ b/src/emu/video/v9938.c
@@ -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 = BITMAP_ADDR16(bmp, line*2+((vdp->statReg[2]>>1)&1), 0);
+ ln = &bmp->pix16(line*2+((vdp->statReg[2]>>1)&1));
}
else
{
- ln = BITMAP_ADDR16(bmp, line*2, 0);
- ln2 = BITMAP_ADDR16(bmp, line*2+1, 0);
+ ln = &bmp->pix16(line*2);
+ ln2 = &bmp->pix16(line*2+1);
double_lines = 1;
}
}
else
- ln = BITMAP_ADDR16(bmp, line, 0);
+ ln = &bmp->pix16(line);
if ( !(vdp->contReg[1] & 0x40) || (vdp->statReg[2] & 0x40) )
{
diff --git a/src/emu/video/vector.c b/src/emu/video/vector.c
index f7c35a60c75..eb74e196c07 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));
- bitmap_fill(tex->bitmap, NULL, 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--)
diff --git a/src/emu/video/voodoo.c b/src/emu/video/voodoo.c
index 6375b669519..e1a9510133c 100644
--- a/src/emu/video/voodoo.c
+++ b/src/emu/video/voodoo.c
@@ -341,7 +341,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(bitmap, cliprect, 0);
+ bitmap->fill(0, *cliprect);
return changed;
}
@@ -426,7 +426,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_ADDR32(bitmap, y, 0);
+ UINT32 *dst = &bitmap->pix32(y);
for (x = cliprect->min_x; x <= cliprect->max_x; x++)
dst[x] = v->fbi.pen[src[x]];
}
@@ -448,7 +448,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_ADDR32(bitmap, y, 0);
+ 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/lib/util/avcomp.c b/src/lib/util/avcomp.c
index 0f2af7f68de..7f63ff57b1f 100644
--- a/src/lib/util/avcomp.c
+++ b/src/lib/util/avcomp.c
@@ -328,10 +328,10 @@ avcomp_error avcomp_encode_data(avcomp_state *state, const UINT8 *source, UINT8
videostride = width = height = 0;
if (state->compress.video != NULL)
{
- videostart = (const UINT8 *)state->compress.video->base;
- videostride = state->compress.video->rowpixels * 2;
- width = state->compress.video->width;
- height = state->compress.video->height;
+ videostart = &state->compress.video->pix8(0);
+ videostride = state->compress.video->rowpixels() * 2;
+ width = state->compress.video->width();
+ height = state->compress.video->height();
}
/* data is assumed to be native-endian */
@@ -483,15 +483,15 @@ avcomp_error avcomp_decode_data(avcomp_state *state, const UINT8 *source, UINT32
metastart = state->decompress.metadata;
for (chnum = 0; chnum < channels; chnum++)
audiostart[chnum] = (UINT8 *)state->decompress.audio[chnum];
- videostart = (state->decompress.video != NULL) ? (UINT8 *)state->decompress.video->base : NULL;
- videostride = (state->decompress.video != NULL) ? state->decompress.video->rowpixels * 2 : 0;
+ videostart = (state->decompress.video != NULL) ? &state->decompress.video->pix8(0) : NULL;
+ videostride = (state->decompress.video != NULL) ? state->decompress.video->rowpixels() * 2 : 0;
/* data is assumed to be native-endian */
*(UINT8 *)&betest = 1;
audioxor = videoxor = (betest == 1) ? 1 : 0;
/* verify against sizes */
- if (state->decompress.video != NULL && (state->decompress.video->width < width || state->decompress.video->height < height))
+ if (state->decompress.video != NULL && (state->decompress.video->width() < width || state->decompress.video->height() < height))
return AVCERR_VIDEO_TOO_LARGE;
for (chnum = 0; chnum < channels; chnum++)
if (state->decompress.audio[chnum] != NULL && state->decompress.maxsamples < samples)
diff --git a/src/lib/util/aviio.c b/src/lib/util/aviio.c
index bcd34be2be0..09dfa527036 100644
--- a/src/lib/util/aviio.c
+++ b/src/lib/util/aviio.c
@@ -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 */
@@ -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 */
@@ -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 */
@@ -2345,15 +2345,15 @@ static avi_error soundbuf_flush(avi_file *file, int only_flush_full)
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 = (UINT32 *)bitmap->base + y * bitmap->rowpixels;
+ const UINT32 *source = &bitmap->pix32(y);
UINT8 *dest = data + (stream->height - 1 - y) * stream->width * 3;
for (x = 0; x < width && dest < dataend; x++)
@@ -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 = (UINT16 *)bitmap->base + y * bitmap->rowpixels;
+ UINT16 *dest = &bitmap->pix16(y);
/* switch off the compression */
switch (stream->format)
@@ -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 = (UINT16 *)bitmap->base + y * bitmap->rowpixels;
+ const UINT16 *source = &bitmap->pix16(y);
UINT16 *dest = (UINT16 *)data + y * stream->width;
/* switch off the compression */
@@ -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_ADDR16(bitmap, y, 0);
+ 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_ADDR16(bitmap, y - prevlines, 0);
- UINT16 *dest = BITMAP_ADDR16(bitmap, y, 0);
+ 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/bitmap.c b/src/lib/util/bitmap.c
index 860bc5c07ee..cf870dc632c 100644
--- a/src/lib/util/bitmap.c
+++ b/src/lib/util/bitmap.c
@@ -46,420 +46,230 @@
#endif
-/***************************************************************************
- BITMAP ALLOCATION/CONFIGURATION
-***************************************************************************/
+//**************************************************************************
+// BITMAP ALLOCATION/CONFIGURATION
+//**************************************************************************
-#ifdef __cplusplus
-
-/*-------------------------------------------------
- bitmap_t - basic constructor
--------------------------------------------------*/
+//-------------------------------------------------
+// bitmap_t - basic constructor
+//-------------------------------------------------
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)
{
- /* initialize base fields by hand */
- alloc = NULL;
- base = NULL;
- rowpixels = 0;
- width = 0;
- height = 0;
- format = BITMAP_FORMAT_INVALID;
- bpp = 0;
- palette = NULL;
- cliprect.min_x = cliprect.min_y = 0;
- cliprect.max_x = cliprect.max_y = 0;
}
-bitmap_t::bitmap_t(int _width, int _height, bitmap_format _format, int _xslop, int _yslop)
+//-------------------------------------------------
+// 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_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)
{
- /* initialize base fields by hand */
- alloc = NULL;
- base = NULL;
- rowpixels = (_width + 2 * _xslop + 7) & ~7;
- width = _width;
- height = _height;
- format = _format;
- bpp = bitmap_format_to_bpp(_format);
- palette = NULL;
- cliprect.min_x = cliprect.min_y = 0;
- cliprect.max_x = width - 1;
- cliprect.max_y = height - 1;
-
- /* fail if invalid format */
- if (bpp == 0)
+ // fail if invalid format
+ if (m_bpp == 0)
throw std::bad_alloc();
- /* allocate memory for the bitmap itself */
- size_t allocbytes = rowpixels * (height + 2 * _yslop) * bpp / 8;
- alloc = malloc(allocbytes);
- if (alloc == NULL)
- 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(alloc, 0, allocbytes);
+ // clear to 0 by default
+ memset(m_alloc, 0, allocbytes);
- /* compute the base */
- base = (UINT8 *)alloc + (rowpixels * _yslop + _xslop) * (bpp / 8);
+ // compute the base
+ m_base = m_alloc + (m_rowpixels * yslop + xslop) * (m_bpp / 8);
}
-bitmap_t::bitmap_t(void *_base, int _width, int _height, int _rowpixels, bitmap_format _format)
+//-------------------------------------------------
+// bitmap_t - basic constructor
+//-------------------------------------------------
+
+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)
{
- /* initialize base fields by hand */
- alloc = NULL;
- base = _base;
- rowpixels = _rowpixels;
- width = _width;
- height = _height;
- format = _format;
- bpp = bitmap_format_to_bpp(_format);
- palette = NULL;
- cliprect.min_x = cliprect.min_y = 0;
- cliprect.max_x = width - 1;
- cliprect.max_y = height - 1;
-
- /* fail if invalid format */
- if (bpp == 0)
+ // fail if invalid format
+ if (m_bpp == 0)
throw std::bad_alloc();
}
-/*-------------------------------------------------
- ~bitmap_t - basic destructor
--------------------------------------------------*/
+//-------------------------------------------------
+// ~bitmap_t - basic destructor
+//-------------------------------------------------
bitmap_t::~bitmap_t()
{
- /* dereference the palette */
- if (palette != NULL)
- palette_deref(palette);
-
- /* free any allocated memory */
- if (alloc != NULL)
- free(alloc);
-}
-
-
-/*-------------------------------------------------
- bitmap_alloc -- allocate memory for a new
- bitmap of the given format
--------------------------------------------------*/
-
-bitmap_t *bitmap_alloc(int width, int height, bitmap_format format)
-{
- return new bitmap_t(width, height, format);
-}
-
-
-/*-------------------------------------------------
- bitmap_alloc_slop -- allocate a new bitmap with
- additional slop on the borders
--------------------------------------------------*/
-
-bitmap_t *bitmap_alloc_slop(int width, int height, int xslop, int yslop, bitmap_format format)
-{
- return new bitmap_t(width, height, format, xslop, yslop);
-}
-
-
-/*-------------------------------------------------
- bitmap_wrap -- wrap an existing memory buffer
- as a bitmap
--------------------------------------------------*/
-
-bitmap_t *bitmap_wrap(void *base, int width, int height, int rowpixels, bitmap_format format)
-{
- return new bitmap_t(base, width, height, rowpixels, format);
-}
-
-
-/*-------------------------------------------------
- bitmap_free -- release memory allocated for
- a bitmap
--------------------------------------------------*/
-
-void bitmap_free(bitmap_t *bitmap)
-{
- delete bitmap;
-}
-
-#else
-
-/*-------------------------------------------------
- bitmap_alloc -- allocate memory for a new
- bitmap of the given format
--------------------------------------------------*/
-
-bitmap_t *bitmap_alloc(int width, int height, bitmap_format format)
-{
- return bitmap_alloc_slop(width, height, 0, 0, format);
-}
-
-
-/*-------------------------------------------------
- bitmap_alloc_slop -- allocate a new bitmap with
- additional slop on the borders
--------------------------------------------------*/
-
-bitmap_t *bitmap_alloc_slop(int width, int height, int xslop, int yslop, bitmap_format format)
-{
- int bpp = bitmap_format_to_bpp(format);
- size_t allocbytes;
- bitmap_t *bitmap;
- int rowpixels;
-
- /* fail if invalid format */
- if (bpp == 0)
- return NULL;
-
- /* allocate the bitmap itself */
- bitmap = (bitmap_t *)malloc(sizeof(*bitmap));
- if (bitmap == NULL)
- return NULL;
- memset(bitmap, 0, sizeof(*bitmap));
-
- /* round the width to a multiple of 8 and add some padding */
- rowpixels = (width + 2 * xslop + 7) & ~7;
-
- /* allocate memory for the bitmap itself */
- allocbytes = rowpixels * (height + 2 * yslop) * bpp / 8;
- bitmap->alloc = malloc(allocbytes);
- if (bitmap->alloc == NULL)
- {
- free(bitmap);
- return NULL;
- }
+ // dereference the palette
+ if (m_palette != NULL)
+ palette_deref(m_palette);
- /* clear to 0 by default */
- memset(bitmap->alloc, 0, allocbytes);
-
- /* fill in the data */
- bitmap->format = format;
- bitmap->width = width;
- bitmap->height = height;
- bitmap->bpp = bpp;
- bitmap->rowpixels = rowpixels;
- bitmap->base = (UINT8 *)bitmap->alloc + (rowpixels * yslop + xslop) * (bpp / 8);
- bitmap->cliprect.min_x = 0;
- bitmap->cliprect.max_x = width - 1;
- bitmap->cliprect.min_y = 0;
- bitmap->cliprect.max_y = height - 1;
-
- return bitmap;
+ // free any allocated memory
+ delete[] m_alloc;
}
-/*-------------------------------------------------
- bitmap_wrap -- wrap an existing memory buffer
- as a bitmap
--------------------------------------------------*/
+//-------------------------------------------------
+// clone_existing -- clone an existing bitmap by
+// copying its fields; the target bitmap does not
+// own the memory
+//-------------------------------------------------
-bitmap_t *bitmap_wrap(void *base, int width, int height, int rowpixels, bitmap_format format)
+void bitmap_t::clone_existing(const bitmap_t &srcbitmap)
{
- int bpp = bitmap_format_to_bpp(format);
- bitmap_t *bitmap;
-
- /* fail if invalid format */
- if (bpp == 0)
- return NULL;
-
- /* allocate memory */
- bitmap = (bitmap_t *)malloc(sizeof(*bitmap));
- if (bitmap == NULL)
- return NULL;
- memset(bitmap, 0, sizeof(*bitmap));
-
- /* fill in the data */
- bitmap->format = format;
- bitmap->width = width;
- bitmap->height = height;
- bitmap->bpp = bpp;
- bitmap->rowpixels = rowpixels;
- bitmap->base = base;
- bitmap->cliprect.min_x = 0;
- bitmap->cliprect.max_x = width - 1;
- bitmap->cliprect.min_y = 0;
- bitmap->cliprect.max_y = height - 1;
-
- return bitmap;
+ // free any allocated storage
+ delete[] m_alloc;
+ m_alloc = NULL;
+
+ // copy relevant fields
+ m_base = srcbitmap.m_base;
+ m_rowpixels = srcbitmap.m_rowpixels;
+ m_width = srcbitmap.m_width;
+ m_height = srcbitmap.m_height;
+ m_format = srcbitmap.m_format;
+ m_bpp = srcbitmap.m_bpp;
+ m_palette = srcbitmap.m_palette;
+ m_cliprect = srcbitmap.m_cliprect;
}
-/*-------------------------------------------------
- bitmap_free -- release memory allocated for
- a bitmap
--------------------------------------------------*/
+//-------------------------------------------------
+// set_palette -- associate a palette with a
+// bitmap
+//-------------------------------------------------
-void bitmap_free(bitmap_t *bitmap)
+void bitmap_t::set_palette(palette_t *palette)
{
- /* dereference the palette */
- if (bitmap->palette != NULL)
- palette_deref(bitmap->palette);
-
- /* free any allocated memory */
- if (bitmap->alloc != NULL)
- free(bitmap->alloc);
-
- /* free the bitmap */
- free(bitmap);
-}
-
-#endif
-
-
-/*-------------------------------------------------
- bitmap_clone_existing -- clone an existing
- bitmap by copying its fields; the target
- bitmap does not own the memory
--------------------------------------------------*/
-
-void bitmap_clone_existing(bitmap_t *bitmap, const bitmap_t *srcbitmap)
-{
- if (bitmap->alloc != NULL)
- free(bitmap->alloc);
- bitmap->alloc = NULL;
-
- bitmap->base = srcbitmap->base;
- bitmap->rowpixels = srcbitmap->rowpixels;
- bitmap->width = srcbitmap->width;
- bitmap->height = srcbitmap->height;
- bitmap->format = srcbitmap->format;
- bitmap->bpp = srcbitmap->bpp;
- bitmap->palette = srcbitmap->palette;
- bitmap->cliprect = srcbitmap->cliprect;
-}
-
-
-/*-------------------------------------------------
- bitmap_set_palette -- associate a palette with
- a bitmap
--------------------------------------------------*/
-
-void bitmap_set_palette(bitmap_t *bitmap, palette_t *palette)
-{
- /* first dereference any existing palette */
- if (bitmap->palette != NULL)
+ // first dereference any existing palette
+ if (m_palette != NULL)
{
- palette_deref(bitmap->palette);
- bitmap->palette = NULL;
+ palette_deref(m_palette);
+ m_palette = NULL;
}
- /* then reference any new palette */
+ // then reference any new palette
if (palette != NULL)
{
palette_ref(palette);
- bitmap->palette = palette;
+ m_palette = palette;
}
}
+//-------------------------------------------------
+// fill -- fill a bitmap with a solid color
+//-------------------------------------------------
-/***************************************************************************
- BITMAP DRAWING
-***************************************************************************/
-
-/*-------------------------------------------------
- bitmap_fill -- fill a bitmap with a solid
- color
--------------------------------------------------*/
-
-void bitmap_fill(bitmap_t *dest, const rectangle *cliprect, UINT32 color)
+void bitmap_t::fill(UINT32 color, const rectangle &cliprect)
{
- rectangle fill = dest->cliprect;
- int x, y;
-
- /* if we have a cliprect, intersect with that */
- if (cliprect != NULL)
- sect_rect(&fill, cliprect);
-
- /* early out if nothing to do */
- if (fill.min_x > fill.max_x || fill.min_y > fill.max_y)
+ // if we have a cliprect, intersect with that
+ rectangle fill = cliprect;
+ fill &= m_cliprect;
+ if (fill.empty())
return;
- /* based on the bpp go from there */
- switch (dest->bpp)
+ // based on the bpp go from there
+ switch (m_bpp)
{
case 8:
- /* 8bpp always uses memset */
- for (y = fill.min_y; y <= fill.max_y; y++)
- memset(BITMAP_ADDR8(dest, y, fill.min_x), (UINT8)color, fill.max_x + 1 - fill.min_x);
+ // 8bpp always uses memset
+ for (INT32 y = fill.min_y; y <= fill.max_y; y++)
+ memset(&pix8(y, fill.min_x), (UINT8)color, fill.max_x + 1 - fill.min_x);
break;
case 16:
- /* 16bpp can use memset if the bytes are equal */
+ // 16bpp can use memset if the bytes are equal
if ((UINT8)(color >> 8) == (UINT8)color)
{
- for (y = fill.min_y; y <= fill.max_y; y++)
- memset(BITMAP_ADDR16(dest, y, fill.min_x), (UINT8)color, (fill.max_x + 1 - fill.min_x) * 2);
+ for (INT32 y = fill.min_y; y <= fill.max_y; y++)
+ memset(&pix16(y, fill.min_x), (UINT8)color, (fill.max_x + 1 - fill.min_x) * 2);
}
else
{
- UINT16 *destrow, *destrow0;
-
- /* Fill the first line the hard way */
- destrow = BITMAP_ADDR16(dest, fill.min_y, 0);
- for (x = fill.min_x; x <= fill.max_x; x++)
+ // Fill the first line the hard way
+ UINT16 *destrow = &pix16(fill.min_y);
+ for (INT32 x = fill.min_x; x <= fill.max_x; x++)
destrow[x] = (UINT16)color;
- /* For the other lines, just copy the first one */
- destrow0 = BITMAP_ADDR16(dest, fill.min_y, fill.min_x);
- for (y = fill.min_y + 1; y <= fill.max_y; y++)
+ // For the other lines, just copy the first one
+ UINT16 *destrow0 = &pix16(fill.min_y, fill.min_x);
+ for (INT32 y = fill.min_y + 1; y <= fill.max_y; y++)
{
- destrow = BITMAP_ADDR16(dest, y, fill.min_x);
+ destrow = &pix16(y, fill.min_x);
memcpy(destrow, destrow0, (fill.max_x + 1 - fill.min_x) * 2);
}
}
break;
case 32:
- /* 32bpp can use memset if the bytes are equal */
+ // 32bpp can use memset if the bytes are equal
if ((UINT8)(color >> 8) == (UINT8)color && (UINT16)(color >> 16) == (UINT16)color)
{
- for (y = fill.min_y; y <= fill.max_y; y++)
- memset(BITMAP_ADDR32(dest, y, fill.min_x), (UINT8)color, (fill.max_x + 1 - fill.min_x) * 4);
+ for (INT32 y = fill.min_y; y <= fill.max_y; y++)
+ memset(&pix32(y, fill.min_x), (UINT8)color, (fill.max_x + 1 - fill.min_x) * 4);
}
else
{
- UINT32 *destrow, *destrow0;
-
- /* Fill the first line the hard way */
- destrow = BITMAP_ADDR32(dest, fill.min_y, 0);
- for (x = fill.min_x; x <= fill.max_x; x++)
+ // Fill the first line the hard way
+ UINT32 *destrow = &pix32(fill.min_y);
+ for (INT32 x = fill.min_x; x <= fill.max_x; x++)
destrow[x] = (UINT32)color;
- /* For the other lines, just copy the first one */
- destrow0 = BITMAP_ADDR32(dest, fill.min_y, fill.min_x);
- for (y = fill.min_y + 1; y <= fill.max_y; y++)
+ // For the other lines, just copy the first one
+ UINT32 *destrow0 = &pix32(fill.min_y, fill.min_x);
+ for (INT32 y = fill.min_y + 1; y <= fill.max_y; y++)
{
- destrow = BITMAP_ADDR32(dest, y, fill.min_x);
+ destrow = &pix32(y, fill.min_x);
memcpy(destrow, destrow0, (fill.max_x + 1 - fill.min_x) * 4);
}
}
break;
case 64:
- /* 64bpp can use memset if the bytes are equal */
+ // 64bpp can use memset if the bytes are equal
if ((UINT8)(color >> 8) == (UINT8)color && (UINT16)(color >> 16) == (UINT16)color)
{
- for (y = fill.min_y; y <= fill.max_y; y++)
- memset(BITMAP_ADDR64(dest, y, fill.min_x), (UINT8)color, (fill.max_x + 1 - fill.min_x) * 4);
+ for (INT32 y = fill.min_y; y <= fill.max_y; y++)
+ memset(&pix64(y, fill.min_x), (UINT8)color, (fill.max_x + 1 - fill.min_x) * 8);
}
else
{
- UINT64 *destrow, *destrow0;
-
- /* Fill the first line the hard way */
- destrow = BITMAP_ADDR64(dest, fill.min_y, 0);
- for (x = fill.min_x; x <= fill.max_x; x++)
+ // Fill the first line the hard way
+ UINT64 *destrow = &pix64(fill.min_y);
+ for (INT32 x = fill.min_x; x <= fill.max_x; x++)
destrow[x] = (UINT64)color;
- /* For the other lines, just copy the first one */
- destrow0 = BITMAP_ADDR64(dest, fill.min_y, fill.min_x);
- for (y = fill.min_y + 1; y <= fill.max_y; y++)
+ // For the other lines, just copy the first one
+ UINT64 *destrow0 = &pix64(fill.min_y, fill.min_x);
+ for (INT32 y = fill.min_y + 1; y <= fill.max_y; y++)
{
- destrow = BITMAP_ADDR64(dest, y, fill.min_x);
+ destrow = &pix64(y, fill.min_x);
memcpy(destrow, destrow0, (fill.max_x + 1 - fill.min_x) * 4);
}
}
@@ -468,19 +278,13 @@ void bitmap_fill(bitmap_t *dest, const rectangle *cliprect, UINT32 color)
}
+//-------------------------------------------------
+// format_to_bpp - given a format, return the bpp
+//-------------------------------------------------
-/***************************************************************************
- BITMAP UTILITIES
-***************************************************************************/
-
-/*-------------------------------------------------
- bitmap_format_to_bpp - given a format, return
- the bpp
--------------------------------------------------*/
-
-int bitmap_format_to_bpp(bitmap_format format)
+UINT8 bitmap_t::format_to_bpp(bitmap_format format)
{
- /* choose a depth for the format */
+ // choose a depth for the format
switch (format)
{
case BITMAP_FORMAT_INDEXED8:
diff --git a/src/lib/util/bitmap.h b/src/lib/util/bitmap.h
index b95f176ebd0..3cde15130fb 100644
--- a/src/lib/util/bitmap.h
+++ b/src/lib/util/bitmap.h
@@ -46,182 +46,130 @@
#include "palette.h"
-/***************************************************************************
- TYPE DEFINITIONS
-***************************************************************************/
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
-/* bitmap_format describes the various bitmap formats we use */
-enum _bitmap_format
+// bitmap_format describes the various bitmap formats we use
+enum bitmap_format
{
- BITMAP_FORMAT_INVALID = 0, /* invalid format */
- BITMAP_FORMAT_INDEXED8, /* 8bpp indexed */
- BITMAP_FORMAT_INDEXED16, /* 16bpp indexed */
- BITMAP_FORMAT_INDEXED32, /* 32bpp indexed */
- BITMAP_FORMAT_INDEXED64, /* 64bpp indexed */
- BITMAP_FORMAT_RGB15, /* 15bpp 5-5-5 RGB */
- BITMAP_FORMAT_RGB32, /* 32bpp 8-8-8 RGB */
- BITMAP_FORMAT_ARGB32, /* 32bpp 8-8-8-8 ARGB */
- BITMAP_FORMAT_YUY16, /* 16bpp 8-8 Y/Cb, Y/Cr in sequence */
+ BITMAP_FORMAT_INVALID = 0, // invalid forma
+ BITMAP_FORMAT_INDEXED8, // 8bpp indexed
+ BITMAP_FORMAT_INDEXED16, // 16bpp indexed
+ BITMAP_FORMAT_INDEXED32, // 32bpp indexed
+ BITMAP_FORMAT_INDEXED64, // 64bpp indexed
+ BITMAP_FORMAT_RGB15, // 15bpp 5-5-5 RGB
+ BITMAP_FORMAT_RGB32, // 32bpp 8-8-8 RGB
+ BITMAP_FORMAT_ARGB32, // 32bpp 8-8-8-8 ARGB
+ BITMAP_FORMAT_YUY16, // 16bpp 8-8 Y/Cb, Y/Cr in sequence
BITMAP_FORMAT_LAST
};
-typedef enum _bitmap_format bitmap_format;
-
-
-/* rectangles describe a bitmap portion */
-typedef struct _rectangle rectangle;
-struct _rectangle
-{
- int min_x; /* minimum X, or left coordinate */
- int max_x; /* maximum X, or right coordinate (inclusive) */
- int min_y; /* minimum Y, or top coordinate */
- int max_y; /* maximum Y, or bottom coordinate (inclusive) */
-};
-/* bitmaps describe a rectangular array of pixels */
-typedef struct _bitmap_base bitmap_base;
-struct _bitmap_base
+// rectangles describe a bitmap portion
+class rectangle
{
- void * alloc; /* pointer to allocated pixel memory */
- void * base; /* pointer to pixel (0,0) (adjusted for padding) */
- int rowpixels; /* pixels per row (including padding) */
- int width; /* width of the bitmap */
- int height; /* height of the bitmap */
- bitmap_format format; /* format of the bitmap */
- int bpp; /* bits per pixel */
- palette_t * palette; /* optional palette */
- rectangle cliprect; /* a clipping rectangle covering the full bitmap */
+public:
+ // construction/destruction
+ rectangle() { }
+ rectangle(INT32 minx, INT32 maxx, INT32 miny, INT32 maxy)
+ : min_x(minx), max_x(maxx), min_y(miny), max_y(maxy) { }
+
+ // compute intersection with another rect
+ rectangle &operator&=(const rectangle &src)
+ {
+ if (src.min_x > min_x) min_x = src.min_x;
+ if (src.max_x < max_x) max_x = src.max_x;
+ if (src.min_y > min_y) min_y = src.min_y;
+ if (src.max_y < max_y) max_y = src.max_y;
+ return *this;
+ }
+
+ // compute union with another rect
+ rectangle &operator|=(const rectangle &src)
+ {
+ if (src.min_x < min_x) min_x = src.min_x;
+ if (src.max_x > max_x) max_x = src.max_x;
+ if (src.min_y < min_y) min_y = src.min_y;
+ if (src.max_y > max_y) max_y = src.max_y;
+ return *this;
+ }
+
+ // other helpers
+ bool empty() const { return (min_x > max_x || min_y > max_y); }
+ bool contains(INT32 x, INT32 y) const { return (x >= min_x && x <= max_x && y >= min_y && y <= max_y); }
+ INT32 width() const { return max_x + 1 - min_x; }
+ INT32 height() const { return max_y + 1 - min_y; }
+ void set(INT32 minx, INT32 maxx, INT32 miny, INT32 maxy) { min_x = minx; max_x = maxx; min_y = miny; max_y = maxy; }
+
+ // internal state
+ INT32 min_x; // minimum X, or left coordinate
+ INT32 max_x; // maximum X, or right coordinate (inclusive)
+ INT32 min_y; // minimum Y, or top coordinate
+ INT32 max_y; // maximum Y, or bottom coordinate (inclusive)
};
-#ifdef __cplusplus
-
-/* class for C++ */
-class bitmap_t : public bitmap_base
+// bitmaps describe a rectangular array of pixels
+class bitmap_t
{
private:
+ // prevent implicit copying
bitmap_t(const bitmap_t &);
bitmap_t &operator=(const bitmap_t &);
public:
+ // construction/destruction
bitmap_t();
- bitmap_t(int _width, int _height, bitmap_format _format, int _xslop = 0, int _yslop = 0);
- bitmap_t(void *_base, int _width, int _height, int _rowpixels, bitmap_format _format);
+ bitmap_t(int width, int height, bitmap_format format, int xslop = 0, int yslop = 0);
+ bitmap_t(void *base, int width, int height, int rowpixels, bitmap_format format);
~bitmap_t();
-};
-
-#else
-
-/* direct map for C */
-typedef bitmap_base bitmap_t;
-
-#endif
-
-
-
-/***************************************************************************
- MACROS
-***************************************************************************/
-
-/* Macros for accessing bitmap pixels */
-#define BITMAP_ADDR(bitmap, type, y, x) \
- ((type *)(bitmap)->base + (y) * (bitmap)->rowpixels + (x))
-
-#define BITMAP_ADDR8(bitmap, y, x) BITMAP_ADDR(bitmap, UINT8, y, x)
-#define BITMAP_ADDR16(bitmap, y, x) BITMAP_ADDR(bitmap, UINT16, y, x)
-#define BITMAP_ADDR32(bitmap, y, x) BITMAP_ADDR(bitmap, UINT32, y, x)
-#define BITMAP_ADDR64(bitmap, y, x) BITMAP_ADDR(bitmap, UINT64, y, x)
-
-
-
-/***************************************************************************
- FUNCTION PROTOTYPES
-***************************************************************************/
-
-
-/* ----- bitmap allocation ----- */
-
-/* allocate a new bitmap of the given dimensions and format */
-bitmap_t *bitmap_alloc(int width, int height, bitmap_format format);
-
-/* allocate a new bitmap with additional slop on the borders */
-bitmap_t *bitmap_alloc_slop(int width, int height, int xslop, int yslop, bitmap_format format);
-
-/* wrap a bitmap object around an existing array of data */
-bitmap_t *bitmap_wrap(void *base, int width, int height, int rowpixels, bitmap_format format);
+
+ // getters
+ UINT32 width() const { return m_width; }
+ UINT32 height() const { return m_height; }
+ UINT32 rowpixels() const { return m_rowpixels; }
+ UINT32 rowbytes() const { return m_rowpixels * m_bpp / 8; }
+ UINT8 bpp() const { return m_bpp; }
+ bitmap_format format() const { return m_format; }
+ palette_t *palette() const { return m_palette; }
+ const rectangle &cliprect() const { return m_cliprect; }
+
+ // helpers
+ void clone_existing(const bitmap_t &srcbitmap);
+ void set_palette(palette_t *palette);
+ void fill(rgb_t color) { fill(color, m_cliprect); }
+ void fill(rgb_t color, const rectangle &cliprect);
+ void plot_box(int x, int y, int width, int height, UINT32 color)
+ {
+ rectangle clip(x, x + width - 1, y, y + height - 1);
+ fill(color, clip);
+ }
+
+ // pixel access
+ template<typename _PixelType>
+ _PixelType &pix(INT32 y, INT32 x = 0) const { return *(reinterpret_cast<_PixelType *>(m_base) + y * m_rowpixels + x); }
+ UINT8 &pix8(INT32 y, INT32 x = 0) const { return *(reinterpret_cast<UINT8 *>(m_base) + y * m_rowpixels + x); }
+ UINT16 &pix16(INT32 y, INT32 x = 0) const { return *(reinterpret_cast<UINT16 *>(m_base) + y * m_rowpixels + x); }
+ UINT32 &pix32(INT32 y, INT32 x = 0) const { return *(reinterpret_cast<UINT32 *>(m_base) + y * m_rowpixels + x); }
+ UINT64 &pix64(INT32 y, INT32 x = 0) const { return *(reinterpret_cast<UINT64 *>(m_base) + y * m_rowpixels + x); }
+ void *raw_pixptr(INT32 y, INT32 x = 0) const { return reinterpret_cast<UINT8 *>(m_base) + (y * m_rowpixels + x) * m_bpp / 8; }
+
+ // static helpers
+ static UINT8 format_to_bpp(bitmap_format format);
-/* associate a palette with a bitmap */
-void bitmap_set_palette(bitmap_t *bitmap, palette_t *palette);
-
-/* free allocated data for a bitmap */
-void bitmap_free(bitmap_t *bitmap);
-
-/* clone an existing bitmap by copying its fields; the target bitmap does not own the memory */
-void bitmap_clone_existing(bitmap_t *bitmap, const bitmap_t *srcbitmap);
-
-
-
-/* ----- bitmap drawing ----- */
-
-/* fill a bitmap with a single color, clipping to the given rectangle */
-void bitmap_fill(bitmap_t *dest, const rectangle *clip, rgb_t color);
-
-
-
-/* ----- bitmap utilities ----- */
-
-/* return the number of bits per pixel for a given bitmap format */
-int bitmap_format_to_bpp(bitmap_format format);
-
-
-
-
-/***************************************************************************
- INLINE FUNCTIONS
-***************************************************************************/
-
-/*-------------------------------------------------
- sect_rect - compute the intersection of two
- rectangles
--------------------------------------------------*/
-
-INLINE void sect_rect(rectangle *dst, const rectangle *src)
-{
- if (src->min_x > dst->min_x) dst->min_x = src->min_x;
- if (src->max_x < dst->max_x) dst->max_x = src->max_x;
- if (src->min_y > dst->min_y) dst->min_y = src->min_y;
- if (src->max_y < dst->max_y) dst->max_y = src->max_y;
-}
-
-
-/*-------------------------------------------------
- union_rect - compute the union of two
- rectangles
--------------------------------------------------*/
-
-INLINE void union_rect(rectangle *dst, const rectangle *src)
-{
- if (src->min_x < dst->min_x) dst->min_x = src->min_x;
- if (src->max_x > dst->max_x) dst->max_x = src->max_x;
- if (src->min_y < dst->min_y) dst->min_y = src->min_y;
- if (src->max_y > dst->max_y) dst->max_y = src->max_y;
-}
-
-
-/*-------------------------------------------------
- plot_box - draw a filled rectangle into a
- bitmap of arbitrary depth
--------------------------------------------------*/
-
-INLINE void plot_box(bitmap_t *bitmap, int x, int y, int width, int height, UINT32 color)
-{
- rectangle clip;
- clip.min_x = x;
- clip.min_y = y;
- clip.max_x = x + width - 1;
- clip.max_y = y + height - 1;
- bitmap_fill(bitmap, &clip, color);
-}
+private:
+ // internal state
+ UINT8 * m_alloc; // pointer to allocated pixel memory
+ void * m_base; // pointer to pixel (0,0) (adjusted for padding)
+ INT32 m_rowpixels; // pixels per row (including padding)
+ INT32 m_width; // width of the bitmap
+ INT32 m_height; // height of the bitmap
+ bitmap_format m_format; // format of the bitmap
+ UINT8 m_bpp; // bits per pixel
+ palette_t * m_palette; // optional palette
+ rectangle m_cliprect; // a clipping rectangle covering the full bitmap
+};
-#endif /* __BITMAP_H__ */
+#endif // __BITMAP_H__
diff --git a/src/lib/util/png.c b/src/lib/util/png.c
index 32a11b5c099..9bfbf770d33 100644
--- a/src/lib/util/png.c
+++ b/src/lib/util/png.c
@@ -43,6 +43,8 @@
#include <zlib.h>
#include "png.h"
+#include <new>
+
/***************************************************************************
TYPE DEFINITIONS
@@ -631,7 +633,7 @@ png_error png_read_bitmap(core_file *fp, bitmap_t **bitmap)
png_expand_buffer_8bit(&png);
/* allocate a bitmap of the appropriate size and copy it */
- *bitmap = bitmap_alloc(png.width, png.height, BITMAP_FORMAT_ARGB32);
+ *bitmap = new(std::nothrow) bitmap_t(png.width, png.height, BITMAP_FORMAT_ARGB32);
if (*bitmap == NULL)
{
png_free(&png);
@@ -648,7 +650,7 @@ png_error png_read_bitmap(core_file *fp, bitmap_t **bitmap)
{
/* determine alpha and expand to 32bpp */
UINT8 alpha = (*src < png.num_trans) ? png.trans[*src] : 0xff;
- *BITMAP_ADDR32(*bitmap, y, x) = (alpha << 24) | (png.palette[*src * 3] << 16) | (png.palette[*src * 3 + 1] << 8) | png.palette[*src * 3 + 2];
+ (*bitmap)->pix32(y, x) = (alpha << 24) | (png.palette[*src * 3] << 16) | (png.palette[*src * 3 + 1] << 8) | png.palette[*src * 3 + 2];
}
}
@@ -657,7 +659,7 @@ png_error png_read_bitmap(core_file *fp, bitmap_t **bitmap)
{
for (y = 0; y < png.height; y++)
for (x = 0; x < png.width; x++, src++)
- *BITMAP_ADDR32(*bitmap, y, x) = 0xff000000 | (*src << 16) | (*src << 8) | *src;
+ (*bitmap)->pix32(y, x) = 0xff000000 | (*src << 16) | (*src << 8) | *src;
}
/* handle 32bpp non-alpha case */
@@ -665,7 +667,7 @@ png_error png_read_bitmap(core_file *fp, bitmap_t **bitmap)
{
for (y = 0; y < png.height; y++)
for (x = 0; x < png.width; x++, src += 3)
- *BITMAP_ADDR32(*bitmap, y, x) = 0xff000000 | (src[0] << 16) | (src[1] << 8) | src[2];
+ (*bitmap)->pix32(y, x) = 0xff000000 | (src[0] << 16) | (src[1] << 8) | src[2];
}
/* handle 32bpp alpha case */
@@ -673,7 +675,7 @@ png_error png_read_bitmap(core_file *fp, bitmap_t **bitmap)
{
for (y = 0; y < png.height; y++)
for (x = 0; x < png.width; x++, src += 4)
- *BITMAP_ADDR32(*bitmap, y, x) = (src[3] << 24) | (src[0] << 16) | (src[1] << 8) | src[2];
+ (*bitmap)->pix32(y, x) = (src[3] << 24) | (src[0] << 16) | (src[1] << 8) | src[2];
}
/* free our temporary data and return */
@@ -908,8 +910,8 @@ static png_error convert_bitmap_to_image_palette(png_info *pnginfo, const bitmap
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;
@@ -941,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 = (UINT16 *)bitmap->base + y * bitmap->rowpixels;
+ UINT16 *src = &bitmap->pix16(y);
UINT8 *dst = pnginfo->image + y * (rowbytes + 1);
/* store the filter byte, then copy the data */
@@ -961,13 +963,13 @@ static png_error convert_bitmap_to_image_palette(png_info *pnginfo, const bitmap
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);
@@ -980,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_ADDR32(bitmap, y, 0);
- UINT16 *src16 = BITMAP_ADDR16(bitmap, y, 0);
+ 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++)
{
@@ -1000,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++)
{
@@ -1012,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++)
{
@@ -1024,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++)
{
@@ -1057,7 +1059,7 @@ static png_error write_png_stream(core_file *fp, png_info *pnginfo, const bitmap
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);
@@ -1150,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
diff --git a/src/mame/drivers/39in1.c b/src/mame/drivers/39in1.c
index f2158318583..d588a2b9b5a 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_ADDR32(bitmap, y, 0);
+ 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 3fc4f2e98d5..2a8473c6730 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(bitmap, cliprect, 0);
+ 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 b153ec1ab04..10e0be2f42b 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_ADDR16( bitmap, 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_ADDR16( bitmap, 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 449f4f71fb9..e8efaeefe31 100644
--- a/src/mame/drivers/acommand.c
+++ b/src/mame/drivers/acommand.c
@@ -205,36 +205,36 @@ static const UINT8 led_fill[0x10] = { 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x
static void draw_led(bitmap_t *bitmap, int x, int y,UINT8 value)
{
- plot_box(bitmap, x, y, 6, 10, 0x00000000);
+ bitmap->plot_box(x, y, 6, 10, 0x00000000);
/*a*/
- *BITMAP_ADDR16(bitmap, y+0, x+1) = ((led_fill[value] & 0x0001) ? LED_ON : LED_OFF);
- *BITMAP_ADDR16(bitmap, y+0, x+2) = ((led_fill[value] & 0x0001) ? LED_ON : LED_OFF);
- *BITMAP_ADDR16(bitmap, 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_ADDR16(bitmap, y+1, x+4) = ((led_fill[value] & 0x0002) ? LED_ON : LED_OFF);
- *BITMAP_ADDR16(bitmap, y+2, x+4) = ((led_fill[value] & 0x0002) ? LED_ON : LED_OFF);
- *BITMAP_ADDR16(bitmap, 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_ADDR16(bitmap, y+5, x+4) = ((led_fill[value] & 0x0004) ? LED_ON : LED_OFF);
- *BITMAP_ADDR16(bitmap, y+6, x+4) = ((led_fill[value] & 0x0004) ? LED_ON : LED_OFF);
- *BITMAP_ADDR16(bitmap, 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_ADDR16(bitmap, y+8, x+1) = ((led_fill[value] & 0x0008) ? LED_ON : LED_OFF);
- *BITMAP_ADDR16(bitmap, y+8, x+2) = ((led_fill[value] & 0x0008) ? LED_ON : LED_OFF);
- *BITMAP_ADDR16(bitmap, 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_ADDR16(bitmap, y+5, x+0) = ((led_fill[value] & 0x0010) ? LED_ON : LED_OFF);
- *BITMAP_ADDR16(bitmap, y+6, x+0) = ((led_fill[value] & 0x0010) ? LED_ON : LED_OFF);
- *BITMAP_ADDR16(bitmap, 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_ADDR16(bitmap, y+1, x+0) = ((led_fill[value] & 0x0020) ? LED_ON : LED_OFF);
- *BITMAP_ADDR16(bitmap, y+2, x+0) = ((led_fill[value] & 0x0020) ? LED_ON : LED_OFF);
- *BITMAP_ADDR16(bitmap, 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_ADDR16(bitmap, y+4, x+1) = ((led_fill[value] & 0x0040) ? LED_ON : LED_OFF);
- *BITMAP_ADDR16(bitmap, y+4, x+2) = ((led_fill[value] & 0x0040) ? LED_ON : LED_OFF);
- *BITMAP_ADDR16(bitmap, 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 6ad7e317661..dfd6980d3b9 100644
--- a/src/mame/drivers/adp.c
+++ b/src/mame/drivers/adp.c
@@ -183,12 +183,12 @@ void adp_state::video_start()
static H63484_DISPLAY_PIXELS( acrtc_display_pixels )
{
- *BITMAP_ADDR16(bitmap, y, x) = data & 0xf;
+ bitmap->pix16(y, x) = data & 0xf;
}
bool adp_state::screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect)
{
- bitmap_fill(&bitmap, &cliprect, 0);
+ bitmap.fill(0, cliprect);
/* graphics */
m_h63484->update_screen(&bitmap, &cliprect);
@@ -216,10 +216,10 @@ static SCREEN_UPDATE( adp )
{
b &= (HD63484_RAM_SIZE - 1);
src = hd63484_ram_r(state->m_hd63484, b, 0xffff);
- *BITMAP_ADDR16(bitmap, y, x ) = ((src & 0x000f) >> 0) << 0;
- *BITMAP_ADDR16(bitmap, y, x + 1) = ((src & 0x00f0) >> 4) << 0;
- *BITMAP_ADDR16(bitmap, y, x + 2) = ((src & 0x0f00) >> 8) << 0;
- *BITMAP_ADDR16(bitmap, 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_ADDR16(bitmap, y, x + sx ) = ((src & 0x000f) >> 0) << 0;
- *BITMAP_ADDR16(bitmap, y, x + sx + 1) = ((src & 0x00f0) >> 4) << 0;
- *BITMAP_ADDR16(bitmap, y, x + sx + 2) = ((src & 0x0f00) >> 8) << 0;
- *BITMAP_ADDR16(bitmap, 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 dba97cd99da..ed074712944 100644
--- a/src/mame/drivers/albazc.c
+++ b/src/mame/drivers/albazc.c
@@ -79,7 +79,7 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
static SCREEN_UPDATE(hanaroku)
{
- bitmap_fill(bitmap, cliprect, 0x1f0); // ???
+ 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 47676185877..8f766880999 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(bitmap,cliprect,get_black_pen(screen.machine()));
+ 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_ADDR32(bitmap, 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_ADDR32(bitmap, 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 4d6d859e0cc..d9868c660cb 100644
--- a/src/mame/drivers/astinvad.c
+++ b/src/mame/drivers/astinvad.c
@@ -140,14 +140,14 @@ static void plot_byte( running_machine &machine, bitmap_t *bitmap, UINT8 y, UINT
pen_t fore_pen = MAKE_RGB(pal1bit(color >> 0), pal1bit(color >> 2), pal1bit(color >> 1));
UINT8 flip_xor = state->m_screen_flip & 7;
- *BITMAP_ADDR32(bitmap, y, x + (0 ^ flip_xor)) = (data & 0x01) ? fore_pen : RGB_BLACK;
- *BITMAP_ADDR32(bitmap, y, x + (1 ^ flip_xor)) = (data & 0x02) ? fore_pen : RGB_BLACK;
- *BITMAP_ADDR32(bitmap, y, x + (2 ^ flip_xor)) = (data & 0x04) ? fore_pen : RGB_BLACK;
- *BITMAP_ADDR32(bitmap, y, x + (3 ^ flip_xor)) = (data & 0x08) ? fore_pen : RGB_BLACK;
- *BITMAP_ADDR32(bitmap, y, x + (4 ^ flip_xor)) = (data & 0x10) ? fore_pen : RGB_BLACK;
- *BITMAP_ADDR32(bitmap, y, x + (5 ^ flip_xor)) = (data & 0x20) ? fore_pen : RGB_BLACK;
- *BITMAP_ADDR32(bitmap, y, x + (6 ^ flip_xor)) = (data & 0x40) ? fore_pen : RGB_BLACK;
- *BITMAP_ADDR32(bitmap, 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 874b685d9c2..c2a27890659 100644
--- a/src/mame/drivers/astrocorp.c
+++ b/src/mame/drivers/astrocorp.c
@@ -145,7 +145,7 @@ static SCREEN_UPDATE(astrocorp)
if (state->m_screen_enable & 1)
copybitmap(bitmap, state->m_bitmap, 0,0,0,0, cliprect);
else
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
return 0;
}
diff --git a/src/mame/drivers/astrof.c b/src/mame/drivers/astrof.c
index b947501f234..1f93daac141 100644
--- a/src/mame/drivers/astrof.c
+++ b/src/mame/drivers/astrof.c
@@ -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_ADDR32(bitmap, y, 255 - x) = pen;
+ bitmap->pix32(y, 255 - x) = pen;
else
- *BITMAP_ADDR32(bitmap, 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 feeeef85181..9436d9a3d99 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_ADDR32(bitmap, 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 4f534a90764..f28414ecd1d 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_ADDR32(bitmap, 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 8d9f3f8f511..274ec638e8f 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);
- bitmap_fill(screen.machine().priority_bitmap, NULL, 0);
- bitmap_fill(bitmap, cliprect, 0x100);
+ 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);
- bitmap_fill(screen.machine().priority_bitmap, NULL, 0);
- bitmap_fill(bitmap, cliprect, 0x500);
+ 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 2b9c0d9f3d2..2d0e04e8d47 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_ADDR32(bitmap, 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 0b793c3e64e..119dd8553d1 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_ADDR32(bitmap, 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_ADDR32(bitmap, y, x) = pen;
+ bitmap->pix32(y, x) = pen;
x = x + 1;
data = data << 1;
diff --git a/src/mame/drivers/bfcobra.c b/src/mame/drivers/bfcobra.c
index 400ed8975f5..76c797a3e42 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_ADDR32(bitmap, y, 0);
+ dest = &bitmap->pix32(y);
for (x = cliprect->min_x; x <= cliprect->max_x / 2; ++x)
{
diff --git a/src/mame/drivers/bingor.c b/src/mame/drivers/bingor.c
index c6c6e3351e4..3a1719b4311 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(bitmap,cliprect,get_black_pen(screen.machine()));
+ 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_ADDR32(bitmap, 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_ADDR32(bitmap, 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_ADDR32(bitmap, 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_ADDR32(bitmap, 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 9a616172dd1..3d969d3ce50 100644
--- a/src/mame/drivers/blackt96.c
+++ b/src/mame/drivers/blackt96.c
@@ -135,7 +135,7 @@ static SCREEN_UPDATE( blackt96 )
int x,y;
const gfx_element *gfx = screen.machine().gfx[2];
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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 17b9eee82c4..d43a9f52fc1 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_ADDR32(bitmap, 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_ADDR32(bitmap, y, x++) = screen.machine().pens[(pen >> 8) & 0xf];
- *BITMAP_ADDR32(bitmap, y, x++) = screen.machine().pens[(pen >> 12) & 0xf];
- *BITMAP_ADDR32(bitmap, y, x++) = screen.machine().pens[(pen >> 0) & 0xf];
- *BITMAP_ADDR32(bitmap, 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 146e45dadc8..4ae877d3395 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(bitmap,cliprect,get_black_pen(screen.machine()));
+ 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_ADDR16(bitmap, y, x+1) = (pixdat&0xff);
+ bitmap->pix16(y, x+1) = (pixdat&0xff);
if(pixdat>>8)
- *BITMAP_ADDR16(bitmap, y, x) = (pixdat>>8);
+ bitmap->pix16(y, x) = (pixdat>>8);
pixdat = state->m_vid2[z];
if(pixdat&0xff)
- *BITMAP_ADDR16(bitmap, y, x+1) = (pixdat&0xff);
+ bitmap->pix16(y, x+1) = (pixdat&0xff);
if(pixdat>>8)
- *BITMAP_ADDR16(bitmap, y, x) = (pixdat>>8);
+ bitmap->pix16(y, x) = (pixdat>>8);
pixdat = state->m_vid1[0x8000+z];
if(pixdat&0xff)
- *BITMAP_ADDR16(bitmap, y, x+1) = (pixdat&0xff);
+ bitmap->pix16(y, x+1) = (pixdat&0xff);
if(pixdat>>8)
- *BITMAP_ADDR16(bitmap, y, x) = (pixdat>>8);
+ bitmap->pix16(y, x) = (pixdat>>8);
pixdat = state->m_vid1[z];
if(pixdat&0xff)
- *BITMAP_ADDR16(bitmap, y, x+1) = (pixdat&0xff);
+ bitmap->pix16(y, x+1) = (pixdat&0xff);
if(pixdat>>8)
- *BITMAP_ADDR16(bitmap, 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 373dd7f2621..37827116190 100644
--- a/src/mame/drivers/bnstars.c
+++ b/src/mame/drivers/bnstars.c
@@ -515,9 +515,9 @@ static SCREEN_UPDATE(bnstars_left)
{
bnstars_state *state = screen.machine().driver_data<bnstars_state>();
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
+ screen.machine().priority_bitmap->fill(0, *cliprect);
- bitmap_fill(bitmap,cliprect,0); /* 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>();
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
+ screen.machine().priority_bitmap->fill(0, *cliprect);
- bitmap_fill(bitmap,cliprect,0x8000+0); /* 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 775fe70faaa..e27b7893ed5 100644
--- a/src/mame/drivers/boxer.c
+++ b/src/mame/drivers/boxer.c
@@ -162,7 +162,7 @@ static SCREEN_UPDATE( boxer )
boxer_state *state = screen.machine().driver_data<boxer_state>();
int i, j;
- bitmap_fill(bitmap, cliprect, 1);
+ 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 23db8577f19..9e9017f2b1d 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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 be41b83c3c1..6c089781a38 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(bitmap,cliprect,0);
+ 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 61cd9a6b2be..c9b7f1f79a8 100644
--- a/src/mame/drivers/cb2001.c
+++ b/src/mame/drivers/cb2001.c
@@ -321,16 +321,11 @@ e3 -> c6
*/
-// these areas are wrong
-static const rectangle visible1 = { 0*8, (14+48)*8-1, 3*8, (3+7)*8-1 };
-static const rectangle visible2 = { 0*8, (14+48)*8-1, 10*8, (10+7)*8-1 };
-static const rectangle visible3 = { 0*8, (14+48)*8-1, 17*8, (17+7)*8-1 };
-
static SCREEN_UPDATE(cb2001)
{
cb2001_state *state = screen.machine().driver_data<cb2001_state>();
int count,x,y;
- bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
count = 0x0000;
@@ -388,6 +383,11 @@ static SCREEN_UPDATE(cb2001)
}
+ // these areas are wrong
+ const rectangle visible1(0*8, (14+48)*8-1, 3*8, (3+7)*8-1);
+ const rectangle visible2(0*8, (14+48)*8-1, 10*8, (10+7)*8-1);
+ const rectangle visible3(0*8, (14+48)*8-1, 17*8, (17+7)*8-1);
+
tilemap_draw(bitmap, &visible1, state->m_reel1_tilemap, 0, 0);
tilemap_draw(bitmap, &visible2, state->m_reel2_tilemap, 0, 0);
tilemap_draw(bitmap, &visible3, state->m_reel3_tilemap, 0, 0);
diff --git a/src/mame/drivers/cesclass.c b/src/mame/drivers/cesclass.c
index cace3843612..66823fa7c6d 100644
--- a/src/mame/drivers/cesclass.c
+++ b/src/mame/drivers/cesclass.c
@@ -64,7 +64,7 @@ bool cesclassic_state::screen_update(screen_device &screen, bitmap_t &bitmap, co
{
int x,y,xi;
- bitmap_fill(&bitmap,&cliprect,get_black_pen(machine()));
+ bitmap.fill(get_black_pen(machine()), cliprect);
{
for(y=0;y<64;y++)
@@ -79,7 +79,7 @@ bool cesclassic_state::screen_update(screen_device &screen, bitmap_t &bitmap, co
color |= (((m_vram[x+y*16])>>(15-xi)) & 1)<<1;
if((x*16+xi)<256 && ((y)+0)<256)
- *BITMAP_ADDR32(&bitmap, y, x*16+xi) = machine().pens[color];
+ bitmap.pix32(y, x*16+xi) = machine().pens[color];
}
}
}
diff --git a/src/mame/drivers/champbwl.c b/src/mame/drivers/champbwl.c
index c740c12a38f..8f9c1eb8969 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(bitmap, cliprect, 0x1f0);
+ 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(bitmap, cliprect, 0x1f0);
+ 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/clayshoo.c b/src/mame/drivers/clayshoo.c
index 1c38906fefa..79a46e90169 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_ADDR32(bitmap, 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 57f1e5490af..7a264b8fc3e 100644
--- a/src/mame/drivers/cntsteer.c
+++ b/src/mame/drivers/cntsteer.c
@@ -258,7 +258,7 @@ static SCREEN_UPDATE( zerotrgt )
cntsteer_state *state = screen.machine().driver_data<cntsteer_state>();
if (state->m_disable_roz)
- bitmap_fill(bitmap, cliprect, screen.machine().pens[8 * state->m_bg_color_bank]);
+ 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(bitmap, cliprect, screen.machine().pens[8 * state->m_bg_color_bank]);
+ 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 ee7f8a69c8f..3ab9a09bcd9 100644
--- a/src/mame/drivers/cobra.c
+++ b/src/mame/drivers/cobra.c
@@ -75,7 +75,7 @@ public:
static void render_scan(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid)
{
bitmap_t *destmap = (bitmap_t *)dest;
- UINT32 *fb = BITMAP_ADDR32(destmap, scanline, 0);
+ UINT32 *fb = &destmap->pix32(scanline);
int x;
for (x = extent->startx; x < extent->stopx; x++)
@@ -92,7 +92,7 @@ static void render_texture_scan(void *dest, INT32 scanline, const poly_extent *e
float v = extent->param[1].start;
float du = extent->param[0].dpdx;
float dv = extent->param[1].dpdx;
- UINT32 *fb = BITMAP_ADDR32(destmap, scanline, 0);
+ UINT32 *fb = &destmap->pix32(scanline);
int x;
for (x = extent->startx; x < extent->stopx; x++)
diff --git a/src/mame/drivers/coolpool.c b/src/mame/drivers/coolpool.c
index 43c067c854b..7acfb852664 100644
--- a/src/mame/drivers/coolpool.c
+++ b/src/mame/drivers/coolpool.c
@@ -59,7 +59,7 @@ static void amerdart_scanline(screen_device &screen, bitmap_t *bitmap, int scanl
coolpool_state *state = screen.machine().driver_data<coolpool_state>();
UINT16 *vram = &state->m_vram_base[(params->rowaddr << 8) & 0xff00];
- UINT32 *dest = BITMAP_ADDR32(bitmap, scanline, 0);
+ UINT32 *dest = &bitmap->pix32(scanline);
rgb_t pens[16];
int coladdr = params->coladdr;
int x;
@@ -88,7 +88,7 @@ static void coolpool_scanline(screen_device &screen, bitmap_t *bitmap, int scanl
coolpool_state *state = screen.machine().driver_data<coolpool_state>();
UINT16 *vram = &state->m_vram_base[(params->rowaddr << 8) & 0x1ff00];
- UINT32 *dest = BITMAP_ADDR32(bitmap, scanline, 0);
+ 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 57c55460550..c4ef00f8167 100644
--- a/src/mame/drivers/coolridr.c
+++ b/src/mame/drivers/coolridr.c
@@ -357,7 +357,7 @@ static SCREEN_UPDATE(coolridr)
}
copybitmap_trans(bitmap, state->m_temp_bitmap_sprites, 0, 0, 0, 0, cliprect, 0);
- bitmap_fill(state->m_temp_bitmap_sprites, cliprect, 0);
+ state->m_temp_bitmap_sprites->fill(0, *cliprect);
return 0;
@@ -477,10 +477,7 @@ static WRITE32_HANDLER( sysh1_txt_blit_w )
y2 = (state->m_attr_buff[9] & 0x01ff0000) >> 16;
x2 = (state->m_attr_buff[9] & 0x000001ff);
- clip.min_x = 0;
- clip.max_x = state->m_temp_bitmap_sprites->width;
- clip.min_y = 0;
- clip.max_y = state->m_temp_bitmap_sprites->height;
+ clip = state->m_temp_bitmap_sprites->cliprect();
drawgfx_opaque(state->m_temp_bitmap_sprites,&clip,gfx,1,1,0,0,x2,y2);
}
diff --git a/src/mame/drivers/corona.c b/src/mame/drivers/corona.c
index 411bda79785..1591b46b9a2 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_ADDR16(bitmap, 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_ADDR16(bitmap, 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 4a1c7da8b2d..9c0d0e9db27 100644
--- a/src/mame/drivers/cps3.c
+++ b/src/mame/drivers/cps3.c
@@ -442,16 +442,8 @@ INLINE void cps3_drawgfxzoom(bitmap_t *dest_bmp,const rectangle *clip,const gfx_
/* force clip to bitmap boundary */
if(clip)
{
- myclip.min_x = clip->min_x;
- myclip.max_x = clip->max_x;
- myclip.min_y = clip->min_y;
- myclip.max_y = clip->max_y;
-
- if (myclip.min_x < 0) myclip.min_x = 0;
- if (myclip.max_x >= dest_bmp->width) myclip.max_x = dest_bmp->width-1;
- if (myclip.min_y < 0) myclip.min_y = 0;
- if (myclip.max_y >= dest_bmp->height) myclip.max_y = dest_bmp->height-1;
-
+ myclip = *clip;
+ myclip &= dest_bmp->cliprect();
clip=&myclip;
}
@@ -537,7 +529,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 = BITMAP_ADDR32(dest_bmp, y, 0);
+ UINT32 *dest = &dest_bmp->pix32(y);
int x, x_index = x_index_base;
for( x=sx; x<ex; x++ )
@@ -556,7 +548,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 = BITMAP_ADDR32(dest_bmp, y, 0);
+ UINT32 *dest = &dest_bmp->pix32(y);
int x, x_index = x_index_base;
for( x=sx; x<ex; x++ )
@@ -576,7 +568,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 = BITMAP_ADDR32(dest_bmp, y, 0);
+ UINT32 *dest = &dest_bmp->pix32(y);
int x, x_index = x_index_base;
for( x=sx; x<ex; x++ )
@@ -596,7 +588,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 = BITMAP_ADDR32(dest_bmp, y, 0);
+ UINT32 *dest = &dest_bmp->pix32(y);
int x, x_index = x_index_base;
for( x=sx; x<ex; x++ )
@@ -868,7 +860,7 @@ static VIDEO_START(cps3)
state->m_renderbuffer_clip.min_y = 0;
state->m_renderbuffer_clip.max_y = 224-1;
- bitmap_fill(state->m_renderbuffer_bitmap,&state->m_renderbuffer_clip,0x3f);
+ state->m_renderbuffer_bitmap->fill(0x3f, state->m_renderbuffer_clip);
}
@@ -1010,7 +1002,7 @@ static SCREEN_UPDATE(cps3)
state->m_renderbuffer_clip.min_y = 0;
state->m_renderbuffer_clip.max_y = ((224*fszx)>>16)-1;
- bitmap_fill(state->m_renderbuffer_bitmap,&state->m_renderbuffer_clip,0);
+ state->m_renderbuffer_bitmap->fill(0, state->m_renderbuffer_clip);
/* Sprites */
{
@@ -1226,8 +1218,8 @@ static SCREEN_UPDATE(cps3)
srcy=0;
for (rendery=0;rendery<224;rendery++)
{
- dstbitmap = BITMAP_ADDR32(bitmap, rendery, 0);
- srcbitmap = BITMAP_ADDR32(state->m_renderbuffer_bitmap, srcy>>16, 0);
+ dstbitmap = &bitmap->pix32(rendery);
+ srcbitmap = &state->m_renderbuffer_bitmap->pix32(srcy>>16);
srcx=0;
for (renderx=0;renderx<state->m_screenwidth;renderx++)
diff --git a/src/mame/drivers/crystal.c b/src/mame/drivers/crystal.c
index e89ed162f62..5a0fe106a93 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_ADDR16(bitmap, y, 0), &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 fded0916034..d2af5a2d85a 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(bitmap, cliprect, 0/*get_black_pen(screen.screen.machine())*/);
+ 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 b38582fa32e..10acbefe90b 100644
--- a/src/mame/drivers/csplayh5.c
+++ b/src/mame/drivers/csplayh5.c
@@ -70,7 +70,7 @@ static VIDEO_START( csplayh5 )
static SCREEN_UPDATE( csplayh5 )
{
csplayh5_state *state = screen.machine().driver_data<csplayh5_state>();
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
copybitmap(bitmap, state->m_vdp0_bitmap, 0, 0, 0, 0, cliprect);
diff --git a/src/mame/drivers/cubeqst.c b/src/mame/drivers/cubeqst.c
index a1a8b69f803..7ba83a0d498 100644
--- a/src/mame/drivers/cubeqst.c
+++ b/src/mame/drivers/cubeqst.c
@@ -58,8 +58,6 @@ public:
*
*************************************/
-static const rectangle overlay_clip = { 0, 320-1, 0, 256-8 };
-
static VIDEO_START( cubeqst )
{
cubeqst_state *state = machine.driver_data<cubeqst_state>();
@@ -106,7 +104,7 @@ static SCREEN_UPDATE( cubeqst )
*/
/* Bit 3 selects LD/#GRAPHICS */
- bitmap_fill(bitmap, cliprect, state->m_colormap[255]);
+ bitmap->fill(state->m_colormap[255], *cliprect);
/* TODO: Add 1 for linebuffering? */
for (y = cliprect->min_y; y <= cliprect->max_y; ++y)
@@ -114,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_ADDR32(bitmap, y, 0);
+ 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 8de258ad9c0..75f6272ff21 100644
--- a/src/mame/drivers/cybertnk.c
+++ b/src/mame/drivers/cybertnk.c
@@ -213,7 +213,7 @@ static void draw_pixel( bitmap_t* bitmap, const rectangle *cliprect, int y, int
if (y>cliprect->max_y) return;
if (y<cliprect->min_y) return;
- *BITMAP_ADDR16(bitmap, y, x) = pen;
+ bitmap->pix16(y, x) = pen;
}
static UINT32 update_screen(screen_device &screen, bitmap_t *bitmap, const rectangle *cliprect, int screen_shift)
@@ -223,7 +223,7 @@ static UINT32 update_screen(screen_device &screen, bitmap_t *bitmap, const recta
tilemap_set_scrolldx(state->m_tx_tilemap, screen_shift, screen_shift);
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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(bitmap,cliprect,get_black_pen(screen.machine()));
+ 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_ADDR16(bitmap, 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_ADDR16(bitmap, 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_ADDR16(bitmap, 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_ADDR16(bitmap, 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_ADDR16(bitmap, 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_ADDR16(bitmap, 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_ADDR16(bitmap, 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_ADDR16(bitmap, 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/dai3wksi.c b/src/mame/drivers/dai3wksi.c
index 5ac7e5590bd..8b988d089c0 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_ADDR32(bitmap, 255-y, 255-x) = pen;
+ bitmap->pix32(255-y, 255-x) = pen;
else
- *BITMAP_ADDR32(bitmap, y, x) = pen;
+ bitmap->pix32(y, x) = pen;
x++;
}
diff --git a/src/mame/drivers/darkhors.c b/src/mame/drivers/darkhors.c
index d4c81abc8a8..715af66a36d 100644
--- a/src/mame/drivers/darkhors.c
+++ b/src/mame/drivers/darkhors.c
@@ -195,7 +195,7 @@ static SCREEN_UPDATE( darkhors )
}
#endif
- bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine()));
+ 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 d1a59b3c88e..9f23cf642d4 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(bitmap, cliprect, 0); /* not Confirmed */
- bitmap_fill(screen.machine().priority_bitmap, NULL, 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/ddenlovr.c b/src/mame/drivers/ddenlovr.c
index abb77552aba..e510897b7fc 100644
--- a/src/mame/drivers/ddenlovr.c
+++ b/src/mame/drivers/ddenlovr.c
@@ -1294,7 +1294,7 @@ static void copylayer(running_machine &machine, bitmap_t *bitmap, const rectangl
{
pen &= penmask;
pen |= palbase;
- *BITMAP_ADDR16(bitmap, 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(bitmap, cliprect, state->m_ddenlovr_bgcolor);
+ 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 55d0c5f37ad..60c1fd8bc03 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>();
- bitmap_fill(screen.machine().priority_bitmap, NULL, 0);
- bitmap_fill(bitmap, NULL, 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 26a2b7f7625..127b416e810 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(bitmap, cliprect, 0);
+ 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_ADDR16(bitmap, 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 7d184030443..478cd253c81 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_ADDR16(bitmap, y, 0);
+ 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 5e55886e211..b43b2443201 100644
--- a/src/mame/drivers/discoboy.c
+++ b/src/mame/drivers/discoboy.c
@@ -157,7 +157,7 @@ static SCREEN_UPDATE( discoboy )
palette_set_color(screen.machine(), (i / 2) + 0x400, MAKE_RGB(r, g, b));
}
- bitmap_fill(bitmap, cliprect, 0x3ff);
+ 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 1bae24b62f0..67d747f8846 100644
--- a/src/mame/drivers/diverboy.c
+++ b/src/mame/drivers/diverboy.c
@@ -111,7 +111,7 @@ static void draw_sprites( running_machine& machine, bitmap_t *bitmap, const rect
static SCREEN_UPDATE(diverboy)
{
-// bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine()));
+// 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 c30aa07d004..be7a050ac7e 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
/* Draw racetrack
diff --git a/src/mame/drivers/dorachan.c b/src/mame/drivers/dorachan.c
index d298a3b3f0b..b1d5282c2db 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_ADDR32(bitmap, 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 b292c2572aa..25cc9890c13 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_ADDR32(bitmap, y + 0, (x + 0) + i*2) = pen;
- *BITMAP_ADDR32(bitmap, y + 0, (x + 1) + i*2) = pen;
- *BITMAP_ADDR32(bitmap, y + 1, (x + 0) + i*2) = pen;
- *BITMAP_ADDR32(bitmap, 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/dunhuang.c b/src/mame/drivers/dunhuang.c
index f315e182bf2..6649c9c3233 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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 ad951ba698b..c152e0ee4ca 100644
--- a/src/mame/drivers/dwarfd.c
+++ b/src/mame/drivers/dwarfd.c
@@ -837,7 +837,7 @@ static void drawCrt( running_machine &machine, bitmap_t *bitmap,const rectangle
static SCREEN_UPDATE( dwarfd )
{
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
drawCrt(screen.machine(), bitmap, cliprect);
return 0;
}
diff --git a/src/mame/drivers/embargo.c b/src/mame/drivers/embargo.c
index 39848d14d3a..4b0f931ca95 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_ADDR32(bitmap, 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 5885bffe2e3..e160eefd45d 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_ADDR32(bitmap, 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_ADDR32(bitmap, 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 4186e8d0743..669dd8eb454 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_ADDR16(bitmap, 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_ADDR16(bitmap, 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 bba25128b1f..eb3163d1784 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(bitmap, cliprect, 0);
+ 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 f783990a7b9..2a3b39a6ec7 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_ADDR16(bitmap, y, (x * 2) + 0) = (state->m_videoram[offs] >> 16) & 0x7fff;
- *BITMAP_ADDR16(bitmap, 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 691288fe4b4..72b17d5a0ae 100644
--- a/src/mame/drivers/fcrash.c
+++ b/src/mame/drivers/fcrash.c
@@ -268,9 +268,9 @@ static SCREEN_UPDATE( fcrash )
tilemap_set_enable(state->m_bg_tilemap[2], 1);
/* Blank screen */
- bitmap_fill(bitmap, cliprect, 0xbff);
+ bitmap->fill(0xbff, *cliprect);
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
+ screen.machine().priority_bitmap->fill(0, *cliprect);
l0 = (layercontrol >> 0x06) & 03;
l1 = (layercontrol >> 0x08) & 03;
l2 = (layercontrol >> 0x0a) & 03;
@@ -349,9 +349,9 @@ static SCREEN_UPDATE( kodb )
tilemap_set_enable(state->m_bg_tilemap[2], 1);
/* Blank screen */
- bitmap_fill(bitmap, cliprect, 0xbff);
+ bitmap->fill(0xbff, *cliprect);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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 03d76e9501e..5148d165f2b 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(bitmap, cliprect, screen.machine().pens[0]); //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 b1a731fb513..a395ddc6d29 100644
--- a/src/mame/drivers/firebeat.c
+++ b/src/mame/drivers/firebeat.c
@@ -254,7 +254,7 @@ static void gcu_draw_object(running_machine &machine, bitmap_t *bitmap, const re
{
int xi;
int index;
- UINT16 *d = BITMAP_ADDR16(bitmap, j+y, x);
+ UINT16 *d = &bitmap->pix16(j+y, x);
//int index = address + ((v >> 6) * 1024);
if (yflip)
@@ -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_ADDR16(bitmap, j, 0);
+ UINT16 *d = &bitmap->pix16(j);
for (i=x1; i < x2; i++)
{
if (color[i&3] & 0x8000)
@@ -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_ADDR16(bitmap, y+j, x);
+ UINT16 *d = &bitmap->pix16(y+j, x);
UINT16 line = vr[address^1];
address += 4;
@@ -517,7 +517,7 @@ static UINT32 update_screen(screen_device &screen, bitmap_t *bitmap, const recta
{
firebeat_state *state = screen.machine().driver_data<firebeat_state>();
- bitmap_fill(bitmap, cliprect, 0);
+ 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 cb5136c26df..d1d0f4eaf6e 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( bitmap, cliprect, palette_get_color(screen.machine(), 256) );
+ 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 4fa4ceea3d0..55961443a4f 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_ADDR16(bitmap, 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 8b82257a944..c9ac06eca23 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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 b44e9a63cec..27ccfda7b7c 100644
--- a/src/mame/drivers/galaxia.c
+++ b/src/mame/drivers/galaxia.c
@@ -80,18 +80,18 @@ static SCREEN_UPDATE( galaxia )
for (x = cliprect->min_x; x <= cliprect->max_x; x++)
{
- int pixel0 = *BITMAP_ADDR16(s2636_0_bitmap, y, x);
- int pixel1 = *BITMAP_ADDR16(s2636_1_bitmap, y, x);
- int pixel2 = *BITMAP_ADDR16(s2636_2_bitmap, 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_ADDR16(bitmap, y, x) = S2636_PIXEL_COLOR(pixel0);
+ bitmap->pix16(y, x) = S2636_PIXEL_COLOR(pixel0);
if (S2636_IS_PIXEL_DRAWN(pixel1))
- *BITMAP_ADDR16(bitmap, y, x) = S2636_PIXEL_COLOR(pixel1);
+ bitmap->pix16(y, x) = S2636_PIXEL_COLOR(pixel1);
if (S2636_IS_PIXEL_DRAWN(pixel2))
- *BITMAP_ADDR16(bitmap, 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 f94cf9c53d8..59934134197 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
for (int i = 0; i < state->m_point_display_list_index; i++ )
{
- *BITMAP_ADDR16(bitmap, 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 046409af90f..283a7f87f3b 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(bitmap, cliprect, 0x0000);
+ 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_ADDR32(bitmap, drawy, drawx);
+ UINT32* dst = &bitmap->pix32(drawy, drawx);
@@ -352,15 +352,15 @@ static SCREEN_UPDATE(galpani3)
}
}
- bitmap_fill(state->m_sprite_bitmap_1, cliprect, 0x0000);
+ 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 );
// ignoring priority bits for now..
for (y=0;y<240;y++)
{
- src1 = BITMAP_ADDR16(state->m_sprite_bitmap_1, y, 0);
- dst = BITMAP_ADDR32(bitmap, y, 0);
+ src1 = &state->m_sprite_bitmap_1->pix16(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 a284efb4438..bae30bf52a5 100644
--- a/src/mame/drivers/gamecstl.c
+++ b/src/mame/drivers/gamecstl.c
@@ -123,7 +123,7 @@ static void draw_char(bitmap_t *bitmap, const rectangle *cliprect, const gfx_ele
for (j=y; j < y+8; j++)
{
- UINT16 *p = BITMAP_ADDR16(bitmap, j, 0);
+ UINT16 *p = &bitmap->pix16(j);
for (i=x; i < x+8; i++)
{
@@ -144,7 +144,7 @@ static SCREEN_UPDATE(gamecstl)
UINT32 *cga = state->m_cga_ram;
int index = 0;
- bitmap_fill(bitmap, cliprect, 0);
+ bitmap->fill(0, *cliprect);
for (j=0; j < 25; j++)
{
diff --git a/src/mame/drivers/gei.c b/src/mame/drivers/gei.c
index 2616ded57a1..081058bce2a 100644
--- a/src/mame/drivers/gei.c
+++ b/src/mame/drivers/gei.c
@@ -116,7 +116,7 @@ static WRITE8_HANDLER( gei_bitmap_w )
for (i = 0; i < 8; i++)
- *BITMAP_ADDR16(space->machine().generic.tmpbitmap, sy, sx+i) = state->m_color[8-i-1];
+ space->machine().generic.tmpbitmap->pix16(sy, sx+i) = state->m_color[8-i-1];
}
static PALETTE_INIT(gei)
diff --git a/src/mame/drivers/goldngam.c b/src/mame/drivers/goldngam.c
index 15dff6b4906..2c9f238f9c1 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_ADDR16(bitmap, 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 2ab9e7ffcbe..51caf2e7ac1 100644
--- a/src/mame/drivers/gpworld.c
+++ b/src/mame/drivers/gpworld.c
@@ -92,8 +92,8 @@ INLINE void draw_pixel(bitmap_t *bitmap,const rectangle *cliprect,int x,int y,in
{
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,7 +102,7 @@ INLINE void draw_pixel(bitmap_t *bitmap,const rectangle *cliprect,int x,int y,in
y > cliprect->max_y)
return;
- *BITMAP_ADDR32(bitmap, y, x) = color;
+ bitmap->pix32(y, x) = color;
}
static void gpworld_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect)
@@ -218,7 +218,7 @@ static void gpworld_draw_sprites(running_machine &machine, bitmap_t *bitmap, con
static SCREEN_UPDATE( gpworld )
{
- bitmap_fill(bitmap, cliprect, 0);
+ 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 a7014883226..0dce6f3b9a2 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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_ADDR16(bitmap, y, 0);
+ 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 fa5357429c4..bfcac3491a0 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_ADDR32(bitmap, 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 5de75fa5268..deb8d8c5148 100644
--- a/src/mame/drivers/halleys.c
+++ b/src/mame/drivers/halleys.c
@@ -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_ADDR16(bitmap, 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
@@ -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_ADDR16(bitmap, 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
@@ -1349,8 +1349,8 @@ static void copy_fixed_xp(bitmap_t *bitmap, UINT16 *source)
UINT16 ax, bx;
esi = source + CLIP_SKIP + CLIP_W;
- edi = BITMAP_ADDR16(bitmap, 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;
@@ -1384,8 +1384,8 @@ static void copy_fixed_2b(bitmap_t *bitmap, UINT16 *source)
UINT16 ax, bx;
esi = source + CLIP_SKIP + CLIP_W;
- edi = BITMAP_ADDR16(bitmap, 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;
@@ -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_ADDR16(bitmap, 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(bitmap, cliprect, state->m_bgcolor);
+ 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(bitmap, cliprect, state->m_bgcolor);
+ 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 d41fa564d43..8f34f80ee70 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_ADDR32(bitmap, 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_ADDR32(bitmap, 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_ADDR32(bitmap, 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 c256825e2a7..32d249a2ec6 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_ADDR16(bitmap, 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 b9aad0ef900..1c481a46461 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(bitmap, cliprect, 0);
+ 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 63036cc2e32..238d1fea96a 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(bitmap, 0, 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_ADDR16(bitmap, 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 7f794401671..8a1dd5b96e7 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_ADDR32(bitmap, 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_ADDR32(bitmap, 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_ADDR32(bitmap, 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_ADDR32(bitmap, 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 dd7dcecc3f6..e1dac3cf13c 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(bitmap,cliprect,get_black_pen(screen.machine()));
+ 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 0c1a02a0ddd..ab6527f203a 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(bitmap,&clip,screen.machine().pens[rowenable]);
+ 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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 1230822f165..0a166234c35 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_ADDR16(bitmap, y, x) = get_black_pen(screen.machine());
+ bitmap->pix16(y, x) = get_black_pen(screen.machine());
else
#endif
- *BITMAP_ADDR16(bitmap, 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 00fc26e3a18..4919d320e09 100644
--- a/src/mame/drivers/igs017.c
+++ b/src/mame/drivers/igs017.c
@@ -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(bitmap,cliprect,0);
+ 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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 fa04ac7ebdf..707806c8d1f 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(bitmap,cliprect,get_black_pen(screen.machine()));
+ 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 6d88a107270..164dcb1be12 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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 3ae80e99c48..c3c2d667364 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_ADDR16(bitmap, y & 0xff, 0);
+ 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 033e97de1dc..91dd9d80c6e 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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 a359f8fba82..ba3fa71cc57 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(bitmap, cliprect, 0);
+ bitmap->fill(0, *cliprect);
/* DEBUG */
/*
diff --git a/src/mame/drivers/itech8.c b/src/mame/drivers/itech8.c
index 0092860eeda..19777af7f0c 100644
--- a/src/mame/drivers/itech8.c
+++ b/src/mame/drivers/itech8.c
@@ -662,10 +662,10 @@ static MACHINE_RESET( itech8 )
}
/* set the visible area */
- if (state->m_visarea)
+ if (state->m_visarea.width() > 1)
{
- machine.primary_screen->set_visible_area(state->m_visarea->min_x, state->m_visarea->max_x, state->m_visarea->min_y, state->m_visarea->max_y);
- state->m_visarea = NULL;
+ machine.primary_screen->set_visible_area(state->m_visarea.min_x, state->m_visarea.max_x, state->m_visarea.min_y, state->m_visarea.max_y);
+ state->m_visarea.set(0, 0, 0, 0);
}
}
@@ -2659,32 +2659,28 @@ static DRIVER_INIT( sstrike )
static DRIVER_INIT( hstennis )
{
itech8_state *state = machine.driver_data<itech8_state>();
- static const rectangle visible = { 0, 375, 0, 239 };
- state->m_visarea = &visible;
+ state->m_visarea.set(0, 375, 0, 239);
}
static DRIVER_INIT( arligntn )
{
itech8_state *state = machine.driver_data<itech8_state>();
- static const rectangle visible = { 16, 389, 0, 239 };
- state->m_visarea = &visible;
+ state->m_visarea.set(16, 389, 0, 239);
}
static DRIVER_INIT( peggle )
{
itech8_state *state = machine.driver_data<itech8_state>();
- static const rectangle visible = { 18, 367, 0, 239 };
- state->m_visarea = &visible;
+ state->m_visarea.set(18, 367, 0, 239);
}
static DRIVER_INIT( neckneck )
{
itech8_state *state = machine.driver_data<itech8_state>();
- static const rectangle visible = { 8, 375, 0, 239 };
- state->m_visarea = &visible;
+ state->m_visarea.set(8, 375, 0, 239);
}
diff --git a/src/mame/drivers/itgambl2.c b/src/mame/drivers/itgambl2.c
index 5b877ab2fc8..0ee01ed7e12 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(bitmap,cliprect,get_black_pen(screen.machine()));
+ 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_ADDR32(bitmap, 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 762932c95bb..42b9a9f86ac 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(bitmap,cliprect,get_black_pen(screen.machine()));
+ 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_ADDR32(bitmap, 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 dda46390660..6c26878979e 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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 406c8784762..bb58938f6e0 100644
--- a/src/mame/drivers/jalmah.c
+++ b/src/mame/drivers/jalmah.c
@@ -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(bitmap, cliprect, screen.machine().pens[0xff]); //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(bitmap, cliprect, screen.machine().pens[0x1ff]);//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 7c6873baf09..9b4dde2a957 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_ADDR16(bitmap, 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 a3b8046387c..6e7d0b86a22 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_ADDR32(bitmap, 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 d057c7ac338..8d5c420e4c9 100644
--- a/src/mame/drivers/jchan.c
+++ b/src/mame/drivers/jchan.c
@@ -368,12 +368,12 @@ static SCREEN_UPDATE(jchan)
UINT16 pixdata1;
UINT16 pixdata2;
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
SCREEN_UPDATE_CALL(jchan_view2);
- bitmap_fill(state->m_sprite_bitmap_1, cliprect, 0x0000);
- bitmap_fill(state->m_sprite_bitmap_2, cliprect, 0x0000);
+ 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 );
@@ -381,9 +381,9 @@ static SCREEN_UPDATE(jchan)
// ignoring priority bits for now - might use alpha too, check 0x8000 of palette writes
for (y=0;y<240;y++)
{
- src1 = BITMAP_ADDR16(state->m_sprite_bitmap_1, y, 0);
- src2 = BITMAP_ADDR16(state->m_sprite_bitmap_2, y, 0);
- dst = BITMAP_ADDR16(bitmap, y, 0);
+ src1 = &state->m_sprite_bitmap_1->pix16(y);
+ src2 = &state->m_sprite_bitmap_2->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 0d8f17af47d..c776a54288b 100644
--- a/src/mame/drivers/jollyjgr.c
+++ b/src/mame/drivers/jollyjgr.c
@@ -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_ADDR16(bitmap, 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_ADDR16(bitmap, 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_ADDR16(bitmap, y, 255 - x * 8 - i) = color + 32;
+ bitmap->pix16(y, 255 - x * 8 - i) = color + 32;
else
- *BITMAP_ADDR16(bitmap, 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(bitmap, cliprect, 32);
+ 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_ADDR16(bitmap,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 b2c42584cc5..e53ba8c050b 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_ADDR16(bitmap, 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 7f0e0aa9afa..9ef0bf547c0 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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_ADDR32(bitmap, 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/kinst.c b/src/mame/drivers/kinst.c
index b0295f5c12e..294e7240588 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_ADDR16(bitmap, 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 539f54d64a9..fd4ae6cf1cf 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_ADDR16(bitmap, j, 0);
+ 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(bitmap, cliprect, 0);
+ bitmap->fill(0, *cliprect);
}
return 0;
}
diff --git a/src/mame/drivers/kongambl.c b/src/mame/drivers/kongambl.c
index fe58c364f7e..5612f89f07a 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(bitmap, cliprect, 0);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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 18449598bd6..311da97aba2 100644
--- a/src/mame/drivers/kungfur.c
+++ b/src/mame/drivers/kungfur.c
@@ -83,38 +83,38 @@ g & 40
static void draw_led(bitmap_t *bitmap, int x, int y,UINT8 value)
{
- plot_box(bitmap, x, y, 6, 10, 0x00000000);
+ bitmap->plot_box(x, y, 6, 10, 0x00000000);
/*a*/
- *BITMAP_ADDR16(bitmap, y+0, x+1) = ((value & 0x01) ? LED_ON : LED_OFF);
- *BITMAP_ADDR16(bitmap, y+0, x+2) = ((value & 0x01) ? LED_ON : LED_OFF);
- *BITMAP_ADDR16(bitmap, 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_ADDR16(bitmap, y+1, x+4) = ((value & 0x02) ? LED_ON : LED_OFF);
- *BITMAP_ADDR16(bitmap, y+2, x+4) = ((value & 0x02) ? LED_ON : LED_OFF);
- *BITMAP_ADDR16(bitmap, 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_ADDR16(bitmap, y+5, x+4) = ((value & 0x04) ? LED_ON : LED_OFF);
- *BITMAP_ADDR16(bitmap, y+6, x+4) = ((value & 0x04) ? LED_ON : LED_OFF);
- *BITMAP_ADDR16(bitmap, 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_ADDR16(bitmap, y+8, x+1) = ((value & 0x08) ? LED_ON : LED_OFF);
- *BITMAP_ADDR16(bitmap, y+8, x+2) = ((value & 0x08) ? LED_ON : LED_OFF);
- *BITMAP_ADDR16(bitmap, 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_ADDR16(bitmap, y+5, x+0) = ((value & 0x10) ? LED_ON : LED_OFF);
- *BITMAP_ADDR16(bitmap, y+6, x+0) = ((value & 0x10) ? LED_ON : LED_OFF);
- *BITMAP_ADDR16(bitmap, 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_ADDR16(bitmap, y+1, x+0) = ((value & 0x20) ? LED_ON : LED_OFF);
- *BITMAP_ADDR16(bitmap, y+2, x+0) = ((value & 0x20) ? LED_ON : LED_OFF);
- *BITMAP_ADDR16(bitmap, 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_ADDR16(bitmap, y+4, x+1) = ((value & 0x40) ? LED_ON : LED_OFF);
- *BITMAP_ADDR16(bitmap, y+4, x+2) = ((value & 0x40) ? LED_ON : LED_OFF);
- *BITMAP_ADDR16(bitmap, 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_ADDR16(bitmap, 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 9b58271dce4..2d330c35c38 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_ADDR16(bitmap, y, x * 2) = (state->m_vram2[y * 128 + x] & 0xf);
+ bitmap->pix16(y, x * 2) = (state->m_vram2[y * 128 + x] & 0xf);
else
- *BITMAP_ADDR16(bitmap, 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_ADDR16(bitmap, 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_ADDR16(bitmap, 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 9e9ca48408a..bc409459b76 100644
--- a/src/mame/drivers/laserbat.c
+++ b/src/mame/drivers/laserbat.c
@@ -525,18 +525,18 @@ static SCREEN_UPDATE( laserbat )
for (x = cliprect->min_x; x <= cliprect->max_x; x++)
{
- int pixel1 = *BITMAP_ADDR16(s2636_1_bitmap, y, x);
- int pixel2 = *BITMAP_ADDR16(s2636_2_bitmap, y, x);
- int pixel3 = *BITMAP_ADDR16(s2636_3_bitmap, 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_ADDR16(bitmap, y, x) = S2636_PIXEL_COLOR(pixel1);
+ bitmap->pix16(y, x) = S2636_PIXEL_COLOR(pixel1);
if (S2636_IS_PIXEL_DRAWN(pixel2))
- *BITMAP_ADDR16(bitmap, y, x) = S2636_PIXEL_COLOR(pixel2);
+ bitmap->pix16(y, x) = S2636_PIXEL_COLOR(pixel2);
if (S2636_IS_PIXEL_DRAWN(pixel3))
- *BITMAP_ADDR16(bitmap, 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 b4be67c2d87..49987e4a526 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(bitmap, cliprect , get_black_pen(screen.machine()));
+ 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_ADDR16(bitmap, y, x) = data;
+ bitmap->pix16(y, x) = data;
count++;
}
}
@@ -345,7 +345,7 @@ static WRITE16_HANDLER( lastfght_blit_w )
data = gfxdata[addr];
if (data && (state->m_x + x >= 0) && (state->m_x + x < 512) && (state->m_y + y >= 0) && (state->m_y + y < 256))
- *BITMAP_ADDR16(dest, state->m_y + y, state->m_x + x) = data;
+ dest->pix16(state->m_y + y, state->m_x + x) = data;
}
}
}
diff --git a/src/mame/drivers/lgp.c b/src/mame/drivers/lgp.c
index 55d41586c47..dbe3a91ced9 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(bitmap, cliprect, 0);
+ 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 0f5cfcf4845..2ea0de427aa 100644
--- a/src/mame/drivers/limenko.c
+++ b/src/mame/drivers/limenko.c
@@ -125,8 +125,8 @@ static WRITE32_HANDLER( spriteram_buffer_w )
clip.min_y = 0;
clip.max_y = 239;
- bitmap_fill(state->m_sprites_bitmap_pri,&clip,0);
- bitmap_fill(state->m_sprites_bitmap,&clip,0);
+ state->m_sprites_bitmap_pri->fill(0, clip);
+ state->m_sprites_bitmap->fill(0, clip);
// toggle spriterams location in the memory map
state->m_spriteram_bit ^= 1;
@@ -333,8 +333,8 @@ 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 = BITMAP_ADDR16(dest_bmp, y, 0);
- UINT8 *pri = BITMAP_ADDR8(state->m_sprites_bitmap_pri, y, 0);
+ UINT16 *dest = &dest_bmp->pix16(y);
+ UINT8 *pri = &state->m_sprites_bitmap_pri->pix8(y);
int x, x_index = x_index_base;
for( x=sx; x<ex; x++ )
@@ -424,10 +424,10 @@ static void copy_sprites(running_machine &machine, bitmap_t *bitmap, bitmap_t *s
int y;
for( y=cliprect->min_y; y<=cliprect->max_y; y++ )
{
- UINT16 *source = BITMAP_ADDR16(sprites_bitmap, y, 0);
- UINT16 *dest = BITMAP_ADDR16(bitmap, y, 0);
- UINT8 *dest_pri = BITMAP_ADDR8(priority_bitmap, y, 0);
- UINT8 *source_pri = BITMAP_ADDR8(state->m_sprites_bitmap_pri, y, 0);
+ 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;
for( x=cliprect->min_x; x<=cliprect->max_x; x++ )
@@ -460,7 +460,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 ?)
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
+ 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);
diff --git a/src/mame/drivers/littlerb.c b/src/mame/drivers/littlerb.c
index f2b117e6d6c..5b411705c5b 100644
--- a/src/mame/drivers/littlerb.c
+++ b/src/mame/drivers/littlerb.c
@@ -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_ADDR16(bitmap, 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_ADDR16(bitmap, 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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/luckgrln.c b/src/mame/drivers/luckgrln.c
index 1c86afa6f44..68d92237a61 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(bitmap, cliprect, 0);
+ bitmap->fill(0, *cliprect);
for (i= 0;i < 64;i++)
{
diff --git a/src/mame/drivers/m79amb.c b/src/mame/drivers/m79amb.c
index 596437d5c86..dda9dc2be28 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_ADDR32(bitmap, 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 2ff38f7a47d..154d0ee1118 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(bitmap, cliprect, get_black_pen(screen.machine())); //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_ADDR32(bitmap, 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_ADDR32(bitmap, 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_ADDR32(bitmap, 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_ADDR32(bitmap, 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_ADDR32(bitmap, 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_ADDR32(bitmap, 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 e6fce89efbf..47cad15c981 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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 cb532cefd88..596ad50f89a 100644
--- a/src/mame/drivers/marinedt.c
+++ b/src/mame/drivers/marinedt.c
@@ -511,24 +511,24 @@ static SCREEN_UPDATE( marinedt )
marinedt_state *state = screen.machine().driver_data<marinedt_state>();
int sx, sy;
- bitmap_fill(state->m_tile, NULL, 0);
+ state->m_tile->fill(0);
tilemap_draw(state->m_tile, cliprect, state->m_tx_tilemap, 0, 0);
- bitmap_fill(state->m_obj1, NULL, 0);
+ state->m_obj1->fill(0);
drawgfx_transpen(state->m_obj1, NULL, 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);
- bitmap_fill(state->m_obj2, NULL, 0);
+ state->m_obj2->fill(0);
drawgfx_transpen(state->m_obj2, NULL, 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(bitmap, NULL, 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);
@@ -550,10 +550,10 @@ static SCREEN_UPDATE( marinedt )
if (x < cliprect->min_x || x > cliprect->max_x || y < cliprect->min_y || y > cliprect->max_y)
continue;
- if (*BITMAP_ADDR16(state->m_obj1, sy, sx) == 0)
+ if (state->m_obj1->pix16(sy, sx) == 0)
continue;
- if (*BITMAP_ADDR16(state->m_tile, y, x) != 0)
+ if (state->m_tile->pix16(y, x) != 0)
{
state->m_coll = 0x08;
@@ -586,10 +586,10 @@ static SCREEN_UPDATE( marinedt )
if (xx < 0 || xx >= 32 || yy < 0 || yy >= 32)
continue;
- if (*BITMAP_ADDR16(state->m_obj1, sy, sx) == 0)
+ if (state->m_obj1->pix16(sy, sx) == 0)
continue;
- if (*BITMAP_ADDR16(state->m_obj2, yy, xx) != 0)
+ if (state->m_obj2->pix16(yy, xx) != 0)
{
state->m_collh = 0x80;
diff --git a/src/mame/drivers/maygayv1.c b/src/mame/drivers/maygayv1.c
index 15719bdc601..ac114dfdb42 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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_ADDR16(bitmap, sl, 0);
+ 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 352de1801ba..7db60f8edd6 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(bitmap, NULL, 0);
+ bitmap->fill(0);
// logerror("-->frame\n");
if (planes_enabled[3])
@@ -194,17 +194,17 @@ SCREEN_UPDATE( test_vcu )
if (planes_enabled[2])
copybitmap_trans(bitmap, state->m_tmpbitmaps[2], 0, 0, 0, 0,cliprect, color_base);
- bitmap_fill(state->m_tmpbitmaps[2], NULL, color_base);
+ state->m_tmpbitmaps[2]->fill(color_base);
if (planes_enabled[1])
copybitmap_trans(bitmap, state->m_tmpbitmaps[1], 0, 0, 0, 0,cliprect, color_base);
- bitmap_fill(state->m_tmpbitmaps[1], NULL, color_base);
+ state->m_tmpbitmaps[1]->fill(color_base);
if (planes_enabled[0])
copybitmap_trans(bitmap, state->m_tmpbitmaps[0], 0, 0, 0, 0,cliprect, color_base);
- bitmap_fill(state->m_tmpbitmaps[0], NULL, color_base);
+ state->m_tmpbitmaps[0]->fill(color_base);
if (screen.machine().input().code_pressed_once(KEYCODE_1)) /* plane 1 */
planes_enabled[0] ^= 1;
@@ -281,7 +281,7 @@ static SCREEN_UPDATE( mazerbla )
// if (state->m_game_id == GREATGUN)
// color_base = 0x00;
- // bitmap_fill(bitmap, NULL, 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);
@@ -464,7 +464,7 @@ static READ8_HANDLER( vcu_set_gfx_addr_r )
}
if (((state->m_xpos + x) < 256) && ((state->m_ypos + y) < 256) )
- *BITMAP_ADDR16(state->m_tmpbitmaps[state->m_plane], state->m_ypos + y, state->m_xpos + x) = col;
+ state->m_tmpbitmaps[state->m_plane]->pix16(state->m_ypos + y, state->m_xpos + x) = col;
bits += 2;
}
@@ -493,7 +493,7 @@ static READ8_HANDLER( vcu_set_gfx_addr_r )
/* color = 4 MSB = front PEN, 4 LSB = background PEN */
if (((state->m_xpos + x) < 256) && ((state->m_ypos + y) < 256))
- *BITMAP_ADDR16(state->m_tmpbitmaps[state->m_plane], state->m_ypos + y, state->m_xpos + x) = data ? color_base | ((state->m_color1 & 0xf0) >> 4): color_base | ((state->m_color1 & 0x0f));
+ state->m_tmpbitmaps[state->m_plane]->pix16(state->m_ypos + y, state->m_xpos + x) = data ? color_base | ((state->m_color1 & 0xf0) >> 4): color_base | ((state->m_color1 & 0x0f));
bits += 1;
}
@@ -521,7 +521,7 @@ static READ8_HANDLER( vcu_set_gfx_addr_r )
col = color_base | data;
if (((state->m_xpos + x) < 256) && ((state->m_ypos + y) < 256))
- *BITMAP_ADDR16(state->m_tmpbitmaps[state->m_plane], state->m_ypos + y, state->m_xpos + x) = col;
+ state->m_tmpbitmaps[state->m_plane]->pix16(state->m_ypos + y, state->m_xpos + x) = col;
bits += 4;
}
@@ -622,7 +622,7 @@ static READ8_HANDLER( vcu_set_clr_addr_r )
}
if (((state->m_xpos + x) < 256) && ((state->m_ypos + y) < 256))
- *BITMAP_ADDR16(state->m_tmpbitmaps[state->m_plane], state->m_ypos + y, state->m_xpos + x) = col;
+ state->m_tmpbitmaps[state->m_plane]->pix16(state->m_ypos + y, state->m_xpos + x) = col;
bits += 2;
}
diff --git a/src/mame/drivers/mediagx.c b/src/mame/drivers/mediagx.c
index 8b5ee0ba4c8..daf0c36c71b 100644
--- a/src/mame/drivers/mediagx.c
+++ b/src/mame/drivers/mediagx.c
@@ -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_ADDR32(bitmap, j, 0);
+ UINT32 *p = &bitmap->pix32(j);
for (i=x; i < x+8; i++)
{
UINT8 pen = dp[index++];
@@ -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_ADDR32(bitmap, j, 0);
+ 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_ADDR32(bitmap, j, 0);
+ 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_ADDR32(bitmap, j, 0);
+ UINT32 *p = &bitmap->pix32(j);
UINT16 *si = &framebuf[j * (line_delta/2)];
for (i=0; i < state->m_frame_width; i++)
{
@@ -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(bitmap, cliprect, 0);
+ 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 f1366fce5e9..ff5020d0471 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_ADDR16(bitmap, 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 3cd59babdc4..bd3b11ae0ed 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_ADDR32(bitmap, 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 8b75c6c2abe..c82894bd509 100644
--- a/src/mame/drivers/meritm.c
+++ b/src/mame/drivers/meritm.c
@@ -382,7 +382,7 @@ static SCREEN_UPDATE( meritm )
popmessage("Layer 1 %sabled",state->m_layer1_enabled ? "en" : "dis");
}
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
if ( state->m_layer0_enabled )
{
diff --git a/src/mame/drivers/metalmx.c b/src/mame/drivers/metalmx.c
index 77512380fd8..9b169a7c1e1 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_ADDR16(bitmap, y, 0);
+ 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 974a3232012..f6fa3a2b740 100644
--- a/src/mame/drivers/midas.c
+++ b/src/mame/drivers/midas.c
@@ -190,7 +190,7 @@ static SCREEN_UPDATE( midas )
}
#endif
- bitmap_fill(bitmap,cliprect,4095);
+ 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 40567e88d93..04a6a788afe 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_ADDR32(bitmap, 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 812170359a2..ff22d3eb9a6 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(bitmap, cliprect, 256); /* 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/missb2.c b/src/mame/drivers/missb2.c
index ee43dc738a9..1036ad12cfa 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(bitmap, cliprect, 255);
+ 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 01cb1721e5e..0c18ba46568 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 = (UINT16 *)bitmap->base + y * bitmap->rowpixels;
+ 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 54085f7b640..5f3c989deab 100644
--- a/src/mame/drivers/mjsister.c
+++ b/src/mame/drivers/mjsister.c
@@ -79,8 +79,8 @@ static void mjsister_plot0( running_machine &machine, int offset, UINT8 data )
c1 = (data & 0x0f) + state->m_colorbank * 0x20;
c2 = ((data & 0xf0) >> 4) + state->m_colorbank * 0x20;
- *BITMAP_ADDR16(state->m_tmpbitmap0, y, x * 2 + 0) = c1;
- *BITMAP_ADDR16(state->m_tmpbitmap0, y, x * 2 + 1) = c2;
+ state->m_tmpbitmap0->pix16(y, x * 2 + 0) = c1;
+ state->m_tmpbitmap0->pix16(y, x * 2 + 1) = c2;
}
static void mjsister_plot1( running_machine &machine, int offset, UINT8 data )
@@ -99,8 +99,8 @@ static void mjsister_plot1( running_machine &machine, int offset, UINT8 data )
if (c2)
c2 += state->m_colorbank * 0x20 + 0x10;
- *BITMAP_ADDR16(state->m_tmpbitmap1, y, x * 2 + 0) = c1;
- *BITMAP_ADDR16(state->m_tmpbitmap1, y, x * 2 + 1) = c2;
+ state->m_tmpbitmap1->pix16(y, x * 2 + 0) = c1;
+ state->m_tmpbitmap1->pix16(y, x * 2 + 1) = c2;
}
static WRITE8_HANDLER( mjsister_videoram_w )
@@ -140,13 +140,13 @@ static SCREEN_UPDATE( mjsister )
{
for (i = 0; i < 256; i++)
for (j = 0; j < 4; j++)
- *BITMAP_ADDR16(bitmap, 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);
}
else
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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 ccf18843331..b6f9c2e868f 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_ADDR16(bitmap, 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 172811bc725..0d5eec77598 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(bitmap, cliprect, 0);
+ 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 73749d1052d..d2e0c778591 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(bitmap,cliprect,0);
+ 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 eeced491b34..0a40b28f78e 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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 9df5a898c85..544d8ddcaa8 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(bitmap, cliprect, 0);
+ 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 b90e61278cd..8c817f6770b 100644
--- a/src/mame/drivers/mwarr.c
+++ b/src/mame/drivers/mwarr.c
@@ -471,7 +471,7 @@ static SCREEN_UPDATE( mwarr )
mwarr_state *state = screen.machine().driver_data<mwarr_state>();
int i;
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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 78a4c466d0e..5ab90fc6bc2 100644
--- a/src/mame/drivers/namcoic.c
+++ b/src/mame/drivers/namcoic.c
@@ -271,7 +271,7 @@ static void zdrawgfxzoom(
int scalex, int scaley, int zpos )
{
if (!scalex || !scaley) return;
- if (dest_bmp->bpp == 16)
+ if (dest_bmp->bpp() == 16)
{
if( gfx )
{
@@ -347,8 +347,8 @@ static void zdrawgfxzoom(
for( y=sy; y<ey; y++ )
{
const UINT8 *source = source_base + (y_index>>16) * gfx->line_modulo;
- UINT16 *dest = BITMAP_ADDR16(dest_bmp, y, 0);
- UINT8 *pri = BITMAP_ADDR8(priority_bitmap, y, 0);
+ UINT16 *dest = &dest_bmp->pix16(y);
+ UINT8 *pri = &priority_bitmap->pix8(y);
int x, x_index = x_index_base;
if( mPalXOR )
{
@@ -417,7 +417,7 @@ namcos2_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle
int loop;
if( pri==0 )
{
- bitmap_fill( machine.priority_bitmap, cliprect , 0);
+ machine.priority_bitmap->fill(0, *cliprect );
}
for( loop=0; loop < 128; loop++ )
{
@@ -528,7 +528,7 @@ namcos2_draw_sprites_metalhawk(running_machine &machine, bitmap_t *bitmap, const
int loop;
if( pri==0 )
{
- bitmap_fill( machine.priority_bitmap, cliprect , 0);
+ machine.priority_bitmap->fill(0, *cliprect );
}
for( loop=0; loop < 128; loop++ )
{
@@ -773,7 +773,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;
@@ -947,7 +947,7 @@ namco_obj_draw(running_machine &machine, bitmap_t *bitmap, const rectangle *clip
// int offs = spriteram16[0x18000/2]; /* end-of-sprite-list */
if( pri==0 )
{
- bitmap_fill( machine.priority_bitmap, cliprect , 0);
+ machine.priority_bitmap->fill(0, *cliprect );
}
// if( offs==0 )
{ /* boot */
@@ -1219,7 +1219,7 @@ DrawRozHelper(
const struct RozParam *rozInfo )
{
- if( (bitmap->bpp == 16) &&
+ if( (bitmap->bpp() == 16) &&
(namcos2_gametype != NAMCOFL_SPEED_RACER) &&
(namcos2_gametype != NAMCOFL_FINAL_LAP_R))
{
@@ -1235,14 +1235,14 @@ DrawRozHelper(
int x = sx;
UINT32 cx = startx;
UINT32 cy = starty;
- UINT16 *dest = BITMAP_ADDR16(bitmap, 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( *BITMAP_ADDR8(flagsbitmap, ypos, xpos)&TILEMAP_PIXEL_LAYER0 )
+ if( flagsbitmap->pix8(ypos, xpos)&TILEMAP_PIXEL_LAYER0 )
{
- *dest = *BITMAP_ADDR16(srcbitmap,ypos,xpos)+rozInfo->color;
+ *dest = srcbitmap->pix16(ypos, xpos)+rozInfo->color;
}
cx += rozInfo->incxx;
cy += rozInfo->incxy;
@@ -1286,7 +1286,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; }
@@ -1618,11 +1618,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 = BITMAP_ADDR16(pSourceBitmap, sourcey&(ROAD_TILEMAP_HEIGHT-1), 0);
+ const UINT16 *pSourceGfx = &pSourceBitmap->pix16(sourcey&(ROAD_TILEMAP_HEIGHT-1));
unsigned dsourcex = (ROAD_TILEMAP_WIDTH<<16)/zoomx;
if( dsourcex )
{
- UINT16 *pDest = BITMAP_ADDR16(bitmap, i, 0);
+ 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 dc4b9233cbd..ef5f1b02dc3 100644
--- a/src/mame/drivers/namcos23.c
+++ b/src/mame/drivers/namcos23.c
@@ -1655,7 +1655,7 @@ static void render_scanline(void *dest, INT32 scanline, const poly_extent *exten
float dv = extent->param[2].dpdx;
float dl = extent->param[3].dpdx;
bitmap_t *bitmap = (bitmap_t *)dest;
- UINT32 *img = BITMAP_ADDR32(bitmap, scanline, extent->startx);
+ UINT32 *img = &bitmap->pix32(scanline, extent->startx);
for(int x = extent->startx; x < extent->stopx; x++) {
float z = w ? 1/w : 0;
@@ -2077,7 +2077,7 @@ static void render_flush(running_machine &machine, bitmap_t *bitmap)
qsort(render.poly_order, render.poly_count, sizeof(namcos23_poly_entry *), render_poly_compare);
- const static rectangle scissor = { 0, 639, 0, 479 };
+ const static rectangle scissor(0, 639, 0, 479);
for(int i=0; i<render.poly_count; i++) {
const namcos23_poly_entry *p = render.poly_order[i];
@@ -2136,7 +2136,7 @@ static VIDEO_START( ss23 )
static SCREEN_UPDATE( ss23 )
{
namcos23_state *state = screen.machine().driver_data<namcos23_state>();
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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 ebeffb96c76..fdb33a2f32d 100644
--- a/src/mame/drivers/neoprint.c
+++ b/src/mame/drivers/neoprint.c
@@ -93,7 +93,7 @@ static void draw_layer(running_machine &machine, bitmap_t *bitmap,const rectangl
SCREEN_UPDATE(neoprint)
{
- bitmap_fill(bitmap, cliprect, 0);
+ 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(bitmap, cliprect, 0);
+ 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 4117e61503d..73f62325813 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_ADDR16(bitmap, 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 405c48dfe8f..47e6ff4ce1e 100644
--- a/src/mame/drivers/nmg5.c
+++ b/src/mame/drivers/nmg5.c
@@ -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_ADDR16(bitmap, 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_ADDR16(bitmap, 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_ADDR16(bitmap, 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_ADDR16(bitmap, 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 b9e0378c0cc..6468bdb6ece 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(bitmap, cliprect, screen.machine().pens[0]); //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 f7c03c3d202..d8c7e91737d 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(bitmap, cliprect, screen.machine().pens[0]);
+ 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 1e2710aac7b..492d5d333a4 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_ADDR32(bitmap, 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_ADDR32(bitmap, 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_ADDR32(bitmap, y, x) = pens[color];
+ bitmap->pix32(y, x) = pens[color];
}
if (delay_counter == 0)
diff --git a/src/mame/drivers/othello.c b/src/mame/drivers/othello.c
index 2cf4e10ae45..69571c31416 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_ADDR16(bitmap, 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 b3b5b14e298..5fb92e17430 100644
--- a/src/mame/drivers/panicr.c
+++ b/src/mame/drivers/panicr.c
@@ -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(bitmap,cliprect,get_black_pen(screen.machine()));
+ 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 89e3fed1f5a..627d3848ac6 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_ADDR16(bitmap, 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_ADDR16(bitmap, 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_ADDR16(bitmap, 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_ADDR16(bitmap, 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 92a3526831d..474f18ada3a 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(bitmap,cliprect,get_black_pen(screen.machine()));
+ 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_ADDR16(bitmap, 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 4bfefc0532a..810b53b458e 100644
--- a/src/mame/drivers/photon2.c
+++ b/src/mame/drivers/photon2.c
@@ -113,7 +113,7 @@ static SCREEN_EOF( spectrum )
INLINE void spectrum_plot_pixel(bitmap_t *bitmap, int x, int y, UINT32 color)
{
- *BITMAP_ADDR16(bitmap, 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(bitmap, cliprect, state->m_spectrum_port_fe & 0x07);
+ 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 29859e1f235..e407a7e4702 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
/* FIXME: color is a bit of a mystery */
{
diff --git a/src/mame/drivers/progolf.c b/src/mame/drivers/progolf.c
index 07308f8410f..b6e629e58ae 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_ADDR16(bitmap, 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 de25184ef6c..b3f8e24480c 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(bitmap, cliprect, state->m_bgcolor);
+ 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 0d109bd4113..b1f361c932e 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(bitmap, cliprect, screen.machine().pens[0]); //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_ADDR16(bitmap, (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 2e309608d5c..f8a33154c25 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_ADDR16(bitmap, 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_ADDR16(bitmap, 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_ADDR16(bitmap, 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_ADDR16(bitmap, 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 de3cdd13a34..55780d56f89 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(bitmap,cliprect,get_black_pen(screen.machine()));
+ else bitmap->fill(get_black_pen(screen.machine()), *cliprect);
-bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine()));
+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 bce26e4b8fa..84d056d7c50 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_ADDR32(bitmap, 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 ed738f0e1cf..a8a06321d64 100644
--- a/src/mame/drivers/r2dx_v33.c
+++ b/src/mame/drivers/r2dx_v33.c
@@ -181,7 +181,7 @@ static VIDEO_START( rdx_v33 )
static SCREEN_UPDATE( rdx_v33 )
{
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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 2d4c5c2cf12..a46554c4b87 100644
--- a/src/mame/drivers/rabbit.c
+++ b/src/mame/drivers/rabbit.c
@@ -240,7 +240,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const recta
UINT32 *source = (state->m_spriteram+ (todraw*2))-2;
UINT32 *finish = state->m_spriteram;
-// bitmap_fill(state->m_sprite_bitmap, &state->m_sprite_clip, 0x0); // sloooow
+// state->m_sprite_bitmap->fill(0x0, state->m_sprite_clip); // sloooow
while( source>=finish )
{
@@ -291,7 +291,7 @@ static void rabbit_clearspritebitmap( running_machine &machine, bitmap_t *bitmap
for (y=0; y<amounty;y++)
{
- dstline = BITMAP_ADDR16(state->m_sprite_bitmap, (starty+y)&0xfff, 0);
+ dstline = &state->m_sprite_bitmap->pix16((starty+y)&0xfff);
memset(dstline+startx,0x00,amountx*2);
}
}
@@ -332,8 +332,8 @@ static void draw_sprite_bitmap( running_machine &machine, bitmap_t *bitmap, cons
if ((ydrawpos >= cliprect->min_y) && (ydrawpos <= cliprect->max_y))
{
- srcline = BITMAP_ADDR16(state->m_sprite_bitmap, (starty+(y>>7))&0xfff, 0);
- dstline = BITMAP_ADDR16(bitmap, ydrawpos, 0);
+ srcline = &state->m_sprite_bitmap->pix16((starty+(y>>7))&0xfff);
+ dstline = &bitmap->pix16(ydrawpos);
for (x=0;x<xsize;x+=0x80)
{
@@ -434,7 +434,7 @@ static SCREEN_UPDATE(rabbit)
rabbit_state *state = screen.machine().driver_data<rabbit_state>();
int prilevel;
- bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine()));
+ 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 112eaa7856c..07d5d9836fb 100644
--- a/src/mame/drivers/raiden2.c
+++ b/src/mame/drivers/raiden2.c
@@ -889,7 +889,7 @@ static VIDEO_START( raiden2 )
static SCREEN_UPDATE( raiden2 )
{
raiden2_state *state = screen.machine().driver_data<raiden2_state>();
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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 2ac4709689b..1d3e10cb2e4 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_ADDR32(bitmap, 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 b96e197ab39..87a99736628 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_ADDR16(bitmap, 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 028a9bdd0bc..328964483e4 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_ADDR16(bitmap, 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/sbowling.c b/src/mame/drivers/sbowling.c
index 536b8ed27de..e3d8004e9ee 100644
--- a/src/mame/drivers/sbowling.c
+++ b/src/mame/drivers/sbowling.c
@@ -81,7 +81,7 @@ static void plot_pixel_sbw(bitmap_t *tmpbitmap, int x, int y, int col, int flip)
y = 255-y;
x = 247-x;
}
- *BITMAP_ADDR16(tmpbitmap, y, x) = col;
+ tmpbitmap->pix16(y, x) = col;
}
static WRITE8_HANDLER( sbw_videoram_w )
@@ -112,7 +112,7 @@ static SCREEN_UPDATE(sbowling)
{
sbowling_state *state = screen.machine().driver_data<sbowling_state>();
- bitmap_fill(bitmap, cliprect, 0x18);
+ 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);
return 0;
diff --git a/src/mame/drivers/segac2.c b/src/mame/drivers/segac2.c
index cd0ccc0147a..fdfd9213dff 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(bitmap, NULL, get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()));
return 0;
}
diff --git a/src/mame/drivers/segald.c b/src/mame/drivers/segald.c
index 9ecaccc031e..fcc5eaff936 100644
--- a/src/mame/drivers/segald.c
+++ b/src/mame/drivers/segald.c
@@ -91,7 +91,7 @@ static void astron_draw_sprites(running_machine &machine, bitmap_t *bitmap, cons
static SCREEN_UPDATE( astron )
{
- bitmap_fill(bitmap, cliprect, 0);
+ 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 a54a836c846..c26ee13da26 100644
--- a/src/mame/drivers/sfbonus.c
+++ b/src/mame/drivers/sfbonus.c
@@ -934,8 +934,8 @@ static SCREEN_UPDATE(sfbonus)
globalyscroll += 8;
globalxscroll += 8;
- bitmap_fill(bitmap,cliprect,screen.machine().pens[0]);
- bitmap_fill(state->m_temp_reel_bitmap,cliprect,screen.machine().pens[0]);
+ 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);
@@ -947,8 +947,8 @@ static SCREEN_UPDATE(sfbonus)
{
for (x=0;x<512;x++)
{
- UINT16* src = BITMAP_ADDR16(state->m_temp_reel_bitmap, y, x);
- UINT16* dst = BITMAP_ADDR16(bitmap, y, x);
+ UINT16* src = &state->m_temp_reel_bitmap->pix16(y, x);
+ UINT16* dst = &bitmap->pix16(y, x);
if ((src[0]&0x100)==0x000)
dst[0] = src[0];
@@ -973,8 +973,8 @@ static SCREEN_UPDATE(sfbonus)
{
for (x=0;x<512;x++)
{
- UINT16* src = BITMAP_ADDR16(state->m_temp_reel_bitmap, y, x);
- UINT16* dst = BITMAP_ADDR16(bitmap, y, x);
+ UINT16* src = &state->m_temp_reel_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/shanghai.c b/src/mame/drivers/shanghai.c
index c389f16adaf..6e5e4013326 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_ADDR16(bitmap, y, x) = src & 0x00ff;
- *BITMAP_ADDR16(bitmap, 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_ADDR16(bitmap, y, x + sx) = src & 0x00ff;
- *BITMAP_ADDR16(bitmap, 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 843e87ea8e9..71ac1b402d1 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_ADDR16(bitmap, 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 0f51f213e01..0019fa0deb8 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_ADDR16(bitmap, y, x ) = ((src & 0x000f) >> 0) << 0;
- *BITMAP_ADDR16(bitmap, y, x + 1) = ((src & 0x00f0) >> 4) << 0;
- *BITMAP_ADDR16(bitmap, y, x + 2) = ((src & 0x0f00) >> 8) << 0;
- *BITMAP_ADDR16(bitmap, 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_ADDR16(bitmap, y, x + sx ) = ((src & 0x000f) >> 0) << 0;
- *BITMAP_ADDR16(bitmap, y, x + sx + 1) = ((src & 0x00f0) >> 4) << 0;
- *BITMAP_ADDR16(bitmap, y, x + sx + 2) = ((src & 0x0f00) >> 8) << 0;
- *BITMAP_ADDR16(bitmap, 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 170de8f6b85..dae821b89f4 100644
--- a/src/mame/drivers/sigmab98.c
+++ b/src/mame/drivers/sigmab98.c
@@ -265,7 +265,7 @@ static SCREEN_UPDATE(sigmab98)
}
#endif
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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 f620090f629..c372637220f 100644
--- a/src/mame/drivers/skeetsht.c
+++ b/src/mame/drivers/skeetsht.c
@@ -63,7 +63,7 @@ static void skeetsht_scanline_update(screen_device &screen, bitmap_t *bitmap, in
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_ADDR32(bitmap, scanline, 0);
+ 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 3e7815f03dd..163c7151a32 100644
--- a/src/mame/drivers/skimaxx.c
+++ b/src/mame/drivers/skimaxx.c
@@ -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_ADDR16(bitmap, scanline, 0);
+ 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 dc879792055..108673c4a4a 100644
--- a/src/mame/drivers/skylncr.c
+++ b/src/mame/drivers/skylncr.c
@@ -148,20 +148,20 @@ static VIDEO_START( skylncr )
tilemap_set_transparent_pen(state->m_tmap, 0);
}
-// are these hardcoded, or registers?
-static const rectangle visible1 = { 0*8, (20+48)*8-1, 4*8, (4+7)*8-1 };
-static const rectangle visible2 = { 0*8, (20+48)*8-1, 12*8, (12+7)*8-1 };
-static const rectangle visible3 = { 0*8, (20+48)*8-1, 20*8, (20+7)*8-1 };
-
static SCREEN_UPDATE( skylncr )
{
skylncr_state *state = screen.machine().driver_data<skylncr_state>();
int i;
- bitmap_fill(bitmap,cliprect,0);
+ bitmap->fill(0, *cliprect);
tilemap_draw(bitmap,cliprect, state->m_reel_1_tilemap, 0, 0);
+ // are these hardcoded, or registers?
+ const rectangle visible1(0*8, (20+48)*8-1, 4*8, (4+7)*8-1);
+ const rectangle visible2(0*8, (20+48)*8-1, 12*8, (12+7)*8-1);
+ const rectangle visible3(0*8, (20+48)*8-1, 20*8, (20+7)*8-1);
+
for (i= 0;i < 64;i++)
{
tilemap_set_scrolly(state->m_reel_2_tilemap, i, state->m_reelscroll2[i]);
diff --git a/src/mame/drivers/sliver.c b/src/mame/drivers/sliver.c
index 8ced54f29e9..5a2c769ae27 100644
--- a/src/mame/drivers/sliver.c
+++ b/src/mame/drivers/sliver.c
@@ -197,9 +197,9 @@ static void plot_pixel_rgb(sliver_state *state, int x, int y, UINT32 r, UINT32 g
if (y < 0 || x < 0 || x > 383 || y > 255)
return;
- if (state->m_bitmap_bg->bpp == 32)
+ if (state->m_bitmap_bg->bpp() == 32)
{
- *BITMAP_ADDR32(state->m_bitmap_bg, y, x) = r | (g<<8) | (b<<16);
+ state->m_bitmap_bg->pix32(y, x) = r | (g<<8) | (b<<16);
}
else
{
@@ -207,7 +207,7 @@ static void plot_pixel_rgb(sliver_state *state, int x, int y, UINT32 r, UINT32 g
g>>=3;
b>>=3;
color = r|(g<<5)|(b<<10);
- *BITMAP_ADDR16(state->m_bitmap_bg, y, x) = color;
+ state->m_bitmap_bg->pix16(y, x) = color;
}
}
@@ -224,9 +224,9 @@ static void plot_pixel_pal(running_machine &machine, int x, int y, int addr)
g=(state->m_colorram[addr+0x100] << 2) | (state->m_colorram[addr+0x100] & 3);
r=(state->m_colorram[addr+0x200] << 2) | (state->m_colorram[addr+0x200] & 3);
- if (state->m_bitmap_fg->bpp == 32)
+ if (state->m_bitmap_fg->bpp() == 32)
{
- *BITMAP_ADDR32(state->m_bitmap_fg, y, x) = r | (g<<8) | (b<<16);
+ state->m_bitmap_fg->pix32(y, x) = r | (g<<8) | (b<<16);
}
else
{
@@ -234,7 +234,7 @@ static void plot_pixel_pal(running_machine &machine, int x, int y, int addr)
g>>=3;
b>>=3;
color = r|(g<<5)|(b<<10);
- *BITMAP_ADDR16(state->m_bitmap_fg, y, x) = color;
+ state->m_bitmap_fg->pix16(y, x) = color;
}
}
@@ -299,7 +299,7 @@ static WRITE16_HANDLER( fifo_clear_w )
{
sliver_state *state = space->machine().driver_data<sliver_state>();
- bitmap_fill(state->m_bitmap_fg, 0,0);
+ state->m_bitmap_fg->fill(0);
state->m_fptr=0;
state->m_tmp_counter=0;
}
@@ -324,7 +324,7 @@ static void render_jpeg(running_machine &machine)
int addr = state->m_jpeg_addr;
UINT8 *rom;
- bitmap_fill(state->m_bitmap_bg, 0, 0);
+ state->m_bitmap_bg->fill(0);
if (addr < 0)
{
return;
diff --git a/src/mame/drivers/slotcarn.c b/src/mame/drivers/slotcarn.c
index 2023b52408b..9db907b7ab8 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_ADDR32(bitmap, 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 04929b418c1..312c872b340 100644
--- a/src/mame/drivers/sms.c
+++ b/src/mame/drivers/sms.c
@@ -456,7 +456,7 @@ static WRITE8_HANDLER(video_w)
for ( x = xstart; x < xstart + width; x++ )
{
if ( y < 256 )
- *BITMAP_ADDR16(state->m_bitmap, y, x) = color;
+ state->m_bitmap->pix16(y, x) = color;
}
}
}
diff --git a/src/mame/drivers/snowbros.c b/src/mame/drivers/snowbros.c
index 6f0d268e9fa..871e56723b0 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(bitmap,cliprect,0xf0);
+ bitmap->fill(0xf0, *cliprect);
pandora_update(pandora, bitmap, cliprect);
return 0;
}
diff --git a/src/mame/drivers/spaceg.c b/src/mame/drivers/spaceg.c
index d997b3ba1e3..89ba84995c1 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_ADDR16(bitmap, 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 9117b4f8f8a..2ce0587c946 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_ADDR32(bitmap, y, x) = (b) | ((g)<<8) | ((r)<<16); \
+ bitmap->pix32(y, x) = (b) | ((g)<<8) | ((r)<<16); \
}
static SCREEN_UPDATE(speglsht)
@@ -360,13 +360,13 @@ static SCREEN_UPDATE(speglsht)
}
//draw st0016 gfx to temporary bitmap (indexed 16)
- bitmap_fill(state->m_bitmap,NULL,0);
+ state->m_bitmap->fill(0);
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++)
{
- UINT16 *srcline = BITMAP_ADDR16(state->m_bitmap, y, 0);
+ UINT16 *srcline = &state->m_bitmap->pix16(y);
for(x=cliprect->min_x; x<cliprect->max_x;x++)
{
if(srcline[x])
diff --git a/src/mame/drivers/spiders.c b/src/mame/drivers/spiders.c
index 74a6ca6633b..10431f44aeb 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_ADDR32(bitmap, 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 73d157e9c47..9c364ec46fd 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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 c6d2d52e461..2b391bb9463 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_ADDR32(bitmap, 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(bitmap,cliprect,0);
+ 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_ADDR32(bitmap, 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 6d5cd3acb00..94a005d8aa7 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(bitmap,cliprect,0);
+ bitmap->fill(0, *cliprect);
#if 0
/* debug */
diff --git a/src/mame/drivers/ssfindo.c b/src/mame/drivers/ssfindo.c
index e5a4fbedfd6..a976ab21e01 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_ADDR16(bitmap, y, x+0) = state->m_vram[s]&0xff;
- *BITMAP_ADDR16(bitmap, y, x+1) = (state->m_vram[s]>>8)&0xff;
- *BITMAP_ADDR16(bitmap, y, x+2) = (state->m_vram[s]>>16)&0xff;
- *BITMAP_ADDR16(bitmap, 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 6125df33dbc..d7bbfd3d1c6 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_ADDR32(bitmap, 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_ADDR32(bitmap, 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 46aaf3c12d5..e48594d8c95 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_ADDR32(bitmap, y, x) = pen;
+ bitmap->pix32(y, x) = pen;
x = x + 1;
}
@@ -119,7 +119,7 @@ static SCREEN_UPDATE( sstrngr2 )
data = data >> 1;
}
- *BITMAP_ADDR32(bitmap, 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 23d980a7137..6ede0c88ba8 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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 7da06905474..f0a66b55797 100644
--- a/src/mame/drivers/subsino.c
+++ b/src/mame/drivers/subsino.c
@@ -454,21 +454,16 @@ static VIDEO_START( stisub )
static SCREEN_UPDATE( subsino )
{
subsino_state *state = screen.machine().driver_data<subsino_state>();
- bitmap_fill(bitmap,cliprect,0);
+ bitmap->fill(0, *cliprect);
tilemap_draw(bitmap,cliprect, state->m_tmap, 0, 0);
return 0;
}
-// are these hardcoded, or registers?
-static const rectangle visible1 = { 0*8, (14+48)*8-1, 4*8, (4+7)*8-1 };
-static const rectangle visible2 = { 0*8, (14+48)*8-1, 10*8, (10+7)*8-1 };
-static const rectangle visible3 = { 0*8, (14+48)*8-1, 18*8, (18+7)*8-1 };
-
static SCREEN_UPDATE( subsino_reels )
{
subsino_state *state = screen.machine().driver_data<subsino_state>();
int i;
- bitmap_fill(bitmap,cliprect,0);
+ bitmap->fill(0, *cliprect);
for (i= 0;i < 64;i++)
{
@@ -479,6 +474,11 @@ static SCREEN_UPDATE( subsino_reels )
if (state->m_out_c&0x08)
{
+ // are these hardcoded, or registers?
+ const rectangle visible1(0*8, (14+48)*8-1, 4*8, (4+7)*8-1);
+ const rectangle visible2(0*8, (14+48)*8-1, 10*8, (10+7)*8-1);
+ const rectangle visible3(0*8, (14+48)*8-1, 18*8, (18+7)*8-1);
+
tilemap_draw(bitmap, &visible1, state->m_reel1_tilemap, 0, 0);
tilemap_draw(bitmap, &visible2, state->m_reel2_tilemap, 0, 0);
tilemap_draw(bitmap, &visible3, state->m_reel3_tilemap, 0, 0);
@@ -488,17 +488,12 @@ static SCREEN_UPDATE( subsino_reels )
return 0;
}
-// areas based on d-up game in attract mode
-static const rectangle stisub_visible1 = { 0, 511, 0, 87 };
-static const rectangle stisub_visible2 = { 0, 511, 88, 143 };
-static const rectangle stisub_visible3 = { 0, 511, 144, 223 };
-
static SCREEN_UPDATE( stisub_reels )
{
subsino_state *state = screen.machine().driver_data<subsino_state>();
int i;
- bitmap_fill(bitmap,cliprect,0);
+ bitmap->fill(0, *cliprect);
if (state->m_reel1_attr)
{
@@ -516,9 +511,14 @@ static SCREEN_UPDATE( stisub_reels )
if (state->m_out_c&0x08)
{
- tilemap_draw(bitmap, &stisub_visible1, state->m_reel1_tilemap, 0, 0);
- tilemap_draw(bitmap, &stisub_visible2, state->m_reel2_tilemap, 0, 0);
- tilemap_draw(bitmap, &stisub_visible3, state->m_reel3_tilemap, 0, 0);
+ // areas based on d-up game in attract mode
+ const rectangle visible1(0, 511, 0, 87);
+ const rectangle visible2(0, 511, 88, 143);
+ const rectangle visible3(0, 511, 144, 223);
+
+ tilemap_draw(bitmap, &visible1, state->m_reel1_tilemap, 0, 0);
+ tilemap_draw(bitmap, &visible2, state->m_reel2_tilemap, 0, 0);
+ tilemap_draw(bitmap, &visible3, state->m_reel3_tilemap, 0, 0);
}
tilemap_draw(bitmap,cliprect, state->m_tmap, 0, 0);
diff --git a/src/mame/drivers/subsino2.c b/src/mame/drivers/subsino2.c
index 331be539754..e7ea734bc2d 100644
--- a/src/mame/drivers/subsino2.c
+++ b/src/mame/drivers/subsino2.c
@@ -85,7 +85,7 @@ public:
UINT8 m_ss9601_byte_lo;
UINT8 m_ss9601_byte_lo2;
UINT8 *m_ss9601_reelrams[2];
- const rectangle *m_ss9601_reelrects;
+ rectangle m_ss9601_reelrects[3];
UINT8 m_ss9601_scrollctrl;
UINT8 m_ss9601_tilesize;
UINT8 m_ss9601_disable;
@@ -528,14 +528,6 @@ static WRITE8_HANDLER( ss9601_disable_w )
Video Update
***************************************************************************/
-static const rectangle mtrain_reelrects[3] = { { 0, 0, 0x00*8, 0x09*8-1 },
- { 0, 0, 0x09*8, 0x10*8-1 },
- { 0, 0, 0x10*8, 256-16-1 } };
-
-static const rectangle xtrain_reelrects[3] = { { 0, 0, 0x00*8, 0x08*8-1 },
- { 0, 0, 0x08*8, 0x18*8-1 },
- { 0, 0, 0x18*8, 256-16-1 } };
-
static VIDEO_START( subsino2 )
{
subsino2_state *state = machine.driver_data<subsino2_state>();
@@ -575,7 +567,9 @@ static VIDEO_START( subsino2 )
state->m_ss9601_reelrams[VRAM_LO] = auto_alloc_array(machine, UINT8, 0x2000);
memset(state->m_ss9601_reelrams[VRAM_HI], 0, 0x2000);
memset(state->m_ss9601_reelrams[VRAM_LO], 0, 0x2000);
- state->m_ss9601_reelrects = mtrain_reelrects;
+ state->m_ss9601_reelrects[0].set(0, 0, 0x00*8, 0x09*8-1);
+ state->m_ss9601_reelrects[1].set(0, 0, 0x09*8, 0x10*8-1);
+ state->m_ss9601_reelrects[2].set(0, 0, 0x10*8, 256-16-1);
/*
state_save_register_global_pointer(machine, state->m_ss9601_reelrams[VRAM_HI], 0x2000);
@@ -591,16 +585,16 @@ static VIDEO_START( subsino2 )
static VIDEO_START( mtrain )
{
- subsino2_state *state = machine.driver_data<subsino2_state>();
VIDEO_START_CALL( subsino2 );
- state->m_ss9601_reelrects = mtrain_reelrects;
}
static VIDEO_START( xtrain )
{
subsino2_state *state = machine.driver_data<subsino2_state>();
VIDEO_START_CALL( subsino2 );
- state->m_ss9601_reelrects = xtrain_reelrects;
+ state->m_ss9601_reelrects[0].set(0, 0, 0x00*8, 0x08*8-1);
+ state->m_ss9601_reelrects[1].set(0, 0, 0x08*8, 0x18*8-1);
+ state->m_ss9601_reelrects[2].set(0, 0, 0x18*8, 256-16-1);
}
static SCREEN_UPDATE( subsino2 )
@@ -659,7 +653,7 @@ static SCREEN_UPDATE( subsino2 )
}
}
- bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine()));
+ 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 14e243a2b17..f9cb869d3aa 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_ADDR32(bitmap, 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 971a14b155d..72dbf64b902 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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_ADDR16(bitmap, 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_ADDR16(bitmap, 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 66165ebccd3..06543aa564d 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_ADDR32(bitmap, y+(u*16), 0);
+ 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 aa089f2c850..83a48180e0b 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_ADDR32(bitmap, y+(u*FONT_WIDTH), 0);
+ 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_ADDR32(bitmap, u, 0);
+ UINT32 *fb = &bitmap->pix32(u);
for (t=0; t < 512; t++)
{
UINT32 p = s[((u*512)+t) ^ 1];
@@ -158,7 +158,7 @@ static SCREEN_UPDATE( taitotz )
taitotz_state *state = screen.machine().driver_data<taitotz_state>();
- bitmap_fill(bitmap, cliprect, 0);
+ bitmap->fill(0, *cliprect);
copybitmap_trans(bitmap, state->framebuffer, 0, 0, 0, 0, cliprect, 0);
return 0;
@@ -182,7 +182,7 @@ static void draw_tile(running_machine &machine, UINT32 pos, UINT32 tile)
{
int u = tileu;
- UINT32 *fb = BITMAP_ADDR32(state->framebuffer, j, 0);
+ UINT32 *fb = &state->framebuffer->pix32(j);
for (int i=tilex; i < (tilex+16); i++)
{
diff --git a/src/mame/drivers/taitowlf.c b/src/mame/drivers/taitowlf.c
index 2c7e50455e5..b6ccf4eb148 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(bitmap,cliprect,get_black_pen(screen.machine()));
+ 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_ADDR32(bitmap, 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 a041a9224c2..f5081a1b7ff 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_ADDR32(bitmap, y, 0);
+ 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 569064f15da..cc72a109b0f 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_ADDR32(bitmap, y + 0, x + 0) = colors[val & 3];
- *BITMAP_ADDR32(bitmap, 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_ADDR32(bitmap, y + 0, x + 1) = colors[val & 3];
- *BITMAP_ADDR32(bitmap, 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_ADDR32(bitmap, y + 0, x + 2) = colors[val & 3];
- *BITMAP_ADDR32(bitmap, 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_ADDR32(bitmap, y + 0, x + 3) = colors[val & 3];
- *BITMAP_ADDR32(bitmap, 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 9e2feeb35ea..7ec78f507aa 100644
--- a/src/mame/drivers/tickee.c
+++ b/src/mame/drivers/tickee.c
@@ -145,7 +145,7 @@ static void scanline_update(screen_device &screen, bitmap_t *bitmap, int scanlin
{
tickee_state *state = screen.machine().driver_data<tickee_state>();
UINT16 *src = &state->m_vram[(params->rowaddr << 8) & 0x3ff00];
- UINT32 *dest = BITMAP_ADDR32(bitmap, scanline, 0);
+ UINT32 *dest = &bitmap->pix32(scanline);
const rgb_t *pens = tlc34076_get_pens(screen.machine().device("tlc34076"));
int coladdr = params->coladdr << 1;
int x;
@@ -171,7 +171,7 @@ static void rapidfir_scanline_update(screen_device &screen, bitmap_t *bitmap, in
{
tickee_state *state = screen.machine().driver_data<tickee_state>();
UINT16 *src = &state->m_vram[(params->rowaddr << 8) & 0x3ff00];
- UINT32 *dest = BITMAP_ADDR32(bitmap, scanline, 0);
+ 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 ae9b2b11781..edef2648392 100644
--- a/src/mame/drivers/tmaster.c
+++ b/src/mame/drivers/tmaster.c
@@ -300,7 +300,7 @@ static VIDEO_START( tmaster )
for (buffer = 0; buffer < 2; buffer++)
{
state->m_bitmap[layer][buffer] = machine.primary_screen->alloc_compatible_bitmap();
- bitmap_fill(state->m_bitmap[layer][buffer], NULL, 0xff);
+ state->m_bitmap[layer][buffer]->fill(0xff);
}
}
@@ -330,7 +330,7 @@ static SCREEN_UPDATE( tmaster )
#endif
- bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine()));
+ 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);
@@ -425,7 +425,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_ADDR16(bitmap, sy + y, sx + x) = pen + color;
+ bitmap->pix16(sy + y, sx + x) = pen + color;
}
}
}
@@ -440,7 +440,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_ADDR16(bitmap, sy + y, sx + x) = pen + color;
+ bitmap->pix16(sy + y, sx + x) = pen + color;
}
}
}
@@ -457,7 +457,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_ADDR16(bitmap, 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 46fd5fe9908..8a4a3561956 100644
--- a/src/mame/drivers/tmmjprd.c
+++ b/src/mame/drivers/tmmjprd.c
@@ -198,7 +198,7 @@ static void ttmjprd_draw_tile(running_machine &machine, bitmap_t *bitmap, const
if (dat!=15)
{
//dat += (colour<<8);
- dst = BITMAP_ADDR16(bitmap, 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_ADDR16(bitmap, 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_ADDR16(bitmap, drawy, drawx);
+ dst = &bitmap->pix16(drawy, drawx);
dst[0] = dat;
}
}
@@ -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(bitmap,cliprect,get_black_pen(screen.machine()));
+ 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(bitmap,cliprect,get_black_pen(screen.machine()));
+ 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 32d9ff060cb..7bbe8a391b8 100644
--- a/src/mame/drivers/tonton.c
+++ b/src/mame/drivers/tonton.c
@@ -71,7 +71,7 @@ static VIDEO_START( tonton )
static SCREEN_UPDATE( tonton )
{
tonton_state *state = screen.machine().driver_data<tonton_state>();
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
copybitmap(bitmap, state->m_vdp0_bitmap, 0, 0, 0, 0, cliprect);
diff --git a/src/mame/drivers/toratora.c b/src/mame/drivers/toratora.c
index 03dfe611525..3e60a6110a2 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_ADDR32(bitmap, 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 311ac21483f..81bc9578be3 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(bitmap,cliprect,0xd);
+ bitmap->fill(0xd, *cliprect);
count = 0;
diff --git a/src/mame/drivers/ttchamp.c b/src/mame/drivers/ttchamp.c
index ea6084b1772..978e5857857 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(bitmap, 0, 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_ADDR16(bitmap, 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/twins.c b/src/mame/drivers/twins.c
index f2ba4adc95a..a79fc2226e2 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(bitmap, 0, 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_ADDR16(bitmap, 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(bitmap, 0, 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_ADDR16(bitmap, 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 2d0e09c1993..400eb9216f1 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_ADDR16(bitmap, j, 0);
+ 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 dcbd4079721..286893222c2 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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 dc9308740d7..bae36f79657 100644
--- a/src/mame/drivers/vamphalf.c
+++ b/src/mame/drivers/vamphalf.c
@@ -531,14 +531,14 @@ static void draw_sprites_aoh(screen_device &screen, bitmap_t *bitmap)
static SCREEN_UPDATE( common )
{
- bitmap_fill(bitmap,cliprect,0);
+ bitmap->fill(0, *cliprect);
draw_sprites(screen, bitmap);
return 0;
}
static SCREEN_UPDATE( aoh )
{
- bitmap_fill(bitmap,cliprect,0);
+ 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 92c95028a6a..82fcef7e83a 100644
--- a/src/mame/drivers/vcombat.c
+++ b/src/mame/drivers/vcombat.c
@@ -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_ADDR32(bitmap, 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 6860119539f..09beaac590a 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_ADDR16(bitmap, 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_ADDR16(bitmap, 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_ADDR16(bitmap, 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_ADDR16(bitmap, 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 a1448ee26f8..d704ac95263 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(bitmap, cliprect, get_black_pen(screen.machine()));
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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 54eb1c87b9d..ef59d01732d 100644
--- a/src/mame/drivers/warpsped.c
+++ b/src/mame/drivers/warpsped.c
@@ -142,17 +142,17 @@ static VIDEO_START( warpspeed )
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_ADDR16(bitmap, y, 0);
+ 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;
diff --git a/src/mame/drivers/wheelfir.c b/src/mame/drivers/wheelfir.c
index bf35544bdac..81ee365035a 100644
--- a/src/mame/drivers/wheelfir.c
+++ b/src/mame/drivers/wheelfir.c
@@ -321,7 +321,7 @@ static WRITE16_HANDLER(wheelfir_blit_w)
if(x<512 && y <512)
{
- *BITMAP_ADDR16(state->m_tmp_bitmap[LAYER_BG], y, x) = sixdat;
+ state->m_tmp_bitmap[LAYER_BG]->pix16(y, x) = sixdat;
}
}
@@ -539,7 +539,7 @@ static WRITE16_HANDLER(wheelfir_blit_w)
//hack for clear
if(screen_x >0 && screen_y >0 && screen_x < width && screen_y <height)
{
- // *BITMAP_ADDR16(state->m_tmp_bitmap[vpage], screen_y , screen_x ) =0;
+ // state->m_tmp_bitmap[vpage]->pix16(screen_y , screen_x ) =0;
}
}
else
@@ -548,7 +548,7 @@ static WRITE16_HANDLER(wheelfir_blit_w)
if(pix && screen_x >0 && screen_y >0 && screen_x < width && screen_y <height)
{
- *BITMAP_ADDR16(state->m_tmp_bitmap[vpage], screen_y , screen_x ) = pix;
+ state->m_tmp_bitmap[vpage]->pix16(screen_y , screen_x ) = pix;
}
}
}
@@ -568,12 +568,12 @@ static SCREEN_UPDATE(wheelfir)
{
wheelfir_state *state = screen.machine().driver_data<wheelfir_state>();
- bitmap_fill(bitmap, cliprect,0);
+ bitmap->fill(0, *cliprect);
for(int y=0;y<NUM_SCANLINES;++y)
{
- UINT16 *source = BITMAP_ADDR16(state->m_tmp_bitmap[LAYER_BG],( (state->m_scanlines[y].y)&511), 0);
- UINT16 *dest = BITMAP_ADDR16(bitmap, y, 0);
+ UINT16 *source = &state->m_tmp_bitmap[LAYER_BG]->pix16(( (state->m_scanlines[y].y)&511));
+ UINT16 *dest = &bitmap->pix16(y);
for (int x=0;x<336;x++)
{
@@ -587,7 +587,7 @@ static SCREEN_UPDATE(wheelfir)
/*
{
- bitmap_fill(state->m_tmp_bitmap[LAYER_BG], &screen.visible_area(),0);
+ state->m_tmp_bitmap[LAYER_BG]->fill(0, screen.visible_area());
}
*/
@@ -598,7 +598,7 @@ static SCREEN_UPDATE(wheelfir)
static SCREEN_EOF( wheelfir )
{
wheelfir_state *state = screen.machine().driver_data<wheelfir_state>();
- bitmap_fill(state->m_tmp_bitmap[LAYER_FG], &screen.visible_area(),0);
+ state->m_tmp_bitmap[LAYER_FG]->fill(0, screen.visible_area());
}
diff --git a/src/mame/drivers/whitestar.c b/src/mame/drivers/whitestar.c
index a014c825403..24f2e453047 100644
--- a/src/mame/drivers/whitestar.c
+++ b/src/mame/drivers/whitestar.c
@@ -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_ADDR16(bitmap, midy - y, 0);
- UINT16 *d1 = BITMAP_ADDR16(bitmap, midy + y, 0);
+ 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;
diff --git a/src/mame/drivers/wldarrow.c b/src/mame/drivers/wldarrow.c
index 14cae479875..ffc7fbadfb5 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_ADDR32(bitmap, 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 6487c1c70a8..2f662d58459 100644
--- a/src/mame/drivers/xtheball.c
+++ b/src/mame/drivers/xtheball.c
@@ -38,7 +38,7 @@ static void xtheball_scanline_update(screen_device &screen, bitmap_t *bitmap, in
{
xtheball_state *state = screen.machine().driver_data<xtheball_state>();
UINT16 *srcbg = &state->m_vram_bg[(params->rowaddr << 8) & 0xff00];
- UINT32 *dest = BITMAP_ADDR32(bitmap, scanline, 0);
+ 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 bbb81ada41a..7d477871909 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(bitmap, cliprect, screen.machine().pens[0]);
+ 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(bitmap, cliprect, screen.machine().pens[0]);
+ 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/itech8.h b/src/mame/includes/itech8.h
index ef4aa79064b..6d1d98e9de1 100644
--- a/src/mame/includes/itech8.h
+++ b/src/mame/includes/itech8.h
@@ -13,7 +13,8 @@ class itech8_state : public driver_device
{
public:
itech8_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag) { }
+ : driver_device(mconfig, type, tag),
+ m_visarea(0, 0, 0, 0) { }
UINT8 *m_grom_bank;
UINT8 m_blitter_int;
@@ -22,7 +23,7 @@ public:
UINT8 m_sound_data;
UINT8 m_pia_porta_data;
UINT8 m_pia_portb_data;
- const rectangle *m_visarea;
+ rectangle m_visarea;
UINT8 m_z80_ctrl;
UINT8 m_z80_port_val;
UINT8 m_z80_clear_to_send;
diff --git a/src/mame/machine/3do.c b/src/mame/machine/3do.c
index 30403593cea..6b3fb722882 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_ADDR32( bitmap, 22 + i * 2, 254 );
- UINT32 *dest_p1 = BITMAP_ADDR32( bitmap, 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/konppc.c b/src/mame/machine/konppc.c
index 2c30657d6fc..afe3075e5a5 100644
--- a/src/mame/machine/konppc.c
+++ b/src/mame/machine/konppc.c
@@ -542,34 +542,34 @@ void draw_7segment_led(bitmap_t *bitmap, int x, int y, UINT8 value)
return;
}
- plot_box(bitmap, x-1, y-1, 7, 11, 0x00000000);
+ bitmap->plot_box(x-1, y-1, 7, 11, 0x00000000);
/* Top */
if( (value & 0x40) == 0 ) {
- plot_box(bitmap, x+1, y+0, 3, 1, LED_ON);
+ bitmap->plot_box(x+1, y+0, 3, 1, LED_ON);
}
/* Middle */
if( (value & 0x01) == 0 ) {
- plot_box(bitmap, x+1, y+4, 3, 1, LED_ON);
+ bitmap->plot_box(x+1, y+4, 3, 1, LED_ON);
}
/* Bottom */
if( (value & 0x08) == 0 ) {
- plot_box(bitmap, 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 ) {
- plot_box(bitmap, 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 ) {
- plot_box(bitmap, 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 ) {
- plot_box(bitmap, 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 ) {
- plot_box(bitmap, 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/megadriv.c b/src/mame/machine/megadriv.c
index bdceff1bffd..8dc21be6a24 100644
--- a/src/mame/machine/megadriv.c
+++ b/src/mame/machine/megadriv.c
@@ -6468,7 +6468,7 @@ INLINE UINT8 read_pixel_from_stampmap( running_machine& machine, bitmap_t* srcbi
if (x >= srcbitmap->width) return 0;
if (y >= srcbitmap->height) return 0;
- UINT16* cacheptr = BITMAP_ADDR16( srcbitmap, y, x);
+ UINT16* cacheptr = &srcbitmap->pix16(y, x);
return cacheptr[0] & 0xf;
*/
@@ -8553,7 +8553,7 @@ static void genesis_render_videobuffer_to_screenbuffer(running_machine &machine,
{
UINT16*lineptr;
int x;
- lineptr = BITMAP_ADDR16(render_bitmap, scanline, 0);
+ lineptr = &render_bitmap->pix16(scanline);
/* render 32x output to a buffer */
if (_32x_is_connected && (_32x_displaymode != 0))
diff --git a/src/mame/machine/segamsys.c b/src/mame/machine/segamsys.c
index a4335e456ce..60ebe6ab047 100644
--- a/src/mame/machine/segamsys.c
+++ b/src/mame/machine/segamsys.c
@@ -937,7 +937,7 @@ static void sms_render_tileline(int scanline, struct sms_vdp* chip)
static void sms_copy_to_renderbuffer(int scanline, struct sms_vdp* chip)
{
int x;
- UINT16* lineptr = BITMAP_ADDR16(chip->r_bitmap, scanline, 0);
+ UINT16* lineptr = &chip->r_bitmap->pix16(scanline);
for (x=0;x<256;x++)
{
@@ -1080,7 +1080,7 @@ static void show_tiles(struct sms_vdp* chip)
for (yy=0;yy<8;yy++)
{
int drawypos = y*8+yy;
- UINT16* lineptr = BITMAP_ADDR16(chip->r_bitmap, drawypos, 0);
+ UINT16* lineptr = &chip->r_bitmap->pix16(drawypos);
UINT32 gfxdata = (SMS_VDP_VRAM(count)<<24)|(SMS_VDP_VRAM(count+1)<<16)|(SMS_VDP_VRAM(count+2)<<8)|(SMS_VDP_VRAM(count+3)<<0);
@@ -1271,8 +1271,8 @@ SCREEN_UPDATE(megatech_md_sms)
for (y=0;y<224;y++)
{
- UINT16* lineptr = BITMAP_ADDR16(bitmap, y, 0);
- UINT16* srcptr = BITMAP_ADDR16(md_sms_vdp->r_bitmap, y, 0);
+ UINT16* lineptr = &bitmap->pix16(y);
+ UINT16* srcptr = &md_sms_vdp->r_bitmap->pix16(y);
for (x=0;x<256;x++)
{
@@ -1290,8 +1290,8 @@ SCREEN_UPDATE(megatech_bios)
for (y=0;y<224;y++)
{
- UINT16* lineptr = BITMAP_ADDR16(bitmap, y, 0);
- UINT16* srcptr = BITMAP_ADDR16(vdp1->r_bitmap, y, 0);
+ UINT16* lineptr = &bitmap->pix16(y);
+ UINT16* srcptr = &vdp1->r_bitmap->pix16(y);
for (x=0;x<256;x++)
{
@@ -1308,8 +1308,8 @@ SCREEN_UPDATE(megaplay_bios)
for (y=0;y<224;y++)
{
- UINT16* lineptr = BITMAP_ADDR16(bitmap, y+16, 32);
- UINT16* srcptr = BITMAP_ADDR16(vdp1->r_bitmap, y, 0);
+ UINT16* lineptr = &bitmap->pix16(y+16, 32);
+ UINT16* srcptr = &vdp1->r_bitmap->pix16(y);
for (x=0;x<256;x++)
{
@@ -1330,8 +1330,8 @@ SCREEN_UPDATE(systeme)
for (y=0;y<192;y++)
{
- UINT16* lineptr = BITMAP_ADDR16(bitmap, y, 0);
- UINT16* srcptr = BITMAP_ADDR16(vdp1->r_bitmap, y, 0);
+ UINT16* lineptr = &bitmap->pix16(y);
+ UINT16* srcptr = &vdp1->r_bitmap->pix16(y);
for (x=0;x<256;x++)
{
@@ -1342,8 +1342,8 @@ SCREEN_UPDATE(systeme)
for (y=0;y<192;y++)
{
- UINT16* lineptr = BITMAP_ADDR16(bitmap, y, 0);
- UINT16* srcptr = BITMAP_ADDR16(vdp2->r_bitmap, y, 0);
+ UINT16* lineptr = &bitmap->pix16(y);
+ UINT16* srcptr = &vdp2->r_bitmap->pix16(y);
for (x=0;x<256;x++)
{
diff --git a/src/mame/video/1943.c b/src/mame/video/1943.c
index 4eab4700409..7f3102d7180 100644
--- a/src/mame/video/1943.c
+++ b/src/mame/video/1943.c
@@ -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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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 9218a1e7dad..48e6545c2dd 100644
--- a/src/mame/video/20pacgal.c
+++ b/src/mame/video/20pacgal.c
@@ -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_ADDR32(bitmap, y, x) = pens[*BITMAP_ADDR32(bitmap, y, x)];
+ bitmap->pix32(y, x) = pens[bitmap->pix32(y, x)];
}
@@ -139,7 +139,7 @@ static void draw_sprite(running_machine& machine, const _20pacgal_state *state,
/* pen bits A0-A3 */
if (col)
- *BITMAP_ADDR32(bitmap, y, x) = (*BITMAP_ADDR32(bitmap, y, x) & 0xff0) | col;
+ bitmap->pix32(y, x) = (bitmap->pix32(y, x) & 0xff0) | col;
}
/* next pixel */
@@ -274,7 +274,7 @@ static void draw_chars(const _20pacgal_state *state, bitmap_t *bitmap)
/* pen bits A4-A11 */
if ( col != 0 )
- *BITMAP_ADDR32(bitmap, y, x) = (color_base | col) << 4;
+ bitmap->pix32(y, x) = (color_base | col) << 4;
/* next pixel */
if (flip)
@@ -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_ADDR32(bitmap, 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(bitmap,cliprect,0);
+ 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 23493233489..d54beb46d4a 100644
--- a/src/mame/video/40love.c
+++ b/src/mame/video/40love.c
@@ -201,9 +201,9 @@ static void fortyl_plot_pix( running_machine &machine, int offset )
{
c = ((d2 >> i) & 1) + ((d1 >> i) & 1) * 2;
if (state->m_pixram_sel)
- *BITMAP_ADDR16(state->m_tmp_bitmap2, y, x + i) = state->m_pix_color[c];
+ state->m_tmp_bitmap2->pix16(y, x + i) = state->m_pix_color[c];
else
- *BITMAP_ADDR16(state->m_tmp_bitmap1, y, x + i) = state->m_pix_color[c];
+ state->m_tmp_bitmap1->pix16(y, x + i) = state->m_pix_color[c];
}
}
diff --git a/src/mame/video/8080bw.c b/src/mame/video/8080bw.c
index 9a9f69d0f59..cd3184cec62 100644
--- a/src/mame/video/8080bw.c
+++ b/src/mame/video/8080bw.c
@@ -70,9 +70,9 @@ INLINE void set_pixel( running_machine &machine, bitmap_t *bitmap, UINT8 y, UINT
if (y >= MW8080BW_VCOUNTER_START_NO_VBLANK)
{
if (state->m_c8080bw_flip_screen)
- *BITMAP_ADDR32(bitmap, 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_ADDR32(bitmap, y - MW8080BW_VCOUNTER_START_NO_VBLANK, x) = pens[color];
+ bitmap->pix32(y - MW8080BW_VCOUNTER_START_NO_VBLANK, x) = pens[color];
}
}
@@ -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_ADDR32(bitmap, 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_ADDR32(bitmap, 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_ADDR32(bitmap, 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 aa5ed4ca44f..38cc180b921 100644
--- a/src/mame/video/aeroboto.c
+++ b/src/mame/video/aeroboto.c
@@ -158,8 +158,8 @@ SCREEN_UPDATE( aeroboto )
{
aeroboto_state *state = screen.machine().driver_data<aeroboto_state>();
- static const rectangle splitrect1 = { 0, 255, 0, 39 };
- static const rectangle splitrect2 = { 0, 255, 40, 255 };
+ const rectangle splitrect1(0, 255, 0, 39);
+ const rectangle splitrect2(0, 255, 40, 255);
UINT8 *src_base, *src_colptr, *src_rowptr;
int src_offsx, src_colmask, sky_color, star_color, x, y, i, j, pen;
@@ -176,7 +176,7 @@ SCREEN_UPDATE( aeroboto )
star_color += 2;
- bitmap_fill(bitmap, cliprect, sky_color);
+ 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_ADDR16(bitmap, 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(bitmap, cliprect, sky_color);
+ 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 8dfd8209456..e40507d6ccc 100644
--- a/src/mame/video/aerofgt.c
+++ b/src/mame/video/aerofgt.c
@@ -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_ADDR32(bitmap, 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);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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 e2d25b709fc..6bfc2c9c86d 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);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ screen.machine().priority_bitmap->fill(0, *cliprect);
- bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine()));
+ 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 ed2804ff9e2..fe458d9aced 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);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
- bitmap_fill(bitmap, cliprect, state->m_layer_colorbase[1] * 16);
+ 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 3d5b8a1d799..9c4b493a21c 100644
--- a/src/mame/video/alpha68k.c
+++ b/src/mame/video/alpha68k.c
@@ -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(bitmap, cliprect, 2047);
+ bitmap->fill(2047, *cliprect);
//AT
draw_sprites(screen.machine(), bitmap, cliprect, 0, 0x07c0, 0x0800);
draw_sprites(screen.machine(), bitmap, cliprect, 1, 0x0000, 0x0800);
@@ -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(bitmap, cliprect, 4095);
+ 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(bitmap, cliprect, 4095);
+ bitmap->fill(4095, *cliprect);
/* This appears to be correct priority */
draw_sprites_V(screen.machine(), bitmap, cliprect, 0, 0x07c0, 0x0800, 0x4000, 0x8000, 0x3fff);
@@ -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(bitmap, cliprect, get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
/* This appears to be correct priority */
draw_sprites_I(screen.machine(), bitmap, cliprect, 2, 0x0800, yshift);
@@ -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(bitmap, cliprect, 0x100); //AT
+ bitmap->fill(0x100, *cliprect); //AT
kyros_draw_sprites(screen.machine(), bitmap, cliprect, 2, 0x0800);
kyros_draw_sprites(screen.machine(), bitmap, cliprect, 3, 0x0c00);
@@ -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(bitmap, cliprect, 0x100); //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 d233a6a4ebd..c2897ae2302 100644
--- a/src/mame/video/ambush.c
+++ b/src/mame/video/ambush.c
@@ -92,7 +92,7 @@ SCREEN_UPDATE( ambush )
ambush_state *state = screen.machine().driver_data<ambush_state>();
int offs;
- bitmap_fill(bitmap, cliprect, 0);
+ 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 f0b738d7102..1d3449ebf9e 100644
--- a/src/mame/video/amiga.c
+++ b/src/mame/video/amiga.c
@@ -653,7 +653,7 @@ void amiga_render_scanline(running_machine &machine, bitmap_t *bitmap, int scanl
/* start of a new line, signal we're not done with it and fill up vars */
if (bitmap != NULL)
- dst = BITMAP_ADDR16(bitmap, scanline, 0);
+ 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 b8870f05e89..8fa5681602e 100644
--- a/src/mame/video/amigaaga.c
+++ b/src/mame/video/amigaaga.c
@@ -479,7 +479,7 @@ void amiga_aga_render_scanline(running_machine &machine, bitmap_t *bitmap, int s
/* start of a new line, signal we're not done with it and fill up vars */
if (bitmap != NULL)
- dst = BITMAP_ADDR32(bitmap, scanline, 0);
+ 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/angelkds.c b/src/mame/video/angelkds.c
index c1b898d898e..b327631daa2 100644
--- a/src/mame/video/angelkds.c
+++ b/src/mame/video/angelkds.c
@@ -278,7 +278,7 @@ SCREEN_UPDATE( angelkds )
const rectangle &visarea = screen.visible_area();
rectangle clip;
- bitmap_fill(bitmap, cliprect, 0x3f); /* 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/arcadecl.c b/src/mame/video/arcadecl.c
index c927946e53e..2a67e644558 100644
--- a/src/mame/video/arcadecl.c
+++ b/src/mame/video/arcadecl.c
@@ -96,8 +96,8 @@ SCREEN_UPDATE( arcadecl )
for (r = 0; r < rectlist.numrects; r++, rectlist.rect++)
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
- UINT16 *mo = (UINT16 *)mobitmap->base + mobitmap->rowpixels * y;
- UINT16 *pf = (UINT16 *)bitmap->base + bitmap->rowpixels * y;
+ UINT16 *mo = &mobitmap->pix16(y);
+ UINT16 *pf = &bitmap->pix16(y);
for (x = rectlist.rect->min_x; x <= rectlist.rect->max_x; x++)
if (mo[x])
{
@@ -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_ADDR16(bitmap, y, 0);
+ 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 25dfd01ec09..ce0fb434adb 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(bitmap, cliprect, screen.machine().pens[0x10]);
+ 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_ADDR32(bitmap, 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_ADDR32(bitmap, 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_ADDR32(bitmap, 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_ADDR32(bitmap, 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_ADDR32(bitmap, 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_ADDR32(bitmap, 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 39086e7c073..ab24b2739aa 100644
--- a/src/mame/video/argus.c
+++ b/src/mame/video/argus.c
@@ -923,18 +923,18 @@ static void valtric_draw_mosaic(screen_device &screen, bitmap_t *bitmap, const r
for (x=0;x<height+step;x+=step)
{
if (y < height && x < width)
- c=*BITMAP_ADDR32(state->m_mosaicbitmap, y, x);
+ c=state->m_mosaicbitmap->pix32(y, x);
if (state->m_mosaic<0)
if (y+step-1<height && x+step-1< width)
- c = *BITMAP_ADDR32(state->m_mosaicbitmap, y+step-1, x+step-1);
+ c = state->m_mosaicbitmap->pix32(y+step-1, x+step-1);
for (yy=0;yy<step;yy++)
for (xx=0;xx<step;xx++)
{
if (xx+x < width && yy+y<height)
{
- dest=BITMAP_ADDR32(bitmap, y+yy, x+xx);
+ dest=&bitmap->pix32(y+yy, x+xx);
*dest=c;
}
}
@@ -963,18 +963,18 @@ static void valtric_draw_mosaic(screen_device &screen, bitmap_t *bitmap, const r
for (x = 0; x < height+step; x += step)
{
if (y < height && x < width)
- c = *BITMAP_ADDR32(state->m_mosaicbitmap, y, x);
+ c = state->m_mosaicbitmap->pix32(y, x);
if (state->m_valtric_mosaic & 0x80)
if (y+step-1 < height && x+step-1 < width)
- c = *BITMAP_ADDR32(state->m_mosaicbitmap, y+step-1, x+step-1);
+ c = state->m_mosaicbitmap->pix32(y+step-1, x+step-1);
for (yy = 0; yy < step; yy++)
for (xx = 0; xx < step; xx++)
{
if (xx+x < width && yy+y < height)
{
- dest = BITMAP_ADDR32(bitmap, y+yy, x+xx);
+ dest = &bitmap->pix32(y+yy, x+xx);
*dest = c;
}
}
@@ -1214,7 +1214,7 @@ SCREEN_UPDATE( valtric )
if (state->m_bg_status & 1) /* Backgound enable */
valtric_draw_mosaic(screen, bitmap, cliprect);
else
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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/armedf.c b/src/mame/video/armedf.c
index bccb0aea517..17ffefcba74 100644
--- a/src/mame/video/armedf.c
+++ b/src/mame/video/armedf.c
@@ -334,7 +334,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 = BITMAP_ADDR16(dest_bmp, y, 0);
+ UINT16 *dest = &dest_bmp->pix16(y);
int x_index = x_index_base;
for (x = sx; x < ex; x++)
{
@@ -411,7 +411,7 @@ SCREEN_UPDATE( armedf )
}
- bitmap_fill(bitmap, cliprect , 0xff);
+ 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 c2062828ec6..b19114368df 100644
--- a/src/mame/video/artmagic.c
+++ b/src/mame/video/artmagic.c
@@ -344,7 +344,7 @@ void artmagic_scanline(screen_device &screen, bitmap_t *bitmap, int scanline, co
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_ADDR32(bitmap, scanline, 0);
+ 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 6517b0181fa..5f3383a3e21 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);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
- bitmap_fill(bitmap, cliprect, 0);
+ 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 d127c6b658e..7e204b3d066 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_ADDR16(bitmap, y, 0);
+ 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_ADDR16(bitmap, y, 0);
+ 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 efd30e26004..7d932633802 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;
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ screen.machine().priority_bitmap->fill(0, *cliprect);
/* Ensure screen blanked even when bottom layer not drawn due to disable bit */
- bitmap_fill(bitmap, cliprect, 0);
+ 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;
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ screen.machine().priority_bitmap->fill(0, *cliprect);
/* Ensure screen blanked even when bottom layer not drawn due to disable bit */
- bitmap_fill(bitmap, cliprect, 0);
+ 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 4e701ee2576..96a5789f565 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 f50a3d45ea6..c73dde42518 100644
--- a/src/mame/video/atarifb.c
+++ b/src/mame/video/atarifb.c
@@ -107,7 +107,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 )
{
atarifb_state *state = machine.driver_data<atarifb_state>();
- static const rectangle bigfield_area = { 4 * 8, 34 * 8 - 1, 0 * 8, 32 * 8 - 1 };
+ const rectangle bigfield_area(4 * 8, 34 * 8 - 1, 0 * 8, 32 * 8 - 1);
int scroll_x[1];
int scroll_y[1];
@@ -124,7 +124,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 )
{
atarifb_state *state = machine.driver_data<atarifb_state>();
- static const rectangle bigfield_area = { 4 * 8, 34 * 8 - 1, 0 * 8, 32 * 8 - 1 };
+ const rectangle bigfield_area(4 * 8, 34 * 8 - 1, 0 * 8, 32 * 8 - 1);
int obj;
diff --git a/src/mame/video/atarig42.c b/src/mame/video/atarig42.c
index 34971d44be1..f09f5d09d9b 100644
--- a/src/mame/video/atarig42.c
+++ b/src/mame/video/atarig42.c
@@ -186,7 +186,7 @@ SCREEN_UPDATE( atarig42 )
bitmap_t *priority_bitmap = screen.machine().priority_bitmap;
/* draw the playfield */
- bitmap_fill(priority_bitmap, cliprect, 0);
+ 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 = (UINT16 *)bitmap->base + y * bitmap->rowpixels;
- UINT16 *mo = (UINT16 *)mo_bitmap->base + y * mo_bitmap->rowpixels;
- UINT8 *pri = (UINT8 *)priority_bitmap->base + priority_bitmap->rowpixels * y;
+ UINT16 *pf = &bitmap->pix16(y);
+ UINT16 *mo = &mo_bitmap->pix16(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 8010d6ac010..b32d8a186da 100644
--- a/src/mame/video/atarigt.c
+++ b/src/mame/video/atarigt.c
@@ -531,11 +531,11 @@ SCREEN_UPDATE( atarigt )
/* now do the nasty blend */
for (y = cliprect->min_y; y <= cliprect->max_y; y++)
{
- UINT16 *an = (UINT16 *)state->m_an_bitmap->base + y * state->m_an_bitmap->rowpixels;
- UINT16 *pf = (UINT16 *)state->m_pf_bitmap->base + y * state->m_pf_bitmap->rowpixels;
- UINT16 *mo = (UINT16 *)mo_bitmap->base + y * mo_bitmap->rowpixels;
- UINT16 *tm = (UINT16 *)tm_bitmap->base + y * tm_bitmap->rowpixels;
- UINT32 *dst = (UINT32 *)bitmap->base + y * bitmap->rowpixels;
+ UINT16 *an = &state->m_an_bitmap->pix16(y);
+ 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);
/* 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 6dc517901b6..3b7f11f8421 100644
--- a/src/mame/video/atarigx2.c
+++ b/src/mame/video/atarigx2.c
@@ -184,7 +184,7 @@ SCREEN_UPDATE( atarigx2 )
bitmap_t *priority_bitmap = screen.machine().priority_bitmap;
/* draw the playfield */
- bitmap_fill(priority_bitmap, cliprect, 0);
+ 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 = (UINT16 *)bitmap->base + y * bitmap->rowpixels;
- UINT16 *mo = (UINT16 *)mo_bitmap->base + y * mo_bitmap->rowpixels;
- UINT8 *pri = (UINT8 *)priority_bitmap->base + y * priority_bitmap->rowpixels;
+ UINT16 *pf = &bitmap->pix16(y);
+ UINT16 *mo = &mo_bitmap->pix16(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 7633c367685..bebb58054b3 100644
--- a/src/mame/video/atarimo.c
+++ b/src/mame/video/atarimo.c
@@ -402,7 +402,7 @@ void atarimo_init(running_machine &machine, int map, const atarimo_desc *desc)
/* allocate the temp bitmap */
mo->bitmap = auto_bitmap_alloc(machine, machine.primary_screen->width(), machine.primary_screen->height(), BITMAP_FORMAT_INDEXED16);
- bitmap_fill(mo->bitmap, NULL, desc->transpen);
+ mo->bitmap->fill(desc->transpen);
/* allocate the spriteram */
mo->spriteram = auto_alloc_array_clear(machine, atarimo_entry, mo->spriteramsize);
@@ -693,7 +693,7 @@ bitmap_t *atarimo_render(int map, const rectangle *cliprect, atarimo_rect_list *
bandclip.max_y = bandclip.min_y + (1 << mo->slipshift) - 1;
/* keep within the cliprect */
- sect_rect(&bandclip, cliprect);
+ bandclip &= *cliprect;
}
/* if this matches the last link, we don't need to re-process the list */
@@ -726,7 +726,7 @@ bitmap_t *atarimo_render(int map, const rectangle *cliprect, atarimo_rect_list *
/* clip the rectlist */
for (i = 0, rect = rectlist->rect; i < rectlist->numrects; i++, rect++)
- sect_rect(rect, cliprect);
+ *rect &= *cliprect;
/* return the bitmap */
return mo->bitmap;
@@ -1148,7 +1148,7 @@ void atarimo_mark_high_palette(bitmap_t *bitmap, UINT16 *pf, UINT16 *mo, int x,
#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/atarirle.c b/src/mame/video/atarirle.c
index 9b2a40d965e..2c1938dc2ea 100644
--- a/src/mame/video/atarirle.c
+++ b/src/mame/video/atarirle.c
@@ -340,16 +340,16 @@ static DEVICE_START( atarirle )
mo->vram[0][0] = auto_bitmap_alloc(machine, width, height, BITMAP_FORMAT_INDEXED16);
mo->vram[0][1] = auto_bitmap_alloc(machine, width, height, BITMAP_FORMAT_INDEXED16);
- bitmap_fill(mo->vram[0][0], NULL, 0);
- bitmap_fill(mo->vram[0][1], NULL, 0);
+ mo->vram[0][0]->fill(0);
+ mo->vram[0][1]->fill(0);
/* allocate alternate bitmaps if needed */
if (mo->vrammask.mask != 0)
{
mo->vram[1][0] = auto_bitmap_alloc(machine, width, height, BITMAP_FORMAT_INDEXED16);
mo->vram[1][1] = auto_bitmap_alloc(machine, width, height, BITMAP_FORMAT_INDEXED16);
- bitmap_fill(mo->vram[1][0], NULL, 0);
- bitmap_fill(mo->vram[1][1], NULL, 0);
+ mo->vram[1][0]->fill(0);
+ mo->vram[1][1]->fill(0);
}
mo->partial_scanline = -1;
@@ -425,9 +425,9 @@ void atarirle_control_w(device_t *device, UINT8 bits)
//logerror(" partial erase %d-%d (frame %d)\n", cliprect.min_y, cliprect.max_y, (oldbits & ATARIRLE_CONTROL_FRAME) >> 2);
/* erase the bitmap */
- bitmap_fill(mo->vram[0][(oldbits & ATARIRLE_CONTROL_FRAME) >> 2], &cliprect, 0);
+ mo->vram[0][(oldbits & ATARIRLE_CONTROL_FRAME) >> 2]->fill(0, cliprect);
if (mo->vrammask.mask != 0)
- bitmap_fill(mo->vram[1][(oldbits & ATARIRLE_CONTROL_FRAME) >> 2], &cliprect, 0);
+ mo->vram[1][(oldbits & ATARIRLE_CONTROL_FRAME) >> 2]->fill(0, cliprect);
}
/* update the bits */
@@ -481,9 +481,9 @@ void atarirle_eof(device_t *device)
//logerror(" partial erase %d-%d (frame %d)\n", cliprect.min_y, cliprect.max_y, (mo->control_bits & ATARIRLE_CONTROL_FRAME) >> 2);
/* erase the bitmap */
- bitmap_fill(mo->vram[0][(mo->control_bits & ATARIRLE_CONTROL_FRAME) >> 2], &cliprect, 0);
+ mo->vram[0][(mo->control_bits & ATARIRLE_CONTROL_FRAME) >> 2]->fill(0, cliprect);
if (mo->vrammask.mask != 0)
- bitmap_fill(mo->vram[1][(mo->control_bits & ATARIRLE_CONTROL_FRAME) >> 2], &cliprect, 0);
+ mo->vram[1][(mo->control_bits & ATARIRLE_CONTROL_FRAME) >> 2]->fill(0, cliprect);
}
/* reset the partial scanline to -1 so we can detect full updates */
@@ -921,13 +921,13 @@ if (hilite)
for (ty = sy; ty <= ey; ty++)
{
- *BITMAP_ADDR16(bitmap1, ty, sx) = machine.rand() & 0xff;
- *BITMAP_ADDR16(bitmap1, ty, ex) = machine.rand() & 0xff;
+ bitmap1->pix16(ty, sx) = machine.rand() & 0xff;
+ bitmap1->pix16(ty, ex) = machine.rand() & 0xff;
}
for (tx = sx; tx <= ex; tx++)
{
- *BITMAP_ADDR16(bitmap1, sy, tx) = machine.rand() & 0xff;
- *BITMAP_ADDR16(bitmap1, ey, tx) = machine.rand() & 0xff;
+ bitmap1->pix16(sy, tx) = machine.rand() & 0xff;
+ bitmap1->pix16(ey, tx) = machine.rand() & 0xff;
}
} while (0);
fprintf(stderr, " Sprite: c=%04X l=%04X h=%d X=%4d (o=%4d w=%3d) Y=%4d (o=%4d h=%d) s=%04X\n",
@@ -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
@@ -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_ADDR16(bitmap, 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_ADDR16(bitmap, y, ex);
+ const UINT16 *end = &bitmap->pix16(y, ex);
int to_be_skipped = pixels_to_skip;
/* decode the pixels */
@@ -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_ADDR16(bitmap, 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_ADDR16(bitmap, 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 687d3472a7c..125f991fd51 100644
--- a/src/mame/video/atarisy1.c
+++ b/src/mame/video/atarisy1.c
@@ -515,8 +515,8 @@ SCREEN_UPDATE( atarisy1 )
for (r = 0; r < rectlist.numrects; r++, rectlist.rect++)
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
- UINT16 *mo = (UINT16 *)mobitmap->base + mobitmap->rowpixels * y;
- UINT16 *pf = (UINT16 *)bitmap->base + bitmap->rowpixels * y;
+ UINT16 *mo = &mobitmap->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 ed69604d4df..b517559c43c 100644
--- a/src/mame/video/atarisy2.c
+++ b/src/mame/video/atarisy2.c
@@ -327,7 +327,7 @@ SCREEN_UPDATE( atarisy2 )
int x, y, r;
/* draw the playfield */
- bitmap_fill(priority_bitmap, cliprect, 0);
+ 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);
@@ -338,9 +338,9 @@ SCREEN_UPDATE( atarisy2 )
for (r = 0; r < rectlist.numrects; r++, rectlist.rect++)
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
- UINT16 *mo = (UINT16 *)mobitmap->base + mobitmap->rowpixels * y;
- UINT16 *pf = (UINT16 *)bitmap->base + bitmap->rowpixels * y;
- UINT8 *pri = (UINT8 *)priority_bitmap->base + priority_bitmap->rowpixels * y;
+ UINT16 *mo = &mobitmap->pix16(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 a16365a8799..0b5a9d860a8 100644
--- a/src/mame/video/badlands.c
+++ b/src/mame/video/badlands.c
@@ -126,8 +126,8 @@ SCREEN_UPDATE( badlands )
for (r = 0; r < rectlist.numrects; r++, rectlist.rect++)
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
- UINT16 *mo = (UINT16 *)mobitmap->base + mobitmap->rowpixels * y;
- UINT16 *pf = (UINT16 *)bitmap->base + bitmap->rowpixels * y;
+ UINT16 *mo = &mobitmap->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 222ab4c9d63..b37cbd99e4f 100644
--- a/src/mame/video/bagman.c
+++ b/src/mame/video/bagman.c
@@ -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(bitmap,cliprect,0);
+ 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 bc55f074d08..959e0b8a7d6 100644
--- a/src/mame/video/balsente.c
+++ b/src/mame/video/balsente.c
@@ -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_ADDR16(bitmap, 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_ADDR16(bitmap, 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_ADDR16(bitmap, 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_ADDR16(bitmap, ypos, currx) = pens[right | old[1]];
+ bitmap->pix16(ypos, currx) = pens[right | old[1]];
currx++;
}
src += 4;
diff --git a/src/mame/video/batman.c b/src/mame/video/batman.c
index d7a5e702d28..b747bc04e17 100644
--- a/src/mame/video/batman.c
+++ b/src/mame/video/batman.c
@@ -203,7 +203,7 @@ SCREEN_UPDATE( batman )
int x, y, r;
/* draw the playfield */
- bitmap_fill(priority_bitmap, cliprect, 0);
+ 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);
@@ -218,9 +218,9 @@ SCREEN_UPDATE( batman )
for (r = 0; r < rectlist.numrects; r++, rectlist.rect++)
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
- UINT16 *mo = (UINT16 *)mobitmap->base + mobitmap->rowpixels * y;
- UINT16 *pf = (UINT16 *)bitmap->base + bitmap->rowpixels * y;
- UINT8 *pri = (UINT8 *)priority_bitmap->base + priority_bitmap->rowpixels * y;
+ UINT16 *mo = &mobitmap->pix16(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])
{
@@ -291,8 +291,8 @@ SCREEN_UPDATE( batman )
for (r = 0; r < rectlist.numrects; r++, rectlist.rect++)
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
- UINT16 *mo = (UINT16 *)mobitmap->base + mobitmap->rowpixels * y;
- UINT16 *pf = (UINT16 *)bitmap->base + bitmap->rowpixels * y;
+ UINT16 *mo = &mobitmap->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 0a88ae337d8..94beb94830d 100644
--- a/src/mame/video/battlane.c
+++ b/src/mame/video/battlane.c
@@ -84,11 +84,11 @@ WRITE8_HANDLER( battlane_bitmap_w )
{
if (data & 1 << i)
{
- *BITMAP_ADDR8(state->m_screen_bitmap, offset % 0x100, (offset / 0x100) * 8 + i) |= orval;
+ state->m_screen_bitmap->pix8(offset % 0x100, (offset / 0x100) * 8 + i) |= orval;
}
else
{
- *BITMAP_ADDR8(state->m_screen_bitmap, offset % 0x100, (offset / 0x100) * 8 + i) &= ~orval;
+ state->m_screen_bitmap->pix8(offset % 0x100, (offset / 0x100) * 8 + i) &= ~orval;
}
}
}
@@ -221,14 +221,14 @@ static void draw_fg_bitmap( running_machine &machine, bitmap_t *bitmap )
{
for (x = 0; x < 32 * 8; x++)
{
- data = *BITMAP_ADDR8(state->m_screen_bitmap, y, x);
+ data = state->m_screen_bitmap->pix8(y, x);
if (data)
{
if (flip_screen_get(machine))
- *BITMAP_ADDR16(bitmap, 255 - y, 255 - x) = data;
+ bitmap->pix16(255 - y, 255 - x) = data;
else
- *BITMAP_ADDR16(bitmap, y, x) = data;
+ bitmap->pix16(y, x) = data;
}
}
}
diff --git a/src/mame/video/bbusters.c b/src/mame/video/bbusters.c
index 3078bc336a4..9671ad6d90a 100644
--- a/src/mame/video/bbusters.c
+++ b/src/mame/video/bbusters.c
@@ -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 = BITMAP_ADDR16(dest, dy, 0);
+ UINT16 *destline = &dest->pix16(dy);
UINT8 srcline=*state->m_scale_table_ptr;
const UINT8 *srcptr=0;
diff --git a/src/mame/video/beezer.c b/src/mame/video/beezer.c
index ecf3b6459fd..474ded79ed8 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_ADDR16(bitmap, y, x+1) = videoram[0x80*x+y] & 0x0f;
- *BITMAP_ADDR16(bitmap, 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/bfm_adr2.c b/src/mame/video/bfm_adr2.c
index ab3476cfdc2..3f0ef20cd44 100644
--- a/src/mame/video/bfm_adr2.c
+++ b/src/mame/video/bfm_adr2.c
@@ -214,10 +214,10 @@ VIDEO_START( adder2 )
}
// video update ///////////////////////////////////////////////////////////
-static const rectangle visible1 = { 0, 400-1, 0, 280-1 }; //minx,maxx, miny,maxy
-
SCREEN_UPDATE( adder2 )
{
+ const rectangle visible1(0, 400-1, 0, 280-1); //minx,maxx, miny,maxy
+
if (adder2_screen_page_reg & SL_DISPLAY) tilemap_draw(bitmap, &visible1, tilemap1, 0, 0);
else tilemap_draw(bitmap, &visible1, tilemap0, 0, 0);
diff --git a/src/mame/video/bigevglf.c b/src/mame/video/bigevglf.c
index 93475715d34..280526cbd93 100644
--- a/src/mame/video/bigevglf.c
+++ b/src/mame/video/bigevglf.c
@@ -45,7 +45,7 @@ WRITE8_HANDLER( bigevglf_vidram_w )
state->m_vidram[o + 0x10000 * state->m_plane_selected] = data;
y = o >>8;
x = (o & 255);
- *BITMAP_ADDR16(state->m_tmp_bitmap[state->m_plane_selected], y, x) = data;
+ state->m_tmp_bitmap[state->m_plane_selected]->pix16(y, x) = data;
}
READ8_HANDLER( bigevglf_vidram_r )
diff --git a/src/mame/video/bigstrkb.c b/src/mame/video/bigstrkb.c
index 29c83fdef7d..05fbe3dcee1 100644
--- a/src/mame/video/bigstrkb.c
+++ b/src/mame/video/bigstrkb.c
@@ -132,7 +132,7 @@ SCREEN_UPDATE(bigstrkb)
{
bigstrkb_state *state = screen.machine().driver_data<bigstrkb_state>();
-// bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine()));
+// 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 58ee3a472a8..6b3aa24a06f 100644
--- a/src/mame/video/bionicc.c
+++ b/src/mame/video/bionicc.c
@@ -250,7 +250,7 @@ SCREEN_UPDATE( bionicc )
{
bionicc_state *state = screen.machine().driver_data<bionicc_state>();
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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 9f0a3fec500..e9e78f649af 100644
--- a/src/mame/video/bishi.c
+++ b/src/mame/video/bishi.c
@@ -63,7 +63,7 @@ SCREEN_UPDATE(bishi)
konami_sortlayers4(layers, layerpri);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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 16766ecc807..e5cbca8615e 100644
--- a/src/mame/video/bking.c
+++ b/src/mame/video/bking.c
@@ -281,7 +281,7 @@ SCREEN_UPDATE( bking )
SCREEN_EOF( bking )
{
bking_state *state = screen.machine().driver_data<bking_state>();
- static const rectangle rect = { 0, 7, 0, 15 };
+ const rectangle rect(0, 7, 0, 15);
int xld = 0;
int yld = 0;
@@ -333,8 +333,8 @@ SCREEN_EOF( bking )
for (y = rect.min_y; y <= rect.max_y; y++)
{
- const UINT16* p0 = BITMAP_ADDR16(state->m_tmp_bitmap1, y, 0);
- const UINT16* p1 = BITMAP_ADDR16(state->m_tmp_bitmap2, y, 0);
+ const UINT16* p0 = &state->m_tmp_bitmap1->pix16(y);
+ const UINT16* p1 = &state->m_tmp_bitmap2->pix16(y);
for (x = rect.min_x; x <= rect.max_x; x++)
{
diff --git a/src/mame/video/blktiger.c b/src/mame/video/blktiger.c
index 8a3384c9183..19a0eef7944 100644
--- a/src/mame/video/blktiger.c
+++ b/src/mame/video/blktiger.c
@@ -234,7 +234,7 @@ SCREEN_UPDATE( blktiger )
{
blktiger_state *state = screen.machine().driver_data<blktiger_state>();
- bitmap_fill(bitmap, cliprect, 1023);
+ 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 b119f7bb9bf..02037e12af7 100644
--- a/src/mame/video/blmbycar.c
+++ b/src/mame/video/blmbycar.c
@@ -243,13 +243,13 @@ if (screen.machine().input().code_pressed(KEYCODE_Z))
}
#endif
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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(bitmap, cliprect, 0);
+ 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 883b296d06b..791d3f38b9c 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>();
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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 1f33796b6fc..1c2d4d5a7e5 100644
--- a/src/mame/video/blockout.c
+++ b/src/mame/video/blockout.c
@@ -88,14 +88,14 @@ static void update_pixels( running_machine &machine, int x, int y )
else
color = (back >> 8) + 256;
- *BITMAP_ADDR16(state->m_tmpbitmap, y, x) = color;
+ state->m_tmpbitmap->pix16(y, x) = color;
if (front & 0xff)
color = front & 0xff;
else
color = (back & 0xff) + 256;
- *BITMAP_ADDR16(state->m_tmpbitmap, y, x + 1) = color;
+ state->m_tmpbitmap->pix16(y, x + 1) = color;
}
@@ -126,14 +126,14 @@ SCREEN_UPDATE( blockout )
if (d)
{
- if (d & 0x80) *BITMAP_ADDR16(bitmap, y, x + 0) = color;
- if (d & 0x40) *BITMAP_ADDR16(bitmap, y, x + 1) = color;
- if (d & 0x20) *BITMAP_ADDR16(bitmap, y, x + 2) = color;
- if (d & 0x10) *BITMAP_ADDR16(bitmap, y, x + 3) = color;
- if (d & 0x08) *BITMAP_ADDR16(bitmap, y, x + 4) = color;
- if (d & 0x04) *BITMAP_ADDR16(bitmap, y, x + 5) = color;
- if (d & 0x02) *BITMAP_ADDR16(bitmap, y, x + 6) = color;
- if (d & 0x01) *BITMAP_ADDR16(bitmap, 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 d584112e865..5067d08c13e 100644
--- a/src/mame/video/bloodbro.c
+++ b/src/mame/video/bloodbro.c
@@ -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]);
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
+ 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]);
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
+ 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]); /* ? */
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
+ 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 a7eb3cbf5ff..1916245db05 100644
--- a/src/mame/video/blstroid.c
+++ b/src/mame/video/blstroid.c
@@ -159,8 +159,8 @@ SCREEN_UPDATE( blstroid )
for (r = 0; r < rectlist.numrects; r++, rectlist.rect++)
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
- UINT16 *mo = (UINT16 *)mobitmap->base + mobitmap->rowpixels * y;
- UINT16 *pf = (UINT16 *)bitmap->base + bitmap->rowpixels * y;
+ UINT16 *mo = &mobitmap->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 361a715255c..c5009451774 100644
--- a/src/mame/video/blueprnt.c
+++ b/src/mame/video/blueprnt.c
@@ -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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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/boogwing.c b/src/mame/video/boogwing.c
index c3d534818c9..2669b1997e2 100644
--- a/src/mame/video/boogwing.c
+++ b/src/mame/video/boogwing.c
@@ -150,8 +150,8 @@ SCREEN_UPDATE( boogwing )
/* Draw playfields */
decocomn_clear_sprite_priority_bitmap(state->m_decocomn);
- bitmap_fill(bitmap, cliprect, screen.machine().pens[0x400]); /* pen not confirmed */
- bitmap_fill(screen.machine().priority_bitmap, NULL, 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 6875c7d374c..ca6fe9070e1 100644
--- a/src/mame/video/bosco.c
+++ b/src/mame/video/bosco.c
@@ -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_ADDR16(bitmap, 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(bitmap,cliprect,get_black_pen(screen.machine()));
+ 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 a9ab1f7f941..7810d13152a 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(bitmap, cliprect, state->m_layer_colorbase[1]);
+ 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/btoads.c b/src/mame/video/btoads.c
index 626caf9b00a..974c3377e04 100644
--- a/src/mame/video/btoads.c
+++ b/src/mame/video/btoads.c
@@ -322,7 +322,7 @@ void btoads_state::scanline_update(screen_device &screen, bitmap_t *bitmap, int
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_ADDR32(bitmap, scanline, 0);
+ 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 b5c350cdab2..84f5bcf8da4 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(bitmap, cliprect, 255);
+ 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 9143f140209..bab05aacf41 100644
--- a/src/mame/video/buggychl.c
+++ b/src/mame/video/buggychl.c
@@ -86,7 +86,7 @@ static void draw_sky( bitmap_t *bitmap, const rectangle *cliprect )
for (y = 0; y < 256; y++)
for (x = 0; x < 256; x++)
- *BITMAP_ADDR16(bitmap, y, x) = 128 + x / 2;
+ bitmap->pix16(y, x) = 128 + x / 2;
}
@@ -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_ADDR16(bitmap, 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(bitmap, cliprect, 0);
+ 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 a3ce81c5616..a342464ce21 100644
--- a/src/mame/video/bwing.c
+++ b/src/mame/video/bwing.c
@@ -316,7 +316,7 @@ SCREEN_UPDATE( bwing )
tilemap_draw(bitmap, cliprect, state->m_bgmap, 0, 0);
}
else
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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/canyon.c b/src/mame/video/canyon.c
index 29ad6345ec7..00bdbb723a5 100644
--- a/src/mame/video/canyon.c
+++ b/src/mame/video/canyon.c
@@ -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(bitmap, &rect, 1 + 2 * i);
+ bitmap->fill(1 + 2 * i, rect);
}
}
diff --git a/src/mame/video/capbowl.c b/src/mame/video/capbowl.c
index a52f7a4fbd3..eb0ddad5a95 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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_ADDR32(bitmap, y, 0);
+ 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 0ea39e5be5f..d3018cd69cb 100644
--- a/src/mame/video/carpolo.c
+++ b/src/mame/video/carpolo.c
@@ -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 */
- plot_box(bitmap,0,0,RIGHT_BORDER+1,TOP_BORDER,BACKGROUND_PEN);
+ bitmap->plot_box(0,0,RIGHT_BORDER+1,TOP_BORDER,BACKGROUND_PEN);
/* field */
- plot_box(bitmap,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 */
- plot_box(bitmap,0,TOP_BORDER, RIGHT_BORDER+1,1,LINE_PEN);
- plot_box(bitmap,0,BOTTOM_BORDER,RIGHT_BORDER+1,1,LINE_PEN);
- plot_box(bitmap,LEFT_BORDER,TOP_BORDER, 1,BOTTOM_BORDER-TOP_BORDER+1,LINE_PEN);
- plot_box(bitmap,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,
@@ -360,8 +360,8 @@ static int check_sprite_sprite_collision(running_machine &machine,
normalize_coordinates(&x1, &y1, &x2, &y2);
- bitmap_fill(state->m_sprite_sprite_collision_bitmap1, 0, 0);
- bitmap_fill(state->m_sprite_sprite_collision_bitmap2, 0, 0);
+ state->m_sprite_sprite_collision_bitmap1->fill(0);
+ state->m_sprite_sprite_collision_bitmap2->fill(0);
drawgfx_opaque(state->m_sprite_sprite_collision_bitmap1,0,machine.gfx[0],
code1,0,
@@ -375,8 +375,8 @@ static int check_sprite_sprite_collision(running_machine &machine,
for (x = x1; x < x1 + SPRITE_WIDTH; x++)
for (y = y1; y < y1 + SPRITE_HEIGHT; y++)
- if ((*BITMAP_ADDR16(state->m_sprite_sprite_collision_bitmap1, y, x) == 1) &&
- (*BITMAP_ADDR16(state->m_sprite_sprite_collision_bitmap2, y, x) == 1))
+ if ((state->m_sprite_sprite_collision_bitmap1->pix16(y, x) == 1) &&
+ (state->m_sprite_sprite_collision_bitmap2->pix16(y, x) == 1))
{
*col_x = (x1 + x) & 0x0f;
*col_y = (y1 + y) & 0x0f;
@@ -414,8 +414,8 @@ static int check_sprite_left_goal_collision(running_machine &machine, int x1, in
normalize_coordinates(&x1, &y1, &x2, &y2);
- bitmap_fill(state->m_sprite_goal_collision_bitmap1, 0, 0);
- bitmap_fill(state->m_sprite_goal_collision_bitmap2, 0, 0);
+ state->m_sprite_goal_collision_bitmap1->fill(0);
+ state->m_sprite_goal_collision_bitmap2->fill(0);
drawgfx_opaque(state->m_sprite_goal_collision_bitmap1,0,machine.gfx[0],
code1,0,
@@ -430,9 +430,9 @@ static int check_sprite_left_goal_collision(running_machine &machine, int x1, in
for (x = x1; x < x1 + SPRITE_WIDTH; x++)
for (y = y1; y < y1 + SPRITE_HEIGHT; y++)
- if ((*BITMAP_ADDR16(state->m_sprite_goal_collision_bitmap1, y, x) == 1))
+ if ((state->m_sprite_goal_collision_bitmap1->pix16(y, x) == 1))
{
- pen_t pix = *BITMAP_ADDR16(state->m_sprite_goal_collision_bitmap2, y, x);
+ pen_t pix = state->m_sprite_goal_collision_bitmap2->pix16(y, x);
if (pix == LEFT_GOAL_PEN)
{
@@ -472,8 +472,8 @@ static int check_sprite_right_goal_collision(running_machine &machine, int x1, i
normalize_coordinates(&x1, &y1, &x2, &y2);
- bitmap_fill(state->m_sprite_goal_collision_bitmap1, 0, 0);
- bitmap_fill(state->m_sprite_goal_collision_bitmap2, 0, 0);
+ state->m_sprite_goal_collision_bitmap1->fill(0);
+ state->m_sprite_goal_collision_bitmap2->fill(0);
drawgfx_opaque(state->m_sprite_goal_collision_bitmap1,0,machine.gfx[0],
code1,0,
@@ -488,9 +488,9 @@ static int check_sprite_right_goal_collision(running_machine &machine, int x1, i
for (x = x1; x < x1 + SPRITE_WIDTH; x++)
for (y = y1; y < y1 + SPRITE_HEIGHT; y++)
- if ((*BITMAP_ADDR16(state->m_sprite_goal_collision_bitmap1, y, x) == 1))
+ if ((state->m_sprite_goal_collision_bitmap1->pix16(y, x) == 1))
{
- pen_t pix = *BITMAP_ADDR16(state->m_sprite_goal_collision_bitmap2, y, x);
+ pen_t pix = state->m_sprite_goal_collision_bitmap2->pix16(y, x);
if (pix == RIGHT_GOAL_PEN)
{
@@ -528,7 +528,7 @@ static int check_sprite_border_collision(running_machine &machine, UINT8 x1, UIN
for (x = 0; x < SPRITE_WIDTH; x++)
for (y = 0; y < SPRITE_HEIGHT; y++)
- if ((*BITMAP_ADDR16(state->m_sprite_border_collision_bitmap, y, x) == 1))
+ if ((state->m_sprite_border_collision_bitmap->pix16(y, x) == 1))
{
if (((UINT8)(x1 + x) == LEFT_BORDER) ||
((UINT8)(x1 + x) == RIGHT_BORDER))
diff --git a/src/mame/video/cave.c b/src/mame/video/cave.c
index 6a0b4a3383d..0090b07bdcc 100644
--- a/src/mame/video/cave.c
+++ b/src/mame/video/cave.c
@@ -746,8 +746,8 @@ static void sprite_init_cave( running_machine &machine )
state->m_sprite_zbuf_baseval = 0x10000 - MAX_SPRITE_NUM;
state->m_sprite_zbuf = auto_bitmap_alloc(machine, screen_width, screen_height, BITMAP_FORMAT_INDEXED16);
- state->m_blit.baseaddr_zbuf = (UINT8 *)state->m_sprite_zbuf->base;
- state->m_blit.line_offset_zbuf = state->m_sprite_zbuf->rowpixels * state->m_sprite_zbuf->bpp / 8;
+ state->m_blit.baseaddr_zbuf = &state->m_sprite_zbuf->pix8(0);
+ state->m_blit.line_offset_zbuf = state->m_sprite_zbuf->rowpixels() * state->m_sprite_zbuf->bpp() / 8;
state->m_num_sprites = state->m_spriteram_size / 0x10 / 2;
state->m_sprite = auto_alloc_array_clear(machine, struct sprite_cave, state->m_num_sprites);
@@ -827,7 +827,7 @@ static void cave_sprite_check( screen_device &screen, const rectangle *clip )
if (clip->min_y == visarea.min_y)
{
if(!(state->m_sprite_zbuf_baseval += MAX_SPRITE_NUM))
- bitmap_fill(state->m_sprite_zbuf, &visarea, 0);
+ state->m_sprite_zbuf->fill(0, visarea);
}
break;
@@ -836,7 +836,7 @@ static void cave_sprite_check( screen_device &screen, const rectangle *clip )
if (clip->min_y == visarea.min_y)
{
if(!(state->m_sprite_zbuf_baseval += MAX_SPRITE_NUM))
- bitmap_fill(state->m_sprite_zbuf,&visarea,0);
+ state->m_sprite_zbuf->fill(0, visarea);
}
break;
@@ -1548,8 +1548,8 @@ SCREEN_UPDATE( cave )
set_pens(screen.machine());
- state->m_blit.baseaddr = (UINT8 *)bitmap->base;
- 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(bitmap, cliprect, state->m_background_color);
+ 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 66fb6269253..e1abf838e2c 100644
--- a/src/mame/video/cbasebal.c
+++ b/src/mame/video/cbasebal.c
@@ -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(bitmap, cliprect, 768);
+ 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 6614351cc17..32594ad5e4d 100644
--- a/src/mame/video/ccastles.c
+++ b/src/mame/video/ccastles.c
@@ -274,7 +274,7 @@ SCREEN_UPDATE( ccastles )
int x, y, offs;
/* draw the sprites */
- bitmap_fill(state->m_spritebitmap, cliprect, 0x0f);
+ state->m_spritebitmap->fill(0x0f, *cliprect);
for (offs = 0; offs < 320/2; offs += 4)
{
int x = spriteaddr[offs + 3];
@@ -288,7 +288,7 @@ SCREEN_UPDATE( ccastles )
/* draw the bitmap to the screen, looping over Y */
for (y = cliprect->min_y; y <= cliprect->max_y; y++)
{
- UINT16 *dst = (UINT16 *)bitmap->base + y * bitmap->rowpixels;
+ UINT16 *dst = &bitmap->pix16(y);
/* if we're in the VBLANK region, just fill with black */
if (state->m_syncprom[y] & 1)
@@ -300,7 +300,7 @@ SCREEN_UPDATE( ccastles )
/* non-VBLANK region: merge the sprites and the bitmap */
else
{
- UINT16 *mosrc = (UINT16 *)state->m_spritebitmap->base + y * state->m_spritebitmap->rowpixels;
+ UINT16 *mosrc = &state->m_spritebitmap->pix16(y);
int effy = (((y - state->m_vblank_end) + (flip ? 0 : state->m_vscroll)) ^ flip) & 0xff;
UINT8 *src;
diff --git a/src/mame/video/cclimber.c b/src/mame/video/cclimber.c
index b7aa45201c3..11060e519d0 100644
--- a/src/mame/video/cclimber.c
+++ b/src/mame/video/cclimber.c
@@ -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(bitmap, cliprect, CCLIMBER_BG_PEN);
+ 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_ADDR16(bitmap, j, (i - 8) & 0xff) = pen;
+ bitmap->pix16(j, (i - 8) & 0xff) = pen;
}
draw_playfield(screen.machine(), bitmap, cliprect);
@@ -730,29 +730,29 @@ SCREEN_UPDATE( swimmer )
{
if (CCLIMBER_FLIP_X)
{
- rectangle split_rect_left = { 0, 0xff - SWIMMER_BG_SPLIT, 0, 0xff };
- rectangle split_rect_right = { 0x100 - SWIMMER_BG_SPLIT, 0xff, 0, 0xff };
+ rectangle split_rect_left(0, 0xff - SWIMMER_BG_SPLIT, 0, 0xff);
+ rectangle split_rect_right(0x100 - SWIMMER_BG_SPLIT, 0xff, 0, 0xff);
- sect_rect(&split_rect_left, cliprect);
- bitmap_fill(bitmap, &split_rect_left, SWIMMER_SIDE_BG_PEN);
+ split_rect_left &= *cliprect;
+ bitmap->fill(SWIMMER_SIDE_BG_PEN, split_rect_left);
- sect_rect(&split_rect_right, cliprect);
- bitmap_fill(bitmap, &split_rect_right, CCLIMBER_BG_PEN);
+ split_rect_right &= *cliprect;
+ bitmap->fill(CCLIMBER_BG_PEN, split_rect_right);
}
else
{
- rectangle split_rect_left = { 0, SWIMMER_BG_SPLIT - 1, 0, 0xff };
- rectangle split_rect_right = { SWIMMER_BG_SPLIT, 0xff, 0, 0xff };
+ rectangle split_rect_left(0, SWIMMER_BG_SPLIT - 1, 0, 0xff);
+ rectangle split_rect_right(SWIMMER_BG_SPLIT, 0xff, 0, 0xff);
- sect_rect(&split_rect_left, cliprect);
- bitmap_fill(bitmap, &split_rect_left, CCLIMBER_BG_PEN);
+ split_rect_left &= *cliprect;
+ bitmap->fill(CCLIMBER_BG_PEN, split_rect_left);
- sect_rect(&split_rect_right, cliprect);
- bitmap_fill(bitmap, &split_rect_right, SWIMMER_SIDE_BG_PEN);
+ split_rect_right &= *cliprect;
+ bitmap->fill(SWIMMER_SIDE_BG_PEN, split_rect_right);
}
}
else
- bitmap_fill(bitmap, cliprect, CCLIMBER_BG_PEN);
+ 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(bitmap, cliprect, CCLIMBER_BG_PEN);
+ 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 e86705d9a83..b7f129e2af8 100644
--- a/src/mame/video/chaknpop.c
+++ b/src/mame/video/chaknpop.c
@@ -250,9 +250,9 @@ static void draw_bitmap( running_machine &machine, bitmap_t *bitmap, const recta
if (color)
{
- pen_t pen = *BITMAP_ADDR16(bitmap, y, x);
+ pen_t pen = bitmap->pix16(y, x);
pen |= color;
- *BITMAP_ADDR16(bitmap, y, x) = pen;
+ bitmap->pix16(y, x) = pen;
}
}
}
diff --git a/src/mame/video/changela.c b/src/mame/video/changela.c
index b729a151b6d..fff166aaa0b 100644
--- a/src/mame/video/changela.c
+++ b/src/mame/video/changela.c
@@ -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_ADDR16(bitmap, 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_ADDR16(bitmap, sy, xpos + i + 16) = data | 0x10;
+ bitmap->pix16(sy, xpos + i + 16) = data | 0x10;
}
}
}
@@ -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_ADDR16(bitmap, sy, sx) = col | 0x20;
+ bitmap->pix16(sy, sx) = col | 0x20;
}
}
}
@@ -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_ADDR16(bitmap, 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_ADDR16(bitmap, sy, sx) = col;
+ bitmap->pix16(sy, sx) = col;
}
}
}
@@ -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_ADDR16(bitmap, 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_ADDR16(bitmap, sy, sx) = col | 0x30;
+ bitmap->pix16(sy, sx) = col | 0x30;
}
}
@@ -652,11 +652,11 @@ static TIMER_CALLBACK( changela_scanline_callback )
int sx;
/* clear the current scanline first */
- rectangle rect = { 0, 255, sy, sy };
- bitmap_fill(state->m_river_bitmap, &rect, 0x00);
- bitmap_fill(state->m_obj0_bitmap, &rect, 0x00);
- bitmap_fill(state->m_tree0_bitmap, &rect, 0x00);
- bitmap_fill(state->m_tree1_bitmap, &rect, 0x00);
+ const rectangle rect(0, 255, sy, sy);
+ state->m_river_bitmap->fill(0x00, rect);
+ state->m_obj0_bitmap->fill(0x00, rect);
+ 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);
@@ -668,28 +668,28 @@ static TIMER_CALLBACK( changela_scanline_callback )
{
int riv_col, prev_col;
- if ((*BITMAP_ADDR16(state->m_river_bitmap, sy, sx) == 0x08)
- || (*BITMAP_ADDR16(state->m_river_bitmap, sy, sx) == 0x09)
- || (*BITMAP_ADDR16(state->m_river_bitmap, sy, sx) == 0x0a))
+ if ((state->m_river_bitmap->pix16(sy, sx) == 0x08)
+ || (state->m_river_bitmap->pix16(sy, sx) == 0x09)
+ || (state->m_river_bitmap->pix16(sy, sx) == 0x0a))
riv_col = 1;
else
riv_col = 0;
- if ((*BITMAP_ADDR16(state->m_river_bitmap, sy, sx-1) == 0x08)
- || (*BITMAP_ADDR16(state->m_river_bitmap, sy, sx-1) == 0x09)
- || (*BITMAP_ADDR16(state->m_river_bitmap, sy, sx-1) == 0x0a))
+ if ((state->m_river_bitmap->pix16(sy, sx-1) == 0x08)
+ || (state->m_river_bitmap->pix16(sy, sx-1) == 0x09)
+ || (state->m_river_bitmap->pix16(sy, sx-1) == 0x0a))
prev_col = 1;
else
prev_col = 0;
- if (*BITMAP_ADDR16(state->m_obj0_bitmap, sy, sx) == 0x14) /* Car Outline Color */
+ if (state->m_obj0_bitmap->pix16(sy, sx) == 0x14) /* Car Outline Color */
{
/* Tree 0 Collision */
- if (*BITMAP_ADDR16(state->m_tree0_bitmap, sy, sx) != 0)
+ if (state->m_tree0_bitmap->pix16(sy, sx) != 0)
state->m_tree0_col = 1;
/* Tree 1 Collision */
- if (*BITMAP_ADDR16(state->m_tree1_bitmap, sy, sx) != 0)
+ if (state->m_tree1_bitmap->pix16(sy, sx) != 0)
state->m_tree1_col = 1;
/* Hit Right Bank */
diff --git a/src/mame/video/cheekyms.c b/src/mame/video/cheekyms.c
index 8bbc01e1514..2cd530cd2de 100644
--- a/src/mame/video/cheekyms.c
+++ b/src/mame/video/cheekyms.c
@@ -158,8 +158,8 @@ 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(bitmap, cliprect, 0);
- bitmap_fill(state->m_bitmap_buffer, cliprect, 0);
+ 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);
@@ -185,13 +185,13 @@ SCREEN_UPDATE( cheekyms )
if (in_man_area)
{
- if ((y + scrolly) < 27 * 8 && *BITMAP_ADDR16(state->m_bitmap_buffer, y + scrolly, x) != 0)
- *BITMAP_ADDR16(bitmap, y, x) = *BITMAP_ADDR16(state->m_bitmap_buffer, y + scrolly, x);
+ 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);
}
else
{
- if(*BITMAP_ADDR16(state->m_bitmap_buffer, y, x) != 0)
- *BITMAP_ADDR16(bitmap, y, x) = *BITMAP_ADDR16(state->m_bitmap_buffer, y, x);
+ if(state->m_bitmap_buffer->pix16(y, x) != 0)
+ 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 68c59f540fb..7b5fb753889 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(bitmap, cliprect, 0);
+ 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 4aa906ee764..9dc7a48193b 100644
--- a/src/mame/video/circus.c
+++ b/src/mame/video/circus.c
@@ -57,10 +57,10 @@ static void draw_line( bitmap_t *bitmap, const rectangle *cliprect, int x1, int
if (x1 == x2)
for (count = y2; count >= y1; count -= skip)
- *BITMAP_ADDR16(bitmap, count, x1) = 1;
+ bitmap->pix16(count, x1) = 1;
else
for (count = x2; count >= x1; count -= skip)
- *BITMAP_ADDR16(bitmap, y1, count) = 1;
+ bitmap->pix16(y1, count) = 1;
}
static void draw_sprite_collision( running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect )
@@ -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_ADDR16(bitmap, dy, dx);
- *BITMAP_ADDR16(bitmap, dy, dx) = machine.pens[pixel];
+ collision |= bitmap->pix16(dy, dx);
+ bitmap->pix16(dy, dx) = machine.pens[pixel];
}
}
}
diff --git a/src/mame/video/circusc.c b/src/mame/video/circusc.c
index 82ff8ee2942..ee288afb13b 100644
--- a/src/mame/video/circusc.c
+++ b/src/mame/video/circusc.c
@@ -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(bitmap, cliprect, 0);
+ 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 5a0492c2438..9d8bd7c8bf3 100644
--- a/src/mame/video/cischeat.c
+++ b/src/mame/video/cischeat.c
@@ -1265,7 +1265,7 @@ SCREEN_UPDATE( bigrun )
cischeat_tmap_SET_SCROLL(1)
cischeat_tmap_SET_SCROLL(2)
- bitmap_fill(bitmap,cliprect,0);
+ 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(bitmap,cliprect,0);
+ 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(bitmap,cliprect,0);
+// 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(bitmap,cliprect,0);
+ 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(bitmap,cliprect,0);
+// 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(bitmap,cliprect,0);
+ bitmap->fill(0, *cliprect);
flag = 0;
cischeat_tmap_DRAW(0)
diff --git a/src/mame/video/cloak.c b/src/mame/video/cloak.c
index 1fbb4fdde09..44d1391ae67 100644
--- a/src/mame/video/cloak.c
+++ b/src/mame/video/cloak.c
@@ -199,7 +199,7 @@ 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_ADDR16(bitmap, y, (x - 6) & 0xff) = 0x10 | ((x & 0x80) >> 4) | pen;
+ bitmap->pix16(y, (x - 6) & 0xff) = 0x10 | ((x & 0x80) >> 4) | pen;
}
}
diff --git a/src/mame/video/cloud9.c b/src/mame/video/cloud9.c
index 10be7455ad2..d79c2ad9855 100644
--- a/src/mame/video/cloud9.c
+++ b/src/mame/video/cloud9.c
@@ -256,7 +256,7 @@ SCREEN_UPDATE( cloud9 )
int x, y, offs;
/* draw the sprites */
- bitmap_fill(state->m_spritebitmap, cliprect, 0x00);
+ state->m_spritebitmap->fill(0x00, *cliprect);
for (offs = 0; offs < 0x20; offs++)
if (spriteaddr[offs + 0x00] != 0)
{
@@ -275,7 +275,7 @@ SCREEN_UPDATE( cloud9 )
/* draw the bitmap to the screen, looping over Y */
for (y = cliprect->min_y; y <= cliprect->max_y; y++)
{
- UINT16 *dst = (UINT16 *)bitmap->base + y * bitmap->rowpixels;
+ UINT16 *dst = &bitmap->pix16(y);
/* if we're in the VBLANK region, just fill with black */
if (~state->m_syncprom[y] & 2)
@@ -287,7 +287,7 @@ SCREEN_UPDATE( cloud9 )
/* non-VBLANK region: merge the sprites and the bitmap */
else
{
- UINT16 *mosrc = (UINT16 *)state->m_spritebitmap->base + y * state->m_spritebitmap->rowpixels;
+ UINT16 *mosrc = &state->m_spritebitmap->pix16(y);
int effy = y ^ flip;
UINT8 *src[2];
diff --git a/src/mame/video/cninja.c b/src/mame/video/cninja.c
index 57813bf4514..8dbcd9225bd 100644
--- a/src/mame/video/cninja.c
+++ b/src/mame/video/cninja.c
@@ -134,8 +134,8 @@ SCREEN_UPDATE( cninja )
deco16ic_pf_update(state->m_deco_tilegen2, state->m_pf3_rowscroll, state->m_pf4_rowscroll);
/* Draw playfields */
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
- bitmap_fill(bitmap, cliprect, 512);
+ 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 */
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
- bitmap_fill(bitmap, cliprect, 512);
+ 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);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
- bitmap_fill(bitmap, cliprect, 0);
+ 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 */
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
- bitmap_fill(bitmap, cliprect, 0x200);
+ 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(bitmap, cliprect, 0x400); /* 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 15876aa1ce3..0c069fc83e1 100644
--- a/src/mame/video/combatsc.c
+++ b/src/mame/video/combatsc.c
@@ -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));
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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(bitmap, &clip, 0);
+ bitmap->fill(0, clip);
clip = *cliprect;
clip.min_x = clip.max_x - 7;
- bitmap_fill(bitmap, &clip, 0);
+ bitmap->fill(0, clip);
}
return 0;
}
diff --git a/src/mame/video/contra.c b/src/mame/video/contra.c
index 6d68646186a..e1ed98bb11f 100644
--- a/src/mame/video/contra.c
+++ b/src/mame/video/contra.c
@@ -327,9 +327,9 @@ SCREEN_UPDATE( contra )
rectangle fg_finalclip = state->m_fg_clip;
rectangle tx_finalclip = state->m_tx_clip;
- sect_rect(&bg_finalclip, cliprect);
- sect_rect(&fg_finalclip, cliprect);
- sect_rect(&tx_finalclip, cliprect);
+ bg_finalclip &= *cliprect;
+ fg_finalclip &= *cliprect;
+ tx_finalclip &= *cliprect;
set_pens(screen.machine());
diff --git a/src/mame/video/copsnrob.c b/src/mame/video/copsnrob.c
index 111fd6b0ed5..975348c4b53 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_ADDR16(bitmap, 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 7062ebe9862..b4b9e55462a 100644
--- a/src/mame/video/cosmic.c
+++ b/src/mame/video/cosmic.c
@@ -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_ADDR16(bitmap, 255-y, 255-x) = pen;
+ bitmap->pix16(255-y, 255-x) = pen;
else
- *BITMAP_ADDR16(bitmap, y, x) = pen;
+ bitmap->pix16(y, x) = pen;
}
x++;
@@ -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_ADDR16(bitmap, y, x) = col;
+ bitmap->pix16(y, x) = col;
}
x++;
@@ -407,9 +407,9 @@ static void devzone_draw_grid( running_machine &machine, bitmap_t *bitmap, const
{
/* blue */
if (flip_screen_get(machine))
- *BITMAP_ADDR16(bitmap, 255-y, 255-x) = 4;
+ bitmap->pix16(255-y, 255-x) = 4;
else
- *BITMAP_ADDR16(bitmap, y, x) = 4;
+ bitmap->pix16(y, x) = 4;
}
horz_data = (horz_data << 1) | 0x01;
@@ -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_ADDR16(bitmap, 255-y, 255-x) = color;
+ bitmap->pix16(255-y, 255-x) = color;
else
- *BITMAP_ADDR16(bitmap, 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(bitmap, cliprect, 0);
+ bitmap->fill(0, *cliprect);
draw_bitmap(screen.machine(), bitmap, cliprect);
return 0;
}
@@ -556,7 +556,7 @@ SCREEN_UPDATE( cosmicg )
SCREEN_UPDATE( panic )
{
- bitmap_fill(bitmap, cliprect, 0);
+ 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(bitmap, cliprect, 0);
+ 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(bitmap, cliprect, 0);
+ 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(bitmap, cliprect, 0);
+ 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(bitmap, cliprect, 0);
+ 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 8d45f979207..7d206a0d5f4 100644
--- a/src/mame/video/cps1.c
+++ b/src/mame/video/cps1.c
@@ -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_ADDR16(bitmap, sy, sx) = 0xa00 + col;
+ bitmap->pix16(sy, sx) = 0xa00 + col;
}
}
}
@@ -2751,7 +2751,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_ADDR16(bitmap, sy, sx) = 0x800 + col;
+ bitmap->pix16(sy, sx) = 0x800 + col;
}
}
}
@@ -2851,7 +2851,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(bitmap, cliprect, 0xbff);
+ bitmap->fill(0xbff, *cliprect);
}
else
{
@@ -2860,7 +2860,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(bitmap, cliprect, get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
}
cps1_render_stars(screen, bitmap, cliprect);
@@ -2870,7 +2870,7 @@ SCREEN_UPDATE( cps1 )
l1 = (layercontrol >> 0x08) & 03;
l2 = (layercontrol >> 0x0a) & 03;
l3 = (layercontrol >> 0x0c) & 03;
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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 5c53208be46..53181f213f7 100644
--- a/src/mame/video/crbaloon.c
+++ b/src/mame/video/crbaloon.c
@@ -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_ADDR16(bitmap, 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_ADDR16(bitmap, 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 7d0f0f11d1a..afccd126f92 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_ADDR32(bitmap, y, x) = pens[color];
+ bitmap->pix32(y, x) = pens[color];
/* next pixel */
data_a0 = data_a0 << 1;
diff --git a/src/mame/video/crshrace.c b/src/mame/video/crshrace.c
index c299a83d461..55c9588d3e6 100644
--- a/src/mame/video/crshrace.c
+++ b/src/mame/video/crshrace.c
@@ -191,11 +191,11 @@ SCREEN_UPDATE( crshrace )
if (state->m_gfxctrl & 0x04) /* display disable? */
{
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
return 0;
}
- bitmap_fill(bitmap, cliprect, 0x1ff);
+ bitmap->fill(0x1ff, *cliprect);
switch (state->m_gfxctrl & 0xfb)
{
diff --git a/src/mame/video/cvs.c b/src/mame/video/cvs.c
index 198769d8931..f3fb0511fe4 100644
--- a/src/mame/video/cvs.c
+++ b/src/mame/video/cvs.c
@@ -261,16 +261,16 @@ SCREEN_UPDATE( cvs )
int bx = 255 - 7 - state->m_bullet_ram[offs] - ct;
/* Bullet/Object Collision */
- if ((*BITMAP_ADDR16(s2636_0_bitmap, offs, bx) != 0) ||
- (*BITMAP_ADDR16(s2636_1_bitmap, offs, bx) != 0) ||
- (*BITMAP_ADDR16(s2636_2_bitmap, 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, *BITMAP_ADDR16(state->m_scrolled_collision_background, offs, bx)))
+ if (colortable_entry_get_value(screen.machine().colortable, state->m_scrolled_collision_background->pix16(offs, bx)))
state->m_collision_register |= 0x80;
- *BITMAP_ADDR16(bitmap, offs, bx) = BULLET_STAR_PEN;
+ bitmap->pix16(offs, bx) = BULLET_STAR_PEN;
}
}
}
@@ -286,15 +286,15 @@ SCREEN_UPDATE( cvs )
for (x = cliprect->min_x; x <= cliprect->max_x; x++)
{
- int pixel0 = *BITMAP_ADDR16(s2636_0_bitmap, y, x);
- int pixel1 = *BITMAP_ADDR16(s2636_1_bitmap, y, x);
- int pixel2 = *BITMAP_ADDR16(s2636_2_bitmap, 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_ADDR16(bitmap, 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;
@@ -302,7 +302,7 @@ SCREEN_UPDATE( cvs )
if (S2636_IS_PIXEL_DRAWN(pixel0) && S2636_IS_PIXEL_DRAWN(pixel2)) state->m_collision_register |= 0x04;
/* S2636 vs. background collision detection */
- if (colortable_entry_get_value(screen.machine().colortable, *BITMAP_ADDR16(state->m_scrolled_collision_background, y, x)))
+ if (colortable_entry_get_value(screen.machine().colortable, state->m_scrolled_collision_background->pix16(y, x)))
{
if (S2636_IS_PIXEL_DRAWN(pixel0)) state->m_collision_register |= 0x10;
if (S2636_IS_PIXEL_DRAWN(pixel1)) state->m_collision_register |= 0x20;
@@ -330,8 +330,8 @@ SCREEN_UPDATE( cvs )
y = ~y;
if ((y >= cliprect->min_y) && (y <= cliprect->max_y) &&
- (colortable_entry_get_value(screen.machine().colortable, *BITMAP_ADDR16(bitmap, y, x)) == 0))
- *BITMAP_ADDR16(bitmap, 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 06f341f19b9..220a5120a33 100644
--- a/src/mame/video/cyberbal.c
+++ b/src/mame/video/cyberbal.c
@@ -360,8 +360,8 @@ static UINT32 update_one_screen(screen_device &screen, bitmap_t *bitmap, const r
for (r = 0; r < rectlist.numrects; r++, rectlist.rect++)
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
- UINT16 *mo = (UINT16 *)mobitmap->base + mobitmap->rowpixels * y;
- UINT16 *pf = (UINT16 *)bitmap->base + bitmap->rowpixels * y + mooffset;
+ UINT16 *mo = &mobitmap->pix16(y);
+ 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/darkmist.c b/src/mame/video/darkmist.c
index 488dacb9ab9..44581a9dae2 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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 6e7255363a0..a41b74aaa5d 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(bitmap,cliprect,get_black_pen(screen.machine()));
+ 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 6f26a4f653f..0d19057869c 100644
--- a/src/mame/video/dassault.c
+++ b/src/mame/video/dassault.c
@@ -186,8 +186,8 @@ SCREEN_UPDATE( dassault )
/* Draw playfields/update priority bitmap */
decocomn_clear_sprite_priority_bitmap(state->m_decocomn);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
- bitmap_fill(bitmap, cliprect, screen.machine().pens[3072]);
+ 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 06df3743bb2..059cf1206ed 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);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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 35685b95ac6..4e95d3e0b3a 100644
--- a/src/mame/video/dc.c
+++ b/src/mame/video/dc.c
@@ -1753,7 +1753,7 @@ static void render_hline(running_machine &machine,bitmap_t *bitmap, texinfo *ti,
wl += ddx*dwdx;
- tdata = BITMAP_ADDR32(bitmap, y, xxl);
+ tdata = &bitmap->pix32(y, xxl);
wbufline = &wbuffer[y][xxl];
while(xxl < xxr) {
@@ -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(bitmap,cliprect,c);
+ bitmap->fill(c, *cliprect);
ns=state_ta.grab[rs].strips_size;
@@ -2075,7 +2075,7 @@ static void pvr_accumulationbuffer_to_framebuffer(address_space *space, int x,in
for (ycnt=0;ycnt<32;ycnt++)
{
UINT32 realwriteoffs = 0x05000000 + writeoffs + (y+ycnt) * (stride<<3) + (x*2);
- src = BITMAP_ADDR32(fake_accumulationbuffer_bitmap, y+ycnt, x);
+ src = &fake_accumulationbuffer_bitmap->pix32(y+ycnt, x);
for (xcnt=0;xcnt<32;xcnt++)
@@ -2099,7 +2099,7 @@ static void pvr_accumulationbuffer_to_framebuffer(address_space *space, int x,in
for (ycnt=0;ycnt<32;ycnt++)
{
UINT32 realwriteoffs = 0x05000000 + writeoffs + (y+ycnt) * (stride<<3) + (x*2);
- src = BITMAP_ADDR32(fake_accumulationbuffer_bitmap, y+ycnt, x);
+ src = &fake_accumulationbuffer_bitmap->pix32(y+ycnt, x);
for (xcnt=0;xcnt<32;xcnt++)
@@ -2126,7 +2126,7 @@ static void pvr_accumulationbuffer_to_framebuffer(address_space *space, int x,in
for (ycnt=0;ycnt<32;ycnt++)
{
UINT32 realwriteoffs = 0x05000000 + writeoffs + (y+ycnt) * (stride<<3) + (x*2);
- src = BITMAP_ADDR32(fake_accumulationbuffer_bitmap, y+ycnt, x);
+ src = &fake_accumulationbuffer_bitmap->pix32(y+ycnt, x);
for (xcnt=0;xcnt<32;xcnt++)
@@ -2151,7 +2151,7 @@ static void pvr_accumulationbuffer_to_framebuffer(address_space *space, int x,in
for (ycnt=0;ycnt<32;ycnt++)
{
UINT32 realwriteoffs = 0x05000000 + writeoffs + (y+ycnt) * (stride<<3) + (x*2);
- src = BITMAP_ADDR32(fake_accumulationbuffer_bitmap, y+ycnt, x);
+ src = &fake_accumulationbuffer_bitmap->pix32(y+ycnt, x);
for (xcnt=0;xcnt<32;xcnt++)
@@ -2178,7 +2178,7 @@ static void pvr_accumulationbuffer_to_framebuffer(address_space *space, int x,in
for (ycnt=0;ycnt<32;ycnt++)
{
UINT32 realwriteoffs = 0x05000000 + writeoffs + (y+ycnt) * (stride<<3) + (x*2);
- src = BITMAP_ADDR32(fake_accumulationbuffer_bitmap, y+ycnt, x);
+ src = &fake_accumulationbuffer_bitmap->pix32(y+ycnt, x);
for (xcnt=0;xcnt<32;xcnt++)
@@ -2239,7 +2239,7 @@ static void pvr_drawframebuffer(running_machine &machine,bitmap_t *bitmap,const
{
for (x=0;x < xi;x++)
{
- fbaddr=BITMAP_ADDR32(bitmap,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_ADDR32(bitmap,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_ADDR32(bitmap,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_ADDR32(bitmap,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_ADDR32(bitmap,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_ADDR32(bitmap,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_ADDR32(bitmap,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_ADDR32(bitmap,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_ADDR32(bitmap,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_ADDR32(bitmap,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_ADDR32(bitmap,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_ADDR32(bitmap,y,x);
+ fbaddr=&bitmap->pix32(y, x);
c=*(((UINT16 *)state->dc_framebuffer_ram) + (WORD2_XOR_LE(addrp) >> 1));
b = (c & 0x001f) << 3;
@@ -2672,14 +2672,14 @@ SCREEN_UPDATE(dc)
{
for (x = visarea->min_x ; x <= visarea->max_x ; x++)
{
- UINT32* src = BITMAP_ADDR32(fake_accumulationbuffer_bitmap, y, x);
- UINT32* dst = BITMAP_ADDR32(bitmap, y, x);
+ UINT32* src = &fake_accumulationbuffer_bitmap->pix32(y, x);
+ UINT32* dst = &bitmap->pix32(y, x);
dst[0] = src[0];
}
}
#endif
- bitmap_fill(bitmap,cliprect,MAKE_ARGB(0xff,vo_border_R,vo_border_G,vo_border_B)); //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 9339f5a39b5..a21baeac483 100644
--- a/src/mame/video/dcheese.c
+++ b/src/mame/video/dcheese.c
@@ -124,8 +124,8 @@ SCREEN_UPDATE( dcheese )
/* update the pixels */
for (y = cliprect->min_y; y <= cliprect->max_y; y++)
{
- UINT16 *dest = BITMAP_ADDR16(bitmap, y, 0);
- UINT16 *src = BITMAP_ADDR16(state->m_dstbitmap, (y + state->m_blitter_vidparam[0x28/2]) % DSTBITMAP_HEIGHT, 0);
+ 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++)
dest[x] = src[x];
@@ -148,7 +148,7 @@ static void do_clear( running_machine &machine )
/* clear the requested scanlines */
for (y = state->m_blitter_vidparam[0x2c/2]; y < state->m_blitter_vidparam[0x2a/2]; y++)
- memset(BITMAP_ADDR16(state->m_dstbitmap, y % DSTBITMAP_HEIGHT, 0), 0, DSTBITMAP_WIDTH * 2);
+ memset(&state->m_dstbitmap->pix16(y % DSTBITMAP_HEIGHT), 0, DSTBITMAP_WIDTH * 2);
/* signal an IRQ when done (timing is just a guess) */
machine.scheduler().timer_set(machine.primary_screen->scan_period(), FUNC(dcheese_signal_irq_callback), 1);
@@ -182,7 +182,7 @@ static void do_blit( running_machine &machine )
/* loop over target rows */
for (y = ystart; y <= yend; y++)
{
- UINT16 *dst = BITMAP_ADDR16(state->m_dstbitmap, y % DSTBITMAP_HEIGHT, 0);
+ UINT16 *dst = &state->m_dstbitmap->pix16(y % DSTBITMAP_HEIGHT);
/* loop over target columns */
for (x = xstart; x <= xend; x++)
diff --git a/src/mame/video/dcon.c b/src/mame/video/dcon.c
index b7ebe7bc54c..03531f7e7b0 100644
--- a/src/mame/video/dcon.c
+++ b/src/mame/video/dcon.c
@@ -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>();
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
+ 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(bitmap,cliprect,15); /* 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>();
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
+ 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(bitmap,cliprect,15); /* 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 a828afa31f1..7f6fce21403 100644
--- a/src/mame/video/dday.c
+++ b/src/mame/video/dday.c
@@ -334,12 +334,12 @@ SCREEN_UPDATE( dday )
for (x = cliprect->min_x; x <= cliprect->max_x; x++)
for (y = cliprect->min_y; y <= cliprect->max_y; y++)
{
- UINT16 src_pixel = *BITMAP_ADDR16(state->m_main_bitmap, y, x);
+ UINT16 src_pixel = state->m_main_bitmap->pix16(y, x);
- if (*BITMAP_ADDR16(sl_bitmap, y, x) == 0xff)
+ if (sl_bitmap->pix16(y, x) == 0xff)
src_pixel += screen.machine().total_colors();
- *BITMAP_ADDR16(bitmap, y, x) = src_pixel;
+ bitmap->pix16(y, x) = src_pixel;
}
}
else
diff --git a/src/mame/video/deadang.c b/src/mame/video/deadang.c
index ad91efd57b8..6e07da1a833 100644
--- a/src/mame/video/deadang.c
+++ b/src/mame/video/deadang.c
@@ -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(bitmap,cliprect,get_black_pen(screen.machine()));
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
+ 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 53a641d7743..32f1223c401 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(bitmap,cliprect,screen.machine().pens[768]);
+ 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/decbac06.c b/src/mame/video/decbac06.c
index 7ab35fcc241..f5d8ec1d735 100644
--- a/src/mame/video/decbac06.c
+++ b/src/mame/video/decbac06.c
@@ -232,8 +232,8 @@ void deco_bac06_device::custom_tilemap_draw(running_machine &machine,
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 +254,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 +265,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 = *BITMAP_ADDR16(src_bitmap, (src_y + column_offset)&height_mask, src_x&width_mask);
- colpri = *BITMAP_ADDR8(flags_bitmap, (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,7 +281,7 @@ void deco_bac06_device::custom_tilemap_draw(running_machine &machine,
if ((p&penmask)==pencondition)
if((colpri&colprimask)==colpricondition)
- *BITMAP_ADDR16(bitmap, y, x) = p+(colpri&m_gfxcolmask)*m_bppmult;
+ bitmap->pix16(y, x) = p+(colpri&m_gfxcolmask)*m_bppmult;
}
}
src_y++;
diff --git a/src/mame/video/deco16ic.c b/src/mame/video/deco16ic.c
index 57e7c28068f..2ee4245796c 100644
--- a/src/mame/video/deco16ic.c
+++ b/src/mame/video/deco16ic.c
@@ -396,8 +396,8 @@ static void custom_tilemap_draw(
int starty = cliprect->min_y;
int endy = cliprect->max_y+1;
- width_mask = src_bitmap0->width - 1;
- height_mask = src_bitmap0->height - 1;
+ width_mask = src_bitmap0->width() - 1;
+ height_mask = src_bitmap0->height() - 1;
src_y = (scrolly + starty) & height_mask;
@@ -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++)
{
@@ -419,21 +419,21 @@ static void custom_tilemap_draw(
else
column_offset = 0;
- p = *BITMAP_ADDR16(src_bitmap0, (src_y + column_offset) & height_mask, src_x);
+ p = src_bitmap0->pix16((src_y + column_offset) & height_mask, src_x);
if (src_bitmap1)
{
- p |= (*BITMAP_ADDR16(src_bitmap1, (src_y + column_offset) & height_mask, src_x) & combine_mask) << combine_shift;
+ p |= (src_bitmap1->pix16((src_y + column_offset) & height_mask, src_x) & combine_mask) << combine_shift;
}
src_x = (src_x + 1) & width_mask;
if ((flags & TILEMAP_DRAW_OPAQUE) || (p & trans_mask))
{
- *BITMAP_ADDR16(bitmap, y, x) = machine.pens[p];
+ bitmap->pix16(y, x) = machine.pens[p];
if (machine.priority_bitmap)
{
- UINT8 *pri = BITMAP_ADDR8(machine.priority_bitmap, y, 0);
+ UINT8 *pri = &machine.priority_bitmap->pix8(y);
pri[x] |= priority;
}
}
@@ -449,18 +449,18 @@ static void custom_tilemap_draw(
else
column_offset = 0;
- p = *BITMAP_ADDR16(src_bitmap0, (src_y + column_offset) & height_mask, src_x);
+ p = src_bitmap0->pix16((src_y + column_offset) & height_mask, src_x);
if (src_bitmap1)
{
if (!is_tattoo)
{
// does boogie wings actually use this, or is the tattoo assassing code correct in this mode?
- p |= (*BITMAP_ADDR16(src_bitmap1, (src_y + column_offset) & height_mask, src_x) & combine_mask) << combine_shift;
+ p |= (src_bitmap1->pix16((src_y + column_offset) & height_mask, src_x) & combine_mask) << combine_shift;
}
else
{
- UINT16 p2 = *BITMAP_ADDR16(src_bitmap1, (src_y + column_offset) & height_mask, src_x);
+ UINT16 p2 = src_bitmap1->pix16((src_y + column_offset) & height_mask, src_x);
p = 0x200+( ((p&0x30)<<4) | (p&0x0f) | ((p2 & 0x0f)<<4));
}
}
@@ -468,10 +468,10 @@ static void custom_tilemap_draw(
if ((flags & TILEMAP_DRAW_OPAQUE) || (p & trans_mask))
{
- *BITMAP_ADDR32(bitmap, y, x) = machine.pens[p];
+ bitmap->pix32(y, x) = machine.pens[p];
if (machine.priority_bitmap)
{
- UINT8 *pri = BITMAP_ADDR8(machine.priority_bitmap, y, 0);
+ UINT8 *pri = &machine.priority_bitmap->pix8(y);
pri[x] |= priority;
}
}
diff --git a/src/mame/video/deco32.c b/src/mame/video/deco32.c
index 163caa09d5b..27e0eac20ba 100644
--- a/src/mame/video/deco32.c
+++ b/src/mame/video/deco32.c
@@ -171,16 +171,8 @@ INLINE void dragngun_drawgfxzoom(
/* KW 991012 -- Added code to force clip to bitmap boundary */
if(clip)
{
- myclip.min_x = clip->min_x;
- myclip.max_x = clip->max_x;
- myclip.min_y = clip->min_y;
- myclip.max_y = clip->max_y;
-
- if (myclip.min_x < 0) myclip.min_x = 0;
- if (myclip.max_x >= dest_bmp->width) myclip.max_x = dest_bmp->width-1;
- if (myclip.min_y < 0) myclip.min_y = 0;
- if (myclip.max_y >= dest_bmp->height) myclip.max_y = dest_bmp->height-1;
-
+ myclip = *clip;
+ myclip &= dest_bmp->cliprect();
clip=&myclip;
}
@@ -261,8 +253,8 @@ INLINE void dragngun_drawgfxzoom(
for( y=sy; y<ey; y++ )
{
const UINT8 *source = code_base + (y_index>>16) * gfx->line_modulo;
- UINT32 *dest = BITMAP_ADDR32(dest_bmp, y, 0);
- UINT8 *pri = BITMAP_ADDR8(pri_buffer, y, 0);
+ UINT32 *dest = &dest_bmp->pix32(y);
+ UINT8 *pri = &pri_buffer->pix8(y);
int x, x_index = x_index_base;
for( x=sx; x<ex; x++ )
@@ -285,7 +277,7 @@ INLINE void dragngun_drawgfxzoom(
for( y=sy; y<ey; y++ )
{
const UINT8 *source = code_base + (y_index>>16) * gfx->line_modulo;
- UINT32 *dest = BITMAP_ADDR32(dest_bmp, y, 0);
+ UINT32 *dest = &dest_bmp->pix32(y);
int x, x_index = x_index_base;
for( x=sx; x<ex; x++ )
@@ -308,8 +300,8 @@ INLINE void dragngun_drawgfxzoom(
for( y=sy; y<ey; y++ )
{
const UINT8 *source = code_base + (y_index>>16) * gfx->line_modulo;
- UINT32 *dest = BITMAP_ADDR32(dest_bmp, y, 0);
- UINT8 *pri = BITMAP_ADDR8(pri_buffer, y, 0);
+ UINT32 *dest = &dest_bmp->pix32(y);
+ UINT8 *pri = &pri_buffer->pix8(y);
int x, x_index = x_index_base;
for( x=sx; x<ex; x++ )
@@ -332,7 +324,7 @@ INLINE void dragngun_drawgfxzoom(
for( y=sy; y<ey; y++ )
{
const UINT8 *source = code_base + (y_index>>16) * gfx->line_modulo;
- UINT32 *dest = BITMAP_ADDR32(dest_bmp, y, 0);
+ UINT32 *dest = &dest_bmp->pix32(y);
int x, x_index = x_index_base;
for( x=sx; x<ex; x++ )
@@ -604,8 +596,8 @@ SCREEN_UPDATE( captaven )
tilemap_set_flip_all(screen.machine(),flip_screen_get(screen.machine()) ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0);
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
- bitmap_fill(bitmap,cliprect,screen.machine().pens[0x000]); // 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);
@@ -639,7 +631,7 @@ SCREEN_UPDATE( dragngun )
state->m_deco_tilegen1 = screen.machine().device("tilegen1");
state->m_deco_tilegen2 = screen.machine().device("tilegen2");
- bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine()));
+ 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);
@@ -683,8 +675,8 @@ SCREEN_UPDATE( fghthist )
state->m_deco_tilegen1 = screen.machine().device("tilegen1");
state->m_deco_tilegen2 = screen.machine().device("tilegen2");
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
- bitmap_fill(bitmap,cliprect,screen.machine().pens[0x000]); // 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);
@@ -736,11 +728,11 @@ 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=BITMAP_ADDR8(machine.priority_bitmap, y, 0);
- UINT16* sprite0=BITMAP_ADDR16(sprite0_mix_bitmap, y, 0);
- UINT16* sprite1=BITMAP_ADDR16(sprite1_mix_bitmap, y, 0);
- UINT32* destLine=BITMAP_ADDR32(bitmap, y, 0);
- UINT16* alphaTilemap=BITMAP_ADDR16(state->m_tilemap_alpha_bitmap, y, 0);
+ 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);
+ UINT16* alphaTilemap=&state->m_tilemap_alpha_bitmap->pix16(y);
for (x=0; x<320; x++) {
UINT16 priColAlphaPal0=sprite0[x];
@@ -871,9 +863,9 @@ SCREEN_UPDATE( nslasher )
if (state->m_ace_ram_dirty)
updateAceRam(screen.machine());
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
+ screen.machine().priority_bitmap->fill(0, *cliprect);
- bitmap_fill(bitmap,cliprect,screen.machine().pens[0x200]);
+ 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 +876,7 @@ SCREEN_UPDATE( nslasher )
/* Render alpha-blended tilemap to separate buffer for proper mixing */
- bitmap_fill(state->m_tilemap_alpha_bitmap,cliprect,0);
+ state->m_tilemap_alpha_bitmap->fill(0, *cliprect);
/* Draw playfields & sprites */
if (state->m_pri&2)
diff --git a/src/mame/video/deco_mlc.c b/src/mame/video/deco_mlc.c
index 1cf8511061f..faec29e7768 100644
--- a/src/mame/video/deco_mlc.c
+++ b/src/mame/video/deco_mlc.c
@@ -38,8 +38,8 @@ static void blitRaster(running_machine &machine, bitmap_t *bitmap, int rasterMod
int x,y;
for (y=0; y<256; y++) //todo
{
- UINT32* src=BITMAP_ADDR32(temp_bitmap, y&0x1ff, 0);
- UINT32* dst=BITMAP_ADDR32(bitmap, y, 0);
+ UINT32* src=&temp_bitmap->pix32(y&0x1ff);
+ UINT32* dst=&bitmap->pix32(y);
UINT32 xptr=(state->m_mlc_raster_table[0][y]<<13);
if (machine.input().code_pressed(KEYCODE_X))
@@ -81,16 +81,8 @@ static void mlc_drawgfxzoom(
/* KW 991012 -- Added code to force clip to bitmap boundary */
if(clip)
{
- myclip.min_x = clip->min_x;
- myclip.max_x = clip->max_x;
- myclip.min_y = clip->min_y;
- myclip.max_y = clip->max_y;
-
- if (myclip.min_x < 0) myclip.min_x = 0;
- if (myclip.max_x >= dest_bmp->width) myclip.max_x = dest_bmp->width-1;
- if (myclip.min_y < 0) myclip.min_y = 0;
- if (myclip.max_y >= dest_bmp->height) myclip.max_y = dest_bmp->height-1;
-
+ myclip = *clip;
+ myclip &= dest_bmp->cliprect();
clip=&myclip;
}
@@ -178,7 +170,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 = BITMAP_ADDR32(dest_bmp, y, 0);
+ UINT32 *dest = &dest_bmp->pix32(y);
int x, x_index = x_index_base;
@@ -205,7 +197,7 @@ static void mlc_drawgfxzoom(
for( y=sy; y<ey; y++ )
{
const UINT8 *source = code_base1 + (y_index>>16) * gfx->line_modulo;
- UINT32 *dest = BITMAP_ADDR32(dest_bmp, y, 0);
+ UINT32 *dest = &dest_bmp->pix32(y);
int x, x_index = x_index_base;
for( x=sx; x<ex; x++ )
@@ -318,7 +310,7 @@ static void draw_sprites(running_machine& machine, bitmap_t *bitmap,const rectan
user_clip.min_x=state->m_mlc_clip_ram[(clipper*4)+2];
user_clip.max_x=state->m_mlc_clip_ram[(clipper*4)+3];
- sect_rect(&user_clip, cliprect);
+ user_clip &= *cliprect;
/* Any colours out of range (for the bpp value) trigger 'shadow' mode */
if (color & (state->m_colour_mask+1))
@@ -499,7 +491,7 @@ static void draw_sprites(running_machine& machine, bitmap_t *bitmap,const rectan
// if (lastRasterMode!=0 && rasterDirty)
// {
// blitRaster(machine, bitmap, rasterMode);
-// bitmap_fill(temp_bitmap,cliprect,0);
+// temp_bitmap->fill(0, *cliprect);
// rasterDirty=0;
// }
// lastRasterMode=rasterMode;
@@ -522,8 +514,8 @@ SCREEN_EOF( mlc )
SCREEN_UPDATE( mlc )
{
-// bitmap_fill(temp_bitmap,cliprect,0);
- bitmap_fill(bitmap,cliprect,screen.machine().pens[0]); /* Pen 0 fill colour confirmed from Skull Fang level 2 */
+// temp_bitmap->fill(0, *cliprect);
+ 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 0e9ff3973c9..ad245a68727 100644
--- a/src/mame/video/decocass.c
+++ b/src/mame/video/decocass.c
@@ -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_ADDR16(bitmap, sy + y, (sx + x) & 255) = color;
+ bitmap->pix16(sy + y, (sx + x) & 255) = color;
}
}
@@ -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_ADDR16(bitmap, 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_ADDR16(bitmap, 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(bitmap, cliprect, 0);
+ bitmap->fill(0, *cliprect);
scrolly_l = state->m_back_vl_shift;
scrolly_r = 256 - state->m_back_vr_shift;
@@ -581,11 +581,11 @@ SCREEN_UPDATE( decocass )
if (state->m_mode_set & 0x08) /* bkg_ena on ? */
{
clip = state->m_bg_tilemap_l_clip;
- sect_rect(&clip, cliprect);
+ clip &= *cliprect;
tilemap_draw(bitmap, &clip, state->m_bg_tilemap_l, TILEMAP_DRAW_OPAQUE, 0);
clip = state->m_bg_tilemap_r_clip;
- sect_rect(&clip, cliprect);
+ clip &= *cliprect;
tilemap_draw(bitmap, &clip, state->m_bg_tilemap_r, TILEMAP_DRAW_OPAQUE, 0);
}
@@ -601,11 +601,11 @@ SCREEN_UPDATE( decocass )
if (state->m_mode_set & 0x08) /* bkg_ena on ? */
{
clip = state->m_bg_tilemap_l_clip;
- sect_rect(&clip, cliprect);
+ clip &= *cliprect;
tilemap_draw(bitmap, &clip, state->m_bg_tilemap_l, 0, 0);
clip = state->m_bg_tilemap_r_clip;
- sect_rect(&clip, cliprect);
+ clip &= *cliprect;
tilemap_draw(bitmap, &clip, state->m_bg_tilemap_r, 0, 0);
}
}
diff --git a/src/mame/video/decocomn.c b/src/mame/video/decocomn.c
index ec581505a0c..0e4f7bc3ff7 100644
--- a/src/mame/video/decocomn.c
+++ b/src/mame/video/decocomn.c
@@ -120,7 +120,7 @@ void decocomn_clear_sprite_priority_bitmap( device_t *device )
decocomn_state *decocomn = get_safe_token(device);
if (decocomn->sprite_priority_bitmap)
- bitmap_fill(decocomn->sprite_priority_bitmap, NULL, 0);
+ decocomn->sprite_priority_bitmap->fill(0);
}
/* A special pdrawgfx z-buffered sprite renderer that is needed to properly draw multiple sprite sources with alpha */
@@ -157,9 +157,9 @@ void decocomn_pdrawgfx(
for (y = 0; y < 16 - cy; y++)
{
const UINT8 *source = code_base + (y_index * gfx->line_modulo);
- UINT32 *destb = BITMAP_ADDR32(dest, sy, 0);
- UINT8 *pri = BITMAP_ADDR8(priority_bitmap, sy, 0);
- UINT8 *spri = BITMAP_ADDR8(decocomn->sprite_priority_bitmap, sy, 0);
+ 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/decospr.c b/src/mame/video/decospr.c
index 728a2a4249e..a69ee9fb428 100644
--- a/src/mame/video/decospr.c
+++ b/src/mame/video/decospr.c
@@ -185,7 +185,7 @@ void decospr_device::draw_sprites( running_machine &machine, bitmap_t *bitmap, c
fatalerror("m_sprite_bitmap && m_pricallback is invalid");
if (m_sprite_bitmap)
- bitmap_fill(m_sprite_bitmap, cliprect, 0);
+ m_sprite_bitmap->fill(0, *cliprect);
int offs, end, incr;
@@ -529,8 +529,8 @@ void decospr_device::inefficient_copy_sprite_bitmap(running_machine& machine, bi
for (y=cliprect->min_y;y<=cliprect->max_y;y++)
{
- srcline= BITMAP_ADDR16(m_sprite_bitmap, y, 0);
- dstline= BITMAP_ADDR32(bitmap, y, 0);
+ srcline= &m_sprite_bitmap->pix16(y);
+ dstline= &bitmap->pix32(y);
if (alpha==0xff)
{
diff --git a/src/mame/video/deniam.c b/src/mame/video/deniam.c
index d30fdbe30fb..0d5269ca4c2 100644
--- a/src/mame/video/deniam.c
+++ b/src/mame/video/deniam.c
@@ -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 ((*BITMAP_ADDR8(machine.priority_bitmap, y, sx + x) & primask) == 0)
- *BITMAP_ADDR16(bitmap, y, sx + x) = color * 16 + (rom[i] & 0x0f);
- *BITMAP_ADDR8(machine.priority_bitmap, 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 ((*BITMAP_ADDR8(machine.priority_bitmap, y, sx + x) & primask) == 0)
- *BITMAP_ADDR16(bitmap, y, sx + x) = color * 16+(rom[i] >> 4);
- *BITMAP_ADDR8(machine.priority_bitmap, 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 ((*BITMAP_ADDR8(machine.priority_bitmap, y, sx + x) & primask) == 0)
- *BITMAP_ADDR16(bitmap, y, sx + x) = color * 16 + (rom[i] >> 4);
- *BITMAP_ADDR8(machine.priority_bitmap, 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 ((*BITMAP_ADDR8(machine.priority_bitmap, y, sx + x) & primask) == 0)
- *BITMAP_ADDR16(bitmap, y, sx + x) = color * 16 + (rom[i] & 0x0f);
- *BITMAP_ADDR8(machine.priority_bitmap, 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);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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 071e141fdf9..13f431cd368 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(bitmap, cliprect, 256); /* 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/djmain.c b/src/mame/video/djmain.c
index 38d655fc902..3b0af840a28 100644
--- a/src/mame/video/djmain.c
+++ b/src/mame/video/djmain.c
@@ -169,7 +169,7 @@ SCREEN_UPDATE( djmain )
order[j] = temp;
}
- bitmap_fill(bitmap, cliprect, screen.machine().pens[0]);
+ 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 de3efff49c0..f05b8d15f39 100644
--- a/src/mame/video/dkong.c
+++ b/src/mame/video/dkong.c
@@ -821,12 +821,12 @@ static void radarscp_draw_background(running_machine &machine, dkong_state *stat
x = cliprect->min_x;
while (x <= cliprect->max_x)
{
- pixel = BITMAP_ADDR16(bitmap, 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);
if (draw_ok)
- *pixel = *(BITMAP_ADDR16(state->m_bg_bits, y, x));
+ *pixel = *(&state->m_bg_bits->pix16(y, x));
x++;
}
y++;
@@ -850,7 +850,7 @@ static void radarscp_scanline(running_machine &machine, int scanline)
x = 0;
while (x < machine.primary_screen->width())
{
- pixel = BITMAP_ADDR16(state->m_bg_bits, y, x);
+ pixel = &state->m_bg_bits->pix16(y, x);
if ((state->m_counter < table_len) && (x == 4 * (table[state->m_counter|offset] & 0x7f)))
{
if ( state->m_star_ff && (table[state->m_counter|offset] & 0x80) ) /* star */
diff --git a/src/mame/video/docastle.c b/src/mame/video/docastle.c
index beceb74b195..875e9cb30b4 100644
--- a/src/mame/video/docastle.c
+++ b/src/mame/video/docastle.c
@@ -137,7 +137,7 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
docastle_state *state = machine.driver_data<docastle_state>();
int offs;
- bitmap_fill(machine.priority_bitmap, NULL, 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 b7747d9d7cc..78d074e0e22 100644
--- a/src/mame/video/dogfgt.c
+++ b/src/mame/video/dogfgt.c
@@ -123,9 +123,9 @@ static WRITE8_HANDLER( internal_bitmapram_w )
color |= ((state->m_bitmapram[offset + BITMAPRAM_SIZE / 3 * i] >> subx) & 1) << i;
if (flip_screen_get(space->machine()))
- *BITMAP_ADDR16(state->m_pixbitmap, y ^ 0xff, (x + subx) ^ 0xff) = PIXMAP_COLOR_BASE + 8 * state->m_pixcolor + color;
+ state->m_pixbitmap->pix16(y ^ 0xff, (x + subx) ^ 0xff) = PIXMAP_COLOR_BASE + 8 * state->m_pixcolor + color;
else
- *BITMAP_ADDR16(state->m_pixbitmap, y, x + subx) = PIXMAP_COLOR_BASE + 8 * state->m_pixcolor + color;
+ state->m_pixbitmap->pix16(y, x + subx) = PIXMAP_COLOR_BASE + 8 * state->m_pixcolor + color;
}
}
diff --git a/src/mame/video/dooyong.c b/src/mame/video/dooyong.c
index d5c4d63b924..238228f7aff 100644
--- a/src/mame/video/dooyong.c
+++ b/src/mame/video/dooyong.c
@@ -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(bitmap, cliprect, get_black_pen(screen.machine()));
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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(bitmap, cliprect, get_black_pen(screen.machine()));
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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(bitmap, cliprect, get_black_pen(screen.machine()));
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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(bitmap, cliprect, get_black_pen(screen.machine()));
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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(bitmap, cliprect, get_black_pen(screen.machine()));
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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(bitmap, cliprect, get_black_pen(screen.machine()));
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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(bitmap, cliprect, get_black_pen(screen.machine()));
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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/dribling.c b/src/mame/video/dribling.c
index 939d9d8c163..77cb7944647 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_ADDR16(bitmap, y, 0);
+ 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 7b632f8035c..6f4746c8f58 100644
--- a/src/mame/video/dynax.c
+++ b/src/mame/video/dynax.c
@@ -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_ADDR16(bitmap, (dy - scrolly) & 0xff, 0);
+ UINT16 *dstbase = &bitmap->pix16((dy - scrolly) & 0xff);
length = scrollx;
dst = dstbase + 2 * (256 - length);
@@ -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_ADDR16(bitmap, sy, 0);
+ UINT16 *dstbase = &bitmap->pix16(sy);
if ((sy < cliprect->min_y) || (sy > cliprect->max_y))
{
@@ -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_ADDR16(bitmap, (dy - scrolly) & 0xff, 0);
+ UINT16 *dstbase = &bitmap->pix16((dy - scrolly) & 0xff);
length = scrollx;
dst = dstbase + 256 - length;
@@ -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(bitmap, cliprect, 0);
+ 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(bitmap, cliprect, (state->m_blit_backpen & 0xff) + (state->m_blit_palbank & 1) * 256);
+ 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(bitmap, cliprect, (state->m_blit_backpen & 0xff) + (state->m_blit_palbank & 0x0f) * 256);
+ 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(bitmap, cliprect, (state->m_blit_backpen & 0xff) + (state->m_blit_palbank & 1) * 256);
+ 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(bitmap, cliprect, (state->m_blit_backpen & 0xff) + (state->m_blit_palbank & 1) * 256);
+ 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(bitmap, cliprect, (state->m_blit_backpen & 0xff) + (state->m_blit_palbank & 1) * 256);
+ 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(bitmap, cliprect, (state->m_blit_backpen & 0xff) + (state->m_blit_palbank & 1) * 256);
+ 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(bitmap, cliprect, 0);
+ 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_ADDR16(bitmap, 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 410a04751c3..b1a3fbc18f6 100644
--- a/src/mame/video/dynduke.c
+++ b/src/mame/video/dynduke.c
@@ -186,7 +186,7 @@ static void draw_background(running_machine &machine, bitmap_t *bitmap, const re
/* if we're disabled, don't draw */
if (!state->m_back_enable)
{
- bitmap_fill(bitmap,cliprect,get_black_pen(machine));
+ 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 = BITMAP_ADDR16(bm, realy, 0);
- UINT16 *dst = BITMAP_ADDR16(bitmap, y, 0);
+ 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 a2943c1e1a3..b4612dce49d 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_ADDR16(bitmap, y, 0);
+ 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 af19d650fd0..387f70d55e8 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_ADDR32(bitmap, y, x + 0) = pens[(state->m_palette << 4) | (data & 0x0f)];
- *BITMAP_ADDR32(bitmap, 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 2a49d66f4e2..0b7eef3be9f 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(bitmap,cliprect,get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
return 0;
}
@@ -257,8 +257,8 @@ SCREEN_UPDATE( eprom )
for (r = 0; r < rectlist.numrects; r++, rectlist.rect++)
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
- UINT16 *mo = (UINT16 *)mobitmap->base + mobitmap->rowpixels * y;
- UINT16 *pf = (UINT16 *)bitmap->base + bitmap->rowpixels * y;
+ UINT16 *mo = &mobitmap->pix16(y);
+ UINT16 *pf = &bitmap->pix16(y);
for (x = rectlist.rect->min_x; x <= rectlist.rect->max_x; x++)
if (mo[x])
{
@@ -366,8 +366,8 @@ SCREEN_UPDATE( eprom )
for (r = 0; r < rectlist.numrects; r++, rectlist.rect++)
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
- UINT16 *mo = (UINT16 *)mobitmap->base + mobitmap->rowpixels * y;
- UINT16 *pf = (UINT16 *)bitmap->base + bitmap->rowpixels * y;
+ UINT16 *mo = &mobitmap->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(bitmap,cliprect,get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
return 0;
}
@@ -412,8 +412,8 @@ SCREEN_UPDATE( guts )
for (r = 0; r < rectlist.numrects; r++, rectlist.rect++)
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
- UINT16 *mo = (UINT16 *)mobitmap->base + mobitmap->rowpixels * y;
- UINT16 *pf = (UINT16 *)bitmap->base + bitmap->rowpixels * y;
+ UINT16 *mo = &mobitmap->pix16(y);
+ UINT16 *pf = &bitmap->pix16(y);
for (x = rectlist.rect->min_x; x <= rectlist.rect->max_x; x++)
if (mo[x])
{
@@ -440,8 +440,8 @@ SCREEN_UPDATE( guts )
for (r = 0; r < rectlist.numrects; r++, rectlist.rect++)
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
- UINT16 *mo = (UINT16 *)mobitmap->base + mobitmap->rowpixels * y;
- UINT16 *pf = (UINT16 *)bitmap->base + bitmap->rowpixels * y;
+ UINT16 *mo = &mobitmap->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 e05c3399068..393800b29d2 100644
--- a/src/mame/video/equites.c
+++ b/src/mame/video/equites.c
@@ -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_ADDR16(bitmap, y, bx) = paldata[pen];
+ bitmap->pix16(y, bx) = paldata[pen];
}
}
}
@@ -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 = BITMAP_ADDR16(src_bitmap, (src_y + scroll_y) & 0x1ff, 0);
- const UINT8 * const flags_line = BITMAP_ADDR8(flags_bitmap, (src_y + scroll_y) & 0x1ff, 0);
- UINT16 * const dst_line = BITMAP_ADDR16(dst_bitmap, dst_y, 0);
+ 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(bitmap, cliprect, state->m_bgcolor);
+ 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(bitmap, cliprect, state->m_bgcolor);
+ 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 c0563a84313..1210b6dd697 100644
--- a/src/mame/video/esd16.c
+++ b/src/mame/video/esd16.c
@@ -328,7 +328,7 @@ SCREEN_UPDATE( esd16 )
esd16_state *state = screen.machine().driver_data<esd16_state>();
int layers_ctrl = -1;
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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(bitmap, cliprect, 0);
+ 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;
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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(bitmap, cliprect, 0);
+ bitmap->fill(0, *cliprect);
}
@@ -425,7 +425,7 @@ SCREEN_UPDATE( hedpanio )
esd16_state *state = screen.machine().driver_data<esd16_state>();
int layers_ctrl = -1;
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
+ 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(bitmap, cliprect, 0);
+ bitmap->fill(0, *cliprect);
}
diff --git a/src/mame/video/esripsys.c b/src/mame/video/esripsys.c
index 0d37a806762..f622183d991 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_ADDR32(bitmap, 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 65a2e3078d3..ee584fe4397 100644
--- a/src/mame/video/exedexes.c
+++ b/src/mame/video/exedexes.c
@@ -226,7 +226,7 @@ SCREEN_UPDATE( exedexes )
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
}
else
- bitmap_fill(bitmap, cliprect, 0);
+ bitmap->fill(0, *cliprect);
draw_sprites(screen.machine(), bitmap, cliprect, 1);
diff --git a/src/mame/video/exidy.c b/src/mame/video/exidy.c
index 3d046af72af..c992698a44b 100644
--- a/src/mame/video/exidy.c
+++ b/src/mame/video/exidy.c
@@ -171,9 +171,9 @@ static void draw_background(running_machine &machine)
for (i = 0; i < 8; i++)
{
if (data1 & 0x80)
- *BITMAP_ADDR16(state->m_background_bitmap, y, x) = (data2 & 0x80) ? on_pen_2 : on_pen_1;
+ state->m_background_bitmap->pix16(y, x) = (data2 & 0x80) ? on_pen_2 : on_pen_1;
else
- *BITMAP_ADDR16(state->m_background_bitmap, y, x) = off_pen;
+ state->m_background_bitmap->pix16(y, x) = off_pen;
x = x + 1;
data1 = data1 << 1;
@@ -187,7 +187,7 @@ static void draw_background(running_machine &machine)
for (i = 0; i < 8; i++)
{
- *BITMAP_ADDR16(state->m_background_bitmap, y, x) = (data & 0x80) ? on_pen_1 : off_pen;
+ state->m_background_bitmap->pix16(y, x) = (data & 0x80) ? on_pen_1 : off_pen;
x = x + 1;
data = data << 1;
@@ -280,7 +280,7 @@ static void check_collision(running_machine &machine)
exidy_state *state = machine.driver_data<exidy_state>();
UINT8 sprite_set_1 = ((*state->m_sprite_enable & 0x20) != 0);
UINT8 sprite_set_2 = ((*state->m_sprite_enable & 0x40) != 0);
- static const rectangle clip = { 0, 15, 0, 15 };
+ const rectangle clip(0, 15, 0, 15);
int org_1_x = 0, org_1_y = 0;
int org_2_x = 0, org_2_y = 0;
int sx, sy;
@@ -291,7 +291,7 @@ static void check_collision(running_machine &machine)
return;
/* draw sprite 1 */
- bitmap_fill(state->m_motion_object_1_vid, &clip, 0xff);
+ state->m_motion_object_1_vid->fill(0xff, clip);
if (sprite_1_enabled(state))
{
org_1_x = 236 - *state->m_sprite1_xpos - 4;
@@ -302,7 +302,7 @@ static void check_collision(running_machine &machine)
}
/* draw sprite 2 */
- bitmap_fill(state->m_motion_object_2_vid, &clip, 0xff);
+ 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],
@@ -310,7 +310,7 @@ static void check_collision(running_machine &machine)
0, 0, 0, 0, 0);
/* draw sprite 2 clipped to sprite 1's location */
- bitmap_fill(state->m_motion_object_2_clip, &clip, 0xff);
+ state->m_motion_object_2_clip->fill(0xff, clip);
if (sprite_1_enabled(state))
{
sx = org_2_x - org_1_x;
@@ -324,16 +324,16 @@ static void check_collision(running_machine &machine)
for (sy = 0; sy < 16; sy++)
for (sx = 0; sx < 16; sx++)
{
- if (*BITMAP_ADDR16(state->m_motion_object_1_vid, sy, sx) != 0xff)
+ if (state->m_motion_object_1_vid->pix16(sy, sx) != 0xff)
{
UINT8 current_collision_mask = 0;
/* check for background collision (M1CHAR) */
- if (*BITMAP_ADDR16(state->m_background_bitmap, org_1_y + sy, org_1_x + sx) != 0)
+ if (state->m_background_bitmap->pix16(org_1_y + sy, org_1_x + sx) != 0)
current_collision_mask |= 0x04;
/* check for motion object collision (M1M2) */
- if (*BITMAP_ADDR16(state->m_motion_object_2_clip, sy, sx) != 0xff)
+ if (state->m_motion_object_2_clip->pix16(sy, sx) != 0xff)
current_collision_mask |= 0x10;
/* if we got one, trigger an interrupt */
@@ -341,10 +341,10 @@ static void check_collision(running_machine &machine)
machine.scheduler().timer_set(machine.primary_screen->time_until_pos(org_1_x + sx, org_1_y + sy), FUNC(collision_irq_callback), current_collision_mask);
}
- if (*BITMAP_ADDR16(state->m_motion_object_2_vid, sy, sx) != 0xff)
+ if (state->m_motion_object_2_vid->pix16(sy, sx) != 0xff)
{
/* check for background collision (M2CHAR) */
- if (*BITMAP_ADDR16(state->m_background_bitmap, org_2_y + sy, org_2_x + sx) != 0)
+ if (state->m_background_bitmap->pix16(org_2_y + sy, org_2_x + sx) != 0)
if ((state->m_collision_mask & 0x08) && (count++ < 128))
machine.scheduler().timer_set(machine.primary_screen->time_until_pos(org_2_x + sx, org_2_y + sy), FUNC(collision_irq_callback), 0x08);
}
diff --git a/src/mame/video/exidy440.c b/src/mame/video/exidy440.c
index c23f4de02e6..5979613b4fc 100644
--- a/src/mame/video/exidy440.c
+++ b/src/mame/video/exidy440.c
@@ -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_ADDR16(bitmap, 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_ADDR16(bitmap, yoffs, currx) = pen;
+ bitmap->pix16(yoffs, currx) = pen;
/* check the collisions bit */
if (check_collision && (palette[2 * pen] & 0x80) && (count++ < 128))
diff --git a/src/mame/video/exterm.c b/src/mame/video/exterm.c
index 76796ec3dd5..8feedc1cb5c 100644
--- a/src/mame/video/exterm.c
+++ b/src/mame/video/exterm.c
@@ -72,7 +72,7 @@ void exterm_scanline_update(screen_device &screen, bitmap_t *bitmap, int scanlin
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_ADDR16(bitmap, scanline, 0);
+ 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 0170d5b80e9..57abe042e32 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(bitmap, cliprect, 1023);
+ bitmap->fill(1023, *cliprect);
/* ---------- 1st TC0010VCU ---------- */
sx = 0;
diff --git a/src/mame/video/f1gp.c b/src/mame/video/f1gp.c
index 0611e46b8b9..b4a347d5feb 100644
--- a/src/mame/video/f1gp.c
+++ b/src/mame/video/f1gp.c
@@ -254,7 +254,7 @@ SCREEN_UPDATE( f1gp )
{
f1gp_state *state = screen.machine().driver_data<f1gp_state>();
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ screen.machine().priority_bitmap->fill(0, *cliprect);
k053936_zoom_draw(state->m_k053936, bitmap, cliprect, state->m_roz_tilemap, 0, 0, 1);
@@ -357,7 +357,7 @@ SCREEN_UPDATE( f1gpb )
tilemap_set_scrolly(state->m_fg_tilemap, 0, state->m_fgregs[0] + 8);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ screen.machine().priority_bitmap->fill(0, *cliprect);
tilemap_draw_roz(bitmap, cliprect, state->m_roz_tilemap,
startx << 13, starty << 13,
@@ -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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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 29ba51c450d..730bec70ef8 100644
--- a/src/mame/video/fantland.c
+++ b/src/mame/video/fantland.c
@@ -141,7 +141,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectan
SCREEN_UPDATE( fantland )
{
- bitmap_fill(bitmap,cliprect,0);
+ 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 e1f74df6385..4c2bca3bcfd 100644
--- a/src/mame/video/fastfred.c
+++ b/src/mame/video/fastfred.c
@@ -12,19 +12,6 @@
-static const rectangle spritevisiblearea =
-{
- 2*8, 32*8-1,
- 2*8, 30*8-1
-};
-
-static const rectangle spritevisibleareaflipx =
-{
- 0*8, 30*8-1,
- 2*8, 30*8-1
-};
-
-
/***************************************************************************
Convert the color PROMs into a more useable format.
@@ -246,6 +233,8 @@ WRITE8_HANDLER( fastfred_flip_screen_y_w )
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);
fastfred_state *state = machine.driver_data<fastfred_state>();
int offs;
@@ -310,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(bitmap, cliprect, *state->m_background_color);
+ 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/fastlane.c b/src/mame/video/fastlane.c
index db18a2ac69b..8bad5e81e34 100644
--- a/src/mame/video/fastlane.c
+++ b/src/mame/video/fastlane.c
@@ -161,8 +161,8 @@ SCREEN_UPDATE( fastlane )
rectangle finalclip0 = state->m_clip0, finalclip1 = state->m_clip1;
int i, xoffs;
- sect_rect(&finalclip0, cliprect);
- sect_rect(&finalclip1, cliprect);
+ finalclip0 &= *cliprect;
+ finalclip1 &= *cliprect;
set_pens(screen.machine());
diff --git a/src/mame/video/fgoal.c b/src/mame/video/fgoal.c
index d64e122a70e..e653817a7bc 100644
--- a/src/mame/video/fgoal.c
+++ b/src/mame/video/fgoal.c
@@ -92,7 +92,7 @@ SCREEN_UPDATE( fgoal )
{
if (y < 256 && x < 256)
{
- *BITMAP_ADDR16(state->m_fgbitmap, y, x) = 128 + 16;
+ state->m_fgbitmap->pix16(y, x) = 128 + 16;
}
}
}
@@ -101,10 +101,10 @@ SCREEN_UPDATE( fgoal )
for (y = 0; y < 256; y++)
{
- UINT16* p = BITMAP_ADDR16(bitmap, y, 0);
+ UINT16* p = &bitmap->pix16(y);
- const UINT16* FG = BITMAP_ADDR16(state->m_fgbitmap, y, 0);
- const UINT16* BG = BITMAP_ADDR16(state->m_bgbitmap, y, 0);
+ const UINT16* FG = &state->m_fgbitmap->pix16(y);
+ const UINT16* BG = &state->m_bgbitmap->pix16(y);
for (x = 0; x < 256; x += 8)
{
diff --git a/src/mame/video/firetrk.c b/src/mame/video/firetrk.c
index 817a1e15192..9eada0a9f9d 100644
--- a/src/mame/video/firetrk.c
+++ b/src/mame/video/firetrk.c
@@ -13,7 +13,7 @@ Atari Fire Truck + Super Bug + Monte Carlo video emulation
-static const rectangle playfield_window = { 0x02a, 0x115, 0x000, 0x0ff };
+static const rectangle playfield_window(0x02a, 0x115, 0x000, 0x0ff);
@@ -345,8 +345,8 @@ static void check_collision(firetrk_state *state, int which)
for (y = playfield_window.min_y; y <= playfield_window.max_y; y++)
for (x = playfield_window.min_x; x <= playfield_window.max_x; x++)
{
- pen_t a = *BITMAP_ADDR16(state->m_helper1, y, x);
- pen_t b = *BITMAP_ADDR16(state->m_helper2, y, x);
+ pen_t a = state->m_helper1->pix16(y, x);
+ pen_t b = state->m_helper2->pix16(y, x);
if (b != 0xff && (state->m_color1_mask >> a) & 1)
state->m_crash[which] = 1;
@@ -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(bitmap, cliprect, 0);
+ 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);
@@ -377,11 +377,11 @@ SCREEN_UPDATE( firetrk )
{
tilemap_draw(state->m_helper1, &playfield_window, state->m_tilemap2, 0, 0);
- bitmap_fill(state->m_helper2, &playfield_window, 0xff);
+ state->m_helper2->fill(0xff, playfield_window);
firetrk_draw_car(screen.machine(), state->m_helper2, &playfield_window, screen.machine().gfx, 0, FALSE);
check_collision(state, 0);
- bitmap_fill(state->m_helper2, &playfield_window, 0xff);
+ state->m_helper2->fill(0xff, playfield_window);
firetrk_draw_car(screen.machine(), state->m_helper2, &playfield_window, screen.machine().gfx, 1, FALSE);
check_collision(state, 1);
@@ -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(bitmap, cliprect, 0);
+ 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);
@@ -411,7 +411,7 @@ SCREEN_UPDATE( superbug )
{
tilemap_draw(state->m_helper1, &playfield_window, state->m_tilemap2, 0, 0);
- bitmap_fill(state->m_helper2, &playfield_window, 0xff);
+ state->m_helper2->fill(0xff, playfield_window);
superbug_draw_car(screen.machine(), state->m_helper2, &playfield_window, screen.machine().gfx, FALSE);
check_collision(state, 0);
@@ -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(bitmap, cliprect, 0x2c);
+ 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);
@@ -442,11 +442,11 @@ SCREEN_UPDATE( montecar )
{
tilemap_draw(state->m_helper1, &playfield_window, state->m_tilemap2, 0, 0);
- bitmap_fill(state->m_helper2, &playfield_window, 0xff);
+ state->m_helper2->fill(0xff, playfield_window);
montecar_draw_car(screen.machine(), state->m_helper2, &playfield_window, screen.machine().gfx, 0, TRUE);
check_collision(state, 0);
- bitmap_fill(state->m_helper2, &playfield_window, 0xff);
+ state->m_helper2->fill(0xff, playfield_window);
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 2dd6d73ede4..b6747fb43a6 100644
--- a/src/mame/video/fitfight.c
+++ b/src/mame/video/fitfight.c
@@ -126,7 +126,7 @@ SCREEN_UPDATE(fitfight)
vblank = (state->m_fof_700000[0] & 0x8000);
if (vblank > 0)
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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/flkatck.c b/src/mame/video/flkatck.c
index af1e22d0dd1..9f387dae008 100644
--- a/src/mame/video/flkatck.c
+++ b/src/mame/video/flkatck.c
@@ -165,8 +165,8 @@ SCREEN_UPDATE( flkatck )
}
/* compute clipping */
- sect_rect(&clip[0], cliprect);
- sect_rect(&clip[1], cliprect);
+ clip[0] &= *cliprect;
+ clip[1] &= *cliprect;
/* draw the graphics */
tilemap_draw(bitmap, &clip[0], state->m_k007121_tilemap[0], 0, 0);
diff --git a/src/mame/video/foodf.c b/src/mame/video/foodf.c
index 72d4c6c315e..36599879926 100644
--- a/src/mame/video/foodf.c
+++ b/src/mame/video/foodf.c
@@ -126,7 +126,7 @@ SCREEN_UPDATE( foodf )
tilemap_draw(bitmap, cliprect, state->m_playfield_tilemap, TILEMAP_DRAW_OPAQUE, 0);
/* then draw the non-transparent parts with a priority of 1 */
- bitmap_fill(priority_bitmap, 0, 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/funkyjet.c b/src/mame/video/funkyjet.c
index 3fd8e4ff863..adbbc4f3e97 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(bitmap, cliprect, 768);
+ 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 6133cca14f6..e90bb727ec5 100644
--- a/src/mame/video/funybubl.c
+++ b/src/mame/video/funybubl.c
@@ -79,7 +79,7 @@ SCREEN_UPDATE(funybubl)
int x, y, offs;
offs = 0;
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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 7ef26341dc6..da86a7b1be1 100644
--- a/src/mame/video/fuukifg2.c
+++ b/src/mame/video/fuukifg2.c
@@ -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(bitmap, cliprect, (0x800 * 4) - 1);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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 3affefcc226..1a5696e08ce 100644
--- a/src/mame/video/fuukifg3.c
+++ b/src/mame/video/fuukifg3.c
@@ -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(bitmap, cliprect, (0x800 * 4) - 1);
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
+ 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 1db5df9716d..66ae7e59ee8 100644
--- a/src/mame/video/gaelco.c
+++ b/src/mame/video/gaelco.c
@@ -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]);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
- bitmap_fill(bitmap, cliprect, 0);
+ 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]);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
- bitmap_fill(bitmap, cliprect, 0);
+ 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 45fcc5b9221..e2ba665beec 100644
--- a/src/mame/video/gaelco2.c
+++ b/src/mame/video/gaelco2.c
@@ -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_ADDR16(bitmap, ypos, 0);
+ 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(bitmap, cliprect, 0);
+ bitmap->fill(0, *cliprect);
tilemap_draw(bitmap, cliprect, state->m_pant[1], 0, 0);
tilemap_draw(bitmap, cliprect, state->m_pant[0], 0, 0);
@@ -488,7 +488,7 @@ static UINT32 dual_update(screen_device &screen, bitmap_t *bitmap, const rectang
}
/* draw screen */
- bitmap_fill(bitmap, cliprect, 0);
+ 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 d3d3fca6549..768300800ba 100644
--- a/src/mame/video/gaelco3d.c
+++ b/src/mame/video/gaelco3d.c
@@ -212,8 +212,8 @@ void gaelco3d_renderer::render_noz_noperspective(INT32 scanline, const extent_t
offs_t endmask = m_texture_size - 1;
const rgb_t *palsource = m_state.m_palette + object.color;
UINT32 tex = object.tex;
- UINT16 *dest = BITMAP_ADDR16(m_screenbits, scanline, 0);
- UINT16 *zbuf = BITMAP_ADDR16(m_zbuffer, scanline, 0);
+ UINT16 *dest = &m_screenbits->pix16(scanline);
+ UINT16 *zbuf = &m_zbuffer->pix16(scanline);
int startx = extent.startx;
float uoz = (object.uoz_base + scanline * object.uoz_dy + startx * object.uoz_dx) * zbase;
float voz = (object.voz_base + scanline * object.voz_dy + startx * object.voz_dx) * zbase;
@@ -251,8 +251,8 @@ void gaelco3d_renderer::render_normal(INT32 scanline, const extent_t &extent, co
const rgb_t *palsource = m_state.m_palette + object.color;
UINT32 tex = object.tex;
float z0 = object.z0;
- UINT16 *dest = BITMAP_ADDR16(m_screenbits, scanline, 0);
- UINT16 *zbuf = BITMAP_ADDR16(m_zbuffer, scanline, 0);
+ UINT16 *dest = &m_screenbits->pix16(scanline);
+ UINT16 *zbuf = &m_zbuffer->pix16(scanline);
int startx = extent.startx;
float ooz = object.ooz_base + scanline * object.ooz_dy + startx * ooz_dx;
float uoz = object.uoz_base + scanline * object.uoz_dy + startx * uoz_dx;
@@ -301,8 +301,8 @@ void gaelco3d_renderer::render_alphablend(INT32 scanline, const extent_t &extent
const rgb_t *palsource = m_state.m_palette + object.color;
UINT32 tex = object.tex;
float z0 = object.z0;
- UINT16 *dest = BITMAP_ADDR16(m_screenbits, scanline, 0);
- UINT16 *zbuf = BITMAP_ADDR16(m_zbuffer, scanline, 0);
+ UINT16 *dest = &m_screenbits->pix16(scanline);
+ UINT16 *zbuf = &m_zbuffer->pix16(scanline);
int startx = extent.startx;
float ooz = object.ooz_base + object.ooz_dy * scanline + startx * ooz_dx;
float uoz = object.uoz_base + object.uoz_dy * scanline + startx * uoz_dx;
@@ -461,7 +461,7 @@ SCREEN_UPDATE( gaelco3d )
for (y = cliprect->min_y; y <= cliprect->max_y; y++)
{
- UINT16 *dest = BITMAP_ADDR16(bitmap, y, 0);
+ 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;
diff --git a/src/mame/video/gaiden.c b/src/mame/video/gaiden.c
index 95e90760e84..be501e76245 100644
--- a/src/mame/video/gaiden.c
+++ b/src/mame/video/gaiden.c
@@ -318,10 +318,10 @@ static void blendbitmaps(running_machine &machine,
for (y = cliprect->min_y; y <= cliprect->max_y; y++)
{
- UINT32 *dd = BITMAP_ADDR32(dest, y, 0);
- UINT16 *sd1 = BITMAP_ADDR16(src1, y, 0);
- UINT16 *sd2 = BITMAP_ADDR16(src2, y, 0);
- UINT16 *sd3 = BITMAP_ADDR16(src3, y, 0);
+ 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++)
{
@@ -673,11 +673,11 @@ static void drgnbowl_draw_sprites(running_machine &machine, bitmap_t *bitmap, co
SCREEN_UPDATE( gaiden )
{
gaiden_state *state = screen.machine().driver_data<gaiden_state>();
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ screen.machine().priority_bitmap->fill(0, *cliprect);
- bitmap_fill(state->m_tile_bitmap_bg, cliprect, 0x200);
- bitmap_fill(state->m_tile_bitmap_fg, cliprect, 0);
- bitmap_fill(state->m_sprite_bitmap, cliprect, 0);
+ 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);
@@ -699,11 +699,11 @@ SCREEN_UPDATE( gaiden )
SCREEN_UPDATE( raiga )
{
gaiden_state *state = screen.machine().driver_data<gaiden_state>();
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ screen.machine().priority_bitmap->fill(0, *cliprect);
- bitmap_fill(state->m_tile_bitmap_bg, cliprect, 0x200);
- bitmap_fill(state->m_tile_bitmap_fg, cliprect, 0);
- bitmap_fill(state->m_sprite_bitmap, cliprect, 0);
+ 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);
@@ -724,7 +724,7 @@ SCREEN_UPDATE( raiga )
SCREEN_UPDATE( drgnbowl )
{
gaiden_state *state = screen.machine().driver_data<gaiden_state>();
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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 43ee954ea49..0c345809f4f 100644
--- a/src/mame/video/galaga.c
+++ b/src/mame/video/galaga.c
@@ -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_ADDR16(bitmap, 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(bitmap,cliprect,get_black_pen(screen.machine()));
+ 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 06762ae3ef5..dd36b777b52 100644
--- a/src/mame/video/galastrm.c
+++ b/src/mame/video/galastrm.c
@@ -224,7 +224,7 @@ static void tc0610_draw_scanline(void *dest, INT32 scanline, const poly_extent *
{
const poly_extra_data *extra = (const poly_extra_data *)extradata;
bitmap_t *destmap = (bitmap_t *)dest;
- UINT16 *framebuffer = BITMAP_ADDR16(destmap, scanline, 0);
+ UINT16 *framebuffer = &destmap->pix16(scanline);
bitmap_t *texbase = extra->texbase;
int startx = extent->startx;
int stopx = extent->stopx;
@@ -236,7 +236,7 @@ static void tc0610_draw_scanline(void *dest, INT32 scanline, const poly_extent *
for (x = startx; x < stopx; x++)
{
- framebuffer[x] = *BITMAP_ADDR16(texbase, v >> 16, u >> 16);
+ framebuffer[x] = texbase->pix16(v >> 16, u >> 16);
u += dudx;
v += dvdx;
}
@@ -254,8 +254,8 @@ static void tc0610_rotate_draw(running_machine &machine, bitmap_t *bitmap, bitma
const int rzy = state->m_tc0610_ctrl_reg[1][3];
const int ryx = state->m_tc0610_ctrl_reg[1][5];
const int ryy = state->m_tc0610_ctrl_reg[1][4];
- const int lx = srcbitmap->width;
- const int ly = srcbitmap->height;
+ const int lx = srcbitmap->width();
+ const int ly = srcbitmap->height();
int yx, /*yy,*/ zx, zy, pxx, pxy, pyx, pyy;
float /*ssn, scs, ysn, ycs,*/ zsn, zcs;
@@ -466,9 +466,9 @@ SCREEN_UPDATE( galastrm )
pivlayer[1] = pivlayer[0] ^ 1;
pivlayer[2] = 2;
- bitmap_fill(bitmap, cliprect, 0);
- bitmap_fill(priority_bitmap, &clip, 0);
- bitmap_fill(state->m_tmpbitmaps, &clip, 0);
+ 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);
tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, pivlayer[1], 0, 0);
@@ -498,8 +498,8 @@ SCREEN_UPDATE( galastrm )
{
for (x=0; x < priority_bitmap->width; x++)
{
- pri = BITMAP_ADDR8(priority_bitmap, y, x);
- if (!(*pri & 0x02) && *BITMAP_ADDR16(state->m_tmpbitmaps, y, x))
+ pri = &priority_bitmap->pix8(y, x);
+ if (!(*pri & 0x02) && state->m_tmpbitmaps->pix16(y, x))
*pri |= 0x04;
}
}
@@ -509,10 +509,10 @@ SCREEN_UPDATE( galastrm )
draw_sprites(screen.machine(),state->m_tmpbitmaps,&clip,primasks,1);
copybitmap_trans(bitmap,state->m_polybitmap,0,0, 0,0,cliprect,0);
- bitmap_fill(state->m_polybitmap, &clip, 0);
+ state->m_polybitmap->fill(0, clip);
tc0610_rotate_draw(screen.machine(),state->m_polybitmap,state->m_tmpbitmaps,cliprect);
- bitmap_fill(priority_bitmap, cliprect, 0);
+ 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);
@@ -541,12 +541,12 @@ 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 = BITMAP_ADDR8(priority_bitmap, y, x);
- if (!(*pri & 0x02) && *BITMAP_ADDR16(state->m_tmpbitmaps, y, x))
+ pri = &priority_bitmap->pix8(y, x);
+ if (!(*pri & 0x02) && state->m_tmpbitmaps->pix16(y, x))
*pri |= 0x04;
}
}
@@ -556,10 +556,10 @@ SCREEN_UPDATE( galastrm )
draw_sprites(screen.machine(),state->m_tmpbitmaps,&clip,primasks,1);
copybitmap_trans(bitmap,state->m_polybitmap,0,0, 0,0,cliprect,0);
- bitmap_fill(state->m_polybitmap, &clip, 0);
+ state->m_polybitmap->fill(0, clip);
tc0610_rotate_draw(screen.machine(),state->m_polybitmap,state->m_tmpbitmaps,cliprect);
- bitmap_fill(priority_bitmap, cliprect, 0);
+ 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 257496cce1d..75a6bedc88b 100644
--- a/src/mame/video/galaxian.c
+++ b/src/mame/video/galaxian.c
@@ -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_ADDR32(bitmap, 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_ADDR32(bitmap, y, GALAXIAN_XSCALE*x + 1) = state->m_star_color[star & 0x3f];
- *BITMAP_ADDR32(bitmap, 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];
}
}
}
@@ -943,7 +943,7 @@ void galaxian_draw_background(running_machine &machine, bitmap_t *bitmap, const
{
galaxian_state *state = machine.driver_data<galaxian_state>();
/* erase the background to black first */
- bitmap_fill(bitmap, cliprect, RGB_BLACK);
+ bitmap->fill(RGB_BLACK, *cliprect);
/* update the star origin to the current frame */
stars_update_origin(machine);
@@ -972,24 +972,24 @@ 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(bitmap, &draw, RGB_BLACK);
+ 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(bitmap, &draw, color);
+ 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(bitmap, &draw, color);
+ 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(bitmap, &draw, RGB_BLACK);
+ bitmap->fill(RGB_BLACK, draw);
}
}
@@ -1025,7 +1025,7 @@ void scramble_draw_background(running_machine &machine, bitmap_t *bitmap, const
{
galaxian_state *state = machine.driver_data<galaxian_state>();
/* blue background - 390 ohm resistor */
- bitmap_fill(bitmap, cliprect, state->m_background_enable ? MAKE_RGB(0,0,0x56) : RGB_BLACK);
+ bitmap->fill(state->m_background_enable ? MAKE_RGB(0,0,0x56) : RGB_BLACK, *cliprect);
scramble_draw_stars(machine, bitmap, cliprect, 256);
}
@@ -1045,7 +1045,7 @@ void jumpbug_draw_background(running_machine &machine, bitmap_t *bitmap, const r
{
galaxian_state *state = machine.driver_data<galaxian_state>();
/* blue background - 390 ohm resistor */
- bitmap_fill(bitmap, cliprect, state->m_background_enable ? MAKE_RGB(0,0,0x56) : RGB_BLACK);
+ 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);
@@ -1062,7 +1062,7 @@ void turtles_draw_background(running_machine &machine, bitmap_t *bitmap, const r
GREEN - 470 ohm resistor
BLUE - 390 ohm resistor
*/
- bitmap_fill(bitmap, cliprect, MAKE_RGB(state->m_background_red * 0x55, state->m_background_green * 0x47, state->m_background_blue * 0x55));
+ bitmap->fill(MAKE_RGB(state->m_background_red * 0x55, state->m_background_green * 0x47, state->m_background_blue * 0x55), *cliprect);
}
@@ -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(bitmap, &draw, MAKE_RGB(red, green, blue));
+ bitmap->fill(MAKE_RGB(red, green, blue, draw));
}
}
#endif
@@ -1140,15 +1140,15 @@ INLINE void galaxian_draw_pixel(bitmap_t *bitmap, const rectangle *cliprect, int
x *= GALAXIAN_XSCALE;
x += GALAXIAN_H0START;
if (x >= cliprect->min_x && x <= cliprect->max_x)
- *BITMAP_ADDR32(bitmap, y, x) = color;
+ bitmap->pix32(y, x) = color;
x++;
if (x >= cliprect->min_x && x <= cliprect->max_x)
- *BITMAP_ADDR32(bitmap, y, x) = color;
+ bitmap->pix32(y, x) = color;
x++;
if (x >= cliprect->min_x && x <= cliprect->max_x)
- *BITMAP_ADDR32(bitmap, y, x) = color;
+ bitmap->pix32(y, x) = color;
}
}
diff --git a/src/mame/video/galaxold.c b/src/mame/video/galaxold.c
index 4ace276ba37..1450c2cd406 100644
--- a/src/mame/video/galaxold.c
+++ b/src/mame/video/galaxold.c
@@ -7,18 +7,6 @@
#include "emu.h"
#include "includes/galaxold.h"
-static const rectangle spritevisiblearea =
-{
- 2*8+1, 32*8-1,
- 2*8, 30*8-1
-};
-static const rectangle spritevisibleareaflipx =
-{
- 0*8, 30*8-2,
- 2*8, 30*8-1
-};
-
-
#define STARS_COLOR_BASE (machine.region("proms")->bytes())
#define BULLETS_COLOR_BASE (STARS_COLOR_BASE + 64)
#define BACKGROUND_COLOR_BASE (BULLETS_COLOR_BASE + 2)
@@ -636,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_ADDR16(bitmap, y, x) = BULLETS_COLOR_BASE;
+ bitmap->pix16(y, x) = BULLETS_COLOR_BASE;
}
}
@@ -1163,7 +1151,7 @@ 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_ADDR16(bitmap, y, x) = color;
+ bitmap->pix16(y, x) = color;
}
}
}
@@ -1177,7 +1165,7 @@ 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_ADDR16(bitmap, 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)
@@ -1188,7 +1176,7 @@ 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_ADDR16(bitmap, 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)
@@ -1213,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_ADDR16(bitmap, y, x) = color;
+ bitmap->pix16(y, x) = color;
}
}
@@ -1224,16 +1212,16 @@ static void dambustr_draw_bullets(running_machine &machine, bitmap_t *bitmap, co
static void galaxold_draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect)
{
/* plain black background */
- bitmap_fill(bitmap,cliprect,0);
+ bitmap->fill(0, *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(bitmap,cliprect,BACKGROUND_COLOR_BASE);
+ bitmap->fill(BACKGROUND_COLOR_BASE, *cliprect);
else
- bitmap_fill(bitmap,cliprect,0);
+ bitmap->fill(0, *cliprect);
}
static void ad2083_draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect)
@@ -1241,7 +1229,7 @@ static void ad2083_draw_background(running_machine &machine, bitmap_t *bitmap, c
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(bitmap,cliprect,BACKGROUND_COLOR_BASE + color);
+ bitmap->fill(BACKGROUND_COLOR_BASE + color, *cliprect);
}
static void stratgyx_draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect)
@@ -1277,7 +1265,7 @@ static void stratgyx_draw_background(running_machine &machine, bitmap_t *bitmap,
else
sx = 8 * x;
- plot_box(bitmap, sx, 0, 8, 256, base + color);
+ bitmap->plot_box(sx, 0, 8, 256, base + color);
}
}
@@ -1291,15 +1279,15 @@ static void minefld_draw_background(running_machine &machine, bitmap_t *bitmap,
for (x = 0; x < 128; x++)
- plot_box(bitmap, x, 0, 1, 256, base + x);
+ bitmap->plot_box(x, 0, 1, 256, base + x);
for (x = 0; x < 120; x++)
- plot_box(bitmap, x + 128, 0, 1, 256, base + x + 128);
+ bitmap->plot_box(x + 128, 0, 1, 256, base + x + 128);
- plot_box(bitmap, 248, 0, 16, 256, base);
+ bitmap->plot_box(248, 0, 16, 256, base);
}
else
- bitmap_fill(bitmap,cliprect,0);
+ bitmap->fill(0, *cliprect);
}
static void rescue_draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect)
@@ -1311,15 +1299,15 @@ static void rescue_draw_background(running_machine &machine, bitmap_t *bitmap, c
int x;
for (x = 0; x < 128; x++)
- plot_box(bitmap, x, 0, 1, 256, base + x);
+ bitmap->plot_box(x, 0, 1, 256, base + x);
for (x = 0; x < 120; x++)
- plot_box(bitmap, x + 128, 0, 1, 256, base + x + 8);
+ bitmap->plot_box(x + 128, 0, 1, 256, base + x + 8);
- plot_box(bitmap, 248, 0, 16, 256, base);
+ bitmap->plot_box(248, 0, 16, 256, base);
}
else
- bitmap_fill(bitmap,cliprect,0);
+ bitmap->fill(0, *cliprect);
}
static void mariner_draw_background(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect)
@@ -1347,7 +1335,7 @@ static void mariner_draw_background(running_machine &machine, bitmap_t *bitmap,
else
color = prom[0x20 + x - 1];
- plot_box(bitmap, 8 * (31 - x), 0, 8, 256, base + color);
+ bitmap->plot_box(8 * (31 - x), 0, 8, 256, base + color);
}
}
else
@@ -1361,7 +1349,7 @@ static void mariner_draw_background(running_machine &machine, bitmap_t *bitmap,
else
color = prom[x + 1];
- plot_box(bitmap, 8 * x, 0, 8, 256, base + color);
+ bitmap->plot_box(8 * x, 0, 8, 256, base + color);
}
}
}
@@ -1375,13 +1363,13 @@ static void dambustr_draw_background(running_machine &machine, bitmap_t *bitmap,
if (flip_screen_x_get(machine))
{
- plot_box(bitmap, 0, 0, 256-state->m_dambustr_bg_split_line, 256, col2);
- plot_box(bitmap, 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
{
- plot_box(bitmap, 0, 0, 256-state->m_dambustr_bg_split_line, 256, col1);
- plot_box(bitmap, 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);
}
}
@@ -1495,7 +1483,7 @@ 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_ADDR16(bitmap, 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)
@@ -1746,6 +1734,9 @@ 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)
{
+ 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);
+
galaxold_state *state = machine.driver_data<galaxold_state>();
int offs;
diff --git a/src/mame/video/galivan.c b/src/mame/video/galivan.c
index 619d64bc6c9..b7e40ceb999 100644
--- a/src/mame/video/galivan.c
+++ b/src/mame/video/galivan.c
@@ -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(bitmap, cliprect, 0);
+ 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(bitmap, cliprect, 0);
+ 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 f9f3a42a150..75b3af4370c 100644
--- a/src/mame/video/galpani2.c
+++ b/src/mame/video/galpani2.c
@@ -66,7 +66,7 @@ INLINE void galpani2_bg8_w(address_space *space, offs_t offset, UINT16 data, UIN
pen = newword & 0xff;
x = (offset % 512); /* 512 x 256 */
y = (offset / 512);
- *BITMAP_ADDR16(state->m_bg8_bitmap[_n_], y, x) = 0x4000 + pen;
+ state->m_bg8_bitmap[_n_]->pix16(y, x) = 0x4000 + pen;
}
WRITE16_HANDLER( galpani2_bg8_0_w ) { galpani2_bg8_w(space, offset, data, mem_mask, 0); }
@@ -100,7 +100,7 @@ WRITE16_HANDLER( galpani2_bg15_w )
int x = (offset % 256) + (offset / (256*256)) * 256 ;
int y = (offset / 256) % 256;
- *BITMAP_ADDR16(state->m_bg15_bitmap, y, x) = 0x4200 + (newword & 0x7fff);
+ state->m_bg15_bitmap->pix16(y, x) = 0x4200 + (newword & 0x7fff);
}
@@ -158,8 +158,8 @@ if (screen.machine().input().code_pressed(KEYCODE_Z))
}
#endif
- bitmap_fill(bitmap,cliprect,0);
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
+ bitmap->fill(0, *cliprect);
+ screen.machine().priority_bitmap->fill(0, *cliprect);
if (layers_ctrl & 0x1)
{
diff --git a/src/mame/video/galpanic.c b/src/mame/video/galpanic.c
index ed823b7b4f9..e383dad87b8 100644
--- a/src/mame/video/galpanic.c
+++ b/src/mame/video/galpanic.c
@@ -34,7 +34,7 @@ WRITE16_HANDLER( galpanic_bgvideoram_w )
sy = offset / 256;
sx = offset % 256;
- *BITMAP_ADDR16(space->machine().generic.tmpbitmap, sy, sx) = 1024 + (data >> 1);
+ space->machine().generic.tmpbitmap->pix16(sy, sx) = 1024 + (data >> 1);
}
WRITE16_HANDLER( galpanic_paletteram_w )
@@ -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_ADDR16(bitmap, sy, sx) = color;
+ bitmap->pix16(sy, sx) = color;
}
}
@@ -125,7 +125,7 @@ SCREEN_UPDATE( comad )
// if(galpanic_clear_sprites)
{
- bitmap_fill(state->m_sprites_bitmap,cliprect,0);
+ state->m_sprites_bitmap->fill(0, *cliprect);
comad_draw_sprites(screen.machine(),bitmap,cliprect);
}
// else
diff --git a/src/mame/video/galspnbl.c b/src/mame/video/galspnbl.c
index 330d54fc16a..11b961f1fbe 100644
--- a/src/mame/video/galspnbl.c
+++ b/src/mame/video/galspnbl.c
@@ -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_ADDR16(bitmap, 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 bc268f231b2..ceb80e6a8d3 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_ADDR32(bitmap, 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_ADDR32(bitmap, 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 d6a9b9687f4..36df776b1bd 100644
--- a/src/mame/video/gaplus.c
+++ b/src/mame/video/gaplus.c
@@ -248,7 +248,7 @@ static void starfield_render(running_machine &machine, bitmap_t *bitmap)
if ( x >=0 && x < width && y >= 0 && y < height )
{
- *BITMAP_ADDR16(bitmap, y, x) = stars[i].col;
+ bitmap->pix16(y, x) = stars[i].col;
}
}
}
@@ -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(bitmap, cliprect, 0);
+ bitmap->fill(0, *cliprect);
starfield_render(screen.machine(), bitmap);
diff --git a/src/mame/video/gauntlet.c b/src/mame/video/gauntlet.c
index 97d668b691a..e5f9420ebfc 100644
--- a/src/mame/video/gauntlet.c
+++ b/src/mame/video/gauntlet.c
@@ -191,8 +191,8 @@ SCREEN_UPDATE( gauntlet )
for (r = 0; r < rectlist.numrects; r++, rectlist.rect++)
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
- UINT16 *mo = (UINT16 *)mobitmap->base + mobitmap->rowpixels * y;
- UINT16 *pf = (UINT16 *)bitmap->base + bitmap->rowpixels * y;
+ UINT16 *mo = &mobitmap->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/gcpinbal.c b/src/mame/video/gcpinbal.c
index bb6af7b0170..f6adec590b4 100644
--- a/src/mame/video/gcpinbal.c
+++ b/src/mame/video/gcpinbal.c
@@ -292,8 +292,8 @@ SCREEN_UPDATE( gcpinbal )
tilemap_set_scrolly(state->m_tilemap[i], 0, state->m_scrolly[i]);
}
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
- bitmap_fill(bitmap, cliprect, 0);
+ 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 ae4883466b5..5cf9102631a 100644
--- a/src/mame/video/genesis.c
+++ b/src/mame/video/genesis.c
@@ -227,7 +227,7 @@ void system18_vdp_update( bitmap_t *bitmap, const rectangle *cliprect )
/* generate the final screen */
for (y = cliprect->min_y; y <= cliprect->max_y; y++)
- drawline(BITMAP_ADDR16(bitmap, y, 0), y, 0xffff);
+ drawline(&bitmap->pix16(y), y, 0xffff);
}
/******************************************************************************
diff --git a/src/mame/video/gijoe.c b/src/mame/video/gijoe.c
index 070ab561342..5e441c03e26 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(bitmap, cliprect, get_black_pen(screen.machine()));
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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 e51b050a152..fafa5dc88cc 100644
--- a/src/mame/video/ginganin.c
+++ b/src/mame/video/ginganin.c
@@ -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(bitmap, cliprect, 0);
+ 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 88c46d3e9a5..4b657ed9c8a 100644
--- a/src/mame/video/gladiatr.c
+++ b/src/mame/video/gladiatr.c
@@ -271,10 +271,10 @@ SCREEN_UPDATE( ppking )
int x = sx;
int y = (sy + state->m_fg_scrolly) & 0x1ff;
- UINT16 *dest = BITMAP_ADDR16(bitmap, sy, sx);
+ UINT16 *dest = &bitmap->pix16(sy, sx);
while( x <= cliprect->max_x )
{
- if( *BITMAP_ADDR8(flagsbitmap, y, x)&TILEMAP_PIXEL_LAYER0 )
+ if( flagsbitmap->pix8(y, x)&TILEMAP_PIXEL_LAYER0 )
{
*dest += 512;
}
@@ -308,6 +308,6 @@ SCREEN_UPDATE( gladiatr )
tilemap_draw(bitmap,cliprect,state->m_fg_tilemap,0,0);
}
else
- bitmap_fill( bitmap, cliprect , get_black_pen(screen.machine()));
+ 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 b41e40d057a..e0a72e31b99 100644
--- a/src/mame/video/glass.c
+++ b/src/mame/video/glass.c
@@ -97,12 +97,12 @@ WRITE16_HANDLER( glass_blitter_w )
{
int color = *gfx;
gfx++;
- *BITMAP_ADDR16(state->m_screen_bitmap, j, i) = color & 0xff;
+ state->m_screen_bitmap->pix16(j, i) = color & 0xff;
}
}
}
else
- bitmap_fill(state->m_screen_bitmap, 0, 0);
+ state->m_screen_bitmap->fill(0);
}
}
}
@@ -205,7 +205,7 @@ SCREEN_UPDATE( glass )
tilemap_set_scrollx(state->m_pant[1], 0, state->m_vregs[3]);
/* draw layers + sprites */
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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);
diff --git a/src/mame/video/goal92.c b/src/mame/video/goal92.c
index 9e765b3004e..ba64a1bbbbe 100644
--- a/src/mame/video/goal92.c
+++ b/src/mame/video/goal92.c
@@ -169,7 +169,7 @@ SCREEN_UPDATE( goal92 )
tilemap_set_scrolly(state->m_fg_layer, 0, state->m_scrollram[3] + 8);
}
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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/goldstar.c b/src/mame/video/goldstar.c
index 6867de01d2f..f5b14aa6df9 100644
--- a/src/mame/video/goldstar.c
+++ b/src/mame/video/goldstar.c
@@ -386,31 +386,6 @@ WRITE8_HANDLER( cm_background_col_w )
tilemap_mark_all_tiles_dirty (state->m_reel3_tilemap);
}
-// are these hardcoded, or registers?
-static const rectangle visible1 = { 0*8, (14+48)*8-1, 4*8, (4+7)*8-1 };
-static const rectangle visible2 = { 0*8, (14+48)*8-1, 12*8, (12+7)*8-1 };
-static const rectangle visible3 = { 0*8, (14+48)*8-1, 20*8, (20+7)*8-1 };
-
-static const rectangle cm91_visible1 = { 0*8, (14+48)*8-1, 4*8, (4+7)*8-1 }; /* same start for reel1 */
-static const rectangle cm91_visible2 = { 0*8, (14+48)*8-1, 11*8, (12+7)*8-1 }; /* 4 pixels less for reel2 */
-static const rectangle cm91_visible3 = { 0*8, (14+48)*8-1, 19*8, (19+7)*8-1 }; /* 8 pixels less for reel3 */
-
-static const rectangle am1a_visible1 = { 0*8, (14+48)*8-1, 4*8, (4+6)*8-1 };
-static const rectangle am1a_visible2 = { 0*8, (14+48)*8-1, 10*8, (10+6)*8-1 };
-static const rectangle am1a_visible3 = { 0*8, (14+48)*8-1, 16*8, (16+6)*8-1 };
-
-static const rectangle unkch_visible1 = { 0*8, (14+48)*8-1, 3*8, (3+7)*8-1 };
-static const rectangle unkch_visible2 = { 0*8, (14+48)*8-1, 10*8, (10+7)*8-1 };
-static const rectangle unkch_visible3 = { 0*8, (14+48)*8-1, 17*8, (17+7)*8-1 };
-
-static const rectangle magical_visible1 = { 0*8, (14+48)*8-1, 4*8, (4+8)*8-1 };
-static const rectangle magical_visible2 = { 0*8, (14+48)*8-1, 12*8, (12+8)*8-1 };
-static const rectangle magical_visible3 = { 0*8, (14+48)*8-1, 20*8, (20+8)*8-1 };
-
-static const rectangle magical_visible1alt = { 0*8, (16+48)*8-1, 4*8, 16*8-1 };
-static const rectangle magical_visible2alt = { 0*8, (16+48)*8-1, 16*8, 28*8-1 };
-
-static const rectangle bingowng_visible1 = { 0*8, (14+48)*8-1, 3*8, (4+7)*8-1 };
SCREEN_UPDATE( goldstar )
@@ -418,7 +393,7 @@ SCREEN_UPDATE( goldstar )
goldstar_state *state = screen.machine().driver_data<goldstar_state>();
int i;
- bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
if (!state->m_cm_enable_reg &0x01)
return 0;
@@ -433,6 +408,11 @@ SCREEN_UPDATE( goldstar )
}
+ // are these hardcoded, or registers?
+ const rectangle visible1(0*8, (14+48)*8-1, 4*8, (4+7)*8-1);
+ const rectangle visible2(0*8, (14+48)*8-1, 12*8, (12+7)*8-1);
+ const rectangle visible3(0*8, (14+48)*8-1, 20*8, (20+7)*8-1);
+
tilemap_draw(bitmap, &visible1, state->m_reel1_tilemap, 0, 0);
tilemap_draw(bitmap, &visible2, state->m_reel2_tilemap, 0, 0);
tilemap_draw(bitmap, &visible3, state->m_reel3_tilemap, 0, 0);
@@ -464,7 +444,7 @@ SCREEN_UPDATE( bingowng )
goldstar_state *state = screen.machine().driver_data<goldstar_state>();
int i;
- bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
if (!state->m_cm_enable_reg &0x01)
return 0;
@@ -477,7 +457,8 @@ SCREEN_UPDATE( bingowng )
}
- tilemap_draw(bitmap, &bingowng_visible1, state->m_reel1_tilemap, 0, 0);
+ const rectangle visible1(0*8, (14+48)*8-1, 3*8, (4+7)*8-1);
+ tilemap_draw(bitmap, &visible1, state->m_reel1_tilemap, 0, 0);
}
if (state->m_cm_enable_reg &0x04)
@@ -506,7 +487,7 @@ SCREEN_UPDATE( magical )
goldstar_state *state = screen.machine().driver_data<goldstar_state>();
int i;
- bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
if (!state->m_cm_enable_reg &0x01)
return 0;
@@ -524,8 +505,11 @@ SCREEN_UPDATE( magical )
}
- tilemap_draw(bitmap, &magical_visible1alt, state->m_reel1_tilemap, 0, 0);
- tilemap_draw(bitmap, &magical_visible2alt, state->m_reel2_tilemap, 0, 0);
+ const rectangle visible1alt(0*8, (16+48)*8-1, 4*8, 16*8-1);
+ const rectangle visible2alt(0*8, (16+48)*8-1, 16*8, 28*8-1);
+
+ tilemap_draw(bitmap, &visible1alt, state->m_reel1_tilemap, 0, 0);
+ tilemap_draw(bitmap, &visible2alt, state->m_reel2_tilemap, 0, 0);
//tilemap_draw(bitmap, &magical_visible3, state->m_reel3_tilemap, 0, 0);
}
else
@@ -538,9 +522,13 @@ SCREEN_UPDATE( magical )
}
- tilemap_draw(bitmap, &magical_visible1, state->m_reel1_tilemap, 0, 0);
- tilemap_draw(bitmap, &magical_visible2, state->m_reel2_tilemap, 0, 0);
- tilemap_draw(bitmap, &magical_visible3, state->m_reel3_tilemap, 0, 0);
+ const rectangle visible1(0*8, (14+48)*8-1, 4*8, (4+8)*8-1);
+ const rectangle visible2(0*8, (14+48)*8-1, 12*8, (12+8)*8-1);
+ const rectangle visible3(0*8, (14+48)*8-1, 20*8, (20+8)*8-1);
+
+ tilemap_draw(bitmap, &visible1, state->m_reel1_tilemap, 0, 0);
+ tilemap_draw(bitmap, &visible2, state->m_reel2_tilemap, 0, 0);
+ tilemap_draw(bitmap, &visible3, state->m_reel3_tilemap, 0, 0);
}
}
@@ -558,7 +546,7 @@ SCREEN_UPDATE( unkch )
goldstar_state *state = screen.machine().driver_data<goldstar_state>();
int i;
- bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
if (!state->m_cm_enable_reg &0x01)
return 0;
@@ -589,9 +577,13 @@ SCREEN_UPDATE( unkch )
tilemap_set_scrolly(state->m_reel3_tilemap, i, state->m_reel3_scroll[i*2]);
}
- tilemap_draw(bitmap, &unkch_visible1, state->m_reel1_tilemap, 0, 0);
- tilemap_draw(bitmap, &unkch_visible2, state->m_reel2_tilemap, 0, 0);
- tilemap_draw(bitmap, &unkch_visible3, state->m_reel3_tilemap, 0, 0);
+ const rectangle visible1(0*8, (14+48)*8-1, 3*8, (3+7)*8-1);
+ const rectangle visible2(0*8, (14+48)*8-1, 10*8, (10+7)*8-1);
+ const rectangle visible3(0*8, (14+48)*8-1, 17*8, (17+7)*8-1);
+
+ tilemap_draw(bitmap, &visible1, state->m_reel1_tilemap, 0, 0);
+ tilemap_draw(bitmap, &visible2, state->m_reel2_tilemap, 0, 0);
+ tilemap_draw(bitmap, &visible3, state->m_reel3_tilemap, 0, 0);
}
}
@@ -608,7 +600,7 @@ SCREEN_UPDATE( cmast91 )
goldstar_state *state = screen.machine().driver_data<goldstar_state>();
int i;
- bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
if (!state->m_cm_enable_reg &0x01)
return 0;
@@ -622,9 +614,13 @@ SCREEN_UPDATE( cmast91 )
tilemap_set_scrolly(state->m_reel3_tilemap, i, state->m_reel3_scroll[i]);
}
- tilemap_draw(bitmap, &cm91_visible1, state->m_reel1_tilemap, 0, 0);
- tilemap_draw(bitmap, &cm91_visible2, state->m_reel2_tilemap, 0, 0);
- tilemap_draw(bitmap, &cm91_visible3, state->m_reel3_tilemap, 0, 0);
+ const rectangle visible1(0*8, (14+48)*8-1, 4*8, (4+7)*8-1); /* same start for reel1 */
+ const rectangle visible2(0*8, (14+48)*8-1, 11*8, (12+7)*8-1); /* 4 pixels less for reel2 */
+ const rectangle visible3(0*8, (14+48)*8-1, 19*8, (19+7)*8-1); /* 8 pixels less for reel3 */
+
+ tilemap_draw(bitmap, &visible1, state->m_reel1_tilemap, 0, 0);
+ tilemap_draw(bitmap, &visible2, state->m_reel2_tilemap, 0, 0);
+ tilemap_draw(bitmap, &visible3, state->m_reel3_tilemap, 0, 0);
}
if (state->m_cm_enable_reg &0x02)
@@ -640,7 +636,7 @@ SCREEN_UPDATE( amcoe1a )
goldstar_state *state = screen.machine().driver_data<goldstar_state>();
int i;
- bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
if (!state->m_cm_enable_reg &0x01)
return 0;
@@ -654,9 +650,13 @@ SCREEN_UPDATE( amcoe1a )
tilemap_set_scrolly(state->m_reel3_tilemap, i, state->m_reel3_scroll[i]);
}
- tilemap_draw(bitmap, &am1a_visible1, state->m_reel1_tilemap, 0, 0);
- tilemap_draw(bitmap, &am1a_visible2, state->m_reel2_tilemap, 0, 0);
- tilemap_draw(bitmap, &am1a_visible3, state->m_reel3_tilemap, 0, 0);
+ const rectangle visible1(0*8, (14+48)*8-1, 4*8, (4+6)*8-1);
+ const rectangle visible2(0*8, (14+48)*8-1, 10*8, (10+6)*8-1);
+ const rectangle visible3(0*8, (14+48)*8-1, 16*8, (16+6)*8-1);
+
+ tilemap_draw(bitmap, &visible1, state->m_reel1_tilemap, 0, 0);
+ tilemap_draw(bitmap, &visible2, state->m_reel2_tilemap, 0, 0);
+ tilemap_draw(bitmap, &visible3, state->m_reel3_tilemap, 0, 0);
}
if (state->m_cm_enable_reg &0x04)
diff --git a/src/mame/video/gomoku.c b/src/mame/video/gomoku.c
index 6ec9db8c509..7e6cf832f35 100644
--- a/src/mame/video/gomoku.c
+++ b/src/mame/video/gomoku.c
@@ -124,7 +124,7 @@ VIDEO_START( gomoku )
tilemap_set_transparent_pen(state->m_fg_tilemap,0);
/* make background bitmap */
- bitmap_fill(state->m_bg_bitmap, 0, 0x20);
+ state->m_bg_bitmap->fill(0x20);
// board
for (y = 0; y < 256; y++)
@@ -138,7 +138,7 @@ VIDEO_START( gomoku )
if (bgdata & 0x01) color = 0x21; // board (brown)
if (bgdata & 0x02) color = 0x20; // frame line (while)
- *BITMAP_ADDR16(state->m_bg_bitmap, (255 - y - 1) & 0xff, (255 - x + 7) & 0xff) = color;
+ state->m_bg_bitmap->pix16((255 - y - 1) & 0xff, (255 - x + 7) & 0xff) = color;
}
}
}
@@ -192,7 +192,7 @@ SCREEN_UPDATE( gomoku )
}
else continue;
- *BITMAP_ADDR16(bitmap, (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_ADDR16(bitmap, (255 - y - 1) & 0xff, (255 - x + 7) & 0xff) = color;
+ bitmap->pix16((255 - y - 1) & 0xff, (255 - x + 7) & 0xff) = color;
}
}
}
else
{
- bitmap_fill(bitmap, 0, 0x20);
+ bitmap->fill(0x20);
}
tilemap_draw(bitmap, cliprect, state->m_fg_tilemap, 0, 0);
diff --git a/src/mame/video/gottlieb.c b/src/mame/video/gottlieb.c
index d5caf3e1585..b5f5cf3204f 100644
--- a/src/mame/video/gottlieb.c
+++ b/src/mame/video/gottlieb.c
@@ -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(bitmap, cliprect, 0);
+ bitmap->fill(0, *cliprect);
/* draw the sprites */
draw_sprites(screen.machine(), bitmap, cliprect);
diff --git a/src/mame/video/gp9001.c b/src/mame/video/gp9001.c
index a34a00377e1..286fcbc865a 100644
--- a/src/mame/video/gp9001.c
+++ b/src/mame/video/gp9001.c
@@ -917,8 +917,8 @@ 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_ADDR16(bitmap,drawyy,drawxx);
- UINT8* dstpri = BITMAP_ADDR8(this->custom_priority_bitmap, drawyy, drawxx);
+ UINT16* dstptr = &bitmap->pix16(drawyy, drawxx);
+ UINT8* dstpri = &this->custom_priority_bitmap->pix8(drawyy, drawxx);
if (priority >= dstpri[0])
{
@@ -968,9 +968,9 @@ void gp9001vdp_device::gp9001_draw_custom_tilemap(running_machine& machine, bitm
{
int realy = (y+scrolly)&0x1ff;
- srcptr = BITMAP_ADDR16(tmb, realy, 0);
- dstptr = BITMAP_ADDR16(bitmap, y, 0);
- dstpriptr = BITMAP_ADDR8(this->custom_priority_bitmap, y, 0);
+ srcptr = &tmb->pix16(realy);
+ dstptr = &bitmap->pix16(y);
+ dstpriptr = &this->custom_priority_bitmap->pix8(y);
for (x=0;x<width;x++)
{
diff --git a/src/mame/video/gradius3.c b/src/mame/video/gradius3.c
index 0bf9ab0009c..0e3dda54e13 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);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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 c38c06bdc2b..f91545fbdda 100644
--- a/src/mame/video/grchamp.c
+++ b/src/mame/video/grchamp.c
@@ -144,7 +144,7 @@ static int collision_check(running_machine &machine, grchamp_state *state, bitma
{
for( x = 0; x<32; x++ )
{
- pixel = *BITMAP_ADDR16(state->m_work_bitmap, y, x);
+ pixel = state->m_work_bitmap->pix16(y, x);
if( pixel != sprite_transp ){
sx = x+x0;
sy = y+y0;
@@ -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_ADDR16(bitmap, 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_ADDR16(bitmap, sy, sx) = bgcolor;
+ bitmap->pix16(sy, sx) = bgcolor;
}
}
}
@@ -180,7 +180,7 @@ 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_ADDR16(bitmap, y, x) = *BITMAP_ADDR16(bitmap, y, x) + offs;
+ bitmap->pix16(y, x) = bitmap->pix16(y, x) + offs;
}
}
}
@@ -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;
@@ -403,9 +403,9 @@ SCREEN_UPDATE( grchamp )
/* get source/dest pointers */
/* the Y counter starts counting when VBLANK goes to 0, which is at Y=16 */
- UINT16 *lrsrc = (UINT16 *)lrpixmap->base + ((lryscroll + y - 16) & 0xff) * lrpixmap->rowpixels;
- UINT16 *csrc = (UINT16 *)cpixmap->base + ((cyscroll + y - 16) & 0xff) * cpixmap->rowpixels;
- UINT32 *dest = (UINT32 *)bitmap->base + y * bitmap->rowpixels;
+ 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 086f94ed6a6..651c105118f 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_ADDR16(bitmap, ypos, currx ^ currxor) = pens[left];
+ bitmap->pix16(ypos, currx ^ currxor) = pens[left];
currx++;
/* right pixel */
if (right && currx >= 0 && currx < 256)
- *BITMAP_ADDR16(bitmap, 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 5d89438f9c8..ae9cc1f5c6c 100644
--- a/src/mame/video/groundfx.c
+++ b/src/mame/video/groundfx.c
@@ -223,8 +223,8 @@ SCREEN_UPDATE( groundfx )
pivlayer[1] = pivlayer[0]^1;
pivlayer[2] = 2;
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
- bitmap_fill(bitmap, cliprect, 0); /* 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 f17435d8652..a7a4a11fe37 100644
--- a/src/mame/video/gstriker.c
+++ b/src/mame/video/gstriker.c
@@ -536,7 +536,7 @@ WRITE16_HANDLER( gsx_videoram3_w )
SCREEN_UPDATE(gstriker)
{
gstriker_state *state = screen.machine().driver_data<gstriker_state>();
- bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine()));
+ 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/gticlub.c b/src/mame/video/gticlub.c
index 259f5f7891e..0f142724a63 100644
--- a/src/mame/video/gticlub.c
+++ b/src/mame/video/gticlub.c
@@ -457,8 +457,8 @@ static void draw_scanline(void *dest, INT32 scanline, const poly_extent *extent,
bitmap_t *destmap = (bitmap_t *)dest;
float z = extent->param[0].start;
float dz = extent->param[0].dpdx;
- UINT32 *fb = BITMAP_ADDR32(destmap, scanline, 0);
- UINT32 *zb = BITMAP_ADDR32(K001005_zbuffer, scanline, 0);
+ UINT32 *fb = &destmap->pix32(scanline);
+ UINT32 *zb = &K001005_zbuffer->pix32(scanline);
UINT32 color = extra->color;
int x;
@@ -500,8 +500,8 @@ static void draw_scanline_tex(void *dest, INT32 scanline, const poly_extent *ext
int texture_y = extra->texture_y;
int x;
- UINT32 *fb = BITMAP_ADDR32(destmap, scanline, 0);
- UINT32 *zb = BITMAP_ADDR32(K001005_zbuffer, scanline, 0);
+ UINT32 *fb = &destmap->pix32(scanline);
+ UINT32 *zb = &K001005_zbuffer->pix32(scanline);
for (x = extent->startx; x < extent->stopx; x++)
{
@@ -942,8 +942,8 @@ void K001005_draw(bitmap_t *bitmap, const rectangle *cliprect)
for (j=cliprect->min_y; j <= cliprect->max_y; j++)
{
- UINT32 *bmp = BITMAP_ADDR32(bitmap, j, 0);
- UINT32 *src = BITMAP_ADDR32(K001005_bitmap[K001005_bitmap_page^1], j, 0);
+ 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++)
{
@@ -961,8 +961,8 @@ void K001005_swap_buffers(running_machine &machine)
//if (K001005_status == 2)
{
- bitmap_fill(K001005_bitmap[K001005_bitmap_page], &K001005_cliprect, machine.pens[0]&0x00ffffff);
- bitmap_fill(K001005_zbuffer, &K001005_cliprect, 0xffffffff);
+ K001005_bitmap[K001005_bitmap_page]->fill(machine.pens[0]&0x00ffffff, K001005_cliprect);
+ K001005_zbuffer->fill(0xffffffff, K001005_cliprect);
}
}
@@ -1032,7 +1032,7 @@ SCREEN_UPDATE( gticlub )
for (x=0; x < 512; x++)
{
UINT8 pixel = rom[index + (y*512) + x];
- *BITMAP_ADDR32(bitmap, 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(bitmap, cliprect, screen.machine().pens[0]);
+ bitmap->fill(screen.machine().pens[0], *cliprect);
if (strcmp(screen.tag(), "lscreen") == 0)
{
diff --git a/src/mame/video/gunbustr.c b/src/mame/video/gunbustr.c
index 4f61a03ff29..dbd0453c463 100644
--- a/src/mame/video/gunbustr.c
+++ b/src/mame/video/gunbustr.c
@@ -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 */
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
+ 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 4714b8a8751..6ed2b02f7c0 100644
--- a/src/mame/video/gunsmoke.c
+++ b/src/mame/video/gunsmoke.c
@@ -183,7 +183,7 @@ SCREEN_UPDATE( gunsmoke )
if (state->m_bgon)
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
else
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
if (state->m_objon)
draw_sprites(screen.machine(), bitmap, cliprect);
diff --git a/src/mame/video/harddriv.c b/src/mame/video/harddriv.c
index a4a1f23f4b4..e905e49f715 100644
--- a/src/mame/video/harddriv.c
+++ b/src/mame/video/harddriv.c
@@ -427,7 +427,7 @@ void harddriv_scanline_driver(screen_device &screen, bitmap_t *bitmap, int scanl
{
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_ADDR16(bitmap, scanline, 0);
+ UINT16 *dest = &bitmap->pix16(scanline);
int coladdr = (params->yoffset << 9) + ((params->coladdr & 0xff) << 4) - 15 + (state->m_gfx_finescroll & 0x0f);
int x;
@@ -443,7 +443,7 @@ void harddriv_scanline_multisync(screen_device &screen, bitmap_t *bitmap, int sc
{
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_ADDR16(bitmap, scanline, 0);
+ 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/hnayayoi.c b/src/mame/video/hnayayoi.c
index 27dff182ee5..c111b41a562 100644
--- a/src/mame/video/hnayayoi.c
+++ b/src/mame/video/hnayayoi.c
@@ -233,11 +233,11 @@ static void draw_layer_interleaved( running_machine &machine, bitmap_t *bitmap,
int county, countx, pen;
UINT8 *src1 = state->m_pixmap[left_pixmap];
UINT8 *src2 = state->m_pixmap[right_pixmap];
- UINT16 *dstbase = (UINT16 *)bitmap->base;
+ 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 016447165e9..933ccfa15da 100644
--- a/src/mame/video/hng64.c
+++ b/src/mame/video/hng64.c
@@ -99,7 +99,7 @@ static void pdrawgfx_transpen_additive(bitmap_t *dest, const rectangle *cliprect
const pen_t *paldata;
assert(dest != NULL);
- assert(dest->bpp == 32);
+ assert(dest->bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -141,7 +141,7 @@ static void pdrawgfxzoom_transpen_additive(bitmap_t *dest, const rectangle *clip
}
assert(dest != NULL);
- assert(dest->bpp == 32);
+ assert(dest->bpp() == 32);
assert(gfx != NULL);
/* get final code and color, and grab lookup tables */
@@ -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_ADDR32(bitmap, j, i);
+ UINT32* thePixel = &bitmap->pix32(j, i);
finR = (INT32)RGB_RED(*thePixel);
finG = (INT32)RGB_GREEN(*thePixel);
@@ -719,11 +719,7 @@ static void hng64_configure_blit_parameters(blit_parameters *blit, tilemap_t *tm
/* otherwise, make one up */
else
- {
- blit->cliprect.min_x = blit->cliprect.min_y = 0;
- blit->cliprect.max_x = dest->width - 1;
- blit->cliprect.max_y = dest->height - 1;
- }
+ blit->cliprect = dest->cliprect();
/* set the priority code and alpha */
//blit->tilemap_priority_code = priority | (priority_mask << 8) | (tmap->palette_offset << 16); // fixit
@@ -798,10 +794,10 @@ static void hng64_tilemap_draw_roz_core(running_machine& machine, tilemap_t *tma
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;
+ 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;
@@ -817,7 +813,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;
@@ -855,10 +851,10 @@ static void hng64_tilemap_draw_roz_core(running_machine& machine, tilemap_t *tma
cy = starty >> 16;
/* get source and priority pointers */
- pri = BITMAP_ADDR8(priority_bitmap, sy, sx);
- src = BITMAP_ADDR16(srcbitmap, cy, 0);
- maskptr = BITMAP_ADDR8(flagsmap, cy, 0);
- dest = (UINT8 *)destbitmap->base + (destbitmap->rowpixels * sy + 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)
@@ -896,16 +892,16 @@ static void hng64_tilemap_draw_roz_core(running_machine& machine, tilemap_t *tma
cy = starty;
/* get dest and priority pointers */
- dest = (UINT8 *)destbitmap->base + (destbitmap->rowpixels * sy + sx) * destadvance;
- pri = BITMAP_ADDR8(priority_bitmap, 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 ((*BITMAP_ADDR8(flagsmap, (cy >> 16) & ymask, (cx >> 16) & xmask) & mask) == value)
+ if ((flagsmap->pix8((cy >> 16) & ymask, (cx >> 16) & xmask) & mask) == value)
{
- HNG64_ROZ_PLOT_PIXEL(*BITMAP_ADDR16(srcbitmap, (cy >> 16) & ymask, (cx >> 16) & xmask));
+ HNG64_ROZ_PLOT_PIXEL(srcbitmap->pix16((cy >> 16) & ymask, (cx >> 16) & xmask));
*pri = (*pri & (priority >> 8)) | priority;
}
@@ -936,17 +932,17 @@ static void hng64_tilemap_draw_roz_core(running_machine& machine, tilemap_t *tma
cy = starty;
/* get dest and priority pointers */
- dest = (UINT8 *)destbitmap->base + (destbitmap->rowpixels * sy + sx) * destadvance;
- pri = BITMAP_ADDR8(priority_bitmap, 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 ((*BITMAP_ADDR8(flagsmap, cy >> 16, cx >> 16) & mask) == value)
+ if ((flagsmap->pix8(cy >> 16, cx >> 16) & mask) == value)
{
- HNG64_ROZ_PLOT_PIXEL(*BITMAP_ADDR16(srcbitmap, cy >> 16, cx >> 16));
+ HNG64_ROZ_PLOT_PIXEL(srcbitmap->pix16(cy >> 16, cx >> 16));
*pri = (*pri & (priority >> 8)) | priority;
}
@@ -1241,8 +1237,8 @@ static void hng64_drawtilemap(running_machine& machine, bitmap_t *bitmap, const
if (MAKE_MAME_REEEEAAALLLL_SLOW)
{
bitmap_t *bm = tilemap_get_pixmap(tilemap);
- int bmheight = bm->height;
- int bmwidth = bm->width;
+ int bmheight = bm->height();
+ int bmwidth = bm->width();
const pen_t *paldata = machine.pens;
UINT32* dstptr;
UINT16* srcptr;
@@ -1256,7 +1252,7 @@ static void hng64_drawtilemap(running_machine& machine, bitmap_t *bitmap, const
for (yy=0;yy<448;yy++)
{
- dstptr = BITMAP_ADDR32(bitmap,yy,0);
+ dstptr = &bitmap->pix32(yy);
tmp = xtopleft;
tmp2 = ytopleft;
@@ -1267,7 +1263,7 @@ static void hng64_drawtilemap(running_machine& machine, bitmap_t *bitmap, const
int realsrcy = (ytopleft>>16)&(bmheight-1);
UINT16 pen;
- srcptr = BITMAP_ADDR16(bm, realsrcy, 0);
+ srcptr = &bm->pix16(realsrcy);
pen = srcptr[realsrcx];
@@ -1339,8 +1335,8 @@ static void hng64_drawtilemap(running_machine& machine, bitmap_t *bitmap, const
if (MAKE_MAME_REEEEAAALLLL_SLOW)
{
bitmap_t *bm = tilemap_get_pixmap(tilemap);
- int bmheight = bm->height;
- int bmwidth = bm->width;
+ int bmheight = bm->height();
+ int bmwidth = bm->width();
const pen_t *paldata = machine.pens;
UINT32* dstptr;
UINT16* srcptr;
@@ -1354,8 +1350,8 @@ static void hng64_drawtilemap(running_machine& machine, bitmap_t *bitmap, const
{
int realsrcy = (ytopleft>>16)&(bmheight-1);
- dstptr = BITMAP_ADDR32(bitmap,yy,0);
- srcptr = BITMAP_ADDR16(bm, realsrcy, 0);
+ dstptr = &bitmap->pix32(yy);
+ srcptr = &bm->pix16(realsrcy);
xtopleft = tmp;
@@ -1468,8 +1464,8 @@ SCREEN_UPDATE( hng64 )
}
#endif
- bitmap_fill(bitmap, 0, hng64_tcram[0x50/4] & 0x10000 ? get_black_pen(screen.machine()) : screen.machine().pens[0]); //FIXME: Is the register correct? check with HW tests
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0x00);
+ 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;
@@ -1552,7 +1548,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_ADDR32(bitmap, 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/homedata.c b/src/mame/video/homedata.c
index 1e71ef864a9..9ed033e2141 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
return 0;
}
@@ -908,7 +908,7 @@ SCREEN_UPDATE( reikaids )
}
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
return 0;
}
diff --git a/src/mame/video/hyhoo.c b/src/mame/video/hyhoo.c
index 2a97a5d9a76..4c1344b97c9 100644
--- a/src/mame/video/hyhoo.c
+++ b/src/mame/video/hyhoo.c
@@ -148,8 +148,8 @@ static void hyhoo_gfxdraw(running_machine &machine)
pen = MAKE_RGB(pal6bit(r), pal5bit(g), pal5bit(b));
- *BITMAP_ADDR32(state->m_tmpbitmap, dy, dx1) = *BITMAP_ADDR32(state->m_tmpbitmap, dy, dx1) | pen;
- *BITMAP_ADDR32(state->m_tmpbitmap, dy, dx2) = *BITMAP_ADDR32(state->m_tmpbitmap, dy, dx2) | pen;
+ state->m_tmpbitmap->pix32(dy, dx1) = state->m_tmpbitmap->pix32(dy, dx1) | pen;
+ state->m_tmpbitmap->pix32(dy, dx2) = state->m_tmpbitmap->pix32(dy, dx2) | pen;
}
else
{
@@ -164,8 +164,8 @@ static void hyhoo_gfxdraw(running_machine &machine)
pen = MAKE_RGB(pal6bit(r << 3), pal5bit(g << 2), pal5bit(b << 3));
- *BITMAP_ADDR32(state->m_tmpbitmap, dy, dx1) = pen;
- *BITMAP_ADDR32(state->m_tmpbitmap, dy, dx2) = pen;
+ state->m_tmpbitmap->pix32(dy, dx1) = pen;
+ state->m_tmpbitmap->pix32(dy, dx2) = pen;
}
}
}
@@ -197,7 +197,7 @@ static void hyhoo_gfxdraw(running_machine &machine)
pen = MAKE_RGB(pal6bit(r << 3), pal5bit(g << 2), pal5bit(b << 3));
- *BITMAP_ADDR32(state->m_tmpbitmap, dy, dx1) = pen;
+ state->m_tmpbitmap->pix32(dy, dx1) = pen;
}
if (state->m_clut[color2])
@@ -211,7 +211,7 @@ static void hyhoo_gfxdraw(running_machine &machine)
pen = MAKE_RGB(pal6bit(r << 3), pal5bit(g << 2), pal5bit(b << 3));
- *BITMAP_ADDR32(state->m_tmpbitmap, dy, dx2) = pen;
+ state->m_tmpbitmap->pix32(dy, dx2) = pen;
}
}
@@ -237,7 +237,7 @@ SCREEN_UPDATE( hyhoo )
if (state->m_dispflag)
copybitmap(bitmap, state->m_tmpbitmap, state->m_flipscreen, state->m_flipscreen, 0, 0, cliprect);
else
- bitmap_fill(bitmap, cliprect, RGB_BLACK);
+ bitmap->fill(RGB_BLACK, *cliprect);
return 0;
}
diff --git a/src/mame/video/hyprduel.c b/src/mame/video/hyprduel.c
index 188206dc285..14e0d76fc94 100644
--- a/src/mame/video/hyprduel.c
+++ b/src/mame/video/hyprduel.c
@@ -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 */
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
- bitmap_fill(bitmap, cliprect, ((state->m_videoregs[0x12 / 2] & 0x0fff)) + 0x1000);
+ 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(bitmap, cliprect,0);
+ bitmap->fill(0, *cliprect);
layers_ctrl &= msk;
}
diff --git a/src/mame/video/ikki.c b/src/mame/video/ikki.c
index d7e4f0ecf35..abab9c86464 100644
--- a/src/mame/video/ikki.c
+++ b/src/mame/video/ikki.c
@@ -69,7 +69,7 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
int y;
offs_t offs;
- bitmap_fill(state->m_sprite_bitmap, cliprect, state->m_punch_through_pen);
+ state->m_sprite_bitmap->fill(state->m_punch_through_pen, *cliprect);
for (offs = 0; offs < state->m_spriteram_size; offs += 4)
{
@@ -107,10 +107,10 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
for (x = cliprect->min_x; x <= cliprect->max_x; x++)
{
- UINT16 pen = *BITMAP_ADDR16(state->m_sprite_bitmap, y, x);
+ UINT16 pen = state->m_sprite_bitmap->pix16(y, x);
if (colortable_entry_get_value(machine.colortable, pen) != 0x100)
- *BITMAP_ADDR16(bitmap, y, x) = pen;
+ bitmap->pix16(y, x) = pen;
}
}
}
diff --git a/src/mame/video/inufuku.c b/src/mame/video/inufuku.c
index 5c0144cce6d..344a178737e 100644
--- a/src/mame/video/inufuku.c
+++ b/src/mame/video/inufuku.c
@@ -239,8 +239,8 @@ SCREEN_UPDATE( inufuku )
inufuku_state *state = screen.machine().driver_data<inufuku_state>();
int i;
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
- bitmap_fill(screen.machine().priority_bitmap, NULL, 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/itech8.c b/src/mame/video/itech8.c
index 49f7cb000b5..e641088c4f6 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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_ADDR32(bitmap, y, 0);
+ 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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_ADDR32(bitmap, y, 0);
+ 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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_ADDR32(bitmap, y, 0);
+ 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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_ADDR32(bitmap, y, 0);
+ UINT32 *dest = &bitmap->pix32(y);
for (x = cliprect->min_x & ~1; x <= cliprect->max_x; x += 2)
{
diff --git a/src/mame/video/jaguar.c b/src/mame/video/jaguar.c
index 18294641fdb..34b43ef823f 100644
--- a/src/mame/video/jaguar.c
+++ b/src/mame/video/jaguar.c
@@ -832,7 +832,7 @@ static TIMER_CALLBACK( cojag_scanline_update )
/* only run if video is enabled and we are past the "display begin" */
if ((gpu_regs[VMODE] & 1) && vc >= (gpu_regs[VDB] & 0x7ff))
{
- UINT32 *dest = BITMAP_ADDR32(screen_bitmap, vc >> 1, 0);
+ UINT32 *dest = &screen_bitmap->pix32(vc >> 1);
int maxx = visarea.max_x;
int hde = effective_hvalue(gpu_regs[HDE]) >> 1;
UINT16 x,scanline[760];
@@ -927,7 +927,7 @@ SCREEN_UPDATE( cojag )
/* if not enabled, just blank */
if (!(gpu_regs[VMODE] & 1))
{
- bitmap_fill(bitmap, cliprect, 0);
+ bitmap->fill(0, *cliprect);
return 0;
}
diff --git a/src/mame/video/jalblend.c b/src/mame/video/jalblend.c
index 4dac6cc5f85..8ffabf1a5c1 100644
--- a/src/mame/video/jalblend.c
+++ b/src/mame/video/jalblend.c
@@ -147,13 +147,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 = BITMAP_ADDR32(dest_bmp, y, 0);
+ UINT32 *dest = &dest_bmp->pix32(y);
int x_index = x_index_base;
for (x = sx; x < ex; x++)
{
@@ -184,7 +184,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 = BITMAP_ADDR16(dest_bmp, y, 0);
+ UINT16 *dest = &dest_bmp->pix16(y);
int x_index = x_index_base;
for (x = sx; x < ex; x++)
{
diff --git a/src/mame/video/jedi.c b/src/mame/video/jedi.c
index 39e42d0ed98..4b6a4187b6c 100644
--- a/src/mame/video/jedi.c
+++ b/src/mame/video/jedi.c
@@ -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_ADDR32(bitmap, y, x) = pens[*BITMAP_ADDR32(bitmap, y, x)];
+ bitmap->pix32(y, x) = pens[bitmap->pix32(y, x)];
}
@@ -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_ADDR32(bitmap, y, x + 0) = tx_col1 | prom2[(background_line_buffer[x + 0] << 4) | bg_tempcol];
- *BITMAP_ADDR32(bitmap, 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;
@@ -296,7 +296,7 @@ static void draw_sprites(running_machine &machine, jedi_state *state, bitmap_t *
x = x & 0x1ff;
if (col)
- *BITMAP_ADDR32(bitmap, y, x) = (*BITMAP_ADDR32(bitmap, 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(bitmap, cliprect, RGB_BLACK);
+ 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 6c7ec96d546..6631906f0be 100644
--- a/src/mame/video/jpmimpct.c
+++ b/src/mame/video/jpmimpct.c
@@ -110,7 +110,7 @@ void jpmimpct_scanline_update(screen_device &screen, bitmap_t *bitmap, int scanl
{
jpmimpct_state *state = screen.machine().driver_data<jpmimpct_state>();
UINT16 *vram = &state->m_vram[(params->rowaddr << 8) & 0x3ff00];
- UINT32 *dest = BITMAP_ADDR32(bitmap, scanline, 0);
+ 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 0d1c66cc6a9..c10be99282f 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(bitmap,cliprect,0xf0);
+ 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(bitmap,cliprect,0xf0);
+ 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(bitmap,cliprect,get_black_pen(screen.machine()));
+ 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(bitmap,cliprect,get_black_pen(screen.machine()));
+ 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 ed89b112d29..b6a08c22f70 100644
--- a/src/mame/video/kan_pand.c
+++ b/src/mame/video/kan_pand.c
@@ -202,7 +202,7 @@ void pandora_eof( device_t *device )
// the games can disable the clearing of the sprite bitmap, to leave sprite trails
if (pandora->clear_bitmap)
- bitmap_fill(pandora->sprites_bitmap, &pandora->screen->visible_area(), pandora->bg_pen);
+ pandora->sprites_bitmap->fill(pandora->bg_pen, pandora->screen->visible_area());
pandora_draw(device, pandora->sprites_bitmap, &pandora->screen->visible_area());
}
diff --git a/src/mame/video/kaneko16.c b/src/mame/video/kaneko16.c
index e2e9fb77b02..87a0c9c5592 100644
--- a/src/mame/video/kaneko16.c
+++ b/src/mame/video/kaneko16.c
@@ -274,7 +274,7 @@ VIDEO_START( berlwall )
if ((r & 0x10) && (b & 0x10))
g = (g - 1) & 0x1f; /* decrease with wraparound */
- *BITMAP_ADDR16(state->m_bg15_bitmap, y, sx * 256 + x) = 2048 + ((g << 10) | (r << 5) | b);
+ state->m_bg15_bitmap->pix16(y, sx * 256 + x) = 2048 + ((g << 10) | (r << 5) | b);
}
VIDEO_START_CALL(kaneko16_1xVIEW2);
@@ -496,8 +496,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 = BITMAP_ADDR16(dest_bmp, y, 0);
- UINT8 *pri = BITMAP_ADDR8(priority_bitmap, y, 0);
+ 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++ )
@@ -967,7 +967,7 @@ static void kaneko16_render_sprites(running_machine &machine, bitmap_t *bitmap,
}
else
{
- bitmap_fill(state->m_sprites_bitmap,cliprect,0);
+ state->m_sprites_bitmap->fill(0, *cliprect);
kaneko16_draw_sprites(machine,bitmap,cliprect);
}
}
@@ -997,19 +997,19 @@ static void kaneko16_fill_bitmap(running_machine &machine, bitmap_t *bitmap, con
{
kaneko16_state *state = machine.driver_data<kaneko16_state>();
if(state->m_sprite_type == 1)
- bitmap_fill(bitmap,cliprect,0x7f00);
+ 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(bitmap,cliprect,0);
+ bitmap->fill(0, *cliprect);
}
static SCREEN_UPDATE( common )
{
int i;
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
+ 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);
@@ -1082,7 +1082,7 @@ SCREEN_UPDATE( galsnew )
count = 0;
for (y=0;y<256;y++)
{
- UINT16 *dest = BITMAP_ADDR16(bitmap, y, 0);
+ UINT16 *dest = &bitmap->pix16(y);
for (x=0;x<256;x++)
{
@@ -1096,7 +1096,7 @@ SCREEN_UPDATE( galsnew )
count = 0;
for (y=0;y<256;y++)
{
- UINT16 *dest = BITMAP_ADDR16(bitmap, y, 0);
+ 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 fd1a061afb2..92ff2f4700a 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_ADDR32(bitmap, y, 0);
+ UINT32 *dest = &bitmap->pix32(y);
for (x = cliprect->min_x; x <= cliprect->max_x; x += 2)
{
diff --git a/src/mame/video/klax.c b/src/mame/video/klax.c
index 606eb45600b..e47b2e4d793 100644
--- a/src/mame/video/klax.c
+++ b/src/mame/video/klax.c
@@ -116,8 +116,8 @@ SCREEN_UPDATE( klax )
for (r = 0; r < rectlist.numrects; r++, rectlist.rect++)
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
- UINT16 *mo = (UINT16 *)mobitmap->base + mobitmap->rowpixels * y;
- UINT16 *pf = (UINT16 *)bitmap->base + bitmap->rowpixels * y;
+ UINT16 *mo = &mobitmap->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/konamigx.c b/src/mame/video/konamigx.c
index 4b1f504537c..194f19516db 100644
--- a/src/mame/video/konamigx.c
+++ b/src/mame/video/konamigx.c
@@ -78,7 +78,7 @@ static void (*game_tile_callback)(running_machine &machine, int layer, int *code
// Localized K053936/ROZ+
#define K053936_MAX_CHIPS 2
-static rectangle K053936_cliprect[K053936_MAX_CHIPS] = {{0,0,0,0},{0,0,0,0}};
+static rectangle K053936_cliprect[K053936_MAX_CHIPS];
static int K053936_offset[K053936_MAX_CHIPS][2] = {{0,0},{0,0}};
static int K053936_clip_enabled[K053936_MAX_CHIPS] = {0,0};
@@ -143,11 +143,11 @@ INLINE void K053936GP_copyroz32clip( running_machine &machine,
startx += sx * incxx + sy * incyx;
starty += sx * incxy + sy * incyy;
}
- else { sx = sy = 0; tx = dst_bitmap->width; ty = dst_bitmap->height; }
+ else { sx = sy = 0; tx = dst_bitmap->width(); ty = dst_bitmap->height(); }
// adjust entry points and other loop constants
- dst_pitch = dst_bitmap->rowpixels;
- dst_base = (UINT32*)dst_bitmap->base;
+ dst_pitch = dst_bitmap->rowpixels();
+ dst_base = &dst_bitmap->pix32(0);
dst_base2 = sy * dst_pitch + sx + tx;
ecx = tx = -tx;
@@ -155,10 +155,10 @@ INLINE void K053936GP_copyroz32clip( running_machine &machine,
pal_base = machine.pens;
cmask = colormask[tilebpp];
- src_pitch = src_bitmap->rowpixels;
- src_base = (UINT16 *)src_bitmap->base;
- 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;
@@ -453,8 +453,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 = (UINT32 *)bitmap->base;
- 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;
@@ -1134,7 +1134,7 @@ void konamigx_mixer_init(running_machine &machine, int objdma)
gx_objdma = 0;
gx_primode = 0;
- gx_objzbuf = (UINT8 *)machine.priority_bitmap->base;
+ 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);
@@ -1633,8 +1633,8 @@ void konamigx_mixer(running_machine &machine, bitmap_t *bitmap, const rectangle
// - todo, use the pixeldouble_output I just added for vsnet instead?
for (yy=0;yy<height;yy++)
{
- UINT16* src = BITMAP_ADDR16(extra_bitmap,yy,0);
- UINT32* dst = BITMAP_ADDR32(bitmap,yy,0);
+ UINT16* src = &extra_bitmap->pix16(yy);
+ UINT32* dst = &bitmap->pix32(yy);
int shiftpos = 0;
for (xx=0;xx<width;xx+=2)
{
@@ -2485,13 +2485,13 @@ SCREEN_UPDATE(konamigx)
for (y=0;y<256;y++)
{
- //UINT16* src = BITMAP_ADDR16( gxtype1_roz_dstbitmap, y, 0);
+ //UINT16* src = &gxtype1_roz_dstbitmap->pix16(y);
- //UINT32* dst = BITMAP_ADDR32( bitmap, y, 0);
+ //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 = BITMAP_ADDR16( gxtype1_roz_dstbitmap2, y+30, 0);
- UINT32* dst = BITMAP_ADDR32( bitmap, 256-y, 0);
+ UINT16* src = &gxtype1_roz_dstbitmap2->pix16(y+30);
+ UINT32* dst = &bitmap->pix32(256-y);
for (x=0;x<512;x++)
{
diff --git a/src/mame/video/konamiic.c b/src/mame/video/konamiic.c
index d6959a78864..d5b0ee9678a 100644
--- a/src/mame/video/konamiic.c
+++ b/src/mame/video/konamiic.c
@@ -2595,7 +2595,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
- bitmap_fill(xprmap, 0, 0); // reset pixel transparency_bitmap;
+ xprmap->fill(0); // reset pixel transparency_bitmap;
memset(xprdata, TILEMAP_PIXEL_LAYER0, 0x800); // reset tile transparency_data;
}
else
@@ -2646,8 +2646,8 @@ static int K056832_update_linemap(running_machine &machine, bitmap_t *bitmap, in
tile_data tileinfo = {0};
- dst_ptr = BITMAP_ADDR16(pixmap, line, 0);
- xpr_ptr = BITMAP_ADDR8(xprmap, line, 0);
+ dst_ptr = &pixmap->pix16(line);
+ xpr_ptr = &xprmap->pix8(line);
if (!all_dirty)
{
@@ -3188,8 +3188,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_ADDR32(bitmap, clipy, 0);
- 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/konicdev.c b/src/mame/video/konicdev.c
index 4aab3cb42de..a3b57b6771d 100644
--- a/src/mame/video/konicdev.c
+++ b/src/mame/video/konicdev.c
@@ -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
@@ -6999,7 +6999,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
- bitmap_fill(xprmap, 0, 0); // reset pixel transparency_bitmap;
+ xprmap->fill(0); // reset pixel transparency_bitmap;
memset(xprdata, TILEMAP_PIXEL_LAYER0, 0x800); // reset tile transparency_data;
}
else
@@ -7049,8 +7049,8 @@ static int k056832_update_linemap( device_t *device, bitmap_t *bitmap, int page,
{
tile_data tileinfo = {0};
- dst_ptr = BITMAP_ADDR16(pixmap, line, 0);
- xpr_ptr = BITMAP_ADDR8(xprmap, line, 0);
+ dst_ptr = &pixmap->pix16(line);
+ xpr_ptr = &xprmap->pix8(line);
if (!all_dirty)
{
@@ -8219,11 +8219,10 @@ 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 = (UINT32 *)bitmap->base;
- pLine += (bitmap->rowpixels * y);
- for (x = 0; x < bitmap->width; x++)
+ pLine = &bitmap->pix32(y);
+ for (x = 0; x < bitmap->width(); x++)
*pLine++ = bgcolor;
}
}
@@ -8243,8 +8242,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_ADDR32(bitmap, clipy, 0);
- dst_pitch = bitmap->rowpixels;
+ dst_ptr = &bitmap->pix32(clipy);
+ dst_pitch = bitmap->rowpixels();
dst_ptr += clipx;
BGC_SET = 0;
@@ -8744,8 +8743,8 @@ void k001005_swap_buffers( device_t *device )
//if (k001005->status == 2)
{
- bitmap_fill(k001005->bitmap[k001005->bitmap_page], &k001005->cliprect, device->machine().pens[0] & 0x00ffffff);
- bitmap_fill(k001005->zbuffer, &k001005->cliprect, 0xffffffff);
+ k001005->bitmap[k001005->bitmap_page]->fill(device->machine().pens[0] & 0x00ffffff, k001005->cliprect);
+ k001005->zbuffer->fill(0xffffffff, k001005->cliprect);
}
}
@@ -8922,8 +8921,8 @@ static void draw_scanline( device_t *device, void *dest, INT32 scanline, const p
bitmap_t *destmap = (bitmap_t *)dest;
float z = extent->param[0].start;
float dz = extent->param[0].dpdx;
- UINT32 *fb = BITMAP_ADDR32(destmap, scanline, 0);
- UINT32 *zb = BITMAP_ADDR32(k001005->zbuffer, scanline, 0);
+ UINT32 *fb = &destmap->pix32(scanline);
+ UINT32 *zb = &k001005->zbuffer->pix32(scanline);
UINT32 color = extra->color;
int x;
@@ -8968,8 +8967,8 @@ static void draw_scanline_tex( device_t *device, void *dest, INT32 scanline, con
int texture_y = extra->texture_y;
int x;
- UINT32 *fb = BITMAP_ADDR32(destmap, scanline, 0);
- UINT32 *zb = BITMAP_ADDR32(k001005->zbuffer, scanline, 0);
+ UINT32 *fb = &destmap->pix32(scanline);
+ UINT32 *zb = &k001005->zbuffer->pix32(scanline);
for (x = extent->startx; x < extent->stopx; x++)
{
@@ -9426,8 +9425,8 @@ 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_ADDR32(bitmap, j, 0);
- UINT32 *src = BITMAP_ADDR32(k001005->bitmap[k001005->bitmap_page ^ 1], j, 0);
+ 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++)
{
@@ -9701,7 +9700,7 @@ void k001604_draw_back_layer( device_t *device, bitmap_t *bitmap, const rectangl
k001604_state *k001604 = k001604_get_safe_token(device);
int layer;
int num_layers;
- bitmap_fill(bitmap, cliprect, 0);
+ bitmap->fill(0, *cliprect);
num_layers = k001604->layer_size ? 2 : 1;
diff --git a/src/mame/video/ksayakyu.c b/src/mame/video/ksayakyu.c
index 3b6f89bd6b8..28ceb971a31 100644
--- a/src/mame/video/ksayakyu.c
+++ b/src/mame/video/ksayakyu.c
@@ -128,7 +128,7 @@ SCREEN_UPDATE(ksayakyu)
{
ksayakyu_state *state = screen.machine().driver_data<ksayakyu_state>();
- bitmap_fill(bitmap, cliprect, 0);
+ 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/labyrunr.c b/src/mame/video/labyrunr.c
index e100704fbee..e6f307cdfe1 100644
--- a/src/mame/video/labyrunr.c
+++ b/src/mame/video/labyrunr.c
@@ -188,8 +188,8 @@ SCREEN_UPDATE( labyrunr )
set_pens(screen.machine());
- bitmap_fill(screen.machine().priority_bitmap, cliprect,0);
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
+ screen.machine().priority_bitmap->fill(0, *cliprect);
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
if (~k007121_ctrlram_r(state->m_k007121, 3) & 0x20)
{
@@ -198,8 +198,8 @@ SCREEN_UPDATE( labyrunr )
finalclip0 = state->m_clip0;
finalclip1 = state->m_clip1;
- sect_rect(&finalclip0, cliprect);
- sect_rect(&finalclip1, cliprect);
+ finalclip0 &= *cliprect;
+ finalclip1 &= *cliprect;
tilemap_set_scrollx(state->m_layer0, 0, ctrl_0 - 40);
tilemap_set_scrollx(state->m_layer1, 0, 0);
diff --git a/src/mame/video/ladybug.c b/src/mame/video/ladybug.c
index 086bdc36731..744d6e28ca1 100644
--- a/src/mame/video/ladybug.c
+++ b/src/mame/video/ladybug.c
@@ -288,7 +288,7 @@ SCREEN_UPDATE( ladybug )
int offs;
// clear the bg bitmap
- bitmap_fill(bitmap, cliprect, 0);
+ bitmap->fill(0, *cliprect);
for (offs = 0; offs < 32; offs++)
{
@@ -333,7 +333,7 @@ SCREEN_UPDATE( sraider )
}
// clear the bg bitmap
- bitmap_fill(bitmap, cliprect, 0);
+ 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;
- plot_box(bitmap, x, cliprect->min_y, 1, height, 0x81);
+ bitmap->plot_box(x, cliprect->min_y, 1, height, 0x81);
}
}
diff --git a/src/mame/video/lasso.c b/src/mame/video/lasso.c
index 5db71c95573..91afce81fff 100644
--- a/src/mame/video/lasso.c
+++ b/src/mame/video/lasso.c
@@ -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_ADDR16(bitmap, 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(bitmap, cliprect, 0);
+ 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(bitmap, cliprect, 0);
+ 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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/lazercmd.c b/src/mame/video/lazercmd.c
index 74f4da50ef4..59091fc4b8f 100644
--- a/src/mame/video/lazercmd.c
+++ b/src/mame/video/lazercmd.c
@@ -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_ADDR16(bitmap, 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 3675524ad49..639a6e26984 100644
--- a/src/mame/video/legionna.c
+++ b/src/mame/video/legionna.c
@@ -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]*/ );
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
- bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine())); /* 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(bitmap,cliprect,0x0200);
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
+ 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(bitmap,cliprect,get_black_pen(screen.machine()));
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
+ 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 1309f87b17a..826e7d9c807 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_ADDR16(bitmap, y, 0);
+ 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_ADDR16(bitmap, y, 0);
+ 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 d95e94fd991..b9ebfab6934 100644
--- a/src/mame/video/lemmings.c
+++ b/src/mame/video/lemmings.c
@@ -95,7 +95,7 @@ VIDEO_START( lemmings )
state->m_sprite_triple_buffer_1 = auto_alloc_array(machine, UINT16, 0x800 / 2);
tilemap_set_transparent_pen(state->m_vram_tilemap, 0);
- bitmap_fill(state->m_bitmap0, 0, 0x100);
+ state->m_bitmap0->fill(0x100);
gfx_element_set_source(machine.gfx[2], state->m_vram_buffer);
@@ -132,8 +132,8 @@ WRITE16_HANDLER( lemmings_pixel_0_w )
if (sx > 2047 || sy > 255)
return;
- *BITMAP_ADDR16(state->m_bitmap0, sy, sx + 0) = ((src >> 8) & 0xf) | 0x100;
- *BITMAP_ADDR16(state->m_bitmap0, sy, sx + 1) = ((src >> 0) & 0xf) | 0x100;
+ state->m_bitmap0->pix16(sy, sx + 0) = ((src >> 8) & 0xf) | 0x100;
+ state->m_bitmap0->pix16(sy, sx + 1) = ((src >> 0) & 0xf) | 0x100;
}
WRITE16_HANDLER( lemmings_pixel_1_w )
@@ -176,7 +176,7 @@ SCREEN_UPDATE( lemmings )
rect.max_y = cliprect->max_y;
rect.min_y = cliprect->min_y;
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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) */
diff --git a/src/mame/video/lethal.c b/src/mame/video/lethal.c
index 2bccc5509a7..024c8e20bc5 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(bitmap, cliprect, 7168);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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 037190a370b..6c0ae9ea1ad 100644
--- a/src/mame/video/lethalj.c
+++ b/src/mame/video/lethalj.c
@@ -175,7 +175,7 @@ void lethalj_scanline_update(screen_device &screen, bitmap_t *bitmap, int scanli
{
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_ADDR16(bitmap, scanline, 0);
+ 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 53fec9319e1..d50aae1ce1e 100644
--- a/src/mame/video/liberate.c
+++ b/src/mame/video/liberate.c
@@ -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(bitmap, cliprect, 32);
+ 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(bitmap, cliprect, 0);
+ 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(bitmap, cliprect, 32);
+ 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(bitmap, cliprect, 32);
+ bitmap->fill(32, *cliprect);
else
tilemap_draw(bitmap, cliprect, state->m_back_tilemap, 0, 0);
diff --git a/src/mame/video/liberatr.c b/src/mame/video/liberatr.c
index 7a92a652ece..08187d1d4f6 100644
--- a/src/mame/video/liberatr.c
+++ b/src/mame/video/liberatr.c
@@ -273,7 +273,7 @@ void liberatr_state::draw_planet(bitmap_t &bitmap, pen_t *pens)
color = base_color;
for (i = 0; i < segment_length; i++, x++)
- *BITMAP_ADDR32(&bitmap, y, x) = pens[color];
+ bitmap.pix32(y, x) = pens[color];
}
}
}
@@ -291,7 +291,7 @@ void liberatr_state::draw_bitmap(bitmap_t &bitmap, pen_t *pens)
UINT8 x = offs & 0xff;
if (data)
- *BITMAP_ADDR32(&bitmap, y, x) = pens[(data >> 5) | 0x10];
+ bitmap.pix32(y, x) = pens[(data >> 5) | 0x10];
}
}
@@ -301,7 +301,7 @@ bool liberatr_state::screen_update(screen_device &screen, bitmap_t &bitmap, cons
pen_t pens[NUM_PENS];
get_pens(pens);
- bitmap_fill(&bitmap, &cliprect, RGB_BLACK);
+ bitmap.fill(RGB_BLACK, cliprect);
draw_planet(bitmap, pens);
draw_bitmap(bitmap, pens);
diff --git a/src/mame/video/lkage.c b/src/mame/video/lkage.c
index 7ebb8a10a23..b2cf8c1239d 100644
--- a/src/mame/video/lkage.c
+++ b/src/mame/video/lkage.c
@@ -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]);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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 bf73694854e..824e7707270 100644
--- a/src/mame/video/lockon.c
+++ b/src/mame/video/lockon.c
@@ -213,7 +213,7 @@ static void scene_draw( running_machine &machine )
d2 = *(gfx3 + tileidx);
}
- bmpaddr = BITMAP_ADDR16(state->m_back_buffer, y, 0);
+ bmpaddr = &state->m_back_buffer->pix16(y);
for (x = 0; x < FRAMEBUFFER_MAX_X; ++x)
{
@@ -324,7 +324,7 @@ static void ground_draw( running_machine &machine )
/* TODO: Clean up and emulate CS of GFX ROMs? */
for (y = 0; y < FRAMEBUFFER_MAX_Y; ++y)
{
- UINT16 *bmpaddr = BITMAP_ADDR16(state->m_back_buffer, y, 0);
+ UINT16 *bmpaddr = &state->m_back_buffer->pix16(y);
UINT8 ls163;
UINT32 clut_addr;
UINT32 gfx_addr;
@@ -491,7 +491,7 @@ static void objects_draw( running_machine &machine )
UINT32 tile;
UINT8 cnt;
UINT32 yidx;
- UINT16 *line = BITMAP_ADDR16(state->m_back_buffer, y, 0);
+ UINT16 *line = &state->m_back_buffer->pix16(y);
UINT32 px = xpos;
/* Outside the limits? */
@@ -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_ADDR16(bitmap, y, 0);
+ UINT16 *dst = &bitmap->pix16(y);
UINT32 x;
UINT32 cx = cxy;
@@ -739,7 +739,7 @@ static void rotate_draw( running_machine &machine, bitmap_t *bitmap, const recta
cx &= 0x1ff;
cy &= 0x1ff;
- *dst++ = *BITMAP_ADDR16(state->m_front_buffer, cy, cx);
+ *dst++ = state->m_front_buffer->pix16(cy, cx);
if (axx_en)
INCREMENT(axx, cx);
@@ -885,7 +885,7 @@ static void hud_draw( running_machine &machine, bitmap_t *bitmap, const rectangl
if (x <= cliprect->max_x)
{
- UINT16 *dst = BITMAP_ADDR16(bitmap, 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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 8f2c5eb2ae6..365fad1e232 100644
--- a/src/mame/video/lordgun.c
+++ b/src/mame/video/lordgun.c
@@ -346,7 +346,7 @@ SCREEN_UPDATE( lordgun )
if (state->m_whitescreen)
{
- bitmap_fill(bitmap, cliprect, get_white_pen(screen.machine()));
+ bitmap->fill(get_white_pen(screen.machine()), *cliprect);
return 0;
}
@@ -376,7 +376,7 @@ SCREEN_UPDATE( lordgun )
int l;
for (l = 0; l < 5; l++)
- bitmap_fill(state->m_bitmaps[l], cliprect, trans_pen);
+ 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);
@@ -402,7 +402,7 @@ SCREEN_UPDATE( lordgun )
// bits 0-4: layer transparency
for (l = 0; l < 5; l++)
{
- pens[l] = *BITMAP_ADDR16(state->m_bitmaps[l], y, x);
+ pens[l] = state->m_bitmaps[l]->pix16(y, x);
if (pens[l] == trans_pen)
pri_addr |= 1 << layer2bit[l];
}
@@ -420,7 +420,7 @@ SCREEN_UPDATE( lordgun )
l = pri2layer[state->m_priority_ram[pri_addr] & 7];
- *BITMAP_ADDR16(bitmap, 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 a3fa24ba677..f3ebb0b11db 100644
--- a/src/mame/video/lsasquad.c
+++ b/src/mame/video/lsasquad.c
@@ -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(bitmap, cliprect, 511);
+ 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(bitmap, cliprect, 511);
+ 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/m10.c b/src/mame/video/m10.c
index 62fe9ae8941..a9983085467 100644
--- a/src/mame/video/m10.c
+++ b/src/mame/video/m10.c
@@ -97,9 +97,9 @@ INLINE void plot_pixel_m10( running_machine &machine, bitmap_t *bm, int x, int y
m10_state *state = machine.driver_data<m10_state>();
if (!state->m_flip)
- *BITMAP_ADDR16(bm, y, x) = col;
+ bm->pix16(y, x) = col;
else
- *BITMAP_ADDR16(bm, (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(bitmap, cliprect, 0);
+ 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 081eb562400..e7b86e60a6a 100644
--- a/src/mame/video/m107.c
+++ b/src/mame/video/m107.c
@@ -345,7 +345,7 @@ 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)
{
m107_state *state = machine.driver_data<m107_state>();
- bitmap_fill(machine.priority_bitmap, cliprect, 0);
+ 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(bitmap, cliprect, 0);
+ 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/m3raster.c b/src/mame/video/m3raster.c
index 1072dbbcb9a..28b69c06857 100644
--- a/src/mame/video/m3raster.c
+++ b/src/mame/video/m3raster.c
@@ -3,8 +3,8 @@ static void draw_scanline_normal(void *dest, INT32 scanline, const poly_extent *
const poly_extra_data *extra = (const poly_extra_data *)extradata;
const cached_texture *texture = extra->texture;
bitmap_t *destmap = (bitmap_t *)dest;
- UINT16 *p = BITMAP_ADDR16(destmap, scanline, 0);
- UINT32 *d = BITMAP_ADDR32(extra->zbuffer, scanline, 0);
+ UINT16 *p = &destmap->pix16(scanline);
+ UINT32 *d = &extra->zbuffer->pix32(scanline);
float ooz = extent->param[0].start;
float uoz = extent->param[1].start;
float voz = extent->param[2].start;
@@ -52,8 +52,8 @@ static void draw_scanline_trans(void *dest, INT32 scanline, const poly_extent *e
const poly_extra_data *extra = (const poly_extra_data *)extradata;
const cached_texture *texture = extra->texture;
bitmap_t *destmap = (bitmap_t *)dest;
- UINT16 *p = BITMAP_ADDR16(destmap, scanline, 0);
- UINT32 *d = BITMAP_ADDR32(extra->zbuffer, scanline, 0);
+ UINT16 *p = &destmap->pix16(scanline);
+ UINT32 *d = &extra->zbuffer->pix32(scanline);
float ooz = extent->param[0].start;
float uoz = extent->param[1].start;
float voz = extent->param[2].start;
@@ -107,8 +107,8 @@ static void draw_scanline_alpha(void *dest, INT32 scanline, const poly_extent *e
const poly_extra_data *extra = (const poly_extra_data *)extradata;
const cached_texture *texture = extra->texture;
bitmap_t *destmap = (bitmap_t *)dest;
- UINT16 *p = BITMAP_ADDR16(destmap, scanline, 0);
- UINT32 *d = BITMAP_ADDR32(extra->zbuffer, scanline, 0);
+ UINT16 *p = &destmap->pix16(scanline);
+ UINT32 *d = &extra->zbuffer->pix32(scanline);
float ooz = extent->param[0].start;
float uoz = extent->param[1].start;
float voz = extent->param[2].start;
@@ -168,8 +168,8 @@ static void draw_scanline_alpha_test(void *dest, INT32 scanline, const poly_exte
const poly_extra_data *extra = (const poly_extra_data *)extradata;
const cached_texture *texture = extra->texture;
bitmap_t *destmap = (bitmap_t *)dest;
- UINT16 *p = BITMAP_ADDR16(destmap, scanline, 0);
- UINT32 *d = BITMAP_ADDR32(extra->zbuffer, scanline, 0);
+ UINT16 *p = &destmap->pix16(scanline);
+ UINT32 *d = &extra->zbuffer->pix32(scanline);
float ooz = extent->param[0].start;
float uoz = extent->param[1].start;
float voz = extent->param[2].start;
@@ -227,8 +227,8 @@ static void draw_scanline_color(void *dest, INT32 scanline, const poly_extent *e
{
const poly_extra_data *extra = (const poly_extra_data *)extradata;
bitmap_t *destmap = (bitmap_t *)dest;
- UINT16 *p = BITMAP_ADDR16(destmap, scanline, 0);
- UINT32 *d = BITMAP_ADDR32(extra->zbuffer, scanline, 0);
+ UINT16 *p = &destmap->pix16(scanline);
+ UINT32 *d = &extra->zbuffer->pix32(scanline);
float ooz = extent->param[0].start;
float doozdx = extent->param[0].dpdx;
int fr = extra->color & 0x7c00;
diff --git a/src/mame/video/m52.c b/src/mame/video/m52.c
index 6f5addc7bec..e5044b20f9f 100644
--- a/src/mame/video/m52.c
+++ b/src/mame/video/m52.c
@@ -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(bitmap, &rect, machine.gfx[image]->color_base + 3);
+ 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(bitmap, cliprect, 0);
+ bitmap->fill(0, *cliprect);
if (!(state->m_bgcontrol & 0x20))
{
diff --git a/src/mame/video/m57.c b/src/mame/video/m57.c
index acc4ec5a2c9..365976c52c0 100644
--- a/src/mame/video/m57.c
+++ b/src/mame/video/m57.c
@@ -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_ADDR16(bitmap, y, x) = *BITMAP_ADDR16(bitmap, y, x + scrolly);
+ bitmap->pix16(y, x) = bitmap->pix16(y, x + scrolly);
else
- *BITMAP_ADDR16(bitmap, y, x) = *BITMAP_ADDR16(bitmap, 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_ADDR16(bitmap, y, x) = *BITMAP_ADDR16(bitmap, y, x + scrolly);
+ bitmap->pix16(y, x) = bitmap->pix16(y, x + scrolly);
else
- *BITMAP_ADDR16(bitmap, y, x) = *BITMAP_ADDR16(bitmap, y, cliprect->min_x);
+ bitmap->pix16(y, x) = bitmap->pix16(y, cliprect->min_x);
}
}
}
diff --git a/src/mame/video/m58.c b/src/mame/video/m58.c
index a95c0deb7a2..e69596eb8cb 100644
--- a/src/mame/video/m58.c
+++ b/src/mame/video/m58.c
@@ -133,7 +133,7 @@ WRITE8_HANDLER( yard_scroll_panel_w )
col = (data >> i) & 0x11;
col = ((col >> 3) | col) & 3;
- *BITMAP_ADDR16(state->m_scroll_panel_bitmap, sy, sx + i) = RADAR_PALETTE_BASE + (sy & 0xfc) + col;
+ state->m_scroll_panel_bitmap->pix16(sy, sx + i) = RADAR_PALETTE_BASE + (sy & 0xfc) + col;
}
}
@@ -280,16 +280,8 @@ static void draw_panel( running_machine &machine, bitmap_t *bitmap, const rectan
if (!*state->m_yard_score_panel_disabled)
{
- static const rectangle clippanel =
- {
- 26*8, 32*8-1,
- 1*8, 31*8-1
- };
- static const rectangle clippanelflip =
- {
- 0*8, 6*8-1,
- 1*8, 31*8-1
- };
+ const rectangle clippanel(26*8, 32*8-1, 1*8, 31*8-1);
+ const rectangle clippanelflip(0*8, 6*8-1, 1*8, 31*8-1);
rectangle clip = flip_screen_get(machine) ? clippanelflip : clippanel;
const rectangle &visarea = machine.primary_screen->visible_area();
int sx = flip_screen_get(machine) ? cliprect->min_x - 8 : cliprect->max_x + 1 - SCROLL_PANEL_WIDTH;
@@ -297,7 +289,7 @@ static void draw_panel( running_machine &machine, bitmap_t *bitmap, const rectan
clip.min_y += visarea.min_y + yoffs;
clip.max_y += visarea.max_y + yoffs;
- sect_rect(&clip, cliprect);
+ clip &= *cliprect;
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 4305c735dde..79a27717d5a 100644
--- a/src/mame/video/m62.c
+++ b/src/mame/video/m62.c
@@ -580,11 +580,11 @@ SCREEN_UPDATE( ldrun3 )
my_cliprect.min_y = 0 * 8;
my_cliprect.max_y = 1 * 8 - 1;
- bitmap_fill(bitmap, &my_cliprect, get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), my_cliprect);
my_cliprect.min_y = 31 * 8;
my_cliprect.max_y = 32 * 8 - 1;
- bitmap_fill(bitmap, &my_cliprect, get_black_pen(screen.machine()));
+ 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 2464da50f99..f4cc716082b 100644
--- a/src/mame/video/m72.c
+++ b/src/mame/video/m72.c
@@ -540,7 +540,7 @@ SCREEN_UPDATE( m72 )
m72_state *state = screen.machine().driver_data<m72_state>();
if (state->m_video_off)
{
- bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
return 0;
}
@@ -566,7 +566,7 @@ SCREEN_UPDATE( majtitle )
if (state->m_video_off)
{
- bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine()));
+ 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 17fb4c5c7ea..05e3e14a355 100644
--- a/src/mame/video/m90.c
+++ b/src/mame/video/m90.c
@@ -363,7 +363,7 @@ SCREEN_UPDATE( m90 )
tilemap_set_scrollx( state->m_pf2_wide_layer,0, state->m_video_control_data[3]+256-2 );
}
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
+ screen.machine().priority_bitmap->fill(0, *cliprect);
if (video_enable)
{
@@ -410,7 +410,7 @@ SCREEN_UPDATE( m90 )
}
else
{
- bitmap_fill(bitmap,cliprect,0);
+ bitmap->fill(0, *cliprect);
}
if (pf1_enable)
@@ -457,7 +457,7 @@ SCREEN_UPDATE( m90 )
draw_sprites(screen.machine(),bitmap,cliprect);
} else {
- bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine()));
+ 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;
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
- bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine()));
+ 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>();
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
- bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine()));
+ 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 8a24e7be972..64c132b529e 100644
--- a/src/mame/video/m92.c
+++ b/src/mame/video/m92.c
@@ -547,8 +547,8 @@ static void m92_draw_tiles(running_machine &machine, bitmap_t *bitmap,const rect
SCREEN_UPDATE( m92 )
{
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
- bitmap_fill(bitmap, cliprect, 0);
+ 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 )
{
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
- bitmap_fill(bitmap, cliprect, 0);
+ 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 379aff803cd..19b2a6cbdda 100644
--- a/src/mame/video/macrossp.c
+++ b/src/mame/video/macrossp.c
@@ -392,7 +392,7 @@ SCREEN_UPDATE( macrossp )
macrossp_state *state = screen.machine().driver_data<macrossp_state>();
int layers[3],layerpri[3];
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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 bdda00f6665..6c86750ee19 100644
--- a/src/mame/video/madalien.c
+++ b/src/mame/video/madalien.c
@@ -180,8 +180,8 @@ static void draw_edges(running_machine &machine, bitmap_t *bitmap, const rectang
clip_edge2.min_y = *state->m_edge2_pos | 0x80;
}
- sect_rect(&clip_edge1, cliprect);
- sect_rect(&clip_edge2, cliprect);
+ clip_edge1 &= *cliprect;
+ clip_edge2 &= *cliprect;
tilemap_mark_all_tiles_dirty(state->m_tilemap_edge1[scroll_mode]);
tilemap_mark_all_tiles_dirty(state->m_tilemap_edge2[scroll_mode]);
@@ -227,8 +227,8 @@ static void draw_headlight(running_machine &machine, bitmap_t *bitmap, const rec
if ((hx < cliprect->min_x) || (hx > cliprect->max_x))
continue;
- if (*BITMAP_ADDR16(state->m_headlight_bitmap, y, x) != 0)
- *BITMAP_ADDR16(bitmap, hy, hx) |= 8;
+ if (state->m_headlight_bitmap->pix16(y, x) != 0)
+ bitmap->pix16(hy, hx) |= 8;
}
}
}
@@ -265,7 +265,7 @@ static SCREEN_UPDATE( madalien )
// mode 3 - transition from A to B
int scroll_mode = *state->m_scroll & 3;
- bitmap_fill(bitmap, cliprect, 0);
+ 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_ADDR16(bitmap, 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 fd7b03cb071..d8b56d7ebba 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(bitmap, cliprect, 0);
+ bitmap->fill(0, *cliprect);
else
{
int v;
@@ -105,7 +105,7 @@ SCREEN_UPDATE( magmax )
UINT32 scroll_v = (*state->m_scroll_y) & 0xff;
/*clear background-over-sprites bitmap*/
- bitmap_fill(screen.machine().generic.tmpbitmap, NULL, 0);
+ screen.machine().generic.tmpbitmap->fill(0);
for (v = 2*8; v < 30*8; v++) /*only for visible area*/
{
@@ -156,7 +156,7 @@ SCREEN_UPDATE( magmax )
/*priority: background over sprites*/
if (map_v_scr_100 && ((graph_data & 0x0c)==0x0c))
- *BITMAP_ADDR16(screen.machine().generic.tmpbitmap, v, h) = line_data[h];
+ screen.machine().generic.tmpbitmap->pix16(v, h) = line_data[h];
}
if (state->m_flipscreen)
diff --git a/src/mame/video/mainevt.c b/src/mame/video/mainevt.c
index a943b86ab96..29c8f854344 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);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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/malzak.c b/src/mame/video/malzak.c
index f7c0f708969..2c6e4b03d54 100644
--- a/src/mame/video/malzak.c
+++ b/src/mame/video/malzak.c
@@ -26,7 +26,7 @@ SCREEN_UPDATE( malzak )
bitmap_t *s2636_0_bitmap;
bitmap_t *s2636_1_bitmap;
- bitmap_fill(bitmap, 0, 0);
+ bitmap->fill(0);
saa5050_update(state->m_saa5050, bitmap, cliprect);
saa5050_frame_advance(state->m_saa5050);
@@ -60,21 +60,21 @@ SCREEN_UPDATE( malzak )
for (x = cliprect->min_x; x <= cliprect->max_x / 2; x++)
{
- int pixel0 = *BITMAP_ADDR16(s2636_0_bitmap, y, x);
- int pixel1 = *BITMAP_ADDR16(s2636_1_bitmap, 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_ADDR16(bitmap, y*2, x*2) = S2636_PIXEL_COLOR(pixel0);
- *BITMAP_ADDR16(bitmap, y*2+1, x*2) = S2636_PIXEL_COLOR(pixel0);
- *BITMAP_ADDR16(bitmap, y*2, x*2+1) = S2636_PIXEL_COLOR(pixel0);
- *BITMAP_ADDR16(bitmap, 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_ADDR16(bitmap, y*2, x*2) = S2636_PIXEL_COLOR(pixel1);
- *BITMAP_ADDR16(bitmap, y*2+1, x*2) = S2636_PIXEL_COLOR(pixel1);
- *BITMAP_ADDR16(bitmap, y*2, x*2+1) = S2636_PIXEL_COLOR(pixel1);
- *BITMAP_ADDR16(bitmap, 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 429d0b5a61e..2b450a2d996 100644
--- a/src/mame/video/mappy.c
+++ b/src/mame/video/mappy.c
@@ -545,7 +545,7 @@ SCREEN_UPDATE( superpac )
tilemap_draw(bitmap,cliprect,state->m_bg_tilemap,TILEMAP_DRAW_OPAQUE | TILEMAP_DRAW_ALL_CATEGORIES,0);
- bitmap_fill(sprite_bitmap,cliprect,15);
+ 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);
@@ -553,14 +553,14 @@ SCREEN_UPDATE( superpac )
tilemap_draw(bitmap,cliprect,state->m_bg_tilemap,1,0);
/* sprite color 0/1 still has priority over that (ghost eyes in Pac 'n Pal) */
- for (y = 0;y < sprite_bitmap->height;y++)
+ for (y = 0;y < sprite_bitmap->height();y++)
{
- for (x = 0;x < sprite_bitmap->width;x++)
+ for (x = 0;x < sprite_bitmap->width();x++)
{
- int spr_entry = *BITMAP_ADDR16(sprite_bitmap, y, x);
+ 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_ADDR16(bitmap, y, x) = spr_entry;
+ bitmap->pix16(y, x) = spr_entry;
}
}
return 0;
diff --git a/src/mame/video/mcatadv.c b/src/mame/video/mcatadv.c
index d77fe9da123..d5ebd6d397e 100644
--- a/src/mame/video/mcatadv.c
+++ b/src/mame/video/mcatadv.c
@@ -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_ADDR16(bitmap, drawypos, 0);
- priline = BITMAP_ADDR8(machine.priority_bitmap, drawypos, 0);
+ destline = &bitmap->pix16(drawypos);
+ priline = &machine.priority_bitmap->pix8(drawypos);
for (xcnt = xstart; xcnt != xend; xcnt += xinc)
{
@@ -205,8 +205,8 @@ SCREEN_UPDATE( mcatadv )
mcatadv_state *state = screen.machine().driver_data<mcatadv_state>();
int i;
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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 cffca0e00e3..df3df75d99f 100644
--- a/src/mame/video/mcd212.c
+++ b/src/mame/video/mcd212.c
@@ -88,7 +88,7 @@ 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_ADDR32(bitmap, y, 0);
+ UINT32 *scanline = &bitmap->pix32(y);
int x = 0;
int lcd = 0;
@@ -1336,7 +1336,7 @@ static void mcd212_draw_scanline(mcd212_regs_t *mcd212, int y)
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_ADDR32(bitmap, y, 0);
+ UINT32 *scanline = &bitmap->pix32(y);
int x;
mcd212_process_vsr(mcd212, 0, plane_a_r, plane_a_g, plane_a_b);
diff --git a/src/mame/video/mcr.c b/src/mame/video/mcr.c
index 0fb4381d968..8c324afa79c 100644
--- a/src/mame/video/mcr.c
+++ b/src/mame/video/mcr.c
@@ -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_ADDR16(bitmap, sy, 0);
- UINT8 *pri = BITMAP_ADDR8(machine.priority_bitmap, sy, 0);
+ UINT16 *dst = &bitmap->pix16(sy);
+ UINT8 *pri = &machine.priority_bitmap->pix8(sy);
/* loop over columns */
for (x = 0; x < 32; x++)
@@ -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_ADDR16(bitmap, sy, 0);
- UINT8 *pri = BITMAP_ADDR8(machine.priority_bitmap, sy, 0);
+ 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 */
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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 0cc72bcd89f..b74fc729186 100644
--- a/src/mame/video/mcr3.c
+++ b/src/mame/video/mcr3.c
@@ -211,7 +211,7 @@ static void mcr3_update_sprites(running_machine &machine, bitmap_t *bitmap, cons
UINT8 *spriteram = state->m_spriteram;
int offs;
- bitmap_fill(machine.priority_bitmap, cliprect, 1);
+ 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 ce7efd1642b..c664195790c 100644
--- a/src/mame/video/mcr68.c
+++ b/src/mame/video/mcr68.c
@@ -222,9 +222,9 @@ static void mcr68_update_sprites(running_machine &machine, bitmap_t *bitmap, con
/* adjust for clipping */
sprite_clip.min_x += state->m_sprite_clip;
sprite_clip.max_x -= state->m_sprite_clip;
- sect_rect(&sprite_clip, cliprect);
+ sprite_clip &= *cliprect;
- bitmap_fill(machine.priority_bitmap,&sprite_clip,1);
+ machine.priority_bitmap->fill(1, sprite_clip);
/* loop over sprite RAM */
for (offs = state->m_spriteram_size / 2 - 4;offs >= 0;offs -= 4)
@@ -272,7 +272,7 @@ static void zwackery_update_sprites(running_machine &machine, bitmap_t *bitmap,
UINT16 *spriteram16 = state->m_spriteram;
int offs;
- bitmap_fill(machine.priority_bitmap,cliprect,1);
+ 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/megasys1.c b/src/mame/video/megasys1.c
index f74c64657bf..8c7d1c24595 100644
--- a/src/mame/video/megasys1.c
+++ b/src/mame/video/megasys1.c
@@ -973,7 +973,7 @@ SCREEN_UPDATE( megasys1 )
}
}
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
+ 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(bitmap,cliprect,0);
+ bitmap->fill(0, *cliprect);
}
if (state->m_sprite_flag & 0x100) /* sprites are split */
diff --git a/src/mame/video/mermaid.c b/src/mame/video/mermaid.c
index 3a8267765ac..18930bfbc6d 100644
--- a/src/mame/video/mermaid.c
+++ b/src/mame/video/mermaid.c
@@ -2,18 +2,6 @@
#include "includes/mermaid.h"
-static const rectangle spritevisiblearea =
-{
- 0 * 8, 26 * 8 - 1,
- 2 * 8, 30 * 8 - 1
-};
-
-static const rectangle flip_spritevisiblearea =
-{
- 6 * 8, 31 * 8 - 1,
- 2 * 8, 30 * 8 - 1
-};
-
PALETTE_INIT( mermaid )
{
int i;
@@ -202,6 +190,9 @@ VIDEO_START( mermaid )
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);
+
mermaid_state *state = machine.driver_data<mermaid_state>();
UINT8 *spriteram = state->m_spriteram;
int offs;
@@ -260,8 +251,8 @@ static UINT8 collision_check( running_machine &machine, rectangle* rect )
for (y = rect->min_y; y <= rect->max_y; y++)
for (x = rect->min_x; x <= rect->max_x; x++)
{
- UINT16 a = colortable_entry_get_value(machine.colortable, *BITMAP_ADDR16(state->m_helper, y, x)) & 0x3f;
- UINT16 b = colortable_entry_get_value(machine.colortable, *BITMAP_ADDR16(state->m_helper2, y, x)) & 0x3f;
+ UINT16 a = colortable_entry_get_value(machine.colortable, state->m_helper->pix16(y, x)) & 0x3f;
+ UINT16 b = colortable_entry_get_value(machine.colortable, state->m_helper2->pix16(y, x)) & 0x3f;
if (b)
if (a)
@@ -333,8 +324,8 @@ SCREEN_EOF( mermaid )
// check collision sprite - background
- bitmap_fill(state->m_helper, &rect, 0);
- bitmap_fill(state->m_helper2, &rect, 0);
+ state->m_helper->fill(0, rect);
+ state->m_helper2->fill(0, rect);
tilemap_draw(state->m_helper, &rect, state->m_bg_tilemap, 0, 0);
@@ -344,8 +335,8 @@ SCREEN_EOF( mermaid )
// check collision sprite - foreground
- bitmap_fill(state->m_helper, &rect, 0);
- bitmap_fill(state->m_helper2, &rect, 0);
+ state->m_helper->fill(0, rect);
+ state->m_helper2->fill(0, rect);
tilemap_draw(state->m_helper, &rect, state->m_fg_tilemap, 0, 0);
@@ -355,8 +346,8 @@ SCREEN_EOF( mermaid )
// check collision sprite - sprite
- bitmap_fill(state->m_helper, &rect, 0);
- bitmap_fill(state->m_helper2, &rect, 0);
+ state->m_helper->fill(0, rect);
+ state->m_helper2->fill(0, rect);
for (offs2 = state->m_spriteram_size - 4; offs2 >= 0; offs2 -= 4)
if (offs != offs2)
@@ -443,8 +434,8 @@ SCREEN_EOF( mermaid )
// check collision sprite - sprite
- bitmap_fill(state->m_helper, &rect, 0);
- bitmap_fill(state->m_helper2, &rect, 0);
+ state->m_helper->fill(0, rect);
+ state->m_helper2->fill(0, rect);
for (offs2 = state->m_spriteram_size - 4; offs2 >= 0; offs2 -= 4)
if (offs != offs2)
@@ -531,8 +522,8 @@ SCREEN_EOF( mermaid )
// check collision sprite - sprite
- bitmap_fill(state->m_helper, &rect, 0);
- bitmap_fill(state->m_helper2, &rect, 0);
+ state->m_helper->fill(0, rect);
+ state->m_helper2->fill(0, rect);
for (offs2 = state->m_spriteram_size - 4; offs2 >= 0; offs2 -= 4)
if (offs != offs2)
diff --git a/src/mame/video/metlclsh.c b/src/mame/video/metlclsh.c
index 730e41fe4a3..d4398f93642 100644
--- a/src/mame/video/metlclsh.c
+++ b/src/mame/video/metlclsh.c
@@ -246,7 +246,7 @@ SCREEN_UPDATE( metlclsh )
{
metlclsh_state *state = screen.machine().driver_data<metlclsh_state>();
- bitmap_fill(bitmap, cliprect, 0x10);
+ 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 f8fa0e6b9d5..78bc6f9f048 100644
--- a/src/mame/video/metro.c
+++ b/src/mame/video/metro.c
@@ -601,8 +601,8 @@ static void draw_tilemap( running_machine &machine, bitmap_t *bitmap, const rect
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_ADDR16(bitmap, y, 0);
- priority_baseaddr = BITMAP_ADDR8(priority_bitmap, y, 0);
+ 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_ADDR16(bitmap, scrheight-y-1, 0);
- priority_baseaddr = BITMAP_ADDR8(priority_bitmap, scrheight-y-1, 0);
+ dst = &bitmap->pix16(scrheight-y-1);
+ priority_baseaddr = &priority_bitmap->pix8(scrheight-y-1);
for (x=0;x<scrwidth;x++)
{
@@ -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 */
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
- bitmap_fill(bitmap, cliprect, ((state->m_videoregs[0x12/2] & 0x0fff)) + 0x1000);
+ 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(bitmap, cliprect, 0);
+ bitmap->fill(0, *cliprect);
layers_ctrl &= msk;
}
diff --git a/src/mame/video/mexico86.c b/src/mame/video/mexico86.c
index 8ee3ef4d10e..c4499811219 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(bitmap, cliprect, 255);
+ bitmap->fill(255, *cliprect);
sx = 0;
@@ -109,7 +109,7 @@ SCREEN_UPDATE( kikikai )
int goffs, code, color, y;
int tx, ty;
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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 b69108dd3e7..182ef7d92a8 100644
--- a/src/mame/video/micro3d.c
+++ b/src/mame/video/micro3d.c
@@ -69,7 +69,7 @@ void micro3d_scanline_update(screen_device &screen, bitmap_t *bitmap, int scanli
micro3d_state *state = screen.machine().driver_data<micro3d_state>();
UINT16 *src = &state->m_micro3d_sprite_vram[(params->rowaddr << 8) & 0x7fe00];
- UINT16 *dest = BITMAP_ADDR16(bitmap, scanline, 0);
+ 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 b354656406b..937c18e96cb 100644
--- a/src/mame/video/midtunit.c
+++ b/src/mame/video/midtunit.c
@@ -805,7 +805,7 @@ skipdma:
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_ADDR16(bitmap, scanline, 0);
+ UINT16 *dest = &bitmap->pix16(scanline);
int coladdr = params->coladdr << 1;
int x;
@@ -818,7 +818,7 @@ void midxunit_scanline_update(screen_device &screen, bitmap_t *bitmap, int scanl
{
UINT32 fulladdr = ((params->rowaddr << 16) | params->coladdr) >> 3;
UINT16 *src = &local_videoram[fulladdr & 0x3fe00];
- UINT16 *dest = BITMAP_ADDR16(bitmap, scanline, 0);
+ 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 cd04f333bc9..29e970288e9 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 = (UINT16 *)bitmap->base + y * bitmap->rowpixels + 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 c676e407f40..8739c8a9c78 100644
--- a/src/mame/video/midyunit.c
+++ b/src/mame/video/midyunit.c
@@ -556,7 +556,7 @@ void midyunit_scanline_update(screen_device &screen, bitmap_t *bitmap, int scanl
{
midyunit_state *state = screen.machine().driver_data<midyunit_state>();
UINT16 *src = &state->m_local_videoram[(params->rowaddr << 9) & 0x3fe00];
- UINT16 *dest = BITMAP_ADDR16(bitmap, scanline, 0);
+ 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 23d7deca1e2..0143fbc3da1 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 = (UINT16 *)bitmap->base + y * bitmap->rowpixels;
+ 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 = (UINT16 *)bitmap->base + y * bitmap->rowpixels;
+ 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 27473b1cdce..e41d4e8b949 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 = (UINT32 *)bitmap->base + y * bitmap->rowpixels;
+ 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 = (UINT32 *)bitmap->base + y * bitmap->rowpixels;
+ 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/mitchell.c b/src/mame/video/mitchell.c
index 3660569e748..6de454913fa 100644
--- a/src/mame/video/mitchell.c
+++ b/src/mame/video/mitchell.c
@@ -332,7 +332,7 @@ SCREEN_UPDATE( pang )
{
mitchell_state *state = screen.machine().driver_data<mitchell_state>();
- bitmap_fill(bitmap, cliprect, 0);
+ 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 76ee781f47d..a2d91c11288 100644
--- a/src/mame/video/mjkjidai.c
+++ b/src/mame/video/mjkjidai.c
@@ -133,7 +133,7 @@ SCREEN_UPDATE( mjkjidai )
{
mjkjidai_state *state = screen.machine().driver_data<mjkjidai_state>();
if (!state->m_display_enable)
- bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine()));
+ 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 80eac92d4f1..622b9b84c0b 100644
--- a/src/mame/video/model1.c
+++ b/src/mame/video/model1.c
@@ -137,7 +137,7 @@ 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)
{
- UINT16 *base = BITMAP_ADDR16(bitmap, y, 0);
+ UINT16 *base = &bitmap->pix16(y);
while(x1 <= x2) {
base[x1] = color;
x1++;
@@ -146,7 +146,7 @@ static void draw_hline(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_ADDR16(bitmap, y, 0);
+ UINT16 *base = &bitmap->pix16(y);
while(x1 <= x2) {
if((x1^y)&1)
base[x1] = color;
@@ -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_ADDR16(bitmap, 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_ADDR16(bitmap, y, x) = color;
+ bitmap->pix16(y, x) = color;
}
#endif
static int comp_quads(const void *q1, const void *q2)
@@ -1518,8 +1518,8 @@ SCREEN_UPDATE(model1)
view->ayyc = cos(view->ayy);
view->ayys = sin(view->ayy);
- bitmap_fill(screen.machine().priority_bitmap, NULL, 0);
- bitmap_fill(bitmap, cliprect, screen.machine().pens[0]);
+ 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 5491e0ba701..a345fdf540b 100644
--- a/src/mame/video/model2.c
+++ b/src/mame/video/model2.c
@@ -2733,8 +2733,8 @@ static void convert_bitmap( running_machine &machine, bitmap_t *dst, bitmap_t *s
for( y = rect->min_y; y < rect->max_y; y++ )
{
- UINT32 *d = BITMAP_ADDR32( dst, y, 0 );
- UINT16 *s = BITMAP_ADDR16( src, y, 0 );
+ UINT32 *d = &dst->pix32(y);
+ UINT16 *s = &src->pix16(y);
for( x = rect->min_x; x < rect->max_x; x++ )
{
@@ -2749,8 +2749,8 @@ SCREEN_UPDATE(model2)
model2_state *state = screen.machine().driver_data<model2_state>();
logerror("--- frame ---\n");
- bitmap_fill(bitmap, cliprect, screen.machine().pens[0]);
- bitmap_fill(state->m_sys24_bitmap, cliprect, 0);
+ 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);
@@ -2769,7 +2769,7 @@ SCREEN_UPDATE(model2)
/* have the rasterizer output the frame */
model2_3d_frame_end( state, bitmap, cliprect );
- bitmap_fill(state->m_sys24_bitmap, cliprect, 0);
+ 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);
diff --git a/src/mame/video/model2rd.c b/src/mame/video/model2rd.c
index 8c0a572bf57..5e90bbfb0ee 100644
--- a/src/mame/video/model2rd.c
+++ b/src/mame/video/model2rd.c
@@ -60,7 +60,7 @@ static void MODEL2_FUNC_NAME(void *dest, INT32 scanline, const poly_extent *exte
const poly_extra_data *extra = (const poly_extra_data *)extradata;
model2_state *state = extra->state;
bitmap_t *destmap = (bitmap_t *)dest;
- UINT32 *p = BITMAP_ADDR32(destmap, scanline, 0);
+ UINT32 *p = &destmap->pix32(scanline);
/* extract color information */
const UINT16 *colortable_r = (const UINT16 *)&state->m_colorxlat[0x0000/4];
@@ -113,7 +113,7 @@ static void MODEL2_FUNC_NAME(void *dest, INT32 scanline, const poly_extent *exte
const poly_extra_data *extra = (const poly_extra_data *)extradata;
model2_state *state = extra->state;
bitmap_t *destmap = (bitmap_t *)dest;
- UINT32 *p = BITMAP_ADDR32(destmap, scanline, 0);
+ UINT32 *p = &destmap->pix32(scanline);
UINT32 tex_width = extra->texwidth;
UINT32 tex_height = extra->texheight;
diff --git a/src/mame/video/model3.c b/src/mame/video/model3.c
index c4a2c3101ee..68a85a31898 100644
--- a/src/mame/video/model3.c
+++ b/src/mame/video/model3.c
@@ -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_ADDR16(bitmap, y^1, 0);
+ UINT16 *d = &bitmap->pix16(y^1);
for(x = tx; x < tx+8; x+=2) {
UINT8 tile0, tile1;
UINT16 pix0, pix1;
@@ -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_ADDR16(bitmap, y, 0);
+ UINT16 *d = &bitmap->pix16(y);
int xx = 0;
for(x = tx; x < tx+8; x++) {
UINT8 tile0;
@@ -232,7 +232,7 @@ static void draw_texture_sheet(running_machine &machine, bitmap_t *bitmap, const
int x,y;
for(y = cliprect->min_y; y <= cliprect->max_y; y++)
{
- UINT16 *d = BITMAP_ADDR16(bitmap, y, 0);
+ 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];
@@ -326,8 +326,8 @@ static void copy_screen(running_machine &machine, bitmap_t *bitmap, const rectan
model3_state *state = machine.driver_data<model3_state>();
int x,y;
for(y=cliprect->min_y; y <= cliprect->max_y; y++) {
- UINT16 *d = BITMAP_ADDR16(bitmap, y, 0);
- UINT16 *s = BITMAP_ADDR16(state->m_bitmap3d, y, 0);
+ 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];
if(!(pix & 0x8000)) {
@@ -382,7 +382,7 @@ SCREEN_UPDATE( model3 )
state->m_debug_layer_disable ^= 0x10;
}
- bitmap_fill(bitmap, cliprect, 0);
+ bitmap->fill(0, *cliprect);
if (!(state->m_debug_layer_disable & 0x8))
draw_layer(screen.machine(), bitmap, cliprect, 3, (state->m_layer_enable >> 3) & 0x1);
@@ -394,8 +394,8 @@ SCREEN_UPDATE( model3 )
{
#if 0
if(state->m_real3d_display_list) {
- bitmap_fill(state->m_zbuffer, cliprect, 0);
- bitmap_fill(state->m_bitmap3d, cliprect, 0x8000);
+ state->m_zbuffer->fill(0, *cliprect);
+ state->m_bitmap3d->fill(0x8000, *cliprect);
real3d_traverse_display_list(screen.machine());
}
#endif
@@ -784,8 +784,8 @@ void real3d_display_list_end(running_machine &machine)
};
}
state->m_texture_fifo_pos = 0;
- bitmap_fill(state->m_zbuffer, NULL, 0);
- bitmap_fill(state->m_bitmap3d, NULL, 0x8000);
+ state->m_zbuffer->fill(0);
+ state->m_bitmap3d->fill(0x8000);
real3d_traverse_display_list(machine);
//state->m_real3d_display_list = 1;
}
diff --git a/src/mame/video/momoko.c b/src/mame/video/momoko.c
index 465dab666a3..28e69ad40fd 100644
--- a/src/mame/video/momoko.c
+++ b/src/mame/video/momoko.c
@@ -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_ADDR16(bitmap, 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(bitmap, cliprect, 256);
+ bitmap->fill(256, *cliprect);
/* draw sprites (momoko) */
diff --git a/src/mame/video/moo.c b/src/mame/video/moo.c
index a482cdfba6f..92f22afa93d 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);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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 62566d679cb..e54ee8133ac 100644
--- a/src/mame/video/mrdo.c
+++ b/src/mame/video/mrdo.c
@@ -265,7 +265,7 @@ SCREEN_UPDATE( mrdo )
{
mrdo_state *state = screen.machine().driver_data<mrdo_state>();
- bitmap_fill(bitmap, cliprect,0);
+ 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/ms32.c b/src/mame/video/ms32.c
index af05f902c09..7d82bac58c5 100644
--- a/src/mame/video/ms32.c
+++ b/src/mame/video/ms32.c
@@ -91,9 +91,9 @@ VIDEO_START( ms32 )
state->m_temp_bitmap_sprites = auto_bitmap_alloc(machine, width, height, BITMAP_FORMAT_INDEXED16);
state->m_temp_bitmap_sprites_pri = auto_bitmap_alloc(machine, width, height, BITMAP_FORMAT_INDEXED16); // not actually being used for rendering, we embed pri info in the raw colour bitmap
- bitmap_fill(state->m_temp_bitmap_tilemaps,0,0);
- bitmap_fill(state->m_temp_bitmap_sprites,0,0);
- bitmap_fill(state->m_temp_bitmap_sprites_pri,0,0);
+ state->m_temp_bitmap_tilemaps->fill(0);
+ state->m_temp_bitmap_sprites->fill(0);
+ state->m_temp_bitmap_sprites_pri->fill(0);
tilemap_set_transparent_pen(state->m_tx_tilemap,0);
tilemap_set_transparent_pen(state->m_bg_tilemap,0);
@@ -392,17 +392,17 @@ SCREEN_UPDATE( ms32 )
tilemap_set_scrolly(state->m_bg_tilemap_alt, 0, scrolly);
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
+ screen.machine().priority_bitmap->fill(0, *cliprect);
/* TODO: 0 is correct for gametngk, but break f1superb scrolling grid (text at
top and bottom of the screen becomes black on black) */
- bitmap_fill(state->m_temp_bitmap_tilemaps,cliprect,0); /* bg color */
+ state->m_temp_bitmap_tilemaps->fill(0, *cliprect); /* bg color */
/* clear our sprite bitmaps */
- bitmap_fill(state->m_temp_bitmap_sprites,cliprect,0);
- bitmap_fill(state->m_temp_bitmap_sprites_pri,cliprect,0);
+ 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);
@@ -485,15 +485,15 @@ SCREEN_UPDATE( ms32 )
UINT32* dstptr_bitmap;
- bitmap_fill(bitmap,cliprect,0);
+ bitmap->fill(0, *cliprect);
for (yy=0;yy<height;yy++)
{
- srcptr_tile = BITMAP_ADDR16(state->m_temp_bitmap_tilemaps, yy, 0);
- srcptr_tilepri = BITMAP_ADDR8(screen.machine().priority_bitmap, yy, 0);
- srcptr_spri = BITMAP_ADDR16(state->m_temp_bitmap_sprites, yy, 0);
- //srcptr_spripri = BITMAP_ADDR8(state->m_temp_bitmap_sprites_pri, yy, 0);
- dstptr_bitmap = BITMAP_ADDR32(bitmap, yy, 0);
+ srcptr_tile = &state->m_temp_bitmap_tilemaps->pix16(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);
for (xx=0;xx<width;xx++)
{
UINT16 src_tile = srcptr_tile[xx];
diff --git a/src/mame/video/mw8080bw.c b/src/mame/video/mw8080bw.c
index 68f04e5bf4c..4582966506e 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_ADDR32(bitmap, 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_ADDR32(bitmap, 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_ADDR32(bitmap, 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_ADDR32(bitmap, 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_ADDR32(bitmap, 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_ADDR32(bitmap, 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_ADDR32(bitmap, 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_ADDR32(bitmap, 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_ADDR32(bitmap, 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_ADDR32(bitmap, 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/n64.c b/src/mame/video/n64.c
index 8f07f9aab3d..4a24b0889cb 100644
--- a/src/mame/video/n64.c
+++ b/src/mame/video/n64.c
@@ -124,7 +124,7 @@ void Processor::VideoUpdate16(bitmap_t *bitmap)
{
for(int j = 0; j < vres; j++)
{
- UINT32 *d = BITMAP_ADDR32(bitmap, j, 0);
+ UINT32 *d = &bitmap->pix32(j);
for(int i = 0; i < hres; i++)
{
@@ -250,7 +250,7 @@ void Processor::VideoUpdate32(bitmap_t *bitmap)
{
for (int j = 0; j < vres; j++)
{
- UINT32 *d = BITMAP_ADDR32(bitmap, j, 0);
+ 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_ADDR32(bitmap, j, 0);
+ 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/n8080.c b/src/mame/video/n8080.c
index 76c38c51dd4..f048c60eb24 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_ADDR16(bitmap, y ^ mask, 0);
+ 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_ADDR16(bitmap, y ^ mask, 0);
+ 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_ADDR16(bitmap, y, 0);
+ 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 499c2e9a1fd..54480da7fdf 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( bitmap, cliprect , get_black_pen(screen.machine()));
+ 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 411c7481e83..403577f7d02 100644
--- a/src/mame/video/namcona1.c
+++ b/src/mame/video/namcona1.c
@@ -399,8 +399,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 = BITMAP_ADDR16(dest_bmp, y, 0);
- UINT8 *pri = BITMAP_ADDR8(machine.priority_bitmap, y, 0);
+ 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++ )
@@ -605,8 +605,8 @@ static void draw_background(running_machine &machine, bitmap_t *bitmap, const re
* feature, Numan Athletics.
*/
draw_pixel_line(
- BITMAP_ADDR16(bitmap, line, 0),
- BITMAP_ADDR8(machine.priority_bitmap, line, 0),
+ &bitmap->pix16(line),
+ &machine.priority_bitmap->pix8(line),
videoram + ydata + 25,
paldata );
}
@@ -677,9 +677,9 @@ SCREEN_UPDATE( namcona1 )
}
}
- bitmap_fill( screen.machine().priority_bitmap,cliprect ,0);
+ screen.machine().priority_bitmap->fill(0, *cliprect );
- bitmap_fill( bitmap, cliprect , 0xff); /* 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 38b91ebda2f..7c2c4d32118 100644
--- a/src/mame/video/namconb1.c
+++ b/src/mame/video/namconb1.c
@@ -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( bitmap, cliprect , get_black_pen(screen.machine()));
+ 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( bitmap, cliprect , get_black_pen(screen.machine()));
+ 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 714849fe4cc..0973f27b8c6 100644
--- a/src/mame/video/namcos1.c
+++ b/src/mame/video/namcos1.c
@@ -383,7 +383,7 @@ SCREEN_UPDATE( namcos1 )
/* background color */
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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 )
}
- bitmap_fill(screen.machine().priority_bitmap, &new_clip, 0);
+ 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 e5144489bd1..6865cd84f1b 100644
--- a/src/mame/video/namcos2.c
+++ b/src/mame/video/namcos2.c
@@ -82,8 +82,8 @@ DrawRozHelperBlock(const struct RozParam *rozInfo, int destx, int desty,
int end_incrx = rozInfo->incyx - (width * rozInfo->incxx);
int end_incry = rozInfo->incyy - (width * rozInfo->incxy);
- UINT16 *dest = BITMAP_ADDR16(destbitmap, 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 (*BITMAP_ADDR8(flagsbitmap, ypos, xpos) & TILEMAP_PIXEL_LAYER0)
+ if (flagsbitmap->pix8(ypos, xpos) & TILEMAP_PIXEL_LAYER0)
{
- *dest = *BITMAP_ADDR16(srcbitmap, ypos, xpos) + rozInfo->color;
+ *dest = srcbitmap->pix16(ypos, xpos) + rozInfo->color;
}
L_SkipPixel:
@@ -130,7 +130,7 @@ DrawRozHelper(
{
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
@@ -457,7 +457,7 @@ ApplyClip( rectangle *clip, const rectangle *cliprect )
clip->min_y = GetPaletteRegister(2) - 0x21;
clip->max_y = GetPaletteRegister(3) - 0x21 - 1;
/* intersect with master clip rectangle */
- sect_rect(clip, cliprect);
+ *clip &= *cliprect;
} /* ApplyClip */
SCREEN_UPDATE( namcos2_default )
@@ -466,7 +466,7 @@ SCREEN_UPDATE( namcos2_default )
int pri;
UpdatePalette(screen.machine());
- bitmap_fill( bitmap, cliprect , get_black_pen(screen.machine()));
+ 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( bitmap, cliprect , get_black_pen(screen.machine()));
+ 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( bitmap, cliprect , get_black_pen(screen.machine()));
+ 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( bitmap, cliprect , get_black_pen(screen.machine()));
+ 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( bitmap, cliprect , get_black_pen(screen.machine()));
+ 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 04afa95a7e3..30de19d9bf2 100644
--- a/src/mame/video/namcos21.c
+++ b/src/mame/video/namcos21.c
@@ -104,7 +104,7 @@ CopyVisiblePolyFrameBuffer( running_machine &machine, bitmap_t *bitmap, const re
int sy;
for( sy=clip->min_y; sy<=clip->max_y; sy++ )
{
- UINT16 *dest = BITMAP_ADDR16(bitmap, sy, 0);
+ 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( bitmap, cliprect , 0xff);
+ 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_ADDR16(bitmap, sy, 0);
+ 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 c6e2b863e80..b1395226c6f 100644
--- a/src/mame/video/namcos22.c
+++ b/src/mame/video/namcos22.c
@@ -407,8 +407,8 @@ static void renderscanline_uvi_full(void *destbase, INT32 scanline, const poly_e
int penmask = 0xff;
int penshift = 0;
int prioverchar = extra->prioverchar;
- UINT32 *dest = BITMAP_ADDR32(destmap, scanline, 0);
- UINT8 *primap = BITMAP_ADDR8(extra->priority_bitmap, scanline, 0);
+ UINT32 *dest = &destmap->pix32(scanline);
+ UINT8 *primap = &extra->priority_bitmap->pix8(scanline);
int x;
if (extra->cmode & 4)
@@ -744,8 +744,8 @@ static void renderscanline_sprite(void *destbase, INT32 scanline, const poly_ext
rgbint fogColor = extra->fogColor;
rgbint fadeColor = extra->fadeColor;
UINT8 *source = (UINT8 *)extra->source + y_index * extra->line_modulo;
- UINT32 *dest = BITMAP_ADDR32(destmap, scanline, 0);
- UINT8 *primap = BITMAP_ADDR8(extra->priority_bitmap, scanline, 0);
+ UINT32 *dest = &destmap->pix32(scanline);
+ UINT8 *primap = &extra->priority_bitmap->pix8(scanline);
int x;
for( x=extent->startx; x<extent->stopx; x++ )
@@ -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_ADDR32(bitmap, y, 0);
- 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_ADDR32(bitmap, y, 0);
- 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];
@@ -1986,9 +1986,9 @@ static void namcos22s_mix_textlayer( running_machine &machine, bitmap_t *bitmap,
// mix textlayer with poly/sprites
for (y=0;y<480;y++)
{
- src = BITMAP_ADDR16(state->m_mix_bitmap, y, 0);
- dest = BITMAP_ADDR32(bitmap, y, 0);
- pri = BITMAP_ADDR8(machine.priority_bitmap, y, 0);
+ src = &state->m_mix_bitmap->pix16(y);
+ dest = &bitmap->pix32(y);
+ pri = &machine.priority_bitmap->pix8(y);
for (x=0;x<640;x++)
{
// skip if transparent or under poly/sprite
@@ -2063,9 +2063,9 @@ static void namcos22_mix_textlayer( running_machine &machine, bitmap_t *bitmap,
// mix textlayer with poly/sprites
for (y=0;y<480;y++)
{
- src = BITMAP_ADDR16(state->m_mix_bitmap, y, 0);
- dest = BITMAP_ADDR32(bitmap, y, 0);
- pri = BITMAP_ADDR8(machine.priority_bitmap, y, 0);
+ src = &state->m_mix_bitmap->pix16(y);
+ dest = &bitmap->pix32(y);
+ pri = &machine.priority_bitmap->pix8(y);
for (x=0;x<640;x++)
{
// skip if transparent or under poly
@@ -2817,7 +2817,7 @@ SCREEN_UPDATE( namcos22s )
UpdateVideoMixer(screen.machine());
UpdatePalette(screen.machine());
namcos22s_recalc_czram(screen.machine());
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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( bitmap, cliprect, rgbint_to_rgb(&bg_color));
+ 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());
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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 efc32c6c0c2..c65b8a353a5 100644
--- a/src/mame/video/namcos86.c
+++ b/src/mame/video/namcos86.c
@@ -376,9 +376,9 @@ SCREEN_UPDATE( namcos86 )
set_scroll(screen.machine(), 2);
set_scroll(screen.machine(), 3);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ screen.machine().priority_bitmap->fill(0, *cliprect);
- bitmap_fill(bitmap,cliprect,screen.machine().gfx[0]->color_base + 8*state->m_backcolor+7);
+ 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 c6df6c4a68e..23fe70286c7 100644
--- a/src/mame/video/naughtyb.c
+++ b/src/mame/video/naughtyb.c
@@ -12,24 +12,6 @@
#include "includes/naughtyb.h"
-static const rectangle scrollvisiblearea =
-{
- 2*8, 34*8-1,
- 0*8, 28*8-1
-};
-
-static const rectangle leftvisiblearea =
-{
- 0*8, 2*8-1,
- 0*8, 28*8-1
-};
-
-static const rectangle rightvisiblearea =
-{
- 34*8, 36*8-1,
- 0*8, 28*8-1
-};
-
static const res_net_decode_info naughtyb_decode_info =
{
2, /* two proms */
@@ -202,6 +184,10 @@ WRITE8_HANDLER( popflame_videoreg_w )
***************************************************************************/
SCREEN_UPDATE( naughtyb )
{
+ const rectangle scrollvisiblearea(2*8, 34*8-1, 0*8, 28*8-1);
+ const rectangle leftvisiblearea(0*8, 2*8-1, 0*8, 28*8-1);
+ const rectangle rightvisiblearea(34*8, 36*8-1, 0*8, 28*8-1);
+
naughtyb_state *state = screen.machine().driver_data<naughtyb_state>();
UINT8 *videoram = state->m_videoram;
int offs;
diff --git a/src/mame/video/nbmj8688.c b/src/mame/video/nbmj8688.c
index 3ce5f347dfe..492cc9f0806 100644
--- a/src/mame/video/nbmj8688.c
+++ b/src/mame/video/nbmj8688.c
@@ -259,7 +259,7 @@ void mjsikaku_vramflip(nbmj8688_state *state)
static void update_pixel(nbmj8688_state *state, int x, int y)
{
int color = state->m_mjsikaku_videoram[(y * 512) + x];
- *BITMAP_ADDR16(state->m_mjsikaku_tmpbitmap, y, x) = color;
+ state->m_mjsikaku_tmpbitmap->pix16(y, x) = color;
}
static void writeram_low(nbmj8688_state *state, int x, int y, int color)
@@ -703,7 +703,7 @@ SCREEN_UPDATE( mbmj8688 )
copybitmap(bitmap, state->m_mjsikaku_tmpbitmap, 0, 0, 0, scrolly - 256, cliprect);
}
else
- bitmap_fill(bitmap, 0, 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_ADDR16(bitmap, 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_ADDR16(bitmap, 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 44e1af5d66e..1c757cb0007 100644
--- a/src/mame/video/nbmj8891.c
+++ b/src/mame/video/nbmj8891.c
@@ -318,14 +318,14 @@ static void update_pixel0(running_machine &machine, int x, int y)
{
nbmj8891_state *state = machine.driver_data<nbmj8891_state>();
UINT8 color = state->m_videoram0[(y * machine.primary_screen->width()) + x];
- *BITMAP_ADDR16(state->m_tmpbitmap0, y, x) = color;
+ state->m_tmpbitmap0->pix16(y, x) = color;
}
static void update_pixel1(running_machine &machine, int x, int y)
{
nbmj8891_state *state = machine.driver_data<nbmj8891_state>();
UINT8 color = state->m_videoram1[(y * machine.primary_screen->width()) + x];
- *BITMAP_ADDR16(state->m_tmpbitmap1, y, x) = (color == 0x7f) ? 0xff : color;
+ state->m_tmpbitmap1->pix16(y, x) = (color == 0x7f) ? 0xff : color;
}
static TIMER_CALLBACK( blitter_timer_callback )
@@ -567,7 +567,7 @@ SCREEN_UPDATE( nbmj8891 )
copyscrollbitmap(bitmap, state->m_tmpbitmap0, 0, 0, 1, &scrolly, cliprect);
}
else
- bitmap_fill(bitmap, 0, 0xff);
+ bitmap->fill(0xff);
return 0;
}
diff --git a/src/mame/video/nbmj8900.c b/src/mame/video/nbmj8900.c
index 2191b589ee6..b42473d9cdb 100644
--- a/src/mame/video/nbmj8900.c
+++ b/src/mame/video/nbmj8900.c
@@ -206,14 +206,14 @@ static void update_pixel0(running_machine &machine, int x, int y)
{
nbmj8900_state *state = machine.driver_data<nbmj8900_state>();
UINT8 color = state->m_videoram0[(y * state->m_screen_width) + x];
- *BITMAP_ADDR16(state->m_tmpbitmap0, y, x) = machine.pens[color];
+ state->m_tmpbitmap0->pix16(y, x) = machine.pens[color];
}
static void update_pixel1(running_machine &machine, int x, int y)
{
nbmj8900_state *state = machine.driver_data<nbmj8900_state>();
UINT8 color = state->m_videoram1[(y * state->m_screen_width) + x];
- *BITMAP_ADDR16(state->m_tmpbitmap1, y, x) = machine.pens[color];
+ state->m_tmpbitmap1->pix16(y, x) = machine.pens[color];
}
static TIMER_CALLBACK( blitter_timer_callback )
@@ -444,7 +444,7 @@ SCREEN_UPDATE( nbmj8900 )
}
else
{
- bitmap_fill(bitmap, 0, 0);
+ bitmap->fill(0);
}
return 0;
}
diff --git a/src/mame/video/nbmj8991.c b/src/mame/video/nbmj8991.c
index 5b89afb5276..7b2cbbe0d59 100644
--- a/src/mame/video/nbmj8991.c
+++ b/src/mame/video/nbmj8991.c
@@ -172,7 +172,7 @@ static void update_pixel(running_machine &machine, int x, int y)
{
nbmj8991_state *state = machine.driver_data<nbmj8991_state>();
UINT8 color = state->m_videoram[(y * machine.primary_screen->width()) + x];
- *BITMAP_ADDR16(state->m_tmpbitmap, y, x) = color;
+ state->m_tmpbitmap->pix16(y, x) = color;
}
static TIMER_CALLBACK( blitter_timer_callback )
@@ -337,7 +337,7 @@ SCREEN_UPDATE( nbmj8991_type1 )
copyscrollbitmap(bitmap, state->m_tmpbitmap, 1, &scrollx, 1, &scrolly, cliprect);
}
else
- bitmap_fill(bitmap, 0, 0);
+ bitmap->fill(0);
return 0;
}
@@ -377,7 +377,7 @@ SCREEN_UPDATE( nbmj8991_type2 )
copyscrollbitmap(bitmap, state->m_tmpbitmap, 1, &scrollx, 1, &scrolly, cliprect);
}
else
- bitmap_fill(bitmap, 0, 0);
+ bitmap->fill(0);
return 0;
}
diff --git a/src/mame/video/nbmj9195.c b/src/mame/video/nbmj9195.c
index f40d9c962cb..f7300a928a1 100644
--- a/src/mame/video/nbmj9195.c
+++ b/src/mame/video/nbmj9195.c
@@ -201,7 +201,7 @@ static void update_pixel(running_machine &machine, int vram, int x, int y)
{
nbmj9195_state *state = machine.driver_data<nbmj9195_state>();
UINT16 color = state->m_videoram[vram][(y * machine.primary_screen->width()) + x];
- *BITMAP_ADDR16(state->m_tmpbitmap[vram], y, x) = color;
+ state->m_tmpbitmap[vram]->pix16(y, x) = color;
}
static TIMER_CALLBACK( blitter_timer_callback )
@@ -494,7 +494,7 @@ SCREEN_UPDATE( nbmj9195 )
// nbmj9195 1layer
copyscrollbitmap(bitmap, state->m_tmpbitmap[0], SCANLINE_MAX, state->m_scrollx_raster[0], 1, &scrolly[0], cliprect);
else
- bitmap_fill(bitmap, 0, 0x0ff);
+ bitmap->fill(0x0ff);
if (state->m_dispflag[1])
{
diff --git a/src/mame/video/nemesis.c b/src/mame/video/nemesis.c
index ec488c03482..ce291433a08 100644
--- a/src/mame/video/nemesis.c
+++ b/src/mame/video/nemesis.c
@@ -431,8 +431,8 @@ SCREEN_UPDATE( nemesis )
int offs;
rectangle clip;
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
- bitmap_fill(bitmap, cliprect, 0);
+ 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 60182d7c387..b2f336d2e49 100644
--- a/src/mame/video/neogeo.c
+++ b/src/mame/video/neogeo.c
@@ -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_ADDR32(bitmap, scanline, NEOGEO_HBEND);
+ UINT32 *pixel_addr = &bitmap->pix32(scanline, NEOGEO_HBEND);
int garouoffsets[32];
int banked = state->m_fixed_layer_source && (addr_mask > 0x1ffff);
@@ -540,7 +540,7 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, int scanli
{
int i;
- UINT32 *pixel_addr = BITMAP_ADDR32(bitmap, 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_ADDR32(bitmap, 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(bitmap, cliprect, state->m_pens[0x0fff]);
+ 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 02c2173295a..a5381939c4b 100644
--- a/src/mame/video/ninjakd2.c
+++ b/src/mame/video/ninjakd2.c
@@ -457,13 +457,13 @@ static void erase_sprites(running_machine& machine, bitmap_t* bitmap, const rect
ninjakd2_state *state = machine.driver_data<ninjakd2_state>();
// if sprite overdraw is disabled, clear the sprite framebuffer
if (!state->m_next_sprite_overdraw_enabled)
- bitmap_fill(state->m_sp_bitmap, cliprect, TRANSPARENTCODE);
+ state->m_sp_bitmap->fill(TRANSPARENTCODE, *cliprect);
else
- for (int y = 0; y < state->m_sp_bitmap->height; ++y)
+ for (int y = 0; y < state->m_sp_bitmap->height(); ++y)
{
- for (int x = 0; x < state->m_sp_bitmap->width; ++x)
+ for (int x = 0; x < state->m_sp_bitmap->width(); ++x)
{
- UINT16* const ptr = BITMAP_ADDR16(state->m_sp_bitmap, y, x);
+ UINT16* const ptr = &state->m_sp_bitmap->pix16(y, x);
if ( (*state->m_stencil_compare_function)(*ptr) ) *ptr = TRANSPARENTCODE ;
}
@@ -492,7 +492,7 @@ SCREEN_UPDATE( ninjakd2 )
update_sprites(screen.machine());
state->m_sprites_updated = 1;
- bitmap_fill(bitmap, cliprect, 0);
+ bitmap->fill(0, *cliprect);
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
@@ -509,7 +509,7 @@ SCREEN_UPDATE( robokid )
update_sprites(screen.machine());
state->m_sprites_updated = 1;
- bitmap_fill(bitmap, cliprect, 0);
+ bitmap->fill(0, *cliprect);
tilemap_draw(bitmap, cliprect, state->m_bg0_tilemap, 0, 0);
@@ -530,7 +530,7 @@ SCREEN_UPDATE( omegaf )
update_sprites(screen.machine());
state->m_sprites_updated = 1;
- bitmap_fill(bitmap, cliprect, 0);
+ bitmap->fill(0, *cliprect);
tilemap_draw(bitmap, cliprect, state->m_bg0_tilemap, 0, 0);
diff --git a/src/mame/video/ninjaw.c b/src/mame/video/ninjaw.c
index 3332326bb2f..1d06b3ff50a 100644
--- a/src/mame/video/ninjaw.c
+++ b/src/mame/video/ninjaw.c
@@ -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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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 33bee5fc717..1869614b0b3 100644
--- a/src/mame/video/nitedrvr.c
+++ b/src/mame/video/nitedrvr.c
@@ -49,7 +49,7 @@ 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_ADDR16(bitmap, y, x) = 1;
+ bitmap->pix16(y, x) = 1;
}
return;
diff --git a/src/mame/video/niyanpai.c b/src/mame/video/niyanpai.c
index dd567b8b1a5..ba038f67a23 100644
--- a/src/mame/video/niyanpai.c
+++ b/src/mame/video/niyanpai.c
@@ -170,7 +170,7 @@ static void update_pixel(running_machine &machine, int vram, int x, int y)
{
niyanpai_state *state = machine.driver_data<niyanpai_state>();
UINT16 color = state->m_videoram[vram][(y * machine.primary_screen->width()) + x];
- *BITMAP_ADDR16(state->m_tmpbitmap[vram], y, x) = color;
+ state->m_tmpbitmap[vram]->pix16(y, x) = color;
}
static TIMER_CALLBACK( blitter_timer_callback )
@@ -425,7 +425,7 @@ SCREEN_UPDATE( niyanpai )
if (state->m_dispflag[0])
copyscrollbitmap(bitmap, state->m_tmpbitmap[0], 1, &scrollx[0], 1, &scrolly[0], cliprect);
else
- bitmap_fill(bitmap, 0, 0x00ff);
+ bitmap->fill(0x00ff);
if (state->m_dispflag[1])
copyscrollbitmap_trans(bitmap, state->m_tmpbitmap[1], 1, &scrollx[1], 1, &scrolly[1], cliprect, 0x01ff);
diff --git a/src/mame/video/offtwall.c b/src/mame/video/offtwall.c
index 6a6b022d88f..a7a667e3464 100644
--- a/src/mame/video/offtwall.c
+++ b/src/mame/video/offtwall.c
@@ -104,8 +104,8 @@ SCREEN_UPDATE( offtwall )
for (r = 0; r < rectlist.numrects; r++, rectlist.rect++)
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
- UINT16 *mo = (UINT16 *)mobitmap->base + mobitmap->rowpixels * y;
- UINT16 *pf = (UINT16 *)bitmap->base + bitmap->rowpixels * y;
+ UINT16 *mo = &mobitmap->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/ojankohs.c b/src/mame/video/ojankohs.c
index d81024cadc3..4a57bfe00d3 100644
--- a/src/mame/video/ojankohs.c
+++ b/src/mame/video/ojankohs.c
@@ -252,7 +252,7 @@ WRITE8_HANDLER( ojankoc_videoram_w )
px = x + (i ^ xx);
py = y;
- *BITMAP_ADDR16(state->m_tmpbitmap, py, px) = color;
+ state->m_tmpbitmap->pix16(py, px) = color;
color1 >>= 1;
color2 >>= 1;
diff --git a/src/mame/video/oneshot.c b/src/mame/video/oneshot.c
index 2ac9e12418e..7ba9bfffba9 100644
--- a/src/mame/video/oneshot.c
+++ b/src/mame/video/oneshot.c
@@ -160,7 +160,7 @@ SCREEN_UPDATE( oneshot )
{
oneshot_state *state = screen.machine().driver_data<oneshot_state>();
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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 72bc3881070..afa10adfa85 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;
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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/othldrby.c b/src/mame/video/othldrby.c
index d8dd9815657..fcf6f97ea07 100644
--- a/src/mame/video/othldrby.c
+++ b/src/mame/video/othldrby.c
@@ -201,9 +201,9 @@ SCREEN_UPDATE( othldrby )
}
}
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ screen.machine().priority_bitmap->fill(0, *cliprect);
- bitmap_fill(bitmap, cliprect, 0);
+ 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 e6ddb957d87..af905a2c7bb 100644
--- a/src/mame/video/othunder.c
+++ b/src/mame/video/othunder.c
@@ -211,10 +211,10 @@ SCREEN_UPDATE( othunder )
layer[1] = layer[0] ^ 1;
layer[2] = 2;
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ screen.machine().priority_bitmap->fill(0, *cliprect);
/* Ensure screen blanked even when bottom layer not drawn due to disable bit */
- bitmap_fill(bitmap, cliprect, 0);
+ 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 8705f3644e0..1f06a8e8180 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);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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 7f0ba5b64ab..eae77239bd6 100644
--- a/src/mame/video/pacland.c
+++ b/src/mame/video/pacland.c
@@ -197,7 +197,7 @@ VIDEO_START( pacland )
int color;
state->m_fg_bitmap = machine.primary_screen->alloc_compatible_bitmap();
- bitmap_fill(state->m_fg_bitmap, NULL, 0xffff);
+ state->m_fg_bitmap->fill(0xffff);
state->m_bg_tilemap = tilemap_create(machine, get_bg_tile_info,tilemap_scan_rows,8,8,64,32);
state->m_fg_tilemap = tilemap_create(machine, get_fg_tile_info,tilemap_scan_rows,8,8,64,32);
@@ -353,9 +353,9 @@ static void draw_fg(running_machine &machine, bitmap_t *bitmap, const rectangle
/* 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 = BITMAP_ADDR8(machine.priority_bitmap, y, 0);
- UINT16 *src = BITMAP_ADDR16(state->m_fg_bitmap, y, 0);
- UINT16 *dst = BITMAP_ADDR16(bitmap, y, 0);
+ const UINT8 *pri = &machine.priority_bitmap->pix8(y);
+ UINT16 *src = &state->m_fg_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 */
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0x00);
+ 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 24f5da3398b..51915d8e690 100644
--- a/src/mame/video/pacman.c
+++ b/src/mame/video/pacman.c
@@ -21,13 +21,6 @@
#include "video/resnet.h"
-static const rectangle spritevisiblearea =
-{
- 2*8, 34*8-1,
- 0*8, 28*8-1
-};
-
-
/***************************************************************************
@@ -224,7 +217,7 @@ SCREEN_UPDATE( pacman )
{
pacman_state *state = screen.machine().driver_data<pacman_state>();
if (state->m_bgpriority != 0)
- bitmap_fill(bitmap,cliprect,0);
+ bitmap->fill(0, *cliprect);
else
tilemap_draw(bitmap,cliprect,state->m_bg_tilemap,TILEMAP_DRAW_OPAQUE,0);
@@ -234,8 +227,8 @@ SCREEN_UPDATE( pacman )
UINT8 *spriteram_2 = screen.machine().generic.spriteram2.u8;
int offs;
- rectangle spriteclip = spritevisiblearea;
- sect_rect(&spriteclip, cliprect);
+ rectangle spriteclip(2*8, 34*8-1, 0*8, 28*8-1);
+ spriteclip &= *cliprect;
/* Draw the sprites. Note that it is important to draw them exactly in this */
/* order, to have the correct priorities. */
diff --git a/src/mame/video/paradise.c b/src/mame/video/paradise.c
index 4b90b89697a..7e8b3952be0 100644
--- a/src/mame/video/paradise.c
+++ b/src/mame/video/paradise.c
@@ -149,8 +149,8 @@ WRITE8_HANDLER( paradise_pixmap_w )
x = (offset & 0x7f) << 1;
y = (offset >> 7);
- *BITMAP_ADDR16(state->m_tmpbitmap, y, x + 0) = 0x80f - (data >> 4);
- *BITMAP_ADDR16(state->m_tmpbitmap, y, x + 1) = 0x80f - (data & 0x0f);
+ state->m_tmpbitmap->pix16(y, x + 0) = 0x80f - (data >> 4);
+ state->m_tmpbitmap->pix16(y, x + 1) = 0x80f - (data & 0x0f);
}
@@ -259,7 +259,7 @@ if (screen.machine().input().code_pressed(KEYCODE_Z))
}
#endif
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
if (!(state->m_priority & 4)) /* Screen blanking */
return 0;
@@ -296,7 +296,7 @@ SCREEN_UPDATE( torus )
{
paradise_state *state = screen.machine().driver_data<paradise_state>();
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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 06124126997..117c8f6613d 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);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
- bitmap_fill(bitmap, cliprect, 16 * bg_colorbase);
+ 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 b8631e3a111..7e7cc2d6d6e 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_ADDR16(bitmap, y, x) = state->m_videoram[(y * width) + x];
+ bitmap->pix16(y, x) = state->m_videoram[(y * width) + x];
}
else
- bitmap_fill(bitmap, cliprect, 0);
+ bitmap->fill(0, *cliprect);
return 0;
}
diff --git a/src/mame/video/pgm.c b/src/mame/video/pgm.c
index dee4aea1265..48e5b7a571a 100644
--- a/src/mame/video/pgm.c
+++ b/src/mame/video/pgm.c
@@ -159,7 +159,7 @@ static void draw_sprite_new_zoomed( running_machine &machine, int wide, int high
if ((ydrawpos >= 0) && (ydrawpos < 224))
{
- dest = BITMAP_ADDR32(bitmap, ydrawpos, 0);
+ 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_ADDR32(bitmap, ydrawpos, 0);
+ 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_ADDR32(bitmap, ydrawpos, 0);
+ dest = &bitmap->pix32(ydrawpos);
draw_sprite_line(machine, wide, dest, xzoom, xgrow, yoffset, flip, xpos, pri);
}
ycntdraw++;
@@ -367,8 +367,8 @@ SCREEN_UPDATE( pgm )
pgm_state *state = screen.machine().driver_data<pgm_state>();
int y;
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
- bitmap_fill(state->m_tmppgmbitmap, cliprect, 0x00000000);
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
+ state->m_tmppgmbitmap->fill(0x00000000, *cliprect);
draw_sprites(screen.machine(), state->m_tmppgmbitmap, state->m_spritebufferram);
@@ -382,8 +382,8 @@ SCREEN_UPDATE( pgm )
for (y = 0; y < 224; y++)
{
- UINT32* src = BITMAP_ADDR32(state->m_tmppgmbitmap, y, 0);
- UINT16* dst = BITMAP_ADDR16(bitmap, y, 0);
+ UINT32* src = &state->m_tmppgmbitmap->pix32(y);
+ UINT16* dst = &bitmap->pix16(y);
for (x = 0; x < 448; x++)
{
@@ -400,8 +400,8 @@ SCREEN_UPDATE( pgm )
for (y = 0; y < 224; y++)
{
- UINT32* src = BITMAP_ADDR32(state->m_tmppgmbitmap, y, 0);
- UINT16* dst = BITMAP_ADDR16(bitmap, y, 0);
+ UINT32* src = &state->m_tmppgmbitmap->pix32(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 7e3dd847eb0..5aee0663307 100644
--- a/src/mame/video/pingpong.c
+++ b/src/mame/video/pingpong.c
@@ -11,17 +11,6 @@
-/* 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 */
-/* the characters at the top and bottom of the screen. */
-static const rectangle spritevisiblearea =
-{
- 0*8, 32*8-1,
- 4*8, 29*8-1
-};
-
-
-
/***************************************************************************
Convert the color PROMs into a more useable format.
@@ -126,6 +115,11 @@ VIDEO_START( pingpong )
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 */
+ /* the characters at the top and bottom of the screen. */
+ const rectangle spritevisiblearea(0*8, 32*8-1, 4*8, 29*8-1);
+
pingpong_state *state = machine.driver_data<pingpong_state>();
UINT8 *spriteram = state->m_spriteram;
int offs;
diff --git a/src/mame/video/pitnrun.c b/src/mame/video/pitnrun.c
index 0e9697a672b..0fc45ed8b26 100644
--- a/src/mame/video/pitnrun.c
+++ b/src/mame/video/pitnrun.c
@@ -116,7 +116,7 @@ static void pitnrun_spotlights(running_machine &machine)
datapix=ROM[128*16*i+x+y*16];
for(b=0;b<8;b++)
{
- *BITMAP_ADDR16(state->m_tmp_bitmap[i], y, x*8+(7-b)) = (datapix&1);
+ state->m_tmp_bitmap[i]->pix16(y, x*8+(7-b)) = (datapix&1);
datapix>>=1;
}
}
@@ -244,7 +244,7 @@ SCREEN_UPDATE( pitnrun )
}
#endif
- bitmap_fill(bitmap,cliprect,0);
+ bitmap->fill(0, *cliprect);
if(!(state->m_ha&4))
tilemap_draw(bitmap,cliprect,state->m_bg, 0,0);
diff --git a/src/mame/video/pk8000.c b/src/mame/video/pk8000.c
index 0563d95647d..61aed66e68b 100644
--- a/src/mame/video/pk8000.c
+++ b/src/mame/video/pk8000.c
@@ -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(bitmap, &my_rect, (pk8000_video_color >> 4) & 0x0f);
+ 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_ADDR16(bitmap, (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_ADDR16(bitmap, (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_ADDR16(bitmap, (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(bitmap, &my_rect, 0);
+ bitmap->fill(0, my_rect);
}
return 0;
}
diff --git a/src/mame/video/pktgaldx.c b/src/mame/video/pktgaldx.c
index 4b2e6d4330f..b01305b07b6 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(bitmap, cliprect, 0); /* not Confirmed */
- bitmap_fill(screen.machine().priority_bitmap, NULL, 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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 bcda758484f..33c4e350789 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(bitmap, cliprect, 0);
+ 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(bitmap, cliprect, 0);
+ bitmap->fill(0, *cliprect);
return 0;
}
diff --git a/src/mame/video/playmark.c b/src/mame/video/playmark.c
index 117ebd7f160..3a0dcd1dbe0 100644
--- a/src/mame/video/playmark.c
+++ b/src/mame/video/playmark.c
@@ -495,9 +495,9 @@ static void draw_bitmap( running_machine &machine, bitmap_t *bitmap, const recta
{
if (state->m_bg_full_size)
{
- *BITMAP_ADDR16(bitmap, (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 = BITMAP_ADDR8(machine.priority_bitmap, (y + state->m_bgscrolly) & 0x1ff, 0);
+ 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_ADDR16(bitmap, (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 = BITMAP_ADDR8(machine.priority_bitmap, (y / 2 + state->m_bgscrolly) & 0x1ff, 0);
+ 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>();
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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>();
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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);
}
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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>();
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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 9d76f0f4c45..b153676f4b9 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");
- bitmap_fill(screen.machine().priority_bitmap, NULL, 0);
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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/polepos.c b/src/mame/video/polepos.c
index 9a97ad2cf6c..ca21a6be6aa 100644
--- a/src/mame/video/polepos.c
+++ b/src/mame/video/polepos.c
@@ -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_ADDR16(bitmap, yy, xx) = pen + coloroffs;
+ bitmap->pix16(yy, xx) = pen + coloroffs;
}
offs++;
diff --git a/src/mame/video/poolshrk.c b/src/mame/video/poolshrk.c
index 510de897211..38e9cc28aa7 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(bitmap, cliprect, 0);
+ bitmap->fill(0, *cliprect);
/* draw sprites */
diff --git a/src/mame/video/popeye.c b/src/mame/video/popeye.c
index 2af124d1c4e..474cd63737a 100644
--- a/src/mame/video/popeye.c
+++ b/src/mame/video/popeye.c
@@ -202,7 +202,7 @@ WRITE8_HANDLER( popeye_bitmap_w )
{
for (x = 0; x < 8; x++)
{
- *BITMAP_ADDR16(state->m_tmpbitmap2, sy+y, sx+x) = colour;
+ state->m_tmpbitmap2->pix16(sy+y, sx+x) = colour;
}
}
}
@@ -219,7 +219,7 @@ WRITE8_HANDLER( popeye_bitmap_w )
{
for (x = 0; x < 8; x++)
{
- *BITMAP_ADDR16(state->m_tmpbitmap2, sy+y, sx+x) = colour;
+ state->m_tmpbitmap2->pix16(sy+y, sx+x) = colour;
}
}
}
@@ -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(bitmap,cliprect,0);
+ bitmap->fill(0, *cliprect);
else
{
/* copy the background graphics */
diff --git a/src/mame/video/popper.c b/src/mame/video/popper.c
index e59bc9ca0d8..e9533092350 100644
--- a/src/mame/video/popper.c
+++ b/src/mame/video/popper.c
@@ -250,7 +250,7 @@ SCREEN_UPDATE( popper )
{
popper_state *state = screen.machine().driver_data<popper_state>();
rectangle finalclip = state->m_tilemap_clip;
- sect_rect(&finalclip, cliprect);
+ finalclip &= *cliprect;
//attribram
//76543210
diff --git a/src/mame/video/powerins.c b/src/mame/video/powerins.c
index 85a386c0f2f..89a587b59d8 100644
--- a/src/mame/video/powerins.c
+++ b/src/mame/video/powerins.c
@@ -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(bitmap,cliprect,0);
+ 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 97a8b9c0cb5..9a5cedc9753 100644
--- a/src/mame/video/ppu2c0x.c
+++ b/src/mame/video/ppu2c0x.c
@@ -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 = ((UINT16 *) bitmap->base) + (bitmap->rowpixels * 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 = ((UINT16 *) bitmap->base) + (bitmap->rowpixels * scanline);
+ dest = &bitmap->pix16(scanline);
for (i = 0; i < 8; i++)
{
*(dest++) = back_pen;
@@ -652,7 +652,7 @@ static void draw_sprites( device_t *device, UINT8 *line_priority )
{
/* no, draw */
if ((sprite_xpos + pixel) < VISIBLE_SCREEN_WIDTH)
- *BITMAP_ADDR16(bitmap, 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_ADDR16(bitmap, scanline, sprite_xpos + pixel) = paldata[pixel_data];
+ bitmap->pix16(scanline, sprite_xpos + pixel) = paldata[pixel_data];
line_priority[sprite_xpos + pixel] |= 0x01;
}
}
@@ -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_ADDR16(bitmap, 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 */
@@ -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_ADDR16(bitmap, scanline, i) = back_pen;
+ for (i = 0; i < bitmap->width(); i++)
+ bitmap->pix16(scanline, i) = back_pen;
}
/* increment the fine y-scroll */
@@ -1228,7 +1228,7 @@ int ppu2c0x_get_pixel( device_t *device, int x, int y )
if (y >= VISIBLE_SCREEN_HEIGHT)
y = VISIBLE_SCREEN_HEIGHT - 1;
- return *BITMAP_ADDR16(ppu2c0x->bitmap, y, x);
+ return ppu2c0x->bitmap->pix16(y, x);
}
int ppu2c0x_get_colorbase( device_t *device )
diff --git a/src/mame/video/psikyo.c b/src/mame/video/psikyo.c
index 8fe3c599d9f..2d827255378 100644
--- a/src/mame/video/psikyo.c
+++ b/src/mame/video/psikyo.c
@@ -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(bitmap, cliprect, get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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(bitmap,cliprect,get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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 1930e058451..c990e013ad0 100644
--- a/src/mame/video/psikyo4.c
+++ b/src/mame/video/psikyo4.c
@@ -129,14 +129,14 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
SCREEN_UPDATE( psikyo4_left )
{
- bitmap_fill(bitmap, cliprect, 0x1000);
+ bitmap->fill(0x1000, *cliprect);
draw_sprites(screen.machine(), bitmap, cliprect, 0x0000);
return 0;
}
SCREEN_UPDATE( psikyo4_right )
{
- bitmap_fill(bitmap, cliprect, 0x1001);
+ 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 6853ceee057..e7a3cb6c948 100644
--- a/src/mame/video/psikyosh.c
+++ b/src/mame/video/psikyosh.c
@@ -153,7 +153,7 @@ static void draw_scanline32_alpha(bitmap_t *bitmap, INT32 destx, INT32 desty, IN
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);
}
@@ -168,8 +168,8 @@ static void draw_scanline32_argb(bitmap_t *bitmap, INT32 destx, INT32 desty, INT
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);
}
@@ -184,8 +184,8 @@ static void draw_scanline32_transpen(bitmap_t *bitmap, INT32 destx, INT32 desty,
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);
}
@@ -205,8 +205,8 @@ static void drawgfx_alphastore(bitmap_t *dest, const rectangle *cliprect, const
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);
@@ -260,7 +260,7 @@ static void drawgfx_alphatable(bitmap_t *dest, const rectangle *cliprect, const
}
assert(dest != NULL);
- assert(dest->bpp == 32);
+ assert(dest->bpp() == 32);
assert(gfx != NULL);
assert(alphatable != NULL);
@@ -356,11 +356,11 @@ static void cache_bitmap(int scanline, psikyosh_state *state, gfx_element *gfx,
rectangle cliprect;
cliprect.min_x = 0;
- cliprect.max_x = state->m_bg_bitmap->width - 1;
+ cliprect.max_x = state->m_bg_bitmap->width() - 1;
cliprect.min_y = sy * 16;
cliprect.max_y = cliprect.min_y + 16 - 1;
- bitmap_fill(state->m_bg_bitmap, &cliprect, BG_TRANSPEN);
+ state->m_bg_bitmap->fill(BG_TRANSPEN, cliprect);
int width = size * 16;
int offs = size * sy;
@@ -547,7 +547,7 @@ 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 */
if (clip)
@@ -556,12 +556,8 @@ static void psikyosh_drawgfxzoom( running_machine &machine,
myclip.max_x = clip->max_x;
myclip.min_y = clip->min_y;
myclip.max_y = clip->max_y;
-
- if (myclip.min_x < 0) myclip.min_x = 0;
- if (myclip.max_x >= dest_bmp->width) myclip.max_x = dest_bmp->width - 1;
- if (myclip.min_y < 0) myclip.min_y = 0;
- if (myclip.max_y >= dest_bmp->height) myclip.max_y = dest_bmp->height-1;
-
+
+ myclip &= dest_bmp->cliprect();
clip = &myclip;
}
@@ -639,10 +635,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 = (UINT32 *)dest_bmp->base + sy * dest_bmp->rowpixels + sx;
- UINT16 *pri = (UINT16 *)state->m_z_bitmap->base + sy * state->m_z_bitmap->rowpixels + 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++)
{
@@ -670,9 +666,9 @@ static void psikyosh_drawgfxzoom( running_machine &machine,
else
{
const UINT8 *source = code_base + y_index * gfx->line_modulo + x_index_base;
- UINT32 *dest = (UINT32 *)dest_bmp->base + sy * dest_bmp->rowpixels + 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++)
{
@@ -698,10 +694,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 = (UINT32 *)dest_bmp->base + sy * dest_bmp->rowpixels + sx;
- UINT16 *pri = (UINT16 *)state->m_z_bitmap->base + sy * state->m_z_bitmap->rowpixels + 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++)
{
@@ -729,9 +725,9 @@ static void psikyosh_drawgfxzoom( running_machine &machine,
else
{
const UINT8 *source = code_base + y_index * gfx->line_modulo + x_index_base;
- UINT32 *dest = (UINT32 *)dest_bmp->base + sy * dest_bmp->rowpixels + 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++)
{
@@ -758,10 +754,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 = (UINT32 *)dest_bmp->base + sy * dest_bmp->rowpixels + sx;
- UINT16 *pri = (UINT16 *)state->m_z_bitmap->base + sy * state->m_z_bitmap->rowpixels + 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++)
{
@@ -793,9 +789,9 @@ static void psikyosh_drawgfxzoom( running_machine &machine,
else
{
const UINT8 *source = code_base + y_index * gfx->line_modulo + x_index_base;
- UINT32 *dest = (UINT32 *)dest_bmp->base + sy * dest_bmp->rowpixels + 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++)
{
@@ -836,7 +832,7 @@ static void psikyosh_drawgfxzoom( running_machine &machine,
for (ypixel = 0; ypixel < gfx->height; ypixel++)
{
const UINT8 *source = code_base + ypixel * gfx->line_modulo;
- UINT8 *dest = BITMAP_ADDR8(state->m_zoom_bitmap, ypixel + ytile*gfx->height, 0);
+ UINT8 *dest = &state->m_zoom_bitmap->pix8(ypixel + ytile*gfx->height);
for (xpixel = 0; xpixel < gfx->width; xpixel++)
{
@@ -914,9 +910,9 @@ static void psikyosh_drawgfxzoom( running_machine &machine,
{
for (y = sy; y < ey; y++)
{
- UINT8 *source = BITMAP_ADDR8(state->m_zoom_bitmap, y_index >> 10, 0);
- UINT32 *dest = BITMAP_ADDR32(dest_bmp, y, 0);
- UINT16 *pri = BITMAP_ADDR16(state->m_z_bitmap, y, 0);
+ UINT8 *source = &state->m_zoom_bitmap->pix8(y_index >> 10);
+ UINT32 *dest = &dest_bmp->pix32(y);
+ UINT16 *pri = &state->m_z_bitmap->pix16(y);
int x, x_index = x_index_base;
for (x = sx; x < ex; x++)
@@ -940,8 +936,8 @@ static void psikyosh_drawgfxzoom( running_machine &machine,
{
for (y = sy; y < ey; y++)
{
- UINT8 *source = BITMAP_ADDR8(state->m_zoom_bitmap, y_index >> 10, 0);
- UINT32 *dest = BITMAP_ADDR32(dest_bmp, y, 0);
+ UINT8 *source = &state->m_zoom_bitmap->pix8(y_index >> 10);
+ UINT32 *dest = &dest_bmp->pix32(y);
int x, x_index = x_index_base;
for (x = sx; x < ex; x++)
@@ -964,9 +960,9 @@ static void psikyosh_drawgfxzoom( running_machine &machine,
{
for (y = sy; y < ey; y++)
{
- UINT8 *source = BITMAP_ADDR8(state->m_zoom_bitmap, y_index >> 10, 0);
- UINT32 *dest = BITMAP_ADDR32(dest_bmp, y, 0);
- UINT16 *pri = BITMAP_ADDR16(state->m_z_bitmap, y, 0);
+ UINT8 *source = &state->m_zoom_bitmap->pix8(y_index >> 10);
+ UINT32 *dest = &dest_bmp->pix32(y);
+ UINT16 *pri = &state->m_z_bitmap->pix16(y);
int x, x_index = x_index_base;
for (x = sx; x < ex; x++)
@@ -990,8 +986,8 @@ static void psikyosh_drawgfxzoom( running_machine &machine,
{
for (y = sy; y < ey; y++)
{
- UINT8 *source = BITMAP_ADDR8(state->m_zoom_bitmap, y_index >> 10, 0);
- UINT32 *dest = BITMAP_ADDR32(dest_bmp, y, 0);
+ UINT8 *source = &state->m_zoom_bitmap->pix8(y_index >> 10);
+ UINT32 *dest = &dest_bmp->pix32(y);
int x, x_index = x_index_base;
for (x = sx; x < ex; x++)
@@ -1013,9 +1009,9 @@ static void psikyosh_drawgfxzoom( running_machine &machine,
{
for (y = sy; y < ey; y++)
{
- UINT8 *source = BITMAP_ADDR8(state->m_zoom_bitmap, y_index >> 10, 0);
- UINT32 *dest = BITMAP_ADDR32(dest_bmp, y, 0);
- UINT16 *pri = BITMAP_ADDR16(state->m_z_bitmap, y, 0);
+ UINT8 *source = &state->m_zoom_bitmap->pix8(y_index >> 10);
+ UINT32 *dest = &dest_bmp->pix32(y);
+ UINT16 *pri = &state->m_z_bitmap->pix16(y);
int x, x_index = x_index_base;
for (x = sx; x < ex; x++)
@@ -1043,8 +1039,8 @@ static void psikyosh_drawgfxzoom( running_machine &machine,
{
for (y = sy; y < ey; y++)
{
- UINT8 *source = BITMAP_ADDR8(state->m_zoom_bitmap, y_index >> 10, 0);
- UINT32 *dest = BITMAP_ADDR32(dest_bmp, y, 0);
+ UINT8 *source = &state->m_zoom_bitmap->pix8(y_index >> 10);
+ UINT32 *dest = &dest_bmp->pix32(y);
int x, x_index = x_index_base;
for (x = sx; x < ex; x++)
@@ -1204,12 +1200,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_ADDR32(bitmap, y, 0);
+ dstline = &bitmap->pix32(y);
/* linefill[y] & 0xff does what? */
for (x = cliprect->min_x; x <= cliprect->max_x; x += 1)
@@ -1228,7 +1224,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;
@@ -1237,7 +1233,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_ADDR32(bitmap, y, 0);
+ dstline = &bitmap->pix32(y);
if (lineblend[y] & 0x80) /* solid */
{
@@ -1325,7 +1321,7 @@ popmessage ("%08x %08x %08x %08x\n%08x %08x %08x %08x",
state->m_vidregs[6], state->m_vidregs[7]);
#endif
- bitmap_fill(state->m_z_bitmap, cliprect, 0); /* z-buffer */
+ state->m_z_bitmap->fill(0, *cliprect); /* z-buffer */
psikyosh_prelineblend(screen.machine(), bitmap, cliprect); // fills screen
for (i = 0; i <= 7; i++)
diff --git a/src/mame/video/psychic5.c b/src/mame/video/psychic5.c
index cf384fea2b6..8c01ab22ee2 100644
--- a/src/mame/video/psychic5.c
+++ b/src/mame/video/psychic5.c
@@ -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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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(bitmap, cliprect, screen.machine().pens[0x0ff]);
+ 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/qdrmfgp.c b/src/mame/video/qdrmfgp.c
index 9ddef8c7756..b9a7b232ea8 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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 04974aaf67c..116195554fa 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_ADDR32(bitmap, y, 0);
+ 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 0a1929023ef..14ac31bb22d 100644
--- a/src/mame/video/quasar.c
+++ b/src/mame/video/quasar.c
@@ -124,7 +124,7 @@ SCREEN_UPDATE( quasar )
for (ox = 0; ox < 8; ox++)
for (oy = 0; oy < 8; oy++)
- *BITMAP_ADDR16(bitmap, y + oy, x + ox) = forecolor;
+ bitmap->pix16(y + oy, x + ox) = forecolor;
/* Main Screen */
drawgfx_transpen(bitmap,cliprect,screen.machine().gfx[0],
@@ -161,10 +161,10 @@ SCREEN_UPDATE( quasar )
int bx = 255 - 9 - state->m_bullet_ram[offs] - ct;
/* bullet/object Collision */
- if (*BITMAP_ADDR16(s2636_0_bitmap, offs, bx) != 0) state->m_collision_register |= 0x04;
- if (*BITMAP_ADDR16(s2636_2_bitmap, 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_ADDR16(bitmap, offs, bx) = 7;
+ bitmap->pix16(offs, bx) = 7;
}
}
}
@@ -180,18 +180,18 @@ SCREEN_UPDATE( quasar )
for (x = cliprect->min_x; x <= cliprect->max_x; x++)
{
- int pixel0 = *BITMAP_ADDR16(s2636_0_bitmap, y, x);
- int pixel1 = *BITMAP_ADDR16(s2636_1_bitmap, y, x);
- int pixel2 = *BITMAP_ADDR16(s2636_2_bitmap, 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_ADDR16(bitmap, 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, *BITMAP_ADDR16(state->m_collision_background, y, x)))
+ if (colortable_entry_get_value(screen.machine().colortable, state->m_collision_background->pix16(y, x)))
{
if (S2636_IS_PIXEL_DRAWN(pixel0)) state->m_collision_register |= 0x01;
if (S2636_IS_PIXEL_DRAWN(pixel2)) state->m_collision_register |= 0x02;
diff --git a/src/mame/video/quizdna.c b/src/mame/video/quizdna.c
index 38096c60127..74d0315b752 100644
--- a/src/mame/video/quizdna.c
+++ b/src/mame/video/quizdna.c
@@ -202,6 +202,6 @@ SCREEN_UPDATE( quizdna )
tilemap_draw(bitmap, cliprect, state->m_fg_tilemap, 0, 0);
}
else
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
return 0;
}
diff --git a/src/mame/video/rainbow.c b/src/mame/video/rainbow.c
index 9bbcfec68ae..01cee8bc041 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;
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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;
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
+ 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 0a47f52dfa9..9076b4bccd8 100644
--- a/src/mame/video/rallyx.c
+++ b/src/mame/video/rallyx.c
@@ -458,8 +458,8 @@ 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_ADDR16(bitmap, y, x) % 0x144) == 0)
- *BITMAP_ADDR16(bitmap, 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 )
@@ -646,7 +646,7 @@ SCREEN_UPDATE( rallyx )
fg_clip.min_x = 28 * 8;
}
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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;
}
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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;
}
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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 2776a92a4be..cdec54c7167 100644
--- a/src/mame/video/rampart.c
+++ b/src/mame/video/rampart.c
@@ -86,8 +86,8 @@ SCREEN_UPDATE( rampart )
for (r = 0; r < rectlist.numrects; r++, rectlist.rect++)
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
- UINT16 *mo = (UINT16 *)mobitmap->base + mobitmap->rowpixels * y;
- UINT16 *pf = (UINT16 *)bitmap->base + bitmap->rowpixels * y;
+ UINT16 *mo = &mobitmap->pix16(y);
+ UINT16 *pf = &bitmap->pix16(y);
for (x = rectlist.rect->min_x; x <= rectlist.rect->max_x; x++)
if (mo[x])
{
@@ -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_ADDR16(bitmap, y, 0);
+ 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 b742139aabe..63315c20622 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;
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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 abfcb1db07a..281483c801c 100644
--- a/src/mame/video/realbrk.c
+++ b/src/mame/video/realbrk.c
@@ -300,8 +300,8 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectan
// buffer the tile and rotate it into bitmap
if( rot )
{
- bitmap_fill( state->m_tmpbitmap0, &spritetile_clip , 0);
- bitmap_fill( state->m_tmpbitmap1, &spritetile_clip , 0);
+ state->m_tmpbitmap0->fill(0, spritetile_clip );
+ state->m_tmpbitmap1->fill(0, spritetile_clip );
drawgfxzoom_transpen( state->m_tmpbitmap0,&spritetile_clip,machine.gfx[gfx],
code++,
color,
@@ -522,11 +522,11 @@ if ( screen.machine().input().code_pressed(KEYCODE_Z) )
if (state->m_disable_video)
{
- bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
return 0;
}
else
- bitmap_fill(bitmap,cliprect,state->m_vregs[0xc/2] & 0x7fff);
+ 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(bitmap,cliprect,get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
return 0;
}
else
- bitmap_fill(bitmap,cliprect,state->m_vregs[0xc/2] & 0x7fff);
+ bitmap->fill(state->m_vregs[0xc/2] & 0x7fff, *cliprect);
diff --git a/src/mame/video/redalert.c b/src/mame/video/redalert.c
index ba8b14aacb0..907f1350aa3 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_ADDR32(bitmap, y, x) = pen;
+ bitmap->pix32(y, x) = pen;
else
- *BITMAP_ADDR32(bitmap, 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_ADDR32(bitmap, y ^ 0xff, x ^ 0xff) = pen;
+ bitmap->pix32(y ^ 0xff, x ^ 0xff) = pen;
else
- *BITMAP_ADDR32(bitmap, 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_ADDR32(bitmap, y, x) = pen;
+ bitmap->pix32(y, x) = pen;
else
- *BITMAP_ADDR32(bitmap, 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 4a2b7690866..b817bd2590d 100644
--- a/src/mame/video/redclash.c
+++ b/src/mame/video/redclash.c
@@ -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_ADDR16(bitmap, sy, sx) = 0x19;
+ bitmap->pix16(sy, sx) = 0x19;
}
}
@@ -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_ADDR16(bitmap, 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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 381700962aa..4ff4a73a229 100644
--- a/src/mame/video/relief.c
+++ b/src/mame/video/relief.c
@@ -117,7 +117,7 @@ SCREEN_UPDATE( relief )
int x, y, r;
/* draw the playfield */
- bitmap_fill(priority_bitmap, cliprect, 0);
+ 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);
@@ -126,9 +126,9 @@ SCREEN_UPDATE( relief )
for (r = 0; r < rectlist.numrects; r++, rectlist.rect++)
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
- UINT16 *mo = (UINT16 *)mobitmap->base + mobitmap->rowpixels * y;
- UINT16 *pf = (UINT16 *)bitmap->base + bitmap->rowpixels * y;
- UINT8 *pri = (UINT8 *)priority_bitmap->base + priority_bitmap->rowpixels * y;
+ UINT16 *mo = &mobitmap->pix16(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/retofinv.c b/src/mame/video/retofinv.c
index 233566c3622..35ec561a490 100644
--- a/src/mame/video/retofinv.c
+++ b/src/mame/video/retofinv.c
@@ -176,11 +176,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap)
UINT8 *spriteram_2 = state->m_sharedram + 0x0f80;
UINT8 *spriteram_3 = state->m_sharedram + 0x1780;
int offs;
- static const rectangle spritevisiblearea =
- {
- 2*8, 34*8-1,
- 0*8, 28*8-1
- };
+ const rectangle spritevisiblearea(2*8, 34*8-1, 0*8, 28*8-1);
for (offs = 0;offs < 0x80;offs += 2)
{
diff --git a/src/mame/video/rltennis.c b/src/mame/video/rltennis.c
index 949777316fb..cb962701483 100644
--- a/src/mame/video/rltennis.c
+++ b/src/mame/video/rltennis.c
@@ -123,12 +123,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, NULL);
- bitmap_fill(state->m_tmp_bitmap[BITMAP_FG_1], NULL, 0);
+ 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, NULL);
- bitmap_fill(state->m_tmp_bitmap[BITMAP_FG_2], NULL, 0);
+ state->m_tmp_bitmap[BITMAP_FG_2]->fill(0);
}
}
@@ -214,7 +214,7 @@ WRITE16_HANDLER(rlt_blitter_w)
if((pix || force_blit)&& screen_x >0 && y >0 && screen_x < 512 && y < 256 )
{
- *BITMAP_ADDR16(state->m_tmp_bitmap[layer], y , screen_x ) = pix;
+ state->m_tmp_bitmap[layer]->pix16(y , screen_x ) = pix;
}
}
}
diff --git a/src/mame/video/rohga.c b/src/mame/video/rohga.c
index 7bf62b01a92..7901f31665f 100644
--- a/src/mame/video/rohga.c
+++ b/src/mame/video/rohga.c
@@ -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 */
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
- bitmap_fill(bitmap, cliprect, screen.machine().pens[768]);
+ 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(bitmap, cliprect, screen.machine().pens[512]);
+ 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(bitmap, cliprect, screen.machine().pens[512]);
- bitmap_fill(screen.machine().priority_bitmap, NULL, 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 4bda152e1f2..d59e66f6688 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;
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
- bitmap_fill(bitmap, cliprect, 16 * bg_colorbase);
+ 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 7fd08efffe8..5256a65a245 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(bitmap,cliprect,state->m_ra_bkgpen);
+ 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 4cf4bbcdb1a..4ba46024955 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_ADDR32(bitmap, 255 - y, 255 - x) = pen;
+ bitmap->pix32(255 - y, 255 - x) = pen;
else
- *BITMAP_ADDR32(bitmap, y, x) = pen;
+ bitmap->pix32(y, x) = pen;
x = x + 1;
data1 = data1 >> 1;
@@ -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_ADDR32(bitmap, 255 - y, 255 - x) = pen;
+ bitmap->pix32(255 - y, 255 - x) = pen;
else
- *BITMAP_ADDR32(bitmap, 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 0846b5825b0..8ac080c1b55 100644
--- a/src/mame/video/rpunch.c
+++ b/src/mame/video/rpunch.c
@@ -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_ADDR16(bitmap, y, ((x*4+0)-4)&0x1ff) = coldat+colourbase;
- coldat = (state->m_bitmapram[count]>>8 )&0xf; if (coldat!=15) *BITMAP_ADDR16(bitmap, y, ((x*4+1)-4)&0x1ff) = coldat+colourbase;
- coldat = (state->m_bitmapram[count]>>4 )&0xf; if (coldat!=15) *BITMAP_ADDR16(bitmap, y, ((x*4+2)-4)&0x1ff) = coldat+colourbase;
- coldat = (state->m_bitmapram[count]>>0 )&0xf; if (coldat!=15) *BITMAP_ADDR16(bitmap, 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 9b72af717a5..32a77e55c5d 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(bitmap, cliprect, get_black_pen(screen.machine()));
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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/sega16sp.c b/src/mame/video/sega16sp.c
index b036ba44061..b928e51eba8 100644
--- a/src/mame/video/sega16sp.c
+++ b/src/mame/video/sega16sp.c
@@ -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_ADDR16(bitmap, y, 0);
- UINT8 *pri = BITMAP_ADDR8(machine.priority_bitmap, y, 0);
+ 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 */
@@ -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_ADDR16(bitmap, y, 0);
- UINT8 *pri = BITMAP_ADDR8(machine.priority_bitmap, y, 0);
+ 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 */
@@ -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_ADDR16(bitmap, y, 0);
- UINT8 *pri = BITMAP_ADDR8(machine.priority_bitmap, y, 0);
+ 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 */
@@ -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_ADDR16(bitmap, y, 0);
- UINT8 *pri = BITMAP_ADDR8(machine.priority_bitmap, y, 0);
+ 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 */
@@ -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_ADDR16(bitmap, y, 0);
- UINT8 *pri = BITMAP_ADDR8(machine.priority_bitmap, y, 0);
+ 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 */
@@ -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_ADDR16(bitmap, y, 0);
- UINT8 *pri = BITMAP_ADDR8(machine.priority_bitmap, y, 0);
+ UINT16 *dest = &bitmap->pix16(y);
+ UINT8 *pri = &machine.priority_bitmap->pix8(y);
int xacc = 0;
/* non-flipped case */
@@ -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_ADDR16(bitmap, 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_ADDR16(bitmap, y, 0);
+ 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_ADDR16(bitmap, y, 0); \
- UINT8 *pri = BITMAP_ADDR8(machine.priority_bitmap, y, 0); \
+ 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 */ \
diff --git a/src/mame/video/segag80r.c b/src/mame/video/segag80r.c
index 5fbe00a4343..3a50e7ddba2 100644
--- a/src/mame/video/segag80r.c
+++ b/src/mame/video/segag80r.c
@@ -676,8 +676,8 @@ static void draw_background_spaceod(running_machine &machine, bitmap_t *bitmap,
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 = (UINT16 *)pixmap->base + (effy & ymask) * pixmap->rowpixels;
- UINT16 *dst = (UINT16 *)bitmap->base + y * bitmap->rowpixels;
+ 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++)
@@ -733,14 +733,14 @@ static void draw_background_page_scroll(running_machine &machine, bitmap_t *bitm
segag80r_state *state = machine.driver_data<segag80r_state>();
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(bitmap, cliprect, 0);
+ 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 = (UINT16 *)pixmap->base + (effy & ymask) * pixmap->rowpixels;
- UINT16 *dst = (UINT16 *)bitmap->base + y * bitmap->rowpixels;
+ 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++)
@@ -774,14 +774,14 @@ static void draw_background_full_scroll(running_machine &machine, bitmap_t *bitm
segag80r_state *state = machine.driver_data<segag80r_state>();
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(bitmap, cliprect, 0);
+ 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 = (UINT16 *)pixmap->base + (effy & ymask) * pixmap->rowpixels;
- UINT16 *dst = (UINT16 *)bitmap->base + y * bitmap->rowpixels;
+ 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 538cc057063..32503e33318 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
return 0;
}
/* reset priorities */
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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 70aa9cf4eb1..46b0ba7b75c 100644
--- a/src/mame/video/segaic16.c
+++ b/src/mame/video/segaic16.c
@@ -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_ADDR16(bitmap, y, 0);
+ UINT16 *dest = &bitmap->pix16(y);
int control = roadram[0x000 + y];
int hpos = roadram[0x100 + (control & 0xff)];
int color0 = roadram[0x200 + (control & 0xff)];
@@ -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_ADDR16(bitmap, y, 0);
+ UINT16 *dest = &bitmap->pix16(y);
int data0 = roadram[0x000 + y];
int data1 = roadram[0x100 + y];
@@ -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_ADDR16(bitmap, y, 0);
- UINT16 *src = (UINT16 *)srcbitmap->base;
- UINT8 *pri = BITMAP_ADDR8(machine.priority_bitmap, y, 0);
+ UINT16 *dest = &bitmap->pix16(y);
+ UINT16 *src = &srcbitmap->pix16(0);
+ UINT8 *pri = &machine.priority_bitmap->pix8(y);
INT32 tx = currx;
INT32 ty = curry;
@@ -2059,7 +2059,7 @@ void segaic16_rotate_draw(running_machine &machine, int which, bitmap_t *bitmap,
/* fetch the pixel from the source bitmap */
int sx = (tx >> 14) & 0x1ff;
int sy = (ty >> 14) & 0x1ff;
- int pix = src[sy * srcbitmap->rowpixels + sx];
+ int pix = src[sy * srcbitmap->rowpixels() + sx];
/* non-zero pixels get written; everything else is the scanline color */
if (pix != 0xffff)
diff --git a/src/mame/video/segaic24.c b/src/mame/video/segaic24.c
index f2404ead283..3d4975e9c3e 100644
--- a/src/mame/video/segaic24.c
+++ b/src/mame/video/segaic24.c
@@ -104,15 +104,15 @@ void segas24_tile::draw_rect(bitmap_t *bm, bitmap_t *tm, bitmap_t *dm, const UIN
UINT16 tpri, UINT8 lpri, int win, int sx, int sy, int xx1, int yy1, int xx2, int yy2)
{
int y;
- const UINT16 *source = ((UINT16 *)bm->base) + sx + sy*bm->rowpixels;
- const UINT8 *trans = ((UINT8 *) tm->base) + sx + sy*tm->rowpixels;
- UINT8 *prib = (UINT8 *)machine().priority_bitmap->base;
- UINT16 *dest = (UINT16 *)dm->base;
+ 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;
}
}
@@ -238,14 +238,14 @@ void segas24_tile::draw_rect_rgb(bitmap_t *bm, bitmap_t *tm, bitmap_t *dm, const
UINT16 tpri, UINT8 lpri, int win, int sx, int sy, int xx1, int yy1, int xx2, int yy2)
{
int y;
- const UINT16 *source = ((UINT16 *)bm->base) + sx + sy*bm->rowpixels;
- const UINT8 *trans = ((UINT8 *) tm->base) + sx + sy*tm->rowpixels;
- UINT16 *dest = (UINT16 *)dm->base;
+ 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,9 +339,9 @@ 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;
}
}
@@ -471,7 +471,7 @@ void segas24_tile::draw(bitmap_t *bitmap, const rectangle *cliprect, int layer,
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;
@@ -775,11 +775,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 = BITMAP_ADDR8(machine().priority_bitmap, ypos1, xpos2);
+ UINT8 *pri = &machine().priority_bitmap->pix8(ypos1, xpos2);
if(!(*pri & pm[c])) {
c = colors[c];
if(c) {
- UINT16 *dst = BITMAP_ADDR16(bitmap, ypos1, xpos2);
+ UINT16 *dst = &bitmap->pix16(ypos1, xpos2);
if(c==1)
*dst = (*dst) | 0x2000;
else
diff --git a/src/mame/video/segaorun.c b/src/mame/video/segaorun.c
index 03959285082..a628601322e 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 */
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
return 0;
}
/* reset priorities */
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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 8f4574fc893..63693eaffa7 100644
--- a/src/mame/video/segas16a.c
+++ b/src/mame/video/segas16a.c
@@ -38,12 +38,12 @@ SCREEN_UPDATE( system16a )
/* if no drawing is happening, fill with black and get out */
if (!segaic16_display_enable)
{
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
return 0;
}
/* reset priorities */
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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);
diff --git a/src/mame/video/segas16b.c b/src/mame/video/segas16b.c
index f48748246f4..14c0f59758b 100644
--- a/src/mame/video/segas16b.c
+++ b/src/mame/video/segas16b.c
@@ -50,12 +50,12 @@ SCREEN_UPDATE( system16b )
/* if no drawing is happening, fill with black and get out */
if (!segaic16_display_enable)
{
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
return 0;
}
/* reset priorities */
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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);
diff --git a/src/mame/video/segas18.c b/src/mame/video/segas18.c
index 81a782e6add..369eea7c199 100644
--- a/src/mame/video/segas18.c
+++ b/src/mame/video/segas18.c
@@ -124,9 +124,9 @@ static void draw_vdp(screen_device &screen, bitmap_t *bitmap, const rectangle *c
for (y = cliprect->min_y; y <= cliprect->max_y; y++)
{
- UINT16 *src = BITMAP_ADDR16(state->m_tmp_bitmap, y, 0);
- UINT16 *dst = BITMAP_ADDR16(bitmap, y, 0);
- UINT8 *pri = BITMAP_ADDR8(priority_bitmap, y, 0);
+ UINT16 *src = &state->m_tmp_bitmap->pix16(y);
+ UINT16 *dst = &bitmap->pix16(y);
+ UINT8 *pri = &priority_bitmap->pix8(y);
for (x = cliprect->min_x; x <= cliprect->max_x; x++)
{
@@ -202,7 +202,7 @@ SCREEN_UPDATE( system18 )
/* if no drawing is happening, fill with black and get out */
if (!segaic16_display_enable)
{
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
return 0;
}
@@ -211,7 +211,7 @@ SCREEN_UPDATE( system18 )
system18_vdp_update(state->m_tmp_bitmap, cliprect);
/* reset priorities */
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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 49b140111be..db93acba15e 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(bitmap, 0, get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()));
return 0;
}
- bitmap_fill(screen.machine().priority_bitmap, 0, 0);
- bitmap_fill(bitmap, cliprect, 0);
+ 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 84572f58204..e024a307e65 100644
--- a/src/mame/video/segas32.c
+++ b/src/mame/video/segas32.c
@@ -821,7 +821,7 @@ static int compute_clipping_extents(screen_device &screen, int enable, int clipo
clips[i].min_x = (visarea.max_x + 1) - ((state->m_system32_videoram[0x1ff64/2 + i * 4] & 0x1ff) + 1);
clips[i].min_y = (visarea.max_y + 1) - ((state->m_system32_videoram[0x1ff66/2 + i * 4] & 0x0ff) + 1);
}
- sect_rect(&clips[i], &tempclip);
+ clips[i] &= tempclip;
sorted[i] = i;
}
@@ -986,7 +986,7 @@ 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_ADDR16(bitmap, y, 0);
+ UINT16 *dst = &bitmap->pix16(y);
int clipdraw = clipdraw_start;
/* optimize for the case where we are clipped out */
@@ -999,8 +999,8 @@ static void update_tilemap_zoom(screen_device &screen, struct layer_info *layer,
/* 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] = BITMAP_ADDR16(tm0, (srcy >> 20) & 0xff, 0);
- src[1] = BITMAP_ADDR16(tm1, (srcy >> 20) & 0xff, 0);
+ src[0] = &tm0->pix16((srcy >> 20) & 0xff);
+ src[1] = &tm1->pix16((srcy >> 20) & 0xff);
/* loop over extents */
srcx = srcx_start;
@@ -1112,7 +1112,7 @@ 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_ADDR16(bitmap, y, 0);
+ UINT16 *dst = &bitmap->pix16(y);
int clipdraw = clipdraw_start;
/* optimize for the case where we are clipped out */
@@ -1158,8 +1158,8 @@ 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] = BITMAP_ADDR16(tm0, srcy & 0xff, 0);
- src[1] = BITMAP_ADDR16(tm1, srcy & 0xff, 0);
+ src[0] = &tm0->pix16(srcy & 0xff);
+ src[1] = &tm1->pix16(srcy & 0xff);
/* loop over extents */
while (1)
@@ -1251,7 +1251,7 @@ static void update_tilemap_text(screen_device &screen, struct layer_info *layer,
/* non-flipped case */
if (!flip)
{
- UINT16 *dst = BITMAP_ADDR16(bitmap, y * 8, x * 8);
+ UINT16 *dst = &bitmap->pix16(y * 8, x * 8);
/* loop over rows */
for (iy = 0; iy < 8; iy++)
@@ -1301,7 +1301,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 +1312,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_ADDR16(bitmap, effdsty, effdstx);
+ UINT16 *dst = &bitmap->pix16(effdsty, effdstx);
/* loop over rows */
for (iy = 0; iy < 8; iy++)
@@ -1362,7 +1362,7 @@ static void update_tilemap_text(screen_device &screen, struct layer_info *layer,
pix += color;
dst[-7] = pix;
- dst -= bitmap->rowpixels;
+ dst -= bitmap->rowpixels();
}
}
}
@@ -1405,7 +1405,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_ADDR16(bitmap, y, 0);
+ UINT16 *dst = &bitmap->pix16(y);
int clipdraw = clipdraw_start;
/* optimize for the case where we are clipped out */
@@ -1487,7 +1487,7 @@ static void update_background(segas32_state *state, struct layer_info *layer, co
for (y = cliprect->min_y; y <= cliprect->max_y; y++)
{
- UINT16 *dst = BITMAP_ADDR16(bitmap, y, 0);
+ UINT16 *dst = &bitmap->pix16(y);
int color;
/* determine the color */
@@ -1543,11 +1543,11 @@ static UINT8 update_tilemaps(screen_device &screen, const rectangle *cliprect)
static void sprite_erase_buffer(segas32_state *state)
{
/* erase the visible sprite buffer and clear the checksums */
- bitmap_fill(state->m_layer_data[MIXER_LAYER_SPRITES].bitmap, NULL, 0xffff);
+ state->m_layer_data[MIXER_LAYER_SPRITES].bitmap->fill(0xffff);
/* for multi32, erase the other buffer as well */
if (state->m_is_multi32)
- bitmap_fill(state->m_layer_data[MIXER_LAYER_MULTISPR].bitmap, NULL, 0xffff);
+ state->m_layer_data[MIXER_LAYER_MULTISPR].bitmap->fill(0xffff);
}
@@ -1808,7 +1808,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_ADDR16(bitmap, y, 0);
+ UINT16 *dest = &bitmap->pix16(y);
int xacc = 0;
/* 4bpp case */
@@ -1916,7 +1916,7 @@ static void sprite_render_list(running_machine &machine)
clipin.max_y = (INT16)(sprite[1] << 4) >> 4;
clipin.min_x = (INT16)(sprite[2] << 4) >> 4;
clipin.max_x = (INT16)(sprite[3] << 4) >> 4;
- sect_rect(&clipin, &outerclip);
+ clipin &= outerclip;
}
/* set the exclusive cliprect */
@@ -2007,7 +2007,7 @@ INLINE UINT16 *get_layer_scanline(segas32_state *state, int layer, int scanline)
{
if (state->m_layer_data[layer].transparent[scanline])
return (layer == MIXER_LAYER_SPRITES) ? state->m_solid_ffff : state->m_solid_0000;
- return BITMAP_ADDR16(state->m_layer_data[layer].bitmap, scanline, 0);
+ 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)
@@ -2186,7 +2186,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_ADDR32(bitmap, y, xoffs);
+ UINT32 *dest = &bitmap->pix32(y, xoffs);
UINT16 *layerbase[8];
/* get the starting address for each layer */
@@ -2435,7 +2435,7 @@ SCREEN_UPDATE( system32 )
/* if the display is off, punt */
if (!state->m_system32_displayenable[0])
{
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
return 0;
}
@@ -2614,7 +2614,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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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 2fca5284eb7..277b9128319 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
return 0;
}
/* reset priorities */
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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 aae106f80a4..7d757ae735a 100644
--- a/src/mame/video/segaybd.c
+++ b/src/mame/video/segaybd.c
@@ -47,7 +47,7 @@ SCREEN_UPDATE( yboard )
/* if no drawing is happening, fill with black and get out */
if (!segaic16_display_enable)
{
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
return 0;
}
diff --git a/src/mame/video/sei_crtc.c b/src/mame/video/sei_crtc.c
index d1dd90ce4a3..56c5ef2720c 100644
--- a/src/mame/video/sei_crtc.c
+++ b/src/mame/video/sei_crtc.c
@@ -271,7 +271,7 @@ VIDEO_START( seibu_crtc )
SCREEN_UPDATE( seibu_crtc )
{
- bitmap_fill(bitmap, cliprect, screen.machine().pens[0x7ff]); //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 5d925faf7d2..da5d27aefd2 100644
--- a/src/mame/video/seibuspi.c
+++ b/src/mame/video/seibuspi.c
@@ -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_ADDR32(bitmap, j, 0);
+ UINT32 *p = &bitmap->pix32(j);
UINT8 trans_pen = (1 << state->m_sprite_bpp) - 1;
int dp_i = (py * width) + px;
py += yd;
@@ -571,8 +571,8 @@ static void combine_tilemap(running_machine &machine, bitmap_t *bitmap, const re
pen_bitmap = tilemap_get_pixmap(tile);
flags_bitmap = tilemap_get_flagsmap(tile);
- xscroll_mask = pen_bitmap->width - 1;
- yscroll_mask = pen_bitmap->height - 1;
+ xscroll_mask = pen_bitmap->width() - 1;
+ yscroll_mask = pen_bitmap->height() - 1;
for (j=cliprect->min_y; j <= cliprect->max_y; j++)
{
@@ -582,9 +582,9 @@ static void combine_tilemap(running_machine &machine, bitmap_t *bitmap, const re
rx += rowscroll[(j+y) & yscroll_mask];
}
- d = BITMAP_ADDR32(bitmap, j, 0);
- s = BITMAP_ADDR16(pen_bitmap, (j+y) & yscroll_mask, 0);
- t = BITMAP_ADDR8(flags_bitmap, (j+y) & yscroll_mask, 0);
+ 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 +622,7 @@ SCREEN_UPDATE( spi )
}
if( state->m_layer_enable & 0x1 )
- bitmap_fill(bitmap, cliprect, 0);
+ 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 +672,7 @@ VIDEO_START( sys386f2 )
SCREEN_UPDATE( sys386f2 )
{
- bitmap_fill(bitmap, cliprect, 0);
+ 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/senjyo.c b/src/mame/video/senjyo.c
index 7f1de72f6df..6b66cc4053c 100644
--- a/src/mame/video/senjyo.c
+++ b/src/mame/video/senjyo.c
@@ -182,7 +182,7 @@ static void draw_bgbitmap(running_machine &machine, bitmap_t *bitmap,const recta
if (state->m_bgstripes == 0xff) /* off */
- bitmap_fill(bitmap,cliprect,0);
+ 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_ADDR16(bitmap, y, 255 - x) = 384 + pen;
+ bitmap->pix16(y, 255 - x) = 384 + pen;
else
for (y = 0;y < 256;y++)
- *BITMAP_ADDR16(bitmap, y, x) = 384 + pen;
+ bitmap->pix16(y, x) = 384 + pen;
count += 0x10;
if (count >= strwid)
@@ -234,7 +234,7 @@ 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_ADDR16(bitmap, sy, sx) = offs < 0x200 ? 512 : 513;
+ bitmap->pix16(sy, sx) = offs < 0x200 ? 512 : 513;
}
}
diff --git a/src/mame/video/seta.c b/src/mame/video/seta.c
index 5f8ed7032b7..1a334c89aec 100644
--- a/src/mame/video/seta.c
+++ b/src/mame/video/seta.c
@@ -780,23 +780,23 @@ static void draw_tilemap_palette_effect(running_machine &machine, bitmap_t *bitm
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_ADDR16(bitmap, y, 0);
+ UINT16 *dest = &bitmap->pix16(y);
int x;
for (x = cliprect->min_x; x <= cliprect->max_x; x++)
{
if(!flipscreen)
{
- p = *BITMAP_ADDR16(src_bitmap, (y + scrolly) & height_mask, (x + scrollx) & width_mask);
+ p = src_bitmap->pix16((y + scrolly) & height_mask, (x + scrollx) & width_mask);
}
else
{
- p = *BITMAP_ADDR16(src_bitmap, (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(bitmap,cliprect,0x1f0);
+ bitmap->fill(0x1f0, *cliprect);
screen.machine().device<seta001_device>("spritegen")->seta001_draw_sprites(screen.machine(),bitmap,cliprect,0x1000, 1);
return 0;
@@ -944,7 +944,7 @@ if (screen.machine().input().code_pressed(KEYCODE_Z))
}
#endif
- bitmap_fill(bitmap,cliprect,0);
+ bitmap->fill(0, *cliprect);
if (order & 1) // swap the layers?
{
@@ -1055,7 +1055,7 @@ static SCREEN_UPDATE( seta_layers )
SCREEN_UPDATE( setaroul )
{
- bitmap_fill(bitmap, cliprect, 0x0);
+ 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/seta2.c b/src/mame/video/seta2.c
index 896a7ea0dff..69ccc8b5b51 100644
--- a/src/mame/video/seta2.c
+++ b/src/mame/video/seta2.c
@@ -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_ADDR16(bitmap, sy, 0); \
+ dest = &bitmap->pix16(sy); \
\
for ( sx = x0; sx != x1; sx += dx ) \
{ \
@@ -483,7 +483,7 @@ SCREEN_UPDATE( seta2 )
seta2_state *state = screen.machine().driver_data<seta2_state>();
// Black or pen 0?
- bitmap_fill(bitmap, cliprect, screen.machine().pens[0]);
+ 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 04c443eac22..6dae3ff9699 100644
--- a/src/mame/video/sf.c
+++ b/src/mame/video/sf.c
@@ -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(bitmap, cliprect, 0);
+ 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 acacec194b8..de1b0c4f1d8 100644
--- a/src/mame/video/shadfrce.c
+++ b/src/mame/video/shadfrce.c
@@ -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>();
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
+ screen.machine().priority_bitmap->fill(0, *cliprect);
if (state->m_video_enable)
{
@@ -176,7 +176,7 @@ SCREEN_UPDATE( shadfrce )
}
else
{
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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 6ebea11a710..86eee384083 100644
--- a/src/mame/video/shangha3.c
+++ b/src/mame/video/shangha3.c
@@ -155,7 +155,7 @@ WRITE16_HANDLER( shangha3_blitter_go_w )
myclip.max_x = sx + sizex;
myclip.min_y = sy;
myclip.max_y = sy + sizey;
- sect_rect(&myclip, &rawbitmap->cliprect);
+ myclip &= rawbitmap->cliprect();
if (shangha3_ram[offs+4] & 0x08) /* tilemap */
{
diff --git a/src/mame/video/shootout.c b/src/mame/video/shootout.c
index 37238727926..5d6f2b97ea8 100644
--- a/src/mame/video/shootout.c
+++ b/src/mame/video/shootout.c
@@ -175,7 +175,7 @@ SCREEN_UPDATE( shootout )
{
shootout_state *state = screen.machine().driver_data<shootout_state>();
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
+ 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>();
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
+ 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 a15e07f8d51..487c7d0d2cf 100644
--- a/src/mame/video/shuuz.c
+++ b/src/mame/video/shuuz.c
@@ -104,8 +104,8 @@ SCREEN_UPDATE( shuuz )
for (r = 0; r < rectlist.numrects; r++, rectlist.rect++)
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
- UINT16 *mo = (UINT16 *)mobitmap->base + mobitmap->rowpixels * y;
- UINT16 *pf = (UINT16 *)bitmap->base + bitmap->rowpixels * y;
+ UINT16 *mo = &mobitmap->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 ab6c6a9b9a1..d517ad13d50 100644
--- a/src/mame/video/sidearms.c
+++ b/src/mame/video/sidearms.c
@@ -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_ADDR16(bitmap, 16, 64);
- lineadv = bitmap->rowpixels;
+ lineptr = &bitmap->pix16(16, 64);
+ lineadv = bitmap->rowpixels();
for (i=224; i; i--) { memset(lineptr, 0, 768); lineptr += lineadv; }
@@ -243,7 +243,7 @@ static void sidearms_draw_starfield( running_machine &machine, bitmap_t *bitmap
}
else
{
- lineptr = BITMAP_ADDR16(bitmap, 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_ADDR16(bitmap, 16, 64);
+ lineptr = &bitmap->pix16(16, 64);
pixadv = 1;
lineadv = lineadv - 384;
}
else
{
- lineptr = BITMAP_ADDR16(bitmap, 239, 512 - 64 - 1);
+ lineptr = &bitmap->pix16(239, 512 - 64 - 1);
pixadv = -1;
lineadv = -lineadv + 384;
}
diff --git a/src/mame/video/silkroad.c b/src/mame/video/silkroad.c
index f722f8b964c..5f978aa1a39 100644
--- a/src/mame/video/silkroad.c
+++ b/src/mame/video/silkroad.c
@@ -144,8 +144,8 @@ VIDEO_START(silkroad)
SCREEN_UPDATE(silkroad)
{
silkroad_state *state = screen.machine().driver_data<silkroad_state>();
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
- bitmap_fill(bitmap,cliprect,0x7c0);
+ 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 57229871c87..9bfc55a95c4 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>();
- bitmap_fill(screen.machine().priority_bitmap, NULL, 0);
+ screen.machine().priority_bitmap->fill(0);
deco16ic_pf_update(state->m_deco_tilegen1, state->m_pf1_rowscroll, state->m_pf2_rowscroll);
- bitmap_fill(bitmap, cliprect, 256);
+ 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 8a6faf10c86..eee4e2fe3c7 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);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
- bitmap_fill(bitmap, cliprect, 16 * bg_colorbase);
+ 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 c422406ecc6..50ce2c2813f 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_ADDR16(bitmap, yd>>6, xd>>6) = val + colour;
+ bitmap->pix16(yd>>6, xd>>6) = val + colour;
#define z_x_dst(op) \
old = xd; \
@@ -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_ADDR16(bitmap, 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_ADDR16(bitmap, 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_ADDR16(bitmap, 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_ADDR16(bitmap, 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/skullxbo.c b/src/mame/video/skullxbo.c
index 9dfd93b6418..e06af8a293d 100644
--- a/src/mame/video/skullxbo.c
+++ b/src/mame/video/skullxbo.c
@@ -258,8 +258,8 @@ SCREEN_UPDATE( skullxbo )
for (r = 0; r < rectlist.numrects; r++, rectlist.rect++)
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
- UINT16 *mo = (UINT16 *)mobitmap->base + mobitmap->rowpixels * y;
- UINT16 *pf = (UINT16 *)bitmap->base + bitmap->rowpixels * y;
+ UINT16 *mo = &mobitmap->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/skyfox.c b/src/mame/video/skyfox.c
index 84c1077d813..1b88f2ce55c 100644
--- a/src/mame/video/skyfox.c
+++ b/src/mame/video/skyfox.c
@@ -265,8 +265,8 @@ static void draw_background(running_machine &machine, bitmap_t *bitmap, const re
}
for (j = 0 ; j <= ((pen & 0x80) ? 0 : 3); j++)
- *BITMAP_ADDR16(bitmap,
- (((j / 2) & 1) + y) % 256,
+ 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(bitmap, cliprect, 255); // 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/skyraid.c b/src/mame/video/skyraid.c
index 6b2c45ab508..1df33db3269 100644
--- a/src/mame/video/skyraid.c
+++ b/src/mame/video/skyraid.c
@@ -30,7 +30,7 @@ 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);
}
}
@@ -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(bitmap, &r, color);
+ bitmap->fill(color, r);
x += 32 - count;
}
@@ -124,10 +124,10 @@ static void draw_trapezoid(running_machine &machine, bitmap_t* dst, bitmap_t* sr
int x;
int y;
- for (y = 0; y < dst->height; y++)
+ for (y = 0; y < dst->height(); y++)
{
- UINT16* pSrc = BITMAP_ADDR16(src, y, 0);
- UINT16* pDst = BITMAP_ADDR16(dst, y, 0);
+ 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,7 +142,7 @@ SCREEN_UPDATE( skyraid )
{
skyraid_state *state = screen.machine().driver_data<skyraid_state>();
- bitmap_fill(bitmap, cliprect, 0);
+ bitmap->fill(0, *cliprect);
draw_terrain(screen.machine(), state->m_helper, NULL);
draw_sprites(screen.machine(), state->m_helper, NULL);
diff --git a/src/mame/video/slapshot.c b/src/mame/video/slapshot.c
index b1673999e02..b9da1690ec2 100644
--- a/src/mame/video/slapshot.c
+++ b/src/mame/video/slapshot.c
@@ -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;
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
- bitmap_fill(bitmap, cliprect, 0);
+ 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 5df26ecb4be..3d1e67bf6ef 100644
--- a/src/mame/video/snes.c
+++ b/src/mame/video/snes.c
@@ -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_ADDR32(bitmap, 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_ADDR32(bitmap, curline, x * 2 + 0) = MAKE_RGB(pal5bit(r), pal5bit(g), pal5bit(b));
- *BITMAP_ADDR32(bitmap, 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_ADDR32(bitmap, 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_ADDR32(bitmap, 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/snk68.c b/src/mame/video/snk68.c
index 3c8eaf5df93..d07d7558a5b 100644
--- a/src/mame/video/snk68.c
+++ b/src/mame/video/snk68.c
@@ -292,7 +292,7 @@ SCREEN_UPDATE( pow )
{
snk68_state *state = screen.machine().driver_data<snk68_state>();
- bitmap_fill(bitmap, cliprect, 0x7ff);
+ 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/spacefb.c b/src/mame/video/spacefb.c
index b71b264d395..d5a589f0d6d 100644
--- a/src/mame/video/spacefb.c
+++ b/src/mame/video/spacefb.c
@@ -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_ADDR32(bitmap, y, x) = pens[(state->m_star_shift_reg >> 8) & 0x3f];
+ bitmap->pix32(y, x) = pens[(state->m_star_shift_reg >> 8) & 0x3f];
else
- *BITMAP_ADDR32(bitmap, y, x) = pens[0];
+ bitmap->pix32(y, x) = pens[0];
}
shift_star_generator(state);
@@ -283,11 +283,11 @@ static void draw_bullet(running_machine &machine, offs_t offs, pen_t pen, bitmap
else
dx = x * 2;
- *BITMAP_ADDR32(bitmap, dy, dx + 0) = pen;
- *BITMAP_ADDR32(bitmap, 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;
@@ -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_ADDR32(bitmap, dy, dx + 0) = pen;
- *BITMAP_ADDR32(bitmap, 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;
@@ -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 dfb6372ce3a..158b402a72e 100644
--- a/src/mame/video/spbactn.c
+++ b/src/mame/video/spbactn.c
@@ -14,9 +14,9 @@ static void blendbitmaps(running_machine &machine,
for (y = cliprect->min_y; y <= cliprect->max_y; y++)
{
- UINT32 *dd = BITMAP_ADDR32(dest, y, 0);
- UINT16 *sd1 = BITMAP_ADDR16(src1, y, 0);
- UINT16 *sd2 = BITMAP_ADDR16(src2, y, 0);
+ 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++)
{
@@ -123,7 +123,7 @@ SCREEN_UPDATE( spbactn )
spbactn_state *state = screen.machine().driver_data<spbactn_state>();
int offs, sx, sy;
- bitmap_fill(state->m_tile_bitmap_fg, cliprect, 0);
+ state->m_tile_bitmap_fg->fill(0, *cliprect);
/* draw table bg gfx */
for (sx = sy = offs = 0; offs < 0x4000 / 2; offs++)
diff --git a/src/mame/video/spcforce.c b/src/mame/video/spcforce.c
index 4642a6d6e85..2285ee1e099 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(bitmap,cliprect,0);
+ bitmap->fill(0, *cliprect);
for (offs = 0; offs < 0x400; offs++)
{
int code,sx,sy,col;
diff --git a/src/mame/video/speedatk.c b/src/mame/video/speedatk.c
index 178a35fa1fa..88e5a0e280e 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(bitmap, cliprect, 0);
+ bitmap->fill(0, *cliprect);
count = (state->m_crtc_vreg[0x0c]<<8)|(state->m_crtc_vreg[0x0d] & 0xff);
diff --git a/src/mame/video/speedspn.c b/src/mame/video/speedspn.c
index f9bf978495e..ac714c71545 100644
--- a/src/mame/video/speedspn.c
+++ b/src/mame/video/speedspn.c
@@ -98,7 +98,7 @@ SCREEN_UPDATE(speedspn)
speedspn_state *state = screen.machine().driver_data<speedspn_state>();
if (state->m_display_disable)
{
- bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine()));
+ 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 08e8e6c3297..60fb1e9e37f 100644
--- a/src/mame/video/splash.c
+++ b/src/mame/video/splash.c
@@ -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_ADDR16(bitmap, sy, sx-9) = 0x300+(color^colxor);
+ bitmap->pix16(sy, sx-9) = 0x300+(color^colxor);
}
}
diff --git a/src/mame/video/sprint2.c b/src/mame/video/sprint2.c
index 7f178d4f8b5..ebee1af7218 100644
--- a/src/mame/video/sprint2.c
+++ b/src/mame/video/sprint2.c
@@ -94,7 +94,7 @@ static UINT8 collision_check(sprint2_state *state, colortable_t *colortable, rec
for (y = rect->min_y; y <= rect->max_y; y++)
for (x = rect->min_x; x <= rect->max_x; x++)
{
- UINT16 a = colortable_entry_get_value(colortable, *BITMAP_ADDR16(state->m_helper, y, x));
+ UINT16 a = colortable_entry_get_value(colortable, state->m_helper->pix16(y, x));
if (a == 0)
data |= 0x40;
diff --git a/src/mame/video/sprint4.c b/src/mame/video/sprint4.c
index 17fe87646bf..7fa77379a22 100644
--- a/src/mame/video/sprint4.c
+++ b/src/mame/video/sprint4.c
@@ -116,7 +116,7 @@ SCREEN_EOF( sprint4 )
rect.max_x = horz - 15 + screen.machine().gfx[1]->width - 1;
rect.max_y = vert - 15 + screen.machine().gfx[1]->height - 1;
- sect_rect(&rect, &screen.machine().primary_screen->visible_area());
+ rect &= screen.machine().primary_screen->visible_area();
tilemap_draw(state->m_helper, &rect, state->m_playfield, 0, 0);
@@ -132,7 +132,7 @@ SCREEN_EOF( sprint4 )
for (y = rect.min_y; y <= rect.max_y; y++)
for (x = rect.min_x; x <= rect.max_x; x++)
- if (colortable_entry_get_value(screen.machine().colortable, *BITMAP_ADDR16(state->m_helper, y, x)) != 0)
+ if (colortable_entry_get_value(screen.machine().colortable, state->m_helper->pix16(y, x)) != 0)
state->m_collision[i] = 1;
}
diff --git a/src/mame/video/sprint8.c b/src/mame/video/sprint8.c
index 995881948f0..b2c9229a84f 100644
--- a/src/mame/video/sprint8.c
+++ b/src/mame/video/sprint8.c
@@ -177,14 +177,14 @@ SCREEN_EOF( sprint8 )
tilemap_draw(state->m_helper2, &visarea, state->m_tilemap2, 0, 0);
- bitmap_fill(state->m_helper1, &visarea, 0x20);
+ state->m_helper1->fill(0x20, visarea);
draw_sprites(screen.machine(), state->m_helper1, &visarea);
for (y = visarea.min_y; y <= visarea.max_y; y++)
{
- const UINT16* p1 = BITMAP_ADDR16(state->m_helper1, y, 0);
- const UINT16* p2 = BITMAP_ADDR16(state->m_helper2, y, 0);
+ const UINT16* p1 = &state->m_helper1->pix16(y);
+ const UINT16* p2 = &state->m_helper2->pix16(y);
for (x = visarea.min_x; x <= visarea.max_x; x++)
if (p1[x] != 0x20 && p2[x] == 0x23)
diff --git a/src/mame/video/spy.c b/src/mame/video/spy.c
index e99281714be..90fa9fb31e2 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);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ screen.machine().priority_bitmap->fill(0, *cliprect);
if (!state->m_video_enable)
- bitmap_fill(bitmap, cliprect, 16 * state->m_layer_colorbase[0]);
+ 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 cd6d4c5e482..1e27114a383 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(bitmap, cliprect, 0x1ff);
+ 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(bitmap, cliprect, 0x1f0);
+ 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(bitmap, cliprect, 0x1f0);
+ 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/sshangha.c b/src/mame/video/sshangha.c
index 9fca60c5a6e..7104f975618 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(bitmap,cliprect,get_black_pen(screen.machine()));
+ 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 3c89c87e2c7..9bbaf0d8d47 100644
--- a/src/mame/video/sslam.c
+++ b/src/mame/video/sslam.c
@@ -197,7 +197,7 @@ SCREEN_UPDATE(sslam)
if (!(state->m_regs[6] & 1))
{
- bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine()));
+ 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(bitmap,cliprect,get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
return 0;
}
diff --git a/src/mame/video/sspeedr.c b/src/mame/video/sspeedr.c
index bb318217812..c13a4069b11 100644
--- a/src/mame/video/sspeedr.c
+++ b/src/mame/video/sspeedr.c
@@ -142,11 +142,11 @@ static void draw_track(running_machine &machine, bitmap_t* bitmap)
if (counter_x & 2)
{
- *BITMAP_ADDR16(bitmap, y, x) = p[offset] / 16;
+ bitmap->pix16(y, x) = p[offset] / 16;
}
else
{
- *BITMAP_ADDR16(bitmap, 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_ADDR16(bitmap, y, x) = flag ? 15 : 0;
+ bitmap->pix16(y, x) = flag ? 15 : 0;
}
/* lower landscape */
@@ -170,11 +170,11 @@ static void draw_track(running_machine &machine, bitmap_t* bitmap)
if (counter_x & 2)
{
- *BITMAP_ADDR16(bitmap, y, x) = p[offset] / 16;
+ bitmap->pix16(y, x) = p[offset] / 16;
}
else
{
- *BITMAP_ADDR16(bitmap, y, x) = p[offset] % 16;
+ bitmap->pix16(y, x) = p[offset] % 16;
}
}
}
diff --git a/src/mame/video/ssv.c b/src/mame/video/ssv.c
index 99ad1ac4930..75d01bc40ef 100644
--- a/src/mame/video/ssv.c
+++ b/src/mame/video/ssv.c
@@ -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_ADDR16(bitmap, sy, 0); \
+ dest = &bitmap->pix16(sy); \
\
for ( sx = x0; sx != x1; sx += dx ) \
{ \
@@ -1191,7 +1191,7 @@ void ssv_enable_video(running_machine &machine, int enable)
SCREEN_UPDATE( ssv )
{
- rectangle clip = { 0, 0, 0, 0 };
+ rectangle clip;
ssv_state *state = screen.machine().driver_data<ssv_state>();
@@ -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(bitmap,cliprect, 0);
+ 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 447b55f6d1d..57754cc963c 100644
--- a/src/mame/video/st0016.c
+++ b/src/mame/video/st0016.c
@@ -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_ADDR16(bitmap, drawypos, 0);
+ destline = &bitmap->pix16(drawypos);
for (xloop=0; xloop<8; xloop++)
{
@@ -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_ADDR16(bitmap, drawypos, 0);
+ destline = &bitmap->pix16(drawypos);
for (xloop=0; xloop<8; xloop++)
{
@@ -616,7 +616,7 @@ SCREEN_UPDATE( st0016 )
}
#endif
- bitmap_fill(bitmap,cliprect,UNUSED_PEN);
+ 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 5533a4215de..d21342b4c8e 100644
--- a/src/mame/video/stactics.c
+++ b/src/mame/video/stactics.c
@@ -240,7 +240,7 @@ static void draw_background(stactics_state *state, bitmap_t *bitmap, const recta
{
int y;
- bitmap_fill(bitmap, cliprect, 0);
+ 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_ADDR16(bitmap, sy, sx) = pen;
+ bitmap->pix16(sy, sx) = pen;
}
}
}
diff --git a/src/mame/video/starcrus.c b/src/mame/video/starcrus.c
index bc50f254d4e..8190118f325 100644
--- a/src/mame/video/starcrus.c
+++ b/src/mame/video/starcrus.c
@@ -174,8 +174,8 @@ static int collision_check_s1s2(running_machine &machine)
clip.min_y=0;
clip.max_y=15;
- bitmap_fill(state->m_ship1_vid, &clip, 0);
- bitmap_fill(state->m_ship2_vid, &clip, 0);
+ state->m_ship1_vid->fill(0, clip);
+ state->m_ship2_vid->fill(0, clip);
/* origin is with respect to ship1 */
@@ -204,7 +204,7 @@ static int collision_check_s1s2(running_machine &machine)
for (sy=0;sy<16;sy++)
for (sx=0;sx<16;sx++)
/* Condition 1 - ship 1 = ship 2 */
- if ((*BITMAP_ADDR16(state->m_ship1_vid, sy, sx) == 1) && (*BITMAP_ADDR16(state->m_ship2_vid, sy, sx) == 1))
+ if ((state->m_ship1_vid->pix16(sy, sx) == 1) && (state->m_ship2_vid->pix16(sy, sx) == 1))
return 1;
return 0;
@@ -229,8 +229,8 @@ static int collision_check_p1p2(running_machine &machine)
clip.min_y=0;
clip.max_y=15;
- bitmap_fill(state->m_proj1_vid, &clip, 0);
- bitmap_fill(state->m_proj2_vid, &clip, 0);
+ state->m_proj1_vid->fill(0, clip);
+ state->m_proj2_vid->fill(0, clip);
/* origin is with respect to proj1 */
@@ -265,7 +265,7 @@ static int collision_check_p1p2(running_machine &machine)
for (sy=0;sy<16;sy++)
for (sx=0;sx<16;sx++)
/* Condition 1 - proj 1 = proj 2 */
- if ((*BITMAP_ADDR16(state->m_proj1_vid, sy, sx) == 1) && (*BITMAP_ADDR16(state->m_proj2_vid, sy, sx) == 1))
+ if ((state->m_proj1_vid->pix16(sy, sx) == 1) && (state->m_proj2_vid->pix16(sy, sx) == 1))
return 1;
return 0;
@@ -290,9 +290,9 @@ static int collision_check_s1p1p2(running_machine &machine)
clip.min_y=0;
clip.max_y=15;
- bitmap_fill(state->m_ship1_vid, &clip, 0);
- bitmap_fill(state->m_proj1_vid, &clip, 0);
- bitmap_fill(state->m_proj2_vid, &clip, 0);
+ state->m_ship1_vid->fill(0, clip);
+ state->m_proj1_vid->fill(0, clip);
+ state->m_proj2_vid->fill(0, clip);
/* origin is with respect to ship1 */
@@ -335,13 +335,13 @@ static int collision_check_s1p1p2(running_machine &machine)
/* Now check for collisions */
for (sy=0;sy<16;sy++)
for (sx=0;sx<16;sx++)
- if (*BITMAP_ADDR16(state->m_ship1_vid, sy, sx) == 1)
+ if (state->m_ship1_vid->pix16(sy, sx) == 1)
{
/* Condition 1 - ship 1 = proj 1 */
- if (*BITMAP_ADDR16(state->m_proj1_vid, sy, sx) == 1)
+ if (state->m_proj1_vid->pix16(sy, sx) == 1)
return 1;
/* Condition 2 - ship 1 = proj 2 */
- if (*BITMAP_ADDR16(state->m_proj2_vid, sy, sx) == 1)
+ if (state->m_proj2_vid->pix16(sy, sx) == 1)
return 1;
}
@@ -367,9 +367,9 @@ static int collision_check_s2p1p2(running_machine &machine)
clip.min_y=0;
clip.max_y=15;
- bitmap_fill(state->m_ship2_vid, &clip, 0);
- bitmap_fill(state->m_proj1_vid, &clip, 0);
- bitmap_fill(state->m_proj2_vid, &clip, 0);
+ state->m_ship2_vid->fill(0, clip);
+ state->m_proj1_vid->fill(0, clip);
+ state->m_proj2_vid->fill(0, clip);
/* origin is with respect to ship2 */
@@ -412,13 +412,13 @@ static int collision_check_s2p1p2(running_machine &machine)
/* Now check for collisions */
for (sy=0;sy<16;sy++)
for (sx=0;sx<16;sx++)
- if (*BITMAP_ADDR16(state->m_ship2_vid, sy, sx) == 1)
+ if (state->m_ship2_vid->pix16(sy, sx) == 1)
{
/* Condition 1 - ship 2 = proj 1 */
- if (*BITMAP_ADDR16(state->m_proj1_vid, sy, sx) == 1)
+ if (state->m_proj1_vid->pix16(sy, sx) == 1)
return 1;
/* Condition 2 - ship 2 = proj 2 */
- if (*BITMAP_ADDR16(state->m_proj2_vid, sy, sx) == 1)
+ if (state->m_proj2_vid->pix16(sy, sx) == 1)
return 1;
}
@@ -429,7 +429,7 @@ SCREEN_UPDATE( starcrus )
{
starcrus_state *state = screen.machine().driver_data<starcrus_state>();
- bitmap_fill(bitmap,cliprect,0);
+ 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 9acc422d2ce..7179c467a9f 100644
--- a/src/mame/video/starfire.c
+++ b/src/mame/video/starfire.c
@@ -250,14 +250,14 @@ static TIMER_CALLBACK( starfire_scanline_callback )
int data = pix[0];
int color = col[0];
- *BITMAP_ADDR32(state->m_starfire_screen, y, x + 0) = pens[color | ((data >> 2) & 0x20)];
- *BITMAP_ADDR32(state->m_starfire_screen, y, x + 1) = pens[color | ((data >> 1) & 0x20)];
- *BITMAP_ADDR32(state->m_starfire_screen, y, x + 2) = pens[color | ((data >> 0) & 0x20)];
- *BITMAP_ADDR32(state->m_starfire_screen, y, x + 3) = pens[color | ((data << 1) & 0x20)];
- *BITMAP_ADDR32(state->m_starfire_screen, y, x + 4) = pens[color | ((data << 2) & 0x20)];
- *BITMAP_ADDR32(state->m_starfire_screen, y, x + 5) = pens[color | ((data << 3) & 0x20)];
- *BITMAP_ADDR32(state->m_starfire_screen, y, x + 6) = pens[color | ((data << 4) & 0x20)];
- *BITMAP_ADDR32(state->m_starfire_screen, y, x + 7) = pens[color | ((data << 5) & 0x20)];
+ state->m_starfire_screen->pix32(y, x + 0) = pens[color | ((data >> 2) & 0x20)];
+ state->m_starfire_screen->pix32(y, x + 1) = pens[color | ((data >> 1) & 0x20)];
+ state->m_starfire_screen->pix32(y, x + 2) = pens[color | ((data >> 0) & 0x20)];
+ state->m_starfire_screen->pix32(y, x + 3) = pens[color | ((data << 1) & 0x20)];
+ state->m_starfire_screen->pix32(y, x + 4) = pens[color | ((data << 2) & 0x20)];
+ state->m_starfire_screen->pix32(y, x + 5) = pens[color | ((data << 3) & 0x20)];
+ state->m_starfire_screen->pix32(y, x + 6) = pens[color | ((data << 4) & 0x20)];
+ state->m_starfire_screen->pix32(y, x + 7) = pens[color | ((data << 5) & 0x20)];
pix += 256;
col += 256;
diff --git a/src/mame/video/starshp1.c b/src/mame/video/starshp1.c
index f09f1c3bd52..679d0276845 100644
--- a/src/mame/video/starshp1.c
+++ b/src/mame/video/starshp1.c
@@ -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_ADDR16(bitmap, y, 0);
+ 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;
}
@@ -233,10 +233,10 @@ static void draw_phasor(starshp1_state *state, bitmap_t* bitmap)
for (i = 128; i < 240; i++)
if (i >= get_sprite_vpos(state, 13))
{
- *BITMAP_ADDR16(bitmap, i, 2 * i + 0) = 0x10;
- *BITMAP_ADDR16(bitmap, i, 2 * i + 1) = 0x10;
- *BITMAP_ADDR16(bitmap, i, 2 * (255 - i) + 0) = 0x10;
- *BITMAP_ADDR16(bitmap, 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;
}
}
@@ -258,19 +258,19 @@ 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)
{
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_ADDR16(bitmap, y, 0);
+ 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)
@@ -322,7 +322,7 @@ static int spaceship_collision(running_machine &machine, bitmap_t *bitmap, const
for (y = rect->min_y; y <= rect->max_y; y++)
{
- const UINT16* pLine = BITMAP_ADDR16(state->m_helper, y, 0);
+ const UINT16* pLine = &state->m_helper->pix16(y);
for (x = rect->min_x; x <= rect->max_x; x++)
if (pLine[x] != 0)
@@ -361,7 +361,7 @@ SCREEN_UPDATE( starshp1 )
starshp1_state *state = screen.machine().driver_data<starshp1_state>();
set_pens(state, screen.machine().colortable);
- bitmap_fill(bitmap, cliprect, 0);
+ bitmap->fill(0, *cliprect);
if (state->m_starfield_kill == 0)
draw_starfield(state, bitmap);
@@ -401,12 +401,12 @@ SCREEN_EOF( starshp1 )
rect.min_x = 0;
if (rect.min_y < 0)
rect.min_y = 0;
- if (rect.max_x > state->m_helper->width - 1)
- rect.max_x = state->m_helper->width - 1;
- if (rect.max_y > state->m_helper->height - 1)
- rect.max_y = state->m_helper->height - 1;
+ if (rect.max_x > state->m_helper->width() - 1)
+ rect.max_x = state->m_helper->width() - 1;
+ if (rect.max_y > state->m_helper->height() - 1)
+ rect.max_y = state->m_helper->height() - 1;
- bitmap_fill(state->m_helper, &visarea, 0);
+ state->m_helper->fill(0, visarea);
if (state->m_attract == 0)
draw_spaceship(screen.machine(), state->m_helper, &visarea);
diff --git a/src/mame/video/stfight.c b/src/mame/video/stfight.c
index c6486725bcc..a7f96e06630 100644
--- a/src/mame/video/stfight.c
+++ b/src/mame/video/stfight.c
@@ -297,9 +297,9 @@ SCREEN_UPDATE( stfight )
stfight_state *state = screen.machine().driver_data<stfight_state>();
set_pens(screen.machine());
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
+ screen.machine().priority_bitmap->fill(0, *cliprect);
- bitmap_fill(bitmap,cliprect,0); /* 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/stvvdp2.c b/src/mame/video/stvvdp2.c
index 1467fe46dd4..cc23e04d02c 100644
--- a/src/mame/video/stvvdp2.c
+++ b/src/mame/video/stvvdp2.c
@@ -2481,16 +2481,8 @@ static void stv_vdp2_drawgfxzoom(
/* KW 991012 -- Added code to force clip to bitmap boundary */
if(clip)
{
- myclip.min_x = clip->min_x;
- myclip.max_x = clip->max_x;
- myclip.min_y = clip->min_y;
- myclip.max_y = clip->max_y;
-
- if (myclip.min_x < 0) myclip.min_x = 0;
- if (myclip.max_x >= dest_bmp->width) myclip.max_x = dest_bmp->width-1;
- if (myclip.min_y < 0) myclip.min_y = 0;
- if (myclip.max_y >= dest_bmp->height) myclip.max_y = dest_bmp->height-1;
-
+ myclip = *clip;
+ myclip &= dest_bmp->cliprect();
clip=&myclip;
}
@@ -2575,7 +2567,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 = BITMAP_ADDR16(dest_bmp, y, 0);
+ UINT16 *dest = &dest_bmp->pix16(y);
int x, x_index = x_index_base;
for( x=sx; x<ex; x++ )
@@ -2592,7 +2584,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 = BITMAP_ADDR16(dest_bmp, y, 0);
+ UINT16 *dest = &dest_bmp->pix16(y);
int x, x_index = x_index_base;
for( x=sx; x<ex; x++ )
@@ -2614,7 +2606,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 = BITMAP_ADDR16(dest_bmp, y, 0);
+ UINT16 *dest = &dest_bmp->pix16(y);
int x, x_index = x_index_base;
for( x=sx; x<ex; x++ )
@@ -2632,7 +2624,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 = BITMAP_ADDR16(dest_bmp, y, 0);
+ UINT16 *dest = &dest_bmp->pix16(y);
int x, x_index = x_index_base;
for( x=sx; x<ex; x++ )
@@ -2653,7 +2645,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 = BITMAP_ADDR16(dest_bmp, y, 0);
+ UINT16 *dest = &dest_bmp->pix16(y);
int x, x_index = x_index_base;
for( x=sx; x<ex; x++ )
@@ -2675,7 +2667,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 = BITMAP_ADDR16(dest_bmp, y, 0);
+ UINT16 *dest = &dest_bmp->pix16(y);
int x, x_index = x_index_base;
for( x=sx; x<ex; x++ )
@@ -2693,7 +2685,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 = BITMAP_ADDR16(dest_bmp, y, 0);
+ UINT16 *dest = &dest_bmp->pix16(y);
int x, x_index = x_index_base;
for( x=sx; x<ex; x++ )
@@ -2790,16 +2782,8 @@ static void stv_vdp2_drawgfx_rgb555( bitmap_t *dest_bmp, const rectangle *clip,
/* KW 991012 -- Added code to force clip to bitmap boundary */
if(clip)
{
- myclip.min_x = clip->min_x;
- myclip.max_x = clip->max_x;
- myclip.min_y = clip->min_y;
- myclip.max_y = clip->max_y;
-
- if (myclip.min_x < 0) myclip.min_x = 0;
- if (myclip.max_x >= dest_bmp->width) myclip.max_x = dest_bmp->width-1;
- if (myclip.min_y < 0) myclip.min_y = 0;
- if (myclip.max_y >= dest_bmp->height) myclip.max_y = dest_bmp->height-1;
-
+ myclip = *clip;
+ myclip &= dest_bmp->cliprect();
clip=&myclip;
}
{
@@ -2866,7 +2850,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 = BITMAP_ADDR16(dest_bmp, y, 0);
+ UINT16 *dest = &dest_bmp->pix16(y);
UINT16 data;
int x, x_index = x_index_base;
@@ -2917,16 +2901,8 @@ static void stv_vdp2_drawgfx_rgb888( bitmap_t *dest_bmp, const rectangle *clip,
/* KW 991012 -- Added code to force clip to bitmap boundary */
if(clip)
{
- myclip.min_x = clip->min_x;
- myclip.max_x = clip->max_x;
- myclip.min_y = clip->min_y;
- myclip.max_y = clip->max_y;
-
- if (myclip.min_x < 0) myclip.min_x = 0;
- if (myclip.max_x >= dest_bmp->width) myclip.max_x = dest_bmp->width-1;
- if (myclip.min_y < 0) myclip.min_y = 0;
- if (myclip.max_y >= dest_bmp->height) myclip.max_y = dest_bmp->height-1;
-
+ myclip = *clip;
+ myclip &= dest_bmp->cliprect();
clip=&myclip;
}
{
@@ -2993,7 +2969,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 = BITMAP_ADDR16(dest_bmp, y, 0);
+ UINT16 *dest = &dest_bmp->pix16(y);
UINT32 data;
int x, x_index = x_index_base;
@@ -3125,9 +3101,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_ADDR16(bitmap, 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_ADDR16(bitmap, ycnt, xcnt+1) = alpha_blend_r16(*BITMAP_ADDR16(bitmap, 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);
}
}
}
@@ -3141,9 +3117,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_ADDR16(bitmap, 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_ADDR16(bitmap, ycnt, xcnt) = alpha_blend_r16(*BITMAP_ADDR16(bitmap, 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);
}
}
}
@@ -3176,9 +3152,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_ADDR16(bitmap, 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_ADDR16(bitmap, ycnt, xcnt) = alpha_blend_r16(*BITMAP_ADDR16(bitmap, 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);
}
}
}
@@ -3207,7 +3183,7 @@ static void stv_vdp2_draw_basic_bitmap(running_machine &machine, bitmap_t *bitma
gfxdata += xlinesize*(yy>>16);
yy &= 0xffff;
- destline = BITMAP_ADDR16(bitmap, ycnt, 0);
+ destline = &bitmap->pix16(ycnt);
xx = 0;
for (xcnt = cliprect->min_x; xcnt <= cliprect->max_x; xx+=stv2_current_tilemap.incx, xcnt++)
{
@@ -3222,9 +3198,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_ADDR16(bitmap, 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_ADDR16(bitmap, ycnt, xcnt) = alpha_blend_r16(*BITMAP_ADDR16(bitmap, 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);
}
}
}
@@ -3250,9 +3226,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_ADDR16(bitmap, 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_ADDR16(bitmap, ycnt, xcnt) = alpha_blend_r16(*BITMAP_ADDR16(bitmap, 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);
}
}
}
@@ -3277,7 +3253,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_ADDR16(bitmap, ycnt, 0);
+ destline = &bitmap->pix16(ycnt);
for (xcnt = cliprect->min_x; xcnt <= cliprect->max_x; xcnt++)
{
@@ -3323,7 +3299,7 @@ static void stv_vdp2_draw_basic_bitmap(running_machine &machine, bitmap_t *bitma
gfxdata += xlinesize*(yy>>16);
yy &= 0xffff;
- destline = BITMAP_ADDR16(bitmap, ycnt, 0);
+ destline = &bitmap->pix16(ycnt);
xx = 0;
for (xcnt = cliprect->min_x; xcnt <= cliprect->max_x; xx+=stv2_current_tilemap.incx, xcnt++)
{
@@ -3373,7 +3349,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_ADDR16(bitmap, ycnt, 0);
+ destline = &bitmap->pix16(ycnt);
for (xcnt = cliprect->min_x; xcnt <= cliprect->max_x; xcnt++)
{
@@ -4239,9 +4215,9 @@ 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_ADDR16(bitmap, y,x);
+ pix = bitmap->pix16(y, x);
- *BITMAP_ADDR16(bitmap, y, x) = stv_add_blend(machine.pens[pen & 0x7ff],pix);
+ bitmap->pix16(y, x) = stv_add_blend(machine.pens[pen & 0x7ff],pix);
}
}
}
@@ -4270,11 +4246,11 @@ 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_ADDR16(bitmap, y,x);
+ pix = bitmap->pix16(y, x);
for(yi=0;yi<v_size;yi++)
for(xi=0;xi<h_size;xi++)
- *BITMAP_ADDR16(bitmap, y+yi, x+xi) = pix;
+ bitmap->pix16(y+yi, x+xi) = pix;
}
}
}
@@ -4553,7 +4529,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_ADDR16(bitmap, vcnt, 0);
+ line = &bitmap->pix16(vcnt);
if ( !use_coeff_table || RP.dkax == 0 )
{
@@ -4631,7 +4607,7 @@ static void stv_vdp2_copy_roz_bitmap(bitmap_t *bitmap,
y = ys >> 16;
if ( x & clipxmask || y & clipymask ) continue;
- pix = *BITMAP_ADDR16(roz_bitmap, y & planerenderedsizey, x & planerenderedsizex);
+ pix = roz_bitmap->pix16(y & planerenderedsizey, x & planerenderedsizex);
switch( stv2_current_tilemap.transparency )
{
case STV_TRANSPARENCY_PEN:
@@ -4742,7 +4718,7 @@ static void stv_vdp2_copy_roz_bitmap(bitmap_t *bitmap,
if ( x & clipxmask || y & clipymask ) continue;
- pix = *BITMAP_ADDR16(roz_bitmap, y & planerenderedsizey, x & planerenderedsizex);
+ pix = roz_bitmap->pix16(y & planerenderedsizey, x & planerenderedsizex);
switch( stv2_current_tilemap.transparency )
{
case STV_TRANSPARENCY_PEN:
@@ -5336,7 +5312,7 @@ static void stv_vdp2_draw_rotation_screen(running_machine &machine, bitmap_t *bi
if ( (stv_rbg_cache_data.is_cache_dirty & iRP) ||
memcmp(&stv_rbg_cache_data.layer_data[iRP-1],&stv2_current_tilemap,sizeof(stv2_current_tilemap)) != 0 )
{
- bitmap_fill( state->m_vdp2.roz_bitmap[iRP-1], &roz_clip_rect , get_black_pen(machine));
+ 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);
// prepare cache data
stv_rbg_cache_data.watch_vdp2_vram_writes |= iRP;
@@ -5495,7 +5471,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(bitmap, cliprect, get_black_pen(machine));
+ bitmap->fill(get_black_pen(machine), *cliprect);
else
{
base_mask = STV_VDP2_VRAMSZ ? 0x7ffff : 0x3ffff;
@@ -5518,7 +5494,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_ADDR16(bitmap, y,x) = b | g << 5 | r << 10;
+ bitmap->pix16(y, x) = b | g << 5 | r << 10;
}
}
}
@@ -6442,7 +6418,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_ADDR16(bitmap, y, 0);
+ bitmap_line = &bitmap->pix16(y);
for ( x = mycliprect.min_x; x <= mycliprect.max_x; x++ )
{
@@ -6520,7 +6496,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_ADDR16(bitmap, y, 0);
+ bitmap_line = &bitmap->pix16(y);
for ( x = mycliprect.min_x; x <= mycliprect.max_x; x++ )
{
@@ -6624,12 +6600,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_ADDR16(bitmap, y, 0);
+ bitmap_line = &bitmap->pix16(y);
}
else
{
- bitmap_line = BITMAP_ADDR16(bitmap, 2*y, 0);
- bitmap_line2 = BITMAP_ADDR16(bitmap, 2*y + 1, 0);
+ 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++ )
@@ -7096,7 +7072,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(bitmap, cliprect, get_black_pen(machine));
+ bitmap->fill(get_black_pen(machine), *cliprect);
else
{
base_mask = STV_VDP2_VRAMSZ ? 0x7ffff : 0x3ffff;
@@ -7124,7 +7100,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_ADDR32(bitmap, y,x) = b | g << 8 | r << 16;
+ bitmap->pix32(y, x) = b | g << 8 | r << 16;
}
}
}
@@ -7314,7 +7290,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_ADDR32(bitmap, 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 029943a50a5..d39fab69526 100644
--- a/src/mame/video/suna16.c
+++ b/src/mame/video/suna16.c
@@ -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(bitmap,cliprect,0xff);
+ 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(bitmap,cliprect,0xff);
+ 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 56bffaade9e..4384bcd7093 100644
--- a/src/mame/video/suna8.c
+++ b/src/mame/video/suna8.c
@@ -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(bitmap,cliprect,0xff);
+ bitmap->fill(0xff, *cliprect);
#ifdef MAME_DEBUG
#if TILEMAPS
diff --git a/src/mame/video/supbtime.c b/src/mame/video/supbtime.c
index b1d3bbc7f06..96fa7673941 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(bitmap, cliprect, 768);
+ 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 1ef57c628c5..b1f49692626 100644
--- a/src/mame/video/superchs.c
+++ b/src/mame/video/superchs.c
@@ -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 */
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
+ 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 9bf1045831c..027e81b2bbf 100644
--- a/src/mame/video/superqix.c
+++ b/src/mame/video/superqix.c
@@ -96,8 +96,8 @@ WRITE8_HANDLER( superqix_bitmapram_w )
state->m_bitmapram[offset] = data;
- *BITMAP_ADDR16(state->m_fg_bitmap[0], y, x) = data >> 4;
- *BITMAP_ADDR16(state->m_fg_bitmap[0], y, x + 1) = data & 0x0f;
+ state->m_fg_bitmap[0]->pix16(y, x) = data >> 4;
+ state->m_fg_bitmap[0]->pix16(y, x + 1) = data & 0x0f;
}
}
@@ -111,8 +111,8 @@ WRITE8_HANDLER( superqix_bitmapram2_w )
state->m_bitmapram2[offset] = data;
- *BITMAP_ADDR16(state->m_fg_bitmap[1], y, x) = data >> 4;
- *BITMAP_ADDR16(state->m_fg_bitmap[1], y, x + 1) = data & 0x0f;
+ state->m_fg_bitmap[1]->pix16(y, x) = data >> 4;
+ state->m_fg_bitmap[1]->pix16(y, x + 1) = data & 0x0f;
}
}
diff --git a/src/mame/video/suprloco.c b/src/mame/video/suprloco.c
index a513964ed81..94c7a45ac78 100644
--- a/src/mame/video/suprloco.c
+++ b/src/mame/video/suprloco.c
@@ -165,8 +165,8 @@ INLINE void draw_pixel(bitmap_t *bitmap,const rectangle *cliprect,int x,int y,in
{
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,7 +175,7 @@ INLINE void draw_pixel(bitmap_t *bitmap,const rectangle *cliprect,int x,int y,in
y > cliprect->max_y)
return;
- *BITMAP_ADDR16(bitmap, y, x) = color;
+ bitmap->pix16(y, x) = color;
}
diff --git a/src/mame/video/suprnova.c b/src/mame/video/suprnova.c
index de12d5904a2..913e061d1eb 100644
--- a/src/mame/video/suprnova.c
+++ b/src/mame/video/suprnova.c
@@ -11,10 +11,10 @@ static void suprnova_draw_roz(bitmap_t* bitmap, bitmap_t* bitmapflags, const rec
//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;
+ 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,8 +50,8 @@ static void suprnova_draw_roz(bitmap_t* bitmap, bitmap_t* bitmapflags, const rec
cy = starty;
/* get dest and priority pointers */
- dest = BITMAP_ADDR16( bitmap, sy, sx);
- destflags = BITMAP_ADDR8( bitmapflags, sy, sx);
+ dest = &bitmap->pix16(sy, sx);
+ destflags = &bitmapflags->pix8(sy, sx);
/* loop over columns */
while (x <= ex)
@@ -60,13 +60,13 @@ static void suprnova_draw_roz(bitmap_t* bitmap, bitmap_t* bitmapflags, const rec
{
if (columnscroll)
{
- dest[0] = BITMAP_ADDR16(srcbitmap, ((cy >> 16) - scrollram[(cx>>16)&0x3ff]) & ymask, (cx >> 16) & xmask)[0];
- destflags[0] = BITMAP_ADDR8(srcbitmapflags, ((cy >> 16) - scrollram[(cx>>16)&0x3ff]) & ymask, (cx >> 16) & xmask)[0];
+ 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] = BITMAP_ADDR16(srcbitmap, (cy >> 16) & ymask, ((cx >> 16) - scrollram[(cy>>16)&0x3ff]) & xmask)[0];
- destflags[0] = BITMAP_ADDR8(srcbitmapflags, (cy >> 16) & ymask, ((cx >> 16) - scrollram[(cy>>16)&0x3ff]) & xmask)[0];
+ 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);
}
}
@@ -459,11 +459,11 @@ SCREEN_UPDATE(skns)
palette_update(screen.machine());
- bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
- bitmap_fill(state->m_tilemap_bitmap_lower, NULL, 0);
- bitmap_fill(state->m_tilemap_bitmapflags_lower, NULL, 0);
- bitmap_fill(state->m_tilemap_bitmap_higher, NULL, 0);
- bitmap_fill(state->m_tilemap_bitmapflags_higher, NULL, 0);
+ 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);
+ state->m_tilemap_bitmapflags_higher->fill(0);
{
int supernova_pri_a;
@@ -492,15 +492,15 @@ SCREEN_UPDATE(skns)
for (y=0;y<240;y++)
{
- src = BITMAP_ADDR16(state->m_tilemap_bitmap_lower, y, 0);
- srcflags = BITMAP_ADDR8(state->m_tilemap_bitmapflags_lower, y, 0);
+ src = &state->m_tilemap_bitmap_lower->pix16(y);
+ srcflags = &state->m_tilemap_bitmapflags_lower->pix8(y);
- src2 = BITMAP_ADDR16(state->m_tilemap_bitmap_higher, y, 0);
- src2flags = BITMAP_ADDR8(state->m_tilemap_bitmapflags_higher, y, 0);
+ src2 = &state->m_tilemap_bitmap_higher->pix16(y);
+ src2flags = &state->m_tilemap_bitmapflags_higher->pix8(y);
- src3 = BITMAP_ADDR16(state->m_sprite_bitmap, y, 0);
+ src3 = &state->m_sprite_bitmap->pix16(y);
- dst = BITMAP_ADDR32(bitmap, y, 0);
+ dst = &bitmap->pix32(y);
for (x=0;x<320;x++)
@@ -628,7 +628,7 @@ SCREEN_UPDATE(skns)
}
}
- bitmap_fill(state->m_sprite_bitmap, cliprect, 0x0000);
+ 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 );
diff --git a/src/mame/video/suprridr.c b/src/mame/video/suprridr.c
index 7239cdfbb9d..b3730dbdbee 100644
--- a/src/mame/video/suprridr.c
+++ b/src/mame/video/suprridr.c
@@ -177,20 +177,20 @@ SCREEN_UPDATE( suprridr )
/* render left 4 columns with no scroll */
subclip = visarea;;
subclip.max_x = subclip.min_x + (state->m_flipx ? 1*8 : 4*8) - 1;
- sect_rect(&subclip, cliprect);
+ subclip &= *cliprect;
tilemap_draw(bitmap, &subclip, state->m_bg_tilemap_noscroll, 0, 0);
/* render right 1 column with no scroll */
subclip = visarea;;
subclip.min_x = subclip.max_x - (state->m_flipx ? 4*8 : 1*8) + 1;
- sect_rect(&subclip, cliprect);
+ subclip &= *cliprect;
tilemap_draw(bitmap, &subclip, state->m_bg_tilemap_noscroll, 0, 0);
/* render the middle columns normally */
subclip = visarea;;
subclip.min_x += state->m_flipx ? 1*8 : 4*8;
subclip.max_x -= state->m_flipx ? 4*8 : 1*8;
- sect_rect(&subclip, cliprect);
+ subclip &= *cliprect;
tilemap_draw(bitmap, &subclip, state->m_bg_tilemap, 0, 0);
/* render the top layer */
diff --git a/src/mame/video/suprslam.c b/src/mame/video/suprslam.c
index ff937b9ddbd..c6fb2ff0647 100644
--- a/src/mame/video/suprslam.c
+++ b/src/mame/video/suprslam.c
@@ -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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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 c4f76ed67ef..1bef33910dc 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);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
- bitmap_fill(bitmap, cliprect, 16 * bg_colorbase);
+ 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 e7ed9e7b86b..432a8eca963 100644
--- a/src/mame/video/system1.c
+++ b/src/mame/video/system1.c
@@ -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_ADDR16(bitmap, y, 0);
+ UINT16 *destbase = &bitmap->pix16(y);
UINT16 curaddr;
int addrdelta;
@@ -506,22 +506,22 @@ static void video_update_common(screen_device &screen, bitmap_t *bitmap, const r
int x, y;
/* first clear the sprite bitmap and draw sprites within this area */
- bitmap_fill(state->m_sprite_bitmap, cliprect, 0);
+ state->m_sprite_bitmap->fill(0, *cliprect);
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 = BITMAP_ADDR16(fgpixmap, y & 0xff, 0);
- UINT16 *sprbase = BITMAP_ADDR16(state->m_sprite_bitmap, y & 0xff, 0);
- UINT16 *dstbase = BITMAP_ADDR16(bitmap, y, 0);
+ UINT16 *fgbase = &fgpixmap->pix16(y & 0xff);
+ UINT16 *sprbase = &state->m_sprite_bitmap->pix16(y & 0xff);
+ UINT16 *dstbase = &bitmap->pix16(y);
int bgy = (y + bgyscroll) & 0x1ff;
int bgxscroll = bgrowscroll[y / 8];
UINT16 *bgbase[2];
/* get the base of the left and right pixmaps for the effective background Y */
- bgbase[0] = BITMAP_ADDR16(bgpixmaps[(bgy >> 8) * 2 + 0], bgy & 0xff, 0);
- bgbase[1] = BITMAP_ADDR16(bgpixmaps[(bgy >> 8) * 2 + 1], bgy & 0xff, 0);
+ bgbase[0] = &bgpixmaps[(bgy >> 8) * 2 + 0]->pix16(bgy & 0xff);
+ bgbase[1] = &bgpixmaps[(bgy >> 8) * 2 + 1]->pix16(bgy & 0xff);
/* iterate over pixels */
for (x = cliprect->min_x; x <= cliprect->max_x; x++)
diff --git a/src/mame/video/system16.c b/src/mame/video/system16.c
index 5cf7a406aef..e35125652f4 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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(bitmap, cliprect, 0);
+ bitmap->fill(0, *cliprect);
return 0;
}
update_page(screen.machine());
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ bitmap->fill(get_black_pen(screen.machine()), *cliprect);
return 0;
}
update_page(screen.machine());
- bitmap_fill(screen.machine().priority_bitmap, NULL, 0);
+ screen.machine().priority_bitmap->fill(0);
- bitmap_fill(bitmap,cliprect,0);
+ 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/tail2nos.c b/src/mame/video/tail2nos.c
index f23eff68297..4fcca79e807 100644
--- a/src/mame/video/tail2nos.c
+++ b/src/mame/video/tail2nos.c
@@ -188,7 +188,7 @@ SCREEN_UPDATE( tail2nos )
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
}
else
- bitmap_fill(bitmap, cliprect, 0);
+ bitmap->fill(0, *cliprect);
return 0;
}
diff --git a/src/mame/video/taito_b.c b/src/mame/video/taito_b.c
index 2da870e3ad7..a7c0c09116f 100644
--- a/src/mame/video/taito_b.c
+++ b/src/mame/video/taito_b.c
@@ -15,8 +15,8 @@ WRITE16_HANDLER( hitice_pixelram_w )
if (ACCESSING_BITS_0_7)
{
/* bit 15 of pixel_scroll[0] is probably flip screen */
- *BITMAP_ADDR16(state->m_pixel_bitmap, sy, 2 * sx + 0) = state->m_b_fg_color_base * 16 + (data & 0xff);
- *BITMAP_ADDR16(state->m_pixel_bitmap, sy, 2 * sx + 1) = state->m_b_fg_color_base * 16 + (data & 0xff);
+ state->m_pixel_bitmap->pix16(sy, 2 * sx + 0) = state->m_b_fg_color_base * 16 + (data & 0xff);
+ state->m_pixel_bitmap->pix16(sy, 2 * sx + 1) = state->m_b_fg_color_base * 16 + (data & 0xff);
}
}
@@ -125,7 +125,7 @@ READ16_HANDLER( tc0180vcu_framebuffer_word_r )
int sy = offset >> 8;
int sx = 2 * (offset & 0xff);
- return (*BITMAP_ADDR16(state->m_framebuffer[sy >> 8], sy & 0xff, sx + 0) << 8) | *BITMAP_ADDR16(state->m_framebuffer[sy >> 8], sy & 0xff, sx + 1);
+ return (state->m_framebuffer[sy >> 8]->pix16(sy & 0xff, sx + 0) << 8) | state->m_framebuffer[sy >> 8]->pix16(sy & 0xff, sx + 1);
}
WRITE16_HANDLER( tc0180vcu_framebuffer_word_w )
@@ -135,9 +135,9 @@ WRITE16_HANDLER( tc0180vcu_framebuffer_word_w )
int sx = 2 * (offset & 0xff);
if (ACCESSING_BITS_8_15)
- *BITMAP_ADDR16(state->m_framebuffer[sy >> 8], sy & 0xff, sx + 0) = data >> 8;
+ state->m_framebuffer[sy >> 8]->pix16(sy & 0xff, sx + 0) = data >> 8;
if (ACCESSING_BITS_0_7)
- *BITMAP_ADDR16(state->m_framebuffer[sy >> 8], sy & 0xff, sx + 1) = data & 0xff;
+ state->m_framebuffer[sy >> 8]->pix16(sy & 0xff, sx + 1) = data & 0xff;
}
@@ -295,10 +295,10 @@ g_profiler.start(PROFILER_USER1);
/*popmessage("1. X[%3i;%3i] Y[%3i;%3i]", myclip.min_x, myclip.max_x, myclip.min_y, myclip.max_y);*/
for (y = myclip.min_y; y <= myclip.max_y; y++)
{
- UINT16 *src = BITMAP_ADDR16(state->m_framebuffer[framebuffer_page], y, myclip.min_x);
+ UINT16 *src = &state->m_framebuffer[framebuffer_page]->pix16(y, myclip.min_x);
UINT16 *dst;
- dst = BITMAP_ADDR16(bitmap, 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++)
{
@@ -315,8 +315,8 @@ g_profiler.start(PROFILER_USER1);
{
for (y = myclip.min_y; y <= myclip.max_y; y++)
{
- UINT16 *src = BITMAP_ADDR16(state->m_framebuffer[framebuffer_page], y, myclip.min_x);
- UINT16 *dst = BITMAP_ADDR16(bitmap, y, myclip.min_x);
+ UINT16 *src = &state->m_framebuffer[framebuffer_page]->pix16(y, myclip.min_x);
+ UINT16 *dst = &bitmap->pix16(y, myclip.min_x);
for (x = myclip.min_x; x <= myclip.max_x; x++)
{
@@ -337,10 +337,10 @@ g_profiler.start(PROFILER_USER1);
/*popmessage("3. X[%3i;%3i] Y[%3i;%3i]", myclip.min_x, myclip.max_x, myclip.min_y, myclip.max_y);*/
for (y = myclip.min_y ;y <= myclip.max_y; y++)
{
- UINT16 *src = BITMAP_ADDR16(state->m_framebuffer[framebuffer_page], y, myclip.min_x);
+ UINT16 *src = &state->m_framebuffer[framebuffer_page]->pix16(y, myclip.min_x);
UINT16 *dst;
- dst = BITMAP_ADDR16(bitmap, 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++)
{
@@ -357,8 +357,8 @@ g_profiler.start(PROFILER_USER1);
{
for (y = myclip.min_y; y <= myclip.max_y; y++)
{
- UINT16 *src = BITMAP_ADDR16(state->m_framebuffer[framebuffer_page], y, myclip.min_x);
- UINT16 *dst = BITMAP_ADDR16(bitmap, y, myclip.min_x);
+ UINT16 *src = &state->m_framebuffer[framebuffer_page]->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(bitmap, cliprect, 0);
+ bitmap->fill(0, *cliprect);
return 0;
}
@@ -421,7 +421,7 @@ SCREEN_UPDATE( realpunc )
/* Video blanked? */
if (!(video_control & 0x20))
{
- bitmap_fill(bitmap, cliprect, 0);
+ bitmap->fill(0, *cliprect);
return 0;
}
@@ -438,7 +438,7 @@ SCREEN_UPDATE( realpunc )
/* 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_ADDR32(bitmap, y, x) = palette[*BITMAP_ADDR16(state->m_realpunc_bitmap, 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_ADDR32(bitmap, 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,12 +476,12 @@ SCREEN_UPDATE( realpunc )
for (y = 0; y <= cliprect->max_y; y++)
{
for (x = 0; x <= cliprect->max_x; x++)
- *BITMAP_ADDR32(bitmap, y, x) = MAKE_RGB(0x00, 0x00, 0x00);
+ bitmap->pix32(y, x) = MAKE_RGB(0x00, 0x00, 0x00);
}
}
/* Clear the indexed bitmap and draw the final indexed layers */
- bitmap_fill(state->m_realpunc_bitmap, cliprect, 0);
+ state->m_realpunc_bitmap->fill(0, *cliprect);
if (!(state->m_realpunc_video_ctrl & 0x0001))
draw_framebuffer(screen.machine(), state->m_realpunc_bitmap, cliprect, 0);
@@ -493,8 +493,8 @@ SCREEN_UPDATE( realpunc )
{
for (x = 0; x <= cliprect->max_x; x++)
{
- if (*BITMAP_ADDR16(state->m_realpunc_bitmap, y, x))
- *BITMAP_ADDR32(bitmap, y, x) = palette[*BITMAP_ADDR16(state->m_realpunc_bitmap, y, x)];
+ if (state->m_realpunc_bitmap->pix16(y, x))
+ bitmap->pix32(y, x) = palette[state->m_realpunc_bitmap->pix16(y, x)];
}
}
@@ -510,7 +510,7 @@ SCREEN_EOF( taitob )
UINT8 framebuffer_page = tc0180vcu_get_fb_page(state->m_tc0180vcu, 0);
if (~video_control & 0x01)
- bitmap_fill(state->m_framebuffer[framebuffer_page], &screen.machine().primary_screen->visible_area(), 0);
+ state->m_framebuffer[framebuffer_page]->fill(0, screen.machine().primary_screen->visible_area());
if (~video_control & 0x80)
{
diff --git a/src/mame/video/taito_f2.c b/src/mame/video/taito_f2.c
index 9628521699e..35cb931efd3 100644
--- a/src/mame/video/taito_f2.c
+++ b/src/mame/video/taito_f2.c
@@ -366,8 +366,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 = BITMAP_ADDR16(dest_bmp, y, 0);
- UINT8 *pri = BITMAP_ADDR8(priority_bitmap, y, 0);
+ 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++)
@@ -985,8 +985,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) */
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
- bitmap_fill(bitmap, cliprect, 0);
+ screen.machine().priority_bitmap->fill(0, *cliprect);
+ bitmap->fill(0, *cliprect);
draw_sprites(screen.machine(), bitmap, cliprect, NULL, 0);
return 0;
}
@@ -1000,8 +1000,8 @@ SCREEN_UPDATE( taitof2_yesnoj )
tc0100scn_tilemap_update(state->m_tc0100scn);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
- bitmap_fill(bitmap, cliprect, 0); /* 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);
@@ -1018,8 +1018,8 @@ SCREEN_UPDATE( taitof2 )
tc0100scn_tilemap_update(state->m_tc0100scn);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
- bitmap_fill(bitmap, cliprect, 0); /* 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);
@@ -1051,8 +1051,8 @@ SCREEN_UPDATE( taitof2_pri )
state->m_spriteblendmode = tc0360pri_r(state->m_tc0360pri, 0) & 0xc0;
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
- bitmap_fill(bitmap, cliprect, 0); /* 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);
@@ -1113,8 +1113,8 @@ SCREEN_UPDATE( taitof2_pri_roz )
state->m_spriteblendmode = tc0360pri_r(state->m_tc0360pri, 0) & 0xc0;
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
- bitmap_fill(bitmap, cliprect, 0); /* wrong color? */
+ screen.machine().priority_bitmap->fill(0, *cliprect);
+ bitmap->fill(0, *cliprect); /* wrong color? */
drawn = 0;
for (i = 0; i < 16; i++)
@@ -1176,8 +1176,8 @@ SCREEN_UPDATE( taitof2_thundfox )
spritepri[2] = tc0360pri_r(state->m_tc0360pri, 7) & 0x0f;
spritepri[3] = tc0360pri_r(state->m_tc0360pri, 7) >> 4;
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
- bitmap_fill(bitmap, cliprect, 0); /* 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
@@ -1317,8 +1317,8 @@ SCREEN_UPDATE( taitof2_metalb )
state->m_spriteblendmode = tc0360pri_r(state->m_tc0360pri, 0) & 0xc0;
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
- bitmap_fill(bitmap, cliprect, 0);
+ 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);
@@ -1365,8 +1365,8 @@ SCREEN_UPDATE( taitof2_deadconx )
spritepri[2] = tc0360pri_r(state->m_tc0360pri, 7) & 0x0f;
spritepri[3] = tc0360pri_r(state->m_tc0360pri, 7) >> 4;
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
- bitmap_fill(bitmap, cliprect, 0);
+ 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 f78db7473d3..2388495d387 100644
--- a/src/mame/video/taito_f3.c
+++ b/src/mame/video/taito_f3.c
@@ -1459,17 +1459,17 @@ 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;
}
- dstp0 = BITMAP_ADDR8(state->m_pri_alp_bitmap, ty, x);
+ dstp0 = &state->m_pri_alp_bitmap->pix8(ty, x);
state->m_pdest_2a = state->m_f3_alpha_level_2ad ? 0x10 : 0;
state->m_pdest_2b = state->m_f3_alpha_level_2bd ? 0x20 : 0;
@@ -1482,7 +1482,7 @@ INLINE void draw_scanlines(running_machine &machine,
{
UINT32 *dsti0,*dsti;
- dsti0 = BITMAP_ADDR32(bitmap, ty, x);
+ dsti0 = &bitmap->pix32(ty, x);
while(1)
{
int cx=0;
@@ -2031,11 +2031,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=BITMAP_ADDR16(srcbitmap, y_index, 0);
+ 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=BITMAP_ADDR8(flagsbitmap, y_index, 0);
+ line_t->tsrc_s[y]=tsrc_s=&flagsbitmap->pix8(y_index);
line_t->tsrc[y]=&tsrc_s[x_index_fx>>16];
}
@@ -2148,16 +2148,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=BITMAP_ADDR16(srcbitmap_pixel, sy&0xff, 0);
+ line_t->src_s[y]=src_s=&srcbitmap_pixel->pix16(sy&0xff);
else
- line_t->src_s[y]=src_s=BITMAP_ADDR16(srcbitmap_vram, sy&0x1ff, 0);
+ 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=BITMAP_ADDR8(flagsbitmap_pixel, sy&0xff, 0);
+ line_t->tsrc_s[y]=tsrc_s=&flagsbitmap_pixel->pix8(sy&0xff);
else
- line_t->tsrc_s[y]=tsrc_s=BITMAP_ADDR8(flagsbitmap_vram, sy&0x1ff, 0);
+ line_t->tsrc_s[y]=tsrc_s=&flagsbitmap_vram->pix8(sy&0x1ff);
line_t->tsrc[y]=&tsrc_s[sx];
}
@@ -2612,16 +2612,8 @@ INLINE void f3_drawgfx(
/* KW 991012 -- Added code to force clip to bitmap boundary */
if(clip)
{
- myclip.min_x = clip->min_x;
- myclip.max_x = clip->max_x;
- myclip.min_y = clip->min_y;
- myclip.max_y = clip->max_y;
-
- if (myclip.min_x < 0) myclip.min_x = 0;
- if (myclip.max_x >= dest_bmp->width) myclip.max_x = dest_bmp->width-1;
- if (myclip.min_y < 0) myclip.min_y = 0;
- if (myclip.max_y >= dest_bmp->height) myclip.max_y = dest_bmp->height-1;
-
+ myclip = *clip;
+ myclip &= dest_bmp->cliprect();
clip=&myclip;
}
@@ -2696,9 +2688,9 @@ INLINE void f3_drawgfx(
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 = BITMAP_ADDR32(dest_bmp, sy, sx);
- UINT8 *pri0 = BITMAP_ADDR8(state->m_pri_alp_bitmap, sy, sx);
- int yadv = dest_bmp->rowpixels;
+ UINT32 *dest0 = &dest_bmp->pix32(sy, sx);
+ UINT8 *pri0 = &state->m_pri_alp_bitmap->pix8(sy, sx);
+ int yadv = dest_bmp->rowpixels();
dy=dy*16;
while(1)
{
@@ -2777,16 +2769,8 @@ INLINE void f3_drawgfxzoom(
/* KW 991012 -- Added code to force clip to bitmap boundary */
if(clip)
{
- myclip.min_x = clip->min_x;
- myclip.max_x = clip->max_x;
- myclip.min_y = clip->min_y;
- myclip.max_y = clip->max_y;
-
- if (myclip.min_x < 0) myclip.min_x = 0;
- if (myclip.max_x >= dest_bmp->width) myclip.max_x = dest_bmp->width-1;
- if (myclip.min_y < 0) myclip.min_y = 0;
- if (myclip.max_y >= dest_bmp->height) myclip.max_y = dest_bmp->height-1;
-
+ myclip = *clip;
+ myclip &= dest_bmp->cliprect();
clip=&myclip;
}
@@ -2862,8 +2846,8 @@ INLINE void f3_drawgfxzoom(
for( y=sy; y<ey; y++ )
{
const UINT8 *source = code_base + (y_index>>16) * 16;
- UINT32 *dest = BITMAP_ADDR32(dest_bmp, y, 0);
- UINT8 *pri = BITMAP_ADDR8(state->m_pri_alp_bitmap, y, 0);
+ UINT32 *dest = &dest_bmp->pix32(y);
+ UINT8 *pri = &state->m_pri_alp_bitmap->pix8(y);
int x, x_index = x_index_base;
for( x=sx; x<ex; x++ )
@@ -3245,7 +3229,7 @@ SCREEN_UPDATE( f3 )
sy_fix[4]=-sy_fix[4];
}
- bitmap_fill(state->m_pri_alp_bitmap,cliprect,0);
+ state->m_pri_alp_bitmap->fill(0, *cliprect);
/* sprites */
if (state->m_sprite_lag==0)
diff --git a/src/mame/video/taito_h.c b/src/mame/video/taito_h.c
index f5b6be98d9a..15eacbba0c8 100644
--- a/src/mame/video/taito_h.c
+++ b/src/mame/video/taito_h.c
@@ -399,7 +399,7 @@ SCREEN_UPDATE( syvalion )
taitoh_log_vram(screen.machine());
- bitmap_fill(bitmap, cliprect, 0);
+ 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(bitmap, cliprect, 0);
+ 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(bitmap, cliprect, 0);
+ 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 174aaf74d4c..a0e660f2fea 100644
--- a/src/mame/video/taito_l.c
+++ b/src/mame/video/taito_l.c
@@ -307,7 +307,7 @@ SCREEN_UPDATE( taitol )
if (state->m_cur_ctrl & 0x20) /* display enable */
{
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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(bitmap, cliprect, screen.machine().pens[0]);
+ 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 7c251d38620..a543361cc7c 100644
--- a/src/mame/video/taito_o.c
+++ b/src/mame/video/taito_o.c
@@ -144,7 +144,7 @@ SCREEN_UPDATE( parentj )
tc0080vco_tilemap_update(state->m_tc0080vco);
- bitmap_fill(bitmap, cliprect, 0);
+ 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 81beecd79d1..caa6651c9b4 100644
--- a/src/mame/video/taito_z.c
+++ b/src/mame/video/taito_z.c
@@ -853,9 +853,9 @@ SCREEN_UPDATE( contcirc )
layer[1] = layer[0] ^ 1;
layer[2] = 2;
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
+ screen.machine().priority_bitmap->fill(0, *cliprect);
- bitmap_fill(bitmap, cliprect, 0);
+ 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;
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
+ screen.machine().priority_bitmap->fill(0, *cliprect);
/* Ensure screen blanked even when bottom layer not drawn due to disable bit */
- bitmap_fill(bitmap, cliprect, 0);
+ 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;
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ screen.machine().priority_bitmap->fill(0, *cliprect);
/* Ensure screen blanked even when bottom layer not drawn due to disable bit */
- bitmap_fill(bitmap, cliprect, 0);
+ 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;
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ screen.machine().priority_bitmap->fill(0, *cliprect);
/* Ensure screen blanked even when bottom layer not drawn due to disable bit */
- bitmap_fill(bitmap, cliprect, 0);
+ 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;
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ screen.machine().priority_bitmap->fill(0, *cliprect);
/* Ensure screen blanked even when bottom layer not drawn due to disable bit */
- bitmap_fill(bitmap, cliprect, 0);
+ 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;
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ screen.machine().priority_bitmap->fill(0, *cliprect);
/* Ensure screen blanked even when bottom layer not drawn due to disable bit */
- bitmap_fill(bitmap, cliprect, 0);
+ 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 */
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ screen.machine().priority_bitmap->fill(0, *cliprect);
/* Ensure screen blanked - this shouldn't be necessary! */
- bitmap_fill(bitmap, cliprect, 0);
+ 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 ca90dc7e928..e99c98ee35a 100644
--- a/src/mame/video/taitoair.c
+++ b/src/mame/video/taitoair.c
@@ -243,7 +243,7 @@ static void fill_slope( bitmap_t *bitmap, const rectangle *cliprect, int color,
while (xx1 <= xx2)
{
- *BITMAP_ADDR16(bitmap, y1, xx1) = color + grad_col;
+ bitmap->pix16(y1, xx1) = color + grad_col;
xx1++;
}
}
@@ -372,11 +372,11 @@ WRITE16_HANDLER( dsp_flags_w )
if(offset == 1)
{
/* clear screen fb */
- bitmap_fill(state->m_framebuffer[1], &cliprect, 0);
+ 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);
/* now clear buffer fb */
- bitmap_fill(state->m_framebuffer[0], &cliprect, 0);
+ state->m_framebuffer[0]->fill(0, cliprect);
}
/* if offset 0x3001 OR 0x3002 we put data in the buffer fb */
@@ -577,7 +577,7 @@ SCREEN_UPDATE( taitoair )
tc0080vco_tilemap_update(state->m_tc0080vco);
- bitmap_fill(bitmap, cliprect, 0);
+ 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_ADDR16(bitmap,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_ADDR16(bitmap,y,x) = 0x2040 + (0x3f - ((y >> 2) & 0x3f));
+ bitmap->pix16(y, x) = 0x2040 + (0x3f - ((y >> 2) & 0x3f));
}
}
#endif
@@ -622,7 +622,7 @@ SCREEN_UPDATE( taitoair )
/* Hacky 3d bitmap */
//copybitmap_trans(bitmap, state->m_buffer3d, 0, 0, 0, 0, cliprect, 0);
- //bitmap_fill(state->m_buffer3d, cliprect, 0);
+ //state->m_buffer3d->fill(0, *cliprect);
return 0;
}
diff --git a/src/mame/video/taitoic.c b/src/mame/video/taitoic.c
index 223e376199b..37d610d588f 100644
--- a/src/mame/video/taitoic.c
+++ b/src/mame/video/taitoic.c
@@ -504,8 +504,8 @@ The data bus is 16 bits wide.
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_ADDR16(bitmap, y, x);
- UINT8 *dstp = BITMAP_ADDR8(priority, 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;
@@ -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 = BITMAP_ADDR16(srcbitmap, src_y_index, 0);
- tsrc = BITMAP_ADDR8(flagsbitmap, src_y_index, 0);
+ src16 = &srcbitmap->pix16(src_y_index);
+ tsrc = &flagsbitmap->pix8(src_y_index);
dst16 = scanline;
if (flags & TILEMAP_DRAW_OPAQUE)
@@ -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 = BITMAP_ADDR16(srcbitmap, src_y_index, 0);
- tsrc = BITMAP_ADDR8(flagsbitmap, src_y_index, 0);
+ src16 = &srcbitmap->pix16(src_y_index);
+ tsrc = &flagsbitmap->pix8(src_y_index);
dst16 = scanline;
x_step = zoomx;
@@ -1758,7 +1758,7 @@ static void tc0080vco_bg1_tilemap_draw( device_t *device, bitmap_t *bitmap, cons
UINT32 privalue = priority;
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);
@@ -2335,8 +2335,8 @@ static void tc0100scn_tilemap_draw_fg( device_t *device, bitmap_t *bitmap, const
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 = *BITMAP_ADDR16(src_bitmap, (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_ADDR16(bitmap, y, x + cliprect->min_x) = p;
+ bitmap->pix16(y, x + cliprect->min_x) = p;
if (device->machine().priority_bitmap)
{
- UINT8 *pri = BITMAP_ADDR8(device->machine().priority_bitmap, y, 0);
+ UINT8 *pri = &device->machine().priority_bitmap->pix8(y);
pri[x + cliprect->min_x] |= priority;
}
}
@@ -2377,7 +2377,7 @@ int tc0100scn_tilemap_draw( device_t *device, bitmap_t *bitmap, const rectangle
tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(device);
int disable = tc0100scn->ctrl[6] & 0xf7;
rectangle clip = *cliprect;
- sect_rect(&clip, &tc0100scn->cliprect);
+ clip &= tc0100scn->cliprect;
#if 0
if (disable != 0 && disable != 3 && disable != 7)
@@ -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 = BITMAP_ADDR16(srcbitmap, src_y_index, 0);
- tsrc = BITMAP_ADDR8(flagsbitmap, src_y_index, 0);
+ src16 = &srcbitmap->pix16(src_y_index);
+ tsrc = &flagsbitmap->pix8(src_y_index);
dst16 = scanline;
x_step = zoomx;
@@ -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 = BITMAP_ADDR16(srcbitmap, src_y_index, 0);
- tsrc = BITMAP_ADDR8(flagsbitmap, src_y_index, 0);
+ src16 = &srcbitmap->pix16(src_y_index);
+ tsrc = &flagsbitmap->pix8(src_y_index);
dst16 = scanline;
if (flags & TILEMAP_DRAW_OPAQUE)
@@ -5048,11 +5048,11 @@ 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;
}
- sect_rect(&my_clip, cliprect);
+ my_clip &= *cliprect;
if (my_clip.min_y <= my_clip.max_y)
{
diff --git a/src/mame/video/taitojc.c b/src/mame/video/taitojc.c
index 306d12d635d..625fc2a9c0d 100644
--- a/src/mame/video/taitojc.c
+++ b/src/mame/video/taitojc.c
@@ -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_ADDR16(bitmap, j, 0);
+ 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_ADDR16(bitmap, j, 0);
+ 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_ADDR16(bitmap, j, 0);
+ UINT16 *d = &bitmap->pix16(j);
int index = (iy * width) + ix;
for (i=x1; i < x2; i++)
@@ -338,7 +338,7 @@ SCREEN_UPDATE( taitojc )
}
#endif
- bitmap_fill(bitmap, cliprect, 0);
+ 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 )
@@ -364,7 +364,7 @@ SCREEN_UPDATE( taitojc )
int j;
for (j=cliprect->min_y; j <= cliprect->max_y; j++)
{
- UINT16 *d = BITMAP_ADDR16(bitmap, j, 0);
+ UINT16 *d = &bitmap->pix16(j);
int index = 2048 * j;
for (i=cliprect->min_x; i <= cliprect->max_x; i++)
@@ -400,8 +400,8 @@ static void render_solid_scan(void *dest, INT32 scanline, const poly_extent *ext
float z = extent->param[0].start;
int color = extent->param[1].start;
float dz = extent->param[0].dpdx;
- UINT16 *fb = BITMAP_ADDR16(destmap, scanline, 0);
- UINT16 *zb;// = BITMAP_ADDR16(extra->zbuffer, scanline, 0);
+ UINT16 *fb = &destmap->pix16(scanline);
+ UINT16 *zb;// = &extra->zbuffer->pix16(scanline);
int x;
// avoid crash in dendego2
@@ -410,7 +410,7 @@ static void render_solid_scan(void *dest, INT32 scanline, const poly_extent *ext
// return;
//}
- zb = BITMAP_ADDR16(extra->zbuffer, scanline, 0);
+ zb = &extra->zbuffer->pix16(scanline);
for (x = extent->startx; x < extent->stopx; x++)
{
@@ -434,7 +434,7 @@ static void render_shade_scan(void *dest, INT32 scanline, const poly_extent *ext
float color = extent->param[1].start;
float dz = extent->param[0].dpdx;
float dcolor = extent->param[1].dpdx;
- UINT16 *fb = BITMAP_ADDR16(destmap, scanline, 0);
+ UINT16 *fb = &destmap->pix16(scanline);
UINT16 *zb;
int x;
@@ -444,7 +444,7 @@ static void render_shade_scan(void *dest, INT32 scanline, const poly_extent *ext
// return;
//}
- zb = BITMAP_ADDR16(extra->zbuffer, scanline, 0);
+ zb = &extra->zbuffer->pix16(scanline);
for (x = extent->startx; x < extent->stopx; x++)
{
@@ -474,8 +474,8 @@ static void render_texture_scan(void *dest, INT32 scanline, const poly_extent *e
float du = extent->param[1].dpdx;
float dv = extent->param[2].dpdx;
float dcolor = extent->param[3].dpdx;
- UINT16 *fb = BITMAP_ADDR16(destmap, scanline, 0);
- UINT16 *zb = BITMAP_ADDR16(extra->zbuffer, scanline, 0);
+ UINT16 *fb = &destmap->pix16(scanline);
+ UINT16 *zb = &extra->zbuffer->pix16(scanline);
int tex_wrap_x = extra->tex_wrap_x;
int tex_wrap_y = extra->tex_wrap_y;
int tex_base_x = extra->tex_base_x;
@@ -794,6 +794,6 @@ void taitojc_clear_frame(running_machine &machine)
cliprect.max_x = machine.primary_screen->width() - 1;
cliprect.max_y = machine.primary_screen->height() - 1;
- bitmap_fill(state->m_framebuffer, &cliprect, 0);
- bitmap_fill(state->m_zbuffer, &cliprect, 0xffff);
+ state->m_framebuffer->fill(0, cliprect);
+ state->m_zbuffer->fill(0xffff, cliprect);
}
diff --git a/src/mame/video/taitosj.c b/src/mame/video/taitosj.c
index 00b1da74e12..33ceb6dd32e 100644
--- a/src/mame/video/taitosj.c
+++ b/src/mame/video/taitosj.c
@@ -313,7 +313,7 @@ static int check_sprite_sprite_bitpattern(running_machine &machine,
}
/* draw the sprites into separate bitmaps and check overlapping region */
- bitmap_fill(state->m_sprite_layer_collbitmap1, NULL, TRANSPARENT_PEN);
+ state->m_sprite_layer_collbitmap1->fill(TRANSPARENT_PEN);
drawgfx_transpen(state->m_sprite_sprite_collbitmap1, 0, get_sprite_gfx_element(machine, which1),
state->m_spriteram[SPRITE_RAM_PAGE_OFFSET + offs1 + 3] & 0x3f,
0,
@@ -321,7 +321,7 @@ static int check_sprite_sprite_bitpattern(running_machine &machine,
state->m_spriteram[SPRITE_RAM_PAGE_OFFSET + offs1 + 2] & 0x02,
sx1, sy1, 0);
- bitmap_fill(state->m_sprite_sprite_collbitmap2, NULL, TRANSPARENT_PEN);
+ state->m_sprite_sprite_collbitmap2->fill(TRANSPARENT_PEN);
drawgfx_transpen(state->m_sprite_sprite_collbitmap2, 0, get_sprite_gfx_element(machine, which2),
state->m_spriteram[SPRITE_RAM_PAGE_OFFSET + offs2 + 3] & 0x3f,
0,
@@ -331,8 +331,8 @@ static int check_sprite_sprite_bitpattern(running_machine &machine,
for (y = miny; y < maxy; y++)
for (x = minx; x < maxx; x++)
- if ((*BITMAP_ADDR16(state->m_sprite_sprite_collbitmap1, y, x) != TRANSPARENT_PEN) &&
- (*BITMAP_ADDR16(state->m_sprite_sprite_collbitmap2, y, x) != TRANSPARENT_PEN))
+ if ((state->m_sprite_sprite_collbitmap1->pix16(y, x) != TRANSPARENT_PEN) &&
+ (state->m_sprite_sprite_collbitmap2->pix16(y, x) != TRANSPARENT_PEN))
return 1; /* collided */
return 0;
@@ -470,7 +470,7 @@ static int check_sprite_layer_bitpattern(running_machine &machine, int which, re
int flip_y = (state->m_spriteram[SPRITE_RAM_PAGE_OFFSET + offs + 2] & 0x02) ^ GLOBAL_FLIP_Y;
/* draw sprite into a bitmap and check if layers collide */
- bitmap_fill(state->m_sprite_layer_collbitmap1, NULL, TRANSPARENT_PEN);
+ state->m_sprite_layer_collbitmap1->fill(TRANSPARENT_PEN);
drawgfx_transpen(state->m_sprite_layer_collbitmap1, 0,get_sprite_gfx_element(machine, which),
state->m_spriteram[SPRITE_RAM_PAGE_OFFSET + offs + 3] & 0x3f,
0,
@@ -479,15 +479,15 @@ static int check_sprite_layer_bitpattern(running_machine &machine, int which, re
for (y = miny; y < maxy; y++)
for (x = minx; x < maxx; x++)
- if (*BITMAP_ADDR16(state->m_sprite_layer_collbitmap1, y - miny, x - minx) != TRANSPARENT_PEN) /* is there anything to check for ? */
+ if (state->m_sprite_layer_collbitmap1->pix16(y - miny, x - minx) != TRANSPARENT_PEN) /* is there anything to check for ? */
{
- if (check_layer_1 && (*BITMAP_ADDR16(state->m_sprite_layer_collbitmap2[0], y, x) != TRANSPARENT_PEN))
+ if (check_layer_1 && (state->m_sprite_layer_collbitmap2[0]->pix16(y, x) != TRANSPARENT_PEN))
result |= 0x01; /* collided with layer 1 */
- if (check_layer_2 && (*BITMAP_ADDR16(state->m_sprite_layer_collbitmap2[1], y, x) != TRANSPARENT_PEN))
+ if (check_layer_2 && (state->m_sprite_layer_collbitmap2[1]->pix16(y, x) != TRANSPARENT_PEN))
result |= 0x02; /* collided with layer 2 */
- if (check_layer_3 && (*BITMAP_ADDR16(state->m_sprite_layer_collbitmap2[2], y, x) != TRANSPARENT_PEN))
+ if (check_layer_3 && (state->m_sprite_layer_collbitmap2[2]->pix16(y, x) != TRANSPARENT_PEN))
result |= 0x04; /* collided with layer 3 */
}
@@ -519,9 +519,9 @@ static void draw_layers(running_machine &machine)
taitosj_state *state = machine.driver_data<taitosj_state>();
offs_t offs;
- bitmap_fill(state->m_layer_bitmap[0], NULL, TRANSPARENT_PEN);
- bitmap_fill(state->m_layer_bitmap[1], NULL, TRANSPARENT_PEN);
- bitmap_fill(state->m_layer_bitmap[2], NULL, TRANSPARENT_PEN);
+ state->m_layer_bitmap[0]->fill(TRANSPARENT_PEN);
+ state->m_layer_bitmap[1]->fill(TRANSPARENT_PEN);
+ state->m_layer_bitmap[2]->fill(TRANSPARENT_PEN);
for (offs = 0; offs < 0x0400; offs++)
{
@@ -561,16 +561,8 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap)
Note that the clipping is asymmetrical. This matches the real thing.
I'm not sure of what should happen when the screen is flipped, though.
*/
- static const rectangle spritevisiblearea =
- {
- 0*8+3, 32*8-1-1,
- 2*8, 30*8-1
- };
- static const rectangle spritevisibleareaflip =
- {
- 0*8+1, 32*8-3-1,
- 2*8, 30*8-1
- };
+ const rectangle spritevisiblearea(0*8+3, 32*8-1-1, 2*8, 30*8-1);
+ const rectangle spritevisibleareaflip(0*8+1, 32*8-3-1, 2*8, 30*8-1);
if (SPRITES_ON)
{
@@ -712,7 +704,7 @@ static void copy_layers(running_machine &machine, bitmap_t *bitmap, const rectan
int i = 0;
/* fill the screen with the background color */
- bitmap_fill(bitmap, cliprect, 8 * (state->m_colorbank[1] & 0x07));
+ bitmap->fill(8 * (state->m_colorbank[1] & 0x07), *cliprect);
for (i = 0; i < 4; i++)
{
diff --git a/src/mame/video/tank8.c b/src/mame/video/tank8.c
index ed7d253de42..188fb57dae5 100644
--- a/src/mame/video/tank8.c
+++ b/src/mame/video/tank8.c
@@ -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(bitmap, &rect, (i << 1) | 0x01);
+ bitmap->fill((i << 1) | 0x01, rect);
}
}
@@ -211,8 +211,8 @@ SCREEN_EOF( tank8 )
tilemap_draw(state->m_helper1, &visarea, state->m_tilemap, 0, 0);
- bitmap_fill(state->m_helper2, &visarea, 8);
- bitmap_fill(state->m_helper3, &visarea, 8);
+ 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);
@@ -221,9 +221,9 @@ SCREEN_EOF( tank8 )
{
int _state = 0;
- const UINT16* p1 = BITMAP_ADDR16(state->m_helper1, y, 0);
- const UINT16* p2 = BITMAP_ADDR16(state->m_helper2, y, 0);
- const UINT16* p3 = BITMAP_ADDR16(state->m_helper3, y, 0);
+ const UINT16* p1 = &state->m_helper1->pix16(y);
+ const UINT16* p2 = &state->m_helper2->pix16(y);
+ const UINT16* p3 = &state->m_helper3->pix16(y);
if (y % 2 != screen.machine().primary_screen->frame_number() % 2)
continue; /* video display is interlaced */
diff --git a/src/mame/video/tatsumi.c b/src/mame/video/tatsumi.c
index 6783b33d517..f85deb301a4 100644
--- a/src/mame/video/tatsumi.c
+++ b/src/mame/video/tatsumi.c
@@ -268,16 +268,8 @@ INLINE void roundupt_drawgfxzoomrotate(
/* KW 991012 -- Added code to force clip to bitmap boundary */
if(clip)
{
- myclip.min_x = clip->min_x;
- myclip.max_x = clip->max_x;
- myclip.min_y = clip->min_y;
- myclip.max_y = clip->max_y;
-
- if (myclip.min_x < 0) myclip.min_x = 0;
- if (myclip.max_x >= dest_bmp->width) myclip.max_x = dest_bmp->width-1;
- if (myclip.min_y < 0) myclip.min_y = 0;
- if (myclip.max_y >= dest_bmp->height) myclip.max_y = dest_bmp->height-1;
-
+ myclip = *clip;
+ myclip &= dest_bmp->cliprect();
clip=&myclip;
}
@@ -403,7 +395,7 @@ INLINE void roundupt_drawgfxzoomrotate(
for( y=sy; y<ey; y++ )
{
- UINT32 *dest = BITMAP_ADDR32(dest_bmp, y, 0);
+ UINT32 *dest = &dest_bmp->pix32(y);
int cx = startx;
int cy = starty;
@@ -434,8 +426,8 @@ INLINE void roundupt_drawgfxzoomrotate(
for( y=sy; y<ey; y++ )
{
const UINT8 *source = code_base + (y_index>>16) * gfx->line_modulo;
- UINT32 *dest = BITMAP_ADDR32(dest_bmp, y, 0);
- UINT8 *priority_dest = BITMAP_ADDR8(dest_bmp, y, 0);
+ 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++ )
@@ -501,13 +493,13 @@ static void mycopyrozbitmap_core(bitmap_t *bitmap,bitmap_t *srcbitmap,
x = sx;
cx = startx;
cy = starty;
- dest = BITMAP_ADDR32(bitmap, sy, sx);
+ dest = &bitmap->pix32(sy, sx);
while (x <= ex)
{
if (cx < widthshifted && cy < heightshifted)
{
- int c = *BITMAP_ADDR32(srcbitmap, cy >> 16, cx >> 16);
+ int c = srcbitmap->pix32(cy >> 16, cx >> 16);
if (c != transparent_color)
*dest = c;
@@ -612,7 +604,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const recta
if (rotate)
{
render_y = 0;
- bitmap_fill(state->m_temp_bitmap, 0, 0);
+ state->m_temp_bitmap->fill(0);
}
extent_x = extent_y = 0;
@@ -729,7 +721,7 @@ start_offset-=48;
if (col<palette_base) col=palette_base;
if (col>palette_base+127) col=palette_base+127;
- *BITMAP_ADDR32(bitmap, y, x) = machine.pens[col];
+ bitmap->pix32(y, x) = machine.pens[col];
}
}
}
@@ -860,11 +852,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=*BITMAP_ADDR8(shadow_bitmap, y, x);
+ UINT8 shadow=shadow_bitmap->pix8(y, x);
if (shadow)
- *BITMAP_ADDR32(bitmap, y, x) = machine.pens[768 + pal*16 + col];
+ bitmap->pix32(y, x) = machine.pens[768 + pal*16 + col];
else
- *BITMAP_ADDR32(bitmap, 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 */
@@ -879,16 +871,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=*BITMAP_ADDR8(shadow_bitmap, 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_ADDR32(bitmap, y, x) = machine.pens[768 + pal*16 + col];
+ bitmap->pix32(y, x) = machine.pens[768 + pal*16 + col];
else
- *BITMAP_ADDR32(bitmap, y, x) = machine.pens[256 + pal*16 + col];
+ bitmap->pix32(y, x) = machine.pens[256 + pal*16 + col];
samplePos+=step;
}
@@ -910,16 +902,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=*BITMAP_ADDR8(shadow_bitmap, 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_ADDR32(bitmap, y, x) = machine.pens[768 + pal*16 + col + 32];
+ bitmap->pix32(y, x) = machine.pens[768 + pal*16 + col + 32];
else
- *BITMAP_ADDR32(bitmap, y, x) = machine.pens[256 + pal*16 + col + 32];
+ bitmap->pix32(y, x) = machine.pens[256 + pal*16 + col + 32];
}
if (endPos<0) {
@@ -934,16 +926,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=*BITMAP_ADDR8(shadow_bitmap, 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_ADDR32(bitmap, y, x) = machine.pens[768 + pal*16 + col + 32];
+ bitmap->pix32(y, x) = machine.pens[768 + pal*16 + col + 32];
else
- *BITMAP_ADDR32(bitmap, y, x) = machine.pens[256 + pal*16 + col + 32];
+ bitmap->pix32(y, x) = machine.pens[256 + pal*16 + col + 32];
samplePos+=step;
}
@@ -1013,12 +1005,12 @@ 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=*BITMAP_ADDR16(src_bitmap, 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
- *BITMAP_ADDR32(dst, y, x) = machine.pens[ppp];
+ dst->pix32(y, x) = machine.pens[ppp];
}
}
}
@@ -1045,7 +1037,7 @@ static void draw_ground(running_machine &machine, bitmap_t *dst, const rectangle
/* Sky */
for (x = cliprect->min_x; x <= cliprect->max_x; ++x)
{
- *BITMAP_ADDR32(dst, 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;
@@ -1075,7 +1067,7 @@ static void draw_ground(running_machine &machine, bitmap_t *dst, const rectangle
colour = (BIT(hval, 11) << 4) | (colour << 2) | ln;
/* Draw the pixel */
- *BITMAP_ADDR32(dst, y, x) = machine.pens[0x200 + colour];
+ dst->pix32(y, x) = machine.pens[0x200 + colour];
/* Update horizontal counter */
gha = (gha + 1) & 0xfff;
@@ -1097,7 +1089,7 @@ SCREEN_UPDATE( apache3 )
tilemap_set_scrollx(state->m_tx_layer,0,24);
- bitmap_fill(bitmap,cliprect,screen.machine().pens[0]);
+ 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);
@@ -1116,8 +1108,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(bitmap,cliprect,screen.machine().pens[384]); // todo
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
+ 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);
@@ -1139,7 +1131,7 @@ SCREEN_UPDATE( cyclwarr )
state->m_bigfight_last_bank=state->m_bigfight_bank;
}
- bitmap_fill(bitmap,cliprect,screen.machine().pens[0]);
+ 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);
@@ -1164,7 +1156,7 @@ SCREEN_UPDATE( bigfight )
state->m_bigfight_last_bank=state->m_bigfight_bank;
}
- bitmap_fill(bitmap,cliprect,screen.machine().pens[0]);
+ 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 65fe32179d2..20ab7fd585c 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(bitmap,cliprect,0);
+ 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_ADDR16(bitmap, 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_ADDR16(bitmap, 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_ADDR16(bitmap, 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_ADDR16(bitmap, 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 a11972c1547..5e3486a704b 100644
--- a/src/mame/video/tbowl.c
+++ b/src/mame/video/tbowl.c
@@ -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(bitmap,cliprect,0x100); /* 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(bitmap,cliprect,0x100); /* 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 a40b7de15bc..07a1cd09d0a 100644
--- a/src/mame/video/tceptor.c
+++ b/src/mame/video/tceptor.c
@@ -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_ADDR16(bitmap, y, x)) == SPR_MASK_COLOR)
+ if (colortable_entry_get_value(machine.colortable, bitmap->pix16(y, x)) == SPR_MASK_COLOR)
// restore pixel
- *BITMAP_ADDR16(bitmap, y, x) = *BITMAP_ADDR16(state->m_temp_bitmap, 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 84abcb80e5d..7be28bd4751 100644
--- a/src/mame/video/tecmo.c
+++ b/src/mame/video/tecmo.c
@@ -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>();
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
- bitmap_fill(bitmap,cliprect,0x100);
+ 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 202f3caeabd..4f18960dc46 100644
--- a/src/mame/video/tecmo16.c
+++ b/src/mame/video/tecmo16.c
@@ -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 = (UINT16 *)src1->base; /* source data */
- UINT16 *sd2 = (UINT16 *)src2->base;
- UINT16 *sd3 = (UINT16 *)src3->base;
+ 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 = BITMAP_ADDR32(dest, 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);
@@ -493,11 +493,11 @@ 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>();
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
+ screen.machine().priority_bitmap->fill(0, *cliprect);
- bitmap_fill(state->m_tile_bitmap_bg, cliprect, 0x300);
- bitmap_fill(state->m_tile_bitmap_fg, cliprect, 0);
- bitmap_fill(state->m_sprite_bitmap, cliprect, 0);
+ 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);
diff --git a/src/mame/video/tecmosys.c b/src/mame/video/tecmosys.c
index c0703144b39..442b0fe2c29 100644
--- a/src/mame/video/tecmosys.c
+++ b/src/mame/video/tecmosys.c
@@ -124,7 +124,7 @@ static void tecmosys_render_sprites_to_bitmap(running_machine &machine, bitmap_t
int i;
/* render sprites (with priority information) to temp bitmap */
- bitmap_fill(state->m_sprite_bitmap, NULL, 0x0000);
+ state->m_sprite_bitmap->fill(0x0000);
/* there are multiple spritelists in here, to allow for buffering */
for (i=(state->m_spritelist*0x4000)/2;i<((state->m_spritelist+1)*0x4000)/2;i+=8)
{
@@ -194,7 +194,7 @@ static void tecmosys_render_sprites_to_bitmap(running_machine &machine, bitmap_t
{
UINT8 data;
- dstptr = BITMAP_ADDR16(state->m_sprite_bitmap, drawy, drawx);
+ dstptr = &state->m_sprite_bitmap->pix16(drawy, drawx);
data = (gfxsrc[address]);
@@ -216,8 +216,8 @@ static void tecmosys_tilemap_copy_to_compose(tecmosys_state *state, UINT16 pri)
UINT16 *dstptr;
for (y=0;y<240;y++)
{
- srcptr = BITMAP_ADDR16(state->m_tmp_tilemap_renderbitmap, y, 0);
- dstptr = BITMAP_ADDR16(state->m_tmp_tilemap_composebitmap, y, 0);
+ srcptr = &state->m_tmp_tilemap_renderbitmap->pix16(y);
+ dstptr = &state->m_tmp_tilemap_composebitmap->pix16(y);
for (x=0;x<320;x++)
{
if ((srcptr[x]&0xf)!=0x0)
@@ -237,10 +237,10 @@ static void tecmosys_do_final_mix(running_machine &machine, bitmap_t* bitmap)
for (y=0;y<240;y++)
{
- srcptr = BITMAP_ADDR16(state->m_tmp_tilemap_composebitmap, y, 0);
- srcptr2 = BITMAP_ADDR16(state->m_sprite_bitmap, y, 0);
+ srcptr = &state->m_tmp_tilemap_composebitmap->pix16(y);
+ srcptr2 = &state->m_sprite_bitmap->pix16(y);
- dstptr = BITMAP_ADDR32(bitmap, y, 0);
+ 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(bitmap,cliprect,screen.machine().pens[0x4000]);
+ bitmap->fill(screen.machine().pens[0x4000], *cliprect);
tilemap_set_scrolly( state->m_bg0tilemap, 0, state->m_c80000regs[1]+16);
@@ -313,21 +313,21 @@ SCREEN_UPDATE(tecmosys)
tilemap_set_scrolly( state->m_bg2tilemap, 0, state->m_b00000regs[1]+17);
tilemap_set_scrollx( state->m_bg2tilemap, 0, state->m_b00000regs[0]+106);
- bitmap_fill(state->m_tmp_tilemap_composebitmap,cliprect,0);
+ state->m_tmp_tilemap_composebitmap->fill(0, *cliprect);
- bitmap_fill(state->m_tmp_tilemap_renderbitmap,cliprect,0);
+ state->m_tmp_tilemap_renderbitmap->fill(0, *cliprect);
tilemap_draw(state->m_tmp_tilemap_renderbitmap,cliprect,state->m_bg0tilemap,0,0);
tecmosys_tilemap_copy_to_compose(state, 0x0000);
- bitmap_fill(state->m_tmp_tilemap_renderbitmap,cliprect,0);
+ state->m_tmp_tilemap_renderbitmap->fill(0, *cliprect);
tilemap_draw(state->m_tmp_tilemap_renderbitmap,cliprect,state->m_bg1tilemap,0,0);
tecmosys_tilemap_copy_to_compose(state, 0x4000);
- bitmap_fill(state->m_tmp_tilemap_renderbitmap,cliprect,0);
+ state->m_tmp_tilemap_renderbitmap->fill(0, *cliprect);
tilemap_draw(state->m_tmp_tilemap_renderbitmap,cliprect,state->m_bg2tilemap,0,0);
tecmosys_tilemap_copy_to_compose(state, 0x8000);
- bitmap_fill(state->m_tmp_tilemap_renderbitmap,cliprect,0);
+ state->m_tmp_tilemap_renderbitmap->fill(0, *cliprect);
tilemap_draw(state->m_tmp_tilemap_renderbitmap,cliprect,state->m_txt_tilemap,0,0);
tecmosys_tilemap_copy_to_compose(state, 0xc000);
@@ -344,13 +344,13 @@ VIDEO_START(tecmosys)
{
tecmosys_state *state = machine.driver_data<tecmosys_state>();
state->m_sprite_bitmap = auto_bitmap_alloc(machine,320,240,BITMAP_FORMAT_INDEXED16);
- bitmap_fill(state->m_sprite_bitmap, NULL, 0x4000);
+ state->m_sprite_bitmap->fill(0x4000);
state->m_tmp_tilemap_composebitmap = auto_bitmap_alloc(machine,320,240,BITMAP_FORMAT_INDEXED16);
state->m_tmp_tilemap_renderbitmap = auto_bitmap_alloc(machine,320,240,BITMAP_FORMAT_INDEXED16);
- bitmap_fill(state->m_tmp_tilemap_composebitmap, NULL, 0x0000);
- bitmap_fill(state->m_tmp_tilemap_renderbitmap, NULL, 0x0000);
+ state->m_tmp_tilemap_composebitmap->fill(0x0000);
+ state->m_tmp_tilemap_renderbitmap->fill(0x0000);
state->m_txt_tilemap = tilemap_create(machine, get_fg_tile_info,tilemap_scan_rows,8,8,32*2,32*2);
diff --git a/src/mame/video/terracre.c b/src/mame/video/terracre.c
index 2ec4a8a7475..1816bb7143b 100644
--- a/src/mame/video/terracre.c
+++ b/src/mame/video/terracre.c
@@ -206,7 +206,7 @@ SCREEN_UPDATE( amazon )
{
terracre_state *state = screen.machine().driver_data<terracre_state>();
if( state->m_xscroll&0x2000 )
- bitmap_fill( bitmap,cliprect ,get_black_pen(screen.machine()));
+ 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 20a25db7f64..72f69ab05e4 100644
--- a/src/mame/video/tetrisp2.c
+++ b/src/mame/video/tetrisp2.c
@@ -471,8 +471,8 @@ SCREEN_UPDATE( tetrisp2 )
flipscreen = (state->m_systemregs[0x00] & 0x02);
/* Black background color */
- bitmap_fill(bitmap, cliprect, 0);
- bitmap_fill(screen.machine().priority_bitmap, NULL, 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(bitmap, cliprect, 0);
- bitmap_fill(screen.machine().priority_bitmap, NULL, 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(bitmap, cliprect, screen.machine().pens[0x0000]);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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(bitmap, cliprect, screen.machine().pens[0x0000]);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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 85be395e293..a893c3958fa 100644
--- a/src/mame/video/thedeep.c
+++ b/src/mame/video/thedeep.c
@@ -224,7 +224,7 @@ SCREEN_UPDATE( thedeep )
tilemap_set_scrolly(state->m_tilemap_0, x, y + scrolly);
}
- bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine()));
+ 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 4a3e7388150..38d14df6007 100644
--- a/src/mame/video/thepit.c
+++ b/src/mame/video/thepit.c
@@ -10,20 +10,6 @@
#include "includes/thepit.h"
-static const rectangle spritevisiblearea =
-{
- 2*8+1, 32*8-1,
- 2*8, 30*8-1
-};
-
-static const rectangle spritevisibleareaflipx =
-{
- 0*8, 30*8-2,
- 2*8, 30*8-1
-};
-
-
-
/***************************************************************************
Convert the color PROMs into a more useable format.
@@ -249,6 +235,9 @@ static void draw_sprites(running_machine &machine,
const rectangle *cliprect,
int priority_to_draw)
{
+ 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);
+
thepit_state *state = machine.driver_data<thepit_state>();
int offs;
diff --git a/src/mame/video/thief.c b/src/mame/video/thief.c
index adc6d2566c2..0aaee755cb2 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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_ADDR16(bitmap, 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_ADDR16(bitmap, 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 bcdc15a778c..497d8352424 100644
--- a/src/mame/video/thoop2.c
+++ b/src/mame/video/thoop2.c
@@ -210,7 +210,7 @@ SCREEN_UPDATE( thoop2 )
thoop2_sort_sprites(screen.machine());
- bitmap_fill( bitmap, cliprect , 0);
+ 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 b92e326c785..987373e2d98 100644
--- a/src/mame/video/thunderj.c
+++ b/src/mame/video/thunderj.c
@@ -131,7 +131,7 @@ SCREEN_UPDATE( thunderj )
int x, y, r;
/* draw the playfield */
- bitmap_fill(priority_bitmap, cliprect, 0);
+ 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);
@@ -146,9 +146,9 @@ SCREEN_UPDATE( thunderj )
for (r = 0; r < rectlist.numrects; r++, rectlist.rect++)
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
- UINT16 *mo = (UINT16 *)mobitmap->base + mobitmap->rowpixels * y;
- UINT16 *pf = (UINT16 *)bitmap->base + bitmap->rowpixels * y;
- UINT8 *pri = (UINT8 *)priority_bitmap->base + priority_bitmap->rowpixels * y;
+ UINT16 *mo = &mobitmap->pix16(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])
{
@@ -245,8 +245,8 @@ SCREEN_UPDATE( thunderj )
for (r = 0; r < rectlist.numrects; r++, rectlist.rect++)
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
- UINT16 *mo = (UINT16 *)mobitmap->base + mobitmap->rowpixels * y;
- UINT16 *pf = (UINT16 *)bitmap->base + bitmap->rowpixels * y;
+ UINT16 *mo = &mobitmap->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 f5852b0fa68..fca688a83c8 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);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ screen.machine().priority_bitmap->fill(0, *cliprect);
/* The background color is always from layer 1 - but it's always black anyway */
-// bitmap_fill(bitmap,cliprect,16 * state->m_layer_colorbase[1]);
+// 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 63c25d09f8d..62f190e729a 100644
--- a/src/mame/video/tia.c
+++ b/src/mame/video/tia.c
@@ -819,7 +819,7 @@ static void update_bitmap(int next_x, int next_y)
if (collision_check(lineM0, lineM1, colx1, x2))
CXPPMM |= 0x40;
- p = BITMAP_ADDR16(helper[current_bitmap], y % screen_height, 34);
+ p = &helper[current_bitmap]->pix16(y % screen_height, 34);
for (x = x1; x < x2; x++)
{
@@ -828,12 +828,12 @@ static void update_bitmap(int next_x, int next_y)
if ( x2 == 160 && y % screen_height == (screen_height - 1) ) {
int t_y;
- for ( t_y = 0; t_y < helper[2]->height; t_y++ ) {
- UINT16* l0 = BITMAP_ADDR16( helper[current_bitmap], t_y, 0 );
- UINT16* l1 = BITMAP_ADDR16( helper[1 - current_bitmap], t_y, 0 );
- UINT16* l2 = BITMAP_ADDR16( helper[2], t_y, 0 );
+ for ( t_y = 0; t_y < helper[2]->height(); t_y++ ) {
+ UINT16* l0 = &helper[current_bitmap]->pix16(t_y);
+ UINT16* l1 = &helper[1 - current_bitmap]->pix16(t_y);
+ UINT16* l2 = &helper[2]->pix16(t_y);
int t_x;
- for( t_x = 0; t_x < helper[2]->width; t_x++ ) {
+ for( t_x = 0; t_x < helper[2]->width(); t_x++ ) {
if ( l0[t_x] != l1[t_x] ) {
/* Combine both entries */
l2[t_x] = ( ( l0[t_x] + 1 ) << 7 ) | l1[t_x];
@@ -1188,7 +1188,7 @@ static WRITE8_HANDLER( HMOVE_w )
}
if (curr_y < screen_height)
{
- memset(BITMAP_ADDR16(helper[current_bitmap], curr_y, 34), 0, 16);
+ memset(&helper[current_bitmap]->pix16(curr_y, 34), 0, 16);
}
prev_x = 8;
diff --git a/src/mame/video/tmnt.c b/src/mame/video/tmnt.c
index 3ccbd518fc8..5f19072c4a8 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);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
- bitmap_fill(bitmap, cliprect, 16 * bg_colorbase);
+ 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 */
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
- bitmap_fill(bitmap, cliprect,16 * bg_colorbase);
+ 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_ADDR16(bitmap, 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_ADDR16(bitmap, 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_ADDR16(bitmap, 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);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
- bitmap_fill(bitmap, cliprect, 16 * bg_colorbase);
+ 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 d28ef5251be..734cd0fe939 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(bitmap, cliprect, 0x1f0);
+ 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 eec3b08b1cb..7dc548b825d 100644
--- a/src/mame/video/toaplan1.c
+++ b/src/mame/video/toaplan1.c
@@ -1035,8 +1035,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 = BITMAP_ADDR16(dest_bmp, y, 0);
- UINT8 *pri = BITMAP_ADDR8(priority_bitmap, y, 0);
+ 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++ )
@@ -1171,7 +1171,7 @@ SCREEN_UPDATE( rallybik )
toaplan1_log_vram(screen.machine());
- bitmap_fill(bitmap,cliprect,0x120);
+ 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);
@@ -1195,8 +1195,8 @@ SCREEN_UPDATE( toaplan1 )
toaplan1_log_vram(screen.machine());
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
- bitmap_fill(bitmap,cliprect,0x120);
+ 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 327f29a0e9b..6a759da05d6 100644
--- a/src/mame/video/toaplan2.c
+++ b/src/mame/video/toaplan2.c
@@ -297,14 +297,14 @@ SCREEN_UPDATE( toaplan2_dual )
if (state->m_vdp1)
{
- bitmap_fill(bitmap,cliprect,0);
- bitmap_fill(state->m_custom_priority_bitmap, cliprect, 0);
+ 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(bitmap,cliprect,0);
- bitmap_fill(state->m_custom_priority_bitmap, cliprect, 0);
+ // bitmap->fill(0, *cliprect);
+ state->m_custom_priority_bitmap->fill(0, *cliprect);
state->m_vdp0->gp9001_render_vdp(screen.machine(), bitmap, cliprect);
}
@@ -318,19 +318,19 @@ SCREEN_UPDATE( toaplan2_mixed )
{
toaplan2_state *state = screen.machine().driver_data<toaplan2_state>();
-// bitmap_fill(bitmap,cliprect,0);
-// bitmap_fill(gp9001_custom_priority_bitmap, cliprect, 0);
+// bitmap->fill(0, *cliprect);
+// gp9001_custom_priority_bitmap->fill(0, *cliprect);
if (state->m_vdp0)
{
- bitmap_fill(bitmap,cliprect,0);
- bitmap_fill(state->m_custom_priority_bitmap, cliprect, 0);
+ bitmap->fill(0, *cliprect);
+ state->m_custom_priority_bitmap->fill(0, *cliprect);
state->m_vdp0->gp9001_render_vdp(screen.machine(), bitmap, cliprect);
}
if (state->m_vdp1)
{
- bitmap_fill(state->m_secondary_render_bitmap,cliprect,0);
- bitmap_fill(state->m_custom_priority_bitmap, cliprect, 0);
+ 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);
}
@@ -356,8 +356,8 @@ SCREEN_UPDATE( toaplan2_mixed )
for (y=0;y<height;y++)
{
- src_vdp0 = BITMAP_ADDR16(bitmap, y, 0);
- src_vdp1 = BITMAP_ADDR16(state->m_secondary_render_bitmap, y, 0);
+ src_vdp0 = &bitmap->pix16(y);
+ src_vdp1 = &state->m_secondary_render_bitmap->pix16(y);
for (x=0;x<width;x++)
{
@@ -420,8 +420,8 @@ SCREEN_UPDATE( toaplan2 )
if (state->m_vdp0)
{
- bitmap_fill(bitmap,cliprect,0);
- bitmap_fill(state->m_custom_priority_bitmap, cliprect, 0);
+ 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/toobin.c b/src/mame/video/toobin.c
index b5683e95ca9..b818e433e59 100644
--- a/src/mame/video/toobin.c
+++ b/src/mame/video/toobin.c
@@ -238,7 +238,7 @@ SCREEN_UPDATE( toobin )
int x, y;
/* draw the playfield */
- bitmap_fill(priority_bitmap, cliprect, 0);
+ 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);
@@ -248,10 +248,10 @@ SCREEN_UPDATE( toobin )
mobitmap = atarimo_render(0, cliprect, &rectlist);
for (y = cliprect->min_y; y <= cliprect->max_y; y++)
{
- UINT32 *dest = BITMAP_ADDR32(bitmap, y, 0);
- UINT16 *mo = BITMAP_ADDR16(mobitmap, y, 0);
- UINT16 *pf = BITMAP_ADDR16(state->m_pfbitmap, y, 0);
- UINT8 *pri = BITMAP_ADDR8(priority_bitmap, y, 0);
+ UINT32 *dest = &bitmap->pix32(y);
+ UINT16 *mo = &mobitmap->pix16(y);
+ UINT16 *pf = &state->m_pfbitmap->pix16(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 211dca44e6e..c2666a616ee 100644
--- a/src/mame/video/topspeed.c
+++ b/src/mame/video/topspeed.c
@@ -155,8 +155,8 @@ SCREEN_UPDATE( topspeed )
layer[2] = 1;
layer[3] = 0;
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
- bitmap_fill(bitmap, cliprect, 0);
+ 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 870a4f103df..01e3bdaccd4 100644
--- a/src/mame/video/toypop.c
+++ b/src/mame/video/toypop.c
@@ -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_ADDR16(bitmap, y, 0);
+ 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_ADDR16(bitmap, y, 0);
+ UINT16 *scanline = &bitmap->pix16(y);
for (int x = 0; x < 288; x+=2)
{
UINT16 data = state->m_bg_image[offs];
diff --git a/src/mame/video/travrusa.c b/src/mame/video/travrusa.c
index 0d3f510829c..e34ccbfc4fa 100644
--- a/src/mame/video/travrusa.c
+++ b/src/mame/video/travrusa.c
@@ -297,21 +297,13 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectan
{
travrusa_state *state = machine.driver_data<travrusa_state>();
int offs;
- static const rectangle spritevisiblearea =
- {
- 1*8, 31*8-1,
- 0*8, 24*8-1
- };
- static const rectangle spritevisibleareaflip =
- {
- 1*8, 31*8-1,
- 8*8, 32*8-1
- };
+ const rectangle spritevisiblearea(1*8, 31*8-1, 0*8, 24*8-1);
+ const rectangle spritevisibleareaflip(1*8, 31*8-1, 8*8, 32*8-1);
rectangle clip = *cliprect;
if (flip_screen_get(machine))
- sect_rect(&clip, &spritevisibleareaflip);
+ clip &= spritevisibleareaflip;
else
- sect_rect(&clip, &spritevisiblearea);
+ clip &= spritevisiblearea;
for (offs = state->m_spriteram_size - 4; offs >= 0; offs -= 4)
diff --git a/src/mame/video/triplhnt.c b/src/mame/video/triplhnt.c
index e9a610d594d..8ec5f148f6f 100644
--- a/src/mame/video/triplhnt.c
+++ b/src/mame/video/triplhnt.c
@@ -97,8 +97,8 @@ 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 = *BITMAP_ADDR16(state->m_helper, y, x);
- pen_t b = *BITMAP_ADDR16(bitmap, y, x);
+ pen_t a = state->m_helper->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_ADDR16(bitmap, y, x) = a;
+ bitmap->pix16(y, x) = a;
}
}
}
diff --git a/src/mame/video/truco.c b/src/mame/video/truco.c
index 0657be73a76..8d9194092c6 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_ADDR16(bitmap, 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 c75bce9289d..9364e7a9927 100644
--- a/src/mame/video/tryout.c
+++ b/src/mame/video/tryout.c
@@ -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(bitmap, cliprect, screen.machine().pens[0x10]);
+ bitmap->fill(screen.machine().pens[0x10], *cliprect);
}
else
{
diff --git a/src/mame/video/tsamurai.c b/src/mame/video/tsamurai.c
index a16deb1cf38..6a07fc6a0fd 100644
--- a/src/mame/video/tsamurai.c
+++ b/src/mame/video/tsamurai.c
@@ -218,7 +218,7 @@ SCREEN_UPDATE( tsamurai )
Note that the background color register isn't well understood
(screenshots would be helpful)
*/
- bitmap_fill(bitmap,cliprect,state->m_bgcolor);
+ 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 19d0b278b30..027e04d1716 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_ADDR16(bitmap, 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_ADDR16(bitmap, 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_ADDR16(bitmap, 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_ADDR16(bitmap, 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_ADDR16(bitmap, 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 c40d2677f60..364ccb0ec2e 100644
--- a/src/mame/video/tumbleb.c
+++ b/src/mame/video/tumbleb.c
@@ -878,7 +878,7 @@ SCREEN_UPDATE( jumppop )
{
tumbleb_state *state = screen.machine().driver_data<tumbleb_state>();
- // bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
+ // 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 3a4b91034b7..8b20070ab02 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(bitmap, cliprect, 256); /* 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 c4ce8c3399e..5661017aeef 100644
--- a/src/mame/video/tunhunt.c
+++ b/src/mame/video/tunhunt.c
@@ -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 )
- *BITMAP_ADDR16(tmpbitmap, line, x++) = color;
+ tmpbitmap->pix16(line, x++) = color;
}
while( x<256 )
- *BITMAP_ADDR16(tmpbitmap, line, x++) = 0;
+ tmpbitmap->pix16(line, x++) = 0;
} /* next line */
switch( tunhunt_ram[VSTRLO] )
@@ -320,7 +320,7 @@ static void draw_box(running_machine &machine, bitmap_t *bitmap, const rectangle
}
}
if (x >= cliprect->min_x && x <= cliprect->max_x)
- *BITMAP_ADDR16(bitmap, 0xff-y, x) = color;
+ bitmap->pix16(0xff-y, x) = color;
}
}
}
diff --git a/src/mame/video/turbo.c b/src/mame/video/turbo.c
index e078b779ad1..866e1bc8872 100644
--- a/src/mame/video/turbo.c
+++ b/src/mame/video/turbo.c
@@ -423,8 +423,8 @@ SCREEN_UPDATE( turbo )
/* loop over rows */
for (y = cliprect->min_y; y <= cliprect->max_y; y++)
{
- const UINT16 *fore = (UINT16 *)fgpixmap->base + y * fgpixmap->rowpixels;
- UINT16 *dest = (UINT16 *)bitmap->base + y * bitmap->rowpixels;
+ 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;
@@ -773,8 +773,8 @@ SCREEN_UPDATE( subroc3d )
/* loop over rows */
for (y = cliprect->min_y; y <= cliprect->max_y; y++)
{
- const UINT16 *fore = (UINT16 *)fgpixmap->base + y * fgpixmap->rowpixels;
- UINT16 *dest = (UINT16 *)bitmap->base + y * bitmap->rowpixels;
+ 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 */
@@ -993,8 +993,8 @@ SCREEN_UPDATE( buckrog )
/* loop over rows */
for (y = cliprect->min_y; y <= cliprect->max_y; y++)
{
- const UINT16 *fore = (UINT16 *)fgpixmap->base + y * fgpixmap->rowpixels;
- UINT16 *dest = (UINT16 *)bitmap->base + y * bitmap->rowpixels;
+ 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 2082d7c085b..ca9986667aa 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_ADDR32(bitmap, y, 0);
+ 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 52ecf193d8c..c86c0101403 100644
--- a/src/mame/video/twin16.c
+++ b/src/mame/video/twin16.c
@@ -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_ADDR16(bitmap, sy, 0);
- UINT8 *pdest = BITMAP_ADDR8(machine.priority_bitmap, sy, 0);
+ UINT16 *dest = &bitmap->pix16(sy);
+ UINT8 *pdest = &machine.priority_bitmap->pix8(sy);
for( x=0; x<width; x++ )
{
@@ -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_ADDR16(bitmap, y, 0);
- UINT8 *pdest = BITMAP_ADDR8(machine.priority_bitmap, y, 0);
+ 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_ADDR16(bitmap, y, 0);
- UINT8 *pdest = BITMAP_ADDR8(machine.priority_bitmap, y, 0);
+ 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;
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
+ 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 fbe94286c72..b85fcc31ae1 100644
--- a/src/mame/video/twincobr.c
+++ b/src/mame/video/twincobr.c
@@ -504,7 +504,7 @@ SCREEN_UPDATE( toaplan0 )
if (state->m_wardner_sprite_hack) wardner_sprite_priority_hack(screen.machine());
- bitmap_fill(bitmap,cliprect,0);
+ 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 f08f1828589..079ffde66f2 100644
--- a/src/mame/video/tx1.c
+++ b/src/mame/video/tx1.c
@@ -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_ADDR16(bitmap, y, 0);
+ UINT16 *bmp_addr = &bitmap->pix16(y);
UINT32 bmp_offset = y * 768 + x_offset;
@@ -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_ADDR16(bitmap, y, 0);
+ 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 505616f595d..d6a007989a2 100644
--- a/src/mame/video/ultratnk.c
+++ b/src/mame/video/ultratnk.c
@@ -118,7 +118,7 @@ SCREEN_EOF( ultratnk )
rect.max_x = horz - 15 + screen.machine().gfx[1]->width - 1;
rect.max_y = vert - 15 + screen.machine().gfx[1]->height - 1;
- sect_rect(&rect, &screen.machine().primary_screen->visible_area());
+ rect &= screen.machine().primary_screen->visible_area();
tilemap_draw(state->m_helper, &rect, state->m_playfield, 0, 0);
@@ -134,7 +134,7 @@ SCREEN_EOF( ultratnk )
for (y = rect.min_y; y <= rect.max_y; y++)
for (x = rect.min_x; x <= rect.max_x; x++)
- if (colortable_entry_get_value(screen.machine().colortable, *BITMAP_ADDR16(state->m_helper, y, x)) != BG)
+ if (colortable_entry_get_value(screen.machine().colortable, state->m_helper->pix16(y, x)) != BG)
state->m_collision[i] = 1;
}
diff --git a/src/mame/video/undrfire.c b/src/mame/video/undrfire.c
index 1a68821ce8c..cd0cdffb5b4 100644
--- a/src/mame/video/undrfire.c
+++ b/src/mame/video/undrfire.c
@@ -408,8 +408,8 @@ SCREEN_UPDATE( undrfire )
pivlayer[1] = pivlayer[0] ^ 1;
pivlayer[2] = 2;
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
- bitmap_fill(bitmap, cliprect, 0); /* 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;
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
- bitmap_fill(bitmap, cliprect, 0); /* 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 9df5982bea8..90cdf22b197 100644
--- a/src/mame/video/unico.c
+++ b/src/mame/video/unico.c
@@ -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(bitmap,cliprect,0x1f00);
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
+ 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(bitmap,cliprect,0x1f00);
- bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
+ 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/vdc.c b/src/mame/video/vdc.c
index ff3c0d6551d..18ed40357f3 100644
--- a/src/mame/video/vdc.c
+++ b/src/mame/video/vdc.c
@@ -96,7 +96,7 @@ TIMER_DEVICE_CALLBACK( pce_interrupt )
otherwise is 2 + sprite# */
UINT8 drawn[VDC_WPF];
/* our line buffer */
- UINT16 *line_buffer = BITMAP_ADDR16( vce.bmp, vce.current_bitmap_line, 86 );
+ UINT16 *line_buffer = &vce.bmp->pix16(vce.current_bitmap_line, 86 );
/* clear our priority/sprite collision detection buffer. */
memset(drawn, 0, VDC_WPF);
@@ -168,7 +168,7 @@ TIMER_DEVICE_CALLBACK( sgx_interrupt )
pce_refresh_sprites(timer.machine(), 1, vdc[1].current_segment_line, drawn[1], temp_buffer[1]);
}
- line_buffer = BITMAP_ADDR16( vce.bmp, vce.current_bitmap_line, 86 );
+ line_buffer = &vce.bmp->pix16(vce.current_bitmap_line, 86 );
/* Combine the output of both VDCs */
for( i = 0; i < 512; i++ )
{
@@ -444,7 +444,7 @@ static void draw_black_line(running_machine &machine, int line)
int i;
/* our line buffer */
- UINT16 *line_buffer = BITMAP_ADDR16( vce.bmp, line, 0 );
+ UINT16 *line_buffer = &vce.bmp->pix16(line);
for( i=0; i< VDC_WPF; i++ )
line_buffer[i] = get_black_pen( machine );
@@ -458,7 +458,7 @@ static void draw_overscan_line(int line)
int color_base = vce.vce_control & 0x80 ? 512 : 0;
/* our line buffer */
- UINT16 *line_buffer = BITMAP_ADDR16( vce.bmp, line, 0 );
+ UINT16 *line_buffer = &vce.bmp->pix16(line);
for ( i = 0; i < VDC_WPF; i++ )
line_buffer[i] = color_base + vce.vce_data[0x100].w;
@@ -472,7 +472,7 @@ static void draw_sgx_overscan_line(int line)
int color_base = vce.vce_control & 0x80 ? 512 : 0;
/* our line buffer */
- UINT16 *line_buffer = BITMAP_ADDR16( vce.bmp, line, 0 );
+ UINT16 *line_buffer = &vce.bmp->pix16(line);
for ( i = 0; i < VDC_WPF; i++ )
line_buffer[i] = color_base + vce.vce_data[0].w;
diff --git a/src/mame/video/vendetta.c b/src/mame/video/vendetta.c
index ea56d70d91d..8c9df4fd398 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);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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 78f29bc4543..918f2798fa8 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_ADDR32(bitmap, 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_ADDR32(bitmap, 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 e5e11f3dba1..d4b4c90ccfa 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_ADDR16(bitmap, y, 0);
+ 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 243da23dd21..f8d656497ca 100644
--- a/src/mame/video/vigilant.c
+++ b/src/mame/video/vigilant.c
@@ -18,11 +18,7 @@
#include "includes/vigilant.h"
-static const rectangle bottomvisiblearea =
-{
- 16*8, 48*8-1,
- 6*8, 32*8-1
-};
+static const rectangle bottomvisiblearea(16*8, 48*8-1, 6*8, 32*8-1);
VIDEO_START( vigilant )
diff --git a/src/mame/video/vindictr.c b/src/mame/video/vindictr.c
index c24c640b0da..f2aface87b9 100644
--- a/src/mame/video/vindictr.c
+++ b/src/mame/video/vindictr.c
@@ -233,8 +233,8 @@ SCREEN_UPDATE( vindictr )
for (r = 0; r < rectlist.numrects; r++, rectlist.rect++)
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
- UINT16 *mo = (UINT16 *)mobitmap->base + mobitmap->rowpixels * y;
- UINT16 *pf = (UINT16 *)bitmap->base + bitmap->rowpixels * y;
+ UINT16 *mo = &mobitmap->pix16(y);
+ UINT16 *pf = &bitmap->pix16(y);
for (x = rectlist.rect->min_x; x <= rectlist.rect->max_x; x++)
if (mo[x])
{
@@ -274,8 +274,8 @@ SCREEN_UPDATE( vindictr )
for (r = 0; r < rectlist.numrects; r++, rectlist.rect++)
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
- UINT16 *mo = (UINT16 *)mobitmap->base + mobitmap->rowpixels * y;
- UINT16 *pf = (UINT16 *)bitmap->base + bitmap->rowpixels * y;
+ UINT16 *mo = &mobitmap->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 2157b3e0044..3cf5415f204 100644
--- a/src/mame/video/volfied.c
+++ b/src/mame/video/volfied.c
@@ -121,7 +121,7 @@ static void refresh_pixel_layer( running_machine &machine, bitmap_t *bitmap )
else
color |= p[x] & 0xf;
- *BITMAP_ADDR16(bitmap, 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>();
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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/warpwarp.c b/src/mame/video/warpwarp.c
index c56463235ed..64eec2a35dd 100644
--- a/src/mame/video/warpwarp.c
+++ b/src/mame/video/warpwarp.c
@@ -218,7 +218,7 @@ WRITE8_HANDLER( warpwarp_videoram_w )
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_ADDR16(bitmap, y, x) = pen;
+ bitmap->pix16(y, x) = pen;
}
static void draw_ball(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect,pen_t pen)
diff --git a/src/mame/video/warriorb.c b/src/mame/video/warriorb.c
index 3b48ad3be9e..ba4cfc1b212 100644
--- a/src/mame/video/warriorb.c
+++ b/src/mame/video/warriorb.c
@@ -95,7 +95,7 @@ static UINT32 update_screen(screen_device &screen, bitmap_t *bitmap, const recta
layer[2] = 2;
/* Clear priority bitmap */
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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(bitmap, cliprect, get_black_pen(screen.machine()));
+ 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/wecleman.c b/src/mame/video/wecleman.c
index f44b41b5b45..1d91fe1b13b 100644
--- a/src/mame/video/wecleman.c
+++ b/src/mame/video/wecleman.c
@@ -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_ADDR32(bitmap, sy, 0);
+ 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_ADDR16(bitmap, sy, 0);
+ UINT16 *dst_ptr = &bitmap->pix16(sy);
pen_t base = sprite->pal_base;
if (!sprite->shadow_mode)
@@ -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_ADDR32(bitmap, 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_ADDR32(bitmap, 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);
@@ -693,7 +693,7 @@ static void draw_cloud(bitmap_t *bitmap,
tmskipy = scrolly / tileh;
dy = -(scrolly & (tileh-1));
- dst_base = BITMAP_ADDR32(bitmap, 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;
}
}
@@ -1065,7 +1065,7 @@ SCREEN_UPDATE( wecleman )
get_sprite_info(screen.machine());
- bitmap_fill(bitmap, cliprect, state->m_black_pen);
+ 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(bitmap, cliprect, state->m_black_pen);
+ 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 c8387709c94..e97dfdf9392 100644
--- a/src/mame/video/welltris.c
+++ b/src/mame/video/welltris.c
@@ -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_ADDR16(bitmap, y, (x * 2) + 0) = (pixdata >> 8) + (0x100 * state->m_pixelpalettebank) + 0x400;
- *BITMAP_ADDR16(bitmap, 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 6bbe06acf62..5106f49ba16 100644
--- a/src/mame/video/wgp.c
+++ b/src/mame/video/wgp.c
@@ -489,8 +489,8 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
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_ADDR16(bitmap, y, x);
- UINT8 *dstp = BITMAP_ADDR8(priority, y, x);
+ UINT16 *dsti = &bitmap->pix16(y, x);
+ UINT8 *dstp = &priority->pix8(y, x);
if (transparent)
{
@@ -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 = BITMAP_ADDR16(srcbitmap, src_y_index, 0);
- tsrc = BITMAP_ADDR8(flagsbitmap, src_y_index, 0);
+ 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(bitmap, cliprect, 0);
+ 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 6bccb12502b..b2c8ca875b8 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_ADDR32(bitmap, y, 0);
+ 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_ADDR32(bitmap, y, 0);
+ 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_ADDR32(bitmap, y, 0);
+ 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 5d5a1cf20ee..7b0f80deb67 100644
--- a/src/mame/video/wiz.c
+++ b/src/mame/video/wiz.c
@@ -10,19 +10,6 @@
#include "includes/wiz.h"
-static const rectangle spritevisiblearea =
-{
- 2*8, 32*8-1,
- 2*8, 30*8-1
-};
-
-static const rectangle spritevisibleareaflipx =
-{
- 0*8, 30*8-1,
- 2*8, 30*8-1
-};
-
-
VIDEO_START( wiz )
{
wiz_state *state = machine.driver_data<wiz_state>();
@@ -222,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(bitmap,cliprect,state->m_bgpen);
+ 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);
@@ -236,10 +223,12 @@ SCREEN_UPDATE( wiz )
int bank;
const rectangle* visible_area;
- bitmap_fill(bitmap,cliprect,state->m_bgpen);
+ 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);
+ 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);
visible_area = state->m_flipx ? &spritevisibleareaflipx : &spritevisiblearea;
bank = 7 + *state->m_sprite_bank;
@@ -253,7 +242,7 @@ SCREEN_UPDATE( wiz )
SCREEN_UPDATE( stinger )
{
wiz_state *state = screen.machine().driver_data<wiz_state>();
- bitmap_fill(bitmap,cliprect,state->m_bgpen);
+ 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 ea02b5961d0..12b2338767e 100644
--- a/src/mame/video/wolfpack.c
+++ b/src/mame/video/wolfpack.c
@@ -196,7 +196,7 @@ 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_ADDR16(bitmap, y, x) = 1;
+ bitmap->pix16(y, x) = 1;
}
}
@@ -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_ADDR16(bitmap, y, 0);
+ 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(bitmap, cliprect, state->m_video_invert);
+ bitmap->fill(state->m_video_invert, *cliprect);
for (i = 0; i < 8; i++)
for (j = 0; j < 32; j++)
@@ -294,19 +294,13 @@ SCREEN_UPDATE( wolfpack )
SCREEN_EOF( wolfpack )
{
wolfpack_state *state = screen.machine().driver_data<wolfpack_state>();
- rectangle rect;
int x;
int y;
- rect.min_x = 0;
- rect.min_y = 0;
- rect.max_x = state->m_helper->width - 1;
- rect.max_y = state->m_helper->height - 1;
+ state->m_helper->fill(0);
- bitmap_fill(state->m_helper, &rect, 0);
-
- draw_ship(screen.machine(), state->m_helper, &rect);
+ draw_ship(screen.machine(), state->m_helper, &state->m_helper->cliprect());
for (y = 128; y < 224 - state->m_torpedo_v; y++)
{
@@ -315,12 +309,12 @@ SCREEN_EOF( wolfpack )
for (x = 2 * x1; x < 2 * x2; x++)
{
- if (x < 0 || x >= state->m_helper->width)
+ if (x < 0 || x >= state->m_helper->width())
continue;
- if (y < 0 || y >= state->m_helper->height)
+ if (y < 0 || y >= state->m_helper->height())
continue;
- if (*BITMAP_ADDR16(state->m_helper, y, x))
+ if (state->m_helper->pix16(y, x))
state->m_collision = 1;
}
}
diff --git a/src/mame/video/wrally.c b/src/mame/video/wrally.c
index a9daf15e47b..6bbf6ac8928 100644
--- a/src/mame/video/wrally.c
+++ b/src/mame/video/wrally.c
@@ -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_ADDR16(bitmap, ypos, 0);
+ UINT16 *srcy = &bitmap->pix16(ypos);
int gfx_py = yflip ? (gfx->height - 1 - py) : py;
diff --git a/src/mame/video/xexex.c b/src/mame/video/xexex.c
index bb0e1f499fa..98bce45c6f3 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);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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 80e5c9b3a0a..34be73fd151 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);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ screen.machine().priority_bitmap->fill(0, *cliprect);
/* note the '+1' in the background color!!! */
- bitmap_fill(bitmap, cliprect, 16 * bg_colorbase + 1);
+ 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,8 +114,8 @@ SCREEN_UPDATE( xmen6p_left )
for(y = 0; y < 32 * 8; y++)
{
- UINT16* line_dest = BITMAP_ADDR16(bitmap, y, 0);
- UINT16* line_src = BITMAP_ADDR16(state->m_screen_left, y, 0);
+ UINT16* line_dest = &bitmap->pix16(y);
+ UINT16* line_src = &state->m_screen_left->pix16(y);
for (x = 12 * 8; x < 52 * 8; x++)
line_dest[x] = line_src[x];
@@ -131,8 +131,8 @@ SCREEN_UPDATE( xmen6p_right )
for(y = 0; y < 32 * 8; y++)
{
- UINT16* line_dest = BITMAP_ADDR16(bitmap, y, 0);
- UINT16* line_src = BITMAP_ADDR16(state->m_screen_right, y, 0);
+ UINT16* line_dest = &bitmap->pix16(y);
+ UINT16* line_src = &state->m_screen_right->pix16(y);
for (x = 12 * 8; x < 52 * 8; x++)
line_dest[x] = line_src[x];
@@ -219,9 +219,9 @@ SCREEN_EOF( xmen6p )
konami_sortlayers3(layer, state->m_layerpri);
- bitmap_fill(screen.machine().priority_bitmap, &cliprect, 0);
+ screen.machine().priority_bitmap->fill(0, cliprect);
/* note the '+1' in the background color!!! */
- bitmap_fill(renderbitmap, &cliprect, 16 * bg_colorbase + 1);
+ 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);
diff --git a/src/mame/video/xybots.c b/src/mame/video/xybots.c
index d1bc68670de..b5e8cc9e3eb 100644
--- a/src/mame/video/xybots.c
+++ b/src/mame/video/xybots.c
@@ -119,8 +119,8 @@ SCREEN_UPDATE( xybots )
for (r = 0; r < rectlist.numrects; r++, rectlist.rect++)
for (y = rectlist.rect->min_y; y <= rectlist.rect->max_y; y++)
{
- UINT16 *mo = (UINT16 *)mobitmap->base + mobitmap->rowpixels * y;
- UINT16 *pf = (UINT16 *)bitmap->base + bitmap->rowpixels * y;
+ UINT16 *mo = &mobitmap->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 9335326a215..bac0e70c8c2 100644
--- a/src/mame/video/ygv608.c
+++ b/src/mame/video/ygv608.c
@@ -553,7 +553,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const recta
// sprites are always clipped to 512x512
// - regardless of the visible display dimensions
- rectangle spriteClip = { 0, 512, 0, 512 };
+ rectangle spriteClip(0, 512, 0, 512);
PSPRITE_ATTR sa;
int flipx = 0, flipy = 0;
@@ -564,7 +564,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const recta
return;
/* draw sprites */
- sect_rect(&spriteClip, cliprect);
+ spriteClip &= *cliprect;
sa = &ygv608.sprite_attribute_table.s[YGV608_MAX_SPRITES-1];
for( i=0; i<YGV608_MAX_SPRITES; i++, sa-- )
{
@@ -747,17 +747,16 @@ SCREEN_UPDATE( ygv608 )
const rectangle &visarea = screen.visible_area();
// clip to the current bitmap
- finalclip.min_x = 0;
+ finalclip.min_x = finalclip.min_y = 0;
finalclip.max_x = screen.width() - 1;
- finalclip.min_y = 0;
finalclip.max_y = screen.height() - 1;
- sect_rect(&finalclip, cliprect);
+ finalclip &= *cliprect;
cliprect = &finalclip;
// punt if not initialized
if (ygv608.page_x == 0 || ygv608.page_y == 0)
{
- bitmap_fill(bitmap, cliprect, 0);
+ bitmap->fill(0, *cliprect);
return 0;
}
@@ -809,7 +808,7 @@ SCREEN_UPDATE( ygv608 )
tilemap_set_scroll_cols( tilemap_B, ygv608.page_x );
// now clear the screen in case we change to 1-plane mode
- bitmap_fill( work_bitmap, cliprect , 0);
+ work_bitmap->fill(0, *cliprect );
// reset resize flag
ygv608.tilemap_resize = 0;
@@ -862,8 +861,8 @@ SCREEN_UPDATE( ygv608 )
if ((ygv608.regs.s.r7 & r7_md) & MD_1PLANE)
{
// If the background tilemap is disabled, we need to clear the bitmap to black
- bitmap_fill (work_bitmap,cliprect,0);
-// bitmap_fill (work_bitmap,visarea,1);
+ work_bitmap->fill(0, *cliprect);
+// work_bitmap->fill(1, *visarea);
}
else
#endif
@@ -898,7 +897,7 @@ SCREEN_UPDATE( ygv608 )
// for some reason we can't use an opaque tilemap_A
// so use a transparent but clear the work bitmap first
// - look at why this is the case?!?
- bitmap_fill( work_bitmap,&visarea ,0);
+ work_bitmap->fill(0, visarea );
if ((ygv608.regs.s.r11 & r11_prm) == PRM_ASBDEX ||
(ygv608.regs.s.r11 & r11_prm) == PRM_ASEBDX )
diff --git a/src/mame/video/yunsun16.c b/src/mame/video/yunsun16.c
index 7473a3ceec4..1e4c0481b11 100644
--- a/src/mame/video/yunsun16.c
+++ b/src/mame/video/yunsun16.c
@@ -212,7 +212,7 @@ SCREEN_UPDATE( yunsun16 )
//popmessage("%04X", *state->m_priorityram);
- bitmap_fill(screen.machine().priority_bitmap, cliprect, 0);
+ 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 24b741f0bc5..f8ba667487d 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(bitmap, cliprect, 0);
+ 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 83295c7b34f..b778e6eda53 100644
--- a/src/mame/video/zac2650.c
+++ b/src/mame/video/zac2650.c
@@ -87,7 +87,7 @@ static int SpriteCollision(running_machine &machine, int first,int second)
continue;
}
- Checksum += *BITMAP_ADDR16(state->m_spritebitmap, y, x);
+ Checksum += state->m_spritebitmap->pix16(y, x);
}
}
@@ -113,7 +113,7 @@ static int SpriteCollision(running_machine &machine, int first,int second)
continue;
}
- Checksum -= *BITMAP_ADDR16(state->m_spritebitmap, y, x);
+ Checksum -= state->m_spritebitmap->pix16(y, x);
}
}
@@ -202,7 +202,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap)
continue;
}
- if (*BITMAP_ADDR16(bitmap, y, x) != *BITMAP_ADDR16(machine.generic.tmpbitmap, y, x))
+ if (bitmap->pix16(y, x) != machine.generic.tmpbitmap->pix16(y, x))
{
state->m_CollisionBackground = 0x80;
break;
diff --git a/src/mame/video/zaxxon.c b/src/mame/video/zaxxon.c
index b408989261b..5f772663647 100644
--- a/src/mame/video/zaxxon.c
+++ b/src/mame/video/zaxxon.c
@@ -331,8 +331,8 @@ static void draw_background(running_machine &machine, bitmap_t *bitmap, const re
{
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 = (UINT16 *)bitmap->base + y * bitmap->rowpixels;
+ 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 = (UINT16 *)pixmap->base + (srcy & ymask) * pixmap->rowpixels;
+ 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(bitmap, cliprect, get_black_pen(machine));
+ bitmap->fill(get_black_pen(machine), *cliprect);
}
diff --git a/src/osd/windows/d3dhlsl.c b/src/osd/windows/d3dhlsl.c
index 625ad7f3400..5960f7a3db6 100644
--- a/src/osd/windows/d3dhlsl.c
+++ b/src/osd/windows/d3dhlsl.c
@@ -290,7 +290,7 @@ void hlsl_info::avi_update_snap(d3d_surface *surface)
D3DLOCKED_RECT rect;
// if we don't have a bitmap, or if it's not the right size, allocate a new one
- if (avi_snap == NULL || (int)snap_width != avi_snap->width || (int)snap_height != avi_snap->height)
+ if (avi_snap == NULL || (int)snap_width != avi_snap->width() || (int)snap_height != avi_snap->height())
{
if (avi_snap != NULL)
{
@@ -319,7 +319,7 @@ void hlsl_info::avi_update_snap(d3d_surface *surface)
for (int srcy = 0; srcy < (int)snap_height; srcy++)
{
BYTE *src = (BYTE *)rect.pBits + srcy * rect.Pitch;
- BYTE *dst = (BYTE *)avi_snap->base + srcy * avi_snap->rowpixels * 4;
+ BYTE *dst = &avi_snap->pix8(srcy * 4);
for(int x = 0; x < snap_width; x++)
{
@@ -353,7 +353,7 @@ void hlsl_info::render_snapshot(d3d_surface *surface)
render_snap = false;
// if we don't have a bitmap, or if it's not the right size, allocate a new one
- if (avi_snap == NULL || snap_width != (avi_snap->width / 2) || snap_height != (avi_snap->height / 2))
+ if (avi_snap == NULL || snap_width != (avi_snap->width() / 2) || snap_height != (avi_snap->height() / 2))
{
if (avi_snap != NULL)
{
@@ -388,7 +388,7 @@ void hlsl_info::render_snapshot(d3d_surface *surface)
int toty = (srcy + cy * (snap_height / 2));
int totx = cx * (snap_width / 2);
BYTE *src = (BYTE *)rect.pBits + toty * rect.Pitch + totx * 4;
- BYTE *dst = (BYTE *)avi_snap->base + srcy * avi_snap->rowpixels * 4;
+ BYTE *dst = &avi_snap->pix8(srcy * 4);
for(int x = 0; x < snap_width / 2; x++)
{
@@ -936,10 +936,10 @@ int hlsl_info::create_resources()
render_texinfo texture;
// fake in the basic data so it looks like it came from render.c
- texture.base = shadow_bitmap->base;
- texture.rowpixels = shadow_bitmap->rowpixels;
- texture.width = shadow_bitmap->width;
- texture.height = shadow_bitmap->height;
+ texture.base = shadow_bitmap->raw_pixptr(0);
+ texture.rowpixels = shadow_bitmap->rowpixels();
+ texture.width = shadow_bitmap->width();
+ texture.height = shadow_bitmap->height();
texture.palette = NULL;
texture.seqid = 0;
diff --git a/src/osd/windows/drawd3d.c b/src/osd/windows/drawd3d.c
index 87c61e6addc..8b416c1a063 100644
--- a/src/osd/windows/drawd3d.c
+++ b/src/osd/windows/drawd3d.c
@@ -450,12 +450,12 @@ static int drawd3d_window_init(win_window_info *window)
d3d->vector_bitmap = render_load_png(file, NULL, "vector.png", NULL, NULL);
if (d3d->vector_bitmap != NULL)
{
- bitmap_fill(d3d->vector_bitmap, NULL, MAKE_ARGB(0xff,0xff,0xff,0xff));
+ d3d->vector_bitmap->fill(MAKE_ARGB(0xff,0xff,0xff,0xff));
d3d->vector_bitmap = render_load_png(file, NULL, "vector.png", d3d->vector_bitmap, NULL);
}
d3d->default_bitmap = auto_bitmap_alloc(window->machine(), 8, 8, BITMAP_FORMAT_RGB32);
- bitmap_fill(d3d->default_bitmap, NULL, MAKE_ARGB(0xff,0xff,0xff,0xff));
+ d3d->default_bitmap->fill(MAKE_ARGB(0xff,0xff,0xff,0xff));
// configure the adapter for the mode we want
if (config_adapter_mode(window))
@@ -785,10 +785,10 @@ try_again:
render_texinfo texture;
// fake in the basic data so it looks like it came from render.c
- texture.base = d3d->default_bitmap->base;
- texture.rowpixels = d3d->default_bitmap->rowpixels;
- texture.width = d3d->default_bitmap->width;
- texture.height = d3d->default_bitmap->height;
+ texture.base = d3d->default_bitmap->raw_pixptr(0);
+ texture.rowpixels = d3d->default_bitmap->rowpixels();
+ texture.width = d3d->default_bitmap->width();
+ texture.height = d3d->default_bitmap->height();
texture.palette = NULL;
texture.seqid = 0;
@@ -870,10 +870,10 @@ static int device_create_resources(d3d_info *d3d)
render_texinfo texture;
// fake in the basic data so it looks like it came from render.c
- texture.base = d3d->vector_bitmap->base;
- texture.rowpixels = d3d->vector_bitmap->rowpixels;
- texture.width = d3d->vector_bitmap->width;
- texture.height = d3d->vector_bitmap->height;
+ texture.base = &d3d->vector_bitmap->pix32(0);
+ texture.rowpixels = d3d->vector_bitmap->rowpixels();
+ texture.width = d3d->vector_bitmap->width();
+ texture.height = d3d->vector_bitmap->height();
texture.palette = NULL;
texture.seqid = 0;
diff --git a/src/osd/windows/winmain.c b/src/osd/windows/winmain.c
index b8716f6d32a..6c8428b06c5 100644
--- a/src/osd/windows/winmain.c
+++ b/src/osd/windows/winmain.c
@@ -944,11 +944,11 @@ bitmap_t *windows_osd_interface::font_get_bitmap(osd_font font, unicode_char chn
bitmap = auto_alloc(machine(), bitmap_t(actbounds.max_x + 1 - actbounds.min_x, actbounds.max_y + 1 - actbounds.min_y, BITMAP_FORMAT_ARGB32));
// copy the bits into it
- for (int y = 0; y < bitmap->height; y++)
+ for (int y = 0; y < bitmap->height(); y++)
{
- UINT32 *dstrow = BITMAP_ADDR32(bitmap, y, 0);
+ UINT32 *dstrow = &bitmap->pix32(y);
UINT8 *srcrow = &bits[(y + actbounds.min_y) * rowbytes];
- for (int x = 0; x < bitmap->width; x++)
+ for (int x = 0; x < bitmap->width(); x++)
{
int effx = x + actbounds.min_x;
dstrow[x] = ((srcrow[effx / 8] << (effx % 8)) & 0x80) ? MAKE_ARGB(0xff,0xff,0xff,0xff) : MAKE_ARGB(0x00,0xff,0xff,0xff);
diff --git a/src/tools/ldverify.c b/src/tools/ldverify.c
index f7dd152f277..eead12de0bd 100644
--- a/src/tools/ldverify.c
+++ b/src/tools/ldverify.c
@@ -526,11 +526,11 @@ static void verify_video(video_info *video, int frame, bitmap_t *bitmap)
{
for (x = 16; x < 720 - 16; x++)
{
- yhisto[*BITMAP_ADDR16(bitmap, y, x) >> 8]++;
+ yhisto[bitmap->pix16(y, x) >> 8]++;
if (x % 2 == 0)
- cbhisto[*BITMAP_ADDR16(bitmap, y, x) & 0xff]++;
+ cbhisto[bitmap->pix16(y, x) & 0xff]++;
else
- crhisto[*BITMAP_ADDR16(bitmap, y, x) & 0xff]++;
+ crhisto[bitmap->pix16(y, x) & 0xff]++;
}
pixels += 720 - 16 - 16;
}